@idmwx/idmui-gl3 6.4.2 → 6.4.3
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 +1 -1
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5625,7 +5625,7 @@ const Oa = {
|
|
|
5625
5625
|
const P = this.findClosestToNumber(_, "hour", m + y * 24);
|
|
5626
5626
|
if (P && ((D = P == null ? void 0 : P.properties) == null ? void 0 : D.hour) === ((N = b.properties) == null ? void 0 : N.hour) && (w = P), w) {
|
|
5627
5627
|
let _e = 0, J = "tropical-marker-box", q = "tropical-marker-line";
|
|
5628
|
-
J = ((G = (j = (H = w.properties) == null ? void 0 : H.wind) == null ? void 0 : j.en) == null ? void 0 : G.toUpperCase()) === "SUPER TY" ? J + " supper" : J + " normal", q = ((re = (ce = (W = w.properties) == null ? void 0 : W.wind) == null ? void 0 : ce.en) == null ? void 0 : re.toUpperCase()) === "SUPER TY" ? q + " supper" : q + " normal", ((we = (de = w.properties) == null ? void 0 : de.movement) == null ? void 0 : we.deg) >= 0 && ((ve = (pe = w.properties) == null ? void 0 : pe.movement) == null ? void 0 : ve.deg) <= 60 || ((U = (me = w.properties) == null ? void 0 : me.movement) == null ? void 0 : U.deg) >= 120 && ((ye = (Z = w.properties) == null ? void 0 : Z.movement) == null ? void 0 : ye.deg) <= 240 || ((fe = (ne = w.properties) == null ? void 0 : ne.movement) == null ? void 0 : fe.deg) >= 300 && ((be = (Ce = w.properties) == null ? void 0 : Ce.movement) == null ? void 0 : be.deg) <= 360 ? (_e = y % 2 === 0 ? [84, 0] : [-84, 0], J = y % 2 === 0 ? J + " right" : J + " left", q = y % 2 === 0 ? q + " vertical right" : q + " vertical left") : (_e = v % 2 === 0 ? [60, 40] : [60,
|
|
5628
|
+
J = ((G = (j = (H = w.properties) == null ? void 0 : H.wind) == null ? void 0 : j.en) == null ? void 0 : G.toUpperCase()) === "SUPER TY" ? J + " supper" : J + " normal", q = ((re = (ce = (W = w.properties) == null ? void 0 : W.wind) == null ? void 0 : ce.en) == null ? void 0 : re.toUpperCase()) === "SUPER TY" ? q + " supper" : q + " normal", ((we = (de = w.properties) == null ? void 0 : de.movement) == null ? void 0 : we.deg) >= 0 && ((ve = (pe = w.properties) == null ? void 0 : pe.movement) == null ? void 0 : ve.deg) <= 60 || ((U = (me = w.properties) == null ? void 0 : me.movement) == null ? void 0 : U.deg) >= 120 && ((ye = (Z = w.properties) == null ? void 0 : Z.movement) == null ? void 0 : ye.deg) <= 240 || ((fe = (ne = w.properties) == null ? void 0 : ne.movement) == null ? void 0 : fe.deg) >= 300 && ((be = (Ce = w.properties) == null ? void 0 : Ce.movement) == null ? void 0 : be.deg) <= 360 ? (_e = y % 2 === 0 ? [84, 0] : [-84, 0], J = y % 2 === 0 ? J + " right" : J + " left", q = y % 2 === 0 ? q + " vertical right" : q + " vertical left") : (_e = v % 2 === 0 ? [60, -40] : [60, 40], J = v % 2 === 0 ? J + " top" : J + " bottom", q = v % 2 === 0 ? q + " align top" : q + " align bottom", v = v + 1);
|
|
5629
5629
|
const S = document.createElement("div");
|
|
5630
5630
|
S.className = J, S.innerHTML = `
|
|
5631
5631
|
<div style="">
|
package/dist/index.umd.cjs
CHANGED
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
fract(pos * 255.0),
|
|
189
189
|
floor(pos * 255.0) / 255.0);
|
|
190
190
|
}`);class Ve{constructor(e="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg"){J(this,"token");J(this,"mapboxCustomer");J(this,"i4");J(this,"hi");J(this,"td");J(this,"windy");this.token=e,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:0,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]}},worldMarineLine:{id:"ne-10m-outline",type:"line",source:"composite","source-layer":"ne_10m_geography_marine_polys-3968bv",minzoom:1,layout:{"line-join":"round",visibility:"none"},paint:{"line-color":"hsl(0, 0.60%, 34.70%)","line-opacity":1,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2],"line-translate":[0,0]}},worldMarineLabel:{id:"ne-10m-label",type:"symbol",source:"composite","source-layer":"ne_10m_geography_marine_polys-3968bv",minzoom:1,layout:{"text-field":["to-string",["get","name"]],"text-size":13,visibility:"none"},paint:{"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-halo-blur":1}},chinaRouteLine:{id:"china-route-line",type:"line",source:"composite","source-layer":"china_route-bdtx5d",layout:{visibility:"none"},paint:{"line-color":["interpolate",["linear"],["zoom"],0,"rgb(2,196,140)",22,"rgb(2,196,140)"],"line-width":2}},chinaRouteFill:{id:"china-route-fill",type:"fill",source:"composite","source-layer":"china_route-bdtx5d",filter:["match",["get","featureType"],["route"],!0,!1],layout:{visibility:"none"},paint:{"fill-color":"rgb(2,196,140)","fill-opacity":.2}},chinaRouteLabel:{id:"china-route-label",type:"symbol",source:"composite","source-layer":"china_route-bdtx5d",layout:{"text-field":["to-string",["get","RouteName"]],"text-size":12,visibility:"none"},paint:{"text-halo-color":"hsl(0, 0%, 96%)","text-halo-width":1,"text-color":"hsl(0, 1%, 2%)"}}}},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://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/7zoestv3ytlgmyxxrlljl4rzs",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,neatchenheng.a4ifbysm,neatchenheng.27issko0,neatchenheng.afzf6vzv",data:{attribution:'<a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">© Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">© OpenStreetMap</a> <a href="https://www.mapbox.com/about/maps/" target="_blank" title="Mapbox" aria-label="Mapbox">© Mapbox</a> <a href="https://www.openstreetmap.org/about/" target="_blank" title="OpenStreetMap" aria-label="OpenStreetMap">© 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:"nic_miz2025169nc_pl_a-cqk3ud + china_route-bdtx5d + ne_10m_geography_marine_polys-3968bv + eez_12nm_new1-6jzkww + eez-d4udtm + Mapbox Countries v1 + Mapbox Bathymetry v2 + Mapbox Terrain v2 + Mapbox Streets v8",scheme:"xyz",tilejson:"3.0.0",tiles:["https://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1,neatchenheng.d44z21eg,neatchenheng.82kqbc1q,neatchenheng.a4ifbysm,neatchenheng.27issko0/{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,neatchenheng.d44z21eg,neatchenheng.82kqbc1q,neatchenheng.a4ifbysm,neatchenheng.27issko0/{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:0,source:"neatchenheng.82kqbc1q"},{id:"ne_10m_geography_marine_polys-3968bv",maxzoom:22,minzoom:0,source:"neatchenheng.a4ifbysm",source_name:"ne_10m_geography_marine_polys-3968bv"},{id:"china_route-bdtx5d",maxzoom:22,minzoom:0,source:"neatchenheng.27issko0",source_name:"china_route-bdtx5d"},{description:"",fields:{ICECODE:"String",ORIG_FID:"Number",Shape_Area:"Number",Shape_Leng:"Number"},id:"nic_miz2025169nc_pl_a-cqk3ud",maxzoom:22,minzoom:0,source:"neatchenheng.afzf6vzv",source_name:"nic_miz2025169nc_pl_a-cqk3ud"}],worldview_default:"US",worldview_options:{ALL:"Every available worldview",AR:"Argentina",CN:"China",IN:"India",JP:"Japan",MA:"Morocco",RS:"Serbia",RU:"Russia",TR:"Turkey",US:"United States",VN:"Vietnam"}}}},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:0,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]}},{id:"ne-10m-outline",type:"line",source:"composite","source-layer":"ne_10m_geography_marine_polys-3968bv",layout:{visibility:"none"},paint:{"line-color":"hsl(172, 0%, 33%)"}},{id:"ne-10m-label",type:"symbol",source:"composite","source-layer":"ne_10m_geography_marine_polys-3968bv",layout:{"text-field":["to-string",["get","name"]],"text-size":13,visibility:"none"},paint:{"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-halo-blur":1}},{id:"china-route-line",type:"line",source:"composite","source-layer":"china_route-bdtx5d",layout:{visibility:"none"},paint:{"line-color":["interpolate",["linear"],["zoom"],0,"rgb(11, 168, 121)",22,"rgb(11, 168, 121)"],"line-width":2}},{id:"china-route-fill",type:"fill",source:"composite","source-layer":"china_route-bdtx5d",filter:["match",["get","featureType"],["route"],!0,!1],layout:{visibility:"none"},paint:{"fill-color":"rgb(11, 168, 121)","fill-opacity":.2}},{id:"china-route-label",type:"symbol",source:"composite","source-layer":"china_route-bdtx5d",layout:{"text-field":["to-string",["get","RouteName"]],"text-size":12,visibility:"none"},paint:{"text-halo-color":"hsl(0, 0%, 96%)","text-halo-width":1,"text-color":"hsl(0, 1%, 2%)"}},{id:"ice-edge",type:"line",paint:{"line-color":"rgb(252, 182, 182)"},layout:{visibility:"visible"},source:"composite","source-layer":"nic_miz2025169nc_pl_a-cqk3ud"}]}}}const No="",Ot={name:"IdmWindParticle",props:{factor:{type:Object},viewport:{type:Te},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 ke,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:[-50,50],sRange:[0,50],scale:1},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var i;(i=this.factor)!=null&&i.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var i;this.right=(((i=document.getElementsByClassName("right-bar")[0])==null?void 0:i.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const i=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(i+e),console.log("[wind-particle] add elapsed: ",a,", total: ",e+=a)}},handleClear(){var i,e,a,o,r,s,n,l;(i=this.viewport)==null||i.toggle(!1),(e=this.viewport)==null||e.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(a=this.viewport)==null?void 0:a.map)==null||o.off("resize",this.handleResize),(s=(r=this.viewport)==null?void 0:r.map)==null||s.off("movestart",this.handlePause),(l=(n=this.viewport)==null?void 0:n.map)==null||l.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const i=[[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,i);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,Z.vertexSchema,Z.uvFragmentSchema);this.program=e,this.aPositionBuffer=a}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const i=[[0,"rgb(183,224,224)"],[1,"rgb(217,220,220)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,ye.vertexSchema,ye.fragmentSchema,ye.quadVertSchema,ye.screenFragmentSchema,ye.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,i,!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 i=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,i),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,i),this.wrapper.image=i}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()})}}},Rt={key:0};function jt(i,e,a,o,r,s){var n;return(n=a.factor)!=null&&n.active?(t.openBlock(),t.createElementBlock("div",Rt,[t.createElementVNode("div",{class:"legend-bars flex-center",style:t.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},e[0]||(e[0]=[t.createElementVNode("span",null,"kts",-1),t.createElementVNode("span",null,"0",-1),t.createElementVNode("span",null,"5",-1),t.createElementVNode("span",null,"10",-1),t.createElementVNode("span",null,"20",-1),t.createElementVNode("span",null,"30",-1),t.createElementVNode("span",null,"40",-1),t.createElementVNode("span",null,"60",-1)]),4)])):t.createCommentVNode("",!0)}const Wt=O(Ot,[["render",jt],["__scopeId","data-v-e5910f11"]]),zo="",Gt={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"},toggleParticeVersion:{type:Number},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:z.featureCollection([]),right:10,bottom:95}},watch:{"current.version":{handler(){var i;(i=this.current)!=null&&i.active&&this.showCurrentIsoband?this.handleRender():this.handleClear(),this.$emit("handleToggleVersion")},deep:!0},toggleParticeVersion:{handler(){this.handleParticle()}},showCurrentIsoband:{handler(){this.handleToggle()}}},methods:{handleParticle(){this.$emit("particle",{particle:this.showCurrentParticle,key:"current",weight:96})},handleRender(){var i,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.current){const a=new Date().valueOf();let o=0,r=0,s=this.empty;this.current.active&&(s=this.current.data),(i=this.map)!=null&&i.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(a+o),console.log("[current] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),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),r=new Date().valueOf()-(a+o),console.log("[current] add elapsed: ",r,", total: ",o+=r)),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)}}};function Ut(i,e,a,o,r,s){return null}const Yt=O(Gt,[["render",Ut]]),Po="",Kt={name:"IdmCurrentParticle",props:{factor:{type:Object},viewport:{type:Te},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 ke,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],scale:.3},paused:!1,initial:!0,right:10}},watch:{"factor.version":{handler(){var i;(i=this.factor)!=null&&i.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var i;this.right=(((i=document.getElementsByClassName("right-bar")[0])==null?void 0:i.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const i=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(i+e),console.log("[current-particle] add elapsed: ",a,", total: ",e+=a)}},handleClear(){var i,e,a,o,r,s,n,l;(i=this.viewport)==null||i.toggle(!1),(e=this.viewport)==null||e.toggleParticle(!1),this.context=void 0,this.particleContext=void 0,this.etime=void 0,this.initial=!0,(o=(a=this.viewport)==null?void 0:a.map)==null||o.off("resize",this.handleResize),(s=(r=this.viewport)==null?void 0:r.map)==null||s.off("movestart",this.handlePause),(l=(n=this.viewport)==null?void 0:n.map)==null||l.off("moveend",this.handlePlay),this.handlePause()},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const i=[[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,i);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,Z.vertexSchema,Z.uvFragmentSchema);this.program=e,this.aPositionBuffer=a}this.handleParticleSetup()},handleParticleSetup(){if(!this.particleContext){this.particleContext=this.viewport.particleCanvas.getContext("webgl");const i=[[0,"rgb(183,224,224)"],[1,"rgb(199,202,202)"],[.6,"rgb(199,202,202)"]];this.wrapper=this.webgl.bindParticle(this.particleContext,ye.vertexSchema,ye.fragmentSchema,ye.quadVertSchema,ye.screenFragmentSchema,ye.updateFragmentSchema),this.wrapper.color=this.webgl.setup(this.particleContext,i,!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 i=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,i),this.particleTexture=this.webgl.createTexture(this.particleContext,this.particleContext.NEAREST,this.particleContext.LINEAR,this.particleContext.CLAMP_TO_EDGE,i),this.wrapper.image=i}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()})}}},Xt={key:0};function qt(i,e,a,o,r,s){var n;return(n=a.factor)!=null&&n.active?(t.openBlock(),t.createElementBlock("div",Xt,[t.createElementVNode("div",{class:"legend-bars flex-center",style:t.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},e[0]||(e[0]=[t.createElementVNode("span",null,"kts",-1),t.createElementVNode("span",null,"0",-1),t.createElementVNode("span",null,"0.4",-1),t.createElementVNode("span",null,"0.8",-1),t.createElementVNode("span",null,"1.6",-1),t.createElementVNode("span",null,"2",-1),t.createElementVNode("span",null,"3.2",-1)]),4)])):t.createCommentVNode("",!0)}const Jt=O(Kt,[["render",qt],["__scopeId","data-v-c2962e63"]]),Zt={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:z.featureCollection([])}},watch:{"sigWave.version":{handler(){var i;(i=this.sigWave)!=null&&i.active?(this.handleRender(),this.handleMove()):this.handleClear()},deep:!0}},methods:{handleRender(){var i,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.sigWave){const a=new Date().valueOf();let o=0,r=0,s=this.empty;this.sigWave.active&&(s=this.sigWave.data),(i=this.map)!=null&&i.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(a+o),console.log("[sig.wave] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),this.map.addLayer({id:this.heightLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],layout:{"fill-sort-key":["get","val"]},paint:{"fill-opacity":.7,"fill-color":["step",["get","val"],"rgba(0,235,156,0.4)",2,"rgba(0,235,156,0.4)",3,"#ffed00",4,"#ff9800",5,"#f77800",6,"#e4711e",7,"#e06128",8,"#dc5132",9,"#d5453c",10,"#cd3a46",12,"#be2c50",14,"#b41a5a",16,"#aa1464",18,"#962878",20,"#8c328c"]}},this.beforeLayer),this.map.addLayer({id:this.heightLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":["format",["get","val"],{"font-scale":1}],"text-rotation-alignment":"map","text-line-height":1.3,"text-size":10},paint:{"text-color":["step",["get","val"],"rgba(0, 0, 0, 0.7)",9,"rgba(255,255,255,0.8)"]}},this.beforeLayer),r=new Date().valueOf()-(a+o),console.log("[sig.wave] add elapsed: ",r,", total: ",o+=r))}},handleMove(){var i,e;(e=(i=this.map)==null?void 0:i.getLayer("country-boundaries"))==null||e.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 i,e,a;((i=this.activeWeatherLayers)==null?void 0:i.length)===0&&((a=(e=this.map)==null?void 0:e.getLayer("country-boundaries"))==null||a.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 $t(i,e,a,o,r,s){return t.openBlock(),t.createElementBlock("div")}const ea=O(Zt,[["render",$t]]),ta={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:z.featureCollection([])}},watch:{"swell.version":{handler(){var i;(i=this.swell)!=null&&i.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 i,e;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.swell){const a=new Date().valueOf();let o=0,r=0,s=this.empty;this.swell.active&&(s=this.swell.data),(i=this.map)!=null&&i.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(s),r=new Date().valueOf()-(a+o),console.log("[swell] update elapsed: ",r,", total: ",o+=r)):(this.map.addSource(this.source,{type:"geojson",data:s}),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),r=new Date().valueOf()-(a+o),console.log("[swell] add elapsed: ",r,", total: ",o+=r))}},handleMove(){var i,e;(e=(i=this.map)==null?void 0:i.getLayer("country-boundaries"))==null||e.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 i,e;this.activeWeatherLayers.length===0&&((e=(i=this.map)==null?void 0:i.getLayer("country-boundaries"))==null||e.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 aa(i,e,a,o,r,s){return t.openBlock(),t.createElementBlock("div")}const ia=O(ta,[["render",aa]]),ra={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:z.featureCollection([])}},watch:{"prmsl.version":{handler(){var i;(i=this.prmsl)!=null&&i.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 i,e,a;if(!this.map)setTimeout(()=>{this.handleRender()},500);else if(this.prmsl){const o=new Date().valueOf();let r=0,s=0,n=this.empty;this.prmsl.active&&(n=this.prmsl.data),(i=this.map)!=null&&i.getSource(this.source)?((e=this.map)==null||e.getSource(this.source).setData(n),s=new Date().valueOf()-(o+r),console.log("[prmsl] update elapsed: ",s,", total: ",r+=s)):(this.map.addSource(this.source,{type:"geojson",data:n}),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":.6}}),(a=this.map)==null||a.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":10},paint:{"text-color":"black","text-halo-color":"rgba(255,255,255,1)","text-opacity":.7,"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},`
|
|
191
|
-
`,["get","val"],{"font-scale":1}],"text-rotation-alignment":"map","text-line-height":1.3,"text-size":12},paint:{"text-color":["step",["get","val"],"rgba(255,255,255,0.8)",980,"rgba(0,0,0,0.6)",1100,"rgba(0,0,0,0.6)"],"text-halo-color":["step",["get","val"],"rgba(162,13,2,0.7)",920,"rgba(244,67,54,0.7)",980,"rgba(255,255,0,0.7)",1100,"rgba(199,171,250,0.7)"],"text-halo-width":2}})},0),s=new Date().valueOf()-(o+r),console.log("[prmsl] add elapsed: ",s,", total: ",r+=s))}},handleMove(){var i,e;(e=(i=this.map)==null?void 0:i.getLayer("country-boundaries"))==null||e.setLayoutProperty("visibility","visible")},handleClear(){var i,e;this.activeWeatherLayers.length===0&&((e=(i=this.map)==null?void 0:i.getLayer("country-boundaries"))==null||e.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 oa(i,e,a,o,r,s){return t.openBlock(),t.createElementBlock("div")}const sa=O(ra,[["render",oa]]),Mo="",na={name:"IdmIceEdge",props:{factor:{type:Object},viewport:{type:Object},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 ke,etime:void 0,right:10}},watch:{"factor.version":{handler(){var i;(i=this.factor)!=null&&i.active?this.handleRender():this.handleClear()}},toggleVersion:{handler(){var i;this.right=(((i=document.getElementsByClassName("right-bar")[0])==null?void 0:i.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const i=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(i+e),console.log("[ice-edge] add elapsed: ",a,", total: ",e+=a)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const i=[[0,"rgba(86, 169, 230, 0)"],[1/255,"rgba(86, 169, 230, 0)"],[25/255,"rgba(86, 169, 230, 1)"],[25/255,"rgba(47, 226, 155, 1)"],[100/255,"rgba(47, 226, 155, 1)"],[100/255,"rgba(213, 253, 37, 1)"],[175/255,"rgba(213, 253, 37, 1)"],[175/255,"rgba(230, 176, 39, 1)"],[225/255,"rgba(230, 176, 39, 1)"],[225/255,"rgba(230, 84, 39, 1)"],[250/255,"rgba(230, 84, 39, 1)"],[1,"rgba(230, 84, 39, 1)"]];this.rampColor=this.webgl.setup(this.context,i);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,Z.vertexSchema,Z.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const i=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,i)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},la={key:0};function ca(i,e,a,o,r,s){var n;return(n=a.factor)!=null&&n.active?(t.openBlock(),t.createElementBlock("div",la,[t.createElementVNode("div",{class:"legend-bars flex-center",style:t.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},e[0]||(e[0]=[t.createElementVNode("span",null,null,-1),t.createElementVNode("span",{style:{display:"inline-block",position:"relative",left:"-10px"}},"%",-1),t.createElementVNode("span",null,"10",-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,"40",-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,"70",-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,"90",-1),t.createElementVNode("span",null,null,-1)]),4)])):t.createCommentVNode("",!0)}const ha=O(na,[["render",ca],["__scopeId","data-v-14ae1a6c"]]),So="",da={name:"IdmCover",props:{factor:{type:Object},viewport:{type:Object},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 ke,etime:void 0,right:10}},watch:{"factor.version":{handler(){var i;(i=this.factor)!=null&&i.active?this.handleRender():this.handleClear()}},toggleVersion:{handler(){var i;this.right=(((i=document.getElementsByClassName("right-bar")[0])==null?void 0:i.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const i=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(i+e),console.log("[ice-cover] add elapsed: ",a,", total: ",e+=a)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const i=[[0,"rgba(68, 1, 84, 0)"],[1/255,"rgba(63, 72, 137, 0)"],[50/255,"rgba(53, 125, 177, 1)"],[100/255,"rgba(33, 145, 140, 1)"],[150/255,"rgba(45, 178, 125, 1)"],[200/255,"rgba(112, 207, 87, 1)"],[250/255,"rgba(253, 231, 37, 0.8)"],[1,"rgba(253, 231, 37, 1)"]];this.rampColor=this.webgl.setup(this.context,i);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,Z.vertexSchema,Z.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const i=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,i)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ma={key:0};function pa(i,e,a,o,r,s){var n;return(n=a.factor)!=null&&n.active?(t.openBlock(),t.createElementBlock("div",ma,[t.createElementVNode("div",{class:"legend-bars flex-center",style:t.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},e[0]||(e[0]=[t.createElementVNode("span",null,"%",-1),t.createElementVNode("span",null,"20",-1),t.createElementVNode("span",null,"40",-1),t.createElementVNode("span",null,"60",-1),t.createElementVNode("span",null,"80",-1),t.createElementVNode("span",null,"100",-1)]),4)])):t.createCommentVNode("",!0)}const ga=O(da,[["render",pa],["__scopeId","data-v-f21edb81"]]),To="",ya={name:"IdmThickness",props:{factor:{type:Object},viewport:{type:Object},toggleVersion:{type:Number},bottom:{type:String,default:"70px"}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new ke,etime:void 0,right:10}},watch:{"factor.version":{handler(){var i;(i=this.factor)!=null&&i.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var i;this.right=(((i=document.getElementsByClassName("right-bar")[0])==null?void 0:i.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const i=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(i+e),console.log("[ice-thickness] add elapsed: ",a,", total: ",e+=a)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const i=[[0,"rgba(4, 6, 19, 0)"],[1/255,"rgba(4, 6, 19, 0)"],[20/255,"rgba(51, 50, 102, 1)"],[40/255,"rgba(63, 82, 158, 1)"],[50/255,"rgba(66, 123, 183, 1)"],[60/255,"rgba(92, 161, 197, 1)"],[80/255,"rgba(134, 199, 212, 0.7)"],[100/255,"rgba(134, 199, 212, 1)"],[150/255,"rgba(234, 253, 2536, 0.8)"],[250/255,"rgba(234, 253, 2536, 0.9)"],[1,"rgba(234, 253, 2536, 1)"]];this.rampColor=this.webgl.setup(this.context,i);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,Z.vertexSchema,Z.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const i=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,i)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ua={key:0};function fa(i,e,a,o,r,s){var n;return(n=a.factor)!=null&&n.active?(t.openBlock(),t.createElementBlock("div",ua,[t.createElementVNode("div",{class:"legend-bars flex-center",style:t.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},e[0]||(e[0]=[t.createElementVNode("span",null,"m",-1),t.createElementVNode("span",null,"0",-1),t.createElementVNode("span",null,"0.6",-1),t.createElementVNode("span",null,"1",-1),t.createElementVNode("span",null,"1.5",-1),t.createElementVNode("span",null,"2",-1),t.createElementVNode("span",null,"3",-1)]),4)])):t.createCommentVNode("",!0)}const Aa=O(ya,[["render",fa],["__scopeId","data-v-a4c3d2ed"]]),Me=[{rank:0,name:"Best Match",alias:"BEST MATCH",model:"best_match",models:["best_match"]},{rank:1,name:"GFS",alias:"GFS",model:"gfs_seamless",provider:"NOAA",country:"United States",resolution:25,tips:"3-25km",length:16,frequency:1,models:["gfs_seamless"],categories:"ncep_gfs013,ncep_gfs025,ncep_gfs_graphcast025,ncep_hrrr_conus,ncep_nbm_conus",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:2,name:"ECMWF",alias:"ECMWF",model:"ecmwf_ifs025",provider:"ECMWF",country:"European Union",resolution:25,tips:"25km",length:15,frequency:6,models:["ecmwf_ifs025","ecmwf_aifs025_single"],categories:"ecmwf_ifs025,ecmwf_aifs025_single",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:3,disabled:!0,name:"ICON",alias:"ECMWF",model:"icon_seamless",provider:"Deutscher Wetterdienst (DWD)",country:"Germany",resolution:13,tips:"2-13km",length:7.5,frequency:3,models:["icon_seamless","icon_global","icon_eu","icon_d2"],categories:"dwd_icon,dwd_icon_eps,dwd_icon_d2,dwd_icon_d2_eps,dwd_icon_eu,dwd_icon_eu_eps",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:4,name:"ARPEGE",disabled:!0,alias:"ECMWF",model:"arpege_seamless",provider:"Météo-France",country:"France",resolution:25,tips:"1-25km",length:4,frequency:1,models:["arpege_seamless","arpege_world","arpege_europe"],categories:"meteofrance_arpege_europe,meteofrance_arpege_europe_probabilities,meteofrance_arpege_world025",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:5,name:"UKMO",disabled:!0,alias:"ECMWF",model:"ukmo_seamless",provider:"UK Met Office",country:"United Kingdom",resolution:10,tips:"2-10km",length:7,frequency:1,models:["ukmo_seamless","ukmo_global_deterministic_10km","ukmo_uk_deterministic_2km"],categories:"ukmo_global_deterministic_10km,ukmo_uk_deterministic_2km",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:6,name:"JMA",disabled:!0,alias:"GFS",model:"jma_seamless",provider:"JMA",country:"Japan",resolution:55,tips:"5-55km",length:11,frequency:3,models:["jma_seamless","jma_msm","jma_gsm"],categories:"jma_gsm,jma_msm",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:7,name:"GEM",disabled:!0,alias:"GFS",model:"gem_seamless",provider:"Canadian Weather Service",country:"Canada",resolution:2.5,tips:"2.5km",length:10,frequency:6,models:["gem_seamless","gem_global","gem_regional"],categories:"cmc_gem_gdps,cmc_gem_hrdps,cmc_gem_rdps",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:8,name:"GRAPES",disabled:!0,alias:"GFS",model:"cma_grapes_global",provider:"China Meteorological Administration (CMA)",country:"China",resolution:15,tips:"15km",length:10,frequency:6,models:["cma_grapes_global"],categories:"cma_grapes_global",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:9,name:"ACCESS-G",disabled:!0,alias:"GFS",model:"bom_access_global",provider:"Australian Bureau of Meteorology (BOM)",country:"Australia",resolution:15,tips:"15km",length:10,frequency:6,models:["bom_access_global"],categories:"bom_access_global",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"}],Se=[{rank:0,name:"Best Match",alias:"BEST MATCH",model:"best_match",models:["best_match"]},{rank:1,name:"MFWAM",alias:"ECMWF",model:"meteofrance_wave",provider:"MeteoFrance",country:"France",resolution:8,tips:"8km",length:10,frequency:12,models:["meteofrance_wave"],categories:"meteofrance_wave",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:2,disabled:!0,name:"SMOC",alias:"ECMWF",model:"meteofrance_currents",provider:"MeteoFrance",country:"France",resolution:8,tips:"8km",length:10,frequency:24,models:["meteofrance_currents"],categories:"meteofrance_currents, meteofrance_sea_surface_temperature",variables:"ocean_u_current,ocean_v_current,invert_barometer_height,sea_level_height_msl,sea_surface_temperature"},{rank:3,disabled:!0,name:"EWAM",alias:"ECMWF",model:"ewam",provider:"DWD",country:"Germany",resolution:5,tips:"5km",length:8,frequency:2,models:["ewam"],categories:"dwd_ewam",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:4,disabled:!0,name:"GWAM",alias:"ECMWF",model:"gwam",provider:"DWD",country:"Germany",resolution:5,tips:"5km",length:4,frequency:2,models:["gwam"],categories:"dwd_gwam",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:5,disabled:!0,name:"ECWAM",alias:"ECMWF",model:"ecmwf_wam025",provider:"ECMWF",country:"Europe",resolution:25,tips:"25km",length:10,frequency:6,models:["ecmwf_wam025"],categories:"ecmwf_wam025",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:6,name:"GFSWave",alias:"GFS",model:"ncep_gfswave025",provider:"NCEP",country:"USA",resolution:25,tips:"25km",length:10,frequency:6,models:["ncep_gfswave025","ncep_gfswave016"],categories:"ncep_gfswave025,ncep_gfswave016",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:7,disabled:!0,name:"ERA5-Ocean",alias:"ECMWF",model:"era5_ocean",provider:"Copernicus",country:"Europe",resolution:50,tips:"50km",length:-5,frequency:1,models:["era5_ocean"],categories:"copernicus_era5_ocean",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"}];class Fe{static standardWeatherModels(){return Me.filter(e=>!e.disabled&&e.alias)}static standardMarineModels(){return Se.filter(e=>!e.disabled&&e.alias)}static autoPickLayerModel(e,a="copernicus"){return a=a||"copernicus",a=a==null?void 0:a.toLowerCase(),a=["gfs","ecmwf","copernicus"].includes(a)?a:"copernicus",e=e==null?void 0:e.toLowerCase(),e==="gfs"?"gfs":["ec","ecmwf"].includes(e)?"ecmwf":["copernicus","cmems"].includes(e)?"copernicus":a}static autoPickPeerModel(e,a,o="copernicus"){if(a=this.autoPickLayerModel(a,o),ee.LayerHelper.WEATHER_LAYERS.reduce((r,s)=>s.atmos?r+s.weight:r,0)&e.weight){if(a==="copernicus")return"ecmwf"}else if(a==="ecmwf")return"copernicus";return a}static autoPickMeteoModel(e="best_match"){var a,o;e=e==null?void 0:e.toLowerCase(),e=e==="ec"?"ecmwf":e;const r=e.toLowerCase().split(","),s=[],n=[];for(const l of r){let h=Me.find(c=>{var m,b,C;return((m=c.models)==null?void 0:m.includes(l))||((b=c.alias)==null?void 0:b.toLowerCase())===l||((C=c.name)==null?void 0:C.toLowerCase())===l}),d=Se.find(c=>{var m,b,C;return((m=c.models)==null?void 0:m.includes(l))||((b=c.alias)==null?void 0:b.toLowerCase())===l||((C=c.name)==null?void 0:C.toLowerCase())===l});h=h||Me.find(c=>{var m,b;return((m=c.alias)==null?void 0:m.toLowerCase())===((b=d==null?void 0:d.alias)==null?void 0:b.toLowerCase())}),d=d||Se.find(c=>{var m,b;return((m=c.alias)==null?void 0:m.toLowerCase())===((b=h==null?void 0:h.alias)==null?void 0:b.toLowerCase())}),h=h||Me[0],d=d||Se[0],s.push((a=h.models)!=null&&a.includes(l)?l:h.model),n.push((o=d.models)!=null&&o.includes(l)?l:d.model)}return{weatherModels:s.join(","),marineModels:n.join(",")}}static autoPickSubCategories(e){e=e.toUpperCase();const a=Me.filter(s=>s.alias===e),o=Se.filter(s=>s.alias===e),r=[];return a.forEach(s=>{s.categories&&r.push(...s.categories.split(","))}),o.forEach(s=>{s.categories&&r.push(...s.categories.split(","))}),r}static pickHourly(e,a){var o,r,s,n,l,h,d,c,m,b,C,B,u,E,v,g,A,p,w,y,f,I,_,S,M,Q,V,H,ae,q,ie,ce,re,he,oe,F,K,se,te,ne,pe,de,ge,x,Ae,me,we,fe,Le,ue;const G=typeof a=="string"?j(a):a,Y=e==null?void 0:e.weather,N=e==null?void 0:e.marine,be=j((r=(o=Y==null?void 0:Y[0])==null?void 0:o.hourly)==null?void 0:r.date).utc(),R=be.clone().add((l=(n=(s=Y==null?void 0:Y[0])==null?void 0:s.hourly)==null?void 0:n.time)==null?void 0:l.at(0),"h"),X=be.clone().add((c=(d=(h=Y==null?void 0:Y[0])==null?void 0:h.hourly)==null?void 0:d.time)==null?void 0:c.at(-1),"h"),xe=[];if(G.isBetween(R,X,"millisecond","[]")){const D=G.utc().diff(R,"h",!1);let le,Ce;if(Y){let Ee=0,Be=0;for(const k of Y){const T=k==null?void 0:k.hourly;for(let Ie=D-(D-1)%3;Ie<=D;Ie++)Ee+=(m=T==null?void 0:T.precipitation)==null?void 0:m.at(Ie);for(let Ie=D-(D-1)%6;Ie<=D;Ie++)Be+=(b=T==null?void 0:T.precipitation)==null?void 0:b.at(Ie);le={temp:(C=T==null?void 0:T.temperature_2m)==null?void 0:C.at(D),apparentTemp:(B=T==null?void 0:T.apparent_temperature)==null?void 0:B.at(D),rh:(u=T==null?void 0:T.relative_humidity_2m)==null?void 0:u.at(D),dp:(E=T==null?void 0:T.dew_point_2m)==null?void 0:E.at(D),precip:{probability:(v=T==null?void 0:T.precipitation_probability)==null?void 0:v.at(D),sum:(g=T==null?void 0:T.precipitation)==null?void 0:g.at(D),sum3Hours:Math.round(Ee*100)/100,sum6Hours:Math.round(Be*100)/100},pmsl:(A=T==null?void 0:T.pressure_msl)==null?void 0:A.at(D),psurf:(p=T==null?void 0:T.surface_pressure)==null?void 0:p.at(D),code:(w=T==null?void 0:T.weather_code)==null?void 0:w.at(D),visibility:this.m2nm((y=T==null?void 0:T.visibility)==null?void 0:y.at(D)),wind:{speed:(f=T==null?void 0:T.wind_speed_10m)==null?void 0:f.at(D),kts:(I=T==null?void 0:T.wind_speed_10m)==null?void 0:I.at(D),degree:(_=T==null?void 0:T.wind_direction_10m)==null?void 0:_.at(D),bearing:((S=T==null?void 0:T.wind_direction_10m)==null?void 0:S.at(D))!==null?(((M=T==null?void 0:T.wind_direction_10m)==null?void 0:M.at(D))+180)%360:null,gusts:(Q=T==null?void 0:T.wind_gusts_10m)==null?void 0:Q.at(D)},isDay:(V=T==null?void 0:T.is_day)==null?void 0:V.at(D)};const{name:Ne,url:ze,bg:$}=this.parseWeatherCode(le.code,le.isDay);le.name=Ne,le.url=ze,le.bg=$,le.wind.scale=this.beaufort(this.kts2ms(le.wind.kts)),le.wind.direction=this.degree2Direction(le.wind.degree),xe.push({utc:R.add(D,"h").format(),model:k.model,weather:{...le}})}}if(N){let Ee=0;for(const Be of N){const k=Be==null?void 0:Be.hourly;Ce={wave:{sig:{height:(H=k==null?void 0:k.wave_height)==null?void 0:H.at(D),degree:(ae=k==null?void 0:k.wave_direction)==null?void 0:ae.at(D),bearing:((q=k==null?void 0:k.wave_direction)==null?void 0:q.at(D))!==null?(((ie=k==null?void 0:k.wave_direction)==null?void 0:ie.at(D))+180)%360:null,period:(ce=k==null?void 0:k.wave_period)==null?void 0:ce.at(D)},swell:{height:(re=k==null?void 0:k.swell_wave_height)==null?void 0:re.at(D),degree:(he=k==null?void 0:k.swell_wave_direction)==null?void 0:he.at(D),bearing:((oe=k==null?void 0:k.swell_wave_direction)==null?void 0:oe.at(D))!==null?(((F=k==null?void 0:k.swell_wave_direction)==null?void 0:F.at(D))+180)%360:null,period:(K=k==null?void 0:k.swell_wave_period)==null?void 0:K.at(D),peakPeriod:(se=k==null?void 0:k.swell_wave_peak_period)==null?void 0:se.at(D)},wd:{height:(te=k==null?void 0:k.wind_wave_height)==null?void 0:te.at(D),degree:(ne=k==null?void 0:k.wind_wave_direction)==null?void 0:ne.at(D),bearing:((pe=k==null?void 0:k.wind_wave_direction)==null?void 0:pe.at(D))!==null?(((de=k==null?void 0:k.wind_wave_direction)==null?void 0:de.at(D))+180)%360:null,period:(ge=k==null?void 0:k.wind_wave_period)==null?void 0:ge.at(D),peakPeriod:(x=k==null?void 0:k.wind_wave_peak_period)==null?void 0:x.at(D)}},current:{speed:(Ae=k==null?void 0:k.ocean_current_velocity)==null?void 0:Ae.at(D),kts:(me=k==null?void 0:k.ocean_current_velocity)==null?void 0:me.at(D),degree:(we=k==null?void 0:k.ocean_current_direction)==null?void 0:we.at(D),bearing:((fe=k==null?void 0:k.ocean_current_direction)==null?void 0:fe.at(D))??null},sst:(Le=k==null?void 0:k.sea_surface_temperature)==null?void 0:Le.at(D),height:(ue=k==null?void 0:k.sea_level_height_msl)==null?void 0:ue.at(D)},Ce.wave=this.parseWave(Ce.wave,le==null?void 0:le.wind),Ce.current.direction=this.degree2Direction(Ce.current.degree),Object.assign(xe[Ee],Ce),Ee++}}}return xe}static toLegacy(e){var a,o,r,s,n,l,h,d,c,m;return{wind:(a=e==null?void 0:e.weather)==null?void 0:a.wind,visibility:(o=e==null?void 0:e.weather)==null?void 0:o.visibility,temp:(r=e==null?void 0:e.weather)==null?void 0:r.temp,prmsl:(s=e==null?void 0:e.weather)==null?void 0:s.pmsl,gusts:{kts:(l=(n=e==null?void 0:e.weather)==null?void 0:n.wind)==null?void 0:l.gusts},precip:(h=e==null?void 0:e.weather)==null?void 0:h.precip,code:(d=e==null?void 0:e.weather)==null?void 0:d.code,name:(c=e==null?void 0:e.weather)==null?void 0:c.name,url:(m=e==null?void 0:e.weather)==null?void 0:m.url,wave:e==null?void 0:e.wave,current:e==null?void 0:e.current,sst:e==null?void 0:e.sst,height:e==null?void 0:e.height,utc:e==null?void 0:e.utc,source:e==null?void 0:e.model}}static pickDaily(e,a){var o,r,s,n,l,h,d,c,m,b,C,B,u,E,v,g,A,p,w,y,f,I,_,S,M,Q,V,H,ae,q,ie,ce,re,he,oe,F,K,se,te,ne,pe,de,ge,x;const Ae=typeof a=="string"?j(a):a,me=e==null?void 0:e.weather,we=e==null?void 0:e.marine,fe=j((s=(r=(o=me==null?void 0:me[0])==null?void 0:o.daily)==null?void 0:r.time)==null?void 0:s.at(0)),Le=j((h=(l=(n=me==null?void 0:me[0])==null?void 0:n.daily)==null?void 0:l.time)==null?void 0:h.at(-1)),ue=[];if(Ae.isBetween(fe,Le,"millisecond","[]")){let G,Y;const N=Ae.diff(fe,"d",!1);if(me)for(const be of me){const R=be.daily;G={code:(d=R.weather_code)==null?void 0:d.at(N),temp:{max:(c=R.temperature_2m_max)==null?void 0:c.at(N),min:(m=R.temperature_2m_min)==null?void 0:m.at(N),mean:(b=R.temperature_2m_mean)==null?void 0:b.at(N)},apparentTemp:{max:(C=R.apparent_temperature_max)==null?void 0:C.at(N),min:(B=R.apparent_temperature_min)==null?void 0:B.at(N)},precip:{sum:(u=R.precipitation_sum)==null?void 0:u.at(N),rainSum:(E=R.rain_sum)==null?void 0:E.at(N),snowfallSum:(v=R.snowfall_sum)==null?void 0:v.at(N),showersSum:(g=R.showers_sum)==null?void 0:g.at(N),hours:(A=R.precipitation_hours)==null?void 0:A.at(N),probability:(p=R.precipitation_probability_max)==null?void 0:p.at(N)},rh:{max:(w=R.relative_humidity_2m_max)==null?void 0:w.at(N),min:(y=R.relative_humidity_2m_min)==null?void 0:y.at(N),mean:(f=R.relative_humidity_2m_mean)==null?void 0:f.at(N)},wind:{speed:(I=R.wind_speed_10m_max)==null?void 0:I.at(N),kts:(_=R.wind_speed_10m_max)==null?void 0:_.at(N),degree:(S=R.wind_direction_10m_dominant)==null?void 0:S.at(N),gusts:(M=R.wind_gusts_10m_max)==null?void 0:M.at(N),bearing:((Q=R.wind_direction_10m_dominant)==null?void 0:Q.at(N))!==null?(((V=R.wind_direction_10m_dominant)==null?void 0:V.at(N))+180)%360:null}};const{name:X,url:xe,bg:D}=this.parseWeatherCode(G.code,!0);G.name=X,G.url=xe,G.bg=D,G.wind.scale=this.beaufort(this.kts2ms(G.wind.kts)),G.wind.direction=this.degree2Direction(G.wind.degree),ue.push({utc:fe.add(N,"d").utc().format(),model:be.model,weather:{...G}})}if(we){let be=0;for(const R of we){const X=R.daily;Y={wave:{sig:{height:(H=X.wave_height_max)==null?void 0:H.at(N),degree:(ae=X.wave_direction_dominant)==null?void 0:ae.at(N),period:(q=X.wave_period_max)==null?void 0:q.at(N),bearing:((ie=X.wave_direction_dominant)==null?void 0:ie.at(N))!==null?(((ce=X.wave_direction_dominant)==null?void 0:ce.at(N))+180)%360:null},swell:{height:(re=X.swell_wave_height_max)==null?void 0:re.at(N),degree:(he=X.swell_wave_direction_dominant)==null?void 0:he.at(N),period:(oe=X.swell_wave_period_max)==null?void 0:oe.at(N),peakPeriod:(F=X.swell_wave_peak_period_max)==null?void 0:F.at(N),bearing:((K=X.swell_wave_direction_dominant)==null?void 0:K.at(N))!==null?((se=X.swell_wave_direction_dominant)==null?void 0:se.at(N))%360:null},wd:{height:(te=X.wind_wave_height_max)==null?void 0:te.at(N),degree:(ne=X.wind_wave_direction_dominant)==null?void 0:ne.at(N),period:(pe=X.wind_wave_period_max)==null?void 0:pe.at(N),peakPeriod:(de=X.wind_wave_peak_period_max)==null?void 0:de.at(N),bearing:((ge=X.wind_wave_direction_dominant)==null?void 0:ge.at(N))!==null?(((x=X.wind_wave_direction_dominant)==null?void 0:x.at(N))+180)%360:null}}},Y.wave=this.parseWave(Y.wave,G==null?void 0:G.wind),Object.assign(ue[be],Y),be++}}}return ue}static parseWave(e,a){if(e.sig.direction=this.degree2Direction(e.sig.degree),e.swell.direction=this.degree2Direction(e.swell.degree),e.wd.direction=this.degree2Direction(e.wd.degree),e.sig.scale=this.douglas(e.sig.height),e.swell.scale=this.douglas(e.swell.height),e.wd.scale=this.douglas(e.wd.height),e.sig.height===0){const o=Math.sqrt(Math.pow(e.swell.height||0,2)+Math.pow(e.wd.height||0,2));e.sig.height=Math.round(o*100)/100}if(e.swell.height===0)if(e.sig.height>e.wd.height){const o=Math.sqrt(Math.abs(Math.pow(e.sig.height||0,2)-Math.pow(e.wd.height||0,2)));e.swell.height=Math.round(o*100)/100}else{const o=Math.round(.12*this.kts2ms((a==null?void 0:a.kts)||0)*100)/100,r=o>1?o/10:o>.5?o/5:o>.3?o/2:o;e.swell.height=Math.round(r*100)/100}if(e.wd.height===0||e.wd.height>e.sig.height)if(e.sig.height>e.swell.height){const o=Math.sqrt(Math.abs(Math.pow(e.sig.height||0,2)-Math.pow(e.swell.height||0,2))),r=.24*this.kts2ms((a==null?void 0:a.kts)||0);e.wd.height=Math.round(Math.min(o,r)*100)/100}else{const o=.24*this.kts2ms((a==null?void 0:a.kts)||0);e.wd.height=Math.round(o*100)/100}return e.swell.height>e.sig.height&&(e.swell.height=Math.round(e.sig.height*.76*100)/100),e.sig.period||(e.sig.period=Math.round(5*Math.sqrt(e.sig.height))),e.swell.period||(e.swell.period=Math.round(5*Math.sqrt(e.swell.height))),e.wd.period||(e.wd.period=Math.round(5*Math.sqrt(e.wd.height))),e}static parseWeatherCode(e,a){const o=this.weatherCode(e);return(a?o.day:o.night)||{}}static weatherCode(e){const a={code:e};switch(e){case 0:a.day={name:"Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"},a.night={name:"Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"};break;case 1:a.day={name:"Mainly Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"},a.night={name:"Mainly Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"};break;case 2:a.day={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg2.png"},a.night={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg2.png"};break;case 3:a.day={name:"Overcast",url:"https://osshz.idmwx.com/asset/weather/04d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg3.png"},a.night={name:"Overcast",url:"https://osshz.idmwx.com/asset/weather/04n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg3.png"};break;case 45:a.day={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"},a.night={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"};break;case 48:a.day={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"},a.night={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"};break;case 51:a.day={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 53:a.day={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 55:a.day={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/15d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/15n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 56:a.day={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 57:a.day={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 61:a.day={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 63:a.day={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 65:a.day={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 66:a.day={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 67:a.day={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 71:a.day={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 73:a.day={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 75:a.day={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 77:a.day={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 80:a.day={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 81:a.day={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 82:a.day={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 85:a.day={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 86:a.day={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 95:a.day={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 96:a.day={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 99:a.day={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break}return a}static kts2ms(e){return isNaN(e)||e===null?e:Math.round(e*1852/3600*1e4)/1e4}static kts2kmh(e){return isNaN(e)||e===null?e:e*1.852}static m2nm(e){return isNaN(e)||e===null?e:Math.round(e/1e3/1.852*1e4)/1e4}static kmh2kts(e){return isNaN(e)||e===null?e:this.ms2kts(e*1e3/3600)}static ms2kts(e){return isNaN(e)||e===null?e:Math.round(e*3600/1852*1e4)/1e4}static degree2Radian(e){if(isNaN(e)||e===null)return e;let a=e%360/360*2*Math.PI;return a=a<0?a+2*Math.PI:a,a}static degree2Direction(e){const a=this.degree2Radian(e);if(isNaN(a)||a===null)return null;let o="N/A";const r=Math.PI/16;return a<r?o="N":a>=r&&a<3*r?o="NNE":a>=3*r&&a<5*r?o="NE":a>=5*r&&a<7*r?o="ENE":a>=7*r&&a<9*r?o="E":a>=9*r&&a<11*r?o="ESE":a>=11*r&&a<13*r?o="SE":a>=13*r&&a<15*r?o="SSE":a>=15*r&&a<17*r?o="S":a>=17*r&&a<19*r?o="SSW":a>=19*r&&a<21*r?o="SW":a>=21*r&&a<23*r?o="WSW":a>=23*r&&a<25*r?o="W":a>=25*r&&a<27*r?o="WNW":a>=27*r&&a<29*r?o="NW":a>=29*r&&a<31*r?o="NNW":a>=31*r&&a<32*r&&(o="N"),o}static beaufort(e){let a=0;return isNaN(e)||(e=Math.round(e*10)/10,e<=.2?a=0:e<=1.5?a=1:e<=3.3?a=2:e<=5.4?a=3:e<=7.9?a=4:e<=10.7?a=5:e<=13.8?a=6:e<=17.1?a=7:e<=20.7?a=8:e<=22.4?a=9:e<=28.4?a=10:e<=32.6?a=11:e<=36.9?a=12:e<=41.4?a=13:e<=46.1?a=14:e<=50.9?a=15:e<=55.9?a=16:e<=61.2?a=17:e>61.2&&(a=18)),a}static douglas(e){let a="Calm";return isNaN(e)||e<=.1?a="Calm":e<=.5?a="Smooth":e<=1.25?a="Slight":e<=2.5?a="Moderate":e<=4?a="Rough":e<=6?a="VeryRough":e<=9?a="High":e<=14?a="VeryHigh":a="Precipitous",a}}const Qo="",wa={name:"IdmTropicals",props:{map:{type:Object},tropicals:{type:Object},date:{type:String},timeZone:{type:Number,default:0},permission:{type:Number},fromTropicalReport:{type:Boolean,default:!1}},emits:["tropical","tropicalProbability","tropicalNotification"],data(){return{helper:ee.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:z.featureCollection([]),circleSource:"circle-source",circleSourceData:z.featureCollection([]),circleLayer:"tropical-circle-layer",labelMarkers:[]}},computed:{computeTime(){return function(i){if(i){const e=j(i).utcOffset(this.timeZone),a=this.timeZone<0?this.timeZone:"+"+this.timeZone;return`${e.format("MMM-DD/HHmm")} [ UTC${a} ] ( ${e==null?void 0:e.fromNow()} )`}return"-"}},computeTimezone(){return this.timeZone<0?this.timeZone:"+"+this.timeZone},computeBF(){return function(i){const e=Fe.kts2ms(i);return Fe.beaufort(e)}},computeMovement(){return function(i){var e,a;return(a=(e=i==null?void 0:i.forecasts)==null?void 0:e.find(o=>!o.disabled))==null?void 0:a.movement}}},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 e,a;(((a=(e=this.tropicals)==null?void 0:e.data)==null?void 0:a.features)||[]).forEach(o=>{var r,s;((r=o.geometry)==null?void 0:r.type)==="Point"&&((s=o.properties)!=null&&s.important)&&(o.properties.format=j(o.properties.date).utcOffset(this.timeZone).format(`MMM-DD/HHmm [(utc${this.computeTimezone})]`))}),this.handleInit()},handleInit(){var i,e;this.tropicals&&this.tropicals.active?(this.handleRender(),(i=this.map)==null||i.on("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick))},handleRender(){var i,e,a,o,r,s,n,l,h,d,c,m,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else{if(this.tropicals){const B=new Date().valueOf();let u=0,E=0;if((i=this.map)!=null&&i.getSource(this.source)?((a=this.map)==null||a.getSource(this.source).setData((e=this.tropicals)!=null&&e.active?this.tropicals.data:this.empty),E=new Date().valueOf()-(B+u),console.log("[tropicals] update elapsed: ",E,", total: ",u+=E)):(this.map.addSource(this.source,{type:"geojson",data:(o=this.tropicals)!=null&&o.active?(r=this.tropicals)==null?void 0:r.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","#f2a0a0"],"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","#f2a0a0"],"text-halo-width":4}}),E=new Date().valueOf()-(B+u),console.log("[tropical] add elapsed: ",E,", total: ",u+=E)),(s=this.map)!=null&&s.getSource(this.clusterSource))(l=this.map)==null||l.getSource(this.clusterSource).setData((n=this.tropicals)!=null&&n.active?this.tropicals.data:this.empty),E=new Date().valueOf()-(B+u),console.log("[tropical] update elapsed: ",E,", total: ",u+=E);else{if(this.map.addSource(this.clusterSource,{type:"geojson",data:(h=this.tropicals)!=null&&h.active?(d=this.tropicals)==null?void 0:d.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","kts",["get","wind"]],null]],"#03f869",["boolean",["<",["get","kts",["get","wind"]],32]],"#03f869",["boolean",["<",["get","kts",["get","wind"]],47]],"#f2f202",["boolean",["<",["get","kts",["get","wind"]],63]],"#ff9100",["boolean",["<",["get","kts",["get","wind"]],79]],"#f44336",["boolean",["<",["get","kts",["get","wind"]],94]],"#f903d0",["boolean",[">=",["get","kts",["get","wind"]],94]],"#8702f9","#fff"]}}),this.fromTropicalReport){const v=(c=this.tropicals.data.features)==null?void 0:c.filter(w=>w.geometry.type==="Point"&&w.properties.type==="forecast");let g=0,A=0,p=(b=(m=this.findClosestToNumber(v,"hour",12))==null?void 0:m.properties)==null?void 0:b.hour;v.forEach((w,y)=>{var _,S,M,Q,V,H,ae,q,ie,ce,re,he,oe,F,K,se,te,ne,pe,de,ge,x,Ae,me,we,fe,Le;let f;const I=this.findClosestToNumber(v,"hour",p+g*24);if(I&&((_=I==null?void 0:I.properties)==null?void 0:_.hour)===((S=w.properties)==null?void 0:S.hour)&&(f=I),f){let ue=0,G="tropical-marker-box",Y="tropical-marker-line";G=((V=(Q=(M=f.properties)==null?void 0:M.wind)==null?void 0:Q.en)==null?void 0:V.toUpperCase())==="SUPER TY"?G+" supper":G+" normal",Y=((q=(ae=(H=f.properties)==null?void 0:H.wind)==null?void 0:ae.en)==null?void 0:q.toUpperCase())==="SUPER TY"?Y+" supper":Y+" normal",((ce=(ie=f.properties)==null?void 0:ie.movement)==null?void 0:ce.deg)>=0&&((he=(re=f.properties)==null?void 0:re.movement)==null?void 0:he.deg)<=60||((F=(oe=f.properties)==null?void 0:oe.movement)==null?void 0:F.deg)>=120&&((se=(K=f.properties)==null?void 0:K.movement)==null?void 0:se.deg)<=240||((ne=(te=f.properties)==null?void 0:te.movement)==null?void 0:ne.deg)>=300&&((de=(pe=f.properties)==null?void 0:pe.movement)==null?void 0:de.deg)<=360?(ue=g%2===0?[84,0]:[-84,0],G=g%2===0?G+" right":G+" left",Y=g%2===0?Y+" vertical right":Y+" vertical left"):(ue=A%2===0?[60,40]:[60,-40],G=A%2===0?G+" right":G+" left",Y=A%2===0?Y+" align bottom":Y+" align top",A=A+1);const N=document.createElement("div");N.className=G,N.innerHTML=`
|
|
191
|
+
`,["get","val"],{"font-scale":1}],"text-rotation-alignment":"map","text-line-height":1.3,"text-size":12},paint:{"text-color":["step",["get","val"],"rgba(255,255,255,0.8)",980,"rgba(0,0,0,0.6)",1100,"rgba(0,0,0,0.6)"],"text-halo-color":["step",["get","val"],"rgba(162,13,2,0.7)",920,"rgba(244,67,54,0.7)",980,"rgba(255,255,0,0.7)",1100,"rgba(199,171,250,0.7)"],"text-halo-width":2}})},0),s=new Date().valueOf()-(o+r),console.log("[prmsl] add elapsed: ",s,", total: ",r+=s))}},handleMove(){var i,e;(e=(i=this.map)==null?void 0:i.getLayer("country-boundaries"))==null||e.setLayoutProperty("visibility","visible")},handleClear(){var i,e;this.activeWeatherLayers.length===0&&((e=(i=this.map)==null?void 0:i.getLayer("country-boundaries"))==null||e.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 oa(i,e,a,o,r,s){return t.openBlock(),t.createElementBlock("div")}const sa=O(ra,[["render",oa]]),Mo="",na={name:"IdmIceEdge",props:{factor:{type:Object},viewport:{type:Object},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 ke,etime:void 0,right:10}},watch:{"factor.version":{handler(){var i;(i=this.factor)!=null&&i.active?this.handleRender():this.handleClear()}},toggleVersion:{handler(){var i;this.right=(((i=document.getElementsByClassName("right-bar")[0])==null?void 0:i.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const i=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(i+e),console.log("[ice-edge] add elapsed: ",a,", total: ",e+=a)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const i=[[0,"rgba(86, 169, 230, 0)"],[1/255,"rgba(86, 169, 230, 0)"],[25/255,"rgba(86, 169, 230, 1)"],[25/255,"rgba(47, 226, 155, 1)"],[100/255,"rgba(47, 226, 155, 1)"],[100/255,"rgba(213, 253, 37, 1)"],[175/255,"rgba(213, 253, 37, 1)"],[175/255,"rgba(230, 176, 39, 1)"],[225/255,"rgba(230, 176, 39, 1)"],[225/255,"rgba(230, 84, 39, 1)"],[250/255,"rgba(230, 84, 39, 1)"],[1,"rgba(230, 84, 39, 1)"]];this.rampColor=this.webgl.setup(this.context,i);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,Z.vertexSchema,Z.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const i=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,i)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},la={key:0};function ca(i,e,a,o,r,s){var n;return(n=a.factor)!=null&&n.active?(t.openBlock(),t.createElementBlock("div",la,[t.createElementVNode("div",{class:"legend-bars flex-center",style:t.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},e[0]||(e[0]=[t.createElementVNode("span",null,null,-1),t.createElementVNode("span",{style:{display:"inline-block",position:"relative",left:"-10px"}},"%",-1),t.createElementVNode("span",null,"10",-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,"40",-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,"70",-1),t.createElementVNode("span",null,null,-1),t.createElementVNode("span",null,"90",-1),t.createElementVNode("span",null,null,-1)]),4)])):t.createCommentVNode("",!0)}const ha=O(na,[["render",ca],["__scopeId","data-v-14ae1a6c"]]),So="",da={name:"IdmCover",props:{factor:{type:Object},viewport:{type:Object},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 ke,etime:void 0,right:10}},watch:{"factor.version":{handler(){var i;(i=this.factor)!=null&&i.active?this.handleRender():this.handleClear()}},toggleVersion:{handler(){var i;this.right=(((i=document.getElementsByClassName("right-bar")[0])==null?void 0:i.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const i=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(i+e),console.log("[ice-cover] add elapsed: ",a,", total: ",e+=a)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const i=[[0,"rgba(68, 1, 84, 0)"],[1/255,"rgba(63, 72, 137, 0)"],[50/255,"rgba(53, 125, 177, 1)"],[100/255,"rgba(33, 145, 140, 1)"],[150/255,"rgba(45, 178, 125, 1)"],[200/255,"rgba(112, 207, 87, 1)"],[250/255,"rgba(253, 231, 37, 0.8)"],[1,"rgba(253, 231, 37, 1)"]];this.rampColor=this.webgl.setup(this.context,i);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,Z.vertexSchema,Z.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const i=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,i)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ma={key:0};function pa(i,e,a,o,r,s){var n;return(n=a.factor)!=null&&n.active?(t.openBlock(),t.createElementBlock("div",ma,[t.createElementVNode("div",{class:"legend-bars flex-center",style:t.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},e[0]||(e[0]=[t.createElementVNode("span",null,"%",-1),t.createElementVNode("span",null,"20",-1),t.createElementVNode("span",null,"40",-1),t.createElementVNode("span",null,"60",-1),t.createElementVNode("span",null,"80",-1),t.createElementVNode("span",null,"100",-1)]),4)])):t.createCommentVNode("",!0)}const ga=O(da,[["render",pa],["__scopeId","data-v-f21edb81"]]),To="",ya={name:"IdmThickness",props:{factor:{type:Object},viewport:{type:Object},toggleVersion:{type:Number},bottom:{type:String,default:"70px"}},data(){return{program:void 0,context:void 0,texture:void 0,rampColor:void 0,aPositionBuffer:void 0,webgl:new ke,etime:void 0,right:10}},watch:{"factor.version":{handler(){var i;(i=this.factor)!=null&&i.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var i;this.right=(((i=document.getElementsByClassName("right-bar")[0])==null?void 0:i.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const i=new Date().valueOf();let e=0,a=0;this.handleDraw(),a=new Date().valueOf()-(i+e),console.log("[ice-thickness] add elapsed: ",a,", total: ",e+=a)}},handleClear(){this.context=void 0,this.etime=void 0,this.viewport.toggle(!1)},handleSetup(){if(!this.context){this.context=this.viewport.rampColorCanvas.getContext("webgl");const i=[[0,"rgba(4, 6, 19, 0)"],[1/255,"rgba(4, 6, 19, 0)"],[20/255,"rgba(51, 50, 102, 1)"],[40/255,"rgba(63, 82, 158, 1)"],[50/255,"rgba(66, 123, 183, 1)"],[60/255,"rgba(92, 161, 197, 1)"],[80/255,"rgba(134, 199, 212, 0.7)"],[100/255,"rgba(134, 199, 212, 1)"],[150/255,"rgba(234, 253, 2536, 0.8)"],[250/255,"rgba(234, 253, 2536, 0.9)"],[1,"rgba(234, 253, 2536, 1)"]];this.rampColor=this.webgl.setup(this.context,i);const{program:e,aPositionBuffer:a}=this.webgl.bind(this.context,Z.vertexSchema,Z.fragmentSchema);this.program=e,this.aPositionBuffer=a}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const i=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,i)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ua={key:0};function fa(i,e,a,o,r,s){var n;return(n=a.factor)!=null&&n.active?(t.openBlock(),t.createElementBlock("div",ua,[t.createElementVNode("div",{class:"legend-bars flex-center",style:t.normalizeStyle([{position:"absolute"},{right:r.right+"px",bottom:a.bottom}])},e[0]||(e[0]=[t.createElementVNode("span",null,"m",-1),t.createElementVNode("span",null,"0",-1),t.createElementVNode("span",null,"0.6",-1),t.createElementVNode("span",null,"1",-1),t.createElementVNode("span",null,"1.5",-1),t.createElementVNode("span",null,"2",-1),t.createElementVNode("span",null,"3",-1)]),4)])):t.createCommentVNode("",!0)}const Aa=O(ya,[["render",fa],["__scopeId","data-v-a4c3d2ed"]]),Me=[{rank:0,name:"Best Match",alias:"BEST MATCH",model:"best_match",models:["best_match"]},{rank:1,name:"GFS",alias:"GFS",model:"gfs_seamless",provider:"NOAA",country:"United States",resolution:25,tips:"3-25km",length:16,frequency:1,models:["gfs_seamless"],categories:"ncep_gfs013,ncep_gfs025,ncep_gfs_graphcast025,ncep_hrrr_conus,ncep_nbm_conus",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:2,name:"ECMWF",alias:"ECMWF",model:"ecmwf_ifs025",provider:"ECMWF",country:"European Union",resolution:25,tips:"25km",length:15,frequency:6,models:["ecmwf_ifs025","ecmwf_aifs025_single"],categories:"ecmwf_ifs025,ecmwf_aifs025_single",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:3,disabled:!0,name:"ICON",alias:"ECMWF",model:"icon_seamless",provider:"Deutscher Wetterdienst (DWD)",country:"Germany",resolution:13,tips:"2-13km",length:7.5,frequency:3,models:["icon_seamless","icon_global","icon_eu","icon_d2"],categories:"dwd_icon,dwd_icon_eps,dwd_icon_d2,dwd_icon_d2_eps,dwd_icon_eu,dwd_icon_eu_eps",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:4,name:"ARPEGE",disabled:!0,alias:"ECMWF",model:"arpege_seamless",provider:"Météo-France",country:"France",resolution:25,tips:"1-25km",length:4,frequency:1,models:["arpege_seamless","arpege_world","arpege_europe"],categories:"meteofrance_arpege_europe,meteofrance_arpege_europe_probabilities,meteofrance_arpege_world025",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:5,name:"UKMO",disabled:!0,alias:"ECMWF",model:"ukmo_seamless",provider:"UK Met Office",country:"United Kingdom",resolution:10,tips:"2-10km",length:7,frequency:1,models:["ukmo_seamless","ukmo_global_deterministic_10km","ukmo_uk_deterministic_2km"],categories:"ukmo_global_deterministic_10km,ukmo_uk_deterministic_2km",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:6,name:"JMA",disabled:!0,alias:"GFS",model:"jma_seamless",provider:"JMA",country:"Japan",resolution:55,tips:"5-55km",length:11,frequency:3,models:["jma_seamless","jma_msm","jma_gsm"],categories:"jma_gsm,jma_msm",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:7,name:"GEM",disabled:!0,alias:"GFS",model:"gem_seamless",provider:"Canadian Weather Service",country:"Canada",resolution:2.5,tips:"2.5km",length:10,frequency:6,models:["gem_seamless","gem_global","gem_regional"],categories:"cmc_gem_gdps,cmc_gem_hrdps,cmc_gem_rdps",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:8,name:"GRAPES",disabled:!0,alias:"GFS",model:"cma_grapes_global",provider:"China Meteorological Administration (CMA)",country:"China",resolution:15,tips:"15km",length:10,frequency:6,models:["cma_grapes_global"],categories:"cma_grapes_global",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"},{rank:9,name:"ACCESS-G",disabled:!0,alias:"GFS",model:"bom_access_global",provider:"Australian Bureau of Meteorology (BOM)",country:"Australia",resolution:15,tips:"15km",length:10,frequency:6,models:["bom_access_global"],categories:"bom_access_global",variables:"temperature_2m,relative_humidity_2m,dew_point_2m,apparent_temperature,precipitation_probability,precipitation,rain,showers,snowfall_water_equivalent,snowfall,frozen_precipitation_percent,pressure_msl,cloud_cover,visibility,wind_speed_10m,wind_u_component_10m,wind_v_component_10m,wind_direction_10m,wind_gusts_10m,cape,lifted_index,weather_code"}],Se=[{rank:0,name:"Best Match",alias:"BEST MATCH",model:"best_match",models:["best_match"]},{rank:1,name:"MFWAM",alias:"ECMWF",model:"meteofrance_wave",provider:"MeteoFrance",country:"France",resolution:8,tips:"8km",length:10,frequency:12,models:["meteofrance_wave"],categories:"meteofrance_wave",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:2,disabled:!0,name:"SMOC",alias:"ECMWF",model:"meteofrance_currents",provider:"MeteoFrance",country:"France",resolution:8,tips:"8km",length:10,frequency:24,models:["meteofrance_currents"],categories:"meteofrance_currents, meteofrance_sea_surface_temperature",variables:"ocean_u_current,ocean_v_current,invert_barometer_height,sea_level_height_msl,sea_surface_temperature"},{rank:3,disabled:!0,name:"EWAM",alias:"ECMWF",model:"ewam",provider:"DWD",country:"Germany",resolution:5,tips:"5km",length:8,frequency:2,models:["ewam"],categories:"dwd_ewam",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:4,disabled:!0,name:"GWAM",alias:"ECMWF",model:"gwam",provider:"DWD",country:"Germany",resolution:5,tips:"5km",length:4,frequency:2,models:["gwam"],categories:"dwd_gwam",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:5,disabled:!0,name:"ECWAM",alias:"ECMWF",model:"ecmwf_wam025",provider:"ECMWF",country:"Europe",resolution:25,tips:"25km",length:10,frequency:6,models:["ecmwf_wam025"],categories:"ecmwf_wam025",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:6,name:"GFSWave",alias:"GFS",model:"ncep_gfswave025",provider:"NCEP",country:"USA",resolution:25,tips:"25km",length:10,frequency:6,models:["ncep_gfswave025","ncep_gfswave016"],categories:"ncep_gfswave025,ncep_gfswave016",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"},{rank:7,disabled:!0,name:"ERA5-Ocean",alias:"ECMWF",model:"era5_ocean",provider:"Copernicus",country:"Europe",resolution:50,tips:"50km",length:-5,frequency:1,models:["era5_ocean"],categories:"copernicus_era5_ocean",variables:"swell_wave_direction,swell_wave_height,swell_wave_period,swell_wave_peak_period,wave_direction,wave_height,wave_period,wind_wave_direction,wind_wave_height,wind_wave_period,wind_wave_peak_period"}];class Fe{static standardWeatherModels(){return Me.filter(e=>!e.disabled&&e.alias)}static standardMarineModels(){return Se.filter(e=>!e.disabled&&e.alias)}static autoPickLayerModel(e,a="copernicus"){return a=a||"copernicus",a=a==null?void 0:a.toLowerCase(),a=["gfs","ecmwf","copernicus"].includes(a)?a:"copernicus",e=e==null?void 0:e.toLowerCase(),e==="gfs"?"gfs":["ec","ecmwf"].includes(e)?"ecmwf":["copernicus","cmems"].includes(e)?"copernicus":a}static autoPickPeerModel(e,a,o="copernicus"){if(a=this.autoPickLayerModel(a,o),ee.LayerHelper.WEATHER_LAYERS.reduce((r,s)=>s.atmos?r+s.weight:r,0)&e.weight){if(a==="copernicus")return"ecmwf"}else if(a==="ecmwf")return"copernicus";return a}static autoPickMeteoModel(e="best_match"){var a,o;e=e==null?void 0:e.toLowerCase(),e=e==="ec"?"ecmwf":e;const r=e.toLowerCase().split(","),s=[],n=[];for(const l of r){let h=Me.find(c=>{var m,b,C;return((m=c.models)==null?void 0:m.includes(l))||((b=c.alias)==null?void 0:b.toLowerCase())===l||((C=c.name)==null?void 0:C.toLowerCase())===l}),d=Se.find(c=>{var m,b,C;return((m=c.models)==null?void 0:m.includes(l))||((b=c.alias)==null?void 0:b.toLowerCase())===l||((C=c.name)==null?void 0:C.toLowerCase())===l});h=h||Me.find(c=>{var m,b;return((m=c.alias)==null?void 0:m.toLowerCase())===((b=d==null?void 0:d.alias)==null?void 0:b.toLowerCase())}),d=d||Se.find(c=>{var m,b;return((m=c.alias)==null?void 0:m.toLowerCase())===((b=h==null?void 0:h.alias)==null?void 0:b.toLowerCase())}),h=h||Me[0],d=d||Se[0],s.push((a=h.models)!=null&&a.includes(l)?l:h.model),n.push((o=d.models)!=null&&o.includes(l)?l:d.model)}return{weatherModels:s.join(","),marineModels:n.join(",")}}static autoPickSubCategories(e){e=e.toUpperCase();const a=Me.filter(s=>s.alias===e),o=Se.filter(s=>s.alias===e),r=[];return a.forEach(s=>{s.categories&&r.push(...s.categories.split(","))}),o.forEach(s=>{s.categories&&r.push(...s.categories.split(","))}),r}static pickHourly(e,a){var o,r,s,n,l,h,d,c,m,b,C,B,u,E,v,g,A,p,w,y,f,I,_,S,M,Q,V,H,ae,q,ie,ce,re,he,oe,F,K,se,te,ne,pe,de,ge,x,Ae,me,we,fe,Le,ue;const G=typeof a=="string"?j(a):a,Y=e==null?void 0:e.weather,N=e==null?void 0:e.marine,be=j((r=(o=Y==null?void 0:Y[0])==null?void 0:o.hourly)==null?void 0:r.date).utc(),R=be.clone().add((l=(n=(s=Y==null?void 0:Y[0])==null?void 0:s.hourly)==null?void 0:n.time)==null?void 0:l.at(0),"h"),X=be.clone().add((c=(d=(h=Y==null?void 0:Y[0])==null?void 0:h.hourly)==null?void 0:d.time)==null?void 0:c.at(-1),"h"),xe=[];if(G.isBetween(R,X,"millisecond","[]")){const D=G.utc().diff(R,"h",!1);let le,Ce;if(Y){let Ee=0,Be=0;for(const k of Y){const T=k==null?void 0:k.hourly;for(let Ie=D-(D-1)%3;Ie<=D;Ie++)Ee+=(m=T==null?void 0:T.precipitation)==null?void 0:m.at(Ie);for(let Ie=D-(D-1)%6;Ie<=D;Ie++)Be+=(b=T==null?void 0:T.precipitation)==null?void 0:b.at(Ie);le={temp:(C=T==null?void 0:T.temperature_2m)==null?void 0:C.at(D),apparentTemp:(B=T==null?void 0:T.apparent_temperature)==null?void 0:B.at(D),rh:(u=T==null?void 0:T.relative_humidity_2m)==null?void 0:u.at(D),dp:(E=T==null?void 0:T.dew_point_2m)==null?void 0:E.at(D),precip:{probability:(v=T==null?void 0:T.precipitation_probability)==null?void 0:v.at(D),sum:(g=T==null?void 0:T.precipitation)==null?void 0:g.at(D),sum3Hours:Math.round(Ee*100)/100,sum6Hours:Math.round(Be*100)/100},pmsl:(A=T==null?void 0:T.pressure_msl)==null?void 0:A.at(D),psurf:(p=T==null?void 0:T.surface_pressure)==null?void 0:p.at(D),code:(w=T==null?void 0:T.weather_code)==null?void 0:w.at(D),visibility:this.m2nm((y=T==null?void 0:T.visibility)==null?void 0:y.at(D)),wind:{speed:(f=T==null?void 0:T.wind_speed_10m)==null?void 0:f.at(D),kts:(I=T==null?void 0:T.wind_speed_10m)==null?void 0:I.at(D),degree:(_=T==null?void 0:T.wind_direction_10m)==null?void 0:_.at(D),bearing:((S=T==null?void 0:T.wind_direction_10m)==null?void 0:S.at(D))!==null?(((M=T==null?void 0:T.wind_direction_10m)==null?void 0:M.at(D))+180)%360:null,gusts:(Q=T==null?void 0:T.wind_gusts_10m)==null?void 0:Q.at(D)},isDay:(V=T==null?void 0:T.is_day)==null?void 0:V.at(D)};const{name:Ne,url:ze,bg:$}=this.parseWeatherCode(le.code,le.isDay);le.name=Ne,le.url=ze,le.bg=$,le.wind.scale=this.beaufort(this.kts2ms(le.wind.kts)),le.wind.direction=this.degree2Direction(le.wind.degree),xe.push({utc:R.add(D,"h").format(),model:k.model,weather:{...le}})}}if(N){let Ee=0;for(const Be of N){const k=Be==null?void 0:Be.hourly;Ce={wave:{sig:{height:(H=k==null?void 0:k.wave_height)==null?void 0:H.at(D),degree:(ae=k==null?void 0:k.wave_direction)==null?void 0:ae.at(D),bearing:((q=k==null?void 0:k.wave_direction)==null?void 0:q.at(D))!==null?(((ie=k==null?void 0:k.wave_direction)==null?void 0:ie.at(D))+180)%360:null,period:(ce=k==null?void 0:k.wave_period)==null?void 0:ce.at(D)},swell:{height:(re=k==null?void 0:k.swell_wave_height)==null?void 0:re.at(D),degree:(he=k==null?void 0:k.swell_wave_direction)==null?void 0:he.at(D),bearing:((oe=k==null?void 0:k.swell_wave_direction)==null?void 0:oe.at(D))!==null?(((F=k==null?void 0:k.swell_wave_direction)==null?void 0:F.at(D))+180)%360:null,period:(K=k==null?void 0:k.swell_wave_period)==null?void 0:K.at(D),peakPeriod:(se=k==null?void 0:k.swell_wave_peak_period)==null?void 0:se.at(D)},wd:{height:(te=k==null?void 0:k.wind_wave_height)==null?void 0:te.at(D),degree:(ne=k==null?void 0:k.wind_wave_direction)==null?void 0:ne.at(D),bearing:((pe=k==null?void 0:k.wind_wave_direction)==null?void 0:pe.at(D))!==null?(((de=k==null?void 0:k.wind_wave_direction)==null?void 0:de.at(D))+180)%360:null,period:(ge=k==null?void 0:k.wind_wave_period)==null?void 0:ge.at(D),peakPeriod:(x=k==null?void 0:k.wind_wave_peak_period)==null?void 0:x.at(D)}},current:{speed:(Ae=k==null?void 0:k.ocean_current_velocity)==null?void 0:Ae.at(D),kts:(me=k==null?void 0:k.ocean_current_velocity)==null?void 0:me.at(D),degree:(we=k==null?void 0:k.ocean_current_direction)==null?void 0:we.at(D),bearing:((fe=k==null?void 0:k.ocean_current_direction)==null?void 0:fe.at(D))??null},sst:(Le=k==null?void 0:k.sea_surface_temperature)==null?void 0:Le.at(D),height:(ue=k==null?void 0:k.sea_level_height_msl)==null?void 0:ue.at(D)},Ce.wave=this.parseWave(Ce.wave,le==null?void 0:le.wind),Ce.current.direction=this.degree2Direction(Ce.current.degree),Object.assign(xe[Ee],Ce),Ee++}}}return xe}static toLegacy(e){var a,o,r,s,n,l,h,d,c,m;return{wind:(a=e==null?void 0:e.weather)==null?void 0:a.wind,visibility:(o=e==null?void 0:e.weather)==null?void 0:o.visibility,temp:(r=e==null?void 0:e.weather)==null?void 0:r.temp,prmsl:(s=e==null?void 0:e.weather)==null?void 0:s.pmsl,gusts:{kts:(l=(n=e==null?void 0:e.weather)==null?void 0:n.wind)==null?void 0:l.gusts},precip:(h=e==null?void 0:e.weather)==null?void 0:h.precip,code:(d=e==null?void 0:e.weather)==null?void 0:d.code,name:(c=e==null?void 0:e.weather)==null?void 0:c.name,url:(m=e==null?void 0:e.weather)==null?void 0:m.url,wave:e==null?void 0:e.wave,current:e==null?void 0:e.current,sst:e==null?void 0:e.sst,height:e==null?void 0:e.height,utc:e==null?void 0:e.utc,source:e==null?void 0:e.model}}static pickDaily(e,a){var o,r,s,n,l,h,d,c,m,b,C,B,u,E,v,g,A,p,w,y,f,I,_,S,M,Q,V,H,ae,q,ie,ce,re,he,oe,F,K,se,te,ne,pe,de,ge,x;const Ae=typeof a=="string"?j(a):a,me=e==null?void 0:e.weather,we=e==null?void 0:e.marine,fe=j((s=(r=(o=me==null?void 0:me[0])==null?void 0:o.daily)==null?void 0:r.time)==null?void 0:s.at(0)),Le=j((h=(l=(n=me==null?void 0:me[0])==null?void 0:n.daily)==null?void 0:l.time)==null?void 0:h.at(-1)),ue=[];if(Ae.isBetween(fe,Le,"millisecond","[]")){let G,Y;const N=Ae.diff(fe,"d",!1);if(me)for(const be of me){const R=be.daily;G={code:(d=R.weather_code)==null?void 0:d.at(N),temp:{max:(c=R.temperature_2m_max)==null?void 0:c.at(N),min:(m=R.temperature_2m_min)==null?void 0:m.at(N),mean:(b=R.temperature_2m_mean)==null?void 0:b.at(N)},apparentTemp:{max:(C=R.apparent_temperature_max)==null?void 0:C.at(N),min:(B=R.apparent_temperature_min)==null?void 0:B.at(N)},precip:{sum:(u=R.precipitation_sum)==null?void 0:u.at(N),rainSum:(E=R.rain_sum)==null?void 0:E.at(N),snowfallSum:(v=R.snowfall_sum)==null?void 0:v.at(N),showersSum:(g=R.showers_sum)==null?void 0:g.at(N),hours:(A=R.precipitation_hours)==null?void 0:A.at(N),probability:(p=R.precipitation_probability_max)==null?void 0:p.at(N)},rh:{max:(w=R.relative_humidity_2m_max)==null?void 0:w.at(N),min:(y=R.relative_humidity_2m_min)==null?void 0:y.at(N),mean:(f=R.relative_humidity_2m_mean)==null?void 0:f.at(N)},wind:{speed:(I=R.wind_speed_10m_max)==null?void 0:I.at(N),kts:(_=R.wind_speed_10m_max)==null?void 0:_.at(N),degree:(S=R.wind_direction_10m_dominant)==null?void 0:S.at(N),gusts:(M=R.wind_gusts_10m_max)==null?void 0:M.at(N),bearing:((Q=R.wind_direction_10m_dominant)==null?void 0:Q.at(N))!==null?(((V=R.wind_direction_10m_dominant)==null?void 0:V.at(N))+180)%360:null}};const{name:X,url:xe,bg:D}=this.parseWeatherCode(G.code,!0);G.name=X,G.url=xe,G.bg=D,G.wind.scale=this.beaufort(this.kts2ms(G.wind.kts)),G.wind.direction=this.degree2Direction(G.wind.degree),ue.push({utc:fe.add(N,"d").utc().format(),model:be.model,weather:{...G}})}if(we){let be=0;for(const R of we){const X=R.daily;Y={wave:{sig:{height:(H=X.wave_height_max)==null?void 0:H.at(N),degree:(ae=X.wave_direction_dominant)==null?void 0:ae.at(N),period:(q=X.wave_period_max)==null?void 0:q.at(N),bearing:((ie=X.wave_direction_dominant)==null?void 0:ie.at(N))!==null?(((ce=X.wave_direction_dominant)==null?void 0:ce.at(N))+180)%360:null},swell:{height:(re=X.swell_wave_height_max)==null?void 0:re.at(N),degree:(he=X.swell_wave_direction_dominant)==null?void 0:he.at(N),period:(oe=X.swell_wave_period_max)==null?void 0:oe.at(N),peakPeriod:(F=X.swell_wave_peak_period_max)==null?void 0:F.at(N),bearing:((K=X.swell_wave_direction_dominant)==null?void 0:K.at(N))!==null?((se=X.swell_wave_direction_dominant)==null?void 0:se.at(N))%360:null},wd:{height:(te=X.wind_wave_height_max)==null?void 0:te.at(N),degree:(ne=X.wind_wave_direction_dominant)==null?void 0:ne.at(N),period:(pe=X.wind_wave_period_max)==null?void 0:pe.at(N),peakPeriod:(de=X.wind_wave_peak_period_max)==null?void 0:de.at(N),bearing:((ge=X.wind_wave_direction_dominant)==null?void 0:ge.at(N))!==null?(((x=X.wind_wave_direction_dominant)==null?void 0:x.at(N))+180)%360:null}}},Y.wave=this.parseWave(Y.wave,G==null?void 0:G.wind),Object.assign(ue[be],Y),be++}}}return ue}static parseWave(e,a){if(e.sig.direction=this.degree2Direction(e.sig.degree),e.swell.direction=this.degree2Direction(e.swell.degree),e.wd.direction=this.degree2Direction(e.wd.degree),e.sig.scale=this.douglas(e.sig.height),e.swell.scale=this.douglas(e.swell.height),e.wd.scale=this.douglas(e.wd.height),e.sig.height===0){const o=Math.sqrt(Math.pow(e.swell.height||0,2)+Math.pow(e.wd.height||0,2));e.sig.height=Math.round(o*100)/100}if(e.swell.height===0)if(e.sig.height>e.wd.height){const o=Math.sqrt(Math.abs(Math.pow(e.sig.height||0,2)-Math.pow(e.wd.height||0,2)));e.swell.height=Math.round(o*100)/100}else{const o=Math.round(.12*this.kts2ms((a==null?void 0:a.kts)||0)*100)/100,r=o>1?o/10:o>.5?o/5:o>.3?o/2:o;e.swell.height=Math.round(r*100)/100}if(e.wd.height===0||e.wd.height>e.sig.height)if(e.sig.height>e.swell.height){const o=Math.sqrt(Math.abs(Math.pow(e.sig.height||0,2)-Math.pow(e.swell.height||0,2))),r=.24*this.kts2ms((a==null?void 0:a.kts)||0);e.wd.height=Math.round(Math.min(o,r)*100)/100}else{const o=.24*this.kts2ms((a==null?void 0:a.kts)||0);e.wd.height=Math.round(o*100)/100}return e.swell.height>e.sig.height&&(e.swell.height=Math.round(e.sig.height*.76*100)/100),e.sig.period||(e.sig.period=Math.round(5*Math.sqrt(e.sig.height))),e.swell.period||(e.swell.period=Math.round(5*Math.sqrt(e.swell.height))),e.wd.period||(e.wd.period=Math.round(5*Math.sqrt(e.wd.height))),e}static parseWeatherCode(e,a){const o=this.weatherCode(e);return(a?o.day:o.night)||{}}static weatherCode(e){const a={code:e};switch(e){case 0:a.day={name:"Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"},a.night={name:"Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"};break;case 1:a.day={name:"Mainly Sunny",url:"https://osshz.idmwx.com/asset/weather/01d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"},a.night={name:"Mainly Clear",url:"https://osshz.idmwx.com/asset/weather/01n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg1.png"};break;case 2:a.day={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg2.png"},a.night={name:"Partly Cloudy",url:"https://osshz.idmwx.com/asset/weather/02n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg2.png"};break;case 3:a.day={name:"Overcast",url:"https://osshz.idmwx.com/asset/weather/04d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg3.png"},a.night={name:"Overcast",url:"https://osshz.idmwx.com/asset/weather/04n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg3.png"};break;case 45:a.day={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"},a.night={name:"Foggy",url:"https://osshz.idmwx.com/asset/weather/50n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"};break;case 48:a.day={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"},a.night={name:"Rime Fog",url:"https://osshz.idmwx.com/asset/weather/50n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg4.png"};break;case 51:a.day={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 53:a.day={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 55:a.day={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/15d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Heavy Drizzle",url:"https://osshz.idmwx.com/asset/weather/15n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 56:a.day={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 57:a.day={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/14d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Freezing Drizzle",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 61:a.day={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 63:a.day={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 65:a.day={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Heavy Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 66:a.day={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 67:a.day={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/16d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Freezing Rain",url:"https://osshz.idmwx.com/asset/weather/10n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 71:a.day={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Light Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 73:a.day={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 75:a.day={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Heavy Snow",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 77:a.day={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/17d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Snow Grains",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 80:a.day={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 81:a.day={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 82:a.day={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Heavy Showers",url:"https://osshz.idmwx.com/asset/weather/09n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 85:a.day={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Light Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 86:a.day={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"},a.night={name:"Snow Showers",url:"https://osshz.idmwx.com/asset/weather/13n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg6.png"};break;case 95:a.day={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Thunderstorm",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 96:a.day={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Light Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break;case 99:a.day={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11d.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"},a.night={name:"Thunderstorms With Hail",url:"https://osshz.idmwx.com/asset/weather/11n.svg",bg:"https://osshz.idmwx.com/asset/weather/bg5.png"};break}return a}static kts2ms(e){return isNaN(e)||e===null?e:Math.round(e*1852/3600*1e4)/1e4}static kts2kmh(e){return isNaN(e)||e===null?e:e*1.852}static m2nm(e){return isNaN(e)||e===null?e:Math.round(e/1e3/1.852*1e4)/1e4}static kmh2kts(e){return isNaN(e)||e===null?e:this.ms2kts(e*1e3/3600)}static ms2kts(e){return isNaN(e)||e===null?e:Math.round(e*3600/1852*1e4)/1e4}static degree2Radian(e){if(isNaN(e)||e===null)return e;let a=e%360/360*2*Math.PI;return a=a<0?a+2*Math.PI:a,a}static degree2Direction(e){const a=this.degree2Radian(e);if(isNaN(a)||a===null)return null;let o="N/A";const r=Math.PI/16;return a<r?o="N":a>=r&&a<3*r?o="NNE":a>=3*r&&a<5*r?o="NE":a>=5*r&&a<7*r?o="ENE":a>=7*r&&a<9*r?o="E":a>=9*r&&a<11*r?o="ESE":a>=11*r&&a<13*r?o="SE":a>=13*r&&a<15*r?o="SSE":a>=15*r&&a<17*r?o="S":a>=17*r&&a<19*r?o="SSW":a>=19*r&&a<21*r?o="SW":a>=21*r&&a<23*r?o="WSW":a>=23*r&&a<25*r?o="W":a>=25*r&&a<27*r?o="WNW":a>=27*r&&a<29*r?o="NW":a>=29*r&&a<31*r?o="NNW":a>=31*r&&a<32*r&&(o="N"),o}static beaufort(e){let a=0;return isNaN(e)||(e=Math.round(e*10)/10,e<=.2?a=0:e<=1.5?a=1:e<=3.3?a=2:e<=5.4?a=3:e<=7.9?a=4:e<=10.7?a=5:e<=13.8?a=6:e<=17.1?a=7:e<=20.7?a=8:e<=22.4?a=9:e<=28.4?a=10:e<=32.6?a=11:e<=36.9?a=12:e<=41.4?a=13:e<=46.1?a=14:e<=50.9?a=15:e<=55.9?a=16:e<=61.2?a=17:e>61.2&&(a=18)),a}static douglas(e){let a="Calm";return isNaN(e)||e<=.1?a="Calm":e<=.5?a="Smooth":e<=1.25?a="Slight":e<=2.5?a="Moderate":e<=4?a="Rough":e<=6?a="VeryRough":e<=9?a="High":e<=14?a="VeryHigh":a="Precipitous",a}}const Qo="",wa={name:"IdmTropicals",props:{map:{type:Object},tropicals:{type:Object},date:{type:String},timeZone:{type:Number,default:0},permission:{type:Number},fromTropicalReport:{type:Boolean,default:!1}},emits:["tropical","tropicalProbability","tropicalNotification"],data(){return{helper:ee.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:z.featureCollection([]),circleSource:"circle-source",circleSourceData:z.featureCollection([]),circleLayer:"tropical-circle-layer",labelMarkers:[]}},computed:{computeTime(){return function(i){if(i){const e=j(i).utcOffset(this.timeZone),a=this.timeZone<0?this.timeZone:"+"+this.timeZone;return`${e.format("MMM-DD/HHmm")} [ UTC${a} ] ( ${e==null?void 0:e.fromNow()} )`}return"-"}},computeTimezone(){return this.timeZone<0?this.timeZone:"+"+this.timeZone},computeBF(){return function(i){const e=Fe.kts2ms(i);return Fe.beaufort(e)}},computeMovement(){return function(i){var e,a;return(a=(e=i==null?void 0:i.forecasts)==null?void 0:e.find(o=>!o.disabled))==null?void 0:a.movement}}},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 e,a;(((a=(e=this.tropicals)==null?void 0:e.data)==null?void 0:a.features)||[]).forEach(o=>{var r,s;((r=o.geometry)==null?void 0:r.type)==="Point"&&((s=o.properties)!=null&&s.important)&&(o.properties.format=j(o.properties.date).utcOffset(this.timeZone).format(`MMM-DD/HHmm [(utc${this.computeTimezone})]`))}),this.handleInit()},handleInit(){var i,e;this.tropicals&&this.tropicals.active?(this.handleRender(),(i=this.map)==null||i.on("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.forecastNameLayer,this.forecastLayer,this.historyLayer,this.forecastModelLayer,this.pointCircleLayer,this.pointLabelLayer,this.historyPointCircleLayer,this.historyPointLabelLayer],this.handleClick))},handleRender(){var i,e,a,o,r,s,n,l,h,d,c,m,b;if(!this.map)setTimeout(()=>{this.handleRender()},500);else{if(this.tropicals){const B=new Date().valueOf();let u=0,E=0;if((i=this.map)!=null&&i.getSource(this.source)?((a=this.map)==null||a.getSource(this.source).setData((e=this.tropicals)!=null&&e.active?this.tropicals.data:this.empty),E=new Date().valueOf()-(B+u),console.log("[tropicals] update elapsed: ",E,", total: ",u+=E)):(this.map.addSource(this.source,{type:"geojson",data:(o=this.tropicals)!=null&&o.active?(r=this.tropicals)==null?void 0:r.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","#f2a0a0"],"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","#f2a0a0"],"text-halo-width":4}}),E=new Date().valueOf()-(B+u),console.log("[tropical] add elapsed: ",E,", total: ",u+=E)),(s=this.map)!=null&&s.getSource(this.clusterSource))(l=this.map)==null||l.getSource(this.clusterSource).setData((n=this.tropicals)!=null&&n.active?this.tropicals.data:this.empty),E=new Date().valueOf()-(B+u),console.log("[tropical] update elapsed: ",E,", total: ",u+=E);else{if(this.map.addSource(this.clusterSource,{type:"geojson",data:(h=this.tropicals)!=null&&h.active?(d=this.tropicals)==null?void 0:d.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","kts",["get","wind"]],null]],"#03f869",["boolean",["<",["get","kts",["get","wind"]],32]],"#03f869",["boolean",["<",["get","kts",["get","wind"]],47]],"#f2f202",["boolean",["<",["get","kts",["get","wind"]],63]],"#ff9100",["boolean",["<",["get","kts",["get","wind"]],79]],"#f44336",["boolean",["<",["get","kts",["get","wind"]],94]],"#f903d0",["boolean",[">=",["get","kts",["get","wind"]],94]],"#8702f9","#fff"]}}),this.fromTropicalReport){const v=(c=this.tropicals.data.features)==null?void 0:c.filter(w=>w.geometry.type==="Point"&&w.properties.type==="forecast");let g=0,A=0,p=(b=(m=this.findClosestToNumber(v,"hour",12))==null?void 0:m.properties)==null?void 0:b.hour;v.forEach((w,y)=>{var _,S,M,Q,V,H,ae,q,ie,ce,re,he,oe,F,K,se,te,ne,pe,de,ge,x,Ae,me,we,fe,Le;let f;const I=this.findClosestToNumber(v,"hour",p+g*24);if(I&&((_=I==null?void 0:I.properties)==null?void 0:_.hour)===((S=w.properties)==null?void 0:S.hour)&&(f=I),f){let ue=0,G="tropical-marker-box",Y="tropical-marker-line";G=((V=(Q=(M=f.properties)==null?void 0:M.wind)==null?void 0:Q.en)==null?void 0:V.toUpperCase())==="SUPER TY"?G+" supper":G+" normal",Y=((q=(ae=(H=f.properties)==null?void 0:H.wind)==null?void 0:ae.en)==null?void 0:q.toUpperCase())==="SUPER TY"?Y+" supper":Y+" normal",((ce=(ie=f.properties)==null?void 0:ie.movement)==null?void 0:ce.deg)>=0&&((he=(re=f.properties)==null?void 0:re.movement)==null?void 0:he.deg)<=60||((F=(oe=f.properties)==null?void 0:oe.movement)==null?void 0:F.deg)>=120&&((se=(K=f.properties)==null?void 0:K.movement)==null?void 0:se.deg)<=240||((ne=(te=f.properties)==null?void 0:te.movement)==null?void 0:ne.deg)>=300&&((de=(pe=f.properties)==null?void 0:pe.movement)==null?void 0:de.deg)<=360?(ue=g%2===0?[84,0]:[-84,0],G=g%2===0?G+" right":G+" left",Y=g%2===0?Y+" vertical right":Y+" vertical left"):(ue=A%2===0?[60,-40]:[60,40],G=A%2===0?G+" top":G+" bottom",Y=A%2===0?Y+" align top":Y+" align bottom",A=A+1);const N=document.createElement("div");N.className=G,N.innerHTML=`
|
|
192
192
|
<div style="">
|
|
193
193
|
<span>${((ge=w.properties)==null?void 0:ge.format)||"-"}</span>
|
|
194
194
|
<span> [${((me=(Ae=(x=w.properties)==null?void 0:x.wind)==null?void 0:Ae.en)==null?void 0:me.toUpperCase())||"-"}]</span>
|