MCPcopy Index your code
hub / github.com/plotly/plotly.py / ve

Function ve

plotly/package_data/plotly.min.js:3214–3214  ·  view source on GitHub ↗
(Y,D,J,O)

Source from the content-addressed store, hash-verified

3212`}),{fragmentSource:Y,vertexSource:D,staticAttributes:O,staticUniforms:ne}}var wf=Object.freeze({__proto__:null,prelude:js,background:Eu,backgroundPattern:Dc,circle:ks,clippingMask:bc,heatmap:hu,heatmapTexture:_u,collisionBox:nl,collisionCircle:nh,debug:Mh,fill:zu,fillOutline:Fc,fillOutlinePattern:wc,fillPattern:bd,fillExtrusion:xf,fillExtrusionPattern:Pf,hillshadePrepare:qu,hillshade:bf,line:jl,lineGradient:uf,linePattern:Xh,lineSDF:If,raster:Cs,symbolIcon:du,symbolSDF:ku,symbolTextAndIcon:Xf}),zc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};zc.prototype.bind=function(D,J,O,K,de,ne,we,Oe){this.context=D;for(var ht=this.boundPaintVertexBuffers.length!==K.length,Yt=0;!ht&&Yt<K.length;Yt++)this.boundPaintVertexBuffers[Yt]!==K[Yt]&&(ht=!0);var cr=!this.vao||this.boundProgram!==J||this.boundLayoutVertexBuffer!==O||ht||this.boundIndexBuffer!==de||this.boundVertexOffset!==ne||this.boundDynamicVertexBuffer!==we||this.boundDynamicVertexBuffer2!==Oe;!D.extVertexArrayObject||cr?this.freshBind(J,O,K,de,ne,we,Oe):(D.bindVertexArrayOES.set(this.vao),we&&we.bind(),de&&de.dynamicDraw&&de.bind(),Oe&&Oe.bind())},zc.prototype.freshBind=function(D,J,O,K,de,ne,we){var Oe,ht=D.numAttributes,Yt=this.context,cr=Yt.gl;if(Yt.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Yt.extVertexArrayObject.createVertexArrayOES(),Yt.bindVertexArrayOES.set(this.vao),Oe=0,this.boundProgram=D,this.boundLayoutVertexBuffer=J,this.boundPaintVertexBuffers=O,this.boundIndexBuffer=K,this.boundVertexOffset=de,this.boundDynamicVertexBuffer=ne,this.boundDynamicVertexBuffer2=we;else{Oe=Yt.currentNumAttributes||0;for(var Nt=ht;Nt<Oe;Nt++)cr.disableVertexAttribArray(Nt)}J.enableAttributes(cr,D);for(var Ne=0,$e=O;Ne<$e.length;Ne+=1){var st=$e[Ne];st.enableAttributes(cr,D)}ne&&ne.enableAttributes(cr,D),we&&we.enableAttributes(cr,D),J.bind(),J.setVertexAttribPointers(cr,D,de);for(var It=0,Bt=O;It<Bt.length;It+=1){var Ft=Bt[It];Ft.bind(),Ft.setVertexAttribPointers(cr,D,de)}ne&&(ne.bind(),ne.setVertexAttribPointers(cr,D,de)),K&&K.bind(),we&&(we.bind(),we.setVertexAttribPointers(cr,D,de)),Yt.currentNumAttributes=ht},zc.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Wu(Y){for(var D=[],J=0;J<Y.length;J++)if(Y[J]!==null){var O=Y[J].split(" ");D.push(O.pop())}return D}var Rf=function(D,J,O,K,de,ne){var we=D.gl;this.program=we.createProgram();for(var Oe=Wu(O.staticAttributes),ht=K?K.getBinderAttributes():[],Yt=Oe.concat(ht),cr=O.staticUniforms?Wu(O.staticUniforms):[],Nt=K?K.getBinderUniforms():[],Ne=cr.concat(Nt),$e=[],st=0,It=Ne;st<It.length;st+=1){var Bt=It[st];$e.indexOf(Bt)<0&&$e.push(Bt)}var Ft=K?K.defines():[];ne&&Ft.push("#define OVERDRAW_INSPECTOR;");var Ut=Ft.concat(js.fragmentSource,O.fragmentSource).join(`
3213`),zt=Ft.concat(js.vertexSource,O.vertexSource).join(`
3214`),_t=we.createShader(we.FRAGMENT_SHADER);if(we.isContextLost()){this.failedToCreate=!0;return}we.shaderSource(_t,Ut),we.compileShader(_t),we.attachShader(this.program,_t);var Dt=we.createShader(we.VERTEX_SHADER);if(we.isContextLost()){this.failedToCreate=!0;return}we.shaderSource(Dt,zt),we.compileShader(Dt),we.attachShader(this.program,Dt),this.attributes={};var vt={};this.numAttributes=Yt.length;for(var lr=0;lr<this.numAttributes;lr++)Yt[lr]&&(we.bindAttribLocation(this.program,lr,Yt[lr]),this.attributes[Yt[lr]]=lr);we.linkProgram(this.program),we.deleteShader(Dt),we.deleteShader(_t);for(var _r=0;_r<$e.length;_r++){var Br=$e[_r];if(Br&&!vt[Br]){var Di=we.getUniformLocation(this.program,Br);Di&&(vt[Br]=Di)}}this.fixedUniforms=de(D,vt),this.binderUniforms=K?K.getUniforms(D,vt):[]};Rf.prototype.draw=function(D,J,O,K,de,ne,we,Oe,ht,Yt,cr,Nt,Ne,$e,st,It){var Bt,Ft=D.gl;if(!this.failedToCreate){D.program.set(this.program),D.setDepthMode(O),D.setStencilMode(K),D.setColorMode(de),D.setCullFace(ne);for(var Ut in this.fixedUniforms)this.fixedUniforms[Ut].set(we[Ut]);$e&&$e.setUniforms(D,this.binderUniforms,Nt,{zoom:Ne});for(var zt=(Bt={},Bt[Ft.LINES]=2,Bt[Ft.TRIANGLES]=3,Bt[Ft.LINE_STRIP]=1,Bt)[J],_t=0,Dt=cr.get();_t<Dt.length;_t+=1){var vt=Dt[_t],lr=vt.vaos||(vt.vaos={}),_r=lr[Oe]||(lr[Oe]=new zc);_r.bind(D,this,ht,$e?$e.getPaintVertexBuffers():[],Yt,vt.vertexOffset,st,It),Ft.drawElements(J,vt.primitiveLength*zt,Ft.UNSIGNED_SHORT,vt.primitiveOffset*zt*2)}}};function Xu(Y,D,J){var O=1/As(J,1,D.transform.tileZoom),K=Math.pow(2,J.tileID.overscaledZ),de=J.tileSize*Math.pow(2,D.transform.tileZoom)/K,ne=de*(J.tileID.canonical.x+J.tileID.wrap*K),we=de*J.tileID.canonical.y;return{u_image:0,u_texsize:J.imageAtlasTexture.size,u_scale:[O,Y.fromScale,Y.toScale],u_fade:Y.t,u_pixel_coord_upper:[ne>>16,we>>16],u_pixel_coord_lower:[ne&65535,we&65535]}}function cf(Y,D,J,O){var K=J.imageManager.getPattern(Y.from.toString()),de=J.imageManager.getPattern(Y.to.toString()),ne=J.imageManager.getPixelSize(),we=ne.width,Oe=ne.height,ht=Math.pow(2,O.tileID.overscaledZ),Yt=O.tileSize*Math.pow(2,J.transform.tileZoom)/ht,cr=Yt*(O.tileID.canonical.x+O.tileID.wrap*ht),Nt=Yt*O.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:K.tl,u_pattern_br_a:K.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[we,Oe],u_mix:D.t,u_pattern_size_a:K.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:D.fromScale,u_scale_b:D.toScale,u_tile_units_to_pixels:1/As(O,1,J.transform.tileZoom),u_pixel_coord_upper:[cr>>16,Nt>>16],u_pixel_coord_lower:[cr&65535,Nt&65535]}}var Zf=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},Wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,D.u_height_factor),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},ah=function(Y,D,J,O){var K=D.style.light,de=K.properties.get("position"),ne=[de.x,de.y,de.z],we=i.create$1();K.properties.get("anchor")==="viewport"&&i.fromRotation(we,-D.transform.angle),i.transformMat3(ne,ne,we);var Oe=K.properties.get("color");return{u_matrix:Y,u_lightpos:ne,u_lightintensity:K.properties.get("intensity"),u_lightcolor:[Oe.r,Oe.g,Oe.b],u_vertical_gradient:+J,u_opacity:O}},Zu=function(Y,D,J,O,K,de,ne){return i.extend(ah(Y,D,J,O),Xu(de,D,ne),{u_height_factor:-Math.pow(2,K.overscaledZ)/ne.tileSize/8})},qc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Tc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world)}},vu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},Oc=function(Y){return{u_matrix:Y}},ff=function(Y,D,J,O){return i.extend(Oc(Y),Xu(J,D,O))},fc=function(Y,D){return{u_matrix:Y,u_world:D}},Bc=function(Y,D,J,O,K){return i.extend(ff(Y,D,J,O),{u_world:K})},kt=function(Y,D){return{u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,D.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Zt=function(Y,D,J,O){var K=Y.transform,de,ne;if(O.paint.get("circle-pitch-alignment")==="map"){var we=As(J,1,K.zoom);de=!0,ne=[we,we]}else de=!1,ne=K.pixelsToGLUnits;return{u_camera_to_center_distance:K.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(D.posMatrix,J,O.paint.get("circle-translate"),O.paint.get("circle-translate-anchor")),u_pitch_with_map:+de,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ne}},Er=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,D.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,D.u_overscale_factor)}},xr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,D.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,D.u_viewport_size)}},Kr=function(Y,D,J){var O=As(J,1,D.zoom),K=Math.pow(2,D.zoom-J.tileID.overscaledZ),de=J.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:D.cameraToCenterDistance,u_pixels_to_tile_units:O,u_extrude_scale:[D.pixelsToGLUnits[0]/(O*K),D.pixelsToGLUnits[1]/(O*K)],u_overscale_factor:de}},Mi=function(Y,D,J){return{u_matrix:Y,u_inv_matrix:D,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}},Wi=function(Y,D){return{u_color:new i.UniformColor(Y,D.u_color),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_overlay:new i.Uniform1i(Y,D.u_overlay),u_overlay_scale:new i.Uniform1f(Y,D.u_overlay_scale)}},dn=function(Y,D,J){return J===void 0&&(J=1),{u_matrix:Y,u_color:D,u_overlay:0,u_overlay_scale:J}},wn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},On=function(Y){return{u_matrix:Y}},Yi=function(Y,D){return{u_extrude_scale:new i.Uniform1f(Y,D.u_extrude_scale),u_intensity:new i.Uniform1f(Y,D.u_intensity),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},$i=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_color_ramp:new i.Uniform1i(Y,D.u_color_ramp),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},an=function(Y,D,J,O){return{u_matrix:Y,u_extrude_scale:As(D,1,J),u_intensity:O}},Fi=function(Y,D,J,O){var K=i.create();i.ortho(K,0,Y.width,Y.height,0,0,1);var de=Y.context.gl;return{u_matrix:K,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:J,u_color_ramp:O,u_opacity:D.paint.get("heatmap-opacity")}},ta=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_latrange:new i.Uniform2f(Y,D.u_latrange),u_light:new i.Uniform2f(Y,D.u_light),u_shadow:new i.UniformColor(Y,D.u_shadow),u_highlight:new i.UniformColor(Y,D.u_highlight),u_accent:new i.UniformColor(Y,D.u_accent)}},Ca=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_dimension:new i.Uniform2f(Y,D.u_dimension),u_zoom:new i.Uniform1f(Y,D.u_zoom),u_unpack:new i.Uniform4f(Y,D.u_unpack)}},Ra=function(Y,D,J){var O=J.paint.get("hillshade-shadow-color"),K=J.paint.get("hillshade-highlight-color"),de=J.paint.get("hillshade-accent-color"),ne=J.paint.get("hillshade-illumination-direction")*(Math.PI/180);J.paint.get("hillshade-illumination-anchor")==="viewport"&&(ne-=Y.transform.angle);var we=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(D.tileID.toUnwrapped(),we),u_image:0,u_latrange:Ua(Y,D.tileID),u_light:[J.paint.get("hillshade-exaggeration"),ne],u_shadow:O,u_highlight:K,u_accent:de}},La=function(Y,D){var J=D.stride,O=i.create();return i.ortho(O,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(O,O,[0,-i.EXTENT,0]),{u_matrix:O,u_image:1,u_dimension:[J,J],u_zoom:Y.overscaledZ,u_unpack:D.getUnpackVector()}};function Ua(Y,D){var J=Math.pow(2,D.canonical.z),O=D.canonical.y;return[new i.MercatorCoordinate(0,O/J).toLngLat().lat,new i.MercatorCoordinate(0,(O+1)/J).toLngLat().lat]}var Zn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels)}},Dn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_image:new i.Uniform1i(Y,D.u_image),u_image_height:new i.Uniform1f(Y,D.u_image_height)}},Ka=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,D.u_image),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},bo=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,D.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,D.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,D.u_sdfgamma),u_image:new i.Uniform1i(Y,D.u_image),u_tex_y_a:new i.Uniform1f(Y,D.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,D.u_tex_y_b),u_mix:new i.Uniform1f(Y,D.u_mix)}},Zo=function(Y,D,J){var O=Y.transform;return{u_matrix:ml(Y,D,J),u_ratio:1/As(D,1,O.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/O.pixelsToGLUnits[0],1/O.pixelsToGLUnits[1]]}},Ss=function(Y,D,J,O){return i.extend(Zo(Y,D,J),{u_image:0,u_image_height:O})},as=function(Y,D,J,O){var K=Y.transform,de=Ho(D,K);return{u_matrix:ml(Y,D,J),u_texsize:D.imageAtlasTexture.size,u_ratio:1/As(D,1,K.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[de,O.fromScale,O.toScale],u_fade:O.t,u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]]}},ws=function(Y,D,J,O,K){var de=Y.transform,ne=Y.lineAtlas,we=Ho(D,de),Oe=J.layout.get("line-cap")==="round",ht=ne.getDash(O.from,Oe),Yt=ne.getDash(O.to,Oe),cr=ht.width*K.fromScale,Nt=Yt.width*K.toScale;return i.extend(Zo(Y,D,J),{u_patternscale_a:[we/cr,-ht.height/2],u_patternscale_b:[we/Nt,-Yt.height/2],u_sdfgamma:ne.width/(Math.min(cr,Nt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:ht.y,u_tex_y_b:Yt.y,u_mix:K.t})};function Ho(Y,D){return 1/As(Y,1,D.tileZoom)}function ml(Y,D,J){return Y.translatePosMatrix(D.tileID.posMatrix,D,J.paint.get("line-translate"),J.paint.get("line-translate-anchor"))}var Ws=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_tl_parent:new i.Uniform2f(Y,D.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,D.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,D.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,D.u_fade_t),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image0:new i.Uniform1i(Y,D.u_image0),u_image1:new i.Uniform1i(Y,D.u_image1),u_brightness_low:new i.Uniform1f(Y,D.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,D.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,D.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,D.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,D.u_spin_weights)}},Ls=function(Y,D,J,O,K){return{u_matrix:Y,u_tl_parent:D,u_scale_parent:J,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*K.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:K.paint.get("raster-brightness-min"),u_brightness_high:K.paint.get("raster-brightness-max"),u_saturation_factor:ys(K.paint.get("raster-saturation")),u_contrast_factor:no(K.paint.get("raster-contrast")),u_spin_weights:va(K.paint.get("raster-hue-rotate"))}};function va(Y){Y*=Math.PI/180;var D=Math.sin(Y),J=Math.cos(Y);return[(2*J+1)/3,(-Math.sqrt(3)*D-J+1)/3,(Math.sqrt(3)*D-J+1)/3]}function no(Y){return Y>0?1/(1-Y):1+Y}function ys(Y){return Y>0?1-1/(1.001-Y):-Y}var rs=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture)}},Ql=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Cu=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texsize_icon:new i.Uniform2f(Y,D.u_texsize_icon),u_texture:new i.Uniform1i(Y,D.u_texture),u_texture_icon:new i.Uniform1i(Y,D.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Yu=function(Y,D,J,O,K,de,ne,we,Oe,ht){var Yt=K.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:D?D.uSizeT:0,u_size:D?D.uSize:0,u_camera_to_center_distance:Yt.cameraToCenterDistance,u_pitch:Yt.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Yt.width/Yt.height,u_fade_change:K.options.fadeDuration?K.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ne,u_coord_matrix:we,u_is_text:+Oe,u_pitch_with_map:+O,u_texsize:ht,u_texture:0}},Nc=function(Y,D,J,O,K,de,ne,we,Oe,ht,Yt){var cr=K.transform;return i.extend(Yu(Y,D,J,O,K,de,ne,we,Oe,ht),{u_gamma_scale:O?Math.cos(cr._pitch)*cr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Yt})},pu=function(Y,D,J,O,K,de,ne,we,Oe,ht){return i.extend(Nc(Y,D,J,O,K,de,ne,we,!0,Oe,!0),{u_texsize_icon:ht,u_texture_icon:1})},Uc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_color:new i.UniformColor(Y,D.u_color)}},xu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image:new i.Uniform1i(Y,D.u_image),u_pattern_tl_a:new i.Uniform2f(Y,D.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,D.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,D.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,D.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_mix:new i.Uniform1f(Y,D.u_mix),u_pattern_size_a:new i.Uniform2f(Y,D.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,D.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,D.u_scale_a),u_scale_b:new i.Uniform1f(Y,D.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,D.u_tile_units_to_pixels)}},Ac=function(Y,D,J){return{u_matrix:Y,u_opacity:D,u_color:J}},Va=function(Y,D,J,O,K,de){return i.extend(cf(O,de,J,K),{u_matrix:Y,u_opacity:D})},oo={fillExtrusion:Zf,fillExtrusionPattern:Wl,fill:qc,fillPattern:Tc,fillOutline:wl,fillOutlinePattern:vu,circle:kt,collisionBox:Er,collisionCircle:xr,debug:Wi,clippingMask:wn,heatmap:Yi,heatmapTexture:$i,hillshade:ta,hillshadePrepare:Ca,line:Zn,lineGradient:Dn,linePattern:Ka,lineSDF:bo,raster:Ws,symbolIcon:rs,symbolSDF:Ql,symbolTextAndIcon:Cu,background:Uc,backgroundPattern:xu},Vc;function hc(Y,D,J,O,K,de,ne){for(var we=Y.context,Oe=we.gl,ht=Y.useProgram("collisionBox"),Yt=[],cr=0,Nt=0,Ne=0;Ne<O.length;Ne++){var $e=O[Ne],st=D.getTile($e),It=st.getBucket(J);if(It){var Bt=$e.posMatrix;(K[0]!==0||K[1]!==0)&&(Bt=Y.translatePosMatrix($e.posMatrix,st,K,de));var Ft=ne?It.textCollisionBox:It.iconCollisionBox,Ut=It.collisionCircleArray;if(Ut.length>0){var zt=i.create(),_t=Bt;i.mul(zt,It.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(zt,zt,It.placementViewportMatrix),Yt.push({circleArray:Ut,circleOffset:Nt,transform:_t,invTransform:zt}),cr+=Ut.length/4,Nt=cr}Ft&&ht.draw(we,Oe.LINES,An.disabled,Vi.disabled,Y.colorModeForRenderPass(),wr.disabled,Kr(Bt,Y.transform,st),J.id,Ft.layoutVertexBuffer,Ft.indexBuffer,Ft.segments,null,Y.transform.zoom,null,null,Ft.collisionVertexBuffer)}}if(!(!ne||!Yt.length)){var Dt=Y.useProgram("collisionCircle"),vt=new i.StructArrayLayout2f1f2i16;vt.resize(cr*4),vt._trim();for(var lr=0,_r=0,Br=Yt;_r<Br.length;_r+=1)for(var Di=Br[_r],ci=0;ci<Di.circleArray.length/4;ci++){var bi=ci*4,gn=Di.circleArray[bi+0],tn=Di.circleArray[bi+1],Ei=Di.circleArray[bi+2],Oi=Di.circleArray[bi+3];vt.emplace(lr++,gn,tn,Ei,Oi,0),vt.emplace(lr++,gn,tn,Ei,Oi,1),vt.emplace(lr++,gn,tn,Ei,Oi,2),vt.emplace(lr++,gn,tn,Ei,Oi,3)}(!Vc||Vc.length<cr*2)&&(Vc=Ku(cr));for(var Gi=we.createIndexBuffer(Vc,!0),on=we.createVertexBuffer(vt,i.collisionCircleLayout.members,!0),zn=0,Ja=Yt;zn<Ja.length;zn+=1){var co=Ja[zn],ts=Mi(co.transform,co.invTransform,Y.transform);Dt.draw(we,Oe.TRIANGLES,An.disabled,Vi.disabled,Y.colorModeForRenderPass(),wr.disabled,ts,J.id,on,Gi,i.SegmentVector.simpleSegment(0,co.circleOffset*2,co.circleArray.length,co.circleArray.length/2),null,Y.transform.zoom,null,null,null)}on.destroy(),Gi.destroy()}}function Ku(Y){var D=Y*2,J=new i.StructArrayLayout3ui6;J.resize(D),J._trim();for(var O=0;O<D;O++){var K=O*6;J.uint16[K+0]=O*4+0,J.uint16[K+1]=O*4+1,J.uint16[K+2]=O*4+2,J.uint16[K+3]=O*4+2,J.uint16[K+4]=O*4+3,J.uint16[K+5]=O*4+0}return J}var ue=i.identity(new Float32Array(16));function w(Y,D,J,O,K){if(Y.renderPass==="translucent"){var de=Vi.disabled,ne=Y.colorModeForRenderPass(),we=J.layout.get("text-variable-anchor");we&&Q(O,Y,J,D,J.layout.get("text-rotation-alignment"),J.layout.get("text-pitch-alignment"),K),J.paint.get("icon-opacity").constantOr(1)!==0&&Fe(Y,D,J,O,!1,J.paint.get("icon-translate"),J.paint.get("icon-translate-anchor"),J.layout.get("icon-rotation-alignment"),J.layout.get("icon-pitch-alignment"),J.layout.get("icon-keep-upright"),de,ne),J.paint.get("text-opacity").constantOr(1)!==0&&Fe(Y,D,J,O,!0,J.paint.get("text-translate"),J.paint.get("text-translate-anchor"),J.layout.get("text-rotation-alignment"),J.layout.get("text-pitch-alignment"),J.layout.get("text-keep-upright"),de,ne),D.map.showCollisionBoxes&&(hc(Y,D,J,O,J.paint.get("text-translate"),J.paint.get("text-translate-anchor"),!0),hc(Y,D,J,O,J.paint.get("icon-translate"),J.paint.get("icon-translate-anchor"),!1))}}function B(Y,D,J,O,K,de){var ne=i.getAnchorAlignment(Y),we=ne.horizontalAlign,Oe=ne.verticalAlign,ht=-(we-.5)*D,Yt=-(Oe-.5)*J,cr=i.evaluateVariableOffset(Y,O);return new i.Point((ht/K+cr[0])*de,(Yt/K+cr[1])*de)}function Q(Y,D,J,O,K,de,ne){for(var we=D.transform,Oe=K==="map",ht=de==="map",Yt=0,cr=Y;Yt<cr.length;Yt+=1){var Nt=cr[Yt],Ne=O.getTile(Nt),$e=Ne.getBucket(J);if(!(!$e||!$e.text||!$e.text.segments.get().length)){var st=$e.textSizeData,It=i.evaluateSizeForZoom(st,we.zoom),Bt=As(Ne,1,D.transform.zoom),Ft=_n(Nt.posMatrix,ht,Oe,D.transform,Bt),Ut=J.layout.get("icon-text-fit")!=="none"&&$e.hasIconData();if(It){var zt=Math.pow(2,we.zoom-Ne.tileID.overscaledZ);ee($e,Oe,ht,ne,i.symbolSize,we,Ft,Nt.posMatrix,zt,It,Ut)}}}}function ee(Y,D,J,O,K,de,ne,we,Oe,ht,Yt){var cr=Y.text.placedSymbolArray,Nt=Y.text.dynamicLayoutVertexArray,Ne=Y.icon.dynamicLayoutVertexArray,$e={};Nt.clear();for(var st=0;st<cr.length;st++){var It=cr.get(st),Bt=Y.allowVerticalPlacement&&!It.placedOrientation,Ft=!It.hidden&&It.crossTileID&&!Bt?O[It.crossTileID]:null;if(!Ft)ul(It.numGlyphs,Nt);else{var Ut=new i.Point(It.anchorX,It.anchorY),zt=ea(Ut,J?we:ne),_t=Ma(de.cameraToCenterDistance,zt.signedDistanceFromCamera),Dt=K.evaluateSizeForFeature(Y.textSizeData,ht,It)*_t/i.ONE_EM;J&&(Dt*=Y.tilePixelRatio/Oe);for(var vt=Ft.width,lr=Ft.height,_r=Ft.anchor,Br=Ft.textOffset,Di=Ft.textBoxScale,ci=B(_r,vt,lr,Br,Di,Dt),bi=J?ea(Ut.add(ci),ne).point:zt.point.add(D?ci.rotate(-de.angle):ci),gn=Y.allowVerticalPlacement&&It.placedOrientation===i.WritingMode.vertical?Math.PI/2:0,tn=0;tn<It.numGlyphs;tn++)i.addDynamicAttributes(Nt,bi,gn);Yt&&It.associatedIconIndex>=0&&($e[It.associatedIconIndex]={shiftedAnchor:bi,angle:gn})}}if(Yt){Ne.clear();for(var Ei=Y.icon.placedSymbolArray,Oi=0;Oi<Ei.length;Oi++){var Gi=Ei.get(Oi);if(Gi.hidden)ul(Gi.numGlyphs,Ne);else{var on=$e[Oi];if(!on)ul(Gi.numGlyphs,Ne);else for(var zn=0;zn<Gi.numGlyphs;zn++)i.addDynamicAttributes(Ne,on.shiftedAnchor,on.angle)}}Y.icon.dynamicLayoutVertexBuffer.updateData(Ne)}Y.text.dynamicLayoutVertexBuffer.updateData(Nt)}function le(Y,D,J){return J.iconsInText&&D?"symbolTextAndIcon":Y?"symbolSDF":"symbolIcon"}function Fe(Y,D,J,O,K,de,ne,we,Oe,ht,Yt,cr){for(var Nt=Y.context,Ne=Nt.gl,$e=Y.transform,st=we==="map",It=Oe==="map",Bt=st&&J.layout.get("symbol-placement")!=="point",Ft=st&&!It&&!Bt,Ut=J.layout.get("symbol-sort-key").constantOr(1)!==void 0,zt=!1,_t=Y.depthModeForSublayer(0,An.ReadOnly),Dt=J.layout.get("text-variable-anchor"),vt=[],lr=0,_r=O;lr<_r.length;lr+=1){var Br=_r[lr],Di=D.getTile(Br),ci=Di.getBucket(J);if(ci){var bi=K?ci.text:ci.icon;if(!(!bi||!bi.segments.get().length)){var gn=bi.programConfigurations.get(J.id),tn=K||ci.sdfIcons,Ei=K?ci.textSizeData:ci.iconSizeData,Oi=It||$e.pitch!==0,Gi=Y.useProgram(le(tn,K,ci),gn),on=i.evaluateSizeForZoom(Ei,$e.zoom),zn=void 0,Ja=[0,0],co=void 0,ts=void 0,so=null,Yo=void 0;if(K){if(co=Di.glyphAtlasTexture,ts=Ne.LINEAR,zn=Di.glyphAtlasTexture.size,ci.iconsInText){Ja=Di.imageAtlasTexture.size,so=Di.imageAtlasTexture;var ms=Ei.kind==="composite"||Ei.kind==="camera";Yo=Oi||Y.options.rotating||Y.options.zooming||ms?Ne.LINEAR:Ne.NEAREST}}else{var ou=J.layout.get("icon-size").constantOr(0)!==1||ci.iconsNeedLinear;co=Di.imageAtlasTexture,ts=tn||Y.options.rotating||Y.options.zooming||ou||Oi?Ne.LINEAR:Ne.NEAREST,zn=Di.imageAtlasTexture.size}var Cv=As(Di,1,Y.transform.zoom),Lv=_n(Br.posMatrix,It,st,Y.transform,Cv),wd=ya(Br.posMatrix,It,st,Y.transform,Cv),Kv=Dt&&ci.hasTextData(),hg=J.layout.get("icon-text-fit")!=="none"&&Kv&&ci.hasIconData();Bt&&No(ci,Br.posMatrix,Y,K,Lv,wd,It,ht);var gp=Y.translatePosMatrix(Br.posMatrix,Di,de,ne),Td=Bt||K&&Dt||hg?ue:Lv,mp=Y.translatePosMatrix(wd,Di,de,ne,!0),Vd=tn&&J.paint.get(K?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Ad=void 0;tn?ci.iconsInText?Ad=pu(Ei.kind,on,Ft,It,Y,gp,Td,mp,zn,Ja):Ad=Nc(Ei.kind,on,Ft,It,Y,gp,Td,mp,K,zn,!0):Ad=Yu(Ei.kind,on,Ft,It,Y,gp,Td,mp,K,zn);var Pv={program:Gi,buffers:bi,uniformValues:Ad,atlasTexture:co,atlasTextureIcon:so,atlasInterpolation:ts,atlasInterpolationIcon:Yo,isSDF:tn,hasHalo:Vd};if(Ut&&ci.canOverlap){zt=!0;for(var Jv=bi.segments.get(),Iv=0,hy=Jv;Iv<hy.length;Iv+=1){var dg=hy[Iv];vt.push({segments:new i.SegmentVector([dg]),sortKey:dg.sortKey,state:Pv})}}else vt.push({segments:bi.segments,sortKey:0,state:Pv})}}}zt&&vt.sort(function(k1,C1){return k1.sortKey-C1.sortKey});for(var oh=0,vg=vt;oh<vg.length;oh+=1){var dy=vg[oh],Zh=dy.state;if(Nt.activeTexture.set(Ne.TEXTURE0),Zh.atlasTexture.bind(Zh.atlasInterpolation,Ne.CLAMP_TO_EDGE),Zh.atlasTextureIcon&&(Nt.activeTexture.set(Ne.TEXTURE1),Zh.atlasTextureIcon&&Zh.atlasTextureIcon.bind(Zh.atlasInterpolationIcon,Ne.CLAMP_TO_EDGE)),Zh.isSDF){var am=Zh.uniformValues;Zh.hasHalo&&(am.u_is_halo=1,Ze(Zh.buffers,dy.segments,J,Y,Zh.program,_t,Yt,cr,am)),am.u_is_halo=0}Ze(Zh.buffers,dy.segments,J,Y,Zh.program,_t,Yt,cr,Zh.uniformValues)}}function Ze(Y,D,J,O,K,de,ne,we,Oe){var ht=O.context,Yt=ht.gl;K.draw(ht,Yt.TRIANGLES,de,ne,we,wr.disabled,Oe,J.id,Y.layoutVertexBuffer,Y.indexBuffer,D,J.paint,O.transform.zoom,Y.programConfigurations.get(J.id),Y.dynamicLayoutVertexBuffer,Y.opacityVertexBuffer)}function ut(Y,D,J,O){if(Y.renderPass==="translucent"){var K=J.paint.get("circle-opacity"),de=J.paint.get("circle-stroke-width"),ne=J.paint.get("circle-stroke-opacity"),we=J.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(K.constantOr(1)===0&&(de.constantOr(1)===0||ne.constantOr(1)===0))){for(var Oe=Y.context,ht=Oe.gl,Yt=Y.depthModeForSublayer(0,An.ReadOnly),cr=Vi.disabled,Nt=Y.colorModeForRenderPass(),Ne=[],$e=0;$e<O.length;$e++){var st=O[$e],It=D.getTile(st),Bt=It.getBucket(J);if(Bt){var Ft=Bt.programConfigurations.get(J.id),Ut=Y.useProgram("circle",Ft),zt=Bt.layoutVertexBuffer,_t=Bt.indexBuffer,Dt=Zt(Y,st,It,J),vt={programConfiguration:Ft,program:Ut,layoutVertexBuffer:zt,indexBuffer:_t,uniformValues:Dt};if(we)for(var lr=Bt.segments.get(),_r=0,Br=lr;_r<Br.length;_r+=1){var Di=Br[_r];Ne.push({segments:new i.SegmentVector([Di]),sortKey:Di.sortKey,state:vt})}else Ne.push({segments:Bt.segments,sortKey:0,state:vt})}}we&&Ne.sort(function(co,ts){return co.sortKey-ts.sortKey});for(var ci=0,bi=Ne;ci<bi.length;ci+=1){var gn=bi[ci],tn=gn.state,Ei=tn.programConfiguration,Oi=tn.program,Gi=tn.layoutVertexBuffer,on=tn.indexBuffer,zn=tn.uniformValues,Ja=gn.segments;Oi.draw(Oe,ht.TRIANGLES,Yt,cr,Nt,wr.disabled,zn,J.id,Gi,on,Ja,J.paint,Y.transform.zoom,Ei)}}}}function Mt(Y,D,J,O){if(J.paint.get("heatmap-opacity")!==0)if(Y.renderPass==="offscreen"){var K=Y.context,de=K.gl,ne=Vi.disabled,we=new wt([de.ONE,de.ONE],i.Color.transparent,[!0,!0,!0,!0]);Jt(K,Y,J),K.clear({color:i.Color.transparent});for(var Oe=0;Oe<O.length;Oe++){var ht=O[Oe];if(!D.hasRenderableParent(ht)){var Yt=D.getTile(ht),cr=Yt.getBucket(J);if(cr){var Nt=cr.programConfigurations.get(J.id),Ne=Y.useProgram("heatmap",Nt),$e=Y.transform,st=$e.zoom;Ne.draw(K,de.TRIANGLES,An.disabled,ne,we,wr.disabled,an(ht.posMatrix,Yt,st,J.paint.get("heatmap-intensity")),J.id,cr.layoutVertexBuffer,cr.indexBuffer,cr.segments,J.paint,Y.transform.zoom,Nt)}}}K.viewport.set([0,0,Y.width,Y.height])}else Y.renderPass==="translucent"&&(Y.context.setColorMode(Y.colorModeForRenderPass()),yr(Y,J))}function Jt(Y,D,J){var O=Y.gl;Y.activeTexture.set(O.TEXTURE1),Y.viewport.set([0,0,D.width/4,D.height/4]);var K=J.heatmapFbo;if(K)O.bindTexture(O.TEXTURE_2D,K.colorAttachment.get()),Y.bindFramebuffer.set(K.framebuffer);else{var de=O.createTexture();O.bindTexture(O.TEXTURE_2D,de),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_S,O.CLAMP_TO_EDGE),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_T,O.CLAMP_TO_EDGE),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MIN_FILTER,O.LINEAR),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MAG_FILTER,O.LINEAR),K=J.heatmapFbo=Y.createFramebuffer(D.width/4,D.height/4,!1),$t(Y,D,de,K)}}function $t(Y,D,J,O){var K=Y.gl,de=Y.extRenderToTextureHalfFloat?Y.extTextureHalfFloat.HALF_FLOAT_OES:K.UNSIGNED_BYTE;K.texImage2D(K.TEXTURE_2D,0,K.RGBA,D.width/4,D.height/4,0,K.RGBA,de,null),O.colorAttachment.set(J)}function yr(Y,D){var J=Y.context,O=J.gl,K=D.heatmapFbo;if(K){J.activeTexture.set(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,K.colorAttachment.get()),J.activeTexture.set(O.TEXTURE1);var de=D.colorRampTexture;de||(de=D.colorRampTexture=new i.Texture(J,D.colorRamp,O.RGBA)),de.bind(O.LINEAR,O.CLAMP_TO_EDGE),Y.useProgram("heatmapTexture").draw(J,O.TRIANGLES,An.disabled,Vi.disabled,Y.colorModeForRenderPass(),wr.disabled,Fi(Y,D,0,1),D.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,D.paint,Y.transform.zoom)}}function Cr(Y,D,J,O){if(Y.renderPass==="translucent"){var K=J.paint.get("line-opacity"),de=J.paint.get("line-width");if(!(K.constantOr(1)===0||de.constantOr(1)===0))for(var ne=Y.depthModeForSublayer(0,An.ReadOnly),we=Y.colorModeForRenderPass(),Oe=J.paint.get("line-dasharray"),ht=J.paint.get("line-pattern"),Yt=ht.constantOr(1),cr=J.paint.get("line-gradient"),Nt=J.getCrossfadeParameters(),Ne=Yt?"linePattern":Oe?"lineSDF":cr?"lineGradient":"line",$e=Y.context,st=$e.gl,It=!0,Bt=0,Ft=O;Bt<Ft.length;Bt+=1){var Ut=Ft[Bt],zt=D.getTile(Ut);if(!(Yt&&!zt.patternsLoaded())){var _t=zt.getBucket(J);if(_t){var Dt=_t.programConfigurations.get(J.id),vt=Y.context.program.get(),lr=Y.useProgram(Ne,Dt),_r=It||lr.program!==vt,Br=ht.constantOr(null);if(Br&&zt.imageAtlas){var Di=zt.imageAtlas,ci=Di.patternPositions[Br.to.toString()],bi=Di.patternPositions[Br.from.toString()];ci&&bi&&Dt.setConstantPatternPositions(ci,bi)}var gn=Yt?as(Y,zt,J,Nt):Oe?ws(Y,zt,J,Oe,Nt):cr?Ss(Y,zt,J,_t.lineClipsArray.length):Zo(Y,zt,J);if(Yt)$e.activeTexture.set(st.TEXTURE0),zt.imageAtlasTexture.bind(st.LINEAR,st.CLAMP_TO_EDGE),Dt.updatePaintBuffers(Nt);else if(Oe&&(_r||Y.lineAtlas.dirty))$e.activeTexture.set(st.TEXTURE0),Y.lineAtlas.bind($e);else if(cr){var tn=_t.gradients[J.id],Ei=tn.texture;if(J.gradientVersion!==tn.version){var Oi=256;if(J.stepInterpolant){var Gi=D.getSource().maxzoom,on=Ut.canonical.z===Gi?Math.ceil(1<<Y.transform.maxZoom-Ut.canonical.z):1,zn=_t.maxLineLength/i.EXTENT,Ja=1024,co=zn*Ja*on;Oi=i.clamp(i.nextPowerOfTwo(co),256,$e.maxTextureSize)}tn.gradient=i.renderColorRamp({expression:J.gradientExpression(),evaluationKey:"lineProgress",resolution:Oi,image:tn.gradient||void 0,clips:_t.lineClipsArray}),tn.texture?tn.texture.update(tn.gradient):tn.texture=new i.Texture($e,tn.gradient,st.RGBA),tn.version=J.gradientVersion,Ei=tn.texture}$e.activeTexture.set(st.TEXTURE0),Ei.bind(J.stepInterpolant?st.NEAREST:st.LINEAR,st.CLAMP_TO_EDGE)}lr.draw($e,st.TRIANGLES,ne,Y.stencilModeForClipping(Ut),we,wr.disabled,gn,J.id,_t.layoutVertexBuffer,_t.indexBuffer,_t.segments,J.paint,Y.transform.zoom,Dt,_t.layoutVertexBuffer2),It=!1}}}}}function ve(Y,D,J,O){var K=J.paint.get("fill-color"),de=J.paint.get("fill-opacity");if(de.constantOr(1)!==0){var ne=Y.colorModeForRenderPass(),we=J.paint.get("fill-pattern"),Oe=Y.opaquePassEnabledForLayer()&&!we.constantOr(1)&&K.constantOr(i.Color.transparent).a===1&&de.constantOr(0)===1?"opaque":"translucent";if(Y.renderPass===Oe){var ht=Y.depthModeForSublayer(1,Y.renderPass==="opaque"?An.ReadWrite:An.ReadOnly);xe(Y,D,J,O,ht,ne,!1)}if(Y.renderPass==="translucent"&&J.paint.get("fill-antialias")){var Yt=Y.depthModeForSublayer(J.getPaintProperty("fill-outline-color")?2:0,An.ReadOnly);xe(Y,D,J,O,Yt,ne,!0)}}}function xe(Y,D,J,O,K,de,ne){var we=Y.context.gl,Oe=J.paint.get("fill-pattern"),ht=Oe&&Oe.constantOr(1),Yt=J.getCrossfadeParameters(),cr,Nt,Ne,$e,st;ne?(Nt=ht&&!J.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",cr=we.LINES):(Nt=ht?"fillPattern":"fill",cr=we.TRIANGLES);for(var It=0,Bt=O;It<Bt.length;It+=1){var Ft=Bt[It],Ut=D.getTile(Ft);if(!(ht&&!Ut.patternsLoaded())){var zt=Ut.getBucket(J);if(zt){var _t=zt.programConfigurations.get(J.id),Dt=Y.useProgram(Nt,_t);ht&&(Y.context.activeTexture.set(we.TEXTURE0),Ut.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),_t.updatePaintBuffers(Yt));var vt=Oe.constantOr(null);if(vt&&Ut.imageAtlas){var lr=Ut.imageAtlas,_r=lr.patternPositions[vt.to.toString()],Br=lr.patternPositions[vt.from.toString()];_r&&Br&&_t.setConstantPatternPositions(_r,Br)}var Di=Y.translatePosMatrix(Ft.posMatrix,Ut,J.paint.get("fill-translate"),J.paint.get("fill-translate-anchor"));if(!ne)$e=zt.indexBuffer,st=zt.segments,Ne=ht?ff(Di,Y,Yt,Ut):Oc(Di);else{$e=zt.indexBuffer2,st=zt.segments2;var ci=[we.drawingBufferWidth,we.drawingBufferHeight];Ne=Nt==="fillOutlinePattern"&&ht?Bc(Di,Y,Yt,Ut,ci):fc(Di,ci)}Dt.draw(Y.context,cr,K,Y.stencilModeForClipping(Ft),de,wr.disabled,Ne,J.id,zt.layoutVertexBuffer,$e,st,J.paint,Y.transform.zoom,_t)}}}}function Ie(Y,D,J,O){var K=J.paint.get("fill-extrusion-opacity");if(K!==0&&Y.renderPass==="translucent"){var de=new An(Y.context.gl.LEQUAL,An.ReadWrite,Y.depthRangeFor3D);if(K===1&&!J.paint.get("fill-extrusion-pattern").constantOr(1)){var ne=Y.colorModeForRenderPass();ze(Y,D,J,O,de,Vi.disabled,ne)}else ze(Y,D,J,O,de,Vi.disabled,wt.disabled),ze(Y,D,J,O,de,Y.stencilModeFor3D(),Y.colorModeForRenderPass())}}function ze(Y,D,J,O,K,de,ne){for(var we=Y.context,Oe=we.gl,ht=J.paint.get("fill-extrusion-pattern"),Yt=ht.constantOr(1),cr=J.getCrossfadeParameters(),Nt=J.paint.get("fill-extrusion-opacity"),Ne=0,$e=O;Ne<$e.length;Ne+=1){var st=$e[Ne],It=D.getTile(st),Bt=It.getBucket(J);if(Bt){var Ft=Bt.programConfigurations.get(J.id),Ut=Y.useProgram(Yt?"fillExtrusionPattern":"fillExtrusion",Ft);Yt&&(Y.context.activeTexture.set(Oe.TEXTURE0),It.imageAtlasTexture.bind(Oe.LINEAR,Oe.CLAMP_TO_EDGE),Ft.updatePaintBuffers(cr));var zt=ht.constantOr(null);if(zt&&It.imageAtlas){var _t=It.imageAtlas,Dt=_t.patternPositions[zt.to.toString()],vt=_t.patternPositions[zt.from.toString()];Dt&&vt&&Ft.setConstantPatternPositions(Dt,vt)}var lr=Y.translatePosMatrix(st.posMatrix,It,J.paint.get("fill-extrusion-translate"),J.paint.get("fill-extrusion-translate-anchor")),_r=J.paint.get("fill-extrusion-vertical-gradient"),Br=Yt?Zu(lr,Y,_r,Nt,st,cr,It):ah(lr,Y,_r,Nt);Ut.draw(we,we.gl.TRIANGLES,K,de,ne,wr.backCCW,Br,J.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,J.paint,Y.transform.zoom,Ft)}}}function Qe(Y,D,J,O){if(!(Y.renderPass!=="offscreen"&&Y.renderPass!=="translucent")){for(var K=Y.context,de=Y.depthModeForSublayer(0,An.ReadOnly),ne=Y.colorModeForRenderPass(),we=Y.renderPass==="translucent"?Y.stencilConfigForOverlap(O):[{},O],Oe=we[0],ht=we[1],Yt=0,cr=ht;Yt<cr.length;Yt+=1){var Nt=cr[Yt],Ne=D.getTile(Nt);Ne.needsHillshadePrepare&&Y.renderPass==="offscreen"?nt(Y,Ne,J,de,Vi.disabled,ne):Y.renderPass==="translucent"&&Xe(Y,Ne,J,de,Oe[Nt.overscaledZ],ne)}K.viewport.set([0,0,Y.width,Y.height])}}function Xe(Y,D,J,O,K,de){var ne=Y.context,we=ne.gl,Oe=D.fbo;if(Oe){var ht=Y.useProgram("hillshade");ne.activeTexture.set(we.TEXTURE0),we.bindTexture(we.TEXTURE_2D,Oe.colorAttachment.get());var Yt=Ra(Y,D,J);ht.draw(ne,we.TRIANGLES,O,K,de,wr.disabled,Yt,J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function nt(Y,D,J,O,K,de){var ne=Y.context,we=ne.gl,Oe=D.dem;if(Oe&&Oe.data){var ht=Oe.dim,Yt=Oe.stride,cr=Oe.getPixels();if(ne.activeTexture.set(we.TEXTURE1),ne.pixelStoreUnpackPremultiplyAlpha.set(!1),D.demTexture=D.demTexture||Y.getTileTexture(Yt),D.demTexture){var Nt=D.demTexture;Nt.update(cr,{premultiply:!1}),Nt.bind(we.NEAREST,we.CLAMP_TO_EDGE)}else D.demTexture=new i.Texture(ne,cr,we.RGBA,{premultiply:!1}),D.demTexture.bind(we.NEAREST,we.CLAMP_TO_EDGE);ne.activeTexture.set(we.TEXTURE0);var Ne=D.fbo;if(!Ne){var $e=new i.Texture(ne,{width:ht,height:ht,data:null},we.RGBA);$e.bind(we.LINEAR,we.CLAMP_TO_EDGE),Ne=D.fbo=ne.createFramebuffer(ht,ht,!0),Ne.colorAttachment.set($e.texture)}ne.bindFramebuffer.set(Ne.framebuffer),ne.viewport.set([0,0,ht,ht]),Y.useProgram("hillshadePrepare").draw(ne,we.TRIANGLES,O,K,de,wr.disabled,La(D.tileID,Oe),J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments),D.needsHillshadePrepare=!1}}function qt(Y,D,J,O){if(Y.renderPass==="translucent"&&J.paint.get("raster-opacity")!==0&&O.length)for(var K=Y.context,de=K.gl,ne=D.getSource(),we=Y.useProgram("raster"),Oe=Y.colorModeForRenderPass(),ht=ne instanceof Ce?[{},O]:Y.stencilConfigForOverlap(O),Yt=ht[0],cr=ht[1],Nt=cr[cr.length-1].overscaledZ,Ne=!Y.options.moving,$e=0,st=cr;$e<st.length;$e+=1){var It=st[$e],Bt=Y.depthModeForSublayer(It.overscaledZ-Nt,J.paint.get("raster-opacity")===1?An.ReadWrite:An.ReadOnly,de.LESS),Ft=D.getTile(It),Ut=Y.transform.calculatePosMatrix(It.toUnwrapped(),Ne);Ft.registerFadeDuration(J.paint.get("raster-fade-duration"));var zt=D.findLoadedParent(It,0),_t=Wt(Ft,zt,D,J,Y.transform),Dt=void 0,vt=void 0,lr=J.paint.get("raster-resampling")==="nearest"?de.NEAREST:de.LINEAR;K.activeTexture.set(de.TEXTURE0),Ft.texture.bind(lr,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),K.activeTexture.set(de.TEXTURE1),zt?(zt.texture.bind(lr,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST),Dt=Math.pow(2,zt.tileID.overscaledZ-Ft.tileID.overscaledZ),vt=[Ft.tileID.canonical.x*Dt%1,Ft.tileID.canonical.y*Dt%1]):Ft.texture.bind(lr,de.CLAMP_TO_EDGE,de.LINEAR_MIPMAP_NEAREST);var _r=Ls(Ut,vt||[0,0],Dt||1,_t,J);ne instanceof Ce?we.draw(K,de.TRIANGLES,Bt,Vi.disabled,Oe,wr.disabled,_r,J.id,ne.boundsBuffer,Y.quadTriangleIndexBuffer,ne.boundsSegments):we.draw(K,de.TRIANGLES,Bt,Yt[It.overscaledZ],Oe,wr.disabled,_r,J.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments)}}function Wt(Y,D,J,O,K){var de=O.paint.get("raster-fade-duration");if(de>0){var ne=i.browser.now(),we=(ne-Y.timeAdded)/de,Oe=D?(ne-D.timeAdded)/de:-1,ht=J.getSource(),Yt=K.coveringZoomLevel({tileSize:ht.tileSize,roundZoom:ht.roundZoom}),cr=!D||Math.abs(D.tileID.overscaledZ-Yt)>Math.abs(Y.tileID.overscaledZ-Yt),Nt=cr&&Y.refreshedUponExpiration?1:i.clamp(cr?we:1-Oe,0,1);return Y.refreshedUponExpiration&&we>=1&&(Y.refreshedUponExpiration=!1),D?{opacity:1,mix:1-Nt}:{opacity:Nt,mix:0}}else return{opacity:1,mix:0}}function nr(Y,D,J){var O=J.paint.get("background-color"),K=J.paint.get("background-opacity");if(K!==0){var de=Y.context,ne=de.gl,we=Y.transform,Oe=we.tileSize,ht=J.paint.get("background-pattern");if(!Y.isPatternMissing(ht)){var Yt=!ht&&O.a===1&&K===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===Yt){var cr=Vi.disabled,Nt=Y.depthModeForSublayer(0,Yt==="opaque"?An.ReadWrite:An.ReadOnly),Ne=Y.colorModeForRenderPass(),$e=Y.useProgram(ht?"backgroundPattern":"background"),st=we.coveringTiles({tileSize:Oe});ht&&(de.activeTexture.set(ne.TEXTURE0),Y.imageManager.bind(Y.context));for(var It=J.getCrossfadeParameters(),Bt=0,Ft=st;Bt<Ft.length;Bt+=1){var Ut=Ft[Bt],zt=Y.transform.calculatePosMatrix(Ut.toUnwrapped()),_t=ht?Va(zt,K,Y,ht,{tileID:Ut,tileSize:Oe},It):Ac(zt,K,O);$e.draw(de,ne.TRIANGLES,Nt,cr,Ne,wr.disabled,_t,J.id,Y.tileExtentBuffer,Y.quadTriangleIndexBuffer,Y.tileExtentSegments)}}}}}var fr=new i.Color(1,0,0,1),br=new i.Color(0,1,0,1),Fr=new i.Color(0,0,1,1),Hr=new i.Color(1,0,1,1),ri=new i.Color(0,1,1,1);function Ci(Y){var D=Y.transform.padding,J=3;sn(Y,Y.transform.height-(D.top||0),J,fr),sn(Y,D.bottom||0,J,br),Ln(Y,D.left||0,J,Fr),Ln(Y,Y.transform.width-(D.right||0),J,Hr);var O=Y.transform.centerPoint;cn(Y,O.x,Y.transform.height-O.y,ri)}function cn(Y,D,J,O){var K=20,de=2;Yn(Y,D-de/2,J-K/2,de,K,O),Yn(Y,D-K/2,J-de/2,K,de,O)}function sn(Y,D,J,O){Yn(Y,0,D+J/2,Y.transform.width,J,O)}function Ln(Y,D,J,O){Yn(Y,D-J/2,0,J,Y.transform.height,O)}function Yn(Y,D,J,O,K,de){var ne=Y.context,we=ne.gl;we.enable(we.SCISSOR_TEST),we.scissor(D*i.browser.devicePixelRatio,J*i.browser.devicePixelRatio,O*i.browser.devicePixelRatio,K*i.browser.devicePixelRatio),ne.clear({color:de}),we.disable(we.SCISSOR_TEST)}function Aa(Y,D,J){for(var O=0;O<J.length;O++)fa(Y,D,J[O])}function fa(Y,D,J){var O=Y.context,K=O.gl,de=J.posMatrix,ne=Y.useProgram("debug"),we=An.disabled,Oe=Vi.disabled,ht=Y.colorModeForRenderPass(),Yt="$debug";O.activeTexture.set(K.TEXTURE0),Y.emptyTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE),ne.draw(O,K.LINE_STRIP,we,Oe,ht,wr.disabled,dn(de,i.Color.red),Yt,Y.debugBuffer,Y.tileBorderIndexBuffer,Y.debugSegments);var cr=D.getTileByID(J.key).latestRawTileData,Nt=cr&&cr.byteLength||0,Ne=Math.floor(Nt/1024),$e=D.getTile(J).tileSize,st=512/Math.min($e,512)*(J.overscaledZ/Y.transform.zoom)*.5,It=J.canonical.toString();J.overscaledZ!==J.canonical.z&&(It+=" => "+J.overscaledZ);var Bt=It+" "+Ne+"kb";$a(Y,Bt),ne.draw(O,K.TRIANGLES,we,Oe,wt.alphaBlended,wr.disabled,dn(de,i.Color.transparent,st),Yt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function $a(Y,D){Y.initDebugOverlayCanvas();var J=Y.debugOverlayCanvas,O=Y.context.gl,K=Y.debugOverlayCanvas.getContext("2d");K.clearRect(0,0,J.width,J.height),K.shadowColor="white",K.shadowBlur=2,K.lineWidth=1.5,K.strokeStyle="white",K.textBaseline="top",K.font="bold 36px Open Sans, sans-serif",K.fillText(D,5,5),K.strokeText(D,5,5),Y.debugOverlayTexture.update(J),Y.debugOverlayTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE)}function Co(Y,D,J){var O=Y.context,K=J.implementation;if(Y.renderPass==="offscreen"){var de=K.prerender;de&&(Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),de.call(K,O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),O.setStencilMode(Vi.disabled);var ne=K.renderingMode==="3d"?new An(Y.context.gl.LEQUAL,An.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,An.ReadOnly);O.setDepthMode(ne),K.render(O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState(),O.bindFramebuffer.set(null)}}var Qa={symbol:w,circle:ut,heatmap:Mt,line:Cr,fill:ve,"fill-extrusion":Ie,hillshade:Qe,raster:qt,background:nr,debug:Aa,custom:Co},mo=function(D,J){this.context=new Xr(D),this.transform=J,this._tileTextures={},this.setup(),this.numSublayers=ti.maxUnderzooming+ti.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vf,this.gpuTimers={}};mo.prototype.resize=function(D,J){if(this.width=D*i.browser.devicePixelRatio,this.height=J*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var O=0,K=this.style._order;O<K.length;O+=1){var de=K[O];this.style._layers[de].resize()}},mo.prototype.setup=function(){var D=this.context,J=new i.StructArrayLayout2i4;J.emplaceBack(0,0),J.emplaceBack(i.EXTENT,0),J.emplaceBack(0,i.EXTENT),J.emplaceBack(i.EXTENT,i.EXTENT),this.tileExtentBuffer=D.createVertexBuffer(J,oc.members),this.tileExtentSegments=i.SegmentVector.simpleSegment(0,0,4,2);var O=new i.StructArrayLayout2i4;O.emplaceBack(0,0),O.emplaceBack(i.EXTENT,0),O.emplaceBack(0,i.EXTENT),O.emplaceBack(i.EXTENT,i.EXTENT),this.debugBuffer=D.createVertexBuffer(O,oc.members),this.debugSegments=i.SegmentVector.simpleSegment(0,0,4,5);var K=new i.StructArrayLayout4i8;K.emplaceBack(0,0,0,0),K.emplaceBack(i.EXTENT,0,i.EXTENT,0),K.emplaceBack(0,i.EXTENT,0,i.EXTENT),K.emplaceBack(i.EXTENT,i.EXTENT,i.EXTENT,i.EXTENT),this.rasterBoundsBuffer=D.createVertexBuffer(K,Ee.members),this.rasterBoundsSegments=i.SegmentVector.simpleSegment(0,0,4,2);var de=new i.StructArrayLayout2i4;de.emplaceBack(0,0),de.emplaceBack(1,0),de.emplaceBack(0,1),de.emplaceBack(1,1),this.viewportBuffer=D.createVertexBuffer(de,oc.members),this.viewportSegments=i.SegmentVector.simpleSegment(0,0,4,2);var ne=new i.StructArrayLayout1ui2;ne.emplaceBack(0),ne.emplaceBack(1),ne.emplaceBack(3),ne.emplaceBack(2),ne.emplaceBack(0),this.tileBorderIndexBuffer=D.createIndexBuffer(ne);var we=new i.StructArrayLayout3ui6;we.emplaceBack(0,1,2),we.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=D.createIndexBuffer(we),this.emptyTexture=new i.Texture(D,{width:1,height:1,data:new Uint8Array([0,0,0,0])},D.gl.RGBA);var Oe=this.context.gl;this.stencilClearMode=new Vi({func:Oe.ALWAYS,mask:0},0,255,Oe.ZERO,Oe.ZERO,Oe.ZERO)},mo.prototype.clearStencil=function(){var D=this.context,J=D.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var O=i.create();i.ortho(O,0,this.width,this.height,0,0,1),i.scale(O,O,[J.drawingBufferWidth,J.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(D,J.TRIANGLES,An.disabled,this.stencilClearMode,wt.disabled,wr.disabled,On(O),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},mo.prototype._renderTileClippingMasks=function(D,J){if(!(this.currentStencilSource===D.source||!D.isTileClipped()||!J||!J.length)){this.currentStencilSource=D.source;var O=this.context,K=O.gl;this.nextStencilID+J.length>256&&this.clearStencil(),O.setColorMode(wt.disabled),O.setDepthMode(An.disabled);var de=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ne=0,we=J;ne<we.length;ne+=1){var Oe=we[ne],ht=this._tileClippingMaskIDs[Oe.key]=this.nextStencilID++;de.draw(O,K.TRIANGLES,An.disabled,new Vi({func:K.ALWAYS,mask:0},ht,255,K.KEEP,K.KEEP,K.REPLACE),wt.disabled,wr.disabled,On(Oe.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},mo.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var D=this.nextStencilID++,J=this.context.gl;return new Vi({func:J.NOTEQUAL,mask:255},D,255,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilModeForClipping=function(D){var J=this.context.gl;return new Vi({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[D.key],0,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilConfigForOverlap=function(D){var J,O=this.context.gl,K=D.sort(function(ht,Yt){return Yt.overscaledZ-ht.overscaledZ}),de=K[K.length-1].overscaledZ,ne=K[0].overscaledZ-de+1;if(ne>1){this.currentStencilSource=void 0,this.nextStencilID+ne>256&&this.clearStencil();for(var we={},Oe=0;Oe<ne;Oe++)we[Oe+de]=new Vi({func:O.GEQUAL,mask:255},Oe+this.nextStencilID,255,O.KEEP,O.KEEP,O.REPLACE);return this.nextStencilID+=ne,[we,K]}return[(J={},J[de]=Vi.disabled,J),K]},mo.prototype.colorModeForRenderPass=function(){var D=this.context.gl;if(this._showOverdrawInspector){var J=8,O=1/J;return new wt([D.CONSTANT_COLOR,D.ONE],new i.Color(O,O,O,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?wt.unblended:wt.alphaBlended},mo.prototype.depthModeForSublayer=function(D,J,O){if(!this.opaquePassEnabledForLayer())return An.disabled;var K=1-((1+this.currentLayer)*this.numSublayers+D)*this.depthEpsilon;return new An(O||this.context.gl.LEQUAL,J,[K,K])},mo.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},mo.prototype.render=function(D,J){var O=this;this.style=D,this.options=J,this.lineAtlas=D.lineAtlas,this.imageManager=D.imageManager,this.glyphManager=D.glyphManager,this.symbolFadeChange=D.placement.symbolFadeChange(i.browser.now()),this.imageManager.beginFrame();var K=this.style._order,de=this.style.sourceCaches;for(var ne in de){var we=de[ne];we.used&&we.prepare(this.context)}var Oe={},ht={},Yt={};for(var cr in de){var Nt=de[cr];Oe[cr]=Nt.getVisibleCoordinates(),ht[cr]=Oe[cr].slice().reverse(),Yt[cr]=Nt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Ne=0;Ne<K.length;Ne++){var $e=K[Ne];if(this.style._layers[$e].is3D()){this.opaquePassCutoff=Ne;break}}this.renderPass="offscreen";for(var st=0,It=K;st<It.length;st+=1){var Bt=It[st],Ft=this.style._layers[Bt];if(!(!Ft.hasOffscreenPass()||Ft.isHidden(this.transform.zoom))){var Ut=ht[Ft.source];Ft.type!=="custom"&&!Ut.length||this.renderLayer(this,de[Ft.source],Ft,Ut)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:J.showOverdrawInspector?i.Color.black:i.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=J.showOverdrawInspector,this.depthRangeFor3D=[0,1-(D._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=K.length-1;this.currentLayer>=0;this.currentLayer--){var zt=this.style._layers[K[this.currentLayer]],_t=de[zt.source],Dt=Oe[zt.source];this._renderTileClippingMasks(zt,Dt),this.renderLayer(this,_t,zt,Dt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<K.length;this.currentLayer++){var vt=this.style._layers[K[this.currentLayer]],lr=de[vt.source],_r=(vt.type==="symbol"?Yt:ht)[vt.source];this._renderTileClippingMasks(vt,Oe[vt.source]),this.renderLayer(this,lr,vt,_r)}if(this.options.showTileBoundaries){var Br,Di,ci=i.values(this.style._layers);ci.forEach(function(bi){bi.source&&!bi.isHidden(O.transform.zoom)&&(bi.source!==(Di&&Di.id)&&(Di=O.style.sourceCaches[bi.source]),(!Br||Br.getSource().maxzoom<Di.getSource().maxzoom)&&(Br=Di))}),Br&&Qa.debug(this,Br,Br.getVisibleCoordinates())}this.options.showPadding&&Ci(this),this.context.setDefault()},mo.prototype.renderLayer=function(D,J,O,K){O.isHidden(this.transform.zoom)||O.type!=="background"&&O.type!=="custom"&&!K.length||(this.id=O.id,this.gpuTimingStart(O),Qa[O.type](D,J,O,K,this.style.placement.variableOffsets),this.gpuTimingEnd())},mo.prototype.gpuTimingStart=function(D){if(this.options.gpuTiming){var J=this.context.extTimerQuery,O=this.gpuTimers[D.id];O||(O=this.gpuTimers[D.id]={calls:0,cpuTime:0,query:J.createQueryEXT()}),O.calls++,J.beginQueryEXT(J.TIME_ELAPSED_EXT,O.query)}},mo.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var D=this.context.extTimerQuery;D.endQueryEXT(D.TIME_ELAPSED_EXT)}},mo.prototype.collectGpuTimers=function(){var D=this.gpuTimers;return this.gpuTimers={},D},mo.prototype.queryGpuTimers=function(D){var J={};for(var O in D){var K=D[O],de=this.context.extTimerQuery,ne=de.getQueryObjectEXT(K.query,de.QUERY_RESULT_EXT)/(1e3*1e3);de.deleteQueryEXT(K.query),J[O]=ne}return J},mo.prototype.translatePosMatrix=function(D,J,O,K,de){if(!O[0]&&!O[1])return D;var ne=de?K==="map"?this.transform.angle:0:K==="viewport"?-this.transform.angle:0;if(ne){var we=Math.sin(ne),Oe=Math.cos(ne);O=[O[0]*Oe-O[1]*we,O[0]*we+O[1]*Oe]}var ht=[de?O[0]:As(J,O[0],this.transform.zoom),de?O[1]:As(J,O[1],this.transform.zoom),0],Yt=new Float32Array(16);return i.translate(Yt,D,ht),Yt},mo.prototype.saveTileTexture=function(D){var J=this._tileTextures[D.size[0]];J?J.push(D):this._tileTextures[D.size[0]]=[D]},mo.prototype.getTileTexture=function(D){var J=this._tileTextures[D];return J&&J.length>0?J.pop():null},mo.prototype.isPatternMissing=function(D){if(!D)return!1;if(!D.from||!D.to)return!0;var J=this.imageManager.getPattern(D.from.toString()),O=this.imageManager.getPattern(D.to.toString());return!J||!O},mo.prototype.useProgram=function(D,J){this.cache=this.cache||{};var O=""+D+(J?J.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[O]||(this.cache[O]=new Rf(this.context,D,wf[D],J,oo[D],this._showOverdrawInspector)),this.cache[O]},mo.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()},mo.prototype.setBaseState=function(){var D=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(D.FUNC_ADD)},mo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var D=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,D.RGBA)}},mo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Bo=function(D,J){this.points=D,this.planes=J};Bo.fromInvProjectionMatrix=function(D,J,O){var K=[[-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]],de=Math.pow(2,O),ne=K.map(function(ht){return i.transformMat4([],ht,D)}).map(function(ht){return i.scale$1([],ht,1/ht[3]/J*de)}),we=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Oe=we.map(function(ht){var Yt=i.sub([],ne[ht[0]],ne[ht[1]]),cr=i.sub([],ne[ht[2]],ne[ht[1]]),Nt=i.normalize([],i.cross([],Yt,cr)),Ne=-i.dot(Nt,ne[ht[1]]);return Nt.concat(Ne)});return new Bo(ne,Oe)};var Ps=function(D,J){this.min=D,this.max=J,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ps.prototype.quadrant=function(D){for(var J=[D%2===0,D<2],O=i.clone$2(this.min),K=i.clone$2(this.max),de=0;de<J.length;de++)O[de]=J[de]?this.min[de]:this.center[de],K[de]=J[de]?this.center[de]:this.max[de];return K[2]=this.max[2],new Ps(O,K)},Ps.prototype.distanceX=function(D){var J=Math.max(Math.min(this.max[0],D[0]),this.min[0]);return J-D[0]},Ps.prototype.distanceY=function(D){var J=Math.max(Math.min(this.max[1],D[1]),this.min[1]);return J-D[1]},Ps.prototype.intersects=function(D){for(var J=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],O=!0,K=0;K<D.planes.length;K++){for(var de=D.planes[K],ne=0,we=0;we<J.length;we++)ne+=i.dot$1(de,J[we])>=0;if(ne===0)return 0;ne!==J.length&&(O=!1)}if(O)return 2;for(var Oe=0;Oe<3;Oe++){for(var ht=Number.MAX_VALUE,Yt=-Number.MAX_VALUE,cr=0;cr<D.points.length;cr++){var Nt=D.points[cr][Oe]-this.min[Oe];ht=Math.min(ht,Nt),Yt=Math.max(Yt,Nt)}if(Yt<0||ht>this.max[Oe]-this.min[Oe])return 0}return 1};var Ts=function(D,J,O,K){if(D===void 0&&(D=0),J===void 0&&(J=0),O===void 0&&(O=0),K===void 0&&(K=0),isNaN(D)||D<0||isNaN(J)||J<0||isNaN(O)||O<0||isNaN(K)||K<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=D,this.bottom=J,this.left=O,this.right=K};Ts.prototype.interpolate=function(D,J,O){return J.top!=null&&D.top!=null&&(this.top=i.number(D.top,J.top,O)),J.bottom!=null&&D.bottom!=null&&(this.bottom=i.number(D.bottom,J.bottom,O)),J.left!=null&&D.left!=null&&(this.left=i.number(D.left,J.left,O)),J.right!=null&&D.right!=null&&(this.right=i.number(D.right,J.right,O)),this},Ts.prototype.getCenter=function(D,J){var O=i.clamp((this.left+D-this.right)/2,0,D),K=i.clamp((this.top+J-this.bottom)/2,0,J);return new i.Point(O,K)},Ts.prototype.equals=function(D){return this.top===D.top&&this.bottom===D.bottom&&this.left===D.left&&this.right===D.right},Ts.prototype.clone=function(){return new Ts(this.top,this.bottom,this.left,this.right)},Ts.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wo=function(D,J,O,K,de){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=de===void 0?!0:de,this._minZoom=D||0,this._maxZoom=J||22,this._minPitch=O==null?0:O,this._maxPitch=K==null?60:K,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ts,this._posMatrixCache={},this._alignedPosMatrixCache={}},To={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}};wo.prototype.clone=function(){var D=new wo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return D.tileSize=this.tileSize,D.latRange=this.latRange,D.width=this.width,D.height=this.height,D._center=this._center,D.zoom=this.zoom,D.angle=this.angle,D._fov=this._fov,D._pitch=this._pitch,D._unmodified=this._unmodified,D._edgeInsets=this._edgeInsets.clone(),D._calcMatrices(),D},To.minZoom.get=function(){return this._minZoom},To.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},To.maxZoom.get=function(){return this._maxZoom},To.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},To.minPitch.get=function(){return this._minPitch},To.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},To.maxPitch.get=function(){return this._maxPitch},To.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},To.renderWorldCopies.get=function(){return this._renderWorldCopies},To.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},To.worldSize.get=function(){return this.tileSize*this.scale},To.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},To.size.get=function(){return new i.Point(this.width,this.height)},To.bearing.get=function(){return-this.angle/Math.PI*180},To.bearing.set=function(Y){var D=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==D&&(this._unmodified=!1,this.angle=D,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},To.pitch.get=function(){return this._pitch/Math.PI*180},To.pitch.set=function(Y){var D=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==D&&(this._unmodified=!1,this._pitch=D,this._calcMatrices())},To.fov.get=function(){return this._fov/Math.PI*180},To.fov.set=function(Y){Y=Math.max(.01,Math.min(60,Y)),this._fov!==Y&&(this._unmodified=!1,this._fov=Y/180*Math.PI,this._calcMatrices())},To.zoom.get=function(){return this._zoom},To.zoom.set=function(Y){var D=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==D&&(this._unmodified=!1,this._zoom=D,this.scale=this.zoomScale(D),this.tileZoom=Math.floor(D),this.zoomFraction=D-this.tileZoom,this._constrain(),this._calcMatrices())},To.center.get=function(){return this._center},To.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},To.padding.get=function(){return this._edgeInsets.toJSON()},To.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},To.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wo.prototype.isPaddingEqual=function(D){return this._edgeInsets.equals(D)},wo.prototype.interpolatePadding=function(D,J,O){this._unmodified=!1,this._edgeInsets.interpolate(D,J,O),this._constrain(),this._calcMatrices()},wo.prototype.coveringZoomLevel=function(D){var J=(D.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/D.tileSize));return Math.max(0,J)},wo.prototype.getVisibleUnwrappedCoordinates=function(D){var J=[new i.UnwrappedTileID(0,D)];if(this._renderWorldCopies)for(var O=this.pointCoordinate(new i.Point(0,0)),K=this.pointCoordinate(new i.Point(this.width,0)),de=this.pointCoordinate(new i.Point(this.width,this.height)),ne=this.pointCoordinate(new i.Point(0,this.height)),we=Math.floor(Math.min(O.x,K.x,de.x,ne.x)),Oe=Math.floor(Math.max(O.x,K.x,de.x,ne.x)),ht=1,Yt=we-ht;Yt<=Oe+ht;Yt++)Yt!==0&&J.push(new i.UnwrappedTileID(Yt,D));return J},wo.prototype.coveringTiles=function(D){var J=this.coveringZoomLevel(D),O=J;if(D.minzoom!==void 0&&J<D.minzoom)return[];D.maxzoom!==void 0&&J>D.maxzoom&&(J=D.maxzoom);var K=i.MercatorCoordinate.fromLngLat(this.center),de=Math.pow(2,J),ne=[de*K.x,de*K.y,0],we=Bo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,J),Oe=D.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Oe=J);var ht=3,Yt=function(ci){return{aabb:new Ps([ci*de,0,0],[(ci+1)*de,de,0]),zoom:0,x:0,y:0,wrap:ci,fullyVisible:!1}},cr=[],Nt=[],Ne=J,$e=D.reparseOverscaled?O:J;if(this._renderWorldCopies)for(var st=1;st<=3;st++)cr.push(Yt(-st)),cr.push(Yt(st));for(cr.push(Yt(0));cr.length>0;){var It=cr.pop(),Bt=It.x,Ft=It.y,Ut=It.fullyVisible;if(!Ut){var zt=It.aabb.intersects(we);if(zt===0)continue;Ut=zt===2}var _t=It.aabb.distanceX(ne),Dt=It.aabb.distanceY(ne),vt=Math.max(Math.abs(_t),Math.abs(Dt)),lr=ht+(1<<Ne-It.zoom)-2;if(It.zoom===Ne||vt>lr&&It.zoom>=Oe){Nt.push({tileID:new i.OverscaledTileID(It.zoom===Ne?$e:It.zoom,It.wrap,It.zoom,Bt,Ft),distanceSq:i.sqrLen([ne[0]-.5-Bt,ne[1]-.5-Ft])});continue}for(var _r=0;_r<4;_r++){var Br=(Bt<<1)+_r%2,Di=(Ft<<1)+(_r>>1);cr.push({aabb:It.aabb.quadrant(_r),zoom:It.zoom+1,x:Br,y:Di,wrap:It.wrap,fullyVisible:Ut})}}return Nt.sort(function(ci,bi){return ci.distanceSq-bi.distanceSq}).map(function(ci){return ci.tileID})},wo.prototype.resize=function(D,J){this.width=D,this.height=J,this.pixelsToGLUnits=[2/D,-2/J],this._constrain(),this._calcMatrices()},To.unmodified.get=function(){return this._unmodified},wo.prototype.zoomScale=function(D){return Math.pow(2,D)},wo.prototype.scaleZoom=function(D){return Math.log(D)/Math.LN2},wo.prototype.project=function(D){var J=i.clamp(D.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(D.lng)*this.worldSize,i.mercatorYfromLat(J)*this.worldSize)},wo.prototype.unproject=function(D){return new i.MercatorCoordinate(D.x/this.worldSize,D.y/this.worldSize).toLngLat()},To.point.get=function(){return this.project(this.center)},wo.prototype.setLocationAtPoint=function(D,J){var O=this.pointCoordinate(J),K=this.pointCoordinate(this.centerPoint),de=this.locationCoordinate(D),ne=new i.MercatorCoordinate(de.x-(O.x-K.x),de.y-(O.y-K.y));this.center=this.coordinateLocation(ne),this._renderWorldCopies&&(this.center=this.center.wrap())},wo.prototype.locationPoint=function(D){return this.coordinatePoint(this.locationCoordinate(D))},wo.prototype.pointLocation=function(D){return this.coordinateLocation(this.pointCoordinate(D))},wo.prototype.locationCoordinate=function(D){return i.MercatorCoordinate.fromLngLat(D)},wo.prototype.coordinateLocation=function(D){return D.toLngLat()},wo.prototype.pointCoordinate=function(D){var J=0,O=[D.x,D.y,0,1],K=[D.x,D.y,1,1];i.transformMat4(O,O,this.pixelMatrixInverse),i.transformMat4(K,K,this.pixelMatrixInverse);var de=O[3],ne=K[3],we=O[0]/de,Oe=K[0]/ne,ht=O[1]/de,Yt=K[1]/ne,cr=O[2]/de,Nt=K[2]/ne,Ne=cr===Nt?0:(J-cr)/(Nt-cr);return new i.MercatorCoordinate(i.number(we,Oe,Ne)/this.worldSize,i.number(ht,Yt,Ne)/this.worldSize)},wo.prototype.coordinatePoint=function(D){var J=[D.x*this.worldSize,D.y*this.worldSize,0,1];return i.transformMat4(J,J,this.pixelMatrix),new i.Point(J[0]/J[3],J[1]/J[3])},wo.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},wo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},wo.prototype.setMaxBounds=function(D){D?(this.lngRange=[D.getWest(),D.getEast()],this.latRange=[D.getSouth(),D.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wo.prototype.calculatePosMatrix=function(D,J){J===void 0&&(J=!1);var O=D.key,K=J?this._alignedPosMatrixCache:this._posMatrixCache;if(K[O])return K[O];var de=D.canonical,ne=this.worldSize/this.zoomScale(de.z),we=de.x+Math.pow(2,de.z)*D.wrap,Oe=i.identity(new Float64Array(16));return i.translate(Oe,Oe,[we*ne,de.y*ne,0]),i.scale(Oe,Oe,[ne/i.EXTENT,ne/i.EXTENT,1]),i.multiply(Oe,J?this.alignedProjMatrix:this.projMatrix,Oe),K[O]=new Float32Array(Oe),K[O]},wo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var D=-90,J=90,O=-180,K=180,de,ne,we,Oe,ht=this.size,Yt=this._unmodified;if(this.latRange){var cr=this.latRange;D=i.mercatorYfromLat(cr[1])*this.worldSize,J=i.mercatorYfromLat(cr[0])*this.worldSize,de=J-D<ht.y?ht.y/(J-D):0}if(this.lngRange){var Nt=this.lngRange;O=i.mercatorXfromLng(Nt[0])*this.worldSize,K=i.mercatorXfromLng(Nt[1])*this.worldSize,ne=K-O<ht.x?ht.x/(K-O):0}var Ne=this.point,$e=Math.max(ne||0,de||0);if($e){this.center=this.unproject(new i.Point(ne?(K+O)/2:Ne.x,de?(J+D)/2:Ne.y)),this.zoom+=this.scaleZoom($e),this._unmodified=Yt,this._constraining=!1;return}if(this.latRange){var st=Ne.y,It=ht.y/2;st-It<D&&(Oe=D+It),st+It>J&&(Oe=J-It)}if(this.lngRange){var Bt=Ne.x,Ft=ht.x/2;Bt-Ft<O&&(we=O+Ft),Bt+Ft>K&&(we=K-Ft)}(we!==void 0||Oe!==void 0)&&(this.center=this.unproject(new i.Point(we!==void 0?we:Ne.x,Oe!==void 0?Oe:Ne.y))),this._unmodified=Yt,this._constraining=!1}},wo.prototype._calcMatrices=function(){if(this.height){var D=this._fov/2,J=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(D)*this.height;var O=Math.PI/2+this._pitch,K=this._fov*(.5+J.y/this.height),de=Math.sin(K)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-O-K,.01,Math.PI-.01)),ne=this.point,we=ne.x,Oe=ne.y,ht=Math.cos(Math.PI/2-this._pitch)*de+this.cameraToCenterDistance,Yt=ht*1.01,cr=this.height/50,Nt=new Float64Array(16);i.perspective(Nt,this._fov,this.width/this.height,cr,Yt),Nt[8]=-J.x*2/this.width,Nt[9]=J.y*2/this.height,i.scale(Nt,Nt,[1,-1,1]),i.translate(Nt,Nt,[0,0,-this.cameraToCenterDistance]),i.rotateX(Nt,Nt,this._pitch),i.rotateZ(Nt,Nt,this.angle),i.translate(Nt,Nt,[-we,-Oe,0]),this.mercatorMatrix=i.scale([],Nt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(Nt,Nt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Nt,this.invProjMatrix=i.invert([],this.projMatrix);var Ne=this.width%2/2,$e=this.height%2/2,st=Math.cos(this.angle),It=Math.sin(this.angle),Bt=we-Math.round(we)+st*Ne+It*$e,Ft=Oe-Math.round(Oe)+st*$e+It*Ne,Ut=new Float64Array(Nt);if(i.translate(Ut,Ut,[Bt>.5?Bt-1:Bt,Ft>.5?Ft-1:Ft,0]),this.alignedProjMatrix=Ut,Nt=i.create(),i.scale(Nt,Nt,[this.width/2,-this.height/2,1]),i.translate(Nt,Nt,[1,-1,0]),this.labelPlaneMatrix=Nt,Nt=i.create(),i.scale(Nt,Nt,[1,-1,1]),i.translate(Nt,Nt,[-1,-1,0]),i.scale(Nt,Nt,[2/this.width,2/this.height,1]),this.glCoordMatrix=Nt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Nt=i.invert(new Float64Array(16),this.pixelMatrix),!Nt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Nt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var D=this.pointCoordinate(new i.Point(0,0)),J=[D.x*this.worldSize,D.y*this.worldSize,0,1],O=i.transformMat4(J,J,this.pixelMatrix);return O[3]/this.cameraToCenterDistance},wo.prototype.getCameraPoint=function(){var D=this._pitch,J=Math.tan(D)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,J))},wo.prototype.getCameraQueryGeometry=function(D){var J=this.getCameraPoint();if(D.length===1)return[D[0],J];for(var O=J.x,K=J.y,de=J.x,ne=J.y,we=0,Oe=D;we<Oe.length;we+=1){var ht=Oe[we];O=Math.min(O,ht.x),K=Math.min(K,ht.y),de=Math.max(de,ht.x),ne=Math.max(ne,ht.y)}return[new i.Point(O,K),new i.Point(de,K),new i.Point(de,ne),new i.Point(O,ne),new i.Point(O,K)]},Object.defineProperties(wo.prototype,To);function hl(Y,D){var J=!1,O=null,K=function(){O=null,J&&(Y(),O=setTimeout(K,D),J=!1)};return function(){return J=!0,O||K(),O}}var Ul=function(D){this._hashName=D&&encodeURIComponent(D),i.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=hl(this._updateHashUnthrottled.bind(this),30*1e3/100)};Ul.prototype.addTo=function(D){return this._map=D,i.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Ul.prototype.remove=function(){return i.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Ul.prototype.getHashString=function(D){var J=this._map.getCenter(),O=Math.round(this._map.getZoom()*100)/100,K=Math.ceil((O*Math.LN2+Math.log(512/360/.5))/Math.LN10),de=Math.pow(10,K),ne=Math.round(J.lng*de)/de,we=Math.round(J.lat*de)/de,Oe=this._map.getBearing(),ht=this._map.getPitch(),Yt="";if(D?Yt+="/"+ne+"/"+we+"/"+O:Yt+=O+"/"+we+"/"+ne,(Oe||ht)&&(Yt+="/"+Math.round(Oe*10)/10),ht&&(Yt+="/"+Math.round(ht)),this._hashName){var cr=this._hashName,Nt=!1,Ne=i.window.location.hash.slice(1).split("&").map(function($e){var st=$e.split("=")[0];return st===cr?(Nt=!0,st+"="+Yt):$e}).filter(function($e){return $e});return Nt||Ne.push(cr+"="+Yt),"#"+Ne.join("&")}return"#"+Yt},Ul.prototype._getCurrentHash=function(){var D=this,J=i.window.location.hash.replace("#","");if(this._hashName){var O;return J.split("&").map(function(K){return K.split("=")}).forEach(function(K){K[0]===D._hashName&&(O=K)}),(O&&O[1]||"").split("/")}return J.split("/")},Ul.prototype._onHashChange=function(){var D=this._getCurrentHash();if(D.length>=3&&!D.some(function(O){return isNaN(O)})){var J=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(D[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+D[2],+D[1]],zoom:+D[0],bearing:J,pitch:+(D[4]||0)}),!0}return!1},Ul.prototype._updateHashUnthrottled=function(){var D=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,D)}catch(J){}};var Lu={linearity:.3,easing:i.bezier(0,0,.3,1)},au=i.extend({deceleration:2500,maxSpeed:1400},Lu),Js=i.extend({deceleration:20,maxSpeed:1400},Lu),eu=i.extend({deceleration:1e3,maxSpeed:360},Lu),dc=i.extend({deceleration:1e3,maxSpeed:90},Lu),Tl=function(D){this._map=D,this.clear()};Tl.prototype.clear=function(){this._inertiaBuffer=[]},Tl.prototype.record=function(D){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:D})},Tl.prototype._drainInertiaBuffer=function(){for(var D=this._inertiaBuffer,J=i.browser.now(),O=160;D.length>0&&J-D[0].time>O;)D.shift()},Tl.prototype._onMoveEnd=function(D){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var J={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},O=0,K=this._inertiaBuffer;O<K.length;O+=1){var de=K[O],ne=de.settings;J.zoom+=ne.zoomDelta||0,J.bearing+=ne.bearingDelta||0,J.pitch+=ne.pitchDelta||0,ne.panDelta&&J.pan._add(ne.panDelta),ne.around&&(J.around=ne.around),ne.pinchAround&&(J.pinchAround=ne.pinchAround)}var we=this._inertiaBuffer[this._inertiaBuffer.length-1],Oe=we.time-this._inertiaBuffer[0].time,ht={};if(J.pan.mag()){var Yt=X(J.pan.mag(),Oe,i.extend({},au,D||{}));ht.offset=J.pan.mult(Yt.amount/J.pan.mag()),ht.center=this._map.transform.center,Al(ht,Yt)}if(J.zoom){var cr=X(J.zoom,Oe,Js);ht.zoom=this._map.transform.zoom+cr.amount,Al(ht,cr)}if(J.bearing){var Nt=X(J.bearing,Oe,eu);ht.bearing=this._map.transform.bearing+i.clamp(Nt.amount,-179,179),Al(ht,Nt)}if(J.pitch){var Ne=X(J.pitch,Oe,dc);ht.pitch=this._map.transform.pitch+Ne.amount,Al(ht,Ne)}if(ht.zoom||ht.bearing){var $e=J.pinchAround===void 0?J.around:J.pinchAround;ht.around=$e?this._map.unproject($e):this._map.getCenter()}return this.clear(),i.extend(ht,{noMoveStart:!0})}};function Al(Y,D){(!Y.duration||Y.duration<D.duration)&&(Y.duration=D.duration,Y.easing=D.easing)}function X(Y,D,J){var O=J.maxSpeed,K=J.linearity,de=J.deceleration,ne=i.clamp(Y*K/(D/1e3),-O,O),we=Math.abs(ne)/(de*K);return{easing:J.easing,duration:we*1e3,amount:ne*(we/2)}}var se=function(Y){function D(O,K,de,ne){ne===void 0&&(ne={});var we=o.mousePos(K.getCanvasContainer(),de),Oe=K.unproject(we);Y.call(this,O,i.extend({point:we,lngLat:Oe,originalEvent:de},ne)),this._defaultPrevented=!1,this.target=K}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),Te=function(Y){function D(O,K,de){var ne=O==="touchend"?de.changedTouches:de.touches,we=o.touchPos(K.getCanvasContainer(),ne),Oe=we.map(function(cr){return K.unproject(cr)}),ht=we.reduce(function(cr,Nt,Ne,$e){return cr.add(Nt.div($e.length))},new i.Point(0,0)),Yt=K.unproject(ht);Y.call(this,O,{points:we,point:ht,lngLats:Oe,lngLat:Yt,originalEvent:de}),this._defaultPrevented=!1}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),qe=function(Y){function D(O,K,de){Y.call(this,O,{originalEvent:de}),this._defaultPrevented=!1}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={defaultPrevented:{configurable:!0}};return D.prototype.preventDefault=function(){this._defaultPrevented=!0},J.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(D.prototype,J),D}(i.Event),Ve=function(D,J){this._map=D,this._clickTolerance=J.clickTolerance};Ve.prototype.reset=function(){delete this._mousedownPos},Ve.prototype.wheel=function(D){return this._firePreventable(new qe(D.type,this._map,D))},Ve.prototype.mousedown=function(D,J){return this._mousedownPos=J,this._firePreventable(new se(D.type,this._map,D))},Ve.prototype.mouseup=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.click=function(D,J){this._mousedownPos&&this._mousedownPos.dist(J)>=this._clickTolerance||this._map.fire(new se(D.type,this._map,D))},Ve.prototype.dblclick=function(D){return this._firePreventable(new se(D.type,this._map,D))},Ve.prototype.mouseover=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.mouseout=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.touchstart=function(D){return this._firePreventable(new Te(D.type,this._map,D))},Ve.prototype.touchmove=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype.touchend=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype.touchcancel=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype._firePreventable=function(D){if(this._map.fire(D),D.defaultPrevented)return{}},Ve.prototype.isEnabled=function(){return!0},Ve.prototype.isActive=function(){return!1},Ve.prototype.enable=function(){},Ve.prototype.disable=function(){};var Ye=function(D){this._map=D};Ye.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ye.prototype.mousemove=function(D){this._map.fire(new se(D.type,this._map,D))},Ye.prototype.mousedown=function(){this._delayContextMenu=!0},Ye.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ye.prototype.contextmenu=function(D){this._delayContextMenu?this._contextMenuEvent=D:this._map.fire(new se(D.type,this._map,D)),this._map.listens("contextmenu")&&D.preventDefault()},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var Pt=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._container=D.getContainer(),this._clickTolerance=J.clickTolerance||1};Pt.prototype.isEnabled=function(){return!!this._enabled},Pt.prototype.isActive=function(){return!!this._active},Pt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Pt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Pt.prototype.mousedown=function(D,J){this.isEnabled()&&D.shiftKey&&D.button===0&&(o.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)},Pt.prototype.mousemoveWindow=function(D,J){if(this._active){var O=J;if(!(this._lastPos.equals(O)||!this._box&&O.dist(this._startPos)<this._clickTolerance)){var K=this._startPos;this._lastPos=O,this._box||(this._box=o.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",D));var de=Math.min(K.x,O.x),ne=Math.max(K.x,O.x),we=Math.min(K.y,O.y),Oe=Math.max(K.y,O.y);o.setTransform(this._box,"translate("+de+"px,"+we+"px)"),this._box.style.width=ne-de+"px",this._box.style.height=Oe-we+"px"}}},Pt.prototype.mouseupWindow=function(D,J){var O=this;if(this._active&&D.button===0){var K=this._startPos,de=J;if(this.reset(),o.suppressClick(),K.x===de.x&&K.y===de.y)this._fireEvent("boxzoomcancel",D);else return this._map.fire(new i.Event("boxzoomend",{originalEvent:D})),{cameraAnimation:function(ne){return ne.fitScreenCoordinates(K,de,O._map.getBearing(),{linear:!0})}}}},Pt.prototype.keydown=function(D){this._active&&D.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",D))},Pt.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos},Pt.prototype._fireEvent=function(D,J){return this._map.fire(new i.Event(D,{originalEvent:J}))};function ot(Y,D){for(var J={},O=0;O<Y.length;O++)J[Y[O].identifier]=D[O];return J}function Xt(Y){for(var D=new i.Point(0,0),J=0,O=Y;J<O.length;J+=1){var K=O[J];D._add(K)}return D.div(Y.length)}var dr=500,pr=500,Ur=30,zr=function(D){this.reset(),this.numTouches=D.numTouches};zr.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},zr.prototype.touchstart=function(D,J,O){(this.centroid||O.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=D.timeStamp),O.length===this.numTouches&&(this.centroid=Xt(J),this.touches=ot(O,J)))},zr.prototype.touchmove=function(D,J,O){if(!(this.aborted||!this.centroid)){var K=ot(O,J);for(var de in this.touches){var ne=this.touches[de],we=K[de];(!we||we.dist(ne)>Ur)&&(this.aborted=!0)}}},zr.prototype.touchend=function(D,J,O){if((!this.centroid||D.timeStamp-this.startTime>pr)&&(this.aborted=!0),O.length===0){var K=!this.aborted&&this.centroid;if(this.reset(),K)return K}};var gi=function(D){this.singleTap=new zr(D),this.numTaps=D.numTaps,this.reset()};gi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},gi.prototype.touchstart=function(D,J,O){this.singleTap.touchstart(D,J,O)},gi.prototype.touchmove=function(D,J,O){this.singleTap.touchmove(D,J,O)},gi.prototype.touchend=function(D,J,O){var K=this.singleTap.touchend(D,J,O);if(K){var de=D.timeStamp-this.lastTime<dr,ne=!this.lastTap||this.lastTap.dist(K)<Ur;if((!de||!ne)&&this.reset(),this.count++,this.lastTime=D.timeStamp,this.lastTap=K,this.count===this.numTaps)return this.reset(),K}};var xi=function(){this._zoomIn=new gi({numTouches:1,numTaps:2}),this._zoomOut=new gi({numTouches:2,numTaps:1}),this.reset()};xi.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},xi.prototype.touchstart=function(D,J,O){this._zoomIn.touchstart(D,J,O),this._zoomOut.touchstart(D,J,O)},xi.prototype.touchmove=function(D,J,O){this._zoomIn.touchmove(D,J,O),this._zoomOut.touchmove(D,J,O)},xi.prototype.touchend=function(D,J,O){var K=this,de=this._zoomIn.touchend(D,J,O),ne=this._zoomOut.touchend(D,J,O);if(de)return this._active=!0,D.preventDefault(),setTimeout(function(){return K.reset()},0),{cameraAnimation:function(we){return we.easeTo({duration:300,zoom:we.getZoom()+1,around:we.unproject(de)},{originalEvent:D})}};if(ne)return this._active=!0,D.preventDefault(),setTimeout(function(){return K.reset()},0),{cameraAnimation:function(we){return we.easeTo({duration:300,zoom:we.getZoom()-1,around:we.unproject(ne)},{originalEvent:D})}}},xi.prototype.touchcancel=function(){this.reset()},xi.prototype.enable=function(){this._enabled=!0},xi.prototype.disable=function(){this._enabled=!1,this.reset()},xi.prototype.isEnabled=function(){return this._enabled},xi.prototype.isActive=function(){return this._active};var Wr=0,ii=2,di={};di[Wr]=1,di[ii]=2;function Li(Y,D){var J=di[D];return Y.buttons===void 0||(Y.buttons&J)!==J}var Ti=function(D){this.reset(),this._clickTolerance=D.clickTolerance||1};Ti.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Ti.prototype._correctButton=function(D,J){return!1},Ti.prototype._move=function(D,J){return{}},Ti.prototype.mousedown=function(D,J){if(!this._lastPoint){var O=o.mouseButton(D);this._correctButton(D,O)&&(this._lastPoint=J,this._eventButton=O)}},Ti.prototype.mousemoveWindow=function(D,J){var O=this._lastPoint;if(O){if(D.preventDefault(),Li(D,this._eventButton)){this.reset();return}if(!(!this._moved&&J.dist(O)<this._clickTolerance))return this._moved=!0,this._lastPoint=J,this._move(O,J)}},Ti.prototype.mouseupWindow=function(D){if(this._lastPoint){var J=o.mouseButton(D);J===this._eventButton&&(this._moved&&o.suppressClick(),this.reset())}},Ti.prototype.enable=function(){this._enabled=!0},Ti.prototype.disable=function(){this._enabled=!1,this.reset()},Ti.prototype.isEnabled=function(){return this._enabled},Ti.prototype.isActive=function(){return this._active};var Qr=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.mousedown=function(O,K){Y.prototype.mousedown.call(this,O,K),this._lastPoint&&(this._active=!0)},D.prototype._correctButton=function(O,K){return K===Wr&&!O.ctrlKey},D.prototype._move=function(O,K){return{around:K,panDelta:K.sub(O)}},D}(Ti),Pn=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype._correctButton=function(O,K){return K===Wr&&O.ctrlKey||K===ii},D.prototype._move=function(O,K){var de=.8,ne=(K.x-O.x)*de;if(ne)return this._active=!0,{bearingDelta:ne}},D.prototype.contextmenu=function(O){O.preventDefault()},D}(Ti),kn=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype._correctButton=function(O,K){return K===Wr&&O.ctrlKey||K===ii},D.prototype._move=function(O,K){var de=-.5,ne=(K.y-O.y)*de;if(ne)return this._active=!0,{pitchDelta:ne}},D.prototype.contextmenu=function(O){O.preventDefault()},D}(Ti),Bn=function(D){this._minTouches=1,this._clickTolerance=D.clickTolerance||1,this.reset()};Bn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new i.Point(0,0)},Bn.prototype.touchstart=function(D,J,O){return this._calculateTransform(D,J,O)},Bn.prototype.touchmove=function(D,J,O){if(!(!this._active||O.length<this._minTouches))return D.preventDefault(),this._calculateTransform(D,J,O)},Bn.prototype.touchend=function(D,J,O){this._calculateTransform(D,J,O),this._active&&O.length<this._minTouches&&this.reset()},Bn.prototype.touchcancel=function(){this.reset()},Bn.prototype._calculateTransform=function(D,J,O){O.length>0&&(this._active=!0);var K=ot(O,J),de=new i.Point(0,0),ne=new i.Point(0,0),we=0;for(var Oe in K){var ht=K[Oe],Yt=this._touches[Oe];Yt&&(de._add(ht),ne._add(ht.sub(Yt)),we++,K[Oe]=ht)}if(this._touches=K,!(we<this._minTouches||!ne.mag())){var cr=ne.div(we);if(this._sum._add(cr),!(this._sum.mag()<this._clickTolerance)){var Nt=de.div(we);return{around:Nt,panDelta:cr}}}},Bn.prototype.enable=function(){this._enabled=!0},Bn.prototype.disable=function(){this._enabled=!1,this.reset()},Bn.prototype.isEnabled=function(){return this._enabled},Bn.prototype.isActive=function(){return this._active};var na=function(){this.reset()};na.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},na.prototype._start=function(D){},na.prototype._move=function(D,J,O){return{}},na.prototype.touchstart=function(D,J,O){this._firstTwoTouches||O.length<2||(this._firstTwoTouches=[O[0].identifier,O[1].identifier],this._start([J[0],J[1]]))},na.prototype.touchmove=function(D,J,O){if(this._firstTwoTouches){D.preventDefault();var K=this._firstTwoTouches,de=K[0],ne=K[1],we=Ea(O,J,de),Oe=Ea(O,J,ne);if(!(!we||!Oe)){var ht=this._aroundCenter?null:we.add(Oe).div(2);return this._move([we,Oe],ht,D)}}},na.prototype.touchend=function(D,J,O){if(this._firstTwoTouches){var K=this._firstTwoTouches,de=K[0],ne=K[1],we=Ea(O,J,de),Oe=Ea(O,J,ne);we&&Oe||(this._active&&o.suppressClick(),this.reset())}},na.prototype.touchcancel=function(){this.reset()},na.prototype.enable=function(D){this._enabled=!0,this._aroundCenter=!!D&&D.around==="center"},na.prototype.disable=function(){this._enabled=!1,this.reset()},na.prototype.isEnabled=function(){return this._enabled},na.prototype.isActive=function(){return this._active};function Ea(Y,D,J){for(var O=0;O<Y.length;O++)if(Y[O].identifier===J)return D[O]}var Ia=.1;function yo(Y,D){return Math.log(Y/D)/Math.LN2}var Da=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),delete this._distance,delete this._startDistance},D.prototype._start=function(O){this._startDistance=this._distance=O[0].dist(O[1])},D.prototype._move=function(O,K){var de=this._distance;if(this._distance=O[0].dist(O[1]),!(!this._active&&Math.abs(yo(this._distance,this._startDistance))<Ia))return this._active=!0,{zoomDelta:yo(this._distance,de),pinchAround:K}},D}(na),go=25;function Is(Y,D){return Y.angleWith(D)*180/Math.PI}var Ms=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},D.prototype._start=function(O){this._startVector=this._vector=O[0].sub(O[1]),this._minDiameter=O[0].dist(O[1])},D.prototype._move=function(O,K){var de=this._vector;if(this._vector=O[0].sub(O[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:Is(this._vector,de),pinchAround:K}},D.prototype._isBelowThreshold=function(O){this._minDiameter=Math.min(this._minDiameter,O.mag());var K=Math.PI*this._minDiameter,de=go/K*360,ne=Is(O,this._startVector);return Math.abs(ne)<de},D}(na);function Xs(Y){return Math.abs(Y.y)>Math.abs(Y.x)}var Un=100,ja=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},D.prototype._start=function(O){this._lastPoints=O,Xs(O[0].sub(O[1]))&&(this._valid=!1)},D.prototype._move=function(O,K,de){var ne=O[0].sub(this._lastPoints[0]),we=O[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ne,we,de.timeStamp),!!this._valid){this._lastPoints=O,this._active=!0;var Oe=(ne.y+we.y)/2,ht=-.5;return{pitchDelta:Oe*ht}}},D.prototype.gestureBeginsVertically=function(O,K,de){if(this._valid!==void 0)return this._valid;var ne=2,we=O.mag()>=ne,Oe=K.mag()>=ne;if(!(!we&&!Oe)){if(!we||!Oe)return this._firstMove===void 0&&(this._firstMove=de),de-this._firstMove<Un?void 0:!1;var ht=O.y>0==K.y>0;return Xs(O)&&Xs(K)&&ht}},D}(na),Fo={panStep:100,bearingStep:15,pitchStep:10},Uo=function(){var D=Fo;this._panStep=D.panStep,this._bearingStep=D.bearingStep,this._pitchStep=D.pitchStep,this._rotationDisabled=!1};Uo.prototype.reset=function(){this._active=!1},Uo.prototype.keydown=function(D){var J=this;if(!(D.altKey||D.ctrlKey||D.metaKey)){var O=0,K=0,de=0,ne=0,we=0;switch(D.keyCode){case 61:case 107:case 171:case 187:O=1;break;case 189:case 109:case 173:O=-1;break;case 37:D.shiftKey?K=-1:(D.preventDefault(),ne=-1);break;case 39:D.shiftKey?K=1:(D.preventDefault(),ne=1);break;case 38:D.shiftKey?de=1:(D.preventDefault(),we=-1);break;case 40:D.shiftKey?de=-1:(D.preventDefault(),we=1);break;default:return}return this._rotationDisabled&&(K=0,de=0),{cameraAnimation:function(Oe){var ht=Oe.getZoom();Oe.easeTo({duration:300,easeId:"keyboardHandler",easing:$s,zoom:O?Math.round(ht)+O*(D.shiftKey?2:1):ht,bearing:Oe.getBearing()+K*J._bearingStep,pitch:Oe.getPitch()+de*J._pitchStep,offset:[-ne*J._panStep,-we*J._panStep],center:Oe.getCenter()},{originalEvent:D})}}}},Uo.prototype.enable=function(){this._enabled=!0},Uo.prototype.disable=function(){this._enabled=!1,this.reset()},Uo.prototype.isEnabled=function(){return this._enabled},Uo.prototype.isActive=function(){return this._active},Uo.prototype.disableRotation=function(){this._rotationDisabled=!0},Uo.prototype.enableRotation=function(){this._rotationDisabled=!1};function $s(Y){return Y*(2-Y)}var Sl=4.000244140625,bu=1/100,dl=1/450,Sc=2,Me=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._handler=J,this._delta=0,this._defaultZoomRate=bu,this._wheelZoomRate=dl,i.bindAll(["_onTimeout"],this)};Me.prototype.setZoomRate=function(D){this._defaultZoomRate=D},Me.prototype.setWheelZoomRate=function(D){this._wheelZoomRate=D},Me.prototype.isEnabled=function(){return!!this._enabled},Me.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Me.prototype.isZooming=function(){return!!this._zooming},Me.prototype.enable=function(D){this.isEnabled()||(this._enabled=!0,this._aroundCenter=D&&D.around==="center")},Me.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Me.prototype.wheel=function(D){if(this.isEnabled()){var J=D.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?D.deltaY*40:D.deltaY,O=i.browser.now(),K=O-(this._lastWheelEventTime||0);this._lastWheelEventTime=O,J!==0&&J%Sl===0?this._type="wheel":J!==0&&Math.abs(J)<4?this._type="trackpad":K>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,D)):this._type||(this._type=Math.abs(K*J)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),D.shiftKey&&J&&(J=J/4),this._type&&(this._lastWheelEvent=D,this._delta-=J,this._active||this._start(D)),D.preventDefault()}},Me.prototype._onTimeout=function(D){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},Me.prototype._start=function(D){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 J=o.mousePos(this._el,D);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(J)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Me.prototype.renderFrame=function(){var D=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var J=this._map.transform;if(this._delta!==0){var O=this._type==="wheel"&&Math.abs(this._delta)>Sl?this._wheelZoomRate:this._defaultZoomRate,K=Sc/(1+Math.exp(-Math.abs(this._delta*O)));this._delta<0&&K!==0&&(K=1/K);var de=typeof this._targetZoom=="number"?J.zoomScale(this._targetZoom):J.scale;this._targetZoom=Math.min(J.maxZoom,Math.max(J.minZoom,J.scaleZoom(de*K))),this._type==="wheel"&&(this._startZoom=J.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ne=typeof this._targetZoom=="number"?this._targetZoom:J.zoom,we=this._startZoom,Oe=this._easing,ht=!1,Yt;if(this._type==="wheel"&&we&&Oe){var cr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),Nt=Oe(cr);Yt=i.number(we,ne,Nt),cr<1?this._frameId||(this._frameId=!0):ht=!0}else Yt=ne,ht=!0;return this._active=!0,ht&&(this._active=!1,this._finishTimeout=setTimeout(function(){D._zooming=!1,D._handler._triggerRenderFrame(),delete D._targetZoom,delete D._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ht,zoomDelta:Yt-J.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Me.prototype._smoothOutEasing=function(D){var J=i.ease;if(this._prevEase){var O=this._prevEase,K=(i.browser.now()-O.start)/O.duration,de=O.easing(K+.01)-O.easing(K),ne=.27/Math.sqrt(de*de+1e-4)*.01,we=Math.sqrt(.27*.27-ne*ne);J=i.bezier(ne,we,.25,1)}return this._prevEase={start:i.browser.now(),duration:D,easing:J},J},Me.prototype.reset=function(){this._active=!1};var bt=function(D,J){this._clickZoom=D,this._tapZoom=J};bt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},bt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},bt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},bt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ot=function(){this.reset()};Ot.prototype.reset=function(){this._active=!1},Ot.prototype.dblclick=function(D,J){return D.preventDefault(),{cameraAnimation:function(O){O.easeTo({duration:300,zoom:O.getZoom()+(D.shiftKey?-1:1),around:O.unproject(J)},{originalEvent:D})}}},Ot.prototype.enable=function(){this._enabled=!0},Ot.prototype.disable=function(){this._enabled=!1,this.reset()},Ot.prototype.isEnabled=function(){return this._enabled},Ot.prototype.isActive=function(){return this._active};var Lr=function(){this._tap=new gi({numTouches:1,numTaps:1}),this.reset()};Lr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Lr.prototype.touchstart=function(D,J,O){this._swipePoint||(this._tapTime&&D.timeStamp-this._tapTime>dr&&this.reset(),this._tapTime?O.length>0&&(this._swipePoint=J[0],this._swipeTouch=O[0].identifier):this._tap.touchstart(D,J,O))},Lr.prototype.touchmove=function(D,J,O){if(!this._tapTime)this._tap.touchmove(D,J,O);else if(this._swipePoint){if(O[0].identifier!==this._swipeTouch)return;var K=J[0],de=K.y-this._swipePoint.y;return this._swipePoint=K,D.preventDefault(),this._active=!0,{zoomDelta:de/128}}},Lr.prototype.touchend=function(D,J,O){if(this._tapTime)this._swipePoint&&O.length===0&&this.reset();else{var K=this._tap.touchend(D,J,O);K&&(this._tapTime=D.timeStamp)}},Lr.prototype.touchcancel=function(){this.reset()},Lr.prototype.enable=function(){this._enabled=!0},Lr.prototype.disable=function(){this._enabled=!1,this.reset()},Lr.prototype.isEnabled=function(){return this._enabled},Lr.prototype.isActive=function(){return this._active};var Vr=function(D,J,O){this._el=D,this._mousePan=J,this._touchPan=O};Vr.prototype.enable=function(D){this._inertiaOptions=D||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Vr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Vr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Vr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Or=function(D,J,O){this._pitchWithRotate=D.pitchWithRotate,this._mouseRotate=J,this._mousePitch=O};Or.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Or.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Or.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Or.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Nr=function(D,J,O,K){this._el=D,this._touchZoom=J,this._touchRotate=O,this._tapDragZoom=K,this._rotationDisabled=!1,this._enabled=!0};Nr.prototype.enable=function(D){this._touchZoom.enable(D),this._rotationDisabled||this._touchRotate.enable(D),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Nr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Nr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Nr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Nr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Nr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var vi=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Ni=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D}(i.Event);function qi(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var Si=function(D,J){this._map=D,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tl(D),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J),i.bindAll(["handleEvent","handleWindowEvent"],this);var O=this._el;this._listeners=[[O,"touchstart",{passive:!0}],[O,"touchmove",{passive:!1}],[O,"touchend",void 0],[O,"touchcancel",void 0],[O,"mousedown",void 0],[O,"mousemove",void 0],[O,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[O,"mouseover",void 0],[O,"mouseout",void 0],[O,"dblclick",void 0],[O,"click",void 0],[O,"keydown",{capture:!1}],[O,"keyup",void 0],[O,"wheel",{passive:!1}],[O,"contextmenu",void 0],[i.window,"blur",void 0]];for(var K=0,de=this._listeners;K<de.length;K+=1){var ne=de[K],we=ne[0],Oe=ne[1],ht=ne[2];o.addEventListener(we,Oe,we===i.window.document?this.handleWindowEvent:this.handleEvent,ht)}};Si.prototype.destroy=function(){for(var D=0,J=this._listeners;D<J.length;D+=1){var O=J[D],K=O[0],de=O[1],ne=O[2];o.removeEventListener(K,de,K===i.window.document?this.handleWindowEvent:this.handleEvent,ne)}},Si.prototype._addDefaultHandlers=function(D){var J=this._map,O=J.getCanvasContainer();this._add("mapEvent",new Ve(J,D));var K=J.boxZoom=new Pt(J,D);this._add("boxZoom",K);var de=new xi,ne=new Ot;J.doubleClickZoom=new bt(ne,de),this._add("tapZoom",de),this._add("clickZoom",ne);var we=new Lr;this._add("tapDragZoom",we);var Oe=J.touchPitch=new ja;this._add("touchPitch",Oe);var ht=new Pn(D),Yt=new kn(D);J.dragRotate=new Or(D,ht,Yt),this._add("mouseRotate",ht,["mousePitch"]),this._add("mousePitch",Yt,["mouseRotate"]);var cr=new Qr(D),Nt=new Bn(D);J.dragPan=new Vr(O,cr,Nt),this._add("mousePan",cr),this._add("touchPan",Nt,["touchZoom","touchRotate"]);var Ne=new Ms,$e=new Da;J.touchZoomRotate=new Nr(O,$e,Ne,we),this._add("touchRotate",Ne,["touchPan","touchZoom"]),this._add("touchZoom",$e,["touchPan","touchRotate"]);var st=J.scrollZoom=new Me(J,this);this._add("scrollZoom",st,["mousePan"]);var It=J.keyboard=new Uo;this._add("keyboard",It),this._add("blockableMapEvent",new Ye(J));for(var Bt=0,Ft=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];Bt<Ft.length;Bt+=1){var Ut=Ft[Bt];D.interactive&&D[Ut]&&J[Ut].enable(D[Ut])}},Si.prototype._add=function(D,J,O){this._handlers.push({handlerName:D,handler:J,allowed:O}),this._handlersById[D]=J},Si.prototype.stop=function(D){if(!this._updatingCamera){for(var J=0,O=this._handlers;J<O.length;J+=1){var K=O[J],de=K.handler;de.reset()}this._inertia.clear(),this._fireEvents({},{},D),this._changes=[]}},Si.prototype.isActive=function(){for(var D=0,J=this._handlers;D<J.length;D+=1){var O=J[D],K=O.handler;if(K.isActive())return!0}return!1},Si.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Si.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Si.prototype.isMoving=function(){return!!vi(this._eventsInProgress)||this.isZooming()},Si.prototype._blockedByActive=function(D,J,O){for(var K in D)if(K!==O&&(!J||J.indexOf(K)<0))return!0;return!1},Si.prototype.handleWindowEvent=function(D){this.handleEvent(D,D.type+"Window")},Si.prototype._getMapTouches=function(D){for(var J=[],O=0,K=D;O<K.length;O+=1){var de=K[O],ne=de.target;this._el.contains(ne)&&J.push(de)}return J},Si.prototype.handleEvent=function(D,J){if(D.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var O=D.type==="renderFrame"?void 0:D,K={needsRenderFrame:!1},de={},ne={},we=D.touches?this._getMapTouches(D.touches):void 0,Oe=we?o.touchPos(this._el,we):o.mousePos(this._el,D),ht=0,Yt=this._handlers;ht<Yt.length;ht+=1){var cr=Yt[ht],Nt=cr.handlerName,Ne=cr.handler,$e=cr.allowed;if(Ne.isEnabled()){var st=void 0;this._blockedByActive(ne,$e,Nt)?Ne.reset():Ne[J||D.type]&&(st=Ne[J||D.type](D,Oe,we),this.mergeHandlerResult(K,de,st,Nt,O),st&&st.needsRenderFrame&&this._triggerRenderFrame()),(st||Ne.isActive())&&(ne[Nt]=Ne)}}var It={};for(var Bt in this._previousActiveHandlers)ne[Bt]||(It[Bt]=O);this._previousActiveHandlers=ne,(Object.keys(It).length||qi(K))&&(this._changes.push([K,de,It]),this._triggerRenderFrame()),(Object.keys(ne).length||qi(K))&&this._map._stop(!0),this._updatingCamera=!1;var Ft=K.cameraAnimation;Ft&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ft(this._map))},Si.prototype.mergeHandlerResult=function(D,J,O,K,de){if(O){i.extend(D,O);var ne={handlerName:K,originalEvent:O.originalEvent||de};O.zoomDelta!==void 0&&(J.zoom=ne),O.panDelta!==void 0&&(J.drag=ne),O.pitchDelta!==void 0&&(J.pitch=ne),O.bearingDelta!==void 0&&(J.rotate=ne)}},Si.prototype._applyChanges=function(){for(var D={},J={},O={},K=0,de=this._changes;K<de.length;K+=1){var ne=de[K],we=ne[0],Oe=ne[1],ht=ne[2];we.panDelta&&(D.panDelta=(D.panDelta||new i.Point(0,0))._add(we.panDelta)),we.zoomDelta&&(D.zoomDelta=(D.zoomDelta||0)+we.zoomDelta),we.bearingDelta&&(D.bearingDelta=(D.bearingDelta||0)+we.bearingDelta),we.pitchDelta&&(D.pitchDelta=(D.pitchDelta||0)+we.pitchDelta),we.around!==void 0&&(D.around=we.around),we.pinchAround!==void 0&&(D.pinchAround=we.pinchAround),we.noInertia&&(D.noInertia=we.noInertia),i.extend(J,Oe),i.extend(O,ht)}this._updateMapTransform(D,J,O),this._changes=[]},Si.prototype._updateMapTransform=function(D,J,O){var K=this._map,de=K.transform;if(!qi(D))return this._fireEvents(J,O,!0);var ne=D.panDelta,we=D.zoomDelta,Oe=D.bearingDelta,ht=D.pitchDelta,Yt=D.around,cr=D.pinchAround;cr!==void 0&&(Yt=cr),K._stop(!0),Yt=Yt||K.transform.centerPoint;var Nt=de.pointLocation(ne?Yt.sub(ne):Yt);Oe&&(de.bearing+=Oe),ht&&(de.pitch+=ht),we&&(de.zoom+=we),de.setLocationAtPoint(Nt,Yt),this._map._update(),D.noInertia||this._inertia.record(D),this._fireEvents(J,O,!0)},Si.prototype._fireEvents=function(D,J,O){var K=this,de=vi(this._eventsInProgress),ne=vi(D),we={};for(var Oe in D){var ht=D[Oe],Yt=ht.originalEvent;this._eventsInProgress[Oe]||(we[Oe+"start"]=Yt),this._eventsInProgress[Oe]=D[Oe]}!de&&ne&&this._fireEvent("movestart",ne.originalEvent);for(var cr in we)this._fireEvent(cr,we[cr]);ne&&this._fireEvent("move",ne.originalEvent);for(var Nt in D){var Ne=D[Nt],$e=Ne.originalEvent;this._fireEvent(Nt,$e)}var st={},It;for(var Bt in this._eventsInProgress){var Ft=this._eventsInProgress[Bt],Ut=Ft.handlerName,zt=Ft.originalEvent;this._handlersById[Ut].isActive()||(delete this._eventsInProgress[Bt],It=J[Ut]||zt,st[Bt+"end"]=It)}for(var _t in st)this._fireEvent(_t,st[_t]);var Dt=vi(this._eventsInProgress);if(O&&(de||ne)&&!Dt){this._updatingCamera=!0;var vt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),lr=function(_r){return _r!==0&&-K._bearingSnap<_r&&_r<K._bearingSnap};vt?(lr(vt.bearing||this._map.getBearing())&&(vt.bearing=0),this._map.easeTo(vt,{originalEvent:It})):(this._map.fire(new i.Event("moveend",{originalEvent:It})),lr(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},Si.prototype._fireEvent=function(D,J){this._map.fire(new i.Event(D,J?{originalEvent:J}:{}))},Si.prototype._requestFrame=function(){var D=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(J){delete D._frameId,D.handleEvent(new Ni("renderFrame",{timeStamp:J})),D._applyChanges()})},Si.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var Vn=function(Y){function D(J,O){Y.call(this),this._moving=!1,this._zooming=!1,this.transform=J,this._bearingSnap=O.bearingSnap,i.bindAll(["_renderFrameCallback"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.getCenter=function(){return new i.LngLat(this.transform.center.lng,this.transform.center.lat)},D.prototype.setCenter=function(O,K){return this.jumpTo({center:O},K)},D.prototype.panBy=function(O,K,de){return O=i.Point.convert(O).mult(-1),this.panTo(this.transform.center,i.extend({offset:O},K),de)},D.prototype.panTo=function(O,K,de){return this.easeTo(i.extend({center:O},K),de)},D.prototype.getZoom=function(){return this.transform.zoom},D.prototype.setZoom=function(O,K){return this.jumpTo({zoom:O},K),this},D.prototype.zoomTo=function(O,K,de){return this.easeTo(i.extend({zoom:O},K),de)},D.prototype.zoomIn=function(O,K){return this.zoomTo(this.getZoom()+1,O,K),this},D.prototype.zoomOut=function(O,K){return this.zoomTo(this.getZoom()-1,O,K),this},D.prototype.getBearing=function(){return this.transform.bearing},D.prototype.setBearing=function(O,K){return this.jumpTo({bearing:O},K),this},D.prototype.getPadding=function(){return this.transform.padding},D.prototype.setPadding=function(O,K){return this.jumpTo({padding:O},K),this},D.prototype.rotateTo=function(O,K,de){return this.easeTo(i.extend({bearing:O},K),de)},D.prototype.resetNorth=function(O,K){return this.rotateTo(0,i.extend({duration:1e3},O),K),this},D.prototype.resetNorthPitch=function(O,K){return this.easeTo(i.extend({bearing:0,pitch:0,duration:1e3},O),K),this},D.prototype.snapToNorth=function(O,K){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(O,K):this},D.prototype.getPitch=function(){return this.transform.pitch},D.prototype.setPitch=function(O,K){return this.jumpTo({pitch:O},K),this},D.prototype.cameraForBounds=function(O,K){O=i.LngLatBounds.convert(O);var de=K&&K.bearing||0;return this._cameraForBoxAndBearing(O.getNorthWest(),O.getSouthEast(),de,K)},D.prototype._cameraForBoxAndBearing=function(O,K,de,ne){var we={top:0,bottom:0,right:0,left:0};if(ne=i.extend({padding:we,offset:[0,0],maxZoom:this.transform.maxZoom},ne),typeof ne.padding=="number"){var Oe=ne.padding;ne.padding={top:Oe,bottom:Oe,right:Oe,left:Oe}}ne.padding=i.extend(we,ne.padding);var ht=this.transform,Yt=ht.padding,cr=ht.project(i.LngLat.convert(O)),Nt=ht.project(i.LngLat.convert(K)),Ne=cr.rotate(-de*Math.PI/180),$e=Nt.rotate(-de*Math.PI/180),st=new i.Point(Math.max(Ne.x,$e.x),Math.max(Ne.y,$e.y)),It=new i.Point(Math.min(Ne.x,$e.x),Math.min(Ne.y,$e.y)),Bt=st.sub(It),Ft=(ht.width-(Yt.left+Yt.right+ne.padding.left+ne.padding.right))/Bt.x,Ut=(ht.height-(Yt.top+Yt.bottom+ne.padding.top+ne.padding.bottom))/Bt.y;if(Ut<0||Ft<0){i.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var zt=Math.min(ht.scaleZoom(ht.scale*Math.min(Ft,Ut)),ne.maxZoom),_t=typeof ne.offset.x=="number"?new i.Point(ne.offset.x,ne.offset.y):i.Point.convert(ne.offset),Dt=(ne.padding.left-ne.padding.right)/2,vt=(ne.padding.top-ne.padding.bottom)/2,lr=new i.Point(Dt,vt),_r=lr.rotate(de*Math.PI/180),Br=_t.add(_r),Di=Br.mult(ht.scale/ht.zoomScale(zt)),ci=ht.unproject(cr.add(Nt).div(2).sub(Di));return{center:ci,zoom:zt,bearing:de}},D.prototype.fitBounds=function(O,K,de){return this._fitInternal(this.cameraForBounds(O,K),K,de)},D.prototype.fitScreenCoordinates=function(O,K,de,ne,we){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(i.Point.convert(O)),this.transform.pointLocation(i.Point.convert(K)),de,ne),ne,we)},D.prototype._fitInternal=function(O,K,de){return O?(K=i.extend(O,K),delete K.padding,K.linear?this.easeTo(K,de):this.flyTo(K,de)):this},D.prototype.jumpTo=function(O,K){this.stop();var de=this.transform,ne=!1,we=!1,Oe=!1;return"zoom"in O&&de.zoom!==+O.zoom&&(ne=!0,de.zoom=+O.zoom),O.center!==void 0&&(de.center=i.LngLat.convert(O.center)),"bearing"in O&&de.bearing!==+O.bearing&&(we=!0,de.bearing=+O.bearing),"pitch"in O&&de.pitch!==+O.pitch&&(Oe=!0,de.pitch=+O.pitch),O.padding!=null&&!de.isPaddingEqual(O.padding)&&(de.padding=O.padding),this.fire(new i.Event("movestart",K)).fire(new i.Event("move",K)),ne&&this.fire(new i.Event("zoomstart",K)).fire(new i.Event("zoom",K)).fire(new i.Event("zoomend",K)),we&&this.fire(new i.Event("rotatestart",K)).fire(new i.Event("rotate",K)).fire(new i.Event("rotateend",K)),Oe&&this.fire(new i.Event("pitchstart",K)).fire(new i.Event("pitch",K)).fire(new i.Event("pitchend",K)),this.fire(new i.Event("moveend",K))},D.prototype.easeTo=function(O,K){var de=this;this._stop(!1,O.easeId),O=i.extend({offset:[0,0],duration:500,easing:i.ease},O),(O.animate===!1||!O.essential&&i.browser.prefersReducedMotion)&&(O.duration=0);var ne=this.transform,we=this.getZoom(),Oe=this.getBearing(),ht=this.getPitch(),Yt=this.getPadding(),cr="zoom"in O?+O.zoom:we,Nt="bearing"in O?this._normalizeBearing(O.bearing,Oe):Oe,Ne="pitch"in O?+O.pitch:ht,$e="padding"in O?O.padding:ne.padding,st=i.Point.convert(O.offset),It=ne.centerPoint.add(st),Bt=ne.pointLocation(It),Ft=i.LngLat.convert(O.center||Bt);this._normalizeCenter(Ft);var Ut=ne.project(Bt),zt=ne.project(Ft).sub(Ut),_t=ne.zoomScale(cr-we),Dt,vt;O.around&&(Dt=i.LngLat.convert(O.around),vt=ne.locationPoint(Dt));var lr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||cr!==we,this._rotating=this._rotating||Oe!==Nt,this._pitching=this._pitching||Ne!==ht,this._padding=!ne.isPaddingEqual($e),this._easeId=O.easeId,this._prepareEase(K,O.noMoveStart,lr),this._ease(function(_r){if(de._zooming&&(ne.zoom=i.number(we,cr,_r)),de._rotating&&(ne.bearing=i.number(Oe,Nt,_r)),de._pitching&&(ne.pitch=i.number(ht,Ne,_r)),de._padding&&(ne.interpolatePadding(Yt,$e,_r),It=ne.centerPoint.add(st)),Dt)ne.setLocationAtPoint(Dt,vt);else{var Br=ne.zoomScale(ne.zoom-we),Di=cr>we?Math.min(2,_t):Math.max(.5,_t),ci=Math.pow(Di,1-_r),bi=ne.unproject(Ut.add(zt.mult(_r*ci)).mult(Br));ne.setLocationAtPoint(ne.renderWorldCopies?bi.wrap():bi,It)}de._fireMoveEvents(K)},function(_r){de._afterEase(K,_r)},O),this},D.prototype._prepareEase=function(O,K,de){de===void 0&&(de={}),this._moving=!0,!K&&!de.moving&&this.fire(new i.Event("movestart",O)),this._zooming&&!de.zooming&&this.fire(new i.Event("zoomstart",O)),this._rotating&&!de.rotating&&this.fire(new i.Event("rotatestart",O)),this._pitching&&!de.pitching&&this.fire(new i.Event("pitchstart",O))},D.prototype._fireMoveEvents=function(O){this.fire(new i.Event("move",O)),this._zooming&&this.fire(new i.Event("zoom",O)),this._rotating&&this.fire(new i.Event("rotate",O)),this._pitching&&this.fire(new i.Event("pitch",O))},D.prototype._afterEase=function(O,K){if(!(this._easeId&&K&&this._easeId===K)){delete this._easeId;var de=this._zooming,ne=this._rotating,we=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,de&&this.fire(new i.Event("zoomend",O)),ne&&this.fire(new i.Event("rotateend",O)),we&&this.fire(new i.Event("pitchend",O)),this.fire(new i.Event("moveend",O))}},D.prototype.flyTo=function(O,K){var de=this;if(!O.essential&&i.browser.prefersReducedMotion){var ne=i.pick(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ne,K)}this.stop(),O=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},O);var we=this.transform,Oe=this.getZoom(),ht=this.getBearing(),Yt=this.getPitch(),cr=this.getPadding(),Nt="zoom"in O?i.clamp(+O.zoom,we.minZoom,we.maxZoom):Oe,Ne="bearing"in O?this._normalizeBearing(O.bearing,ht):ht,$e="pitch"in O?+O.pitch:Yt,st="padding"in O?O.padding:we.padding,It=we.zoomScale(Nt-Oe),Bt=i.Point.convert(O.offset),Ft=we.centerPoint.add(Bt),Ut=we.pointLocation(Ft),zt=i.LngLat.convert(O.center||Ut);this._normalizeCenter(zt);var _t=we.project(Ut),Dt=we.project(zt).sub(_t),vt=O.curve,lr=Math.max(we.width,we.height),_r=lr/It,Br=Dt.mag();if("minZoom"in O){var Di=i.clamp(Math.min(O.minZoom,Oe,Nt),we.minZoom,we.maxZoom),ci=lr/we.zoomScale(Di-Oe);vt=Math.sqrt(ci/Br*2)}var bi=vt*vt;function gn(so){var Yo=(_r*_r-lr*lr+(so?-1:1)*bi*bi*Br*Br)/(2*(so?_r:lr)*bi*Br);return Math.log(Math.sqrt(Yo*Yo+1)-Yo)}function tn(so){return(Math.exp(so)-Math.exp(-so))/2}function Ei(so){return(Math.exp(so)+Math.exp(-so))/2}function Oi(so){return tn(so)/Ei(so)}var Gi=gn(0),on=function(so){return Ei(Gi)/Ei(Gi+vt*so)},zn=function(so){return lr*((Ei(Gi)*Oi(Gi+vt*so)-tn(Gi))/bi)/Br},Ja=(gn(1)-Gi)/vt;if(Math.abs(Br)<1e-6||!isFinite(Ja)){if(Math.abs(lr-_r)<1e-6)return this.easeTo(O,K);var co=_r<lr?-1:1;Ja=Math.abs(Math.log(_r/lr))/vt,zn=function(){return 0},on=function(so){return Math.exp(co*vt*so)}}if("duration"in O)O.duration=+O.duration;else{var ts="screenSpeed"in O?+O.screenSpeed/vt:+O.speed;O.duration=1e3*Ja/ts}return O.maxDuration&&O.duration>O.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=ht!==Ne,this._pitching=$e!==Yt,this._padding=!we.isPaddingEqual(st),this._prepareEase(K,!1),this._ease(function(so){var Yo=so*Ja,ms=1/on(Yo);we.zoom=so===1?Nt:Oe+we.scaleZoom(ms),de._rotating&&(we.bearing=i.number(ht,Ne,so)),de._pitching&&(we.pitch=i.number(Yt,$e,so)),de._padding&&(we.interpolatePadding(cr,st,so),Ft=we.centerPoint.add(Bt));var ou=so===1?zt:we.unproject(_t.add(Dt.mult(zn(Yo))).mult(ms));we.setLocationAtPoint(we.renderWorldCopies?ou.wrap():ou,Ft),de._fireMoveEvents(K)},function(){return de._afterEase(K)},O),this},D.prototype.isEasing=function(){return!!this._easeFrameId},D.prototype.stop=function(){return this._stop()},D.prototype._stop=function(O,K){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var de=this._onEaseEnd;delete this._onEaseEnd,de.call(this,K)}if(!O){var ne=this.handlers;ne&&ne.stop(!1)}return this},D.prototype._ease=function(O,K,de){de.animate===!1||de.duration===0?(O(1),K()):(this._easeStart=i.browser.now(),this._easeOptions=de,this._onEaseFrame=O,this._onEaseEnd=K,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},D.prototype._renderFrameCallback=function(){var O=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(O)),O<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},D.prototype._normalizeBearing=function(O,K){O=i.wrap(O,-180,180);var de=Math.abs(O-K);return Math.abs(O-360-K)<de&&(O-=360),Math.abs(O+360-K)<de&&(O+=360),O},D.prototype._normalizeCenter=function(O){var K=this.transform;if(!(!K.renderWorldCopies||K.lngRange)){var de=O.lng-K.center.lng;O.lng+=de>180?-360:de<-180?360:0}},D}(i.Evented),Qi=function(D){D===void 0&&(D={}),this.options=D,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Qi.prototype.getDefaultPosition=function(){return"bottom-right"},Qi.prototype.onAdd=function(D){var J=this.options&&this.options.compact;return this._map=D,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"),J&&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),J===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Qi.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},Qi.prototype._setElementTitle=function(D,J){var O=this._map._getUIString("AttributionControl."+J);D.title=O,D.setAttribute("aria-label",O)},Qi.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"))},Qi.prototype._updateEditLink=function(){var D=this._editLink;D||(D=this._editLink=this._container.querySelector(".mapbox-improve-map"));var J=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(D){var O=J.reduce(function(K,de,ne){return de.value&&(K+=de.key+"="+de.value+(ne<J.length-1?"&":"")),K},"?");D.href=i.config.FEEDBACK_URL+"/"+O+(this._map._hash?this._map._hash.getHashString(!0):""),D.rel="noopener nofollow",this._setElementTitle(D,"MapFeedback")}},Qi.prototype._updateData=function(D){D&&(D.sourceDataType==="metadata"||D.sourceDataType==="visibility"||D.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},Qi.prototype._updateAttributions=function(){if(this._map.style){var D=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?D=D.concat(this.options.customAttribution.map(function(Oe){return typeof Oe!="string"?"":Oe})):typeof this.options.customAttribution=="string"&&D.push(this.options.customAttribution)),this._map.style.stylesheet){var J=this._map.style.stylesheet;this.styleOwner=J.owner,this.styleId=J.id}var O=this._map.style.sourceCaches;for(var K in O){var de=O[K];if(de.used){var ne=de.getSource();ne.attribution&&D.indexOf(ne.attribution)<0&&D.push(ne.attribution)}}D.sort(function(Oe,ht){return Oe.length-ht.length}),D=D.filter(function(Oe,ht){for(var Yt=ht+1;Yt<D.length;Yt++)if(D[Yt].indexOf(Oe)>=0)return!1;return!0});var we=D.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,D.length?(this._innerContainer.innerHTML=we,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Qi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ji=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};ji.prototype.onAdd=function(D){this._map=D,this._container=o.create("div","mapboxgl-ctrl");var J=o.create("a","mapboxgl-ctrl-logo");return J.target="_blank",J.rel="noopener nofollow",J.href="https://www.mapbox.com/",J.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),J.setAttribute("rel","noopener nofollow"),this._container.appendChild(J),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ji.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ji.prototype.getDefaultPosition=function(){return"bottom-left"},ji.prototype._updateLogo=function(D){(!D||D.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ji.prototype._logoRequired=function(){if(this._map.style){var D=this._map.style.sourceCaches;for(var J in D){var O=D[J].getSource();if(O.mapbox_logo)return!0}return!1}},ji.prototype._updateCompact=function(){var D=this._container.children;if(D.length){var J=D[0];this._map.getCanvasContainer().offsetWidth<250?J.classList.add("mapboxgl-compact"):J.classList.remove("mapboxgl-compact")}};var oi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};oi.prototype.add=function(D){var J=++this._id,O=this._queue;return O.push({callback:D,id:J,cancelled:!1}),J},oi.prototype.remove=function(D){for(var J=this._currentlyRunning,O=J?this._queue.concat(J):this._queue,K=0,de=O;K<de.length;K+=1){var ne=de[K];if(ne.id===D){ne.cancelled=!0;return}}},oi.prototype.run=function(D){D===void 0&&(D=0);var J=this._currentlyRunning=this._queue;this._queue=[];for(var O=0,K=J;O<K.length;O+=1){var de=K[O];if(!de.cancelled&&(de.callback(D),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},oi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Tr={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},Zr=i.window.HTMLImageElement,yi=i.window.HTMLElement,Ii=i.window.ImageBitmap,ui=-2,nn=22,Xi=0,qn=60,fi={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:ui,maxZoom:nn,minPitch:Xi,maxPitch:qn,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},si=function(Y){function D(O){var K=this;if(O=i.extend({},fi,O),O.minZoom!=null&&O.maxZoom!=null&&O.minZoom>O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitch<Xi)throw new Error("minPitch must be greater than or equal to "+Xi);if(O.maxPitch!=null&&O.maxPitch>qn)throw new Error("maxPitch must be less than or equal to "+qn);var de=new wo(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies);if(Y.call(this,de,O),this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=O.preserveDrawingBuffer,this._antialias=O.antialias,this._trackResize=O.trackResize,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=O.collectResourceTiming,this._renderTaskQueue=new oi,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Tr,O.locale),this._clickTolerance=O.clickTolerance,this._requestManager=new i.RequestManager(O.transformRequest,O.accessToken),typeof O.container=="string"){if(this._container=i.window.document.getElementById(O.container),!this._container)throw new Error("Container '"+O.container+"' not found.")}else if(O.container instanceof yi)this._container=O.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(O.maxBounds&&this.setMaxBounds(O.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return K._update(!1)}),this.on("moveend",function(){return K._update(!1)}),this.on("zoom",function(){return K._update(!0)}),typeof i.window!="undefined"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Si(this,O);var ne=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new Ul(ne).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,i.extend({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new Qi({customAttribution:O.customAttribution})),this.addControl(new ji,O.logoPosition),this.on("style.load",function(){K.transform.unmodified&&K.jumpTo(K.style.stylesheet)}),this.on("data",function(we){K._update(we.dataType==="style"),K.fire(new i.Event(we.dataType+"data",we))}),this.on("dataloading",function(we){K.fire(new i.Event(we.dataType+"dataloading",we))})}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return D.prototype._getMapId=function(){return this._mapId},D.prototype.addControl=function(K,de){if(de===void 0&&(K.getDefaultPosition?de=K.getDefaultPosition():de="top-right"),!K||!K.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ne=K.onAdd(this);this._controls.push(K);var we=this._controlPositions[de];return de.indexOf("bottom")!==-1?we.insertBefore(ne,we.firstChild):we.appendChild(ne),this},D.prototype.removeControl=function(K){if(!K||!K.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var de=this._controls.indexOf(K);return de>-1&&this._controls.splice(de,1),K.onRemove(this),this},D.prototype.hasControl=function(K){return this._controls.indexOf(K)>-1},D.prototype.resize=function(K){var de=this._containerDimensions(),ne=de[0],we=de[1];this._resizeCanvas(ne,we),this.transform.resize(ne,we),this.painter.resize(ne,we);var Oe=!this._moving;return Oe&&(this.stop(),this.fire(new i.Event("movestart",K)).fire(new i.Event("move",K))),this.fire(new i.Event("resize",K)),Oe&&this.fire(new i.Event("moveend",K)),this},D.prototype.getBounds=function(){return this.transform.getBounds()},D.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},D.prototype.setMaxBounds=function(K){return this.transform.setMaxBounds(i.LngLatBounds.convert(K)),this._update()},D.prototype.setMinZoom=function(K){if(K=K==null?ui:K,K>=ui&&K<=this.transform.maxZoom)return this.transform.minZoom=K,this._update(),this.getZoom()<K&&this.setZoom(K),this;throw new Error("minZoom must be between "+ui+" and the current maxZoom, inclusive")},D.prototype.getMinZoom=function(){return this.transform.minZoom},D.prototype.setMaxZoom=function(K){if(K=K==null?nn:K,K>=this.transform.minZoom)return this.transform.maxZoom=K,this._update(),this.getZoom()>K&&this.setZoom(K),this;throw new Error("maxZoom must be greater than the current minZoom")},D.prototype.getMaxZoom=function(){return this.transform.maxZoom},D.prototype.setMinPitch=function(K){if(K=K==null?Xi:K,K<Xi)throw new Error("minPitch must be greater than or equal to "+Xi);if(K>=Xi&&K<=this.transform.maxPitch)return this.transform.minPitch=K,this._update(),this.getPitch()<K&&this.setPitch(K),this;throw new Error("minPitch must be between "+Xi+" and the current maxPitch, inclusive")},D.prototype.getMinPitch=function(){return this.transform.minPitch},D.prototype.setMaxPitch=function(K){if(K=K==null?qn:K,K>qn)throw new Error("maxPitch must be less than or equal to "+qn);if(K>=this.transform.minPitch)return this.transform.maxPitch=K,this._update(),this.getPitch()>K&&this.setPitch(K),this;throw new Error("maxPitch must be greater than the current minPitch")},D.prototype.getMaxPitch=function(){return this.transform.maxPitch},D.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},D.prototype.setRenderWorldCopies=function(K){return this.transform.renderWorldCopies=K,this._update()},D.prototype.project=function(K){return this.transform.locationPoint(i.LngLat.convert(K))},D.prototype.unproject=function(K){return this.transform.pointLocation(i.Point.convert(K))},D.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},D.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},D.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},D.prototype._createDelegatedListener=function(K,de,ne){var we=this,Oe;if(K==="mouseenter"||K==="mouseover"){var ht=!1,Yt=function(It){var Bt=we.getLayer(de)?we.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length?ht||(ht=!0,ne.call(we,new se(K,we,It.originalEvent,{features:Bt}))):ht=!1},cr=function(){ht=!1};return{layer:de,listener:ne,delegates:{mousemove:Yt,mouseout:cr}}}else if(K==="mouseleave"||K==="mouseout"){var Nt=!1,Ne=function(It){var Bt=we.getLayer(de)?we.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length?Nt=!0:Nt&&(Nt=!1,ne.call(we,new se(K,we,It.originalEvent)))},$e=function(It){Nt&&(Nt=!1,ne.call(we,new se(K,we,It.originalEvent)))};return{layer:de,listener:ne,delegates:{mousemove:Ne,mouseout:$e}}}else{var st=function(It){var Bt=we.getLayer(de)?we.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length&&(It.features=Bt,ne.call(we,It),delete It.features)};return{layer:de,listener:ne,delegates:(Oe={},Oe[K]=st,Oe)}}},D.prototype.on=function(K,de,ne){if(ne===void 0)return Y.prototype.on.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[K]=this._delegatedListeners[K]||[],this._delegatedListeners[K].push(we);for(var Oe in we.delegates)this.on(Oe,we.delegates[Oe]);return this},D.prototype.once=function(K,de,ne){if(ne===void 0)return Y.prototype.once.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);for(var Oe in we.delegates)this.once(Oe,we.delegates[Oe]);return this},D.prototype.off=function(K,de,ne){var we=this;if(ne===void 0)return Y.prototype.off.call(this,K,de);var Oe=function(ht){for(var Yt=ht[K],cr=0;cr<Yt.length;cr++){var Nt=Yt[cr];if(Nt.layer===de&&Nt.listener===ne){for(var Ne in Nt.delegates)we.off(Ne,Nt.delegates[Ne]);return Yt.splice(cr,1),we}}};return this._delegatedListeners&&this._delegatedListeners[K]&&Oe(this._delegatedListeners),this},D.prototype.queryRenderedFeatures=function(K,de){if(!this.style)return[];de===void 0&&K!==void 0&&!(K instanceof i.Point)&&!Array.isArray(K)&&(de=K,K=void 0),de=de||{},K=K||[[0,0],[this.transform.width,this.transform.height]];var ne;if(K instanceof i.Point||typeof K[0]=="number")ne=[i.Point.convert(K)];else{var we=i.Point.convert(K[0]),Oe=i.Point.convert(K[1]);ne=[we,new i.Point(Oe.x,we.y),Oe,new i.Point(we.x,Oe.y),we]}return this.style.queryRenderedFeatures(ne,de,this.transform)},D.prototype.querySourceFeatures=function(K,de){return this.style.querySourceFeatures(K,de)},D.prototype.setStyle=function(K,de){return de=i.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},de),de.diff!==!1&&de.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&K?(this._diffStyle(K,de),this):(this._localIdeographFontFamily=de.localIdeographFontFamily,this._updateStyle(K,de))},D.prototype._getUIString=function(K){var de=this._locale[K];if(de==null)throw new Error("Missing UI string '"+K+"'");return de},D.prototype._updateStyle=function(K,de){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),K)this.style=new yu(this,de||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof K=="string"?this.style.loadURL(K):this.style.loadJSON(K),this},D.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new yu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},D.prototype._diffStyle=function(K,de){var ne=this;if(typeof K=="string"){var we=this._requestManager.normalizeStyleURL(K),Oe=this._requestManager.transformRequest(we,i.ResourceType.Style);i.getJSON(Oe,function(ht,Yt){ht?ne.fire(new i.ErrorEvent(ht)):Yt&&ne._updateDiff(Yt,de)})}else typeof K=="object"&&this._updateDiff(K,de)},D.prototype._updateDiff=function(K,de){try{this.style.setState(K)&&this._update(!0)}catch(ne){i.warnOnce("Unable to perform style diff: "+(ne.message||ne.error||ne)+". Rebuilding the style from scratch."),this._updateStyle(K,de)}},D.prototype.getStyle=function(){if(this.style)return this.style.serialize()},D.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():i.warnOnce("There is no style added to the map.")},D.prototype.addSource=function(K,de){return this._lazyInitEmptyStyle(),this.style.addSource(K,de),this._update(!0)},D.prototype.isSourceLoaded=function(K){var de=this.style&&this.style.sourceCaches[K];if(de===void 0){this.fire(new i.ErrorEvent(new Error("There is no source with ID '"+K+"'")));return}return de.loaded()},D.prototype.areTilesLoaded=function(){var K=this.style&&this.style.sourceCaches;for(var de in K){var ne=K[de],we=ne._tiles;for(var Oe in we){var ht=we[Oe];if(!(ht.state==="loaded"||ht.state==="errored"))return!1}}return!0},D.prototype.addSourceType=function(K,de,ne){return this._lazyInitEmptyStyle(),this.style.addSourceType(K,de,ne)},D.prototype.removeSource=function(K){return this.style.removeSource(K),this._update(!0)},D.prototype.getSource=function(K){return this.style.getSource(K)},D.prototype.addImage=function(K,de,ne){ne===void 0&&(ne={});var we=ne.pixelRatio;we===void 0&&(we=1);var Oe=ne.sdf;Oe===void 0&&(Oe=!1);var ht=ne.stretchX,Yt=ne.stretchY,cr=ne.content;this._lazyInitEmptyStyle();var Nt=0;if(de instanceof Zr||Ii&&de instanceof Ii){var Ne=i.browser.getImageData(de),$e=Ne.width,st=Ne.height,It=Ne.data;this.style.addImage(K,{data:new i.RGBAImage({width:$e,height:st},It),pixelRatio:we,stretchX:ht,stretchY:Yt,content:cr,sdf:Oe,version:Nt})}else{if(de.width===void 0||de.height===void 0)return this.fire(new i.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var Bt=de.width,Ft=de.height,Ut=de.data,zt=de;this.style.addImage(K,{data:new i.RGBAImage({width:Bt,height:Ft},new Uint8Array(Ut)),pixelRatio:we,stretchX:ht,stretchY:Yt,content:cr,sdf:Oe,version:Nt,userImage:zt}),zt.onAdd&&zt.onAdd(this,K)}},D.prototype.updateImage=function(K,de){var ne=this.style.getImage(K);if(!ne)return this.fire(new i.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var we=de instanceof Zr||Ii&&de instanceof Ii?i.browser.getImageData(de):de,Oe=we.width,ht=we.height,Yt=we.data;if(Oe===void 0||ht===void 0)return this.fire(new i.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Oe!==ne.data.width||ht!==ne.data.height)return this.fire(new i.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var cr=!(de instanceof Zr||Ii&&de instanceof Ii);ne.data.replace(Yt,cr),this.style.updateImage(K,ne)},D.prototype.hasImage=function(K){return K?!!this.style.getImage(K):(this.fire(new i.ErrorEvent(new Error("Missing required image id"))),!1)},D.prototype.removeImage=function(K){this.style.removeImage(K)},D.prototype.loadImage=function(K,de){i.getImage(this._requestManager.transformRequest(K,i.ResourceType.Image),de)},D.prototype.listImages=function(){return this.style.listImages()},D.prototype.addLayer=function(K,de){return this._lazyInitEmptyStyle(),this.style.addLayer(K,de),this._update(!0)},D.prototype.moveLayer=function(K,de){return this.style.moveLayer(K,de),this._update(!0)},D.prototype.removeLayer=function(K){return this.style.removeLayer(K),this._update(!0)},D.prototype.getLayer=function(K){return this.style.getLayer(K)},D.prototype.setLayerZoomRange=function(K,de,ne){return this.style.setLayerZoomRange(K,de,ne),this._update(!0)},D.prototype.setFilter=function(K,de,ne){return ne===void 0&&(ne={}),this.style.setFilter(K,de,ne),this._update(!0)},D.prototype.getFilter=function(K){return this.style.getFilter(K)},D.prototype.setPaintProperty=function(K,de,ne,we){return we===void 0&&(we={}),this.style.setPaintProperty(K,de,ne,we),this._update(!0)},D.prototype.getPaintProperty=function(K,de){return this.style.getPaintProperty(K,de)},D.prototype.setLayoutProperty=function(K,de,ne,we){return we===void 0&&(we={}),this.style.setLayoutProperty(K,de,ne,we),this._update(!0)},D.prototype.getLayoutProperty=function(K,de){return this.style.getLayoutProperty(K,de)},D.prototype.setLight=function(K,de){return de===void 0&&(de={}),this._lazyInitEmptyStyle(),this.style.setLight(K,de),this._update(!0)},D.prototype.getLight=function(){return this.style.getLight()},D.prototype.setFeatureState=function(K,de){return this.style.setFeatureState(K,de),this._update()},D.prototype.removeFeatureState=function(K,de){return this.style.removeFeatureState(K,de),this._update()},D.prototype.getFeatureState=function(K){return this.style.getFeatureState(K)},D.prototype.getContainer=function(){return this._container},D.prototype.getCanvasContainer=function(){return this._canvasContainer},D.prototype.getCanvas=function(){return this._canvas},D.prototype._containerDimensions=function(){var K=0,de=0;return this._container&&(K=this._container.clientWidth||400,de=this._container.clientHeight||300),[K,de]},D.prototype._detectMissingCSS=function(){var K=i.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");K!=="rgb(250, 128, 114)"&&i.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},D.prototype._setupContainer=function(){var K=this._container;K.classList.add("mapboxgl-map");var de=this._missingCSSCanary=o.create("div","mapboxgl-canary",K);de.style.visibility="hidden",this._detectMissingCSS();var ne=this._canvasContainer=o.create("div","mapboxgl-canvas-container",K);this._interactive&&ne.classList.add("mapboxgl-interactive"),this._canvas=o.create("canvas","mapboxgl-canvas",ne),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var we=this._containerDimensions();this._resizeCanvas(we[0],we[1]);var Oe=this._controlContainer=o.create("div","mapboxgl-control-container",K),ht=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Yt){ht[Yt]=o.create("div","mapboxgl-ctrl-"+Yt,Oe)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},D.prototype._resizeCanvas=function(K,de){var ne=i.browser.devicePixelRatio||1;this._canvas.width=ne*K,this._canvas.height=ne*de,this._canvas.style.width=K+"px",this._canvas.style.height=de+"px"},D.prototype._setupPainter=function(){var K=i.extend({},a.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),de=this._canvas.getContext("webgl",K)||this._canvas.getContext("experimental-webgl",K);if(!de){this.fire(new i.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new mo(de,this.transform),i.webpSupported.testSupport(de)},D.prototype._contextLost=function(K){K.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new i.Event("webglcontextlost",{originalEvent:K}))},D.prototype._contextRestored=function(K){this._setupPainter(),this.resize(),this._update(),this.fire(new i.Event("webglcontextrestored",{originalEvent:K}))},D.prototype._onMapScroll=function(K){if(K.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},D.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},D.prototype._update=function(K){return this.style?(this._styleDirty=this._styleDirty||K,this._sourcesDirty=!0,this.triggerRepaint(),this):this},D.prototype._requestRenderFrame=function(K){return this._update(),this._renderTaskQueue.add(K)},D.prototype._cancelRenderFrame=function(K){this._renderTaskQueue.remove(K)},D.prototype._render=function(K){var de=this,ne,we=0,Oe=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(ne=Oe.createQueryEXT(),Oe.beginQueryEXT(Oe.TIME_ELAPSED_EXT,ne),we=i.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(K),!this._removed){var ht=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Yt=this.transform.zoom,cr=i.browser.now();this.style.zoomHistory.update(Yt,cr);var Nt=new i.EvaluationParameters(Yt,{now:cr,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ne=Nt.crossFadingFactor();(Ne!==1||Ne!==this._crossFadingFactor)&&(ht=!0,this._crossFadingFactor=Ne),this.style.update(Nt)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new i.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new i.Event("load"))),this.style&&(this.style.hasTransitions()||ht)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var $e=i.browser.now()-we;Oe.endQueryEXT(Oe.TIME_ELAPSED_EXT,ne),setTimeout(function(){var Bt=Oe.getQueryObjectEXT(ne,Oe.QUERY_RESULT_EXT)/1e6;Oe.deleteQueryEXT(ne),de.fire(new i.Event("gpu-timing-frame",{cpuTime:$e,gpuTime:Bt}))},50)}if(this.listens("gpu-timing-layer")){var st=this.painter.collectGpuTimers();setTimeout(function(){var Bt=de.painter.queryGpuTimers(st);de.fire(new i.Event("gpu-timing-layer",{layerTimes:Bt}))},50)}var It=this._sourcesDirty||this._styleDirty||this._placementDirty;return It||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.Event("idle")),this._loaded&&!this._fullyLoaded&&!It&&(this._fullyLoaded=!0),this}},D.prototype.remove=function(){this._hash&&this._hash.remove();for(var K=0,de=this._controls;K<de.length;K+=1){var ne=de[K];ne.onRemove(this)}this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof i.window!="undefined"&&(i.window.removeEventListener("resize",this._onWindowResize,!1),i.window.removeEventListener("orientationchange",this._onWindowResize,!1),i.window.removeEventListener("online",this._onWindowOnline,!1));var we=this.painter.context.gl.getExtension("WEBGL_lose_context");we&&we.loseContext&&we.loseContext(),mn(this._canvasContainer),mn(this._controlContainer),mn(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new i.Event("remove"))},D.prototype.triggerRepaint=function(){var K=this;this.style&&!this._frame&&(this._frame=i.browser.frame(function(de){K._frame=null,K._render(de)}))},D.prototype._onWindowOnline=function(){this._update()},D.prototype._onWindowResize=function(K){this._trackResize&&this.resize({originalEvent:K})._update()},J.showTileBoundaries.get=function(){return!!this._showTileBoundaries},J.showTileBoundaries.set=function(O){this._showTileBoundaries!==O&&(this._showTileBoundaries=O,this._update())},J.showPadding.get=function(){return!!this._showPadding},J.showPadding.set=function(O){this._showPadding!==O&&(this._showPadding=O,this._update())},J.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},J.showCollisionBoxes.set=function(O){this._showCollisionBoxes!==O&&(this._showCollisionBoxes=O,O?this.style._generateCollisionBoxes():this._update())},J.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},J.showOverdrawInspector.set=function(O){this._showOverdrawInspector!==O&&(this._showOverdrawInspector=O,this._update())},J.repaint.get=function(){return!!this._repaint},J.repaint.set=function(O){this._repaint!==O&&(this._repaint=O,this.triggerRepaint())},J.vertices.get=function(){return!!this._vertices},J.vertices.set=function(O){this._vertices=O,this._update()},D.prototype._setCacheLimits=function(K,de){i.setCacheLimits(K,de)},J.version.get=function(){return i.version},Object.defineProperties(D.prototype,J),D}(Vn);function mn(Y){Y.parentNode&&Y.parentNode.removeChild(Y)}var Ji={showCompass:!0,showZoom:!0,visualizePitch:!1},Ui=function(D){var J=this;this.options=i.extend({},Ji,D),this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(O){return O.preventDefault()}),this.options.showZoom&&(i.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(O){return J._map.zoomIn({},{originalEvent:O})}),o.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(O){return J._map.zoomOut({},{originalEvent:O})}),o.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(i.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(O){J.options.visualizePitch?J._map.resetNorthPitch({},{originalEvent:O}):J._map.resetNorth({},{originalEvent:O})}),this._compassIcon=o.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Ui.prototype._updateZoomButtons=function(){var D=this._map.getZoom(),J=D===this._map.getMaxZoom(),O=D===this._map.getMinZoom();this._zoomInButton.disabled=J,this._zoomOutButton.disabled=O,this._zoomInButton.setAttribute("aria-disabled",J.toString()),this._zoomOutButton.setAttribute("aria-disabled",O.toString())},Ui.prototype._rotateCompassArrow=function(){var D=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=D},Ui.prototype.onAdd=function(D){return this._map=D,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Bi(this._map,this._compass,this.options.visualizePitch)),this._container},Ui.prototype.onRemove=function(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Ui.prototype._createButton=function(D,J){var O=o.create("button",D,this._container);return O.type="button",O.addEventListener("click",J),O},Ui.prototype._setButtonTitle=function(D,J){var O=this._map._getUIString("NavigationControl."+J);D.title=O,D.setAttribute("aria-label",O)};var Bi=function(D,J,O){O===void 0&&(O=!1),this._clickTolerance=10,this.element=J,this.mouseRotate=new Pn({clickTolerance:D.dragRotate._mouseRotate._clickTolerance}),this.map=D,O&&(this.mousePitch=new kn({clickTolerance:D.dragRotate._mousePitch._clickTolerance})),i.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),o.addEventListener(J,"mousedown",this.mousedown),o.addEventListener(J,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(J,"touchmove",this.touchmove),o.addEventListener(J,"touchend",this.touchend),o.addEventListener(J,"touchcancel",this.reset)};Bi.prototype.down=function(D,J){this.mouseRotate.mousedown(D,J),this.mousePitch&&this.mousePitch.mousedown(D,J),o.disableDrag()},Bi.prototype.move=function(D,J){var O=this.map,K=this.mouseRotate.mousemoveWindow(D,J);if(K&&K.bearingDelta&&O.setBearing(O.getBearing()+K.bearingDelta),this.mousePitch){var de=this.mousePitch.mousemoveWindow(D,J);de&&de.pitchDelta&&O.setPitch(O.getPitch()+de.pitchDelta)}},Bi.prototype.off=function(){var D=this.element;o.removeEventListener(D,"mousedown",this.mousedown),o.removeEventListener(D,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(D,"touchmove",this.touchmove),o.removeEventListener(D,"touchend",this.touchend),o.removeEventListener(D,"touchcancel",this.reset),this.offTemp()},Bi.prototype.offTemp=function(){o.enableDrag(),o.removeEventListener(i.window,"mousemove",this.mousemove),o.removeEventListener(i.window,"mouseup",this.mouseup)},Bi.prototype.mousedown=function(D){this.down(i.extend({},D,{ctrlKey:!0,preventDefault:function(){return D.preventDefault()}}),o.mousePos(this.element,D)),o.addEventListener(i.window,"mousemove",this.mousemove),o.addEventListener(i.window,"mouseup",this.mouseup)},Bi.prototype.mousemove=function(D){this.move(D,o.mousePos(this.element,D))},Bi.prototype.mouseup=function(D){this.mouseRotate.mouseupWindow(D),this.mousePitch&&this.mousePitch.mouseupWindow(D),this.offTemp()},Bi.prototype.touchstart=function(D){D.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,D.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return D.preventDefault()}},this._startPos))},Bi.prototype.touchmove=function(D){D.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,D.targetTouches)[0],this.move({preventDefault:function(){return D.preventDefault()}},this._lastPos))},Bi.prototype.touchend=function(D){D.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Bi.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function pn(Y,D,J){if(Y=new i.LngLat(Y.lng,Y.lat),D){var O=new i.LngLat(Y.lng-360,Y.lat),K=new i.LngLat(Y.lng+360,Y.lat),de=J.locationPoint(Y).distSqr(D);J.locationPoint(O).distSqr(D)<de?Y=O:J.locationPoint(K).distSqr(D)<de&&(Y=K)}for(;Math.abs(Y.lng-J.center.lng)>180;){var ne=J.locationPoint(Y);if(ne.x>=0&&ne.y>=0&&ne.x<=J.width&&ne.y<=J.height)break;Y.lng>J.center.lng?Y.lng-=360:Y.lng+=360}return Y}var Nn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function aa(Y,D,J){var O=Y.classList;for(var K in Nn)O.remove("mapboxgl-"+J+"-anchor-"+K);O.add("mapboxgl-"+J+"-anchor-"+D)}var Ki=function(Y){function D(J,O){if(Y.call(this),(J instanceof i.window.HTMLElement||O)&&(J=i.extend({element:J},O)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=J&&J.anchor||"center",this._color=J&&J.color||"#3FB1CE",this._scale=J&&J.scale||1,this._draggable=J&&J.draggable||!1,this._clickTolerance=J&&J.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=J&&J.rotation||0,this._rotationAlignment=J&&J.rotationAlignment||"auto",this._pitchAlignment=J&&J.pitchAlignment&&J.pitchAlignment!=="auto"?J.pitchAlignment:this._rotationAlignment,!J||!J.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var K=o.createNS("http://www.w3.org/2000/svg","svg"),de=41,ne=27;K.setAttributeNS(null,"display","block"),K.setAttributeNS(null,"height",de+"px"),K.setAttributeNS(null,"width",ne+"px"),K.setAttributeNS(null,"viewBox","0 0 "+ne+" "+de);var we=o.createNS("http://www.w3.org/2000/svg","g");we.setAttributeNS(null,"stroke","none"),we.setAttributeNS(null,"stroke-width","1"),we.setAttributeNS(null,"fill","none"),we.setAttributeNS(null,"fill-rule","evenodd");var Oe=o.createNS("http://www.w3.org/2000/svg","g");Oe.setAttributeNS(null,"fill-rule","nonzero");var ht=o.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"transform","translate(3.0, 29.0)"),ht.setAttributeNS(null,"fill","#000000");for(var Yt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],cr=0,Nt=Yt;cr<Nt.length;cr+=1){var Ne=Nt[cr],$e=o.createNS("http://www.w3.org/2000/svg","ellipse");$e.setAttributeNS(null,"opacity","0.04"),$e.setAttributeNS(null,"cx","10.5"),$e.setAttributeNS(null,"cy","5.80029008"),$e.setAttributeNS(null,"rx",Ne.rx),$e.setAttributeNS(null,"ry",Ne.ry),ht.appendChild($e)}var st=o.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"fill",this._color);var It=o.createNS("http://www.w3.org/2000/svg","path");It.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),st.appendChild(It);var Bt=o.createNS("http://www.w3.org/2000/svg","g");Bt.setAttributeNS(null,"opacity","0.25"),Bt.setAttributeNS(null,"fill","#000000");var Ft=o.createNS("http://www.w3.org/2000/svg","path");Ft.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Bt.appendChild(Ft);var Ut=o.createNS("http://www.w3.org/2000/svg","g");Ut.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ut.setAttributeNS(null,"fill","#FFFFFF");var zt=o.createNS("http://www.w3.org/2000/svg","g");zt.setAttributeNS(null,"transform","translate(8.0, 8.0)");var _t=o.createNS("http://www.w3.org/2000/svg","circle");_t.setAttributeNS(null,"fill","#000000"),_t.setAttributeNS(null,"opacity","0.25"),_t.setAttributeNS(null,"cx","5.5"),_t.setAttributeNS(null,"cy","5.5"),_t.setAttributeNS(null,"r","5.4999962");var Dt=o.createNS("http://www.w3.org/2000/svg","circle");Dt.setAttributeNS(null,"fill","#FFFFFF"),Dt.setAttributeNS(null,"cx","5.5"),Dt.setAttributeNS(null,"cy","5.5"),Dt.setAttributeNS(null,"r","5.4999962"),zt.appendChild(_t),zt.appendChild(Dt),Oe.appendChild(ht),Oe.appendChild(st),Oe.appendChild(Bt),Oe.appendChild(Ut),Oe.appendChild(zt),K.appendChild(Oe),K.setAttributeNS(null,"height",de*this._scale+"px"),K.setAttributeNS(null,"width",ne*this._scale+"px"),this._element.appendChild(K),this._offset=i.Point.convert(J&&J.offset||[0,-14])}else this._element=J.element,this._offset=i.Point.convert(J&&J.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(vt){vt.preventDefault()}),this._element.addEventListener("mousedown",function(vt){vt.preventDefault()}),aa(this._element,this._anchor,"marker"),this._popup=null}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(O){return this.remove(),this._map=O,O.getCanvasContainer().appendChild(this._element),O.on("move",this._update),O.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},D.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(O){return this._lngLat=i.LngLat.convert(O),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},D.prototype.getElement=function(){return this._element},D.prototype.setPopup=function(O){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),O){if(!("offset"in O.options)){var K=38.1,de=13.5,ne=Math.sqrt(Math.pow(de,2)/2);O.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-K],"bottom-left":[ne,(K-de+ne)*-1],"bottom-right":[-ne,(K-de+ne)*-1],left:[de,(K-de)*-1],right:[-de,(K-de)*-1]}:this._offset}this._popup=O,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},D.prototype._onKeyPress=function(O){var K=O.code,de=O.charCode||O.keyCode;(K==="Space"||K==="Enter"||de===32||de===13)&&this.togglePopup()},D.prototype._onMapClick=function(O){var K=O.originalEvent.target,de=this._element;this._popup&&(K===de||de.contains(K))&&this.togglePopup()},D.prototype.getPopup=function(){return this._popup},D.prototype.togglePopup=function(){var O=this._popup;if(O)O.isOpen()?O.remove():O.addTo(this._map);else return this;return this},D.prototype._update=function(O){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=pn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var K="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?K="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(K="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var de="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?de="rotateX(0deg)":this._pitchAlignment==="map"&&(de="rotateX("+this._map.getPitch()+"deg)"),(!O||O.type==="moveend")&&(this._pos=this._pos.round()),o.setTransform(this._element,Nn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+de+" "+K)}},D.prototype.getOffset=function(){return this._offset},D.prototype.setOffset=function(O){return this._offset=i.Point.convert(O),this._update(),this},D.prototype._onMove=function(O){if(!this._isDragging){var K=this._clickTolerance||this._map._clickTolerance;this._isDragging=O.point.dist(this._pointerdownPos)>=K}this._isDragging&&(this._pos=O.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},D.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),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},D.prototype._addDragHandler=function(O){this._element.contains(O.originalEvent.target)&&(O.preventDefault(),this._positionDelta=O.point.sub(this._pos).add(this._offset),this._pointerdownPos=O.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))},D.prototype.setDraggable=function(O){return this._draggable=!!O,this._map&&(O?(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},D.prototype.isDraggable=function(){return this._draggable},D.prototype.setRotation=function(O){return this._rotation=O||0,this._update(),this},D.prototype.getRotation=function(){return this._rotation},D.prototype.setRotationAlignment=function(O){return this._rotationAlignment=O||"auto",this._update(),this},D.prototype.getRotationAlignment=function(){return this._rotationAlignment},D.prototype.setPitchAlignment=function(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this},D.prototype.getPitchAlignment=function(){return this._pitchAlignment},D}(i.Evented),Cn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ia;function sa(Y){ia!==void 0?Y(ia):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(D){ia=D.state!=="denied",Y(ia)}):(ia=!!i.window.navigator.geolocation,Y(ia))}var ba=0,is=!1,Zs=function(Y){function D(J){Y.call(this),this.options=i.extend({},Cn,J),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(O){return this._map=O,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),sa(this._setupUI),this._container},D.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.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,ba=0,is=!1},D.prototype._isOutOfMapMaxBounds=function(O){var K=this._map.getMaxBounds(),de=O.coords;return K&&(de.longitude<K.getWest()||de.longitude>K.getEast()||de.latitude<K.getSouth()||de.latitude>K.getNorth())},D.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");break}},D.prototype._onSuccess=function(O){if(this._map){if(this._isOutOfMapMaxBounds(O)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",O)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=O,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");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(O),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(O),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",O)),this._finish()}},D.prototype._updateCamera=function(O){var K=new i.LngLat(O.coords.longitude,O.coords.latitude),de=O.coords.accuracy,ne=this._map.getBearing(),we=i.extend({bearing:ne},this.options.fitBoundsOptions);this._map.fitBounds(K.toBounds(de),we,{geolocateSource:!0})},D.prototype._updateMarker=function(O){if(O){var K=new i.LngLat(O.coords.longitude,O.coords.latitude);this._accuracyCircleMarker.setLngLat(K).addTo(this._map),this._userLocationDotMarker.setLngLat(K).addTo(this._map),this._accuracy=O.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},D.prototype._updateCircleRadius=function(){var O=this._map._container.clientHeight/2,K=this._map.unproject([0,O]),de=this._map.unproject([1,O]),ne=K.distanceTo(de),we=Math.ceil(2*this._accuracy/ne);this._circleElement.style.width=we+"px",this._circleElement.style.height=we+"px"},D.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},D.prototype._onError=function(O){if(this._map){if(this.options.trackUserLocation)if(O.code===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._geolocateButton.disabled=!0;var K=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=K,this._geolocateButton.setAttribute("aria-label",K),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(O.code===3&&is)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",O)),this._finish()}},D.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},D.prototype._setupUI=function(O){var K=this;if(this._container.addEventListener("contextmenu",function(we){return we.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",O===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var de=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}else{var ne=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}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 Ki(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ki({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(we){var Oe=we.originalEvent&&we.originalEvent.type==="resize";!we.geolocateSource&&K._watchState==="ACTIVE_LOCK"&&!Oe&&(K._watchState="BACKGROUND",K._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),K._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),K.fire(new i.Event("trackuserlocationend")))})},D.prototype.trigger=function(){if(!this._setup)return i.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 i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ba--,is=!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 i.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 i.Event("trackuserlocationstart"));break}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");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ba++;var O;ba>1?(O={maximumAge:6e5,timeout:0},is=!0):(O=this.options.positionOptions,is=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},D.prototype._clearWatch=function(){i.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)},D}(i.Evented),Ga={maxWidth:100,unit:"metric"},Ml=function(D){this.options=i.extend({},Ga,D),i.bindAll(["_onMove","setUnit"],this)};Ml.prototype.getDefaultPosition=function(){return"bottom-left"},Ml.prototype._onMove=function(){zo(this._map,this._container,this.options)},Ml.prototype.onAdd=function(D){return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",D.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Ml.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Ml.prototype.setUnit=function(D){this.options.unit=D,zo(this._map,this._container,this.options)};function zo(Y,D,J){var O=J&&J.maxWidth||100,K=Y._container.clientHeight/2,de=Y.unproject([0,K]),ne=Y.unproject([O,K]),we=de.distanceTo(ne);if(J&&J.unit==="imperial"){var Oe=3.2808*we;if(Oe>5280){var ht=Oe/5280;Qs(D,O,ht,Y._getUIString("ScaleControl.Miles"))}else Qs(D,O,Oe,Y._getUIString("ScaleControl.Feet"))}else if(J&&J.unit==="nautical"){var Yt=we/1852;Qs(D,O,Yt,Y._getUIString("ScaleControl.NauticalMiles"))}else we>=1e3?Qs(D,O,we/1e3,Y._getUIString("ScaleControl.Kilometers")):Qs(D,O,we,Y._getUIString("ScaleControl.Meters"))}function Qs(Y,D,J,O){var K=Vl(J),de=K/J;Y.style.width=D*de+"px",Y.innerHTML=K+"&nbsp;"+O}function al(Y){var D=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*D)/D}function Vl(Y){var D=Math.pow(10,(""+Math.floor(Y)).length-1),J=Y/D;return J=J>=10?10:J>=5?5:J>=3?3:J>=2?2:J>=1?1:al(J),D*J}var ss=function(D){this._fullscreen=!1,D&&D.container&&(D.container instanceof i.window.HTMLElement?this._container=D.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};ss.prototype.onAdd=function(D){return this._map=D,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",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},ss.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},ss.prototype._setupUI=function(){var D=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",D).setAttribute("aria-hidden",!0),D.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._updateTitle=function(){var D=this._getTitle();this._fullscreenButton.setAttribute("aria-label",D),this._fullscreenButton.title=D},ss.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ss.prototype._isFullscreen=function(){return this._fullscreen},ss.prototype._changeIcon=function(){var D=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;D===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ss.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.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 Vs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Ys=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),wa=function(Y){function D(J){Y.call(this),this.options=i.extend(Object.create(Vs),J),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(O){return this._map&&this.remove(),this._map=O,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 i.Event("open")),this},D.prototype.isOpen=function(){return!!this._map},D.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 i.Event("close")),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(O){return this._lngLat=i.LngLat.convert(O),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},D.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},D.prototype.getElement=function(){return this._container},D.prototype.setText=function(O){return this.setDOMContent(i.window.document.createTextNode(O))},D.prototype.setHTML=function(O){var K=i.window.document.createDocumentFragment(),de=i.window.document.createElement("body"),ne;for(de.innerHTML=O;ne=de.firstChild,!!ne;)K.appendChild(ne);return this.setDOMContent(K)},D.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},D.prototype.setMaxWidth=function(O){return this.options.maxWidth=O,this._update(),this},D.prototype.setDOMContent=function(O){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(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this},D.prototype.addClassName=function(O){this._container&&this._container.classList.add(O)},D.prototype.removeClassName=function(O){this._container&&this._container.classList.remove(O)},D.prototype.setOffset=function(O){return this.options.offset=O,this._update(),this},D.prototype.toggleClassName=function(O){if(this._container)return this._container.classList.toggle(O)},D.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="&#215;",this._closeButton.addEventListener("click",this._onClose))},D.prototype._onMouseUp=function(O){this._update(O.point)},D.prototype._onMouseMove=function(O){this._update(O.point)},D.prototype._onDrag=function(O){this._update(O.point)},D.prototype._update=function(O){var K=this,de=this._lngLat||this._trackPointer;if(!(!this._map||!de||!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(Ne){return K._container.classList.add(Ne)}),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=pn(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!O))){var ne=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat),we=this.options.anchor,Oe=ol(this.options.offset);if(!we){var ht=this._container.offsetWidth,Yt=this._container.offsetHeight,cr;ne.y+Oe.bottom.y<Yt?cr=["top"]:ne.y>this._map.transform.height-Yt?cr=["bottom"]:cr=[],ne.x<ht/2?cr.push("left"):ne.x>this._map.transform.width-ht/2&&cr.push("right"),cr.length===0?we="bottom":we=cr.join("-")}var Nt=ne.add(Oe[we]).round();o.setTransform(this._container,Nn[we]+" translate("+Nt.x+"px,"+Nt.y+"px)"),aa(this._container,we,"popup")}},D.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var O=this._container.querySelector(Ys);O&&O.focus()}},D.prototype._onClose=function(){this.remove()},D}(i.Evented);function ol(Y){if(Y)if(typeof Y=="number"){var D=Math.round(Math.sqrt(.5*Math.pow(Y,2)));return{center:new i.Point(0,0),top:new i.Point(0,Y),"top-left":new i.Point(D,D),"top-right":new i.Point(-D,D),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(D,-D),"bottom-right":new i.Point(-D,-D),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var J=i.Point.convert(Y);return{center:J,top:J,"top-left":J,"top-right":J,bottom:J,"bottom-left":J,"bottom-right":J,left:J,right:J}}else return{center:i.Point.convert(Y.center||[0,0]),top:i.Point.convert(Y.top||[0,0]),"top-left":i.Point.convert(Y["top-left"]||[0,0]),"top-right":i.Point.convert(Y["top-right"]||[0,0]),bottom:i.Point.convert(Y.bottom||[0,0]),"bottom-left":i.Point.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(Y["bottom-right"]||[0,0]),left:i.Point.convert(Y.left||[0,0]),right:i.Point.convert(Y.right||[0,0])};else return ol(new i.Point(0,0))}var io={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:si,NavigationControl:Ui,GeolocateControl:Zs,AttributionControl:Qi,ScaleControl:Ml,FullscreenControl:ss,Popup:wa,Marker:Ki,Style:yu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:ua,clearPrewarmedResources:ma,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(Y){i.config.ACCESS_TOKEN=Y},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(Y){i.config.API_URL=Y},get workerCount(){return fn.workerCount},set workerCount(Y){fn.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(D){i.clearTileCache(D)},workerUrl:""};return io}),r})});var wGe=ye((Vxr,bGe)=>{"use strict";var vw=Pr(),rWt=Zl().sanitizeHTML,iWt=fJ(),yGe=m1();function _Ge(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=yGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=_Ge.prototype;ag.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=n7(t)};ag.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};ag.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ag.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ag.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ag.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ag.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!n7(e)){var r=nWt(e);t.addSource(this.idSource,r)}};ag.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r<t.length;r++){var n=t[r].id;if(typeof n=="string"&&n.indexOf(yGe.traceLayerPrefix)===0){e=n;break}}return e};ag.updateLayer=function(e){var t=this.subplot,r=xGe(e),n=this.lookupBelow(),i=this.findFollowingMapboxLayerId(n);this.removeLayer(),n7(e)&&t.addLayer({id:this.idLayer,source:this.idSource,"source-layer":e.sourcelayer||"",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=e.type,this.below=n};ag.updateStyle=function(e){if(n7(e)){var t=xGe(e);this.subplot.setOptions(this.idLayer,"setLayoutProperty",t.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",t.paint)}};ag.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};ag.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function n7(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r<t.length;r++)if(typeof t[r]!="string"||t[r].length===0)return!1;return!0}return vw.isPlainObject(t)||typeof t=="string"&&t.length>0}function xGe(e){var t={},r={};switch(e.type){case"circle":vw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":vw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":vw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=iWt(n.textposition,n.iconsize);vw.extendFlat(t,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset,"symbol-placement":n.placement}),vw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":vw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function nWt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t==="geojson"?i="data":t==="vector"?i=typeof r=="string"?"url":"tiles":t==="raster"?(i="tiles",n.tileSize=256):t==="image"&&(i="url",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=rWt(e.sourceattribution)),n}bGe.exports=function(t,r,n){var i=new _Ge(t,r);return i.update(n),i}});var PGe=ye((Gxr,LGe)=>{"use strict";var yJ=mJ(),_J=Pr(),MGe=dx(),TGe=Oa(),aWt=ho(),oWt=yv(),a7=ef(),EGe=Cg(),sWt=EGe.drawMode,lWt=EGe.selectMode,uWt=qf().prepSelect,cWt=qf().clearOutline,fWt=qf().clearSelectionsCache,hWt=qf().selectOnClick,Cx=m1(),dWt=wGe();function kGe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Gh=kGe.prototype;Gh.plot=function(e,t,r){var n=this,i=t[n.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash={},n.layerList=[]);var a;n.map?a=new Promise(function(o,s){n.updateMap(e,t,o,s)}):a=new Promise(function(o,s){n.createMap(e,t,o,s)}),r.push(a)};Gh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=CGe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new yJ.Map({container:i.div,style:o.style,center:xJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new yJ.AttributionControl({compact:!0}));u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(f){u.once("load",f)})),c=c.concat(MGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=CGe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(MGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i<e.length;i++){var l=e[i][0].trace,u=l._module;typeof l.below=="string"?a=l.below:u.getBelow&&(a=u.getBelow(l,this)),a===""&&(s=!0),o["trace-"+l.uid]=a||""}for(i=0;i<n.length;i++){var c=n[i];typeof c.below=="string"?a=c.below:s?a="traces":a="",o["layout-"+i]=a}var f={},h,d;for(h in o)a=o[h],f[a]?f[a].push(h):f[a]=[h];for(a in f){var v=f[a];if(v.length>1)for(i=0;i<v.length;i++)h=v[i],h.indexOf("trace-")===0?(d=h.split("trace-")[1],this.traceHash[d]&&(this.traceHash[d].below=null)):h.indexOf("layout-")===0&&(d=h.split("layout-")[1],this.layerList[d]&&(this.layerList[d].below=null))}};var AGe={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};Gh.updateData=function(e){var t=this.traceHash,r,n,i,a,o=e.slice().sort(function(f,h){return AGe[f[0].trace.type]-AGe[h[0].trace.type]});for(i=0;i<o.length;i++){var s=o[i];n=s[0].trace,r=t[n.uid];var l=!1;r&&(r.type===n.type?(r.update(s),l=!0):r.dispose()),!l&&n._module&&(t[n.uid]=n._module.plot(this,s))}var u=Object.keys(t);e:for(i=0;i<u.length;i++){var c=u[i];for(a=0;a<e.length;a++)if(n=e[a][0].trace,c===n.uid)continue e;r=t[c],r.dispose(),delete t[c]}};Gh.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(xJ(r.center)),t.setZoom(r.zoom),t.setBearing(r.bearing),t.setPitch(r.pitch)),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.mapbox?t.scrollZoom.enable():t.scrollZoom.disable()};Gh.resolveOnRender=function(e){var t=this.map;t.on("render",function r(){t.loaded()&&(t.off("render",r),setTimeout(e,10))})};Gh.rejectOnError=function(e){var t=this.map;function r(){e(new Error(Cx.mapOnErrorMsg))}t.once("error",r),t.once("style.error",r),t.once("source.error",r),t.once("tile.error",r),t.once("layer.error",r)};Gh.createFramework=function(e){var t=this,r=t.div=document.createElement("div");r.id=t.uid,r.style.position="absolute",t.container.appendChild(r),t.xaxis={_id:"x",c2p:function(n){return t.project(n).x}},t.yaxis={_id:"y",c2p:function(n){return t.project(n).y}},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},aWt.setConvert(t.mockAxis,e)};Gh.initFx=function(e,t){var r=this,n=r.gd,i=r.map;i.on("moveend",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];TGe.call("_storeDirectGUIEdit",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l._rehover&&l._rehover()}}),i.on("wheel",function(){r.wheeling=!0}),i.on("mousemove",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return i.unproject(u).lng},r.yaxis.p2c=function(){return i.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&a7.hover(n,s,r.id)},a7.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function a(){a7.loneUnhover(t._hoverlayer)}i.on("dragstart",function(){r.dragging=!0,a()}),i.on("zoomstart",a),i.on("mouseout",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}i.on("drag",o),i.on("zoom",o),i.on("dblclick",function(){var s=n._fullLayout[r.id];TGe.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;i.setCenter(xJ(l.center)),i.setZoom(l.zoom),i.setBearing(l.bearing),i.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){fWt(r.dragOptions),cWt(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf("select")>-1&&hWt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&a7.click(n,l.originalEvent)}}};Gh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=_J.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),lWt(a)||sWt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){uWt(l,u,c,t.dragOptions,a)},oWt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Gh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Gh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i<n.length;i++)n[i].dispose();for(n=this.layerList=[],i=0;i<r.length;i++)n.push(dWt(this,i,r[i]))}else for(i=0;i<r.length;i++)n[i].update(r[i])};Gh.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))};Gh.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()};Gh.setOptions=function(e,t,r){for(var n in r)this.map[t](e,n,r[n])};Gh.getMapLayers=function(){return this.map.getStyle().layers};Gh.addLayer=function(e,t){var r=this.map;if(typeof t=="string"){if(t===""){r.addLayer(e,t);return}for(var n=this.getMapLayers(),i=0;i<n.length;i++)if(t===n[i].id){r.addLayer(e,t);return}_J.warn(["Trying to add layer with *below* value",t,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}r.addLayer(e)};Gh.project=function(e){return this.map.project(new yJ.LngLat(e[0],e[1]))};Gh.getView=function(){var e=this.map,t=e.getCenter(),r=t.lng,n=t.lat,i={lon:r,lat:n},a=e.getCanvas(),o=parseInt(a.style.width),s=parseInt(a.style.height);return{center:i,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),_derived:{coordinates:[e.unproject([0,0]).toArray(),e.unproject([o,0]).toArray(),e.unproject([o,s]).toArray(),e.unproject([0,s]).toArray()]}}};Gh.getViewEdits=function(e){for(var t=this.id,r=["center","zoom","bearing","pitch"],n={},i=0;i<r.length;i++){var a=r[i];n[t+"."+a]=e[a]}return n};Gh.getViewEditsWithDerived=function(e){var t=this.id,r=this.getViewEdits(e);return r[t+"._derived"]=e._derived,r};function CGe(e,t){var r={};if(_J.isPlainObject(e))r.id=e.id,r.style=e;else if(typeof e=="string")if(r.id=e,Cx.styleValuesMapbox.indexOf(e)!==-1)r.style=SGe(e);else if(Cx.stylesNonMapbox[e]){r.style=Cx.stylesNonMapbox[e];var n=r.style.sources["plotly-"+e],i=n?n.tiles:void 0;i&&i[0]&&i[0].slice(-9)==="?api_key="&&(i[0]+=t._mapboxAccessToken)}else r.style=e;else r.id=Cx.styleValueDflt,r.style=SGe(Cx.styleValueDflt);return r.transition={duration:0,delay:0},r}function SGe(e){return Cx.styleUrlPrefix+e+"-"+Cx.styleUrlSuffix}function xJ(e){return[e.lon,e.lat]}LGe.exports=kGe});var DGe=ye((Hxr,RGe)=>{"use strict";var bJ=Pr(),vWt=q_(),pWt=Kd(),IGe=Yk();RGe.exports=function(t,r,n){vWt(t,r,n,{type:"mapbox",attributes:IGe,handleDefaults:gWt,partition:"y",accessToken:r._mapboxAccessToken})};function gWt(e,t,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var i=r("bounds.west"),a=r("bounds.east"),o=r("bounds.south"),s=r("bounds.north");(i===void 0||a===void 0||o===void 0||s===void 0)&&delete t.bounds,pWt(e,t,{name:"layers",handleItemDefaults:mWt}),t._input=e}function mWt(e,t){function r(l,u){return bJ.coerce(e,t,IGe.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",bJ.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),bJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var o7=ye(Np=>{"use strict";var FGe=mJ(),nm=Pr(),wJ=nm.strTranslate,yWt=nm.strScale,_Wt=Id().getSubplotCalcData,xWt=Wp(),bWt=qa(),zGe=So(),wWt=Zl(),TWt=PGe(),Lx="mapbox",sy=Np.constants=m1();Np.name=Lx;Np.attr="subplot";Np.idRoot=Lx;Np.idRegex=Np.attrRegex=nm.counterRegex(Lx);var AWt=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Np.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Np.layoutAttributes=Yk();Np.supplyLayoutDefaults=DGe();var qGe=!0;Np.plot=function(t){qGe&&(qGe=!1,nm.warn(AWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[Lx];if(FGe.version!==sy.requiredVersion)throw new Error(sy.wrongVersionErrorMsg);var a=SWt(t,i);FGe.accessToken=a;for(var o=0;o<i.length;o++){var s=i[o],l=_Wt(n,Lx,s),u=r[s],c=u._subplot;c||(c=new TWt(t,s),r[s]._subplot=c),c.viewInitial||(c.viewInitial={center:nm.extendFlat({},u.center),zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),c.plot(l,r,t._promises)}};Np.clean=function(e,t,r,n){for(var i=n._subplots[Lx]||[],a=0;a<i.length;a++){var o=i[a];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}};Np.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[Lx],n=t._size,i=0;i<r.length;i++){var a=t[r[i]],o=a.domain,s=a._subplot,l=s.toImage("png"),u=t._glimages.append("svg:image");u.attr({xmlns:xWt.svg,"xlink:href":l,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"});var c=bWt.select(a._subplot.div),f=c.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!f){var h=t._glimages.append("g");h.attr("transform",wJ(n.l+n.w*o.x[0]+10,n.t+n.h*(1-o.y[0])-31)),h.append("path").attr("d",sy.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),h.append("path").attr("d",sy.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),h.append("path").attr("d",sy.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),h.append("polygon").attr("points",sy.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var d=c.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),v=t._glimages.append("g"),m=v.append("text");m.text(d).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":d});var b=zGe.bBox(m.node()),p=n.w*(o.x[1]-o.x[0]);if(b.width>p/2){var k=d.split("|").join("<br>");m.text(k).attr("data-unformatted",k).call(wWt.convertToTspans,e),b=zGe.bBox(m.node())}m.attr("transform",wJ(-3,-b.height+8)),v.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var M=1;b.width+6>p&&(M=p/(b.width+6));var T=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",wJ(T[0],T[1])+yWt(M))}};function SWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,l=0;l<t.length;l++){var u=r[t[l]],c=u.accesstoken;OGe(u.style)&&(c?nm.pushUnique(i,c):(OGe(u._input.style)&&(nm.error("Uses Mapbox map style, but did not set an access token."),o=!0),s=!0)),c&&nm.pushUnique(a,c)}if(s){var f=o?sy.noAccessTokenErrorMsg:sy.missingStyleErrorMsg;throw nm.error(f),new Error(f)}return i.length?(i.length>1&&nm.warn(sy.multipleTokensErrorMsg),i[0]):(a.length&&nm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function OGe(e){return typeof e=="string"&&(sy.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Np.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Lx],n=0;n<r.length;n++){var i=t[r[n]]._subplot;i.updateFx(t)}}});var NGe=ye((Xxr,BGe)=>{"use strict";var Wxr=["*scattermapbox* trace is deprecated!","Please consider switching to the *scattermap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");BGe.exports={attributes:$z(),supplyDefaults:JVe(),colorbar:Qd(),formatLabels:cJ(),calc:bF(),plot:fGe(),hoverPoints:i7().hoverPoints,eventData:pGe(),selectPoints:mGe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:o7(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var VGe=ye((Zxr,UGe)=>{"use strict";UGe.exports=NGe()});var TJ=ye((Yxr,GGe)=>{"use strict";var y1=o5(),MWt=Tu(),{hovertemplateAttrs:EWt,templatefallbackAttrs:kWt}=Ll(),CWt=Gl(),Px=Ao().extendFlat;GGe.exports=Px({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Px({},y1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:y1.text,hovertext:y1.hovertext,marker:{line:{color:Px({},y1.marker.line.color,{editType:"plot"}),width:Px({},y1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Px({},y1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Px({},y1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Px({},y1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:y1.hoverinfo,hovertemplate:EWt({},{keys:["properties"]}),hovertemplatefallback:kWt(),showlegend:Px({},CWt.showlegend,{dflt:!1})},MWt("",{cLetter:"z",editTypeOverride:"calc"}))});var jGe=ye((Kxr,HGe)=>{"use strict";var Qk=Pr(),LWt=td(),PWt=TJ();HGe.exports=function(t,r,n,i){function a(c,f){return Qk.coerce(t,r,PWt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!Qk.isArrayOrTypedArray(o)||!o.length||!Qk.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||Qk.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),LWt(t,r,i,a,{prefix:"",cLetter:"z"}),Qk.coerceSelectionMarkerOpacity(r,a)}});var AJ=ye((Jxr,ZGe)=>{"use strict";var IWt=Eo(),_1=Pr(),RWt=tc(),DWt=So(),FWt=fx().makeBlank,WGe=dx();function zWt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=t._opts={fill:n,line:i,geojson:FWt()};if(!r)return a;var o=WGe.extractTraceFeature(e);if(!o)return a;var s=RWt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;_1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var M=k.mo;return IWt(M)?+_1.constrain(M,0,1):0});var f;_1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;_1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d<e.length;d++){var v=e[d],m=v.fOut;if(m){var b=m.properties;b.fc=s(v.z),c&&(b.mo=c(v)),f&&(b.mlc=f(v)),h&&(b.mlw=h(v)),v.ct=b.ct,v._polygons=WGe.feature2polygons(m)}}var p=c?{type:"identity",property:"mo"}:l.opacity;return _1.extendFlat(n.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":p}),_1.extendFlat(i.paint,{"line-color":f?{type:"identity",property:"mlc"}:u.color,"line-width":h?{type:"identity",property:"mlw"}:u.width,"line-opacity":p}),n.layout.visibility="visible",i.layout.visibility="visible",a.geojson={type:"FeatureCollection",features:o},XGe(e),a}function XGe(e){var t=e[0].trace,r=t._opts,n;if(t.selectedpoints){for(var i=DWt.makeSelectedPointStyleFns(t),a=0;a<e.length;a++){var o=e[a];o.fOut&&(o.fOut.properties.mo2=i.selectedOpacityFn(o))}n={type:"identity",property:"mo2"}}else n=_1.isArrayOrTypedArray(t.marker.opacity)?{type:"identity",property:"mo"}:t.marker.opacity;return _1.extendFlat(r.fill.paint,{"fill-opacity":n}),_1.extendFlat(r.line.paint,{"line-opacity":n}),r}ZGe.exports={convert:zWt,convertOnSelect:XGe}});var QGe=ye(($xr,$Ge)=>{"use strict";var KGe=AJ().convert,qWt=AJ().convertOnSelect,YGe=m1().traceLayerPrefix;function JGe(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",YGe+t+"-fill"],["line",YGe+t+"-line"]],this.below=null}var P5=JGe.prototype;P5.update=function(e){this._update(KGe(e)),e[0].trace._glTrace=this};P5.updateOnSelect=function(e){this._update(qWt(e))};P5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i<r.length;i++){var a=r[i],o=a[0],s=a[1],l=e[o];t.setOptions(s,"setLayoutProperty",l.layout),l.layout.visibility==="visible"&&t.setOptions(s,"setPaintProperty",l.paint)}};P5._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};P5._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};P5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};$Ge.exports=function(t,r){var n=r[0].trace,i=new JGe(t,n.uid),a=i.sourceId,o=KGe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var tHe=ye((ebr,eHe)=>{"use strict";var Qxr=["*choroplethmapbox* trace is deprecated!","Please consider switching to the *choroplethmap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");eHe.exports={attributes:TJ(),supplyDefaults:jGe(),colorbar:D_(),calc:VF(),plot:QGe(),hoverPoints:HF(),eventData:jF(),selectPoints:WF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a<r.length;a++)if(i=r[a].id,typeof i=="string"&&i.indexOf("plotly-")===-1)return i}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:o7(),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}});var iHe=ye((tbr,rHe)=>{"use strict";rHe.exports=tHe()});var MJ=ye((rbr,aHe)=>{"use strict";var OWt=Tu(),{hovertemplateAttrs:BWt,templatefallbackAttrs:NWt}=Ll(),nHe=Gl(),s7=$z(),SJ=Ao().extendFlat;aHe.exports=SJ({lon:s7.lon,lat:s7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:s7.text,hovertext:s7.hovertext,hoverinfo:SJ({},nHe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:BWt(),hovertemplatefallback:NWt(),showlegend:SJ({},nHe.showlegend,{dflt:!1})},OWt("",{cLetter:"z",editTypeOverride:"calc"}))});var sHe=ye((ibr,oHe)=>{"use strict";var UWt=Pr(),VWt=td(),GWt=MJ();oHe.exports=function(t,r,n,i){function a(u,c){return UWt.coerce(t,r,GWt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),VWt(t,r,i,a,{prefix:"",cLetter:"z"})}});var cHe=ye((nbr,uHe)=>{"use strict";var EJ=Eo(),HWt=Pr().isArrayOrTypedArray,kJ=fs().BADNUM,jWt=gv(),lHe=Pr()._;uHe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=HWt(a)&&a.length,s=0;s<n;s++){var l=i[s]={},u=r.lon[s],c=r.lat[s];if(l.lonlat=EJ(u)&&EJ(c)?[+u,+c]:[kJ,kJ],o){var f=a[s];l.z=EJ(f)?f:kJ}}return jWt(t,r,{vals:o?a:[0,1],containerStr:"",cLetter:"z"}),n&&(i[0].t={labels:{lat:lHe(t,"lat:")+" ",lon:lHe(t,"lon:")+" "}}),i}});var pHe=ye((abr,vHe)=>{"use strict";var WWt=Eo(),CJ=Pr(),fHe=ka(),hHe=tc(),dHe=fs().BADNUM,XWt=fx().makeBlank;vHe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:i,geojson:XWt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=CJ.isArrayOrTypedArray(l)&&l.length,f=CJ.isArrayOrTypedArray(u);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==dHe){var v={};if(c){var m=h.z;v.z=m!==dHe?m:0}f&&(v.r=WWt(u[s])&&u[s]>0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=hHe.extractOpts(r),p=b.reversescale?hHe.flipScale(b.colorscale):b.colorscale,k=p[0][1],M=fHe.opacity(k)<1?k:fHe.addOpacity(k,0),T=["interpolate",["linear"],["heatmap-density"],0,M];for(s=1;s<p.length;s++)T.push(p[s][0],p[s][1]);var L=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return CJ.extendFlat(a.heatmap.paint,{"heatmap-weight":c?L:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":f?{type:"identity",property:"r"}:r.radius,"heatmap-opacity":r.opacity}),a.geojson={type:"FeatureCollection",features:o},a.heatmap.layout.visibility="visible",a}});var _He=ye((obr,yHe)=>{"use strict";var gHe=pHe(),ZWt=m1().traceLayerPrefix;function mHe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",ZWt+t+"-heatmap"]],this.below=null}var l7=mHe.prototype;l7.update=function(e){var t=this.subplot,r=this.layerList,n=gHe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a<r.length;a++){var o=r[a],s=o[0],l=o[1],u=n[s];t.setOptions(l,"setLayoutProperty",u.layout),u.layout.visibility==="visible"&&t.setOptions(l,"setPaintProperty",u.paint)}};l7._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},t)}};l7._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};l7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};yHe.exports=function(t,r){var n=r[0].trace,i=new mHe(t,n.uid),a=i.sourceId,o=gHe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),i}});var bHe=ye((sbr,xHe)=>{"use strict";var YWt=ho(),KWt=i7().hoverPoints,JWt=i7().getExtraText;xHe.exports=function(t,r,n){var i=KWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=YWt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=JWt(s,l,o[0].t.labels),[a]}}});var THe=ye((lbr,wHe)=>{"use strict";wHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var SHe=ye((cbr,AHe)=>{"use strict";var ubr=["*densitymapbox* trace is deprecated!","Please consider switching to the *densitymap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");AHe.exports={attributes:MJ(),supplyDefaults:sHe(),colorbar:D_(),formatLabels:cJ(),calc:cHe(),plot:_He(),hoverPoints:bHe(),eventData:THe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n<r.length;n++){var i=r[n],a=i.id;if(i.type==="symbol"&&typeof a=="string"&&a.indexOf("plotly-")===-1)return a}},moduleType:"trace",name:"densitymapbox",basePlotModule:o7(),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}});var EHe=ye((fbr,MHe)=>{"use strict";MHe.exports=SHe()});var CHe=ye((hbr,kHe)=>{kHe.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin}
3215{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin}
3216{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}
3217{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin}

Callers 15

HtFunction · 0.70
atFunction · 0.70
zeFunction · 0.70
uaFunction · 0.70
FaFunction · 0.70
EnFunction · 0.70
IeFunction · 0.70
HlFunction · 0.70
acFunction · 0.70
XeFunction · 0.70
DoFunction · 0.70
CsFunction · 0.70

Calls 7

xeFunction · 0.70
getMethod · 0.45
constantOrMethod · 0.45
depthModeForSublayerMethod · 0.45
getPaintPropertyMethod · 0.45

Tested by

no test coverage detected