@visitscotland/component-library 5.72.1 → 5.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -497,7 +497,7 @@ uniform `+R+" "+F+" u_"+O+`;
497
497
  `),ue=d.createShader(d.FRAGMENT_SHADER);if(d.isContextLost())this.failedToCreate=!0;else{d.shaderSource(ue,Q),d.compileShader(ue),d.attachShader(this.program,ue);var me=d.createShader(d.VERTEX_SHADER);if(d.isContextLost())this.failedToCreate=!0;else{d.shaderSource(me,ne),d.compileShader(me),d.attachShader(this.program,me),this.attributes={};var pe={};this.numAttributes=A.length;for(var ve=0;ve<this.numAttributes;ve++)A[ve]&&(d.bindAttribLocation(this.program,ve,A[ve]),this.attributes[A[ve]]=ve);d.linkProgram(this.program),d.deleteShader(me),d.deleteShader(ue);for(var Te=0;Te<O.length;Te++){var ke=O[Te];if(ke&&!pe[ke]){var Ce=d.getUniformLocation(this.program,ke);Ce&&(pe[ke]=Ce)}}this.fixedUniforms=p(i,pe),this.binderUniforms=s?s.getUniforms(i,pe):[]}}};function _l(i,o,n){var s=1/yr(n,1,o.transform.tileZoom),p=Math.pow(2,n.tileID.overscaledZ),f=n.tileSize*Math.pow(2,o.transform.tileZoom)/p,d=f*(n.tileID.canonical.x+n.tileID.wrap*p),v=f*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[s,i.fromScale,i.toScale],u_fade:i.t,u_pixel_coord_upper:[d>>16,v>>16],u_pixel_coord_lower:[65535&d,65535&v]}}gl.prototype.draw=function(i,o,n,s,p,f,d,v,w,A,R,F,O,W,Z,ee){var N,Q=i.gl;if(!this.failedToCreate){for(var ne in i.program.set(this.program),i.setDepthMode(n),i.setStencilMode(s),i.setColorMode(p),i.setCullFace(f),this.fixedUniforms)this.fixedUniforms[ne].set(d[ne]);W&&W.setUniforms(i,this.binderUniforms,F,{zoom:O});for(var ue=(N={},N[Q.LINES]=2,N[Q.TRIANGLES]=3,N[Q.LINE_STRIP]=1,N)[o],me=0,pe=R.get();me<pe.length;me+=1){var ve=pe[me],Te=ve.vaos||(ve.vaos={});(Te[v]||(Te[v]=new ts)).bind(i,this,w,W?W.getPaintVertexBuffers():[],A,ve.vertexOffset,Z,ee),Q.drawElements(o,ve.primitiveLength*ue,Q.UNSIGNED_SHORT,ve.primitiveOffset*ue*2)}}};var xl=function(i,o,n,s){var p=o.style.light,f=p.properties.get("position"),d=[f.x,f.y,f.z],v=u.create$1();p.properties.get("anchor")==="viewport"&&u.fromRotation(v,-o.transform.angle),u.transformMat3(d,d,v);var w=p.properties.get("color");return{u_matrix:i,u_lightpos:d,u_lightintensity:p.properties.get("intensity"),u_lightcolor:[w.r,w.g,w.b],u_vertical_gradient:+n,u_opacity:s}},So=function(i,o,n,s,p,f,d){return u.extend(xl(i,o,n,s),_l(f,o,d),{u_height_factor:-Math.pow(2,p.overscaledZ)/d.tileSize/8})},Yn=function(i){return{u_matrix:i}},Io=function(i,o,n,s){return u.extend(Yn(i),_l(n,o,s))},bl=function(i,o){return{u_matrix:i,u_world:o}},wl=function(i,o,n,s,p){return u.extend(Io(i,o,n,s),{u_world:p})},cu=function(i,o,n,s){var p,f,d=i.transform;if(s.paint.get("circle-pitch-alignment")==="map"){var v=yr(n,1,d.zoom);p=!0,f=[v,v]}else p=!1,f=d.pixelsToGLUnits;return{u_camera_to_center_distance:d.cameraToCenterDistance,u_scale_with_map:+(s.paint.get("circle-pitch-scale")==="map"),u_matrix:i.translatePosMatrix(o.posMatrix,n,s.paint.get("circle-translate"),s.paint.get("circle-translate-anchor")),u_pitch_with_map:+p,u_device_pixel_ratio:u.browser.devicePixelRatio,u_extrude_scale:f}},To=function(i,o,n){var s=yr(n,1,o.zoom),p=Math.pow(2,o.zoom-n.tileID.overscaledZ),f=n.tileID.overscaleFactor();return{u_matrix:i,u_camera_to_center_distance:o.cameraToCenterDistance,u_pixels_to_tile_units:s,u_extrude_scale:[o.pixelsToGLUnits[0]/(s*p),o.pixelsToGLUnits[1]/(s*p)],u_overscale_factor:f}},Sl=function(i,o,n){return{u_matrix:i,u_inv_matrix:o,u_camera_to_center_distance:n.cameraToCenterDistance,u_viewport_size:[n.width,n.height]}},Ao=function(i,o,n){return n===void 0&&(n=1),{u_matrix:i,u_color:o,u_overlay:0,u_overlay_scale:n}},Eo=function(i){return{u_matrix:i}},Il=function(i,o,n,s){return{u_matrix:i,u_extrude_scale:yr(o,1,n),u_intensity:s}},ba=function(i,o,n){var s=i.transform;return{u_matrix:Tl(i,o,n),u_ratio:1/yr(o,1,s.zoom),u_device_pixel_ratio:u.browser.devicePixelRatio,u_units_to_pixels:[1/s.pixelsToGLUnits[0],1/s.pixelsToGLUnits[1]]}},ur=function(i,o,n,s){return u.extend(ba(i,o,n),{u_image:0,u_image_height:s})},rs=function(i,o,n,s){var p=i.transform,f=Xo(o,p);return{u_matrix:Tl(i,o,n),u_texsize:o.imageAtlasTexture.size,u_ratio:1/yr(o,1,p.zoom),u_device_pixel_ratio:u.browser.devicePixelRatio,u_image:0,u_scale:[f,s.fromScale,s.toScale],u_fade:s.t,u_units_to_pixels:[1/p.pixelsToGLUnits[0],1/p.pixelsToGLUnits[1]]}},Fc=function(i,o,n,s,p){var f=i.lineAtlas,d=Xo(o,i.transform),v=n.layout.get("line-cap")==="round",w=f.getDash(s.from,v),A=f.getDash(s.to,v),R=w.width*p.fromScale,F=A.width*p.toScale;return u.extend(ba(i,o,n),{u_patternscale_a:[d/R,-w.height/2],u_patternscale_b:[d/F,-A.height/2],u_sdfgamma:f.width/(256*Math.min(R,F)*u.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:w.y,u_tex_y_b:A.y,u_mix:p.t})};function Xo(i,o){return 1/yr(i,1,o.tileZoom)}function Tl(i,o,n){return i.translatePosMatrix(o.tileID.posMatrix,o,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}var Oc=function(i,o,n,s,p){return{u_matrix:i,u_tl_parent:o,u_scale_parent:n,u_buffer_scale:1,u_fade_t:s.mix,u_opacity:s.opacity*p.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:p.paint.get("raster-brightness-min"),u_brightness_high:p.paint.get("raster-brightness-max"),u_saturation_factor:(d=p.paint.get("raster-saturation"),d>0?1-1/(1.001-d):-d),u_contrast_factor:(f=p.paint.get("raster-contrast"),f>0?1/(1-f):1+f),u_spin_weights:Al(p.paint.get("raster-hue-rotate"))};var f,d};function Al(i){i*=Math.PI/180;var o=Math.sin(i),n=Math.cos(i);return[(2*n+1)/3,(-Math.sqrt(3)*o-n+1)/3,(Math.sqrt(3)*o-n+1)/3]}var is,Ko=function(i,o,n,s,p,f,d,v,w,A){var R=p.transform;return{u_is_size_zoom_constant:+(i==="constant"||i==="source"),u_is_size_feature_constant:+(i==="constant"||i==="camera"),u_size_t:o?o.uSizeT:0,u_size:o?o.uSize:0,u_camera_to_center_distance:R.cameraToCenterDistance,u_pitch:R.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:R.width/R.height,u_fade_change:p.options.fadeDuration?p.symbolFadeChange:1,u_matrix:f,u_label_plane_matrix:d,u_coord_matrix:v,u_is_text:+w,u_pitch_with_map:+s,u_texsize:A,u_texture:0}},wa=function(i,o,n,s,p,f,d,v,w,A,R){var F=p.transform;return u.extend(Ko(i,o,n,s,p,f,d,v,w,A),{u_gamma_scale:s?Math.cos(F._pitch)*F.cameraToCenterDistance:1,u_device_pixel_ratio:u.browser.devicePixelRatio,u_is_halo:1})},ns=function(i,o,n,s,p,f,d,v,w,A){return u.extend(wa(i,o,n,s,p,f,d,v,!0,w),{u_texsize_icon:A,u_texture_icon:1})},Sa=function(i,o,n){return{u_matrix:i,u_opacity:o,u_color:n}},Jo=function(i,o,n,s,p,f){return u.extend((function(d,v,w,A){var R=w.imageManager.getPattern(d.from.toString()),F=w.imageManager.getPattern(d.to.toString()),O=w.imageManager.getPixelSize(),W=O.width,Z=O.height,ee=Math.pow(2,A.tileID.overscaledZ),N=A.tileSize*Math.pow(2,w.transform.tileZoom)/ee,Q=N*(A.tileID.canonical.x+A.tileID.wrap*ee),ne=N*A.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:R.tl,u_pattern_br_a:R.br,u_pattern_tl_b:F.tl,u_pattern_br_b:F.br,u_texsize:[W,Z],u_mix:v.t,u_pattern_size_a:R.displaySize,u_pattern_size_b:F.displaySize,u_scale_a:v.fromScale,u_scale_b:v.toScale,u_tile_units_to_pixels:1/yr(A,1,w.transform.tileZoom),u_pixel_coord_upper:[Q>>16,ne>>16],u_pixel_coord_lower:[65535&Q,65535&ne]}})(s,f,n,p),{u_matrix:i,u_opacity:o})},El={fillExtrusion:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_lightpos:new u.Uniform3f(i,o.u_lightpos),u_lightintensity:new u.Uniform1f(i,o.u_lightintensity),u_lightcolor:new u.Uniform3f(i,o.u_lightcolor),u_vertical_gradient:new u.Uniform1f(i,o.u_vertical_gradient),u_opacity:new u.Uniform1f(i,o.u_opacity)}},fillExtrusionPattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_lightpos:new u.Uniform3f(i,o.u_lightpos),u_lightintensity:new u.Uniform1f(i,o.u_lightintensity),u_lightcolor:new u.Uniform3f(i,o.u_lightcolor),u_vertical_gradient:new u.Uniform1f(i,o.u_vertical_gradient),u_height_factor:new u.Uniform1f(i,o.u_height_factor),u_image:new u.Uniform1i(i,o.u_image),u_texsize:new u.Uniform2f(i,o.u_texsize),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade),u_opacity:new u.Uniform1f(i,o.u_opacity)}},fill:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},fillPattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_image:new u.Uniform1i(i,o.u_image),u_texsize:new u.Uniform2f(i,o.u_texsize),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade)}},fillOutline:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_world:new u.Uniform2f(i,o.u_world)}},fillOutlinePattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_world:new u.Uniform2f(i,o.u_world),u_image:new u.Uniform1i(i,o.u_image),u_texsize:new u.Uniform2f(i,o.u_texsize),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade)}},circle:function(i,o){return{u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_scale_with_map:new u.Uniform1i(i,o.u_scale_with_map),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_extrude_scale:new u.Uniform2f(i,o.u_extrude_scale),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},collisionBox:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pixels_to_tile_units:new u.Uniform1f(i,o.u_pixels_to_tile_units),u_extrude_scale:new u.Uniform2f(i,o.u_extrude_scale),u_overscale_factor:new u.Uniform1f(i,o.u_overscale_factor)}},collisionCircle:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_inv_matrix:new u.UniformMatrix4f(i,o.u_inv_matrix),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_viewport_size:new u.Uniform2f(i,o.u_viewport_size)}},debug:function(i,o){return{u_color:new u.UniformColor(i,o.u_color),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_overlay:new u.Uniform1i(i,o.u_overlay),u_overlay_scale:new u.Uniform1f(i,o.u_overlay_scale)}},clippingMask:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},heatmap:function(i,o){return{u_extrude_scale:new u.Uniform1f(i,o.u_extrude_scale),u_intensity:new u.Uniform1f(i,o.u_intensity),u_matrix:new u.UniformMatrix4f(i,o.u_matrix)}},heatmapTexture:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_world:new u.Uniform2f(i,o.u_world),u_image:new u.Uniform1i(i,o.u_image),u_color_ramp:new u.Uniform1i(i,o.u_color_ramp),u_opacity:new u.Uniform1f(i,o.u_opacity)}},hillshade:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_image:new u.Uniform1i(i,o.u_image),u_latrange:new u.Uniform2f(i,o.u_latrange),u_light:new u.Uniform2f(i,o.u_light),u_shadow:new u.UniformColor(i,o.u_shadow),u_highlight:new u.UniformColor(i,o.u_highlight),u_accent:new u.UniformColor(i,o.u_accent)}},hillshadePrepare:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_image:new u.Uniform1i(i,o.u_image),u_dimension:new u.Uniform2f(i,o.u_dimension),u_zoom:new u.Uniform1f(i,o.u_zoom),u_unpack:new u.Uniform4f(i,o.u_unpack)}},line:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels)}},lineGradient:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels),u_image:new u.Uniform1i(i,o.u_image),u_image_height:new u.Uniform1f(i,o.u_image_height)}},linePattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_texsize:new u.Uniform2f(i,o.u_texsize),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_image:new u.Uniform1i(i,o.u_image),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels),u_scale:new u.Uniform3f(i,o.u_scale),u_fade:new u.Uniform1f(i,o.u_fade)}},lineSDF:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_ratio:new u.Uniform1f(i,o.u_ratio),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_units_to_pixels:new u.Uniform2f(i,o.u_units_to_pixels),u_patternscale_a:new u.Uniform2f(i,o.u_patternscale_a),u_patternscale_b:new u.Uniform2f(i,o.u_patternscale_b),u_sdfgamma:new u.Uniform1f(i,o.u_sdfgamma),u_image:new u.Uniform1i(i,o.u_image),u_tex_y_a:new u.Uniform1f(i,o.u_tex_y_a),u_tex_y_b:new u.Uniform1f(i,o.u_tex_y_b),u_mix:new u.Uniform1f(i,o.u_mix)}},raster:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_tl_parent:new u.Uniform2f(i,o.u_tl_parent),u_scale_parent:new u.Uniform1f(i,o.u_scale_parent),u_buffer_scale:new u.Uniform1f(i,o.u_buffer_scale),u_fade_t:new u.Uniform1f(i,o.u_fade_t),u_opacity:new u.Uniform1f(i,o.u_opacity),u_image0:new u.Uniform1i(i,o.u_image0),u_image1:new u.Uniform1i(i,o.u_image1),u_brightness_low:new u.Uniform1f(i,o.u_brightness_low),u_brightness_high:new u.Uniform1f(i,o.u_brightness_high),u_saturation_factor:new u.Uniform1f(i,o.u_saturation_factor),u_contrast_factor:new u.Uniform1f(i,o.u_contrast_factor),u_spin_weights:new u.Uniform3f(i,o.u_spin_weights)}},symbolIcon:function(i,o){return{u_is_size_zoom_constant:new u.Uniform1i(i,o.u_is_size_zoom_constant),u_is_size_feature_constant:new u.Uniform1i(i,o.u_is_size_feature_constant),u_size_t:new u.Uniform1f(i,o.u_size_t),u_size:new u.Uniform1f(i,o.u_size),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pitch:new u.Uniform1f(i,o.u_pitch),u_rotate_symbol:new u.Uniform1i(i,o.u_rotate_symbol),u_aspect_ratio:new u.Uniform1f(i,o.u_aspect_ratio),u_fade_change:new u.Uniform1f(i,o.u_fade_change),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_label_plane_matrix:new u.UniformMatrix4f(i,o.u_label_plane_matrix),u_coord_matrix:new u.UniformMatrix4f(i,o.u_coord_matrix),u_is_text:new u.Uniform1i(i,o.u_is_text),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_texsize:new u.Uniform2f(i,o.u_texsize),u_texture:new u.Uniform1i(i,o.u_texture)}},symbolSDF:function(i,o){return{u_is_size_zoom_constant:new u.Uniform1i(i,o.u_is_size_zoom_constant),u_is_size_feature_constant:new u.Uniform1i(i,o.u_is_size_feature_constant),u_size_t:new u.Uniform1f(i,o.u_size_t),u_size:new u.Uniform1f(i,o.u_size),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pitch:new u.Uniform1f(i,o.u_pitch),u_rotate_symbol:new u.Uniform1i(i,o.u_rotate_symbol),u_aspect_ratio:new u.Uniform1f(i,o.u_aspect_ratio),u_fade_change:new u.Uniform1f(i,o.u_fade_change),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_label_plane_matrix:new u.UniformMatrix4f(i,o.u_label_plane_matrix),u_coord_matrix:new u.UniformMatrix4f(i,o.u_coord_matrix),u_is_text:new u.Uniform1i(i,o.u_is_text),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_texsize:new u.Uniform2f(i,o.u_texsize),u_texture:new u.Uniform1i(i,o.u_texture),u_gamma_scale:new u.Uniform1f(i,o.u_gamma_scale),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_is_halo:new u.Uniform1i(i,o.u_is_halo)}},symbolTextAndIcon:function(i,o){return{u_is_size_zoom_constant:new u.Uniform1i(i,o.u_is_size_zoom_constant),u_is_size_feature_constant:new u.Uniform1i(i,o.u_is_size_feature_constant),u_size_t:new u.Uniform1f(i,o.u_size_t),u_size:new u.Uniform1f(i,o.u_size),u_camera_to_center_distance:new u.Uniform1f(i,o.u_camera_to_center_distance),u_pitch:new u.Uniform1f(i,o.u_pitch),u_rotate_symbol:new u.Uniform1i(i,o.u_rotate_symbol),u_aspect_ratio:new u.Uniform1f(i,o.u_aspect_ratio),u_fade_change:new u.Uniform1f(i,o.u_fade_change),u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_label_plane_matrix:new u.UniformMatrix4f(i,o.u_label_plane_matrix),u_coord_matrix:new u.UniformMatrix4f(i,o.u_coord_matrix),u_is_text:new u.Uniform1i(i,o.u_is_text),u_pitch_with_map:new u.Uniform1i(i,o.u_pitch_with_map),u_texsize:new u.Uniform2f(i,o.u_texsize),u_texsize_icon:new u.Uniform2f(i,o.u_texsize_icon),u_texture:new u.Uniform1i(i,o.u_texture),u_texture_icon:new u.Uniform1i(i,o.u_texture_icon),u_gamma_scale:new u.Uniform1f(i,o.u_gamma_scale),u_device_pixel_ratio:new u.Uniform1f(i,o.u_device_pixel_ratio),u_is_halo:new u.Uniform1i(i,o.u_is_halo)}},background:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_opacity:new u.Uniform1f(i,o.u_opacity),u_color:new u.UniformColor(i,o.u_color)}},backgroundPattern:function(i,o){return{u_matrix:new u.UniformMatrix4f(i,o.u_matrix),u_opacity:new u.Uniform1f(i,o.u_opacity),u_image:new u.Uniform1i(i,o.u_image),u_pattern_tl_a:new u.Uniform2f(i,o.u_pattern_tl_a),u_pattern_br_a:new u.Uniform2f(i,o.u_pattern_br_a),u_pattern_tl_b:new u.Uniform2f(i,o.u_pattern_tl_b),u_pattern_br_b:new u.Uniform2f(i,o.u_pattern_br_b),u_texsize:new u.Uniform2f(i,o.u_texsize),u_mix:new u.Uniform1f(i,o.u_mix),u_pattern_size_a:new u.Uniform2f(i,o.u_pattern_size_a),u_pattern_size_b:new u.Uniform2f(i,o.u_pattern_size_b),u_scale_a:new u.Uniform1f(i,o.u_scale_a),u_scale_b:new u.Uniform1f(i,o.u_scale_b),u_pixel_coord_upper:new u.Uniform2f(i,o.u_pixel_coord_upper),u_pixel_coord_lower:new u.Uniform2f(i,o.u_pixel_coord_lower),u_tile_units_to_pixels:new u.Uniform1f(i,o.u_tile_units_to_pixels)}}};function Yo(i,o,n,s,p,f,d){for(var v=i.context,w=v.gl,A=i.useProgram("collisionBox"),R=[],F=0,O=0,W=0;W<s.length;W++){var Z=s[W],ee=o.getTile(Z),N=ee.getBucket(n);if(N){var Q=Z.posMatrix;p[0]===0&&p[1]===0||(Q=i.translatePosMatrix(Z.posMatrix,ee,p,f));var ne=d?N.textCollisionBox:N.iconCollisionBox,ue=N.collisionCircleArray;if(ue.length>0){var me=u.create(),pe=Q;u.mul(me,N.placementInvProjMatrix,i.transform.glCoordMatrix),u.mul(me,me,N.placementViewportMatrix),R.push({circleArray:ue,circleOffset:O,transform:pe,invTransform:me}),O=F+=ue.length/4}ne&&A.draw(v,w.LINES,V.disabled,$.disabled,i.colorModeForRenderPass(),ie.disabled,To(Q,i.transform,ee),n.id,ne.layoutVertexBuffer,ne.indexBuffer,ne.segments,null,i.transform.zoom,null,null,ne.collisionVertexBuffer)}}if(d&&R.length){var ve=i.useProgram("collisionCircle"),Te=new u.StructArrayLayout2f1f2i16;Te.resize(4*F),Te._trim();for(var ke=0,Ce=0,$e=R;Ce<$e.length;Ce+=1)for(var nt=$e[Ce],ut=0;ut<nt.circleArray.length/4;ut++){var st=4*ut,Ft=nt.circleArray[st+0],We=nt.circleArray[st+1],mt=nt.circleArray[st+2],xt=nt.circleArray[st+3];Te.emplace(ke++,Ft,We,mt,xt,0),Te.emplace(ke++,Ft,We,mt,xt,1),Te.emplace(ke++,Ft,We,mt,xt,2),Te.emplace(ke++,Ft,We,mt,xt,3)}(!is||is.length<2*F)&&(is=(function(Ir){var gi=2*Ir,si=new u.StructArrayLayout3ui6;si.resize(gi),si._trim();for(var wr=0;wr<gi;wr++){var Mr=6*wr;si.uint16[Mr+0]=4*wr+0,si.uint16[Mr+1]=4*wr+1,si.uint16[Mr+2]=4*wr+2,si.uint16[Mr+3]=4*wr+2,si.uint16[Mr+4]=4*wr+3,si.uint16[Mr+5]=4*wr+0}return si})(F));for(var dt=v.createIndexBuffer(is,!0),ft=v.createVertexBuffer(Te,u.collisionCircleLayout.members,!0),gt=0,ht=R;gt<ht.length;gt+=1){var ct=ht[gt],Jr=Sl(ct.transform,ct.invTransform,i.transform);ve.draw(v,w.TRIANGLES,V.disabled,$.disabled,i.colorModeForRenderPass(),ie.disabled,Jr,n.id,ft,dt,u.SegmentVector.simpleSegment(0,2*ct.circleOffset,ct.circleArray.length,ct.circleArray.length/2),null,i.transform.zoom,null,null,null)}ft.destroy(),dt.destroy()}}var vn=u.identity(new Float32Array(16));function Pl(i,o,n,s,p,f){var d=u.getAnchorAlignment(i),v=-(d.horizontalAlign-.5)*o,w=-(d.verticalAlign-.5)*n,A=u.evaluateVariableOffset(i,s);return new u.Point((v/p+A[0])*f,(w/p+A[1])*f)}function Cl(i,o,n,s,p,f,d,v,w,A,R){var F=i.text.placedSymbolArray,O=i.text.dynamicLayoutVertexArray,W=i.icon.dynamicLayoutVertexArray,Z={};O.clear();for(var ee=0;ee<F.length;ee++){var N=F.get(ee),Q=N.hidden||!N.crossTileID||i.allowVerticalPlacement&&!N.placedOrientation?null:s[N.crossTileID];if(Q){var ne=new u.Point(N.anchorX,N.anchorY),ue=zt(ne,n?v:d),me=$t(f.cameraToCenterDistance,ue.signedDistanceFromCamera),pe=p.evaluateSizeForFeature(i.textSizeData,A,N)*me/u.ONE_EM;n&&(pe*=i.tilePixelRatio/w);for(var ve=Pl(Q.anchor,Q.width,Q.height,Q.textOffset,Q.textBoxScale,pe),Te=n?zt(ne.add(ve),d).point:ue.point.add(o?ve.rotate(-f.angle):ve),ke=i.allowVerticalPlacement&&N.placedOrientation===u.WritingMode.vertical?Math.PI/2:0,Ce=0;Ce<N.numGlyphs;Ce++)u.addDynamicAttributes(O,Te,ke);R&&N.associatedIconIndex>=0&&(Z[N.associatedIconIndex]={shiftedAnchor:Te,angle:ke})}else Si(N.numGlyphs,O)}if(R){W.clear();for(var $e=i.icon.placedSymbolArray,nt=0;nt<$e.length;nt++){var ut=$e.get(nt);if(ut.hidden)Si(ut.numGlyphs,W);else{var st=Z[nt];if(st)for(var Ft=0;Ft<ut.numGlyphs;Ft++)u.addDynamicAttributes(W,st.shiftedAnchor,st.angle);else Si(ut.numGlyphs,W)}}i.icon.dynamicLayoutVertexBuffer.updateData(W)}i.text.dynamicLayoutVertexBuffer.updateData(O)}function kl(i,o,n){return n.iconsInText&&o?"symbolTextAndIcon":i?"symbolSDF":"symbolIcon"}function Po(i,o,n,s,p,f,d,v,w,A,R,F){for(var O=i.context,W=O.gl,Z=i.transform,ee=v==="map",N=w==="map",Q=ee&&n.layout.get("symbol-placement")!=="point",ne=ee&&!N&&!Q,ue=n.layout.get("symbol-sort-key").constantOr(1)!==void 0,me=!1,pe=i.depthModeForSublayer(0,V.ReadOnly),ve=n.layout.get("text-variable-anchor"),Te=[],ke=0,Ce=s;ke<Ce.length;ke+=1){var $e=Ce[ke],nt=o.getTile($e),ut=nt.getBucket(n);if(ut){var st=p?ut.text:ut.icon;if(st&&st.segments.get().length){var Ft=st.programConfigurations.get(n.id),We=p||ut.sdfIcons,mt=p?ut.textSizeData:ut.iconSizeData,xt=N||Z.pitch!==0,dt=i.useProgram(kl(We,p,ut),Ft),ft=u.evaluateSizeForZoom(mt,Z.zoom),gt=void 0,ht=[0,0],ct=void 0,Jr=void 0,Ir=null,gi=void 0;if(p)ct=nt.glyphAtlasTexture,Jr=W.LINEAR,gt=nt.glyphAtlasTexture.size,ut.iconsInText&&(ht=nt.imageAtlasTexture.size,Ir=nt.imageAtlasTexture,gi=xt||i.options.rotating||i.options.zooming||mt.kind==="composite"||mt.kind==="camera"?W.LINEAR:W.NEAREST);else{var si=n.layout.get("icon-size").constantOr(0)!==1||ut.iconsNeedLinear;ct=nt.imageAtlasTexture,Jr=We||i.options.rotating||i.options.zooming||si||xt?W.LINEAR:W.NEAREST,gt=nt.imageAtlasTexture.size}var wr=yr(nt,1,i.transform.zoom),Mr=Cr($e.posMatrix,N,ee,i.transform,wr),Wi=Qt($e.posMatrix,N,ee,i.transform,wr),Ei=ve&&ut.hasTextData(),no=n.layout.get("icon-text-fit")!=="none"&&Ei&&ut.hasIconData();Q&&ma(ut,$e.posMatrix,i,p,Mr,Wi,N,A);var Ri=i.translatePosMatrix($e.posMatrix,nt,f,d),wn=Q||p&&ve||no?vn:Mr,cn=i.translatePosMatrix(Wi,nt,f,d,!0),Ra=We&&n.paint.get(p?"text-halo-width":"icon-halo-width").constantOr(1)!==0,na={program:dt,buffers:st,uniformValues:We?ut.iconsInText?ns(mt.kind,ft,ne,N,i,Ri,wn,cn,gt,ht):wa(mt.kind,ft,ne,N,i,Ri,wn,cn,p,gt):Ko(mt.kind,ft,ne,N,i,Ri,wn,cn,p,gt),atlasTexture:ct,atlasTextureIcon:Ir,atlasInterpolation:Jr,atlasInterpolationIcon:gi,isSDF:We,hasHalo:Ra};if(ue&&ut.canOverlap){me=!0;for(var oo=0,oa=st.segments.get();oo<oa.length;oo+=1){var La=oa[oo];Te.push({segments:new u.SegmentVector([La]),sortKey:La.sortKey,state:na})}}else Te.push({segments:st.segments,sortKey:0,state:na})}}}me&&Te.sort((function(ao,Do){return ao.sortKey-Do.sortKey}));for(var Pn=0,Fa=Te;Pn<Fa.length;Pn+=1){var Cn=Fa[Pn],Yr=Cn.state;if(O.activeTexture.set(W.TEXTURE0),Yr.atlasTexture.bind(Yr.atlasInterpolation,W.CLAMP_TO_EDGE),Yr.atlasTextureIcon&&(O.activeTexture.set(W.TEXTURE1),Yr.atlasTextureIcon&&Yr.atlasTextureIcon.bind(Yr.atlasInterpolationIcon,W.CLAMP_TO_EDGE)),Yr.isSDF){var On=Yr.uniformValues;Yr.hasHalo&&(On.u_is_halo=1,Ia(Yr.buffers,Cn.segments,n,i,Yr.program,pe,R,F,On)),On.u_is_halo=0}Ia(Yr.buffers,Cn.segments,n,i,Yr.program,pe,R,F,Yr.uniformValues)}}function Ia(i,o,n,s,p,f,d,v,w){var A=s.context;p.draw(A,A.gl.TRIANGLES,f,d,v,ie.disabled,w,n.id,i.layoutVertexBuffer,i.indexBuffer,o,n.paint,s.transform.zoom,i.programConfigurations.get(n.id),i.dynamicLayoutVertexBuffer,i.opacityVertexBuffer)}function os(i,o,n,s,p,f,d){var v,w,A,R,F,O=i.context.gl,W=n.paint.get("fill-pattern"),Z=W&&W.constantOr(1),ee=n.getCrossfadeParameters();d?(w=Z&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",v=O.LINES):(w=Z?"fillPattern":"fill",v=O.TRIANGLES);for(var N=0,Q=s;N<Q.length;N+=1){var ne=Q[N],ue=o.getTile(ne);if(!Z||ue.patternsLoaded()){var me=ue.getBucket(n);if(me){var pe=me.programConfigurations.get(n.id),ve=i.useProgram(w,pe);Z&&(i.context.activeTexture.set(O.TEXTURE0),ue.imageAtlasTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE),pe.updatePaintBuffers(ee));var Te=W.constantOr(null);if(Te&&ue.imageAtlas){var ke=ue.imageAtlas,Ce=ke.patternPositions[Te.to.toString()],$e=ke.patternPositions[Te.from.toString()];Ce&&$e&&pe.setConstantPatternPositions(Ce,$e)}var nt=i.translatePosMatrix(ne.posMatrix,ue,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(d){R=me.indexBuffer2,F=me.segments2;var ut=[O.drawingBufferWidth,O.drawingBufferHeight];A=w==="fillOutlinePattern"&&Z?wl(nt,i,ee,ue,ut):bl(nt,ut)}else R=me.indexBuffer,F=me.segments,A=Z?Io(nt,i,ee,ue):Yn(nt);ve.draw(i.context,v,p,i.stencilModeForClipping(ne),f,ie.disabled,A,n.id,me.layoutVertexBuffer,R,F,n.paint,i.transform.zoom,pe)}}}}function pu(i,o,n,s,p,f,d){for(var v=i.context,w=v.gl,A=n.paint.get("fill-extrusion-pattern"),R=A.constantOr(1),F=n.getCrossfadeParameters(),O=n.paint.get("fill-extrusion-opacity"),W=0,Z=s;W<Z.length;W+=1){var ee=Z[W],N=o.getTile(ee),Q=N.getBucket(n);if(Q){var ne=Q.programConfigurations.get(n.id),ue=i.useProgram(R?"fillExtrusionPattern":"fillExtrusion",ne);R&&(i.context.activeTexture.set(w.TEXTURE0),N.imageAtlasTexture.bind(w.LINEAR,w.CLAMP_TO_EDGE),ne.updatePaintBuffers(F));var me=A.constantOr(null);if(me&&N.imageAtlas){var pe=N.imageAtlas,ve=pe.patternPositions[me.to.toString()],Te=pe.patternPositions[me.from.toString()];ve&&Te&&ne.setConstantPatternPositions(ve,Te)}var ke=i.translatePosMatrix(ee.posMatrix,N,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),Ce=n.paint.get("fill-extrusion-vertical-gradient"),$e=R?So(ke,i,Ce,O,ee,F,N):xl(ke,i,Ce,O);ue.draw(v,v.gl.TRIANGLES,p,f,d,ie.backCCW,$e,n.id,Q.layoutVertexBuffer,Q.indexBuffer,Q.segments,n.paint,i.transform.zoom,ne)}}}function as(i,o,n,s,p,f){var d=i.context,v=d.gl,w=o.fbo;if(w){var A=i.useProgram("hillshade");d.activeTexture.set(v.TEXTURE0),v.bindTexture(v.TEXTURE_2D,w.colorAttachment.get());var R=(function(F,O,W){var Z=W.paint.get("hillshade-shadow-color"),ee=W.paint.get("hillshade-highlight-color"),N=W.paint.get("hillshade-accent-color"),Q=W.paint.get("hillshade-illumination-direction")*(Math.PI/180);W.paint.get("hillshade-illumination-anchor")==="viewport"&&(Q-=F.transform.angle);var ne,ue,me,pe=!F.options.moving;return{u_matrix:F.transform.calculatePosMatrix(O.tileID.toUnwrapped(),pe),u_image:0,u_latrange:(ne=O.tileID,ue=Math.pow(2,ne.canonical.z),me=ne.canonical.y,[new u.MercatorCoordinate(0,me/ue).toLngLat().lat,new u.MercatorCoordinate(0,(me+1)/ue).toLngLat().lat]),u_light:[W.paint.get("hillshade-exaggeration"),Q],u_shadow:Z,u_highlight:ee,u_accent:N}})(i,o,n);A.draw(d,v.TRIANGLES,s,p,f,ie.disabled,R,n.id,i.rasterBoundsBuffer,i.quadTriangleIndexBuffer,i.rasterBoundsSegments)}}function Vc(i,o,n,s,p,f){var d=i.context,v=d.gl,w=o.dem;if(w&&w.data){var A=w.dim,R=w.stride,F=w.getPixels();if(d.activeTexture.set(v.TEXTURE1),d.pixelStoreUnpackPremultiplyAlpha.set(!1),o.demTexture=o.demTexture||i.getTileTexture(R),o.demTexture){var O=o.demTexture;O.update(F,{premultiply:!1}),O.bind(v.NEAREST,v.CLAMP_TO_EDGE)}else o.demTexture=new u.Texture(d,F,v.RGBA,{premultiply:!1}),o.demTexture.bind(v.NEAREST,v.CLAMP_TO_EDGE);d.activeTexture.set(v.TEXTURE0);var W=o.fbo;if(!W){var Z=new u.Texture(d,{width:A,height:A,data:null},v.RGBA);Z.bind(v.LINEAR,v.CLAMP_TO_EDGE),(W=o.fbo=d.createFramebuffer(A,A,!0)).colorAttachment.set(Z.texture)}d.bindFramebuffer.set(W.framebuffer),d.viewport.set([0,0,A,A]),i.useProgram("hillshadePrepare").draw(d,v.TRIANGLES,s,p,f,ie.disabled,(function(ee,N){var Q=N.stride,ne=u.create();return u.ortho(ne,0,u.EXTENT,-u.EXTENT,0,0,1),u.translate(ne,ne,[0,-u.EXTENT,0]),{u_matrix:ne,u_image:1,u_dimension:[Q,Q],u_zoom:ee.overscaledZ,u_unpack:N.getUnpackVector()}})(o.tileID,w),n.id,i.rasterBoundsBuffer,i.quadTriangleIndexBuffer,i.rasterBoundsSegments),o.needsHillshadePrepare=!1}}function ss(i,o,n,s,p){var f=s.paint.get("raster-fade-duration");if(f>0){var d=u.browser.now(),v=(d-i.timeAdded)/f,w=o?(d-o.timeAdded)/f:-1,A=n.getSource(),R=p.coveringZoomLevel({tileSize:A.tileSize,roundZoom:A.roundZoom}),F=!o||Math.abs(o.tileID.overscaledZ-R)>Math.abs(i.tileID.overscaledZ-R),O=F&&i.refreshedUponExpiration?1:u.clamp(F?v:1-w,0,1);return i.refreshedUponExpiration&&v>=1&&(i.refreshedUponExpiration=!1),o?{opacity:1,mix:1-O}:{opacity:O,mix:0}}return{opacity:1,mix:0}}var hu=new u.Color(1,0,0,1),Ml=new u.Color(0,1,0,1),Bl=new u.Color(0,0,1,1),us=new u.Color(1,0,1,1),fu=new u.Color(0,1,1,1);function du(i,o,n,s){Ta(i,0,o+n/2,i.transform.width,n,s)}function mu(i,o,n,s){Ta(i,o-n/2,0,n,i.transform.height,s)}function Ta(i,o,n,s,p,f){var d=i.context,v=d.gl;v.enable(v.SCISSOR_TEST),v.scissor(o*u.browser.devicePixelRatio,n*u.browser.devicePixelRatio,s*u.browser.devicePixelRatio,p*u.browser.devicePixelRatio),d.clear({color:f}),v.disable(v.SCISSOR_TEST)}function zl(i,o,n){var s=i.context,p=s.gl,f=n.posMatrix,d=i.useProgram("debug"),v=V.disabled,w=$.disabled,A=i.colorModeForRenderPass();s.activeTexture.set(p.TEXTURE0),i.emptyTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),d.draw(s,p.LINE_STRIP,v,w,A,ie.disabled,Ao(f,u.Color.red),"$debug",i.debugBuffer,i.tileBorderIndexBuffer,i.debugSegments);var R=o.getTileByID(n.key).latestRawTileData,F=Math.floor((R&&R.byteLength||0)/1024),O=o.getTile(n).tileSize,W=512/Math.min(O,512)*(n.overscaledZ/i.transform.zoom)*.5,Z=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(Z+=" => "+n.overscaledZ),(function(ee,N){ee.initDebugOverlayCanvas();var Q=ee.debugOverlayCanvas,ne=ee.context.gl,ue=ee.debugOverlayCanvas.getContext("2d");ue.clearRect(0,0,Q.width,Q.height),ue.shadowColor="white",ue.shadowBlur=2,ue.lineWidth=1.5,ue.strokeStyle="white",ue.textBaseline="top",ue.font="bold 36px Open Sans, sans-serif",ue.fillText(N,5,5),ue.strokeText(N,5,5),ee.debugOverlayTexture.update(Q),ee.debugOverlayTexture.bind(ne.LINEAR,ne.CLAMP_TO_EDGE)})(i,Z+" "+F+"kb"),d.draw(s,p.TRIANGLES,v,w,re.alphaBlended,ie.disabled,Ao(f,u.Color.transparent,W),"$debug",i.debugBuffer,i.quadTriangleIndexBuffer,i.debugSegments)}var Co={symbol:function(i,o,n,s,p){if(i.renderPass==="translucent"){var f=$.disabled,d=i.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&(function(v,w,A,R,F,O,W){for(var Z=w.transform,ee=F==="map",N=O==="map",Q=0,ne=v;Q<ne.length;Q+=1){var ue=ne[Q],me=R.getTile(ue),pe=me.getBucket(A);if(pe&&pe.text&&pe.text.segments.get().length){var ve=u.evaluateSizeForZoom(pe.textSizeData,Z.zoom),Te=yr(me,1,w.transform.zoom),ke=Cr(ue.posMatrix,N,ee,w.transform,Te),Ce=A.layout.get("icon-text-fit")!=="none"&&pe.hasIconData();if(ve){var $e=Math.pow(2,Z.zoom-me.tileID.overscaledZ);Cl(pe,ee,N,W,u.symbolSize,Z,ke,ue.posMatrix,$e,ve,Ce)}}}})(s,i,n,o,n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),p),n.paint.get("icon-opacity").constantOr(1)!==0&&Po(i,o,n,s,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),f,d),n.paint.get("text-opacity").constantOr(1)!==0&&Po(i,o,n,s,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),f,d),o.map.showCollisionBoxes&&(Yo(i,o,n,s,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),!0),Yo(i,o,n,s,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),!1))}},circle:function(i,o,n,s){if(i.renderPass==="translucent"){var p=n.paint.get("circle-opacity"),f=n.paint.get("circle-stroke-width"),d=n.paint.get("circle-stroke-opacity"),v=n.layout.get("circle-sort-key").constantOr(1)!==void 0;if(p.constantOr(1)!==0||f.constantOr(1)!==0&&d.constantOr(1)!==0){for(var w=i.context,A=w.gl,R=i.depthModeForSublayer(0,V.ReadOnly),F=$.disabled,O=i.colorModeForRenderPass(),W=[],Z=0;Z<s.length;Z++){var ee=s[Z],N=o.getTile(ee),Q=N.getBucket(n);if(Q){var ne=Q.programConfigurations.get(n.id),ue={programConfiguration:ne,program:i.useProgram("circle",ne),layoutVertexBuffer:Q.layoutVertexBuffer,indexBuffer:Q.indexBuffer,uniformValues:cu(i,ee,N,n)};if(v)for(var me=0,pe=Q.segments.get();me<pe.length;me+=1){var ve=pe[me];W.push({segments:new u.SegmentVector([ve]),sortKey:ve.sortKey,state:ue})}else W.push({segments:Q.segments,sortKey:0,state:ue})}}v&&W.sort((function(nt,ut){return nt.sortKey-ut.sortKey}));for(var Te=0,ke=W;Te<ke.length;Te+=1){var Ce=ke[Te],$e=Ce.state;$e.program.draw(w,A.TRIANGLES,R,F,O,ie.disabled,$e.uniformValues,n.id,$e.layoutVertexBuffer,$e.indexBuffer,Ce.segments,n.paint,i.transform.zoom,$e.programConfiguration)}}}},heatmap:function(i,o,n,s){if(n.paint.get("heatmap-opacity")!==0)if(i.renderPass==="offscreen"){var p=i.context,f=p.gl,d=$.disabled,v=new re([f.ONE,f.ONE],u.Color.transparent,[!0,!0,!0,!0]);(function(W,Z,ee){var N=W.gl;W.activeTexture.set(N.TEXTURE1),W.viewport.set([0,0,Z.width/4,Z.height/4]);var Q=ee.heatmapFbo;if(Q)N.bindTexture(N.TEXTURE_2D,Q.colorAttachment.get()),W.bindFramebuffer.set(Q.framebuffer);else{var ne=N.createTexture();N.bindTexture(N.TEXTURE_2D,ne),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.LINEAR),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.LINEAR),Q=ee.heatmapFbo=W.createFramebuffer(Z.width/4,Z.height/4,!1),(function(ue,me,pe,ve){var Te=ue.gl;Te.texImage2D(Te.TEXTURE_2D,0,Te.RGBA,me.width/4,me.height/4,0,Te.RGBA,ue.extRenderToTextureHalfFloat?ue.extTextureHalfFloat.HALF_FLOAT_OES:Te.UNSIGNED_BYTE,null),ve.colorAttachment.set(pe)})(W,Z,ne,Q)}})(p,i,n),p.clear({color:u.Color.transparent});for(var w=0;w<s.length;w++){var A=s[w];if(!o.hasRenderableParent(A)){var R=o.getTile(A),F=R.getBucket(n);if(F){var O=F.programConfigurations.get(n.id);i.useProgram("heatmap",O).draw(p,f.TRIANGLES,V.disabled,d,v,ie.disabled,Il(A.posMatrix,R,i.transform.zoom,n.paint.get("heatmap-intensity")),n.id,F.layoutVertexBuffer,F.indexBuffer,F.segments,n.paint,i.transform.zoom,O)}}}p.viewport.set([0,0,i.width,i.height])}else i.renderPass==="translucent"&&(i.context.setColorMode(i.colorModeForRenderPass()),(function(W,Z){var ee=W.context,N=ee.gl,Q=Z.heatmapFbo;if(Q){ee.activeTexture.set(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,Q.colorAttachment.get()),ee.activeTexture.set(N.TEXTURE1);var ne=Z.colorRampTexture;ne||(ne=Z.colorRampTexture=new u.Texture(ee,Z.colorRamp,N.RGBA)),ne.bind(N.LINEAR,N.CLAMP_TO_EDGE),W.useProgram("heatmapTexture").draw(ee,N.TRIANGLES,V.disabled,$.disabled,W.colorModeForRenderPass(),ie.disabled,(function(ue,me,pe,ve){var Te=u.create();u.ortho(Te,0,ue.width,ue.height,0,0,1);var ke=ue.context.gl;return{u_matrix:Te,u_world:[ke.drawingBufferWidth,ke.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:me.paint.get("heatmap-opacity")}})(W,Z),Z.id,W.viewportBuffer,W.quadTriangleIndexBuffer,W.viewportSegments,Z.paint,W.transform.zoom)}})(i,n))},line:function(i,o,n,s){if(i.renderPass==="translucent"){var p=n.paint.get("line-opacity"),f=n.paint.get("line-width");if(p.constantOr(1)!==0&&f.constantOr(1)!==0)for(var d=i.depthModeForSublayer(0,V.ReadOnly),v=i.colorModeForRenderPass(),w=n.paint.get("line-dasharray"),A=n.paint.get("line-pattern"),R=A.constantOr(1),F=n.paint.get("line-gradient"),O=n.getCrossfadeParameters(),W=R?"linePattern":w?"lineSDF":F?"lineGradient":"line",Z=i.context,ee=Z.gl,N=!0,Q=0,ne=s;Q<ne.length;Q+=1){var ue=ne[Q],me=o.getTile(ue);if(!R||me.patternsLoaded()){var pe=me.getBucket(n);if(pe){var ve=pe.programConfigurations.get(n.id),Te=i.context.program.get(),ke=i.useProgram(W,ve),Ce=N||ke.program!==Te,$e=A.constantOr(null);if($e&&me.imageAtlas){var nt=me.imageAtlas,ut=nt.patternPositions[$e.to.toString()],st=nt.patternPositions[$e.from.toString()];ut&&st&&ve.setConstantPatternPositions(ut,st)}var Ft=R?rs(i,me,n,O):w?Fc(i,me,n,w,O):F?ur(i,me,n,pe.lineClipsArray.length):ba(i,me,n);if(R)Z.activeTexture.set(ee.TEXTURE0),me.imageAtlasTexture.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),ve.updatePaintBuffers(O);else if(w&&(Ce||i.lineAtlas.dirty))Z.activeTexture.set(ee.TEXTURE0),i.lineAtlas.bind(Z);else if(F){var We=pe.gradients[n.id],mt=We.texture;if(n.gradientVersion!==We.version){var xt=256;if(n.stepInterpolant){var dt=o.getSource().maxzoom,ft=ue.canonical.z===dt?Math.ceil(1<<i.transform.maxZoom-ue.canonical.z):1;xt=u.clamp(u.nextPowerOfTwo(pe.maxLineLength/u.EXTENT*1024*ft),256,Z.maxTextureSize)}We.gradient=u.renderColorRamp({expression:n.gradientExpression(),evaluationKey:"lineProgress",resolution:xt,image:We.gradient||void 0,clips:pe.lineClipsArray}),We.texture?We.texture.update(We.gradient):We.texture=new u.Texture(Z,We.gradient,ee.RGBA),We.version=n.gradientVersion,mt=We.texture}Z.activeTexture.set(ee.TEXTURE0),mt.bind(n.stepInterpolant?ee.NEAREST:ee.LINEAR,ee.CLAMP_TO_EDGE)}ke.draw(Z,ee.TRIANGLES,d,i.stencilModeForClipping(ue),v,ie.disabled,Ft,n.id,pe.layoutVertexBuffer,pe.indexBuffer,pe.segments,n.paint,i.transform.zoom,ve,pe.layoutVertexBuffer2),N=!1}}}}},fill:function(i,o,n,s){var p=n.paint.get("fill-color"),f=n.paint.get("fill-opacity");if(f.constantOr(1)!==0){var d=i.colorModeForRenderPass(),v=n.paint.get("fill-pattern"),w=i.opaquePassEnabledForLayer()&&!v.constantOr(1)&&p.constantOr(u.Color.transparent).a===1&&f.constantOr(0)===1?"opaque":"translucent";if(i.renderPass===w){var A=i.depthModeForSublayer(1,i.renderPass==="opaque"?V.ReadWrite:V.ReadOnly);os(i,o,n,s,A,d,!1)}if(i.renderPass==="translucent"&&n.paint.get("fill-antialias")){var R=i.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,V.ReadOnly);os(i,o,n,s,R,d,!0)}}},"fill-extrusion":function(i,o,n,s){var p=n.paint.get("fill-extrusion-opacity");if(p!==0&&i.renderPass==="translucent"){var f=new V(i.context.gl.LEQUAL,V.ReadWrite,i.depthRangeFor3D);if(p!==1||n.paint.get("fill-extrusion-pattern").constantOr(1))pu(i,o,n,s,f,$.disabled,re.disabled),pu(i,o,n,s,f,i.stencilModeFor3D(),i.colorModeForRenderPass());else{var d=i.colorModeForRenderPass();pu(i,o,n,s,f,$.disabled,d)}}},hillshade:function(i,o,n,s){if(i.renderPass==="offscreen"||i.renderPass==="translucent"){for(var p=i.context,f=i.depthModeForSublayer(0,V.ReadOnly),d=i.colorModeForRenderPass(),v=i.renderPass==="translucent"?i.stencilConfigForOverlap(s):[{},s],w=v[0],A=0,R=v[1];A<R.length;A+=1){var F=R[A],O=o.getTile(F);O.needsHillshadePrepare&&i.renderPass==="offscreen"?Vc(i,O,n,f,$.disabled,d):i.renderPass==="translucent"&&as(i,O,n,f,w[F.overscaledZ],d)}p.viewport.set([0,0,i.width,i.height])}},raster:function(i,o,n,s){if(i.renderPass==="translucent"&&n.paint.get("raster-opacity")!==0&&s.length)for(var p=i.context,f=p.gl,d=o.getSource(),v=i.useProgram("raster"),w=i.colorModeForRenderPass(),A=d instanceof Xr?[{},s]:i.stencilConfigForOverlap(s),R=A[0],F=A[1],O=F[F.length-1].overscaledZ,W=!i.options.moving,Z=0,ee=F;Z<ee.length;Z+=1){var N=ee[Z],Q=i.depthModeForSublayer(N.overscaledZ-O,n.paint.get("raster-opacity")===1?V.ReadWrite:V.ReadOnly,f.LESS),ne=o.getTile(N),ue=i.transform.calculatePosMatrix(N.toUnwrapped(),W);ne.registerFadeDuration(n.paint.get("raster-fade-duration"));var me=o.findLoadedParent(N,0),pe=ss(ne,me,o,n,i.transform),ve=void 0,Te=void 0,ke=n.paint.get("raster-resampling")==="nearest"?f.NEAREST:f.LINEAR;p.activeTexture.set(f.TEXTURE0),ne.texture.bind(ke,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),p.activeTexture.set(f.TEXTURE1),me?(me.texture.bind(ke,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST),ve=Math.pow(2,me.tileID.overscaledZ-ne.tileID.overscaledZ),Te=[ne.tileID.canonical.x*ve%1,ne.tileID.canonical.y*ve%1]):ne.texture.bind(ke,f.CLAMP_TO_EDGE,f.LINEAR_MIPMAP_NEAREST);var Ce=Oc(ue,Te||[0,0],ve||1,pe,n);d instanceof Xr?v.draw(p,f.TRIANGLES,Q,$.disabled,w,ie.disabled,Ce,n.id,d.boundsBuffer,i.quadTriangleIndexBuffer,d.boundsSegments):v.draw(p,f.TRIANGLES,Q,R[N.overscaledZ],w,ie.disabled,Ce,n.id,i.rasterBoundsBuffer,i.quadTriangleIndexBuffer,i.rasterBoundsSegments)}},background:function(i,o,n){var s=n.paint.get("background-color"),p=n.paint.get("background-opacity");if(p!==0){var f=i.context,d=f.gl,v=i.transform,w=v.tileSize,A=n.paint.get("background-pattern");if(!i.isPatternMissing(A)){var R=!A&&s.a===1&&p===1&&i.opaquePassEnabledForLayer()?"opaque":"translucent";if(i.renderPass===R){var F=$.disabled,O=i.depthModeForSublayer(0,R==="opaque"?V.ReadWrite:V.ReadOnly),W=i.colorModeForRenderPass(),Z=i.useProgram(A?"backgroundPattern":"background"),ee=v.coveringTiles({tileSize:w});A&&(f.activeTexture.set(d.TEXTURE0),i.imageManager.bind(i.context));for(var N=n.getCrossfadeParameters(),Q=0,ne=ee;Q<ne.length;Q+=1){var ue=ne[Q],me=i.transform.calculatePosMatrix(ue.toUnwrapped()),pe=A?Jo(me,p,i,A,{tileID:ue,tileSize:w},N):Sa(me,p,s);Z.draw(f,d.TRIANGLES,O,F,W,ie.disabled,pe,n.id,i.tileExtentBuffer,i.quadTriangleIndexBuffer,i.tileExtentSegments)}}}}},debug:function(i,o,n){for(var s=0;s<n.length;s++)zl(i,o,n[s])},custom:function(i,o,n){var s=i.context,p=n.implementation;if(i.renderPass==="offscreen"){var f=p.prerender;f&&(i.setCustomLayerDefaults(),s.setColorMode(i.colorModeForRenderPass()),f.call(p,s.gl,i.transform.customLayerMatrix()),s.setDirty(),i.setBaseState())}else if(i.renderPass==="translucent"){i.setCustomLayerDefaults(),s.setColorMode(i.colorModeForRenderPass()),s.setStencilMode($.disabled);var d=p.renderingMode==="3d"?new V(i.context.gl.LEQUAL,V.ReadWrite,i.depthRangeFor3D):i.depthModeForSublayer(0,V.ReadOnly);s.setDepthMode(d),p.render(s.gl,i.transform.customLayerMatrix()),s.setDirty(),i.setBaseState(),s.bindFramebuffer.set(null)}}},vr=function(i,o){this.context=new L(i),this.transform=o,this._tileTextures={},this.setup(),this.numSublayers=H.maxUnderzooming+H.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $n,this.gpuTimers={}};vr.prototype.resize=function(i,o){if(this.width=i*u.browser.devicePixelRatio,this.height=o*u.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,s=this.style._order;n<s.length;n+=1)this.style._layers[s[n]].resize()},vr.prototype.setup=function(){var i=this.context,o=new u.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(u.EXTENT,0),o.emplaceBack(0,u.EXTENT),o.emplaceBack(u.EXTENT,u.EXTENT),this.tileExtentBuffer=i.createVertexBuffer(o,Vr.members),this.tileExtentSegments=u.SegmentVector.simpleSegment(0,0,4,2);var n=new u.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(u.EXTENT,0),n.emplaceBack(0,u.EXTENT),n.emplaceBack(u.EXTENT,u.EXTENT),this.debugBuffer=i.createVertexBuffer(n,Vr.members),this.debugSegments=u.SegmentVector.simpleSegment(0,0,4,5);var s=new u.StructArrayLayout4i8;s.emplaceBack(0,0,0,0),s.emplaceBack(u.EXTENT,0,u.EXTENT,0),s.emplaceBack(0,u.EXTENT,0,u.EXTENT),s.emplaceBack(u.EXTENT,u.EXTENT,u.EXTENT,u.EXTENT),this.rasterBoundsBuffer=i.createVertexBuffer(s,Lr.members),this.rasterBoundsSegments=u.SegmentVector.simpleSegment(0,0,4,2);var p=new u.StructArrayLayout2i4;p.emplaceBack(0,0),p.emplaceBack(1,0),p.emplaceBack(0,1),p.emplaceBack(1,1),this.viewportBuffer=i.createVertexBuffer(p,Vr.members),this.viewportSegments=u.SegmentVector.simpleSegment(0,0,4,2);var f=new u.StructArrayLayout1ui2;f.emplaceBack(0),f.emplaceBack(1),f.emplaceBack(3),f.emplaceBack(2),f.emplaceBack(0),this.tileBorderIndexBuffer=i.createIndexBuffer(f);var d=new u.StructArrayLayout3ui6;d.emplaceBack(0,1,2),d.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=i.createIndexBuffer(d),this.emptyTexture=new u.Texture(i,{width:1,height:1,data:new Uint8Array([0,0,0,0])},i.gl.RGBA);var v=this.context.gl;this.stencilClearMode=new $({func:v.ALWAYS,mask:0},0,255,v.ZERO,v.ZERO,v.ZERO)},vr.prototype.clearStencil=function(){var i=this.context,o=i.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var n=u.create();u.ortho(n,0,this.width,this.height,0,0,1),u.scale(n,n,[o.drawingBufferWidth,o.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(i,o.TRIANGLES,V.disabled,this.stencilClearMode,re.disabled,ie.disabled,Eo(n),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},vr.prototype._renderTileClippingMasks=function(i,o){if(this.currentStencilSource!==i.source&&i.isTileClipped()&&o&&o.length){this.currentStencilSource=i.source;var n=this.context,s=n.gl;this.nextStencilID+o.length>256&&this.clearStencil(),n.setColorMode(re.disabled),n.setDepthMode(V.disabled);var p=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var f=0,d=o;f<d.length;f+=1){var v=d[f],w=this._tileClippingMaskIDs[v.key]=this.nextStencilID++;p.draw(n,s.TRIANGLES,V.disabled,new $({func:s.ALWAYS,mask:0},w,255,s.KEEP,s.KEEP,s.REPLACE),re.disabled,ie.disabled,Eo(v.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},vr.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var i=this.nextStencilID++,o=this.context.gl;return new $({func:o.NOTEQUAL,mask:255},i,255,o.KEEP,o.KEEP,o.REPLACE)},vr.prototype.stencilModeForClipping=function(i){var o=this.context.gl;return new $({func:o.EQUAL,mask:255},this._tileClippingMaskIDs[i.key],0,o.KEEP,o.KEEP,o.REPLACE)},vr.prototype.stencilConfigForOverlap=function(i){var o,n=this.context.gl,s=i.sort((function(w,A){return A.overscaledZ-w.overscaledZ})),p=s[s.length-1].overscaledZ,f=s[0].overscaledZ-p+1;if(f>1){this.currentStencilSource=void 0,this.nextStencilID+f>256&&this.clearStencil();for(var d={},v=0;v<f;v++)d[v+p]=new $({func:n.GEQUAL,mask:255},v+this.nextStencilID,255,n.KEEP,n.KEEP,n.REPLACE);return this.nextStencilID+=f,[d,s]}return[(o={},o[p]=$.disabled,o),s]},vr.prototype.colorModeForRenderPass=function(){var i=this.context.gl;return this._showOverdrawInspector?new re([i.CONSTANT_COLOR,i.ONE],new u.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?re.unblended:re.alphaBlended},vr.prototype.depthModeForSublayer=function(i,o,n){if(!this.opaquePassEnabledForLayer())return V.disabled;var s=1-((1+this.currentLayer)*this.numSublayers+i)*this.depthEpsilon;return new V(n||this.context.gl.LEQUAL,o,[s,s])},vr.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},vr.prototype.render=function(i,o){var n=this;this.style=i,this.options=o,this.lineAtlas=i.lineAtlas,this.imageManager=i.imageManager,this.glyphManager=i.glyphManager,this.symbolFadeChange=i.placement.symbolFadeChange(u.browser.now()),this.imageManager.beginFrame();var s=this.style._order,p=this.style.sourceCaches;for(var f in p){var d=p[f];d.used&&d.prepare(this.context)}var v,w,A={},R={},F={};for(var O in p){var W=p[O];A[O]=W.getVisibleCoordinates(),R[O]=A[O].slice().reverse(),F[O]=W.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Z=0;Z<s.length;Z++)if(this.style._layers[s[Z]].is3D()){this.opaquePassCutoff=Z;break}this.renderPass="offscreen";for(var ee=0,N=s;ee<N.length;ee+=1){var Q=this.style._layers[N[ee]];if(Q.hasOffscreenPass()&&!Q.isHidden(this.transform.zoom)){var ne=R[Q.source];(Q.type==="custom"||ne.length)&&this.renderLayer(this,p[Q.source],Q,ne)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:o.showOverdrawInspector?u.Color.black:u.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=o.showOverdrawInspector,this.depthRangeFor3D=[0,1-(i._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=s.length-1;this.currentLayer>=0;this.currentLayer--){var ue=this.style._layers[s[this.currentLayer]],me=p[ue.source],pe=A[ue.source];this._renderTileClippingMasks(ue,pe),this.renderLayer(this,me,ue,pe)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<s.length;this.currentLayer++){var ve=this.style._layers[s[this.currentLayer]],Te=p[ve.source],ke=(ve.type==="symbol"?F:R)[ve.source];this._renderTileClippingMasks(ve,A[ve.source]),this.renderLayer(this,Te,ve,ke)}this.options.showTileBoundaries&&(u.values(this.style._layers).forEach((function(Ce){Ce.source&&!Ce.isHidden(n.transform.zoom)&&(Ce.source!==(w&&w.id)&&(w=n.style.sourceCaches[Ce.source]),(!v||v.getSource().maxzoom<w.getSource().maxzoom)&&(v=w))})),v&&Co.debug(this,v,v.getVisibleCoordinates())),this.options.showPadding&&(function(Ce){var $e=Ce.transform.padding;du(Ce,Ce.transform.height-($e.top||0),3,hu),du(Ce,$e.bottom||0,3,Ml),mu(Ce,$e.left||0,3,Bl),mu(Ce,Ce.transform.width-($e.right||0),3,us);var nt=Ce.transform.centerPoint;(function(ut,st,Ft,We){Ta(ut,st-1,Ft-10,2,20,We),Ta(ut,st-10,Ft-1,20,2,We)})(Ce,nt.x,Ce.transform.height-nt.y,fu)})(this),this.context.setDefault()},vr.prototype.renderLayer=function(i,o,n,s){n.isHidden(this.transform.zoom)||(n.type==="background"||n.type==="custom"||s.length)&&(this.id=n.id,this.gpuTimingStart(n),Co[n.type](i,o,n,s,this.style.placement.variableOffsets),this.gpuTimingEnd())},vr.prototype.gpuTimingStart=function(i){if(this.options.gpuTiming){var o=this.context.extTimerQuery,n=this.gpuTimers[i.id];n||(n=this.gpuTimers[i.id]={calls:0,cpuTime:0,query:o.createQueryEXT()}),n.calls++,o.beginQueryEXT(o.TIME_ELAPSED_EXT,n.query)}},vr.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var i=this.context.extTimerQuery;i.endQueryEXT(i.TIME_ELAPSED_EXT)}},vr.prototype.collectGpuTimers=function(){var i=this.gpuTimers;return this.gpuTimers={},i},vr.prototype.queryGpuTimers=function(i){var o={};for(var n in i){var s=i[n],p=this.context.extTimerQuery,f=p.getQueryObjectEXT(s.query,p.QUERY_RESULT_EXT)/1e6;p.deleteQueryEXT(s.query),o[n]=f}return o},vr.prototype.translatePosMatrix=function(i,o,n,s,p){if(!n[0]&&!n[1])return i;var f=p?s==="map"?this.transform.angle:0:s==="viewport"?-this.transform.angle:0;if(f){var d=Math.sin(f),v=Math.cos(f);n=[n[0]*v-n[1]*d,n[0]*d+n[1]*v]}var w=[p?n[0]:yr(o,n[0],this.transform.zoom),p?n[1]:yr(o,n[1],this.transform.zoom),0],A=new Float32Array(16);return u.translate(A,i,w),A},vr.prototype.saveTileTexture=function(i){var o=this._tileTextures[i.size[0]];o?o.push(i):this._tileTextures[i.size[0]]=[i]},vr.prototype.getTileTexture=function(i){var o=this._tileTextures[i];return o&&o.length>0?o.pop():null},vr.prototype.isPatternMissing=function(i){if(!i)return!1;if(!i.from||!i.to)return!0;var o=this.imageManager.getPattern(i.from.toString()),n=this.imageManager.getPattern(i.to.toString());return!o||!n},vr.prototype.useProgram=function(i,o){this.cache=this.cache||{};var n=""+i+(o?o.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new gl(this.context,i,Lc[i],o,El[i],this._showOverdrawInspector)),this.cache[n]},vr.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()},vr.prototype.setBaseState=function(){var i=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(i.FUNC_ADD)},vr.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=u.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},vr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ls=function(i,o){this.points=i,this.planes=o};ls.fromInvProjectionMatrix=function(i,o,n){var s=Math.pow(2,n),p=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(d){return u.transformMat4([],d,i)})).map((function(d){return u.scale$1([],d,1/d[3]/o*s)})),f=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(d){var v=u.sub([],p[d[0]],p[d[1]]),w=u.sub([],p[d[2]],p[d[1]]),A=u.normalize([],u.cross([],v,w)),R=-u.dot(A,p[d[1]]);return A.concat(R)}));return new ls(p,f)};var ko=function(i,o){this.min=i,this.max=o,this.center=u.scale$2([],u.add([],this.min,this.max),.5)};ko.prototype.quadrant=function(i){for(var o=[i%2==0,i<2],n=u.clone$2(this.min),s=u.clone$2(this.max),p=0;p<o.length;p++)n[p]=o[p]?this.min[p]:this.center[p],s[p]=o[p]?this.center[p]:this.max[p];return s[2]=this.max[2],new ko(n,s)},ko.prototype.distanceX=function(i){return Math.max(Math.min(this.max[0],i[0]),this.min[0])-i[0]},ko.prototype.distanceY=function(i){return Math.max(Math.min(this.max[1],i[1]),this.min[1])-i[1]},ko.prototype.intersects=function(i){for(var o=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],n=!0,s=0;s<i.planes.length;s++){for(var p=i.planes[s],f=0,d=0;d<o.length;d++)f+=u.dot$1(p,o[d])>=0;if(f===0)return 0;f!==o.length&&(n=!1)}if(n)return 2;for(var v=0;v<3;v++){for(var w=Number.MAX_VALUE,A=-Number.MAX_VALUE,R=0;R<i.points.length;R++){var F=i.points[R][v]-this.min[v];w=Math.min(w,F),A=Math.max(A,F)}if(A<0||w>this.max[v]-this.min[v])return 0}return 1};var Qn=function(i,o,n,s){if(i===void 0&&(i=0),o===void 0&&(o=0),n===void 0&&(n=0),s===void 0&&(s=0),isNaN(i)||i<0||isNaN(o)||o<0||isNaN(n)||n<0||isNaN(s)||s<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=i,this.bottom=o,this.left=n,this.right=s};Qn.prototype.interpolate=function(i,o,n){return o.top!=null&&i.top!=null&&(this.top=u.number(i.top,o.top,n)),o.bottom!=null&&i.bottom!=null&&(this.bottom=u.number(i.bottom,o.bottom,n)),o.left!=null&&i.left!=null&&(this.left=u.number(i.left,o.left,n)),o.right!=null&&i.right!=null&&(this.right=u.number(i.right,o.right,n)),this},Qn.prototype.getCenter=function(i,o){var n=u.clamp((this.left+i-this.right)/2,0,i),s=u.clamp((this.top+o-this.bottom)/2,0,o);return new u.Point(n,s)},Qn.prototype.equals=function(i){return this.top===i.top&&this.bottom===i.bottom&&this.left===i.left&&this.right===i.right},Qn.prototype.clone=function(){return new Qn(this.top,this.bottom,this.left,this.right)},Qn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Dt=function(i,o,n,s,p){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=p===void 0||p,this._minZoom=i||0,this._maxZoom=o||22,this._minPitch=n??0,this._maxPitch=s??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new u.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Qn,this._posMatrixCache={},this._alignedPosMatrixCache={}},lr={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}};Dt.prototype.clone=function(){var i=new Dt(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return i.tileSize=this.tileSize,i.latRange=this.latRange,i.width=this.width,i.height=this.height,i._center=this._center,i.zoom=this.zoom,i.angle=this.angle,i._fov=this._fov,i._pitch=this._pitch,i._unmodified=this._unmodified,i._edgeInsets=this._edgeInsets.clone(),i._calcMatrices(),i},lr.minZoom.get=function(){return this._minZoom},lr.minZoom.set=function(i){this._minZoom!==i&&(this._minZoom=i,this.zoom=Math.max(this.zoom,i))},lr.maxZoom.get=function(){return this._maxZoom},lr.maxZoom.set=function(i){this._maxZoom!==i&&(this._maxZoom=i,this.zoom=Math.min(this.zoom,i))},lr.minPitch.get=function(){return this._minPitch},lr.minPitch.set=function(i){this._minPitch!==i&&(this._minPitch=i,this.pitch=Math.max(this.pitch,i))},lr.maxPitch.get=function(){return this._maxPitch},lr.maxPitch.set=function(i){this._maxPitch!==i&&(this._maxPitch=i,this.pitch=Math.min(this.pitch,i))},lr.renderWorldCopies.get=function(){return this._renderWorldCopies},lr.renderWorldCopies.set=function(i){i===void 0?i=!0:i===null&&(i=!1),this._renderWorldCopies=i},lr.worldSize.get=function(){return this.tileSize*this.scale},lr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},lr.size.get=function(){return new u.Point(this.width,this.height)},lr.bearing.get=function(){return-this.angle/Math.PI*180},lr.bearing.set=function(i){var o=-u.wrap(i,-180,180)*Math.PI/180;this.angle!==o&&(this._unmodified=!1,this.angle=o,this._calcMatrices(),this.rotationMatrix=u.create$2(),u.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},lr.pitch.get=function(){return this._pitch/Math.PI*180},lr.pitch.set=function(i){var o=u.clamp(i,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==o&&(this._unmodified=!1,this._pitch=o,this._calcMatrices())},lr.fov.get=function(){return this._fov/Math.PI*180},lr.fov.set=function(i){i=Math.max(.01,Math.min(60,i)),this._fov!==i&&(this._unmodified=!1,this._fov=i/180*Math.PI,this._calcMatrices())},lr.zoom.get=function(){return this._zoom},lr.zoom.set=function(i){var o=Math.min(Math.max(i,this.minZoom),this.maxZoom);this._zoom!==o&&(this._unmodified=!1,this._zoom=o,this.scale=this.zoomScale(o),this.tileZoom=Math.floor(o),this.zoomFraction=o-this.tileZoom,this._constrain(),this._calcMatrices())},lr.center.get=function(){return this._center},lr.center.set=function(i){i.lat===this._center.lat&&i.lng===this._center.lng||(this._unmodified=!1,this._center=i,this._constrain(),this._calcMatrices())},lr.padding.get=function(){return this._edgeInsets.toJSON()},lr.padding.set=function(i){this._edgeInsets.equals(i)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,i,1),this._calcMatrices())},lr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Dt.prototype.isPaddingEqual=function(i){return this._edgeInsets.equals(i)},Dt.prototype.interpolatePadding=function(i,o,n){this._unmodified=!1,this._edgeInsets.interpolate(i,o,n),this._constrain(),this._calcMatrices()},Dt.prototype.coveringZoomLevel=function(i){var o=(i.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/i.tileSize));return Math.max(0,o)},Dt.prototype.getVisibleUnwrappedCoordinates=function(i){var o=[new u.UnwrappedTileID(0,i)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new u.Point(0,0)),s=this.pointCoordinate(new u.Point(this.width,0)),p=this.pointCoordinate(new u.Point(this.width,this.height)),f=this.pointCoordinate(new u.Point(0,this.height)),d=Math.floor(Math.min(n.x,s.x,p.x,f.x)),v=Math.floor(Math.max(n.x,s.x,p.x,f.x)),w=d-1;w<=v+1;w++)w!==0&&o.push(new u.UnwrappedTileID(w,i));return o},Dt.prototype.coveringTiles=function(i){var o=this.coveringZoomLevel(i),n=o;if(i.minzoom!==void 0&&o<i.minzoom)return[];i.maxzoom!==void 0&&o>i.maxzoom&&(o=i.maxzoom);var s=u.MercatorCoordinate.fromLngLat(this.center),p=Math.pow(2,o),f=[p*s.x,p*s.y,0],d=ls.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,o),v=i.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(v=o);var w=function(Ce){return{aabb:new ko([Ce*p,0,0],[(Ce+1)*p,p,0]),zoom:0,x:0,y:0,wrap:Ce,fullyVisible:!1}},A=[],R=[],F=o,O=i.reparseOverscaled?n:o;if(this._renderWorldCopies)for(var W=1;W<=3;W++)A.push(w(-W)),A.push(w(W));for(A.push(w(0));A.length>0;){var Z=A.pop(),ee=Z.x,N=Z.y,Q=Z.fullyVisible;if(!Q){var ne=Z.aabb.intersects(d);if(ne===0)continue;Q=ne===2}var ue=Z.aabb.distanceX(f),me=Z.aabb.distanceY(f),pe=Math.max(Math.abs(ue),Math.abs(me));if(Z.zoom===F||pe>3+(1<<F-Z.zoom)-2&&Z.zoom>=v)R.push({tileID:new u.OverscaledTileID(Z.zoom===F?O:Z.zoom,Z.wrap,Z.zoom,ee,N),distanceSq:u.sqrLen([f[0]-.5-ee,f[1]-.5-N])});else for(var ve=0;ve<4;ve++){var Te=(ee<<1)+ve%2,ke=(N<<1)+(ve>>1);A.push({aabb:Z.aabb.quadrant(ve),zoom:Z.zoom+1,x:Te,y:ke,wrap:Z.wrap,fullyVisible:Q})}}return R.sort((function(Ce,$e){return Ce.distanceSq-$e.distanceSq})).map((function(Ce){return Ce.tileID}))},Dt.prototype.resize=function(i,o){this.width=i,this.height=o,this.pixelsToGLUnits=[2/i,-2/o],this._constrain(),this._calcMatrices()},lr.unmodified.get=function(){return this._unmodified},Dt.prototype.zoomScale=function(i){return Math.pow(2,i)},Dt.prototype.scaleZoom=function(i){return Math.log(i)/Math.LN2},Dt.prototype.project=function(i){var o=u.clamp(i.lat,-this.maxValidLatitude,this.maxValidLatitude);return new u.Point(u.mercatorXfromLng(i.lng)*this.worldSize,u.mercatorYfromLat(o)*this.worldSize)},Dt.prototype.unproject=function(i){return new u.MercatorCoordinate(i.x/this.worldSize,i.y/this.worldSize).toLngLat()},lr.point.get=function(){return this.project(this.center)},Dt.prototype.setLocationAtPoint=function(i,o){var n=this.pointCoordinate(o),s=this.pointCoordinate(this.centerPoint),p=this.locationCoordinate(i),f=new u.MercatorCoordinate(p.x-(n.x-s.x),p.y-(n.y-s.y));this.center=this.coordinateLocation(f),this._renderWorldCopies&&(this.center=this.center.wrap())},Dt.prototype.locationPoint=function(i){return this.coordinatePoint(this.locationCoordinate(i))},Dt.prototype.pointLocation=function(i){return this.coordinateLocation(this.pointCoordinate(i))},Dt.prototype.locationCoordinate=function(i){return u.MercatorCoordinate.fromLngLat(i)},Dt.prototype.coordinateLocation=function(i){return i.toLngLat()},Dt.prototype.pointCoordinate=function(i){var o=[i.x,i.y,0,1],n=[i.x,i.y,1,1];u.transformMat4(o,o,this.pixelMatrixInverse),u.transformMat4(n,n,this.pixelMatrixInverse);var s=o[3],p=n[3],f=o[1]/s,d=n[1]/p,v=o[2]/s,w=n[2]/p,A=v===w?0:(0-v)/(w-v);return new u.MercatorCoordinate(u.number(o[0]/s,n[0]/p,A)/this.worldSize,u.number(f,d,A)/this.worldSize)},Dt.prototype.coordinatePoint=function(i){var o=[i.x*this.worldSize,i.y*this.worldSize,0,1];return u.transformMat4(o,o,this.pixelMatrix),new u.Point(o[0]/o[3],o[1]/o[3])},Dt.prototype.getBounds=function(){return new u.LngLatBounds().extend(this.pointLocation(new u.Point(0,0))).extend(this.pointLocation(new u.Point(this.width,0))).extend(this.pointLocation(new u.Point(this.width,this.height))).extend(this.pointLocation(new u.Point(0,this.height)))},Dt.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new u.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Dt.prototype.setMaxBounds=function(i){i?(this.lngRange=[i.getWest(),i.getEast()],this.latRange=[i.getSouth(),i.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Dt.prototype.calculatePosMatrix=function(i,o){o===void 0&&(o=!1);var n=i.key,s=o?this._alignedPosMatrixCache:this._posMatrixCache;if(s[n])return s[n];var p=i.canonical,f=this.worldSize/this.zoomScale(p.z),d=p.x+Math.pow(2,p.z)*i.wrap,v=u.identity(new Float64Array(16));return u.translate(v,v,[d*f,p.y*f,0]),u.scale(v,v,[f/u.EXTENT,f/u.EXTENT,1]),u.multiply(v,o?this.alignedProjMatrix:this.projMatrix,v),s[n]=new Float32Array(v),s[n]},Dt.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Dt.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var i,o,n,s,p=-90,f=90,d=-180,v=180,w=this.size,A=this._unmodified;if(this.latRange){var R=this.latRange;p=u.mercatorYfromLat(R[1])*this.worldSize,i=(f=u.mercatorYfromLat(R[0])*this.worldSize)-p<w.y?w.y/(f-p):0}if(this.lngRange){var F=this.lngRange;d=u.mercatorXfromLng(F[0])*this.worldSize,o=(v=u.mercatorXfromLng(F[1])*this.worldSize)-d<w.x?w.x/(v-d):0}var O=this.point,W=Math.max(o||0,i||0);if(W)return this.center=this.unproject(new u.Point(o?(v+d)/2:O.x,i?(f+p)/2:O.y)),this.zoom+=this.scaleZoom(W),this._unmodified=A,void(this._constraining=!1);if(this.latRange){var Z=O.y,ee=w.y/2;Z-ee<p&&(s=p+ee),Z+ee>f&&(s=f-ee)}if(this.lngRange){var N=O.x,Q=w.x/2;N-Q<d&&(n=d+Q),N+Q>v&&(n=v-Q)}n===void 0&&s===void 0||(this.center=this.unproject(new u.Point(n!==void 0?n:O.x,s!==void 0?s:O.y))),this._unmodified=A,this._constraining=!1}},Dt.prototype._calcMatrices=function(){if(this.height){var i=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var o=Math.PI/2+this._pitch,n=this._fov*(.5+i.y/this.height),s=Math.sin(n)*this.cameraToCenterDistance/Math.sin(u.clamp(Math.PI-o-n,.01,Math.PI-.01)),p=this.point,f=p.x,d=p.y,v=1.01*(Math.cos(Math.PI/2-this._pitch)*s+this.cameraToCenterDistance),w=this.height/50,A=new Float64Array(16);u.perspective(A,this._fov,this.width/this.height,w,v),A[8]=2*-i.x/this.width,A[9]=2*i.y/this.height,u.scale(A,A,[1,-1,1]),u.translate(A,A,[0,0,-this.cameraToCenterDistance]),u.rotateX(A,A,this._pitch),u.rotateZ(A,A,this.angle),u.translate(A,A,[-f,-d,0]),this.mercatorMatrix=u.scale([],A,[this.worldSize,this.worldSize,this.worldSize]),u.scale(A,A,[1,1,u.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=A,this.invProjMatrix=u.invert([],this.projMatrix);var R=this.width%2/2,F=this.height%2/2,O=Math.cos(this.angle),W=Math.sin(this.angle),Z=f-Math.round(f)+O*R+W*F,ee=d-Math.round(d)+O*F+W*R,N=new Float64Array(A);if(u.translate(N,N,[Z>.5?Z-1:Z,ee>.5?ee-1:ee,0]),this.alignedProjMatrix=N,A=u.create(),u.scale(A,A,[this.width/2,-this.height/2,1]),u.translate(A,A,[1,-1,0]),this.labelPlaneMatrix=A,A=u.create(),u.scale(A,A,[1,-1,1]),u.translate(A,A,[-1,-1,0]),u.scale(A,A,[2/this.width,2/this.height,1]),this.glCoordMatrix=A,this.pixelMatrix=u.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(A=u.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=A,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Dt.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var i=this.pointCoordinate(new u.Point(0,0)),o=[i.x*this.worldSize,i.y*this.worldSize,0,1];return u.transformMat4(o,o,this.pixelMatrix)[3]/this.cameraToCenterDistance},Dt.prototype.getCameraPoint=function(){var i=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new u.Point(0,i))},Dt.prototype.getCameraQueryGeometry=function(i){var o=this.getCameraPoint();if(i.length===1)return[i[0],o];for(var n=o.x,s=o.y,p=o.x,f=o.y,d=0,v=i;d<v.length;d+=1){var w=v[d];n=Math.min(n,w.x),s=Math.min(s,w.y),p=Math.max(p,w.x),f=Math.max(f,w.y)}return[new u.Point(n,s),new u.Point(p,s),new u.Point(p,f),new u.Point(n,f),new u.Point(n,s)]},Object.defineProperties(Dt.prototype,lr);var Yi=function(i){var o,n,s,p;this._hashName=i&&encodeURIComponent(i),u.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(o=this._updateHashUnthrottled.bind(this),n=!1,s=null,p=function(){s=null,n&&(o(),s=setTimeout(p,300),n=!1)},function(){return n=!0,s||p(),s})};Yi.prototype.addTo=function(i){return this._map=i,u.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Yi.prototype.remove=function(){return u.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Yi.prototype.getHashString=function(i){var o=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,s=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),p=Math.pow(10,s),f=Math.round(o.lng*p)/p,d=Math.round(o.lat*p)/p,v=this._map.getBearing(),w=this._map.getPitch(),A="";if(A+=i?"/"+f+"/"+d+"/"+n:n+"/"+d+"/"+f,(v||w)&&(A+="/"+Math.round(10*v)/10),w&&(A+="/"+Math.round(w)),this._hashName){var R=this._hashName,F=!1,O=u.window.location.hash.slice(1).split("&").map((function(W){var Z=W.split("=")[0];return Z===R?(F=!0,Z+"="+A):W})).filter((function(W){return W}));return F||O.push(R+"="+A),"#"+O.join("&")}return"#"+A},Yi.prototype._getCurrentHash=function(){var i,o=this,n=u.window.location.hash.replace("#","");return this._hashName?(n.split("&").map((function(s){return s.split("=")})).forEach((function(s){s[0]===o._hashName&&(i=s)})),(i&&i[1]||"").split("/")):n.split("/")},Yi.prototype._onHashChange=function(){var i=this._getCurrentHash();if(i.length>=3&&!i.some((function(n){return isNaN(n)}))){var o=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(i[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+i[2],+i[1]],zoom:+i[0],bearing:o,pitch:+(i[4]||0)}),!0}return!1},Yi.prototype._updateHashUnthrottled=function(){var i=u.window.location.href.replace(/(#.+)?$/,this.getHashString());try{u.window.history.replaceState(u.window.history.state,null,i)}catch{}};var Aa={linearity:.3,easing:u.bezier(0,0,.3,1)},Qo=u.extend({deceleration:2500,maxSpeed:1400},Aa),Ea=u.extend({deceleration:20,maxSpeed:1400},Aa),qc=u.extend({deceleration:1e3,maxSpeed:360},Aa),Uc=u.extend({deceleration:1e3,maxSpeed:90},Aa),Pa=function(i){this._map=i,this.clear()};function Ca(i,o){(!i.duration||i.duration<o.duration)&&(i.duration=o.duration,i.easing=o.easing)}function Rn(i,o,n){var s=n.maxSpeed,p=n.linearity,f=n.deceleration,d=u.clamp(i*p/(o/1e3),-s,s),v=Math.abs(d)/(f*p);return{easing:n.easing,duration:1e3*v,amount:d*(v/2)}}Pa.prototype.clear=function(){this._inertiaBuffer=[]},Pa.prototype.record=function(i){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.browser.now(),settings:i})},Pa.prototype._drainInertiaBuffer=function(){for(var i=this._inertiaBuffer,o=u.browser.now();i.length>0&&o-i[0].time>160;)i.shift()},Pa.prototype._onMoveEnd=function(i){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var o={zoom:0,bearing:0,pitch:0,pan:new u.Point(0,0),pinchAround:void 0,around:void 0},n=0,s=this._inertiaBuffer;n<s.length;n+=1){var p=s[n].settings;o.zoom+=p.zoomDelta||0,o.bearing+=p.bearingDelta||0,o.pitch+=p.pitchDelta||0,p.panDelta&&o.pan._add(p.panDelta),p.around&&(o.around=p.around),p.pinchAround&&(o.pinchAround=p.pinchAround)}var f=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,d={};if(o.pan.mag()){var v=Rn(o.pan.mag(),f,u.extend({},Qo,i||{}));d.offset=o.pan.mult(v.amount/o.pan.mag()),d.center=this._map.transform.center,Ca(d,v)}if(o.zoom){var w=Rn(o.zoom,f,Ea);d.zoom=this._map.transform.zoom+w.amount,Ca(d,w)}if(o.bearing){var A=Rn(o.bearing,f,qc);d.bearing=this._map.transform.bearing+u.clamp(A.amount,-179,179),Ca(d,A)}if(o.pitch){var R=Rn(o.pitch,f,Uc);d.pitch=this._map.transform.pitch+R.amount,Ca(d,R)}if(d.zoom||d.bearing){var F=o.pinchAround===void 0?o.around:o.pinchAround;d.around=F?this._map.unproject(F):this._map.getCenter()}return this.clear(),u.extend(d,{noMoveStart:!0})}};var Gr=(function(i){function o(s,p,f,d){d===void 0&&(d={});var v=M.mousePos(p.getCanvasContainer(),f),w=p.unproject(v);i.call(this,s,u.extend({point:v,lngLat:w,originalEvent:f},d)),this._defaultPrevented=!1,this.target=p}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,n),o})(u.Event),ka=(function(i){function o(s,p,f){var d=s==="touchend"?f.changedTouches:f.touches,v=M.touchPos(p.getCanvasContainer(),d),w=v.map((function(F){return p.unproject(F)})),A=v.reduce((function(F,O,W,Z){return F.add(O.div(Z.length))}),new u.Point(0,0)),R=p.unproject(A);i.call(this,s,{points:v,point:A,lngLats:w,lngLat:R,originalEvent:f}),this._defaultPrevented=!1}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,n),o})(u.Event),Dl=(function(i){function o(s,p,f){i.call(this,s,{originalEvent:f}),this._defaultPrevented=!1}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={defaultPrevented:{configurable:!0}};return o.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(o.prototype,n),o})(u.Event),qr=function(i,o){this._map=i,this._clickTolerance=o.clickTolerance};qr.prototype.reset=function(){delete this._mousedownPos},qr.prototype.wheel=function(i){return this._firePreventable(new Dl(i.type,this._map,i))},qr.prototype.mousedown=function(i,o){return this._mousedownPos=o,this._firePreventable(new Gr(i.type,this._map,i))},qr.prototype.mouseup=function(i){this._map.fire(new Gr(i.type,this._map,i))},qr.prototype.click=function(i,o){this._mousedownPos&&this._mousedownPos.dist(o)>=this._clickTolerance||this._map.fire(new Gr(i.type,this._map,i))},qr.prototype.dblclick=function(i){return this._firePreventable(new Gr(i.type,this._map,i))},qr.prototype.mouseover=function(i){this._map.fire(new Gr(i.type,this._map,i))},qr.prototype.mouseout=function(i){this._map.fire(new Gr(i.type,this._map,i))},qr.prototype.touchstart=function(i){return this._firePreventable(new ka(i.type,this._map,i))},qr.prototype.touchmove=function(i){this._map.fire(new ka(i.type,this._map,i))},qr.prototype.touchend=function(i){this._map.fire(new ka(i.type,this._map,i))},qr.prototype.touchcancel=function(i){this._map.fire(new ka(i.type,this._map,i))},qr.prototype._firePreventable=function(i){if(this._map.fire(i),i.defaultPrevented)return{}},qr.prototype.isEnabled=function(){return!0},qr.prototype.isActive=function(){return!1},qr.prototype.enable=function(){},qr.prototype.disable=function(){};var Xe=function(i){this._map=i};Xe.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Xe.prototype.mousemove=function(i){this._map.fire(new Gr(i.type,this._map,i))},Xe.prototype.mousedown=function(){this._delayContextMenu=!0},Xe.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Gr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Xe.prototype.contextmenu=function(i){this._delayContextMenu?this._contextMenuEvent=i:this._map.fire(new Gr(i.type,this._map,i)),this._map.listens("contextmenu")&&i.preventDefault()},Xe.prototype.isEnabled=function(){return!0},Xe.prototype.isActive=function(){return!1},Xe.prototype.enable=function(){},Xe.prototype.disable=function(){};var Ni=function(i,o){this._map=i,this._el=i.getCanvasContainer(),this._container=i.getContainer(),this._clickTolerance=o.clickTolerance||1};function cs(i,o){for(var n={},s=0;s<i.length;s++)n[i[s].identifier]=o[s];return n}Ni.prototype.isEnabled=function(){return!!this._enabled},Ni.prototype.isActive=function(){return!!this._active},Ni.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ni.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ni.prototype.mousedown=function(i,o){this.isEnabled()&&i.shiftKey&&i.button===0&&(M.disableDrag(),this._startPos=this._lastPos=o,this._active=!0)},Ni.prototype.mousemoveWindow=function(i,o){if(this._active){var n=o;if(!(this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)<this._clickTolerance)){var s=this._startPos;this._lastPos=n,this._box||(this._box=M.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",i));var p=Math.min(s.x,n.x),f=Math.max(s.x,n.x),d=Math.min(s.y,n.y),v=Math.max(s.y,n.y);M.setTransform(this._box,"translate("+p+"px,"+d+"px)"),this._box.style.width=f-p+"px",this._box.style.height=v-d+"px"}}},Ni.prototype.mouseupWindow=function(i,o){var n=this;if(this._active&&i.button===0){var s=this._startPos,p=o;if(this.reset(),M.suppressClick(),s.x!==p.x||s.y!==p.y)return this._map.fire(new u.Event("boxzoomend",{originalEvent:i})),{cameraAnimation:function(f){return f.fitScreenCoordinates(s,p,n._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",i)}},Ni.prototype.keydown=function(i){this._active&&i.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",i))},Ni.prototype.blur=function(){this.reset()},Ni.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(M.remove(this._box),this._box=null),M.enableDrag(),delete this._startPos,delete this._lastPos},Ni.prototype._fireEvent=function(i,o){return this._map.fire(new u.Event(i,{originalEvent:o}))};var ea=function(i){this.reset(),this.numTouches=i.numTouches};ea.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},ea.prototype.touchstart=function(i,o,n){(this.centroid||n.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=i.timeStamp),n.length===this.numTouches&&(this.centroid=(function(s){for(var p=new u.Point(0,0),f=0,d=s;f<d.length;f+=1)p._add(d[f]);return p.div(s.length)})(o),this.touches=cs(n,o)))},ea.prototype.touchmove=function(i,o,n){if(!this.aborted&&this.centroid){var s=cs(n,o);for(var p in this.touches){var f=s[p];(!f||f.dist(this.touches[p])>30)&&(this.aborted=!0)}}},ea.prototype.touchend=function(i,o,n){if((!this.centroid||i.timeStamp-this.startTime>500)&&(this.aborted=!0),n.length===0){var s=!this.aborted&&this.centroid;if(this.reset(),s)return s}};var gn=function(i){this.singleTap=new ea(i),this.numTaps=i.numTaps,this.reset()};gn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},gn.prototype.touchstart=function(i,o,n){this.singleTap.touchstart(i,o,n)},gn.prototype.touchmove=function(i,o,n){this.singleTap.touchmove(i,o,n)},gn.prototype.touchend=function(i,o,n){var s=this.singleTap.touchend(i,o,n);if(s){var p=i.timeStamp-this.lastTime<500,f=!this.lastTap||this.lastTap.dist(s)<30;if(p&&f||this.reset(),this.count++,this.lastTime=i.timeStamp,this.lastTap=s,this.count===this.numTaps)return this.reset(),s}};var ji=function(){this._zoomIn=new gn({numTouches:1,numTaps:2}),this._zoomOut=new gn({numTouches:2,numTaps:1}),this.reset()};ji.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},ji.prototype.touchstart=function(i,o,n){this._zoomIn.touchstart(i,o,n),this._zoomOut.touchstart(i,o,n)},ji.prototype.touchmove=function(i,o,n){this._zoomIn.touchmove(i,o,n),this._zoomOut.touchmove(i,o,n)},ji.prototype.touchend=function(i,o,n){var s=this,p=this._zoomIn.touchend(i,o,n),f=this._zoomOut.touchend(i,o,n);return p?(this._active=!0,i.preventDefault(),setTimeout((function(){return s.reset()}),0),{cameraAnimation:function(d){return d.easeTo({duration:300,zoom:d.getZoom()+1,around:d.unproject(p)},{originalEvent:i})}}):f?(this._active=!0,i.preventDefault(),setTimeout((function(){return s.reset()}),0),{cameraAnimation:function(d){return d.easeTo({duration:300,zoom:d.getZoom()-1,around:d.unproject(f)},{originalEvent:i})}}):void 0},ji.prototype.touchcancel=function(){this.reset()},ji.prototype.enable=function(){this._enabled=!0},ji.prototype.disable=function(){this._enabled=!1,this.reset()},ji.prototype.isEnabled=function(){return this._enabled},ji.prototype.isActive=function(){return this._active};var yu={0:1,2:2},Re=function(i){this.reset(),this._clickTolerance=i.clickTolerance||1};Re.prototype.blur=function(){this.reset()},Re.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Re.prototype._correctButton=function(i,o){return!1},Re.prototype._move=function(i,o){return{}},Re.prototype.mousedown=function(i,o){if(!this._lastPoint){var n=M.mouseButton(i);this._correctButton(i,n)&&(this._lastPoint=o,this._eventButton=n)}},Re.prototype.mousemoveWindow=function(i,o){var n=this._lastPoint;if(n){if(i.preventDefault(),(function(s,p){var f=yu[p];return s.buttons===void 0||(s.buttons&f)!==f})(i,this._eventButton))this.reset();else if(this._moved||!(o.dist(n)<this._clickTolerance))return this._moved=!0,this._lastPoint=o,this._move(n,o)}},Re.prototype.mouseupWindow=function(i){this._lastPoint&&M.mouseButton(i)===this._eventButton&&(this._moved&&M.suppressClick(),this.reset())},Re.prototype.enable=function(){this._enabled=!0},Re.prototype.disable=function(){this._enabled=!1,this.reset()},Re.prototype.isEnabled=function(){return this._enabled},Re.prototype.isActive=function(){return this._active};var vu=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.mousedown=function(n,s){i.prototype.mousedown.call(this,n,s),this._lastPoint&&(this._active=!0)},o.prototype._correctButton=function(n,s){return s===0&&!n.ctrlKey},o.prototype._move=function(n,s){return{around:s,panDelta:s.sub(n)}},o})(Re),ps=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype._correctButton=function(n,s){return s===0&&n.ctrlKey||s===2},o.prototype._move=function(n,s){var p=.8*(s.x-n.x);if(p)return this._active=!0,{bearingDelta:p}},o.prototype.contextmenu=function(n){n.preventDefault()},o})(Re),gu=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype._correctButton=function(n,s){return s===0&&n.ctrlKey||s===2},o.prototype._move=function(n,s){var p=-.5*(s.y-n.y);if(p)return this._active=!0,{pitchDelta:p}},o.prototype.contextmenu=function(n){n.preventDefault()},o})(Re),sn=function(i){this._minTouches=1,this._clickTolerance=i.clickTolerance||1,this.reset()};sn.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new u.Point(0,0)},sn.prototype.touchstart=function(i,o,n){return this._calculateTransform(i,o,n)},sn.prototype.touchmove=function(i,o,n){if(this._active&&!(n.length<this._minTouches))return i.preventDefault(),this._calculateTransform(i,o,n)},sn.prototype.touchend=function(i,o,n){this._calculateTransform(i,o,n),this._active&&n.length<this._minTouches&&this.reset()},sn.prototype.touchcancel=function(){this.reset()},sn.prototype._calculateTransform=function(i,o,n){n.length>0&&(this._active=!0);var s=cs(n,o),p=new u.Point(0,0),f=new u.Point(0,0),d=0;for(var v in s){var w=s[v],A=this._touches[v];A&&(p._add(w),f._add(w.sub(A)),d++,s[v]=w)}if(this._touches=s,!(d<this._minTouches)&&f.mag()){var R=f.div(d);if(this._sum._add(R),!(this._sum.mag()<this._clickTolerance))return{around:p.div(d),panDelta:R}}},sn.prototype.enable=function(){this._enabled=!0},sn.prototype.disable=function(){this._enabled=!1,this.reset()},sn.prototype.isEnabled=function(){return this._enabled},sn.prototype.isActive=function(){return this._active};var Gi=function(){this.reset()};function hs(i,o,n){for(var s=0;s<i.length;s++)if(i[s].identifier===n)return o[s]}function fs(i,o){return Math.log(i/o)/Math.LN2}Gi.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Gi.prototype._start=function(i){},Gi.prototype._move=function(i,o,n){return{}},Gi.prototype.touchstart=function(i,o,n){this._firstTwoTouches||n.length<2||(this._firstTwoTouches=[n[0].identifier,n[1].identifier],this._start([o[0],o[1]]))},Gi.prototype.touchmove=function(i,o,n){if(this._firstTwoTouches){i.preventDefault();var s=this._firstTwoTouches,p=s[1],f=hs(n,o,s[0]),d=hs(n,o,p);if(f&&d){var v=this._aroundCenter?null:f.add(d).div(2);return this._move([f,d],v,i)}}},Gi.prototype.touchend=function(i,o,n){if(this._firstTwoTouches){var s=this._firstTwoTouches,p=s[1],f=hs(n,o,s[0]),d=hs(n,o,p);f&&d||(this._active&&M.suppressClick(),this.reset())}},Gi.prototype.touchcancel=function(){this.reset()},Gi.prototype.enable=function(i){this._enabled=!0,this._aroundCenter=!!i&&i.around==="center"},Gi.prototype.disable=function(){this._enabled=!1,this.reset()},Gi.prototype.isEnabled=function(){return this._enabled},Gi.prototype.isActive=function(){return this._active};var $i=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.reset=function(){i.prototype.reset.call(this),delete this._distance,delete this._startDistance},o.prototype._start=function(n){this._startDistance=this._distance=n[0].dist(n[1])},o.prototype._move=function(n,s){var p=this._distance;if(this._distance=n[0].dist(n[1]),this._active||!(Math.abs(fs(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:fs(this._distance,p),pinchAround:s}},o})(Gi);function Ln(i,o){return 180*i.angleWith(o)/Math.PI}var Rl=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.reset=function(){i.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},o.prototype._start=function(n){this._startVector=this._vector=n[0].sub(n[1]),this._minDiameter=n[0].dist(n[1])},o.prototype._move=function(n,s){var p=this._vector;if(this._vector=n[0].sub(n[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ln(this._vector,p),pinchAround:s}},o.prototype._isBelowThreshold=function(n){this._minDiameter=Math.min(this._minDiameter,n.mag());var s=25/(Math.PI*this._minDiameter)*360,p=Ln(n,this._startVector);return Math.abs(p)<s},o})(Gi);function Ma(i){return Math.abs(i.y)>Math.abs(i.x)}var _u=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.reset=function(){i.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},o.prototype._start=function(n){this._lastPoints=n,Ma(n[0].sub(n[1]))&&(this._valid=!1)},o.prototype._move=function(n,s,p){var f=n[0].sub(this._lastPoints[0]),d=n[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(f,d,p.timeStamp),this._valid)return this._lastPoints=n,this._active=!0,{pitchDelta:(f.y+d.y)/2*-.5}},o.prototype.gestureBeginsVertically=function(n,s,p){if(this._valid!==void 0)return this._valid;var f=n.mag()>=2,d=s.mag()>=2;if(f||d){if(!f||!d)return this._firstMove===void 0&&(this._firstMove=p),p-this._firstMove<100&&void 0;var v=n.y>0==s.y>0;return Ma(n)&&Ma(s)&&v}},o})(Gi),xu={panStep:100,bearingStep:15,pitchStep:10},_n=function(){var i=xu;this._panStep=i.panStep,this._bearingStep=i.bearingStep,this._pitchStep=i.pitchStep,this._rotationDisabled=!1};function Qi(i){return i*(2-i)}_n.prototype.blur=function(){this.reset()},_n.prototype.reset=function(){this._active=!1},_n.prototype.keydown=function(i){var o=this;if(!(i.altKey||i.ctrlKey||i.metaKey)){var n=0,s=0,p=0,f=0,d=0;switch(i.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:i.shiftKey?s=-1:(i.preventDefault(),f=-1);break;case 39:i.shiftKey?s=1:(i.preventDefault(),f=1);break;case 38:i.shiftKey?p=1:(i.preventDefault(),d=-1);break;case 40:i.shiftKey?p=-1:(i.preventDefault(),d=1);break;default:return}return this._rotationDisabled&&(s=0,p=0),{cameraAnimation:function(v){var w=v.getZoom();v.easeTo({duration:300,easeId:"keyboardHandler",easing:Qi,zoom:n?Math.round(w)+n*(i.shiftKey?2:1):w,bearing:v.getBearing()+s*o._bearingStep,pitch:v.getPitch()+p*o._pitchStep,offset:[-f*o._panStep,-d*o._panStep],center:v.getCenter()},{originalEvent:i})}}}},_n.prototype.enable=function(){this._enabled=!0},_n.prototype.disable=function(){this._enabled=!1,this.reset()},_n.prototype.isEnabled=function(){return this._enabled},_n.prototype.isActive=function(){return this._active},_n.prototype.disableRotation=function(){this._rotationDisabled=!0},_n.prototype.enableRotation=function(){this._rotationDisabled=!1};var kt=function(i,o){this._map=i,this._el=i.getCanvasContainer(),this._handler=o,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,u.bindAll(["_onTimeout"],this)};kt.prototype.setZoomRate=function(i){this._defaultZoomRate=i},kt.prototype.setWheelZoomRate=function(i){this._wheelZoomRate=i},kt.prototype.isEnabled=function(){return!!this._enabled},kt.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},kt.prototype.isZooming=function(){return!!this._zooming},kt.prototype.enable=function(i){this.isEnabled()||(this._enabled=!0,this._aroundCenter=i&&i.around==="center")},kt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},kt.prototype.wheel=function(i){if(this.isEnabled()){var o=i.deltaMode===u.window.WheelEvent.DOM_DELTA_LINE?40*i.deltaY:i.deltaY,n=u.browser.now(),s=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,o!==0&&o%4.000244140625==0?this._type="wheel":o!==0&&Math.abs(o)<4?this._type="trackpad":s>400?(this._type=null,this._lastValue=o,this._timeout=setTimeout(this._onTimeout,40,i)):this._type||(this._type=Math.abs(s*o)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,o+=this._lastValue)),i.shiftKey&&o&&(o/=4),this._type&&(this._lastWheelEvent=i,this._delta-=o,this._active||this._start(i)),i.preventDefault()}},kt.prototype._onTimeout=function(i){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(i)},kt.prototype._start=function(i){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 o=M.mousePos(this._el,i);this._around=u.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(o)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},kt.prototype.renderFrame=function(){var i=this;if(this._frameId&&(this._frameId=null,this.isActive())){var o=this._map.transform;if(this._delta!==0){var n=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,s=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&s!==0&&(s=1/s);var p=typeof this._targetZoom=="number"?o.zoomScale(this._targetZoom):o.scale;this._targetZoom=Math.min(o.maxZoom,Math.max(o.minZoom,o.scaleZoom(p*s))),this._type==="wheel"&&(this._startZoom=o.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var f,d=typeof this._targetZoom=="number"?this._targetZoom:o.zoom,v=this._startZoom,w=this._easing,A=!1;if(this._type==="wheel"&&v&&w){var R=Math.min((u.browser.now()-this._lastWheelEventTime)/200,1),F=w(R);f=u.number(v,d,F),R<1?this._frameId||(this._frameId=!0):A=!0}else f=d,A=!0;return this._active=!0,A&&(this._active=!1,this._finishTimeout=setTimeout((function(){i._zooming=!1,i._handler._triggerRenderFrame(),delete i._targetZoom,delete i._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!A,zoomDelta:f-o.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},kt.prototype._smoothOutEasing=function(i){var o=u.ease;if(this._prevEase){var n=this._prevEase,s=(u.browser.now()-n.start)/n.duration,p=n.easing(s+.01)-n.easing(s),f=.27/Math.sqrt(p*p+1e-4)*.01,d=Math.sqrt(.0729-f*f);o=u.bezier(f,d,.25,1)}return this._prevEase={start:u.browser.now(),duration:i,easing:o},o},kt.prototype.blur=function(){this.reset()},kt.prototype.reset=function(){this._active=!1};var Tn=function(i,o){this._clickZoom=i,this._tapZoom=o};Tn.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Tn.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Tn.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Tn.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var un=function(){this.reset()};un.prototype.reset=function(){this._active=!1},un.prototype.blur=function(){this.reset()},un.prototype.dblclick=function(i,o){return i.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(i.shiftKey?-1:1),around:n.unproject(o)},{originalEvent:i})}}},un.prototype.enable=function(){this._enabled=!0},un.prototype.disable=function(){this._enabled=!1,this.reset()},un.prototype.isEnabled=function(){return this._enabled},un.prototype.isActive=function(){return this._active};var yi=function(){this._tap=new gn({numTouches:1,numTaps:1}),this.reset()};yi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},yi.prototype.touchstart=function(i,o,n){this._swipePoint||(this._tapTime&&i.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=o[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(i,o,n))},yi.prototype.touchmove=function(i,o,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var s=o[0],p=s.y-this._swipePoint.y;return this._swipePoint=s,i.preventDefault(),this._active=!0,{zoomDelta:p/128}}}else this._tap.touchmove(i,o,n)},yi.prototype.touchend=function(i,o,n){this._tapTime?this._swipePoint&&n.length===0&&this.reset():this._tap.touchend(i,o,n)&&(this._tapTime=i.timeStamp)},yi.prototype.touchcancel=function(){this.reset()},yi.prototype.enable=function(){this._enabled=!0},yi.prototype.disable=function(){this._enabled=!1,this.reset()},yi.prototype.isEnabled=function(){return this._enabled},yi.prototype.isActive=function(){return this._active};var Mo=function(i,o,n){this._el=i,this._mousePan=o,this._touchPan=n};Mo.prototype.enable=function(i){this._inertiaOptions=i||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Mo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Mo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Mo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var eo=function(i,o,n){this._pitchWithRotate=i.pitchWithRotate,this._mouseRotate=o,this._mousePitch=n};eo.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},eo.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},eo.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},eo.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var xn=function(i,o,n,s){this._el=i,this._touchZoom=o,this._touchRotate=n,this._tapDragZoom=s,this._rotationDisabled=!1,this._enabled=!0};xn.prototype.enable=function(i){this._touchZoom.enable(i),this._rotationDisabled||this._touchRotate.enable(i),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},xn.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},xn.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},xn.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},xn.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},xn.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ti=function(i){return i.zoom||i.drag||i.pitch||i.rotate},Ba=(function(i){function o(){i.apply(this,arguments)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o})(u.Event);function it(i){return i.panDelta&&i.panDelta.mag()||i.zoomDelta||i.bearingDelta||i.pitchDelta}var Ye=function(i,o){this._map=i,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pa(i),this._bearingSnap=o.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(o),u.bindAll(["handleEvent","handleWindowEvent"],this);var n=this._el;this._listeners=[[n,"touchstart",{passive:!0}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[u.window.document,"mousemove",{capture:!0}],[u.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[u.window,"blur",void 0]];for(var s=0,p=this._listeners;s<p.length;s+=1){var f=p[s],d=f[0];M.addEventListener(d,f[1],d===u.window.document?this.handleWindowEvent:this.handleEvent,f[2])}};Ye.prototype.destroy=function(){for(var i=0,o=this._listeners;i<o.length;i+=1){var n=o[i],s=n[0];M.removeEventListener(s,n[1],s===u.window.document?this.handleWindowEvent:this.handleEvent,n[2])}},Ye.prototype._addDefaultHandlers=function(i){var o=this._map,n=o.getCanvasContainer();this._add("mapEvent",new qr(o,i));var s=o.boxZoom=new Ni(o,i);this._add("boxZoom",s);var p=new ji,f=new un;o.doubleClickZoom=new Tn(f,p),this._add("tapZoom",p),this._add("clickZoom",f);var d=new yi;this._add("tapDragZoom",d);var v=o.touchPitch=new _u;this._add("touchPitch",v);var w=new ps(i),A=new gu(i);o.dragRotate=new eo(i,w,A),this._add("mouseRotate",w,["mousePitch"]),this._add("mousePitch",A,["mouseRotate"]);var R=new vu(i),F=new sn(i);o.dragPan=new Mo(n,R,F),this._add("mousePan",R),this._add("touchPan",F,["touchZoom","touchRotate"]);var O=new Rl,W=new $i;o.touchZoomRotate=new xn(n,W,O,d),this._add("touchRotate",O,["touchPan","touchZoom"]),this._add("touchZoom",W,["touchPan","touchRotate"]);var Z=o.scrollZoom=new kt(o,this);this._add("scrollZoom",Z,["mousePan"]);var ee=o.keyboard=new _n;this._add("keyboard",ee),this._add("blockableMapEvent",new Xe(o));for(var N=0,Q=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];N<Q.length;N+=1){var ne=Q[N];i.interactive&&i[ne]&&o[ne].enable(i[ne])}},Ye.prototype._add=function(i,o,n){this._handlers.push({handlerName:i,handler:o,allowed:n}),this._handlersById[i]=o},Ye.prototype.stop=function(i){if(!this._updatingCamera){for(var o=0,n=this._handlers;o<n.length;o+=1)n[o].handler.reset();this._inertia.clear(),this._fireEvents({},{},i),this._changes=[]}},Ye.prototype.isActive=function(){for(var i=0,o=this._handlers;i<o.length;i+=1)if(o[i].handler.isActive())return!0;return!1},Ye.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Ye.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Ye.prototype.isMoving=function(){return!!Ti(this._eventsInProgress)||this.isZooming()},Ye.prototype._blockedByActive=function(i,o,n){for(var s in i)if(s!==n&&(!o||o.indexOf(s)<0))return!0;return!1},Ye.prototype.handleWindowEvent=function(i){this.handleEvent(i,i.type+"Window")},Ye.prototype._getMapTouches=function(i){for(var o=[],n=0,s=i;n<s.length;n+=1){var p=s[n];this._el.contains(p.target)&&o.push(p)}return o},Ye.prototype.handleEvent=function(i,o){this._updatingCamera=!0;for(var n=i.type==="renderFrame"?void 0:i,s={needsRenderFrame:!1},p={},f={},d=i.touches?this._getMapTouches(i.touches):void 0,v=d?M.touchPos(this._el,d):M.mousePos(this._el,i),w=0,A=this._handlers;w<A.length;w+=1){var R=A[w],F=R.handlerName,O=R.handler,W=R.allowed;if(O.isEnabled()){var Z=void 0;this._blockedByActive(f,W,F)?O.reset():O[o||i.type]&&(Z=O[o||i.type](i,v,d),this.mergeHandlerResult(s,p,Z,F,n),Z&&Z.needsRenderFrame&&this._triggerRenderFrame()),(Z||O.isActive())&&(f[F]=O)}}var ee={};for(var N in this._previousActiveHandlers)f[N]||(ee[N]=n);this._previousActiveHandlers=f,(Object.keys(ee).length||it(s))&&(this._changes.push([s,p,ee]),this._triggerRenderFrame()),(Object.keys(f).length||it(s))&&this._map._stop(!0),this._updatingCamera=!1;var Q=s.cameraAnimation;Q&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Q(this._map))},Ye.prototype.mergeHandlerResult=function(i,o,n,s,p){if(n){u.extend(i,n);var f={handlerName:s,originalEvent:n.originalEvent||p};n.zoomDelta!==void 0&&(o.zoom=f),n.panDelta!==void 0&&(o.drag=f),n.pitchDelta!==void 0&&(o.pitch=f),n.bearingDelta!==void 0&&(o.rotate=f)}},Ye.prototype._applyChanges=function(){for(var i={},o={},n={},s=0,p=this._changes;s<p.length;s+=1){var f=p[s],d=f[0],v=f[1],w=f[2];d.panDelta&&(i.panDelta=(i.panDelta||new u.Point(0,0))._add(d.panDelta)),d.zoomDelta&&(i.zoomDelta=(i.zoomDelta||0)+d.zoomDelta),d.bearingDelta&&(i.bearingDelta=(i.bearingDelta||0)+d.bearingDelta),d.pitchDelta&&(i.pitchDelta=(i.pitchDelta||0)+d.pitchDelta),d.around!==void 0&&(i.around=d.around),d.pinchAround!==void 0&&(i.pinchAround=d.pinchAround),d.noInertia&&(i.noInertia=d.noInertia),u.extend(o,v),u.extend(n,w)}this._updateMapTransform(i,o,n),this._changes=[]},Ye.prototype._updateMapTransform=function(i,o,n){var s=this._map,p=s.transform;if(!it(i))return this._fireEvents(o,n,!0);var f=i.panDelta,d=i.zoomDelta,v=i.bearingDelta,w=i.pitchDelta,A=i.around,R=i.pinchAround;R!==void 0&&(A=R),s._stop(!0),A=A||s.transform.centerPoint;var F=p.pointLocation(f?A.sub(f):A);v&&(p.bearing+=v),w&&(p.pitch+=w),d&&(p.zoom+=d),p.setLocationAtPoint(F,A),this._map._update(),i.noInertia||this._inertia.record(i),this._fireEvents(o,n,!0)},Ye.prototype._fireEvents=function(i,o,n){var s=this,p=Ti(this._eventsInProgress),f=Ti(i),d={};for(var v in i)this._eventsInProgress[v]||(d[v+"start"]=i[v].originalEvent),this._eventsInProgress[v]=i[v];for(var w in!p&&f&&this._fireEvent("movestart",f.originalEvent),d)this._fireEvent(w,d[w]);for(var A in f&&this._fireEvent("move",f.originalEvent),i)this._fireEvent(A,i[A].originalEvent);var R,F={};for(var O in this._eventsInProgress){var W=this._eventsInProgress[O],Z=W.handlerName,ee=W.originalEvent;this._handlersById[Z].isActive()||(delete this._eventsInProgress[O],F[O+"end"]=R=o[Z]||ee)}for(var N in F)this._fireEvent(N,F[N]);var Q=Ti(this._eventsInProgress);if(n&&(p||f)&&!Q){this._updatingCamera=!0;var ne=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),ue=function(me){return me!==0&&-s._bearingSnap<me&&me<s._bearingSnap};ne?(ue(ne.bearing||this._map.getBearing())&&(ne.bearing=0),this._map.easeTo(ne,{originalEvent:R})):(this._map.fire(new u.Event("moveend",{originalEvent:R})),ue(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},Ye.prototype._fireEvent=function(i,o){this._map.fire(new u.Event(i,o?{originalEvent:o}:{}))},Ye.prototype._requestFrame=function(){var i=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add((function(o){delete i._frameId,i.handleEvent(new Ba("renderFrame",{timeStamp:o})),i._applyChanges()}))},Ye.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var ds=(function(i){function o(n,s){i.call(this),this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=s.bearingSnap,u.bindAll(["_renderFrameCallback"],this)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.getCenter=function(){return new u.LngLat(this.transform.center.lng,this.transform.center.lat)},o.prototype.setCenter=function(n,s){return this.jumpTo({center:n},s)},o.prototype.panBy=function(n,s,p){return n=u.Point.convert(n).mult(-1),this.panTo(this.transform.center,u.extend({offset:n},s),p)},o.prototype.panTo=function(n,s,p){return this.easeTo(u.extend({center:n},s),p)},o.prototype.getZoom=function(){return this.transform.zoom},o.prototype.setZoom=function(n,s){return this.jumpTo({zoom:n},s),this},o.prototype.zoomTo=function(n,s,p){return this.easeTo(u.extend({zoom:n},s),p)},o.prototype.zoomIn=function(n,s){return this.zoomTo(this.getZoom()+1,n,s),this},o.prototype.zoomOut=function(n,s){return this.zoomTo(this.getZoom()-1,n,s),this},o.prototype.getBearing=function(){return this.transform.bearing},o.prototype.setBearing=function(n,s){return this.jumpTo({bearing:n},s),this},o.prototype.getPadding=function(){return this.transform.padding},o.prototype.setPadding=function(n,s){return this.jumpTo({padding:n},s),this},o.prototype.rotateTo=function(n,s,p){return this.easeTo(u.extend({bearing:n},s),p)},o.prototype.resetNorth=function(n,s){return this.rotateTo(0,u.extend({duration:1e3},n),s),this},o.prototype.resetNorthPitch=function(n,s){return this.easeTo(u.extend({bearing:0,pitch:0,duration:1e3},n),s),this},o.prototype.snapToNorth=function(n,s){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(n,s):this},o.prototype.getPitch=function(){return this.transform.pitch},o.prototype.setPitch=function(n,s){return this.jumpTo({pitch:n},s),this},o.prototype.cameraForBounds=function(n,s){n=u.LngLatBounds.convert(n);var p=s&&s.bearing||0;return this._cameraForBoxAndBearing(n.getNorthWest(),n.getSouthEast(),p,s)},o.prototype._cameraForBoxAndBearing=function(n,s,p,f){var d={top:0,bottom:0,right:0,left:0};if(typeof(f=u.extend({padding:d,offset:[0,0],maxZoom:this.transform.maxZoom},f)).padding=="number"){var v=f.padding;f.padding={top:v,bottom:v,right:v,left:v}}f.padding=u.extend(d,f.padding);var w=this.transform,A=w.padding,R=w.project(u.LngLat.convert(n)),F=w.project(u.LngLat.convert(s)),O=R.rotate(-p*Math.PI/180),W=F.rotate(-p*Math.PI/180),Z=new u.Point(Math.max(O.x,W.x),Math.max(O.y,W.y)),ee=new u.Point(Math.min(O.x,W.x),Math.min(O.y,W.y)),N=Z.sub(ee),Q=(w.width-(A.left+A.right+f.padding.left+f.padding.right))/N.x,ne=(w.height-(A.top+A.bottom+f.padding.top+f.padding.bottom))/N.y;if(!(ne<0||Q<0)){var ue=Math.min(w.scaleZoom(w.scale*Math.min(Q,ne)),f.maxZoom),me=typeof f.offset.x=="number"?new u.Point(f.offset.x,f.offset.y):u.Point.convert(f.offset),pe=new u.Point((f.padding.left-f.padding.right)/2,(f.padding.top-f.padding.bottom)/2).rotate(p*Math.PI/180),ve=me.add(pe).mult(w.scale/w.zoomScale(ue));return{center:w.unproject(R.add(F).div(2).sub(ve)),zoom:ue,bearing:p}}u.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},o.prototype.fitBounds=function(n,s,p){return this._fitInternal(this.cameraForBounds(n,s),s,p)},o.prototype.fitScreenCoordinates=function(n,s,p,f,d){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(u.Point.convert(n)),this.transform.pointLocation(u.Point.convert(s)),p,f),f,d)},o.prototype._fitInternal=function(n,s,p){return n?(delete(s=u.extend(n,s)).padding,s.linear?this.easeTo(s,p):this.flyTo(s,p)):this},o.prototype.jumpTo=function(n,s){this.stop();var p=this.transform,f=!1,d=!1,v=!1;return"zoom"in n&&p.zoom!==+n.zoom&&(f=!0,p.zoom=+n.zoom),n.center!==void 0&&(p.center=u.LngLat.convert(n.center)),"bearing"in n&&p.bearing!==+n.bearing&&(d=!0,p.bearing=+n.bearing),"pitch"in n&&p.pitch!==+n.pitch&&(v=!0,p.pitch=+n.pitch),n.padding==null||p.isPaddingEqual(n.padding)||(p.padding=n.padding),this.fire(new u.Event("movestart",s)).fire(new u.Event("move",s)),f&&this.fire(new u.Event("zoomstart",s)).fire(new u.Event("zoom",s)).fire(new u.Event("zoomend",s)),d&&this.fire(new u.Event("rotatestart",s)).fire(new u.Event("rotate",s)).fire(new u.Event("rotateend",s)),v&&this.fire(new u.Event("pitchstart",s)).fire(new u.Event("pitch",s)).fire(new u.Event("pitchend",s)),this.fire(new u.Event("moveend",s))},o.prototype.easeTo=function(n,s){var p=this;this._stop(!1,n.easeId),((n=u.extend({offset:[0,0],duration:500,easing:u.ease},n)).animate===!1||!n.essential&&u.browser.prefersReducedMotion)&&(n.duration=0);var f=this.transform,d=this.getZoom(),v=this.getBearing(),w=this.getPitch(),A=this.getPadding(),R="zoom"in n?+n.zoom:d,F="bearing"in n?this._normalizeBearing(n.bearing,v):v,O="pitch"in n?+n.pitch:w,W="padding"in n?n.padding:f.padding,Z=u.Point.convert(n.offset),ee=f.centerPoint.add(Z),N=f.pointLocation(ee),Q=u.LngLat.convert(n.center||N);this._normalizeCenter(Q);var ne,ue,me=f.project(N),pe=f.project(Q).sub(me),ve=f.zoomScale(R-d);n.around&&(ne=u.LngLat.convert(n.around),ue=f.locationPoint(ne));var Te={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||R!==d,this._rotating=this._rotating||v!==F,this._pitching=this._pitching||O!==w,this._padding=!f.isPaddingEqual(W),this._easeId=n.easeId,this._prepareEase(s,n.noMoveStart,Te),this._ease((function(ke){if(p._zooming&&(f.zoom=u.number(d,R,ke)),p._rotating&&(f.bearing=u.number(v,F,ke)),p._pitching&&(f.pitch=u.number(w,O,ke)),p._padding&&(f.interpolatePadding(A,W,ke),ee=f.centerPoint.add(Z)),ne)f.setLocationAtPoint(ne,ue);else{var Ce=f.zoomScale(f.zoom-d),$e=R>d?Math.min(2,ve):Math.max(.5,ve),nt=Math.pow($e,1-ke),ut=f.unproject(me.add(pe.mult(ke*nt)).mult(Ce));f.setLocationAtPoint(f.renderWorldCopies?ut.wrap():ut,ee)}p._fireMoveEvents(s)}),(function(ke){p._afterEase(s,ke)}),n),this},o.prototype._prepareEase=function(n,s,p){p===void 0&&(p={}),this._moving=!0,s||p.moving||this.fire(new u.Event("movestart",n)),this._zooming&&!p.zooming&&this.fire(new u.Event("zoomstart",n)),this._rotating&&!p.rotating&&this.fire(new u.Event("rotatestart",n)),this._pitching&&!p.pitching&&this.fire(new u.Event("pitchstart",n))},o.prototype._fireMoveEvents=function(n){this.fire(new u.Event("move",n)),this._zooming&&this.fire(new u.Event("zoom",n)),this._rotating&&this.fire(new u.Event("rotate",n)),this._pitching&&this.fire(new u.Event("pitch",n))},o.prototype._afterEase=function(n,s){if(!this._easeId||!s||this._easeId!==s){delete this._easeId;var p=this._zooming,f=this._rotating,d=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,p&&this.fire(new u.Event("zoomend",n)),f&&this.fire(new u.Event("rotateend",n)),d&&this.fire(new u.Event("pitchend",n)),this.fire(new u.Event("moveend",n))}},o.prototype.flyTo=function(n,s){var p=this;if(!n.essential&&u.browser.prefersReducedMotion){var f=u.pick(n,["center","zoom","bearing","pitch","around"]);return this.jumpTo(f,s)}this.stop(),n=u.extend({offset:[0,0],speed:1.2,curve:1.42,easing:u.ease},n);var d=this.transform,v=this.getZoom(),w=this.getBearing(),A=this.getPitch(),R=this.getPadding(),F="zoom"in n?u.clamp(+n.zoom,d.minZoom,d.maxZoom):v,O="bearing"in n?this._normalizeBearing(n.bearing,w):w,W="pitch"in n?+n.pitch:A,Z="padding"in n?n.padding:d.padding,ee=d.zoomScale(F-v),N=u.Point.convert(n.offset),Q=d.centerPoint.add(N),ne=d.pointLocation(Q),ue=u.LngLat.convert(n.center||ne);this._normalizeCenter(ue);var me=d.project(ne),pe=d.project(ue).sub(me),ve=n.curve,Te=Math.max(d.width,d.height),ke=Te/ee,Ce=pe.mag();if("minZoom"in n){var $e=u.clamp(Math.min(n.minZoom,v,F),d.minZoom,d.maxZoom),nt=Te/d.zoomScale($e-v);ve=Math.sqrt(nt/Ce*2)}var ut=ve*ve;function st(ht){var ct=(ke*ke-Te*Te+(ht?-1:1)*ut*ut*Ce*Ce)/(2*(ht?ke:Te)*ut*Ce);return Math.log(Math.sqrt(ct*ct+1)-ct)}function Ft(ht){return(Math.exp(ht)-Math.exp(-ht))/2}function We(ht){return(Math.exp(ht)+Math.exp(-ht))/2}var mt=st(0),xt=function(ht){return We(mt)/We(mt+ve*ht)},dt=function(ht){return Te*((We(mt)*(Ft(ct=mt+ve*ht)/We(ct))-Ft(mt))/ut)/Ce;var ct},ft=(st(1)-mt)/ve;if(Math.abs(Ce)<1e-6||!isFinite(ft)){if(Math.abs(Te-ke)<1e-6)return this.easeTo(n,s);var gt=ke<Te?-1:1;ft=Math.abs(Math.log(ke/Te))/ve,dt=function(){return 0},xt=function(ht){return Math.exp(gt*ve*ht)}}return n.duration="duration"in n?+n.duration:1e3*ft/("screenSpeed"in n?+n.screenSpeed/ve:+n.speed),n.maxDuration&&n.duration>n.maxDuration&&(n.duration=0),this._zooming=!0,this._rotating=w!==O,this._pitching=W!==A,this._padding=!d.isPaddingEqual(Z),this._prepareEase(s,!1),this._ease((function(ht){var ct=ht*ft,Jr=1/xt(ct);d.zoom=ht===1?F:v+d.scaleZoom(Jr),p._rotating&&(d.bearing=u.number(w,O,ht)),p._pitching&&(d.pitch=u.number(A,W,ht)),p._padding&&(d.interpolatePadding(R,Z,ht),Q=d.centerPoint.add(N));var Ir=ht===1?ue:d.unproject(me.add(pe.mult(dt(ct))).mult(Jr));d.setLocationAtPoint(d.renderWorldCopies?Ir.wrap():Ir,Q),p._fireMoveEvents(s)}),(function(){return p._afterEase(s)}),n),this},o.prototype.isEasing=function(){return!!this._easeFrameId},o.prototype.stop=function(){return this._stop()},o.prototype._stop=function(n,s){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var p=this._onEaseEnd;delete this._onEaseEnd,p.call(this,s)}if(!n){var f=this.handlers;f&&f.stop(!1)}return this},o.prototype._ease=function(n,s,p){p.animate===!1||p.duration===0?(n(1),s()):(this._easeStart=u.browser.now(),this._easeOptions=p,this._onEaseFrame=n,this._onEaseEnd=s,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},o.prototype._renderFrameCallback=function(){var n=Math.min((u.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(n)),n<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},o.prototype._normalizeBearing=function(n,s){n=u.wrap(n,-180,180);var p=Math.abs(n-s);return Math.abs(n-360-s)<p&&(n-=360),Math.abs(n+360-s)<p&&(n+=360),n},o.prototype._normalizeCenter=function(n){var s=this.transform;if(s.renderWorldCopies&&!s.lngRange){var p=n.lng-s.center.lng;n.lng+=p>180?-360:p<-180?360:0}},o})(u.Evented),Ai=function(i){i===void 0&&(i={}),this.options=i,u.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Ai.prototype.getDefaultPosition=function(){return"bottom-right"},Ai.prototype.onAdd=function(i){var o=this.options&&this.options.compact;return this._map=i,this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=M.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=M.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),o&&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),o===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ai.prototype.onRemove=function(){M.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},Ai.prototype._setElementTitle=function(i,o){var n=this._map._getUIString("AttributionControl."+o);i.title=n,i.setAttribute("aria-label",n)},Ai.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"))},Ai.prototype._updateEditLink=function(){var i=this._editLink;i||(i=this._editLink=this._container.querySelector(".mapbox-improve-map"));var o=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||u.config.ACCESS_TOKEN}];if(i){var n=o.reduce((function(s,p,f){return p.value&&(s+=p.key+"="+p.value+(f<o.length-1?"&":"")),s}),"?");i.href=u.config.FEEDBACK_URL+"/"+n+(this._map._hash?this._map._hash.getHashString(!0):""),i.rel="noopener nofollow",this._setElementTitle(i,"MapFeedback")}},Ai.prototype._updateData=function(i){!i||i.sourceDataType!=="metadata"&&i.sourceDataType!=="visibility"&&i.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},Ai.prototype._updateAttributions=function(){if(this._map.style){var i=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?i=i.concat(this.options.customAttribution.map((function(v){return typeof v!="string"?"":v}))):typeof this.options.customAttribution=="string"&&i.push(this.options.customAttribution)),this._map.style.stylesheet){var o=this._map.style.stylesheet;this.styleOwner=o.owner,this.styleId=o.id}var n=this._map.style.sourceCaches;for(var s in n){var p=n[s];if(p.used){var f=p.getSource();f.attribution&&i.indexOf(f.attribution)<0&&i.push(f.attribution)}}i.sort((function(v,w){return v.length-w.length}));var d=(i=i.filter((function(v,w){for(var A=w+1;A<i.length;A++)if(i[A].indexOf(v)>=0)return!1;return!0}))).join(" | ");d!==this._attribHTML&&(this._attribHTML=d,i.length?(this._innerContainer.innerHTML=d,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ai.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var bn=function(){u.bindAll(["_updateLogo"],this),u.bindAll(["_updateCompact"],this)};bn.prototype.onAdd=function(i){this._map=i,this._container=M.create("div","mapboxgl-ctrl");var o=M.create("a","mapboxgl-ctrl-logo");return o.target="_blank",o.rel="noopener nofollow",o.href="https://www.mapbox.com/",o.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),o.setAttribute("rel","noopener nofollow"),this._container.appendChild(o),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},bn.prototype.onRemove=function(){M.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},bn.prototype.getDefaultPosition=function(){return"bottom-left"},bn.prototype._updateLogo=function(i){i&&i.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},bn.prototype._logoRequired=function(){if(this._map.style){var i=this._map.style.sourceCaches;for(var o in i)if(i[o].getSource().mapbox_logo)return!0;return!1}},bn.prototype._updateCompact=function(){var i=this._container.children;if(i.length){var o=i[0];this._map.getCanvasContainer().offsetWidth<250?o.classList.add("mapboxgl-compact"):o.classList.remove("mapboxgl-compact")}};var vi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};vi.prototype.add=function(i){var o=++this._id;return this._queue.push({callback:i,id:o,cancelled:!1}),o},vi.prototype.remove=function(i){for(var o=this._currentlyRunning,n=0,s=o?this._queue.concat(o):this._queue;n<s.length;n+=1){var p=s[n];if(p.id===i)return void(p.cancelled=!0)}},vi.prototype.run=function(i){i===void 0&&(i=0);var o=this._currentlyRunning=this._queue;this._queue=[];for(var n=0,s=o;n<s.length;n+=1){var p=s[n];if(!p.cancelled&&(p.callback(i),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},vi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var An={"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"},bu=u.window.HTMLImageElement,ms=u.window.HTMLElement,Xt=u.window.ImageBitmap,ai={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,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},Ll=(function(i){function o(s){var p=this;if((s=u.extend({},ai,s)).minZoom!=null&&s.maxZoom!=null&&s.minZoom>s.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(s.minPitch!=null&&s.maxPitch!=null&&s.minPitch>s.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(s.minPitch!=null&&s.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(s.maxPitch!=null&&s.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var f=new Dt(s.minZoom,s.maxZoom,s.minPitch,s.maxPitch,s.renderWorldCopies);if(i.call(this,f,s),this._interactive=s.interactive,this._maxTileCacheSize=s.maxTileCacheSize,this._failIfMajorPerformanceCaveat=s.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=s.preserveDrawingBuffer,this._antialias=s.antialias,this._trackResize=s.trackResize,this._bearingSnap=s.bearingSnap,this._refreshExpiredTiles=s.refreshExpiredTiles,this._fadeDuration=s.fadeDuration,this._crossSourceCollisions=s.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=s.collectResourceTiming,this._renderTaskQueue=new vi,this._controls=[],this._mapId=u.uniqueId(),this._locale=u.extend({},An,s.locale),this._clickTolerance=s.clickTolerance,this._requestManager=new u.RequestManager(s.transformRequest,s.accessToken),typeof s.container=="string"){if(this._container=u.window.document.getElementById(s.container),!this._container)throw new Error("Container '"+s.container+"' not found.")}else{if(!(s.container instanceof ms))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=s.container}if(s.maxBounds&&this.setMaxBounds(s.maxBounds),u.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 p._update(!1)})),this.on("moveend",(function(){return p._update(!1)})),this.on("zoom",(function(){return p._update(!0)})),u.window!==void 0&&(u.window.addEventListener("online",this._onWindowOnline,!1),u.window.addEventListener("resize",this._onWindowResize,!1),u.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ye(this,s),this._hash=s.hash&&new Yi(typeof s.hash=="string"&&s.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:s.center,zoom:s.zoom,bearing:s.bearing,pitch:s.pitch}),s.bounds&&(this.resize(),this.fitBounds(s.bounds,u.extend({},s.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=s.localIdeographFontFamily,s.style&&this.setStyle(s.style,{localIdeographFontFamily:s.localIdeographFontFamily}),s.attributionControl&&this.addControl(new Ai({customAttribution:s.customAttribution})),this.addControl(new bn,s.logoPosition),this.on("style.load",(function(){p.transform.unmodified&&p.jumpTo(p.style.stylesheet)})),this.on("data",(function(d){p._update(d.dataType==="style"),p.fire(new u.Event(d.dataType+"data",d))})),this.on("dataloading",(function(d){p.fire(new u.Event(d.dataType+"dataloading",d))}))}i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o;var n={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return o.prototype._getMapId=function(){return this._mapId},o.prototype.addControl=function(s,p){if(p===void 0&&(p=s.getDefaultPosition?s.getDefaultPosition():"top-right"),!s||!s.onAdd)return this.fire(new u.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var f=s.onAdd(this);this._controls.push(s);var d=this._controlPositions[p];return p.indexOf("bottom")!==-1?d.insertBefore(f,d.firstChild):d.appendChild(f),this},o.prototype.removeControl=function(s){if(!s||!s.onRemove)return this.fire(new u.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var p=this._controls.indexOf(s);return p>-1&&this._controls.splice(p,1),s.onRemove(this),this},o.prototype.hasControl=function(s){return this._controls.indexOf(s)>-1},o.prototype.resize=function(s){var p=this._containerDimensions(),f=p[0],d=p[1];if(f===this.transform.width&&d===this.transform.height)return this;this._resizeCanvas(f,d),this.transform.resize(f,d),this.painter.resize(f,d);var v=!this._moving;return v&&this.fire(new u.Event("movestart",s)).fire(new u.Event("move",s)),this.fire(new u.Event("resize",s)),v&&this.fire(new u.Event("moveend",s)),this},o.prototype.getBounds=function(){return this.transform.getBounds()},o.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},o.prototype.setMaxBounds=function(s){return this.transform.setMaxBounds(u.LngLatBounds.convert(s)),this._update()},o.prototype.setMinZoom=function(s){if((s=s??-2)>=-2&&s<=this.transform.maxZoom)return this.transform.minZoom=s,this._update(),this.getZoom()<s&&this.setZoom(s),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},o.prototype.getMinZoom=function(){return this.transform.minZoom},o.prototype.setMaxZoom=function(s){if((s=s??22)>=this.transform.minZoom)return this.transform.maxZoom=s,this._update(),this.getZoom()>s&&this.setZoom(s),this;throw new Error("maxZoom must be greater than the current minZoom")},o.prototype.getMaxZoom=function(){return this.transform.maxZoom},o.prototype.setMinPitch=function(s){if((s=s??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(s>=0&&s<=this.transform.maxPitch)return this.transform.minPitch=s,this._update(),this.getPitch()<s&&this.setPitch(s),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},o.prototype.getMinPitch=function(){return this.transform.minPitch},o.prototype.setMaxPitch=function(s){if((s=s??60)>60)throw new Error("maxPitch must be less than or equal to 60");if(s>=this.transform.minPitch)return this.transform.maxPitch=s,this._update(),this.getPitch()>s&&this.setPitch(s),this;throw new Error("maxPitch must be greater than the current minPitch")},o.prototype.getMaxPitch=function(){return this.transform.maxPitch},o.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},o.prototype.setRenderWorldCopies=function(s){return this.transform.renderWorldCopies=s,this._update()},o.prototype.project=function(s){return this.transform.locationPoint(u.LngLat.convert(s))},o.prototype.unproject=function(s){return this.transform.pointLocation(u.Point.convert(s))},o.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},o.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},o.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},o.prototype._createDelegatedListener=function(s,p,f){var d,v=this;if(s==="mouseenter"||s==="mouseover"){var w=!1;return{layer:p,listener:f,delegates:{mousemove:function(R){var F=v.getLayer(p)?v.queryRenderedFeatures(R.point,{layers:[p]}):[];F.length?w||(w=!0,f.call(v,new Gr(s,v,R.originalEvent,{features:F}))):w=!1},mouseout:function(){w=!1}}}}if(s==="mouseleave"||s==="mouseout"){var A=!1;return{layer:p,listener:f,delegates:{mousemove:function(R){(v.getLayer(p)?v.queryRenderedFeatures(R.point,{layers:[p]}):[]).length?A=!0:A&&(A=!1,f.call(v,new Gr(s,v,R.originalEvent)))},mouseout:function(R){A&&(A=!1,f.call(v,new Gr(s,v,R.originalEvent)))}}}}return{layer:p,listener:f,delegates:(d={},d[s]=function(R){var F=v.getLayer(p)?v.queryRenderedFeatures(R.point,{layers:[p]}):[];F.length&&(R.features=F,f.call(v,R),delete R.features)},d)}},o.prototype.on=function(s,p,f){if(f===void 0)return i.prototype.on.call(this,s,p);var d=this._createDelegatedListener(s,p,f);for(var v in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[s]=this._delegatedListeners[s]||[],this._delegatedListeners[s].push(d),d.delegates)this.on(v,d.delegates[v]);return this},o.prototype.once=function(s,p,f){if(f===void 0)return i.prototype.once.call(this,s,p);var d=this._createDelegatedListener(s,p,f);for(var v in d.delegates)this.once(v,d.delegates[v]);return this},o.prototype.off=function(s,p,f){var d=this;return f===void 0?i.prototype.off.call(this,s,p):(this._delegatedListeners&&this._delegatedListeners[s]&&(function(v){for(var w=v[s],A=0;A<w.length;A++){var R=w[A];if(R.layer===p&&R.listener===f){for(var F in R.delegates)d.off(F,R.delegates[F]);return w.splice(A,1),d}}})(this._delegatedListeners),this)},o.prototype.queryRenderedFeatures=function(s,p){if(!this.style)return[];var f;if(p!==void 0||s===void 0||s instanceof u.Point||Array.isArray(s)||(p=s,s=void 0),p=p||{},(s=s||[[0,0],[this.transform.width,this.transform.height]])instanceof u.Point||typeof s[0]=="number")f=[u.Point.convert(s)];else{var d=u.Point.convert(s[0]),v=u.Point.convert(s[1]);f=[d,new u.Point(v.x,d.y),v,new u.Point(d.x,v.y),d]}return this.style.queryRenderedFeatures(f,p,this.transform)},o.prototype.querySourceFeatures=function(s,p){return this.style.querySourceFeatures(s,p)},o.prototype.setStyle=function(s,p){return(p=u.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},p)).diff!==!1&&p.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&s?(this._diffStyle(s,p),this):(this._localIdeographFontFamily=p.localIdeographFontFamily,this._updateStyle(s,p))},o.prototype._getUIString=function(s){var p=this._locale[s];if(p==null)throw new Error("Missing UI string '"+s+"'");return p},o.prototype._updateStyle=function(s,p){return this.style&&(this.style.setEventedParent(null),this.style._remove()),s?(this.style=new Ui(this,p||{}),this.style.setEventedParent(this,{style:this.style}),typeof s=="string"?this.style.loadURL(s):this.style.loadJSON(s),this):(delete this.style,this)},o.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Ui(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},o.prototype._diffStyle=function(s,p){var f=this;if(typeof s=="string"){var d=this._requestManager.normalizeStyleURL(s),v=this._requestManager.transformRequest(d,u.ResourceType.Style);u.getJSON(v,(function(w,A){w?f.fire(new u.ErrorEvent(w)):A&&f._updateDiff(A,p)}))}else typeof s=="object"&&this._updateDiff(s,p)},o.prototype._updateDiff=function(s,p){try{this.style.setState(s)&&this._update(!0)}catch(f){u.warnOnce("Unable to perform style diff: "+(f.message||f.error||f)+". Rebuilding the style from scratch."),this._updateStyle(s,p)}},o.prototype.getStyle=function(){if(this.style)return this.style.serialize()},o.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():u.warnOnce("There is no style added to the map.")},o.prototype.addSource=function(s,p){return this._lazyInitEmptyStyle(),this.style.addSource(s,p),this._update(!0)},o.prototype.isSourceLoaded=function(s){var p=this.style&&this.style.sourceCaches[s];if(p!==void 0)return p.loaded();this.fire(new u.ErrorEvent(new Error("There is no source with ID '"+s+"'")))},o.prototype.areTilesLoaded=function(){var s=this.style&&this.style.sourceCaches;for(var p in s){var f=s[p]._tiles;for(var d in f){var v=f[d];if(v.state!=="loaded"&&v.state!=="errored")return!1}}return!0},o.prototype.addSourceType=function(s,p,f){return this._lazyInitEmptyStyle(),this.style.addSourceType(s,p,f)},o.prototype.removeSource=function(s){return this.style.removeSource(s),this._update(!0)},o.prototype.getSource=function(s){return this.style.getSource(s)},o.prototype.addImage=function(s,p,f){f===void 0&&(f={});var d=f.pixelRatio;d===void 0&&(d=1);var v=f.sdf;v===void 0&&(v=!1);var w=f.stretchX,A=f.stretchY,R=f.content;if(this._lazyInitEmptyStyle(),p instanceof bu||Xt&&p instanceof Xt){var F=u.browser.getImageData(p);this.style.addImage(s,{data:new u.RGBAImage({width:F.width,height:F.height},F.data),pixelRatio:d,stretchX:w,stretchY:A,content:R,sdf:v,version:0})}else{if(p.width===void 0||p.height===void 0)return this.fire(new u.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 O=p;this.style.addImage(s,{data:new u.RGBAImage({width:p.width,height:p.height},new Uint8Array(p.data)),pixelRatio:d,stretchX:w,stretchY:A,content:R,sdf:v,version:0,userImage:O}),O.onAdd&&O.onAdd(this,s)}},o.prototype.updateImage=function(s,p){var f=this.style.getImage(s);if(!f)return this.fire(new u.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var d=p instanceof bu||Xt&&p instanceof Xt?u.browser.getImageData(p):p,v=d.width,w=d.height,A=d.data;return v===void 0||w===void 0?this.fire(new u.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`"))):v!==f.data.width||w!==f.data.height?this.fire(new u.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(f.data.replace(A,!(p instanceof bu||Xt&&p instanceof Xt)),void this.style.updateImage(s,f))},o.prototype.hasImage=function(s){return s?!!this.style.getImage(s):(this.fire(new u.ErrorEvent(new Error("Missing required image id"))),!1)},o.prototype.removeImage=function(s){this.style.removeImage(s)},o.prototype.loadImage=function(s,p){u.getImage(this._requestManager.transformRequest(s,u.ResourceType.Image),p)},o.prototype.listImages=function(){return this.style.listImages()},o.prototype.addLayer=function(s,p){return this._lazyInitEmptyStyle(),this.style.addLayer(s,p),this._update(!0)},o.prototype.moveLayer=function(s,p){return this.style.moveLayer(s,p),this._update(!0)},o.prototype.removeLayer=function(s){return this.style.removeLayer(s),this._update(!0)},o.prototype.getLayer=function(s){return this.style.getLayer(s)},o.prototype.setLayerZoomRange=function(s,p,f){return this.style.setLayerZoomRange(s,p,f),this._update(!0)},o.prototype.setFilter=function(s,p,f){return f===void 0&&(f={}),this.style.setFilter(s,p,f),this._update(!0)},o.prototype.getFilter=function(s){return this.style.getFilter(s)},o.prototype.setPaintProperty=function(s,p,f,d){return d===void 0&&(d={}),this.style.setPaintProperty(s,p,f,d),this._update(!0)},o.prototype.getPaintProperty=function(s,p){return this.style.getPaintProperty(s,p)},o.prototype.setLayoutProperty=function(s,p,f,d){return d===void 0&&(d={}),this.style.setLayoutProperty(s,p,f,d),this._update(!0)},o.prototype.getLayoutProperty=function(s,p){return this.style.getLayoutProperty(s,p)},o.prototype.setLight=function(s,p){return p===void 0&&(p={}),this._lazyInitEmptyStyle(),this.style.setLight(s,p),this._update(!0)},o.prototype.getLight=function(){return this.style.getLight()},o.prototype.setFeatureState=function(s,p){return this.style.setFeatureState(s,p),this._update()},o.prototype.removeFeatureState=function(s,p){return this.style.removeFeatureState(s,p),this._update()},o.prototype.getFeatureState=function(s){return this.style.getFeatureState(s)},o.prototype.getContainer=function(){return this._container},o.prototype.getCanvasContainer=function(){return this._canvasContainer},o.prototype.getCanvas=function(){return this._canvas},o.prototype._containerDimensions=function(){var s=0,p=0;return this._container&&(s=this._container.clientWidth||400,p=this._container.clientHeight||300),[s,p]},o.prototype._detectMissingCSS=function(){u.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&u.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/.")},o.prototype._setupContainer=function(){var s=this._container;s.classList.add("mapboxgl-map"),(this._missingCSSCanary=M.create("div","mapboxgl-canary",s)).style.visibility="hidden",this._detectMissingCSS();var p=this._canvasContainer=M.create("div","mapboxgl-canvas-container",s);this._interactive&&p.classList.add("mapboxgl-interactive"),this._canvas=M.create("canvas","mapboxgl-canvas",p),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 f=this._containerDimensions();this._resizeCanvas(f[0],f[1]);var d=this._controlContainer=M.create("div","mapboxgl-control-container",s),v=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(w){v[w]=M.create("div","mapboxgl-ctrl-"+w,d)})),this._container.addEventListener("scroll",this._onMapScroll,!1)},o.prototype._resizeCanvas=function(s,p){var f=u.browser.devicePixelRatio||1;this._canvas.width=f*s,this._canvas.height=f*p,this._canvas.style.width=s+"px",this._canvas.style.height=p+"px"},o.prototype._setupPainter=function(){var s=u.extend({},U.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),p=this._canvas.getContext("webgl",s)||this._canvas.getContext("experimental-webgl",s);p?(this.painter=new vr(p,this.transform),u.webpSupported.testSupport(p)):this.fire(new u.ErrorEvent(new Error("Failed to initialize WebGL")))},o.prototype._contextLost=function(s){s.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new u.Event("webglcontextlost",{originalEvent:s}))},o.prototype._contextRestored=function(s){this._setupPainter(),this.resize(),this._update(),this.fire(new u.Event("webglcontextrestored",{originalEvent:s}))},o.prototype._onMapScroll=function(s){if(s.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},o.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},o.prototype._update=function(s){return this.style?(this._styleDirty=this._styleDirty||s,this._sourcesDirty=!0,this.triggerRepaint(),this):this},o.prototype._requestRenderFrame=function(s){return this._update(),this._renderTaskQueue.add(s)},o.prototype._cancelRenderFrame=function(s){this._renderTaskQueue.remove(s)},o.prototype._render=function(s){var p,f=this,d=0,v=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(p=v.createQueryEXT(),v.beginQueryEXT(v.TIME_ELAPSED_EXT,p),d=u.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(s),!this._removed){var w=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var A=this.transform.zoom,R=u.browser.now();this.style.zoomHistory.update(A,R);var F=new u.EvaluationParameters(A,{now:R,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),O=F.crossFadingFactor();O===1&&O===this._crossFadingFactor||(w=!0,this._crossFadingFactor=O),this.style.update(F)}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 u.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new u.Event("load"))),this.style&&(this.style.hasTransitions()||w)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var W=u.browser.now()-d;v.endQueryEXT(v.TIME_ELAPSED_EXT,p),setTimeout((function(){var N=v.getQueryObjectEXT(p,v.QUERY_RESULT_EXT)/1e6;v.deleteQueryEXT(p),f.fire(new u.Event("gpu-timing-frame",{cpuTime:W,gpuTime:N}))}),50)}if(this.listens("gpu-timing-layer")){var Z=this.painter.collectGpuTimers();setTimeout((function(){var N=f.painter.queryGpuTimers(Z);f.fire(new u.Event("gpu-timing-layer",{layerTimes:N}))}),50)}var ee=this._sourcesDirty||this._styleDirty||this._placementDirty;return ee||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new u.Event("idle")),!this._loaded||this._fullyLoaded||ee||(this._fullyLoaded=!0),this}},o.prototype.remove=function(){this._hash&&this._hash.remove();for(var s=0,p=this._controls;s<p.length;s+=1)p[s].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),u.window!==void 0&&(u.window.removeEventListener("resize",this._onWindowResize,!1),u.window.removeEventListener("orientationchange",this._onWindowResize,!1),u.window.removeEventListener("online",this._onWindowOnline,!1));var f=this.painter.context.gl.getExtension("WEBGL_lose_context");f&&f.loseContext(),Bo(this._canvasContainer),Bo(this._controlContainer),Bo(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new u.Event("remove"))},o.prototype.triggerRepaint=function(){var s=this;this.style&&!this._frame&&(this._frame=u.browser.frame((function(p){s._frame=null,s._render(p)})))},o.prototype._onWindowOnline=function(){this._update()},o.prototype._onWindowResize=function(s){this._trackResize&&this.resize({originalEvent:s})._update()},n.showTileBoundaries.get=function(){return!!this._showTileBoundaries},n.showTileBoundaries.set=function(s){this._showTileBoundaries!==s&&(this._showTileBoundaries=s,this._update())},n.showPadding.get=function(){return!!this._showPadding},n.showPadding.set=function(s){this._showPadding!==s&&(this._showPadding=s,this._update())},n.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},n.showCollisionBoxes.set=function(s){this._showCollisionBoxes!==s&&(this._showCollisionBoxes=s,s?this.style._generateCollisionBoxes():this._update())},n.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},n.showOverdrawInspector.set=function(s){this._showOverdrawInspector!==s&&(this._showOverdrawInspector=s,this._update())},n.repaint.get=function(){return!!this._repaint},n.repaint.set=function(s){this._repaint!==s&&(this._repaint=s,this.triggerRepaint())},n.vertices.get=function(){return!!this._vertices},n.vertices.set=function(s){this._vertices=s,this._update()},o.prototype._setCacheLimits=function(s,p){u.setCacheLimits(s,p)},n.version.get=function(){return u.version},Object.defineProperties(o.prototype,n),o})(ds);function Bo(i){i.parentNode&&i.parentNode.removeChild(i)}var wu={showCompass:!0,showZoom:!0,visualizePitch:!1},Fn=function(i){var o=this;this.options=u.extend({},wu,i),this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(n){return n.preventDefault()})),this.options.showZoom&&(u.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(function(n){return o._map.zoomIn({},{originalEvent:n})})),M.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(function(n){return o._map.zoomOut({},{originalEvent:n})})),M.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(u.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(function(n){o.options.visualizePitch?o._map.resetNorthPitch({},{originalEvent:n}):o._map.resetNorth({},{originalEvent:n})})),this._compassIcon=M.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Fn.prototype._updateZoomButtons=function(){var i=this._map.getZoom(),o=i===this._map.getMaxZoom(),n=i===this._map.getMinZoom();this._zoomInButton.disabled=o,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",o.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())},Fn.prototype._rotateCompassArrow=function(){var i=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=i},Fn.prototype.onAdd=function(i){return this._map=i,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 Zi(this._map,this._compass,this.options.visualizePitch)),this._container},Fn.prototype.onRemove=function(){M.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},Fn.prototype._createButton=function(i,o){var n=M.create("button",i,this._container);return n.type="button",n.addEventListener("click",o),n},Fn.prototype._setButtonTitle=function(i,o){var n=this._map._getUIString("NavigationControl."+o);i.title=n,i.setAttribute("aria-label",n)};var Zi=function(i,o,n){n===void 0&&(n=!1),this._clickTolerance=10,this.element=o,this.mouseRotate=new ps({clickTolerance:i.dragRotate._mouseRotate._clickTolerance}),this.map=i,n&&(this.mousePitch=new gu({clickTolerance:i.dragRotate._mousePitch._clickTolerance})),u.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),M.addEventListener(o,"mousedown",this.mousedown),M.addEventListener(o,"touchstart",this.touchstart,{passive:!1}),M.addEventListener(o,"touchmove",this.touchmove),M.addEventListener(o,"touchend",this.touchend),M.addEventListener(o,"touchcancel",this.reset)};function ta(i,o,n){if(i=new u.LngLat(i.lng,i.lat),o){var s=new u.LngLat(i.lng-360,i.lat),p=new u.LngLat(i.lng+360,i.lat),f=n.locationPoint(i).distSqr(o);n.locationPoint(s).distSqr(o)<f?i=s:n.locationPoint(p).distSqr(o)<f&&(i=p)}for(;Math.abs(i.lng-n.center.lng)>180;){var d=n.locationPoint(i);if(d.x>=0&&d.y>=0&&d.x<=n.width&&d.y<=n.height)break;i.lng>n.center.lng?i.lng-=360:i.lng+=360}return i}Zi.prototype.down=function(i,o){this.mouseRotate.mousedown(i,o),this.mousePitch&&this.mousePitch.mousedown(i,o),M.disableDrag()},Zi.prototype.move=function(i,o){var n=this.map,s=this.mouseRotate.mousemoveWindow(i,o);if(s&&s.bearingDelta&&n.setBearing(n.getBearing()+s.bearingDelta),this.mousePitch){var p=this.mousePitch.mousemoveWindow(i,o);p&&p.pitchDelta&&n.setPitch(n.getPitch()+p.pitchDelta)}},Zi.prototype.off=function(){var i=this.element;M.removeEventListener(i,"mousedown",this.mousedown),M.removeEventListener(i,"touchstart",this.touchstart,{passive:!1}),M.removeEventListener(i,"touchmove",this.touchmove),M.removeEventListener(i,"touchend",this.touchend),M.removeEventListener(i,"touchcancel",this.reset),this.offTemp()},Zi.prototype.offTemp=function(){M.enableDrag(),M.removeEventListener(u.window,"mousemove",this.mousemove),M.removeEventListener(u.window,"mouseup",this.mouseup)},Zi.prototype.mousedown=function(i){this.down(u.extend({},i,{ctrlKey:!0,preventDefault:function(){return i.preventDefault()}}),M.mousePos(this.element,i)),M.addEventListener(u.window,"mousemove",this.mousemove),M.addEventListener(u.window,"mouseup",this.mouseup)},Zi.prototype.mousemove=function(i){this.move(i,M.mousePos(this.element,i))},Zi.prototype.mouseup=function(i){this.mouseRotate.mouseupWindow(i),this.mousePitch&&this.mousePitch.mouseupWindow(i),this.offTemp()},Zi.prototype.touchstart=function(i){i.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=M.touchPos(this.element,i.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return i.preventDefault()}},this._startPos))},Zi.prototype.touchmove=function(i){i.targetTouches.length!==1?this.reset():(this._lastPos=M.touchPos(this.element,i.targetTouches)[0],this.move({preventDefault:function(){return i.preventDefault()}},this._lastPos))},Zi.prototype.touchend=function(i){i.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Zi.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var En={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 ys(i,o,n){var s=i.classList;for(var p in En)s.remove("mapboxgl-"+n+"-anchor-"+p);s.add("mapboxgl-"+n+"-anchor-"+o)}var ra,za=(function(i){function o(n,s){if(i.call(this),(n instanceof u.window.HTMLElement||s)&&(n=u.extend({element:n},s)),u.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._scale=n&&n.scale||1,this._draggable=n&&n.draggable||!1,this._clickTolerance=n&&n.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=n&&n.rotation||0,this._rotationAlignment=n&&n.rotationAlignment||"auto",this._pitchAlignment=n&&n.pitchAlignment&&n.pitchAlignment!=="auto"?n.pitchAlignment:this._rotationAlignment,n&&n.element)this._element=n.element,this._offset=u.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=M.create("div"),this._element.setAttribute("aria-label","Map marker");var p=M.createNS("http://www.w3.org/2000/svg","svg");p.setAttributeNS(null,"display","block"),p.setAttributeNS(null,"height","41px"),p.setAttributeNS(null,"width","27px"),p.setAttributeNS(null,"viewBox","0 0 27 41");var f=M.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"stroke","none"),f.setAttributeNS(null,"stroke-width","1"),f.setAttributeNS(null,"fill","none"),f.setAttributeNS(null,"fill-rule","evenodd");var d=M.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill-rule","nonzero");var v=M.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(3.0, 29.0)"),v.setAttributeNS(null,"fill","#000000");for(var w=0,A=[{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"}];w<A.length;w+=1){var R=A[w],F=M.createNS("http://www.w3.org/2000/svg","ellipse");F.setAttributeNS(null,"opacity","0.04"),F.setAttributeNS(null,"cx","10.5"),F.setAttributeNS(null,"cy","5.80029008"),F.setAttributeNS(null,"rx",R.rx),F.setAttributeNS(null,"ry",R.ry),v.appendChild(F)}var O=M.createNS("http://www.w3.org/2000/svg","g");O.setAttributeNS(null,"fill",this._color);var W=M.createNS("http://www.w3.org/2000/svg","path");W.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"),O.appendChild(W);var Z=M.createNS("http://www.w3.org/2000/svg","g");Z.setAttributeNS(null,"opacity","0.25"),Z.setAttributeNS(null,"fill","#000000");var ee=M.createNS("http://www.w3.org/2000/svg","path");ee.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"),Z.appendChild(ee);var N=M.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"transform","translate(6.0, 7.0)"),N.setAttributeNS(null,"fill","#FFFFFF");var Q=M.createNS("http://www.w3.org/2000/svg","g");Q.setAttributeNS(null,"transform","translate(8.0, 8.0)");var ne=M.createNS("http://www.w3.org/2000/svg","circle");ne.setAttributeNS(null,"fill","#000000"),ne.setAttributeNS(null,"opacity","0.25"),ne.setAttributeNS(null,"cx","5.5"),ne.setAttributeNS(null,"cy","5.5"),ne.setAttributeNS(null,"r","5.4999962");var ue=M.createNS("http://www.w3.org/2000/svg","circle");ue.setAttributeNS(null,"fill","#FFFFFF"),ue.setAttributeNS(null,"cx","5.5"),ue.setAttributeNS(null,"cy","5.5"),ue.setAttributeNS(null,"r","5.4999962"),Q.appendChild(ne),Q.appendChild(ue),d.appendChild(v),d.appendChild(O),d.appendChild(Z),d.appendChild(N),d.appendChild(Q),p.appendChild(d),p.setAttributeNS(null,"height",41*this._scale+"px"),p.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(p),this._offset=u.Point.convert(n&&n.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(function(me){me.preventDefault()})),this._element.addEventListener("mousedown",(function(me){me.preventDefault()})),ys(this._element,this._anchor,"marker"),this._popup=null}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.addTo=function(n){return this.remove(),this._map=n,n.getCanvasContainer().appendChild(this._element),n.on("move",this._update),n.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},o.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),M.remove(this._element),this._popup&&this._popup.remove(),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(n){return this._lngLat=u.LngLat.convert(n),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},o.prototype.getElement=function(){return this._element},o.prototype.setPopup=function(n){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),n){if(!("offset"in n.options)){var s=Math.sqrt(Math.pow(13.5,2)/2);n.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[s,-1*(24.6+s)],"bottom-right":[-s,-1*(24.6+s)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=n,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},o.prototype._onKeyPress=function(n){var s=n.code,p=n.charCode||n.keyCode;s!=="Space"&&s!=="Enter"&&p!==32&&p!==13||this.togglePopup()},o.prototype._onMapClick=function(n){var s=n.originalEvent.target,p=this._element;this._popup&&(s===p||p.contains(s))&&this.togglePopup()},o.prototype.getPopup=function(){return this._popup},o.prototype.togglePopup=function(){var n=this._popup;return n?(n.isOpen()?n.remove():n.addTo(this._map),this):this},o.prototype._update=function(n){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=ta(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var s="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?s="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(s="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var p="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?p="rotateX(0deg)":this._pitchAlignment==="map"&&(p="rotateX("+this._map.getPitch()+"deg)"),n&&n.type!=="moveend"||(this._pos=this._pos.round()),M.setTransform(this._element,En[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+p+" "+s)}},o.prototype.getOffset=function(){return this._offset},o.prototype.setOffset=function(n){return this._offset=u.Point.convert(n),this._update(),this},o.prototype._onMove=function(n){if(!this._isDragging){var s=this._clickTolerance||this._map._clickTolerance;this._isDragging=n.point.dist(this._pointerdownPos)>=s}this._isDragging&&(this._pos=n.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 u.Event("dragstart"))),this.fire(new u.Event("drag")))},o.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 u.Event("dragend")),this._state="inactive"},o.prototype._addDragHandler=function(n){this._element.contains(n.originalEvent.target)&&(n.preventDefault(),this._positionDelta=n.point.sub(this._pos).add(this._offset),this._pointerdownPos=n.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))},o.prototype.setDraggable=function(n){return this._draggable=!!n,this._map&&(n?(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},o.prototype.isDraggable=function(){return this._draggable},o.prototype.setRotation=function(n){return this._rotation=n||0,this._update(),this},o.prototype.getRotation=function(){return this._rotation},o.prototype.setRotationAlignment=function(n){return this._rotationAlignment=n||"auto",this._update(),this},o.prototype.getRotationAlignment=function(){return this._rotationAlignment},o.prototype.setPitchAlignment=function(n){return this._pitchAlignment=n&&n!=="auto"?n:this._rotationAlignment,this._update(),this},o.prototype.getPitchAlignment=function(){return this._pitchAlignment},o})(u.Evented),Su={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ia=0,zo=!1,Iu=(function(i){function o(n){i.call(this),this.options=u.extend({},Su,n),u.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.onAdd=function(n){var s;return this._map=n,this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),s=this._setupUI,ra!==void 0?s(ra):u.window.navigator.permissions!==void 0?u.window.navigator.permissions.query({name:"geolocation"}).then((function(p){s(ra=p.state!=="denied")})):s(ra=!!u.window.navigator.geolocation),this._container},o.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(u.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(),M.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ia=0,zo=!1},o.prototype._isOutOfMapMaxBounds=function(n){var s=this._map.getMaxBounds(),p=n.coords;return s&&(p.longitude<s.getWest()||p.longitude>s.getEast()||p.latitude<s.getSouth()||p.latitude>s.getNorth())},o.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")}},o.prototype._onSuccess=function(n){if(this._map){if(this._isOutOfMapMaxBounds(n))return this._setErrorState(),this.fire(new u.Event("outofmaxbounds",n)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=n,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(n),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(n),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new u.Event("geolocate",n)),this._finish()}},o.prototype._updateCamera=function(n){var s=new u.LngLat(n.coords.longitude,n.coords.latitude),p=n.coords.accuracy,f=this._map.getBearing(),d=u.extend({bearing:f},this.options.fitBoundsOptions);this._map.fitBounds(s.toBounds(p),d,{geolocateSource:!0})},o.prototype._updateMarker=function(n){if(n){var s=new u.LngLat(n.coords.longitude,n.coords.latitude);this._accuracyCircleMarker.setLngLat(s).addTo(this._map),this._userLocationDotMarker.setLngLat(s).addTo(this._map),this._accuracy=n.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},o.prototype._updateCircleRadius=function(){var n=this._map._container.clientHeight/2,s=this._map.unproject([0,n]),p=this._map.unproject([1,n]),f=s.distanceTo(p),d=Math.ceil(2*this._accuracy/f);this._circleElement.style.width=d+"px",this._circleElement.style.height=d+"px"},o.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},o.prototype._onError=function(n){if(this._map){if(this.options.trackUserLocation)if(n.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 s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(n.code===3&&zo)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new u.Event("error",n)),this._finish()}},o.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},o.prototype._setupUI=function(n){var s=this;if(this._container.addEventListener("contextmenu",(function(d){return d.preventDefault()})),this._geolocateButton=M.create("button","mapboxgl-ctrl-geolocate",this._container),M.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",n===!1){u.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var p=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=p,this._geolocateButton.setAttribute("aria-label",p)}else{var f=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=M.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new za(this._dotElement),this._circleElement=M.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new za({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(d){d.geolocateSource||s._watchState!=="ACTIVE_LOCK"||d.originalEvent&&d.originalEvent.type==="resize"||(s._watchState="BACKGROUND",s._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),s._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),s.fire(new u.Event("trackuserlocationend")))}))},o.prototype.trigger=function(){if(!this._setup)return u.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 u.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ia--,zo=!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 u.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 u.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var n;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++ia>1?(n={maximumAge:6e5,timeout:0},zo=!0):(n=this.options.positionOptions,zo=!1),this._geolocationWatchID=u.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,n)}}else u.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},o.prototype._clearWatch=function(){u.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)},o})(u.Evented),to={maxWidth:100,unit:"metric"},ro=function(i){this.options=u.extend({},to,i),u.bindAll(["_onMove","setUnit"],this)};function vs(i,o,n){var s=n&&n.maxWidth||100,p=i._container.clientHeight/2,f=i.unproject([0,p]),d=i.unproject([s,p]),v=f.distanceTo(d);if(n&&n.unit==="imperial"){var w=3.2808*v;w>5280?io(o,s,w/5280,i._getUIString("ScaleControl.Miles")):io(o,s,w,i._getUIString("ScaleControl.Feet"))}else n&&n.unit==="nautical"?io(o,s,v/1852,i._getUIString("ScaleControl.NauticalMiles")):v>=1e3?io(o,s,v/1e3,i._getUIString("ScaleControl.Kilometers")):io(o,s,v,i._getUIString("ScaleControl.Meters"))}function io(i,o,n,s){var p,f,d,v=(p=n,(f=Math.pow(10,(""+Math.floor(p)).length-1))*(d=(d=p/f)>=10?10:d>=5?5:d>=3?3:d>=2?2:d>=1?1:(function(w){var A=Math.pow(10,Math.ceil(-Math.log(w)/Math.LN10));return Math.round(w*A)/A})(d)));i.style.width=o*(v/n)+"px",i.innerHTML=v+"&nbsp;"+s}ro.prototype.getDefaultPosition=function(){return"bottom-left"},ro.prototype._onMove=function(){vs(this._map,this._container,this.options)},ro.prototype.onAdd=function(i){return this._map=i,this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",i.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ro.prototype.onRemove=function(){M.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ro.prototype.setUnit=function(i){this.options.unit=i,vs(this._map,this._container,this.options)};var ln=function(i){this._fullscreen=!1,i&&i.container&&(i.container instanceof u.window.HTMLElement?this._container=i.container:u.warnOnce("Full screen control 'container' must be a DOM element.")),u.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in u.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in u.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in u.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in u.window.document&&(this._fullscreenchange="MSFullscreenChange")};ln.prototype.onAdd=function(i){return this._map=i,this._container||(this._container=this._map.getContainer()),this._controlContainer=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",u.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},ln.prototype.onRemove=function(){M.remove(this._controlContainer),this._map=null,u.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ln.prototype._checkFullscreenSupport=function(){return!!(u.window.document.fullscreenEnabled||u.window.document.mozFullScreenEnabled||u.window.document.msFullscreenEnabled||u.window.document.webkitFullscreenEnabled)},ln.prototype._setupUI=function(){var i=this._fullscreenButton=M.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);M.create("span","mapboxgl-ctrl-icon",i).setAttribute("aria-hidden",!0),i.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),u.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ln.prototype._updateTitle=function(){var i=this._getTitle();this._fullscreenButton.setAttribute("aria-label",i),this._fullscreenButton.title=i},ln.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ln.prototype._isFullscreen=function(){return this._fullscreen},ln.prototype._changeIcon=function(){(u.window.document.fullscreenElement||u.window.document.mozFullScreenElement||u.window.document.webkitFullscreenElement||u.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ln.prototype._onClickFullscreen=function(){this._isFullscreen()?u.window.document.exitFullscreen?u.window.document.exitFullscreen():u.window.document.mozCancelFullScreen?u.window.document.mozCancelFullScreen():u.window.document.msExitFullscreen?u.window.document.msExitFullscreen():u.window.document.webkitCancelFullScreen&&u.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 Tu={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Da=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Au=(function(i){function o(n){i.call(this),this.options=u.extend(Object.create(Tu),n),u.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return i&&(o.__proto__=i),(o.prototype=Object.create(i&&i.prototype)).constructor=o,o.prototype.addTo=function(n){return this._map&&this.remove(),this._map=n,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 u.Event("open")),this},o.prototype.isOpen=function(){return!!this._map},o.prototype.remove=function(){return this._content&&M.remove(this._content),this._container&&(M.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 u.Event("close")),this},o.prototype.getLngLat=function(){return this._lngLat},o.prototype.setLngLat=function(n){return this._lngLat=u.LngLat.convert(n),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},o.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},o.prototype.getElement=function(){return this._container},o.prototype.setText=function(n){return this.setDOMContent(u.window.document.createTextNode(n))},o.prototype.setHTML=function(n){var s,p=u.window.document.createDocumentFragment(),f=u.window.document.createElement("body");for(f.innerHTML=n;s=f.firstChild;)p.appendChild(s);return this.setDOMContent(p)},o.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},o.prototype.setMaxWidth=function(n){return this.options.maxWidth=n,this._update(),this},o.prototype.setDOMContent=function(n){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=M.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(n),this._createCloseButton(),this._update(),this._focusFirstElement(),this},o.prototype.addClassName=function(n){this._container&&this._container.classList.add(n)},o.prototype.removeClassName=function(n){this._container&&this._container.classList.remove(n)},o.prototype.setOffset=function(n){return this.options.offset=n,this._update(),this},o.prototype.toggleClassName=function(n){if(this._container)return this._container.classList.toggle(n)},o.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=M.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},o.prototype._onMouseUp=function(n){this._update(n.point)},o.prototype._onMouseMove=function(n){this._update(n.point)},o.prototype._onDrag=function(n){this._update(n.point)},o.prototype._update=function(n){var s=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=M.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=M.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(F){return s._container.classList.add(F)})),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=ta(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||n)){var p=this._pos=this._trackPointer&&n?n:this._map.project(this._lngLat),f=this.options.anchor,d=(function F(O){if(O){if(typeof O=="number"){var W=Math.round(Math.sqrt(.5*Math.pow(O,2)));return{center:new u.Point(0,0),top:new u.Point(0,O),"top-left":new u.Point(W,W),"top-right":new u.Point(-W,W),bottom:new u.Point(0,-O),"bottom-left":new u.Point(W,-W),"bottom-right":new u.Point(-W,-W),left:new u.Point(O,0),right:new u.Point(-O,0)}}if(O instanceof u.Point||Array.isArray(O)){var Z=u.Point.convert(O);return{center:Z,top:Z,"top-left":Z,"top-right":Z,bottom:Z,"bottom-left":Z,"bottom-right":Z,left:Z,right:Z}}return{center:u.Point.convert(O.center||[0,0]),top:u.Point.convert(O.top||[0,0]),"top-left":u.Point.convert(O["top-left"]||[0,0]),"top-right":u.Point.convert(O["top-right"]||[0,0]),bottom:u.Point.convert(O.bottom||[0,0]),"bottom-left":u.Point.convert(O["bottom-left"]||[0,0]),"bottom-right":u.Point.convert(O["bottom-right"]||[0,0]),left:u.Point.convert(O.left||[0,0]),right:u.Point.convert(O.right||[0,0])}}return F(new u.Point(0,0))})(this.options.offset);if(!f){var v,w=this._container.offsetWidth,A=this._container.offsetHeight;v=p.y+d.bottom.y<A?["top"]:p.y>this._map.transform.height-A?["bottom"]:[],p.x<w/2?v.push("left"):p.x>this._map.transform.width-w/2&&v.push("right"),f=v.length===0?"bottom":v.join("-")}var R=p.add(d[f]).round();M.setTransform(this._container,En[f]+" translate("+R.x+"px,"+R.y+"px)"),ys(this._container,f,"popup")}},o.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var n=this._container.querySelector(Da);n&&n.focus()}},o.prototype._onClose=function(){this.remove()},o})(u.Evented),gs={version:u.version,supported:U,setRTLTextPlugin:u.setRTLTextPlugin,getRTLTextPluginStatus:u.getRTLTextPluginStatus,Map:Ll,NavigationControl:Fn,GeolocateControl:Iu,AttributionControl:Ai,ScaleControl:ro,FullscreenControl:ln,Popup:Au,Marker:za,Style:Ui,LngLat:u.LngLat,LngLatBounds:u.LngLatBounds,Point:u.Point,MercatorCoordinate:u.MercatorCoordinate,Evented:u.Evented,config:u.config,prewarm:function(){ge().acquire(ye)},clearPrewarmedResources:function(){var i=Je;i&&(i.isPreloaded()&&i.numActive()===1?(i.release(ye),Je=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return u.config.ACCESS_TOKEN},set accessToken(i){u.config.ACCESS_TOKEN=i},get baseApiUrl(){return u.config.API_URL},set baseApiUrl(i){u.config.API_URL=i},get workerCount(){return Ae.workerCount},set workerCount(i){Ae.workerCount=i},get maxParallelImageRequests(){return u.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(i){u.config.MAX_PARALLEL_IMAGE_REQUESTS=i},clearStorage:function(i){u.clearTileCache(i)},workerUrl:""};return gs})),E}))})(wc)),wc.exports}var L0=R0();const fo=wt.getDefaultExportFromCjs(L0);var Yu={exports:{}},xp,Ly;function F0(){if(Ly)return xp;Ly=1,xp=_;var y={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function _(x){if(!x||!x.type)return null;var k=y[x.type];if(!k)return null;if(k==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:x}]};if(k==="feature")return{type:"FeatureCollection",features:[x]};if(k==="featurecollection")return x}return xp}function Sc(y){switch(y&&y.type||null){case"FeatureCollection":return y.features=y.features.reduce(function(_,x){return _.concat(Sc(x))},[]),y;case"Feature":return y.geometry?Sc(y.geometry).map(function(_){var x={type:"Feature",properties:JSON.parse(JSON.stringify(y.properties)),geometry:_};return y.id!==void 0&&(x.id=y.id),x}):[y];case"MultiPoint":return y.coordinates.map(function(_){return{type:"Point",coordinates:_}});case"MultiPolygon":return y.coordinates.map(function(_){return{type:"Polygon",coordinates:_}});case"MultiLineString":return y.coordinates.map(function(_){return{type:"LineString",coordinates:_}});case"GeometryCollection":return y.geometries.map(Sc).reduce(function(_,x){return _.concat(x)},[]);case"Point":case"Polygon":case"LineString":return[y]}}const O0=Object.freeze(Object.defineProperty({__proto__:null,default:Sc},Symbol.toStringTag,{value:"Module"})),V0=wt.getAugmentedNamespace(O0);var bp,Fy;function q0(){return Fy||(Fy=1,bp=function(_){return x(_);function x(k){return Array.isArray(k)&&k.length&&typeof k[0]=="number"?[k]:k.reduce(function(E,D){return Array.isArray(D)&&Array.isArray(D[0])?E.concat(x(D)):(E.push(D),E)},[])}}),bp}var wp,Oy;function U0(){if(Oy)return wp;Oy=1;var y=F0(),_=V0,x=q0();return _ instanceof Function||(_=_.default),wp=function(k){if(!k)return[];var E=_(y(k)),D=[];return E.features.forEach(function(u){u.geometry&&(D=D.concat(x(u.geometry.coordinates)))}),D},wp}var Sp,Vy;function Qu(){if(Vy)return Sp;Vy=1;var y=Function.prototype.toString,_=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,x,k;if(typeof _=="function"&&typeof Object.defineProperty=="function")try{x=Object.defineProperty({},"length",{get:function(){throw k}}),k={},_(function(){throw 42},null,x)}catch(Ue){Ue!==k&&(_=null)}else _=null;var E=/^\s*class\b/,D=function(fe){try{var Ke=y.call(fe);return E.test(Ke)}catch{return!1}},u=function(fe){try{return D(fe)?!1:(y.call(fe),!0)}catch{return!1}},U=Object.prototype.toString,M="[object Object]",Y="[object Function]",X="[object GeneratorFunction]",ae="[object HTMLAllCollection]",J="[object HTML document.all class]",Se="[object HTMLCollection]",be=typeof Symbol=="function"&&!!Symbol.toStringTag,De=!(0 in[,]),Ze=function(){return!1};if(typeof document=="object"){var He=document.all;U.call(He)===U.call(document.all)&&(Ze=function(fe){if((De||!fe)&&(typeof fe>"u"||typeof fe=="object"))try{var Ke=U.call(fe);return(Ke===ae||Ke===J||Ke===Se||Ke===M)&&fe("")==null}catch{}return!1})}return Sp=_?function(fe){if(Ze(fe))return!0;if(!fe||typeof fe!="function"&&typeof fe!="object")return!1;try{_(fe,null,x)}catch(Ke){if(Ke!==k)return!1}return!D(fe)&&u(fe)}:function(fe){if(Ze(fe))return!0;if(!fe||typeof fe!="function"&&typeof fe!="object")return!1;if(be)return u(fe);if(D(fe))return!1;var Ke=U.call(fe);return Ke!==Y&&Ke!==X&&!/^\[object HTML/.test(Ke)?!1:u(fe)},Sp}var Ip,qy;function Kd(){if(qy)return Ip;qy=1;var y=Qu(),_=Object.prototype.toString,x=Object.prototype.hasOwnProperty,k=function(M,Y,X){for(var ae=0,J=M.length;ae<J;ae++)x.call(M,ae)&&(X==null?Y(M[ae],ae,M):Y.call(X,M[ae],ae,M))},E=function(M,Y,X){for(var ae=0,J=M.length;ae<J;ae++)X==null?Y(M.charAt(ae),ae,M):Y.call(X,M.charAt(ae),ae,M)},D=function(M,Y,X){for(var ae in M)x.call(M,ae)&&(X==null?Y(M[ae],ae,M):Y.call(X,M[ae],ae,M))};function u(U){return _.call(U)==="[object Array]"}return Ip=function(M,Y,X){if(!y(Y))throw new TypeError("iterator must be a function");var ae;arguments.length>=3&&(ae=X),u(M)?k(M,Y,ae):typeof M=="string"?E(M,Y,ae):D(M,Y,ae)},Ip}var Tp,Uy;function mx(){return Uy||(Uy=1,Tp=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Tp}var Ap,Ny;function el(){if(Ny)return Ap;Ny=1;var y=mx(),_=typeof globalThis>"u"?wt.commonjsGlobal:globalThis;return Ap=function(){for(var k=[],E=0;E<y.length;E++)typeof _[y[E]]=="function"&&(k[k.length]=y[E]);return k},Ap}var Ep={exports:{}},Pp,jy;function Jd(){return jy||(jy=1,Pp=Object),Pp}var Cp,Gy;function N0(){return Gy||(Gy=1,Cp=Error),Cp}var kp,$y;function j0(){return $y||($y=1,kp=EvalError),kp}var Mp,Zy;function Yd(){return Zy||(Zy=1,Mp=RangeError),Mp}var Bp,Wy;function G0(){return Wy||(Wy=1,Bp=ReferenceError),Bp}var zp,Hy;function Nn(){return Hy||(Hy=1,zp=SyntaxError),zp}var Dp,Xy;function At(){return Xy||(Xy=1,Dp=TypeError),Dp}var Rp,Ky;function $0(){return Ky||(Ky=1,Rp=URIError),Rp}var Lp,Jy;function Ic(){return Jy||(Jy=1,Lp=Math.abs),Lp}var Fp,Yy;function Ha(){return Yy||(Yy=1,Fp=Math.floor),Fp}var Op,Qy;function Qd(){return Qy||(Qy=1,Op=Math.max),Op}var Vp,ev;function em(){return ev||(ev=1,Vp=Math.min),Vp}var qp,tv;function Xa(){return tv||(tv=1,qp=Math.pow),qp}var Up,rv;function Z0(){return rv||(rv=1,Up=Math.round),Up}var Np,iv;function Ka(){return iv||(iv=1,Np=Number.isNaN||function(_){return _!==_}),Np}var jp,nv;function W0(){if(nv)return jp;nv=1;var y=Ka();return jp=function(x){return y(x)||x===0?x:x<0?-1:1},jp}var Gp,ov;function H0(){return ov||(ov=1,Gp=Object.getOwnPropertyDescriptor),Gp}var $p,av;function No(){if(av)return $p;av=1;var y=H0();if(y)try{y([],"length")}catch{y=null}return $p=y,$p}var Zp,sv;function Xs(){if(sv)return Zp;sv=1;var y=Object.defineProperty||!1;if(y)try{y({},"a",{value:1})}catch{y=!1}return Zp=y,Zp}var Wp,uv;function tm(){return uv||(uv=1,Wp=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var _={},x=Symbol("test"),k=Object(x);if(typeof x=="string"||Object.prototype.toString.call(x)!=="[object Symbol]"||Object.prototype.toString.call(k)!=="[object Symbol]")return!1;var E=42;_[x]=E;for(var D in _)return!1;if(typeof Object.keys=="function"&&Object.keys(_).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(_).length!==0)return!1;var u=Object.getOwnPropertySymbols(_);if(u.length!==1||u[0]!==x||!Object.prototype.propertyIsEnumerable.call(_,x))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var U=Object.getOwnPropertyDescriptor(_,x);if(U.value!==E||U.enumerable!==!0)return!1}return!0}),Wp}var Hp,lv;function yx(){if(lv)return Hp;lv=1;var y=typeof Symbol<"u"&&Symbol,_=tm();return Hp=function(){return typeof y!="function"||typeof Symbol!="function"||typeof y("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:_()},Hp}var Xp,cv;function vx(){return cv||(cv=1,Xp=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Xp}var Kp,pv;function gx(){if(pv)return Kp;pv=1;var y=Jd();return Kp=y.getPrototypeOf||null,Kp}var Jp,hv;function X0(){if(hv)return Jp;hv=1;var y="Function.prototype.bind called on incompatible ",_=Object.prototype.toString,x=Math.max,k="[object Function]",E=function(M,Y){for(var X=[],ae=0;ae<M.length;ae+=1)X[ae]=M[ae];for(var J=0;J<Y.length;J+=1)X[J+M.length]=Y[J];return X},D=function(M,Y){for(var X=[],ae=Y,J=0;ae<M.length;ae+=1,J+=1)X[J]=M[ae];return X},u=function(U,M){for(var Y="",X=0;X<U.length;X+=1)Y+=U[X],X+1<U.length&&(Y+=M);return Y};return Jp=function(M){var Y=this;if(typeof Y!="function"||_.apply(Y)!==k)throw new TypeError(y+Y);for(var X=D(arguments,1),ae,J=function(){if(this instanceof ae){var He=Y.apply(this,E(X,arguments));return Object(He)===He?He:this}return Y.apply(M,E(X,arguments))},Se=x(0,Y.length-X.length),be=[],De=0;De<Se;De++)be[De]="$"+De;if(ae=Function("binder","return function ("+u(be,",")+"){ return binder.apply(this,arguments); }")(J),Y.prototype){var Ze=function(){};Ze.prototype=Y.prototype,ae.prototype=new Ze,Ze.prototype=null}return ae},Jp}var Yp,fv;function tl(){if(fv)return Yp;fv=1;var y=X0();return Yp=Function.prototype.bind||y,Yp}var Qp,dv;function rm(){return dv||(dv=1,Qp=Function.prototype.call),Qp}var eh,mv;function im(){return mv||(mv=1,eh=Function.prototype.apply),eh}var th,yv;function K0(){return yv||(yv=1,th=typeof Reflect<"u"&&Reflect&&Reflect.apply),th}var rh,vv;function _x(){if(vv)return rh;vv=1;var y=tl(),_=im(),x=rm(),k=K0();return rh=k||y.call(x,_),rh}var ih,gv;function nm(){if(gv)return ih;gv=1;var y=tl(),_=At(),x=rm(),k=_x();return ih=function(D){if(D.length<1||typeof D[0]!="function")throw new _("a function is required");return k(y,x,D)},ih}var nh,_v;function J0(){if(_v)return nh;_v=1;var y=nm(),_=No(),x;try{x=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var k=!!x&&_&&_(Object.prototype,"__proto__"),E=Object,D=E.getPrototypeOf;return nh=k&&typeof k.get=="function"?y([k.get]):typeof D=="function"?function(U){return D(U==null?U:E(U))}:!1,nh}var oh,xv;function Ja(){if(xv)return oh;xv=1;var y=vx(),_=gx(),x=J0();return oh=y?function(E){return y(E)}:_?function(E){if(!E||typeof E!="object"&&typeof E!="function")throw new TypeError("getProto: not an object");return _(E)}:x?function(E){return x(E)}:null,oh}var ah,bv;function xx(){if(bv)return ah;bv=1;const y=(async function(){}).constructor;return ah=()=>y,ah}var sh,wv;function bx(){if(wv)return sh;wv=1;const y=(function*(){}).constructor;return sh=()=>y,sh}var uh,Sv;function Y0(){if(Sv)return uh;Sv=1;const y=(async function*(){}).constructor;return uh=()=>y,uh}var lh,Iv;function jo(){if(Iv)return lh;Iv=1;var y=Function.prototype.call,_=Object.prototype.hasOwnProperty,x=tl();return lh=x.call(y,_),lh}var ch,Tv;function Er(){if(Tv)return ch;Tv=1;var y,_=Jd(),x=N0(),k=j0(),E=Yd(),D=G0(),u=Nn(),U=At(),M=$0(),Y=Ic(),X=Ha(),ae=Qd(),J=em(),Se=Xa(),be=Z0(),De=W0(),Ze=No(),He=Xs(),Ue=function(){throw new U},fe=Ze?(function(){try{return arguments.callee,Ue}catch{try{return Ze(arguments,"callee").get}catch{return Ue}}})():Ue,Ke=yx()(),Ne=Ja(),It=gx(),we=vx(),je=im(),Le=rm(),tt={},Mt=typeof Uint8Array>"u"||!Ne?y:Ne(Uint8Array),Wt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?y:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?y:ArrayBuffer,"%ArrayIteratorPrototype%":Ke&&Ne?Ne([][Symbol.iterator]()):y,"%AsyncFromSyncIteratorPrototype%":y,"%AsyncFunction%":tt,"%AsyncGenerator%":tt,"%AsyncGeneratorFunction%":tt,"%AsyncIteratorPrototype%":tt,"%Atomics%":typeof Atomics>"u"?y:Atomics,"%BigInt%":typeof BigInt>"u"?y:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?y:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?y:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?y:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":x,"%eval%":eval,"%EvalError%":k,"%Float16Array%":typeof Float16Array>"u"?y:Float16Array,"%Float32Array%":typeof Float32Array>"u"?y:Float32Array,"%Float64Array%":typeof Float64Array>"u"?y:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?y:FinalizationRegistry,"%Function%":Function,"%GeneratorFunction%":tt,"%Int8Array%":typeof Int8Array>"u"?y:Int8Array,"%Int16Array%":typeof Int16Array>"u"?y:Int16Array,"%Int32Array%":typeof Int32Array>"u"?y:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ke&&Ne?Ne(Ne([][Symbol.iterator]())):y,"%JSON%":typeof JSON=="object"?JSON:y,"%Map%":typeof Map>"u"?y:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ke||!Ne?y:Ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":_,"%Object.getOwnPropertyDescriptor%":Ze,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?y:Promise,"%Proxy%":typeof Proxy>"u"?y:Proxy,"%RangeError%":E,"%ReferenceError%":D,"%Reflect%":typeof Reflect>"u"?y:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?y:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ke||!Ne?y:Ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?y:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ke&&Ne?Ne(""[Symbol.iterator]()):y,"%Symbol%":Ke?Symbol:y,"%SyntaxError%":u,"%ThrowTypeError%":fe,"%TypedArray%":Mt,"%TypeError%":U,"%Uint8Array%":typeof Uint8Array>"u"?y:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?y:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?y:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?y:Uint32Array,"%URIError%":M,"%WeakMap%":typeof WeakMap>"u"?y:WeakMap,"%WeakRef%":typeof WeakRef>"u"?y:WeakRef,"%WeakSet%":typeof WeakSet>"u"?y:WeakSet,"%Function.prototype.call%":Le,"%Function.prototype.apply%":je,"%Object.defineProperty%":He,"%Object.getPrototypeOf%":It,"%Math.abs%":Y,"%Math.floor%":X,"%Math.max%":ae,"%Math.min%":J,"%Math.pow%":Se,"%Math.round%":be,"%Math.sign%":De,"%Reflect.getPrototypeOf%":we};if(Ne)try{null.error}catch(Nr){var St=Ne(Ne(Nr));Wt["%Error.prototype%"]=St}var Ut=xx(),Hr=bx(),Pr=Y0(),bi=function Nr(ar){var sr;if(ar==="%AsyncFunction%")sr=Ut()||void 0;else if(ar==="%GeneratorFunction%")sr=Hr()||void 0;else if(ar==="%AsyncGeneratorFunction%")sr=Pr()||void 0;else if(ar==="%AsyncGenerator%"){var lt=Nr("%AsyncGeneratorFunction%");lt&&(sr=lt.prototype)}else if(ar==="%AsyncIteratorPrototype%"){var mr=Nr("%AsyncGenerator%");mr&&Ne&&(sr=Ne(mr.prototype))}return Wt[ar]=sr,sr},or={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Rr=tl(),et=jo(),Lr=Rr.call(Le,Array.prototype.concat),Xr=Rr.call(je,Array.prototype.splice),Et=Rr.call(Le,String.prototype.replace),Fr=Rr.call(Le,String.prototype.slice),Mi=Rr.call(Le,RegExp.prototype.exec),pi=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Or=/\\(\\)?/g,Xi=function(ar){var sr=Fr(ar,0,1),lt=Fr(ar,-1);if(sr==="%"&&lt!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(lt==="%"&&sr!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var mr=[];return Et(ar,pi,function(hr,jr,fr,br){mr[mr.length]=fr?Et(br,Or,"$1"):jr||hr}),mr},Nt=function(ar,sr){var lt=ar,mr;if(et(or,lt)&&(mr=or[lt],lt="%"+mr[0]+"%"),et(Wt,lt)){var hr=Wt[lt];if(hr===tt&&(hr=bi(lt)),typeof hr>"u"&&!sr)throw new U("intrinsic "+ar+" exists, but is not available. Please file an issue!");return{alias:mr,name:lt,value:hr}}throw new u("intrinsic "+ar+" does not exist!")};return ch=function(ar,sr){if(typeof ar!="string"||ar.length===0)throw new U("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof sr!="boolean")throw new U('"allowMissing" argument must be a boolean');if(Mi(/^%?[^%]*%?$/,ar)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var lt=Xi(ar),mr=lt.length>0?lt[0]:"",hr=Nt("%"+mr+"%",sr),jr=hr.name,fr=hr.value,br=!1,dn=hr.alias;dn&&(mr=dn[0],Xr(lt,Lr([0,1],dn)));for(var Kr=1,Bi=!0;Kr<lt.length;Kr+=1){var hi=lt[Kr],ti=Fr(hi,0,1),ri=Fr(hi,-1);if((ti==='"'||ti==="'"||ti==="`"||ri==='"'||ri==="'"||ri==="`")&&ti!==ri)throw new u("property names with quotes must have matching quotes");if((hi==="constructor"||!Bi)&&(br=!0),mr+="."+hi,jr="%"+mr+"%",et(Wt,jr))fr=Wt[jr];else if(fr!=null){if(!(hi in fr)){if(!sr)throw new U("base intrinsic for "+ar+" exists, but the property is not available.");return}if(Ze&&Kr+1>=lt.length){var Vi=Ze(fr,hi);Bi=!!Vi,Bi&&"get"in Vi&&!("originalValue"in Vi.get)?fr=Vi.get:fr=fr[hi]}else Bi=et(fr,hi),fr=fr[hi];Bi&&!br&&(Wt[jr]=fr)}}return fr},ch}var ph,Av;function om(){if(Av)return ph;Av=1;var y=Xs(),_=Nn(),x=At(),k=No();return ph=function(D,u,U){if(!D||typeof D!="object"&&typeof D!="function")throw new x("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new x("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new x("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new x("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new x("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new x("`loose`, if provided, must be a boolean");var M=arguments.length>3?arguments[3]:null,Y=arguments.length>4?arguments[4]:null,X=arguments.length>5?arguments[5]:null,ae=arguments.length>6?arguments[6]:!1,J=!!k&&k(D,u);if(y)y(D,u,{configurable:X===null&&J?J.configurable:!X,enumerable:M===null&&J?J.enumerable:!M,value:U,writable:Y===null&&J?J.writable:!Y});else if(ae||!M&&!Y&&!X)D[u]=U;else throw new _("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ph}var hh,Ev;function rl(){if(Ev)return hh;Ev=1;var y=Xs(),_=function(){return!!y};return _.hasArrayLengthDefineBug=function(){if(!y)return null;try{return y([],"length",{value:1}).length!==1}catch{return!0}},hh=_,hh}var fh,Pv;function Q0(){if(Pv)return fh;Pv=1;var y=Er(),_=om(),x=rl()(),k=No(),E=At(),D=y("%Math.floor%");return fh=function(U,M){if(typeof U!="function")throw new E("`fn` is not a function");if(typeof M!="number"||M<0||M>4294967295||D(M)!==M)throw new E("`length` must be a positive 32-bit integer");var Y=arguments.length>2&&!!arguments[2],X=!0,ae=!0;if("length"in U&&k){var J=k(U,"length");J&&!J.configurable&&(X=!1),J&&!J.writable&&(ae=!1)}return(X||ae||!Y)&&(x?_(U,"length",M,!0,!0):_(U,"length",M)),U},fh}var dh,Cv;function e1(){if(Cv)return dh;Cv=1;var y=tl(),_=im(),x=_x();return dh=function(){return x(y,_,arguments)},dh}var kv;function ha(){return kv||(kv=1,(function(y){var _=Q0(),x=Xs(),k=nm(),E=e1();y.exports=function(u){var U=k(arguments),M=1+u.length-(arguments.length-1);return _(U,M>0?M:0,!0)},x?x(y.exports,"apply",{value:E}):y.exports.apply=E})(Ep)),Ep.exports}var mh,Mv;function pr(){if(Mv)return mh;Mv=1;var y=Er(),_=nm(),x=_([y("%String.prototype.indexOf%")]);return mh=function(E,D){var u=y(E,!!D);return typeof u=="function"&&x(E,".prototype.")>-1?_([u]):u},mh}var yh,Bv;function Go(){if(Bv)return yh;Bv=1;var y=tm();return yh=function(){return y()&&!!Symbol.toStringTag},yh}var vh,zv;function Ks(){if(zv)return vh;zv=1;var y=Kd(),_=el(),x=ha(),k=pr(),E=No(),D=Ja(),u=k("Object.prototype.toString"),U=Go()(),M=typeof globalThis>"u"?wt.commonjsGlobal:globalThis,Y=_(),X=k("String.prototype.slice"),ae=k("Array.prototype.indexOf",!0)||function(He,Ue){for(var fe=0;fe<He.length;fe+=1)if(He[fe]===Ue)return fe;return-1},J={__proto__:null};U&&E&&D?y(Y,function(Ze){var He=new M[Ze];if(Symbol.toStringTag in He&&D){var Ue=D(He),fe=E(Ue,Symbol.toStringTag);if(!fe&&Ue){var Ke=D(Ue);fe=E(Ke,Symbol.toStringTag)}if(fe&&fe.get){var Ne=x(fe.get);J["$"+Ze]=Ne}}}):y(Y,function(Ze){var He=new M[Ze],Ue=He.slice||He.set;if(Ue){var fe=x(Ue);J["$"+Ze]=fe}});function Se(Ze){var He=!1;return y(J,function(Ue,fe){if(!He)try{"$"+Ue(Ze)===fe&&(He=X(fe,1))}catch{}}),He}function be(Ze){var He=!1;return y(J,function(Ue,fe){if(!He)try{Ue(Ze),He=X(fe,1)}catch{}}),He}function De(Ze){return ae(Y,Ze)>-1}return vh=function(He){if(!He||typeof He!="object")return!1;if(!U){var Ue=X(u(He),8,-1);return De(Ue)?Ue:Ue!=="Object"?!1:be(He)}return E?Se(He):null},vh}var gh,Dv;function wx(){if(Dv)return gh;Dv=1;var y=Object.prototype.toString;return gh=function(x){var k=y.call(x),E=k==="[object Arguments]";return E||(E=k!=="[object Array]"&&x!==null&&typeof x=="object"&&typeof x.length=="number"&&x.length>=0&&y.call(x.callee)==="[object Function]"),E},gh}var _h,Rv;function t1(){if(Rv)return _h;Rv=1;var y;if(!Object.keys){var _=Object.prototype.hasOwnProperty,x=Object.prototype.toString,k=wx(),E=Object.prototype.propertyIsEnumerable,D=!E.call({toString:null},"toString"),u=E.call(function(){},"prototype"),U=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],M=function(J){var Se=J.constructor;return Se&&Se.prototype===J},Y={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},X=(function(){if(typeof window>"u")return!1;for(var J in window)try{if(!Y["$"+J]&&_.call(window,J)&&window[J]!==null&&typeof window[J]=="object")try{M(window[J])}catch{return!0}}catch{return!0}return!1})(),ae=function(J){if(typeof window>"u"||!X)return M(J);try{return M(J)}catch{return!1}};y=function(Se){var be=Se!==null&&typeof Se=="object",De=x.call(Se)==="[object Function]",Ze=k(Se),He=be&&x.call(Se)==="[object String]",Ue=[];if(!be&&!De&&!Ze)throw new TypeError("Object.keys called on a non-object");var fe=u&&De;if(He&&Se.length>0&&!_.call(Se,0))for(var Ke=0;Ke<Se.length;++Ke)Ue.push(String(Ke));if(Ze&&Se.length>0)for(var Ne=0;Ne<Se.length;++Ne)Ue.push(String(Ne));else for(var It in Se)!(fe&&It==="prototype")&&_.call(Se,It)&&Ue.push(String(It));if(D)for(var we=ae(Se),je=0;je<U.length;++je)!(we&&U[je]==="constructor")&&_.call(Se,U[je])&&Ue.push(U[je]);return Ue}}return _h=y,_h}var xh,Lv;function r1(){if(Lv)return xh;Lv=1;var y=Array.prototype.slice,_=wx(),x=Object.keys,k=x?function(u){return x(u)}:t1(),E=Object.keys;return k.shim=function(){if(Object.keys){var u=(function(){var U=Object.keys(arguments);return U&&U.length===arguments.length})(1,2);u||(Object.keys=function(M){return _(M)?E(y.call(M)):E(M)})}else Object.keys=k;return Object.keys||k},xh=k,xh}var bh,Fv;function am(){if(Fv)return bh;Fv=1;var y=r1(),_=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",x=Object.prototype.toString,k=Array.prototype.concat,E=om(),D=function(Y){return typeof Y=="function"&&x.call(Y)==="[object Function]"},u=rl()(),U=function(Y,X,ae,J){if(X in Y){if(J===!0){if(Y[X]===ae)return}else if(!D(J)||!J())return}u?E(Y,X,ae,!0):E(Y,X,ae)},M=function(Y,X){var ae=arguments.length>2?arguments[2]:{},J=y(X);_&&(J=k.call(J,Object.getOwnPropertySymbols(X)));for(var Se=0;Se<J.length;Se+=1)U(Y,J[Se],X[J[Se]],ae[J[Se]])};return M.supportsDescriptors=!!u,bh=M,bh}const i1={},n1=Object.freeze(Object.defineProperty({__proto__:null,default:i1},Symbol.toStringTag,{value:"Module"})),o1=wt.getAugmentedNamespace(n1);var wh,Ov;function sm(){if(Ov)return wh;Ov=1;var y=typeof Map=="function"&&Map.prototype,_=Object.getOwnPropertyDescriptor&&y?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,x=y&&_&&typeof _.get=="function"?_.get:null,k=y&&Map.prototype.forEach,E=typeof Set=="function"&&Set.prototype,D=Object.getOwnPropertyDescriptor&&E?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=E&&D&&typeof D.get=="function"?D.get:null,U=E&&Set.prototype.forEach,M=typeof WeakMap=="function"&&WeakMap.prototype,Y=M?WeakMap.prototype.has:null,X=typeof WeakSet=="function"&&WeakSet.prototype,ae=X?WeakSet.prototype.has:null,J=typeof WeakRef=="function"&&WeakRef.prototype,Se=J?WeakRef.prototype.deref:null,be=Boolean.prototype.valueOf,De=Object.prototype.toString,Ze=Function.prototype.toString,He=String.prototype.match,Ue=String.prototype.slice,fe=String.prototype.replace,Ke=String.prototype.toUpperCase,Ne=String.prototype.toLowerCase,It=RegExp.prototype.test,we=Array.prototype.concat,je=Array.prototype.join,Le=Array.prototype.slice,tt=Math.floor,Mt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Wt=Object.getOwnPropertySymbols,St=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ut=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Hr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ut||!0)?Symbol.toStringTag:null,Pr=Object.prototype.propertyIsEnumerable,bi=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(de){return de.__proto__}:null);function or(de,_e){if(de===1/0||de===-1/0||de!==de||de&&de>-1e3&&de<1e3||It.call(/e/,_e))return _e;var jt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof de=="number"){var tr=de<0?-tt(-de):tt(de);if(tr!==de){var Kt=String(tr),_t=Ue.call(_e,Kt.length+1);return fe.call(Kt,jt,"$&_")+"."+fe.call(fe.call(_t,/([0-9]{3})/g,"$&_"),/_$/,"")}}return fe.call(_e,jt,"$&_")}var Rr=o1,et=Rr.custom,Lr=mr(et)?et:null,Xr={__proto__:null,double:'"',single:"'"},Et={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};wh=function de(_e,jt,tr,Kt){var _t=jt||{};if(fr(_t,"quoteStyle")&&!fr(Xr,_t.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fr(_t,"maxStringLength")&&(typeof _t.maxStringLength=="number"?_t.maxStringLength<0&&_t.maxStringLength!==1/0:_t.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var fi=fr(_t,"customInspect")?_t.customInspect:!0;if(typeof fi!="boolean"&&fi!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fr(_t,"indent")&&_t.indent!==null&&_t.indent!==" "&&!(parseInt(_t.indent,10)===_t.indent&&_t.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fr(_t,"numericSeparator")&&typeof _t.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var qi=_t.numericSeparator;if(typeof _e>"u")return"undefined";if(_e===null)return"null";if(typeof _e=="boolean")return _e?"true":"false";if(typeof _e=="string")return yo(_e,_t);if(typeof _e=="number"){if(_e===0)return 1/0/_e>0?"0":"-0";var ii=String(_e);return qi?or(_e,ii):ii}if(typeof _e=="bigint"){var Yt=String(_e)+"n";return qi?or(_e,Yt):Yt}var T=typeof _t.depth>"u"?5:_t.depth;if(typeof tr>"u"&&(tr=0),tr>=T&&T>0&&typeof _e=="object")return Or(_e)?"[Array]":"[Object]";var P=jn(_t,tr);if(typeof Kt>"u")Kt=[];else if(Kr(Kt,_e)>=0)return"[Circular]";function B(Me,yt,Fe){if(yt&&(Kt=Le.call(Kt),Kt.push(yt)),Fe){var Pt={depth:_t.depth};return fr(_t,"quoteStyle")&&(Pt.quoteStyle=_t.quoteStyle),de(Me,Pt,tr+1,Kt)}return de(Me,_t,tr+1,Kt)}if(typeof _e=="function"&&!Nt(_e)){var V=dn(_e),$=rn(_e,B);return"[Function"+(V?": "+V:" (anonymous)")+"]"+($.length>0?" { "+je.call($,", ")+" }":"")}if(mr(_e)){var re=Ut?fe.call(String(_e),/^(Symbol\(.*\))_[^)]*$/,"$1"):St.call(_e);return typeof _e=="object"&&!Ut?mn(re):re}if(Ki(_e)){for(var ie="<"+Ne.call(String(_e.nodeName)),L=_e.attributes||[],H=0;H<L.length;H++)ie+=" "+L[H].name+"="+Fr(Mi(L[H].value),"double",_t);return ie+=">",_e.childNodes&&_e.childNodes.length&&(ie+="..."),ie+="</"+Ne.call(String(_e.nodeName))+">",ie}if(Or(_e)){if(_e.length===0)return"[]";var se=rn(_e,B);return P&&!Zo(se)?"["+zn(se,P)+"]":"[ "+je.call(se,", ")+" ]"}if(Nr(_e)){var Ie=rn(_e,B);return!("cause"in Error.prototype)&&"cause"in _e&&!Pr.call(_e,"cause")?"{ ["+String(_e)+"] "+je.call(we.call("[cause]: "+B(_e.cause),Ie),", ")+" }":Ie.length===0?"["+String(_e)+"]":"{ ["+String(_e)+"] "+je.call(Ie,", ")+" }"}if(typeof _e=="object"&&fi){if(Lr&&typeof _e[Lr]=="function"&&Rr)return Rr(_e,{depth:T-tr});if(fi!=="symbol"&&typeof _e.inspect=="function")return _e.inspect()}if(Bi(_e)){var Ee=[];return k&&k.call(_e,function(Me,yt){Ee.push(B(yt,_e,!0)+" => "+B(Me,_e))}),Bn("Map",x.call(_e),Ee,P)}if(ri(_e)){var ye=[];return U&&U.call(_e,function(Me){ye.push(B(Me,_e))}),Bn("Set",u.call(_e),ye,P)}if(hi(_e))return Mn("WeakMap");if(Vi(_e))return Mn("WeakSet");if(ti(_e))return Mn("WeakRef");if(sr(_e))return mn(B(Number(_e)));if(hr(_e))return mn(B(Mt.call(_e)));if(lt(_e))return mn(be.call(_e));if(ar(_e))return mn(B(String(_e)));if(typeof window<"u"&&_e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&_e===globalThis||typeof wt.commonjsGlobal<"u"&&_e===wt.commonjsGlobal)return"{ [object globalThis] }";if(!Xi(_e)&&!Nt(_e)){var Ae=rn(_e,B),Je=bi?bi(_e)===Object.prototype:_e instanceof Object||_e.constructor===Object,Ge=_e instanceof Object?"":"null prototype",ge=!Je&&Hr&&Object(_e)===_e&&Hr in _e?Ue.call(br(_e),8,-1):Ge?"Object":"",Ve=Je||typeof _e.constructor!="function"?"":_e.constructor.name?_e.constructor.name+" ":"",Be=Ve+(ge||Ge?"["+je.call(we.call([],ge||[],Ge||[]),": ")+"] ":"");return Ae.length===0?Be+"{}":P?Be+"{"+zn(Ae,P)+"}":Be+"{ "+je.call(Ae,", ")+" }"}return String(_e)};function Fr(de,_e,jt){var tr=jt.quoteStyle||_e,Kt=Xr[tr];return Kt+de+Kt}function Mi(de){return fe.call(String(de),/"/g,"&quot;")}function pi(de){return!Hr||!(typeof de=="object"&&(Hr in de||typeof de[Hr]<"u"))}function Or(de){return br(de)==="[object Array]"&&pi(de)}function Xi(de){return br(de)==="[object Date]"&&pi(de)}function Nt(de){return br(de)==="[object RegExp]"&&pi(de)}function Nr(de){return br(de)==="[object Error]"&&pi(de)}function ar(de){return br(de)==="[object String]"&&pi(de)}function sr(de){return br(de)==="[object Number]"&&pi(de)}function lt(de){return br(de)==="[object Boolean]"&&pi(de)}function mr(de){if(Ut)return de&&typeof de=="object"&&de instanceof Symbol;if(typeof de=="symbol")return!0;if(!de||typeof de!="object"||!St)return!1;try{return St.call(de),!0}catch{}return!1}function hr(de){if(!de||typeof de!="object"||!Mt)return!1;try{return Mt.call(de),!0}catch{}return!1}var jr=Object.prototype.hasOwnProperty||function(de){return de in this};function fr(de,_e){return jr.call(de,_e)}function br(de){return De.call(de)}function dn(de){if(de.name)return de.name;var _e=He.call(Ze.call(de),/^function\s*([\w$]+)/);return _e?_e[1]:null}function Kr(de,_e){if(de.indexOf)return de.indexOf(_e);for(var jt=0,tr=de.length;jt<tr;jt++)if(de[jt]===_e)return jt;return-1}function Bi(de){if(!x||!de||typeof de!="object")return!1;try{x.call(de);try{u.call(de)}catch{return!0}return de instanceof Map}catch{}return!1}function hi(de){if(!Y||!de||typeof de!="object")return!1;try{Y.call(de,Y);try{ae.call(de,ae)}catch{return!0}return de instanceof WeakMap}catch{}return!1}function ti(de){if(!Se||!de||typeof de!="object")return!1;try{return Se.call(de),!0}catch{}return!1}function ri(de){if(!u||!de||typeof de!="object")return!1;try{u.call(de);try{x.call(de)}catch{return!0}return de instanceof Set}catch{}return!1}function Vi(de){if(!ae||!de||typeof de!="object")return!1;try{ae.call(de,ae);try{Y.call(de,Y)}catch{return!0}return de instanceof WeakSet}catch{}return!1}function Ki(de){return!de||typeof de!="object"?!1:typeof HTMLElement<"u"&&de instanceof HTMLElement?!0:typeof de.nodeName=="string"&&typeof de.getAttribute=="function"}function yo(de,_e){if(de.length>_e.maxStringLength){var jt=de.length-_e.maxStringLength,tr="... "+jt+" more character"+(jt>1?"s":"");return yo(Ue.call(de,0,_e.maxStringLength),_e)+tr}var Kt=Et[_e.quoteStyle||"single"];Kt.lastIndex=0;var _t=fe.call(fe.call(de,Kt,"\\$1"),/[\x00-\x1f]/g,$o);return Fr(_t,"single",_e)}function $o(de){var _e=de.charCodeAt(0),jt={8:"b",9:"t",10:"n",12:"f",13:"r"}[_e];return jt?"\\"+jt:"\\x"+(_e<16?"0":"")+Ke.call(_e.toString(16))}function mn(de){return"Object("+de+")"}function Mn(de){return de+" { ? }"}function Bn(de,_e,jt,tr){var Kt=tr?zn(jt,tr):je.call(jt,", ");return de+" ("+_e+") {"+Kt+"}"}function Zo(de){for(var _e=0;_e<de.length;_e++)if(Kr(de[_e],`
498
498
  `)>=0)return!1;return!0}function jn(de,_e){var jt;if(de.indent===" ")jt=" ";else if(typeof de.indent=="number"&&de.indent>0)jt=je.call(Array(de.indent+1)," ");else return null;return{base:jt,prev:je.call(Array(_e+1),jt)}}function zn(de,_e){if(de.length===0)return"";var jt=`
499
499
  `+_e.prev+_e.base;return jt+je.call(de,","+jt)+`
500
- `+_e.prev}function rn(de,_e){var jt=Or(de),tr=[];if(jt){tr.length=de.length;for(var Kt=0;Kt<de.length;Kt++)tr[Kt]=fr(de,Kt)?_e(de[Kt],de):""}var _t=typeof Wt=="function"?Wt(de):[],fi;if(Ut){fi={};for(var qi=0;qi<_t.length;qi++)fi["$"+_t[qi]]=_t[qi]}for(var ii in de)fr(de,ii)&&(jt&&String(Number(ii))===ii&&ii<de.length||Ut&&fi["$"+ii]instanceof Symbol||(It.call(/[^\w$]/,ii)?tr.push(_e(ii,de)+": "+_e(de[ii],de)):tr.push(ii+": "+_e(de[ii],de))));if(typeof Wt=="function")for(var Yt=0;Yt<_t.length;Yt++)Pr.call(de,_t[Yt])&&tr.push("["+_e(_t[Yt])+"]: "+_e(de[_t[Yt]],de));return tr}return wh}var Sh,Vv;function Tc(){return Vv||(Vv=1,Sh=function(_){return typeof _=="string"||typeof _=="symbol"}),Sh}var Ih,qv;function fa(){return qv||(qv=1,Ih=function(_){return!!_&&(typeof _=="function"||typeof _=="object")}),Ih}var Th,Uv;function a1(){if(Uv)return Th;Uv=1;var y=At(),_=sm(),x=Tc(),k=fa();return Th=function(D,u){if(!k(D))throw new y("Assertion failed: Type(O) is not Object");if(!x(u))throw new y("Assertion failed: P is not a Property Key, got "+_(u));return D[u]},Th}var Ah,Nv;function mo(){if(Nv)return Ah;Nv=1;var y=Ka();return Ah=function(x){return(typeof x=="number"||typeof x=="bigint")&&!y(x)&&x!==1/0&&x!==-1/0},Ah}var Eh,jv;function Ac(){if(jv)return Eh;jv=1;var y=Ic(),_=Ha(),x=Ka(),k=mo();return Eh=function(D){if(typeof D!="number"||x(D)||!k(D))return!1;var u=y(D);return _(u)===u},Eh}var Ph,Gv;function Js(){if(Gv)return Ph;Gv=1;var y=ha(),_=pr(),x=Er(),k=x("%ArrayBuffer%",!0),E=_("ArrayBuffer.prototype.byteLength",!0),D=_("Object.prototype.toString"),u=!!k&&!E&&new k(0).slice,U=!!u&&y(u);return Ph=E||U?function(Y){if(!Y||typeof Y!="object")return!1;try{return E?E(Y):U(Y,0),!0}catch{return!1}}:k?function(Y){return D(Y)==="[object ArrayBuffer]"}:function(Y){return!1},Ph}var Ch,$v;function Sx(){if($v)return Ch;$v=1;var y=pr(),_=y("ArrayBuffer.prototype.byteLength",!0),x=Js();return Ch=function(E){return x(E)?_?_(E):E.byteLength:NaN},Ch}var kh,Zv;function il(){if(Zv)return kh;Zv=1;var y=pr(),_=y("SharedArrayBuffer.prototype.byteLength",!0);return kh=_?function(k){if(!k||typeof k!="object")return!1;try{return _(k),!0}catch{return!1}}:function(k){return!1},kh}var Mh,Wv;function Ys(){if(Wv)return Mh;Wv=1;var y=At(),_=Sx(),x=el()(),k=pr(),E=Js(),D=il(),u=k("SharedArrayBuffer.prototype.byteLength",!0);return Mh=function(M){var Y=D(M);if(!E(M)&&!Y)throw new y("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if((Y?u:_)(M)===0)try{new wt.commonjsGlobal[x[0]](M)}catch(X){return!!X&&X.name==="TypeError"}return!1},Mh}var Bh,Hv;function Ix(){if(Hv)return Bh;Hv=1;var y=At(),_=jo(),x=fa(),k=Tc();return Bh=function(D,u){if(!x(D))throw new y("Assertion failed: `O` must be an Object");if(!k(u))throw new y("Assertion failed: `P` must be a Property Key");return _(D,u)},Bh}var zh,Xv;function Tx(){if(Xv)return zh;Xv=1;var y=Er(),_=y("%Array%"),x=!_.isArray&&pr()("Object.prototype.toString");return zh=_.isArray||function(E){return x(E)==="[object Array]"},zh}var Dh,Kv;function um(){return Kv||(Kv=1,Dh=Tx()),Dh}var Rh,Jv;function Ax(){return Jv||(Jv=1,Rh=function(_){return _==="BIGUINT64"||_==="BIGINT64"}),Rh}var Lh,Yv;function s1(){return Yv||(Yv=1,Lh=function(_){return _==="UINT8"||_==="UINT8C"||_==="UINT16"||_==="UINT32"||_==="BIGUINT64"}),Lh}var Fh,Qv;function u1(){if(Qv)return Fh;Qv=1;var y=Xa();return Fh=function(x){var k=x[3]&128?-1:1,E=(x[3]&127)<<1|x[2]>>7,D=(x[2]&127)<<16|x[1]<<8|x[0];return E===0&&D===0?k===1?0:-0:E===255&&D===0?k===1?1/0:-1/0:E===255&&D!==0?NaN:(E-=127,E===-127?k*D*y(2,-149):k*(1+D*y(2,-23))*y(2,E))},Fh}var Oh,eg;function l1(){if(eg)return Oh;eg=1;var y=Xa();return Oh=function(x){var k=x[7]&128?-1:1,E=(x[7]&127)<<4|(x[6]&240)>>4,D=(x[6]&15)*281474976710656+x[5]*1099511627776+x[4]*4294967296+x[3]*16777216+x[2]*65536+x[1]*256+x[0];return E===0&&D===0?k*0:E===2047&&D!==0?NaN:E===2047&&D===0?k*(1/0):(E-=1023,E===-1023?k*D*5e-324:k*(1+D/4503599627370496)*y(2,E))},Oh}var Vh,tg;function c1(){if(tg)return Vh;tg=1;var y=Er(),_=Xa(),x=y("%Number%"),k=y("%BigInt%",!0);return Vh=function(D,u,U,M){for(var Y=M?k:x,X=Y(0),ae=0;ae<D.length;ae++)X+=Y(D[ae]*_(2,8*ae));if(!U){var J=u*8;D[u-1]&128&&(X-=Y(_(2,J)))}return X},Vh}var qh,rg;function p1(){return rg||(rg=1,qh=function(_,x){for(var k=0;k<_.length;k+=1)if(!x(_[k],k,_))return!1;return!0}),qh}var Uh,ig;function h1(){return ig||(ig=1,Uh=function(_){return typeof _=="number"&&_>=0&&_<=255&&(_|0)===_}),Uh}var Nh,ng;function Qs(){return ng||(ng=1,Nh={__proto__:null,name:{__proto__:null,$Int8Array:"INT8",$Uint8Array:"UINT8",$Uint8ClampedArray:"UINT8C",$Int16Array:"INT16",$Uint16Array:"UINT16",$Int32Array:"INT32",$Uint32Array:"UINT32",$BigInt64Array:"BIGINT64",$BigUint64Array:"BIGUINT64",$Float32Array:"FLOAT32",$Float64Array:"FLOAT64"},size:{__proto__:null,$INT8:1,$UINT8:1,$UINT8C:1,$INT16:2,$UINT16:2,$INT32:4,$UINT32:4,$BIGINT64:8,$BIGUINT64:8,$FLOAT32:4,$FLOAT64:8},choices:'"INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"'}),Nh}var jh,og;function f1(){if(og)return jh;og=1;var y=Er(),_=pr(),x=Yd(),k=Nn(),E=At(),D=y("%BigInt%",!0),u=Ix(),U=um(),M=Ax(),Y=s1(),X=u1(),ae=l1(),J=c1(),Se=p1(),be=h1(),De=_("Array.prototype.reverse"),Ze=_("Array.prototype.slice"),He=Qs();return jh=function(fe,Ke,Ne){if(!u(He.size,"$"+fe))throw new E("Assertion failed: `type` must be a TypedArray element type");if(!U(Ke)||!Se(Ke,be))throw new E("Assertion failed: `rawBytes` must be an Array of bytes");if(typeof Ne!="boolean")throw new E("Assertion failed: `isLittleEndian` must be a Boolean");var It=He.size["$"+fe];if(Ke.length!==It)throw new x("Assertion failed: `rawBytes` must have a length of "+It+" for type "+fe);var we=M(fe);if(we&&!D)throw new k("this environment does not support BigInts");return Ke=Ze(Ke,0,It),Ne||De(Ke),fe==="FLOAT32"?X(Ke):fe==="FLOAT64"?ae(Ke):J(Ke,It,Y(fe),we)},jh}var Gh,ag;function Ex(){if(ag)return Gh;ag=1;var y={}.toString;return Gh=Array.isArray||function(_){return y.call(_)=="[object Array]"},Gh}var $h,sg;function d1(){if(sg)return $h;sg=1;var y=Er(),_=y("%Array.prototype.concat%"),x=ha(),k=pr(),E=k("Array.prototype.slice"),D=tm()(),u=D&&Symbol.isConcatSpreadable,U=[],M=u?x.apply(_,U):null,Y=u?Ex():null;return $h=u?function(ae){for(var J=0;J<arguments.length;J+=1){var Se=arguments[J];if(Se&&typeof Se=="object"&&typeof Se[u]=="boolean"){U[u]||(U[u]=!0);var be=Y(Se)?E(Se):[Se];be[u]=!0,arguments[J]=be}}return M(arguments)}:x(_,U),$h}var Zh,ug;function eu(){if(ug)return Zh;ug=1;var y=Ks();return Zh=function(x){return!!y(x)},Zh}var Wh,lg;function nl(){if(lg)return Wh;lg=1;var y=At(),_=pr(),x=_("TypedArray.prototype.buffer",!0),k=eu();return Wh=x||function(D){if(!k(D))throw new y("Not a Typed Array");return D.buffer},Wh}var Hh,cg;function Px(){if(cg)return Hh;cg=1;var y=Er(),_=y("%Uint8Array%",!0),x=y("%Uint32Array%",!0),k=nl(),E=x&&new x([305419896]),D=E&&new _(k(E));return Hh=D?D[0]===120?"little":D[0]===18?"big":D[0]===52?"mixed":"unknown":"indeterminate",Hh}var Xh,pg;function m1(){if(pg)return Xh;pg=1;var y=Er(),_=Nn(),x=At(),k=pr(),E=Ac(),D=y("%Uint8Array%",!0),u=k("Array.prototype.slice"),U=Ys(),M=f1(),Y=Js(),X=il(),ae=d1(),J=Qs(),Se=Px();return Xh=function(De,Ze,He,Ue,fe){var Ke=X(De);if(!Y(De)&&!Ke)throw new x("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!E(Ze))throw new x("Assertion failed: `byteIndex` must be an integer");if(typeof He!="string"||typeof J.size["$"+He]!="number")throw new x("Assertion failed: `type` must be one of "+J.choices);if(typeof Ue!="boolean")throw new x("Assertion failed: `isTypedArray` must be a boolean");if(fe!=="SEQ-CST"&&fe!=="UNORDERED")throw new x("Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`");if(arguments.length>5&&typeof arguments[5]!="boolean")throw new x("Assertion failed: `isLittleEndian` must be a boolean, if present");if(U(De))throw new x("Assertion failed: `arrayBuffer` is detached");if(Ze<0)throw new x("Assertion failed: `byteIndex` must be non-negative");var Ne=J.size["$"+He];if(!Ne)throw new x("Assertion failed: `type` must be one of "+J.choices);var It;if(Ke)throw new _("SharedArrayBuffer is not supported by this implementation");It=u(new D(De,Ze),0,Ne);var we=arguments.length>5?arguments[5]:Se==="little",je=we?u(ae([0,0,0,0,0,0,0,0],It),-Ne):u(ae(It,[0,0,0,0,0,0,0,0]),0,Ne);return M(He,je,we)},Xh}var Kh,hg;function Cx(){if(hg)return Kh;hg=1;var y=Ka();return Kh=function(x,k){return x===k?x===0?1/x===1/k:!0:y(x)&&y(k)},Kh}var Jh,fg;function y1(){if(fg)return Jh;fg=1;var y=At(),_=fa(),x=Tc(),k=Cx(),E=(function(){try{return delete[].length,!0}catch{return!1}})();return Jh=function(u,U,M,Y){if(!_(u))throw new y("Assertion failed: `O` must be an Object");if(!x(U))throw new y("Assertion failed: `P` must be a Property Key");if(typeof Y!="boolean")throw new y("Assertion failed: `Throw` must be a Boolean");if(Y){if(u[U]=M,E&&!k(u[U],M))throw new y("Attempted to assign to readonly property.");return!0}try{return u[U]=M,E?k(u[U],M):!0}catch{return!1}},Jh}var Yh,dg;function v1(){if(dg)return Yh;dg=1;var y=Er(),_=y("%BigInt%",!0),x=At(),k=Nn();return Yh=function(D){if(typeof D!="string")throw new x("`argument` must be a string");if(!_)throw new k("BigInts are not supported in this environment");try{return _(D)}catch{return}},Yh}var Qh,mg;function kx(){if(mg)return Qh;mg=1;var y=pr(),_=y("Date.prototype.getDay"),x=function(U){try{return _(U),!0}catch{return!1}},k=y("Object.prototype.toString"),E="[object Date]",D=Go()();return Qh=function(U){return typeof U!="object"||U===null?!1:D?x(U):k(U)===E},Qh}var yc={exports:{}},ef,yg;function Mx(){if(yg)return ef;yg=1;var y=pr(),_=Go()(),x=jo(),k=No(),E;if(_){var D=y("RegExp.prototype.exec"),u={},U=function(){throw u},M={toString:U,valueOf:U};typeof Symbol.toPrimitive=="symbol"&&(M[Symbol.toPrimitive]=U),E=function(J){if(!J||typeof J!="object")return!1;var Se=k(J,"lastIndex"),be=Se&&x(Se,"value");if(!be)return!1;try{D(J,M)}catch(De){return De===u}}}else{var Y=y("Object.prototype.toString"),X="[object RegExp]";E=function(J){return!J||typeof J!="object"&&typeof J!="function"?!1:Y(J)===X}}return ef=E,ef}var tf,vg;function ol(){if(vg)return tf;vg=1;var y=pr(),_=Mx(),x=y("RegExp.prototype.exec"),k=At();return tf=function(D){if(!_(D))throw new k("`regex` must be a RegExp");return function(U){return x(D,U)!==null}},tf}var gg;function Bx(){if(gg)return yc.exports;gg=1;var y=pr(),_=y("Object.prototype.toString"),x=yx()(),k=ol();if(x){var E=y("Symbol.prototype.toString"),D=k(/^Symbol\(.*\)$/),u=function(M){return typeof M.valueOf()!="symbol"?!1:D(E(M))};yc.exports=function(M){if(typeof M=="symbol")return!0;if(!M||typeof M!="object"||_(M)!=="[object Symbol]")return!1;try{return u(M)}catch{return!1}}}else yc.exports=function(M){return!1};return yc.exports}var rf,_g;function g1(){return _g||(_g=1,rf=function(_){return _===null||typeof _!="function"&&typeof _!="object"}),rf}var nf,xg;function zx(){return xg||(xg=1,nf=function(_){return typeof _=="string"||typeof _=="symbol"}),nf}var of,bg;function _1(){if(bg)return of;bg=1;var y=At(),_=sm(),x=zx();return of=function(E,D){if(!x(D))throw new y("Assertion failed: P is not a Property Key, got "+_(D));return E[D]},of}var af,wg;function x1(){if(wg)return af;wg=1;var y=At(),_=Qu(),x=sm(),k=_1(),E=zx();return af=function(u,U){if(!E(U))throw new y("Assertion failed: P is not a Property Key");var M=k(u,U);if(M!=null){if(!_(M))throw new y(x(U)+" is not a function: "+x(M));return M}},af}var sf,Sg;function b1(){if(Sg)return sf;Sg=1;var y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",_=Qu(),x=kx(),k=Bx(),E=At(),D=g1();function u(M,Y){if(typeof M>"u"||M===null)throw new E("Cannot call method on "+M);if(typeof Y!="string"||Y!=="number"&&Y!=="string")throw new E('hint must be "string" or "number"');var X=Y==="string"?["toString","valueOf"]:["valueOf","toString"],ae,J,Se;for(Se=0;Se<X.length;++Se)if(ae=M[X[Se]],_(ae)&&(J=ae.call(M),D(J)))return J;throw new E("No default value")}var U=x1();return sf=function(Y){if(D(Y))return Y;var X="default";arguments.length>1&&(arguments[1]===String?X="string":arguments[1]===Number&&(X="number"));var ae;if(y&&(Symbol.toPrimitive?ae=U(Y,Symbol.toPrimitive):k(Y)&&(ae=Symbol.prototype.valueOf)),typeof ae<"u"){var J=ae.call(Y,X);if(D(J))return J;throw new E("unable to convert exotic object to primitive")}return X==="default"&&(x(Y)||k(Y))&&(X="string"),u(Y,X==="default"?"number":X)},sf}var uf,Ig;function Dx(){if(Ig)return uf;Ig=1;var y=b1();return uf=function(x){return arguments.length>1?y(x,arguments[1]):y(x)},uf}var lf,Tg;function Rx(){if(Tg)return lf;Tg=1;var y=Er(),_=y("%BigInt%",!0),x=y("%Number%"),k=At(),E=Nn(),D=v1(),u=Dx();return lf=function(M){if(!_)throw new E("BigInts are not supported in this environment");var Y=u(M,x);if(Y==null)throw new k("Cannot convert null or undefined to a BigInt");if(typeof Y=="boolean")return _(Y?1:0);if(typeof Y=="number")throw new k("Cannot convert a Number value to a BigInt");if(typeof Y=="string"){var X=D(Y);if(typeof X>"u")throw new k("Failed to parse String to BigInt");return X}if(typeof Y=="symbol")throw new k("Cannot convert a Symbol value to a BigInt");if(typeof Y!="bigint")throw new E("Assertion failed: unknown primitive type");return Y},lf}var cf,Ag;function Lx(){if(Ag)return cf;Ag=1;var y=Er(),_=y("%BigInt%",!0),x=Yd(),k=At(),E=_&&_(0);return cf=function(u,U){if(typeof u!="bigint"||typeof U!="bigint")throw new k("Assertion failed: `n` and `d` arguments must be BigInts");if(U===E)throw new x("Division by zero");return u===E?E:u%U},cf}var pf,Eg;function Fx(){return Eg||(Eg=1,pf=function(_,x,k){var E=_(x,k);return E>=0?E:E+k}),pf}var hf,Pg;function w1(){if(Pg)return hf;Pg=1;var y=Er(),_=y("%BigInt%",!0),x=Xa(),k=Rx(),E=Lx(),D=Fx(),u=_&&BigInt(x(2,32))*BigInt(x(2,31)),U=_&&BigInt(x(2,32))*BigInt(x(2,32));return hf=function(Y){var X=k(Y),ae=D(E,X,U);return ae>=u?ae-U:ae},hf}var ff,Cg;function S1(){if(Cg)return ff;Cg=1;var y=Er(),_=y("%BigInt%",!0),x=Xa(),k=Rx(),E=Lx(),D=Fx(),u=_&&BigInt(x(2,32))*BigInt(x(2,32));return ff=function(M){var Y=k(M),X=D(E,Y,u);return X},ff}var df,kg;function I1(){if(kg)return df;kg=1;var y=Ha();return df=function(x,k){var E=x%k;return y(E>=0?E:E+k)},df}var mf,Mg;function T1(){return Mg||(Mg=1,mf=I1()),mf}var yf,Bg;function tu(){if(Bg)return yf;Bg=1;var y=T1();return yf=function(x,k){return y(x,k)},yf}var vf,zg;function A1(){return zg||(zg=1,vf=function(_){return _===null||typeof _!="function"&&typeof _!="object"}),vf}var gf,Dg;function Ox(){if(Dg)return gf;Dg=1;var y=At();return gf=function(x){if(x==null)throw new y(arguments.length>0&&arguments[1]||"Cannot call method on "+x);return x},gf}var _f,Rg;function E1(){if(Rg)return _f;Rg=1;var y=Er(),_=y("%String%"),x=At();return _f=function(E){if(typeof E=="symbol")throw new x("Cannot convert a Symbol value to a string");return _(E)},_f}var xf,Lg;function Vx(){if(Lg)return xf;Lg=1;var y=Ox(),_=E1(),x=pr(),k=ol(),E=x("String.prototype.replace"),D=x("String.prototype.charAt"),u=x("String.prototype.slice"),U=/^\s$/.test("᠎"),M=U?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Y=k(U?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]$/);return xf=function(){for(var ae=E(_(y(this)),M,""),J=ae.length;J>0&&Y(D(ae,J-1));)J-=1;return u(ae,0,J)},xf}var bf,Fg;function qx(){if(Fg)return bf;Fg=1;var y=Vx(),_="​",x="᠎";return bf=function(){return String.prototype.trim&&_.trim()===_&&x.trim()===x&&("_"+x).trim()==="_"+x&&(x+"_").trim()===x+"_"?String.prototype.trim:y},bf}var wf,Og;function P1(){if(Og)return wf;Og=1;var y=rl()(),_=om(),x=qx();return wf=function(){var E=x();return String.prototype.trim!==E&&(y?_(String.prototype,"trim",E,!0):_(String.prototype,"trim",E)),E},wf}var Sf,Vg;function C1(){if(Vg)return Sf;Vg=1;var y=ha(),_=am(),x=Ox(),k=Vx(),E=qx(),D=P1(),u=y(E()),U=function(Y){return x(Y),u(Y)};return _(U,{getPolyfill:E,implementation:k,shim:D}),Sf=U,Sf}var If,qg;function k1(){if(qg)return If;qg=1;var y=Er(),_=y("%RegExp%"),x=At(),k=y("%parseInt%"),E=pr(),D=ol(),u=E("String.prototype.slice"),U=D(/^0b[01]+$/i),M=D(/^0o[0-7]+$/i),Y=D(/^[-+]0x[0-9a-f]+$/i),X=["…","​","￾"].join(""),ae=new _("["+X+"]","g"),J=D(ae),Se=C1();return If=function be(De){if(typeof De!="string")throw new x("Assertion failed: `argument` is not a String");if(U(De))return+k(u(De,2),2);if(M(De))return+k(u(De,2),8);if(J(De)||Y(De))return NaN;var Ze=Se(De);return Ze!==De?be(Ze):+De},If}var Tf,Ug;function da(){if(Ug)return Tf;Ug=1;var y=Er(),_=At(),x=y("%Number%"),k=A1(),E=Dx(),D=k1();return Tf=function(U){var M=k(U)?U:E(U,x);if(typeof M=="symbol")throw new _("Cannot convert a Symbol value to a number");if(typeof M=="bigint")throw new _("Conversion from 'BigInt' to 'number' is not allowed.");return typeof M=="string"?D(M):+M},Tf}var Af,Ng;function lm(){if(Ng)return Af;Ng=1;var y=Ha();return Af=function(x){return typeof x=="bigint"?x:y(x)},Af}var Ef,jg;function Ya(){if(jg)return Ef;jg=1;var y=lm(),_=At();return Ef=function(k){if(typeof k!="number"&&typeof k!="bigint")throw new _("argument must be a Number or a BigInt");var E=k<0?-y(-k):y(k);return E===0?0:E},Ef}var Pf,Gg;function M1(){if(Gg)return Pf;Gg=1;var y=tu(),_=da(),x=Ya(),k=mo(),E=65536;return Pf=function(u){var U=_(u);if(!k(U)||U===0)return 0;var M=x(U),Y=y(M,E);return Y>=32768?Y-E:Y},Pf}var Cf,$g;function B1(){if($g)return Cf;$g=1;var y=tu(),_=da(),x=Ya(),k=mo(),E=2147483648,D=4294967296;return Cf=function(U){var M=_(U);if(!k(M)||M===0)return 0;var Y=x(M),X=y(Y,D),ae=X>=E?X-D:X;return ae===0?0:ae},Cf}var kf,Zg;function z1(){if(Zg)return kf;Zg=1;var y=tu(),_=da(),x=Ya(),k=mo();return kf=function(D){var u=_(D);if(!k(u)||u===0)return 0;var U=x(u),M=y(U,256);return M>=128?M-256:M},kf}var Mf,Wg;function D1(){if(Wg)return Mf;Wg=1;var y=tu(),_=da(),x=Ya(),k=mo(),E=65536;return Mf=function(u){var U=_(u);if(!k(U)||U===0)return 0;var M=x(U),Y=y(M,E);return Y===0?0:Y},Mf}var Bf,Hg;function R1(){if(Hg)return Bf;Hg=1;var y=tu(),_=da(),x=Ya(),k=mo(),E=4294967296;return Bf=function(u){var U=_(u);if(!k(U)||U===0)return 0;var M=x(U),Y=y(M,E);return Y===0?0:Y},Bf}var zf,Xg;function L1(){if(Xg)return zf;Xg=1;var y=mo(),_=tu(),x=da(),k=Ya();return zf=function(D){var u=x(D);if(!y(u)||u===0)return 0;var U=k(u),M=_(U,256);return M},zf}var Df,Kg;function F1(){if(Kg)return Df;Kg=1;var y=At(),_=Qd(),x=em();return Df=function(E,D,u){if(typeof E!="number"||typeof D!="number"||typeof u!="number"||!(D<=u))throw new y("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`");return x(_(D,E),u)},Df}var Rf,Jg;function O1(){if(Jg)return Rf;Jg=1;var y=F1(),_=da(),x=lm(),k=Ka();return Rf=function(D){var u=_(D);if(k(u))return 0;var U=y(u,0,255),M=x(U);return U<M+.5?M:U>M+.5?M+1:M%2===0?M:M+1},Rf}var Lf,Yg;function Ux(){return Yg||(Yg=1,Lf=function(_){return _===0&&1/_===-1/0}),Lf}var Ff,Qg;function V1(){if(Qg)return Ff;Qg=1;var y=Ic(),_=Ha(),x=Xa(),k=mo(),E=Ka(),D=Ux(),u=34028234663852886e22;return Ff=function(M,Y){if(E(M))return Y?[0,0,192,127]:[127,192,0,0];var X;if(M===0)return X=D(M)?128:0,Y?[0,0,0,X]:[X,0,0,0];if(y(M)>u||!k(M))return X=M<0?255:127,Y?[0,0,128,X]:[X,128,0,0];var ae=M<0?1:0;M=y(M);for(var J=0;M>=2;)J+=1,M/=2;for(;M<1;)J-=1,M*=2;var Se=M-1;Se*=x(2,23)+.5,Se=_(Se),J+=127,J<<=23;var be=ae<<31|J|Se,De=be&255;be>>=8;var Ze=be&255;be>>=8;var He=be&255;be>>=8;var Ue=be&255;return Y?[De,Ze,He,Ue]:[Ue,He,Ze,De]},Ff}var Of,e_;function q1(){if(e_)return Of;e_=1;var y=1075,_=54;return Of=function(k){var E="";if(k===0)return E;for(var D=y,u,U=0;U<y;U+=1)if(u=k*2,u>=1?(k=u-1,E+="1",D===y&&(D=U)):(k=u,E+="0"),u===1||U-D>_)return E;return E},Of}var Vf,t_;function U1(){if(t_)return Vf;t_=1;var y=Ha();return Vf=function(x){for(var k="",E;x>0;)E=x/2,x=y(E),E===x?k="0"+k:k="1"+k;return k},Vf}var qf,r_;function N1(){return r_||(r_=1,qf=Number.isNaN||function(_){return _!==_}),qf}var Uf,i_;function j1(){if(i_)return Uf;i_=1;var y=Er(),_=y("%parseInt%"),x=Ic(),k=Ha(),E=mo(),D=Ux(),u=pr(),U=u("String.prototype.indexOf"),M=u("String.prototype.slice"),Y=q1(),X=U1(),ae=N1(),J=1023,Se="11111111111",be="00000000000",De=be+be+be+be+"0000000";return Uf=function(He,Ue){var fe=He<0||D(He)?"1":"0",Ke,Ne;if(ae(He))Ke=Se,Ne="1"+De;else if(!E(He))Ke=Se,Ne="0"+De;else if(He===0)Ke=be,Ne="0"+De;else{He=x(He);var It=k(He),we=X(It),je=Y(He-It),Le;if(we)Ke=we.length-1;else{var tt=U(je,"1");tt>-1&&(Le=tt+1),Ke=-Le}Ne=we+je,Ke<0?(Ke<=-J&&(Le=J-1),Ne=M(Ne,Le)):Ne=M(Ne,1),Ke=M(be+X(Ke+J),-11),Ne=M(Ne+De+"0",0,52)}for(var Mt=fe+Ke+Ne,Wt=[],St=0;St<8;St++){var Ut=Ue?8-St-1:St;Wt[Ut]=_(M(Mt,St*8,(St+1)*8),2)}return Wt},Uf}var Nf,n_;function G1(){if(n_)return Nf;n_=1;var y=Er(),_=y("%Number%"),x=y("%BigInt%",!0);return Nf=function(E,D,u){var U=typeof E=="bigint"?x:_;E<0&&(E>>>=0);for(var M=[],Y=0;Y<D;Y++)M[u?Y:D-1-Y]=_(E&U(255)),E>>=U(8);return M},Nf}var jf,o_;function $1(){if(o_)return jf;o_=1;var y=At(),_=Ix(),x=w1(),k=S1(),E=M1(),D=B1(),u=z1(),U=D1(),M=R1(),Y=L1(),X=O1(),ae=V1(),J=j1(),Se=G1(),be=Qs(),De={__proto__:null,$INT8:u,$UINT8:Y,$UINT8C:X,$INT16:E,$UINT16:U,$INT32:D,$UINT32:M,$BIGINT64:x,$BIGUINT64:k};return jf=function(He,Ue,fe){if(typeof He!="string"||!_(be.size,"$"+He))throw new y("Assertion failed: `type` must be a TypedArray element type");if(typeof Ue!="number"&&typeof Ue!="bigint")throw new y("Assertion failed: `value` must be a Number or a BigInt");if(typeof fe!="boolean")throw new y("Assertion failed: `isLittleEndian` must be a Boolean");if(He==="FLOAT32")return ae(Ue,fe);if(He==="FLOAT64")return J(Ue,fe);var Ke=be.size["$"+He],Ne=De["$"+He],It=Ne(Ue);return Se(It,Ke,fe)},jf}var Gf,a_;function Z1(){return a_||(a_=1,Gf=function(_,x){for(var k=0;k<_.length;k+=1)x(_[k],k,_)}),Gf}var $f,s_;function W1(){if(s_)return $f;s_=1;var y=Er(),_=Nn(),x=At(),k=Ac(),E=y("%Uint8Array%",!0),D=Ax(),u=Ys(),U=$1(),M=Js(),Y=il(),X=jo(),ae=Qs(),J=Px(),Se=Z1();return $f=function(De,Ze,He,Ue,fe,Ke){var Ne=Y(De);if(!M(De)&&!Ne)throw new x("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!k(Ze)||Ze<0)throw new x("Assertion failed: `byteIndex` must be a non-negative integer");if(typeof He!="string"||!X(ae.size,"$"+He))throw new x("Assertion failed: `type` must be one of "+ae.choices);if(typeof Ue!="number"&&typeof Ue!="bigint")throw new x("Assertion failed: `value` must be a Number or a BigInt");if(typeof fe!="boolean")throw new x("Assertion failed: `isTypedArray` must be a boolean");if(Ke!=="SEQ-CST"&&Ke!=="UNORDERED"&&Ke!=="INIT")throw new x('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&typeof arguments[6]!="boolean")throw new x("Assertion failed: `isLittleEndian` must be a boolean, if present");if(u(De))throw new x("Assertion failed: ArrayBuffer is detached");if(D(He)?typeof Ue!="bigint":typeof Ue!="number")throw new x("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var It=ae.size["$"+He],we=arguments.length>6?arguments[6]:J==="little",je=U(He,Ue,we);if(Ne)throw new _("SharedArrayBuffer is not supported by this implementation");var Le=new E(De,Ze,It);Se(je,function(tt,Mt){Le[Mt]=tt})},$f}var Zf,u_;function H1(){if(u_)return Zf;u_=1;var y=da(),_=Ya(),x=Ka(),k=mo();return Zf=function(D){var u=y(D);return x(u)||u===0?0:k(u)?_(u):u},Zf}var Wf,l_;function X1(){if(l_)return Wf;l_=1;var y=Er(),_=y("%String%"),x=At();return Wf=function(E){if(typeof E=="symbol")throw new x("Cannot convert a Symbol value to a string");return _(E)},Wf}var Hf,c_;function cm(){if(c_)return Hf;c_=1;var y=Nn(),_=At(),x=Ac(),k=Ks(),E=Qs();return Hf=function(u){var U=k(u);if(!U)throw new _("Assertion failed: `O` must be a TypedArray");var M=E.size["$"+E.name["$"+U]];if(!x(M)||M<0)throw new y("Assertion failed: Unknown TypedArray type `"+U+"`");return M},Hf}var Xf,p_;function K1(){if(p_)return Xf;p_=1;var y=Nn(),_=At(),x=Ks(),k=Qs();return Xf=function(D){var u=x(D);if(!u)throw new _("Assertion failed: `O` must be a TypedArray");var U=k.name["$"+u];if(typeof U!="string")throw new y("Assertion failed: Unknown TypedArray type `"+u+"`");return U},Xf}var vc={exports:{}},Kf,h_;function J1(){return h_||(h_=1,Kf=Er()),Kf}var Jf,f_;function pm(){if(f_)return Jf;f_=1;var y=At(),_=jo(),x={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};return Jf=function(E){if(!E||typeof E!="object")return!1;for(var D in E)if(_(E,D)&&!x[D])return!1;var u=_(E,"[[Value]]")||_(E,"[[Writable]]"),U=_(E,"[[Get]]")||_(E,"[[Set]]");if(u&&U)throw new y("Property Descriptors may not be both accessor and data descriptors");return!0},Jf}var Yf,d_;function Y1(){if(d_)return Yf;d_=1;var y=rl(),_=Xs(),x=y.hasArrayLengthDefineBug(),k=x&&Tx(),E=pr(),D=E("Object.prototype.propertyIsEnumerable");return Yf=function(U,M,Y,X,ae,J){if(!_){if(!U(J)||!J["[[Configurable]]"]||!J["[[Writable]]"]||ae in X&&D(X,ae)!==!!J["[[Enumerable]]"])return!1;var Se=J["[[Value]]"];return X[ae]=Se,M(X[ae],Se)}return x&&ae==="length"&&"[[Value]]"in J&&k(X)&&X.length!==J["[[Value]]"]?(X.length=J["[[Value]]"],X.length===J["[[Value]]"]):(_(X,ae,Y(J)),!0)},Yf}var Qf,m_;function Q1(){return m_||(m_=1,Qf=function(_){if(typeof _>"u")return _;var x={};return"[[Value]]"in _&&(x.value=_["[[Value]]"]),"[[Writable]]"in _&&(x.writable=!!_["[[Writable]]"]),"[[Get]]"in _&&(x.get=_["[[Get]]"]),"[[Set]]"in _&&(x.set=_["[[Set]]"]),"[[Enumerable]]"in _&&(x.enumerable=!!_["[[Enumerable]]"]),"[[Configurable]]"in _&&(x.configurable=!!_["[[Configurable]]"]),x}),Qf}var ed,y_;function ew(){if(y_)return ed;y_=1;var y=At(),_=pm(),x=Q1();return ed=function(E){if(typeof E<"u"&&!_(E))throw new y("Assertion failed: `Desc` must be a Property Descriptor");return x(E)},ed}var td,v_;function tw(){if(v_)return td;v_=1;var y=At(),_=jo(),x=pm();return td=function(E){if(typeof E>"u")return!1;if(!x(E))throw new y("Assertion failed: `Desc` must be a Property Descriptor");return!(!_(E,"[[Value]]")&&!_(E,"[[Writable]]"))},td}var rd,g_;function Nx(){return g_||(g_=1,rd=Qu()),rd}var id,__;function rw(){return __||(__=1,id=function(_){return!!_}),id}var nd,x_;function iw(){if(x_)return nd;x_=1;var y=jo(),_=At(),x=fa(),k=Nx(),E=rw();return nd=function(u){if(!x(u))throw new _("ToPropertyDescriptor requires an object");var U={};if(y(u,"enumerable")&&(U["[[Enumerable]]"]=E(u.enumerable)),y(u,"configurable")&&(U["[[Configurable]]"]=E(u.configurable)),y(u,"value")&&(U["[[Value]]"]=u.value),y(u,"writable")&&(U["[[Writable]]"]=E(u.writable)),y(u,"get")){var M=u.get;if(typeof M<"u"&&!k(M))throw new _("getter must be a function");U["[[Get]]"]=M}if(y(u,"set")){var Y=u.set;if(typeof Y<"u"&&!k(Y))throw new _("setter must be a function");U["[[Set]]"]=Y}if((y(U,"[[Get]]")||y(U,"[[Set]]"))&&(y(U,"[[Value]]")||y(U,"[[Writable]]")))throw new _("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return U},nd}var od,b_;function nw(){if(b_)return od;b_=1;var y=At(),_=fa(),x=pm(),k=Y1(),E=ew(),D=tw(),u=Tc(),U=Cx(),M=iw();return od=function(X,ae,J){if(!_(X))throw new y("Assertion failed: Type(O) is not Object");if(!u(ae))throw new y("Assertion failed: P is not a Property Key");var Se=x(J)?J:M(J);if(!x(Se))throw new y("Assertion failed: Desc is not a valid Property Descriptor");return k(D,U,E,X,ae,Se)},od}var w_;function jx(){if(w_)return vc.exports;w_=1;var y=J1(),_=y("%Reflect.construct%",!0),x=nw();try{x({},"",{"[[Get]]":function(){}})}catch{x=null}if(x&&_){var k={},E={};x(E,"length",{"[[Get]]":function(){throw k},"[[Enumerable]]":!0}),vc.exports=function(u){try{_(u,E)}catch(U){return U===k}}}else vc.exports=function(u){return typeof u=="function"&&!!u.prototype};return vc.exports}var ad,S_;function ow(){if(S_)return ad;S_=1;var y=Er(),_=y("%Symbol.species%",!0),x=At(),k=fa(),E=jx();return ad=function(u,U){if(!k(u))throw new x("Assertion failed: Type(O) is not Object");var M=u.constructor;if(typeof M>"u")return U;if(!k(M))throw new x("O.constructor is not an Object");var Y=_?M[_]:void 0;if(Y==null)return U;if(E(Y))return Y;throw new x("no constructor found")},ad}var sd,I_;function Gx(){if(I_)return sd;I_=1;var y=At(),_=pr(),x=_("%ArrayBuffer.prototype.resizable%",!0),k=_("%SharedArrayBuffer.prototype.growable%",!0),E=Js(),D=il();return sd=function(U){var M=E(U),Y=D(U);if(!M&&!Y)throw new y("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return M&&x?!x(U):Y&&k?!k(U):!0},sd}var ud,T_;function aw(){return T_||(T_=1,ud=Ac()),ud}var ld,A_;function $x(){if(A_)return ld;A_=1;var y=jo(),_=eu(),x=aw();return ld=function(E){return!!E&&typeof E=="object"&&y(E,"[[Object]]")&&y(E,"[[CachedBufferByteLength]]")&&(x(E["[[CachedBufferByteLength]]"])&&E["[[CachedBufferByteLength]]"]>=0||E["[[CachedBufferByteLength]]"]==="DETACHED")&&_(E["[[Object]]"])},ld}var cd,E_;function sw(){return E_||(E_=1,cd=fa()),cd}var pd,P_;function uw(){if(P_)return pd;P_=1;var y=pr(),_=y("String.prototype.valueOf"),x=function(U){try{return _(U),!0}catch{return!1}},k=y("Object.prototype.toString"),E="[object String]",D=Go()();return pd=function(U){return typeof U=="string"?!0:!U||typeof U!="object"?!1:D?x(U):k(U)===E},pd}var hd,C_;function lw(){if(C_)return hd;C_=1;var y=pr(),_=y("Number.prototype.toString"),x=function(U){try{return _(U),!0}catch{return!1}},k=y("Object.prototype.toString"),E="[object Number]",D=Go()();return hd=function(U){return typeof U=="number"?!0:!U||typeof U!="object"?!1:D?x(U):k(U)===E},hd}var fd,k_;function cw(){if(k_)return fd;k_=1;var y=pr(),_=y("Boolean.prototype.toString"),x=y("Object.prototype.toString"),k=function(U){try{return _(U),!0}catch{return!1}},E="[object Boolean]",D=Go()();return fd=function(U){return typeof U=="boolean"?!0:U===null||typeof U!="object"?!1:D?k(U):x(U)===E},fd}var gc={exports:{}},dd,M_;function pw(){if(M_)return dd;M_=1;var y=typeof BigInt<"u"&&BigInt;return dd=function(){return typeof y=="function"&&typeof BigInt=="function"&&typeof y(42)=="bigint"&&typeof BigInt(42)=="bigint"},dd}var B_;function hw(){if(B_)return gc.exports;B_=1;var y=pw()();if(y){var _=BigInt.prototype.valueOf,x=function(E){try{return _.call(E),!0}catch{}return!1};gc.exports=function(E){return E===null||typeof E>"u"||typeof E=="boolean"||typeof E=="string"||typeof E=="number"||typeof E=="symbol"||typeof E=="function"?!1:typeof E=="bigint"?!0:x(E)}}else gc.exports=function(E){return!1};return gc.exports}var md,z_;function fw(){if(z_)return md;z_=1;var y=uw(),_=lw(),x=cw(),k=Bx(),E=hw();return md=function(u){if(u==null||typeof u!="object"&&typeof u!="function")return null;if(y(u))return"String";if(_(u))return"Number";if(x(u))return"Boolean";if(k(u))return"Symbol";if(E(u))return"BigInt"},md}var yd,D_;function dw(){if(D_)return yd;D_=1;var y=typeof Map=="function"&&Map.prototype?Map:null,_=typeof Set=="function"&&Set.prototype?Set:null,x;y||(x=function(u){return!1});var k=y?Map.prototype.has:null,E=_?Set.prototype.has:null;return!x&&!k&&(x=function(u){return!1}),yd=x||function(u){if(!u||typeof u!="object")return!1;try{if(k.call(u),E)try{E.call(u)}catch{return!0}return u instanceof y}catch{}return!1},yd}var vd,R_;function mw(){if(R_)return vd;R_=1;var y=typeof Map=="function"&&Map.prototype?Map:null,_=typeof Set=="function"&&Set.prototype?Set:null,x;_||(x=function(u){return!1});var k=y?Map.prototype.has:null,E=_?Set.prototype.has:null;return!x&&!E&&(x=function(u){return!1}),vd=x||function(u){if(!u||typeof u!="object")return!1;try{if(E.call(u),k)try{k.call(u)}catch{return!0}return u instanceof _}catch{}return!1},vd}var gd,L_;function yw(){if(L_)return gd;L_=1;var y=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,_=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,x;y||(x=function(u){return!1});var k=y?y.prototype.has:null,E=_?_.prototype.has:null;return!x&&!k&&(x=function(u){return!1}),gd=x||function(u){if(!u||typeof u!="object")return!1;try{if(k.call(u,k),E)try{E.call(u,E)}catch{return!0}return u instanceof y}catch{}return!1},gd}var _c={exports:{}},F_;function vw(){if(F_)return _c.exports;F_=1;var y=Er(),_=pr(),x=y("%WeakSet%",!0),k=_("WeakSet.prototype.has",!0);if(k){var E=_("WeakMap.prototype.has",!0);_c.exports=function(u){if(!u||typeof u!="object")return!1;try{if(k(u,k),E)try{E(u,E)}catch{return!0}return u instanceof x}catch{}return!1}}else _c.exports=function(u){return!1};return _c.exports}var _d,O_;function gw(){if(O_)return _d;O_=1;var y=dw(),_=mw(),x=yw(),k=vw();return _d=function(D){if(D&&typeof D=="object"){if(y(D))return"Map";if(_(D))return"Set";if(x(D))return"WeakMap";if(k(D))return"WeakSet"}return!1},_d}var xd,V_;function _w(){if(V_)return xd;V_=1;var y=pr(),_=y("WeakRef.prototype.deref",!0);return xd=typeof WeakRef>"u"?function(k){return!1}:function(k){if(!k||typeof k!="object")return!1;try{return _(k),!0}catch{return!1}},xd}var bd,q_;function xw(){if(q_)return bd;q_=1;var y=pr(),_=y("FinalizationRegistry.prototype.register",!0);return bd=_?function(k){if(!k||typeof k!="object")return!1;try{return _(k,{},null),!0}catch{return!1}}:function(k){return!1},bd}var Ws={exports:{}},wd,U_;function Zx(){if(U_)return wd;U_=1;var y=function(){return typeof(function(){}).name=="string"},_=Object.getOwnPropertyDescriptor;if(_)try{_([],"length")}catch{_=null}y.functionsHaveConfigurableNames=function(){if(!y()||!_)return!1;var E=_(function(){},"name");return!!E&&!!E.configurable};var x=Function.prototype.bind;return y.boundFunctionsHaveNames=function(){return y()&&typeof x=="function"&&(function(){}).bind().name!==""},wd=y,wd}var Sd,N_;function bw(){if(N_)return Sd;N_=1;var y=pr(),_=y("Object.prototype.toString"),x=!(0 in[,]),k="[object Object]",E="[object HTMLAllCollection]",D=function(){return!1};if(typeof document=="object"){var u=document.all;_(u)===_(document.all)&&(D=(function(M){if((x||!M)&&(typeof M>"u"||typeof M=="object"))try{var Y=_(M);return(Y===E||Y===k)&&M("")==null}catch{}return!1}))}return Sd=D,Sd}var Id,j_;function Wx(){if(j_)return Id;j_=1;var y=Qu(),_=jo(),x=Zx()(),k=At(),E=pr(),D=bw(),u=E("Function.prototype.toString"),U=E("String.prototype.match"),M=/^class /,Y=function(Se){if(y(Se)||typeof Se!="function")return!1;try{var be=U(u(Se),M);return!!be}catch{}return!1},X=/\s*function\s+([^(\s]*)\s*/,ae=Function.prototype;return Id=function(){if(D(this)||!Y(this)&&!y(this))throw new k("Function.prototype.name sham getter called on non-function");if(x&&_(this,"name"))return this.name;if(this===ae)return"";var Se=u(this),be=U(Se,X),De=be&&be[1];return De},Id}var Td,G_;function Hx(){if(G_)return Td;G_=1;var y=Wx();return Td=function(){return y},Td}var Ad,$_;function ww(){if($_)return Ad;$_=1;var y=rl()(),_=Zx()(),x=At(),k=Hx(),E=Xs();return Ad=function(){var u=k();if(_)return u;if(!y||!E)throw new x("Shimming Function.prototype.name support requires ES5 property descriptor support.");var U=Function.prototype;return E(U,"name",{configurable:!0,enumerable:!1,get:function(){var M=u.call(this);return this!==U&&E(this,"name",{configurable:!0,enumerable:!1,value:M,writable:!1}),M}}),u},Ad}var Z_;function Sw(){if(Z_)return Ws.exports;Z_=1;var y=ha(),_=Wx(),x=Hx(),k=ww(),E=y(_);return Ws.exports=E,Ws.exports.getPolyfill=x,Ws.exports.implementation=_,Ws.exports.shim=k,Ws.exports}var Ed,W_;function Iw(){if(W_)return Ed;W_=1;var y=pr(),_=ol(),x=_(/^\s*(?:function)?\*/),k=Go()(),E=Ja(),D=y("Object.prototype.toString"),u=y("Function.prototype.toString"),U=bx();return Ed=function(Y){if(typeof Y!="function")return!1;if(x(u(Y)))return!0;if(!k){var X=D(Y);return X==="[object GeneratorFunction]"}if(!E)return!1;var ae=U();return ae&&E(Y)===ae.prototype},Ed}var Pd,H_;function Tw(){if(H_)return Pd;H_=1;var y=pr(),_=ol(),x=y("Object.prototype.toString"),k=y("Function.prototype.toString"),E=_(/^\s*async(?:\s+function(?:\s+|\()|\s*\()/),D=Go()(),u=Ja(),U=xx();return Pd=function(Y){if(typeof Y!="function")return!1;if(E(k(Y)))return!0;if(!D){var X=x(Y);return X==="[object AsyncFunction]"}if(!u)return!1;var ae=U();return ae&&ae.prototype===u(Y)},Pd}var Cd,X_;function Aw(){if(X_)return Cd;X_=1;var y=fw(),_=gw(),x=Ks(),k=Ex(),E=kx(),D=Mx(),u=_w(),U=xw(),M=Sw(),Y=Iw(),X=Tw(),ae=pr(),J=Go()(),Se=J&&Symbol.toStringTag,be=Object,De=ae("Promise.prototype.then",!0),Ze=function(fe){if(!fe||typeof fe!="object"||!De)return!1;try{return De(fe,null,function(){}),!0}catch{}return!1},He=function(fe){return!!fe&&fe!=="BigInt"&&fe!=="Boolean"&&fe!=="Null"&&fe!=="Number"&&fe!=="String"&&fe!=="Symbol"&&fe!=="Undefined"&&fe!=="Math"&&fe!=="JSON"&&fe!=="Reflect"&&fe!=="Atomics"&&fe!=="Map"&&fe!=="Set"&&fe!=="WeakMap"&&fe!=="WeakSet"&&fe!=="BigInt64Array"&&fe!=="BigUint64Array"&&fe!=="Float32Array"&&fe!=="Float64Array"&&fe!=="Int16Array"&&fe!=="Int32Array"&&fe!=="Int8Array"&&fe!=="Uint16Array"&&fe!=="Uint32Array"&&fe!=="Uint8Array"&&fe!=="Uint8ClampedArray"&&fe!=="Array"&&fe!=="Date"&&fe!=="FinalizationRegistry"&&fe!=="Promise"&&fe!=="RegExp"&&fe!=="WeakRef"&&fe!=="Function"&&fe!=="GeneratorFunction"&&fe!=="AsyncFunction"};return Cd=function(fe){if(fe==null)return fe;var Ke=y(be(fe))||_(fe)||x(fe);if(Ke)return Ke;if(k(fe))return"Array";if(E(fe))return"Date";if(D(fe))return"RegExp";if(u(fe))return"WeakRef";if(U(fe))return"FinalizationRegistry";if(typeof fe=="function")return Y(fe)?"GeneratorFunction":X(fe)?"AsyncFunction":"Function";if(Ze(fe))return"Promise";if(Se&&Se in fe){var Ne=fe[Se];if(He(Ne))return Ne}if(typeof fe.constructor=="function"){var It=M(fe.constructor);if(He(It))return It}return"Object"},Cd}var kd,K_;function Ew(){if(K_)return kd;K_=1;var y=Er(),_=Nx(),x=sw(),k=Aw(),E=At(),D=Ja(),u=Jd();return kd=function(M){if(!x(M))throw new E("Reflect.getPrototypeOf called on non-object");if(D)return D(M);var Y=k(M);if(Y){var X=y("%"+Y+".prototype%",!0);if(X)return X}return _(M.constructor)?M.constructor.prototype:M instanceof Object?u.prototype:null},kd}var Md,J_;function Xx(){if(J_)return Md;J_=1;var y=Ew(),_=Ja();return Md=function(){return typeof Reflect=="object"&&Reflect&&Reflect.getPrototypeOf?Reflect.getPrototypeOf:_?function(E){return _(E)}:y},Md}var Bd,Y_;function hm(){if(Y_)return Bd;Y_=1;var y=Kd(),_=ha(),x=Xx()(),k=el()(),E={__proto__:null},D=No(),u=Object.defineProperty;if(D){var U=function(X){return X.byteOffset};y(k,function(X){if(typeof wt.commonjsGlobal[X]=="function"||typeof wt.commonjsGlobal[X]=="object"){var ae=wt.commonjsGlobal[X].prototype,J=D(ae,"byteOffset");if(!J){var Se=x(ae);J=D(Se,"byteOffset")}if(J&&J.get)E[X]=_(J.get);else if(u){var be=new wt.commonjsGlobal[X](2);J=D(be,"byteOffset"),J&&J.configurable&&u(be,"length",{value:3}),be.length===2&&(E[X]=U)}}})}var M=function(ae){var J;return y(E,function(Se){if(typeof J!="number")try{var be=Se(ae);typeof be=="number"&&(J=be)}catch{}}),J},Y=eu();return Bd=function(ae){return Y(ae)?M(ae):!1},Bd}var zd,Q_;function Kx(){if(Q_)return zd;Q_=1;var y=ha(),_=Kd(),x=No(),k=eu(),E=mx(),D=Xx()(),u={__proto__:null},U=Object.defineProperty;if(x){var M=function(X){return X.length};_(E,function(X){var ae=wt.commonjsGlobal[X];if(typeof ae=="function"||typeof ae=="object"){var J=ae.prototype,Se=x(J,"length");if(!Se){var be=D(J);Se=x(be,"length")}if(Se&&Se.get)u["$"+X]=y(Se.get);else if(U){var De=new wt.commonjsGlobal[X](2);Se=x(De,"length"),Se&&Se.configurable&&U(De,"length",{value:3}),De.length===2&&(u["$"+X]=M)}}})}var Y=function(ae){var J;return _(u,function(Se){if(typeof J!="number")try{var be=Se(ae);typeof be=="number"&&(J=be)}catch{}}),J};return zd=function(ae){return k(ae)?Y(ae):!1},zd}var Dd,ex;function fm(){if(ex)return Dd;ex=1;var y=At(),_=Ys(),x=Gx(),k=cm(),E=$x(),D=nl(),u=hm(),U=Kx();return Dd=function(Y){if(!E(Y))throw new y("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var X=Y["[[Object]]"],ae=Y["[[CachedBufferByteLength]]"];if(_(D(X))&&ae!=="DETACHED")throw new y("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if(ae==="DETACHED")return!0;var J=u(X),Se=x(D(X)),be,De=Se?U(X):"AUTO";if(De==="AUTO")be=ae;else{var Ze=k(X);be=J+De*Ze}return J>ae||be>ae},Dd}var Rd,tx;function Pw(){if(tx)return Rd;tx=1;var y=At(),_=lm(),x=Gx(),k=fm(),E=cm(),D=$x(),u=nl(),U=hm(),M=Kx();return Rd=function(X){if(!D(X))throw new y("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");if(k(X))throw new y("Assertion failed: `taRecord` is out of bounds");var ae=X["[[Object]]"],J=x(u(ae)),Se=J?M(ae):"AUTO";if(Se!=="AUTO")return Se;if(J)throw new y("Assertion failed: array buffer is not fixed length");var be=U(ae),De=E(ae),Ze=X["[[CachedBufferByteLength]]"];if(Ze==="DETACHED")throw new y("Assertion failed: typed array is detached");return _((Ze-be)/De)},Rd}var Ld,rx;function Cw(){if(rx)return Ld;rx=1;var y=At(),_=Ys(),x=Js(),k=il(),E=Sx(),D=pr(),u=D("SharedArrayBuffer.prototype.byteLength",!0);return Ld=function(M,Y){var X=k(M);if(!x(M)&&!X)throw new y("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(Y!=="SEQ-CST"&&Y!=="UNORDERED")throw new y("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(_(M))throw new y("Assertion failed: `arrayBuffer` must not be detached");return X?u(M):E(M)},Ld}var Fd,ix;function kw(){if(ix)return Fd;ix=1;var y=At(),_=Cw(),x=Ys(),k=eu(),E=nl();return Fd=function(u,U){if(!k(u))throw new y("Assertion failed: `obj` must be a Typed Array");if(U!=="SEQ-CST"&&U!=="UNORDERED")throw new y("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var M=E(u),Y=x(M)?"DETACHED":_(M,U);return{"[[Object]]":u,"[[CachedBufferByteLength]]":Y}},Fd}var Od,nx;function Jx(){if(nx)return Od;nx=1;var y=At(),_=fa(),x=fm(),k=kw(),E=eu();return Od=function(u,U){if(U!=="SEQ-CST"&&U!=="UNORDERED")throw new y("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(!_(u))throw new y("Assertion failed: `O` must be an Object");if(!E(u))throw new y("Assertion failed: `O` must be a Typed Array");var M=k(u,U);if(x(M))throw new y("`O` must be in-bounds and backed by a non-detached buffer");return M},Od}var Vd,ox;function Mw(){if(ox)return Vd;ox=1;var y=Nn(),_=At(),x=um(),k=jx(),E=fm(),D=Pw(),u=Jx(),U=el()();return Vd=function(Y,X){if(!k(Y))throw new _("Assertion failed: `constructor` must be a constructor");if(!x(X))throw new _("Assertion failed: `argumentList` must be a List");if(U.length===0)throw new y("Assertion failed: Typed Arrays are not supported in this environment");var ae;X.length===0?ae=new Y:X.length===1?ae=new Y(X[0]):X.length===2?ae=new Y(X[0],X[1]):ae=new Y(X[0],X[1],X[2]);var J=u(ae,"SEQ-CST");if(X.length===1&&typeof X[0]=="number"){if(E(J))throw new _("new Typed Array is out of bounds");var Se=D(J);if(Se<X[0])throw new _("`argumentList[0]` must be <= `newTypedArray.length`")}return ae},Vd}var qd,ax;function Bw(){if(ax)return qd;ax=1;var y=Er(),_={__proto__:null,$Int8Array:y("%Int8Array%",!0),$Uint8Array:y("%Uint8Array%",!0),$Uint8ClampedArray:y("%Uint8ClampedArray%",!0),$Int16Array:y("%Int16Array%",!0),$Uint16Array:y("%Uint16Array%",!0),$Int32Array:y("%Int32Array%",!0),$Uint32Array:y("%Uint32Array%",!0),$BigInt64Array:y("%BigInt64Array%",!0),$BigUint64Array:y("%BigUint64Array%",!0),$Float16Array:y("%Float16Array%",!0),$Float32Array:y("%Float32Array%",!0),$Float64Array:y("%Float64Array%",!0)};return qd=function(k){return _["$"+k]},qd}var Ud,sx;function zw(){if(sx)return Ud;sx=1;var y=Nn(),_=At(),x=Ks(),k=el()(),E=um(),D=ow(),u=Mw(),U=Bw();return Ud=function(Y,X){if(k.length===0)throw new y("Assertion failed: Typed Arrays are not supported in this environment");var ae=x(Y);if(!ae)throw new _("Assertion failed: exemplar must be a TypedArray");if(!E(X))throw new _("Assertion failed: `argumentList` must be a List");var J=U(ae);if(typeof J!="function")throw new y("Assertion failed: `constructor` of `exemplar` ("+ae+") must exist. Please report this!");var Se=D(Y,J);return u(Se,X)},Ud}var Nd,ux;function Yx(){if(ux)return Nd;ux=1;var y=At(),_=a1(),x=m1(),k=Ys(),E=Qd(),D=em(),u=y1(),U=W1(),M=H1(),Y=X1(),X=cm(),ae=K1(),J=zw(),Se=Jx(),be=nl(),De=hm();return Nd=function(He,Ue){var fe=this;Se(fe,"SEQ-CST");var Ke=fe.length,Ne=M(He),It;Ne===-1/0?It=0:Ne<0?It=E(Ke+Ne,0):It=D(Ne,Ke);var we=typeof Ue>"u"?Ke:M(Ue),je;we===-1/0?je=0:we<0?je=E(Ke+we,0):je=D(we,Ke);var Le=E(je-It,0),tt=J(fe,[Le]);if(Le>0){if(k(be(fe)))throw new y("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");var Mt=ae(fe),Wt=ae(tt);if(Mt===Wt)for(var St=be(fe),Ut=be(tt),Hr=X(fe),Pr=De(fe),bi=It*Hr+Pr,or=De(tt),Rr=or+Le*Hr;or<Rr;){var et=x(St,bi,"UINT8",!0,"UNORDERED");U(Ut,or,"UINT8",et,!0,"UNORDERED"),bi+=1,or+=1}else for(var Lr=0;It<je;){var Xr=Y(It),Et=_(fe,Xr);u(tt,Y(Lr),Et,!0),It+=1,Lr+=1}}return tt},Nd}var jd,lx;function Qx(){if(lx)return jd;lx=1;var y=Yx();return jd=function(){return typeof Uint8Array=="function"&&Uint8Array.prototype.slice||y},jd}var Gd,cx;function Dw(){if(cx)return Gd;cx=1;var y=am(),_=Ja(),x=Qx();return Gd=function(){if(typeof Uint8Array=="function"){var E=x(),D=_(Uint8Array.prototype);y(D,{slice:E},{slice:function(){return D.slice!==E}})}return E},Gd}var $d,px;function Rw(){if(px)return $d;px=1;var y=am(),_=ha(),x=Yx(),k=Qx(),E=Dw(),D=_(k());return y(D,{getPolyfill:k,implementation:x,shim:E}),$d=D,$d}var Zd,hx;function Lw(){if(hx)return Zd;hx=1;var y=Ks(),_=Rw(),x=No();function k(we){return Object.prototype.toString.call(we)}function E(we){return k(we)==="[object Date]"}function D(we){return k(we)==="[object RegExp]"}function u(we){return k(we)==="[object Error]"}function U(we){return k(we)==="[object Boolean]"}function M(we){return k(we)==="[object Number]"}function Y(we){return k(we)==="[object String]"}var X=Array.isArray||function(je){return Object.prototype.toString.call(je)==="[object Array]"};function ae(we,je){if(we.forEach)return we.forEach(je);for(var Le=0;Le<we.length;Le++)je(we[Le],Le,we)}var J=Object.keys||function(je){var Le=[];for(var tt in je)Le[Le.length]=tt;return Le},Se=Object.prototype.propertyIsEnumerable,be=Object.getOwnPropertySymbols;function De(we){var je=J(we);if(be)for(var Le=be(we),tt=0;tt<Le.length;tt++)Se.call(we,Le[tt])&&(je[je.length]=Le[tt]);return je}var Ze=Object.prototype.hasOwnProperty||function(we,je){return je in we};function He(we,je){if(typeof x!="function")return!0;var Le=x(we,je);return!Le||!Le.writable}function Ue(we,je){if(typeof we=="object"&&we!==null){var Le;if(X(we))Le=[];else if(E(we))Le=new Date(we.getTime?we.getTime():we);else if(D(we))Le=new RegExp(we);else if(u(we))Le={message:we.message};else if(U(we)||M(we)||Y(we))Le=Object(we);else{var tt=y(we);if(tt)return _(we);if(Object.create&&Object.getPrototypeOf)Le=Object.create(Object.getPrototypeOf(we));else if(we.constructor===Object)Le={};else{var Mt=we.constructor&&we.constructor.prototype||we.__proto__||{},Wt=function(){};Wt.prototype=Mt,Le=new Wt}}var St=je.includeSymbols?De:J;return ae(St(we),function(Ut){Le[Ut]=we[Ut]}),Le}return we}var fe={__proto__:null};function Ke(we,je){var Le=[],tt=[],Mt=!0,Wt=arguments.length>2?arguments[2]:fe,St=Wt.includeSymbols?De:J,Ut=!!Wt.immutable;return(function Hr(Pr){var bi=Ut?Ue(Pr,Wt):Pr,or={__proto__:null},Rr=!0,et={node:bi,node_:Pr,path:[].concat(Le),parent:tt[tt.length-1],parents:tt,key:Le[Le.length-1],removedKeys:{__proto__:null},isRoot:Le.length===0,level:Le.length,circular:null,update:function(Et,Fr){et.isRoot||(et.parent.node[et.key]=Et),et.node=Et,Fr&&(Rr=!1)},delete:function(Et){delete et.parent.node[et.key],et.parent.removedKeys[et.key]=!0,Et&&(Rr=!1)},remove:function(Et){X(et.parent.node)?(et.parent.node.splice(et.key,1),et.parent.removedKeys[et.key]=!0,Et&&(Rr=!1)):et.delete(Et)},keys:null,before:function(Et){or.before=Et},after:function(Et){or.after=Et},pre:function(Et){or.pre=Et},post:function(Et){or.post=Et},stop:function(){Mt=!1},block:function(){Rr=!1}};if(!Mt)return et;function Lr(){if(typeof et.node=="object"&&et.node!==null){(!et.keys||et.node_!==et.node)&&(et.keys=St(et.node)),et.isLeaf=et.keys.length===0;for(var Et=0;Et<tt.length;Et++)if(tt[Et].node_===Pr){et.circular=tt[Et];break}}else et.isLeaf=!0,et.keys=null;et.notLeaf=!et.isLeaf,et.notRoot=!et.isRoot}Lr();var Xr=je.call(et,et.node);return Xr!==void 0&&et.update&&et.update(Xr),or.before&&or.before.call(et,et.node),Rr&&(typeof et.node=="object"&&et.node!==null&&!et.circular&&(tt[tt.length]=et,Lr(),ae(et.keys,function(Et,Fr){var Mi=Fr-1 in et.removedKeys;Mi&&(Et=et.keys[Fr-1]),Le[Le.length]=Et,or.pre&&or.pre.call(et,et.node[Et],Et);var pi=Hr(et.node[Et]);Ut&&Ze.call(et.node,Et)&&!He(et.node,Et)&&!Mi&&(et.node[Et]=pi.node),pi.isLast=Fr===et.keys.length-1,pi.isFirst=Fr===0,or.post&&or.post.call(et,pi),Le.pop()}),tt.pop()),or.after&&or.after.call(et,et.node)),et})(we).node}function Ne(we){this.options=arguments.length>1?arguments[1]:fe,this.value=we}Ne.prototype.get=function(we){for(var je=this.value,Le=0;je&&Le<we.length;Le++){var tt=we[Le];if(!Ze.call(je,tt)||!this.options.includeSymbols&&typeof tt=="symbol")return;je=je[tt]}return je},Ne.prototype.has=function(we){var je=this.value;if(!je&&we.length>0)return!1;for(var Le=0;je&&Le<we.length;Le++){var tt=we[Le];if(!Ze.call(je,tt)||!this.options.includeSymbols&&typeof tt=="symbol")return!1;je=je[tt]}return!0},Ne.prototype.set=function(we,je){for(var Le=this.value,tt=0;tt<we.length-1;tt++){var Mt=we[tt];Ze.call(Le,Mt)||(Le[Mt]={}),Le=Le[Mt]}return Le[we[tt]]=je,je},Ne.prototype.map=function(we){return Ke(this.value,we,{__proto__:null,immutable:!0,includeSymbols:!!this.options.includeSymbols})},Ne.prototype.forEach=function(we){return this.value=Ke(this.value,we,this.options),this.value},Ne.prototype.reduce=function(we,je){var Le=arguments.length===1,tt=Le?this.value:je;return this.forEach(function(Mt){(!this.isRoot||!Le)&&(tt=we.call(this,tt,Mt))}),tt},Ne.prototype.paths=function(){var we=[];return this.forEach(function(){we[we.length]=this.path}),we},Ne.prototype.nodes=function(){var we=[];return this.forEach(function(){we[we.length]=this.node}),we},Ne.prototype.clone=function(){var we=[],je=[],Le=this.options;return y(this.value)?_(this.value):(function tt(Mt){for(var Wt=0;Wt<we.length;Wt++)if(we[Wt]===Mt)return je[Wt];if(typeof Mt=="object"&&Mt!==null){var St=Ue(Mt,Le);we[we.length]=Mt,je[je.length]=St;var Ut=Le.includeSymbols?De:J;return ae(Ut(Mt),function(Hr){St[Hr]=tt(Mt[Hr])}),we.pop(),je.pop(),St}return Mt})(this.value)};function It(we){var je=arguments.length>1?arguments[1]:fe;return new Ne(we,je)}return ae(De(Ne.prototype),function(we){It[we]=function(je){var Le=[].slice.call(arguments,1),tt=new Ne(je);return tt[we].apply(tt,Le)}}),Zd=It,Zd}var Wd,fx;function Fw(){if(fx)return Wd;fx=1,Wd=y;function y(_){if(!(this instanceof y))return new y(_);this._bbox=_||[1/0,1/0,-1/0,-1/0],this._valid=!!_}return y.prototype.include=function(_){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],_[0]),this._bbox[1]=Math.min(this._bbox[1],_[1]),this._bbox[2]=Math.max(this._bbox[2],_[0]),this._bbox[3]=Math.max(this._bbox[3],_[1]),this},y.prototype.equals=function(_){var x;return _ instanceof y?x=_.bbox():x=_,this._bbox[0]==x[0]&&this._bbox[1]==x[1]&&this._bbox[2]==x[2]&&this._bbox[3]==x[3]},y.prototype.center=function(_){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},y.prototype.union=function(_){this._valid=!0;var x;return _ instanceof y?x=_.bbox():x=_,this._bbox[0]=Math.min(this._bbox[0],x[0]),this._bbox[1]=Math.min(this._bbox[1],x[1]),this._bbox[2]=Math.max(this._bbox[2],x[2]),this._bbox[3]=Math.max(this._bbox[3],x[3]),this},y.prototype.bbox=function(){return this._valid?this._bbox:null},y.prototype.contains=function(_){if(!_)return this._fastContains();if(!this._valid)return null;var x=_[0],k=_[1];return this._bbox[0]<=x&&this._bbox[1]<=k&&this._bbox[2]>=x&&this._bbox[3]>=k},y.prototype.intersect=function(_){if(!this._valid)return null;var x;return _ instanceof y?x=_.bbox():x=_,!(this._bbox[0]>x[2]||this._bbox[2]<x[0]||this._bbox[3]<x[1]||this._bbox[1]>x[3])},y.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var _="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",_)},y.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null},Wd}var dx;function Ow(){if(dx)return Yu.exports;dx=1;var y=U0(),_=Lw(),x=Fw(),k={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},E=Object.keys(k);Yu.exports=function(u){return D(u).bbox()},Yu.exports.polygon=function(u){return D(u).polygon()},Yu.exports.bboxify=function(u){return _(u).map(function(U){if(U){var M=E.some(function(Y){return U[Y]?k[Y].indexOf(U.type)!==-1:!1});M&&(U.bbox=D(U).bbox(),this.update(U))}})};function D(u){for(var U=x(),M=y(u),Y=0;Y<M.length;Y++)U.include(M[Y]);return U}return Yu.exports}var Vw=Ow();const qw=wt.getDefaultExportFromCjs(Vw),Uw={methods:{getIconDetails(y){const _={};switch(y){case"cities":_.name="fa-regular fa-city";break;case"towns":_.name="fa-regular fa-house-chimney-window";break;case"islands":_.name="fa-regular fa-ship";break;case"regions":_.name="fa-regular fa-map-location-dot";break;case"national-parks":_.name="fa-kit fa-vs-icon-national-park";break;case"acco":_.name="fa-regular fa-bed";break;case"acti":_.name="fa-regular fa-person-walking";break;case"attr":_.name="fa-regular fa-camera";break;case"even":_.name="fa-regular fa-ticket";break;case"cate":_.name="fa-regular fa-utensils";break;case"reta":_.name="fa-regular fa-bag-shopping";break;case"featured":_.name="fa-solid fa-star";break;case"twnv":_.name="";break;case"vics":_.name="fa-kit fa-vs-icentre-information";break;case"outlander-castle":_.name="fa-regular fa-chess-rook";break;case"outlander-church-abbey":_.name="fa-regular fa-church";break;case"outlander-city-town-village":_.name="fa-regular fa-city";break;case"outlander-heritage":_.name="fa-regular fa-landmark";break;case"outlander-landscape-park":_.name="fa-regular fa-mountain";break;case"outlander-palace-house":_.name="fa-regular fa-crown";break;case"distilleries":_.name="fa-kit fa-vs-distillery";break;case"itinerary-stop":_.name="";break}return _}}},Nw={name:"VsMapMarkerIcon",status:"prototype",release:"0.0.1",components:{VsIcon:wt.VsIcon},mixins:[Uw],props:{id:{type:String,required:!0},isHovered:{type:Boolean,default:!1},number:{type:String,default:""},isMapMarker:{type:Boolean,default:!1}},computed:{mapMarkerType(){let y="fa-solid fa-location-pin";return this.id==="twnv"&&(y="fa-solid fa-location-dot"),y},parentClasses(){return this.isMapMarker?"vs-map-marker-icon--map-marker":""},markerClasses(){return[`vs-map-marker-icon__marker--${this.id}`,this.isHovered?"vs-map-marker-icon__marker--outline":""]}}},jw={key:0,class:"vs-map-marker-icon__count"};function Gw(y,_,x,k,E,D){const u=q.resolveComponent("VsIcon");return q.openBlock(),q.createElementBlock("div",{"data-test":"vs-map-marker-icon",class:q.normalizeClass(["vs-map-marker-icon",D.parentClasses])},[q.createVNode(u,{icon:D.mapMarkerType,class:q.normalizeClass(["vs-map-marker-icon__marker",D.markerClasses]),size:"xl"},null,8,["icon","class"]),x.number?(q.openBlock(),q.createElementBlock("span",jw,[_[0]||(_[0]=q.createElementVNode("span",{class:"visually-hidden"}," Stop ",-1)),q.createTextVNode(" "+q.toDisplayString(x.number),1)])):(q.openBlock(),q.createBlock(u,{key:1,class:"vs-map-marker-icon__icon",icon:y.getIconDetails(x.id).name,size:"xs"},null,8,["icon"]))],2)}const Ec=wt._export_sfc(Nw,[["render",Gw]]);let Za=null;const $w={name:"VsMapMarker",status:"prototype",release:"0.0.1",components:{VsMapMarkerIcon:Ec},props:{feature:{type:Object,required:!0},mapId:{type:String,required:!0},hasPopups:{type:Boolean,required:!0},selectedPlace:{type:String,default:null}},emits:["showDetail","setCategory"],setup(){Za=Sn()},computed:{isActive(){return!!(this.activePlace&&this.activePlace.properties&&this.activePlace.properties.id===this.feature.properties.id||this.highlightedPlace&&this.highlightedPlace.properties&&this.highlightedPlace.properties.id===this.feature.properties.id)},...pa.mapState(Sn,{highlightedPlace(y){return y.getHoveredStop(this.mapId)},activePlace(y){return y.getActivePlace(this.mapId)?y.getActivePlace(this.mapId):""},activeSubcat(y){return y.selectedSubCategory}}),getMarkerIcon(){let y;return this.feature.properties.type!==""?y=this.feature.properties.type:this.activeSubcat!==null?y=this.activeSubcat:y="featured",y==="null"&&(y=""),y}},watch:{isActive(){return this.activePlace&&this.activePlace.properties.id===this.feature.properties.id||this.highlightedPlace&&this.highlightedPlace.properties.id===this.feature.properties.id?!0:(this.activePlace&&this.activePlace.properties.id===this.feature.properties.id&&Za.setActiveMarkerPos(this.feature.geometry.coordinates),!1)},activePlace(){this.activePlace&&this.activePlace.properties.id===this.feature.properties.id&&Za.setActiveMarkerPos(this.feature.geometry.coordinates)}},mounted(){this.hasPopups&&document.body.addEventListener("click",this.handleClickEvent)},beforeUnmount(){document.body.removeEventListener("click",this.handleClickEvent)},methods:{markerClick(){Za.setActiveMarkerPos(this.feature.geometry.coordinates),Za.setActivePlace({mapId:this.mapId,activeFeature:this.feature}),this.$emit("showDetail",this.feature),this.$emit("setCategory",this.feature.properties.type)},handleHover(y){Za.setHoveredPlace({mapId:this.mapId,hoveredFeature:y})},handleClickEvent(y){const _=document.getElementsByClassName("mapboxgl-canvas");y.target===_[0]&&Za.setActivePlace({mapId:this.mapId,activeFeature:null})}}},Zw=["aria-label"];function Ww(y,_,x,k,E,D){const u=q.resolveComponent("VsMapMarkerIcon");return q.openBlock(),q.createElementBlock("button",{type:"button",class:q.normalizeClass(["vs-map-marker",D.isActive?"vs-map-marker--active":""]),"data-test":"vs-map-marker",onClick:_[0]||(_[0]=(...U)=>D.markerClick&&D.markerClick(...U)),onKeydown:_[1]||(_[1]=q.withKeys((...U)=>D.markerClick&&D.markerClick(...U),["enter"])),onMouseover:_[2]||(_[2]=U=>D.handleHover(x.feature)),onMouseleave:_[3]||(_[3]=U=>D.handleHover("")),onFocusin:_[4]||(_[4]=U=>D.handleHover(x.feature)),onFocusout:_[5]||(_[5]=U=>D.handleHover("")),"aria-label":D.getMarkerIcon},[q.createVNode(u,{id:D.getMarkerIcon,"is-map-marker":!0,number:x.feature.properties.stopCount?x.feature.properties.stopCount:""},null,8,["id","number"])],42,Zw)}const eb=wt._export_sfc($w,[["render",Ww]]);let Hs=null;const Hw={name:"VsMap",status:"prototype",release:"0.0.1",components:{VsWarning:wt.VsWarning,VsLoading:wt.VsLoading},props:{overviewMapLatitude:{type:String,default:"57.81"},overviewMapLongitude:{type:String,default:"-5.51748"},overviewMapZoom:{type:String,default:"5"},mapId:{type:String,required:!0},isVisible:{type:Boolean,required:!0},places:{type:Array,required:!0},filters:{type:Array,default(){return[]}},fitToMarkers:{type:Boolean,default:!1},showPolygons:{type:Boolean,default:!1},selectedItem:{type:Object,default:null},boundsData:{type:Object,default:()=>{}},showInfoMessage:{type:Boolean,default:null},resetZoom:{type:Boolean,default:!1},showMarkerPopups:{type:Boolean,default:!0},loadBrandingImmediately:{type:Boolean,default:!1}},emits:["map-ready","setCategory","showDetail","zoom-reset"],setup(){Hs=Sn()},data(){return{isDesktop:!1,geojsonData:{type:"FeatureCollection",features:[]},polygons:{type:"FeatureCollection",features:[]},multiPolygons:[],mapbox:{map:null,bounds:null,rotation:0,config:{container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",pitchWithRotate:!1,dragRotate:!1}},markers:[],popup:null,hoveredStateId:null,activeStateId:null,showMapMessage:!0,isLoading:!0,showZoomMessage:null}},computed:{getZoom(){return this.mapbox.map?this.mapbox.map.getZoom():null},...pa.mapState(Sn,{activeMarkerPostion(y){return this.mapbox.map?y.activeMarkerPos:null},highlightedPlace(y){return this.mapbox.map?y.getHoveredStop(this.mapId):null},activePlace(y){return this.mapbox.map?y.getActivePlace(this.mapId):null}})},watch:{isVisible(y){y&&this.mapbox.map!==null&&setTimeout(()=>{this.mapbox.map.resize()},20)},places:{handler(){this.geojsonData.features=[],this.initialiseMapFeatures(),this.initialiseMapMarkers()},deep:!0},showPolygons(y){y===!0?this.showMapPolygons():this.hideMapPolygons()},highlightedPlace(y){y&&(y.length===0?this.removeHoveredPolygon():y.geometry.type!=="Point"&&this.addHoveredPolygon(y))},selectedItem(y){if(y&&y.geometry.type!=="Point"){let _=[];_=this.polygons.features.filter(x=>x.properties.id===y.properties.id),_.length>0&&this.addActivePolygon(y)}y||this.removeActivePolygon()},activeMarkerPostion(y){this.checkPointIsVisible(y)||this.centreMapOnPoint(y)},showInfoMessage(y){y?this.showMapMessage=!0:this.showMapMessage=!1},resetZoom(y){y&&(this.mapbox.map.fitBounds(this.calculateBoundingBox()),this.$emit("zoom-reset"),this.showInfoMessage&&(this.showMapMessage=!0))}},mounted(){Hs.addMapInstance({id:this.mapId,filters:this.filters,places:this.places,activePins:this.places}),this.lazyloadMapComponent(),this.isTablet=window.innerWidth>=768,window.addEventListener("resize",this.onResize),this.loadBrandingImmediately?Dy.init({div:this.mapId}):window.addEventListener("DOMContentLoaded",()=>{Dy.init({div:this.mapId})})},methods:{addMap(){const y=this.calculateBoundingBox();this.mapbox.config.container=this.$refs.mapbox,this.mapbox.map=new fo.Map({container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",bounds:y,maxZoom:18,minZoom:4,trackResize:!0}),this.mapbox.map.scrollZoom.disable(),this.mapbox.map.on("rotate",()=>{this.mapbox.rotation=this.mapbox.map.transform.angle}),this.mapbox.map.resize(),this.mapbox.map.on("load",()=>{this.addMapPolygons(),this.showMapMessage=!1,this.isLoading=!1,this.$emit("map-ready",!0),this.mapbox.map.boxZoom.enable()}),this.mapbox.map.on("zoomend",()=>{this.mapbox.map.getZoom()===4?(this.showZoomMessage="too-far",this.showMapMessage=!0):this.mapbox.map.getZoom()===18?(this.showZoomMessage="too-close",this.showMapMessage=!0):this.showInfoMessage||(this.showZoomMessage=null,this.showMapMessage=!1)})},addMapControls(){const y=new fo.NavigationControl;this.mapbox.map.addControl(y,"top-right"),this.mapbox.map.addControl(new fo.FullscreenControl)},initialiseMapFeatures(){this.places.map(y=>{if(typeof y.geometry<"u"){const _=this.getCoordinateArray(y);return this.getMapFeatures(y,_)}return y.latitude&&y.longitude?this.getItineraryMapFeatures(y):!1})},getCoordinateArray(y){return y.geometry.type==="Polygon"?[y.geometry.coordinates[0]]:y.geometry.type==="MultiPolygon"?[y.geometry.coordinates]:[y.geometry.coordinates[0],y.geometry.coordinates[1]]},getMapFeatures(y,_){return this.geojsonData.features.push({type:"Feature",geometry:{type:y.geometry.type,coordinates:_},properties:{title:y.properties.title,imageSrc:y.image,type:typeof y.properties.category<"u"?y.properties.category.id:"",id:y.properties.id},id:y.properties.id})},getItineraryMapFeatures(y){const _=this._uid;return this.geojsonData.features.push({type:"Feature",geometry:{type:"Point",coordinates:[parseFloat(y.longitude),parseFloat(y.latitude)]},properties:{title:y.title,imageSrc:y.imageSrc,type:"itinerary-stop",stopCount:y.stopCount,id:_},id:_})},initialiseMapMarkers(){let y=0;this.initialLoad&&(y=1e3),setTimeout(()=>{if(this.markers!==null){for(let _=this.markers.length-1;_>=0;_--)this.markers[_].remove();this.markers=[]}this.geojsonData.features.forEach(_=>{_.geometry.type==="Point"&&this.createMapMarker(_)})},y)},createMapMarker(y){const _=q.h(eb,{feature:y,mapId:this.mapId,hasPopups:this.showMarkerPopups,onShowDetail:E=>{this.$emit("showDetail",E)},onSetCategory:E=>{this.$emit("setCategory",E)}}),x=document.createElement("div");this.$refs.mapboxOuter.appendChild(x),q.render(_,x),y&&this.showMarkerPopups&&this.addMapPopup(y);const k=new fo.Marker(x.children[0]).setLngLat(y.geometry.coordinates).setPopup(this.popup).addTo(this.mapbox.map);this.setupMarkerListeners(k),this.markers.push(k),x.remove()},hideMapPolygons(){this.mapbox.map.setLayoutProperty("regionFills","visibility","none"),this.mapbox.map.setLayoutProperty("regionBorders","visibility","none")},showMapPolygons(){this.mapbox.map.setLayoutProperty("regionFills","visibility","visible"),this.mapbox.map.setLayoutProperty("regionBorders","visibility","visible")},addMapPolygons(){this.geojsonData.features.forEach(y=>{y.geometry.type==="Polygon"?this.polygons.features.includes(y.properties.id)||this.polygons.features.push(y):y.geometry.type==="MultiPolygon"&&(this.polygons.features.includes(y.properties.id)||this.multiPolygons.push(y))}),this.multiPolygons.forEach(y=>{const _=y.properties;y.geometry.coordinates[0].forEach(x=>{this.polygons.features.push({geometry:{type:"Polygon",coordinates:x},id:_.id,properties:{id:_.id,imageSrc:_.imageSrc,title:_.title,type:_.type},type:"Feature"})})}),this.polygons.features.length>0&&(this.mapbox.map.addSource("regions",{type:"geojson",data:this.polygons,promoteId:"id"}),this.mapbox.map.addLayer({id:"regionFills",type:"fill",source:"regions",layout:{},paint:{"fill-color":["case",["==",["feature-state","interaction-state"],"hover"],"rgba(168,48,140,0.5)",["==",["feature-state","interaction-state"],"active"],"rgba(168,48,140,0.5)","rgba(25,200,197,0.6)"],"fill-opacity":.8}}),this.mapbox.map.addLayer({id:"regionBorders",type:"line",source:"regions",layout:{},paint:{"line-color":"#fff","line-width":1}}),this.hideMapPolygons(),this.mapbox.map.on("mousemove","regionFills",y=>{y.features.length>0&&(this.addMapPopup(y),this.removeHoveredPolygon(),this.addHoveredPolygon(y.features[0]))}),this.mapbox.map.on("mouseleave","regionFills",y=>{this.removeMapPopup(y),this.removeHoveredPolygon()}),this.mapbox.map.on("click","regionFills",y=>{this.removeActivePolygon(),this.addActivePolygon(y.features[0]),this.addMapPopup(y.features[0])}))},removeActivePolygon(){this.mapbox.map.style._layers.regionFills&&(this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":""}),this.activeStateId=null)},addActivePolygon(y){this.activeStateId=y.properties.id,this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":"active"}),Hs.setActivePlace({mapId:this.mapId,activeFeature:y}),this.$emit("showDetail",y),this.$emit("setCategory","regions")},removeHoveredPolygon(){if(this.hoveredStateId){let y="";this.hoveredStateId===this.activeStateId&&(y="active"),this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":y})}Hs.setHoveredPlace({mapId:this.mapId,hoveredFeature:""}),this.hoveredStateId=null},addHoveredPolygon(y){this.hoveredStateId=y.properties.id,this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":"hover"}),this.addMapPopup(y),Hs.setHoveredPlace({mapId:this.mapId,hoveredFeature:y})},addMapPopup(y){let _="";y.features?_=y.features[0]:_=y;const x=this.getCoordinates(_),k=this.getPopupHtml(_);_.properties.id&&(this.removeMapPopup(y),this.popup=new fo.Popup({closeButton:!1,offset:{top:[0,20],bottom:[0,-40],left:[30,-20],right:[-30,-20]}}).setLngLat(x).setHTML(k).addTo(this.mapbox.map))},removeMapPopup(y){this.popup&&(this.popup.remove(),this.popup=null),y._popup&&y._popup.remove()},getCoordinates(y){return y.geometry.type==="Polygon"?this.findFeatureCentre(y.geometry.coordinates):y.geometry.type==="MultiPolygon"?this.findFeatureCentre(y.geometry.coordinates[0]):y.geometry.coordinates},findFeatureCentre(y){const _=[],x=[];return y[0].forEach(k=>{_.push(k[1]),x.push(k[0])}),{lat:(Math.min(..._)+Math.max(..._))/2,lng:(Math.min(...x)+Math.max(...x))/2}},getPopupHtml(y){return y.properties.imageSrc&&y.properties.stopCount?`
500
+ `+_e.prev}function rn(de,_e){var jt=Or(de),tr=[];if(jt){tr.length=de.length;for(var Kt=0;Kt<de.length;Kt++)tr[Kt]=fr(de,Kt)?_e(de[Kt],de):""}var _t=typeof Wt=="function"?Wt(de):[],fi;if(Ut){fi={};for(var qi=0;qi<_t.length;qi++)fi["$"+_t[qi]]=_t[qi]}for(var ii in de)fr(de,ii)&&(jt&&String(Number(ii))===ii&&ii<de.length||Ut&&fi["$"+ii]instanceof Symbol||(It.call(/[^\w$]/,ii)?tr.push(_e(ii,de)+": "+_e(de[ii],de)):tr.push(ii+": "+_e(de[ii],de))));if(typeof Wt=="function")for(var Yt=0;Yt<_t.length;Yt++)Pr.call(de,_t[Yt])&&tr.push("["+_e(_t[Yt])+"]: "+_e(de[_t[Yt]],de));return tr}return wh}var Sh,Vv;function Tc(){return Vv||(Vv=1,Sh=function(_){return typeof _=="string"||typeof _=="symbol"}),Sh}var Ih,qv;function fa(){return qv||(qv=1,Ih=function(_){return!!_&&(typeof _=="function"||typeof _=="object")}),Ih}var Th,Uv;function a1(){if(Uv)return Th;Uv=1;var y=At(),_=sm(),x=Tc(),k=fa();return Th=function(D,u){if(!k(D))throw new y("Assertion failed: Type(O) is not Object");if(!x(u))throw new y("Assertion failed: P is not a Property Key, got "+_(u));return D[u]},Th}var Ah,Nv;function mo(){if(Nv)return Ah;Nv=1;var y=Ka();return Ah=function(x){return(typeof x=="number"||typeof x=="bigint")&&!y(x)&&x!==1/0&&x!==-1/0},Ah}var Eh,jv;function Ac(){if(jv)return Eh;jv=1;var y=Ic(),_=Ha(),x=Ka(),k=mo();return Eh=function(D){if(typeof D!="number"||x(D)||!k(D))return!1;var u=y(D);return _(u)===u},Eh}var Ph,Gv;function Js(){if(Gv)return Ph;Gv=1;var y=ha(),_=pr(),x=Er(),k=x("%ArrayBuffer%",!0),E=_("ArrayBuffer.prototype.byteLength",!0),D=_("Object.prototype.toString"),u=!!k&&!E&&new k(0).slice,U=!!u&&y(u);return Ph=E||U?function(Y){if(!Y||typeof Y!="object")return!1;try{return E?E(Y):U(Y,0),!0}catch{return!1}}:k?function(Y){return D(Y)==="[object ArrayBuffer]"}:function(Y){return!1},Ph}var Ch,$v;function Sx(){if($v)return Ch;$v=1;var y=pr(),_=y("ArrayBuffer.prototype.byteLength",!0),x=Js();return Ch=function(E){return x(E)?_?_(E):E.byteLength:NaN},Ch}var kh,Zv;function il(){if(Zv)return kh;Zv=1;var y=pr(),_=y("SharedArrayBuffer.prototype.byteLength",!0);return kh=_?function(k){if(!k||typeof k!="object")return!1;try{return _(k),!0}catch{return!1}}:function(k){return!1},kh}var Mh,Wv;function Ys(){if(Wv)return Mh;Wv=1;var y=At(),_=Sx(),x=el()(),k=pr(),E=Js(),D=il(),u=k("SharedArrayBuffer.prototype.byteLength",!0);return Mh=function(M){var Y=D(M);if(!E(M)&&!Y)throw new y("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if((Y?u:_)(M)===0)try{new wt.commonjsGlobal[x[0]](M)}catch(X){return!!X&&X.name==="TypeError"}return!1},Mh}var Bh,Hv;function Ix(){if(Hv)return Bh;Hv=1;var y=At(),_=jo(),x=fa(),k=Tc();return Bh=function(D,u){if(!x(D))throw new y("Assertion failed: `O` must be an Object");if(!k(u))throw new y("Assertion failed: `P` must be a Property Key");return _(D,u)},Bh}var zh,Xv;function Tx(){if(Xv)return zh;Xv=1;var y=Er(),_=y("%Array%"),x=!_.isArray&&pr()("Object.prototype.toString");return zh=_.isArray||function(E){return x(E)==="[object Array]"},zh}var Dh,Kv;function um(){return Kv||(Kv=1,Dh=Tx()),Dh}var Rh,Jv;function Ax(){return Jv||(Jv=1,Rh=function(_){return _==="BIGUINT64"||_==="BIGINT64"}),Rh}var Lh,Yv;function s1(){return Yv||(Yv=1,Lh=function(_){return _==="UINT8"||_==="UINT8C"||_==="UINT16"||_==="UINT32"||_==="BIGUINT64"}),Lh}var Fh,Qv;function u1(){if(Qv)return Fh;Qv=1;var y=Xa();return Fh=function(x){var k=x[3]&128?-1:1,E=(x[3]&127)<<1|x[2]>>7,D=(x[2]&127)<<16|x[1]<<8|x[0];return E===0&&D===0?k===1?0:-0:E===255&&D===0?k===1?1/0:-1/0:E===255&&D!==0?NaN:(E-=127,E===-127?k*D*y(2,-149):k*(1+D*y(2,-23))*y(2,E))},Fh}var Oh,eg;function l1(){if(eg)return Oh;eg=1;var y=Xa();return Oh=function(x){var k=x[7]&128?-1:1,E=(x[7]&127)<<4|(x[6]&240)>>4,D=(x[6]&15)*281474976710656+x[5]*1099511627776+x[4]*4294967296+x[3]*16777216+x[2]*65536+x[1]*256+x[0];return E===0&&D===0?k*0:E===2047&&D!==0?NaN:E===2047&&D===0?k*(1/0):(E-=1023,E===-1023?k*D*5e-324:k*(1+D/4503599627370496)*y(2,E))},Oh}var Vh,tg;function c1(){if(tg)return Vh;tg=1;var y=Er(),_=Xa(),x=y("%Number%"),k=y("%BigInt%",!0);return Vh=function(D,u,U,M){for(var Y=M?k:x,X=Y(0),ae=0;ae<D.length;ae++)X+=Y(D[ae]*_(2,8*ae));if(!U){var J=u*8;D[u-1]&128&&(X-=Y(_(2,J)))}return X},Vh}var qh,rg;function p1(){return rg||(rg=1,qh=function(_,x){for(var k=0;k<_.length;k+=1)if(!x(_[k],k,_))return!1;return!0}),qh}var Uh,ig;function h1(){return ig||(ig=1,Uh=function(_){return typeof _=="number"&&_>=0&&_<=255&&(_|0)===_}),Uh}var Nh,ng;function Qs(){return ng||(ng=1,Nh={__proto__:null,name:{__proto__:null,$Int8Array:"INT8",$Uint8Array:"UINT8",$Uint8ClampedArray:"UINT8C",$Int16Array:"INT16",$Uint16Array:"UINT16",$Int32Array:"INT32",$Uint32Array:"UINT32",$BigInt64Array:"BIGINT64",$BigUint64Array:"BIGUINT64",$Float32Array:"FLOAT32",$Float64Array:"FLOAT64"},size:{__proto__:null,$INT8:1,$UINT8:1,$UINT8C:1,$INT16:2,$UINT16:2,$INT32:4,$UINT32:4,$BIGINT64:8,$BIGUINT64:8,$FLOAT32:4,$FLOAT64:8},choices:'"INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"'}),Nh}var jh,og;function f1(){if(og)return jh;og=1;var y=Er(),_=pr(),x=Yd(),k=Nn(),E=At(),D=y("%BigInt%",!0),u=Ix(),U=um(),M=Ax(),Y=s1(),X=u1(),ae=l1(),J=c1(),Se=p1(),be=h1(),De=_("Array.prototype.reverse"),Ze=_("Array.prototype.slice"),He=Qs();return jh=function(fe,Ke,Ne){if(!u(He.size,"$"+fe))throw new E("Assertion failed: `type` must be a TypedArray element type");if(!U(Ke)||!Se(Ke,be))throw new E("Assertion failed: `rawBytes` must be an Array of bytes");if(typeof Ne!="boolean")throw new E("Assertion failed: `isLittleEndian` must be a Boolean");var It=He.size["$"+fe];if(Ke.length!==It)throw new x("Assertion failed: `rawBytes` must have a length of "+It+" for type "+fe);var we=M(fe);if(we&&!D)throw new k("this environment does not support BigInts");return Ke=Ze(Ke,0,It),Ne||De(Ke),fe==="FLOAT32"?X(Ke):fe==="FLOAT64"?ae(Ke):J(Ke,It,Y(fe),we)},jh}var Gh,ag;function Ex(){if(ag)return Gh;ag=1;var y={}.toString;return Gh=Array.isArray||function(_){return y.call(_)=="[object Array]"},Gh}var $h,sg;function d1(){if(sg)return $h;sg=1;var y=Er(),_=y("%Array.prototype.concat%"),x=ha(),k=pr(),E=k("Array.prototype.slice"),D=tm()(),u=D&&Symbol.isConcatSpreadable,U=[],M=u?x.apply(_,U):null,Y=u?Ex():null;return $h=u?function(ae){for(var J=0;J<arguments.length;J+=1){var Se=arguments[J];if(Se&&typeof Se=="object"&&typeof Se[u]=="boolean"){U[u]||(U[u]=!0);var be=Y(Se)?E(Se):[Se];be[u]=!0,arguments[J]=be}}return M(arguments)}:x(_,U),$h}var Zh,ug;function eu(){if(ug)return Zh;ug=1;var y=Ks();return Zh=function(x){return!!y(x)},Zh}var Wh,lg;function nl(){if(lg)return Wh;lg=1;var y=At(),_=pr(),x=_("TypedArray.prototype.buffer",!0),k=eu();return Wh=x||function(D){if(!k(D))throw new y("Not a Typed Array");return D.buffer},Wh}var Hh,cg;function Px(){if(cg)return Hh;cg=1;var y=Er(),_=y("%Uint8Array%",!0),x=y("%Uint32Array%",!0),k=nl(),E=x&&new x([305419896]),D=E&&new _(k(E));return Hh=D?D[0]===120?"little":D[0]===18?"big":D[0]===52?"mixed":"unknown":"indeterminate",Hh}var Xh,pg;function m1(){if(pg)return Xh;pg=1;var y=Er(),_=Nn(),x=At(),k=pr(),E=Ac(),D=y("%Uint8Array%",!0),u=k("Array.prototype.slice"),U=Ys(),M=f1(),Y=Js(),X=il(),ae=d1(),J=Qs(),Se=Px();return Xh=function(De,Ze,He,Ue,fe){var Ke=X(De);if(!Y(De)&&!Ke)throw new x("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!E(Ze))throw new x("Assertion failed: `byteIndex` must be an integer");if(typeof He!="string"||typeof J.size["$"+He]!="number")throw new x("Assertion failed: `type` must be one of "+J.choices);if(typeof Ue!="boolean")throw new x("Assertion failed: `isTypedArray` must be a boolean");if(fe!=="SEQ-CST"&&fe!=="UNORDERED")throw new x("Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`");if(arguments.length>5&&typeof arguments[5]!="boolean")throw new x("Assertion failed: `isLittleEndian` must be a boolean, if present");if(U(De))throw new x("Assertion failed: `arrayBuffer` is detached");if(Ze<0)throw new x("Assertion failed: `byteIndex` must be non-negative");var Ne=J.size["$"+He];if(!Ne)throw new x("Assertion failed: `type` must be one of "+J.choices);var It;if(Ke)throw new _("SharedArrayBuffer is not supported by this implementation");It=u(new D(De,Ze),0,Ne);var we=arguments.length>5?arguments[5]:Se==="little",je=we?u(ae([0,0,0,0,0,0,0,0],It),-Ne):u(ae(It,[0,0,0,0,0,0,0,0]),0,Ne);return M(He,je,we)},Xh}var Kh,hg;function Cx(){if(hg)return Kh;hg=1;var y=Ka();return Kh=function(x,k){return x===k?x===0?1/x===1/k:!0:y(x)&&y(k)},Kh}var Jh,fg;function y1(){if(fg)return Jh;fg=1;var y=At(),_=fa(),x=Tc(),k=Cx(),E=(function(){try{return delete[].length,!0}catch{return!1}})();return Jh=function(u,U,M,Y){if(!_(u))throw new y("Assertion failed: `O` must be an Object");if(!x(U))throw new y("Assertion failed: `P` must be a Property Key");if(typeof Y!="boolean")throw new y("Assertion failed: `Throw` must be a Boolean");if(Y){if(u[U]=M,E&&!k(u[U],M))throw new y("Attempted to assign to readonly property.");return!0}try{return u[U]=M,E?k(u[U],M):!0}catch{return!1}},Jh}var Yh,dg;function v1(){if(dg)return Yh;dg=1;var y=Er(),_=y("%BigInt%",!0),x=At(),k=Nn();return Yh=function(D){if(typeof D!="string")throw new x("`argument` must be a string");if(!_)throw new k("BigInts are not supported in this environment");try{return _(D)}catch{return}},Yh}var Qh,mg;function kx(){if(mg)return Qh;mg=1;var y=pr(),_=y("Date.prototype.getDay"),x=function(U){try{return _(U),!0}catch{return!1}},k=y("Object.prototype.toString"),E="[object Date]",D=Go()();return Qh=function(U){return typeof U!="object"||U===null?!1:D?x(U):k(U)===E},Qh}var yc={exports:{}},ef,yg;function Mx(){if(yg)return ef;yg=1;var y=pr(),_=Go()(),x=jo(),k=No(),E;if(_){var D=y("RegExp.prototype.exec"),u={},U=function(){throw u},M={toString:U,valueOf:U};typeof Symbol.toPrimitive=="symbol"&&(M[Symbol.toPrimitive]=U),E=function(J){if(!J||typeof J!="object")return!1;var Se=k(J,"lastIndex"),be=Se&&x(Se,"value");if(!be)return!1;try{D(J,M)}catch(De){return De===u}}}else{var Y=y("Object.prototype.toString"),X="[object RegExp]";E=function(J){return!J||typeof J!="object"&&typeof J!="function"?!1:Y(J)===X}}return ef=E,ef}var tf,vg;function ol(){if(vg)return tf;vg=1;var y=pr(),_=Mx(),x=y("RegExp.prototype.exec"),k=At();return tf=function(D){if(!_(D))throw new k("`regex` must be a RegExp");return function(U){return x(D,U)!==null}},tf}var gg;function Bx(){if(gg)return yc.exports;gg=1;var y=pr(),_=y("Object.prototype.toString"),x=yx()(),k=ol();if(x){var E=y("Symbol.prototype.toString"),D=k(/^Symbol\(.*\)$/),u=function(M){return typeof M.valueOf()!="symbol"?!1:D(E(M))};yc.exports=function(M){if(typeof M=="symbol")return!0;if(!M||typeof M!="object"||_(M)!=="[object Symbol]")return!1;try{return u(M)}catch{return!1}}}else yc.exports=function(M){return!1};return yc.exports}var rf,_g;function g1(){return _g||(_g=1,rf=function(_){return _===null||typeof _!="function"&&typeof _!="object"}),rf}var nf,xg;function zx(){return xg||(xg=1,nf=function(_){return typeof _=="string"||typeof _=="symbol"}),nf}var of,bg;function _1(){if(bg)return of;bg=1;var y=At(),_=sm(),x=zx();return of=function(E,D){if(!x(D))throw new y("Assertion failed: P is not a Property Key, got "+_(D));return E[D]},of}var af,wg;function x1(){if(wg)return af;wg=1;var y=At(),_=Qu(),x=sm(),k=_1(),E=zx();return af=function(u,U){if(!E(U))throw new y("Assertion failed: P is not a Property Key");var M=k(u,U);if(M!=null){if(!_(M))throw new y(x(U)+" is not a function: "+x(M));return M}},af}var sf,Sg;function b1(){if(Sg)return sf;Sg=1;var y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",_=Qu(),x=kx(),k=Bx(),E=At(),D=g1();function u(M,Y){if(typeof M>"u"||M===null)throw new E("Cannot call method on "+M);if(typeof Y!="string"||Y!=="number"&&Y!=="string")throw new E('hint must be "string" or "number"');var X=Y==="string"?["toString","valueOf"]:["valueOf","toString"],ae,J,Se;for(Se=0;Se<X.length;++Se)if(ae=M[X[Se]],_(ae)&&(J=ae.call(M),D(J)))return J;throw new E("No default value")}var U=x1();return sf=function(Y){if(D(Y))return Y;var X="default";arguments.length>1&&(arguments[1]===String?X="string":arguments[1]===Number&&(X="number"));var ae;if(y&&(Symbol.toPrimitive?ae=U(Y,Symbol.toPrimitive):k(Y)&&(ae=Symbol.prototype.valueOf)),typeof ae<"u"){var J=ae.call(Y,X);if(D(J))return J;throw new E("unable to convert exotic object to primitive")}return X==="default"&&(x(Y)||k(Y))&&(X="string"),u(Y,X==="default"?"number":X)},sf}var uf,Ig;function Dx(){if(Ig)return uf;Ig=1;var y=b1();return uf=function(x){return arguments.length>1?y(x,arguments[1]):y(x)},uf}var lf,Tg;function Rx(){if(Tg)return lf;Tg=1;var y=Er(),_=y("%BigInt%",!0),x=y("%Number%"),k=At(),E=Nn(),D=v1(),u=Dx();return lf=function(M){if(!_)throw new E("BigInts are not supported in this environment");var Y=u(M,x);if(Y==null)throw new k("Cannot convert null or undefined to a BigInt");if(typeof Y=="boolean")return _(Y?1:0);if(typeof Y=="number")throw new k("Cannot convert a Number value to a BigInt");if(typeof Y=="string"){var X=D(Y);if(typeof X>"u")throw new k("Failed to parse String to BigInt");return X}if(typeof Y=="symbol")throw new k("Cannot convert a Symbol value to a BigInt");if(typeof Y!="bigint")throw new E("Assertion failed: unknown primitive type");return Y},lf}var cf,Ag;function Lx(){if(Ag)return cf;Ag=1;var y=Er(),_=y("%BigInt%",!0),x=Yd(),k=At(),E=_&&_(0);return cf=function(u,U){if(typeof u!="bigint"||typeof U!="bigint")throw new k("Assertion failed: `n` and `d` arguments must be BigInts");if(U===E)throw new x("Division by zero");return u===E?E:u%U},cf}var pf,Eg;function Fx(){return Eg||(Eg=1,pf=function(_,x,k){var E=_(x,k);return E>=0?E:E+k}),pf}var hf,Pg;function w1(){if(Pg)return hf;Pg=1;var y=Er(),_=y("%BigInt%",!0),x=Xa(),k=Rx(),E=Lx(),D=Fx(),u=_&&BigInt(x(2,32))*BigInt(x(2,31)),U=_&&BigInt(x(2,32))*BigInt(x(2,32));return hf=function(Y){var X=k(Y),ae=D(E,X,U);return ae>=u?ae-U:ae},hf}var ff,Cg;function S1(){if(Cg)return ff;Cg=1;var y=Er(),_=y("%BigInt%",!0),x=Xa(),k=Rx(),E=Lx(),D=Fx(),u=_&&BigInt(x(2,32))*BigInt(x(2,32));return ff=function(M){var Y=k(M),X=D(E,Y,u);return X},ff}var df,kg;function I1(){if(kg)return df;kg=1;var y=Ha();return df=function(x,k){var E=x%k;return y(E>=0?E:E+k)},df}var mf,Mg;function T1(){return Mg||(Mg=1,mf=I1()),mf}var yf,Bg;function tu(){if(Bg)return yf;Bg=1;var y=T1();return yf=function(x,k){return y(x,k)},yf}var vf,zg;function A1(){return zg||(zg=1,vf=function(_){return _===null||typeof _!="function"&&typeof _!="object"}),vf}var gf,Dg;function Ox(){if(Dg)return gf;Dg=1;var y=At();return gf=function(x){if(x==null)throw new y(arguments.length>0&&arguments[1]||"Cannot call method on "+x);return x},gf}var _f,Rg;function E1(){if(Rg)return _f;Rg=1;var y=Er(),_=y("%String%"),x=At();return _f=function(E){if(typeof E=="symbol")throw new x("Cannot convert a Symbol value to a string");return _(E)},_f}var xf,Lg;function Vx(){if(Lg)return xf;Lg=1;var y=Ox(),_=E1(),x=pr(),k=ol(),E=x("String.prototype.replace"),D=x("String.prototype.charAt"),u=x("String.prototype.slice"),U=/^\s$/.test("᠎"),M=U?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Y=k(U?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]$/);return xf=function(){for(var ae=E(_(y(this)),M,""),J=ae.length;J>0&&Y(D(ae,J-1));)J-=1;return u(ae,0,J)},xf}var bf,Fg;function qx(){if(Fg)return bf;Fg=1;var y=Vx(),_="​",x="᠎";return bf=function(){return String.prototype.trim&&_.trim()===_&&x.trim()===x&&("_"+x).trim()==="_"+x&&(x+"_").trim()===x+"_"?String.prototype.trim:y},bf}var wf,Og;function P1(){if(Og)return wf;Og=1;var y=rl()(),_=om(),x=qx();return wf=function(){var E=x();return String.prototype.trim!==E&&(y?_(String.prototype,"trim",E,!0):_(String.prototype,"trim",E)),E},wf}var Sf,Vg;function C1(){if(Vg)return Sf;Vg=1;var y=ha(),_=am(),x=Ox(),k=Vx(),E=qx(),D=P1(),u=y(E()),U=function(Y){return x(Y),u(Y)};return _(U,{getPolyfill:E,implementation:k,shim:D}),Sf=U,Sf}var If,qg;function k1(){if(qg)return If;qg=1;var y=Er(),_=y("%RegExp%"),x=At(),k=y("%parseInt%"),E=pr(),D=ol(),u=E("String.prototype.slice"),U=D(/^0b[01]+$/i),M=D(/^0o[0-7]+$/i),Y=D(/^[-+]0x[0-9a-f]+$/i),X=["…","​","￾"].join(""),ae=new _("["+X+"]","g"),J=D(ae),Se=C1();return If=function be(De){if(typeof De!="string")throw new x("Assertion failed: `argument` is not a String");if(U(De))return+k(u(De,2),2);if(M(De))return+k(u(De,2),8);if(J(De)||Y(De))return NaN;var Ze=Se(De);return Ze!==De?be(Ze):+De},If}var Tf,Ug;function da(){if(Ug)return Tf;Ug=1;var y=Er(),_=At(),x=y("%Number%"),k=A1(),E=Dx(),D=k1();return Tf=function(U){var M=k(U)?U:E(U,x);if(typeof M=="symbol")throw new _("Cannot convert a Symbol value to a number");if(typeof M=="bigint")throw new _("Conversion from 'BigInt' to 'number' is not allowed.");return typeof M=="string"?D(M):+M},Tf}var Af,Ng;function lm(){if(Ng)return Af;Ng=1;var y=Ha();return Af=function(x){return typeof x=="bigint"?x:y(x)},Af}var Ef,jg;function Ya(){if(jg)return Ef;jg=1;var y=lm(),_=At();return Ef=function(k){if(typeof k!="number"&&typeof k!="bigint")throw new _("argument must be a Number or a BigInt");var E=k<0?-y(-k):y(k);return E===0?0:E},Ef}var Pf,Gg;function M1(){if(Gg)return Pf;Gg=1;var y=tu(),_=da(),x=Ya(),k=mo(),E=65536;return Pf=function(u){var U=_(u);if(!k(U)||U===0)return 0;var M=x(U),Y=y(M,E);return Y>=32768?Y-E:Y},Pf}var Cf,$g;function B1(){if($g)return Cf;$g=1;var y=tu(),_=da(),x=Ya(),k=mo(),E=2147483648,D=4294967296;return Cf=function(U){var M=_(U);if(!k(M)||M===0)return 0;var Y=x(M),X=y(Y,D),ae=X>=E?X-D:X;return ae===0?0:ae},Cf}var kf,Zg;function z1(){if(Zg)return kf;Zg=1;var y=tu(),_=da(),x=Ya(),k=mo();return kf=function(D){var u=_(D);if(!k(u)||u===0)return 0;var U=x(u),M=y(U,256);return M>=128?M-256:M},kf}var Mf,Wg;function D1(){if(Wg)return Mf;Wg=1;var y=tu(),_=da(),x=Ya(),k=mo(),E=65536;return Mf=function(u){var U=_(u);if(!k(U)||U===0)return 0;var M=x(U),Y=y(M,E);return Y===0?0:Y},Mf}var Bf,Hg;function R1(){if(Hg)return Bf;Hg=1;var y=tu(),_=da(),x=Ya(),k=mo(),E=4294967296;return Bf=function(u){var U=_(u);if(!k(U)||U===0)return 0;var M=x(U),Y=y(M,E);return Y===0?0:Y},Bf}var zf,Xg;function L1(){if(Xg)return zf;Xg=1;var y=mo(),_=tu(),x=da(),k=Ya();return zf=function(D){var u=x(D);if(!y(u)||u===0)return 0;var U=k(u),M=_(U,256);return M},zf}var Df,Kg;function F1(){if(Kg)return Df;Kg=1;var y=At(),_=Qd(),x=em();return Df=function(E,D,u){if(typeof E!="number"||typeof D!="number"||typeof u!="number"||!(D<=u))throw new y("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`");return x(_(D,E),u)},Df}var Rf,Jg;function O1(){if(Jg)return Rf;Jg=1;var y=F1(),_=da(),x=lm(),k=Ka();return Rf=function(D){var u=_(D);if(k(u))return 0;var U=y(u,0,255),M=x(U);return U<M+.5?M:U>M+.5?M+1:M%2===0?M:M+1},Rf}var Lf,Yg;function Ux(){return Yg||(Yg=1,Lf=function(_){return _===0&&1/_===-1/0}),Lf}var Ff,Qg;function V1(){if(Qg)return Ff;Qg=1;var y=Ic(),_=Ha(),x=Xa(),k=mo(),E=Ka(),D=Ux(),u=34028234663852886e22;return Ff=function(M,Y){if(E(M))return Y?[0,0,192,127]:[127,192,0,0];var X;if(M===0)return X=D(M)?128:0,Y?[0,0,0,X]:[X,0,0,0];if(y(M)>u||!k(M))return X=M<0?255:127,Y?[0,0,128,X]:[X,128,0,0];var ae=M<0?1:0;M=y(M);for(var J=0;M>=2;)J+=1,M/=2;for(;M<1;)J-=1,M*=2;var Se=M-1;Se*=x(2,23)+.5,Se=_(Se),J+=127,J<<=23;var be=ae<<31|J|Se,De=be&255;be>>=8;var Ze=be&255;be>>=8;var He=be&255;be>>=8;var Ue=be&255;return Y?[De,Ze,He,Ue]:[Ue,He,Ze,De]},Ff}var Of,e_;function q1(){if(e_)return Of;e_=1;var y=1075,_=54;return Of=function(k){var E="";if(k===0)return E;for(var D=y,u,U=0;U<y;U+=1)if(u=k*2,u>=1?(k=u-1,E+="1",D===y&&(D=U)):(k=u,E+="0"),u===1||U-D>_)return E;return E},Of}var Vf,t_;function U1(){if(t_)return Vf;t_=1;var y=Ha();return Vf=function(x){for(var k="",E;x>0;)E=x/2,x=y(E),E===x?k="0"+k:k="1"+k;return k},Vf}var qf,r_;function N1(){return r_||(r_=1,qf=Number.isNaN||function(_){return _!==_}),qf}var Uf,i_;function j1(){if(i_)return Uf;i_=1;var y=Er(),_=y("%parseInt%"),x=Ic(),k=Ha(),E=mo(),D=Ux(),u=pr(),U=u("String.prototype.indexOf"),M=u("String.prototype.slice"),Y=q1(),X=U1(),ae=N1(),J=1023,Se="11111111111",be="00000000000",De=be+be+be+be+"0000000";return Uf=function(He,Ue){var fe=He<0||D(He)?"1":"0",Ke,Ne;if(ae(He))Ke=Se,Ne="1"+De;else if(!E(He))Ke=Se,Ne="0"+De;else if(He===0)Ke=be,Ne="0"+De;else{He=x(He);var It=k(He),we=X(It),je=Y(He-It),Le;if(we)Ke=we.length-1;else{var tt=U(je,"1");tt>-1&&(Le=tt+1),Ke=-Le}Ne=we+je,Ke<0?(Ke<=-J&&(Le=J-1),Ne=M(Ne,Le)):Ne=M(Ne,1),Ke=M(be+X(Ke+J),-11),Ne=M(Ne+De+"0",0,52)}for(var Mt=fe+Ke+Ne,Wt=[],St=0;St<8;St++){var Ut=Ue?8-St-1:St;Wt[Ut]=_(M(Mt,St*8,(St+1)*8),2)}return Wt},Uf}var Nf,n_;function G1(){if(n_)return Nf;n_=1;var y=Er(),_=y("%Number%"),x=y("%BigInt%",!0);return Nf=function(E,D,u){var U=typeof E=="bigint"?x:_;E<0&&(E>>>=0);for(var M=[],Y=0;Y<D;Y++)M[u?Y:D-1-Y]=_(E&U(255)),E>>=U(8);return M},Nf}var jf,o_;function $1(){if(o_)return jf;o_=1;var y=At(),_=Ix(),x=w1(),k=S1(),E=M1(),D=B1(),u=z1(),U=D1(),M=R1(),Y=L1(),X=O1(),ae=V1(),J=j1(),Se=G1(),be=Qs(),De={__proto__:null,$INT8:u,$UINT8:Y,$UINT8C:X,$INT16:E,$UINT16:U,$INT32:D,$UINT32:M,$BIGINT64:x,$BIGUINT64:k};return jf=function(He,Ue,fe){if(typeof He!="string"||!_(be.size,"$"+He))throw new y("Assertion failed: `type` must be a TypedArray element type");if(typeof Ue!="number"&&typeof Ue!="bigint")throw new y("Assertion failed: `value` must be a Number or a BigInt");if(typeof fe!="boolean")throw new y("Assertion failed: `isLittleEndian` must be a Boolean");if(He==="FLOAT32")return ae(Ue,fe);if(He==="FLOAT64")return J(Ue,fe);var Ke=be.size["$"+He],Ne=De["$"+He],It=Ne(Ue);return Se(It,Ke,fe)},jf}var Gf,a_;function Z1(){return a_||(a_=1,Gf=function(_,x){for(var k=0;k<_.length;k+=1)x(_[k],k,_)}),Gf}var $f,s_;function W1(){if(s_)return $f;s_=1;var y=Er(),_=Nn(),x=At(),k=Ac(),E=y("%Uint8Array%",!0),D=Ax(),u=Ys(),U=$1(),M=Js(),Y=il(),X=jo(),ae=Qs(),J=Px(),Se=Z1();return $f=function(De,Ze,He,Ue,fe,Ke){var Ne=Y(De);if(!M(De)&&!Ne)throw new x("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(!k(Ze)||Ze<0)throw new x("Assertion failed: `byteIndex` must be a non-negative integer");if(typeof He!="string"||!X(ae.size,"$"+He))throw new x("Assertion failed: `type` must be one of "+ae.choices);if(typeof Ue!="number"&&typeof Ue!="bigint")throw new x("Assertion failed: `value` must be a Number or a BigInt");if(typeof fe!="boolean")throw new x("Assertion failed: `isTypedArray` must be a boolean");if(Ke!=="SEQ-CST"&&Ke!=="UNORDERED"&&Ke!=="INIT")throw new x('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`');if(arguments.length>6&&typeof arguments[6]!="boolean")throw new x("Assertion failed: `isLittleEndian` must be a boolean, if present");if(u(De))throw new x("Assertion failed: ArrayBuffer is detached");if(D(He)?typeof Ue!="bigint":typeof Ue!="number")throw new x("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var It=ae.size["$"+He],we=arguments.length>6?arguments[6]:J==="little",je=U(He,Ue,we);if(Ne)throw new _("SharedArrayBuffer is not supported by this implementation");var Le=new E(De,Ze,It);Se(je,function(tt,Mt){Le[Mt]=tt})},$f}var Zf,u_;function H1(){if(u_)return Zf;u_=1;var y=da(),_=Ya(),x=Ka(),k=mo();return Zf=function(D){var u=y(D);return x(u)||u===0?0:k(u)?_(u):u},Zf}var Wf,l_;function X1(){if(l_)return Wf;l_=1;var y=Er(),_=y("%String%"),x=At();return Wf=function(E){if(typeof E=="symbol")throw new x("Cannot convert a Symbol value to a string");return _(E)},Wf}var Hf,c_;function cm(){if(c_)return Hf;c_=1;var y=Nn(),_=At(),x=Ac(),k=Ks(),E=Qs();return Hf=function(u){var U=k(u);if(!U)throw new _("Assertion failed: `O` must be a TypedArray");var M=E.size["$"+E.name["$"+U]];if(!x(M)||M<0)throw new y("Assertion failed: Unknown TypedArray type `"+U+"`");return M},Hf}var Xf,p_;function K1(){if(p_)return Xf;p_=1;var y=Nn(),_=At(),x=Ks(),k=Qs();return Xf=function(D){var u=x(D);if(!u)throw new _("Assertion failed: `O` must be a TypedArray");var U=k.name["$"+u];if(typeof U!="string")throw new y("Assertion failed: Unknown TypedArray type `"+u+"`");return U},Xf}var vc={exports:{}},Kf,h_;function J1(){return h_||(h_=1,Kf=Er()),Kf}var Jf,f_;function pm(){if(f_)return Jf;f_=1;var y=At(),_=jo(),x={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};return Jf=function(E){if(!E||typeof E!="object")return!1;for(var D in E)if(_(E,D)&&!x[D])return!1;var u=_(E,"[[Value]]")||_(E,"[[Writable]]"),U=_(E,"[[Get]]")||_(E,"[[Set]]");if(u&&U)throw new y("Property Descriptors may not be both accessor and data descriptors");return!0},Jf}var Yf,d_;function Y1(){if(d_)return Yf;d_=1;var y=rl(),_=Xs(),x=y.hasArrayLengthDefineBug(),k=x&&Tx(),E=pr(),D=E("Object.prototype.propertyIsEnumerable");return Yf=function(U,M,Y,X,ae,J){if(!_){if(!U(J)||!J["[[Configurable]]"]||!J["[[Writable]]"]||ae in X&&D(X,ae)!==!!J["[[Enumerable]]"])return!1;var Se=J["[[Value]]"];return X[ae]=Se,M(X[ae],Se)}return x&&ae==="length"&&"[[Value]]"in J&&k(X)&&X.length!==J["[[Value]]"]?(X.length=J["[[Value]]"],X.length===J["[[Value]]"]):(_(X,ae,Y(J)),!0)},Yf}var Qf,m_;function Q1(){return m_||(m_=1,Qf=function(_){if(typeof _>"u")return _;var x={};return"[[Value]]"in _&&(x.value=_["[[Value]]"]),"[[Writable]]"in _&&(x.writable=!!_["[[Writable]]"]),"[[Get]]"in _&&(x.get=_["[[Get]]"]),"[[Set]]"in _&&(x.set=_["[[Set]]"]),"[[Enumerable]]"in _&&(x.enumerable=!!_["[[Enumerable]]"]),"[[Configurable]]"in _&&(x.configurable=!!_["[[Configurable]]"]),x}),Qf}var ed,y_;function ew(){if(y_)return ed;y_=1;var y=At(),_=pm(),x=Q1();return ed=function(E){if(typeof E<"u"&&!_(E))throw new y("Assertion failed: `Desc` must be a Property Descriptor");return x(E)},ed}var td,v_;function tw(){if(v_)return td;v_=1;var y=At(),_=jo(),x=pm();return td=function(E){if(typeof E>"u")return!1;if(!x(E))throw new y("Assertion failed: `Desc` must be a Property Descriptor");return!(!_(E,"[[Value]]")&&!_(E,"[[Writable]]"))},td}var rd,g_;function Nx(){return g_||(g_=1,rd=Qu()),rd}var id,__;function rw(){return __||(__=1,id=function(_){return!!_}),id}var nd,x_;function iw(){if(x_)return nd;x_=1;var y=jo(),_=At(),x=fa(),k=Nx(),E=rw();return nd=function(u){if(!x(u))throw new _("ToPropertyDescriptor requires an object");var U={};if(y(u,"enumerable")&&(U["[[Enumerable]]"]=E(u.enumerable)),y(u,"configurable")&&(U["[[Configurable]]"]=E(u.configurable)),y(u,"value")&&(U["[[Value]]"]=u.value),y(u,"writable")&&(U["[[Writable]]"]=E(u.writable)),y(u,"get")){var M=u.get;if(typeof M<"u"&&!k(M))throw new _("getter must be a function");U["[[Get]]"]=M}if(y(u,"set")){var Y=u.set;if(typeof Y<"u"&&!k(Y))throw new _("setter must be a function");U["[[Set]]"]=Y}if((y(U,"[[Get]]")||y(U,"[[Set]]"))&&(y(U,"[[Value]]")||y(U,"[[Writable]]")))throw new _("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return U},nd}var od,b_;function nw(){if(b_)return od;b_=1;var y=At(),_=fa(),x=pm(),k=Y1(),E=ew(),D=tw(),u=Tc(),U=Cx(),M=iw();return od=function(X,ae,J){if(!_(X))throw new y("Assertion failed: Type(O) is not Object");if(!u(ae))throw new y("Assertion failed: P is not a Property Key");var Se=x(J)?J:M(J);if(!x(Se))throw new y("Assertion failed: Desc is not a valid Property Descriptor");return k(D,U,E,X,ae,Se)},od}var w_;function jx(){if(w_)return vc.exports;w_=1;var y=J1(),_=y("%Reflect.construct%",!0),x=nw();try{x({},"",{"[[Get]]":function(){}})}catch{x=null}if(x&&_){var k={},E={};x(E,"length",{"[[Get]]":function(){throw k},"[[Enumerable]]":!0}),vc.exports=function(u){try{_(u,E)}catch(U){return U===k}}}else vc.exports=function(u){return typeof u=="function"&&!!u.prototype};return vc.exports}var ad,S_;function ow(){if(S_)return ad;S_=1;var y=Er(),_=y("%Symbol.species%",!0),x=At(),k=fa(),E=jx();return ad=function(u,U){if(!k(u))throw new x("Assertion failed: Type(O) is not Object");var M=u.constructor;if(typeof M>"u")return U;if(!k(M))throw new x("O.constructor is not an Object");var Y=_?M[_]:void 0;if(Y==null)return U;if(E(Y))return Y;throw new x("no constructor found")},ad}var sd,I_;function Gx(){if(I_)return sd;I_=1;var y=At(),_=pr(),x=_("%ArrayBuffer.prototype.resizable%",!0),k=_("%SharedArrayBuffer.prototype.growable%",!0),E=Js(),D=il();return sd=function(U){var M=E(U),Y=D(U);if(!M&&!Y)throw new y("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return M&&x?!x(U):Y&&k?!k(U):!0},sd}var ud,T_;function aw(){return T_||(T_=1,ud=Ac()),ud}var ld,A_;function $x(){if(A_)return ld;A_=1;var y=jo(),_=eu(),x=aw();return ld=function(E){return!!E&&typeof E=="object"&&y(E,"[[Object]]")&&y(E,"[[CachedBufferByteLength]]")&&(x(E["[[CachedBufferByteLength]]"])&&E["[[CachedBufferByteLength]]"]>=0||E["[[CachedBufferByteLength]]"]==="DETACHED")&&_(E["[[Object]]"])},ld}var cd,E_;function sw(){return E_||(E_=1,cd=fa()),cd}var pd,P_;function uw(){if(P_)return pd;P_=1;var y=pr(),_=y("String.prototype.valueOf"),x=function(U){try{return _(U),!0}catch{return!1}},k=y("Object.prototype.toString"),E="[object String]",D=Go()();return pd=function(U){return typeof U=="string"?!0:!U||typeof U!="object"?!1:D?x(U):k(U)===E},pd}var hd,C_;function lw(){if(C_)return hd;C_=1;var y=pr(),_=y("Number.prototype.toString"),x=function(U){try{return _(U),!0}catch{return!1}},k=y("Object.prototype.toString"),E="[object Number]",D=Go()();return hd=function(U){return typeof U=="number"?!0:!U||typeof U!="object"?!1:D?x(U):k(U)===E},hd}var fd,k_;function cw(){if(k_)return fd;k_=1;var y=pr(),_=y("Boolean.prototype.toString"),x=y("Object.prototype.toString"),k=function(U){try{return _(U),!0}catch{return!1}},E="[object Boolean]",D=Go()();return fd=function(U){return typeof U=="boolean"?!0:U===null||typeof U!="object"?!1:D?k(U):x(U)===E},fd}var gc={exports:{}},dd,M_;function pw(){if(M_)return dd;M_=1;var y=typeof BigInt<"u"&&BigInt;return dd=function(){return typeof y=="function"&&typeof BigInt=="function"&&typeof y(42)=="bigint"&&typeof BigInt(42)=="bigint"},dd}var B_;function hw(){if(B_)return gc.exports;B_=1;var y=pw()();if(y){var _=BigInt.prototype.valueOf,x=function(E){try{return _.call(E),!0}catch{}return!1};gc.exports=function(E){return E===null||typeof E>"u"||typeof E=="boolean"||typeof E=="string"||typeof E=="number"||typeof E=="symbol"||typeof E=="function"?!1:typeof E=="bigint"?!0:x(E)}}else gc.exports=function(E){return!1};return gc.exports}var md,z_;function fw(){if(z_)return md;z_=1;var y=uw(),_=lw(),x=cw(),k=Bx(),E=hw();return md=function(u){if(u==null||typeof u!="object"&&typeof u!="function")return null;if(y(u))return"String";if(_(u))return"Number";if(x(u))return"Boolean";if(k(u))return"Symbol";if(E(u))return"BigInt"},md}var yd,D_;function dw(){if(D_)return yd;D_=1;var y=typeof Map=="function"&&Map.prototype?Map:null,_=typeof Set=="function"&&Set.prototype?Set:null,x;y||(x=function(u){return!1});var k=y?Map.prototype.has:null,E=_?Set.prototype.has:null;return!x&&!k&&(x=function(u){return!1}),yd=x||function(u){if(!u||typeof u!="object")return!1;try{if(k.call(u),E)try{E.call(u)}catch{return!0}return u instanceof y}catch{}return!1},yd}var vd,R_;function mw(){if(R_)return vd;R_=1;var y=typeof Map=="function"&&Map.prototype?Map:null,_=typeof Set=="function"&&Set.prototype?Set:null,x;_||(x=function(u){return!1});var k=y?Map.prototype.has:null,E=_?Set.prototype.has:null;return!x&&!E&&(x=function(u){return!1}),vd=x||function(u){if(!u||typeof u!="object")return!1;try{if(E.call(u),k)try{k.call(u)}catch{return!0}return u instanceof _}catch{}return!1},vd}var gd,L_;function yw(){if(L_)return gd;L_=1;var y=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,_=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,x;y||(x=function(u){return!1});var k=y?y.prototype.has:null,E=_?_.prototype.has:null;return!x&&!k&&(x=function(u){return!1}),gd=x||function(u){if(!u||typeof u!="object")return!1;try{if(k.call(u,k),E)try{E.call(u,E)}catch{return!0}return u instanceof y}catch{}return!1},gd}var _c={exports:{}},F_;function vw(){if(F_)return _c.exports;F_=1;var y=Er(),_=pr(),x=y("%WeakSet%",!0),k=_("WeakSet.prototype.has",!0);if(k){var E=_("WeakMap.prototype.has",!0);_c.exports=function(u){if(!u||typeof u!="object")return!1;try{if(k(u,k),E)try{E(u,E)}catch{return!0}return u instanceof x}catch{}return!1}}else _c.exports=function(u){return!1};return _c.exports}var _d,O_;function gw(){if(O_)return _d;O_=1;var y=dw(),_=mw(),x=yw(),k=vw();return _d=function(D){if(D&&typeof D=="object"){if(y(D))return"Map";if(_(D))return"Set";if(x(D))return"WeakMap";if(k(D))return"WeakSet"}return!1},_d}var xd,V_;function _w(){if(V_)return xd;V_=1;var y=pr(),_=y("WeakRef.prototype.deref",!0);return xd=typeof WeakRef>"u"?function(k){return!1}:function(k){if(!k||typeof k!="object")return!1;try{return _(k),!0}catch{return!1}},xd}var bd,q_;function xw(){if(q_)return bd;q_=1;var y=pr(),_=y("FinalizationRegistry.prototype.register",!0);return bd=_?function(k){if(!k||typeof k!="object")return!1;try{return _(k,{},null),!0}catch{return!1}}:function(k){return!1},bd}var Ws={exports:{}},wd,U_;function Zx(){if(U_)return wd;U_=1;var y=function(){return typeof(function(){}).name=="string"},_=Object.getOwnPropertyDescriptor;if(_)try{_([],"length")}catch{_=null}y.functionsHaveConfigurableNames=function(){if(!y()||!_)return!1;var E=_(function(){},"name");return!!E&&!!E.configurable};var x=Function.prototype.bind;return y.boundFunctionsHaveNames=function(){return y()&&typeof x=="function"&&(function(){}).bind().name!==""},wd=y,wd}var Sd,N_;function bw(){if(N_)return Sd;N_=1;var y=pr(),_=y("Object.prototype.toString"),x=!(0 in[,]),k="[object Object]",E="[object HTMLAllCollection]",D=function(){return!1};if(typeof document=="object"){var u=document.all;_(u)===_(document.all)&&(D=(function(M){if((x||!M)&&(typeof M>"u"||typeof M=="object"))try{var Y=_(M);return(Y===E||Y===k)&&M("")==null}catch{}return!1}))}return Sd=D,Sd}var Id,j_;function Wx(){if(j_)return Id;j_=1;var y=Qu(),_=jo(),x=Zx()(),k=At(),E=pr(),D=bw(),u=E("Function.prototype.toString"),U=E("String.prototype.match"),M=/^class /,Y=function(Se){if(y(Se)||typeof Se!="function")return!1;try{var be=U(u(Se),M);return!!be}catch{}return!1},X=/\s*function\s+([^(\s]*)\s*/,ae=Function.prototype;return Id=function(){if(D(this)||!Y(this)&&!y(this))throw new k("Function.prototype.name sham getter called on non-function");if(x&&_(this,"name"))return this.name;if(this===ae)return"";var Se=u(this),be=U(Se,X),De=be&&be[1];return De},Id}var Td,G_;function Hx(){if(G_)return Td;G_=1;var y=Wx();return Td=function(){return y},Td}var Ad,$_;function ww(){if($_)return Ad;$_=1;var y=rl()(),_=Zx()(),x=At(),k=Hx(),E=Xs();return Ad=function(){var u=k();if(_)return u;if(!y||!E)throw new x("Shimming Function.prototype.name support requires ES5 property descriptor support.");var U=Function.prototype;return E(U,"name",{configurable:!0,enumerable:!1,get:function(){var M=u.call(this);return this!==U&&E(this,"name",{configurable:!0,enumerable:!1,value:M,writable:!1}),M}}),u},Ad}var Z_;function Sw(){if(Z_)return Ws.exports;Z_=1;var y=ha(),_=Wx(),x=Hx(),k=ww(),E=y(_);return Ws.exports=E,Ws.exports.getPolyfill=x,Ws.exports.implementation=_,Ws.exports.shim=k,Ws.exports}var Ed,W_;function Iw(){if(W_)return Ed;W_=1;var y=pr(),_=ol(),x=_(/^\s*(?:function)?\*/),k=Go()(),E=Ja(),D=y("Object.prototype.toString"),u=y("Function.prototype.toString"),U=bx();return Ed=function(Y){if(typeof Y!="function")return!1;if(x(u(Y)))return!0;if(!k){var X=D(Y);return X==="[object GeneratorFunction]"}if(!E)return!1;var ae=U();return ae&&E(Y)===ae.prototype},Ed}var Pd,H_;function Tw(){if(H_)return Pd;H_=1;var y=pr(),_=ol(),x=y("Object.prototype.toString"),k=y("Function.prototype.toString"),E=_(/^\s*async(?:\s+function(?:\s+|\()|\s*\()/),D=Go()(),u=Ja(),U=xx();return Pd=function(Y){if(typeof Y!="function")return!1;if(E(k(Y)))return!0;if(!D){var X=x(Y);return X==="[object AsyncFunction]"}if(!u)return!1;var ae=U();return ae&&ae.prototype===u(Y)},Pd}var Cd,X_;function Aw(){if(X_)return Cd;X_=1;var y=fw(),_=gw(),x=Ks(),k=Ex(),E=kx(),D=Mx(),u=_w(),U=xw(),M=Sw(),Y=Iw(),X=Tw(),ae=pr(),J=Go()(),Se=J&&Symbol.toStringTag,be=Object,De=ae("Promise.prototype.then",!0),Ze=function(fe){if(!fe||typeof fe!="object"||!De)return!1;try{return De(fe,null,function(){}),!0}catch{}return!1},He=function(fe){return!!fe&&fe!=="BigInt"&&fe!=="Boolean"&&fe!=="Null"&&fe!=="Number"&&fe!=="String"&&fe!=="Symbol"&&fe!=="Undefined"&&fe!=="Math"&&fe!=="JSON"&&fe!=="Reflect"&&fe!=="Atomics"&&fe!=="Map"&&fe!=="Set"&&fe!=="WeakMap"&&fe!=="WeakSet"&&fe!=="BigInt64Array"&&fe!=="BigUint64Array"&&fe!=="Float32Array"&&fe!=="Float64Array"&&fe!=="Int16Array"&&fe!=="Int32Array"&&fe!=="Int8Array"&&fe!=="Uint16Array"&&fe!=="Uint32Array"&&fe!=="Uint8Array"&&fe!=="Uint8ClampedArray"&&fe!=="Array"&&fe!=="Date"&&fe!=="FinalizationRegistry"&&fe!=="Promise"&&fe!=="RegExp"&&fe!=="WeakRef"&&fe!=="Function"&&fe!=="GeneratorFunction"&&fe!=="AsyncFunction"};return Cd=function(fe){if(fe==null)return fe;var Ke=y(be(fe))||_(fe)||x(fe);if(Ke)return Ke;if(k(fe))return"Array";if(E(fe))return"Date";if(D(fe))return"RegExp";if(u(fe))return"WeakRef";if(U(fe))return"FinalizationRegistry";if(typeof fe=="function")return Y(fe)?"GeneratorFunction":X(fe)?"AsyncFunction":"Function";if(Ze(fe))return"Promise";if(Se&&Se in fe){var Ne=fe[Se];if(He(Ne))return Ne}if(typeof fe.constructor=="function"){var It=M(fe.constructor);if(He(It))return It}return"Object"},Cd}var kd,K_;function Ew(){if(K_)return kd;K_=1;var y=Er(),_=Nx(),x=sw(),k=Aw(),E=At(),D=Ja(),u=Jd();return kd=function(M){if(!x(M))throw new E("Reflect.getPrototypeOf called on non-object");if(D)return D(M);var Y=k(M);if(Y){var X=y("%"+Y+".prototype%",!0);if(X)return X}return _(M.constructor)?M.constructor.prototype:M instanceof Object?u.prototype:null},kd}var Md,J_;function Xx(){if(J_)return Md;J_=1;var y=Ew(),_=Ja();return Md=function(){return typeof Reflect=="object"&&Reflect&&Reflect.getPrototypeOf?Reflect.getPrototypeOf:_?function(E){return _(E)}:y},Md}var Bd,Y_;function hm(){if(Y_)return Bd;Y_=1;var y=Kd(),_=ha(),x=Xx()(),k=el()(),E={__proto__:null},D=No(),u=Object.defineProperty;if(D){var U=function(X){return X.byteOffset};y(k,function(X){if(typeof wt.commonjsGlobal[X]=="function"||typeof wt.commonjsGlobal[X]=="object"){var ae=wt.commonjsGlobal[X].prototype,J=D(ae,"byteOffset");if(!J){var Se=x(ae);J=D(Se,"byteOffset")}if(J&&J.get)E[X]=_(J.get);else if(u){var be=new wt.commonjsGlobal[X](2);J=D(be,"byteOffset"),J&&J.configurable&&u(be,"length",{value:3}),be.length===2&&(E[X]=U)}}})}var M=function(ae){var J;return y(E,function(Se){if(typeof J!="number")try{var be=Se(ae);typeof be=="number"&&(J=be)}catch{}}),J},Y=eu();return Bd=function(ae){return Y(ae)?M(ae):!1},Bd}var zd,Q_;function Kx(){if(Q_)return zd;Q_=1;var y=ha(),_=Kd(),x=No(),k=eu(),E=mx(),D=Xx()(),u={__proto__:null},U=Object.defineProperty;if(x){var M=function(X){return X.length};_(E,function(X){var ae=wt.commonjsGlobal[X];if(typeof ae=="function"||typeof ae=="object"){var J=ae.prototype,Se=x(J,"length");if(!Se){var be=D(J);Se=x(be,"length")}if(Se&&Se.get)u["$"+X]=y(Se.get);else if(U){var De=new wt.commonjsGlobal[X](2);Se=x(De,"length"),Se&&Se.configurable&&U(De,"length",{value:3}),De.length===2&&(u["$"+X]=M)}}})}var Y=function(ae){var J;return _(u,function(Se){if(typeof J!="number")try{var be=Se(ae);typeof be=="number"&&(J=be)}catch{}}),J};return zd=function(ae){return k(ae)?Y(ae):!1},zd}var Dd,ex;function fm(){if(ex)return Dd;ex=1;var y=At(),_=Ys(),x=Gx(),k=cm(),E=$x(),D=nl(),u=hm(),U=Kx();return Dd=function(Y){if(!E(Y))throw new y("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var X=Y["[[Object]]"],ae=Y["[[CachedBufferByteLength]]"];if(_(D(X))&&ae!=="DETACHED")throw new y("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if(ae==="DETACHED")return!0;var J=u(X),Se=x(D(X)),be,De=Se?U(X):"AUTO";if(De==="AUTO")be=ae;else{var Ze=k(X);be=J+De*Ze}return J>ae||be>ae},Dd}var Rd,tx;function Pw(){if(tx)return Rd;tx=1;var y=At(),_=lm(),x=Gx(),k=fm(),E=cm(),D=$x(),u=nl(),U=hm(),M=Kx();return Rd=function(X){if(!D(X))throw new y("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");if(k(X))throw new y("Assertion failed: `taRecord` is out of bounds");var ae=X["[[Object]]"],J=x(u(ae)),Se=J?M(ae):"AUTO";if(Se!=="AUTO")return Se;if(J)throw new y("Assertion failed: array buffer is not fixed length");var be=U(ae),De=E(ae),Ze=X["[[CachedBufferByteLength]]"];if(Ze==="DETACHED")throw new y("Assertion failed: typed array is detached");return _((Ze-be)/De)},Rd}var Ld,rx;function Cw(){if(rx)return Ld;rx=1;var y=At(),_=Ys(),x=Js(),k=il(),E=Sx(),D=pr(),u=D("SharedArrayBuffer.prototype.byteLength",!0);return Ld=function(M,Y){var X=k(M);if(!x(M)&&!X)throw new y("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(Y!=="SEQ-CST"&&Y!=="UNORDERED")throw new y("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(_(M))throw new y("Assertion failed: `arrayBuffer` must not be detached");return X?u(M):E(M)},Ld}var Fd,ix;function kw(){if(ix)return Fd;ix=1;var y=At(),_=Cw(),x=Ys(),k=eu(),E=nl();return Fd=function(u,U){if(!k(u))throw new y("Assertion failed: `obj` must be a Typed Array");if(U!=="SEQ-CST"&&U!=="UNORDERED")throw new y("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var M=E(u),Y=x(M)?"DETACHED":_(M,U);return{"[[Object]]":u,"[[CachedBufferByteLength]]":Y}},Fd}var Od,nx;function Jx(){if(nx)return Od;nx=1;var y=At(),_=fa(),x=fm(),k=kw(),E=eu();return Od=function(u,U){if(U!=="SEQ-CST"&&U!=="UNORDERED")throw new y("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(!_(u))throw new y("Assertion failed: `O` must be an Object");if(!E(u))throw new y("Assertion failed: `O` must be a Typed Array");var M=k(u,U);if(x(M))throw new y("`O` must be in-bounds and backed by a non-detached buffer");return M},Od}var Vd,ox;function Mw(){if(ox)return Vd;ox=1;var y=Nn(),_=At(),x=um(),k=jx(),E=fm(),D=Pw(),u=Jx(),U=el()();return Vd=function(Y,X){if(!k(Y))throw new _("Assertion failed: `constructor` must be a constructor");if(!x(X))throw new _("Assertion failed: `argumentList` must be a List");if(U.length===0)throw new y("Assertion failed: Typed Arrays are not supported in this environment");var ae;X.length===0?ae=new Y:X.length===1?ae=new Y(X[0]):X.length===2?ae=new Y(X[0],X[1]):ae=new Y(X[0],X[1],X[2]);var J=u(ae,"SEQ-CST");if(X.length===1&&typeof X[0]=="number"){if(E(J))throw new _("new Typed Array is out of bounds");var Se=D(J);if(Se<X[0])throw new _("`argumentList[0]` must be <= `newTypedArray.length`")}return ae},Vd}var qd,ax;function Bw(){if(ax)return qd;ax=1;var y=Er(),_={__proto__:null,$Int8Array:y("%Int8Array%",!0),$Uint8Array:y("%Uint8Array%",!0),$Uint8ClampedArray:y("%Uint8ClampedArray%",!0),$Int16Array:y("%Int16Array%",!0),$Uint16Array:y("%Uint16Array%",!0),$Int32Array:y("%Int32Array%",!0),$Uint32Array:y("%Uint32Array%",!0),$BigInt64Array:y("%BigInt64Array%",!0),$BigUint64Array:y("%BigUint64Array%",!0),$Float16Array:y("%Float16Array%",!0),$Float32Array:y("%Float32Array%",!0),$Float64Array:y("%Float64Array%",!0)};return qd=function(k){return _["$"+k]},qd}var Ud,sx;function zw(){if(sx)return Ud;sx=1;var y=Nn(),_=At(),x=Ks(),k=el()(),E=um(),D=ow(),u=Mw(),U=Bw();return Ud=function(Y,X){if(k.length===0)throw new y("Assertion failed: Typed Arrays are not supported in this environment");var ae=x(Y);if(!ae)throw new _("Assertion failed: exemplar must be a TypedArray");if(!E(X))throw new _("Assertion failed: `argumentList` must be a List");var J=U(ae);if(typeof J!="function")throw new y("Assertion failed: `constructor` of `exemplar` ("+ae+") must exist. Please report this!");var Se=D(Y,J);return u(Se,X)},Ud}var Nd,ux;function Yx(){if(ux)return Nd;ux=1;var y=At(),_=a1(),x=m1(),k=Ys(),E=Qd(),D=em(),u=y1(),U=W1(),M=H1(),Y=X1(),X=cm(),ae=K1(),J=zw(),Se=Jx(),be=nl(),De=hm();return Nd=function(He,Ue){var fe=this;Se(fe,"SEQ-CST");var Ke=fe.length,Ne=M(He),It;Ne===-1/0?It=0:Ne<0?It=E(Ke+Ne,0):It=D(Ne,Ke);var we=typeof Ue>"u"?Ke:M(Ue),je;we===-1/0?je=0:we<0?je=E(Ke+we,0):je=D(we,Ke);var Le=E(je-It,0),tt=J(fe,[Le]);if(Le>0){if(k(be(fe)))throw new y("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");var Mt=ae(fe),Wt=ae(tt);if(Mt===Wt)for(var St=be(fe),Ut=be(tt),Hr=X(fe),Pr=De(fe),bi=It*Hr+Pr,or=De(tt),Rr=or+Le*Hr;or<Rr;){var et=x(St,bi,"UINT8",!0,"UNORDERED");U(Ut,or,"UINT8",et,!0,"UNORDERED"),bi+=1,or+=1}else for(var Lr=0;It<je;){var Xr=Y(It),Et=_(fe,Xr);u(tt,Y(Lr),Et,!0),It+=1,Lr+=1}}return tt},Nd}var jd,lx;function Qx(){if(lx)return jd;lx=1;var y=Yx();return jd=function(){return typeof Uint8Array=="function"&&Uint8Array.prototype.slice||y},jd}var Gd,cx;function Dw(){if(cx)return Gd;cx=1;var y=am(),_=Ja(),x=Qx();return Gd=function(){if(typeof Uint8Array=="function"){var E=x(),D=_(Uint8Array.prototype);y(D,{slice:E},{slice:function(){return D.slice!==E}})}return E},Gd}var $d,px;function Rw(){if(px)return $d;px=1;var y=am(),_=ha(),x=Yx(),k=Qx(),E=Dw(),D=_(k());return y(D,{getPolyfill:k,implementation:x,shim:E}),$d=D,$d}var Zd,hx;function Lw(){if(hx)return Zd;hx=1;var y=Ks(),_=Rw(),x=No();function k(we){return Object.prototype.toString.call(we)}function E(we){return k(we)==="[object Date]"}function D(we){return k(we)==="[object RegExp]"}function u(we){return k(we)==="[object Error]"}function U(we){return k(we)==="[object Boolean]"}function M(we){return k(we)==="[object Number]"}function Y(we){return k(we)==="[object String]"}var X=Array.isArray||function(je){return Object.prototype.toString.call(je)==="[object Array]"};function ae(we,je){if(we.forEach)return we.forEach(je);for(var Le=0;Le<we.length;Le++)je(we[Le],Le,we)}var J=Object.keys||function(je){var Le=[];for(var tt in je)Le[Le.length]=tt;return Le},Se=Object.prototype.propertyIsEnumerable,be=Object.getOwnPropertySymbols;function De(we){var je=J(we);if(be)for(var Le=be(we),tt=0;tt<Le.length;tt++)Se.call(we,Le[tt])&&(je[je.length]=Le[tt]);return je}var Ze=Object.prototype.hasOwnProperty||function(we,je){return je in we};function He(we,je){if(typeof x!="function")return!0;var Le=x(we,je);return!Le||!Le.writable}function Ue(we,je){if(typeof we=="object"&&we!==null){var Le;if(X(we))Le=[];else if(E(we))Le=new Date(we.getTime?we.getTime():we);else if(D(we))Le=new RegExp(we);else if(u(we))Le={message:we.message};else if(U(we)||M(we)||Y(we))Le=Object(we);else{var tt=y(we);if(tt)return _(we);if(Object.create&&Object.getPrototypeOf)Le=Object.create(Object.getPrototypeOf(we));else if(we.constructor===Object)Le={};else{var Mt=we.constructor&&we.constructor.prototype||we.__proto__||{},Wt=function(){};Wt.prototype=Mt,Le=new Wt}}var St=je.includeSymbols?De:J;return ae(St(we),function(Ut){Le[Ut]=we[Ut]}),Le}return we}var fe={__proto__:null};function Ke(we,je){var Le=[],tt=[],Mt=!0,Wt=arguments.length>2?arguments[2]:fe,St=Wt.includeSymbols?De:J,Ut=!!Wt.immutable;return(function Hr(Pr){var bi=Ut?Ue(Pr,Wt):Pr,or={__proto__:null},Rr=!0,et={node:bi,node_:Pr,path:[].concat(Le),parent:tt[tt.length-1],parents:tt,key:Le[Le.length-1],removedKeys:{__proto__:null},isRoot:Le.length===0,level:Le.length,circular:null,update:function(Et,Fr){et.isRoot||(et.parent.node[et.key]=Et),et.node=Et,Fr&&(Rr=!1)},delete:function(Et){delete et.parent.node[et.key],et.parent.removedKeys[et.key]=!0,Et&&(Rr=!1)},remove:function(Et){X(et.parent.node)?(et.parent.node.splice(et.key,1),et.parent.removedKeys[et.key]=!0,Et&&(Rr=!1)):et.delete(Et)},keys:null,before:function(Et){or.before=Et},after:function(Et){or.after=Et},pre:function(Et){or.pre=Et},post:function(Et){or.post=Et},stop:function(){Mt=!1},block:function(){Rr=!1}};if(!Mt)return et;function Lr(){if(typeof et.node=="object"&&et.node!==null){(!et.keys||et.node_!==et.node)&&(et.keys=St(et.node)),et.isLeaf=et.keys.length===0;for(var Et=0;Et<tt.length;Et++)if(tt[Et].node_===Pr){et.circular=tt[Et];break}}else et.isLeaf=!0,et.keys=null;et.notLeaf=!et.isLeaf,et.notRoot=!et.isRoot}Lr();var Xr=je.call(et,et.node);return Xr!==void 0&&et.update&&et.update(Xr),or.before&&or.before.call(et,et.node),Rr&&(typeof et.node=="object"&&et.node!==null&&!et.circular&&(tt[tt.length]=et,Lr(),ae(et.keys,function(Et,Fr){var Mi=Fr-1 in et.removedKeys;Mi&&(Et=et.keys[Fr-1]),Le[Le.length]=Et,or.pre&&or.pre.call(et,et.node[Et],Et);var pi=Hr(et.node[Et]);Ut&&Ze.call(et.node,Et)&&!He(et.node,Et)&&!Mi&&(et.node[Et]=pi.node),pi.isLast=Fr===et.keys.length-1,pi.isFirst=Fr===0,or.post&&or.post.call(et,pi),Le.pop()}),tt.pop()),or.after&&or.after.call(et,et.node)),et})(we).node}function Ne(we){this.options=arguments.length>1?arguments[1]:fe,this.value=we}Ne.prototype.get=function(we){for(var je=this.value,Le=0;je&&Le<we.length;Le++){var tt=we[Le];if(!Ze.call(je,tt)||!this.options.includeSymbols&&typeof tt=="symbol")return;je=je[tt]}return je},Ne.prototype.has=function(we){var je=this.value;if(!je&&we.length>0)return!1;for(var Le=0;je&&Le<we.length;Le++){var tt=we[Le];if(!Ze.call(je,tt)||!this.options.includeSymbols&&typeof tt=="symbol")return!1;je=je[tt]}return!0},Ne.prototype.set=function(we,je){for(var Le=this.value,tt=0;tt<we.length-1;tt++){var Mt=we[tt];Ze.call(Le,Mt)||(Le[Mt]={}),Le=Le[Mt]}return Le[we[tt]]=je,je},Ne.prototype.map=function(we){return Ke(this.value,we,{__proto__:null,immutable:!0,includeSymbols:!!this.options.includeSymbols})},Ne.prototype.forEach=function(we){return this.value=Ke(this.value,we,this.options),this.value},Ne.prototype.reduce=function(we,je){var Le=arguments.length===1,tt=Le?this.value:je;return this.forEach(function(Mt){(!this.isRoot||!Le)&&(tt=we.call(this,tt,Mt))}),tt},Ne.prototype.paths=function(){var we=[];return this.forEach(function(){we[we.length]=this.path}),we},Ne.prototype.nodes=function(){var we=[];return this.forEach(function(){we[we.length]=this.node}),we},Ne.prototype.clone=function(){var we=[],je=[],Le=this.options;return y(this.value)?_(this.value):(function tt(Mt){for(var Wt=0;Wt<we.length;Wt++)if(we[Wt]===Mt)return je[Wt];if(typeof Mt=="object"&&Mt!==null){var St=Ue(Mt,Le);we[we.length]=Mt,je[je.length]=St;var Ut=Le.includeSymbols?De:J;return ae(Ut(Mt),function(Hr){St[Hr]=tt(Mt[Hr])}),we.pop(),je.pop(),St}return Mt})(this.value)};function It(we){var je=arguments.length>1?arguments[1]:fe;return new Ne(we,je)}return ae(De(Ne.prototype),function(we){It[we]=function(je){var Le=[].slice.call(arguments,1),tt=new Ne(je);return tt[we].apply(tt,Le)}}),Zd=It,Zd}var Wd,fx;function Fw(){if(fx)return Wd;fx=1,Wd=y;function y(_){if(!(this instanceof y))return new y(_);this._bbox=_||[1/0,1/0,-1/0,-1/0],this._valid=!!_}return y.prototype.include=function(_){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],_[0]),this._bbox[1]=Math.min(this._bbox[1],_[1]),this._bbox[2]=Math.max(this._bbox[2],_[0]),this._bbox[3]=Math.max(this._bbox[3],_[1]),this},y.prototype.equals=function(_){var x;return _ instanceof y?x=_.bbox():x=_,this._bbox[0]==x[0]&&this._bbox[1]==x[1]&&this._bbox[2]==x[2]&&this._bbox[3]==x[3]},y.prototype.center=function(_){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},y.prototype.union=function(_){this._valid=!0;var x;return _ instanceof y?x=_.bbox():x=_,this._bbox[0]=Math.min(this._bbox[0],x[0]),this._bbox[1]=Math.min(this._bbox[1],x[1]),this._bbox[2]=Math.max(this._bbox[2],x[2]),this._bbox[3]=Math.max(this._bbox[3],x[3]),this},y.prototype.bbox=function(){return this._valid?this._bbox:null},y.prototype.contains=function(_){if(!_)return this._fastContains();if(!this._valid)return null;var x=_[0],k=_[1];return this._bbox[0]<=x&&this._bbox[1]<=k&&this._bbox[2]>=x&&this._bbox[3]>=k},y.prototype.intersect=function(_){if(!this._valid)return null;var x;return _ instanceof y?x=_.bbox():x=_,!(this._bbox[0]>x[2]||this._bbox[2]<x[0]||this._bbox[3]<x[1]||this._bbox[1]>x[3])},y.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var _="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",_)},y.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null},Wd}var dx;function Ow(){if(dx)return Yu.exports;dx=1;var y=U0(),_=Lw(),x=Fw(),k={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},E=Object.keys(k);Yu.exports=function(u){return D(u).bbox()},Yu.exports.polygon=function(u){return D(u).polygon()},Yu.exports.bboxify=function(u){return _(u).map(function(U){if(U){var M=E.some(function(Y){return U[Y]?k[Y].indexOf(U.type)!==-1:!1});M&&(U.bbox=D(U).bbox(),this.update(U))}})};function D(u){for(var U=x(),M=y(u),Y=0;Y<M.length;Y++)U.include(M[Y]);return U}return Yu.exports}var Vw=Ow();const qw=wt.getDefaultExportFromCjs(Vw),Uw={methods:{getIconDetails(y){const _={};switch(y){case"cities":_.name="fa-regular fa-city";break;case"towns":_.name="fa-regular fa-house-chimney-window";break;case"islands":_.name="fa-regular fa-ship";break;case"regions":_.name="fa-regular fa-map-location-dot";break;case"national-parks":_.name="fa-kit fa-vs-icon-national-park";break;case"acco":_.name="fa-regular fa-bed";break;case"acti":_.name="fa-regular fa-person-walking";break;case"attr":_.name="fa-regular fa-camera";break;case"even":_.name="fa-regular fa-ticket";break;case"cate":_.name="fa-regular fa-utensils";break;case"reta":_.name="fa-regular fa-bag-shopping";break;case"featured":_.name="fa-solid fa-star";break;case"twnv":_.name="";break;case"vics":_.name="fa-kit fa-vs-icentre-information";break;case"outlander-castle":_.name="fa-regular fa-chess-rook";break;case"outlander-church-abbey":_.name="fa-regular fa-church";break;case"outlander-city-town-village":_.name="fa-regular fa-city";break;case"outlander-heritage":_.name="fa-regular fa-landmark";break;case"outlander-landscape-park":_.name="fa-regular fa-mountain";break;case"outlander-palace-house":_.name="fa-regular fa-crown";break;case"distilleries":_.name="fa-kit fa-vs-distillery";break;case"itinerary-stop":_.name="";break}return _}}},Nw={name:"VsMapMarkerIcon",status:"prototype",release:"0.0.1",components:{VsIcon:wt.VsIcon},mixins:[Uw],props:{id:{type:String,required:!0},isHovered:{type:Boolean,default:!1},number:{type:String,default:""},isMapMarker:{type:Boolean,default:!1}},computed:{mapMarkerType(){let y="fa-solid fa-location-pin";return this.id==="twnv"&&(y="fa-solid fa-location-dot"),y},parentClasses(){return this.isMapMarker?"vs-map-marker-icon--map-marker":""},markerClasses(){return[`vs-map-marker-icon__marker--${this.id}`,this.isHovered?"vs-map-marker-icon__marker--outline":""]}}},jw={key:0,class:"vs-map-marker-icon__count"};function Gw(y,_,x,k,E,D){const u=q.resolveComponent("VsIcon");return q.openBlock(),q.createElementBlock("div",{"data-test":"vs-map-marker-icon",class:q.normalizeClass(["vs-map-marker-icon",D.parentClasses])},[q.createVNode(u,{icon:D.mapMarkerType,class:q.normalizeClass(["vs-map-marker-icon__marker",D.markerClasses]),size:"xl"},null,8,["icon","class"]),x.number?(q.openBlock(),q.createElementBlock("span",jw,[_[0]||(_[0]=q.createElementVNode("span",{class:"visually-hidden"}," Stop ",-1)),q.createTextVNode(" "+q.toDisplayString(x.number),1)])):(q.openBlock(),q.createBlock(u,{key:1,class:"vs-map-marker-icon__icon",icon:y.getIconDetails(x.id).name,size:"xs"},null,8,["icon"]))],2)}const Ec=wt._export_sfc(Nw,[["render",Gw]]);let Za=null;const $w={name:"VsMapMarker",status:"prototype",release:"0.0.1",components:{VsMapMarkerIcon:Ec},props:{feature:{type:Object,required:!0},mapId:{type:String,required:!0},hasPopups:{type:Boolean,required:!0},selectedPlace:{type:String,default:null}},emits:["showDetail","setCategory"],setup(){Za=Sn()},computed:{isActive(){return!!(this.activePlace&&this.activePlace.properties&&this.activePlace.properties.id===this.feature.properties.id||this.highlightedPlace&&this.highlightedPlace.properties&&this.highlightedPlace.properties.id===this.feature.properties.id)},...pa.mapState(Sn,{highlightedPlace(y){return y.getHoveredStop(this.mapId)},activePlace(y){return y.getActivePlace(this.mapId)?y.getActivePlace(this.mapId):""},activeSubcat(y){return y.selectedSubCategory}}),getMarkerIcon(){let y;return this.feature.properties.type!==""?y=this.feature.properties.type:this.activeSubcat!==null?y=this.activeSubcat:y="featured",y==="null"&&(y=""),y}},watch:{isActive(){return this.activePlace&&this.activePlace.properties.id===this.feature.properties.id||this.highlightedPlace&&this.highlightedPlace.properties.id===this.feature.properties.id?!0:(this.activePlace&&this.activePlace.properties.id===this.feature.properties.id&&Za.setActiveMarkerPos(this.feature.geometry.coordinates),!1)},activePlace(){this.activePlace&&this.activePlace.properties.id===this.feature.properties.id&&Za.setActiveMarkerPos(this.feature.geometry.coordinates)}},mounted(){this.hasPopups&&document.body.addEventListener("click",this.handleClickEvent)},beforeUnmount(){document.body.removeEventListener("click",this.handleClickEvent)},methods:{markerClick(){Za.setActiveMarkerPos(this.feature.geometry.coordinates),Za.setActivePlace({mapId:this.mapId,activeFeature:this.feature}),this.$emit("showDetail",this.feature),this.$emit("setCategory",this.feature.properties.type)},handleHover(y){Za.setHoveredPlace({mapId:this.mapId,hoveredFeature:y})},handleClickEvent(y){const _=document.getElementsByClassName("mapboxgl-canvas");y.target===_[0]&&Za.setActivePlace({mapId:this.mapId,activeFeature:null})}}},Zw=["aria-label"];function Ww(y,_,x,k,E,D){const u=q.resolveComponent("VsMapMarkerIcon");return q.openBlock(),q.createElementBlock("button",{type:"button",class:q.normalizeClass(["vs-map-marker",D.isActive?"vs-map-marker--active":""]),"data-test":"vs-map-marker",onClick:_[0]||(_[0]=(...U)=>D.markerClick&&D.markerClick(...U)),onKeydown:_[1]||(_[1]=q.withKeys((...U)=>D.markerClick&&D.markerClick(...U),["enter"])),onMouseover:_[2]||(_[2]=U=>D.handleHover(x.feature)),onMouseleave:_[3]||(_[3]=U=>D.handleHover("")),onFocusin:_[4]||(_[4]=U=>D.handleHover(x.feature)),onFocusout:_[5]||(_[5]=U=>D.handleHover("")),"aria-label":D.getMarkerIcon},[q.createVNode(u,{id:D.getMarkerIcon,"is-map-marker":!0,number:x.feature.properties.stopCount?x.feature.properties.stopCount:""},null,8,["id","number"])],42,Zw)}const eb=wt._export_sfc($w,[["render",Ww]]);let Hs=null;const Hw={name:"VsMap",status:"deprecated",release:"0.0.1",components:{VsWarning:wt.VsWarning,VsLoading:wt.VsLoading},props:{overviewMapLatitude:{type:String,default:"57.81"},overviewMapLongitude:{type:String,default:"-5.51748"},overviewMapZoom:{type:String,default:"5"},mapId:{type:String,required:!0},isVisible:{type:Boolean,required:!0},places:{type:Array,required:!0},filters:{type:Array,default(){return[]}},fitToMarkers:{type:Boolean,default:!1},showPolygons:{type:Boolean,default:!1},selectedItem:{type:Object,default:null},boundsData:{type:Object,default:()=>{}},showInfoMessage:{type:Boolean,default:null},resetZoom:{type:Boolean,default:!1},showMarkerPopups:{type:Boolean,default:!0},loadBrandingImmediately:{type:Boolean,default:!1}},emits:["map-ready","setCategory","showDetail","zoom-reset"],setup(){Hs=Sn()},data(){return{isDesktop:!1,geojsonData:{type:"FeatureCollection",features:[]},polygons:{type:"FeatureCollection",features:[]},multiPolygons:[],mapbox:{map:null,bounds:null,rotation:0,config:{container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",pitchWithRotate:!1,dragRotate:!1}},markers:[],popup:null,hoveredStateId:null,activeStateId:null,showMapMessage:!0,isLoading:!0,showZoomMessage:null}},computed:{getZoom(){return this.mapbox.map?this.mapbox.map.getZoom():null},...pa.mapState(Sn,{activeMarkerPostion(y){return this.mapbox.map?y.activeMarkerPos:null},highlightedPlace(y){return this.mapbox.map?y.getHoveredStop(this.mapId):null},activePlace(y){return this.mapbox.map?y.getActivePlace(this.mapId):null}})},watch:{isVisible(y){y&&this.mapbox.map!==null&&setTimeout(()=>{this.mapbox.map.resize()},20)},places:{handler(){this.geojsonData.features=[],this.initialiseMapFeatures(),this.initialiseMapMarkers()},deep:!0},showPolygons(y){y===!0?this.showMapPolygons():this.hideMapPolygons()},highlightedPlace(y){y&&(y.length===0?this.removeHoveredPolygon():y.geometry.type!=="Point"&&this.addHoveredPolygon(y))},selectedItem(y){if(y&&y.geometry.type!=="Point"){let _=[];_=this.polygons.features.filter(x=>x.properties.id===y.properties.id),_.length>0&&this.addActivePolygon(y)}y||this.removeActivePolygon()},activeMarkerPostion(y){this.checkPointIsVisible(y)||this.centreMapOnPoint(y)},showInfoMessage(y){y?this.showMapMessage=!0:this.showMapMessage=!1},resetZoom(y){y&&(this.mapbox.map.fitBounds(this.calculateBoundingBox()),this.$emit("zoom-reset"),this.showInfoMessage&&(this.showMapMessage=!0))}},mounted(){Hs.addMapInstance({id:this.mapId,filters:this.filters,places:this.places,activePins:this.places}),this.lazyloadMapComponent(),this.isTablet=window.innerWidth>=768,window.addEventListener("resize",this.onResize),this.loadBrandingImmediately?Dy.init({div:this.mapId}):window.addEventListener("DOMContentLoaded",()=>{Dy.init({div:this.mapId})})},methods:{addMap(){const y=this.calculateBoundingBox();this.mapbox.config.container=this.$refs.mapbox,this.mapbox.map=new fo.Map({container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",bounds:y,maxZoom:18,minZoom:4,trackResize:!0}),this.mapbox.map.scrollZoom.disable(),this.mapbox.map.on("rotate",()=>{this.mapbox.rotation=this.mapbox.map.transform.angle}),this.mapbox.map.resize(),this.mapbox.map.on("load",()=>{this.addMapPolygons(),this.showMapMessage=!1,this.isLoading=!1,this.$emit("map-ready",!0),this.mapbox.map.boxZoom.enable()}),this.mapbox.map.on("zoomend",()=>{this.mapbox.map.getZoom()===4?(this.showZoomMessage="too-far",this.showMapMessage=!0):this.mapbox.map.getZoom()===18?(this.showZoomMessage="too-close",this.showMapMessage=!0):this.showInfoMessage||(this.showZoomMessage=null,this.showMapMessage=!1)})},addMapControls(){const y=new fo.NavigationControl;this.mapbox.map.addControl(y,"top-right"),this.mapbox.map.addControl(new fo.FullscreenControl)},initialiseMapFeatures(){this.places.map(y=>{if(typeof y.geometry<"u"){const _=this.getCoordinateArray(y);return this.getMapFeatures(y,_)}return y.latitude&&y.longitude?this.getItineraryMapFeatures(y):!1})},getCoordinateArray(y){return y.geometry.type==="Polygon"?[y.geometry.coordinates[0]]:y.geometry.type==="MultiPolygon"?[y.geometry.coordinates]:[y.geometry.coordinates[0],y.geometry.coordinates[1]]},getMapFeatures(y,_){return this.geojsonData.features.push({type:"Feature",geometry:{type:y.geometry.type,coordinates:_},properties:{title:y.properties.title,imageSrc:y.image,type:typeof y.properties.category<"u"?y.properties.category.id:"",id:y.properties.id},id:y.properties.id})},getItineraryMapFeatures(y){const _=this._uid;return this.geojsonData.features.push({type:"Feature",geometry:{type:"Point",coordinates:[parseFloat(y.longitude),parseFloat(y.latitude)]},properties:{title:y.title,imageSrc:y.imageSrc,type:"itinerary-stop",stopCount:y.stopCount,id:_},id:_})},initialiseMapMarkers(){let y=0;this.initialLoad&&(y=1e3),setTimeout(()=>{if(this.markers!==null){for(let _=this.markers.length-1;_>=0;_--)this.markers[_].remove();this.markers=[]}this.geojsonData.features.forEach(_=>{_.geometry.type==="Point"&&this.createMapMarker(_)})},y)},createMapMarker(y){const _=q.h(eb,{feature:y,mapId:this.mapId,hasPopups:this.showMarkerPopups,onShowDetail:E=>{this.$emit("showDetail",E)},onSetCategory:E=>{this.$emit("setCategory",E)}}),x=document.createElement("div");this.$refs.mapboxOuter.appendChild(x),q.render(_,x),y&&this.showMarkerPopups&&this.addMapPopup(y);const k=new fo.Marker(x.children[0]).setLngLat(y.geometry.coordinates).setPopup(this.popup).addTo(this.mapbox.map);this.setupMarkerListeners(k),this.markers.push(k),x.remove()},hideMapPolygons(){this.mapbox.map.setLayoutProperty("regionFills","visibility","none"),this.mapbox.map.setLayoutProperty("regionBorders","visibility","none")},showMapPolygons(){this.mapbox.map.setLayoutProperty("regionFills","visibility","visible"),this.mapbox.map.setLayoutProperty("regionBorders","visibility","visible")},addMapPolygons(){this.geojsonData.features.forEach(y=>{y.geometry.type==="Polygon"?this.polygons.features.includes(y.properties.id)||this.polygons.features.push(y):y.geometry.type==="MultiPolygon"&&(this.polygons.features.includes(y.properties.id)||this.multiPolygons.push(y))}),this.multiPolygons.forEach(y=>{const _=y.properties;y.geometry.coordinates[0].forEach(x=>{this.polygons.features.push({geometry:{type:"Polygon",coordinates:x},id:_.id,properties:{id:_.id,imageSrc:_.imageSrc,title:_.title,type:_.type},type:"Feature"})})}),this.polygons.features.length>0&&(this.mapbox.map.addSource("regions",{type:"geojson",data:this.polygons,promoteId:"id"}),this.mapbox.map.addLayer({id:"regionFills",type:"fill",source:"regions",layout:{},paint:{"fill-color":["case",["==",["feature-state","interaction-state"],"hover"],"rgba(168,48,140,0.5)",["==",["feature-state","interaction-state"],"active"],"rgba(168,48,140,0.5)","rgba(25,200,197,0.6)"],"fill-opacity":.8}}),this.mapbox.map.addLayer({id:"regionBorders",type:"line",source:"regions",layout:{},paint:{"line-color":"#fff","line-width":1}}),this.hideMapPolygons(),this.mapbox.map.on("mousemove","regionFills",y=>{y.features.length>0&&(this.addMapPopup(y),this.removeHoveredPolygon(),this.addHoveredPolygon(y.features[0]))}),this.mapbox.map.on("mouseleave","regionFills",y=>{this.removeMapPopup(y),this.removeHoveredPolygon()}),this.mapbox.map.on("click","regionFills",y=>{this.removeActivePolygon(),this.addActivePolygon(y.features[0]),this.addMapPopup(y.features[0])}))},removeActivePolygon(){this.mapbox.map.style._layers.regionFills&&(this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":""}),this.activeStateId=null)},addActivePolygon(y){this.activeStateId=y.properties.id,this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":"active"}),Hs.setActivePlace({mapId:this.mapId,activeFeature:y}),this.$emit("showDetail",y),this.$emit("setCategory","regions")},removeHoveredPolygon(){if(this.hoveredStateId){let y="";this.hoveredStateId===this.activeStateId&&(y="active"),this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":y})}Hs.setHoveredPlace({mapId:this.mapId,hoveredFeature:""}),this.hoveredStateId=null},addHoveredPolygon(y){this.hoveredStateId=y.properties.id,this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":"hover"}),this.addMapPopup(y),Hs.setHoveredPlace({mapId:this.mapId,hoveredFeature:y})},addMapPopup(y){let _="";y.features?_=y.features[0]:_=y;const x=this.getCoordinates(_),k=this.getPopupHtml(_);_.properties.id&&(this.removeMapPopup(y),this.popup=new fo.Popup({closeButton:!1,offset:{top:[0,20],bottom:[0,-40],left:[30,-20],right:[-30,-20]}}).setLngLat(x).setHTML(k).addTo(this.mapbox.map))},removeMapPopup(y){this.popup&&(this.popup.remove(),this.popup=null),y._popup&&y._popup.remove()},getCoordinates(y){return y.geometry.type==="Polygon"?this.findFeatureCentre(y.geometry.coordinates):y.geometry.type==="MultiPolygon"?this.findFeatureCentre(y.geometry.coordinates[0]):y.geometry.coordinates},findFeatureCentre(y){const _=[],x=[];return y[0].forEach(k=>{_.push(k[1]),x.push(k[0])}),{lat:(Math.min(..._)+Math.max(..._))/2,lng:(Math.min(...x)+Math.max(...x))/2}},getPopupHtml(y){return y.properties.imageSrc&&y.properties.stopCount?`
501
501
  <img class="vs-map__popup-image" src="${y.properties.imageSrc}" />
502
502
  <div>
503
503
  <h4 class="vs-map__popup-subtitle">Stop ${y.properties.stopCount}</h4>
@@ -505,4 +505,4 @@ uniform `+R+" "+F+" u_"+O+`;
505
505
  </div>
506
506
  `:`
507
507
  <p class="vs-map__popup-title">${y.properties.title}</p>
508
- `},setupMarkerListeners(y){document.body.addEventListener("keyup",x=>{(x.key==="Escape"||x.key==="Tab")&&(this.removeMapPopup(y),this.showMarkerPopups&&Hs.setActivePlace({mapId:this.mapId,activeFeature:null}))}),y.getElement().addEventListener("keyup",x=>{x.key==="Enter"&&(y._popup.isOpen()||y._popup.addTo(this.mapbox.map))})},fitToBounds(){this.mapbox.map.fitBounds(qw(this.geojsonData),{padding:{top:100,bottom:100,left:100,right:100}})},initialiseMapComponent(){this.addMap(),this.addMapControls(),this.places.length&&this.initialiseMapFeatures(),this.geojsonData.features.length&&(this.initialiseMapMarkers(),this.fitToMarkers&&this.fitToBounds())},lazyloadMapComponent(){if(fo.supported({failIfMajorPerformanceCaveat:!0}),!("IntersectionObserver"in window)){this.initialiseMapComponent();return}this.observer=new IntersectionObserver(y=>{y[0].intersectionRatio>0&&(this.observer.unobserve(this.$el),this.initialiseMapComponent())}),this.observer.observe(this.$el)},onResize(){this.isTablet=window.innerWidth>=768},getBoundsFromPolygon(){const y=this.boundsData.coordinates[0];return y.reduce((_,x)=>_.extend(x),new fo.LngLatBounds(y[0],y[0]))},checkPointIsVisible(){return this.mapbox.map.getBounds().contains(this.activeMarkerPostion)},centreMapOnPoint(y){this.mapbox.map.flyTo({center:y})},calculateBoundingBox(){let y;if(typeof this.boundsData>"u"||this.boundsData.type==="undefined")y=[[-7.555827,54.608836],[-.778285,60.880894]];else if(this.boundsData.type==="bounds"){const _=new fo.LngLat(this.boundsData.coordinates[1][0],this.boundsData.coordinates[1][1]),x=new fo.LngLat(this.boundsData.coordinates[0][0],this.boundsData.coordinates[0][1]);y=new fo.LngLatBounds(_,x)}else this.boundsData.type==="Polygon"?y=this.getBoundsFromPolygon():y=[[-7.555827,54.608836],[-.778285,60.880894]];return y}}},Xw={class:"vs-map","data-test":"vs-map"},Kw={class:"vs-map__message-box"},Jw={class:"vs-map__message-text"},Yw={ref:"mapboxOuter",class:"vs-map__map-outer"},Qw=["id"];function e2(y,_,x,k,E,D){const u=q.resolveComponent("VsLoading"),U=q.resolveComponent("VsWarning");return q.openBlock(),q.createElementBlock("div",Xw,[E.showMapMessage?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.normalizeClass(["vs-map__message",E.showZoomMessage?"":"vs-map__message--with-overlay"]),"data-test":"vs-map__message"},[q.createElementVNode("div",Kw,[E.isLoading?(q.openBlock(),q.createBlock(u,{key:0,class:"vs-map__loading"})):q.createCommentVNode("",!0),q.createElementVNode("p",Jw,[E.isLoading?q.renderSlot(y.$slots,"map-loading-text",{key:0}):x.showInfoMessage?q.renderSlot(y.$slots,"info-message",{key:1}):E.showZoomMessage==="too-close"?q.renderSlot(y.$slots,"zoom-too-close",{key:2}):E.showZoomMessage==="too-far"?q.renderSlot(y.$slots,"zoom-too-far",{key:3}):q.createCommentVNode("",!0)])])],2)):q.createCommentVNode("",!0),q.createElementVNode("div",Yw,[q.createElementVNode("div",{id:x.mapId,class:"vs-map__map",ref:"mapbox"},null,8,Qw)],512),q.createVNode(U,{class:"vs-map__no-js"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"no-js")]),_:3})])}const tb=wt._export_sfc(Hw,[["render",e2]]),t2={name:"VsMapWithSidebarCategories",status:"prototype",release:"0.0.1",components:{VsMapMarkerIcon:Ec,VsIcon:wt.VsIcon},props:{categoryName:{type:String,required:!0},type:{type:String,required:!0},hasSubCat:{type:Boolean,default:!1}},data(){return{isHovered:!1}},methods:{selectCategory(y){this.hasSubCat?this.$parent.$emit("set-subcategory",y):(this.$parent.$emit("set-category",y),this.$parent.$emit("set-stage",1))}}},r2={class:"vs-main-map-category","data-test":"vs-main-map-category"};function i2(y,_,x,k,E,D){const u=q.resolveComponent("VsMapMarkerIcon"),U=q.resolveComponent("VsIcon");return q.openBlock(),q.createElementBlock("div",r2,[q.createElementVNode("button",{type:"button",class:q.normalizeClass(["vs-main-map-category__button",`vs-main-map-category__button--${x.type}`]),"data-test":"vs-main-map-category__button",onClick:_[0]||(_[0]=M=>D.selectCategory(x.type)),onMouseover:_[1]||(_[1]=M=>E.isHovered=!0),onMouseout:_[2]||(_[2]=M=>E.isHovered=!1),onFocusin:_[3]||(_[3]=M=>E.isHovered=!0),onFocusout:_[4]||(_[4]=M=>E.isHovered=!1)},[q.createElementVNode("div",null,[q.createVNode(u,{class:"vs-main-map-category__icon",id:x.type,"is-hovered":E.isHovered},null,8,["id","is-hovered"]),q.createTextVNode(" "+q.toDisplayString(x.categoryName),1)]),q.createVNode(U,{icon:"fa-regular fa-arrow-right",variant:"highlight",size:"xs",class:"vs-main-map-category__icon align-self-center me-0"})],34)])}const n2=wt._export_sfc(t2,[["render",i2]]);let xc=null;const o2={name:"VsMapWithSidebarSubCategories",status:"prototype",release:"0.0.1",components:{BFormGroup:wt.BFormGroup_default,BFormCheckboxGroup:wt.BFormCheckboxGroup_default,BFormCheckbox:wt.BFormCheckbox_default,VsMapMarkerIcon:Ec},props:{data:{type:Array,required:!0},selectedSubCategory:{type:String,required:!0}},data(){return{selected:[]}},computed:{activeSubcatFilters(){return xc?xc.activeSubcatFilters:null},...pa.mapState(Sn,{activeSubcatFilters(y){return y.activeSubcatFilters}})},mounted(){xc=Sn(),this.selected=this.activeSubcatFilters,this.emitter&&(this.emitter.on("clearSelectedSubcats",()=>{this.selected=[]}),this.emitter.on("submitCheckboxData",()=>{this.checkboxesChangeSubmit()}));const y=document.getElementsByClassName("vs-main-map-subcategory")[0];y&&y.querySelectorAll('input[type="checkbox"]')[0].focus()},beforeUnmount(){this.emitter&&this.emitter.off("submitCheckboxData")},methods:{checkboxesChangeSubmit(){xc.setActiveSubcatFilters(this.selected),this.$parent.$emit("subcategories-filtered",this.selected)},emitChange(){this.emitter&&this.emitter.emit("checkboxes-selected",this.selected)}}},a2={class:"vs-main-map-subcategory","data-test":"vs-main-map-subcategory"};function s2(y,_,x,k,E,D){const u=q.resolveComponent("VsMapMarkerIcon"),U=q.resolveComponent("BFormCheckbox"),M=q.resolveComponent("BFormCheckboxGroup"),Y=q.resolveComponent("BFormGroup");return q.openBlock(),q.createElementBlock("div",a2,[q.createVNode(Y,null,{default:q.withCtx(()=>[q.createVNode(M,{id:"checkbox-group-1",modelValue:E.selected,"onUpdate:modelValue":_[0]||(_[0]=X=>E.selected=X),name:x.data.name},{default:q.withCtx(()=>[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(x.data,X=>(q.openBlock(),q.createBlock(U,{key:X.id,value:X.id,onChange:D.emitChange},{default:q.withCtx(()=>[q.createVNode(u,{class:"vs-main-map-subcategory__icon",id:x.selectedSubCategory},null,8,["id"]),q.createTextVNode(" "+q.toDisplayString(X.name),1)]),_:2},1032,["value","onChange"]))),128))]),_:1},8,["modelValue","name"])]),_:1})])}const u2=wt._export_sfc(o2,[["render",s2]]);let Hd=null;const l2={name:"VsMapWithSidebarListItem",status:"prototype",release:"0.0.1",components:{VsImg:wt.VsImg,VsIcon:wt.VsIcon},inject:["mapId"],props:{itemData:{type:Object,required:!0},fromEndpoint:{type:Boolean,default:!1},focussed:{type:Boolean,default:!1}},data(){return{formattedData:{}}},computed:{isActive(){return!!(this.highlightedPlace&&this.formattedData&&this.highlightedPlace.properties.id===this.formattedData.properties.id)},...pa.mapState(Sn,{highlightedPlace(y){return y.getHoveredStop(this.mapId)}})},created(){this.fromEndpoint?this.formatApiData():this.formattedData=this.itemData},mounted(){Hd=Sn(),this.focussed&&this.$refs.btn.focus()},methods:{showItemDetail(y){Hd.setActivePlace({mapId:this.mapId,activeFeature:y}),this.$parent.$emit("show-item-detail",y),this.$parent.$emit("set-stage",2)},itemHover(y){Hd.setHoveredPlace({mapId:this.mapId,hoveredFeature:y})},formatApiData(){this.formattedData={geometry:{coordinates:[this.itemData.longitude,this.itemData.latitude],type:"Point"},properties:{category:this.itemData.category[0],description:this.itemData.description,id:this.itemData.id,image:typeof this.itemData.images<"u"?this.itemData.images[0].mediaUrl:"",title:this.itemData.name,link:{label:this.itemData.website.label,link:this.itemData.website.link,type:this.itemData.website.type}},type:"Point"}}}},c2={class:"vs-map-with-sidebar-list-item__img-container"},p2={class:"vs-map-with-sidebar-list-item__text"};function h2(y,_,x,k,E,D){const u=q.resolveComponent("VsImg"),U=q.resolveComponent("VsIcon");return q.openBlock(),q.createElementBlock("button",{type:"button",class:q.normalizeClass(["vs-map-with-sidebar-list-item",D.isActive?"vs-map-with-sidebar-list-item--hovered":""]),"data-test":"vs-map-with-sidebar-list-item",onClick:_[0]||(_[0]=M=>D.showItemDetail(E.formattedData)),onKeyup:_[1]||(_[1]=q.withKeys(M=>D.showItemDetail(E.formattedData),["enter"])),onMouseover:_[2]||(_[2]=M=>D.itemHover(E.formattedData)),onMouseleave:_[3]||(_[3]=M=>D.itemHover("")),onFocusin:_[4]||(_[4]=M=>D.itemHover(E.formattedData)),onFocusout:_[5]||(_[5]=M=>D.itemHover("")),ref:"btn"},[q.createElementVNode("div",c2,[typeof E.formattedData.properties.image<"u"?(q.openBlock(),q.createBlock(u,{key:0,src:E.formattedData.properties.image,class:"vs-map-with-sidebar-list-item__img"},null,8,["src"])):q.createCommentVNode("",!0)]),q.createElementVNode("span",p2,q.toDisplayString(E.formattedData.properties.title),1),q.createVNode(U,{icon:"fa-regular fa-arrow-right",variant:"highlight",size:"xxs",class:"vs-map-with-sidebar-list-item__icon"})],34)}const f2=wt._export_sfc(l2,[["render",h2]]),d2={name:"VsMapWithSidebarDetail",status:"prototype",release:"0.0.1",components:{VsImg:wt.VsImg,VsHeading:wt.VsHeading},props:{contentData:{type:Object,required:!0},headingLevel:{type:String,default:"3"}},computed:{showTitle(){return typeof this.contentData.properties.title<"u"||typeof this.contentData.properties.placeTitle<"u"}}},m2={class:"vs-map-with-sidebar-detail","data-test":"vs-map-with-sidebar-detail"},y2={key:2,"data-test":"vs-map-with-sidebar-detail__address",class:"vs-map-with-sidebar-detail__address"},v2={key:3,class:"mt-100"},g2=["innerHTML"];function _2(y,_,x,k,E,D){const u=q.resolveComponent("VsImg"),U=q.resolveComponent("VsHeading");return q.openBlock(),q.createElementBlock("div",m2,[typeof x.contentData.properties.image<"u"?(q.openBlock(),q.createBlock(u,{key:0,src:x.contentData.properties.image,class:"vs-map-with-sidebar-detail__image mb-125 mb-lg-075"},null,8,["src"])):q.createCommentVNode("",!0),D.showTitle?(q.openBlock(),q.createBlock(U,{key:1,level:x.headingLevel,"heading-style":"heading-xxs",class:"vs-map-with-sidebar-detail__heading mt-0","data-test":"vs-map-with-sidebar-detail__heading"},{default:q.withCtx(()=>[typeof x.contentData.properties.placeTitle<"u"?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[q.createTextVNode(q.toDisplayString(x.contentData.properties.placeTitle),1)],64)):(q.openBlock(),q.createElementBlock(q.Fragment,{key:1},[q.createTextVNode(q.toDisplayString(x.contentData.properties.title),1)],64))]),_:1},8,["level"])):q.createCommentVNode("",!0),typeof x.contentData.properties.address<"u"?(q.openBlock(),q.createElementBlock("p",y2,q.toDisplayString(x.contentData.properties.address.shortAddress),1)):q.createCommentVNode("",!0),x.contentData.properties.subtitle?(q.openBlock(),q.createElementBlock("p",v2,q.toDisplayString(x.contentData.properties.subtitle),1)):q.createCommentVNode("",!0),q.createElementVNode("div",{"data-test":"vs-map-with-sidebar-detail__description",class:"vs-map-with-sidebar-detail__description mb-150",innerHTML:x.contentData.properties.description},null,8,g2)])}const x2=wt._export_sfc(d2,[["render",_2]]),b2={name:"VsMapWithSidebarButtons",status:"prototype",release:"0.0.1",components:{VsButton:wt.VsButton},inject:["filtersAppliedText","clearFiltersText"],props:{contentData:{type:Object,required:!0},filterCount:{type:Number,default:null}},emits:["clear-filters"],computed:{websiteDataExists(){return typeof this.contentData.properties.website<"u"&&this.contentData.properties.website.link!==this.contentData.properties.link.link}},methods:{filtersClick(){this.$parent.$emit("set-stage",0)},clearFiltersClick(){this.$emit("clear-filters")}}};function w2(y,_,x,k,E,D){const u=q.resolveComponent("VsButton");return q.openBlock(),q.createElementBlock("div",{class:q.normalizeClass(["vs-map-with-sidebar-buttons",x.filterCount!==null?"vs-map-with-sidebar-buttons--filters":""]),"data-test":"vs-map-with-sidebar-buttons"},[x.filterCount!==null?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[q.createVNode(u,{class:"vs-map-with-sidebar-buttons__clear-filters","data-test":"vs-map-with-sidebar-buttons__clear-filters",variant:"secondary",size:"sm",onClick:D.clearFiltersClick},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.clearFiltersText),1)]),_:1},8,["onClick"]),q.createVNode(u,{class:"vs-map-with-sidebar-buttons__filters","data-test":"vs-map-with-sidebar-buttons__filters",variant:"secondary",icon:"vs-icon-control-filters",size:"sm",onClick:D.filtersClick},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(x.filterCount)+" "+q.toDisplayString(D.filtersAppliedText),1)]),_:1},8,["onClick"])],64)):(q.openBlock(),q.createElementBlock(q.Fragment,{key:1},[q.createVNode(u,{href:x.contentData.properties.link.link,"data-test":"vs-map-with-sidebar-buttons__discover",class:"mb-050"},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(x.contentData.properties.link.label),1)]),_:1},8,["href"]),D.websiteDataExists?(q.openBlock(),q.createBlock(u,{key:0,href:x.contentData.properties.website.link,target:"_blank",rel:"noopener noreferrer","data-test":"vs-map-with-sidebar-buttons__website",variant:"secondary"},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(x.contentData.properties.website.label),1)]),_:1},8,["href"])):q.createCommentVNode("",!0)],64))],2)}const S2=wt._export_sfc(b2,[["render",w2]]),I2={name:"VsMapWithSidebarControls",status:"prototype",release:"0.0.1",components:{VsButton:wt.VsButton},inject:["clearSelectionText","applyFiltersText"],data(){return{isDisabled:!0}},computed:{...pa.mapState(Sn,{getSubcatFilters(y){return y.activeSubcatFilters}})},mounted(){this.disableSubmitButton()},methods:{clearSelection(){this.emitter&&this.emitter.emit("clearSelectedSubcats"),this.isDisabled=!0},submitCheckboxes(){this.emitter&&this.emitter.emit("submitCheckboxData")},disableSubmitButton(){this.emitter&&this.emitter.on("checkboxes-selected",y=>{y.length>0?this.isDisabled=!1:this.isDisabled=!0}),this.getSubcatFilters.length>0&&(this.isDisabled=!1)}}},T2={class:"vs-main-map-controls","data-test":"vs-main-map-controls"};function A2(y,_,x,k,E,D){const u=q.resolveComponent("VsButton");return q.openBlock(),q.createElementBlock("div",T2,[q.createVNode(u,{class:"vs-main-map-controls__clear-selection","data-test":"vs-main-map-subcategory__clear-selection",size:"sm",variant:"secondary",onClick:D.clearSelection,onKeyup:q.withKeys(D.clearSelection,["enter"])},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.clearSelectionText),1)]),_:1},8,["onClick","onKeyup"]),q.createVNode(u,{class:"vs-main-map-controls__apply-filters","data-test":"vs-main-map-subcategory__apply-filters",size:"sm",onKeypress:q.withKeys(D.submitCheckboxes,["enter"]),onClick:D.submitCheckboxes,"aria-disabled":E.isDisabled,disabled:E.isDisabled},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.applyFiltersText),1)]),_:1},8,["onKeypress","onClick","aria-disabled","disabled"])])}const E2=wt._export_sfc(I2,[["render",A2]]);let Xd=null;const P2={name:"VsMapWithSidebarPanel",status:"prototype",release:"0.0.1",components:{VsButton:wt.VsButton,VsMapWithSidebarCategory:n2,VsMapWithSidebarSubcategory:u2,VsHeading:wt.VsHeading,VsMapWithSidebarListItem:f2,VsMapWithSidebarDetail:x2,VsMapWithSidebarButtons:S2,VsMapWithSidebarControls:E2},inject:["filters","filtersWithLocations","placesData","regions","mapId","focussedListItem"],props:{categoryHeading:{type:String,default:""},headingLevel:{type:String,default:"2"},selectedCategory:{type:String,default:""},selectedSubcategory:{type:String,default:null},currentStage:{type:Number,required:!0},selectedItem:{type:Object,default:null},hovered:{type:String,default:""},subcategoryLocations:{type:Array,default:null},currentEndpointData:{type:Array,default:()=>[]},panelStatus:{type:String,default:null},panelMessage:{type:String,default:null},totalPins:{type:Number,default:0},currentListItemFocus:{type:Number,default:0}},emits:["close-panel","load-more-places","set-stage","set-subcategory"],data(){return{placesLoaded:1}},computed:{currentHeading(){let y="";if(this.selectedSubcategory!==null)y=this.selectedSubcategoryData[0].label;else switch(this.currentStage){case 0:y=this.categoryHeading;break;case 1:case 2:y=this.currentFilter.label;break}return y},currentData(){return this.selectedCategory==="regions"?this.regions:this.placesData},panelClasses(){let y="";return this.currentStage===2&&(y+=" vs-map-with-sidebar-panel--small-padding"),y},headerClasses(){return this.currentStage===1?"vs-map-with-sidebar-panel__header-section--with-spacer":this.currentStage===2?"vs-map-with-sidebar-panel__header-section--overlapped":""},currentFilter(){let y="";return this.filters.forEach(_=>{_.id===this.selectedCategory&&(y=_)}),y},currentPlaceData(){let y=this.placesData;return this.selectedCategory==="regions"&&(y=this.regions),this.currentEndpointData.length>0?this.refineEndpointData(this.currentEndpointData):y.filter(_=>typeof _.properties<"u"&&this.selectedItem?_.properties.id===this.selectedItem.properties.id:!1)},selectedSubcategoryData(){return this.selectedSubcategory?this.filters.filter(_=>_.id===this.selectedSubcategory):[]},...pa.mapState(Sn,{subCatFilterCount(y){return y.activeSubcatFilters.length}}),detailHeadingLevel(){return(parseInt(this.headingLevel,10)+1).toString()},showLoadMore(){return!(this.subcategoryLocations.length>=this.totalPins||this.subcategoryLocations.length===0)}},watch:{currentFilter(){this.placesLoaded=1}},mounted(){Xd=Sn()},methods:{closePanel(){this.$emit("close-panel"),window.innerWidth>=1292&&this.currentStage===2&&this.$emit("set-subcategory",null)},stageBack(){if(this.selectedSubcategory&&this.currentStage===0)this.$emit("set-subcategory",null);else if(this.selectedSubcategory!==null&&this.subcategoryLocations===null)this.setStage(0);else{const y=this.currentStage-1;this.setStage(y)}},resetPanel(){Xd.setSelectedSubcat(null),this.setStage(0)},setStage(y){y===0&&(this.placesLoaded=1),this.$emit("set-stage",y)},subCatExists(y){return typeof y.subCategory<"u"&&y.subCategory.length>0},refineEndpointData(y){const _=[{isEndpoint:!0,properties:{category:y[0].category[0].id,id:y[0].id,image:y[0].images[0].mediaUrl,placeTitle:y[0].name,description:y[0].description,link:{label:y[0].productLink.label,link:y[0].productLink.link,type:y[0].productLink.type},website:{label:y[0].website.label,link:y[0].website.link,type:y[0].website.type},address:{shortAddress:""}}}];return typeof y[0].address<"u"&&(_[0].properties.address.shortAddress=y[0].address.shortAddress),_},clearSubCatFilters(){Xd.setActiveSubcatFilters([]),this.setStage(0)},loadMorePlaces(){this.placesLoaded+=1,this.$emit("load-more-places",this.placesLoaded)}}},C2={class:"vs-map-with-sidebar-panel__buttons d-lg-none"},k2={key:0,class:"vs-map-with-sidebar-panel__back"},M2={key:1,class:"vs-map-with-sidebar-panel__back"},B2={class:"vs-map-with-sidebar-panel__close"},z2={key:0,class:"vs-map-with-sidebar-panel__back d-none d-lg-block"},D2={key:2,class:"vs-map-with-sidebar-panel__bottom-message"},R2={class:"vs-map-with-sidebar-panel__list-container"},L2={key:3,class:"vs-map-with-sidebar-panel__overlay"},F2={key:0,class:"vs-map-with-sidebar-panel__overlay-box"},O2={class:"vs-map-with-sidebar-panel__overlay-text"};function V2(y,_,x,k,E,D){const u=q.resolveComponent("VsButton"),U=q.resolveComponent("VsHeading"),M=q.resolveComponent("VsMapWithSidebarSubcategory"),Y=q.resolveComponent("VsMapWithSidebarControls"),X=q.resolveComponent("VsMapWithSidebarCategory"),ae=q.resolveComponent("VsMapWithSidebarListItem"),J=q.resolveComponent("VsMapWithSidebarButtons"),Se=q.resolveComponent("VsMapWithSidebarDetail");return q.openBlock(),q.createElementBlock("section",{"data-test":"vs-map-with-sidebar-panel",class:q.normalizeClass(["vs-map-with-sidebar-panel",D.panelClasses])},[q.createElementVNode("div",{class:q.normalizeClass(["vs-map-with-sidebar-panel__header-section",D.headerClasses])},[q.createElementVNode("div",C2,[x.currentStage>1||x.selectedSubcategory?(q.openBlock(),q.createElementBlock("div",k2,[q.createVNode(u,{class:"vs-map-with-sidebar-panel_menu",icon:"vs-icon-control-menu",size:"sm",onClick:D.stageBack,"data-test":"vs-map-with-sidebar__menu-toggle",variant:"secondary"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"menu-btn-text")]),_:3},8,["onClick"])])):q.createCommentVNode("",!0),x.currentStage===1||x.selectedSubcategory?(q.openBlock(),q.createElementBlock("div",M2,[q.createVNode(u,{"icon-only":"",icon:"fa-regular fa-arrow-left",size:"md",variant:"subtle",onClick:D.stageBack,"data-test":"vs-map-with-sidebar-panel--btn-back"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"back-btn-text")]),_:3},8,["onClick"])])):q.createCommentVNode("",!0),q.createElementVNode("div",B2,[q.createVNode(u,{"icon-only":"",icon:"vs-icon-control-dismiss",size:"md",variant:"subtle",onClick:D.closePanel,"data-test":"vs-map-with-sidebar-panel--btn-close"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"close-side-panel-text")]),_:3},8,["onClick"])])]),x.currentStage>0||x.selectedSubcategory?(q.openBlock(),q.createElementBlock("div",z2,[q.createVNode(u,{"icon-only":"",icon:"fa-regular fa-arrow-left",size:"md",variant:"subtle",onClick:D.stageBack,"data-test":"vs-map-with-sidebar-panel--btn-back"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"back-btn-text")]),_:3},8,["onClick"])])):q.createCommentVNode("",!0),D.currentHeading!==""?(q.openBlock(),q.createBlock(U,{key:1,level:x.headingLevel,"heading-style":x.currentStage===0?"heading-m":"heading-xs",class:q.normalizeClass(["vs-map-with-sidebar-panel__heading text-center mt-200 mt-lg-0",x.currentStage===2?"d-none d-lg-block":""]),"data-test":"vs-map-with-sidebar-panel__heading"},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.currentHeading),1)]),_:1},8,["level","heading-style","class"])):q.createCommentVNode("",!0),q.createElementVNode("div",{class:q.normalizeClass(["vs-map-with-sidebar-panel__reset",x.currentStage<2?"d-lg-none":""])},[q.createVNode(u,{"icon-only":"",icon:"vs-icon-control-dismiss",size:"md",variant:"subtle",onClick:D.resetPanel,"data-test":"vs-map-with-sidebar-panel--btn-reset"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"reset-side-panel-text")]),_:3},8,["onClick"])],2)],2),x.currentStage===0?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[x.selectedSubcategory!==null?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[q.createVNode(M,{data:D.selectedSubcategoryData[0].subCategory,"selected-sub-category":x.selectedSubcategory},null,8,["data","selected-sub-category"]),q.createVNode(Y)],64)):(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:1},q.renderList(D.filtersWithLocations,be=>(q.openBlock(),q.createBlock(X,{key:be.id,"category-name":be.label,type:be.id,"has-sub-cat":D.subCatExists(be)},null,8,["category-name","type","has-sub-cat"]))),128)),x.panelMessage!==null?(q.openBlock(),q.createElementBlock("div",D2,[q.createElementVNode("p",null,q.toDisplayString(x.panelMessage),1)])):q.createCommentVNode("",!0)],64)):q.createCommentVNode("",!0),x.currentStage===1?(q.openBlock(),q.createElementBlock(q.Fragment,{key:1},[x.selectedSubcategory!==null?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[q.createElementVNode("div",R2,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(x.subcategoryLocations,(be,De)=>(q.openBlock(),q.createBlock(ae,{key:be.id,"item-data":be,"from-endpoint":!0,focussed:De===x.currentListItemFocus,onShowItemDetail:Ze=>y.showDetail(be)},null,8,["item-data","focussed","onShowItemDetail"]))),128)),D.showLoadMore?(q.openBlock(),q.createBlock(u,{key:0,class:"vs-map-with-sidebar-panel__load-more","data-test":"vs-map-with-sidebar-panel__load-more",onClick:_[0]||(_[0]=be=>D.loadMorePlaces()),onKeyup:_[1]||(_[1]=q.withKeys(be=>D.loadMorePlaces(),["enter"]))},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"load-more-text")]),_:3})):q.createCommentVNode("",!0)]),q.createVNode(J,{"content-data":{},"filter-count":y.subCatFilterCount,onClearFilters:D.clearSubCatFilters},null,8,["filter-count","onClearFilters"])],64)):(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:1},q.renderList(D.currentData,be=>(q.openBlock(),q.createElementBlock("div",{key:be.id},[typeof be.properties<"u"&&be.properties.category.id===x.selectedCategory?(q.openBlock(),q.createBlock(ae,{key:0,"item-data":be,onShowItemDetail:De=>y.showDetail(be)},null,8,["item-data","onShowItemDetail"])):q.createCommentVNode("",!0)]))),128))],64)):q.createCommentVNode("",!0),x.currentStage===2?(q.openBlock(),q.createElementBlock(q.Fragment,{key:2},[q.createVNode(Se,{"heading-level":D.detailHeadingLevel,"content-data":D.currentPlaceData[0]},null,8,["heading-level","content-data"]),q.createVNode(J,{"content-data":D.currentPlaceData[0]},null,8,["content-data"])],64)):q.createCommentVNode("",!0),x.panelStatus!==null?(q.openBlock(),q.createElementBlock("div",L2,[y.$slots["panel-loading-message"]&&x.panelStatus!=="map-loading"?(q.openBlock(),q.createElementBlock("div",F2,[q.createElementVNode("p",O2,[q.renderSlot(y.$slots,"panel-loading-message")])])):q.createCommentVNode("",!0)])):q.createCommentVNode("",!0)],2)}const q2=wt._export_sfc(P2,[["render",V2]]);let bc=null;const U2={name:"VsMapWithSidebar",status:"prototype",release:"0.0.1",components:{VsContainer:wt.VsContainer,VsRow:wt.VsRow,VsCol:wt.VsCol,VsMap:tb,VsButton:wt.VsButton,VsMapWithSidebarPanel:q2,VsButtonToggleGroup:wt.VsButtonToggleGroup,VsWarning:wt.VsWarning},provide(){return{filters:this.filters,filtersWithLocations:this.filtersWithLocations,placesData:this.placesData,mapId:this.mapId,regions:this.regionsData,clearSelectionText:this.clearSelectionText,applyFiltersText:this.applyFiltersText,subCatList:this.subCatList,filtersAppliedText:this.filtersAppliedText,clearFiltersText:this.clearFiltersText,focussedListItem:this.focussedListItem}},props:{categoryHeading:{type:String,default:""},filters:{type:Array,required:!0},placesData:{type:Array,required:!0},mapId:{type:String,required:!0},mainHeadingExists:{type:Boolean,default:!1},initialSelected:{type:String,default:""},toggleData:{type:Array,default:()=>[]},buttonsLabel:{type:String,default:""},clearSelectionText:{type:String,required:!0},applyFiltersText:{type:String,required:!0},detailsEndpoint:{type:String,default:""},regionBounds:{type:Object,default:()=>{}},clearFiltersText:{type:String,required:!0},filtersAppliedText:{type:String,required:!0},placeId:{type:String,default:null},mapFilterMessage:{type:String,required:!0},mapNoResultsMessage:{type:String,required:!0},panelMessage:{type:String,default:null},loadBrandingImmediately:{type:Boolean,default:!1}},data(){return{panelVisible:!1,selectedCategory:"",filterCategories:this.filters,selectedItem:null,activePins:this.placesData,currentlyHovered:"",showRegions:!1,regions:[],subCatList:null,selectedToggle:"",currentEndpointData:[],mapStatus:"",panelStatus:"map-loading",mapReady:!1,showPanelMessage:null,currentPanelEndpointFilters:"",totalEndpointPins:0,focussedListItem:0,resetZoom:!1,currentStage:0,selectedSubCategory:null}},computed:{mapDisplayClass(){return this.panelVisible?"d-none d-lg-block":""},panelDisplayClass(){return this.panelVisible?"":"d-none d-lg-block"},regionsData(){return this.placesData.filter(y=>y.geometry.type==="Polygon"||y.geometry.type==="MultiPolygon")},...pa.mapState(Sn,{subCatActiveFilters(y){return y.activeSubcatFilters}}),infoMessage(){let y="";switch(this.mapStatus){case"no-results":y=this.mapNoResultsMessage;break;case"filter-results":y=this.mapFilterMessage;break}return y},existingCategories(){return this.placesData?[...new Set(this.placesData.map(y=>y.properties.category.id))]:[]},filtersWithLocations(){return this.filters.filter(y=>!!(this.existingCategories.includes(y.id)||y.subCategory&&y.subCategory.length))},togglesWithLocations(){return this.existingCategories.indexOf("vics")===-1?this.toggleData.filter(y=>y.value!=="icentres"):this.toggleData}},watch:{selectedSubCategory(y){y===null&&(this.mapStatus="",this.resetZoom=!0)}},mounted(){bc=Sn(),this.selectedToggle=this.initialSelected,this.emitter&&this.emitter.on("clearSelectedSubcats",()=>{this.resetZoom=!0})},methods:{openMenu(){this.setStage(0),this.openPanel()},closePanel(){this.panelVisible=!1},openPanel(){this.panelVisible=!0},showDetail(y){document.fullscreenElement&&document.exitFullscreen(),this.selectedItem=y,this.setStage(2),this.openPanel(),this.selectedSubCategory===null&&this.filterPlaces(this.selectedCategory)},setCategory(y){this.selectedCategory=y,this.selectedSubCategory===null&&this.filterPlaces(y)},setSubCategory(y){bc.setSelectedSubcat(y),this.selectedSubCategory=y,y!==null?(this.getSubcatMarkerData(),this.selectedCategory=y):(bc.setActiveSubcatFilters([]),this.showAllPlaces())},filterSubCategories(y){let _="";y.forEach(x=>{const k=`&cat=${x}`;_+=k}),this.currentPanelEndpointFilters=_,this.getSubcatMarkerData(_),this.getSubcatPanelData(_,0)},getSubcatMarkerData(y){const _=this.filters.filter(x=>x.id===this.selectedSubCategory);if(_.length>0){let x=_[0].pinsEndpoint;typeof y<"u"&&(x+=y),this.activePins=[],typeof y>"u"?(this.activePins=[],this.mapStatus="filter-results"):wt.axios.get(x).then(k=>{this.totalEndpointPins=k.data.features.length,this.totalEndpointPins===0?this.mapStatus="no-results":(k.data.features.forEach(E=>{const D=E;D.properties.apiData=!0,this.activePins.push(D)}),this.mapStatus="")})}},getSubcatPanelData(y,_){let k=this.filters.filter(E=>E.id===this.selectedSubCategory)[0].listProductsEndPoint;typeof y<"u"&&(k+=y),_!==0&&(k+=`${y}&page=${_}`),this.panelStatus="loading-data",wt.axios.get(k).then(E=>{typeof E.data.data.products<"u"?(this.setStage(1),_===0?(this.subCatList=E.data.data.products,this.focussedListItem=0):(this.focussedListItem=_*24,this.subCatList=this.subCatList.concat(E.data.data.products))):this.mapStatus="no-results",this.panelStatus=null})},setStage(y){if(y===2&&this.detailsEndpoint!==""&&this.selectedSubCategory!==null){const _=`${this.detailsEndpoint}${this.selectedItem.properties.id}`;wt.axios.get(_).then(x=>{const k=[];k.push(x.data.data),this.currentEndpointData=k,this.currentStage=y})}else this.currentStage=y,this.currentStage===0?(this.currentEndpointData=[],this.selectedSubCategory===null?(this.resetZoom=!0,this.showAllPlaces(),this.mapStatus=""):this.getSubcatMarkerData(),this.selectedToggle="places"):this.currentStage===1&&this.selectedSubCategory===null&&this.filterPlaces(this.selectedCategory);y!==2&&(bc.setActivePlace({mapId:this.mapId,activeFeature:""}),this.selectedItem=null)},filterPlaces(y){if(y==="regions")this.showRegions=!0,this.activePins=[],this.selectedToggle="regions";else{this.showRegions=!1,this.selectedToggle="places";const _=this.placesData.filter(x=>typeof x.properties<"u"?x.properties.category.id===y:!1);this.activePins=_}},loadMorePlaces(y){this.getSubcatPanelData(this.currentPanelEndpointFilters,y)},showAllPlaces(){this.activePins=this.placesData,this.showRegions=!1},onToggleChanged(y){y==="regions"?(this.setCategory("regions"),this.setStage(1)):y==="icentres"?(this.setCategory("vics"),this.setStage(1)):y==="places-regional"?(this.setCategory("twnv"),this.setStage(1)):(this.showAllPlaces(),this.setStage(0))},setMapReady(y){this.mapReady=y,y?this.panelStatus=null:this.panelStatus="loading"},categoryHasData(y){return this.existingCategories.indexOf(y)!==-1}}};function N2(y,_,x,k,E,D){const u=q.resolveComponent("VsMapWithSidebarPanel"),U=q.resolveComponent("VsButton"),M=q.resolveComponent("VsMap"),Y=q.resolveComponent("VsButtonToggleGroup"),X=q.resolveComponent("VsWarning"),ae=q.resolveComponent("VsCol"),J=q.resolveComponent("VsRow"),Se=q.resolveComponent("VsContainer");return q.openBlock(),q.createBlock(Se,{"data-test":"vs-map-with-sidebar"},{default:q.withCtx(()=>[q.createVNode(J,null,{default:q.withCtx(()=>[q.createVNode(ae,null,{default:q.withCtx(()=>[q.createElementVNode("div",{class:"vs-map-with-sidebar",ref:x.mapId},[q.createElementVNode("div",{class:q.normalizeClass(["vs-map-with-sidebar__side-panel",D.panelDisplayClass]),"data-test":"vs-map-with-sidebar__side-panel"},[q.createVNode(u,{"category-heading":x.categoryHeading,"selected-category":E.selectedCategory,"selected-subcategory":E.selectedSubCategory,"current-stage":E.currentStage,"selected-item":E.selectedItem,"heading-level":x.mainHeadingExists?"3":"2","subcategory-locations":E.subCatList,"current-endpoint-data":E.currentEndpointData,"panel-status":E.panelStatus,"panel-message":E.currentStage===0?x.panelMessage:null,"total-pins":E.totalEndpointPins,"current-list-item-focus":E.focussedListItem,onSetCategory:D.setCategory,onSetSubcategory:D.setSubCategory,onSubcategoriesFiltered:D.filterSubCategories,onSetStage:D.setStage,onClosePanel:D.closePanel,onShowItemDetail:D.showDetail,onFilterPlaces:D.filterPlaces,onLoadMorePlaces:D.loadMorePlaces},{closePanelText:q.withCtx(()=>[q.renderSlot(y.$slots,"close-side-panel-text")]),"reset-side-panel-text":q.withCtx(()=>[q.renderSlot(y.$slots,"reset-side-panel-text")]),"menu-btn-text":q.withCtx(()=>[q.renderSlot(y.$slots,"menu-btn-text")]),"panel-loading-message":q.withCtx(()=>[q.renderSlot(y.$slots,"panel-loading-message")]),"load-more-text":q.withCtx(()=>[q.renderSlot(y.$slots,"load-more-text")]),_:3},8,["category-heading","selected-category","selected-subcategory","current-stage","selected-item","heading-level","subcategory-locations","current-endpoint-data","panel-status","panel-message","total-pins","current-list-item-focus","onSetCategory","onSetSubcategory","onSubcategoriesFiltered","onSetStage","onClosePanel","onShowItemDetail","onFilterPlaces","onLoadMorePlaces"])],2),q.createElementVNode("div",{class:q.normalizeClass(["vs-map-with-sidebar__map",D.mapDisplayClass])},[q.createVNode(U,{class:"vs-map-with-sidebar__map-toggle",icon:"vs-icon-control-menu",size:"sm",onClick:D.openMenu,"data-test":"vs-map-with-sidebar__map-toggle",variant:"secondary"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"open-side-panel-text")]),_:3},8,["onClick"]),q.createVNode(M,{"is-visible":!E.panelVisible,labels:{},filters:D.filtersWithLocations,places:E.activePins,"selected-item":E.selectedItem,"map-id":x.mapId,"show-polygons":E.showRegions,"show-info-message":E.mapStatus!=="",onShowDetail:D.showDetail,onSetCategory:D.setCategory,onMapReady:D.setMapReady,onZoomReset:_[0]||(_[0]=be=>E.resetZoom=!1),"bounds-data":x.regionBounds,"reset-zoom":E.resetZoom,"show-marker-popups":!1,"load-branding-immediately":x.loadBrandingImmediately},{"map-loading-text":q.withCtx(()=>[q.renderSlot(y.$slots,"map-loading-text")]),"info-message":q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.infoMessage),1)]),"zoom-too-close":q.withCtx(()=>[q.renderSlot(y.$slots,"zoom-too-close")]),"zoom-too-far":q.withCtx(()=>[q.renderSlot(y.$slots,"zoom-too-far")]),"no-js":q.withCtx(()=>[q.renderSlot(y.$slots,"no-js")]),_:3},8,["is-visible","filters","places","selected-item","map-id","show-polygons","show-info-message","onShowDetail","onSetCategory","onMapReady","bounds-data","reset-zoom","load-branding-immediately"]),D.togglesWithLocations.length>1?(q.openBlock(),q.createBlock(Y,{key:0,"data-test":"vs-map-with-sidebar__map-toggle-group","initial-selected":E.selectedToggle,options:D.togglesWithLocations,"buttons-label":x.buttonsLabel,onToggleChanged:D.onToggleChanged},null,8,["initial-selected","options","buttons-label","onToggleChanged"])):q.createCommentVNode("",!0)],2)],512),q.createVNode(X,{class:"vs-map-with-sidebar__no-js"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"no-js")]),_:3})]),_:3})]),_:3})]),_:3})}const j2=wt._export_sfc(U2,[["render",N2]]);exports.VsMap=tb;exports.VsMapMarker=eb;exports.VsMapMarkerIcon=Ec;exports.VsMapWithSidebar=j2;
508
+ `},setupMarkerListeners(y){document.body.addEventListener("keyup",x=>{(x.key==="Escape"||x.key==="Tab")&&(this.removeMapPopup(y),this.showMarkerPopups&&Hs.setActivePlace({mapId:this.mapId,activeFeature:null}))}),y.getElement().addEventListener("keyup",x=>{x.key==="Enter"&&(y._popup.isOpen()||y._popup.addTo(this.mapbox.map))})},fitToBounds(){this.mapbox.map.fitBounds(qw(this.geojsonData),{padding:{top:100,bottom:100,left:100,right:100}})},initialiseMapComponent(){this.addMap(),this.addMapControls(),this.places.length&&this.initialiseMapFeatures(),this.geojsonData.features.length&&(this.initialiseMapMarkers(),this.fitToMarkers&&this.fitToBounds())},lazyloadMapComponent(){if(fo.supported({failIfMajorPerformanceCaveat:!0}),!("IntersectionObserver"in window)){this.initialiseMapComponent();return}this.observer=new IntersectionObserver(y=>{y[0].intersectionRatio>0&&(this.observer.unobserve(this.$el),this.initialiseMapComponent())}),this.observer.observe(this.$el)},onResize(){this.isTablet=window.innerWidth>=768},getBoundsFromPolygon(){const y=this.boundsData.coordinates[0];return y.reduce((_,x)=>_.extend(x),new fo.LngLatBounds(y[0],y[0]))},checkPointIsVisible(){return this.mapbox.map.getBounds().contains(this.activeMarkerPostion)},centreMapOnPoint(y){this.mapbox.map.flyTo({center:y})},calculateBoundingBox(){let y;if(typeof this.boundsData>"u"||this.boundsData.type==="undefined")y=[[-7.555827,54.608836],[-.778285,60.880894]];else if(this.boundsData.type==="bounds"){const _=new fo.LngLat(this.boundsData.coordinates[1][0],this.boundsData.coordinates[1][1]),x=new fo.LngLat(this.boundsData.coordinates[0][0],this.boundsData.coordinates[0][1]);y=new fo.LngLatBounds(_,x)}else this.boundsData.type==="Polygon"?y=this.getBoundsFromPolygon():y=[[-7.555827,54.608836],[-.778285,60.880894]];return y}}},Xw={class:"vs-map","data-test":"vs-map"},Kw={class:"vs-map__message-box"},Jw={class:"vs-map__message-text"},Yw={ref:"mapboxOuter",class:"vs-map__map-outer"},Qw=["id"];function e2(y,_,x,k,E,D){const u=q.resolveComponent("VsLoading"),U=q.resolveComponent("VsWarning");return q.openBlock(),q.createElementBlock("div",Xw,[E.showMapMessage?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.normalizeClass(["vs-map__message",E.showZoomMessage?"":"vs-map__message--with-overlay"]),"data-test":"vs-map__message"},[q.createElementVNode("div",Kw,[E.isLoading?(q.openBlock(),q.createBlock(u,{key:0,class:"vs-map__loading"})):q.createCommentVNode("",!0),q.createElementVNode("p",Jw,[E.isLoading?q.renderSlot(y.$slots,"map-loading-text",{},void 0,void 0,0):x.showInfoMessage?q.renderSlot(y.$slots,"info-message",{},void 0,void 0,1):E.showZoomMessage==="too-close"?q.renderSlot(y.$slots,"zoom-too-close",{},void 0,void 0,2):E.showZoomMessage==="too-far"?q.renderSlot(y.$slots,"zoom-too-far",{},void 0,void 0,3):q.createCommentVNode("",!0)])])],2)):q.createCommentVNode("",!0),q.createElementVNode("div",Yw,[q.createElementVNode("div",{id:x.mapId,class:"vs-map__map",ref:"mapbox"},null,8,Qw)],512),q.createVNode(U,{class:"vs-map__no-js"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"no-js")]),_:3})])}const tb=wt._export_sfc(Hw,[["render",e2]]),t2={name:"VsMapWithSidebarCategories",status:"prototype",release:"0.0.1",components:{VsMapMarkerIcon:Ec,VsIcon:wt.VsIcon},props:{categoryName:{type:String,required:!0},type:{type:String,required:!0},hasSubCat:{type:Boolean,default:!1}},data(){return{isHovered:!1}},methods:{selectCategory(y){this.hasSubCat?this.$parent.$emit("set-subcategory",y):(this.$parent.$emit("set-category",y),this.$parent.$emit("set-stage",1))}}},r2={class:"vs-main-map-category","data-test":"vs-main-map-category"};function i2(y,_,x,k,E,D){const u=q.resolveComponent("VsMapMarkerIcon"),U=q.resolveComponent("VsIcon");return q.openBlock(),q.createElementBlock("div",r2,[q.createElementVNode("button",{type:"button",class:q.normalizeClass(["vs-main-map-category__button",`vs-main-map-category__button--${x.type}`]),"data-test":"vs-main-map-category__button",onClick:_[0]||(_[0]=M=>D.selectCategory(x.type)),onMouseover:_[1]||(_[1]=M=>E.isHovered=!0),onMouseout:_[2]||(_[2]=M=>E.isHovered=!1),onFocusin:_[3]||(_[3]=M=>E.isHovered=!0),onFocusout:_[4]||(_[4]=M=>E.isHovered=!1)},[q.createElementVNode("div",null,[q.createVNode(u,{class:"vs-main-map-category__icon",id:x.type,"is-hovered":E.isHovered},null,8,["id","is-hovered"]),q.createTextVNode(" "+q.toDisplayString(x.categoryName),1)]),q.createVNode(U,{icon:"fa-regular fa-arrow-right",variant:"highlight",size:"xs",class:"vs-main-map-category__icon align-self-center me-0"})],34)])}const n2=wt._export_sfc(t2,[["render",i2]]);let xc=null;const o2={name:"VsMapWithSidebarSubCategories",status:"prototype",release:"0.0.1",components:{BFormGroup:wt.BFormGroup_default,BFormCheckboxGroup:wt.BFormCheckboxGroup_default,BFormCheckbox:wt.BFormCheckbox_default,VsMapMarkerIcon:Ec},props:{data:{type:Array,required:!0},selectedSubCategory:{type:String,required:!0}},data(){return{selected:[]}},computed:{activeSubcatFilters(){return xc?xc.activeSubcatFilters:null},...pa.mapState(Sn,{activeSubcatFilters(y){return y.activeSubcatFilters}})},mounted(){xc=Sn(),this.selected=this.activeSubcatFilters,this.emitter&&(this.emitter.on("clearSelectedSubcats",()=>{this.selected=[]}),this.emitter.on("submitCheckboxData",()=>{this.checkboxesChangeSubmit()}));const y=document.getElementsByClassName("vs-main-map-subcategory")[0];y&&y.querySelectorAll('input[type="checkbox"]')[0].focus()},beforeUnmount(){this.emitter&&this.emitter.off("submitCheckboxData")},methods:{checkboxesChangeSubmit(){xc.setActiveSubcatFilters(this.selected),this.$parent.$emit("subcategories-filtered",this.selected)},emitChange(){this.emitter&&this.emitter.emit("checkboxes-selected",this.selected)}}},a2={class:"vs-main-map-subcategory","data-test":"vs-main-map-subcategory"};function s2(y,_,x,k,E,D){const u=q.resolveComponent("VsMapMarkerIcon"),U=q.resolveComponent("BFormCheckbox"),M=q.resolveComponent("BFormCheckboxGroup"),Y=q.resolveComponent("BFormGroup");return q.openBlock(),q.createElementBlock("div",a2,[q.createVNode(Y,null,{default:q.withCtx(()=>[q.createVNode(M,{id:"checkbox-group-1",modelValue:E.selected,"onUpdate:modelValue":_[0]||(_[0]=X=>E.selected=X),name:x.data.name},{default:q.withCtx(()=>[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(x.data,X=>(q.openBlock(),q.createBlock(U,{key:X.id,value:X.id,onChange:D.emitChange},{default:q.withCtx(()=>[q.createVNode(u,{class:"vs-main-map-subcategory__icon",id:x.selectedSubCategory},null,8,["id"]),q.createTextVNode(" "+q.toDisplayString(X.name),1)]),_:2},1032,["value","onChange"]))),128))]),_:1},8,["modelValue","name"])]),_:1})])}const u2=wt._export_sfc(o2,[["render",s2]]);let Hd=null;const l2={name:"VsMapWithSidebarListItem",status:"prototype",release:"0.0.1",components:{VsImg:wt.VsImg,VsIcon:wt.VsIcon},inject:["mapId"],props:{itemData:{type:Object,required:!0},fromEndpoint:{type:Boolean,default:!1},focussed:{type:Boolean,default:!1}},data(){return{formattedData:{}}},computed:{isActive(){return!!(this.highlightedPlace&&this.formattedData&&this.highlightedPlace.properties.id===this.formattedData.properties.id)},...pa.mapState(Sn,{highlightedPlace(y){return y.getHoveredStop(this.mapId)}})},created(){this.fromEndpoint?this.formatApiData():this.formattedData=this.itemData},mounted(){Hd=Sn(),this.focussed&&this.$refs.btn.focus()},methods:{showItemDetail(y){Hd.setActivePlace({mapId:this.mapId,activeFeature:y}),this.$parent.$emit("show-item-detail",y),this.$parent.$emit("set-stage",2)},itemHover(y){Hd.setHoveredPlace({mapId:this.mapId,hoveredFeature:y})},formatApiData(){this.formattedData={geometry:{coordinates:[this.itemData.longitude,this.itemData.latitude],type:"Point"},properties:{category:this.itemData.category[0],description:this.itemData.description,id:this.itemData.id,image:typeof this.itemData.images<"u"?this.itemData.images[0].mediaUrl:"",title:this.itemData.name,link:{label:this.itemData.website.label,link:this.itemData.website.link,type:this.itemData.website.type}},type:"Point"}}}},c2={class:"vs-map-with-sidebar-list-item__img-container"},p2={class:"vs-map-with-sidebar-list-item__text"};function h2(y,_,x,k,E,D){const u=q.resolveComponent("VsImg"),U=q.resolveComponent("VsIcon");return q.openBlock(),q.createElementBlock("button",{type:"button",class:q.normalizeClass(["vs-map-with-sidebar-list-item",D.isActive?"vs-map-with-sidebar-list-item--hovered":""]),"data-test":"vs-map-with-sidebar-list-item",onClick:_[0]||(_[0]=M=>D.showItemDetail(E.formattedData)),onKeyup:_[1]||(_[1]=q.withKeys(M=>D.showItemDetail(E.formattedData),["enter"])),onMouseover:_[2]||(_[2]=M=>D.itemHover(E.formattedData)),onMouseleave:_[3]||(_[3]=M=>D.itemHover("")),onFocusin:_[4]||(_[4]=M=>D.itemHover(E.formattedData)),onFocusout:_[5]||(_[5]=M=>D.itemHover("")),ref:"btn"},[q.createElementVNode("div",c2,[typeof E.formattedData.properties.image<"u"?(q.openBlock(),q.createBlock(u,{key:0,src:E.formattedData.properties.image,class:"vs-map-with-sidebar-list-item__img"},null,8,["src"])):q.createCommentVNode("",!0)]),q.createElementVNode("span",p2,q.toDisplayString(E.formattedData.properties.title),1),q.createVNode(U,{icon:"fa-regular fa-arrow-right",variant:"highlight",size:"xxs",class:"vs-map-with-sidebar-list-item__icon"})],34)}const f2=wt._export_sfc(l2,[["render",h2]]),d2={name:"VsMapWithSidebarDetail",status:"prototype",release:"0.0.1",components:{VsImg:wt.VsImg,VsHeading:wt.VsHeading},props:{contentData:{type:Object,required:!0},headingLevel:{type:String,default:"3"}},computed:{showTitle(){return typeof this.contentData.properties.title<"u"||typeof this.contentData.properties.placeTitle<"u"}}},m2={class:"vs-map-with-sidebar-detail","data-test":"vs-map-with-sidebar-detail"},y2={key:2,"data-test":"vs-map-with-sidebar-detail__address",class:"vs-map-with-sidebar-detail__address"},v2={key:3,class:"mt-100"},g2=["innerHTML"];function _2(y,_,x,k,E,D){const u=q.resolveComponent("VsImg"),U=q.resolveComponent("VsHeading");return q.openBlock(),q.createElementBlock("div",m2,[typeof x.contentData.properties.image<"u"?(q.openBlock(),q.createBlock(u,{key:0,src:x.contentData.properties.image,class:"vs-map-with-sidebar-detail__image mb-125 mb-lg-075"},null,8,["src"])):q.createCommentVNode("",!0),D.showTitle?(q.openBlock(),q.createBlock(U,{key:1,level:x.headingLevel,"heading-style":"heading-xxs",class:"vs-map-with-sidebar-detail__heading mt-0","data-test":"vs-map-with-sidebar-detail__heading"},{default:q.withCtx(()=>[typeof x.contentData.properties.placeTitle<"u"?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[q.createTextVNode(q.toDisplayString(x.contentData.properties.placeTitle),1)],64)):(q.openBlock(),q.createElementBlock(q.Fragment,{key:1},[q.createTextVNode(q.toDisplayString(x.contentData.properties.title),1)],64))]),_:1},8,["level"])):q.createCommentVNode("",!0),typeof x.contentData.properties.address<"u"?(q.openBlock(),q.createElementBlock("p",y2,q.toDisplayString(x.contentData.properties.address.shortAddress),1)):q.createCommentVNode("",!0),x.contentData.properties.subtitle?(q.openBlock(),q.createElementBlock("p",v2,q.toDisplayString(x.contentData.properties.subtitle),1)):q.createCommentVNode("",!0),q.createElementVNode("div",{"data-test":"vs-map-with-sidebar-detail__description",class:"vs-map-with-sidebar-detail__description mb-150",innerHTML:x.contentData.properties.description},null,8,g2)])}const x2=wt._export_sfc(d2,[["render",_2]]),b2={name:"VsMapWithSidebarButtons",status:"prototype",release:"0.0.1",components:{VsButton:wt.VsButton},inject:["filtersAppliedText","clearFiltersText"],props:{contentData:{type:Object,required:!0},filterCount:{type:Number,default:null}},emits:["clear-filters"],computed:{websiteDataExists(){return typeof this.contentData.properties.website<"u"&&this.contentData.properties.website.link!==this.contentData.properties.link.link}},methods:{filtersClick(){this.$parent.$emit("set-stage",0)},clearFiltersClick(){this.$emit("clear-filters")}}};function w2(y,_,x,k,E,D){const u=q.resolveComponent("VsButton");return q.openBlock(),q.createElementBlock("div",{class:q.normalizeClass(["vs-map-with-sidebar-buttons",x.filterCount!==null?"vs-map-with-sidebar-buttons--filters":""]),"data-test":"vs-map-with-sidebar-buttons"},[x.filterCount!==null?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[q.createVNode(u,{class:"vs-map-with-sidebar-buttons__clear-filters","data-test":"vs-map-with-sidebar-buttons__clear-filters",variant:"secondary",size:"sm",onClick:D.clearFiltersClick},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.clearFiltersText),1)]),_:1},8,["onClick"]),q.createVNode(u,{class:"vs-map-with-sidebar-buttons__filters","data-test":"vs-map-with-sidebar-buttons__filters",variant:"secondary",icon:"vs-icon-control-filters",size:"sm",onClick:D.filtersClick},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(x.filterCount)+" "+q.toDisplayString(D.filtersAppliedText),1)]),_:1},8,["onClick"])],64)):(q.openBlock(),q.createElementBlock(q.Fragment,{key:1},[q.createVNode(u,{href:x.contentData.properties.link.link,"data-test":"vs-map-with-sidebar-buttons__discover",class:"mb-050"},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(x.contentData.properties.link.label),1)]),_:1},8,["href"]),D.websiteDataExists?(q.openBlock(),q.createBlock(u,{key:0,href:x.contentData.properties.website.link,target:"_blank",rel:"noopener noreferrer","data-test":"vs-map-with-sidebar-buttons__website",variant:"secondary"},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(x.contentData.properties.website.label),1)]),_:1},8,["href"])):q.createCommentVNode("",!0)],64))],2)}const S2=wt._export_sfc(b2,[["render",w2]]),I2={name:"VsMapWithSidebarControls",status:"prototype",release:"0.0.1",components:{VsButton:wt.VsButton},inject:["clearSelectionText","applyFiltersText"],data(){return{isDisabled:!0}},computed:{...pa.mapState(Sn,{getSubcatFilters(y){return y.activeSubcatFilters}})},mounted(){this.disableSubmitButton()},methods:{clearSelection(){this.emitter&&this.emitter.emit("clearSelectedSubcats"),this.isDisabled=!0},submitCheckboxes(){this.emitter&&this.emitter.emit("submitCheckboxData")},disableSubmitButton(){this.emitter&&this.emitter.on("checkboxes-selected",y=>{y.length>0?this.isDisabled=!1:this.isDisabled=!0}),this.getSubcatFilters.length>0&&(this.isDisabled=!1)}}},T2={class:"vs-main-map-controls","data-test":"vs-main-map-controls"};function A2(y,_,x,k,E,D){const u=q.resolveComponent("VsButton");return q.openBlock(),q.createElementBlock("div",T2,[q.createVNode(u,{class:"vs-main-map-controls__clear-selection","data-test":"vs-main-map-subcategory__clear-selection",size:"sm",variant:"secondary",onClick:D.clearSelection,onKeyup:q.withKeys(D.clearSelection,["enter"])},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.clearSelectionText),1)]),_:1},8,["onClick","onKeyup"]),q.createVNode(u,{class:"vs-main-map-controls__apply-filters","data-test":"vs-main-map-subcategory__apply-filters",size:"sm",onKeypress:q.withKeys(D.submitCheckboxes,["enter"]),onClick:D.submitCheckboxes,"aria-disabled":E.isDisabled,disabled:E.isDisabled},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.applyFiltersText),1)]),_:1},8,["onKeypress","onClick","aria-disabled","disabled"])])}const E2=wt._export_sfc(I2,[["render",A2]]);let Xd=null;const P2={name:"VsMapWithSidebarPanel",status:"prototype",release:"0.0.1",components:{VsButton:wt.VsButton,VsMapWithSidebarCategory:n2,VsMapWithSidebarSubcategory:u2,VsHeading:wt.VsHeading,VsMapWithSidebarListItem:f2,VsMapWithSidebarDetail:x2,VsMapWithSidebarButtons:S2,VsMapWithSidebarControls:E2},inject:["filters","filtersWithLocations","placesData","regions","mapId","focussedListItem"],props:{categoryHeading:{type:String,default:""},headingLevel:{type:String,default:"2"},selectedCategory:{type:String,default:""},selectedSubcategory:{type:String,default:null},currentStage:{type:Number,required:!0},selectedItem:{type:Object,default:null},hovered:{type:String,default:""},subcategoryLocations:{type:Array,default:null},currentEndpointData:{type:Array,default:()=>[]},panelStatus:{type:String,default:null},panelMessage:{type:String,default:null},totalPins:{type:Number,default:0},currentListItemFocus:{type:Number,default:0}},emits:["close-panel","load-more-places","set-stage","set-subcategory"],data(){return{placesLoaded:1}},computed:{currentHeading(){let y="";if(this.selectedSubcategory!==null)y=this.selectedSubcategoryData[0].label;else switch(this.currentStage){case 0:y=this.categoryHeading;break;case 1:case 2:y=this.currentFilter.label;break}return y},currentData(){return this.selectedCategory==="regions"?this.regions:this.placesData},panelClasses(){let y="";return this.currentStage===2&&(y+=" vs-map-with-sidebar-panel--small-padding"),y},headerClasses(){return this.currentStage===1?"vs-map-with-sidebar-panel__header-section--with-spacer":this.currentStage===2?"vs-map-with-sidebar-panel__header-section--overlapped":""},currentFilter(){let y="";return this.filters.forEach(_=>{_.id===this.selectedCategory&&(y=_)}),y},currentPlaceData(){let y=this.placesData;return this.selectedCategory==="regions"&&(y=this.regions),this.currentEndpointData.length>0?this.refineEndpointData(this.currentEndpointData):y.filter(_=>typeof _.properties<"u"&&this.selectedItem?_.properties.id===this.selectedItem.properties.id:!1)},selectedSubcategoryData(){return this.selectedSubcategory?this.filters.filter(_=>_.id===this.selectedSubcategory):[]},...pa.mapState(Sn,{subCatFilterCount(y){return y.activeSubcatFilters.length}}),detailHeadingLevel(){return(parseInt(this.headingLevel,10)+1).toString()},showLoadMore(){return!(this.subcategoryLocations.length>=this.totalPins||this.subcategoryLocations.length===0)}},watch:{currentFilter(){this.placesLoaded=1}},mounted(){Xd=Sn()},methods:{closePanel(){this.$emit("close-panel"),window.innerWidth>=1292&&this.currentStage===2&&this.$emit("set-subcategory",null)},stageBack(){if(this.selectedSubcategory&&this.currentStage===0)this.$emit("set-subcategory",null);else if(this.selectedSubcategory!==null&&this.subcategoryLocations===null)this.setStage(0);else{const y=this.currentStage-1;this.setStage(y)}},resetPanel(){Xd.setSelectedSubcat(null),this.setStage(0)},setStage(y){y===0&&(this.placesLoaded=1),this.$emit("set-stage",y)},subCatExists(y){return typeof y.subCategory<"u"&&y.subCategory.length>0},refineEndpointData(y){const _=[{isEndpoint:!0,properties:{category:y[0].category[0].id,id:y[0].id,image:y[0].images[0].mediaUrl,placeTitle:y[0].name,description:y[0].description,link:{label:y[0].productLink.label,link:y[0].productLink.link,type:y[0].productLink.type},website:{label:y[0].website.label,link:y[0].website.link,type:y[0].website.type},address:{shortAddress:""}}}];return typeof y[0].address<"u"&&(_[0].properties.address.shortAddress=y[0].address.shortAddress),_},clearSubCatFilters(){Xd.setActiveSubcatFilters([]),this.setStage(0)},loadMorePlaces(){this.placesLoaded+=1,this.$emit("load-more-places",this.placesLoaded)}}},C2={class:"vs-map-with-sidebar-panel__buttons d-lg-none"},k2={key:0,class:"vs-map-with-sidebar-panel__back"},M2={key:1,class:"vs-map-with-sidebar-panel__back"},B2={class:"vs-map-with-sidebar-panel__close"},z2={key:0,class:"vs-map-with-sidebar-panel__back d-none d-lg-block"},D2={key:2,class:"vs-map-with-sidebar-panel__bottom-message"},R2={class:"vs-map-with-sidebar-panel__list-container"},L2={key:3,class:"vs-map-with-sidebar-panel__overlay"},F2={key:0,class:"vs-map-with-sidebar-panel__overlay-box"},O2={class:"vs-map-with-sidebar-panel__overlay-text"};function V2(y,_,x,k,E,D){const u=q.resolveComponent("VsButton"),U=q.resolveComponent("VsHeading"),M=q.resolveComponent("VsMapWithSidebarSubcategory"),Y=q.resolveComponent("VsMapWithSidebarControls"),X=q.resolveComponent("VsMapWithSidebarCategory"),ae=q.resolveComponent("VsMapWithSidebarListItem"),J=q.resolveComponent("VsMapWithSidebarButtons"),Se=q.resolveComponent("VsMapWithSidebarDetail");return q.openBlock(),q.createElementBlock("section",{"data-test":"vs-map-with-sidebar-panel",class:q.normalizeClass(["vs-map-with-sidebar-panel",D.panelClasses])},[q.createElementVNode("div",{class:q.normalizeClass(["vs-map-with-sidebar-panel__header-section",D.headerClasses])},[q.createElementVNode("div",C2,[x.currentStage>1||x.selectedSubcategory?(q.openBlock(),q.createElementBlock("div",k2,[q.createVNode(u,{class:"vs-map-with-sidebar-panel_menu",icon:"vs-icon-control-menu",size:"sm",onClick:D.stageBack,"data-test":"vs-map-with-sidebar__menu-toggle",variant:"secondary"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"menu-btn-text")]),_:3},8,["onClick"])])):q.createCommentVNode("",!0),x.currentStage===1||x.selectedSubcategory?(q.openBlock(),q.createElementBlock("div",M2,[q.createVNode(u,{"icon-only":"",icon:"fa-regular fa-arrow-left",size:"md",variant:"subtle",onClick:D.stageBack,"data-test":"vs-map-with-sidebar-panel--btn-back"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"back-btn-text")]),_:3},8,["onClick"])])):q.createCommentVNode("",!0),q.createElementVNode("div",B2,[q.createVNode(u,{"icon-only":"",icon:"vs-icon-control-dismiss",size:"md",variant:"subtle",onClick:D.closePanel,"data-test":"vs-map-with-sidebar-panel--btn-close"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"close-side-panel-text")]),_:3},8,["onClick"])])]),x.currentStage>0||x.selectedSubcategory?(q.openBlock(),q.createElementBlock("div",z2,[q.createVNode(u,{"icon-only":"",icon:"fa-regular fa-arrow-left",size:"md",variant:"subtle",onClick:D.stageBack,"data-test":"vs-map-with-sidebar-panel--btn-back"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"back-btn-text")]),_:3},8,["onClick"])])):q.createCommentVNode("",!0),D.currentHeading!==""?(q.openBlock(),q.createBlock(U,{key:1,level:x.headingLevel,"heading-style":x.currentStage===0?"heading-m":"heading-xs",class:q.normalizeClass(["vs-map-with-sidebar-panel__heading text-center mt-200 mt-lg-0",x.currentStage===2?"d-none d-lg-block":""]),"data-test":"vs-map-with-sidebar-panel__heading"},{default:q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.currentHeading),1)]),_:1},8,["level","heading-style","class"])):q.createCommentVNode("",!0),q.createElementVNode("div",{class:q.normalizeClass(["vs-map-with-sidebar-panel__reset",x.currentStage<2?"d-lg-none":""])},[q.createVNode(u,{"icon-only":"",icon:"vs-icon-control-dismiss",size:"md",variant:"subtle",onClick:D.resetPanel,"data-test":"vs-map-with-sidebar-panel--btn-reset"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"reset-side-panel-text")]),_:3},8,["onClick"])],2)],2),x.currentStage===0?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[x.selectedSubcategory!==null?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[q.createVNode(M,{data:D.selectedSubcategoryData[0].subCategory,"selected-sub-category":x.selectedSubcategory},null,8,["data","selected-sub-category"]),q.createVNode(Y)],64)):(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:1},q.renderList(D.filtersWithLocations,be=>(q.openBlock(),q.createBlock(X,{key:be.id,"category-name":be.label,type:be.id,"has-sub-cat":D.subCatExists(be)},null,8,["category-name","type","has-sub-cat"]))),128)),x.panelMessage!==null?(q.openBlock(),q.createElementBlock("div",D2,[q.createElementVNode("p",null,q.toDisplayString(x.panelMessage),1)])):q.createCommentVNode("",!0)],64)):q.createCommentVNode("",!0),x.currentStage===1?(q.openBlock(),q.createElementBlock(q.Fragment,{key:1},[x.selectedSubcategory!==null?(q.openBlock(),q.createElementBlock(q.Fragment,{key:0},[q.createElementVNode("div",R2,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(x.subcategoryLocations,(be,De)=>(q.openBlock(),q.createBlock(ae,{key:be.id,"item-data":be,"from-endpoint":!0,focussed:De===x.currentListItemFocus,onShowItemDetail:Ze=>y.showDetail(be)},null,8,["item-data","focussed","onShowItemDetail"]))),128)),D.showLoadMore?(q.openBlock(),q.createBlock(u,{key:0,class:"vs-map-with-sidebar-panel__load-more","data-test":"vs-map-with-sidebar-panel__load-more",onClick:_[0]||(_[0]=be=>D.loadMorePlaces()),onKeyup:_[1]||(_[1]=q.withKeys(be=>D.loadMorePlaces(),["enter"]))},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"load-more-text")]),_:3})):q.createCommentVNode("",!0)]),q.createVNode(J,{"content-data":{},"filter-count":y.subCatFilterCount,onClearFilters:D.clearSubCatFilters},null,8,["filter-count","onClearFilters"])],64)):(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:1},q.renderList(D.currentData,be=>(q.openBlock(),q.createElementBlock("div",{key:be.id},[typeof be.properties<"u"&&be.properties.category.id===x.selectedCategory?(q.openBlock(),q.createBlock(ae,{key:0,"item-data":be,onShowItemDetail:De=>y.showDetail(be)},null,8,["item-data","onShowItemDetail"])):q.createCommentVNode("",!0)]))),128))],64)):q.createCommentVNode("",!0),x.currentStage===2?(q.openBlock(),q.createElementBlock(q.Fragment,{key:2},[q.createVNode(Se,{"heading-level":D.detailHeadingLevel,"content-data":D.currentPlaceData[0]},null,8,["heading-level","content-data"]),q.createVNode(J,{"content-data":D.currentPlaceData[0]},null,8,["content-data"])],64)):q.createCommentVNode("",!0),x.panelStatus!==null?(q.openBlock(),q.createElementBlock("div",L2,[y.$slots["panel-loading-message"]&&x.panelStatus!=="map-loading"?(q.openBlock(),q.createElementBlock("div",F2,[q.createElementVNode("p",O2,[q.renderSlot(y.$slots,"panel-loading-message")])])):q.createCommentVNode("",!0)])):q.createCommentVNode("",!0)],2)}const q2=wt._export_sfc(P2,[["render",V2]]);let bc=null;const U2={name:"VsMapWithSidebar",status:"deprecated",release:"0.0.1",components:{VsContainer:wt.VsContainer,VsRow:wt.VsRow,VsCol:wt.VsCol,VsMap:tb,VsButton:wt.VsButton,VsMapWithSidebarPanel:q2,VsButtonToggleGroup:wt.VsButtonToggleGroup,VsWarning:wt.VsWarning},provide(){return{filters:this.filters,filtersWithLocations:this.filtersWithLocations,placesData:this.placesData,mapId:this.mapId,regions:this.regionsData,clearSelectionText:this.clearSelectionText,applyFiltersText:this.applyFiltersText,subCatList:this.subCatList,filtersAppliedText:this.filtersAppliedText,clearFiltersText:this.clearFiltersText,focussedListItem:this.focussedListItem}},props:{categoryHeading:{type:String,default:""},filters:{type:Array,required:!0},placesData:{type:Array,required:!0},mapId:{type:String,required:!0},mainHeadingExists:{type:Boolean,default:!1},initialSelected:{type:String,default:""},toggleData:{type:Array,default:()=>[]},buttonsLabel:{type:String,default:""},clearSelectionText:{type:String,required:!0},applyFiltersText:{type:String,required:!0},detailsEndpoint:{type:String,default:""},regionBounds:{type:Object,default:()=>{}},clearFiltersText:{type:String,required:!0},filtersAppliedText:{type:String,required:!0},placeId:{type:String,default:null},mapFilterMessage:{type:String,required:!0},mapNoResultsMessage:{type:String,required:!0},panelMessage:{type:String,default:null},loadBrandingImmediately:{type:Boolean,default:!1}},data(){return{panelVisible:!1,selectedCategory:"",filterCategories:this.filters,selectedItem:null,activePins:this.placesData,currentlyHovered:"",showRegions:!1,regions:[],subCatList:null,selectedToggle:"",currentEndpointData:[],mapStatus:"",panelStatus:"map-loading",mapReady:!1,showPanelMessage:null,currentPanelEndpointFilters:"",totalEndpointPins:0,focussedListItem:0,resetZoom:!1,currentStage:0,selectedSubCategory:null}},computed:{mapDisplayClass(){return this.panelVisible?"d-none d-lg-block":""},panelDisplayClass(){return this.panelVisible?"":"d-none d-lg-block"},regionsData(){return this.placesData.filter(y=>y.geometry.type==="Polygon"||y.geometry.type==="MultiPolygon")},...pa.mapState(Sn,{subCatActiveFilters(y){return y.activeSubcatFilters}}),infoMessage(){let y="";switch(this.mapStatus){case"no-results":y=this.mapNoResultsMessage;break;case"filter-results":y=this.mapFilterMessage;break}return y},existingCategories(){return this.placesData?[...new Set(this.placesData.map(y=>y.properties.category.id))]:[]},filtersWithLocations(){return this.filters.filter(y=>!!(this.existingCategories.includes(y.id)||y.subCategory&&y.subCategory.length))},togglesWithLocations(){return this.existingCategories.indexOf("vics")===-1?this.toggleData.filter(y=>y.value!=="icentres"):this.toggleData}},watch:{selectedSubCategory(y){y===null&&(this.mapStatus="",this.resetZoom=!0)}},mounted(){bc=Sn(),this.selectedToggle=this.initialSelected,this.emitter&&this.emitter.on("clearSelectedSubcats",()=>{this.resetZoom=!0})},methods:{openMenu(){this.setStage(0),this.openPanel()},closePanel(){this.panelVisible=!1},openPanel(){this.panelVisible=!0},showDetail(y){document.fullscreenElement&&document.exitFullscreen(),this.selectedItem=y,this.setStage(2),this.openPanel(),this.selectedSubCategory===null&&this.filterPlaces(this.selectedCategory)},setCategory(y){this.selectedCategory=y,this.selectedSubCategory===null&&this.filterPlaces(y)},setSubCategory(y){bc.setSelectedSubcat(y),this.selectedSubCategory=y,y!==null?(this.getSubcatMarkerData(),this.selectedCategory=y):(bc.setActiveSubcatFilters([]),this.showAllPlaces())},filterSubCategories(y){let _="";y.forEach(x=>{const k=`&cat=${x}`;_+=k}),this.currentPanelEndpointFilters=_,this.getSubcatMarkerData(_),this.getSubcatPanelData(_,0)},getSubcatMarkerData(y){const _=this.filters.filter(x=>x.id===this.selectedSubCategory);if(_.length>0){let x=_[0].pinsEndpoint;typeof y<"u"&&(x+=y),this.activePins=[],typeof y>"u"?(this.activePins=[],this.mapStatus="filter-results"):wt.axios.get(x).then(k=>{this.totalEndpointPins=k.data.features.length,this.totalEndpointPins===0?this.mapStatus="no-results":(k.data.features.forEach(E=>{const D=E;D.properties.apiData=!0,this.activePins.push(D)}),this.mapStatus="")})}},getSubcatPanelData(y,_){let k=this.filters.filter(E=>E.id===this.selectedSubCategory)[0].listProductsEndPoint;typeof y<"u"&&(k+=y),_!==0&&(k+=`${y}&page=${_}`),this.panelStatus="loading-data",wt.axios.get(k).then(E=>{typeof E.data.data.products<"u"?(this.setStage(1),_===0?(this.subCatList=E.data.data.products,this.focussedListItem=0):(this.focussedListItem=_*24,this.subCatList=this.subCatList.concat(E.data.data.products))):this.mapStatus="no-results",this.panelStatus=null})},setStage(y){if(y===2&&this.detailsEndpoint!==""&&this.selectedSubCategory!==null){const _=`${this.detailsEndpoint}${this.selectedItem.properties.id}`;wt.axios.get(_).then(x=>{const k=[];k.push(x.data.data),this.currentEndpointData=k,this.currentStage=y})}else this.currentStage=y,this.currentStage===0?(this.currentEndpointData=[],this.selectedSubCategory===null?(this.resetZoom=!0,this.showAllPlaces(),this.mapStatus=""):this.getSubcatMarkerData(),this.selectedToggle="places"):this.currentStage===1&&this.selectedSubCategory===null&&this.filterPlaces(this.selectedCategory);y!==2&&(bc.setActivePlace({mapId:this.mapId,activeFeature:""}),this.selectedItem=null)},filterPlaces(y){if(y==="regions")this.showRegions=!0,this.activePins=[],this.selectedToggle="regions";else{this.showRegions=!1,this.selectedToggle="places";const _=this.placesData.filter(x=>typeof x.properties<"u"?x.properties.category.id===y:!1);this.activePins=_}},loadMorePlaces(y){this.getSubcatPanelData(this.currentPanelEndpointFilters,y)},showAllPlaces(){this.activePins=this.placesData,this.showRegions=!1},onToggleChanged(y){y==="regions"?(this.setCategory("regions"),this.setStage(1)):y==="icentres"?(this.setCategory("vics"),this.setStage(1)):y==="places-regional"?(this.setCategory("twnv"),this.setStage(1)):(this.showAllPlaces(),this.setStage(0))},setMapReady(y){this.mapReady=y,y?this.panelStatus=null:this.panelStatus="loading"},categoryHasData(y){return this.existingCategories.indexOf(y)!==-1}}};function N2(y,_,x,k,E,D){const u=q.resolveComponent("VsMapWithSidebarPanel"),U=q.resolveComponent("VsButton"),M=q.resolveComponent("VsMap"),Y=q.resolveComponent("VsButtonToggleGroup"),X=q.resolveComponent("VsWarning"),ae=q.resolveComponent("VsCol"),J=q.resolveComponent("VsRow"),Se=q.resolveComponent("VsContainer");return q.openBlock(),q.createBlock(Se,{"data-test":"vs-map-with-sidebar"},{default:q.withCtx(()=>[q.createVNode(J,null,{default:q.withCtx(()=>[q.createVNode(ae,null,{default:q.withCtx(()=>[q.createElementVNode("div",{class:"vs-map-with-sidebar",ref:x.mapId},[q.createElementVNode("div",{class:q.normalizeClass(["vs-map-with-sidebar__side-panel",D.panelDisplayClass]),"data-test":"vs-map-with-sidebar__side-panel"},[q.createVNode(u,{"category-heading":x.categoryHeading,"selected-category":E.selectedCategory,"selected-subcategory":E.selectedSubCategory,"current-stage":E.currentStage,"selected-item":E.selectedItem,"heading-level":x.mainHeadingExists?"3":"2","subcategory-locations":E.subCatList,"current-endpoint-data":E.currentEndpointData,"panel-status":E.panelStatus,"panel-message":E.currentStage===0?x.panelMessage:null,"total-pins":E.totalEndpointPins,"current-list-item-focus":E.focussedListItem,onSetCategory:D.setCategory,onSetSubcategory:D.setSubCategory,onSubcategoriesFiltered:D.filterSubCategories,onSetStage:D.setStage,onClosePanel:D.closePanel,onShowItemDetail:D.showDetail,onFilterPlaces:D.filterPlaces,onLoadMorePlaces:D.loadMorePlaces},{closePanelText:q.withCtx(()=>[q.renderSlot(y.$slots,"close-side-panel-text")]),"reset-side-panel-text":q.withCtx(()=>[q.renderSlot(y.$slots,"reset-side-panel-text")]),"menu-btn-text":q.withCtx(()=>[q.renderSlot(y.$slots,"menu-btn-text")]),"panel-loading-message":q.withCtx(()=>[q.renderSlot(y.$slots,"panel-loading-message")]),"load-more-text":q.withCtx(()=>[q.renderSlot(y.$slots,"load-more-text")]),_:3},8,["category-heading","selected-category","selected-subcategory","current-stage","selected-item","heading-level","subcategory-locations","current-endpoint-data","panel-status","panel-message","total-pins","current-list-item-focus","onSetCategory","onSetSubcategory","onSubcategoriesFiltered","onSetStage","onClosePanel","onShowItemDetail","onFilterPlaces","onLoadMorePlaces"])],2),q.createElementVNode("div",{class:q.normalizeClass(["vs-map-with-sidebar__map",D.mapDisplayClass])},[q.createVNode(U,{class:"vs-map-with-sidebar__map-toggle",icon:"vs-icon-control-menu",size:"sm",onClick:D.openMenu,"data-test":"vs-map-with-sidebar__map-toggle",variant:"secondary"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"open-side-panel-text")]),_:3},8,["onClick"]),q.createVNode(M,{"is-visible":!E.panelVisible,labels:{},filters:D.filtersWithLocations,places:E.activePins,"selected-item":E.selectedItem,"map-id":x.mapId,"show-polygons":E.showRegions,"show-info-message":E.mapStatus!=="",onShowDetail:D.showDetail,onSetCategory:D.setCategory,onMapReady:D.setMapReady,onZoomReset:_[0]||(_[0]=be=>E.resetZoom=!1),"bounds-data":x.regionBounds,"reset-zoom":E.resetZoom,"show-marker-popups":!1,"load-branding-immediately":x.loadBrandingImmediately},{"map-loading-text":q.withCtx(()=>[q.renderSlot(y.$slots,"map-loading-text")]),"info-message":q.withCtx(()=>[q.createTextVNode(q.toDisplayString(D.infoMessage),1)]),"zoom-too-close":q.withCtx(()=>[q.renderSlot(y.$slots,"zoom-too-close")]),"zoom-too-far":q.withCtx(()=>[q.renderSlot(y.$slots,"zoom-too-far")]),"no-js":q.withCtx(()=>[q.renderSlot(y.$slots,"no-js")]),_:3},8,["is-visible","filters","places","selected-item","map-id","show-polygons","show-info-message","onShowDetail","onSetCategory","onMapReady","bounds-data","reset-zoom","load-branding-immediately"]),D.togglesWithLocations.length>1?(q.openBlock(),q.createBlock(Y,{key:0,"data-test":"vs-map-with-sidebar__map-toggle-group","initial-selected":E.selectedToggle,options:D.togglesWithLocations,"buttons-label":x.buttonsLabel,onToggleChanged:D.onToggleChanged},null,8,["initial-selected","options","buttons-label","onToggleChanged"])):q.createCommentVNode("",!0)],2)],512),q.createVNode(X,{class:"vs-map-with-sidebar__no-js"},{default:q.withCtx(()=>[q.renderSlot(y.$slots,"no-js")]),_:3})]),_:3})]),_:3})]),_:3})}const j2=wt._export_sfc(U2,[["render",N2]]);exports.VsMap=tb;exports.VsMapMarker=eb;exports.VsMapMarkerIcon=Ec;exports.VsMapWithSidebar=j2;