@idmwx/idmui-gl3 4.0.9 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4116,7 +4116,7 @@ const Wa = {
4116
4116
  return C.lineToPolygon(i, { properties: t });
4117
4117
  }
4118
4118
  }
4119
- }, je = (a) => (H("data-v-d9e29e39"), a = a(), G(), a), Oa = {
4119
+ }, je = (a) => (H("data-v-b521de47"), a = a(), G(), a), Oa = {
4120
4120
  id: "active-tropical",
4121
4121
  class: "active-tropical"
4122
4122
  }, ja = { class: "header-box" }, Fa = { class: "main" }, Ua = { key: 0 }, Va = { class: "sub" }, Za = {
@@ -4131,7 +4131,7 @@ const Wa = {
4131
4131
  }, Ya = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", null, "Pressure : ", -1)), Qa = { class: "row" }, Ka = {
4132
4132
  class: "col col-24",
4133
4133
  style: { "justify-content": "flex-start" }
4134
- }, ei = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)), ti = { class: "forecast-models" }, ai = ["onClick"], ii = /* @__PURE__ */ it('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-d9e29e39></div><div class="row" style="padding:2px 10px;" data-v-d9e29e39><div class="legend" data-v-d9e29e39><div class="icon td" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>TD</div></div><div class="legend" data-v-d9e29e39><div class="icon ts" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>TS</div></div><div class="legend" data-v-d9e29e39><div class="icon sts" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>STS</div></div><div class="legend" data-v-d9e29e39><div class="icon ty" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>TY</div></div><div class="legend" data-v-d9e29e39><div class="icon sty" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>STY</div></div><div class="legend" data-v-d9e29e39><div class="icon supper-ty" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-d9e29e39><div class="legend" data-v-d9e29e39><div class="icon history" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>History</div></div><div class="legend" data-v-d9e29e39><div class="icon r7" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>35kts Radii</div></div><div class="legend" data-v-d9e29e39><div class="icon r10" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>50kts Radii</div></div></div>', 3), ri = { class: "more" };
4134
+ }, ei = /* @__PURE__ */ je(() => /* @__PURE__ */ l("label", { style: { width: "max-content" } }, "Forecast Models : ", -1)), ti = { class: "forecast-models" }, ai = ["onClick"], ii = /* @__PURE__ */ it('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-b521de47></div><div class="row" style="padding:2px 10px;" data-v-b521de47><div class="legend" data-v-b521de47><div class="icon td" data-v-b521de47></div><div class="label" data-v-b521de47>TD</div></div><div class="legend" data-v-b521de47><div class="icon ts" data-v-b521de47></div><div class="label" data-v-b521de47>TS</div></div><div class="legend" data-v-b521de47><div class="icon sts" data-v-b521de47></div><div class="label" data-v-b521de47>STS</div></div><div class="legend" data-v-b521de47><div class="icon ty" data-v-b521de47></div><div class="label" data-v-b521de47>TY</div></div><div class="legend" data-v-b521de47><div class="icon sty" data-v-b521de47></div><div class="label" data-v-b521de47>STY</div></div><div class="legend" data-v-b521de47><div class="icon supper-ty" data-v-b521de47></div><div class="label" data-v-b521de47>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-b521de47><div class="legend" data-v-b521de47><div class="icon history" data-v-b521de47></div><div class="label" data-v-b521de47>History</div></div><div class="legend" data-v-b521de47><div class="icon r7" data-v-b521de47></div><div class="label" data-v-b521de47>35kts Radii</div></div><div class="legend" data-v-b521de47><div class="icon r10" data-v-b521de47></div><div class="label" data-v-b521de47>50kts Radii</div></div></div>', 3), ri = { class: "more" };
4135
4135
  function oi(a, e, t, r, i, o) {
4136
4136
  var n, s, c, h, d, p, g, u, y, f, m, v, b, w, k;
4137
4137
  return Me((L(), x("div", Oa, [
@@ -4194,7 +4194,7 @@ function oi(a, e, t, r, i, o) {
4194
4194
  [$e, i.showTropicals && !a.$attrs.hideTropicalsLegend]
4195
4195
  ]);
4196
4196
  }
4197
- const Ye = /* @__PURE__ */ T(Wa, [["render", oi], ["__scopeId", "data-v-d9e29e39"]]);
4197
+ const Ye = /* @__PURE__ */ T(Wa, [["render", oi], ["__scopeId", "data-v-b521de47"]]);
4198
4198
  const si = {
4199
4199
  name: "IdmPrecip3h",
4200
4200
  props: {
@@ -201,4 +201,4 @@
201
201
  <path
202
202
  d="M420.66666667 959.17a16.08 16.08 0 0 1-15.91-13.49A15.89 15.89 0 0 1 415.50666667 928c1.49-0.55 38.88-14.76 72.79-65.52A354.55 354.55 0 0 1 162.66666667 509.17a450.14 450.14 0 0 1 450.5-450.5 16.07 16.07 0 0 1 15.91 13.48 15.88 15.88 0 0 1-10.75 17.66c-1.58 0.58-39.13 14.9-73.07 65.95A354.22 354.22 0 0 1 871.66666667 509.17a16 16 0 0 1-0.52 4.05A450.14 450.14 0 0 1 420.66666667 959.17zM554.80666667 94.72C351.57666667 123.2 194.66666667 298.21 194.66666667 509.17c0 177.08 144.06 321.74 321.13 322.48a16 16 0 0 1 14.07 23.49c-16.11 30.42-34.27 52.37-50.85 68C682.25666667 894.63 839.16666667 719.63 839.16666667 508.67a15.94 15.94 0 0 1 0.47-3.86C837.30666667 329.33 693.82666667 187 517.80666667 186.67A16 16 0 0 1 503.66666667 163.21c16.21-30.69 34.47-52.79 51.14-68.49z"
203
203
  fill="#ffffff" p-id="18386"></path>
204
- </svg>`,H=document.createElement("div");H.className="hurricane-hourly-marker",H.innerHTML=`<div class="${S.geometry.coordinates[1]>=0?"center north":"center south"}">${de}</div>`;const pe=new Z.Marker(H).setLngLat(S.geometry.coordinates).addTo(this.map);if(this.interpolateMarkers.push(pe),(ie=S.properties)!=null&&ie.showCircle){const K={radius:100,coordinates:S.geometry.coordinates},ee={radius:200,coordinates:S.geometry.coordinates},te={radius:500,coordinates:S.geometry.coordinates};(oe=this.circleSourceData)==null||oe.features.push(x.circle(K.coordinates,K.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}})),(re=this.circleSourceData)==null||re.features.push(x.circle(ee.coordinates,ee.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}})),(se=this.circleSourceData)==null||se.features.push(x.circle(te.coordinates,te.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}}))}(le=(ne=this.map)==null?void 0:ne.getSource(this.circleSource))==null||le.setData(this.circleSourceData)}}else(ce=this.map)!=null&&ce.getSource(this.interpolateSource)&&((Q=this.map)==null||Q.getSource(this.interpolateSource).setData(this.empty))},handleClick(a){var s,l,n,c,h,d,p,g;const e=a.features[0],t=(l=(s=this.tropicals)==null?void 0:s.data)==null?void 0:l.features.filter(y=>{var f;return y.geometry.type==="LineString"&&y.properties.type==="forecast"&&y.properties.name===((f=e==null?void 0:e.properties)==null?void 0:f.name)});t.sort((y,f)=>{var u,m,_,b;return((u=y.properties)==null?void 0:u.model)==="cma"?-1:((m=y.properties)==null?void 0:m.model)==="jma"?((_=f.properties)==null?void 0:_.model)==="cma"?1:-1:y.properties.model==="ecmwf"?["jma","cma"].includes((b=f.properties)==null?void 0:b.model)?1:-1:0});const r=(c=(n=this.tropicals)==null?void 0:n.data)==null?void 0:c.features.filter(y=>{var f;return y.geometry.type==="LineString"&&y.properties.type==="history"&&y.properties.name===((f=e==null?void 0:e.properties)==null?void 0:f.name)});this.activeTropicals={name:(h=e==null?void 0:e.properties)==null?void 0:h.name,forecasts:t.map(y=>y.properties),history:(d=r[0])==null?void 0:d.properties,showCircle:(g=(p=t[0])==null?void 0:p.properties)==null?void 0:g.showCircle},this.showTropicals=!0;const o=document.getElementById("active-tropical");this.activeTropicalsMarker?this.activeTropicalsMarker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.activeTropicalsMarker=new Z.Marker(o).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([220,0]).addTo(this.map)},handleForecastToggle(a){var r,o,s,l,n,c;a.disabled=!a.disabled;const e=`${a.name}-${a.model}`,t=(o=(r=this.map)==null?void 0:r.getSource(this.source)._data)==null?void 0:o.features;t.forEach(h=>{h.properties.category===e&&(h.properties.disabled=a.disabled)}),this.interpolateData.forEach(h=>{h.properties.category===e&&(h.properties.disabled=a.disabled)}),(l=(s=this.map)==null?void 0:s.getSource(this.source))==null||l.setData(x.featureCollection(t)),(c=(n=this.map)==null?void 0:n.getSource(this.clusterSource))==null||c.setData(x.featureCollection(t)),this.handleDateChange()},handleStrikeProbability(a){this.$emit("tropicalProbability",a)},handleToggleCircles(a){var e,t;a.showCircle=!a.showCircle,(t=(e=this.tropicals.data)==null?void 0:e.features)==null||t.forEach(r=>{r.properties.name===a.name&&(r.properties.showCircle=a.showCircle)}),this.handleRender()},handleDrawCircle(){var a,e;(a=this.map)!=null&&a.getSource(this.circleSource)?(e=this.map)==null||e.getSource(this.circleSource).setData(this.circleSourceData):(this.map.addSource(this.circleSource,{type:"geojson",data:this.circleSourceData}),this.map.addLayer({id:this.circleLayer,type:"line",source:this.circleSource,filter:["all",["==","$type","Polygon"],["==","type","tropicalCircle"]],paint:{"line-color":"#fff","line-width":2,"line-opacity":1,"line-dasharray":[1,1]}}))},handleComputePolygons(a){const e=[];for(const t of a){const r=t.properties.wind,o={ne:r.r7ne>=0?r.r7ne:void 0,se:r.r7se>=0?r.r7se:void 0,sw:r.r7sw>=0?r.r7sw:void 0,nw:r.r7nw>=0?r.r7nw:void 0},s=this.handleComputeArc(t.geometry.coordinates,o,{...t.properties,level:7});e.push(s);const l={ne:r.r10ne>=0?r.r10ne:void 0,se:r.r10se>=0?r.r10se:void 0,sw:r.r10sw>=0?r.r10sw:void 0,nw:r.r10nw>=0?r.r10nw:void 0},n=this.handleComputeArc(t.geometry.coordinates,l,{...t.properties,level:10});e.push(n)}return e},handleComputeArc(a,e,t){var s;const r=[];for(const l in e){const n=e[l]??0;let c;switch(l){case"ne":c=x.lineArc(a,n*1.852,0,90,{steps:n>0?64:1});break;case"se":c=x.lineArc(a,n*1.852,90,180,{steps:n>0?64:1});break;case"sw":c=x.lineArc(a,n*1.852,180,270,{steps:n>0?64:1});break;case"nw":c=x.lineArc(a,n*1.852,270,360,{steps:n>0?64:1});break}r.push(...(s=c==null?void 0:c.geometry)==null?void 0:s.coordinates)}const o=x.lineString(r);return x.lineToPolygon(o,{properties:t})}}},ve=a=>(i.pushScopeId("data-v-d9e29e39"),a=a(),i.popScopeId(),a),Kt={id:"active-tropical",class:"active-tropical"},ea={class:"header-box"},ta={class:"main"},aa={key:0},ia={class:"sub"},oa={id:"meteoBox",class:"main-box"},ra={class:"content"},sa={class:"row"},na={class:"col col-left",style:{"justify-content":"flex-start"}},la=ve(()=>i.createElementVNode("label",null,"Wind speed : ",-1)),ca={class:"col col-right",style:{"justify-content":"flex-start"}},ha=ve(()=>i.createElementVNode("label",null,"Pressure : ",-1)),da={class:"row"},pa={class:"col col-24",style:{"justify-content":"flex-start"}},ma=ve(()=>i.createElementVNode("label",{style:{width:"max-content"}},"Forecast Models : ",-1)),ya={class:"forecast-models"},fa=["onClick"],ua=i.createStaticVNode('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-d9e29e39></div><div class="row" style="padding:2px 10px;" data-v-d9e29e39><div class="legend" data-v-d9e29e39><div class="icon td" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>TD</div></div><div class="legend" data-v-d9e29e39><div class="icon ts" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>TS</div></div><div class="legend" data-v-d9e29e39><div class="icon sts" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>STS</div></div><div class="legend" data-v-d9e29e39><div class="icon ty" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>TY</div></div><div class="legend" data-v-d9e29e39><div class="icon sty" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>STY</div></div><div class="legend" data-v-d9e29e39><div class="icon supper-ty" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-d9e29e39><div class="legend" data-v-d9e29e39><div class="icon history" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>History</div></div><div class="legend" data-v-d9e29e39><div class="icon r7" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>35kts Radii</div></div><div class="legend" data-v-d9e29e39><div class="icon r10" data-v-d9e29e39></div><div class="label" data-v-d9e29e39>50kts Radii</div></div></div>',3),ga={class:"more"};function ba(a,e,t,r,o,s){var l,n,c,h,d,p,g,y,f,u,m,_,b,w,v;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Kt,[i.createElementVNode("div",ea,[i.createElementVNode("div",{class:"iconfont close-btn",onClick:e[0]||(e[0]=L=>o.showTropicals=!1)},""),i.createElementVNode("div",ta,[(n=(l=o.activeTropicals)==null?void 0:l.history)!=null&&n.level?(i.openBlock(),i.createElementBlock("span",aa,i.toDisplayString((h=(c=o.activeTropicals)==null?void 0:c.history)==null?void 0:h.level)+" , ",1)):i.createCommentVNode("",!0),i.createTextVNode(i.toDisplayString((d=o.activeTropicals)==null?void 0:d.name),1)]),i.createElementVNode("div",ia," Last update: "+i.toDisplayString(s.computeTime(((g=(p=o.activeTropicals)==null?void 0:p.history)==null?void 0:g.updated)||((u=(f=(y=o.activeTropicals)==null?void 0:y.forecasts)==null?void 0:f.filter(L=>!L.disabled)[0])==null?void 0:u.date))),1)]),i.createElementVNode("div",oa,[i.createElementVNode("div",ra,[i.createElementVNode("div",sa,[i.createElementVNode("div",na,[la,i.createElementVNode("span",null,i.toDisplayString(((_=(m=o.activeTropicals)==null?void 0:m.history)==null?void 0:_.kts)||"-")+"[kts]",1)]),i.createElementVNode("div",ca,[ha,i.createElementVNode("span",null,i.toDisplayString(((w=(b=o.activeTropicals)==null?void 0:b.history)==null?void 0:w.pressure)||"-")+"[hPa]",1)])]),i.createElementVNode("div",da,[i.createElementVNode("div",pa,[ma,i.createElementVNode("div",ya,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((v=o.activeTropicals)==null?void 0:v.forecasts,(L,N)=>{var T,D,R,B;return i.openBlock(),i.createElementBlock("div",{key:N,class:i.normalizeClass(["model",L.disabled?"":"active",N>0&&N<((D=(T=o.activeTropicals)==null?void 0:T.forecasts)==null?void 0:D.length)-1&&((B=(R=o.activeTropicals)==null?void 0:R.forecasts)==null?void 0:B.length)>2?"center-child":""]),onClick:M=>s.handleForecastToggle(L)},[i.createElementVNode("span",{class:i.normalizeClass(L.model)},i.toDisplayString(L.model),3)],10,fa)}),128))])])]),ua]),i.createElementVNode("div",ga,[i.createElementVNode("div",{class:"button",onClick:e[1]||(e[1]=L=>s.handleStrikeProbability(o.activeTropicals))},"Strike Probability >>")])])],512)),[[i.vShow,o.showTropicals&&!a.$attrs.hideTropicalsLegend]])}const Ce=C(Qt,[["render",ba],["__scopeId","data-v-d9e29e39"]]),tr="",_a={name:"IdmPrecip3h",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 J,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[precip3h] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgba(59, 126, 162, 0)"],[14/255,"rgba(84,170,230, 0)"],[15/255,"rgba(172, 210, 255, 0.8)"],[20/255,"rgba(51,202,248,0.8)"],[30/255,"rgba(3,248,103,0.8)"],[49/255,"rgba(14,201,3,0.8)"],[57/255,"rgba(190,226,2,0.8)"],[73/255,"rgba(248,1,1,0.8)"],[82/255,"rgba(197,5,58,0.8)"],[1,"rgba(197,5,58,0.8)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},q=a=>(i.pushScopeId("data-v-dec867b8"),a=a(),i.popScopeId(),a),La={key:0},wa=[q(()=>i.createElementVNode("span",null,"mm",-1)),q(()=>i.createElementVNode("span",null,"1.5",-1)),q(()=>i.createElementVNode("span",null,"2",-1)),q(()=>i.createElementVNode("span",null,"3",-1)),q(()=>i.createElementVNode("span",null,"7",-1)),q(()=>i.createElementVNode("span",null,"10",-1)),q(()=>i.createElementVNode("span",null,"20",-1)),q(()=>i.createElementVNode("span",null,"30",-1))];function xa(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",La,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:o.right+"px",bottom:t.bottom}])},wa,4)])):i.createCommentVNode("",!0)}const va=C(_a,[["render",xa],["__scopeId","data-v-dec867b8"]]),hr="",Ca={name:"IdmVisibility",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 J,etime:void 0}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[visibility] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgba(189,50,160,0.8)"],[8/255,"rgba(208,56,56,0.8)"],[27/255,"rgba(190,226,2,0.8)"],[60/255,"rgba(3,236,118,0.8)"],[160/255,"rgba(172, 210,255,0.8)"],[161/255,"rgba(172, 210,255,0)"],[1,"rgba(144,144,144,0)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},me=a=>(i.pushScopeId("data-v-952dee5c"),a=a(),i.popScopeId(),a),Sa={key:0},ka=[me(()=>i.createElementVNode("span",null,"nm",-1)),me(()=>i.createElementVNode("span",null,"0",-1)),me(()=>i.createElementVNode("span",null,"0.5",-1)),me(()=>i.createElementVNode("span",null,"1.5",-1)),me(()=>i.createElementVNode("span",null,"3",-1)),me(()=>i.createElementVNode("span",null,"9",-1))];function Ea(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Sa,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:a.right+"px",bottom:t.bottom}])},ka,4)])):i.createCommentVNode("",!0)}const za=C(Ca,[["render",Ea],["__scopeId","data-v-952dee5c"]]),gr="",Pa={name:"IdmWaterTemp",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 J,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgba(95, 143, 197)"],[46/255,"rgba(95, 143, 197)"],[69/255,"rgb(80, 140, 62)"],[92/255,"rgb(121, 146, 28)"],[115/255,"rgb(171, 161, 14)"],[138/255,"rgb(223, 177, 69)"],[161/255,"rgb(243, 150, 6)"],[184/255,"rgb(236, 95, 21)"],[207/255,"rgb(190, 65, 18)"],[230/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ye=a=>(i.pushScopeId("data-v-67e5094b"),a=a(),i.popScopeId(),a),Na={key:0},Ta=[ye(()=>i.createElementVNode("span",null,"°C",-1)),ye(()=>i.createElementVNode("span",null,"0",-1)),ye(()=>i.createElementVNode("span",null,"10",-1)),ye(()=>i.createElementVNode("span",null,"20",-1)),ye(()=>i.createElementVNode("span",null,"30",-1)),ye(()=>i.createElementVNode("span",null,"40",-1))];function Ia(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Na,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:o.right+"px",bottom:t.bottom}])},Ta,4)])):i.createCommentVNode("",!0)}const Da=C(Pa,[["render",Ia],["__scopeId","data-v-67e5094b"]]),Cr="",Va={name:"IdmTemp",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 J,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgb(149, 137, 211)"],[100/255,"rgb(149, 137, 211)"],[110/255,"rgb(150, 209, 216)"],[120/255,"rgb(129, 204, 197)"],[130/255,"rgb(103, 180, 186)"],[140/255,"rgb(95, 143, 197)"],[150/255,"rgb(80, 140, 62)"],[160/255,"rgb(121, 146, 28)"],[170/255,"rgb(171, 161, 14)"],[180/255,"rgb(223, 177, 6)"],[190/255,"rgb(243, 150, 6)"],[200/255,"rgb(236, 95, 21)"],[210/255,"rgb(190, 65, 18)"],[220/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},Y=a=>(i.pushScopeId("data-v-389ea886"),a=a(),i.popScopeId(),a),Ra={key:0},Ba=[Y(()=>i.createElementVNode("span",null,"°C",-1)),Y(()=>i.createElementVNode("span",null,"-20",-1)),Y(()=>i.createElementVNode("span",null,"-10",-1)),Y(()=>i.createElementVNode("span",null,"0",-1)),Y(()=>i.createElementVNode("span",null,"10",-1)),Y(()=>i.createElementVNode("span",null,"20",-1)),Y(()=>i.createElementVNode("span",null,"30",-1)),Y(()=>i.createElementVNode("span",null,"40",-1))];function $a(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Ra,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:o.right+"px",bottom:t.bottom}])},Ba,4)])):i.createCommentVNode("",!0)}const Aa=C(Va,[["render",$a],["__scopeId","data-v-389ea886"]]),Dr="",Ma={name:"IdmArctic",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 J,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgba(76, 165, 228, 0)"],[50/255,"rgba(76, 165, 228, 0)"],[51/255,"rgb(76, 165, 228)"],[102/255,"rgb(129, 204, 197)"],[153/255,"rgb(150, 209, 216)"],[204/255,"rgb(180, 209, 216)"],[1,"rgb(180, 209, 216)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},fe=a=>(i.pushScopeId("data-v-db805141"),a=a(),i.popScopeId(),a),Wa={key:0},Oa=[fe(()=>i.createElementVNode("span",null,"m",-1)),fe(()=>i.createElementVNode("span",null,"0",-1)),fe(()=>i.createElementVNode("span",null,"0.5",-1)),fe(()=>i.createElementVNode("span",null,"1",-1)),fe(()=>i.createElementVNode("span",null,"1.5",-1)),fe(()=>i.createElementVNode("span",null,"2",-1))];function ja(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Wa,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:o.right+"px",bottom:t.bottom}])},Oa,4)])):i.createCommentVNode("",!0)}const Fa=C(Ma,[["render",ja],["__scopeId","data-v-db805141"]]),Wr="",Ha={name:"IdmPoint",emits:["point","more"],props:{map:{type:Object},show:{type:Boolean},timeZone:{type:Number,default:0},meteo:{type:Object}},data(){return{showMeteo:!1,meteoMarker:void 0,helper:z.CompanyHelper}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.show&&this.handleBind()}},meteo:{handler(){this.meteo?(this.showMeteo=!0,this.handleRender()):this.showMeteo=!1}}},computed:{computeTime(){return function(a){if(a){const e=A(a).utc().utcOffset(this.timeZone),t=this.timeZone<0?this.timeZone:"+"+this.timeZone;return`${e.format("MMM-DD,HHmm")} ( UTC ${t} )`}return"-"}},computeLat(){return function(a,e=4){return E.LngLatHelper.lat2pretty(a,e).pretty}},computeLng(){return function(a,e=4){return E.LngLatHelper.lng2pretty(a,e).pretty}},roundPrecision(){return function(a,e=4){return isNaN(a)?"-":E.LngLatHelper.roundPrecision(a,e)}}},methods:{handleBind(){var a,e;this.show?(a=this.map)==null||a.on("click",this.handleClick):((e=this.map)==null||e.off("click",this.handleClick),this.showMeteo=!1)},handleClick(a){a.originalEvent.stopPropagation();const e=a.originalEvent.target.className;e.indexOf("close")>-1?this.showMeteo=!1:e==="more"?this.$emit("more",this.meteo):this.$emit("point",a.lngLat)},handleRender(){var a;if(this.meteo){const e=document.getElementById("point-meteo");this.meteoMarker?(a=this.meteoMarker)==null||a.setLngLat([this.meteo.lng,this.meteo.lat]):this.meteoMarker=new Z.Marker(e).setLngLat([this.meteo.lng,this.meteo.lat]).addTo(this.map)}}}},O=a=>(i.pushScopeId("data-v-22c5d8c1"),a=a(),i.popScopeId(),a),Ua={id:"point-meteo",class:"point-meteo"},Za={class:"meteo-box"},Ga={class:"header-box"},Ja={class:"main"},Xa={class:"sub"},qa={class:"main-box"},Ya={class:"flex-space"},Qa=O(()=>i.createElementVNode("label",null,"Wind",-1)),Ka={class:"flex-space"},ei=O(()=>i.createElementVNode("label",null,"Wind.Wave",-1)),ti={class:"flex-space"},ai=O(()=>i.createElementVNode("label",null,"Swell",-1)),ii={class:"flex-space"},oi=O(()=>i.createElementVNode("label",null,"Sig.Wave",-1)),ri={class:"flex-space"},si=O(()=>i.createElementVNode("label",null,"Current",-1)),ni={class:"flex-space"},li=O(()=>i.createElementVNode("label",null,"Precip",-1)),ci={class:"flex-space"},hi=O(()=>i.createElementVNode("label",null,"Visibility",-1)),di={class:"flex-space"},pi=O(()=>i.createElementVNode("label",null,"Temp",-1)),mi={class:"flex-space"},yi=O(()=>i.createElementVNode("label",null,"Water Temp",-1)),fi={key:0,class:"flex-space",style:{"justify-content":"flex-end"}},ui=[O(()=>i.createElementVNode("span",{class:"more"},"More >>",-1))];function gi(a,e,t,r,o,s){var l,n,c,h,d,p,g,y,f,u,m,_,b,w,v,L,N,T,D,R,B,M,ie,oe,re,se,ne,le,ce,Q,W,j,he,F,S,$,de,H,pe,K,ee,te,ue,ge,be,_e,Le;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ua,[i.createElementVNode("div",Za,[i.createElementVNode("div",Ga,[i.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=ke=>o.showMeteo=!1)},""),i.createElementVNode("div",Ja,i.toDisplayString(s.computeLat((l=t.meteo)==null?void 0:l.lat))+","+i.toDisplayString(s.computeLng((n=t.meteo)==null?void 0:n.lng)),1),i.createElementVNode("div",Xa,i.toDisplayString(s.computeTime((c=t.meteo)==null?void 0:c.utc)),1)]),i.createElementVNode("div",qa,[i.createElementVNode("div",Ya,[Qa,i.createElementVNode("span",null,i.toDisplayString(((d=(h=t.meteo)==null?void 0:h.wind)==null?void 0:d.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((g=(p=t.meteo)==null?void 0:p.wind)==null?void 0:g.kts,1))+"[kts]/"+i.toDisplayString((f=(y=t.meteo)==null?void 0:y.wind)==null?void 0:f.scale)+"[BF]/"+i.toDisplayString(s.roundPrecision((m=(u=t.meteo)==null?void 0:u.gusts)==null?void 0:m.kts,1))+"[kts]",1)]),i.createElementVNode("div",Ka,[ei,i.createElementVNode("span",null,i.toDisplayString(((w=(b=(_=t.meteo)==null?void 0:_.wave)==null?void 0:b.wd)==null?void 0:w.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((N=(L=(v=t.meteo)==null?void 0:v.wave)==null?void 0:L.wd)==null?void 0:N.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((R=(D=(T=t.meteo)==null?void 0:T.wave)==null?void 0:D.wd)==null?void 0:R.period,1))+"[s]",1)]),i.createElementVNode("div",ti,[ai,i.createElementVNode("span",null,i.toDisplayString(((ie=(M=(B=t.meteo)==null?void 0:B.wave)==null?void 0:M.swell)==null?void 0:ie.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((se=(re=(oe=t.meteo)==null?void 0:oe.wave)==null?void 0:re.swell)==null?void 0:se.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((ce=(le=(ne=t.meteo)==null?void 0:ne.wave)==null?void 0:le.swell)==null?void 0:ce.period,1))+"[s]",1)]),i.createElementVNode("div",ii,[oi,i.createElementVNode("span",null,i.toDisplayString(((j=(W=(Q=t.meteo)==null?void 0:Q.wave)==null?void 0:W.sig)==null?void 0:j.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((S=(F=(he=t.meteo)==null?void 0:he.wave)==null?void 0:F.sig)==null?void 0:S.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((H=(de=($=t.meteo)==null?void 0:$.wave)==null?void 0:de.sig)==null?void 0:H.period,1))+"[s]",1)]),i.createElementVNode("div",ri,[si,i.createElementVNode("span",null,i.toDisplayString(((K=(pe=t.meteo)==null?void 0:pe.current)==null?void 0:K.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((te=(ee=t.meteo)==null?void 0:ee.current)==null?void 0:te.kts,2))+"[kts]",1)]),i.createElementVNode("div",ni,[li,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((ge=(ue=t.meteo)==null?void 0:ue.precip)==null?void 0:ge.inter6h,2))+"[mm]",1)]),i.createElementVNode("div",ci,[hi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision(((be=t.meteo)==null?void 0:be.visibility)/1852,0))+"[nm]",1)]),i.createElementVNode("div",di,[pi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((_e=t.meteo)==null?void 0:_e.temp,0))+"[°C]",1)]),i.createElementVNode("div",mi,[yi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((Le=t.meteo)==null?void 0:Le.waterTemp,2))+"[°C]",1)])]),a.$attrs.permission&o.helper.LEVEL.Prime?(i.openBlock(),i.createElementBlock("div",fi,ui)):i.createCommentVNode("",!0)])],512)),[[i.vShow,o.showMeteo]])}const bi=C(Ha,[["render",gi],["__scopeId","data-v-22c5d8c1"]]),_i={name:"IdmWarZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"war-zone-source",zoneLayer:"war-zone-layer",zoneLabelLayer:"war-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-color":"#f44336","fill-opacity":.4}},this.beforeLayer),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#f44336"}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-1]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Li(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const wi=C(_i,[["render",Li]]),xi={name:"IdmGmdssArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"gmdss-area-source",areaLayer:"gmdss-area-layer",areaLabelLayer:"gmdss-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","val"],"AreaI","#EB8996","AreaII","#6F448B","AreaIII","#3E8BD3","AreaIV","#5EBCC4","AreaV","#00AAE7","AreaVI","#9CCE6D","AreaVII","#F4AE00","AreaVIII","#EF9A85","AreaIX","#00AAA7","AreaX","#7AC49F","AreaXI","#DFDFDF","AreaXII","#FFF974","AreaXIII","#EF9A85","AreaXIV","#86A2D1","AreaXV","#EC8972","AreaXVI","#EAC2DA","AreaXVII","#B9C8E7","AreaXVIII","#BBA1C8","AreaXIX","#FAE0BD","AreaXX","#DBECC8","AreaXXI","#D496AF","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-opacity":.8,"text-color":"#000"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function vi(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const Ci=C(xi,[["render",vi]]),Si={name:"IdmEcaZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"eca-zone-source",zoneLayer:"eca-zone-layer",zoneLabelLayer:"eca-zone-label-layer"}},watch:{zone:{handler(){this.zone?this.handleRender():this.handleClear()}}},methods:{handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#05f324"}}),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-color":"#04c021","line-width":1,"line-opacity":1}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-max-width":16,"text-justify":"left","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function ki(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const Ei=C(Si,[["render",ki]]),jr="",zi={name:"IdmAlertZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"alert-zone-source",polygonLayer:"alert-zone-polygon-layer",polygonLabelLayer:"alert-zone-polygon-label-layer",lineLayer:"alert-zone-line-layer",lineLabelLayer:"alert-zone-line-label-layer",pointLayer:"alert-zone-point-layer",showZone:!1,form:{}}},watch:{zone:{handler(){var a,e;this.zone?(this.handleRender(),(a=this.map)==null||a.on("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick))}}},methods:{handleClick(a){var r;const e=a.features[0],t=(r=this.zone)==null?void 0:r.features.filter(o=>{var s;return o.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];t&&(this.showZone=!0,this.form={...t.properties})},handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.polygonLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"#d57d02","fill-opacity":.4,"fill-color":"#d57d02"}}),this.map.addLayer({id:this.polygonLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-width":1,"line-color":"#d57d02"}}),this.map.addLayer({id:this.lineLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],paint:{"line-color":"#d57d02","line-width":2}}),this.map.addLayer({id:this.polygonLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.1,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],layout:{"symbol-placement":"line-center","icon-image":"alert","icon-size":.1,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.pointLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.1},paint:{"icon-opacity":.8}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.polygonLayer)&&this.map.removeLayer(this.polygonLayer),this.map.getLayer(this.polygonLayer+"-border")&&this.map.removeLayer(this.polygonLayer+"-border"),this.map.getLayer(this.polygonLabelLayer)&&this.map.removeLayer(this.polygonLabelLayer),this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getLayer(this.pointLayer)&&this.map.removeLayer(this.pointLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},Pi={id:"zone-info"},Ni=["innerHTML"];function Ti(a,e,t,r,o,s){var l;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Pi,[i.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=n=>o.showZone=!1)},""),i.createElementVNode("div",{class:"rich-context",innerHTML:(l=o.form)==null?void 0:l.name},null,8,Ni)],512)),[[i.vShow,o.showZone]])}const Ii=C(zi,[["render",Ti],["__scopeId","data-v-c0864afc"]]),Fr="",Di={name:"IdmPort",props:{map:{type:Object},port:{type:Object},beforeLayer:{type:String}},emits:["port"],data(){return{source:"port-source",layer:"port-layer",showPort:!1,form:{},marker:void 0}},computed:{computeLat(){return function(a){return E.LngLatHelper.lat2pretty(a,4).pretty}},computeLng(){return function(a){return E.LngLatHelper.lng2pretty(a,4).pretty}}},watch:{port:{handler(){var a,e;this.port?(this.handleRender(),(a=this.map)==null||a.on("click",[this.layer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.layer],this.handleClick))}}},methods:{handleClick(a){var r;const e=a.features[0],t=(r=this.port)==null?void 0:r.features.filter(o=>{var s;return o.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];if(t){this.showPort=!0,this.form={...t.properties},this.form.lng=t.geometry.coordinates[0],this.form.lat=t.geometry.coordinates[1];const o=document.getElementById("port-info");this.marker?this.marker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.marker=new Z.Marker(o).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([0,-85]).addTo(this.map)}},handleEmit(){this.$emit("port",this.form)},handleRender(){var a;this.map?this.port&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.port):(this.map.addSource(this.source,{type:"geojson",data:this.port}),this.map.addLayer({id:this.layer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"port","text-anchor":"left","text-field":"{name}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[1,0]},paint:{"text-color":"rgba(0, 0, 0, 0.8)","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.showPort=!1,this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},xe=a=>(i.pushScopeId("data-v-4ab013cc"),a=a(),i.popScopeId(),a),Vi={id:"port-info"},Ri={class:"port-box"},Bi={class:"flex-start"},$i=xe(()=>i.createElementVNode("label",null,"Name : ",-1)),Ai={class:"flex-start"},Mi=xe(()=>i.createElementVNode("label",null,"Position : ",-1)),Wi={class:"flex-start"},Oi=xe(()=>i.createElementVNode("label",null,"LoCode : ",-1)),ji={class:"flex-start",style:{"align-items":"flex-start"}},Fi=xe(()=>i.createElementVNode("label",null,"Region : ",-1));function Hi(a,e,t,r,o,s){return i.withDirectives((i.openBlock(),i.createElementBlock("div",Vi,[i.createElementVNode("div",{class:"close iconfont",onClick:e[0]||(e[0]=l=>o.showPort=!1)},""),i.createElementVNode("div",Ri,[i.createElementVNode("div",Bi,[$i,i.createElementVNode("span",{onClick:e[1]||(e[1]=(...l)=>s.handleEmit&&s.handleEmit(...l))},i.toDisplayString(o.form.name),1)]),i.createElementVNode("div",Ai,[Mi,i.createElementVNode("span",null,i.toDisplayString(s.computeLat(o.form.lat))+", "+i.toDisplayString(s.computeLng(o.form.lng)),1)]),i.createElementVNode("div",Wi,[Oi,i.createElementVNode("span",null,i.toDisplayString(o.form.loCode||"-"),1)]),i.createElementVNode("div",ji,[Fi,i.createElementVNode("span",null,i.toDisplayString(o.form.city||"-")+", "+i.toDisplayString(o.form.country||"-"),1)])])],512)),[[i.vShow,o.showPort]])}const Ui=C(Di,[["render",Hi],["__scopeId","data-v-4ab013cc"]]),Zi={name:"IdmLoadLine",props:{map:{type:Object},line:{type:Object},beforeLayer:{type:String}},data(){return{source:"load-line-source",lineLayer:"load-line-layer",lineLabelLayer:"load-line-label-layer"}},watch:{line:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.line&&(this.map.addSource(this.source,{type:"geojson",data:this.line}),this.map.addLayer({id:this.lineLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.75,"fill-color":["match",["get","val"],"LLGreen","#A0C0C0","LLRed","#F5A39D","LLBlue","#6B94E4","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{lbl} (Length < {shipLength}, {start} - {end})","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Gi(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const Ji=C(Zi,[["render",Gi]]),Xi={name:"IdmTimezone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"time-zone-source",zoneLayer:"time-zone-layer",zoneLabelLayer:"time-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","offSet"],"-11.5","rgba(255,0,0,0.4)","-11","rgba(0,255,0,0.3)","-10.5","rgba(0,255,0,0.3)","-10","rgba(0,0,255,0.3)","-9.5","rgba(0,0,255,0.3)","-9","rgba(255,0,0,0.4)","-8.5","rgba(255,0,0,0.4)","-8","rgba(0,255,0,0.3)","-7.5","rgba(0,255,0,0.3)","-7","rgba(0,0,255,0.3)","-6.5","rgba(0,0,255,0.3)","-6","rgba(255,0,0,0.4)","-5.5","rgba(255,0,0,0.4)","-5","rgba(0,255,0,0.3)","-4.5","rgba(0,255,0,0.3)","-4","rgba(0,0,255,0.3)","-3.5","rgba(0,0,255,0.3)","-3","rgba(255,0,0,0.4)","-2.5","rgba(255,0,0,0.4)","-2","rgba(0,255,0,0.3)","-1.5","rgba(0,255,0,0.3)","-1","rgba(0,0,255,0.3)","-0.5","rgba(0,0,255,0.3)","+0","rgba(255,0,0,0.4)","+0.5","rgba(255,0,0,0.4)","+1","rgba(0,255,0,0.3)","+1.5","rgba(0,255,0,0.3)","+2","rgba(0,0,255,0.3)","+2.5","rgba(0,0,255,0.3)","+3","rgba(255,0,0,0.4)","+3.5","rgba(255,0,0,0.4)","+4","rgba(0,255,0,0.3)","+4.5","rgba(0,255,0,0.3)","+5","rgba(0,0,255,0.3)","+5.5","rgba(0,0,255,0.3)","+6","rgba(255,0,0,0.4)","+6.5","rgba(255,0,0,0.4)","+7","rgba(0,255,0,0.3)","+7.5","rgba(0,255,0,0.3)","+8","rgba(0,0,255,0.3)","+8.5","rgba(0,0,255,0.3)","+9","rgba(255,0,0,0.4)","+9.5","rgba(255,0,0,0.4)","+10","rgba(0,255,0,0.3)","+10.5","rgba(0,255,0,0.3)","+11","rgba(0,0,255,0.3)","+11.5","rgba(0,0,255,0.3)","rgba(255,0,0,0.4)"]}}),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{offSet}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,1]},paint:{"text-opacity":.8,"text-color":"#fff"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function qi(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const Yi=C(Xi,[["render",qi]]),Qi={name:"IdmVoluntaryReportingArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"vra-source",areaLayer:"vra-layer",areaLabelLayer:"vra-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Ki(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const eo=C(Qi,[["render",Ki]]),to={name:"IdmSpecialArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"special-area-source",areaLayer:"special-area-layer",areaLabelLayer:"special-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.area.features.forEach(a=>{a.geometry.type==="Polygon"&&a.geometry.coordinates.forEach(e=>E.LngLatHelper.convertToMonotonicLng2(e))}),this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":["match",["get","val"],"DefaultStyle","rgb(0,0,0)","JWCriskArea","rgb(0,0,0)","rgb(0,0,0)"]}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":.4,"line-color":"rgb(0,0,0)"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function ao(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const io=C(to,[["render",ao]]),oo={name:"IdmTerminator",props:{map:{type:Object},area:{type:Object}},data(){return{source:"terminator-source",layer:"terminator-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.layer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":"rgba(0, 0, 0, 0.4)"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function ro(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const so=C(oo,[["render",ro]]),Hr="",no={name:"IdmLatLng",props:{map:{type:Object},show:{type:Boolean},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{lngLat:void 0,source:"idm-lat-lng-source",layer:"idm-lat-lng-layer",labelLayer:"idm-lat-lng-label-layer",right:10}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){var a;this.map&&((a=this.map)==null||a.on("mousemove",this.handleMouseMove))},immediate:!0},toggleVersion:{handler(){var a,e,t;this.right=(((a=document.getElementsByClassName("legend-bars")[0])==null?void 0:a.clientWidth)||-10)+(((e=document.getElementsByClassName("available-layers-show")[0])==null?void 0:e.clientWidth)||0)+(((t=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:t.clientWidth)||0)+20},immediate:!0}},methods:{handleBind(){var a,e;this.show?((a=this.map)==null||a.on("zoomend",this.handleZoomEnd),this.handleRender()):(this.handleClear(),(e=this.map)==null||e.off("zoomend",this.handleZoomEnd))},handleMouseMove(a){const e=a.lngLat,t=E.LngLatHelper.lng2pretty(e.lng,2),r=E.LngLatHelper.lat2pretty(e.lat,2);this.lngLat={lng:t,lat:r}},handleComputeLatLngs(){var r;const a=(r=this.map)==null?void 0:r.getZoom();console.log(a);let e=30;a>4?e=10:a>3&&(e=15);const t=[];for(let o=-60;o<90;o+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[-180,o],[180,o]]}});for(let o=-180;o<180;o+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[o,-90],[o,90]]}});for(let o=180;o>-180;o-=e)for(let s=-60;s<90;s+=e)t.push({type:"Feature",geometry:{type:"Point",coordinates:[o,s]},properties:{val:`${s>0?s+" N":s===0?s:s*-1+" S"}, ${o>0?o+" E":o*-1+" W"}`}});return t},handleZoomEnd(){var e;const a=this.handleComputeLatLngs();(e=this.map)==null||e.getSource(this.source).setData(x.featureCollection(a))},handleRender(){if(this.map){const a=this.handleComputeLatLngs();this.map.addSource(this.source,{type:"geojson",data:{type:"FeatureCollection",features:a}}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"rgba(0, 0, 0, 0.3)","line-width":1}}),this.map.addLayer({id:this.labelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{val}","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}})}},handleClear(){var a,e,t,r,o,s;(a=this.map)!=null&&a.getLayer(this.layer)&&((e=this.map)==null||e.removeLayer(this.layer)),(t=this.map)!=null&&t.getLayer(this.labelLayer)&&((r=this.map)==null||r.removeLayer(this.labelLayer)),(o=this.map)!=null&&o.getSource(this.source)&&((s=this.map)==null||s.removeSource(this.source))}}},lo=(a=>(i.pushScopeId("data-v-7367f59b"),a=a(),i.popScopeId(),a))(()=>i.createElementVNode("span",null,", ",-1));function co(a,e,t,r,o,s){return o.lngLat?(i.openBlock(),i.createElementBlock("div",{key:0,class:"lat-lng-tip",style:i.normalizeStyle({right:o.right+"px",bottom:t.bottom})},[i.createElementVNode("span",null,i.toDisplayString(o.lngLat.lat.pretty),1),lo,i.createElementVNode("span",null,i.toDisplayString(o.lngLat.lng.pretty),1)],4)):i.createCommentVNode("",!0)}const Se=C(no,[["render",co],["__scopeId","data-v-7367f59b"]]),ho={name:"IdmMeasure",props:{map:{type:Object},show:{type:Boolean}},data(){return{geojson:[],source:"measure-source",layer:"measure-layer",labelLayer:"measure-label-layer",tmpSource:"measure-tmp-source",tmpLayer:"measure-tmp-layer",tmpLabelLayer:"measure-tmp-label-layer",closeMarkers:{},pointMarkers:{},tipMarker:void 0,contextmenu:void 0,navigation:"RL"}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.handleBind()}}},methods:{handleBind(){var a,e,t,r,o,s,l,n,c,h;if(this.show)(a=this.map)==null||a.getCanvas().addEventListener("keydown",this.handleKeydown),(e=this.map)==null||e.on("mousemove",this.handleMove),(t=this.map)==null||t.on("dblclick",this.handleDblClick),(r=this.map)==null||r.on("click",this.handleClick),(o=this.map)==null||o.on("contextmenu",this.handleContextmenu),this.map&&(this.map.getCanvas().style.cursor="crosshair");else{(s=this.map)==null||s.getCanvas().removeEventListener("keydown",this.handleKeydown),(l=this.map)==null||l.off("mousemove",this.handleMove),(n=this.map)==null||n.off("dblclick",this.handleDblClick),(c=this.map)==null||c.off("click",this.handleClick),(h=this.map)==null||h.off("contextmenu",this.handleContextmenu);for(const d of this.geojson)this.handleClear(d,!0);this.geojson=[],this.map&&(this.map.getCanvas().style.cursor="grab")}},handleKeydown(a){if(a.key==="Shift"){this.navigation=this.navigation==="RL"?"GC":"RL";const t=this.geojson.at(-1).features.filter(r=>r.geometry.type==="Point");t.length&&(t.at(-1).properties.mode=this.navigation)}},handleDrag(a){var t,r,o,s,l,n,c,h,d,p;const e=(r=(t=a.target)==null?void 0:t._element)==null?void 0:r.id;if((e==null?void 0:e.split("-").length)===2){const g=this.geojson.filter(m=>m.id===e.split("-")[0])[0];this.pointMarkers[g.id].filter(m=>{var _;return((_=m._element)==null?void 0:_.id)===e})[0].setLngLat([(s=(o=a.target)==null?void 0:o._lngLat)==null?void 0:s.lng,(n=(l=a.target)==null?void 0:l._lngLat)==null?void 0:n.lat]);let f;g.features.forEach((m,_)=>{if(m.geometry.type==="Point"&&m.properties.id==e.split("-")[1]){f=_;return}});const u=g.features.filter(m=>m.geometry.type==="Point");this.handleTmpPointUpdate(g,u[f-1],{lng:(h=(c=a.target)==null?void 0:c._lngLat)==null?void 0:h.lng,lat:(p=(d=a.target)==null?void 0:d._lngLat)==null?void 0:p.lat,properties:u[f].properties},f===u.length-1?void 0:u[f+1])}},handleDragEnd(a){var t,r,o,s,l,n,c,h,d,p;const e=(r=(t=a.target)==null?void 0:t._element)==null?void 0:r.id;if((e==null?void 0:e.split("-").length)===2){const g=this.geojson.filter(u=>u.id===e.split("-")[0])[0];this.pointMarkers[g.id].filter(u=>{var m;return((m=u._element)==null?void 0:m.id)===e})[0].setLngLat([(s=(o=a.target)==null?void 0:o._lngLat)==null?void 0:s.lng,(n=(l=a.target)==null?void 0:l._lngLat)==null?void 0:n.lat]);const f=g.features.filter(u=>u.geometry.type==="Point"&&u.properties.id==e.split("-")[1])[0];f.geometry.coordinates=[(h=(c=a.target)==null?void 0:c._lngLat)==null?void 0:h.lng,(p=(d=a.target)==null?void 0:d._lngLat)==null?void 0:p.lat],g.features=g.features.filter(u=>u.geometry.type==="Point"),this.handlePointUpdate(g)}},handleContextmenu(a){var t,r,o,s;a.preventDefault(),(t=this.contextmenu)==null||t.remove();const e=(s=(o=(r=a.originalEvent)==null?void 0:r.target)==null?void 0:o.parentElement)==null?void 0:s.id;if((e==null?void 0:e.split("-").length)===2){const n=this.geojson.filter(c=>c.id===e.split("-")[0])[0].features.filter(c=>c.geometry.type==="Point");if(n.length>2&&n.filter(h=>h.properties.id===(e==null?void 0:e.split("-")[1]))[0]){const h=document.createElement("div");h.className="point-contextmenu-marker",h.innerHTML=`<span id="del-${e}" class="del-point">Del</span>`,this.contextmenu=new Z.Marker(h).setOffset([24,0]).setLngLat([a.lngLat.lng,a.lngLat.lat]).addTo(this.map)}}},handleClick(a){var t,r,o,s,l;(t=this.contextmenu)==null||t.remove();const e=a.originalEvent.target.className;if(e==="marker-close"){const n=(o=(r=a.originalEvent)==null?void 0:r.srcElement)==null?void 0:o.id,c=this.geojson.filter(h=>h.id===n)[0];c&&this.handleClear(c,!0),this.geojson=this.geojson.filter(h=>h.id!==n)}else if(e==="del-point"){const n=(l=(s=a.originalEvent.target.id)==null?void 0:s.replace("del-",""))==null?void 0:l.split("-"),c=this.geojson.filter(h=>h.id===n[0])[0];c.features=c.features.filter(h=>h.geometry.type==="Point"&&h.properties.id!==n[1]),this.handlePointUpdate(c)}else if(e!=="marker-label"){let n=this.geojson.at(-1);n||(n=x.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(n)),n.features=n.features.filter(h=>h.geometry.type==="Point");const c=x.feature({type:"Point",coordinates:[a.lngLat.lng,a.lngLat.lat]},{id:new Date().getTime().toString(),mode:this.navigation});n.features.push(c),this.handlePointUpdate(n)}},handlePointUpdate(a){const e=a.features;if(e.length>1){let t=0;const r=[];for(let o=1;o<e.length;o++){const s=e[o-1],l=e[o],n=s.properties,c={lng:s.geometry.coordinates[0],lat:s.geometry.coordinates[1]},h={lng:l.geometry.coordinates[0],lat:l.geometry.coordinates[1]},d=E.LaneHelper.calculateDistance(c,h,n.mode==="RL",2),p=E.LaneHelper.calculateBearing(c,h,n.mode==="RL",2);t=E.LngLatHelper.roundPrecision(t+d,2);let g;n.mode==="RL"?g=E.LngLatHelper.convertToMonotonicLng([c,h]):g=E.LngLatHelper.convertToMonotonicLng(E.LaneHelper.interpolateCoordinates(c,h,200));const y=x.lineString(g.map(f=>[f.lng,f.lat]));y.properties.dist=d,y.properties.bearing=p,y.properties.total=t,r.push(y)}e.push(...r),a.total=t}return this.handleRender(a),a},handleTmpPointUpdate(a,e,t,r){const o=x.featureCollection([]);let s,l;if(e){const c=e.properties,h={lng:e.geometry.coordinates[0],lat:e.geometry.coordinates[1]},d={lng:t.lng,lat:t.lat};s=E.LaneHelper.calculateDistance(h,d,c.mode==="RL",2),l=E.LaneHelper.calculateBearing(h,d,c.mode==="RL",2);let p;c.mode==="RL"?p=E.LngLatHelper.convertToMonotonicLng([h,d]):p=E.LngLatHelper.convertToMonotonicLng(E.LaneHelper.interpolateCoordinates(h,d,200));const g=x.lineString(p.map(y=>[y.lng,y.lat]));g.properties.dist=s,g.properties.bearing=l,o.features.push(g)}if(r){const c=t.properties,h=t,d={lng:r.geometry.coordinates[0],lat:r.geometry.coordinates[1]};s=E.LaneHelper.calculateDistance(h,d,c.mode==="RL",2),l=E.LaneHelper.calculateBearing(h,d,c.mode==="RL",2);let p;c.mode==="RL"?p=E.LngLatHelper.convertToMonotonicLng([h,d]):p=E.LngLatHelper.convertToMonotonicLng(E.LaneHelper.interpolateCoordinates(h,d,200));const g=x.lineString(p.map(y=>[y.lng,y.lat]));g.properties.dist=s,g.properties.bearing=l,o.features.push(g)}this.map.getSource(this.tmpSource)?this.map.getSource(this.tmpSource).setData(o):this.map.addSource(this.tmpSource,{type:"geojson",data:o}),this.map.getLayer(this.tmpLayer)||this.map.addLayer({id:this.tmpLayer,type:"line",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F44336","line-width":2,"line-opacity":1,"line-dasharray":[3,2]}}),this.map.getLayer(this.tmpLabelLayer)||this.map.addLayer({id:this.tmpLabelLayer,type:"symbol",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist} nm","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#F44336","text-halo-width":4,"text-halo-blur":0}});let n;if(r?n='<div class="marker-label">Drag and drop</div>':n=`<div class="marker-label">Tol distance: <b>${E.LngLatHelper.roundPrecision((a.total??0)+s,2)}</b>nm, bearing: <b>${l}</b>°</div><div class="marker-label">${this.navigation==="RL"?"RL":"GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`,this.tipMarker)this.tipMarker._element.innerHTML=n,this.tipMarker.setLngLat([t.lng,t.lat]);else{const c=document.createElement("div");c.className="tip-marker",c.innerHTML=n,this.tipMarker=new Z.Marker(c).setOffset([140,0]).setLngLat([t.lng,t.lat]).addTo(this.map)}},handleMove(a){this.map.getCanvas().style.cursor="crosshair";let e=this.geojson.at(-1);e||(e=x.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e));const t=e.features.filter(r=>r.geometry.type==="Point");t!=null&&t.length&&this.handleTmpPointUpdate(e,t.at(-1),{lng:a.lngLat.lng,lat:a.lngLat.lat})},handleDblClick(a){a.preventDefault();let e=this.geojson.at(-1);e.closed=!0,this.handleRender(e),e=x.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e)},handleRender(a){var e;if((e=a==null?void 0:a.features)!=null&&e.length){const t=`${a.id}-${this.source}`,r=`${a.id}-${this.layer}`,o=`${a.id}-${this.labelLayer}`;this.map.getSource(t)?this.map.getSource(t).setData(a):this.map.addSource(t,{type:"geojson",data:a}),this.handleClear(a,!1),this.map.addLayer({id:r,type:"line",source:t,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F44336","line-width":2}}),this.map.addLayer({id:o,type:"symbol",source:t,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist}nm,{bearing}°","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#F44336","text-halo-width":4,"text-halo-blur":0}});const s=a.features.filter(l=>l.geometry.type==="Point");for(const l of s){const n=document.createElement("div");n.id=`${a.id}-${l.properties.id}`,n.className=`${a.closed?"point-marker closed":"point-marker"}`,n.innerHTML='<div class="marker-circle"></div>';const c=new Z.Marker({element:n,draggable:!0,contextmenu:!0}).setLngLat(l.geometry.coordinates).addTo(this.map);c.on("drag",this.handleDrag),c.on("dragend",this.handleDragEnd),this.pointMarkers[a.id]?this.pointMarkers[a.id].push(c):this.pointMarkers[a.id]=[c]}if(a.closed){const l=s.at(-1),c=a.features.filter(d=>d.geometry.type==="LineString").at(-1),h=document.createElement("div");h.className="point-summary-marker",h.innerHTML=`<div id="${a.id}" class="marker-close">×</div><div class="marker-label">Tol: ${c.properties.total}nm</div>`,this.closeMarkers[a.id]=new Z.Marker(h).setOffset([60,0]).setLngLat(l.geometry.coordinates).addTo(this.map)}}},handleClear(a,e=!0){var s,l,n,c,h,d,p,g,y;const t=`${a.id}-${this.source}`,r=`${a.id}-${this.layer}`,o=`${a.id}-${this.labelLayer}`;(s=this.map)!=null&&s.getLayer(r)&&this.map.removeLayer(r),(l=this.map)!=null&&l.getLayer(o)&&this.map.removeLayer(o),(n=this.map)!=null&&n.getLayer(this.tmpLayer)&&this.map.removeLayer(this.tmpLayer),(c=this.map)!=null&&c.getLayer(this.tmpLabelLayer)&&this.map.removeLayer(this.tmpLabelLayer),(h=this.closeMarkers[a.id])==null||h.remove(),this.closeMarkers[a.id]=void 0,(d=this.pointMarkers[a.id])==null||d.forEach(f=>{f==null||f.remove()}),this.pointMarkers[a.id]=[],(p=this.tipMarker)==null||p.remove(),this.tipMarker=void 0,e&&((g=this.map)!=null&&g.getSource(t))&&this.map.removeSource(t),e&&((y=this.map)!=null&&y.getSource(this.tmpSource))&&this.map.removeSource(this.tmpSource)}}};function po(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const mo=C(ho,[["render",po]]),Zr="",yo={name:"IdmENC",props:{map:{type:Object},enabled:{type:Boolean},beforeLayer:{type:String,default:"grayland"},bottom:{type:String,default:"260px"},token:{type:String,default:""},toggleVersion:{type:Number},permission:{type:Number}},emits:["enc"],data(){return{helper:z.CompanyHelper,vendor:this.$attrs.permission&z.CompanyHelper.LEVEL.Supper?"hi":"i4",right:10}},watch:{vendor:{handler(){this.$emit("enc",this.vendor)},immediate:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{}},ze=a=>(i.pushScopeId("data-v-ab627b83"),a=a(),i.popScopeId(),a),fo={key:0},uo={class:"bar-item"},go=[ze(()=>i.createElementVNode("span",{class:"iconfont"},"HI",-1))],bo=[ze(()=>i.createElementVNode("span",{class:"iconfont"},"I4",-1))];function _o(a,e,t,r,o,s){return t.enabled&&t.permission&o.helper.LEVEL.Supper?(i.openBlock(),i.createElementBlock("div",fo,[i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({position:"absolute",right:o.right+"px",bottom:t.bottom})},[i.createElementVNode("div",uo,[i.createElementVNode("div",{class:i.normalizeClass(o.vendor==="hi"?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=l=>o.vendor="hi")},go,2),i.createElementVNode("div",{class:i.normalizeClass(o.vendor==="i4"?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=l=>o.vendor="i4")},bo,2)])],4)])):i.createCommentVNode("",!0)}const Lo=C(yo,[["render",_o],["__scopeId","data-v-ab627b83"]]),Xr="",wo={name:"IdmGLV2",components:{IdmGlLayer:mt,IdmWindBarb:wt,IdmWindParticle:kt,IdmCurrents:Vt,IdmCurrentParticle:Mt,IdmSigWave:jt,IdmSwell:Ut,IdmPrmsl:Jt,IdmIceberg:Yt,IdmTropicals:Ce,IdmPrecip3h:va,IdmVisibility:za,IdmWaterTemp:Da,IdmTemp:Aa,IdmArctic:Fa,IdmWarZone:wi,IdmGmdssArea:Ci,IdmEcaZone:Ei,IdmAlertZone:Ii,IdmPort:Ui,IdmLoadLine:Ji,IdmTimezone:Yi,IdmVRA:eo,IdmSpecialArea:io,IdmTerminator:so,IdmLatLng:Se,IdmMeasure:mo,IdmPoint:bi,IdmENC:Lo},props:{map:{type:Object,default:void 0},token:{type:String},ts:{type:String},beforeLayer:{type:String,default:""}},data(){return{weatherLayers:{},activeWeatherLayers:[],weatherWeight:0,otherLayers:{},otherWeight:0,showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,meteo:void 0,source:"",gateway:"https://cbe.idmwx.com",mapProjection:"mercator",zoom:6,viewport:void 0,particleFactor:void 0,showRampColor:!1,activeWindLayer:!1,showWindParticle:!1,showCurrentParticle:!1,toggleVersion:0,enc:"",defaultMeteoToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg",helper:new Ee}},watch:{ts:{handler(a,e){a&&e&&A(a).utc().format("yyyy-MM-DD HH")!==A(e).utc().format("yyyy-MM-DD HH")&&this.$nextTick(()=>{this.handleDateChange({tropicals:!1})})},immediate:!0},map:{handler(){this.map&&(this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.viewport=new we(this.map),this.handleRampColorInitial())},immediate:!0},enc:{handler(a,e){var t,r,o,s,l,n,c,h;a?((r=(t=this.map)==null?void 0:t.getLayer(a))==null||r.setLayoutProperty("visibility","visible"),(s=(o=this.map)==null?void 0:o.getLayer(e))==null||s.setLayoutProperty("visibility","none")):((n=(l=this.map)==null?void 0:l.getLayer("i4"))==null||n.setLayoutProperty("visibility","none"),(h=(c=this.map)==null?void 0:c.getLayer("hi"))==null||h.setLayoutProperty("visibility","none"))}},activeWeatherLayers:{handler(){var a,e,t,r,o,s,l,n,c,h,d,p,g,y,f,u,m,_;if(!this.map)return!1;this.activeWeatherLayers.length>0?((e=(a=this.map)==null?void 0:a.getLayer(this.enc))==null||e.setLayoutProperty("visibility","none"),(r=(t=this.map)==null?void 0:t.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))==null||r.setLayoutProperty("visibility","visible"),(s=this.map)!=null&&s.getLayer((o=this.viewport)==null?void 0:o.rampColorLayer)&&((l=this.map)!=null&&l.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&this.mapProjection==="mercator"&&((c=this.map)==null||c.moveLayer((n=this.viewport)==null?void 0:n.rampColorLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)),(d=this.map)!=null&&d.getLayer((h=this.viewport)==null?void 0:h.particleLayer)&&((p=this.map)!=null&&p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&this.mapProjection==="mercator"&&((y=this.map)==null||y.moveLayer((g=this.viewport)==null?void 0:g.particleLayer,this.helper.mapboxCustomer.layers.countryBoundary.id))):((u=(f=this.map)==null?void 0:f.getLayer(this.enc))==null||u.setLayoutProperty("visibility","visible"),(_=(m=this.map)==null?void 0:m.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))==null||_.setLayoutProperty("visibility","none"))},immediate:!0}},methods:{async fetchWeatherLayers(a={tropicals:!1}){var o,s,l,n,c,h,d,p;const e=new Date().valueOf();let t=0,r=0;if(this.map){const g=((o=this.map)==null?void 0:o.getZoom())+1,y=(s=this.map)==null?void 0:s.getBounds(),f=`${y._sw.lng},${y._sw.lat},${y._ne.lng},${y._ne.lat}`;if(this.handleRampColorState(),this.particleFactor){const u=z.LayerHelper.WEATHER_LAYERS.find(m=>{var _;return((_=m.peer)==null?void 0:_.weight)===this.particleFactor.weight});this.particleFactor.particle?this.weatherWeight=this.weatherWeight&u.weight?this.weatherWeight:this.weatherWeight+u.weight:this.weatherWeight=this.weatherWeight&u.weight?this.weatherWeight-u.weight:this.weatherWeight}if(this.weatherWeight>0){let u=this.weatherWeight,m;if(a.tropicals||this.weatherWeight&256&&(m=this.weatherLayers.tropicals,m&&(u-=256,m.version=Math.random()+1)),u>0){const _=await G.get(`${this.gateway}/api/arc/weather/layers/links?l=${u}&v=${this.source}&z=${g}&bbox=${f}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(r=new Date().valueOf()-(e+t),console.log("weather links elapsed: ",r,", total: ",t+=r),((l=_==null?void 0:_.data)==null?void 0:l.code)===0){const b=(n=_==null?void 0:_.data)==null?void 0:n.data,w=[];for(const L in b)L==="ice-edge"&&(b[L]="https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"),L!=="tropicals"&&w.push(G.get(b[L],{headers:{Authorization:this.token||this.defaultMeteoToken,key:L},responseType:/\.(jpg|png)$/.test(b[L])?"blob":"json"}).catch(N=>{console.log(`[${L}] fetch layer error: ${N}`)}));const v=await Promise.all(w);this.weatherLayers={},v.map(L=>{var D,R,B,M;const N=((D=L==null?void 0:L.data)==null?void 0:D.data)||(L==null?void 0:L.data),T=(B=(R=L==null?void 0:L.config)==null?void 0:R.headers)==null?void 0:B.key;T&&N&&(this.weatherLayers[T]={raw:N,type:((M=L==null?void 0:L.config)==null?void 0:M.responseType)==="blob"?"image":"json",etime:this.ts})}),b.tropicals&&G.get(b.tropicals,{headers:{Authorization:this.token||this.defaultMeteoToken,key:"tropicals"}}).then(L=>{var D,R,B;const N=E.TropicalHelper.convert2Geojson(((D=L==null?void 0:L.data)==null?void 0:D.data)||(L==null?void 0:L.data)),T=(B=(R=L==null?void 0:L.config)==null?void 0:R.headers)==null?void 0:B.key;this.weatherLayers[T]={data:N,active:!0,cached:!1,type:"json",etime:this.ts,version:Math.random()+1}})}if(r=new Date().valueOf()-(e+t),console.log("weather layers elapsed: ",r,", total: ",t+=r),this.weatherLayers["swell-direction"]||this.weatherLayers["swell-height"]){const b=(c=this.weatherLayers["swell-direction"])==null?void 0:c.raw,w=(h=this.weatherLayers["swell-height"])==null?void 0:h.raw;delete this.weatherLayers["swell-direction"],delete this.weatherLayers["swell-height"],this.weatherLayers.swell={type:"json",direction:b,height:{raw:w},etime:this.ts}}if(this.weatherLayers["current-direction"]||this.weatherLayers["current-speed"]){const b=(d=this.weatherLayers["current-direction"])==null?void 0:d.raw,w=(p=this.weatherLayers["current-speed"])==null?void 0:p.raw;delete this.weatherLayers["current-direction"],delete this.weatherLayers["current-speed"],this.weatherLayers.current={type:"json",direction:b,speed:{raw:w},etime:this.ts}}}m&&(m.etime=this.ts,m.cached=!0,this.weatherLayers.tropicals=m)}this.handleWeatherLayerToggle(),this.handleDragEndWithZoom4Json()}this.toggleVersion=Math.random()},async fetchOtherLayers(a={all:!1,dayNight:!1,enc:!1}){var e,t,r,o;if(this.map){let s=this.otherWeight;if(s){let l=!1;if(this.otherWeight&2048&&(s=this.otherWeight-2048,l=!0),s){if(a.all){const n=await G.get(`${this.gateway}/api/arc/other/layers/links?l=${s}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((e=n==null?void 0:n.data)==null?void 0:e.code)===0){const c=(t=n==null?void 0:n.data)==null?void 0:t.data,h=[];for(const p in c)h.push(G.get(c[p],{headers:{Authorization:this.token||this.defaultMeteoToken,key:p}}));const d=await Promise.all(h);this.otherLayers={enc:l},d.map(p=>{var f,u,m;const g=((f=p==null?void 0:p.data)==null?void 0:f.data)||(p==null?void 0:p.data),y=(m=(u=p==null?void 0:p.config)==null?void 0:u.headers)==null?void 0:m.key;this.otherLayers[y]=g})}}else if(a.dayNight&&s&1024){const n=await G.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((r=n==null?void 0:n.data)==null?void 0:r.code)===0){const c=(o=n==null?void 0:n.data)==null?void 0:o.data,h=[];for(const p in c)h.push(G.get(c[p],{headers:{Authorization:this.token||this.defaultMeteoToken,key:p}}));(await Promise.all(h)).map(p=>{var f,u,m;const g=((f=p==null?void 0:p.data)==null?void 0:f.data)||(p==null?void 0:p.data),y=(m=(u=p==null?void 0:p.config)==null?void 0:u.headers)==null?void 0:m.key;this.otherLayers[y]=g})}}}else this.otherLayers={enc:l}}else this.otherLayers={};this.handleBeforeLayerToggle()}},handleRampColorState(){var a;if(this.showRampColor=!1,this.showWindParticle=!1,this.showCurrentParticle=!1,(a=this.particleFactor)!=null&&a.particle)this.showRampColor=!0,this.showWindParticle=this.particleFactor.key==="wind",this.showCurrentParticle=this.particleFactor.key==="current",this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json");else for(const e of this.activeWeatherLayers)["png","jpg"].includes(e.type)&&(this.showRampColor=!0);this.activeWindLayer=!!this.activeWeatherLayers.find(e=>e.key==="wind"),this.$refs.layer&&(this.$refs.layer.activeWeatherLayers=this.activeWeatherLayers)},handleRampColorInitial(){var a,e,t,r,o,s,l,n,c,h,d,p;this.viewport.map.getSource((a=this.viewport)==null?void 0:a.rampColorSource)||this.viewport.map.addSource((e=this.viewport)==null?void 0:e.rampColorSource,{type:"canvas",canvas:(t=this.viewport)==null?void 0:t.rampColorCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((r=this.viewport)==null?void 0:r.rampColorLayer)||this.viewport.map.addLayer({type:"raster",id:(o=this.viewport)==null?void 0:o.rampColorLayer,source:(s=this.viewport)==null?void 0:s.rampColorSource,layout:{visibility:"none"}},this.beforeLayer),this.viewport.map.getSource((l=this.viewport)==null?void 0:l.particleSource)||this.viewport.map.addSource((n=this.viewport)==null?void 0:n.particleSource,{type:"canvas",canvas:(c=this.viewport)==null?void 0:c.particleCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((h=this.viewport)==null?void 0:h.particleLayer)||this.viewport.map.addLayer({type:"raster",id:(d=this.viewport)==null?void 0:d.particleLayer,source:(p=this.viewport)==null?void 0:p.particleSource,layout:{visibility:"none"}},this.beforeLayer)},handleDragEndWithZoom4Json(){var h,d,p,g;const a=new Date().valueOf();let e=0,t=0;const r=(h=this.map)==null?void 0:h.getBounds(),o=this.map.getZoom(),s=z.convertToStandardLng(r._sw.lng),l=z.convertToStandardLng(r._ne.lng),n=Math.floor(r._sw.lat),c=Math.ceil(r._ne.lat);for(const y in this.weatherLayers)if(this.weatherLayers[y].active&&this.weatherLayers[y].type==="json"){this.weatherLayers[y].active=!1,this.weatherLayers[y].version=Math.random()+1;let f=[];if(["swell","current"].includes(y)){const u=((d=this.weatherLayers[y])==null?void 0:d.direction)||{};for(const m in u)if(m>n&&m<c&&(!(o<=this.zoom)||m%(o<this.zoom/2?5:3)===0)){const _=u[m].lng;s>l?_.forEach((b,w)=>{var v;if((b>=s&&b<=180||b>=-180&&b<=l)&&(!(o<=this.zoom)||b%(o<this.zoom/2?5:3)===0)){const L=x.point([b,m],{val:u[m].val[w],spd:(v=u[m].spd)==null?void 0:v[w]});f.push(L)}}):_.forEach((b,w)=>{var v;if(b>=s&&b<=l&&(!(o<=this.zoom)||b%(o<this.zoom/2?5:3)===0)){const L=x.point([b,m],{val:u[m].val[w],spd:(v=u[m].spd)==null?void 0:v[w]});f.push(L)}})}if(t=new Date().valueOf()-(a+e),console.log("direction elapsed: ",t,", total: ",e+=t),y==="swell"){const m=this.weatherLayers[y].height;if(m){if(!m.data){const _=[];for(const b in(p=m.raw)==null?void 0:p.LineString){const w=m.raw.LineString[b];for(const v of w)_.push(x.lineString(v,{val:Number(b)}));m.data=x.featureCollection(_)}}if(m.data){const _=this.handleBboxClip(m.data,r);f=f.concat(_)}t=new Date().valueOf()-(a+e),console.log("height elapsed: ",t,", total: ",e+=t)}}if(y==="current"){const m=this.weatherLayers[y].speed;if(m){if(!m.data){const b=[];for(const w in(g=m.raw)==null?void 0:g.Polygon){const v=m.raw.Polygon[w];for(const L of v)b.push(x.polygon(L,{val:Number(w)}))}m.data=x.featureCollection(b)}const _=o<this.zoom?m.data.features.filter(b=>b.properties.val>.5):m.data.features;f=f.concat(_),t=new Date().valueOf()-(a+e),console.log("speed elapsed: ",t,", total: ",e+=t)}}}else if(y==="wind"){const u=this.weatherLayers.wind.raw;for(const m in u)if(m>n&&m<c&&(!(o<=this.zoom)||m%(o<this.zoom/2?5:3)===0)){const _=u[m].lng;s>l?_.forEach((b,w)=>{if((b>=s&&b<=180||b>=-180&&b<=l)&&(!(o<=this.zoom)||b%(o<this.zoom/2?5:3)===0)){const v=x.point([b,m],{val:u[m].val[w],spd:u[m].spd[w]});f.push(v)}}):_.forEach((b,w)=>{if(b>=s&&b<=l&&(!(o<=this.zoom)||b%(o<this.zoom/2?5:3)===0)){const v=x.point([b,m],{val:u[m].val[w],spd:u[m].spd[w]});f.push(v)}})}t=new Date().valueOf()-(a+e),console.log("wind barb elapsed: ",t,", total: ",e+=t)}else if(y==="sig-wave-height"){if(this.weatherLayers[y].data)f=this.weatherLayers[y].data;else{const u=this.weatherLayers[y].raw;if(u){const m=[];for(const _ in u.Polygon){const b=u.Polygon[_];for(const w of b)m.push(x.polygon(w,{val:Number(_)}))}for(const _ in u.Point){const b=u.Point[_];for(const w of b)m.push(...x.points(w,{val:Number(_)}).features)}f=f.concat(m)}}t=new Date().valueOf()-(a+e),console.log("sigWave elapsed: ",t,", total: ",e+=t)}else if(y==="prmsl"){if(this.weatherLayers[y].data)f=this.weatherLayers[y].data;else{const u=this.weatherLayers[y].raw;if(u){const m=[];for(const _ in u.LineString){const b=u.LineString[_];for(const w of b)m.push(x.lineString(w,{val:Number(_)}))}for(const _ in u.Point)u.Point[_].lng.forEach((b,w)=>{b=z.convertToStandardLng(b),m.push(x.point([b,_],{val:u.Point[_].val[w],type:u.Point[_].type[w]}))});f=f.concat(m)}}t=new Date().valueOf()-(a+e),console.log("prmsl elapsed: ",t,", total: ",e+=t)}else if(y==="arctic"||y==="iceberg"){if(this.weatherLayers[y].data)f=this.weatherLayers[y].data;else{const u=this.weatherLayers[y].raw;if(u){const m=[];for(const _ in u.LineString){const b=u.LineString[_];for(const w of b)m.push(x.lineString(w,{val:Number(_)}))}f=f.concat(m)}}t=new Date().valueOf()-(a+e)}console.log(y," elapsed: ",t,", total: ",e+=t),f.length&&(this.weatherLayers[y].data=x.featureCollection(f)),this.weatherLayers[y].active=!0,this.weatherLayers[y].version=Math.random()+1}},handleDragEndWithZoom4Image(){for(const a in this.weatherLayers)this.weatherLayers[a].active&&this.weatherLayers[a].type==="image"&&(this.weatherLayers[a].active=!0,this.weatherLayers[a].version=Math.random()+1)},handleBboxClip(a,e){const t=[],r=z.convertToStandardLng(e._sw.lng),o=z.convertToStandardLng(e._ne.lng);return a.features.forEach(s=>{if(s.geometry.type!=="Point")if(r>o){let l=[r,e._sw.lat,180,e._ne.lat],n=x.bboxClip(s,l);n.geometry.coordinates.length&&t.push(n),l=[-180,e._sw.lat,o,e._ne.lat],n=x.bboxClip(s,l),n.geometry.coordinates.length&&t.push(n)}else{const l=[r,e._sw.lat,o,e._ne.lat],n=x.bboxClip(s,l);n.geometry.coordinates.length&&t.push(n)}else t.push(s)}),t},handleWeatherLayerToggle(){var a;for(const e in this.weatherLayers)this.weatherLayers[e].active=!1,this.weatherLayers[e].version=Math.random()+1;for(const e of this.activeWeatherLayers){let t=e.key;t.indexOf("swell")>-1?t="swell":t.indexOf("current")>-1&&(t="current"),this.weatherLayers[t]&&(this.weatherLayers[t].active=!0,this.weatherLayers[t].version=Math.random()+1,((a=this.particleFactor)==null?void 0:a.key)===t&&this.weatherLayers[`${t}-particle`]&&(this.weatherLayers[`${t}-particle`].active=this.particleFactor.particle))}this.handleBeforeLayerToggle()},handleBeforeLayerToggle(){var a,e,t,r,o,s,l,n,c,h,d,p,g;(a=this.map)!=null&&a.getLayer(this.beforeLayer)&&((e=this.activeWeatherLayers)!=null&&e.length||(t=this.otherLayers)!=null&&t["war-zones"]||(r=this.otherLayers)!=null&&r["gmdss-areas"]||(o=this.otherLayers)!=null&&o["load-lines"]||(s=this.otherLayers)!=null&&s["high-risk-area"]||(l=this.otherLayers)!=null&&l["time-zones"]||(n=this.otherLayers)!=null&&n.pirates||(c=this.otherLayers)!=null&&c.ports||(h=this.otherLayers)!=null&&h.enc||(d=this.otherLayers)!=null&&d["voluntary-reporting-area"]||(p=this.otherLayers)!=null&&p["eca-zones"]||(g=this.otherLayers)!=null&&g["special-area"])&&this.map.setLayoutProperty(this.beforeLayer,"visibility","visible")},handleDateChange(a={tropicals:!1}){this.fetchWeatherLayers(a),this.fetchOtherLayers({dayNight:!0})},handleWeatherLayerChange(a,e,t){if(!this.map)setTimeout(()=>{this.handleWeatherLayerChange(a,e,t)},500);else{this.activeWeatherLayers=e;const r=this.activeWeatherLayers.some(l=>["wind","current"].includes(l.key)),o=this.activeWeatherLayers.some(l=>["png","jpg"].includes(l.type));r&&!o?(this.particleFactor=this.activeWeatherLayers.find(l=>["wind","current"].includes(l.key)),this.particleFactor.particle=!0):o&&this.particleFactor&&(this.particleFactor.particle=!1);const s=e==null?void 0:e.reduce((l,n)=>l+(l&(n==null?void 0:n.weight)?0:n==null?void 0:n.weight),0);this.weatherWeight!==s||this.source!==t?(this.source=t,this.weatherWeight=s,this.fetchWeatherLayers({tropicals:!1})):this.handleWeatherLayerToggle()}},handleOtherLayerChange(a){if(!this.map)setTimeout(()=>{this.handleOtherLayerChange(a)},500);else{const e=a==null?void 0:a.reduce((t,r)=>t+(r==null?void 0:r.weight),0);a.find(t=>t.key==="enc")?this.enc="i4":this.enc="",this.otherWeight!=e&&(this.otherWeight=e,this.fetchOtherLayers({all:!0}))}},async handlePointChange(a){const e=this.ts?A(this.ts):A(),t={lat:a.lat,lng:a.lng,ts:e.utc().format(),wt:!0,src:this.source},r=await G.get(`${this.gateway}/api/arc/meteo/query`,{params:t,headers:{Authorization:this.token||this.defaultMeteoToken}});(r==null?void 0:r.status)===200&&(this.meteo={...r==null?void 0:r.data,...a})},handle3dToggle(a){var e,t,r,o,s,l,n,c,h,d,p,g,y,f,u,m,_,b,w,v;a?(this.map.setProjection("globe"),this.mapProjection="globe",(t=this.map)!=null&&t.getLayer((e=this.viewport)==null?void 0:e.rampColorLayer)&&((r=this.map)!=null&&r.getLayer(this.helper.mapboxCustomer.layers.water.id))&&((s=this.map)==null||s.moveLayer((o=this.viewport)==null?void 0:o.rampColorLayer,this.helper.mapboxCustomer.layers.water.id)),(n=this.map)!=null&&n.getLayer((l=this.viewport)==null?void 0:l.particleLayer)&&((c=this.map)!=null&&c.getLayer(this.helper.mapboxCustomer.layers.water.id))&&((d=this.map)==null||d.moveLayer((h=this.viewport)==null?void 0:h.particleLayer,this.helper.mapboxCustomer.layers.water.id)),this.map.off("zoomend",this.handleDragEndWithZoom4Json),this.map.off("dragend",this.handleDragEndWithZoom4Json),this.map.off("move",this.handleDragEndWithZoom4Image)):(this.map.setProjection("mercator"),this.mapProjection="mercator",this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.handleDragEndWithZoom4Image(),this.handleDragEndWithZoom4Json(),(g=this.map)!=null&&g.getLayer((p=this.viewport)==null?void 0:p.rampColorLayer)&&((y=this.map)!=null&&y.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&((u=this.map)==null||u.moveLayer((f=this.viewport)==null?void 0:f.rampColorLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)),(_=this.map)!=null&&_.getLayer((m=this.viewport)==null?void 0:m.particleLayer)&&((b=this.map)!=null&&b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&((v=this.map)==null||v.moveLayer((w=this.viewport)==null?void 0:w.particleLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)))},handleParticle(a){this.particleFactor=a,this.fetchWeatherLayers({tropicals:!1})}}},xo={key:0,className:"map-gl-home"};function vo(a,e,t,r,o,s){var Q,W,j,he,F,S,$,de,H,pe,K,ee,te,ue,ge,be,_e,Le,ke,Ne,Te,Ie,De,Ve,Re,Be;const l=i.resolveComponent("IdmGlLayer"),n=i.resolveComponent("IdmENC"),c=i.resolveComponent("IdmSigWave"),h=i.resolveComponent("IdmSwell"),d=i.resolveComponent("IdmPrmsl"),p=i.resolveComponent("IdmIceberg"),g=i.resolveComponent("IdmTropicals"),y=i.resolveComponent("IdmCurrents"),f=i.resolveComponent("IdmCurrentParticle"),u=i.resolveComponent("IdmWindBarb"),m=i.resolveComponent("IdmWindParticle"),_=i.resolveComponent("IdmPrecip3h"),b=i.resolveComponent("IdmVisibility"),w=i.resolveComponent("IdmWaterTemp"),v=i.resolveComponent("IdmTemp"),L=i.resolveComponent("IdmArctic"),N=i.resolveComponent("IdmWarZone"),T=i.resolveComponent("IdmGmdssArea"),D=i.resolveComponent("IdmEcaZone"),R=i.resolveComponent("IdmAlertZone"),B=i.resolveComponent("IdmPort"),M=i.resolveComponent("IdmLoadLine"),ie=i.resolveComponent("IdmTimezone"),oe=i.resolveComponent("IdmVRA"),re=i.resolveComponent("IdmSpecialArea"),se=i.resolveComponent("IdmTerminator"),ne=i.resolveComponent("IdmLatLng"),le=i.resolveComponent("IdmMeasure"),ce=i.resolveComponent("IdmPoint");return t.map?(i.openBlock(),i.createElementBlock("div",xo,[i.createVNode(l,i.mergeProps({ref:"layer",map:t.map,"toggle-version":o.toggleVersion,"map-projection":o.mapProjection},a.$attrs,{onWeather:s.handleWeatherLayerChange,onOther:s.handleOtherLayerChange,onCoordinate:e[0]||(e[0]=U=>o.showCoord=U),onMeasure:e[1]||(e[1]=U=>o.showMeasure=U),onPoint:e[2]||(e[2]=U=>o.showPoint=U),on3d:s.handle3dToggle,onToggleVersion:e[3]||(e[3]=U=>o.toggleVersion=U)}),null,16,["map","toggle-version","map-projection","onWeather","onOther","on3d"]),i.createVNode(n,i.mergeProps({map:t.map,token:t.token,enabled:(Q=o.otherLayers)==null?void 0:Q.enc,"toggle-version":o.toggleVersion},a.$attrs,{onEnc:e[4]||(e[4]=U=>o.enc=U)}),null,16,["map","token","enabled","toggle-version"]),i.createVNode(c,i.mergeProps({map:t.map,"sig-wave":(W=o.weatherLayers)==null?void 0:W["sig-wave-height"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","sig-wave","before-layer"]),i.createVNode(h,i.mergeProps({map:t.map,swell:(j=o.weatherLayers)==null?void 0:j.swell,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","swell","before-layer"]),i.createVNode(d,i.mergeProps({map:t.map,prmsl:(he=o.weatherLayers)==null?void 0:he.prmsl,"before-layer":t.beforeLayer,"active-weather-layers":o.activeWeatherLayers},a.$attrs),null,16,["map","prmsl","before-layer","active-weather-layers"]),i.createVNode(p,i.mergeProps({map:t.map,iceberg:(F=o.weatherLayers)==null?void 0:F.iceberg,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","iceberg","before-layer"]),i.createVNode(g,i.mergeProps({map:t.map,date:t.ts,tropicals:(S=o.weatherLayers)==null?void 0:S.tropicals,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","date","tropicals","before-layer"]),i.createVNode(y,i.mergeProps({map:t.map,"map-projection":o.mapProjection,current:($=o.weatherLayers)==null?void 0:$.current,"before-layer":t.beforeLayer,"show-particle":o.showCurrentParticle,"margin-bottom":o.activeWindLayer?o.showRampColor?"84px":"56px":o.showRampColor?"56px":"30px","toggle-version":o.toggleVersion,"weather-layers":o.weatherLayers},a.$attrs,{onParticle:s.handleParticle}),null,16,["map","map-projection","current","before-layer","show-particle","margin-bottom","toggle-version","weather-layers","onParticle"]),i.createVNode(f,i.mergeProps({viewport:o.viewport,factor:(de=o.weatherLayers)==null?void 0:de["current-particle"],"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(u,i.mergeProps({ref:"windBarb",map:t.map,"map-projection":o.mapProjection,wind:(H=o.weatherLayers)==null?void 0:H.wind,current:(pe=o.weatherLayers)==null?void 0:pe.current,"before-layer":t.beforeLayer,"margin-bottom":o.showRampColor?"56px":"30px","show-particle":o.showWindParticle},a.$attrs,{"toggle-version":o.toggleVersion,"weather-layers":o.weatherLayers,onParticle:s.handleParticle}),null,16,["map","map-projection","wind","current","before-layer","margin-bottom","show-particle","toggle-version","weather-layers","onParticle"]),i.createVNode(m,i.mergeProps({viewport:o.viewport,factor:(K=o.weatherLayers)==null?void 0:K["wind-particle"],"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(_,i.mergeProps({viewport:o.viewport,factor:(ee=o.weatherLayers)==null?void 0:ee.precip3h,"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(b,i.mergeProps({viewport:o.viewport,factor:(te=o.weatherLayers)==null?void 0:te.visibility,"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(w,i.mergeProps({viewport:o.viewport,factor:(ue=o.weatherLayers)==null?void 0:ue["water-temp"],"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(v,i.mergeProps({viewport:o.viewport,factor:(ge=o.weatherLayers)==null?void 0:ge.temp,"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(L,i.mergeProps({viewport:o.viewport,factor:(be=o.weatherLayers)==null?void 0:be.arctic,"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(N,i.mergeProps({map:t.map,zone:(_e=o.otherLayers)==null?void 0:_e["war-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(T,i.mergeProps({map:t.map,area:(Le=o.otherLayers)==null?void 0:Le["gmdss-areas"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(D,i.mergeProps({map:t.map,zone:(ke=o.otherLayers)==null?void 0:ke["eca-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(R,i.mergeProps({map:t.map,zone:(Ne=o.otherLayers)==null?void 0:Ne["alert-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(B,i.mergeProps({map:t.map,port:(Te=o.otherLayers)==null?void 0:Te.ports,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","port","before-layer"]),i.createVNode(M,i.mergeProps({map:t.map,line:(Ie=o.otherLayers)==null?void 0:Ie["load-lines"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","line","before-layer"]),i.createVNode(ie,i.mergeProps({map:t.map,zone:(De=o.otherLayers)==null?void 0:De["time-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(oe,i.mergeProps({map:t.map,area:(Ve=o.otherLayers)==null?void 0:Ve["voluntary-reporting-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(re,i.mergeProps({map:t.map,area:(Re=o.otherLayers)==null?void 0:Re["special-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(se,i.mergeProps({map:t.map,area:(Be=o.otherLayers)==null?void 0:Be["day-night"]},a.$attrs),null,16,["map","area"]),i.createVNode(ne,i.mergeProps({map:t.map,show:o.showCoord,"toggle-version":o.toggleVersion},a.$attrs),null,16,["map","show","toggle-version"]),i.createVNode(le,i.mergeProps({map:t.map,show:o.showMeasure},a.$attrs),null,16,["map","show"]),i.createVNode(ce,i.mergeProps({map:t.map,show:o.showPoint,meteo:o.meteo},a.$attrs,{onPoint:s.handlePointChange}),null,16,["map","show","meteo","onPoint"])])):i.createCommentVNode("",!0)}const Pe=C(wo,[["render",vo]]),Co={install(a){a.component("MapboxGL",Pe),a.component("TropicalGL",Ce),a.component("LatLngGL",Se)}};k.LatLngGL=Se,k.MapboxGL=Pe,k.MapboxGLPlugin=Co,k.MapboxHelper=Ee,k.ParticleSchema=V,k.TropicalGL=Ce,k.Viewport=we,k.WebGL=J,k.WebGLSchema=I,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
204
+ </svg>`,H=document.createElement("div");H.className="hurricane-hourly-marker",H.innerHTML=`<div class="${S.geometry.coordinates[1]>=0?"center north":"center south"}">${de}</div>`;const pe=new Z.Marker(H).setLngLat(S.geometry.coordinates).addTo(this.map);if(this.interpolateMarkers.push(pe),(ie=S.properties)!=null&&ie.showCircle){const K={radius:100,coordinates:S.geometry.coordinates},ee={radius:200,coordinates:S.geometry.coordinates},te={radius:500,coordinates:S.geometry.coordinates};(oe=this.circleSourceData)==null||oe.features.push(x.circle(K.coordinates,K.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}})),(re=this.circleSourceData)==null||re.features.push(x.circle(ee.coordinates,ee.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}})),(se=this.circleSourceData)==null||se.features.push(x.circle(te.coordinates,te.radius,{steps:100,units:"kilometers",properties:{type:"tropicalCircle"}}))}(le=(ne=this.map)==null?void 0:ne.getSource(this.circleSource))==null||le.setData(this.circleSourceData)}}else(ce=this.map)!=null&&ce.getSource(this.interpolateSource)&&((Q=this.map)==null||Q.getSource(this.interpolateSource).setData(this.empty))},handleClick(a){var s,l,n,c,h,d,p,g;const e=a.features[0],t=(l=(s=this.tropicals)==null?void 0:s.data)==null?void 0:l.features.filter(y=>{var f;return y.geometry.type==="LineString"&&y.properties.type==="forecast"&&y.properties.name===((f=e==null?void 0:e.properties)==null?void 0:f.name)});t.sort((y,f)=>{var u,m,_,b;return((u=y.properties)==null?void 0:u.model)==="cma"?-1:((m=y.properties)==null?void 0:m.model)==="jma"?((_=f.properties)==null?void 0:_.model)==="cma"?1:-1:y.properties.model==="ecmwf"?["jma","cma"].includes((b=f.properties)==null?void 0:b.model)?1:-1:0});const r=(c=(n=this.tropicals)==null?void 0:n.data)==null?void 0:c.features.filter(y=>{var f;return y.geometry.type==="LineString"&&y.properties.type==="history"&&y.properties.name===((f=e==null?void 0:e.properties)==null?void 0:f.name)});this.activeTropicals={name:(h=e==null?void 0:e.properties)==null?void 0:h.name,forecasts:t.map(y=>y.properties),history:(d=r[0])==null?void 0:d.properties,showCircle:(g=(p=t[0])==null?void 0:p.properties)==null?void 0:g.showCircle},this.showTropicals=!0;const o=document.getElementById("active-tropical");this.activeTropicalsMarker?this.activeTropicalsMarker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.activeTropicalsMarker=new Z.Marker(o).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([220,0]).addTo(this.map)},handleForecastToggle(a){var r,o,s,l,n,c;a.disabled=!a.disabled;const e=`${a.name}-${a.model}`,t=(o=(r=this.map)==null?void 0:r.getSource(this.source)._data)==null?void 0:o.features;t.forEach(h=>{h.properties.category===e&&(h.properties.disabled=a.disabled)}),this.interpolateData.forEach(h=>{h.properties.category===e&&(h.properties.disabled=a.disabled)}),(l=(s=this.map)==null?void 0:s.getSource(this.source))==null||l.setData(x.featureCollection(t)),(c=(n=this.map)==null?void 0:n.getSource(this.clusterSource))==null||c.setData(x.featureCollection(t)),this.handleDateChange()},handleStrikeProbability(a){this.$emit("tropicalProbability",a)},handleToggleCircles(a){var e,t;a.showCircle=!a.showCircle,(t=(e=this.tropicals.data)==null?void 0:e.features)==null||t.forEach(r=>{r.properties.name===a.name&&(r.properties.showCircle=a.showCircle)}),this.handleRender()},handleDrawCircle(){var a,e;(a=this.map)!=null&&a.getSource(this.circleSource)?(e=this.map)==null||e.getSource(this.circleSource).setData(this.circleSourceData):(this.map.addSource(this.circleSource,{type:"geojson",data:this.circleSourceData}),this.map.addLayer({id:this.circleLayer,type:"line",source:this.circleSource,filter:["all",["==","$type","Polygon"],["==","type","tropicalCircle"]],paint:{"line-color":"#fff","line-width":2,"line-opacity":1,"line-dasharray":[1,1]}}))},handleComputePolygons(a){const e=[];for(const t of a){const r=t.properties.wind,o={ne:r.r7ne>=0?r.r7ne:void 0,se:r.r7se>=0?r.r7se:void 0,sw:r.r7sw>=0?r.r7sw:void 0,nw:r.r7nw>=0?r.r7nw:void 0},s=this.handleComputeArc(t.geometry.coordinates,o,{...t.properties,level:7});e.push(s);const l={ne:r.r10ne>=0?r.r10ne:void 0,se:r.r10se>=0?r.r10se:void 0,sw:r.r10sw>=0?r.r10sw:void 0,nw:r.r10nw>=0?r.r10nw:void 0},n=this.handleComputeArc(t.geometry.coordinates,l,{...t.properties,level:10});e.push(n)}return e},handleComputeArc(a,e,t){var s;const r=[];for(const l in e){const n=e[l]??0;let c;switch(l){case"ne":c=x.lineArc(a,n*1.852,0,90,{steps:n>0?64:1});break;case"se":c=x.lineArc(a,n*1.852,90,180,{steps:n>0?64:1});break;case"sw":c=x.lineArc(a,n*1.852,180,270,{steps:n>0?64:1});break;case"nw":c=x.lineArc(a,n*1.852,270,360,{steps:n>0?64:1});break}r.push(...(s=c==null?void 0:c.geometry)==null?void 0:s.coordinates)}const o=x.lineString(r);return x.lineToPolygon(o,{properties:t})}}},ve=a=>(i.pushScopeId("data-v-b521de47"),a=a(),i.popScopeId(),a),Kt={id:"active-tropical",class:"active-tropical"},ea={class:"header-box"},ta={class:"main"},aa={key:0},ia={class:"sub"},oa={id:"meteoBox",class:"main-box"},ra={class:"content"},sa={class:"row"},na={class:"col col-left",style:{"justify-content":"flex-start"}},la=ve(()=>i.createElementVNode("label",null,"Wind speed : ",-1)),ca={class:"col col-right",style:{"justify-content":"flex-start"}},ha=ve(()=>i.createElementVNode("label",null,"Pressure : ",-1)),da={class:"row"},pa={class:"col col-24",style:{"justify-content":"flex-start"}},ma=ve(()=>i.createElementVNode("label",{style:{width:"max-content"}},"Forecast Models : ",-1)),ya={class:"forecast-models"},fa=["onClick"],ua=i.createStaticVNode('<div class="row" style="padding:0;height:1px;margin:10px 0;background:var(--idm-black-1);" data-v-b521de47></div><div class="row" style="padding:2px 10px;" data-v-b521de47><div class="legend" data-v-b521de47><div class="icon td" data-v-b521de47></div><div class="label" data-v-b521de47>TD</div></div><div class="legend" data-v-b521de47><div class="icon ts" data-v-b521de47></div><div class="label" data-v-b521de47>TS</div></div><div class="legend" data-v-b521de47><div class="icon sts" data-v-b521de47></div><div class="label" data-v-b521de47>STS</div></div><div class="legend" data-v-b521de47><div class="icon ty" data-v-b521de47></div><div class="label" data-v-b521de47>TY</div></div><div class="legend" data-v-b521de47><div class="icon sty" data-v-b521de47></div><div class="label" data-v-b521de47>STY</div></div><div class="legend" data-v-b521de47><div class="icon supper-ty" data-v-b521de47></div><div class="label" data-v-b521de47>Super TY</div></div></div><div class="row" style="padding:2px 10px;" data-v-b521de47><div class="legend" data-v-b521de47><div class="icon history" data-v-b521de47></div><div class="label" data-v-b521de47>History</div></div><div class="legend" data-v-b521de47><div class="icon r7" data-v-b521de47></div><div class="label" data-v-b521de47>35kts Radii</div></div><div class="legend" data-v-b521de47><div class="icon r10" data-v-b521de47></div><div class="label" data-v-b521de47>50kts Radii</div></div></div>',3),ga={class:"more"};function ba(a,e,t,r,o,s){var l,n,c,h,d,p,g,y,f,u,m,_,b,w,v;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Kt,[i.createElementVNode("div",ea,[i.createElementVNode("div",{class:"iconfont close-btn",onClick:e[0]||(e[0]=L=>o.showTropicals=!1)},""),i.createElementVNode("div",ta,[(n=(l=o.activeTropicals)==null?void 0:l.history)!=null&&n.level?(i.openBlock(),i.createElementBlock("span",aa,i.toDisplayString((h=(c=o.activeTropicals)==null?void 0:c.history)==null?void 0:h.level)+" , ",1)):i.createCommentVNode("",!0),i.createTextVNode(i.toDisplayString((d=o.activeTropicals)==null?void 0:d.name),1)]),i.createElementVNode("div",ia," Last update: "+i.toDisplayString(s.computeTime(((g=(p=o.activeTropicals)==null?void 0:p.history)==null?void 0:g.updated)||((u=(f=(y=o.activeTropicals)==null?void 0:y.forecasts)==null?void 0:f.filter(L=>!L.disabled)[0])==null?void 0:u.date))),1)]),i.createElementVNode("div",oa,[i.createElementVNode("div",ra,[i.createElementVNode("div",sa,[i.createElementVNode("div",na,[la,i.createElementVNode("span",null,i.toDisplayString(((_=(m=o.activeTropicals)==null?void 0:m.history)==null?void 0:_.kts)||"-")+"[kts]",1)]),i.createElementVNode("div",ca,[ha,i.createElementVNode("span",null,i.toDisplayString(((w=(b=o.activeTropicals)==null?void 0:b.history)==null?void 0:w.pressure)||"-")+"[hPa]",1)])]),i.createElementVNode("div",da,[i.createElementVNode("div",pa,[ma,i.createElementVNode("div",ya,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((v=o.activeTropicals)==null?void 0:v.forecasts,(L,N)=>{var T,D,R,B;return i.openBlock(),i.createElementBlock("div",{key:N,class:i.normalizeClass(["model",L.disabled?"":"active",N>0&&N<((D=(T=o.activeTropicals)==null?void 0:T.forecasts)==null?void 0:D.length)-1&&((B=(R=o.activeTropicals)==null?void 0:R.forecasts)==null?void 0:B.length)>2?"center-child":""]),onClick:M=>s.handleForecastToggle(L)},[i.createElementVNode("span",{class:i.normalizeClass(L.model)},i.toDisplayString(L.model),3)],10,fa)}),128))])])]),ua]),i.createElementVNode("div",ga,[i.createElementVNode("div",{class:"button",onClick:e[1]||(e[1]=L=>s.handleStrikeProbability(o.activeTropicals))},"Strike Probability >>")])])],512)),[[i.vShow,o.showTropicals&&!a.$attrs.hideTropicalsLegend]])}const Ce=C(Qt,[["render",ba],["__scopeId","data-v-b521de47"]]),tr="",_a={name:"IdmPrecip3h",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 J,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[precip3h] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgba(59, 126, 162, 0)"],[14/255,"rgba(84,170,230, 0)"],[15/255,"rgba(172, 210, 255, 0.8)"],[20/255,"rgba(51,202,248,0.8)"],[30/255,"rgba(3,248,103,0.8)"],[49/255,"rgba(14,201,3,0.8)"],[57/255,"rgba(190,226,2,0.8)"],[73/255,"rgba(248,1,1,0.8)"],[82/255,"rgba(197,5,58,0.8)"],[1,"rgba(197,5,58,0.8)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},q=a=>(i.pushScopeId("data-v-dec867b8"),a=a(),i.popScopeId(),a),La={key:0},wa=[q(()=>i.createElementVNode("span",null,"mm",-1)),q(()=>i.createElementVNode("span",null,"1.5",-1)),q(()=>i.createElementVNode("span",null,"2",-1)),q(()=>i.createElementVNode("span",null,"3",-1)),q(()=>i.createElementVNode("span",null,"7",-1)),q(()=>i.createElementVNode("span",null,"10",-1)),q(()=>i.createElementVNode("span",null,"20",-1)),q(()=>i.createElementVNode("span",null,"30",-1))];function xa(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",La,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:o.right+"px",bottom:t.bottom}])},wa,4)])):i.createCommentVNode("",!0)}const va=C(_a,[["render",xa],["__scopeId","data-v-dec867b8"]]),hr="",Ca={name:"IdmVisibility",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 J,etime:void 0}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[visibility] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgba(189,50,160,0.8)"],[8/255,"rgba(208,56,56,0.8)"],[27/255,"rgba(190,226,2,0.8)"],[60/255,"rgba(3,236,118,0.8)"],[160/255,"rgba(172, 210,255,0.8)"],[161/255,"rgba(172, 210,255,0)"],[1,"rgba(144,144,144,0)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},me=a=>(i.pushScopeId("data-v-952dee5c"),a=a(),i.popScopeId(),a),Sa={key:0},ka=[me(()=>i.createElementVNode("span",null,"nm",-1)),me(()=>i.createElementVNode("span",null,"0",-1)),me(()=>i.createElementVNode("span",null,"0.5",-1)),me(()=>i.createElementVNode("span",null,"1.5",-1)),me(()=>i.createElementVNode("span",null,"3",-1)),me(()=>i.createElementVNode("span",null,"9",-1))];function Ea(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Sa,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:a.right+"px",bottom:t.bottom}])},ka,4)])):i.createCommentVNode("",!0)}const za=C(Ca,[["render",Ea],["__scopeId","data-v-952dee5c"]]),gr="",Pa={name:"IdmWaterTemp",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 J,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgba(95, 143, 197)"],[46/255,"rgba(95, 143, 197)"],[69/255,"rgb(80, 140, 62)"],[92/255,"rgb(121, 146, 28)"],[115/255,"rgb(171, 161, 14)"],[138/255,"rgb(223, 177, 69)"],[161/255,"rgb(243, 150, 6)"],[184/255,"rgb(236, 95, 21)"],[207/255,"rgb(190, 65, 18)"],[230/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},ye=a=>(i.pushScopeId("data-v-67e5094b"),a=a(),i.popScopeId(),a),Na={key:0},Ta=[ye(()=>i.createElementVNode("span",null,"°C",-1)),ye(()=>i.createElementVNode("span",null,"0",-1)),ye(()=>i.createElementVNode("span",null,"10",-1)),ye(()=>i.createElementVNode("span",null,"20",-1)),ye(()=>i.createElementVNode("span",null,"30",-1)),ye(()=>i.createElementVNode("span",null,"40",-1))];function Ia(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Na,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:o.right+"px",bottom:t.bottom}])},Ta,4)])):i.createCommentVNode("",!0)}const Da=C(Pa,[["render",Ia],["__scopeId","data-v-67e5094b"]]),Cr="",Va={name:"IdmTemp",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 J,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgb(149, 137, 211)"],[100/255,"rgb(149, 137, 211)"],[110/255,"rgb(150, 209, 216)"],[120/255,"rgb(129, 204, 197)"],[130/255,"rgb(103, 180, 186)"],[140/255,"rgb(95, 143, 197)"],[150/255,"rgb(80, 140, 62)"],[160/255,"rgb(121, 146, 28)"],[170/255,"rgb(171, 161, 14)"],[180/255,"rgb(223, 177, 6)"],[190/255,"rgb(243, 150, 6)"],[200/255,"rgb(236, 95, 21)"],[210/255,"rgb(190, 65, 18)"],[220/255,"rgb(138, 43, 10)"],[1,"rgb(138, 43, 10)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},Y=a=>(i.pushScopeId("data-v-389ea886"),a=a(),i.popScopeId(),a),Ra={key:0},Ba=[Y(()=>i.createElementVNode("span",null,"°C",-1)),Y(()=>i.createElementVNode("span",null,"-20",-1)),Y(()=>i.createElementVNode("span",null,"-10",-1)),Y(()=>i.createElementVNode("span",null,"0",-1)),Y(()=>i.createElementVNode("span",null,"10",-1)),Y(()=>i.createElementVNode("span",null,"20",-1)),Y(()=>i.createElementVNode("span",null,"30",-1)),Y(()=>i.createElementVNode("span",null,"40",-1))];function $a(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Ra,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:o.right+"px",bottom:t.bottom}])},Ba,4)])):i.createCommentVNode("",!0)}const Aa=C(Va,[["render",$a],["__scopeId","data-v-389ea886"]]),Dr="",Ma={name:"IdmArctic",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 J,etime:void 0,right:10}},watch:{"factor.version":{handler(){var a;(a=this.factor)!=null&&a.active?this.handleRender():this.handleClear()},deep:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{handleRender(){if(!this.viewport)setTimeout(()=>{this.handleRender()},500);else if(this.factor){const a=new Date().valueOf();let e=0,t=0;this.handleDraw(),t=new Date().valueOf()-(a+e),console.log("[water-temp] add elapsed: ",t,", total: ",e+=t)}},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 a=[[0,"rgba(76, 165, 228, 0)"],[50/255,"rgba(76, 165, 228, 0)"],[51/255,"rgb(76, 165, 228)"],[102/255,"rgb(129, 204, 197)"],[153/255,"rgb(150, 209, 216)"],[204/255,"rgb(180, 209, 216)"],[1,"rgb(180, 209, 216)"]];this.rampColor=this.webgl.setup(this.context,a);const{program:e,aPositionBuffer:t}=this.webgl.bind(this.context,I.vertexSchema,I.fragmentSchema);this.program=e,this.aPositionBuffer=t}},async handleDraw(){if(this.handleSetup(),this.etime!==this.factor.etime){this.etime=this.factor.etime;const a=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,a)}this.webgl.draw(this.viewport,this.context,this.program,this.texture,this.rampColor.texture,this.aPositionBuffer),this.viewport.toggle(!0)}}},fe=a=>(i.pushScopeId("data-v-db805141"),a=a(),i.popScopeId(),a),Wa={key:0},Oa=[fe(()=>i.createElementVNode("span",null,"m",-1)),fe(()=>i.createElementVNode("span",null,"0",-1)),fe(()=>i.createElementVNode("span",null,"0.5",-1)),fe(()=>i.createElementVNode("span",null,"1",-1)),fe(()=>i.createElementVNode("span",null,"1.5",-1)),fe(()=>i.createElementVNode("span",null,"2",-1))];function ja(a,e,t,r,o,s){var l;return(l=t.factor)!=null&&l.active?(i.openBlock(),i.createElementBlock("div",Wa,[i.createElementVNode("div",{class:"legend-bars flex-center",style:i.normalizeStyle([{position:"absolute"},{right:o.right+"px",bottom:t.bottom}])},Oa,4)])):i.createCommentVNode("",!0)}const Fa=C(Ma,[["render",ja],["__scopeId","data-v-db805141"]]),Wr="",Ha={name:"IdmPoint",emits:["point","more"],props:{map:{type:Object},show:{type:Boolean},timeZone:{type:Number,default:0},meteo:{type:Object}},data(){return{showMeteo:!1,meteoMarker:void 0,helper:z.CompanyHelper}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.show&&this.handleBind()}},meteo:{handler(){this.meteo?(this.showMeteo=!0,this.handleRender()):this.showMeteo=!1}}},computed:{computeTime(){return function(a){if(a){const e=A(a).utc().utcOffset(this.timeZone),t=this.timeZone<0?this.timeZone:"+"+this.timeZone;return`${e.format("MMM-DD,HHmm")} ( UTC ${t} )`}return"-"}},computeLat(){return function(a,e=4){return E.LngLatHelper.lat2pretty(a,e).pretty}},computeLng(){return function(a,e=4){return E.LngLatHelper.lng2pretty(a,e).pretty}},roundPrecision(){return function(a,e=4){return isNaN(a)?"-":E.LngLatHelper.roundPrecision(a,e)}}},methods:{handleBind(){var a,e;this.show?(a=this.map)==null||a.on("click",this.handleClick):((e=this.map)==null||e.off("click",this.handleClick),this.showMeteo=!1)},handleClick(a){a.originalEvent.stopPropagation();const e=a.originalEvent.target.className;e.indexOf("close")>-1?this.showMeteo=!1:e==="more"?this.$emit("more",this.meteo):this.$emit("point",a.lngLat)},handleRender(){var a;if(this.meteo){const e=document.getElementById("point-meteo");this.meteoMarker?(a=this.meteoMarker)==null||a.setLngLat([this.meteo.lng,this.meteo.lat]):this.meteoMarker=new Z.Marker(e).setLngLat([this.meteo.lng,this.meteo.lat]).addTo(this.map)}}}},O=a=>(i.pushScopeId("data-v-22c5d8c1"),a=a(),i.popScopeId(),a),Ua={id:"point-meteo",class:"point-meteo"},Za={class:"meteo-box"},Ga={class:"header-box"},Ja={class:"main"},Xa={class:"sub"},qa={class:"main-box"},Ya={class:"flex-space"},Qa=O(()=>i.createElementVNode("label",null,"Wind",-1)),Ka={class:"flex-space"},ei=O(()=>i.createElementVNode("label",null,"Wind.Wave",-1)),ti={class:"flex-space"},ai=O(()=>i.createElementVNode("label",null,"Swell",-1)),ii={class:"flex-space"},oi=O(()=>i.createElementVNode("label",null,"Sig.Wave",-1)),ri={class:"flex-space"},si=O(()=>i.createElementVNode("label",null,"Current",-1)),ni={class:"flex-space"},li=O(()=>i.createElementVNode("label",null,"Precip",-1)),ci={class:"flex-space"},hi=O(()=>i.createElementVNode("label",null,"Visibility",-1)),di={class:"flex-space"},pi=O(()=>i.createElementVNode("label",null,"Temp",-1)),mi={class:"flex-space"},yi=O(()=>i.createElementVNode("label",null,"Water Temp",-1)),fi={key:0,class:"flex-space",style:{"justify-content":"flex-end"}},ui=[O(()=>i.createElementVNode("span",{class:"more"},"More >>",-1))];function gi(a,e,t,r,o,s){var l,n,c,h,d,p,g,y,f,u,m,_,b,w,v,L,N,T,D,R,B,M,ie,oe,re,se,ne,le,ce,Q,W,j,he,F,S,$,de,H,pe,K,ee,te,ue,ge,be,_e,Le;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Ua,[i.createElementVNode("div",Za,[i.createElementVNode("div",Ga,[i.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=ke=>o.showMeteo=!1)},""),i.createElementVNode("div",Ja,i.toDisplayString(s.computeLat((l=t.meteo)==null?void 0:l.lat))+","+i.toDisplayString(s.computeLng((n=t.meteo)==null?void 0:n.lng)),1),i.createElementVNode("div",Xa,i.toDisplayString(s.computeTime((c=t.meteo)==null?void 0:c.utc)),1)]),i.createElementVNode("div",qa,[i.createElementVNode("div",Ya,[Qa,i.createElementVNode("span",null,i.toDisplayString(((d=(h=t.meteo)==null?void 0:h.wind)==null?void 0:d.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((g=(p=t.meteo)==null?void 0:p.wind)==null?void 0:g.kts,1))+"[kts]/"+i.toDisplayString((f=(y=t.meteo)==null?void 0:y.wind)==null?void 0:f.scale)+"[BF]/"+i.toDisplayString(s.roundPrecision((m=(u=t.meteo)==null?void 0:u.gusts)==null?void 0:m.kts,1))+"[kts]",1)]),i.createElementVNode("div",Ka,[ei,i.createElementVNode("span",null,i.toDisplayString(((w=(b=(_=t.meteo)==null?void 0:_.wave)==null?void 0:b.wd)==null?void 0:w.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((N=(L=(v=t.meteo)==null?void 0:v.wave)==null?void 0:L.wd)==null?void 0:N.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((R=(D=(T=t.meteo)==null?void 0:T.wave)==null?void 0:D.wd)==null?void 0:R.period,1))+"[s]",1)]),i.createElementVNode("div",ti,[ai,i.createElementVNode("span",null,i.toDisplayString(((ie=(M=(B=t.meteo)==null?void 0:B.wave)==null?void 0:M.swell)==null?void 0:ie.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((se=(re=(oe=t.meteo)==null?void 0:oe.wave)==null?void 0:re.swell)==null?void 0:se.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((ce=(le=(ne=t.meteo)==null?void 0:ne.wave)==null?void 0:le.swell)==null?void 0:ce.period,1))+"[s]",1)]),i.createElementVNode("div",ii,[oi,i.createElementVNode("span",null,i.toDisplayString(((j=(W=(Q=t.meteo)==null?void 0:Q.wave)==null?void 0:W.sig)==null?void 0:j.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((S=(F=(he=t.meteo)==null?void 0:he.wave)==null?void 0:F.sig)==null?void 0:S.height,1))+"[m]/"+i.toDisplayString(s.roundPrecision((H=(de=($=t.meteo)==null?void 0:$.wave)==null?void 0:de.sig)==null?void 0:H.period,1))+"[s]",1)]),i.createElementVNode("div",ri,[si,i.createElementVNode("span",null,i.toDisplayString(((K=(pe=t.meteo)==null?void 0:pe.current)==null?void 0:K.direction)||"-")+"/"+i.toDisplayString(s.roundPrecision((te=(ee=t.meteo)==null?void 0:ee.current)==null?void 0:te.kts,2))+"[kts]",1)]),i.createElementVNode("div",ni,[li,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((ge=(ue=t.meteo)==null?void 0:ue.precip)==null?void 0:ge.inter6h,2))+"[mm]",1)]),i.createElementVNode("div",ci,[hi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision(((be=t.meteo)==null?void 0:be.visibility)/1852,0))+"[nm]",1)]),i.createElementVNode("div",di,[pi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((_e=t.meteo)==null?void 0:_e.temp,0))+"[°C]",1)]),i.createElementVNode("div",mi,[yi,i.createElementVNode("span",null,i.toDisplayString(s.roundPrecision((Le=t.meteo)==null?void 0:Le.waterTemp,2))+"[°C]",1)])]),a.$attrs.permission&o.helper.LEVEL.Prime?(i.openBlock(),i.createElementBlock("div",fi,ui)):i.createCommentVNode("",!0)])],512)),[[i.vShow,o.showMeteo]])}const bi=C(Ha,[["render",gi],["__scopeId","data-v-22c5d8c1"]]),_i={name:"IdmWarZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"war-zone-source",zoneLayer:"war-zone-layer",zoneLabelLayer:"war-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-color":"#f44336","fill-opacity":.4}},this.beforeLayer),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#f44336"}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-1]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Li(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const wi=C(_i,[["render",Li]]),xi={name:"IdmGmdssArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"gmdss-area-source",areaLayer:"gmdss-area-layer",areaLabelLayer:"gmdss-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","val"],"AreaI","#EB8996","AreaII","#6F448B","AreaIII","#3E8BD3","AreaIV","#5EBCC4","AreaV","#00AAE7","AreaVI","#9CCE6D","AreaVII","#F4AE00","AreaVIII","#EF9A85","AreaIX","#00AAA7","AreaX","#7AC49F","AreaXI","#DFDFDF","AreaXII","#FFF974","AreaXIII","#EF9A85","AreaXIV","#86A2D1","AreaXV","#EC8972","AreaXVI","#EAC2DA","AreaXVII","#B9C8E7","AreaXVIII","#BBA1C8","AreaXIX","#FAE0BD","AreaXX","#DBECC8","AreaXXI","#D496AF","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-opacity":.8,"text-color":"#000"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function vi(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const Ci=C(xi,[["render",vi]]),Si={name:"IdmEcaZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"eca-zone-source",zoneLayer:"eca-zone-layer",zoneLabelLayer:"eca-zone-label-layer"}},watch:{zone:{handler(){this.zone?this.handleRender():this.handleClear()}}},methods:{handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#05f324"}}),this.map.addLayer({id:this.zoneLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-color":"#04c021","line-width":1,"line-opacity":1}},this.beforeLayer),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-max-width":16,"text-justify":"left","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLayer+"-border")&&this.map.removeLayer(this.zoneLayer+"-border"),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function ki(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const Ei=C(Si,[["render",ki]]),jr="",zi={name:"IdmAlertZone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"alert-zone-source",polygonLayer:"alert-zone-polygon-layer",polygonLabelLayer:"alert-zone-polygon-label-layer",lineLayer:"alert-zone-line-layer",lineLabelLayer:"alert-zone-line-label-layer",pointLayer:"alert-zone-point-layer",showZone:!1,form:{}}},watch:{zone:{handler(){var a,e;this.zone?(this.handleRender(),(a=this.map)==null||a.on("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.polygonLabelLayer,this.lineLabelLayer,this.pointLayer],this.handleClick))}}},methods:{handleClick(a){var r;const e=a.features[0],t=(r=this.zone)==null?void 0:r.features.filter(o=>{var s;return o.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];t&&(this.showZone=!0,this.form={...t.properties})},handleRender(){var a;this.map?(this.handleClear(),this.zone&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.zone):(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.polygonLayer,type:"fill",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"fill-outline-color":"#d57d02","fill-opacity":.4,"fill-color":"#d57d02"}}),this.map.addLayer({id:this.polygonLayer+"-border",type:"line",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-width":1,"line-color":"#d57d02"}}),this.map.addLayer({id:this.lineLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],paint:{"line-color":"#d57d02","line-width":2}}),this.map.addLayer({id:this.polygonLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.1,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["all",["==","$type","LineString"],["!=","disabled",!0]],layout:{"symbol-placement":"line-center","icon-image":"alert","icon-size":.1,"icon-allow-overlap":!0,"icon-rotation-alignment":"viewport"},paint:{"icon-opacity":.8}}),this.map.addLayer({id:this.pointLayer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-image":"alert","icon-size":.1},paint:{"icon-opacity":.8}})))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.polygonLayer)&&this.map.removeLayer(this.polygonLayer),this.map.getLayer(this.polygonLayer+"-border")&&this.map.removeLayer(this.polygonLayer+"-border"),this.map.getLayer(this.polygonLabelLayer)&&this.map.removeLayer(this.polygonLabelLayer),this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getLayer(this.pointLayer)&&this.map.removeLayer(this.pointLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},Pi={id:"zone-info"},Ni=["innerHTML"];function Ti(a,e,t,r,o,s){var l;return i.withDirectives((i.openBlock(),i.createElementBlock("div",Pi,[i.createElementVNode("div",{class:"iconfont close",onClick:e[0]||(e[0]=n=>o.showZone=!1)},""),i.createElementVNode("div",{class:"rich-context",innerHTML:(l=o.form)==null?void 0:l.name},null,8,Ni)],512)),[[i.vShow,o.showZone]])}const Ii=C(zi,[["render",Ti],["__scopeId","data-v-c0864afc"]]),Fr="",Di={name:"IdmPort",props:{map:{type:Object},port:{type:Object},beforeLayer:{type:String}},emits:["port"],data(){return{source:"port-source",layer:"port-layer",showPort:!1,form:{},marker:void 0}},computed:{computeLat(){return function(a){return E.LngLatHelper.lat2pretty(a,4).pretty}},computeLng(){return function(a){return E.LngLatHelper.lng2pretty(a,4).pretty}}},watch:{port:{handler(){var a,e;this.port?(this.handleRender(),(a=this.map)==null||a.on("click",[this.layer],this.handleClick)):(this.handleClear(),(e=this.map)==null||e.off("click",[this.layer],this.handleClick))}}},methods:{handleClick(a){var r;const e=a.features[0],t=(r=this.port)==null?void 0:r.features.filter(o=>{var s;return o.properties.id===((s=e==null?void 0:e.properties)==null?void 0:s.id)})[0];if(t){this.showPort=!0,this.form={...t.properties},this.form.lng=t.geometry.coordinates[0],this.form.lat=t.geometry.coordinates[1];const o=document.getElementById("port-info");this.marker?this.marker.setLngLat([a.lngLat.lng,a.lngLat.lat]):this.marker=new Z.Marker(o).setLngLat([a.lngLat.lng,a.lngLat.lat]).setOffset([0,-85]).addTo(this.map)}},handleEmit(){this.$emit("port",this.form)},handleRender(){var a;this.map?this.port&&(this.map.getSource(this.source)?(a=this.map)==null||a.getSource(this.source).setData(this.port):(this.map.addSource(this.source,{type:"geojson",data:this.port}),this.map.addLayer({id:this.layer,type:"symbol",source:this.source,filter:["all",["==","$type","Point"],["!=","disabled",!0]],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"port","text-anchor":"left","text-field":"{name}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[1,0]},paint:{"text-color":"rgba(0, 0, 0, 0.8)","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.showPort=!1,this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}},xe=a=>(i.pushScopeId("data-v-4ab013cc"),a=a(),i.popScopeId(),a),Vi={id:"port-info"},Ri={class:"port-box"},Bi={class:"flex-start"},$i=xe(()=>i.createElementVNode("label",null,"Name : ",-1)),Ai={class:"flex-start"},Mi=xe(()=>i.createElementVNode("label",null,"Position : ",-1)),Wi={class:"flex-start"},Oi=xe(()=>i.createElementVNode("label",null,"LoCode : ",-1)),ji={class:"flex-start",style:{"align-items":"flex-start"}},Fi=xe(()=>i.createElementVNode("label",null,"Region : ",-1));function Hi(a,e,t,r,o,s){return i.withDirectives((i.openBlock(),i.createElementBlock("div",Vi,[i.createElementVNode("div",{class:"close iconfont",onClick:e[0]||(e[0]=l=>o.showPort=!1)},""),i.createElementVNode("div",Ri,[i.createElementVNode("div",Bi,[$i,i.createElementVNode("span",{onClick:e[1]||(e[1]=(...l)=>s.handleEmit&&s.handleEmit(...l))},i.toDisplayString(o.form.name),1)]),i.createElementVNode("div",Ai,[Mi,i.createElementVNode("span",null,i.toDisplayString(s.computeLat(o.form.lat))+", "+i.toDisplayString(s.computeLng(o.form.lng)),1)]),i.createElementVNode("div",Wi,[Oi,i.createElementVNode("span",null,i.toDisplayString(o.form.loCode||"-"),1)]),i.createElementVNode("div",ji,[Fi,i.createElementVNode("span",null,i.toDisplayString(o.form.city||"-")+", "+i.toDisplayString(o.form.country||"-"),1)])])],512)),[[i.vShow,o.showPort]])}const Ui=C(Di,[["render",Hi],["__scopeId","data-v-4ab013cc"]]),Zi={name:"IdmLoadLine",props:{map:{type:Object},line:{type:Object},beforeLayer:{type:String}},data(){return{source:"load-line-source",lineLayer:"load-line-layer",lineLabelLayer:"load-line-label-layer"}},watch:{line:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.line&&(this.map.addSource(this.source,{type:"geojson",data:this.line}),this.map.addLayer({id:this.lineLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.75,"fill-color":["match",["get","val"],"LLGreen","#A0C0C0","LLRed","#F5A39D","LLBlue","#6B94E4","#ffffff"]}},this.beforeLayer),this.map.addLayer({id:this.lineLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{lbl} (Length < {shipLength}, {start} - {end})","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.lineLayer)&&this.map.removeLayer(this.lineLayer),this.map.getLayer(this.lineLabelLayer)&&this.map.removeLayer(this.lineLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Gi(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const Ji=C(Zi,[["render",Gi]]),Xi={name:"IdmTimezone",props:{map:{type:Object},zone:{type:Object},beforeLayer:{type:String}},data(){return{source:"time-zone-source",zoneLayer:"time-zone-layer",zoneLabelLayer:"time-zone-label-layer"}},watch:{zone:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.zone&&(this.map.addSource(this.source,{type:"geojson",data:this.zone}),this.map.addLayer({id:this.zoneLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":["match",["get","offSet"],"-11.5","rgba(255,0,0,0.4)","-11","rgba(0,255,0,0.3)","-10.5","rgba(0,255,0,0.3)","-10","rgba(0,0,255,0.3)","-9.5","rgba(0,0,255,0.3)","-9","rgba(255,0,0,0.4)","-8.5","rgba(255,0,0,0.4)","-8","rgba(0,255,0,0.3)","-7.5","rgba(0,255,0,0.3)","-7","rgba(0,0,255,0.3)","-6.5","rgba(0,0,255,0.3)","-6","rgba(255,0,0,0.4)","-5.5","rgba(255,0,0,0.4)","-5","rgba(0,255,0,0.3)","-4.5","rgba(0,255,0,0.3)","-4","rgba(0,0,255,0.3)","-3.5","rgba(0,0,255,0.3)","-3","rgba(255,0,0,0.4)","-2.5","rgba(255,0,0,0.4)","-2","rgba(0,255,0,0.3)","-1.5","rgba(0,255,0,0.3)","-1","rgba(0,0,255,0.3)","-0.5","rgba(0,0,255,0.3)","+0","rgba(255,0,0,0.4)","+0.5","rgba(255,0,0,0.4)","+1","rgba(0,255,0,0.3)","+1.5","rgba(0,255,0,0.3)","+2","rgba(0,0,255,0.3)","+2.5","rgba(0,0,255,0.3)","+3","rgba(255,0,0,0.4)","+3.5","rgba(255,0,0,0.4)","+4","rgba(0,255,0,0.3)","+4.5","rgba(0,255,0,0.3)","+5","rgba(0,0,255,0.3)","+5.5","rgba(0,0,255,0.3)","+6","rgba(255,0,0,0.4)","+6.5","rgba(255,0,0,0.4)","+7","rgba(0,255,0,0.3)","+7.5","rgba(0,255,0,0.3)","+8","rgba(0,0,255,0.3)","+8.5","rgba(0,0,255,0.3)","+9","rgba(255,0,0,0.4)","+9.5","rgba(255,0,0,0.4)","+10","rgba(0,255,0,0.3)","+10.5","rgba(0,255,0,0.3)","+11","rgba(0,0,255,0.3)","+11.5","rgba(0,0,255,0.3)","rgba(255,0,0,0.4)"]}}),this.map.addLayer({id:this.zoneLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{offSet}","text-rotation-alignment":"viewport","text-size":12,"text-offset":[0,1]},paint:{"text-opacity":.8,"text-color":"#fff"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.zoneLayer)&&this.map.removeLayer(this.zoneLayer),this.map.getLayer(this.zoneLabelLayer)&&this.map.removeLayer(this.zoneLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function qi(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const Yi=C(Xi,[["render",qi]]),Qi={name:"IdmVoluntaryReportingArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"vra-source",areaLayer:"vra-layer",areaLabelLayer:"vra-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":1,"line-color":"#9f30f9"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function Ki(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const eo=C(Qi,[["render",Ki]]),to={name:"IdmSpecialArea",props:{map:{type:Object},area:{type:Object},beforeLayer:{type:String}},data(){return{source:"special-area-source",areaLayer:"special-area-layer",areaLabelLayer:"special-area-label-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.area.features.forEach(a=>{a.geometry.type==="Polygon"&&a.geometry.coordinates.forEach(e=>E.LngLatHelper.convertToMonotonicLng2(e))}),this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.areaLayer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.4,"fill-color":["match",["get","val"],"DefaultStyle","rgb(0,0,0)","JWCriskArea","rgb(0,0,0)","rgb(0,0,0)"]}},this.beforeLayer),this.map.addLayer({id:this.areaLayer+"-border",type:"line",source:this.source,filter:["==","$type","Polygon"],paint:{"line-width":1,"line-opacity":.4,"line-color":"rgb(0,0,0)"}},this.beforeLayer),this.map.addLayer({id:this.areaLabelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","icon-size":.1,"icon-image":"identify","text-anchor":"top","text-field":"{lbl}","text-rotation-alignment":"viewport","text-size":10,"text-offset":[0,-3.5]},paint:{"icon-opacity":.8,"text-color":"#000","text-halo-color":"#fff","text-halo-width":1}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.areaLayer)&&this.map.removeLayer(this.areaLayer),this.map.getLayer(this.areaLayer+"-border")&&this.map.removeLayer(this.areaLayer+"-border"),this.map.getLayer(this.areaLabelLayer)&&this.map.removeLayer(this.areaLabelLayer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function ao(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const io=C(to,[["render",ao]]),oo={name:"IdmTerminator",props:{map:{type:Object},area:{type:Object}},data(){return{source:"terminator-source",layer:"terminator-layer"}},watch:{area:{handler(){this.handleRender()}}},methods:{handleRender(){this.map?(this.handleClear(),this.area&&(this.map.addSource(this.source,{type:"geojson",data:this.area}),this.map.addLayer({id:this.layer,type:"fill",source:this.source,filter:["==","$type","Polygon"],paint:{"fill-outline-color":"silver","fill-opacity":.5,"fill-color":"rgba(0, 0, 0, 0.4)"}}))):setTimeout(()=>{this.handleRender()},500)},handleClear(){this.map.getLayer(this.layer)&&this.map.removeLayer(this.layer),this.map.getSource(this.source)&&this.map.removeSource(this.source)}}};function ro(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const so=C(oo,[["render",ro]]),Hr="",no={name:"IdmLatLng",props:{map:{type:Object},show:{type:Boolean},bottom:{type:String,default:"70px"},toggleVersion:{type:Number}},data(){return{lngLat:void 0,source:"idm-lat-lng-source",layer:"idm-lat-lng-layer",labelLayer:"idm-lat-lng-label-layer",right:10}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){var a;this.map&&((a=this.map)==null||a.on("mousemove",this.handleMouseMove))},immediate:!0},toggleVersion:{handler(){var a,e,t;this.right=(((a=document.getElementsByClassName("legend-bars")[0])==null?void 0:a.clientWidth)||-10)+(((e=document.getElementsByClassName("available-layers-show")[0])==null?void 0:e.clientWidth)||0)+(((t=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:t.clientWidth)||0)+20},immediate:!0}},methods:{handleBind(){var a,e;this.show?((a=this.map)==null||a.on("zoomend",this.handleZoomEnd),this.handleRender()):(this.handleClear(),(e=this.map)==null||e.off("zoomend",this.handleZoomEnd))},handleMouseMove(a){const e=a.lngLat,t=E.LngLatHelper.lng2pretty(e.lng,2),r=E.LngLatHelper.lat2pretty(e.lat,2);this.lngLat={lng:t,lat:r}},handleComputeLatLngs(){var r;const a=(r=this.map)==null?void 0:r.getZoom();console.log(a);let e=30;a>4?e=10:a>3&&(e=15);const t=[];for(let o=-60;o<90;o+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[-180,o],[180,o]]}});for(let o=-180;o<180;o+=e)t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[o,-90],[o,90]]}});for(let o=180;o>-180;o-=e)for(let s=-60;s<90;s+=e)t.push({type:"Feature",geometry:{type:"Point",coordinates:[o,s]},properties:{val:`${s>0?s+" N":s===0?s:s*-1+" S"}, ${o>0?o+" E":o*-1+" W"}`}});return t},handleZoomEnd(){var e;const a=this.handleComputeLatLngs();(e=this.map)==null||e.getSource(this.source).setData(x.featureCollection(a))},handleRender(){if(this.map){const a=this.handleComputeLatLngs();this.map.addSource(this.source,{type:"geojson",data:{type:"FeatureCollection",features:a}}),this.map.addLayer({id:this.layer,type:"line",source:this.source,filter:["==","$type","LineString"],layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"rgba(0, 0, 0, 0.3)","line-width":1}}),this.map.addLayer({id:this.labelLayer,type:"symbol",source:this.source,filter:["==","$type","Point"],layout:{"symbol-placement":"point","text-field":"{val}","text-rotation-alignment":"viewport","text-offset":[0,1],"text-size":10,"text-allow-overlap":!0},paint:{"text-opacity":.8}})}},handleClear(){var a,e,t,r,o,s;(a=this.map)!=null&&a.getLayer(this.layer)&&((e=this.map)==null||e.removeLayer(this.layer)),(t=this.map)!=null&&t.getLayer(this.labelLayer)&&((r=this.map)==null||r.removeLayer(this.labelLayer)),(o=this.map)!=null&&o.getSource(this.source)&&((s=this.map)==null||s.removeSource(this.source))}}},lo=(a=>(i.pushScopeId("data-v-7367f59b"),a=a(),i.popScopeId(),a))(()=>i.createElementVNode("span",null,", ",-1));function co(a,e,t,r,o,s){return o.lngLat?(i.openBlock(),i.createElementBlock("div",{key:0,class:"lat-lng-tip",style:i.normalizeStyle({right:o.right+"px",bottom:t.bottom})},[i.createElementVNode("span",null,i.toDisplayString(o.lngLat.lat.pretty),1),lo,i.createElementVNode("span",null,i.toDisplayString(o.lngLat.lng.pretty),1)],4)):i.createCommentVNode("",!0)}const Se=C(no,[["render",co],["__scopeId","data-v-7367f59b"]]),ho={name:"IdmMeasure",props:{map:{type:Object},show:{type:Boolean}},data(){return{geojson:[],source:"measure-source",layer:"measure-layer",labelLayer:"measure-label-layer",tmpSource:"measure-tmp-source",tmpLayer:"measure-tmp-layer",tmpLabelLayer:"measure-tmp-label-layer",closeMarkers:{},pointMarkers:{},tipMarker:void 0,contextmenu:void 0,navigation:"RL"}},watch:{show:{handler(){this.handleBind()},immediate:!0},map:{handler(){this.map&&this.handleBind()}}},methods:{handleBind(){var a,e,t,r,o,s,l,n,c,h;if(this.show)(a=this.map)==null||a.getCanvas().addEventListener("keydown",this.handleKeydown),(e=this.map)==null||e.on("mousemove",this.handleMove),(t=this.map)==null||t.on("dblclick",this.handleDblClick),(r=this.map)==null||r.on("click",this.handleClick),(o=this.map)==null||o.on("contextmenu",this.handleContextmenu),this.map&&(this.map.getCanvas().style.cursor="crosshair");else{(s=this.map)==null||s.getCanvas().removeEventListener("keydown",this.handleKeydown),(l=this.map)==null||l.off("mousemove",this.handleMove),(n=this.map)==null||n.off("dblclick",this.handleDblClick),(c=this.map)==null||c.off("click",this.handleClick),(h=this.map)==null||h.off("contextmenu",this.handleContextmenu);for(const d of this.geojson)this.handleClear(d,!0);this.geojson=[],this.map&&(this.map.getCanvas().style.cursor="grab")}},handleKeydown(a){if(a.key==="Shift"){this.navigation=this.navigation==="RL"?"GC":"RL";const t=this.geojson.at(-1).features.filter(r=>r.geometry.type==="Point");t.length&&(t.at(-1).properties.mode=this.navigation)}},handleDrag(a){var t,r,o,s,l,n,c,h,d,p;const e=(r=(t=a.target)==null?void 0:t._element)==null?void 0:r.id;if((e==null?void 0:e.split("-").length)===2){const g=this.geojson.filter(m=>m.id===e.split("-")[0])[0];this.pointMarkers[g.id].filter(m=>{var _;return((_=m._element)==null?void 0:_.id)===e})[0].setLngLat([(s=(o=a.target)==null?void 0:o._lngLat)==null?void 0:s.lng,(n=(l=a.target)==null?void 0:l._lngLat)==null?void 0:n.lat]);let f;g.features.forEach((m,_)=>{if(m.geometry.type==="Point"&&m.properties.id==e.split("-")[1]){f=_;return}});const u=g.features.filter(m=>m.geometry.type==="Point");this.handleTmpPointUpdate(g,u[f-1],{lng:(h=(c=a.target)==null?void 0:c._lngLat)==null?void 0:h.lng,lat:(p=(d=a.target)==null?void 0:d._lngLat)==null?void 0:p.lat,properties:u[f].properties},f===u.length-1?void 0:u[f+1])}},handleDragEnd(a){var t,r,o,s,l,n,c,h,d,p;const e=(r=(t=a.target)==null?void 0:t._element)==null?void 0:r.id;if((e==null?void 0:e.split("-").length)===2){const g=this.geojson.filter(u=>u.id===e.split("-")[0])[0];this.pointMarkers[g.id].filter(u=>{var m;return((m=u._element)==null?void 0:m.id)===e})[0].setLngLat([(s=(o=a.target)==null?void 0:o._lngLat)==null?void 0:s.lng,(n=(l=a.target)==null?void 0:l._lngLat)==null?void 0:n.lat]);const f=g.features.filter(u=>u.geometry.type==="Point"&&u.properties.id==e.split("-")[1])[0];f.geometry.coordinates=[(h=(c=a.target)==null?void 0:c._lngLat)==null?void 0:h.lng,(p=(d=a.target)==null?void 0:d._lngLat)==null?void 0:p.lat],g.features=g.features.filter(u=>u.geometry.type==="Point"),this.handlePointUpdate(g)}},handleContextmenu(a){var t,r,o,s;a.preventDefault(),(t=this.contextmenu)==null||t.remove();const e=(s=(o=(r=a.originalEvent)==null?void 0:r.target)==null?void 0:o.parentElement)==null?void 0:s.id;if((e==null?void 0:e.split("-").length)===2){const n=this.geojson.filter(c=>c.id===e.split("-")[0])[0].features.filter(c=>c.geometry.type==="Point");if(n.length>2&&n.filter(h=>h.properties.id===(e==null?void 0:e.split("-")[1]))[0]){const h=document.createElement("div");h.className="point-contextmenu-marker",h.innerHTML=`<span id="del-${e}" class="del-point">Del</span>`,this.contextmenu=new Z.Marker(h).setOffset([24,0]).setLngLat([a.lngLat.lng,a.lngLat.lat]).addTo(this.map)}}},handleClick(a){var t,r,o,s,l;(t=this.contextmenu)==null||t.remove();const e=a.originalEvent.target.className;if(e==="marker-close"){const n=(o=(r=a.originalEvent)==null?void 0:r.srcElement)==null?void 0:o.id,c=this.geojson.filter(h=>h.id===n)[0];c&&this.handleClear(c,!0),this.geojson=this.geojson.filter(h=>h.id!==n)}else if(e==="del-point"){const n=(l=(s=a.originalEvent.target.id)==null?void 0:s.replace("del-",""))==null?void 0:l.split("-"),c=this.geojson.filter(h=>h.id===n[0])[0];c.features=c.features.filter(h=>h.geometry.type==="Point"&&h.properties.id!==n[1]),this.handlePointUpdate(c)}else if(e!=="marker-label"){let n=this.geojson.at(-1);n||(n=x.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(n)),n.features=n.features.filter(h=>h.geometry.type==="Point");const c=x.feature({type:"Point",coordinates:[a.lngLat.lng,a.lngLat.lat]},{id:new Date().getTime().toString(),mode:this.navigation});n.features.push(c),this.handlePointUpdate(n)}},handlePointUpdate(a){const e=a.features;if(e.length>1){let t=0;const r=[];for(let o=1;o<e.length;o++){const s=e[o-1],l=e[o],n=s.properties,c={lng:s.geometry.coordinates[0],lat:s.geometry.coordinates[1]},h={lng:l.geometry.coordinates[0],lat:l.geometry.coordinates[1]},d=E.LaneHelper.calculateDistance(c,h,n.mode==="RL",2),p=E.LaneHelper.calculateBearing(c,h,n.mode==="RL",2);t=E.LngLatHelper.roundPrecision(t+d,2);let g;n.mode==="RL"?g=E.LngLatHelper.convertToMonotonicLng([c,h]):g=E.LngLatHelper.convertToMonotonicLng(E.LaneHelper.interpolateCoordinates(c,h,200));const y=x.lineString(g.map(f=>[f.lng,f.lat]));y.properties.dist=d,y.properties.bearing=p,y.properties.total=t,r.push(y)}e.push(...r),a.total=t}return this.handleRender(a),a},handleTmpPointUpdate(a,e,t,r){const o=x.featureCollection([]);let s,l;if(e){const c=e.properties,h={lng:e.geometry.coordinates[0],lat:e.geometry.coordinates[1]},d={lng:t.lng,lat:t.lat};s=E.LaneHelper.calculateDistance(h,d,c.mode==="RL",2),l=E.LaneHelper.calculateBearing(h,d,c.mode==="RL",2);let p;c.mode==="RL"?p=E.LngLatHelper.convertToMonotonicLng([h,d]):p=E.LngLatHelper.convertToMonotonicLng(E.LaneHelper.interpolateCoordinates(h,d,200));const g=x.lineString(p.map(y=>[y.lng,y.lat]));g.properties.dist=s,g.properties.bearing=l,o.features.push(g)}if(r){const c=t.properties,h=t,d={lng:r.geometry.coordinates[0],lat:r.geometry.coordinates[1]};s=E.LaneHelper.calculateDistance(h,d,c.mode==="RL",2),l=E.LaneHelper.calculateBearing(h,d,c.mode==="RL",2);let p;c.mode==="RL"?p=E.LngLatHelper.convertToMonotonicLng([h,d]):p=E.LngLatHelper.convertToMonotonicLng(E.LaneHelper.interpolateCoordinates(h,d,200));const g=x.lineString(p.map(y=>[y.lng,y.lat]));g.properties.dist=s,g.properties.bearing=l,o.features.push(g)}this.map.getSource(this.tmpSource)?this.map.getSource(this.tmpSource).setData(o):this.map.addSource(this.tmpSource,{type:"geojson",data:o}),this.map.getLayer(this.tmpLayer)||this.map.addLayer({id:this.tmpLayer,type:"line",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F44336","line-width":2,"line-opacity":1,"line-dasharray":[3,2]}}),this.map.getLayer(this.tmpLabelLayer)||this.map.addLayer({id:this.tmpLabelLayer,type:"symbol",source:this.tmpSource,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist} nm","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#F44336","text-halo-width":4,"text-halo-blur":0}});let n;if(r?n='<div class="marker-label">Drag and drop</div>':n=`<div class="marker-label">Tol distance: <b>${E.LngLatHelper.roundPrecision((a.total??0)+s,2)}</b>nm, bearing: <b>${l}</b>°</div><div class="marker-label">${this.navigation==="RL"?"RL":"GC"} mode, using 'Shift' to switch</div><div class="marker-label">Double click to end</div>`,this.tipMarker)this.tipMarker._element.innerHTML=n,this.tipMarker.setLngLat([t.lng,t.lat]);else{const c=document.createElement("div");c.className="tip-marker",c.innerHTML=n,this.tipMarker=new Z.Marker(c).setOffset([140,0]).setLngLat([t.lng,t.lat]).addTo(this.map)}},handleMove(a){this.map.getCanvas().style.cursor="crosshair";let e=this.geojson.at(-1);e||(e=x.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e));const t=e.features.filter(r=>r.geometry.type==="Point");t!=null&&t.length&&this.handleTmpPointUpdate(e,t.at(-1),{lng:a.lngLat.lng,lat:a.lngLat.lat})},handleDblClick(a){a.preventDefault();let e=this.geojson.at(-1);e.closed=!0,this.handleRender(e),e=x.featureCollection([],{id:new Date().getTime().toString()}),this.geojson.push(e)},handleRender(a){var e;if((e=a==null?void 0:a.features)!=null&&e.length){const t=`${a.id}-${this.source}`,r=`${a.id}-${this.layer}`,o=`${a.id}-${this.labelLayer}`;this.map.getSource(t)?this.map.getSource(t).setData(a):this.map.addSource(t,{type:"geojson",data:a}),this.handleClear(a,!1),this.map.addLayer({id:r,type:"line",source:t,filter:["==","$type","LineString"],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#F44336","line-width":2}}),this.map.addLayer({id:o,type:"symbol",source:t,filter:["==","$type","LineString"],layout:{"symbol-placement":"line-center","text-field":"{dist}nm,{bearing}°","text-rotation-alignment":"map","text-size":12},paint:{"text-opacity":1,"text-color":"#fff","text-halo-color":"#F44336","text-halo-width":4,"text-halo-blur":0}});const s=a.features.filter(l=>l.geometry.type==="Point");for(const l of s){const n=document.createElement("div");n.id=`${a.id}-${l.properties.id}`,n.className=`${a.closed?"point-marker closed":"point-marker"}`,n.innerHTML='<div class="marker-circle"></div>';const c=new Z.Marker({element:n,draggable:!0,contextmenu:!0}).setLngLat(l.geometry.coordinates).addTo(this.map);c.on("drag",this.handleDrag),c.on("dragend",this.handleDragEnd),this.pointMarkers[a.id]?this.pointMarkers[a.id].push(c):this.pointMarkers[a.id]=[c]}if(a.closed){const l=s.at(-1),c=a.features.filter(d=>d.geometry.type==="LineString").at(-1),h=document.createElement("div");h.className="point-summary-marker",h.innerHTML=`<div id="${a.id}" class="marker-close">×</div><div class="marker-label">Tol: ${c.properties.total}nm</div>`,this.closeMarkers[a.id]=new Z.Marker(h).setOffset([60,0]).setLngLat(l.geometry.coordinates).addTo(this.map)}}},handleClear(a,e=!0){var s,l,n,c,h,d,p,g,y;const t=`${a.id}-${this.source}`,r=`${a.id}-${this.layer}`,o=`${a.id}-${this.labelLayer}`;(s=this.map)!=null&&s.getLayer(r)&&this.map.removeLayer(r),(l=this.map)!=null&&l.getLayer(o)&&this.map.removeLayer(o),(n=this.map)!=null&&n.getLayer(this.tmpLayer)&&this.map.removeLayer(this.tmpLayer),(c=this.map)!=null&&c.getLayer(this.tmpLabelLayer)&&this.map.removeLayer(this.tmpLabelLayer),(h=this.closeMarkers[a.id])==null||h.remove(),this.closeMarkers[a.id]=void 0,(d=this.pointMarkers[a.id])==null||d.forEach(f=>{f==null||f.remove()}),this.pointMarkers[a.id]=[],(p=this.tipMarker)==null||p.remove(),this.tipMarker=void 0,e&&((g=this.map)!=null&&g.getSource(t))&&this.map.removeSource(t),e&&((y=this.map)!=null&&y.getSource(this.tmpSource))&&this.map.removeSource(this.tmpSource)}}};function po(a,e,t,r,o,s){return i.openBlock(),i.createElementBlock("div")}const mo=C(ho,[["render",po]]),Zr="",yo={name:"IdmENC",props:{map:{type:Object},enabled:{type:Boolean},beforeLayer:{type:String,default:"grayland"},bottom:{type:String,default:"260px"},token:{type:String,default:""},toggleVersion:{type:Number},permission:{type:Number}},emits:["enc"],data(){return{helper:z.CompanyHelper,vendor:this.$attrs.permission&z.CompanyHelper.LEVEL.Supper?"hi":"i4",right:10}},watch:{vendor:{handler(){this.$emit("enc",this.vendor)},immediate:!0},toggleVersion:{handler(){var a,e;this.right=(((a=document.getElementsByClassName("available-layers-show")[0])==null?void 0:a.clientWidth)||0)+(((e=document.getElementsByClassName("fleet-list-container")[0])==null?void 0:e.clientWidth)||0)+10},immediate:!0}},methods:{}},ze=a=>(i.pushScopeId("data-v-ab627b83"),a=a(),i.popScopeId(),a),fo={key:0},uo={class:"bar-item"},go=[ze(()=>i.createElementVNode("span",{class:"iconfont"},"HI",-1))],bo=[ze(()=>i.createElementVNode("span",{class:"iconfont"},"I4",-1))];function _o(a,e,t,r,o,s){return t.enabled&&t.permission&o.helper.LEVEL.Supper?(i.openBlock(),i.createElementBlock("div",fo,[i.createElementVNode("div",{class:"menu-bar-box",style:i.normalizeStyle({position:"absolute",right:o.right+"px",bottom:t.bottom})},[i.createElementVNode("div",uo,[i.createElementVNode("div",{class:i.normalizeClass(o.vendor==="hi"?"menu-icon active":"menu-icon"),onClick:e[0]||(e[0]=l=>o.vendor="hi")},go,2),i.createElementVNode("div",{class:i.normalizeClass(o.vendor==="i4"?"menu-icon active":"menu-icon"),onClick:e[1]||(e[1]=l=>o.vendor="i4")},bo,2)])],4)])):i.createCommentVNode("",!0)}const Lo=C(yo,[["render",_o],["__scopeId","data-v-ab627b83"]]),Xr="",wo={name:"IdmGLV2",components:{IdmGlLayer:mt,IdmWindBarb:wt,IdmWindParticle:kt,IdmCurrents:Vt,IdmCurrentParticle:Mt,IdmSigWave:jt,IdmSwell:Ut,IdmPrmsl:Jt,IdmIceberg:Yt,IdmTropicals:Ce,IdmPrecip3h:va,IdmVisibility:za,IdmWaterTemp:Da,IdmTemp:Aa,IdmArctic:Fa,IdmWarZone:wi,IdmGmdssArea:Ci,IdmEcaZone:Ei,IdmAlertZone:Ii,IdmPort:Ui,IdmLoadLine:Ji,IdmTimezone:Yi,IdmVRA:eo,IdmSpecialArea:io,IdmTerminator:so,IdmLatLng:Se,IdmMeasure:mo,IdmPoint:bi,IdmENC:Lo},props:{map:{type:Object,default:void 0},token:{type:String},ts:{type:String},beforeLayer:{type:String,default:""}},data(){return{weatherLayers:{},activeWeatherLayers:[],weatherWeight:0,otherLayers:{},otherWeight:0,showCoord:!1,showMeasure:!1,showPoint:!1,show3d:!1,meteo:void 0,source:"",gateway:"https://cbe.idmwx.com",mapProjection:"mercator",zoom:6,viewport:void 0,particleFactor:void 0,showRampColor:!1,activeWindLayer:!1,showWindParticle:!1,showCurrentParticle:!1,toggleVersion:0,enc:"",defaultMeteoToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNseTVudHJzYzAwNWUwbHBsZHkyaDRqczMiLCJyb2xlIjoxLCJuYW1lIjoiZmFrZUBvcm13eC5jb20iLCJwbGF0SWQiOiJnZDBtdDFkIiwiY29tcGFueSI6eyJpZCI6bnVsbCwiY2hpbGRyZW4iOltdfSwiaWF0IjoxNzIzMDI0MDI0LCJleHAiOjM5MzA1NDQwMjR9.RrKcdcMnq-FxBLJQ-i6lx2FscDE46y8EvHIemPW4HTg",helper:new Ee}},watch:{ts:{handler(a,e){a&&e&&A(a).utc().format("yyyy-MM-DD HH")!==A(e).utc().format("yyyy-MM-DD HH")&&this.$nextTick(()=>{this.handleDateChange({tropicals:!1})})},immediate:!0},map:{handler(){this.map&&(this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.viewport=new we(this.map),this.handleRampColorInitial())},immediate:!0},enc:{handler(a,e){var t,r,o,s,l,n,c,h;a?((r=(t=this.map)==null?void 0:t.getLayer(a))==null||r.setLayoutProperty("visibility","visible"),(s=(o=this.map)==null?void 0:o.getLayer(e))==null||s.setLayoutProperty("visibility","none")):((n=(l=this.map)==null?void 0:l.getLayer("i4"))==null||n.setLayoutProperty("visibility","none"),(h=(c=this.map)==null?void 0:c.getLayer("hi"))==null||h.setLayoutProperty("visibility","none"))}},activeWeatherLayers:{handler(){var a,e,t,r,o,s,l,n,c,h,d,p,g,y,f,u,m,_;if(!this.map)return!1;this.activeWeatherLayers.length>0?((e=(a=this.map)==null?void 0:a.getLayer(this.enc))==null||e.setLayoutProperty("visibility","none"),(r=(t=this.map)==null?void 0:t.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))==null||r.setLayoutProperty("visibility","visible"),(s=this.map)!=null&&s.getLayer((o=this.viewport)==null?void 0:o.rampColorLayer)&&((l=this.map)!=null&&l.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&this.mapProjection==="mercator"&&((c=this.map)==null||c.moveLayer((n=this.viewport)==null?void 0:n.rampColorLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)),(d=this.map)!=null&&d.getLayer((h=this.viewport)==null?void 0:h.particleLayer)&&((p=this.map)!=null&&p.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&this.mapProjection==="mercator"&&((y=this.map)==null||y.moveLayer((g=this.viewport)==null?void 0:g.particleLayer,this.helper.mapboxCustomer.layers.countryBoundary.id))):((u=(f=this.map)==null?void 0:f.getLayer(this.enc))==null||u.setLayoutProperty("visibility","visible"),(_=(m=this.map)==null?void 0:m.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))==null||_.setLayoutProperty("visibility","none"))},immediate:!0}},methods:{async fetchWeatherLayers(a={tropicals:!1}){var o,s,l,n,c,h,d,p;const e=new Date().valueOf();let t=0,r=0;if(this.map){const g=((o=this.map)==null?void 0:o.getZoom())+1,y=(s=this.map)==null?void 0:s.getBounds(),f=`${y._sw.lng},${y._sw.lat},${y._ne.lng},${y._ne.lat}`;if(this.handleRampColorState(),this.particleFactor){const u=z.LayerHelper.WEATHER_LAYERS.find(m=>{var _;return((_=m.peer)==null?void 0:_.weight)===this.particleFactor.weight});this.particleFactor.particle?this.weatherWeight=this.weatherWeight&u.weight?this.weatherWeight:this.weatherWeight+u.weight:this.weatherWeight=this.weatherWeight&u.weight?this.weatherWeight-u.weight:this.weatherWeight}if(this.weatherWeight>0){let u=this.weatherWeight,m;if(a.tropicals||this.weatherWeight&256&&(m=this.weatherLayers.tropicals,m&&(u-=256,m.version=Math.random()+1)),u>0){const _=await G.get(`${this.gateway}/api/arc/weather/layers/links?l=${u}&v=${this.source}&z=${g}&bbox=${f}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(r=new Date().valueOf()-(e+t),console.log("weather links elapsed: ",r,", total: ",t+=r),((l=_==null?void 0:_.data)==null?void 0:l.code)===0){const b=(n=_==null?void 0:_.data)==null?void 0:n.data,w=[];for(const L in b)L==="ice-edge"&&(b[L]="https://idm-hz.oss-cn-hangzhou.aliyuncs.com/test/sea_ice_contours.geojson"),L!=="tropicals"&&w.push(G.get(b[L],{headers:{Authorization:this.token||this.defaultMeteoToken,key:L},responseType:/\.(jpg|png)$/.test(b[L])?"blob":"json"}).catch(N=>{console.log(`[${L}] fetch layer error: ${N}`)}));const v=await Promise.all(w);this.weatherLayers={},v.map(L=>{var D,R,B,M;const N=((D=L==null?void 0:L.data)==null?void 0:D.data)||(L==null?void 0:L.data),T=(B=(R=L==null?void 0:L.config)==null?void 0:R.headers)==null?void 0:B.key;T&&N&&(this.weatherLayers[T]={raw:N,type:((M=L==null?void 0:L.config)==null?void 0:M.responseType)==="blob"?"image":"json",etime:this.ts})}),b.tropicals&&G.get(b.tropicals,{headers:{Authorization:this.token||this.defaultMeteoToken,key:"tropicals"}}).then(L=>{var D,R,B;const N=E.TropicalHelper.convert2Geojson(((D=L==null?void 0:L.data)==null?void 0:D.data)||(L==null?void 0:L.data)),T=(B=(R=L==null?void 0:L.config)==null?void 0:R.headers)==null?void 0:B.key;this.weatherLayers[T]={data:N,active:!0,cached:!1,type:"json",etime:this.ts,version:Math.random()+1}})}if(r=new Date().valueOf()-(e+t),console.log("weather layers elapsed: ",r,", total: ",t+=r),this.weatherLayers["swell-direction"]||this.weatherLayers["swell-height"]){const b=(c=this.weatherLayers["swell-direction"])==null?void 0:c.raw,w=(h=this.weatherLayers["swell-height"])==null?void 0:h.raw;delete this.weatherLayers["swell-direction"],delete this.weatherLayers["swell-height"],this.weatherLayers.swell={type:"json",direction:b,height:{raw:w},etime:this.ts}}if(this.weatherLayers["current-direction"]||this.weatherLayers["current-speed"]){const b=(d=this.weatherLayers["current-direction"])==null?void 0:d.raw,w=(p=this.weatherLayers["current-speed"])==null?void 0:p.raw;delete this.weatherLayers["current-direction"],delete this.weatherLayers["current-speed"],this.weatherLayers.current={type:"json",direction:b,speed:{raw:w},etime:this.ts}}}m&&(m.etime=this.ts,m.cached=!0,this.weatherLayers.tropicals=m)}this.handleWeatherLayerToggle(),this.handleDragEndWithZoom4Json()}this.toggleVersion=Math.random()},async fetchOtherLayers(a={all:!1,dayNight:!1,enc:!1}){var e,t,r,o;if(this.map){let s=this.otherWeight;if(s){let l=!1;if(this.otherWeight&2048&&(s=this.otherWeight-2048,l=!0),s){if(a.all){const n=await G.get(`${this.gateway}/api/arc/other/layers/links?l=${s}&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((e=n==null?void 0:n.data)==null?void 0:e.code)===0){const c=(t=n==null?void 0:n.data)==null?void 0:t.data,h=[];for(const p in c)h.push(G.get(c[p],{headers:{Authorization:this.token||this.defaultMeteoToken,key:p}}));const d=await Promise.all(h);this.otherLayers={enc:l},d.map(p=>{var f,u,m;const g=((f=p==null?void 0:p.data)==null?void 0:f.data)||(p==null?void 0:p.data),y=(m=(u=p==null?void 0:p.config)==null?void 0:u.headers)==null?void 0:m.key;this.otherLayers[y]=g})}}else if(a.dayNight&&s&1024){const n=await G.get(`${this.gateway}/api/arc/other/layers/links?l=1024&t=${this.ts}`,{headers:{Authorization:this.token||this.defaultMeteoToken}});if(((r=n==null?void 0:n.data)==null?void 0:r.code)===0){const c=(o=n==null?void 0:n.data)==null?void 0:o.data,h=[];for(const p in c)h.push(G.get(c[p],{headers:{Authorization:this.token||this.defaultMeteoToken,key:p}}));(await Promise.all(h)).map(p=>{var f,u,m;const g=((f=p==null?void 0:p.data)==null?void 0:f.data)||(p==null?void 0:p.data),y=(m=(u=p==null?void 0:p.config)==null?void 0:u.headers)==null?void 0:m.key;this.otherLayers[y]=g})}}}else this.otherLayers={enc:l}}else this.otherLayers={};this.handleBeforeLayerToggle()}},handleRampColorState(){var a;if(this.showRampColor=!1,this.showWindParticle=!1,this.showCurrentParticle=!1,(a=this.particleFactor)!=null&&a.particle)this.showRampColor=!0,this.showWindParticle=this.particleFactor.key==="wind",this.showCurrentParticle=this.particleFactor.key==="current",this.activeWeatherLayers=this.activeWeatherLayers.filter(e=>e.type==="json");else for(const e of this.activeWeatherLayers)["png","jpg"].includes(e.type)&&(this.showRampColor=!0);this.activeWindLayer=!!this.activeWeatherLayers.find(e=>e.key==="wind"),this.$refs.layer&&(this.$refs.layer.activeWeatherLayers=this.activeWeatherLayers)},handleRampColorInitial(){var a,e,t,r,o,s,l,n,c,h,d,p;this.viewport.map.getSource((a=this.viewport)==null?void 0:a.rampColorSource)||this.viewport.map.addSource((e=this.viewport)==null?void 0:e.rampColorSource,{type:"canvas",canvas:(t=this.viewport)==null?void 0:t.rampColorCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((r=this.viewport)==null?void 0:r.rampColorLayer)||this.viewport.map.addLayer({type:"raster",id:(o=this.viewport)==null?void 0:o.rampColorLayer,source:(s=this.viewport)==null?void 0:s.rampColorSource,layout:{visibility:"none"}},this.beforeLayer),this.viewport.map.getSource((l=this.viewport)==null?void 0:l.particleSource)||this.viewport.map.addSource((n=this.viewport)==null?void 0:n.particleSource,{type:"canvas",canvas:(c=this.viewport)==null?void 0:c.particleCanvas,animate:!0,coordinates:this.viewport.getBoundLngLat()}),this.viewport.map.getLayer((h=this.viewport)==null?void 0:h.particleLayer)||this.viewport.map.addLayer({type:"raster",id:(d=this.viewport)==null?void 0:d.particleLayer,source:(p=this.viewport)==null?void 0:p.particleSource,layout:{visibility:"none"}},this.beforeLayer)},handleDragEndWithZoom4Json(){var h,d,p,g;const a=new Date().valueOf();let e=0,t=0;const r=(h=this.map)==null?void 0:h.getBounds(),o=this.map.getZoom(),s=z.convertToStandardLng(r._sw.lng),l=z.convertToStandardLng(r._ne.lng),n=Math.floor(r._sw.lat),c=Math.ceil(r._ne.lat);for(const y in this.weatherLayers)if(this.weatherLayers[y].active&&this.weatherLayers[y].type==="json"){this.weatherLayers[y].active=!1,this.weatherLayers[y].version=Math.random()+1;let f=[];if(["swell","current"].includes(y)){const u=((d=this.weatherLayers[y])==null?void 0:d.direction)||{};for(const m in u)if(m>n&&m<c&&(!(o<=this.zoom)||m%(o<this.zoom/2?5:3)===0)){const _=u[m].lng;s>l?_.forEach((b,w)=>{var v;if((b>=s&&b<=180||b>=-180&&b<=l)&&(!(o<=this.zoom)||b%(o<this.zoom/2?5:3)===0)){const L=x.point([b,m],{val:u[m].val[w],spd:(v=u[m].spd)==null?void 0:v[w]});f.push(L)}}):_.forEach((b,w)=>{var v;if(b>=s&&b<=l&&(!(o<=this.zoom)||b%(o<this.zoom/2?5:3)===0)){const L=x.point([b,m],{val:u[m].val[w],spd:(v=u[m].spd)==null?void 0:v[w]});f.push(L)}})}if(t=new Date().valueOf()-(a+e),console.log("direction elapsed: ",t,", total: ",e+=t),y==="swell"){const m=this.weatherLayers[y].height;if(m){if(!m.data){const _=[];for(const b in(p=m.raw)==null?void 0:p.LineString){const w=m.raw.LineString[b];for(const v of w)_.push(x.lineString(v,{val:Number(b)}));m.data=x.featureCollection(_)}}if(m.data){const _=this.handleBboxClip(m.data,r);f=f.concat(_)}t=new Date().valueOf()-(a+e),console.log("height elapsed: ",t,", total: ",e+=t)}}if(y==="current"){const m=this.weatherLayers[y].speed;if(m){if(!m.data){const b=[];for(const w in(g=m.raw)==null?void 0:g.Polygon){const v=m.raw.Polygon[w];for(const L of v)b.push(x.polygon(L,{val:Number(w)}))}m.data=x.featureCollection(b)}const _=o<this.zoom?m.data.features.filter(b=>b.properties.val>.5):m.data.features;f=f.concat(_),t=new Date().valueOf()-(a+e),console.log("speed elapsed: ",t,", total: ",e+=t)}}}else if(y==="wind"){const u=this.weatherLayers.wind.raw;for(const m in u)if(m>n&&m<c&&(!(o<=this.zoom)||m%(o<this.zoom/2?5:3)===0)){const _=u[m].lng;s>l?_.forEach((b,w)=>{if((b>=s&&b<=180||b>=-180&&b<=l)&&(!(o<=this.zoom)||b%(o<this.zoom/2?5:3)===0)){const v=x.point([b,m],{val:u[m].val[w],spd:u[m].spd[w]});f.push(v)}}):_.forEach((b,w)=>{if(b>=s&&b<=l&&(!(o<=this.zoom)||b%(o<this.zoom/2?5:3)===0)){const v=x.point([b,m],{val:u[m].val[w],spd:u[m].spd[w]});f.push(v)}})}t=new Date().valueOf()-(a+e),console.log("wind barb elapsed: ",t,", total: ",e+=t)}else if(y==="sig-wave-height"){if(this.weatherLayers[y].data)f=this.weatherLayers[y].data;else{const u=this.weatherLayers[y].raw;if(u){const m=[];for(const _ in u.Polygon){const b=u.Polygon[_];for(const w of b)m.push(x.polygon(w,{val:Number(_)}))}for(const _ in u.Point){const b=u.Point[_];for(const w of b)m.push(...x.points(w,{val:Number(_)}).features)}f=f.concat(m)}}t=new Date().valueOf()-(a+e),console.log("sigWave elapsed: ",t,", total: ",e+=t)}else if(y==="prmsl"){if(this.weatherLayers[y].data)f=this.weatherLayers[y].data;else{const u=this.weatherLayers[y].raw;if(u){const m=[];for(const _ in u.LineString){const b=u.LineString[_];for(const w of b)m.push(x.lineString(w,{val:Number(_)}))}for(const _ in u.Point)u.Point[_].lng.forEach((b,w)=>{b=z.convertToStandardLng(b),m.push(x.point([b,_],{val:u.Point[_].val[w],type:u.Point[_].type[w]}))});f=f.concat(m)}}t=new Date().valueOf()-(a+e),console.log("prmsl elapsed: ",t,", total: ",e+=t)}else if(y==="arctic"||y==="iceberg"){if(this.weatherLayers[y].data)f=this.weatherLayers[y].data;else{const u=this.weatherLayers[y].raw;if(u){const m=[];for(const _ in u.LineString){const b=u.LineString[_];for(const w of b)m.push(x.lineString(w,{val:Number(_)}))}f=f.concat(m)}}t=new Date().valueOf()-(a+e)}console.log(y," elapsed: ",t,", total: ",e+=t),f.length&&(this.weatherLayers[y].data=x.featureCollection(f)),this.weatherLayers[y].active=!0,this.weatherLayers[y].version=Math.random()+1}},handleDragEndWithZoom4Image(){for(const a in this.weatherLayers)this.weatherLayers[a].active&&this.weatherLayers[a].type==="image"&&(this.weatherLayers[a].active=!0,this.weatherLayers[a].version=Math.random()+1)},handleBboxClip(a,e){const t=[],r=z.convertToStandardLng(e._sw.lng),o=z.convertToStandardLng(e._ne.lng);return a.features.forEach(s=>{if(s.geometry.type!=="Point")if(r>o){let l=[r,e._sw.lat,180,e._ne.lat],n=x.bboxClip(s,l);n.geometry.coordinates.length&&t.push(n),l=[-180,e._sw.lat,o,e._ne.lat],n=x.bboxClip(s,l),n.geometry.coordinates.length&&t.push(n)}else{const l=[r,e._sw.lat,o,e._ne.lat],n=x.bboxClip(s,l);n.geometry.coordinates.length&&t.push(n)}else t.push(s)}),t},handleWeatherLayerToggle(){var a;for(const e in this.weatherLayers)this.weatherLayers[e].active=!1,this.weatherLayers[e].version=Math.random()+1;for(const e of this.activeWeatherLayers){let t=e.key;t.indexOf("swell")>-1?t="swell":t.indexOf("current")>-1&&(t="current"),this.weatherLayers[t]&&(this.weatherLayers[t].active=!0,this.weatherLayers[t].version=Math.random()+1,((a=this.particleFactor)==null?void 0:a.key)===t&&this.weatherLayers[`${t}-particle`]&&(this.weatherLayers[`${t}-particle`].active=this.particleFactor.particle))}this.handleBeforeLayerToggle()},handleBeforeLayerToggle(){var a,e,t,r,o,s,l,n,c,h,d,p,g;(a=this.map)!=null&&a.getLayer(this.beforeLayer)&&((e=this.activeWeatherLayers)!=null&&e.length||(t=this.otherLayers)!=null&&t["war-zones"]||(r=this.otherLayers)!=null&&r["gmdss-areas"]||(o=this.otherLayers)!=null&&o["load-lines"]||(s=this.otherLayers)!=null&&s["high-risk-area"]||(l=this.otherLayers)!=null&&l["time-zones"]||(n=this.otherLayers)!=null&&n.pirates||(c=this.otherLayers)!=null&&c.ports||(h=this.otherLayers)!=null&&h.enc||(d=this.otherLayers)!=null&&d["voluntary-reporting-area"]||(p=this.otherLayers)!=null&&p["eca-zones"]||(g=this.otherLayers)!=null&&g["special-area"])&&this.map.setLayoutProperty(this.beforeLayer,"visibility","visible")},handleDateChange(a={tropicals:!1}){this.fetchWeatherLayers(a),this.fetchOtherLayers({dayNight:!0})},handleWeatherLayerChange(a,e,t){if(!this.map)setTimeout(()=>{this.handleWeatherLayerChange(a,e,t)},500);else{this.activeWeatherLayers=e;const r=this.activeWeatherLayers.some(l=>["wind","current"].includes(l.key)),o=this.activeWeatherLayers.some(l=>["png","jpg"].includes(l.type));r&&!o?(this.particleFactor=this.activeWeatherLayers.find(l=>["wind","current"].includes(l.key)),this.particleFactor.particle=!0):o&&this.particleFactor&&(this.particleFactor.particle=!1);const s=e==null?void 0:e.reduce((l,n)=>l+(l&(n==null?void 0:n.weight)?0:n==null?void 0:n.weight),0);this.weatherWeight!==s||this.source!==t?(this.source=t,this.weatherWeight=s,this.fetchWeatherLayers({tropicals:!1})):this.handleWeatherLayerToggle()}},handleOtherLayerChange(a){if(!this.map)setTimeout(()=>{this.handleOtherLayerChange(a)},500);else{const e=a==null?void 0:a.reduce((t,r)=>t+(r==null?void 0:r.weight),0);a.find(t=>t.key==="enc")?this.enc="i4":this.enc="",this.otherWeight!=e&&(this.otherWeight=e,this.fetchOtherLayers({all:!0}))}},async handlePointChange(a){const e=this.ts?A(this.ts):A(),t={lat:a.lat,lng:a.lng,ts:e.utc().format(),wt:!0,src:this.source},r=await G.get(`${this.gateway}/api/arc/meteo/query`,{params:t,headers:{Authorization:this.token||this.defaultMeteoToken}});(r==null?void 0:r.status)===200&&(this.meteo={...r==null?void 0:r.data,...a})},handle3dToggle(a){var e,t,r,o,s,l,n,c,h,d,p,g,y,f,u,m,_,b,w,v;a?(this.map.setProjection("globe"),this.mapProjection="globe",(t=this.map)!=null&&t.getLayer((e=this.viewport)==null?void 0:e.rampColorLayer)&&((r=this.map)!=null&&r.getLayer(this.helper.mapboxCustomer.layers.water.id))&&((s=this.map)==null||s.moveLayer((o=this.viewport)==null?void 0:o.rampColorLayer,this.helper.mapboxCustomer.layers.water.id)),(n=this.map)!=null&&n.getLayer((l=this.viewport)==null?void 0:l.particleLayer)&&((c=this.map)!=null&&c.getLayer(this.helper.mapboxCustomer.layers.water.id))&&((d=this.map)==null||d.moveLayer((h=this.viewport)==null?void 0:h.particleLayer,this.helper.mapboxCustomer.layers.water.id)),this.map.off("zoomend",this.handleDragEndWithZoom4Json),this.map.off("dragend",this.handleDragEndWithZoom4Json),this.map.off("move",this.handleDragEndWithZoom4Image)):(this.map.setProjection("mercator"),this.mapProjection="mercator",this.map.on("zoomend",this.handleDragEndWithZoom4Json),this.map.on("dragend",this.handleDragEndWithZoom4Json),this.map.on("move",this.handleDragEndWithZoom4Image),this.handleDragEndWithZoom4Image(),this.handleDragEndWithZoom4Json(),(g=this.map)!=null&&g.getLayer((p=this.viewport)==null?void 0:p.rampColorLayer)&&((y=this.map)!=null&&y.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&((u=this.map)==null||u.moveLayer((f=this.viewport)==null?void 0:f.rampColorLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)),(_=this.map)!=null&&_.getLayer((m=this.viewport)==null?void 0:m.particleLayer)&&((b=this.map)!=null&&b.getLayer(this.helper.mapboxCustomer.layers.countryBoundary.id))&&((v=this.map)==null||v.moveLayer((w=this.viewport)==null?void 0:w.particleLayer,this.helper.mapboxCustomer.layers.countryBoundary.id)))},handleParticle(a){this.particleFactor=a,this.fetchWeatherLayers({tropicals:!1})}}},xo={key:0,className:"map-gl-home"};function vo(a,e,t,r,o,s){var Q,W,j,he,F,S,$,de,H,pe,K,ee,te,ue,ge,be,_e,Le,ke,Ne,Te,Ie,De,Ve,Re,Be;const l=i.resolveComponent("IdmGlLayer"),n=i.resolveComponent("IdmENC"),c=i.resolveComponent("IdmSigWave"),h=i.resolveComponent("IdmSwell"),d=i.resolveComponent("IdmPrmsl"),p=i.resolveComponent("IdmIceberg"),g=i.resolveComponent("IdmTropicals"),y=i.resolveComponent("IdmCurrents"),f=i.resolveComponent("IdmCurrentParticle"),u=i.resolveComponent("IdmWindBarb"),m=i.resolveComponent("IdmWindParticle"),_=i.resolveComponent("IdmPrecip3h"),b=i.resolveComponent("IdmVisibility"),w=i.resolveComponent("IdmWaterTemp"),v=i.resolveComponent("IdmTemp"),L=i.resolveComponent("IdmArctic"),N=i.resolveComponent("IdmWarZone"),T=i.resolveComponent("IdmGmdssArea"),D=i.resolveComponent("IdmEcaZone"),R=i.resolveComponent("IdmAlertZone"),B=i.resolveComponent("IdmPort"),M=i.resolveComponent("IdmLoadLine"),ie=i.resolveComponent("IdmTimezone"),oe=i.resolveComponent("IdmVRA"),re=i.resolveComponent("IdmSpecialArea"),se=i.resolveComponent("IdmTerminator"),ne=i.resolveComponent("IdmLatLng"),le=i.resolveComponent("IdmMeasure"),ce=i.resolveComponent("IdmPoint");return t.map?(i.openBlock(),i.createElementBlock("div",xo,[i.createVNode(l,i.mergeProps({ref:"layer",map:t.map,"toggle-version":o.toggleVersion,"map-projection":o.mapProjection},a.$attrs,{onWeather:s.handleWeatherLayerChange,onOther:s.handleOtherLayerChange,onCoordinate:e[0]||(e[0]=U=>o.showCoord=U),onMeasure:e[1]||(e[1]=U=>o.showMeasure=U),onPoint:e[2]||(e[2]=U=>o.showPoint=U),on3d:s.handle3dToggle,onToggleVersion:e[3]||(e[3]=U=>o.toggleVersion=U)}),null,16,["map","toggle-version","map-projection","onWeather","onOther","on3d"]),i.createVNode(n,i.mergeProps({map:t.map,token:t.token,enabled:(Q=o.otherLayers)==null?void 0:Q.enc,"toggle-version":o.toggleVersion},a.$attrs,{onEnc:e[4]||(e[4]=U=>o.enc=U)}),null,16,["map","token","enabled","toggle-version"]),i.createVNode(c,i.mergeProps({map:t.map,"sig-wave":(W=o.weatherLayers)==null?void 0:W["sig-wave-height"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","sig-wave","before-layer"]),i.createVNode(h,i.mergeProps({map:t.map,swell:(j=o.weatherLayers)==null?void 0:j.swell,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","swell","before-layer"]),i.createVNode(d,i.mergeProps({map:t.map,prmsl:(he=o.weatherLayers)==null?void 0:he.prmsl,"before-layer":t.beforeLayer,"active-weather-layers":o.activeWeatherLayers},a.$attrs),null,16,["map","prmsl","before-layer","active-weather-layers"]),i.createVNode(p,i.mergeProps({map:t.map,iceberg:(F=o.weatherLayers)==null?void 0:F.iceberg,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","iceberg","before-layer"]),i.createVNode(g,i.mergeProps({map:t.map,date:t.ts,tropicals:(S=o.weatherLayers)==null?void 0:S.tropicals,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","date","tropicals","before-layer"]),i.createVNode(y,i.mergeProps({map:t.map,"map-projection":o.mapProjection,current:($=o.weatherLayers)==null?void 0:$.current,"before-layer":t.beforeLayer,"show-particle":o.showCurrentParticle,"margin-bottom":o.activeWindLayer?o.showRampColor?"84px":"56px":o.showRampColor?"56px":"30px","toggle-version":o.toggleVersion,"weather-layers":o.weatherLayers},a.$attrs,{onParticle:s.handleParticle}),null,16,["map","map-projection","current","before-layer","show-particle","margin-bottom","toggle-version","weather-layers","onParticle"]),i.createVNode(f,i.mergeProps({viewport:o.viewport,factor:(de=o.weatherLayers)==null?void 0:de["current-particle"],"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(u,i.mergeProps({ref:"windBarb",map:t.map,"map-projection":o.mapProjection,wind:(H=o.weatherLayers)==null?void 0:H.wind,current:(pe=o.weatherLayers)==null?void 0:pe.current,"before-layer":t.beforeLayer,"margin-bottom":o.showRampColor?"56px":"30px","show-particle":o.showWindParticle},a.$attrs,{"toggle-version":o.toggleVersion,"weather-layers":o.weatherLayers,onParticle:s.handleParticle}),null,16,["map","map-projection","wind","current","before-layer","margin-bottom","show-particle","toggle-version","weather-layers","onParticle"]),i.createVNode(m,i.mergeProps({viewport:o.viewport,factor:(K=o.weatherLayers)==null?void 0:K["wind-particle"],"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(_,i.mergeProps({viewport:o.viewport,factor:(ee=o.weatherLayers)==null?void 0:ee.precip3h,"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(b,i.mergeProps({viewport:o.viewport,factor:(te=o.weatherLayers)==null?void 0:te.visibility,"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(w,i.mergeProps({viewport:o.viewport,factor:(ue=o.weatherLayers)==null?void 0:ue["water-temp"],"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(v,i.mergeProps({viewport:o.viewport,factor:(ge=o.weatherLayers)==null?void 0:ge.temp,"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(L,i.mergeProps({viewport:o.viewport,factor:(be=o.weatherLayers)==null?void 0:be.arctic,"before-layer":t.beforeLayer,"toggle-version":o.toggleVersion},a.$attrs),null,16,["viewport","factor","before-layer","toggle-version"]),i.createVNode(N,i.mergeProps({map:t.map,zone:(_e=o.otherLayers)==null?void 0:_e["war-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(T,i.mergeProps({map:t.map,area:(Le=o.otherLayers)==null?void 0:Le["gmdss-areas"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(D,i.mergeProps({map:t.map,zone:(ke=o.otherLayers)==null?void 0:ke["eca-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(R,i.mergeProps({map:t.map,zone:(Ne=o.otherLayers)==null?void 0:Ne["alert-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(B,i.mergeProps({map:t.map,port:(Te=o.otherLayers)==null?void 0:Te.ports,"before-layer":t.beforeLayer},a.$attrs),null,16,["map","port","before-layer"]),i.createVNode(M,i.mergeProps({map:t.map,line:(Ie=o.otherLayers)==null?void 0:Ie["load-lines"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","line","before-layer"]),i.createVNode(ie,i.mergeProps({map:t.map,zone:(De=o.otherLayers)==null?void 0:De["time-zones"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","zone","before-layer"]),i.createVNode(oe,i.mergeProps({map:t.map,area:(Ve=o.otherLayers)==null?void 0:Ve["voluntary-reporting-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(re,i.mergeProps({map:t.map,area:(Re=o.otherLayers)==null?void 0:Re["special-area"],"before-layer":t.beforeLayer},a.$attrs),null,16,["map","area","before-layer"]),i.createVNode(se,i.mergeProps({map:t.map,area:(Be=o.otherLayers)==null?void 0:Be["day-night"]},a.$attrs),null,16,["map","area"]),i.createVNode(ne,i.mergeProps({map:t.map,show:o.showCoord,"toggle-version":o.toggleVersion},a.$attrs),null,16,["map","show","toggle-version"]),i.createVNode(le,i.mergeProps({map:t.map,show:o.showMeasure},a.$attrs),null,16,["map","show"]),i.createVNode(ce,i.mergeProps({map:t.map,show:o.showPoint,meteo:o.meteo},a.$attrs,{onPoint:s.handlePointChange}),null,16,["map","show","meteo","onPoint"])])):i.createCommentVNode("",!0)}const Pe=C(wo,[["render",vo]]),Co={install(a){a.component("MapboxGL",Pe),a.component("TropicalGL",Ce),a.component("LatLngGL",Se)}};k.LatLngGL=Se,k.MapboxGL=Pe,k.MapboxGLPlugin=Co,k.MapboxHelper=Ee,k.ParticleSchema=V,k.TropicalGL=Ce,k.Viewport=we,k.WebGL=J,k.WebGLSchema=I,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";:root{--idm-white: rgba(255, 255, 255, 1);--idm-white-9: rgba(255, 255, 255, .9);--idm-white-8: rgba(255, 255, 255, .8);--idm-white-7: rgba(255, 255, 255, .7);--idm-white-6: rgba(255, 255, 255, .6);--idm-white-5: rgba(255, 255, 255, .5);--idm-white-4: rgba(255, 255, 255, .4);--idm-white-3: rgba(255, 255, 255, .3);--idm-white-2: rgba(255, 255, 255, .2);--idm-white-1: rgba(255, 255, 255, .1);--idm-black: rgba(0, 0, 0, 1);--idm-black-9: rgba(0, 0, 0, .9);--idm-black-8: rgba(0, 0, 0, .8);--idm-black-7: rgba(0, 0, 0, .7);--idm-black-6: rgba(0, 0, 0, .6);--idm-black-5: rgba(0, 0, 0, .5);--idm-black-4: rgba(0, 0, 0, .4);--idm-black-3: rgba(0, 0, 0, .3);--idm-black-2: rgba(0, 0, 0, .2);--idm-black-1: rgba(0, 0, 0, .1);--idm-gray-light: rgba(239, 239, 239, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6c8ad9;--idm-primary-color-light2: #a7c4ff;--idm-primary-color-dark: #053a7e;--idm-primary-color-dark2: #002e6b;--idm-primary-color-9: rgba(42, 87, 183, .9);--idm-primary-color-8: rgba(42, 87, 183, .8);--idm-primary-color-7: rgba(42, 87, 183, .7);--idm-primary-color-6: rgba(42, 87, 183, .6);--idm-primary-color-5: rgba(42, 87, 183, .5);--idm-primary-color-4: rgba(42, 87, 183, .4);--idm-primary-color-3: rgba(42, 87, 183, .3);--idm-primary-color-2: rgba(42, 87, 183, .2);--idm-primary-color-1: rgba(42, 87, 183, .1);--idm-success-color: #0ddd9f;--idm-success-color-light: #92f7d9;--idm-success-color-dark: #06a074;--idm-success-color-dark2: #06694c;--idm-warning-color: #ff9500;--idm-warning-color-light: #ffcc00;--idm-warning-color-dark: #c77402;--idm-danger-color: #f44336;--idm-danger-color-light: #fb796e;--idm-danger-color-dark: #ad251b;--idm-info-color: #6e6e6e;--idm-info-color-light: #969696;--idm-info-color-light2: #c0c0c0;--idm-info-color-light3: #e2e2e2;--idm-info-color-dark: #494949;--idm-dangerous: #f44336;--idm-severe: #ff9500;--idm-heavy: #ffff00;--idm-vessel-cargo-color: lightgreen;--idm-vessel-tanker-color: red;--idm-vessel-passenger-color: blue;--idm-vessel-other-color: lightgrey;--idm-perf-cii-a: var(--idm-success-color);--idm-perf-cii-b: var(--idm-success-color-light);--idm-perf-cii-c: var(--idm-warning-color);--idm-perf-cii-d: var(--idm-danger-color-light);--idm-perf-cii-e: var(--idm-danger-color);--idm-tropicals-td: #03f869;--idm-tropicals-ts: #f2f202;--idm-tropicals-sts: #ff9100;--idm-tropicals-ty: #f44336;--idm-tropicals-sty: #f903d0;--idm-tropicals-super-ty: #8702f9;--idm-tropicals-r7: #ff9100;--idm-tropicals-r10: #f44336;--idm-text-shadow: 0px 0px 4px rgba(0, 0, 0, 1);--idm-dashed-border: 1px dashed var(--idm-white-5);--idm-solid-border: 1px solid var(--idm-white-4);--idm-background-color: var(--idm-primary-color-9);--idm-background-color-dark: var(--idm-primary-color-dark);--idm-background-color-light: var(--idm-primary-color-light);--idm-background-color-light2: #f3f5f8;--idm-active-background-light: linear-gradient(130deg, rgba(142, 163, 255, .93) 20%, rgb(90 67 193 / 93%) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(41, 32, 165) 0%, rgba(44, 93, 184) 80%, rgba(32, 90, 165) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-blink-animation: blink .8s ease-out infinite alternate}:root[colorTheme=black]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .8) 80%, rgb(0, 0, 0, .8) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-right: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-left: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(117, 117, 117, .93) 30%, rgba(200, 200, 200, .93) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(253, 253, 253), 0 0 21px rgb(226, 226, 226), 0 0 30px rgba(185, 185, 185, .4), 0 0 12px rgba(67, 67, 67, .6), 0 0 22px rgba(27, 27, 27, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(0, 0, 0, .7);--idm-primary-color-light: #757575;--idm-primary-color-light2: #a5a5a5;--idm-primary-color-dark: rgba(0, 0, 0, .8);--idm-primary-color-dark2: rgba(0, 0, 0, 1);--idm-primary-color-9: rgba(0, 0, 0, .9);--idm-primary-color-7: rgba(0, 0, 0, .7);--idm-primary-color-5: rgba(0, 0, 0, .5);--idm-primary-color-3: rgba(0, 0, 0, .3);--idm-primary-color-1: rgba(0, 0, 0, .1)}:root[colorTheme=blue]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(41, 32, 165) 0%, rgba(44, 93, 184) 80%, rgba(32, 90, 165) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(142, 163, 255, .93) 20%, rgb(90 67 193 / 93%) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6c8ad9;--idm-primary-color-light2: #a7c4ff;--idm-primary-color-dark: #053a7e;--idm-primary-color-dark2: #002e6b;--idm-primary-color-9: rgba(42, 87, 183, .9);--idm-primary-color-8: rgba(42, 87, 183, .8);--idm-primary-color-7: rgba(42, 87, 183, .7);--idm-primary-color-6: rgba(42, 87, 183, .6);--idm-primary-color-5: rgba(42, 87, 183, .5);--idm-primary-color-4: rgba(42, 87, 183, .4);--idm-primary-color-3: rgba(42, 87, 183, .3);--idm-primary-color-2: rgba(42, 87, 183, .2);--idm-primary-color-1: rgba(42, 87, 183, .1)}:root[colorTheme=dark-blue]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(104, 104, 226, .93) 20%, rgba(22, 49, 182, .93) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6266e0;--idm-primary-color-light2: #89b0ff;--idm-primary-color-dark: #00224e;--idm-primary-color-dark2: #021a39;--idm-primary-color-9: rgba(19, 47, 108, .9);--idm-primary-color-7: rgba(19, 47, 108, .7);--idm-primary-color-5: rgba(19, 47, 108, .5);--idm-primary-color-3: rgba(19, 47, 108, .3);--idm-primary-color-1: rgba(19, 47, 108, .1)}@font-face{font-family:iconfont;src:url(https://iconfont.idmwx.com/iconfont.woff2) format("woff2"),url(https://iconfont.idmwx.com/iconfont.woff) format("woff"),url(https://iconfont.idmwx.com/iconfont.ttf) format("truetype"),url(https://iconfont.idmwx.com/iconfont.svg?#iconfont) format("svg")}.iconfont{font-family:iconfont!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box;margin:0}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flex-start{display:flex;align-items:center;justify-content:flex-start}.flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-center{display:flex;align-items:center;justify-content:center}.flex-between,.flex-space{display:flex;align-items:center;justify-content:space-between}.flex-around{display:flex;align-items:center;justify-content:space-around}.flex-evenly{display:flex;align-items:center;justify-content:space-evenly}.flex-col-center-center{display:flex;flex-direction:column;justify-content:center;align-items:center}.flex-col-start-center{display:flex;flex-direction:column;justify-content:flex-start;align-items:center}.flex-col-end-center{display:flex;flex-direction:column;justify-content:flex-end;align-items:center}.flex-col-between-center{display:flex;flex-direction:column;justify-content:space-between;align-items:center}.flex-col-around-center{display:flex;flex-direction:column;justify-content:space-around;align-items:center}.flex-col-center-start{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.flex-col-center-end{display:flex;flex-direction:column;justify-content:center;align-items:flex-end}.flex{flex:1}.dropdown{position:relative;display:inline-block!important}.dropdown .dropdown-content{display:none;position:absolute;z-index:1}.dropdown:hover .dropdown-content{display:block}.loading{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--idm-black-5);z-index:1000;display:flex;justify-content:center;align-items:center;flex-direction:column}.loading i{font-size:30px;color:var(--idm-white);margin-bottom:16px;animation:rotate 2s linear infinite}.loading div{color:var(--idm-white);font-size:16px}@keyframes blink{0%{box-shadow:0 0 20px var(--idm-warning-color-dark) inset}to{box-shadow:0 0 20px var(--idm-success-color) inset}}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.idm-gl3-layer .fade-enter-active,.idm-gl3-layer .fade-leave-active{transition:opacity .4s}.idm-gl3-layer .fade-enter,.idm-gl3-layer .fade-leave-to{opacity:0}.idm-gl3-layer .menu-bar-box{position:absolute;overflow-y:hidden;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;transition:all .4s ease-in-out;z-index:2;border-radius:5px;box-shadow:0 2px 12px #0003}.idm-gl3-layer .menu-bar-box .bar-item{position:relative;border-radius:5px;background:var(--idm-white);cursor:pointer}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon{padding:8px;display:flex}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon span{font-size:20px;font-weight:600;color:var(--idm-black-8)}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon.active{background:var(--idm-primary-color)}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon.active span{color:var(--idm-white)}.idm-gl3-layer .layer{cursor:pointer;display:inline-flex;align-items:center;padding:5px 0}.idm-gl3-layer .layer.disabled{cursor:not-allowed}.idm-gl3-layer .layer.disabled span{color:var(--idm-black-4)}.idm-gl3-layer .layer.disabled .checkbox{border:1px solid var(--idm-black-2)}.idm-gl3-layer .layer.active .checkbox{border:var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl3-layer .layer.active .checkbox:after{content:"✔";color:var(--idm-white);font-size:12px;display:flex;align-items:center;justify-content:center}.idm-gl3-layer .layer.active span{color:var(--idm-primary-color)}.idm-gl3-layer .layer .checkbox{width:16px;height:16px;margin-right:4px;border:1px solid var(--idm-black-8)}.idm-gl3-layer .layer span{color:var(--idm-black-8);font-size:14px;width:max-content}.idm-gl3-layer .other-bars{position:absolute;top:36px;border-radius:5px;background:var(--idm-background-linear-gradient-top);box-shadow:0 2px 12px #0003}.idm-gl3-layer .active-layers{position:absolute;max-width:250px;min-width:200px;display:flex;flex-wrap:wrap;align-items:center;background:var(--idm-white);border-radius:5px;box-shadow:0 2px 12px #0003;transition:all .4s ease-in-out}.idm-gl3-layer .active-layers .layer{width:auto;padding:5px}.idm-gl3-layer .available-layers{position:absolute;height:calc(100vh - 120px);box-sizing:border-box;transition:all .4s ease-in-out}.idm-gl3-layer .available-layers .side-bar{margin:0 10px;box-sizing:border-box}.idm-gl3-layer .available-layers .side-bar i{padding:15px 1px;background:var(--idm-white-7);border-radius:5px;cursor:pointer;font-size:18px;font-weight:600;color:var(--idm-black);box-shadow:0 2px 12px #0003}.idm-gl3-layer .available-layers .list-box{height:inherit;width:200px;padding:10px 0;overflow-y:auto;color:var(--idm-black-8);background:var(--idm-white);display:flex;flex-direction:column;box-shadow:0 2px 12px #0003;z-index:1}.idm-gl3-layer .available-layers .list-box .layers-title{font-size:16px;font-weight:600;padding:0 10px 10px;color:var(--idm-black-8);border-bottom:var(--idm-dashed-border)}.idm-gl3-layer .available-layers .list-box .layers-body{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;padding:0 10px;font-size:14px}.idm-gl3-layer .available-layers .list-box .layers-body .layer{width:140px}.idm-gl3-layer .available-layers .list-box .model-box{display:flex;align-items:center;justify-content:flex-start;margin:10px 0;cursor:pointer}.idm-gl3-layer .available-layers .list-box .model-box span{padding:3px 10px;border:1px solid #cecece}.idm-gl3-layer .available-layers .list-box .model-box span.active{color:var(--idm-white);border:1px solid var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl3-layer .available-layers .list-box .model-box span:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.idm-gl3-layer .available-layers .list-box .model-box span:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px;border-left:none}.tool-bars[data-v-b6fb74d9]{transition:all .4s ease-in-out}.tool-bars i[data-v-b6fb74d9]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-b6fb74d9]{color:var(--idm-white)}.tool-bars span[data-v-b6fb74d9]{cursor:pointer;font-size:12px;color:var(--idm-black-8);margin-left:4px;background:var(--idm-white-8);padding:2px 4px;border-radius:5px;box-shadow:0 2px 12px #0003}.tool-bars span.active[data-v-b6fb74d9]{color:var(--idm-white);background:var(--idm-primary-color)}.legend-bars[data-v-41a686d0]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(98,113,184),rgb(98,113,184),rgb(98,113,184),rgb(98,113,184),rgb(61,110,163),rgb(74,148,170),rgb(74,146,148),rgb(77,142,124),rgb(76,164,76),rgb(103,164,54),rgb(162,135,64),rgb(162,109,92),rgb(141,63,92),rgb(151,75,145),rgb(95,100,160),rgb(91,136,161),rgb(91,136,161));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-41a686d0]{font-size:12px;text-align:center;color:var(--idm-white-8);width:32px}.tool-bars[data-v-ae630f43]{transition:all .4s ease-in-out}.tool-bars i[data-v-ae630f43]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-ae630f43]{color:var(--idm-white)}.tool-bars span[data-v-ae630f43]{cursor:pointer;font-size:12px;color:var(--idm-black-8);margin-left:4px;background:var(--idm-white-8);padding:2px 4px;border-radius:5px;box-shadow:0 2px 12px #0003}.tool-bars span.active[data-v-ae630f43]{color:var(--idm-white);background:var(--idm-primary-color)}.legend-bars[data-v-9115889b]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(84,170,230),rgb(84,170,230),rgb(84,170,230),rgb(84,170,230),rgb(64,127,115),rgb(58,164,58),rgb(191,182,67),rgb(197,154,68),rgb(160,70,94),rgb(138,84,166),rgb(82,113,165),rgb(84,142,152),rgb(150,181,184),rgb(195,194,194),rgb(195,194,194));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-9115889b]{font-size:12px;text-align:center;color:var(--idm-white);width:36px}.active-tropical[data-v-d9e29e39]{bottom:unset;background:var(--idm-white-9);padding:10px;border-radius:5px;box-shadow:0 2px 12px #0003;z-index:5}.active-tropical .header-box[data-v-d9e29e39]{min-width:360px;margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.active-tropical .header-box .close-btn[data-v-d9e29e39]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.active-tropical .header-box .main[data-v-d9e29e39]{font-size:16px}.active-tropical .header-box .sub[data-v-d9e29e39]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.active-tropical .main-box[data-v-d9e29e39]{min-width:360px;color:var(--idm-black-8);overflow-y:auto;box-sizing:border-box;font-size:12px;z-index:4}.active-tropical .main-box .content[data-v-d9e29e39]{padding:5px 0;border-radius:5px;background:var(--idm-gray-light)}.active-tropical .main-box .row[data-v-d9e29e39]{width:100%;padding:4px 10px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col[data-v-d9e29e39]{display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col label[data-v-d9e29e39]{width:82px;margin-right:4px;color:var(--idm-info-color)}.active-tropical .main-box .row .col.col-24[data-v-d9e29e39]{width:100%}.active-tropical .main-box .row .col.col-left[data-v-d9e29e39]{width:55%}.active-tropical .main-box .row .col.col-right[data-v-d9e29e39]{width:40%}.active-tropical .main-box .row .col .icon[data-v-d9e29e39]{font-size:30px;color:var(--idm-black-4)}.active-tropical .main-box .row .col .icon.active[data-v-d9e29e39]{color:var(--idm-primary-color)}.forecast-models[data-v-d9e29e39]{display:flex;justify-content:flex-end;flex:1;margin-left:5px;flex-wrap:wrap}.forecast-models .model[data-v-d9e29e39]{font-size:12px;padding:0 6px 4px;display:flex;border:1px solid var(--idm-primary-color)}.forecast-models .model span[data-v-d9e29e39]{border-bottom:2px dashed var(--idm-white)}.forecast-models .model span.cma[data-v-d9e29e39]{border-color:#e2ea03cc}.forecast-models .model span.jma[data-v-d9e29e39]{border-color:#01d2b7cc}.forecast-models .model span.ecmwf[data-v-d9e29e39]{border-color:#f582f2cc}.forecast-models .model span.ukm[data-v-d9e29e39]{border-color:#f5bb47cc}.forecast-models .model span.noaa-at[data-v-d9e29e39],.forecast-models .model span.noaa-ep[data-v-d9e29e39]{border-color:#9758fbcc}.forecast-models .model.active[data-v-d9e29e39]{border:1px solid var(--idm-primary-color);background-color:var(--idm-primary-color);color:var(--idm-white)}.forecast-models .model[data-v-d9e29e39]:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.forecast-models .model.center-child[data-v-d9e29e39]{border-left:1px solid var(--idm-primary-color);border-right:1px solid var(--idm-primary-color)}.forecast-models .model[data-v-d9e29e39]:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.legend[data-v-d9e29e39]{display:flex;align-items:center;color:var(--idm-info-color)}.legend .icon[data-v-d9e29e39]{height:14px;width:14px;border-radius:50%;border:3px solid #fff;margin-right:3px}.legend .icon.td[data-v-d9e29e39]{background-color:var(--idm-tropicals-td)}.legend .icon.ts[data-v-d9e29e39]{background-color:var(--idm-tropicals-ts)}.legend .icon.sts[data-v-d9e29e39]{background-color:var(--idm-tropicals-sts)}.legend .icon.ty[data-v-d9e29e39]{background-color:var(--idm-tropicals-ty)}.legend .icon.sty[data-v-d9e29e39]{background-color:var(--idm-tropicals-sty)}.legend .icon.supper-ty[data-v-d9e29e39]{background-color:var(--idm-tropicals-super-ty)}.legend .icon.r7[data-v-d9e29e39]{border:1.5px solid var(--idm-tropicals-r7)}.legend .icon.r10[data-v-d9e29e39]{border:1.5px solid var(--idm-tropicals-r10)}.legend .icon.history[data-v-d9e29e39]{border:none;border-radius:0;height:4px;background:var(--idm-black-5)}.legend .button[data-v-d9e29e39]{cursor:pointer;padding:0 4px;border-radius:4px;border:1px solid var(--idm-primary-color);color:var(--idm-primary-color)}.more[data-v-d9e29e39]{display:flex;align-items:center;justify-content:flex-end;color:var(--idm-primary-color);font-weight:700;margin-top:5px}.legend-bars[data-v-dec867b8]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgba(59,126,162,0),rgb(172,210,255),rgb(172,210,255),rgb(3,248,103),rgb(14,201,3),rgb(190,226,2),rgb(248,1,1),rgb(197,5,58),rgb(197,5,58));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-dec867b8]{font-size:12px;text-align:center;color:var(--idm-white);width:35px}.legend-bars[data-v-952dee5c]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(189,50,160),rgb(189,50,160),rgb(189,50,160),rgb(189,50,160),rgb(208,56,56),rgb(208,56,56),rgb(190,226,2),rgb(190,226,2),rgb(4,210,64),rgb(4,210,64),rgb(172,210,255),rgb(172,210,255));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-952dee5c]{font-size:12px;text-align:center;color:var(--idm-white);width:40px}.legend-bars[data-v-67e5094b]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(95,143,197),rgb(95,143,197),rgb(95,143,197),rgb(95,143,197),rgb(80,140,62),rgb(121,146,28),rgb(171,161,14),rgb(223,177,6),rgb(243,150,6),rgb(236,95,21),rgb(190,65,18),rgb(138,43,10),rgb(138,43,10));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-67e5094b]{font-size:12px;text-align:center;color:var(--idm-white);width:32px}.legend-bars[data-v-389ea886]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(149,137,211),rgb(149,137,211),rgb(149,137,211),rgb(149,137,211),rgb(150,209,216),rgb(129,204,197),rgb(103,180,186),rgb(95,143,197),rgb(80,140,62),rgb(121,146,28),rgb(171,161,14),rgb(223,177,6),rgb(243,150,6),rgb(236,95,21),rgb(190,65,18),rgb(138,43,10),rgb(138,43,10));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-389ea886]{font-size:12px;text-align:center;color:var(--idm-white);width:32px}.legend-bars[data-v-db805141]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(76,165,228),rgb(76,165,228),rgb(76,165,228),rgb(76,165,228),rgb(103,180,186),rgb(129,204,197),rgb(150,209,216),rgb(180,209,216));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-db805141]{font-size:12px;text-align:center;color:var(--idm-white);width:40px}.point-meteo[data-v-22c5d8c1]{bottom:unset}.point-meteo .meteo-box[data-v-22c5d8c1]{position:absolute;color:var(--idm-black-8);top:0;left:5px;padding:10px;background-color:var(--idm-white-9);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);width:260px;border-top-right-radius:5px;border-bottom-right-radius:5px;box-shadow:0 2px 12px #0003;z-index:2}.point-meteo .meteo-box .header-box[data-v-22c5d8c1]{margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.point-meteo .meteo-box .header-box .close[data-v-22c5d8c1]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.point-meteo .meteo-box .header-box .main[data-v-22c5d8c1]{font-size:16px}.point-meteo .meteo-box .header-box .sub[data-v-22c5d8c1]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.point-meteo .meteo-box .main-box[data-v-22c5d8c1]{padding:0 5px;border-radius:5px;background:var(--idm-gray-light)}.point-meteo .meteo-box .main-box .flex-space[data-v-22c5d8c1]{padding:3px 0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--idm-white);box-sizing:border-box}.point-meteo .meteo-box .main-box .flex-space label[data-v-22c5d8c1]{color:var(--idm-black-8)}.point-meteo .meteo-box .main-box .flex-space label[data-v-22c5d8c1]:after{content:":"}.point-meteo .meteo-box .main-box .flex-space[data-v-22c5d8c1]:last-child{border-bottom:none}.point-meteo .meteo-box .more[data-v-22c5d8c1]{margin-top:5px;color:var(--idm-primary-color);font-weight:700;cursor:pointer}.point-meteo[data-v-22c5d8c1]:after{display:block;width:8px;height:8px;border-radius:50%;content:"";background-color:var(--idm-white-9);margin-bottom:360px}.point-meteo[data-v-22c5d8c1]:before{display:block;content:"";width:2px;height:360px;margin-left:3px;border-left:2px solid var(--idm-white-9)}#zone-info[data-v-c0864afc]{position:absolute;background:var(--idm-white);color:var(--idm-black-8);z-index:10}#zone-info .rich-context[data-v-c0864afc]{width:100vw;height:100vh;padding:10px;font-size:14px;font-weight:400;color:var(--idm-black-8)!important;overflow-y:auto}#zone-info .close[data-v-c0864afc]{position:relative;color:var(--idm-info-color-light2);font-size:24px;height:0;text-align:right;margin:5px 5px 0 0}#port-info[data-v-4ab013cc]{position:absolute;background:var(--idm-white);color:var(--idm-black-8);padding:10px;border-radius:6px;cursor:default;z-index:1000;height:fit-content}#port-info .port-box[data-v-4ab013cc]{margin-top:10px;max-width:240px}#port-info .port-box .flex-start[data-v-4ab013cc]{line-height:2}#port-info .port-box .flex-start label[data-v-4ab013cc]{color:var(--idm-info-color);margin-right:10px;width:50px}#port-info .port-box .flex-start span[data-v-4ab013cc]{flex:1;flex-wrap:wrap;text-align:justify-all;color:var(--idm-black-8)}#port-info .port-box .flex-start span.link[data-v-4ab013cc]{cursor:pointer;text-decoration:underline}#port-info .port-box .flex-start span.link[data-v-4ab013cc]:hover{font-weight:600}#port-info .close[data-v-4ab013cc]{position:relative;text-align:right;height:0px;color:var(--idm-info-color-light2);font-size:24px}.lat-lng-tip[data-v-7367f59b]{position:absolute;padding:2px 10px;border-radius:5px;color:var(--idm-primary-color);font-size:12px;top:unset;background:var(--idm-white);box-shadow:0 2px 12px #0003;transition:all .4s ease-in-out}.menu-bar-box[data-v-ab627b83]{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;transition:all .4s ease-in-out}.menu-bar-box .bar-item[data-v-ab627b83]{position:relative;margin-bottom:15px;border-radius:5px;background:var(--idm-white);cursor:pointer;box-shadow:0 2px 12px #0003}.menu-bar-box .bar-item .menu-icon[data-v-ab627b83]{padding:8px;display:flex}.menu-bar-box .bar-item .menu-icon[data-v-ab627b83]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.menu-bar-box .bar-item .menu-icon[data-v-ab627b83]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.menu-bar-box .bar-item .menu-icon span[data-v-ab627b83]{font-size:18px;font-weight:500;color:var(--idm-black-8)}.menu-bar-box .bar-item .menu-icon.active[data-v-ab627b83]{background:var(--idm-primary-color)}.menu-bar-box .bar-item .menu-icon.active span[data-v-ab627b83]{color:var(--idm-white)}:root{--idm-gl-box-shadow-color: rgba(0, 0, 0, .5);--idm-gl-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, .04), 0px 8px 20px rgba(0, 0, 0, .08);--idm-gl-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, .12);--idm-gl-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, .12);--idm-gl-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, .08), 0px 12px 32px rgba(0, 0, 0, .12), 0px 8px 16px -8px rgba(0, 0, 0, .16)}.point-marker{pointer-events:none!important}.point-marker .marker-circle{pointer-events:inherit;width:12px;height:12px;border-radius:50%;border:2px solid var(--idm-white);background:var(--idm-danger-color)}.point-marker .marker-circle:hover{cursor:pointer}.point-marker.closed{pointer-events:auto!important}.point-summary-marker,.point-contextmenu-marker{color:var(--idm-white);font-size:12px;background:var(--idm-danger-color);border:2px solid var(--idm-white);padding:2px 5px;border-radius:5px;cursor:pointer}.point-summary-marker .marker-close,.point-contextmenu-marker .marker-close{pointer-events:auto;position:absolute;background:var(--idm-danger-color);border:1px dashed var(--idm-white);display:flex;align-items:center;justify-content:center;width:20px;height:20px;right:-17px;top:-17px;cursor:pointer;font-size:20px}.tip-marker{color:var(--idm-white);font-size:12px;text-shadow:var(--idm-text-shadow);background-color:var(--idm-black-6);padding:2px 5px;border-radius:5px;cursor:pointer}.tip-marker .marker-label{border-bottom:var(--idm-dashed-border)}.tip-marker .marker-label:last-child{border-bottom:none}.tip-marker .marker-label b{font-weight:600;color:var(--idm-danger-color)}.hurricane-hourly-marker .iconfont{font-size:34px!important;color:var(--idm-danger-color)}.hurricane-hourly-marker svg{height:34px;width:34px}.hurricane-hourly-marker .center{box-sizing:border-box;display:flex;align-items:center;justify-content:center}.hurricane-hourly-marker .center.north{animation:anticlockwise 2s linear infinite}.hurricane-hourly-marker .center.south{animation:clockwise 2s linear infinite}@keyframes clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes anticlockwise{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}
1
+ @charset "UTF-8";:root{--idm-white: rgba(255, 255, 255, 1);--idm-white-9: rgba(255, 255, 255, .9);--idm-white-8: rgba(255, 255, 255, .8);--idm-white-7: rgba(255, 255, 255, .7);--idm-white-6: rgba(255, 255, 255, .6);--idm-white-5: rgba(255, 255, 255, .5);--idm-white-4: rgba(255, 255, 255, .4);--idm-white-3: rgba(255, 255, 255, .3);--idm-white-2: rgba(255, 255, 255, .2);--idm-white-1: rgba(255, 255, 255, .1);--idm-black: rgba(0, 0, 0, 1);--idm-black-9: rgba(0, 0, 0, .9);--idm-black-8: rgba(0, 0, 0, .8);--idm-black-7: rgba(0, 0, 0, .7);--idm-black-6: rgba(0, 0, 0, .6);--idm-black-5: rgba(0, 0, 0, .5);--idm-black-4: rgba(0, 0, 0, .4);--idm-black-3: rgba(0, 0, 0, .3);--idm-black-2: rgba(0, 0, 0, .2);--idm-black-1: rgba(0, 0, 0, .1);--idm-gray-light: rgba(239, 239, 239, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6c8ad9;--idm-primary-color-light2: #a7c4ff;--idm-primary-color-dark: #053a7e;--idm-primary-color-dark2: #002e6b;--idm-primary-color-9: rgba(42, 87, 183, .9);--idm-primary-color-8: rgba(42, 87, 183, .8);--idm-primary-color-7: rgba(42, 87, 183, .7);--idm-primary-color-6: rgba(42, 87, 183, .6);--idm-primary-color-5: rgba(42, 87, 183, .5);--idm-primary-color-4: rgba(42, 87, 183, .4);--idm-primary-color-3: rgba(42, 87, 183, .3);--idm-primary-color-2: rgba(42, 87, 183, .2);--idm-primary-color-1: rgba(42, 87, 183, .1);--idm-success-color: #0ddd9f;--idm-success-color-light: #92f7d9;--idm-success-color-dark: #06a074;--idm-success-color-dark2: #06694c;--idm-warning-color: #ff9500;--idm-warning-color-light: #ffcc00;--idm-warning-color-dark: #c77402;--idm-danger-color: #f44336;--idm-danger-color-light: #fb796e;--idm-danger-color-dark: #ad251b;--idm-info-color: #6e6e6e;--idm-info-color-light: #969696;--idm-info-color-light2: #c0c0c0;--idm-info-color-light3: #e2e2e2;--idm-info-color-dark: #494949;--idm-dangerous: #f44336;--idm-severe: #ff9500;--idm-heavy: #ffff00;--idm-vessel-cargo-color: lightgreen;--idm-vessel-tanker-color: red;--idm-vessel-passenger-color: blue;--idm-vessel-other-color: lightgrey;--idm-perf-cii-a: var(--idm-success-color);--idm-perf-cii-b: var(--idm-success-color-light);--idm-perf-cii-c: var(--idm-warning-color);--idm-perf-cii-d: var(--idm-danger-color-light);--idm-perf-cii-e: var(--idm-danger-color);--idm-tropicals-td: #03f869;--idm-tropicals-ts: #f2f202;--idm-tropicals-sts: #ff9100;--idm-tropicals-ty: #f44336;--idm-tropicals-sty: #f903d0;--idm-tropicals-super-ty: #8702f9;--idm-tropicals-r7: #ff9100;--idm-tropicals-r10: #f44336;--idm-text-shadow: 0px 0px 4px rgba(0, 0, 0, 1);--idm-dashed-border: 1px dashed var(--idm-white-5);--idm-solid-border: 1px solid var(--idm-white-4);--idm-background-color: var(--idm-primary-color-9);--idm-background-color-dark: var(--idm-primary-color-dark);--idm-background-color-light: var(--idm-primary-color-light);--idm-background-color-light2: #f3f5f8;--idm-active-background-light: linear-gradient(130deg, rgba(142, 163, 255, .93) 20%, rgb(90 67 193 / 93%) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(41, 32, 165) 0%, rgba(44, 93, 184) 80%, rgba(32, 90, 165) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-blink-animation: blink .8s ease-out infinite alternate}:root[colorTheme=black]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .8) 80%, rgb(0, 0, 0, .8) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-right: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-background-linear-gradient-left: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .7) 70%, rgb(0, 0, 0, .7) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(117, 117, 117, .93) 30%, rgba(200, 200, 200, .93) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(253, 253, 253), 0 0 21px rgb(226, 226, 226), 0 0 30px rgba(185, 185, 185, .4), 0 0 12px rgba(67, 67, 67, .6), 0 0 22px rgba(27, 27, 27, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(0, 0, 0, .7);--idm-primary-color-light: #757575;--idm-primary-color-light2: #a5a5a5;--idm-primary-color-dark: rgba(0, 0, 0, .8);--idm-primary-color-dark2: rgba(0, 0, 0, 1);--idm-primary-color-9: rgba(0, 0, 0, .9);--idm-primary-color-7: rgba(0, 0, 0, .7);--idm-primary-color-5: rgba(0, 0, 0, .5);--idm-primary-color-3: rgba(0, 0, 0, .3);--idm-primary-color-1: rgba(0, 0, 0, .1)}:root[colorTheme=blue]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(41, 32, 165) 0%, rgba(44, 93, 184) 80%, rgba(32, 90, 165) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(19, 23, 152, .85) 0%, rgba(44, 93, 184, .85) 80%, rgba(64, 110, 196, .85) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(142, 163, 255, .93) 20%, rgb(90 67 193 / 93%) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6c8ad9;--idm-primary-color-light2: #a7c4ff;--idm-primary-color-dark: #053a7e;--idm-primary-color-dark2: #002e6b;--idm-primary-color-9: rgba(42, 87, 183, .9);--idm-primary-color-8: rgba(42, 87, 183, .8);--idm-primary-color-7: rgba(42, 87, 183, .7);--idm-primary-color-6: rgba(42, 87, 183, .6);--idm-primary-color-5: rgba(42, 87, 183, .5);--idm-primary-color-4: rgba(42, 87, 183, .4);--idm-primary-color-3: rgba(42, 87, 183, .3);--idm-primary-color-2: rgba(42, 87, 183, .2);--idm-primary-color-1: rgba(42, 87, 183, .1)}:root[colorTheme=dark-blue]{--idm-background-opaque-linear-gradient-top: linear-gradient(to top, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-top: linear-gradient(to top, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-bottom: linear-gradient(to bottom, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-right: linear-gradient(to right, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-background-linear-gradient-left: linear-gradient(to left, rgba(16, 22, 79, .85) 0%, rgba(15, 41, 89, .85) 80%, rgba(19, 47, 108, .85) 100%);--idm-active-background-light: linear-gradient(130deg, rgba(104, 104, 226, .93) 20%, rgba(22, 49, 182, .93) 100%);--idm-active-text-shadow-light: 0 0 7px rgb(194, 255, 247), 0 0 21px rgb(194, 255, 247), 0 0 30px rgba(182, 211, 207, .4), 0 0 12px rgba(15, 115, 223, .6), 0 0 22px rgba(15, 115, 223, .8), 0 0 38px rgba(15, 115, 223, .9), 0 0 60px rgba(15, 115, 223, 1);--idm-primary-color: rgba(42, 87, 183, 1);--idm-primary-color-light: #6266e0;--idm-primary-color-light2: #89b0ff;--idm-primary-color-dark: #00224e;--idm-primary-color-dark2: #021a39;--idm-primary-color-9: rgba(19, 47, 108, .9);--idm-primary-color-7: rgba(19, 47, 108, .7);--idm-primary-color-5: rgba(19, 47, 108, .5);--idm-primary-color-3: rgba(19, 47, 108, .3);--idm-primary-color-1: rgba(19, 47, 108, .1)}@font-face{font-family:iconfont;src:url(https://iconfont.idmwx.com/iconfont.woff2) format("woff2"),url(https://iconfont.idmwx.com/iconfont.woff) format("woff"),url(https://iconfont.idmwx.com/iconfont.ttf) format("truetype"),url(https://iconfont.idmwx.com/iconfont.svg?#iconfont) format("svg")}.iconfont{font-family:iconfont!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box;margin:0}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flex-start{display:flex;align-items:center;justify-content:flex-start}.flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-center{display:flex;align-items:center;justify-content:center}.flex-between,.flex-space{display:flex;align-items:center;justify-content:space-between}.flex-around{display:flex;align-items:center;justify-content:space-around}.flex-evenly{display:flex;align-items:center;justify-content:space-evenly}.flex-col-center-center{display:flex;flex-direction:column;justify-content:center;align-items:center}.flex-col-start-center{display:flex;flex-direction:column;justify-content:flex-start;align-items:center}.flex-col-end-center{display:flex;flex-direction:column;justify-content:flex-end;align-items:center}.flex-col-between-center{display:flex;flex-direction:column;justify-content:space-between;align-items:center}.flex-col-around-center{display:flex;flex-direction:column;justify-content:space-around;align-items:center}.flex-col-center-start{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.flex-col-center-end{display:flex;flex-direction:column;justify-content:center;align-items:flex-end}.flex{flex:1}.dropdown{position:relative;display:inline-block!important}.dropdown .dropdown-content{display:none;position:absolute;z-index:1}.dropdown:hover .dropdown-content{display:block}.loading{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--idm-black-5);z-index:1000;display:flex;justify-content:center;align-items:center;flex-direction:column}.loading i{font-size:30px;color:var(--idm-white);margin-bottom:16px;animation:rotate 2s linear infinite}.loading div{color:var(--idm-white);font-size:16px}@keyframes blink{0%{box-shadow:0 0 20px var(--idm-warning-color-dark) inset}to{box-shadow:0 0 20px var(--idm-success-color) inset}}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.idm-gl3-layer .fade-enter-active,.idm-gl3-layer .fade-leave-active{transition:opacity .4s}.idm-gl3-layer .fade-enter,.idm-gl3-layer .fade-leave-to{opacity:0}.idm-gl3-layer .menu-bar-box{position:absolute;overflow-y:hidden;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;transition:all .4s ease-in-out;z-index:2;border-radius:5px;box-shadow:0 2px 12px #0003}.idm-gl3-layer .menu-bar-box .bar-item{position:relative;border-radius:5px;background:var(--idm-white);cursor:pointer}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon{padding:8px;display:flex}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon span{font-size:20px;font-weight:600;color:var(--idm-black-8)}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon.active{background:var(--idm-primary-color)}.idm-gl3-layer .menu-bar-box .bar-item .menu-icon.active span{color:var(--idm-white)}.idm-gl3-layer .layer{cursor:pointer;display:inline-flex;align-items:center;padding:5px 0}.idm-gl3-layer .layer.disabled{cursor:not-allowed}.idm-gl3-layer .layer.disabled span{color:var(--idm-black-4)}.idm-gl3-layer .layer.disabled .checkbox{border:1px solid var(--idm-black-2)}.idm-gl3-layer .layer.active .checkbox{border:var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl3-layer .layer.active .checkbox:after{content:"✔";color:var(--idm-white);font-size:12px;display:flex;align-items:center;justify-content:center}.idm-gl3-layer .layer.active span{color:var(--idm-primary-color)}.idm-gl3-layer .layer .checkbox{width:16px;height:16px;margin-right:4px;border:1px solid var(--idm-black-8)}.idm-gl3-layer .layer span{color:var(--idm-black-8);font-size:14px;width:max-content}.idm-gl3-layer .other-bars{position:absolute;top:36px;border-radius:5px;background:var(--idm-background-linear-gradient-top);box-shadow:0 2px 12px #0003}.idm-gl3-layer .active-layers{position:absolute;max-width:250px;min-width:200px;display:flex;flex-wrap:wrap;align-items:center;background:var(--idm-white);border-radius:5px;box-shadow:0 2px 12px #0003;transition:all .4s ease-in-out}.idm-gl3-layer .active-layers .layer{width:auto;padding:5px}.idm-gl3-layer .available-layers{position:absolute;height:calc(100vh - 120px);box-sizing:border-box;transition:all .4s ease-in-out}.idm-gl3-layer .available-layers .side-bar{margin:0 10px;box-sizing:border-box}.idm-gl3-layer .available-layers .side-bar i{padding:15px 1px;background:var(--idm-white-7);border-radius:5px;cursor:pointer;font-size:18px;font-weight:600;color:var(--idm-black);box-shadow:0 2px 12px #0003}.idm-gl3-layer .available-layers .list-box{height:inherit;width:200px;padding:10px 0;overflow-y:auto;color:var(--idm-black-8);background:var(--idm-white);display:flex;flex-direction:column;box-shadow:0 2px 12px #0003;z-index:1}.idm-gl3-layer .available-layers .list-box .layers-title{font-size:16px;font-weight:600;padding:0 10px 10px;color:var(--idm-black-8);border-bottom:var(--idm-dashed-border)}.idm-gl3-layer .available-layers .list-box .layers-body{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;padding:0 10px;font-size:14px}.idm-gl3-layer .available-layers .list-box .layers-body .layer{width:140px}.idm-gl3-layer .available-layers .list-box .model-box{display:flex;align-items:center;justify-content:flex-start;margin:10px 0;cursor:pointer}.idm-gl3-layer .available-layers .list-box .model-box span{padding:3px 10px;border:1px solid #cecece}.idm-gl3-layer .available-layers .list-box .model-box span.active{color:var(--idm-white);border:1px solid var(--idm-primary-color);background:var(--idm-primary-color)}.idm-gl3-layer .available-layers .list-box .model-box span:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.idm-gl3-layer .available-layers .list-box .model-box span:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px;border-left:none}.tool-bars[data-v-b6fb74d9]{transition:all .4s ease-in-out}.tool-bars i[data-v-b6fb74d9]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-b6fb74d9]{color:var(--idm-white)}.tool-bars span[data-v-b6fb74d9]{cursor:pointer;font-size:12px;color:var(--idm-black-8);margin-left:4px;background:var(--idm-white-8);padding:2px 4px;border-radius:5px;box-shadow:0 2px 12px #0003}.tool-bars span.active[data-v-b6fb74d9]{color:var(--idm-white);background:var(--idm-primary-color)}.legend-bars[data-v-41a686d0]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(98,113,184),rgb(98,113,184),rgb(98,113,184),rgb(98,113,184),rgb(61,110,163),rgb(74,148,170),rgb(74,146,148),rgb(77,142,124),rgb(76,164,76),rgb(103,164,54),rgb(162,135,64),rgb(162,109,92),rgb(141,63,92),rgb(151,75,145),rgb(95,100,160),rgb(91,136,161),rgb(91,136,161));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-41a686d0]{font-size:12px;text-align:center;color:var(--idm-white-8);width:32px}.tool-bars[data-v-ae630f43]{transition:all .4s ease-in-out}.tool-bars i[data-v-ae630f43]{cursor:pointer;font-size:30px;color:var(--idm-white-8);text-shadow:var(--idm-text-shadow)}.tool-bars i.active[data-v-ae630f43]{color:var(--idm-white)}.tool-bars span[data-v-ae630f43]{cursor:pointer;font-size:12px;color:var(--idm-black-8);margin-left:4px;background:var(--idm-white-8);padding:2px 4px;border-radius:5px;box-shadow:0 2px 12px #0003}.tool-bars span.active[data-v-ae630f43]{color:var(--idm-white);background:var(--idm-primary-color)}.legend-bars[data-v-9115889b]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(84,170,230),rgb(84,170,230),rgb(84,170,230),rgb(84,170,230),rgb(64,127,115),rgb(58,164,58),rgb(191,182,67),rgb(197,154,68),rgb(160,70,94),rgb(138,84,166),rgb(82,113,165),rgb(84,142,152),rgb(150,181,184),rgb(195,194,194),rgb(195,194,194));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-9115889b]{font-size:12px;text-align:center;color:var(--idm-white);width:36px}.active-tropical[data-v-b521de47]{bottom:unset;background:var(--idm-white-9);padding:10px;border-radius:5px;box-shadow:0 2px 12px #0003;z-index:5}.active-tropical .header-box[data-v-b521de47]{min-width:360px;margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.active-tropical .header-box .close-btn[data-v-b521de47]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.active-tropical .header-box .main[data-v-b521de47]{font-size:16px}.active-tropical .header-box .sub[data-v-b521de47]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.active-tropical .main-box[data-v-b521de47]{min-width:360px;color:var(--idm-black-8);overflow-y:auto;box-sizing:border-box;font-size:12px;z-index:4}.active-tropical .main-box .content[data-v-b521de47]{padding:5px 0;border-radius:5px;background:var(--idm-gray-light)}.active-tropical .main-box .row[data-v-b521de47]{width:100%;padding:4px 10px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col[data-v-b521de47]{display:flex;align-items:center;justify-content:space-between}.active-tropical .main-box .row .col label[data-v-b521de47]{width:82px;margin-right:4px;color:var(--idm-info-color)}.active-tropical .main-box .row .col.col-24[data-v-b521de47]{width:100%}.active-tropical .main-box .row .col.col-left[data-v-b521de47]{width:55%}.active-tropical .main-box .row .col.col-right[data-v-b521de47]{width:40%}.active-tropical .main-box .row .col .icon[data-v-b521de47]{font-size:30px;color:var(--idm-black-4)}.active-tropical .main-box .row .col .icon.active[data-v-b521de47]{color:var(--idm-primary-color)}.forecast-models[data-v-b521de47]{display:flex;justify-content:flex-end;flex:1;margin-left:5px;flex-wrap:wrap}.forecast-models .model[data-v-b521de47]{font-size:12px;padding:0 6px 4px;display:flex;border:1px solid var(--idm-primary-color)}.forecast-models .model span[data-v-b521de47]{border-bottom:2px dashed var(--idm-white)}.forecast-models .model span.cma[data-v-b521de47]{border-color:#e2ea03cc}.forecast-models .model span.jma[data-v-b521de47]{border-color:#01d2b7cc}.forecast-models .model span.ecmwf[data-v-b521de47]{border-color:#f582f2cc}.forecast-models .model span.ukm[data-v-b521de47]{border-color:#f5bb47cc}.forecast-models .model span.noaa-at[data-v-b521de47],.forecast-models .model span.noaa-ep[data-v-b521de47]{border-color:#9758fbcc}.forecast-models .model.active[data-v-b521de47]{border:1px solid var(--idm-primary-color);background-color:var(--idm-primary-color);color:var(--idm-white)}.forecast-models .model[data-v-b521de47]:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.forecast-models .model.center-child[data-v-b521de47]{border-left:1px solid var(--idm-primary-color);border-right:1px solid var(--idm-primary-color)}.forecast-models .model[data-v-b521de47]:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.legend[data-v-b521de47]{display:flex;align-items:center;color:var(--idm-info-color)}.legend .icon[data-v-b521de47]{height:14px;width:14px;border-radius:50%;border:3px solid #fff;margin-right:3px}.legend .icon.td[data-v-b521de47]{background-color:var(--idm-tropicals-td)}.legend .icon.ts[data-v-b521de47]{background-color:var(--idm-tropicals-ts)}.legend .icon.sts[data-v-b521de47]{background-color:var(--idm-tropicals-sts)}.legend .icon.ty[data-v-b521de47]{background-color:var(--idm-tropicals-ty)}.legend .icon.sty[data-v-b521de47]{background-color:var(--idm-tropicals-sty)}.legend .icon.supper-ty[data-v-b521de47]{background-color:var(--idm-tropicals-super-ty)}.legend .icon.r7[data-v-b521de47]{border:1.5px solid var(--idm-tropicals-r7)}.legend .icon.r10[data-v-b521de47]{border:1.5px solid var(--idm-tropicals-r10)}.legend .icon.history[data-v-b521de47]{border:none;border-radius:0;height:4px;background:var(--idm-black-5)}.legend .button[data-v-b521de47]{cursor:pointer;padding:0 4px;border-radius:4px;border:1px solid var(--idm-primary-color);color:var(--idm-primary-color)}.more[data-v-b521de47]{display:flex;align-items:center;justify-content:flex-end;color:var(--idm-primary-color);font-weight:700;margin-top:5px}.legend-bars[data-v-dec867b8]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgba(59,126,162,0),rgb(172,210,255),rgb(172,210,255),rgb(3,248,103),rgb(14,201,3),rgb(190,226,2),rgb(248,1,1),rgb(197,5,58),rgb(197,5,58));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-dec867b8]{font-size:12px;text-align:center;color:var(--idm-white);width:35px}.legend-bars[data-v-952dee5c]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(189,50,160),rgb(189,50,160),rgb(189,50,160),rgb(189,50,160),rgb(208,56,56),rgb(208,56,56),rgb(190,226,2),rgb(190,226,2),rgb(4,210,64),rgb(4,210,64),rgb(172,210,255),rgb(172,210,255));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-952dee5c]{font-size:12px;text-align:center;color:var(--idm-white);width:40px}.legend-bars[data-v-67e5094b]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(95,143,197),rgb(95,143,197),rgb(95,143,197),rgb(95,143,197),rgb(80,140,62),rgb(121,146,28),rgb(171,161,14),rgb(223,177,6),rgb(243,150,6),rgb(236,95,21),rgb(190,65,18),rgb(138,43,10),rgb(138,43,10));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-67e5094b]{font-size:12px;text-align:center;color:var(--idm-white);width:32px}.legend-bars[data-v-389ea886]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(149,137,211),rgb(149,137,211),rgb(149,137,211),rgb(149,137,211),rgb(150,209,216),rgb(129,204,197),rgb(103,180,186),rgb(95,143,197),rgb(80,140,62),rgb(121,146,28),rgb(171,161,14),rgb(223,177,6),rgb(243,150,6),rgb(236,95,21),rgb(190,65,18),rgb(138,43,10),rgb(138,43,10));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-389ea886]{font-size:12px;text-align:center;color:var(--idm-white);width:32px}.legend-bars[data-v-db805141]{transition:all .4s ease-in-out;background:linear-gradient(to right,rgb(76,165,228),rgb(76,165,228),rgb(76,165,228),rgb(76,165,228),rgb(103,180,186),rgb(129,204,197),rgb(150,209,216),rgb(180,209,216));padding:2px 0;border-radius:10px;box-shadow:var(--idm-gl-box-shadow)}.legend-bars span[data-v-db805141]{font-size:12px;text-align:center;color:var(--idm-white);width:40px}.point-meteo[data-v-22c5d8c1]{bottom:unset}.point-meteo .meteo-box[data-v-22c5d8c1]{position:absolute;color:var(--idm-black-8);top:0;left:5px;padding:10px;background-color:var(--idm-white-9);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);width:260px;border-top-right-radius:5px;border-bottom-right-radius:5px;box-shadow:0 2px 12px #0003;z-index:2}.point-meteo .meteo-box .header-box[data-v-22c5d8c1]{margin-bottom:10px;box-sizing:border-box;color:var(--idm-black-8)}.point-meteo .meteo-box .header-box .close[data-v-22c5d8c1]{position:relative;height:0px;text-align:right;font-size:22px;color:var(--idm-primary-color)}.point-meteo .meteo-box .header-box .main[data-v-22c5d8c1]{font-size:16px}.point-meteo .meteo-box .header-box .sub[data-v-22c5d8c1]{margin:3px 0;font-size:12px;color:var(--idm-info-color)}.point-meteo .meteo-box .main-box[data-v-22c5d8c1]{padding:0 5px;border-radius:5px;background:var(--idm-gray-light)}.point-meteo .meteo-box .main-box .flex-space[data-v-22c5d8c1]{padding:3px 0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--idm-white);box-sizing:border-box}.point-meteo .meteo-box .main-box .flex-space label[data-v-22c5d8c1]{color:var(--idm-black-8)}.point-meteo .meteo-box .main-box .flex-space label[data-v-22c5d8c1]:after{content:":"}.point-meteo .meteo-box .main-box .flex-space[data-v-22c5d8c1]:last-child{border-bottom:none}.point-meteo .meteo-box .more[data-v-22c5d8c1]{margin-top:5px;color:var(--idm-primary-color);font-weight:700;cursor:pointer}.point-meteo[data-v-22c5d8c1]:after{display:block;width:8px;height:8px;border-radius:50%;content:"";background-color:var(--idm-white-9);margin-bottom:360px}.point-meteo[data-v-22c5d8c1]:before{display:block;content:"";width:2px;height:360px;margin-left:3px;border-left:2px solid var(--idm-white-9)}#zone-info[data-v-c0864afc]{position:absolute;background:var(--idm-white);color:var(--idm-black-8);z-index:10}#zone-info .rich-context[data-v-c0864afc]{width:100vw;height:100vh;padding:10px;font-size:14px;font-weight:400;color:var(--idm-black-8)!important;overflow-y:auto}#zone-info .close[data-v-c0864afc]{position:relative;color:var(--idm-info-color-light2);font-size:24px;height:0;text-align:right;margin:5px 5px 0 0}#port-info[data-v-4ab013cc]{position:absolute;background:var(--idm-white);color:var(--idm-black-8);padding:10px;border-radius:6px;cursor:default;z-index:1000;height:fit-content}#port-info .port-box[data-v-4ab013cc]{margin-top:10px;max-width:240px}#port-info .port-box .flex-start[data-v-4ab013cc]{line-height:2}#port-info .port-box .flex-start label[data-v-4ab013cc]{color:var(--idm-info-color);margin-right:10px;width:50px}#port-info .port-box .flex-start span[data-v-4ab013cc]{flex:1;flex-wrap:wrap;text-align:justify-all;color:var(--idm-black-8)}#port-info .port-box .flex-start span.link[data-v-4ab013cc]{cursor:pointer;text-decoration:underline}#port-info .port-box .flex-start span.link[data-v-4ab013cc]:hover{font-weight:600}#port-info .close[data-v-4ab013cc]{position:relative;text-align:right;height:0px;color:var(--idm-info-color-light2);font-size:24px}.lat-lng-tip[data-v-7367f59b]{position:absolute;padding:2px 10px;border-radius:5px;color:var(--idm-primary-color);font-size:12px;top:unset;background:var(--idm-white);box-shadow:0 2px 12px #0003;transition:all .4s ease-in-out}.menu-bar-box[data-v-ab627b83]{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;transition:all .4s ease-in-out}.menu-bar-box .bar-item[data-v-ab627b83]{position:relative;margin-bottom:15px;border-radius:5px;background:var(--idm-white);cursor:pointer;box-shadow:0 2px 12px #0003}.menu-bar-box .bar-item .menu-icon[data-v-ab627b83]{padding:8px;display:flex}.menu-bar-box .bar-item .menu-icon[data-v-ab627b83]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.menu-bar-box .bar-item .menu-icon[data-v-ab627b83]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.menu-bar-box .bar-item .menu-icon span[data-v-ab627b83]{font-size:18px;font-weight:500;color:var(--idm-black-8)}.menu-bar-box .bar-item .menu-icon.active[data-v-ab627b83]{background:var(--idm-primary-color)}.menu-bar-box .bar-item .menu-icon.active span[data-v-ab627b83]{color:var(--idm-white)}:root{--idm-gl-box-shadow-color: rgba(0, 0, 0, .5);--idm-gl-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, .04), 0px 8px 20px rgba(0, 0, 0, .08);--idm-gl-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, .12);--idm-gl-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, .12);--idm-gl-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, .08), 0px 12px 32px rgba(0, 0, 0, .12), 0px 8px 16px -8px rgba(0, 0, 0, .16)}.point-marker{pointer-events:none!important}.point-marker .marker-circle{pointer-events:inherit;width:12px;height:12px;border-radius:50%;border:2px solid var(--idm-white);background:var(--idm-danger-color)}.point-marker .marker-circle:hover{cursor:pointer}.point-marker.closed{pointer-events:auto!important}.point-summary-marker,.point-contextmenu-marker{color:var(--idm-white);font-size:12px;background:var(--idm-danger-color);border:2px solid var(--idm-white);padding:2px 5px;border-radius:5px;cursor:pointer}.point-summary-marker .marker-close,.point-contextmenu-marker .marker-close{pointer-events:auto;position:absolute;background:var(--idm-danger-color);border:1px dashed var(--idm-white);display:flex;align-items:center;justify-content:center;width:20px;height:20px;right:-17px;top:-17px;cursor:pointer;font-size:20px}.tip-marker{color:var(--idm-white);font-size:12px;text-shadow:var(--idm-text-shadow);background-color:var(--idm-black-6);padding:2px 5px;border-radius:5px;cursor:pointer}.tip-marker .marker-label{border-bottom:var(--idm-dashed-border)}.tip-marker .marker-label:last-child{border-bottom:none}.tip-marker .marker-label b{font-weight:600;color:var(--idm-danger-color)}.hurricane-hourly-marker .iconfont{font-size:34px!important;color:var(--idm-danger-color)}.hurricane-hourly-marker svg{height:34px;width:34px}.hurricane-hourly-marker .center{box-sizing:border-box;display:flex;align-items:center;justify-content:center}.hurricane-hourly-marker .center.north{animation:anticlockwise 2s linear infinite}.hurricane-hourly-marker .center.south{animation:clockwise 2s linear infinite}@keyframes clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes anticlockwise{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idmwx/idmui-gl3",
3
3
  "private": false,
4
- "version": "4.0.9",
4
+ "version": "4.1.0",
5
5
  "description": "idm webgl3",
6
6
  "type": "module",
7
7
  "keywords": [
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@idm-plugin/geo": "^1.5.1",
32
32
  "@idmui/style": "^0.1.1",
33
- "@idmwx/idmwx-base": "^2.9.1",
33
+ "@idmwx/idmwx-base": "^2.9.5",
34
34
  "@mapbox/sphericalmercator": "^1.2.0",
35
35
  "@turf/turf": "^6.5.0",
36
36
  "axios": "^1.3.5",