@idmwx/idmui-gl3 5.1.5 → 5.1.6

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.
package/dist/index.js CHANGED
@@ -4879,8 +4879,8 @@ const l2 = /* @__PURE__ */ k(s2, [["render", W2]]), f2 = {
4879
4879
  "line-width": 1,
4880
4880
  "line-opacity": 1
4881
4881
  }
4882
- },
4883
- this.beforeLayer
4882
+ }
4883
+ // this.beforeLayer,
4884
4884
  ), (z = this.map) == null || z.addLayer(
4885
4885
  {
4886
4886
  id: this.labelLayer,
@@ -4900,8 +4900,7 @@ const l2 = /* @__PURE__ */ k(s2, [["render", W2]]), f2 = {
4900
4900
  "text-halo-color": "rgba(255,255,255,1)",
4901
4901
  "text-halo-width": 1
4902
4902
  }
4903
- },
4904
- this.beforeLayer
4903
+ }
4905
4904
  ), setTimeout(() => {
4906
4905
  this.map.addLayer(
4907
4906
  {
@@ -4933,15 +4932,15 @@ const l2 = /* @__PURE__ */ k(s2, [["render", W2]]), f2 = {
4933
4932
  ],
4934
4933
  "text-halo-width": 4
4935
4934
  }
4936
- },
4937
- this.beforeLayer
4935
+ }
4936
+ // this.beforeLayer,
4938
4937
  );
4939
4938
  }, 0), o = (/* @__PURE__ */ new Date()).valueOf() - (O + p), console.log("[prmsl] add elapsed: ", o, ", total: ", p += o));
4940
4939
  }
4941
4940
  },
4942
4941
  handleMove() {
4943
4942
  var b, M;
4944
- (M = (b = this.map) == null ? void 0 : b.getLayer("country-boundaries")) == null || M.setLayoutProperty("visibility", "visible"), this.map.getLayer(this.pointLabelLayer) && this.map.moveLayer(this.pointLabelLayer, "country-boundaries"), this.map.getLayer(this.labelLayer) && this.map.moveLayer(this.labelLayer, "country-boundaries"), this.map.getLayer(this.layer) && this.map.moveLayer(this.layer, "country-boundaries");
4943
+ (M = (b = this.map) == null ? void 0 : b.getLayer("country-boundaries")) == null || M.setLayoutProperty("visibility", "visible");
4945
4944
  },
