(function(U,he){typeof exports=="object"&&typeof module<"u"?he(exports,require("@idm-plugin/geo"),require("moment"),require("vue"),require("echarts"),require("@wangeditor/editor-for-vue"),require("element-plus"),require("@idmui/tropical"),require("@element-plus/icons-vue"),require("axios"),require("mapbox-gl")):typeof define=="function"&&define.amd?define(["exports","@idm-plugin/geo","moment","vue","echarts","@wangeditor/editor-for-vue","element-plus","@idmui/tropical","@element-plus/icons-vue","axios","mapbox-gl"],he):(U=typeof globalThis<"u"?globalThis:U||self,he(U["idmui-report"]={},U["@idm-plugin/geo"],U.moment,U.Vue,U.echarts,U["@wangeditor/editor-for-vue"],U["element-plus"],U["@idmui/tropical"],U["@element-plus/icons-vue"],U.axios,U["mapbox-gl"]))})(this,function(U,he,u,e,Id,od,vs,Gd,ql,Jl,Hl){"use strict";function Rd(o){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(s,t,i.get?i:{enumerable:!0,get:()=>o[t]})}}return s.default=o,Object.freeze(s)}const ul=Rd(Id),ZK="",We=(o,s)=>{const t=o.__vccOpts||o;for(const[i,l]of s)t[i]=l;return t},Zd={name:"IdmBrand",props:{name:{type:String,default:""},issued:{type:String,default:""}},computed:{computeUTCTime(){return function(o,s="MMM-DD/HHmm[Z]"){return`${(o?u(o):u()).utc().format(s)}`}}}},ad=o=>(e.pushScopeId("data-v-7679e32b"),o=o(),e.popScopeId(),o),zd={class:"section brand-section flex-space"},Ud=e.createStaticVNode('
',1),Yd={class:"report-box flex-space"},jd={class:"name flex-start"},Jd={class:"flex-start",style:{"flex-wrap":"wrap",width:"200px"}},Kd={class:"flex-start",style:{width:"100%"}},Xd={class:"label-block flex-evenly",style:{flex:"1"}},qd=ad(()=>e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Issued",-1)),ud={class:"flex-end",style:{flex:"2"}},vd=ad(()=>e.createElementVNode("div",{class:"flex-start",style:{width:"100%"}},[e.createElementVNode("div",{class:"label-block flex-evenly",style:{flex:"1"}},[e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Mail to"),e.createElementVNode("a",{class:"flex-end",style:{flex:"2"},href:"mailto:op@ormwx.com"},"op@ormwx.com")])],-1));function ec(o,s,t,i,l,n){return e.openBlock(),e.createElementBlock("div",zd,[Ud,e.createElementVNode("div",Yd,[e.createElementVNode("div",jd,e.toDisplayString(t.name),1),e.createElementVNode("div",Jd,[e.createElementVNode("div",Kd,[e.createElementVNode("div",Xd,[qd,e.createElementVNode("span",ud,e.toDisplayString(n.computeUTCTime(t.issued,"MMM-DD, YYYY")),1)])]),vd])])])}const aa=We(Zd,[["render",ec],["__scopeId","data-v-7679e32b"]]),tc={name:"IdmLoading",props:{loading:{type:Boolean,default:!1},text:{type:String,default:"Loading..."}},emits:["timeout"],watch:{loading:{handler(){this.loading&&setTimeout(()=>{this.$emit("timeout",!1)},5e3)},immediate:!0}}},oc={key:0,class:"loading"},ac=e.createElementVNode("i",{class:"iconfont"},"",-1);function lc(o,s,t,i,l,n){return t.loading?(e.openBlock(),e.createElementBlock("div",oc,[ac,e.createElementVNode("div",null,e.toDisplayString(t.text),1)])):e.createCommentVNode("",!0)}const vl=We(tc,[["render",lc]]),zK="",nc={name:"ORMPointReport",components:{IdmLoading:vl,IdmBrand:aa},props:{report:{type:Object,default:()=>({})},showPrate:{type:Boolean,default:!1},showAcc:{type:Boolean,default:!0}},data(){return{echart:void 0,localTZ:"0",loading:!0}},computed:{computeLat(){return function(o){return he.LngLatHelper.lat2pretty(o,2)}},computeLng(){return function(o){return he.LngLatHelper.lng2pretty(o,2)}},computeLTime(){return function(o,s=8,t="MMM-DD/HHmm[LT]"){return`${u(o).utcOffset(s).format(t)}`}},computeTZ(){return function(o="0"){return he.LngLatHelper.prettyTimeZoneOffset(o)}},roundPrecision(){return function(o,s=4){if(typeof o=="number"){const t=Number("1".padEnd(s+1,"0"));return Math.round(o*t)/t}else return"-"}},computeDegree(){return function(o,s){o=o%360;for(let t=0;t<17;t++)if(t*22.5+o+11.25>=360){let i=(16-t)*22.5;return s||(i=i+180),`transform:rotate(${i}deg);height:1rem;width:1rem;margin-left:3px`}}},computeForm(){return function(o){var i,l,n,E,d,p,T,Q,h,y;const s={};for(let x=0;x<((l=(i=o==null?void 0:o.extend)==null?void 0:i.data)==null?void 0:l.length);x++){const g=(n=o==null?void 0:o.extend)==null?void 0:n.data[x];if(x===0)g.precip.pacc=0;else{const k=(E=o==null?void 0:o.extend)==null?void 0:E.data[x-1],b=u(g.utc).utcOffset(this.localTZ),w=u(k.utc).utcOffset(this.localTZ),A=(d=k==null?void 0:k.precip)==null?void 0:d.prate,C=b.diff(w,"h"),S=this.roundPrecision(A*C,1);if(g.precip.pacc=S,S>0){const V=s[b.format("MMM-DD")],H=Math.floor(b.get("hour")/6);V?(V.pacc=this.roundPrecision(V.pacc+S,1),V[`${H}`]?V[`${H}`]+=S:(V[`${H}`]=S,V.colspan+=1)):(s[b.format("MMM-DD")]={pacc:S,colspan:1},s[b.format("MMM-DD")][`${H}`]=S)}}}o.paccInDays=s;let t=0;for(const x of Object.keys(s))t+=(p=s[x])==null?void 0:p.colspan,s[x].level=((T=s[x])==null?void 0:T.pacc)<10?"Light":((Q=s[x])==null?void 0:Q.pacc)<24.9?"Moderate":((h=s[x])==null?void 0:h.pacc)<49.9?"Heavy":((y=s[x])==null?void 0:y.pacc)<99.9?"Rainstorm":"HeavyRainstorm";return o.span=t,o}}},watch:{report:{handler(){var o,s,t,i;(s=(o=this.report)==null?void 0:o.extend)!=null&&s.data&&(this.loading=!1,this.localTZ=he.LngLatHelper.guessTimeZoneOffset((t=this.report)==null?void 0:t.lng,(i=this.report)==null?void 0:i.lat),this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{initEchart(){var n,E,d;this.echart||(this.echart=e.markRaw(ul.init(this.$refs.echart)));const o=[],s=[],t={dateTime:0,windSpeed:1,gusts:2,waveHeight:3,windDirection:4,windDegree:5,windScale:6,current:7,precip:8,visibility:9,temp:10};let i=4;(d=(E=(n=this.report)==null?void 0:n.extend)==null?void 0:E.data)==null||d.forEach(p=>{var Q,h,y,x,g,k,b,w,A,C,S,V,H;const T=u(p.utc).utcOffset(this.localTZ).format("MMM-DD/HHmm[LT]");o.push(T),i=((h=(Q=p.wave)==null?void 0:Q.sig)==null?void 0:h.height)>i?(x=(y=p.wave)==null?void 0:y.sig)==null?void 0:x.height:i,s.push([T,(g=p.wind)==null?void 0:g.kts,(k=p.gusts)==null?void 0:k.kts,(w=(b=p.wave)==null?void 0:b.sig)==null?void 0:w.height,(A=p.wind)==null?void 0:A.direction,(C=p.wind)==null?void 0:C.degree,(S=p.wind)==null?void 0:S.scale,(V=p.current)==null?void 0:V.kts,(H=p.precip)==null?void 0:H.acc,this.roundPrecision(p.visibility/1852,0),p.temp])});const l={animation:!1,title:{text:"Weather Conditions",subtext:"Wind/Gusts/Sig.Wave/Visibility/Precip Acc",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},legend:{show:!0,right:0},tooltip:{trigger:"axis"},grid:{bottom:35},xAxis:[{data:o}],yAxis:[{name:"Precip Acc (mm)",nameLocation:"middle",position:"left",nameGap:30,axisLine:{lineStyle:{color:"#f85c5c"}}},{name:"Visibility (nm)",nameLocation:"middle",position:"left",offset:45,nameGap:30,axisLine:{lineStyle:{color:"#de8600"}}},{name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:25,max:i,axisLine:{lineStyle:{color:"#015DD5"}},splitLine:{show:!1}},{name:"Wind Speed (kts)",nameLocation:"middle",position:"right",offset:40,nameGap:25,axisLine:{lineStyle:{color:"#0e6500"}}}],visualMap:{type:"piecewise",orient:"horizontal",left:"center",bottom:0,show:!1,pieces:[{gte:17,color:"#f85c5c",label:"≥ BF5"},{gte:11,lt:17,color:"#de8600",label:"BF4"},{lt:11,color:"#67c23a",label:"< BF4"}],seriesIndex:3,dimension:1},series:[{type:"bar",name:"Precip Acc",yAxisIndex:0,showSymbol:!1,encode:{x:t.dateTime,y:t.precip},lineStyle:{color:"#f85c5c",type:"solid"},itemStyle:{color:"#f85c5c"},data:s,z:4},{type:"line",name:"Visibility",yAxisIndex:1,showSymbol:!1,encode:{x:t.dateTime,y:t.visibility},lineStyle:{color:"#de8600",type:"solid"},itemStyle:{color:"#de8600"},data:s,z:3},{name:"Sig. Wave Height",type:"line",showSymbol:!1,yAxisIndex:2,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(88, 160, 253, 1)"},{offset:.5,color:"rgba(88, 160, 253, 0.7)"},{offset:1,color:"rgba(88, 160, 253, 0)"}]}},lineStyle:{color:"rgba(88, 160, 253, 1)"},itemStyle:{color:"rgba(88, 160, 253, 1)"},encode:{x:t.dateTime,y:t.waveHeight},data:s,z:1},{name:"Wind Speed",type:"line",showSymbol:!1,yAxisIndex:3,encode:{x:t.dateTime,y:t.windSpeed},lineStyle:{color:"#398626",type:"solid"},itemStyle:{color:"#398626"},data:s,z:2},{type:"line",name:"Gusts",showSymbol:!1,yAxisIndex:3,encode:{x:t.dateTime,y:t.gusts},lineStyle:{color:"#0e6500",type:"dashed"},itemStyle:{color:"#0e6500"},data:s,z:2}]};this.echart.setOption(l)}}},dt=o=>(e.pushScopeId("data-v-eb929a40"),o=o(),e.popScopeId(),o),sc={class:"point-report"},dc={class:"section info-section"},cc={class:"flex-evenly"},ic={class:"flex-space label-block",style:{width:"100%"}},rc=dt(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Position",-1)),mc={class:"flex-space label-block",style:{width:"100%"}},pc=dt(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Issued (+00:00)",-1)),hc={class:"flex-evenly"},_c={class:"flex-space label-block",style:{width:"100%"}},Ec=dt(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Timezone",-1)),yc={class:"flex-space label-block",style:{width:"100%"}},fc={class:"flex-end",style:{width:"180px"}},Vc={class:"section echart-section"},Nc={ref:"echart",class:"echart"},Tc={class:"section sample-section"},Qc=dt(()=>e.createElementVNode("th",{rowspan:"2"},"Date Time",-1)),gc=dt(()=>e.createElementVNode("th",{colspan:"4"},"Wind",-1)),bc=dt(()=>e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")],-1)),xc=dt(()=>e.createElementVNode("th",{colspan:"3"},"Swell",-1)),kc=dt(()=>e.createElementVNode("th",{colspan:"3"},"Sig",-1)),Dc=dt(()=>e.createElementVNode("th",{colspan:"2"},"Current",-1)),Cc=["colspan"],Sc=dt(()=>e.createElementVNode("th",{colspan:"1"},"Visibility",-1)),Bc=dt(()=>e.createElementVNode("th",{colspan:"1"},"Temp",-1)),wc=dt(()=>e.createElementVNode("th",null,"Dir",-1)),Ac=dt(()=>e.createElementVNode("th",null,"Speed (kts)",-1)),Hc=dt(()=>e.createElementVNode("th",null,"BF",-1)),Lc=dt(()=>e.createElementVNode("th",null,"Gusts (kts)",-1)),Oc=dt(()=>e.createElementVNode("th",null,"Dir",-1)),Fc=dt(()=>e.createElementVNode("th",null,"Ht (m)",-1)),Pc=dt(()=>e.createElementVNode("th",null,"Prd (s)",-1)),$c=dt(()=>e.createElementVNode("th",null,"Dir",-1)),Mc=dt(()=>e.createElementVNode("th",null,"Hgt (m)",-1)),Wc=dt(()=>e.createElementVNode("th",null,"Prd (s)",-1)),Ic=dt(()=>e.createElementVNode("th",null,"Dir",-1)),Gc=dt(()=>e.createElementVNode("th",null,"Speed (kts)",-1)),Rc={key:0},Zc={key:1},zc=dt(()=>e.createElementVNode("th",null,"Dist (nm)",-1)),Uc=dt(()=>e.createElementVNode("th",null,"°C",-1)),Yc={width:"120px"},jc={key:0,class:"degree-box"},Jc={key:1},Kc={key:0,class:"degree-box"},Xc={key:1},qc={key:0,class:"degree-box"},uc={key:1},vc={key:0,class:"degree-box"},ei={key:1},ti={key:0},oi={key:1};function ai(o,s,t,i,l,n){var p,T,Q,h;const E=e.resolveComponent("IdmBrand"),d=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",sc,[e.createVNode(E,{name:"Point Weather Forecast"}),e.createVNode(d,{loading:l.loading},null,8,["loading"]),e.createElementVNode("div",dc,[e.createElementVNode("div",cc,[e.createElementVNode("div",ic,[rc,e.createElementVNode("span",null,e.toDisplayString(n.computeLat((p=t.report)==null?void 0:p.lat).pretty)+" / "+e.toDisplayString(n.computeLng((T=t.report)==null?void 0:T.lng).pretty),1)]),e.createElementVNode("div",mc,[pc,e.createElementVNode("span",null,e.toDisplayString(n.computeLTime(t.report.updatedAt,0,"YYYY, MMM-DD/HHmm[Z]")),1)])]),e.createElementVNode("div",hc,[e.createElementVNode("div",_c,[Ec,e.createElementVNode("span",null,e.toDisplayString(n.computeTZ(l.localTZ)),1)]),e.createElementVNode("div",yc,[e.createElementVNode("label",fc,"("+e.toDisplayString(n.computeTZ(l.localTZ))+")",1),e.createElementVNode("span",null,e.toDisplayString(n.computeLTime(t.report.updatedAt,l.localTZ,"YYYY, MMM-DD/HHmm[LT]")),1)])])]),e.createElementVNode("div",Vc,[e.createElementVNode("div",Nc,null,512)]),e.createElementVNode("div",Tc,[e.createElementVNode("table",null,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[Qc,gc,bc,xc,kc,Dc,e.createElementVNode("th",{colspan:t.showPrate&&t.showAcc?2:1},"Precip",8,Cc),Sc,Bc]),e.createElementVNode("tr",null,[wc,Ac,Hc,Lc,Oc,Fc,Pc,$c,Mc,Wc,Ic,Gc,t.showPrate?(e.openBlock(),e.createElementBlock("th",Rc,"Rate (mm/h)")):e.createCommentVNode("",!0),t.showAcc?(e.openBlock(),e.createElementBlock("th",Zc,"Acc (mm)")):e.createCommentVNode("",!0),zc,Uc])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((h=(Q=t.report)==null?void 0:Q.extend)==null?void 0:h.data,(y,x)=>{var g,k,b,w,A,C,S,V,H,W,I,G,R,_,O,$,F,L,M,j,z,J,de,ce,a,X,oe,ae,le,ne,se,ie,re,me;return e.openBlock(),e.createElementBlock("tr",{key:x},[e.createElementVNode("td",Yc,e.toDisplayString(n.computeLTime(y.utc,l.localTZ)),1),e.createElementVNode("td",null,[(g=y.wind)!=null&&g.kts?(e.openBlock(),e.createElementBlock("span",jc,[e.createTextVNode(e.toDisplayString((k=y.wind)==null?void 0:k.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((b=y.wind)==null?void 0:b.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Jc,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((w=y.wind)==null?void 0:w.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString((A=y.wind)==null?void 0:A.scale),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((C=y.gusts)==null?void 0:C.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((V=(S=y.wave)==null?void 0:S.wd)==null?void 0:V.height,1)),1),e.createElementVNode("td",null,[(W=(H=y.wave)==null?void 0:H.swell)!=null&&W.height?(e.openBlock(),e.createElementBlock("span",Kc,[e.createTextVNode(e.toDisplayString((G=(I=y.wave)==null?void 0:I.swell)==null?void 0:G.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((_=(R=y.wave)==null?void 0:R.swell)==null?void 0:_.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Xc,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(($=(O=y.wave)==null?void 0:O.swell)==null?void 0:$.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((L=(F=y.wave)==null?void 0:F.swell)==null?void 0:L.period,1)),1),e.createElementVNode("td",null,[(j=(M=y.wave)==null?void 0:M.sig)!=null&&j.height?(e.openBlock(),e.createElementBlock("span",qc,[e.createTextVNode(e.toDisplayString((J=(z=y.wave)==null?void 0:z.sig)==null?void 0:J.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((ce=(de=y.wave)==null?void 0:de.sig)==null?void 0:ce.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",uc,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((X=(a=y.wave)==null?void 0:a.sig)==null?void 0:X.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ae=(oe=y.wave)==null?void 0:oe.sig)==null?void 0:ae.period,1)),1),e.createElementVNode("td",null,[(le=y.current)!=null&&le.kts?(e.openBlock(),e.createElementBlock("span",vc,[e.createTextVNode(e.toDisplayString((ne=y.current)==null?void 0:ne.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((se=y.current)==null?void 0:se.degree,!0))},"",4)])):(e.openBlock(),e.createElementBlock("span",ei,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ie=y.current)==null?void 0:ie.kts,1)),1),t.showPrate?(e.openBlock(),e.createElementBlock("td",ti,e.toDisplayString(n.roundPrecision((re=y.precip)==null?void 0:re.prate,2)),1)):e.createCommentVNode("",!0),t.showAcc?(e.openBlock(),e.createElementBlock("td",oi,e.toDisplayString(n.roundPrecision((me=y.precip)==null?void 0:me.acc,2)),1)):e.createCommentVNode("",!0),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(y.visibility/1852,0)||"-"),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(y.temp,1)),1)])}),128))])])])])}const ld=We(nc,[["render",ai],["__scopeId","data-v-eb929a40"]]),li={install(o){o.component("ORMPointReport",ld)}},UK="",ni={name:"IdmLng",props:{lng:{type:Number,default:void 0},label:{type:String,default:"Lng"}},data(){return{pretty:void 0}},watch:{lng:{handler(){if(this.lng!==void 0){const o=he.LngLatHelper.convertToStdLng(this.lng);this.pretty=he.LngLatHelper.lng2pretty(o).pretty}},immediate:!0}}},si={class:"lng-box"},di={key:0};function ci(o,s,t,i,l,n){return e.openBlock(),e.createElementBlock("div",si,[t.label?(e.openBlock(),e.createElementBlock("span",di,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(l.pretty),1)])}const Kl=We(ni,[["render",ci],["__scopeId","data-v-0d3c152f"]]),YK="",ii={name:"IdmLat",props:{lat:{type:Number,default:void 0},label:{type:String,default:"Lat"}},data(){return{pretty:void 0}},watch:{lat:{handler(){this.lat!==void 0&&(this.pretty=he.LngLatHelper.lat2pretty(this.lat).pretty)},immediate:!0}}},ri={class:"lat-box"},mi={key:0};function pi(o,s,t,i,l,n){return e.openBlock(),e.createElementBlock("div",ri,[t.label?(e.openBlock(),e.createElementBlock("span",mi,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(l.pretty),1)])}const Xl=We(ii,[["render",pi],["__scopeId","data-v-3d953d12"]]),jK="",hi={name:"IdmEditor",components:{Editor:od.Editor,Toolbar:od.Toolbar},props:{height:{type:String,default:"200px"},modelValue:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1}},data(){return{editorRef:null,editor:null,mode:"simple",valueHtml:void 0,editorConfig:{placeholder:"please input something..."},toolbarConfig:{toolbarKeys:["bold","color","bgColor","fontSize","lineHeight"]}}},watch:{disabled:{handler(o){var s,t;o?(s=this.editor)==null||s.disable():(t=this.editor)==null||t.enable()}},modelValue:{handler(){var o;this.valueHtml=this.modelValue,(o=this.editor)==null||o.setHtml(this.valueHtml)}}},methods:{handleCreated(o){var s;this.editorRef=e.shallowRef(),this.editor=Object.seal(o),this.valueHtml=this.modelValue,(s=this.editor)==null||s.setHtml(this.valueHtml),this.disabled?this.editor.disable():this.editor.enable()},handleChange(o){this.$emit("update:modelValue",this.valueHtml)},handleBlur(o){this.$emit("blur",this.valueHtml)},beforeDestroy(){var o;(o=this.editor)==null||o.destroy()}}},_i={class:"editor-box"};function Ei(o,s,t,i,l,n){const E=e.resolveComponent("Toolbar"),d=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",_i,[e.withDirectives(e.createVNode(E,{editor:l.editor,"default-config":l.toolbarConfig,mode:l.mode,class:"toolbar"},null,8,["editor","default-config","mode"]),[[e.vShow,!t.disabled]]),e.createVNode(d,{modelValue:l.valueHtml,"onUpdate:modelValue":s[0]||(s[0]=p=>l.valueHtml=p),"default-config":l.editorConfig,mode:l.mode,class:"editor",style:e.normalizeStyle({height:t.height}),onOnCreated:n.handleCreated,onOnChange:n.handleChange,onOnBlur:n.handleBlur},null,8,["modelValue","default-config","mode","style","onOnCreated","onOnChange","onOnBlur"])])}const la=We(hi,[["render",Ei],["__scopeId","data-v-a8e20d55"]]),JK="",yi={name:"OrmRouteReport",components:{Lng:Kl,Lat:Xl,Editor:la,Brand:aa,Loading:vl,ElTooltip:vs.ElTooltip},props:{plan:{type:Object,default:()=>({})},weatherPrinciple:{type:Object,default:()=>({})},editorDisabled:{type:Boolean,default:()=>!1}},emits:["commit","refresh"],data(){return{editable:!1,advisory:"",echart:void 0,speedIndex:0,loading:!0}},computed:{computeUTCTime(){return function(o,s="MMM-DD/HHmm[Z]"){return`${u(o).utc().format(s)}`}},computeLTime(){return function(o,s,t){let i=0;return t&&s&&(i=he.LngLatHelper.guessTimeZoneOffset(s,t)),`${u(o).utcOffset(i).format("MMM-DD/HHmm")}LT`}},computeTimeDiff(){return function(o,s){var t,i,l,n,E;if(s===0)return"-";{const d=u((l=(i=(t=o==null?void 0:o.speeds)==null?void 0:t[s])==null?void 0:i.speed)==null?void 0:l.eta).diff(u((E=(n=o==null?void 0:o.speeds)==null?void 0:n[0])==null?void 0:E.speed.eta),"h",!0);return Math.round(d*10)/10}}},computeNav(){return function(o){return o.gcToPrevious?"GC":"RL"}},roundPrecision(){return function(o,s=4){if(typeof o=="number"){const t=Number("1".padEnd(s+1,"0"));return Math.round(o*t)/t}else return"-"}},computeMemo(){return function(o){return(o==null?void 0:o.memo)??"-"}},computeMajorPoints(){return function(o,s){const t=[];if(s.length)return s.forEach(i=>{t.push(i),i.suspend&&(o!=null&&o.useRouteParam)&&t.push({etd:i.etd,eta:i.etd,isResume:!0,memo:`Stoppage: ${i.suspend}hrs`})}),t}},computeDegree(){return function(o,s){o=o%360;for(let t=0;t<17;t++)if(t*22.5+o+11.25>=360){let i=(16-t)*22.5;return s||(i=i+180),`transform:rotate(${i}deg);margin-left:3px;`}}},computeDay(){return function(o,s=0){var n,E,d,p;const t=(p=(d=(E=(n=o==null?void 0:o.speeds)==null?void 0:n[s])==null?void 0:E.speed)==null?void 0:d.sample)==null?void 0:p.hours,i=t[0],l=t[t.length-1];return Math.round(u(l.eta).diff(u(i.eta),"day",!0)*10)/10}},computeSuspend(){return function(o){var t,i;let s=0;return(i=(t=o==null?void 0:o.sample)==null?void 0:t.wps)==null||i.forEach(l=>{s+=l.suspend||0}),s?Math.round(s*100)/100:"-"}}},watch:{plan:{handler(){var o,s;(o=this.plan)!=null&&o.id&&(this.loading=!1,this.advisory=((s=this.plan)==null?void 0:s.advisory)||"Pls find the following major waypoints for your safe navigation.",this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{handleCommit(o){this.editable=!1,this.$emit("commit",o)},handleRefresh(){this.$emit("refresh")},handleEdit(){this.editorDisabled?this.editable=!1:this.editable=!0},initEchart(){this.echart||(this.echart=e.markRaw(ul.init(this.$refs.echart))),this.renderEchart()},renderEchart(){var p,T,Q,h,y,x,g;const o=[],s=[],t={dateTime:0,windSpeed:1,waveHeight:2,windDirection:3,windDegree:4,windScale:5,currentFactor:6,weatherFactor:7,speed:8},i={};["W","WSW","SW","SSW","S","SSE","SE","ESE","E","ENE","NE","NNE","N","NNW","NW","WNW"].forEach((k,b)=>{i[k]=Math.PI/8*b});const n=18;let E=4;(x=(y=(h=(Q=(T=(p=this.plan)==null?void 0:p.speeds)==null?void 0:T[this.speedIndex])==null?void 0:Q.speed)==null?void 0:h.sample)==null?void 0:y.hours)==null||x.forEach(k=>{var w,A,C,S,V,H,W,I,G,R;const b=k.meteo;if(b){const _=u(b.utc).utc().format("MMM-DD/HHmm[Z]");o.push(_),E=Math.ceil(((A=(w=b.wave)==null?void 0:w.sig)==null?void 0:A.height)>E?(S=(C=b.wave)==null?void 0:C.sig)==null?void 0:S.height:E),s.push([_,(V=b.wind)==null?void 0:V.kts,(W=(H=b.wave)==null?void 0:H.sig)==null?void 0:W.height,(I=b.wind)==null?void 0:I.direction,(G=b.wind)==null?void 0:G.degree,(R=b.wind)==null?void 0:R.scale,k.cFactor,k.wFactor,k.speed])}});const d={animation:!1,title:{text:"Weather Conditions & Speed Analysis",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},tooltip:{trigger:"axis"},legend:{show:!0,right:0},grid:{bottom:40},xAxis:[{data:o,boundaryGap:!1}],yAxis:[{name:"Wind Speed (kts)",nameLocation:"middle",position:"left",nameGap:35,minInterval:5,axisLine:{lineStyle:{color:"#000000B3"}}},{type:"value",name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:35,max:E,min:0,minInterval:1,axisLine:{lineStyle:{color:"#015DD5"}},splitLine:{show:!1}},{name:"Current Factor (kts)",nameLocation:"middle",position:"left",offset:50,nameGap:35,axisLine:{lineStyle:{color:"#da2e2ecc"}},splitLine:{show:!0},alignTicks:!0},{name:"SOG (kts)",nameLocation:"middle",position:"right",offset:50,nameGap:35,axisLine:{lineStyle:{color:"#398626"}},splitLine:{show:!0}}],visualMap:{show:!1,type:"piecewise",orient:"horizontal",left:"center",bottom:0,pieces:[{gte:22,color:"#f85c5c",label:"≥ BF6"},{gte:17,lt:22,color:"#de8600",label:"BF5"},{lt:17,color:"#67c23a",label:"≤ BF4"}],seriesIndex:2,dimension:1},series:[{name:"Sig. Wave Height",type:"line",showSymbol:!0,yAxisIndex:1,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(88, 160, 253, 1)"},{offset:.5,color:"rgba(88, 160, 253, 0.7)"},{offset:1,color:"rgba(88, 160, 253, 0)"}]}},lineStyle:{color:"rgba(88, 160, 253, 1)"},itemStyle:{color:"rgba(88, 160, 253, 1)"},encode:{x:t.dateTime,y:t.waveHeight},data:s,z:1},{name:"Wind Speed",type:"line",showSymbol:!0,yAxisIndex:0,encode:{x:t.dateTime,y:t.windSpeed},lineStyle:{color:"#000000B3",type:"dashed"},itemStyle:{color:"#000000B3"},data:s,z:2},{type:"custom",yAxisIndex:0,renderItem:(k,b)=>{const w=b.coord([b.value(t.dateTime),b.value(t.windSpeed)]);return{type:"path",shape:{pathData:"M31 16l-15-15v9h-26v12h26v9z",x:-n/2,y:-n/2,width:n,height:n},rotation:i[b.value(t.windDirection)],position:w,style:b.style({stroke:"#555",lineWidth:1})}},encode:{x:t.dateTime,y:t.windSpeed},data:s,z:10},{name:"Current Factor",type:"line",yAxisIndex:2,showSymbol:!0,encode:{x:t.dateTime,y:t.currentFactor},lineStyle:{color:"#da2e2ecc",type:"dotted"},itemStyle:{color:"#da2e2ecc"},data:s,z:3},{name:"SOG",type:"line",yAxisIndex:3,showSymbol:!0,encode:{x:t.dateTime,y:t.speed},lineStyle:{color:"#398626",type:"solid"},itemStyle:{color:"#398626"},data:s,z:4}]};(g=this.echart)==null||g.setOption(d)}}},ee=o=>(e.pushScopeId("data-v-790975c4"),o=o(),e.popScopeId(),o),fi={class:"voyage-plan"},Vi={class:"plan-report"},Ni={class:"section voyage-section flex-space"},Ti={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},Qi={class:"flex-start label-block",style:{width:"100%"}},gi=ee(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Prepare for",-1)),bi={style:{"text-transform":"uppercase"},class:"text-ellipsis"},xi={class:"flex-start label-block",style:{width:"100%"}},ki=ee(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Vessel",-1)),Di={class:"flex-end text-ellipsis",style:{"text-transform":"uppercase"}},Ci={class:"flex-start label-block",style:{width:"100%"}},Si=ee(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Voyage No.",-1)),Bi={class:"flex-end"},wi={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},Ai={class:"flex-start label-block",style:{width:"100%"}},Hi=ee(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"From",-1)),Li={key:0,class:"flex-end",style:{flex:"1"}},Oi={key:1,class:"flex-end",style:{flex:"1"}},Fi=ee(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Pi={class:"flex-end",style:{width:"120px"}},$i={class:"flex-space label-block",style:{width:"100%"}},Mi=ee(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"To",-1)),Wi={key:0,class:"flex-end",style:{flex:"1"}},Ii={key:1,class:"flex-end",style:{flex:"1"}},Gi=ee(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Ri={class:"flex-end",style:{width:"120px"}},Zi={class:"flex-space label-block",style:{width:"100%"}},zi=ee(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Load Condition",-1)),Ui={class:"flex-end",style:{"text-transform":"uppercase"}},Yi={class:"section chart-section"},ji=ee(()=>e.createElementVNode("div",{class:"header-block flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Weather chart")],-1)),Ji={class:"flex-center"},Ki=["src"],Xi={class:"legends"},qi=e.createStaticVNode('${h}
`;i=i+y}),i=i+"From - To | Date (dep-arr) | EU MRV let type | Time (days) | Dist (nm) | Fuel consumed at sea (mt) | Fuel consumed with port (mt) | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
HFO | LFO | MGO | LNG | HFO | LFO | MGO | LNG | |||||
Emission factors:The greenhouse gases covered by the EU ETS Directive are: CO2, and from 1 January 2026 onwards CH4 and N2O.
Ships:The EU ETS has been extended to include maritime transport emissions from 2024. Cargo and passenger ships of or above 5 000 gross tonnage (GT) are included in the EU ETS. From 2027 onwards, offshore ships of or above 5 000 GT will be included.
Voyages:
● 100% of emissions from all voyages between EEA ports;
● 100% of emissions which occurred within EEA ports (and which occurred when at berth within EEA ports);
● 50% of emissions from all voyages which departed from EEA portsand arrived in non EEA ports;
● 50% of emissions from all voyages from non-EEA ports to EEA ports.
Shipping companies must surrender EU ETS allowances(EUAs) equal to the amount of verified aggregated emissions data at company level by 30 September every year following the reporting year, i.e. the first time by 30 September 2025 for emissions reported for the year 2024.
The share of emissions that must be covered by the surrendering of allowances gradually increases each year:
● 2025: 40% of emissions reported for 2024 must be covered by emission allowances;
● 2026: 70% of emissions reported for 2025;
● 2027 and beyond: 100% of reported emissions.
Regarding the emission factor, the shipping company shall identify the emission factor values to be applied to each fuel type reported over the reporting period. As a general rule, the shipping company apply the default (tank-to-wake) emission factor values as listed under point 2, Part A of Annex I to the MRV Maritime Regulation, which cover both those applicable to fuel combustion (for CO2, CH4, N2O) and to slippage (Cj values).
EU ETS Directive: Directive 2003/87/EC of the European Parliament and of the Council of 13 October 2003 establishing a system for greenhouse gas emission allowance trading within the Community and amending Council Directive 96/61/EC, amended several times. Download of the consolidated version:
http://data.europa.eu/eli/dir/2003/87/2024-03-01
MRV Maritime Regulation: Regulation (EU) 2015/757 of the European Parliament and of the Council of 29 April 2015 on the monitoring, reporting and verification of carbon dioxide emissions from maritime transport, and amending Directive 2009/16/EC, http://data.europa.eu/eli/reg/2015/757/2024-01-01