(ve,K,ge,te)
| 3198 | `}),{fragmentSource:ve,vertexSource:K,staticAttributes:te,staticUniforms:Ce}}var df=Object.freeze({__proto__:null,prelude:Ll,background:Bu,backgroundPattern:Ic,circle:xl,clippingMask:_c,heatmap:Eu,heatmapTexture:Iu,collisionBox:Nl,collisionCircle:Of,debug:Yf,fill:Wu,fillOutline:Pc,fillOutlinePattern:xc,fillPattern:_h,fillExtrusion:ff,fillExtrusionPattern:yf,hillshadePrepare:Xu,hillshade:hf,line:hu,lineGradient:Qc,linePattern:nh,lineSDF:_f,raster:bl,symbolIcon:ku,symbolSDF:Ou,symbolTextAndIcon:Cf}),Rc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Rc.prototype.bind=function(K,ge,te,pe,He,Ce,Ke,pt){this.context=K;for(var Ut=this.boundPaintVertexBuffers.length!==pe.length,Tr=0;!Ut&&Tr<pe.length;Tr++)this.boundPaintVertexBuffers[Tr]!==pe[Tr]&&(Ut=!0);var Ur=!this.vao||this.boundProgram!==ge||this.boundLayoutVertexBuffer!==te||Ut||this.boundIndexBuffer!==He||this.boundVertexOffset!==Ce||this.boundDynamicVertexBuffer!==Ke||this.boundDynamicVertexBuffer2!==pt;!K.extVertexArrayObject||Ur?this.freshBind(ge,te,pe,He,Ce,Ke,pt):(K.bindVertexArrayOES.set(this.vao),Ke&&Ke.bind(),He&&He.dynamicDraw&&He.bind(),pt&&pt.bind())},Rc.prototype.freshBind=function(K,ge,te,pe,He,Ce,Ke){var pt,Ut=K.numAttributes,Tr=this.context,Ur=Tr.gl;if(Tr.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Tr.extVertexArrayObject.createVertexArrayOES(),Tr.bindVertexArrayOES.set(this.vao),pt=0,this.boundProgram=K,this.boundLayoutVertexBuffer=ge,this.boundPaintVertexBuffers=te,this.boundIndexBuffer=pe,this.boundVertexOffset=He,this.boundDynamicVertexBuffer=Ce,this.boundDynamicVertexBuffer2=Ke;else{pt=Tr.currentNumAttributes||0;for(var vr=Ut;vr<pt;vr++)Ur.disableVertexAttribArray(vr)}ge.enableAttributes(Ur,K);for(var mt=0,Et=te;mt<Et.length;mt+=1){var Bt=Et[mt];Bt.enableAttributes(Ur,K)}Ce&&Ce.enableAttributes(Ur,K),Ke&&Ke.enableAttributes(Ur,K),ge.bind(),ge.setVertexAttribPointers(Ur,K,He);for(var or=0,dr=te;or<dr.length;or+=1){var ur=dr[or];ur.bind(),ur.setVertexAttribPointers(Ur,K,He)}Ce&&(Ce.bind(),Ce.setVertexAttribPointers(Ur,K,He)),pe&&pe.bind(),Ke&&(Ke.bind(),Ke.setVertexAttribPointers(Ur,K,He)),Tr.currentNumAttributes=Ut},Rc.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function Ju(ve){for(var K=[],ge=0;ge<ve.length;ge++)if(ve[ge]!==null){var te=ve[ge].split(" ");K.push(te.pop())}return K}var xf=function(K,ge,te,pe,He,Ce){var Ke=K.gl;this.program=Ke.createProgram();for(var pt=Ju(te.staticAttributes),Ut=pe?pe.getBinderAttributes():[],Tr=pt.concat(Ut),Ur=te.staticUniforms?Ju(te.staticUniforms):[],vr=pe?pe.getBinderUniforms():[],mt=Ur.concat(vr),Et=[],Bt=0,or=mt;Bt<or.length;Bt+=1){var dr=or[Bt];Et.indexOf(dr)<0&&Et.push(dr)}var ur=pe?pe.defines():[];Ce&&ur.push("#define OVERDRAW_INSPECTOR;");var pr=ur.concat(Ll.fragmentSource,te.fragmentSource).join(` |
| 3199 | `),cr=ur.concat(Ll.vertexSource,te.vertexSource).join(` |
| 3200 | `),Gt=Ke.createShader(Ke.FRAGMENT_SHADER);if(Ke.isContextLost()){this.failedToCreate=!0;return}Ke.shaderSource(Gt,pr),Ke.compileShader(Gt),Ke.attachShader(this.program,Gt);var lr=Ke.createShader(Ke.VERTEX_SHADER);if(Ke.isContextLost()){this.failedToCreate=!0;return}Ke.shaderSource(lr,cr),Ke.compileShader(lr),Ke.attachShader(this.program,lr),this.attributes={};var qt={};this.numAttributes=Tr.length;for(var zr=0;zr<this.numAttributes;zr++)Tr[zr]&&(Ke.bindAttribLocation(this.program,zr,Tr[zr]),this.attributes[Tr[zr]]=zr);Ke.linkProgram(this.program),Ke.deleteShader(lr),Ke.deleteShader(Gt);for(var $r=0;$r<Et.length;$r++){var Ai=Et[$r];if(Ai&&!qt[Ai]){var wa=Ke.getUniformLocation(this.program,Ai);wa&&(qt[Ai]=wa)}}this.fixedUniforms=He(K,qt),this.binderUniforms=pe?pe.getUniforms(K,qt):[]};xf.prototype.draw=function(K,ge,te,pe,He,Ce,Ke,pt,Ut,Tr,Ur,vr,mt,Et,Bt,or){var dr,ur=K.gl;if(!this.failedToCreate){K.program.set(this.program),K.setDepthMode(te),K.setStencilMode(pe),K.setColorMode(He),K.setCullFace(Ce);for(var pr in this.fixedUniforms)this.fixedUniforms[pr].set(Ke[pr]);Et&&Et.setUniforms(K,this.binderUniforms,vr,{zoom:mt});for(var cr=(dr={},dr[ur.LINES]=2,dr[ur.TRIANGLES]=3,dr[ur.LINE_STRIP]=1,dr)[ge],Gt=0,lr=Ur.get();Gt<lr.length;Gt+=1){var qt=lr[Gt],zr=qt.vaos||(qt.vaos={}),$r=zr[pt]||(zr[pt]=new Rc);$r.bind(K,this,Ut,Et?Et.getPaintVertexBuffers():[],Tr,qt.vertexOffset,Bt,or),ur.drawElements(ge,qt.primitiveLength*cr,ur.UNSIGNED_SHORT,qt.primitiveOffset*cr*2)}}};function Qu(ve,K,ge){var te=1/xs(ge,1,K.transform.tileZoom),pe=Math.pow(2,ge.tileID.overscaledZ),He=ge.tileSize*Math.pow(2,K.transform.tileZoom)/pe,Ce=He*(ge.tileID.canonical.x+ge.tileID.wrap*pe),Ke=He*ge.tileID.canonical.y;return{u_image:0,u_texsize:ge.imageAtlasTexture.size,u_scale:[te,ve.fromScale,ve.toScale],u_fade:ve.t,u_pixel_coord_upper:[Ce>>16,Ke>>16],u_pixel_coord_lower:[Ce&65535,Ke&65535]}}function ef(ve,K,ge,te){var pe=ge.imageManager.getPattern(ve.from.toString()),He=ge.imageManager.getPattern(ve.to.toString()),Ce=ge.imageManager.getPixelSize(),Ke=Ce.width,pt=Ce.height,Ut=Math.pow(2,te.tileID.overscaledZ),Tr=te.tileSize*Math.pow(2,ge.transform.tileZoom)/Ut,Ur=Tr*(te.tileID.canonical.x+te.tileID.wrap*Ut),vr=Tr*te.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:pe.tl,u_pattern_br_a:pe.br,u_pattern_tl_b:He.tl,u_pattern_br_b:He.br,u_texsize:[Ke,pt],u_mix:K.t,u_pattern_size_a:pe.displaySize,u_pattern_size_b:He.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/xs(te,1,ge.transform.tileZoom),u_pixel_coord_upper:[Ur>>16,vr>>16],u_pixel_coord_lower:[Ur&65535,vr&65535]}}var Lf=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_lightpos:new e.Uniform3f(ve,K.u_lightpos),u_lightintensity:new e.Uniform1f(ve,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ve,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ve,K.u_vertical_gradient),u_opacity:new e.Uniform1f(ve,K.u_opacity)}},du=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_lightpos:new e.Uniform3f(ve,K.u_lightpos),u_lightintensity:new e.Uniform1f(ve,K.u_lightintensity),u_lightcolor:new e.Uniform3f(ve,K.u_lightcolor),u_vertical_gradient:new e.Uniform1f(ve,K.u_vertical_gradient),u_height_factor:new e.Uniform1f(ve,K.u_height_factor),u_image:new e.Uniform1i(ve,K.u_image),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade),u_opacity:new e.Uniform1f(ve,K.u_opacity)}},Nf=function(ve,K,ge,te){var pe=K.style.light,He=pe.properties.get("position"),Ce=[He.x,He.y,He.z],Ke=e.create$1();pe.properties.get("anchor")==="viewport"&&e.fromRotation(Ke,-K.transform.angle),e.transformMat3(Ce,Ce,Ke);var pt=pe.properties.get("color");return{u_matrix:ve,u_lightpos:Ce,u_lightintensity:pe.properties.get("intensity"),u_lightcolor:[pt.r,pt.g,pt.b],u_vertical_gradient:+ge,u_opacity:te}},ec=function(ve,K,ge,te,pe,He,Ce){return e.extend(Nf(ve,K,ge,te),Qu(He,K,Ce),{u_height_factor:-Math.pow(2,pe.overscaledZ)/Ce.tileSize/8})},Dc=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},bc=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_image:new e.Uniform1i(ve,K.u_image),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade)}},Jl=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_world:new e.Uniform2f(ve,K.u_world)}},Cu=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_world:new e.Uniform2f(ve,K.u_world),u_image:new e.Uniform1i(ve,K.u_image),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade)}},zc=function(ve){return{u_matrix:ve}},tf=function(ve,K,ge,te){return e.extend(zc(ve),Qu(ge,K,te))},fc=function(ve,K){return{u_matrix:ve,u_world:K}},Fc=function(ve,K,ge,te,pe){return e.extend(tf(ve,K,ge,te),{u_world:pe})},er=function(ve,K){return{u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(ve,K.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(ve,K.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},wr=function(ve,K,ge,te){var pe=ve.transform,He,Ce;if(te.paint.get("circle-pitch-alignment")==="map"){var Ke=xs(ge,1,pe.zoom);He=!0,Ce=[Ke,Ke]}else He=!1,Ce=pe.pixelsToGLUnits;return{u_camera_to_center_distance:pe.cameraToCenterDistance,u_scale_with_map:+(te.paint.get("circle-pitch-scale")==="map"),u_matrix:ve.translatePosMatrix(K.posMatrix,ge,te.paint.get("circle-translate"),te.paint.get("circle-translate-anchor")),u_pitch_with_map:+He,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:Ce}},ai=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(ve,K.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(ve,K.u_extrude_scale),u_overscale_factor:new e.Uniform1f(ve,K.u_overscale_factor)}},Jr=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_inv_matrix:new e.UniformMatrix4f(ve,K.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(ve,K.u_viewport_size)}},Fi=function(ve,K,ge){var te=xs(ge,1,K.zoom),pe=Math.pow(2,K.zoom-ge.tileID.overscaledZ),He=ge.tileID.overscaleFactor();return{u_matrix:ve,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:te,u_extrude_scale:[K.pixelsToGLUnits[0]/(te*pe),K.pixelsToGLUnits[1]/(te*pe)],u_overscale_factor:He}},pa=function(ve,K,ge){return{u_matrix:ve,u_inv_matrix:K,u_camera_to_center_distance:ge.cameraToCenterDistance,u_viewport_size:[ge.width,ge.height]}},Ba=function(ve,K){return{u_color:new e.UniformColor(ve,K.u_color),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_overlay:new e.Uniform1i(ve,K.u_overlay),u_overlay_scale:new e.Uniform1f(ve,K.u_overlay_scale)}},an=function(ve,K,ge){return ge===void 0&&(ge=1),{u_matrix:ve,u_color:K,u_overlay:0,u_overlay_scale:ge}},hn=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},Ln=function(ve){return{u_matrix:ve}},Na=function(ve,K){return{u_extrude_scale:new e.Uniform1f(ve,K.u_extrude_scale),u_intensity:new e.Uniform1f(ve,K.u_intensity),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix)}},qa=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_world:new e.Uniform2f(ve,K.u_world),u_image:new e.Uniform1i(ve,K.u_image),u_color_ramp:new e.Uniform1i(ve,K.u_color_ramp),u_opacity:new e.Uniform1f(ve,K.u_opacity)}},Za=function(ve,K,ge,te){return{u_matrix:ve,u_extrude_scale:xs(K,1,ge),u_intensity:te}},Ta=function(ve,K,ge,te){var pe=e.create();e.ortho(pe,0,ve.width,ve.height,0,0,1);var He=ve.context.gl;return{u_matrix:pe,u_world:[He.drawingBufferWidth,He.drawingBufferHeight],u_image:ge,u_color_ramp:te,u_opacity:K.paint.get("heatmap-opacity")}},Hn=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_image:new e.Uniform1i(ve,K.u_image),u_latrange:new e.Uniform2f(ve,K.u_latrange),u_light:new e.Uniform2f(ve,K.u_light),u_shadow:new e.UniformColor(ve,K.u_shadow),u_highlight:new e.UniformColor(ve,K.u_highlight),u_accent:new e.UniformColor(ve,K.u_accent)}},go=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_image:new e.Uniform1i(ve,K.u_image),u_dimension:new e.Uniform2f(ve,K.u_dimension),u_zoom:new e.Uniform1f(ve,K.u_zoom),u_unpack:new e.Uniform4f(ve,K.u_unpack)}},wo=function(ve,K,ge){var te=ge.paint.get("hillshade-shadow-color"),pe=ge.paint.get("hillshade-highlight-color"),He=ge.paint.get("hillshade-accent-color"),Ce=ge.paint.get("hillshade-illumination-direction")*(Math.PI/180);ge.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ce-=ve.transform.angle);var Ke=!ve.options.moving;return{u_matrix:ve.transform.calculatePosMatrix(K.tileID.toUnwrapped(),Ke),u_image:0,u_latrange:Io(ve,K.tileID),u_light:[ge.paint.get("hillshade-exaggeration"),Ce],u_shadow:te,u_highlight:pe,u_accent:He}},yo=function(ve,K){var ge=K.stride,te=e.create();return e.ortho(te,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(te,te,[0,-e.EXTENT,0]),{u_matrix:te,u_image:1,u_dimension:[ge,ge],u_zoom:ve.overscaledZ,u_unpack:K.getUnpackVector()}};function Io(ve,K){var ge=Math.pow(2,K.canonical.z),te=K.canonical.y;return[new e.MercatorCoordinate(0,te/ge).toLngLat().lat,new e.MercatorCoordinate(0,(te+1)/ge).toLngLat().lat]}var Vn=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels)}},wn=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels),u_image:new e.Uniform1i(ve,K.u_image),u_image_height:new e.Uniform1f(ve,K.u_image_height)}},Oo=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_image:new e.Uniform1i(ve,K.u_image),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels),u_scale:new e.Uniform3f(ve,K.u_scale),u_fade:new e.Uniform1f(ve,K.u_fade)}},ps=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_ratio:new e.Uniform1f(ve,K.u_ratio),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(ve,K.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(ve,K.u_patternscale_a),u_patternscale_b:new e.Uniform2f(ve,K.u_patternscale_b),u_sdfgamma:new e.Uniform1f(ve,K.u_sdfgamma),u_image:new e.Uniform1i(ve,K.u_image),u_tex_y_a:new e.Uniform1f(ve,K.u_tex_y_a),u_tex_y_b:new e.Uniform1f(ve,K.u_tex_y_b),u_mix:new e.Uniform1f(ve,K.u_mix)}},js=function(ve,K,ge){var te=ve.transform;return{u_matrix:Wl(ve,K,ge),u_ratio:1/xs(K,1,te.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/te.pixelsToGLUnits[0],1/te.pixelsToGLUnits[1]]}},pl=function(ve,K,ge,te){return e.extend(js(ve,K,ge),{u_image:0,u_image_height:te})},Qs=function(ve,K,ge,te){var pe=ve.transform,He=Bs(K,pe);return{u_matrix:Wl(ve,K,ge),u_texsize:K.imageAtlasTexture.size,u_ratio:1/xs(K,1,pe.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[He,te.fromScale,te.toScale],u_fade:te.t,u_units_to_pixels:[1/pe.pixelsToGLUnits[0],1/pe.pixelsToGLUnits[1]]}},hl=function(ve,K,ge,te,pe){var He=ve.transform,Ce=ve.lineAtlas,Ke=Bs(K,He),pt=ge.layout.get("line-cap")==="round",Ut=Ce.getDash(te.from,pt),Tr=Ce.getDash(te.to,pt),Ur=Ut.width*pe.fromScale,vr=Tr.width*pe.toScale;return e.extend(js(ve,K,ge),{u_patternscale_a:[Ke/Ur,-Ut.height/2],u_patternscale_b:[Ke/vr,-Tr.height/2],u_sdfgamma:Ce.width/(Math.min(Ur,vr)*256*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Ut.y,u_tex_y_b:Tr.y,u_mix:pe.t})};function Bs(ve,K){return 1/xs(ve,1,K.tileZoom)}function Wl(ve,K,ge){return ve.translatePosMatrix(K.tileID.posMatrix,K,ge.paint.get("line-translate"),ge.paint.get("line-translate-anchor"))}var Il=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_tl_parent:new e.Uniform2f(ve,K.u_tl_parent),u_scale_parent:new e.Uniform1f(ve,K.u_scale_parent),u_buffer_scale:new e.Uniform1f(ve,K.u_buffer_scale),u_fade_t:new e.Uniform1f(ve,K.u_fade_t),u_opacity:new e.Uniform1f(ve,K.u_opacity),u_image0:new e.Uniform1i(ve,K.u_image0),u_image1:new e.Uniform1i(ve,K.u_image1),u_brightness_low:new e.Uniform1f(ve,K.u_brightness_low),u_brightness_high:new e.Uniform1f(ve,K.u_brightness_high),u_saturation_factor:new e.Uniform1f(ve,K.u_saturation_factor),u_contrast_factor:new e.Uniform1f(ve,K.u_contrast_factor),u_spin_weights:new e.Uniform3f(ve,K.u_spin_weights)}},wl=function(ve,K,ge,te,pe){return{u_matrix:ve,u_tl_parent:K,u_scale_parent:ge,u_buffer_scale:1,u_fade_t:te.mix,u_opacity:te.opacity*pe.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:pe.paint.get("raster-brightness-min"),u_brightness_high:pe.paint.get("raster-brightness-max"),u_saturation_factor:cl(pe.paint.get("raster-saturation")),u_contrast_factor:Jo(pe.paint.get("raster-contrast")),u_spin_weights:io(pe.paint.get("raster-hue-rotate"))}};function io(ve){ve*=Math.PI/180;var K=Math.sin(ve),ge=Math.cos(ve);return[(2*ge+1)/3,(-Math.sqrt(3)*K-ge+1)/3,(Math.sqrt(3)*K-ge+1)/3]}function Jo(ve){return ve>0?1/(1-ve):1+ve}function cl(ve){return ve>0?1-1/(1.001-ve):-ve}var Zs=function(ve,K){return{u_is_size_zoom_constant:new e.Uniform1i(ve,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,K.u_size_t),u_size:new e.Uniform1f(ve,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,K.u_coord_matrix),u_is_text:new e.Uniform1i(ve,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_texture:new e.Uniform1i(ve,K.u_texture)}},gu=function(ve,K){return{u_is_size_zoom_constant:new e.Uniform1i(ve,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,K.u_size_t),u_size:new e.Uniform1f(ve,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,K.u_coord_matrix),u_is_text:new e.Uniform1i(ve,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_texture:new e.Uniform1i(ve,K.u_texture),u_gamma_scale:new e.Uniform1f(ve,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ve,K.u_is_halo)}},Nu=function(ve,K){return{u_is_size_zoom_constant:new e.Uniform1i(ve,K.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(ve,K.u_is_size_feature_constant),u_size_t:new e.Uniform1f(ve,K.u_size_t),u_size:new e.Uniform1f(ve,K.u_size),u_camera_to_center_distance:new e.Uniform1f(ve,K.u_camera_to_center_distance),u_pitch:new e.Uniform1f(ve,K.u_pitch),u_rotate_symbol:new e.Uniform1i(ve,K.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(ve,K.u_aspect_ratio),u_fade_change:new e.Uniform1f(ve,K.u_fade_change),u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(ve,K.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(ve,K.u_coord_matrix),u_is_text:new e.Uniform1i(ve,K.u_is_text),u_pitch_with_map:new e.Uniform1i(ve,K.u_pitch_with_map),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_texsize_icon:new e.Uniform2f(ve,K.u_texsize_icon),u_texture:new e.Uniform1i(ve,K.u_texture),u_texture_icon:new e.Uniform1i(ve,K.u_texture_icon),u_gamma_scale:new e.Uniform1f(ve,K.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(ve,K.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(ve,K.u_is_halo)}},tc=function(ve,K,ge,te,pe,He,Ce,Ke,pt,Ut){var Tr=pe.transform;return{u_is_size_zoom_constant:+(ve==="constant"||ve==="source"),u_is_size_feature_constant:+(ve==="constant"||ve==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:Tr.cameraToCenterDistance,u_pitch:Tr.pitch/360*2*Math.PI,u_rotate_symbol:+ge,u_aspect_ratio:Tr.width/Tr.height,u_fade_change:pe.options.fadeDuration?pe.symbolFadeChange:1,u_matrix:He,u_label_plane_matrix:Ce,u_coord_matrix:Ke,u_is_text:+pt,u_pitch_with_map:+te,u_texsize:Ut,u_texture:0}},Bc=function(ve,K,ge,te,pe,He,Ce,Ke,pt,Ut,Tr){var Ur=pe.transform;return e.extend(tc(ve,K,ge,te,pe,He,Ce,Ke,pt,Ut),{u_gamma_scale:te?Math.cos(Ur._pitch)*Ur.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+Tr})},Lu=function(ve,K,ge,te,pe,He,Ce,Ke,pt,Ut){return e.extend(Bc(ve,K,ge,te,pe,He,Ce,Ke,!0,pt,!0),{u_texsize_icon:Ut,u_texture_icon:1})},Oc=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_opacity:new e.Uniform1f(ve,K.u_opacity),u_color:new e.UniformColor(ve,K.u_color)}},Pu=function(ve,K){return{u_matrix:new e.UniformMatrix4f(ve,K.u_matrix),u_opacity:new e.Uniform1f(ve,K.u_opacity),u_image:new e.Uniform1i(ve,K.u_image),u_pattern_tl_a:new e.Uniform2f(ve,K.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(ve,K.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(ve,K.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(ve,K.u_pattern_br_b),u_texsize:new e.Uniform2f(ve,K.u_texsize),u_mix:new e.Uniform1f(ve,K.u_mix),u_pattern_size_a:new e.Uniform2f(ve,K.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(ve,K.u_pattern_size_b),u_scale_a:new e.Uniform1f(ve,K.u_scale_a),u_scale_b:new e.Uniform1f(ve,K.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(ve,K.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(ve,K.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(ve,K.u_tile_units_to_pixels)}},wc=function(ve,K,ge){return{u_matrix:ve,u_opacity:K,u_color:ge}},Po=function(ve,K,ge,te,pe,He){return e.extend(ef(te,He,ge,pe),{u_matrix:ve,u_opacity:K})},es={fillExtrusion:Lf,fillExtrusionPattern:du,fill:Dc,fillPattern:bc,fillOutline:Jl,fillOutlinePattern:Cu,circle:er,collisionBox:ai,collisionCircle:Jr,debug:Ba,clippingMask:hn,heatmap:Na,heatmapTexture:qa,hillshade:Hn,hillshadePrepare:go,line:Vn,lineGradient:wn,linePattern:Oo,lineSDF:ps,raster:Il,symbolIcon:Zs,symbolSDF:gu,symbolTextAndIcon:Nu,background:Oc,backgroundPattern:Pu},Nc;function hc(ve,K,ge,te,pe,He,Ce){for(var Ke=ve.context,pt=Ke.gl,Ut=ve.useProgram("collisionBox"),Tr=[],Ur=0,vr=0,mt=0;mt<te.length;mt++){var Et=te[mt],Bt=K.getTile(Et),or=Bt.getBucket(ge);if(or){var dr=Et.posMatrix;(pe[0]!==0||pe[1]!==0)&&(dr=ve.translatePosMatrix(Et.posMatrix,Bt,pe,He));var ur=Ce?or.textCollisionBox:or.iconCollisionBox,pr=or.collisionCircleArray;if(pr.length>0){var cr=e.create(),Gt=dr;e.mul(cr,or.placementInvProjMatrix,ve.transform.glCoordMatrix),e.mul(cr,cr,or.placementViewportMatrix),Tr.push({circleArray:pr,circleOffset:vr,transform:Gt,invTransform:cr}),Ur+=pr.length/4,vr=Ur}ur&&Ut.draw(Ke,pt.LINES,Ui.disabled,Bi.disabled,ve.colorModeForRenderPass(),Br.disabled,Fi(dr,ve.transform,Bt),ge.id,ur.layoutVertexBuffer,ur.indexBuffer,ur.segments,null,ve.transform.zoom,null,null,ur.collisionVertexBuffer)}}if(!(!Ce||!Tr.length)){var lr=ve.useProgram("collisionCircle"),qt=new e.StructArrayLayout2f1f2i16;qt.resize(Ur*4),qt._trim();for(var zr=0,$r=0,Ai=Tr;$r<Ai.length;$r+=1)for(var wa=Ai[$r],Ji=0;Ji<wa.circleArray.length/4;Ji++){var fa=Ji*4,sn=wa.circleArray[fa+0],Ga=wa.circleArray[fa+1],ma=wa.circleArray[fa+2],Ma=wa.circleArray[fa+3];qt.emplace(zr++,sn,Ga,ma,Ma,0),qt.emplace(zr++,sn,Ga,ma,Ma,1),qt.emplace(zr++,sn,Ga,ma,Ma,2),qt.emplace(zr++,sn,Ga,ma,Ma,3)}(!Nc||Nc.length<Ur*2)&&(Nc=rc(Ur));for(var Pa=Ke.createIndexBuffer(Nc,!0),Ka=Ke.createVertexBuffer(qt,e.collisionCircleLayout.members,!0),Sn=0,No=Tr;Sn<No.length;Sn+=1){var os=No[Sn],Xs=pa(os.transform,os.invTransform,ve.transform);lr.draw(Ke,pt.TRIANGLES,Ui.disabled,Bi.disabled,ve.colorModeForRenderPass(),Br.disabled,Xs,ge.id,Ka,Pa,e.SegmentVector.simpleSegment(0,os.circleOffset*2,os.circleArray.length,os.circleArray.length/2),null,ve.transform.zoom,null,null,null)}Ka.destroy(),Pa.destroy()}}function rc(ve){var K=ve*2,ge=new e.StructArrayLayout3ui6;ge.resize(K),ge._trim();for(var te=0;te<K;te++){var pe=te*6;ge.uint16[pe+0]=te*4+0,ge.uint16[pe+1]=te*4+1,ge.uint16[pe+2]=te*4+2,ge.uint16[pe+3]=te*4+2,ge.uint16[pe+4]=te*4+3,ge.uint16[pe+5]=te*4+0}return ge}var Ue=e.identity(new Float32Array(16));function P(ve,K,ge,te,pe){if(ve.renderPass==="translucent"){var He=Bi.disabled,Ce=ve.colorModeForRenderPass(),Ke=ge.layout.get("text-variable-anchor");Ke&&xe(te,ve,ge,K,ge.layout.get("text-rotation-alignment"),ge.layout.get("text-pitch-alignment"),pe),ge.paint.get("icon-opacity").constantOr(1)!==0&&ht(ve,K,ge,te,!1,ge.paint.get("icon-translate"),ge.paint.get("icon-translate-anchor"),ge.layout.get("icon-rotation-alignment"),ge.layout.get("icon-pitch-alignment"),ge.layout.get("icon-keep-upright"),He,Ce),ge.paint.get("text-opacity").constantOr(1)!==0&&ht(ve,K,ge,te,!0,ge.paint.get("text-translate"),ge.paint.get("text-translate-anchor"),ge.layout.get("text-rotation-alignment"),ge.layout.get("text-pitch-alignment"),ge.layout.get("text-keep-upright"),He,Ce),K.map.showCollisionBoxes&&(hc(ve,K,ge,te,ge.paint.get("text-translate"),ge.paint.get("text-translate-anchor"),!0),hc(ve,K,ge,te,ge.paint.get("icon-translate"),ge.paint.get("icon-translate-anchor"),!1))}}function ae(ve,K,ge,te,pe,He){var Ce=e.getAnchorAlignment(ve),Ke=Ce.horizontalAlign,pt=Ce.verticalAlign,Ut=-(Ke-.5)*K,Tr=-(pt-.5)*ge,Ur=e.evaluateVariableOffset(ve,te);return new e.Point((Ut/pe+Ur[0])*He,(Tr/pe+Ur[1])*He)}function xe(ve,K,ge,te,pe,He,Ce){for(var Ke=K.transform,pt=pe==="map",Ut=He==="map",Tr=0,Ur=ve;Tr<Ur.length;Tr+=1){var vr=Ur[Tr],mt=te.getTile(vr),Et=mt.getBucket(ge);if(!(!Et||!Et.text||!Et.text.segments.get().length)){var Bt=Et.textSizeData,or=e.evaluateSizeForZoom(Bt,Ke.zoom),dr=xs(mt,1,K.transform.zoom),ur=Li(vr.posMatrix,Ut,pt,K.transform,dr),pr=ge.layout.get("icon-text-fit")!=="none"&&Et.hasIconData();if(or){var cr=Math.pow(2,Ke.zoom-mt.tileID.overscaledZ);Te(Et,pt,Ut,Ce,e.symbolSize,Ke,ur,vr.posMatrix,cr,or,pr)}}}}function Te(ve,K,ge,te,pe,He,Ce,Ke,pt,Ut,Tr){var Ur=ve.text.placedSymbolArray,vr=ve.text.dynamicLayoutVertexArray,mt=ve.icon.dynamicLayoutVertexArray,Et={};vr.clear();for(var Bt=0;Bt<Ur.length;Bt++){var or=Ur.get(Bt),dr=ve.allowVerticalPlacement&&!or.placedOrientation,ur=!or.hidden&&or.crossTileID&&!dr?te[or.crossTileID]:null;if(!ur)Ls(or.numGlyphs,vr);else{var pr=new e.Point(or.anchorX,or.anchorY),cr=Fa(pr,ge?Ke:Ce),Gt=un(He.cameraToCenterDistance,cr.signedDistanceFromCamera),lr=pe.evaluateSizeForFeature(ve.textSizeData,Ut,or)*Gt/e.ONE_EM;ge&&(lr*=ve.tilePixelRatio/pt);for(var qt=ur.width,zr=ur.height,$r=ur.anchor,Ai=ur.textOffset,wa=ur.textBoxScale,Ji=ae($r,qt,zr,Ai,wa,lr),fa=ge?Fa(pr.add(Ji),Ce).point:cr.point.add(K?Ji.rotate(-He.angle):Ji),sn=ve.allowVerticalPlacement&&or.placedOrientation===e.WritingMode.vertical?Math.PI/2:0,Ga=0;Ga<or.numGlyphs;Ga++)e.addDynamicAttributes(vr,fa,sn);Tr&&or.associatedIconIndex>=0&&(Et[or.associatedIconIndex]={shiftedAnchor:fa,angle:sn})}}if(Tr){mt.clear();for(var ma=ve.icon.placedSymbolArray,Ma=0;Ma<ma.length;Ma++){var Pa=ma.get(Ma);if(Pa.hidden)Ls(Pa.numGlyphs,mt);else{var Ka=Et[Ma];if(!Ka)Ls(Pa.numGlyphs,mt);else for(var Sn=0;Sn<Pa.numGlyphs;Sn++)e.addDynamicAttributes(mt,Ka.shiftedAnchor,Ka.angle)}}ve.icon.dynamicLayoutVertexBuffer.updateData(mt)}ve.text.dynamicLayoutVertexBuffer.updateData(vr)}function Oe(ve,K,ge){return ge.iconsInText&&K?"symbolTextAndIcon":ve?"symbolSDF":"symbolIcon"}function ht(ve,K,ge,te,pe,He,Ce,Ke,pt,Ut,Tr,Ur){for(var vr=ve.context,mt=vr.gl,Et=ve.transform,Bt=Ke==="map",or=pt==="map",dr=Bt&&ge.layout.get("symbol-placement")!=="point",ur=Bt&&!or&&!dr,pr=ge.layout.get("symbol-sort-key").constantOr(1)!==void 0,cr=!1,Gt=ve.depthModeForSublayer(0,Ui.ReadOnly),lr=ge.layout.get("text-variable-anchor"),qt=[],zr=0,$r=te;zr<$r.length;zr+=1){var Ai=$r[zr],wa=K.getTile(Ai),Ji=wa.getBucket(ge);if(Ji){var fa=pe?Ji.text:Ji.icon;if(!(!fa||!fa.segments.get().length)){var sn=fa.programConfigurations.get(ge.id),Ga=pe||Ji.sdfIcons,ma=pe?Ji.textSizeData:Ji.iconSizeData,Ma=or||Et.pitch!==0,Pa=ve.useProgram(Oe(Ga,pe,Ji),sn),Ka=e.evaluateSizeForZoom(ma,Et.zoom),Sn=void 0,No=[0,0],os=void 0,Xs=void 0,ts=null,Vs=void 0;if(pe){if(os=wa.glyphAtlasTexture,Xs=mt.LINEAR,Sn=wa.glyphAtlasTexture.size,Ji.iconsInText){No=wa.imageAtlasTexture.size,ts=wa.imageAtlasTexture;var ll=ma.kind==="composite"||ma.kind==="camera";Vs=Ma||ve.options.rotating||ve.options.zooming||ll?mt.LINEAR:mt.NEAREST}}else{var Mu=ge.layout.get("icon-size").constantOr(0)!==1||Ji.iconsNeedLinear;os=wa.imageAtlasTexture,Xs=Ga||ve.options.rotating||ve.options.zooming||Mu||Ma?mt.LINEAR:mt.NEAREST,Sn=wa.imageAtlasTexture.size}var rd=xs(wa,1,ve.transform.zoom),id=Li(Ai.posMatrix,or,Bt,ve.transform,rd),xh=Ia(Ai.posMatrix,or,Bt,ve.transform,rd),hd=lr&&Ji.hasTextData(),ev=ge.layout.get("icon-text-fit")!=="none"&&hd&&Ji.hasIconData();dr&&Kn(Ji,Ai.posMatrix,ve,pe,id,xh,or,Ut);var Md=ve.translatePosMatrix(Ai.posMatrix,wa,He,Ce),bh=dr||pe&&lr||ev?Ue:id,Ed=ve.translatePosMatrix(xh,wa,He,Ce,!0),zh=Ga&&ge.paint.get(pe?"text-halo-width":"icon-halo-width").constantOr(1)!==0,wh=void 0;Ga?Ji.iconsInText?wh=Lu(ma.kind,Ka,ur,or,ve,Md,bh,Ed,Sn,No):wh=Bc(ma.kind,Ka,ur,or,ve,Md,bh,Ed,pe,Sn,!0):wh=tc(ma.kind,Ka,ur,or,ve,Md,bh,Ed,pe,Sn);var ad={program:Pa,buffers:fa,uniformValues:wh,atlasTexture:os,atlasTextureIcon:ts,atlasInterpolation:Xs,atlasInterpolationIcon:Vs,isSDF:Ga,hasHalo:zh};if(pr&&Ji.canOverlap){cr=!0;for(var dd=fa.segments.get(),nd=0,jv=dd;nd<jv.length;nd+=1){var tv=jv[nd];qt.push({segments:new e.SegmentVector([tv]),sortKey:tv.sortKey,state:ad})}}else qt.push({segments:fa.segments,sortKey:0,state:ad})}}}cr&&qt.sort(function(xp,bp){return xp.sortKey-bp.sortKey});for(var Uf=0,rv=qt;Uf<rv.length;Uf+=1){var Vv=rv[Uf],oh=Vv.state;if(vr.activeTexture.set(mt.TEXTURE0),oh.atlasTexture.bind(oh.atlasInterpolation,mt.CLAMP_TO_EDGE),oh.atlasTextureIcon&&(vr.activeTexture.set(mt.TEXTURE1),oh.atlasTextureIcon&&oh.atlasTextureIcon.bind(oh.atlasInterpolationIcon,mt.CLAMP_TO_EDGE)),oh.isSDF){var xv=oh.uniformValues;oh.hasHalo&&(xv.u_is_halo=1,Tt(oh.buffers,Vv.segments,ge,ve,oh.program,Gt,Tr,Ur,xv)),xv.u_is_halo=0}Tt(oh.buffers,Vv.segments,ge,ve,oh.program,Gt,Tr,Ur,oh.uniformValues)}}function Tt(ve,K,ge,te,pe,He,Ce,Ke,pt){var Ut=te.context,Tr=Ut.gl;pe.draw(Ut,Tr.TRIANGLES,He,Ce,Ke,Br.disabled,pt,ge.id,ve.layoutVertexBuffer,ve.indexBuffer,K,ge.paint,te.transform.zoom,ve.programConfigurations.get(ge.id),ve.dynamicLayoutVertexBuffer,ve.opacityVertexBuffer)}function Ot(ve,K,ge,te){if(ve.renderPass==="translucent"){var pe=ge.paint.get("circle-opacity"),He=ge.paint.get("circle-stroke-width"),Ce=ge.paint.get("circle-stroke-opacity"),Ke=ge.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(pe.constantOr(1)===0&&(He.constantOr(1)===0||Ce.constantOr(1)===0))){for(var pt=ve.context,Ut=pt.gl,Tr=ve.depthModeForSublayer(0,Ui.ReadOnly),Ur=Bi.disabled,vr=ve.colorModeForRenderPass(),mt=[],Et=0;Et<te.length;Et++){var Bt=te[Et],or=K.getTile(Bt),dr=or.getBucket(ge);if(dr){var ur=dr.programConfigurations.get(ge.id),pr=ve.useProgram("circle",ur),cr=dr.layoutVertexBuffer,Gt=dr.indexBuffer,lr=wr(ve,Bt,or,ge),qt={programConfiguration:ur,program:pr,layoutVertexBuffer:cr,indexBuffer:Gt,uniformValues:lr};if(Ke)for(var zr=dr.segments.get(),$r=0,Ai=zr;$r<Ai.length;$r+=1){var wa=Ai[$r];mt.push({segments:new e.SegmentVector([wa]),sortKey:wa.sortKey,state:qt})}else mt.push({segments:dr.segments,sortKey:0,state:qt})}}Ke&&mt.sort(function(os,Xs){return os.sortKey-Xs.sortKey});for(var Ji=0,fa=mt;Ji<fa.length;Ji+=1){var sn=fa[Ji],Ga=sn.state,ma=Ga.programConfiguration,Ma=Ga.program,Pa=Ga.layoutVertexBuffer,Ka=Ga.indexBuffer,Sn=Ga.uniformValues,No=sn.segments;Ma.draw(pt,Ut.TRIANGLES,Tr,Ur,vr,Br.disabled,Sn,ge.id,Pa,Ka,No,ge.paint,ve.transform.zoom,ma)}}}}function Qt(ve,K,ge,te){if(ge.paint.get("heatmap-opacity")!==0)if(ve.renderPass==="offscreen"){var pe=ve.context,He=pe.gl,Ce=Bi.disabled,Ke=new zt([He.ONE,He.ONE],e.Color.transparent,[!0,!0,!0,!0]);Ar(pe,ve,ge),pe.clear({color:e.Color.transparent});for(var pt=0;pt<te.length;pt++){var Ut=te[pt];if(!K.hasRenderableParent(Ut)){var Tr=K.getTile(Ut),Ur=Tr.getBucket(ge);if(Ur){var vr=Ur.programConfigurations.get(ge.id),mt=ve.useProgram("heatmap",vr),Et=ve.transform,Bt=Et.zoom;mt.draw(pe,He.TRIANGLES,Ui.disabled,Ce,Ke,Br.disabled,Za(Ut.posMatrix,Tr,Bt,ge.paint.get("heatmap-intensity")),ge.id,Ur.layoutVertexBuffer,Ur.indexBuffer,Ur.segments,ge.paint,ve.transform.zoom,vr)}}}pe.viewport.set([0,0,ve.width,ve.height])}else ve.renderPass==="translucent"&&(ve.context.setColorMode(ve.colorModeForRenderPass()),Kr(ve,ge))}function Ar(ve,K,ge){var te=ve.gl;ve.activeTexture.set(te.TEXTURE1),ve.viewport.set([0,0,K.width/4,K.height/4]);var pe=ge.heatmapFbo;if(pe)te.bindTexture(te.TEXTURE_2D,pe.colorAttachment.get()),ve.bindFramebuffer.set(pe.framebuffer);else{var He=te.createTexture();te.bindTexture(te.TEXTURE_2D,He),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_WRAP_S,te.CLAMP_TO_EDGE),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_WRAP_T,te.CLAMP_TO_EDGE),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MIN_FILTER,te.LINEAR),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MAG_FILTER,te.LINEAR),pe=ge.heatmapFbo=ve.createFramebuffer(K.width/4,K.height/4,!1),Sr(ve,K,He,pe)}}function Sr(ve,K,ge,te){var pe=ve.gl,He=ve.extRenderToTextureHalfFloat?ve.extTextureHalfFloat.HALF_FLOAT_OES:pe.UNSIGNED_BYTE;pe.texImage2D(pe.TEXTURE_2D,0,pe.RGBA,K.width/4,K.height/4,0,pe.RGBA,He,null),te.colorAttachment.set(ge)}function Kr(ve,K){var ge=ve.context,te=ge.gl,pe=K.heatmapFbo;if(pe){ge.activeTexture.set(te.TEXTURE0),te.bindTexture(te.TEXTURE_2D,pe.colorAttachment.get()),ge.activeTexture.set(te.TEXTURE1);var He=K.colorRampTexture;He||(He=K.colorRampTexture=new e.Texture(ge,K.colorRamp,te.RGBA)),He.bind(te.LINEAR,te.CLAMP_TO_EDGE),ve.useProgram("heatmapTexture").draw(ge,te.TRIANGLES,Ui.disabled,Bi.disabled,ve.colorModeForRenderPass(),Br.disabled,Ta(ve,K,0,1),K.id,ve.viewportBuffer,ve.quadTriangleIndexBuffer,ve.viewportSegments,K.paint,ve.transform.zoom)}}function oi(ve,K,ge,te){if(ve.renderPass==="translucent"){var pe=ge.paint.get("line-opacity"),He=ge.paint.get("line-width");if(!(pe.constantOr(1)===0||He.constantOr(1)===0))for(var Ce=ve.depthModeForSublayer(0,Ui.ReadOnly),Ke=ve.colorModeForRenderPass(),pt=ge.paint.get("line-dasharray"),Ut=ge.paint.get("line-pattern"),Tr=Ut.constantOr(1),Ur=ge.paint.get("line-gradient"),vr=ge.getCrossfadeParameters(),mt=Tr?"linePattern":pt?"lineSDF":Ur?"lineGradient":"line",Et=ve.context,Bt=Et.gl,or=!0,dr=0,ur=te;dr<ur.length;dr+=1){var pr=ur[dr],cr=K.getTile(pr);if(!(Tr&&!cr.patternsLoaded())){var Gt=cr.getBucket(ge);if(Gt){var lr=Gt.programConfigurations.get(ge.id),qt=ve.context.program.get(),zr=ve.useProgram(mt,lr),$r=or||zr.program!==qt,Ai=Ut.constantOr(null);if(Ai&&cr.imageAtlas){var wa=cr.imageAtlas,Ji=wa.patternPositions[Ai.to.toString()],fa=wa.patternPositions[Ai.from.toString()];Ji&&fa&&lr.setConstantPatternPositions(Ji,fa)}var sn=Tr?Qs(ve,cr,ge,vr):pt?hl(ve,cr,ge,pt,vr):Ur?pl(ve,cr,ge,Gt.lineClipsArray.length):js(ve,cr,ge);if(Tr)Et.activeTexture.set(Bt.TEXTURE0),cr.imageAtlasTexture.bind(Bt.LINEAR,Bt.CLAMP_TO_EDGE),lr.updatePaintBuffers(vr);else if(pt&&($r||ve.lineAtlas.dirty))Et.activeTexture.set(Bt.TEXTURE0),ve.lineAtlas.bind(Et);else if(Ur){var Ga=Gt.gradients[ge.id],ma=Ga.texture;if(ge.gradientVersion!==Ga.version){var Ma=256;if(ge.stepInterpolant){var Pa=K.getSource().maxzoom,Ka=pr.canonical.z===Pa?Math.ceil(1<<ve.transform.maxZoom-pr.canonical.z):1,Sn=Gt.maxLineLength/e.EXTENT,No=1024,os=Sn*No*Ka;Ma=e.clamp(e.nextPowerOfTwo(os),256,Et.maxTextureSize)}Ga.gradient=e.renderColorRamp({expression:ge.gradientExpression(),evaluationKey:"lineProgress",resolution:Ma,image:Ga.gradient||void 0,clips:Gt.lineClipsArray}),Ga.texture?Ga.texture.update(Ga.gradient):Ga.texture=new e.Texture(Et,Ga.gradient,Bt.RGBA),Ga.version=ge.gradientVersion,ma=Ga.texture}Et.activeTexture.set(Bt.TEXTURE0),ma.bind(ge.stepInterpolant?Bt.NEAREST:Bt.LINEAR,Bt.CLAMP_TO_EDGE)}zr.draw(Et,Bt.TRIANGLES,Ce,ve.stencilModeForClipping(pr),Ke,Br.disabled,sn,ge.id,Gt.layoutVertexBuffer,Gt.indexBuffer,Gt.segments,ge.paint,ve.transform.zoom,lr,Gt.layoutVertexBuffer2),or=!1}}}}}function Ge(ve,K,ge,te){var pe=ge.paint.get("fill-color"),He=ge.paint.get("fill-opacity");if(He.constantOr(1)!==0){var Ce=ve.colorModeForRenderPass(),Ke=ge.paint.get("fill-pattern"),pt=ve.opaquePassEnabledForLayer()&&!Ke.constantOr(1)&&pe.constantOr(e.Color.transparent).a===1&&He.constantOr(0)===1?"opaque":"translucent";if(ve.renderPass===pt){var Ut=ve.depthModeForSublayer(1,ve.renderPass==="opaque"?Ui.ReadWrite:Ui.ReadOnly);Ze(ve,K,ge,te,Ut,Ce,!1)}if(ve.renderPass==="translucent"&&ge.paint.get("fill-antialias")){var Tr=ve.depthModeForSublayer(ge.getPaintProperty("fill-outline-color")?2:0,Ui.ReadOnly);Ze(ve,K,ge,te,Tr,Ce,!0)}}}function Ze(ve,K,ge,te,pe,He,Ce){var Ke=ve.context.gl,pt=ge.paint.get("fill-pattern"),Ut=pt&&pt.constantOr(1),Tr=ge.getCrossfadeParameters(),Ur,vr,mt,Et,Bt;Ce?(vr=Ut&&!ge.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Ur=Ke.LINES):(vr=Ut?"fillPattern":"fill",Ur=Ke.TRIANGLES);for(var or=0,dr=te;or<dr.length;or+=1){var ur=dr[or],pr=K.getTile(ur);if(!(Ut&&!pr.patternsLoaded())){var cr=pr.getBucket(ge);if(cr){var Gt=cr.programConfigurations.get(ge.id),lr=ve.useProgram(vr,Gt);Ut&&(ve.context.activeTexture.set(Ke.TEXTURE0),pr.imageAtlasTexture.bind(Ke.LINEAR,Ke.CLAMP_TO_EDGE),Gt.updatePaintBuffers(Tr));var qt=pt.constantOr(null);if(qt&&pr.imageAtlas){var zr=pr.imageAtlas,$r=zr.patternPositions[qt.to.toString()],Ai=zr.patternPositions[qt.from.toString()];$r&&Ai&&Gt.setConstantPatternPositions($r,Ai)}var wa=ve.translatePosMatrix(ur.posMatrix,pr,ge.paint.get("fill-translate"),ge.paint.get("fill-translate-anchor"));if(!Ce)Et=cr.indexBuffer,Bt=cr.segments,mt=Ut?tf(wa,ve,Tr,pr):zc(wa);else{Et=cr.indexBuffer2,Bt=cr.segments2;var Ji=[Ke.drawingBufferWidth,Ke.drawingBufferHeight];mt=vr==="fillOutlinePattern"&&Ut?Fc(wa,ve,Tr,pr,Ji):fc(wa,Ji)}lr.draw(ve.context,Ur,pe,ve.stencilModeForClipping(ur),He,Br.disabled,mt,ge.id,cr.layoutVertexBuffer,Et,Bt,ge.paint,ve.transform.zoom,Gt)}}}}function ot(ve,K,ge,te){var pe=ge.paint.get("fill-extrusion-opacity");if(pe!==0&&ve.renderPass==="translucent"){var He=new Ui(ve.context.gl.LEQUAL,Ui.ReadWrite,ve.depthRangeFor3D);if(pe===1&&!ge.paint.get("fill-extrusion-pattern").constantOr(1)){var Ce=ve.colorModeForRenderPass();dt(ve,K,ge,te,He,Bi.disabled,Ce)}else dt(ve,K,ge,te,He,Bi.disabled,zt.disabled),dt(ve,K,ge,te,He,ve.stencilModeFor3D(),ve.colorModeForRenderPass())}}function dt(ve,K,ge,te,pe,He,Ce){for(var Ke=ve.context,pt=Ke.gl,Ut=ge.paint.get("fill-extrusion-pattern"),Tr=Ut.constantOr(1),Ur=ge.getCrossfadeParameters(),vr=ge.paint.get("fill-extrusion-opacity"),mt=0,Et=te;mt<Et.length;mt+=1){var Bt=Et[mt],or=K.getTile(Bt),dr=or.getBucket(ge);if(dr){var ur=dr.programConfigurations.get(ge.id),pr=ve.useProgram(Tr?"fillExtrusionPattern":"fillExtrusion",ur);Tr&&(ve.context.activeTexture.set(pt.TEXTURE0),or.imageAtlasTexture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE),ur.updatePaintBuffers(Ur));var cr=Ut.constantOr(null);if(cr&&or.imageAtlas){var Gt=or.imageAtlas,lr=Gt.patternPositions[cr.to.toString()],qt=Gt.patternPositions[cr.from.toString()];lr&&qt&&ur.setConstantPatternPositions(lr,qt)}var zr=ve.translatePosMatrix(Bt.posMatrix,or,ge.paint.get("fill-extrusion-translate"),ge.paint.get("fill-extrusion-translate-anchor")),$r=ge.paint.get("fill-extrusion-vertical-gradient"),Ai=Tr?ec(zr,ve,$r,vr,Bt,Ur,or):Nf(zr,ve,$r,vr);pr.draw(Ke,Ke.gl.TRIANGLES,pe,He,Ce,Br.backCCW,Ai,ge.id,dr.layoutVertexBuffer,dr.indexBuffer,dr.segments,ge.paint,ve.transform.zoom,ur)}}}function Ct(ve,K,ge,te){if(!(ve.renderPass!=="offscreen"&&ve.renderPass!=="translucent")){for(var pe=ve.context,He=ve.depthModeForSublayer(0,Ui.ReadOnly),Ce=ve.colorModeForRenderPass(),Ke=ve.renderPass==="translucent"?ve.stencilConfigForOverlap(te):[{},te],pt=Ke[0],Ut=Ke[1],Tr=0,Ur=Ut;Tr<Ur.length;Tr+=1){var vr=Ur[Tr],mt=K.getTile(vr);mt.needsHillshadePrepare&&ve.renderPass==="offscreen"?Dt(ve,mt,ge,He,Bi.disabled,Ce):ve.renderPass==="translucent"&&wt(ve,mt,ge,He,pt[vr.overscaledZ],Ce)}pe.viewport.set([0,0,ve.width,ve.height])}}function wt(ve,K,ge,te,pe,He){var Ce=ve.context,Ke=Ce.gl,pt=K.fbo;if(pt){var Ut=ve.useProgram("hillshade");Ce.activeTexture.set(Ke.TEXTURE0),Ke.bindTexture(Ke.TEXTURE_2D,pt.colorAttachment.get());var Tr=wo(ve,K,ge);Ut.draw(Ce,Ke.TRIANGLES,te,pe,He,Br.disabled,Tr,ge.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments)}}function Dt(ve,K,ge,te,pe,He){var Ce=ve.context,Ke=Ce.gl,pt=K.dem;if(pt&&pt.data){var Ut=pt.dim,Tr=pt.stride,Ur=pt.getPixels();if(Ce.activeTexture.set(Ke.TEXTURE1),Ce.pixelStoreUnpackPremultiplyAlpha.set(!1),K.demTexture=K.demTexture||ve.getTileTexture(Tr),K.demTexture){var vr=K.demTexture;vr.update(Ur,{premultiply:!1}),vr.bind(Ke.NEAREST,Ke.CLAMP_TO_EDGE)}else K.demTexture=new e.Texture(Ce,Ur,Ke.RGBA,{premultiply:!1}),K.demTexture.bind(Ke.NEAREST,Ke.CLAMP_TO_EDGE);Ce.activeTexture.set(Ke.TEXTURE0);var mt=K.fbo;if(!mt){var Et=new e.Texture(Ce,{width:Ut,height:Ut,data:null},Ke.RGBA);Et.bind(Ke.LINEAR,Ke.CLAMP_TO_EDGE),mt=K.fbo=Ce.createFramebuffer(Ut,Ut,!0),mt.colorAttachment.set(Et.texture)}Ce.bindFramebuffer.set(mt.framebuffer),Ce.viewport.set([0,0,Ut,Ut]),ve.useProgram("hillshadePrepare").draw(Ce,Ke.TRIANGLES,te,pe,He,Br.disabled,yo(K.tileID,pt),ge.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments),K.needsHillshadePrepare=!1}}function fr(ve,K,ge,te){if(ve.renderPass==="translucent"&&ge.paint.get("raster-opacity")!==0&&te.length)for(var pe=ve.context,He=pe.gl,Ce=K.getSource(),Ke=ve.useProgram("raster"),pt=ve.colorModeForRenderPass(),Ut=Ce instanceof le?[{},te]:ve.stencilConfigForOverlap(te),Tr=Ut[0],Ur=Ut[1],vr=Ur[Ur.length-1].overscaledZ,mt=!ve.options.moving,Et=0,Bt=Ur;Et<Bt.length;Et+=1){var or=Bt[Et],dr=ve.depthModeForSublayer(or.overscaledZ-vr,ge.paint.get("raster-opacity")===1?Ui.ReadWrite:Ui.ReadOnly,He.LESS),ur=K.getTile(or),pr=ve.transform.calculatePosMatrix(or.toUnwrapped(),mt);ur.registerFadeDuration(ge.paint.get("raster-fade-duration"));var cr=K.findLoadedParent(or,0),Gt=_r(ur,cr,K,ge,ve.transform),lr=void 0,qt=void 0,zr=ge.paint.get("raster-resampling")==="nearest"?He.NEAREST:He.LINEAR;pe.activeTexture.set(He.TEXTURE0),ur.texture.bind(zr,He.CLAMP_TO_EDGE,He.LINEAR_MIPMAP_NEAREST),pe.activeTexture.set(He.TEXTURE1),cr?(cr.texture.bind(zr,He.CLAMP_TO_EDGE,He.LINEAR_MIPMAP_NEAREST),lr=Math.pow(2,cr.tileID.overscaledZ-ur.tileID.overscaledZ),qt=[ur.tileID.canonical.x*lr%1,ur.tileID.canonical.y*lr%1]):ur.texture.bind(zr,He.CLAMP_TO_EDGE,He.LINEAR_MIPMAP_NEAREST);var $r=wl(pr,qt||[0,0],lr||1,Gt,ge);Ce instanceof le?Ke.draw(pe,He.TRIANGLES,dr,Bi.disabled,pt,Br.disabled,$r,ge.id,Ce.boundsBuffer,ve.quadTriangleIndexBuffer,Ce.boundsSegments):Ke.draw(pe,He.TRIANGLES,dr,Tr[or.overscaledZ],pt,Br.disabled,$r,ge.id,ve.rasterBoundsBuffer,ve.quadTriangleIndexBuffer,ve.rasterBoundsSegments)}}function _r(ve,K,ge,te,pe){var He=te.paint.get("raster-fade-duration");if(He>0){var Ce=e.browser.now(),Ke=(Ce-ve.timeAdded)/He,pt=K?(Ce-K.timeAdded)/He:-1,Ut=ge.getSource(),Tr=pe.coveringZoomLevel({tileSize:Ut.tileSize,roundZoom:Ut.roundZoom}),Ur=!K||Math.abs(K.tileID.overscaledZ-Tr)>Math.abs(ve.tileID.overscaledZ-Tr),vr=Ur&&ve.refreshedUponExpiration?1:e.clamp(Ur?Ke:1-pt,0,1);return ve.refreshedUponExpiration&&Ke>=1&&(ve.refreshedUponExpiration=!1),K?{opacity:1,mix:1-vr}:{opacity:vr,mix:0}}else return{opacity:1,mix:0}}function kr(ve,K,ge){var te=ge.paint.get("background-color"),pe=ge.paint.get("background-opacity");if(pe!==0){var He=ve.context,Ce=He.gl,Ke=ve.transform,pt=Ke.tileSize,Ut=ge.paint.get("background-pattern");if(!ve.isPatternMissing(Ut)){var Tr=!Ut&&te.a===1&&pe===1&&ve.opaquePassEnabledForLayer()?"opaque":"translucent";if(ve.renderPass===Tr){var Ur=Bi.disabled,vr=ve.depthModeForSublayer(0,Tr==="opaque"?Ui.ReadWrite:Ui.ReadOnly),mt=ve.colorModeForRenderPass(),Et=ve.useProgram(Ut?"backgroundPattern":"background"),Bt=Ke.coveringTiles({tileSize:pt});Ut&&(He.activeTexture.set(Ce.TEXTURE0),ve.imageManager.bind(ve.context));for(var or=ge.getCrossfadeParameters(),dr=0,ur=Bt;dr<ur.length;dr+=1){var pr=ur[dr],cr=ve.transform.calculatePosMatrix(pr.toUnwrapped()),Gt=Ut?Po(cr,pe,ve,Ut,{tileID:pr,tileSize:pt},or):wc(cr,pe,te);Et.draw(He,Ce.TRIANGLES,vr,Ur,mt,Br.disabled,Gt,ge.id,ve.tileExtentBuffer,ve.quadTriangleIndexBuffer,ve.tileExtentSegments)}}}}}var Vr=new e.Color(1,0,0,1),Qr=new e.Color(0,1,0,1),_i=new e.Color(0,0,1,1),Pi=new e.Color(1,0,1,1),qi=new e.Color(0,1,1,1);function ga(ve){var K=ve.transform.padding,ge=3;$a(ve,ve.transform.height-(K.top||0),ge,Vr),$a(ve,K.bottom||0,ge,Qr),yn(ve,K.left||0,ge,_i),yn(ve,ve.transform.width-(K.right||0),ge,Pi);var te=ve.transform.centerPoint;Qa(ve,te.x,ve.transform.height-te.y,qi)}function Qa(ve,K,ge,te){var pe=20,He=2;qn(ve,K-He/2,ge-pe/2,He,pe,te),qn(ve,K-pe/2,ge-He/2,pe,He,te)}function $a(ve,K,ge,te){qn(ve,0,K+ge/2,ve.transform.width,ge,te)}function yn(ve,K,ge,te){qn(ve,K-ge/2,0,ge,ve.transform.height,te)}function qn(ve,K,ge,te,pe,He){var Ce=ve.context,Ke=Ce.gl;Ke.enable(Ke.SCISSOR_TEST),Ke.scissor(K*e.browser.devicePixelRatio,ge*e.browser.devicePixelRatio,te*e.browser.devicePixelRatio,pe*e.browser.devicePixelRatio),Ce.clear({color:He}),Ke.disable(Ke.SCISSOR_TEST)}function po(ve,K,ge){for(var te=0;te<ge.length;te++)to(ve,K,ge[te])}function to(ve,K,ge){var te=ve.context,pe=te.gl,He=ge.posMatrix,Ce=ve.useProgram("debug"),Ke=Ui.disabled,pt=Bi.disabled,Ut=ve.colorModeForRenderPass(),Tr="$debug";te.activeTexture.set(pe.TEXTURE0),ve.emptyTexture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Ce.draw(te,pe.LINE_STRIP,Ke,pt,Ut,Br.disabled,an(He,e.Color.red),Tr,ve.debugBuffer,ve.tileBorderIndexBuffer,ve.debugSegments);var Ur=K.getTileByID(ge.key).latestRawTileData,vr=Ur&&Ur.byteLength||0,mt=Math.floor(vr/1024),Et=K.getTile(ge).tileSize,Bt=512/Math.min(Et,512)*(ge.overscaledZ/ve.transform.zoom)*.5,or=ge.canonical.toString();ge.overscaledZ!==ge.canonical.z&&(or+=" => "+ge.overscaledZ);var dr=or+" "+mt+"kb";Vo(ve,dr),Ce.draw(te,pe.TRIANGLES,Ke,pt,zt.alphaBlended,Br.disabled,an(He,e.Color.transparent,Bt),Tr,ve.debugBuffer,ve.quadTriangleIndexBuffer,ve.debugSegments)}function Vo(ve,K){ve.initDebugOverlayCanvas();var ge=ve.debugOverlayCanvas,te=ve.context.gl,pe=ve.debugOverlayCanvas.getContext("2d");pe.clearRect(0,0,ge.width,ge.height),pe.shadowColor="white",pe.shadowBlur=2,pe.lineWidth=1.5,pe.strokeStyle="white",pe.textBaseline="top",pe.font="bold 36px Open Sans, sans-serif",pe.fillText(K,5,5),pe.strokeText(K,5,5),ve.debugOverlayTexture.update(ge),ve.debugOverlayTexture.bind(te.LINEAR,te.CLAMP_TO_EDGE)}function bs(ve,K,ge){var te=ve.context,pe=ge.implementation;if(ve.renderPass==="offscreen"){var He=pe.prerender;He&&(ve.setCustomLayerDefaults(),te.setColorMode(ve.colorModeForRenderPass()),He.call(pe,te.gl,ve.transform.customLayerMatrix()),te.setDirty(),ve.setBaseState())}else if(ve.renderPass==="translucent"){ve.setCustomLayerDefaults(),te.setColorMode(ve.colorModeForRenderPass()),te.setStencilMode(Bi.disabled);var Ce=pe.renderingMode==="3d"?new Ui(ve.context.gl.LEQUAL,Ui.ReadWrite,ve.depthRangeFor3D):ve.depthModeForSublayer(0,Ui.ReadOnly);te.setDepthMode(Ce),pe.render(te.gl,ve.transform.customLayerMatrix()),te.setDirty(),ve.setBaseState(),te.bindFramebuffer.set(null)}}var Ho={symbol:P,circle:Ot,heatmap:Qt,line:oi,fill:Ge,"fill-extrusion":ot,hillshade:Ct,raster:fr,background:kr,debug:po,custom:bs},ds=function(K,ge){this.context=new ri(K),this.transform=ge,this._tileTextures={},this.setup(),this.numSublayers=ii.maxUnderzooming+ii.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new kl,this.gpuTimers={}};ds.prototype.resize=function(K,ge){if(this.width=K*e.browser.devicePixelRatio,this.height=ge*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var te=0,pe=this.style._order;te<pe.length;te+=1){var He=pe[te];this.style._layers[He].resize()}},ds.prototype.setup=function(){var K=this.context,ge=new e.StructArrayLayout2i4;ge.emplaceBack(0,0),ge.emplaceBack(e.EXTENT,0),ge.emplaceBack(0,e.EXTENT),ge.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=K.createVertexBuffer(ge,pu.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);var te=new e.StructArrayLayout2i4;te.emplaceBack(0,0),te.emplaceBack(e.EXTENT,0),te.emplaceBack(0,e.EXTENT),te.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=K.createVertexBuffer(te,pu.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);var pe=new e.StructArrayLayout4i8;pe.emplaceBack(0,0,0,0),pe.emplaceBack(e.EXTENT,0,e.EXTENT,0),pe.emplaceBack(0,e.EXTENT,0,e.EXTENT),pe.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=K.createVertexBuffer(pe,se.members),this.rasterBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);var He=new e.StructArrayLayout2i4;He.emplaceBack(0,0),He.emplaceBack(1,0),He.emplaceBack(0,1),He.emplaceBack(1,1),this.viewportBuffer=K.createVertexBuffer(He,pu.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);var Ce=new e.StructArrayLayout1ui2;Ce.emplaceBack(0),Ce.emplaceBack(1),Ce.emplaceBack(3),Ce.emplaceBack(2),Ce.emplaceBack(0),this.tileBorderIndexBuffer=K.createIndexBuffer(Ce);var Ke=new e.StructArrayLayout3ui6;Ke.emplaceBack(0,1,2),Ke.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=K.createIndexBuffer(Ke),this.emptyTexture=new e.Texture(K,{width:1,height:1,data:new Uint8Array([0,0,0,0])},K.gl.RGBA);var pt=this.context.gl;this.stencilClearMode=new Bi({func:pt.ALWAYS,mask:0},0,255,pt.ZERO,pt.ZERO,pt.ZERO)},ds.prototype.clearStencil=function(){var K=this.context,ge=K.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var te=e.create();e.ortho(te,0,this.width,this.height,0,0,1),e.scale(te,te,[ge.drawingBufferWidth,ge.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(K,ge.TRIANGLES,Ui.disabled,this.stencilClearMode,zt.disabled,Br.disabled,Ln(te),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},ds.prototype._renderTileClippingMasks=function(K,ge){if(!(this.currentStencilSource===K.source||!K.isTileClipped()||!ge||!ge.length)){this.currentStencilSource=K.source;var te=this.context,pe=te.gl;this.nextStencilID+ge.length>256&&this.clearStencil(),te.setColorMode(zt.disabled),te.setDepthMode(Ui.disabled);var He=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Ce=0,Ke=ge;Ce<Ke.length;Ce+=1){var pt=Ke[Ce],Ut=this._tileClippingMaskIDs[pt.key]=this.nextStencilID++;He.draw(te,pe.TRIANGLES,Ui.disabled,new Bi({func:pe.ALWAYS,mask:0},Ut,255,pe.KEEP,pe.KEEP,pe.REPLACE),zt.disabled,Br.disabled,Ln(pt.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},ds.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var K=this.nextStencilID++,ge=this.context.gl;return new Bi({func:ge.NOTEQUAL,mask:255},K,255,ge.KEEP,ge.KEEP,ge.REPLACE)},ds.prototype.stencilModeForClipping=function(K){var ge=this.context.gl;return new Bi({func:ge.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,ge.KEEP,ge.KEEP,ge.REPLACE)},ds.prototype.stencilConfigForOverlap=function(K){var ge,te=this.context.gl,pe=K.sort(function(Ut,Tr){return Tr.overscaledZ-Ut.overscaledZ}),He=pe[pe.length-1].overscaledZ,Ce=pe[0].overscaledZ-He+1;if(Ce>1){this.currentStencilSource=void 0,this.nextStencilID+Ce>256&&this.clearStencil();for(var Ke={},pt=0;pt<Ce;pt++)Ke[pt+He]=new Bi({func:te.GEQUAL,mask:255},pt+this.nextStencilID,255,te.KEEP,te.KEEP,te.REPLACE);return this.nextStencilID+=Ce,[Ke,pe]}return[(ge={},ge[He]=Bi.disabled,ge),pe]},ds.prototype.colorModeForRenderPass=function(){var K=this.context.gl;if(this._showOverdrawInspector){var ge=8,te=1/ge;return new zt([K.CONSTANT_COLOR,K.ONE],new e.Color(te,te,te,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?zt.unblended:zt.alphaBlended},ds.prototype.depthModeForSublayer=function(K,ge,te){if(!this.opaquePassEnabledForLayer())return Ui.disabled;var pe=1-((1+this.currentLayer)*this.numSublayers+K)*this.depthEpsilon;return new Ui(te||this.context.gl.LEQUAL,ge,[pe,pe])},ds.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},ds.prototype.render=function(K,ge){var te=this;this.style=K,this.options=ge,this.lineAtlas=K.lineAtlas,this.imageManager=K.imageManager,this.glyphManager=K.glyphManager,this.symbolFadeChange=K.placement.symbolFadeChange(e.browser.now()),this.imageManager.beginFrame();var pe=this.style._order,He=this.style.sourceCaches;for(var Ce in He){var Ke=He[Ce];Ke.used&&Ke.prepare(this.context)}var pt={},Ut={},Tr={};for(var Ur in He){var vr=He[Ur];pt[Ur]=vr.getVisibleCoordinates(),Ut[Ur]=pt[Ur].slice().reverse(),Tr[Ur]=vr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var mt=0;mt<pe.length;mt++){var Et=pe[mt];if(this.style._layers[Et].is3D()){this.opaquePassCutoff=mt;break}}this.renderPass="offscreen";for(var Bt=0,or=pe;Bt<or.length;Bt+=1){var dr=or[Bt],ur=this.style._layers[dr];if(!(!ur.hasOffscreenPass()||ur.isHidden(this.transform.zoom))){var pr=Ut[ur.source];ur.type!=="custom"&&!pr.length||this.renderLayer(this,He[ur.source],ur,pr)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:ge.showOverdrawInspector?e.Color.black:e.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=ge.showOverdrawInspector,this.depthRangeFor3D=[0,1-(K._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=pe.length-1;this.currentLayer>=0;this.currentLayer--){var cr=this.style._layers[pe[this.currentLayer]],Gt=He[cr.source],lr=pt[cr.source];this._renderTileClippingMasks(cr,lr),this.renderLayer(this,Gt,cr,lr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<pe.length;this.currentLayer++){var qt=this.style._layers[pe[this.currentLayer]],zr=He[qt.source],$r=(qt.type==="symbol"?Tr:Ut)[qt.source];this._renderTileClippingMasks(qt,pt[qt.source]),this.renderLayer(this,zr,qt,$r)}if(this.options.showTileBoundaries){var Ai,wa,Ji=e.values(this.style._layers);Ji.forEach(function(fa){fa.source&&!fa.isHidden(te.transform.zoom)&&(fa.source!==(wa&&wa.id)&&(wa=te.style.sourceCaches[fa.source]),(!Ai||Ai.getSource().maxzoom<wa.getSource().maxzoom)&&(Ai=wa))}),Ai&&Ho.debug(this,Ai,Ai.getVisibleCoordinates())}this.options.showPadding&&ga(this),this.context.setDefault()},ds.prototype.renderLayer=function(K,ge,te,pe){te.isHidden(this.transform.zoom)||te.type!=="background"&&te.type!=="custom"&&!pe.length||(this.id=te.id,this.gpuTimingStart(te),Ho[te.type](K,ge,te,pe,this.style.placement.variableOffsets),this.gpuTimingEnd())},ds.prototype.gpuTimingStart=function(K){if(this.options.gpuTiming){var ge=this.context.extTimerQuery,te=this.gpuTimers[K.id];te||(te=this.gpuTimers[K.id]={calls:0,cpuTime:0,query:ge.createQueryEXT()}),te.calls++,ge.beginQueryEXT(ge.TIME_ELAPSED_EXT,te.query)}},ds.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var K=this.context.extTimerQuery;K.endQueryEXT(K.TIME_ELAPSED_EXT)}},ds.prototype.collectGpuTimers=function(){var K=this.gpuTimers;return this.gpuTimers={},K},ds.prototype.queryGpuTimers=function(K){var ge={};for(var te in K){var pe=K[te],He=this.context.extTimerQuery,Ce=He.getQueryObjectEXT(pe.query,He.QUERY_RESULT_EXT)/(1e3*1e3);He.deleteQueryEXT(pe.query),ge[te]=Ce}return ge},ds.prototype.translatePosMatrix=function(K,ge,te,pe,He){if(!te[0]&&!te[1])return K;var Ce=He?pe==="map"?this.transform.angle:0:pe==="viewport"?-this.transform.angle:0;if(Ce){var Ke=Math.sin(Ce),pt=Math.cos(Ce);te=[te[0]*pt-te[1]*Ke,te[0]*Ke+te[1]*pt]}var Ut=[He?te[0]:xs(ge,te[0],this.transform.zoom),He?te[1]:xs(ge,te[1],this.transform.zoom),0],Tr=new Float32Array(16);return e.translate(Tr,K,Ut),Tr},ds.prototype.saveTileTexture=function(K){var ge=this._tileTextures[K.size[0]];ge?ge.push(K):this._tileTextures[K.size[0]]=[K]},ds.prototype.getTileTexture=function(K){var ge=this._tileTextures[K];return ge&&ge.length>0?ge.pop():null},ds.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var ge=this.imageManager.getPattern(K.from.toString()),te=this.imageManager.getPattern(K.to.toString());return!ge||!te},ds.prototype.useProgram=function(K,ge){this.cache=this.cache||{};var te=""+K+(ge?ge.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[te]||(this.cache[te]=new xf(this.context,K,df[K],ge,es[K],this._showOverdrawInspector)),this.cache[te]},ds.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()},ds.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},ds.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},ds.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Is=function(K,ge){this.points=K,this.planes=ge};Is.fromInvProjectionMatrix=function(K,ge,te){var pe=[[-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]],He=Math.pow(2,te),Ce=pe.map(function(Ut){return e.transformMat4([],Ut,K)}).map(function(Ut){return e.scale$1([],Ut,1/Ut[3]/ge*He)}),Ke=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],pt=Ke.map(function(Ut){var Tr=e.sub([],Ce[Ut[0]],Ce[Ut[1]]),Ur=e.sub([],Ce[Ut[2]],Ce[Ut[1]]),vr=e.normalize([],e.cross([],Tr,Ur)),mt=-e.dot(vr,Ce[Ut[1]]);return vr.concat(mt)});return new Is(Ce,pt)};var Tl=function(K,ge){this.min=K,this.max=ge,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};Tl.prototype.quadrant=function(K){for(var ge=[K%2===0,K<2],te=e.clone$2(this.min),pe=e.clone$2(this.max),He=0;He<ge.length;He++)te[He]=ge[He]?this.min[He]:this.center[He],pe[He]=ge[He]?this.center[He]:this.max[He];return pe[2]=this.max[2],new Tl(te,pe)},Tl.prototype.distanceX=function(K){var ge=Math.max(Math.min(this.max[0],K[0]),this.min[0]);return ge-K[0]},Tl.prototype.distanceY=function(K){var ge=Math.max(Math.min(this.max[1],K[1]),this.min[1]);return ge-K[1]},Tl.prototype.intersects=function(K){for(var ge=[[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]],te=!0,pe=0;pe<K.planes.length;pe++){for(var He=K.planes[pe],Ce=0,Ke=0;Ke<ge.length;Ke++)Ce+=e.dot$1(He,ge[Ke])>=0;if(Ce===0)return 0;Ce!==ge.length&&(te=!1)}if(te)return 2;for(var pt=0;pt<3;pt++){for(var Ut=Number.MAX_VALUE,Tr=-Number.MAX_VALUE,Ur=0;Ur<K.points.length;Ur++){var vr=K.points[Ur][pt]-this.min[pt];Ut=Math.min(Ut,vr),Tr=Math.max(Tr,vr)}if(Tr<0||Ut>this.max[pt]-this.min[pt])return 0}return 1};var dl=function(K,ge,te,pe){if(K===void 0&&(K=0),ge===void 0&&(ge=0),te===void 0&&(te=0),pe===void 0&&(pe=0),isNaN(K)||K<0||isNaN(ge)||ge<0||isNaN(te)||te<0||isNaN(pe)||pe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=K,this.bottom=ge,this.left=te,this.right=pe};dl.prototype.interpolate=function(K,ge,te){return ge.top!=null&&K.top!=null&&(this.top=e.number(K.top,ge.top,te)),ge.bottom!=null&&K.bottom!=null&&(this.bottom=e.number(K.bottom,ge.bottom,te)),ge.left!=null&&K.left!=null&&(this.left=e.number(K.left,ge.left,te)),ge.right!=null&&K.right!=null&&(this.right=e.number(K.right,ge.right,te)),this},dl.prototype.getCenter=function(K,ge){var te=e.clamp((this.left+K-this.right)/2,0,K),pe=e.clamp((this.top+ge-this.bottom)/2,0,ge);return new e.Point(te,pe)},dl.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},dl.prototype.clone=function(){return new dl(this.top,this.bottom,this.left,this.right)},dl.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var ms=function(K,ge,te,pe,He){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=He===void 0?!0:He,this._minZoom=K||0,this._maxZoom=ge||22,this._minPitch=te??0,this._maxPitch=pe??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new dl,this._posMatrixCache={},this._alignedPosMatrixCache={}},gs={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}};ms.prototype.clone=function(){var K=new ms(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},gs.minZoom.get=function(){return this._minZoom},gs.minZoom.set=function(ve){this._minZoom!==ve&&(this._minZoom=ve,this.zoom=Math.max(this.zoom,ve))},gs.maxZoom.get=function(){return this._maxZoom},gs.maxZoom.set=function(ve){this._maxZoom!==ve&&(this._maxZoom=ve,this.zoom=Math.min(this.zoom,ve))},gs.minPitch.get=function(){return this._minPitch},gs.minPitch.set=function(ve){this._minPitch!==ve&&(this._minPitch=ve,this.pitch=Math.max(this.pitch,ve))},gs.maxPitch.get=function(){return this._maxPitch},gs.maxPitch.set=function(ve){this._maxPitch!==ve&&(this._maxPitch=ve,this.pitch=Math.min(this.pitch,ve))},gs.renderWorldCopies.get=function(){return this._renderWorldCopies},gs.renderWorldCopies.set=function(ve){ve===void 0?ve=!0:ve===null&&(ve=!1),this._renderWorldCopies=ve},gs.worldSize.get=function(){return this.tileSize*this.scale},gs.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},gs.size.get=function(){return new e.Point(this.width,this.height)},gs.bearing.get=function(){return-this.angle/Math.PI*180},gs.bearing.set=function(ve){var K=-e.wrap(ve,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},gs.pitch.get=function(){return this._pitch/Math.PI*180},gs.pitch.set=function(ve){var K=e.clamp(ve,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},gs.fov.get=function(){return this._fov/Math.PI*180},gs.fov.set=function(ve){ve=Math.max(.01,Math.min(60,ve)),this._fov!==ve&&(this._unmodified=!1,this._fov=ve/180*Math.PI,this._calcMatrices())},gs.zoom.get=function(){return this._zoom},gs.zoom.set=function(ve){var K=Math.min(Math.max(ve,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},gs.center.get=function(){return this._center},gs.center.set=function(ve){ve.lat===this._center.lat&&ve.lng===this._center.lng||(this._unmodified=!1,this._center=ve,this._constrain(),this._calcMatrices())},gs.padding.get=function(){return this._edgeInsets.toJSON()},gs.padding.set=function(ve){this._edgeInsets.equals(ve)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ve,1),this._calcMatrices())},gs.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},ms.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},ms.prototype.interpolatePadding=function(K,ge,te){this._unmodified=!1,this._edgeInsets.interpolate(K,ge,te),this._constrain(),this._calcMatrices()},ms.prototype.coveringZoomLevel=function(K){var ge=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,ge)},ms.prototype.getVisibleUnwrappedCoordinates=function(K){var ge=[new e.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var te=this.pointCoordinate(new e.Point(0,0)),pe=this.pointCoordinate(new e.Point(this.width,0)),He=this.pointCoordinate(new e.Point(this.width,this.height)),Ce=this.pointCoordinate(new e.Point(0,this.height)),Ke=Math.floor(Math.min(te.x,pe.x,He.x,Ce.x)),pt=Math.floor(Math.max(te.x,pe.x,He.x,Ce.x)),Ut=1,Tr=Ke-Ut;Tr<=pt+Ut;Tr++)Tr!==0&&ge.push(new e.UnwrappedTileID(Tr,K));return ge},ms.prototype.coveringTiles=function(K){var ge=this.coveringZoomLevel(K),te=ge;if(K.minzoom!==void 0&&ge<K.minzoom)return[];K.maxzoom!==void 0&&ge>K.maxzoom&&(ge=K.maxzoom);var pe=e.MercatorCoordinate.fromLngLat(this.center),He=Math.pow(2,ge),Ce=[He*pe.x,He*pe.y,0],Ke=Is.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ge),pt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(pt=ge);var Ut=3,Tr=function(Ji){return{aabb:new Tl([Ji*He,0,0],[(Ji+1)*He,He,0]),zoom:0,x:0,y:0,wrap:Ji,fullyVisible:!1}},Ur=[],vr=[],mt=ge,Et=K.reparseOverscaled?te:ge;if(this._renderWorldCopies)for(var Bt=1;Bt<=3;Bt++)Ur.push(Tr(-Bt)),Ur.push(Tr(Bt));for(Ur.push(Tr(0));Ur.length>0;){var or=Ur.pop(),dr=or.x,ur=or.y,pr=or.fullyVisible;if(!pr){var cr=or.aabb.intersects(Ke);if(cr===0)continue;pr=cr===2}var Gt=or.aabb.distanceX(Ce),lr=or.aabb.distanceY(Ce),qt=Math.max(Math.abs(Gt),Math.abs(lr)),zr=Ut+(1<<mt-or.zoom)-2;if(or.zoom===mt||qt>zr&&or.zoom>=pt){vr.push({tileID:new e.OverscaledTileID(or.zoom===mt?Et:or.zoom,or.wrap,or.zoom,dr,ur),distanceSq:e.sqrLen([Ce[0]-.5-dr,Ce[1]-.5-ur])});continue}for(var $r=0;$r<4;$r++){var Ai=(dr<<1)+$r%2,wa=(ur<<1)+($r>>1);Ur.push({aabb:or.aabb.quadrant($r),zoom:or.zoom+1,x:Ai,y:wa,wrap:or.wrap,fullyVisible:pr})}}return vr.sort(function(Ji,fa){return Ji.distanceSq-fa.distanceSq}).map(function(Ji){return Ji.tileID})},ms.prototype.resize=function(K,ge){this.width=K,this.height=ge,this.pixelsToGLUnits=[2/K,-2/ge],this._constrain(),this._calcMatrices()},gs.unmodified.get=function(){return this._unmodified},ms.prototype.zoomScale=function(K){return Math.pow(2,K)},ms.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},ms.prototype.project=function(K){var ge=e.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(K.lng)*this.worldSize,e.mercatorYfromLat(ge)*this.worldSize)},ms.prototype.unproject=function(K){return new e.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},gs.point.get=function(){return this.project(this.center)},ms.prototype.setLocationAtPoint=function(K,ge){var te=this.pointCoordinate(ge),pe=this.pointCoordinate(this.centerPoint),He=this.locationCoordinate(K),Ce=new e.MercatorCoordinate(He.x-(te.x-pe.x),He.y-(te.y-pe.y));this.center=this.coordinateLocation(Ce),this._renderWorldCopies&&(this.center=this.center.wrap())},ms.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},ms.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},ms.prototype.locationCoordinate=function(K){return e.MercatorCoordinate.fromLngLat(K)},ms.prototype.coordinateLocation=function(K){return K.toLngLat()},ms.prototype.pointCoordinate=function(K){var ge=0,te=[K.x,K.y,0,1],pe=[K.x,K.y,1,1];e.transformMat4(te,te,this.pixelMatrixInverse),e.transformMat4(pe,pe,this.pixelMatrixInverse);var He=te[3],Ce=pe[3],Ke=te[0]/He,pt=pe[0]/Ce,Ut=te[1]/He,Tr=pe[1]/Ce,Ur=te[2]/He,vr=pe[2]/Ce,mt=Ur===vr?0:(ge-Ur)/(vr-Ur);return new e.MercatorCoordinate(e.number(Ke,pt,mt)/this.worldSize,e.number(Ut,Tr,mt)/this.worldSize)},ms.prototype.coordinatePoint=function(K){var ge=[K.x*this.worldSize,K.y*this.worldSize,0,1];return e.transformMat4(ge,ge,this.pixelMatrix),new e.Point(ge[0]/ge[3],ge[1]/ge[3])},ms.prototype.getBounds=function(){return new e.LngLatBounds().extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},ms.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},ms.prototype.setMaxBounds=function(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},ms.prototype.calculatePosMatrix=function(K,ge){ge===void 0&&(ge=!1);var te=K.key,pe=ge?this._alignedPosMatrixCache:this._posMatrixCache;if(pe[te])return pe[te];var He=K.canonical,Ce=this.worldSize/this.zoomScale(He.z),Ke=He.x+Math.pow(2,He.z)*K.wrap,pt=e.identity(new Float64Array(16));return e.translate(pt,pt,[Ke*Ce,He.y*Ce,0]),e.scale(pt,pt,[Ce/e.EXTENT,Ce/e.EXTENT,1]),e.multiply(pt,ge?this.alignedProjMatrix:this.projMatrix,pt),pe[te]=new Float32Array(pt),pe[te]},ms.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},ms.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,ge=90,te=-180,pe=180,He,Ce,Ke,pt,Ut=this.size,Tr=this._unmodified;if(this.latRange){var Ur=this.latRange;K=e.mercatorYfromLat(Ur[1])*this.worldSize,ge=e.mercatorYfromLat(Ur[0])*this.worldSize,He=ge-K<Ut.y?Ut.y/(ge-K):0}if(this.lngRange){var vr=this.lngRange;te=e.mercatorXfromLng(vr[0])*this.worldSize,pe=e.mercatorXfromLng(vr[1])*this.worldSize,Ce=pe-te<Ut.x?Ut.x/(pe-te):0}var mt=this.point,Et=Math.max(Ce||0,He||0);if(Et){this.center=this.unproject(new e.Point(Ce?(pe+te)/2:mt.x,He?(ge+K)/2:mt.y)),this.zoom+=this.scaleZoom(Et),this._unmodified=Tr,this._constraining=!1;return}if(this.latRange){var Bt=mt.y,or=Ut.y/2;Bt-or<K&&(pt=K+or),Bt+or>ge&&(pt=ge-or)}if(this.lngRange){var dr=mt.x,ur=Ut.x/2;dr-ur<te&&(Ke=te+ur),dr+ur>pe&&(Ke=pe-ur)}(Ke!==void 0||pt!==void 0)&&(this.center=this.unproject(new e.Point(Ke!==void 0?Ke:mt.x,pt!==void 0?pt:mt.y))),this._unmodified=Tr,this._constraining=!1}},ms.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,ge=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var te=Math.PI/2+this._pitch,pe=this._fov*(.5+ge.y/this.height),He=Math.sin(pe)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-te-pe,.01,Math.PI-.01)),Ce=this.point,Ke=Ce.x,pt=Ce.y,Ut=Math.cos(Math.PI/2-this._pitch)*He+this.cameraToCenterDistance,Tr=Ut*1.01,Ur=this.height/50,vr=new Float64Array(16);e.perspective(vr,this._fov,this.width/this.height,Ur,Tr),vr[8]=-ge.x*2/this.width,vr[9]=ge.y*2/this.height,e.scale(vr,vr,[1,-1,1]),e.translate(vr,vr,[0,0,-this.cameraToCenterDistance]),e.rotateX(vr,vr,this._pitch),e.rotateZ(vr,vr,this.angle),e.translate(vr,vr,[-Ke,-pt,0]),this.mercatorMatrix=e.scale([],vr,[this.worldSize,this.worldSize,this.worldSize]),e.scale(vr,vr,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=vr,this.invProjMatrix=e.invert([],this.projMatrix);var mt=this.width%2/2,Et=this.height%2/2,Bt=Math.cos(this.angle),or=Math.sin(this.angle),dr=Ke-Math.round(Ke)+Bt*mt+or*Et,ur=pt-Math.round(pt)+Bt*Et+or*mt,pr=new Float64Array(vr);if(e.translate(pr,pr,[dr>.5?dr-1:dr,ur>.5?ur-1:ur,0]),this.alignedProjMatrix=pr,vr=e.create(),e.scale(vr,vr,[this.width/2,-this.height/2,1]),e.translate(vr,vr,[1,-1,0]),this.labelPlaneMatrix=vr,vr=e.create(),e.scale(vr,vr,[1,-1,1]),e.translate(vr,vr,[-1,-1,0]),e.scale(vr,vr,[2/this.width,2/this.height,1]),this.glCoordMatrix=vr,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),vr=e.invert(new Float64Array(16),this.pixelMatrix),!vr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=vr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},ms.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new e.Point(0,0)),ge=[K.x*this.worldSize,K.y*this.worldSize,0,1],te=e.transformMat4(ge,ge,this.pixelMatrix);return te[3]/this.cameraToCenterDistance},ms.prototype.getCameraPoint=function(){var K=this._pitch,ge=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,ge))},ms.prototype.getCameraQueryGeometry=function(K){var ge=this.getCameraPoint();if(K.length===1)return[K[0],ge];for(var te=ge.x,pe=ge.y,He=ge.x,Ce=ge.y,Ke=0,pt=K;Ke<pt.length;Ke+=1){var Ut=pt[Ke];te=Math.min(te,Ut.x),pe=Math.min(pe,Ut.y),He=Math.max(He,Ut.x),Ce=Math.max(Ce,Ut.y)}return[new e.Point(te,pe),new e.Point(He,pe),new e.Point(He,Ce),new e.Point(te,Ce),new e.Point(te,pe)]},Object.defineProperties(ms.prototype,gs);function ql(ve,K){var ge=!1,te=null,pe=function(){te=null,ge&&(ve(),te=setTimeout(pe,K),ge=!1)};return function(){return ge=!0,te||pe(),te}}var uu=function(K){this._hashName=K&&encodeURIComponent(K),e.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=ql(this._updateHashUnthrottled.bind(this),30*1e3/100)};uu.prototype.addTo=function(K){return this._map=K,e.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},uu.prototype.remove=function(){return e.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},uu.prototype.getHashString=function(K){var ge=this._map.getCenter(),te=Math.round(this._map.getZoom()*100)/100,pe=Math.ceil((te*Math.LN2+Math.log(512/360/.5))/Math.LN10),He=Math.pow(10,pe),Ce=Math.round(ge.lng*He)/He,Ke=Math.round(ge.lat*He)/He,pt=this._map.getBearing(),Ut=this._map.getPitch(),Tr="";if(K?Tr+="/"+Ce+"/"+Ke+"/"+te:Tr+=te+"/"+Ke+"/"+Ce,(pt||Ut)&&(Tr+="/"+Math.round(pt*10)/10),Ut&&(Tr+="/"+Math.round(Ut)),this._hashName){var Ur=this._hashName,vr=!1,mt=e.window.location.hash.slice(1).split("&").map(function(Et){var Bt=Et.split("=")[0];return Bt===Ur?(vr=!0,Bt+"="+Tr):Et}).filter(function(Et){return Et});return vr||mt.push(Ur+"="+Tr),"#"+mt.join("&")}return"#"+Tr},uu.prototype._getCurrentHash=function(){var K=this,ge=e.window.location.hash.replace("#","");if(this._hashName){var te;return ge.split("&").map(function(pe){return pe.split("=")}).forEach(function(pe){pe[0]===K._hashName&&(te=pe)}),(te&&te[1]||"").split("/")}return ge.split("/")},uu.prototype._onHashChange=function(){var K=this._getCurrentHash();if(K.length>=3&&!K.some(function(te){return isNaN(te)})){var ge=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(K[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+K[2],+K[1]],zoom:+K[0],bearing:ge,pitch:+(K[4]||0)}),!0}return!1},uu.prototype._updateHashUnthrottled=function(){var K=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,K)}catch{}};var Uu={linearity:.3,easing:e.bezier(0,0,.3,1)},Su=e.extend({deceleration:2500,maxSpeed:1400},Uu),Fl=e.extend({deceleration:20,maxSpeed:1400},Uu),yu=e.extend({deceleration:1e3,maxSpeed:360},Uu),dc=e.extend({deceleration:1e3,maxSpeed:90},Uu),Ql=function(K){this._map=K,this.clear()};Ql.prototype.clear=function(){this._inertiaBuffer=[]},Ql.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.browser.now(),settings:K})},Ql.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,ge=e.browser.now(),te=160;K.length>0&&ge-K[0].time>te;)K.shift()},Ql.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ge={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},te=0,pe=this._inertiaBuffer;te<pe.length;te+=1){var He=pe[te],Ce=He.settings;ge.zoom+=Ce.zoomDelta||0,ge.bearing+=Ce.bearingDelta||0,ge.pitch+=Ce.pitchDelta||0,Ce.panDelta&&ge.pan._add(Ce.panDelta),Ce.around&&(ge.around=Ce.around),Ce.pinchAround&&(ge.pinchAround=Ce.pinchAround)}var Ke=this._inertiaBuffer[this._inertiaBuffer.length-1],pt=Ke.time-this._inertiaBuffer[0].time,Ut={};if(ge.pan.mag()){var Tr=de(ge.pan.mag(),pt,e.extend({},Su,K||{}));Ut.offset=ge.pan.mult(Tr.amount/ge.pan.mag()),Ut.center=this._map.transform.center,eu(Ut,Tr)}if(ge.zoom){var Ur=de(ge.zoom,pt,Fl);Ut.zoom=this._map.transform.zoom+Ur.amount,eu(Ut,Ur)}if(ge.bearing){var vr=de(ge.bearing,pt,yu);Ut.bearing=this._map.transform.bearing+e.clamp(vr.amount,-179,179),eu(Ut,vr)}if(ge.pitch){var mt=de(ge.pitch,pt,dc);Ut.pitch=this._map.transform.pitch+mt.amount,eu(Ut,mt)}if(Ut.zoom||Ut.bearing){var Et=ge.pinchAround===void 0?ge.around:ge.pinchAround;Ut.around=Et?this._map.unproject(Et):this._map.getCenter()}return this.clear(),e.extend(Ut,{noMoveStart:!0})}};function eu(ve,K){(!ve.duration||ve.duration<K.duration)&&(ve.duration=K.duration,ve.easing=K.easing)}function de(ve,K,ge){var te=ge.maxSpeed,pe=ge.linearity,He=ge.deceleration,Ce=e.clamp(ve*pe/(K/1e3),-te,te),Ke=Math.abs(Ce)/(He*pe);return{easing:ge.easing,duration:Ke*1e3,amount:Ce*(Ke/2)}}var Fe=function(ve){function K(te,pe,He,Ce){Ce===void 0&&(Ce={});var Ke=r.mousePos(pe.getCanvasContainer(),He),pt=pe.unproject(Ke);ve.call(this,te,e.extend({point:Ke,lngLat:pt,originalEvent:He},Ce)),this._defaultPrevented=!1,this.target=pe}ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K;var ge={defaultPrevented:{configurable:!0}};return K.prototype.preventDefault=function(){this._defaultPrevented=!0},ge.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(K.prototype,ge),K}(e.Event),Je=function(ve){function K(te,pe,He){var Ce=te==="touchend"?He.changedTouches:He.touches,Ke=r.touchPos(pe.getCanvasContainer(),Ce),pt=Ke.map(function(Ur){return pe.unproject(Ur)}),Ut=Ke.reduce(function(Ur,vr,mt,Et){return Ur.add(vr.div(Et.length))},new e.Point(0,0)),Tr=pe.unproject(Ut);ve.call(this,te,{points:Ke,point:Ut,lngLats:pt,lngLat:Tr,originalEvent:He}),this._defaultPrevented=!1}ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K;var ge={defaultPrevented:{configurable:!0}};return K.prototype.preventDefault=function(){this._defaultPrevented=!0},ge.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(K.prototype,ge),K}(e.Event),vt=function(ve){function K(te,pe,He){ve.call(this,te,{originalEvent:He}),this._defaultPrevented=!1}ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K;var ge={defaultPrevented:{configurable:!0}};return K.prototype.preventDefault=function(){this._defaultPrevented=!0},ge.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(K.prototype,ge),K}(e.Event),_t=function(K,ge){this._map=K,this._clickTolerance=ge.clickTolerance};_t.prototype.reset=function(){delete this._mousedownPos},_t.prototype.wheel=function(K){return this._firePreventable(new vt(K.type,this._map,K))},_t.prototype.mousedown=function(K,ge){return this._mousedownPos=ge,this._firePreventable(new Fe(K.type,this._map,K))},_t.prototype.mouseup=function(K){this._map.fire(new Fe(K.type,this._map,K))},_t.prototype.click=function(K,ge){this._mousedownPos&&this._mousedownPos.dist(ge)>=this._clickTolerance||this._map.fire(new Fe(K.type,this._map,K))},_t.prototype.dblclick=function(K){return this._firePreventable(new Fe(K.type,this._map,K))},_t.prototype.mouseover=function(K){this._map.fire(new Fe(K.type,this._map,K))},_t.prototype.mouseout=function(K){this._map.fire(new Fe(K.type,this._map,K))},_t.prototype.touchstart=function(K){return this._firePreventable(new Je(K.type,this._map,K))},_t.prototype.touchmove=function(K){this._map.fire(new Je(K.type,this._map,K))},_t.prototype.touchend=function(K){this._map.fire(new Je(K.type,this._map,K))},_t.prototype.touchcancel=function(K){this._map.fire(new Je(K.type,this._map,K))},_t.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},_t.prototype.isEnabled=function(){return!0},_t.prototype.isActive=function(){return!1},_t.prototype.enable=function(){},_t.prototype.disable=function(){};var At=function(K){this._map=K};At.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},At.prototype.mousemove=function(K){this._map.fire(new Fe(K.type,this._map,K))},At.prototype.mousedown=function(){this._delayContextMenu=!0},At.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Fe("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},At.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new Fe(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},At.prototype.isEnabled=function(){return!0},At.prototype.isActive=function(){return!1},At.prototype.enable=function(){},At.prototype.disable=function(){};var ar=function(K,ge){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=ge.clickTolerance||1};ar.prototype.isEnabled=function(){return!!this._enabled},ar.prototype.isActive=function(){return!!this._active},ar.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},ar.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ar.prototype.mousedown=function(K,ge){this.isEnabled()&&K.shiftKey&&K.button===0&&(r.disableDrag(),this._startPos=this._lastPos=ge,this._active=!0)},ar.prototype.mousemoveWindow=function(K,ge){if(this._active){var te=ge;if(!(this._lastPos.equals(te)||!this._box&&te.dist(this._startPos)<this._clickTolerance)){var pe=this._startPos;this._lastPos=te,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",K));var He=Math.min(pe.x,te.x),Ce=Math.max(pe.x,te.x),Ke=Math.min(pe.y,te.y),pt=Math.max(pe.y,te.y);r.setTransform(this._box,"translate("+He+"px,"+Ke+"px)"),this._box.style.width=Ce-He+"px",this._box.style.height=pt-Ke+"px"}}},ar.prototype.mouseupWindow=function(K,ge){var te=this;if(this._active&&K.button===0){var pe=this._startPos,He=ge;if(this.reset(),r.suppressClick(),pe.x===He.x&&pe.y===He.y)this._fireEvent("boxzoomcancel",K);else return this._map.fire(new e.Event("boxzoomend",{originalEvent:K})),{cameraAnimation:function(Ce){return Ce.fitScreenCoordinates(pe,He,te._map.getBearing(),{linear:!0})}}}},ar.prototype.keydown=function(K){this._active&&K.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",K))},ar.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},ar.prototype._fireEvent=function(K,ge){return this._map.fire(new e.Event(K,{originalEvent:ge}))};function Ft(ve,K){for(var ge={},te=0;te<ve.length;te++)ge[ve[te].identifier]=K[te];return ge}function xr(ve){for(var K=new e.Point(0,0),ge=0,te=ve;ge<te.length;ge+=1){var pe=te[ge];K._add(pe)}return K.div(ve.length)}var Gr=500,Yr=500,Ei=30,xi=function(K){this.reset(),this.numTouches=K.numTouches};xi.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},xi.prototype.touchstart=function(K,ge,te){(this.centroid||te.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),te.length===this.numTouches&&(this.centroid=xr(ge),this.touches=Ft(te,ge)))},xi.prototype.touchmove=function(K,ge,te){if(!(this.aborted||!this.centroid)){var pe=Ft(te,ge);for(var He in this.touches){var Ce=this.touches[He],Ke=pe[He];(!Ke||Ke.dist(Ce)>Ei)&&(this.aborted=!0)}}},xi.prototype.touchend=function(K,ge,te){if((!this.centroid||K.timeStamp-this.startTime>Yr)&&(this.aborted=!0),te.length===0){var pe=!this.aborted&&this.centroid;if(this.reset(),pe)return pe}};var na=function(K){this.singleTap=new xi(K),this.numTaps=K.numTaps,this.reset()};na.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},na.prototype.touchstart=function(K,ge,te){this.singleTap.touchstart(K,ge,te)},na.prototype.touchmove=function(K,ge,te){this.singleTap.touchmove(K,ge,te)},na.prototype.touchend=function(K,ge,te){var pe=this.singleTap.touchend(K,ge,te);if(pe){var He=K.timeStamp-this.lastTime<Gr,Ce=!this.lastTap||this.lastTap.dist(pe)<Ei;if((!He||!Ce)&&this.reset(),this.count++,this.lastTime=K.timeStamp,this.lastTap=pe,this.count===this.numTaps)return this.reset(),pe}};var ua=function(){this._zoomIn=new na({numTouches:1,numTaps:2}),this._zoomOut=new na({numTouches:2,numTaps:1}),this.reset()};ua.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},ua.prototype.touchstart=function(K,ge,te){this._zoomIn.touchstart(K,ge,te),this._zoomOut.touchstart(K,ge,te)},ua.prototype.touchmove=function(K,ge,te){this._zoomIn.touchmove(K,ge,te),this._zoomOut.touchmove(K,ge,te)},ua.prototype.touchend=function(K,ge,te){var pe=this,He=this._zoomIn.touchend(K,ge,te),Ce=this._zoomOut.touchend(K,ge,te);if(He)return this._active=!0,K.preventDefault(),setTimeout(function(){return pe.reset()},0),{cameraAnimation:function(Ke){return Ke.easeTo({duration:300,zoom:Ke.getZoom()+1,around:Ke.unproject(He)},{originalEvent:K})}};if(Ce)return this._active=!0,K.preventDefault(),setTimeout(function(){return pe.reset()},0),{cameraAnimation:function(Ke){return Ke.easeTo({duration:300,zoom:Ke.getZoom()-1,around:Ke.unproject(Ce)},{originalEvent:K})}}},ua.prototype.touchcancel=function(){this.reset()},ua.prototype.enable=function(){this._enabled=!0},ua.prototype.disable=function(){this._enabled=!1,this.reset()},ua.prototype.isEnabled=function(){return this._enabled},ua.prototype.isActive=function(){return this._active};var Di=0,Hi=2,ta={};ta[Di]=1,ta[Hi]=2;function ya(ve,K){var ge=ta[K];return ve.buttons===void 0||(ve.buttons&ge)!==ge}var da=function(K){this.reset(),this._clickTolerance=K.clickTolerance||1};da.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},da.prototype._correctButton=function(K,ge){return!1},da.prototype._move=function(K,ge){return{}},da.prototype.mousedown=function(K,ge){if(!this._lastPoint){var te=r.mouseButton(K);this._correctButton(K,te)&&(this._lastPoint=ge,this._eventButton=te)}},da.prototype.mousemoveWindow=function(K,ge){var te=this._lastPoint;if(te){if(K.preventDefault(),ya(K,this._eventButton)){this.reset();return}if(!(!this._moved&&ge.dist(te)<this._clickTolerance))return this._moved=!0,this._lastPoint=ge,this._move(te,ge)}},da.prototype.mouseupWindow=function(K){if(this._lastPoint){var ge=r.mouseButton(K);ge===this._eventButton&&(this._moved&&r.suppressClick(),this.reset())}},da.prototype.enable=function(){this._enabled=!0},da.prototype.disable=function(){this._enabled=!1,this.reset()},da.prototype.isEnabled=function(){return this._enabled},da.prototype.isActive=function(){return this._active};var Oi=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.mousedown=function(te,pe){ve.prototype.mousedown.call(this,te,pe),this._lastPoint&&(this._active=!0)},K.prototype._correctButton=function(te,pe){return pe===Di&&!te.ctrlKey},K.prototype._move=function(te,pe){return{around:pe,panDelta:pe.sub(te)}},K}(da),xn=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype._correctButton=function(te,pe){return pe===Di&&te.ctrlKey||pe===Hi},K.prototype._move=function(te,pe){var He=.8,Ce=(pe.x-te.x)*He;if(Ce)return this._active=!0,{bearingDelta:Ce}},K.prototype.contextmenu=function(te){te.preventDefault()},K}(da),mn=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype._correctButton=function(te,pe){return pe===Di&&te.ctrlKey||pe===Hi},K.prototype._move=function(te,pe){var He=-.5,Ce=(pe.y-te.y)*He;if(Ce)return this._active=!0,{pitchDelta:Ce}},K.prototype.contextmenu=function(te){te.preventDefault()},K}(da),In=function(K){this._minTouches=1,this._clickTolerance=K.clickTolerance||1,this.reset()};In.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new e.Point(0,0)},In.prototype.touchstart=function(K,ge,te){return this._calculateTransform(K,ge,te)},In.prototype.touchmove=function(K,ge,te){if(!(!this._active||te.length<this._minTouches))return K.preventDefault(),this._calculateTransform(K,ge,te)},In.prototype.touchend=function(K,ge,te){this._calculateTransform(K,ge,te),this._active&&te.length<this._minTouches&&this.reset()},In.prototype.touchcancel=function(){this.reset()},In.prototype._calculateTransform=function(K,ge,te){te.length>0&&(this._active=!0);var pe=Ft(te,ge),He=new e.Point(0,0),Ce=new e.Point(0,0),Ke=0;for(var pt in pe){var Ut=pe[pt],Tr=this._touches[pt];Tr&&(He._add(Ut),Ce._add(Ut.sub(Tr)),Ke++,pe[pt]=Ut)}if(this._touches=pe,!(Ke<this._minTouches||!Ce.mag())){var Ur=Ce.div(Ke);if(this._sum._add(Ur),!(this._sum.mag()<this._clickTolerance)){var vr=He.div(Ke);return{around:vr,panDelta:Ur}}}},In.prototype.enable=function(){this._enabled=!0},In.prototype.disable=function(){this._enabled=!1,this.reset()},In.prototype.isEnabled=function(){return this._enabled},In.prototype.isActive=function(){return this._active};var Yn=function(){this.reset()};Yn.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Yn.prototype._start=function(K){},Yn.prototype._move=function(K,ge,te){return{}},Yn.prototype.touchstart=function(K,ge,te){this._firstTwoTouches||te.length<2||(this._firstTwoTouches=[te[0].identifier,te[1].identifier],this._start([ge[0],ge[1]]))},Yn.prototype.touchmove=function(K,ge,te){if(this._firstTwoTouches){K.preventDefault();var pe=this._firstTwoTouches,He=pe[0],Ce=pe[1],Ke=mo(te,ge,He),pt=mo(te,ge,Ce);if(!(!Ke||!pt)){var Ut=this._aroundCenter?null:Ke.add(pt).div(2);return this._move([Ke,pt],Ut,K)}}},Yn.prototype.touchend=function(K,ge,te){if(this._firstTwoTouches){var pe=this._firstTwoTouches,He=pe[0],Ce=pe[1],Ke=mo(te,ge,He),pt=mo(te,ge,Ce);Ke&&pt||(this._active&&r.suppressClick(),this.reset())}},Yn.prototype.touchcancel=function(){this.reset()},Yn.prototype.enable=function(K){this._enabled=!0,this._aroundCenter=!!K&&K.around==="center"},Yn.prototype.disable=function(){this._enabled=!1,this.reset()},Yn.prototype.isEnabled=function(){return this._enabled},Yn.prototype.isActive=function(){return this._active};function mo(ve,K,ge){for(var te=0;te<ve.length;te++)if(ve[te].identifier===ge)return K[te]}var bo=.1;function vs(ve,K){return Math.log(ve/K)/Math.LN2}var To=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ve.prototype.reset.call(this),delete this._distance,delete this._startDistance},K.prototype._start=function(te){this._startDistance=this._distance=te[0].dist(te[1])},K.prototype._move=function(te,pe){var He=this._distance;if(this._distance=te[0].dist(te[1]),!(!this._active&&Math.abs(vs(this._distance,this._startDistance))<bo))return this._active=!0,{zoomDelta:vs(this._distance,He),pinchAround:pe}},K}(Yn),cs=25;function Al(ve,K){return ve.angleWith(K)*180/Math.PI}var ml=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ve.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},K.prototype._start=function(te){this._startVector=this._vector=te[0].sub(te[1]),this._minDiameter=te[0].dist(te[1])},K.prototype._move=function(te,pe){var He=this._vector;if(this._vector=te[0].sub(te[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:Al(this._vector,He),pinchAround:pe}},K.prototype._isBelowThreshold=function(te){this._minDiameter=Math.min(this._minDiameter,te.mag());var pe=Math.PI*this._minDiameter,He=cs/pe*360,Ce=Al(te,this._startVector);return Math.abs(Ce)<He},K}(Yn);function Pl(ve){return Math.abs(ve.y)>Math.abs(ve.x)}var Dn=100,zo=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ve.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(te){this._lastPoints=te,Pl(te[0].sub(te[1]))&&(this._valid=!1)},K.prototype._move=function(te,pe,He){var Ce=te[0].sub(this._lastPoints[0]),Ke=te[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Ce,Ke,He.timeStamp),!!this._valid){this._lastPoints=te,this._active=!0;var pt=(Ce.y+Ke.y)/2,Ut=-.5;return{pitchDelta:pt*Ut}}},K.prototype.gestureBeginsVertically=function(te,pe,He){if(this._valid!==void 0)return this._valid;var Ce=2,Ke=te.mag()>=Ce,pt=pe.mag()>=Ce;if(!(!Ke&&!pt)){if(!Ke||!pt)return this._firstMove===void 0&&(this._firstMove=He),He-this._firstMove<Dn?void 0:!1;var Ut=te.y>0==pe.y>0;return Pl(te)&&Pl(pe)&&Ut}},K}(Yn),ks={panStep:100,bearingStep:15,pitchStep:10},Rs=function(){var K=ks;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};Rs.prototype.reset=function(){this._active=!1},Rs.prototype.keydown=function(K){var ge=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var te=0,pe=0,He=0,Ce=0,Ke=0;switch(K.keyCode){case 61:case 107:case 171:case 187:te=1;break;case 189:case 109:case 173:te=-1;break;case 37:K.shiftKey?pe=-1:(K.preventDefault(),Ce=-1);break;case 39:K.shiftKey?pe=1:(K.preventDefault(),Ce=1);break;case 38:K.shiftKey?He=1:(K.preventDefault(),Ke=-1);break;case 40:K.shiftKey?He=-1:(K.preventDefault(),Ke=1);break;default:return}return this._rotationDisabled&&(pe=0,He=0),{cameraAnimation:function(pt){var Ut=pt.getZoom();pt.easeTo({duration:300,easeId:"keyboardHandler",easing:Bl,zoom:te?Math.round(Ut)+te*(K.shiftKey?2:1):Ut,bearing:pt.getBearing()+pe*ge._bearingStep,pitch:pt.getPitch()+He*ge._pitchStep,offset:[-Ce*ge._panStep,-Ke*ge._panStep],center:pt.getCenter()},{originalEvent:K})}}}},Rs.prototype.enable=function(){this._enabled=!0},Rs.prototype.disable=function(){this._enabled=!1,this.reset()},Rs.prototype.isEnabled=function(){return this._enabled},Rs.prototype.isActive=function(){return this._active},Rs.prototype.disableRotation=function(){this._rotationDisabled=!0},Rs.prototype.enableRotation=function(){this._rotationDisabled=!1};function Bl(ve){return ve*(2-ve)}var tu=4.000244140625,Ru=1/100,Hl=1/450,Tc=2,rt=function(K,ge){this._map=K,this._el=K.getCanvasContainer(),this._handler=ge,this._delta=0,this._defaultZoomRate=Ru,this._wheelZoomRate=Hl,e.bindAll(["_onTimeout"],this)};rt.prototype.setZoomRate=function(K){this._defaultZoomRate=K},rt.prototype.setWheelZoomRate=function(K){this._wheelZoomRate=K},rt.prototype.isEnabled=function(){return!!this._enabled},rt.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},rt.prototype.isZooming=function(){return!!this._zooming},rt.prototype.enable=function(K){this.isEnabled()||(this._enabled=!0,this._aroundCenter=K&&K.around==="center")},rt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},rt.prototype.wheel=function(K){if(this.isEnabled()){var ge=K.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,te=e.browser.now(),pe=te-(this._lastWheelEventTime||0);this._lastWheelEventTime=te,ge!==0&&ge%tu===0?this._type="wheel":ge!==0&&Math.abs(ge)<4?this._type="trackpad":pe>400?(this._type=null,this._lastValue=ge,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(pe*ge)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ge+=this._lastValue)),K.shiftKey&&ge&&(ge=ge/4),this._type&&(this._lastWheelEvent=K,this._delta-=ge,this._active||this._start(K)),K.preventDefault()}},rt.prototype._onTimeout=function(K){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(K)},rt.prototype._start=function(K){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 ge=r.mousePos(this._el,K);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ge)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},rt.prototype.renderFrame=function(){var K=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ge=this._map.transform;if(this._delta!==0){var te=this._type==="wheel"&&Math.abs(this._delta)>tu?this._wheelZoomRate:this._defaultZoomRate,pe=Tc/(1+Math.exp(-Math.abs(this._delta*te)));this._delta<0&&pe!==0&&(pe=1/pe);var He=typeof this._targetZoom=="number"?ge.zoomScale(this._targetZoom):ge.scale;this._targetZoom=Math.min(ge.maxZoom,Math.max(ge.minZoom,ge.scaleZoom(He*pe))),this._type==="wheel"&&(this._startZoom=ge.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Ce=typeof this._targetZoom=="number"?this._targetZoom:ge.zoom,Ke=this._startZoom,pt=this._easing,Ut=!1,Tr;if(this._type==="wheel"&&Ke&&pt){var Ur=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),vr=pt(Ur);Tr=e.number(Ke,Ce,vr),Ur<1?this._frameId||(this._frameId=!0):Ut=!0}else Tr=Ce,Ut=!0;return this._active=!0,Ut&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ut,zoomDelta:Tr-ge.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},rt.prototype._smoothOutEasing=function(K){var ge=e.ease;if(this._prevEase){var te=this._prevEase,pe=(e.browser.now()-te.start)/te.duration,He=te.easing(pe+.01)-te.easing(pe),Ce=.27/Math.sqrt(He*He+1e-4)*.01,Ke=Math.sqrt(.27*.27-Ce*Ce);ge=e.bezier(Ce,Ke,.25,1)}return this._prevEase={start:e.browser.now(),duration:K,easing:ge},ge},rt.prototype.reset=function(){this._active=!1};var Yt=function(K,ge){this._clickZoom=K,this._tapZoom=ge};Yt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Yt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Yt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Yt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var hr=function(){this.reset()};hr.prototype.reset=function(){this._active=!1},hr.prototype.dblclick=function(K,ge){return K.preventDefault(),{cameraAnimation:function(te){te.easeTo({duration:300,zoom:te.getZoom()+(K.shiftKey?-1:1),around:te.unproject(ge)},{originalEvent:K})}}},hr.prototype.enable=function(){this._enabled=!0},hr.prototype.disable=function(){this._enabled=!1,this.reset()},hr.prototype.isEnabled=function(){return this._enabled},hr.prototype.isActive=function(){return this._active};var li=function(){this._tap=new na({numTouches:1,numTaps:1}),this.reset()};li.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},li.prototype.touchstart=function(K,ge,te){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>Gr&&this.reset(),this._tapTime?te.length>0&&(this._swipePoint=ge[0],this._swipeTouch=te[0].identifier):this._tap.touchstart(K,ge,te))},li.prototype.touchmove=function(K,ge,te){if(!this._tapTime)this._tap.touchmove(K,ge,te);else if(this._swipePoint){if(te[0].identifier!==this._swipeTouch)return;var pe=ge[0],He=pe.y-this._swipePoint.y;return this._swipePoint=pe,K.preventDefault(),this._active=!0,{zoomDelta:He/128}}},li.prototype.touchend=function(K,ge,te){if(this._tapTime)this._swipePoint&&te.length===0&&this.reset();else{var pe=this._tap.touchend(K,ge,te);pe&&(this._tapTime=K.timeStamp)}},li.prototype.touchcancel=function(){this.reset()},li.prototype.enable=function(){this._enabled=!0},li.prototype.disable=function(){this._enabled=!1,this.reset()},li.prototype.isEnabled=function(){return this._enabled},li.prototype.isActive=function(){return this._active};var Ci=function(K,ge,te){this._el=K,this._mousePan=ge,this._touchPan=te};Ci.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ci.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ci.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ci.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Ti=function(K,ge,te){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=ge,this._mousePitch=te};Ti.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Ti.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Ti.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Ti.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Mi=function(K,ge,te,pe){this._el=K,this._touchZoom=ge,this._touchRotate=te,this._tapDragZoom=pe,this._rotationDisabled=!1,this._enabled=!0};Mi.prototype.enable=function(K){this._touchZoom.enable(K),this._rotationDisabled||this._touchRotate.enable(K),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Mi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Mi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Mi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Mi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Mi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ia=function(ve){return ve.zoom||ve.drag||ve.pitch||ve.rotate},ka=function(ve){function K(){ve.apply(this,arguments)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K}(e.Event);function Sa(ve){return ve.panDelta&&ve.panDelta.mag()||ve.zoomDelta||ve.bearingDelta||ve.pitchDelta}var va=function(K,ge){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ql(K),this._bearingSnap=ge.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ge),e.bindAll(["handleEvent","handleWindowEvent"],this);var te=this._el;this._listeners=[[te,"touchstart",{passive:!0}],[te,"touchmove",{passive:!1}],[te,"touchend",void 0],[te,"touchcancel",void 0],[te,"mousedown",void 0],[te,"mousemove",void 0],[te,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[te,"mouseover",void 0],[te,"mouseout",void 0],[te,"dblclick",void 0],[te,"click",void 0],[te,"keydown",{capture:!1}],[te,"keyup",void 0],[te,"wheel",{passive:!1}],[te,"contextmenu",void 0],[e.window,"blur",void 0]];for(var pe=0,He=this._listeners;pe<He.length;pe+=1){var Ce=He[pe],Ke=Ce[0],pt=Ce[1],Ut=Ce[2];r.addEventListener(Ke,pt,Ke===e.window.document?this.handleWindowEvent:this.handleEvent,Ut)}};va.prototype.destroy=function(){for(var K=0,ge=this._listeners;K<ge.length;K+=1){var te=ge[K],pe=te[0],He=te[1],Ce=te[2];r.removeEventListener(pe,He,pe===e.window.document?this.handleWindowEvent:this.handleEvent,Ce)}},va.prototype._addDefaultHandlers=function(K){var ge=this._map,te=ge.getCanvasContainer();this._add("mapEvent",new _t(ge,K));var pe=ge.boxZoom=new ar(ge,K);this._add("boxZoom",pe);var He=new ua,Ce=new hr;ge.doubleClickZoom=new Yt(Ce,He),this._add("tapZoom",He),this._add("clickZoom",Ce);var Ke=new li;this._add("tapDragZoom",Ke);var pt=ge.touchPitch=new zo;this._add("touchPitch",pt);var Ut=new xn(K),Tr=new mn(K);ge.dragRotate=new Ti(K,Ut,Tr),this._add("mouseRotate",Ut,["mousePitch"]),this._add("mousePitch",Tr,["mouseRotate"]);var Ur=new Oi(K),vr=new In(K);ge.dragPan=new Ci(te,Ur,vr),this._add("mousePan",Ur),this._add("touchPan",vr,["touchZoom","touchRotate"]);var mt=new ml,Et=new To;ge.touchZoomRotate=new Mi(te,Et,mt,Ke),this._add("touchRotate",mt,["touchPan","touchZoom"]),this._add("touchZoom",Et,["touchPan","touchRotate"]);var Bt=ge.scrollZoom=new rt(ge,this);this._add("scrollZoom",Bt,["mousePan"]);var or=ge.keyboard=new Rs;this._add("keyboard",or),this._add("blockableMapEvent",new At(ge));for(var dr=0,ur=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];dr<ur.length;dr+=1){var pr=ur[dr];K.interactive&&K[pr]&&ge[pr].enable(K[pr])}},va.prototype._add=function(K,ge,te){this._handlers.push({handlerName:K,handler:ge,allowed:te}),this._handlersById[K]=ge},va.prototype.stop=function(K){if(!this._updatingCamera){for(var ge=0,te=this._handlers;ge<te.length;ge+=1){var pe=te[ge],He=pe.handler;He.reset()}this._inertia.clear(),this._fireEvents({},{},K),this._changes=[]}},va.prototype.isActive=function(){for(var K=0,ge=this._handlers;K<ge.length;K+=1){var te=ge[K],pe=te.handler;if(pe.isActive())return!0}return!1},va.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},va.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},va.prototype.isMoving=function(){return!!ia(this._eventsInProgress)||this.isZooming()},va.prototype._blockedByActive=function(K,ge,te){for(var pe in K)if(pe!==te&&(!ge||ge.indexOf(pe)<0))return!0;return!1},va.prototype.handleWindowEvent=function(K){this.handleEvent(K,K.type+"Window")},va.prototype._getMapTouches=function(K){for(var ge=[],te=0,pe=K;te<pe.length;te+=1){var He=pe[te],Ce=He.target;this._el.contains(Ce)&&ge.push(He)}return ge},va.prototype.handleEvent=function(K,ge){if(K.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var te=K.type==="renderFrame"?void 0:K,pe={needsRenderFrame:!1},He={},Ce={},Ke=K.touches?this._getMapTouches(K.touches):void 0,pt=Ke?r.touchPos(this._el,Ke):r.mousePos(this._el,K),Ut=0,Tr=this._handlers;Ut<Tr.length;Ut+=1){var Ur=Tr[Ut],vr=Ur.handlerName,mt=Ur.handler,Et=Ur.allowed;if(mt.isEnabled()){var Bt=void 0;this._blockedByActive(Ce,Et,vr)?mt.reset():mt[ge||K.type]&&(Bt=mt[ge||K.type](K,pt,Ke),this.mergeHandlerResult(pe,He,Bt,vr,te),Bt&&Bt.needsRenderFrame&&this._triggerRenderFrame()),(Bt||mt.isActive())&&(Ce[vr]=mt)}}var or={};for(var dr in this._previousActiveHandlers)Ce[dr]||(or[dr]=te);this._previousActiveHandlers=Ce,(Object.keys(or).length||Sa(pe))&&(this._changes.push([pe,He,or]),this._triggerRenderFrame()),(Object.keys(Ce).length||Sa(pe))&&this._map._stop(!0),this._updatingCamera=!1;var ur=pe.cameraAnimation;ur&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ur(this._map))},va.prototype.mergeHandlerResult=function(K,ge,te,pe,He){if(te){e.extend(K,te);var Ce={handlerName:pe,originalEvent:te.originalEvent||He};te.zoomDelta!==void 0&&(ge.zoom=Ce),te.panDelta!==void 0&&(ge.drag=Ce),te.pitchDelta!==void 0&&(ge.pitch=Ce),te.bearingDelta!==void 0&&(ge.rotate=Ce)}},va.prototype._applyChanges=function(){for(var K={},ge={},te={},pe=0,He=this._changes;pe<He.length;pe+=1){var Ce=He[pe],Ke=Ce[0],pt=Ce[1],Ut=Ce[2];Ke.panDelta&&(K.panDelta=(K.panDelta||new e.Point(0,0))._add(Ke.panDelta)),Ke.zoomDelta&&(K.zoomDelta=(K.zoomDelta||0)+Ke.zoomDelta),Ke.bearingDelta&&(K.bearingDelta=(K.bearingDelta||0)+Ke.bearingDelta),Ke.pitchDelta&&(K.pitchDelta=(K.pitchDelta||0)+Ke.pitchDelta),Ke.around!==void 0&&(K.around=Ke.around),Ke.pinchAround!==void 0&&(K.pinchAround=Ke.pinchAround),Ke.noInertia&&(K.noInertia=Ke.noInertia),e.extend(ge,pt),e.extend(te,Ut)}this._updateMapTransform(K,ge,te),this._changes=[]},va.prototype._updateMapTransform=function(K,ge,te){var pe=this._map,He=pe.transform;if(!Sa(K))return this._fireEvents(ge,te,!0);var Ce=K.panDelta,Ke=K.zoomDelta,pt=K.bearingDelta,Ut=K.pitchDelta,Tr=K.around,Ur=K.pinchAround;Ur!==void 0&&(Tr=Ur),pe._stop(!0),Tr=Tr||pe.transform.centerPoint;var vr=He.pointLocation(Ce?Tr.sub(Ce):Tr);pt&&(He.bearing+=pt),Ut&&(He.pitch+=Ut),Ke&&(He.zoom+=Ke),He.setLocationAtPoint(vr,Tr),this._map._update(),K.noInertia||this._inertia.record(K),this._fireEvents(ge,te,!0)},va.prototype._fireEvents=function(K,ge,te){var pe=this,He=ia(this._eventsInProgress),Ce=ia(K),Ke={};for(var pt in K){var Ut=K[pt],Tr=Ut.originalEvent;this._eventsInProgress[pt]||(Ke[pt+"start"]=Tr),this._eventsInProgress[pt]=K[pt]}!He&&Ce&&this._fireEvent("movestart",Ce.originalEvent);for(var Ur in Ke)this._fireEvent(Ur,Ke[Ur]);Ce&&this._fireEvent("move",Ce.originalEvent);for(var vr in K){var mt=K[vr],Et=mt.originalEvent;this._fireEvent(vr,Et)}var Bt={},or;for(var dr in this._eventsInProgress){var ur=this._eventsInProgress[dr],pr=ur.handlerName,cr=ur.originalEvent;this._handlersById[pr].isActive()||(delete this._eventsInProgress[dr],or=ge[pr]||cr,Bt[dr+"end"]=or)}for(var Gt in Bt)this._fireEvent(Gt,Bt[Gt]);var lr=ia(this._eventsInProgress);if(te&&(He||Ce)&&!lr){this._updatingCamera=!0;var qt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),zr=function($r){return $r!==0&&-pe._bearingSnap<$r&&$r<pe._bearingSnap};qt?(zr(qt.bearing||this._map.getBearing())&&(qt.bearing=0),this._map.easeTo(qt,{originalEvent:or})):(this._map.fire(new e.Event("moveend",{originalEvent:or})),zr(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},va.prototype._fireEvent=function(K,ge){this._map.fire(new e.Event(K,ge?{originalEvent:ge}:{}))},va.prototype._requestFrame=function(){var K=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(ge){delete K._frameId,K.handleEvent(new ka("renderFrame",{timeStamp:ge})),K._applyChanges()})},va.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var Fn=function(ve){function K(ge,te){ve.call(this),this._moving=!1,this._zooming=!1,this.transform=ge,this._bearingSnap=te.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.getCenter=function(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)},K.prototype.setCenter=function(te,pe){return this.jumpTo({center:te},pe)},K.prototype.panBy=function(te,pe,He){return te=e.Point.convert(te).mult(-1),this.panTo(this.transform.center,e.extend({offset:te},pe),He)},K.prototype.panTo=function(te,pe,He){return this.easeTo(e.extend({center:te},pe),He)},K.prototype.getZoom=function(){return this.transform.zoom},K.prototype.setZoom=function(te,pe){return this.jumpTo({zoom:te},pe),this},K.prototype.zoomTo=function(te,pe,He){return this.easeTo(e.extend({zoom:te},pe),He)},K.prototype.zoomIn=function(te,pe){return this.zoomTo(this.getZoom()+1,te,pe),this},K.prototype.zoomOut=function(te,pe){return this.zoomTo(this.getZoom()-1,te,pe),this},K.prototype.getBearing=function(){return this.transform.bearing},K.prototype.setBearing=function(te,pe){return this.jumpTo({bearing:te},pe),this},K.prototype.getPadding=function(){return this.transform.padding},K.prototype.setPadding=function(te,pe){return this.jumpTo({padding:te},pe),this},K.prototype.rotateTo=function(te,pe,He){return this.easeTo(e.extend({bearing:te},pe),He)},K.prototype.resetNorth=function(te,pe){return this.rotateTo(0,e.extend({duration:1e3},te),pe),this},K.prototype.resetNorthPitch=function(te,pe){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},te),pe),this},K.prototype.snapToNorth=function(te,pe){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(te,pe):this},K.prototype.getPitch=function(){return this.transform.pitch},K.prototype.setPitch=function(te,pe){return this.jumpTo({pitch:te},pe),this},K.prototype.cameraForBounds=function(te,pe){te=e.LngLatBounds.convert(te);var He=pe&&pe.bearing||0;return this._cameraForBoxAndBearing(te.getNorthWest(),te.getSouthEast(),He,pe)},K.prototype._cameraForBoxAndBearing=function(te,pe,He,Ce){var Ke={top:0,bottom:0,right:0,left:0};if(Ce=e.extend({padding:Ke,offset:[0,0],maxZoom:this.transform.maxZoom},Ce),typeof Ce.padding=="number"){var pt=Ce.padding;Ce.padding={top:pt,bottom:pt,right:pt,left:pt}}Ce.padding=e.extend(Ke,Ce.padding);var Ut=this.transform,Tr=Ut.padding,Ur=Ut.project(e.LngLat.convert(te)),vr=Ut.project(e.LngLat.convert(pe)),mt=Ur.rotate(-He*Math.PI/180),Et=vr.rotate(-He*Math.PI/180),Bt=new e.Point(Math.max(mt.x,Et.x),Math.max(mt.y,Et.y)),or=new e.Point(Math.min(mt.x,Et.x),Math.min(mt.y,Et.y)),dr=Bt.sub(or),ur=(Ut.width-(Tr.left+Tr.right+Ce.padding.left+Ce.padding.right))/dr.x,pr=(Ut.height-(Tr.top+Tr.bottom+Ce.padding.top+Ce.padding.bottom))/dr.y;if(pr<0||ur<0){e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var cr=Math.min(Ut.scaleZoom(Ut.scale*Math.min(ur,pr)),Ce.maxZoom),Gt=typeof Ce.offset.x=="number"?new e.Point(Ce.offset.x,Ce.offset.y):e.Point.convert(Ce.offset),lr=(Ce.padding.left-Ce.padding.right)/2,qt=(Ce.padding.top-Ce.padding.bottom)/2,zr=new e.Point(lr,qt),$r=zr.rotate(He*Math.PI/180),Ai=Gt.add($r),wa=Ai.mult(Ut.scale/Ut.zoomScale(cr)),Ji=Ut.unproject(Ur.add(vr).div(2).sub(wa));return{center:Ji,zoom:cr,bearing:He}},K.prototype.fitBounds=function(te,pe,He){return this._fitInternal(this.cameraForBounds(te,pe),pe,He)},K.prototype.fitScreenCoordinates=function(te,pe,He,Ce,Ke){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(te)),this.transform.pointLocation(e.Point.convert(pe)),He,Ce),Ce,Ke)},K.prototype._fitInternal=function(te,pe,He){return te?(pe=e.extend(te,pe),delete pe.padding,pe.linear?this.easeTo(pe,He):this.flyTo(pe,He)):this},K.prototype.jumpTo=function(te,pe){this.stop();var He=this.transform,Ce=!1,Ke=!1,pt=!1;return"zoom"in te&&He.zoom!==+te.zoom&&(Ce=!0,He.zoom=+te.zoom),te.center!==void 0&&(He.center=e.LngLat.convert(te.center)),"bearing"in te&&He.bearing!==+te.bearing&&(Ke=!0,He.bearing=+te.bearing),"pitch"in te&&He.pitch!==+te.pitch&&(pt=!0,He.pitch=+te.pitch),te.padding!=null&&!He.isPaddingEqual(te.padding)&&(He.padding=te.padding),this.fire(new e.Event("movestart",pe)).fire(new e.Event("move",pe)),Ce&&this.fire(new e.Event("zoomstart",pe)).fire(new e.Event("zoom",pe)).fire(new e.Event("zoomend",pe)),Ke&&this.fire(new e.Event("rotatestart",pe)).fire(new e.Event("rotate",pe)).fire(new e.Event("rotateend",pe)),pt&&this.fire(new e.Event("pitchstart",pe)).fire(new e.Event("pitch",pe)).fire(new e.Event("pitchend",pe)),this.fire(new e.Event("moveend",pe))},K.prototype.easeTo=function(te,pe){var He=this;this._stop(!1,te.easeId),te=e.extend({offset:[0,0],duration:500,easing:e.ease},te),(te.animate===!1||!te.essential&&e.browser.prefersReducedMotion)&&(te.duration=0);var Ce=this.transform,Ke=this.getZoom(),pt=this.getBearing(),Ut=this.getPitch(),Tr=this.getPadding(),Ur="zoom"in te?+te.zoom:Ke,vr="bearing"in te?this._normalizeBearing(te.bearing,pt):pt,mt="pitch"in te?+te.pitch:Ut,Et="padding"in te?te.padding:Ce.padding,Bt=e.Point.convert(te.offset),or=Ce.centerPoint.add(Bt),dr=Ce.pointLocation(or),ur=e.LngLat.convert(te.center||dr);this._normalizeCenter(ur);var pr=Ce.project(dr),cr=Ce.project(ur).sub(pr),Gt=Ce.zoomScale(Ur-Ke),lr,qt;te.around&&(lr=e.LngLat.convert(te.around),qt=Ce.locationPoint(lr));var zr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Ur!==Ke,this._rotating=this._rotating||pt!==vr,this._pitching=this._pitching||mt!==Ut,this._padding=!Ce.isPaddingEqual(Et),this._easeId=te.easeId,this._prepareEase(pe,te.noMoveStart,zr),this._ease(function($r){if(He._zooming&&(Ce.zoom=e.number(Ke,Ur,$r)),He._rotating&&(Ce.bearing=e.number(pt,vr,$r)),He._pitching&&(Ce.pitch=e.number(Ut,mt,$r)),He._padding&&(Ce.interpolatePadding(Tr,Et,$r),or=Ce.centerPoint.add(Bt)),lr)Ce.setLocationAtPoint(lr,qt);else{var Ai=Ce.zoomScale(Ce.zoom-Ke),wa=Ur>Ke?Math.min(2,Gt):Math.max(.5,Gt),Ji=Math.pow(wa,1-$r),fa=Ce.unproject(pr.add(cr.mult($r*Ji)).mult(Ai));Ce.setLocationAtPoint(Ce.renderWorldCopies?fa.wrap():fa,or)}He._fireMoveEvents(pe)},function($r){He._afterEase(pe,$r)},te),this},K.prototype._prepareEase=function(te,pe,He){He===void 0&&(He={}),this._moving=!0,!pe&&!He.moving&&this.fire(new e.Event("movestart",te)),this._zooming&&!He.zooming&&this.fire(new e.Event("zoomstart",te)),this._rotating&&!He.rotating&&this.fire(new e.Event("rotatestart",te)),this._pitching&&!He.pitching&&this.fire(new e.Event("pitchstart",te))},K.prototype._fireMoveEvents=function(te){this.fire(new e.Event("move",te)),this._zooming&&this.fire(new e.Event("zoom",te)),this._rotating&&this.fire(new e.Event("rotate",te)),this._pitching&&this.fire(new e.Event("pitch",te))},K.prototype._afterEase=function(te,pe){if(!(this._easeId&&pe&&this._easeId===pe)){delete this._easeId;var He=this._zooming,Ce=this._rotating,Ke=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,He&&this.fire(new e.Event("zoomend",te)),Ce&&this.fire(new e.Event("rotateend",te)),Ke&&this.fire(new e.Event("pitchend",te)),this.fire(new e.Event("moveend",te))}},K.prototype.flyTo=function(te,pe){var He=this;if(!te.essential&&e.browser.prefersReducedMotion){var Ce=e.pick(te,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ce,pe)}this.stop(),te=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},te);var Ke=this.transform,pt=this.getZoom(),Ut=this.getBearing(),Tr=this.getPitch(),Ur=this.getPadding(),vr="zoom"in te?e.clamp(+te.zoom,Ke.minZoom,Ke.maxZoom):pt,mt="bearing"in te?this._normalizeBearing(te.bearing,Ut):Ut,Et="pitch"in te?+te.pitch:Tr,Bt="padding"in te?te.padding:Ke.padding,or=Ke.zoomScale(vr-pt),dr=e.Point.convert(te.offset),ur=Ke.centerPoint.add(dr),pr=Ke.pointLocation(ur),cr=e.LngLat.convert(te.center||pr);this._normalizeCenter(cr);var Gt=Ke.project(pr),lr=Ke.project(cr).sub(Gt),qt=te.curve,zr=Math.max(Ke.width,Ke.height),$r=zr/or,Ai=lr.mag();if("minZoom"in te){var wa=e.clamp(Math.min(te.minZoom,pt,vr),Ke.minZoom,Ke.maxZoom),Ji=zr/Ke.zoomScale(wa-pt);qt=Math.sqrt(Ji/Ai*2)}var fa=qt*qt;function sn(ts){var Vs=($r*$r-zr*zr+(ts?-1:1)*fa*fa*Ai*Ai)/(2*(ts?$r:zr)*fa*Ai);return Math.log(Math.sqrt(Vs*Vs+1)-Vs)}function Ga(ts){return(Math.exp(ts)-Math.exp(-ts))/2}function ma(ts){return(Math.exp(ts)+Math.exp(-ts))/2}function Ma(ts){return Ga(ts)/ma(ts)}var Pa=sn(0),Ka=function(ts){return ma(Pa)/ma(Pa+qt*ts)},Sn=function(ts){return zr*((ma(Pa)*Ma(Pa+qt*ts)-Ga(Pa))/fa)/Ai},No=(sn(1)-Pa)/qt;if(Math.abs(Ai)<1e-6||!isFinite(No)){if(Math.abs(zr-$r)<1e-6)return this.easeTo(te,pe);var os=$r<zr?-1:1;No=Math.abs(Math.log($r/zr))/qt,Sn=function(){return 0},Ka=function(ts){return Math.exp(os*qt*ts)}}if("duration"in te)te.duration=+te.duration;else{var Xs="screenSpeed"in te?+te.screenSpeed/qt:+te.speed;te.duration=1e3*No/Xs}return te.maxDuration&&te.duration>te.maxDuration&&(te.duration=0),this._zooming=!0,this._rotating=Ut!==mt,this._pitching=Et!==Tr,this._padding=!Ke.isPaddingEqual(Bt),this._prepareEase(pe,!1),this._ease(function(ts){var Vs=ts*No,ll=1/Ka(Vs);Ke.zoom=ts===1?vr:pt+Ke.scaleZoom(ll),He._rotating&&(Ke.bearing=e.number(Ut,mt,ts)),He._pitching&&(Ke.pitch=e.number(Tr,Et,ts)),He._padding&&(Ke.interpolatePadding(Ur,Bt,ts),ur=Ke.centerPoint.add(dr));var Mu=ts===1?cr:Ke.unproject(Gt.add(lr.mult(Sn(Vs))).mult(ll));Ke.setLocationAtPoint(Ke.renderWorldCopies?Mu.wrap():Mu,ur),He._fireMoveEvents(pe)},function(){return He._afterEase(pe)},te),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(te,pe){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var He=this._onEaseEnd;delete this._onEaseEnd,He.call(this,pe)}if(!te){var Ce=this.handlers;Ce&&Ce.stop(!1)}return this},K.prototype._ease=function(te,pe,He){He.animate===!1||He.duration===0?(te(1),pe()):(this._easeStart=e.browser.now(),this._easeOptions=He,this._onEaseFrame=te,this._onEaseEnd=pe,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var te=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(te)),te<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(te,pe){te=e.wrap(te,-180,180);var He=Math.abs(te-pe);return Math.abs(te-360-pe)<He&&(te-=360),Math.abs(te+360-pe)<He&&(te+=360),te},K.prototype._normalizeCenter=function(te){var pe=this.transform;if(!(!pe.renderWorldCopies||pe.lngRange)){var He=te.lng-pe.center.lng;te.lng+=He>180?-360:He<-180?360:0}},K}(e.Evented),Ha=function(K){K===void 0&&(K={}),this.options=K,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Ha.prototype.getDefaultPosition=function(){return"bottom-right"},Ha.prototype.onAdd=function(K){var ge=this.options&&this.options.compact;return this._map=K,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ge&&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),ge===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ha.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Ha.prototype._setElementTitle=function(K,ge){var te=this._map._getUIString("AttributionControl."+ge);K.title=te,K.setAttribute("aria-label",te)},Ha.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"))},Ha.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ge=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(K){var te=ge.reduce(function(pe,He,Ce){return He.value&&(pe+=He.key+"="+He.value+(Ce<ge.length-1?"&":"")),pe},"?");K.href=e.config.FEEDBACK_URL+"/"+te+(this._map._hash?this._map._hash.getHashString(!0):""),K.rel="noopener nofollow",this._setElementTitle(K,"MapFeedback")}},Ha.prototype._updateData=function(K){K&&(K.sourceDataType==="metadata"||K.sourceDataType==="visibility"||K.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},Ha.prototype._updateAttributions=function(){if(this._map.style){var K=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?K=K.concat(this.options.customAttribution.map(function(pt){return typeof pt!="string"?"":pt})):typeof this.options.customAttribution=="string"&&K.push(this.options.customAttribution)),this._map.style.stylesheet){var ge=this._map.style.stylesheet;this.styleOwner=ge.owner,this.styleId=ge.id}var te=this._map.style.sourceCaches;for(var pe in te){var He=te[pe];if(He.used){var Ce=He.getSource();Ce.attribution&&K.indexOf(Ce.attribution)<0&&K.push(Ce.attribution)}}K.sort(function(pt,Ut){return pt.length-Ut.length}),K=K.filter(function(pt,Ut){for(var Tr=Ut+1;Tr<K.length;Tr++)if(K[Tr].indexOf(pt)>=0)return!1;return!0});var Ke=K.join(" | ");Ke!==this._attribHTML&&(this._attribHTML=Ke,K.length?(this._innerContainer.innerHTML=Ke,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ha.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Da=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Da.prototype.onAdd=function(K){this._map=K,this._container=r.create("div","mapboxgl-ctrl");var ge=r.create("a","mapboxgl-ctrl-logo");return ge.target="_blank",ge.rel="noopener nofollow",ge.href="https://www.mapbox.com/",ge.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ge.setAttribute("rel","noopener nofollow"),this._container.appendChild(ge),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Da.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Da.prototype.getDefaultPosition=function(){return"bottom-left"},Da.prototype._updateLogo=function(K){(!K||K.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Da.prototype._logoRequired=function(){if(this._map.style){var K=this._map.style.sourceCaches;for(var ge in K){var te=K[ge].getSource();if(te.mapbox_logo)return!0}return!1}},Da.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var ge=K[0];this._map.getCanvasContainer().offsetWidth<250?ge.classList.add("mapboxgl-compact"):ge.classList.remove("mapboxgl-compact")}};var Xi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Xi.prototype.add=function(K){var ge=++this._id,te=this._queue;return te.push({callback:K,id:ge,cancelled:!1}),ge},Xi.prototype.remove=function(K){for(var ge=this._currentlyRunning,te=ge?this._queue.concat(ge):this._queue,pe=0,He=te;pe<He.length;pe+=1){var Ce=He[pe];if(Ce.id===K){Ce.cancelled=!0;return}}},Xi.prototype.run=function(K){K===void 0&&(K=0);var ge=this._currentlyRunning=this._queue;this._queue=[];for(var te=0,pe=ge;te<pe.length;te+=1){var He=pe[te];if(!He.cancelled&&(He.callback(K),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Xi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var ei={"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"},zi=e.window.HTMLImageElement,la=e.window.HTMLElement,ba=e.window.ImageBitmap,$i=-2,Xa=22,Oa=0,kn=60,Qi={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:$i,maxZoom:Xa,minPitch:Oa,maxPitch:kn,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},Yi=function(ve){function K(te){var pe=this;if(te=e.extend({},Qi,te),te.minZoom!=null&&te.maxZoom!=null&&te.minZoom>te.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(te.minPitch!=null&&te.maxPitch!=null&&te.minPitch>te.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(te.minPitch!=null&&te.minPitch<Oa)throw new Error("minPitch must be greater than or equal to "+Oa);if(te.maxPitch!=null&&te.maxPitch>kn)throw new Error("maxPitch must be less than or equal to "+kn);var He=new ms(te.minZoom,te.maxZoom,te.minPitch,te.maxPitch,te.renderWorldCopies);if(ve.call(this,He,te),this._interactive=te.interactive,this._maxTileCacheSize=te.maxTileCacheSize,this._failIfMajorPerformanceCaveat=te.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=te.preserveDrawingBuffer,this._antialias=te.antialias,this._trackResize=te.trackResize,this._bearingSnap=te.bearingSnap,this._refreshExpiredTiles=te.refreshExpiredTiles,this._fadeDuration=te.fadeDuration,this._crossSourceCollisions=te.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=te.collectResourceTiming,this._renderTaskQueue=new Xi,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},ei,te.locale),this._clickTolerance=te.clickTolerance,this._requestManager=new e.RequestManager(te.transformRequest,te.accessToken),typeof te.container=="string"){if(this._container=e.window.document.getElementById(te.container),!this._container)throw new Error("Container '"+te.container+"' not found.")}else if(te.container instanceof la)this._container=te.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(te.maxBounds&&this.setMaxBounds(te.maxBounds),e.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 pe._update(!1)}),this.on("moveend",function(){return pe._update(!1)}),this.on("zoom",function(){return pe._update(!0)}),typeof e.window<"u"&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new va(this,te);var Ce=typeof te.hash=="string"&&te.hash||void 0;this._hash=te.hash&&new uu(Ce).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:te.center,zoom:te.zoom,bearing:te.bearing,pitch:te.pitch}),te.bounds&&(this.resize(),this.fitBounds(te.bounds,e.extend({},te.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=te.localIdeographFontFamily,te.style&&this.setStyle(te.style,{localIdeographFontFamily:te.localIdeographFontFamily}),te.attributionControl&&this.addControl(new Ha({customAttribution:te.customAttribution})),this.addControl(new Da,te.logoPosition),this.on("style.load",function(){pe.transform.unmodified&&pe.jumpTo(pe.style.stylesheet)}),this.on("data",function(Ke){pe._update(Ke.dataType==="style"),pe.fire(new e.Event(Ke.dataType+"data",Ke))}),this.on("dataloading",function(Ke){pe.fire(new e.Event(Ke.dataType+"dataloading",Ke))})}ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K;var ge={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return K.prototype._getMapId=function(){return this._mapId},K.prototype.addControl=function(pe,He){if(He===void 0&&(pe.getDefaultPosition?He=pe.getDefaultPosition():He="top-right"),!pe||!pe.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Ce=pe.onAdd(this);this._controls.push(pe);var Ke=this._controlPositions[He];return He.indexOf("bottom")!==-1?Ke.insertBefore(Ce,Ke.firstChild):Ke.appendChild(Ce),this},K.prototype.removeControl=function(pe){if(!pe||!pe.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var He=this._controls.indexOf(pe);return He>-1&&this._controls.splice(He,1),pe.onRemove(this),this},K.prototype.hasControl=function(pe){return this._controls.indexOf(pe)>-1},K.prototype.resize=function(pe){var He=this._containerDimensions(),Ce=He[0],Ke=He[1];this._resizeCanvas(Ce,Ke),this.transform.resize(Ce,Ke),this.painter.resize(Ce,Ke);var pt=!this._moving;return pt&&(this.stop(),this.fire(new e.Event("movestart",pe)).fire(new e.Event("move",pe))),this.fire(new e.Event("resize",pe)),pt&&this.fire(new e.Event("moveend",pe)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(pe){return this.transform.setMaxBounds(e.LngLatBounds.convert(pe)),this._update()},K.prototype.setMinZoom=function(pe){if(pe=pe??$i,pe>=$i&&pe<=this.transform.maxZoom)return this.transform.minZoom=pe,this._update(),this.getZoom()<pe&&this.setZoom(pe),this;throw new Error("minZoom must be between "+$i+" and the current maxZoom, inclusive")},K.prototype.getMinZoom=function(){return this.transform.minZoom},K.prototype.setMaxZoom=function(pe){if(pe=pe??Xa,pe>=this.transform.minZoom)return this.transform.maxZoom=pe,this._update(),this.getZoom()>pe&&this.setZoom(pe),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(pe){if(pe=pe??Oa,pe<Oa)throw new Error("minPitch must be greater than or equal to "+Oa);if(pe>=Oa&&pe<=this.transform.maxPitch)return this.transform.minPitch=pe,this._update(),this.getPitch()<pe&&this.setPitch(pe),this;throw new Error("minPitch must be between "+Oa+" and the current maxPitch, inclusive")},K.prototype.getMinPitch=function(){return this.transform.minPitch},K.prototype.setMaxPitch=function(pe){if(pe=pe??kn,pe>kn)throw new Error("maxPitch must be less than or equal to "+kn);if(pe>=this.transform.minPitch)return this.transform.maxPitch=pe,this._update(),this.getPitch()>pe&&this.setPitch(pe),this;throw new Error("maxPitch must be greater than the current minPitch")},K.prototype.getMaxPitch=function(){return this.transform.maxPitch},K.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},K.prototype.setRenderWorldCopies=function(pe){return this.transform.renderWorldCopies=pe,this._update()},K.prototype.project=function(pe){return this.transform.locationPoint(e.LngLat.convert(pe))},K.prototype.unproject=function(pe){return this.transform.pointLocation(e.Point.convert(pe))},K.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},K.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},K.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},K.prototype._createDelegatedListener=function(pe,He,Ce){var Ke=this,pt;if(pe==="mouseenter"||pe==="mouseover"){var Ut=!1,Tr=function(or){var dr=Ke.getLayer(He)?Ke.queryRenderedFeatures(or.point,{layers:[He]}):[];dr.length?Ut||(Ut=!0,Ce.call(Ke,new Fe(pe,Ke,or.originalEvent,{features:dr}))):Ut=!1},Ur=function(){Ut=!1};return{layer:He,listener:Ce,delegates:{mousemove:Tr,mouseout:Ur}}}else if(pe==="mouseleave"||pe==="mouseout"){var vr=!1,mt=function(or){var dr=Ke.getLayer(He)?Ke.queryRenderedFeatures(or.point,{layers:[He]}):[];dr.length?vr=!0:vr&&(vr=!1,Ce.call(Ke,new Fe(pe,Ke,or.originalEvent)))},Et=function(or){vr&&(vr=!1,Ce.call(Ke,new Fe(pe,Ke,or.originalEvent)))};return{layer:He,listener:Ce,delegates:{mousemove:mt,mouseout:Et}}}else{var Bt=function(or){var dr=Ke.getLayer(He)?Ke.queryRenderedFeatures(or.point,{layers:[He]}):[];dr.length&&(or.features=dr,Ce.call(Ke,or),delete or.features)};return{layer:He,listener:Ce,delegates:(pt={},pt[pe]=Bt,pt)}}},K.prototype.on=function(pe,He,Ce){if(Ce===void 0)return ve.prototype.on.call(this,pe,He);var Ke=this._createDelegatedListener(pe,He,Ce);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[pe]=this._delegatedListeners[pe]||[],this._delegatedListeners[pe].push(Ke);for(var pt in Ke.delegates)this.on(pt,Ke.delegates[pt]);return this},K.prototype.once=function(pe,He,Ce){if(Ce===void 0)return ve.prototype.once.call(this,pe,He);var Ke=this._createDelegatedListener(pe,He,Ce);for(var pt in Ke.delegates)this.once(pt,Ke.delegates[pt]);return this},K.prototype.off=function(pe,He,Ce){var Ke=this;if(Ce===void 0)return ve.prototype.off.call(this,pe,He);var pt=function(Ut){for(var Tr=Ut[pe],Ur=0;Ur<Tr.length;Ur++){var vr=Tr[Ur];if(vr.layer===He&&vr.listener===Ce){for(var mt in vr.delegates)Ke.off(mt,vr.delegates[mt]);return Tr.splice(Ur,1),Ke}}};return this._delegatedListeners&&this._delegatedListeners[pe]&&pt(this._delegatedListeners),this},K.prototype.queryRenderedFeatures=function(pe,He){if(!this.style)return[];He===void 0&&pe!==void 0&&!(pe instanceof e.Point)&&!Array.isArray(pe)&&(He=pe,pe=void 0),He=He||{},pe=pe||[[0,0],[this.transform.width,this.transform.height]];var Ce;if(pe instanceof e.Point||typeof pe[0]=="number")Ce=[e.Point.convert(pe)];else{var Ke=e.Point.convert(pe[0]),pt=e.Point.convert(pe[1]);Ce=[Ke,new e.Point(pt.x,Ke.y),pt,new e.Point(Ke.x,pt.y),Ke]}return this.style.queryRenderedFeatures(Ce,He,this.transform)},K.prototype.querySourceFeatures=function(pe,He){return this.style.querySourceFeatures(pe,He)},K.prototype.setStyle=function(pe,He){return He=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},He),He.diff!==!1&&He.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&pe?(this._diffStyle(pe,He),this):(this._localIdeographFontFamily=He.localIdeographFontFamily,this._updateStyle(pe,He))},K.prototype._getUIString=function(pe){var He=this._locale[pe];if(He==null)throw new Error("Missing UI string '"+pe+"'");return He},K.prototype._updateStyle=function(pe,He){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),pe)this.style=new Zl(this,He||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof pe=="string"?this.style.loadURL(pe):this.style.loadJSON(pe),this},K.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Zl(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},K.prototype._diffStyle=function(pe,He){var Ce=this;if(typeof pe=="string"){var Ke=this._requestManager.normalizeStyleURL(pe),pt=this._requestManager.transformRequest(Ke,e.ResourceType.Style);e.getJSON(pt,function(Ut,Tr){Ut?Ce.fire(new e.ErrorEvent(Ut)):Tr&&Ce._updateDiff(Tr,He)})}else typeof pe=="object"&&this._updateDiff(pe,He)},K.prototype._updateDiff=function(pe,He){try{this.style.setState(pe)&&this._update(!0)}catch(Ce){e.warnOnce("Unable to perform style diff: "+(Ce.message||Ce.error||Ce)+". Rebuilding the style from scratch."),this._updateStyle(pe,He)}},K.prototype.getStyle=function(){if(this.style)return this.style.serialize()},K.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():e.warnOnce("There is no style added to the map.")},K.prototype.addSource=function(pe,He){return this._lazyInitEmptyStyle(),this.style.addSource(pe,He),this._update(!0)},K.prototype.isSourceLoaded=function(pe){var He=this.style&&this.style.sourceCaches[pe];if(He===void 0){this.fire(new e.ErrorEvent(new Error("There is no source with ID '"+pe+"'")));return}return He.loaded()},K.prototype.areTilesLoaded=function(){var pe=this.style&&this.style.sourceCaches;for(var He in pe){var Ce=pe[He],Ke=Ce._tiles;for(var pt in Ke){var Ut=Ke[pt];if(!(Ut.state==="loaded"||Ut.state==="errored"))return!1}}return!0},K.prototype.addSourceType=function(pe,He,Ce){return this._lazyInitEmptyStyle(),this.style.addSourceType(pe,He,Ce)},K.prototype.removeSource=function(pe){return this.style.removeSource(pe),this._update(!0)},K.prototype.getSource=function(pe){return this.style.getSource(pe)},K.prototype.addImage=function(pe,He,Ce){Ce===void 0&&(Ce={});var Ke=Ce.pixelRatio;Ke===void 0&&(Ke=1);var pt=Ce.sdf;pt===void 0&&(pt=!1);var Ut=Ce.stretchX,Tr=Ce.stretchY,Ur=Ce.content;this._lazyInitEmptyStyle();var vr=0;if(He instanceof zi||ba&&He instanceof ba){var mt=e.browser.getImageData(He),Et=mt.width,Bt=mt.height,or=mt.data;this.style.addImage(pe,{data:new e.RGBAImage({width:Et,height:Bt},or),pixelRatio:Ke,stretchX:Ut,stretchY:Tr,content:Ur,sdf:pt,version:vr})}else{if(He.width===void 0||He.height===void 0)return this.fire(new e.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 dr=He.width,ur=He.height,pr=He.data,cr=He;this.style.addImage(pe,{data:new e.RGBAImage({width:dr,height:ur},new Uint8Array(pr)),pixelRatio:Ke,stretchX:Ut,stretchY:Tr,content:Ur,sdf:pt,version:vr,userImage:cr}),cr.onAdd&&cr.onAdd(this,pe)}},K.prototype.updateImage=function(pe,He){var Ce=this.style.getImage(pe);if(!Ce)return this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var Ke=He instanceof zi||ba&&He instanceof ba?e.browser.getImageData(He):He,pt=Ke.width,Ut=Ke.height,Tr=Ke.data;if(pt===void 0||Ut===void 0)return this.fire(new e.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(pt!==Ce.data.width||Ut!==Ce.data.height)return this.fire(new e.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var Ur=!(He instanceof zi||ba&&He instanceof ba);Ce.data.replace(Tr,Ur),this.style.updateImage(pe,Ce)},K.prototype.hasImage=function(pe){return pe?!!this.style.getImage(pe):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)},K.prototype.removeImage=function(pe){this.style.removeImage(pe)},K.prototype.loadImage=function(pe,He){e.getImage(this._requestManager.transformRequest(pe,e.ResourceType.Image),He)},K.prototype.listImages=function(){return this.style.listImages()},K.prototype.addLayer=function(pe,He){return this._lazyInitEmptyStyle(),this.style.addLayer(pe,He),this._update(!0)},K.prototype.moveLayer=function(pe,He){return this.style.moveLayer(pe,He),this._update(!0)},K.prototype.removeLayer=function(pe){return this.style.removeLayer(pe),this._update(!0)},K.prototype.getLayer=function(pe){return this.style.getLayer(pe)},K.prototype.setLayerZoomRange=function(pe,He,Ce){return this.style.setLayerZoomRange(pe,He,Ce),this._update(!0)},K.prototype.setFilter=function(pe,He,Ce){return Ce===void 0&&(Ce={}),this.style.setFilter(pe,He,Ce),this._update(!0)},K.prototype.getFilter=function(pe){return this.style.getFilter(pe)},K.prototype.setPaintProperty=function(pe,He,Ce,Ke){return Ke===void 0&&(Ke={}),this.style.setPaintProperty(pe,He,Ce,Ke),this._update(!0)},K.prototype.getPaintProperty=function(pe,He){return this.style.getPaintProperty(pe,He)},K.prototype.setLayoutProperty=function(pe,He,Ce,Ke){return Ke===void 0&&(Ke={}),this.style.setLayoutProperty(pe,He,Ce,Ke),this._update(!0)},K.prototype.getLayoutProperty=function(pe,He){return this.style.getLayoutProperty(pe,He)},K.prototype.setLight=function(pe,He){return He===void 0&&(He={}),this._lazyInitEmptyStyle(),this.style.setLight(pe,He),this._update(!0)},K.prototype.getLight=function(){return this.style.getLight()},K.prototype.setFeatureState=function(pe,He){return this.style.setFeatureState(pe,He),this._update()},K.prototype.removeFeatureState=function(pe,He){return this.style.removeFeatureState(pe,He),this._update()},K.prototype.getFeatureState=function(pe){return this.style.getFeatureState(pe)},K.prototype.getContainer=function(){return this._container},K.prototype.getCanvasContainer=function(){return this._canvasContainer},K.prototype.getCanvas=function(){return this._canvas},K.prototype._containerDimensions=function(){var pe=0,He=0;return this._container&&(pe=this._container.clientWidth||400,He=this._container.clientHeight||300),[pe,He]},K.prototype._detectMissingCSS=function(){var pe=e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");pe!=="rgb(250, 128, 114)"&&e.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/.")},K.prototype._setupContainer=function(){var pe=this._container;pe.classList.add("mapboxgl-map");var He=this._missingCSSCanary=r.create("div","mapboxgl-canary",pe);He.style.visibility="hidden",this._detectMissingCSS();var Ce=this._canvasContainer=r.create("div","mapboxgl-canvas-container",pe);this._interactive&&Ce.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",Ce),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 Ke=this._containerDimensions();this._resizeCanvas(Ke[0],Ke[1]);var pt=this._controlContainer=r.create("div","mapboxgl-control-container",pe),Ut=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Tr){Ut[Tr]=r.create("div","mapboxgl-ctrl-"+Tr,pt)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},K.prototype._resizeCanvas=function(pe,He){var Ce=e.browser.devicePixelRatio||1;this._canvas.width=Ce*pe,this._canvas.height=Ce*He,this._canvas.style.width=pe+"px",this._canvas.style.height=He+"px"},K.prototype._setupPainter=function(){var pe=e.extend({},t.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),He=this._canvas.getContext("webgl",pe)||this._canvas.getContext("experimental-webgl",pe);if(!He){this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new ds(He,this.transform),e.webpSupported.testSupport(He)},K.prototype._contextLost=function(pe){pe.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:pe}))},K.prototype._contextRestored=function(pe){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:pe}))},K.prototype._onMapScroll=function(pe){if(pe.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},K.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},K.prototype._update=function(pe){return this.style?(this._styleDirty=this._styleDirty||pe,this._sourcesDirty=!0,this.triggerRepaint(),this):this},K.prototype._requestRenderFrame=function(pe){return this._update(),this._renderTaskQueue.add(pe)},K.prototype._cancelRenderFrame=function(pe){this._renderTaskQueue.remove(pe)},K.prototype._render=function(pe){var He=this,Ce,Ke=0,pt=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(Ce=pt.createQueryEXT(),pt.beginQueryEXT(pt.TIME_ELAPSED_EXT,Ce),Ke=e.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(pe),!this._removed){var Ut=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Tr=this.transform.zoom,Ur=e.browser.now();this.style.zoomHistory.update(Tr,Ur);var vr=new e.EvaluationParameters(Tr,{now:Ur,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),mt=vr.crossFadingFactor();(mt!==1||mt!==this._crossFadingFactor)&&(Ut=!0,this._crossFadingFactor=mt),this.style.update(vr)}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 e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.Event("load"))),this.style&&(this.style.hasTransitions()||Ut)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var Et=e.browser.now()-Ke;pt.endQueryEXT(pt.TIME_ELAPSED_EXT,Ce),setTimeout(function(){var dr=pt.getQueryObjectEXT(Ce,pt.QUERY_RESULT_EXT)/1e6;pt.deleteQueryEXT(Ce),He.fire(new e.Event("gpu-timing-frame",{cpuTime:Et,gpuTime:dr}))},50)}if(this.listens("gpu-timing-layer")){var Bt=this.painter.collectGpuTimers();setTimeout(function(){var dr=He.painter.queryGpuTimers(Bt);He.fire(new e.Event("gpu-timing-layer",{layerTimes:dr}))},50)}var or=this._sourcesDirty||this._styleDirty||this._placementDirty;return or||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.Event("idle")),this._loaded&&!this._fullyLoaded&&!or&&(this._fullyLoaded=!0),this}},K.prototype.remove=function(){this._hash&&this._hash.remove();for(var pe=0,He=this._controls;pe<He.length;pe+=1){var Ce=He[pe];Ce.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 e.window<"u"&&(e.window.removeEventListener("resize",this._onWindowResize,!1),e.window.removeEventListener("orientationchange",this._onWindowResize,!1),e.window.removeEventListener("online",this._onWindowOnline,!1));var Ke=this.painter.context.gl.getExtension("WEBGL_lose_context");Ke&&Ke.loseContext&&Ke.loseContext(),ln(this._canvasContainer),ln(this._controlContainer),ln(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new e.Event("remove"))},K.prototype.triggerRepaint=function(){var pe=this;this.style&&!this._frame&&(this._frame=e.browser.frame(function(He){pe._frame=null,pe._render(He)}))},K.prototype._onWindowOnline=function(){this._update()},K.prototype._onWindowResize=function(pe){this._trackResize&&this.resize({originalEvent:pe})._update()},ge.showTileBoundaries.get=function(){return!!this._showTileBoundaries},ge.showTileBoundaries.set=function(te){this._showTileBoundaries!==te&&(this._showTileBoundaries=te,this._update())},ge.showPadding.get=function(){return!!this._showPadding},ge.showPadding.set=function(te){this._showPadding!==te&&(this._showPadding=te,this._update())},ge.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},ge.showCollisionBoxes.set=function(te){this._showCollisionBoxes!==te&&(this._showCollisionBoxes=te,te?this.style._generateCollisionBoxes():this._update())},ge.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},ge.showOverdrawInspector.set=function(te){this._showOverdrawInspector!==te&&(this._showOverdrawInspector=te,this._update())},ge.repaint.get=function(){return!!this._repaint},ge.repaint.set=function(te){this._repaint!==te&&(this._repaint=te,this.triggerRepaint())},ge.vertices.get=function(){return!!this._vertices},ge.vertices.set=function(te){this._vertices=te,this._update()},K.prototype._setCacheLimits=function(pe,He){e.setCacheLimits(pe,He)},ge.version.get=function(){return e.version},Object.defineProperties(K.prototype,ge),K}(Fn);function ln(ve){ve.parentNode&&ve.parentNode.removeChild(ve)}var Va={showCompass:!0,showZoom:!0,visualizePitch:!1},La=function(K){var ge=this;this.options=e.extend({},Va,K),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(te){return te.preventDefault()}),this.options.showZoom&&(e.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(te){return ge._map.zoomIn({},{originalEvent:te})}),r.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(te){return ge._map.zoomOut({},{originalEvent:te})}),r.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(te){ge.options.visualizePitch?ge._map.resetNorthPitch({},{originalEvent:te}):ge._map.resetNorth({},{originalEvent:te})}),this._compassIcon=r.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};La.prototype._updateZoomButtons=function(){var K=this._map.getZoom(),ge=K===this._map.getMaxZoom(),te=K===this._map.getMinZoom();this._zoomInButton.disabled=ge,this._zoomOutButton.disabled=te,this._zoomInButton.setAttribute("aria-disabled",ge.toString()),this._zoomOutButton.setAttribute("aria-disabled",te.toString())},La.prototype._rotateCompassArrow=function(){var K=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=K},La.prototype.onAdd=function(K){return this._map=K,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 Ea(this._map,this._compass,this.options.visualizePitch)),this._container},La.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},La.prototype._createButton=function(K,ge){var te=r.create("button",K,this._container);return te.type="button",te.addEventListener("click",ge),te},La.prototype._setButtonTitle=function(K,ge){var te=this._map._getUIString("NavigationControl."+ge);K.title=te,K.setAttribute("aria-label",te)};var Ea=function(K,ge,te){te===void 0&&(te=!1),this._clickTolerance=10,this.element=ge,this.mouseRotate=new xn({clickTolerance:K.dragRotate._mouseRotate._clickTolerance}),this.map=K,te&&(this.mousePitch=new mn({clickTolerance:K.dragRotate._mousePitch._clickTolerance})),e.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),r.addEventListener(ge,"mousedown",this.mousedown),r.addEventListener(ge,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(ge,"touchmove",this.touchmove),r.addEventListener(ge,"touchend",this.touchend),r.addEventListener(ge,"touchcancel",this.reset)};Ea.prototype.down=function(K,ge){this.mouseRotate.mousedown(K,ge),this.mousePitch&&this.mousePitch.mousedown(K,ge),r.disableDrag()},Ea.prototype.move=function(K,ge){var te=this.map,pe=this.mouseRotate.mousemoveWindow(K,ge);if(pe&&pe.bearingDelta&&te.setBearing(te.getBearing()+pe.bearingDelta),this.mousePitch){var He=this.mousePitch.mousemoveWindow(K,ge);He&&He.pitchDelta&&te.setPitch(te.getPitch()+He.pitchDelta)}},Ea.prototype.off=function(){var K=this.element;r.removeEventListener(K,"mousedown",this.mousedown),r.removeEventListener(K,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(K,"touchmove",this.touchmove),r.removeEventListener(K,"touchend",this.touchend),r.removeEventListener(K,"touchcancel",this.reset),this.offTemp()},Ea.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(e.window,"mousemove",this.mousemove),r.removeEventListener(e.window,"mouseup",this.mouseup)},Ea.prototype.mousedown=function(K){this.down(e.extend({},K,{ctrlKey:!0,preventDefault:function(){return K.preventDefault()}}),r.mousePos(this.element,K)),r.addEventListener(e.window,"mousemove",this.mousemove),r.addEventListener(e.window,"mouseup",this.mouseup)},Ea.prototype.mousemove=function(K){this.move(K,r.mousePos(this.element,K))},Ea.prototype.mouseup=function(K){this.mouseRotate.mouseupWindow(K),this.mousePitch&&this.mousePitch.mouseupWindow(K),this.offTemp()},Ea.prototype.touchstart=function(K){K.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,K.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return K.preventDefault()}},this._startPos))},Ea.prototype.touchmove=function(K){K.targetTouches.length!==1?this.reset():(this._lastPos=r.touchPos(this.element,K.targetTouches)[0],this.move({preventDefault:function(){return K.preventDefault()}},this._lastPos))},Ea.prototype.touchend=function(K){K.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Ea.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function on(ve,K,ge){if(ve=new e.LngLat(ve.lng,ve.lat),K){var te=new e.LngLat(ve.lng-360,ve.lat),pe=new e.LngLat(ve.lng+360,ve.lat),He=ge.locationPoint(ve).distSqr(K);ge.locationPoint(te).distSqr(K)<He?ve=te:ge.locationPoint(pe).distSqr(K)<He&&(ve=pe)}for(;Math.abs(ve.lng-ge.center.lng)>180;){var Ce=ge.locationPoint(ve);if(Ce.x>=0&&Ce.y>=0&&Ce.x<=ge.width&&Ce.y<=ge.height)break;ve.lng>ge.center.lng?ve.lng-=360:ve.lng+=360}return ve}var Pn={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 Zn(ve,K,ge){var te=ve.classList;for(var pe in Pn)te.remove("mapboxgl-"+ge+"-anchor-"+pe);te.add("mapboxgl-"+ge+"-anchor-"+K)}var ja=function(ve){function K(ge,te){if(ve.call(this),(ge instanceof e.window.HTMLElement||te)&&(ge=e.extend({element:ge},te)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=ge&&ge.anchor||"center",this._color=ge&&ge.color||"#3FB1CE",this._scale=ge&&ge.scale||1,this._draggable=ge&&ge.draggable||!1,this._clickTolerance=ge&&ge.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=ge&&ge.rotation||0,this._rotationAlignment=ge&&ge.rotationAlignment||"auto",this._pitchAlignment=ge&&ge.pitchAlignment&&ge.pitchAlignment!=="auto"?ge.pitchAlignment:this._rotationAlignment,!ge||!ge.element){this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var pe=r.createNS("http://www.w3.org/2000/svg","svg"),He=41,Ce=27;pe.setAttributeNS(null,"display","block"),pe.setAttributeNS(null,"height",He+"px"),pe.setAttributeNS(null,"width",Ce+"px"),pe.setAttributeNS(null,"viewBox","0 0 "+Ce+" "+He);var Ke=r.createNS("http://www.w3.org/2000/svg","g");Ke.setAttributeNS(null,"stroke","none"),Ke.setAttributeNS(null,"stroke-width","1"),Ke.setAttributeNS(null,"fill","none"),Ke.setAttributeNS(null,"fill-rule","evenodd");var pt=r.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"fill-rule","nonzero");var Ut=r.createNS("http://www.w3.org/2000/svg","g");Ut.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ut.setAttributeNS(null,"fill","#000000");for(var Tr=[{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"}],Ur=0,vr=Tr;Ur<vr.length;Ur+=1){var mt=vr[Ur],Et=r.createNS("http://www.w3.org/2000/svg","ellipse");Et.setAttributeNS(null,"opacity","0.04"),Et.setAttributeNS(null,"cx","10.5"),Et.setAttributeNS(null,"cy","5.80029008"),Et.setAttributeNS(null,"rx",mt.rx),Et.setAttributeNS(null,"ry",mt.ry),Ut.appendChild(Et)}var Bt=r.createNS("http://www.w3.org/2000/svg","g");Bt.setAttributeNS(null,"fill",this._color);var or=r.createNS("http://www.w3.org/2000/svg","path");or.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"),Bt.appendChild(or);var dr=r.createNS("http://www.w3.org/2000/svg","g");dr.setAttributeNS(null,"opacity","0.25"),dr.setAttributeNS(null,"fill","#000000");var ur=r.createNS("http://www.w3.org/2000/svg","path");ur.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"),dr.appendChild(ur);var pr=r.createNS("http://www.w3.org/2000/svg","g");pr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),pr.setAttributeNS(null,"fill","#FFFFFF");var cr=r.createNS("http://www.w3.org/2000/svg","g");cr.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Gt=r.createNS("http://www.w3.org/2000/svg","circle");Gt.setAttributeNS(null,"fill","#000000"),Gt.setAttributeNS(null,"opacity","0.25"),Gt.setAttributeNS(null,"cx","5.5"),Gt.setAttributeNS(null,"cy","5.5"),Gt.setAttributeNS(null,"r","5.4999962");var lr=r.createNS("http://www.w3.org/2000/svg","circle");lr.setAttributeNS(null,"fill","#FFFFFF"),lr.setAttributeNS(null,"cx","5.5"),lr.setAttributeNS(null,"cy","5.5"),lr.setAttributeNS(null,"r","5.4999962"),cr.appendChild(Gt),cr.appendChild(lr),pt.appendChild(Ut),pt.appendChild(Bt),pt.appendChild(dr),pt.appendChild(pr),pt.appendChild(cr),pe.appendChild(pt),pe.setAttributeNS(null,"height",He*this._scale+"px"),pe.setAttributeNS(null,"width",Ce*this._scale+"px"),this._element.appendChild(pe),this._offset=e.Point.convert(ge&&ge.offset||[0,-14])}else this._element=ge.element,this._offset=e.Point.convert(ge&&ge.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(qt){qt.preventDefault()}),this._element.addEventListener("mousedown",function(qt){qt.preventDefault()}),Zn(this._element,this._anchor,"marker"),this._popup=null}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.addTo=function(te){return this.remove(),this._map=te,te.getCanvasContainer().appendChild(this._element),te.on("move",this._update),te.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},K.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(te){return this._lngLat=e.LngLat.convert(te),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},K.prototype.getElement=function(){return this._element},K.prototype.setPopup=function(te){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),te){if(!("offset"in te.options)){var pe=38.1,He=13.5,Ce=Math.sqrt(Math.pow(He,2)/2);te.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-pe],"bottom-left":[Ce,(pe-He+Ce)*-1],"bottom-right":[-Ce,(pe-He+Ce)*-1],left:[He,(pe-He)*-1],right:[-He,(pe-He)*-1]}:this._offset}this._popup=te,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},K.prototype._onKeyPress=function(te){var pe=te.code,He=te.charCode||te.keyCode;(pe==="Space"||pe==="Enter"||He===32||He===13)&&this.togglePopup()},K.prototype._onMapClick=function(te){var pe=te.originalEvent.target,He=this._element;this._popup&&(pe===He||He.contains(pe))&&this.togglePopup()},K.prototype.getPopup=function(){return this._popup},K.prototype.togglePopup=function(){var te=this._popup;if(te)te.isOpen()?te.remove():te.addTo(this._map);else return this;return this},K.prototype._update=function(te){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=on(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var pe="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?pe="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(pe="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var He="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?He="rotateX(0deg)":this._pitchAlignment==="map"&&(He="rotateX("+this._map.getPitch()+"deg)"),(!te||te.type==="moveend")&&(this._pos=this._pos.round()),r.setTransform(this._element,Pn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+He+" "+pe)}},K.prototype.getOffset=function(){return this._offset},K.prototype.setOffset=function(te){return this._offset=e.Point.convert(te),this._update(),this},K.prototype._onMove=function(te){if(!this._isDragging){var pe=this._clickTolerance||this._map._clickTolerance;this._isDragging=te.point.dist(this._pointerdownPos)>=pe}this._isDragging&&(this._pos=te.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 e.Event("dragstart"))),this.fire(new e.Event("drag")))},K.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 e.Event("dragend")),this._state="inactive"},K.prototype._addDragHandler=function(te){this._element.contains(te.originalEvent.target)&&(te.preventDefault(),this._positionDelta=te.point.sub(this._pos).add(this._offset),this._pointerdownPos=te.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))},K.prototype.setDraggable=function(te){return this._draggable=!!te,this._map&&(te?(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},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(te){return this._rotation=te||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(te){return this._rotationAlignment=te||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(te){return this._pitchAlignment=te&&te!=="auto"?te:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(e.Evented),gn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wn;function $n(ve){Wn!==void 0?ve(Wn):e.window.navigator.permissions!==void 0?e.window.navigator.permissions.query({name:"geolocation"}).then(function(K){Wn=K.state!=="denied",ve(Wn)}):(Wn=!!e.window.navigator.geolocation,ve(Wn))}var fo=0,Ks=!1,Rl=function(ve){function K(ge){ve.call(this),this.options=e.extend({},gn,ge),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(te){return this._map=te,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),$n(this._setupUI),this._container},K.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,fo=0,Ks=!1},K.prototype._isOutOfMapMaxBounds=function(te){var pe=this._map.getMaxBounds(),He=te.coords;return pe&&(He.longitude<pe.getWest()||He.longitude>pe.getEast()||He.latitude<pe.getSouth()||He.latitude>pe.getNorth())},K.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}},K.prototype._onSuccess=function(te){if(this._map){if(this._isOutOfMapMaxBounds(te)){this._setErrorState(),this.fire(new e.Event("outofmaxbounds",te)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=te,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(te),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(te),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",te)),this._finish()}},K.prototype._updateCamera=function(te){var pe=new e.LngLat(te.coords.longitude,te.coords.latitude),He=te.coords.accuracy,Ce=this._map.getBearing(),Ke=e.extend({bearing:Ce},this.options.fitBoundsOptions);this._map.fitBounds(pe.toBounds(He),Ke,{geolocateSource:!0})},K.prototype._updateMarker=function(te){if(te){var pe=new e.LngLat(te.coords.longitude,te.coords.latitude);this._accuracyCircleMarker.setLngLat(pe).addTo(this._map),this._userLocationDotMarker.setLngLat(pe).addTo(this._map),this._accuracy=te.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var te=this._map._container.clientHeight/2,pe=this._map.unproject([0,te]),He=this._map.unproject([1,te]),Ce=pe.distanceTo(He),Ke=Math.ceil(2*this._accuracy/Ce);this._circleElement.style.width=Ke+"px",this._circleElement.style.height=Ke+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(te){if(this._map){if(this.options.trackUserLocation)if(te.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 pe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=pe,this._geolocateButton.setAttribute("aria-label",pe),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(te.code===3&&Ks)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",te)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(te){var pe=this;if(this._container.addEventListener("contextmenu",function(Ke){return Ke.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",te===!1){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var He=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=He,this._geolocateButton.setAttribute("aria-label",He)}else{var Ce=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Ce,this._geolocateButton.setAttribute("aria-label",Ce)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new ja(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new ja({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(Ke){var pt=Ke.originalEvent&&Ke.originalEvent.type==="resize";!Ke.geolocateSource&&pe._watchState==="ACTIVE_LOCK"&&!pt&&(pe._watchState="BACKGROUND",pe._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),pe._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),pe.fire(new e.Event("trackuserlocationend")))})},K.prototype.trigger=function(){if(!this._setup)return e.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 e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":fo--,Ks=!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 e.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 e.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"),fo++;var te;fo>1?(te={maximumAge:6e5,timeout:0},Ks=!0):(te=this.options.positionOptions,Ks=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,te)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.prototype._clearWatch=function(){e.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)},K}(e.Evented),Ro={maxWidth:100,unit:"metric"},ru=function(K){this.options=e.extend({},Ro,K),e.bindAll(["_onMove","setUnit"],this)};ru.prototype.getDefaultPosition=function(){return"bottom-left"},ru.prototype._onMove=function(){Cs(this._map,this._container,this.options)},ru.prototype.onAdd=function(K){return this._map=K,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ru.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ru.prototype.setUnit=function(K){this.options.unit=K,Cs(this._map,this._container,this.options)};function Cs(ve,K,ge){var te=ge&&ge.maxWidth||100,pe=ve._container.clientHeight/2,He=ve.unproject([0,pe]),Ce=ve.unproject([te,pe]),Ke=He.distanceTo(Ce);if(ge&&ge.unit==="imperial"){var pt=3.2808*Ke;if(pt>5280){var Ut=pt/5280;Ol(K,te,Ut,ve._getUIString("ScaleControl.Miles"))}else Ol(K,te,pt,ve._getUIString("ScaleControl.Feet"))}else if(ge&&ge.unit==="nautical"){var Tr=Ke/1852;Ol(K,te,Tr,ve._getUIString("ScaleControl.NauticalMiles"))}else Ke>=1e3?Ol(K,te,Ke/1e3,ve._getUIString("ScaleControl.Kilometers")):Ol(K,te,Ke,ve._getUIString("ScaleControl.Meters"))}function Ol(ve,K,ge,te){var pe=cu(ge),He=pe/ge;ve.style.width=K*He+"px",ve.innerHTML=pe+" "+te}function Ul(ve){var K=Math.pow(10,Math.ceil(-Math.log(ve)/Math.LN10));return Math.round(ve*K)/K}function cu(ve){var K=Math.pow(10,(""+Math.floor(ve)).length-1),ge=ve/K;return ge=ge>=10?10:ge>=5?5:ge>=3?3:ge>=2?2:ge>=1?1:Ul(ge),K*ge}var il=function(K){this._fullscreen=!1,K&&K.container&&(K.container instanceof e.window.HTMLElement?this._container=K.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};il.prototype.onAdd=function(K){return this._map=K,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},il.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},il.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},il.prototype._setupUI=function(){var K=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",K).setAttribute("aria-hidden",!0),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},il.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},il.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},il.prototype._isFullscreen=function(){return this._fullscreen},il.prototype._changeIcon=function(){var K=e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement;K===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},il.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.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 El={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Dl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),ho=function(ve){function K(ge){ve.call(this),this.options=e.extend(Object.create(El),ge),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ve&&(K.__proto__=ve),K.prototype=Object.create(ve&&ve.prototype),K.prototype.constructor=K,K.prototype.addTo=function(te){return this._map&&this.remove(),this._map=te,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 e.Event("open")),this},K.prototype.isOpen=function(){return!!this._map},K.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(te){return this._lngLat=e.LngLat.convert(te),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},K.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},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(te){return this.setDOMContent(e.window.document.createTextNode(te))},K.prototype.setHTML=function(te){var pe=e.window.document.createDocumentFragment(),He=e.window.document.createElement("body"),Ce;for(He.innerHTML=te;Ce=He.firstChild,!!Ce;)pe.appendChild(Ce);return this.setDOMContent(pe)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(te){return this.options.maxWidth=te,this._update(),this},K.prototype.setDOMContent=function(te){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(te),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(te){this._container&&this._container.classList.add(te)},K.prototype.removeClassName=function(te){this._container&&this._container.classList.remove(te)},K.prototype.setOffset=function(te){return this.options.offset=te,this._update(),this},K.prototype.toggleClassName=function(te){if(this._container)return this._container.classList.toggle(te)},K.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},K.prototype._onMouseUp=function(te){this._update(te.point)},K.prototype._onMouseMove=function(te){this._update(te.point)},K.prototype._onDrag=function(te){this._update(te.point)},K.prototype._update=function(te){var pe=this,He=this._lngLat||this._trackPointer;if(!(!this._map||!He||!this._content)&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(mt){return pe._container.classList.add(mt)}),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=on(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!te))){var Ce=this._pos=this._trackPointer&&te?te:this._map.project(this._lngLat),Ke=this.options.anchor,pt=jl(this.options.offset);if(!Ke){var Ut=this._container.offsetWidth,Tr=this._container.offsetHeight,Ur;Ce.y+pt.bottom.y<Tr?Ur=["top"]:Ce.y>this._map.transform.height-Tr?Ur=["bottom"]:Ur=[],Ce.x<Ut/2?Ur.push("left"):Ce.x>this._map.transform.width-Ut/2&&Ur.push("right"),Ur.length===0?Ke="bottom":Ke=Ur.join("-")}var vr=Ce.add(pt[Ke]).round();r.setTransform(this._container,Pn[Ke]+" translate("+vr.x+"px,"+vr.y+"px)"),Zn(this._container,Ke,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var te=this._container.querySelector(Dl);te&&te.focus()}},K.prototype._onClose=function(){this.remove()},K}(e.Evented);function jl(ve){if(ve)if(typeof ve=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ve,2)));return{center:new e.Point(0,0),top:new e.Point(0,ve),"top-left":new e.Point(K,K),"top-right":new e.Point(-K,K),bottom:new e.Point(0,-ve),"bottom-left":new e.Point(K,-K),"bottom-right":new e.Point(-K,-K),left:new e.Point(ve,0),right:new e.Point(-ve,0)}}else if(ve instanceof e.Point||Array.isArray(ve)){var ge=e.Point.convert(ve);return{center:ge,top:ge,"top-left":ge,"top-right":ge,bottom:ge,"bottom-left":ge,"bottom-right":ge,left:ge,right:ge}}else return{center:e.Point.convert(ve.center||[0,0]),top:e.Point.convert(ve.top||[0,0]),"top-left":e.Point.convert(ve["top-left"]||[0,0]),"top-right":e.Point.convert(ve["top-right"]||[0,0]),bottom:e.Point.convert(ve.bottom||[0,0]),"bottom-left":e.Point.convert(ve["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(ve["bottom-right"]||[0,0]),left:e.Point.convert(ve.left||[0,0]),right:e.Point.convert(ve.right||[0,0])};else return jl(new e.Point(0,0))}var $o={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Yi,NavigationControl:La,GeolocateControl:Rl,AttributionControl:Ha,ScaleControl:ru,FullscreenControl:il,Popup:ho,Marker:ja,Style:Zl,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:_n,clearPrewarmedResources:En,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(ve){e.config.ACCESS_TOKEN=ve},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(ve){e.config.API_URL=ve},get workerCount(){return ca.workerCount},set workerCount(ve){ca.workerCount=ve},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ve){e.config.MAX_PARALLEL_IMAGE_REQUESTS=ve},clearStorage:function(K){e.clearTileCache(K)},workerUrl:""};return $o}),S})}}),VR=De({"src/plots/mapbox/layers.js"(Y,H){"use strict";var p=ui(),x=vu().sanitizeHTML,S=lA(),E=_p();function e(n,a){this.subplot=n,this.uid=n.uid+"-"+a,this.index=a,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(a){this.visible?this.needsNewImage(a)?this.updateImage(a):this.needsNewSource(a)?(this.removeLayer(),this.updateSource(a),this.updateLayer(a)):this.needsNewLayer(a)?this.updateLayer(a):this.updateStyle(a):(this.updateSource(a),this.updateLayer(a)),this.visible=r(a)},t.needsNewImage=function(n){var a=this.subplot.map;return a.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},t.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},t.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(n){var a=this.subplot.map;a.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapboxLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(n){var a=this.subplot.map;if(a.getSource(this.idSource)&&a.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!r(n)){var s=i(n);a.addSource(this.idSource,s)}},t.findFollowingMapboxLayerId=function(n){if(n==="traces")for(var a=this.subplot.getMapLayers(),s=0;s<a.length;s++){var h=a[s].id;if(typeof h=="string"&&h.indexOf(E.traceLayerPrefix)===0){n=h;break}}return n},t.updateLayer=function(n){var a=this.subplot,s=o(n),h=this.lookupBelow(),c=this.findFollowingMapboxLayerId(h);this.removeLayer(),r(n)&&a.addLayer({id:this.idLayer,source:this.idSource,"source-layer":n.sourcelayer||"",type:n.type,minzoom:n.minzoom,maxzoom:n.maxzoom,layout:s.layout,paint:s.paint},c),this.layerType=n.type,this.below=h},t.updateStyle=function(n){if(r(n)){var a=o(n);this.subplot.setOptions(this.idLayer,"setLayoutProperty",a.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",a.paint)}},t.removeLayer=function(){var n=this.subplot.map;n.getLayer(this.idLayer)&&n.removeLayer(this.idLayer)},t.dispose=function(){var n=this.subplot.map;n.getLayer(this.idLayer)&&n.removeLayer(this.idLayer),n.getSource(this.idSource)&&n.removeSource(this.idSource)};function r(n){if(!n.visible)return!1;var a=n.source;if(Array.isArray(a)&&a.length>0){for(var s=0;s<a.length;s++)if(typeof a[s]!="string"||a[s].length===0)return!1;return!0}return p.isPlainObject(a)||typeof a=="string"&&a.length>0}function o(n){var a={},s={};switch(n.type){case"circle":p.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":p.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":p.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var h=n.symbol,c=S(h.textposition,h.iconsize);p.extendFlat(a,{"icon-image":h.icon+"-15","icon-size":h.iconsize/10,"text-field":h.text,"text-size":h.textfont.size,"text-anchor":c.anchor,"text-offset":c.offset,"symbol-placement":h.placement}),p.extendFlat(s,{"icon-color":n.color,"text-color":h.textfont.color,"text-opacity":n.opacity});break;case"raster":p.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:a,paint:s}}function i(n){var a=n.sourcetype,s=n.source,h={type:a},c;return a==="geojson"?c="data":a==="vector"?c=typeof s=="string"?"url":"tiles":a==="raster"?(c="tiles",h.tileSize=256):a==="image"&&(c="url",h.coordinates=n.coordinates),h[c]=s,n.sourceattribution&&(h.attribution=x(n.sourceattribution)),h}H.exports=function(a,s,h){var c=new e(a,s);return c.update(h),c}}}),qR=De({"src/plots/mapbox/mapbox.js"(Y,H){"use strict";var p=uA(),x=ui(),S=s0(),E=Mo(),e=us(),t=Qh(),r=sf(),o=dv(),i=o.drawMode,n=o.selectMode,a=Af().prepSelect,s=Af().clearOutline,h=Af().clearSelectionsCache,c=Af().selectOnClick,m=_p(),d=VR();function T(g,b){this.id=b,this.gd=g;var v=g._fullLayout,u=g._context;this.container=v._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=v._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(v),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(g,b,v){var u=this,y=b[u.id];u.map&&y.accesstoken!==u.accessToken&&(u.map.remove(),u.map=null,u.styleObj=null,u.traceHash={},u.layerList=[]);var f;u.map?f=new Promise(function(R,L){u.updateMap(g,b,R,L)}):f=new Promise(function(R,L){u.createMap(g,b,R,L)}),v.push(f)},l.createMap=function(g,b,v,u){var y=this,f=b[y.id],R=y.styleObj=w(f.style,b);y.accessToken=f.accesstoken;var L=f.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=y.map=new p.Map({container:y.div,style:R.style,center:M(f.center),zoom:f.zoom,bearing:f.bearing,pitch:f.pitch,maxBounds:z,interactive:!y.isStatic,preserveDrawingBuffer:y.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new p.AttributionControl({compact:!0}));F._canvas.style.left="0px",F._canvas.style.top="0px",y.rejectOnError(u),y.isStatic||y.initFx(g,b);var N=[];N.push(new Promise(function(B){F.once("load",B)})),N=N.concat(S.fetchTraceGeoData(g)),Promise.all(N).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(v)}).catch(u)},l.updateMap=function(g,b,v,u){var y=this,f=y.map,R=b[this.id];y.rejectOnError(u);var L=[],z=w(R.style,b);JSON.stringify(y.styleObj)!==JSON.stringify(z)&&(y.styleObj=z,f.setStyle(z.style),y.traceHash={},L.push(new Promise(function(F){f.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(g)),Promise.all(L).then(function(){y.fillBelowLookup(g,b),y.updateData(g),y.updateLayout(b),y.resolveOnRender(v)}).catch(u)},l.fillBelowLookup=function(g,b){var v=b[this.id],u=v.layers,y,f,R=this.belowLookup={},L=!1;for(y=0;y<g.length;y++){var z=g[y][0].trace,F=z._module;typeof z.below=="string"?f=z.below:F.getBelow&&(f=F.getBelow(z,this)),f===""&&(L=!0),R["trace-"+z.uid]=f||""}for(y=0;y<u.length;y++){var N=u[y];typeof N.below=="string"?f=N.below:L?f="traces":f="",R["layout-"+y]=f}var B={},I,U;for(I in R)f=R[I],B[f]?B[f].push(I):B[f]=[I];for(f in B){var O=B[f];if(O.length>1)for(y=0;y<O.length;y++)I=O[y],I.indexOf("trace-")===0?(U=I.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):I.indexOf("layout-")===0&&(U=I.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var _={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};l.updateData=function(g){var b=this.traceHash,v,u,y,f,R=g.slice().sort(function(B,I){return _[B[0].trace.type]-_[I[0].trace.type]});for(y=0;y<R.length;y++){var L=R[y];u=L[0].trace,v=b[u.uid];var z=!1;v&&(v.type===u.type?(v.update(L),z=!0):v.dispose()),!z&&u._module&&(b[u.uid]=u._module.plot(this,L))}var F=Object.keys(b);e:for(y=0;y<F.length;y++){var N=F[y];for(f=0;f<g.length;f++)if(u=g[f][0].trace,N===u.uid)continue e;v=b[N],v.dispose(),delete b[N]}},l.updateLayout=function(g){var b=this.map,v=g[this.id];!this.dragging&&!this.wheeling&&(b.setCenter(M(v.center)),b.setZoom(v.zoom),b.setBearing(v.bearing),b.setPitch(v.pitch)),this.updateLayers(g),this.updateFramework(g),this.updateFx(g),this.map.resize(),this.gd._context._scrollZoom.mapbox?b.scrollZoom.enable():b.scrollZoom.disable()},l.resolveOnRender=function(g){var b=this.map;b.on("render",function v(){b.loaded()&&(b.off("render",v),setTimeout(g,10))})},l.rejectOnError=function(g){var b=this.map;function v(){g(new Error(m.mapOnErrorMsg))}b.once("error",v),b.once("style.error",v),b.once("source.error",v),b.once("tile.error",v),b.once("layer.error",v)},l.createFramework=function(g){var b=this,v=b.div=document.createElement("div");v.id=b.uid,v.style.position="absolute",b.container.appendChild(v),b.xaxis={_id:"x",c2p:function(u){return b.project(u).x}},b.yaxis={_id:"y",c2p:function(u){return b.project(u).y}},b.updateFramework(g),b.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(b.mockAxis,g)},l.initFx=function(g,b){var v=this,u=v.gd,y=v.map;y.on("moveend",function(L){if(v.map){var z=u._fullLayout;if(L.originalEvent||v.wheeling){var F=z[v.id];E.call("_storeDirectGUIEdit",u.layout,z._preGUI,v.getViewEdits(F));var N=v.getView();F._input.center=F.center=N.center,F._input.zoom=F.zoom=N.zoom,F._input.bearing=F.bearing=N.bearing,F._input.pitch=F.pitch=N.pitch,u.emit("plotly_relayout",v.getViewEditsWithDerived(N))}L.originalEvent&&L.originalEvent.type==="mouseup"?v.dragging=!1:v.wheeling&&(v.wheeling=!1),z._rehover&&z._rehover()}}),y.on("wheel",function(){v.wheeling=!0}),y.on("mousemove",function(L){var z=v.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},v.xaxis.p2c=function(){return y.unproject(F).lng},v.yaxis.p2c=function(){return y.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===v.id&&u._fullLayout[v.id]&&r.hover(u,L,v.id)},r.hover(u,L,v.id),u._fullLayout._hoversubplot=v.id});function f(){r.loneUnhover(b._hoverlayer)}y.on("dragstart",function(){v.dragging=!0,f()}),y.on("zoomstart",f),y.on("mouseout",function(){u._fullLayout._hoversubplot=null});function R(){var L=v.getView();u.emit("plotly_relayouting",v.getViewEditsWithDerived(L))}y.on("drag",R),y.on("zoom",R),y.on("dblclick",function(){var L=u._fullLayout[v.id];E.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,v.getViewEdits(L));var z=v.viewInitial;y.setCenter(M(z.center)),y.setZoom(z.zoom),y.setBearing(z.bearing),y.setPitch(z.pitch);var F=v.getView();L._input.center=L.center=F.center,L._input.zoom=L.zoom=F.zoom,L._input.bearing=L.bearing=F.bearing,L._input.pitch=L.pitch=F.pitch,u.emit("plotly_doubleclick",null),u.emit("plotly_relayout",v.getViewEditsWithDerived(F))}),v.clearOutline=function(){h(v.dragOptions),s(v.dragOptions.gd)},v.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&c(z.originalEvent,u,[v.xaxis],[v.yaxis],v.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(g){var b=this,v=b.map,u=b.gd;if(b.isStatic)return;function y(z){var F=b.map.unproject(z);return[F.lng,F.lat]}var f=g.dragmode,R;R=function(z,F){if(F.isRect){var N=z.range={};N[b.id]=[y([F.xmin,F.ymin]),y([F.xmax,F.ymax])]}else{var B=z.lassoPoints={};B[b.id]=F.map(y)}};var L=b.dragOptions;b.dragOptions=x.extendDeep(L||{},{dragmode:g.dragmode,element:b.div,gd:u,plotinfo:{id:b.id,domain:g[b.id].domain,xaxis:b.xaxis,yaxis:b.yaxis,fillRangeItems:R},xaxes:[b.xaxis],yaxes:[b.yaxis],subplot:b.id}),v.off("click",b.onClickInPanHandler),n(f)||i(f)?(v.dragPan.disable(),v.on("zoomstart",b.clearOutline),b.dragOptions.prepFn=function(z,F,N){a(z,F,N,b.dragOptions,f)},t.init(b.dragOptions)):(v.dragPan.enable(),v.off("zoomstart",b.clearOutline),b.div.onmousedown=null,b.div.ontouchstart=null,b.div.removeEventListener("touchstart",b.div._ontouchstart),b.onClickInPanHandler=b.onClickInPanFn(b.dragOptions),v.on("click",b.onClickInPanHandler))},l.updateFramework=function(g){var b=g[this.id].domain,v=g._size,u=this.div.style;u.width=v.w*(b.x[1]-b.x[0])+"px",u.height=v.h*(b.y[1]-b.y[0])+"px",u.left=v.l+b.x[0]*v.w+"px",u.top=v.t+(1-b.y[1])*v.h+"px",this.xaxis._offset=v.l+b.x[0]*v.w,this.xaxis._length=v.w*(b.x[1]-b.x[0]),this.yaxis._offset=v.t+(1-b.y[1])*v.h,this.yaxis._length=v.h*(b.y[1]-b.y[0])},l.updateLayers=function(g){var b=g[this.id],v=b.layers,u=this.layerList,y;if(v.length!==u.length){for(y=0;y<u.length;y++)u[y].dispose();for(u=this.layerList=[],y=0;y<v.length;y++)u.push(d(this,y,v[y]))}else for(y=0;y<v.length;y++)u[y].update(v[y])},l.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},l.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},l.setOptions=function(g,b,v){for(var u in v)this.map[b](g,u,v[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(g,b){var v=this.map;if(typeof b=="string"){if(b===""){v.addLayer(g,b);return}for(var u=this.getMapLayers(),y=0;y<u.length;y++)if(b===u[y].id){v.addLayer(g,b);return}x.warn(["Trying to add layer with *below* value",b,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}v.addLayer(g)},l.project=function(g){return this.map.project(new p.LngLat(g[0],g[1]))},l.getView=function(){var g=this.map,b=g.getCenter(),v=b.lng,u=b.lat,y={lon:v,lat:u},f=g.getCanvas(),R=parseInt(f.style.width),L=parseInt(f.style.height);return{center:y,zoom:g.getZoom(),bearing:g.getBearing(),pitch:g.getPitch(),_derived:{coordinates:[g.unproject([0,0]).toArray(),g.unproject([R,0]).toArray(),g.unproject([R,L]).toArray(),g.unproject([0,L]).toArray()]}}},l.getViewEdits=function(g){for(var b=this.id,v=["center","zoom","bearing","pitch"],u={},y=0;y<v.length;y++){var f=v[y];u[b+"."+f]=g[f]}return u},l.getViewEditsWithDerived=function(g){var b=this.id,v=this.getViewEdits(g);return v[b+"._derived"]=g._derived,v};function w(g,b){var v={};if(x.isPlainObject(g))v.id=g.id,v.style=g;else if(typeof g=="string")if(v.id=g,m.styleValuesMapbox.indexOf(g)!==-1)v.style=A(g);else if(m.stylesNonMapbox[g]){v.style=m.stylesNonMapbox[g];var u=v.style.sources["plotly-"+g],y=u?u.tiles:void 0;y&&y[0]&&y[0].slice(-9)==="?api_key="&&(y[0]+=b._mapboxAccessToken)}else v.style=g;else v.id=m.styleValueDflt,v.style=A(m.styleValueDflt);return v.transition={duration:0,delay:0},v}function A(g){return m.styleUrlPrefix+g+"-"+m.styleUrlSuffix}function M(g){return[g.lon,g.lat]}H.exports=T}}),HR=De({"src/plots/mapbox/layout_defaults.js"(Y,H){"use strict";var p=ui(),x=Kp(),S=Vh(),E=u1();H.exports=function(o,i,n){x(o,i,n,{type:"mapbox",attributes:E,handleDefaults:e,partition:"y",accessToken:i._mapboxAccessToken})};function e(r,o,i,n){i("accesstoken",n.accessToken),i("style"),i("center.lon"),i("center.lat"),i("zoom"),i("bearing"),i("pitch");var a=i("bounds.west"),s=i("bounds.east"),h=i("bounds.south"),c=i("bounds.north");(a===void 0||s===void 0||h===void 0||c===void 0)&&delete o.bounds,S(r,o,{name:"layers",handleItemDefaults:t}),o._input=r}function t(r,o){function i(m,d){return p.coerce(r,o,E.layers,m,d)}var n=i("visible");if(n){var a=i("sourcetype"),s=a==="raster"||a==="image";i("source"),i("sourceattribution"),a==="vector"&&i("sourcelayer"),a==="image"&&i("coordinates");var h;s&&(h="raster");var c=i("type",h);s&&c!=="raster"&&(c=o.type="raster",p.log("Source types *raster* and *image* must drawn *raster* layer type.")),i("below"),i("color"),i("opacity"),i("minzoom"),i("maxzoom"),c==="circle"&&i("circle.radius"),c==="line"&&(i("line.width"),i("line.dash")),c==="fill"&&i("fill.outlinecolor"),c==="symbol"&&(i("symbol.icon"),i("symbol.iconsize"),i("symbol.text"),p.coerceFont(i,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),i("symbol.textposition"),i("symbol.placement"))}}}}),kb=De({"src/plots/mapbox/index.js"(Y){"use strict";var H=uA(),p=ui(),x=p.strTranslate,S=p.strScale,E=Lh().getSubplotCalcData,e=Bd(),t=za(),r=ys(),o=vu(),i=qR(),n="mapbox",a=Y.constants=_p();Y.name=n,Y.attr="subplot",Y.idRoot=n,Y.idRegex=Y.attrRegex=p.counterRegex(n);var s=["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(" ");Y.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},Y.layoutAttributes=u1(),Y.supplyLayoutDefaults=HR();var h=!0;Y.plot=function(T){h&&(h=!1,p.warn(s));var l=T._fullLayout,_=T.calcdata,w=l._subplots[n];if(H.version!==a.requiredVersion)throw new Error(a.wrongVersionErrorMsg);var A=c(T,w);H.accessToken=A;for(var M=0;M<w.length;M++){var g=w[M],b=E(_,n,g),v=l[g],u=v._subplot;u||(u=new i(T,g),l[g]._subplot=u),u.viewInitial||(u.viewInitial={center:p.extendFlat({},v.center),zoom:v.zoom,bearing:v.bearing,pitch:v.pitch}),u.plot(b,l,T._promises)}},Y.clean=function(d,T,l,_){for(var w=_._subplots[n]||[],A=0;A<w.length;A++){var M=w[A];!T[M]&&_[M]._subplot&&_[M]._subplot.destroy()}},Y.toSVG=function(d){for(var T=d._fullLayout,l=T._subplots[n],_=T._size,w=0;w<l.length;w++){var A=T[l[w]],M=A.domain,g=A._subplot,b=g.toImage("png"),v=T._glimages.append("svg:image");v.attr({xmlns:e.svg,"xlink:href":b,x:_.l+_.w*M.x[0],y:_.t+_.h*(1-M.y[1]),width:_.w*(M.x[1]-M.x[0]),height:_.h*(M.y[1]-M.y[0]),preserveAspectRatio:"none"});var u=t.select(A._subplot.div),y=u.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!y){var f=T._glimages.append("g");f.attr("transform",x(_.l+_.w*M.x[0]+10,_.t+_.h*(1-M.y[0])-31)),f.append("path").attr("d",a.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),f.append("path").attr("d",a.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),f.append("path").attr("d",a.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),f.append("polygon").attr("points",a.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var R=u.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),L=T._glimages.append("g"),z=L.append("text");z.text(R).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":R});var F=r.bBox(z.node()),N=_.w*(M.x[1]-M.x[0]);if(F.width>N/2){var B=R.split("|").join("<br>");z.text(B).attr("data-unformatted",B).call(o.convertToTspans,d),F=r.bBox(z.node())}z.attr("transform",x(-3,-F.height+8)),L.insert("rect",".static-attribution").attr({x:-F.width-6,y:-F.height-3,width:F.width+6,height:F.height+3,fill:"rgba(255, 255, 255, 0.75)"});var I=1;F.width+6>N&&(I=N/(F.width+6));var U=[_.l+_.w*M.x[1],_.t+_.h*(1-M.y[0])];L.attr("transform",x(U[0],U[1])+S(I))}};function c(d,T){var l=d._fullLayout,_=d._context;if(_.mapboxAccessToken==="")return"";for(var w=[],A=[],M=!1,g=!1,b=0;b<T.length;b++){var v=l[T[b]],u=v.accesstoken;m(v.style)&&(u?p.pushUnique(w,u):(m(v._input.style)&&(p.error("Uses Mapbox map style, but did not set an access token."),M=!0),g=!0)),u&&p.pushUnique(A,u)}if(g){var y=M?a.noAccessTokenErrorMsg:a.missingStyleErrorMsg;throw p.error(y),new Error(y)}return w.length?(w.length>1&&p.warn(a.multipleTokensErrorMsg),w[0]):(A.length&&p.log(["Listed mapbox access token(s)",A.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function m(d){return typeof d=="string"&&(a.styleValuesMapbox.indexOf(d)!==-1||d.indexOf("mapbox://")===0||d.indexOf("stamen")===0)}Y.updateFx=function(d){for(var T=d._fullLayout,l=T._subplots[n],_=0;_<l.length;_++){var w=T[l[_]]._subplot;w.updateFx(T)}}}}),GR=De({"src/traces/scattermapbox/index.js"(Y,H){"use strict";var p=["*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(" ");H.exports={attributes:Mb(),supplyDefaults:BR(),colorbar:qh(),formatLabels:sA(),calc:ob(),plot:NR(),hoverPoints:Eb().hoverPoints,eventData:UR(),selectPoints:jR(),styleOnSelect:function(x,S){if(S){var E=S[0].trace;E._glTrace.update(S)}},moduleType:"trace",name:"scattermapbox",basePlotModule:kb(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}}),WR=De({"lib/scattermapbox.js"(Y,H){"use strict";H.exports=GR()}}),cA=De({"src/traces/choroplethmapbox/attributes.js"(Y,H){"use strict";var p=wg(),x=zu(),{hovertemplateAttrs:S,templatefallbackAttrs:E}=ou(),e=Yl(),t=Xo().extendFlat;H.exports=t({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:t({},p.featureidkey,{}),below:{valType:"string",editType:"plot"},text:p.text,hovertext:p.hovertext,marker:{line:{color:t({},p.marker.line.color,{editType:"plot"}),width:t({},p.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:t({},p.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:t({},p.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:t({},p.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:p.hoverinfo,hovertemplate:S({},{keys:["properties"]}),hovertemplatefallback:E(),showlegend:t({},e.showlegend,{dflt:!1})},x("",{cLetter:"z",editTypeOverride:"calc"}))}}),XR=De({"src/traces/choroplethmapbox/defaults.js"(Y,H){"use strict";var p=ui(),x=dh(),S=cA();H.exports=function(e,t,r,o){function i(c,m){return p.coerce(e,t,S,c,m)}var n=i("locations"),a=i("z"),s=i("geojson");if(!p.isArrayOrTypedArray(n)||!n.length||!p.isArrayOrTypedArray(a)||!a.length||!(typeof s=="string"&&s!==""||p.isPlainObject(s))){t.visible=!1;return}i("featureidkey"),t._length=Math.min(n.length,a.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var h=i("marker.line.width");h&&i("marker.line.color"),i("marker.opacity"),x(e,t,o,i,{prefix:"",cLetter:"z"}),p.coerceSelectionMarkerOpacity(t,i)}}}),fA=De({"src/traces/choroplethmapbox/convert.js"(Y,H){"use strict";var p=vn(),x=ui(),S=oc(),E=ys(),e=o0().makeBlank,t=s0();function r(i){var n=i[0].trace,a=n.visible===!0&&n._length!==0,s={layout:{visibility:"none"},paint:{}},h={layout:{visibility:"none"},paint:{}},c=n._opts={fill:s,line:h,geojson:e()};if(!a)return c;var m=t.extractTraceFeature(i);if(!m)return c;var d=S.makeColorScaleFuncFromTrace(n),T=n.marker,l=T.line||{},_;x.isArrayOrTypedArray(T.opacity)&&(_=function(y){var f=y.mo;return p(f)?+x.constrain(f,0,1):0});var w;x.isArrayOrTypedArray(l.color)&&(w=function(y){return y.mlc});var A;x.isArrayOrTypedArray(l.width)&&(A=function(y){return y.mlw});for(var M=0;M<i.length;M++){var g=i[M],b=g.fOut;if(b){var v=b.properties;v.fc=d(g.z),_&&(v.mo=_(g)),w&&(v.mlc=w(g)),A&&(v.mlw=A(g)),g.ct=v.ct,g._polygons=t.feature2polygons(b)}}var u=_?{type:"identity",property:"mo"}:T.opacity;return x.extendFlat(s.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":u}),x.extendFlat(h.paint,{"line-color":w?{type:"identity",property:"mlc"}:l.color,"line-width":A?{type:"identity",property:"mlw"}:l.width,"line-opacity":u}),s.layout.visibility="visible",h.layout.visibility="visible",c.geojson={type:"FeatureCollection",features:m},o(i),c}function o(i){var n=i[0].trace,a=n._opts,s;if(n.selectedpoints){for(var h=E.makeSelectedPointStyleFns(n),c=0;c<i.length;c++){var m=i[c];m.fOut&&(m.fOut.properties.mo2=h.selectedOpacityFn(m))}s={type:"identity",property:"mo2"}}else s=x.isArrayOrTypedArray(n.marker.opacity)?{type:"identity",property:"mo"}:n.marker.opacity;return x.extendFlat(a.fill.paint,{"fill-opacity":s}),x.extendFlat(a.line.paint,{"line-opacity":s}),a}H.exports={convert:r,convertOnSelect:o}}}),YR=De({"src/traces/choroplethmapbox/plot.js"(Y,H){"use strict";var p=fA().convert,x=fA().convertOnSelect,S=_p().traceLayerPrefix;function E(t,r){this.type="choroplethmapbox",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",S+r+"-fill"],["line",S+r+"-line"]],this.below=null}var e=E.prototype;e.update=function(t){this._update(p(t)),t[0].trace._glTrace=this},e.updateOnSelect=function(t){this._update(x(t))},e._update=function(t){var r=this.subplot,o=this.layerList,i=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(t.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(t,i),this.below=i);for(var n=0;n<o.length;n++){var a=o[n],s=a[0],h=a[1],c=t[s];r.setOptions(h,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&r.setOptions(h,"setPaintProperty",c.paint)}},e._addLayers=function(t,r){for(var o=this.subplot,i=this.layerList,n=this.sourceId,a=0;a<i.length;a++){var s=i[a],h=s[0],c=t[h];o.addLayer({type:h,id:s[1],source:n,layout:c.layout,paint:c.paint},r)}},e._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,o=r.length-1;o>=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},H.exports=function(r,o){var i=o[0].trace,n=new E(r,i.uid),a=n.sourceId,s=p(o),h=n.below=r.belowLookup["trace-"+i.uid];return r.map.addSource(a,{type:"geojson",data:s.geojson}),n._addLayers(s,h),o[0].trace._glTrace=n,n}}}),ZR=De({"src/traces/choroplethmapbox/index.js"(Y,H){"use strict";var p=["*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(" ");H.exports={attributes:cA(),supplyDefaults:XR(),colorbar:Zp(),calc:cb(),plot:YR(),hoverPoints:hb(),eventData:db(),selectPoints:vb(),styleOnSelect:function(x,S){if(S){var E=S[0].trace;E._glTrace.updateOnSelect(S)}},getBelow:function(x,S){for(var E=S.getMapLayers(),e=E.length-2;e>=0;e--){var t=E[e].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var r=e+1;r<E.length;r++)if(t=E[r].id,typeof t=="string"&&t.indexOf("plotly-")===-1)return t}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:kb(),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}}}),KR=De({"lib/choroplethmapbox.js"(Y,H){"use strict";H.exports=ZR()}}),hA=De({"src/traces/densitymapbox/attributes.js"(Y,H){"use strict";var p=zu(),{hovertemplateAttrs:x,templatefallbackAttrs:S}=ou(),E=Yl(),e=Mb(),t=Xo().extendFlat;H.exports=t({lon:e.lon,lat:e.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:e.text,hovertext:e.hovertext,hoverinfo:t({},E.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:x(),hovertemplatefallback:S(),showlegend:t({},E.showlegend,{dflt:!1})},p("",{cLetter:"z",editTypeOverride:"calc"}))}}),$R=De({"src/traces/densitymapbox/defaults.js"(Y,H){"use strict";var p=ui(),x=dh(),S=hA();H.exports=function(e,t,r,o){function i(h,c){return p.coerce(e,t,S,h,c)}var n=i("lon")||[],a=i("lat")||[],s=Math.min(n.length,a.length);if(!s){t.visible=!1;return}t._length=s,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),x(e,t,o,i,{prefix:"",cLetter:"z"})}}}),JR=De({"src/traces/densitymapbox/calc.js"(Y,H){"use strict";var p=vn(),x=ui().isArrayOrTypedArray,S=zn().BADNUM,E=Jh(),e=ui()._;H.exports=function(r,o){for(var i=o._length,n=new Array(i),a=o.z,s=x(a)&&a.length,h=0;h<i;h++){var c=n[h]={},m=o.lon[h],d=o.lat[h];if(c.lonlat=p(m)&&p(d)?[+m,+d]:[S,S],s){var T=a[h];c.z=p(T)?T:S}}return E(r,o,{vals:s?a:[0,1],containerStr:"",cLetter:"z"}),i&&(n[0].t={labels:{lat:e(r,"lat:")+" ",lon:e(r,"lon:")+" "}}),n}}}),QR=De({"src/traces/densitymapbox/convert.js"(Y,H){"use strict";var p=vn(),x=ui(),S=vo(),E=oc(),e=zn().BADNUM,t=o0().makeBlank;H.exports=function(o){var i=o[0].trace,n=i.visible===!0&&i._length!==0,a={layout:{visibility:"none"},paint:{}},s=i._opts={heatmap:a,geojson:t()};if(!n)return s;var h=[],c,m=i.z,d=i.radius,T=x.isArrayOrTypedArray(m)&&m.length,l=x.isArrayOrTypedArray(d);for(c=0;c<o.length;c++){var _=o[c],w=_.lonlat;if(w[0]!==e){var A={};if(T){var M=_.z;A.z=M!==e?M:0}l&&(A.r=p(d[c])&&d[c]>0?+d[c]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:A})}}var g=E.extractOpts(i),b=g.reversescale?E.flipScale(g.colorscale):g.colorscale,v=b[0][1],u=S.opacity(v)<1?v:S.addOpacity(v,0),y=["interpolate",["linear"],["heatmap-density"],0,u];for(c=1;c<b.length;c++)y.push(b[c][0],b[c][1]);var f=["interpolate",["linear"],["get","z"],g.min,0,g.max,1];return x.extendFlat(s.heatmap.paint,{"heatmap-weight":T?f:1/(g.max-g.min),"heatmap-color":y,"heatmap-radius":l?{type:"identity",property:"r"}:i.radius,"heatmap-opacity":i.opacity}),s.geojson={type:"FeatureCollection",features:h},s.heatmap.layout.visibility="visible",s}}}),eD=De({"src/traces/densitymapbox/plot.js"(Y,H){"use strict";var p=QR(),x=_p().traceLayerPrefix;function S(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",x+t+"-heatmap"]],this.below=null}var E=S.prototype;E.update=function(e){var t=this.subplot,r=this.layerList,o=p(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(o.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(o,i),this.below=i);for(var n=0;n<r.length;n++){var a=r[n],s=a[0],h=a[1],c=o[s];t.setOptions(h,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&t.setOptions(h,"setPaintProperty",c.paint)}},E._addLayers=function(e,t){for(var r=this.subplot,o=this.layerList,i=this.sourceId,n=0;n<o.length;n++){var a=o[n],s=a[0],h=e[s];r.addLayer({type:s,id:a[1],source:i,layout:h.layout,paint:h.paint},t)}},E._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},H.exports=function(t,r){var o=r[0].trace,i=new S(t,o.uid),n=i.sourceId,a=p(r),s=i.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(n,{type:"geojson",data:a.geojson}),i._addLayers(a,s),i}}}),tD=De({"src/traces/densitymapbox/hover.js"(Y,H){"use strict";var p=us(),x=Eb().hoverPoints,S=Eb().getExtraText;H.exports=function(e,t,r){var o=x(e,t,r);if(o){var i=o[0],n=i.cd,a=n[0].trace,s=n[i.index];if(delete i.color,"z"in s){var h=i.subplot.mockAxis;i.z=s.z,i.zLabel=p.tickText(h,h.c2l(s.z),"hover").text}return i.extraText=S(a,s,n[0].t.labels),[i]}}}}),rD=De({"src/traces/densitymapbox/event_data.js"(Y,H){"use strict";H.exports=function(x,S){return x.lon=S.lon,x.lat=S.lat,x.z=S.z,x}}}),iD=De({"src/traces/densitymapbox/index.js"(Y,H){"use strict";var p=["*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(" ");H.exports={attributes:hA(),supplyDefaults:$R(),colorbar:Zp(),formatLabels:sA(),calc:JR(),plot:eD(),hoverPoints:tD(),eventData:rD(),getBelow:function(x,S){for(var E=S.getMapLayers(),e=0;e<E.length;e++){var t=E[e],r=t.id;if(t.type==="symbol"&&typeof r=="string"&&r.indexOf("plotly-")===-1)return r}},moduleType:"trace",name:"densitymapbox",basePlotModule:kb(),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}}}),aD=De({"lib/densitymapbox.js"(Y,H){"use strict";H.exports=iD()}}),nD=De({"src/plots/map/styles/arcgis-sat-hybrid.js"(Y,H){H.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 © <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} |
| 3201 | {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} |
| 3202 | {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} |
| 3203 | {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} |
no test coverage detected