4946
4945
  handleClear() {
4947
4946
  var b, M;
@@ -191,8 +191,8 @@
191
191
  gl_FragColor = vec4(
192
192
  fract(pos * 255.0),
193
193
  floor(pos * 255.0) / 255.0);
194
- }`);class g0{constructor(b="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg"){H(this,"token");H(this,"mapboxCustomer");H(this,"i4");H(this,"hi");H(this,"td");H(this,"windy");this.token=b,this.mapboxCustomer={source:this.initialOnlineStyle().sources.composite,layers:{water:{id:"water",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},paint:{"fill-color":"hsl(205, 75%, 70%)"}},waterDeplth:{id:"water-depth",type:"fill",source:"composite","source-layer":"depth",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]}},countryBoundary:{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",layout:{visibility:"visible"},paint:{"fill-color":"#d9d8d8"}},countryAdmin0BoundaryBg:{id:"admin-0-boundary-bg",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(193, 190, 190)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]}},countryAdmin0Boundary:{id:"admin-0-boundary",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(114, 110, 111)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]}},countryAdmin0BoundaryDisputed:{id:"admin-0-boundary-disputed",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]}},countryLabel:{id:"country-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},layout:{visibility:"visible","text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["HelveticaNeueThin"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],11,4,9,5,8],9,["step",["get","symbolrank"],22,4,19,5,17]]},paint:{"text-color":"rgba(255,255,255,0)"}},world12nm:{id:"world-12nm-v4-20231025",type:"line",source:"composite","source-layer":"eez_12nm_new1-6jzkww",minzoom:3,layout:{"line-join":"round",visibility:"none"},paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2],"line-translate":[0,0]}}}},this.td={source:{type:"raster",tiles:["https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t1.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t2.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t3.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t4.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t5.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t6.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t7.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8"],tileSize:256},layer:{id:"td",type:"raster",source:"td",layout:{visibility:"visible"}}},this.i4={source:{type:"raster",tiles:["https://osshz.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz1.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz2.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz3.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz4.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz5.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz6.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz7.idmwx.com/nautical/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"i4",type:"raster",source:"i4",minzoom:3,maxzoom:12,layout:{visibility:"none"}}},this.hi={source:{type:"raster",tiles:[`https://assist0.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist1.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist2.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist3.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist4.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist5.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist6.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist7.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`],tileSize:256},layer:{id:"hi",type:"raster",source:"hi",minZoom:3,maxZoom:12,layout:{visibility:"none"}}},this.windy={darkmap:{source:{type:"raster",tiles:["https://tiles.windy.com/tiles/v10.0/darkmap/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"darkmap",type:"raster",source:"darkmap",layout:{visibility:"none"}}},grayland:{source:{type:"raster",tiles:["https://tiles.windy.com/tiles/v9.0/grayland/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"grayland",type:"raster",source:"grayland",layout:{visibility:"none"},paint:{"raster-opacity":1}}}}}initialOnlineStyle(){return{version:8,name:"map-weather-v2.0.0",metadata:{"mapbox:print":{width:8.5,height:11,units:"in",format:"png",resolution:300},"mapbox:type":"default","mapbox:trackposition":!0,"mapbox:autocomposite":!0,"mapbox:sdk-support":{android:"11.0.0",ios:"11.0.0",js:"3.0.0"},"mapbox:origin":"outdoors-v12","mapbox:groups":{"Terrain, terrain-labels":{name:"Terrain, terrain-labels",collapsed:!0},"Administrative boundaries, admin":{name:"Administrative boundaries, admin",collapsed:!1},"Land & water, built":{name:"Land & water, built",collapsed:!1},"Terrain, surface":{name:"Terrain, surface",collapsed:!0},"Land & water, land":{name:"Land & water, land",collapsed:!1},"Natural features, natural-labels":{name:"Natural features, natural-labels",collapsed:!0},"Walking, cycling, etc., barriers-bridges":{name:"Walking, cycling, etc., barriers-bridges",collapsed:!0},"Place labels, place-labels":{name:"Place labels, place-labels",collapsed:!1},"Transit, ferries":{name:"Transit, ferries",collapsed:!0},"Transit, elevated":{name:"Transit, elevated",collapsed:!0},"Walking, cycling, etc., tunnels":{name:"Walking, cycling, etc., tunnels",collapsed:!0},"Terrain, land":{name:"Terrain, land",collapsed:!0},"Road network, tunnels-case":{name:"Road network, tunnels-case",collapsed:!0},"Walking, cycling, etc., walking-cycling-labels":{name:"Walking, cycling, etc., walking-cycling-labels",collapsed:!0},"Walking, cycling, etc., surface":{name:"Walking, cycling, etc., surface",collapsed:!0},"Road network, surface-icons":{name:"Road network, surface-icons",collapsed:!0},"Land & water, water":{name:"Land & water, water",collapsed:!1}}},lights:[],fog:{color:"#ffffff",range:[.5,10],"high-color":"#245cdf","space-color":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"horizon-blend":["interpolate",["linear"],["zoom"],4,.2,7,.1],"star-intensity":["interpolate",["linear"],["zoom"],5,.35,6,0],"vertical-range":[0,0]},center:[80.02170408691855,17.83215724225399],zoom:2.4589703839156347,bearing:0,pitch:1,sprite:"mapbox://sprites/neatchenheng/clxwst0tq00wd01rn0usb2eer/3hcvufdre7i2yn9nbkvi9f9xi",glyphs:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",projection:{name:"equirectangular"},sources:{composite:{type:"vector",url:"mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1,neatchenheng.d44z21eg,neatchenheng.82kqbc1q",data:{attribution:'<a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">&copy; Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">&copy; OpenStreetMap</a> <a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">&copy; Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">&copy; OpenStreetMap</a> <a class="mapbox-improve-map" href="https://www.mapbox.com/contribute/" target="_blank" title="Improve this map" aria-label="Improve this map">Improve this map</a>',bounds:[-180,-85.051129,180,85],center:[0,-.025564500000001544,0],description:"Global polygon tileset of country boundaries and disputed areas",format:"pbf",language_options:{ar:"Arabic",ca:"Catalan",cs:"Czech",da:"Danish",de:"German",el:"Greek",en:"English",es:"Spanish",fa:"Farsi",fi:"Finnish",fr:"French",he:"Hebrew",hu:"Hungarian",id:"Indonesian",it:"Italian",ja:"Japanese",ka:"Georgian",ko:"Korean",local:"Renderable local language",lv:"Latvian",ms:"Malay",nb:"Norwegian Bokmål",nl:"Dutch",no:"Norwegian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sk:"Slovak",sl:"Slovenian",sr:"Serbian",sv:"Swedish",th:"Thai",tl:"Tagalog",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese","zh-Hans":"Simplified Chinese","zh-Hant":"Traditional Chinese"},mapbox_logo:!0,maskLevel:9,maxzoom:16,minzoom:0,mts:!0,name:"Mapbox Countries v1 + Mapbox Bathymetry v2 + Mapbox Terrain v2 + Mapbox Streets v8",scheme:"xyz",tilejson:"2.2.0",tiles:["https://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1/{z}/{x}/{y}.vector.pbf?access_token=pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw","https://b.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1/{z}/{x}/{y}.vector.pbf?access_token=pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw"],vector_layers:[{id:"landuse",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"waterway",minzoom:7,source:"mapbox.mapbox-streets-v8"},{id:"water",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"aeroway",minzoom:9,source:"mapbox.mapbox-streets-v8"},{id:"structure",minzoom:13,source:"mapbox.mapbox-streets-v8"},{id:"building",minzoom:12,source:"mapbox.mapbox-streets-v8"},{id:"landuse_overlay",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"road",minzoom:3,source:"mapbox.mapbox-streets-v8"},{id:"admin",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"place_label",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"airport_label",minzoom:8,source:"mapbox.mapbox-streets-v8"},{id:"transit_stop_label",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"natural_label",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"poi_label",minzoom:6,source:"mapbox.mapbox-streets-v8"},{id:"motorway_junction",minzoom:9,source:"mapbox.mapbox-streets-v8"},{id:"housenum_label",minzoom:16,source:"mapbox.mapbox-streets-v8"},{id:"landcover",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"hillshade",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"contour",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"depth",maxzoom:7,minzoom:0,source:"mapbox.mapbox-bathymetry-v2"},{id:"country_boundaries",maxzoom:22,minzoom:0,source:"mapbox.country-boundaries-v1"},{id:"eez_12nm_new1-6jzkww",maxzoom:22,minzoom:3,source:"neatchenheng.82kqbc1q"}],worldview_default:"US",worldview_options:{AR:"Argentina",CN:"China",IN:"India",JP:"Japan",MA:"Morocco",RS:"Serbia",RU:"Russia",TR:"Turkey",US:"United States"}}}},layers:[{id:"land",type:"background",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},paint:{"background-color":"rgb(171, 174, 172)"}},{id:"landcover",type:"fill",source:"composite","source-layer":"landcover",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},maxzoom:12,paint:{"fill-color":["match",["get","class"],"wood","hsl(0, 0%, 69%)","scrub","hsl(0, 0%, 69%)","crop","hsl(0, 0%, 69%)","grass","hsl(0, 0%, 69%)","snow","hsl(0, 0%, 69%)","hsl(0, 0%, 69%)"],"fill-opacity":["interpolate",["exponential",1.5],["zoom"],8,.8,12,0],"fill-antialias":!1}},{id:"national-park",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:5,filter:["==",["get","class"],"national_park"],paint:{"fill-color":"hsl(98, 38%, 68%)","fill-opacity":["interpolate",["linear"],["zoom"],5,0,6,.6,12,.2]}},{id:"national-park_tint-band",type:"line",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:9,filter:["==",["get","class"],"national_park"],paint:{"line-color":"hsl(98, 38%, 68%)","line-width":["interpolate",["exponential",1.5],["zoom"],9,1,14,8],"line-blur":["interpolate",["exponential",1.5],["zoom"],9,1,14,8]}},{id:"landuse",type:"fill",source:"composite","source-layer":"landuse",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:5,filter:["all",[">=",["to-number",["get","sizerank"]],0],["match",["get","class"],["agriculture","wood","grass","scrub","glacier","pitch","sand"],["step",["zoom"],!1,11,!0],"residential",["step",["zoom"],!0,10,!1],["park","airport"],["step",["zoom"],!1,8,["case",["==",["get","sizerank"],1],!0,!1],10,!0],["facility","industrial"],["step",["zoom"],!1,12,!0],"rock",["step",["zoom"],!1,11,!0],"cemetery",["step",["zoom"],!1,11,!0],"school",["step",["zoom"],!1,11,!0],"hospital",["step",["zoom"],!1,11,!0],"commercial_area",["step",["zoom"],!1,11,!0],!1],["<=",["-",["to-number",["get","sizerank"]],["interpolate",["exponential",1.5],["zoom"],12,0,18,14]],14]],paint:{"fill-color":["interpolate",["linear"],["zoom"],15,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsl(60, 0%, 85%)","school","hsl(40, 45%, 78%)","commercial_area","hsl(55, 45%, 85%)","residential","hsl(60, 7%, 87%)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"],16,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsla(60, 0%, 85%, 0.5)","school","hsl(40, 45%, 78%)","commercial_area","hsla(55, 45%, 85%, 0.5)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"]],"fill-opacity":["interpolate",["linear"],["zoom"],8,["match",["get","class"],"residential",.8,.2],10,["match",["get","class"],"residential",0,1]],"fill-antialias":!1}},{id:"pitch-outline",type:"line",source:"composite","source-layer":"landuse",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:15,filter:["==",["get","class"],"pitch"],paint:{"line-color":"hsl(0, 0%, 69%)"}},{id:"waterway-shadow",type:"line",source:"composite","source-layer":"waterway",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:10,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(224, 79%, 69%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"line-translate-anchor":"viewport","line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"water-shadow",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:10,paint:{"fill-color":"hsl(224, 79%, 69%)","fill-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"fill-translate-anchor":"viewport"}},{id:"waterway",type:"line",source:"composite","source-layer":"waterway",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:8,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(205, 75%, 70%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"water",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},paint:{"fill-color":"hsl(205, 75%, 70%)"}},{id:"water-depth",type:"fill",source:"composite","source-layer":"depth",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]}},{id:"wetland",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:5,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,.25,10.5,.15]}},{id:"wetland-pattern",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:5,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,0,10.5,1],"fill-pattern":"wetland","fill-translate-anchor":"viewport"}},{id:"land-structure-polygon",type:"fill",source:"composite","source-layer":"structure",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},minzoom:13,filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"Polygon"]],paint:{"fill-color":"hsl(0, 0%, 69%)"}},{id:"land-structure-line",type:"line",source:"composite","source-layer":"structure",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},minzoom:13,filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"square"},paint:{"line-width":["interpolate",["exponential",1.99],["zoom"],14,.75,20,40],"line-color":"hsl(60, 20%, 85%)"}},{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",paint:{"fill-color":["interpolate",["linear"],["zoom"],0,"rgb(171, 174, 172)",22,"rgb(171, 174, 172)"]}},{id:"admin-0-boundary-bg",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(193, 190, 190)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]}},{id:"admin-0-boundary",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(114, 110, 111)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]}},{id:"admin-0-boundary-disputed",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]}},{id:"waterway-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:13,filter:["all",["match",["get","class"],["canal","river","stream","disputed_canal","disputed_river","disputed_stream"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-max-angle":30,"symbol-spacing":["interpolate",["linear",1],["zoom"],15,250,17,400],"text-size":["interpolate",["linear"],["zoom"],13,12,18,18],"symbol-placement":"line","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"text-color":"hsl(205, 43%, 90%)","text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"natural-line-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:4,filter:["all",["match",["get","class"],["glacier","landform","disputed_glacier","disputed_landform"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"text-max-angle":30,"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport",visibility:"none"},paint:{"text-halo-width":.5,"text-halo-color":"hsl(60, 17%, 84%)","text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"}},{id:"natural-point-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:4,filter:["all",["match",["get","class"],["dock","glacier","landform","water_feature","wetland","disputed_dock","disputed_glacier","disputed_landform","disputed_water_feature","disputed_wetland"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"icon-image":["case",["has","maki_beta"],["coalesce",["image",["get","maki_beta"]],["image",["get","maki"]]],["image",["get","maki"]]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-offset":["step",["zoom"],["step",["get","sizerank"],["literal",[0,0]],5,["literal",[0,.8]]],17,["step",["get","sizerank"],["literal",[0,0]],13,["literal",[0,.8]]]],"text-anchor":["step",["zoom"],["step",["get","sizerank"],"center",5,"top"],17,["step",["get","sizerank"],"center",13,"top"]],"text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"icon-opacity":["step",["zoom"],["step",["get","sizerank"],0,5,1],17,["step",["get","sizerank"],0,13,1]],"text-halo-color":"hsl(60, 20%, 98%)","text-halo-width":.5,"text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"}},{id:"water-line-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:1,filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-max-angle":30,"text-letter-spacing":["match",["get","class"],"ocean",.25,["sea","bay"],.15,0],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"water-point-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:1,filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],layout:{"text-line-height":1.3,"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":["match",["get","class"],"ocean",.25,["bay","sea"],.15,.01],"text-max-width":["match",["get","class"],"ocean",4,"sea",5,["bay","water"],7,10],visibility:"none"},paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"settlement-subdivision-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:10,maxzoom:15,filter:["all",["match",["get","class"],["settlement_subdivision","disputed_settlement_subdivision"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],3],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-transform":"uppercase","text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-letter-spacing":["match",["get","type"],"suburb",.15,.05],"text-max-width":7,"text-padding":3,"text-size":["interpolate",["cubic-bezier",.5,0,1,1],["zoom"],11,["match",["get","type"],"suburb",11,10.5],15,["match",["get","type"],"suburb",15,14]],visibility:"none"},paint:{"text-halo-color":"hsla(60, 25%, 100%, 0.75)","text-halo-width":1,"text-color":"hsl(230, 29%, 36%)","text-halo-blur":.5}},{id:"settlement-minor-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:2,maxzoom:13,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],[">",["get","symbolrank"],6],4,[">=",["get","symbolrank"],7],6,[">=",["get","symbolrank"],8],7,[">=",["get","symbolrank"],10],10,[">=",["get","symbolrank"],11],11,[">=",["get","symbolrank"],13],12,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],11,9,10],6,["step",["get","symbolrank"],14,9,12,12,10],8,["step",["get","symbolrank"],16,9,14,12,12,15,10],13,["step",["get","symbolrank"],22,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-justify":"auto",visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1}},{id:"settlement-major-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:2,maxzoom:15,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],!1,2,["<=",["get","symbolrank"],6],4,["<",["get","symbolrank"],7],6,["<",["get","symbolrank"],8],7,["<",["get","symbolrank"],10],10,["<",["get","symbolrank"],11],11,["<",["get","symbolrank"],13],12,["<",["get","symbolrank"],15],13,[">=",["get","symbolrank"],11],14,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],13,6,11],6,["step",["get","symbolrank"],18,6,16,7,14],8,["step",["get","symbolrank"],20,9,16,10,14],15,["step",["get","symbolrank"],24,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],8,"center"],visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1}},{id:"state-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:3,maxzoom:9,filter:["all",["match",["get","class"],["state","disputed_state"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-size":["interpolate",["cubic-bezier",.85,.7,.65,1],["zoom"],4,["step",["get","symbolrank"],9,6,8,7,7],9,["step",["get","symbolrank"],21,6,16,7,14]],"text-transform":"uppercase","text-font":["DIN Pro Bold","Arial Unicode MS Bold"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":.15,"text-max-width":6,visibility:"none"},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-opacity":.5}},{id:"country-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:1,maxzoom:10,filter:["all",["match",["get","class"],["country","disputed_country"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],11,4,9,5,8],9,["step",["get","symbolrank"],22,4,19,5,17]]},paint:{"icon-opacity":["step",["zoom"],["case",["has","text_anchor"],1,0],7,0],"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],2,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.25}},{id:"continent-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:.75,maxzoom:3,filter:["==",["get","class"],"continent"],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",.5],["zoom"],0,10,2.5,15],"text-transform":"uppercase","text-letter-spacing":.05,visibility:"none"},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],0,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.5,"text-opacity":["interpolate",["linear"],["zoom"],0,.8,1.5,.5,2.5,0]}},{id:"world-12nm-v4-20231025",type:"line",source:"composite","source-layer":"eez_12nm_new1-6jzkww",minzoom:3,layout:{"line-join":"round",visibility:"none"},paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2],"line-translate":[0,0]}},{id:"china-taiwan",type:"line",source:"composite","source-layer":"eez-d4udtm",layout:{"line-join":"round",visibility:"none"},paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2]}}]}}}const Zb="",w1={name:"IdmWindParticle",props:{factor:{type:Object},viewport:{type:L0},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new l0,etime:void 0,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.9,speedFactor:.25,dropRate:.003,dropRateBump:.01,uvRange:[-25,26],sRange:[0,31.985]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var z;(z=this.factor)!=null&&z.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var z;this.right=(((z=document.getElementsByClassName("right-bar")[0])==null?void 0:z.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const z=new Date().valueOf();let b=0,p=0;this.handleDraw(),p=new Date().valueOf()-(z+b),console.log("[wind-particle] add elapsed: ",p,", total: ",b+=p)}},handleClear(){var z,b,p,o,O,c,e,a;(z=this.viewport)==null||z.toggle(!1),(b=this.viewport)==null||b.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(p=this.viewport)==null?void 0:p.map)==null||o.off("resize",this.handleResize),(c=(O=this.viewport)==null?void 0:O.map)==null||c.off("movestart",this.handlePause),(a=(e=this.viewport)==null?void 0:e.map)==null||a.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const z=[[0,"rgb(98, 113, 184, 0.8)"],[12/255,"rgb(98, 113, 184)"],[24/255,"rgb(61, 110, 163)"],[32/255,"rgb(74, 146, 148)"],[40/255,"rgb(77, 142, 124)"],[60/255,"rgb(76, 164, 76)"],[80/255,"rgb(103, 164, 54)"],[100/255,"rgb(162, 135, 64)"],[120/255,"rgb(162, 109, 92)"],[140/255,"rgb(141, 63, 92)"],[160/255,"rgb(151, 75, 145)"],[200/255,"rgb(95, 100, 160)"],[240/255,"rgb(91, 136, 161)"],[1,"rgb(91, 136, 161)"]];this.rampColor=this.webgl.setup(this.context,z);const{program:b,aPositionBuffer:p}=this.webgl.bind(this.context,U.vertexSchema,U.uvFragmentSchema);this.program=b,this.aPositionBuffer=p}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const z=[[0,"rgb(183,224,224)"],[1,"rgb(217,220,220)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,Y.vertexSchema,Y.fragmentSchema,Y.quadVertSchema,Y.screenFragmentSchema,Y.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,z,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,9e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const z=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,z),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,z),this.wrapper.image=z}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},C1={key:0};function E1(z,b,p,o,O,c){var e;return(e=p.factor)!=null&&e.active?(M.openBlock(),M.createElementBlock("div",C1,[M.createElementVNode("div",{class:"legend-bars flex-center",style:M.normalizeStyle([{position:"absolute"},{right:O.right+"px",bottom:p.bottom}])},b[0]||(b[0]=[M.createElementVNode("span",null,"kts",-1),M.createElementVNode("span",null,"0",-1),M.createElementVNode("span",null,"5",-1),M.createElementVNode("span",null,"10",-1),M.createElementVNode("span",null,"20",-1),M.createElementVNode("span",null,"30",-1),M.createElementVNode("span",null,"40",-1),M.createElementVNode("span",null,"60",-1)]),4)])):M.createCommentVNode("",!0)}const T1=I(w1,[["render",E1],["__scopeId","data-v-14070127"]]),$b="",x1={name:"IdmCurrent",props:{map:{type:Object},current:{type:Object},beforeLayer:{type:String},mapProjection:{type:String},showCurrentParticle:{type:Boolean,default:!1},showCurrentIsoband:{type:Boolean,default:!1},marginBottom:{type:String,default:"30px"},toggleVersion:{type:Number}},emits:["particle","handleToggleVersion"],data(){return{source:"current-source",directionLayer:"current-direction-layer",speedLayer:"current-speed-layer",speedLabelLayer:"current-speed-label-layer",empty:X.featureCollection([]),right:10,bottom:95}},watch:{"current.version":{handler(){var z;(z=this.current)!=null&&z.active?this.handleRender():this.handleClear(),this.$emit("handleToggleVersion")},deep:!0},showCurrentParticle:{handler(){this.handleParticle()}},showCurrentIsoband:{handler(){this.handleToggle()}}},methods:{handleParticle(){this.$emit("particle",{particle:this.showCurrentParticle,key:"current",weight:96})},handleRender(){var z,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.current){const p=new Date().valueOf();let o=0,O=0,c=this.empty;this.current.active&&(c=this.current.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(c),O=new Date().valueOf()-(p+o),console.log("[current] update elapsed: ",O,", total: ",o+=O)):(this.map.addSource(this.source,{type:"geojson",data:c}),this.map.addLayer({id:this.speedLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["step",["get","val"],"#e1ffb3",1,"#ffff00",3,"#ff9500",4,"#f44336",5,"#f44336"]}},this.beforeLayer),this.map.addLayer({id:this.speedLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","text-field":"{val} kts","text-allow-overlap":!0,"text-rotation-alignment":"viewport","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 0.8)"}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-red","icon-size":["interpolate",["linear"],["get","spd"],.5,.14,3,.28],"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":.6}},this.beforeLayer),O=new Date().valueOf()-(p+o),console.log("[current] add elapsed: ",O,", total: ",o+=O)),this.handleToggle()}},handleToggle(){this.map.getLayer(this.speedLayer)&&this.map.setLayoutProperty(this.speedLayer,"visibility",this.showCurrentIsoband?"visible":"none"),this.map.getLayer(this.speedLabelLayer)&&this.map.setLayoutProperty(this.speedLabelLayer,"visibility",this.showCurrentIsoband?"visible":"none"),this.map.getLayer(this.directionLayer)&&this.map.setLayoutProperty(this.directionLayer,"visibility",this.showCurrentIsoband?"visible":"none")},handleClear(){this.map.getLayer(this.speedLayer)&&this.map.removeLayer(this.speedLayer),this.map.getLayer(this.speedLabelLayer)&&this.map.removeLayer(this.speedLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},D1={key:0};function S1(z,b,p,o,O,c){var e;return(e=p.current)!=null&&e.active?(M.openBlock(),M.createElementBlock("div",D1)):M.createCommentVNode("",!0)}const I1=I(x1,[["render",S1]]),Mz="",k1={name:"IdmCurrentParticle",props:{factor:{type:Object},viewport:{type:L0},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new l0,etime:void 0,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.96,speedFactor:4,dropRate:.005,dropRateBump:.01,uvRange:[-2.5,2.6],sRange:[0,3]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var z;(z=this.factor)!=null&&z.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var z;this.right=(((z=document.getElementsByClassName("right-bar")[0])==null?void 0:z.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const z=new Date().valueOf();let b=0,p=0;this.handleDraw(),p=new Date().valueOf()-(z+b),console.log("[current-particle] add elapsed: ",p,", total: ",b+=p)}},handleClear(){var z,b,p,o,O,c,e,a;(z=this.viewport)==null||z.toggle(!1),(b=this.viewport)==null||b.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(p=this.viewport)==null?void 0:p.map)==null||o.off("resize",this.handleResize),(c=(O=this.viewport)==null?void 0:O.map)==null||c.off("movestart",this.handlePause),(a=(e=this.viewport)==null?void 0:e.map)==null||a.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const z=[[0/255,"rgba(95, 143, 197,1)"],[5/255,"rgba(64,127,115,1)"],[10/255,"rgb(58,164,58)"],[15/255,"rgb(191,182,67)"],[20/255,"rgb(197,154,68)"],[30/255,"rgb(160,70,94)"],[40/255,"rgb(138,84,166)"],[45/255,"rgb(82,113,165)"],[50/255,"rgb(84,142,152)"],[65/255,"rgb(150,181,184)"],[80/255,"rgb(195,194,194)"],[254/255,"rgb(195,194,194)"],[1,"rgb(195,194,194)"]];this.rampColor=this.webgl.setup(this.context,z);const{program:b,aPositionBuffer:p}=this.webgl.bind(this.context,U.vertexSchema,U.uvFragmentSchema);this.program=b,this.aPositionBuffer=p}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const z=[[0,"rgb(183,224,224)"],[1,"rgb(199,202,202)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,Y.vertexSchema,Y.fragmentSchema,Y.quadVertSchema,Y.screenFragmentSchema,Y.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,z,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,12e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const z=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,z),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,z),this.wrapper.image=z}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},P1={key:0};function v1(z,b,p,o,O,c){var e;return(e=p.factor)!=null&&e.active?(M.openBlock(),M.createElementBlock("div",P1,[M.createElementVNode("div",{class:"legend-bars flex-center",style:M.normalizeStyle([{position:"absolute"},{right:O.right+"px",bottom:p.bottom}])},b[0]||(b[0]=[M.createElementVNode("span",null,"kts",-1),M.createElementVNode("span",null,"0",-1),M.createElementVNode("span",null,"0.4",-1),M.createElementVNode("span",null,"0.8",-1),M.createElementVNode("span",null,"1.6",-1),M.createElementVNode("span",null,"2",-1),M.createElementVNode("span",null,"3.2",-1)]),4)])):M.createCommentVNode("",!0)}const Q1=I(k1,[["render",v1],["__scopeId","data-v-163d1f9a"]]),H1={name:"IdmSigWave",props:{map:{type:Object},sigWave:{type:Object},beforeLayer:{type:String},activeWeatherLayers:{type:Array}},data(){return{source:"sig-wave-source",heightLayer:"sig-wave-height-layer",heightLabelLayer:"sig-wave-height-label-layer",empty:X.featureCollection([])}},watch:{"sigWave.version":{handler(){var z;(z=this.sigWave)!=null&&z.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0}},methods:{handleRender(){var z,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.sigWave){const p=new Date().valueOf();let o=0,O=0,c=this.empty;this.sigWave.active&&(c=this.sigWave.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(c),O=new Date().valueOf()-(p+o),console.log("[sig.wave] update elapsed: ",O,", total: ",o+=O)):(this.map.addSource(this.source,{type:"geojson",data:c}),this.map.addLayer({id:this.heightLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],layout:{"fill-sort-key":["get","val"]},paint:{"fill-outline-color":"#888","fill-opacity":.8,"fill-color":["step",["get","val"],"rgba(186,247,199,0.4)",3,"rgba(186,247,199,0.7)",4,"rgba(101,252,149,0.9)",5,"#b3ff6b",6,"#fee600",7,"#ffa200",8,"#ff6600",9,"#e23304",10,"#f80078",11,"#dc03d2",12,"#a603f8",13,"#7102ab"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","symbol-avoid-edges":!0,"symbol-sort-key":["get","val"],"text-field":"{val} m","text-rotation-alignment":"viewport","text-size":10},paint:{"text-opacity":.7}},this.beforeLayer),O=new Date().valueOf()-(p+o),console.log("[sig.wave] add elapsed: ",O,", total: ",o+=O))}},handleMove(){var z,b;(b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","visible"),this.map.getLayer(this.heightLayer)&&this.map.moveLayer(this.heightLayer,"country-boundaries"),this.map.getLayer(this.heightLabelLayer)&&this.map.moveLayer(this.heightLabelLayer,"country-boundaries")},handleClear(){var z,b,p;((z=this.activeWeatherLayers)==null?void 0:z.length)===0&&((p=(b=this.map)==null?void 0:b.getLayer("country-boundaries"))==null||p.setLayoutProperty("visibility","none")),this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function _1(z,b,p,o,O,c){return M.openBlock(),M.createElementBlock("div")}const j1=I(H1,[["render",_1]]),F1={name:"IdmSwell",props:{map:{type:Object},swell:{type:Object},beforeLayer:{type:String},activeWeatherLayers:{type:Array}},data(){return{source:"swell-source",directionLayer:"swell-direction-layer",heightLayer:"swell-height-layer",heightLabelLayer:"swell-height-label-layer",empty:X.featureCollection([])}},watch:{"swell.version":{handler(){var z;(z=this.swell)!=null&&z.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0},activeWeatherLayers:{handler(){setTimeout(()=>{this.activeWeatherLayers.length>0?this.handleMove():this.handleClear()},500)},deep:!0,immediate:!0}},methods:{handleRender(){var z,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.swell){const p=new Date().valueOf();let o=0,O=0,c=this.empty;this.swell.active&&(c=this.swell.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(c),O=new Date().valueOf()-(p+o),console.log("[swell] update elapsed: ",O,", total: ",o+=O)):(this.map.addSource(this.source,{type:"geojson",data:c}),this.map.addLayer({id:this.heightLayer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-opacity":1,"line-width":2,"line-color":["match",["get","val"],2,"rgba(255,255,0,0.9)",3,"rgba(255,149,0,0.9)",4,"rgba(244,67,54,0.9)",5,"rgba(162,2,31,0.9)",6,"rgba(162,2,31,0.9)","rgba(162,2,31,0.9)"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}M","text-size":12},paint:{"text-color":["step",["get","val"],"black",4,"white",5,"white",6,"white"],"text-halo-color":["match",["get","val"],2,"rgba(255,255,0,0.7)",3,"rgba(255,149,0,0.7)",4,"rgba(244,67,54,0.7)",5,"rgba(162,13,2,0.7)",6,"rgba(162,13,2,0.7)","rgba(162,13,2,0.7)"],"text-halo-width":4}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-yellow","icon-size":{base:1,stops:[[2,.14],[6,.28]]},"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,180],[360,540]]}},paint:{"icon-opacity":.8}},this.beforeLayer),O=new Date().valueOf()-(p+o),console.log("[swell] add elapsed: ",O,", total: ",o+=O))}},handleMove(){var z,b;(b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","visible"),this.map.getLayer(this.heightLayer)&&this.map.moveLayer(this.heightLayer,"country-boundaries"),this.map.getLayer(this.directionLayer)&&this.map.moveLayer(this.directionLayer,"country-boundaries"),this.map.getLayer(this.heightLabelLayer)&&this.map.moveLayer(this.heightLabelLayer,"country-boundaries")},handleClear(){var z,b;this.activeWeatherLayers.length===0&&((b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","none")),this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function V1(z,b,p,o,O,c){return M.openBlock(),M.createElementBlock("div")}const G1=I(F1,[["render",V1]]),U1={name:"IdmPrmsl",props:{map:{type:Object},prmsl:{type:Object},beforeLayer:{type:String},showRampColor:{type:Boolean},activeWeatherLayers:{type:Array}},data(){return{source:"prmsl-source",layer:"prmsl-layer",labelLayer:"prmsl-label-layer",pointLabelLayer:"prmsl-point-label-layer",empty:X.featureCollection([])}},watch:{"prmsl.version":{handler(){var z;(z=this.prmsl)!=null&&z.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0},activeWeatherLayers:{handler(){setTimeout(()=>{this.activeWeatherLayers.length>0?this.handleMove():this.handleClear()},500)},deep:!0,immediate:!0}},methods:{handleRender(){var z,b,p;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.prmsl){const o=new Date().valueOf();let O=0,c=0,e=this.empty;this.prmsl.active&&(e=this.prmsl.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(e),c=new Date().valueOf()-(o+O),console.log("[prmsl] update elapsed: ",c,", total: ",O+=c)):(this.map.addSource(this.source,{type:"geojson",data:e}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":["step",["get","val"],"rgba(162,13,2,1)",920,"rgba(244,67,54,1)",980,"rgba(255,255,0,1)",1100,"rgba(199,171,250,1)"],"line-width":1,"line-opacity":1}},this.beforeLayer),(p=this.map)==null||p.addLayer({id:this.labelLayer,type:"symbol",source:this.source,minzoom:4,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}","text-size":12},paint:{"text-color":"black","text-opacity":.9,"text-halo-color":"rgba(255,255,255,1)","text-halo-width":1}},this.beforeLayer),setTimeout(()=>{this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":["format",["get","type"],{"font-scale":1.03},`
195
- `,["get","val"],{"font-scale":1}],"text-rotation-alignment":"map","text-line-height":1.3,"text-size":12},paint:{"text-opacity":1,"text-color":["step",["get","val"],"white",980,"black",1100,"black"],"text-halo-color":["step",["get","val"],"rgba(162,13,2,0.9)",920,"rgba(244,67,54,0.9)",980,"rgba(255,255,0,0.9)",1100,"rgba(199,171,250,0.9)"],"text-halo-width":4}},this.beforeLayer)},0),c=new Date().valueOf()-(o+O),console.log("[prmsl] add elapsed: ",c,", total: ",O+=c))}},handleMove(){var z,b;(b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","visible"),this.map.getLayer(this.pointLabelLayer)&&this.map.moveLayer(this.pointLabelLayer,"country-boundaries"),this.map.getLayer(this.labelLayer)&&this.map.moveLayer(this.labelLayer,"country-boundaries"),this.map.getLayer(this.layer)&&this.map.moveLayer(this.layer,"country-boundaries")},handleClear(){var z,b;this.activeWeatherLayers.length===0&&((b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","none")),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.labelLayer)&&this.map.removeLayer(this.labelLayer),this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function K1(z,b,p,o,O,c){return M.openBlock(),M.createElementBlock("div")}const J1=I(U1,[["render",K1]]),Y1={name:"IdmIceberg",props:{map:{type:Object},iceberg:{type:Object},beforeLayer:{type:String}},data(){return{source:"iceberg-source",layer:"iceberg-layer",empty:X.featureCollection([])}},watch:{"iceberg.version":{handler(){var z;(z=this.iceberg)!=null&&z.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var z,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.iceberg){const p=new Date().valueOf();let o=0,O=0,c=this.empty;this.iceberg.active&&(c=this.iceberg.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(c),O=new Date().valueOf()-(p+o),console.log("[iceberg] update elapsed: ",O,", total: ",o+=O)):(this.map.addSource(this.source,{type:"geojson",data:c}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":"rgba(255,255,255, 0.8)","line-width":2,"line-opacity":1}}),O=new Date().valueOf()-(p+o),console.log("[iceberg] add elapsed: ",O,", total: ",o+=O))}},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Z1(z,b,p,o,O,c){return M.openBlock(),M.createElementBlock("div")}const $1=I(Y1,[["render",Z1]]),bz="",M2={name:"IdmTropicals",props:{map:{type:Object},tropicals:{type:Object},date:{type:String},timeZone:{type:Number,default:0}},emits:["tropical","tropicalProbability"],data(){return{helper:G.CompanyHelper,source:"tropicals-source",clusterSource:"tropicals-cluster-source",historyLayer:"tropicals-history-layer",forecastLayer:"tropicals-forecast-layer",forecastModelLayer:"tropicals-forecast-model-layer",forecastNameLayer:"tropicals-forecast-name-layer",pointCircleLayer:"tropicals-point-circle-layer",pointLabelLayer:"tropicals-point-label-layer",historyPointCircleLayer:"history-tropicals-point-circle-layer",historyPointLabelLayer:"history-tropicals-point-label-layer",interpolateData:[],interpolateMarkers:[],interpolateSource:"tropicals-interpolate-source",interpolateLineLayer:"tropicals-interpolate-line-layer",showTropicals:!1,activeTropicals:void 0,activeTropicalsMarker:void 0,empty:X.featureCollection([]),circleSource:"circle-source",circleSourceData:X.featureCollection([]),circleLayer:"tropical-circle-layer"}},computed:{computeTime(){return function(z){if(z){const b=S(z).utc().utcOffset(this.timeZone),p=this.timeZone<0?this.timeZone:"+"+this.timeZone;return`${b.format("MMM-DD,HHmm")}[ UTC ${p} ] ( ${b==null?void 0:b.fromNow()} )`}return"-"}},computeTimezone(){return this.timeZone<0?this.timeZone:"+"+this.timeZone}},watch:{"tropicals.active":{handler(){this.handleInit()},immediate:!0},showTropicals:{handler(){this.$emit("tropical",this.showTropicals)},immediate:!0},"tropicals.version":{handler(){this.handleRefresh()}},timeZone:{handler(){this.handleRefresh()}}},methods:{handleRefresh(){var o,O;const z=((O=(o=this.tropicals)==null?void 0:o.data)==null?void 0:O.features)||[],b=S().utc().hour(),p=[];z.forEach(c=>{var e,a,q;(e=c.properties)!=null&&e.name&&!p.includes((a=c.properties)==null?void 0:a.name)&&p.push((q=c.properties)==null?void 0:q.name)}),p.forEach(c=>{var r;let e=0,a;const q=z.filter(t=>{var n,s;return((s=(n=t.properties)==null?void 0:n.category)==null?void 0:s.split("-")[0])===c});(r=q.filter(t=>{var n,s;return((n=t.geometry)==null?void 0:n.type)==="LineString"&&((s=t.properties)==null?void 0:s.type)==="forecast"})[0])==null||r.properties.model,q.forEach((t,n)=>{var s,d,u,L,W,h;((s=t.geometry)==null?void 0:s.type)==="Point"&&((d=t.properties)==null?void 0:d.type)==="history"&&(e=n,a=a===void 0?n:a),((u=t.geometry)==null?void 0:u.type)==="Point"&&((L=t.properties)==null?void 0:L.type)==="forecast"&&a===void 0&&(a=n),((W=t.geometry)==null?void 0:W.type)==="LineString"&&((h=t.properties)==null||h.type)}),q.map((t,n)=>{var s,d,u,L,W,h,R;if(((s=t.geometry)==null?void 0:s.type)==="LineString"&&((d=t.properties)==null||d.type),((u=t.geometry)==null?void 0:u.type)==="Point"&&((L=t.properties)==null?void 0:L.type)==="forecast"&&(t.properties.name=c,t.properties.format=S(t.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)),((W=t.geometry)==null?void 0:W.type)==="Point"&&((h=t.properties)==null?void 0:h.type)==="history"){t.properties.format=S(t.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);const N=S((R=t.properties)==null?void 0:R.date).utc().format("HHmm")===S().utc().hour(Math.floor(b/6)*6).minute("00").format("HHmm");t.properties.showHistoryLabel=N||n===e,t.properties.showNameLabel=n===e,t.properties.name=c}return t})}),this.handleInit()},handleInit(){var z,b;this.tropicals&&this.tropicals.active?(this.handleRender(),(z=this.map)==null||z.on("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick)):(this.handleClear(),(b=this.map)==null||b.off("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick))},handleRender(){var z,b,p,o,O,c,e,a,q,r;if(!this.map)setTimeout(()=>{this.handleRender()},500);else{if(this.tropicals){const n=new Date().valueOf();let s=0,d=0;(z=this.map)!=null&&z.getSource(this.source)?((p=this.map)==null||p.getSource(this.source).setData((b=this.tropicals)!=null&&b.active?this.tropicals.data:this.empty),d=new Date().valueOf()-(n+s),console.log("[tropicals] update elapsed: ",d,", total: ",s+=d)):(this.map.addSource(this.source,{type:"geojson",data:(o=this.tropicals)!=null&&o.active?(O=this.tropicals)==null?void 0:O.data:this.empty}),this.map.addLayer({id:this.historyLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","history"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":4,"line-opacity":.5}}),this.map.addLayer({id:this.forecastLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"line-width":3,"line-opacity":.9,"line-dasharray":[1,2]}}),this.map.addLayer({id:this.forecastModelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"symbol-placement":"line","text-field":"{model}","text-rotation-alignment":"viewport","text-size":13},paint:{"text-color":["match",["get","model"],"cma","#000","jma","#000","ecmwf","#fff","ukm","#fff","noaa-at","#fff","noaa-ep","#fff","#000"],"text-opacity":1,"text-halo-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"text-halo-width":4}}),d=new Date().valueOf()-(n+s),console.log("[tropical] add elapsed: ",d,", total: ",s+=d)),(c=this.map)!=null&&c.getSource(this.clusterSource)?((a=this.map)==null||a.getSource(this.clusterSource).setData((e=this.tropicals)!=null&&e.active?this.tropicals.data:this.empty),d=new Date().valueOf()-(n+s),console.log("[tropical] update elapsed: ",d,", total: ",s+=d)):(this.map.addSource(this.clusterSource,{type:"geojson",data:(q=this.tropicals)!=null&&q.active?(r=this.tropicals)==null?void 0:r.data:this.empty}),this.map.addLayer({id:this.pointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":6,"circle-color":"#fff"}}),this.map.addLayer({id:this.pointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":4,"circle-color":["case",["boolean",["==",["get","spd",["get","wind"]],null]],"#03f869",["boolean",["<",["get","spd",["get","wind"]],17.2]],"#03f869",["boolean",["<=",["get","spd",["get","wind"]],24.5]],"#f2f202",["boolean",["<=",["get","spd",["get","wind"]],32.7]],"#ff9100",["boolean",["<=",["get","spd",["get","wind"]],41.5]],"#f44336",["boolean",["<",["get","spd",["get","wind"]],51]],"#f903d0",["boolean",[">=",["get","spd",["get","wind"]],51]],"#8702f9","#fff"]}}),this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.historyPointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":7,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":5,"circle-color":"rgba(0,0,0,0.7)"}}),this.map.addLayer({id:this.historyPointCircleLayer+"-inner",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":3,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":14},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.forecastNameLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showNameLabel",!0]],layout:{"text-field":["get","name"],"text-offset":[0,1.5],"text-anchor":"bottom","text-size":16,"text-allow-overlap":!0,"text-ignore-placement":!0},paint:{"text-color":"#fff","text-halo-color":"#0033ff","text-halo-width":4}}),d=new Date().valueOf()-(n+s),console.log("[tropical] add elapsed: ",d,", total: ",s+=d))}this.handleDrawCircle();const t=x.TropicalHelper.interpolate(this.tropicals,1);this.interpolateData=JSON.parse(JSON.stringify(t)),this.interpolateData.filter(n=>n.properties.name==="kristy"&&n.properties.model==="ecmwf"),this.handleDateChange()}},handleClear(){var z;this.map&&(this.map.getLayer(this.historyLayer)&&this.map.removeLayer(this.historyLayer),this.map.getLayer(this.forecastLayer)&&this.map.removeLayer(this.forecastLayer),this.map.getLayer(this.forecastModelLayer)&&this.map.removeLayer(this.forecastModelLayer),this.map.getLayer(this.forecastNameLayer)&&this.map.removeLayer(this.forecastNameLayer),this.map.getLayer(this.pointCircleLayer)&&this.map.removeLayer(this.pointCircleLayer),this.map.getLayer(this.pointCircleLayer+"-border")&&this.map.removeLayer(this.pointCircleLayer+"-border"),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.historyPointCircleLayer)&&this.map.removeLayer(this.historyPointCircleLayer),this.map.getLayer(this.historyPointCircleLayer+"-border")&&this.map.removeLayer(this.historyPointCircleLayer+"-border"),this.map.getLayer(this.historyPointCircleLayer+"-inner")&&this.map.removeLayer(this.historyPointCircleLayer+"-inner"),this.map.getLayer(this.historyPointLabelLayer)&&this.map.removeLayer(this.historyPointLabelLayer),this.map.getLayer(this.interpolateLineLayer)&&this.map.removeLayer(this.interpolateLineLayer),(z=this.interpolateMarkers)==null||z.forEach(b=>b==null?void 0:b.remove()),this.map.getSource(this.source)&&this.map.removeSource(this.source),this.map.getSource(this.clusterSource)&&this.map.removeSource(this.clusterSource),this.map.getSource(this.interpolateSource)&&this.map.removeSource(this.interpolateSource),this.map.getLayer(this.circleLayer)&&this.map.removeLayer(this.circleLayer),this.map.getSource(this.circleSource)&&this.map.removeSource(this.circleSource))},handleDateChange(){var z,b,p,o,O,c,e,a,q,r,t,n,s,d,u,L,W,h,R,N,w,g,P,Q,_,l,m,Z,p0,r0,b0,t0,K,n0,d0,a0;if((z=this.interpolateMarkers)==null||z.forEach(z0=>z0==null?void 0:z0.remove()),this.circleSourceData.features=[],(b=this.interpolateData)!=null&&b.length&&this.tropicals.active){const z0=S(this.date).utc().set({minute:0,second:0,millisecond:0}),o0=this.interpolateData.filter(T=>T.properties.date===z0.format()&&!T.properties.disabled),s0=this.handleComputePolygons(o0),c0=X.featureCollection([...o0]);s0.forEach(T=>{c0.features.push(T)}),(p=this.map)!=null&&p.getSource(this.interpolateSource)?(o=this.map)==null||o.getSource(this.interpolateSource).setData(c0):((O=this.map)==null||O.addSource(this.interpolateSource,{type:"geojson",data:c0}),(c=this.map)==null||c.addLayer({id:this.interpolateLineLayer,type:"line",source:this.interpolateSource,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-opacity":1,"line-color":["match",["get","level"],7,"#ff9100",10,"#f44336","#ffffff"],"line-width":1}})),this.interpolateMarkers=[];for(const T of o0)if(!T.properties.disabled){let F="#f44336";((a=(e=T.properties)==null?void 0:e.wind)==null?void 0:a.spd)<17.2||!((r=(q=T.properties)==null?void 0:q.wind)!=null&&r.spd)?F="#03f869":((n=(t=T.properties)==null?void 0:t.wind)==null?void 0:n.spd)>=17.2&&((d=(s=T.properties)==null?void 0:s.wind)==null?void 0:d.spd)<24.5?F="#f2f202":((L=(u=T.properties)==null?void 0:u.wind)==null?void 0:L.spd)>=24.5&&((h=(W=T.properties)==null?void 0:W.wind)==null?void 0:h.spd)<32.7?F="#ff9100":((N=(R=T.properties)==null?void 0:R.wind)==null?void 0:N.spd)>=32.7&&((g=(w=T.properties)==null?void 0:w.wind)==null?void 0:g.spd)<41.5?F="#f44336":((Q=(P=T.properties)==null?void 0:P.wind)==null?void 0:Q.spd)>=41.5&&((l=(_=T.properties)==null?void 0:_.wind)==null?void 0:l.spd)<51?F="#f903d0":((Z=(m=T.properties)==null?void 0:m.wind)==null?void 0:Z.spd)>=51?F="#8702f9":F="#f44336";const $=`<svg t="1719918955501"
194
+ }`);class g0{constructor(b="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg"){H(this,"token");H(this,"mapboxCustomer");H(this,"i4");H(this,"hi");H(this,"td");H(this,"windy");this.token=b,this.mapboxCustomer={source:this.initialOnlineStyle().sources.composite,layers:{water:{id:"water",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},paint:{"fill-color":"hsl(205, 75%, 70%)"}},waterDeplth:{id:"water-depth",type:"fill",source:"composite","source-layer":"depth",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]}},countryBoundary:{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",layout:{visibility:"visible"},paint:{"fill-color":"#d9d8d8"}},countryAdmin0BoundaryBg:{id:"admin-0-boundary-bg",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(193, 190, 190)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]}},countryAdmin0Boundary:{id:"admin-0-boundary",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(114, 110, 111)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]}},countryAdmin0BoundaryDisputed:{id:"admin-0-boundary-disputed",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]}},countryLabel:{id:"country-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},layout:{visibility:"visible","text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["HelveticaNeueThin"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],11,4,9,5,8],9,["step",["get","symbolrank"],22,4,19,5,17]]},paint:{"text-color":"rgba(255,255,255,0)"}},world12nm:{id:"world-12nm-v4-20231025",type:"line",source:"composite","source-layer":"eez_12nm_new1-6jzkww",minzoom:3,layout:{"line-join":"round",visibility:"none"},paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2],"line-translate":[0,0]}}}},this.td={source:{type:"raster",tiles:["https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t1.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t2.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t3.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t4.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t5.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t6.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8","https://t7.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=3b3833b65e3705d5dc51a5e473b41da8"],tileSize:256},layer:{id:"td",type:"raster",source:"td",layout:{visibility:"visible"}}},this.i4={source:{type:"raster",tiles:["https://osshz.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz1.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz2.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz3.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz4.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz5.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz6.idmwx.com/nautical/{z}/{x}/{y}.png","https://osshz7.idmwx.com/nautical/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"i4",type:"raster",source:"i4",minzoom:3,maxzoom:12,layout:{visibility:"none"}}},this.hi={source:{type:"raster",tiles:[`https://assist0.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist1.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist2.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist3.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist4.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist5.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist6.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`,`https://assist7.idmwx.com/api/arc/hifleets/{z}/{y}/{x}/nauticalmap?tk=${this.token}`],tileSize:256},layer:{id:"hi",type:"raster",source:"hi",minZoom:3,maxZoom:12,layout:{visibility:"none"}}},this.windy={darkmap:{source:{type:"raster",tiles:["https://tiles.windy.com/tiles/v10.0/darkmap/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"darkmap",type:"raster",source:"darkmap",layout:{visibility:"none"}}},grayland:{source:{type:"raster",tiles:["https://tiles.windy.com/tiles/v9.0/grayland/{z}/{x}/{y}.png"],tileSize:256},layer:{id:"grayland",type:"raster",source:"grayland",layout:{visibility:"none"},paint:{"raster-opacity":1}}}}}initialOnlineStyle(){return{version:8,name:"map-weather-v2.0.0",metadata:{"mapbox:print":{width:8.5,height:11,units:"in",format:"png",resolution:300},"mapbox:type":"default","mapbox:trackposition":!0,"mapbox:autocomposite":!0,"mapbox:sdk-support":{android:"11.0.0",ios:"11.0.0",js:"3.0.0"},"mapbox:origin":"outdoors-v12","mapbox:groups":{"Terrain, terrain-labels":{name:"Terrain, terrain-labels",collapsed:!0},"Administrative boundaries, admin":{name:"Administrative boundaries, admin",collapsed:!1},"Land & water, built":{name:"Land & water, built",collapsed:!1},"Terrain, surface":{name:"Terrain, surface",collapsed:!0},"Land & water, land":{name:"Land & water, land",collapsed:!1},"Natural features, natural-labels":{name:"Natural features, natural-labels",collapsed:!0},"Walking, cycling, etc., barriers-bridges":{name:"Walking, cycling, etc., barriers-bridges",collapsed:!0},"Place labels, place-labels":{name:"Place labels, place-labels",collapsed:!1},"Transit, ferries":{name:"Transit, ferries",collapsed:!0},"Transit, elevated":{name:"Transit, elevated",collapsed:!0},"Walking, cycling, etc., tunnels":{name:"Walking, cycling, etc., tunnels",collapsed:!0},"Terrain, land":{name:"Terrain, land",collapsed:!0},"Road network, tunnels-case":{name:"Road network, tunnels-case",collapsed:!0},"Walking, cycling, etc., walking-cycling-labels":{name:"Walking, cycling, etc., walking-cycling-labels",collapsed:!0},"Walking, cycling, etc., surface":{name:"Walking, cycling, etc., surface",collapsed:!0},"Road network, surface-icons":{name:"Road network, surface-icons",collapsed:!0},"Land & water, water":{name:"Land & water, water",collapsed:!1}}},lights:[],fog:{color:"#ffffff",range:[.5,10],"high-color":"#245cdf","space-color":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"horizon-blend":["interpolate",["linear"],["zoom"],4,.2,7,.1],"star-intensity":["interpolate",["linear"],["zoom"],5,.35,6,0],"vertical-range":[0,0]},center:[80.02170408691855,17.83215724225399],zoom:2.4589703839156347,bearing:0,pitch:1,sprite:"mapbox://sprites/neatchenheng/clxwst0tq00wd01rn0usb2eer/3hcvufdre7i2yn9nbkvi9f9xi",glyphs:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",projection:{name:"equirectangular"},sources:{composite:{type:"vector",url:"mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1,neatchenheng.d44z21eg,neatchenheng.82kqbc1q",data:{attribution:'<a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">&copy; Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">&copy; OpenStreetMap</a> <a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">&copy; Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">&copy; OpenStreetMap</a> <a class="mapbox-improve-map" href="https://www.mapbox.com/contribute/" target="_blank" title="Improve this map" aria-label="Improve this map">Improve this map</a>',bounds:[-180,-85.051129,180,85],center:[0,-.025564500000001544,0],description:"Global polygon tileset of country boundaries and disputed areas",format:"pbf",language_options:{ar:"Arabic",ca:"Catalan",cs:"Czech",da:"Danish",de:"German",el:"Greek",en:"English",es:"Spanish",fa:"Farsi",fi:"Finnish",fr:"French",he:"Hebrew",hu:"Hungarian",id:"Indonesian",it:"Italian",ja:"Japanese",ka:"Georgian",ko:"Korean",local:"Renderable local language",lv:"Latvian",ms:"Malay",nb:"Norwegian Bokmål",nl:"Dutch",no:"Norwegian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sk:"Slovak",sl:"Slovenian",sr:"Serbian",sv:"Swedish",th:"Thai",tl:"Tagalog",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese","zh-Hans":"Simplified Chinese","zh-Hant":"Traditional Chinese"},mapbox_logo:!0,maskLevel:9,maxzoom:16,minzoom:0,mts:!0,name:"Mapbox Countries v1 + Mapbox Bathymetry v2 + Mapbox Terrain v2 + Mapbox Streets v8",scheme:"xyz",tilejson:"2.2.0",tiles:["https://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1/{z}/{x}/{y}.vector.pbf?access_token=pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw","https://b.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1/{z}/{x}/{y}.vector.pbf?access_token=pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw"],vector_layers:[{id:"landuse",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"waterway",minzoom:7,source:"mapbox.mapbox-streets-v8"},{id:"water",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"aeroway",minzoom:9,source:"mapbox.mapbox-streets-v8"},{id:"structure",minzoom:13,source:"mapbox.mapbox-streets-v8"},{id:"building",minzoom:12,source:"mapbox.mapbox-streets-v8"},{id:"landuse_overlay",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"road",minzoom:3,source:"mapbox.mapbox-streets-v8"},{id:"admin",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"place_label",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"airport_label",minzoom:8,source:"mapbox.mapbox-streets-v8"},{id:"transit_stop_label",minzoom:5,source:"mapbox.mapbox-streets-v8"},{id:"natural_label",minzoom:0,source:"mapbox.mapbox-streets-v8"},{id:"poi_label",minzoom:6,source:"mapbox.mapbox-streets-v8"},{id:"motorway_junction",minzoom:9,source:"mapbox.mapbox-streets-v8"},{id:"housenum_label",minzoom:16,source:"mapbox.mapbox-streets-v8"},{id:"landcover",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"hillshade",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"contour",maxzoom:22,minzoom:0,source:"mapbox.mapbox-terrain-v2"},{id:"depth",maxzoom:7,minzoom:0,source:"mapbox.mapbox-bathymetry-v2"},{id:"country_boundaries",maxzoom:22,minzoom:0,source:"mapbox.country-boundaries-v1"},{id:"eez_12nm_new1-6jzkww",maxzoom:22,minzoom:3,source:"neatchenheng.82kqbc1q"}],worldview_default:"US",worldview_options:{AR:"Argentina",CN:"China",IN:"India",JP:"Japan",MA:"Morocco",RS:"Serbia",RU:"Russia",TR:"Turkey",US:"United States"}}}},layers:[{id:"land",type:"background",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},paint:{"background-color":"rgb(171, 174, 172)"}},{id:"landcover",type:"fill",source:"composite","source-layer":"landcover",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},maxzoom:12,paint:{"fill-color":["match",["get","class"],"wood","hsl(0, 0%, 69%)","scrub","hsl(0, 0%, 69%)","crop","hsl(0, 0%, 69%)","grass","hsl(0, 0%, 69%)","snow","hsl(0, 0%, 69%)","hsl(0, 0%, 69%)"],"fill-opacity":["interpolate",["exponential",1.5],["zoom"],8,.8,12,0],"fill-antialias":!1}},{id:"national-park",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:5,filter:["==",["get","class"],"national_park"],paint:{"fill-color":"hsl(98, 38%, 68%)","fill-opacity":["interpolate",["linear"],["zoom"],5,0,6,.6,12,.2]}},{id:"national-park_tint-band",type:"line",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:9,filter:["==",["get","class"],"national_park"],paint:{"line-color":"hsl(98, 38%, 68%)","line-width":["interpolate",["exponential",1.5],["zoom"],9,1,14,8],"line-blur":["interpolate",["exponential",1.5],["zoom"],9,1,14,8]}},{id:"landuse",type:"fill",source:"composite","source-layer":"landuse",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:5,filter:["all",[">=",["to-number",["get","sizerank"]],0],["match",["get","class"],["agriculture","wood","grass","scrub","glacier","pitch","sand"],["step",["zoom"],!1,11,!0],"residential",["step",["zoom"],!0,10,!1],["park","airport"],["step",["zoom"],!1,8,["case",["==",["get","sizerank"],1],!0,!1],10,!0],["facility","industrial"],["step",["zoom"],!1,12,!0],"rock",["step",["zoom"],!1,11,!0],"cemetery",["step",["zoom"],!1,11,!0],"school",["step",["zoom"],!1,11,!0],"hospital",["step",["zoom"],!1,11,!0],"commercial_area",["step",["zoom"],!1,11,!0],!1],["<=",["-",["to-number",["get","sizerank"]],["interpolate",["exponential",1.5],["zoom"],12,0,18,14]],14]],paint:{"fill-color":["interpolate",["linear"],["zoom"],15,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsl(60, 0%, 85%)","school","hsl(40, 45%, 78%)","commercial_area","hsl(55, 45%, 85%)","residential","hsl(60, 7%, 87%)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"],16,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsla(60, 0%, 85%, 0.5)","school","hsl(40, 45%, 78%)","commercial_area","hsla(55, 45%, 85%, 0.5)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"]],"fill-opacity":["interpolate",["linear"],["zoom"],8,["match",["get","class"],"residential",.8,.2],10,["match",["get","class"],"residential",0,1]],"fill-antialias":!1}},{id:"pitch-outline",type:"line",source:"composite","source-layer":"landuse",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},minzoom:15,filter:["==",["get","class"],"pitch"],paint:{"line-color":"hsl(0, 0%, 69%)"}},{id:"waterway-shadow",type:"line",source:"composite","source-layer":"waterway",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:10,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(224, 79%, 69%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"line-translate-anchor":"viewport","line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"water-shadow",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:10,paint:{"fill-color":"hsl(224, 79%, 69%)","fill-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"fill-translate-anchor":"viewport"}},{id:"waterway",type:"line",source:"composite","source-layer":"waterway",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:8,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(205, 75%, 70%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]}},{id:"water",type:"fill",source:"composite","source-layer":"water",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},paint:{"fill-color":"hsl(205, 75%, 70%)"}},{id:"water-depth",type:"fill",source:"composite","source-layer":"depth",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]}},{id:"wetland",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:5,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,.25,10.5,.15]}},{id:"wetland-pattern",type:"fill",source:"composite","source-layer":"landuse_overlay",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},minzoom:5,filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,0,10.5,1],"fill-pattern":"wetland","fill-translate-anchor":"viewport"}},{id:"land-structure-polygon",type:"fill",source:"composite","source-layer":"structure",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},minzoom:13,filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"Polygon"]],paint:{"fill-color":"hsl(0, 0%, 69%)"}},{id:"land-structure-line",type:"line",source:"composite","source-layer":"structure",metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},minzoom:13,filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"square"},paint:{"line-width":["interpolate",["exponential",1.99],["zoom"],14,.75,20,40],"line-color":"hsl(60, 20%, 85%)"}},{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",paint:{"fill-color":["interpolate",["linear"],["zoom"],0,"rgb(171, 174, 172)",22,"rgb(171, 174, 172)"]}},{id:"admin-0-boundary-bg",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(193, 190, 190)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]}},{id:"admin-0-boundary",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(114, 110, 111)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]}},{id:"admin-0-boundary-disputed",type:"line",source:"composite","source-layer":"admin",metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},minzoom:1,filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]}},{id:"waterway-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:13,filter:["all",["match",["get","class"],["canal","river","stream","disputed_canal","disputed_river","disputed_stream"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-max-angle":30,"symbol-spacing":["interpolate",["linear",1],["zoom"],15,250,17,400],"text-size":["interpolate",["linear"],["zoom"],13,12,18,18],"symbol-placement":"line","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"text-color":"hsl(205, 43%, 90%)","text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"natural-line-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:4,filter:["all",["match",["get","class"],["glacier","landform","disputed_glacier","disputed_landform"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"text-max-angle":30,"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport",visibility:"none"},paint:{"text-halo-width":.5,"text-halo-color":"hsl(60, 17%, 84%)","text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"}},{id:"natural-point-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:4,filter:["all",["match",["get","class"],["dock","glacier","landform","water_feature","wetland","disputed_dock","disputed_glacier","disputed_landform","disputed_water_feature","disputed_wetland"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"icon-image":["case",["has","maki_beta"],["coalesce",["image",["get","maki_beta"]],["image",["get","maki"]]],["image",["get","maki"]]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-offset":["step",["zoom"],["step",["get","sizerank"],["literal",[0,0]],5,["literal",[0,.8]]],17,["step",["get","sizerank"],["literal",[0,0]],13,["literal",[0,.8]]]],"text-anchor":["step",["zoom"],["step",["get","sizerank"],"center",5,"top"],17,["step",["get","sizerank"],"center",13,"top"]],"text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"icon-opacity":["step",["zoom"],["step",["get","sizerank"],0,5,1],17,["step",["get","sizerank"],0,13,1]],"text-halo-color":"hsl(60, 20%, 98%)","text-halo-width":.5,"text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"}},{id:"water-line-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:1,filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],layout:{"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-max-angle":30,"text-letter-spacing":["match",["get","class"],"ocean",.25,["sea","bay"],.15,0],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]],visibility:"none"},paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"water-point-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},minzoom:1,filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],layout:{"text-line-height":1.3,"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":["match",["get","class"],"ocean",.25,["bay","sea"],.15,.01],"text-max-width":["match",["get","class"],"ocean",4,"sea",5,["bay","water"],7,10],visibility:"none"},paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"}},{id:"settlement-subdivision-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:10,maxzoom:15,filter:["all",["match",["get","class"],["settlement_subdivision","disputed_settlement_subdivision"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],3],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-transform":"uppercase","text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-letter-spacing":["match",["get","type"],"suburb",.15,.05],"text-max-width":7,"text-padding":3,"text-size":["interpolate",["cubic-bezier",.5,0,1,1],["zoom"],11,["match",["get","type"],"suburb",11,10.5],15,["match",["get","type"],"suburb",15,14]],visibility:"none"},paint:{"text-halo-color":"hsla(60, 25%, 100%, 0.75)","text-halo-width":1,"text-color":"hsl(230, 29%, 36%)","text-halo-blur":.5}},{id:"settlement-minor-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:2,maxzoom:13,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],[">",["get","symbolrank"],6],4,[">=",["get","symbolrank"],7],6,[">=",["get","symbolrank"],8],7,[">=",["get","symbolrank"],10],10,[">=",["get","symbolrank"],11],11,[">=",["get","symbolrank"],13],12,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],11,9,10],6,["step",["get","symbolrank"],14,9,12,12,10],8,["step",["get","symbolrank"],16,9,14,12,12,15,10],13,["step",["get","symbolrank"],22,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-justify":"auto",visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1}},{id:"settlement-major-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:2,maxzoom:15,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],!1,2,["<=",["get","symbolrank"],6],4,["<",["get","symbolrank"],7],6,["<",["get","symbolrank"],8],7,["<",["get","symbolrank"],10],10,["<",["get","symbolrank"],11],11,["<",["get","symbolrank"],13],12,["<",["get","symbolrank"],15],13,[">=",["get","symbolrank"],11],14,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],13,6,11],6,["step",["get","symbolrank"],18,6,16,7,14],8,["step",["get","symbolrank"],20,9,16,10,14],15,["step",["get","symbolrank"],24,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],8,"center"],visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1}},{id:"state-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:3,maxzoom:9,filter:["all",["match",["get","class"],["state","disputed_state"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-size":["interpolate",["cubic-bezier",.85,.7,.65,1],["zoom"],4,["step",["get","symbolrank"],9,6,8,7,7],9,["step",["get","symbolrank"],21,6,16,7,14]],"text-transform":"uppercase","text-font":["DIN Pro Bold","Arial Unicode MS Bold"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":.15,"text-max-width":6,visibility:"none"},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-opacity":.5}},{id:"country-label",type:"symbol",source:"composite","source-layer":"place_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:1,maxzoom:10,filter:["all",["match",["get","class"],["country","disputed_country"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],11,4,9,5,8],9,["step",["get","symbolrank"],22,4,19,5,17]]},paint:{"icon-opacity":["step",["zoom"],["case",["has","text_anchor"],1,0],7,0],"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],2,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.25}},{id:"continent-label",type:"symbol",source:"composite","source-layer":"natural_label",metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},minzoom:.75,maxzoom:3,filter:["==",["get","class"],"continent"],layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",.5],["zoom"],0,10,2.5,15],"text-transform":"uppercase","text-letter-spacing":.05,visibility:"none"},paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],0,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.5,"text-opacity":["interpolate",["linear"],["zoom"],0,.8,1.5,.5,2.5,0]}},{id:"world-12nm-v4-20231025",type:"line",source:"composite","source-layer":"eez_12nm_new1-6jzkww",minzoom:3,layout:{"line-join":"round",visibility:"none"},paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2],"line-translate":[0,0]}},{id:"china-taiwan",type:"line",source:"composite","source-layer":"eez-d4udtm",layout:{"line-join":"round",visibility:"none"},paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2]}}]}}}const Zb="",w1={name:"IdmWindParticle",props:{factor:{type:Object},viewport:{type:L0},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new l0,etime:void 0,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.9,speedFactor:.25,dropRate:.003,dropRateBump:.01,uvRange:[-25,26],sRange:[0,31.985]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var z;(z=this.factor)!=null&&z.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var z;this.right=(((z=document.getElementsByClassName("right-bar")[0])==null?void 0:z.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const z=new Date().valueOf();let b=0,p=0;this.handleDraw(),p=new Date().valueOf()-(z+b),console.log("[wind-particle] add elapsed: ",p,", total: ",b+=p)}},handleClear(){var z,b,p,o,O,c,e,a;(z=this.viewport)==null||z.toggle(!1),(b=this.viewport)==null||b.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(p=this.viewport)==null?void 0:p.map)==null||o.off("resize",this.handleResize),(c=(O=this.viewport)==null?void 0:O.map)==null||c.off("movestart",this.handlePause),(a=(e=this.viewport)==null?void 0:e.map)==null||a.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const z=[[0,"rgb(98, 113, 184, 0.8)"],[12/255,"rgb(98, 113, 184)"],[24/255,"rgb(61, 110, 163)"],[32/255,"rgb(74, 146, 148)"],[40/255,"rgb(77, 142, 124)"],[60/255,"rgb(76, 164, 76)"],[80/255,"rgb(103, 164, 54)"],[100/255,"rgb(162, 135, 64)"],[120/255,"rgb(162, 109, 92)"],[140/255,"rgb(141, 63, 92)"],[160/255,"rgb(151, 75, 145)"],[200/255,"rgb(95, 100, 160)"],[240/255,"rgb(91, 136, 161)"],[1,"rgb(91, 136, 161)"]];this.rampColor=this.webgl.setup(this.context,z);const{program:b,aPositionBuffer:p}=this.webgl.bind(this.context,U.vertexSchema,U.uvFragmentSchema);this.program=b,this.aPositionBuffer=p}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const z=[[0,"rgb(183,224,224)"],[1,"rgb(217,220,220)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,Y.vertexSchema,Y.fragmentSchema,Y.quadVertSchema,Y.screenFragmentSchema,Y.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,z,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,9e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const z=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,z),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,z),this.wrapper.image=z}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},C1={key:0};function E1(z,b,p,o,O,c){var e;return(e=p.factor)!=null&&e.active?(M.openBlock(),M.createElementBlock("div",C1,[M.createElementVNode("div",{class:"legend-bars flex-center",style:M.normalizeStyle([{position:"absolute"},{right:O.right+"px",bottom:p.bottom}])},b[0]||(b[0]=[M.createElementVNode("span",null,"kts",-1),M.createElementVNode("span",null,"0",-1),M.createElementVNode("span",null,"5",-1),M.createElementVNode("span",null,"10",-1),M.createElementVNode("span",null,"20",-1),M.createElementVNode("span",null,"30",-1),M.createElementVNode("span",null,"40",-1),M.createElementVNode("span",null,"60",-1)]),4)])):M.createCommentVNode("",!0)}const T1=I(w1,[["render",E1],["__scopeId","data-v-14070127"]]),$b="",x1={name:"IdmCurrent",props:{map:{type:Object},current:{type:Object},beforeLayer:{type:String},mapProjection:{type:String},showCurrentParticle:{type:Boolean,default:!1},showCurrentIsoband:{type:Boolean,default:!1},marginBottom:{type:String,default:"30px"},toggleVersion:{type:Number}},emits:["particle","handleToggleVersion"],data(){return{source:"current-source",directionLayer:"current-direction-layer",speedLayer:"current-speed-layer",speedLabelLayer:"current-speed-label-layer",empty:X.featureCollection([]),right:10,bottom:95}},watch:{"current.version":{handler(){var z;(z=this.current)!=null&&z.active?this.handleRender():this.handleClear(),this.$emit("handleToggleVersion")},deep:!0},showCurrentParticle:{handler(){this.handleParticle()}},showCurrentIsoband:{handler(){this.handleToggle()}}},methods:{handleParticle(){this.$emit("particle",{particle:this.showCurrentParticle,key:"current",weight:96})},handleRender(){var z,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.current){const p=new Date().valueOf();let o=0,O=0,c=this.empty;this.current.active&&(c=this.current.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(c),O=new Date().valueOf()-(p+o),console.log("[current] update elapsed: ",O,", total: ",o+=O)):(this.map.addSource(this.source,{type:"geojson",data:c}),this.map.addLayer({id:this.speedLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["step",["get","val"],"#e1ffb3",1,"#ffff00",3,"#ff9500",4,"#f44336",5,"#f44336"]}},this.beforeLayer),this.map.addLayer({id:this.speedLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","text-field":"{val} kts","text-allow-overlap":!0,"text-rotation-alignment":"viewport","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 0.8)"}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-red","icon-size":["interpolate",["linear"],["get","spd"],.5,.14,3,.28],"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,0],[360,360]]}},paint:{"icon-opacity":.6}},this.beforeLayer),O=new Date().valueOf()-(p+o),console.log("[current] add elapsed: ",O,", total: ",o+=O)),this.handleToggle()}},handleToggle(){this.map.getLayer(this.speedLayer)&&this.map.setLayoutProperty(this.speedLayer,"visibility",this.showCurrentIsoband?"visible":"none"),this.map.getLayer(this.speedLabelLayer)&&this.map.setLayoutProperty(this.speedLabelLayer,"visibility",this.showCurrentIsoband?"visible":"none"),this.map.getLayer(this.directionLayer)&&this.map.setLayoutProperty(this.directionLayer,"visibility",this.showCurrentIsoband?"visible":"none")},handleClear(){this.map.getLayer(this.speedLayer)&&this.map.removeLayer(this.speedLayer),this.map.getLayer(this.speedLabelLayer)&&this.map.removeLayer(this.speedLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},D1={key:0};function S1(z,b,p,o,O,c){var e;return(e=p.current)!=null&&e.active?(M.openBlock(),M.createElementBlock("div",D1)):M.createCommentVNode("",!0)}const I1=I(x1,[["render",S1]]),Mz="",k1={name:"IdmCurrentParticle",props:{factor:{type:Object},viewport:{type:L0},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new l0,etime:void 0,wrapper:void 0,animation:void 0,particleContext:void 0,particleTexture:void 0,particleOptions:{fadeOpacity:.96,speedFactor:4,dropRate:.005,dropRateBump:.01,uvRange:[-2.5,2.6],sRange:[0,3]},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var z;(z=this.factor)!=null&&z.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var z;this.right=(((z=document.getElementsByClassName("right-bar")[0])==null?void 0:z.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const z=new Date().valueOf();let b=0,p=0;this.handleDraw(),p=new Date().valueOf()-(z+b),console.log("[current-particle] add elapsed: ",p,", total: ",b+=p)}},handleClear(){var z,b,p,o,O,c,e,a;(z=this.viewport)==null||z.toggle(!1),(b=this.viewport)==null||b.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(p=this.viewport)==null?void 0:p.map)==null||o.off("resize",this.handleResize),(c=(O=this.viewport)==null?void 0:O.map)==null||c.off("movestart",this.handlePause),(a=(e=this.viewport)==null?void 0:e.map)==null||a.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const z=[[0/255,"rgba(95, 143, 197,1)"],[5/255,"rgba(64,127,115,1)"],[10/255,"rgb(58,164,58)"],[15/255,"rgb(191,182,67)"],[20/255,"rgb(197,154,68)"],[30/255,"rgb(160,70,94)"],[40/255,"rgb(138,84,166)"],[45/255,"rgb(82,113,165)"],[50/255,"rgb(84,142,152)"],[65/255,"rgb(150,181,184)"],[80/255,"rgb(195,194,194)"],[254/255,"rgb(195,194,194)"],[1,"rgb(195,194,194)"]];this.rampColor=this.webgl.setup(this.context,z);const{program:b,aPositionBuffer:p}=this.webgl.bind(this.context,U.vertexSchema,U.uvFragmentSchema);this.program=b,this.aPositionBuffer=p}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const z=[[0,"rgb(183,224,224)"],[1,"rgb(199,202,202)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,Y.vertexSchema,Y.fragmentSchema,Y.quadVertSchema,Y.screenFragmentSchema,Y.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,z,!0,16,16),this.wrapper={...this.wrapper,...this.webgl.setupParticle(this.particleContext,12e3),...this.webgl.resize(this.viewport,this.particleContext)},this.viewport.map.on("resize",this.handleResize),this.viewport.map.on("movestart",this.handlePause),this.viewport.map.on("moveend",this.handlePlay)}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const z=await this.webgl.loadImg(this.factor.raw);this.texture=this.webgl.createTexture(this.context,this.context.NEAREST,this.context.LINEAR,this.context.CLAMP_TO_EDGE,z),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,z),this.wrapper.image=z}this.initial&&(this.initial=!1,this.handlePlay()),this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer,this.particleOptions),this.viewport.toggle(!0)},handleResize(){this.wrapper={...this.wrapper,...this.webgl.resize(this.viewport,this.particleContext)}},handlePause(){this.paused=!0,this.animation&&(cancelAnimationFrame(this.animation),this.viewport.toggleParticle(!1))},handlePlay(){this.paused=!1,this.animation=requestAnimationFrame(()=>{this.webgl.drawParticle(this.viewport,this.particleContext,this.particleTexture,this.wrapper,this.particleOptions),this.viewport.toggleParticle(!0),this.handlePlay()})}}},P1={key:0};function v1(z,b,p,o,O,c){var e;return(e=p.factor)!=null&&e.active?(M.openBlock(),M.createElementBlock("div",P1,[M.createElementVNode("div",{class:"legend-bars flex-center",style:M.normalizeStyle([{position:"absolute"},{right:O.right+"px",bottom:p.bottom}])},b[0]||(b[0]=[M.createElementVNode("span",null,"kts",-1),M.createElementVNode("span",null,"0",-1),M.createElementVNode("span",null,"0.4",-1),M.createElementVNode("span",null,"0.8",-1),M.createElementVNode("span",null,"1.6",-1),M.createElementVNode("span",null,"2",-1),M.createElementVNode("span",null,"3.2",-1)]),4)])):M.createCommentVNode("",!0)}const Q1=I(k1,[["render",v1],["__scopeId","data-v-163d1f9a"]]),H1={name:"IdmSigWave",props:{map:{type:Object},sigWave:{type:Object},beforeLayer:{type:String},activeWeatherLayers:{type:Array}},data(){return{source:"sig-wave-source",heightLayer:"sig-wave-height-layer",heightLabelLayer:"sig-wave-height-label-layer",empty:X.featureCollection([])}},watch:{"sigWave.version":{handler(){var z;(z=this.sigWave)!=null&&z.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0}},methods:{handleRender(){var z,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.sigWave){const p=new Date().valueOf();let o=0,O=0,c=this.empty;this.sigWave.active&&(c=this.sigWave.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(c),O=new Date().valueOf()-(p+o),console.log("[sig.wave] update elapsed: ",O,", total: ",o+=O)):(this.map.addSource(this.source,{type:"geojson",data:c}),this.map.addLayer({id:this.heightLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],layout:{"fill-sort-key":["get","val"]},paint:{"fill-outline-color":"#888","fill-opacity":.8,"fill-color":["step",["get","val"],"rgba(186,247,199,0.4)",3,"rgba(186,247,199,0.7)",4,"rgba(101,252,149,0.9)",5,"#b3ff6b",6,"#fee600",7,"#ffa200",8,"#ff6600",9,"#e23304",10,"#f80078",11,"#dc03d2",12,"#a603f8",13,"#7102ab"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Polygon"],layout:{"symbol-placement":"line","symbol-avoid-edges":!0,"symbol-sort-key":["get","val"],"text-field":"{val} m","text-rotation-alignment":"viewport","text-size":10},paint:{"text-opacity":.7}},this.beforeLayer),O=new Date().valueOf()-(p+o),console.log("[sig.wave] add elapsed: ",O,", total: ",o+=O))}},handleMove(){var z,b;(b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","visible"),this.map.getLayer(this.heightLayer)&&this.map.moveLayer(this.heightLayer,"country-boundaries"),this.map.getLayer(this.heightLabelLayer)&&this.map.moveLayer(this.heightLabelLayer,"country-boundaries")},handleClear(){var z,b,p;((z=this.activeWeatherLayers)==null?void 0:z.length)===0&&((p=(b=this.map)==null?void 0:b.getLayer("country-boundaries"))==null||p.setLayoutProperty("visibility","none")),this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function _1(z,b,p,o,O,c){return M.openBlock(),M.createElementBlock("div")}const j1=I(H1,[["render",_1]]),F1={name:"IdmSwell",props:{map:{type:Object},swell:{type:Object},beforeLayer:{type:String},activeWeatherLayers:{type:Array}},data(){return{source:"swell-source",directionLayer:"swell-direction-layer",heightLayer:"swell-height-layer",heightLabelLayer:"swell-height-label-layer",empty:X.featureCollection([])}},watch:{"swell.version":{handler(){var z;(z=this.swell)!=null&&z.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0},activeWeatherLayers:{handler(){setTimeout(()=>{this.activeWeatherLayers.length>0?this.handleMove():this.handleClear()},500)},deep:!0,immediate:!0}},methods:{handleRender(){var z,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.swell){const p=new Date().valueOf();let o=0,O=0,c=this.empty;this.swell.active&&(c=this.swell.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(c),O=new Date().valueOf()-(p+o),console.log("[swell] update elapsed: ",O,", total: ",o+=O)):(this.map.addSource(this.source,{type:"geojson",data:c}),this.map.addLayer({id:this.heightLayer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-opacity":1,"line-width":2,"line-color":["match",["get","val"],2,"rgba(255,255,0,0.9)",3,"rgba(255,149,0,0.9)",4,"rgba(244,67,54,0.9)",5,"rgba(162,2,31,0.9)",6,"rgba(162,2,31,0.9)","rgba(162,2,31,0.9)"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}M","text-size":12},paint:{"text-color":["step",["get","val"],"black",4,"white",5,"white",6,"white"],"text-halo-color":["match",["get","val"],2,"rgba(255,255,0,0.7)",3,"rgba(255,149,0,0.7)",4,"rgba(244,67,54,0.7)",5,"rgba(162,13,2,0.7)",6,"rgba(162,13,2,0.7)","rgba(162,13,2,0.7)"],"text-halo-width":4}},this.beforeLayer),this.map.addLayer({id:this.directionLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-image":"arrow-yellow","icon-size":{base:1,stops:[[2,.14],[6,.28]]},"icon-offset":[0,-20],"icon-allow-overlap":!0,"icon-rotation-alignment":"map","icon-rotate":{property:"val",stops:[[0,180],[360,540]]}},paint:{"icon-opacity":.8}},this.beforeLayer),O=new Date().valueOf()-(p+o),console.log("[swell] add elapsed: ",O,", total: ",o+=O))}},handleMove(){var z,b;(b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","visible"),this.map.getLayer(this.heightLayer)&&this.map.moveLayer(this.heightLayer,"country-boundaries"),this.map.getLayer(this.directionLayer)&&this.map.moveLayer(this.directionLayer,"country-boundaries"),this.map.getLayer(this.heightLabelLayer)&&this.map.moveLayer(this.heightLabelLayer,"country-boundaries")},handleClear(){var z,b;this.activeWeatherLayers.length===0&&((b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","none")),this.map.getLayer(this.heightLayer)&&this.map.removeLayer(this.heightLayer),this.map.getLayer(this.heightLabelLayer)&&this.map.removeLayer(this.heightLabelLayer),this.map.getLayer(this.directionLayer)&&this.map.removeLayer(this.directionLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function V1(z,b,p,o,O,c){return M.openBlock(),M.createElementBlock("div")}const G1=I(F1,[["render",V1]]),U1={name:"IdmPrmsl",props:{map:{type:Object},prmsl:{type:Object},beforeLayer:{type:String},showRampColor:{type:Boolean},activeWeatherLayers:{type:Array}},data(){return{source:"prmsl-source",layer:"prmsl-layer",labelLayer:"prmsl-label-layer",pointLabelLayer:"prmsl-point-label-layer",empty:X.featureCollection([])}},watch:{"prmsl.version":{handler(){var z;(z=this.prmsl)!=null&&z.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0},activeWeatherLayers:{handler(){setTimeout(()=>{this.activeWeatherLayers.length>0?this.handleMove():this.handleClear()},500)},deep:!0,immediate:!0}},methods:{handleRender(){var z,b,p;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.prmsl){const o=new Date().valueOf();let O=0,c=0,e=this.empty;this.prmsl.active&&(e=this.prmsl.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(e),c=new Date().valueOf()-(o+O),console.log("[prmsl] update elapsed: ",c,", total: ",O+=c)):(this.map.addSource(this.source,{type:"geojson",data:e}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":["step",["get","val"],"rgba(162,13,2,1)",920,"rgba(244,67,54,1)",980,"rgba(255,255,0,1)",1100,"rgba(199,171,250,1)"],"line-width":1,"line-opacity":1}}),(p=this.map)==null||p.addLayer({id:this.labelLayer,type:"symbol",source:this.source,minzoom:4,filter:["==","$type","LineString"],layout:{"symbol-placement":"line","text-rotation-alignment":"viewport","text-field":"{val}","text-size":12},paint:{"text-color":"black","text-opacity":.9,"text-halo-color":"rgba(255,255,255,1)","text-halo-width":1}}),setTimeout(()=>{this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":["format",["get","type"],{"font-scale":1.03},`
195
+ `,["get","val"],{"font-scale":1}],"text-rotation-alignment":"map","text-line-height":1.3,"text-size":12},paint:{"text-opacity":1,"text-color":["step",["get","val"],"white",980,"black",1100,"black"],"text-halo-color":["step",["get","val"],"rgba(162,13,2,0.9)",920,"rgba(244,67,54,0.9)",980,"rgba(255,255,0,0.9)",1100,"rgba(199,171,250,0.9)"],"text-halo-width":4}})},0),c=new Date().valueOf()-(o+O),console.log("[prmsl] add elapsed: ",c,", total: ",O+=c))}},handleMove(){var z,b;(b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","visible")},handleClear(){var z,b;this.activeWeatherLayers.length===0&&((b=(z=this.map)==null?void 0:z.getLayer("country-boundaries"))==null||b.setLayoutProperty("visibility","none")),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.labelLayer)&&this.map.removeLayer(this.labelLayer),this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function K1(z,b,p,o,O,c){return M.openBlock(),M.createElementBlock("div")}const J1=I(U1,[["render",K1]]),Y1={name:"IdmIceberg",props:{map:{type:Object},iceberg:{type:Object},beforeLayer:{type:String}},data(){return{source:"iceberg-source",layer:"iceberg-layer",empty:X.featureCollection([])}},watch:{"iceberg.version":{handler(){var z;(z=this.iceberg)!=null&&z.active?this.handleRender():this.handleClear()},deep:!0}},methods:{handleRender(){var z,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.iceberg){const p=new Date().valueOf();let o=0,O=0,c=this.empty;this.iceberg.active&&(c=this.iceberg.data),(z=this.map)!=null&&z.getSource(this.source)?((b=this.map)==null||b.getSource(this.source).setData(c),O=new Date().valueOf()-(p+o),console.log("[iceberg] update elapsed: ",O,", total: ",o+=O)):(this.map.addSource(this.source,{type:"geojson",data:c}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],paint:{"line-color":"rgba(255,255,255, 0.8)","line-width":2,"line-opacity":1}}),O=new Date().valueOf()-(p+o),console.log("[iceberg] add elapsed: ",O,", total: ",o+=O))}},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Z1(z,b,p,o,O,c){return M.openBlock(),M.createElementBlock("div")}const $1=I(Y1,[["render",Z1]]),bz="",M2={name:"IdmTropicals",props:{map:{type:Object},tropicals:{type:Object},date:{type:String},timeZone:{type:Number,default:0}},emits:["tropical","tropicalProbability"],data(){return{helper:G.CompanyHelper,source:"tropicals-source",clusterSource:"tropicals-cluster-source",historyLayer:"tropicals-history-layer",forecastLayer:"tropicals-forecast-layer",forecastModelLayer:"tropicals-forecast-model-layer",forecastNameLayer:"tropicals-forecast-name-layer",pointCircleLayer:"tropicals-point-circle-layer",pointLabelLayer:"tropicals-point-label-layer",historyPointCircleLayer:"history-tropicals-point-circle-layer",historyPointLabelLayer:"history-tropicals-point-label-layer",interpolateData:[],interpolateMarkers:[],interpolateSource:"tropicals-interpolate-source",interpolateLineLayer:"tropicals-interpolate-line-layer",showTropicals:!1,activeTropicals:void 0,activeTropicalsMarker:void 0,empty:X.featureCollection([]),circleSource:"circle-source",circleSourceData:X.featureCollection([]),circleLayer:"tropical-circle-layer"}},computed:{computeTime(){return function(z){if(z){const b=S(z).utc().utcOffset(this.timeZone),p=this.timeZone<0?this.timeZone:"+"+this.timeZone;return`${b.format("MMM-DD,HHmm")}[ UTC ${p} ] ( ${b==null?void 0:b.fromNow()} )`}return"-"}},computeTimezone(){return this.timeZone<0?this.timeZone:"+"+this.timeZone}},watch:{"tropicals.active":{handler(){this.handleInit()},immediate:!0},showTropicals:{handler(){this.$emit("tropical",this.showTropicals)},immediate:!0},"tropicals.version":{handler(){this.handleRefresh()}},timeZone:{handler(){this.handleRefresh()}}},methods:{handleRefresh(){var o,O;const z=((O=(o=this.tropicals)==null?void 0:o.data)==null?void 0:O.features)||[],b=S().utc().hour(),p=[];z.forEach(c=>{var e,a,q;(e=c.properties)!=null&&e.name&&!p.includes((a=c.properties)==null?void 0:a.name)&&p.push((q=c.properties)==null?void 0:q.name)}),p.forEach(c=>{var r;let e=0,a;const q=z.filter(t=>{var n,s;return((s=(n=t.properties)==null?void 0:n.category)==null?void 0:s.split("-")[0])===c});(r=q.filter(t=>{var n,s;return((n=t.geometry)==null?void 0:n.type)==="LineString"&&((s=t.properties)==null?void 0:s.type)==="forecast"})[0])==null||r.properties.model,q.forEach((t,n)=>{var s,d,u,L,W,h;((s=t.geometry)==null?void 0:s.type)==="Point"&&((d=t.properties)==null?void 0:d.type)==="history"&&(e=n,a=a===void 0?n:a),((u=t.geometry)==null?void 0:u.type)==="Point"&&((L=t.properties)==null?void 0:L.type)==="forecast"&&a===void 0&&(a=n),((W=t.geometry)==null?void 0:W.type)==="LineString"&&((h=t.properties)==null||h.type)}),q.map((t,n)=>{var s,d,u,L,W,h,R;if(((s=t.geometry)==null?void 0:s.type)==="LineString"&&((d=t.properties)==null||d.type),((u=t.geometry)==null?void 0:u.type)==="Point"&&((L=t.properties)==null?void 0:L.type)==="forecast"&&(t.properties.name=c,t.properties.format=S(t.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`)),((W=t.geometry)==null?void 0:W.type)==="Point"&&((h=t.properties)==null?void 0:h.type)==="history"){t.properties.format=S(t.properties.date).utcOffset(this.timeZone).format(`MMM-DD,HHmm [(utc ${this.computeTimezone})]`);const N=S((R=t.properties)==null?void 0:R.date).utc().format("HHmm")===S().utc().hour(Math.floor(b/6)*6).minute("00").format("HHmm");t.properties.showHistoryLabel=N||n===e,t.properties.showNameLabel=n===e,t.properties.name=c}return t})}),this.handleInit()},handleInit(){var z,b;this.tropicals&&this.tropicals.active?(this.handleRender(),(z=this.map)==null||z.on("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick)):(this.handleClear(),(b=this.map)==null||b.off("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick))},handleRender(){var z,b,p,o,O,c,e,a,q,r;if(!this.map)setTimeout(()=>{this.handleRender()},500);else{if(this.tropicals){const n=new Date().valueOf();let s=0,d=0;(z=this.map)!=null&&z.getSource(this.source)?((p=this.map)==null||p.getSource(this.source).setData((b=this.tropicals)!=null&&b.active?this.tropicals.data:this.empty),d=new Date().valueOf()-(n+s),console.log("[tropicals] update elapsed: ",d,", total: ",s+=d)):(this.map.addSource(this.source,{type:"geojson",data:(o=this.tropicals)!=null&&o.active?(O=this.tropicals)==null?void 0:O.data:this.empty}),this.map.addLayer({id:this.historyLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","history"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":4,"line-opacity":.5}}),this.map.addLayer({id:this.forecastLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"line-width":3,"line-opacity":.9,"line-dasharray":[1,2]}}),this.map.addLayer({id:this.forecastModelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"symbol-placement":"line","text-field":"{model}","text-rotation-alignment":"viewport","text-size":13},paint:{"text-color":["match",["get","model"],"cma","#000","jma","#000","ecmwf","#fff","ukm","#fff","noaa-at","#fff","noaa-ep","#fff","#000"],"text-opacity":1,"text-halo-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"text-halo-width":4}}),d=new Date().valueOf()-(n+s),console.log("[tropical] add elapsed: ",d,", total: ",s+=d)),(c=this.map)!=null&&c.getSource(this.clusterSource)?((a=this.map)==null||a.getSource(this.clusterSource).setData((e=this.tropicals)!=null&&e.active?this.tropicals.data:this.empty),d=new Date().valueOf()-(n+s),console.log("[tropical] update elapsed: ",d,", total: ",s+=d)):(this.map.addSource(this.clusterSource,{type:"geojson",data:(q=this.tropicals)!=null&&q.active?(r=this.tropicals)==null?void 0:r.data:this.empty}),this.map.addLayer({id:this.pointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":6,"circle-color":"#fff"}}),this.map.addLayer({id:this.pointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],paint:{"circle-radius":4,"circle-color":["case",["boolean",["==",["get","spd",["get","wind"]],null]],"#03f869",["boolean",["<",["get","spd",["get","wind"]],17.2]],"#03f869",["boolean",["<=",["get","spd",["get","wind"]],24.5]],"#f2f202",["boolean",["<=",["get","spd",["get","wind"]],32.7]],"#ff9100",["boolean",["<=",["get","spd",["get","wind"]],41.5]],"#f44336",["boolean",["<",["get","spd",["get","wind"]],51]],"#f903d0",["boolean",[">=",["get","spd",["get","wind"]],51]],"#8702f9","#fff"]}}),this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.historyPointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":7,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":5,"circle-color":"rgba(0,0,0,0.7)"}}),this.map.addLayer({id:this.historyPointCircleLayer+"-inner",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],paint:{"circle-radius":3,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showHistoryLabel",!0],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":14},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.forecastNameLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","showNameLabel",!0]],layout:{"text-field":["get","name"],"text-offset":[0,1.5],"text-anchor":"bottom","text-size":16,"text-allow-overlap":!0,"text-ignore-placement":!0},paint:{"text-color":"#fff","text-halo-color":"#0033ff","text-halo-width":4}}),d=new Date().valueOf()-(n+s),console.log("[tropical] add elapsed: ",d,", total: ",s+=d))}this.handleDrawCircle();const t=x.TropicalHelper.interpolate(this.tropicals,1);this.interpolateData=JSON.parse(JSON.stringify(t)),this.interpolateData.filter(n=>n.properties.name==="kristy"&&n.properties.model==="ecmwf"),this.handleDateChange()}},handleClear(){var z;this.map&&(this.map.getLayer(this.historyLayer)&&this.map.removeLayer(this.historyLayer),this.map.getLayer(this.forecastLayer)&&this.map.removeLayer(this.forecastLayer),this.map.getLayer(this.forecastModelLayer)&&this.map.removeLayer(this.forecastModelLayer),this.map.getLayer(this.forecastNameLayer)&&this.map.removeLayer(this.forecastNameLayer),this.map.getLayer(this.pointCircleLayer)&&this.map.removeLayer(this.pointCircleLayer),this.map.getLayer(this.pointCircleLayer+"-border")&&this.map.removeLayer(this.pointCircleLayer+"-border"),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.historyPointCircleLayer)&&this.map.removeLayer(this.historyPointCircleLayer),this.map.getLayer(this.historyPointCircleLayer+"-border")&&this.map.removeLayer(this.historyPointCircleLayer+"-border"),this.map.getLayer(this.historyPointCircleLayer+"-inner")&&this.map.removeLayer(this.historyPointCircleLayer+"-inner"),this.map.getLayer(this.historyPointLabelLayer)&&this.map.removeLayer(this.historyPointLabelLayer),this.map.getLayer(this.interpolateLineLayer)&&this.map.removeLayer(this.interpolateLineLayer),(z=this.interpolateMarkers)==null||z.forEach(b=>b==null?void 0:b.remove()),this.map.getSource(this.source)&&this.map.removeSource(this.source),this.map.getSource(this.clusterSource)&&this.map.removeSource(this.clusterSource),this.map.getSource(this.interpolateSource)&&this.map.removeSource(this.interpolateSource),this.map.getLayer(this.circleLayer)&&this.map.removeLayer(this.circleLayer),this.map.getSource(this.circleSource)&&this.map.removeSource(this.circleSource))},handleDateChange(){var z,b,p,o,O,c,e,a,q,r,t,n,s,d,u,L,W,h,R,N,w,g,P,Q,_,l,m,Z,p0,r0,b0,t0,K,n0,d0,a0;if((z=this.interpolateMarkers)==null||z.forEach(z0=>z0==null?void 0:z0.remove()),this.circleSourceData.features=[],(b=this.interpolateData)!=null&&b.length&&this.tropicals.active){const z0=S(this.date).utc().set({minute:0,second:0,millisecond:0}),o0=this.interpolateData.filter(T=>T.properties.date===z0.format()&&!T.properties.disabled),s0=this.handleComputePolygons(o0),c0=X.featureCollection([...o0]);s0.forEach(T=>{c0.features.push(T)}),(p=this.map)!=null&&p.getSource(this.interpolateSource)?(o=this.map)==null||o.getSource(this.interpolateSource).setData(c0):((O=this.map)==null||O.addSource(this.interpolateSource,{type:"geojson",data:c0}),(c=this.map)==null||c.addLayer({id:this.interpolateLineLayer,type:"line",source:this.interpolateSource,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-opacity":1,"line-color":["match",["get","level"],7,"#ff9100",10,"#f44336","#ffffff"],"line-width":1}})),this.interpolateMarkers=[];for(const T of o0)if(!T.properties.disabled){let F="#f44336";((a=(e=T.properties)==null?void 0:e.wind)==null?void 0:a.spd)<17.2||!((r=(q=T.properties)==null?void 0:q.wind)!=null&&r.spd)?F="#03f869":((n=(t=T.properties)==null?void 0:t.wind)==null?void 0:n.spd)>=17.2&&((d=(s=T.properties)==null?void 0:s.wind)==null?void 0:d.spd)<24.5?F="#f2f202":((L=(u=T.properties)==null?void 0:u.wind)==null?void 0:L.spd)>=24.5&&((h=(W=T.properties)==null?void 0:W.wind)==null?void 0:h.spd)<32.7?F="#ff9100":((N=(R=T.properties)==null?void 0:R.wind)==null?void 0:N.spd)>=32.7&&((g=(w=T.properties)==null?void 0:w.wind)==null?void 0:g.spd)<41.5?F="#f44336":((Q=(P=T.properties)==null?void 0:P.wind)==null?void 0:Q.spd)>=41.5&&((l=(_=T.properties)==null?void 0:_.wind)==null?void 0:l.spd)<51?F="#f903d0":((Z=(m=T.properties)==null?void 0:m.wind)==null?void 0:Z.spd)>=51?F="#8702f9":F="#f44336";const $=`<svg t="1719918955501"
196
196
  class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
197
197
  xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
198
198
  <path
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idmwx/idmui-gl3",
3
3
  "private": false,
4
- "version": "5.1.5",
4
+ "version": "5.1.6",
5
5
  "description": "idm webgl3",
6
6
  "type": "module",
7
7
  "keywords": [