diff --git "a/_next/static/chunks/f2d0f643.7ab3a1c531783b23.js" "b/_next/static/chunks/f2d0f643.7ab3a1c531783b23.js" new file mode 100644--- /dev/null +++ "b/_next/static/chunks/f2d0f643.7ab3a1c531783b23.js" @@ -0,0 +1,29 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[934],{33773:function(t,e,r){var n,i=r(9109).Buffer;self,n=function(){return function(){var t={79288: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])}},86712:function(t,e,r){"use strict";t.exports=r(84224)},37240:function(t,e,r){"use strict";t.exports=r(51132)},29744:function(t,e,r){"use strict";t.exports=r(94456)},29352:function(t,e,r){"use strict";t.exports=r(67244)},96144:function(t,e,r){"use strict";t.exports=r(97776)},53219:function(t,e,r){"use strict";t.exports=r(61712)},4624:function(t,e,r){"use strict";t.exports=r(95856)},54543:function(t,e,r){"use strict";t.exports=r(54272)},45e3:function(t,e,r){"use strict";t.exports=r(85404)},62300:function(t,e,r){"use strict";t.exports=r(26048)},6920:function(t,e,r){"use strict";t.exports=r(66240)},10264:function(t,e,r){"use strict";t.exports=r(40448)},32016:function(t,e,r){"use strict";t.exports=r(64884)},27528:function(t,e,r){"use strict";t.exports=r(15088)},75556:function(t,e,r){"use strict";t.exports=r(76744)},39204:function(t,e,r){"use strict";t.exports=r(94704)},73996:function(t,e,r){"use strict";t.exports=r(62396)},16489:function(t,e,r){"use strict";t.exports=r(32028)},5e3:function(t,e,r){"use strict";t.exports=r(81932)},77280:function(t,e,r){"use strict";t.exports=r(45536)},33992:function(t,e,r){"use strict";t.exports=r(42600)},17600:function(t,e,r){"use strict";t.exports=r(21536)},49116:function(t,e,r){"use strict";t.exports=r(65664)},46808:function(t,e,r){"use strict";t.exports=r(29044)},36168:function(t,e,r){"use strict";t.exports=r(48928)},13792:function(t,e,r){"use strict";var n=r(32016);n.register([r(37240),r(29352),r(5e3),r(33992),r(17600),r(49116),r(6920),r(67484),r(79440),r(39204),r(83096),r(36168),r(20260),r(63560),r(65832),r(46808),r(73996),r(48824),r(89904),r(25120),r(13752),r(4340),r(62300),r(29800),r(8363),r(54543),r(86636),r(42192),r(32140),r(77280),r(89296),r(56816),r(70192),r(45e3),r(27528),r(84764),r(3920),r(50248),r(4624),r(69967),r(10264),r(86152),r(53219),r(81604),r(63796),r(29744),r(89336),r(86712),r(75556),r(16489),r(97312),r(96144)]),t.exports=n},3920:function(t,e,r){"use strict";t.exports=r(43480)},25120:function(t,e,r){"use strict";t.exports=r(6296)},4340:function(t,e,r){"use strict";t.exports=r(7404)},86152:function(t,e,r){"use strict";t.exports=r(65456)},56816:function(t,e,r){"use strict";t.exports=r(22020)},89296:function(t,e,r){"use strict";t.exports=r(29928)},20260:function(t,e,r){"use strict";t.exports=r(75792)},32140:function(t,e,r){"use strict";t.exports=r(156)},84764:function(t,e,r){"use strict";t.exports=r(45499)},48824:function(t,e,r){"use strict";t.exports=r(3296)},69967:function(t,e,r){"use strict";t.exports=r(4184)},8363:function(t,e,r){"use strict";t.exports=r(36952)},86636:function(t,e,r){"use strict";t.exports=r(38983)},70192:function(t,e,r){"use strict";t.exports=r(11572)},81604:function(t,e,r){"use strict";t.exports=r(76924)},63796:function(t,e,r){"use strict";t.exports=r(62944)},89336:function(t,e,r){"use strict";t.exports=r(95443)},67484:function(t,e,r){"use strict";t.exports=r(34864)},97312:function(t,e,r){"use strict";t.exports=r(76272)},42192:function(t,e,r){"use strict";t.exports=r(97924)},29800:function(t,e,r){"use strict";t.exports=r(15436)},63560:function(t,e,r){"use strict";t.exports=r(5621)},89904:function(t,e,r){"use strict";t.exports=r(91304)},50248:function(t,e,r){"use strict";t.exports=r(41724)},65832:function(t,e,r){"use strict";t.exports=r(31991)},79440:function(t,e,r){"use strict";t.exports=r(22869)},13752:function(t,e,r){"use strict";t.exports=r(67776)},83096:function(t,e,r){"use strict";t.exports=r(95952)},72196: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}]},13916:function(t,e,r){"use strict";var n=r(72196),i=r(25376),a=r(33816),o=r(31780).templatedArray;r(36208),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"}}})},90272:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(23816).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"],f=t["_"+a+"padminus"],h={x:1,y:-1}[a]*t[a+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,v=p-h,g=3*t.startarrowsize*t.arrowwidth||0,y=g+h,m=g-h;if(u===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:v}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(c,y),ppadminus:Math.max(f,m)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else y=s?y+s:y,m=s?m-s:m,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(c,d,y),ppadminus:Math.max(f,v,m)});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)}},42300:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(31780).arrayEditor;function o(t,e){var r,n,i,a,o,l,u,c=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),u=l.on,c=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(u.length||c.length){for(r=0;r2/3?"right":"center"),({center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5})[e]}for(var X=!1,Z=["x","y"],K=0;K1)&&(ti===tn?((td=ta.r2fraction(e["a"+tr]))<0||td>1)&&(X=!0):X=!0),J=ta._offset+ta.r2p(e[tr]),tt=.5}else{var tv="domain"===tp;"x"===tr?(Q=e[tr],J=tv?ta._offset+ta._length*Q:J=T.l+T.w*Q):(Q=1-e[tr],J=tv?ta._offset+ta._length*Q:J=T.t+T.h*Q),tt=e.showarrow?.5:Q}if(e.showarrow){th.head=J;var tg=e["a"+tr];if(te=ts*Y(.5,e.xanchor)-tl*Y(.5,e.yanchor),ti===tn){var ty=l.getRefType(ti);"domain"===ty?("y"===tr&&(tg=1-tg),th.tail=ta._offset+ta._length*tg):"paper"===ty?"y"===tr?(tg=1-tg,th.tail=T.t+T.h*tg):th.tail=T.l+T.w*tg:th.tail=ta._offset+ta.r2p(tg),$=te}else th.tail=J+tg,$=te+tg;th.text=th.tail+te;var tm=w["x"===tr?"width":"height"];if("paper"===tn&&(th.head=o.constrain(th.head,1,tm-1)),"pixel"===ti){var tx=-Math.max(th.tail-3,th.text),tb=Math.min(th.tail+3,th.text)-tm;tx>0?(th.tail+=tx,th.text+=tx):tb>0&&(th.tail-=tb,th.text-=tb)}th.tail+=tf,th.head+=tf}else $=te=tu*Y(tt,tc),th.text=J+te;th.text+=tf,te+=tf,$+=tf,e["_"+tr+"padplus"]=tu/2+$,e["_"+tr+"padminus"]=tu/2-$,e["_"+tr+"size"]=tu,e["_"+tr+"shift"]=te}if(X){F.remove();return}var t_=0,tw=0;if("left"!==e.align&&(t_=(D-_)*("center"===e.align?.5:1)),"top"!==e.valign&&(tw=(q-A)*("middle"===e.valign?.5:1)),v)f.select("svg").attr({x:N+t_-1,y:N+tw}).call(c.setClipUrl,U?L:null,t);else{var tT=N+tw-b.top,tk=N+t_-b.left;G.call(h.positionText,tk,tT).call(c.setClipUrl,U?L:null,t)}V.select("rect").call(c.setRect,N,N,D,q),j.call(c.setRect,B/2,B/2,H-B,W-B),F.call(c.setTranslate,Math.round(C.x.text-H/2),Math.round(C.y.text-W/2)),I.attr({transform:"rotate("+P+","+C.x.text+","+C.y.text+")"});var tA=function(r,n){O.selectAll(".annotation-arrow-g").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,v=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(P,v,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr("width"),z=+j.attr("height"),D=v-.5*L,R=D+L,B=b-.5*z,N=B+z,U=[[D,B,D,N],[D,N,R,N],[R,N,R,B],[R,B,D,B]].map(A);if(!U.reduce(function(t,e){return!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])^t},!1)){U.forEach(function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)});var V=e.arrowwidth,q=e.arrowcolor,H=e.arrowside,G=O.append("g").style({opacity:u.opacity(q)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+p+"L"+l+","+f).style("stroke-width",V+"px").call(u.stroke,u.rgb(q));if(g(W,H,e),k.annotationPosition&&W.node().parentNode&&!a){var Y,X,Z=l,K=f;if(e.standoff){var J=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));Z+=e.standoff*(h-l)/J,K+=e.standoff*(p-f)/J}var $=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Z)+","+(p-K),transform:s(Z,K)}).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:$.node(),gd:t,prepFn:function(){var t=c.getTranslate(F);Y=t.x,X=t.y,y&&y.autorange&&M(y._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(t,r){var n=w(Y,X),i=n[0]+t,a=n[1]+r;F.call(c.setTranslate,i,a),S("x",m(y,t,"x",T,e)),S("y",m(x,r,"y",T,e)),e.axref===e.xref&&S("ax",m(y,t,"ax",T,e)),e.ayref===e.yref&&S("ay",m(x,r,"ay",T,e)),G.attr("transform",s(t,r)),I.attr({transform:"rotate("+P+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&tA(0,0),z&&d.init({element:F.node(),gd:t,prepFn:function(){r=I.attr("transform")},moveFn:function(t,n){var i,o,l="pointer";if(e.showarrow)e.axref===e.xref?S("ax",m(y,t,"ax",T,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",m(x,n,"ay",T.w,e)):S("ay",e.ay+n),tA(t,n);else{if(a)return;if(y)i=m(y,t,"x",T,e);else{var u=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-u/2;i=d.align(c+t/T.w,u,0,1,e.xanchor)}if(x)o=m(x,n,"y",T,e);else{var f=e._ysize/T.h,h=e.y-(e._yshift+e.yshift)/T.h-f/2;o=d.align(h-n/T.h,f,0,1,e.yanchor)}S("x",i),S("y",o),y&&x||(l=d.getCursor(y?.5:i,x?.5:o,e.xanchor,e.yanchor))}I.attr({transform:s(t,n)+r}),p(F,l)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",R(n))},doneFn:function(){p(F),i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}k.annotationText?G.call(h.makeEditable,{delegate:F,gd:t}).call(W).on("edit",function(r){e.text=r,this.call(W),S("text",r),y&&y.autorange&&M(y._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0),i.call("_guiRelayout",t,E())}):G.call(W)}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,x=e.indexOf("end")>=0,b=d.backoff*g+r.standoff,_=v.backoff*y+r.startstandoff;if("line"===p.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(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T)){D();return}if(b){if(b*b>w*w+T*T){D();return}var k=b*Math.cos(f),A=b*Math.sin(f);c.x+=k,c.y+=A,t.attr({x2:c.x,y2:c.y})}if(_){if(_*_>w*w+T*T){D();return}var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if("path"===p.nodeName){var E=p.getTotalLength(),L="";if(E1){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))}}},56864:function(t,e,r){"use strict";var n=r(24040),i=r(3400);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(45899)}}},layoutAttributes:r(45899),handleDefaults:r(52808),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(t),s=0;s=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};return n({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}).toRgbString()},o.interpolate=function(t,e,r){var i=n(t).toRgb(),a=n(e).toRgb();return n({r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b}).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;e0?!(n>=l):!(n<=l));i++)n>c&&n0?!(n>=l):!(n<=l));i++)n>r[0]&&n1){var td=Math.pow(10,Math.floor(Math.log(tp)/Math.LN10));tf*=td*u.roundUp(tp/td,[2,5,10]),(Math.abs(Y.start)/Y.size+1e-6)%1<2e-6&&(tu.tick0=0)}tu.dtick=tf}tu.domain=l?[ts+I/N.h,ts+tt-I/N.h]:[ts+O/N.w,ts+tt-O/N.w],tu.setScale(),t.attr("transform",c(Math.round(N.l),Math.round(N.t)));var tv=t.select("."+A.cbtitleunshift).attr("transform",c(-Math.round(N.l),-Math.round(N.t))),tg=tu.ticklabelposition,ty=tu.title.font.size,tm=t.select("."+A.cbaxis),tx=0,tb=0;function t_(n,i){var a={propContainer:tu,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:B._dfltTitle.colorbar,containerGroup:t.select("."+A.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+o+",."+o+"-math-group").remove(),v.draw(r,n,f(a,i||{}))}return u.syncOrAsync([a.previousPromises,function(){if(l&&tc||!l&&!tc){var t,e;"top"===q&&(t=O+N.l+te*z,e=I+N.t+tr*(1-ts-tt)+3+.75*ty),"bottom"===q&&(t=O+N.l+te*z,e=I+N.t+tr*(1-ts)-3-.25*ty),"right"===q&&(e=I+N.t+tr*D+3+.75*ty,t=O+N.l+te*ts),t_(tu._id+"title",{attributes:{x:t,y:e,"text-anchor":l?"start":"middle"}})}},function(){if(!l&&!tc||l&&tc){var a,o=t.select("."+A.cbtitle),f=o.select("text"),h=[-S/2,S/2],d=o.select(".h"+tu._id+"title-math-group").node(),v=15.6;if(f.node()&&(v=parseInt(f.node().style.fontSize,10)*w),d?(tb=(a=p.bBox(d)).width,(tx=a.height)>v&&(h[1]-=(tx-v)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(tb=(a=p.bBox(f.node())).width,tx=a.height),l){if(tx){if(tx+=5,"top"===q)tu.domain[1]-=tx/N.h,h[1]*=-1;else{tu.domain[0]+=tx/N.h;var y=g.lineCount(f);h[1]+=(1-y)*v}o.attr("transform",c(h[0],h[1])),tu.setScale()}}else tb&&("right"===q&&(tu.domain[0]+=(tb+ty/2)/N.w),o.attr("transform",c(h[0],h[1])),tu.setScale())}t.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",l?c(0,Math.round(N.h*(1-tu.domain[1]))):c(Math.round(N.w*tu.domain[0]),0)),tm.attr("transform",l?c(0,Math.round(-N.t)):c(Math.round(-N.l),0));var m=t.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(Z);m.enter().append("rect").classed(A.cbfill,!0).attr("style",""),m.exit().remove();var x=H.map(tu.c2p).map(Math.round).sort(function(t,e){return t-e});m.each(function(t,a){var o=[0===a?H[0]:(Z[a]+Z[a-1])/2,a===Z.length-1?H[1]:(Z[a]+Z[a+1])/2].map(tu.c2p).map(Math.round);l&&(o[1]=u.constrain(o[1]+(o[1]>o[0])?1:-1,x[0],x[1]));var s=n.select(this).attr(l?"x":"y",tn).attr(l?"y":"x",n.min(o)).attr(l?"width":"height",Math.max(J,2)).attr(l?"height":"width",Math.max(n.max(o)-n.min(o),2));if(e._fillgradient)p.gradient(s,r,e._id,l?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var c=W(t).replace("e-","");s.attr("fill",i(c).toHexString())}});var b=t.select("."+A.cblines).selectAll("path."+A.cbline).data(U.color&&U.width?K:[]);b.enter().append("path").classed(A.cbline,!0),b.exit().remove(),b.each(function(t){var e=Math.round(tu.c2p(t))+U.width/2%1;n.select(this).attr("d","M"+(l?tn+","+e:e+","+tn)+(l?"h":"v")+J).call(p.lineGroupStyle,U.width,G(t),U.dash)}),tm.selectAll("g."+tu._id+"tick,path").remove();var _=tn+J+(S||0)/2-("outside"===e.ticks?1:0),T=s.calcTicks(tu),k=s.getTickSigns(tu)[2];return s.drawTicks(r,tu,{vals:"inside"===tu.ticks?s.clipEnds(tu,T):T,layer:tm,path:s.makeTickPath(tu,_,k),transFn:s.makeTransTickFn(tu)}),s.drawLabels(r,tu,{vals:T,layer:tm,transFn:s.makeTransTickLabelFn(tu),labelFns:s.makeLabelFns(tu,_)})},function(){if(l&&!tc||!l&&tc){var t,i,a=tu.position||0,o=tu._offset+tu._length/2;if("right"===q)i=o,t=N.l+te*a+10+ty*(tu.showticklabels?1:.5);else if(t=o,"bottom"===q&&(i=N.t+tr*a+10+(-1===tg.indexOf("inside")?tu.tickfont.size:0)+("intside"!==tu.ticks&&e.ticklen||0)),"top"===q){var s=V.text.split("
").length;i=N.t+tr*a+10-J-w*ty*s}t_((l?"h":"v")+tu._id+"title",{avoid:{selection:n.select(r).selectAll("g."+tu._id+"tick"),side:q,offsetTop:l?0:N.t,offsetLeft:l?N.l:0,maxShift:l?B.width:B.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:l?-90:0,offset:0}})}},a.previousPromises,function(){var n=J+S/2;-1===tg.indexOf("inside")&&(g=p.bBox(tm.node()),n+=l?g.width:g.height),o=tv.select("text");var s=0,u=l&&"top"===q,f=!l&&"right"===q,v=0;if(o.node()&&!o.classed(A.jsPlaceholder)){var g,m,x=tv.select(".h"+tu._id+"title-math-group").node();x&&(l&&tc||!l&&!tc)?(s=(g=p.bBox(x)).width,m=g.height):(s=(g=p.bBox(tv.node())).right-N.l-(l?tn:tl),m=g.bottom-N.t-(l?tl:tn),l||"top"!==q||(n+=g.height,v=g.height)),f&&(o.attr("transform",c(s/2+ty/2,0)),s*=2),n=Math.max(n,l?s:m)}var b=(l?O:I)*2+n+E+S/2,w=0;!l&&V.text&&"bottom"===P&&D<=0&&(w=b/2,b+=w,v+=w),B._hColorbarMoveTitle=w,B._hColorbarMoveCBTitle=v;var j=E+S,U=(l?tn:tl)-j/2-(l?O:0),H=(l?tl:tn)-(l?Q:I+v-w);t.select("."+A.cbbg).attr("x",U).attr("y",H).attr(l?"width":"height",Math.max(b-w,2)).attr(l?"height":"width",Math.max(Q+j,2)).call(d.fill,L).call(d.stroke,e.bordercolor).style("stroke-width",E);var G=f?Math.max(s-10,0):0;t.selectAll("."+A.cboutline).attr("x",(l?tn:tl+O)+G).attr("y",(l?tl+I-Q:tn)+(u?tx:0)).attr(l?"width":"height",Math.max(J,2)).attr(l?"height":"width",Math.max(Q-(l?2*I+tx:2*O+G),2)).call(d.stroke,e.outlinecolor).style({fill:"none","stroke-width":S});var W=l?ti*b:0,Y=l?0:(1-ta)*b-v;if(W=F?N.l-W:-W,Y=R?N.t-Y:-Y,t.attr("transform",c(W,Y)),!l&&(E||i(L).getAlpha()&&!i.equals(B.paper_bgcolor,L))){var X=tm.selectAll("text"),Z=X[0].length,K=t.select("."+A.cbbg).node(),$=p.bBox(K),tt=p.getTranslate(t);X.each(function(t,e){var r=Z-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=$.right+tt.x+tl-E-2+z-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=$.left+tt.x+tl+E+2-s)<0&&(n=0)}n&&(Z<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var te={},tr=T[C],to=k[C],ts=T[P],tf=k[P],th=b-J;l?("pixels"===y?(te.y=D,te.t=Q*ts,te.b=Q*tf):(te.t=te.b=0,te.yt=D+h*ts,te.yb=D-h*tf),"pixels"===M?(te.x=z,te.l=b*tr,te.r=b*to):(te.l=th*tr,te.r=th*to,te.xl=z-_*tr,te.xr=z+_*to)):("pixels"===y?(te.x=z,te.l=Q*tr,te.r=Q*to):(te.l=te.r=0,te.xl=z+h*tr,te.xr=z-h*to),"pixels"===M?(te.y=1-D,te.t=b*ts,te.b=b*tf):(te.t=th*ts,te.b=th*tf,te.yt=D-_*ts,te.yb=D+_*tf));var tp=e.y<.5?"b":"t",td=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var tb={r:B.width-U-W,l:U+te.r,b:B.height-H-Y,t:H+te.b};F&&R?a.autoMargin(r,e._id,te):F?r._fullLayout._reservedMargin[e._id][tp]=tb[tp]:R?r._fullLayout._reservedMargin[e._id][td]=tb[td]:l?r._fullLayout._reservedMargin[e._id][td]=tb[td]:r._fullLayout._reservedMargin[e._id][tp]=tb[tp]}],r)}(E,e,t);L&&L.then&&(t._promises||[]).push(L),t._context.edits.colorbarPosition&&(M="v"===e.orientation,S=t._fullLayout._size,l.init({element:E.node(),gd:t,prepFn:function(){r=E.attr("transform"),h(E)},moveFn:function(t,n){E.attr("transform",r+c(t,n)),y=l.align((M?e._uFrac:e._vFrac)+t/S.w,M?e._thickFrac:e._lenFrac,0,1,e.xanchor),_=l.align((M?e._vFrac:1-e._uFrac)-n/S.h,M?e._lenFrac:e._thickFrac,0,1,e.yanchor),h(E,l.getCursor(y,_,e.xanchor,e.yanchor))},doneFn:function(){if(h(E),void 0!==y&&void 0!==_){var r={};r[e._propPrefix+"x"]=y,r[e._propPrefix+"y"]=_,void 0!==e._traceIndex?o.call("_guiRestyle",t,r,e._traceIndex):o.call("_guiRelayout",t,r)}}}))}),e.exit().each(function(e){a.autoMargin(t,e._id)}).remove(),e.order()}}},90553:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t){return n.isPlainObject(t.colorbar)}},55080:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(42996),supplyDefaults:r(64013),draw:r(37848).draw,hasColorbar:r(90553)}},49084:function(t,e,r){"use strict";var n=r(42996),i=r(53756).counter,a=r(95376),o=r(88304).scales;function s(t){return"`"+t+"`"}a(o),t.exports=function(t,e){t=t||"";var r,a=(e=e||{}).cLetter||"c";"onlyIfNumerical"in e&&e.onlyIfNumerical;var l="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,f=e.editTypeOverride||"",h=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):s(h+(r=({z:"z",c:"color"})[a]));var p=a+"auto",d=a+"min",v=a+"max";s(h+p),s(h+d),s(h+v);var g={};g[d]=g[v]=void 0;var y={};y[p]=!1;var m={};return"color"===r&&(m.color={valType:"color",arrayOk:!0,editType:f||"style"},e.anim&&(m.color.anim=!0)),m[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:g},m[d]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},m[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},m[a+"mid"]={valType:"number",dflt:null,editType:"calc",impliedEdits:g},m.colorscale={valType:"colorscale",editType:"calc",dflt:c,impliedEdits:{autocolorscale:!1}},m.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},m.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(m.showscale={valType:"boolean",dflt:u,editType:"calc"},m.colorbar=n),e.noColorAxis||(m.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),m}},47128:function(t,e,r){"use strict";var n=r(38248),i=r(3400),a=r(94288).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,f=a(c),h=!1!==f.auto,p=f.min,d=f.max,v=f.mid,g=function(){return i.aggNums(Math.min,null,l)},y=function(){return i.aggNums(Math.max,null,l)};void 0===p?p=g():h&&(p=c._colorAx&&n(p)?Math.min(p,g()):g()),void 0===d?d=y():h&&(d=c._colorAx&&n(d)?Math.max(d,y()):y()),h&&void 0!==v&&(d-v>v-p?p=v-(d-v):d-v=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},95504:function(t,e,r){"use strict";var n=r(3400),i=r(94288).hasColorscale,a=r(94288).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=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,o=t.domain,l=t.range,u=l.length,c=Array(u),f=0;f4/3-s?o:s}},67416: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),i[e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2)][t]}},72760: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)}},86476:function(t,e,r){"use strict";var n=r(29128),i=r(52264),a=r(89184),o=r(3400).removeElement,s=r(33816),l=t.exports={};l.align=r(78316),l.getCursor=r(67416);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 f(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,h,p,d,v,g=t.gd,y=1,m=g._context.doubleClickDelay,x=t.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)m&&(y=Math.max(y-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(y,p),!v){var r;try{r=new MouseEvent("click",e)}catch(t){var n=f(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}},l.coverSlip=c},2616:function(t,e,r){"use strict";var n=r(95924),i=r(91200),a=r(52200).getGraphDiv,o=r(92456),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}))}},98192: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"}},43616:function(t,e,r){"use strict";var n,i,a,o,s,l,u,c,f=r(33428),h=r(3400),p=h.numberFormat,d=r(38248),v=r(49760),g=r(24040),y=r(76308),m=r(8932),x=h.strTranslate,b=r(72736),_=r(9616),w=r(84284).LINE_SPACING,T=r(13448).DESELECTDIM,k=r(43028),A=r(7152),M=r(10624).appendArrayPointValue,S=t.exports={};function E(t,e,r,n){var i=e.fillpattern,a=e.fillgradient,o=i&&S.getPatternAttr(i.shape,0,"");if(o){var s=S.getPatternAttr(i.bgcolor,0,null),l=S.getPatternAttr(i.fgcolor,0,null),u=i.fgopacity,c=S.getPatternAttr(i.size,0,8),f=S.getPatternAttr(i.solidity,0,.3),h=e.uid;S.pattern(t,"point",r,h,o,c,f,void 0,i.fillmode,s,l,u)}else if(a&&"none"!==a.type){var p,d,v=a.type,g="scatterfill-"+e.uid;n&&(g="legendfill-"+e.uid),n||void 0===a.start&&void 0===a.stop?("horizontal"===v&&(v+="reversed"),t.call(S.gradient,r,g,v,a.colorscale,"fill")):("horizontal"===v?(p={x:a.start,y:0},d={x:a.stop,y:0}):"vertical"===v&&(p={x:0,y:a.start},d={x:0,y:a.stop}),p.x=e._xA.c2p(void 0===p.x?e._extremes.x.min[0].val:p.x,!0),p.y=e._yA.c2p(void 0===p.y?e._extremes.y.min[0].val:p.y,!0),d.x=e._xA.c2p(void 0===d.x?e._extremes.x.max[0].val:d.x,!0),d.y=e._yA.c2p(void 0===d.y?e._extremes.y.max[0].val:d.y,!0),t.call(z,r,g,"linear",a.colorscale,"fill",p,d,!0,!1))}else e.fillcolor&&t.call(y.fill,e.fillcolor)}S.font=function(t,e,r,n,i,a,o){h.isPlainObject(e)&&(o=e.variant,a=e.style,i=e.weight,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(y.fill,n),i&&t.style("font-weight",i),a&&t.style("font-style",a),o&&t.style("font-variant",o)},S.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},S.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},S.setRect=function(t,e,r,n,i){t.call(S.setPosition,e,r).call(S.setSize,n,i)},S.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(d(i)&&d(a)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform",x(i,a)),!0)},S.translatePoints=function(t,e,r){t.each(function(t){var n=f.select(this);S.translatePoint(t,n,e,r)})},S.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},S.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,n=e.yaxis;t.each(function(e){var i=e[0].trace,a=i.xcalendar,o=i.ycalendar,s=g.traceIs(i,"bar-like")?".bartext":".point,.textpoint";t.selectAll(s).each(function(t){S.hideOutsideRangePoint(t,f.select(this),r,n,a,o)})})}},S.crispRound=function(t,e,r){return e&&d(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},S.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||"";y.stroke(e,n||a.color),S.dashLine(e,s,o)},S.lineGroupStyle=function(t,e,r,n){t.style("fill","none").each(function(t){var i=(((t||[])[0]||{}).trace||{}).line||{},a=e||i.width||0,o=n||i.dash||"";f.select(this).call(y.stroke,r||i.color).call(S.dashLine,o,a)})},S.dashLine=function(t,e,r){r=+r||0,e=S.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},S.dashStyle=function(t,e){var r=Math.max(e=+e||1,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},S.singleFillStyle=function(t,e){var r=((f.select(t.node()).data()[0]||[])[0]||{}).trace||{};E(t,r,e,!1)},S.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each(function(t){var n=f.select(this);t[0].trace&&E(n,t[0].trace,e,r)})};var L=r(71984);S.symbolNames=[],S.symbolFuncs=[],S.symbolBackOffs=[],S.symbolNeedLines={},S.symbolNoDot={},S.symbolNoFill={},S.symbolList=[],Object.keys(L).forEach(function(t){var e=L[t],r=e.n;S.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),S.symbolNames[r]=t,S.symbolFuncs[r]=e.f,S.symbolBackOffs[r]=e.backoff||0,e.needLine&&(S.symbolNeedLines[r]=!0),e.noDot?S.symbolNoDot[r]=!0:S.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(S.symbolNoFill[r]=!0)});var C=S.symbolNames.length;function P(t,e,r,n){return S.symbolFuncs[t%100](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}S.symbolNumber=function(t){if(d(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=S.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=C||t>=400?0:Math.floor(Math.max(t,0))};var O=p("~f"),I={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 z(t,e,r,n,i,a,o,s,l,u){var c,p=i.length;"linear"===n?c={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:"radial"===n&&(c={node:"radialGradient",reversed:u});for(var d=Array(p),g=0;g=0&&void 0===t.i&&(t.i=a.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?u.opacity:t.mo),n.ms2mrc){f="various"===t.ms||"various"===u.size?3:n.ms2mrc(t.ms),t.mrc=f,n.selectedSizeFn&&(f=t.mrc=n.selectedSizeFn(t));var f,p=S.symbolNumber(t.mx||u.symbol)||0;t.om=p%200>=100;var d=te(t,r),v=K(t,r);e.attr("d",P(p,f,d,v))}var g=!1;if(t.so)l=c.outlierwidth,s=c.outliercolor,o=u.outliercolor;else{var m=(c||{}).width;l=(t.mlw+1||m+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,s="mlc"in t?t.mlcc=n.lineScale(t.mlc):h.isArrayOrTypedArray(c.color)?y.defaultLine:c.color,h.isArrayOrTypedArray(u.color)&&(o=y.defaultLine,g=!0),o="mc"in t?t.mcc=n.markerScale(t.mc):u.color||u.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(o=n.selectedColorFn(t))}if(t.om)e.call(y.stroke,o).style({"stroke-width":(l||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:l)+"px");var x=u.gradient,b=t.mgt;b?g=!0:b=x&&x.type,h.isArrayOrTypedArray(b)&&!I[b=b[0]]&&(b=0);var _=u.pattern,w=_&&S.getPatternAttr(_.shape,t.i,"");if(b&&"none"!==b){var T=t.mgc;T?g=!0:T=x.color;var k=r.uid;g&&(k+="-"+t.i),S.gradient(e,i,k,b,[[0,T],[1,o]],"fill")}else if(w){var A=!1,M=_.fgcolor;!M&&a&&a.color&&(M=a.color,A=!0);var E=S.getPatternAttr(M,t.i,a&&a.color||null),L=S.getPatternAttr(_.bgcolor,t.i,null),C=_.fgopacity,O=S.getPatternAttr(_.size,t.i,8),z=S.getPatternAttr(_.solidity,t.i,.3);A=A||t.mcc||h.isArrayOrTypedArray(_.shape)||h.isArrayOrTypedArray(_.bgcolor)||h.isArrayOrTypedArray(_.fgcolor)||h.isArrayOrTypedArray(_.size)||h.isArrayOrTypedArray(_.solidity);var D=r.uid;A&&(D+="-"+t.i),S.pattern(e,"point",i,D,w,O,z,t.mcc,_.fillmode,L,E,C)}else h.isArrayOrTypedArray(o)?y.fill(e,o[t.i]):y.fill(e,o);l&&y.stroke(e,s)}},S.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=S.tryColorscale(r,""),e.lineScale=S.tryColorscale(r,"line"),g.traceIs(t,"symbols")&&(e.ms2mrc=k.isBubble(t)?A(t):function(){return(r.size||6)/2}),t.selectedpoints&&h.extendFlat(e,S.makeSelectedPointStyleFns(t)),e},S.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,l=a.opacity,u=o.opacity,c=void 0!==l,f=void 0!==u;(h.isArrayOrTypedArray(s)||c||f)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?i.opacity:t.mo;return t.selected?c?l:e:f?u:T*e});var p=i.color,d=a.color,v=o.color;(d||v)&&(e.selectedColorFn=function(t){var e=t.mcc||p;return t.selected?d||e:v||e});var y=i.size,m=a.size,x=o.size,b=void 0!==m,_=void 0!==x;return g.traceIs(t,"symbols")&&(b||_)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?b?m/2:e:_?x/2:e}),e},S.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:y.addOpacity(e,T))},e},S.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=S.makeSelectedPointStyleFns(e),n=e.marker||{},i=[];r.selectedOpacityFn&&i.push(function(t,e){t.style("opacity",r.selectedOpacityFn(e))}),r.selectedColorFn&&i.push(function(t,e){y.fill(t,r.selectedColorFn(e))}),r.selectedSizeFn&&i.push(function(t,i){var a=i.mx||n.symbol||0,o=r.selectedSizeFn(i);t.attr("d",P(S.symbolNumber(a),o,te(i,e),K(i,e))),i.mrc2=o}),i.length&&t.each(function(t){for(var e=f.select(this),r=0;r0?r:0}function B(t,e,r){return r&&(t=H(t)),e?j(t[1]):N(t[0])}function N(t){var e=f.round(t,2);return n=e,e}function j(t){var e=f.round(t,2);return i=e,e}function U(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,f=(u*u*a-l*l*s)*n,h=3*u*(l+u),p=3*l*(l+u);return[[N(e[0]+(h&&c/h)),j(e[1]+(h&&f/h))],[N(e[0]-(p&&c/p)),j(e[1]-(p&&f/p))]]}S.textPointStyle=function(t,e,r){if(t.size()){if(e.selectedpoints){var n;n=S.makeSelectedTextStyleFns(e).selectedTextColorFn}var i=e.texttemplate,a=r._fullLayout;t.each(function(t){var o=f.select(this),s=i?h.extractOption(t,e,"txt","texttemplate"):h.extractOption(t,e,"tx","text");if(!s&&0!==s){o.remove();return}if(i){var l=e._module.formatLabels,u=l?l(t,e,a):{},c={};M(c,e,t.i);var p=e._meta||{};s=h.texttemplateString(s,u,a._d3locale,c,t,p)}var d=t.tp||e.textposition,v=F(t,e),g=n?n(t):t.tc||e.textfont.color;o.call(S.font,{family:t.tf||e.textfont.family,weight:t.tw||e.textfont.weight,style:t.ty||e.textfont.style,variant:t.tv||e.textfont.variant,size:v,color:g}).text(s).call(b.convertToTspans,r).call(R,d,v,t.mrc)})}},S.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=S.makeSelectedTextStyleFns(e);t.each(function(t){var n=f.select(this),i=r.selectedTextColorFn(t),a=t.tp||e.textposition,o=F(t,e);y.fill(n,i);var s=g.traceIs(e,"bar-like");R(n,a,o,t.mrc2||t.mrc,s)})}},S.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=c||_>=p&&_<=c)&&(w<=d&&w>=f||w>=d&&w<=f)&&(t=[_,w])}return t}S.steps=function(t){var e=V[t]||q;return function(t){for(var r="M"+N(t[0][0])+","+j(t[0][1]),n=t.length,i=1;i=1e4&&(S.savedBBoxes={},G=0),r&&(S.savedBBoxes[r]=v),G++,h.extendFlat({},v)},S.setClipUrl=function(t,e,r){t.attr("clip-path",Y(e,r))},S.getTranslate=function(t){var e=t.attr?"attr":"getAttribute",r=(t[e]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+r[0]||0,y:+r[1]||0}},S.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=a.replace(/(\btranslate\(.*?\);?)/,"").trim()+x(e,r)).trim(),t[i]("transform",a),a},S.getScale=function(t){var e=t.attr?"attr":"getAttribute",r=(t[e]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(t,e,r){return[e,r].join(" ")}).split(" ");return{x:+r[0]||1,y:+r[1]||1}},S.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=a.replace(/(\bscale\(.*?\);?)/,"").trim()+("scale("+e+",")+r+")").trim(),t[i]("transform",a),a};var X=/\s*sc.*/;S.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(X,"");t+=n,t=t.trim(),this.setAttribute("transform",t)})}};var Z=/translate\([^)]*\)\s*$/;function K(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}S.setTextPointsScale=function(t,e,r){t&&t.each(function(){var t,n=f.select(this),i=n.select("text");if(i.node()){var a=parseFloat(i.attr("x")||0),o=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(Z);t=1===e&&1===r?[]:[x(a,o),"scale("+e+","+r+")",x(-a,-o)],s&&t.push(s),n.attr("transform",t.join(""))}})},S.getMarkerStandoff=K;var J=Math.atan2,$=Math.cos,Q=Math.sin;function tt(t,e){var r=e[0],n=e[1];return[r*$(t)-n*Q(t),r*Q(t)+n*$(t)]}function te(t,e){var r=t.ma;void 0===r&&(!(r=e.marker.angle)||h.isArrayOrTypedArray(r))&&(r=0);var n=e.marker.angleref;if("previous"===n||"north"===n){if(e._geo){var i=e._geo.project(t.lonlat);v=i[0],g=i[1]}else{var f=e._xA,p=e._yA;if(!f||!p)return 90;v=f.c2p(t.x),g=p.c2p(t.y)}if(e._geo){var v,g,y,m=t.lonlat[0],x=t.lonlat[1],b=e._geo.project([m,x+1e-5]),_=e._geo.project([m+1e-5,x]),w=J(_[1]-g,_[0]-v),T=J(b[1]-g,b[0]-v);if("north"===n)y=r/180*Math.PI;else if("previous"===n){var k=x/180*Math.PI,A=o/180*Math.PI,M=a/180*Math.PI-m/180*Math.PI;y=-J($(A)*Q(M),Q(A)*$(k)-$(A)*Q(k)*$(M))-Math.PI,a=m,o=x}var S=tt(w,[$(y),0]),E=tt(T,[Q(y),0]);r=J(S[1]+E[1],S[0]+E[0])/Math.PI*180,"previous"!==n||c===e.uid&&t.i===u+1||(r=null)}if("previous"===n&&!e._geo){if(c===e.uid&&t.i===u+1&&d(v)&&d(g)){var L=v-s,C=g-l,P=e.line&&e.line.shape||"",O=P.slice(P.length-1);"h"===O&&(C=0),"v"===O&&(L=0),r+=J(C,L)/Math.PI*180+90}else r=null}}return s=v,l=g,u=t.i,c=e.uid,r}S.getMarkerAngle=te},71984:function(t,e,r){"use strict";var n,i,a,o,s=r(21984),l=r(33428).round,u="M0,0Z",c=Math.sqrt(2),f=Math.sqrt(3),h=Math.PI,p=Math.cos,d=Math.sin;function v(t){return null===t}function g(t,e,r){if((!t||t%360==0)&&!e)return r;if(a===t&&o===e&&n===r)return i;function l(t,r){var n=p(t),i=d(t),a=r[0],o=r[1]+(e||0);return[a*n-o*i,a*i+o*n]}a=t,o=e,n=r;for(var u=t/180*h,c=0,f=0,v=s(r),g="",y=0;y0,f=t._context.staticPlot;e.each(function(e){var h,p=e[0].trace,d=p.error_x||{},v=p.error_y||{};p.ids&&(h=function(t){return t.id});var g=o.hasMarkers(p)&&p.marker.maxdisplayed>0;v.visible||d.visible||(e=[]);var y=n.select(this).selectAll("g.errorbar").data(e,h);if(y.exit().remove(),e.length){d.visible||y.selectAll("path.xerror").remove(),v.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var m=y.enter().append("g").classed("errorbar",!0);c&&m.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(y,r.layerClipId,t),y.each(function(t){var e,r,a=n.select(this),o=(e={x:l.c2p(t.x),y:u.c2p(t.y)},void 0===t.yh||(e.yh=u.c2p(t.yh),e.ys=u.c2p(t.ys),i(e.ys)||(e.noYS=!0,e.ys=u.c2p(t.ys,!0))),void 0===t.xh||(e.xh=l.c2p(t.xh),e.xs=l.c2p(t.xs),i(e.xs)||(e.noXS=!0,e.xs=l.c2p(t.xs,!0))),e);if(!g||t.vis){var h=a.select("path.yerror");if(v.visible&&i(o.x)&&i(o.yh)&&i(o.ys)){var p=v.width;r="M"+(o.x-p)+","+o.yh+"h"+2*p+"m-"+p+",0V"+o.ys,o.noYS||(r+="m-"+p+",0h"+2*p),h.size()?c&&(h=h.transition().duration(s.duration).ease(s.easing)):h=a.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0),h.attr("d",r)}else h.remove();var y=a.select("path.xerror");if(d.visible&&i(o.y)&&i(o.xh)&&i(o.xs)){var m=(d.copy_ystyle?v:d).width;r="M"+o.xh+","+(o.y-m)+"v"+2*m+"m0,-"+m+"H"+o.xs,o.noXS||(r+="m0,-"+m+"v"+2*m),y.size()?c&&(y=y.transition().duration(s.duration).ease(s.easing)):y=a.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0),y.attr("d",r)}else y.remove()}})}})}},92036:function(t,e,r){"use strict";var n=r(33428),i=r(76308);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)})}},55756:function(t,e,r){"use strict";var n=r(25376),i=r(65460).hoverlabel,a=r(92880).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"}}},55056:function(t,e,r){"use strict";var n=r(3400),i=r(24040);function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){for(var e=t.calcdata,r=t._fullLayout,o=0;o=0&&r.indexG[0]._length||tx<0||tx>W[0]._length)return v.unhoverRaw(t,e)}else tm="xpx"in e?e.xpx:G[0]._length/2,tx="ypx"in e?e.ypx:W[0]._length/2;if(e.pointerX=tm+G[0]._offset,e.pointerY=tx+W[0]._offset,ta="xval"in e?m.flat(u,e.xval):m.p2c(G,tm),to="yval"in e?m.flat(u,e.yval):m.p2c(W,tx),!i(ta[0])||!i(to[0]))return o.warn("Fx.hover failed",e,t),v.unhoverRaw(t,e)}var tT=1/0;function tk(r,n){for(tl=0;tlty&&($.splice(0,ty),tT=$[0].distance),_&&0!==J&&0===$.length){tg.distance=J,tg.index=!1;var h=tc._module.hoverPoints(tg,td,tv,"closest",{hoverLayer:f._hoverlayer});if(h&&(h=h.filter(function(t){return t.spikeDistance<=J})),h&&h.length){var v,y=h.filter(function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap});if(y.length){var x=y[0];i(x.x0)&&i(x.y0)&&(v=tM(x),(!tt.vLinePoint||tt.vLinePoint.spikeDistance>v.spikeDistance)&&(tt.vLinePoint=v))}var b=h.filter(function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap});if(b.length){var T=b[0];i(T.x0)&&i(T.y0)&&(v=tM(T),(!tt.hLinePoint||tt.hLinePoint.spikeDistance>v.spikeDistance)&&(tt.hLinePoint=v))}}}}}function tA(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)tF-1;tD--)tU($[tD]);$=tB,tC()}var tV=t._hoverdata,tq=[],tH=V(t),tG=q(t);for(ts=0;ts<$.length;ts++){var tW=$[ts],tY=m.makeEventData(tW,tW.trace,tW.cd);if(!1!==tW.hovertemplate){var tX=!1;tW.cd[tW.index]&&tW.cd[tW.index].ht&&(tX=tW.cd[tW.index].ht),tW.hovertemplate=tX||tW.trace.hovertemplate||!1}if(tW.xa&&tW.ya){var tZ=tW.x0+tW.xa._offset,tK=tW.x1+tW.xa._offset,tJ=tW.y0+tW.ya._offset,t$=tW.y1+tW.ya._offset,tQ=Math.min(tZ,tK),t0=Math.max(tZ,tK),t1=Math.min(tJ,t$),t2=Math.max(tJ,t$);tY.bbox={x0:tQ+tG,x1:t0+tG,y0:t1+tH,y1:t2+tH}}tW.eventData=[tY],tq.push(tY)}t._hoverdata=tq;var t3="y"===w&&(Q.length>1||$.length>1)||"closest"===w&&te&&$.length>1,t4=d.combine(f.plot_bgcolor||d.background,f.paper_bgcolor),t5=z($,{gd:t,hovermode:w,rotateLabels:t3,bgColor:t4,container:f._hoverlayer,outerContainer:f._paper.node(),commonLabelOpts:f.hoverlabel,hoverdistance:f.hoverdistance}),t6=t5.hoverLabels;if(m.isUnifiedHover(w)||(function(t,e,r,n){var i,a,o,s,l,u,c,f=e?"xa":"ya",h=e?"ya":"xa",p=0,d=1,v=t.size(),g=Array(v),y=0,m=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(t){return t*r._invScaleX},T=function(t){return t*r._invScaleY};function A(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;se.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=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[f],i=t[h],a="x"===n._id.charAt(0),o=n.range;0===y&&o&&o[0]>o[1]!==a&&(d=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var u,c,p=R(t,e),v=t.anchor,A="end"===v?-1:1;if("middle"===v)c=(u=t.crossPos+(a?T(p.y-t.by/2):w(t.bx/2+t.tx2width/2)))+(a?T(t.by):w(t.bx));else if(a)c=(u=t.crossPos+T(S+p.y)-T(t.by/2-S))+T(t.by);else{var M=w(A*S+p.x),E=M+w(A*t.bx);u=t.crossPos+Math.min(M,E),c=t.crossPos+Math.max(M,E)}a?void 0!==b&&void 0!==_&&Math.min(c,_)-Math.max(u,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==m&&void 0!==x&&Math.min(c,x)-Math.max(u,m)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[y++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?k:1)/2,pmin:s,pmax:l}]}),g.sort(function(t,e){return t[0].posref-e[0].posref||d*(e[0].traceIndex-t[0].traceIndex)});!i&&p<=v;){for(p++,i=!0,s=0;s.01&&L.pmin===C.pmin&&L.pmax===C.pmax){for(l=E.length-1;l>=0;l--)E[l].dp+=a;for(M.push.apply(M,E),g.splice(s+1,1),c=0,l=M.length-1;l>=0;l--)c+=M[l].dp;for(o=c/M.length,l=M.length-1;l>=0;l--)M[l].dp-=o;i=!1}else s++}g.forEach(A)}for(s=g.length-1;s>=0;s--){var P=g[s];for(l=P.length-1;l>=0;l--){var O=P[l],I=O.datum;I.offset=O.dp,I.del=O.del}}}(t6,t3,f,t5.commonLabelBoundingBox),F(t6,t3,f._invScaleX,f._invScaleY)),l&&l.tagName){var t8=y.getComponentMethod("annotations","hasClickToShow")(t,tq);h(n.select(l),t8?"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,tV)&&(tV&&t.emit("plotly_unhover",{event:e,points:tV}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:G,yaxes:W,xvals:ta,yvals:to}))})(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=z(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),f=Math.max(r,n),h=Math.min(s,l),p=Math.max(s,l),v=t.trace;if(y.traceIs(v,"gl3d")){var g=i._fullLayout[v.scene]._scene.container,m=g.offsetLeft,x=g.offsetTop;c+=m,f+=m,h+=x,p+=x}u.bbox={x0:c+o,x1:f+o,y0:h+a,y1:p+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,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontVariant:t.fontVariant,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData: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;n-5([\s\S]*)<\/extra>/;function z(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,s=e.rotateLabels,c=e.bgColor,h=e.container,v=e.outerContainer,g=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||x.HOVERFONT,k=e.fontSize||x.HOVERFONTSIZE,A=e.fontWeight||i.font.weight,M=e.fontStyle||i.font.style,L=e.fontVariant||i.font.variant,C=t[0],P=C.xa,I=C.ya,z=a.charAt(0),R=z+"Label",F=C[R];if(void 0===F&&"multicategory"===P.type)for(var B=0;Bi.width-x&&(b=i.width-x),e.attr("d","M"+(_-b)+",0L"+(_-b+S)+","+m+S+"H"+x+"v"+m+(2*E+y.height)+"H"+-x+"V"+m+S+"H"+(_-b-S)+"Z"),_=b,K.minX=_-x,K.maxX=_+x,"top"===P.side?(K.minY=w-(2*E+y.height),K.maxY=w-E):(K.minY=w+E,K.maxY=w+(2*E+y.height))}else{"right"===I.side?(O="start",z=1,D="",_=P._offset+P._length):(O="end",z=-1,D="-",_=P._offset),w=I._offset+(C.y0+C.y1)/2,s.attr("text-anchor",O),e.attr("d","M0,0L"+D+S+","+S+"V"+(E+y.height/2)+"h"+D+(2*E+y.width)+"V-"+(E+y.height/2)+"H"+D+S+"V-"+S+"Z"),K.minY=w-(E+y.height/2),K.maxY=w+(E+y.height/2),"right"===I.side?(K.minX=_+S,K.maxX=_+S+(2*E+y.width)):(K.minX=_-S-(2*E+y.width),K.maxX=_-S);var _,w,O,z,D,R,B=y.height/2,N=j-y.top-B,U="clip"+i._uid+"commonlabel"+I._id;if(_=0?Q:tt+ty=0?tt:tT+ty=0?J:$+tm=0?$:tk+tm=0,("top"===t.idealAlign||!e)&&o?(N-=W/2,t.anchor="end"):e?(N+=W/2,t.anchor="start"):t.anchor="middle",t.crossPos=N;else{if(t.pos=N,e=B+G/2+K<=U,o=B-G/2-K>=0,("left"===t.idealAlign||!e)&&o)B-=G/2,t.anchor="end";else if(e)B+=G/2,t.anchor="start";else{t.anchor="middle";var J=K/2,$=B+J-U,Q=B-J;$>0&&(B-=$),Q<0&&(B+=-Q)}t.crossPos=B}P.attr("text-anchor",t.anchor),I&&O.attr("text-anchor",t.anchor),h.attr("transform",l(B,N)+(s?u(w):""))}),{hoverLabels:tA,commonLabelBoundingBox:K}}function D(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=j(t.name,t.nameLength));var u=r.charAt(0);void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[u+"Label"]===i?l=t[("x"===u?"y":"x")+"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?"
":"")+t.text),void 0!==t.extraText&&(l+=(l?"
":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var c=t.hovertemplate||!1;if(c){var f=t.hovertemplateLabels||t;t[u+"Label"]!==i&&(f[u+"other"]=f[u+"Val"],f[u+"otherLabel"]=f[u+"Label"]),l=(l=o.hovertemplateString(c,f,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(I,function(e,r){return s=j(r,t.nameLength),""})}return[l,s]}function R(t,e){var r=0,n=t.offset;return e&&(n*=-M,r=t.offset*A),{x:r,y:n}}function F(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each(function(t){var r,i,s,l=n.select(this);if(t.del)return l.remove();var u=l.select("text.nums"),c=t.anchor,h="end"===c?-1:1,d=(s=(i=(r=({start:1,end:-1,middle:0})[t.anchor])*(S+E))+r*(t.txwidth+E),"middle"===t.anchor&&(i-=t.tx2width/2,s+=t.txwidth/2+E),{alignShift:r,textShiftX:i,text2ShiftX:s}),v=R(t,e),g=v.x,y=v.y,m="middle"===c;l.select("path").attr("d",m?"M-"+a(t.bx/2+t.tx2width/2)+","+o(y-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(h*S+g)+","+o(S+y)+"v"+o(t.by/2-S)+"h"+a(h*t.bx)+"v-"+o(t.by)+"H"+a(h*S+g)+"V"+o(y-S)+"Z");var x=g+d.textShiftX,b=y+t.ty0-t.by/2+E,_=t.textAlign||"auto";"auto"!==_&&("left"===_&&"start"!==c?(u.attr("text-anchor","start"),x=m?-t.bx/2-t.tx2width/2+E:-t.bx-E):"right"===_&&"end"!==c&&(u.attr("text-anchor","end"),x=m?t.bx/2-t.tx2width/2-E:t.bx+E)),u.call(f.positionText,a(x),o(b)),t.tx2width&&(l.select("text.name").call(f.positionText,a(d.text2ShiftX+d.alignShift*E+g),o(y+t.ty0-t.by/2+E)),l.select("rect").call(p.setRect,a(d.text2ShiftX+(d.alignShift-1)*t.tx2width/2+g),o(y-t.by/2-1),a(t.tx2width),o(t.by+2)))})}function B(t,e,r){var n=r.container,i=r.fullLayout,o=i._size,s=r.event,l=!!e.hLinePoint,u=!!e.vLinePoint;if(n.selectAll(".spikeline").remove(),u||l){var c=d.combine(i.plot_bgcolor,i.paper_bgcolor);if(l){var f,h,v,y,m,x,b=e.hLinePoint;f=b&&b.xa,"cursor"===(h=b&&b.ya).spikesnap?(v=s.pointerX,y=s.pointerY):(v=f._offset+b.x,y=h._offset+b.y);var _=1.5>a.readability(b.color,c)?d.contrast(c):b.color,w=h.spikemode,T=h.spikethickness,k=h.spikecolor||_,A=g.getPxPosition(t,h);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(m=A,x=v),-1!==w.indexOf("across")){var M=h._counterDomainMin,S=h._counterDomainMax;"free"===h.anchor&&(M=Math.min(M,h.position),S=Math.max(S,h.position)),m=o.l+M*o.w,x=o.l+S*o.w}n.insert("line",":first-child").attr({x1:m,x2:x,y1:y,y2:y,"stroke-width":T,stroke:k,"stroke-dasharray":p.dashStyle(h.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:m,x2:x,y1:y,y2:y,"stroke-width":T+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&n.insert("circle",":first-child").attr({cx:A+("right"!==h.side?T:-T),cy:y,r:T,fill:k}).classed("spikeline",!0)}if(u){var E,L,C,P,O=e.vLinePoint;f=O&&O.xa,h=O&&O.ya,"cursor"===f.spikesnap?(E=s.pointerX,L=s.pointerY):(E=f._offset+O.x,L=h._offset+O.y);var I=1.5>a.readability(O.color,c)?d.contrast(c):O.color,z=f.spikemode,D=f.spikethickness,R=f.spikecolor||I,F=g.getPxPosition(t,f);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(C=F,P=L),-1!==z.indexOf("across")){var B=f._counterDomainMin,N=f._counterDomainMax;"free"===f.anchor&&(B=Math.min(B,f.position),N=Math.max(N,f.position)),C=o.t+(1-N)*o.h,P=o.t+(1-B)*o.h}n.insert("line",":first-child").attr({x1:E,x2:E,y1:C,y2:P,"stroke-width":D,stroke:R,"stroke-dasharray":p.dashStyle(f.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:E,x2:E,y1:C,y2:P,"stroke-width":D+2,stroke:c}).classed("spikeline",!0).classed("crisp",!0)}-1!==z.indexOf("marker")&&n.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==f.side?D:-D),r:D,fill:R}).classed("spikeline",!0)}}}function N(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function j(t,e){return f.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function U(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),f=u[0],h=u[1],p=c[0],d=c[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},16132:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(10624).isUnifiedHover;t.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},41008:function(t,e,r){"use strict";var n=r(3400),i=r(65460);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")}},93024:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(86476),o=r(10624),s=r(65460),l=r(83292);t.exports={moduleType:"component",name:"fx",constants:r(92456),schema:{layout:s},attributes:r(55756),layoutAttributes:s,supplyLayoutGlobalDefaults:r(81976),supplyDefaults:r(95448),supplyLayoutDefaults:r(88336),calc:r(55056),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(62376)}},65460:function(t,e,r){"use strict";var n=r(92456),i=r(25376),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"}}},88336:function(t,e,r){"use strict";var n=r(3400),i=r(65460),a=r(41008),o=r(16132);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)}},81976:function(t,e,r){"use strict";var n=r(3400),i=r(16132),a=r(65460);t.exports=function(t,e){i(t,e,function(r,i){return n.coerce(t,e,a,r,i)})}},12704:function(t,e,r){"use strict";var n=r(3400),i=r(53756).counter,a=r(86968).u,o=r(33816).idRegex,s=r(31780),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=Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h1)){delete e.grid;return}d||v||g||"independent"!==k("pattern")||(d=!0),m._hasSubplotGrid=d;var _=k("roworder"),w=d?.2:.1,T=d?.3:.1;y&&e._splomGridDflt&&(a=e._splomGridDflt.xside,o=e._splomGridDflt.yside),m._domains={x:c("x",k,w,a,b),y:c("y",k,T,o,x,"top to bottom"===_)}}function k(t,e){return n.coerce(f,m,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n=t.grid||{},i=e._subplots,a=r._hasSubplotGrid,o=r.rows,s=r.columns,l="independent"===r.pattern,c=r._axisMap={};if(a){var h=n.subplots||[];M=r.subplots=Array(o);var p=1;for(_=0;_("legend"===t?1:0));if(!1===L&&(r[t]=void 0),(!1!==L||v.uirevision)&&(y("uirevision",r.uirevision),!1!==L)){y("borderwidth");var C=y("orientation"),P=y("yref"),O=y("xref"),I="h"===C,z="paper"===P,D="paper"===O,R="left";if(I?(h=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?z?(p=1.1,d="bottom"):(p=1,d="top"):z?(p=-.1,d="top"):(p=0,d="bottom")):(p=1,d="auto",D?h=1.02:(h=1,R="right")),i.coerce(v,g,{x:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:h}},"x"),i.coerce(v,g,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:p}},"y"),y("traceorder",k),u.isGrouped(r[t])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("xanchor",R),y("yanchor",d),y("valign"),i.noneOrAll(v,g,["x","y"]),y("title.text")){y("title.side",I?"left":"top");var F=i.extendFlat({},m,{size:i.bigFont(m.size)});i.coerceFont(y,"title.font",F)}}}})(g,t,e,f),e[g]&&e[g].visible&&(e[g]._id=g),e._legends.push(g)}}},31140:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(7316),o=r(24040),s=r(95924),l=r(86476),u=r(43616),c=r(76308),f=r(72736),h=r(33048),p=r(65196),d=r(84284),v=d.LINE_SPACING,g=d.FROM_TL,y=d.FROM_BR,m=r(35456),x=r(2012),b=r(42451),_=/^legend[0-9]*$/;function w(t,e){var r,s,h,d,_=e||{},w=t._fullLayout,M=P(_),O=_._inHover;if(O?(s=_.layer,r="hover"):(s=w._infolayer,r=M),s){if(r+=w._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),O){if(!_.entries)return;h=m(_.entries,_)}else{for(var I=(t.calcdata||[]).slice(),z=w.shapes,D=0;D1)}var B=w.hiddenlabels||[];if(!O&&(!w.showlegend||!h.length))return s.selectAll("."+M).remove(),w._topdefs.select("#"+r).remove(),a.autoMargin(t,M);var N=i.ensureSingle(s,"g",M,function(t){O||t.attr("pointer-events","all")}),j=i.ensureSingleById(w._topdefs,"clipPath",r,function(t){t.append("rect")}),U=i.ensureSingle(N,"rect","bg",function(t){t.attr("shape-rendering","crispEdges")});U.call(c.stroke,_.bordercolor).call(c.fill,_.bgcolor).style("stroke-width",_.borderwidth+"px");var V=i.ensureSingle(N,"g","scrollbox"),q=_.title;_._titleWidth=0,_._titleHeight=0,q.text?((d=i.ensureSingle(V,"text",M+"titletext")).attr("text-anchor","start").call(u.font,q.font).text(q.text),E(d,V,t,_,1)):V.selectAll("."+M+"titletext").remove();var H=i.ensureSingle(N,"rect","scrollbar",function(t){t.attr(p.scrollBarEnterAttrs).call(c.fill,p.scrollBarColor)}),G=V.selectAll("g.groups").data(h);G.enter().append("g").attr("class","groups"),G.exit().remove();var W=G.selectAll("g.traces").data(i.identity);W.enter().append("g").attr("class","traces"),W.exit().remove(),W.style("opacity",function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1}).each(function(){n.select(this).call(A,t,_)}).call(x,t,_).each(function(){O||n.select(this).call(S,t,M)}),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a,o,s,l,c=t._fullLayout,f=P(i);i||(i=c[f]);var h=c._size,d=b.isVertical(i),v=b.isGrouped(i),g="fraction"===i.entrywidthmode,y=i.borderwidth,m=2*y,x=p.itemGap,_=i.indentation+i.itemwidth+2*x,w=2*(y+x),k=C(i),A=i.y<0||0===i.y&&"top"===k,M=i.y>1||1===i.y&&"bottom"===k,S=i.tracegroupgap,E={};i._maxHeight=Math.max(A||M?c.height/2:h.h,30);var O=0;i._width=0,i._height=0;var I=(o=0,s=0,(l=(a=i).title.side)&&(-1!==l.indexOf("left")&&(o=a._titleWidth),-1!==l.indexOf("top")&&(s=a._titleHeight)),[o,s]);if(d)r.each(function(t){var e=t[0].height;u.setTranslate(this,y+I[0],y+I[1]+i._height+e/2+x),i._height+=e,i._width=Math.max(i._width,t[0].width)}),O=_+i._width,i._width+=x+_+m,i._height+=w,v&&(e.each(function(t,e){u.setTranslate(this,0,e*i.tracegroupgap)}),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var z=L(i),D=i.x<0||0===i.x&&"right"===z,R=i.x>1||1===i.x&&"left"===z,F=M||A,B=c.width/2;i._maxWidth=Math.max(D?F&&"left"===z?h.l+h.w:B:R?F&&"right"===z?h.r+h.w:B:h.w,2*_);var N=0,j=0;r.each(function(t){var e=T(t,i,_);N=Math.max(N,e),j+=e}),O=null;var U=0;if(v){var V=0,q=0,H=0;e.each(function(){var t=0,e=0;n.select(this).selectAll("g.traces").each(function(r){var n=T(r,i,_),a=r[0].height;u.setTranslate(this,I[0],I[1]+y+x+a/2+e),e+=a,t=Math.max(t,n),E[r[0].trace.legendgroup]=t});var r=t+x;q>0&&r+y+q>i._maxWidth?(U=Math.max(U,q),q=0,H+=V+S,V=e):V=Math.max(V,e),u.setTranslate(this,q,H),q+=r}),i._width=Math.max(U,q)+y,i._height=H+V+w}else{var G=r.size(),W=j+m+(G-1)*x=i._maxWidth&&(U=Math.max(U,K),X=0,Z+=Y,i._height+=Y,Y=0),u.setTranslate(this,I[0]+y+X,I[1]+y+Z+e/2+x),K=X+r+x,X+=n,Y=Math.max(Y,e)}),W?(i._width=X+m,i._height=Y+w):(i._width=Math.max(U,K)+m,i._height+=Y+w)}}i._width=Math.ceil(Math.max(i._width+I[0],i._titleWidth+2*(y+p.titlePad))),i._height=Math.ceil(Math.max(i._height+I[1],i._titleHeight+2*(y+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var J=t._context.edits,$=J.legendText||J.legendPosition;r.each(function(t){var e=n.select(this).select("."+f+"toggle"),r=t[0].height,a=t[0].trace.legendgroup,o=T(t,i,_);v&&""!==a&&(o=E[a]);var s=$?_:O||o;d||g||(s+=x/2),u.setRect(e,0,-r/2,s,r)})}(t,G,W,_)},function(){var e,c,h,m,x=w._size,b=_.borderwidth,T="paper"===_.xref,A="paper"===_.yref;if(q.text&&function(t,e,r){if("top center"===e.title.side||"top right"===e.title.side){var n=e.title.font.size*v,i=0,a=t.node(),o=u.bBox(a).width;"top center"===e.title.side?i=.5*(e._width-2*r-2*p.titlePad-o):"top right"===e.title.side&&(i=e._width-2*r-2*p.titlePad-o),f.positionText(t,r+p.titlePad+i,r+n)}}(d,_,b),!O){if(function(t,e,r,n){var i=t._fullLayout,o=i[e],s=L(o),l=C(o),u="paper"===o.xref,c="paper"===o.yref;t._fullLayout._reservedMargin[e]={};var f=o.y<.5?"b":"t",h=o.x<.5?"l":"r",p={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*g[s],r:o._width*y[s],b:o._effHeight*y[l],t:o._effHeight*g[l]});u?t._fullLayout._reservedMargin[e][f]=p[f]:c?t._fullLayout._reservedMargin[e][h]=p[h]:"v"===o.orientation?t._fullLayout._reservedMargin[e][h]=p[h]:t._fullLayout._reservedMargin[e][f]=p[f]}(t,M,I=T?x.l+x.w*_.x-g[L(_)]*_._width:w.width*_.x-g[L(_)]*_._width,z=A?x.t+x.h*(1-_.y)-g[C(_)]*_._effHeight:w.height*(1-_.y)-g[C(_)]*_._effHeight))return;if(w.margin.autoexpand){var S=I,E=z;I=T?i.constrain(I,0,w.width-_._width):S,z=A?i.constrain(z,0,w.height-_._effHeight):E,I!==S&&i.log("Constrain "+M+".x to make legend fit inside graph"),z!==E&&i.log("Constrain "+M+".y to make legend fit inside graph")}u.setTranslate(N,I,z)}if(H.on(".drag",null),N.on("wheel",null),O||_._height<=_._maxHeight||t._context.staticPlot){var P=_._effHeight;O&&(P=_._height),U.attr({width:_._width-b,height:P-b,x:b/2,y:b/2}),u.setTranslate(V,0,0),j.select("rect").attr({width:_._width-2*b,height:P-2*b,x:b,y:b}),u.setClipUrl(V,r,t),u.setRect(H,0,0,0,0),delete _._scrollY}else{var I,z,D,R,F,B=Math.max(p.scrollBarMinHeight,_._effHeight*_._effHeight/_._height),G=_._effHeight-B-2*p.scrollBarMargin,W=_._height-_._effHeight,Y=G/W,X=Math.min(_._scrollY||0,W);U.attr({width:_._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:_._effHeight-b,x:b/2,y:b/2}),j.select("rect").attr({width:_._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:_._effHeight-2*b,x:b,y:b+X}),u.setClipUrl(V,r,t),Q(X,B,Y),N.on("wheel",function(){Q(X=i.constrain(_._scrollY+n.event.deltaY/G*W,0,W),B,Y),0!==X&&X!==W&&n.event.preventDefault()});var Z=function(t,e,r){var n=(r-e)/Y+t;return i.constrain(n,0,W)},K=function(t,e,r){var n=(e-r)/Y+t;return i.constrain(n,0,W)},J=n.behavior.drag().on("dragstart",function(){var t=n.event.sourceEvent;D="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,F=X}).on("drag",function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(R="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,Q(X=Z(F,D,R),B,Y))});H.call(J);var $=n.behavior.drag().on("dragstart",function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(D=t.changedTouches[0].clientY,F=X)}).on("drag",function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(R=t.changedTouches[0].clientY,Q(X=K(F,D,R),B,Y))});V.call($)}function Q(e,r,n){_._scrollY=t._fullLayout[M]._scrollY=e,u.setTranslate(V,0,-e),u.setRect(H,_._width,p.scrollBarMargin+e*n,p.scrollBarWidth,r),j.select("rect").attr("y",b+e)}t._context.edits.legendPosition&&(N.classed("cursor-move",!0),l.init({element:N.node(),gd:t,prepFn:function(){var t=u.getTranslate(N);h=t.x,m=t.y},moveFn:function(t,r){var n=h+t,i=m+r;u.setTranslate(N,n,i),e=l.align(n,_._width,x.l,x.l+x.w,_.xanchor),c=l.align(i+_._height,-_._height,x.t+x.h,x.t,_.yanchor)},doneFn:function(){if(void 0!==e&&void 0!==c){var r={};r[M+".x"]=e,r[M+".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&&k(t,N,n,e,r)}}))}],t)}}function T(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 k(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&&h(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&&h(r,t,n))}function A(t,e,r){var n,a,s=P(r),l=t.data()[0][0],c=l.trace,h=o.traceIs(c,"pie-like"),d=!r._inHover&&e._context.edits.legendText&&!h,v=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,a=l.groupTitle.font):(a=r.font,r.entries?n=l.text:(n=h?l.label:c.name,c._meta&&(n=i.templateString(n,c._meta))));var g=i.ensureSingle(t,"text",s+"text");g.attr("text-anchor","start").call(u.font,a).text(d?M(n,v):n);var y=r.indentation+r.itemwidth+2*p.itemGap;f.positionText(g,y,0),d?g.call(f.makeEditable,{gd:e,text:n}).call(E,t,e,r).on("edit",function(n){this.text(M(n,v)).call(E,t,e,r);var a=l.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var u=o.getTransformIndices(a,"groupby"),f=u[u.length-1],h=i.keyedContainer(a,"transforms["+f+"].styles","target","value.name");h.set(l.trace._group,n),s=h.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)}):E(g,t,e,r)}function M(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;t=t||"";for(var n=r-t.length;n>0;n--)t+=" ";return t}function S(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._legendMouseDownTimeo&&(s=Math.max(s-1,1)),k(e,i,t,s,n.event)}}))}function E(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),f.convertToTspans(t,r,function(){(function(t,e,r,n){var i,a,o=t.data()[0][0];if(!r._inHover&&o&&!o.trace.showlegend){t.remove();return}var s=t.select("g[class*=math-group]"),l=s.node(),c=P(r);r||(r=e._fullLayout[c]);var h=r.borderwidth,d=(1===n?r.title.font:o.groupTitle?o.groupTitle.font:r.font).size*v;if(l){var g=u.bBox(l);i=g.height,a=g.width,1===n?u.setTranslate(s,h,h+.75*i):u.setTranslate(s,0,.25*i)}else{var y=t.select("."+c+(1===n?"title":"")+"text"),m=f.lineCount(y),x=y.node();if(i=d*m,a=x?u.bBox(x).width:0,1===n)"left"===r.title.side&&(a+=2*p.itemGap),f.positionText(y,h+p.titlePad,h+d);else{var b=2*p.itemGap+r.indentation+r.itemwidth;o.groupTitle&&(b=p.itemGap,a-=r.indentation+r.itemwidth),f.positionText(y,b,-d*((m-1)/2-.3))}}1===n?(r._titleWidth=a,r._titleHeight=i):(o.lineHeight=d,o.height=Math.max(i,16)+3,o.width=a)})(e,r,n,i)})}function L(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function C(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function P(t){return t._id||"legend"}t.exports=function(t,e){if(e)w(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(_)&&-1===i.indexOf(e)&&t.remove()});for(var a=0;aS&&(M=S)}k[a][0]._groupMinRank=M,k[a][0]._preGroupSort=a}var E=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(k.forEach(function(t,e){t[0]._preGroupSort=e}),k.sort(function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort}),a=0;ar?r:t}t.exports=function(t,e,r){var y=e._fullLayout;r||(r=y.legend);var m="constant"===r.itemsizing,x=r.itemwidth,b=o((x+2*p.itemGap)/2,0),_=function(t,e,r,n){var i;if(t+1)i=t;else{if(!e||!(e.width>0))return 0;i=e.width}return m?n:Math.min(i,r)};function w(t,a,o){var c=t[0].trace,f=c.marker||{},h=f.line||{},p=f.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",d=o?c.visible&&c.type===o:i.traceIs(c,"bar"),v=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(d?[t]:[]);v.enter().append("path").classed("legend"+o,!0).attr("d",p).attr("transform",b),v.exit().remove(),v.each(function(t){var i=n.select(this),a=t[0],o=_(a.mlw,f.line,5,2);i.style("stroke-width",o+"px");var p=a.mcc;if(!r._inHover&&"mc"in a){var d=u(f),v=d.mid;void 0===v&&(v=(d.max+d.min)/2),p=s.tryColorscale(f,"")(v)}var y=p||a.mc||f.color,m=f.pattern,x=m&&s.getPatternAttr(m.shape,0,"");if(x){var b=s.getPatternAttr(m.bgcolor,0,null),w=s.getPatternAttr(m.fgcolor,0,null),T=m.fgopacity,k=g(m.size,8,10),A=g(m.solidity,.5,1),M="legend-"+c.uid;i.call(s.pattern,"legend",e,M,x,k,A,p,m.fillmode,b,w,T)}else i.call(l.fill,y);o&&l.stroke(i,a.mlc||h.color)})}function T(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 p=l.marker||{},d=_(h(p.line.width,s.pts),p.line,5,2),v="pieLike",g=a.minExtend(l,{marker:{line:{width:d}}},v);f(c,a.minExtend(s,{trace:g},v),g,e)}}t.each(function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,u=t[0].lineHeight,c=t[0].height;if(("middle"!==l||0!==s)&&u&&c){var f=r.indentation;i.attr("transform",o(f,.5*(u-c+3)*({top:1,bottom:-1})[l]||0))}else i.attr("transform",null);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 h=i.selectAll("g.legendsymbols").data([t]);h.enter().append("g").classed("legendsymbols",!0),h.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,f=n.select(this),h=u(i),p=h.colorscale,v=h.reversescale;if(p){if(!r){var g=p.length;c=0===o?p[v?g-1:0][1]:1===o?p[v?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var y=i.vertexcolor||i.facecolor||i.color;c=a.isArrayOrTypedArray(y)?y[o]||y[0]:y}f.attr("d",t[0]),c?f.call(l.fill,c):f.call(function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,d(v,"radial"===r),p,"fill")}})})}).each(function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,w(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=_(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){w(t,this,"funnel")}).each(function(t){w(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=a.minExtend(r,{marker:{size:m?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,i,e)}else{var u=_(void 0,r.line,5,2);t.style("stroke-width",u+"px").call(l.fill,r.fillcolor),u&&l.stroke(t,r.line.color)}})}).each(function(t){T(t,this,"funnelarea")}).each(function(t){T(t,this,"pie")}).each(function(t){var r,i,o=v(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,g=o.anyFill,y=o.anyLine,m=t[0],b=m.trace,w=u(b),T=w.colorscale,k=w.reversescale,A=c.hasMarkers(b)||!g?"M5,0":y?"M5,-2":"M5,-3",M=n.select(this),S=M.select(".legendfill").selectAll("path").data(l||p?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",A+"h"+x+"v6h-"+x+"z").call(function(t){if(t.size()){if(l)s.fillGroupStyle(t,e,!0);else{var r="legendfill-"+b.uid;s.gradient(t,e,r,d(k),T,"fill")}}}),f||h){var E=_(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(m,{trace:i})]}var L=M.select(".legendlines").selectAll("path").data(f||h?[r]:[]);L.enter().append("path").classed("js-line",!0),L.exit().remove(),L.attr("d",A+(h?"l"+x+",0.0001":"h"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,"stroke")}})}).each(function(t){var r,i,o=v(t),l=o.anyFill,u=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,g=!h&&!u&&!l&&c.hasText(d);function y(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(m&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||g||f){var _={},w={};if(h){_.mc=y("marker.color",x),_.mx=y("marker.symbol",x),_.mo=y("marker.opacity",a.mean,[.2,1]),_.mlc=y("marker.line.color",x),_.mlw=y("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",a.mean,[2,16],12);_.ms=T,w.marker.size=T}f&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(_.tx="Aa",_.tp=y("textposition",x),_.ts=10,_.tc=y("textfont.color",x),_.tf=y("textfont.family",x),_.tw=y("textfont.weight",x),_.ty=y("textfont.style",x),_.tv=y("textfont.variant",x)),r=[a.minExtend(p,_)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select("g.legendpoints"),A=k.selectAll("path.scatterpts").data(h?r:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll("g.pointtext").data(g?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,e)}).each(function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",b).style("stroke-miterlimit",1),r.exit().remove(),r.each(function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=_(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=_(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)})})}},66540:function(t,e,r){"use strict";r(76052),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"}}},44248:function(t,e,r){"use strict";var n=r(24040),i=r(7316),a=r(79811),o=r(9224),s=r(4016).eraseActiveShape,l=r(3400),u=l._,c=t.exports={};function f(t,e){var r=e.currentTarget,i=r.getAttribute("data-attr"),o=r.getAttribute("data-val")||!0,s=t._fullLayout,l={},u=a.list(t,null,!0),c=s._cartesianSpikesEnabled;if("zoom"===i){var f,h,p,d="in"===o?.5:2,v=(1+d)/2,g=(1-d)/2;for(h=0;h1?(O=["toggleHover"],I=["resetViews"]):y?(P=["zoomInGeo","zoomOutGeo"],O=["hoverClosestGeo"],I=["resetGeo"]):g?(O=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(P=["zoomInMapbox","zoomOutMapbox"],O=["toggleHover"],I=["resetViewMapbox"]):b?O=["hoverClosestGl2d"]:m?O=["hoverClosestPie"]:A?(O=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):O=["toggleHover"],v&&(O=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(t){for(var e=0;e0)){var v=function(t,e,r){for(var n=r.filter(function(r){return e[r].anchor===t._id}),i=0,a=0;a0?t.touches[0].clientX:0}function y(t,e,r,n){var i=o.ensureSingle(t,"rect",v.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,f=l.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:s(c,c),"stroke-width":f}).call(u.stroke,n.bordercolor).call(u.fill,n.bgcolor)}function m(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,"clipPath",n._clipId,function(t){t.append("rect").attr({x:0,y:0})}).select("rect").attr({width:n._width,height:n._height})}function x(t,e,r,i){var s,u=e.calcdata,c=t.selectAll("g."+v.rangePlotClassName).data(r._subplotsWith,o.identity);c.enter().append("g").attr("class",function(t){return v.rangePlotClassName+" "+t}).call(l.setClipUrl,i._clipId,e),c.order(),c.exit().remove(),c.each(function(t,o){var l=n.select(this),c=h.getFromId(e,t,"y"),p=c._name,d=i[p],v={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&&(v.layout.xaxis.rangebreaks=r.rangebreaks),v.layout[p]={type:c.type,domain:[0,1],range:"match"!==d.rangemode?d.range.slice():c.range.slice(),calendar:c.calendar},c.rangebreaks&&(v.layout[p].rangebreaks=c.rangebreaks),a.supplyDefaults(v);var g=v._fullLayout.xaxis,y=v._fullLayout[p];g.clearCalc(),g.setScale(),y.clearCalc(),y.setScale();var m={id:t,plotgroup:l,xaxis:g,yaxis:y,isRangePlot:!0};0===o?s=m:(m.mainplot="xy",m.mainplotinfo=s),f.rangePlot(e,m,function(t,e){for(var r=[],n=0;n=n.max)e=B[r+1];else if(t=n.pmax)e=B[r+1];else if(tr._length||m+_<0)return;c=y+_,p=m+_;break;case l:if(b="col-resize",y+_>r._length)return;c=y+_,p=m;break;case u:if(b="col-resize",m+_<0)return;c=y,p=m+_;break;default:b="ew-resize",c=v,p=v+_}if(p=0;T--){var k=r.append("path").attr(v).style("opacity",T?.1:g).call(o.stroke,m).call(o.fill,y).call(s.dashLine,T?"solid":b,T?4+x:x);if(function(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}(k,t,a),_){var A=l(t.layout,"selections",a);k.style({cursor:"move"});var M={element:k.node(),plotinfo:p,gd:t,editHelpers:A,isActiveSelection:!0};i(n(u,t),k,M)}else k.style("pointer-events",T?"all":"none");w[T]=k}var S=w[0];w[1].node().addEventListener("click",function(){return function(t,e){if(h(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex){d(t);return}t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=d,f(t)}}}(t,S)})}(t._fullLayout._selectionLayer)}function d(t){h(t)&&t._fullLayout._activeSelectionIndex>=0&&(a(t),delete t._fullLayout._activeSelectionIndex,f(t))}t.exports={draw:f,drawOne:p,activateLastSelection:function(t){if(h(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=d,f(t)}}}},34200:function(t,e,r){"use strict";var n=r(98192).u,i=r(92880).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"}}},81004: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(72760).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,a=t[0][0];if(a){var u=a.getAttribute("d"),c=e.gd,f=c._fullLayout.newselection,h=e.plotinfo,p=h.xaxis,d=h.yaxis,v=e.isActiveSelection,g=e.dragmode,y=(c.layout||{}).selections||[];if(!n(g)&&void 0!==v){var m=c._fullLayout._activeSelectionIndex;if(m-1,b=[];if(y&&Array.isArray(y)&&!0!==y[0].hoverOnBox){G(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&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;in.selectedpoints.indexOf(e.pointNumbers[i]))return!1;return!0}return!1}(s,_):function(t){var e,r,n=0;for(r=0;r1||(n+=e.selectedpoints.length)>1))return!1;return 1===n}(s)&&(h=K(_))){for(o&&o.remove(),g=0;g=0&&i._fullLayout._deactivateShape(i),i._fullLayout._activeSelectionIndex>=0&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=p(r),l=v(r);if(s||l){var u,c,f=o.selectAll(".select-outline-"+n.id);f&&i._fullLayout._outlining&&(s&&(u=T(f,t)),u&&a.call("_guiRelayout",i,{shapes:u}),l&&!U(t)&&(c=k(f,t)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:c}).then(function(){e&&A(i)})),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function Y(t){return t._id}function X(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(Y),u=r.map(Y);for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function J(t,e,r){for(n=0;n-1&&e;if(!a&&e){var th=ti(t,!0);if(th.length){var tp=th[0].xref,td=th[0].yref;if(tp&&td){var tv=ts(th);tl([C(t,tp,"x"),C(t,td,"y")])(tr,tv)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tf&&tu(t,tr),h._reselect=!1}if(!a&&h._deselect){var tg=h._deselect;!function(t,e,r){for(var n=0;n=0){B._fullLayout._deactivateShape(B);return}if(!E){var r=N.clickmode;L.done(tS).then(function(){if(L.clear(tS),2===t){for(t_.remove(),x=0;x-1&&V(e,B,n.xaxes,n.yaxes,n.subplot,n,t_),"event"===r&&tu(B,void 0);l.click(B,e,K.id)}).catch(M.error)}},n.doneFn=function(){tA.remove(),L.done(tS).then(function(){L.clear(tS),!q&&y&&n.selectionDefs&&(y.subtract=tb,n.selectionDefs.push(y),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,g)),(q||E)&&W(n,q),n.doneFnCompleted&&n.doneFnCompleted(tE),C&&tu(B,w)}).catch(M.error)}},clearOutline:x,clearSelectionsCache:W,selectOnClick:V}},46056:function(t,e,r){"use strict";var n=r(13916),i=r(25376),a=r(52904).line,o=r(98192).u,s=r(92880).extendFlat,l=r(31780).templatedArray;r(36208);var u=r(45464),c=r(21776).ye,f=r(97728);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(f)}),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"})},96084:function(t,e,r){"use strict";var n=r(3400),i=r(54460),a=r(85448),o=r(65152);function s(t,e,r,i,s,l){var u=t/2;if("pixel"!==e)return{ppad:u};var c=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],f=n.aggNums(Math.max,null,c),h=n.aggNums(Math.min,null,c),p=h<0?Math.abs(h)+u:u,d=f>0?f+u:u;return{ppad:u,ppadplus:l?p:d,ppadminus:l?d:p}}function l(t,e,r,n,i){var s,l,u,c,f="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[f(e),f(r)];if(n){var h=1/0,p=-1/0,d=n.match(a.segmentRE);for("date"===t.type&&(f=o.decodeDate(f)),s=0;sp&&(p=c));if(p>=h)return[h,p]}}t.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o=p?d-g:g-d,y)):0),L.call(function(e){return e.call(o.font,E).attr({}),a.convertToTspans(e,t),e});var H=function(t,e,r,n,i,a,o){var s,l,u,c,h=i.label.textposition,p=i.label.textangle,d=i.label.padding,v=i.type,g=Math.PI/180*a,y=Math.sin(g),m=Math.cos(g),x=i.label.xanchor,b=i.label.yanchor;if("line"===v){"start"===h?(s=t,l=e):"end"===h?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===x&&(x="start"===h?"auto"===p?r>t?"left":rt?"right":rt?"right":rt?"left":r1&&!(2===t.length&&"Z"===t[1][0])&&(0===S&&(t[0][0]="M"),e[M]=t,C(),P())}}()}}function U(t,r){(function(t,r){if(e.length)for(var n=0;nS?(C=A,z="y0",P=S,D="y1"):(C=S,z="y1",P=A,D="y0"),tr(n),ta(l,r),i=r.xref,a=r.yref,s=o.getFromId(t,i),u=o.getFromId(t,a),c="","paper"===i||s.autorange||(c+=i),"paper"===a||u.autorange||(c+=a),h.setClipUrl(e,c?"clip"+t._fullLayout._uid+c:null,t),te.moveFn="move"===N?tn:ti,te.altKey=n.altKey)},doneFn:function(){b(t)||(v(e),to(l),T(e,t,r),i.call("_guiRelayout",t,c.getUpdateObj()))},clickFn:function(){b(t)||to(l)}};function tr(r){if(b(t)){N=null;return}if(V)N="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=te.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!q&&i>10&&a>10&&!r.shiftKey?d.getCursor(o/i,1-s/a):"move";v(e,l),N=l.split("-")[0]}}function tn(n,i){if("path"===r.type){var a=function(t){return t},o=a,c=a;j?H("xanchor",r.xanchor=$(E+n)):(o=function(t){return $(K(t)+n)},W&&"date"===W.type&&(o=y.encodeDate(o))),U?H("yanchor",r.yanchor=Q(L+i)):(c=function(t){return Q(J(t)+i)},X&&"date"===X.type&&(c=y.encodeDate(c))),H("path",r.path=k(B,o,c))}else j?H("xanchor",r.xanchor=$(E+n)):(H("x0",r.x0=$(w+n)),H("x1",r.x1=$(M+n))),U?H("yanchor",r.yanchor=Q(L+i)):(H("y0",r.y0=Q(A+i)),H("y1",r.y1=Q(S+i)));e.attr("d",m(t,r)),ta(l,r),u(t,s,r,G)}function ti(n,i){if(q){var a=function(t){return t},o=a,c=a;j?H("xanchor",r.xanchor=$(E+n)):(o=function(t){return $(K(t)+n)},W&&"date"===W.type&&(o=y.encodeDate(o))),U?H("yanchor",r.yanchor=Q(L+i)):(c=function(t){return Q(J(t)+i)},X&&"date"===X.type&&(c=y.encodeDate(c))),H("path",r.path=k(B,o,c))}else if(V){if("resize-over-start-point"===N){var f=w+n,h=U?A-i:A+i;H("x0",r.x0=j?f:$(f)),H("y0",r.y0=U?h:Q(h))}else if("resize-over-end-point"===N){var p=M+n,d=U?S-i:S+i;H("x1",r.x1=j?p:$(p)),H("y1",r.y1=U?d:Q(d))}}else{var v=function(t){return -1!==N.indexOf(t)},g=v("n"),x=v("s"),b=v("w"),_=v("e"),T=g?C+i:C,Y=x?P+i:P,Z=b?O+n:O,tt=_?I+n:I;U&&(g&&(T=C-i),x&&(Y=P-i)),(!U&&Y-T>10||U&&T-Y>10)&&(H(z,r[z]=U?T:Q(T)),H(D,r[D]=U?Y:Q(Y))),tt-Z>10&&(H(R,r[R]=j?Z:$(Z)),H(F,r[F]=j?tt:$(tt)))}e.attr("d",m(t,r)),ta(l,r),u(t,s,r,G)}function ta(t,e){(j||U)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=K(j?e.xanchor:a.midRange(r?[e.x0,e.x1]:y.extractPathCoords(e.path,g.paramIsX))),o=J(U?e.yanchor:a.midRange(r?[e.y0,e.y1]:y.extractPathCoords(e.path,g.paramIsY)));if(i=y.roundPositionForSharpStrokeRendering(i,1),o=y.roundPositionForSharpStrokeRendering(o,1),j&&U){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(j){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 to(t){t.selectAll(".visual-cue").remove()}d.init(te),tt.node().onmousemove=tr}(t,F,c,e,r,M):!0===c.editable&&F.style("pointer-events",z||f.opacity(C)*L<=.5?"stroke":"all");F.node().addEventListener("click",function(){return function(t,e){if(_(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex){A(t);return}t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=A,x(t)}}}(t,F)})}("above"===c.layer?t._fullLayout._shapeUpperLayer:"paper"===c.xref||"paper"===c.yref?t._fullLayout._shapeLowerLayer:"between"===c.layer?w.shapelayerBetween:w._hadPlotinfo?(w.mainplotinfo||w).shapelayer:t._fullLayout._shapeLowerLayer)}function T(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");h.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function k(t,e,r){return t.replace(g.segmentRE,function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t})})}function A(t){_(t)&&t._fullLayout._activeShapeIndex>=0&&(c(t),delete t._fullLayout._activeShapeIndex,x(t))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(t){if(_(t)){c(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e=Math.abs(t-e)}function p(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(t){var e=t.length;if(!e)return"M0,0Z";for(var r="",n=0;n0&&lp&&(t="X"),t});return e>p&&(d=d.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),r+d});if("pixel"===r.xsizemode){var S=d(r.xanchor);y=S+r.x0,m=S+r.x1}else y=d(r.x0),m=d(r.x1);if("pixel"===r.ysizemode){var E=g(r.yanchor);x=E-r.y0,b=E-r.y1}else x=g(r.y0),b=g(r.y1);if("line"===_)return"M"+y+","+x+"L"+m+","+b;if("rect"===_)return"M"+y+","+x+"H"+m+"V"+b+"H"+y+"Z";var L=(y+m)/2,C=(x+b)/2,P=Math.abs(L-y),O=Math.abs(C-x),I="A"+P+","+O,z=L+P+","+C;return"M"+z+I+" 0 1,1 "+L+","+(C-O)+I+" 0 0,1 "+z+"Z"}},41592:function(t,e,r){"use strict";var n=r(4016);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(46056),supplyLayoutDefaults:r(43712),supplyDrawNewShapeDefaults:r(65144),includeBasePlot:r(36632)("shapes"),calcAutorange:r(96084),draw:n.draw,drawOne:n.drawOne}},97728:function(t){"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,r){return e(t.x1,r)-e(t.x0,r)}function n(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,i){return"line"!==t.type?void 0:n(t,e,i)/r(t,e)},dx:r,dy:n,width:function(t,e){return Math.abs(r(t,e))},height:function(t,e,r){return Math.abs(n(t,e,r))},length:function(t,e,i){return"line"!==t.type?void 0:Math.sqrt(Math.pow(r(t,e),2)+Math.pow(n(t,e,i),2))},xcenter:function(t,r){var n;return n=(e(t.x1,r)+e(t.x0,r))/2,r?r.l2d(n):n},ycenter:function(t,r,n){var i;return i=(e(t.y1,n)+e(t.y0,n))/2,n?n.l2d(i):i}}},89861:function(t,e,r){"use strict";var n=r(25376),i=r(66741),a=r(92880).extendDeepAll,o=r(67824).overrideAll,s=r(85656),l=r(31780).templatedArray,u=r(60876),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")},60876: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(51272),a=r(89861),o=r(60876).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;c0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function S(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function E(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",f.railTouchRectClass,function(n){n.call(k,e,t,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function C(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,"rect",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,f.railInset,(r.inputAreaWidth-f.railWidth)*.5+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,a=function(t,e){for(var r=t[f.name],n=[],i=0;i0?[0]:[]);function c(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(l.enter().append("g").classed(f.containerClassName,!0).style("cursor",e?null:"ew-resize"),l.exit().each(function(){n.select(this).selectAll("g."+f.groupClassName).each(c)}).remove(),0!==a.length){var h=l.selectAll("g."+f.groupClassName).data(a,y);h.enter().append("g").classed(f.groupClassName,!0),h.exit().each(c).remove();for(var p=0;p0||b<0){var M={left:[-w,0],right:[w,0],top:[0,-w],bottom:[0,w]}[_.side];r.attr("transform",l(M[0],M[1]))}}}return N.call(j),F&&(L?N.on(".opacity",null):(M=0,S=!0,N.text(x).on("mouseover.opacity",function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})),N.call(f.makeEditable,{gd:t}).on("edit",function(e){void 0!==b?o.call("_guiRestyle",t,m,e,b):o.call("_guiRelayout",t,m,e)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(j)}).on("input",function(t){this.text(t||" ").call(f.positionText,w.x,w.y)})),N.classed("js-placeholder",S),k}}},88444:function(t,e,r){"use strict";var n=r(25376),i=r(22548),a=r(92880).extendFlat,o=r(67824).overrideAll,s=r(66741),l=r(31780).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")},73712: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:"▼"}}},91384:function(t,e,r){"use strict";var n=r(3400),i=r(51272),a=r(88444),o=r(73712).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})}},14420:function(t,e,r){"use strict";var n=r(33428),i=r(7316),a=r(76308),o=r(43616),s=r(3400),l=r(72736),u=r(31780).arrayEditor,c=r(84284).LINE_SPACING,f=r(73712),h=r(37400);function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function v(t,e,r,n,i,a,o,s){e.active=o,u(t.layout,f.name,e).applyUpdate("active",o),"buttons"===e.type?y(t,n,null,null,e):"dropdown"!==e.type||(i.attr(f.menuIndexAttrName,"-1"),g(t,n,i,a,e),s||y(t,n,i,a,e))}function g(t,e,r,n,i){var a=s.ensureSingle(e,"g",f.headerClassName,function(t){t.style("pointer-events","all")}),l=i._dims,u=i.active,c=i.buttons[u]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(m,i,c,t).call(A,i,h,p),s.ensureSingle(e,"text",f.headerArrowClassName,function(t){t.attr("text-anchor","end").call(o.font,i.font).text(f.arrowSymbol[i.direction])}).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on("click",function(){r.call(M,String(d(r,i)?-1:i._index)),y(t,e,r,n,i)}),a.on("mouseover",function(){a.call(w)}),a.on("mouseout",function(){a.call(T,i)}),o.setTranslate(e,l.lx,l.ly)}function y(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l,u,c=-1==+r.attr(f.menuIndexAttrName)&&"buttons"!==o.type?[]:o.buttons,h="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,p=r.selectAll("g."+h).data(s.filterVisible(c)),d=p.enter().append("g").classed(h,!0),g=p.exit();"dropdown"===o.type?(d.attr("opacity","0").transition().attr("opacity","1"),g.transition().attr("opacity","0").remove()):g.remove();var y=0,x=0,b=o._dims,k=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(k?x=b.headerHeight+f.gapButtonHeader:y=b.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(x=-f.gapButtonHeader+f.gapButton-b.openHeight),"dropdown"===o.type&&"left"===o.direction&&(y=-f.gapButtonHeader+f.gapButton-b.openWidth);var M={x:b.lx+y+o.pad.l,y:b.ly+x+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},S={l:M.x+o.borderwidth,t:M.y+o.borderwidth};p.each(function(s,l){var u=n.select(this);u.call(m,o,s,t).call(A,o,M),u.on("click",function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(v(t,o,s,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(v(t,o,s,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),p.call(_,o)})}),p.call(_,o),k?(S.w=Math.max(b.openWidth,b.headerWidth),S.h=M.y-S.t):(S.w=M.x-S.l,S.h=Math.max(b.openHeight,b.headerHeight)),S.direction=o.direction,a&&(p.size()?function(t,e,r,n,i,a){var o,s,l,u=i.direction,c=i._dims,h=i.active;if("up"===u||"down"===u)for(l=0,s=0;l0?[0]:[]);if(u.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),u.exit().each(function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(a)}).remove(),0!==r.length){var x=u.selectAll("g."+f.headerGroupClassName).data(r,p);x.enter().append("g").classed(f.headerGroupClassName,!0);for(var b=s.ensureSingle(u,"g",f.dropdownButtonGroupClassName,function(t){t.style("pointer-events","all")}),_=0;_w,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=g+y;S+M>p&&(S=p-M);var E=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),k?(this.hbar=E.attr({rx:s.barRadius,ry:s.barRadius,x:d,y:S,width:A,height:M}),this._hbarXMin=d+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=y>T,C=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,O=d+v;O+C>h&&(O=h-C);var I=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=I.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:g,width:C,height:P}),this._vbarYMin=g+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var z=this.id,D=o-.5,R=L?l+C+.5:l+.5,F=u-.5,B=k?c+M+.5:c+.5,N=f._topdefs.selectAll("#"+z).data(k||L?[0]:[]);if(N.exit().remove(),N.enter().append("clipPath").attr("id",z).append("rect"),k||L?(this._clipRect=N.select("rect").attr({x:Math.floor(D),y:Math.floor(F),width:Math.ceil(R)-Math.floor(D),height:Math.ceil(B)-Math.floor(F)}),this.container.call(a.setClipUrl,z,this.gd),this.bg.attr({x:d,y:g,width:v,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),k||L){var j=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(j);var U=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(U),L&&this.vbar.on(".drag",null).call(U)}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)}}},84284: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"}}},36208: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(" ")}}},48164:function(t){"use strict";t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},26880: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"}},69104:function(t){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(t){"use strict";t.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87792:function(t){"use strict";t.exports={circle:"●","circle-open":"��",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},13448:function(t){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032: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:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}},2264:function(t,e){"use strict";e.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],e.STYLE=e.CSS_DECLARATIONS.map(function(t){return t.join(": ")+"; "}).join("")},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}},64884:function(t,e,r){"use strict";e.version=r(25788).version,r(88324),r(79288);for(var n=r(24040),i=e.register=n.register,a=r(22448),o=Object.keys(a),s=0;s plotly-logomark "}}},98308: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}},11864:function(t,e,r){"use strict";var n=r(20435),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;e[0](n=i(n,s))&&(n+=s);var r,n,a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,u){i=i||0,a=a||0;var c,f,h,p,d,v,g=l([r,n]);function y(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(c=0,f=o,h=s):r=i&&t<=a)},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},38116:function(t,e,r){"use strict";var n=r(83160).decode,i=r(63620),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 f(t){return t.constructor===ArrayBuffer}function h(t,e,r){if(u(t)){if(!u(t[0]))return t.length;for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.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(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||c(r);if("string"==typeof t&&i.test(t)){e.set(t);return}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)){e.set(t);return}if("string"!=typeof t){e.set(r);return}for(var i=t.split("+"),a=0;a=n&&t<=i?t:c}if("string"!=typeof t&&"number"!=typeof t)return c;t=String(t);var u=_(r),y=t.charAt(0);u&&("G"===y||"g"===y)&&(t=t.substr(1),r="");var w=u&&"chinese"===r.substr(0,7),T=t.match(w?x:m);if(!T)return c;var k=T[1],A=T[3]||"1",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(u){if(2===k.length)return c;k=Number(k);try{var C,P=g.getComponentMethod("calendars","getCal")(r);if(w){var O="i"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,O),M)}else C=P.newDate(k,Number(A),M)}catch(t){return c}return C?(C.toJD()-v)*f+S*h+E*p+L*d:c}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k);var I=new Date(Date.UTC(2e3,A-=1,M,S,E));return(I.setUTCFullYear(k),I.getUTCMonth()!==A||I.getUTCDate()!==M)?c:I.getTime()+L*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*f,k=3*h,A=5*p;function M(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+w(e,2)+":"+w(r,2),(n||i)&&(t+=":"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+="."+w(i,a)}return t}e.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return c;e||(e=0);var a,o,s,u,m,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+v,E=Math.floor(l(t,f));try{a=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=y("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e=n+f&&t<=i-f))return c;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===c)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var S=/%\d?f/g,E=/%h/g,L={1:"1",2:"1",3:"2",4:"2"};function C(t,e,r,n){t=t.replace(S,function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"});var i=new Date(Math.floor(e+.05));if(t=t.replace(E,function(){return L[r("%q")(i)]}),_(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var P=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,a){if(i=_(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,f),n=w(Math.floor(r/h),2)+":"+w(l(Math.floor(r/p),60),2);if("M"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),P[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+C(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}}return C(e,t,n,i)};var O=3*f;e.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+v,a=g.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return e%12?a.add(o,e,"m"):a.add(o,e/12,"y"),(o.toJD()-v)*f+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var u=new Date(t+O);return u.setUTCMonth(u.getUTCMonth()+e)+n-O},e.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,u=_(e)&&g.getComponentMethod("calendars","getCal")(e),c=0;c0&&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(i=0,e=Array(t.length);ie?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=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case"MultiPolygon":for(r=0;ri&&(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[e]}switch(n.type){case"FeatureCollection":var h=n.features;for(e=0;e100?(clearInterval(a),n("Unexpected error while fetching from "+t)):void i++},50)})}(a)):(e[a]="pending",r.push(function(t){return new Promise(function(r,i){n.json(t,function(n,a){return n?(delete e[t],i(Error(404===n.status?'GeoJSON at URL "'+t+'" does not exist.':"Unexpected error while fetching from "+t))):(e[t]=a,r(a))})})}(a))))}return r},computeBbox:function(t){return s.default(t)}}},44808:function(t,e,r){"use strict";var n=r(39032).BADNUM;e.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a0&&(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=Array(t.length),r=0;r1||v<0||v>1?null:{x:t+l*v,y:e+f*v}}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,f=n-e,h=o-i,p=u-a,d=c*c+f*f,v=h*h+p*p;return Math.sqrt(Math.min(l(c,f,d,i-t,a-e),l(c,f,d,o-t,u-e),l(h,p,v,t-i,e-a),l(h,p,v,r-i,n-a)))},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)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+u.x)/6,y:(4*f.y+l.y+u.y)/6,theta:c};return n[r]=h,h},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(),f=c;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===c&&(i=r);var u=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(u*u+f*f)}for(var p=h(u);p;){if((u+=p+r)>f)return;p=h(u)}for(p=h(f);p;){if(u>(f-=p+r))return;p=h(f)}return{min:u,max:f,len:f-u,total:c,isClosed:0===u&&f===c&&.1>Math.abs(n.x-i.x)&&.1>Math.abs(n.y-i.y)}},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,f=0,h=0,p=s;f0?p=i:h=i,f++;return a}},33040:function(t,e,r){"use strict";var n=r(38248),i=r(49760),a=r(72160),o=r(8932),s=r(22548).defaultLine,l=r(38116).isArrayOrTypedArray,u=a(s);function c(t){if(n(t))return u;var e=a(t);return e.length?e:u}function f(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n,i,s,h,p,d,v=t.color;v&&v._inputArray&&(v=v._inputArray);var g=l(v),y=l(e),m=o.extractOpts(t),x=[];if(i=void 0!==m.colorscale?o.makeColorScaleFuncFromTrace(t):c,s=g?function(t,e){return void 0===t[e]?u:a(i(t[e]))}:c,h=y?function(t,e){return void 0===t[e]?1:f(t[e])}:f,g||y)for(var b=0;b1?(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(33428),i=r(94336).E9,a=r(57624).E9,o=r(38248),s=r(39032),l=s.FP_SAFE,u=-l,c=s.BADNUM,f=t.exports={};f.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 h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: "'+e+'"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=r(22296),f.keyedContainer=r(37804),f.relativeAttr=r(23193),f.isPlainObject=r(63620),f.toLogRange=r(36896),f.relinkPrivateKeys=r(51528);var p=r(38116);f.isArrayBuffer=p.isArrayBuffer,f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=r(20435);f.mod=d.mod,f.modHalf=d.modHalf;var v=r(63064);f.valObjectMeta=v.valObjectMeta,f.coerce=v.coerce,f.coerce2=v.coerce2,f.coerceFont=v.coerceFont,f.coercePattern=v.coercePattern,f.coerceHoverinfo=v.coerceHoverinfo,f.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,f.validate=v.validate;var g=r(67555);f.dateTime2ms=g.dateTime2ms,f.isDateTime=g.isDateTime,f.ms2DateTime=g.ms2DateTime,f.ms2DateTimeLocal=g.ms2DateTimeLocal,f.cleanDate=g.cleanDate,f.isJSDate=g.isJSDate,f.formatDate=g.formatDate,f.incrementMonth=g.incrementMonth,f.dateTick0=g.dateTick0,f.dfltRange=g.dfltRange,f.findExactDates=g.findExactDates,f.MIN_MS=g.MIN_MS,f.MAX_MS=g.MAX_MS;var y=r(14952);f.findBin=y.findBin,f.sorterAsc=y.sorterAsc,f.sorterDes=y.sorterDes,f.distinctVals=y.distinctVals,f.roundUp=y.roundUp,f.sort=y.sort,f.findIndexOfMin=y.findIndexOfMin,f.sortObjectKeys=r(95376);var m=r(63084);f.aggNums=m.aggNums,f.len=m.len,f.mean=m.mean,f.median=m.median,f.midRange=m.midRange,f.variance=m.variance,f.stdev=m.stdev,f.interp=m.interp;var x=r(52248);f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(11864);f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=r(98308);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(92348);f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=r(92880);f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=r(24248);f.log=k.log,f.warn=k.warn,f.error=k.error;var A=r(53756);f.counterRegex=A.counter;var M=r(91200);f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=r(52200);function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e))&&o(t)&&t>=0&&t%1==0},f.noop=r(16628),f.identity=r(35536),f.repeat=function(t,e){for(var r=Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.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},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn("randstr failed uniqueness"),s):t(e,r,n,(i||0)+1):s},f.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)},r["_"+e]=t,r},f.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=Array(l),c=Array(o);for(r=0;r=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},f.syncOrAsync=function(t,e,r){var n;function i(){return f.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)},f.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0})},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?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},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var D=/^\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,function(t,n){var i;return D.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:""})};var R={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return U.apply(R,arguments)};var F={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return U.apply(F,arguments)};var B=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,N={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return U.apply(N,arguments)};var j=/^[:|\|]/;function U(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,function(t,s,l){var u="_xother"===s||"_yother"===s,c="_xother_"===s||"_yother_"===s,h="xother_"===s||"yother_"===s,p="xother"===s||"yother"===s||u||h||c,d=s;(u||c)&&(d=d.substring(1)),(h||c)&&(d=d.substring(0,d.length-1));var v=null,g=null;if(n.parseMultDiv){var y,m,x,b,_,w,T=(w=(_=d).match(B))?{key:w[1],op:w[2],number:Number(w[3])}:{key:_,op:null,number:null};d=T.key,v=T.op,g=T.number}if(p){if(void 0===(y=e[d]))return""}else for(x=3;x=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;f.seedPseudoRandom=function(){V=2e9},f.pseudoRandom=function(){var t=V;return 429496729>Math.abs((V=(69069*V+1)%4294967296)-t)?f.pseudoRandom():V/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,"htx","hovertext");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,"tx","text");if(f.isValidTextValue(a))return n(a)},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){for(var r=(Math.round(100*t*Math.pow(10,e=e||0))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(u=1):u=0,f.strTranslate(i-u*(r+o),a-u*(n+s))+f.strScale(u)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(t,e){t.attr("transform",f.getTextTransform(e)),t.style("display",e.scale?null:"none")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.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)},f.bigFont=function(t){return Math.round(1.2*t)};var q=f.getFirefoxVersion(),H=null!==q&&q<86;f.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},63620: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")}},37804:function(t,e,r){"use strict";var n=r(22296),i=/^\w*$/;t.exports=function(t,e,r,a){r=r||"name",a=a||"value";var o,s,l,u={};s=e&&e.length?(l=n(t,e)).get():t,e=e||"";var c={};if(s)for(o=0;o2)return u[e]=2|u[e],h.set(t,null);if(f){for(o=e;o1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},30988:function(t,e,r){"use strict";var n=r(33428);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}},52248:function(t,e,r){"use strict";var n=r(36524);e.init2dArray=function(t,e){for(var r=Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},22296:function(t,e,r){"use strict";var n=r(38248),i=r(38116).isArrayOrTypedArray;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,a,l,u,c=e.split(".");for(u=0;u/g),l=0;lo||u===i||ul||e&&r(t))}:function(t,e){var r,u,c,f,h,p=t[0],d=t[1];if(p===i||po||d===i||dl)return!1;var v=n.length,g=n[0][0],y=n[0][1],m=0;for(r=1;rMath.max(u,g)||d>Math.max(c,y))){if(dc||Math.abs(n(o,h))>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;u1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},5048:function(t,e,r){"use strict";var n=r(16576),i=r(28624);t.exports=function(t,e,a){var o=t._fullLayout,s=!0;return o._glcanvas.each(function(n){if(n.regl){n.regl.preloadCachedCode(a);return}if(!n.pick||o._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:e||[],cachedCode:a||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})},!1)}}),s||n({container:o._glcontainer.node()}),s}},34296:function(t,e,r){"use strict";var n=r(38248),i=r(25928);t.exports=function(t){if("string"!=typeof(r=t&&t.hasOwnProperty("userAgent")?t.userAgent:("undefined"!=typeof navigator&&(e=navigator.userAgent),e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),e)))return!0;var e,r,a=i({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!a){for(var o=r.split(" "),s=1;s-1;l--){var u=o[l];if("Version/"===u.substr(0,8)){var c=u.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return a}},52416:function(t){"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},a.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},a.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},a.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=t.undoQueue.queue.length)){for(r=0,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0;re}function c(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?c:u,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&i.log("Long binary search..."),f-1},e.sorterAsc=function(t,e){return t-e},e.sorterDes=function(t,e){return e-t},e.distinctVals=function(t){var r,n,i=t.slice();for(i.sort(e.sorterAsc),r=i.length-1;r>-1&&i[r]===o;r--);for(var a=i[r]-i[0]||1,s=a/(r||1)/1e4,l=[],u=0;u<=r;u++){var c=i[u],f=c-n;void 0===n?(l.push(c),n=c):f>s&&(a=Math.min(a,f),l.push(c),n=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;i0&&(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;ia.length)&&(o=a.length),n(r)||(r=!1),i(a[0])){for(s=0,l=Array(o);st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},43080:function(t,e,r){"use strict";var n=r(72160);t.exports=function(t){return t?n(t):[0,0,0,1]}},9188:function(t,e,r){"use strict";var n=r(2264),i=r(43616),a=r(3400),o=null;t.exports=function(){if(null!==o)return o;o=!1;var t=a.isIE()||a.isSafari()||a.isIOS();if(window.navigator.userAgent&&!t){var e=Array.from(n.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if("function"==typeof r)o=e.some(function(t){return r.apply(null,t)});else{var s=i.tester.append("image").attr("style",n.STYLE),l=window.getComputedStyle(s.node()).imageRendering;o=e.some(function(t){var e=t[1];return l===e||l===e.toLowerCase()}),s.remove()}}return o}},72736:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.strTranslate,o=r(9616),s=r(84284).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,v){var M=t.text(),S=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&M.match(l),C=n.select(t.node().parentNode);if(!C.empty()){var P=t.attr("class")?t.attr("class").split(" ")[0]:"text";return P+="-math",C.selectAll("svg."+P).remove(),C.selectAll("g."+P+"-group").remove(),t.style("display",null).attr({"data-unformatted":M,"data-math":"N"}),S?(r&&r._promises||[]).push(new Promise(function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10);(function(t,e,r){var a,o,s,l,h=parseInt((MathJax.version||"").split(".")[0]);if(2!==h&&3!==h){i.warn("No MathJax version:",MathJax.version);return}var p=function(){var r="math-output-"+i.randstr({},64),a=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(u,"\\lt ").replace(c,"\\gt "))).node();return 2===h?MathJax.Hub.Typeset(a):MathJax.typeset([a])},d=function(){var e=l.select(2===h?".MathJax_SVG":".MathJax"),a=!e.empty()&&l.select("svg").node();if(a){var o,s=a.getBoundingClientRect();o=2===h?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()},v=function(){"svg"!==a&&(MathJax.config.startup.output=a)},g=function(){MathJax.config=o};2===h?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:f},displayAlign:"left"})},function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},p,d,function(){if("SVG"!==a)return MathJax.Hub.setRenderer(a)},function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)}):3===h&&(o=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f,"svg"!==(a=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){p(),d(),v(),g()}))})(S[2],{fontSize:r},function(n,i,o){C.selectAll("svg."+P).remove(),C.selectAll("g."+P+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node()){O(),e();return}var l=C.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":M,"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:P,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=t.node().style.fill||"black",h=s.select("g");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),d=p.width,g=p.height;(d>u||g>c)&&(s.style("overflow","hidden"),d=(p=s.node().getBoundingClientRect()).width,g=p.height);var y=+t.attr("x"),m=+t.attr("y"),x=-(r||t.node().getBoundingClientRect().height)/4;if("y"===P[0])l.attr({transform:"rotate("+[-90,y,m]+")"+a(-d/2,x-g/2)});else if("l"===P[0])m=x-g/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))y=0,m=x;else{var b=t.attr("text-anchor");y-=d*("middle"===b?.5:"end"===b?1:0),m=m+x-g/2}s.attr({x:y,y:m}),v&&v.call(t,l),e(l)})})):O(),t}function O(){C.empty()||(P=t.attr("class")+"-math",C.select("svg."+P).remove()),t.text("").style("white-space","pre"),function(t,e){e=e.replace(g," ");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.",e);return}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}(O);else{var z=P[4],D={type:O},R=k(z,b);if(R?(R=R.replace(A,"$1 fill:"),I&&(R+=";"+I)):I&&(R=I),R&&(D.style=R),"a"===O){a=!0;var F=k(z,_);if(F){var B=L(F);B&&(D.href=B,D.target=k(z,w)||"_blank",D.popup=k(z,T))}}f(D)}}return a}(t.node(),M)&&t.style("pointer-events","all"),e.positionText(t),v&&v.call(t)}};var u=/(<|<|<)/g,c=/(>|>|>)/g,f=[["$","$"],["\\(","\\)"]],h={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"},p={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},v=["http:","https:","mailto:","",void 0,":"],g=e.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,m=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;e.BR_TAG_ALL=//gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(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(y),a=[],o="",s=0,l=0;l3?a.push(u.substr(0,p-3)+"..."):a.push(u.substr(0,p));break}o=""}}return a.join("")};var M={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(S,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((t>>10)+55232,t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):M[e])||t})}function L(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return -1!==v.indexOf(i)&&-1!==v.indexOf(a)?e:""}function C(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=E,e.sanitizeHTML=function(t){t=t.replace(g," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(y),o=0;oa.ts+e){l();return}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)}},36896:function(t,e,r){"use strict";var n=r(38248);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}},59972:function(t,e,r){"use strict";var n=t.exports={},i=r(79552).locationmodeToLayer,a=r(55712).NO;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},11680: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"}}},69820:function(t,e,r){"use strict";var n=r(24040);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){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 r,n,a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,v=Object.keys(t);for(r=0;r3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),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;r0)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;n1&&a.warn("Full array edits are incompatible with other edits",b);var S=r[""][""];if(u(S))e.set(null);else{if(!Array.isArray(S))return a.warn("Unrecognized full array edit value",b,S),!0;e.set(S)}return!k&&(_(A,M),w(t),!0)}var E=Object.keys(r).map(Number).sort(o),L=e.get(),C=L||[],P=c(M,b).get(),O=[],I=-1,z=C.length;for(f=0;fC.length-(y?0:1)){a.warn("index out of range",b,p);continue}if(void 0!==g)v.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",b,p),u(g)?O.push(p):y?("add"===g&&(g={}),C.splice(p,0,g),P&&P.splice(p,0,{})):a.warn("Unrecognized full object edit value",b,p,g),-1===I&&(I=p);else for(h=0;h=0;f--)C.splice(O[f],1),P&&P.splice(O[f],1);if(C.length?L||e.set(C):e.set(null),k)return!1;if(_(A,M),T!==i){if(-1===I)x=E;else{for(f=0,z=Math.max(C.length,z),x=[];f=I);f++)x.push(p);for(f=I;f=t.data.length||i<-t.data.length)throw 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 Error("each index in "+r+" must be unique.")}}function z(t,e,r){if(!Array.isArray(t.data))throw Error("gd.data must be an array.");if(void 0===e)throw Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),I(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&I(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw Error("current and new indices must be of equal length.")}function D(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw Error("gd.data must be an array");if(!o.isPlainObject(e))throw Error("update must be a key:value object");if(void 0===r)throw Error("indices must be an integer or array of integers");for(var a in I(t,r,"indices"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw 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 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,f=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=O(r,t.data.length-1),e)for(var d=0;d-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"));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=Z(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(k.layoutReplot):Object.keys(n).length&&(H(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(k.doLegend),a.layoutstyle&&s.push(k.layoutStyles),a.axrange&&G(s,i.rangesAltered),a.ticks&&s.push(k.doTicksRelayout),a.modebar&&s.push(k.doModeBar),a.camera&&s.push(k.doCamera),a.colorbars&&s.push(k.doColorBars),s.push(E)),s.push(h.rehover,h.redrag,h.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,v,t,e)},u={};for(var c in r.rangesAltered){var f=p.id2name(c);if(n=t.layout[f],i=a[f],d(n,i,l,u),i._matchGroup){for(var h in i._matchGroup)if(h!==c){var g=a[p.id2name(h)];g.autorange=i.autorange,g.range=i.range.slice(),g._input.range=i.range.slice()}}}return!0}function G(t,e){var r=e?function(t){var r=[];for(var n in e){var i=p.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var a in i._matchGroup)e[a]||r.push(a)}return p.draw(t,r,{skipTitle:!0})}:function(t){return p.draw(t,"redraw")};t.push(b,k.doAutoRangeAndConstraints,r,k.drawData,k.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,X=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Z(t,e){var r,n,i,a,l=t.layout,u=t._fullLayout,h=u._guiEditing,d=N(u._preGUI,h),v=Object.keys(e),g=p.list(t),y=o.extendDeepAll({},e),m={};for(V(e),v=Object.keys(e),n=0;n0&&"string"!=typeof I.parts[D];)D--;var R=I.parts[D],F=I.parts[D-1]+"."+R,j=I.parts.slice(0,D).join("."),U=s(t.layout,j).get(),q=s(u,j).get(),H=I.get();if(void 0!==z){S[O]=z,E[O]="reverse"===R?z:B(H);var G=f.getLayoutValObject(u,I.parts);if(G&&G.impliedEdits&&null!==z)for(var Z in G.impliedEdits)L(o.relativeAttr(O,Z),G.impliedEdits[Z]);if(-1!==["width","height"].indexOf(O)){if(z){L("autosize",null);var J="height"===O?"width":"height";L(J,u[J])}else u[O]=t._initialAutoSize[O]}else if("autosize"===O)L("width",z?null:u.width),L("height",z?null:u.height);else if(F.match(W))P(F),s(u,j+"._inputRange").set(null);else if(F.match(Y)){P(F),s(u,j+"._inputRange").set(null);var $=s(u,j).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(X)&&s(u,j+"._inputDomain").set(null);if("type"===R){a=U;var Q="linear"===q.type&&"log"===z,tt="log"===q.type&&"linear"===z;if(Q||tt){if(a&&a.range){if(q.autorange)Q&&(a.range=a.range[1]>a.range[0]?[1,2]:[2,1]);else{var te=a.range[0],tr=a.range[1];Q?(te<=0&&tr<=0&&L(j+".autorange",!0),te<=0?te=tr/1e6:tr<=0&&(tr=te/1e6),L(j+".range[0]",Math.log(te)/Math.LN10),L(j+".range[1]",Math.log(tr)/Math.LN10)):(L(j+".range[0]",Math.pow(10,te)),L(j+".range[1]",Math.pow(10,tr)))}}else L(j+".autorange",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete u[I.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(t,q,z,L),c.getComponentMethod("images","convertCoords")(t,q,z,L)}else L(j+".autorange",!0),L(j+".range",null);s(u,j+"._inputRange").set(null)}else if(R.match(M)){var tn=s(u,O).get(),ti=(z||{}).type;ti&&"-"!==ti||(ti="linear"),c.getComponentMethod("annotations","convertCoords")(t,tn,ti,L),c.getComponentMethod("images","convertCoords")(t,tn,ti,L)}var ta=w.containerArrayMatch(O);if(ta){r=ta.array,n=ta.index;var to=ta.property,ts=G||{editType:"calc"};""!==n&&""===to&&(w.isAddVal(z)?E[O]=null:w.isRemoveVal(z)?E[O]=(s(l,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(k,ts),m[r]||(m[r]={});var tl=m[r][n];tl||(tl=m[r][n]={}),tl[to]=z,delete e[O]}else"reverse"===R?(U.range?U.range.reverse():(L(j+".autorange",!0),U.range=[1,0]),q.autorange?k.calc=!0:k.plot=!0):("dragmode"===O&&(!1===z&&!1!==H||!1!==z&&!1===H)?k.plot=!0:u._has("scatter-like")&&u._has("regl")&&"dragmode"===O&&("lasso"===z||"select"===z)&&!("lasso"===H||"select"===H)?k.plot=!0:u._has("gl2d")?k.plot=!0:G?A.update(k,G):k.calc=!0,I.set(z))}}for(r in m)w.applyContainerArrayChanges(t,d(l,r),m[r],k,d)||(k.plot=!0);for(var tu in C){var tc=(a=p.getFromId(t,tu))&&a._constraintGroup;if(tc)for(var tf in k.calc=!0,tc)C[tf]||(p.getFromId(t,tf)._constraintShrinkable=!0)}(K(t)||e.height||e.width)&&(k.plot=!0);var th=u.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function tn(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 ti(t,e,r,n){var i=n.getValObject,a=n.flags,l=n.immutable,u=n.inArray,c=n.arrayIndex;function f(){var t=p.editType;if(u&&-1!==t.indexOf("arraydraw")){o.pushUnique(a.arrays[u],c);return}A.update(a,p),"none"!==t&&a.nChanges++,n.transition&&p.anim&&a.nChangesAnim++,(W.test(v)||Y.test(v))&&(a.rangesAltered[r[0]]=1),X.test(v)&&s(e,"_inputDomain").set(null),"datarevision"===d&&(a.newDataRevision=1)}function h(t){return"data_array"===t.valType||t.arrayOk}for(d in t){if(a.calc&&!n.transition)return;var p,d,v,g,y=t[d],m=e[d],x=r.concat(d);if(v=x.join("."),"_"!==d.charAt(0)&&"function"!=typeof y&&y!==m){if(("tick0"===d||"dtick"===d)&&"geo"!==r[0]){var b=e.tickmode;if("auto"===b||"array"===b||!b)continue}if(("range"!==d||!e.autorange)&&("zmin"!==d&&"zmax"!==d||"contourcarpet"!==e.type)&&(p=i(x))&&(!p._compareAsJSON||JSON.stringify(y)!==JSON.stringify(m))){var _=p.valType,w=h(p),T=Array.isArray(y),k=Array.isArray(m);if(T&&k){var M="_input_"+d,S=t[M],E=e[M];if(Array.isArray(S)&&S===E)continue}if(void 0===m)w&&T?a.calc=!0:f();else if(p._isLinkedToArray){var L=[],C=!1;u||(a.arrays[d]=L);var P=Math.min(y.length,m.length),O=Math.max(y.length,m.length);if(P!==O){if("arraydraw"===p.editType)C=!0;else{f();continue}}for(g=0;g=i.length?t.transitionOpts=i[f]:t.transitionOpts=i[0]:t.transitionOpts=i,f++,t}var d=[],v=null==e,g=Array.isArray(e);if(!v&&!g&&o.isPlainObject(e))d.push({type:"object",data:p(o.extendFlat({},e))});else if(v||-1!==["string","number"].indexOf(typeof e))for(u=0;u0&&xx)&&b.push(c);d=b}}d.length>0?function(e){if(0!==e.length){for(var o,u=0;u=a.length?a[0]:a[f]:a),v=(c=u,Array.isArray(i)?c>=i.length?i[0]:i[c]:i);v.duration=Math.min(v.duration,d.duration);var g={frame:p,name:e[u].name,frameOpts:d,transitionOpts:v};u===e.length-1&&(g.onComplete=function(t,e){var r=0;return function(){if(t&&2==++r)return t()}}(s,0),g.onInterrupt=l),n._frameQueue.push(g)}"immediate"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||(t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null,(o=function(){n._animationRaf=window.requestAnimationFrame(o),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,h.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}()})())}}(d):(t.emit("plotly_animated"),s())})},e.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw 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 Error("addFrames failure: frameList must be an Array of frame definitions"+e);var f=l.length+2*e.length,p=[],d={};for(n=e.length-1;n>=0;n--)if(o.isPlainObject(e[n])){var v=e[n].name,g=(c[v]||d[v]||{}).name,y=e[n].name,m=c[g]||d[g];g&&y&&"number"==typeof y&&m&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(c[g]||d[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[v]={name:v},p.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort(function(t,e){return t.index>e.index?-1:t.index=0;n--){if("number"==typeof(i=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;c[i.name="frame "+t._transitionData._counter++];);if(c[i.name]){for(a=0;a=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,c=h.modifyFrames,f=[t,s],p=[t,a];return u&&u.add(t,l,f,c,p),h.modifyFrames(t,a)},e.addTraces=function t(r,n,i){r=o.getGraphDiv(r);var a,s,l=[],c=e.deleteTraces,f=[r,l],h=[r,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw Error("gd.data must be an array.");if(void 0===e)throw Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(t){return e.crawl(t,function(t,r,n){e.isValObject(t)?(!0===t.arrayOk||"data_array"===t.valType)&&(n[r+"src"]={valType:"string",editType:"none"}):h(t)&&(t.role="object")}),e.crawl(t,function(t,e,r){if(t){var n=t[y];n&&(delete t[y],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}),function t(e){for(var r in e)if(h(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n=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 f=c.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return b(i,e,s)},e.getLayoutValObject=function(t,e){return b(function(t,e){var r,i,a,s,l,u=t._basePlotModules;if(u){for(r=0;r=o&&(r._input||{})._templateitemname;l&&(s=o);var u=e+"["+s+"]";function c(){i={},l&&(i[u]={},i[u][a]=l)}function f(t,e){l?n.nestedProperty(i[u],t).set(e):i[u+"."+t]=e}function h(){var t=i;return c(),t}return c(),{modifyBase:function(t,e){i[t]=e},modifyItem:f,getUpdateObj:h,applyUpdate:function(e,r){e&&f(e,r);var i=h();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},39172:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(7316),o=r(3400),s=r(72736),l=r(73696),u=r(76308),c=r(43616),f=r(81668),h=r(45460),p=r(54460),d=r(84284),v=r(71888),g=v.enforce,y=v.clean,m=r(19280).doAutoRange,x="start";function b(t){var r,i,s,l,f,v,g,y,m,x,b,w,k,A=t._fullLayout,M=A._size,S=M.p,E=p.list(t,"",!0);if(A._paperdiv.style({width:t._context.responsive&&A.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":A.width+"px",height:t._context.responsive&&A.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":A.height+"px"}).selectAll(".main-svg").call(c.setSize,A.width,A.height),t._context.setBackground(t,A.paper_bgcolor),e.drawMainTitle(t),h.manage(t),!A._has("cartesian"))return a.previousPromises(t);function L(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-S-n:e._offset+e._length+S+n:M.t+M.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+S+n:e._offset-S-n:M.l+M.w*(t.position||0)+n%1}for(U=0;U=t[1])&&!(i[1]<=t[0])&&a[0]e[0])return!0}return!1}(D,R,I)){var B=F.node(),N=q.bg=o.ensureSingle(F,"rect","bg");B.insertBefore(N.node(),B.childNodes[0]),O.push(V)}else F.select("rect.bg").remove(),I.push([D,R]),z||(P.push(V),O.push(V))}var j=A._bgLayer.selectAll(".bg").data(P);for(j.enter().append("rect").classed("bg",!0),j.exit().remove(),j.each(function(t){A._plots[t].bg=n.select(this)}),U=0;U.5?"t":"b",M=y._fullLayout.margin[A],S=0,"paper"===m.yref?S=b+m.pad.t+m.pad.b:"container"===m.yref&&(_=y._fullLayout.height,w=0,"middle"===k&&(w+=b/2),"t"===A?("top"===k&&(w+=b),w+=_-T*_):("bottom"===k&&(w+=b),w+=T*_),S=w+m.pad.t+m.pad.b),S>M?S:0);if(g>0){E=t,L=u,C=g,P=v,z="title.automargin",R=(D=E._fullLayout.title).y>.5?"t":"b",F={x:D.x,y:D.y,t:0,b:0},B={},"paper"===D.yref&&(O="paper"===D.yref?E._fullLayout._size.h:E._fullLayout.height,I=o.isTopAnchor(D)?L:L-P,!(o.isTopAnchor(D)&&"t"===R||o.isBottomAnchor(D)&&"b"===R)&&("b"===R?O-I:I)w?c.push({code:"unused",traceType:y,templateCount:_,dataCount:w}):w>_&&c.push({code:"reused",traceType:y,templateCount:_,dataCount:w})}}else c.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var a=e[n],o=v(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)&&function(t){for(var e=0;em.length&&i.push(p("unused",a,g.concat(m.length)));var k,A,M,S,E,L=m.length,C=Array.isArray(T);if(C&&(L=Math.min(L,T.length)),2===x.dimensions)for(A=0;Am[A].length&&i.push(p("unused",a,g.concat(A,m[A].length)));var P=m[A].length;for(k=0;k<(C?Math.min(P,T[A].length):P);k++)M=C?T[A][k]:T,S=y[A][k],E=m[A][k],n.validate(S,M)?E!==S&&E!==+S&&i.push(p("dynamic",a,g.concat(A,k),S,E)):i.push(p("value",a,g.concat(A,k),S))}else i.push(p("array",a,g.concat(A),y[A]));else for(A=0;A1&&h.push(p("object","layout"))),i.supplyDefaults(d);for(var v=d._fullData,g=r.length,y=0;y0)||Math.round(c)!==c)return{vals:i};b=c}for(var f=e.calendar,h="start"===l,p="end"===l,d=a(t[r+"period0"],f)||0,v=[],g=[],y=[],m=i.length,x=0;xk;)T=o(T,-b,f);for(;T<=k;)T=o(T,b,f);w=o(T,-b,f)}else{for(_=Math.round((k-d)/u),T=d+_*u;T>k;)T-=u;for(;T<=k;)T+=u;w=T-u}v[x]=h?w:p?T:(w+T)/2,g[x]=w,y[x]=T}return{vals:v,starts:g,ends:y}}},26720:function(t){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(3400),o=r(39032).FP_SAFE,s=r(24040),l=r(43616),u=r(79811),c=u.getFromId,f=u.isLinked;function h(t,e){var r,n,i,o,s,l,u,c,f=[],h=t._fullLayout,g=d(h,e,0),y=d(h,e,1),m=v(t,e),x=m.min,b=m.max;if(0===x.length||0===b.length)return a.simpleMap(e.range,e.r2l);var w=x[0].val,T=b[0].val;for(r=1;r0&&((u=C-g(i)-y(o))>P?c/u>O&&(s=i,l=o,O=c/u):c/C>O&&(s={val:i.val,nopad:1},l={val:o.val,nopad:1},O=c/C));if(w===T){var I=w-1,z=w+1;if(E){if(0===w)f=[0,1];else{var D=(w>0?b:x).reduce(function(t,e){return Math.max(t,y(e))},0),R=w/(1-Math.min(.5,D/C));f=w>0?[0,R]:[R,0]}}else f=L?[Math.max(0,I),Math.max(1,z)]:[I,z]}else E?(s.val>=0&&(s={val:0,nopad:1}),l.val<=0&&(l={val:0,nopad:1})):L&&(s.val-O*g(s)<0&&(s={val:0,nopad:1}),l.val<=0&&(l={val:1,nopad:1})),O=(l.val-s.val-p(e,i.val,o.val))/(C-g(s)-y(l)),f=[s.val-O*g(s),l.val+O*y(l)];return f=_(f,e),e.limitRange&&e.limitRange(),A&&f.reverse(),a.simpleMap(f,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a=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 y(t){return i(t)&&Math.abs(t)=e}function b(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))<(r=t.d2l(r))}function _(t,e){if(!e||!e.autorangeoptions)return t;var r,n,i,o,s=t[0],l=t[1],u=e.autorangeoptions.include;if(void 0!==u){var c=e.d2l(s),f=e.d2l(l);a.isArrayOrTypedArray(u)||(u=[u]);for(var h=0;h=p&&(c=p,s=p),f<=p&&(f=p,l=p)}}return r=s,s=(n=e.autorangeoptions)&&void 0!==n.minallowed&&b(e,n.minallowed,n.maxallowed)?n.minallowed:n&&void 0!==n.clipmin&&b(e,n.clipmin,n.clipmax)?Math.max(r,e.d2l(n.clipmin)):r,i=l,[s,l=(o=e.autorangeoptions)&&void 0!==o.maxallowed&&b(e,o.minallowed,o.maxallowed)?o.maxallowed:o&&void 0!==o.clipmax&&b(e,o.clipmin,o.clipmax)?Math.min(i,e.d2l(o.clipmax)):i]}t.exports={applyAutorangeOptions:_,getAutoRange:h,makePadFn:d,doAutoRange:function(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():h(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=h(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,f,h,p,d=[],v=[],b=e.length,_=r.padded||!1,w=r.tozero&&("linear"===t.type||"-"===t.type),T="log"===t.type,k=!1,A=r.vpadLinearized||!1;function M(t){if(Array.isArray(t))return k=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var S=M((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),E=M((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),L=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!k){if(h=1/0,p=-1/0,T)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=I;n--)O(n);return{min:d,max:v,opts:r}},concatExtremes:v}},76808:function(t){"use strict";t.exports=function(t,e,r){if(r){var n,i,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")}},54460:function(t,e,r){"use strict";var n=r(33428),i=r(38248),a=r(7316),o=r(24040),s=r(3400),l=s.strTranslate,u=r(72736),c=r(81668),f=r(76308),h=r(43616),p=r(94724),d=r(98728),v=r(39032),g=v.ONEMAXYEAR,y=v.ONEAVGYEAR,m=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,T=v.ONEAVGMONTH,k=v.ONEMINMONTH,A=v.ONEWEEK,M=v.ONEDAY,S=M/2,E=v.ONEHOUR,L=v.ONEMIN,C=v.ONESEC,P=v.MINUS_SIGN,O=v.BADNUM,I={K:"zeroline"},z={K:"gridline",L:"path"},D={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(84284),j=N.MID_SHIFT,U=N.CAP_SHIFT,V=N.LINE_SPACING,q=N.OPPOSITE_SIDE,H=t.exports={};H.setConvert=r(78344);var G=r(52976),W=r(79811),Y=W.idSort,X=W.isLinked;H.id2name=W.id2name,H.name2id=W.name2id,H.cleanId=W.cleanId,H.list=W.list,H.listIds=W.listIds,H.getFromId=W.getFromId,H.getFromTrace=W.getFromTrace;var Z=r(19280);function K(t){var e=(t[1]-t[0])*1e-4;return[t[0]-e,t[1]+e]}H.getAutoRange=Z.getAutoRange,H.findExtremes=Z.findExtremes,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;cMath.abs((t/e+.5)%1-.5)}function te(t,e){return .001>Math.abs(t/e-1)}function tr(t){return+t.substring(1)}function tn(t,e){return t.rangebreaks&&(e=e.filter(function(e){return t.maskBreaks(e.x)!==O})),e}function ti(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 f=0;fn&&h2e-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.3*h||c(n)||c(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=H.tickIncrement(t,"M6","reverse")+1.5*M:a.exactMonths>.8?t=H.tickIncrement(t,"M1","reverse")+15.5*M:t-=S;var l=H.tickIncrement(t,r);if(l<=n)return l}return t}(m,t,y,h,a)),c=m,f=0;c<=p;)c=H.tickIncrement(c,y,!1,a),f++;return{start:e.c2r(m,0,a),end:e.c2r(c,0,a),size:y,_dataSpan:p-h}},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),f=u?e.dtick:+e.dtick.substring(1),h=c?t.dtick:+t.dtick.substring(1);u&&c?tt(f,h)?f===2*A&&h===2*M&&(t.dtick=A):f===2*A&&h===3*M?t.dtick=A:f!==A||(e._input.minor||{}).nticks?te(f/h,2.5)?t.dtick=f/2:t.dtick=f:t.dtick=M:"M"===String(e.dtick).charAt(0)?c?t.dtick="M1":tt(f,h)?f>=12&&2===h&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?tt(f,h)||(t.dtick=te(f/h,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){function e(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var r,n=e(),a=H.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;!/%[fLQsSMX]/.test(a)&&(/%[HI]/.test(a)?(r=E,o&&!n&&t.dticktr(t.dtick):t.dticktr(t.dtick):t.dtick<_)&&(t.dtick="M3")):/%[Yy]/.test(a)&&(r=y,o&&(n?12>tr(t.dtick):t.dtick=(D?0:1);R--){var F,B,N=!R;R?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var j=R?t:s.extendFlat({},t,t.minor);if(N?H.prepMinorTicks(j,t,e):H.prepTicks(j,e),"array"===j.tickmode){R?(I=[],C=ti(t,!N)):(z=[],P=ti(t,!N));continue}if("sync"===j.tickmode){I=[],C=function(t){var e=t._mainAxis,r=[];if(e._vals){for(var n=0;n=q:Z<=q;Z=H.tickIncrement(Z,J,p,u)){if(R&&F++,j.rangebreaks&&!p){if(Z=v)break}if(I.length>L||Z===X)break;X=Z;var $={value:Z};R?(W&&Z!==(0|Z)&&($.simpleLabel=!0),c>1&&F%c&&($.skipLabel=!0),I.push($)):($.minor=!0,z.push($))}}if(D&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var Q=I.map(function(t){return t.value}),tt=[],te=0;te0?n-1:n,s=n);var l=t[o].value,u=Math.abs(t[s].value-l),c=r||u,f=0;c>=m?f=u>=m&&u<=g?u:y:r===b&&c>=_?f=u>=_&&u<=x?u:b:c>=k?f=u>=k&&u<=w?u:T:r===A&&c>=A?f=A:c>=M?f=M:r===S&&c>=S?f=S:r===E&&c>=E&&(f=E),f>=u&&(f=u,i=!0);var h=a+f;if(e.rangebreaks&&f>0){for(var p=0,d=0;d<84;d++){var v=(d+.5)/84;e.maskBreaks(a*(1-v)+v*h)!==O&&p++}(f*=p/84)||(t[n].drop=!0),i&&u>A&&(f=u)}(f>0||0===n)&&(t[n].periodX=a+f/2)}}(I,t,t._definedDelta),t.rangebreaks){var tl="y"===t._id.charAt(0),tu=1;"auto"===t.tickmode&&(tu=t.tickfont?t.tickfont.size:12);var tc=NaN;for(r=I.length-1;r>-1;r--){if(I[r].drop){I.splice(r,1);continue}I[r].value=tC(I[r].value,t);var tf=t.c2p(I[r].value);(tl?tc>tf-tu:tcv||ov&&(a.periodX=v),o10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=M&&a<=10||e>=15*M)t._tickround="d";else if(e>=L&&a<=16||e>=E)t._tickround="M";else if(e>=C&&a<=19||e>=L)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.floor(Math.log(Math.max(Math.abs(s[0]),Math.abs(s[1])))/Math.LN10+.01);Math.abs(l)>(void 0===t.minexponent?3:t.minexponent)&&(tg(t.exponentformat)&&!ty(l)?t._tickexponent=3*Math.round((l-1)/3):t._tickexponent=l)}else t._tickround=null}function td(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,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>y)e/=y,n=a(10),t.dtick="M"+12*th(e,n,ta);else if(o>T)e/=T,t.dtick="M"+th(e,1,to);else if(o>M){if(t.dtick=th(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:tl),!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>E?t.dtick=th(e,E,to):o>L?t.dtick=th(e,L,ts):o>C?t.dtick=th(e,C,ts):(n=a(10),t.dtick=th(e,n,ta))}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(1>Math.abs(c[1]-c[0])){var f=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/f,n=a(10),t.dtick="L"+th(e,n,ta)}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))):tL(t)?(t.tick0=0,n=1,t.dtick=th(e,n,tf)):(t.tick0=0,n=a(10),t.dtick=th(e,n,ta));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var h=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(h)}},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?tc:tu,f=t+.01*o,h=s.roundUp(s.mod(f,1),c,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),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]=0&&r<=t._length?e:null};if(d&&s.isArrayOrTypedArray(t.ticktext)){var x=s.simpleMap(t.range,t.r2l),b=(Math.abs(x[1]-x[0])-(t._lBreaks||0))/1e4;for(h=0;h ")}else t._prevDateHead=a,u+="
"+a}e.text=u}(t,p,r,v):"log"===g?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=tm(Math.pow(10,l),t,a,n);else if(i(o)||"D"===c&&.1>s.mod(l+.01,1)){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;"power"===p||tg(p)&&ty(f)?(0===f?e.text=1:1===f?e.text="10":e.text="10"+(f>1?"":P)+h+"",e.fontSize*=1.25):("e"===p||"E"===p)&&h>2?e.text="1"+p+(f>0?"+":P)+h:(e.text=tm(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else if("D"===c)e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75;else throw"unrecognized dtick "+String(o);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,p,0,v,w):"category"===g?(void 0===(a=t._categories[Math.round(p.x)])&&(a=""),p.text=String(a)):"multicategory"===g?(o=Math.round(p.x),u=void 0===(l=t._categories[o]||[])[1]?"":String(l[1]),c=void 0===l[0]?"":String(l[0]),r?p.text=c+" - "+u:(p.text=u,p.text2=c)):tL(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=tm(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 1e-6>=Math.abs(t-e)}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=tm(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=["",o[0],"","⁄","",o[1],"","π"].join(""),l&&(e.text=P+e.text)}}}}(t,p,r,v,w):("never"===(f=w)?f="":"all"===t.showexponent&&1e-6>Math.abs(p.x/t.dtick)&&(f="hide"),p.text=tm(p.x,t,f,v)),n||(t.tickprefix&&!_(t.showtickprefix)&&(p.text=t.tickprefix+p.text),!t.ticksuffix||_(t.showticksuffix)||(p.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(p.text)){var T=t.labelalias[p.text];"string"==typeof T&&(p.text=T)}return("boundaries"===t.tickson||t.showdividers)&&(p.xbnd=[m(p.x-.5),m(p.x+t.dtick-.5)]),p},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":P+o:o};var tv=["f","p","n","μ","m","","k","M","G","T"];function tg(t){return"SI"===t||"B"===t}function ty(t){return t>14||t<-15}function tm(t,e,r,n){var a,o=t<0,l=e._tickround,u=r||e.exponentformat||"B",c=e._tickexponent,f=H.getTickFormat(e),h=e.separatethousands;if(n){var p={exponentformat:u,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]};tp(p),l=(Number(p._tickround)||0)+4,c=p._tickexponent,e.hoverformat&&(f=e.hoverformat)}if(f)return e._numFormat(f)(t).replace(/-/g,P);var d=Math.pow(10,-l)/2;if("none"===u&&(c=0),(t=Math.abs(t))"+a+"":"B"===u&&9===c?t+="B":tg(u)&&(t+=tv[c/3+5])),o)?P+t:t}function tx(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 tb(t){return void 0!==t.periodX?t.periodX:t.x}function t_(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}function tw(t){var e=t.title.font.size,r=(t.title.text.match(u.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?e*(U+r*V):r?e*(r+1)*V:e}function tT(t,e){var r=t.l2p(e);return r>1&&r=i.min&&t0)switch(t.type){case"date":case"linear":for(e=0;e=n(t))}(t.dtick,n.dtickrange,i)){r=n;break}break;case"log":for(e=0;e=0,o=0>=a(t,e[1]);return(r||i)&&(n||o)}(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=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&&tI(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=(r=r||{}).axShifts||{},i=r.overlayingShiftedAx||[];e.setScale();var l=t._fullLayout,p=e._id,d=p.charAt(0),v=H.counterLetter(p),g=l._plots[e._mainSubplot];if(g){if(e._shiftPusher=e.autoshift||-1!==i.indexOf(e._id)||-1!==i.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var y=e.linewidth/2||0;"inside"===e.ticks&&(y+=e.ticklen),tI(e,y,n,!0),tI(e,e.shift||0,n,!1)}(!0!==r.skipTitle||void 0===e._shift)&&(e._shift=e.autoshift?n[e.overlaying][e.side]:e.shift||0);var m=g[d+"axislayer"],x=e._mainLinePosition,b=x+=e._shift,_=e._mainMirrorPosition,w=e._vals=H.calcTicks(e),T=[e.mirror,b,_].join("_");for(N=0;N0?r.bottom-f:0,h))));var p=0,g=0;if(e._shiftPusher&&(p=Math.max(h,r.height>0?"l"===u?f-r.left:r.right-f:0),e.title.text!==l._dfltTitle[d]&&(g=(e._titleStandoff||0)+(e._titleScoot||0),"l"===u&&(g+=tw(e))),e._fullDepth=Math.max(p,g)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var y=[0,1],m="number"==typeof e._shift?e._shift:0;if("x"===d){if("b"===u?n[u]=e._depth:(n[u]=e._depth=Math.max(r.width>0?f-r.top:0,h),y.reverse()),r.width>0){var x=r.right-(e._offset+e._length);x>0&&(n.xr=1,n.r=x);var b=e._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===u?(e._depth=Math.max(r.height>0?f-r.left:0,h),n[u]=e._depth-m):(e._depth=Math.max(r.height>0?r.right-f:0,h),n[u]=e._depth+m,y.reverse()),r.height>0){var _=r.bottom-(e._offset+e._length);_>0&&(n.yb=0,n.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[y[0]],e.title.text!==l._dfltTitle[d]&&(n[u]+=tw(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[c]+=h),!0===e.mirror||"ticks"===e.mirror?i[v]=e._anchorAxis.domain[y[1]]:("all"===e.mirror||"allticks"===e.mirror)&&(i[v]=[e._counterDomainMin,e._counterDomainMax][y[1]]))}tf&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(tx(n,e.automargin),tx(i,e.automargin)),a.autoMargin(t,tA(e),n),a.autoMargin(t,tM(e),i),a.autoMargin(t,tS(e),s)}),s.syncOrAsync(tu)}}function th(t){var r=p+(t||"tick");return k[r]||(k[r]=function(t,e,r){if(t._selections[e].size())n=1/0,i=-1/0,a=1/0,o=-1/0,t._selections[e].each(function(){var t=tk(this),e=h.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 n,i,a,o,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,b)),k[r]}},H.getTickSigns=function(t,e){var r=t._id.charAt(0),n=t.side===({x:"top",y:"right"})[r]?1:-1,i=[-1,1,n,-n];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(i=i.map(function(t){return-t})),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i},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,f=3,h=t.tickfont?t.tickfont.size:12;return(o||n)&&(c+=h*U,f+=(t.linewidth||0)/2),(i||a)&&(c+=(t.linewidth||0)/2,f+=3),s&&"top"===u&&(f-=h*(1-U)),(i||n)&&(c=-c),("bottom"===u||"right"===u)&&(f=-f),[l?c:0,s?f:0]}(t),r=e[0],n=e[1];return"x"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(tb(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(tb(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,a,o,l,u,c=t.ticklabelposition||"",f=function(t){return -1!==c.indexOf(t)},h=f("top"),p=f("left"),d=f("right"),v=f("bottom")||p||h||d,g=f("inside"),y="inside"===c&&"inside"===t.ticks||!g&&"outside"===t.ticks&&"boundaries"!==t.tickson,m=0,x=0,b=y?t.ticklen:0;if(g?b*=-1:v&&(b=0),y&&(m+=b,r)){var _=s.deg2rad(r);m=b*Math.cos(_)+1,x=b*Math.sin(_)}t.showticklabels&&(y||t.showline)&&(m+=.2*t.tickfont.size);var w={labelStandoff:m+=(t.linewidth||1)/2*(g?-1:1),labelShift:x},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if("x"===A)l=(u=!g&&"bottom"===k||g&&"top"===k)?1:-1,g&&(l*=-1),n=x*l,a=e+m*l,o=u?1:-.2,90===Math.abs(M)&&(g?o+=j:o=-90===M&&"bottom"===k?U:90===M&&"top"===k?j:.5,T=j/2*(M/90)),w.xFn=function(t){return t.dx+n+T*t.fontSize},w.yFn=function(t){return t.dy+a+t.fontSize*o},w.anchorFn=function(t,e){if(v){if(p)return"end";if(d)return"start"}return i(e)&&0!==e&&180!==e?e*l<0!==g?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==g?-n:0};else if("y"===A){if(l=(u=!g&&"left"===k||g&&"right"===k)?1:-1,g&&(l*=-1),n=m,a=x*l,o=0,g||90!==Math.abs(M)||(o=-90===M&&"left"===k||90===M&&"right"===k?U:.5),g){var S=i(M)?+M:0;0!==S&&(T=Math.abs(Math.sin(s.deg2rad(S)))*U*l,o=0)}w.xFn=function(t){return t.dx+e-(n+t.fontSize*o)*l+T*t.fontSize},w.yFn=function(t){return t.dy+a+t.fontSize*j},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":u?"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,t_);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each(function(t){return f.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)}).style("stroke-width",function(r){return h.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),tO(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=0;y--){var m=y?v:g;if(m){var x=m.selectAll("path."+i).data(y?s:o,t_);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each(function(t){return f.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")}).style("stroke-dasharray",function(t){return h.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)}).style("stroke-width",function(t){return(t.minor?d:e._gw)+"px"}).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}tO(e,[z,D])}},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(f.stroke,e.zerolinecolor||f.defaultLine).style("stroke-width",h.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),tO(e,[I])},H.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,c=r.cls||o+"tick",f=r.vals.filter(function(t){return t.text}),p=r.labelFns,d=r.secondary?0:e.tickangle,v=(e._prevTickAngles||{})[c],g=r.layer.selectAll("g."+c).data(e.showticklabels?f:[],t_),y=[];function m(t,a){t.each(function(t){var o=n.select(this),s=o.select(".text-math-group"),c=p.anchorFn(t,a),f=r.transFn.call(o.node(),t)+(i(a)&&0!=+a?" rotate("+a+","+p.xFn(t)+","+(p.yFn(t)-t.fontSize/2)+")":""),d=u.lineCount(o),v=V*t.fontSize,g=p.heightFn(t,i(a)?+a:0,(d-1)*v);if(g&&(f+=l(0,g)),s.empty()){var y=o.select("text");y.attr({transform:f,"text-anchor":c}),y.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var m=h.bBox(s.node()).width;s.attr("transform",f+l(m*({end:-.5,start:.5})[c],0))}})}g.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,p.xFn(e),p.yFn(e)).call(h.font,{family:e.font,size:e.fontSize,color:e.fontColor,weight:e.fontWeight,style:e.fontStyle,variant:e.fontVariant}).text(e.text).call(u.convertToTspans,t),t._promises[i]?y.push(t._promises.pop().then(function(){m(r,d)})):m(r,d)}),tO(e,[F]),g.exit().remove(),r.repositionOnUpdate&&g.each(function(t){n.select(this).select("text").call(u.positionText,p.xFn(t),p.yFn(t))}),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===e._id.charAt(0),l=0,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 f=Math.min(l,u),p=Math.max(l,u),d=e.side,v=1/0,y=-1/0;for(var m in g.each(function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=h.bBox(r.node()),s=0;o?a.right>p?s=1:a.leftp?s=1:a.top+(e.tickangle?0:t.fontSize/4)e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)})})})})},m(g,v+1?v:d);var x=null;e._selections&&(e._selections[c]=g);var b=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===v?(x=v,b.push(function(){m(g,v)})):b.push(function(){if(m(g,d),f.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){x=e.autotickangles[0];var t,n=0,i=[],a=1;g.each(function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),o=tk(this),s=h.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})});var o=("boundaries"===e.tickson||e.showdividers)&&!r.secondary,l=f.length,c=Math.abs((f[l-1].x-f[0].x)*e._m)/(l-1),p=o?c/2:c,v=Math.sqrt(Math.pow(p,2)+Math.pow(o?e.ticklen:1.25*n*a,2)),y=p/v,b=e.autotickangles.map(function(t){return t*Math.PI/180}),_=b.find(function(t){return Math.abs(Math.cos(t))<=y});void 0===_&&(_=b.reduce(function(t,e){return Math.abs(Math.cos(t))j*N&&(P=N,E[S]=L[S]=O[S])}var U=Math.abs(P-C);U-k>0?(U-=k,k*=1+k/U):k=0,"y"!==e._id.charAt(0)&&(k=-k),E[M]=w.p2r(w.r2p(L[M])+A*k),"min"===w.autorange||"max reversed"===w.autorange?(E[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):("max"===w.autorange||"min reversed"===w.autorange)&&(E[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[w._name+".range"]=E}var q=s.syncOrAsync(b);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)===O)&&(tT(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])1)for(i=1;i2*o}(f,e))return"date";var g="strict"!==r.autotypenumbers;return!function(t,e){for(var r=t.length,n=c(r),i=0,o=0,s={},f=0;f2*i}(f,g)?!function(t,e){for(var r,i=t.length,a=0;a=2){var s,u,c="";if(2===o.length){for(s=0;s<2;s++)if(u=_(o[s])){c=y;break}}var f=i("pattern",c);if(f===y)for(s=0;s<2;s++)(u=_(o[s]))&&(e.bounds[s]=o[s]=u-1);if(f)for(s=0;s<2;s++)switch(u=o[s],f){case y:if(!n(u)||(u=+u)!==Math.floor(u)||u<0||u>=7){e.enabled=!1;return}e.bounds[s]=o[s]=u;break;case m:if(!n(u)||(u=+u)<0||u>24){e.enabled=!1;return}e.bounds[s]=o[s]=u}if(!1===r.autorange){var h=r.range;if(h[0]h[1]){e.enabled=!1;return}}else if(o[0]>h[0]&&o[1]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)}},22416:function(t,e,r){"use strict";var n=r(38116).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var a,o,s=t.categoryarray,l=Array.isArray(s)&&s.length>0||n(s);l&&(a="array");var u=r("categoryorder",a);"array"===u&&(o=r("categoryarray")),l||"array"!==u||(u=e.categoryorder="trace"),"trace"===u?e._initialCategories=[]:"array"===u?e._initialCategories=o.slice():(o=(function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(n=0,r=[];nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}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=r.axIds,s=r.axHasImage,u=e._axisConstraintGroups=[],c=e._axisMatchGroups=[];for(_=0;_u*l)||p){for(x=0;xz&&MO&&(O=M);A/=(O-P)/(2*I),P=w.l2r(P),O=w.l2r(O),w.range=w._input.range=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 N(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.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"),U(t,e,i,a)}function U(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 V(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function q(t){O&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),O=!1)}function H(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/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 G(t,e,r,n,a){for(var o,s,l,u,c=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,v=0;v=0){o._fullLayout._deactivateShape(o);return}var s=o._fullLayout.clickmode;if(V(o),2!==r||tE||function(){if(!t._transitioningWithDuration){var e,r,n=t._context.doubleClick,i=[];ta&&(i=i.concat(J)),to&&(i=i.concat($)),ti.xaxes&&(i=i.concat(ti.xaxes)),ti.yaxes&&(i=i.concat(ti.yaxes));var a={};if("reset+autosize"===n)for(r=0,n="autosize";r-1&&S(i,o,J,$,e.id,tP),s.indexOf("event")>-1&&p.click(o,i,e.id);else if(1===r&&tE){var u,f,h=v?X:U,d="s"===v||"w"===y?0:1,g=h._name+".range["+d+"]",m=(f=Math.abs((u=h.range[d])-h.range[1-d]),"date"===h.type?u:"log"===h.type?a("."+(Math.ceil(Math.max(0,-Math.log(f)/Math.LN10))+3)+"g")(Math.pow(10,u)):a("."+String(Math.floor(Math.log(Math.abs(u))/Math.LN10)-Math.floor(Math.log(f)/Math.LN10)+4)+"g")(u)),x="left",b="middle";if(h.fixedrange)return;v?(b="n"===v?"top":"bottom","right"===h.side&&(x="right")):"e"===y&&(x="right"),o._context.showAxisRangeEntryBoxes&&n.select(tC).call(c.makeEditable,{gd:o,immediate:!0,background:o._fullLayout.paper_bgcolor,text:String(m),fill:h.tickfont?h.tickfont.color:"#444",horizontalAlign:x,verticalAlign:b}).on("edit",function(t){var e=h.d2r(t);void 0!==e&&l.call("_guiRelayout",o,g,e)})}}function tz(e,r){if(t._transitioningWithDuration)return!1;var n,i,a,o,s=Math.max(0,Math.min(te,td*e+tg)),l=Math.max(0,Math.min(tr,tv*r+ty)),u=Math.abs(s-tg),c=Math.abs(l-ty);function f(){tw="",tm.r=tm.l,tm.t=tm.b,tk.attr("d","M0,0Z")}if(tm.l=Math.min(tg,s),tm.r=Math.max(tg,s),tm.t=Math.min(ty,l),tm.b=Math.max(ty,l),tn.isSubplotConstrained)u>P||c>P?(tw="xy",u/te>c/tr?(c=u*tr/te,ty>l?tm.t=ty-c:tm.b=ty+c):(u=c*te/tr,tg>s?tm.l=tg-u:tm.r=tg+u),tk.attr("d",H(tm))):f();else if(ti.isSubplotConstrained){if(u>P||c>P){tw="xy";var h=Math.min(tm.l/te,(tr-tm.b)/tr),p=Math.max(tm.r/te,(tr-tm.t)/tr);tm.l=h*te,tm.r=p*te,tm.b=(1-h)*tr,tm.t=(1-p)*tr,tk.attr("d",H(tm))}else f()}else!to||c0){if(ti.isSubplotConstrained||!ta&&1===to.length){for(a=0;a=0?Math.min(l,.9):1/(1/Math.max(l,-.3)+3.222)));var l,u=s.l2r(i);!1!==u&&void 0!==u&&(s.range[e]=u)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}}function tV(t,e){for(var r=ti.isSubplotConstrained?({x:$,y:J})[t]:ti[t+"axes"],n=ti.isSubplotConstrained?({x:J,y:$})[t]:[],i=0;i1&&(void 0!==d.maxallowed&&tl===(d.range[0]1&&(void 0!==g.maxallowed&&tu===(g.range[0]b[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s),"sync"===e.tickmode&&(e.tickmode="auto")}return r("layer"),e}},42568:function(t,e,r){"use strict";var n=r(85024);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)}},96312:function(t,e,r){"use strict";var n=r(76808);t.exports=function(t,e,r,i){var a,o,s=e._template||{},l=e.type||s.type||"-";r("minallowed"),r("maxallowed");var u=r("range");u||i.noInsiderange||"log"===l||((a=r("insiderange"))&&(null===a[0]||null===a[1])&&(e.insiderange=!1,a=void 0),a&&(u=r("range",a)));var c=e.getAutorangeDflt(u,i),f=r("autorange",c);u&&(null===u[0]&&null===u[1]||(null===u[0]||null===u[1])&&("reversed"===f||!0===f)||null!==u[0]&&("min"===f||"max reversed"===f)||null!==u[1]&&("max"===f||"min reversed"===f))&&(u=void 0,delete e.range,e.autorange=!0,o=!0),o||(f=r("autorange",c=e.getAutorangeDflt(u,i))),f&&(n(r,f,u),("linear"===l||"-"===l)&&r("rangemode")),e.cleanRange()}},21160:function(t,e,r){"use strict";var n=r(84284).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()}},78344:function(t,e,r){"use strict";var n=r(33428),i=r(94336).E9,a=r(3400),o=a.numberFormat,s=r(38248),l=a.cleanNumber,u=a.ms2DateTime,c=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=r(39032),d=p.FP_SAFE,v=p.BADNUM,g=p.LOG_CLIP,y=p.ONEWEEK,m=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=r(79811),T=r(33816),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}t.exports=function(t,e){e=e||{};var r=t._id||"x",p=r.charAt(0);function S(e,r){if(e>0)return Math.log(e)/Math.LN10;if(!(e<=0)||!r||!t.range||2!==t.range.length)return v;var n=t.range[0],i=t.range[1];return .5*(n+i-2*g*Math.abs(n-i))}function E(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=c(e,n||t.calendar);if(o===v){if(!s(e))return v;e=+e;var l=Math.floor(10*a.mod(e+.05,1));o=c(new Date(Math.round(e-l/10)))+l/10}return o}function L(e,r,n){return u(e,r,n||t.calendar)}function C(e){return t._categories[Math.round(e)]}function P(e){if(null!=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 v}function O(e){if(t._categoriesMap)return t._categoriesMap[e]}function I(t){var e=O(t);return void 0!==e?e:s(t)?+t:void 0}function z(t){return s(t)?+t:O(t)}function D(t,e,r){return n.round(r+e*t,2)}var R=function(e){return s(e)?D(e,t._m,t._b):v},F=function(e){var r;return r=t._m,(e-t._b)/r};if(t.rangebreaks){var B="y"===p;R=function(e){if(!s(e))return v;var r=t._rangebreaks.length;if(!r)return D(e,t._m,t._b);var n=B;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lc)o=l+1;else{o=a<(u+c)/2?l:l+1;break}}var f=t._B[o]||0;return isFinite(f)?D(e,t._m2,f):0},F=function(e){var r,n,i=t._rangebreaks.length;if(!i)return r=t._m,(e-t._b)/r;for(var a=0,o=0;ot._rangebreaks[o].pmax&&(a=o+1);return n=t._m2,(e-t._B[a])/n}}t.c2l="log"===t.type?S:f,t.l2c="log"===t.type?M:f,t.l2p=R,t.p2l=F,t.c2p="log"===t.type?function(t,e){return R(S(t,e))}:R,t.p2c="log"===t.type?function(t){return M(F(t))}:F,-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=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=F,t.cleanPos=f):"log"===t.type?(t.d2r=t.d2l=function(t,e){return S(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=S,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(F(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=F,t.cleanPos=f):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=E,t.c2d=t.c2r=t.l2d=t.l2r=L,t.d2p=t.r2p=function(e,r,n){return t.l2p(E(e,0,n))},t.p2d=t.p2r=function(t,e,r){return L(F(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,v,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=P,t.r2d=t.c2d=t.l2d=C,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return C(F(t))},t.r2p=t.d2p,t.p2r=F,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:f(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=C,t.d2r=t.d2l_noadd=I,t.r2c=function(e){var r=I(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=O,t.l2r=t.c2r=f,t.r2l=I,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return C(F(t))},t.r2p=t.d2p,t.p2r=F,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:f(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 f=[[0,{}],[0,{}]],d=[];for(i=0;il[1]&&(i[s?0:1]=n),i[0]===i[1]){var u=t.l2r(r),c=t.l2r(n);if(void 0!==r){var f=u+1;void 0!==n&&(f=Math.min(f,c)),i[s?1:0]=f}if(void 0!==n){var h=c+1;void 0!==r&&(h=Math.max(h,u)),i[s?0:1]=h}}}},t.cleanRange=function(e,r){t._cleanRange(e,r),t.limitRange(e)},t._cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,o=a.nestedProperty(t,e).get();if(i=(i="date"===t.type?a.dfltRange(t.calendar):"y"===p?T.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),("tozero"===t.rangemode||"nonnegative"===t.rangemode)&&(i[0]=0),!o||2!==o.length){a.nestedProperty(t,e).set(i);return}var l=null===o[0],u=null===o[1];for("date"!==t.type||t.autorange||(o[0]=a.cleanDate(o[0],v,t.calendar),o[1]=a.cleanDate(o[1],v,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]))o[n]=o[1-n]*(n?10:.1);else{t[e]=i;break}}if(o[n]<-d?o[n]=-d:o[n]>d&&(o[n]=d),o[0]===o[1]){var f=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=f,o[1]+=f}}},t.setScale=function(r){var n,i,a=e._size;if(t.overlaying){var o=w.getFromId({_fullLayout:e},t.overlaying);t.domain=o.domain}var s=r&&t._r?"_r":"range",l=t.calendar;t.cleanRange(s);var u=t.r2l(t[s][0],l),c=t.r2l(t[s][1],l),f="y"===p;if(f?(t._offset=a.t+(1-t.domain[1])*a.h,t._length=a.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=a.l+t.domain[0]*a.w,t._length=a.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(n=0;nc&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(c-u)-t._lBreaks),t._B.push(-t._m2*(f?c:u)),n=0;ni&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=l.min&&(tl.max&&(l.max=i),o=!1)}o&&n.push({min:t,max:i})}};for(u=0;u 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)}l&&(u=l());var v=n.ease(r.easing);return t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(h),h=null,function(){for(var r={},n=0;nr.duration?(function(){for(var r={},n=0;n0&&(i["_"+r+"axes"]||{})[e]||(i[r+"axis"]||r)===e&&(o(i,r)||(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"]){t.type="linear";return}var c=l+"calendar",f=u[c],h={noMultiCategory:!n(u,"cartesian")||n(u,"noMultiCategory")};if("box"===u.type&&u._hasPreCompStats&&l===({h:"x",v:"y"})[u.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=t.autotypenumbers,o(u,l)){var p=a(u),d=[];for(r=0;r0?".":"")+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"],f=0;f0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}t.exports=function(t){return new M(t)},S.plot=function(t,e,r,n){var i=this;if(n)return i.update(t,e,!0);i._geoCalcData=t,i._fullLayout=e;var a=e[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(a,e)}if(!r){if(this.updateProjection(t,e))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(e,n),this.updateDims(e,n),this.updateFx(e,n),d.generalUpdatePerTraceModule(this.graphDiv,this,t,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,c=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,v=p._ax,y=this.projection=function(t){for(var e=t.projection,r=e.type,n=w.projNames[r],l=(i[n="geo"+u.titleCase(n)]||s[n])(),c=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=["center","rotate","parallels","clipExtent"],h=function(t){return t?l:[]},p=0;pc*Math.PI/180},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance),c&&l.clipAngle(c-w.clipPad),l}(n),m=[[l.l+l.w*c.x[0],l.t+l.h*(1-c.y[1])],[l.l+l.w*c.x[1],l.t+l.h*(1-c.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=m[1][0]-m[0][0],v._length=m[1][1]-m[0][1],d.range=g(r,d),v.range=g(r,v);var k=(d.range[0]+d.range[1])/2,A=(v.range[0]+v.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}y.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);y.fitExtent(m,C);var P=this.bounds=y.getBounds(C),O=this.fitScale=y.scale(),I=y.translate();if(n.fitbounds){var z=y.getBounds(E(d.range,v.range)),D=Math.min((P[1][0]-P[0][0])/(z[1][0]-z[0][0]),(P[1][1]-P[0][1])/(z[1][1]-z[0][1]));isFinite(D)?y.scale(D*O):u.warn("Something went wrong during"+this.id+"fitbounds computations.")}else y.scale(f.scale*O);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(y.translate([I[0]+(R[0]-I[0]),I[1]+(R[1]-I[1])]).clipExtent(P),n._isAlbersUsa){var F=y([x.lon,x.lat]),B=y.translate();y.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return"lonaxis"===t||"lataxis"===t}function l(t){return!!w.lineLayers[t]}function u(t){return!!w.fillLayers[t]}var c=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter(function(t){return l(t)||u(t)?e["show"+t]:!s(t)||e[t].showgrid}),p=r.framework.selectAll(".layer").data(c,String);p.exit().each(function(t){delete a[t],delete o[t],n.select(this).remove()}),p.enter().append("g").attr("class",function(t){return"layer "+t}).each(function(t){var e=a[t]=n.select(this);"bg"===t?r.bgRect=e.append("rect").style("pointer-events","all"):s(t)?o[t]=e.append("path").style("fill","none"):"backplot"===t?e.append("g").classed("choroplethlayer",!0):"frontplot"===t?e.append("g").classed("scatterlayer",!0):l(t)?o[t]=e.append("path").style("fill","none").style("stroke-miterlimit",2):u(t)&&(o[t]=e.append("path").style("stroke","none"))}),p.order(),p.each(function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||u(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];"lonaxis"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):"lataxis"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:"linear",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};v.setConvert(l,r);var u=v.calcTicks(l);e.isScoped||"lonaxis"!==t||u.pop();for(var c=u.length,f=Array(c),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,c),s.indexOf("event")>-1&&p.click(i,n.event))})}function f(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",i),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(h.setClipUrl,i,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:"x",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:"y",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},v.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,"projection.scale":n.scale},e=t._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:t._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},u.extendFlat(this.viewInitial,e)},S.render=function(t){this._hasMarkerAngles&&t?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?c(r[0],r[1]):null}function i(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",function(t){return r(t.geojson)});for(t in this.dataPoints)this.dataPoints[t].attr("display",i).attr("transform",n)}},10816:function(t,e,r){"use strict";var n=r(84888).KY,i=r(3400).counterRegex,a=r(43520),o=i("geo"),s={};s.geo={valType:"subplotid",dflt:"geo",editType:"calc"},t.exports={attr:"geo",name:"geo",idRoot:"geo",idRegex:o,attrRegex:o,attributes:s,layoutAttributes:r(40384),supplyLayoutDefaults:r(86920),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,o=0;o0&&z<0&&(z+=360);var D=(I+z)/2;if(!p){var R=d?f.projRotate:[D,0,0];_=r("projection.rotation.lon",R[0]),r("projection.rotation.lat",R[1]),r("projection.rotation.roll",R[2]),r("showcoastlines",!d&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}p?(w=-96.6,T=38.7):(w=d?D:_,T=(O[0]+O[1])/2),r("center.lon",w),r("center.lat",T),v&&(r("projection.tilt"),r("projection.distance")),g&&r("projection.parallels",f.projParallels||[0,60]),r("projection.scale"),r("showland",!!x&&void 0)&&r("landcolor"),r("showlakes",!!x&&void 0)&&r("lakecolor"),r("showrivers",!!x&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&"usa"!==c&&x)&&(r("countrycolor"),r("countrywidth")),("usa"===c||"north america"===c&&50===u)&&(r("showsubunits",x),r("subunitcolor"),r("subunitwidth")),!d&&r("showframe",x)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):y?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}t.exports=function(t,e,r){i(t,e,r,{type:"geo",attributes:s,handleDefaults:u,fullData:r,partition:"y"})}},79248:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(24040),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},u={cursor:"auto"};function c(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],u=o._fullLayout,c=u[n],f={},h={};function p(t,e){f[n+"."+t]=i.nestedProperty(l,t).get(),a.call("_storeDirectGUIEdit",s,u._preGUI,f);var r=i.nestedProperty(c,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",h)}function h(t,e){var r,n,i,a=t.invert(e);return a&&isFinite(a[0])&&isFinite(a[1])&&(r=a[0]*o,[(i=Math.cos(n=a[1]*o))*Math.cos(r),i*Math.sin(r),Math.sin(n)])}function p(t,e,r,n){var i=d(r-t),a=d(n-e);return Math.sqrt(i*i+a*a)}function d(t){return(t%360+540)%360-180}function v(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),u=Math.sin(n);return i[a]=t[a]*l-t[s]*u,i[s]=t[s]*l+t[a]*u,i}function g(t,e){for(var r=0,n=0,i=t.length;n(N=Math.sqrt(O*O+I*I))?(C=(R>0?90:-90)-B,k=0):(C=Math.asin(R/N)*s-B,k=Math.sqrt(N*N-R*R)),j=180-C-2*B,U=(Math.atan2(F,D)-Math.atan2(z,k))*s,V=(Math.atan2(F,D)-Math.atan2(z,-k))*s,p(T[0],T[1],C,U)<=p(T[0],T[1],j,V)?[C,U,T[2]]:[j,V,T[2]]);isFinite(G[0])&&isFinite(G[1])&&isFinite(G[2])||(G=S),e.rotate(G),S=G}}else r=h(e,A=a);t=d.of(this,arguments),t({type:"zoom"})}),k=d.of(this,arguments),y++||k({type:"zoomstart"})}).on("zoomend",function(){var r;n.select(this).style(u),m.call(a,"zoom",null),r=d.of(this,arguments),--y||r({type:"zoomend"}),f(t,e,x)}).on("zoom.redraw",function(){t.render(!0);var r=e.rotate();t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})}),n.rebind(a,d,"on")}:function(t,e){var r,i,a,o,s,h,p,d,v,g=c(t,e);function y(t){return e.invert(t)}function m(r){var n=e.rotate(),i=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return g.on("zoomstart",function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=y(r)}).on("zoom",function(){if(h=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r)){g.scale(e.scale()),g.translate(e.translate());return}e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?y(h)&&(d=y(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=y(r=h),v=!0,t.render(!0);var l=e.rotate(),u=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":u[0],"geo.center.lat":u[1],"geo.projection.rotation.lon":-l[0]})}).on("zoomend",function(){n.select(this).style(u),v&&f(t,e,m)}),g})(t,r)}},84888:function(t,e,r){"use strict";var n=r(24040),i=r(33816).SUBPLOT_PATTERN;e.KY=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;sMath.abs(s)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),u.boxEnd[1]l[3]&&(u.boxEnd[1]=l[3],u.boxEnd[0]=u.boxStart[0]+(l[3]-u.boxStart[1])/Math.abs(_))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),u.boxEnd[0]l[2]&&(u.boxEnd[0]=l[2],u.boxEnd[1]=u.boxStart[1]+(l[2]-u.boxStart[0])*Math.abs(_)))}else x&&(u.boxEnd[0]=u.boxStart[0]),b&&(u.boxEnd[1]=u.boxStart[1])}else u.boxEnabled?(a=u.boxStart[0]!==u.boxEnd[0],s=u.boxStart[1]!==u.boxEnd[1],a||s?(a&&(g(0,u.boxStart[0],u.boxEnd[0]),t.xaxis.autorange=!1),s&&(g(1,u.boxStart[1],u.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1):u.boxInited&&(u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,e?(u.panning||(u.dragStart[0]=n,u.dragStart[1]=i),Math.abs(u.dragStart[0]-n).999&&(g="turntable"):g="turntable")}else g="turntable"}r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:c,attributes:l,handleDefaults:f,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i&&n.validate(t[e],l[e]))return t[e]},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},346:function(t,e,r){"use strict";var n=r(86140),i=r(86968).u,a=r(92880).extendFlat,o=r(3400).counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(t,e,r){"use strict";var n=r(43080),i=["xaxis","yaxis","zaxis"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];if(!r.visible){this.enabled[e]=!1,this.drawSides[e]=!1;continue}this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness}},t.exports=function(t){var e=new a;return e.merge(t),e}},87152:function(t,e,r){"use strict";t.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],u=0;u<3;++u){var c=s[a[u]];if(c._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/t.dataScale[u],Math.abs(c._length)===1/0||isNaN(c._length))l[u]=[];else{c._input_range=c.range.slice(),c.range[0]=r[u].lo/t.dataScale[u],c.range[1]=r[u].hi/t.dataScale[u],c._m=1/(t.dataScale[u]*r[u].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var f=c.tickmode;if("auto"===c.tickmode){c.tickmode="linear";var h=c.nticks||i.constrain(c._length/40,4,9);n.autoTicks(c,Math.abs(c.range[1]-c.range[0])/h)}for(var p=n.calcTicks(c,{msUTC:!0}),d=0;d/g," "));l[u]=p,c.tickmode=f}}e.ticks=l;for(var u=0;u<3;++u){o[u]=.5*(t.glplot.bounds[0][u]+t.glplot.bounds[1][u]);for(var d=0;d<2;++d)e.bounds[d][u]=t.glplot.bounds[d][u]}t.contourLevels=function(t){for(var e=[,,,],r=0;r<3;++r){for(var n=t[r],i=Array(n.length),a=0;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}},!!u&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}}),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})},!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},k.render=function(){var t=this,e=t.graphDiv,r=t.svgContainer,n=t.container.getBoundingClientRect();e._fullLayout._calcInverseTransform(e);var i=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,o=n.width*i,s=n.height*a;r.setAttributeNS(null,"viewBox","0 0 "+o+" "+s),r.setAttributeNS(null,"width",o),r.setAttributeNS(null,"height",s),b(t),t.glplot.axes.update(t.axesOptions);for(var l=Object.keys(t.traces),u=null,c=t.glplot.selection,h=0;h")):"isosurface"===g.type||"volume"===g.type?(k.valueLabel=p.hoverLabelText(t._mockAxis,t._mockAxis.d2l(c.traceCoordinate[3]),g.valuehoverformat),E.push("value: "+k.valueLabel),c.textLabel&&E.push(c.textLabel),m=E.join("
")):m=c.textLabel;var L={x:c.traceCoordinate[0],y:c.traceCoordinate[1],z:c.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:T};d.appendArrayPointValue(L,_,T),g._module.eventData&&(L=_._module.eventData(L,c,_,{},T));var C={points:[L]};if(t.fullSceneLayout.hovermode){var P=[];d.loneHover({trace:_,x:(.5+.5*x[0]/x[3])*o,y:(.5-.5*x[1]/x[3])*s,xLabel:k.xLabel,yLabel:k.yLabel,zLabel:k.zLabel,text:m,name:u.name,color:d.castHoverOption(_,T,"bgcolor")||u.color,borderColor:d.castHoverOption(_,T,"bordercolor"),fontFamily:d.castHoverOption(_,T,"font.family"),fontSize:d.castHoverOption(_,T,"font.size"),fontColor:d.castHoverOption(_,T,"font.color"),nameLength:d.castHoverOption(_,T,"namelength"),textAlign:d.castHoverOption(_,T,"align"),hovertemplate:f.castOption(_,T,"hovertemplate"),hovertemplateLabels:f.extendFlat({},L,k),eventData:[L]},{container:r,gd:e,inOut_bbox:P}),L.bbox=P[0]}c.distance<5&&(c.buttons||w)?e.emit("plotly_click",C):e.emit("plotly_hover",C),this.oldEventData=C}else d.loneUnhover(r),this.oldEventData&&e.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},k.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){if(t.glplot.gl.isContextLost()){requestAnimationFrame(e);return}if(!t.initializeGLPlot()){f.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}t.plot.apply(t,t.plotArgs)};requestAnimationFrame(e)};var M=["xaxis","yaxis","zaxis"];k.plot=function(t,e,r){var n;if(this.plotArgs=[t,e,r],!this.glplot.contextLost){var i=e[this.id],a=r[this.id];this.fullLayout=e,this.fullSceneLayout=i,this.axesOptions.merge(e,i),this.spikeOptions.merge(i),this.setViewport(i),this.updateFx(i.dragmode,i.hovermode),this.camera.enableWheel=this.graphDiv._context._scrollZoom.gl3d,this.glplot.setClearColor(v(i.bgcolor)),this.setConvert(m),t?Array.isArray(t)||(t=[t]):t=[];var o=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(g=0;gu[1][g])u[0][g]=-1,u[1][g]=1;else{var P=u[1][g]-u[0][g];u[0][g]-=P/32,u[1][g]+=P/32}if(b=_(b=[u[0][g],u[1][g]],m),u[0][g]=b[0],u[1][g]=b[1],m.isReversed()){var O=u[0][g];u[0][g]=u[1][g],u[1][g]=O}}else b=m.range,u[0][g]=m.r2l(b[0]),u[1][g]=m.r2l(b[1]);u[0][g]===u[1][g]&&(u[0][g]-=1,u[1][g]+=1),c[g]=u[1][g]-u[0][g],m.range=[u[0][g],u[1][g]],m.limitRange(),this.glplot.setBounds(g,{min:m.range[0]*s[g],max:m.range[1]*s[g]})}var I=i.aspectmode;if("cube"===I)n=[1,1,1];else if("manual"===I){var z=i.aspectratio;n=[z.x,z.y,z.z]}else if("auto"===I||"data"===I){var D=[1,1,1];for(g=0;g<3;++g){var R=h[x=(m=i[M[g]]).type];D[g]=Math.pow(R.acc,1/R.count)/s[g]}n="data"===I?D:Math.max.apply(null,D)/Math.min.apply(null,D)<=4?D:[1,1,1]}else throw Error("scene.js aspectRatio was not one of the enumerated types");i.aspectratio.x=a.aspectratio.x=n[0],i.aspectratio.y=a.aspectratio.y=n[1],i.aspectratio.z=a.aspectratio.z=n[2],this.glplot.setAspectratio(i.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:i.aspectratio.x,y:i.aspectratio.y,z:i.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=i.aspectmode);var F=i.domain||null,B=e._size||null;if(F&&B){var N=this.container.style;N.position="absolute",N.left=B.l+F.x[0]*B.w+"px",N.top=B.t+(1-F.y[1])*B.h+"px",N.width=B.w*(F.x[1]-F.x[0])+"px",N.height=B.h*(F.y[1]-F.y[0])+"px"}this.glplot.redraw()}},k.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},k.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},k.setViewport=function(t){var e=t.camera;this.camera.lookAt.apply(this,[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),this.glplot.setAspectratio(t.aspectratio),"orthographic"===e.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},k.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+".camera").get(),n=!1;if(void 0===r)n=!0;else{for(var i=0;i<3;i++)for(var a=0;a<3;a++)if(!function(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}(e,r,i,a)){n=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(n=!0)}return n},k.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},k.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),u=this.isAspectChanged(t),h=l||u;if(h){var p={};l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+".camera")).get(),p[this.id+".camera"]=n),u&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+".aspectratio")).get(),p[this.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",t,s._preGUI,p),l&&(r.set(e),f.nestedProperty(s,this.id+".camera").set(e)),u&&(a.set(i),f.nestedProperty(s,this.id+".aspectratio").set(i),this.glplot.redraw())}return h},k.updateFx=function(t,e){var r=this.camera;if(r){if("orbit"===t)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===t){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var u=this.id+".camera.up",h={x:0,y:0,z:1},p={};p[u]=h;var d=n.layout;c.call("_storeDirectGUIEdit",d,i._preGUI,p),a.up=h,f.nestedProperty(d,u).set(h)}}else r.keyBindingMode=t}this.fullSceneLayout.hovermode=e},k.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e,r=this.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);r.readPixels(0,0,i,a,r.RGBA,r.UNSIGNED_BYTE,o),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l=s.getContext("2d",{willReadFrequently:!0}),u=l.createImageData(i,a);switch(u.data.set(o),l.putImageData(u,0,0),t){case"jpeg":e=s.toDataURL("image/jpeg");break;case"webp":e=s.toDataURL("image/webp");break;default:e=s.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(n),e},k.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[M[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},k.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(this._mockAxis,t)},t.exports=T},52094:function(t){"use strict";t.exports=function(t,e,r,n){for(var i=Array(n=n||t.length),a=0;aOpenStreetMap contributors',o=['\xa9 Carto',a].join(" "),s='Map tiles by Stamen Design under CC BY 3.0 | Data by OpenStreetMap contributors under ODbL',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 Stamen Design under CC BY 3.0 | Data by OpenStreetMap contributors under CC BY SA',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.\nMapbox trace type require a Mapbox access token to be registered.\nFor example:\n Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });\nMore info here: https://www.mapbox.com/help/define-access-token/",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,\nusing first token found as mapbox-gl does not allow multipleaccess tokens on the same page.",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\')'}}},89032: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}}},33688:function(t,e,r){"use strict";var n=r(3480),i=r(3400),a=i.strTranslate,o=i.strScale,s=r(84888).KY,l=r(9616),u=r(33428),c=r(43616),f=r(72736),h=r(14440),p="mapbox",d=e.constants=r(47552);function v(t){return"string"==typeof t&&(-1!==d.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://")||0===t.indexOf("stamen"))}e.name=p,e.attr="subplot",e.idRoot=p,e.idRegex=e.attrRegex=i.counterRegex(p),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[p];if(n.version!==d.requiredVersion)throw 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;l1&&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;lw/2){var T=m.split("|").join("
");b.text(T).attr("data-unformatted",T).call(f.convertToTspans,t),_=c.bBox(b.node())}b.attr("transform",a(-3,-_.height+8)),x.insert("rect",".static-attribution").attr({x:-_.width-6,y:-_.height-3,width:_.width+6,height:_.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;_.width+6>w&&(k=w/(_.width+6));var A=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];x.attr("transform",a(A[0],A[1])+o(k))}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots[p],n=0;n0){for(var r=0;r0}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,n,a,o,s=(n=t.sourcetype,a=t.source,o={type:n},"geojson"===n?r="data":"vector"===n?r="string"==typeof a?"url":"tiles":"raster"===n?(r="tiles",o.tileSize=256):"image"===n&&(r="url",o.coordinates=t.coordinates),o[r]=a,t.sourceattribution&&(o.attribution=i(t.sourceattribution)),o);e.addSource(this.idSource,s)}},l.findFollowingMapboxLayerId=function(t){if("traces"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&g(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&u.click(n,e.originalEvent)}}},b.updateFx=function(t){var e,r=this,n=r.map,a=r.gd;if(!r.isStatic){var o=t.dragmode;e=function(t,e){e.isRect?(t.range={})[r.id]=[u([e.xmin,e.ymin]),u([e.xmax,e.ymax])]:(t.lassoPoints={})[r.id]=e.map(u)};var s=r.dragOptions;r.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:r.div,gd:a,plotinfo:{id:r.id,domain:t[r.id].domain,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:e},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id}),n.off("click",r.onClickInPanHandler),h(o)||f(o)?(n.dragPan.disable(),n.on("zoomstart",r.clearOutline),r.dragOptions.prepFn=function(t,e,n){p(t,e,n,r.dragOptions,o)},l.init(r.dragOptions)):(n.dragPan.enable(),n.off("zoomstart",r.clearOutline),r.div.onmousedown=null,r.div.ontouchstart=null,r.div.removeEventListener("touchstart",r.div._ontouchstart),r.onClickInPanHandler=r.onClickInPanFn(r.dragOptions),n.on("click",r.onClickInPanHandler))}function u(t){var e=r.map.unproject(t);return[e.lng,e.lat]}},b.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])},b.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",function(){w.sendDataToCloud(t)});else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var A=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function S(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&R.length>1){for(l.getComponentMethod("grid","sizeDefaults")(h,c),n=0;n15&&R.length>15&&0===c.shapes.length&&0===c.images.length,w.linkSubplots(d,c,p,u),w.cleanPlot(d,c,p,u);var U=!!(u._has&&u._has("gl2d")),V=!!(c._has&&c._has("gl2d")),q=!!(u._has&&u._has("cartesian")),H=!!(c._has&&c._has("cartesian")),G=q||U,W=H||V;G&&!W?u._bgLayer.remove():W&&!G&&(c._shouldCreateBgLayer=!0),u._zoomlayer&&!t._dragging&&v({_fullLayout:u}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var c=1-2*s;n=Math.round(c*n),i=Math.round(c*i)}}var h=w.layoutAttributes.width.min,p=w.layoutAttributes.height.min;n1,v=!e.height&&Math.abs(r.height-i)>1;(v||d)&&(d&&(r.width=n),v&&(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 h in u.length||u.push(c),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),c.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(f.subplotSort);for(a=0;a1&&(r.l/=y,r.r/=y)}if(p){var m=(r.t+r.b)/p;m>1&&(r.t/=m,r.b/=m)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;d[e]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:T,size:r.b+g},t:{val:_,size:r.t+g}},v[e]=1}else delete d[e],delete v[e];if(!n._replotting)return w.doAutoMargin(t)}},w.doAutoMargin=function(t){var e,r=t._fullLayout,n=r.width,i=r.height;r._size||(r._size={}),C(r);var a=r._size,s=r.margin,u={t:0,b:0,l:0,r:0},c=f.extendFlat({},a),h=s.l,p=s.r,v=s.t,g=s.b,y=r._pushmargin,m=r._pushmarginIds,x=r.minreducedwidth,b=r.minreducedheight;if(!1!==s.autoexpand){for(var _ in y)m[_]||delete y[_];var T=t._fullLayout._reservedMargin;for(var k in T)for(var A in T[k]){var M=T[k][A];u[A]=Math.max(u[A],M)}for(var S in y.base={l:{val:0,size:h},r:{val:1,size:p},t:{val:1,size:v},b:{val:0,size:g}},u){var E=0;for(var L in y)"base"!==L&&o(y[L][S].size)&&(E=y[L][S].size>E?y[L][S].size:E);var P=Math.max(0,s[S]-E);u[S]=Math.max(0,u[S]-P)}for(var O in y){var I=y[O].l||{},z=y[O].b||{},D=I.val,R=I.size,F=z.val,B=z.size,N=n-u.r-u.l,j=i-u.t-u.b;for(var U in y){if(o(R)&&y[U].r){var V=y[U].r.val,q=y[U].r.size;if(V>D){var H=(R*V+(q-N)*D)/(V-D),G=(q*(1-D)+(R-N)*(1-V))/(V-D);H+G>h+p&&(h=H,p=G)}}if(o(B)&&y[U].t){var W=y[U].t.val,Y=y[U].t.size;if(W>F){var X=(B*W+(Y-j)*F)/(W-F),Z=(Y*(1-F)+(B-j)*(1-W))/(W-F);X+Z>g+v&&(g=X,v=Z)}}}}}var K=f.constrain(n-s.l-s.r,2,x),J=f.constrain(i-s.t-s.b,2,b),$=Math.max(0,n-K),Q=Math.max(0,i-J);if($){var tt=(h+p)/$;tt>1&&(h/=tt,p/=tt)}if(Q){var te=(g+v)/Q;te>1&&(g/=te,v/=te)}if(a.l=Math.round(h)+u.l,a.r=Math.round(p)+u.r,a.t=Math.round(v)+u.t,a.b=Math.round(g)+u.b,a.p=Math.round(s.pad),a.w=Math.round(n)-a.l-a.r,a.h=Math.round(i)-a.t-a.b,!r._replotting&&(w.didMarginChange(c,a)||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 r?r._redrawFromAutoMarginCount++:r._redrawFromAutoMarginCount=1;var tr=3*(1+Object.keys(m).length);if(r._redrawFromAutoMarginCount0&&(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(){o++,n||o!==a||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(i))}}r.runFn(s),setTimeout(s())})}],a=f.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then(function(){return t})}w.didMarginChange=function(t,e){for(var r=0;r1)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(f.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach(function(a){if(-1===["_","["].indexOf(a.charAt(0))){if("function"==typeof t[a]){e&&(i[a]="_function");return}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&&!f.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0)return;i[a]=c(t[a],e)}}),i}var a=Array.isArray(t),o=f.isTypedArray(t);if((a||o)&&t.dtype&&t.shape){var l=t.bdata;return c({dtype:t.dtype,shape:t.shape,bdata:f.isArrayBuffer(l)?s.encode(l):l},e)}return a?t.map(function(t){return c(t,e)}):o?f.simpleMap(t,f.identity):f.isJSDate(t)?f.ms2DateTimeLocal(+t):t}var h={data:(o||[]).map(function(t){var r=c(t);return e&&delete r.fit,r})};if(!e&&(h.layout=c(l),i)){var p=l._size;h.layout.computed={margin:{b:p.b,l:p.l,r:p.r,t:p.t}}}return u&&(h.frames=c(u)),a&&(h.config=c(t._context,!0)),"object"===n?h:JSON.stringify(h)},w.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(l[a].enabled){r._indexToPoints=l[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:p,y:p}]),o[0].t||(o[0].t={}),o[0].trace=r,h[e]=o}}for(z(o,s,c),i=0;i1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=Array(n),a=0;a0?r:1/0}),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:u,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=Math.sqrt(o*o-4*a*(i*i+r*r-t*t)),l=(-o+s)/(2*a),u=(-o-s)/(2*a);return[[l,e*l+i+n],[u,e*u+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return"M"+h(c(t,e,r,n),i,a).join("L")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){t=90||a>90&&o>=450?1:f<=0&&p<=0?0:Math.max(f,p),[a<=180&&o>=180||a>180&&o>=540?-1:s>=0&&h>=0?0:Math.min(s,h),a<=270&&o>=270||a>270&&o>=630?-1:f>=0&&p>=0?0:Math.min(f,p),o>=360?1:s<=0&&h<=0?0:Math.max(s,h),r]),C=L[2]-L[0],P=Math.abs((L[3]-L[1])/C);S/M>P?(d=M,m=(S-(v=M*P))/_.h/2,g=[k[0],k[1]],y=[A[0]+m,A[1]-m]):(d=S/P,v=S,m=(M-d)/_.w/2,g=[k[0]+m,k[1]-m],y=[A[0],A[1]]),this.xLength2=d,this.yLength2=v,this.xDomain2=g,this.yDomain2=y;var O=this.xOffset2=_.l+_.w*g[0],I=this.yOffset2=_.t+_.h*(1-y[1]),z=this.radius=d/C,F=this.innerRadius=this.getHole(e)*z,B=this.cx=O-z*L[0],N=this.cy=I+z*L[3],j=this.cxx=B-O,U=this.cyy=N-I,V=w.side;"counterclockwise"===V?(x=V,V="top"):"clockwise"===V&&(x=V,V="bottom"),this.radialAxis=this.mockAxis(t,e,w,{_id:"x",side:V,_trueSide:x,domain:[F/_.w,z/_.w]}),this.angularAxis=this.mockAxis(t,e,T,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:"x",domain:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:"y",domain:y});var q=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",q).attr("transform",l(j,U)),b.frontplot.attr("transform",l(O,I)).call(c.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),b.bg.attr("d",q).attr("transform",l(B,N)).call(u.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:"linear"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange="x"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=this.getRadial(e);v(r,n);var a=n.range;if(i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,"gregorian"),n.r2l(a[1],null,"gregorian")],void 0!==n.minallowed){var o=n.r2l(n.minallowed);n._rl[0]>n._rl[1]?n._rl[1]=Math.max(n._rl[1],o):n._rl[0]=Math.max(n._rl[0],o)}if(void 0!==n.maxallowed){var s=n.r2l(n.maxallowed);n._rl[0]90&&v<=270&&(g.tickangle=180);var x=m?function(t){var e=I(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(g.l2p(t.x)+c,0)},b=m?function(t){return O(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(g.r2p(t.x)+c)},_=j(d);if(r.radialTickLayout!==_&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),y){g.setScale();var w=0,T=m?(g.tickvals||[]).filter(function(t){return t>=0}).map(function(t){return h.tickText(g,t,!0,!1)}):h.calcTicks(g),k=m?T:h.clipEnds(g,T),A=h.getTickSigns(g)[2];m&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(A=-A),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),h.drawTicks(n,g,{vals:T,layer:i["radial-axis"],path:h.makeTickPath(g,0,A),transFn:x,crisp:!1}),h.drawGrid(n,g,{vals:k,layer:i["radial-grid"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:T,layer:i["radial-axis"],transFn:x,labelFns:h.makeLabelFns(g,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i["radial-axis"],y&&(d.showticklabels||d.ticks),{transform:E}),V(i["radial-grid"],y&&d.showgrid,{transform:m?"":S}),V(i["radial-line"].select("line"),y&&d.showline,{x1:m?-a:c,y1:0,x2:a,y2:0,transform:E}).attr("stroke-width",d.linewidth).call(u.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=this.getRadial(e),l=this.id+"title",u=0;if(s.title){var f=c.bBox(this.layers["radial-axis"].node()).height,h=s.title.font.size,p=s.side;u="top"===p?h:"counterclockwise"===p?-(f+.4*h):f+.8*h}var d=void 0!==r?r:this.radialAxisAngle,v=R(d),g=Math.cos(v),y=Math.sin(v),m=a+i/2*g+u*y,b=o-i/2*y+u*g;this.layers["radial-axis-title"]=x.draw(n,l,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:z(n,"Click to enter radial axis title"),attributes:{x:m,y:b,"text-anchor":"middle"},transform:{rotate:-d}})}},N.updateAngularAxis=function(t,e){var r,n=this,i=n.gd,a=n.layers,c=n.radius,f=n.innerRadius,p=n.cx,d=n.cy,v=n.getAngular(e),g=n.angularAxis,y=n.isSmith;y||(n.fillViewInitialKey("angularaxis.rotation",v.rotation),g.setGeometry(),g.setScale());var m=y?function(t){var e=I(n,C([0,t.x]));return Math.atan2(e[0]-p,e[1]-d)-Math.PI/2}:function(t){return g.t2g(t.x)};"linear"===g.type&&"radians"===g.thetaunit&&(g.tick0=F(g.tick0),g.dtick=F(g.dtick));var x=function(t){return l(p+c*Math.cos(t),d-c*Math.sin(t))},b=y?function(t){var e=I(n,C([0,t.x]));return l(e[0],e[1])}:function(t){return x(m(t))},_=y?function(t){var e=I(n,C([0,t.x])),r=Math.atan2(e[0]-p,e[1]-d)-Math.PI/2;return l(e[0],e[1])+s(-F(r))}:function(t){var e=m(t);return x(e)+s(-F(e))},w=y?function(t){return P(n,t.x,0,1/0)}:function(t){var e=m(t),r=Math.cos(e),n=Math.sin(e);return"M"+[p+f*r,d-f*n]+"L"+[p+c*r,d-c*n]},T=h.makeLabelFns(g,0).labelStandoff,k={};k.xFn=function(t){return Math.cos(m(t))*T},k.yFn=function(t){var e=m(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(T+t.fontSize*r)+t.fontSize*M*Math.abs(Math.cos(e))},k.anchorFn=function(t){var e=Math.cos(m(t));return .1>Math.abs(e)?"middle":e>0?"start":"end"},k.heightFn=function(t,e,r){return -.5*(1+Math.sin(m(t)))*r};var A=j(v);n.angularTickLayout!==A&&(a["angular-axis"].selectAll("."+g._id+"tick").remove(),n.angularTickLayout=A);var S=y?[1/0].concat(g.tickvals||[]).map(function(t){return h.tickText(g,t,!0,!1)}):h.calcTicks(g);if(y&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===e.gridshape?(r=S.map(m),0>o.angleDelta(r[0],r[1])&&(r=r.slice().reverse())):r=null,n.vangles=r,"category"===g.type&&(S=S.filter(function(t){return o.isAngleInsideSector(m(t),n.sectorInRad)})),g.visible){var E="inside"===g.ticks?-1:1,L=(g.linewidth||1)/2;h.drawTicks(i,g,{vals:S,layer:a["angular-axis"],path:"M"+E*L+",0h"+E*g.ticklen,transFn:_,crisp:!1}),h.drawGrid(i,g,{vals:S,layer:a["angular-grid"],path:w,transFn:o.noop,crisp:!1}),h.drawLabels(i,g,{vals:S,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:b,labelFns:k})}V(a["angular-line"].select("path"),v.showline,{d:n.pathSubplot(),transform:l(p,d)}).attr("stroke-width",v.linewidth).call(u.stroke,v.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(this.isSmith||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s,u,c,f,h,p,d,v,x,T=this,k=T.isSmith,A=T.gd,M=T.layers,L=t._zoomlayer,C=S.MINZOOM,P=S.OFFEDGE,O=T.radius,I=T.innerRadius,z=T.cx,D=T.cy,R=T.cxx,F=T.cyy,B=T.sectorInRad,N=T.vangles,j=T.radialAxis,U=E.clampTiny,V=E.findXYatLength,q=E.findEnclosingVertexAngles,H=S.cornerHalfWidth,G=S.cornerLen/2,W=g.makeDragger(M,"path","maindrag",!1===t.dragmode?"none":"crosshair");n.select(W).attr("d",T.pathSubplot()).attr("transform",l(z,D)),W.onmousemove=function(t){m.hover(A,t,T.id),A._fullLayout._lasthover=W,A._fullLayout._hoversubplot=T.id},W.onmouseout=function(t){A._dragging||y.unhover(A,t)};var Y={element:W,gd:A,subplot:T.id,plotinfo:{id:T.id,xaxis:T.xaxis,yaxis:T.yaxis},xaxes:[T.xaxis],yaxes:[T.yaxis]};function X(t,e){return Math.sqrt(t*t+e*e)}function Z(t,e){return Math.atan2(F-e,t-R)}function K(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function J(t,e){if(0===t)return T.pathSector(2*H);var r=G/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,O)),o=a-H,s=a+H;return"M"+K(o,n)+"A"+[o,o]+" 0,0,0 "+K(o,i)+"L"+K(s,i)+"A"+[s,s]+" 0,0,1 "+K(s,n)+"Z"}function $(t,e,r){if(0===t)return T.pathSector(2*H);var n,i,a,o,s=K(t,e),l=K(t,r),u=U((s[0]+l[0])/2),c=U((s[1]+l[1])/2);if(u&&c){var f=c/u,h=-1/f,p=V(H,f,u,c);n=V(G,h,p[0][0],p[0][1]),i=V(G,h,p[1][0],p[1][1])}else c?(a=G,o=H):(a=H,o=G),n=[[u-a,c-o],[u+a,c-o]],i=[[u-a,c+o],[u+a,c+o]];return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function Q(t,e){return(e=Math.max(Math.min(e,O),I),tC)?(t-1&&1===t&&_(e,A,[T.xaxis],[T.yaxis],T.id,Y),r.indexOf("event")>-1&&m.click(A,e,T.id)}Y.prepFn=function(t,n,a){var l=A._fullLayout.dragmode,y=W.getBoundingClientRect();A._fullLayout._calcInverseTransform(A);var m=A._fullLayout._invTransform;e=A._fullLayout._invScaleX,r=A._fullLayout._invScaleY;var _=o.apply3DTransform(m)(n-y.left,a-y.top);if(s=_[0],u=_[1],N){var M=E.findPolygonOffset(O,B[0],B[1],N);s+=R+M[0],u+=F+M[1]}switch(l){case"zoom":Y.clickFn=to,k||(N?Y.moveFn=tn:Y.moveFn=te,Y.doneFn=ti,c=null,f=null,h=T.pathSubplot(),p=!1,d=i(A._fullLayout[T.id].bgcolor).getLuminance(),(v=g.makeZoombox(L,d,z,D,h)).attr("fill-rule","evenodd"),x=g.makeCorners(L,z,D),w(A));break;case"select":case"lasso":b(t,n,a,Y,l)}},y.init(Y)},N.updateRadialDrag=function(t,e,r){var i,u,c,f,h,p,d=this,v=d.gd,m=d.layers,x=d.radius,b=d.innerRadius,_=d.cx,T=d.cy,M=d.radialAxis,E=S.radialDragBoxSize,L=E/2;if(M.visible){var C=R(d.radialAxisAngle),P=M._rl,O=P[0],I=P[1],z=P[r],D=.75*(P[1]-P[0])/(1-d.getHole(e))/x;r?(i=_+(x+L)*Math.cos(C),u=T-(x+L)*Math.sin(C),c="radialdrag"):(i=_+(b-L)*Math.cos(C),u=T-(b-L)*Math.sin(C),c="radialdrag-inner");var B=g.makeRectDragger(m,c,"crosshair",-L,-L,E,E),N={element:B,gd:v};!1===t.dragmode&&(N.dragmode=!1),V(n.select(B),M.visible&&b0!=(r?p>O:pr?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(o(n)?n:0)+a},t.g2c=function(r){return t.l2c(r+e-a)},t.g2p=function(t){return t*i},t.c2p=function(e){return t.g2p(t.c2g(e))}};break;case"angularaxis":(function(t,e){var r=t.type;if("linear"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){var r;return r=i(t),"degrees"===e?a(r):r},t.c2d=function(t,e){return s("degrees"===e?o(t):t)}}t.makeCalcdata=function(e,r){var n,i,a=e[r],o=e._length,s=function(r){return t.d2c(r,e.thetaunit)};if(a)for(i=0,n=Array(o);i0?1:0}function r(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function n(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}t.exports={smith:r,reactanceArc:function(t,e,i,a){var o=n(t,r([i,e])),s=o[0],l=o[1],u=n(t,r([a,e])),c=u[0],f=u[1];if(0===e)return["M"+s+","+l,"L"+c+","+f].join(" ");var h=1/Math.abs(e)*t.radius;return["M"+s+","+l,"A"+h+","+h+" 0 0,"+(e<0?1:0)+" "+c+","+f].join(" ")},resistanceArc:function(t,i,a,o){var s=1/(i+1)*t.radius,l=n(t,r([i,a])),u=l[0],c=l[1],f=n(t,r([i,o])),h=f[0],p=f[1];if(e(a)!==e(o)){var d=n(t,r([i,0]));return["M"+u+","+c,"A"+s+","+s+" 0 0,"+(00){for(var n=[],i=0;i=m&&(b.min=0,_.min=0,w.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}t.exports=function(t,e,r){o(t,e,r,{type:"ternary",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},24696:function(t,e,r){"use strict";var n=r(33428),i=r(49760),a=r(24040),o=r(3400),s=o.strTranslate,l=o._,u=r(76308),c=r(43616),f=r(78344),h=r(92880).extendFlat,p=r(7316),d=r(54460),v=r(86476),g=r(93024),y=r(72760),m=y.freeMode,x=y.rectMode,b=r(81668),_=r(22676).prepSelect,w=r(22676).selectOnClick,T=r(22676).clearOutline,k=r(22676).clearSelectionsCache,A=r(33816);function M(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=y*i/x,l=m*a/b,r=e.l+e.w*v-i/2,n=e.t+e.h*(1-g)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:"linear",range:[w+2*k-_,_-w-2*T],domain:[v-o/2,v+o/2],_id:"x"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[w,_-T-k],domain:[g-l/2,g+l/2],_id:"y"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:"free",position:0,_id:"y",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:"free",position:0,_id:"y",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDef.select("path").attr("d",C),p.layers.plotbg.select("path").attr("d",C);var P="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDefRelative.select("path").attr("d",P);var O=s(r,n);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",O),p.clipDefRelative.select("path").attr("transform",null);var I=s(r-S._offset,n+a);p.layers.baxis.attr("transform",I),p.layers.bgrid.attr("transform",I);var z=s(r+i/2,n)+"rotate(30)"+s(0,-M._offset);p.layers.aaxis.attr("transform",z),p.layers.agrid.attr("transform",z);var D=s(r+i/2,n)+"rotate(-30)"+s(0,-L._offset);p.layers.caxis.attr("transform",D),p.layers.cgrid.attr("transform",D),p.drawAxes(!0),p.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",L.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),c.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+"title",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0)),u=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;n["a-title"]=b.draw(e,"a"+r,{propContainer:i,propName:this.id+".aaxis.title",placeholder:l(e,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,"text-anchor":"middle"}}),n["b-title"]=b.draw(e,"b"+r,{propContainer:a,propName:this.id+".baxis.title",placeholder:l(e,"Click to enter Component B title"),attributes:{x:this.x0-u,y:this.y0+this.h+.83*a.title.font.size+u,"text-anchor":"middle"}}),n["c-title"]=b.draw(e,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:l(e,"Click to enter Component C title"),attributes:{x:this.x0+this.w+u,y:this.y0+this.h+.83*o.title.font.size+u,"text-anchor":"middle"}})}},S.drawAx=function(t){var e=this.graphDiv,r=t._name,n=r.charAt(0),i=t._id,a=this.layers[r],s=n+"tickLayout",l=t.ticks+String(t.ticklen)+String(t.showticklabels);this[s]!==l&&(a.selectAll("."+i+"tick").remove(),this[s]=l),t.setScale();var u=d.calcTicks(t),c=d.clipEnds(t,u),f=d.makeTransTickFn(t),h=d.getTickSigns(t)[2],p=o.deg2rad(30),v=h*(t.linewidth||1)/2,g=h*t.ticklen,y=this.w,m=this.h;d.drawTicks(e,t,{vals:"inside"===t.ticks?c:u,layer:a,path:"b"===n?"M0,"+v+"l"+Math.sin(p)*g+","+Math.cos(p)*g:"M"+v+",0l"+Math.cos(p)*g+","+-Math.sin(p)*g,transFn:f,crisp:!1}),d.drawGrid(e,t,{vals:c,layer:this.layers[n+"grid"],path:{a:"M0,0l"+m+",-"+y/2,b:"M0,0l-"+y/2+",-"+m,c:"M0,0l-"+m+","+y/2}[n],transFn:f,crisp:!1}),d.drawLabels(e,t,{vals:u,layer:a,transFn:f,labelFns:d.makeLabelFns(t,0,30)})};var L=A.MINZOOM/2+.87,C="m-0.87,.5h"+L+"v3h-"+(L+5.2)+"l"+(L/2+2.6)+",-"+(.87*L+4.5)+"l2.6,1.5l-"+L/2+","+.87*L+"Z",P="m0.87,.5h-"+L+"v3h"+(L+5.2)+"l-"+(L/2+2.6)+",-"+(.87*L+4.5)+"l-2.6,1.5l"+L/2+","+.87*L+"Z",O="m0,1l"+L/2+","+.87*L+"l2.6,-1.5l-"+(L/2+2.6)+",-"+(.87*L+4.5)+"l-"+(L/2+2.6)+","+(.87*L+4.5)+"l2.6,1.5l"+L/2+",-"+.87*L+"Z",I=!0;function z(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,y,b,T,k,M=this,S=M.layers.plotbg.select("path").node(),L=M.graphDiv,D=L._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+".aaxis.min"]=t.a,e[M.id+".baxis.min"]=t.b,e[M.id+".caxis.min"]=t.c,e}function F(t,e){var r=L._fullLayout.clickmode;z(L),2===t&&(L.emit("plotly_doubleclick",null),a.call("_guiRelayout",L,R({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&g.click(L,e,M.id)}function B(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function N(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function j(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,1-n/M.h,1-s/M.h)),u=Math.max(0,Math.min(1,B(r,n),B(o,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),v=(l/2+c)*M.w,g=(1-l/2-u)*M.w,m=(v+g)/2,x=g-v,_=(1-l)*M.h,w=_-x/E;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),k.transition().style("opacity",1).duration(200),b=!0),L.emit("plotly_relayouting",R(p))}function U(){z(L),p!==f&&(a.call("_guiRelayout",L,R(p)),I&&L.data&&L._context.showTips&&(o.notifier(l(L,"Double-click to zoom back out"),"long"),I=!1))}function V(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a={a:i.indexOf(p.a),b:i.indexOf(p.b),c:i.indexOf(p.c)};i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a.a],b:i[a.b],c:i[a.c]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var l=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",l);var u=s(-t,-e);M.clipDefRelative.select("path").attr("transform",u),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,M),L.emit("plotly_relayouting",R(p))}function q(){a.call("_guiRelayout",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,c){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var v,g,w,A=M.dragOptions.dragmode=L._fullLayout.dragmode;m(A)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,"zoom"===A?(M.dragOptions.moveFn=j,M.dragOptions.clickFn=F,M.dragOptions.doneFn=U,r=l-(v=S.getBoundingClientRect()).left,n=c-v.top,L._fullLayout._calcInverseTransform(L),g=L._fullLayout._invTransform,r=(w=o.apply3DTransform(g)(r,n))[0],n=w[1],p=f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),y="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,T=D.append("path").attr("class","zoombox").attr("transform",s(M.x0,M.y0)).style({fill:d>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",y),k=D.append("path").attr("class","zoombox-corners").attr("transform",s(M.x0,M.y0)).style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),M.clearOutline(L)):"pan"===A?(M.dragOptions.moveFn=V,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,p=f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},M.clearOutline(L)):(x(A)||m(A))&&_(a,l,c,M.dragOptions,A)}},S.onmousemove=function(t){g.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||v.unhover(L,t)},v.init(this.dragOptions)}},24040:function(t,e,r){"use strict";var n=r(24248),i=r(16628),a=r(52416),o=r(63620),s=r(52200).addStyleRule,l=r(92880),u=r(45464),c=r(64859),f=l.extendFlat,h=l.extendDeepAll;function p(t){if(t.layoutAttributes){var r=t.layoutAttributes._arrayAttrRegexps;if(r)for(var n=0;n-1&&(c[h[r]].title={text:""});for(r=0;r")?"":h.html(t).text()}),h.remove(),A=(A=(A=p).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(A=(A=(A=A.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),A}},84664:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){for(var r=0;rf+u||!n(c))}for(var p=0;p=0)return t}else if("string"==typeof t&&"%"===(t=t.trim()).slice(-1)&&n(t.slice(0,-1))&&(t=+t.slice(0,-1))>=0)return t+"%"}function d(t,e,r,n,a,o){var s=!1!==(o=o||{}).moduleHasSelected,l=!1!==o.moduleHasUnselected,u=!1!==o.moduleHasConstrain,c=!1!==o.moduleHasCliponaxis,f=!1!==o.moduleHasTextangle,p=!1!==o.moduleHasInsideanchor,d=!!o.hasPathbar,v=Array.isArray(a)||"auto"===a,g=v||"inside"===a,y=v||"outside"===a;if(g||y){var m=h(n,"textfont",r.font),x=i.extendFlat({},m),b=!(t.textfont&&t.textfont.color);if(b&&delete x.color,h(n,"insidetextfont",x),d){var _=i.extendFlat({},m);b&&delete _.color,h(n,"pathbar.textfont",_)}y&&h(n,"outsidetextfont",m),s&&n("selected.textfont.color"),l&&n("unselected.textfont.color"),u&&n("constraintext"),c&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}g&&p&&n("insidetextanchor")}t.exports={supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,f,r,n)}if(!s(t,e,n,c)){e.visible=!1;return}l(t,e,n,c),c("xhoverformat"),c("yhoverformat"),c("zorder"),c("orientation",e.x&&!e.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var h=c("textposition");d(t,e,n,c,h,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u(t,e,c,r,n);var p=(e.marker.line||{}).color,v=o.getComponentMethod("errorbars","supplyDefaults");v(t,e,p||a.defaultLine,{axis:"y"}),v(t,e,p||a.defaultLine,{axis:"x",inherit:"y"}),i.coerceSelectionMarkerOpacity(e,c)},crossTraceDefaults:function(t,e){var r,n;function a(t,e){return i.coerce(n._input,n,f,t,e)}for(var o=0;oa))return e}return void 0!==r?r:t.dflt},e.coerceColor=function(t,e,r){return i(e).isValid()?e:void 0!==r?r:t.dflt},e.coerceEnumerated=function(t,e,r){return(t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e))?e:void 0!==r?r:t.dflt},e.getValue=function(t,e){var r;return a(t)?e0?e+=r:c<0&&(e-=r)}return e}function I(t){var e=c,r=t.b,i=O(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var z=t[f+"a"],D=t[h+"a"];v=Math.abs(z.r2c(z.range[1])-z.r2c(z.range[0]));var R=n.getDistanceFunction(i,p,d,function(t){return(p(t)+d(t))/2});if(n.getClosest(g,R,t),!1!==t.index&&g[t.index].p!==u){x||T||(E=function(t){return Math.min(k(t),t.p-m.bargroupwidth/2)},L=function(t){return Math.max(A(t),t.p+m.bargroupwidth/2)});var F,B,N,j=g[t.index],U=y.base?j.b+j.s:j.s;t[h+"0"]=t[h+"1"]=D.c2p(j[h],!0),t[h+"LabelVal"]=U;var V=m.extents[m.extents.round(j.p)];t[f+"0"]=z.c2p(x?E(j):V[0],!0),t[f+"1"]=z.c2p(x?L(j):V[1],!0);var q=void 0!==j.orig_p;return t[f+"LabelVal"]=q?j.orig_p:j.p,t.labelLabel=l(z,t[f+"LabelVal"],y[f+"hoverformat"]),t.valueLabel=l(D,t[h+"LabelVal"],y[h+"hoverformat"]),t.baseLabel=l(D,j.b,y[h+"hoverformat"]),t.spikeDistance=(F=c,B=j.b,N=O(j),(n.inbox(B-F,N-F,w+(N-F)/(N-B)-1)+C(k(j),A(j),w))/2),t[f+"Spike"]=z.c2p(j.p,!0),o(j,y,t),t.hovertemplate=y.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}t.exports={hoverPoints:function(t,e,r,n,a){var o=c(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,u=s[o.index];return o.color=f(l,u),i.getComponentMethod("errorbars","hoverInfo")(u,l,o),[o]}},hoverOnBars:c,getTraceColor:f}},51132:function(t,e,r){"use strict";t.exports={attributes:r(20832),layoutAttributes:r(39324),supplyDefaults:r(31508).supplyDefaults,crossTraceDefaults:r(31508).crossTraceDefaults,supplyLayoutDefaults:r(37156),calc:r(71820),crossTraceCalc:r(96376).crossTraceCalc,colorbar:r(5528),arraysToCalcdata:r(84664),plot:r(98184).plot,style:r(60100).style,styleOnSelect:r(60100).styleOnSelect,hoverPoints:r(63400).hoverPoints,eventData:r(52160),selectPoints:r(45784),moduleType:"trace",name:"bar",basePlotModule:r(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(t){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(t,e,r){"use strict";var n=r(24040),i=r(54460),a=r(3400),o=r(39324),s=r(31508).validateCornerradius;t.exports=function(t,e,r){function l(r,n){return a.coerce(t,e,o,r,n)}for(var u=!1,c=!1,f=!1,h={},p=l("barmode"),d=0;d0}function A(t,e,r,n,i){return!(t<0)&&!(e<0)&&(r<=t&&n<=e||r<=e&&n<=t||(i?t>=e/n*r:e>=t/r*n))}function M(t){return"auto"===t?0:t}function S(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function E(t,e,r,n,i,a){var o,s,l=!!a.isHorizontal,u=!!a.constrained,c=a.angle||0,f=a.anchor,h="end"===f,p="start"===f,d=((a.leftToRight||0)+1)/2,v=1-d,g=a.hasB,y=a.r,m=a.overhead,x=i.width,b=i.height,w=Math.abs(e-t),T=Math.abs(n-r),k=w>2*_&&T>2*_?_:0;w-=2*k,T-=2*k;var A=M(c);"auto"===c&&!(x<=w&&b<=T)&&(x>w||b>T)&&(!(x>T||b>w)||x_){var L,C,P,O,I,z,D,R,F=(I=Math.max(0,Math.abs(e-t)-2*_),z=Math.max(0,Math.abs(n-r)-2*_),D=y-_,R=m?D-Math.sqrt(D*D-(D-m)*(D-m)):D,E.y/E.x>=z/(I-(g?2*D:l?D-m:2*R))?P=z/E.y:E.y/E.x<=(z-(g?2*D:l?2*R:D-m))/I?P=I/E.x:!g&&l?(L=E.x*E.x+E.y*E.y/4,P=(-(C=-2*E.x*(I-D)-E.y*(z/2-D))+Math.sqrt(C*C-4*L*((I-D)*(I-D)+(z/2-D)*(z/2-D)-D*D)))/(2*L)):g?(L=(E.x*E.x+E.y*E.y)/4,P=(-(C=-E.x*(I/2-D)-E.y*(z/2-D))+Math.sqrt(C*C-4*L*((I/2-D)*(I/2-D)+(z/2-D)*(z/2-D)-D*D)))/(2*L)):(L=E.x*E.x/4+E.y*E.y,P=(-(C=-E.x*(I/2-D)-2*E.y*(z-D))+Math.sqrt(C*C-4*L*((I/2-D)*(I/2-D)+(z-D)*(z-D)-D*D)))/(2*L)),P=Math.min(1,P),O=l?Math.max(0,D-Math.sqrt(Math.max(0,D*D-(D-(z-E.y*P)/2)*(D-(z-E.y*P)/2)))-m):Math.max(0,D-Math.sqrt(Math.max(0,D*D-(D-(I-E.x*P)/2)*(D-(I-E.x*P)/2)))-m),{scale:P,pad:O});o=F.scale,s=F.pad}else o=1,u&&(o=Math.min(1,w/E.x,T/E.y)),s=0;var B=i.left*v+i.right*d,N=(i.top+i.bottom)/2,j=(t+_)*v+(e-_)*d,U=(r+n)/2,V=0,q=0;if(p||h){var H=(l?E.x:E.y)/2;y&&(h||g)&&(k+=s);var G=l?ts.opacity(I)||k>.01?J:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?J(t):t>e?Math.ceil(t):Math.floor(t)};t._context.staticPlot||(G=$(G,W,N),W=$(W,G,N),Y=$(Y,X,!N),X=$(X,Y,!N));var Q=N?L.c2p:C.c2p;z=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var tt=R||D?function(t,e){if(!t)return 0;var r=N?Math.abs(X-Y):Math.abs(W-G),n=N?Math.abs(W-G):Math.abs(X-Y),i=$(Math.abs(Q(z,!0)-Q(0,!0))),a=u.hasB?Math.min(r/2,n/2):Math.min(r/2,i);return $(Math.max(Math.min("%"===e?Math.min(50,t)/100*r:t,a),0))}(p.cornerradiusvalue,p.cornerradiusform):0,te="M"+G+","+Y+"V"+X+"H"+W+"V"+Y+"Z",tr=0;if(tt&&u.s){var tn,ti,ta,to,ts,tl,tu,tc=0==((ts=u.s0)>0)-(ts<0)||((tl=u.s)>0)-(tl<0)==((tu=u.s0)>0)-(tu<0)?u.s1:u.s0;if((tr=$(u.hasB?0:Math.abs(Q(z,!0)-Q(tc,!0))))0?Math.sqrt(tr*(2*tt-tr)):0,tg=tf>0?Math.max:Math.min;U="M"+G+","+Y+"V"+(X-td*th)+"H"+tg(W-(tt-tr)*tf,G)+"A "+tt+","+tt+" 0 0 "+tp+" "+W+","+(X-tt*th-tv)+"V"+(Y+tt*th+tv)+"A "+tt+","+tt+" 0 0 "+tp+" "+tg(W-(tt-tr)*tf,G)+","+(Y+td*th)+"Z"}}else if(u.hasB)U="M"+(G+tt*tf)+","+Y+"A "+tt+","+tt+" 0 0 "+tp+" "+G+","+(Y+tt*th)+"V"+(X-tt*th)+"A "+tt+","+tt+" 0 0 "+tp+" "+(G+tt*tf)+","+X+"H"+(W-tt*tf)+"A "+tt+","+tt+" 0 0 "+tp+" "+W+","+(X-tt*th)+"V"+(Y+tt*th)+"A "+tt+","+tt+" 0 0 "+tp+" "+(W-tt*tf)+","+Y+"Z";else{var ty=(V=Math.abs(X-Y)+tr)0?Math.sqrt(tr*(2*tt-tr)):0,tx=th>0?Math.max:Math.min;U="M"+(G+ty*tf)+","+Y+"V"+tx(X-(tt-tr)*th,Y)+"A "+tt+","+tt+" 0 0 "+tp+" "+(G+tt*tf-tm)+","+X+"H"+(W-tt*tf+tm)+"A "+tt+","+tt+" 0 0 "+tp+" "+(W-ty*tf)+","+tx(X-(tt-tr)*th,Y)+"V"+Y+"Z"}}else U=te}else U=te;var tb=T(a.ensureSingle(q,"path"),P,g,y);if(tb.style("vector-effect",O?"none":"non-scaling-stroke").attr("d",isNaN((W-G)*(X-Y))||Z&&t._context.staticPlot?"M0,0Z":U).call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&j){var t_=l.makePointStyleFns(f);l.singlePointStyle(u,tb,f,t_,t)}(function(t,e,r,n,i,s,u,f,p,g,y,w,k){var L,C,P,O,I,z,D,R,F,B,N,j,U,V,q,H,G,W,Y,X,Z,K,J,$,Q=e.xaxis,tt=e.yaxis,te=t._fullLayout;function tr(e,r,n){return a.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+tw,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t)}var tn=n[0].trace,ti="h"===tn.orientation,ta=(tx=(tb=n[0].trace).texttemplate?function(t,e,r,n,i){var o,s,l,u,f,h=e[0].trace,p=a.castOption(h,r,"texttemplate");if(!p)return"";var d="histogram"===h.type,v="waterfall"===h.type,g="funnel"===h.type,y="h"===h.orientation;function m(t){return c(f,f.c2l(t),!0).text}y?(s="y",l=i,u="x",f=n):(s="x",l=n,u="y",f=i);var x=e[r],_={};_.label=x.p,_.labelLabel=_[s+"Label"]=(o=x.p,c(l,l.c2l(o),!0).text);var w=a.castOption(h,x.i,"text");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[u+"Label"]=m(x.s);var T={};b(T,h,x.i),(d||void 0===T.x)&&(T.x=y?_.value:_.label),(d||void 0===T.y)&&(T.y=y?_.label:_.value),(d||void 0===T.xLabel)&&(T.xLabel=y?_.valueLabel:_.labelLabel),(d||void 0===T.yLabel)&&(T.yLabel=y?_.labelLabel:_.valueLabel),v&&(_.delta=+x.rawS||x.s,_.deltaLabel=m(_.delta),_.final=x.v,_.finalLabel=m(_.final),_.initial=_.final-_.delta,_.initialLabel=m(_.initial)),g&&(_.value=x.s,_.valueLabel=m(_.value),_.percentInitial=x.begR,_.percentInitialLabel=a.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=a.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=a.formatPercent(x.sumR));var k=a.castOption(h,x.i,"customdata");return k&&(_.customdata=k),a.texttemplateString(p,_,t._d3locale,T,_,h._meta||{})}(te,n,i,Q,tt):tb.textinfo?function(t,e,r,n){var i,o=t[0].trace,s="h"===o.orientation,l="waterfall"===o.type,u="funnel"===o.type;function f(t){return c(s?r:n,+t,!0).text}var h=o.textinfo,p=t[e],d=h.split("+"),v=[],g=function(t){return -1!==d.indexOf(t)};if(g("label")&&v.push(c(s?n:r,t[e].p,!0).text),g("text")&&(0===(i=a.castOption(o,p.i,"text"))||i)&&v.push(i),l){var y=+p.rawS||p.s,m=p.v;g("initial")&&v.push(f(m-y)),g("delta")&&v.push(f(y)),g("final")&&v.push(f(m))}if(u){g("value")&&v.push(f(p.s));var x=0;g("percent initial")&&x++,g("percent previous")&&x++,g("percent total")&&x++;var b=x>1;g("percent initial")&&(i=a.formatPercent(p.begR),b&&(i+=" of initial"),v.push(i)),g("percent previous")&&(i=a.formatPercent(p.difR),b&&(i+=" of previous"),v.push(i)),g("percent total")&&(i=a.formatPercent(p.sumR),b&&(i+=" of total"),v.push(i))}return v.join("
")}(n,i,Q,tt):v.getValue(tb.text,i),v.coerceString(m,tx));t_=v.getValue(tn.textposition,i),tw=v.coerceEnumerated(x,t_);var to="stack"===w.mode||"relative"===w.mode,ts=n[i],tl=!to||ts._outmost,tu=ts.hasB,tc=g&&g-y>_;if(!ta||"none"===tw||(ts.isBlank||s===u||f===p)&&("auto"===tw||"inside"===tw)){r.select("text").remove();return}var tf=te.font,th=d.getBarColor(n[i],tn),tp=d.getInsideTextFont(tn,i,tf,th),td=d.getOutsideTextFont(tn,i,tf),tv=tn.insidetextanchor||"end",tg=r.datum();ti?"log"===Q.type&&tg.s0<=0&&(s=Q.range[0]0&&tM>0;tE=tc?tu?A(ty-2*g,tm,tA,tM,ti)||A(ty,tm-2*g,tA,tM,ti):ti?A(ty-(g-y),tm,tA,tM,ti)||A(ty,tm-2*(g-y),tA,tM,ti):A(ty,tm-(g-y),tA,tM,ti)||A(ty-2*(g-y),tm,tA,tM,ti):A(ty,tm,tA,tM,ti),tL&&tE?tw="inside":(tw="outside",tT.remove(),tT=null)}else tw="inside"}if(!tT){var tC=(tT=tr(r,ta,tS=a.ensureUniformFontSize(t,"outside"===tw?td:tp))).attr("transform");if(tT.attr("transform",""),tA=(tk=l.bBox(tT.node())).width,tM=tk.height,tT.attr("transform",tC),tA<=0||tM<=0){tT.remove();return}}var tP=tn.textangle;($="outside"===tw?(L=s,C=f,P=tk,z=!!(O={isHorizontal:ti,constrained:"both"===tn.constraintext||"outside"===tn.constraintext,angle:tP}).isHorizontal,D=!!O.constrained,R=O.angle||0,F=P.width,B=P.height,N=Math.abs(u-L),j=Math.abs(p-C),I=z?j>2*_?_:0:N>2*_?_:0,U=1,D&&(U=z?Math.min(1,j/B):Math.min(1,N/F)),q=S(P,V=M(R)),H=(z?q.x:q.y)/2,G=(P.left+P.right)/2,W=(P.top+P.bottom)/2,Y=(L+u)/2,X=(C+p)/2,Z=0,K=0,J=z?u1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(e){d(n.select(this),e[0].trace,t)}),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:v,styleOnSelect:function(t,e,r){var i=e[0].trace;i.selectedpoints?(a.selectedPointStyle(r.selectAll("path"),i),function(t,e,r){t.each(function(t){var i,s=n.select(this);if(t.selected){i=o.ensureUniformFontSize(r,g(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)})}(r.selectAll("text"),i,t)):(d(r,i,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:x,getBarColor:_,resizeText:l}},55592:function(t,e,r){"use strict";var n=r(76308),i=r(94288).hasColorscale,a=r(27260),o=r(3400).coercePattern;t.exports=function(t,e,r,s,l){var u=r("marker.color",s),c=i(t,"marker");c&&a(t,e,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",u,c),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(t,e,r){"use strict";var n=r(33428),i=r(3400);function a(t){return"_"+t+"Text_minsize"}t.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=oh.range[1]&&(x+=Math.PI),n.getClosest(u,function(t){return v(m,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?g+Math.min(1,Math.abs(t.thetag1-t.thetag0)/y)-1+(t.rp1-m)/(t.rp1-t.rp0)-1:1/0},t),!1!==t.index){var b=u[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,c,t),s(_,c,f,t),t.hovertemplate=c.hovertemplate,t.color=a(c,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign="left"),[t]}}},94456:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"barpolar",basePlotModule:r(40872),categories:["polar","bar","showLegend"],attributes:r(78100),layoutAttributes:r(9320),supplyDefaults:r(70384),supplyLayoutDefaults:r(89580),calc:r(47056).calc,crossTraceCalc:r(47056).crossTraceCalc,plot:r(42040),colorbar:r(5528),formatLabels:r(22852),style:r(60100).style,styleOnSelect:r(60100).styleOnSelect,hoverPoints:r(68896),selectPoints:r(45784),meta:{}}},9320:function(t){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(t,e,r){"use strict";var n=r(3400),i=r(9320);t.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l0?(o=n,c=i):(o=i,c=n);var o,c,f=s.findEnclosingVertexAngles(o,e.vangles)[0],h=s.findEnclosingVertexAngles(c,e.vangles)[1],p=[f,(o+c)/2,h];return s.pathPolygonAnnulus(t,r,o,c,p,l,u)}:function(t,e,r,n){return a.pathAnnulus(t,e,r,n,l,u)}),g=e.layers.frontplot.select("g.barlayer");a.makeTraceGroups(g,r,"trace bars").each(function(){var r=n.select(this),s=a.ensureSingle(r,"g","points").selectAll("g.point").data(a.identity);s.enter().append("g").style("vector-effect",c?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each(function(t){var e,r=n.select(this),o=t.rp0=p.c2p(t.s0),s=t.rp1=p.c2p(t.s1),l=t.thetag0=d.c2g(t.p0),u=t.thetag1=d.c2g(t.p1);if(i(o)&&i(s)&&i(l)&&i(u)&&o!==s&&l!==u){var c=p.c2g(t.s1),g=(l+u)/2;t.ct=[f.c2p(c*Math.cos(g)),h.c2p(c*Math.sin(g))],e=v(o,s,l,u)}else e="M0,0Z";a.ensureSingle(r,"path").attr("d",e)}),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)})}},63188:function(t,e,r){"use strict";var n=r(98304),i=r(52904),a=r(20832),o=r(22548),s=r(29736).axisHoverFormat,l=r(21776).Ks,u=r(92880).extendFlat,c=i.marker,f=c.line;t.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:i.xperiod,yperiod:i.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:i.xperiodalignment,yperiodalignment:i.yperiodalignment,xhoverformat:s("x"),yhoverformat:s("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:u({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:u({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:u({},c.angle,{arrayOk:!1,editType:"calc"}),size:u({},c.size,{arrayOk:!1,editType:"calc"}),color:u({},c.color,{arrayOk:!1,editType:"style"}),line:{color:u({},f.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:u({},f.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:i.selected.marker,editType:"style"},unselected:{marker:i.unselected.marker,editType:"style"},text:u({},i.text,{}),hovertext:u({},i.hovertext,{}),hovertemplate:l({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:i.zorder}},62555:function(t,e,r){"use strict";var n=r(38248),i=r(54460),a=r(1220),o=r(3400),s=r(39032).BADNUM,l=o._;t.exports=function(t,e){var r=t._fullLayout,u=i.getFromId(t,e.xaxis||"x"),m=i.getFromId(t,e.yaxis||"y"),x=[],b="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(z=u,D="x",R=m,F="y",B=!!e.yperiodalignment):(z=m,D="y",R=u,F="x",B=!!e.xperiodalignment);var _=function(t,e,r,i){var s,l=e in t,u=e+"0" in t,c="d"+e in t;if(l||u&&c){var f=r.makeCalcdata(t,e);return[a(t,r,e,f).vals,f]}s=u?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||o.isDateTime(t.name)&&"date"===r.type)?t.name:i;for(var h="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+"calendar"]),p=t._length,d=Array(p),v=0;vN.uf};if(e._hasPreCompStats){var E=e[D],L=function(t){return z.d2c((e[t]||[])[O])},C=1/0,P=-1/0;for(O=0;O=N.q1&&N.q3>=N.med){var Y=L("lowerfence");N.lf=Y!==s&&Y<=N.q1?Y:p(N,U,V);var X=L("upperfence");N.uf=X!==s&&X>=N.q3?X:d(N,U,V);var Z=L("mean");N.mean=Z!==s?Z:V?o.mean(U,V):(N.q1+N.q3)/2;var K=L("sd");N.sd=Z!==s&&K>=0?K:V?o.stdev(U,V,N.mean):N.q3-N.q1,N.lo=v(N),N.uo=g(N);var J=L("notchspan");J=J!==s&&J>0?J:y(N,V),N.ln=N.med-J,N.un=N.med+J;var $=N.lf,Q=N.uf;e.boxpoints&&U.length&&($=Math.min($,U[0]),Q=Math.max(Q,U[V-1])),e.notched&&($=Math.min($,N.ln),Q=Math.max(Q,N.un)),N.min=$,N.max=Q}else o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+N.q1,"median = "+N.med,"q3 = "+N.q3].join("\n")),G=N.med!==s?N.med:N.q1!==s?N.q3!==s?(N.q1+N.q3)/2:N.q1:N.q3!==s?N.q3:0,N.med=G,N.q1=N.q3=G,N.lf=N.uf=G,N.mean=N.sd=G,N.ln=N.un=G,N.min=N.max=G;C=Math.min(C,N.min),P=Math.max(P,N.max),N.pts2=j.filter(S),x.push(N)}}e._extremes[z._id]=i.findExtremes(z,[C,P],{padded:!0})}else{var tt,te,tr=z.makeCalcdata(e,D),tn=function(t,e){for(var r=t.length,n=Array(r+1),i=0;i=0&&to0){(N={}).pos=N[F]=A[O],j=N.pts=ta[O].sort(f),V=(U=N[D]=j.map(h)).length,N.min=U[0],N.max=U[V-1],N.mean=o.mean(U,V),N.sd=o.stdev(U,V,N.mean)*e.sdmultiple,N.med=o.interp(U,.5),V%2&&(tc||tf)?(tc?(tt=U.slice(0,V/2),te=U.slice(V/2+1)):tf&&(tt=U.slice(0,V/2+1),te=U.slice(V/2)),N.q1=o.interp(tt,.5),N.q3=o.interp(te,.5)):(N.q1=o.interp(U,.25),N.q3=o.interp(U,.75)),N.lf=p(N,U,V),N.uf=d(N,U,V),N.lo=v(N),N.uo=g(N);var th=y(N,V);N.ln=N.med-th,N.un=N.med+th,ts=Math.min(ts,N.ln),tl=Math.max(tl,N.un),N.pts2=j.filter(S),x.push(N)}e.notched&&o.isTypedArray(tr)&&(tr=Array.from(tr)),e._extremes[z._id]=i.findExtremes(z,e.notched?tr.concat([ts,tl]):tr,{padded:!0})}return(function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0)?(x[0].t={num:r[b],dPos:M,posLetter:F,valLetter:D,labels:{med:l(t,"median:"),min:l(t,"min:"),q1:l(t,"q1:"),q3:l(t,"q3:"),max:l(t,"max:"),mean:"sd"===e.boxmean||"sd"===e.sizemode?l(t,"mean \xb1 σ:").replace("σ",1===e.sdmultiple?"σ":e.sdmultiple+"σ"):l(t,"mean:"),lf:l(t,"lower fence:"),uf:l(t,"upper fence:")}},r[b]++,x):[{t:{empty:!0}}]};var u={text:"tx",hovertext:"htx"};function c(t,e,r){for(var n in u)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[u[n]]=e[n][r[0]][r[1]]):t[u[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function v(t){return 4*t.q1-3*t.q3}function g(t){return 4*t.q3-3*t.q1}function y(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},96404:function(t,e,r){"use strict";var n=r(54460),i=r(3400),a=r(71888).getAxisGroup,o=["v","h"];function s(t,e,r,o){var s=e.calcdata,l=e._fullLayout,u=o._id,c=u.charAt(0),f=[],h=0;for(x=0;x1,y=1-l[t+"gap"],m=1-l[t+"groupgap"];for(x=0;x0;if("positive"===F?(M=w*(R?1:.5),E=V,S=E=k):"negative"===F?(M=E=k,S=w*(R?1:.5),L=V):(M=S=w,E=L=V),H){var G=z.pointpos,W=z.jitter,Y=z.marker.size/2,X=0;G+W>=0&&((X=V*(G+W))>M?(q=!0,O=Y,C=X):X>E&&(O=Y,C=M)),X<=M&&(C=M);var Z=0;G-W<=0&&((Z=-V*(G-W))>S?(q=!0,I=Y,P=Z):Z>L&&(I=Y,P=S)),Z<=S&&(P=S)}else C=M,P=S;var K=Array(_.length);for(b=0;b<_.length;b++)K[b]=_[b].pos;z._extremes[u]=n.findExtremes(o,K,{padded:q,vpadminus:P,vpadplus:C,vpadLinearized:!0,ppadminus:{x:I,y:O}[c],ppadplus:{x:O,y:I}[c]})}}}t.exports={crossTraceCalc:function(t,e){for(var r=t.calcdata,n=e.xaxis,i=e.yaxis,a=0;a0?(T="v",k=g>0?Math.min(m,y):Math.min(y)):g>0?(T="h",k=Math.min(m)):k=0;if(!k){e.visible=!1;return}e._length=k;var S=r("orientation",T);e._hasPreCompStats?"v"===S&&0===g?(r("x0",0),r("dx",1)):"h"===S&&0===v&&(r("y0",0),r("dy",1)):"v"===S&&0===g?r("x0"):"h"===S&&0===v&&r("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],a)}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,u,"marker.outliercolor"),s=r("marker.line.outliercolor"),l="outliers";e._hasPreCompStats?l="all":(o||s)&&(l="suspectedoutliers");var c=r(a+"points",l);c?(r("jitter","all"===c?.3:0),r("pointpos","all"===c?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",e.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===c&&(r("marker.line.outliercolor",e.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete e.marker;var f=r("hoveron");("all"===f||-1!==f.indexOf("points"))&&r("hovertemplate"),n.coerceSelectionMarkerOpacity(e,r)}t.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,u,r,i)}if(c(t,e,s,i),!1!==e.visible){o(t,e,i,s),s("xhoverformat"),s("yhoverformat");var l,h=e._hasPreCompStats;h&&(s("lowerfence"),s("upperfence")),s("line.color",(t.marker||{}).color||r),s("line.width"),s("fillcolor",a.addOpacity(e.line.color,.5));var p=!1;if(h){var d=s("mean"),v=s("sd");d&&d.length&&(p=!0,v&&v.length&&(p="sd"))}s("whiskerwidth");var g=s("sizemode");"quartiles"===g&&(l=s("boxmean",p)),s("showwhiskers","quartiles"===g),("sd"===g||"sd"===l)&&s("sdmultiple"),s("width"),s("quartilemethod");var y=!1;if(h){var m=s("notchspan");m&&m.length&&(y=!0)}else n.validate(t.notchwidth,u.notchwidth)&&(y=!0);s("notched",y)&&s("notchwidth"),f(t,e,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,u,t)}for(var o=0;ot.lo&&(x.so=!0)}return a});h.enter().append("path").classed("point",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,u=e.pos,c=!!u.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),d.exit().remove(),d.each(function(t){var e=u.c2l(t.pos+f,!0),i=u.l2p(e-o)+h,a=u.l2p(e+s)+h,d=c?(i+a)/2:u.l2p(e)+h,v=l.c2p(t.mean,!0),g=l.c2p(t.mean-t.sd,!0),y=l.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+v+","+i+"V"+a+("sd"===p?"m0,0L"+g+","+d+"L"+v+","+i+"L"+y+","+d+"Z":"")):n.select(this).attr("d","M"+i+","+v+"H"+a+("sd"===p?"m0,0L"+d+","+g+"L"+i+","+v+"L"+d+","+y+"Z":""))})}t.exports={plot:function(t,e,r,a){var u=t._context.staticPlot,c=e.xaxis,f=e.yaxis;i.makeTraceGroups(a,r,"trace boxes").each(function(t){var e,r,i=n.select(this),a=t[0],h=a.t,p=a.trace;if(h.wdPos=h.bdPos*p.whiskerwidth,!0!==p.visible||h.empty){i.remove();return}"h"===p.orientation?(e=f,r=c):(e=c,r=f),o(i,{pos:e,val:r},p,h,u),s(i,{x:c,y:f},p,h),l(i,{pos:e,val:r},p,h)})},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},8264:function(t){"use strict";t.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,O=L>0?Math.ceil:Math.floor,I=L>0?Math.min:Math.max,z=L>0?Math.max:Math.min,D=P(S+C),R=O(E-C),F=[[f=M(S)]];for(a=D;a*L=0;i--)a[c-i]=t[f][i],o[c-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:u}),s}},19216:function(t,e,r){"use strict";var n=r(54460),i=r(92880).extendFlat;t.exports=function(t,e,r){var a,o,s,l,u,c,f,h,p,d,v,g,y,m,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,P=t._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function I(n){var i,a,o,s,l,u,c,f,p,d,v,g,y=[],m=[],x={};if("b"===e)for(i=0,o=Math.floor(Math.max(0,Math.min(P-2,a=t.b2j(n)))),s=a-o,x.length=P,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)};i0&&(p=t.dxydi([],i-1,o,0,s),y.push(l[0]+p[0]/3),m.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),y.push(f[0]-d[0]/3),m.push(f[1]-d[1]/3)),y.push(f[0]),m.push(f[1]),l=f;else for(a=0,u=Math.floor(Math.max(0,Math.min(C-2,i=t.a2i(n)))),c=i-u,x.length=C,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],u,e,c,r)};a0&&(v=t.dxydj([],u,a-1,c,0),y.push(l[0]+v[0]/3),m.push(l[1]+v[1]/3),g=t.dxydj([],u,a-1,c,1),y.push(f[0]-g[0]/3),m.push(f[1]-g[1]/3)),y.push(f[0]),m.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=h,x.x=y,x.y=m,x.smoothing=A.smoothing,x}function z(n){var i,a,o,s,l,u=[],c=[],f={};if(f.length=x.length,f.crossLength=k.length,"b"===e)for(i=0,o=Math.max(0,Math.min(P-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)};ix.length-1||_.push(i(z(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=c;hx.length-1)&&!(v<0)&&!(v>x.length-1))for(a=0,g=x[s],y=x[v];ax[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash})));b.startline&&T.push(i(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,c=(u=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort(function(t,e){return t-e}))[0],f=u[1],h=c;h<=f;h++)p=b.tick0+b.dtick*h,_.push(i(I(p),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=c-1;hx[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},14724:function(t,e,r){"use strict";var n=r(54460),i=r(92880).extendFlat;t.exports=function(t,e){var r,a,o,s,l,u=e._labels=[],c=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(h-=180,l=-l),{angle:h,flip:l,p:t.c2p(n,e,r),offsetMultplier:u}}},164:function(t,e,r){"use strict";var n=r(33428),i=r(43616),a=r(87072),o=r(53416),s=r(15584),l=r(72736),u=r(3400),c=u.strRotate,f=u.strTranslate,h=r(84284);function p(t,e,r,s,l,u,c){var f="const-"+l+"-lines",h=r.selectAll("."+f).data(u);h.enter().append("path").classed(f,!0).style("vector-effect",c?"none":"non-scaling-stroke"),h.each(function(r){var s=r.x,l=r.y,u="M"+o(a([],s,t.c2p),a([],l,e.c2p),r.smoothing);n.select(this).attr("d",u).style("stroke-width",r.width).style("stroke",r.color).style("stroke-dasharray",i.dashStyle(r.dash,r.width)).style("fill","none")}),h.exit().remove()}function d(t,e,r,a,o,u,h,p){var d=u.selectAll("text."+p).data(h);d.enter().append("text").classed(p,!0);var v=0,g={};return d.each(function(o,u){if("auto"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var h,p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}u||(g={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,y=n.select(this).attr({"text-anchor":d>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),m=i.bBox(this);y.attr("transform",f(h.p[0],h.p[1])+c(h.angle)+f(o.axis.labelpadding*d,.3*m.height)),v=Math.max(v,m.width+o.axis.labelpadding)}),d.exit().remove(),g.maxExtent=v,g}t.exports=function(t,e,r,i){var l=t._context.staticPlot,c=e.xaxis,f=e.yaxis,h=t._fullLayout._clips;u.makeTraceGroups(i,r,"trace").each(function(e){var r,i,v,g,m,x,b,_,w=n.select(this),T=e[0],k=T.trace,A=k.aaxis,M=k.baxis,S=u.ensureSingle(w,"g","minorlayer"),E=u.ensureSingle(w,"g","majorlayer"),L=u.ensureSingle(w,"g","boundarylayer"),C=u.ensureSingle(w,"g","labellayer");w.style("opacity",k.opacity),p(c,f,E,A,"a",A._gridlines,!0,l),p(c,f,E,M,"b",M._gridlines,!0,l),p(c,f,S,A,"a",A._minorgridlines,!0,l),p(c,f,S,M,"b",M._minorgridlines,!0,l),p(c,f,L,A,"a-boundary",A._boundarylines,l),p(c,f,L,M,"b-boundary",M._boundarylines,l);var P=d(t,c,f,k,T,C,A._labels,"a-label"),O=d(t,c,f,k,T,C,M._labels,"b-label");m=u.aggNums(Math.min,null,k.a),x=u.aggNums(Math.max,null,k.a),b=u.aggNums(Math.min,null,k.b),_=u.aggNums(Math.max,null,k.b),r=.5*(m+x),i=b,v=k.ab2xy(r,i,!0),g=k.dxyda_rough(r,i),void 0===P.angle&&u.extendFlat(P,s(k,c,f,v,k.dxydb_rough(r,i))),y(t,C,k,T,v,g,k.aaxis,c,f,P,"a-title"),r=m,i=.5*(b+_),v=k.ab2xy(r,i,!0),g=k.dxydb_rough(r,i),void 0===O.angle&&u.extendFlat(O,s(k,c,f,v,k.dxyda_rough(r,i))),y(t,C,k,T,v,g,k.baxis,c,f,O,"b-title"),function(t,e,r,n,i){var s,l,c=r.select("#"+t._clipPathId);c.size()||(c=r.append("clipPath").classed("carpetclip",!0));var f=u.ensureSingle(c,"path","carpetboundary"),h=e.clipsegments,p=[];for(l=0;l90&&m<270&&(_=(-l.lineCount(x)+g)*v*a-_),x.attr("transform",f(e.p[0],e.p[1])+c(e.angle)+f(0,_)).attr("text-anchor","middle").call(i.font,h.title.font)}),b.exit().remove()}},81e3:function(t,e,r){"use strict";var n=r(24588),i=r(14952).findBin,a=r(30180),o=r(29056),s=r(26435),l=r(24464);t.exports=function(t){var e=t._a,r=t._b,u=e.length,c=r.length,f=t.aaxis,h=t.baxis,p=e[0],d=e[u-1],v=r[0],g=r[c-1],y=e[e.length-1]-e[0],m=r[r.length-1]-r[0],x=y*n.RELATIVE_CULL_TOLERANCE,b=m*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,v-=b,g+=b,t.isVisible=function(t,e){return t>p&&tv&&ed||eg},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,f.smoothing,h.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],u,c,f.smoothing,h.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,h.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),u-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),u-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),u-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(u-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),c-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(c-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(ne[u-1]|ir[c-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,p,d,v=0,g=0,y=[];ne[u-1]?(f=u-2,h=1,v=(n-e[u-1])/(e[u-1]-e[u-2])):(f=Math.max(0,Math.min(u-2,Math.floor(o))),h=o-f),ir[c-1]?(p=c-2,d=1,g=(i-r[c-1])/(r[c-1]-r[c-2])):(p=Math.max(0,Math.min(c-2,Math.floor(s))),d=s-p),v&&(t.dxydi(y,f,p,h,d),l[0]+=y[0]*v,l[1]+=y[1]*v),g&&(t.dxydj(y,f,p,h,d),l[0]+=y[0]*g,l[1]+=y[1]*g)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[(a[0]-o[0])*.5/i,(a[1]-o[1])*.5/i]},t.dxydb_rough=function(e,r,n){var i=m*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[(a[0]-o[0])*.5/i,(a[1]-o[1])*.5/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},51512:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e,r){var i=[],a=[],o=t[0].length,s=t.length,l=0;for(h=0;h0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&p0&&h1e-5);return n.log("Smoother converged to",u,"after",c,"iterations"),t}},86411:function(t,e,r){"use strict";var n=r(3400).isArray1D;t.exports=function(t,e,r){var i=r("x"),a=i&&i.length,o=r("y"),s=o&&o.length;if(!a&&!s)return!1;if(e._cheater=!i,(!a||n(i))&&(!s||n(o))){var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}else e._length=null;return!0}},83372:function(t,e,r){"use strict";var n=r(21776).Ks,i=r(6096),a=r(49084),o=r(45464),s=r(22548).defaultLine,l=r(92880).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(38248),i=r(39032).BADNUM,a=r(47128),o=r(20148),s=r(4500);function l(t){return t&&"string"==typeof t}t.exports=function(t,e){var r,u=e._length,c=Array(u);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f")}}(t,f,o),[t]}},54272:function(t,e,r){"use strict";t.exports={attributes:r(83372),supplyDefaults:r(30972),colorbar:r(96288),calc:r(7924),calcGeoJSON:r(88364).calcGeoJSON,plot:r(88364).plot,style:r(7947).style,styleOnSelect:r(7947).styleOnSelect,hoverPoints:r(69224),eventData:r(52428),selectPoints:r(17328),moduleType:"trace",name:"choropleth",basePlotModule:r(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(27144),o=r(59972).getTopojsonFeatures,s=r(19280).findExtremes,l=r(7947).style;t.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,u=r._length,c="geojson-id"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water")){for(var a=n+1;a=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}},86040:function(t,e,r){"use strict";var n=r(49084),i=r(29736).axisHoverFormat,a=r(21776).Ks,o=r(52948),s=r(45464),l=r(92880).extendFlat,u={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]}),uhoverformat:i("u",1),vhoverformat:i("v",1),whoverformat:i("w",1),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),showlegend:l({},s.showlegend,{dflt:!1})};l(u,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(t){u[t]=o[t]}),u.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),u.transforms=void 0,t.exports=u},83344:function(t,e,r){"use strict";var n=r(47128);t.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,u=0;ua.level||a.starts.length&&i===a.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var o,s,l,u=r.x.length,c=r.y.length,f=-1/0,h=1/0;for(o=0;o":p>f&&(r.prefixBoundary=!0);break;case"<":(pf||r.starts.length&&l===h)&&(r.prefixBoundary=!0);break;case"][":s=Math.min(p[0],p[1]),l=Math.max(p[0],p[1]),sf&&(r.prefixBoundary=!0)}}}},55296:function(t,e,r){"use strict";var n=r(8932),i=r(41076),a=r(46960);t.exports={min:"zmin",max:"zmax",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,u=o.coloring,c=i(e,{isColorbar:!0});if("heatmap"===u){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else"fill"===u&&(r._fillcolor=c);r._line={color:"lines"===u?c:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},93252:function(t){"use strict";t.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},95536:function(t,e,r){"use strict";var n=r(38248),i=r(17428),a=r(76308),o=a.addOpacity,s=a.opacity,l=r(69104),u=r(3400).isArrayOrTypedArray,c=l.CONSTRAINT_REDUCTION,f=l.COMPARISON_OPS2;t.exports=function(t,e,r,a,l,h){var p,d,v,g,y=e.contours,m=r("contours.operation");y._operation=c[m],-1===f.indexOf(y.operation)?(r("contours.value",[0,1]),u(y.value)?y.value.length>2?y.value=y.value.slice(2):0===y.length?y.value=[0,1]:y.length<2?(p=parseFloat(y.value[0]),y.value=[p,p+1]):y.value=[parseFloat(y.value[0]),parseFloat(y.value[1])]:n(y.value)&&(p=parseFloat(y.value),y.value=[p,p+1])):(r("contours.value",0),n(y.value)||(u(y.value)?y.value=parseFloat(y.value[0]):y.value=0)),"="===m?d=y.showlines=!0:(d=r("contours.showlines"),g=r("fillcolor",o((t.line||{}).color||l,.5))),d&&(v=r("line.color",g&&s(g)?o(e.fillcolor,1):l),r("line.width",2),r("line.dash")),r("line.smoothing"),i(r,a,v,h)}},3212:function(t,e,r){"use strict";var n=r(69104),i=r(38248);function a(t,e){var r,a=Array.isArray(e);function o(t){return i(t)?+t:null}return -1!==n.COMPARISON_OPS2.indexOf(t)?r=o(a?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=a?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=a?e.map(o):[o(e)]),r}function o(t){return function(e){var r=Math.min((e=a(t,e))[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=a(t,e),end:1/0,size:1/0}}}t.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},84952:function(t){"use strict";t.exports=function(t,e,r,n){var i=n("contours.start"),a=n("contours.end"),o=r("contours.size");((!1===i||!1===a?e.autocontour=!0:r("autocontour",!1))||!o)&&r("ncontours")}},82172:function(t,e,r){"use strict";var n=r(3400);function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths),starts:n.extendDeep([],t.starts)})}t.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case"=":case"<":return t;case">":for(1!==t.length&&n.warn("Contour data invalid for the specified inequality operation."),a=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},46960:function(t){"use strict";t.exports=function(t){return t.end+t.size/1e6}},88748:function(t,e,r){"use strict";var n=r(3400),i=r(93252);function a(t,e,r,n){return Math.abs(t[0]-e[0])20&&r?208===u||1114===u?c=0===e[0]?1:-1:f=0===e[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(u)?f=1:-1!==i.LEFTSTART.indexOf(u)?c=1:-1!==i.TOPSTART.indexOf(u)?f=-1:c=-1,[c,f]),S=[s(t,e,[-M[0],-M[1]])],E=t.z.length,L=t.z[0].length,C=e.slice(),P=M.slice();for(h=0;h<1e4;h++){if(A>20?(A=i.CHOOSESADDLE[A][0>(M[0]||M[1])?0:1],t.crossings[k]=i.SADDLEREMAINDER[A]):delete t.crossings[k],!(M=i.NEWDELTA[A])){n.log("Found bad marching index:",A,e,t.level);break}S.push(s(t,e,M)),e[0]+=M[0],e[1]+=M[1],k=e.join(","),a(S[S.length-1],S[S.length-2],o,l)&&S.pop();var O=M[0]&&(e[0]<0||e[0]>L-2)||M[1]&&(e[1]<0||e[1]>E-2);if(e[0]===C[0]&&e[1]===C[1]&&M[0]===P[0]&&M[1]===P[1]||r&&O)break;A=t.crossings[k]}1e4===h&&n.log("Infinite loop in contour?");var I=a(S[0],S[S.length-1],o,l),z=0,D=.2*t.smoothing,R=[],F=0;for(h=1;h=F;h--)if((p=R[h])=F&&p+R[d]b&&_--,t.edgepaths[_]=T.concat(S,w));break}U||(t.edgepaths[b]=S.concat(w))}for(b=0;b=m)&&(s<=y&&(s=y),l>=m&&(l=m),c=Math.floor((l-s)/u)+1,f=0),r=0;ry&&(v.unshift(y),g.unshift(g[0])),v[v.length-1]t?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}((u=t[c]).level,s))&&(u.crossings[o]=l,-1!==i.indexOf(l)&&(u.starts.push([e,r]),d&&-1!==i.indexOf(l,i.indexOf(l)+1)&&u.starts.push([e,r])))}},23676:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(43616),o=r(8932),s=r(72736),l=r(54460),u=r(78344),c=r(41420),f=r(72424),h=r(88748),p=r(61512),d=r(82172),v=r(56008),g=r(93252),y=g.LABELOPTIMIZER;function m(t,e){var r,n,o,s,l,u,c="",f=0,h=t.edgepaths.map(function(t,e){return e}),p=!0;function d(t){return .01>Math.abs(t[0]-e[2][0])}for(;h.length;){for(u=a.smoothopen(t.edgepaths[f],t.smoothing),c+=p?u:u.replace(/^M/,"L"),h.splice(h.indexOf(f),1),r=t.edgepaths[f][t.edgepaths[f].length-1],s=-1,o=0;o<4;o++){if(!r){i.log("Missing end?",f,t);break}for(.01>Math.abs(r[1]-e[0][1])&&!d(r)?n=e[1]:.01>Math.abs(r[0]-e[0][0])?n=e[0]:.01>Math.abs(r[1]-e[2][1])?n=e[3]:d(r)&&(n=e[2]),l=0;lMath.abs(r[0]-n[0])?.01>Math.abs(r[0]-v[0])&&(v[1]-r[1])*(n[1]-v[1])>=0&&(n=v,s=l):.01>Math.abs(r[1]-n[1])?.01>Math.abs(r[1]-v[1])&&(v[0]-r[0])*(n[0]-v[0])>=0&&(n=v,s=l):i.log("endpt to newendpt is not vert. or horz.",r,n,v)}if(r=n,s>=0)break;c+="L"+n}if(s===t.edgepaths.length){i.log("unclosed perimeter path");break}f=s,(p=-1===h.indexOf(f))&&(f=h[0],c+="Z")}for(f=0;fn.center?n.right-s:s-n.left)/(c+Math.abs(Math.sin(u)*o)),p=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(u)*o);if(h<1||p<1)return 1/0;var d=y.EDGECOST*(1/(h-1)+1/(p-1));d+=y.ANGLECOST*u*u;for(var v=s-c,g=l-f,m=s+c,x=l+f,b=0;b2*y.MAXCOST)break;p&&(s/=2),l=(o=u-s/2)+1.5*s}if(h<=y.MAXCOST)return c},e.addLabelData=function(t,e,r,n){var i=e.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,u=t.theta,c=Math.sin(u),f=Math.cos(u),h=function(t,e){return[s+t*f-e*c,l+t*c+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:u,level:e.level,width:a,height:o}),n.push(p)},e.drawLabels=function(t,e,r,a,o){var l=t.selectAll("text").data(e,function(t){return t.text+","+t.x+","+t.y+","+t.theta});if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+i+")"}).call(s.convertToTspans,r)}),o){for(var u="",c=0;cr.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if("constraint"!==r.type){var u,c=r.start,f=r.end,h=t._input.contours;c>f&&(r.start=h.start=f,f=r.end=h.end=c,c=r.start),r.size>0||(u=c===f?1:a(c,f,t.ncontours).dtick,h.size=r.size=u)}}},52440:function(t,e,r){"use strict";var n=r(33428),i=r(43616),a=r(41648),o=r(41076);t.exports=function(t){var e=n.select(t).selectAll("g.contour");e.style("opacity",function(t){return t[0].trace.opacity}),e.each(function(t){var e,r=n.select(this),a=t[0].trace,s=a.contours,l=a.line,u=s.size||1,c=s.start,f="constraint"===s.type,h=!f&&"lines"===s.coloring,p=!f&&"fill"===s.coloring,d=h||p?o(a):null;r.selectAll("g.contourlevel").each(function(t){n.select(this).selectAll("path").call(i.lineGroupStyle,l.width,h?d(t.level):l.color,l.dash)});var v=s.labelfont;r.selectAll("g.contourlabels text").each(function(t){i.font(n.select(this),{weight:v.weight,style:v.style,variant:v.variant,family:v.family,size:v.size,color:v.color||(h?d(t.level):l.color)})}),f?r.selectAll("g.contourfill path").style("fill",a.fillcolor):p&&(r.selectAll("g.contourfill path").style("fill",function(t){return void 0===e&&(e=t.level),d(t.level+.5*u)}),void 0===e&&(e=c),r.selectAll("g.contourbg path").style("fill",d(e-.5*u)))}),a(t)}},97680:function(t,e,r){"use strict";var n=r(27260),i=r(17428);t.exports=function(t,e,r,a,o){var s,l=r("contours.coloring"),u="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(u=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,a,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),i(r,a,u,o)}},37960:function(t,e,r){"use strict";var n=r(83328),i=r(67104),a=r(49084),o=r(92880).extendFlat,s=i.contours;t.exports=o({carpet:{valType:"string",editType:"calc"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},zorder:i.zorder,transforms:void 0},a("",{cLetter:"z",autoColorDflt:!1}))},30572:function(t,e,r){"use strict";var n=r(47128),i=r(3400),a=r(2872),o=r(26136),s=r(70448),l=r(11240),u=r(35744),c=r(3252),f=r(50948),h=r(54444);t.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var p,d,v,g,y,m,x,b,_,w,T,k,A,M,S,E=t.data[r.index],L=t.data[e.index];L.a||(L.a=E.a),L.b||(L.b=E.b),c(L,e,e._defaultColor,t._fullLayout)}var C=(_=(b=e._carpetTrace).aaxis,w=b.baxis,_._minDtick=0,w._minDtick=0,i.isArray1D(e.z)&&a(e,_,w,"a","b",["z"]),p=e._a=e._a||e.a,g=e._b=e._b||e.b,p=p?_.makeCalcdata(e,"_a"):[],g=g?w.makeCalcdata(e,"_b"):[],d=e.a0||0,v=e.da||1,y=e.b0||0,m=e.db||1,x=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(x),s(x,e._emptypoints),T=i.maxRowLength(x),k="scaled"===e.xtype?"":p,A=u(e,k,d,v,T,_),M="scaled"===e.ytype?"":g,S=u(e,M,y,m,x.length,w),"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:x,containerStr:"",cLetter:"z"}),[{a:A,b:S,z:x}]);return h(e,e._z),C}}},3252:function(t,e,r){"use strict";var n=r(3400),i=r(51264),a=r(37960),o=r(95536),s=r(84952),l=r(97680);t.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,a,r,i)}if(c("carpet"),t.a&&t.b){if(!i(t,e,c,u,"a","b")){e.visible=!1;return}c("text"),"constraint"===c("contours.type")?o(t,e,c,u,r,{hasHover:!1}):(s(t,e,c,function(r){return n.coerce2(t,e,a,r)}),l(t,e,c,u,{hasHover:!1}))}else e._defaultColor=r,e._length=null;c("zorder")}},40448:function(t,e,r){"use strict";t.exports={attributes:r(37960),supplyDefaults:r(3252),colorbar:r(55296),calc:r(30572),plot:r(94440),style:r(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:r(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(t,e,r){"use strict";var n=r(33428),i=r(87072),a=r(53416),o=r(43616),s=r(3400),l=r(72424),u=r(88748),c=r(23676),f=r(93252),h=r(82172),p=r(61512),d=r(56008),v=r(50948),g=r(77712);function y(t,e,r){var n=t.getPointAtLength(e),i=t.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function m(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}t.exports=function(t,e,r,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,"contour").each(function(r){var b,T,k,A,M=n.select(this),S=r[0],E=S.trace,L=E._carpetTrace=v(t,E),C=t.calcdata[L.index][0];if(L.visible&&"legendonly"!==L.visible){var P,O,I,z=S.a,D=S.b,R=E.contours,F=p(R,e,S),B="constraint"===R.type,N=R._operation,j=B?"="===N?"lines":"fill":R.coloring,U=[[z[0],D[D.length-1]],[z[z.length-1],D[D.length-1]],[z[z.length-1],D[0]],[z[0],D[0]]];l(F),u(F,(z[z.length-1]-z[0])*1e-8,(D[D.length-1]-D[0])*1e-8);var V=F;"constraint"===R.type&&(V=h(F,N)),function(t,e){var r,n,i,a,o,s,l,u,c;for(r=0;r=0;A--)T=i([],(b=C.clipsegments[A]).x,_.c2p),k=i([],b.y,w.c2p),T.reverse(),k.reverse(),q.push(a(T,k,b.bicubic));var H="M"+q.join("L")+"Z";(function(t,e,r,n,o,l){var u,c,f=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);f.enter().append("path"),f.exit().remove();var h=[];for(c=0;c=0&&(h=L,d=v):Math.abs(f[1]-h[1])=0&&(h=L,d=v):s.log("endpt to newendpt is not vert. or horz.",f,h,L)}if(d>=0)break;m+=S(f,h),f=h}if(d===e.edgepaths.length){s.log("unclosed perimeter path");break}c=d,(b=-1===x.indexOf(c))&&(c=x[0],m+=S(f,h)+"Z",f=null)}for(c=0;cv&&(n.max=v),n.len=n.max-n.min}function g(t,e){var r=0;return(.1>Math.abs(t[0]-l)||.1>Math.abs(t[0]-u))&&(r=Math.max(r,a*x(e,m(i.dxydb_rough(t[0],t[1],.1)))/2)),(.1>Math.abs(t[1]-c)||.1>Math.abs(t[1]-f))&&(r=Math.max(r,a*x(e,m(i.dxyda_rough(t[0],t[1],.1)))/2)),r}}(this,r,t,n,u,e.height),!(n.len<(e.width+e.height)*f.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/I),f.LABELMAX),a=0;a0?+p[e]:0),f.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:m})}}var b=o.extractOpts(r),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=["interpolate",["linear"],["heatmap-density"],0,1>a.opacity(w)?w:a.addOpacity(w,0)];for(e=1;e<_.length;e++)T.push(_[e][0],_[e][1]);var k=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":d?k:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":v?{type:"identity",property:"r"}:r.radius,"heatmap-opacity":r.opacity}),c.geojson={type:"FeatureCollection",features:f},c.heatmap.layout.visibility="visible",c}},97664:function(t,e,r){"use strict";var n=r(3400),i=r(27260),a=r(33928);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);if(!c){e.visible=!1;return}e._length=c,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(t,e,o,s,{prefix:"",cLetter:"z"})}},96176:function(t){"use strict";t.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},25336:function(t,e,r){"use strict";var n=r(54460),i=r(63312).hoverPoints,a=r(63312).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 f=s.subplot.mockAxis;s.z=c.z,s.zLabel=n.tickText(f,f.c2l(c.z),"hover").text}return s.extraText=a(u,c,l[0].t.labels),[s]}}},15088:function(t,e,r){"use strict";t.exports={attributes:r(33928),supplyDefaults:r(97664),colorbar:r(96288),formatLabels:r(11960),calc:r(90876),plot:r(35256),hoverPoints:r(25336),eventData:r(96176),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=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}},74248:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){for(var r=0;r"),l.color=(u=d.marker,c=g.mc||u.color,f=g.mlc||u.line.color,h=g.mlw||u.line.width,n(c)?c:n(f)&&h?f:void 0),[l]}}},94704:function(t,e,r){"use strict";t.exports={attributes:r(20088),layoutAttributes:r(7076),supplyDefaults:r(45432).supplyDefaults,crossTraceDefaults:r(45432).crossTraceDefaults,supplyLayoutDefaults:r(11631),calc:r(23096),crossTraceCalc:r(4804),plot:r(42200),style:r(44544).style,hoverPoints:r(31488),eventData:r(34580),selectPoints:r(45784),moduleType:"trace",name:"funnel",basePlotModule:r(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(t){"use strict";t.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},11631:function(t,e,r){"use strict";var n=r(3400),i=r(7076);t.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path").each(function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}}),u(r,s,t),r.selectAll(".regions").each(function(){n.select(this).selectAll("path").style("stroke-width",0).call(a.fill,s.connector.fillcolor)}),r.selectAll(".lines").each(function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},22332:function(t,e,r){"use strict";var n=r(74996),i=r(45464),a=r(86968).u,o=r(21776).Ks,s=r(21776).Gw,l=r(92880).extendFlat;t.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:"calc"},pattern:n.marker.pattern,editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:l({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:a({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},91248:function(t,e,r){"use strict";var n=r(7316);e.name="funnelarea",e.plot=function(t,r,i,a){n.plotBasePlot(e.name,t,r,i,a)},e.clean=function(t,r,i,a){n.cleanBasePlot(e.name,t,r,i,a)}},54e3:function(t,e,r){"use strict";var n=r(45768);t.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:"funnelarea"})}}},92688:function(t,e,r){"use strict";var n=r(3400),i=r(22332),a=r(86968).Q,o=r(31508).handleText,s=r(74174).handleLabelsAndValues,l=r(74174).handleMarkerDefaults;t.exports=function(t,e,r,u){function c(r,a){return n.coerce(t,e,i,r,a)}var f,h=s(c("labels"),c("values")),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c("label0"),c("dlabel")),!p){e.visible=!1;return}e._length=p,l(t,e,u,c),c("scalegroup");var d=c("text"),v=c("texttemplate");if(v||(f=c("textinfo",Array.isArray(d)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),v||f&&"none"!==f){var g=c("textposition");o(t,e,u,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===f&&c("textposition","none");a(e,u,c),c("title.text")&&(c("title.position"),n.coerceFont(c,"title.font",u.font)),c("aspectratio"),c("baseratio")}},62396:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:r(91248),categories:["pie-like","funnelarea","showLegend"],attributes:r(22332),layoutAttributes:r(61280),supplyDefaults:r(92688),supplyLayoutDefaults:r(35384),calc:r(54e3).calc,crossTraceCalc:r(54e3).crossTraceCalc,plot:r(39472),style:r(62096),styleOne:r(10528),meta:{}}},61280:function(t,e,r){"use strict";var n=r(85204).hiddenlabels;t.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(t,e,r){"use strict";var n=r(3400),i=r(61280);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("hiddenlabels"),r("funnelareacolorway",e.colorway),r("extendfunnelareacolors")}},39472:function(t,e,r){"use strict";var n=r(33428),i=r(43616),a=r(3400),o=a.strScale,s=a.strTranslate,l=r(72736),u=r(98184).toMoveInsideBar,c=r(82744),f=c.recordMinTextSize,h=c.clearMinTextSize,p=r(69656),d=r(37820),v=d.attachFxHandlers,g=d.determineInsideTextFont,y=d.layoutAreas,m=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}t.exports=function(t,e){var r=t._context.staticPlot,c=t._fullLayout;h("funnelarea",c),m(e,t),y(e,c._size),a.makeTraceGroups(c._funnelarealayer,e,"trace").each(function(e){var h=n.select(this),d=e[0],y=d.trace;(function(t){if(t.length){var e,r,n,i=t[0],a=i.trace,o=a.aspectratio,s=a.baseratio;s>.999&&(s=.999);var l=Math.pow(s,2),u=i.vTotal,c=u*l/(1-l)/u,f=[];for(f.push(S()),r=t.length-1;r>-1;r--)if(!(n=t[r]).hidden){var h=n.v/u;c+=h,f.push(S())}var p=1/0,d=-1/0;for(r=0;r-1;r--)if(!(n=t[r]).hidden){var T,k,A=f[w+=1][0],M=f[w][1];n.TL=[-A,M],n.TR=[A,M],n.BL=b,n.BR=_,n.pxmid=(T=n.TR,k=n.BR,[.5*(T[0]+k[0]),.5*(T[1]+k[1])]),b=n.TL,_=n.TR}}function S(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}})(e),h.each(function(){var h=n.select(this).selectAll("g.slice").data(e);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each(function(o,s){if(o.hidden){n.select(this).selectAll("path,g").remove();return}o.pointNumber=o.i,o.curveNumber=y.index;var h=d.cx,m=d.cy,x=n.select(this),w=x.selectAll("path.surface").data([o]);w.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),x.call(v,t,e);var T="M"+(h+o.TR[0])+","+(m+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+"Z";w.attr("d",T),b(t,o,d);var k=p.castOption(y.textposition,o.pts),A=x.selectAll("g.slicetext").data(o.text&&"none"!==k?[0]:[]);A.enter().append("g").classed("slicetext",!0),A.exit().remove(),A.each(function(){var r,p=a.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),d=a.ensureUniformFontSize(t,g(y,o,c.font));p.text(o.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,d).call(l.convertToTspans,t);var v=i.bBox(p.node()),x=Math.min(o.BL[1],o.BR[1])+m,b=Math.max(o.TL[1],o.TR[1])+m;(r=u(Math.max(o.TL[0],o.BL[0])+h,Math.min(o.TR[0],o.BR[0])+h,x,b,v,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=d.size,f(y.type,r,c),e[s].transform=r,a.setTransormAndDisplay(p,r)})});var m=n.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);m.enter().append("g").classed("titletext",!0),m.exit().remove(),m.each(function(){var e=a.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),r=y.title.text;y._meta&&(r=a.templateString(r,y._meta)),e.text(r).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,y.title.font).call(l.convertToTspans,t);var u=x(d,c._size);e.attr("transform",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))})})})}},62096:function(t,e,r){"use strict";var n=r(33428),i=r(10528),a=r(82744).resizeText;t.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(".trace");a(t,e,"funnelarea"),e.each(function(e){var r=e[0].trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(e){n.select(this).call(i,e,r,t)})})}},83328:function(t,e,r){"use strict";var n=r(52904),i=r(45464),a=r(25376),o=r(29736).axisHoverFormat,s=r(21776).Ks,l=r(21776).Gw,u=r(49084),c=r(92880).extendFlat;t.exports=c({z:{valType:"data_array",editType:"calc"},x:c({},n.x,{impliedEdits:{xtype:"array"}}),x0:c({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:c({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:c({},n.y,{impliedEdits:{ytype:"array"}}),y0:c({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:c({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:c({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:c({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:c({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:c({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:c({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:c({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:a({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:c({},i.showlegend,{dflt:!1}),zorder:n.zorder},{transforms:void 0},u("",{cLetter:"z",autoColorDflt:!1}))},19512:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(54460),o=r(1220),s=r(55480),l=r(47128),u=r(2872),c=r(26136),f=r(70448),h=r(11240),p=r(35744),d=r(39032).BADNUM;function v(t){for(var e=[],r=t.length,n=0;n1){var e=(t[t.length-1]-t[0])/(t.length-1),r=Math.abs(e/100);for(k=0;kr)return!1}return!0}(M.rangebreaks||S.rangebreaks)&&(T=function(t,e,r){for(var n=[],i=-1,a=0;a=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||v)[2]+(f[[r+1,i]]||v)[2]+(f[[r,i-1]]||v)[2]+(f[[r,i+1]]||v)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)f[a]=l[a],c.push(l[a])}return c.sort(function(t,e){return e[2]-t[2]})}},55512:function(t,e,r){"use strict";var n=r(93024),i=r(3400),a=i.isArrayOrTypedArray,o=r(54460),s=r(8932).extractOpts;t.exports=function(t,e,r,l,u){u||(u={});var c,f,h,p,d,v,g,y,m=u.isContour,x=t.cd[0],b=x.trace,_=t.xa,w=t.ya,T=x.x,k=x.y,A=x.z,M=x.xCenter,S=x.yCenter,E=x.zmask,L=b.zhoverformat,C=T,P=k;if(!1!==t.index){try{h=Math.round(t.index[1]),p=Math.round(t.index[0])}catch(e){i.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(h<0||h>=A[0].length||p<0||p>A.length)return}else{if(n.inbox(e-T[0],e-T[T.length-1],0)>0||n.inbox(r-k[0],r-k[k.length-1],0)>0)return;if(m){for(d=1,C=[2*T[0]-T[1]];dv&&(y=Math.max(y,Math.abs(t[a][o]-d)/(g-v))))}return y}t.exports=function(t,e){var r,i=1;for(a(t,e),r=0;r.01;r++)i=a(t,e,.5-.25*Math.min(1,.5*i));return i>.01&&n.log("interp2d didn't converge quickly",i),t}},39096:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){t("texttemplate");var r=n.extendFlat({},e.font,{color:"auto",size:"auto"});n.coerceFont(t,"textfont",r)}},35744:function(t,e,r){"use strict";var n=r(24040),i=r(3400).isArrayOrTypedArray;t.exports=function(t,e,r,a,o,s){var l=[],u=n.traceIs(t,"contour"),c=n.traceIs(t,"histogram"),f=n.traceIs(t,"gl2d");if(i(e)&&e.length>1&&!c&&"category"!==s.type){var h=e.length;if(!(h<=o))return u?e.slice(0,o):e.slice(0,o+1);if(u||f)l=Array.from(e).slice(0,o);else if(1===o)l="log"===s.type?[.5*e[0],2*e[0]]:[e[0]-.5,e[0]+.5];else if("log"===s.type){for(v=1,l=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)];v0;)ta=A.c2p(P[tu]),tu--;for(ta0;)tl=M.c2p(O[tu]),tu--;tl=A._length||ta<=0||ts>=M._length||tl<=0){r.selectAll("image").data([]).exit().remove(),b(r);return}"fast"===U?(th=B,tp=F):(th=q,tp=H);var G=document.createElement("canvas");G.width=th,G.height=tp;var W=G.getContext("2d",{willReadFrequently:!0}),Y=p(S,{noNumericCheck:!0,returnArray:!0});"fast"===U?(td=N?function(t){return B-1-t}:l.identity,tv=j?function(t){return F-1-t}:l.identity):(td=function(t){return l.constrain(Math.round(A.c2p(P[t])-ti),0,q)},tv=function(t){return l.constrain(Math.round(M.c2p(O[t])-ts),0,H)});var X=tv(0),Z=[X,X],K=N?0:1,J=j?0:1,$=0,Q=0,tt=0,te=0;function tr(t,e){if(void 0!==t){var r=Y(t);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),$+=e,Q+=r[0]*e,tt+=r[1]*e,te+=r[2]*e,r}return[0,0,0,0]}if("default"!==U){var tn=0;try{tb=new Uint8Array(th*tp*4)}catch(t){tb=Array(th*tp*4)}if("smooth"===U){var ti,ta,to,ts,tl,tu,tc,tf,th,tp,td,tv,tg,ty,tm,tx,tb,t_,tw,tT,tk=I||P,tA=z||O,tM=Array(tk.length),tS=Array(tA.length),tE=Array(q),tL=I?w:_,tC=z?w:_;for(tu=0;tutX)&&!(tX>M._length))for(tc=tG;tctJ)&&!(tJ>A._length)){var t$=c({x:tK,y:tZ},S,t._fullLayout);t$.x=tK,t$.y=tZ;var tQ=k.z[tu][tc];void 0===tQ?(t$.z="",t$.zLabel=""):(t$.z=tQ,t$.zLabel=s.tickText(tj,tQ,"hover").text);var t0=k.text&&k.text[tu]&&k.text[tu][tc];(void 0===t0||!1===t0)&&(t0=""),t$.text=t0;var t1=l.texttemplateString(tB,t$,t._fullLayout._d3locale,t$,S._meta||{});if(t1){var t2=t1.split("
"),t3=t2.length,t4=0;for(tf=0;tf0&&(a=!0);for(var l=0;la){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]o){var l=p(e,a,s),u=p(r,a,s),c=t===i?0:1;return l[c]!==u[c]}return Math.floor(r/t)-Math.floor(e/t)>.1}(u,t,e,a,r,n))s=u;else break}return s}function h(t,e){return e&&t>u?t>o?t>1.1*i?i:t>1.1*a?a:o:t>s?s:t>l?l:u:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r){var n=e.c2d(t,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}t.exports=function(t,e,r,n,a){var s,l,u=-1.1*e,h=-.1*e,p=t-h,d=r[0],v=r[1],g=Math.min(f(d+h,d+p,n,a),f(v+h,v+p,n,a)),y=Math.min(f(d+u,d+h,n,a),f(v+u,v+h,n,a));if(g>y&&yo){var m=s===i?1:6,x=s===i?"M12":"M1";return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf("-",m);s>0&&(o=o.substr(0,s));var u=n.d2c(o,0,a);if(ur.r2l(F)&&(N=o.tickIncrement(N,b.size,!0,p)),I.start=r.l2r(N),R||i.nestedProperty(e,y+".start").set(I.start)}var j=b.end,U=r.r2l(O.end),V=void 0!==U;if((b.endFound||V)&&U!==r.r2l(j)){var q=V?U:i.aggNums(Math.max,null,d);I.end=r.l2r(q),V||i.nestedProperty(e,y+".start").set(I.end)}var H="autobin"+s;return!1===e._input[H]&&(e._input[y]=i.extendFlat({},e[y]||{}),delete e._input[H],delete e[H]),[I,d]}t.exports={calc:function(t,e){var r,a,p,d,v,g,y=[],m=[],x="h"===e.orientation,b=o.getFromId(t,x?e.yaxis:e.xaxis),_=x?"y":"x",w={x:"y",y:"x"}[_],T=e[_+"calendar"],k=e.cumulative,A=h(t,e,b,_),M=A[0],S=A[1],E="string"==typeof M.size,L=[],C=E?L:M,P=[],O=[],I=[],z=0,D=e.histnorm,R=e.histfunc,F=-1!==D.indexOf("density");k.enabled&&F&&(D=D.replace(/ ?density$/,""),F=!1);var B="max"===R||"min"===R?null:0,N=l.count,j=u[D],U=!1,V=function(t){return b.r2c(t,0,T)};for(i.isArrayOrTypedArray(e[w])&&"count"!==R&&(v=e[w],U="avg"===R,N=l[R]),r=V(M.start),p=V(M.end)+(r-o.tickIncrement(r,M.size,!1,T))/1e6;r=0&&d=0;n--)s(n)}else if("increasing"===e){for(n=1;n=0;n--)t[n]+=t[n+1];"exclude"===r&&(t.push(0),t.shift())}}(m,k.direction,k.currentbin);var J=Math.min(y.length,m.length),$=[],Q=0,tt=J-1;for(r=0;r=Q;r--)if(m[r]){tt=r;break}for(r=Q;r<=tt;r++)if(n(y[r])&&n(m[r])){var te={p:y[r],s:m[r],b:0};k.enabled||(te.pts=I[r],W?te.ph0=te.ph1=I[r].length?S[I[r][0]]:y[r]:(e._computePh=!0,te.ph0=g(L[r]),te.ph1=g(L[r+1],!0))),$.push(te)}return 1===$.length&&($[0].width1=o.tickIncrement($[0].p,M.size,!1,T)-$[0].p),s($,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected($,e,Z),$},calcAllAutoBins:h}},73316:function(t){"use strict";t.exports={eventDataKeys:["binNumber"]}},80536:function(t,e,r){"use strict";var n=r(3400),i=r(79811),a=r(24040).traceIs,o=r(20011),s=r(31508).validateCornerradius,l=n.nestedProperty,u=r(71888).getAxisGroup,c=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],f=["x","y"];t.exports=function(t,e){var r=e._histogramBinOpts={},h=[],p={},d=[];function v(t,e){return n.coerce(M._input,M,M._module.attributes,t,e)}function g(t){return"v"===t.orientation?"x":"y"}function y(t,a,o){var s=t.uid+"__"+o;a||(a=s);var l=i.getFromTrace({_fullLayout:e},t,o).type,u=t[o+"calendar"]||"",c=r[a],f=!0;c&&(l===c.axType&&u===c.calendar?(f=!1,c.traces.push(t),c.dirs.push(o)):(a=s,l!==c.axType&&n.warn(["Attempted to group the bins of trace",t.index,"set on a","type:"+l,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),u!==c.calendar&&n.warn(["Attempted to group the bins of trace",t.index,"set with a",u,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),f&&(r[a]={traces:[t],dirs:[o],axType:l,calendar:t[o+"calendar"]||""}),t["_"+o+"bingroup"]=a}for(C=0;CL&&A.splice(L,A.length-L),E.length>L&&E.splice(L,E.length-L);var C=[],P=[],O=[],I="string"==typeof k.size,z="string"==typeof S.size,D=[],R=[],F=I?D:k,B=z?R:S,N=0,j=[],U=[],V=e.histnorm,q=e.histfunc,H=-1!==V.indexOf("density"),G="max"===q||"min"===q?null:0,W=a.count,Y=o[V],X=!1,Z=[],K=[],J="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";J&&"count"!==q&&(X="avg"===q,W=a[q]);var $=k.size,Q=_(k.start),tt=_(k.end)+(Q-i.tickIncrement(Q,$,!1,x))/1e6;for(p=Q;p=0&&v=0&&g-1,flipY:L.tiling.flip.indexOf("y")>-1,orientation:L.tiling.orientation,pad:{inner:L.tiling.pad},maxDepth:L._maxDepth}).descendants(),z=1/0,D=-1/0;I.forEach(function(t){var e=t.depth;e>=L._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),D=Math.max(D,e))}),p=p.data(I,c.getPtId),L._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append("g").classed("slice",!0),T(p,!1,{},[v,g],x),p.order();var R=null;if(w&&M){var F=c.getPtId(M);p.each(function(t){null===R&&c.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})})}var B=function(){return R||{x0:0,x1:v,y0:0,y1:g}},N=p;return w&&(N=N.transition().each("end",function(){var e=n.select(this);c.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=m(s.y0),s._y1=m(s.y1),s._hoverX=y(s.x1-L.tiling.pad),s._hoverY=O?m(s.y1-L.tiling.pad/2):m(s.y0+L.tiling.pad/2);var p=n.select(this),d=i.ensureSingle(p,"path","surface",function(t){t.style("pointer-events",S?"none":"all")});w?d.transition().attrTween("d",function(t){var e=k(t,!1,B(),[v,g],{orientation:L.tiling.orientation,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1});return function(t){return x(e(t))}}):d.attr("d",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,t,{isTransitioning:t._transitioning}),d.call(l,s,L,t,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=h(s,r,L,e,E)||"";var T=i.ensureSingle(p,"g","slicetext"),M=i.ensureSingle(T,"text","",function(t){t.attr("data-notex",1)}),I=i.ensureUniformFontSize(t,c.determineTextFont(L,s,E.font));M.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":C?"start":"middle").call(a.font,I).call(o.convertToTspans,t),s.textBB=a.bBox(M.node()),s.transform=b(s,{fontSize:I.size}),s.transform.fontSize=I.size,w?M.transition().attrTween("transform",function(t){var e=A(t,!1,B(),[v,g]);return function(t){return _(e(t))}}):M.attr("transform",_(s))}),R}},29044:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"icicle",basePlotModule:r(59564),categories:[],animatable:!0,attributes:r(97376),layoutAttributes:r(90676),supplyDefaults:r(7045),supplyLayoutDefaults:r(4304),calc:r(73876).r,crossTraceCalc:r(73876).q,plot:r(38364),style:r(47192).style,colorbar:r(5528),meta:{}}},90676:function(t){"use strict";t.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(t,e,r){"use strict";var n=r(3400),i=r(90676);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("iciclecolorway",e.colorway),r("extendiciclecolors")}},25132:function(t,e,r){"use strict";var n=r(74148),i=r(83024);t.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s="h"===r.orientation,l=r.maxDepth,u=e[0],c=e[1];l&&(u=(t.height+1)*e[0]/Math.min(t.height+1,l),c=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],u]:[e[0],c])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},38364:function(t,e,r){"use strict";var n=r(95808),i=r(67880);t.exports=function(t,e,r,a){return n(t,e,r,a,{type:"icicle",drawDescendants:i})}},47192:function(t,e,r){"use strict";var n=r(33428),i=r(76308),a=r(3400),o=r(82744).resizeText,s=r(60404);function l(t,e,r,n){var o=e.data.data,l=!e.children,u=o.i,c=a.castOption(r,u,"marker.line.color")||i.defaultLine,f=a.castOption(r,u,"marker.line.width")||0;t.call(s,e,r,n).style("stroke-width",f).call(i.stroke,c).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(".trace");o(t,e,"icicle"),e.each(function(e){var r=n.select(this),i=e[0].trace;r.style("opacity",i.opacity),r.selectAll("path.surface").each(function(e){n.select(this).call(l,e,i,t)})})},styleOne:l}},95188:function(t,e,r){"use strict";for(var n=r(45464),i=r(52904).zorder,a=r(21776).Ks,o=r(92880).extendFlat,s=r(47797).colormodel,l=["rgb","rgba","rgba256","hsl","hsla"],u=[],c=[],f=0;f0||n.inbox(r-c.y0,r-(c.y0+c.h*f.dy),0)>0)){var d=Math.floor((e-c.x0)/f.dx),v=Math.floor(Math.abs(r-c.y0)/f.dy);if(f._hasZ?s=c.z[v][d]:f._hasSource&&(s=f._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,v,1,1).data),s){var g=c.hi||f.hoverinfo;if(g){var y=g.split("+");-1!==y.indexOf("all")&&(y=["color"]),-1!==y.indexOf("color")&&(l=!0)}var m=o.colormodel[f.colormodel],x=m.colormodel||f.colormodel,b=x.length,_=f._scaler(s),w=m.suffix,T=[];(f.hovertemplate||l)&&(T.push("["+[_[0]+w[0],_[1]+w[1],_[2]+w[2]].join(", ")),4===b&&T.push(", "+_[3]+w[3]),T.push("]"),T=T.join(""),t.extraText=x.toUpperCase()+": "+T),a(f.hovertext)&&a(f.hovertext[v])?u=f.hovertext[v][d]:a(f.text)&&a(f.text[v])&&(u=f.text[v][d]);var k=p.c2p(c.y0+(v+.5)*f.dy),A=c.x0+(d+.5)*f.dx,M=c.y0+(v+.5)*f.dy,S="["+s.slice(0,f.colormodel.length).join(", ")+"]";return[i.extendFlat(t,{index:[v,d],x0:h.c2p(c.x0+d*f.dx),x1:h.c2p(c.x0+(d+1)*f.dx),y0:k,y1:k,color:_,xVal:A,xLabelVal:A,yVal:M,yLabelVal:M,zLabelVal:S,text:u,hovertemplateLabels:{zLabel:S,colorLabel:T,"color[0]Label":_[0]+w[0],"color[1]Label":_[1]+w[1],"color[2]Label":_[2]+w[2],"color[3]Label":_[3]+w[3]}})]}}}},48928:function(t,e,r){"use strict";t.exports={attributes:r(95188),supplyDefaults:r(13188),calc:r(93336),plot:r(63715),style:r(28576),hoverPoints:r(24892),eventData:r(79972),moduleType:"trace",name:"image",basePlotModule:r(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.strTranslate,o=r(9616),s=r(47797),l=r(9188),u=r(2264).STYLE;t.exports=function(t,e,r,c){var f=e.xaxis,h=e.yaxis,p=!t._context._exportedPlot&&l();i.makeTraceGroups(c,r,"im").each(function(e){var r,l,c,d,v,g,y=n.select(this),m=e[0],x=m.trace,b=("fast"===x.zsmooth||!1===x.zsmooth&&p)&&!x._hasZ&&x._hasSource&&"linear"===f.type&&"linear"===h.type;x._realImage=b;var _=m.z,w=m.x0,T=m.y0,k=m.w,A=m.h,M=x.dx,S=x.dy;for(g=0;void 0===r&&g0;)l=f.c2p(w+g*M),g--;for(g=0;void 0===d&&g0;)v=h.c2p(T+g*S),g--;lz[0];if(D||R){var F=r+E/2,B=d+L/2;O+="transform:"+a(F+"px",B+"px")+"scale("+(D?-1:1)+","+(R?-1:1)+")"+a(-F+"px",-B+"px")+";"}}P.attr("style",O);var N=new Promise(function(t){if(x._hasZ)t();else if(x._hasSource){if(x._canvas&&x._canvas.el.width===k&&x._canvas.el.height===A&&x._canvas.source===x.source)t();else{var e=document.createElement("canvas");e.width=k,e.height=A;var r=e.getContext("2d",{willReadFrequently:!0});x._image=x._image||new Image;var n=x._image;n.onload=function(){r.drawImage(n,0,0),x._canvas={el:e,source:x.source},t()},n.setAttribute("src",x.source)}}}).then(function(){var t;if(x._hasZ)t=C(function(t,e){var r=_[e][t];return i.isTypedArray(r)&&(r=Array.from(r)),r}).toDataURL("image/png");else if(x._hasSource){if(b)t=x.source;else{var e=x._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,k,A).data;t=C(function(t,r){var n=4*(r*k+t);return[e[n],e[n+1],e[n+2],e[n+3]]}).toDataURL("image/png")}}P.attr({"xlink:href":t,height:L,width:E,x:r,y:d})});t._promises.push(N)})}},28576:function(t,e,r){"use strict";var n=r(33428);t.exports=function(t){n.select(t).selectAll(".im image").style("opacity",function(t){return t[0].trace.opacity})}},89864:function(t,e,r){"use strict";var n=r(92880).extendFlat,i=r(92880).extendDeep,a=r(67824).overrideAll,o=r(25376),s=r(22548),l=r(86968).u,u=r(94724),c=r(31780).templatedArray,f=r(48164),h=r(29736).descriptionOnlyNumbers,p=o({editType:"plot",colorEditType:"plot"}),d={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:s.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},v={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},g=c("step",i({},d,{range:v}));t.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:l({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:n({},p,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:h("value")},font:n({},p,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:h("value")},increasing:{symbol:{valType:"string",dflt:f.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:f.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:f.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:f.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:n({},p,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:i({},d,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:s.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:a({range:v,visible:n({},u.visible,{dflt:!0}),tickmode:u.minor.tickmode,nticks:u.nticks,tick0:u.tick0,dtick:u.dtick,tickvals:u.tickvals,ticktext:u.ticktext,ticks:n({},u.ticks,{dflt:"outside"}),ticklen:u.ticklen,tickwidth:u.tickwidth,tickcolor:u.tickcolor,ticklabelstep:u.ticklabelstep,showticklabels:u.showticklabels,labelalias:u.labelalias,tickfont:o({}),tickangle:u.tickangle,tickformat:u.tickformat,tickformatstops:u.tickformatstops,tickprefix:u.tickprefix,showtickprefix:u.showtickprefix,ticksuffix:u.ticksuffix,showticksuffix:u.showticksuffix,separatethousands:u.separatethousands,exponentformat:u.exponentformat,minexponent:u.minexponent,showexponent:u.showexponent,editType:"plot"},"plot"),steps:g,threshold:{line:{color:n({},d.line.color,{}),width:n({},d.line.width,{dflt:1}),editType:"plot"},thickness:n({},d.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},92728:function(t,e,r){"use strict";var n=r(7316);e.name="indicator",e.plot=function(t,r,i,a){n.plotBasePlot(e.name,t,r,i,a)},e.clean=function(t,r,i,a){n.cleanBasePlot(e.name,t,r,i,a)}},79136:function(t){"use strict";t.exports={calc:function(t,e){var r=[],n=e.value;"number"!=typeof e._lastValue&&(e._lastValue=e.value);var i=e._lastValue,a=i;return e._hasDelta&&"number"==typeof e.delta.reference&&(a=e.delta.reference),r[0]={y:n,lastY:i,delta:n-a,relativeDelta:(n-a)/a},r}}},12096:function(t){"use strict";t.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},20424:function(t,e,r){"use strict";var n=r(3400),i=r(89864),a=r(86968).Q,o=r(31780),s=r(51272),l=r(12096),u=r(26332),c=r(25404),f=r(95936),h=r(42568);function p(t,e){function r(r,a){return n.coerce(t,e,i.gauge.steps,r,a)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}t.exports={supplyDefaults:function(t,e,r,d){function v(r,a){return n.coerce(t,e,i,r,a)}a(e,d,v),v("mode"),e._hasNumber=-1!==e.mode.indexOf("number"),e._hasDelta=-1!==e.mode.indexOf("delta"),e._hasGauge=-1!==e.mode.indexOf("gauge");var g,y,m,x,b,_,w=v("value");e._range=[0,"number"==typeof w?1.5*w:1];var T=[,,];if(e._hasNumber){v("number.valueformat");var k=n.extendFlat({},d.font);k.size=void 0,n.coerceFont(v,"number.font",k),void 0===e.number.font.size&&(e.number.font.size=l.defaultNumberFontSize,T[0]=!0),v("number.prefix"),v("number.suffix"),g=e.number.font.size}if(e._hasDelta){var A=n.extendFlat({},d.font);A.size=void 0,n.coerceFont(v,"delta.font",A),void 0===e.delta.font.size&&(e.delta.font.size=(e._hasNumber?.5:1)*(g||l.defaultNumberFontSize),T[1]=!0),v("delta.reference",e.value),v("delta.relative"),v("delta.valueformat",e.delta.relative?"2%":""),v("delta.increasing.symbol"),v("delta.increasing.color"),v("delta.decreasing.symbol"),v("delta.decreasing.color"),v("delta.position"),v("delta.prefix"),v("delta.suffix"),y=e.delta.font.size}e._scaleNumbers=(!e._hasNumber||T[0])&&(!e._hasDelta||T[1])||!1;var M=n.extendFlat({},d.font);function S(t,e){return n.coerce(m,x,i.gauge,t,e)}function E(t,e){return n.coerce(b,_,i.gauge.axis,t,e)}if(M.size=.25*(g||y||l.defaultNumberFontSize),n.coerceFont(v,"title.font",M),v("title.text"),e._hasGauge){(m=t.gauge)||(m={}),x=o.newContainer(e,"gauge"),S("shape"),(e._isBullet="bullet"===e.gauge.shape)||v("title.align","center"),(e._isAngular="angular"===e.gauge.shape)||v("align","center"),S("bgcolor",d.paper_bgcolor),S("borderwidth"),S("bordercolor"),S("bar.color"),S("bar.line.color"),S("bar.line.width"),S("bar.thickness",l.valueThickness*("bullet"===e.gauge.shape?.5:1)),s(m,x,{name:"steps",handleItemDefaults:p}),S("threshold.value"),S("threshold.thickness"),S("threshold.line.width"),S("threshold.line.color"),b={},m&&(b=m.axis||{}),_=o.newContainer(x,"axis"),E("visible"),e._range=E("range",e._range);var L={font:d.font,noAutotickangles:!0,outerTicks:!0};u(b,_,E,"linear"),h(b,_,E,"linear",L),f(b,_,E,"linear",L),c(b,_,E,L)}else v("title.align","center"),v("align","center"),e._isAngular=e._isBullet=!1;e._length=null}}},43480:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"indicator",basePlotModule:r(92728),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:r(89864),supplyDefaults:r(20424).supplyDefaults,calc:r(79136).calc,plot:r(97864),meta:{}}},97864:function(t,e,r){"use strict";var n=r(33428),i=r(67756).qy,a=r(67756).Gz,o=r(3400),s=o.strScale,l=o.strTranslate,u=o.rad2deg,c=r(84284).MID_SHIFT,f=r(43616),h=r(12096),p=r(72736),d=r(54460),v=r(28336),g=r(37668),y=r(94724),m=r(76308),x={left:"start",center:"middle",right:"end"},b={left:0,center:.5,right:1},_=/[yzafpnµmkMGTPEZY]/;function w(t){return t&&t.duration>0}function T(t){t.each(function(t){m.stroke(n.select(this),t.line.color)}).each(function(t){m.fill(n.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function k(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),a={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,y,t,e)}return v(i,a,l,s,n),g(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function M(t,e,r,i){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(a);return o.text(t).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function S(t,e,r,n,i,a){var s="_cache"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}t.exports=function(t,e,r,v){var g,y=t._fullLayout;w(r)&&v&&(g=v()),o.makeTraceGroups(y._indicatorlayer,e,"trace").each(function(e){var v,E,L,C,P,O=e[0].trace,I=n.select(this),z=O._hasGauge,D=O._isAngular,R=O._isBullet,F=O.domain,B={w:y._size.w*(F.x[1]-F.x[0]),h:y._size.h*(F.y[1]-F.y[0]),l:y._size.l+y._size.w*F.x[0],r:y._size.r+y._size.w*(1-F.x[1]),t:y._size.t+y._size.h*(1-F.y[1]),b:y._size.b+y._size.h*F.y[0]},N=B.l+B.w/2,j=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,q=O.align||"center";if(E=j,z){if(D&&(v=N,E=j+U/2,L=function(t){var e;return[(e=.9*V)/Math.sqrt(t.width/2*(t.width/2)+t.height*t.height),t,e]}),R){var H=h.bulletPadding,G=1-h.bulletNumberDomainSize+H;v=B.l+(G+(1-G)*b[q])*B.w,L=function(t){return A(t,(h.bulletNumberDomainSize-H)*B.w,B.h)}}}else v=B.l+b[q]*B.w,L=function(t){return A(t,B.w,B.h)};(function(t,e,r,i){var u=r[0].trace,c=i.numbersX,h=i.numbersY,v=u.align||"center",g=x[v],y=i.transitionOpts,T=i.onComplete,A=o.ensureSingle(e,"g","numbers"),E=[];u._hasNumber&&E.push("number"),u._hasDelta&&(E.push("delta"),"left"===u.delta.position&&E.reverse());var L=A.selectAll("text").data(E);function C(e,r,n,i){if(!e.match("s")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=k(t,{tickformat:e.slice().replace("s","f").replace(/\d+/,function(t){return parseInt(t)-1})});return function(t){return 1>Math.abs(t)?d.tickText(a,t).text:r(t)}}L.enter().append("text"),L.attr("text-anchor",function(){return g}).attr("class",function(t){return t}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),L.exit().remove();var P=u.mode+u.align;if(u._hasDelta&&(D=function(){var e=k(t,{tickformat:u.delta.valueformat},u._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=u.delta.suffix,s=u.delta.prefix,l=function(t){return u.delta.relative?t.relativeDelta:t.delta},c=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?u.delta.increasing.symbol:u.delta.decreasing.symbol)+s+e(t)+o},h=function(t){return t.delta>=0?u.delta.increasing.color:u.delta.decreasing.color};void 0===u._deltaLastValue&&(u._deltaLastValue=l(r[0]));var v=A.select("text.delta");function x(){v.text(c(l(r[0]),i)).call(m.fill,h(r[0])).call(p.convertToTspans,t)}return v.call(f.font,u.delta.font).call(m.fill,h({delta:u._deltaLastValue})),w(y)?v.transition().duration(y.duration).ease(y.easing).tween("text",function(){var t=n.select(this),e=l(r[0]),o=u._deltaLastValue,s=C(u.delta.valueformat,i,o,e),f=a(o,e);return u._deltaLastValue=e,function(e){t.text(c(f(e),s)),t.call(m.fill,h({delta:f(e)}))}}).each("end",function(){x(),T&&T()}).each("interrupt",function(){x(),T&&T()}):x(),I=M(c(l(r[0]),i),u.delta.font,g,t),v}(),P+=u.delta.position+u.delta.font.size+u.delta.font.family+u.delta.valueformat+(u.delta.increasing.symbol+u.delta.decreasing.symbol),z=I),u._hasNumber&&(function(){var e=k(t,{tickformat:u.number.valueformat},u._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=u.number.suffix,s=u.number.prefix,l=A.select("text.number");function c(){var e="number"==typeof r[0].y?s+i(r[0].y)+o:"-";l.text(e).call(f.font,u.number.font).call(p.convertToTspans,t)}w(y)?l.transition().duration(y.duration).ease(y.easing).each("end",function(){c(),T&&T()}).each("interrupt",function(){c(),T&&T()}).attrTween("text",function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);u._lastValue=r[0].y;var l=C(u.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}}):c(),O=M(s+i(r[0].y)+o,u.number.font,g,t)}(),P+=u.number.font.size+u.number.font.family+u.number.valueformat+u.number.suffix+u.number.prefix,z=O),u._hasDelta&&u._hasNumber){var O,I,z,D,R,F,B=[(O.left+O.right)/2,(O.top+O.bottom)/2],N=[(I.left+I.right)/2,(I.top+I.bottom)/2],j=.75*u.delta.font.size;"left"===u.delta.position&&(R=S(u,"deltaPos",0,-1*(O.width*b[u.align]+I.width*(1-b[u.align])+j),P,Math.min),F=B[1]-N[1],z={width:O.width+I.width+j,height:Math.max(O.height,I.height),left:I.left+R,right:O.right,top:Math.min(O.top,I.top+F),bottom:Math.max(O.bottom,I.bottom+F)}),"right"===u.delta.position&&(R=S(u,"deltaPos",0,O.width*(1-b[u.align])+I.width*b[u.align]+j,P,Math.max),F=B[1]-N[1],z={width:O.width+I.width+j,height:Math.max(O.height,I.height),left:O.left,right:I.right+R,top:Math.min(O.top,I.top+F),bottom:Math.max(O.bottom,I.bottom+F)}),"bottom"===u.delta.position&&(R=null,F=I.height,z={width:Math.max(O.width,I.width),height:O.height+I.height,left:Math.min(O.left,I.left),right:Math.max(O.right,I.right),top:O.bottom-O.height,bottom:O.bottom+I.height}),"top"===u.delta.position&&(R=null,F=O.top,z={width:Math.max(O.width,I.width),height:O.height+I.height,left:Math.min(O.left,I.left),right:Math.max(O.right,I.right),top:O.bottom-O.height-I.height,bottom:O.bottom}),D.attr({dx:R,dy:F})}(u._hasNumber||u._hasDelta)&&A.attr("transform",function(){var t,e=i.numbersScaler(z);P+=e[2];var r=S(u,"numbersScale",1,e[0],P,Math.min);u._scaleNumbers||(r=1),t=u._isAngular?h-r*z.bottom:h-r*(z.top+z.bottom)/2,u._numbersTop=r*z.top+t;var n=z[v];"center"===v&&(n=(z.left+z.right)/2);var a=c-r*n;return l(a=S(u,"numbersTranslate",0,a,P,Math.max),t)+s(r)})})(t,I,e,{numbersX:v,numbersY:E,numbersScaler:L,transitionOpts:r,onComplete:g}),z&&(C={range:O.gauge.axis.range,color:O.gauge.bgcolor,line:{color:O.gauge.bordercolor,width:0},thickness:1},P={range:O.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:O.gauge.bordercolor,width:O.gauge.borderwidth},thickness:1});var W=I.selectAll("g.angular").data(D?e:[]);W.exit().remove();var Y=I.selectAll("g.angularaxis").data(D?e:[]);Y.exit().remove(),D&&function(t,e,r,a){var o,s,f,h,p,v,g=r[0].trace,y=a.size,m=a.radius,x=a.innerRadius,b=a.gaugeBg,_=a.gaugeOutline,A=[y.l+y.w/2,y.t+y.h/2+m/2],M=a.gauge,S=a.layer,E=a.transitionOpts,L=a.onComplete,C=Math.PI/2;function P(t){var e=g.gauge.axis.range[0],r=(t-e)/(g.gauge.axis.range[1]-e)*Math.PI-C;return r<-C?-C:r>C?C:r}function O(t){return n.svg.arc().innerRadius((x+m)/2-t/2*(m-x)).outerRadius((x+m)/2+t/2*(m-x)).startAngle(-C)}function I(t){t.attr("d",function(t){return O(t.thickness).startAngle(P(t.range[0])).endAngle(P(t.range[1]))()})}M.enter().append("g").classed("angular",!0),M.attr("transform",l(A[0],A[1])),S.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),S.selectAll("g.xangularaxistick,path,text").remove(),(f=k(t,g.gauge.axis)).type="linear",f.range=g.gauge.axis.range,f._id="xangularaxis",f.ticklabeloverflow="allow",f.setScale();var z=function(t){return(f.range[0]-t.x)/(f.range[1]-f.range[0])*Math.PI+Math.PI},D={},R=d.makeLabelFns(f,0).labelStandoff;D.xFn=function(t){return Math.cos(z(t))*R},D.yFn=function(t){var e=z(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(R+t.fontSize*r)+t.fontSize*c*Math.abs(Math.cos(e))},D.anchorFn=function(t){var e=Math.cos(z(t));return .1>Math.abs(e)?"middle":e>0?"start":"end"},D.heightFn=function(t,e,r){return -.5*(1+Math.sin(z(t)))*r};var F=function(t){return l(A[0]+m*Math.cos(t),A[1]-m*Math.sin(t))};if(p=function(t){return F(z(t))},h=d.calcTicks(f),v=d.getTickSigns(f)[2],f.visible){v="inside"===f.ticks?-1:1;var B=(f.linewidth||1)/2;d.drawTicks(t,f,{vals:h,layer:S,path:"M"+v*B+",0h"+v*f.ticklen,transFn:function(t){var e=z(t);return F(e)+"rotate("+-u(e)+")"}}),d.drawLabels(t,f,{vals:h,layer:S,transFn:p,labelFns:D})}var N=[b].concat(g.gauge.steps),j=M.selectAll("g.bg-arc").data(N);j.enter().append("g").classed("bg-arc",!0).append("path"),j.select("path").call(I).call(T),j.exit().remove();var U=O(g.gauge.bar.thickness),V=M.selectAll("g.value-arc").data([g.gauge.bar]);V.enter().append("g").classed("value-arc",!0).append("path");var q=V.select("path");w(E)?(q.transition().duration(E.duration).ease(E.easing).each("end",function(){L&&L()}).each("interrupt",function(){L&&L()}).attrTween("d",(o=P(r[0].lastY),s=P(r[0].y),function(){var t=i(o,s);return function(e){return U.endAngle(t(e))()}})),g._lastValue=r[0].y):q.attr("d","number"==typeof r[0].y?U.endAngle(P(r[0].y)):"M0,0Z"),q.call(T),V.exit().remove(),N=[];var H=g.gauge.threshold.value;(H||0===H)&&N.push({range:[H,H],color:g.gauge.threshold.color,line:{color:g.gauge.threshold.line.color,width:g.gauge.threshold.line.width},thickness:g.gauge.threshold.thickness});var G=M.selectAll("g.threshold-arc").data(N);G.enter().append("g").classed("threshold-arc",!0).append("path"),G.select("path").call(I).call(T),G.exit().remove();var W=M.selectAll("g.gauge-outline").data([_]);W.enter().append("g").classed("gauge-outline",!0).append("path"),W.select("path").call(I).call(T),W.exit().remove()}(t,0,e,{radius:U,innerRadius:V,gauge:W,layer:Y,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:g});var X=I.selectAll("g.bullet").data(R?e:[]);X.exit().remove();var Z=I.selectAll("g.bulletaxis").data(R?e:[]);Z.exit().remove(),R&&function(t,e,r,n){var i,a,o,s,u,c=r[0].trace,f=n.gauge,p=n.layer,v=n.gaugeBg,g=n.gaugeOutline,y=n.size,x=c.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform",l(y.l,y.t)),p.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),p.selectAll("g.xbulletaxistick,path,text").remove();var A=y.h,M=c.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(c._hasNumber||c._hasDelta?1-h.bulletNumberDomainSize:1);function L(t){t.attr("width",function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))}).attr("x",function(t){return i.c2p(t.range[0])}).attr("y",function(t){return .5*(1-t.thickness)*A}).attr("height",function(t){return t.thickness*A})}(i=k(t,c.gauge.axis))._id="xbulletaxis",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],u=y.t+y.h,i.visible&&(d.drawTicks(t,i,{vals:"inside"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,u,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,u)}));var C=[v].concat(c.gauge.steps),P=f.selectAll("g.bg-bullet").data(C);P.enter().append("g").classed("bg-bullet",!0).append("rect"),P.select("rect").call(L).call(T),P.exit().remove();var O=f.selectAll("g.value-bullet").data([c.gauge.bar]);O.enter().append("g").classed("value-bullet",!0).append("rect"),O.select("rect").attr("height",M).attr("y",(A-M)/2).call(T),w(b)?O.select("rect").transition().duration(b.duration).ease(b.easing).each("end",function(){_&&_()}).each("interrupt",function(){_&&_()}).attr("width",Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],r[0].y)))):O.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],r[0].y))):0),O.exit().remove();var I=r.filter(function(){return c.gauge.threshold.value||0===c.gauge.threshold.value}),z=f.selectAll("g.threshold-bullet").data(I);z.enter().append("g").classed("threshold-bullet",!0).append("line"),z.select("line").attr("x1",i.c2p(c.gauge.threshold.value)).attr("x2",i.c2p(c.gauge.threshold.value)).attr("y1",(1-c.gauge.threshold.thickness)/2*A).attr("y2",(1-(1-c.gauge.threshold.thickness)/2)*A).call(m.stroke,c.gauge.threshold.line.color).style("stroke-width",c.gauge.threshold.line.width),z.exit().remove();var D=f.selectAll("g.gauge-outline").data([g]);D.enter().append("g").classed("gauge-outline",!0).append("rect"),D.select("rect").call(L).call(T),D.exit().remove()}(t,0,e,{gauge:X,layer:Z,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:g});var K=I.selectAll("text.title").data(e);K.exit().remove(),K.enter().append("text").classed("title",!0),K.attr("text-anchor",function(){return R?x.right:x[O.title.align]}).text(O.title.text).call(f.font,O.title.font).call(p.convertToTspans,t),K.attr("transform",function(){var t,e=B.l+B.w*b[O.title.align],r=h.titlePadding,n=f.bBox(K.node());return z?(D&&(t=O.gauge.axis.visible?f.bBox(Y.node()).top-r-n.bottom:B.t+B.h/2-U/2-n.bottom-r),R&&(t=E-(n.top+n.bottom)/2,e=B.l-h.bulletPadding*B.w)):t=O._numbersTop-r-n.bottom,l(e,t)})})}},50048:function(t,e,r){"use strict";var n=r(49084),i=r(29736).axisHoverFormat,a=r(21776).Ks,o=r(52948),s=r(45464),l=r(92880).extendFlat,u=r(67824).overrideAll;function c(t){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function f(t){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var h=t.exports=u(l({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:c("x"),y:c("y"),z:c("z")},caps:{x:f("x"),y:f("y"),z:f("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),valuehoverformat:i("value",1),showlegend:l({},s.showlegend,{dflt:!1})},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),"calc","nested");h.flatshading.dflt=!0,h.lighting.facenormalsepsilon.dflt=0,h.x.editType=h.y.editType=h.z.editType=h.value.editType="calc+clearAxisTypes",h.transforms=void 0},62624:function(t,e,r){"use strict";var n=r(47128),i=r(3832).processGrid,a=r(3832).filter;t.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function I(l,u,c){r=e;var f=[u],h=[c];if(s>=1)f=[u],h=[c];else if(s>0){var p,d,v,y,m,x,b,_,w,T,k,A,M,S=(p=u,d=c,_=P(x=function(t,e,r){for(var n=[],i=0;i-1?c[D]:function(t,e,s){for(var l=o.length,u=r;u-1?z[D]=j:z[D]=C(R,F,B,null===l?N:l)}L=z[0],O=z[1],I=z[2],t._meshI.push(L),t._meshJ.push(O),t._meshK.push(I),++g}}function z(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function D(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function R(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function F(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o,s,l,u=!1,c=[(o=e[0][3])>=n&&o<=i,(s=e[1][3])>=n&&s<=i,(l=e[2][3])>=n&&l<=i];if(!c[0]&&!c[1]&&!c[2])return!1;var f=function(t,e,r){return D(e[0][3])&&D(e[1][3])&&D(e[2][3])?(I(t,e,r),!0):a<3&&F(t,e,r,S,E,++a)};if(c[0]&&c[1]&&c[2])return f(t,e,r)||u;var h=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(a){if(c[a[0]]&&c[a[1]]&&!c[a[2]]){var o=e[a[0]],s=e[a[1]],l=e[a[2]],p=z(l,o,n,i),d=z(l,s,n,i);u=f(t,[d,p,o],[-1,-1,r[a[0]]])||u,u=f(t,[o,s,d],[r[a[0]],r[a[1]],-1])||u,h=!0}}),h||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(a){if(c[a[0]]&&!c[a[1]]&&!c[a[2]]){var o=e[a[0]],s=e[a[1]],l=e[a[2]],p=z(s,o,n,i);u=f(t,[z(l,o,n,i),p,o],[-1,-1,r[a[0]]])||u,h=!0}}),u}function B(t,e,r,n){var i,a,o,s,l,u=!1,c=R(e),f=[(i=c[0][3])>=r&&i<=n,(a=c[1][3])>=r&&a<=n,(o=c[2][3])>=r&&o<=n,(s=c[3][3])>=r&&s<=n];if(!f[0]&&!f[1]&&!f[2]&&!f[3])return u;if(f[0]&&f[1]&&f[2]&&f[3])return v&&((l=function(r,n,i){I(t,[c[r],c[n],c[i]],[e[r],e[n],e[i]])})(0,1,2),l(3,0,1),l(2,3,0),l(1,2,3)),u;var h=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(i){if(f[i[0]]&&f[i[1]]&&f[i[2]]&&!f[i[3]]){var a=c[i[0]],o=c[i[1]],s=c[i[2]],l=c[i[3]];u=v?I(t,[a,o,s],[e[i[0]],e[i[1]],e[i[2]]])||u:I(null,[z(l,a,r,n),z(l,o,r,n),z(l,s,r,n)],[-1,-1,-1])||u,h=!0}}),h||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(i){if(f[i[0]]&&f[i[1]]&&!f[i[2]]&&!f[i[3]]){var a,o,s,l=c[i[0]],p=c[i[1]],d=c[i[2]],g=c[i[3]],y=z(d,l,r,n),m=z(d,p,r,n),x=z(g,p,r,n),b=z(g,l,r,n);v?(u=I(t,[l,b,y],[e[i[0]],-1,-1])||u,u=I(t,[p,m,x],[e[i[1]],-1,-1])||u):(a=[y,m,x,b],o=[-1,-1,-1,-1],(s=function(t,e,r){I(null,[a[t],a[e],a[r]],[o[t],o[e],o[r]])})(0,1,2),s(2,3,0)),h=!0}}),h||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(i){if(f[i[0]]&&!f[i[1]]&&!f[i[2]]&&!f[i[3]]){var a=c[i[0]],o=c[i[1]],s=c[i[2]],l=c[i[3]],p=z(o,a,r,n),d=z(s,a,r,n),g=z(l,a,r,n);v?(u=I(t,[a,p,d],[e[i[0]],-1,-1])||u,u=I(t,[a,d,g],[e[i[0]],-1,-1])||u,u=I(t,[a,g,p],[e[i[0]],-1,-1])||u):u=I(null,[p,d,g],[-1,-1,-1])||u,h=!0}})),u}function N(t,e,r,n,i,a,o,s,l,u,c){var f=!1;return d&&(O(t,"A")&&(f=B(null,[e,r,n,a],u,c)||f),O(t,"B")&&(f=B(null,[r,n,i,l],u,c)||f),O(t,"C")&&(f=B(null,[r,a,o,l],u,c)||f),O(t,"D")&&(f=B(null,[n,a,s,l],u,c)||f),O(t,"E")&&(f=B(null,[r,n,a,l],u,c)||f)),v&&(f=B(t,[r,n,a,l],u,c)||f),f}function j(t,e,r,n,i,a,o,s){return[!0===s[0]||F(t,R([e,r,n]),[e,r,n],a,o),!0===s[1]||F(t,R([n,i,e]),[n,i,e],a,o)]}function U(t,e,r,n,i,a,o,s,l){return s?j(t,e,r,i,n,a,o,l):j(t,r,i,n,e,a,o,l)}function V(t,e,r,n,i,a,o){var s,l,u,c,f=!1,h=function(){f=F(t,[s,l,u],[-1,-1,-1],i,a)||f,f=F(t,[u,c,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],v=o[2];return p&&(s=P(R([k(e,r-0,n-0)])[0],R([k(e-1,r-0,n-0)])[0],p),l=P(R([k(e,r-0,n-1)])[0],R([k(e-1,r-0,n-1)])[0],p),u=P(R([k(e,r-1,n-1)])[0],R([k(e-1,r-1,n-1)])[0],p),c=P(R([k(e,r-1,n-0)])[0],R([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=P(R([k(e-0,r,n-0)])[0],R([k(e-0,r-1,n-0)])[0],d),l=P(R([k(e-0,r,n-1)])[0],R([k(e-0,r-1,n-1)])[0],d),u=P(R([k(e-1,r,n-1)])[0],R([k(e-1,r-1,n-1)])[0],d),c=P(R([k(e-1,r,n-0)])[0],R([k(e-1,r-1,n-0)])[0],d),h()),v&&(s=P(R([k(e-0,r-0,n)])[0],R([k(e-0,r-0,n-1)])[0],v),l=P(R([k(e-0,r-1,n)])[0],R([k(e-0,r-1,n-1)])[0],v),u=P(R([k(e-1,r-1,n)])[0],R([k(e-1,r-1,n-1)])[0],v),c=P(R([k(e-1,r-0,n)])[0],R([k(e-1,r-0,n-1)])[0],v),h()),f}function q(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(I-M)?[A,I]:[I,M];T=z[0],P=z[1],d=!0,W(e,T,P),d=!1}}var D=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];["x","y","z"].forEach(function(e){for(var r=[],n=0;n0&&(f.push(d.id),"x"===e?h.push([d.distRatio,0,0]):"y"===e?h.push([0,d.distRatio,0]):h.push([0,0,d.distRatio]))}else c="x"===e?Y(1,b-1):"y"===e?Y(1,_-1):Y(1,w-1);f.length>0&&("x"===e?r[i]=function(t,e,r,n,i,a){for(var o=[],s=0,l=0;l0&&("x"===e?r[i]=q(null,c,a,o,r[i]):"y"===e?r[i]=H(null,c,a,o,r[i]):r[i]=G(null,c,a,o,r[i]),i++)}var v=t.caps[e];v.show&&v.fill&&(s=v.fill,"x"===e?r[i]=q(null,[0,b-1],a,o,r[i]):"y"===e?r[i]=H(null,[0,_-1],a,o,r[i]):r[i]=G(null,[0,w-1],a,o,r[i]),i++)}}),0===g&&L(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=y,t._Ys=m,t._Zs=x}(),t}t.exports={findNearestOnAxis:u,generateIsoMeshes:p,createIsosurfaceTrace:function(t,e){var r=n({gl:t.glplot.gl}),i=new c(t,r,e.uid);return r._trace=i,i.update(e),t.glplot.add(r),i}}},70548:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(50048),o=r(27260);function s(t,e,r,n,a){var s=a("isomin"),l=a("isomax");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var u=a("x"),c=a("y"),f=a("z"),h=a("value");if(!u||!u.length||!c||!c.length||!f||!f.length||!h||!h.length){e.visible=!1;return}i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach(function(t){a(t+"hoverformat");var e="caps."+t;a(e+".show")&&a(e+".fill");var r="slices."+t;a(r+".show")&&(a(r+".fill"),a(r+".locations"))}),a("spaceframe.show")&&a("spaceframe.fill"),a("surface.show")&&(a("surface.count"),a("surface.fill"),a("surface.pattern")),a("contour.show")&&(a("contour.color"),a("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(t){a(t)}),o(t,e,n,a,{prefix:"",cLetter:"c"}),e._length=null}t.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,function(r,i){return n.coerce(t,e,a,r,i)})},supplyIsoDefaults:s}},6296:function(t,e,r){"use strict";t.exports={attributes:r(50048),supplyDefaults:r(70548).supplyDefaults,calc:r(62624),colorbar:{min:"cmin",max:"cmax"},plot:r(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:r(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(t,e,r){"use strict";var n=r(49084),i=r(29736).axisHoverFormat,a=r(21776).Ks,o=r(16716),s=r(45464),l=r(92880).extendFlat;t.exports=l({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"}),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:"calc"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:"calc"}),showlegend:l({},s.showlegend,{dflt:!1})})},1876:function(t,e,r){"use strict";var n=r(47128);t.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:"",cLetter:"c"})}},576:function(t,e,r){"use strict";var n=r(67792).gl_mesh3d,i=r(67792).delaunay_triangulate,a=r(67792).alpha_shape,o=r(67792).convex_hull,s=r(33040).parseColorScale,l=r(3400).isArrayOrTypedArray,u=r(43080),c=r(8932).extractOpts,f=r(52094);function h(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var p=h.prototype;function d(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}p.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return l(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},p.update=function(t){var e,r=this.scene,n=r.fullSceneLayout;this.data=t;var l=t.x.length,h=f(v(n.xaxis,t.x,r.dataScale[0],t.xcalendar),v(n.yaxis,t.y,r.dataScale[1],t.ycalendar),v(n.zaxis,t.z,r.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!y(t.i,l)||!y(t.j,l)||!y(t.k,l))return;e=f(g(t.i),g(t.j),g(t.k))}else e=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],a=e.length,o=0;oy):g=A>w,y=A;var M=u(w,T,k,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=g?"increasing":"decreasing",M.x=M.pos,M.y=[k,T],m&&(M.orig_p=r[b]),d&&(M.tx=e.text[b]),v&&(M.htx=e.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,"open:")+" ",high:i(t,"high:")+" ",low:i(t,"low:")+" ",close:i(t,"close:")+" "}}),x}t.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(a=0,i=1/0;a"+u.labels[x]+n.hoverLabelText(s,b,l.yhoverformat)):((m=i.extendFlat({},h)).y0=m.y1=_,m.yLabelVal=b,m.yLabel=u.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),m.name="",f.push(m),g[b]=m)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=c(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,v=p.dir;function g(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var y=p.hi||l.hoverinfo,m=y.split("+"),x="all"===y,b=x||-1!==m.indexOf("y"),_=x||-1!==m.indexOf("text"),w=b?[g("open"),g("high"),g("low"),g("close")+" "+u[v]]:[];return _&&s(p,l,w),h.extraText=w.join("
"),h.y0=h.y1=o.c2p(p.yc,!0),[h]}t.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},65456:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"ohlc",basePlotModule:r(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:r(20279),supplyDefaults:r(23860),calc:r(42812).calc,plot:r(36664),style:r(14008),hoverPoints:r(18720).hoverPoints,selectPoints:r(97384)}},52744:function(t,e,r){"use strict";var n=r(24040),i=r(3400);t.exports=function(t,e,r,a){var o=r("x"),s=r("open"),l=r("high"),u=r("low"),c=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x"],a),s&&l&&u&&c){var f=Math.min(s.length,l.length,u.length,c.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},36664:function(t,e,r){"use strict";var n=r(33428),i=r(3400);t.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,"trace ohlc").each(function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty){e.remove();return}var u=a.tickLen,c=e.selectAll("path").data(i.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",function(t){if(t.empty)return"M0,0Z";var e=s.c2p(t.pos-u,!0),r=s.c2p(t.pos+u,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return"M"+e+","+o.c2p(t.o,!0)+"H"+n+"M"+n+","+o.c2p(t.h,!0)+"V"+o.c2p(t.l,!0)+"M"+r+","+o.c2p(t.c,!0)+"H"+n})})}},97384:function(t){"use strict";t.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r=t.length||void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(t.map(function(t){return t.displayindex})))for(e=0;e0||c(s);u&&(o="array");var f=r("categoryorder",o);"array"===f?(r("categoryarray"),r("ticktext")):(delete t.categoryarray,delete t.ticktext),u||"array"!==f||(e.categoryorder="trace")}}t.exports=function(t,e,r,c){function h(r,i){return n.coerce(t,e,l,r,i)}var p=s(t,e,{name:"dimensions",handleItemDefaults:f}),d=function(t,e,r,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,c,h);o(e,c,h),Array.isArray(p)&&p.length||(e.visible=!1),u(e,p,"values",d),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var v={weight:c.font.weight,style:c.font.style,variant:c.font.variant,family:c.font.family,size:Math.round(c.font.size),color:c.font.color};n.coerceFont(h,"labelfont",v);var g={weight:c.font.weight,style:c.font.style,variant:c.font.variant,family:c.font.family,size:Math.round(c.font.size/1.2),color:c.font.color};n.coerceFont(h,"tickfont",g)}},22020:function(t,e,r){"use strict";t.exports={attributes:r(72140),supplyDefaults:r(76671),calc:r(69136),plot:r(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:r(91800),categories:["noOpacity"],meta:{}}},51036:function(t,e,r){"use strict";var n=r(33428),i=r(67756).Gz,a=r(36424),o=r(93024),s=r(3400),l=s.strTranslate,u=r(43616),c=r(49760),f=r(72736);function h(t){return t.key}function p(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function d(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),L=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+v.left,y:w-d.top+v.top,text:E,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:T,idealAlign:L1&&h.displayInd===f.dimensions.length-1?(i=u.left,a="left"):(i=u.left+u.width,a="right");var v=c.model.count,g=c.model.categoryLabel,y=v/c.parcatsViewModel.model.count,m={countLabel:v,categoryLabel:g,probabilityLabel:y.toFixed(3)},x=[];-1!==c.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",m.countLabel].join(" ")),-1!==c.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+m.categoryLabel+"):",m.probabilityLabel].join(" "));var b=x.join("
");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:m,eventData:[{data:p._input,fullData:p,count:v,category:g,probability:y}]}}function E(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!(n.mouse(this)[1]<-1)){var e,r,i,a,l=t.parcatsViewModel.graphDiv,u=l._fullLayout,f=u._paperdiv.node().getBoundingClientRect(),h=t.parcatsViewModel.hoveron;"color"===h?(_(i=k(r=n.select(this).datum())),i.each(function(){s.raiseToTop(this)}),n.select(this.parentNode).selectAll("rect.bandrect").filter(function(t){return t.color===r.color}).each(function(){s.raiseToTop(this),function(t){t.attr("stroke","black").attr("stroke-width",1.5)}(n.select(this))}),M(this,"plotly_hover",n.event)):(n.select(this.parentNode).selectAll("rect.bandrect").each(function(t){var e=k(t);_(e),e.each(function(){s.raiseToTop(this)})}),function(t){t.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(n.select(this.parentNode)),A(this,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===h?e=S(l,f,this):"color"===h?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),u=n.select(r).datum(),f=u.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,v=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a="left"):(i=l.left+l.width,a="right");var g=f.model.categoryLabel,y=u.parcatsViewModel.model.count,m=0;u.categoryViewModel.bands.forEach(function(t){t.color===u.color&&(m+=t.count)});var x=f.model.count,b=0;h.pathSelection.each(function(t){t.model.color===u.color&&(b+=t.model.count)});var _=m/y,w=m/b,T=m/x,k={countLabel:m,categoryLabel:g,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf("count")&&A.push(["Count:",k.countLabel].join(" ")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(A.push("P(color ∩ "+g+"): "+k.probabilityLabel),A.push("P("+g+" | color): "+w.toFixed(3)),A.push("P(color | "+g+"): "+T.toFixed(3)));var M=A.join("
"),S=c.mostReadable(u.color,["black","white"]);return{trace:d,x:o*(i-e.left),y:s*(v-e.top),text:M,color:u.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:g,count:y,probability:_,categorycount:x,colorcount:b,bandcolorcount:m}]}}(l,f,this):"dimension"===h&&(a=[],n.select(this.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){a.push(S(l,f,this))}),e=a),e&&o.loneHover(e,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:l}))}}function L(t){var e=t.parcatsViewModel;e.dragDimension||(b(e.pathSelection),w(e.dimensionSelection.selectAll("g.category")),T(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(d),-1!==e.hoverinfoItems.indexOf("skip"))||("color"===t.parcatsViewModel.hoveron?M(this,"plotly_unhover",n.event):A(this,"plotly_unhover",n.event))}function C(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each(function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map(function(t){return t.displayInd}),e.model.dragY=e.y,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each(function(e){e.yu.y+u.height/2&&(i.model.displayInd=u.model.displayInd,u.model.displayInd=o),t.dragCategoryDisplayInd=i.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){r.model.dragX=n.event.x;var c=t.parcatsViewModel.dimensions[e-1],f=t.parcatsViewModel.dimensions[e+1];void 0!==c&&r.model.dragXf.x&&(r.model.displayInd=f.model.displayInd,f.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=r.model.displayInd}N(t.parcatsViewModel),B(t.parcatsViewModel),D(t.parcatsViewModel),z(t.parcatsViewModel)}}function O(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=I(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),o=t.initialDragDimensionDisplayInds.some(function(t,e){return t!==i[e]});o&&i.forEach(function(r,n){e["dimensions["+t.parcatsViewModel.model.dimensions[n].containerInd+"].displayindex"]=r});var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map(function(t){return t.displayInd});if(s=t.initialDragCategoryDisplayInds.some(function(t,e){return t!==l[e]})){var u=t.model.categories.slice().sort(function(t,e){return t.displayInd-e.displayInd}),c=u.map(function(t){return t.categoryValue}),f=u.map(function(t){return t.categoryLabel});e["dimensions["+t.model.containerInd+"].categoryarray"]=[c],e["dimensions["+t.model.containerInd+"].ticktext"]=[f],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?M(t.potentialClickBand,"plotly_click",n.event.sourceEvent):A(t.potentialClickBand,"plotly_click",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd&&(t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null),t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,N(t.parcatsViewModel),B(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each(function(){D(t.parcatsViewModel,!0),z(t.parcatsViewModel,!0)}).each("end",function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])})}}function I(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)c+="C"+u[s]+","+(e[s+1]+n)+" "+l[s]+","+(e[s]+n)+" "+(t[s]+r[s])+","+(e[s]+n)+"l-"+r[s]+",0 ";return c+"Z"}function B(t){var e=t.dimensions,r=t.model,n=e.map(function(t){return t.categories.map(function(t){return t.y})}),i=t.model.dimensions.map(function(t){return t.categories.map(function(t){return t.displayInd})}),a=t.model.dimensions.map(function(t){return t.displayInd}),o=t.dimensions.map(function(t){return t.model.dimensionInd}),s=e.map(function(t){return t.x}),l=e.map(function(t){return t.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(t){var e=t.categoryInds.map(function(t,e){return i[e][t]});return o.map(function(t){return e[t]})}u.sort(function(e,r){var n=f(e),i=f(r);return("backward"===t.sortpaths&&(n.reverse(),i.reverse()),n.push(e.valueInds[0]),i.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),i.unshift(r.rawColor)),ni?1:0});for(var h=Array(u.length),p=e[0].model.count,d=e[0].categories.map(function(t){return t.height}).reduce(function(t,e){return t+e}),v=0;v0?m.count/p*d:0;for(var x=Array(n.length),b=0;b1?(t.width-80-16)/(l-1):0)*u;var c=[],f=t.model.maxCats,h=e.categories.length,p=e.count,d=t.height-8*(f-1),v=(f-h)*8/2,g=e.categories.map(function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}});for(g.sort(function(t,e){return t.displayInd-e.displayInd}),s=0;s0?i.count/p*d:0,a={key:i.valueInds[0],model:i,width:16,height:n,y:null!==i.dragY?i.dragY:v,bands:[],parcatsViewModel:t},v=v+n+8,c.push(a);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:c,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}(t,a))}t.dimensions=r}t.exports=function(t,e,r,i){var a,o,c,y,m,_,k,A,M,S,I,z,D;a=t._context.staticPlot,o=r.map(R.bind(0,t,i)),(c=e.selectAll("g.parcatslayer").data([null])).enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all"),m=(y=c.selectAll("g.trace.parcats").data(o,h)).enter().append("g").attr("class","trace parcats"),y.attr("transform",function(t){return l(t.x,t.y)}),m.append("g").attr("class","paths"),(_=y.select("g.paths").selectAll("path.path").data(function(t){return t.paths},h)).attr("fill",function(t){return t.model.color}),b(k=_.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(t){return t.model.color}).attr("fill-opacity",0)),_.attr("d",function(t){return t.svgD}),k.empty()||_.sort(d),_.exit().remove(),_.on("mouseover",v).on("mouseout",g).on("click",x),m.append("g").attr("class","dimensions"),(A=y.select("g.dimensions").selectAll("g.dimension").data(function(t){return t.dimensions},h)).enter().append("g").attr("class","dimension"),A.attr("transform",function(t){return l(t.x,0)}),A.exit().remove(),S=(M=A.selectAll("g.category").data(function(t){return t.categories},h)).enter().append("g").attr("class","category"),M.attr("transform",function(t){return l(0,t.y)}),S.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",function(t){return t.width}).attr("height",function(t){return t.height}),w(S),(I=M.selectAll("rect.bandrect").data(function(t){return t.bands},h)).each(function(){s.raiseToTop(this)}),I.attr("fill",function(t){return t.color}),z=I.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(t){return t.color}).attr("fill-opacity",0),I.attr("fill",function(t){return t.color}).attr("width",function(t){return t.width}).attr("height",function(t){return t.height}).attr("y",function(t){return t.y}).attr("cursor",function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"perpendicular"===t.parcatsViewModel.arrangement?"ns-resize":"move"}),T(z),I.exit().remove(),S.append("text").attr("class","catlabel").attr("pointer-events","none"),D=t._fullLayout.paper_bgcolor,M.select("text.catlabel").attr("text-anchor",function(t){return p(t)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",f.makeTextShadow(D)).style("fill","rgb(0, 0, 0)").attr("x",function(t){return p(t)?t.width+5:-5}).attr("y",function(t){return t.height/2}).text(function(t){return t.model.categoryLabel}).each(function(e){u.font(n.select(this),e.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),t)}),S.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(t){return t.width/2}).attr("y",-5).text(function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null}).each(function(t){u.font(n.select(this),t.parcatsViewModel.labelfont)}),M.selectAll("rect.bandrect").on("mouseover",E).on("mouseout",L),M.exit().remove(),A.call(n.behavior.drag().origin(function(t){return{x:t.x,y:0}}).on("dragstart",C).on("drag",P).on("dragend",O)),y.each(function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),t.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),y.exit().remove()}},60268:function(t,e,r){"use strict";var n=r(51036);t.exports=function(t,e,r,i){var a=t._fullLayout,o=a._paper,s=a._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},82296:function(t,e,r){"use strict";var n=r(49084),i=r(94724),a=r(25376),o=r(86968).u,s=r(92880).extendFlat,l=r(31780).templatedArray;t.exports={domain:o({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:a({editType:"plot"}),tickfont:a({editType:"plot"}),rangefont:a({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},i.tickvals,{editType:"plot"}),ticktext:s({},i.ticktext,{editType:"plot"}),tickformat:s({},i.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:s({editType:"calc"},n("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(t,e,r){"use strict";var n=r(30140),i=r(33428),a=r(71688).keyFun,o=r(71688).repeat,s=r(3400).sorterAsc,l=r(3400).strTranslate,u=n.bar.snapRatio,c=n.bar.snapClose;function f(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],f=l,h=a;i*he){p=r;break}}if(isNaN(o=f)&&(o=isNaN(h)||isNaN(p)?isNaN(h)?p:h:e-c[h][1]t[1]+r)&&!(e=.9*t[1]+.1*t[0]?"n":e<=.9*t[0]+.1*t[1]?"s":"ns"}(g,e);y&&(s.interval=u[o],s.intervalPix=g,s.region=y)}}if(t.ordinal&&!s.region){var m=t.unitTickvals,x=t.unitToPaddedPx.invert(e);for(r=0;r=b[0]&&x<=b[1]){s.clickableOrdinalRange=b;break}}}return s}function b(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),m(t.parentNode)}function _(t,e){var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=x(e,r),o="crosshair";a.clickableOrdinalRange?o="pointer":a.region&&(o=a.region+"-resize"),i.select(document.body).style("cursor",o)}function w(t){t.on("mousemove",function(t){i.event.preventDefault(),t.parent.inBrushDrag||_(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||g()}).call(i.behavior.drag().on("dragstart",function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=x(e,r),l=s.interval,u=o.svgBrush;if(u.wasDragged=!1,u.grabbingBar="ns"===s.region,u.grabbingBar){var c=l.map(e.unitToPaddedPx);u.grabPoint=r-c[0]-n.verticalPadding,u.barLength=c[1]-c[0]}u.clickableOrdinalRange=s.clickableOrdinalRange,u.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(u.stayingIntervals=u.stayingIntervals.filter(function(t){return t[0]!==l[0]&&t[1]!==l[1]})),u.startExtent=s.region?l["s"===s.region?1:0]:a,e.parent.inBrushDrag=!0,u.brushStartCallback()}(this,t)}).on("drag",function(t){b(this,t)}).on("dragend",function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(_(t,e),b(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,g(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&k(r)):k(r),a.brushCallback(e),m(t.parentNode),a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||k(r),a.brushCallback(e),u?m(t.parentNode,s):(s(),m(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)}))}function T(t,e){return t[0]-e[0]}function k(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function A(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}t.exports={makeBrush:function(t,e,r,n,i,a){var o,l,u,c=(u=[],{set:function(t){1===(u=t.map(function(t){return t.slice().sort(s)}).sort(T)).length&&u[0][0]===-1/0&&u[0][1]===1/0&&(u=[[0,-1]]),o=A(u),l=u.reduce(function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]},[1/0,-1/0])},get:function(){return u.slice()},getConsolidated:function(){return o},getBounds:function(){return l}});return c.set(r),{filter:c,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:function(t){var e=t.brush,r=e.svgBrush.extent.map(function(t){return t.slice()}).slice();e.filter.set(r),i()},brushEndCallback:a}}},ensureAxisBrush:function(t,e,r){var i,s,u,c,f=t.selectAll("."+n.cn.axisBrush).data(o,a);f.enter().append("g").classed(n.cn.axisBrush,!0),i=r._context.staticPlot,(s=f.selectAll(".background").data(o)).enter().append("rect").classed("background",!0).call(h).call(p).style("pointer-events",i?"none":"auto").attr("transform",l(0,n.verticalPadding)),s.call(w).attr("height",function(t){return t.height-n.verticalPadding}),(u=f.selectAll(".highlight-shadow").data(o)).enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",e).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),u.attr("y1",function(t){return t.height}).call(y),(c=f.selectAll(".highlight").data(o)).enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),c.attr("y1",function(t){return t.height}).call(y)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map(function(t){return t.sort(s)}),t=e.multiselect?A(t.sort(T)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map(function(t){var e=[f(0,r,t[0],[]),f(1,r,t[1],[])];if(e[1]>e[0])return e}).filter(function(t){return t})).length)return}return t.length>1?t:t[0]}}},61664:function(t,e,r){"use strict";t.exports={attributes:r(82296),supplyDefaults:r(60664),calc:r(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:r(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(t,e,r){"use strict";var n=r(33428),i=r(84888)._M,a=r(24196),o=r(9616);e.name="parcoords",e.plot=function(t){var e=i(t.calcdata,"parcoords")[0];e.length&&a(t,e)},e.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},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.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":t,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})}),window.setTimeout(function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},95044:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray,i=r(8932),a=r(71688).wrap;t.exports=function(t,e){var r,o;return i.hasColorscale(e,"line")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(t){for(var e=Array(t),r=0;rf&&(n.log("parcoords traces support up to "+f+" dimensions at the moment"),d.splice(f));var v=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:p}),g=function(t,e,r,o,s){var l=s("line.color",r);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,c);o(e,l,c),Array.isArray(v)&&v.length||(e.visible=!1),h(e,v,"values",g);var y={weight:l.font.weight,style:l.font.style,variant:l.font.variant,family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(c,"labelfont",y),n.coerceFont(c,"tickfont",y),n.coerceFont(c,"rangefont",y),c("labelangle"),c("labelside"),c("unselected.line.color"),c("unselected.line.opacity")}},95724:function(t,e,r){"use strict";var n=r(3400).isTypedArray;e.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},e.isOrdinal=function(t){return!!t.tickvals},e.isVisible=function(t){return t.visible||!("visible"in t)}},29928:function(t,e,r){"use strict";var n=r(61664);n.plot=r(24196),t.exports=n},51352:function(t,e,r){"use strict";var n=r(30140).maxDimensionCount,i=r(3400),a=new Uint8Array(4),o=new Uint8Array(4),s={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function l(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function u(t,e){return(t>>>8*e)%256/255}function c(t){var e="0"+t;return e.substr(e.length-2)}function f(t){return t 1.5);\nbool isContext = (drwLayer < 0.5);\n\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\n\nfloat val(mat4 p, mat4 v) {\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\n}\n\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\n return y1 * (1.0 - ratio) + y2 * ratio;\n}\n\nint iMod(int a, int b) {\n return a - b * (a / b);\n}\n\nbool fOutside(float p, float lo, float hi) {\n return (lo < hi) && (lo > p || p > hi);\n}\n\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\n return (\n fOutside(p[0], lo[0], hi[0]) ||\n fOutside(p[1], lo[1], hi[1]) ||\n fOutside(p[2], lo[2], hi[2]) ||\n fOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\n return (\n vOutside(p[0], lo[0], hi[0]) ||\n vOutside(p[1], lo[1], hi[1]) ||\n vOutside(p[2], lo[2], hi[2]) ||\n vOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\n return mOutside(A, loA, hiA) ||\n mOutside(B, loB, hiB) ||\n mOutside(C, loC, hiC) ||\n mOutside(D, loD, hiD);\n}\n\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\n mat4 pnts[4];\n pnts[0] = A;\n pnts[1] = B;\n pnts[2] = C;\n pnts[3] = D;\n\n for(int i = 0; i < 4; ++i) {\n for(int j = 0; j < 4; ++j) {\n for(int k = 0; k < 4; ++k) {\n if(0 == iMod(\n int(255.0 * texture2D(maskTexture,\n vec2(\n (float(i * 2 + j / 2) + 0.5) / 8.0,\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\n ))[3]\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\n 2\n )) return true;\n }\n }\n }\n return false;\n}\n\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\n float x = 0.5 * sign(v) + 0.5;\n float y = axisY(x, A, B, C, D);\n float z = 1.0 - abs(v);\n\n z += isContext ? 0.0 : 2.0 * float(\n outsideBoundingBox(A, B, C, D) ||\n outsideRasterMask(A, B, C, D)\n );\n\n return vec4(\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\n z,\n 1.0\n );\n}\n\nvoid main() {\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\n\n float v = colors[3];\n\n gl_Position = position(isContext, v, A, B, C, D);\n\n fragColor =\n isContext ? vec4(contextColor) :\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\n}",frag:"precision highp float;\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}",primitive:"lines",lineWidth:b,attributes:w,uniforms:{resolution:y.prop("resolution"),viewBoxPos:y.prop("viewBoxPos"),viewBoxSize:y.prop("viewBoxSize"),dim0A:y.prop("dim0A"),dim1A:y.prop("dim1A"),dim0B:y.prop("dim0B"),dim1B:y.prop("dim1B"),dim0C:y.prop("dim0C"),dim1C:y.prop("dim1C"),dim0D:y.prop("dim0D"),dim1D:y.prop("dim1D"),loA:y.prop("loA"),hiA:y.prop("hiA"),loB:y.prop("loB"),hiB:y.prop("hiB"),loC:y.prop("loC"),hiC:y.prop("hiC"),loD:y.prop("loD"),hiD:y.prop("hiD"),palette:T,contextColor:y.prop("contextColor"),maskTexture:y.prop("maskTexture"),drwLayer:y.prop("drwLayer"),maskHeight:y.prop("maskHeight")},offset:y.prop("offset"),count:y.prop("count")});function M(t){r=t.model,p=(c=t.viewModel.dimensions.slice())[0]?c[0].values.length:0;var e=r.lines,a=g?e.color.map(function(t,r){return r/e.color.length}):e.color,o=function(t,e,r){for(var i=Array(t*(n+4)),a=0,o=0;ox&&(x=t[o].dim1.canvasX,u=o);0===f&&l(y,0,0,r.canvasWidth,r.canvasHeight);var b=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&ns._length&&(D=D.slice(0,s._length));var R=s.tickvals;function F(t,e){return{val:t,text:E[e]}}function B(t,e){return t.val-e.val}if(a(R)&&R.length){i.isTypedArray(R)&&(R=Array.from(R)),a(E=s.ticktext)&&E.length?E.length>R.length?E=E.slice(0,R.length):R.length>E.length&&(R=R.slice(0,E.length)):E=R.map(o(s.tickformat));for(var N=1;N=r)&&!(l>=i)){var u=t.lineLayer.readPixel(s,i-1-l),c=0!==u[3],f=c?u[2]+256*(u[1]+256*u[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==N&&(c?a.hover(h):a.unhover&&a.unhover(h),N=f)}}}),B.style("opacity",function(t){return t.pick?0:1}),w.style("background","rgba(255, 255, 255, 0)");var j=w.selectAll("."+x.cn.parcoords).data(F,v);j.exit().remove(),j.enter().append("g").classed(x.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),j.attr("transform",function(t){return c(t.model.translateX,t.model.translateY)});var U=j.selectAll("."+x.cn.parcoordsControlView).data(g,v);U.enter().append("g").classed(x.cn.parcoordsControlView,!0),U.attr("transform",function(t){return c(t.model.pad.l,t.model.pad.t)});var V=U.selectAll("."+x.cn.yAxis).data(function(t){return t.dimensions},v);V.enter().append("g").classed(x.cn.yAxis,!0),U.each(function(t){P(V,t,z)}),B.each(function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=_(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}}),V.attr("transform",function(t){return c(t.xScale(t.xIndex),0)}),V.call(n.behavior.drag().origin(function(t){return t}).on("drag",function(t){var e=t.parent;R.linePickActive(!1),t.x=Math.max(-x.overdrag,Math.min(t.model.width+x.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,V.sort(function(t,e){return t.x-e.x}).each(function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio}),P(V,e,z),V.filter(function(e){return 0!==Math.abs(t.xIndex-e.xIndex)}).attr("transform",function(t){return c(t.xScale(t.xIndex),0)}),n.select(this).attr("transform",c(t.x,0)),V.each(function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!M(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)}).on("dragend",function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,P(V,e,z),n.select(this).attr("transform",function(t){return c(t.x,0)}),e.contextLayer&&e.contextLayer.render(e.panels,!1,!M(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),R.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map(function(t){return t.crossfilterDimensionIndex}))})),V.exit().remove();var q=V.selectAll("."+x.cn.axisOverlays).data(g,v);q.enter().append("g").classed(x.cn.axisOverlays,!0),q.selectAll("."+x.cn.axis).remove();var H=q.selectAll("."+x.cn.axis).data(g,v);H.enter().append("g").classed(x.cn.axis,!0),H.each(function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat(function(e){return m.isOrdinal(t)?e:O(t.model.dimensions[t.visibleIndex],e)}).scale(r)),h.font(H.selectAll("text"),t.model.tickFont)}),H.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),H.selectAll("text").style("text-shadow",f.makeTextShadow(D)).style("cursor","default");var G=q.selectAll("."+x.cn.axisHeading).data(g,v);G.enter().append("g").classed(x.cn.axisHeading,!0);var W=G.selectAll("."+x.cn.axisTitle).data(g,v);W.enter().append("text").classed(x.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",p?"none":"auto"),W.text(function(t){return t.label}).each(function(e){var r=n.select(this);h.font(r,e.model.labelFont),f.convertToTspans(r,t)}).attr("transform",function(t){var e=C(t.model.labelAngle,t.model.labelSide),r=x.axisTitleOffset;return(e.dir>0?"":c(0,2*r+t.model.height))+u(e.degrees)+c(-r*e.dx,-r*e.dy)}).attr("text-anchor",function(t){var e=C(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?"start":"end":"middle"});var Y=q.selectAll("."+x.cn.axisExtent).data(g,v);Y.enter().append("g").classed(x.cn.axisExtent,!0);var X=Y.selectAll("."+x.cn.axisExtentTop).data(g,v);X.enter().append("g").classed(x.cn.axisExtentTop,!0),X.attr("transform",c(0,-x.axisExtentOffset));var Z=X.selectAll("."+x.cn.axisExtentTopText).data(g,v);Z.enter().append("text").classed(x.cn.axisExtentTopText,!0).call(L),Z.text(function(t){return I(t,!0)}).each(function(t){h.font(n.select(this),t.model.rangeFont)});var K=Y.selectAll("."+x.cn.axisExtentBottom).data(g,v);K.enter().append("g").classed(x.cn.axisExtentBottom,!0),K.attr("transform",function(t){return c(0,t.model.height+x.axisExtentOffset)});var J=K.selectAll("."+x.cn.axisExtentBottomText).data(g,v);J.enter().append("text").classed(x.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(L),J.text(function(t){return I(t,!1)}).each(function(t){h.font(n.select(this),t.model.rangeFont)}),b.ensureAxisBrush(q,D,t)}},24196:function(t,e,r){"use strict";var n=r(36336),i=r(5048),a=r(95724).isVisible,o={};function s(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return -1===i&&(i+=e.length),i}(t.exports=function(t,e){var r=t._fullLayout;if(i(t,[],o)){var l={},u={},c={},f={},h=r._size;e.forEach(function(e,r){var n=e[0].trace;c[r]=n.index;var i=f[r]=n._fullInput.index;l[r]=t.data[i].dimensions,u[r]=t.data[i].dimensions.slice()}),n(t,e,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(e,n,i){var a=u[e][n],o=i.map(function(t){return t.slice()}),s="dimensions["+n+"].constraintrange",l=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===l[s]){var h=a.constraintrange;l[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit("plotly_restyle",[d,[f[e]]])},hover:function(e){t.emit("plotly_hover",e)},unhover:function(e){t.emit("plotly_unhover",e)},axesMoved:function(e,r){var n,i=(n=u[e].filter(a),function(t,e){return s(r,n,t)-s(r,n,e)});l[e].sort(i),u[e].filter(function(t){return!a(t)}).sort(function(t){return u[e].indexOf(t)}).forEach(function(t){l[e].splice(l[e].indexOf(t),1),l[e].splice(u[e].indexOf(t),0,t)}),t.emit("plotly_restyle",[{dimensions:[l[e]]},[f[e]]])}})}}).reglPrecompiled=o},74996:function(t,e,r){"use strict";var n=r(45464),i=r(86968).u,a=r(25376),o=r(22548),s=r(21776).Ks,l=r(21776).Gw,u=r(92880).extendFlat,c=r(98192).c,f=a({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:c,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:u({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:u({},f,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:u({},f,{}),outsidetextfont:u({},f,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:u({},f,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:i({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:u({},f,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(t,e,r){"use strict";var n=r(7316);e.name="pie",e.plot=function(t,r,i,a){n.plotBasePlot(e.name,t,r,i,a)},e.clean=function(t,r,i,a){n.cleanBasePlot(e.name,t,r,i,a)}},45768:function(t,e,r){"use strict";var n=r(38248),i=r(49760),a=r(76308),o={};function s(t){return function(e,r){return!!(e&&(e=i(e)).isValid())&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e)}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(r=0,a=t.slice();r=0}),("funnelarea"===e.type?v:e.sort)&&r.sort(function(t,e){return e.v-t.v}),r[0]&&(r[0].vTotal=d),r},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r="pie");var n=t._fullLayout,i=t.calcdata,a=n[r+"colorway"],s=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=l(a,o));for(var u=0,c=0;c0){r=!0;break}}r||(s=0)}return{hasLabels:a,hasValues:o,len:s}}function c(t,e,r,n,i){n("marker.line.width")&&n("marker.line.color",i?void 0:r.paper_bgcolor);var a=n("marker.colors");l(n,"marker.pattern",a),t.marker&&!e.marker.pattern.fgcolor&&(e.marker.pattern.fgcolor=t.marker.colors),e.marker.pattern.bgcolor||(e.marker.pattern.bgcolor=r.paper_bgcolor)}t.exports={handleLabelsAndValues:u,handleMarkerDefaults:c,supplyDefaults:function(t,e,r,n){function l(r,n){return i.coerce(t,e,a,r,n)}var f,h=u(l("labels"),l("values")),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(l("label0"),l("dlabel")),!p){e.visible=!1;return}e._length=p,c(t,e,n,l,!0),l("scalegroup");var d=l("text"),v=l("texttemplate");if(v||(f=l("textinfo",i.isArrayOrTypedArray(d)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),v||f&&"none"!==f){var g=l("textposition");s(t,e,n,l,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&l("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&l("insidetextorientation")}else"none"===f&&l("textposition","none");o(e,n,l);var y=l("hole");if(l("title.text")){var m=l("title.position",y?"middle center":"top center");y||"middle center"!==m||(e.title.position="top center"),i.coerceFont(l,"title.font",n.font)}l("sort"),l("direction"),l("rotation"),l("pull")}}},53644:function(t,e,r){"use strict";var n=r(10624).appendArrayMultiPointValues;t.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),"funnelarea"===e.type&&(delete r.v,delete r.i),r}},21552:function(t,e,r){"use strict";var n=r(43616),i=r(76308);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)}},69656: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"),name:f.hovertemplate||-1!==h.indexOf("name")?f.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:g.castOption(_.bgcolor,t.pts)||t.color,borderColor:g.castOption(_.bordercolor,t.pts),fontFamily:g.castOption(w.family,t.pts),fontSize:g.castOption(w.size,t.pts),fontColor:g.castOption(w.color,t.pts),nameLength:g.castOption(_.namelength,t.pts),textAlign:g.castOption(_.align,t.pts),hovertemplate:g.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[y(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:T}),t.bbox=T[0],u._hasHoverLabel=!0}u._hasHoverEvent=!0,e.emit("plotly_hover",{points:[y(t,f)],event:n.event})}}),t.on("mouseout",function(t){var r=e._fullLayout,i=e._fullData[u.index],o=n.select(this).datum();u._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[y(o,i)],event:n.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),u._hasHoverLabel=!1)}),t.on("click",function(t){var r=e._fullLayout,i=e._fullData[u.index];e._dragging||!1===r.hovermode||(e._hoverdata=[y(t,i)],a.click(e,n.event))})}function b(t,e,r){var n=g.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=g.castOption(t._input.textfont.color,e.pts));var i=g.castOption(t.insidetextfont.family,e.pts)||g.castOption(t.textfont.family,e.pts)||r.family,a=g.castOption(t.insidetextfont.size,e.pts)||g.castOption(t.textfont.size,e.pts)||r.size,s=g.castOption(t.insidetextfont.weight,e.pts)||g.castOption(t.textfont.weight,e.pts)||r.weight,l=g.castOption(t.insidetextfont.style,e.pts)||g.castOption(t.textfont.style,e.pts)||r.style,u=g.castOption(t.insidetextfont.variant,e.pts)||g.castOption(t.textfont.variant,e.pts)||r.variant;return{color:n||o.contrast(e.color),family:i,size:a,weight:s,style:l,variant:u}}function _(t,e){for(var r,n,i=0;ir&&r>s||o=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(c||h){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(o||p||c){if((v={scale:i*n*2/Math.sqrt(t.width*t.width+t.height*t.height),rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,v.scale>=1)return v;d.push(v)}(p||h)&&((v=T(t,n,a,s,l)).textPosAngle=(e.startangle+e.stopangle)/2,d.push(v)),(p||f)&&((v=k(t,n,a,s,l)).textPosAngle=(e.startangle+e.stopangle)/2,d.push(v));for(var m=0,x=0,b=0;b=1)break}return d[m]}function T(t,e,r,n,i){e=Math.max(0,e-2*v);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:A(a,o/e),rotate:M(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*v);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:A(a,o/e),rotate:M(i+Math.PI/2)}}function A(t,e){return Math.cos(e)-t*e}function M(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function L(t,e){var r,n,i=1,a=1,o=t.trace,s={x:t.cx,y:t.cy},l={tx:0,ty:0};l.ty+=o.title.font.size,n=P(o),-1!==o.title.position.indexOf("top")?(s.y-=(1+n)*t.r,l.ty-=t.titleBox.height):-1!==o.title.position.indexOf("bottom")&&(s.y+=(1+n)*t.r);var u=t.r/(void 0===(r=t.trace.aspectratio)?1:r),c=e.w*(o.domain.x[1]-o.domain.x[0])/2;return -1!==o.title.position.indexOf("left")?(c+=u,s.x-=(1+n)*u,l.tx+=t.titleBox.width/2):-1!==o.title.position.indexOf("center")?c*=2:-1!==o.title.position.indexOf("right")&&(c+=u,s.x+=(1+n)*u,l.tx-=t.titleBox.width/2),i=c/t.titleBox.width,a=C(t,e)/t.titleBox.height,{x:s.x,y:s.y,scale:Math.min(i,a),tx:l.tx,ty:l.ty}}function C(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function P(t){var e,r=t.pull;if(!r)return 0;if(l.isArrayOrTypedArray(r))for(e=0,r=0;er&&(r=t.pull[e]);return r}function O(t,e){for(var r=[],n=0;n1?l=(s=r.r)/i.aspectratio:s=(l=r.r)*i.aspectratio,s*=(1+i.baseratio)/2,o=s*l),u=Math.min(u,o/r.vTotal));for(n=0;n")}if(a){var x=l.castOption(i,e.i,"texttemplate");if(x){var b={label:e.label,value:e.v,valueLabel:g.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:g.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:l.castOption(i,e.i,"customdata")},_=g.getFirstFilled(i.text,e.pts);(m(_)||""===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=""}}function D(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}t.exports={plot:function(t,e){var r=t._context.staticPlot,a=t._fullLayout,h=a._size;d("pie",a),_(e,t),O(e,h);var v=l.makeTraceGroups(a._pielayer,e,"trace").each(function(e){var d=n.select(this),v=e[0],y=v.trace;(function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=g.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,u="px0",c="px1";if("counterclockwise"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=r.v!==i.vTotal||i.trace.hole?Math.min(1/(1+1/Math.sin(r.halfangle)),r.ring/2):1)})(e),d.attr("stroke-linejoin","round"),d.each(function(){var m=n.select(this).selectAll("g.slice").data(e);m.enter().append("g").classed("slice",!0),m.exit().remove();var _=[[[],[]],[[],[]]],T=!1;m.each(function(i,o){if(i.hidden){n.select(this).selectAll("path,g").remove();return}i.pointNumber=i.i,i.curveNumber=y.index,_[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var u=v.cx,c=v.cy,h=n.select(this),d=h.selectAll("path.surface").data([i]);if(d.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),h.call(x,t,e),y.pull){var m=+g.castOption(y.pull,i.pts)||0;m>0&&(u+=m*i.pxmid[0],c+=m*i.pxmid[1])}function k(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return"a"+n*v.r+","+n*v.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+a+","+o}i.cxFinal=u,i.cyFinal=c;var A=y.hole;if(i.v===v.vTotal){var M="M"+(u+i.px0[0])+","+(c+i.px0[1])+k(i.px0,i.pxmid,!0,1)+k(i.pxmid,i.px0,!0,1)+"Z";A?d.attr("d","M"+(u+A*i.px0[0])+","+(c+A*i.px0[1])+k(i.px0,i.pxmid,!1,A)+k(i.pxmid,i.px0,!1,A)+"Z"+M):d.attr("d",M)}else{var S=k(i.px0,i.px1,!0,1);if(A){var L=1-A;d.attr("d","M"+(u+A*i.px1[0])+","+(c+A*i.px1[1])+k(i.px1,i.px0,!1,A)+"l"+L*i.px0[0]+","+L*i.px0[1]+S+"Z")}else d.attr("d","M"+u+","+c+"l"+i.px0[0]+","+i.px0[1]+S+"Z")}z(t,i,v);var C=g.castOption(y.textposition,i.pts),P=h.selectAll("g.slicetext").data(i.text&&"none"!==C?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var r,h,d=l.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),m=l.ensureUniformFontSize(t,"outside"===C?(r=a.font,{color:g.castOption(y.outsidetextfont.color,i.pts)||g.castOption(y.textfont.color,i.pts)||r.color,family:g.castOption(y.outsidetextfont.family,i.pts)||g.castOption(y.textfont.family,i.pts)||r.family,size:g.castOption(y.outsidetextfont.size,i.pts)||g.castOption(y.textfont.size,i.pts)||r.size,weight:g.castOption(y.outsidetextfont.weight,i.pts)||g.castOption(y.textfont.weight,i.pts)||r.weight,style:g.castOption(y.outsidetextfont.style,i.pts)||g.castOption(y.textfont.style,i.pts)||r.style,variant:g.castOption(y.outsidetextfont.variant,i.pts)||g.castOption(y.textfont.variant,i.pts)||r.variant}):b(y,i,a.font));d.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,m).call(f.convertToTspans,t);var x=s.bBox(d.node());if("outside"===C)h=E(x,i);else if(h=w(x,i,v),"auto"===C&&h.scale<1){var _=l.ensureUniformFontSize(t,y.outsidetextfont);d.call(s.font,_),h=E(x=s.bBox(d.node()),i)}var k=h.textPosAngle,A=void 0===k?i.pxmid:I(v.r,k);if(h.targetX=u+A[0]*h.rCenter+(h.x||0),h.targetY=c+A[1]*h.rCenter+(h.y||0),D(h,x),h.outside){var M=h.targetY;i.yLabelMin=M-x.height/2,i.yLabelMid=M,i.yLabelMax=M+x.height/2,i.labelExtraX=0,i.labelExtraY=0,T=!0}h.fontSize=m.size,p(y.type,h,a),e[o].transform=h,l.setTransormAndDisplay(d,h)})});var k=n.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(k.enter().append("g").classed("titletext",!0),k.exit().remove(),k.each(function(){var e,r,i=l.ensureSingle(n.select(this),"text","",function(t){t.attr("data-notex",1)}),a=y.title.text;y._meta&&(a=l.templateString(a,y._meta)),i.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,y.title.font).call(f.convertToTspans,t),r="middle center"===y.title.position?(e=Math.sqrt(v.titleBox.width*v.titleBox.width+v.titleBox.height*v.titleBox.height),{x:v.cx,y:v.cy,scale:v.trace.hole*v.r*2/e,tx:0,ty:-v.titleBox.height/2+v.trace.title.font.size}):L(v,h),i.attr("transform",c(r.x,r.y)+u(Math.min(1,r.scale))+c(r.tx,r.ty))}),T&&function(t,e){var r,n,i,a,o,s,u,c,f,h,p,d,v;function y(t,e){return t.pxmid[1]-e.pxmid[1]}function m(t,e){return e.pxmid[1]-t.pxmid[1]}for(n=0;n<2;n++)for(r=0,i=n?y:m,o=n?Math.max:Math.min,u=n?1:-1;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(c=t[n][r]).sort(i),h=(f=t[1-n][r]).concat(c),d=[],p=0;p0&&(t.labelExtraY=x),l.isArrayOrTypedArray(e.pull))for(c=0;c=(g.castOption(e.pull,f.pts)||0))&&((t.pxmid[1]-f.pxmid[1])*u>0?(x=f.cyFinal+o(f.px0[1],f.px1[1])-v-t.labelExtraY)*u>0&&(t.labelExtraY+=x):(y+t.labelExtraY-m)*u>0&&(i=3*s*Math.abs(c-h.indexOf(t)),(p=f.cxFinal+a(f.px0[0],f.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=p)))}(d[p],x)}}}(_,y),function(t,e){t.each(function(t){var r=n.select(this);if(!t.labelExtraX&&!t.labelExtraY){r.select("path.textline").remove();return}var i=r.select("g.slicetext text");t.transform.targetX+=t.labelExtraX,t.transform.targetY+=t.labelExtraY,l.setTransormAndDisplay(i,t.transform);var a=t.cxFinal+t.pxmid[0],s="M"+a+","+(t.cyFinal+t.pxmid[1]),u=(t.yLabelMax-t.yLabelMin)*(t.pxmid[0]<0?-1:1)/4;if(t.labelExtraX){var c=t.labelExtraX*t.pxmid[1]/t.pxmid[0],f=t.yLabelMid+t.labelExtraY-(t.cyFinal+t.pxmid[1]);Math.abs(c)>Math.abs(f)?s+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(a+t.labelExtraX+u):s+="l"+t.labelExtraX+","+c+"v"+(f-c)+"h"+u}else s+="V"+(t.yLabelMid+t.labelExtraY)+"h"+u;l.ensureSingle(r,"path","textline").call(o.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:s,fill:"none"})})}(m,y),T&&y.automargin){var A=s.bBox(d.node()),M=y.domain,S=h.w*(M.x[1]-M.x[0]),C=h.h*(M.y[1]-M.y[0]),P=(.5*S-v.r)/h.w,O=(.5*C-v.r)/h.h;i.autoMargin(t,"pie."+y.uid+".automargin",{xl:M.x[0]-P,xr:M.x[1]+P,yb:M.y[0]-O,yt:M.y[1]+O,l:Math.max(v.cx-v.r-A.left,0),r:Math.max(A.right-(v.cx+v.r),0),b:Math.max(A.bottom-(v.cy+v.r),0),t:Math.max(v.cy-v.r-A.top,0),pad:5})}})});setTimeout(function(){v.selectAll("tspan").each(function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))})},0)},formatSliceLabel:z,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:L,prerenderTitles:_,layoutAreas:O,attachFxHandlers:x,computeTransform:D}},22152:function(t,e,r){"use strict";var n=r(33428),i=r(10528),a=r(82744).resizeText;t.exports=function(t){var e=t._fullLayout._pielayer.selectAll(".trace");a(t,e,"pie"),e.each(function(e){var r=e[0].trace,a=n.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(e){n.select(this).call(i,e,r,t)})})}},10528:function(t,e,r){"use strict";var n=r(76308),i=r(69656).castOption,a=r(21552);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)}},35484:function(t,e,r){"use strict";var n=r(52904);t.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},11072:function(t,e,r){"use strict";var n=r(67792).gl_pointcloud2d,i=r(3400).isArrayOrTypedArray,a=r(43080),o=r(19280).findExtremes,s=r(44928);function l(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var u=l.prototype;u.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:i(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},u.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=s(t,{})},u.updateFast=function(t){var e,r,n,i,s,l,u=this.xData=this.pickXData=t.x,c=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;ld[2]&&(d[2]=i),sd[3]&&(d[3]=s);if(p)r=p;else for(l=0,r=new Int32Array(e);ld[2]&&(d[2]=i),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var v=a(t.marker.color),g=a(t.marker.border.color),y=t.opacity*t.marker.opacity;v[3]*=y,this.pointcloudOptions.color=v;var m=t.marker.blend;null===m&&(m=u.length<100||c.length<100),this.pointcloudOptions.blend=m,g[3]*=y,this.pointcloudOptions.borderColor=g;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,T=b/2||.5;t._extremes[_._id]=o(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=o(w,[d[1],d[3]],{ppad:T})},u.dispose=function(){this.pointcloud.dispose()},t.exports=function(t,e){var r=new l(t,e.uid);return r.update(e),r}},41904:function(t,e,r){"use strict";var n=r(3400),i=r(35484);t.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio"),e._length=null}},156:function(t,e,r){"use strict";t.exports={attributes:r(35484),supplyDefaults:r(41904),calc:r(41484),plot:r(11072),moduleType:"trace",name:"pointcloud",basePlotModule:r(39952),categories:["gl","gl2d","showLegend"],meta:{}}},41440:function(t,e,r){"use strict";var n=r(25376),i=r(45464),a=r(22548),o=r(55756),s=r(86968).u,l=r(21776).Ks,u=r(49084),c=r(31780).templatedArray,f=r(29736).descriptionOnlyNumbers,h=r(92880).extendFlat,p=r(67824).overrideAll;(t.exports=p({hoverinfo:h({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:f("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),colorscales:c("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:h(u().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},10760:function(t,e,r){"use strict";var n=r(67824).overrideAll,i=r(84888)._M,a=r(59596),o=r(65460),s=r(93972),l=r(86476),u=r(22676).prepSelect,c=r(3400),f=r(24040),h="sankey";e.name=h,e.baseLayoutAttrOverrides=n({hoverlabel:o.hoverlabel},"plot","nested"),e.plot=function(t){var r=i(t.calcdata,h)[0];a(t,r),e.updateFx(t)},e.clean=function(t,e,r,n){var i=n._has&&n._has(h),a=e._has&&e._has(h);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())},e.updateFx=function(t){for(var e=0;eb&&(b=u.source[e]),u.target[e]>b&&(b=u.target[e]);var _=b+1;t.node._count=_;var w=t.node.groups,T={};for(e=0;e0&&s(L,_)&&s(C,_))||T.hasOwnProperty(L)&&T.hasOwnProperty(C)&&T[L]===T[C])){T.hasOwnProperty(C)&&(C=T[C]),T.hasOwnProperty(L)&&(L=T[L]),C=+C,d[L=+L]=d[C]=!0;var P="";u.label&&u.label[e]&&(P=u.label[e]);var O=null;P&&v.hasOwnProperty(P)&&(O=v[P]),c.push({pointNumber:e,label:P,color:f?u.color[e]:u.color,hovercolor:h?u.hovercolor[e]:u.hovercolor,customdata:p?u.customdata[e]:u.customdata,concentrationscale:O,source:L,target:C,value:+E}),S.source.push(L),S.target.push(C)}}var I=_+w.length,z=o(a.color),D=o(a.customdata),R=[];for(e=0;e_-1,childrenNodes:[],pointNumber:e,label:F,color:z?a.color[e]:a.color,customdata:D?a.customdata[e]:a.customdata})}var B=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1})}(I,S.source,S.target)&&(B=!0),{circular:B,links:c,nodes:R,groups:w,groupLookup:T}}(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},11820:function(t){"use strict";t.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},47140:function(t,e,r){"use strict";var n=r(3400),i=r(41440),a=r(76308),o=r(49760),s=r(86968).Q,l=r(16132),u=r(31780),c=r(51272);function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}t.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d,v=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,y=u.newContainer(e,"node");function m(t,e){return n.coerce(g,y,i.node,t,e)}m("label"),m("groups"),m("x"),m("y"),m("pad"),m("thickness"),m("line.color"),m("line.width"),m("hoverinfo",t.hoverinfo),l(g,y,m,v),m("hovertemplate"),m("align");var x=h.colorway;m("color",y.label.map(function(t,e){return a.addOpacity(x[e%x.length],.8)})),m("customdata");var b=t.link||{},_=u.newContainer(e,"link");function w(t,e){return n.coerce(b,_,i.link,t,e)}w("label"),w("arrowlen"),w("source"),w("target"),w("value"),w("line.color"),w("line.width"),w("hoverinfo",t.hoverinfo),l(b,_,w,v),w("hovertemplate");var T=.333>o(h.paper_bgcolor).getLuminance(),k=w("color",T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)");function A(t){var e=o(t);if(!e.isValid())return t;var r=e.getAlpha();return r<=.8?e.setAlpha(r+.2):e=T?e.brighten():e.darken(),e.toRgbString()}w("hovercolor",Array.isArray(k)?k.map(A):A(k)),w("customdata"),c(b,_,{name:"colorscales",handleItemDefaults:f}),s(e,h,p),p("orientation"),p("valueformat"),p("valuesuffix"),y.x.length&&y.y.length&&(d="freeform"),p("arrangement",d),n.coerceFont(p,"textfont",n.extendFlat({},h.font)),e._length=null}},45499:function(t,e,r){"use strict";t.exports={attributes:r(41440),supplyDefaults:r(47140),calc:r(48068),plot:r(59596),moduleType:"trace",name:"sankey",basePlotModule:r(10760),selectPoints:r(81128),categories:["noOpacity"],meta:{}}},59596:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=i.numberFormat,o=r(83248),s=r(93024),l=r(76308),u=r(11820).cn,c=i._;function f(t){return""!==t}function h(t,e){return t.filter(function(t){return t.key===e.traceId})}function p(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function d(t){n.select(t).select("text.name").style("fill","black")}function v(t){return function(e){return -1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return -1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function y(t,e,r){e&&r&&h(r,e).selectAll("."+u.sankeyLink).filter(v(e)).call(x.bind(0,e,r,!1))}function m(t,e,r){e&&r&&h(r,e).selectAll("."+u.sankeyLink).filter(v(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){n.style("fill",function(t){if(!t.link.concentrationscale)return t.tinyColorHoverHue}).style("fill-opacity",function(t){if(!t.link.concentrationscale)return t.tinyColorHoverAlpha}),n.each(function(r){var n=r.link.label;""!==n&&h(e,t).selectAll("."+u.sankeyLink).filter(function(t){return t.link.label===n}).style("fill",function(t){if(!t.link.concentrationscale)return t.tinyColorHoverHue}).style("fill-opacity",function(t){if(!t.link.concentrationscale)return t.tinyColorHoverAlpha})}),r&&h(e,t).selectAll("."+u.sankeyNode).filter(g(t)).call(y)}function b(t,e,r,n){n.style("fill",function(t){return t.tinyColorHue}).style("fill-opacity",function(t){return t.tinyColorAlpha}),n.each(function(r){var n=r.link.label;""!==n&&h(e,t).selectAll("."+u.sankeyLink).filter(function(t){return t.link.label===n}).style("fill",function(t){return t.tinyColorHue}).style("fill-opacity",function(t){return t.tinyColorAlpha})}),r&&h(e,t).selectAll(u.sankeyNode).filter(g(t)).call(m)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}t.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,v=0;v"),color:_(o,"bgcolor")||l.addOpacity(v.color,1),borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),fontWeight:_(o,"font.weight"),fontStyle:_(o,"font.style"),fontVariant:_(o,"font.variant"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:n.event.x"),color:_(o,"bgcolor")||i.tinyColorHue,borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),fontWeight:_(o,"font.weight"),fontStyle:_(o,"font.style"),fontVariant:_(o,"font.variant"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:m,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,i,a),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit("plotly_unhover",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(m,r,i),s.click(t,{target:!0})}}})}},83248:function(t,e,r){"use strict";var n=r(49812),i=r(67756).Gz,a=r(33428),o=r(26800),s=r(48932),l=r(11820),u=r(49760),c=r(76308),f=r(43616),h=r(3400),p=h.strTranslate,d=h.strRotate,v=r(71688),g=v.keyFun,y=v.repeat,m=v.unwrap,x=r(72736),b=r(24040),_=r(84284),w=_.CAP_SHIFT,T=_.LINE_SPACING;function k(t,e,r){var n=m(e),i=n.trace,a=i.domain,c="h"===i.orientation,f=i.node.pad,p=i.node.thickness,d={justify:o.sankeyJustify,left:o.sankeyLeft,right:o.sankeyRight,center:o.sankeyCenter}[i.node.align],v=t.width*(a.x[1]-a.x[0]),g=t.height*(a.y[1]-a.y[0]),y=n._nodes,x=n._links,b=n.circular;(T=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(c?[v,g]:[g,v]).nodeWidth(p).nodePadding(f).nodeId(function(t){return t.pointNumber}).nodeAlign(d).nodes(y).links(x);var _=T();for(var w in T.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+f})}(function(t){var e,r,n=t.map(function(t,e){return{x0:t.x0,index:e}}).sort(function(t,e){return t.x0-e.x0}),i=[],a=-1,o=-1/0;for(k=0;ko+p&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(y=_.nodes)),T.update(_)}return{circular:b,key:r,trace:i,guid:h.randstr(),horizontal:c,width:v,height:g,nodePad:i.node.pad,nodeLineColor:i.node.line.color,nodeLineWidth:i.node.line.width,linkLineColor:i.link.line.color,linkLineWidth:i.link.line.width,linkArrowLength:i.link.arrowlen,valueFormat:i.valueformat,valueSuffix:i.valuesuffix,textFont:i.textfont,translateX:a.x[0]*t.width+t.margin.l,translateY:t.height-a.y[1]*t.height+t.margin.t,dragParallel:c?g:v,dragPerpendicular:c?v:g,arrangement:i.arrangement,sankey:T,graph:_,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(t,e,r){var n=u(e.color),i=u(e.hovercolor),a=e.source.label+"|"+e.target.label;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:a+"__"+r,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:c.tinyRGB(n),tinyColorAlpha:n.getAlpha(),tinyColorHoverHue:c.tinyRGB(i),tinyColorHoverAlpha:i.getAlpha(),linkPath:M,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,linkArrowLength:t.linkArrowLength,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function M(){return function(t){var e,r,n,a,o=t.linkArrowLength;if(t.link.circular)return e=t.link,r=o,n=e.width/2,a=e.circularPathData,"top"===e.circularLinkType?"M "+(a.targetX-r)+" "+(a.targetY+n)+" L"+(a.rightInnerExtent-r)+" "+(a.targetY+n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 1 "+(a.rightFullExtent-n-r)+" "+(a.targetY-a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n-r)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 1 "+(a.rightInnerExtent-r)+" "+(a.verticalFullExtent-n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY-a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.leftInnerExtent+" "+(a.sourceY-n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 0 "+(a.leftFullExtent-n)+" "+(a.sourceY-a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"L"+(a.rightInnerExtent-r)+" "+(a.verticalFullExtent+n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 0 "+(a.rightFullExtent+n-r)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n-r)+" "+(a.targetY-a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 0 "+(a.rightInnerExtent-r)+" "+(a.targetY-n)+"L"+(a.targetX-r)+" "+(a.targetY-n)+(r>0?"L"+a.targetX+" "+a.targetY:"")+"Z":"M "+(a.targetX-r)+" "+(a.targetY-n)+" L"+(a.rightInnerExtent-r)+" "+(a.targetY-n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n-r)+" "+(a.targetY+a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n-r)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-r)+" "+(a.verticalFullExtent+n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY+a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.leftInnerExtent+" "+(a.sourceY+n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n)+" "+(a.sourceY+a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"L"+(a.rightInnerExtent-r)+" "+(a.verticalFullExtent-n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-r)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n-r)+" "+(a.targetY+a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightInnerExtent-r)+" "+(a.targetY+n)+"L"+(a.targetX-r)+" "+(a.targetY+n)+(r>0?"L"+a.targetX+" "+a.targetY:"")+"Z";var s=Math.abs((t.link.target.x0-t.link.source.x1)/2);o>s&&(o=s);var l=t.link.source.x1,u=t.link.target.x0-o,c=i(l,u),f=c(.5),h=c(.5),p=t.link.y0-t.link.width/2,d=t.link.y0+t.link.width/2,v=t.link.y1-t.link.width/2,g=t.link.y1+t.link.width/2,y="M"+l+","+p,m="C"+f+","+p+" "+h+","+v+" "+u+","+v,x="C"+h+","+g+" "+f+","+d+" "+l+","+d,b=o>0?"L"+(u+o)+","+(v+t.link.width/2):"";return y+m+(b+="L"+u+","+g)+x+"Z"}}function S(t,e){var r=u(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s="node_"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:128>=r.getBrightness(),tinyColorHue:c.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join("_"),interactionState:t.interactionState,figure:t}}function E(t){t.attr("transform",function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function L(t){t.call(E)}function C(t,e){t.call(L),e.attr("d",M())}function P(t){t.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function O(t){return t.link.width>1||t.linkLineWidth>0}function I(t){return p(t.translateX,t.translateY)+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function z(t,e,r){t.on(".basic",null).on("mouseover.basic",function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])}).on("mousemove.basic",function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])}).on("mouseout.basic",function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.unhover(this,t,e),t.interactionState.hovered=!1)}).on("click.basic",function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||t.partOfGroup||r.select(this,t,e)})}function D(t,e,r,i){var o=a.behavior.drag().origin(function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}}).on("dragstart",function(a){if("fixed"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,"g","dragcover",function(t){i._fullLayout._dragCover=t}),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),"snap"===a.arrangement)){var o,s=a.traceId+"|"+a.key;a.forceLayouts[s]?a.forceLayouts[s].alpha(1):(function(t){for(var e=0;e0&&a.forceLayouts[s].alpha(0)}).stop()),window.requestAnimationFrame(function r(){for(n=0;n0)window.requestAnimationFrame(r);else{var n,o=a.node.originalX;a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2,R(a,i)}})}}).on("drag",function(r){if("fixed"!==r.arrangement){var n=a.event.x,i=a.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i))),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2,F(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),C(t.filter(B(r)),e))}}).on("dragend",function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;el&&P[y].gap;)y--;for(x=P[y].s,v=P.length-1;v>y;v--)P[v].s=x;for(;lS[s]&&s=0;c--){var f=t[c];if("scatter"===f.type&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}},18800:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(52904),o=r(88200),s=r(43028),l=r(43980),u=r(31147),c=r(43912),f=r(74428),h=r(66828),p=r(11731),d=r(124),v=r(70840),g=r(3400).coercePattern;t.exports=function(t,e,r,y){function m(r,i){return n.coerce(t,e,a,r,i)}var x=l(t,e,y,m);if(x||(e.visible=!1),e.visible){u(t,e,y,m),m("xhoverformat"),m("yhoverformat"),m("zorder");var b=c(t,e,y,m);"group"===y.scattermode&&void 0===e.orientation&&m("orientation","v");var _=!b&&xn.opacity(a)?n.addOpacity(a,.3):a:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},20011:function(t,e,r){"use strict";var n=r(71888).getAxisGroup;t.exports=function(t,e,r,i){var a=e.orientation,o=n(r,e[({v:"x",h:"y"})[a]+"axis"])+a,s=r._alignmentOpts||{},l=i("alignmentgroup"),u=s[o];u||(u=s[o]={});var c=u[l];c?c.traces.push(e):c=u[l]={traces:[e],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var f=i("offsetgroup"),h=c.offsetGroups,p=h[f];f&&(p||(p=h[f]={offsetIndex:Object.keys(h).length}),e._offsetIndex=p.offsetIndex)}},98723:function(t,e,r){"use strict";var n=r(3400),i=r(93024),a=r(24040),o=r(44928),s=r(76308),l=n.fillText;t.exports=function(t,e,r,u){var c=t.cd,f=c[0].trace,h=t.xa,p=t.ya,d=h.c2p(e),v=p.c2p(r),g=[d,v],y=f.hoveron||"",m=-1!==f.mode.indexOf("markers")?3:.5,x=!!f.xperiodalignment,b=!!f.yperiodalignment;if(-1!==y.indexOf("points")){var _=function(t){var e=Math.max(m,t.mrc||0),r=h.c2p(t.x)-d,n=p.c2p(t.y)-v;return Math.max(Math.sqrt(r*r+n*n)-e,1-m/e)},w=i.getDistanceFunction(u,function(t){if(x){var e=h.c2p(t.xStart),r=h.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(h.c2p(t.x)-d);return a=Math.min(e,r)&&v<=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.y)-v);return ar!=(u=i[n][1])>=r&&(o=i[n-1][0],s=i[n][0],u-l&&(f=Math.min(f,a=o+(s-o)*(r-l)/(u-l)),d=Math.max(d,a)));return{x0:f=Math.max(f,0),x1:d=Math.min(d,h._length),y0:r,y1:r}}(f._polygons);null===O&&(O={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var I=s.defaultLine;return s.opacity(f.fillcolor)?I=f.fillcolor:s.opacity((f.line||{}).color)&&(I=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:I,hovertemplate:!1}),delete t.index,f.text&&!n.isArrayOrTypedArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}},65875:function(t,e,r){"use strict";var n=r(43028);t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(52904),layoutAttributes:r(55308),supplyDefaults:r(18800),crossTraceDefaults:r(35036),supplyLayoutDefaults:r(59748),calc:r(16356).calc,crossTraceCalc:r(96664),arraysToCalcdata:r(20148),plot:r(96504),colorbar:r(5528),formatLabels:r(76688),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(98723),selectPoints:r(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308: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"}}},59748:function(t,e,r){"use strict";var n=r(3400),i=r(55308);t.exports=function(t,e){var r,a,o="group"===e.barmode;"group"===e.scattermode&&(r="scattergap",a=o?e.bargap:.2,n.coerce(t,e,i,r,a))}},66828:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray,i=r(94288).hasColorscale,a=r(27260);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")}},52340:function(t,e,r){"use strict";var n=r(43616),i=r(39032),a=i.BADNUM,o=i.LOG_CLIP,s=o+.5,l=o-.5,u=r(3400),c=u.segmentsIntersect,f=u.constrain,h=r(88200);t.exports=function(t,e){var r,i,o,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S,E,L,C,P,O,I,z,D=e.trace||{},R=e.xaxis,F=e.yaxis,B="log"===R.type,N="log"===F.type,j=R._length,U=F._length,V=e.backoff,q=D.marker,H=e.connectGaps,G=e.baseTolerance,W=e.shape,Y="linear"===W,X=D.fill&&"none"!==D.fill,Z=[],K=h.minTolerance,J=t.length,$=Array(J),Q=0;function tt(r){var n=t[r];if(!n)return!1;var i=e.linearized?R.l2p(n.x):R.c2p(n.x),o=e.linearized?F.l2p(n.y):F.c2p(n.y);if(i===a){if(B&&(i=R.c2p(n.x,!0)),i===a)return!1;N&&o===a&&(i*=Math.abs(R._m*U*(R._m>0?s:l)/(F._m*j*(F._m>0?s:l)))),i*=1e3}if(o===a){if(N&&(o=F.c2p(n.y,!0)),o===a)return!1;o*=1e3}return[i,o]}function te(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&&uto||t[1]tl)return[f(t[0],ta,to),f(t[1],ts,tl)]}function tf(t,e){if(t[0]===e[0]&&(t[0]===ta||t[0]===to)||t[1]===e[1]&&(t[1]===ts||t[1]===tl))return!0}function th(t,e,r){return function(n,i){var a,o=tc(n),s=tc(i),l=[];if(o&&s&&tf(o,s))return l;o&&l.push(o),s&&l.push(s);var c=2*u.constrain((n[t]+i[t])/2,e,r)-((o||n)[t]+(s||i)[t]);return c&&(a=o&&s?c>0==o[t]>s[t]?o:s:o||s,a[t]+=c),l}}function tp(t){var e=t[0],r=t[1],n=e===$[Q-1][0],i=r===$[Q-1][1];if(!n||!i){if(Q>1){var a=e===$[Q-2][0],o=r===$[Q-2][1];n&&(e===ta||e===to)&&a?o?Q--:$[Q-1]=t:i&&(r===ts||r===tl)&&o?a?Q--:$[Q-1]=t:$[Q++]=t}else $[Q++]=t}}function td(t){$[Q-1][0]!==t[0]&&$[Q-1][1]!==t[1]&&tp([C,P]),tp(t),O=null,C=P=0}"linear"===W||"spline"===W?z=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=tu[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&&tn(o,t)to?to:0,L=e[1]tl?tl:0,E||L){if(Q){if(O){var n,i,a,o=z(O,e);o.length>1&&(td(o[0]),$[Q++]=o[1])}else I=z($[Q-1],e)[0],$[Q++]=I}else $[Q++]=[E||e[0],L||e[1]];var s=$[Q-1];E&&L&&(s[0]!==E||s[1]!==L)?(O&&(C!==E&&P!==L?C&&P?tp((n=O,i=e[0]-n[0],a=(e[1]-n[1])/i,(n[1]*e[0]-e[1]*n[0])/i>0?[a>0?ta:to,tl]:[a>0?to:ta,ts])):tp([C||E,P||L]):C&&P&&tp([C,P])),tp([E,L])):C-E&&P-L&&tp([E||C,L||P]),O=e,C=E,P=L}else O&&td(z(O,e)[0]),$[Q++]=e}for(r=0;rtr(v,ty))break;o=v,(w=m[0]*y[0]+m[1]*y[1])>b?(b=w,p=v,g=!1):w<_&&(_=w,d=v,g=!0)}if(g?(tg(p),o!==d&&tg(d)):(d!==i&&tg(d),o!==p&&tg(p)),tg(o),r>=t.length||!v)break;tg(v),i=v}}O&&tp([C||O[0],P||O[1]]),Z.push($.slice(0,Q))}var tm=W.slice(W.length-1);if(V&&"h"!==tm&&"v"!==tm){for(var tx=!1,tb=-1,t_=[],tw=0;tw=0?l=p:(l=p=h,h++),l0?Math.max(r,a):0}}},5528:function(t){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(t,e,r){"use strict";var n=r(76308),i=r(94288).hasColorscale,a=r(27260),o=r(43028);t.exports=function(t,e,r,s,l,u){var c=o.isBubble(t),f=(t.line||{}).color;u=u||{},f&&(r=f),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",f&&!Array.isArray(f)&&e.marker.color!==f?f: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")}},31147:function(t,e,r){"use strict";var n=r(3400).dateTick0,i=r(39032).ONEWEEK;function a(t,e){return t%i==0?n(e,1):n(e,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"))}}},96504:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(3400),o=a.ensureSingle,s=a.identity,l=r(43616),u=r(43028),c=r(52340),f=r(14328),h=r(92065).tester;function p(t,e,r,f,p,d,v){var g=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)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(u.hasMarkers(h)){var p=h.marker.maxdisplayed;if(0!==p){var d=i.filter(function(t){return t.x>=c[0]&&t.x<=c[1]&&t.y>=f[0]&&t.y<=f[1]}),v=Math.ceil(d.length/p),g=0;o.forEach(function(t,r){var n=t[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function m(t){return y?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,"g","errorbars"),A=o(T,"g","lines"),M=o(T,"g","points"),S=o(T,"g","text");if(i.getComponentMethod("errorbars","plot")(t,k,r,v),!0===_.visible){m(T).style("opacity",_.opacity);var E=_.fill.charAt(_.fill.length-1);"x"!==E&&"y"!==E&&(E=""),"y"===E?(H=1,G=b.c2p(0,!0)):"x"===E&&(H=0,G=x.c2p(0,!0)),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=T;var L="",C=[],P=_._prevtrace,O=null,I=null;P&&(L=P._prevRevpath||"",q=P._nextFill,C=P._ownPolygons,O=P._fillsegments,I=P._fillElement);var z="",D="",R=[];_._polygons=[];var F=[],B=[],N=a.noop;if(V=_._ownFill,u.hasLines(_)||"none"!==_.fill){q&&q.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(X=l.steps(w.shape),Z=l.steps(w.shape.split("").reverse().join(""))):X=Z="spline"===w.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),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return"M"+t.join("L")},K=function(t){return Z(t.reverse())},F=Array((B=c(f,{xaxis:x,yaxis:b,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:_.fill})).length);var j=0;for(U=0;U0,g=f(t,e,r);(c=i.selectAll("g.trace").data(g,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),v?(u&&(h=u()),n.transition().duration(a.duration).ease(a.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){i.selectAll("g.trace").each(function(r,n){p(t,n,e,r,g,this,a)})})):c.each(function(r,n){p(t,n,e,r,g,this,a)}),d&&c.exit().remove(),i.selectAll("path:not([d])").remove()}},91560:function(t,e,r){"use strict";var n=r(43028);t.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r0){var h=i.c2l(c);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}t.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e-1?-1:t.indexOf("right")>-1?1:0}function b(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var E=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f("surfacecolor",g||y);for(var m=["x","y","z"],x=0;x<3;++x){var b="projection."+m[x];f(b+".show")&&(f(b+".opacity"),f(b+".scale"))}var _=n.getComponentMethod("errorbars","supplyDefaults");_(t,e,g||y||r,{axis:"z"}),_(t,e,g||y||r,{axis:"y",inherit:"z"}),_(t,e,g||y||r,{axis:"x",inherit:"z"})}},3296:function(t,e,r){"use strict";t.exports={plot:r(41064),attributes:r(91592),markerSymbols:r(87792),supplyDefaults:r(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(41484),moduleType:"trace",name:"scatter3d",basePlotModule:r(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(t,e,r){"use strict";var n=r(98304),i=r(52904),a=r(45464),o=r(21776).Ks,s=r(21776).Gw,l=r(49084),u=r(92880).extendFlat,c=i.marker,f=i.line,h=c.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:u({},i.mode,{dflt:"markers"}),text:u({},i.text,{}),texttemplate:s({editType:"plot"},{keys:["a","b","text"]}),hovertext:u({},i.hovertext,{}),line:{color:f.color,width:f.width,dash:f.dash,backoff:f.backoff,shape:u({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:i.connectgaps,fill:u({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n(),marker:u({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,angle:c.angle,angleref:c.angleref,standoff:c.standoff,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:u({width:h.width,editType:"calc"},l("marker.line")),gradient:c.gradient,editType:"calc"},l("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:u({},a.hoverinfo,{flags:["a","b","text","name"]}),hoveron:i.hoveron,hovertemplate:o(),zorder:i.zorder}},48228:function(t,e,r){"use strict";var n=r(38248),i=r(90136),a=r(20148),o=r(4500),s=r(16356).calcMarkerSize,l=r(50948);t.exports=function(t,e){var r,u,c,f=e._carpetTrace=l(t,e);if(f&&f.visible&&"legendonly"!==f.visible){e.xaxis=f.xaxis,e.yaxis=f.yaxis;var h=e._length,p=Array(h),d=!1;for(r=0;r")}return o}function m(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,g.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},4184:function(t,e,r){"use strict";t.exports={attributes:r(90372),supplyDefaults:r(6176),colorbar:r(5528),formatLabels:r(52364),calc:r(48228),plot:r(20036),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(58960),selectPoints:r(91560),eventData:r(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:r(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(t,e,r){"use strict";var n=r(96504),i=r(54460),a=r(43616);t.exports=function(t,e,r,o){var s,l,u,c=r[0][0].carpet,f=i.getFromId(t,c.xaxis||"x"),h=i.getFromId(t,c.yaxis||"y"),p={xaxis:f,yaxis:h,plot:e.plot};for(s=0;s")}}(u,v,t,l[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}}},36952:function(t,e,r){"use strict";t.exports={attributes:r(6096),supplyDefaults:r(86188),colorbar:r(5528),formatLabels:r(56696),calc:r(25212),calcGeoJSON:r(48691).calcGeoJSON,plot:r(48691).plot,style:r(25064),styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(64292),eventData:r(58544),selectPoints:r(8796),moduleType:"trace",name:"scattergeo",basePlotModule:r(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(59972).getTopojsonFeatures,o=r(44808),s=r(27144),l=r(19280).findExtremes,u=r(39032).BADNUM,c=r(16356).calcMarkerSize,f=r(43028),h=r(25064);t.exports={calcGeoJSON:function(t,e){var r,n,o,f,h=t[0].trace,p=e[h.geo],d=p._subplot,v=h._length;if(i.isArrayOrTypedArray(h.locations)){var g=h.locationmode,y="geojson-id"===g?s.extractTraceFeature(t):a(h,d.topojson);for(r=0;r=g,T=2*_,k={},A=m.makeCalcdata(e,"x"),M=x.makeCalcdata(e,"y"),S=s(e,m,"x",A),E=s(e,x,"y",M),L=S.vals,C=E.vals;e._x=L,e._y=C,e.xperiodalignment&&(e._origX=A,e._xStarts=S.starts,e._xEnds=S.ends),e.yperiodalignment&&(e._origY=M,e._yStarts=E.starts,e._yEnds=E.ends);var P=Array(T),O=Array(_);for(r=0;r<_;r++)P[2*r]=L[r]===v?NaN:L[r],P[2*r+1]=C[r]===v?NaN:C[r],O[r]=r;if("log"===m.type)for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n)),s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,P,L,C),z=d(t,b);return f(l,e),w?I.marker&&(o=I.marker.sizeAvg||Math.max(I.marker.size,3)):o=u(e,_),c(t,e,m,x,L,C,o),I.errorX&&y(e,m,I.errorX),I.errorY&&y(e,x,I.errorY),I.fill&&!z.fill2d&&(z.fill2d=!0),I.marker&&!z.scatter2d&&(z.scatter2d=!0),I.line&&!z.line2d&&(z.line2d=!0),(I.errorX||I.errorY)&&!z.error2d&&(z.error2d=!0),I.text&&!z.glText&&(z.glText=!0),I.marker&&(I.marker.snap=_),z.lineOptions.push(I.line),z.errorXOptions.push(I.errorX),z.errorYOptions.push(I.errorY),z.fillOptions.push(I.fill),z.markerOptions.push(I.marker),z.markerSelectedOptions.push(I.markerSel),z.markerUnselectedOptions.push(I.markerUnsel),z.textOptions.push(I.text),z.textSelectedOptions.push(I.textSel),z.textUnselectedOptions.push(I.textUnsel),z.selectBatch.push([]),z.unselectBatch.push([]),k._scene=z,k.index=z.count,k.x=L,k.y=C,k.positions=P,z.count++,[{x:!1,y:!1,t:k,trace:e}]}},67072:function(t){"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},84236:function(t,e,r){"use strict";var n=r(38248),i=r(20472),a=r(72160),o=r(24040),s=r(3400),l=s.isArrayOrTypedArray,u=r(43616),c=r(79811),f=r(33040).formatColor,h=r(43028),p=r(7152),d=r(80088),v=r(67072),g=r(13448).DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},m=r(10624).appendArrayPointValue;function x(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,u=e.textposition,c=l(u)?u:[u],f=o.color,h=o.size,p=o.family,d=o.weight,v=o.style,g=o.variant,y={},x=t._context.plotGlPixelRatio,b=e.texttemplate;if(b){y.text=[];var _=i._d3locale,w=Array.isArray(b),T=w?Math.min(b.length,a):a,k=w?function(t){return b[t]}:function(){return b};for(r=0;rv.TOO_MANY_POINTS?"rect":h.hasMarkers(e)?"rect":"round";if(u&&e.connectgaps){var f=n[0],p=n[1];for(i=0;i1?u[i]:u[0]:u,v=l(c)?c.length>1?c[i]:c[0]:c,g=y[d],m=y[v],x=f?f/.8+1:0,b=-m*x-.5*m;o.offset[i]=[g*x/p,b/p]}}return o}}},80220:function(t,e,r){"use strict";var n=r(3400),i=r(24040),a=r(80088),o=r(2876),s=r(88200),l=r(43028),u=r(43980),c=r(31147),f=r(74428),h=r(66828),p=r(70840),d=r(124);t.exports=function(t,e,r,v){function g(r,i){return n.coerce(t,e,o,r,i)}var y=!!t.marker&&a.isOpenSymbol(t.marker.symbol),m=l.isBubble(t),x=u(t,e,v,g);if(!x){e.visible=!1;return}c(t,e,v,g),g("xhoverformat"),g("yhoverformat");var b=x100},e.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},41272:function(t,e,r){"use strict";var n=r(24040),i=r(3400),a=r(44928);function o(t,e,r,o){var s=t.xa,l=t.ya,u=t.distance,c=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=i.isArrayOrTypedArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=i.isArrayOrTypedArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family,h.tw=Array.isArray(p.weight)?p.weight[f]:p.weight,h.ty=Array.isArray(p.style)?p.style[f]:p.style,h.tv=Array.isArray(p.variant)?p.variant[f]:p.variant);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.ma=i.isArrayOrTypedArray(d.angle)?d.angle[f]:d.angle,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var v=d&&d.line;v&&(h.mlc=Array.isArray(v.color)?v.color[f]:v.color,h.mlw=i.isArrayOrTypedArray(v.width)?v.width[f]:v.width);var g=d&&d.gradient;g&&"none"!==g.type&&(h.mgt=Array.isArray(g.type)?g.type[f]:g.type,h.mgc=Array.isArray(g.color)?g.color[f]:g.color);var y=s.c2p(h.x,!0),m=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,A=o._origY,M=i.extendFlat({},t,{color:a(o,h),x0:y-x,x1:y+x,xLabelVal:k?k[f]:h.x,y0:m-x,y1:m+x,yLabelVal:A?A[f]:h.y,cd:T,distance:u,spikeDistance:c,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:o.text&&(M.text=o.text),i.fillText(h,o,M),n.getComponentMethod("errorbars","hoverInfo")(h,o,M),M}t.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,u,c,f,h,p,d,v=t.cd,g=v[0].t,y=v[0].trace,m=t.xa,x=t.ya,b=g.x,_=g.y,w=m.c2p(e),T=x.c2p(r),k=t.distance;if(g.tree){var A=m.p2c(w-k),M=m.p2c(w+k),S=x.p2c(T-k),E=x.p2c(T+k);i="x"===n?g.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):g.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=g.ids;var L=k;if("x"===n){var C=!!y.xperiodalignment,P=!!y.yperiodalignment;for(c=0;c=Math.min(O,I)&&w<=Math.max(O,I)?0:1/0}if(f=Math.min(z,D)&&T<=Math.max(z,D)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[c]}}}else for(c=i.length-1;c>-1;c--)l=b[a=i[c]],u=_[a],(p=Math.sqrt((f=m.c2p(l)-w)*f+(h=x.c2p(u)-T)*h))y.glText.length){var O=C-y.glText.length;for(d=0;dr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t}),y.line2d.update(y.lineOptions)),y.error2d){var z=(y.errorXOptions||[]).concat(y.errorYOptions||[]);y.error2d.update(z)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=s.repeat(null,C),y.fill2d&&(y.fillOptions=y.fillOptions.map(function(t,e){var n,i,a,o,s=r[e];if(t&&s&&s[0]&&s[0].trace){var l=s[0],u=l.trace,c=l.t,f=y.lineOptions[e],h=[];u._ownfill&&h.push(e),u._nexttrace&&h.push(e+1),h.length&&(y.fillOrder[e]=h);var p=[],d=f&&f.positions||c.positions;if("tozeroy"===u.fill){for(a=0;aa&&isNaN(d[o+1]);)o-=2;0!==d[a+1]&&(p=[d[a],0]),p=p.concat(d.slice(a,o+2)),0!==d[o+1]&&(p=p.concat([d[o],0]))}else if("tozerox"===u.fill){for(a=0;aa&&isNaN(d[o]);)o-=2;0!==d[a]&&(p=[0,d[a+1]]),p=p.concat(d.slice(a,o+2)),0!==d[o]&&(p=p.concat([0,d[o+1]]))}else if("toself"===u.fill||"tonext"===u.fill){for(i=0,p=[],n=0,t.splitNull=!0;i-1;for(d=0;d")}}t.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[0].trace,f=t.xa,h=t.ya,p=t.subplot,d=[],v=l+c.uid+"-circle",g=c.cluster&&c.cluster.enabled;g&&(d=p.map.queryRenderedFeatures(null,{layers:[v]}).map(function(t){return t.id}));var y=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),m=e-y;if(n.getClosest(o,function(t){var e=t.lonlat;if(e[0]===s||g&&-1===d.indexOf(t.i+1))return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=p.project([n,a]),l=o.x-f.c2p([m,a]),u=o.y-h.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,_=[i.modHalf(b[0],360)+y,b[1]],w=f.c2p(_),T=h.c2p(_),k=x.mrc||1;t.x0=w-k,t.x1=w+k,t.y0=T-k,t.y1=T+k;var A={};A[c.subplot]={_subplot:p};var M=c._module.formatLabels(x,c,A);return t.lonLabel=M.lonLabel,t.latLabel=M.latLabel,t.color=a(c,x),t.extraText=u(c,x,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:u}},11572:function(t,e,r){"use strict";t.exports={attributes:r(31512),supplyDefaults:r(15752),colorbar:r(5528),formatLabels:r(11960),calc:r(25212),plot:r(9660),hoverPoints:r(63312).hoverPoints,eventData:r(37920),selectPoints:r(404),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:"trace",name:"scattermapbox",basePlotModule:r(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(t,e,r){"use strict";var n=r(3400),i=r(59392),a=r(47552).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,i={type:e.type,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint};e.filter&&(i.filter=e.filter);for(var a=this.layerIds[t],o=this.subplot.getMapLayers(),s=0;s=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 h(t){l?function(t){t||c.addSource("circle",a.circle,e.cluster);for(var r=o.cluster,n=0;n=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,f=new s(t,l.uid,u,c),h=i(t.gd,e),p=f.below=t.belowLookup["trace-"+l.uid];if(u)for(f.addSource("circle",h.circle,l.cluster),r=0;r")}}t.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,u=s.cd[s.index],c=s.trace;if(l.isPtInside(u))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(u,c,l,s),s.hovertemplate=c.hovertemplate,o}},makeHoverPointText:i}},76924:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:r(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:r(8319),supplyDefaults:r(85968).supplyDefaults,colorbar:r(5528),formatLabels:r(22852),calc:r(58320),plot:r(43456),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(8504).hoverPoints,selectPoints:r(91560),meta:{}}},43456:function(t,e,r){"use strict";var n=r(96504),i=r(39032).BADNUM;t.exports=function(t,e,r){for(var a=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,s=e.yaxis,l={xaxis:o,yaxis:s,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},u=e.radialAxis,c=e.angularAxis,f=0;f=u&&(y.marker.cluster=p.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=b),y.line&&b.length>1&&l.extendFlat(y.line,s.linePositions(t,o,b)),y.text&&(l.extendFlat(y.text,{positions:b},s.textPosition(t,o,y.text,y.marker)),l.extendFlat(y.textSel,{positions:b},s.textPosition(t,o,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:b},s.textPosition(t,o,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),p.x=_,p.y=w,p.rawx=_,p.rawy=w,p.r=v,p.theta=g,p.positions=b,p._scene=h,p.index=h.count,h.count++}}),a(t,e,r)}},t.exports.reglPrecompiled={}},69496:function(t,e,r){"use strict";var n=r(21776).Ks,i=r(21776).Gw,a=r(92880).extendFlat,o=r(98304),s=r(52904),l=r(45464),u=s.line;t.exports={mode:s.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:s.text,texttemplate:i({editType:"plot"},{keys:["real","imag","text"]}),hovertext:s.hovertext,line:{color:u.color,width:u.width,dash:u.dash,backoff:u.backoff,shape:a({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:s.connectgaps,marker:s.marker,cliponaxis:a({},s.cliponaxis,{dflt:!1}),textposition:s.textposition,textfont:s.textfont,fill:a({},s.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o(),hoverinfo:a({},l.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:s.hoveron,hovertemplate:n(),selected:s.selected,unselected:s.unselected}},47507:function(t,e,r){"use strict";var n=r(38248),i=r(39032).BADNUM,a=r(90136),o=r(20148),s=r(4500),l=r(16356).calcMarkerSize;t.exports=function(t,e){for(var r=t._fullLayout,u=e.subplot,c=r[u].realaxis,f=r[u].imaginaryaxis,h=c.makeCalcdata(e,"real"),p=f.makeCalcdata(e,"imag"),d=e._length,v=Array(d),g=0;g")}}t.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,u=s.cd[s.index],c=s.trace;if(l.isPtInside(u))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(u,c,l,s),s.hovertemplate=c.hovertemplate,o}},makeHoverPointText:i}},95443:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:r(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:r(69496),supplyDefaults:r(76716),colorbar:r(5528),formatLabels:r(49504),calc:r(47507),plot:r(34927),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(25292).hoverPoints,selectPoints:r(91560),meta:{}}},34927:function(t,e,r){"use strict";var n=r(96504),i=r(39032).BADNUM,a=r(36416).smith;t.exports=function(t,e,r){for(var o=e.layers.frontplot.select("g.scatterlayer"),s=e.xaxis,l=e.yaxis,u={xaxis:s,yaxis:l,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},c=0;c"),o.hovertemplate=h.hovertemplate,a}function x(t,e){y.push(t._hovertitle+": "+e)}}},34864:function(t,e,r){"use strict";t.exports={attributes:r(5896),supplyDefaults:r(84256),colorbar:r(5528),formatLabels:r(90404),calc:r(34335),plot:r(88776),style:r(49224).style,styleOnSelect:r(49224).styleOnSelect,hoverPoints:r(26596),selectPoints:r(91560),eventData:r(97476),moduleType:"trace",name:"scatterternary",basePlotModule:r(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(t,e,r){"use strict";var n=r(96504);t.exports=function(t,e,r){var i=e.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=e.xaxis,o=e.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},l=e.layers.frontplot.select("g.scatterlayer"),u=0;uh?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;pa&&l?r._splomSubplots[S]=1:i-1,P=o(x)||!!p.selectedpoints||C,O=!0;if(P){var I=p._length;if(p.selectedpoints){v.selectBatch=p.selectedpoints;var z=p.selectedpoints,D={};for(l=0;l1&&(c=v[m-1],h=g[m-1],d=y[m-1]),e=0;ec?"-":"+")+"x")).replace("y",(f>h?"-":"+")+"y")).replace("z",(p>d?"-":"+")+"z");var L=function(){m=0,M=[],S=[],E=[]};(!m||m2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function p(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,c=e._len,f={};function d(t,e){var n=r[e],o=i[u[e]];return a.simpleMap(t,function(t){return n.d2l(t)*o})}if(f.vectors=l(d(e._u,"xaxis"),d(e._v,"yaxis"),d(e._w,"zaxis"),c),!c)return{positions:[],cells:[]};var v=d(e._Xs,"xaxis"),g=d(e._Ys,"yaxis"),y=d(e._Zs,"zaxis");if(f.meshgrid=[v,g,y],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,"xaxis"),d(e._startsY,"yaxis"),d(e._startsZ,"zaxis"));else{for(var m=g[0],x=h(v),b=h(y),_=Array(x.length*b.length),w=0,T=0;T=0};d?(C=Math.min(p.length,g.length),P=function(t){return w(p[t])&&T(t)},O=function(t){return String(p[t])}):(C=Math.min(v.length,g.length),P=function(t){return w(v[t])&&T(t)},O=function(t){return String(v[t])}),m&&(C=Math.min(C,y.length));for(var k=0;k1){for(var E=a.randstr(),L=0;L=0){e.i=s.i;var c=r.marker;c.pattern&&c.colors&&c.pattern.shape||(c.color=u,e.color=u),n.pointStyle(t,r,a,e)}else i.fill(t,u)}},45716:function(t,e,r){"use strict";var n=r(33428),i=r(24040),a=r(10624).appendArrayPointValue,o=r(93024),s=r(3400),l=r(95924),u=r(78176),c=r(69656).formatPieValue;function f(t,e,r){for(var n=t.data.data,i={curveNumber:e.index,pointNumber:n.i,data:e._input,fullData:e},o=0;o"),name:k||z("name")?l.name:void 0,color:T("hoverlabel.bgcolor")||m.color,borderColor:T("hoverlabel.bordercolor"),fontFamily:T("hoverlabel.font.family"),fontSize:T("hoverlabel.font.size"),fontColor:T("hoverlabel.font.color"),fontWeight:T("hoverlabel.font.weight"),fontStyle:T("hoverlabel.font.style"),fontVariant:T("hoverlabel.font.variant"),nameLength:T("hoverlabel.namelength"),textAlign:T("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:P,eventData:S};g&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?"left":"right"),y&&(F.x=E,F.idealAlign=E<0?"left":"right");var B=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:B}),S[0].bbox=B[0],d._hasHoverLabel=!0}if(y){var N=t.select("path.surface");h.styleOne(N,i,l,r,{hovered:!0})}d._hasHoverEvent=!0,r.emit("plotly_hover",{points:S||[f(i,l,h.eventDataKeys)],event:n.event})}}),t.on("mouseout",function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit("plotly_unhover",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),y){var l=t.select("path.surface");h.styleOne(l,s,a,r,{hovered:!1})}}),t.on("click",function(t){var e=r._fullLayout,a=r._fullData[d.index],s=g&&(u.isHierarchyRoot(t)||u.isLeaf(t)),c=u.getPtId(t),p=u.isEntry(t)?u.findEntryWithChild(v,c):u.findEntryWithLevel(v,c),y=u.getPtId(p),m={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(m.nextLevel=y);var x=l.triggerHandler(r,"plotly_"+d.type+"click",m);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call("_storeDirectGUIEdit",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:y}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call("animate",r,b,_)}})}},78176:function(t,e,r){"use strict";var n=r(3400),i=r(76308),a=r(93972),o=r(69656);function s(t){return t.data.data.pid}e.findEntryWithLevel=function(t,r){var n;return r&&t.eachAfter(function(t){if(e.getPtId(t)===r)return n=t.copy()}),n||t},e.findEntryWithChild=function(t,r){var n;return t.eachAfter(function(t){for(var i=t.children||[],a=0;a0)},e.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},e.isHeader=function(t,r){return!(e.isLeaf(t)||t.depth===r._maxDepth-1)},e.getParent=function(t,r){return e.findEntryWithLevel(t,s(r))},e.listPath=function(t,r){var n=t.parent;if(!n)return[];var i=r?[n.data[r]]:[n];return e.listPath(n,r).concat(i)},e.getPath=function(t){return e.listPath(t,"label").join("/")+"/"},e.formatValue=o.formatPieValue,e.formatPercent=function(t,e){var r=n.formatPercent(t,0);return"0%"===r&&(r=o.formatPiePercent(t,e)),r}},5621:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"sunburst",basePlotModule:r(54904),categories:[],animatable:!0,attributes:r(424),layoutAttributes:r(84920),supplyDefaults:r(25244),supplyLayoutDefaults:r(28732),calc:r(3776).calc,crossTraceCalc:r(3776).crossTraceCalc,plot:r(96488).plot,style:r(85676).style,colorbar:r(5528),meta:{}}},84920:function(t){"use strict";t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(t,e,r){"use strict";var n=r(3400),i=r(84920);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("sunburstcolorway",e.colorway),r("extendsunburstcolors")}},96488:function(t,e,r){"use strict";var n=r(33428),i=r(74148),a=r(67756).qy,o=r(43616),s=r(3400),l=r(72736),u=r(82744),c=u.recordMinTextSize,f=u.clearMinTextSize,h=r(37820),p=r(69656).getRotationAngle,d=h.computeTransform,v=h.transformInsideText,g=r(85676).styleOne,y=r(60100).resizeText,m=r(45716),x=r(27328),b=r(78176);function _(t,r,u,f){var h=t._context.staticPlot,y=t._fullLayout,_=!y.uniformtext.mode&&b.hasTransition(f),T=n.select(u).selectAll("g.slice"),k=r[0],A=k.trace,M=k.hierarchy,S=b.findEntryWithLevel(M,A.level),E=b.getMaxDepth(A),L=y._size,C=A.domain,P=L.w*(C.x[1]-C.x[0]),O=L.h*(C.y[1]-C.y[0]),I=.5*Math.min(P,O),z=k.cx=L.l+L.w*(C.x[1]+C.x[0])/2,D=k.cy=L.t+L.h*(1-C.y[0])-O/2;if(!S)return T.remove();var R=null,F={};_&&T.each(function(t){F[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!R&&b.isEntry(t)&&(R=t)});var B=i.partition().size([2*Math.PI,S.height+1])(S).descendants(),N=S.height+1,j=0,U=E;k.hasMultipleRoots&&b.isHierarchyRoot(S)&&(B=B.slice(1),N-=1,j=1,U+=1),B=B.filter(function(t){return t.y1<=U});var V=p(A.rotation);V&&B.forEach(function(t){t.x0+=V,t.x1+=V});var q=Math.min(N,E),H=function(t){return(t-j)/q*I},G=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},W=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,z,D)},Y=function(t){return z+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},X=function(t){return D+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(T=T.data(B,b.getPtId)).enter().append("g").classed("slice",!0),_?T.exit().transition().each(function(){var t=n.select(this);t.select("path.surface").transition().attrTween("d",function(t){var e=function(t){var e=b.getPtId(t),r=F[e],n=F[b.getPtId(S)];if(n){var i=(t.x1>n.x1?2*Math.PI:0)+V;o=t.rpx1Z?2*Math.PI:0)+V;e={x0:i,x1:i}}else e={rpx0:I,rpx1:I},s.extendFlat(e,$(t))}else e={rpx0:0,rpx1:0}}else e={x0:V,x1:V};return a(e,n)}(t);return function(t){return W(e(t))}}):f.attr("d",W),u.call(m,S,t,r,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(g,i,A,t);var p=s.ensureSingle(u,"g","slicetext"),w=s.ensureSingle(p,"text","",function(t){t.attr("data-notex",1)}),T=s.ensureUniformFontSize(t,b.determineTextFont(A,i,y.font));w.text(e.formatSliceLabel(i,S,A,r,y)).classed("slicetext",!0).attr("text-anchor","middle").call(o.font,T).call(l.convertToTspans,t);var M=o.bBox(w.node());i.transform=v(M,i,k),i.transform.targetX=Y(i),i.transform.targetY=X(i);var E=function(t,e){var r=t.transform;return d(r,e),r.fontSize=T.size,c(A.type,r,y),s.getTextTransform(r)};_?w.transition().attrTween("transform",function(t){var e=function(t){var e,r=F[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},R){if(t.parent){if(Z){var i=t.x1>Z?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,$(t))}else e.x0=e.x1=V}else e.x0=e.x1=V;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),u=a(e.x0,t.x0),f=a(e.x1,t.x1),h=a(e.transform.scale,n.scale),p=a(e.transform.rotate,n.rotate),d=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,v=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=u(t),i=f(t),a=v(Math.pow(t,d)),s={pxmid:G(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return c(A.type,n,y),{transform:{targetX:Y(s),targetY:X(s),scale:h(t),rotate:p(t),rCenter:a}}}}(t);return function(t){return E(e(t),M)}}):w.attr("transform",E(i,M))})}function w(t){var e,r;return[(e=t.rpx1)*Math.sin(r=t.transform.textPosAngle),-e*Math.cos(r)]}e.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,u=!r,c=!s.uniformtext.mode&&b.hasTransition(r);f("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(e,function(t){return t[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),c?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){l.selectAll("g.trace").each(function(e){_(t,e,this,r)})})):(a.each(function(e){_(t,e,this,r)}),s.uniformtext.mode&&y(t,s._sunburstlayer.selectAll(".trace"),"sunburst")),u&&a.exit().remove()},e.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||"none"===o))return"";var l=i.separators,u=n[0],c=t.data.data,f=u.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var v=o.split("+"),g=function(t){return -1!==v.indexOf(t)},y=[];if(g("label")&&c.label&&y.push(c.label),c.hasOwnProperty("v")&&g("value")&&y.push(b.formatValue(c.v,l)),!h){g("current path")&&y.push(b.getPath(t.data));var m=0;g("percent parent")&&m++,g("percent entry")&&m++,g("percent root")&&m++;var x=m>1;if(m){var _,w,T=function(t){_=b.formatPercent(w,l),x&&(_+=" of "+t),y.push(_)};g("percent parent")&&!h&&(w=d/b.getValue(p),T("parent")),g("percent entry")&&(w=d/b.getValue(e),T("entry")),g("percent root")&&(w=d/b.getValue(f),T("root"))}}return g("text")&&(_=s.castOption(r,c.i,"text"),s.isValidTextValue(_)&&y.push(_)),y.join("
")}var k=s.castOption(r,c.i,"texttemplate");if(!k)return"";var A={};c.label&&(A.label=c.label),c.hasOwnProperty("v")&&(A.value=c.v,A.valueLabel=b.formatValue(c.v,l)),A.currentPath=b.getPath(t.data),h||(A.percentParent=d/b.getValue(p),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(p)),A.percentEntry=d/b.getValue(e),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(e),A.percentRoot=d/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),c.hasOwnProperty("color")&&(A.color=c.color);var M=s.castOption(r,c.i,"text");return(s.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=s.castOption(r,c.i,"customdata"),s.texttemplateString(k,A,i._d3locale,A,r._meta||{})}},85676:function(t,e,r){"use strict";var n=r(33428),i=r(76308),a=r(3400),o=r(82744).resizeText,s=r(60404);function l(t,e,r,n){var o=e.data.data,l=!e.children,u=o.i,c=a.castOption(r,u,"marker.line.color")||i.defaultLine,f=a.castOption(r,u,"marker.line.width")||0;t.call(s,e,r,n).style("stroke-width",f).call(i.stroke,c).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");o(t,e,"sunburst"),e.each(function(e){var r=n.select(this),i=e[0].trace;r.style("opacity",i.opacity),r.selectAll("path.surface").each(function(e){n.select(this).call(l,e,i,t)})})},styleOne:l}},16716:function(t,e,r){"use strict";var n=r(76308),i=r(49084),a=r(29736).axisHoverFormat,o=r(21776).Ks,s=r(45464),l=r(92880).extendFlat,u=r(67824).overrideAll;function c(t){return{valType:"boolean",dflt:!1}}function f(t){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:c("x"),y:c("y"),z:c("z")},color:{valType:"color",dflt:n.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:n.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var h=t.exports=u(l({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:o(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:f("x"),y:f("y"),z:f("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),"calc","nested");h.x.editType=h.y.editType=h.z.editType="calc+clearAxisTypes",h.transforms=void 0},56576:function(t,e,r){"use strict";var n=r(47128);t.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:"",cLetter:"c"}):n(t,e,{vals:e.z,containerStr:"",cLetter:"c"})}},79164:function(t,e,r){"use strict";var n=r(67792).gl_surface3d,i=r(67792).ndarray,a=r(67792).ndarray_linear_interpolate.d2,o=r(70448),s=r(11240),l=r(3400).isArrayOrTypedArray,u=r(33040).parseColorScale,c=r(43080),f=r(8932).extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++)null!=t.dataCoordinate[a]&&(t.dataCoordinate[a]*=this.scene.dataScale[a]);var o=this.data.hovertext||this.data.text;return l(o)&&o[i]&&void 0!==o[i][n]?t.textLabel=o[i][n]:o?t.textLabel=o:t.textLabel="",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function v(t){for(var e=[],r=0;r720;)r--,r/=function(t){for(var e=v(t),r=t,n=0;n0){r=d[n];break}return r}(r),++r<120&&(r=720);var n=Math.round(r/t);return n>1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],o=t[0].shape[1],s=0|Math.floor(t[0].shape[0]*e+1),l=0|Math.floor(t[0].shape[1]*r+1),u=1+n+1,c=1+o+1,f=i(new Float32Array(u*c),[u,c]),h=[1/e,0,0,0,1/r,0,0,0,1],p=0;p0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];eh&&(this.minValues[n]=h),this.maxValues[n]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},55992:function(t,e,r){"use strict";var n=r(23536),i=r(92880).extendFlat,a=r(38248),o=r(38116).isTypedArray,s=r(38116).isArrayOrTypedArray;function l(t){if(s(t)){for(var e=0,r=0;r=e||u===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=v(),i+=a,s=u+1,a=0);return n}function v(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}t.exports=function(t,e){var r=c(e.cells.values),o=function(t){return t.slice(e.header.values.length,t.length)},v=c(e.header.values);v.length&&!v[0].length&&(v[0]=[""],v=c(v));var g=v.concat(o(r).map(function(){return f((v[0]||[""]).length)})),y=e.domain,m=Math.floor(t._fullLayout._size.w*(y.x[1]-y.x[0])),x=Math.floor(t._fullLayout._size.h*(y.y[1]-y.y[0])),b=e.header.values.length?g[0].map(function(){return e.header.height}):[n.emptyHeaderHeight],_=r.length?r[0].map(function(){return e.cells.height}):[],w=b.reduce(u,0),T=d(_,x-w+n.uplift),k=p(d(b,w),[]),A=p(T,k),M={},S=e._fullInput.columnorder;s(S)&&(S=Array.from(S)),S=S.concat(o(r.map(function(t,e){return e})));var E=g.map(function(t,r){var n=s(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return a(n)?Number(n):1}),L=E.reduce(u,0);E=E.map(function(t){return t/L*m});var C=Math.max(l(e.header.line.width),l(e.cells.line.width)),P={key:e.uid+t._context.staticPlot,translateX:y.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-y.y[1]),size:t._fullLayout._size,width:m,maxLineWidth:C,height:x,columnOrder:S,groupHeight:x,rowBlocks:A,headerRowBlocks:k,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:g}),gdColumns:g.map(function(t){return t[0]}),gdColumnsOriginalOrder:g.map(function(t){return t[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(t,e){var r=M[t];return M[t]=(r||0)+1,{key:t+"__"+M[t],label:t,specIndex:e,xIndex:S[e],xScale:h,x:void 0,calcdata:void 0,columnWidth:E[e]}})};return P.columns.forEach(function(t){t.calcdata=P,t.x=h(t)}),P}},53056:function(t,e,r){"use strict";var n=r(92880).extendFlat;e.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:"header",type:"header",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:"cells1",type:"cells",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:"cells2",type:"cells",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},e.splitToCells=function(t){var e,r,n,i=(r=(e=t.rowBlocks[t.page])?e.rows[0].rowIndex:0,n=e?r+e.rows.length:0,[r,n]);return(t.values||[]).slice(i[0],i[1]).map(function(e,r){return{keyWithinBlock:r+("string"==typeof e&&e.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:i[0]+r,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:e}})}},53212:function(t,e,r){"use strict";var n=r(3400),i=r(60520),a=r(86968).Q;t.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}a(e,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),n.coerceFont(s,"header.font",n.extendFlat({},o.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(t,e){return t-e}),o=i.map(function(t){return a.indexOf(t)}),s=o.length;s/i),c=!l||u;t.mayHaveMarkup=l&&s.match(/[<&>]/);var f="string"==typeof s&&s.match(n.latexCheck);t.latex=f;var h=f?"":k(t.calcdata.cells.prefix,i,a)||"",p=f?"":k(t.calcdata.cells.suffix,i,a)||"",d=f?null:k(t.calcdata.cells.format,i,a)||null,v=h+(d?o(d)(t.value):t.value)+p;if(t.wrappingNeeded=!t.wrapped&&!c&&!f&&(e=T(v)),t.cellHeightMayIncrease=u||f||t.mayHaveMarkup||(void 0===e?T(v):e),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var g=(" "===n.wrapSplitCharacter?v.replace(/i&&n.push(a),i+=l}return n}(i,l,s);1===u.length&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),e.each(function(t,e){t.page=u[e],t.scrollY=l}),e.attr("transform",function(t){return f(0,R(t.rowBlocks,t.page)-t.scrollY)}),t&&(P(t,r,e,u,n.prevPages,n,0),P(t,r,e,u,n.prevPages,n,1),b(r,t))}}function C(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter(function(t){return s.key===t.key}),u=r||s.scrollbarState.dragMultiplier,c=s.scrollY;return s.scrollY=void 0===a?s.scrollY+u*i.event.dy:a,L(t,l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(M),l),s.scrollY===c}}function P(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){_(t,e,r.filter(function(t,e){return e===o&&n[e]!==i[e]}),r),i[o]=n[o]}))}function O(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each(function(t){var e,r,i=t.fragments;o.selectAll("tspan.line").each(function(t,e){i[e].width=this.getComputedTextLength()});var a=i[i.length-1].width,s=i.slice(0,-1),l=[],u=0,c=t.column.columnWidth-2*n.cellPad;for(t.value="";s.length;)u+(r=(e=s.shift()).width+a)>c&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],u=0),l.push(e.text),u+=r;u&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0}),o.selectAll("tspan.line").remove(),w(o.select("."+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(D)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=B(o),u=o.key-l.firstRowIndex,c=l.rows[u].rowHeight,h=Math.max(o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:c,c);h-l.rows[u].rowHeight&&(l.rows[u].rowHeight=h,t.selectAll("."+n.cn.columnCell).call(D),L(null,t.filter(M),0),b(r,a,!0)),s.attr("transform",function(){var t=this.parentNode.getBoundingClientRect(),e=i.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),a=e.top-t.top+(r?r.matrix.f:n.cellPad);return f(z(o,i.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)}),o.settledY=!0}}}function z(t,e){switch(t.align){case"left":default:return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2}}function D(t){t.attr("transform",function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce(function(t,e){return t+F(e,1/0)},0);return f(0,F(B(t),t.key)+e)}).selectAll("."+n.cn.cellRect).attr("height",function(t){var e,r;return(e=B(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight})}function R(t,e){for(var r=0,n=e-1;n>=0;n--)r+=function(t){var e=t.allRowsHeight;if(void 0!==e)return e;for(var r=0,n=0;n","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:c({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:u.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c({},s.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}},79516:function(t,e,r){"use strict";var n=r(7316);e.name="treemap",e.plot=function(t,r,i,a){n.plotBasePlot(e.name,t,r,i,a)},e.clean=function(t,r,i,a){n.cleanBasePlot(e.name,t,r,i,a)}},97840:function(t,e,r){"use strict";var n=r(3776);e.r=function(t,e){return n.calc(t,e)},e.q=function(t){return n._runCrossTraceCalc("treemap",t)}},32984:function(t){"use strict";t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(t,e,r){"use strict";var n=r(3400),i=r(40516),a=r(76308),o=r(86968).Q,s=r(31508).handleText,l=r(78048).TEXTPAD,u=r(74174).handleMarkerDefaults,c=r(8932),f=c.hasColorscale,h=c.handleDefaults;t.exports=function(t,e,r,c){function p(r,a){return n.coerce(t,e,i,r,a)}var d=p("labels"),v=p("parents");if(!d||!d.length||!v||!v.length){e.visible=!1;return}var g=p("values");p(g&&g.length?"branchvalues":"count"),p("level"),p("maxdepth"),"squarify"===p("tiling.packing")&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var y=p("text");p("texttemplate"),e.texttemplate||p("textinfo",n.isArrayOrTypedArray(y)?"text+label":"label"),p("hovertext"),p("hovertemplate");var m=p("pathbar.visible");s(t,e,c,p,"auto",{hasPathbar:m,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var x=-1!==e.textposition.indexOf("bottom");u(t,e,c,p),(e._hasColorscale=f(t,"marker","colors")||(t.marker||{}).coloraxis)?h(t,e,c,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(e.marker.colors||[]).length);var b=2*e.textfont.size;p("marker.pad.t",x?b/4:b),p("marker.pad.l",b/4),p("marker.pad.r",b/4),p("marker.pad.b",x?b:b/4),p("marker.cornerradius"),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},m&&(p("pathbar.thickness",e.pathbar.textfont.size+2*l),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),o(e,c,p),e._length=null}},95808:function(t,e,r){"use strict";var n=r(33428),i=r(78176),a=r(82744).clearMinTextSize,o=r(60100).resizeText,s=r(52960);t.exports=function(t,e,r,l,u){var c,f,h=u.type,p=u.drawDescendants,d=t._fullLayout,v=d["_"+h+"layer"],g=!r;a(h,d),(c=v.selectAll("g.trace."+h).data(e,function(t){return t[0].trace.uid})).enter().append("g").classed("trace",!0).classed(h,!0),c.order(),!d.uniformtext.mode&&i.hasTransition(r)?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()}).each(function(){v.selectAll("g.trace").each(function(e){s(t,e,this,r,p)})})):(c.each(function(e){s(t,e,this,r,p)}),d.uniformtext.mode&&o(t,v.selectAll(".trace"),h)),g&&c.exit().remove()}},27336:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(43616),o=r(72736),s=r(13832),l=r(66192).styleOne,u=r(32984),c=r(78176),f=r(45716);t.exports=function(t,e,r,h,p){var d=p.barDifY,v=p.width,g=p.height,y=p.viewX,m=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._context.staticPlot,E=t._fullLayout,L=e[0],C=L.trace,P=L.hierarchy,O=v/C._entryDepth,I=c.listPath(r.data,"id"),z=s(P.copy(),[v,g],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(z=z.filter(function(t){var e=I.indexOf(t.data.id);return -1!==e&&(t.x0=O*e,t.x1=O*(e+1),t.y0=d,t.y1=d+g,t.onPathbar=!0,!0)})).reverse(),(h=h.data(z,c.getPtId)).enter().append("g").classed("pathbar",!0),T(h,!0,M,[v,g],x),h.order();var D=h;w&&(D=D.transition().each("end",function(){var e=n.select(this);c.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),D.each(function(s){s._x0=y(s.x0),s._x1=y(s.x1),s._y0=m(s.y0),s._y1=m(s.y1),s._hoverX=y(s.x1-Math.min(v,g)/2),s._hoverY=m(s.y1-g/2);var h=n.select(this),p=i.ensureSingle(h,"path","surface",function(t){t.style("pointer-events",S?"none":"all")});w?p.transition().attrTween("d",function(t){var e=k(t,!0,M,[v,g]);return function(t){return x(e(t))}}):p.attr("d",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,C,t,{hovered:!1}),s._text=(c.getPtLabel(s)||"").split("
").join(" ")||"";var d=i.ensureSingle(h,"g","slicetext"),T=i.ensureSingle(d,"text","",function(t){t.attr("data-notex",1)}),L=i.ensureUniformFontSize(t,c.determineTextFont(C,s,E.font,{onPathbar:!0}));T.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(a.font,L).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:L.size,onPathbar:!0}),s.transform.fontSize=L.size,w?T.transition().attrTween("transform",function(t){var e=A(t,!0,M,[v,g]);return function(t){return _(e(t))}}):T.attr("transform",_(s))})}},76477:function(t,e,r){"use strict";var n=r(33428),i=r(3400),a=r(43616),o=r(72736),s=r(13832),l=r(66192).styleOne,u=r(32984),c=r(78176),f=r(45716),h=r(96488).formatSliceLabel;t.exports=function(t,e,r,p,d){var v=d.width,g=d.height,y=d.viewX,m=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._context.staticPlot,E=t._fullLayout,L=e[0].trace,C=-1!==L.textposition.indexOf("left"),P=-1!==L.textposition.indexOf("right"),O=-1!==L.textposition.indexOf("bottom"),I=!O&&!L.marker.pad.t||O&&!L.marker.pad.b,z=s(r,[v,g],{packing:L.tiling.packing,squarifyratio:L.tiling.squarifyratio,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1,pad:{inner:L.tiling.pad,top:L.marker.pad.t,left:L.marker.pad.l,right:L.marker.pad.r,bottom:L.marker.pad.b}}).descendants(),D=1/0,R=-1/0;z.forEach(function(t){var e=t.depth;e>=L._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(D=Math.min(D,e),R=Math.max(R,e))}),p=p.data(z,c.getPtId),L._maxVisibleLayers=isFinite(R)?R-D+1:0,p.enter().append("g").classed("slice",!0),T(p,!1,{},[v,g],x),p.order();var F=null;if(w&&M){var B=c.getPtId(M);p.each(function(t){null===F&&c.getPtId(t)===B&&(F={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})})}var N=function(){return F||{x0:0,x1:v,y0:0,y1:g}},j=p;return w&&(j=j.transition().each("end",function(){var e=n.select(this);c.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(s){var p=c.isHeader(s,L);s._x0=y(s.x0),s._x1=y(s.x1),s._y0=m(s.y0),s._y1=m(s.y1),s._hoverX=y(s.x1-L.marker.pad.r),s._hoverY=O?m(s.y1-L.marker.pad.b/2):m(s.y0+L.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,"path","surface",function(t){t.style("pointer-events",S?"none":"all")});w?T.transition().attrTween("d",function(t){var e=k(t,!1,N(),[v,g]);return function(t){return x(e(t))}}):T.attr("d",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,L,t,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":p?s._text=I?"":c.getPtLabel(s)||"":s._text=h(s,r,L,e,E)||"";var M=i.ensureSingle(d,"g","slicetext"),z=i.ensureSingle(M,"text","",function(t){t.attr("data-notex",1)}),D=i.ensureUniformFontSize(t,c.determineTextFont(L,s,E.font)),R=s._text||" ",F=p&&-1===R.indexOf("
");z.text(R).classed("slicetext",!0).attr("text-anchor",P?"end":C||F?"start":"middle").call(a.font,D).call(o.convertToTspans,t),s.textBB=a.bBox(z.node()),s.transform=b(s,{fontSize:D.size,isHeader:p}),s.transform.fontSize=D.size,w?z.transition().attrTween("transform",function(t){var e=A(t,!1,N(),[v,g]);return function(t){return _(e(t))}}):z.attr("transform",_(s))}),F}},83024:function(t){"use strict";t.exports=function t(e,r,n){n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var i,a=e.children;if(a)for(var o=0;o-1?C+O:-(P+O):0,z={x0:L,x1:L,y0:I,y1:I+P},D=function(t,e,r){var n=y.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},R=null,F={},B={},N=null,j=function(t,e){return e?F[h(t)]:B[h(t)]},U=function(t,e,r,n){if(e)return F[h(x)]||z;var i=B[y.level]||r;return t.data.depth-b.data.depth=(n-=(m?Q:Q.r)-s)){var p,d=(r+n)/2;r=d,n=d}ti?i<(p=a-(m?Q:Q.b))&&p"===$?(l.x-=a,u.x-=a,c.x-=a,f.x-=a):"/"===$?(c.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):"\\"===$?(l.x-=a,u.x-=a,o.x-=a/2,s.x-=a/2):"<"===$&&(o.x-=a,s.x-=a),J(l),J(f),J(o),J(u),J(c),J(s),"M"+l.x+","+l.y+"L"+u.x+","+u.y+"L"+s.x+","+s.y+"L"+c.x+","+c.y+"L"+f.x+","+f.y+"L"+o.x+","+o.y+"Z"},toMoveInsideSlice:ta,makeUpdateSliceInterpolator:tl,makeUpdateTextInterpolator:tu,handleSlicesExit:tc,hasTransition:A,strTransform:tf}):w.remove()}},66192:function(t,e,r){"use strict";var n=r(33428),i=r(76308),a=r(3400),o=r(78176),s=r(82744).resizeText,l=r(60404);function u(t,e,r,n,s){var u=(s||{}).hovered,c=e.data.data,f=c.i,h=c.color,p=o.isHierarchyRoot(e),d=1;if(u)g=r._hovered.marker.line.color,y=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,g="rgba(0,0,0,0)",y=0;else if(g=a.castOption(r,f,"marker.line.color")||i.defaultLine,y=a.castOption(r,f,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var v=r.marker.depthfade;if(v){var g,y,m,x=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===v?m=isFinite(o.getMaxDepth(r))?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1:(m=e.data.depth-r._entryDepth,!r._atRootLevel&&m++),m>0)for(var b=0;b0){var m,x,b,_,w,T,k,A=t.xa,M=t.ya;"h"===h.orientation?(k=e,b="y",w=M,_="x",T=A):(k=r,b="x",w=A,_="y",T=M);var S=f[t.index];if(k>=S.span[0]&&k<=S.span[1]){var E=i.extendFlat({},t),L=T.c2p(k,!0),C=s.getKdeValue(S,h,k),P=s.getPositionOnKdePath(S,h,L),O=w._offset,I=w._length;E[b+"0"]=P[0],E[b+"1"]=P[1],E[_+"0"]=E[_+"1"]=L,E[_+"Label"]=_+": "+a.hoverLabelText(T,k,h[_+"hoverformat"])+", "+f[0].t.labels.kde+" "+C.toFixed(3);for(var z=0,D=0;D")),u.color=(f=(c=v[x.dir].marker).color,h=c.line.color,p=c.line.width,i(f)?f:i(h)&&p?h:void 0),[u]}function S(t){return n(m,t,v[y+"hoverformat"])}}},95952:function(t,e,r){"use strict";t.exports={attributes:r(65776),layoutAttributes:r(91352),supplyDefaults:r(24224).supplyDefaults,crossTraceDefaults:r(24224).crossTraceDefaults,supplyLayoutDefaults:r(59464),calc:r(73540),crossTraceCalc:r(50152),plot:r(64488),style:r(12252).style,hoverPoints:r(94196),eventData:r(53256),selectPoints:r(45784),moduleType:"trace",name:"waterfall",basePlotModule:r(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(t){"use strict";t.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},59464:function(t,e,r){"use strict";var n=r(3400),i=r(91352);t.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(h?b+="M"+m[0]+","+x[1]+"V"+x[0]:b+="M"+m[1]+","+x[0]+"H"+m[0]),"between"!==p&&(r.isSum||s path").each(function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}}),u(r,s,t),r.selectAll(".lines").each(function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)})})}}},84224:function(t,e,r){"use strict";var n=r(54460),i=r(3400),a=r(73060),o=r(60468).W,s=r(39032).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 f;case"first":return h;case"last":return p;case"sum":return function(t,e){for(var r=0,i=0;ii&&(i=c,o=u)}}return i?a(o):s};case"rms":return function(t,e){for(var r=0,i=0,o=0;o":return function(t){return p(t)>i};case">=":return function(t){return p(t)>=i};case"[]":return function(t){var e=p(t);return e>=i[0]&&e<=i[1]};case"()":return function(t){var e=p(t);return e>i[0]&&e=i[0]&&ei[0]&&e<=i[1]};case"][":return function(t){var e=p(t);return e<=i[0]||e>=i[1]};case")(":return function(t){var e=p(t);return ei[1]};case"](":return function(t){var e=p(t);return e<=i[0]||e>i[1]};case")[":return function(t){var e=p(t);return e=i[1]};case"{}":return function(t){return -1!==i.indexOf(p(t))};case"}{":return function(t){return -1===i.indexOf(p(t))}}}(r,a.getDataToCoordFunc(t,e,h,f),d),x={},b={},_=0;g?(i=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(Array(p))},s=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(i=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},s=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(i);for(var w=o(e.transforms,r),T=0;T1?"%{group} (%{trace})":"%{group}");var l=t.styles,u=o.styles=[];if(l)for(a=0;a2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return d(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!f.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|m(t,e),n=c(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(U(t,Uint8Array)){var e=new Uint8Array(t);return g(e.buffer,e.byteOffset,e.byteLength)}return v(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(t));if(U(t,ArrayBuffer)||t&&U(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(U(t,SharedArrayBuffer)||t&&U(t.buffer,SharedArrayBuffer)))return g(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);var i=function(t){if(f.isBuffer(t)){var e,r=0|y(t.length),n=c(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?c(0):v(t):"Buffer"===t.type&&Array.isArray(t.data)?v(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(t))}function p(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return p(t),c(t<0?0:0|y(t))}function v(t){for(var e=t.length<0?0:0|y(t.length),r=c(e),n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function m(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||U(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+o(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(t).length;default:if(i)return n?-1:B(t).length;e=(""+e).toLowerCase(),i=!0}}function x(t,e,r){var n,i,a=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=e;a2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(a=r=+r)!=a&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;o=2,s/=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;h239?4:a>223?3:a>191?2:1;if(i+s<=r){var l=void 0,u=void 0,c=void 0,f=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:(192&(l=t[i+1]))==128&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=t[i+1],u=t[i+2],(192&l)==128&&(192&u)==128&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],(192&l)==128&&(192&u)==128&&(192&c)==128&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function A(t,e,r,n,i,a){if(!f.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw RangeError("Index out of range")}function M(t,e,r,n,i){z(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,r}function S(t,e,r,n,i){z(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r+7]=a,a>>=8,t[r+6]=a,a>>=8,t[r+5]=a,a>>=8,t[r+4]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o>>=8,t[r+2]=o,o>>=8,t[r+1]=o,o>>=8,t[r]=o,r+8}function E(t,e,r,n,i,a){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function L(t,e,r,n,i){return e=+e,r>>>=0,i||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),l.write(t,e,r,n,23,4),r+4}function C(t,e,r,n,i){return e=+e,r>>>=0,i||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),l.write(t,e,r,n,52,8),r+8}e.hp=f,e.IS=50,f.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),f.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(t,e,r){return h(t,e,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(t,e,r){return(p(t),t<=0)?c(t):void 0!==e?"string"==typeof r?c(t).fill(e,r):c(t).fill(e):c(t)},f.allocUnsafe=function(t){return d(t)},f.allocUnsafeSlow=function(t){return d(t)},f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,e){if(U(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),U(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);in.length?(f.isBuffer(a)||(a=f.from(a)),a.copy(n,i)):Uint8Array.prototype.set.call(n,a,i);else if(f.isBuffer(a))a.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=a.length}return n},f.byteLength=m,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},u&&(f.prototype[u]=f.prototype.inspect),f.prototype.compare=function(t,e,r,n,i){if(U(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+o(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var a=i-n,s=r-e,l=Math.min(a,s),u=this.slice(n,i),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,a,o,s,l,u,c,f,h=this.length-e;if((void 0===r||r>h)&&(r=h),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i,a=t.length-r;n?(n=Number(n))>a&&(n=a):n=a;var o=e.length;for(n>o/2&&(n=o/2),i=0;i>8,i.push(r%256),i.push(n);return i}(t,this.length-c),this,c,f);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},f.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t>>>=0,e||k(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=q(function(t){D(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);var n=e+256*this[++t]+65536*this[++t]+16777216*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+16777216*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);var n=16777216*e+65536*this[++t]+256*this[++t]+this[++t],i=16777216*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},f.prototype.readInt8=function(t,e){return(t>>>=0,e||k(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=q(function(t){D(t>>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<>>=0,e||k(t,4,this.length),l.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||k(t,4,this.length),l.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||k(t,8,this.length),l.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||k(t,8,this.length),l.read(this,t,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;A(this,t,e,r,i,0)}var a=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;A(this,t,e,r,i,0)}var a=r-1,o=1;for(this[e+a]=255&t;--a>=0&&(o*=256);)this[e+a]=t/o&255;return e+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigUInt64LE=q(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return M(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=q(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigInt64LE=q(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return M(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=q(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return C(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return C(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function z(t,e,r,n,i,a){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat((a+1)*8).concat(s):">= -(2".concat(s," ** ").concat((a+1)*8-1).concat(s,") and < 2 ** ")+"".concat((a+1)*8-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new P.ERR_OUT_OF_RANGE("value",o,t)}D(i,"offset"),(void 0===n[i]||void 0===n[i+a])&&R(i,n.length-(a+1))}function D(t,e){if("number"!=typeof t)throw new P.ERR_INVALID_ARG_TYPE(e,"number",t)}function R(t,e,r){if(Math.floor(t)!==t)throw D(t,r),new P.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new P.ERR_BUFFER_OUT_OF_BOUNDS;throw new P.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}O("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),O("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(o(e))},TypeError),O("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=I(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=I(i)),i+="n"),n+=" It must be ".concat(e,". Received ").concat(i)},RangeError);var F=/[^+/0-9A-Za-z-_]/g;function B(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319||o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function N(t){return s.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,r,n){var i;for(i=0;i=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function U(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var V=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function q(t){return"undefined"==typeof BigInt?H:t}function H(){throw Error("BigInt not supported")}},9216: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}},6296:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||"turntable",c=n(),f=i(),h=a();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new o({turntable:c,orbit:f,matrix:h},u)};var n=r(7261),i=r(9977),a=r(4192);function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map(function(e){return t[e]}),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(t){for(var e=this._controllerList,r=0;r0?o-4:o;for(r=0;r>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[c++]=255&e),1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=0,s=n-i;o>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}(t,o,o+16383>s?s:o+16383));return 1===i?a.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&a.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3865:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},1318:function(t){"use strict";t.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},8697:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},7842:function(t,e,r){"use strict";var n=r(6330),i=r(1533),a=r(2651),o=r(4387),s=r(869),l=r(8697);t.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var u,c,f=0;if(i(e))u=e.clone();else if("string"==typeof e)u=o(e);else if(0===e)return[a(0),a(1)];else if(e===Math.floor(e))u=a(e);else{for(;e!==Math.floor(e);)e*=1157920892373162e62,f-=256;u=a(e)}if(n(r))u.mul(r[1]),c=r[0].clone();else if(i(r))c=r.clone();else if("string"==typeof r)c=o(r);else if(r){if(r===Math.floor(r))c=a(r);else{for(;r!==Math.floor(r);)r*=1157920892373162e62,f+=256;c=a(r)}}else c=a(1);return f>0?u=u.ushln(f):f<0&&(c=c.ushln(-f)),s(u,c)}},6330:function(t,e,r){"use strict";var n=r(1533);t.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},5716:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return t.cmp(new n(0))}},1369:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}},1533:function(t,e,r){"use strict";r(6859),t.exports=function(t){return t&&"object"==typeof t&&!!t.words}},2651:function(t,e,r){"use strict";var n=r(6859),i=r(2361);t.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},869:function(t,e,r){"use strict";var n=r(2651),i=r(5716);t.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}},4387:function(t,e,r){"use strict";var n=r(6859);t.exports=function(t){return new n(t)}},6504:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},7721:function(t,e,r){"use strict";var n=r(5716);t.exports=function(t){return n(t[0])*n(t[1])}},5572:function(t,e,r){"use strict";var n=r(869);t.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},946:function(t,e,r){"use strict";var n=r(1369),i=r(4025);t.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=n(a.div),s=a.mod,l=e.negative!==r.negative?-1:1;if(0===s.cmpn(0))return l*o;if(o){var u=i(o)+4,c=n(s.ushln(u).divRound(r));return l*(o+c*Math.pow(2,-u))}var f=r.bitLength()-s.bitLength()+53,c=n(s.ushln(f).divRound(r));return f<1023?l*c*Math.pow(2,-f):l*(c*=11125369292536007e-324)*Math.pow(2,1023-f)}},2478:function(t){"use strict";function e(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>=0?(a=o,i=o-1):n=o+1}return a}function r(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>0?(a=o,i=o-1):n=o+1}return a}function n(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<0?(a=o,n=o+1):i=o-1}return a}function i(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<=0?(a=o,n=o+1):i=o-1}return a}function a(t,e,r,n,i){for(;n<=i;){var a=n+i>>>1,o=t[a],s=void 0!==r?r(o,e):o-e;if(0===s)return a;s<=0?n=a+1:i=a-1}return -1}function o(t,e,r,n,i,a){return"function"==typeof r?a(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):a(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,a){return o(t,r,n,i,a,e)},gt:function(t,e,n,i,a){return o(t,e,n,i,a,r)},lt:function(t,e,r,i,a){return o(t,e,r,i,a,n)},le:function(t,e,r,n,a){return o(t,e,r,n,a,i)},eq:function(t,e,r,n,i){return o(t,e,r,n,i,a)}}},8828:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-2147483648,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return t-=t>>>1&1431655765,((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)*16843009>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=Array(256);(function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return t&=65535,e&=65535,(t=((t=((t=((t=(t|t<<8)&16711935)|t<<4)&252645135)|t<<2)&858993459)|t<<1)&1431655765)|(e=((e=((e=((e=(e|e<<8)&16711935)|e<<4)&252645135)|e<<2)&858993459)|e<<1)&1431655765)<<1},e.deinterleave2=function(t,e){return(t=((t=((t=((t=((t=t>>>e&1431655765)|t>>>1)&858993459)|t>>>2)&252645135)|t>>>4)&16711935)|t>>>16)&65535)<<16>>16},e.interleave3=function(t,e,r){return t&=1023,e&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&4278190335)|r<<8)&251719695)|r<<4)&3272356035)|r<<2)&1227133513,(t=((t=((t=((t=(t|t<<16)&4278190335)|t<<8)&251719695)|t<<4)&3272356035)|t<<2)&1227133513|(e=((e=((e=((e=(e|e<<16)&4278190335)|e<<8)&251719695)|e<<4)&3272356035)|e<<2)&1227133513)<<1)|r<<2},e.deinterleave3=function(t,e){return(t=((t=((t=((t=((t=t>>>e&1227133513)|t>>>2)&3272356035)|t>>>4)&251719695)|t>>>8)&4278190335)|t>>>16)&1023)<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},6859:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&(("le"===e||"be"===e)&&(r=e,e=10),this._init(t||0,e||10,r||"be"))}"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{u="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(t,e,r){var n=o(t,r);return r-1>=e&&(n|=o(t,r-1)<<4),n}function l(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?i+=s-49+10:s>=17?i+=s-17+10:i+=s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return 0>t.cmp(e)?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;o-=3)a=t[o]|t[o-1]<<8|t[o-2]<<16,this.words[i]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(o=0,i=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=Array(this.length);for(var n,i=0;i=e;i-=2)n=s(t,e,i)<=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u,c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,f=67108863&l,h=Math.min(u,e.length-1),p=Math.max(0,u-t.length+1);p<=h;p++){var d=u-p|0;c+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&o}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var r,i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=f[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var v=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?v+r:c[u-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==u),this.toArrayLike(u,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i,a,o=this.byteLength(),s=r||Math.max(1,o);n(o<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0"),this.strip();var l=new t(s),u=this.clone();if("le"===e){for(a=0;!u.isZero();a++)i=u.andln(255),u.iushrn(8),l[a]=i;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return(8191&e)==0&&(r+=13,e>>>=13),(127&e)==0&&(r+=7,e>>>=7),(15&e)==0&&(r+=4,e>>>=4),(3&e)==0&&(r+=2,e>>>=2),(1&e)==0&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return(this.length-1)*26+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){this.length>t.length?(e=this,r=t):(e=t,r=this);for(var e,r,n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),e?this.words[r]=this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var e,r,n,i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e,r,n=this.iadd(t);return t.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(e=this,r=t):(e=t,r=this);for(var a=0,o=0;o>26,this.words[o]=67108863&n;for(;0!==a&&o>26,this.words[o]=67108863&n;if(0===a&&o>>13,p=0|o[1],d=8191&p,v=p>>>13,g=0|o[2],y=8191&g,m=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],T=8191&w,k=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],L=8191&E,C=E>>>13,P=0|o[7],O=8191&P,I=P>>>13,z=0|o[8],D=8191&z,R=z>>>13,F=0|o[9],B=8191&F,N=F>>>13,j=0|s[0],U=8191&j,V=j>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Y=8191&W,X=W>>>13,Z=0|s[3],K=8191&Z,J=Z>>>13,$=0|s[4],Q=8191&$,tt=$>>>13,te=0|s[5],tr=8191&te,tn=te>>>13,ti=0|s[6],ta=8191&ti,to=ti>>>13,ts=0|s[7],tl=8191&ts,tu=ts>>>13,tc=0|s[8],tf=8191&tc,th=tc>>>13,tp=0|s[9],td=8191&tp,tv=tp>>>13;r.negative=t.negative^e.negative,r.length=19;var tg=(u+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(h,U)|0))<<13)|0;u=((a=Math.imul(h,V))+(i>>>13)|0)+(tg>>>26)|0,tg&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(v,U)|0,a=Math.imul(v,V);var ty=(u+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))<<13)|0;u=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(ty>>>26)|0,ty&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(m,U)|0,a=Math.imul(m,V),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,G)|0;var tm=(u+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,Y)|0))<<13)|0;u=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(tm>>>26)|0,tm&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(y,H)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0;var tx=(u+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(h,K)|0))<<13)|0;u=((a=a+Math.imul(h,J)|0)+(i>>>13)|0)+(tx>>>26)|0,tx&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0,n=n+Math.imul(d,K)|0,i=(i=i+Math.imul(d,J)|0)+Math.imul(v,K)|0,a=a+Math.imul(v,J)|0;var tb=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;u=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(tb>>>26)|0,tb&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,H)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,J)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,tt)|0;var t_=(u+(n=n+Math.imul(f,tr)|0)|0)+((8191&(i=(i=i+Math.imul(f,tn)|0)+Math.imul(h,tr)|0))<<13)|0;u=((a=a+Math.imul(h,tn)|0)+(i>>>13)|0)+(t_>>>26)|0,t_&=67108863,n=Math.imul(L,U),i=(i=Math.imul(L,V))+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,X)|0,n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(_,K)|0,a=a+Math.imul(_,J)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,tt)|0,n=n+Math.imul(d,tr)|0,i=(i=i+Math.imul(d,tn)|0)+Math.imul(v,tr)|0,a=a+Math.imul(v,tn)|0;var tw=(u+(n=n+Math.imul(f,ta)|0)|0)+((8191&(i=(i=i+Math.imul(f,to)|0)+Math.imul(h,ta)|0))<<13)|0;u=((a=a+Math.imul(h,to)|0)+(i>>>13)|0)+(tw>>>26)|0,tw&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,H)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(k,K)|0,a=a+Math.imul(k,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(y,tr)|0,i=(i=i+Math.imul(y,tn)|0)+Math.imul(m,tr)|0,a=a+Math.imul(m,tn)|0,n=n+Math.imul(d,ta)|0,i=(i=i+Math.imul(d,to)|0)+Math.imul(v,ta)|0,a=a+Math.imul(v,to)|0;var tT=(u+(n=n+Math.imul(f,tl)|0)|0)+((8191&(i=(i=i+Math.imul(f,tu)|0)+Math.imul(h,tl)|0))<<13)|0;u=((a=a+Math.imul(h,tu)|0)+(i>>>13)|0)+(tT>>>26)|0,tT&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(C,Y)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(b,tr)|0,i=(i=i+Math.imul(b,tn)|0)+Math.imul(_,tr)|0,a=a+Math.imul(_,tn)|0,n=n+Math.imul(y,ta)|0,i=(i=i+Math.imul(y,to)|0)+Math.imul(m,ta)|0,a=a+Math.imul(m,to)|0,n=n+Math.imul(d,tl)|0,i=(i=i+Math.imul(d,tu)|0)+Math.imul(v,tl)|0,a=a+Math.imul(v,tu)|0;var tk=(u+(n=n+Math.imul(f,tf)|0)|0)+((8191&(i=(i=i+Math.imul(f,th)|0)+Math.imul(h,tf)|0))<<13)|0;u=((a=a+Math.imul(h,th)|0)+(i>>>13)|0)+(tk>>>26)|0,tk&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(I,Y)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(L,K)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(C,K)|0,a=a+Math.imul(C,J)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(T,tr)|0,i=(i=i+Math.imul(T,tn)|0)+Math.imul(k,tr)|0,a=a+Math.imul(k,tn)|0,n=n+Math.imul(b,ta)|0,i=(i=i+Math.imul(b,to)|0)+Math.imul(_,ta)|0,a=a+Math.imul(_,to)|0,n=n+Math.imul(y,tl)|0,i=(i=i+Math.imul(y,tu)|0)+Math.imul(m,tl)|0,a=a+Math.imul(m,tu)|0,n=n+Math.imul(d,tf)|0,i=(i=i+Math.imul(d,th)|0)+Math.imul(v,tf)|0,a=a+Math.imul(v,th)|0;var tA=(u+(n=n+Math.imul(f,td)|0)|0)+((8191&(i=(i=i+Math.imul(f,tv)|0)+Math.imul(h,td)|0))<<13)|0;u=((a=a+Math.imul(h,tv)|0)+(i>>>13)|0)+(tA>>>26)|0,tA&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,G))+Math.imul(N,H)|0,a=Math.imul(N,G),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(I,K)|0,a=a+Math.imul(I,J)|0,n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(C,Q)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(M,tr)|0,i=(i=i+Math.imul(M,tn)|0)+Math.imul(S,tr)|0,a=a+Math.imul(S,tn)|0,n=n+Math.imul(T,ta)|0,i=(i=i+Math.imul(T,to)|0)+Math.imul(k,ta)|0,a=a+Math.imul(k,to)|0,n=n+Math.imul(b,tl)|0,i=(i=i+Math.imul(b,tu)|0)+Math.imul(_,tl)|0,a=a+Math.imul(_,tu)|0,n=n+Math.imul(y,tf)|0,i=(i=i+Math.imul(y,th)|0)+Math.imul(m,tf)|0,a=a+Math.imul(m,th)|0;var tM=(u+(n=n+Math.imul(d,td)|0)|0)+((8191&(i=(i=i+Math.imul(d,tv)|0)+Math.imul(v,td)|0))<<13)|0;u=((a=a+Math.imul(v,tv)|0)+(i>>>13)|0)+(tM>>>26)|0,tM&=67108863,n=Math.imul(B,Y),i=(i=Math.imul(B,X))+Math.imul(N,Y)|0,a=Math.imul(N,X),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,J)|0)+Math.imul(R,K)|0,a=a+Math.imul(R,J)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,tr)|0,i=(i=i+Math.imul(L,tn)|0)+Math.imul(C,tr)|0,a=a+Math.imul(C,tn)|0,n=n+Math.imul(M,ta)|0,i=(i=i+Math.imul(M,to)|0)+Math.imul(S,ta)|0,a=a+Math.imul(S,to)|0,n=n+Math.imul(T,tl)|0,i=(i=i+Math.imul(T,tu)|0)+Math.imul(k,tl)|0,a=a+Math.imul(k,tu)|0,n=n+Math.imul(b,tf)|0,i=(i=i+Math.imul(b,th)|0)+Math.imul(_,tf)|0,a=a+Math.imul(_,th)|0;var tS=(u+(n=n+Math.imul(y,td)|0)|0)+((8191&(i=(i=i+Math.imul(y,tv)|0)+Math.imul(m,td)|0))<<13)|0;u=((a=a+Math.imul(m,tv)|0)+(i>>>13)|0)+(tS>>>26)|0,tS&=67108863,n=Math.imul(B,K),i=(i=Math.imul(B,J))+Math.imul(N,K)|0,a=Math.imul(N,J),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(O,tr)|0,i=(i=i+Math.imul(O,tn)|0)+Math.imul(I,tr)|0,a=a+Math.imul(I,tn)|0,n=n+Math.imul(L,ta)|0,i=(i=i+Math.imul(L,to)|0)+Math.imul(C,ta)|0,a=a+Math.imul(C,to)|0,n=n+Math.imul(M,tl)|0,i=(i=i+Math.imul(M,tu)|0)+Math.imul(S,tl)|0,a=a+Math.imul(S,tu)|0,n=n+Math.imul(T,tf)|0,i=(i=i+Math.imul(T,th)|0)+Math.imul(k,tf)|0,a=a+Math.imul(k,th)|0;var tE=(u+(n=n+Math.imul(b,td)|0)|0)+((8191&(i=(i=i+Math.imul(b,tv)|0)+Math.imul(_,td)|0))<<13)|0;u=((a=a+Math.imul(_,tv)|0)+(i>>>13)|0)+(tE>>>26)|0,tE&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(N,Q)|0,a=Math.imul(N,tt),n=n+Math.imul(D,tr)|0,i=(i=i+Math.imul(D,tn)|0)+Math.imul(R,tr)|0,a=a+Math.imul(R,tn)|0,n=n+Math.imul(O,ta)|0,i=(i=i+Math.imul(O,to)|0)+Math.imul(I,ta)|0,a=a+Math.imul(I,to)|0,n=n+Math.imul(L,tl)|0,i=(i=i+Math.imul(L,tu)|0)+Math.imul(C,tl)|0,a=a+Math.imul(C,tu)|0,n=n+Math.imul(M,tf)|0,i=(i=i+Math.imul(M,th)|0)+Math.imul(S,tf)|0,a=a+Math.imul(S,th)|0;var tL=(u+(n=n+Math.imul(T,td)|0)|0)+((8191&(i=(i=i+Math.imul(T,tv)|0)+Math.imul(k,td)|0))<<13)|0;u=((a=a+Math.imul(k,tv)|0)+(i>>>13)|0)+(tL>>>26)|0,tL&=67108863,n=Math.imul(B,tr),i=(i=Math.imul(B,tn))+Math.imul(N,tr)|0,a=Math.imul(N,tn),n=n+Math.imul(D,ta)|0,i=(i=i+Math.imul(D,to)|0)+Math.imul(R,ta)|0,a=a+Math.imul(R,to)|0,n=n+Math.imul(O,tl)|0,i=(i=i+Math.imul(O,tu)|0)+Math.imul(I,tl)|0,a=a+Math.imul(I,tu)|0,n=n+Math.imul(L,tf)|0,i=(i=i+Math.imul(L,th)|0)+Math.imul(C,tf)|0,a=a+Math.imul(C,th)|0;var tC=(u+(n=n+Math.imul(M,td)|0)|0)+((8191&(i=(i=i+Math.imul(M,tv)|0)+Math.imul(S,td)|0))<<13)|0;u=((a=a+Math.imul(S,tv)|0)+(i>>>13)|0)+(tC>>>26)|0,tC&=67108863,n=Math.imul(B,ta),i=(i=Math.imul(B,to))+Math.imul(N,ta)|0,a=Math.imul(N,to),n=n+Math.imul(D,tl)|0,i=(i=i+Math.imul(D,tu)|0)+Math.imul(R,tl)|0,a=a+Math.imul(R,tu)|0,n=n+Math.imul(O,tf)|0,i=(i=i+Math.imul(O,th)|0)+Math.imul(I,tf)|0,a=a+Math.imul(I,th)|0;var tP=(u+(n=n+Math.imul(L,td)|0)|0)+((8191&(i=(i=i+Math.imul(L,tv)|0)+Math.imul(C,td)|0))<<13)|0;u=((a=a+Math.imul(C,tv)|0)+(i>>>13)|0)+(tP>>>26)|0,tP&=67108863,n=Math.imul(B,tl),i=(i=Math.imul(B,tu))+Math.imul(N,tl)|0,a=Math.imul(N,tu),n=n+Math.imul(D,tf)|0,i=(i=i+Math.imul(D,th)|0)+Math.imul(R,tf)|0,a=a+Math.imul(R,th)|0;var tO=(u+(n=n+Math.imul(O,td)|0)|0)+((8191&(i=(i=i+Math.imul(O,tv)|0)+Math.imul(I,td)|0))<<13)|0;u=((a=a+Math.imul(I,tv)|0)+(i>>>13)|0)+(tO>>>26)|0,tO&=67108863,n=Math.imul(B,tf),i=(i=Math.imul(B,th))+Math.imul(N,tf)|0,a=Math.imul(N,th);var tI=(u+(n=n+Math.imul(D,td)|0)|0)+((8191&(i=(i=i+Math.imul(D,tv)|0)+Math.imul(R,td)|0))<<13)|0;u=((a=a+Math.imul(R,tv)|0)+(i>>>13)|0)+(tI>>>26)|0,tI&=67108863;var tz=(u+(n=Math.imul(B,td))|0)+((8191&(i=(i=Math.imul(B,tv))+Math.imul(N,td)|0))<<13)|0;return u=((a=Math.imul(N,tv))+(i>>>13)|0)+(tz>>>26)|0,tz&=67108863,l[0]=tg,l[1]=ty,l[2]=tm,l[3]=tx,l[4]=tb,l[5]=t_,l[6]=tw,l[7]=tT,l[8]=tk,l[9]=tA,l[10]=tM,l[11]=tS,l[12]=tE,l[13]=tL,l[14]=tC,l[15]=tP,l[16]=tO,l[17]=tI,l[18]=tz,0!==u&&(l[19]=u,r.length++),r};function v(t,e,r){return new g().mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?p(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):v(this,t,e)},g.prototype.makeRBT=function(t){for(var e=Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=(i/67108864|0)+(a>>>26),this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var i,a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,l=0;l=0&&(0!==u||l>=i);l--){var c=0|this.words[l];this.words[l]=u<<26-a|c>>>a,u=c&s}return r&&0!==u&&(r.words[r.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;return!(this.length<=r)&&!!(this.words[r]&1<=0);var e=t%26,r=(t-e)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==e&&r++,this.length=Math.min(r,this.length),0!==e&&(this.words[this.length-1]&=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r,n=this.length-t.length,i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),i.iushln(n),s=0|o.words[o.length-1]);var l=i.length-o.length;if("mod"!==e){(r=new a(null)).length=l+1,r.words=Array(r.length);for(var u=0;u=0;f--){var h=(0|i.words[o.length+f])*67108864+(0|i.words[o.length+f-1]);for(h=Math.min(h/s|0,67108863),i._ishlnsubmul(o,h,f);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(o,1,f),i.isZero()||(i.negative^=1);r&&(r.words[f]=h)}return r&&r.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},a.prototype.divmod=function(t,e,r){var i,o,s;return(n(!t.isZero()),this.isZero())?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):(this.negative&t.negative)!=0?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||0>this.cmp(t)?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e)},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=67108864%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;(e.words[0]&p)==0&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var d=0,v=1;(r.words[0]&v)==0&&d<26;++d,v<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e,r=this,i=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var o=new a(1),s=new a(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,c=1;(r.words[0]&c)==0&&u<26;++u,c<<=1);if(u>0)for(r.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var f=0,h=1;(i.words[0]&h)==0&&f<26;++f,h<<=1);if(f>0)for(i.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),o.isub(s)):(i.isub(r),s.isub(o))}return 0>(e=0===r.cmpn(1)?o:s).cmpn(0)&&e.iadd(t),e},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return -1===this.cmpn(t)},a.prototype.lt=function(t){return -1===this.cmp(t)},a.prototype.lten=function(t){return 0>=this.cmpn(t)},a.prototype.lte=function(t){return 0>=this.cmp(t)},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new T(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){T.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var t=new a(null);return t.words=Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(x,m),x.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},x.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){var e;if(y[t])return y[t];if("k256"===t)e=new x;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else if("p25519"===t)e=new w;else throw Error("Unknown prime "+t);return y[t]=e,e},T.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},T.prototype._verify2=function(t,e){n((t.negative|e.negative)==0,"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return 0>r.cmpn(0)&&r.iadd(this.m),r},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var v=p,g=0;0!==v.cmp(s);g++)v=v.redSqr();n(g=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var f=u>>c&1;if(i!==r[0]&&(i=this.sqr(i)),0===f&&0===o){s=0;continue}o<<=1,o|=f,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)}l=26}return i},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,T),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},6204:function(t){"use strict";t.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(f<=0)){var h=i.mallocDouble(2*f*u),p=i.mallocInt32(u);if((u=s(t,f,h,p))>0){if(1===f&&n)a.init(u),l=a.sweepComplete(f,r,0,u,h,p,0,u,h,p);else{var d=i.mallocDouble(2*f*c),v=i.mallocInt32(c);(c=s(e,f,d,v))>0&&(a.init(u+c),l=1===f?a.sweepBipartite(f,r,0,u,h,p,0,c,d,v):o(f,r,n,u,h,p,c,d,v),i.free(d),i.free(v))}i.free(h),i.free(p)}return l}}}function u(t,e){n.push([t,e])}},2455:function(t,e){"use strict";function r(t){return t?function(t,e,r,n,i,a,o,s,l,u,c){return i-n>l-s?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,p=f*n;hu-l?n?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,p=f*n;h0;){var M=6*(k-=1),S=y[M],E=y[M+1],L=y[M+2],C=y[M+3],P=y[M+4],O=y[M+5],I=2*k,z=m[I],D=m[I+1],R=1&O,F=!!(16&O),B=c,N=b,j=w,U=T;if(R&&(B=w,N=T,j=c,U=b),!(2&O&&(L=p(t,S,E,L,B,N,D),E>=L)||4&O&&(E=d(t,S,E,L,B,N,z))>=L)){var V=L-E,q=P-C;if(F){if(t*V*(V+q)<4194304){if(void 0!==(Z=l.scanComplete(t,S,e,E,L,B,N,C,P,j,U)))return Z;continue}}else{if(t*Math.min(V,q)<128){if(void 0!==(Z=o(t,S,e,R,E,L,B,N,C,P,j,U)))return Z;continue}if(t*V*q<4194304){if(void 0!==(Z=l.scanBipartite(t,S,e,R,E,L,B,N,C,P,j,U)))return Z;continue}}var H=f(t,S,E,L,B,N,z,D);if(E=p0)&&!(p1>=hi)"),h=c("lo===p0"),p=c("lo>>1,c=2*t,f=u,h=a[c*u+e];sr&&i[f+e]>u;--c,f-=o){for(var h=f,p=f+o,d=0;d=y?(f=g,h=y):v>=x?(f=d,h=v):(f=m,h=x):y>=x?(f=g,h=y):x>=v?(f=d,h=v):(f=m,h=x);for(var b=c*(l-1),_=c*f,w=0;wf;++f,l+=s)if(i[l+e]===o){if(c===f)c+=1,u+=s;else{for(var h=0;s>h;++h){var p=i[l+h];i[l+h]=i[u],i[u++]=p}var d=a[f];a[f]=a[c],a[c++]=d}}return c},"lof;++f,l+=s)if(i[l+e]h;++h){var p=i[l+h];i[l+h]=i[u],i[u++]=p}var d=a[f];a[f]=a[c],a[c++]=d}}return c},"lo<=p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=t+e,h=r;n>h;++h,l+=s)if(i[l+f]<=o){if(c===h)c+=1,u+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var v=a[h];a[h]=a[c],a[c++]=v}}return c},"hi<=p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=t+e,h=r;n>h;++h,l+=s)if(i[l+f]<=o){if(c===h)c+=1,u+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var v=a[h];a[h]=a[c],a[c++]=v}}return c},"loh;++h,l+=s){var p=i[l+e],d=i[l+f];if(pv;++v){var g=i[l+v];i[l+v]=i[u],i[u++]=g}var y=a[h];a[h]=a[c],a[c++]=y}}}return c},"lo<=p0&&p0<=hi":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=t+e,h=r;n>h;++h,l+=s){var p=i[l+e],d=i[l+f];if(p<=o&&o<=d){if(c===h)c+=1,u+=s;else{for(var v=0;s>v;++v){var g=i[l+v];i[l+v]=i[u],i[u++]=g}var y=a[h];a[h]=a[c],a[c++]=y}}}return c},"!(lo>=p0)&&!(p1>=hi)":function(t,e,r,n,i,a,o,s){for(var l=2*t,u=l*r,c=u,f=r,h=t+e,p=r;n>p;++p,u+=l){var d=i[u+e],v=i[u+h];if(!(d>=o)&&!(s>=v)){if(f===p)f+=1,c+=l;else{for(var g=0;l>g;++g){var y=i[u+g];i[u+g]=i[c],i[c++]=y}var m=a[p];a[p]=a[f],a[f++]=m}}}return f}}},1811:function(t){"use strict";function e(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(ur[e+1])}function o(t,e,r,n){var i=n[t*=2];return i>1,d=p-c,v=p+c,g=f,y=d,m=p,x=v,b=h,_=s+1,w=l-1,T=0;a(g,y,u)&&(T=g,g=y,y=T),a(x,b,u)&&(T=x,x=b,b=T),a(g,m,u)&&(T=g,g=m,m=T),a(y,m,u)&&(T=y,y=m,m=T),a(g,x,u)&&(T=g,g=x,x=T),a(m,x,u)&&(T=m,m=x,x=T),a(y,b,u)&&(T=y,y=b,b=T),a(y,m,u)&&(T=y,y=m,m=T),a(x,b,u)&&(T=x,x=b,b=T);for(var k=u[2*y],A=u[2*y+1],M=u[2*x],S=u[2*x+1],E=2*g,L=2*m,C=2*b,P=2*f,O=2*p,I=2*h,z=0;z<2;++z){var D=u[E+z],R=u[L+z],F=u[C+z];u[P+z]=D,u[O+z]=R,u[I+z]=F}n(d,s,u),n(v,l,u);for(var B=_;B<=w;++B)if(o(B,k,A,u))B!==_&&r(B,_,u),++_;else if(!o(B,M,S,u))for(;;){if(o(w,M,S,u)){o(w,k,A,u)?(function(t,e,r,n){e*=2,r*=2;var i=n[t*=2],a=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=n[r],n[e+1]=n[r+1],n[r]=i,n[r+1]=a}(B,_,w,u),++_):r(B,w,u),--w;break}if(--w>>1;a(h,M);for(var S=0,E=0,w=0;w=268435456)L=L-268435456|0,p(l,u,E--,L);else if(L>=0)p(o,s,S--,L);else if(L<=-268435456){L=-L-268435456|0;for(var C=0;C>>1;a(h,E);for(var L=0,C=0,P=0,k=0;k>1==h[2*k+3]>>1&&(I=2,k+=1),O<0){for(var z=-(O>>1)-1,D=0;D>1)-1;0===I?p(o,s,L--,z):1===I?p(l,u,C--,z):2===I&&p(c,f,P--,z)}}},scanBipartite:function(t,e,r,n,i,l,u,c,f,v,g,y){var m=0,x=2*t,b=e+t,_=1,w=1;n?w=268435456:_=268435456;for(var T=i;T>>1;a(h,S);for(var E=0,T=0;T=268435456?(C=!n,k-=268435456):(C=!!n,k-=1),C)d(o,s,E++,k);else{var P=y[k],O=x*k,I=g[O+e+1],z=g[O+e+1+t];i:for(var D=0;D>>1;a(h,_);for(var w=0,y=0;y<_;++y){var T=0|h[2*y+1];if(T<0){var m=-T;if(m>=268435456)o[w++]=m-268435456;else{var k=p[m-=1],A=v*m,M=f[A+e+1],S=f[A+e+1+t];i:for(var E=0;E=0;--E)if(o[E]===m){for(var O=E+1;On(t[i],t[a],t[o],t[s])&&r.push(i,a)}}r(2478),t.exports=function(t,e){for(var r=[],a=t.length,o=e.stars,s=0;sn(t[s],t[c],t[f],t[h])&&r.push(s,c)}}for(;r.length>0;){for(var c=r.pop(),s=r.pop(),f=-1,h=-1,l=o[s],d=1;d=0||(e.flip(s,c),i(t,e,r,f,s,h),i(t,e,r,s,h,f),i(t,e,r,h,c,f),i(t,e,r,c,f,h))}}},5023:function(t,e,r){"use strict";var n,i=r(2478);function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}t.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var p=s.pop();if(u[p]!==-i){u[p]=i,c[p];for(var d=0;d<3;++d){var v=h[3*p+d];v>=0&&0===u[v]&&(f[3*p+d]?l.push(v):(s.push(v),u[v]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var y=function(t,e,r){for(var n=0,i=0;iv[0]&&f.push(new o(v,d,2,h),new o(d,v,1,h))}f.sort(s);for(var g=f[0].a[0]-(1+Math.abs(f[0].a[0]))*2220446049250313e-31,y=[new a([g,1],[g,0],-1,[],[],[],[])],m=[],h=0,x=f.length;h1&&i(r[h[p-2]],r[h[p-1]],a)>0;)t.push([h[p-1],h[p-2],o]),p-=1;h.length=p,h.push(o);for(var d=f.upperIds,p=d.length;p>1&&0>i(r[d[p-2]],r[d[p-1]],a);)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}(m,y,t,b.a,b.idx):2===_?function(t,e,r){var i=n.le(t,r,u),o=t[i],s=o.upperIds,l=s[s.length-1];o.upperIds=[l],t.splice(i+1,0,new a(r.a,r.b,r.idx,[l],s))}(y,0,b):function(t,e,r){var i=r.a;r.a=r.b,r.b=i;var a=n.eq(t,r,u),o=t[a];t[a-1].upperIds=o.upperIds,t.splice(a,1)}(y,0,b)}return m}},5542:function(t,e,r){"use strict";var n=r(2478);function i(t,e){this.stars=t,this.edges=e}t.exports=function(t,e){for(var r=Array(t),n=0;n=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;n=0;--y){var y,m,x,b=n[y],_=e[m=b[0]],w=_[0],T=_[1],k=t[w],A=t[T];if(0>(k[0]-A[0]||k[1]-A[1])){var M=w;w=T,T=M}_[0]=w;var S=_[1]=b[1];for(i&&(x=_[2]);y>0&&n[y-1][0]===m;){var b=n[--y],E=b[1];i?e.push([S,E,x]):e.push([S,E]),S=E}i?e.push([S,T,x]):e.push([S,T])}return a}(t,g,b,w,m),y(g,k=d(t,T,_),m),k||b.length>0||w.length>0;)L=!0;if(r&&L){A.length=0,r.length=0;for(var S=0;Se[2]?1:0)}function y(t,e,r){if(0!==t.length){if(e)for(var n=0;np+1)throw Error(f+" map requires nshades to be at least size "+c.length);v=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=c.map(function(t){return Math.round(t.index*p)}),v[0]=Math.min(Math.max(v[0],0),1),v[1]=Math.min(Math.max(v[1],0),1);var e,r,l,u,c,f,h,p,d,v,g,y=c.map(function(t,e){var r=c[e].index,n=c[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=v[0]+(v[1]-v[0])*r),n}),d=[];for(g=0;g0?-1:l(t,e,a)?-1:1:0===s?u>0?1:l(t,e,r)?1:-1:i(u-s)}var f=n(t,e,r);return f>0?o>0&&n(t,e,a)>0?1:-1:f<0?o>0||n(t,e,a)>0?1:-1:n(t,e,a)>0?1:l(t,e,r)?1:-1};var n=r(3250),i=r(8572),a=r(9362),o=r(5382),s=r(8210);function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),u=a(r[1],-e[1]),c=s(o(n,l),o(i,u));return c[c.length-1]>=0}},8572:function(t){"use strict";t.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(t){t.exports=function(t,n){var i=t.length,a=t.length-n.length;if(a)return a;switch(i){case 0:return 0;case 1:return t[0]-n[0];case 2:return t[0]+t[1]-n[0]-n[1]||e(t[0],t[1])-e(n[0],n[1]);case 3:var o=t[0]+t[1],s=n[0]+n[1];if(a=o+t[2]-(s+n[2]))return a;var l=e(t[0],t[1]),u=e(n[0],n[1]);return e(l,t[2])-e(u,n[2])||e(l+t[2],o)-e(u+n[2],s);case 4:var c=t[0],f=t[1],h=t[2],p=t[3],d=n[0],v=n[1],g=n[2],y=n[3];return c+f+h+p-(d+v+g+y)||e(c,f,h,p)-e(d,v,g,y,d)||e(c+f,c+h,c+p,f+h,f+p,h+p)-e(d+v,d+g,d+y,v+g,v+y,g+y)||e(c+f+h,c+f+p,c+h+p,f+h+p)-e(d+v+g,d+v+y,d+g+y,v+g+y);default:for(var m=t.slice().sort(r),x=n.slice().sort(r),b=0;bt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},4750:function(t,e,r){"use strict";t.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}(n(function(t,e){for(var r=t.length,n=Array(r),i=0;ie.indexOf(i)&&(n[a++]=t[i]);return n}(t,r),!0),r)}};var n=r(8954),i=r(3952)},4769:function(t){"use strict";t.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=Array(t.length));for(var p=t.length-1;p>=0;--p)a[p]=u*t[p]+c*e[p]+f*r[p]+h*n[p];return a}return u*t+c*e+f*r+h*n},t.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}},7642:function(t,e,r){"use strict";var n=r(8954),i=r(1682);function a(t,e){this.point=t,this.index=e}function o(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a=2)return!1;t[r]=n}return!0}):_.filter(function(t){for(var e=0;e<=s;++e){var r=y[t[e]];if(r<0)return!1;t[e]=r}return!0}),1&s)for(var c=0;c<_.length;++c){var b=_[c],h=b[0];b[0]=b[1],b[1]=h}return _}},2361:function(t){var e=!1;if("undefined"!=typeof Float64Array){var r=new Float64Array(1),n=new Uint32Array(r.buffer);(r[0]=1,e=!0,1072693248===n[1])?(t.exports=function(t){return r[0]=t,[n[0],n[1]]},t.exports.pack=function(t,e){return n[0]=t,n[1]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[0]},t.exports.hi=function(t){return r[0]=t,n[1]}):1072693248===n[0]?(t.exports=function(t){return r[0]=t,[n[1],n[0]]},t.exports.pack=function(t,e){return n[1]=t,n[0]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[1]},t.exports.hi=function(t){return r[0]=t,n[0]}):e=!1}if(!e){var a=new i(8);t.exports=function(t){return a.writeDoubleLE(t,0,!0),[a.readUInt32LE(0,!0),a.readUInt32LE(4,!0)]},t.exports.pack=function(t,e){return a.writeUInt32LE(t,0,!0),a.writeUInt32LE(e,4,!0),a.readDoubleLE(0,!0)},t.exports.lo=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(0,!0)},t.exports.hi=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(4,!0)}}t.exports.sign=function(e){return t.exports.hi(e)>>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var r=t.exports.lo(e),n=t.exports.hi(e),i=1048575&n;return 2146435072&n&&(i+=1048576),[r,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}},1338:function(t){"use strict";t.exports=function(t,e){switch(void 0===e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var r,n;for(n=0,r=Array(t);n=r-1)for(var h=l.length-1,d=t-e[r-1],p=0;p=r-1){var c=s.length-1;e[r-1];for(var f=0;f=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--f)n.push(a(l[f-1],u[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var p=a(u[h-1],c[h-1],arguments[h]);n.push(p),i.push((p-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e)&&arguments.length===r+1){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,f=c>1e-6?1/c:0;this._time.push(t);for(var h=r;h>0;--h){var p=arguments[h];n.push(a(l[h-1],u[h-1],n[o++]+p)),i.push(p*f)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--f)n.push(a(l[f],u[f],n[o]+c*i[o])),i.push(0),o+=1}}},3840:function(t){"use strict";function e(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function r(t){return new e(t._color,t.key,t.value,t.left,t.right,t._count)}function n(t,r){return new e(t,r.key,r.value,r.left,r.right,r._count)}function i(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function a(t,e){this._compare=t,this.root=e}t.exports=function(t){return new a(t||c,null)};var o=a.prototype;function s(t,e){this.tree=t,this._stack=e}Object.defineProperty(o,"keys",{get:function(){var t=[];return this.forEach(function(e,r){t.push(e)}),t}}),Object.defineProperty(o,"values",{get:function(){var t=[];return this.forEach(function(e,r){t.push(r)}),t}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(t,r){for(var o=this._compare,s=this.root,l=[],u=[];s;){var c=o(t,s.key);l.push(s),u.push(c),s=c<=0?s.left:s.right}l.push(new e(0,t,r,null,null,1));for(var f=l.length-2;f>=0;--f){var s=l[f];u[f]<=0?l[f]=new e(s._color,s.key,s.value,l[f+1],s.right,s._count+1):l[f]=new e(s._color,s.key,s.value,s.left,l[f+1],s._count+1)}for(var f=l.length-1;f>1;--f){var h=l[f-1],s=l[f];if(1===h._color||1===s._color)break;var p=l[f-2];if(p.left===h){if(h.left===s){var d=p.right;if(d&&0===d._color)h._color=1,p.right=n(1,d),p._color=0,f-=1;else{if(p._color=0,p.left=h.right,h._color=1,h.right=p,l[f-2]=h,l[f-1]=s,i(p),i(h),f>=3){var v=l[f-3];v.left===p?v.left=h:v.right=h}break}}else{var d=p.right;if(d&&0===d._color)h._color=1,p.right=n(1,d),p._color=0,f-=1;else{if(h.right=s.left,p._color=0,p.left=s.right,s._color=1,s.left=h,s.right=p,l[f-2]=s,l[f-1]=h,i(p),i(h),i(s),f>=3){var v=l[f-3];v.left===p?v.left=s:v.right=s}break}}}else if(h.right===s){var d=p.left;if(d&&0===d._color)h._color=1,p.left=n(1,d),p._color=0,f-=1;else{if(p._color=0,p.right=h.left,h._color=1,h.left=p,l[f-2]=h,l[f-1]=s,i(p),i(h),f>=3){var v=l[f-3];v.right===p?v.right=h:v.left=h}break}}else{var d=p.left;if(d&&0===d._color)h._color=1,p.left=n(1,d),p._color=0,f-=1;else{if(h.left=s.right,p._color=0,p.right=s.left,s._color=1,s.right=h,s.left=p,l[f-2]=s,l[f-1]=h,i(p),i(h),i(s),f>=3){var v=l[f-3];v.right===p?v.right=s:v.left=s}break}}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return function t(e,r){if(r.left){var n=t(e,r.left);if(n)return n}var n=e(r.key,r.value);return n||(r.right?t(e,r.right):void 0)}(t,this.root);case 2:return function t(e,r,n,i){if(0>=r(e,i.key)){if(i.left){var a=t(e,r,n,i.left);if(a)return a}var a=n(i.key,i.value);if(a)return a}if(i.right)return t(e,r,n,i.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return function t(e,r,n,i,a){var o,s=n(e,a.key),l=n(r,a.key);return s<=0&&(a.left&&(o=t(e,r,n,i,a.left))||l>0&&(o=i(a.key,a.value)))?o:l>0&&a.right?t(e,r,n,i,a.right):void 0}(e,r,this._compare,t,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new s(this,t)}}),Object.defineProperty(o,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new s(this,t)}}),o.at=function(t){if(t<0)return new s(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}else break}return new s(this,[])},o.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new s(this,n)},o.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new s(this,n)},o.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new s(this,n)},o.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new s(this,n)},o.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new s(this,n);r=i<=0?r.left:r.right}return new s(this,[])},o.remove=function(t){var e=this.find(t);return e?e.remove():this},o.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var l=s.prototype;function u(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function c(t,e){return te?1:0}Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new s(this.tree,this._stack.slice())},l.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var o=Array(t.length),s=t[t.length-1];o[o.length-1]=new e(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=t.length-2;l>=0;--l){var s=t[l];s.left===t[l+1]?o[l]=new e(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new e(s._color,s.key,s.value,s.left,o[l+1],s._count)}if((s=o[o.length-1]).left&&s.right){var c=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var f=o[c-1];o.push(new e(s._color,f.key,f.value,s.left,s.right,s._count)),o[c-1].key=s.key,o[c-1].value=s.value;for(var l=o.length-2;l>=c;--l)s=o[l],o[l]=new e(s._color,s.key,s.value,s.left,o[l+1],s._count);o[c-1].left=o[c]}if(0===(s=o[o.length-1])._color){var h=o[o.length-2];h.left===s?h.left=null:h.right===s&&(h.right=null),o.pop();for(var l=0;l=0;--l){if(e=t[l],0===l){e._color=1;return}if((a=t[l-1]).left===e){if((o=a.right).right&&0===o.right._color){if(s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,e._color=1,a._color=1,s._color=1,i(a),i(o),l>1){var u=t[l-2];u.left===a?u.left=o:u.right=o}t[l-1]=o;return}if(o.left&&0===o.left._color){if(s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,e._color=1,i(a),i(o),i(s),l>1){var u=t[l-2];u.left===a?u.left=s:u.right=s}t[l-1]=s;return}if(1===o._color){if(0===a._color){a._color=1,a.right=n(0,o);return}a.right=n(0,o);continue}if(o=r(o),a.right=o.left,o.left=a,o._color=a._color,a._color=0,i(a),i(o),l>1){var u=t[l-2];u.left===a?u.left=o:u.right=o}t[l-1]=o,t[l]=a,l+11){var u=t[l-2];u.right===a?u.right=o:u.left=o}t[l-1]=o;return}if(o.right&&0===o.right._color){if(s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,e._color=1,i(a),i(o),i(s),l>1){var u=t[l-2];u.right===a?u.right=s:u.left=s}t[l-1]=s;return}if(1===o._color){if(0===a._color){a._color=1,a.left=n(0,o);return}a.left=n(0,o);continue}if(o=r(o),a.left=o.right,o.right=a,o._color=a._color,a._color=0,i(a),i(o),l>1){var u=t[l-2];u.right===a?u.right=o:u.left=o}t[l-1]=o,t[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),l.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),l.update=function(t){var r=this._stack;if(0===r.length)throw Error("Can't update empty node!");var n=Array(r.length),i=r[r.length-1];n[n.length-1]=new e(i._color,i.key,t,i.left,i.right,i._count);for(var o=r.length-2;o>=0;--o)(i=r[o]).left===r[o+1]?n[o]=new e(i._color,i.key,i.value,n[o+1],i.right,i._count):n[o]=new e(i._color,i.key,i.value,i.left,n[o+1],i._count);return new a(this.tree._compare,n[0])},l.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},3837:function(t,e,r){"use strict";t.exports=function(t,e){var r=new c(t);return r.update(e),r};var n=r(4935),i=r(501),a=r(5304),o=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function c(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(t)}var f=c.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,a=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),u=e.bind(this,!0,function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]}),c=!1,f=!1;if("bounds"in t)for(var h=t.bounds,p=0;p<2;++p)for(var d=0;d<3;++d)h[p][d]!==this.bounds[p][d]&&(f=!0),this.bounds[p][d]=h[p][d];if("ticks"in t){r=t.ticks,c=!0,this.autoTicks=!1;for(var p=0;p<3;++p)this.tickSpacing[p]=0}else a("tickSpacing")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),f=!0,c=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),c=!0),c){for(var p=0;p<3;++p)r[p].sort(function(t,e){return t.x-e.x});s.equal(r,this.ticks)?c=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(c=!0),l("tickFontStyle")&&(c=!0),l("tickFontWeight")&&(c=!0),l("tickFontVariant")&&(c=!0),a("tickSize"),a("tickAngle"),a("tickPad"),u("tickColor");var v=l("labels");l("labelFont")&&(v=!0),l("labelFontStyle")&&(v=!0),l("labelFontWeight")&&(v=!0),l("labelFontVariant")&&(v=!0),o("labelEnable"),a("labelSize"),a("labelPad"),u("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),u("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),u("lineTickColor"),o("gridEnable"),a("gridWidth"),u("gridColor"),o("zeroEnable"),u("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),u("backgroundColor");var g=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],y=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(v||c)&&this._text.update(this.bounds,this.labels,g,this.ticks,y):this._text=n(this.gl,this.bounds,this.labels,g,this.ticks,y),this._lines&&c&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var p=[new h,new h,new h],d=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var g=[0,0,0],y=[0,0,0],m=[0,0,0];f.draw=function(t){t=t||v;for(var e,r,n,i=this.gl,a=t.model||l,s=t.view||l,c=t.projection||l,f=this.bounds,h=t._ortho||!1,x=o(a,s,c,f,h),b=x.cubeEdges,_=x.axis,w=s[12],T=s[13],k=s[14],A=s[15],M=(h?2:1)*this.pixelRatio*(c[3]*w+c[7]*T+c[11]*k+c[15]*A)/i.drawingBufferHeight,S=0;S<3;++S)this.lastCubeProps.cubeEdges[S]=b[S],this.lastCubeProps.axis[S]=_[S];for(var S=0;S<3;++S)!function(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,u=n[e],c=0;c<3;++c)if(e!==c){var f=a,h=s,p=o,d=l;u&1<0?(p[c]=-1,d[c]=0):(p[c]=0,d[c]=1)}}(p[S],S,this.bounds,b,_);for(var i=this.gl,S=0;S<3;++S)this.backgroundEnable[S]?d[S]=_[S]:d[S]=0;this._background.draw(a,s,c,f,d,this.backgroundColor),this._lines.bind(a,s,c,this);for(var S=0;S<3;++S){var E=[0,0,0];_[S]>0?E[S]=f[1][S]:E[S]=f[0][S];for(var L=0;L<2;++L){var C=(S+1+L)%3,P=(S+1+(1^L))%3;this.gridEnable[C]&&this._lines.drawGrid(C,P,this.bounds,E,this.gridColor[C],this.gridWidth[C]*this.pixelRatio)}for(var L=0;L<2;++L){var C=(S+1+L)%3,P=(S+1+(1^L))%3;this.zeroEnable[P]&&0>=Math.min(f[0][P],f[1][P])&&Math.max(f[0][P],f[1][P])>=0&&this._lines.drawZero(C,P,this.bounds,E,this.zeroLineColor[P],this.zeroLineWidth[P]*this.pixelRatio)}}for(var S=0;S<3;++S){this.lineEnable[S]&&this._lines.drawAxisLine(S,this.bounds,p[S].primalOffset,this.lineColor[S],this.lineWidth[S]*this.pixelRatio),this.lineMirror[S]&&this._lines.drawAxisLine(S,this.bounds,p[S].mirrorOffset,this.lineColor[S],this.lineWidth[S]*this.pixelRatio);for(var O=u(g,p[S].primalMinor),I=u(y,p[S].mirrorMinor),z=this.lineTickLength,L=0;L<3;++L){var D=M/a[5*L];O[L]*=z[L]*D,I[L]*=z[L]*D}this.lineTickEnable[S]&&this._lines.drawAxisTicks(S,p[S].primalOffset,O,this.lineTickColor[S],this.lineTickWidth[S]*this.pixelRatio),this.lineTickMirror[S]&&this._lines.drawAxisTicks(S,p[S].mirrorOffset,I,this.lineTickColor[S],this.lineTickWidth[S]*this.pixelRatio)}function R(t){(n=[0,0,0])[t]=1}this._lines.unbind(),this._text.bind(a,s,c,this.pixelRatio);for(var S=0;S<3;++S){for(var F=p[S].primalMinor,B=p[S].mirrorMinor,N=u(m,p[S].primalOffset),L=0;L<3;++L)this.lineTickEnable[S]&&(N[L]+=M*F[L]*Math.max(this.lineTickLength[L],0)/a[5*L]);var j=[0,0,0];if(j[S]=1,this.tickEnable[S]){-3600===this.tickAngle[S]?(this.tickAngle[S]=0,this.tickAlign[S]="auto"):this.tickAlign[S]=-1,r=1,"auto"===(e=[this.tickAlign[S],.5,r])[0]?e[0]=0:e[0]=parseInt(""+e[0]),n=[0,0,0],function(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];if(a>0&&l>0||a>0&&l<0){R(n);return}a<0&&l>0?R(n):a<0&&l<0?R(n):o>0&&s>0?R(i):o>0&&s<0?R(i):o<0&&s>0?R(i):o<0&&s<0&&R(i)}(S,F,B);for(var L=0;L<3;++L)N[L]+=M*F[L]*this.tickPad[L]/a[5*L];this._text.drawTicks(S,this.tickSize[S],this.tickAngle[S],N,this.tickColor[S],j,n,e)}if(this.labelEnable[S]){r=0,n=[0,0,0],this.labels[S].length>4&&(R(S),r=1),"auto"===(e=[this.labelAlign[S],.5,r])[0]?e[0]=0:e[0]=parseInt(""+e[0]);for(var L=0;L<3;++L)N[L]+=M*F[L]*this.labelPad[L]/a[5*L];N[S]+=.5*(f[0][S]+f[1][S]),this._text.drawLabel(S,this.labelSize[S],this.labelAngle[S],N,this.labelColor[S],[0,0,0],n,e)}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(t,e,r){"use strict";t.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,f=[0,0,0],h=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=p,h[l]=p;for(var d=-1;d<=1;d+=2){f[u]=d;for(var v=-1;v<=1;v+=2)f[c]=v,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var g=u;u=c,c=g}var y=n(t,new Float32Array(e)),m=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:y,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:t.FLOAT,size:3,offset:12,stride:24}],m),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,y,x,b)};var n=r(2762),i=r(8116),a=r(1879).bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(t,e,r){"use strict";t.exports=function(t,e,r,g,y){i(s,e,t),i(s,r,s);for(var m=0,x=0;x<2;++x){c[2]=g[x][2];for(var b=0;b<2;++b){c[1]=g[b][1];for(var _=0;_<2;++_)c[0]=g[_][0],function(t,e,r){for(var n=0;n<4;++n){t[n]=r[12+n];for(var i=0;i<3;++i)t[n]+=e[i]*r[4*i+n]}}(l[m],c,s),m+=1}}for(var w=-1,x=0;x<8;++x){for(var T=l[x][3],k=0;k<3;++k)u[x][k]=l[x][k]/T;y&&(u[x][2]*=-1),T<0&&(w<0?w=x:u[x][2]o(u[P],u[O],u[I],f)||(C?E=1:L=1)}if(E<0||L<0){L>E&&(w|=1<E){w|=1<u[x][1]&&(R=x));for(var F=-1,x=0;x<3;++x){var B=R^1<u[N][0]&&(N=B)}}p[0]=p[1]=p[2]=0,p[n.log2(F^R)]=R&F,p[n.log2(R^N)]=R&N;var j=7^N;j===w||j===D?(j=7^F,p[n.log2(N^j)]=j&N):p[n.log2(F^j)]=j&F;for(var U=w,A=0;A<3;++A)U&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.Q=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);e.bg=function(t){return i(t,u,c,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(t,e,r){"use strict";t.exports=function(t,e,r,n,o,l){var u=i(t),f=a(t,[{buffer:u,size:3}]),h=s(t);h.attributes.position.location=0;var p=new c(t,h,u,f);return p.update(e,r,n,o,l),p};var i=r(2762),a=r(8116),o=r(4359),s=r(1879).Q,l=window||n.global||{},u=l.__TEXT_CACHE||{};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}l.__TEXT_CACHE={};var f=c.prototype,h=[0,0];f.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},f.unbind=function(){this.vao.unbind()},f.update=function(t,e,r,n,i){var a=[];function s(t,e,r,n,i,s){var l=[r.style,r.weight,r.variant,r.family].join("_"),c=u[l];c||(c=u[l]={});var f=c[e];f||(f=c[e]=function(t,e){try{return o(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var h=(n||12)/12,p=f.positions,d=f.cells,v=0,g=d.length;v=0;--m){var x=p[y[m]];a.push(h*x[0],-h*x[1],t)}}for(var l=[0,0,0],c=[0,0,0],f=[0,0,0],h=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){f[d]=a.length/3|0,s(.5*(t[0][d]+t[1][d]),e[d],r[d],12,1.25,p),h[d]=(a.length/3|0)-f[d],l[d]=a.length/3|0;for(var v=0;v=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),!i)return c;for(var f=""+u;f.length=t[0][i];--o)a.push({x:o*e[i],text:r(e[i],o)});n.push(a)}return n},e.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function c(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;ao.indexOf(s)&&(s="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(s=gl.getExtension("OES_element_index_uint")&&"uint16"!==s?"uint32":"uint16"),s===t.dtype&&function(t,e){for(var r=1,n=e.length-1;n>=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=u(this.gl,this.type,this.length,this.usage,t.data,e):this.length=u(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var l=n.malloc(t.size,s),f=a(l,t.shape);i.assign(f,t),e<0?this.length=u(this.gl,this.type,this.length,this.usage,l,e):this.length=u(this.gl,this.type,this.length,this.usage,l.subarray(0,t.size),e),n.free(l)}}else if(Array.isArray(t))r=this.type===this.gl.ELEMENT_ARRAY_BUFFER?c(t,"uint16"):c(t,"float32"),e<0?this.length=u(this.gl,this.type,this.length,this.usage,r,e):this.length=u(this.gl,this.type,this.length,this.usage,r.subarray(0,t.length),e),n.free(r);else if("object"==typeof t&&"number"==typeof t.length)this.length=u(this.gl,this.type,this.length,this.usage,t,e);else if("number"==typeof t||void 0===t){if(e>=0)throw Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}else throw Error("gl-buffer: Invalid data type")},t.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},6405:function(t,e,r){"use strict";var n=r(2931);t.exports=function(t,e){var r=t.positions,i=t.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,u=1/0,c=-1/0,f=1/0,h=-1/0,p=null,d=null,v=[],g=1/0,y=!1,m="raw"===t.coneSizemode,x=0;xo&&(o=n.length(_)),x&&!m){var w=2*n.distance(p,b)/(n.length(d)+n.length(_));w?(g=Math.min(g,w),y=!1):y=!0}y||(p=b,d=_),v.push(_)}var T=[s,u,f],k=[l,c,h];e&&(e[0]=T,e[1]=k),0===o&&(o=1);var A=1/o;isFinite(g)||(g=1),a.vectorScale=g;var M=t.coneSize||(m?1:.5);t.absoluteConeSize&&(M=t.absoluteConeSize*A),a.coneScale=M;for(var x=0,S=0;x=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(t){this.pickId=t},p.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"lightPosition"in t&&(this.lightPosition=t.lightPosition),"opacity"in t&&(this.opacity=t.opacity),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=c({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var a=[],o=[],s=[],l=[],f=[];this.cells=r,this.positions=n,this.vectors=i;var h=t.meshColor||[1,1,1,1],p=t.vertexIntensity,d=1/0,v=-1/0;if(p){if(t.vertexIntensityBounds)d=+t.vertexIntensityBounds[0],v=+t.vertexIntensityBounds[1];else for(var g=0;g0){var v=this.triShader;v.bind(),v.uniforms=u,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||f,n=t.view||f,i=t.projection||f,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(t){if(!t||t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},t.exports=function(t,e,r){var s,l,c=r.shaders;1==arguments.length&&(t=(e=t).gl);var f=((s=n(t,c.meshShader.vertex,c.meshShader.fragment,null,c.meshShader.attributes)).attributes.position.location=0,s.attributes.color.location=2,s.attributes.uv.location=3,s.attributes.vector.location=4,s),p=((l=n(t,c.pickShader.vertex,c.pickShader.fragment,null,c.pickShader.attributes)).attributes.position.location=0,l.attributes.id.location=1,l.attributes.vector.location=4,l),d=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));d.generateMipmap(),d.minFilter=t.LINEAR_MIPMAP_LINEAR,d.magFilter=t.LINEAR;var v=i(t),g=i(t),y=i(t),m=i(t),x=i(t),b=a(t,[{buffer:v,type:t.FLOAT,size:4},{buffer:x,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:y,type:t.FLOAT,size:4},{buffer:m,type:t.FLOAT,size:2},{buffer:g,type:t.FLOAT,size:4}]),_=new h(t,d,f,p,v,g,x,y,m,b,r.traceType||"cone");return _.update(e),_}},614:function(t,e,r){var n=r(3236),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(t){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(t,e,r){var n=r(737);t.exports=function(t){return n[t]}},9165:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var u=new s(e,r,o,l);return u.update(t),u};var n=r(2762),i=r(8116),a=r(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function u(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],u=n[15],c=(t._ortho?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*u)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f<3;++f)e.lineWidth(this.lineWidth[f]*this.pixelRatio),r.capSize=this.capSize[f]*c,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var c=function(){for(var t=[,,,],e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=c[n],a=0;a0){var v=c.slice();v[s]+=p[1][s],i.push(c[0],c[1],c[2],d[0],d[1],d[2],d[3],0,0,0,v[0],v[1],v[2],d[0],d[1],d[2],d[3],0,0,0),u(this.bounds,v),o+=2+f(i,v,d,s)}}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(t,e,r){"use strict";var n=r(3236),i=r(9405),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(t,e,r){"use strict";var n,i,a,o,s=r(7766);t.exports=function(t,e,r,s){n||(n=t.FRAMEBUFFER_UNSUPPORTED,i=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,a=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,o=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var u=t.getExtension("WEBGL_draw_buffers");if(!l&&u&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=Array(r+1);for(var n=0;n<=r;++n){for(var i=Array(r),a=0;ac||r<0||r>c)throw Error("gl-fbo: Parameters are too large for FBO");var f=1;if("color"in(s=s||{})){if((f=Math.max(0|s.color,0))<0)throw Error("gl-fbo: Must specify a nonnegative number of colors");if(f>1){if(u){if(f>t.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL))throw Error("gl-fbo: Context does not support "+f+" draw buffers")}else throw Error("gl-fbo: Multiple draw buffer extension not supported")}}var h=t.UNSIGNED_BYTE,p=t.getExtension("OES_texture_float");if(s.float&&f>0){if(!p)throw Error("gl-fbo: Context does not support floating point textures");h=t.FLOAT}else s.preferFloat&&f>0&&p&&(h=t.FLOAT);var v=!0;"depth"in s&&(v=!!s.depth);var g=!1;return"stencil"in s&&(g=!!s.stencil),new d(t,e,r,h,f,v,g,u)};var l=null;function u(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function c(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case n:throw Error("gl-fbo: Framebuffer unsupported");case i:throw Error("gl-fbo: Framebuffer incomplete attachment");case a:throw Error("gl-fbo: Framebuffer incomplete dimensions");case o:throw Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw Error("gl-fbo: Framebuffer failed for unspecified reason")}}function h(t,e,r,n,i,a){if(!n)return null;var o=s(t,e,r,i,n);return o.magFilter=t.NEAREST,o.minFilter=t.NEAREST,o.mipSamples=1,o.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,a,t.TEXTURE_2D,o.handle,0),o}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=Array(i);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var m=r.getExtension("WEBGL_depth_texture");m?d?t.depth=h(r,i,a,m.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):v&&(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):v&&d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):v?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null);for(var y=0;yi||r<0||r>i)throw Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var a=u(n),o=0;o>8*p&255;this.pickOffset=t,r.bind();var d=r.uniforms;d.viewTransform=i,d.pickOffset=a,d.shape=this.shape;var v=r.attributes;return this.positionBuffer.bind(),v.position.pointer(),this.weightBuffer.bind(),v.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),v.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),t+this.shape[0]*this.shape[1]}}),p.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},p.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||s(e[0]),n=t.y||s(e[1]),i=t.z||new Float32Array(e[0]*e[1]),a=!1!==t.zsmooth;this.xData=r,this.yData=n;var u=t.colorLevels||[0],c=t.colorValues||[0,0,0,1],f=u.length,h=this.bounds;a?(L=h[0]=r[0],C=h[1]=n[0],P=h[2]=r[r.length-1],O=h[3]=n[n.length-1]):(L=h[0]=r[0]+(r[1]-r[0])/2,C=h[1]=n[0]+(n[1]-n[0])/2,P=h[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,O=h[3]=n[n.length-1]+(n[n.length-1]-n[n.length-2])/2);var p=1/(P-L),v=1/(O-C),g=e[0],y=e[1];this.shape=[g,y];var m=(a?(g-1)*(y-1):g*y)*(d.length>>>1);this.numVertices=m;for(var x=l.mallocUint8(4*m),b=l.mallocFloat32(2*m),_=l.mallocUint8(2*m),w=l.mallocUint32(m),T=0,k=a?g-1:g,A=a?y-1:y,M=0;M max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(t){return i(t,a,o,null,l)},e.createPickShader=function(t){return i(t,a,s,null,l)}},5714:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=f(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),c=u(Array(1024),[256,1,4]),p=0;p<1024;++p)c.data[p]=255;var d=a(e,c);d.wrap=e.REPEAT;var v=new g(e,r,o,s,l,d);return v.update(t),v};var n=r(2762),i=r(8116),a=r(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer),l=r(2478),u=r(9618),c=r(7319),f=c.createShader,h=c.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function v(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function g(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=g.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,clipBounds:d(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,pickId:this.pickId,clipBounds:d(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(t){this.dirty=!0;var e=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var r=[],n=[],i=[],a=0,o=0,s=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],c=t.position||t.positions;if(c){var f=t.color||t.colors||[0,0,0,1],h=t.lineWidth||1,p=!1;o:for(d=1;d0){for(var _=0;_<24;++_)r.push(r[r.length-12]);o+=2,p=!0}continue o}s[0][v]=Math.min(s[0][v],x[v],b[v]),s[1][v]=Math.max(s[1][v],x[v],b[v])}Array.isArray(f[0])?(g=f.length>d-1?f[d-1]:f.length>0?f[f.length-1]:[0,0,0,1],y=f.length>d?f[d]:f.length>0?f[f.length-1]:[0,0,0,1]):g=y=f,3===g.length&&(g=[g[0],g[1],g[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0),m=Array.isArray(h)?h.length>d-1?h[d-1]:h.length>0?h[h.length-1]:[0,0,0,1]:h;var w=a;if(a+=function(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}(x,b),p){for(v=0;v<2;++v)r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,m,g[0],g[1],g[2],g[3]);o+=2,p=!1}r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,m,g[0],g[1],g[2],g[3],x[0],x[1],x[2],b[0],b[1],b[2],w,-m,g[0],g[1],g[2],g[3],b[0],b[1],b[2],x[0],x[1],x[2],a,-m,y[0],y[1],y[2],y[3],b[0],b[1],b[2],x[0],x[1],x[2],a,m,y[0],y[1],y[2],y[3]),o+=4}}if(this.buffer.update(r),n.push(a),i.push(c[c.length-1].slice()),this.bounds=s,this.vertexCount=o,this.points=i,this.arcLength=n,"dashes"in t){var T=t.dashes.slice();for(T.unshift(0),d=1;dMath.abs(v-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-T)?n(t):(d=1/Math.sqrt((f=v-_)*f+(h=g-w)*h+(p=y-T)*p),f*=d,h*=d,p*=d,(d=Math.sqrt((a=x*p-b*h)*a+(o=b*f-m*p)*o+(s=m*h-x*f)*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0),(d=Math.sqrt((l=h*s-p*o)*l+(u=p*a-f*s)*u+(c=f*o-h*a)*c))?(l*=d=1/d,u*=d,c*=d):(l=0,u=0,c=0),t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=p,t[11]=0,t[12]=-(a*v+o*g+s*y),t[13]=-(l*v+u*g+c*y),t[14]=-(f*v+h*g+p*y),t[15]=1,t)}},6760: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],f=e[8],h=e[9],p=e[10],d=e[11],v=e[12],g=e[13],y=e[14],m=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*v,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*u+_*p+w*y,t[3]=x*o+b*c+_*d+w*m,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*v,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*u+_*p+w*y,t[7]=x*o+b*c+_*d+w*m,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*v,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*u+_*p+w*y,t[11]=x*o+b*c+_*d+w*m,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*v,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*u+_*p+w*y,t[15]=x*o+b*c+_*d+w*m,t}},4040: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}},4772: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}},6079:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S,E=n[0],L=n[1],C=n[2],P=Math.sqrt(E*E+L*L+C*C);return 1e-6>Math.abs(P)?null:(E*=P=1/P,L*=P,C*=P,i=Math.sin(r),o=1-(a=Math.cos(r)),s=e[0],l=e[1],u=e[2],c=e[3],f=e[4],h=e[5],p=e[6],d=e[7],v=e[8],g=e[9],y=e[10],m=e[11],x=E*E*o+a,b=L*E*o+C*i,_=C*E*o-L*i,w=E*L*o-C*i,T=L*L*o+a,k=C*L*o+E*i,A=E*C*o+L*i,M=L*C*o-E*i,S=C*C*o+a,t[0]=s*x+f*b+v*_,t[1]=l*x+h*b+g*_,t[2]=u*x+p*b+y*_,t[3]=c*x+d*b+m*_,t[4]=s*w+f*T+v*k,t[5]=l*w+h*T+g*k,t[6]=u*w+p*T+y*k,t[7]=c*w+d*T+m*k,t[8]=s*A+f*M+v*S,t[9]=l*A+h*M+g*S,t[10]=u*A+p*M+y*S,t[11]=c*A+d*M+m*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},5567: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],f=e[10],h=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+f*n,t[7]=l*i+h*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},2408: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],f=e[10],h=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-f*n,t[3]=l*i-h*n,t[8]=a*n+u*i,t[9]=o*n+c*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},7089: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],f=e[6],h=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+f*n,t[3]=l*i+h*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},2504: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}},7656:function(t){t.exports=function(t,e,r){var n,i,a,o,s,l,u,c,f,h,p,d,v=r[0],g=r[1],y=r[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*y+e[12],t[13]=e[1]*v+e[5]*g+e[9]*y+e[13],t[14]=e[2]*v+e[6]*g+e[10]*y+e[14],t[15]=e[3]*v+e[7]*g+e[11]*y+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],f=e[8],h=e[9],p=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]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*v+s*g+f*y+e[12],t[13]=i*v+l*g+h*y+e[13],t[14]=a*v+u*g+p*y+e[14],t[15]=o*v+c*g+d*y+e[15]),t}},5665: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}},7626:function(t,e,r){"use strict";var n=r(2642),i=r(9346);function a(t,e){for(var r=[0,0,0,0],n=0;n<4;++n)for(var i=0;i<4;++i)r[i]+=t[4*n+i]*e[n];return r}t.exports=function(t,e,r,o,s,l){if(1===t.length)return[0,t[0].slice()];for(var u=Array(t.length),c=0;c1.0001)return null;g+=v[c]}return Math.abs(g-1)>.001?null:[f,function(t,e){for(var r=[0,0,0],n=0;n max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);e.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:h,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},7201:function(t,e,r){"use strict";var n=r(9405),i=r(2762),a=r(8116),o=r(7766),s=r(8406),l=r(6760),u=r(7608),c=r(9618),f=r(6729),h=r(7765),p=r(1888),d=r(840),v=r(7626),g=d.meshShader,y=d.wireShader,m=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,T,k,A,M,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=u,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=g,this.edgeUVs=y,this.edgeIds=v,this.edgeVAO=m,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=T,this.pointSizes=k,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var k=T.prototype;function A(t,e){if(!e||!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}k.isOpaque=function(){return!this.hasAlpha},k.isTransparent=function(){return this.hasAlpha},k.pickSlots=1,k.setPickBase=function(t){this.pickId=t},k.highlight=function(t){if(!t||!this.contourEnable){this.contourCount=0;return}for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0){var d=this.triShader;d.bind(),d.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var d=this.lineShader;d.bind(),d.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var d=this.pointShader;d.bind(),d.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var d=this.contourShader;d.bind(),d.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind()}},k.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()}},k.pick=function(t){if(!t||t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=Array(r.length),a=0;as[k]&&(r.uniforms.dataAxis=n,r.uniforms.screenOffset=i,r.uniforms.color=g[t],r.uniforms.angle=y[t],l.drawArrays(l.TRIANGLES,s[k],s[A]-s[k]))),m[t]&&T&&(i[1^t]-=M*h*x[t],r.uniforms.dataAxis=a,r.uniforms.screenOffset=i,r.uniforms.color=b[t],r.uniforms.angle=_[t],l.drawArrays(l.TRIANGLES,w,T)),i[1^t]=M*u[2+(1^t)]-1,p[t+2]&&(i[1^t]+=M*h*v[t+2],ks[k]&&(r.uniforms.dataAxis=n,r.uniforms.screenOffset=i,r.uniforms.color=g[t+2],r.uniforms.angle=y[t+2],l.drawArrays(l.TRIANGLES,s[k],s[A]-s[k]))),m[t+2]&&T&&(i[1^t]+=M*h*x[t+2],r.uniforms.dataAxis=a,r.uniforms.screenOffset=i,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],l.drawArrays(l.TRIANGLES,w,T))}),y.drawTitle=(o=[0,0],s=[0,0],function(){var t=this.plot,e=this.shader,r=t.gl,n=t.screenBox,i=t.titleCenter,a=t.titleAngle,l=t.titleColor,u=t.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)s[c]=2*(i[c]*u-n[c])/(n[2+c]-n[c])-1;e.bind(),e.uniforms.dataAxis=o,e.uniforms.screenOffset=s,e.uniforms.angle=a,e.uniforms.color=l,r.drawArrays(r.TRIANGLES,this.titleOffset,this.titleCount)}}),y.bind=(l=[0,0],u=[0,0],c=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],f=r[o+2]-s,h=.5*(n[o+2]+n[o]),p=n[o+2]-n[o],d=a[o],v=a[o+2]-d,g=i[o],y=i[o+2]-g;u[o]=2*f/p*v/y,l[o]=2*(s-h)/p*v/y}c[1]=2*t.pixelRatio/(i[3]-i[1]),c[0]=c[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=u,e.uniforms.dataShift=l,e.uniforms.textScale=c,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),y.update=function(t){var e,r,n,i,a,o=[],s=t.ticks,l=t.bounds;for(a=0;a<2;++a){var u=[Math.floor(o.length/3)],c=[-1/0],f=s[a];for(e=0;e=0){var v=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(v,e[1],v,e[3],p[d],h[d]):o.drawLine(e[0],v,e[2],v,p[d],h[d])}}for(var d=0;d=0;--t)this.objects[t].dispose();this.objects.length=0;for(var t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},u.addObject=function(t){0>this.objects.indexOf(t)&&(this.objects.push(t),this.setDirty())},u.removeObject=function(t){for(var e=this.objects,r=0;rthis.overlays.indexOf(t)&&(this.overlays.push(t),this.setOverlayDirty())},u.removeOverlay=function(t){for(var e=this.overlays,r=0;rMath.abs(e))u.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*i*e/window.innerHeight*(a-u.lastT())/20;u.pan(a,0,0,f*(Math.exp(o)-1))}}},!0)},d.enableMouseListeners(),d};var n=r(3025),i=r(6296),a=r(351),o=r(8512),s=r(24),l=r(7520)},799:function(t,e,r){var n=r(3236),i=r(9405),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec2"}])}},4100:function(t,e,r){"use strict";var n=r(4437),i=r(3837),a=r(5445),o=r(4449),s=r(3589),l=r(2260),u=r(7169),c=r(351),f=r(4772),h=r(4040),p=r(799),d=r(9216)({tablet:!0,featureDetect:!0});function v(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(t){return"boolean"!=typeof t||t}t.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;e||(e=document.createElement("canvas"),t.container?t.container.appendChild(e):document.body.appendChild(e));var r=t.gl;if(r||(t.glOptions&&(d=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!r)throw Error("webgl not supported");var y=t.bounds||[[-10,-10,-10],[10,10,10]],m=new v,x=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!d}),b=p(r),_=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,w={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:_},T=t.axes||{},k=i(r,T);k.enable=!T.disable;var A=t.spikes||{},M=o(r,A),S=[],E=[],L=[],C=[],P=!0,O=!0,I={view:null,projection:Array(16),model:Array(16),_ortho:!1},O=!0,z=[r.drawingBufferWidth,r.drawingBufferHeight],D=t.cameraObject||n(e,w),R={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:m,camera:D,axes:k,axesPixels:null,spikes:M,bounds:y,objects:S,shape:z,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:g(t.autoResize),autoBounds:g(t.autoBounds),autoScale:!!t.autoScale,autoCenter:g(t.autoCenter),clipToBounds:g(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:I,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,O=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},F=[r.drawingBufferWidth/R.pixelRatio|0,r.drawingBufferHeight/R.pixelRatio|0];function B(){if(!R._stopped&&R.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*R.pixelRatio),a=0|Math.ceil(n*R.pixelRatio);if(i!==e.width||a!==e.height){e.width=i,e.height=a;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",P=!0}}}function N(){for(var t=S.length,e=C.length,n=0;n0&&0===L[e-1];)L.pop(),C.pop().dispose()}function j(){if(R.contextLost)return!0;r.isContextLost()&&(R.contextLost=!0,R.mouseListener.enabled=!1,R.selection.object=null,R.oncontextloss&&R.oncontextloss())}R.autoResize&&B(),window.addEventListener("resize",B),R.update=function(t){R._stopped||(t=t||{},P=!0,O=!0)},R.add=function(t){R._stopped||(t.axes=k,S.push(t),E.push(-1),P=!0,O=!0,N())},R.remove=function(t){if(!R._stopped){var e=S.indexOf(t);e<0||(S.splice(e,1),E.pop(),P=!0,O=!0,N())}},R.dispose=function(){if(!R._stopped&&(R._stopped=!0,window.removeEventListener("resize",B),e.removeEventListener("webglcontextlost",j),R.mouseListener.enabled=!1,!R.contextLost)){k.dispose(),M.dispose();for(var t=0;tm.distance)continue;for(var u=0;u0){var r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}((v[1][o]-v[0][o])/10);k.autoTicks?k.update({bounds:v,tickSpacing:w}):k.update({bounds:v})}var T=r.drawingBufferWidth,A=r.drawingBufferHeight;z[0]=T,z[1]=A,F[0]=0|Math.max(T/R.pixelRatio,1),F[1]=0|Math.max(A/R.pixelRatio,1),function(t,e){var r=t.bounds,n=t.cameraParams,i=n.projection,a=n.model,o=t.gl.drawingBufferWidth,s=t.gl.drawingBufferHeight,l=t.zNear,u=t.zFar,c=t.fovy,p=o/s;e?(h(i,-p,p,-1,1,l,u),n._ortho=!0):(f(i,c,p,l,u),n._ortho=!1);for(var d=0;d<16;++d)a[d]=0;a[15]=1;for(var v=0,d=0;d<3;++d)v=Math.max(v,r[1][d]-r[0][d]);for(var d=0;d<3;++d)t.autoScale?a[5*d]=t.aspect[d]/(r[1][d]-r[0][d]):a[5*d]=1/v,t.autoCenter&&(a[12+d]=-(.5*a[5*d])*(r[0][d]+r[1][d]))}(R,_);for(var o=0;o 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),e.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),e.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},4696:function(t,e,r){"use strict";var n,i,a=r(9405),o=r(2762),s=r(1888),l=r(6640);function u(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(t,e){var r=t.gl,n=new u(t,o(r),o(r),a(r,l.pointVertex,l.pointFragment),a(r,l.pickVertex,l.pickFragment));return n.update(e),t.addObject(n),n};var c=u.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){function e(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=e("sizeMin",.5),this.sizeMax=e("sizeMax",20),this.color=e("color",[1,0,0,1]).slice(),this.areaRatio=e("areaRatio",1),this.borderColor=e("borderColor",[0,0,0,1]).slice(),this.blend=e("blend",!1);var r,n=t.positions.length>>>1,i=t.positions instanceof Float32Array,a=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,o=t.positions,l=i?o:s.mallocFloat32(o.length),u=a?t.idToIndex:s.mallocInt32(n);if(i||l.set(o),!a)for(l.set(o),r=0;r>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,o),c=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(u,.33333)));n[0]=2/s,n[4]=2/l,n[6]=-2*o[0]/s-1,n[7]=-2*o[1]/l-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=n,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=c<5,r.uniforms.pointSize=c,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(i[0]=255&t,i[1]=t>>8&255,i[2]=t>>16&255,i[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(a.UNSIGNED_BYTE),r.uniforms.pickOffset=i,this.pickOffset=t);var f=a.getParameter(a.BLEND),h=a.getParameter(a.DITHER);return f&&!this.blend&&a.disable(a.BLEND),h&&a.disable(a.DITHER),a.drawArrays(a.POINTS,0,this.pointCount),f&&!this.blend&&a.enable(a.BLEND),h&&a.enable(a.DITHER),t+this.pointCount}),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},783:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],f=e[2],h=e[3],p=r[0],d=r[1],v=r[2],g=r[3];return(a=u*p+c*d+f*v+h*g)<0&&(a=-a,p=-p,d=-d,v=-v,g=-g),1-a>1e-6?(o=Math.sin(i=Math.acos(a)),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*p,t[1]=s*c+l*d,t[2]=s*f+l*v,t[3]=s*h+l*g,t}},5964:function(t){"use strict";t.exports=function(t){return t||0===t?t.toString():""}},9366:function(t,e,r){"use strict";var n=r(4359);t.exports=function(t,e,r){var a,o,s=[e.style,e.weight,e.variant,e.family].join("_"),l=i[s];if(l||(l=i[s]={}),t in l)return l[t];var u={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e.family,fontStyle:e.style,fontWeight:e.weight,fontVariant:e.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};u.triangles=!0;var c=n(t,u);u.triangles=!1;var f=n(t,u);if(r&&1!==r){for(a=0;a max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),u=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),c=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],f={vertex:a,fragment:l,attributes:c},h={vertex:o,fragment:l,attributes:c},p={vertex:s,fragment:l,attributes:c},d={vertex:a,fragment:u,attributes:c},v={vertex:o,fragment:u,attributes:c},g={vertex:s,fragment:u,attributes:c};function y(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}e.createPerspective=function(t){return y(t,f)},e.createOrtho=function(t){return y(t,h)},e.createProject=function(t){return y(t,p)},e.createPickPerspective=function(t){return y(t,d)},e.createPickOrtho=function(t){return y(t,v)},e.createPickProject=function(t){return y(t,g)}},8418:function(t,e,r){"use strict";var n=r(5219),i=r(2762),a=r(8116),o=r(1888),s=r(6760),l=r(1283),u=r(9366),c=r(5964),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function p(t,e,r,n){return h(n,n,r),h(n,n,e),h(n,n,t)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function v(t){return!0===t||t>1?1:t}function g(t,e,r,n,i,a,o,s,l,u,c,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=u,this.pickOrthoShader=c,this.pickProjectShader=f,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),u=l.createPickOrtho(e),c=l.createPickProject(e),f=i(e),h=i(e),p=i(e),d=i(e),v=a(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),y=new g(e,r,n,o,f,h,p,d,v,s,u,c);return y.update(t),y};var y=g.prototype;y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},y.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var m=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],T=f.slice(),k=[0,0,0],A=[[0,0,0],[0,0,0]];function M(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}var L=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function C(t,e,r,n,i,a,o){var l=r.gl;if((a===r.projectHasAlpha||o)&&function(t,e,r,n){var i,a=e.axesProject,o=e.gl,l=t.uniforms,u=r.model||f,c=r.view||f,h=r.projection||f,d=e.axesBounds,v=function(t){for(var e=0;e<2;++e)for(var r=0;r<3;++r)A[e][r]=Math.max(Math.min(t[e][r],1e8),-1e8);return A}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],m[0]=2/o.drawingBufferWidth,m[1]=2/o.drawingBufferHeight,t.bind(),l.view=c,l.projection=h,l.screenSize=m,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=v,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(a[g]){l.scale=e.projectScale[g],l.opacity=e.projectOpacity[g];for(var y=0;y<16;++y)T[y]=0;for(var y=0;y<4;++y)T[5*y]=1;T[5*g]=0,i[g]<0?T[12+g]=d[0][g]:T[12+g]=d[1][g],s(T,u,T),l.model=T;var L=(g+1)%3,C=(g+2)%3,P=M(x),O=M(b);P[L]=1,O[C]=1;var I=p(h,c,u,S(_,P)),z=p(h,c,u,S(w,O));if(Math.abs(I[1])>Math.abs(z[1])){var D=I;I=z,z=D,D=P,P=O,O=D;var R=L;L=C,C=R}I[0]<0&&(P[L]=-1),z[1]>0&&(O[C]=-1);for(var F=0,B=0,y=0;y<4;++y)F+=Math.pow(u[4*L+y],2),B+=Math.pow(u[4*C+y],2);P[L]/=Math.sqrt(F),O[C]/=Math.sqrt(B),l.axes[0]=P,l.axes[1]=O,l.fragClipBounds[0]=E(k,v[0],g,-1e8),l.fragClipBounds[1]=E(k,v[1],g,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}(e,r,n,i),a===r.hasAlpha||o){t.bind();var u=t.uniforms;u.model=n.model||f,u.view=n.view||f,u.projection=n.projection||f,m[0]=2/l.drawingBufferWidth,m[1]=2/l.drawingBufferHeight,u.screenSize=m,u.highlightId=r.highlightId,u.highlightScale=r.highlightScale,u.fragClipBounds=L,u.clipBounds=r.axes.bounds,u.opacity=r.opacity,u.pickGroup=r.pickId/255,u.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function P(t,e,r,i){a=c(a=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},y.highlight=function(t){if(t){var e=t.index;this.highlightId=[(255&e)/255,(e>>8&255)/255,(e>>16&255)/255,0]}else this.highlightId=[1,1,1,1]},y.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t){if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}}if("projectScale"in t){if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}}if(this.projectHasAlpha=!1,"projectOpacity"in t){if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{var r=+t.projectOpacity;this.projectOpacity=[r,r,r]}for(var n=0;n<3;++n)this.projectOpacity[n]=v(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=v(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i=t.position,a={family:t.font||"normal",style:t.fontStyle||"normal",weight:t.fontWeight||"normal",variant:t.fontVariant||"normal"},s=t.alignment||[0,0];if(2===s.length)B=s[0],N=s[1];else{B=[],N=[];for(var n=0;n0){var O=0,I=y,z=[0,0,0,1],D=[0,0,0,1],R=Array.isArray(f)&&Array.isArray(f[0]),F=Array.isArray(d)&&Array.isArray(d[0]);o:for(var n=0;n0?1-A[0][0]:Y<0?1+A[1][0]:1,W*=W>0?1-A[0][1]:W<0?1+A[1][1]:1;for(var X=[Y,W],Z=T.cells||[],K=T.positions||[],_=0;_0){var y=r*c;o.drawBox(f-y,h-y,p+y,h+y,a),o.drawBox(f-y,d-y,p+y,d+y,a),o.drawBox(f-y,h-y,f+y,d+y,a),o.drawBox(p-y,h-y,p+y,d+y,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},3589:function(t,e,r){"use strict";t.exports=function(t,e){var r=e[0],a=e[1],o=n(t,r,a,{});return new u(t,o,i.mallocUint8(r*a*4))};var n=r(2260),i=r(1888),a=r(9618),o=r(8828).nextPow2,s=function(t,e,r){for(var n=1e8,i=-1,a=-1,o=t.shape[0],s=t.shape[1],l=0;lthis.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;ar)for(t=r;te)for(t=e;t=0){for(var T=0|w.type.charAt(w.type.length-1),k=Array(T),A=0;A=0;)M+=1;_[c]=M}var S=Array(r.length);function E(){p.program=o.program(d,p._vref,p._fref,b,_);for(var t=0;t=0){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new n("","Invalid data type for attribute "+c+": "+f);s(t,e,h[0],i,p,a,c)}else if(f.indexOf("mat")>=0){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new n("","Invalid data type for attribute "+c+": "+f);!function(t,e,r,n,i,a,o){for(var l=Array(i),u=Array(i),c=0;c4)throw new i("","Invalid data type");switch(y.charAt(0)){case"b":case"i":t["uniform"+f+"iv"](s[c],h);break;case"v":t["uniform"+f+"fv"](s[c],h);break;default:throw new i("","Unrecognized data type for vector "+name+": "+y)}}else if(0===y.indexOf("mat")&&4===y.length){if((f=y.charCodeAt(y.length-1)-48)<2||f>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+y);t["uniformMatrix"+f+"fv"](s[c],!1,h);break}else throw new i("","Unknown uniform data type for "+name+": "+y)}}}}}function u(t,e,n){"object"==typeof n?Object.defineProperty(t,e,{get:a(c(n)),set:l(n),enumerable:!0,configurable:!1}):s[n]?Object.defineProperty(t,e,{get:function(t,e,r){return t.getUniform(e.program,r[n])},set:l(n),enumerable:!0,configurable:!1}):t[e]=function(t){switch(t){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=t.indexOf("vec");if(0<=e&&e<=1&&t.length===4+e){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new i("","Invalid data type");if("b"===t.charAt(0))return o(r,!1);return o(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r=t.charCodeAt(t.length-1)-48;if(r<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[n].type)}function c(t){var e;if(Array.isArray(t)){e=Array(t.length);for(var r=0;r1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(t,e,r){"use strict";var n=r(2931),i=r(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(t,e,r,a){for(var o=t.points,s=t.velocities,l=t.divergences,u=[],c=[],f=[],h=[],p=[],d=[],v=0,g=0,y=i.create(),m=i.create(),x=0;x0)for(var T=0;T<8;T++){var k=(T+1)%8;u.push(h[T],p[T],p[k],p[k],h[k],h[T]),f.push(m,y,y,y,m,m),d.push(v,g,g,g,v,v);var A=u.length;c.push([A-6,A-5,A-4],[A-3,A-2,A-1])}var M=h;h=p,p=M;var S=m;m=y,y=S;var E=v;v=g,g=E}return{positions:u,cells:c,vectors:f,vertexIntensity:d}},s=function(t,e,r,i){for(var a=0,s=0;se)return r-1}return r},u=function(t,e,r){return tr?r:t},c=function(t,e,r){var i,a,o,s,c,f,h=e.vectors,p=e.meshgrid,d=t[0],v=t[1],g=t[2],y=p[0].length,m=p[1].length,x=p[2].length,b=l(p[0],d),_=l(p[1],v),w=l(p[2],g),T=b+1,k=_+1,A=w+1;if(b=u(b,0,y-1),T=u(T,0,y-1),_=u(_,0,m-1),k=u(k,0,m-1),w=u(w,0,x-1),A=u(A,0,x-1),b<0||_<0||w<0||T>y-1||k>m-1||A>x-1)return n.create();var M=p[0][b],S=p[0][T],E=p[1][_],L=p[1][k],C=p[2][w],P=p[2][A],O=(d-M)/(S-M),I=(v-E)/(L-E),z=(g-C)/(P-C);switch(isFinite(O)||(O=.5),isFinite(I)||(I=.5),isFinite(z)||(z=.5),r.reversedX&&(b=y-1-b,T=y-1-T),r.reversedY&&(_=m-1-_,k=m-1-k),r.reversedZ&&(w=x-1-w,A=x-1-A),r.filled){case 5:c=w,f=A,o=_*x,s=k*x,i=b*x*m,a=T*x*m;break;case 4:c=w,f=A,i=b*x,a=T*x,o=_*x*y,s=k*x*y;break;case 3:o=_,s=k,c=w*m,f=A*m,i=b*m*x,a=T*m*x;break;case 2:o=_,s=k,i=b*m,a=T*m,c=w*m*y,f=A*m*y;break;case 1:i=b,a=T,c=w*y,f=A*y,o=_*y*x,s=k*y*x;break;default:i=b,a=T,o=_*y,s=k*y,c=w*y*m,f=A*y*m}var D=h[i+o+c],R=h[i+o+f],F=h[i+s+c],B=h[i+s+f],N=h[a+o+c],j=h[a+o+f],U=h[a+s+c],V=h[a+s+f],q=n.create(),H=n.create(),G=n.create(),W=n.create();n.lerp(q,D,N,O),n.lerp(H,R,j,O),n.lerp(G,F,U,O),n.lerp(W,B,V,O);var Y=n.create(),X=n.create();n.lerp(Y,q,G,I),n.lerp(X,H,W,I);var Z=n.create();return n.lerp(Z,Y,X,z),Z},f=function(t){var e=1/0;t.sort(function(t,e){return t-e});for(var r=t.length,n=1;n1&&(k=h(r));for(var S=0;SA&&(A=D),I.push(D),v.push({points:L,velocities:C,divergences:I});for(var R=0;R<100*i&&L.lengthx||rb||n_)}(E);){R++;var F=n.clone(P),B=n.squaredLength(F);if(0===B)break;if(B>T&&n.scale(F,F,w/Math.sqrt(B)),n.add(F,F,E),P=p(F),n.squaredDistance(O,F)-T>-.0001*T){L.push(F),O=F,C.push(P);var z=d(F,P),D=n.length(z);isFinite(D)&&D>A&&(A=D),I.push(D)}E=F}}var N=s(v,t.colormap,A,k);return l?N.tubeScale=l:(0===A&&(A=1),N.tubeScale=.5*o*k/A),N};var p=r(6740),d=r(6405).createMesh;t.exports.createTubeMesh=function(t,e){return d(t,e,{shaders:p,traceType:"streamtube"})}},990:function(t,e,r){var n=r(9405),i=r(3236),a=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);e.createShader=function(t){var e=n(t,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createPickShader=function(t){var e=n(t,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createContourShader=function(t){var e=n(t,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},e.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},9499:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=m(e),n=b(e),s=x(e),l=_(e),u=i(e),c=a(e,[{buffer:u,size:4,stride:40,offset:0},{buffer:u,size:3,stride:40,offset:16},{buffer:u,size:3,stride:40,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),v=o(e,1,256,e.RGBA,e.UNSIGNED_BYTE);v.minFilter=e.LINEAR,v.magFilter=e.LINEAR;var g=new M(e,[0,0],[[0,0,0],[0,0,0]],r,n,u,c,v,s,l,f,h,p,d,[0,0,0]),y={levels:[[],[],[]]};for(var w in t)y[w]=t[w];return y.colormap=y.colormap||"jet",g.update(y),g};var n=r(8828),i=r(2762),a=r(8116),o=r(7766),s=r(1888),l=r(6729),u=r(5298),c=r(9994),f=r(9618),h=r(3711),p=r(6760),d=r(7608),v=r(2478),g=r(6199),y=r(990),m=y.createShader,x=y.createContourShader,b=y.createPickShader,_=y.createPickContourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],k=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function A(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}function M(t,e,r,n,i,a,o,l,u,c,h,p,d,v,g){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new A([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=v,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}!function(){for(var t=0;t<3;++t){var e=k[t],r=(t+1)%3,n=(t+2)%3;e[r+0]=1,e[n+3]=1,e[t+6]=1}}();var S=M.prototype;S.genColormap=function(t,e){var r=!1,n=c([l({colormap:t,nshades:256,format:"rgba"}).map(function(t,n){var i=e?function(t,e){if(!e||!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]})]);return u.divseq(n,255),this.hasAlphaScale=r,n},S.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},S.isOpaque=function(){return!this.isTransparent()},S.pickSlots=1,S.setPickBase=function(t){this.pickId=t};var E=[0,0,0],L={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function C(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||E,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(n=0,o=o||e.surfaceProject[r];n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=L.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],p(l,t.model,l);var u=L.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return L.showSurface=o,L.showContour=s,L}var P={model:w,view:w,projection:w,inverseModel:w.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-.0001,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},O=w.slice(),I=[1,0,0,0,1,0,0,0,1];function z(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0),P.model=t.model||w,P.view=t.view||w,P.projection=t.projection||w,P.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],P.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],P.objectOffset=this.objectOffset,P.contourColor=this.contourColor[0],P.inverseModel=d(P.inverseModel,P.model);for(var n=0;n<2;++n)for(var i=P.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);for(P.kambient=this.ambientLight,P.kdiffuse=this.diffuseLight,P.kspecular=this.specularLight,P.roughness=this.roughness,P.fresnel=this.fresnel,P.opacity=this.opacity,P.height=0,P.permutation=I,P.vertexColor=this.vertexColor,p(O,P.view,P.model),p(O,P.projection,O),d(O,O),n=0;n<3;++n)P.eyePosition[n]=O[12+n]/O[15];var o=O[15];for(n=0;n<3;++n)o+=this.lightPosition[n]*O[4*n+3];for(n=0;n<3;++n){var s=O[12+n];for(a=0;a<3;++a)s+=O[4*a+n]*this.lightPosition[a];P.lightPosition[n]=s/o}var l=C(P,this);if(l.showSurface){for(this._shader.bind(),this._shader.uniforms=P,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&this.vertexCount&&(this._shader.uniforms.model=l.projections[n],this._shader.uniforms.clipBounds=l.clipBounds[n],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(l.showContour){var u=this._contourShader;P.kambient=1,P.kdiffuse=0,P.kspecular=0,P.opacity=1,u.bind(),u.uniforms=P;var c=this._contourVAO;for(c.bind(),n=0;n<3;++n)for(u.uniforms.permutation=k[n],r.lineWidth(this.contourWidth[n]*this.pixelRatio),a=0;a>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var f=c?a:1-a,h=0;h<2;++h)for(var p=h?l:1-l,d=i+c,g=s+h,y=f*p,m=0;m<3;++m)u[m]+=this._field[m].get(d,g)*y;for(var x=this._pickResult.level,b=0;b<3;++b)if(x[b]=v.le(this.contourLevels[b],u[b]),x[b]<0)this.contourLevels[b].length>0&&(x[b]=0);else if(x[b]Math.abs(w-u[b])&&(x[b]+=1)}for(m=0,r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1];m<3;++m)r.dataCoordinate[m]=this._field[m].get(r.index[0],r.index[1]);return r},S.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();u.assign(t.lo(1,1).hi(r[0],r[1]),e),u.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),u.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),u.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),u.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},S.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=R(t.contourWidth,Number)),"showContour"in t&&(this.showContour=R(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=R(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=B(t.contourColor)),"contourProject"in t&&(this.contourProject=R(t.contourProject,function(t){return R(t,Boolean)})),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=B(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=R(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=R(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"opacityscale"in t&&(this.opacityscale=t.opacityscale),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0),"colormap"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var u=l[o];for(y=0;y<2;++y)if(u.shape[y]!==a[y])throw Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],u)}}else if(t.ticks){var c=t.ticks;if(!Array.isArray(c)||2!==c.length)throw Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=c[o];if((Array.isArray(p)||p.length)&&(p=f(p)),p.shape[0]!==a[o])throw Error("gl-surface: invalid tick length");var d=f(p.data,a);d.stride[o]=p.stride[0],d.stride[1^o]=0,this.padField(this._field[o],d)}}else{for(o=0;o<2;++o){var v=[0,0];v[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],v,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var tx=0;tx<5;++tx)$.pop();U-=1}continue f}$.push(tn[0],tn[1],to[0],to[1],tn[2]),U+=1}}tr.push(U)}this._contourOffsets[Q]=te,this._contourCounts[Q]=tr}var tb=s.mallocFloat($.length);for(o=0;o<$.length;++o)tb[o]=$[o];this._contourBuffer.update(tb),s.freeFloat(tb)}},S.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t<3;++t)s.freeFloat(this._field[t].data)},S.highlight=function(t){if(!t){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(e=0;e<3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;for(e=0,r=this.snapToData?t.dataCoordinate:t.position;e<3;++e)r[e]-=this.objectOffset[e];if(this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var e,r,n=0,i=this.shape,a=s.mallocFloat(12*i[0]*i[1]),o=0;o<3;++o){if(!this.enableDynamic[o]){this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;continue}this.dynamicLevel[o]=r[o];var l=(o+1)%3,u=(o+2)%3,c=this._field[o],f=this._field[l],p=this._field[u],d=h(c,r[o]),v=d.cells,g=d.positions;for(e=0,this._dynamicOffsets[o]=n;eu||l[1]<0||l[1]>u)throw Error("gl-texture2d: Invalid texture size");var f=d(l,e.stride.slice()),p=0;"float32"===s?p=t.FLOAT:"float64"===s?(p=t.FLOAT,f=!1,s="float32"):"uint8"===s?p=t.UNSIGNED_BYTE:(p=t.UNSIGNED_BYTE,f=!1,s="uint8");var g=0;if(2===l.length)g=t.LUMINANCE,l=[l[0],l[1],1],e=n(e.data,l,[e.stride[0],e.stride[1],1],e.offset);else if(3===l.length){if(1===l[2])g=t.ALPHA;else if(2===l[2])g=t.LUMINANCE_ALPHA;else if(3===l[2])g=t.RGB;else if(4===l[2])g=t.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords")}else throw Error("gl-texture2d: Invalid shape for texture");p!==t.FLOAT||t.getExtension("OES_texture_float")||(p=t.UNSIGNED_BYTE,f=!1);var y=e.size;if(f)r=0===e.offset&&e.data.length===y?e.data:e.data.subarray(e.offset,e.offset+y);else{var m=[l[2],l[2]*l[0],1],x=n(o=a.malloc(y,s),l,m,0);("float32"===s||"float64"===s)&&p===t.UNSIGNED_BYTE?c(x,e):i.assign(x,e),r=o.subarray(0,y)}var b=v(t);return t.texImage2D(t.TEXTURE_2D,0,g,l[0],l[1],0,g,p,r),f||a.free(o),new h(t,b,l[0],l[1],g,p)}(t,m)}throw Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function u(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var c=function(t,e){i.muls(t,e,255)};function f(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function h(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var p=h.prototype;function d(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function v(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function g(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw Error("gl-texture2d: Floating point textures not supported on this platform");var o=v(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new h(t,o,e,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&!e.getExtension("OES_texture_float_linear")&&(t=e.NEAREST),0>s.indexOf(t))throw Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&!e.getExtension("OES_texture_float_linear")&&(t=e.NEAREST),0>s.indexOf(t))throw Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),0>l.indexOf(t))throw Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),0>l.indexOf(t))throw Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(0>l.indexOf(t[e]))throw Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return f(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return f(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,f(this,this._shape[0],t),t}}}),p.bind=function(t){var e=this.gl;return(void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t)?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)0>this._mipLevels.indexOf(e)&&this._mipLevels.push(e)},p.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=u(t)?t:t.raw;if(l)0>this._mipLevels.indexOf(o)?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l);else if(t.shape&&t.stride&&t.data){if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw Error("gl-texture2d: Texture dimensions are out of bounds");(function(t,e,r,o,s,l,u,f){var h=f.dtype,p=f.shape.slice();if(p.length<2||p.length>3)throw Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var v=0,g=0,y=d(p,f.stride.slice());if("float32"===h?v=t.FLOAT:"float64"===h?(v=t.FLOAT,y=!1,h="float32"):"uint8"===h?v=t.UNSIGNED_BYTE:(v=t.UNSIGNED_BYTE,y=!1,h="uint8"),2===p.length)g=t.LUMINANCE,p=[p[0],p[1],1],f=n(f.data,p,[f.stride[0],f.stride[1],1],f.offset);else if(3===p.length){if(1===p[2])g=t.ALPHA;else if(2===p[2])g=t.LUMINANCE_ALPHA;else if(3===p[2])g=t.RGB;else if(4===p[2])g=t.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords");p[2]}else throw Error("gl-texture2d: Invalid shape for texture");if((g===t.LUMINANCE||g===t.ALPHA)&&(s===t.LUMINANCE||s===t.ALPHA)&&(g=s),g!==s)throw Error("gl-texture2d: Incompatible texture format for setPixels");var m=f.size,x=0>u.indexOf(o);if(x&&u.push(o),v===l&&y)0===f.offset&&f.data.length===m?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,f.data.subarray(f.offset,f.offset+m)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,f.data.subarray(f.offset,f.offset+m));else{var b,_=n(b=l===t.FLOAT?a.mallocFloat32(m):a.mallocUint8(m),p,[p[2],p[2]*p[0],1]);v===t.FLOAT&&l===t.UNSIGNED_BYTE?c(_,f):i.assign(_,f),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,m)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,m)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}})(s,e,r,o,this.format,this.type,this._mipLevels,t)}else throw Error("gl-texture2d: Unsupported data type")}},1433:function(t){"use strict";t.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(2825),i=r(3536),a=r(244)},9226:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},3126:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},3990:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},1091:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(t){t.exports=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}},5455:function(t,e,r){t.exports=r(7056)},7056:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(t,e,r){t.exports=r(6690)},6690:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},244:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},2613:function(t){t.exports=1e-6},9922:function(t,e,r){t.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=r(2613)},9265:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},2681:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},5137:function(t,e,r){t.exports=function(t,e,r,i,a,o){var s,l;for(e||(e=3),r||(r=0),l=i?Math.min(i*e+r,t.length):t.length,s=r;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}},7636:function(t){t.exports=function(t,e){var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*(e=e||1);return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},6894:function(t){t.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=e[0],t[1]=i+o*u-s*l,t[2]=a+o*l+s*u,t}},109:function(t){t.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=i+s*l+o*u,t[1]=e[1],t[2]=a+s*u-o*l,t}},8692:function(t){t.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=i+o*u-s*l,t[1]=a+o*l+s*u,t[2]=e[2],t}},2447:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},6621:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},8489:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},1463:function(t){t.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},6141:function(t,e,r){t.exports=r(2953)},5486:function(t,e,r){t.exports=r(3066)},2953:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},3066:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},2229:function(t,e,r){t.exports=r(6843)},6843:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},492:function(t){t.exports=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}},5673:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,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}},264:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,h=u*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=c*u+-(p*o)+-(f*l)- -(h*s),t[1]=f*u+-(p*s)+-(h*o)- -(c*l),t[2]=h*u+-(p*l)+-(c*s)- -(f*o),t}},4361:function(t){t.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},2335:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},2933: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}},7536:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},1373:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},3750:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},3390:function(t){t.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},9970:function(t,e,r){t.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},6808:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},2573:function(t){t.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},160:function(t){t.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},2334:function(t){t.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},3576:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},1498: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}},5177:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t}},9131:function(t,e,r){var n=r(5177),i=r(9288);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},9288:function(t){t.exports=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}},4844:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},4578:function(t){t.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},7960:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},483:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},6860:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},5352:function(t){t.exports=function(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}},4041:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,h=u*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=c*u+-(p*o)+-(f*l)- -(h*s),t[1]=f*u+-(p*s)+-(h*o)- -(c*l),t[2]=h*u+-(p*l)+-(c*s)- -(f*o),t[3]=e[3],t}},1848:function(t,e,r){var n=r(4905),i=r(6468);t.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return A(r),y+=r.length,(p=p.slice(r.length)).length}}};var n=r(620),i=r(7827),a=r(6852),o=r(7932),s=r(3508),l=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(t,e,r){var n=r(6852);n=n.slice().filter(function(t){return!/^(gl\_|texture)/.test(t)}),t.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(t){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(t,e,r){var n=r(620);t.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(t,e,r){var n=r(5874);t.exports=function(t,e){var r=n(e),i=[];return(i=i.concat(r(t))).concat(r(null))}},3236:function(t){t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,h=23===i?5960464477539062e-23:0,p=n?0:a-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(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),o+f>=1?e+=h/l:e+=h*Math.pow(2,1-f),e*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*v}},8954:function(t,e,r){"use strict";t.exports=function(t,e){var r=t.length;if(0===r)throw Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw Error("Must input at least d+1 points");var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw Error("Input not in general position");for(var l=Array(i+1),c=0;c<=i;++c)l[c]=c;s<0&&(l[0]=1,l[1]=0);for(var f=new a(l,Array(i+1),!1),h=f.adjacent,p=Array(i+2),c=0;c<=i;++c){for(var d=l.slice(),v=0;v<=i;++v)v===c&&(d[v]=-1);var g=d[0];d[0]=d[1],d[1]=g;var y=new a(d,Array(i+1),!0);h[c]=y,p[c]=y}p[i+1]=f;for(var c=0;c<=i;++c)for(var d=h[c].vertices,m=h[c].adjacent,v=0;v<=i;++v){var x=d[v];if(x<0){m[v]=f;continue}for(var b=0;b<=i;++b)0>h[b].vertices.indexOf(x)&&(m[v]=h[b])}for(var _=new u(i,o,p),w=!!e,c=i+1;c0;)for(var s=(t=o.pop()).adjacent,l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,f=0;f<=r;++f){var h=c[f];h<0?i[f]=e:i[f]=a[h]}var p=this.orient();if(p>0)return u;u.lastVisited=-n,0===p&&o.push(u)}}return null},c.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];p:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];s.lastVisited=r;for(var c=0;c<=n;++c){var f=u[c];if(!(f.lastVisited>=r)){var h=a[c];a[c]=t;var p=this.orient();if(a[c]=h,p<0){s=f;continue p}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},c.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var h=[];f.length>0;){var e=f.pop(),p=e.vertices,d=e.adjacent,v=p.indexOf(r);if(!(v<0))for(var g=0;g<=n;++g){if(g!==v){var y=d[g];if(y.boundary&&!(y.lastVisited>=r)){var m=y.vertices;if(y.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)m[b]<0?(x=b,l[b]=t):l[b]=i[m[b]];if(this.orient()>0){m[x]=r,y.boundary=!1,u.push(y),f.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var _=y.adjacent,w=p.slice(),T=d.slice(),k=new a(w,T,!0);c.push(k);var A=_.indexOf(e);if(!(A<0)){_[A]=k,T[v]=y,w[g]=-1,T[g]=e,d[g]=k,k.flip();for(var b=0;b<=n;++b){var M=w[b];if(!(M<0)&&M!==r){for(var S=Array(n-1),E=0,L=0;L<=n;++L){var C=w[L];C<0||L===b||(S[E++]=C)}h.push(new o(S,k,b))}}}}}}}h.sort(s);for(var g=0;g+1=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},3352:function(t,e,r){"use strict";var n=r(2478);function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}t.exports=function(t){return new y(t&&0!==t.length?g(t):null)};var a=i.prototype;function o(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function s(t,e){var r=g(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function u(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function c(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function h(t,e){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(e+1)?l(this,t):this.left.insert(t):this.left=g([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=g([t]);else{var r=n.ge(this.leftPoints,t,d),i=n.ge(this.rightPoints,t,v);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},a.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1))return u(this,t);var r=this.left.remove(t);return 2===r?(this.left=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(t[0]>this.mid){if(!this.right)return 0;if(4*(this.left?this.left.count:0)>3*(e-1))return u(this,t);var r=this.right.remove(t);return 2===r?(this.right=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var i=this,a=this.left;a.right;)i=a,a=a.right;if(i===this)a.right=this.right;else{var s=this.left,r=this.right;i.count-=a.count,i.right=a.left,a.left=s,a.right=r}o(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(var s=n.ge(this.leftPoints,t,d);sthis.mid))return h(this.leftPoints,e);if(this.right){var r=this.right.queryPoint(t,e);if(r)return r}return f(this.rightPoints,t,e)},a.queryInterval=function(t,e,r){if(tthis.mid&&this.right){var n=this.right.queryInterval(t,e,r);if(n)return n}return ethis.mid?f(this.rightPoints,t,r):h(this.leftPoints,r)};var m=y.prototype;m.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},m.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},m.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},m.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(m,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(m,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},7762:function(t){"use strict";t.exports=function(t){for(var e=Array(t),r=0;r13)&&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}},395:function(t){t.exports=function(t,e,r){return t*(1-r)+e*r}},2652:function(t,e,r){var n=r(4335),i=r(6864),a=r(1903),o=r(9921),s=r(7608),l=r(5665),u={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},c=i(),f=i(),h=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];function v(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}t.exports=function(t,e,r,i,g,y){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),y||(y=[0,0,0,1]),!n(c,t)||(a(f,c),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(1e-8>o(f))))return!1;var m,x,b,_,w,T=c[3],k=c[7],A=c[11],M=c[12],S=c[13],E=c[14],L=c[15];if(0!==T||0!==k||0!==A){if(h[0]=T,h[1]=k,h[2]=A,h[3]=L,!s(f,f))return!1;l(f,f),m=g,x=h[0],b=h[1],_=h[2],w=h[3],m[0]=f[0]*x+f[4]*b+f[8]*_+f[12]*w,m[1]=f[1]*x+f[5]*b+f[9]*_+f[13]*w,m[2]=f[2]*x+f[6]*b+f[10]*_+f[14]*w,m[3]=f[3]*x+f[7]*b+f[11]*_+f[15]*w}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=M,e[1]=S,e[2]=E,p[0][0]=c[0],p[0][1]=c[1],p[0][2]=c[2],p[1][0]=c[4],p[1][1]=c[5],p[1][2]=c[6],p[2][0]=c[8],p[2][1]=c[9],p[2][2]=c[10],r[0]=u.length(p[0]),u.normalize(p[0],p[0]),i[0]=u.dot(p[0],p[1]),v(p[1],p[1],p[0],1,-i[0]),r[1]=u.length(p[1]),u.normalize(p[1],p[1]),i[0]/=r[1],i[1]=u.dot(p[0],p[2]),v(p[2],p[2],p[0],1,-i[1]),i[2]=u.dot(p[1],p[2]),v(p[2],p[2],p[1],1,-i[2]),r[2]=u.length(p[2]),u.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],u.cross(d,p[1],p[2]),0>u.dot(p[0],d))for(var C=0;C<3;C++)r[C]*=-1,p[C][0]*=-1,p[C][1]*=-1,p[C][2]*=-1;return y[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),y[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),y[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),y[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(y[0]=-y[0]),p[0][2]>p[2][0]&&(y[1]=-y[1]),p[1][0]>p[0][1]&&(y[2]=-y[2]),!0}},4335:function(t){t.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},7442:function(t,e,r){var n=r(6658),i=r(7182),a=r(2652),o=r(9921),s=r(8648),l=f(),u=f(),c=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}t.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,u.translate,u.scale,u.skew,u.perspective,u.quaternion);return!!h&&!!p&&(n(c.translate,l.translate,u.translate,f),n(c.skew,l.skew,u.skew,f),n(c.scale,l.scale,u.scale,f),n(c.perspective,l.perspective,u.perspective,f),s(c.quaternion,l.quaternion,u.quaternion,f),i(t,c.translate,c.scale,c.skew,c.perspective,c.quaternion),!0)}},7182:function(t,e,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)};n.create();var i=n.create();t.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},4192:function(t,e,r){"use strict";var n=r(2478),i=r(7442),a=r(7608),o=r(5567),s=r(2408),l=r(7089),u=r(6582),c=r(7656);r(2504);var f=r(3536),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}t.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)o[u]=s[l++];else{for(var c=e[r+1]-e[r],l=16*r,h=this.prevMatrix,p=!0,u=0;u<16;++u)h[u]=s[l++];for(var d=this.nextMatrix,u=0;u<16;++u)d[u]=s[l++],p=p&&h[u]===d[u];if(c<1e-6||p)for(var u=0;u<16;++u)o[u]=h[u];else i(o,h,d,(t-e[r])/c)}var v=this.computedUp;v[0]=o[1],v[1]=o[5],v[2]=o[9],f(v,v);var g=this.computedInverse;a(g,o);var y=this.computedEye,m=g[15];y[0]=g[12]/m,y[1]=g[13]/m,y[2]=g[14]/m;for(var x=this.computedCenter,b=Math.exp(this.computedRadius[0]),u=0;u<3;++u)x[u]=y[u]-o[2+4*u]*b}},d.idle=function(t){if(!(t1&&0>=n(t[o[c-2]],t[o[c-1]],u);)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&n(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}for(var r=Array(s.length+o.length-2),f=0,i=0,h=o.length;i0;--p)r[f++]=s[p];return r};var n=r(3250)[3]},351:function(t,e,r){"use strict";t.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function u(t,s){var u=n.x(s),c=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||u!==i||c!==a||l(s))&&(r=0|t,i=u||0,a=c||0,e&&e(r,i,a,o))}function c(t){u(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?u(0,t):u(r,t)}function d(t){u(r|n.buttons(t),t)}function v(t){u(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",v),t.addEventListener("mouseleave",c),t.addEventListener("mouseenter",c),t.addEventListener("mouseout",c),t.addEventListener("mouseover",c),t.addEventListener("blur",f),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",v),t.removeEventListener("mouseleave",c),t.removeEventListener("mouseenter",c),t.removeEventListener("mouseout",c),t.removeEventListener("mouseover",c),t.removeEventListener("blur",f),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var n=r(4687)},24: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}},4687:function(t,e){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<(t.scalarArguments||0)&&e("Scalar arg count must be > 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var u=t.getters||[],c=Array(l),f=0;f=0?c[f]=!0:c[f]=!1;return r=t.vertex,a=t.cell,o=t.phase,(0,i[[c,s].join(",")])(r,a,o,n.mallocUint32,n.freeUint32)};var i={"false,0,1":function(t,e,r,n,i){return function(a,o,s,l){var u,c=0|a.shape[0],f=0|a.shape[1],h=a.data,p=0|a.offset,d=0|a.stride[0],v=0|a.stride[1],g=p,y=0|-d,m=0,x=0|-v,b=0,_=-d-v|0,w=0,T=0|d,k=v-d*c|0,A=0,M=0,S=0,E=2*c|0,L=n(E),C=n(E),P=0,O=0,I=-1,z=-1,D=0,R=0|-c,F=0|c,B=0,N=-c-1|0,j=c-1|0,U=0,V=0,q=0;for(A=0;A0){if(M=1,L[P++]=r(h[g],o,s,l),g+=T,c>0)for(A=1,u=h[g],O=L[P]=r(u,o,s,l),D=L[P+I],B=L[P+R],U=L[P+N],(O!==D||O!==B||O!==U)&&(t(A,M,u,m=h[g+y],b=h[g+x],w=h[g+_],O,D,B,U,o,s,l),V=C[P]=S++),P+=1,g+=T,A=2;A0)for(A=1,u=h[g],O=L[P]=r(u,o,s,l),D=L[P+I],B=L[P+R],U=L[P+N],(O!==D||O!==B||O!==U)&&(t(A,M,u,m=h[g+y],b=h[g+x],w=h[g+_],O,D,B,U,o,s,l),V=C[P]=S++,U!==B&&e(C[P+R],V,b,w,B,U,o,s,l)),P+=1,g+=T,A=2;A0){if(A=1,L[P++]=r(h[g],o,s,l),g+=T,f>0)for(M=1,u=h[g],O=L[P]=r(u,o,s,l),B=L[P+R],D=L[P+I],U=L[P+N],(O!==B||O!==D||O!==U)&&(t(A,M,u,m=h[g+y],b=h[g+x],w=h[g+_],O,B,D,U,o,s,l),V=C[P]=S++),P+=1,g+=T,M=2;M0)for(M=1,u=h[g],O=L[P]=r(u,o,s,l),B=L[P+R],D=L[P+I],U=L[P+N],(O!==B||O!==D||O!==U)&&(t(A,M,u,m=h[g+y],b=h[g+x],w=h[g+_],O,B,D,U,o,s,l),V=C[P]=S++,U!==B&&e(C[P+R],V,w,m,U,B,o,s,l)),P+=1,g+=T,M=2;M2&&a[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(i.pick(0,-1).lo(1).hi(a[1]-2),t.pick(0,-1,1).lo(1).hi(a[1]-2)),e(t.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),t.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),e(t.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(i.pick(-1,0).lo(1).hi(a[0]-2),t.pick(-1,0,0).lo(1).hi(a[0]-2)),e(t.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),t.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),e(t.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),t.set(0,0,0,0),t.set(0,0,1,0),t.set(a[0]-1,0,0,0),t.set(a[0]-1,0,1,0),t.set(0,a[1]-1,0,0),t.set(0,a[1]-1,1,0),t.set(a[0]-1,a[1]-1,0,0),t.set(a[0]-1,a[1]-1,1,0),t}}t.exports=function(t,e,r){return(Array.isArray(r)||(r="string"==typeof r?n(e.dimension,r):n(e.dimension,"clamp")),0===e.size)?t:0===e.dimension?(t.set(0),t):(function(t){var e,r=t.join(),n=u[r];if(n)return n;for(var i=t.length,a=[c,f],o=1;o<=i;++o)a.push((e=o)in l?l[e]:l[e]=s({funcName:"fdTemplate"+e}));var n=h.apply(void 0,a);return u[r]=n,n})(r)(t,e)}},4317:function(t){"use strict";function e(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|t[1];b>0;){b<64?(u=b,b=0):(u=64,b-=64),n=y+x*f+b*h,o=m+x*d+b*v;var _=0,w=0,T=0,k=f-c*p,A=h-l*f,M=d-c*g,S=v-l*d;for(T=0;T0;){v<64?(l=v,v=0):(l=64,v-=64);for(var g=0|t[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=p+v*c+g*u,o=d+v*h+g*f;var y=0,m=0,x=u-l*c,b=f-l*h;for(m=0;m0;){m<64?(u=m,m=0):(u=64,m-=64);for(var x=0|t[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|t[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),n=g+m*h+x*c+b*f,o=y+m*v+x*p+b*d;var _=0,w=0,T=0,k=c-u*h,A=f-s*c,M=p-u*v,S=d-s*p;for(T=0;Tr;){for(g=0,y=0,m=v-o;gb)break;m+=f,y+=h}for(g=0,y=v,m=v-o;g>1,H=q-j,G=q+j,W=U,Y=H,X=q,Z=G,K=V,J=i+1,$=a-1,Q=!0,tt=0,te=0,tr=0,tn=e(f),ti=e(f);for(k=0,A=l*W,M=l*Y,N=s;k0){g=W,W=Y,Y=g;break}if(tr<0)break;N+=p}for(k=0,A=l*Z,M=l*K,N=s;k0){g=Z,Z=K,K=g;break}if(tr<0)break;N+=p}for(k=0,A=l*W,M=l*X,N=s;k0){g=W,W=X,X=g;break}if(tr<0)break;N+=p}for(k=0,A=l*Y,M=l*X,N=s;k0){g=Y,Y=X,X=g;break}if(tr<0)break;N+=p}for(k=0,A=l*W,M=l*Z,N=s;k0){g=W,W=Z,Z=g;break}if(tr<0)break;N+=p}for(k=0,A=l*X,M=l*Z,N=s;k0){g=X,X=Z,Z=g;break}if(tr<0)break;N+=p}for(k=0,A=l*Y,M=l*K,N=s;k0){g=Y,Y=K,K=g;break}if(tr<0)break;N+=p}for(k=0,A=l*Y,M=l*X,N=s;k0){g=Y,Y=X,X=g;break}if(tr<0)break;N+=p}for(k=0,A=l*Z,M=l*K,N=s;k0){g=Z,Z=K,K=g;break}if(tr<0)break;N+=p}for(k=0,A=l*W,M=l*Y,S=l*X,E=l*Z,L=l*K,C=l*U,P=l*q,O=l*V,B=0,N=s;k0)$--;else if(tr<0){for(k=0,A=l*b,M=l*J,S=l*$,N=s;k0)for(;;){for(k=0,_=s+$*l,B=0;k0){if(--$V){v:for(;;){for(k=0,_=s+J*l,B=0,N=s;k1&&l?u(f,l[0],l[1]):u(f));return c(f,h)}},446:function(t,e,r){"use strict";var n=r(7640),i={};t.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(":"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},9618:function(t,e,r){var n=r(7163),i="undefined"!=typeof Float64Array;function a(t,e){return t[0]-e[0]}function o(){var t,e=this.stride,r=Array(e.length);for(t=0;t=0&&(e+=a*(r=0|t),i-=r),new n(this.data,i,a,e)},i.step=function(t){var e=this.shape[0],r=this.stride[0],i=this.offset,a=0,o=Math.ceil;return"number"==typeof t&&((a=0|t)<0?(i+=r*(e-1),e=o(-e/a)):e=o(e/a),r*=a),new n(this.data,e,r,i)},i.transpose=function(t){t=void 0===t?0:0|t;var e=this.shape,r=this.stride;return new n(this.data,e[t],r[t],this.offset)},i.pick=function(t){var r=[],n=[],i=this.offset;return"number"==typeof t&&t>=0?i=i+this.stride[0]*t|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,e[r.length+1])(this.data,r,n,i)},function(t,e,r,i){return new n(t,e[0],r[0],i)}},2:function(t,e,r){function n(t,e,r,n,i,a){this.data=t,this.shape=[e,r],this.stride=[n,i],this.offset=0|a}var i=n.prototype;return i.dtype=t,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(e,r,n){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]=n},i.get=function(e,r){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]},i.index=function(t,e){return this.offset+this.stride[0]*t+this.stride[1]*e},i.hi=function(t,e){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},i.lo=function(t,e){var r=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof t&&t>=0&&(r+=s*(i=0|t),a-=i),"number"==typeof e&&e>=0&&(r+=l*(i=0|e),o-=i),new n(this.data,a,o,s,l,r)},i.step=function(t,e){var r=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,u=Math.ceil;return"number"==typeof t&&((l=0|t)<0?(s+=a*(r-1),r=u(-r/l)):r=u(r/l),a*=l),"number"==typeof e&&((l=0|e)<0?(s+=o*(i-1),i=u(-i/l)):i=u(i/l),o*=l),new n(this.data,r,i,a,o,s)},i.transpose=function(t,e){t=void 0===t?0:0|t,e=void 0===e?1:0|e;var r=this.shape,i=this.stride;return new n(this.data,r[t],r[e],i[t],i[e],this.offset)},i.pick=function(t,r){var n=[],i=[],a=this.offset;return"number"==typeof t&&t>=0?a=a+this.stride[0]*t|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,e[n.length+1])(this.data,n,i,a)},function(t,e,r,i){return new n(t,e[0],e[1],r[0],r[1],i)}},3:function(t,e,r){function n(t,e,r,n,i,a,o,s){this.data=t,this.shape=[e,r,n],this.stride=[i,a,o],this.offset=0|s}var i=n.prototype;return i.dtype=t,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var t=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return t>e?e>r?[2,1,0]:t>r?[1,2,0]:[1,0,2]:t>r?[2,0,1]:r>e?[0,1,2]:[0,2,1]}}),i.set=function(e,r,n,i){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(e,r,n){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]},i.index=function(t,e,r){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r},i.hi=function(t,e,r){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(t,e,r){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.stride[0],c=this.stride[1],f=this.stride[2];return"number"==typeof t&&t>=0&&(i+=u*(a=0|t),o-=a),"number"==typeof e&&e>=0&&(i+=c*(a=0|e),s-=a),"number"==typeof r&&r>=0&&(i+=f*(a=0|r),l-=a),new n(this.data,o,s,l,u,c,f,i)},i.step=function(t,e,r){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],u=this.stride[2],c=this.offset,f=0,h=Math.ceil;return"number"==typeof t&&((f=0|t)<0?(c+=s*(i-1),i=h(-i/f)):i=h(i/f),s*=f),"number"==typeof e&&((f=0|e)<0?(c+=l*(a-1),a=h(-a/f)):a=h(a/f),l*=f),"number"==typeof r&&((f=0|r)<0?(c+=u*(o-1),o=h(-o/f)):o=h(o/f),u*=f),new n(this.data,i,a,o,s,l,u,c)},i.transpose=function(t,e,r){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r;var i=this.shape,a=this.stride;return new n(this.data,i[t],i[e],i[r],a[t],a[e],a[r],this.offset)},i.pick=function(t,r,n){var i=[],a=[],o=this.offset;return"number"==typeof t&&t>=0?o=o+this.stride[0]*t|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(i.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?o=o+this.stride[2]*n|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,e[i.length+1])(this.data,i,a,o)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],r[0],r[1],r[2],i)}},4:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,u){this.data=t,this.shape=[e,r,n,i],this.stride=[a,o,s,l],this.offset=0|u}var i=n.prototype;return i.dtype=t,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,a){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=a},i.get=function(e,r,n,i){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(t,e,r,n){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n},i.hi=function(t,e,r,i){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(t,e,r,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],u=this.shape[2],c=this.shape[3],f=this.stride[0],h=this.stride[1],p=this.stride[2],d=this.stride[3];return"number"==typeof t&&t>=0&&(a+=f*(o=0|t),s-=o),"number"==typeof e&&e>=0&&(a+=h*(o=0|e),l-=o),"number"==typeof r&&r>=0&&(a+=p*(o=0|r),u-=o),"number"==typeof i&&i>=0&&(a+=d*(o=0|i),c-=o),new n(this.data,s,l,u,c,f,h,p,d,a)},i.step=function(t,e,r,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],u=this.stride[0],c=this.stride[1],f=this.stride[2],h=this.stride[3],p=this.offset,d=0,v=Math.ceil;return"number"==typeof t&&((d=0|t)<0?(p+=u*(a-1),a=v(-a/d)):a=v(a/d),u*=d),"number"==typeof e&&((d=0|e)<0?(p+=c*(o-1),o=v(-o/d)):o=v(o/d),c*=d),"number"==typeof r&&((d=0|r)<0?(p+=f*(s-1),s=v(-s/d)):s=v(s/d),f*=d),"number"==typeof i&&((d=0|i)<0?(p+=h*(l-1),l=v(-l/d)):l=v(l/d),h*=d),new n(this.data,a,o,s,l,u,c,f,h,p)},i.transpose=function(t,e,r,i){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new n(this.data,a[t],a[e],a[r],a[i],o[t],o[e],o[r],o[i],this.offset)},i.pick=function(t,r,n,i){var a=[],o=[],s=this.offset;return"number"==typeof t&&t>=0?s=s+this.stride[0]*t|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,e[a.length+1])(this.data,a,o,s)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],r[0],r[1],r[2],r[3],i)}},5:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,u,c,f){this.data=t,this.shape=[e,r,n,i,a],this.stride=[o,s,l,u,c],this.offset=0|f}var i=n.prototype;return i.dtype=t,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,a,o){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(e,r,n,i,a){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]},i.index=function(t,e,r,n,i){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(t,e,r,i,a){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(t,e,r,i,a){var o=this.offset,s=0,l=this.shape[0],u=this.shape[1],c=this.shape[2],f=this.shape[3],h=this.shape[4],p=this.stride[0],d=this.stride[1],v=this.stride[2],g=this.stride[3],y=this.stride[4];return"number"==typeof t&&t>=0&&(o+=p*(s=0|t),l-=s),"number"==typeof e&&e>=0&&(o+=d*(s=0|e),u-=s),"number"==typeof r&&r>=0&&(o+=v*(s=0|r),c-=s),"number"==typeof i&&i>=0&&(o+=g*(s=0|i),f-=s),"number"==typeof a&&a>=0&&(o+=y*(s=0|a),h-=s),new n(this.data,l,u,c,f,h,p,d,v,g,y,o)},i.step=function(t,e,r,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.shape[3],c=this.shape[4],f=this.stride[0],h=this.stride[1],p=this.stride[2],d=this.stride[3],v=this.stride[4],g=this.offset,y=0,m=Math.ceil;return"number"==typeof t&&((y=0|t)<0?(g+=f*(o-1),o=m(-o/y)):o=m(o/y),f*=y),"number"==typeof e&&((y=0|e)<0?(g+=h*(s-1),s=m(-s/y)):s=m(s/y),h*=y),"number"==typeof r&&((y=0|r)<0?(g+=p*(l-1),l=m(-l/y)):l=m(l/y),p*=y),"number"==typeof i&&((y=0|i)<0?(g+=d*(u-1),u=m(-u/y)):u=m(u/y),d*=y),"number"==typeof a&&((y=0|a)<0?(g+=v*(c-1),c=m(-c/y)):c=m(c/y),v*=y),new n(this.data,o,s,l,u,c,f,h,p,d,v,g)},i.transpose=function(t,e,r,i,a){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new n(this.data,o[t],o[e],o[r],o[i],o[a],s[t],s[e],s[r],s[i],s[a],this.offset)},i.pick=function(t,r,n,i,a){var o=[],s=[],l=this.offset;return"number"==typeof t&&t>=0?l=l+this.stride[0]*t|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,e[o.length+1])(this.data,o,s,l)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],e[4],r[0],r[1],r[2],r[3],r[4],i)}}},l={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};t.exports=function(t,e,r,a){if(void 0===t){var u=l.array[0];return u([])}"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var c=e.length;if(void 0===r){r=Array(c);for(var f=c-1,h=1;f>=0;--f)r[f]=h,h*=e[f]}if(void 0===a){a=0;for(var f=0;ft==t>0?4294967295===i?(r+=1,i=0):i+=1:0===i?(i=4294967295,r-=1):i-=1,n.pack(i,r)}},8406:function(t,e){e.vertexNormals=function(t,e,r){for(var n=e.length,i=Array(n),a=void 0===r?1e-6:r,o=0;oa)for(var b=i[u],_=1/Math.sqrt(g*m),x=0;x<3;++x){var w=(x+1)%3,T=(x+2)%3;b[x]+=_*(y[w]*v[T]-y[T]*v[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(k),x=0;x<3;++x)b[x]*=_;else for(var x=0;x<3;++x)b[x]=0}return i},e.faceNormals=function(t,e,r){for(var n=t.length,i=Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(p):0;for(var u=0;u<3;++u)h[u]*=p;i[o]=h}return i}},4081:function(t){"use strict";t.exports=function(t,e,r,n,i,a,o,s,l,u){var c=e+a+u;if(f>0){var f=Math.sqrt(c+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,u),f=Math.sqrt(2*h-c+1);e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},9977:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),c(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i};var n=r(9215),i=r(6582),a=r(7399),o=r(7608),s=r(4081);function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function u(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function c(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=u(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;c(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,f=0;f<3;++f)u+=r[l+4*f]*i[f];r[12+l]=-u}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],u=l(a,o,s);a/=u,o/=u,s/=u;var c=i[0],f=i[4],h=i[8],p=c*a+f*o+h*s,d=l(c-=a*p,f-=o*p,h-=s*p);c/=d,f/=d,h/=d;var v=i[2],g=i[6],y=i[10],m=v*a+g*o+y*s,x=v*c+g*f+y*h,b=l(v-=m*a+x*c,g-=m*o+x*f,y-=m*s+x*h);v/=b,g/=b,y/=b;var _=c*e+a*r,w=f*e+o*r,T=h*e+s*r;this.center.move(t,_,w,T);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+n),this.radius.set(t,Math.log(k))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],c=i[1],f=i[5],h=i[9],p=i[2],d=i[6],v=i[10],g=e*a+r*c,y=e*o+r*f,m=e*s+r*h,x=-(d*m-v*y),b=-(v*g-p*m),_=-(p*y-d*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),T=u(x,b,_,w);T>1e-6?(x/=T,b/=T,_/=T,w/=T):(x=b=_=0,w=1);var k=this.computedRotation,A=k[0],M=k[1],S=k[2],E=k[3],L=A*w+E*x+M*_-S*b,C=M*w+E*b+S*x-A*_,P=S*w+E*_+A*b-M*x,O=E*w-A*x-M*b-S*_;if(n){var I=Math.sin(n)/l(x=p,b=d,_=v);x*=I,b*=I,_*=I,L=L*(w=Math.cos(e))+O*x+C*_-P*b,C=C*w+O*b+P*x-L*_,P=P*w+O*_+L*b-C*x,O=O*w-L*x-C*b-P*_}var z=u(L,C,P,O);z>1e-6?(L/=z,C/=z,P/=z,O/=z):(L=C=P=0,O=1),this.rotation.set(t,L,C,P,O)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),c(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,u=0;u<3;++u)l+=Math.pow(r[u]-e[u],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),c(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,u=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,u-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=Math.max(e=e>0?Math.log(e):1/0,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},1371:function(t,e,r){"use strict";/*! + * pad-left + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + */var n=r(3233);t.exports=function(t,e,r){return n(r=void 0!==r?r+"":" ",e)+t}},3202:function(t){t.exports=function(t,e){e||(e=[0,""]);var r=parseFloat(t=String(t),10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},3088:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=0|e.length,i=t.length,a=[Array(r),Array(r)],o=0;o0){o=a[c][r][0],l=c;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=a[f][r],p=0;p0&&(o=d,s=v,l=f)}return i||o&&u(o,l),s}for(var o=0;o0;){a[0][o].length;var p=function(t,r){var i=a[r][t][0],o=[t];u(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=c(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=o[1],h=c(l,t,!0);if(0>n(e[l],e[t],e[f],e[h]))break;o.push(t),s=c(l,t)}return o}(o,f);p[1]===p[p.length-1]?h.push.apply(h,p):(h.length>0&&l.push(h),h=p)}h.length>0&&l.push(h)}return l};var n=r(3140)},5609:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=n(t,e.length),i=Array(e.length),a=Array(e.length),o=[],s=0;s0;){var u=o.pop();i[u]=!1;for(var c=r[u],s=0;s0})).length,g=Array(v),y=Array(v),p=0;p0;){var B,N=R.pop(),j=E[N];l(j,function(t,e){return t-e});var U=j.length,V=F[N];if(0===V){var w=d[N];B=[w]}for(var p=0;p=0)&&(F[q]=1^V,R.push(q),0===V)){var w=d[q];D(w)||(w.reverse(),B.push(w))}}0===V&&r.push(B)}return r};var n=r(3134),i=r(3088),a=r(5085),o=r(5250),s=r(8210),l=r(1682),u=r(5609);function c(t,e){for(var r=Array(t),n=0;n0)||a[e]!==t[0])return 1;i=r[e-1]}for(var s=1;i;){var l=i.key,u=n(t,l[0],l[1]);if(l[0][0]0))return 0;s=-1,i=i.right}}else if(u>0)i=i.left;else{if(!(u<0))return 0;s=1,i=i.right}}return s});return 0===h.length?_:(s=l(h),function(t){return s(t[0],t[1])?0:_(t)})};var n=r(3250)[3],i=r(4209),a=r(3352),o=r(2478);function s(){return!0}function l(t){for(var e={},r=0;r=d?(k=1,l=d+2*y+x):(k=-y/d,l=y*k+x)):(k=0,m>=0?(A=0,l=x):-m>=g?(A=1,l=g+2*m+x):(A=-m/g,l=m*A+x));else if(A<0)A=0,y>=0?(k=0,l=x):-y>=d?(k=1,l=d+2*y+x):(k=-y/d,l=y*k+x);else{var M=1/T;k*=M,A*=M,l=k*(d*k+v*A+2*y)+A*(v*k+g*A+2*m)+x}}else k<0?(u=v+y,(c=g+m)>u?(f=c-u)>=(h=d-2*v+g)?(k=1,A=0,l=d+2*y+x):(A=1-(k=f/h),l=k*(d*k+v*A+2*y)+A*(v*k+g*A+2*m)+x):(k=0,c<=0?(A=1,l=g+2*m+x):m>=0?(A=0,l=x):(A=-m/g,l=m*A+x))):A<0?(u=v+m,(c=d+y)>u?(f=c-u)>=(h=d-2*v+g)?(A=1,k=0,l=g+2*m+x):l=(k=1-(A=f/h))*(d*k+v*A+2*y)+A*(v*k+g*A+2*m)+x:(A=0,c<=0?(k=1,l=d+2*y+x):y>=0?(k=0,l=x):(k=-y/d,l=y*k+x))):(f=g+m-v-y)<=0?(k=0,A=1,l=g+2*m+x):f>=(h=d-2*v+g)?(k=1,A=0,l=d+2*y+x):(A=1-(k=f/h),l=k*(d*k+v*A+2*y)+A*(v*k+g*A+2*m)+x);for(var S=1-k-A,p=0;p0){var u=t[r-1];if(0===n(s,u)&&a(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},3233:function(t){"use strict";/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */var e,r="";t.exports=function(t,n){if("string"!=typeof t)throw TypeError("expected a string");if(1===n)return t;if(2===n)return t+t;var i=t.length*n;if(e!==t||void 0===e)e=t,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=t),n>>=1,t+=t;return r+=t,r=r.substr(0,i)}},3025:function(t,e,r){t.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(t){"use strict";t.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r,o=t[i],s=(r=a+o)-a,l=o-s;l&&(t[--n]=r,r=l)}for(var u=0,i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0)||a>=0)return o;n=-(i+a)}var l=s*n;return o>=l||o<=-l?o:c(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],u=e[1]-n[1],c=r[1]-n[1],h=t[2]-n[2],p=e[2]-n[2],d=r[2]-n[2],v=a*c,g=o*u,y=o*s,m=i*c,x=i*u,b=a*s,_=h*(v-g)+p*(y-m)+d*(x-b),w=l*((Math.abs(v)+Math.abs(g))*Math.abs(h)+(Math.abs(y)+Math.abs(m))*Math.abs(p)+(Math.abs(x)+Math.abs(b))*Math.abs(d));return _>w||-_>w?_:f(t,e,r,n)}];function p(t){var e=h[t.length];return e||(e=h[t.length]=u(t.length)),e.apply(void 0,t)}function d(t,e,r,n,i,a,o){return function(e,r,s,l,u){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,u)}for(var c=Array(arguments.length),f=0;f0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);return(!(s>0)||!(l>0))&&(!(s<0)||!(l<0))&&(0!==a||0!==o||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),u=r[i],c=n[i],f=Math.min(u,c);if(Math.max(u,c)=d?(s=b,(y+=1)=d?(s=b,(y+=1)>1,u=e[2*l+1];if(u===a)return l;a>1,u=e[2*l+1];if(u===a)return l;a>1,u=e[2*l+1];if(u===a)return l;a0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return t-=t>>>1&1431655765,((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)*16843009>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=Array(256);(function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return t&=65535,e&=65535,(t=((t=((t=((t=(t|t<<8)&16711935)|t<<4)&252645135)|t<<2)&858993459)|t<<1)&1431655765)|(e=((e=((e=((e=(e|e<<8)&16711935)|e<<4)&252645135)|e<<2)&858993459)|e<<1)&1431655765)<<1},e.deinterleave2=function(t,e){return(t=((t=((t=((t=((t=t>>>e&1431655765)|t>>>1)&858993459)|t>>>2)&252645135)|t>>>4)&16711935)|t>>>16)&65535)<<16>>16},e.interleave3=function(t,e,r){return t&=1023,e&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&4278190335)|r<<8)&251719695)|r<<4)&3272356035)|r<<2)&1227133513,(t=((t=((t=((t=(t|t<<16)&4278190335)|t<<8)&251719695)|t<<4)&3272356035)|t<<2)&1227133513|(e=((e=((e=((e=(e|e<<16)&4278190335)|e<<8)&251719695)|e<<4)&3272356035)|e<<2)&1227133513)<<1)|r<<2},e.deinterleave3=function(t,e){return(t=((t=((t=((t=((t=t>>>e&1227133513)|t>>>2)&3272356035)|t>>>4)&251719695)|t>>>8)&4278190335)|t>>>16)&1023)<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},2014:function(t,e,r){"use strict";var n=r(3105),i=r(4623);function a(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:var a=t[0]+t[1]-e[0]-e[1];if(a)return a;return i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=i(t[0],t[1]),u=i(e[0],e[1]),a=i(l,t[2])-i(u,e[2]);if(a)return a;return i(l+t[2],o)-i(u+e[2],s);default:var c=t.slice(0);c.sort();var f=e.slice(0);f.sort();for(var h=0;h>1,s=a(t[o],e);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function c(t,e){for(var r=Array(t.length),i=0,o=r.length;i=t.length)&&0===a(t[g],s););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>c&1&&u.push(i[c]);e.push(u)}return s(e)},e.skeleton=f,e.boundary=function(t){for(var e=[],r=0,n=t.length;r0;){var r,n=1&(r=t)?r-1>>1:(r>>1)-1;if(n>=0&&e0){var t=w[0];return g(0,k-1),k-=1,m(0),t}return -1}function _(t,e){var r=w[t];return u[r]===e?t:(u[r]=-1/0,x(t),b(),u[r]=e,x((k+=1)-1))}for(var w=[],T=Array(a),f=0;f>1;f>=0;--f)m(f);for(;;){var A=b();if(A<0||u[A]>r)break;!function(t){if(!c[t]){c[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),T[e]>=0&&_(T[e],v(e)),T[r]>=0&&_(T[r],v(r))}}(A)}for(var M=[],f=0;f=0&&r>=0&&e!==r){var n=T[e],i=T[r];n!==i&&E.push([n,i])}}),i.unique(i.normalize(E)),{positions:M,edges:E}};var n=r(3250),i=r(2014)},1303:function(t,e,r){"use strict";t.exports=function(t,e){if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]t[1][0]))return-i(t,e);o=t[1],s=t[0]}var r,a,o,s,l=n(r,a,s),u=n(r,a,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=n(s,o,a),u=n(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return a[0]-s[0]};var n=r(3250);function i(t,e){if(e[0][0]e[1][0])r=e[1],i=e[0];else{var r,i,a,o,s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),u=Math.min(e[0][1],e[1][1]),c=Math.max(e[0][1],e[1][1]);return lc?s-c:l-c}t[0][1]0){if(e[0]!==o[1][0])r=t,t=t.right;else{var l=u(t.right,e);if(l)return l;t=t.left}}else{if(e[0]!==o[1][0])return t;var l=u(t.right,e);if(l)return l;t=t.left}}return r}function c(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return -1;this.slabs[e];var r=u(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var c=u(this.slabs[e-1],t);c&&(s?o(c.key,s)>0&&(s=c.key,i=c.value):(i=c.value,s=c.key))}var f=this.horizontal[e];if(f.length>0){var h=n.ge(f,t[1],l);if(h=f.length)return i;p=f[h]}}if(p.start){if(s){var d=a(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index}else p.y!==t[1]&&(i=p.index)}}}return i}},5202:function(t,e,r){"use strict";var n=r(1944),i=r(8210);function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=Array(o),l=0;l0||i>0&&c<0){var f=o(s,c,l,i);r.push(f),n.push(f.slice())}c<0?n.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=c}return{positive:r,negative:n}},t.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&u<0)&&r.push(o(i,u,s,n)),u>=0&&r.push(s.slice()),n=u}return r},t.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&u<0)&&r.push(o(i,u,s,n)),u<=0&&r.push(s.slice()),n=u}return r}},3387:function(t,e,r){var n;!function(){"use strict";var i={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(t){return function(t,e){var r,n,o,s,l,u,c,f,h,p=1,d=t.length,v="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=r:(i.number.test(s.type)&&(!f||s.sign)?(h=f?"+":"-",r=r.toString().replace(i.sign,"")):h="",u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",c=s.width-(h+r).length,l=s.width&&c>0?u.repeat(c):"",v+=s.align?h+r+l:"0"===u?h+l+r:l+h+r)}return v}(function(t){if(s[t])return s[t];for(var e,r=t,n=[],a=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else if(null!==(e=i.placeholder.exec(r))){if(e[2]){a|=1;var o=[],l=e[2],u=[];if(null!==(u=i.key.exec(l)))for(o.push(u[1]);""!==(l=l.substring(u[0].length));)if(null!==(u=i.key_access.exec(l)))o.push(u[1]);else if(null!==(u=i.index_access.exec(l)))o.push(u[1]);else throw SyntaxError("[sprintf] failed to parse named argument key");else throw SyntaxError("[sprintf] failed to parse named argument key");e[2]=o}else a|=2;if(3===a)throw Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}else throw SyntaxError("[sprintf] unexpected placeholder");r=r.substring(e[0].length)}return s[t]=n}(t),arguments)}function o(t,e){return a.apply(null,[t].concat(e||[]))}var s=Object.create(null);e.sprintf=a,e.vsprintf=o,"undefined"!=typeof window&&(window.sprintf=a,window.vsprintf=o,void 0!==(n=(function(){return{sprintf:a,vsprintf:o}}).call(e,r,e,t))&&(t.exports=n))}()},3711:function(t,e,r){"use strict";t.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=i(t,e),n=r.length,a=Array(n),o=Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,a,o,s,l,u,c,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(u<<3)|0;if(0!==p&&15!==p)switch(p){case 0:case 15:c.push([t-.5,e-.5]);break;case 1:c.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:c.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:c.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:c.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:c.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:c.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:c.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:c.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:c.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:c.push([t-.5-.5*(-n-r+-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:c.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:c.push([t-.5,e-.5-.5*(-i-r+-a-n+4*h)/(i-r+a-n)]);break;case 13:c.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:c.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}},o={}},529:function(t,e,r){"use strict";t.exports=function t(e,r,n){var n=n||{},a=n.fontStyle||"normal",s=n.fontWeight||"normal",l=n.fontVariant||"normal",u=[a,s,l,e].join("_"),c=o[u];c||(c=o[u]={" ":{data:new Float32Array(0),shape:.2}});var f=c[r];if(!f){if(r.length<=1||!/\d/.test(r))f=c[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o0&&(v+=.02);for(var y=new Float32Array(d),m=0,x=-.5*v,g=0;gu(n[0],n[1],n[2])?n=f(r):s(n,n),i=u(d[0],d[1],d[2]);var v=l(r,d)/i,g=l(n,d)/i;c=Math.acos(v),a=Math.acos(g)}return i=Math.log(i),new h(t.zoomMin,t.zoomMax,e,r,n,i,a,c)};var n=r(9215),i=r(7608),a=r(6079),o=r(5911),s=r(3536),l=r(244);function u(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t){return Math.min(1,Math.max(-1,t))}function f(t){var e=Math.abs(t[0]),r=Math.abs(t[1]),n=Math.abs(t[2]),i=[0,0,0];e>Math.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(var l=0;l<3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=Array(16);for(var u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=Math.max(e=e>0?Math.log(e):1/0,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=e[a]*r[a],n+=e[a]*e[a];for(var l=Math.sqrt(n),c=0,a=0;a<3;++a)r[a]-=e[a]*i/n,c+=r[a]*r[a],e[a]/=l;for(var f=Math.sqrt(c),a=0;a<3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);for(var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],v=this.computedAngle[1],g=Math.cos(d),y=Math.sin(d),m=Math.cos(v),x=Math.sin(v),b=this.computedCenter,_=g*m,w=y*m,T=-g*x,k=-y*x,A=this.computedEye,M=this.computedMatrix,a=0;a<3;++a){var S=_*r[a]+w*h[a]+x*e[a];M[4*a+1]=T*r[a]+k*h[a]+m*e[a],M[4*a+2]=S,M[4*a+3]=0}var E=M[1],L=M[5],C=M[9],P=M[2],O=M[6],I=M[10],z=L*I-C*O,D=C*P-E*I,R=E*O-L*P,F=u(z,D,R);z/=F,D/=F,R/=F,M[0]=z,M[4]=D,M[8]=R;for(var a=0;a<3;++a)A[a]=b[a]+M[2+4*a]*p;for(var a=0;a<3;++a){for(var c=0,B=0;B<3;++B)c+=M[a+4*B]*A[B];M[12+a]=-c}M[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,u=0;u<3;++u)i[4*u]=o[u],i[4*u+1]=s[u],i[4*u+2]=l[u];a(i,i,n,d);for(var u=0;u<3;++u)o[u]=i[4*u],s[u]=i[4*u+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix;this.computedRadius[0];var a=i[1],o=i[5],s=i[9],l=u(a,o,s);a/=l,o/=l,s/=l;var c=i[0],f=i[4],h=i[8],p=c*a+f*o+h*s,d=u(c-=a*p,f-=o*p,h-=s*p),v=(c/=d)*e+a*r,g=(f/=d)*e+o*r,y=(h/=d)*e+s*r;this.center.move(t,v,g,y);var m=Math.exp(this.computedRadius[0]);m=Math.max(1e-4,m+n),this.radius.set(t,Math.log(m))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a,o,s=1;"number"==typeof r&&(s=0|r),(s<0||s>3)&&(s=1);var l=(s+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var f=e[s],h=e[s+4],p=e[s+8];if(n){var d=Math.abs(f),v=Math.abs(p),g=Math.max(d,Math.abs(h),v);d===g?(f=f<0?-1:1,h=p=0):v===g?(p=p<0?-1:1,f=h=0):(h=h<0?-1:1,f=p=0)}else{var y=u(f,h,p);f/=y,h/=y,p/=y}var m=e[l],x=e[l+4],b=e[l+8],_=m*f+x*h+b*p,w=u(m-=f*_,x-=h*_,b-=p*_);m/=w,x/=w;var T=h*(b/=w)-p*x,k=p*m-f*b,A=f*x-h*m,M=u(T,k,A);if(T/=M,k/=M,A/=M,this.center.jump(t,q,H,G),this.radius.idle(t),this.up.jump(t,f,h,p),this.right.jump(t,m,x,b),2===s){var S=e[1],E=e[5],L=e[9],C=S*m+E*x+L*b,P=S*T+E*k+L*A;a=D<0?-Math.PI/2:Math.PI/2,o=Math.atan2(P,C)}else{var O=e[2],I=e[6],z=e[10],D=O*f+I*h+z*p,R=O*m+I*x+z*b,F=O*T+I*k+z*A;a=Math.asin(c(D)),o=Math.atan2(F,R)}this.angle.jump(t,o,a),this.recalcMatrix(t);var B=e[2],N=e[6],j=e[10],U=this.computedMatrix;i(U,e);var V=U[15],q=U[12]/V,H=U[13]/V,G=U[14]/V,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-B*W,H-N*W,G-j*W)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=u(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],p=u(l,f,h);if(!(p<1e-6)){l/=p,f/=p,h/=p;var d=this.computedRight,v=d[0],g=d[1],y=d[2],m=i*v+a*g+o*y,x=u(v-=m*i,g-=m*a,y-=m*o);if(!(x<.01&&(x=u(v=a*h-o*f,g=o*l-i*h,y=i*f-a*l))<1e-6)){v/=x,g/=x,y/=x,this.up.set(t,i,a,o),this.right.set(t,v,g,y),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*y-o*g,_=o*v-i*y,w=i*g-a*v,T=u(b,_,w),k=i*l+a*f+o*h,A=v*l+g*f+y*h,M=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(c(k)),E=Math.atan2(M,A),L=this.angle._state,C=L[L.length-1],P=L[L.length-2],O=Math.abs((C%=2*Math.PI)+2*Math.PI-E),I=Math.abs(C-E),z=Math.abs(C-2*Math.PI-E);O0?e.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function v(t){return new Uint16Array(p(2*t),0,t)}function g(t){return new Uint32Array(p(4*t),0,t)}function y(t){return new Int8Array(p(t),0,t)}function m(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=f[n.log2(t)];return e.length>0?e.pop():new a(t)}e.free=function(t){if(a.isBuffer(t))f[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength;c[0|n.log2(e)].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){h(t.buffer)},e.freeArrayBuffer=h,e.freeBuffer=function(t){f[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return p(t);switch(e){case"uint8":return d(t);case"uint16":return v(t);case"uint32":return g(t);case"int8":return y(t);case"int16":return m(t);case"int32":return x(t);case"float":case"float32":return b(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return k(t);case"biguint64":return T(t);case"buffer":return M(t);case"data":case"dataview":return A(t)}return null},e.mallocArrayBuffer=p,e.mallocUint8=d,e.mallocUint16=v,e.mallocUint32=g,e.mallocInt8=y,e.mallocInt16=m,e.mallocInt32=x,e.mallocFloat32=e.mallocFloat=b,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=T,e.mallocBigInt64=k,e.mallocDataView=A,e.mallocBuffer=M,e.clearCache=function(){for(var t=0;t<32;++t)u.UINT8[t].length=0,u.UINT16[t].length=0,u.UINT32[t].length=0,u.INT8[t].length=0,u.INT16[t].length=0,u.INT32[t].length=0,u.FLOAT[t].length=0,u.DOUBLE[t].length=0,u.BIGUINT64[t].length=0,u.BIGINT64[t].length=0,u.UINT8C[t].length=0,c[t].length=0,f[t].length=0}},1755:function(t){"use strict";function e(t){this.roots=Array(t),this.ranks=Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+"px",n.font].filter(function(t){return t}).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",f(function(t,e,r,n,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s,l,c,f,h,p="",d=[];for(l=0;l-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(M(),"?px "),h*=Math.pow(.75,l-s),n=n.replace("?px ",M())),f+=.25*x*(l-s)}if(!0===o.superscripts){var u=t.indexOf("+"),c=r.indexOf("+"),p=u>-1?parseInt(t[1+u]):0,d=c>-1?parseInt(r[1+c]):0;p!==d&&(n=n.replace(M(),"?px "),h*=Math.pow(.75,d-p),n=n.replace("?px ",M())),f-=.25*x*(d-p)}if(!0===o.bolds){var v=t.indexOf("b|")>-1,g=r.indexOf("b|")>-1;!v&&g&&(n=y?n.replace("italic ","italic bold "):"bold "+n),v&&!g&&(n=n.replace("bold ",""))}if(!0===o.italics){var y=t.indexOf("i|")>-1,m=r.indexOf("i|")>-1;!y&&m&&(n="italic "+n),y&&!m&&(n=n.replace("italic ",""))}e.font=n}(p,E),p=E))}A(),T+=S.length;var L=0|Math.round(c+2*n);_",a="",o=i.length,s=a.length,l="+"===e[0]||"-"===e[0],u=0,c=-s;u>-1&&-1!==(u=r.indexOf(i,u))&&-1!==(c=r.indexOf(a,u+o))&&!(c<=u);){for(var f=u;f=c)n[f]=null,r=r.substr(0,f)+" "+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=u+o,d=r.substr(p,c-p).indexOf(i);u=-1!==d?d:c+s}return n}function c(t,e,r,i){var u,c=(u=n(t,128),i?a(u.cells,u.positions,.25):{edges:u.cells,positions:u.positions}),f=function(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1073741824,1073741824],o=[0,0],s=t.length,l=0;l=0?e[a]:i})},has___:{value:_(function(e){var n=b(e);return n?r in n:t.indexOf(e)>=0})},set___:{value:_(function(n,i){var a,o=b(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(e[a=t.length]=i,t[a]=n),this})},delete___:{value:_(function(n){var i,a,o=b(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0)&&(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,!0)})}})};y.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof a?function(){function e(){this instanceof y||w();var t,e=new a,r=void 0,n=!1;return t=i?function(t,n){return e.set(t,n),e.has(t)||(r||(r=new y),r.set(t,n)),this}:function(t,i){if(n)try{e.set(t,i)}catch(e){r||(r=new y),r.set___(t,i)}else e.set(t,i);return this},Object.create(y.prototype,{get___:{value:_(function(t,n){return r?e.has(t)?e.get(t):r.get___(t,n):e.get(t,n)})},has___:{value:_(function(t){return e.has(t)||!!r&&r.has___(t)})},set___:{value:_(t)},delete___:{value:_(function(t){var n=!!e.delete(t);return r&&r.delete___(t)||n})},permitHostObjects___:{value:_(function(t){if(t===m)n=!0;else throw Error("bogus call to permitHostObjects___")})}})}i&&"undefined"!=typeof Proxy&&(Proxy=void 0),e.prototype=y.prototype,t.exports=e,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=y)}function m(t){t.permitHostObjects___&&t.permitHostObjects___(m)}function x(t){return!(t.substr(0,f.length)==f&&"___"===t.substr(t.length-3))}function b(t){if(t!==Object(t))throw TypeError("Not an object: "+t);var e=t[h];if(e&&e.key===t)return e;if(c(t)){e={key:t};try{return u(t,h,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function _(t){return t.prototype=null,Object.freeze(t)}function w(){v||"undefined"==typeof console||(v=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(t,e,r){var n=r(8284);t.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},8284:function(t){t.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},606:function(t,e,r){var n=r(236);t.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},3349:function(t){"use strict";var e,r;t.exports=(e=(function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0];n|=0;var u=0;for(u=0;u=0!=f>=0&&i.push(l[0]+.5+.5*(c+f)/(c-f)),n+=s,++l[0]}}}).bind(void 0,{funcName:"zeroCrossings"}),r={},function(t,n,i){var a=t.dtype,o=t.order,s=[a,o.join()].join(),l=r[s];return l||(r[s]=l=e([a,o])),l(t.shape.slice(0),t.data,t.stride,0|t.offset,n,i)})},781:function(t,e,r){"use strict";t.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=r(3349)},7790:function(){}},r={};function a(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(i.exports,i,i.exports,a),i.loaded=!0,i.exports}a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var o=a(1964);t.exports=o}()},33576:function(t,e,r){"use strict";function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=r(59968),l=r(35984),u="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function c(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return d(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!f.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|m(t,e),n=c(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(U(t,Uint8Array)){var e=new Uint8Array(t);return g(e.buffer,e.byteOffset,e.byteLength)}return v(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(t));if(U(t,ArrayBuffer)||t&&U(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(U(t,SharedArrayBuffer)||t&&U(t.buffer,SharedArrayBuffer)))return g(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);var i=function(t){if(f.isBuffer(t)){var e,r=0|y(t.length),n=c(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?c(0):v(t):"Buffer"===t.type&&Array.isArray(t.data)?v(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(t))}function p(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return p(t),c(t<0?0:0|y(t))}function v(t){for(var e=t.length<0?0:0|y(t.length),r=c(e),n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function m(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||U(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+o(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(t).length;default:if(i)return n?-1:B(t).length;e=(""+e).toLowerCase(),i=!0}}function x(t,e,r){var n,i,a=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=e;a2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(a=r=+r)!=a&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;o=2,s/=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;h239?4:a>223?3:a>191?2:1;if(i+s<=r){var l=void 0,u=void 0,c=void 0,f=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:(192&(l=t[i+1]))==128&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=t[i+1],u=t[i+2],(192&l)==128&&(192&u)==128&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],(192&l)==128&&(192&u)==128&&(192&c)==128&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nr)throw RangeError("Trying to access beyond buffer length")}function A(t,e,r,n,i,a){if(!f.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw RangeError("Index out of range")}function M(t,e,r,n,i){z(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,r}function S(t,e,r,n,i){z(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r+7]=a,a>>=8,t[r+6]=a,a>>=8,t[r+5]=a,a>>=8,t[r+4]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o>>=8,t[r+2]=o,o>>=8,t[r+1]=o,o>>=8,t[r]=o,r+8}function E(t,e,r,n,i,a){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function L(t,e,r,n,i){return e=+e,r>>>=0,i||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),l.write(t,e,r,n,23,4),r+4}function C(t,e,r,n,i){return e=+e,r>>>=0,i||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),l.write(t,e,r,n,52,8),r+8}e.Buffer=f,e.SlowBuffer=function(t){return+t!=t&&(t=0),f.alloc(+t)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=2147483647,f.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),f.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(t,e,r){return h(t,e,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(t,e,r){return(p(t),t<=0)?c(t):void 0!==e?"string"==typeof r?c(t).fill(e,r):c(t).fill(e):c(t)},f.allocUnsafe=function(t){return d(t)},f.allocUnsafeSlow=function(t){return d(t)},f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,e){if(U(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),U(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);in.length?(f.isBuffer(a)||(a=f.from(a)),a.copy(n,i)):Uint8Array.prototype.set.call(n,a,i);else if(f.isBuffer(a))a.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=a.length}return n},f.byteLength=m,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},u&&(f.prototype[u]=f.prototype.inspect),f.prototype.compare=function(t,e,r,n,i){if(U(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+o(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var a=i-n,s=r-e,l=Math.min(a,s),u=this.slice(n,i),c=t.slice(e,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,a,o,s,l,u,c,f,h=this.length-e;if((void 0===r||r>h)&&(r=h),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i,a=t.length-r;n?(n=Number(n))>a&&(n=a):n=a;var o=e.length;for(n>o/2&&(n=o/2),i=0;i>8,i.push(r%256),i.push(n);return i}(t,this.length-c),this,c,f);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},f.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t>>>=0,e||k(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||k(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=q(function(t){D(t>>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);var n=e+256*this[++t]+65536*this[++t]+16777216*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+16777216*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];(void 0===e||void 0===r)&&R(t,this.length-8);var n=16777216*e+65536*this[++t]+256*this[++t]+this[++t],i=16777216*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||k(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||k(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},f.prototype.readInt8=function(t,e){return(t>>>=0,e||k(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=q(function(t){D(t>>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<>>=0,"offset");var e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&R(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<>>=0,e||k(t,4,this.length),l.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||k(t,4,this.length),l.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||k(t,8,this.length),l.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||k(t,8,this.length),l.read(this,t,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;A(this,t,e,r,i,0)}var a=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;A(this,t,e,r,i,0)}var a=r-1,o=1;for(this[e+a]=255&t;--a>=0&&(o*=256);)this[e+a]=t/o&255;return e+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigUInt64LE=q(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return M(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=q(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigInt64LE=q(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return M(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=q(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return S(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return C(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return C(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i + * @license MIT + */function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,l),a=n(a=l),r=function(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return i(t)}(this,!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){return!1}}()?a.apply(this,void 0):Reflect.construct(a,s||[],n(this).constructor)),Object.defineProperty(i(r),"message",{value:e.apply(i(r),arguments),writable:!0,configurable:!0}),r.name="".concat(r.name," [").concat(t,"]"),r.stack,delete r.name,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(l,r),s=[{key:"code",get:function(){return t},set:function(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(t,"]: ").concat(this.message)}}],function(t,e){for(var r=0;r=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function z(t,e,r,n,i,a){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat((a+1)*8).concat(s):">= -(2".concat(s," ** ").concat((a+1)*8-1).concat(s,") and < 2 ** ")+"".concat((a+1)*8-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new P.ERR_OUT_OF_RANGE("value",o,t)}D(i,"offset"),(void 0===n[i]||void 0===n[i+a])&&R(i,n.length-(a+1))}function D(t,e){if("number"!=typeof t)throw new P.ERR_INVALID_ARG_TYPE(e,"number",t)}function R(t,e,r){if(Math.floor(t)!==t)throw D(t,r),new P.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new P.ERR_BUFFER_OUT_OF_BOUNDS;throw new P.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}O("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),O("ERR_INVALID_ARG_TYPE",function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(o(e))},TypeError),O("ERR_OUT_OF_RANGE",function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=I(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=I(i)),i+="n"),n+=" It must be ".concat(e,". Received ").concat(i)},RangeError);var F=/[^+/0-9A-Za-z-_]/g;function B(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319||o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function N(t){return s.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,r,n){var i;for(i=0;i=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function U(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var V=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function q(t){return"undefined"==typeof BigInt?H:t}function H(){throw Error("BigInt not supported")}},25928: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}},48932:function(t,e,r){"use strict";r.r(e),r.d(e,{sankeyCenter:function(){return h},sankeyCircular:function(){return M},sankeyJustify:function(){return f},sankeyLeft:function(){return u},sankeyRight:function(){return c}});var n=r(84706),i=r(34712),a=r(10132),o=r(6688),s=r.n(o);function l(t){return t.target.depth}function u(t){return t.depth}function c(t,e){return e-1-t.height}function f(t,e){return t.sourceLinks.length?t.depth:e-1}function h(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?(0,n.SY)(t.sourceLinks,l)-1:0}function p(t){return function(){return t}}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function v(t,e){return y(t.source,e.source)||t.index-e.index}function g(t,e){return y(t.target,e.target)||t.index-e.index}function y(t,e){return t.partOfCycle===e.partOfCycle?t.y0-e.y0:"top"===t.circularLinkType||"bottom"===e.circularLinkType?-1:1}function m(t){return t.value}function x(t){return(t.y0+t.y1)/2}function b(t){return x(t.source)}function _(t){return x(t.target)}function w(t){return t.index}function T(t){return t.nodes}function k(t){return t.links}function A(t,e){var r=t.get(e);if(!r)throw Error("missing: "+e);return r}function M(){var t,e,r=0,a=0,o=1,l=1,u=24,c=w,h=f,M=T,E=k,C=32,P=2,I=null;function z(){var f={nodes:M.apply(null,arguments),links:E.apply(null,arguments)};(function(t){t.nodes.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]});var e=(0,i.kH)(t.nodes,c);t.links.forEach(function(t,r){t.index=r;var n=t.source,i=t.target;(void 0===n?"undefined":d(n))!=="object"&&(n=t.source=A(e,n)),(void 0===i?"undefined":d(i))!=="object"&&(i=t.target=A(e,i)),n.sourceLinks.push(t),i.targetLinks.push(t)})})(f),function(t,e,r){var n=0;if(null===r){for(var i=[],a=0;ar.indexOf(t.target)&&!t.circular&&r.push(t.target)})});for(e=t.nodes,r=[],n=0;e.length;++n,e=r,r=[])e.forEach(function(t){t.height=n,t.targetLinks.forEach(function(t){0>r.indexOf(t.source)&&!t.circular&&r.push(t.source)})});t.nodes.forEach(function(t){t.column=Math.floor(h.call(null,t,n))})}(f),S(f,c),function(s,c,f){var h=(0,i.UJ)().key(function(t){return t.column}).sortKeys(n.XE).entries(s.nodes).map(function(t){return t.values});(function(i){if(e){var c,f,p,d,v,g,y,x,b,_,w,T,k=1/0;h.forEach(function(t){var r=l*e/(t.length+1);k=r0?c+25+10:c,bottom:f=f>0?f+25+10:f,left:d=d>0?d+25+10:d,right:p=p>0?p+25+10:p}),S=(g=(0,n.kv)(s.nodes,function(t){return t.column}),y=o-r,x=l-a,b=y+M.right+M.left,_=x+M.top+M.bottom,w=y/b,T=x/_,r=r*w+M.left,o=0==M.right?o:o*w,a=a*T+M.top,l*=T,s.nodes.forEach(function(t){t.x0=r+t.column*((o-r-u)/g),t.x1=t.x0+u}),T);A*=S,s.links.forEach(function(t){t.width=t.value*A}),h.forEach(function(t){var e=t.length;t.forEach(function(t,r){t.depth==h.length-1&&1==e?t.y0=l/2-t.value*A:0==t.depth&&1==e?t.y0=l/2-t.value*A:t.partOfCycle?0==L(t,i)?t.y0=l/2+r:"top"==t.circularLinkType?t.y0=a+r:t.y0=l-t.value*A-r:0==M.top||0==M.bottom?t.y0=(l-a)/e*r:t.y0=(l-a)/2-e/2+r,t.y1=t.y0+t.value*A})})})(f),v();for(var p=1,d=c;d>0;--d)(function(t,e){var r=h.length;h.forEach(function(i){var a=i.length,o=i[0].depth;i.forEach(function(i){var s;if(i.sourceLinks.length||i.targetLinks.length){if(i.partOfCycle&&L(i,e)>0);else if(0==o&&1==a)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else if(o==r-1&&1==a)s=i.y1-i.y0,i.y0=l/2-s/2,i.y1=l/2+s/2;else{var u=(0,n.mo)(i.sourceLinks,_),c=(0,n.mo)(i.targetLinks,b),f=((u&&c?(u+c)/2:u||c)-x(i))*t;i.y0+=f,i.y1+=f}}})})})(p*=.99,f),v();function v(){h.forEach(function(e){var r,n,i,o=a,s=e.length;for(e.sort(y),i=0;i0&&(r.y0+=n,r.y1+=n),o=r.y1+t;if((n=o-t-l)>0)for(o=r.y0-=n,r.y1-=n,i=s-2;i>=0;--i)(n=(r=e[i]).y1+t-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0})}}(f,C,c),D(f);for(var p=0;p<4;p++)q(f,l,c),H(f,l,c),function(t,e,r,n){t.links.forEach(function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)t.nodes.forEach(function(o){if(o.column==a){var u,c=s/(l+1),f=Math.pow(1-c,3),h=3*c*Math.pow(1-c,2),p=3*Math.pow(c,2)*(1-c),d=Math.pow(c,3),v=f*i.y0+h*i.y0+p*i.y1+d*i.y1,g=v-i.width/2,y=v+i.width/2;g>o.y0&&gt.y0&&i.y0t.y0&&i.y1t.y1?0:1)||V(t,u,e,r)}})):y>o.y0&&yo.y1&&V(t,u,e,r)})):go.y1&&(u=y-o.y0+10,o=V(o,u,e,r),t.nodes.forEach(function(t){n(t)!=n(o)&&t.column==o.column&&t.y0o.y1&&V(t,u,e,r)}))}})}})}(f,a,l,c),q(f,l,c),H(f,l,c);return function(t,e,r){var i=t.nodes,a=t.links,o=!1,s=!1;if(a.forEach(function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)}),!1==o||!1==s){var l=(0,n.SY)(i,function(t){return t.y0}),u=(r-e)/((0,n.kv)(i,function(t){return t.y1})-l);i.forEach(function(t){var e=(t.y1-t.y0)*u;t.y0=(t.y0-l)*u,t.y1=t.y0+e}),a.forEach(function(t){t.y0=(t.y0-l)*u,t.y1=(t.y1-l)*u,t.width=t.width*u})}}(f,a,l),O(f,P,l,c),f}function D(t){t.nodes.forEach(function(t){t.sourceLinks.sort(g),t.targetLinks.sort(v)}),t.nodes.forEach(function(t){var e=t.y0,r=e,n=t.y1,i=n;t.sourceLinks.forEach(function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)}),t.targetLinks.forEach(function(t){t.circular?(t.y1=i-t.width/2,i-=t.width):(t.y1=r+t.width/2,r+=t.width)})})}return z.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:p(t),z):c},z.nodeAlign=function(t){return arguments.length?(h="function"==typeof t?t:p(t),z):h},z.nodeWidth=function(t){return arguments.length?(u=+t,z):u},z.nodePadding=function(e){return arguments.length?(t=+e,z):t},z.nodes=function(t){return arguments.length?(M="function"==typeof t?t:p(t),z):M},z.links=function(t){return arguments.length?(E="function"==typeof t?t:p(t),z):E},z.size=function(t){return arguments.length?(r=a=0,o=+t[0],l=+t[1],z):[o-r,l-a]},z.extent=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],a=+t[0][1],l=+t[1][1],z):[[r,a],[o,l]]},z.iterations=function(t){return arguments.length?(C=+t,z):C},z.circularLinkGap=function(t){return arguments.length?(P=+t,z):P},z.nodePaddingRatio=function(t){return arguments.length?(e=+t,z):e},z.sortNodes=function(t){return arguments.length?(I=t,z):I},z.update=function(t){return S(t,c),D(t),t.links.forEach(function(t){t.circular&&(t.circularLinkType=t.y0+t.y11)&&!(i>1)}function P(t,e,r){return t.sort(I),t.forEach(function(n,i){var a=0;if(W(n,r)&&C(n))n.circularPathData.verticalBuffer=a+n.width/2;else{for(var o,s,l=0;ls.source.column)){var u=t[l].circularPathData.verticalBuffer+t[l].width/2+e;a=u>a?u:a}n.circularPathData.verticalBuffer=a+n.width/2}}),t}function O(t,e,r,i){var o=(0,n.SY)(t.links,function(t){return t.source.y0});t.links.forEach(function(t){t.circular&&(t.circularPathData={})}),P(t.links.filter(function(t){return"top"==t.circularLinkType}),e,i),P(t.links.filter(function(t){return"bottom"==t.circularLinkType}),e,i),t.links.forEach(function(n){if(n.circular){if(n.circularPathData.arcRadius=n.width+10,n.circularPathData.leftNodeBuffer=5,n.circularPathData.rightNodeBuffer=5,n.circularPathData.sourceWidth=n.source.x1-n.source.x0,n.circularPathData.sourceX=n.source.x0+n.circularPathData.sourceWidth,n.circularPathData.targetX=n.target.x0,n.circularPathData.sourceY=n.y0,n.circularPathData.targetY=n.y1,W(n,i)&&C(n))n.circularPathData.leftSmallArcRadius=10+n.width/2,n.circularPathData.leftLargeArcRadius=10+n.width/2,n.circularPathData.rightSmallArcRadius=10+n.width/2,n.circularPathData.rightLargeArcRadius=10+n.width/2,"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=n.source.y1+25+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=n.source.y0-25-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius);else{var s=n.source.column,l=n.circularLinkType,u=t.links.filter(function(t){return t.source.column==s&&t.circularLinkType==l});"bottom"==n.circularLinkType?u.sort(D):u.sort(z);var c=0;u.forEach(function(t,r){t.circularLinkID==n.circularLinkID&&(n.circularPathData.leftSmallArcRadius=10+n.width/2+c,n.circularPathData.leftLargeArcRadius=10+n.width/2+r*e+c),c+=t.width}),s=n.target.column,u=t.links.filter(function(t){return t.target.column==s&&t.circularLinkType==l}),"bottom"==n.circularLinkType?u.sort(F):u.sort(R),c=0,u.forEach(function(t,r){t.circularLinkID==n.circularLinkID&&(n.circularPathData.rightSmallArcRadius=10+n.width/2+c,n.circularPathData.rightLargeArcRadius=10+n.width/2+r*e+c),c+=t.width}),"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=Math.max(r,n.source.y1,n.target.y1)+25+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=o-25-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius)}n.circularPathData.leftInnerExtent=n.circularPathData.sourceX+n.circularPathData.leftNodeBuffer,n.circularPathData.rightInnerExtent=n.circularPathData.targetX-n.circularPathData.rightNodeBuffer,n.circularPathData.leftFullExtent=n.circularPathData.sourceX+n.circularPathData.leftLargeArcRadius+n.circularPathData.leftNodeBuffer,n.circularPathData.rightFullExtent=n.circularPathData.targetX-n.circularPathData.rightLargeArcRadius-n.circularPathData.rightNodeBuffer}if(n.circular)n.path="top"==n.circularLinkType?"M"+n.circularPathData.sourceX+" "+n.circularPathData.sourceY+" L"+n.circularPathData.leftInnerExtent+" "+n.circularPathData.sourceY+" A"+n.circularPathData.leftLargeArcRadius+" "+n.circularPathData.leftSmallArcRadius+" 0 0 0 "+n.circularPathData.leftFullExtent+" "+(n.circularPathData.sourceY-n.circularPathData.leftSmallArcRadius)+" L"+n.circularPathData.leftFullExtent+" "+n.circularPathData.verticalLeftInnerExtent+" A"+n.circularPathData.leftLargeArcRadius+" "+n.circularPathData.leftLargeArcRadius+" 0 0 0 "+n.circularPathData.leftInnerExtent+" "+n.circularPathData.verticalFullExtent+" L"+n.circularPathData.rightInnerExtent+" "+n.circularPathData.verticalFullExtent+" A"+n.circularPathData.rightLargeArcRadius+" "+n.circularPathData.rightLargeArcRadius+" 0 0 0 "+n.circularPathData.rightFullExtent+" "+n.circularPathData.verticalRightInnerExtent+" L"+n.circularPathData.rightFullExtent+" "+(n.circularPathData.targetY-n.circularPathData.rightSmallArcRadius)+" A"+n.circularPathData.rightLargeArcRadius+" "+n.circularPathData.rightSmallArcRadius+" 0 0 0 "+n.circularPathData.rightInnerExtent+" "+n.circularPathData.targetY+" L"+n.circularPathData.targetX+" "+n.circularPathData.targetY:"M"+n.circularPathData.sourceX+" "+n.circularPathData.sourceY+" L"+n.circularPathData.leftInnerExtent+" "+n.circularPathData.sourceY+" A"+n.circularPathData.leftLargeArcRadius+" "+n.circularPathData.leftSmallArcRadius+" 0 0 1 "+n.circularPathData.leftFullExtent+" "+(n.circularPathData.sourceY+n.circularPathData.leftSmallArcRadius)+" L"+n.circularPathData.leftFullExtent+" "+n.circularPathData.verticalLeftInnerExtent+" A"+n.circularPathData.leftLargeArcRadius+" "+n.circularPathData.leftLargeArcRadius+" 0 0 1 "+n.circularPathData.leftInnerExtent+" "+n.circularPathData.verticalFullExtent+" L"+n.circularPathData.rightInnerExtent+" "+n.circularPathData.verticalFullExtent+" A"+n.circularPathData.rightLargeArcRadius+" "+n.circularPathData.rightLargeArcRadius+" 0 0 1 "+n.circularPathData.rightFullExtent+" "+n.circularPathData.verticalRightInnerExtent+" L"+n.circularPathData.rightFullExtent+" "+(n.circularPathData.targetY+n.circularPathData.rightSmallArcRadius)+" A"+n.circularPathData.rightLargeArcRadius+" "+n.circularPathData.rightSmallArcRadius+" 0 0 1 "+n.circularPathData.rightInnerExtent+" "+n.circularPathData.targetY+" L"+n.circularPathData.targetX+" "+n.circularPathData.targetY;else{var f=(0,a.ak)().source(function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]}).target(function(t){return[t.target.x0,t.y1]});n.path=f(n)}})}function I(t,e){return B(t)==B(e)?"bottom"==t.circularLinkType?D(t,e):z(t,e):B(e)-B(t)}function z(t,e){return t.y0-e.y0}function D(t,e){return e.y0-t.y0}function R(t,e){return t.y1-e.y1}function F(t,e){return e.y1-t.y1}function B(t){return t.target.column-t.source.column}function N(t){return t.target.x0-t.source.x1}function j(t,e){var r=E(t),n=N(e)/Math.tan(r);return"up"==G(t)?t.y1+n:t.y1-n}function U(t,e){var r=E(t),n=N(e)/Math.tan(r);return"up"==G(t)?t.y1-n:t.y1+n}function V(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach(function(t){t.y1=t.y1+e}),t.sourceLinks.forEach(function(t){t.y0=t.y0+e})),t}function q(t,e,r,n){t.nodes.forEach(function(i){n&&i.y+(i.y1-i.y0)>e&&(i.y=i.y-(i.y+(i.y1-i.y0)-e));var a=t.links.filter(function(t){return r(t.source)==r(i)}),o=a.length;o>1&&a.sort(function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column||G(t)!=G(e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=U(e,t);return t.y1-r}if(e.target.column>t.target.column)return U(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType!==e.circularLinkType||"bottom"!=t.circularLinkType?"top"==t.circularLinkType?-1:1:t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:void 0});var s=i.y0;a.forEach(function(t){t.y0=s+t.width/2,s+=t.width}),a.forEach(function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort(function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column||G(t)!=G(e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function W(t,e){return e(t.source)==e(t.target)}},26800:function(t,e,r){"use strict";r.r(e),r.d(e,{sankey:function(){return w},sankeyCenter:function(){return u},sankeyJustify:function(){return l},sankeyLeft:function(){return o},sankeyLinkHorizontal:function(){return M},sankeyRight:function(){return s}});var n=r(84706),i=r(34712);function a(t){return t.target.depth}function o(t){return t.depth}function s(t,e){return e-1-t.height}function l(t,e){return t.sourceLinks.length?t.depth:e-1}function u(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?(0,n.SY)(t.sourceLinks,a)-1:0}function c(t){return function(){return t}}function f(t,e){return p(t.source,e.source)||t.index-e.index}function h(t,e){return p(t.target,e.target)||t.index-e.index}function p(t,e){return t.y0-e.y0}function d(t){return t.value}function v(t){return(t.y0+t.y1)/2}function g(t){return v(t.source)*t.value}function y(t){return v(t.target)*t.value}function m(t){return t.index}function x(t){return t.nodes}function b(t){return t.links}function _(t,e){var r=t.get(e);if(!r)throw Error("missing: "+e);return r}function w(){var t=0,e=0,r=1,a=1,o=24,s=8,u=m,w=l,T=x,k=b,A=32,M=2/3;function S(){var l={nodes:T.apply(null,arguments),links:k.apply(null,arguments)};return function(t){t.nodes.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]});var e=(0,i.kH)(t.nodes,u);t.links.forEach(function(t,r){t.index=r;var n=t.source,i=t.target;"object"!=typeof n&&(n=t.source=_(e,n)),"object"!=typeof i&&(i=t.target=_(e,i)),n.sourceLinks.push(t),i.targetLinks.push(t)})}(l),function(t){t.nodes.forEach(function(t){t.value=Math.max((0,n.oh)(t.sourceLinks,d),(0,n.oh)(t.targetLinks,d))})}(l),function(e){for(n=e.nodes,i=[],a=0;n.length;++a,n=i,i=[])n.forEach(function(t){t.depth=a,t.sourceLinks.forEach(function(t){0>i.indexOf(t.target)&&i.push(t.target)})});for(n=e.nodes,i=[],a=0;n.length;++a,n=i,i=[])n.forEach(function(t){t.height=a,t.targetLinks.forEach(function(t){0>i.indexOf(t.source)&&i.push(t.source)})});var n,i,a,s=(r-t-o)/(a-1);e.nodes.forEach(function(e){e.x1=(e.x0=t+Math.max(0,Math.min(a-1,Math.floor(w.call(null,e,a))))*s)+o})}(l),function(t){var r,o,l,u=(0,i.UJ)().key(function(t){return t.x0}).sortKeys(n.XE).entries(t.nodes).map(function(t){return t.values});r=(0,n.kv)(u,function(t){return t.length}),s>(o=M*(a-e)/(r-1))&&(s=o),l=(0,n.SY)(u,function(t){return(a-e-(t.length-1)*s)/(0,n.oh)(t,d)}),u.forEach(function(t){t.forEach(function(t,e){t.y1=(t.y0=e)+t.value*l})}),t.links.forEach(function(t){t.width=t.value*l}),h();for(var c=1,f=A;f>0;--f)(function(t){u.slice().reverse().forEach(function(e){e.forEach(function(e){if(e.sourceLinks.length){var r=((0,n.oh)(e.sourceLinks,y)/(0,n.oh)(e.sourceLinks,d)-v(e))*t;e.y0+=r,e.y1+=r}})})})(c*=.99),h(),function(t){u.forEach(function(e){e.forEach(function(e){if(e.targetLinks.length){var r=((0,n.oh)(e.targetLinks,g)/(0,n.oh)(e.targetLinks,d)-v(e))*t;e.y0+=r,e.y1+=r}})})}(c),h();function h(){u.forEach(function(t){var r,n,i,o=e,l=t.length;for(t.sort(p),i=0;i0&&(r.y0+=n,r.y1+=n),o=r.y1+s;if((n=o-s-a)>0)for(o=r.y0-=n,r.y1-=n,i=l-2;i>=0;--i)(n=(r=t[i]).y1+s-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0})}}(l,A),E(l),l}function E(t){t.nodes.forEach(function(t){t.sourceLinks.sort(h),t.targetLinks.sort(f)}),t.nodes.forEach(function(t){var e=t.y0,r=e;t.sourceLinks.forEach(function(t){t.y0=e+t.width/2,e+=t.width}),t.targetLinks.forEach(function(t){t.y1=r+t.width/2,r+=t.width})})}return S.update=function(t){return E(t),t},S.nodeId=function(t){return arguments.length?(u="function"==typeof t?t:c(t),S):u},S.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:c(t),S):w},S.nodeWidth=function(t){return arguments.length?(o=+t,S):o},S.nodePadding=function(t){return arguments.length?(s=+t,S):s},S.nodes=function(t){return arguments.length?(T="function"==typeof t?t:c(t),S):T},S.links=function(t){return arguments.length?(k="function"==typeof t?t:c(t),S):k},S.size=function(n){return arguments.length?(t=e=0,r=+n[0],a=+n[1],S):[r-t,a-e]},S.extent=function(n){return arguments.length?(t=+n[0][0],r=+n[1][0],e=+n[0][1],a=+n[1][1],S):[[t,e],[r,a]]},S.iterations=function(t){return arguments.length?(A=+t,S):A},S}var T=r(10132);function k(t){return[t.source.x1,t.y0]}function A(t){return[t.target.x0,t.y1]}function M(){return(0,T.ak)().source(k).target(A)}},33428: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=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 f=this.Element.prototype,h=f.setAttribute,p=f.setAttributeNS,d=this.CSSStyleDeclaration.prototype,v=d.setProperty;f.setAttribute=function(t,e){h.call(this,t,e+"")},f.setAttributeNS=function(t,e,r){p.call(this,t,e,r+"")},d.setProperty=function(t,e,r){v.call(this,t,e+"",r)}}function g(t,e){return te?1:t>=e?0:NaN}function y(t){return null===t?NaN:+t}function m(t){return!isNaN(t)}function x(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;0>t(e[a],r)?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>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}a.ascending=g,a.descending=function(t,e){return et?1:e>=t?0:NaN},a.min=function(t,e){var r,n,i=-1,a=t.length;if(1==arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},a.max=function(t,e){var r,n,i=-1,a=t.length;if(1==arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},a.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1==arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},a.deviation=function(){var t=a.variance.apply(this,arguments);return t?Math.sqrt(t):t};var b=x(g);function _(t){return t.length}a.bisectLeft=b.left,a.bisect=a.bisectRight=b.right,a.bisector=function(t){return x(1===t.length?function(e,r){return g(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=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=Array(r<0?0:r);e=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)}function A(t){return"__proto__"==(t+="")||"\0"===t[0]?"\0"+t:t}function M(t){return"\0"===(t+="")[0]?t.slice(1):t}function S(t){return A(t) in this._}function E(t){return(t=A(t))in this._&&delete this._[t]}function L(){var t=[];for(var e in this._)t.push(M(e));return t}function C(){var t=0;for(var e in this._)++t;return t}function P(){for(var t in this._)return!1;return!0}function O(){this._=Object.create(null)}function I(t){return t}function z(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=D.length;re;)i.push(n/a);else for(;(n=t+r*++o)=n.length)return e?e.call(r,a):t?a.sort(t):a;for(var l,u,c,f,h=-1,p=a.length,d=n[s++],v=new k;++h=n.length)return e;var a=[],o=i[r++];return e.forEach(function(e,n){a.push({key:e,values:t(n,r)})}),o?a.sort(function(t,e){return o(t.key,e.key)}):a}(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 O;if(t)for(var r=0,n=t.length;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(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function H(t){return q(t,X),t}var G=function(t,e){return e.querySelector(t)},W=function(t,e){return e.querySelectorAll(t)},Y=function(t,e){var r=t.matches||t[z(t,"matchesSelector")];return(Y=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(G=function(t,e){return Sizzle(t,e)[0]||null},W=Sizzle,Y=Sizzle.matchesSelector),a.selection=function(){return a.select(l.documentElement)};var X=a.selection.prototype=[];function Z(t){return"function"==typeof t?t:function(){return G(t,this)}}function K(t){return"function"==typeof t?t:function(){return W(t,this)}}X.select=function(t){var e,r,n,i,a=[];t=Z(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),$.hasOwnProperty(r)?{space:$[r],local:t}:t}},X.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(Q(e,t[e]));return this}return this.each(Q(t,e))},X.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=tr(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},X.sort=function(t){t=tf.apply(this,arguments);for(var e=-1,r=this.length;++e0&&(t=t.slice(0,i));var l=tg.get(t);function u(){var e=this[n];e&&(this.removeEventListener(t,e,e.$),delete this[n])}return l&&(t=l,o=tm),i?e?function(){var i=o(e,s(arguments));u.call(this),this.addEventListener(t,this[n]=i,i.$=r),i._=e}:u:e?R:function(){var e,r=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=tp,a.selection.enter.prototype=td,td.append=X.append,td.empty=X.empty,td.node=X.node,td.call=X.call,td.size=X.size,td.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s=n&&(n=e+1);!(o=s[n])&&++n1?tL:t<-1?-tL:Math.asin(t)}function tI(t){return((t=Math.exp(t))+1/t)/2}var tz=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,f=l-a,h=c*c+f*f;if(h0&&(t=t.transition().duration(v)),t.call(w.event)}function S(){s&&s.domain(o.range().map(function(t){return(t-h.x)/h.k}).map(o.invert)),f&&f.domain(u.range().map(function(t){return(t-h.y)/h.k}).map(u.invert))}function E(t){g++||t({type:"zoomstart"})}function L(t){S(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function C(t){--g||(t({type:"zoomend"}),e=null)}function P(){var t=this,e=_.of(t,arguments),r=0,n=a.select(c(t)).on(m,function(){r=1,A(a.mouse(t),i),L(e)}).on(x,function(){n.on(m,null).on(x,null),o(r),C(e)}),i=T(a.mouse(t)),o=t_(t);nX.call(t),E(e)}function O(){var t,e=this,r=_.of(e,arguments),n={},o=0,s=".zoom-"+a.event.changedTouches[0].identifier,l="touchmove"+s,u="touchend"+s,c=[],f=a.select(e),p=t_(e);function d(){var r=a.touches(e);return t=h.k,r.forEach(function(t){t.identifier in n&&(n[t.identifier]=T(t))}),r}function v(){var t=a.event.target;a.select(t).on(l,g).on(u,m),c.push(t);for(var r=a.event.changedTouches,s=0,f=r.length;s1){var y=p[0],x=p[1],b=y[0]-x[0],_=y[1]-x[1];o=b*b+_*_}}function g(){var s,l,u,c,f=a.touches(e);nX.call(e);for(var h=0,p=f.length;h360?e-=360:e<0&&(e+=360),e<60)?n+(i-n)*e/60:e<180?i:e<240?n+(i-n)*(240-e)/60:n))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,i=(r=r<0?0:r>1?1:r)<=.5?r*(1+e):r+e-r*e,n=2*r-i,new tQ(a(t+120),a(t),a(t-120))}function tV(t,e,r){return this instanceof tV?void(this.h=+t,this.c=+e,this.l=+r):arguments.length<2?t instanceof tV?new tV(t.h,t.c,t.l):t instanceof tG?tZ(t.l,t.a,t.b):tZ((t=t6((t=a.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new tV(t,e,r)}tj.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new tN(this.h,this.s,this.l/t)},tj.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new tN(this.h,this.s,t*this.l)},tj.rgb=function(){return tU(this.h,this.s,this.l)},a.hcl=tV;var tq=tV.prototype=new tB;function tH(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new tG(r,Math.cos(t*=tC)*e,Math.sin(t)*e)}function tG(t,e,r){return this instanceof tG?void(this.l=+t,this.a=+e,this.b=+r):arguments.length<2?t instanceof tG?new tG(t.l,t.a,t.b):t instanceof tV?tH(t.h,t.c,t.l):t6((t=tQ(t)).r,t.g,t.b):new tG(t,e,r)}tq.brighter=function(t){return new tV(this.h,this.c,Math.min(100,this.l+tW*(arguments.length?t:1)))},tq.darker=function(t){return new tV(this.h,this.c,Math.max(0,this.l-tW*(arguments.length?t:1)))},tq.rgb=function(){return tH(this.h,this.c,this.l).rgb()},a.lab=tG;var tW=18,tY=tG.prototype=new tB;function tX(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new tQ(t$(3.2404542*(i=.95047*tK(i))-1.5371385*(n=1*tK(n))-.4985314*(a=1.08883*tK(a))),t$(-.969266*i+1.8760108*n+.041556*a),t$(.0556434*i-.2040259*n+1.0572252*a))}function tZ(t,e,r){return t>0?new tV(Math.atan2(r,e)*tP,Math.sqrt(e*e+r*r),t):new tV(NaN,NaN,t)}function tK(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function tJ(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function t$(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function tQ(t,e,r){return this instanceof tQ?void(this.r=~~t,this.g=~~e,this.b=~~r):arguments.length<2?t instanceof tQ?new tQ(t.r,t.g,t.b):t4(""+t,tQ,tU):new tQ(t,e,r)}function t0(t){return new tQ(t>>16,t>>8&255,255&t)}function t1(t){return t0(t)+""}tY.brighter=function(t){return new tG(Math.min(100,this.l+tW*(arguments.length?t:1)),this.a,this.b)},tY.darker=function(t){return new tG(Math.max(0,this.l-tW*(arguments.length?t:1)),this.a,this.b)},tY.rgb=function(){return tX(this.l,this.a,this.b)},a.rgb=tQ;var t2=tQ.prototype=new tB;function t3(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function t4(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(t7(i[0]),t7(i[1]),t7(i[2]))}return(a=t9.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=(o=(3840&a)>>4)>>4|o,s=(s=240&a)>>4|s,l=(l=15&a)<<4|l):7!==t.length||(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function t5(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+(e0&&l<1?0:n),new tN(n,i,l)}function t6(t,e,r){var n=tJ((.4124564*(t=t8(t))+.3575761*(e=t8(e))+.1804375*(r=t8(r)))/.95047),i=tJ((.2126729*t+.7151522*e+.072175*r)/1);return tG(116*i-16,500*(n-i),200*(i-tJ((.0193339*t+.119192*e+.9503041*r)/1.08883)))}function t8(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function t7(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}t2.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b;return e||r||n?(e&&e<30&&(e=30),r&&r<30&&(r=30),n&&n<30&&(n=30),new tQ(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new tQ(30,30,30)},t2.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new tQ(t*this.r,t*this.g,t*this.b)},t2.hsl=function(){return t5(this.r,this.g,this.b)},t2.toString=function(){return"#"+t3(this.r)+t3(this.g)+t3(this.b)};var t9=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 et(t){return"function"==typeof t?t:function(){return t}}function ee(t){return function(e,r,n){return 2==arguments.length&&"function"==typeof r&&(n=r,r=null),er(e,r,t,n)}}function er(t,e,r,n){var i={},o=a.dispatch("beforesend","progress","load","error"),l={},u=new XMLHttpRequest,c=null;function f(){var t,e,n,a=u.status;if(!a&&((e=(t=u).responseType)&&"text"!==e?t.response:t.responseText)||a>=200&&a<300||304===a){try{n=r.call(i,u)}catch(t){o.error.call(i,t);return}o.load.call(i,n)}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=f:u.onreadystatechange=function(){u.readyState>3&&f()},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(1===n.length?function(t,e){n(null==t?e:null)}:n)}t9.forEach(function(t,e){t9.set(t,t0(e))}),a.functor=et,a.xhr=ee(I),a.dsv=function(t,e){var r=RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=er(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=l)return o;if(i)return i=!1,a;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(eo),eo=setTimeout(eu,e)),ea=0):(ea=1,es(eu))}function ec(){for(var t=Date.now(),e=en;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function ef(){for(var t,e=en,r=1/0;e;)e.c?(e.t1&&0>=(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]));)--o;a[o++]=s}return a.slice(0,o)}function ev(t,e){return t[0]-e[0]||t[1]-e[1]}a.timer=function(){el.apply(this,arguments)},a.timer.flush=function(){ec(),ef()},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=eh,r=ep;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=et(e),a=et(r),o=t.length,s=[],l=[];for(n=0;n=0;--n)p.push(t[s[u[n]][2]]);for(n=+f;n=-tA)){var p=l*l+u*u,d=c*c+f*f,v=(f*p-u*d)/h,g=(l*d-c*p)/h,f=g+s,y=eM.pop()||new eI;y.arc=t,y.site=i,y.x=v+o,y.y=f+Math.sqrt(v*v+g*g),y.cy=f,t.circle=y;for(var m=null,x=ek._;x;)if(y.y1e-6)s=s.L;else if((i=a-function(t,e){var r=t.N;if(r)return eC(r,e);var n=t.site;return n.y===e?n.x:1/0}(s,o))>1e-6){if(!s.R){e=s;break}s=s.R}else{n>-.000001?(e=s.P,r=s):i>-.000001?(e=s,r=s.N):e=r=s;break}var l=eE(t);if(ew.insert(e,l),e||r){if(e===r){eD(e),r=eE(e.site),ew.insert(l,r),l.edge=r.edge=eF(e.site,l.site),ez(e),ez(r);return}if(!r){l.edge=eF(e.site,l.site);return}eD(e),eD(r);var u=e.site,c=u.x,f=u.y,h=t.x-c,p=t.y-f,d=r.site,v=d.x-c,g=d.y-f,y=2*(h*g-p*v),m=h*h+p*p,x=v*v+g*g,b={x:(g*m-p*x)/y+c,y:(h*x-v*m)/y+f};eB(r.edge,u,d,b),l.edge=eF(u,t,null,b),r.edge=eF(t,d,null,b),ez(e),ez(r)}}(a),r=a.x,n=a.y),a=t.pop();else if(i)!function(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];eL(t);for(var l=a;l.circle&&1e-6>w(r-l.circle.x)&&1e-6>w(n-l.circle.cy);)a=l.P,s.unshift(l),eL(l),l=a;s.unshift(l),eD(l);for(var u=o;u.circle&&1e-6>w(r-u.circle.x)&&1e-6>w(n-u.circle.cy);)o=u.N,s.push(u),eL(u),u=o;s.push(u),eD(u);var c,f=s.length;for(c=1;c0)){if(a/=d,d<0){if(a0){if(a>p)return;a>h&&(h=a)}if(a=n-l,d||!(a<0)){if(a/=d,d<0){if(a>p)return;a>h&&(h=a)}else if(d>0){if(a0)){if(a/=v,v<0){if(a0){if(a>p)return;a>h&&(h=a)}if(a=i-u,v||!(a<0)){if(a/=v,v<0){if(a>p)return;a>h&&(h=a)}else if(v>0){if(a0&&(t.a={x:l+h*d,y:u+h*v}),p<1&&(t.b={x:l+p*d,y:u+p*v}),t}}}}}),l=o.length;l--;)(!function(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,f=t.r,h=c.x,p=c.y,d=f.x,v=f.y,g=(h+d)/2;if(v===p){if(g=s)return;if(h>d){if(a){if(a.y>=u)return}else a={x:g,y:l};r={x:g,y:u}}else{if(a){if(a.y1){if(h>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=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xw(a.a.x-a.b.x)&&1e-6>w(a.a.y-a.b.y))&&(a.a=a.b=null,o.splice(l,1))}(e),function(t){for(var e,r,n,i,a,o,s,l,u,c,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],v=e_,g=v.length;g--;)if((a=v[g])&&a.prepare())for(l=(s=a.edges).length,o=0;o1e-6||w(i-r)>1e-6)&&(s.splice(o,0,new eN(function(t,e,r){var n=new eR(t,null);return n.a=e,n.b=r,eb.push(n),n}(a.site,c,1e-6>w(n-f)&&d-i>1e-6?{x:f,y:1e-6>w(e-f)?r:d}:1e-6>w(i-d)&&h-n>1e-6?{x:1e-6>w(r-d)?e:h,y:d}:1e-6>w(n-h)&&i-p>1e-6?{x:h,y:1e-6>w(e-h)?r:p}:1e-6>w(i-p)&&n-f>1e-6?{x:1e-6>w(r-p)?e:f,y:p}:null),a.site,null)),++l)}(e));var o={cells:e_,edges:eb};return ew=ek=eb=e_=null,o}function eW(t,e){return e.y-t.y||e.x-t.x}eP.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(eO),e.length},eN.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}},ej.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=eH(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;)n=r.U,r===n.L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(eV(this,r),r=(t=r).U),r.C=!1,n.C=!0,eq(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(eq(this,r),r=(t=r).U),r.C=!1,n.C=!0,eV(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?eH(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;return}do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,eV(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,eq(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,eV(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,eq(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,eV(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,eq(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=eh,r=ep,n=e,i=r,a=eY;if(t)return o(t);function o(t){var e=Array(t.length),r=a[0][0],n=a[0][1],i=a[1][0],o=a[1][1];return eG(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:1e-6*Math.round(n(t,e)/1e-6),y:1e-6*Math.round(i(t,e)/1e-6),i:e}})}return o.links=function(t){return eG(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 eG(s(t)).cells.forEach(function(r,n){for(var i,a,o=r.site,s=r.edges.sort(eO),l=-1,u=s.length,c=s[u-1].edge,f=c.l===o?c.r:c.l;++l(i=f,(o.x-i.x)*(a.y-o.y)-(o.x-a.x)*(i.y-o.y))&&e.push([t[n],t[a.i],t[f.i]])}),e},o.x=function(t){return arguments.length?(n=et(e=t),o):e},o.y=function(t){return arguments.length?(i=et(r=t),o):r},o.clipExtent=function(t){return arguments.length?(a=null==t?eY:t,o):a===eY?null:a},o.size=function(t){return arguments.length?o.clipExtent(t&&[[0,0],t]):a===eY?null:a&&a[1]},o};var eY=[[-1e6,-1e6],[1e6,1e6]];function eX(t){return t.x}function eZ(t){return t.y}function eK(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function eJ(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"#"+t3(Math.round(r+o*t))+t3(Math.round(n+s*t))+t3(Math.round(i+l*t))}}function e$(t,e){var r,n={},i={};for(r in t)r in e?n[r]=e3(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 eQ(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function e0(t,e){var r,n,i,a=e1.lastIndex=e2.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(r=e1.exec(t))&&(n=e2.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:eQ(r,n)})),a=e2.lastIndex;return av&&(v=l.x),l.y>g&&(g=l.y),u.push(l.x),c.push(l.y);else for(f=0;fv&&(v=x),b>g&&(g=b),u.push(x),c.push(b)}var _=v-p,T=g-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)A(t,e,r,n,i,a,o,s);else{var c=t.point;t.x=t.y=t.point=null,A(t,c,l,u,i,a,o,s),A(t,e,r,n,i,a,o,s)}}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}}function A(t,e,r,n,i,a,o,s){var l=(i+o)*.5,u=(a+s)*.5,c=r>=l,f=n>=u,h=f<<1|c;t.leaf=!1,t=t.nodes[h]||(t.nodes[h]=eK()),c?i=l:o=l,f?a=u:s=u,k(t,e,r,n,i,a,o,s)}_>T?g=d+_:v=p+T;var M=eK();if(M.add=function(t){k(M,t,+y(t,++f),+m(t,f),p,d,v,g)},M.visit=function(t){(function t(e,r,n,i,a,o){if(!e(r,n,i,a,o)){var s=(n+a)*.5,l=(i+o)*.5,u=r.nodes;u[0]&&t(e,u[0],n,i,s,l),u[1]&&t(e,u[1],s,i,a,l),u[2]&&t(e,u[2],n,l,s,o),u[3]&&t(e,u[3],s,l,a,o)}})(t,M,p,d,v,g)},M.find=function(t){var e,r,n,i,a,o,s,l;return e=t[0],r=t[1],l=1/0,function t(u,c,f,h,p){if(!(c>a)&&!(f>o)&&!(h=b,T=r>=_,k=T<<1|w,A=k+4;k=0&&!(r=a.interpolators[n](t,e)););return r}function e4(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function rn(t){return 1-Math.cos(t*tL)}function ri(t){return Math.pow(2,10*(t-1))}function ra(t){return 1-Math.sqrt(1-t*t)}function ro(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 rs(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function rl(t){var e,r=[t.a,t.b],n=[t.c,t.d],i=rc(r),a=ru(r,n),o=rc((e=-a,n[0]+=e*r[0],n[1]+=e*r[1],n))||0;r[0]*n[1]=0?t.slice(0,r):t,i=r>=0?t.slice(r+1):"in";return n=e6.get(n)||e5,e=(i=e8.get(i)||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 tH(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 tU(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 tX(r+o*t,n+s*t,i+l*t)+""}},a.interpolateRound=rs,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 rl(r?r.matrix:rf)})(t)},rl.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rf={a:1,b:0,c:0,d:1,e:0,f:0};function rh(t){return t.length?t.pop()+",":""}function rp(t,e){var r,n,i,o,s=[],l=[];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:eQ(t[0],e[0])},{i:i-2,x:eQ(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(t.translate,e.translate,s,l),(r=t.rotate)!==(n=e.rotate)?(r-n>180?n+=360:n-r>180&&(r+=360),l.push({i:s.push(rh(s)+"rotate(",null,")")-2,x:eQ(r,n)})):n&&s.push(rh(s)+"rotate("+n+")"),(i=t.skew)!==(o=e.skew)?l.push({i:s.push(rh(s)+"skewX(",null,")")-2,x:eQ(i,o)}):o&&s.push(rh(s)+"skewX("+o+")"),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(rh(r)+"scale(",null,",",null,")");n.push({i:i-4,x:eQ(t[0],e[0])},{i:i-2,x:eQ(t[1],e[1])})}else(1!==e[0]||1!==e[1])&&r.push(rh(r)+"scale("+e+")")}(t.scale,e.scale,s,l),t=e=null,function(t){for(var e,r=-1,n=l.length;++r0?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=el(s.tick)),s):r},s.start=function(){var t,e,r,a=y.length,l=m.length,c=u[0],d=u[1];for(t=0;t=0;)i.push(n[r])}function rM(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=0;)u.push(s=o[a]),s.parent=l,s.depth=l.depth+1;r&&(l.value=0),l.children=o}else r&&(l.value=+r.call(n,l,l.depth)||0),delete l.children;return rM(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),c}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&&(rA(t,function(t){t.children&&(t.value=0)}),rM(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(r,n){var i=t.call(this,r,n);return function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=e.value?n/e.value:0;++us&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=e);return n}function rj(t){return t.reduce(rU,0)}function rU(t,e){return t+e[1]}function rV(t,e){return rq(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function rq(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 rH(t){return[a.min(t),a.max(t)]}function rG(t,e){return t.value-e.value}function rW(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function rY(t,e){t._pack_next=e,e._pack_prev=t}function rX(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 rZ(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,u=1/0,c=-1/0,f=1/0,h=-1/0;if(e.forEach(rK),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(r$(r,n,i=e[2]),x(i),rW(r,i),r._pack_prev=i,rW(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=f[0]&&l<=f[1]&&(s=u[a.bisect(h,l,1,d)-1],s.y+=v,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=et(t),i):r},i.bins=function(t){return arguments.length?(n="number"==typeof t?function(e){return rq(e,t)}:et(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(rG),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,rM(s,function(t){t.r=+c(t.value)}),rM(s,rZ),r){var f=r*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;rM(s,function(t){t.r+=f}),rM(s,rZ),rM(s,function(t){t.r-=f})}return function t(e,r,n,i){var a=e.children;if(e.x=r+=i*e.x,e.y=n+=i*e.y,e.r*=i,a)for(var o=-1,s=a.length;++op.x&&(p=t),t.depth>d.depth&&(d=t)});var v=e(h,p)/2-h.x,g=r[0]/(p.x+e(p,h)/2+v),y=r[1]/(d.depth||1);rA(c,function(t){t.x=(t.x+v)*g,t.y=t.depth*y})}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],e.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,o,s=t,l=t,u=r,c=s.parent.children[0],f=s.m,h=l.m,p=u.m,d=c.m;u=r1(u),s=r0(s),u&&s;)c=r0(c),(l=r1(l)).a=t,(o=u.z+p-s.z-f+e(u._,s._))>0&&(function(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}((i=u,a=n,i.a.parent===t.parent?i.a:a),t,o),f+=o,h+=o),p+=u.m,f+=s.m,d+=c.m,h+=l.m;u&&!r1(l)&&(l.t=u,l.m+=p-h),s&&!r0(c)&&(c.t=s,c.m+=f-d,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},rk(i,t)},a.layout.cluster=function(){var t=a.layout.hierarchy().sort(null).value(null),e=rQ,r=[1,1],n=!1;function i(i,o){var s,l=t.call(this,i,o),u=l[0],c=0;rM(u,function(t){var r=t.children;r&&r.length?(t.x=r.reduce(function(t,e){return t+e.x},0)/r.length,t.y=1+a.max(r,function(t){return t.y})):(t.x=s?c+=e(t,s):0,t.y=0,s=t)});var f=function t(e){var r=e.children;return r&&r.length?t(r[0]):e}(u),h=function t(e){var r,n=e.children;return n&&(r=n.length)?t(n[r-1]):e}(u),p=f.x-e(f,h)/2,d=h.x+e(h,f)/2;return rM(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-p)/(d-p)*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},rk(i,t)},a.layout.treemap=function(){var t,e=a.layout.hierarchy(),r=Math.round,n=[1,1],i=null,o=r2,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(t,e){for(var r,n,i=-1,a=t.length;++in.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++o0;)h.push(n=p[a-1]),h.area+=n.area,"squarify"!==l||(i=function(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return n*=n,e*=e,n?Math.max(e*i*u/n,n/(e*a*u)):1/0}(h,v))<=d?(p.pop(),d=i):(h.area-=h.pop().area,f(h,v,s,!1),v=Math.min(s.dx,s.dy),h.length=h.area=0,d=1/0);h.length&&(f(h,v,s,!0),h.length=h.area=0),r.forEach(t)}})(a),s&&(t=i),i}return h.size=function(t){return arguments.length?(n=t,h):n},h.padding=function(t){var e;return arguments.length?(o=null==(i=t)?r2:"function"==(e=typeof t)?function(e){var r=t.call(h,e,e.depth);return null==r?r2(e):r3(e,"number"==typeof r?[r,r,r,r]:r)}:("number"===e&&(t=[t,t,t,t]),function(e){return r3(e,t)}),h):i},h.round=function(t){return arguments.length?(r=t?Math.round:Number,h):r!=Number},h.sticky=function(e){return arguments.length?(s=e,t=null,h):s},h.ratio=function(t){return arguments.length?(u=t,h):u},h.mode=function(t){return arguments.length?(l=t+"",h):l},rk(h,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;r2?nt:r6,s=i?rv:rd;return a=t(e,r,s,n),o=t(r,e,s,e3),l}function l(t){return a(t)}return l.invert=function(t){return o(t)},l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e},l.range=function(t){return arguments.length?(r=t,s()):r},l.rangeRound=function(t){return l.range(t).interpolate(rs)},l.clamp=function(t){return arguments.length?(i=t,s()):i},l.interpolate=function(t){return arguments.length?(n=t,s()):n},l.ticks=function(t){return ni(e,t)},l.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},l.nice=function(t){return nr(e,t),s()},l.copy=function(){return t(e,r,n,i)},s()}([0,1],[0,1],e3,!1)},a.scale.log=function(){return function t(e,r,n,i){function a(t){return(n?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(r)}function o(t){return n?Math.pow(r,t):-Math.pow(r,-t)}function s(t){return e(a(t))}return s.invert=function(t){return o(e.invert(t))},s.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((i=t.map(Number)).map(a)),s):i},s.base=function(t){return arguments.length?(r=+t,e.domain(i.map(a)),s):r},s.nice=function(){var t=r8(i.map(a),n?Math:na);return e.domain(t),i=t.map(o),s},s.ticks=function(){var t=r4(i),e=[],s=t[0],l=t[1],u=Math.floor(a(s)),c=Math.ceil(a(l)),f=r%1?2:r;if(isFinite(c-u)){if(n){for(;u0;h--)e.push(o(u)*h);for(u=0;e[u]l;c--);e=e.slice(u,c)}return e},s.copy=function(){return t(e.copy(),r,n,i)},ne(s,e)}(a.scale.linear().domain([0,1]),10,!0,[1,10])};var na={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function no(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}a.scale.pow=function(){return function t(e,r,n){var i=no(r),a=no(1/r);function o(t){return e(i(t))}return o.invert=function(t){return a(e.invert(t))},o.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),o):n},o.ticks=function(t){return ni(n,t)},o.tickFormat=function(t,e){return d3_scale_linearTickFormat(n,t,e)},o.nice=function(t){return o.domain(nr(n,t))},o.exponent=function(t){return arguments.length?(i=no(r=t),a=no(1/r),e.domain(n.map(i)),o):r},o.copy=function(){return t(e.copy(),r,n)},ne(o,e)}(a.scale.linear(),1,[0,1])},a.scale.sqrt=function(){return a.scale.pow().exponent(.5)},a.scale.ordinal=function(){return function t(e,r){var n,i,o;function s(t){return i[((n.get(t)||("range"===r.t?n.set(t,e.push(t)):NaN))-1)%i.length]}function l(t,r){return a.range(e.length).map(function(e){return t+r*e})}return s.domain=function(t){if(!arguments.length)return e;e=[],n=new k;for(var i,a=-1,o=t.length;++a0?n[t-1]:e[0],tf?0:1;if(u=tE)return l(u,p)+(s?l(s,1-p):"")+"Z";var d,v,g,y,m,x,b,_,w,T,k,A,M=0,S=0,E=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=n===nh?Math.sqrt(s*s+u*u):+n.apply(this,arguments),p||(S*=-1),u&&(S=tO(g/u*Math.sin(y))),s&&(M=tO(g/s*Math.sin(y)))),u){m=u*Math.cos(c+S),x=u*Math.sin(c+S),b=u*Math.cos(f-S),_=u*Math.sin(f-S);var L=Math.abs(f-c-2*S)<=tM?0:1;if(S&&nm(m,x,b,_)===p^L){var C=(c+f)/2;m=u*Math.cos(C),x=u*Math.sin(C),b=_=null}}else m=x=0;if(s){w=s*Math.cos(f-M),T=s*Math.sin(f-M),k=s*Math.cos(c+M),A=s*Math.sin(c+M);var P=Math.abs(c-f+2*M)<=tM?0:1;if(M&&nm(w,T,k,A)===1-p^P){var O=(c+f)/2;w=s*Math.cos(O),T=s*Math.sin(O),k=A=null}}else w=T=0;if(h>1e-6&&(d=Math.min(Math.abs(u-s)/2,+r.apply(this,arguments)))>.001){v=s0?0:1}function nx(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,f=t[1]+u,h=e[0]+l,p=e[1]+u,d=(c+h)/2,v=(f+p)/2,g=h-c,y=p-f,m=g*g+y*y,x=r-n,b=c*p-h*f,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*m-b*b)),w=(b*y-g*_)/m,T=(-b*g-y*_)/m,k=(b*y+g*_)/m,A=(-b*g+y*_)/m,M=w-d,S=T-v,E=k-d,L=A-v;return M*M+S*S>E*E+L*L&&(w=k,T=A),[[w-l,T-u],[w*r/x,T*r/x]]}function nb(){return!0}function n_(t){var e=eh,r=ep,n=nb,i=nT,a=i.key,o=.7;function s(a){var s,l=[],u=[],c=-1,f=a.length,h=et(e),p=et(r);function d(){l.push("M",i(t(u),o))}for(;++c1&&i.push("H",n[0]),i.join("")},"step-before":nA,"step-after":nM,basis:nL,"basis-open":function(t){if(t.length<4)return nT(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(nC(nI,a)+","+nC(nI,o)),--n;++nw(e=nD(t[s],t[s+1]))?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;)a.push([(i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])))||0,o[s]*i||0]);return a}(t))}});function nT(t){return t.length>1?t.join("L"):t+"Z"}function nk(t){return t.join("L")+"Z"}function nA(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){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;utM)+",1 "+e}return a.radius=function(t){return arguments.length?(r=et(t),a):r},a.source=function(e){return arguments.length?(t=et(e),a):t},a.target=function(t){return arguments.length?(e=et(t),a):e},a.startAngle=function(t){return arguments.length?(n=et(t),a):n},a.endAngle=function(t){return arguments.length?(i=et(t),a):i},a},a.svg.diagonal=function(){var t=nB,e=nN,r=nU;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=et(e),n):t},n.target=function(t){return arguments.length?(e=et(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=nU,r=t.projection;return t.projection=function(t){var n;return arguments.length?r((n=e=t,function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-tL;return[e*Math.cos(r),e*Math.sin(r)]})):e},t},a.svg.symbol=function(){var t=nq,e=nV;function r(r,n){return(nG.get(t.call(this,r,n))||nH)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=et(e),r):t},r.size=function(t){return arguments.length?(e=et(t),r):e},r};var nG=a.map({circle:nH,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*nY)),r=e*nY;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/nW),r=e*nW/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/nW),r=e*nW/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});a.svg.symbolTypes=nG.keys();var nW=Math.sqrt(3),nY=Math.tan(30*tC);X.transition=function(t){for(var e,r,n=nJ||++n0,i=n3(t),a=[],o=n$||{time:Date.now(),ease:rr,delay:0,duration:250},s=-1,l=this.length;++s0;)u[--h].call(t,o);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,e),--c.count?delete c[n]:delete t[r],1}!f&&(o=el(function(t){var e=f.delay;if(o.t=e+a,e<=t)return h(t-e);o.c=h},0,a=i.time),f=c[n]={tween:new k,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++c.count)}nQ.call=X.call,nQ.empty=X.empty,nQ.node=X.node,nQ.size=X.size,a.transition=function(t,e){return t&&t.transition?nJ?t.transition(e):t:a.selection().transition(t)},a.transition.prototype=nQ,nQ.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=Z(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",o[1]-o[0])}function v(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var f,g,y=this,m=a.select(a.event.target),x=r.of(y,arguments),b=a.select(y),_=m.datum(),w=!/^(n|s)$/.test(_)&&n,T=!/^(e|w)$/.test(_)&&i,k=m.classed("extent"),A=t_(y),M=a.mouse(y),S=a.select(c(y)).on("keydown.brush",function(){32==a.event.keyCode&&(k||(f=null,M[0]-=o[1],M[1]-=s[1],k=2),N())}).on("keyup.brush",function(){32==a.event.keyCode&&2==k&&(M[0]+=o[1],M[1]+=s[1],k=0,N())});if(a.event.changedTouches?S.on("touchmove.brush",C).on("touchend.brush",O):S.on("mousemove.brush",C).on("mouseup.brush",O),b.interrupt().selectAll("*").interrupt(),k)M[0]=o[0]-M[0],M[1]=s[0]-M[1];else if(_){var E=+/w$/.test(_),L=+/^n/.test(_);g=[o[1-E]-M[0],s[1-L]-M[1]],M[0]=o[E],M[1]=s[L]}else a.event.altKey&&(f=M.slice());function C(){var t=a.mouse(y),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),k||(a.event.altKey?(f||(f=[(o[0]+o[1])/2,(s[0]+s[1])/2]),M[0]=o[+(t[0]Math.abs(s))break;i-=a/s}if(r=0,n=1,(i=t)n)return n;for(;ra?r=i:n=i,i=(n-r)*.5+r;return i},v.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))},g.prototype={clone:function(){return new g(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}},g.convert=function(t){return t instanceof g?t:Array.isArray(t)?new g(t[0],t[1]):t};var y="undefined"!=typeof self?self:{};function m(t,e,r,n){var i=new v(t,e,r,n);return function(t){return i.solve(t)}}var x=m(.25,.1,.25,1);function b(t,e,r){return Math.min(r,Math.max(e,t))}function _(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function w(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function M(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 S(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function E(t,e){return -1!==t.indexOf(e,t.length-e.length)}function L(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function C(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 P(t){return Array.isArray(t)?t.map(P):"object"==typeof t&&t?L(t,P):t}var O={};function I(t){O[t]||("undefined"!=typeof console&&console.warn(t),O[t]=!0)}function z(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function D(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function R(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 F=null;function B(t){if(null==F){var e=t.navigator?t.navigator.userAgent:null;F=!!t.safari||!!(e&&(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return F}function N(t){try{var e=y[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var j=y.performance&&y.performance.now?y.performance.now.bind(y.performance):Date.now.bind(Date),U=y.requestAnimationFrame||y.mozRequestAnimationFrame||y.webkitRequestAnimationFrame||y.msRequestAnimationFrame,V=y.cancelAnimationFrame||y.mozCancelAnimationFrame||y.webkitCancelAnimationFrame||y.msCancelAnimationFrame,q={now:j,frame:function(t){var e=U(t);return{cancel:function(){return V(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=y.document.createElement("canvas"),n=r.getContext("2d");if(!n)throw 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 a||(a=y.document.createElement("a")),a.href=t,a.href},hardwareConcurrency:y.navigator&&y.navigator.hardwareConcurrency||4,get devicePixelRatio(){return y.devicePixelRatio},get prefersReducedMotion(){if(!y.matchMedia)return!1;return null==o&&(o=y.matchMedia("(prefers-reduced-motion: reduce)")),o.matches}},H={API_URL:"https://api.mapbox.com",get EVENTS_URL(){if(!this.API_URL)return null;if(0===this.API_URL.indexOf("https://api.mapbox.cn"))return"https://events.mapbox.cn/events/v2";if(0===this.API_URL.indexOf("https://api.mapbox.com"))return"https://events.mapbox.com/events/v2";return null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},G={supported:!1,testSupport:function(t){!W&&l&&(Y?X(t):s=t)}},W=!1,Y=!1;function X(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,l),t.isContextLost())return;G.supported=!0}catch(t){}t.deleteTexture(e),W=!0}y.document&&((l=y.document.createElement("img")).onload=function(){s&&X(s),s=null,Y=!0},l.onerror=function(){W=!0,s=null},l.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var Z=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function K(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","01",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(!K(t))return t;var r=tt(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},Z.prototype.normalizeGlyphsURL=function(t,e){if(!K(t))return t;var r=tt(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},Z.prototype.normalizeSourceURL=function(t,e){if(!K(t))return t;var r=tt(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=tt(t);return K(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+e+r,te(i))},Z.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!K(t))return t;var r=tt(t),n=q.devicePixelRatio>=2||512===e?"@2x":"",i=G.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;e=0&&t.params.splice(i,1)}if("/"!==n.path&&(t.path=""+n.path+t.path),!H.REQUIRE_ACCESS_TOKEN)return te(t);if(!(e=e||H.ACCESS_TOKEN))throw Error("An API access token is required to use Mapbox GL. "+r);if("s"===e[0])throw 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),te(t)};var J=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function $(t){return J.test(t)}var Q=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function tt(t){var e=t.match(Q);if(!e)throw Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function te(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}var tr="mapbox.eventData";function tn(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(y.atob(e).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))))}catch(t){return null}}var ti=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};ti.prototype.getStorageKey=function(t){var e,r=tn(H.ACCESS_TOKEN),n="";return r&&r.u?(e=r.u,n=y.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode(Number("0x"+e))}))):n=H.ACCESS_TOKEN||"",t?tr+"."+t+":"+n:tr+":"+n},ti.prototype.fetchEventData=function(){var t=N("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{var n=y.localStorage.getItem(e);n&&(this.eventData=JSON.parse(n));var i=y.localStorage.getItem(r);i&&(this.anonId=i)}catch(t){I("Unable to read from LocalStorage")}},ti.prototype.saveEventData=function(){var t=N("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{y.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&y.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){I("Unable to write to LocalStorage")}},ti.prototype.processRequests=function(t){},ti.prototype.postEvent=function(t,e,r,n){var i=this;if(H.EVENTS_URL){var a=tt(H.EVENTS_URL);a.params.push("access_token="+(n||H.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:d,skuId:"01",userId:this.anonId},s=e?w(o,e):o,l={url:te(a),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=tw(l,function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)})}},ti.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var ta=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,(H.EVENTS_URL&&n||H.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return K(t)||$(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(),M(this.anonId)||(this.anonId=A()),this.postEvent(i,{skuToken:this.skuToken},function(t){!t&&n&&(e.success[n]=!0)},t))}},e}(ti),to=new(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){H.EVENTS_URL&&H.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return K(t)||$(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=tn(H.ACCESS_TOKEN),n=r?r.u:H.ACCESS_TOKEN,i=n!==this.eventData.tokenU;M(this.anonId)||(this.anonId=A(),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}(ti)),ts=to.postTurnstileEvent.bind(to),tl=new ta,tu=tl.postMapLoadEvent.bind(tl),tc="mapbox-tiles",tf=500,th=50;function tp(){y.caches&&!u&&(u=y.caches.open(tc))}function td(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var tv=1/0;function tg(){return null==f&&(f=y.OffscreenCanvas&&new y.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof y.createImageBitmap),f}var ty={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ty);var tm=function(t){function e(e,r,n){401===r&&$(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),tx=D()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===y.location.protocol?y.parent:y).location.href},tb=function(t,e){var r,n,i,a,o,s,l,f,h;if(r=t.url,!(/^file:/.test(r)||/^file:/.test(tx())&&!/^\w+:/.test(r))){if(y.fetch&&y.Request&&y.AbortController&&y.Request.prototype.hasOwnProperty("signal"))return n=new y.AbortController,i=new y.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:tx(),signal:n.signal}),a=!1,o=!1,l=(s=i.url).indexOf("sku=")>0&&$(s),"json"===t.type&&i.headers.set("Accept","application/json"),f=function(r,n,a){if(!o){if(r&&"SecurityError"!==r.message&&I(r),n&&a)return h(n);var s=Date.now();y.fetch(i).then(function(r){if(!r.ok)return e(new tm(r.statusText,r.status,t.url));var n=l?r.clone():null;return h(r,n,s)}).catch(function(t){20!==t.code&&e(Error(t.message))})}},h=function(r,n,s){("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then(function(t){o||(n&&s&&function(t,e,r){if(tp(),u){var n={status:e.status,statusText:e.statusText,headers:new y.Headers};e.headers.forEach(function(t,e){return n.headers.set(e,t)});var i=R(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<42e4||function(t,e){if(void 0===c)try{new Response(new ReadableStream),c=!0}catch(t){c=!1}c?e(t.body):t.blob().then(e)}(e,function(e){var r=new y.Response(e,n);tp(),u&&u.then(function(e){return e.put(td(t.url),r)}).catch(function(t){return I(t.message)})}))}}(i,n,s),a=!0,e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires")))}).catch(function(t){o||e(Error(t.message))})},l?function(t,e){if(tp(),!u)return e(null);var r=td(t.url);u.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=R(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)}(i,f):f(null,null),{cancel:function(){o=!0,a||n.abort()}};if(D()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}return function(t,e){var r=new y.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(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 tm(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},t_=function(t,e){return tb(w(t,{type:"arrayBuffer"}),e)},tw=function(t,e){return tb(w(t,{method:"POST"}),e)},tT="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";h=[],p=0;var tk=function(t,e){if(G.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),p>=H.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return h.push(r),r}p++;var n=!1,i=function(){if(!n)for(n=!0,p--;h.length&&p0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},tL.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var tC={$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"}}},tP=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function tO(t){var e=t.key,r=t.value;return r?[new tP(e,r,"constants have been deprecated as of v8")]:[]}function tI(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0;n":"value"===t.itemType.kind?"array":"array<"+e+">"}var tK=[tB,tN,tj,tU,tV,tW,tq,tX(tH),tY];function tJ(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!tJ(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else if(t.kind===e.kind)return null;else if("value"===t.kind){for(var r=0;r255?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=t.replace(/ /g,"").toLowerCase();if(e in r)return r[e].slice();if("#"===e[0]){if(4===e.length){var i=parseInt(e.substr(1),16);return i>=0&&i<=4095?[(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1]:null}if(7===e.length){var i=parseInt(e.substr(1),16);return i>=0&&i<=16777215?[(16711680&i)>>16,(65280&i)>>8,255&i,1]:null}return null}var l=e.indexOf("("),u=e.indexOf(")");if(-1!==l&&u+1===e.length){var c=e.substr(0,l),f=e.substr(l+1,u-(l+1)).split(","),h=1;switch(c){case"rgba":if(4!==f.length)break;h=o(f.pop());case"rgb":if(3!==f.length)break;return[a(f[0]),a(f[1]),a(f[2]),h];case"hsla":if(4!==f.length)break;h=o(f.pop());case"hsl":if(3!==f.length)break;var p=(parseFloat(f[0])%360+360)%360/360,d=o(f[1]),v=o(f[2]),g=v<=.5?v*(d+1):v+d-v*d,y=2*v-g;return[n(255*s(y,g,p+1/3)),n(255*s(y,g,p)),n(255*s(y,g,p-1/3)),h]}}return null}}catch(t){}}).parseCSSColor,t1=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};t1.parse=function(t){if(t){if(t instanceof t1)return t;if("string"==typeof t){var e=t0(t);if(e)return new t1(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},t1.prototype.toString=function(){var t=this.toArray();return"rgba("+Math.round(t[0])+","+Math.round(t[1])+","+Math.round(t[2])+","+t[3]+")"},t1.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},t1.black=new t1(0,0,0,1),t1.white=new t1(1,1,1,1),t1.transparent=new t1(0,0,0,0),t1.red=new t1(1,0,0,1);var t2=function(t,e,r){t?this.sensitivity=e?"variant":"case":this.sensitivity=e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};t2.prototype.compare=function(t,e){return this.collator.compare(t,e)},t2.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var t3=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},t4=function(t){this.sections=t};t4.fromString=function(t){return new t4([new t3(t,null,null,null,null)])},t4.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})},t4.factory=function(t){return t instanceof t4?t:t4.fromString(t)},t4.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map(function(t){return t.text}).join("")},t4.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e=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 t8(t){if(null===t||"string"==typeof t||"boolean"==typeof t||"number"==typeof t)return!0;if(t instanceof t1)return!0;if(t instanceof t2)return!0;if(t instanceof t4)return!0;else if(t instanceof t5)return!0;else if(Array.isArray(t)){for(var e=0;e2){var i,a,o,s=t[1];if("string"!=typeof s||!(s in er)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);a=er[s],r++}else a=tH;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],r++}i=tX(a,o)}else i=er[n];for(var l=[];r1)&&e.push(n)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var ei=function(t){this.type=tW,this.sections=t};ei.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,tN)))return null;var l=null;if(o["text-font"]&&!(l=e.parse(o["text-font"],1,tX(tj))))return null;var u=null;if(o["text-color"]&&!(u=e.parse(o["text-color"],1,tV)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var f=e.parse(t[a],1,tH);if(!f)return null;var h=f.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new ei(n)},ei.prototype.evaluate=function(t){return new t4(this.sections.map(function(e){var r=e.content.evaluate(t);return t7(r)===tY?new t3("",r,null,null,null):new t3(t9(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)}))},ei.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},ea.prototype.eachChild=function(t){t(this.input)},ea.prototype.outputDefined=function(){return!1},ea.prototype.serialize=function(){return["image",this.input.serialize()]};var eo={"to-boolean":tU,"to-color":tV,"to-number":tN,"to-string":tj},es=function(t,e){this.type=t,this.args=e};es.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=eo[r],i=[],a=1;a4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":t6(e[0],e[1],e[2],e[3])))return new t1(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ee(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=e[2])&&!(t[1]<=e[1])&&!(t[3]>=e[3])}function ed(t,e){for(var r=!1,n=0,i=e.length;nt[1]!=o[1]>t[1]&&t[0]<(o[0]-a[0])*(t[1]-a[1])/(o[1]-a[1])+a[0]&&(r=!r)}return r}function ev(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,f=o*u-l*s;return c>0&&f<0||c<0&&f>0}function eg(t,e){for(var r=0;rr[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}eh(e,t)}function eb(t,e,r,n){for(var i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[],s=0;s=0)return!1;var r=!0;return t.eachChild(function(t){r&&!eA(t,e)&&(r=!1)}),r}ew.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(t8(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var n=0;ne)o=s-1;else throw new ee("Input is not a number.");return 0}eS.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)},eS.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new en(e,[t]):"coerce"===r?new es(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)a=r(a,o,e.typeAnnotation||"assert");else if(("color"===o.kind||"formatted"===o.kind||"resolvedImage"===o.kind)&&("value"===s.kind||"string"===s.kind))a=r(a,o,e.typeAnnotation||"coerce");else if(this.checkSubtype(o,s))return null}if(!(a instanceof et)&&"resolvedImage"!==a.type.kind&&function t(e){if(e instanceof eM)return t(e.boundExpression);if(e instanceof ec&&"error"===e.name||e instanceof ef||e instanceof ew)return!1;var r=e instanceof es||e instanceof en,n=!0;return e.eachChild(function(e){n=r?n&&t(e):n&&e instanceof et}),!!n&&eT(e)&&eA(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(a)){var l=new eu;try{a=new et(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.")},eS.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 eS(this.registry,n,e||null,i,this.errors)},eS.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 tR(n,t))},eS.prototype.checkSubtype=function(t,e){var r=tJ(t,e);return r&&this.error(r),r};var eL=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0;n=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 eL(i,r,n)},eL.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[eE(e,n)].evaluate(t)},eL.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var eP=Object.freeze({__proto__:null,number:eC,color:function(t,e,r){return new t1(eC(t.r,e.r,r),eC(t.g,e.g,r),eC(t.b,e.b,r),eC(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,n){return eC(t,e[n],r)})}}),eO=4/29,eI=6/29,ez=6/29*3*(6/29),eD=6/29*(6/29)*(6/29),eR=Math.PI/180,eF=180/Math.PI;function eB(t){return t>eD?Math.pow(t,1/3):t/ez+eO}function eN(t){return t>eI?t*t*t:ez*(t-eO)}function ej(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function eU(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function eV(t){var e=eU(t.r),r=eU(t.g),n=eU(t.b),i=eB((.4124564*e+.3575761*r+.1804375*n)/.95047),a=eB((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-eB((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function eq(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=1*eN(e),new t1(ej(3.2404542*(r=.95047*eN(r))-1.5371385*e-.4985314*(n=1.08883*eN(n))),ej(-.969266*r+1.8760108*e+.041556*n),ej(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}var eH={forward:eV,reverse:eq,interpolate:function(t,e,r){return{l:eC(t.l,e.l,r),a:eC(t.a,e.a,r),b:eC(t.b,e.b,r),alpha:eC(t.alpha,e.alpha,r)}}},eG={forward:function(t){var e=eV(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*eF;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*eR,r=t.c;return eq({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){var n,i;return{h:(n=t.h,i=e.h-n,n+r*(i>180||i<-180?i-360*Math.round(i/360):i)),c:eC(t.c,e.c,r),l:eC(t.l,e.l,r),alpha:eC(t.alpha,e.alpha,r)}}},eW=Object.freeze({__proto__:null,lab:eH,hcl:eG}),eY=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;a1}))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,tN)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=tV:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c=f)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var v=e.parse(h,d,u);if(!v)return null;u=u||v.type,l.push([f,v])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new eY(u,r,n,i,l):e.error("Type "+tZ(u)+" is not interpolatable.")},eY.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=eE(e,n),o=e[a],s=e[a+1],l=eY.interpolationFactor(this.interpolation,n,o,s),u=r[a].evaluate(t),c=r[a+1].evaluate(t);return"interpolate"===this.operator?eP[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?eG.reverse(eG.interpolate(eG.forward(u),eG.forward(c),l)):eH.reverse(eH.interpolate(eH.forward(u),eH.forward(c),l))},eY.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ee("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new ee("Array index must be an integer, but found "+e+" instead.");return r[e]},eJ.prototype.eachChild=function(t){t(this.index),t(this.input)},eJ.prototype.outputDefined=function(){return!1},eJ.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var e$=function(t,e){this.type=tU,this.needle=t,this.haystack=e};e$.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,tH),n=e.parse(t[2],2,tH);return r&&n?t$(r.type,[tU,tj,tN,tB,tH])?new e$(r,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+tZ(r.type)+" instead"):null},e$.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!tQ(e,["boolean","string","number","null"]))throw new ee("Expected first argument to be of type boolean, string, number or null, but found "+tZ(t7(e))+" instead.");if(!tQ(r,["string","array"]))throw new ee("Expected second argument to be of type array or string, but found "+tZ(t7(r))+" instead.");return r.indexOf(e)>=0},e$.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},e$.prototype.outputDefined=function(){return!0},e$.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var eQ=function(t,e,r){this.type=tN,this.needle=t,this.haystack=e,this.fromIndex=r};eQ.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,tH),n=e.parse(t[2],2,tH);if(!r||!n)return null;if(!t$(r.type,[tU,tj,tN,tB,tH]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+tZ(r.type)+" instead");if(4!==t.length)return new eQ(r,n);var i=e.parse(t[3],3,tN);return i?new eQ(r,n,i):null},eQ.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!tQ(e,["boolean","string","number","null"]))throw new ee("Expected first argument to be of type boolean, string, number or null, but found "+tZ(t7(e))+" instead.");if(!tQ(r,["string","array"]))throw new ee("Expected second argument to be of type array or string, but found "+tZ(t7(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},eQ.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},eQ.prototype.outputDefined=function(){return!1},eQ.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 e0=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};e0.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.");e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var r,n,i={},a=[],o=2;oNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,t7(h)))return null}else r=t7(h);if(void 0!==i[String(h)])return u.error("Branch labels must be unique.");i[String(h)]=a.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=e.parse(t[1],1,tH);if(!d)return null;var v=e.parse(t[t.length-1],t.length-1,n);return!v||"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new e0(r,n,d,i,a,v)},e0.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(t7(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},e0.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},e0.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},e0.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=Object.keys(this.cases).sort(),n=[],i={},a=0;a=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,tH),n=e.parse(t[2],2,tN);if(!r||!n)return null;if(!t$(r.type,[tX(tH),tj,tH]))return e.error("Expected first argument to be of type array or string, but found "+tZ(r.type)+" instead");if(4!==t.length)return new e2(r.type,r,n);var i=e.parse(t[3],3,tN);return i?new e2(r.type,r,n,i):null},e2.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!tQ(e,["string","array"]))throw new ee("Expected first argument to be of type array or string, but found "+tZ(t7(e))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},e2.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},e2.prototype.outputDefined=function(){return!1},e2.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 e6=e5("==",function(t,e,r){return e===r},e4),e8=e5("!=",function(t,e,r){return e!==r},function(t,e,r,n){return!e4(t,e,r,n)}),e7=e5("<",function(t,e,r){return en.compare(e,r)}),e9=e5(">",function(t,e,r){return e>r},function(t,e,r,n){return n.compare(e,r)>0}),rt=e5("<=",function(t,e,r){return e<=r},function(t,e,r,n){return 0>=n.compare(e,r)}),re=e5(">=",function(t,e,r){return e>=r},function(t,e,r,n){return n.compare(e,r)>=0}),rr=function(t,e,r,n,i){this.type=tj,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};rr.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,tN);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,tj)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,tj)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,tN)))return null;var s=null;return!n["max-fraction-digits"]||(s=e.parse(n["max-fraction-digits"],1,tN))?new rr(r,i,a,o,s):null},rr.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))},rr.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)},rr.prototype.outputDefined=function(){return!1},rr.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 rn=function(t){this.type=tN,this.input=t};rn.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 "+tZ(r.type)+" instead."):new rn(r):null},rn.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e||Array.isArray(e))return e.length;throw new ee("Expected value to be of type string or array, but found "+tZ(t7(e))+" instead.")},rn.prototype.eachChild=function(t){t(this.input)},rn.prototype.outputDefined=function(){return!1},rn.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var ri={"==":e6,"!=":e8,">":e9,"<":e7,">=":re,"<=":rt,array:en,at:eJ,boolean:en,case:e1,coalesce:eZ,collator:ef,format:ei,image:ea,in:e$,"index-of":eQ,interpolate:eY,"interpolate-hcl":eY,"interpolate-lab":eY,length:rn,let:eK,literal:et,match:e0,number:en,"number-format":rr,object:en,slice:e2,step:eL,string:en,"to-boolean":es,"to-color":es,"to-number":es,"to-string":es,var:eM,within:ew};function ra(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=t6(r,n,i,o);if(s)throw new ee(s);return new t1(r/255*o,n/255*o,i/255*o,o)}function ro(t,e){var r=e[t];return void 0===r?null:r}function rs(t){return{type:t}}function rl(t){return{result:"success",value:t}}function ru(t){return{result:"error",value:t}}function rc(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function rf(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function rh(t){return!!t.expression&&t.expression.interpolated}function rp(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function rd(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function rv(t){return t}function rg(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function ry(t,e,r,n,i){return rg(typeof r===i?n[r]:void 0,t.default,e.default)}function rm(t,e,r){if("number"!==rp(r))return rg(t.default,e.default);var n=t.stops.length;if(1===n||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=eE(t.stops.map(function(t){return t[0]}),r);return t.stops[i][1]}function rx(t,e,r){var n,i,a,o=void 0!==t.base?t.base:1;if("number"!==rp(r))return rg(t.default,e.default);var s=t.stops.length;if(1===s||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[s-1][0])return t.stops[s-1][1];var l=eE(t.stops.map(function(t){return t[0]}),r),u=(n=t.stops[l][0],i=t.stops[l+1][0]-n,a=r-n,0===i?0:1===o?a/i:(Math.pow(o,a)-1)/(Math.pow(o,i)-1)),c=t.stops[l][1],f=t.stops[l+1][1],h=eP[e.type]||rv;if(t.colorSpace&&"rgb"!==t.colorSpace){var p=eW[t.colorSpace];h=function(t,e){return p.reverse(p.interpolate(p.forward(t),p.forward(e),u))}}return"function"==typeof c.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=c.evaluate.apply(void 0,t),n=f.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return h(r,n,u)}}:h(c,f,u)}function rb(t,e,r){return"color"===e.type?r=t1.parse(r):"formatted"===e.type?r=t4.fromString(r.toString()):"resolvedImage"===e.type?r=t5.fromString(r.toString()):rp(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),rg(r,t.default,e.default)}ec.register(ri,{error:[{kind:"error"},[tj],function(t,e){throw new ee(e[0].evaluate(t))}],typeof:[tj,[tH],function(t,e){return tZ(t7(e[0].evaluate(t)))}],"to-rgba":[tX(tN,4),[tV],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[tV,[tN,tN,tN],ra],rgba:[tV,[tN,tN,tN,tN],ra],has:{type:tU,overloads:[[[tj],function(t,e){return e[0].evaluate(t) in t.properties()}],[[tj,tq],function(t,e){var r=e[0],n=e[1];return r.evaluate(t) in n.evaluate(t)}]]},get:{type:tH,overloads:[[[tj],function(t,e){return ro(e[0].evaluate(t),t.properties())}],[[tj,tq],function(t,e){var r=e[0],n=e[1];return ro(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[tH,[tj],function(t,e){return ro(e[0].evaluate(t),t.featureState||{})}],properties:[tq,[],function(t){return t.properties()}],"geometry-type":[tj,[],function(t){return t.geometryType()}],id:[tH,[],function(t){return t.id()}],zoom:[tN,[],function(t){return t.globals.zoom}],"heatmap-density":[tN,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[tN,[],function(t){return t.globals.lineProgress||0}],accumulated:[tH,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[tN,rs(tN),function(t,e){for(var r=0,n=0;n":[tU,[tj,tH],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->":[tU,[tH],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[tU,[tj,tH],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-<=":[tU,[tH],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[tU,[tj,tH],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->=":[tU,[tH],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[tU,[tH],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[tU,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[tU,[tX(tj)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[tU,[tX(tH)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[tU,[tj,tX(tH)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[tU,[tj,tX(tH)],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:tU,overloads:[[[tU,tU],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[rs(tU),function(t,e){for(var r=0;r0&&"string"==typeof t[0]&&t[0]in ri}function rT(t,e){var r,n=new eS(ri,[],e?(r={color:tV,string:tj,number:tN,enum:tj,boolean:tU,formatted:tW,resolvedImage:tY},"array"===e.type?tX(r[e.value]||tH,e.length):r[e.type]):void 0),i=n.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?rl(new r_(i,e)):ru(n.errors)}r_.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)},r_.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 ee("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 rk=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!ek(e.expression)};rk.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},rk.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var rA=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!ek(e.expression),this.interpolationType=n};function rM(t,e){if("error"===(t=rT(t,e)).result)return t;var r=t.value.expression,n=eT(r);if(!n&&!rc(e))return ru([new tR("","data expressions not supported")]);var i=eA(r,["zoom"]);if(!i&&!rf(e))return ru([new tR("","zoom expressions not supported")]);var a=function t(e){var r=null;if(e instanceof eK)r=t(e.result);else if(e instanceof eZ)for(var n=0,i=e.args;nn.maximum?[new tP(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function rP(t){var e,r,n,i=t.valueSpec,a=tz(t.value.type),o={},s="categorical"!==a&&void 0===t.value.property,l="array"===rp(t.value.stops)&&"array"===rp(t.value.stops[0])&&"object"===rp(t.value.stops[0][0]),u=rE({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 tP(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(rL({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:c})),"array"===rp(r)&&0===r.length&&e.push(new tP(t.key,r,"array must have at least one stop")),e},default:function(t){return r$({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===a&&s&&u.push(new tP(t.key,t.value,'missing required property "property"')),"identity"===a||t.value.stops||u.push(new tP(t.key,t.value,'missing required property "stops"')),"exponential"===a&&t.valueSpec.expression&&!rh(t.valueSpec)&&u.push(new tP(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(s||rc(t.valueSpec)?s&&!rf(t.valueSpec)&&u.push(new tP(t.key,t.value,"zoom functions not supported")):u.push(new tP(t.key,t.value,"property functions not supported"))),("categorical"===a||l)&&void 0===t.value.property&&u.push(new tP(t.key,t.value,'"property" property is required')),u;function c(t){var e=[],a=t.value,s=t.key;if("array"!==rp(a))return[new tP(s,a,"array expected, "+rp(a)+" found")];if(2!==a.length)return[new tP(s,a,"array length 2 expected, length "+a.length+" found")];if(l){if("object"!==rp(a[0]))return[new tP(s,a,"object expected, "+rp(a[0])+" found")];if(void 0===a[0].zoom)return[new tP(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new tP(s,a,"object stop key must have value")];if(n&&n>tz(a[0].zoom))return[new tP(s,a[0].zoom,"stop zoom values must appear in ascending order")];tz(a[0].zoom)!==n&&(n=tz(a[0].zoom),r=void 0,o={}),e=e.concat(rE({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:rC,value:f}}))}else e=e.concat(f({key:s+"[0]",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return rw(tD(a[1]))?e.concat([new tP(s+"[1]",a[1],"expressions are not allowed in function stops.")]):e.concat(r$({key:s+"[1]",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function f(t,n){var s=rp(t.value),l=tz(t.value),u=null!==t.value?t.value:n;if(e){if(s!==e)return[new tP(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 tP(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 rc(i)&&void 0===a&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new tP(t.key,u,c)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&l=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||"<="===r||">="===r?rB(e[1],e[2],r):"any"===r?["any"].concat(e.slice(1).map(t)):"all"===r?["all"].concat(e.slice(1).map(t)):"none"===r?["all"].concat(e.slice(1).map(t).map(rU)):"in"===r?rN(e[1],e.slice(2)):"!in"===r?rU(rN(e[1],e.slice(2))):"has"===r?rj(e[1]):"!has"===r?rU(rj(e[1])):"within"!==r||e}(t));var e=rT(t,rD);if("error"!==e.result)return{filter:function(t,r,n){return e.value.evaluate(t,r,{},n)},needGeometry:function t(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var r=1;re?1:0}function rB(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 rN(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:if(e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]}))return["filter-in-large",t,["literal",e.sort(rF)]];return["filter-in-small",t,["literal",e]]}}function rj(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function rU(t){return["!",t]}function rV(t){return rz(tD(t.value))?rO(tI({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r,n=e.value,i=e.key;if("array"!==rp(n))return[new tP(i,n,"array expected, "+rp(n)+" found")];var a=e.styleSpec,o=[];if(n.length<1)return[new tP(i,n,"filter array must have at least 1 element")];switch(o=o.concat(rI({key:i+"[0]",value:n[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),tz(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===tz(n[1])&&o.push(new tP(i,n,'"$type" cannot be use with operator "'+n[0]+'"'));case"==":case"!=":3!==n.length&&o.push(new tP(i,n,'filter array for operator "'+n[0]+'" must have 3 elements'));case"in":case"!in":n.length>=2&&"string"!==(r=rp(n[1]))&&o.push(new tP(i+"[1]",n[1],"string expected, "+r+" found"));for(var s=2;s=c[p+0]&&n>=c[p+1])?(o[h]=!0,a.push(u[h])):o[h]=!1}}},r8.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),f=this._convertToCellCoord(n),h=l;h<=c;h++)for(var p=u;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},r8.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},r8.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},r8.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var u=t[l];s[l]=nt[o].shallow.indexOf(l)>=0?u:na(u,e)}t instanceof Error&&(s.message=t.message)}if(s.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==o&&(s.$name=o),s}throw Error("can't serialize object of type "+typeof t)}function no(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||nn(t)||ni(t)||ArrayBuffer.isView(t)||t instanceof r7)return t;if(Array.isArray(t))return t.map(no);if("object"==typeof t){var e=t.$name||"Object",r=nt[e].klass;if(!r)throw 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=0?s:no(s)}}return n}throw Error("can't deserialize object of type "+typeof t)}var ns=function(){this.first=!0};ns.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=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 nu(t){for(var e=0;e=65097&&t<=65103)||nl["CJK Compatibility Ideographs"](t)||nl["CJK Compatibility"](t)||nl["CJK Radicals Supplement"](t)||nl["CJK Strokes"](t)||nl["CJK Symbols and Punctuation"](t)&&!(t>=12296&&t<=12305)&&!(t>=12308&&t<=12319)&&12336!==t||nl["CJK Unified Ideographs Extension A"](t)||nl["CJK Unified Ideographs"](t)||nl["Enclosed CJK Letters and Months"](t)||nl["Hangul Compatibility Jamo"](t)||nl["Hangul Jamo Extended-A"](t)||nl["Hangul Jamo Extended-B"](t)||nl["Hangul Jamo"](t)||nl["Hangul Syllables"](t)||nl.Hiragana(t)||nl["Ideographic Description Characters"](t)||nl.Kanbun(t)||nl["Kangxi Radicals"](t)||nl["Katakana Phonetic Extensions"](t)||nl.Katakana(t)&&12540!==t||nl["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)||nl["Small Form Variants"](t)&&!(t>=65112&&t<=65118)&&!(t>=65123&&t<=65126)||nl["Unified Canadian Aboriginal Syllabics"](t)||nl["Unified Canadian Aboriginal Syllabics Extended"](t)||nl["Vertical Forms"](t)||nl["Yijing Hexagram Symbols"](t)||nl["Yi Syllables"](t)||nl["Yi Radicals"](t))}function nf(t){return!(nc(t)||nl["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||nl["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)||nl["Letterlike Symbols"](t)||nl["Number Forms"](t)||nl["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)||nl["Control Pictures"](t)&&9251!==t||nl["Optical Character Recognition"](t)||nl["Enclosed Alphanumerics"](t)||nl["Geometric Shapes"](t)||nl["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||nl["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||nl["CJK Symbols and Punctuation"](t)||nl.Katakana(t)||nl["Private Use Area"](t)||nl["CJK Compatibility Forms"](t)||nl["Small Form Variants"](t)||nl["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}function nh(t){return t>=1424&&t<=2303||nl["Arabic Presentation Forms-A"](t)||nl["Arabic Presentation Forms-B"](t)}var np={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},nd=null,nv=np.unavailable,ng=null,ny=function(t){t&&"string"==typeof t&&t.indexOf("NetworkError")>-1&&(nv=np.error),nd&&nd(t)};function nm(){nx.fire(new tS("pluginStateChange",{pluginStatus:nv,pluginURL:ng}))}var nx=new tL,nb=function(){return nv},n_=function(){if(nv!==np.deferred||!ng)throw Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");nv=np.loading,nm(),ng&&t_({url:ng},function(t){t?ny(t):(nv=np.loaded,nm())})},nw={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return nv===np.loaded||null!=nw.applyArabicShaping},isLoading:function(){return nv===np.loading},setState:function(t){nv=t.pluginStatus,ng=t.pluginURL},isParsed:function(){return null!=nw.applyArabicShaping&&null!=nw.processBidirectionalText&&null!=nw.processStyledBidirectionalText},getPluginURL:function(){return ng}},nT=function(){nw.isLoading()||nw.isLoaded()||"deferred"!==nb()||n_()},nk=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 ns,this.transition={})};nk.prototype.isSupportedScript=function(t){return function(t,e){for(var r,n=0;n=2304&&r<=3583||r>=3840&&r<=4255||nl.Khmer(r))return!1;return!0}(t,nw.isLoaded())},nk.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},nk.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 nA=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(rd(t))return new rS(t,e);if(rw(t)){var r=rM(t,e);if("error"===r.result)throw 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=t1.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};nA.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},nA.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var nM=function(t){this.property=t,this.value=new nA(t,void 0)};nM.prototype.transitioned=function(t,e){return new nE(this.property,this.value,e,w({},t.transition,this.transition),t.now)},nM.prototype.untransitioned=function(){return new nE(this.property,this.value,null,{},0)};var nS=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};nS.prototype.getValue=function(t){return P(this._values[t].value.value)},nS.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new nM(this._values[t].property)),this._values[t].value=new nA(this._values[t].property,null===e?void 0:P(e))},nS.prototype.getTransition=function(t){return P(this._values[t].transition)},nS.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new nM(this._values[t].property)),this._values[t].transition=P(e)||void 0},nS.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end||this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))};var nL=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};nL.prototype.possiblyEvaluate=function(t,e,r){for(var n=new nO(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(nz),nR=function(t){this.specification=t};nR.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if("constant"!==t.expression.kind)return this._calculate(t.expression.evaluate(new nk(Math.floor(e.zoom-1),e)),t.expression.evaluate(new nk(Math.floor(e.zoom),e)),t.expression.evaluate(new nk(Math.floor(e.zoom+1),e)),e);var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}},nR.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},nR.prototype.interpolate=function(t){return t};var nF=function(t){this.specification=t};nF.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},nF.prototype.interpolate=function(){return!1};var nB=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 nA(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new nM(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};ne("DataDrivenProperty",nz),ne("DataConstantProperty",nI),ne("CrossFadedDataDrivenProperty",nD),ne("CrossFadedProperty",nR),ne("ColorRampProperty",nF);var nN="-transition",nj=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 nC(r.layout)),r.paint)){for(var n in this._transitionablePaint=new nS(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 nO(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(r5,n,t,e,r))return}if("visibility"===t){this.visibility=e;return}this._unevaluatedLayout.setValue(t,e)},e.prototype.getPaintProperty=function(t){return E(t,nN)?this._transitionablePaint.getTransition(t.slice(0,-nN.length)):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(r4,n,t,e,r))return!1}if(E(t,nN))return this._transitionablePaint.setTransition(t.slice(0,-nN.length),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.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),C(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)&&r6(this,t.call(r0,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:tC,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 nP&&rc(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(tL),nU={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},nV=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},nq=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function nH(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map(function(t){var i=nU[t.type].BYTES_PER_ELEMENT,a=r=nG(r,Math.max(e,i)),o=t.components||1;return n=Math.max(n,i),r+=i*o,{name:t.name,type:t.type,components:o,offset:a}}),size:nG(r,Math.max(n,e)),alignment:e}}function nG(t,e){return Math.ceil(t/e)*e}nq.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},nq.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},nq.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},nq.prototype.clear=function(){this.length=0},nq.prototype.resize=function(t){this.reserve(t),this.length=t},nq.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)}},nq.prototype._refreshViews=function(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")};var nW=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}(nq);nW.prototype.bytesPerElement=4,ne("StructArrayLayout2i4",nW);var nY=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}(nq);nY.prototype.bytesPerElement=8,ne("StructArrayLayout4i8",nY);var nX=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}(nq);nX.prototype.bytesPerElement=12,ne("StructArrayLayout2i4i12",nX);var nZ=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}(nq);nZ.prototype.bytesPerElement=8,ne("StructArrayLayout2i4ub8",nZ);var nK=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}(nq);nK.prototype.bytesPerElement=8,ne("StructArrayLayout2f8",nK);var nJ=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 f=10*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint16[f+8]=u,this.uint16[f+9]=c,t},e}(nq);nJ.prototype.bytesPerElement=20,ne("StructArrayLayout10ui20",nJ);var n$=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,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,u,c,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=u,this.int16[p+9]=c,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(nq);n$.prototype.bytesPerElement=24,ne("StructArrayLayout4i4ui4i24",n$);var nQ=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}(nq);nQ.prototype.bytesPerElement=12,ne("StructArrayLayout3f12",nQ);var n0=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){return this.uint32[1*t+0]=e,t},e}(nq);n0.prototype.bytesPerElement=4,ne("StructArrayLayout1ul4",n0);var n1=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;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[5*t+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,t},e}(nq);n1.prototype.bytesPerElement=20,ne("StructArrayLayout6i1ul2ui20",n1);var n2=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}(nq);n2.prototype.bytesPerElement=12,ne("StructArrayLayout2i2i2i12",n2);var n3=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}(nq);n3.prototype.bytesPerElement=16,ne("StructArrayLayout2f1f2i16",n3);var n4=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}(nq);n4.prototype.bytesPerElement=12,ne("StructArrayLayout2ub2f12",n4);var n5=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}(nq);n5.prototype.bytesPerElement=6,ne("StructArrayLayout3ui6",n5);var n6=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,f,h,p,d,v,g){var y=this.length;return this.resize(y+1),this.emplace(y,t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y){var m=24*t,x=12*t,b=48*t;return this.int16[m+0]=e,this.int16[m+1]=r,this.uint16[m+2]=n,this.uint16[m+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[m+10]=l,this.uint16[m+11]=u,this.uint16[m+12]=c,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=v,this.uint32[x+10]=g,this.int16[m+22]=y,t},e}(nq);n6.prototype.bytesPerElement=48,ne("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",n6);var n8=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,f,h,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S,E){var L=34*t,C=17*t;return this.int16[L+0]=e,this.int16[L+1]=r,this.int16[L+2]=n,this.int16[L+3]=i,this.int16[L+4]=a,this.int16[L+5]=o,this.int16[L+6]=s,this.int16[L+7]=l,this.uint16[L+8]=u,this.uint16[L+9]=c,this.uint16[L+10]=f,this.uint16[L+11]=h,this.uint16[L+12]=p,this.uint16[L+13]=d,this.uint16[L+14]=v,this.uint16[L+15]=g,this.uint16[L+16]=y,this.uint16[L+17]=m,this.uint16[L+18]=x,this.uint16[L+19]=b,this.uint16[L+20]=_,this.uint16[L+21]=w,this.uint16[L+22]=T,this.uint32[C+12]=k,this.float32[C+13]=A,this.float32[C+14]=M,this.float32[C+15]=S,this.float32[C+16]=E,t},e}(nq);n8.prototype.bytesPerElement=68,ne("StructArrayLayout8i15ui1ul4f68",n8);var n7=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){return this.float32[1*t+0]=e,t},e}(nq);n7.prototype.bytesPerElement=4,ne("StructArrayLayout1f4",n7);var n9=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}(nq);n9.prototype.bytesPerElement=6,ne("StructArrayLayout3i6",n9);var 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._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=4*t;return this.uint32[2*t+0]=e,this.uint16[i+2]=r,this.uint16[i+3]=n,t},e}(nq);it.prototype.bytesPerElement=8,ne("StructArrayLayout1ul2ui8",it);var ie=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}(nq);ie.prototype.bytesPerElement=4,ne("StructArrayLayout2ui4",ie);var ir=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){return this.uint16[1*t+0]=e,t},e}(nq);ir.prototype.bytesPerElement=2,ne("StructArrayLayout1ui2",ir);var ii=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}(nq);ii.prototype.bytesPerElement=16,ne("StructArrayLayout4f16",ii);var ia=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 g(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(nV);ia.prototype.size=20;var io=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 ia(this,t)},e}(n1);ne("CollisionBoxArray",io);var is=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}(nV);is.prototype.size=48;var il=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 is(this,t)},e}(n6);ne("PlacedSymbolArray",il);var iu=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}(nV);iu.prototype.size=68;var ic=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 iu(this,t)},e}(n8);ne("SymbolInstanceArray",ic);var ih=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}(n7);ne("GlyphOffsetArray",ih);var ip=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}(n9);ne("SymbolLineVertexArray",ip);var id=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}(nV);id.prototype.size=8;var iv=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 id(this,t)},e}(it);ne("FeatureIndexArray",iv);var ig=nH([{name:"a_pos",components:2,type:"Int16"}],4).members,iy=function(t){void 0===t&&(t=[]),this.segments=t};function im(t,e){return 256*(t=b(Math.floor(t),0,255))+(e=b(Math.floor(e),0,255))}iy.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>iy.MAX_VERTEX_ARRAY_LENGTH&&I("Max vertices per segment is "+iy.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>iy.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},iy.prototype.get=function(){return this.segments},iy.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*3432918353&65535)<<16)&4294967295)<<15|o>>>17))*461845907+(((o>>>16)*461845907&65535)<<16)&4294967295,i=(65535&(a=(65535&(i=i<<13|i>>>19))*5+(((i>>>16)*5&65535)<<16)&4294967295))+27492+(((a>>>16)+58964&65535)<<16);switch(o=0,r){case 3:o^=(255&t.charCodeAt(s+2))<<16;case 2:o^=(255&t.charCodeAt(s+1))<<8;case 1:o^=255&t.charCodeAt(s),i^=o=(65535&(o=(o=(65535&o)*3432918353+(((o>>>16)*3432918353&65535)<<16)&4294967295)<<15|o>>>17))*461845907+(((o>>>16)*461845907&65535)<<16)&4294967295}return i^=t.length,i^=i>>>16,i=(65535&i)*2246822507+(((i>>>16)*2246822507&65535)<<16)&4294967295,i^=i>>>13,i=(65535&i)*3266489909+(((i>>>16)*3266489909&65535)<<16)&4294967295,(i^=i>>>16)>>>0}}),i_=e(function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))*1540483477+(((r>>>16)*1540483477&65535)<<16),r^=r>>>24,i=(65535&i)*1540483477+(((i>>>16)*1540483477&65535)<<16)^(r=(65535&r)*1540483477+(((r>>>16)*1540483477&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^=255&t.charCodeAt(a),i=(65535&i)*1540483477+(((i>>>16)*1540483477&65535)<<16)}return i^=i>>>13,i=(65535&i)*1540483477+(((i>>>16)*1540483477&65535)<<16),(i^=i>>>15)>>>0}});ib.murmur3=ib,ib.murmur2=i_;var iw=function(){this.ids=[],this.positions=[],this.indexed=!1};function iT(t){var e=+t;return!isNaN(e)&&e<=9007199254740991?e:ib(String(t))}function ik(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}iw.prototype.add=function(t,e,r,n){this.ids.push(iT(t)),this.positions.push(e,r,n)},iw.prototype.getPositions=function(t){for(var e=iT(t),r=0,n=this.ids.length-1;r>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},iw.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],o=n-1,s=i+1;;){do o++;while(e[o]a);if(o>=s)break;ik(e,o,s),ik(r,3*o,3*s),ik(r,3*o+1,3*s+1),ik(r,3*o+2,3*s+2)}s-no.x+1||lo.y+1)&&I("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function iH(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?iq(t):[]}}function iG(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}iU.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},iU.prototype.updatePaintArrays=function(t,e,r,n){for(var i=0;i1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function i$(t,e){for(var r,n,i,a=!1,o=0;oe.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 iQ(t,e){for(var r=!1,n=0,i=t.length-1;ne.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 i0(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function i1(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function i2(t,e,r,n,i){if(!e[0]&&!e[1])return t;var a=g.convert(e)._mult(i);"viewport"===r&&a._rotate(-n);for(var o=[],s=0;s=8192)&&!(u<0)&&!(u>=8192)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),f=c.vertexLength;iG(this.layoutVertexArray,l,u,-1,-1),iG(this.layoutVertexArray,l,u,1,-1),iG(this.layoutVertexArray,l,u,1,1),iG(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(f,f+1,f+2),this.indexArray.emplaceBack(f,f+3,f+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},ne("CircleBucket",iW,{omit:["layers"]});var i3=new nB({"circle-sort-key":new nz(tC.layout_circle["circle-sort-key"])}),i4={paint:new nB({"circle-radius":new nz(tC.paint_circle["circle-radius"]),"circle-color":new nz(tC.paint_circle["circle-color"]),"circle-blur":new nz(tC.paint_circle["circle-blur"]),"circle-opacity":new nz(tC.paint_circle["circle-opacity"]),"circle-translate":new nI(tC.paint_circle["circle-translate"]),"circle-translate-anchor":new nI(tC.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new nI(tC.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new nI(tC.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new nz(tC.paint_circle["circle-stroke-width"]),"circle-stroke-color":new nz(tC.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new nz(tC.paint_circle["circle-stroke-opacity"])}),layout:i3},i5="undefined"!=typeof Float32Array?Float32Array:Array;function i6(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 i8(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],f=e[8],h=e[9],p=e[10],d=e[11],v=e[12],g=e[13],y=e[14],m=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*v,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*u+_*p+w*y,t[3]=x*o+b*c+_*d+w*m,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*v,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*u+_*p+w*y,t[7]=x*o+b*c+_*d+w*m,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*v,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*u+_*p+w*y,t[11]=x*o+b*c+_*d+w*m,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*v,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*u+_*p+w*y,t[15]=x*o+b*c+_*d+w*m,t}function i7(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}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)}),r=new i5(3),i5!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),n=new i5(4),i5!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0,n[3]=0),i=new i5(2),i5!=Float32Array&&(i[0]=0,i[1]=0);var i9=function(t){function e(e){t.call(this,e,i4)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new iW(t)},e.prototype.queryRadius=function(t){return i0("circle-radius",this,t)+i0("circle-stroke-width",this,t)+i1(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=i2(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"),f=c?l:l.map(function(t){return at(t,s)}),h=c?u*o:u,p=0;pt.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw 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 RangeError("out of range destination coordinates for image copy");for(var o=t.data,s=e.data,l=0;l=a.next.y&&a.next.y!==a.y){var u=a.x+(s-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(u<=o&&u>l){if(l=u,u===o){if(s===a.y)return a;if(s===a.next.y)return a.next}i=a.x=a.x&&a.x>=h&&o!==a.x&&ax(si.x||a.x===i.x&&(r=i,n=a,0>ab(r.prev,r,n.prev)&&0>ab(n.next,r,r.next))))&&(i=a,d=c)),a=a.next;while(a!==f);return i}(t,e)){var r=aM(e,t);ag(e,e.next),ag(r,r.next)}})(u[i],r),r=ag(r,r.next);return r}(t,e,h,r)),t.length>80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);u=0!==(u=Math.max(a-n,o-i))?1/u:0}return function t(e,r,n,i,a,o,s){if(e){!s&&o&&function(t,e,r,n){var i=t;do null===i.z&&(i.z=am(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;e0||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)}(e,i,a,o);for(var l,u,c=e;e.prev!==e.next;){if(l=e.prev,u=e.next,o?function(t,e,r,n){var i=t.prev,a=t.next;if(ab(i,t,a)>=0)return!1;for(var o=i.xt.x?i.x>a.x?i.x:a.x:t.x>a.x?t.x:a.x,u=i.y>t.y?i.y>a.y?i.y:a.y:t.y>a.y?t.y:a.y,c=am(o,s,e,r,n),f=am(l,u,e,r,n),h=t.prevZ,p=t.nextZ;h&&h.z>=c&&p&&p.z<=f;){if(h!==t.prev&&h!==t.next&&ax(i.x,i.y,t.x,t.y,a.x,a.y,h.x,h.y)&&ab(h.prev,h,h.next)>=0||(h=h.prevZ,p!==t.prev&&p!==t.next&&ax(i.x,i.y,t.x,t.y,a.x,a.y,p.x,p.y)&&ab(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;h&&h.z>=c;){if(h!==t.prev&&h!==t.next&&ax(i.x,i.y,t.x,t.y,a.x,a.y,h.x,h.y)&&ab(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=f;){if(p!==t.prev&&p!==t.next&&ax(i.x,i.y,t.x,t.y,a.x,a.y,p.x,p.y)&&ab(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}(e,i,a,o):function(t){var e=t.prev,r=t.next;if(ab(e,t,r)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(ax(e.x,e.y,t.x,t.y,r.x,r.y,n.x,n.y)&&ab(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}(e)){r.push(l.i/n),r.push(e.i/n),r.push(u.i/n),aE(e),e=u.next,c=u.next;continue}if((e=u)===c){s?1===s?t(e=function(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!a_(i,a)&&aw(i,n,n.next,a)&&aA(i,a)&&aA(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),aE(n),aE(n.next),n=t=a),n=n.next}while(n!==t);return ag(n)}(ag(e),r,n),r,n,i,a,o,2):2===s&&function(e,r,n,i,a,o){var s=e;do{for(var l,u,c=s.next.next;c!==s.prev;){if(s.i!==c.i&&(l=s,u=c,l.next.i!==u.i&&l.prev.i!==u.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&&aw(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(l,u)&&(aA(l,u)&&aA(u,l)&&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}(l,u)&&(ab(l.prev,l,u.prev)||ab(l,u.prev,u))||a_(l,u)&&ab(l.prev,l,l.next)>0&&ab(u.prev,u,u.next)>0))){var f=aM(s,c);s=ag(s,s.next),f=ag(f,f.next),t(s,r,n,i,a,o),t(f,r,n,i,a,o);return}c=c.next}s=s.next}while(s!==e)}(e,r,n,i,a,o):t(ag(e),r,n,i,a,o,1);break}}}}(h,p,r,n,i,u),p}function av(t,e,r,n,i){var a,o;if(i===aC(t,e,r,n)>0)for(a=e;a=e;a-=n)o=aS(a,t[a],t[a+1],o);return o&&a_(o,o.next)&&(aE(o),o=o.next),o}function ag(t,e){if(!t)return t;e||(e=t);var r,n=t;do if(r=!1,!n.steiner&&(a_(n,n.next)||0===ab(n.prev,n,n.next))){if(aE(n),(n=e=n.prev)===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function ay(t,e){return t.x-e.x}function am(t,e,r,n,i){return(t=((t=((t=((t=((t=32767*(t-r)*i)|t<<8)&16711935)|t<<4)&252645135)|t<<2)&858993459)|t<<1)&1431655765)|(e=((e=((e=((e=((e=32767*(e-n)*i)|e<<8)&16711935)|e<<4)&252645135)|e<<2)&858993459)|e<<1)&1431655765)<<1}function ax(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 ab(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function a_(t,e){return t.x===e.x&&t.y===e.y}function aw(t,e,r,n){var i=ak(ab(t,e,r)),a=ak(ab(t,e,n)),o=ak(ab(r,n,t)),s=ak(ab(r,n,e));return!!(i!==a&&o!==s||0===i&&aT(t,r,e)||0===a&&aT(t,n,e)||0===o&&aT(r,t,n)||0===s&&aT(r,e,n))}function aT(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 ak(t){return t>0?1:t<0?-1:0}function aA(t,e){return 0>ab(t.prev,t,t.next)?ab(t,e,t.next)>=0&&ab(t,t.prev,e)>=0:0>ab(t,e,t.prev)||0>ab(t,t.next,e)}function aM(t,e){var r=new aL(t.i,t.x,t.y),n=new aL(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 aS(t,e,r,n){var i=new aL(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 aE(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 aL(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 aC(t,e,r,n){for(var i=0,a=e,o=r-n;ae?1:0}function aI(t,e){var r,n,i,a=t.length;if(a<=1)return[t];for(var o=[],s=0;s1)for(var u=0;un;){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),f=Math.max(n,Math.floor(r-s*u/o+c)),h=Math.min(i,Math.floor(r+(o-s)*u/o+c));t(e,r,f,h,a)}var p=e[r],d=n,v=i;for(aP(e,n,r),a(e[i],p)>0&&aP(e,n,i);da(e[d],p);)d++;for(;a(e[v],p)>0;)v--}0===a(e[n],p)?aP(e,n,v):aP(e,++v,i),v<=r&&(n=v+1),r<=v&&(i=v-1)}}(r=o[u],e,1,o[u].length-1||r.length-1,az||aO),o[u]=o[u].slice(0,e));return o}function az(t,e){return e.area-t.area}function aD(t,e,r){for(var n=r.patternDependencies,i=!1,a=0;a0&&(n+=t[i-1].length,r.holes.push(n))}return r},ap.default=ad;var aF=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 nW,this.indexArray=new n5,this.indexArray2=new ie,this.programConfigurations=new iU(t.layers,t.zoom),this.segments=new iy,this.segments2=new iy,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};aF.prototype.populate=function(t,e,r){this.hasPattern=aD("fill",this.layers,e);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],a=0;a>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 aW(t,e,r){if(3===t){var n=new aH(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}aV.types=["Unknown","Point","LineString","Polygon"],aV.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,a=0,o=0,s=[];t.pos>3}if(i--,1===n||2===n)a+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&s.push(e),e=[]),e.push(new g(a,o));else if(7===n)e&&e.push(e[0].clone());else throw Error("unknown command "+n)}return e&&s.push(e),s},aV.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>3}if(n--,1===r||2===r)i+=t.readSVarint(),a+=t.readSVarint(),is&&(s=i),au&&(u=a);else if(7!==r)throw Error("unknown command "+r)}return[o,l,s,u]},aV.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=aV.types[this.type];function c(t){for(var e=0;e=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new aV(this._pbf,e,this.extent,this._keys,this._values)};var aY={VectorTile:function(t,e){this.layers=t.readFields(aW,{},e)},VectorTileFeature:aV,VectorTileLayer:aH},aX=aY.VectorTileFeature.types;function aZ(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(8192*n)+o,16384*i,16384*a,Math.round(s))}var aK=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 nX,this.indexArray=new n5,this.programConfigurations=new iU(t.layers,t.zoom),this.segments=new iy,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};aK.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=aD("fill-extrusion",this.layers,e);for(var n=0;n8192})||g.every(function(t){return t.y<0})||g.every(function(t){return t.y>8192})))for(var p=0,d=0;d=1){var g,y=h[d-1];if((v.x!==y.x||!(v.x<0)&&!(v.x>8192))&&(v.y!==y.y||!(v.y<0)&&!(v.y>8192))){c.vertexLength+4>iy.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var m=v.sub(y)._perp()._unit(),x=y.dist(v);p+x>32768&&(p=0),aZ(this.layoutVertexArray,v.x,v.y,m.x,m.y,0,0,p),aZ(this.layoutVertexArray,v.x,v.y,m.x,m.y,0,1,p),p+=x,aZ(this.layoutVertexArray,y.x,y.y,m.x,m.y,0,0,p),aZ(this.layoutVertexArray,y.x,y.y,m.x,m.y,0,1,p);var b=c.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),c.vertexLength+=4,c.primitiveLength+=2}}}}if(c.vertexLength+l>iy.MAX_VERTEX_ARRAY_LENGTH&&(c=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===aX[t.type]){for(var _=[],w=[],T=c.vertexLength,k=0;k=2&&t[u-1].equals(t[u-2]);)u--;for(var c=0;c0;if(T&&y>c){var A=o.dist(p);if(A>2*f){var M=o.sub(o.sub(p)._mult(f/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,v,0,0,h),p=M}}var S=p&&d,E=S?r:l?"butt":n;if(S&&"round"===E&&(_i&&(E="bevel"),"bevel"===E&&(_>2&&(E="flipbevel"),_100)m=g.mult(-1);else{var L=_*v.add(g).mag()/v.sub(g).mag();m._perp()._mult(L*(k?-1:1))}this.addCurrentVertex(o,m,0,0,h),this.addCurrentVertex(o,m.mult(-1),0,0,h)}else if("bevel"===E||"fakeround"===E){var C=-Math.sqrt(_*_-1),P=k?C:0,O=k?0:C;if(p&&this.addCurrentVertex(o,v,P,O,h),"fakeround"===E)for(var I=Math.round(180*w/Math.PI/20),z=1;z2*f){var V=o.add(d.sub(o)._mult(f/U)._round());this.updateDistance(o,V),this.addCurrentVertex(V,g,0,0,h),o=V}}}}},a5.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>16384&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},a5.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,u=(this.lineClips?32767*this.scaledDistance:this.scaledDistance)*.5;if(this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,(0===a?0:a<0?-1:1)+1|(63&u)<<2,u>>6),this.lineClips){var c=this.scaledDistance-this.lineClips.start,f=this.lineClips.end-this.lineClips.start;this.layoutVertexArray2.emplaceBack(c/f,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},a5.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},a5.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},ne("LineBucket",a5,{omit:["layers","patternFeatures"]});var a6=new nB({"line-cap":new nI(tC.layout_line["line-cap"]),"line-join":new nz(tC.layout_line["line-join"]),"line-miter-limit":new nI(tC.layout_line["line-miter-limit"]),"line-round-limit":new nI(tC.layout_line["line-round-limit"]),"line-sort-key":new nz(tC.layout_line["line-sort-key"])}),a8={paint:new nB({"line-opacity":new nz(tC.paint_line["line-opacity"]),"line-color":new nz(tC.paint_line["line-color"]),"line-translate":new nI(tC.paint_line["line-translate"]),"line-translate-anchor":new nI(tC.paint_line["line-translate-anchor"]),"line-width":new nz(tC.paint_line["line-width"]),"line-gap-width":new nz(tC.paint_line["line-gap-width"]),"line-offset":new nz(tC.paint_line["line-offset"]),"line-blur":new nz(tC.paint_line["line-blur"]),"line-dasharray":new nR(tC.paint_line["line-dasharray"]),"line-pattern":new nD(tC.paint_line["line-pattern"]),"line-gradient":new nF(tC.paint_line["line-gradient"])}),layout:a6},a7=new(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 nk(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=w({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(nz))(a8.paint.properties["line-width"].specification);a7.useIntegerZoom=!0;var a9=function(t){function e(e){t.call(this,e,a8),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 eL,this.gradientVersion=(this.gradientVersion+1)%9007199254740991}},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"]=a7.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new a5(t)},e.prototype.queryRadius=function(t){var e,r;return e=i0("line-width",this,t),((r=i0("line-gap-width",this,t))>0?r+2*e:e)/2+Math.abs(i0("line-offset",this,t))+i1(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o){var s,l,u=i2(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,o),c=o/2*(s=this.paint.get("line-width").evaluate(e,r),(l=this.paint.get("line-gap-width").evaluate(e,r))>0?l+2*s:s),f=this.paint.get("line-offset").evaluate(e,r);return f&&(n=function(t,e){for(var r=[],n=new g(0,0),i=0;i=3){for(var a=0;a1){if(iZ(t,e))return!0;for(var n=0;n":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","\xa2":"¢","\xa3":"£","\xa5":"¥","\xa6":"¦","\xac":"¬","\xaf":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},oo=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},os=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,h=23===i?5960464477539062e-23:0,p=n?0:a-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(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),o+f>=1?e+=h/l:e+=h*Math.pow(2,1-f),e*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*v};function ol(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}ol.Varint=0,ol.Fixed64=1,ol.Bytes=2,ol.Fixed32=5;var ou="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function oc(t){return t.type===ol.Bytes?t.readVarint()+t.pos:t.pos+1}function of(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 oh(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function oT(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function ok(t,e,r){1===t&&r.readMessage(oA,e)}function oA(t,e,r){if(3===t){var n=r.readMessage(oM,{}),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 aa({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:u,advance:c}})}}function oM(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())}function oS(t){for(var e=0,r=0,n=0;n=0;c--){var f=a[c];if(!(u.w>f.w)&&!(u.h>f.h)){if(u.x=f.x,u.y=f.y,s=Math.max(s,u.y+u.h),o=Math.max(o,u.x+u.w),u.w===f.w&&u.h===f.h){var h=a.pop();c>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=o_(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=oT(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=o_(this.buf,this.pos)+4294967296*o_(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=o_(this.buf,this.pos)+4294967296*oT(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=oo(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=oo(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,o,s=r.buf;if(a=(112&(o=s[r.pos++]))>>4,o<128||(a|=(127&(o=s[r.pos++]))<<3,o<128)||(a|=(127&(o=s[r.pos++]))<<10,o<128)||(a|=(127&(o=s[r.pos++]))<<17,o<128)||(a|=(127&(o=s[r.pos++]))<<24,o<128)||(a|=(1&(o=s[r.pos++]))<<31,o<128)){return n=t,i=a,e?4294967296*i+(n>>>0):(i>>>0)*4294967296+(n>>>0)}throw 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!!this.readVarint()},readString:function(){var t,e=this.readVarint()+this.pos,r=this.pos;return(this.pos=e,e-r>=12&&ou)?(t=this.buf,ou.decode(t.subarray(r,e))):function(t,e,r){for(var n="",i=e;i239?4:l>223?3:l>191?2:1;if(i+c>r)break;1===c?l<128&&(u=l):2===c?(192&(a=t[i+1]))==128&&(u=(31&l)<<6|63&a)<=127&&(u=null):3===c?(a=t[i+1],o=t[i+2],(192&a)==128&&(192&o)==128&&((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],(192&a)==128&&(192&o)==128&&(192&s)==128&&((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,r,e)},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!==ol.Bytes)return t.push(this.readVarint(e));var r=oc(this);for(t=t||[];this.pos127;);else if(e===ol.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ol.Fixed32)this.pos+=4;else if(e===ol.Fixed64)this.pos+=8;else throw Error("Unimplemented type: "+e)},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0){(function(t,e){var r,n,i,a,o,s;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(r=~(-t%4294967296),n=~(-t/4294967296),4294967295^r?r=r+1|0:(r=0,n=n+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw Error("Given varint doesn't fit into 10 bytes");e.realloc(10),i=r,e.buf[e.pos++]=127&i|128,i>>>=7,e.buf[e.pos++]=127&i|128,i>>>=7,e.buf[e.pos++]=127&i|128,i>>>=7,e.buf[e.pos++]=127&i|128,i>>>=7,e.buf[e.pos]=127&i,a=n,o=e,s=(7&a)<<4,o.buf[o.pos++]|=s|((a>>>=3)?128:0),!a||(o.buf[o.pos++]=127&a|((a>>>=7)?128:0),!a)||(o.buf[o.pos++]=127&a|((a>>>=7)?128:0),!a)||(o.buf[o.pos++]=127&a|((a>>>=7)?128:0),!a)||(o.buf[o.pos++]=127&a|((a>>>=7)?128:0),a&&(o.buf[o.pos++]=127&a))})(t,this);return}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(!!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;a55295&&n<57344){if(i){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{n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}}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&&of(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),os(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),os(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=128&&of(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ol.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,oh,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,op,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,og,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,od,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,ov,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,oy,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,om,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,ox,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,ob,e)},writeBytesField:function(t,e){this.writeTag(t,ol.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ol.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ol.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,!!e)}};var oE=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},oL={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};oL.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},oL.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},oL.tlbr.get=function(){return this.tl.concat(this.br)},oL.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(oE.prototype,oL);var oC=function(t,e){var r={},n={};this.haveRenderCallbacks=[];var i=[];this.addImages(t,r,i),this.addImages(e,n,i);var a=oS(i),o=new ao({width:a.w||1,height:a.h||1});for(var s in t){var l=t[s],u=r[s].paddedRect;ao.copy(l.data,o,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(var c in e){var f=e[c],h=n[c].paddedRect,p=h.x+1,d=h.y+1,v=f.data.width,g=f.data.height;ao.copy(f.data,o,{x:0,y:0},{x:p,y:d},f.data),ao.copy(f.data,o,{x:0,y:g-1},{x:p,y:d-1},{width:v,height:1}),ao.copy(f.data,o,{x:0,y:0},{x:p,y:d+g},{width:v,height:1}),ao.copy(f.data,o,{x:v-1,y:0},{x:p-1,y:d},{width:1,height:g}),ao.copy(f.data,o,{x:0,y:0},{x:p+v,y:d},{width:1,height:g})}this.image=o,this.iconPositions=r,this.patternPositions=n};oC.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,h:i.data.height+2};r.push(a),e[n]=new oE(a,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},oC.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)},oC.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})}},ne("ImagePosition",oE),ne("ImageAtlas",oC);var oP={horizontal:1,vertical:2,horizontalOnly:3},oO=function(){this.scale=1,this.fontStack="",this.imageName=null};oO.forText=function(t,e){var r=new oO;return r.scale=t||1,r.fontStack=e,r},oO.forImage=function(t){var e=new oO;return e.imageName=t,e};var oI=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function oz(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v){var g,y=oI.fromFeature(t,i);f===oP.vertical&&y.verticalizePunctuation();var m=nw.processBidirectionalText,x=nw.processStyledBidirectionalText;if(m&&1===y.sections.length){g=[];for(var b=m(y.toString(),oj(y,u,a,e,n,p,d)),_=0;_0&&F>k&&(k=F)}else{var B=r[M.fontStack],N=B&&B[E];if(N&&N.rect)P=N.rect,C=N.metrics;else{var j=e[M.fontStack],U=j&&j[E];if(!U)continue;C=U.metrics}L=(b-M.scale)*24}z?(t.verticalizable=!0,T.push({glyph:E,imageName:O,x:h,y:p+L,vertical:z,scale:M.scale,fontStack:M.fontStack,sectionIndex:S,metrics:C,rect:P}),h+=I*M.scale+u):(T.push({glyph:E,imageName:O,x:h,y:p+L,vertical:z,scale:M.scale,fontStack:M.fontStack,sectionIndex:S,metrics:C,rect:P}),h+=C.advance*M.scale+u)}0!==T.length&&(d=Math.max(h-u,d),function(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=0;l<=r;l++)t[l].x-=s,t[l].y+=i}(T,0,T.length-1,g,k)),h=0;var V=a*b+k;w.lineOffset=Math.max(k,_),p+=V,v=Math.max(V,v),++y}var q=p- -17,H=oU(o),G=H.horizontalAlign,W=H.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var u=(e-r)*i,c=0;c=a!==o?-s*n- -17:(-n*l+.5)*o;for(var f=0;f=0&&n>=t&&oD[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},oI.prototype.substring=function(t,e){var r=new oI;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},oI.prototype.toString=function(){return this.text},oI.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,r){return Math.max(e,t.sections[r].scale)},0)},oI.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(oO.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var oD={};oD[9]=!0,oD[10]=!0,oD[11]=!0,oD[12]=!0,oD[13]=!0,oD[32]=!0;var oR={};function oF(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*24/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function oB(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,c=0,f=0;f-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;sn;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=f.dist(h)}return!0}function oZ(t){for(var e=0,r=0;r=n)||!(f.x>=n))&&(c.x>=n?c=new g(n,c.y+(f.y-c.y)*((n-c.x)/(f.x-c.x)))._round():f.x>=n&&(f=new g(n,c.y+(f.y-c.y)*((n-c.x)/(f.x-c.x)))._round()),c.y>=i&&f.y>=i||(c.y>=i?c=new g(c.x+(f.x-c.x)*((i-c.y)/(f.y-c.y)),i)._round():f.y>=i&&(f=new g(c.x+(f.x-c.x)*((i-c.y)/(f.y-c.y)),i)._round()),l&&c.equals(l[l.length-1])||(l=[c],a.push(l)),l.push(f)))}return a}function o$(t,e,r,n){var i=[],a=t.image,o=a.pixelRatio,s=a.paddedRect.w-2,l=a.paddedRect.h-2,u=t.right-t.left,c=t.bottom-t.top,f=a.stretchX||[[0,s]],h=a.stretchY||[[0,l]],p=function(t,e){return t+e[1]-e[0]},d=f.reduce(p,0),v=h.reduce(p,0),y=s-d,m=l-v,x=0,b=d,_=0,w=v,T=0,k=y,A=0,M=m;if(a.content&&n){var S=a.content;x=oQ(f,0,S[0]),_=oQ(h,0,S[1]),b=oQ(f,S[0],S[2]),w=oQ(h,S[1],S[3]),T=S[0]-x,A=S[1]-_,k=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,i,s,l){var f,h,p,y,m=(n.stretch-x)/b*u+t.left,S=(f=n.fixed-T,f-k*n.stretch/d),E=(i.stretch-_)/w*c+t.top,L=(h=i.fixed-A,h-M*i.stretch/v),C=(s.stretch-x)/b*u+t.left,P=(p=s.fixed-T,p-k*s.stretch/d),O=(l.stretch-_)/w*c+t.top,I=(y=l.fixed-A,y-M*l.stretch/v),z=new g(m,E),D=new g(C,E),R=new g(C,O),F=new g(m,O),B=new g(S/o,L/o),N=new g(P/o,I/o),j=e*Math.PI/180;if(j){var U=Math.sin(j),V=Math.cos(j),q=[V,-U,U,V];z._matMult(q),D._matMult(q),F._matMult(q),R._matMult(q)}var H=n.stretch+n.fixed,G=s.stretch+s.fixed,W=i.stretch+i.fixed,Y=l.stretch+l.fixed;return{tl:z,tr:D,bl:F,br:R,tex:{x:a.paddedRect.x+1+H,y:a.paddedRect.y+1+W,w:G-H,h:Y-W},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:B,pixelOffsetBR:N,minFontScaleX:k/o/u,minFontScaleY:M/o/c,isSDF:r}};if(n&&(a.stretchX||a.stretchY))for(var L=o0(f,y,d),C=o0(h,m,v),P=0;P0&&(p=Math.max(10,p),this.circleDiameter=p)}else{var d=a.top*o-s,v=a.bottom*o+s,y=a.left*o-s,m=a.right*o+s,x=a.collisionPadding;if(x&&(y-=x[0]*o,d-=x[1]*o,m+=x[2]*o,v+=x[3]*o),u){var b=new g(y,d),_=new g(m,d),w=new g(y,v),T=new g(m,v),k=u*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),y=Math.min(b.x,_.x,w.x,T.x),m=Math.max(b.x,_.x,w.x,T.x),d=Math.min(b.y,_.y,w.y,T.y),v=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,y,d,m,v,r,n,i)}this.boxEndIndex=t.length},o2=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=o3),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 o3(t,e){return te?1:0}function o4(t,e){return e.max-t.max}function o5(t,e,r,n){this.p=new g(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.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,iJ(t,u,c))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}o2.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},o2.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}},o2.prototype.peek=function(){return this.data[0]},o2.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},o2.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];tr(e[s],o)&&(a=s,o=e[s]),r(o,i)>=0)break;e[t]=o,t=a}e[t]=i};var o6=Number.POSITIVE_INFINITY;function o8(t,e){return e[1]!==o6?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-7;break;case"bottom-right":case"bottom-left":case"bottom":i=-r+7}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-7;break;case"bottom-right":case"bottom-left":n=-i+7;break;case"bottom":n=-e+7;break;case"top":n=e-7}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 o7(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"}function o9(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d){var v=function(t,e,r,n,i,a,o,s){for(var l=n.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,u=[],c=0,f=e.positionedLines;c32640&&I(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===y.kind&&((m=[128*p.compositeTextSizes[0].evaluate(o,{},d),128*p.compositeTextSizes[1].evaluate(o,{},d)])[0]>32640||m[1]>32640)&&I(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,v,m,s,a,o,u,e,l.lineStartIndex,l.lineLength,h,d);for(var x=0;x0)&&("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 f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new nk(this.zoom),v=0;v=0;for(var O=0,I=T.sections;O=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;l0},ss.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ss.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ss.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ss.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ss.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1)&&!(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=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)}},ne("SymbolBucket",ss,{omit:["layers","collisionBoxArray","features","compareText"]}),ss.MAX_GLYPHS=65535,ss.addDynamicAttributes=si;var sl=new nB({"symbol-placement":new nI(tC.layout_symbol["symbol-placement"]),"symbol-spacing":new nI(tC.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new nI(tC.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new nz(tC.layout_symbol["symbol-sort-key"]),"symbol-z-order":new nI(tC.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new nI(tC.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new nI(tC.layout_symbol["icon-ignore-placement"]),"icon-optional":new nI(tC.layout_symbol["icon-optional"]),"icon-rotation-alignment":new nI(tC.layout_symbol["icon-rotation-alignment"]),"icon-size":new nz(tC.layout_symbol["icon-size"]),"icon-text-fit":new nI(tC.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new nI(tC.layout_symbol["icon-text-fit-padding"]),"icon-image":new nz(tC.layout_symbol["icon-image"]),"icon-rotate":new nz(tC.layout_symbol["icon-rotate"]),"icon-padding":new nI(tC.layout_symbol["icon-padding"]),"icon-keep-upright":new nI(tC.layout_symbol["icon-keep-upright"]),"icon-offset":new nz(tC.layout_symbol["icon-offset"]),"icon-anchor":new nz(tC.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new nI(tC.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new nI(tC.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new nI(tC.layout_symbol["text-rotation-alignment"]),"text-field":new nz(tC.layout_symbol["text-field"]),"text-font":new nz(tC.layout_symbol["text-font"]),"text-size":new nz(tC.layout_symbol["text-size"]),"text-max-width":new nz(tC.layout_symbol["text-max-width"]),"text-line-height":new nI(tC.layout_symbol["text-line-height"]),"text-letter-spacing":new nz(tC.layout_symbol["text-letter-spacing"]),"text-justify":new nz(tC.layout_symbol["text-justify"]),"text-radial-offset":new nz(tC.layout_symbol["text-radial-offset"]),"text-variable-anchor":new nI(tC.layout_symbol["text-variable-anchor"]),"text-anchor":new nz(tC.layout_symbol["text-anchor"]),"text-max-angle":new nI(tC.layout_symbol["text-max-angle"]),"text-writing-mode":new nI(tC.layout_symbol["text-writing-mode"]),"text-rotate":new nz(tC.layout_symbol["text-rotate"]),"text-padding":new nI(tC.layout_symbol["text-padding"]),"text-keep-upright":new nI(tC.layout_symbol["text-keep-upright"]),"text-transform":new nz(tC.layout_symbol["text-transform"]),"text-offset":new nz(tC.layout_symbol["text-offset"]),"text-allow-overlap":new nI(tC.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new nI(tC.layout_symbol["text-ignore-placement"]),"text-optional":new nI(tC.layout_symbol["text-optional"])}),su={paint:new nB({"icon-opacity":new nz(tC.paint_symbol["icon-opacity"]),"icon-color":new nz(tC.paint_symbol["icon-color"]),"icon-halo-color":new nz(tC.paint_symbol["icon-halo-color"]),"icon-halo-width":new nz(tC.paint_symbol["icon-halo-width"]),"icon-halo-blur":new nz(tC.paint_symbol["icon-halo-blur"]),"icon-translate":new nI(tC.paint_symbol["icon-translate"]),"icon-translate-anchor":new nI(tC.paint_symbol["icon-translate-anchor"]),"text-opacity":new nz(tC.paint_symbol["text-opacity"]),"text-color":new nz(tC.paint_symbol["text-color"],{runtimeType:tV,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new nz(tC.paint_symbol["text-halo-color"]),"text-halo-width":new nz(tC.paint_symbol["text-halo-width"]),"text-halo-blur":new nz(tC.paint_symbol["text-halo-blur"]),"text-translate":new nI(tC.paint_symbol["text-translate"]),"text-translate-anchor":new nI(tC.paint_symbol["text-translate-anchor"])}),layout:sl},sc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:tB,this.defaultValue=t};sc.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},sc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},sc.prototype.outputDefined=function(){return!1},sc.prototype.serialize=function(){return null},ne("FormatSectionOverride",sc,{omit:["defaultValue"]});var sf=function(t){function e(e){t.call(this,e,su)}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;ai.indexOf(o)&&i.push(o)}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,a=this.layout.get(t).evaluate(e,{},r,n),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||rw(o.value)||!a?a:(i=e.properties,a.replace(/{([^{}]+)}/g,function(t,e){return e in i?String(i[e]):""}))},e.prototype.createBucket=function(t){return new ss(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype._setPaintOverrides=function(){for(var t=0,r=su.paint.overridableProperties;t",targetMapId:n,sourceMapId:a.mapId})}}},sA.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId)){if(""===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else D()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)}},sA.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)}},sA.prototype.processTask=function(t,e){var r=this;if(""===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(no(e.error)):n(null,no(e.data)))}else{var i=!1,a=B(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:"",sourceMapId:r.mapId,error:e?na(e):null,data:na(n,a)},a)}:function(t){i=!0},s=null,l=no(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(Error("Could not find function "+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},sA.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var sS=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]))};sS.prototype.setNorthEast=function(t){return this._ne=t instanceof sE?new sE(t.lng,t.lat):sE.convert(t),this},sS.prototype.setSouthWest=function(t){return this._sw=t instanceof sE?new sE(t.lng,t.lat):sE.convert(t),this},sS.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof sE)e=t,r=t;else if(!(t instanceof sS))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(sS.convert(t)):this.extend(sE.convert(t)):this;else 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 sE(e.lng,e.lat),this._ne=new sE(r.lng,r.lat)),this},sS.prototype.getCenter=function(){return new sE((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},sS.prototype.getSouthWest=function(){return this._sw},sS.prototype.getNorthEast=function(){return this._ne},sS.prototype.getNorthWest=function(){return new sE(this.getWest(),this.getNorth())},sS.prototype.getSouthEast=function(){return new sE(this.getEast(),this.getSouth())},sS.prototype.getWest=function(){return this._sw.lng},sS.prototype.getSouth=function(){return this._sw.lat},sS.prototype.getEast=function(){return this._ne.lng},sS.prototype.getNorth=function(){return this._ne.lat},sS.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},sS.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},sS.prototype.isEmpty=function(){return!(this._sw&&this._ne)},sS.prototype.contains=function(t){var e=sE.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},sS.convert=function(t){return!t||t instanceof sS?t:new sS(t)};var sE=function(t,e){if(isNaN(t)||isNaN(e))throw Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")};sE.prototype.wrap=function(){return new sE(_(this.lng,-180,180),this.lat)},sE.prototype.toArray=function(){return[this.lng,this.lat]},sE.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},sE.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e;return 6371008.8*Math.acos(Math.min(Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e),1))},sE.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 sS(new sE(this.lng-r,this.lat-e),new sE(this.lng+r,this.lat+e))},sE.convert=function(t){if(t instanceof sE)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new sE(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new sE(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var sL=2*Math.PI*6371008.8;function sC(t){return sL*Math.cos(t*Math.PI/180)}function sP(t){return(180+t)/360}function sO(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function sI(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}var sz=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};sz.fromLngLat=function(t,e){void 0===e&&(e=0);var r=sE.convert(t);return new sz(sP(r.lng),sO(r.lat),e/sC(r.lat))},sz.prototype.toLngLat=function(){return new sE(360*this.x-180,sI(this.y))},sz.prototype.toAltitude=function(){return this.z*sC(sI(this.y))},sz.prototype.meterInMercatorCoordinateUnits=function(){return 1/sL*(1/Math.cos(sI(this.y)*Math.PI/180))};var sD=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=sB(0,t,t,e,r)};sD.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},sD.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,a=sM(256*r,256*(n=Math.pow(2,i=this.z)-n-1),i),o=sM((r+1)*256,(n+1)*256,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<this.canonical.z?new sF(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new sF(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},sF.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?sB(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):sB(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},sF.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>e&&t.canonical.y===this.canonical.y>>e},sF.prototype.children=function(t){if(this.overscaledZ>=t)return[new sF(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 sF(e,this.wrap,e,r,n),new sF(e,this.wrap,e,r+1,n),new sF(e,this.wrap,e,r,n+1),new sF(e,this.wrap,e,r+1,n+1)]},sF.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},sN.prototype._unpackMapbox=function(t,e,r){return(65536*t+256*e+r)/10-1e4},sN.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},sN.prototype.getPixels=function(){return new ao({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},sN.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw 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=0&&c[3]>=0&&s.insert(o,c[0],c[1],c[2],c[3])}},sH.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new aY.VectorTile(new ol(this.rawTileData)).layers,this.sourceLayerCoder=new sj(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},sH.prototype.query=function(t,e,r,n){var i,a=this;this.loadVTLayers();for(var o=t.params||{},s=8192/t.tileSize/t.scale,l=rR(o.filter),u=t.queryGeometry,c=t.queryPadding*s,f=sW(u),h=this.grid.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c),p=sW(t.cameraQueryGeometry),d=this.grid3D.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c,function(e,r,n,i){return function(t,e,r,n,i){for(var a=0;a=o.x&&i>=o.y)return!0}var s=[new g(e,r),new g(e,i),new g(n,i),new g(n,r)];if(t.length>2){for(var l=0;li.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=z(t,e,r[0]);return a!==z(t,e,r[1])||a!==z(t,e,r[2])||a!==z(t,e,r[3])}(t[u],t[u+1],s))return!0;return!1}(t.cameraQueryGeometry,e-c,r-c,n+c,i+c)}),v=0;v=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.needGeometry){var d=iH(p,!0);if(!i.filter(new nk(this.tileID.overscaledZ),d,this.tileID.canonical))return}else if(!i.filter(new nk(this.tileID.overscaledZ),p))return;for(var v=this.getId(p,h),g=0;ga.indexOf(y))){var m=s[y];if(m){var x={};void 0!==v&&u&&(x=u.getState(m.sourceLayer||"_geojsonTileLayer",v));var b=w({},l[y]);b.paint=sG(b.paint,m.paint,p,x,o),b.layout=sG(b.layout,m.layout,p,x,o);var _=!c||c(p,m,x);if(_){var T=new sU(p,this.z,this.x,this.y,v);T.layer=b;var k=t[y];void 0===k&&(k=t[y]=[]),k.push({featureIndex:n,feature:T,intersectionZ:_})}}}}}},sH.prototype.lookupSymbolFeatures=function(t,e,r,n,i,a,o,s){var l={};this.loadVTLayers();for(var u=rR(i),c=0;cn)i=!1;else if(e){if(this.expirationTimeth&&(t.getActor().send("enforceCacheSizeLimit",tf),tv=0)},t.clamp=b,t.clearTileCache=function(t){var e=y.caches.delete(tc);t&&e.catch(t).then(function(){return t()})},t.clipLine=oJ,t.clone=function(t){var e=new i5(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=P,t.clone$2=function(t){var e=new i5(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=oi,t.config=H,t.create=function(){var t=new i5(16);return i5!=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 i5(9);return i5!=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 i5(4);return i5!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=rT,t.createLayout=nH,t.createStyleLayer=function(t){return"custom"===t.type?new sg(t):new sy[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;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=eC,t.offscreenCanvasSupported=tg,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 ol(t).readFields(ok,[])},t.pbf=ol,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=8192/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 f=t.textSizeData,h=f.minZoom,p=f.maxZoom;c.compositeTextSizes=[u["text-size"].possiblyEvaluate(new nk(h),o),u["text-size"].possiblyEvaluate(new nk(p),o)]}if("composite"===t.iconSizeData.kind){var d=t.iconSizeData,v=d.minZoom,y=d.maxZoom;c.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new nk(v),o),u["icon-size"].possiblyEvaluate(new nk(y),o)]}c.layoutTextSize=u["text-size"].possiblyEvaluate(new nk(t.zoom+1),o),c.layoutIconSize=u["icon-size"].possiblyEvaluate(new nk(t.zoom+1),o),c.textMaxSize=u["text-size"].possiblyEvaluate(new nk(18));for(var m=24*l.get("text-line-height"),x="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),b=l.get("text-keep-upright"),_=l.get("text-size"),w=0,T=t.features;w=8192||h.y<0||h.y>=8192||function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,w,T,k){var A,M,S,E,L,C=t.addToLineVertexArray(e,r),P=0,O=0,z=0,D=0,R=-1,F=-1,B={},N=ib(""),j=0,U=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(j=(A=s.layout.get("text-offset").evaluate(b,{},T).map(function(t){return 24*t}))[0],U=A[1]):(j=24*s.layout.get("text-radial-offset").evaluate(b,{},T),U=o6),t.allowVerticalPlacement&&n.vertical){var V=s.layout.get("text-rotate").evaluate(b,{},T)+90;E=new o1(l,e,u,c,f,n.vertical,h,p,d,V),o&&(L=new o1(l,e,u,c,f,o,g,y,d,V))}if(i){var q=s.layout.get("icon-rotate").evaluate(b,{}),H="none"!==s.layout.get("icon-text-fit"),G=o$(i,q,w,H),W=o?o$(o,q,w,H):void 0;S=new o1(l,e,u,c,f,i,g,y,!1,q),P=4*G.length;var Y=t.iconSizeData,X=null;"source"===Y.kind?(X=[128*s.layout.get("icon-size").evaluate(b,{})])[0]>32640&&I(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===Y.kind&&((X=[128*_.compositeIconSizes[0].evaluate(b,{},T),128*_.compositeIconSizes[1].evaluate(b,{},T)])[0]>32640||X[1]>32640)&&I(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,G,X,x,m,b,!1,e,C.lineStartIndex,C.lineLength,-1,T),R=t.icon.placedSymbolArray.length-1,W&&(O=4*W.length,t.addSymbols(t.icon,W,X,x,m,b,oP.vertical,e,C.lineStartIndex,C.lineLength,-1,T),F=t.icon.placedSymbolArray.length-1)}for(var Z in n.horizontal){var K=n.horizontal[Z];M||(N=ib(K.text),M=new o1(l,e,u,c,f,K,h,p,d,s.layout.get("text-rotate").evaluate(b,{},T)));var J=1===K.positionedLines.length;if(z+=o9(t,e,K,a,s,d,b,v,C,n.vertical?oP.horizontal:oP.horizontalOnly,J?Object.keys(n.horizontal):[Z],B,R,_,T),J)break}n.vertical&&(D+=o9(t,e,n.vertical,a,s,d,b,v,C,oP.vertical,["vertical"],B,F,_,T));var $=M?M.boxStartIndex:t.collisionBoxArray.length,Q=M?M.boxEndIndex:t.collisionBoxArray.length,tt=E?E.boxStartIndex:t.collisionBoxArray.length,te=E?E.boxEndIndex:t.collisionBoxArray.length,tr=S?S.boxStartIndex:t.collisionBoxArray.length,tn=S?S.boxEndIndex:t.collisionBoxArray.length,ti=L?L.boxStartIndex:t.collisionBoxArray.length,ta=L?L.boxEndIndex:t.collisionBoxArray.length,to=-1,ts=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};to=ts(M,-1),to=ts(E,to),to=ts(S,to);var tl=(to=ts(L,to))>-1?1:0;tl&&(to*=k/24),t.glyphOffsetArray.length>=ss.MAX_GLYPHS&&I("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.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,$,Q,tt,te,tr,tn,ti,ta,u,z,D,P,O,tl,0,h,j,U,to)}(t,h,s,r,n,i,f,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,m,w,A,l,b,T,M,d,e,a,u,c,o)};if("line"===S)for(var P=0,O=oJ(e.geometry,0,0,8192,8192);P=0&&_=0&&w=0&&p+c<=f){var T=new oq(_,w,x,v);T._round(),(!i||oX(e,T,o,i,a))&&d.push(T)}}h+=m}return l||d.length||s||(d=t(e,h/2,n,i,a,o,s,!0,u)),d}(t,h?e/2*s%e:(c/2+48)*o*s%e,e,u,r,f,h,!1,8192)}(z,_,k,r.vertical||v,n,0,x,t.overscaling,8192),R=0;R=0;o--)if(n.dist(a[o])1){var U=function(t,e,r,n,i,a){for(var o=r?.6*24*a:0,s=oK(r,n)*a,l=0,u=oZ(t)/2,c=0;cu){var d=(u-l)/p,v=new oq(eC(f.x,h.x,d),eC(f.y,h.y,d),h.angleTo(f),c);if(v._round(),!o||oX(t,v,s,o,e))return v;return}l+=p}}(j,k,r.vertical||v,n,0,x);U&&C(j,U)}}else if("Polygon"===e.type)for(var V=0,q=aI(e.geometry,0);Va)&&(a=u.x),(!l||u.y>o)&&(o=u.y)}var c=Math.min(a-n,o-i),f=c/2,h=new o2([],o4);if(0===c)return new g(n,i);for(var p=n;pv.d||!v.d)&&(v=m,r&&console.log("found best %d after %d probes",Math.round(1e4*m.d)/1e4,y)),m.max-v.d<=e||(f=m.h/2,h.push(new o5(m.p.x-f,m.p.y-f,f,t)),h.push(new o5(m.p.x+f,m.p.y-f,f,t)),h.push(new o5(m.p.x-f,m.p.y+f,f,t)),h.push(new o5(m.p.x+f,m.p.y+f,f,t)),y+=4)}return r&&(console.log("num probes: "+y),console.log("best distance: "+v.d)),v.p}(H,16);C(H[0],new oq(G.x,G.y,0))}else if("LineString"===e.type)for(var W=0,Y=e.geometry;W=E.maxzoom||"none"===E.visibility||(i(S,this.zoom,a),(v[E.id]=E.createBucket({index:d.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,g,this.tileID.canonical),d.bucketLayerIDs.push(S.map(function(t){return t.id})))}}}var L=t.mapObject(g.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(L).length?o.send("getGlyphs",{uid:this.uid,stacks:L},function(t,e){l||(l=t,u=e,O.call(h))}):u={};var C=Object.keys(g.iconDependencies);C.length?o.send("getImages",{icons:C,source:this.source,tileID:this.tileID,type:"icons"},function(t,e){l||(l=t,c=e,O.call(h))}):c={};var P=Object.keys(g.patternDependencies);function O(){if(l)return s(l);if(u&&c&&f){var e=new r(u),n=new t.ImageAtlas(c,f);for(var o in v){var h=v[o];h instanceof t.SymbolBucket?(i(h.layers,this.zoom,a),t.performSymbolLayout(h,u,e.positions,c,n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):h.hasPattern&&(h instanceof t.LineBucket||h instanceof t.FillBucket||h instanceof t.FillExtrusionBucket)&&(i(h.layers,this.zoom,a),h.addFeatures(g,this.tileID.canonical,n.patternPositions))}this.status="done",s(null,{buckets:t.values(v).filter(function(t){return!t.isEmpty()}),featureIndex:d,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:n,glyphMap:this.returnDependencies?u:null,iconMap:this.returnDependencies?c:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?o.send("getImages",{icons:P,source:this.source,tileID:this.tileID,type:"patterns"},function(t,e){l||(l=t,f=e,O.call(h))}):f={},O.call(this)};var o=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||a,this.loading={},this.loaded={}};o.prototype.loadTile=function(e,r){var i=this,a=e.uid;this.loading||(this.loading={});var o=!!e&&!!e.request&&!!e.request.collectResourceTiming&&new t.RequestPerformance(e.request),s=this.loading[a]=new n(e);s.abort=this.loadVectorData(e,function(e,n){if(delete i.loading[a],e||!n)return s.status="done",i.loaded[a]=s,r(e);var l=n.rawData,u={};n.expires&&(u.expires=n.expires),n.cacheControl&&(u.cacheControl=n.cacheControl);var c={};if(o){var f=o.finish();f&&(c.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=n.vectorTile,s.parse(n.vectorTile,i.layerIndex,i.availableImages,i.actor,function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,u,c))}),i.loaded=i.loaded||{},i.loaded[a]=s})},o.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())}},o.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()},o.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var s=t.window.ImageBitmap,l=function(){this.loaded={}};function u(t,e){if(0!==t.length){c(t[0],e);for(var r=1;r=0!=!!e&&t.reverse()}l.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=s&&a instanceof s?this.getImageData(a):a,l=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=l,r(null,l)},l.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)},l.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,h=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))};h.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31),e.writeVarint(p<<1^p>>31),i+=h,a+=p}3===n&&e.writeVarint(15)}}function T(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 k(t,e,r,n){A(t,r,n),A(e,2*r,2*n),A(e,2*r+1,2*n+1)}function A(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function M(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}y.fromVectorTileJs=m,y.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var n in t)r[n]=new v(t[n].features,e),r[n].name=n,r[n].version=e.version,r[n].extent=e.extent;return m({layers:r})},y.GeoJSONWrapper=v;var S=function(t){return t[0]},E=function(t){return t[1]},L=function(t,e,r,n,i){void 0===e&&(e=S),void 0===r&&(r=E),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>1;(function t(e,r,n,i,a,o){for(;a>i;){if(a-i>600){var s=a-i+1,l=n-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),h=Math.max(i,Math.floor(n-l*c/s+f)),p=Math.min(a,Math.floor(n+(s-l)*c/s+f));t(e,r,n,h,p,o)}var d=r[2*n+o],v=i,g=a;for(k(e,r,i,n),r[2*a+o]>d&&k(e,r,i,a);vd;)g--}r[2*i+o]===d?k(e,r,i,g):k(e,r,++g,a),g<=n&&(i=g+1),n<=g&&(a=g-1)}})(e,r,s,i,a,o%2),t(e,r,n,i,s-1,o+1),t(e,r,n,s+1,a,o+1)}}(o,s,n,0,o.length-1,0)};L.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 f=u.pop(),h=u.pop(),p=u.pop();if(h-p<=o){for(var d=p;d<=h;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[d]);continue}var v=Math.floor((p+h)/2);s=e[2*v],l=e[2*v+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[v]);var g=(f+1)%2;(0===f?r<=s:n<=l)&&(u.push(p),u.push(v-1),u.push(g)),(0===f?i>=s:a>=l)&&(u.push(v+1),u.push(h),u.push(g))}return c}(this.ids,this.coords,t,e,r,n,this.nodeSize)},L.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(),f=o.pop();if(c-f<=a){for(var h=f;h<=c;h++)M(e[2*h],e[2*h+1],r,n)<=l&&s.push(t[h]);continue}var p=Math.floor((f+c)/2),d=e[2*p],v=e[2*p+1];M(d,v,r,n)<=l&&s.push(t[p]);var g=(u+1)%2;(0===u?r-i<=d:n-i<=v)&&(o.push(f),o.push(p-1),o.push(g)),(0===u?r+i>=d:n+i>=v)&&(o.push(p+1),o.push(c),o.push(g))}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var C={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},P=function(t){this.options=R(Object.create(C),t),this.trees=Array(this.options.maxZoom+1)};function O(t){return{type:"Feature",id:t.id,properties:I(t),geometry:{type:"Point",coordinates:[(t.x-.5)*360,360*Math.atan(Math.exp((180-360*t.y)*Math.PI/180))/Math.PI-90]}}}function I(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return R(R({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function z(t){return t/360+.5}function D(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 R(t,e){for(var r in e)t[r]=e[r];return t}function F(t){return t.x}function B(t){return t.y}function N(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)j(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(n?o+=(i*u-l*a)/2:o+=Math.sqrt(Math.pow(l-i,2)+Math.pow(u-a,2))),i=l,a=u}var c=e.length-3;e[2]=1,function t(e,r,n,i){for(var a,o=i,s=n-r>>1,l=n-r,u=e[r],c=e[r+1],f=e[n],h=e[n+1],p=r+3;p1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}(e[p],e[p+1],u,c,f,h);if(d>o)a=p,o=d;else if(d===o){var v=Math.abs(p-s);vi&&(a-r>3&&t(e,r,a,i),e[a+2]=o,n-a>3&&t(e,a,n,i))}(e,0,c,r),e[c+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function H(t,e,r,n){for(var i=0;i1?1:r}function W(t,e,r,n,i,a,o,s){if(r/=e,n/=e,a>=r&&o=n)return null;for(var l=[],u=0;u=r&&d=n)){var v=[];if("Point"===h||"MultiPoint"===h)(function(t,e,r,n,i){for(var a=0;a=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}})(f,v,r,n,i);else if("LineString"===h)Y(f,v,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===h)Z(f,v,r,n,i,!1);else if("Polygon"===h)Z(f,v,r,n,i,!0);else if("MultiPolygon"===h)for(var g=0;gr&&(l=c(u,p,d,g,y,r),o&&(u.start=f+s*l)):m>n?x=r&&(l=c(u,p,d,g,y,r),b=!0),x>n&&m<=n&&(l=c(u,p,d,g,y,n),b=!0),!a&&b&&(o&&(u.end=f+s*l),e.push(u),u=X(t)),o&&(f+=s)}var _=t.length-3;p=t[_],d=t[_+1],v=t[_+2],(m=0===i?p:d)>=r&&m<=n&&K(u,p,d,v),_=u.length-3,a&&_>=3&&(u[_]!==u[0]||u[_+1]!==u[1])&&K(u,u[0],u[1],u[2]),u.length&&e.push(u)}function X(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Z(t,e,r,n,i,a){for(var o=0;o0&&e.size<(i?o:n)){r.numPoints+=e.length/3;return}for(var s=[],l=0;lo)&&(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;n0===e)for(n=0,i=t.length;n24)throw Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw Error("promoteId and generateId cannot be used together.");var u=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n=n;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new L(s,F,B,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return r&&console.timeEnd("total time"),this},P.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=l.range(z(r),D(a),z(i),D(n)),c=[],f=0;fe&&(d+=y.numPoints||1)}if(d>=s){for(var m=c.x*p,x=c.y*p,b=o&&p>1?this._map(c,!0):null,_=(u<<5)+(e+1)+this.points.length,w=0;w1)for(var M=0;M>5},P.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},P.prototype._map=function(t,e){if(t.numPoints)return e?R({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?R({},n):n},ti.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},ti.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<1&&console.time("creation"),h=this.tiles[f]=function(t,e,r,n,i){for(var a=e===i.maxZoom?0:i.tolerance/((1<o.maxX&&(o.maxX=c),f>o.maxY&&(o.maxY=f)}return o}(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,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<1&&console.time("clipping");var v,g,y,m,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;v=g=y=m=null,x=W(t,c,r-_,r+T,0,h.minX,h.maxX,l),b=W(t,c,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(v=W(x,c,n-_,n+T,1,h.minY,h.maxY,l),g=W(x,c,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(y=W(b,c,n-_,n+T,1,h.minY,h.maxY,l),m=W(b,c,n+w,n+k,1,h.minY,h.maxY,l),b=null),u>1&&console.timeEnd("clipping"),s.push(v||[],e+1,2*r,2*n),s.push(g||[],e+1,2*r,2*n+1),s.push(y||[],e+1,2*r+1,2*n),s.push(m||[],e+1,2*r+1,2*n+1)}}},ti.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<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var l,u=t,c=e,f=r;!l&&u>0;)u--,c=Math.floor(c/2),f=Math.floor(f/2),l=this.tiles[ta(u,c,f)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",u,c,f),a>1&&console.time("drilling down"),this.splitTile(l.source,u,c,f,t,e,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?te(this.tiles[s],i):null):null};var ts=function(e){function r(t,r,n,i){e.call(this,t,r,n,to),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(Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));(function t(e,r){var n,i=e&&e.type;if("FeatureCollection"===i)for(n=0;n=0?0:e.button},o.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var d=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=0?1.2:1))}function g(t,e,r,n,i,a,o){for(var s=0;s65535){e(Error("glyphs > 65535 not supported"));return}if(a.ranges[s]){e(null,{stack:r,id:i,glyph:o});return}var l=a.requests[s];l||(l=a.requests[s]=[],m.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;i1&&(l=t[++s]);var c=Math.min(Math.abs(u-l.left),Math.abs(u-l.right)),f=void 0,h=i/r*(n+1);if(l.isDash){var p=n-Math.abs(h);f=Math.sqrt(c*c+p*p)}else f=n-Math.sqrt(c*c+h*h);this.data[o+u]=Math.max(0,Math.min(255,f+128))}},T.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[0],u=0;u1&&(l=t[++s]);var c=Math.min(Math.abs(u-l.left),Math.abs(u-l.right)),f=l.isDash?c:-c;this.data[o+u]=Math.max(0,Math.min(255,f+128))}},T.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=n.minX&&e.x=n.minY&&e.y0&&(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+10&&(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));return}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),P=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),O=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},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;or.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,P.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}(O),z=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(){if(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(Error("Canvas dimensions cannot be less than or equal to zero.")));return}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,P.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];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},B.prototype.has=function(t){return t.wrapped().key in this.data},B.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},B.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},B.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},B.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},B.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},B.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},B.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1)&&(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.floor((Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1)*5),r="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,e):e;this._cache.setMaxSize(r)},r.prototype.handleWrapJump=function(t){var e=void 0===this._prevLng?t:this._prevLng,r=Math.round((t-e)/360);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,i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?n=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)}):(n=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&&(n=n.filter(function(t){return i._source.hasTile(t)}))):n=[];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(n,a);if(tP(this._source.type)){for(var u={},c={},f=Object.keys(l),h=0;hthis._source.maxzoom){var d=h.children(this._source.maxzoom)[0],v=this.getTile(d);if(v&&v.hasData()){n[d.key]=d;continue}}else{var g=h.children(this._source.maxzoom);if(n[g[0].key]&&n[g[1].key]&&n[g[2].key]&&n[g[3].key])continue}for(var y=p.wasRequested(),m=h.overscaledZ-1;m>=a;--m){var x=h.scaledTo(m);if(i[x.key]||(i[x.key]=!0,(p=this.getTile(x))||!y||(p=this._addTile(x)),p&&(n[x.key]=x,y=p.wasRequested(),p.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;a0||(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(),f=1/0,h=1/0,p=-1/0,d=-1/0,v=0;v=0&&y[1].y+g>=0){var m=l.map(function(t){return s.getTilePoint(t)}),x=u.map(function(t){return s.getTilePoint(t)});a.push({tile:n,tileID:s,queryGeometry:m,cameraQueryGeometry:x,scale:v})}}}(y);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;n=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 tC(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 tP(t){return"raster"===t||"image"===t||"video"===t}function tO(){return new t.window.Worker(ng.workerUrl)}tL.maxOverzooming=10,tL.maxUnderzooming=3;var tI="mapboxgl_preloaded_worker_pool",tz=function(){this.active={}};tz.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var tG=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;aMath.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function t$(e,r,n,i,a,o,s,l,u,c,f,h,p,d){var v,g=r/24,y=e.lineOffsetX*g,m=e.lineOffsetY*g;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=tK(g,l,y,m,n,f,h,e,u,o,p);if(!w)return{notEnoughRoom:!0};var T=tX(w.first.point,s).point,k=tX(w.last.point,s).point;if(i&&!n){var A=tJ(e.writingMode,T,k,d);if(A)return A}v=[w.first];for(var M=e.glyphStartIndex+1;M0?C.point:tQ(h,L,S,1,a),O=tJ(e.writingMode,S,P,d);if(O)return O}var I=t0(g*l.getoffsetX(e.glyphStartIndex),y,m,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,o,p);if(!I)return{notEnoughRoom:!0};v=[I]}for(var z=0,D=v;z0?1:-1,v=0;i&&(d*=-1,v=Math.PI),d<0&&(v+=Math.PI);for(var g=d>0?l+s:l+s+1,y=a,m=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((g+=d)=u)return null;if(m=y,w.push(y),void 0===(y=h[g])){var T=new t.Point(c.getx(g),c.gety(g)),k=tX(T,f);if(k.signedDistanceFromCamera>0)y=h[g]=k.point;else{var A=g-d;y=tQ(0===x?o:new t.Point(c.getx(A),c.gety(A)),T,m,_-x+1,f)}}x+=b,b=m.dist(y)}var M=(_-x)/b,S=y.sub(m),E=S.mult(M)._add(m);E._add(S._unit()._perp()._mult(n*d));var L=v+Math.atan2(y.y-m.y,y.x-m.x);return w.push(E),{point:E,angle:L,path:w}}tG.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},tG.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)},tG.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)},tG.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},tG.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},tG.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))return this._forEachCell(t,e,r,n,this._queryCell,o,{hitTest:i,seenUids:{box:{},circle:{}}},a),i?o.length>0:o;if(i)return!0;for(var s=0;sthis.width||l<0||s>this.height)return!n&&[];var u=[];return this._forEachCell(a,s,o,l,this._queryCellCircle,u,{hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}},i),n?u.length>0:u},tG.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},tG.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},tG.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},tG.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,f=0;f=c[p+0]&&n>=c[p+1]&&(!s||s(this.boxKeys[h]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[h],x1:c[p],y1:c[p+1],x2:c[p+2],y2:c[p+3]})}}}var d=this.circleCells[i];if(null!==d)for(var v=this.circles,g=0;go*o+s*s},tG.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 f=l-s,h=c-u;return f*f+h*h<=r*r};var t1=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function t2(t,e){for(var r=0;r=1;I--)O.push(C.path[I]);for(var z=1;z0){for(var B=O[0].clone(),N=O[0].clone(),j=1;j=S.x&&N.x<=E.x&&B.y>=S.y&&N.y<=E.y?[O]:N.xE.x||N.yE.y?[]:t.clipLine([O],S.x,S.y,E.x,E.y)}for(var U=0,V=F;U=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},t4.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(v=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:g,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:v},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:y,placedGlyphBoxes:m}},ei.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,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,v=a.collisionGroup,g=s.get("text-optional"),y=s.get("icon-optional"),m=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),b="map"===s.get("text-rotation-alignment"),_="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),T="viewport-y"===s.get("symbol-z-order"),k=m&&(x||!o.hasIconData()||y),A=x&&(m||!o.hasTextData()||g);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(e,a){if(!r[e.crossTileID]){if(h){i.placements[e.crossTileID]=new t7(!1,!1,!1);return}var p=!1,T=!1,M=!0,S=null,E={box:null,offscreen:null},L={box:null,offscreen:null},C=null,P=null,O=null,I=0,z=0,D=0;a.textFeatureIndex?I=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(I=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;i0&&(N=N.filter(function(t){return t!==j.anchor})).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!x?r:null,h={box:[],offscreen:!1},d=m?2*N.length:N.length,g=0;g=N.length,k=i.attemptAnchorPlacement(y,t,a,s,u,b,_,f,l,v,T,e,o,n,c);if(k&&(h=k.placedGlyphBoxes)&&h.box&&h.box.length){p=!0,S=k.shift;break}}return h};B(function(){return U(R,a.iconBox,t.WritingMode.horizontal)},function(){var r=a.verticalTextBox,n=E&&E.box&&E.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}}),E&&(p=E.box,M=E.offscreen);var V=F(E&&E.box);if(!p&&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,m,f,l,v.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(E&&E.box&&E.box.length)}}if(p=(C=E)&&C.box&&C.box.length>0,M=C&&C.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),W=t.evaluateSizeForFeature(o.textSizeData,d,G),Y=s.get("text-padding"),X=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(m,G,o.lineVertexArray,o.glyphOffsetArray,W,l,u,c,n,_,v.predicate,X,Y),p=m||P.circles.length>0&&!P.collisionDetected,M=M&&P.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var Z=function(t){var e=w&&S?en(t,S.x,S.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,v.predicate)};T=L&&L.box&&L.box.length&&a.verticalIconBox?(O=Z(a.verticalIconBox)).box.length>0:(O=Z(a.iconBox)).box.length>0,M=M&&O.offscreen}var K=g||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,J=y||0===e.numIconVertices;if(K||J?J?K||(T=T&&p):p=T&&p:T=p=T&&p,p&&C&&C.box&&(L&&L.box&&z?i.collisionIndex.insertCollisionBox(C.box,s.get("text-ignore-placement"),o.bucketInstanceId,z,v.ID):i.collisionIndex.insertCollisionBox(C.box,s.get("text-ignore-placement"),o.bucketInstanceId,I,v.ID)),T&&O&&i.collisionIndex.insertCollisionBox(O.box,s.get("icon-ignore-placement"),o.bucketInstanceId,D,v.ID),P&&(p&&i.collisionIndex.insertCollisionCircles(P.circles,s.get("text-ignore-placement"),o.bucketInstanceId,I,v.ID),n)){var $=o.bucketInstanceId,Q=i.collisionCircleArrays[$];void 0===Q&&(Q=i.collisionCircleArrays[$]=new t9);for(var tt=0;tt=0;--E){var L=S[E];M(o.symbolInstances.get(L),o.collisionArrays[L])}else for(var C=e.symbolInstanceStart;C=0&&(a>=0&&u!==a?e.text.placedSymbolArray.get(u).crossTileID=0:e.text.placedSymbolArray.get(u).crossTileID=n.crossTileID)}},ei.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=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex],s=0;s0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(m){var T=eo(y.text),k=_?es:T;d(e.text,s,k);var A=w?es:T;d(e.text,l,A);var M=y.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach(function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=M||_?1:0)}),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,"left",a,E),i.markUsedOrientation(e,E,a))}if(x){var L=eo(y.icon),C=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=C?L:es;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=y.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var O=C?es:L;d(e.icon,a.numVerticalIconVertices,O),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=y.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var I=e.collisionArrays[n];if(I){var z=new t.Point(0,0);if(I.textBox||I.verticalTextBox){var D=!0;if(u){var R=i.variableOffsets[v];R?(z=er(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),c&&z._rotate(f?i.transform.angle:-i.transform.angle)):D=!1}I.textBox&&ea(e.textCollisionBox.collisionVertexArray,y.text.placed,!D||_,z.x,z.y),I.verticalTextBox&&ea(e.textCollisionBox.collisionVertexArray,y.text.placed,!D||w,z.x,z.y)}var F=!!(!w&&I.verticalIconBox);I.iconBox&&ea(e.iconCollisionBox.collisionVertexArray,y.icon.placed,F,h?z.x:0,h?z.y:0),I.verticalIconBox&&ea(e.iconCollisionBox.collisionVertexArray,y.icon.placed,!F,h?z.x:0,h?z.y:0)}}}(v);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 g=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=g.invProjMatrix,e.placementViewportMatrix=g.viewportMatrix,e.collisionCircleArray=g.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}},ei.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},ei.prototype.zoomAdjustment=function(t){return Math.max(0,(this.transform.zoom-t)/1.5)},ei.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTimet},ei.prototype.setStale=function(){this.stale=!0};var es=0,el=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=[]};el.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};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 el(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},eu.prototype.commit=function(t){return this.placement.commit(t),this.placement};var ec=512/t.EXTENT/2,ef=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.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;c1?"@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,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,v=l.stretchX,g=l.stretchY,y=l.content,m=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,m,{x:f,y:h},{x:0,y:0},{width:u,height:c}),r[s]={data:m,pixelRatio:d,sdf:p,stretchX:v,stretchY:g,content:y}}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(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||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;r0)throw 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(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(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 Error("There is already a source with this ID");if(!r.type)throw 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 tL(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 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(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,a=e.id;if(this.getLayer(a)){this.fire(new t.ErrorEvent(Error('Layer with id "'+a+'" already exists on this map')));return}if("custom"===e.type){if(ev(this,t.validateCustomStyleLayer(e)))return;i=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(a,e.source),e=t.clone$1(e),e=t.extend(e,{source:a})),this._validate(t.validateStyle.layer,"layers."+a,e,{arrayIndex:-1},n))return;i=t.createStyleLayer(e),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}}),this._serializedLayers[i.id]=i.serialize()}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o){this.fire(new t.ErrorEvent(Error('Layer with id "'+r+'" does not exist on this map.')));return}if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&"custom"!==i.type){var s=this._removedLayers[a];delete this._removedLayers[a],s.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause())}this._updateLayer(i),i.onAdd&&i.onAdd(this.map)},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e]){this.fire(new t.ErrorEvent(Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")));return}if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;if(r&&-1===i){this.fire(new t.ErrorEvent(Error('Layer with id "'+r+'" does not exist on this map.')));return}this._order.splice(i,0,e),this._layerOrderChanged=!0}},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(!r){this.fire(new t.ErrorEvent(Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")));return}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)},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);if(!i){this.fire(new t.ErrorEvent(Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")));return}(i.minzoom!==r||i.maxzoom!==n)&&(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i))},r.prototype.setFilter=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(!i){this.fire(new t.ErrorEvent(Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")));return}if(!t.deepEqual(i.filter,r)){if(null==r){i.filter=void 0,this._updateLayer(i);return}this._validate(t.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i))}},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);if(!a){this.fire(new t.ErrorEvent(Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a))},r.prototype.getLayoutProperty=function(e,r){var n=this.getLayer(e);if(!n){this.fire(new t.ErrorEvent(Error("The layer '"+e+"' does not exist in the map's style.")));return}return n.getLayoutProperty(r)},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);if(!a){this.fire(new t.ErrorEvent(Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0)},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){this.fire(new t.ErrorEvent(Error("The source '"+n+"' does not exist in the map's style.")));return}var o=a.getSource().type;if("geojson"===o&&i){this.fire(new t.ErrorEvent(Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if("vector"===o&&!i){this.fire(new t.ErrorEvent(Error("The sourceLayer parameter must be provided for vector source types.")));return}void 0===e.id&&this.fire(new t.ErrorEvent(Error("The feature id parameter must be provided."))),a.setFeatureState(i,e.id,r)},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0===i){this.fire(new t.ErrorEvent(Error("The source '"+n+"' does not exist in the map's style.")));return}var a=i.getSource().type,o="vector"===a?e.sourceLayer:void 0;if("vector"===a&&!o){this.fire(new t.ErrorEvent(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(r&&"string"!=typeof e.id&&"number"!=typeof e.id){this.fire(new t.ErrorEvent(Error("A feature id is required to remove its specific state property.")));return}i.removeFeatureState(o,e.id,r)},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0===i){this.fire(new t.ErrorEvent(Error("The source '"+r+"' does not exist in the map's style.")));return}if("vector"===i.getSource().type&&!n){this.fire(new t.ErrorEvent(Error("The sourceLayer parameter must be provided for vector source types.")));return}return void 0===e.id&&this.fire(new t.ErrorEvent(Error("The feature id parameter must be provided."))),i.getFeatureState(n,e.id)},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;s=0;h--){var p=this._order[h];if(r(p))for(var d=i.length-1;d>=0;d--){var v=i[d].feature;if(n[v.layer.id] 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;}"),collisionCircle:ew("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);}"),debug:ew("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);}"),fill:ew("#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);}"),fillOutline:ew("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;}"),fillOutlinePattern:ew("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;}"),fillPattern:ew("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);}"),fillExtrusion:ew("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;}"),fillExtrusionPattern:ew("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;}"),hillshadePrepare:ew("#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;}"),hillshade:ew("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;}"),line:ew("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);}"),lineGradient:ew("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);}"),linePattern:ew("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;}"),lineSDF:ew("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);}"),raster:ew("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;}"),symbolIcon:ew("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));}"),symbolSDF:ew("#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);}"),symbolTextAndIcon:ew("#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);}")}),ek=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function eA(t){for(var e=[],r=0;rp.indexOf(v)&&p.push(v)}var g=n?n.defines():[];a&&g.push("#define OVERDRAW_INSPECTOR;");var y=g.concat(e_.fragmentSource,r.fragmentSource).join("\n"),m=g.concat(e_.vertexSource,r.vertexSource).join("\n"),x=o.createShader(o.FRAGMENT_SHADER);if(o.isContextLost()){this.failedToCreate=!0;return}o.shaderSource(x,y),o.compileShader(x),o.attachShader(this.program,x);var b=o.createShader(o.VERTEX_SHADER);if(o.isContextLost()){this.failedToCreate=!0;return}o.shaderSource(b,m),o.compileShader(b),o.attachShader(this.program,b),this.attributes={};var _={};this.numAttributes=u.length;for(var w=0;w>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}eM.prototype.draw=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v){var g,y=t.gl;if(!this.failedToCreate){for(var m in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[m].set(o[m]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=((g={})[y.LINES]=2,g[y.TRIANGLES]=3,g[y.LINE_STRIP]=1,g)[e],b=0,_=c.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new ek)).bind(t,this,l,p?p.getPaintVertexBuffers():[],u,w.vertexOffset,d,v),y.drawElements(e,w.primitiveLength*x,y.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var eE=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}},eL=function(t){return{u_matrix:t}},eC=function(e,r,n,i){return t.extend(eL(e),eS(n,r,i))},eP=function(e,r,n,i){var a,o,s=e.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=t5(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}},eO=function(t,e,r){var n=t5(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}},eI=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},ez=function(t){return{u_matrix:t}},eD=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")}},eR=function(e,r,n){var i,a,o,s=n.paint.get("hillshade-shadow-color"),l=n.paint.get("hillshade-highlight-color"),u=n.paint.get("hillshade-accent-color"),c=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(c-=e.transform.angle);var f=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),f),u_image:0,u_latrange:(a=Math.pow(2,(i=r.tileID).canonical.z),o=i.canonical.y,[new t.MercatorCoordinate(0,o/a).toLngLat().lat,new t.MercatorCoordinate(0,(o+1)/a).toLngLat().lat]),u_light:[n.paint.get("hillshade-exaggeration"),c],u_shadow:s,u_highlight:l,u_accent:u}},eF=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()}},eB=function(e,r,n){var i=e.transform;return{u_matrix:eV(e,r,n),u_ratio:1/t5(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},eN=function(e,r,n,i){var a=e.transform,o=eU(r,a);return{u_matrix:eV(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/t5(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]]}},ej=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=eU(r,o),u="round"===n.layout.get("line-cap"),c=s.getDash(i.from,u),f=s.getDash(i.to,u),h=c.width*a.fromScale,p=f.width*a.toScale;return t.extend(eB(e,r,n),{u_patternscale_a:[l/h,-c.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:f.y,u_mix:a.t})};function eU(t,e){return 1/t5(t,1,e.tileZoom)}function eV(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var eq=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}},eH=function(e,r,n,i,a,o,s,l,u,c,f){var h=a.transform;return t.extend(eq(e,r,n,i,a,o,s,l,u,c),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},eG=function(e,r,n,i,a,o){var s,l,u,c,f,h,p,d,v;return t.extend((s=n.imageManager.getPattern(i.from.toString()),l=n.imageManager.getPattern(i.to.toString()),c=(u=n.imageManager.getPixelSize()).width,f=u.height,h=Math.pow(2,a.tileID.overscaledZ),d=(p=a.tileSize*Math.pow(2,n.transform.tileZoom)/h)*(a.tileID.canonical.x+a.tileID.wrap*h),v=p*a.tileID.canonical.y,{u_image:0,u_pattern_tl_a:s.tl,u_pattern_br_a:s.br,u_pattern_tl_b:l.tl,u_pattern_br_b:l.br,u_texsize:[c,f],u_mix:o.t,u_pattern_size_a:s.displaySize,u_pattern_size_b:l.displaySize,u_scale_a:o.fromScale,u_scale_b:o.toScale,u_tile_units_to_pixels:1/t5(a,1,n.transform.tileZoom),u_pixel_coord_upper:[d>>16,v>>16],u_pixel_coord_lower:[65535&d,65535&v]}),{u_matrix:e,u_opacity:r})},eW={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 eY(e,r,i,a,o,s,l){for(var u=e.context,c=u.gl,f=e.useProgram("collisionBox"),h=[],p=0,d=0,v=0;v0){var w=t.create(),T=x;t.mul(w,m.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(w,w,m.placementViewportMatrix),h.push({circleArray:_,circleOffset:d,transform:T,invTransform:w}),p+=_.length/4,d=p}b&&f.draw(u,c.LINES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tS.disabled,eO(x,e.transform,y),i.id,b.layoutVertexBuffer,b.indexBuffer,b.segments,null,e.transform.zoom,null,null,b.collisionVertexBuffer)}}if(l&&h.length){var k=e.useProgram("collisionCircle"),A=new t.StructArrayLayout2f1f2i16;A.resize(4*p),A._trim();for(var M=0,S=0;S=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}(x,f)){t2(m.numGlyphs,h);continue}var b=x[3],_=tZ(n.transform.cameraToCenterDistance,b),w=t.evaluateSizeForFeature(u,c,m),T=s?w/_:w*_,k=new t.Point(m.anchorX,m.anchorY),A=tX(k,a).point,M={},S=t$(m,T,!1,l,r,a,o,e.glyphOffsetArray,p,h,A,k,M,v);g=S.useVertical,(S.notEnoughRoom||g||S.needsFlipping&&t$(m,T,!0,l,r,a,o,e.glyphOffsetArray,p,h,A,k,M,v).notEnoughRoom)&&t2(m.numGlyphs,h)}i?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}(P,L.posMatrix,e,a,X,Z,y,c);var $=e.translatePosMatrix(L.posMatrix,C,o,s),Q=m||a&&T||J?eX:X,tt=e.translatePosMatrix(Z,C,o,s,!0),te=z&&0!==n.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1),tr=void 0;z?P.iconsInText?(M=D.kind,S=N,E=j,tr=t.extend(eH(M,B,x,y,e,$,Q,tt,!0,S,!0),{u_texsize_icon:E,u_texture_icon:1})):tr=eH(D.kind,B,x,y,e,$,Q,tt,a,N,!0):tr=eq(D.kind,B,x,y,e,$,Q,tt,a,N);var tn={program:F,buffers:O,uniformValues:tr,atlasTexture:U,atlasTextureIcon:q,atlasInterpolation:V,atlasInterpolationIcon:H,isSDF:z,hasHalo:te};if(b&&P.canOverlap){_=!0;for(var ti=O.segments.get(),ta=0;ta=0&&(v[y.associatedIconIndex]={shiftedAnchor:S,angle:E})}else t2(y.numGlyphs,p)}if(f){d.clear();for(var C=e.icon.placedSymbolArray,P=0;P0))return{opacity:1,mix:0};var s=t.browser.now(),l=(s-e.timeAdded)/o,u=r?(s-r.timeAdded)/o:-1,c=n.getSource(),f=a.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return(e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r)?{opacity:1,mix:1-p}:{opacity:p,mix:0}}(b,w,r,n,e.transform),k=void 0,A=void 0,M="nearest"===n.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;a.activeTexture.set(o.TEXTURE0),b.texture.bind(M,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),a.activeTexture.set(o.TEXTURE1),w?(w.texture.bind(M,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),k=Math.pow(2,w.tileID.overscaledZ-b.tileID.overscaledZ),A=[b.tileID.canonical.x*k%1,b.tileID.canonical.y*k%1]):b.texture.bind(M,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var S={u_matrix:_,u_tl_parent:A||[0,0],u_scale_parent:k||1,u_buffer_scale:1,u_fade_t:T.mix,u_opacity:T.opacity*n.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:n.paint.get("raster-brightness-min"),u_brightness_high:n.paint.get("raster-brightness-max"),u_saturation_factor:(g=n.paint.get("raster-saturation"))>0?1-1/(1.001-g):-g,u_contrast_factor:(y=n.paint.get("raster-contrast"))>0?1/(1-y):1+y,u_spin_weights:function(t){var e=Math.sin(t*=Math.PI/180),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(n.paint.get("raster-hue-rotate"))};s instanceof O?l.draw(a,o.TRIANGLES,x,tA.disabled,u,tS.disabled,S,n.id,s.boundsBuffer,e.quadTriangleIndexBuffer,s.boundsSegments):l.draw(a,o.TRIANGLES,x,f[m.overscaledZ],u,tS.disabled,S,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.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 f=tA.disabled,h=t.depthModeForSublayer(0,"opaque"===c?tk.ReadWrite:tk.ReadOnly),p=t.colorModeForRenderPass(),d=t.useProgram(u?"backgroundPattern":"background"),v=s.coveringTiles({tileSize:l});u&&(a.activeTexture.set(o.TEXTURE0),t.imageManager.bind(t.context));for(var g=r.getCrossfadeParameters(),y=0;y "+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+" "+p+"kb"),s.draw(i,a.TRIANGLES,l,u,tM.alphaBlended,tS.disabled,eI(o,t.Color.transparent,d),f,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)})(e,r,n[i])},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(tA.disabled);var o="3d"===i.renderingMode?new tk(t.context.gl.LEQUAL,tk.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,tk.ReadOnly);n.setDepthMode(o),i.render(n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState(),n.bindFramebuffer.set(null)}}},e7=function(t,e){this.context=new tE(t),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=tL.maxUnderzooming+tL.maxOverzooming+1,this.depthEpsilon=1/65536,this.crossTileSymbolIndex=new ed,this.gpuTimers={}};e7.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;n256&&this.clearStencil(),r.setColorMode(tM.disabled),r.setDepthMode(tk.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var a=0;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new tA({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},e7.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new tA({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},e7.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=0;this.currentLayer--){var A=this.style._layers[c[this.currentLayer]],M=f[A.source],S=d[A.source];this._renderTileClippingMasks(A,S),this.renderLayer(this,M,A,S)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},e7.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},e7.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 eM(this.context,t,eT[t],e,eW[t],this._showOverdrawInspector)),this.cache[r]},e7.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()},e7.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)},e7.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)}},e7.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var e9=function(t,e){this.points=t,this.planes=e};e9.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 e9(a,o)};var rt=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};rt.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=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,f=0;fthis.max[l]-this.min[l])return 0}return 1};var re=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 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};re.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},re.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)},re.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},re.prototype.clone=function(){return new re(this.top,this.bottom,this.left,this.right)},re.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var rr=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 re,this._posMatrixCache={},this._alignedPosMatrixCache={}},rn={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}};rr.prototype.clone=function(){var t=new rr(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},rn.minZoom.get=function(){return this._minZoom},rn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},rn.maxZoom.get=function(){return this._maxZoom},rn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},rn.minPitch.get=function(){return this._minPitch},rn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},rn.maxPitch.get=function(){return this._maxPitch},rn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},rn.renderWorldCopies.get=function(){return this._renderWorldCopies},rn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},rn.worldSize.get=function(){return this.tileSize*this.scale},rn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},rn.size.get=function(){return new t.Point(this.width,this.height)},rn.bearing.get=function(){return-this.angle/Math.PI*180},rn.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))},rn.pitch.get=function(){return this._pitch/Math.PI*180},rn.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())},rn.fov.get=function(){return this._fov/Math.PI*180},rn.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())},rn.zoom.get=function(){return this._zoom},rn.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())},rn.center.get=function(){return this._center},rn.center.set=function(t){(t.lat!==this._center.lat||t.lng!==this._center.lng)&&(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},rn.padding.get=function(){return this._edgeInsets.toJSON()},rn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},rn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},rr.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},rr.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},rr.prototype.coveringZoomLevel=function(t){return Math.max(0,(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize)))},rr.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},rr.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.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=e9.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 rt([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],f=[],h=r,p=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 v=c.pop(),g=v.x,y=v.y,m=v.fullyVisible;if(!m){var x=v.aabb.intersects(s);if(0===x)continue;m=2===x}var b=Math.max(Math.abs(v.aabb.distanceX(o)),Math.abs(v.aabb.distanceY(o))),_=3+(1<_&&v.zoom>=l){f.push({tileID:new t.OverscaledTileID(v.zoom===h?p:v.zoom,v.wrap,v.zoom,g,y),distanceSq:t.sqrLen([o[0]-.5-g,o[1]-.5-y])});continue}for(var w=0;w<4;w++){var T=(g<<1)+w%2,k=(y<<1)+(w>>1);c.push({aabb:v.aabb.quadrant(w),zoom:v.zoom+1,x:T,y:k,wrap:v.wrap,fullyVisible:m})}}return f.sort(function(t,e){return t.distanceSq-e.distanceSq}).map(function(t){return t.tileID})},rr.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},rn.unmodified.get=function(){return this._unmodified},rr.prototype.zoomScale=function(t){return Math.pow(2,t)},rr.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},rr.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)},rr.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},rn.point.get=function(){return this.project(this.center)},rr.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())},rr.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},rr.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},rr.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},rr.prototype.coordinateLocation=function(t){return t.toLngLat()},rr.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,f=n[2]/a,h=c===f?0:(0-c)/(f-c);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,u,h)/this.worldSize)},rr.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])},rr.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)))},rr.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},rr.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])},rr.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]},rr.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},rr.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 f=this.latRange;a=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-g)}if(this.lngRange){var y=p.x,m=u.x/2;y-ml&&(n=l-m)}(void 0!==n||void 0!==i)&&(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=c,this._constraining=!1}},rr.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=Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance,c=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,c,1.01*u),f[8]=-(2*r.x)/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),v=Math.sin(this.angle),g=s-Math.round(s)+d*h+v*p,y=l-Math.round(l)+d*p+v*h,m=new Float64Array(f);if(t.translate(m,m,[g>.5?g-1:g,y>.5?y-1:y,0]),this.alignedProjMatrix=m,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw Error("failed to invert matrix");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},rr.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},rr.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},rr.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;s=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},ri.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 ra={linearity:.3,easing:t.bezier(0,0,.3,1)},ro=t.extend({deceleration:2500,maxSpeed:1400},ra),rs=t.extend({deceleration:20,maxSpeed:1400},ra),rl=t.extend({deceleration:1e3,maxSpeed:360},ra),ru=t.extend({deceleration:1e3,maxSpeed:90},ra),rc=function(t){this._map=t,this.clear()};function rf(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},rc.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=this._clickTolerance||this._map.fire(new rp(t.type,this._map,t))},rg.prototype.dblclick=function(t){return this._firePreventable(new rp(t.type,this._map,t))},rg.prototype.mouseover=function(t){this._map.fire(new rp(t.type,this._map,t))},rg.prototype.mouseout=function(t){this._map.fire(new rp(t.type,this._map,t))},rg.prototype.touchstart=function(t){return this._firePreventable(new rd(t.type,this._map,t))},rg.prototype.touchmove=function(t){this._map.fire(new rd(t.type,this._map,t))},rg.prototype.touchend=function(t){this._map.fire(new rd(t.type,this._map,t))},rg.prototype.touchcancel=function(t){this._map.fire(new rd(t.type,this._map,t))},rg.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},rg.prototype.isEnabled=function(){return!0},rg.prototype.isActive=function(){return!1},rg.prototype.enable=function(){},rg.prototype.disable=function(){};var ry=function(t){this._map=t};ry.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},ry.prototype.mousemove=function(t){this._map.fire(new rp(t.type,this._map,t))},ry.prototype.mousedown=function(){this._delayContextMenu=!0},ry.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new rp("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},ry.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new rp(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},ry.prototype.isEnabled=function(){return!0},ry.prototype.isActive=function(){return!1},ry.prototype.enable=function(){},ry.prototype.disable=function(){};var rm=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function rx(t,e){for(var r={},n=0;nthis.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;n30)&&(this.aborted=!0)}}},rb.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 r_=function(t){this.singleTap=new rb(t),this.numTaps=t.numTaps,this.reset()};r_.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},r_.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},r_.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},r_.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||30>this.lastTap.dist(n);if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var rw=function(){this._zoomIn=new r_({numTouches:1,numTaps:2}),this._zoomOut=new r_({numTouches:2,numTaps:1}),this.reset()};rw.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},rw.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},rw.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},rw.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},rw.prototype.touchcancel=function(){this.reset()},rw.prototype.enable=function(){this._enabled=!0},rw.prototype.disable=function(){this._enabled=!1,this.reset()},rw.prototype.isEnabled=function(){return this._enabled},rw.prototype.isActive=function(){return this._active};var rT={};rT[0]=1,rT[2]=2;var rk=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};rk.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},rk.prototype._correctButton=function(t,e){return!1},rk.prototype._move=function(t,e){return{}},rk.prototype.mousedown=function(t,e){if(!this._lastPoint){var r=o.mouseButton(t);this._correctButton(t,r)&&(this._lastPoint=e,this._eventButton=r)}},rk.prototype.mousemoveWindow=function(t,e){var r,n=this._lastPoint;if(n){if(t.preventDefault(),r=rT[this._eventButton],void 0===t.buttons||(t.buttons&r)!==r){this.reset();return}if(!(!this._moved&&e.dist(n)0&&(this._active=!0);var i=rx(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,!(sMath.abs(rP(this._distance,this._startDistance))))return this._active=!0,{zoomDelta:rP(this._distance,r),pinchAround:e}},e}(rL);function rI(t,e){return 180*t.angleWith(e)/Math.PI}var rz=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:rI(this._vector,r),pinchAround:e}},e.prototype._isBelowThreshold=function(t){this._minDiameter=Math.min(this._minDiameter,t.mag());var e=Math.PI*this._minDiameter;return Math.abs(rI(t,this._startVector))<25/e*360},e}(rL);function rD(t){return Math.abs(t.y)>Math.abs(t.x)}var rR=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,rD(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){if(void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100)return;return!1}var a=t.y>0==e.y>0;return rD(t)&&rD(e)&&a}},e}(rL),rF=function(){this._panStep=100,this._bearingStep=15,this._pitchStep=10,this._rotationDisabled=!1};function rB(t){return t*(2-t)}rF.prototype.reset=function(){this._active=!1},rF.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:rB,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})}}}},rF.prototype.enable=function(){this._enabled=!0},rF.prototype.disable=function(){this._enabled=!1,this.reset()},rF.prototype.isEnabled=function(){return this._enabled},rF.prototype.isActive=function(){return this._active},rF.prototype.disableRotation=function(){this._rotationDisabled=!0},rF.prototype.enableRotation=function(){this._rotationDisabled=!1};var rN=1/450,rj=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=rN,t.bindAll(["_onTimeout"],this)};rj.prototype.setZoomRate=function(t){this._defaultZoomRate=t},rj.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},rj.prototype.isEnabled=function(){return!!this._enabled},rj.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},rj.prototype.isZooming=function(){return!!this._zooming},rj.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},rj.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},rj.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%4.000244140625==0?this._type="wheel":0!==r&&4>Math.abs(r)?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):!this._type&&(this._type=200>Math.abs(i*r)?"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()}},rj.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},rj.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 r=o.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(r)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},rj.prototype.renderFrame=function(){var e,r=this;if(this._frameId&&(this._frameId=null,this.isActive())){var n=this._map.transform;if(0!==this._delta){var i="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,a=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==a&&(a=1/a);var o="number"==typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(o*a))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var s="number"==typeof this._targetZoom?this._targetZoom:n.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=u(f);e=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):c=!0}else e=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout(function(){r._zooming=!1,r._handler._triggerRenderFrame(),delete r._targetZoom,delete r._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:e-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},rj.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;r=t.bezier(o,Math.sqrt(.0729-o*o),.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},rj.prototype.reset=function(){this._active=!1};var rU=function(t,e){this._clickZoom=t,this._tapZoom=e};rU.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},rU.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},rU.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},rU.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var rV=function(){this.reset()};rV.prototype.reset=function(){this._active=!1},rV.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})}}},rV.prototype.enable=function(){this._enabled=!0},rV.prototype.disable=function(){this._enabled=!1,this.reset()},rV.prototype.isEnabled=function(){return this._enabled},rV.prototype.isActive=function(){return this._active};var rq=function(){this._tap=new r_({numTouches:1,numTaps:1}),this.reset()};rq.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},rq.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))},rq.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)},rq.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)},rq.prototype.touchcancel=function(){this.reset()},rq.prototype.enable=function(){this._enabled=!0},rq.prototype.disable=function(){this._enabled=!1,this.reset()},rq.prototype.isEnabled=function(){return this._enabled},rq.prototype.isActive=function(){return this._active};var rH=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};rH.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},rH.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},rH.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},rH.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var rG=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};rG.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},rG.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},rG.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},rG.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var rW=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};rW.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")},rW.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},rW.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},rW.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},rW.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},rW.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var rY=function(t){return t.zoom||t.drag||t.pitch||t.rotate},rX=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 rZ(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var rK=function(e,r){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new rc(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r),t.bindAll(["handleEvent","handleWindowEvent"],this);var n=this._el;this._listeners=[[n,"touchstart",{passive:!0}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[t.window,"blur",void 0]];for(var i=0,a=this._listeners;ie.indexOf(n)))return!0;return!1},rK.prototype.handleWindowEvent=function(t){this.handleEvent(t,t.type+"Window")},rK.prototype._getMapTouches=function(t){for(var e=[],r=0;rs?Math.min(2,_):Math.max(.5,_),1-e),w=o.unproject(x.add(b.mult(e*m)).mult(y));o.setLocationAtPoint(o.renderWorldCopies?w.wrap():w,g)}a._fireMoveEvents(r)},function(t){a._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,f="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,p="padding"in e?e.padding:a.padding,d=a.zoomScale(c-o),v=t.Point.convert(e.offset),g=a.centerPoint.add(v),y=a.pointLocation(g),m=t.LngLat.convert(e.center||y);this._normalizeCenter(m);var x=a.project(y),b=a.project(m).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if("minZoom"in e){var A=t.clamp(Math.min(e.minZoom,o,c),a.minZoom,a.maxZoom);_=Math.sqrt(w/a.zoomScale(A-o)/k*2)}var M=_*_;function S(t){var e=(T*T-w*w+(t?-1:1)*M*M*k*k)/(2*(t?T:w)*M*k);return Math.log(Math.sqrt(e*e+1)-e)}function E(t){return(Math.exp(t)-Math.exp(-t))/2}function L(t){return(Math.exp(t)+Math.exp(-t))/2}var C=S(0),P=function(t){return L(C)/L(C+_*t)},O=function(t){var e;return(L(C)*(E(e=C+_*t)/L(e))-E(C))/M*w/k},I=(S(1)-C)/_;if(1e-6>Math.abs(k)||!isFinite(I)){if(1e-6>Math.abs(w-T))return this.easeTo(e,r);var z=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease(function(e){var i=e*I,d=1/P(i);a.zoom=1===e?c:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(u,p,e),g=a.centerPoint.add(v));var y=1===e?m:a.unproject(x.add(b.mult(O(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?y.wrap():y,g),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){var n=Math.abs((e=t.wrap(e,-180,180))-r);return Math.abs(e-360-r)180?-360:r<-180?360:0}},r}(t.Evented),r$=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};r$.prototype.getDefaultPosition=function(){return"bottom-right"},r$.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.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},r$.prototype.onRemove=function(){o.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},r$.prototype._setElementTitle=function(t,e){var r=this._map._getUIString("AttributionControl."+e);t.title=r,t.setAttribute("aria-label",r)},r$.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"))},r$.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+(nt.indexOf(a.attribution)&&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=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)}},r$.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var rQ=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};rQ.prototype.onAdd=function(t){this._map=t,this._container=o.create("div","mapboxgl-ctrl");var e=o.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},rQ.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},rQ.prototype.getDefaultPosition=function(){return"bottom-left"},rQ.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},rQ.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}},rQ.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 r0=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};r0.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},r0.prototype.remove=function(t){for(var e=this._currentlyRunning,r=e?this._queue.concat(e):this._queue,n=0;nr.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(null!=r.minPitch&&null!=r.maxPitch&&r.minPitch>r.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(null!=r.minPitch&&r.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(null!=r.maxPitch&&r.maxPitch>60)throw Error("maxPitch must be less than or equal to 60");var i=new rr(r.minZoom,r.maxZoom,r.minPitch,r.maxPitch,r.renderWorldCopies);if(e.call(this,i,r),this._interactive=r.interactive,this._maxTileCacheSize=r.maxTileCacheSize,this._failIfMajorPerformanceCaveat=r.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=r.preserveDrawingBuffer,this._antialias=r.antialias,this._trackResize=r.trackResize,this._bearingSnap=r.bearingSnap,this._refreshExpiredTiles=r.refreshExpiredTiles,this._fadeDuration=r.fadeDuration,this._crossSourceCollisions=r.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=r.collectResourceTiming,this._renderTaskQueue=new r0,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},r1,r.locale),this._clickTolerance=r.clickTolerance,this._requestManager=new t.RequestManager(r.transformRequest,r.accessToken),"string"==typeof r.container){if(this._container=t.window.document.getElementById(r.container),!this._container)throw Error("Container '"+r.container+"' not found.")}else if(r.container instanceof r3)this._container=r.container;else throw Error("Invalid type: 'container' must be a String or HTMLElement.");if(r.maxBounds&&this.setMaxBounds(r.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw Error("Failed to initialize WebGL.");this.on("move",function(){return n._update(!1)}),this.on("moveend",function(){return n._update(!1)}),this.on("zoom",function(){return n._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 rK(this,r);var a="string"==typeof r.hash&&r.hash||void 0;this._hash=r.hash&&new ri(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:r.center,zoom:r.zoom,bearing:r.bearing,pitch:r.pitch}),r.bounds&&(this.resize(),this.fitBounds(r.bounds,t.extend({},r.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=r.localIdeographFontFamily,r.style&&this.setStyle(r.style,{localIdeographFontFamily:r.localIdeographFontFamily}),r.attributionControl&&this.addControl(new r$({customAttribution:r.customAttribution})),this.addControl(new rQ,r.logoPosition),this.on("style.load",function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)}),this.on("data",function(e){n._update("style"===e.dataType),n.fire(new t.Event(e.dataType+"data",e))}),this.on("dataloading",function(e){n.fire(new t.Event(e.dataType+"dataloading",e))})}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var n={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return r.prototype._getMapId=function(){return this._mapId},r.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(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},r.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(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},r.prototype.hasControl=function(t){return this._controls.indexOf(t)>-1},r.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},r.prototype.getBounds=function(){return this.transform.getBounds()},r.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},r.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},r.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw Error("maxZoom must be greater than the current minZoom")},r.prototype.getMaxZoom=function(){return this.transform.maxZoom},r.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw 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()60)throw 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 Error("maxPitch must be greater than the current minPitch")},r.prototype.getMaxPitch=function(){return this.transform.maxPitch},r.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},r.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},r.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},r.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},r.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},r.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},r.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},r.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 rp(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if("mouseleave"!==t&&"mouseout"!==t)return{layer:e,listener:r,delegates:((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)};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 rp(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new rp(t,i,e.originalEvent)))}}}},r.prototype.on=function(t,r,n){if(void 0===n)return e.prototype.on.call(this,t,r);var i=this._createDelegatedListener(t,r,n);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},r.prototype.once=function(t,r,n){if(void 0===n)return e.prototype.once.call(this,t,r);var i=this._createDelegatedListener(t,r,n);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},r.prototype.off=function(t,r,n){var i=this;return void 0===n?e.prototype.off.call(this,t,r):(this._delegatedListeners&&this._delegatedListeners[t]&&function(e){for(var a=e[t],o=0;o180;){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}nt.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),o.disableDrag()},nt.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)}},nt.prototype.off=function(){var t=this.element;o.removeEventListener(t,"mousedown",this.mousedown),o.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(t,"touchmove",this.touchmove),o.removeEventListener(t,"touchend",this.touchend),o.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},nt.prototype.offTemp=function(){o.enableDrag(),o.removeEventListener(t.window,"mousemove",this.mousemove),o.removeEventListener(t.window,"mouseup",this.mouseup)},nt.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),o.mousePos(this.element,e)),o.addEventListener(t.window,"mousemove",this.mousemove),o.addEventListener(t.window,"mouseup",this.mouseup)},nt.prototype.mousemove=function(t){this.move(t,o.mousePos(this.element,t))},nt.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},nt.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},nt.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=o.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},nt.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=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")))},r.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"},r.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))},r.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},r.prototype.isDraggable=function(){return this._draggable},r.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},r.prototype.getRotation=function(){return this._rotation},r.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},r.prototype.getRotationAlignment=function(){return this._rotationAlignment},r.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},r.prototype.getPitchAlignment=function(){return this._pitchAlignment},r}(t.Evented),na={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},no=0,ns=!1,nl=function(e){function r(r){e.call(this),this.options=t.extend({},na,r),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(e){var r;return this._map=e,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),r=this._setupUI,void 0!==i?r(i):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then(function(t){r(i="denied"!==t.state)}):r(i=!!t.window.navigator.geolocation),this._container},r.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(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,no=0,ns=!1},r.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),r=t.coords;return e&&(r.longitudee.getEast()||r.latitudee.getNorth())},r.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")}},r.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e)){this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),this._finish();return}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()}},r.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})},r.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()},r.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"},r.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},r.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&&ns)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()}},r.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},r.prototype._setupUI=function(e){var r=this;if(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=o.create("button","mapboxgl-ctrl-geolocate",this._container),o.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 n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{var i=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new ni(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ni({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 n=e.originalEvent&&"resize"===e.originalEvent.type;e.geolocateSource||"ACTIVE_LOCK"!==r._watchState||n||(r._watchState="BACKGROUND",r._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),r._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),r.fire(new t.Event("trackuserlocationend")))})},r.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":no--,ns=!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"),++no>1?(e={maximumAge:6e5,timeout:0},ns=!0):(e=this.options.positionOptions,ns=!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},r.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)},r}(t.Evented),nu={maxWidth:100,unit:"metric"},nc=function(e){this.options=t.extend({},nu,e),t.bindAll(["_onMove","setUnit"],this)};function nf(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?nh(e,n,l/5280,t._getUIString("ScaleControl.Miles")):nh(e,n,l,t._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?nh(e,n,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?nh(e,n,s/1e3,t._getUIString("ScaleControl.Kilometers")):nh(e,n,s,t._getUIString("ScaleControl.Meters"))}function nh(t,e,r,n){var i,a,o,s,l=(o=Math.pow(10,(""+Math.floor(r)).length-1),s=r/o,o*(s=s>=10?10:s>=5?5:s>=3?3:s>=2?2:s>=1?1:(a=Math.pow(10,Math.ceil(-Math.log(i=s)/Math.LN10)),Math.round(i*a)/a)));t.style.width=l/r*e+"px",t.innerHTML=l+" "+n}nc.prototype.getDefaultPosition=function(){return"bottom-left"},nc.prototype._onMove=function(){nf(this._map,this._container,this.options)},nc.prototype.onAdd=function(t){return this._map=t,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},nc.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},nc.prototype.setUnit=function(t){this.options.unit=t,nf(this._map,this._container,this.options)};var np=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")};np.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.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},np.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},np.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},np.prototype._setupUI=function(){var e=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.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)},np.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},np.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},np.prototype._isFullscreen=function(){return this._fullscreen},np.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())},np.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 nd={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},nv=function(e){function r(r){e.call(this),this.options=t.extend(Object.create(nd),r),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.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},r.prototype.isOpen=function(){return!!this._map},r.prototype.remove=function(){return this._content&&o.remove(this._content),this._container&&(o.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},r.prototype.getLngLat=function(){return this._lngLat},r.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},r.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},r.prototype.getElement=function(){return this._container},r.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},r.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)},r.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},r.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},r.prototype.setDOMContent=function(t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(t),this._createCloseButton(),this._update(),this._focusFirstElement(),this},r.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},r.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},r.prototype.setOffset=function(t){return this.options.offset=t,this._update(),this},r.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},r.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=o.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))},r.prototype._onMouseUp=function(t){this._update(t.point)},r.prototype._onMouseMove=function(t){this._update(t.point)},r.prototype._onDrag=function(t){this._update(t.point)},r.prototype._update=function(e){var r=this,n=this._lngLat||this._trackPointer;if(this._map&&n&&this._content&&(!this._container&&(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(t){return r._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=ne(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),a=this.options.anchor,s=function e(r){if(!r)return e(new t.Point(0,0));if("number"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),"top-left":new t.Point(n,n),"top-right":new t.Point(-n,n),bottom:new t.Point(0,-r),"bottom-left":new t.Point(n,-n),"bottom-right":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(!(r instanceof t.Point||Array.isArray(r)))return{center:t.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),"top-left":t.Point.convert(r["top-left"]||[0,0]),"top-right":t.Point.convert(r["top-right"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),"bottom-left":t.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(r["bottom-right"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])};var i=t.Point.convert(r);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}(this.options.offset);if(!a){var l,u=this._container.offsetWidth,c=this._container.offsetHeight;l=i.y+s.bottom.ythis._map.transform.height-c?["bottom"]:[],i.xthis._map.transform.width-u/2&&l.push("right"),a=0===l.length?"bottom":l.join("-")}var f=i.add(s[a]).round();o.setTransform(this._container,nr[a]+" translate("+f.x+"px,"+f.y+"px)"),nn(this._container,a,"popup")}},r.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var t=this._container.querySelector("a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])");t&&t.focus()}},r.prototype._onClose=function(){this.remove()},r}(t.Evented),ng={version:t.version,supported:a,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:r6,NavigationControl:r9,GeolocateControl:nl,AttributionControl:r$,ScaleControl:nc,FullscreenControl:np,Popup:nv,Marker:ni,Style:ex,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){tR().acquire(tI)},clearPrewarmedResources:function(){var t=r;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(tI),r=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(token){t.config.ACCESS_TOKEN=token},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(url){t.config.API_URL=url},get workerCount(){return tz.workerCount},set workerCount(count){tz.workerCount=count},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(numRequests){t.config.MAX_PARALLEL_IMAGE_REQUESTS=numRequests},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};return ng}),r},t.exports=e()},3108:function(t,e,r){"use strict";t.exports=r(26099)},26099:function(t,e,r){"use strict";var n=r(64928),i=r(32420),a=r(51160),o=r(76752),s=r(55616),l=r(31264),u=r(47520),c=r(18400),f=r(72512),h=r(76244);function p(t,e){for(var r=e[0],n=e[1],a=e[2],o=e[3],s=1/(a-r),l=1/(o-n),u=Array(t.length),c=0,f=t.length/2;c>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?r=new(f(e.dtype))(g):e.dtype&&Array.isArray(r=e.dtype)&&(r.length=g);for(var y=0;yi||s>1073741824){for(var h=0;hl)&&!(M>u)&&!(S=C)&&o!==s){var c=m[a];void 0===s&&(s=c.length);for(var f=o;f=g&&p<=w&&d>=y&&d<=T&&P.push(h)}var v=x[a],b=v[4*o+0],_=v[4*o+1],k=v[4*o+2],E=v[4*o+3],O=function(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}(v,o+1),I=.5*i,z=a+1;e(r,n,I,z,b,_||k||E||O),e(r,n+I,I,z,_,k||E||O),e(r+I,n,I,z,k,E||O),e(r+I,n+I,I,z,E,O)}}}(0,0,1,0,0,1),P},r;function E(t,e,r){for(var n=1,i=.5,a=.5,o=.5,s=0;s0){e+=Math.abs(a(t[0]));for(var r=1;r2){for(s=0;s=0))throw 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=f,e.lengthToDegrees=function(t,e){return h(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=h,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 Error("length must be a positive number");return c(f(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw Error("invalid original units");var a=e.areaFactors[n];if(!a)throw Error("invalid final units");return t/i*a},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw Error("bbox is required");if(!Array.isArray(t))throw Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!p(t))throw Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw 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(46284);function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,f,h=0,p=0,d=t.type,v="FeatureCollection"===d,g="Feature"===d,y=v?t.features.length:1,m=0;mu||p>c||d>f){o=i,u=r,c=p,f=d,s=0;return}if(!1===e(n.lineString([o,i],t.properties),r,a,d,s))return!1;s++,o=i}))return!1}}})}function c(t,e){if(!t)throw 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;st[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]=0))throw 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=f,e.lengthToDegrees=function(t,e){return h(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=h,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 Error("length must be a positive number");return c(f(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw Error("invalid original units");var a=e.areaFactors[n];if(!a)throw Error("invalid final units");return t/i*a},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw Error("bbox is required");if(!Array.isArray(t))throw Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!p(t))throw Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw Error("id must be a number or a string")}},84880:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(76796);function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,f,h=0,p=0,d=t.type,v="FeatureCollection"===d,g="Feature"===d,y=v?t.features.length:1,m=0;mu||p>c||d>f){o=i,u=r,c=p,f=d,s=0;return}if(!1===e(n.lineString([o,i],t.properties),r,a,d,s))return!1;s++,o=i}))return!1}}})}function c(t,e){if(!t)throw 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=0))throw 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=f,e.lengthToDegrees=function(t,e){return h(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=h,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 Error("length must be a positive number");return c(f(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw Error("invalid original units");var a=e.areaFactors[n];if(!a)throw Error("invalid final units");return t/i*a},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw Error("bbox is required");if(!Array.isArray(t))throw Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!p(t))throw Error("bbox must only contain numbers")})},e.validateId=function(t){if(!t)throw Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw Error("id must be a number or a string")},e.radians2degrees=function(){throw Error("method has been renamed to `radiansToDegrees`")},e.degrees2radians=function(){throw Error("method has been renamed to `degreesToRadians`")},e.distanceToDegrees=function(){throw Error("method has been renamed to `lengthToDegrees`")},e.distanceToRadians=function(){throw Error("method has been renamed to `lengthToRadians`")},e.radiansToDistance=function(){throw Error("method has been renamed to `radiansToLength`")},e.bearingToAngle=function(){throw Error("method has been renamed to `bearingToAzimuth`")},e.convertDistance=function(){throw Error("method has been renamed to `convertLength`")}},43752:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(49840);function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,f,h=0,p=0,d=t.type,v="FeatureCollection"===d,g="Feature"===d,y=v?t.features.length:1,m=0;mu||p>c||d>f){o=i,u=r,c=p,f=d,s=0;return}if(!1===e(n.lineString([o,i],t.properties),r,a,d,s))return!1;s++,o=i}))return!1}}})}function c(t,e){if(!t)throw 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;si&&(i=t[o]),t[o]1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;it.length)&&(r=t.length),t.substring(r-e.length,r)===e}var d="",v="",g="",y="",m={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function x(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach(function(e){r[e]=t[e]}),Object.defineProperty(r,"message",{value:t.message}),r}function b(t){return f(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var _=function(t){var e;function r(t){if(function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,r),"object"!==c(t)||null===t)throw new h("options","Object",t);var e,o=t.message,s=t.operator,l=t.stackStartFn,f=t.actual,_=t.expected,w=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=o)e=i(this,u(r).call(this,String(o)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(d="\x1b[34m",v="\x1b[32m",y="\x1b[39m",g="\x1b[31m"):(d="",v="",y="",g="")),"object"===c(f)&&null!==f&&"object"===c(_)&&null!==_&&"stack"in f&&f instanceof Error&&"stack"in _&&_ instanceof Error&&(f=x(f),_=x(_)),"deepStrictEqual"===s||"strictEqual"===s)e=i(this,u(r).call(this,function(t,e,r){var i="",a="",o=0,s="",l=!1,u=b(t),f=u.split("\n"),h=b(e).split("\n"),x=0,_="";if("strictEqual"===r&&"object"===c(t)&&"object"===c(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===f.length&&1===h.length&&f[0]!==h[0]){var w=f[0].length+h[0].length;if(w<=10){if(("object"!==c(t)||null===t)&&("object"!==c(e)||null===e)&&(0!==t||0!==e))return"".concat(m[r],"\n\n")+"".concat(f[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r&&w<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;f[0][x]===h[0][x];)x++;x>2&&(_="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",x),"^"),x=0)}}for(var T=f[f.length-1],k=h[h.length-1];T===k&&(x++<2?s="\n ".concat(T).concat(s):i=T,f.pop(),h.pop(),0!==f.length&&0!==h.length);)T=f[f.length-1],k=h[h.length-1];var A=Math.max(f.length,h.length);if(0===A){var M=u.split("\n");if(M.length>30)for(M[26]="".concat(d,"...").concat(y);M.length>27;)M.pop();return"".concat(m.notIdentical,"\n\n").concat(M.join("\n"),"\n")}x>3&&(s="\n".concat(d,"...").concat(y).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var S=0,E=m[r]+"\n".concat(v,"+ actual").concat(y," ").concat(g,"- expected").concat(y),L=" ".concat(d,"...").concat(y," Lines skipped");for(x=0;x1&&x>2&&(C>4?(a+="\n".concat(d,"...").concat(y),l=!0):C>3&&(a+="\n ".concat(h[x-2]),S++),a+="\n ".concat(h[x-1]),S++),o=x,i+="\n".concat(g,"-").concat(y," ").concat(h[x]),S++;else if(h.length1&&x>2&&(C>4?(a+="\n".concat(d,"...").concat(y),l=!0):C>3&&(a+="\n ".concat(f[x-2]),S++),a+="\n ".concat(f[x-1]),S++),o=x,a+="\n".concat(v,"+").concat(y," ").concat(f[x]),S++;else{var P=h[x],O=f[x],I=O!==P&&(!p(O,",")||O.slice(0,-1)!==P);I&&p(P,",")&&P.slice(0,-1)===O&&(I=!1,O+=","),I?(C>1&&x>2&&(C>4?(a+="\n".concat(d,"...").concat(y),l=!0):C>3&&(a+="\n ".concat(f[x-2]),S++),a+="\n ".concat(f[x-1]),S++),o=x,a+="\n".concat(v,"+").concat(y," ").concat(O),i+="\n".concat(g,"-").concat(y," ").concat(P),S+=2):(a+=i,i="",(1===C||0===x)&&(a+="\n ".concat(O),S++))}if(S>20&&x30)for(k[26]="".concat(d,"...").concat(y);k.length>27;)k.pop();e=1===k.length?i(this,u(r).call(this,"".concat(T," ").concat(k[0]))):i(this,u(r).call(this,"".concat(T,"\n\n").concat(k.join("\n"),"\n")))}else{var A=b(f),M="",S=m[s];"notDeepEqual"===s||"notEqual"===s?(A="".concat(m[s],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(M="".concat(b(_)),A.length>512&&(A="".concat(A.slice(0,509),"...")),M.length>512&&(M="".concat(M.slice(0,509),"...")),"deepEqual"===s||"equal"===s?A="".concat(S,"\n\n").concat(A,"\n\nshould equal\n\n"):M=" ".concat(s," ").concat(M)),e=i(this,u(r).call(this,"".concat(A).concat(M)))}return Error.stackTraceLimit=w,e.generatedMessage=!o,Object.defineProperty(a(e),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),e.code="ERR_ASSERTION",e.actual=f,e.expected=_,e.operator=s,Error.captureStackTrace&&Error.captureStackTrace(a(e),l),e.stack,e.name="AssertionError",i(e)}return function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(r,t),e=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:f.custom,value:function(t,e){return f(this,function(t){for(var e=1;e2)?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",function(t,e,i){if((void 0===o&&(o=r(45408)),o("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(a="not ",e.substr(0,a.length)===a))?(f="must not be",e=e.replace(/^not /,"")):f="must be",s=" argument",(void 0===l||l>t.length)&&(l=t.length),t.substring(l-s.length,l)===s)h="The ".concat(t," ").concat(f," ").concat(c(e,"type"));else{var a,s,l,u,f,h,p=("number"!=typeof u&&(u=0),u+1>t.length||-1===t.indexOf(".",u))?"argument":"property";h='The "'.concat(t,'" ').concat(p," ").concat(f," ").concat(c(e,"type"))}return h+". Received type ".concat(n(i))},TypeError),u("ERR_INVALID_ARG_VALUE",function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(35840));var i=s.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)},TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")},TypeError),u("ERR_MISSING_ARGS",function(){for(var t=arguments.length,e=Array(t),n=0;n0,"At least one arg needs to be specified");var i="The ",a=e.length;switch(e=e.map(function(t){return'"'.concat(t,'"')}),a){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,a-1).join(", ")+", and ".concat(e[a-1]," arguments")}return"".concat(i," must be specified")},TypeError),t.exports.codes=l},25116:function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a=void 0!==/a/g.flags,o=function(t){var e=[];return t.forEach(function(t){return e.push(t)}),e},s=function(t){var e=[];return t.forEach(function(t,r){return e.push([r,t])}),e},l=Object.is?Object.is:r(39896),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},c=Number.isNaN?Number.isNaN:r(1560);function f(t){return t.call.bind(t)}var h=f(Object.prototype.hasOwnProperty),p=f(Object.prototype.propertyIsEnumerable),d=f(Object.prototype.toString),v=r(35840).types,g=v.isAnyArrayBuffer,y=v.isArrayBufferView,m=v.isDate,x=v.isMap,b=v.isRegExp,_=v.isSet,w=v.isNativeError,T=v.isBoxedPrimitive,k=v.isNumberObject,A=v.isStringObject,M=v.isBooleanObject,S=v.isBigIntObject,E=v.isSymbolObject,L=v.isFloat32Array,C=v.isFloat64Array;function P(t){if(0===t.length||t.length>10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=4294967296}function O(t){return Object.keys(t).filter(P).concat(u(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */function I(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i>2]+n[(3&r[e])<<4|r[e+1]>>4]+n[(15&r[e+1])<<2|r[e+2]>>6]+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),f=new Uint8Array(c);for(e=0;e>4,f[u++]=(15&n)<<4|a>>2,f[u++]=(3&a)<<6|63&o;return c}},59968:function(t,e){"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,a=l(t),o=a[0],s=a[1],u=new i((o+s)*3/4-s),c=0,f=s>0?o-4:o;for(r=0;r>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[c++]=255&e),1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=0,s=n-i;o>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}(t,o,o+16383>s?s:o+16383));return 1===i?a.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&a.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},64928:function(t){"use strict";function e(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>=0?(a=o,i=o-1):n=o+1}return a}function r(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>0?(a=o,i=o-1):n=o+1}return a}function n(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<0?(a=o,n=o+1):i=o-1}return a}function i(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<=0?(a=o,n=o+1):i=o-1}return a}function a(t,e,r,n,i){for(;n<=i;){var a=n+i>>>1,o=t[a],s=void 0!==r?r(o,e):o-e;if(0===s)return a;s<=0?n=a+1:i=a-1}return -1}function o(t,e,r,n,i,a){return"function"==typeof r?a(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):a(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,a){return o(t,r,n,i,a,e)},gt:function(t,e,n,i,a){return o(t,e,n,i,a,r)},lt:function(t,e,r,i,a){return o(t,e,r,i,a,n)},le:function(t,e,r,n,a){return o(t,e,r,n,a,i)},eq:function(t,e,r,n,i){return o(t,e,r,n,i,a)}}},308:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-2147483648,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,r=(t>255)<<3,t>>>=r,e|=r,r=(t>15)<<2,t>>>=r,e|=r,r=(t>3)<<1,t>>>=r,(e|=r)|t>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return t-=t>>>1&1431655765,((t=(858993459&t)+(t>>>2&858993459))+(t>>>4)&252645135)*16843009>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=Array(256);(function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return t&=65535,e&=65535,(t=((t=((t=((t=(t|t<<8)&16711935)|t<<4)&252645135)|t<<2)&858993459)|t<<1)&1431655765)|(e=((e=((e=((e=(e|e<<8)&16711935)|e<<4)&252645135)|e<<2)&858993459)|e<<1)&1431655765)<<1},e.deinterleave2=function(t,e){return(t=((t=((t=((t=((t=t>>>e&1431655765)|t>>>1)&858993459)|t>>>2)&252645135)|t>>>4)&16711935)|t>>>16)&65535)<<16>>16},e.interleave3=function(t,e,r){return t&=1023,e&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&4278190335)|r<<8)&251719695)|r<<4)&3272356035)|r<<2)&1227133513,(t=((t=((t=((t=(t|t<<16)&4278190335)|t<<8)&251719695)|t<<4)&3272356035)|t<<2)&1227133513|(e=((e=((e=((e=(e|e<<16)&4278190335)|e<<8)&251719695)|e<<4)&3272356035)|e<<2)&1227133513)<<1)|r<<2},e.deinterleave3=function(t,e){return(t=((t=((t=((t=((t=t>>>e&1227133513)|t>>>2)&3272356035)|t>>>4)&251719695)|t>>>8)&4278190335)|t>>>16)&1023)<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},29620:function(t,e,r){"use strict";var n=r(32420);function i(t,e,r,n,i,o,s){for(var l=0;l-1?i(r):r}},57916:function(t,e,r){"use strict";var n=r(8844),i=r(53664),a=r(14500),o=i("%TypeError%"),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||n.call(l,s),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){if("function"!=typeof t)throw new o("a function is required");var e=u(n,l,arguments);return a(e,1+f(0,t.length-(arguments.length-1)),!0)};var h=function(){return u(n,s,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},32420:function(t){t.exports=function(t,e,r){return er?r:t:te?e:t}},3808:function(t,e,r){"use strict";var n=r(32420);function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,i*=255,a*=255,o*=255),r=255&n(r,0,255),16777216*r+((i=255&n(i,0,255))<<16)+((a=255&n(a,0,255))<<8)+(o=255&n(o,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},17592:function(t){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},72160:function(t,e,r){"use strict";var n=r(96824),i=r(32420),a=r(72512);t.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r,o=new(a(e))(4),s="uint8"!==e&&"uint8_clamped"!==e;return(t.length&&"string"!=typeof t||(t=n(t),t[0]/=255,t[1]/=255,t[2]/=255),(r=t)instanceof Uint8Array||r instanceof Uint8ClampedArray||Array.isArray(r)&&(r[0]>1||0===r[0])&&(r[1]>1||0===r[1])&&(r[2]>1||0===r[2])&&(!r[3]||r[3]>1))?(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=null!=t[3]?t[3]:255,s&&(o[0]/=255,o[1]/=255,o[2]/=255,o[3]/=255)):s?(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=null!=t[3]?t[3]:1):(o[0]=i(Math.floor(255*t[0]),0,255),o[1]=i(Math.floor(255*t[1]),0,255),o[2]=i(Math.floor(255*t[2]),0,255),o[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),o}},96824:function(t,e,r){"use strict";var n=r(95532),i=r(53576),a=r(32420);t.exports=function(t){var e,r=n(t);return r.space?((e=[,,,])[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},95532:function(t,e,r){"use strict";var n=r(17592);t.exports=function(t){var e,r,a=[],o=1;if("string"==typeof t){if(n[t=t.toLowerCase()])a=n[t].slice(),r="rgb";else if("transparent"===t)o=0,r="rgb",a=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var s=t.slice(1),l=s.length;o=1,l<=4?(a=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===l&&(o=parseInt(s[3]+s[3],16)/255)):(a=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===l&&(o=parseInt(s[6]+s[7],16)/255)),a[0]||(a[0]=0),a[1]||(a[1]=0),a[2]||(a[2]=0),r="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var u=e[1],s=u.replace(/a$/,"");r=s;var l="cmyk"===s?4:"gray"===s?1:3;a=e[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(t,e){if(/%$/.test(t)){if(e===l)return parseFloat(t)/100;if("rgb"===s)return 255*parseFloat(t)/100}else if("h"===s[e]){if(/deg$/.test(t));else if(void 0!==i[t])return i[t]}return parseFloat(t)}),u===s&&a.push(1),o="rgb"===u?1:void 0===a[l]?1:a[l],a=a.slice(0,l)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(a=t.match(/([0-9]+)/g).map(function(t){return parseFloat(t)}),r=t.match(/([a-z])/ig).join("").toLowerCase())}else isNaN(t)?Array.isArray(t)||t.length?(a=[t[0],t[1],t[2]],r="rgb",o=4===t.length?t[3]:1):t instanceof Object&&(null!=t.r||null!=t.red||null!=t.R?(r="rgb",a=[t.r||t.red||t.R||0,t.g||t.green||t.G||0,t.b||t.blue||t.B||0]):(r="hsl",a=[t.h||t.hue||t.H||0,t.s||t.saturation||t.S||0,t.l||t.lightness||t.L||t.b||t.brightness]),o=t.a||t.alpha||t.opacity||1,null!=t.opacity&&(o/=100)):(r="rgb",a=[t>>>16,(65280&t)>>>8,255&t]);return{space:r,values:a,alpha:o}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},53576:function(t,e,r){"use strict";var n=r(19336);t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];r=l<.5?l*(1+s):l+s-l*s,e=2*l-r,i=[0,0,0];for(var u=0;u<3;u++)(n=o+-(1/3*(u-1)))<0?n++:n>1&&n--,a=6*n<1?e+(r-e)*6*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+s)/2,[e,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},19336:function(t){"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116: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|\xe7)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|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)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|\xe3)o.?tom(e|\xe9)",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"}},42771:function(t,e,r){"use strict";t.exports={parse:r(46416),stringify:r(49395)}},8744:function(t,e,r){"use strict";var n=r(30584);t.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},46416:function(t,e,r){"use strict";var n=r(92384),i=r(68194),a=r(3748),o=r(2904),s=r(47916),l=r(7294),u=r(39956),c=r(8744).isSize;t.exports=h;var f=h.cache={};function h(t){if("string"!=typeof t)throw Error("Font argument must be a string.");if(f[t])return f[t];if(""===t)throw Error("Cannot parse an empty string.");if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=u(t,/\s+/);e=h.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach(function(t){r[t]=e}),f[t]=r;if(-1!==s.indexOf(e)){r.style=e;continue}if("normal"===e||"small-caps"===e){r.variant=e;continue}if(-1!==l.indexOf(e)){r.stretch=e;continue}if(-1!==o.indexOf(e)){r.weight=e;continue}if(c(e)){var d=u(e,"/");if(r.size=d[0],null!=d[1]?r.lineHeight=p(d[1]):"/"===h[0]&&(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw Error("Missing required font-family.");return r.family=u(h.join(" "),/\s*,\s*/).map(n),f[t]=r}throw Error("Unknown or unsupported font token: "+e)}throw Error("Missing required font-size.")}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},49395:function(t,e,r){"use strict";var n=r(55616),i=r(8744).isSize,a=d(r(68194)),o=d(r(3748)),s=d(r(2904)),l=d(r(47916)),u=d(r(7294)),c={normal:1,"small-caps":1},f={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},h={size:"1rem",family:"serif"};function p(t,e){if(t&&!e[t]&&!a[t])throw Error("Unknown keyword `"+t+"`");return t}function d(t){for(var e={},r=0;re?1:t>=e?0:NaN}r.d(e,{XE:function(){return n},kv:function(){return l},mo:function(){return c},Uf:function(){return f},SY:function(){return h},ik:function(){return p},oh:function(){return d}});var i,a,o=(1===(a=n).length&&(i=a,a=function(t,e){return n(i(t),e)}),{left:function(t,e,r,n){for(null==r&&(r=0),null==n&&(n=t.length);r>>1;0>a(t[i],e)?r=i+1:n=i}return r},right:function(t,e,r,n){for(null==r&&(r=0),null==n&&(n=t.length);r>>1;a(t[i],e)>0?n=i:r=i+1}return r}});o.right,o.left;var s=Array.prototype;function l(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(n=r);return n}function u(t){return null===t?NaN:+t}function c(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r}function h(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function p(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=Array(i);++n=n.length)return null!=t&&r.sort(t),null!=e?e(r):r;for(var u,c,f,h=-1,p=r.length,d=n[i++],v=a(),g=s();++hn.length)return r;var o,s=i[a-1];return null!=e&&a>=n.length?o=r.entries():(o=[],r.each(function(e,r){o.push({key:r,values:t(e,a)})})),null!=s?o.sort(function(t,e){return s(t.key,e.key)}):o}(o(t,0,u,c),0)},key:function(t){return n.push(t),r},sortKeys:function(t){return i[n.length-1]=t,r},sortValues:function(e){return t=e,r},rollup:function(t){return e=t,r}}}function s(){return{}}function l(t,e,r){t[e]=r}function u(){return a()}function c(t,e,r){t.set(e,r)}function f(){}var h=a.prototype;f.prototype=(function(t,e){var r=new f;if(t instanceof f)t.each(function(t){r.add(t)});else if(t){var n=-1,i=t.length;if(null==e)for(;++n=(a=(v+y)/2))?v=a:y=a,(c=r>=(o=(g+m)/2))?g=o:m=o,i=p,!(p=p[f=c<<1|u]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&&r===l)return d.next=p,i?i[f]=d:t._root=d,t;do i=i?i[f]=[,,,,]:t._root=[,,,,],(u=e>=(a=(v+y)/2))?v=a:y=a,(c=r>=(o=(g+m)/2))?g=o:m=o;while((f=c<<1|u)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function s(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i}function l(t){return t[0]}function u(t){return t[1]}function c(t,e,r){var n=new f(null==e?l:e,null==r?u:r,NaN,NaN,NaN,NaN);return null==t?n:n.addAll(t)}function f(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function h(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}r.r(e),r.d(e,{forceCenter:function(){return n},forceCollide:function(){return g},forceLink:function(){return b},forceManyBody:function(){return W},forceRadial:function(){return Y},forceSimulation:function(){return G},forceX:function(){return X},forceY:function(){return Z}});var p=c.prototype=f.prototype;function d(t){return t.x+t.vx}function v(t){return t.y+t.vy}function g(t){var e,r,n=1,o=1;function s(){for(var t,i,s,u,f,h,p,g=e.length,y=0;ys.index){var v=u-l.x-l.vx,g=f-l.y-l.vy,y=v*v+g*g;yu+d||if+d||ot.r&&(t.r=t[e].r)}function u(){if(e){var n,i,a=e.length;for(n=0,r=Array(a);nf&&(f=n),ih&&(h=i));if(u>f||c>h)return this;for(this.cover(u,c).cover(f,h),r=0;rt||t>=i||n>e||e>=a;)switch(s=(ep)&&!((a=u.y0)>d)&&!((o=u.x1)=m)<<1|t>=y)&&(u=v[v.length-1],v[v.length-1]=v[v.length-1-c],v[v.length-1-c]=u)}else{var x=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=x*x+b*b;if(_=(s=(d+g)/2))?d=s:g=s,(c=o>=(l=(v+y)/2))?v=l:y=l,e=p,!(p=p[f=c<<1|u]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return((i=p.next)&&delete p.next,n)?i?n.next=i:delete n.next:e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[h]=p:this._root=p)):this._root=i,this},p.removeAll=function(t){for(var e=0,r=t.length;e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),a=-1,o=i.length;if(arguments.length<2){for(;++a0)for(var r,n,i=Array(r),a=0;a=0&&e._call.call(null,t),e=e._next;--S}()}finally{S=0,function(){for(var t,e,r=A,n=1/0;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:A=e);M=t,U(n)}(),P=0}}function j(){var t=I.now(),e=t-C;e>1e3&&(O-=e,C=t)}function U(t){!S&&(E&&(E=clearTimeout(E)),t-P>24?(t<1/0&&(E=setTimeout(N,t-I.now()-O)),L&&(L=clearInterval(L))):(L||(C=I.now(),L=setInterval(j,1e3)),S=1,z(N)))}function V(t){return t.x}function q(t){return t.y}F.prototype=B.prototype={constructor:F,restart:function(t,e,r){if("function"!=typeof t)throw TypeError("callback is not a function");r=(null==r?D():+r)+(null==e?0:+e),this._next||M===this||(M?M._next=this:A=this,M=this),this._call=t,this._time=r,U()},stop:function(){this._call&&(this._call=null,this._time=1/0,U())}};var H=Math.PI*(3-Math.sqrt(5));function G(t){var e,r=1,n=.001,i=1-Math.pow(.001,1/300),a=0,o=.6,s=(0,y.kH)(),l=B(c),u=w("tick","end");function c(){f(),u.call("tick",e),r1?(null==r?s.remove(t):s.set(t,p(r)),e):s.get(t)},find:function(e,r,n){var i,a,o,s,l,u=0,c=t.length;for(null==n?n=1/0:n*=n,u=0;u1?(u.on(t,r),e):u.on(t)}}}function W(){var t,e,r,n,o=i(-30),s=1,l=1/0,u=.81;function f(n){var i,a=t.length,o=c(t,V,q).visitAfter(p);for(r=n,i=0;i=l)){(t.data!==e||t.next)&&(0===f&&(d+=(f=a())*f),0===h&&(d+=(h=a())*h),d1?n[0]+n.slice(2):n,+t.slice(r+1)]}r.d(e,{E9:function(){return o},SO:function(){return v}});var i,a,o,s=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(t){var e;if(!(e=s.exec(t)))throw Error("invalid format: "+t);return new u({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 u(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 c(t,e){var r=n(t,e);if(!r)return t+"";var i=r[0],a=r[1];return a<0?"0."+Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+Array(a-i.length+2).join("0")}l.prototype=u.prototype,u.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 f={"%":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 c(100*t,e)},r:c,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+Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+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 h(t){return t}var p=Array.prototype.map,d=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function v(t){var e,r,a,o=void 0===t.grouping||void 0===t.thousands?h:(e=p.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]+"",u=void 0===t.currency?"":t.currency[1]+"",c=void 0===t.decimal?".":t.decimal+"",v=void 0===t.numerals?h:(a=p.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return a[+t]})}),g=void 0===t.percent?"%":t.percent+"",y=void 0===t.minus?"-":t.minus+"",m=void 0===t.nan?"NaN":t.nan+"";function x(t){var e=(t=l(t)).fill,r=t.align,n=t.sign,a=t.symbol,h=t.zero,p=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;"n"===w?(x=!0,w="g"):f[w]||(void 0===b&&(b=12),_=!0,w="g"),(h||"0"===e&&"="===r)&&(h=!0,e="0",r="=");var T="$"===a?s:"#"===a&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===a?u:/[%p]/.test(w)?g:"",A=f[w],M=/[defgprs%]/.test(w);function S(t){var a,s,l,u=T,f=k;if("c"===w)f=A(t)+f,t="";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?m:A(Math.abs(t),b),_&&(t=function(t){m:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0==+t&&"+"!==n&&(g=!1),u=(g?"("===n?n:y:"-"===n||"("===n?"":n)+u,f=("s"===w?d[8+i/3]:"")+f+(g&&"("===n?")":""),M){for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){f=(46===l?c+t.slice(a+1):t.slice(a))+f,t=t.slice(0,a);break}}}x&&!h&&(t=o(t,1/0));var S=u.length+t.length+f.length,E=S>1)+u+t+f+E.slice(S);break;default:t=E+u+t+f}return v(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+""},S}return{format:x,formatPrefix:function(t,e){var r,i=x(((t=l(t)).type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor(((r=n(Math.abs(r=e)))?r[1]:NaN)/3))),o=Math.pow(10,-a),s=d[8+a/3];return function(t){return i(o*t)+s}}}}o=(a=v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"})).format,a.formatPrefix},87108:function(t,e,r){"use strict";r.r(e),r.d(e,{geoAiry:function(){return I},geoAiryRaw:function(){return O},geoAitoff:function(){return D},geoAitoffRaw:function(){return z},geoArmadillo:function(){return F},geoArmadilloRaw:function(){return R},geoAugust:function(){return N},geoAugustRaw:function(){return B},geoBaker:function(){return q},geoBakerRaw:function(){return V},geoBerghaus:function(){return W},geoBerghausRaw:function(){return G},geoBertin1953:function(){return tt},geoBertin1953Raw:function(){return Q},geoBoggs:function(){return to},geoBoggsRaw:function(){return ta},geoBonne:function(){return tf},geoBonneRaw:function(){return tc},geoBottomley:function(){return tp},geoBottomleyRaw:function(){return th},geoBromley:function(){return tv},geoBromleyRaw:function(){return td},geoChamberlin:function(){return tT},geoChamberlinAfrica:function(){return tw},geoChamberlinRaw:function(){return tb},geoCollignon:function(){return tA},geoCollignonRaw:function(){return tk},geoCraig:function(){return tS},geoCraigRaw:function(){return tM},geoCraster:function(){return tC},geoCrasterRaw:function(){return tL},geoCylindricalEqualArea:function(){return tO},geoCylindricalEqualAreaRaw:function(){return tP},geoCylindricalStereographic:function(){return tz},geoCylindricalStereographicRaw:function(){return tI},geoEckert1:function(){return tR},geoEckert1Raw:function(){return tD},geoEckert2:function(){return tB},geoEckert2Raw:function(){return tF},geoEckert3:function(){return tj},geoEckert3Raw:function(){return tN},geoEckert4:function(){return tV},geoEckert4Raw:function(){return tU},geoEckert5:function(){return tH},geoEckert5Raw:function(){return tq},geoEckert6:function(){return tW},geoEckert6Raw:function(){return tG},geoEisenlohr:function(){return tZ},geoEisenlohrRaw:function(){return tX},geoFahey:function(){return t$},geoFaheyRaw:function(){return tJ},geoFoucaut:function(){return t0},geoFoucautRaw:function(){return tQ},geoFoucautSinusoidal:function(){return t2},geoFoucautSinusoidalRaw:function(){return t1},geoGilbert:function(){return t8},geoGingery:function(){return ee},geoGingeryRaw:function(){return t7},geoGinzburg4:function(){return ei},geoGinzburg4Raw:function(){return en},geoGinzburg5:function(){return eo},geoGinzburg5Raw:function(){return ea},geoGinzburg6:function(){return el},geoGinzburg6Raw:function(){return es},geoGinzburg8:function(){return ec},geoGinzburg8Raw:function(){return eu},geoGinzburg9:function(){return eh},geoGinzburg9Raw:function(){return ef},geoGringorten:function(){return ev},geoGringortenQuincuncial:function(){return no},geoGringortenRaw:function(){return ed},geoGuyou:function(){return ex},geoGuyouRaw:function(){return em},geoHammer:function(){return K},geoHammerRaw:function(){return X},geoHammerRetroazimuthal:function(){return eT},geoHammerRetroazimuthalRaw:function(){return e_},geoHealpix:function(){return eO},geoHealpixRaw:function(){return eE},geoHill:function(){return ez},geoHillRaw:function(){return eI},geoHomolosine:function(){return eB},geoHomolosineRaw:function(){return eF},geoHufnagel:function(){return ej},geoHufnagelRaw:function(){return eN},geoHyperelliptical:function(){return eV},geoHyperellipticalRaw:function(){return eU},geoInterrupt:function(){return eH},geoInterruptedBoggs:function(){return eW},geoInterruptedHomolosine:function(){return eX},geoInterruptedMollweide:function(){return eK},geoInterruptedMollweideHemispheres:function(){return e$},geoInterruptedQuarticAuthalic:function(){return rz},geoInterruptedSinuMollweide:function(){return e0},geoInterruptedSinusoidal:function(){return e2},geoKavrayskiy7:function(){return e4},geoKavrayskiy7Raw:function(){return e3},geoLagrange:function(){return e6},geoLagrangeRaw:function(){return e5},geoLarrivee:function(){return e9},geoLarriveeRaw:function(){return e7},geoLaskowski:function(){return re},geoLaskowskiRaw:function(){return rt},geoLittrow:function(){return rn},geoLittrowRaw:function(){return rr},geoLoximuthal:function(){return ra},geoLoximuthalRaw:function(){return ri},geoMiller:function(){return rs},geoMillerRaw:function(){return ro},geoModifiedStereographic:function(){return rx},geoModifiedStereographicAlaska:function(){return rd},geoModifiedStereographicGs48:function(){return rv},geoModifiedStereographicGs50:function(){return rg},geoModifiedStereographicLee:function(){return rm},geoModifiedStereographicMiller:function(){return ry},geoModifiedStereographicRaw:function(){return rl},geoMollweide:function(){return ti},geoMollweideRaw:function(){return tn},geoMtFlatPolarParabolic:function(){return rT},geoMtFlatPolarParabolicRaw:function(){return rw},geoMtFlatPolarQuartic:function(){return rA},geoMtFlatPolarQuarticRaw:function(){return rk},geoMtFlatPolarSinusoidal:function(){return rS},geoMtFlatPolarSinusoidalRaw:function(){return rM},geoNaturalEarth:function(){return rE.c},geoNaturalEarth2:function(){return rC},geoNaturalEarth2Raw:function(){return rL},geoNaturalEarthRaw:function(){return rE.g},geoNellHammer:function(){return rO},geoNellHammerRaw:function(){return rP},geoNicolosi:function(){return rR},geoNicolosiRaw:function(){return rD},geoPatterson:function(){return rB},geoPattersonRaw:function(){return rF},geoPeirceQuincuncial:function(){return ns},geoPierceQuincuncial:function(){return ns},geoPolyconic:function(){return rj},geoPolyconicRaw:function(){return rN},geoPolyhedral:function(){return rW},geoPolyhedralButterfly:function(){return rJ},geoPolyhedralCollignon:function(){return r0},geoPolyhedralWaterman:function(){return r1},geoProject:function(){return r6},geoQuantize:function(){return nl},geoQuincuncial:function(){return na},geoRectangularPolyconic:function(){return nc},geoRectangularPolyconicRaw:function(){return nu},geoRobinson:function(){return np},geoRobinsonRaw:function(){return nh},geoSatellite:function(){return nv},geoSatelliteRaw:function(){return nd},geoSinuMollweide:function(){return eR},geoSinuMollweideRaw:function(){return eD},geoSinusoidal:function(){return tu},geoSinusoidalRaw:function(){return tl},geoStitch:function(){return nk},geoTimes:function(){return nM},geoTimesRaw:function(){return nA},geoTwoPointAzimuthal:function(){return nC},geoTwoPointAzimuthalRaw:function(){return nE},geoTwoPointAzimuthalUsa:function(){return nL},geoTwoPointEquidistant:function(){return nI},geoTwoPointEquidistantRaw:function(){return nP},geoTwoPointEquidistantUsa:function(){return nO},geoVanDerGrinten:function(){return nD},geoVanDerGrinten2:function(){return nF},geoVanDerGrinten2Raw:function(){return nR},geoVanDerGrinten3:function(){return nN},geoVanDerGrinten3Raw:function(){return nB},geoVanDerGrinten4:function(){return nU},geoVanDerGrinten4Raw:function(){return nj},geoVanDerGrintenRaw:function(){return nz},geoWagner:function(){return nq},geoWagner4:function(){return nX},geoWagner4Raw:function(){return nY},geoWagner6:function(){return nK},geoWagner6Raw:function(){return nZ},geoWagner7:function(){return nH},geoWagnerRaw:function(){return nV},geoWiechel:function(){return n$},geoWiechelRaw:function(){return nJ},geoWinkel3:function(){return n0},geoWinkel3Raw:function(){return nQ}});var n=r(87952),i=Math.abs,a=Math.atan,o=Math.atan2,s=Math.cos,l=Math.exp,u=Math.floor,c=Math.log,f=Math.max,h=Math.min,p=Math.pow,d=Math.round,v=Math.sign||function(t){return t>0?1:t<0?-1:0},g=Math.sin,y=Math.tan,m=Math.PI,x=m/2,b=m/4,_=Math.SQRT1_2,w=L(2),T=L(m),k=2*m,A=180/m,M=m/180;function S(t){return t>1?x:t<-1?-x:Math.asin(t)}function E(t){return t>1?0:t<-1?m:Math.acos(t)}function L(t){return t>0?Math.sqrt(t):0}function C(t){return(l(t)-l(-t))/2}function P(t){return(l(t)+l(-t))/2}function O(t){var e=y(t/2),r=2*c(s(t/2))/(e*e);function n(t,e){var n=s(t),i=s(e),a=g(e),o=i*n,l=-((1-o?c((1+o)/2)/(1-o):-.5)+r/(1+o));return[l*i*g(t),l*a]}return n.invert=function(e,n){var a,l=L(e*e+n*n),u=-t/2,f=50;if(!l)return[0,0];do{var h=u/2,p=s(h),d=g(h),v=d/p,y=-c(i(p));u-=a=(2/v*y-r*v-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(i(a)>1e-6&&--f>0);var m=g(u);return[o(e*m,l*s(u)),S(n*m/l)]},n}function I(){var t=x,e=(0,n.U)(O),r=e(t);return r.radius=function(r){return arguments.length?e(t=r*M):t*A},r.scale(179.976).clipAngle(147)}function z(t,e){var r,n=s(e),i=(r=E(n*s(t/=2)))?r/Math.sin(r):1;return[2*n*g(t)*i,g(e)*i]}function D(){return(0,n.c)(z).scale(152.63)}function R(t){var e=g(t),r=s(t),n=t>=0?1:-1,a=y(n*t),l=(1+e-r)/2;function u(t,i){var u=s(i),c=s(t/=2);return[(1+u)*g(t),(n*i>-o(c,a)-.001?0:-(10*n))+l+g(i)*r-(1+u)*e*c]}return u.invert=function(t,u){var c=0,f=0,h=50;do{var p=s(c),d=g(c),v=s(f),y=g(f),m=1+v,x=m*d-t,b=l+y*r-m*e*p-u,_=m*p/2,w=-d*y,T=e*m*d/2,k=r*v+e*p*y,A=w*T-k*_,M=(b*w-x*k)/A/2,S=(x*T-b*_)/A;i(S)>2&&(S/=2),c-=M,f-=S}while((i(M)>1e-6||i(S)>1e-6)&&--h>0);return n*f>-o(s(c),a)-.001?[2*c,f]:null},u}function F(){var t=20*M,e=t>=0?1:-1,r=y(e*t),i=(0,n.U)(R),a=i(t),l=a.stream;return a.parallel=function(n){return arguments.length?(r=y((e=(t=n*M)>=0?1:-1)*t),i(t)):t*A},a.stream=function(n){var i=a.rotate(),u=l(n),c=(a.rotate([0,0]),l(n)),f=a.precision();return a.rotate(i),u.sphere=function(){c.polygonStart(),c.lineStart();for(var n=-180*e;e*n<180;n+=90*e)c.point(n,90*e);if(t)for(;e*(n-=3*e*f)>=-180;)c.point(n,-(e*o(s(n*M/2),r))*A);c.lineEnd(),c.polygonEnd()},u},a.scale(218.695).center([0,28.0974])}function B(t,e){var r=y(e/2),n=L(1-r*r),i=1+n*s(t/=2),a=g(t)*n/i,o=r/i,l=a*a,u=o*o;return[4/3*a*(3+l-3*u),4/3*o*(3+3*l-u)]}function N(){return(0,n.c)(B).scale(66.1603)}z.invert=function(t,e){if(!(t*t+4*e*e>m*m+1e-6)){var r=t,n=e,a=25;do{var o,l=g(r),u=g(r/2),c=s(r/2),f=g(n),h=s(n),p=g(2*n),d=f*f,v=h*h,y=u*u,x=1-v*c*c,b=x?E(h*c)*L(o=1/x):o=0,_=2*b*h*u-t,w=b*f-e,T=o*(v*y+b*h*c*d),k=o*(.5*l*p-2*b*f*u),A=.25*o*(p*u-b*f*v*l),M=o*(d*c+b*y*h),S=k*A-M*T;if(!S)break;var C=(w*k-_*M)/S,P=(_*A-w*T)/S;r-=C,n-=P}while((i(C)>1e-6||i(P)>1e-6)&&--a>0);return[r,n]}},B.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&i(e)>1)return null;var r,n,a=1+t*t+e*e,l=L((a-L(a*a-4*e*e))/2),u=S(l)/3,f=l?c((r=i(e/l))+L(r*r-1))/3:c((n=i(t))+L(n*n+1))/3,h=s(u),p=P(f),d=p*p-h*h;return[2*v(t)*o(C(f)*h,.25-d),2*v(e)*o(p*g(u),.25+d)]};var j=L(8),U=c(1+w);function V(t,e){var r=i(e);return r1e-12&&--u>0);return[t/(s(o)*(j-1/g(o))),v(e)*o]};var H=r(69020);function G(t){var e=2*m/t;function r(t,r){var n=(0,H.O)(t,r);if(i(t)>x){var a=o(n[1],n[0]),l=L(n[0]*n[0]+n[1]*n[1]),u=e*d((a-x)/e)+x,c=o(g(a-=u),2-s(a));a=u+S(m/l*g(c))-c,n[0]=l*s(a),n[1]=l*g(a)}return n}return r.invert=function(t,r){var n=L(t*t+r*r);if(n>x){var i=o(r,t),l=e*d((i-x)/e)+x,u=i>l?-1:1,c=n*s(l-i),f=1/y(u*E((c-m)/L(m*(m-2*c)+n*n)));t=n*s(i=l+2*a((f+u*L(f*f-3))/3)),r=n*g(i)}return H.O.invert(t,r)},r}function W(){var t=5,e=(0,n.U)(G),r=e(t),i=r.stream,a=-s(.01*M),l=g(.01*M);return r.lobes=function(r){return arguments.length?e(t=+r):t},r.stream=function(e){var n=r.rotate(),u=i(e),c=(r.rotate([0,0]),i(e));return r.rotate(n),u.sphere=function(){c.polygonStart(),c.lineStart();for(var e=0,r=360/t,n=2*m/t,i=90-180/t,u=x;e0&&i(n)>1e-6);return s<0?NaN:r}function $(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=1e-12),function(n,a,o,s){var l,u,c;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl){o-=u/=2,s-=c/=2;continue}l=v;var g=(o>0?-1:1)*r,y=(s>0?-1:1)*r,m=t(o+g,s),x=t(o,s+y),b=(m[0]-h[0])/g,_=(m[1]-h[1])/g,w=(x[0]-h[0])/y,T=(x[1]-h[1])/y,k=T*b-_*w,A=(.5>i(k)?.5:1)/k;if(u=(d*w-p*T)*A,c=(p*_-d*b)*A,o+=u,s+=c,i(u)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=$(e),e}function tt(){return(0,n.c)(Q()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function te(t,e){var r,n=t*g(e),a=30;do e-=r=(e+g(e)-n)/(1+s(e));while(i(r)>1e-6&&--a>0);return e/2}function tr(t,e,r){function n(n,i){return[t*n*s(i=te(r,i)),e*g(i)]}return n.invert=function(n,i){return[n/(t*s(i=S(i/e))),S((2*i+g(2*i))/r)]},n}Z.invert=function(t,e){var r=2*S(e/2);return[t*s(r/2)/s(r),r]};var tn=tr(w/x,w,m);function ti(){return(0,n.c)(tn).scale(169.529)}function ta(t,e){var r=te(m,e);return[2.00276*t/(1/s(e)+1.11072/s(r)),(e+w*g(r))/2.00276]}function to(){return(0,n.c)(ta).scale(160.857)}function ts(t){var e=0,r=(0,n.U)(t),i=r(e);return i.parallel=function(t){return arguments.length?r(e=t*M):e*A},i}function tl(t,e){return[t*s(e),e]}function tu(){return(0,n.c)(tl).scale(152.63)}function tc(t){if(!t)return tl;var e=1/y(t);function r(r,n){var i=e+t-n,a=i?r*s(n)/i:i;return[i*g(a),e-i*s(a)]}return r.invert=function(r,n){var i=L(r*r+(n=e-n)*n),a=e+t-i;return[i/s(a)*o(r,n),a]},r}function tf(){return ts(tc).scale(123.082).center([0,26.1441]).parallel(45)}function th(t){function e(e,r){var n=x-r,i=n?e*t*g(n)/n:n;return[n*g(i)/t,x-n*s(i)]}return e.invert=function(e,r){var n=e*t,i=x-r,a=L(n*n+i*i),s=o(n,i);return[(a?a/g(a):1)*s/t,x-a]},e}function tp(){var t=.5,e=(0,n.U)(th),r=e(t);return r.fraction=function(r){return arguments.length?e(t=+r):t},r.scale(158.837)}ta.invert=function(t,e){var r,n,a=2.00276*e,o=e<0?-b:b,l=25;do n=a-w*g(o),o-=r=(g(2*o)+2*o-m*g(n))/(2*s(2*o)+2+m*s(n)*w*s(o));while(i(r)>1e-6&&--l>0);return[t*(1/s(n=a-w*g(o))+1.11072/s(o))/2.00276,n]},tl.invert=function(t,e){return[t/s(e),e]};var td=tr(1,4/m,m);function tv(){return(0,n.c)(td).scale(152.63)}var tg=r(24052),ty=r(92992);function tm(t,e,r,n,a,l){var u,c=s(l);if(i(t)>1||i(l)>1)u=E(r*a+e*n*c);else{var f=g(t/2),h=g(l/2);u=2*S(L(f*f+e*n*h*h))}return i(u)>1e-6?[u,o(n*g(l),e*a-r*n*c)]:[0,0]}function tx(t,e,r){return E((t*t+e*e-r*r)/(2*t*e))}function tb(t,e,r){for(var n,i=[[t[0],t[1],g(t[1]),s(t[1])],[e[0],e[1],g(e[1]),s(e[1])],[r[0],r[1],g(r[1]),s(r[1])]],a=i[2],o=0;o<3;++o,a=n)n=i[o],a.v=tm(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=tx(i[0].v[0],i[2].v[0],i[1].v[0]),c=tx(i[0].v[0],i[1].v[0],i[2].v[0]),f=m-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var h=[i[2].point[0]=i[0].point[0]+i[2].v[0]*s(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(t,e){var r,n=g(e),a=s(e),o=[,,,];for(r=0;r<3;++r){var l,p=i[r];if(o[r]=tm(e-p[1],p[3],p[2],a,n,t-p[0]),!o[r][0])return p.point;o[r][1]=(l=o[r][1]-p.v[1])-2*m*u((l+m)/(2*m))}var d=h.slice();for(r=0;r<3;++r){var v=2==r?0:r+1,y=tx(i[r].v[0],o[r][0],o[v][0]);o[r][1]<0&&(y=-y),r?1==r?(y=c-y,d[0]-=o[r][0]*s(y),d[1]-=o[r][0]*g(y)):(y=f-y,d[0]+=o[r][0]*s(y),d[1]+=o[r][0]*g(y)):(d[0]+=o[r][0]*s(y),d[1]-=o[r][0]*g(y))}return d[0]/=3,d[1]/=3,d}}function t_(t){return t[0]*=M,t[1]*=M,t}function tw(){return tT([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function tT(t,e,r){var i=(0,tg.c)({type:"MultiPoint",coordinates:[t,e,r]}),a=[-i[0],-i[1]],o=(0,ty.c)(a),s=tb(t_(o(t)),t_(o(e)),t_(o(r)));s.invert=$(s);var l=(0,n.c)(s).rotate(a),u=l.center;return delete l.rotate,l.center=function(t){return arguments.length?u(o(t)):o.invert(u())},l.clipAngle(90)}function tk(t,e){var r=L(1-g(e));return[2/T*t*r,T*(1-r)]}function tA(){return(0,n.c)(tk).scale(95.6464).center([0,30])}function tM(t){var e=y(t);function r(t,r){return[t,(t?t/g(t):1)*(g(r)*s(t)-e*s(r))]}return r.invert=e?function(t,r){t&&(r*=g(t)/t);var n=s(t);return[t,2*o(L(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,S(t?e*y(t)/t:e)]},r}function tS(){return ts(tM).scale(249.828).clipAngle(90)}tk.invert=function(t,e){var r=(r=e/T-1)*r;return[r>0?t*L(m/r)/2:0,S(1-r)]};var tE=L(3);function tL(t,e){return[tE*t*(2*s(2*e/3)-1)/T,tE*T*g(e/3)]}function tC(){return(0,n.c)(tL).scale(156.19)}function tP(t){var e=s(t);function r(t,r){return[t*e,g(r)/e]}return r.invert=function(t,r){return[t/e,S(r*e)]},r}function tO(){return ts(tP).parallel(38.58).scale(195.044)}function tI(t){var e=s(t);function r(t,r){return[t*e,(1+e)*y(r/2)]}return r.invert=function(t,r){return[t/e,2*a(r/(1+e))]},r}function tz(){return ts(tI).scale(124.75)}function tD(t,e){var r=L(8/(3*m));return[r*t*(1-i(e)/m),r*e]}function tR(){return(0,n.c)(tD).scale(165.664)}function tF(t,e){var r=L(4-3*g(i(e)));return[2/L(6*m)*t*r,v(e)*L(2*m/3)*(2-r)]}function tB(){return(0,n.c)(tF).scale(165.664)}function tN(t,e){var r=L(m*(4+m));return[2/r*t*(1+L(1-4*e*e/(m*m))),4/r*e]}function tj(){return(0,n.c)(tN).scale(180.739)}function tU(t,e){var r=(2+x)*g(e);e/=2;for(var n=0,a=1/0;n<10&&i(a)>1e-6;n++){var o=s(e);e-=a=(e+g(e)*(o+2)-r)/(2*o*(1+o))}return[2/L(m*(4+m))*t*(1+s(e)),2*L(m/(4+m))*g(e)]}function tV(){return(0,n.c)(tU).scale(180.739)}function tq(t,e){return[t*(1+s(e))/L(2+m),2*e/L(2+m)]}function tH(){return(0,n.c)(tq).scale(173.044)}function tG(t,e){for(var r=(1+x)*g(e),n=0,a=1/0;n<10&&i(a)>1e-6;n++)e-=a=(e+g(e)-r)/(1+s(e));return r=L(2+m),[t*(1+s(e))/r,2*e/r]}function tW(){return(0,n.c)(tG).scale(173.044)}tL.invert=function(t,e){var r=3*S(e/(tE*T));return[T*t/(tE*(2*s(2*r/3)-1)),r]},tD.invert=function(t,e){var r=L(8/(3*m)),n=e/r;return[t/(r*(1-i(n)/m)),n]},tF.invert=function(t,e){var r=2-i(e)/L(2*m/3);return[t*L(6*m)/(2*r),v(e)*S((4-r*r)/3)]},tN.invert=function(t,e){var r=L(m*(4+m))/2;return[t*r/(1+L(1-e*e*(4+m)/(4*m))),e*r/2]},tU.invert=function(t,e){var r=e*L((4+m)/m)/2,n=S(r),i=s(n);return[t/(2/L(m*(4+m))*(1+i)),S((n+r*(i+2))/(2+x))]},tq.invert=function(t,e){var r=L(2+m),n=e*r/2;return[r*t/(1+s(n)),n]},tG.invert=function(t,e){var r=1+x,n=L(r/2);return[2*t*n/(1+s(e*=n)),S((e+g(e))/r)]};var tY=3+2*w;function tX(t,e){var r=g(t/=2),n=s(t),i=L(s(e)),o=s(e/=2),l=g(e)/(o+w*n*i),u=L(2/(1+l*l)),f=L((w*o+(n+r)*i)/(w*o+(n-r)*i));return[tY*(u*(f-1/f)-2*c(f)),tY*(u*l*(f+1/f)-2*a(l))]}function tZ(){return(0,n.c)(tX).scale(62.5271)}tX.invert=function(t,e){if(!(r=B.invert(t/1.2,1.065*e)))return null;var r,n=r[0],o=r[1],l=20;t/=tY,e/=tY;do{var u=n/2,p=o/2,d=g(u),v=s(u),y=g(p),m=s(p),b=s(o),T=L(b),k=y/(m+w*v*T),A=k*k,M=L(2/(1+A)),S=(w*m+(v+d)*T)/(w*m+(v-d)*T),E=L(S),C=E-1/E,P=E+1/E,O=M*C-2*c(E)-t,I=M*k*P-2*a(k)-e,z=y&&_*T*d*A/y,D=(w*v*m+T)/(2*(m+w*v*T)*(m+w*v*T)*T),R=-.5*k*M*M*M,F=R*z,N=R*D,j=(j=2*m+w*T*(v-d))*j*E,U=(w*v*m*T+b)/j,V=-(w*d*y)/(T*j),q=C*F-2*U/E+M*(U+U/S),H=C*N-2*V/E+M*(V+V/S),G=k*P*F-2*z/(1+A)+M*P*z+M*k*(U-U/S),W=k*P*N-2*D/(1+A)+M*P*D+M*k*(V-V/S),Y=H*G-W*q;if(!Y)break;var X=(I*H-O*W)/Y,Z=(O*G-I*q)/Y;n-=X,o=f(-x,h(x,o-Z))}while((i(X)>1e-6||i(Z)>1e-6)&&--l>0);return 1e-6>i(i(o)-x)?[0,o]:l&&[n,o]};var tK=s(35*M);function tJ(t,e){var r=y(e/2);return[t*tK*L(1-r*r),(1+tK)*r]}function t$(){return(0,n.c)(tJ).scale(137.152)}function tQ(t,e){var r=e/2,n=s(r);return[2*t/T*s(e)*n*n,T*y(r)]}function t0(){return(0,n.c)(tQ).scale(135.264)}function t1(t){var e=1-t,r=i(m,0)[0]-i(-m,0)[0],n=L(2*(i(0,x)[1]-i(0,-x)[1])/r);function i(r,n){var i=s(n),a=g(n);return[i/(e+t*i)*r,e*n+t*a]}function a(t,e){var r=i(t,e);return[r[0]*n,r[1]/n]}function o(t){return a(0,t)[1]}return a.invert=function(r,i){var a=J(o,i);return[r/n*(t+e/s(a)),a]},a}function t2(){var t=.5,e=(0,n.U)(t1),r=e(t);return r.alpha=function(r){return arguments.length?e(t=+r):t},r.scale(168.725)}tJ.invert=function(t,e){var r=e/(1+tK);return[t&&t/(tK*L(1-r*r)),2*a(r)]},tQ.invert=function(t,e){var r=a(e/T),n=s(r),i=2*r;return[t*T/2/(s(i)*n*n),i]};var t3=r(4888),t4=r(69604);function t5(t){return[t[0]/2,S(y(t[1]/2*M))*A]}function t6(t){return[2*t[0],2*a(g(t[1]*M))*A]}function t8(t){null==t&&(t=t3.c);var e=t(),r=(0,t4.c)().scale(A).precision(0).clipAngle(null).translate([0,0]);function n(t){return e(t5(t))}function i(t){n[t]=function(){return arguments.length?(e[t].apply(e,arguments),n):e[t]()}}return e.invert&&(n.invert=function(t){return t6(e.invert(t))}),n.stream=function(t){var n=e.stream(t),i=r.stream({point:function(t,e){n.point(t/2,S(y(-e/2*M))*A)},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}});return i.sphere=n.sphere,i},n.rotate=function(t){return arguments.length?(r.rotate(t),n):r.rotate()},n.center=function(t){return arguments.length?(e.center(t5(t)),n):t6(e.center())},i("angle"),i("clipAngle"),i("clipExtent"),i("fitExtent"),i("fitHeight"),i("fitSize"),i("fitWidth"),i("scale"),i("translate"),i("precision"),n.scale(249.5)}function t7(t,e){var r=2*m/e,n=t*t;function a(e,a){var l=(0,H.O)(e,a),u=l[0],c=l[1],f=u*u+c*c;if(f>n){var h=L(f),p=o(c,u),v=r*d(p/r),y=p-v,b=t*s(y),_=(t*g(y)-y*g(b))/(x-b),w=t9(y,_),T=(m-t)/et(w,b,m);u=h;var k,A=50;do u-=k=(t+et(w,b,u)*T-h)/(w(u)*T);while(i(k)>1e-6&&--A>0);c=y*g(u),un){var u=L(l),c=o(a,e),f=r*d(c/r),h=c-f;e=u*s(h),a=u*g(h);for(var p=e-x,v=g(e),y=a/v,b=ei(b)||!--_)break;y-=b=(y*v-M*p-a)/(v-2*p*(A*(T+y*w*s(T)-k)-w*(w-y*k))/(A*A))}e=(u=t+et(S,T,e)*(m-t)/et(S,T,m))*s(c=f+y),a=u*g(c)}return H.O.invert(e,a)},a}function t9(t,e){return function(r){var n=t*s(r);return r1e-6||i(p)>1e-6)&&--y>0);return[d,v]},c}var en=er(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function ei(){return(0,n.c)(en).scale(149.995)}var ea=er(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function eo(){return(0,n.c)(ea).scale(153.93)}var es=er(5/6*m,-.62636,-.0344,0,1.3493,-.05524,0,.045);function el(){return(0,n.c)(es).scale(130.945)}function eu(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}function ec(){return(0,n.c)(eu).scale(131.747)}eu.invert=function(t,e){var r,n=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(i(r)>1e-6&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=n*n)*l;n-=r=(n*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(i(r)>1e-6&&--o>0);return[n,a]};var ef=er(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function eh(){return(0,n.c)(ef).scale(131.087)}function ep(t){var e=t(x,0)[0]-t(-x,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*m,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*m;return o<-m?o+=2*m:o>m&&(o-=2*m),a[0]=o,a}),r}function ed(t,e){var r=v(t),n=v(e),a=s(e),l=s(t)*a,u=g(t)*a,c=g(n*e);t=i(o(u,c)),e=S(l),i(t-x)>1e-6&&(t%=x);var f=function(t,e){if(e===x)return[0,0];var r,n,a=g(e),o=a*a,l=o*o,u=1+l,c=1+3*l,f=1-l,h=S(1/L(u)),p=f+o*u*h,d=(1-a)/p,v=L(d),y=d*u,b=L(y),_=v*f;if(0===t)return[0,-(_+o*b)];var w,T=s(e),k=1/T,A=2*a*T,M=(-p*T-(-3*o+h*c)*A*(1-a))/(p*p),E=o*u*M+d*c*A,C=-k*A,P=-k*E,O=-2*k*(.5*M/v*f-2*o*v*A),I=4*t/m;if(t>.222*m||e.175*m){if(r=(_+o*L(y*(1+l)-_*_))/(1+l),t>m/4)return[r,r];var z=r,D=.5*r;r=.5*(D+z),n=50;do{var R=L(y-r*r),F=r*(O+C*R)+P*S(r/b)-I;if(!F)break;F<0?D=r:z=r,r=.5*(D+z)}while(i(z-D)>1e-6&&--n>0)}else{r=1e-6,n=25;do{var B=r*r,N=L(y-B),j=O+C*N,U=r*j+P*S(r/b)-I,V=j+(P-C*B)/N;r-=w=N?U/V:0}while(i(w)>1e-6&&--n>0)}return[r,-_-o*L(y-r*r)]}(t>m/4?x-t:t,e);return t>m/4&&(c=f[0],f[0]=-f[1],f[1]=-c),f[0]*=r,f[1]*=-n,f}function ev(){return(0,n.c)(ep(ed)).scale(239.75)}function eg(t,e){if(e<1e-6)return c=g(t),o=s(t),n=e*(t-c*o)/4,[c-n*o,o+n*c,1-e*c*c/2,t-n];if(e>=.999999){var r;return n=(1-e)/4,o=P(t),c=((r=l(2*(r=t)))-1)/(r+1),u=1/o,[c+n*((f=o*C(t))-t)/(o*o),u-n*c*u*(f-t),u+n*c*u*(f+t),2*a(l(t))-x+n*(f-t)/o]}var n,o,u,c,f,h=[1,0,0,0,0,0,0,0,0],p=[L(e),0,0,0,0,0,0,0,0],d=0;for(o=L(1-e),f=1;i(p[d]/h[d])>1e-6&&d<8;)n=h[d++],p[d]=(n-o)/2,h[d]=(n+o)/2,o=L(n*o),f*=2;u=f*h[d]*t;do u=(S(c=p[d]*g(o=u)/h[d])+u)/2;while(--d);return[g(u),c=s(u),c/s(u-o),u]}function ey(t,e){if(!e)return t;if(1===e)return c(y(t/2+b));for(var r=1,n=L(1-e),o=L(e),s=0;i(o)>1e-6;s++){if(t%m){var l=a(n*y(t)/r);l<0&&(l+=m),t+=l+~~(t/m)*m}else t+=t;o=(r+n)/2,n=L(r*n),o=((r=o)-n)/2}return t/(p(2,s)*r)}function em(t,e){var r,n,u,f,h,p=(w-1)/(w+1),d=L(1-p*p),b=ey(x,d*d),_=l(-1*c(y(m/4+i(e)/2)))/L(p),T=(r=_*s(-1*t),n=_*g(-1*t),u=r*r,f=n+1,[.5*((r>=0?x:-x)-o(h=1-u-n*n,2*r)),-.25*c(h*h+4*u)+.5*c(f*f+u)]),k=function(t,e,r){var n=i(t),o=C(i(e));if(n){var s=1/g(n),l=1/(y(n)*y(n)),u=-(l+o*o*s*s*r-1+r),c=(-u+L(u*u-(r-1)*l*4))/2;return[ey(a(1/L(c)),r)*v(t),ey(a(L((c/l-1)/r)),1-r)*v(e)]}return[0,ey(a(o),1-r)*v(e)]}(T[0],T[1],d*d);return[-k[1],(e>=0?1:-1)*(.5*b-k[0])]}function ex(){return(0,n.c)(ep(em)).scale(151.496)}ed.invert=function(t,e){i(t)>1&&(t=2*v(t)-t),i(e)>1&&(e=2*v(e)-e);var r=v(t),n=v(e),a=-r*t,l=-n*e,u=l/a<1,c=function(t,e){for(var r=0,n=1,a=.5,o=50;;){var l=a*a,u=L(a),c=S(1/L(1+l)),f=1-l+a*(1+l)*c,h=(1-u)/f,p=L(h),d=h*(1+l),v=p*(1-l),g=L(d-t*t),y=e+v+a*g;if(1e-12>i(n-r)||0==--o||0===y)break;y>0?r=a:n=a,a=.5*(r+n)}if(!o)return null;var x=S(u),b=s(x),_=1/b,w=2*u*b,T=(-f*b-(-3*a+c*(1+3*l))*w*(1-u))/(f*f),k=.5*T/p*(1-l)-2*a*p*w,A=-_*(a*(1+l)*T+h*(1+3*l)*w);return[m/4*(t*(-2*_*k+-_*w*g)+A*S(t/L(d))),x]}(u?l:a,u?a:l),f=c[0],h=c[1],p=s(h);return u&&(f=-x-f),[r*(o(g(f)*p,-g(h))+m),n*S(s(f)*p)]},em.invert=function(t,e){var r,n,i,s,u,f,h,p,d,v=(w-1)/(w+1),g=L(1-v*v),y=(r=.5*ey(x,g*g)-e,n=-t,i=g*g,r?(s=eg(r,i),n)?(f=(u=eg(n,1-i))[1]*u[1]+i*s[0]*s[0]*u[0]*u[0],[[s[0]*u[2]/f,s[1]*s[2]*u[0]*u[1]/f],[s[1]*u[1]/f,-s[0]*s[2]*u[0]*u[2]/f],[s[2]*u[1]*u[2]/f,-i*s[0]*s[1]*u[0]/f]]):[[s[0],0],[s[1],0],[s[2],0]]:[[0,(u=eg(n,1-i))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),m=(h=y[0],d=(p=y[1])[0]*p[0]+p[1]*p[1],[(h[0]*p[0]+h[1]*p[1])/d,(h[1]*p[0]-h[0]*p[1])/d]);return[-(o(m[1],m[0])/1),2*a(l(-.5*c(v*m[0]*m[0]+v*m[1]*m[1])))-x]};var eb=r(61780);function e_(t){var e=g(t),r=s(t),n=ew(t);function a(t,a){var o=n(t,a);t=o[0];var l=g(a=o[1]),u=s(a),c=s(t),f=E(e*l+r*u*c),h=g(f),p=i(h)>1e-6?f/h:1;return[p*r*g(t),(i(t)>x?p:-p)*(e*u-r*l*c)]}return n.invert=ew(-t),a.invert=function(t,r){var i=L(t*t+r*r),a=-g(i),l=s(i),u=i*l,c=-r*a,f=i*e,h=L(u*u+c*c-f*f),p=o(u*f+c*h,c*f-u*h),d=(i>x?-1:1)*o(t*a,i*s(p)*l+r*g(p)*a);return n.invert(d,p)},a}function ew(t){var e=g(t),r=s(t);return function(t,n){var i=s(n),a=s(t)*i,l=g(t)*i,u=g(n);return[o(l,a*r-u*e),S(u*r+a*e)]}}function eT(){var t=0,e=(0,n.U)(e_),r=e(t),i=r.rotate,a=r.stream,o=(0,eb.c)();return r.parallel=function(n){if(!arguments.length)return t*A;var i=r.rotate();return e(t=n*M).rotate(i)},r.rotate=function(e){return arguments.length?(i.call(r,[e[0],e[1]-t*A]),o.center([-e[0],-e[1]]),r):(e=i.call(r),e[1]+=t*A,e)},r.stream=function(t){return(t=a(t)).sphere=function(){t.polygonStart();var e,r=o.radius(89.99)().coordinates[0],n=r.length-1,i=-1;for(t.lineStart();++i=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},r.scale(79.4187).parallel(45).clipAngle(179.999)}var ek=r(84706),eA=r(16016),eM=S(1-.3333333333333333)*A,eS=tP(0);function eE(t){var e=eM*M,r=tk(m,e)[0]-tk(-m,e)[0],n=eS(0,e)[1],a=tk(0,e)[1],o=T-a,s=k/t,l=4/k,c=n+o*o*4/k;function p(p,d){var v,g=i(d);if(g>e){var y=h(t-1,f(0,u((p+m)/s)));p+=m*(t-1)/t-y*s,(v=tk(p,g))[0]=v[0]*k/r-k*(t-1)/(2*t)+y*k/t,v[1]=n+(v[1]-a)*4*o/k,d<0&&(v[1]=-v[1])}else v=eS(p,d);return v[0]*=l,v[1]/=c,v}return p.invert=function(e,p){e/=l;var d=i(p*=c);if(d>n){var v=h(t-1,f(0,u((e+m)/s)));e=(e+m*(t-1)/t-v*s)*r/k;var g=tk.invert(e,.25*(d-n)*k/o+a);return g[0]-=m*(t-1)/t-v*s,p<0&&(g[1]=-g[1]),g}return eS.invert(e,p)},p}function eL(t,e){return[t,1&e?89.999999:eM]}function eC(t,e){return[t,1&e?-89.999999:-eM]}function eP(t){return[.999999*t[0],t[1]]}function eO(){var t=4,e=(0,n.U)(eE),r=e(t),i=r.stream;return r.lobes=function(r){return arguments.length?e(t=+r):t},r.stream=function(e){var n=r.rotate(),a=i(e),o=(r.rotate([0,0]),i(e));return r.rotate(n),a.sphere=function(){var e,r;(0,eA.c)((e=180/t,r=[].concat((0,ek.ik)(-180,180+e/2,e).map(eL),(0,ek.ik)(180,-180-e/2,-e).map(eC)),{type:"Polygon",coordinates:[180===e?r.map(eP):r]}),o)},a},r.scale(239.75)}function eI(t){var e,r=1+t,n=S(g(1/r)),a=2*L(m/(e=m+4*n*r)),l=.5*a*(r+L(t*(2+t))),u=t*t,c=r*r;function f(f,h){var p,d,v=1-g(h);if(v&&v<2){var y,b=x-h,_=25;do{var w=g(b),T=s(b),k=n+o(w,r-T),A=1+c-2*r*T;b-=y=(b-u*n-r*w+A*k-.5*v*e)/(2*r*w*k)}while(i(y)>1e-12&&--_>0);p=a*L(A),d=f*k/m}else p=a*(t+v),d=f*n/m;return[p*g(d),l-p*s(d)]}return f.invert=function(t,i){var s=t*t+(i-=l)*i,f=(1+c-s/(a*a))/(2*r),h=E(f),p=g(h),d=n+o(p,r-f);return[S(t/L(s))*m/d,S(1-2*(h-u*n-r*p+(1+c-2*r*f)*d)/e)]},f}function ez(){var t=1,e=(0,n.U)(eI),r=e(t);return r.ratio=function(r){return arguments.length?e(t=+r):t},r.scale(167.774).center([0,18.67])}function eD(t,e){return e>-.7109889596207567?(t=tn(t,e),t[1]+=.0528035274542,t):tl(t,e)}function eR(){return(0,n.c)(eD).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function eF(t,e){return i(e)>.7109889596207567?(t=tn(t,e),t[1]-=e>0?.0528035274542:-.0528035274542,t):tl(t,e)}function eB(){return(0,n.c)(eF).scale(152.63)}function eN(t,e,r,n){var i=L(4*m/(2*r+(1+t-e/2)*g(2*r)+(t+e)/2*g(4*r)+e/2*g(6*r))),a=L(n*g(r)*L((1+t*s(2*r)+e*s(4*r))/(1+t+e))),o=r*u(1);function l(r){return L(1+t*s(2*r)+e*s(4*r))}function u(n){var i=n*r;return(2*i+(1+t-e/2)*g(2*i)+(t+e)/2*g(4*i)+e/2*g(6*i))/r}function c(t){return l(t)*g(t)}var f=function(t,e){var n=r*J(u,o*g(e)/r,e/m);isNaN(n)&&(n=r*v(e));var c=i*l(n);return[c*a*t/m*s(n),c/a*g(n)]};return f.invert=function(t,e){var n=J(c,e*a/i);return[t*m/(s(n)*i*a*l(n)),S(r*u(n/r)/o)]},0===r&&(i=L(n/m),(f=function(t,e){return[t*i,g(e)/i]}).invert=function(t,e){return[t/i,S(e*i)]}),f}function ej(){var t=1,e=0,r=45*M,i=2,a=(0,n.U)(eN),o=a(t,e,r,i);return o.a=function(n){return arguments.length?a(t=+n,e,r,i):t},o.b=function(n){return arguments.length?a(t,e=+n,r,i):e},o.psiMax=function(n){return arguments.length?a(t,e,r=+n*M,i):r*A},o.ratio=function(n){return arguments.length?a(t,e,r,i=+n):i},o.scale(180.739)}function eU(t,e,r){function n(r){return t+(1-t)*p(1-p(r,e),1/e)}function a(t){var e,r,i,a,o;return void 0===e&&(e=20),o=((r=n(0))+4*(i=n(.5*(0+t)))+(a=n(t)))*(t-0)/6,function t(e,r,n,i,a,o,s,l,u,c,f){var h,p,d,v,g,y,m,x,b,_;if(f.nanEncountered)return NaN;if(h=n-r,p=e(r+.25*h),d=e(n-.25*h),isNaN(p)||isNaN(d)){f.nanEncountered=!0;return}return(_=((y=(v=h*(i+4*p+a)/12)+(g=h*(a+4*d+o)/12))-s)/15,c>u)?(f.maxDepthCount++,y+_):Math.abs(_)t?r=n:e=n,n=e+r>>1;while(n>e);var i=l[n+1]-l[n];return i&&(i=(t-l[n+1])/i),(n+1+i)/1e3}var f=2*c(1)/m*o/r,h=function(t,e){var r=c(i(g(e))),a=n(r)*t;return r/=f,[a,e>=0?r:-r]};return h.invert=function(t,e){var r;return 1>i(e*=f)&&(r=v(e)*S(a(i(e))*o)),[t/n(i(e)),r]},h}function eV(){var t=0,e=2.5,r=1.183136,i=(0,n.U)(eU),a=i(t,e,r);return a.alpha=function(n){return arguments.length?i(t=+n,e,r):t},a.k=function(n){return arguments.length?i(t,e=+n,r):e},a.gamma=function(n){return arguments.length?i(t,e,r=+n):r},a.scale(152.63)}function eq(t,e){for(var r,n,i,a=-1,o=t.length,s=t[0],l=[];++aa[o][2][0];++o);var l=t(r-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}r?a.invert=r(a):t.invert&&(a.invert=function(r,n){for(var o=s[+(n<0)],l=e[+(n<0)],u=0,c=o.length;ui(h[0]-p[0])&&1e-6>i(h[1]-p[1]))?d:null}}});var o,s,l=(0,n.c)(a),u=l.stream;return l.stream=function(t){var e=l.rotate(),r=u(t),n=(l.rotate([0,0]),u(t));return l.rotate(e),r.sphere=function(){(0,eA.c)(o,n)},r},l.lobes=function(r){return arguments.length?(o=function(t){var e,r,n,i,a,o,s,l=[],u=t[0].length;for(s=0;s=0;--s)r=(e=t[1][s])[0][0],n=e[0][1],i=e[1][1],a=e[2][0],o=e[2][1],l.push(eq([[a-1e-6,o-1e-6],[a-1e-6,i+1e-6],[r+1e-6,i+1e-6],[r+1e-6,n-1e-6]],30));return{type:"Polygon",coordinates:[(0,ek.Uf)(l)]}}(r),s=(e=r.map(function(t){return t.map(function(t){return[[t[0][0]*M,t[0][1]*M],[t[1][0]*M,t[1][1]*M],[t[2][0]*M,t[2][1]*M]]})})).map(function(e){return e.map(function(e){var r,n=t(e[0][0],e[0][1])[0],i=t(e[2][0],e[2][1])[0],a=t(e[1][0],e[0][1])[1],o=t(e[1][0],e[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]})}),l):e.map(function(t){return t.map(function(t){return[[t[0][0]*A,t[0][1]*A],[t[1][0]*A,t[1][1]*A],[t[2][0]*A,t[2][1]*A]]})})},null!=e&&l.lobes(e),l}eD.invert=function(t,e){return e>-.7109889596207567?tn.invert(t,e-.0528035274542):tl.invert(t,e)},eF.invert=function(t,e){return i(e)>.7109889596207567?tn.invert(t,e+(e>0?.0528035274542:-.0528035274542)):tl.invert(t,e)};var eG=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function eW(){return eH(ta,eG).scale(160.857)}var eY=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function eX(){return eH(eF,eY).scale(152.63)}var eZ=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function eK(){return eH(tn,eZ).scale(169.529)}var eJ=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function e$(){return eH(tn,eJ).scale(169.529).rotate([20,0])}var eQ=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function e0(){return eH(eD,eQ,$).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var e1=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function e2(){return eH(tl,e1).scale(152.63).rotate([-20,0])}function e3(t,e){return[3/k*t*L(m*m/3-e*e),e]}function e4(){return(0,n.c)(e3).scale(158.837)}function e5(t){function e(e,r){if(1e-6>i(i(r)-x))return[0,r<0?-2:2];var n=g(r),a=p((1+n)/(1-n),t/2),o=.5*(a+1/a)+s(e*=t);return[2*g(e)/o,(a-1/a)/o]}return e.invert=function(e,r){var n=i(r);if(1e-6>i(n-2))return e?null:[0,v(r)*x];if(n>2)return null;e/=2,r/=2;var a=e*e,s=r*r,l=2*r/(1+a+s);return l=p((1+l)/(1-l),1/t),[o(2*e,1-a-s)/t,S((l-1)/(l+1))]},e}function e6(){var t=.5,e=(0,n.U)(e5),r=e(t);return r.spacing=function(r){return arguments.length?e(t=+r):t},r.scale(124.75)}e3.invert=function(t,e){return[k/3*t/L(m*m/3-e*e),e]};var e8=m/w;function e7(t,e){return[t*(1+L(s(e)))/2,e/(s(e/2)*s(t/6))]}function e9(){return(0,n.c)(e7).scale(97.2672)}function rt(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.119161+-.0143059*r+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function re(){return(0,n.c)(rt).scale(139.98)}function rr(t,e){return[g(t)/s(e),y(e)*s(t)]}function rn(){return(0,n.c)(rr).scale(144.049).clipAngle(89.999)}function ri(t){var e=s(t),r=y(b+t/2);function n(n,a){var o=a-t,s=1e-6>i(o)?n*e:1e-6>i(s=b+a/2)||1e-6>i(i(s)-x)?0:n*o/c(y(s)/r);return[s,o]}return n.invert=function(n,a){var o,s=a+t;return[1e-6>i(a)?n/e:1e-6>i(o=b+s/2)||1e-6>i(i(o)-x)?0:n*c(y(o)/r)/a,s]},n}function ra(){return ts(ri).parallel(40).scale(158.837)}function ro(t,e){return[t,1.25*c(y(b+.4*e))]}function rs(){return(0,n.c)(ro).scale(108.318)}function rl(t){var e=t.length-1;function r(r,n){for(var i,a=s(n),o=2/(1+a*s(r)),l=o*a*g(r),u=o*g(n),c=e,f=t[c],h=f[0],p=f[1];--c>=0;)h=(f=t[c])[0]+l*(i=h)-u*p,p=f[1]+l*p+u*i;return[h=l*(i=h)-u*p,p=l*p+u*i]}return r.invert=function(r,n){var l=20,u=r,c=n;do{for(var f,h=e,p=t[h],d=p[0],v=p[1],y=0,m=0;--h>=0;)p=t[h],y=d+u*(f=y)-c*m,m=v+u*m+c*f,d=p[0]+u*(f=d)-c*v,v=p[1]+u*v+c*f;y=d+u*(f=y)-c*m,m=v+u*m+c*f,d=u*(f=d)-c*v-r,v=u*v+c*f-n;var x,b,_=y*y+m*m;u-=x=(d*y+v*m)/_,c-=b=(v*y-d*m)/_}while(i(x)+i(b)>1e-6*1e-6&&--l>0);if(l){var w=L(u*u+c*c),T=2*a(.5*w),k=g(T);return[o(u*k,w*s(T)),w?S(c*k/w):0]}},r}e7.invert=function(t,e){var r=i(t),n=i(e),a=1e-6,o=x;ni(k)&&1e-6>i(A))break}return[t<0?-a:a,e<0?-o:o]},rt.invert=function(t,e){var r=v(t)*m,n=e/2,a=50;do{var o=r*r,s=n*n,l=r*n,u=r*(.975534+s*(-.119161+-.0143059*o+-.0547009*s))-t,c=n*(1.00384+o*(.0802894+-.02855*s+199025e-9*o)+s*(.0998909+-.0491032*s))-e,f=.975534-s*(.119161+3*o*.0143059+.0547009*s),h=-l*(.238322+.2188036*s+.0286118*o),p=l*(.1605788+7961e-7*o+-.0571*s),d=1.00384+o*(.0802894+199025e-9*o)+s*(3*(.0998909-.02855*o)-.245516*s),g=h*p-d*f,y=(c*h-u*d)/g,x=(u*p-c*f)/g;r-=y,n-=x}while((i(y)>1e-6||i(x)>1e-6)&&--a>0);return a&&[r,n]},rr.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?_*L((i-L(i*i-4*r))/r):1/L(n);return[S(t*a),v(e)*E(a)]},ro.invert=function(t,e){return[t,2.5*a(l(.8*e))-.625*m]};var ru=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rc=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],rf=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],rh=[[.9245,0],[0,0],[.01943,0]],rp=[[.721316,0],[0,0],[-.00881625,-.00617325]];function rd(){return rx(ru,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function rv(){return rx(rc,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function rg(){return rx(rf,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function ry(){return rx(rh,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function rm(){return rx(rp,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function rx(t,e){var r=(0,n.c)(rl(t)).rotate(e).clipAngle(90),i=(0,ty.c)(e),a=r.center;return delete r.rotate,r.center=function(t){return arguments.length?a(i(t)):i.invert(a())},r}var rb=L(6),r_=L(7);function rw(t,e){var r=S(7*g(e)/(3*rb));return[rb*t*(2*s(2*r/3)-1)/r_,9*g(r/3)/r_]}function rT(){return(0,n.c)(rw).scale(164.859)}function rk(t,e){for(var r,n=(1+_)*g(e),a=e,o=0;o<25&&(a-=r=(g(a/2)+g(a)-n)/(.5*s(a/2)+s(a)),!(1e-6>i(r)));o++);return[t*(1+2*s(a)/s(a/2))/(3*w),2*L(3)*g(a/2)/L(2+w)]}function rA(){return(0,n.c)(rk).scale(188.209)}function rM(t,e){for(var r,n=L(6/(4+m)),a=(1+m/4)*g(e),o=e/2,l=0;l<25&&(o-=r=(o/2+g(o)-a)/(.5+s(o)),!(1e-6>i(r)));l++);return[n*(.5+s(o))*t/1.5,n*o]}function rS(){return(0,n.c)(rM).scale(166.518)}rw.invert=function(t,e){var r=3*S(e*r_/9);return[t*r_/(rb*(2*s(2*r/3)-1)),S(3*g(r)*rb/7)]},rk.invert=function(t,e){var r=e*L(2+w)/(2*L(3)),n=2*S(r);return[3*w*t/(1+2*s(n)/s(n/2)),S((r+g(n))/(1+_))]},rM.invert=function(t,e){var r=L(6/(4+m)),n=e/r;return 1e-6>i(i(n)-x)&&(n=n<0?-x:x),[1.5*t/(r*(.5+s(n))),S((n/2+g(n))/(1+m/4))]};var rE=r(47984);function rL(t,e){var r=e*e,n=r*r,i=r*n;return[t*(.84719-.13063*r+i*i*(-.04515+.05494*r-.02326*n+.00331*i)),e*(1.01183+n*n*(-.02625+.01926*r-.00396*n))]}function rC(){return(0,n.c)(rL).scale(175.295)}function rP(t,e){return[t*(1+s(e))/2,2*(e-y(e/2))]}function rO(){return(0,n.c)(rP).scale(152.63)}rL.invert=function(t,e){var r,n,a,o,s=e,l=25;do a=(n=s*s)*n,s-=r=(s*(1.01183+a*a*(-.02625+.01926*n-.00396*a))-e)/(1.01183+a*a*(-.23625+.21186*n+-.05148*a));while(i(r)>1e-12&&--l>0);return a=(n=s*s)*n,o=n*a,[t/(.84719-.13063*n+o*o*(-.04515+.05494*n-.02326*a+.00331*o)),s]},rP.invert=function(t,e){for(var r=e/2,n=0,a=1/0;n<10&&i(a)>1e-6;++n){var o=s(e/2);e-=a=(e-y(e/2)-r)/(1-.5/(o*o))}return[2*t/(1+s(e)),e]};var rI=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function rz(){return eH(X(1/0),rI).rotate([20,0]).scale(152.63)}function rD(t,e){var r=g(e),n=s(e),a=v(t);if(0===t||i(e)===x)return[0,e];if(0===e)return[t,0];if(i(t)===x)return[t*n,x*r];var o=m/(2*t)-2*t/m,l=2*e/m,u=(1-l*l)/(r-l),c=o*o,f=u*u,h=1+c/f,p=1+f/c,d=(o*r/u-o/2)/h,y=(f*r/c+u/2)/p,b=y*y-(f*r*r/c+u*r-1)/p;return[x*(d+L(d*d+n*n/h)*a),x*(y+L(b<0?0:b)*v(-e*o)*a)]}function rR(){return(0,n.c)(rD).scale(127.267)}function rF(t,e){var r=e*e;return[t,e*(1.0148+r*r*(.23185+r*(-.14499+.02406*r)))]}function rB(){return(0,n.c)(rF).scale(139.319)}function rN(t,e){if(1e-6>i(e))return[t,0];var r=y(e),n=t*g(e);return[g(n)/r,e+(1-s(n))/r]}function rj(){return(0,n.c)(rN).scale(103.74)}rD.invert=function(t,e){var r=(t/=x)*t,n=r+(e/=x)*e,i=m*m;return[t?(n-1+L((1-n)*(1-n)+4*r))/(2*t)*x:0,J(function(t){return n*(m*g(t)-2*t)*m+4*t*t*(e-g(t))+2*m*t-i*e},0)]},rF.invert=function(t,e){e>1.790857183?e=1.790857183:e<-1.790857183&&(e=-1.790857183);var r,n=e;do{var a=n*n;n-=r=(n*(1.0148+a*a*(.23185+a*(-.14499+.02406*a)))-e)/(1.0148+a*a*(1.1592500000000001+a*(-1.01493+.21654*a)))}while(i(r)>1e-6);return[t,n]},rN.invert=function(t,e){if(1e-6>i(e))return[t,0];var r,n=t*t+e*e,a=.5*e,o=10;do{var l=y(a),u=1/s(a),c=n-2*e*a+a*a;a-=r=(l*c+2*(a-e))/(2+c*u*u+2*(a-e)*l)}while(i(r)>1e-6&&--o>0);return l=y(a),[(i(e)=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),d=(a=p.map(r.project),l=p.map(e.project),n=u=rH(a[1],a[0]),i=c=rH(l[1],l[0]),f=o(n[0]*i[1]-n[1]*i[0],n[0]*i[0]+n[1]*i[1]),h=rG(u)/rG(c),rq([1,0,a[0][0],0,1,a[0][1]],rq([h,0,0,0,h,0],rq([s(f),g(f),0,-g(f),s(f),0],[1,0,-l[0][0],0,1,-l[0][1]]))));e.transform=r.transform?rq(r.transform,d):d;for(var v=r.edges,y=0,m=v.length;y0?[-e[0],0]:[180-e[0],180])};var e=rK.map(function(e){return{face:e,project:t(e)}});return[-1,0,0,1,0,1,4,5].forEach(function(t,r){var n=e[t];n&&(n.children||(n.children=[])).push(e[r])}),rW(e[0],function(t,r){return e[t<-m/2?r<0?6:4:t<0?r<0?2:0:tr2(l[0],a)?8+3*o:0>r2(l[1],a)?8+3*o+1:0>r2(l[2],a)?8+3*o+2:o]}).angle(-30).scale(110.625).center([0,45])}function r2(t,e){for(var r=0,n=t.length,i=0;rn^p>n&&r<(h-u)*(n-c)/(p-c)+u&&(i=!i)}return i}(t[0],r))return t.push(e),!0})||t.push([e])}),ne=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}};function na(t){var e=t(x,0)[0]-t(-x,0)[0];function r(r,n){var a=i(r)0?r-m:r+m,n),s=(o[0]-o[1])*_,l=(o[0]+o[1])*_;if(a)return[s,l];var u=e*_,c=s>0^l>0?-1:1;return[c*s-v(l)*u,c*l-v(s)*u]}return t.invert&&(r.invert=function(r,n){var a=(r+n)*_,o=(n-r)*_,s=i(a)<.5*e&&i(o)<.5*e;if(!s){var l=e*_,u=a>0^o>0?-1:1,c=-u*r+(o>0?1:-1)*l,f=-u*n+(a>0?1:-1)*l;a=(-c-f)*_,o=(c-f)*_}var h=t.invert(a,o);return s||(h[0]+=a>0?m:-m),h}),(0,n.c)(r).rotate([-90,-90,45]).clipAngle(179.999)}function no(){return na(ed).scale(176.423)}function ns(){return na(em).scale(111.48)}function nl(t,e){if(!(0<=(e=+e)&&e<=20))throw Error("invalid digits");function r(t){var r=t.length,n=2,i=Array(r);for(i[0]=+t[0].toFixed(e),i[1]=+t[1].toFixed(e);n2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function i(t){return t.map(n)}function a(t){var e;if(null==t)return t;switch(t.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:t.geometries.map(a)};break;case"Point":e={type:"Point",coordinates:r(t.coordinates)};break;case"MultiPoint":e={type:t.type,coordinates:t.coordinates.map(r)};break;case"LineString":e={type:t.type,coordinates:n(t.coordinates)};break;case"MultiLineString":case"Polygon":e={type:t.type,coordinates:i(t.coordinates)};break;case"MultiPolygon":e={type:"MultiPolygon",coordinates:t.coordinates.map(i)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function o(t){var e={type:"Feature",properties:t.properties,geometry:a(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case"Feature":return o(t);case"FeatureCollection":var s={type:"FeatureCollection",features:t.features.map(o)};return null!=t.bbox&&(s.bbox=t.bbox),s;default:return a(t)}return t}function nu(t){var e=g(t);function r(r,n){var i=e?y(r*e/2)/e:r/2;if(!n)return[2*i,-t];var o=2*a(i*g(n)),l=1/y(n);return[g(o)*l,n+(1-s(o))*l-t]}return r.invert=function(r,n){if(1e-6>i(n+=t))return[e?2*a(e*r/2)/e:r,0];var o,l=r*r+n*n,u=0,c=10;do{var f=y(u),h=1/s(u),p=l-2*n*u+u*u;u-=o=(f*p+2*(u-n))/(2+p*h*h+2*(u-n)*f)}while(i(o)>1e-6&&--c>0);var d=r*(f=y(u)),v=y(i(n)0?x:-x)*(f+o*(d-l)/2+o*o*(d-2*f+l)/2)]}function np(){return(0,n.c)(nh).scale(152.63)}function nd(t,e){var r=function(t){function e(e,r){var n=s(r),i=(t-1)/(t-n*s(e));return[i*n*g(e),i*g(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=L(n),a=(t-L(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[o(e*a,i*L(1-a*a)),i?S(r*a/i):0]},e}(t);if(!e)return r;var n=s(e),i=g(e);function a(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return a.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},a}function nv(){var t=2,e=0,r=(0,n.U)(nd),i=r(t,e);return i.distance=function(n){return arguments.length?r(t=+n,e):t},i.tilt=function(n){return arguments.length?r(t,e=n*M):e*A},i.scale(432.147).clipAngle(E(1/t)*A-1e-6)}function ng(t){return t.length>0}function ny(t){return -90===t||90===t?[0,t]:[-180,Math.floor(1e4*t)/1e4]}function nm(t){var e=t[0],r=t[1],n=!1;return e<=-179.9999?(e=-180,n=!0):e>=179.9999&&(e=180,n=!0),r<=-89.9999?(r=-90,n=!0):r>=89.9999&&(r=90,n=!0),n?[e,r]:t}function nx(t){return t.map(nm)}function nb(t,e,r){for(var n=0,i=t.length;n=179.9999||c<=-89.9999||c>=89.9999){a[o]=nm(l);for(var f=o+1;f-179.9999&&p<179.9999&&d>-89.9999&&d<89.9999)break}if(f===o+1)continue;if(o){var v={index:-1,polygon:e,ring:a.slice(0,o+1)};v.ring[v.ring.length-1]=ny(c),r[r.length-1]=v}else r.pop();if(f>=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=ny(a[0][1]),o=-1,s=a.length}}}}function n_(t){var e,r,n,i,a,o,s=t.length,l={},u={};for(e=0;e0?m-l:l)*A],c=(0,n.c)(t(s)).rotate(u),f=(0,ty.c)(u),h=c.center;return delete c.rotate,c.center=function(t){return arguments.length?h(f(t)):f.invert(h())},c.clipAngle(90)}function nE(t){var e=s(t);function r(t,r){var n=(0,rX.Y)(t,r);return n[0]*=e,n}return r.invert=function(t,r){return rX.Y.invert(t/e,r)},r}function nL(){return nC([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function nC(t,e){return nS(nE,t,e)}function nP(t){if(!(t*=2))return H.O;var e=-t/2,r=-e,n=t*t,i=y(r),a=.5/g(r);function l(i,a){var o=E(s(a)*s(i-e)),l=E(s(a)*s(i-r)),u=a<0?-1:1;return o*=o,l*=l,[(o-l)/(2*t),u*L(4*n*l-(n-o+l)*(n-o+l))/(2*t)]}return l.invert=function(t,n){var l,u,c=n*n,f=s(L(c+(l=t+e)*l)),h=s(L(c+(l=t+r)*l));return[o(u=f-h,l=(f+h)*i),(n<0?-1:1)*E(L(l*l+u*u)*a)]},l}function nO(){return nI([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function nI(t,e){return nS(nP,t,e)}function nz(t,e){if(1e-6>i(e))return[t,0];var r=i(e/x),n=S(r);if(1e-6>i(t)||1e-6>i(i(e)-x))return[0,v(e)*m*y(n/2)];var a=s(n),o=i(m/t-t/m)/2,l=o*o,u=a/(r+a-1),c=u*(2/r-1),f=c*c,h=f+l,p=u-f,d=l+u;return[v(t)*m*(o*p+L(l*p*p-h*(u*u-f)))/h,v(e)*m*(c*d-o*L((l+1)*h-d*d))/h]}function nD(){return(0,n.c)(nz).scale(79.4183)}function nR(t,e){if(1e-6>i(e))return[t,0];var r=i(e/x),n=S(r);if(1e-6>i(t)||1e-6>i(i(e)-x))return[0,v(e)*m*y(n/2)];var a=s(n),o=i(m/t-t/m)/2,l=o*o,u=a*(L(1+l)-o*a)/(1+l*r*r);return[v(t)*m*u,v(e)*m*L(1-u*(2*o+u))]}function nF(){return(0,n.c)(nR).scale(79.4183)}function nB(t,e){if(1e-6>i(e))return[t,0];var r=e/x,n=S(r);if(1e-6>i(t)||1e-6>i(i(e)-x))return[0,m*y(n/2)];var a=(m/t-t/m)/2,o=r/(1+s(n));return[m*(v(t)*L(a*a+1-o*o)-a),m*o]}function nN(){return(0,n.c)(nB).scale(79.4183)}function nj(t,e){if(!e)return[t,0];var r=i(e);if(!t||r===x)return[0,e];var n=r/x,a=n*n,o=(8*n-a*(a+2)-5)/(2*a*(n-1)),s=o*o,l=n*o,u=a+s+2*l,c=n+3*o,f=t/x,h=f+1/f,p=v(i(t)-x)*L(h*h-4),d=p*p,g=(p*(u+s-1)+2*L(u*(a+s*d-1)+(1-a)*(a*(c*c+4*s)+12*l*s+4*s*s)))/(4*u+d);return[v(t)*x*g,v(e)*x*L(1+p*i(g)-g*g)]}function nU(){return(0,n.c)(nj).scale(127.16)}function nV(t,e,r,n){var i=m/3;t=f(t,1e-6),e=f(e,1e-6),t=h(t,x),e=h(e,m-1e-6),r=h(r=f(r,0),99.999999);var a=(n=f(n,1e-6))/100,l=E((r/100+1)*s(i))/i,u=g(t)/g(l*x),c=e/m,p=L(a*g(t/2)/g(e/2));return function(t,e,r,n,i){function a(a,o){var l=r*g(n*o),u=L(1-l*l),c=L(2/(1+u*s(a*=i)));return[t*u*c*g(a),e*l*c]}return a.invert=function(a,s){var l=a/t,u=s/e,c=L(l*l+u*u),f=2*S(c/2);return[o(a*y(f),t*c)/i,c&&S(s*g(f)/(e*r*c))/n]},a}(p/L(c*u*l),1/(p*L(c*u*l)),u,l,c)}function nq(){var t=65*M,e=60*M,r=20,i=200,a=(0,n.U)(nV),o=a(t,e,r,i);return o.poleline=function(n){return arguments.length?a(t=+n*M,e,r,i):t*A},o.parallels=function(n){return arguments.length?a(t,e=+n*M,r,i):e*A},o.inflation=function(n){return arguments.length?a(t,e,r=+n,i):r},o.ratio=function(n){return arguments.length?a(t,e,r,i=+n):i},o.scale(163.775)}function nH(){return nq().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}nf.forEach(function(t){t[1]*=1.0144}),nh.invert=function(t,e){var r=e/x,n=90*r,a=h(18,i(n/5)),o=f(0,u(a));do{var s=nf[o][1],l=nf[o+1][1],c=nf[h(19,o+2)][1],p=c-s,d=c-2*l+s,v=2*(i(r)-l)/p,g=d/p,y=v*(1-g*v*(1-2*g*v));if(y>=0||1===o){n=(e>=0?5:-5)*(y+a);var m,b=50;do o=u(a=h(18,i(n)/5)),y=a-o,s=nf[o][1],n-=(m=(e>=0?x:-x)*((l=nf[o+1][1])+y*((c=nf[h(19,o+2)][1])-s)/2+y*y*(c-2*l+s)/2)-e)*A;while(i(m)>1e-12&&--b>0);break}}while(--o>=0);var _=nf[o][0],w=nf[o+1][0],T=nf[h(19,o+2)][0];return[t/(w+y*(T-_)/2+y*y*(T-2*w+_)/2),n*M]},nA.invert=function(t,e){var r=e/1.70711,n=g(b*r);return[t/(.74482-.34588*n*n),2*a(r)]},nz.invert=function(t,e){if(1e-6>i(e))return[t,0];if(1e-6>i(t))return[0,x*g(2*a(e/m))];var r=(t/=m)*t,n=(e/=m)*e,o=r+n,l=o*o,u=-i(e)*(1+o),c=u-2*n+r,f=-2*u+1+2*n+l,h=(u-c*c/(3*f))/f,p=2*L(-h/3),d=E(3*(n/f+(2*c*c*c/(f*f*f)-9*u*c/(f*f))/27)/(h*p))/3;return[m*(o-1+L(1+2*(r-n)+l))/(2*t),v(e)*m*(-p*s(d+m/3)-c/(3*f))]},nR.invert=function(t,e){if(!t)return[0,x*g(2*a(e/m))];var r=i(t/m),n=(1-r*r-(e/=m)*e)/(2*r),s=L(n*n+1);return[v(t)*m*(s-n),v(e)*x*g(2*o(L((1-2*n*r)*(n+s)-r),L(s+n+r)))]},nB.invert=function(t,e){if(!e)return[t,0];var r=e/m,n=(m*m*(1-r*r)-t*t)/(2*m*t);return[t?m*(v(t)*L(n*n+1)-n):0,x*g(2*a(r))]},nj.invert=function(t,e){if(!t||!e)return[t,e];e/=m;var r,n=v(t)*t/x,a=(n*n-1+4*e*e)/i(n),o=a*a,s=2*e,l=50;do{var u=s*s,c=(8*s-u*(u+2)-5)/(2*u*(s-1)),f=(3*s-u*s-10)/(2*u*s),h=c*c,p=s*c,d=s+c,g=d*d,y=s+3*c,b=g*(u+h*o-1)+(1-u)*(u*(y*y+4*h)+h*(12*p+4*h)),_=-2*d*(4*p*h+(1-4*u+3*u*u)*(1+f)+h*(-6+14*u-o+(-8+8*u-2*o)*f)+p*(-8+12*u+(-10+10*u-o)*f)),w=L(b);s-=r=(a*(g+h-1)+2*w-n*(4*g+o))/(a*(2*c*f+2*d*(1+f))+_/w-8*d*(a*(-1+h+g)+2*w)*(1+f)/(o+4*g))}while(r>1e-6&&--l>0);return[v(t)*(L(a*a+4)+a)*m/4,x*s]};var nG=4*m+3*L(3),nW=2*L(2*m*L(3)/nG),nY=tr(nW*L(3)/m,nW,nG/6);function nX(){return(0,n.c)(nY).scale(176.84)}function nZ(t,e){return[t*L(1-3*e*e/(m*m)),e]}function nK(){return(0,n.c)(nZ).scale(152.63)}function nJ(t,e){var r=s(e),n=s(t)*r,i=1-n,a=s(t=o(g(t)*r,-g(e))),l=g(t);return[l*(r=L(1-n*n))-a*i,-a*r-l*i]}function n$(){return(0,n.c)(nJ).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function nQ(t,e){var r=z(t,e);return[(r[0]+t/x)/2,(r[1]+e)/2]}function n0(){return(0,n.c)(nQ).scale(158.837)}nZ.invert=function(t,e){return[t/L(1-3*e*e/(m*m)),e]},nJ.invert=function(t,e){var r=-((t*t+e*e)/2),n=L(-r*(2+r)),i=e*r+t*n,a=t*r-e*n,s=L(a*a+i*i);return[o(n*i,s*(1+r)),s?-S(n*a/s):0]},nQ.invert=function(t,e){var r=t,n=e,a=25;do{var o,l=s(n),u=g(n),c=g(2*n),f=u*u,h=l*l,p=g(r),d=s(r/2),v=g(r/2),y=v*v,m=1-h*d*d,b=m?E(l*d)*L(o=1/m):o=0,_=.5*(2*b*l*v+r/x)-t,w=.5*(b*u+n)-e,T=.5*o*(h*y+b*l*d*f)+.5/x,k=o*(p*c/4-b*u*v),A=.125*o*(c*v-b*u*h*p),M=.5*o*(f*d+b*y*l)+.5,S=k*A-M*T,C=(w*k-_*M)/S,P=(_*A-w*T)/S;r-=C,n-=P}while((i(C)>1e-6||i(P)>1e-6)&&--a>0);return[r,n]}},88728:function(t,e,r){"use strict";function n(){return new i}function i(){this.reset()}r.d(e,{c:function(){return n}}),i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(t){o(a,t,this.t),o(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new i;function o(t,e,r){var n=t.s=e+r,i=n-e;t.t=e-(n-i)+(r-i)}},95384:function(t,e,r){"use strict";r.d(e,{cp:function(){return x},mQ:function(){return h},oB:function(){return d}});var n,i,a,o,s,l=r(88728),u=r(64528),c=r(70932),f=r(16016),h=(0,l.c)(),p=(0,l.c)(),d={point:c.c,lineStart:c.c,lineEnd:c.c,polygonStart:function(){h.reset(),d.lineStart=v,d.lineEnd=g},polygonEnd:function(){var t=+h;p.add(t<0?u.kD+t:t),this.lineStart=this.lineEnd=this.point=c.c},sphere:function(){p.add(u.kD)}};function v(){d.point=y}function g(){m(n,i)}function y(t,e){d.point=m,n=t,i=e,t*=u.qw,e*=u.qw,a=t,o=(0,u.W8)(e=e/2+u.wL),s=(0,u.g$)(e)}function m(t,e){t*=u.qw,e*=u.qw,e=e/2+u.wL;var r=t-a,n=r>=0?1:-1,i=n*r,l=(0,u.W8)(e),c=(0,u.g$)(e),f=s*c,p=o*l+f*(0,u.W8)(i),d=f*n*(0,u.g$)(i);h.add((0,u.WE)(d,p)),a=t,o=l,s=c}function x(t){return p.reset(),(0,f.c)(t,d),2*p}},13696:function(t,e,r){"use strict";r.d(e,{c:function(){return C}});var n,i,a,o,s,l,u,c,f,h,p=r(88728),d=r(95384),v=r(84220),g=r(64528),y=r(16016),m=(0,p.c)(),x={point:b,lineStart:w,lineEnd:T,polygonStart:function(){x.point=k,x.lineStart=A,x.lineEnd=M,m.reset(),d.oB.polygonStart()},polygonEnd:function(){d.oB.polygonEnd(),x.point=b,x.lineStart=w,x.lineEnd=T,d.mQ<0?(n=-(a=180),i=-(o=90)):m>g.Gg?o=90:m<-g.Gg&&(i=-90),h[0]=n,h[1]=a},sphere:function(){n=-(a=180),i=-(o=90)}};function b(t,e){f.push(h=[n=t,a=t]),eo&&(o=e)}function _(t,e){var r=(0,v.ux)([t*g.qw,e*g.qw]);if(c){var l=(0,v.CW)(c,r),u=[l[1],-l[0],0],p=(0,v.CW)(u,l);(0,v.cJ)(p),p=(0,v.G)(p);var d,y=t-s,m=y>0?1:-1,x=p[0]*g.oh*m,b=(0,g.a2)(y)>180;b^(m*so&&(o=d):b^(m*s<(x=(x+360)%360-180)&&xo&&(o=e)),b?tS(n,a)&&(a=t):S(t,a)>S(n,a)&&(n=t):a>=n?(ta&&(a=t)):t>s?S(n,t)>S(n,a)&&(a=t):S(t,a)>S(n,a)&&(n=t)}else f.push(h=[n=t,a=t]);eo&&(o=e),c=r,s=t}function w(){x.point=_}function T(){h[0]=n,h[1]=a,x.point=b,c=null}function k(t,e){if(c){var r=t-s;m.add((0,g.a2)(r)>180?r+(r>0?360:-360):r)}else l=t,u=e;d.oB.point(t,e),_(t,e)}function A(){d.oB.lineStart()}function M(){k(l,u),d.oB.lineEnd(),(0,g.a2)(m)>g.Gg&&(n=-(a=180)),h[0]=n,h[1]=a,c=null}function S(t,e){return(e-=t)<0?e+360:e}function E(t,e){return t[0]-e[0]}function L(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eS(s[0],s[1])&&(s[1]=l[1]),S(l[0],s[1])>S(s[0],s[1])&&(s[0]=l[0])):u.push(s=l);for(c=-1/0,r=u.length-1,e=0,s=u[r];e<=r;s=l,++e)l=u[e],(p=S(s[1],l[0]))>c&&(c=p,n=l[0],a=s[1])}return f=h=null,n===1/0||i===1/0?[[NaN,NaN],[NaN,NaN]]:[[n,i],[a,o]]}},84220:function(t,e,r){"use strict";r.d(e,{CW:function(){return s},Ez:function(){return o},G:function(){return i},cJ:function(){return c},mg:function(){return l},ux:function(){return a},wx:function(){return u}});var n=r(64528);function i(t){return[(0,n.WE)(t[1],t[0]),(0,n.qR)(t[2])]}function a(t){var e=t[0],r=t[1],i=(0,n.W8)(r);return[i*(0,n.W8)(e),i*(0,n.g$)(e),(0,n.g$)(r)]}function o(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function s(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function l(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function u(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function c(t){var e=(0,n._I)(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}},24052:function(t,e,r){"use strict";r.d(e,{c:function(){return I}});var n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x=r(64528),b=r(70932),_=r(16016),w={sphere:b.c,point:T,lineStart:A,lineEnd:E,polygonStart:function(){w.lineStart=L,w.lineEnd=C},polygonEnd:function(){w.lineStart=A,w.lineEnd=E}};function T(t,e){t*=x.qw,e*=x.qw;var r=(0,x.W8)(e);k(r*(0,x.W8)(t),r*(0,x.g$)(t),(0,x.g$)(e))}function k(t,e,r){++n,a+=(t-a)/n,o+=(e-o)/n,s+=(r-s)/n}function A(){w.point=M}function M(t,e){t*=x.qw,e*=x.qw;var r=(0,x.W8)(e);g=r*(0,x.W8)(t),y=r*(0,x.g$)(t),m=(0,x.g$)(e),w.point=S,k(g,y,m)}function S(t,e){t*=x.qw,e*=x.qw;var r=(0,x.W8)(e),n=r*(0,x.W8)(t),a=r*(0,x.g$)(t),o=(0,x.g$)(e),s=(0,x.WE)((0,x._I)((s=y*o-m*a)*s+(s=m*n-g*o)*s+(s=g*a-y*n)*s),g*n+y*a+m*o);i+=s,l+=s*(g+(g=n)),u+=s*(y+(y=a)),c+=s*(m+(m=o)),k(g,y,m)}function E(){w.point=T}function L(){w.point=P}function C(){O(d,v),w.point=T}function P(t,e){d=t,v=e,t*=x.qw,e*=x.qw,w.point=O;var r=(0,x.W8)(e);g=r*(0,x.W8)(t),y=r*(0,x.g$)(t),m=(0,x.g$)(e),k(g,y,m)}function O(t,e){t*=x.qw,e*=x.qw;var r=(0,x.W8)(e),n=r*(0,x.W8)(t),a=r*(0,x.g$)(t),o=(0,x.g$)(e),s=y*o-m*a,d=m*n-g*o,v=g*a-y*n,b=(0,x._I)(s*s+d*d+v*v),_=(0,x.qR)(b),w=b&&-_/b;f+=w*s,h+=w*d,p+=w*v,i+=_,l+=_*(g+(g=n)),u+=_*(y+(y=a)),c+=_*(m+(m=o)),k(g,y,m)}function I(t){n=i=a=o=s=l=u=c=f=h=p=0,(0,_.c)(t,w);var e=f,r=h,d=p,v=e*e+r*r+d*d;return v0?os)&&(o+=i*a.kD));for(var h,p=o;i>0?p>s:p-e[2]?-r:r)+a.kD-a.Gg)%a.kD}function u(){var t,e,r=i([0,0]),n=i(90),l=i(6),u={point:function(r,n){t.push(r=e(r,n)),r[0]*=a.oh,r[1]*=a.oh}};function c(){var i=r.apply(this,arguments),c=n.apply(this,arguments)*a.qw,f=l.apply(this,arguments)*a.qw;return t=[],e=(0,o.O)(-i[0]*a.qw,-i[1]*a.qw,0).invert,s(u,c,f,1),i={type:"Polygon",coordinates:[t]},t=e=null,i}return c.center=function(t){return arguments.length?(r="function"==typeof t?t:i([+t[0],+t[1]]),c):r},c.radius=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),c):n},c.precision=function(t){return arguments.length?(l="function"==typeof t?t:i(+t),c):l},c}},78284:function(t,e,r){"use strict";var n=r(14229),i=r(64528);e.c=(0,n.c)(function(){return!0},function(t){var e,r=NaN,n=NaN,a=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var l,u,c,f,h,p,d=o>0?i.pi:-i.pi,v=(0,i.a2)(o-r);(0,i.a2)(v-i.pi)0?i.or:-i.or),t.point(a,n),t.lineEnd(),t.lineStart(),t.point(d,n),t.point(o,n),e=0):a!==d&&v>=i.pi&&((0,i.a2)(r-a)i.Gg?(0,i.MQ)(((0,i.g$)(u)*(h=(0,i.W8)(s))*(0,i.g$)(c)-(0,i.g$)(s)*(f=(0,i.W8)(u))*(0,i.g$)(l))/(f*h*p)):(u+s)/2,t.point(a,n),t.lineEnd(),t.lineStart(),t.point(d,n),e=0),t.point(r=o,n=s),a=d},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}},function(t,e,r,n){var a;if(null==t)a=r*i.or,n.point(-i.pi,a),n.point(0,a),n.point(i.pi,a),n.point(i.pi,0),n.point(i.pi,-a),n.point(0,-a),n.point(-i.pi,-a),n.point(-i.pi,0),n.point(-i.pi,a);else if((0,i.a2)(t[0]-e[0])>i.Gg){var o=t[0]1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}},2728:function(t,e,r){"use strict";r.d(e,{c:function(){return l}});var n=r(84220),i=r(61780),a=r(64528),o=r(41860),s=r(14229);function l(t){var e=(0,a.W8)(t),r=6*a.qw,l=e>0,u=(0,a.a2)(e)>a.Gg;function c(t,r){return(0,a.W8)(t)*(0,a.W8)(r)>e}function f(t,r,i){var o=(0,n.ux)(t),s=(0,n.ux)(r),l=[1,0,0],u=(0,n.CW)(o,s),c=(0,n.Ez)(u,u),f=u[0],h=c-f*f;if(!h)return!i&&t;var p=(0,n.CW)(l,u),d=(0,n.wx)(l,e*c/h),v=(0,n.wx)(u,-e*f/h);(0,n.mg)(d,v);var g=(0,n.Ez)(d,p),y=(0,n.Ez)(p,p),m=g*g-y*((0,n.Ez)(d,d)-1);if(!(m<0)){var x=(0,a._I)(m),b=(0,n.wx)(p,(-g-x)/y);if((0,n.mg)(b,d),b=(0,n.G)(b),!i)return b;var _,w=t[0],T=r[0],k=t[1],A=r[1];T0^b[1]<((0,a.a2)(b[0]-w)a.pi^(w<=b[0]&&b[0]<=T)){var L=(0,n.wx)(p,(-g+x)/y);return(0,n.mg)(L,d),[b,(0,n.G)(L)]}}}function h(e,r){var n=l?t:a.pi-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}return(0,s.c)(c,function(t){var e,r,n,i,s;return{lineStart:function(){i=n=!1,s=1},point:function(p,d){var v,g,y=[p,d],m=c(p,d),x=l?m?0:h(p,d):m?h(p+(p<0?a.pi:-a.pi),d):0;!e&&(i=n=m)&&t.lineStart(),m!==n&&(!(g=f(e,y))||(0,o.c)(e,g)||(0,o.c)(y,g))&&(y[2]=1),m!==n?(s=0,m?(t.lineStart(),g=f(y,e),t.point(g[0],g[1])):(g=f(e,y),t.point(g[0],g[1],2),t.lineEnd()),e=g):u&&e&&l^m&&!(x&r)&&(v=f(y,e,!0))&&(s=0,l?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3))),!m||e&&(0,o.c)(e,y)||t.point(y[0],y[1]),e=y,n=m,r=x},lineEnd:function(){n&&t.lineEnd(),e=null},clean:function(){return s|(i&&n)<<1}}},function(e,n,a,o){(0,i.Q)(o,t,r,a,e,n)},l?[0,-t]:[-a.pi,t-a.pi])}},14229:function(t,e,r){"use strict";r.d(e,{c:function(){return l}});var n=r(97208),i=r(32232),a=r(64528),o=r(58196),s=r(84706);function l(t,e,r,a){return function(l){var f,h,p,d=e(l),v=(0,n.c)(),g=e(v),y=!1,m={point:x,lineStart:_,lineEnd:w,polygonStart:function(){m.point=T,m.lineStart=k,m.lineEnd=A,h=[],f=[]},polygonEnd:function(){m.point=x,m.lineStart=_,m.lineEnd=w,h=(0,s.Uf)(h);var t=(0,o.c)(f,a);h.length?(y||(l.polygonStart(),y=!0),(0,i.c)(h,c,t,r,l)):t&&(y||(l.polygonStart(),y=!0),l.lineStart(),r(null,null,1,l),l.lineEnd()),y&&(l.polygonEnd(),y=!1),h=f=null},sphere:function(){l.polygonStart(),l.lineStart(),r(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function x(e,r){t(e,r)&&l.point(e,r)}function b(t,e){d.point(t,e)}function _(){m.point=b,d.lineStart()}function w(){m.point=x,d.lineEnd()}function T(t,e){p.push([t,e]),g.point(t,e)}function k(){g.lineStart(),p=[]}function A(){T(p[0][0],p[0][1]),g.lineEnd();var t,e,r,n,i=g.clean(),a=v.result(),o=a.length;if(p.pop(),f.push(p),p=null,o){if(1&i){if((e=(r=a[0]).length-1)>0){for(y||(l.polygonStart(),y=!0),l.lineStart(),t=0;t1&&2&i&&a.push(a.pop().concat(a.shift())),h.push(a.filter(u))}}return m}}function u(t){return t.length>1}function c(t,e){return((t=t.x)[0]<0?t[1]-a.or-a.Gg:a.or-t[1])-((e=e.x)[0]<0?e[1]-a.or-a.Gg:a.or-e[1])}},21676:function(t,e,r){"use strict";r.d(e,{c:function(){return s}});var n=r(64528),i=r(97208),a=r(32232),o=r(84706);function s(t,e,r,s){function l(n,i){return t<=n&&n<=r&&e<=i&&i<=s}function u(n,i,a,o){var l=0,u=0;if(null==n||(l=c(n,a))!==(u=c(i,a))||0>h(n,i)^a>0)do o.point(0===l||3===l?t:r,l>1?s:e);while((l=(l+a+4)%4)!==u);else o.point(i[0],i[1])}function c(i,a){return(0,n.a2)(i[0]-t)0?0:3:(0,n.a2)(i[0]-r)0?2:1:(0,n.a2)(i[1]-e)0?1:0:a>0?3:2}function f(t,e){return h(t.x,e.x)}function h(t,e){var r=c(t,1),n=c(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(n){var c,h,p,d,v,g,y,m,x,b,_,w=n,T=(0,i.c)(),k={point:A,lineStart:function(){k.point=M,h&&h.push(p=[]),b=!0,x=!1,y=m=NaN},lineEnd:function(){c&&(M(d,v),g&&x&&T.rejoin(),c.push(T.result())),k.point=A,x&&w.lineEnd()},polygonStart:function(){w=T,c=[],h=[],_=!0},polygonEnd:function(){var e=function(){for(var e=0,r=0,n=h.length;rs&&(f-i)*(s-a)>(p-a)*(t-i)&&++e:p<=s&&(f-i)*(s-a)<(p-a)*(t-i)&&--e;return e}(),r=_&&e,i=(c=(0,o.Uf)(c)).length;(r||i)&&(n.polygonStart(),r&&(n.lineStart(),u(null,null,1,n),n.lineEnd()),i&&(0,a.c)(c,f,e,u,n),n.polygonEnd()),w=n,c=h=p=null}};function A(t,e){l(t,e)&&w.point(t,e)}function M(n,i){var a=l(n,i);if(h&&p.push([n,i]),b)d=n,v=i,g=a,b=!1,a&&(w.lineStart(),w.point(n,i));else if(a&&x)w.point(n,i);else{var o=[y=Math.max(-1e9,Math.min(1e9,y)),m=Math.max(-1e9,Math.min(1e9,m))],u=[n=Math.max(-1e9,Math.min(1e9,n)),i=Math.max(-1e9,Math.min(1e9,i))];(function(t,e,r,n,i,a){var o,s=t[0],l=t[1],u=e[0],c=e[1],f=0,h=1,p=u-s,d=c-l;if(o=r-s,p||!(o>0)){if(o/=p,p<0){if(o0){if(o>h)return;o>f&&(f=o)}if(o=i-s,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>f&&(f=o)}else if(p>0){if(o0)){if(o/=d,d<0){if(o0){if(o>h)return;o>f&&(f=o)}if(o=a-l,d||!(o<0)){if(o/=d,d<0){if(o>h)return;o>f&&(f=o)}else if(d>0){if(o0&&(t[0]=s+f*p,t[1]=l+f*d),h<1&&(e[0]=s+h*p,e[1]=l+h*d),!0}}}}})(o,u,t,e,r,s)?(x||(w.lineStart(),w.point(o[0],o[1])),w.point(u[0],u[1]),a||w.lineEnd(),_=!1):a&&(w.lineStart(),w.point(n,i),_=!1)}y=n,m=i,x=a}return k}}},32232:function(t,e,r){"use strict";r.d(e,{c:function(){return o}});var n=r(41860),i=r(64528);function a(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function o(t,e,r,o,l){var u,c,f=[],h=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,r,o=t[0],s=t[e];if((0,n.c)(o,s)){if(!o[2]&&!s[2]){for(l.lineStart(),u=0;u=0;--u)l.point((d=p[u])[0],d[1]);else o(g.x,g.p.x,-1,l);g=g.p}p=(g=g.o).z,y=!y}while(!g.v);l.lineEnd()}}}function s(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n0&&(i=S(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))g.Gg}).map(l)).concat((0,R.ik)((0,g.Km)(a/p)*p,i,p).filter(function(t){return(0,g.a2)(t%v)>g.Gg}).map(u))}return m.lines=function(){return x().map(function(t){return{type:"LineString",coordinates:t}})},m.outline=function(){return{type:"Polygon",coordinates:[c(n).concat(f(o).slice(1),c(r).reverse().slice(1),f(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(n=+t[0][0],r=+t[1][0],s=+t[0][1],o=+t[1][1],n>r&&(t=n,n=r,r=t),s>o&&(t=s,s=o,o=t),m.precision(y)):[[n,s],[r,o]]},m.extentMinor=function(r){return arguments.length?(e=+r[0][0],t=+r[1][0],a=+r[0][1],i=+r[1][1],e>t&&(r=e,e=t,t=r),a>i&&(r=a,a=i,i=r),m.precision(y)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(d=+t[0],v=+t[1],m):[d,v]},m.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],m):[h,p]},m.precision=function(h){return arguments.length?(y=+h,l=F(a,i,90),u=B(e,t,y),c=F(s,o,90),f=B(n,r,y),m):y},m.extentMajor([[-180,-90+g.Gg],[180,90-g.Gg]]).extentMinor([[-180,-80-g.Gg],[180,80+g.Gg]])}function j(){return N()()}var U,V,q,H,G=r(27284),W=r(7376),Y=(0,v.c)(),X=(0,v.c)(),Z={point:y.c,lineStart:y.c,lineEnd:y.c,polygonStart:function(){Z.lineStart=K,Z.lineEnd=Q},polygonEnd:function(){Z.lineStart=Z.lineEnd=Z.point=y.c,Y.add((0,g.a2)(X)),X.reset()},result:function(){return Y.reset(),Y/2}};function K(){Z.point=J}function J(t,e){Z.point=$,U=q=t,V=H=e}function $(t,e){X.add(H*t-q*e),q=t,H=e}function Q(){$(U,V)}var tt,te,tr,tn,ti=r(73784),ta=0,to=0,ts=0,tl=0,tu=0,tc=0,tf=0,th=0,tp=0,td={point:tv,lineStart:tg,lineEnd:tx,polygonStart:function(){td.lineStart=tb,td.lineEnd=t_},polygonEnd:function(){td.point=tv,td.lineStart=tg,td.lineEnd=tx},result:function(){var t=tp?[tf/tp,th/tp]:tc?[tl/tc,tu/tc]:ts?[ta/ts,to/ts]:[NaN,NaN];return ta=to=ts=tl=tu=tc=tf=th=tp=0,t}};function tv(t,e){ta+=t,to+=e,++ts}function tg(){td.point=ty}function ty(t,e){td.point=tm,tv(tr=t,tn=e)}function tm(t,e){var r=t-tr,n=e-tn,i=(0,g._I)(r*r+n*n);tl+=i*(tr+t)/2,tu+=i*(tn+e)/2,tc+=i,tv(tr=t,tn=e)}function tx(){td.point=tv}function tb(){td.point=tw}function t_(){tT(tt,te)}function tw(t,e){td.point=tT,tv(tt=tr=t,te=tn=e)}function tT(t,e){var r=t-tr,n=e-tn,i=(0,g._I)(r*r+n*n);tl+=i*(tr+t)/2,tu+=i*(tn+e)/2,tc+=i,tf+=(i=tn*t-tr*e)*(tr+t),th+=i*(tn+e),tp+=3*i,tv(tr=t,tn=e)}function tk(t){this._context=t}tk.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,g.kD)}},result:y.c};var tA,tM,tS,tE,tL,tC=(0,v.c)(),tP={point:y.c,lineStart:function(){tP.point=tO},lineEnd:function(){tA&&tI(tM,tS),tP.point=y.c},polygonStart:function(){tA=!0},polygonEnd:function(){tA=null},result:function(){return tC.reset(),+tC}};function tO(t,e){tP.point=tI,tM=tE=t,tS=tL=e}function tI(t,e){tE-=t,tL-=e,tC.add((0,g._I)(tE*tE+tL*tL)),tE=t,tL=e}function tz(){this._string=[]}function tD(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function tR(t,e){var r,n,i=4.5;function a(t){return t&&("function"==typeof i&&n.pointRadius(+i.apply(this,arguments)),(0,m.c)(t,r(n))),n.result()}return a.area=function(t){return(0,m.c)(t,r(Z)),Z.result()},a.measure=function(t){return(0,m.c)(t,r(tP)),tP.result()},a.bounds=function(t){return(0,m.c)(t,r(ti.c)),ti.c.result()},a.centroid=function(t){return(0,m.c)(t,r(td)),td.result()},a.projection=function(e){return arguments.length?(r=null==e?(t=null,W.c):(t=e).stream,a):t},a.context=function(t){return arguments.length?(n=null==t?(e=null,new tz):new tk(e=t),"function"!=typeof i&&n.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(n.pointRadius(+t),+t),a):i},a.projection(t).context(e)}tz.prototype={_radius:4.5,_circle:tD(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=tD(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(!this._string.length)return null;var t=this._string.join("");return this._string=[],t}};var tF=r(87952);function tB(t){var e=0,r=g.pi/3,n=(0,tF.U)(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*g.qw,r=t[1]*g.qw):[e*g.oh,r*g.oh]},i}function tN(t,e){var r=(0,g.g$)(t),n=(r+(0,g.g$)(e))/2;if((0,g.a2)(n)=.12&&i<.234&&n>=-.425&&n<-.214?s:i>=.166&&i<.234&&n>=-.214&&n<-.115?l:o).invert(t)},c.stream=function(r){var n,i;return t&&e===r?t:(i=(n=[o.stream(e=r),s.stream(r),l.stream(r)]).length,t={point:function(t,e){for(var r=-1;++r0?e<-g.or+g.Gg&&(e=-g.or+g.Gg):e>g.or-g.Gg&&(e=g.or-g.Gg);var r=i/(0,g.g3)(tK(e),n);return[r*(0,g.g$)(n*t),i-r*(0,g.W8)(n*t)]}return a.invert=function(t,e){var r=i-e,a=(0,g.kq)(n)*(0,g._I)(t*t+r*r),o=(0,g.WE)(t,(0,g.a2)(r))*(0,g.kq)(r);return r*n<0&&(o-=g.pi*(0,g.kq)(t)*(0,g.kq)(r)),[o/n,2*(0,g.MQ)((0,g.g3)(i/a,1/n))-g.or]},a}function t$(){return tB(tJ).scale(109.5).parallels([30,30])}tY.invert=function(t,e){return[t,2*(0,g.MQ)((0,g.oN)(e))-g.or]};var tQ=r(69604);function t0(t,e){var r=(0,g.W8)(t),n=t===e?(0,g.g$)(t):(r-(0,g.W8)(e))/(e-t),i=r/n+t;if((0,g.a2)(n)2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)}ee.invert=(0,et.g)(function(t){return 2*(0,g.MQ)(t)}),en.invert=function(t,e){return[-e,2*(0,g.MQ)((0,g.oN)(t))-g.or]}},27284:function(t,e,r){"use strict";r.d(e,{c:function(){return i}});var n=r(64528);function i(t,e){var r=t[0]*n.qw,i=t[1]*n.qw,a=e[0]*n.qw,o=e[1]*n.qw,s=(0,n.W8)(i),l=(0,n.g$)(i),u=(0,n.W8)(o),c=(0,n.g$)(o),f=s*(0,n.W8)(r),h=s*(0,n.g$)(r),p=u*(0,n.W8)(a),d=u*(0,n.g$)(a),v=2*(0,n.qR)((0,n._I)((0,n.SD)(o-i)+s*u*(0,n.SD)(a-r))),g=(0,n.g$)(v),y=v?function(t){var e=(0,n.g$)(t*=v)/g,r=(0,n.g$)(v-t)/g,i=r*f+e*p,a=r*h+e*d;return[(0,n.WE)(a,i)*n.oh,(0,n.WE)(r*l+e*c,(0,n._I)(i*i+a*a))*n.oh]}:function(){return[r*n.oh,i*n.oh]};return y.distance=v,y}},64528:function(t,e,r){"use strict";r.d(e,{Gg:function(){return n},Km:function(){return v},MQ:function(){return h},SD:function(){return A},W8:function(){return d},WE:function(){return p},Yz:function(){return y},_I:function(){return _},a2:function(){return f},a6:function(){return w},a8:function(){return i},g$:function(){return x},g3:function(){return m},kD:function(){return l},kq:function(){return b},mE:function(){return T},oN:function(){return g},oh:function(){return u},or:function(){return o},pi:function(){return a},qR:function(){return k},qw:function(){return c},wL:function(){return s}});var n=1e-6,i=1e-12,a=Math.PI,o=a/2,s=a/4,l=2*a,u=180/a,c=a/180,f=Math.abs,h=Math.atan,p=Math.atan2,d=Math.cos,v=Math.ceil,g=Math.exp,y=Math.log,m=Math.pow,x=Math.sin,b=Math.sign||function(t){return t>0?1:t<0?-1:0},_=Math.sqrt,w=Math.tan;function T(t){return t>1?0:t<-1?a:Math.acos(t)}function k(t){return t>1?o:t<-1?-o:Math.asin(t)}function A(t){return(t=x(t/2))*t}},70932:function(t,e,r){"use strict";function n(){}r.d(e,{c:function(){return n}})},73784:function(t,e,r){"use strict";var n=r(70932),i=1/0,a=1/0,o=-1/0,s=o,l={point:function(t,e){to&&(o=t),es&&(s=e)},lineStart:n.c,lineEnd:n.c,polygonStart:n.c,polygonEnd:n.c,result:function(){var t=[[i,a],[o,s]];return o=s=-(a=i=1/0),t}};e.c=l},41860:function(t,e,r){"use strict";r.d(e,{c:function(){return i}});var n=r(64528);function i(t,e){return(0,n.a2)(t[0]-e[0])=0?1:-1,L=E*S,C=L>a.pi,P=x*A;if(o.add((0,a.WE)(P*E*(0,a.g$)(L),b*M+P*(0,a.W8)(L))),c+=C?S+E*a.kD:S,C^y>=r^T>=r){var O=(0,i.CW)((0,i.ux)(g),(0,i.ux)(w));(0,i.cJ)(O);var I=(0,i.CW)(u,O);(0,i.cJ)(I);var z=(C^S>=0?-1:1)*(0,a.qR)(I[2]);(n>z||n===z&&(O[0]||O[1]))&&(f+=C^S>=0?1:-1)}}return(c<-a.Gg||c4*e&&y--){var w=o+d,T=s+v,k=u+g,A=(0,l._I)(w*w+T*T+k*k),M=(0,l.qR)(k/=A),S=(0,l.a2)((0,l.a2)(k)-1)e||(0,l.a2)((x*P+b*O)/_-.5)>.3||o*d+s*v+u*g2?t[2]%360*l.qw:0,U()):[E*l.oh,L*l.oh,C*l.oh]},N.angle=function(t){return arguments.length?(P=t%360*l.qw,U()):P*l.oh},N.reflectX=function(t){return arguments.length?(O=t?-1:1,U()):O<0},N.reflectY=function(t){return arguments.length?(I=t?-1:1,U()):I<0},N.precision=function(t){return arguments.length?(m=d(x,B=t*t),V()):(0,l._I)(B)},N.fitExtent=function(t,e){return(0,f.QX)(N,t,e)},N.fitSize=function(t,e){return(0,f.UV)(N,t,e)},N.fitWidth=function(t,e){return(0,f.Qx)(N,t,e)},N.fitHeight=function(t,e){return(0,f.OW)(N,t,e)},function(){return e=t.apply(this,arguments),N.invert=e.invert&&j,U()}}},47984:function(t,e,r){"use strict";r.d(e,{c:function(){return o},g:function(){return a}});var n=r(87952),i=r(64528);function a(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),e*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}function o(){return(0,n.c)(a).scale(175.295)}a.invert=function(t,e){var r,n=e,a=25;do{var o=n*n,s=o*o;n-=r=(n*(1.007226+o*(.015085+s*(-.044475+.028874*o-.005916*s)))-e)/(1.007226+o*(.045255+s*(-.311325+.259866*o-.005916*11*s)))}while((0,i.a2)(r)>i.Gg&&--a>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]}},4888:function(t,e,r){"use strict";r.d(e,{c:function(){return s},t:function(){return o}});var n=r(64528),i=r(62280),a=r(87952);function o(t,e){return[(0,n.W8)(e)*(0,n.g$)(t),(0,n.g$)(e)]}function s(){return(0,a.c)(o).scale(249.5).clipAngle(90+n.Gg)}o.invert=(0,i.g)(n.qR)},92992:function(t,e,r){"use strict";r.d(e,{O:function(){return o},c:function(){return c}});var n=r(68120),i=r(64528);function a(t,e){return[(0,i.a2)(t)>i.pi?t+Math.round(-t/i.kD)*i.kD:t,e]}function o(t,e,r){return(t%=i.kD)?e||r?(0,n.c)(l(t),u(e,r)):l(t):e||r?u(e,r):a}function s(t){return function(e,r){return[(e+=t)>i.pi?e-i.kD:e<-i.pi?e+i.kD:e,r]}}function l(t){var e=s(t);return e.invert=s(-t),e}function u(t,e){var r=(0,i.W8)(t),n=(0,i.g$)(t),a=(0,i.W8)(e),o=(0,i.g$)(e);function s(t,e){var s=(0,i.W8)(e),l=(0,i.W8)(t)*s,u=(0,i.g$)(t)*s,c=(0,i.g$)(e),f=c*r+l*n;return[(0,i.WE)(u*a-f*o,l*r-c*n),(0,i.qR)(f*a+u*o)]}return s.invert=function(t,e){var s=(0,i.W8)(e),l=(0,i.W8)(t)*s,u=(0,i.g$)(t)*s,c=(0,i.g$)(e),f=c*a-u*o;return[(0,i.WE)(u*a+c*o,l*r+f*n),(0,i.qR)(f*r-l*n)]},s}function c(t){function e(e){return e=t(e[0]*i.qw,e[1]*i.qw),e[0]*=i.oh,e[1]*=i.oh,e}return t=o(t[0]*i.qw,t[1]*i.qw,t.length>2?t[2]*i.qw:0),e.invert=function(e){return e=t.invert(e[0]*i.qw,e[1]*i.qw),e[0]*=i.oh,e[1]*=i.oh,e},e}a.invert=a},16016:function(t,e,r){"use strict";function n(t,e){t&&a.hasOwnProperty(t.type)&&a[t.type](t,e)}r.d(e,{c:function(){return l}});var i={Feature:function(t,e){n(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,i=-1,a=r.length;++i=0;)e+=r[n].value;else e=1;t.value=e}function l(t,e){var r,n,i,a,o,s=new h(t),l=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=u);r=c.pop();)if(l&&(r.value=+r.data.value),(i=e(r.data))&&(o=i.length))for(r.children=Array(o),a=o-1;a>=0;--a)c.push(n=r.children[a]=new h(i[a])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(f)}function u(t){return t.children}function c(t){t.data=t.data.data}function f(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function h(t){this.data=t,this.depth=this.height=0,this.parent=null}r.r(e),r.d(e,{cluster:function(){return o},hierarchy:function(){return l},pack:function(){return C},packEnclose:function(){return d},packSiblings:function(){return A},partition:function(){return R},stratify:function(){return U},tree:function(){return W},treemap:function(){return J},treemapBinary:function(){return $},treemapDice:function(){return D},treemapResquarify:function(){return tt},treemapSlice:function(){return Y},treemapSliceDice:function(){return Q},treemapSquarify:function(){return K}}),h.prototype=l.prototype={constructor:h,count:function(){return this.eachAfter(s)},each:function(t){var e,r,n,i,a=this,o=[a];do for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;for(t=r.pop(),e=n.pop();t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)n.push(e=e.parent);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e},copy:function(){return l(this).eachBefore(c)}};var p=Array.prototype.slice;function d(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(p.call(t))).length,a=[];n0&&r*r>n*n+i*i}function y(t,e){for(var r=0;r(o*=o)?(n=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function _(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function w(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function T(t){this._=t,this.next=null,this.previous=null}function k(t){var e,r,n,i,a,o,s,l,u,c,f;if(!(i=t.length))return 0;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;b(r,e,n=t[2]),e=new T(e),r=new T(r),n=new T(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;x:for(s=3;s0)throw Error("cycle");return a}return r.id=function(e){return arguments.length?(t=M(e),r):t},r.parentId=function(t){return arguments.length?(e=M(t),r):e},r}function V(t,e){return t.parent===e.parent?1:2}function q(t){var e=t.children;return e?e[0]:t.t}function H(t){var e=t.children;return e?e[e.length-1]:t.t}function G(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function W(){var t=V,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new G(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new G(n[i],i)),r.parent=e;return(o.parent=new G(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var u=i,c=i,f=i;i.eachBefore(function(t){t.xc.x&&(c=t),t.depth>f.depth&&(f=t)});var h=u===c?1:t(u,c)/2,p=h-u.x,d=e/(c.x+h+p),v=r/(f.depth||1);i.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*v})}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)e=i[a],e.z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a,o,s=e,l=e,u=r,c=s.parent.children[0],f=s.m,h=l.m,p=u.m,d=c.m;u=H(u),s=q(s),u&&s;)c=q(c),(l=H(l)).a=e,(o=u.z+p-s.z-f+t(u._,s._))>0&&(function(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}((i=u,a=n,i.a.parent===e.parent?i.a:a),e,o),f+=o,h+=o),p+=u.m,f+=s.m,d+=c.m,h+=l.m;u&&!H(l)&&(l.t=u,l.m+=p-h),s&&!q(c)&&(c.t=s,c.m+=f-d,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i}function Y(t,e,r,n,i){for(var a,o=t.children,s=-1,l=o.length,u=t.value&&(i-r)/t.value;++sh&&(h=s),(p=Math.max(h/(g=c*c*v),g/f))>d){c-=s;break}d=p}y.push(o={value:c,dice:l1?e:1)},r}(X);function J(){var t=K,e=!1,r=1,n=1,i=[0],a=S,o=S,s=S,l=S,u=S;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(z),t}function f(e){var r=i[e.depth],n=e.x0+r,c=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var c=s[e];c.x0=i,c.y0=a,c.x1=o,c.y1=l;return}for(var f=u[e],h=n/2+f,p=e+1,d=r-1;p>>1;u[v]l-a){var m=(i*y+o*g)/n;t(e,p,g,i,a,m,l),t(p,r,y,m,a,o,l)}else{var x=(a*y+l*g)/n;t(e,p,g,i,a,o,x),t(p,r,y,i,x,o,l)}})(0,l,t.value,e,r,n,i)}function Q(t,e,r,n,i){(1&t.depth?Y:D)(t,e,r,n,i)}var tt=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,u,c,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(X)},10132:function(t,e,r){"use strict";r.d(e,{ak:function(){return v}});var n=Math.PI,i=2*n,a=i-1e-6;function o(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function s(){return new o}o.prototype=s.prototype={constructor:o,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,i,a){t=+t,e=+e,r=+r,i=+i,a=+a;var o=this._x1,s=this._y1,l=r-t,u=i-e,c=o-t,f=s-e,h=c*c+f*f;if(a<0)throw Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6){if(Math.abs(f*l-u*c)>1e-6&&a){var p=r-o,d=i-s,v=l*l+u*u,g=Math.sqrt(v),y=Math.sqrt(h),m=a*Math.tan((n-Math.acos((v+h-(p*p+d*d))/(2*g*y)))/2),x=m/y,b=m/g;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*c)+","+(e+x*f)),this._+="A"+a+","+a+",0,0,"+ +(f*p>c*d)+","+(this._x1=t+b*l)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e)}},arc:function(t,e,r,o,s,l){t=+t,e=+e,r=+r,l=!!l;var u=r*Math.cos(o),c=r*Math.sin(o),f=t+u,h=e+c,p=1^l,d=l?o-s:s-o;if(r<0)throw Error("negative radius: "+r);null===this._x1?this._+="M"+f+","+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+f+","+h),r&&(d<0&&(d=d%i+i),d>a?this._+="A"+r+","+r+",0,1,"+p+","+(t-u)+","+(e-c)+"A"+r+","+r+",0,1,"+p+","+(this._x1=f)+","+(this._y1=h):d>1e-6&&(this._+="A"+r+","+r+",0,"+ +(d>=n)+","+p+","+(this._x1=t+r*Math.cos(s))+","+(this._y1=e+r*Math.sin(s))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};var l=Array.prototype.slice;function u(t){return function(){return t}}function c(t){return t[0]}function f(t){return t[1]}function h(t){return t.source}function p(t){return t.target}function d(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function v(){return function(t){var e=h,r=p,n=c,i=f,a=null;function o(){var o,u=l.call(arguments),c=e.apply(this,u),f=r.apply(this,u);if(a||(a=o=s()),t(a,+n.apply(this,(u[0]=c,u)),+i.apply(this,u),+n.apply(this,(u[0]=f,u)),+i.apply(this,u)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(r=t,o):r},o.x=function(t){return arguments.length?(n="function"==typeof t?t:u(+t),o):n},o.y=function(t){return arguments.length?(i="function"==typeof t?t:u(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}(d)}},94336:function(t,e,r){"use strict";r.d(e,{Yn:function(){return i},m_:function(){return v},E9:function(){return a}});var n,i,a,o=r(8208),s=r(58931),l=r(46192),u=r(68936),c=r(32171),f=r(53528);function h(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 p(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 d(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function v(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,c=t.shortDays,f=t.months,v=t.shortMonths,y=w(i),m=T(i),x=w(a),b=T(a),_=w(c),tS=T(c),tE=w(f),tL=T(f),tC=w(v),tP=T(v),tO={a:function(t){return c[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return v[t.getMonth()]},B:function(t){return f[t.getMonth()]},c:null,d:H,e:H,f:Z,H:G,I:W,j:Y,L:X,m:K,M:J,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:tA,s:tM,S:$,u:Q,U:tt,V:te,w:tr,W:tn,x:null,X:null,y:ti,Y:ta,Z:to,"%":tk},tI={a:function(t){return c[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return v[t.getUTCMonth()]},B:function(t){return f[t.getUTCMonth()]},c:null,d:ts,e:ts,f:th,H:tl,I:tu,j:tc,L:tf,m:tp,M:td,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:tA,s:tM,S:tv,u:tg,U:ty,V:tm,w:tx,W:tb,x:null,X:null,y:t_,Y:tw,Z:tT,"%":tk},tz={a:function(t,e,r){var n=_.exec(e.slice(r));return n?(t.w=tS[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=x.exec(e.slice(r));return n?(t.w=b[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=tC.exec(e.slice(r));return n?(t.m=tP[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=tE.exec(e.slice(r));return n?(t.m=tL[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,r,n){return tF(t,e,r,n)},d:z,e:z,f:j,H:R,I:R,j:D,L:N,m:I,M:F,p:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.p=m[n[0].toLowerCase()],r+n[0].length):-1},q:O,Q:V,s:q,S:B,u:A,U:M,V:S,w:k,W:E,x:function(t,e,n){return tF(t,r,e,n)},X:function(t,e,r){return tF(t,n,e,r)},y:C,Y:L,Z:P,"%":U};function tD(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));++s53)return null;"w"in a||(a.w=1),"Z"in a?(n=(i=(n=p(d(a.y,0,1))).getUTCDay())>4||0===i?o.ot.ceil(n):(0,o.ot)(n),n=s.c.offset(n,(a.V-1)*7),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(n=(i=(n=h(d(a.y,0,1))).getDay())>4||0===i?l.qT.ceil(n):(0,l.qT)(n),n=u.c.offset(n,(a.V-1)*7),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?p(d(a.y,0,1)).getUTCDay():h(d(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,p(a)):h(a)}}function tF(t,e,r,n){for(var i,a,o=0,s=e.length,l=r.length;o=l)return -1;if(37===(i=e.charCodeAt(o++))){if(!(a=tz[(i=e.charAt(o++))in g?e.charAt(o++):i])||(n=a(t,r,n))<0)return -1}else if(i!=r.charCodeAt(n++))return -1}return n}return tO.x=tD(r,tO),tO.X=tD(n,tO),tO.c=tD(e,tO),tI.x=tD(r,tI),tI.X=tD(n,tI),tI.c=tD(e,tI),{format:function(t){var e=tD(t+="",tO);return e.toString=function(){return t},e},parse:function(t){var e=tR(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=tD(t+="",tI);return e.toString=function(){return t},e},utcParse:function(t){var e=tR(t+="",!0);return e.toString=function(){return t},e}}}var g={"-":"",_:" ",0:"0"},y=/^\s*\d+/,m=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function P(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 O(t,e,r){var n=y.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function I(t,e,r){var n=y.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=y.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function D(t,e,r){var n=y.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=y.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function F(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function B(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function N(t,e,r){var n=y.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function j(t,e,r){var n=y.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function U(t,e,r){var n=m.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function V(t,e,r){var n=y.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function q(t,e,r){var n=y.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function H(t,e){return b(t.getDate(),e,2)}function G(t,e){return b(t.getHours(),e,2)}function W(t,e){return b(t.getHours()%12||12,e,2)}function Y(t,e){return b(1+u.c.count((0,c.c)(t),t),e,3)}function X(t,e){return b(t.getMilliseconds(),e,3)}function Z(t,e){return X(t,e)+"000"}function K(t,e){return b(t.getMonth()+1,e,2)}function J(t,e){return b(t.getMinutes(),e,2)}function $(t,e){return b(t.getSeconds(),e,2)}function Q(t){var e=t.getDay();return 0===e?7:e}function tt(t,e){return b(l.uU.count((0,c.c)(t)-1,t),e,2)}function te(t,e){var r=t.getDay();return t=r>=4||0===r?(0,l.kD)(t):l.kD.ceil(t),b(l.kD.count((0,c.c)(t),t)+(4===(0,c.c)(t).getDay()),e,2)}function tr(t){return t.getDay()}function tn(t,e){return b(l.qT.count((0,c.c)(t)-1,t),e,2)}function ti(t,e){return b(t.getFullYear()%100,e,2)}function ta(t,e){return b(t.getFullYear()%1e4,e,4)}function to(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+b(e/60|0,"0",2)+b(e%60,"0",2)}function ts(t,e){return b(t.getUTCDate(),e,2)}function tl(t,e){return b(t.getUTCHours(),e,2)}function tu(t,e){return b(t.getUTCHours()%12||12,e,2)}function tc(t,e){return b(1+s.c.count((0,f.c)(t),t),e,3)}function tf(t,e){return b(t.getUTCMilliseconds(),e,3)}function th(t,e){return tf(t,e)+"000"}function tp(t,e){return b(t.getUTCMonth()+1,e,2)}function td(t,e){return b(t.getUTCMinutes(),e,2)}function tv(t,e){return b(t.getUTCSeconds(),e,2)}function tg(t){var e=t.getUTCDay();return 0===e?7:e}function ty(t,e){return b(o.EV.count((0,f.c)(t)-1,t),e,2)}function tm(t,e){var r=t.getUTCDay();return t=r>=4||0===r?(0,o.yA)(t):o.yA.ceil(t),b(o.yA.count((0,f.c)(t),t)+(4===(0,f.c)(t).getUTCDay()),e,2)}function tx(t){return t.getUTCDay()}function tb(t,e){return b(o.ot.count((0,f.c)(t)-1,t),e,2)}function t_(t,e){return b(t.getUTCFullYear()%100,e,2)}function tw(t,e){return b(t.getUTCFullYear()%1e4,e,4)}function tT(){return"+0000"}function tk(){return"%"}function tA(t){return+t}function tM(t){return Math.floor(+t/1e3)}i=(n=v({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"]})).format,n.parse,a=n.utcFormat,n.utcParse},68936:function(t,e,r){"use strict";r.d(e,{m:function(){return o}});var n=r(81628),i=r(69792),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},69792: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},73220:function(t,e,r){"use strict";r.r(e),r.d(e,{timeDay:function(){return y.c},timeDays:function(){return y.m},timeFriday:function(){return m.iB},timeFridays:function(){return m.sJ},timeHour:function(){return v},timeHours:function(){return g},timeInterval:function(){return n.c},timeMillisecond:function(){return a},timeMilliseconds:function(){return o},timeMinute:function(){return h},timeMinutes:function(){return p},timeMonday:function(){return m.qT},timeMondays:function(){return m.QP},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return m.Wc},timeSaturdays:function(){return m.aI},timeSecond:function(){return u},timeSeconds:function(){return c},timeSunday:function(){return m.uU},timeSundays:function(){return m.Ab},timeThursday:function(){return m.kD},timeThursdays:function(){return m.eC},timeTuesday:function(){return m.Mf},timeTuesdays:function(){return m.Oc},timeWednesday:function(){return m.eg},timeWednesdays:function(){return m.sn},timeWeek:function(){return m.uU},timeWeeks:function(){return m.Ab},timeYear:function(){return w.c},timeYears:function(){return w.Q},utcDay:function(){return L.c},utcDays:function(){return L.o},utcFriday:function(){return C.od},utcFridays:function(){return C.iG},utcHour:function(){return S},utcHours:function(){return E},utcMillisecond:function(){return a},utcMilliseconds:function(){return o},utcMinute:function(){return k},utcMinutes:function(){return A},utcMonday:function(){return C.ot},utcMondays:function(){return C.iO},utcMonth:function(){return O},utcMonths:function(){return I},utcSaturday:function(){return C.Ad},utcSaturdays:function(){return C.K8},utcSecond:function(){return u},utcSeconds:function(){return c},utcSunday:function(){return C.EV},utcSundays:function(){return C.Wq},utcThursday:function(){return C.yA},utcThursdays:function(){return C.ob},utcTuesday:function(){return C.sG},utcTuesdays:function(){return C.kl},utcWednesday:function(){return C._6},utcWednesdays:function(){return C.W_},utcWeek:function(){return C.EV},utcWeeks:function(){return C.Wq},utcYear:function(){return z.c},utcYears:function(){return z.i}});var n=r(81628),i=(0,n.c)(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});i.every=function(t){return isFinite(t=Math.floor(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(69792),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,f=(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()}),h=f,p=f.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()}),v=d,g=d.range,y=r(68936),m=r(46192),x=(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()+(e.getFullYear()-t.getFullYear())*12},function(t){return t.getMonth()}),b=x,_=x.range,w=r(32171),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,A=T.range,M=(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=M,E=M.range,L=r(58931),C=r(8208),P=(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()+(e.getUTCFullYear()-t.getUTCFullYear())*12},function(t){return t.getUTCMonth()}),O=P,I=P.range,z=r(53528)},81628:function(t,e,r){"use strict";r.d(e,{c:function(){return function t(e,r,a,o){function s(t){return e(t=0==arguments.length?new Date:new Date(+t)),t}return s.floor=function(t){return e(t=new Date(+t)),t},s.ceil=function(t){return e(t=new Date(t-1)),r(t,1),e(t),t},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do o.push(a=new Date(+t)),r(t,i),e(t);while(a=t)for(;e(t),!n(t);)t.setTime(t-1)},function(t,e){if(t>=t){if(e<0)for(;++e<=0;)for(;r(t,-1),!n(t););else for(;--e>=0;)for(;r(t,1),!n(t););}})},a&&(s.count=function(t,r){return n.setTime(+t),i.setTime(+r),e(n),e(i),Math.floor(a(n,i))},s.every=function(t){return isFinite(t=Math.floor(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}}});var n=new Date,i=new Date},58931:function(t,e,r){"use strict";r.d(e,{o:function(){return o}});var n=r(81628),i=r(69792),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 h},EV:function(){return o},K8:function(){return x},W_:function(){return g},Wq:function(){return p},_6:function(){return u},iG:function(){return m},iO:function(){return d},kl:function(){return v},ob:function(){return y},od:function(){return f},ot:function(){return s},sG:function(){return l},yA:function(){return c}});var n=r(81628),i=r(69792);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),f=a(5),h=a(6),p=o.range,d=s.range,v=l.range,g=u.range,y=c.range,m=f.range,x=h.range},53528:function(t,e,r){"use strict";r.d(e,{i:function(){return a}});var n=r(81628),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},46192:function(t,e,r){"use strict";r.d(e,{Ab:function(){return p},Mf:function(){return l},Oc:function(){return v},QP:function(){return d},Wc:function(){return h},aI:function(){return x},eC:function(){return y},eg:function(){return u},iB:function(){return f},kD:function(){return c},qT:function(){return s},sJ:function(){return m},sn:function(){return g},uU:function(){return o}});var n=r(81628),i=r(69792);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),f=a(5),h=a(6),p=o.range,d=s.range,v=l.range,g=u.range,y=c.range,m=f.range,x=h.range},32171:function(t,e,r){"use strict";r.d(e,{Q:function(){return a}});var n=r(81628),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},64348:function(t,e,r){"use strict";var n=r(39640)(),i=r(53664),a=n&&i("%Object.defineProperty%",!0);if(a)try{a({},"a",{value:1})}catch(t){a=!1}var o=i("%SyntaxError%"),s=i("%TypeError%"),l=r(2304);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new s("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!l&&l(t,e);if(a)a(t,e,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===i&&f?f.writable:!i});else if(!c&&(n||i||u))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else t[e]=r}},81288:function(t,e,r){"use strict";var n=r(41820),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,l=r(39640)(),u=s&&l,c=function(t,e,r,n){if(e in t){if(!0===n){if(t[e]===r)return}else if(!("function"==typeof n&&"[object Function]"===a.call(n))||!n())return}u?s(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r},f=function(t,e){var r=arguments.length>2?arguments[2]:{},a=n(e);i&&(a=o.call(a,Object.getOwnPropertySymbols(e)));for(var s=0;ss*l){var p=(h-f)/s;o[c]=1e3*p}}return o}function i(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i0)return function(t,e){var r,n;for(n=0,r=Array(t);n=a.next.y&&a.next.y!==a.y){var f=a.x+(u-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(f<=l&&f>c){if(c=f,f===l){if(u===a.y)return a;if(u===a.next.y)return a.next}i=a.x=a.x&&a.x>=v&&l!==a.x&&o(ui.x||a.x===i.x&&(r=i,n=a,0>s(r.prev,r,n.prev)&&0>s(n.next,r,r.next))))&&(i=a,y=p)),a=a.next;while(a!==d);return i}(t,e)){var r=p(e,t);n(e,e.next),n(r,r.next)}})(g[u],a),a=n(a,a.next);return a}(t,e,T,c)),t.length>80*c){f=g=t[0],d=y=t[1];for(var A=c;Ag&&(g=m),x>y&&(y=x);b=0!==(b=Math.max(g-f,y-d))?1/b:0}return function t(e,r,i,c,f,d,g){if(e){!g&&d&&function(t,e,r,n){var i=t;do null===i.z&&(i.z=a(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;e0||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)}(e,c,f,d);for(var y,m,x=e;e.prev!==e.next;){if(y=e.prev,m=e.next,d?function(t,e,r,n){var i=t.prev,l=t.next;if(s(i,t,l)>=0)return!1;for(var u=i.xt.x?i.x>l.x?i.x:l.x:t.x>l.x?t.x:l.x,h=i.y>t.y?i.y>l.y?i.y:l.y:t.y>l.y?t.y:l.y,p=a(u,c,e,r,n),d=a(f,h,e,r,n),v=t.prevZ,g=t.nextZ;v&&v.z>=p&&g&&g.z<=d;){if(v!==t.prev&&v!==t.next&&o(i.x,i.y,t.x,t.y,l.x,l.y,v.x,v.y)&&s(v.prev,v,v.next)>=0||(v=v.prevZ,g!==t.prev&&g!==t.next&&o(i.x,i.y,t.x,t.y,l.x,l.y,g.x,g.y)&&s(g.prev,g,g.next)>=0))return!1;g=g.nextZ}for(;v&&v.z>=p;){if(v!==t.prev&&v!==t.next&&o(i.x,i.y,t.x,t.y,l.x,l.y,v.x,v.y)&&s(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;g&&g.z<=d;){if(g!==t.prev&&g!==t.next&&o(i.x,i.y,t.x,t.y,l.x,l.y,g.x,g.y)&&s(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}(e,c,f,d):function(t){var e=t.prev,r=t.next;if(s(e,t,r)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(o(e.x,e.y,t.x,t.y,r.x,r.y,n.x,n.y)&&s(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}(e)){r.push(y.i/i),r.push(e.i/i),r.push(m.i/i),v(e),e=m.next,x=m.next;continue}if((e=m)===x){g?1===g?t(e=function(t,e,r){var i=t;do{var a=i.prev,o=i.next.next;!l(a,o)&&u(a,i,i.next,o)&&h(a,o)&&h(o,a)&&(e.push(a.i/r),e.push(i.i/r),e.push(o.i/r),v(i),v(i.next),i=t=o),i=i.next}while(i!==t);return n(i)}(n(e),r,i),r,i,c,f,d,2):2===g&&function(e,r,i,a,o,c){var f=e;do{for(var d,v,g=f.next.next;g!==f.prev;){if(f.i!==g.i&&(d=f,v=g,d.next.i!==v.i&&d.prev.i!==v.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&&u(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(d,v)&&(h(d,v)&&h(v,d)&&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}(d,v)&&(s(d.prev,d,v.prev)||s(d,v.prev,v))||l(d,v)&&s(d.prev,d,d.next)>0&&s(v.prev,v,v.next)>0))){var y=p(f,g);f=n(f,f.next),y=n(y,y.next),t(f,r,i,a,o,c),t(y,r,i,a,o,c);return}g=g.next}f=f.next}while(f!==e)}(e,r,i,c,f,d):t(n(e),r,i,c,f,d,1);break}}}}(T,k,c,f,d,b),k}function r(t,e,r,n,i){var a,o;if(i===y(t,e,r,n)>0)for(a=e;a=e;a-=n)o=d(a,t[a],t[a+1],o);return o&&l(o,o.next)&&(v(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do if(r=!1,!n.steiner&&(l(n,n.next)||0===s(n.prev,n,n.next))){if(v(n),(n=e=n.prev)===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function i(t,e){return t.x-e.x}function a(t,e,r,n,i){return(t=((t=((t=((t=((t=32767*(t-r)*i)|t<<8)&16711935)|t<<4)&252645135)|t<<2)&858993459)|t<<1)&1431655765)|(e=((e=((e=((e=((e=32767*(e-n)*i)|e<<8)&16711935)|e<<4)&252645135)|e<<2)&858993459)|e<<1)&1431655765)<<1}function o(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 s(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function l(t,e){return t.x===e.x&&t.y===e.y}function u(t,e,r,n){var i=f(s(t,e,r)),a=f(s(t,e,n)),o=f(s(r,n,t)),l=f(s(r,n,e));return!!(i!==a&&o!==l||0===i&&c(t,r,e)||0===a&&c(t,n,e)||0===o&&c(r,t,n)||0===l&&c(r,e,n))}function c(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 f(t){return t>0?1:t<0?-1:0}function h(t,e){return 0>s(t.prev,t,t.next)?s(t,e,t.next)>=0&&s(t,t.prev,e)>=0:0>s(t,e,t.prev)||0>s(t,t.next,e)}function p(t,e){var r=new g(t.i,t.x,t.y),n=new g(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 d(t,e,r,n){var i=new g(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 v(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 g(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 y(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},6688:function(t,e,r){var n=r(78484);t.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];r=0;for(var u=t.length;r=e})}(e);for(var r,i=n(t).components.filter(function(t){return t.length>1}),a=1/0,o=0;o=55296&&m<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,v):w,e?(p.value=w,d(g,v,p)):g[v]=w,++v;y=v}}if(void 0===y)for(y=o(t.length),e&&(g=new e(y)),r=0;r0?1:-1}},96936:function(t,e,r){"use strict";var n=r(85608),i=Math.abs,a=Math.floor;t.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*a(i(t)):t}},81304:function(t,e,r){"use strict";var n=r(96936),i=Math.max;t.exports=function(t){return i(0,n(t))}},14428:function(t,e,r){"use strict";var n=r(34044),i=r(9252),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var c,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(u),c=s(r),h&&c.sort("function"==typeof h?a.call(h,r):void 0),"function"!=typeof t&&(t=c[t]),o.call(t,c,function(t,n){return l.call(r,t)?o.call(u,f,r[t],t,r,n):e})}}},38452:function(t,e,r){"use strict";t.exports=r(96276)()?Object.assign:r(81892)},96276:function(t){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},81892:function(t,e,r){"use strict";var n=r(54768),i=r(9252),a=Math.max;t.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(o=1,t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}};o-1}},29768:function(t){"use strict";var e=Object.prototype.toString,r=e.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||e.call(t)===r)||!1}},82252:function(t){"use strict";var e=Object.create(null),r=Math.random;t.exports=function(){var t;do t=r().toString(36).slice(2);while(e[t]);return t}},52104:function(t,e,r){"use strict";var n,i=r(69932),a=r(71056),o=r(21092),s=r(92664),l=r(85512),u=Object.defineProperty;n=t.exports=function(t,e){if(!(this instanceof n))throw TypeError("Constructor requires 'new'");l.call(this,t),u(this,"__kind__",o("",e=e?a.call(e,"key+value")?"key+value":a.call(e,"key")?"key":"value":"value"))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o(function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t})}),u(n.prototype,s.toStringTag,o("c","Array Iterator"))},76024:function(t,e,r){"use strict";var n=r(60948),i=r(34044),a=r(29768),o=r(76252),s=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;t.exports=function(t,e){var r,c,f,h,p,d,v,g,y=arguments[2];if(s(t)||n(t)?r="array":a(t)?r="string":t=o(t),i(e),f=function(){h=!0},"array"===r){u.call(t,function(t){return l.call(e,y,t,f),h});return}if("string"===r){for(p=0,d=t.length;p=55296&&g<=56319&&(v+=t[++p]),l.call(e,y,v,f),!h);++p);return}for(c=t.next();!c.done;){if(l.call(e,y,c.value,f),h)return;c=t.next()}}},76252:function(t,e,r){"use strict";var n=r(60948),i=r(29768),a=r(52104),o=r(80940),s=r(52891),l=r(92664).iterator;t.exports=function(t){return"function"==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},85512:function(t,e,r){"use strict";var n,i=r(41476),a=r(38452),o=r(34044),s=r(9252),l=r(21092),u=r(27940),c=r(92664),f=Object.defineProperty,h=Object.defineProperties;t.exports=n=function(t,e){if(!(this instanceof n))throw TypeError("Constructor requires 'new'");h(this,{__list__:l("w",s(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(o(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l(function(){var t;if(this.__list__){if(this.__redo__&&void 0!==(t=this.__redo__.shift()))return t;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){f(this,"__redo__",l("c",[t]));return}this.__redo__.forEach(function(e,r){e>=t&&(this.__redo__[r]=++e)},this),this.__redo__.push(t)}}),_onDelete:l(function(t){var e;!(t>=this.__nextIndex__)&&(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,r){e>t&&(this.__redo__[r]=--e)},this)))}),_onClear:l(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),f(n.prototype,c.iterator,l(function(){return this}))},76368:function(t,e,r){"use strict";var n=r(60948),i=r(42584),a=r(29768),o=r(92664).iterator,s=Array.isArray;t.exports=function(t){return!!i(t)&&(!!(s(t)||a(t)||n(t))||"function"==typeof t[o])}},80940:function(t,e,r){"use strict";var n,i=r(69932),a=r(21092),o=r(92664),s=r(85512),l=Object.defineProperty;n=t.exports=function(t){if(!(this instanceof n))throw TypeError("Constructor requires 'new'");t=String(t),s.call(this,t),l(this,"__length__",a("",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a(function(){if(this.__list__){if(this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r})}),l(n.prototype,o.toStringTag,a("c","String Iterator"))},52891:function(t,e,r){"use strict";var n=r(76368);t.exports=function(t){if(!n(t))throw TypeError(t+" is not iterable");return t}},60964:function(t){"use strict";function e(t,e){if(null==t)throw TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n0&&o.length>i&&!o.warned){o.warned=!0;var i,a,o,u=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=o.length,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 f(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 h(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=Array(t.length),r=0;r0&&(o=e[0]),o instanceof Error)throw o;var o,s=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 for(var u=l.length,c=d(l,u),r=0;r=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=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return h(this,t,!0)},a.prototype.rawListeners=function(t){return h(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},39072:function(t){var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{if(!__global__)return e();return __global__}finally{delete Object.prototype.__global__}}()},12296:function(t,e,r){"use strict";t.exports=r(45072)()?globalThis:r(39072)},45072:function(t){"use strict";t.exports=function(){return!!("object"==typeof globalThis&&globalThis)&&globalThis.Array===Array}},38248:function(t,e,r){"use strict";var n=r(94576);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}},47520:function(t,e,r){var n=r(72512);t.exports=function(t,e,r){if(!t)throw TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&"number"==typeof t[0][0]){var i,a,o,s,l=t[0].length,u=t.length*l;e&&"string"!=typeof e||(e=new(n(e||"float32"))(u+r));var c=e.length-r;if(u!==c)throw Error("source length "+u+" ("+l+"x"+t.length+") does not match destination length "+c);for(i=0,o=r;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},71920:function(t){"use strict";function e(t,a){a||(a={}),("string"==typeof t||Array.isArray(t))&&(a.family=t);var o=Array.isArray(a.family)?a.family.join(", "):a.family;if(!o)throw Error("`family` must be defined");var s=a.size||a.fontSize||a.em||48,l=a.weight||a.fontWeight||"",t=[a.style||a.fontStyle||"",l,s].join(" ")+"px "+o,u=a.origin||"top";if(e.cache[o]&&s<=e.cache[o].em)return r(e.cache[o],u);var c=a.canvas||e.canvas,f=c.getContext("2d"),h={upper:void 0!==a.upper?a.upper:"H",lower:void 0!==a.lower?a.lower:"x",descent:void 0!==a.descent?a.descent:"p",ascent:void 0!==a.ascent?a.ascent:"h",tittle:void 0!==a.tittle?a.tittle:"i",overshoot:void 0!==a.overshoot?a.overshoot:"O"},p=Math.ceil(1.5*s);c.height=p,c.width=.5*p,f.font=t;var d={top:0};f.clearRect(0,0,p,p),f.textBaseline="top",f.fillStyle="black",f.fillText("H",0,0);var v=n(f.getImageData(0,0,p,p));f.clearRect(0,0,p,p),f.textBaseline="bottom",f.fillText("H",0,p);var g=n(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-g+v,f.clearRect(0,0,p,p),f.textBaseline="alphabetic",f.fillText("H",0,p);var y=n(f.getImageData(0,0,p,p)),m=p-y-1+v;d.baseline=d.alphabetic=m,f.clearRect(0,0,p,p),f.textBaseline="middle",f.fillText("H",0,.5*p);var x=n(f.getImageData(0,0,p,p));d.median=d.middle=p-x-1+v-.5*p,f.clearRect(0,0,p,p),f.textBaseline="hanging",f.fillText("H",0,.5*p);var b=n(f.getImageData(0,0,p,p));d.hanging=p-b-1+v-.5*p,f.clearRect(0,0,p,p),f.textBaseline="ideographic",f.fillText("H",0,p);var _=n(f.getImageData(0,0,p,p));if(d.ideographic=p-_-1+v,h.upper&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.upper,0,0),d.upper=n(f.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),h.lower&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.lower,0,0),d.lower=n(f.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),h.tittle&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.tittle,0,0),d.tittle=n(f.getImageData(0,0,p,p))),h.ascent&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.ascent,0,0),d.ascent=n(f.getImageData(0,0,p,p))),h.descent&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.descent,0,0),d.descent=i(f.getImageData(0,0,p,p))),h.overshoot){f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.overshoot,0,0);var w=i(f.getImageData(0,0,p,p));d.overshoot=w-m}for(var T in d)d[T]/=s;return d.em=s,e.cache[o]=d,r(d,u)}function r(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function n(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor((n-3)*.25/e)}t.exports=e,e.canvas=document.createElement("canvas"),e.cache={}},46492:function(t,e,r){"use strict";var n=r(90720),i=Object.prototype.toString,a=Object.prototype.hasOwnProperty,o=function(t,e,r){for(var n=0,i=t.length;n=3&&(a=r),"[object Array]"===i.call(t)?o(t,e,a):"string"==typeof t?s(t,e,a):l(t,e,a)}},74336:function(t){"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===M(/^%?[^%]*%?$/,t))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=L(t),n=r.length>0?r[0]:"",a=C("%"+n+"%",e),s=a.name,u=a.value,c=!1,f=a.alias;f&&(n=f[0],T(r,w([0,1],f)));for(var h=1,p=!0;h=r.length){var m=l(u,d);u=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[d]}else p=_(u,d),u=u[d];p&&!c&&(g[s]=u)}}return u}},12408: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],f=e[9],h=e[10],p=e[11],d=e[12],v=e[13],g=e[14],y=e[15];return t[0]=s*(h*y-p*g)-f*(l*y-u*g)+v*(l*p-u*h),t[1]=-(n*(h*y-p*g)-f*(i*y-a*g)+v*(i*p-a*h)),t[2]=n*(l*y-u*g)-s*(i*y-a*g)+v*(i*u-a*l),t[3]=-(n*(l*p-u*h)-s*(i*p-a*h)+f*(i*u-a*l)),t[4]=-(o*(h*y-p*g)-c*(l*y-u*g)+d*(l*p-u*h)),t[5]=r*(h*y-p*g)-c*(i*y-a*g)+d*(i*p-a*h),t[6]=-(r*(l*y-u*g)-o*(i*y-a*g)+d*(i*u-a*l)),t[7]=r*(l*p-u*h)-o*(i*p-a*h)+c*(i*u-a*l),t[8]=o*(f*y-p*v)-c*(s*y-u*v)+d*(s*p-u*f),t[9]=-(r*(f*y-p*v)-c*(n*y-a*v)+d*(n*p-a*f)),t[10]=r*(s*y-u*v)-o*(n*y-a*v)+d*(n*u-a*s),t[11]=-(r*(s*p-u*f)-o*(n*p-a*f)+c*(n*u-a*s)),t[12]=-(o*(f*g-h*v)-c*(s*g-l*v)+d*(s*h-l*f)),t[13]=r*(f*g-h*v)-c*(n*g-i*v)+d*(n*h-i*f),t[14]=-(r*(s*g-l*v)-o*(n*g-i*v)+d*(n*l-i*s)),t[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),t}},76860: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}},64492: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}},54212: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}},70800: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],f=t[10],h=t[11],p=t[12],d=t[13],v=t[14],g=t[15];return(e*o-r*a)*(f*g-h*v)-(e*s-n*a)*(c*g-h*d)+(e*l-i*a)*(c*v-f*d)+(r*s-n*o)*(u*g-h*p)-(r*l-i*o)*(u*v-f*p)+(n*l-i*s)*(u*d-c*p)}},61784: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,f=n*s,h=i*o,p=i*s,d=i*l,v=a*o,g=a*s,y=a*l;return t[0]=1-f-d,t[1]=c+y,t[2]=h-g,t[3]=0,t[4]=c-y,t[5]=1-u-d,t[6]=p+v,t[7]=0,t[8]=h+g,t[9]=p-v,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},91616: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 1e-6>Math.abs(u)?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)}},51944: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,f=n*l,h=n*u,p=i*l,d=i*u,v=a*u,g=o*s,y=o*l,m=o*u;return t[0]=1-(p+v),t[1]=f+m,t[2]=h-y,t[3]=0,t[4]=f-m,t[5]=1-(c+v),t[6]=d+g,t[7]=0,t[8]=h+y,t[9]=d-g,t[10]=1-(c+p),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},69444: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}},48268: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}},21856: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}},79216: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}},57736: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}},38848: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}},36635: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}},36524:function(t,e,r){t.exports={create:r(54212),clone:r(76860),copy:r(64492),identity:r(36635),transpose:r(86520),invert:r(4308),adjoint:r(12408),determinant:r(70800),multiply:r(80944),translate:r(35176),scale:r(68152),rotate:r(30016),rotateX:r(15456),rotateY:r(64840),rotateZ:r(4192),fromRotation:r(91616),fromRotationTranslation:r(51944),fromScaling:r(69444),fromTranslation:r(48268),fromXRotation:r(21856),fromYRotation:r(79216),fromZRotation:r(57736),fromQuat:r(61784),frustum:r(38848),perspective:r(51296),perspectiveFromFieldOfView:r(63688),ortho:r(97688),lookAt:r(56508),str:r(89412)}},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],f=e[9],h=e[10],p=e[11],d=e[12],v=e[13],g=e[14],y=e[15],m=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,T=i*u-a*l,k=c*v-f*d,A=c*g-h*d,M=c*y-p*d,S=f*g-h*v,E=f*y-p*v,L=h*y-p*g,C=m*L-x*E+b*S+_*M-w*A+T*k;return C?(C=1/C,t[0]=(s*L-l*E+u*S)*C,t[1]=(i*E-n*L-a*S)*C,t[2]=(v*T-g*w+y*_)*C,t[3]=(h*w-f*T-p*_)*C,t[4]=(l*M-o*L-u*A)*C,t[5]=(r*L-i*M+a*A)*C,t[6]=(g*b-d*T-y*x)*C,t[7]=(c*T-h*b+p*x)*C,t[8]=(o*E-s*M+u*k)*C,t[9]=(n*M-r*E-a*k)*C,t[10]=(d*w-v*b+y*m)*C,t[11]=(f*b-c*w-p*m)*C,t[12]=(s*A-o*S-l*k)*C,t[13]=(r*S-n*A+i*k)*C,t[14]=(v*x-d*_-g*m)*C,t[15]=(c*_-f*x+h*m)*C,t):null}},56508:function(t,e,r){var n=r(36635);t.exports=function(t,e,r,i){var a,o,s,l,u,c,f,h,p,d,v=e[0],g=e[1],y=e[2],m=i[0],x=i[1],b=i[2],_=r[0],w=r[1],T=r[2];return 1e-6>Math.abs(v-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-T)?n(t):(d=1/Math.sqrt((f=v-_)*f+(h=g-w)*h+(p=y-T)*p),f*=d,h*=d,p*=d,(d=Math.sqrt((a=x*p-b*h)*a+(o=b*f-m*p)*o+(s=m*h-x*f)*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0),(d=Math.sqrt((l=h*s-p*o)*l+(u=p*a-f*s)*u+(c=f*o-h*a)*c))?(l*=d=1/d,u*=d,c*=d):(l=0,u=0,c=0),t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=p,t[11]=0,t[12]=-(a*v+o*g+s*y),t[13]=-(l*v+u*g+c*y),t[14]=-(f*v+h*g+p*y),t[15]=1,t)}},80944: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],f=e[8],h=e[9],p=e[10],d=e[11],v=e[12],g=e[13],y=e[14],m=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*v,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*u+_*p+w*y,t[3]=x*o+b*c+_*d+w*m,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*v,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*u+_*p+w*y,t[7]=x*o+b*c+_*d+w*m,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*v,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*u+_*p+w*y,t[11]=x*o+b*c+_*d+w*m,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*v,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*u+_*p+w*y,t[15]=x*o+b*c+_*d+w*m,t}},97688: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}},51296: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}},63688: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}},30016:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S,E=n[0],L=n[1],C=n[2],P=Math.sqrt(E*E+L*L+C*C);return 1e-6>Math.abs(P)?null:(E*=P=1/P,L*=P,C*=P,i=Math.sin(r),o=1-(a=Math.cos(r)),s=e[0],l=e[1],u=e[2],c=e[3],f=e[4],h=e[5],p=e[6],d=e[7],v=e[8],g=e[9],y=e[10],m=e[11],x=E*E*o+a,b=L*E*o+C*i,_=C*E*o-L*i,w=E*L*o-C*i,T=L*L*o+a,k=C*L*o+E*i,A=E*C*o+L*i,M=L*C*o-E*i,S=C*C*o+a,t[0]=s*x+f*b+v*_,t[1]=l*x+h*b+g*_,t[2]=u*x+p*b+y*_,t[3]=c*x+d*b+m*_,t[4]=s*w+f*T+v*k,t[5]=l*w+h*T+g*k,t[6]=u*w+p*T+y*k,t[7]=c*w+d*T+m*k,t[8]=s*A+f*M+v*S,t[9]=l*A+h*M+g*S,t[10]=u*A+p*M+y*S,t[11]=c*A+d*M+m*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},15456: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],f=e[10],h=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+f*n,t[7]=l*i+h*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},64840: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],f=e[10],h=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-f*n,t[3]=l*i-h*n,t[8]=a*n+u*i,t[9]=o*n+c*i,t[10]=s*n+f*i,t[11]=l*n+h*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],f=e[6],h=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+f*n,t[3]=l*i+h*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},68152: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}},89412: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]+")"}},35176:function(t){t.exports=function(t,e,r){var n,i,a,o,s,l,u,c,f,h,p,d,v=r[0],g=r[1],y=r[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*y+e[12],t[13]=e[1]*v+e[5]*g+e[9]*y+e[13],t[14]=e[2]*v+e[6]*g+e[10]*y+e[14],t[15]=e[3]*v+e[7]*g+e[11]*y+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],f=e[8],h=e[9],p=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]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=n*v+s*g+f*y+e[12],t[13]=i*v+l*g+h*y+e[13],t[14]=a*v+u*g+p*y+e[14],t[15]=o*v+c*g+d*y+e[15]),t}},86520: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}},23352:function(t,e,r){"use strict";var n=r(42771),i=r(55616),a=r(28624),o=r(55212),s=r(60463),l=r(72160),u=r(33888),c=r(14144),f=r(51160),h=r(58908),p=r(65819),d=r(23464),v=r(63768),g=r(50896),y=r(71920),m=r(47520),x=r(308).nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var T=function(t){var e;"function"==typeof(e=t)&&e._gl&&e.prop&&e.texture&&e.buffer?(t={regl:t},this.gl=t.regl._gl):this.gl=o(t),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||a({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(t)?t:{})};T.prototype.createShader=function(){var t=this.regl,e=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:"\n precision highp float;\n attribute float width, charOffset, char;\n attribute vec2 position;\n uniform float fontSize, charStep, em, align, baseline;\n uniform vec4 viewport;\n uniform vec4 color;\n uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n varying vec2 charCoord, charId;\n varying float charWidth;\n varying vec4 fontColor;\n void main () {\n vec2 offset = floor(em * (vec2(align + charOffset, baseline)\n + vec2(positionOffset.x, -positionOffset.y)))\n / (viewport.zw * scale.xy);\n\n vec2 position = (position + translate) * scale;\n position += offset * scale;\n\n charCoord = position * viewport.zw + viewport.xy;\n\n gl_Position = vec4(position * 2. - 1., 0, 1);\n\n gl_PointSize = charStep;\n\n charId.x = mod(char, atlasDim.x);\n charId.y = floor(char / atlasDim.x);\n\n charWidth = width * em;\n\n fontColor = color / 255.;\n }",frag:"\n precision highp float;\n uniform float fontSize, charStep, opacity;\n uniform vec2 atlasSize;\n uniform vec4 viewport;\n uniform sampler2D atlas;\n varying vec4 fontColor;\n varying vec2 charCoord, charId;\n varying float charWidth;\n\n float lightness(vec4 color) {\n return color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n }\n\n void main () {\n vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n float halfCharStep = floor(charStep * .5 + .5);\n\n // invert y and shift by 1px (FF expecially needs that)\n uv.y = charStep - uv.y;\n\n // ignore points outside of character bounding box\n float halfCharWidth = ceil(charWidth * .5);\n if (floor(uv.x) > halfCharStep + halfCharWidth ||\n floor(uv.x) < halfCharStep - halfCharWidth) return;\n\n uv += charId * charStep;\n uv = uv / atlasSize;\n\n vec4 color = fontColor;\n vec4 mask = texture2D(atlas, uv);\n\n float maskY = lightness(mask);\n // float colorY = lightness(color);\n color.a *= maskY;\n color.a *= opacity;\n\n // color.a += .1;\n\n // antialiasing, see yiq color space y-channel formula\n // color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n gl_FragColor = color;\n }"});return{regl:t,draw:e,atlas:{}}},T.prototype.update=function(t){var e,r,a=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(t){return parseFloat(t)}):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=f(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=m(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=T.baseFontSize+"px sans-serif");var o=!1,s=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(t,e){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(T.baseFontSize+"px "+t)}else{var r=t.style,i=t.weight,l=t.stretch,u=t.variant;t=n.parse(n.stringify(t)),r&&(t.style=r),i&&(t.weight=i),l&&(t.stretch=l),u&&(t.variant=u)}var c=n.stringify({size:T.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),f=p(t.size),h=Math.round(f[0]*d(f[1]));if(h!==a.fontSize[e]&&(s=!0,a.fontSize[e]=h),(!a.font[e]||c!=a.font[e].baseString)&&(o=!0,a.font[e]=T.fonts[c],!a.font[e])){var v=t.family.join(", "),g=[t.style];t.style!=t.variant&&g.push(t.variant),t.variant!=t.weight&&g.push(t.weight),_&&t.weight!=t.stretch&&g.push(t.stretch),a.font[e]={baseString:c,family:v,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:y(v,{origin:"top",fontSize:T.baseFontSize,fontStyle:g.join(" ")})},T.fonts[c]=a.font[e]}}),(o||s)&&this.font.forEach(function(e,r){var i=n.stringify({size:a.fontSize[r],family:e.family,stretch:_?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style});if(a.fontAtlas[r]=a.shader.atlas[i],!a.fontAtlas[r]){var o=e.metrics;a.shader.atlas[i]=a.fontAtlas[r]={fontString:i,step:2*Math.ceil(a.fontSize[r]*o.bottom*.5),em:a.fontSize[r],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:a.regl.texture()}}null==t.text&&(t.text=a.text)}),"string"==typeof t.text&&t.position&&t.position.length>2){for(var h=Array(.5*t.position.length),b=0;b2){for(var k=!t.position[0].length,A=c.mallocFloat(2*this.count),M=0,S=0;M1?a.align[e]:a.align[0]:a.align;if("number"==typeof r)return r;switch(r){case"right":case"end":return-t;case"center":case"centre":case"middle":return-(.5*t)}return 0})),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(t,e){var r,n=(a.font[e]||a.font[0]).metrics;return r=0+.5*n.bottom,"number"==typeof t?r+=t-n.baseline:r+=-n[t],r*=-1})),null!=t.color){if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;r=c.mallocUint8(G);for(var W=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var K=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(K);for(var J=0;J1?this.counts[J]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[J]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[J]:this.opacity,baseline:null!=this.baselineOffset[J]?this.baselineOffset[J]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[J]?this.alignOffset[J]:this.alignOffset[0]:0,atlas:this.fontAtlas[J]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*J,2*J+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text="",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement("canvas"),T.atlasContext=T.atlasCanvas.getContext("2d",{alpha:!1}),T.baseFontSize=64,T.fonts={},t.exports=T},55212:function(t,e,r){"use strict";var n=r(55616);function i(t){if(t.container){if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.g.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.g.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}}function a(t){return"function"==typeof t.getContext&&"width"in t&&"height"in t}function o(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}t.exports=function(t){if(t?"string"==typeof t&&(t={container:t}):t={},(t=a(t)?{container:t}:"string"==typeof(e=t).nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect?{container:t}:"function"==typeof(s=t).drawArrays||"function"==typeof s.drawElements?{gl:t}:n(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(t.pixelRatio=r.g.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if("string"==typeof t.container){var e,s,l=document.querySelector(t.container);if(!l)throw Error("Element "+t.container+" is not found");t.container=l}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if("undefined"!=typeof document)t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t);else throw Error("Not DOM environment. Use headless-gl.")}return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl}),t.gl}},26444:function(t){t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n */e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,h=23===i?5960464477539062e-23:0,p=n?0:a-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(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),o+f>=1?e+=h/l:e+=h*Math.pow(2,1-f),e*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*v}},6768:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},91148:function(t,e,r){"use strict";var n=r(46672)(),i=r(99676)("Object.prototype.toString"),a=function(t){return(!n||!t||"object"!=typeof t||!(Symbol.toStringTag in t))&&"[object Arguments]"===i(t)},o=function(t){return!!a(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=o,t.exports=s?a:o},24200:function(t){t.exports=!0},90720:function(t){"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i(function(){throw 42},null,e)}catch(t){t!==r&&(i=null)}else i=null;var a=/^\s*class\b/,o=function(t){try{var e=n.call(t);return a.test(e)}catch(t){return!1}},s=function(t){try{if(o(t))return!1;return n.call(t),!0}catch(t){return!1}},l=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;l.call(h)===l.call(document.all)&&(f=function(t){if((c||!t)&&(void 0===t||"object"==typeof t))try{var e=l.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(f(t))return!0;if(!t||"function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!o(t)&&s(t)}:function(t){if(f(t))return!0;if(!t||"function"!=typeof t&&"object"!=typeof t)return!1;if(u)return s(t);if(o(t))return!1;var e=l.call(t);return!!("[object Function]"===e||"[object GeneratorFunction]"===e||/^\[object HTML/.test(e))&&s(t)}},84420:function(t,e,r){"use strict";var n,i=Object.prototype.toString,a=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=r(46672)(),l=Object.getPrototypeOf,u=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}};t.exports=function(t){if("function"!=typeof t)return!1;if(o.test(a.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(t);if(!l)return!1;if(void 0===n){var e=u();n=!!e&&l(e)}return l(t)===n}},96604:function(t){"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(t){"use strict";t.exports=function(t){return t!=t}},1560:function(t,e,r){"use strict";var n=r(57916),i=r(81288),a=r(85992),o=r(57740),s=r(59736),l=n(o(),Number);i(l,{getPolyfill:o,implementation:a,shim:s}),t.exports=l},57740:function(t,e,r){"use strict";var n=r(85992);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},59736:function(t,e,r){"use strict";var n=r(81288),i=r(57740);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},18400:function(t){"use strict";t.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},58908:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var r;return"[object Object]"===e.call(t)&&(null===(r=Object.getPrototypeOf(t))||r===Object.getPrototypeOf({}))}},94576:function(t){"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n13)&&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}},53520:function(t){"use strict";t.exports=function(t){return"string"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t))&&t.length>4)}},7728:function(t,e,r){"use strict";var n=r(46492),i=r(63436),a=r(99676),o=a("Object.prototype.toString"),s=r(46672)(),l=r(2304),u="undefined"==typeof globalThis?r.g:globalThis,c=i(),f=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1)}},76244:function(t){"use strict";t.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},62644:function(t,e,r){"use strict";t.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function u(t,s){var u=n.x(s),c=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||u!==i||c!==a||l(s))&&(r=0|t,i=u||0,a=c||0,e&&e(r,i,a,o))}function c(t){u(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?u(0,t):u(r,t)}function d(t){u(r|n.buttons(t),t)}function v(t){u(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",v),t.addEventListener("mouseleave",c),t.addEventListener("mouseenter",c),t.addEventListener("mouseout",c),t.addEventListener("mouseover",c),t.addEventListener("blur",f),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",v),t.removeEventListener("mouseleave",c),t.removeEventListener("mouseenter",c),t.removeEventListener("mouseout",c),t.removeEventListener("mouseover",c),t.removeEventListener("blur",f),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var n=r(93784)},29128: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}},93784:function(t,e){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){var e=t.which;if(2===e)return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<0&&a(s,r))}catch(t){u.call(new f(r),t)}}}function u(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 c(t,e,r,n){for(var i=0;i1&&(o*=y=Math.sqrt(y),s*=y);var m=o*o,x=s*s,b=(u==c?-1:1)*Math.sqrt(Math.abs((m*x-m*g*g-x*v*v)/(m*g*g+x*v*v)));b==1/0&&(b=1);var _=b*o*g/s+(n+f)/2,w=-(b*s)*v/o+(i+h)/2,T=Math.asin(((i-w)/s).toFixed(9)),k=Math.asin(((h-w)/s).toFixed(9));T=n<_?e-T:T,k=f<_?e-k:k,T<0&&(T=2*e+T),k<0&&(k=2*e+k),c&&T>k&&(T-=2*e),!c&&k>T&&(k-=2*e)}if(Math.abs(k-T)>r)var A=k,M=f,S=h,E=t(f=_+o*Math.cos(k=T+r*(c&&k>T?1:-1)),h=w+s*Math.sin(k),o,s,l,0,c,M,S,[k,A,_,w]);var L=Math.tan((k-T)/4),C=4/3*o*L,P=4/3*s*L,O=[2*n-(n+C*Math.sin(T)),2*i-(i-P*Math.cos(T)),f+C*Math.sin(k),h-P*Math.cos(k),f,h];if(p)return O;E&&(O=O.concat(E));for(var I=0;I7&&(s.push(m.splice(0,7)),m.unshift("C"));break;case"S":var b=d,_=v;("C"==o||"S"==o)&&(b+=b-l,_+=_-u),m=["C",b,_,m[1],m[2],m[3],m[4]];break;case"T":"Q"==o||"T"==o?(h=2*d-h,p=2*v-p):(h=d,p=v),m=i(d,v,h,p,m[1],m[2]);break;case"Q":h=m[1],p=m[2],m=i(d,v,m[1],m[2],m[3],m[4]);break;case"L":m=n(d,v,m[1],m[2]);break;case"H":m=n(d,v,m[1],v);break;case"V":m=n(d,v,d,m[1]);break;case"Z":m=n(d,v,c,f)}o=x,d=m[m.length-2],v=m[m.length-1],m.length>4?(l=m[m.length-4],u=m[m.length-3]):(l=d,u=v),s.push(m)}return s}},50896:function(t){"use strict";/* +object-assign +(c) Sindre Sorhus +@license MIT +*/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;var n=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==n.join(""))return!1;var i={};if("abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},i)).join(""))return!1;return!0}catch(t){return!1}}()?function(t,i){for(var a,o,s=function(t){if(null==t)throw TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l0&&!i.call(t,0))for(var p=0;p0)for(var v=0;v=0&&"[object Function]"===e.call(t.callee)),n}},32868:function(t){"use strict";function e(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",a=!!e.flat;n.forEach(function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach(function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t}),n=n.reverse(),r=r.map(function(e){return n.forEach(function(r){e=e.replace(RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])}),e})});var o=RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function r(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var a=RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(a,s)}return i}return t.reduce(function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r},"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function n(t,n){return Array.isArray(t)?r(t,n):e(t,n)}n.parse=e,n.stringify=r,t.exports=n},51160:function(t,e,r){"use strict";var n=r(55616);t.exports=function(t){var e;return arguments.length>1&&(t=arguments),"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]),t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(e={x:(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height),e}},21984:function(t){t.exports=function(t){var i=[];return t.replace(r,function(t,r,a){var o,s=r.toLowerCase();for(a=(o=a.match(n))?o.map(Number):[],"m"==s&&a.length>2&&(i.push([r].concat(a.splice(0,2))),s="l",r="m"==r?"l":"L");;){if(a.length==e[s])return a.unshift(r),i.push(a);if(a.lengtha!=p>a&&i<(h-c)*(a-f)/(p-f)+c&&(o=!o)}return o}},14756:function(t,e,r){/* + * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc + * @license MIT + * @preserve Project Home: https://github.com/voidqk/polybooljs + */var n,i=r(7688),a=r(28648),o=r(72200),s=r(11403),l=r(82368),u=r(17792),c=!1,f=a();function h(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 f.epsilon(t)},segments:function(t){var e=o(!0,f,c);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,f,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,f,c),inverted:t.inverted}},polygonFromGeoJSON:function(t){return u.toPolygon(n,t)},polygonToGeoJSON:function(t){return u.fromPolygon(n,f,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},7688: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")}}}},28648: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)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-u)*(i-c)/(o-c)+u-n>t&&(s=!s),a=u,o=c}return s}};return e}},17792:function(t){t.exports={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;i0})}(f),v=d.before?d.before.ev:null,g=d.after?d.after.ev:null;r&&r.tempStatus(f.seg,!!v&&v.seg,!!g&&g.seg);var y=function(){if(v){var t=u(f,v);if(t)return t}return!!g&&u(f,g)}();if(y&&(t?(h=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=f.seg.myFill,r&&r.segmentUpdate(y.seg),f.other.remove(),f.remove()),a.getHead()!==f){r&&r.rewind(f.seg);continue}t?(h=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,g?f.seg.myFill.below=g.seg.myFill.above:f.seg.myFill.below=i,h?f.seg.myFill.above=!f.seg.myFill.below:f.seg.myFill.above=f.seg.myFill.below):null===f.seg.otherFill&&(p=g?f.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:f.primary?o:i,f.seg.otherFill={above:p,below:p}),r&&r.status(f.seg,!!v&&v.seg,!!g&&g.seg),f.other.status=d.insert(n.node({ev:f}))}else{var m=f.status;if(null===m)throw Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(m.prev)&&s.exists(m.next)&&u(m.prev.ev,m.next.ev),r&&r.statusRemove(m.ev.seg),m.remove(),!f.primary){var x=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=x}c.push(f.seg)}a.getHead().remove()}return r&&r.done(),c}return t?{addRegion:function(t){for(var n,i=t[t.length-1],a=0;a0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},r.prototype.read_uint16=function(t){var r=this.input;if(t+2>r.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?256*r[t]+r[t+1]:r[t]+256*r[t+1]},r.prototype.read_uint32=function(t){var r=this.input;if(t+4>r.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?16777216*r[t]+65536*r[t+1]+256*r[t+2]+r[t+3]:r[t]+256*r[t+1]+65536*r[t+2]+16777216*r[t+3]},r.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},r.prototype.exif_format_length=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},r.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return this.input[e];case 6:return(r=this.input[e])|(128&r)*33554430;case 3:return this.read_uint16(e);case 8:return(r=this.read_uint16(e))|(32768&r)*131070;case 4:return this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));default:return null}},r.prototype.scan_ifd=function(t,r,n){var i=this.read_uint16(r);r+=2;for(var a=0;athis.input.length)throw e("unexpected EOF","EBADDATA");for(var p=[],d=f,v=0;v0&&(this.ifds_to_read.push({id:o,offset:p[0]}),h=!0),!1===n({is_big_endian:this.big_endian,ifd:t,tag:o,format:s,count:l,entry_offset:r+this.start,data_length:c,data_offset:f+this.start,value:p,is_subifd_link:h})){this.aborted=!0;return}r+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(r)})},t.exports.ExifParser=r,t.exports.get_orientation=function(t){var e=0;try{return new r(t,0,t.length).each(function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1}),e}catch(t){return -1}}},44600:function(t,e,r){"use strict";var n=r(9696).eW,i=r(9696).eI;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length>4&15,i=15&t[4],a=t[5]>>4&15,s=n(t,6),l=8,u=0;ue.width||t.width===e.width&&t.height>e.height?t:e}),l=r.reduce(function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e}),s.width>l.height||s.width===l.height&&s.height>l.width?s:l),c=1;e.transforms.forEach(function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===t.type&&(0===t.value?c=r[c]:(c=e[c=r[c]],c=e[c])),"irot"===t.type)for(var n=0;n1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),v=s.get_orientation(d);v>0&&(h.orientation=v)}return h}}}}}}},38728:function(t,e,r){"use strict";var n=r(9696).wR,i=r(9696).gS,a=r(9696).Bz,o=n("BM");t.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(t,e,r){"use strict";var n=r(9696).wR,i=r(9696).gS,a=r(9696).Bz,o=n("GIF87a"),s=n("GIF89a");t.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(t,e,r){"use strict";var n=r(9696).Bz;t.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||u>o.height)&&(o=c)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(t,e,r){"use strict";var n=r(9696).eW,i=r(9696).wR,a=r(9696).gS,o=r(11688),s=i("Exif\0\0");t.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l)||!(l<=254)||t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e0&&(u.orientation=i),u}e+=r}}},37276:function(t,e,r){"use strict";var n=r(9696).wR,i=r(9696).gS,a=r(9696).eI,o=n("\x89PNG\r\n\x1a\n"),s=n("IHDR");t.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},90328:function(t,e,r){"use strict";var n=r(9696).wR,i=r(9696).gS,a=r(9696).eI,o=n("8BPS\0\x01");t.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},16024:function(t){"use strict";function e(t){return"number"==typeof t&&isFinite(t)&&t>0}var r=/<[-_.:a-zA-Z0-9][^>]*>/,n=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,i=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,a=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,s=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function l(t){return s.test(t)?t.match(s)[0]:"px"}t.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);rt.length)){for(;e+8=10?r=r||function(t,e){if(157===t[e+3]&&1===t[e+4]&&42===t[e+5])return{width:16383&a(t,e+6),height:16383&a(t,e+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}(t,e+8):"VP8L"===h&&p>=9?r=r||function(t,e){if(47===t[e]){var r=o(t,e+1);return{width:(16383&r)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}(t,e+8):"VP8X"===h&&p>=10?r=r||{width:(t[(f=e+8)+6]<<16|t[f+5]<<8|t[f+4])+1,height:(t[f+9]<0&&(r.orientation=n),r}}}},87480:function(t,e,r){"use strict";t.exports={avif:r(40528),bmp:r(38728),gif:r(5588),ico:r(41924),jpeg:r(87968),png:r(37276),psd:r(90328),svg:r(16024),tiff:r(98792),webp:r(20704)}},19480:function(t,e,r){"use strict";var n=r(87480);t.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r1)for(var r=1;r1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map(function(t,u){var c=x[u];return t&&("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=o(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),c||(x[u]=c={id:u,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},m,t)),a(c,t,[{lineWidth:function(t){return .5*+t},capSize:function(t){return .5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) {\n //handle miter clipping\n bTopCoord -= normalWidth * endTopJoin;\n bTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n }\n\n if (nextReverse) {\n //make join rectangular\n vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n }\n else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n //handle miter clipping\n aBotCoord -= normalWidth * startBotJoin;\n aBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n }\n\n vec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n vec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n vec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n vec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n //position is normalized 0..1 coord on the screen\n vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n gl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n enableStartMiter = step(dot(currTangent, prevTangent), .5);\n enableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n //bevel miter cutoffs\n if (miterMode == 1.) {\n if (enableStartMiter == 1.) {\n vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n startCutoff = vec4(aCoord, aCoord);\n startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n startCutoff += viewport.xyxy;\n startCutoff += startMiterWidth.xyxy;\n }\n\n if (enableEndMiter == 1.) {\n vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n endCutoff = vec4(bCoord, bCoord);\n endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n endCutoff += viewport.xyxy;\n endCutoff += endMiterWidth.xyxy;\n }\n }\n\n //round miter cutoffs\n else if (miterMode == 2.) {\n if (enableStartMiter == 1.) {\n vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n startCutoff = vec4(aCoord, aCoord);\n startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n startCutoff += viewport.xyxy;\n startCutoff += startMiterWidth.xyxy;\n }\n\n if (enableEndMiter == 1.) {\n vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n endCutoff = vec4(bCoord, bCoord);\n endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n endCutoff += viewport.xyxy;\n endCutoff += endMiterWidth.xyxy;\n }\n }\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n vec2 diff = b - a;\n vec2 perp = normalize(vec2(-diff.y, diff.x));\n return dot(p - a, perp);\n}\n\nvoid main() {\n float alpha = 1., distToStart, distToEnd;\n float cutoff = thickness * .5;\n\n //bevel miter\n if (miterMode == 1.) {\n if (enableStartMiter == 1.) {\n distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n if (distToStart < -1.) {\n discard;\n return;\n }\n alpha *= min(max(distToStart + 1., 0.), 1.);\n }\n\n if (enableEndMiter == 1.) {\n distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n if (distToEnd < -1.) {\n discard;\n return;\n }\n alpha *= min(max(distToEnd + 1., 0.), 1.);\n }\n }\n\n // round miter\n else if (miterMode == 2.) {\n if (enableStartMiter == 1.) {\n distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n if (distToStart < 0.) {\n float radius = length(gl_FragCoord.xy - startCoord);\n\n if(radius > cutoff + .5) {\n discard;\n return;\n }\n\n alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n }\n }\n\n if (enableEndMiter == 1.) {\n distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n if (distToEnd < 0.) {\n float radius = length(gl_FragCoord.xy - endCoord);\n\n if(radius > cutoff + .5) {\n discard;\n return;\n }\n\n alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n }\n }\n }\n\n float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n float dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n gl_FragColor = fragColor;\n gl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:"\nprecision highp float;\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n float depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n vec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n gl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n fragColor = color / 255.;\n fragColor.a *= opacity;\n}\n",frag:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}\n",uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},g.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},g.prototype.render=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];t.length&&this.update.apply(this,t),this.draw()},g.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach(function(e,r){if(e&&Array.isArray(e))return t.draw.apply(t,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>g.precisionThreshold||e.scale[1]*e.viewport.height>g.precisionThreshold?t.shaders.rect(e):"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=g.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))}),this},g.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,c=this.gl;if(t.forEach(function(t,p){var y=e.passes[p];if(void 0!==t){if(null===t){e.passes[p]=null;return}if("number"==typeof t[0]&&(t={positions:t}),t=o(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),y||(e.passes[p]=y={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},t=a({},g.defaults,t)),null!=t.thickness&&(y.thickness=parseFloat(t.thickness)),null!=t.opacity&&(y.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(y.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(y.overlay=!!t.overlay,p=D});(O=O.slice(0,R)).push(D)}for(var F=function(t){var e=l(k.slice(2*z,2*O[t]).concat(D?k.slice(2*D):[]),(y.hole||[]).map(function(e){return e-D+(O[t]-z)}));e=e.map(function(e){return e+z+(e+zt.length)&&(e=t.length);for(var r=0,n=Array(e);r 1.0 + delta) {\n discard;\n }\n\n alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n float borderRadius = fragBorderRadius;\n float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n vec4 color = mix(fragColor, fragBorderColor, ratio);\n color.a *= alpha * opacity;\n gl_FragColor = color;\n}\n"]),l.vert=c(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),d&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}y.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var t=this,e=arguments.length,r=Array(e),n=0;nn)?e.tree=l(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(h):e.elements=s.elements(h)}var d=v.float32(t);return i({data:d,usage:"dynamic"}),a({data:v.fract32(t,d),usage:"dynamic"}),u({data:new Uint8Array(c),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach(function(t){return t&&t.destroy&&t.destroy()}),i.length=0,e&&"number"!=typeof e[0]){for(var a=[],o=0,l=Math.min(e.length,r.count);o=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},y.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1){t=t.slice();for(var i=.25*t.length%e;i2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x,s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y,l.height),[a,n,o,i]}function h(t){if("number"==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}t.exports=c,c.prototype.render=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length&&this.update.apply(this,e),this.regl.attributes.preserveDrawingBuffer)?this.draw():(this.dirty?null==this.planned&&(this.planned=o(function(){t.draw(),t.dirty=!0,t.planned=null})):(this.draw(),this.dirty=!0,o(function(){t.dirty=!1})),this)},c.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;nT))&&(s.lower||!(w>>=e,r=(255>>=r,e|=r,r=(15>>=r,(e|=r)|(r=(3>>r>>1}function a(){function t(t){b:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break b}t=0}return 0<(e=r[i(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[i(t.byteLength)>>2].push(t)}var r=n(8,function(){return[]});return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function o(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||N(t.data))}function s(t,e,r,n,i,a){for(var o=0;o>>31<<15,a=(n<<1>>>24)-127,n=n>>13&1023;e[r]=-24>a?i:-14>a?i+(n+1024>>-14-a):15>>e|t<<32-e}function w(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function T(t){return Array.prototype.slice.call(t)}function k(t){return T(t).join("")}function A(t){return Array.isArray(t)||N(t)||o(t)}function M(t){return t.sort(function(t,e){return"viewport"===t?-1:"viewport"===e?1:t=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(c).forEach(function(e){t+=c[e].stats.size}),t}),{create:function(e,r){function o(e,r){var n=0,a=0,c=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(a=e.shape)[0],a=0|a[1]):("radius"in e&&(n=a=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(a=0|e.height)),"format"in e&&(c=s[e.format])):"number"==typeof e?(n=0|e,a="number"==typeof r?0|r:n):e||(n=a=1),n!==u.width||a!==u.height||c!==u.format)return o.width=u.width=n,o.height=u.height=a,u.format=c,t.bindRenderbuffer(36161,u.renderbuffer),t.renderbufferStorage(36161,c,n,a),i.profile&&(u.stats.size=tu[u.format]*u.width*u.height),o.format=l[u.format],o}var u=new a(t.createRenderbuffer());return c[u.id]=u,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===u.width&&a===u.height||(o.width=u.width=n,o.height=u.height=a,t.bindRenderbuffer(36161,u.renderbuffer),t.renderbufferStorage(36161,u.format,n,a),i.profile&&(u.stats.size=tu[u.format]*u.width*u.height)),o},o._reglType="renderbuffer",o._renderbuffer=u,i.profile&&(o.stats=u.stats),o.destroy=function(){u.decRef()},o},clear:function(){j(c).forEach(o)},restore:function(){j(c).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},tf=[];tf[6408]=4,tf[6407]=3;var th=[];th[5121]=1,th[5126]=4,th[36193]=2;var tp=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],td=["x","y","z","w"],tv="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),tg={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ty={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},tm={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},tx={cw:2304,ccw:2305},tb=new S(!1,!1,!1,function(){}),t_=function(t,e){function r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function n(t,e,n){var i=o.pop()||new r;i.startQueryIndex=t,i.endQueryIndex=e,i.sum=0,i.stats=n,s.push(i)}if(!e.ext_disjoint_timer_query)return null;var i=[],a=[],o=[],s=[],l=[],u=[];return{beginQuery:function(t){var r=i.pop()||e.ext_disjoint_timer_query.createQueryEXT();e.ext_disjoint_timer_query.beginQueryEXT(35007,r),a.push(r),n(a.length-1,a.length,t)},endQuery:function(){e.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:n,update:function(){var t,r;if(0!==(t=a.length)){u.length=Math.max(u.length,t+1),l.length=Math.max(l.length,t+1),l[0]=0;var n=u[0]=0;for(r=t=0;r=tX.length&&s()}}}}function ts(){var t=tW.viewport,e=tW.scissor_box;t[0]=t[1]=e[0]=e[1]=0,tR.viewportWidth=tR.framebufferWidth=tR.drawingBufferWidth=t[2]=e[2]=tA.drawingBufferWidth,tR.viewportHeight=tR.framebufferHeight=tR.drawingBufferHeight=t[3]=e[3]=tA.drawingBufferHeight}function tl(){tR.tick+=1,tR.time=tw(),ts(),tG.procs.poll()}function tu(){tV.refresh(),ts(),tG.procs.refresh(),tO&&tO.update()}function tw(){return(R()-tI)/1e3}if(!(t=function(t){var n,i,a,o,s=t||{};t={};var l=[],u=[],c="undefined"==typeof window?1:window.devicePixelRatio,f=!1,h={},p=function(t){},d=function(){};if("string"==typeof s?n=document.querySelector(s):"object"==typeof s&&("string"==typeof s.nodeName&&"function"==typeof s.appendChild&&"function"==typeof s.getBoundingClientRect?n=s:"function"==typeof s.drawArrays||"function"==typeof s.drawElements?a=(o=s).canvas:("gl"in s?o=s.gl:"canvas"in s?a=r(s.canvas):"container"in s&&(i=r(s.container)),"attributes"in s&&(t=s.attributes),"extensions"in s&&(l=e(s.extensions)),"optionalExtensions"in s&&(u=e(s.optionalExtensions)),"onDone"in s&&(p=s.onDone),"profile"in s&&(f=!!s.profile),"pixelRatio"in s&&(c=+s.pixelRatio),"cachedCode"in s&&(h=s.cachedCode))),n&&("canvas"===n.nodeName.toLowerCase()?a=n:i=n),!o){if(!a){if(!(n=function(t,e,r){function n(){var e=window.innerWidth,n=window.innerHeight;t!==document.body&&(e=(n=a.getBoundingClientRect()).right-n.left,n=n.bottom-n.top),a.width=r*e,a.height=r*n}var i,a=document.createElement("canvas");return O(a.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(a),t===document.body&&(a.style.position="absolute",O(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver(function(){setTimeout(n)})).observe(t):window.addEventListener("resize",n,!1),n(),{canvas:a,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",n),t.removeChild(a)}}}(i||document.body,0,c)))return null;a=n.canvas,d=n.onDestroy}void 0===t.premultipliedAlpha&&(t.premultipliedAlpha=!0),o=function(t,e){function r(r){try{return t.getContext(r,e)}catch(t){return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(a,t)}return o?{gl:o,canvas:a,container:i,extensions:l,optionalExtensions:u,pixelRatio:c,profile:f,cachedCode:h,onDone:p,onDestroy:d}:(d(),p("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t)))return null;var tT,tk,tA=t.gl,tM=tA.getContextAttributes();tA.isContextLost();var tS=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;i(i=l)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=s,0>s&&(i=4,1===(s=n.buffer.dimension)&&(i=0),2===s&&(i=1),3===s&&(i=4)),n.primType=i}function s(t){n.elementsCount--,delete l[t.id],t.buffer.destroy(),t.buffer=null}var l={},u=0,c={uint8:5121,uint16:5123};e.oes_element_index_uint&&(c.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function l(t){if(t){if("number"==typeof t)u(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,s=0,h=0;Array.isArray(t)||N(t)||o(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=H[t.usage]),"primitive"in t&&(n=X[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(h=c[t.type]),"length"in t)?s=0|t.length:(s=i,5123===h||5122===h)?s*=2:(5125===h||5124===h)&&(s*=4),a(f,e,r,n,i,s,h)}}else u(),f.primType=4,f.vertCount=0,f.type=5121;return l}var u=r.create(null,34963,!0),f=new i(u._buffer);return n.elementsCount++,l(t),l._reglType="elements",l._elements=f,l.subdata=function(t,e){return u.subdata(t,e),l},l.destroy=function(){s(f)},l},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){j(l).forEach(s)}}}(tA,tP,tB,tL),tj=function(t,e,r,n,i,a,s){function l(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var u=r.maxAttributes,c=Array(u);for(r=0;r=h.byteLength?u.subdata(h):(u.destroy(),r.buffers[s]=null)),r.buffers[s]||(u=r.buffers[s]=i.create(c,34962,!1,!0)),f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1):i.getBuffer(c)?(f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(c.buffer)?(f.buffer=i.getBuffer(c.buffer),f.size=0|(+c.size||f.buffer.dimension),f.normalized=!!c.normalized,f.type="type"in c?q[c.type]:f.buffer.dtype,f.offset=0|(c.offset||0),f.stride=0|(c.stride||0),f.divisor=0|(c.divisor||0),f.state=1):"x"in c&&(f.x=+c.x||0,f.y=+c.y||0,f.z=+c.z||0,f.w=+c.w||0,f.state=2)}for(u=0;ut&&(t=e.stats.uniformsCount)}),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);j(u).forEach(e),u={},j(c).forEach(e),c={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,f={},r.shaderCount=0},program:function(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),O(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(c[d.vertId]),delete c[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(u[d.fragId]),delete u[d.fragId],delete f[d.fragId])}})},restore:function(){u={},c={};for(var t=0;t>=i,r.height>>=i,_(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&q(this)}}),s.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(tm).forEach(function(e){t+=tm[e].stats.size}),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=L();return"number"==typeof t?"number"==typeof e?M(a,0|t,0|e):M(a,0|t,0|t):t?(I(r,t),S(a,t)):M(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,u(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,R(i),E(a,3553),z(r,3553),B(),C(a),s.profile&&(i.stats.size=x(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=tu[i.internalformat],n.type=tc[i.type],n.mag=tf[r.magFilter],n.min=th[r.minFilter],n.wrapS=tp[r.wrapS],n.wrapT=tp[r.wrapT],n}var i=new D(3553);return tm[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=T();return u(o,i),o.width=0,o.height=0,_(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,R(i),w(o,3553,e,r,a),B(),k(o),n},n.resize=function(e,r){var a=0|e,o=0|r||a;if(a===i.width&&o===i.height)return n;n.width=i.width=a,n.height=i.height=o,R(i);for(var l=0;i.mipmask>>l;++l){var u=a>>l,c=o>>l;if(!u||!c)break;t.texImage2D(3553,l,i.format,u,c,0,i.format,i.type,null)}return B(),s.profile&&(i.stats.size=x(i.internalformat,i.type,a,o,!1,!1)),n},n._reglType="texture2d",n._texture=i,s.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,o,l){function f(t,e,r,n,i,a){var o,l=h.texInfo;for(P.call(l),o=0;6>o;++o)p[o]=L();if("number"!=typeof t&&t){if("object"==typeof t){if(e)S(p[0],t),S(p[1],e),S(p[2],r),S(p[3],n),S(p[4],i),S(p[5],a);else if(I(l,t),c(h,t),"faces"in t)for(t=t.faces,o=0;6>o;++o)u(p[o],h),S(p[o],t[o]);else for(o=0;6>o;++o)S(p[o],t)}}else for(t=0|t||1,o=0;6>o;++o)M(p[o],t,t);for(u(h,p[0]),h.mipmask=l.genMipmaps?(p[0].width<<1)-1:p[0].mipmask,h.internalformat=p[0].internalformat,f.width=p[0].width,f.height=p[0].height,R(h),o=0;6>o;++o)E(p[o],34069+o);for(z(l,34067),B(),s.profile&&(h.stats.size=x(h.internalformat,h.type,f.width,f.height,l.genMipmaps,!0)),f.format=tu[h.internalformat],f.type=tc[h.type],f.mag=tf[l.magFilter],f.min=th[l.minFilter],f.wrapS=tp[l.wrapS],f.wrapT=tp[l.wrapT],o=0;6>o;++o)C(p[o]);return f}var h=new D(34067);tm[h.id]=h,a.cubeCount++;var p=Array(6);return f(e,r,n,i,o,l),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=T();return u(a,h),a.width=0,a.height=0,_(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,R(h),w(a,34069+t,r,n,i),B(),k(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,R(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return B(),s.profile&&(h.stats.size=x(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType="textureCube",f._texture=h,s.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;er;++r)if(0!=(e.mipmask&1<>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null)}z(e.texInfo,e.target)})},refresh:function(){for(var e=0;ei;++i){for(u=0;ut;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:"framebufferCube",destroy:function(){r.forEach(function(t){t.destroy()})}})},clear:function(){j(k).forEach(g)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,j(k).forEach(function(e){e.framebuffer=t.createFramebuffer(),y(e)})}})}(tA,tP,tF,tV,tq,tL),tG=function(t,e,r,i,a,o,s,l,u,c,f,p,d,v,g,y){function m(t){return t.replace(".","_")}function x(t,e,r){var n=m(t);tT.push(t),tw[n]=t_[n]=!!r,tk[n]=e}function b(t,e,r){var n=m(t);tT.push(t),Array.isArray(r)?(t_[n]=r.slice(),tw[n]=r.slice()):t_[n]=tw[n]=r,tA[n]=e}function P(){var t=function(t){function e(){var t=[],e=[];return O(function(){t.push.apply(t,T(arguments))},{def:function(){var r="v"+i++;return e.push(r),0>>4&15)+"0123456789abcdef".charAt(15&e);return r}(function(t){for(var e,r=Array(t.length>>2),n=0;n>5]|=(255&t.charCodeAt(n/8))<<24-n%32;var i=8*t.length;t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var a,o,s,l,u,c,f,h,p,d,v,n=Array(64);for(r[i>>5]|=128<<24-i%32,r[(i+64>>9<<4)+15]=i,h=0;hp;p++)16>p?n[p]=r[p+h]:(d=p,v=w(v=_(v=n[p-2],17)^_(v,19)^v>>>10,n[p-7]),e=_(e=n[p-15],7)^_(e,18)^e>>>3,n[d]=w(w(v,e),n[p-16])),d=w(w(w(w(f,d=_(d=l,6)^_(d,11)^_(d,25)),l&u^~l&c),tp[p]),n[p]),v=w(f=_(f=i,2)^_(f,13)^_(f,22),i&a^i&o^a&o),f=c,c=u,u=l,l=w(s,d),s=o,o=a,a=i,i=w(d,v);t[0]=w(i,t[0]),t[1]=w(a,t[1]),t[2]=w(o,t[2]),t[3]=w(s,t[3]),t[4]=w(l,t[4]),t[5]=w(u,t[5]),t[6]=w(c,t[6]),t[7]=w(f,t[7])}for(n=0,r="";n<32*t.length;n+=8)r+=String.fromCharCode(t[n>>5]>>>24-n%32&255);return r}(function(t){for(var e,r,n="",i=-1;++i=e&&56320<=r&&57343>=r&&(e=65536+((1023&e)<<10)+(1023&r),i++),127>=e?n+=String.fromCharCode(e):2047>=e?n+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}(r)))]?n[e].apply(null,o):(r=Function.apply(null,a.concat(r)),n&&(n[e]=r),r.apply(null,o))}}}({cache:g}),r=t.link,n=t.global;t.id=tE++,t.batchId="0";var i=r(tM),a=t.shared={props:"a0"};Object.keys(tM).forEach(function(t){a[t]=n.def(i,".",t)});var o=t.next={},s=t.current={};Object.keys(tA).forEach(function(t){Array.isArray(t_[t])&&(o[t]=n.def(a.next,".",t),s[t]=n.def(a.current,".",t))});var l=t.constants={};Object.keys(tS).forEach(function(t){l[t]=n.def(JSON.stringify(tS[t]))}),t.invoke=function(e,n){switch(n.type){case 0:var i=["this",a.context,a.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case 1:return e.def(a.props,n.data);case 2:return e.def(a.context,n.data);case 3:return e.def("this",n.data);case 4:return n.data.append(t,e),n.data.ref;case 5:return n.data.toString();case 6:return n.data.map(function(r){return t.invoke(e,r)})}},t.attribCache={};var u={};return t.scopeAttrib=function(t){if((t=e.id(t))in u)return u[t];var n=c.scope[t];return n||(n=c.scope[t]=new tl),u[t]=r(n)},t}function I(t,e,r){var n=t.shared.context,i=t.scope();Object.keys(r).forEach(function(a){e.save(n,"."+a);var o=r[a].append(t,e);Array.isArray(o)?i(n,".",a,"=[",o.join(),"];"):i(n,".",a,"=",o,";")}),e(i)}function D(t,e,r,n){var i,a=t.shared,o=a.gl,s=a.framebuffer;tf&&(i=e.def(a.extensions,".webgl_draw_buffers"));var l=t.constants,a=l.drawBuffer,l=l.backBuffer;t=r?r.append(t,e):e.def(s,".next"),n||e("if(",t,"!==",s,".cur){"),e("if(",t,"){",o,".bindFramebuffer(",36160,",",t,".framebuffer);"),tf&&e(i,".drawBuffersWEBGL(",a,"[",t,".colorAttachments.length]);"),e("}else{",o,".bindFramebuffer(",36160,",null);"),tf&&e(i,".drawBuffersWEBGL(",l,");"),e("}",s,".cur=",t,";"),n||e("}")}function R(t,e,r){var i=t.shared,a=i.gl,o=t.current,s=t.next,l=i.current,u=i.next,c=t.cond(l,".dirty");tT.forEach(function(e){if(!((e=m(e))in r.state)){var i,f;if(e in s){i=s[e],f=o[e];var h=n(t_[e].length,function(t){return c.def(i,"[",t,"]")});c(t.cond(h.map(function(t,e){return t+"!=="+f+"["+e+"]"}).join("||")).then(a,".",tA[e],"(",h,");",h.map(function(t,e){return f+"["+e+"]="+t}).join(";"),";"))}else i=c.def(u,".",e),c(h=t.cond(i,"!==",l,".",e)),e in tk?h(t.cond(i).then(a,".enable(",tk[e],");").else(a,".disable(",tk[e],");"),l,".",e,"=",i,";"):h(a,".",tA[e],"(",i,");",l,".",e,"=",i,";")}}),0===Object.keys(r.state).length&&c(l,".dirty=false;"),e(c)}function F(t,e,r,n){var i,a=t.shared,o=t.current,s=a.current,l=a.gl;M(Object.keys(r)).forEach(function(a){var u=r[a];if(!n||n(u)){var c=u.append(t,e);if(tk[a]){var f=tk[a];E(u)?(i=t.link(c,{stable:!0}),e(t.cond(i).then(l,".enable(",f,");").else(l,".disable(",f,");")),e(s,".",a,"=",i,";")):(e(t.cond(c).then(l,".enable(",f,");").else(l,".disable(",f,");")),e(s,".",a,"=",c,";"))}else if(h(c)){var p=o[a];e(l,".",tA[a],"(",c,");",c.map(function(t,e){return p+"["+e+"]="+t}).join(";"),";")}else E(u)?(i=t.link(c,{stable:!0}),e(l,".",tA[a],"(",i,");",s,".",a,"=",i,";")):e(l,".",tA[a],"(",c,");",s,".",a,"=",c,";")}})}function B(t,e){tc&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function N(t,e,r,n,i){function a(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function o(t){t(u=e.def(),"=",a(),";"),"string"==typeof i?t(h,".count+=",i,";"):t(h,".count++;"),v&&(n?t(c=e.def(),"=",d,".getNumPendingQueries();"):t(d,".beginQuery(",h,");"))}function s(t){t(h,".cpuTime+=",a(),"-",u,";"),v&&(n?t(d,".pushScopeStats(",c,",",d,".getNumPendingQueries(),",h,");"):t(d,".endQuery();"))}function l(t){var r=e.def(p,".profile");e(p,".profile=",t,";"),e.exit(p,".profile=",r,";")}var u,c,f=t.shared,h=t.stats,p=f.current,d=f.timer;if(r=r.profile){if(E(r)){r.enable?(o(e),s(e.exit),l("true")):l("false");return}l(r=r.append(t,e))}else r=e.def(p,".profile");o(f=t.block()),e("if(",r,"){",f,"}"),s(t=t.block()),e.exit("if(",r,"){",t,"}")}function j(t,e,r,n,i){var a=t.shared;n.forEach(function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(t,e)}else{if(!i(tb))return;var u=t.scopeAttrib(s);o={},Object.keys(new tl).forEach(function(t){o[t]=e.def(u,".",t)})}!function(r,n,i){function o(){e("if(!",c,".buffer){",l,".enableVertexAttribArray(",u,");}");var r,a=i.type;r=i.size?e.def(i.size,"||",n):n,e("if(",c,".type!==",a,"||",c,".size!==",r,"||",p.map(function(t){return c+"."+t+"!=="+i[t]}).join("||"),"){",l,".bindBuffer(",34962,",",f,".buffer);",l,".vertexAttribPointer(",[u,r,a,i.normalized,i.stride,i.offset],");",c,".type=",a,";",c,".size=",r,";",p.map(function(t){return c+"."+t+"="+i[t]+";"}).join(""),"}"),tc&&e("if(",c,".divisor!==",a=i.divisor,"){",t.instancing,".vertexAttribDivisorANGLE(",[u,a],");",c,".divisor=",a,";}")}function s(){e("if(",c,".buffer){",l,".disableVertexAttribArray(",u,");",c,".buffer=null;","}if(",td.map(function(t,e){return c+"."+t+"!=="+h[e]}).join("||"),"){",l,".vertexAttrib4f(",u,",",h,");",td.map(function(t,e){return c+"."+t+"="+h[e]+";"}).join(""),"}")}var l=a.gl,u=e.def(r,".location"),c=e.def(a.attributes,"[",u,"]");r=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],p=["buffer","normalized","offset","stride"];1===r?o():2===r?s():(e("if(",r,"===",1,"){"),o(),e("}else{"),s(),e("}"))}(t.link(n),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)})}function U(t,r,i,a,o,s){for(var l,u=t.shared,c=u.gl,f=0;f>1)",f],");")}function e(){r(h,".drawArraysInstancedANGLE(",[m,x,b,f],");")}y&&"null"!==y?w?t():(r("if(",y,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(d+".drawElements("+[m,b,_,x+"<<(("+_+"-5121)>>1)"]+");")}function e(){r(d+".drawArrays("+[m,x,b]+");")}y&&"null"!==y?w?t():(r("if(",y,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,u,c,f,h,p=t.shared,d=p.gl,v=p.draw,g=n.draw,y=(s=g.elements,l=e,s?((s.contextDep&&n.contextDynamic||s.propDep)&&(l=r),s=s.append(t,l),g.elementsActive&&l("if("+s+")"+d+".bindBuffer(34963,"+s+".buffer.buffer);")):(s=l.def(),l(s,"=",v,".","elements",";","if(",s,"){",d,".bindBuffer(",34963,",",s,".buffer.buffer);}","else if(",p.vao,".currentVAO){",s,"=",t.shared.elements+".getElements("+p.vao,".currentVAO.elements);",th?"":"if("+s+")"+d+".bindBuffer(34963,"+s+".buffer.buffer);","}")),s),m=i("primitive"),x=i("offset"),b=(u=g.count,c=e,u?((u.contextDep&&n.contextDynamic||u.propDep)&&(c=r),u=u.append(t,c)):u=c.def(v,".","count"),u);if("number"==typeof b){if(0===b)return}else r("if(",b,"){"),r.exit("}");tc&&(f=i("instances"),h=t.instancing);var _=y+".type",w=g.elements&&E(g.elements)&&!g.vaoActive;tc&&("number"!=typeof f||0<=f)?"string"==typeof f?(r("if(",f,">0){"),a(),r("}else if(",f,"<0){"),o(),r("}")):a():o()}function H(t,e,r,n,i){return i=(e=P()).proc("body",i),tc&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function G(t,e,r,n){B(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,".setVAO(",r.drawVAO.append(t,e),");"):e(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(e(t.shared.vao,".setVAO(null);"),j(t,e,r,n.attributes,function(){return!0})),U(t,e,r,n.uniforms,function(){return!0},!1),V(t,e,e,r)}function W(t,e,r,n){function i(){return!0}t.batchId="a1",B(t,e),j(t,e,r,n.attributes,i),U(t,e,r,n.uniforms,i,!1),V(t,e,e,r)}function Y(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}B(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();e(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&I(t,c,r.context),r.needsFramebuffer&&D(t,c,r.framebuffer),F(t,c,r.state,i),r.profile&&i(r.profile)&&N(t,c,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?c(t.shared.vao,".setVAO(",r.drawVAO.append(t,c),");"):u(t.shared.vao,".setVAO(",r.drawVAO.append(t,u),");"):u(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(u(t.shared.vao,".setVAO(null);"),j(t,u,r,n.attributes,a),j(t,c,r,n.attributes,i)),U(t,u,r,n.uniforms,a,!1),U(t,c,r,n.uniforms,i,!0),V(t,u,c,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,c),l=c.def(n,".id"),u=c.def(e,"[",l,"]"),c(t.shared.gl,".useProgram(",n,".program);","if(!",u,"){",u,"=",e,"[",l,"]=",t.link(function(e){return H(W,t,r,e,2)}),"(",n,");}",u,".call(this,a0[",s,"],",s,");"))}function Z(t,e,r){var n=e.static[r];if(n&&function(t){if("object"==typeof t&&!h(t)){for(var e=Object.keys(t),r=0;r"+e+"?"+i+".constant["+e+"]:0;"}).join(""),"}}else{","if(",s,"(",i,".buffer)){",c,"=",a,".createStream(",34962,",",i,".buffer);","}else{",c,"=",a,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",c,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",a,".destroyStream(",c,");","}"),l})}),M),D.context=(P=u.static,O=u.dynamic,I={},Object.keys(P).forEach(function(t){var e=P[t];I[t]=L(function(t,r){return"number"==typeof e||"boolean"==typeof e?""+e:t.link(e)})}),Object.keys(O).forEach(function(t){var e=O[t];I[t]=C(e,function(t,r){return t.invoke(r,e)})}),I),D}(t,i,s,u,d);return v.shader.program&&(v.shader.program.attributes.sort(function(t,e){return t.namee;++e)tQ(O({framebuffer:t.framebuffer.faces[e]},t),K);else tQ(t,K)}else K(null,t)},prop:z.define.bind(null,1),context:z.define.bind(null,2),this:z.define.bind(null,3),draw:Z({}),buffer:function(t){return tB.create(t,34962,!1,!1)},elements:function(t){return tN.create(t,!1)},texture:tV.create2D,cube:tV.createCube,renderbuffer:tq.create,framebuffer:tH.create,framebufferCube:tH.createCube,vao:tj.createVAO,attributes:tM,frame:to,on:function(t,e){var r;switch(t){case"frame":return to(e);case"lost":r=tZ;break;case"restore":r=tK;break;case"destroy":r=tJ}return r.push(e),{cancel:function(){for(var t=0;t */var n=r(33576),i=n.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(t,e,r){if("number"==typeof t)throw TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return n.SlowBuffer(t)}},14500:function(t,e,r){"use strict";var n=r(53664),i=r(64348),a=r(39640)(),o=r(2304),s=n("%TypeError%"),l=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new s("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||l(e)!==e)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in t&&o){var c=o(t,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(u=!1)}return(n||u||!r)&&(a?i(t,"length",e,!0,!0):i(t,"length",e)),t}},29936:function(t,e,r){t.exports=i;var n=r(61252).EventEmitter;function i(){n.call(this)}r(6768)(i,n),i.Readable=r(12348),i.Writable=r(11288),i.Duplex=r(15316),i.Transform=r(22477),i.PassThrough=r(27136),i.finished=r(15932),i.pipeline=r(38180),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",a),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",l));var o=!1;function s(){o||(o=!0,t.end())}function l(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",l),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",u),t.on("error",u),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},92784:function(t){"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){function e(e,n,i){return t.call(this,"string"==typeof r?r:r(e,n,i))||this}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t,e}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(!Array.isArray(t))return"of ".concat(e," ").concat(String(t));var r=t.length;return(t=t.map(function(t){return String(t)}),r>2)?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}r("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(t,e,r){if("string"==typeof e&&(i="not ",e.substr(0,i.length)===i)?(l="must not be",e=e.replace(/^not /,"")):l="must be",a=" argument",(void 0===o||o>t.length)&&(o=t.length),t.substring(o-a.length,o)===a)u="The ".concat(t," ").concat(l," ").concat(n(e,"type"));else{var i,a,o,s,l,u,c=("number"!=typeof s&&(s=0),s+1>t.length||-1===t.indexOf(".",s))?"argument":"property";u='The "'.concat(t,'" ').concat(c," ").concat(l," ").concat(n(e,"type"))}return u+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.i=e},15316:function(t,e,r){"use strict";var n=r(4168),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var a=r(12348),o=r(11288);r(6768)(c,a);for(var s=i(o.prototype),l=0;l0){if("string"==typeof e||p.objectMode||Object.getPrototypeOf(e)===f.prototype||(u=e,e=f.from(u)),n)p.endEmitted?w(t,new _):S(t,p,e,!0);else if(p.ended)w(t,new x);else{if(p.destroyed)return!1;p.reading=!1,p.decoder&&!r?(e=p.decoder.write(e),p.objectMode||0!==e.length?S(t,p,e,!1):P(t,p)):S(t,p,e,!1)}}else n||(p.reading=!1,P(t,p))}return!p.ended&&(p.lengthe.highWaterMark){var r;e.highWaterMark=((r=t)>=1073741824?r=1073741824:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)}return t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0)}function L(t){var e=t._readableState;i("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(i("emitReadable",e.flowing),e.emittedReadable=!0,l.nextTick(C,t))}function C(t){var e=t._readableState;i("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,R(t)}function P(t,e){e.readingMore||(e.readingMore=!0,l.nextTick(O,t,e))}function O(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function z(t){i("readable nexttick read 0"),t.read(0)}function D(t,e){i("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),R(t),e.flowing&&!e.reading&&t.read(0)}function R(t){var e=t._readableState;for(i("flow",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){var r;return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r)}function B(t){var e=t._readableState;i("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,l.nextTick(N,e,t))}function N(t,e){if(i("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function j(t,e){for(var r=0,n=t.length;r=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?B(this):L(this),null;if(0===(t=E(t,r))&&r.ended)return 0===r.length&&B(this),null;var a=r.needReadable;return i("need readable",a),(0===r.length||r.length-t0?F(t,r):null)?(r.needReadable=r.length<=r.highWaterMark,t=0):(r.length-=t,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==t&&r.ended&&B(this)),null!==e&&this.emit("data",e),e},A.prototype._read=function(t){w(this,new b("_read()"))},A.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,e);var a=e&&!1===e.end||t===l.stdout||t===l.stderr?v:o;function o(){i("onend"),t.end()}n.endEmitted?l.nextTick(a):r.once("end",a),t.on("unpipe",function e(a,l){i("onunpipe"),a===r&&l&&!1===l.hasUnpiped&&(l.hasUnpiped=!0,i("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",s),t.removeListener("error",h),t.removeListener("unpipe",e),r.removeListener("end",o),r.removeListener("end",v),r.removeListener("data",f),c=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&s())});var s=function(){var t=r._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(r,"data")&&(t.flowing=!0,R(r))};t.on("drain",s);var c=!1;function f(e){i("ondata");var a=t.write(e);i("dest.write",a),!1===a&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==j(n.pipes,t))&&!c&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(e){i("onerror",e),v(),t.removeListener("error",h),0===u(t,"error")&&w(t,e)}function p(){t.removeListener("finish",d),v()}function d(){i("onfinish"),t.removeListener("close",p),v()}function v(){i("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",h),t.once("close",p),t.once("finish",d),t.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"!==t||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?L(this):n.reading||l.nextTick(z,this)),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var r=c.prototype.removeListener.call(this,t,e);return"readable"===t&&l.nextTick(I,this),r},A.prototype.removeAllListeners=function(t){var e=c.prototype.removeAllListeners.apply(this,arguments);return("readable"===t||void 0===t)&&l.nextTick(I,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(i("resume"),t.flowing=!t.readableListening,t.resumeScheduled||(t.resumeScheduled=!0,l.nextTick(D,this,t))),t.paused=!1,this},A.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var a in t.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(a){i("wrapped data"),r.decoder&&(a=r.decoder.write(a)),(!r.objectMode||null!=a)&&(r.objectMode||a&&a.length)&&(e.push(a)||(n=!0,t.pause()))}),t)void 0===this[a]&&"function"==typeof t[a]&&(this[a]=function(e){return function(){return t[e].apply(t,arguments)}}(a));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new v("_write()"))},A.prototype._writev=null,A.prototype.end=function(t,e,r){var n,i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||(n=r,i.ending=!0,P(this,i),n&&(i.finished?a.nextTick(n):this.once("finish",n)),i.ended=!0,this.writable=!1),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(t,e){e(t)}},60328:function(t,e,r){"use strict";var n,i=r(4168);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(15932),s=Symbol("lastResolve"),l=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),p=Symbol("stream");function d(t,e){return{value:t,done:e}}function v(t){var e=t[s];if(null!==e){var r=t[p].read();null!==r&&(t[f]=null,t[s]=null,t[l]=null,e(d(r,!1)))}}function g(t){i.nextTick(v,t)}var y=Object.getPrototypeOf(function(){}),m=Object.setPrototypeOf((a(n={get stream(){return this[p]},next:function(){var t,e,r=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[c])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise(function(t,e){i.nextTick(function(){r[u]?e(r[u]):t(d(void 0,!0))})});var a=this[f];if(a)e=new Promise((t=this,function(e,r){a.then(function(){if(t[c]){e(d(void 0,!0));return}t[h](e,r)},r)}));else{var o=this[p].read();if(null!==o)return Promise.resolve(d(o,!1));e=new Promise(this[h])}return this[f]=e,e}},Symbol.asyncIterator,function(){return this}),a(n,"return",function(){var t=this;return new Promise(function(e,r){t[p].destroy(null,function(t){if(t){r(t);return}e(d(void 0,!0))})})}),n),y);t.exports=function(t){var e,r=Object.create(m,(a(e={},p,{value:t,writable:!0}),a(e,s,{value:null,writable:!0}),a(e,l,{value:null,writable:!0}),a(e,u,{value:null,writable:!0}),a(e,c,{value:t._readableState.endEmitted,writable:!0}),a(e,h,{value:function(t,e){var n=r[p].read();n?(r[f]=null,r[s]=null,r[l]=null,t(d(n,!1))):(r[s]=t,r[l]=e)},writable:!0}),e));return r[f]=null,o(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[l];null!==e&&(r[f]=null,r[s]=null,r[l]=null,e(t)),r[u]=t;return}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[l]=null,n(d(void 0,!0))),r[c]=!0}),t.on("readable",g.bind(null,r)),r}},47264:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}var i=r(33576).Buffer,a=r(21576).inspect,o=a&&a.custom||"inspect";t.exports=function(){var t;function e(){(function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return t=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return i.alloc(0);for(var e,r,n=i.allocUnsafe(t>>>0),a=this.head,o=0;a;)e=a.data,r=o,i.prototype.copy.call(e,n,r),o+=a.data.length,a=a.next;return n}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=i.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var a=r.data,o=t>a.length?a.length:t;if(a.copy(e,e.length-t,0,o),0==(t-=o)){o===a.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=a.slice(o));break}++n}return this.length-=n,e}},{key:o,value:function(t,e){return a(this,function(t){for(var e=1;e0,u=s=function(t){e||(e=t),t&&p.forEach(l),g||(p.forEach(l),h(e))},f=!1,s=function(){f||(f=!0,u.apply(void 0,arguments))},d=!1,t.on("close",function(){d=!0}),void 0===n&&(n=r(15932)),n(t,{readable:g,writable:a},function(t){if(t)return s(t);d=!0,s()}),v=!1,function(e){if(!d&&!v){if(v=!0,t.setHeader&&"function"==typeof t.abort)return t.abort();if("function"==typeof t.destroy)return t.destroy();s(e||new o("pipe"))}}});return c.reduce(u)}},24888:function(t,e,r){"use strict";var n=r(92784).i.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var a=null!=e.highWaterMark?e.highWaterMark:i?e[r]:null;if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return t.objectMode?16:16384}}},4776:function(t,e,r){t.exports=r(61252).EventEmitter},86032:function(t,e,r){"use strict";var n=r(30456).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){var e;if(!t)return"utf8";for(;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=c,this.end=f,e=3;break;default:this.write=h,this.end=p;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if((192&e[0])!=128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((192&e[1])!=128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(192&e[2])!=128)return t.lastNeed=2,"�"}}(this,t,0);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length)}function l(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.o=a,a.prototype.write=function(t){var e,r;if(0===t.length)return"";if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},55619:function(t,e,r){var n=r(45408),a=r(86844)("stream-parser");function o(t){a("initializing parser stream"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,"function"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function s(t,e){n(!this._parserCallback,'there is already a "callback" set!'),n(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got "'+t+'"'),this._parserInit||o(this),a("buffering %o bytes",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function l(t,e){n(!this._parserCallback,'there is already a "callback" set!'),n(t>0,'can only skip > 0 bytes, got "'+t+'"'),this._parserInit||o(this),a("skipping %o bytes",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function u(t,e){n(!this._parserCallback,'There is already a "callback" set!'),n(t>0,'can only pass through > 0 bytes, got "'+t+'"'),this._parserInit||o(this),a("passing through %o bytes",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function c(t,e,r){this._parserInit||o(this),a("write(%o bytes)",t.length),"function"==typeof e&&(r=e),p(this,t,null,r)}function f(t,e,r){this._parserInit||o(this),a("transform(%o bytes)",t.length),"function"!=typeof e&&(e=this._parserOutput),p(this,t,e,r)}function h(t,e,r,n){if(t._parserBytesLeft-=e.length,a("%o bytes left for stream piece",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return n;var o=t._parserCallback;if(o&&0===t._parserState&&t._parserBuffers.length>1&&(e=i.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),o){var s=[];e&&s.push(e),r&&s.push(r);var l=o.length>s.length;l&&s.push(d(n));var u=o.apply(t,s);if(!l||n===u)return n}}t.exports=function(t){var e=t&&"function"==typeof t._transform,r=t&&"function"==typeof t._write;if(!e&&!r)throw Error("must pass a Writable or Transform stream in");a("extending Parser into stream"),t._bytes=s,t._skipBytes=l,e&&(t._passthrough=u),e?t._transform=f:t._write=c};var p=d(function t(e,r,n,i){return e._parserBytesLeft<=0?i(Error("got data but not currently parsing anything")):r.length<=e._parserBytesLeft?function(){return h(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return h(e,a,n,function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0})}});function d(t){return function(){for(var e=t.apply(this,arguments);"function"==typeof e;)e=e();return e}}},86844:function(t,e,r){var n=r(4168);function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t}(e=t.exports=r(89416)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),r){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(a=i))}),t.splice(a,0,n)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){return"undefined"!=typeof window&&!!window.process&&"renderer"===window.process.type||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())},89416:function(t,e,r){var n;function i(t){function r(){if(r.enabled){var t=+new Date,i=t-(n||t);r.diff=i,r.prev=n,r.curr=t,n=t;for(var a=Array(arguments.length),o=0;o0)return function(t){if(!((t=String(t)).length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"days":case"day":case"d":return 864e5*r;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*r;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(t);if("number"===n&&!1===isNaN(t))return r.long?e(t,864e5,"day")||e(t,36e5,"hour")||e(t,6e4,"minute")||e(t,1e3,"second")||t+" ms":t>=864e5?Math.round(t/864e5)+"d":t>=36e5?Math.round(t/36e5)+"h":t>=6e4?Math.round(t/6e4)+"m":t>=1e3?Math.round(t/1e3)+"s":t+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},39956:function(t,e,r){"use strict";var n=r(32868);t.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","“”","\xab\xbb"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map(function(t){return 1===t.length&&(t+=t),t}));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s0;){var p=t[e=u[u.length-1]];if(o[e]=0&&l[e].push(s[v])}o[e]=d}else{if(i[e]===n[e]){for(var g=[],y=[],m=0,d=r.length-1;d>=0;--d){var x=r[d];if(a[x]=!1,g.push(x),y.push(l[x]),m+=l[x].length,s[x]=f.length,x===e){r.length=d;break}}f.push(g);for(var b=Array(m),d=0;d1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)},l=function(t,e,r,n,a,o,l,u,c,f,h,p){var d=Math.pow(a,2),v=Math.pow(o,2),g=Math.pow(h,2),y=Math.pow(p,2),m=d*v-d*y-v*g;m<0&&(m=0),m/=d*y+v*g;var x=(m=Math.sqrt(m)*(l===u?-1:1))*a/o*p,b=-(m*o)/a*h,_=(h-x)/a,w=(p-b)/o,T=s(1,0,_,w),k=s(_,w,(-h-x)/a,(-p-b)/o);return 0===u&&k>0&&(k-=i),1===u&&k<0&&(k+=i),[f*x-c*b+(t+r)/2,c*x+f*b+(e+n)/2,T,k]};e.default=function(t){var e=t.px,r=t.py,s=t.cx,u=t.cy,c=t.rx,f=t.ry,h=t.xAxisRotation,p=void 0===h?0:h,d=t.largeArcFlag,v=t.sweepFlag,g=[];if(0===c||0===f)return[];var y=Math.sin(p*i/360),m=Math.cos(p*i/360),x=m*(e-s)/2+y*(r-u)/2,b=-y*(e-s)/2+m*(r-u)/2;if(0===x&&0===b)return[];var _=Math.pow(x,2)/Math.pow(c=Math.abs(c),2)+Math.pow(b,2)/Math.pow(f=Math.abs(f),2);_>1&&(c*=Math.sqrt(_),f*=Math.sqrt(_));var w=n(l(e,r,s,u,c,f,void 0===d?0:d,void 0===v?0:v,y,m,x,b),4),T=w[0],k=w[1],A=w[2],M=w[3],S=Math.abs(M)/(i/4);1e-7>Math.abs(1-S)&&(S=1);var E=Math.max(Math.ceil(S),1);M/=E;for(var L=0;Le[2]&&(e[2]=u[c+0]),u[c+1]>e[3]&&(e[3]=u[c+1]);return e}},41976:function(t,e,r){"use strict";t.exports=function(t){for(var e=[],r=0,o=0,s=0,l=0,u=null,c=null,f=0,h=0,p=0,d=t.length;p4?(r=v[v.length-4],o=v[v.length-3]):(r=f,o=h),e.push(v)}return e};var n=r(92848);function i(t,e,r,n){return["C",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},20472:function(t,e,r){"use strict";var n,i=r(74840),a=r(21984),o=r(22235),s=r(53520),l=r(29620),u=document.createElement("canvas"),c=u.getContext("2d");t.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");e||(e={}),e.shape?(r=e.shape[0],f=e.shape[1]):(r=u.width=e.w||e.width||200,f=u.height=e.h||e.height||200);var r,f,h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),v=[r/(d[2]-d[0]),f/(d[3]-d[1])],g=Math.min(v[0]||0,v[1]||0)/2;if(c.fillStyle="black",c.fillRect(0,0,r,f),c.fillStyle="white",p&&("number"!=typeof p&&(p=1),p>0?c.strokeStyle="white":c.strokeStyle="black",c.lineWidth=Math.abs(p)),c.translate(.5*r,.5*f),c.scale(g,g),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var y=new Path2D(t);c.fill(y),p&&c.stroke(y)}else o(c,a(t)),c.fill(),p&&c.stroke();return c.setTransform(1,0,0,1,0,0),l(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},49760:function(t,e,r){var n;!function(i){var a,o,s,l=/^\s+/,u=/\s+$/,c=0,f=i.round,h=i.min,p=i.max,d=i.random;function v(t,e){if(e=e||{},(t=t||"")instanceof v)return t;if(!(this instanceof v))return new v(t,e);var r,n,a,o,s,d,g,y,m,x,b,_,w,T,k,A,M,S,E,L,C=(n={r:0,g:0,b:0},a=1,o=null,s=null,d=null,g=!1,y=!1,"string"==typeof(r=t)&&(r=function(t){t=t.replace(l,"").replace(u,"").toLowerCase();var e,r=!1;if(I[t])t=I[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=V.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=V.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=V.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=V.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=V.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=V.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=V.hex8.exec(t))?{r:B(e[1]),g:B(e[2]),b:B(e[3]),a:B(e[4])/255,format:r?"name":"hex8"}:(e=V.hex6.exec(t))?{r:B(e[1]),g:B(e[2]),b:B(e[3]),format:r?"name":"hex"}:(e=V.hex4.exec(t))?{r:B(e[1]+""+e[1]),g:B(e[2]+""+e[2]),b:B(e[3]+""+e[3]),a:B(e[4]+""+e[4])/255,format:r?"name":"hex8"}:!!(e=V.hex3.exec(t))&&{r:B(e[1]+""+e[1]),g:B(e[2]+""+e[2]),b:B(e[3]+""+e[3]),format:r?"name":"hex"}}(r)),"object"==typeof r&&(q(r.r)&&q(r.g)&&q(r.b)?(m=r.r,x=r.g,b=r.b,n={r:255*R(m,255),g:255*R(x,255),b:255*R(b,255)},g=!0,y="%"===String(r.r).substr(-1)?"prgb":"rgb"):q(r.h)&&q(r.s)&&q(r.v)?(o=j(r.s),s=j(r.v),_=r.h,w=o,T=s,_=6*R(_,360),w=R(w,100),T=R(T,100),k=i.floor(_),A=_-k,M=T*(1-w),S=T*(1-A*w),E=T*(1-(1-A)*w),n={r:255*[T,S,M,M,E,T][L=k%6],g:255*[E,T,T,S,M,M][L],b:255*[M,M,E,T,T,S][L]},g=!0,y="hsv"):q(r.h)&&q(r.s)&&q(r.l)&&(o=j(r.s),d=j(r.l),n=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+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=R(t,360),e=R(e,100),r=R(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}}(r.h,o,d),g=!0,y="hsl"),r.hasOwnProperty("a")&&(a=r.a)),a=D(a),{ok:g,format:r.format||y,r:h(255,p(n.r,0)),g:h(255,p(n.g,0)),b:h(255,p(n.b,0)),a:a});this._originalInput=t,this._r=C.r,this._g=C.g,this._b=C.b,this._a=C.a,this._roundA=f(100*this._a)/100,this._format=e.format||C.format,this._gradientType=e.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=C.ok,this._tc_id=c++}function g(t,e,r){var n,i,a=p(t=R(t,255),e=R(e,255),r=R(r,255)),o=h(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>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(v(n));return a}function O(t,e){e=e||6;for(var r=v(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(v({h:n,s:i,v:a})),a=(a+s)%1;return o}v.prototype={isDark:function(){return 128>this.getBrightness()},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=D(t),this._roundA=f(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=f(360*t.h),r=f(100*t.s),n=f(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=g(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=g(this._r,this._g,this._b),e=f(360*t.h),r=f(100*t.s),n=f(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){var e,r,n,i,a;return e=this._r,r=this._g,n=this._b,i=this._a,a=[N(f(e).toString(16)),N(f(r).toString(16)),N(f(n).toString(16)),N(U(i))],t&&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("")},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+f(this._r)+", "+f(this._g)+", "+f(this._b)+")":"rgba("+f(this._r)+", "+f(this._g)+", "+f(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:f(100*R(this._r,255))+"%",g:f(100*R(this._g,255))+"%",b:f(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+f(100*R(this._r,255))+"%, "+f(100*R(this._g,255))+"%, "+f(100*R(this._b,255))+"%)":"rgba("+f(100*R(this._r,255))+"%, "+f(100*R(this._g,255))+"%, "+f(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(z[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+x(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=v(t);r="#"+x(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)?"name"===t&&0===this._a?this.toName():this.toRgbString():("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())},clone:function(){return v(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(T,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(w,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(C,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(L,arguments)}},v.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&("a"===n?r[n]=t[n]:r[n]=j(t[n]));t=r}return v(t,e)},v.equals=function(t,e){return!!t&&!!e&&v(t).toRgbString()==v(e).toRgbString()},v.random=function(){return v.fromRatio({r:d(),g:d(),b:d()})},v.mix=function(t,e,r){r=0===r?0:r||50;var n=v(t).toRgb(),i=v(e).toRgb(),a=r/100;return v({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})},v.readability=function(t,e){var r=v(t),n=v(e);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},v.isReadable=function(t,e,r){var n,i,a,o,s,l=v.readability(t,e);switch(s=!1,(i=((n=(n=r)||{level:"AA",size:"small"}).level||"AA").toUpperCase(),a=(n.size||"small").toLowerCase(),"AA"!==i&&"AAA"!==i&&(i="AA"),"small"!==a&&"large"!==a&&(a="small"),o={level:i,size:a}).level+o.size){case"AAsmall":case"AAAlarge":s=l>=4.5;break;case"AAlarge":s=l>=3;break;case"AAAsmall":s=l>=7}return s},v.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;ul&&(l=n,s=v(e[u]));return v.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,v.mostReadable(t,["#fff","#000"],r))};var I=v.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"},z=v.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(I);function D(t){return(isNaN(t=parseFloat(t))||t<0||t>1)&&(t=1),t}function R(t,e){"string"==typeof(r=t)&&-1!=r.indexOf(".")&&1===parseFloat(r)&&(t="100%");var r,n,a="string"==typeof(n=t)&&-1!=n.indexOf("%");return(t=h(e,p(0,parseFloat(t))),a&&(t=parseInt(t*e,10)/100),1e-6>i.abs(t-e))?1:t%e/parseFloat(e)}function F(t){return h(1,p(0,t))}function B(t){return parseInt(t,16)}function N(t){return 1==t.length?"0"+t:""+t}function j(t){return t<=1&&(t=100*t+"%"),t}function U(t){return i.round(255*parseFloat(t)).toString(16)}var V=(o="[\\s|\\(]+("+(a="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+a+")[,|\\s]+("+a+")\\s*\\)?",s="[\\s|\\(]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")[,|\\s]+("+a+")\\s*\\)?",{CSS_UNIT:new RegExp(a),rgb:RegExp("rgb"+o),rgba:RegExp("rgba"+s),hsl:RegExp("hsl"+o),hsla:RegExp("hsla"+s),hsv:RegExp("hsv"+o),hsva:RegExp("hsva"+s),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 q(t){return!!V.CSS_UNIT.exec(t)}t.exports?t.exports=v:void 0!==(n=(function(){return v}).call(e,r,e,t))&&(t.exports=n)}(Math)},37816:function(t){"use strict";t.exports=r,t.exports.float32=t.exports.float=r,t.exports.fract32=t.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=r(t));for(var n=0,i=e.length;n":(e.length>100&&(e=e.slice(0,99)+"…"),e=e.replace(i,function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("Unexpected character")}}))}},7328:function(t,e,r){"use strict";var n=r(81680),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},87396:function(t,e,r){"use strict";var n=r(57980),i=r(85488);t.exports=function(t){return i(t)?t:n(t,"%v is not a plain function",arguments[1])}},85488:function(t,e,r){"use strict";var n=r(73384),i=/^\s*class[\s{/}]/,a=Function.prototype.toString;t.exports=function(t){return!(!n(t)||i.test(a.call(t)))}},54612:function(t,e,r){"use strict";var n=r(7328);t.exports=function(t){if(!n(t))return!1;try{if(!t.constructor)return!1;return t.constructor.prototype===t}catch(t){return!1}}},33940:function(t,e,r){"use strict";var n=r(81680),i=r(7328),a=Object.prototype.toString;t.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if("function"!=typeof e||e===a)return null}try{return""+t}catch(t){return null}}},18496:function(t,e,r){"use strict";var n=r(57980),i=r(81680);t.exports=function(t){return i(t)?t:n(t,"Cannot use %v",arguments[1])}},81680:function(t){"use strict";var e=void 0;t.exports=function(t){return t!==e&&null!==t}},14144:function(t,e,r){"use strict";var n=r(308),i=r(10352),a=r(33576).Buffer;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,u=r.g.__TYPEDARRAY_POOL;u.UINT8C||(u.UINT8C=i([32,0])),u.BIGUINT64||(u.BIGUINT64=i([32,0])),u.BIGINT64||(u.BIGINT64=i([32,0])),u.BUFFER||(u.BUFFER=i([32,0]));var c=u.DATA,f=u.BUFFER;function h(t){if(t){var e=t.length||t.byteLength;c[n.log2(e)].push(t)}}function p(t){var t=n.nextPow2(t),e=c[n.log2(t)];return e.length>0?e.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function v(t){return new Uint16Array(p(2*t),0,t)}function g(t){return new Uint32Array(p(4*t),0,t)}function y(t){return new Int8Array(p(t),0,t)}function m(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=f[n.log2(t)];return e.length>0?e.pop():new a(t)}e.free=function(t){if(a.isBuffer(t))f[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength;c[0|n.log2(e)].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){h(t.buffer)},e.freeArrayBuffer=h,e.freeBuffer=function(t){f[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return p(t);switch(e){case"uint8":return d(t);case"uint16":return v(t);case"uint32":return g(t);case"int8":return y(t);case"int16":return m(t);case"int32":return x(t);case"float":case"float32":return b(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return k(t);case"biguint64":return T(t);case"buffer":return M(t);case"data":case"dataview":return A(t)}return null},e.mallocArrayBuffer=p,e.mallocUint8=d,e.mallocUint16=v,e.mallocUint32=g,e.mallocInt8=y,e.mallocInt16=m,e.mallocInt32=x,e.mallocFloat32=e.mallocFloat=b,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=T,e.mallocBigInt64=k,e.mallocDataView=A,e.mallocBuffer=M,e.clearCache=function(){for(var t=0;t<32;++t)u.UINT8[t].length=0,u.UINT16[t].length=0,u.UINT32[t].length=0,u.INT8[t].length=0,u.INT16[t].length=0,u.INT32[t].length=0,u.FLOAT[t].length=0,u.DOUBLE[t].length=0,u.BIGUINT64[t].length=0,u.BIGINT64[t].length=0,u.UINT8C[t].length=0,c[t].length=0,f[t].length=0}},92384:function(t){var e=/[\'\"]/;t.exports=function(t){return t?(e.test(t.charAt(0))&&(t=t.substr(1)),e.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}},45223:function(t){"use strict";t.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),h(n,t,n.depth)}function c(t,e){var r=u.styles[e];return r?"\x1b["+u.colors[r][0]+"m"+t+"\x1b["+u.colors[r][1]+"m":t}function f(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,a,o,s,l,u=r.inspect(n,t);return x(u)||(u=h(t,u,n)),u}var c=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(x(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}(t,r);if(c)return c;var f=Object.keys(r),w=(s={},f.forEach(function(t,e){s[t]=!0}),s);if(t.showHidden&&(f=Object.getOwnPropertyNames(r)),k(r)&&(f.indexOf("message")>=0||f.indexOf("description")>=0))return p(r);if(0===f.length){if(A(r)){var M=r.name?": "+r.name:"";return t.stylize("[Function"+M+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(T(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return p(r)}var S="",E=!1,C=["{","}"];return(v(r)&&(E=!0,C=["[","]"]),A(r)&&(S=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(S=" "+RegExp.prototype.toString.call(r)),T(r)&&(S=" "+Date.prototype.toUTCString.call(r)),k(r)&&(S=" "+p(r)),0!==f.length||E&&0!=r.length)?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),l=E?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o=0&&o++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?a[0]+(""===i?"":i+"\n ")+" "+l.join(",\n ")+" "+a[1]:a[0]+i+" "+l.join(", ")+" "+a[1]):C[0]+S+C[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),L(n,i)||(o="["+i+"]"),!s&&(0>t.seen.indexOf(l.value)?(s=y(r)?h(t,l.value,null):h(t,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").slice(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),b(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function v(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function y(t){return null===t}function m(t){return"number"==typeof t}function x(t){return"string"==typeof t}function b(t){return void 0===t}function _(t){return w(t)&&"[object RegExp]"===M(t)}function w(t){return"object"==typeof t&&null!==t}function T(t){return w(t)&&"[object Date]"===M(t)}function k(t){return w(t)&&("[object Error]"===M(t)||t instanceof Error)}function A(t){return"function"==typeof t}function M(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(!o[t=t.toUpperCase()]){if(s.test(t)){var r=n.pid;o[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else o[t]=function(){}}return o[t]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(41088),e.isArray=v,e.isBoolean=g,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=x,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=_,e.types.isRegExp=_,e.isObject=w,e.isDate=T,e.types.isDate=T,e.isError=k,e.types.isNativeError=k,e.isFunction=A,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(75272);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[S((t=new Date).getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":"),[t.getDate(),E[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(6768),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var C="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(t,e){if(!t){var r=Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw TypeError('The "original" argument must be of type Function');if(C&&t[C]){var e=t[C];if("function"!=typeof e)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,C,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise(function(t,n){e=t,r=n}),i=[],a=0;a-1?e:"Object"===e&&y(t)}return s?g(t):null}},67020:function(t,e,r){var n=r(38700),i=r(50896),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>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=h[this._validateYear(t,n.local.invalidyear)-h[0]];return(i=a.newDate(o>>9&4095,o>>5&15,31&o)).add(4-(i.dayOfWeek()||7),"d"),1+Math.floor((this.toJD(t,e,r)-i.toJD())/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year());var r=f[(t=this._validateYear(t))-f[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 6>(this.dayOfWeek(t,e,r)||7)},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){if("object"==typeof t)l=t,s=e||{};else{var a,o,s,l,u;if(!("number"==typeof t&&t>=1888&&t<=2111))throw Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw Error("Lunar day outside range 1 - 30");"object"==typeof n?(u=!1,s=n):(u=!!n,s={}),l={year:t,month:e,day:r,isIntercalary:u}}a=l.day-1;var c=f[l.year-f[0]],p=c>>13;o=p?l.month>p?l.month:l.isIntercalary?l.month:l.month-1:l.month-1;for(var d=0;d>9&4095,(v>>5&15)-1,(31&v)+a);return s.year=g.getFullYear(),s.month=1+g.getMonth(),s.day=g.getDate(),s}(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){if("object"==typeof t)i=t,a=e||{};else{var i,a,o,s;if(!("number"==typeof t&&t>=1888&&t<=2111))throw Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a={}}var l=h[i.year-h[0]],u=i.year<<9|i.month<<5|i.day;a.year=u>=l?i.year:i.year-1;var c=new Date((l=h[a.year-h[0]])>>9&4095,(l>>5&15)-1,31&l);o=Math.round((new Date(i.year,i.month-1,i.day)-c)/864e5);var p=f[a.year-f[0]];for(s=0;s<13;s++){var d=p&1<<12-s?30:29;if(o>13;return!v||se.year()?1:0);return t%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 6>(this.dayOfWeek(t,e,r)||7)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+(i.month()-1)*30+(t-1)*365+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--;var n=Math.floor((e=Math.floor(t)+.5-this.newDate(r,1,1).toJD())/30)+1,i=e-(n-1)*30+1;return this.newDate(r,n,i)}}),n.calendars.coptic=a},55668:function(t,e,r){var n=r(38700),i=r(50896);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){return{century:o[Math.floor((this._validate(t,e,r,n.local.invalidDate).year()-1)/100)+1]||""}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(0>i.year()?1:0),e=i.month(),(r=i.day())+(e>1?16:0)+(e>2?(e-2)*32:0)+(t-1)*400+this.jdEpoch-1},fromJD:function(t){var e=Math.floor((t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1)/400)+1;t-=(e-1)*400;var r=Math.floor((t+=t>15?16:0)/32)+1,n=t-(r-1)*32+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=a},65168:function(t,e,r){var n=r(38700),i=r(50896);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),t=e.year()+(0>e.year()?1:0);return t%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 6>(this.dayOfWeek(t,e,r)||7)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+(i.month()-1)*30+(t-1)*365+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--;var n=Math.floor((e=Math.floor(t)+.5-this.newDate(r,1,1).toJD())/30)+1,i=e-(n-1)*30+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},2084:function(t,e,r){var n=r(38700),i=r(50896);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 7>o(7*(t=t<0?t+1:t)+1,19)},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)?30: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(var s=1;so(3*(r+1),7)&&r++,r},_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){for(var e=Math.floor(((t=Math.floor(t)+.5)-this.jdEpoch)*98496/35975351)-1;t>=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.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},26368:function(t,e,r){var n=r(38700),i=r(50896);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(),(r=i.day())+Math.ceil(29.5*(e-1))+((t=t<=0?t+1:t)-1)*354+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor((30*((t=Math.floor(t)+.5)-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},24747:function(t,e,r){var n=r(38700),i=r(50896);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),t=0>e.year()?e.year()+1:e.year();return t%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 6>(this.dayOfWeek(t,e,r)||7)},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);return o<=0&&o--,this.newDate(o,a,e-n-Math.floor(30.6001*i))}}),n.calendars.julian=a},65616:function(t,e,r){var n=r(38700),i=r(50896);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:"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){var e=Math.floor((t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year())/400);return t%=400,e+"."+Math.floor((t+=t<0?400:0)/20)+"."+t%20},forYear:function(t){if((t=t.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||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((t-=this.jdEpoch)+8+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[o((t-=this.jdEpoch)+20-1,20)+1,o(t+4-1,13)+1]},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){var e=Math.floor((t=Math.floor(t)+.5-this.jdEpoch)/360);t%=360;var r=Math.floor((t+=t<0?360:0)/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},30632:function(t,e,r){var n=r(38700),i=r(50896);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()+(1>e.year()?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 6>(this.dayOfWeek(t,e,r)||7)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth),t=i.year();t<0&&t++;for(var a=i.day(),s=1;s=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},73040:function(t,e,r){var n=r(38700),i=r(50896);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;r0?474:473))%2820+474+38)*682%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?(e-1)*31:(e-1)*30+6)+Math.floor((682*s-110)/2816)+(s-1)*365+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);i=Math.floor((2134*a+2816*o(n,366)+2815)/1028522)+a+1}var s=i+2820*r+474;s=s<=0?s-1:s;var l=t-this.toJD(s,1,1)+1,u=l<=186?Math.ceil(l/31):Math.ceil((l-6)/30),c=t-this.toJD(s,u,1)+1;return this.newDate(s,u,c)}}),n.calendars.persian=a,n.calendars.jalali=a},51456:function(t,e,r){var n=r(38700),i=r(50896),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),t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),t=this._t2gYear(i.year());return 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 6>(this.dayOfWeek(t,e,r)||7)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),t=this._t2gYear(i.year());return 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(38700),i=r(50896),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),t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),t=this._t2gYear(i.year());return 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 6>(this.dayOfWeek(t,e,r)||7)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),t=this._t2gYear(i.year());return 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},45348:function(t,e,r){var n=r(38700),i=r(50896);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;ar)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;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=e-o[r-1]+1;return this.newDate(a+1,i-12*a,s)},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]},38700:function(t,e,r){var n=r(50896);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 t=""+t,"000000".substring(0,e-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(0>this.year()?"-":"")+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 0>this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()?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(0>e.year()?"-":"")+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(;oe-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];e=this._add(t,r*i[0]+(r<0?-1:1)*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.minDay&&r-this.minDaye.year()?1:0);return t%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 6>(this.dayOfWeek(t,e,r)||7)},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);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r+(2-i+Math.floor(i/4))-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=Math.floor((e-1867216.25)/36524.25),n=(r=e+1+r-Math.floor(r/4))+1524,i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=o-(o>13.5?13:1),l=i-(s>2.5?4716:4715);return l<=0&&l--,this.newDate(l,s,n-a-Math.floor(30.6001*o))},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},15168:function(t,e,r){var n=r(50896),i=r(38700);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;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,f=r.monthNames||this.local.monthNames;r.calculateWeek||this.local.calculateWeek;for(var h=function(e,r){for(var n=1;m+n1},p=function(t,e,r,n){var i=""+e;if(h(t,n))for(;i.length1},x=function(t,r){var n=m(t,r),a=RegExp("^-?\\d{1,"+[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1]+"}"),o=e.substring(T).match(a);if(!o)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=o[0].length,parseInt(o[0],10)},b=this,_=function(t,r,n,a){for(var o=m(t,a)?n:r,s=0;s-1){p=1,d=v;for(var M=this.daysInMonth(h,p);d>M;M=this.daysInMonth(h,p))p++,d-=M}return f>-1?this.fromJD(f):this.newDate(h,p,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,t=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)}})},21576:function(){},19768:function(){},63436:function(t,e,r){"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;es&&(o=e.slice(s,o),u[l]?u[l]+=o:u[++l]=o),(i=i[0])===(a=a[0])?u[l]?u[l]+=a:u[++l]=a:(u[++l]=null,c.push({i:l,x:j(i,a)})),s=q.lastIndex;return s>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?_(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?_(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=c.exec(t))?new T(e[1],e[2],e[3],1):(e=f.exec(t))?new T(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?_(e[1],e[2],e[3],e[4]):(e=p.exec(t))?_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=d.exec(t))?L(e[1],e[2]/100,e[3]/100,1):(e=v.exec(t))?L(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?b(g[t]):"transparent"===t?new T(NaN,NaN,NaN,0):null}function b(t){return new T(t>>16&255,t>>8&255,255&t,1)}function _(t,e,r,n){return n<=0&&(t=e=r=NaN),new T(t,e,r,n)}function w(t,e,r,n){var i;return 1==arguments.length?((i=t)instanceof a||(i=x(i)),i)?new T((i=i.rgb()).r,i.g,i.b,i.opacity):new T:new T(t,e,r,null==n?1:n)}function T(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function k(){return"#".concat(E(this.r)).concat(E(this.g)).concat(E(this.b))}function A(){var t=M(this.opacity);return"".concat(1===t?"rgb(":"rgba(").concat(S(this.r),", ").concat(S(this.g),", ").concat(S(this.b)).concat(1===t?")":", ".concat(t,")"))}function M(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function S(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function E(t){return((t=S(t))<16?"0":"")+t.toString(16)}function L(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new P(t,e,r,n)}function C(t){if(t instanceof P)return new P(t.h,t.s,t.l,t.opacity);if(t instanceof a||(t=x(t)),!t)return new P;if(t instanceof P)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=NaN,l=o-i,u=(o+i)/2;return l?(s=e===o?(r-n)/l+(r0&&u<1?0:s,new P(s,l,u,t.opacity)}function P(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function O(t){return(t=(t||0)%360)<0?t+360:t}function I(t){return Math.max(0,Math.min(1,t||0))}function z(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function D(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}n(a,x,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:y,formatHex:y,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return C(this).formatHsl()},formatRgb:m,toString:m}),n(T,w,i(a,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new T(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new T(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new T(S(this.r),S(this.g),S(this.b),M(this.opacity))},displayable:function(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:k,formatHex:k,formatHex8:function(){return"#".concat(E(this.r)).concat(E(this.g)).concat(E(this.b)).concat(E((isNaN(this.opacity)?1:this.opacity)*255))},formatRgb:A,toString:A})),n(P,function(t,e,r,n){return 1==arguments.length?C(t):new P(t,e,r,null==n?1:n)},i(a,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new P(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new P(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new T(z(t>=240?t-240:t+120,i,n),z(t,i,n),z(t<120?t+240:t-120,i,n),this.opacity)},clamp:function(){return new P(O(this.h),I(this.s),I(this.l),M(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=M(this.opacity);return"".concat(1===t?"hsl(":"hsla(").concat(O(this.h),", ").concat(100*I(this.s),"%, ").concat(100*I(this.l),"%").concat(1===t?")":", ".concat(t,")"))}}));var R=function(t){return function(){return t}};function F(t,e){var r=e-t;return r?function(e){return t+e*r}:R(isNaN(t)?e:t)}var B=function t(e){var r,n=1==(r=+(r=e))?F:function(t,e){var n,i,a;return e-t?(n=t,i=e,n=Math.pow(n,a=r),i=Math.pow(i,a)-n,a=1/a,function(t){return Math.pow(n+t*i,a)}):R(isNaN(t)?e:t)};function i(t,e){var r=n((t=w(t)).r,(e=w(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=F(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function N(t){return function(e){var r,n,i=e.length,a=Array(i),o=Array(i),s=Array(i);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],o=n>0?t[n-1]:2*i-a,s=n