ship.349716b4.js 39 KB

1
  1. import{u as Ne,r as $,an as ge,a8 as Pe,P as Be,L as Ue,g as P,o as k,h as fe,m as u,i as S,w as G,t as R,k as p,j as ne,U as Ye,Z as Xe,_ as We,N as U,$ as dt,M as ut,z as ct,B as ht,l as Ee}from"./vendor.5f04cee5.js";import{e as gt,l as He,g as me,h as Z,i as re,m as ft,j as mt,k as pt,n as Ze,o as yt,p as vt,q as Ct,r as De,C as _t,t as wt,u as At,G as St,v as Ft,w as Pt,E as Et,x as xt,y as Rt,z as Gt,A as Mt,B as Ot,D as It,H as bt,J as Lt,K as Tt,L as kt,P as Y,N as Vt,O as jt,Q as Qt,R as Nt,U as Bt,W as Ut,Y as Yt,Z as qe,_ as Xt,$ as Wt,a0 as Ht,a1 as Zt,a2 as xe,a3 as Dt,a4 as qt,a5 as X,a6 as zt,a7 as E,F as D,a8 as Kt,a9 as Jt,S as q,aa as Re,ab as $t,d as oe,f as ee,b as ae,a as le,I as pe,c as ze,T as ye,X as ve,M as Ke,V as Je,s as es}from"./ship_tblr.e53cacd7.js";import{_ as $e,q as ts,v as ss,s as is,b as ns,c as rs}from"./index.93e79fa9.js";function et(n,e,t,s,i,r,o){let a,l;const g=(t-e)/s;if(g===1)a=e;else if(g===2)a=e,l=i;else if(g!==0){let h=n[e],w=n[e+1],y=0;const _=[0];for(let b=e+s;b<t;b+=s){const M=n[b],W=n[b+1];y+=Math.sqrt((M-h)*(M-h)+(W-w)*(W-w)),_.push(y),h=M,w=W}const f=i*y,F=gt(_,f);F<0?(l=(f-_[-F-2])/(_[-F-1]-_[-F-2]),a=e+(-F-2)*s):a=e+F*s}o=o>1?o:2,r=r||new Array(o);for(let h=0;h<o;++h)r[h]=a===void 0?NaN:l===void 0?n[a+h]:He(n[a+h],n[a+s+h],l);return r}function Ge(n,e,t,s,i,r){if(t==e)return null;let o;if(i<n[e+s-1])return r?(o=n.slice(e,e+s),o[s-1]=i,o):null;if(n[t-1]<i)return r?(o=n.slice(t-s,t),o[s-1]=i,o):null;if(i==n[e+s-1])return n.slice(e,e+s);let a=e/s,l=t/s;for(;a<l;){const y=a+l>>1;i<n[(y+1)*s-1]?l=y:a=y+1}const g=n[a*s-1];if(i==g)return n.slice((a-1)*s,(a-1)*s+s);const h=n[(a+1)*s-1],w=(i-g)/(h-g);o=[];for(let y=0;y<s-1;++y)o.push(He(n[(a-1)*s+y],n[a*s+y],w));return o.push(i),o}function os(n,e,t,s,i,r,o){if(o)return Ge(n,e,t[t.length-1],s,i,r);let a;if(i<n[s-1])return r?(a=n.slice(0,s),a[s-1]=i,a):null;if(n[n.length-1]<i)return r?(a=n.slice(n.length-s),a[s-1]=i,a):null;for(let l=0,g=t.length;l<g;++l){const h=t[l];if(e!=h){if(i<n[e+s-1])return null;if(i<=n[h-1])return Ge(n,e,h,s,i,!1);e=h}}return null}class Ce extends me{constructor(e,t){super();this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendCoordinate(e){this.flatCoordinates?Z(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()}clone(){const e=new Ce(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,s,i){return i<re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ft(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),mt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,s,i))}forEachSegment(e){return pt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,t){return this.layout!="XYM"&&this.layout!="XYZM"?null:(t=t!==void 0?t:!1,Ge(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t))}getCoordinates(){return Ze(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,t){return et(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,this.stride)}getLength(){return yt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const t=[];return t.length=vt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new Ce(t,"XY")}getType(){return"LineString"}intersectsExtent(e){return Ct(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=De(this.flatCoordinates,0,e,this.stride),this.changed()}}var Me=Ce;function as(n){if(!(n.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const e=n.inversePixelTransform[0],t=n.frameState,s=wt(n.inversePixelTransform.slice(),t.coordinateToPixelTransform),i=At(t.viewState.resolution,e);let r;return new _t(n.context,e,t.extent,s,t.viewState.rotation,i,r)}class _e extends St{constructor(e){super();this.geometries_=e||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Ft),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(!!this.geometries_)for(let e=0,t=this.geometries_.length;e<t;++e)this.changeEventsKeys_.push(Pt(this.geometries_[e],Et.CHANGE,this.changed,this))}clone(){const e=new _e(null);return e.setGeometries(this.geometries_),e.applyProperties(this),e}closestPointXY(e,t,s,i){if(i<re(this.getExtent(),e,t))return i;const r=this.geometries_;for(let o=0,a=r.length;o<a;++o)i=r[o].closestPointXY(e,t,s,i);return i}containsXY(e,t){const s=this.geometries_;for(let i=0,r=s.length;i<r;++i)if(s[i].containsXY(e,t))return!0;return!1}computeExtent(e){xt(e);const t=this.geometries_;for(let s=0,i=t.length;s<i;++s)Rt(e,t[s].getExtent());return e}getGeometries(){return tt(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let e=[];const t=this.geometries_;for(let s=0,i=t.length;s<i;++s)t[s].getType()===this.getType()?e=e.concat(t[s].getGeometriesArrayRecursive()):e.push(t[s]);return e}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=[],s=this.geometries_;let i=!1;for(let r=0,o=s.length;r<o;++r){const a=s[r],l=a.getSimplifiedGeometry(e);t.push(l),l!==a&&(i=!0)}if(i){const r=new _e(null);return r.setGeometriesArray(t),r}else return this.simplifiedGeometryMaxMinSquaredTolerance=e,this}getType(){return"GeometryCollection"}intersectsExtent(e){const t=this.geometries_;for(let s=0,i=t.length;s<i;++s)if(t[s].intersectsExtent(e))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(e,t){const s=this.geometries_;for(let i=0,r=s.length;i<r;++i)s[i].rotate(e,t);this.changed()}scale(e,t,s){s||(s=Gt(this.getExtent()));const i=this.geometries_;for(let r=0,o=i.length;r<o;++r)i[r].scale(e,t,s);this.changed()}setGeometries(e){this.setGeometriesArray(tt(e))}setGeometriesArray(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()}applyTransform(e){const t=this.geometries_;for(let s=0,i=t.length;s<i;++s)t[s].applyTransform(e);this.changed()}translate(e,t){const s=this.geometries_;for(let i=0,r=s.length;i<r;++i)s[i].translate(e,t);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function tt(n){const e=[];for(let t=0,s=n.length;t<s;++t)e.push(n[t].clone());return e}var ls=_e;class we extends me{constructor(e,t,s){super();if(this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,t);else if(t!==void 0&&s)this.setFlatCoordinates(t,e),this.ends_=s;else{let i=this.getLayout();const r=e,o=[],a=[];for(let l=0,g=r.length;l<g;++l){const h=r[l];l===0&&(i=h.getLayout()),Z(o,h.getFlatCoordinates()),a.push(o.length)}this.setFlatCoordinates(i,o),this.ends_=a}}appendLineString(e){this.flatCoordinates?Z(this.flatCoordinates,e.getFlatCoordinates().slice()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new we(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,s,i){return i<re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Mt(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ot(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,s,i))}getCoordinateAtM(e,t,s){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(t=t!==void 0?t:!1,s=s!==void 0?s:!1,os(this.flatCoordinates,0,this.ends_,this.stride,e,t,s))}getCoordinates(){return It(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(e){return e<0||this.ends_.length<=e?null:new Me(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLineStrings(){const e=this.flatCoordinates,t=this.ends_,s=this.layout,i=[];let r=0;for(let o=0,a=t.length;o<a;++o){const l=t[o],g=new Me(e.slice(r,l),s);i.push(g),r=l}return i}getFlatMidpoints(){const e=[],t=this.flatCoordinates;let s=0;const i=this.ends_,r=this.stride;for(let o=0,a=i.length;o<a;++o){const l=i[o],g=et(t,s,l,r,.5);Z(e,g),s=l}return e}getSimplifiedGeometryInternal(e){const t=[],s=[];return t.length=bt(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,s),new we(t,"XY",s)}getType(){return"MultiLineString"}intersectsExtent(e){return Lt(this.flatCoordinates,0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const s=Tt(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=s.length===0?0:s[s.length-1],this.changed()}}var ds=we;class Oe extends me{constructor(e,t){super();t&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendPoint(e){this.flatCoordinates?Z(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()}clone(){const e=new Oe(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,s,i){if(i<re(this.getExtent(),e,t))return i;const r=this.flatCoordinates,o=this.stride;for(let a=0,l=r.length;a<l;a+=o){const g=kt(e,t,r[a],r[a+1]);if(g<i){i=g;for(let h=0;h<o;++h)s[h]=r[a+h];s.length=o}}return i}getCoordinates(){return Ze(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(e){const t=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return e<0||t<=e?null:new Y(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)}getPoints(){const e=this.flatCoordinates,t=this.layout,s=this.stride,i=[];for(let r=0,o=e.length;r<o;r+=s){const a=new Y(e.slice(r,r+s),t);i.push(a)}return i}getType(){return"MultiPoint"}intersectsExtent(e){const t=this.flatCoordinates,s=this.stride;for(let i=0,r=t.length;i<r;i+=s){const o=t[i],a=t[i+1];if(Vt(e,o,a))return!0}return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=De(this.flatCoordinates,0,e,this.stride),this.changed()}}var st=Oe;function us(n,e,t,s){const i=[];let r=Qt();for(let o=0,a=t.length;o<a;++o){const l=t[o];r=jt(n,e,l[0],s),i.push((r[0]+r[2])/2,(r[1]+r[3])/2),e=l[l.length-1]}return i}class Ae extends me{constructor(e,t,s){super();if(this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!s&&!Array.isArray(e[0])){let i=this.getLayout();const r=e,o=[],a=[];for(let l=0,g=r.length;l<g;++l){const h=r[l];l===0&&(i=h.getLayout());const w=o.length,y=h.getEnds();for(let _=0,f=y.length;_<f;++_)y[_]+=w;Z(o,h.getFlatCoordinates()),a.push(y)}t=i,e=o,s=a}t!==void 0&&s?(this.setFlatCoordinates(t,e),this.endss_=s):this.setCoordinates(e,t)}appendPolygon(e){let t;if(!this.flatCoordinates)this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();else{const s=this.flatCoordinates.length;Z(this.flatCoordinates,e.getFlatCoordinates()),t=e.getEnds().slice();for(let i=0,r=t.length;i<r;++i)t[i]+=s}this.endss_.push(t),this.changed()}clone(){const e=this.endss_.length,t=new Array(e);for(let i=0;i<e;++i)t[i]=this.endss_[i].slice();const s=new Ae(this.flatCoordinates.slice(),this.layout,t);return s.applyProperties(this),s}closestPointXY(e,t,s,i){return i<re(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Nt(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Bt(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,s,i))}containsXY(e,t){return Ut(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)}getArea(){return Yt(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),qe(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,Xt(t,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const e=us(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Wt(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new st(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;Ht(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=qe(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],s=[];return t.length=Zt(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,s),new Ae(t,"XY",s)}getPolygon(e){if(e<0||this.endss_.length<=e)return null;let t;if(e===0)t=0;else{const r=this.endss_[e-1];t=r[r.length-1]}const s=this.endss_[e].slice(),i=s[s.length-1];if(t!==0)for(let r=0,o=s.length;r<o;++r)s[r]-=t;return new xe(this.flatCoordinates.slice(t,i),this.layout,s)}getPolygons(){const e=this.layout,t=this.flatCoordinates,s=this.endss_,i=[];let r=0;for(let o=0,a=s.length;o<a;++o){const l=s[o].slice(),g=l[l.length-1];if(r!==0)for(let w=0,y=l.length;w<y;++w)l[w]-=r;const h=new xe(t.slice(r,g),e,l);i.push(h),r=g}return i}getType(){return"MultiPolygon"}intersectsExtent(e){return Dt(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);const s=qt(this.flatCoordinates,0,e,this.stride,this.endss_);if(s.length===0)this.flatCoordinates.length=0;else{const i=s[s.length-1];this.flatCoordinates.length=i.length===0?0:i[i.length-1]}this.changed()}}var cs=Ae,hs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAvCAYAAADjNOpjAAACsUlEQVRIie2W3UtTYRzHv79tuqN43Oo0X2q56ZzikmxI5qDoRXcRgUSF0E0S1E3SRV11EyYF0XXRVVD/QP9ORBF4USANc2c6dc7z/OQ509x502PRRbDvzXn7PR++v5fn8BDqlOqKwSFRBYQR4MHp1/T142MwVxAMA2BL5LfFgnkNOAl1CgRAP4vgwetPN+fePeChW3NU0IEAeS7xdkgElHWAgp3VJwuLPBwDfVpG06vESVQr39EWBXjPpQ+HDCpVYORfvOd0DPQF4NQRGPmXH2hlU9bCPSl33wTSl8A9yVFx5dFVWq5F0i9AXJqd4ERqnIpLADmXezgUwJqAcfHZG5ZVWNkpzirAxwDj8vO3WJfpbvkBEqi0DE70jopzM+PS1e8o6XIJEGO3s9yXzpEurdMBQPm9bMA4OzvPnfLe9n0NkK7F2MN5mYWN5wLc0MGa2iWyd6+ZqdojArUSGGdm8twRjWO9uA9QNqNYAQ/fuM/Jo6CSsyBmWAngnnaIzM17pG9ammMFsmG+EZnpOwg6NkNdXK00fGp6phZX9QCuFcHH48MiNdlvuvPaEASQDoj+iSSfSGZR3kvbAqRVA6J3Yoo7m4F1D9iuNmRzghB9k1NU3htyR1M4cX4STZ4bwaqQjL+Qr39nAbIaauF4LofKPunaXcZzYxxpbnN3qPWPcEdGoYPS3ZGM41i6CdpA1t2hNnCaVQKqHgS7qjIruR0HRzyA6QwUAIZPoKxz2Fw35A6MJnrNuTqM5DxGk32uQKjd3b66a3epdne5A1s17U+A3KJFXYEcjqi+67cr+UtUVI+xCSlhOiSQZEZBJewOJPIzzlaxdZ1t67HX/8UP1g3492oAG8AGsAFsAP8RMGR5UiLtaHU93HtLxisR1RVIhc8/oGy1Ow7qBwCpsCBP4/+DAGwDcnnbZDDA4J8AAAAASUVORK5CYII=";class gs{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(e,t){if(t){let s=t.dataProjection?X(t.dataProjection):this.readProjection(e);t.extent&&s&&s.getUnits()==="tile-pixels"&&(s=X(s),s.setWorldExtent(t.extent)),t={dataProjection:s,featureProjection:t.featureProjection}}return this.adaptOptions(t)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)}getType(){return E()}readFeature(e,t){return E()}readFeatures(e,t){return E()}readGeometry(e,t){return E()}readProjection(e){return E()}writeFeature(e,t){return E()}writeFeatures(e,t){return E()}writeGeometry(e,t){return E()}}function it(n,e,t){const s=t?X(t.featureProjection):null,i=t?X(t.dataProjection):null;let r;if(s&&i&&!zt(s,i)?r=(e?n.clone():n).transform(e?s:i,e?i:s):r=n,e&&t&&t.decimals!==void 0){const o=Math.pow(10,t.decimals),a=function(l){for(let g=0,h=l.length;g<h;++g)l[g]=Math.round(l[g]*o)/o;return l};r===n&&(r=n.clone()),r.applyTransform(a)}return r}class fs extends gs{constructor(){super()}getType(){return"json"}readFeature(e,t){return this.readFeatureFromObject(Se(e),this.getReadOptions(e,t))}readFeatures(e,t){return this.readFeaturesFromObject(Se(e),this.getReadOptions(e,t))}readFeatureFromObject(e,t){return E()}readFeaturesFromObject(e,t){return E()}readGeometry(e,t){return this.readGeometryFromObject(Se(e),this.getReadOptions(e,t))}readGeometryFromObject(e,t){return E()}readProjection(e){return this.readProjectionFromObject(Se(e))}readProjectionFromObject(e){return E()}writeFeature(e,t){return JSON.stringify(this.writeFeatureObject(e,t))}writeFeatureObject(e,t){return E()}writeFeatures(e,t){return JSON.stringify(this.writeFeaturesObject(e,t))}writeFeaturesObject(e,t){return E()}writeGeometry(e,t){return JSON.stringify(this.writeGeometryObject(e,t))}writeGeometryObject(e,t){return E()}}function Se(n){if(typeof n=="string"){const e=JSON.parse(n);return e||null}else return n!==null?n:null}var ms=fs;class ps extends ms{constructor(e){e=e||{};super();this.dataProjection=X(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=X(e.featureProjection)),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,t){let s=null;e.type==="Feature"?s=e:s={type:"Feature",geometry:e,properties:null};const i=Ie(s.geometry,t),r=new D;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in s!==void 0&&r.setGeometryName(s.geometry_name),r.setGeometry(i),"id"in s&&r.setId(s.id),s.properties&&r.setProperties(s.properties,!0),r}readFeaturesFromObject(e,t){const s=e;let i=null;if(s.type==="FeatureCollection"){const r=e;i=[];const o=r.features;for(let a=0,l=o.length;a<l;++a)i.push(this.readFeatureFromObject(o[a],t))}else i=[this.readFeatureFromObject(e,t)];return i}readGeometryFromObject(e,t){return Ie(e,t)}readProjectionFromObject(e){const t=e.crs;let s;return t?t.type=="name"?s=X(t.properties.name):t.type==="EPSG"?s=X("EPSG:"+t.properties.code):Kt(!1,36):s=this.dataProjection,s}writeFeatureObject(e,t){t=this.adaptOptions(t);const s={type:"Feature",geometry:null,properties:null},i=e.getId();if(i!==void 0&&(s.id=i),!e.hasProperties())return s;const r=e.getProperties(),o=e.getGeometry();return o&&(s.geometry=be(o,t),delete r[e.getGeometryName()]),Jt(r)||(s.properties=r),s}writeFeaturesObject(e,t){t=this.adaptOptions(t);const s=[];for(let i=0,r=e.length;i<r;++i)s.push(this.writeFeatureObject(e[i],t));return{type:"FeatureCollection",features:s}}writeGeometryObject(e,t){return be(e,this.adaptOptions(t))}}function Ie(n,e){if(!n)return null;let t;switch(n.type){case"Point":{t=vs(n);break}case"LineString":{t=Cs(n);break}case"Polygon":{t=Ss(n);break}case"MultiPoint":{t=ws(n);break}case"MultiLineString":{t=_s(n);break}case"MultiPolygon":{t=As(n);break}case"GeometryCollection":{t=ys(n);break}default:throw new Error("Unsupported GeoJSON type: "+n.type)}return it(t,!1,e)}function ys(n,e){const t=n.geometries.map(function(s){return Ie(s,e)});return new ls(t)}function vs(n){return new Y(n.coordinates)}function Cs(n){return new Me(n.coordinates)}function _s(n){return new ds(n.coordinates)}function ws(n){return new st(n.coordinates)}function As(n){return new cs(n.coordinates)}function Ss(n){return new xe(n.coordinates)}function be(n,e){n=it(n,!0,e);const t=n.getType();let s;switch(t){case"Point":{s=Gs(n);break}case"LineString":{s=Ps(n);break}case"Polygon":{s=Ms(n,e);break}case"MultiPoint":{s=xs(n);break}case"MultiLineString":{s=Es(n);break}case"MultiPolygon":{s=Rs(n,e);break}case"GeometryCollection":{s=Fs(n,e);break}case"Circle":{s={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return s}function Fs(n,e){e=Object.assign({},e),delete e.featureProjection;const t=n.getGeometriesArray().map(function(s){return be(s,e)});return{type:"GeometryCollection",geometries:t}}function Ps(n,e){return{type:"LineString",coordinates:n.getCoordinates()}}function Es(n,e){return{type:"MultiLineString",coordinates:n.getCoordinates()}}function xs(n,e){return{type:"MultiPoint",coordinates:n.getCoordinates()}}function Rs(n,e){let t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:n.getCoordinates(t)}}function Gs(n,e){return{type:"Point",coordinates:n.getCoordinates()}}function Ms(n,e){let t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:n.getCoordinates(t)}}var Os=ps,Is="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABBCAYAAACO98lFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABtRJREFUeNrsmQlMVEcYgP+3LLu6LLuc2op44g3UpgYv1FKj0Vql2iguobVEoyXRtCmRiLZSLIpgJFAVr1J7qaU2JdKq2IpHpUKoVQsWRIKt4AEsXWAP5Np9nZm3+96uxKrJXjbzJ3/evGFm+Od7//wz/yzDsiw4WYKQLkI6EWkIUqW5/hrSRqQnkJY60yDGiRBikSY060yR52q64EZjDzRojKDr5P7/2OfEECAXwczRUnhhsCeGsRfpDqQP/g8Q5uHJX6nvWZRTrAP0fGwHDCN+mheoIvqDpweTjKq2P8sQ3m9/YNr54XEt4K//tPK80gO2LV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Fg9H8RgZqPdY2omQFhjfXhcPwLEaw2u+YTaXRfGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZBwfAPyS0NpIuz6SbAAAAAElFTkSuQmCC",Ls="./assets/gps.6db62e8f.png";const V=n=>(Xe("data-v-4020d383"),n=n(),We(),n),Ts=V(()=>u("div",{id:"mapHis",style:{height:"calc(100vh - 84px)",width:"100%"}},null,-1)),ks={style:{position:"absolute",left:"0.5em",top:"0.5em"}},Vs={slot:"header",class:"clearfix bg-blue padding-sm"},js={class:"padding-sm"},Qs={class:"item flex align-center"},Ns={style:{width:"60px","font-size":"28px"}},Bs={style:{width:"calc(100% - 60px)"}},Us={class:"item flex align-center margin-tb-sm"},Ys=V(()=>u("div",{style:{width:"60px"}},"\u901F\u5EA6\uFF1A",-1)),Xs={style:{width:"calc(100% - 60px)"}},Ws={class:"item flex align-center"},Hs=V(()=>u("div",{style:{width:"50px"}},"\u5F00\u59CB\uFF1A",-1)),Zs={class:"item flex align-center margin-tb-sm"},Ds=V(()=>u("div",{style:{width:"50px"}},"\u7ED3\u675F\uFF1A",-1)),qs={class:"item",style:{"padding-left":"50px"}},zs=U("\u67E5\u8BE2"),Ks={id:"mapOpen",class:"mapOpen"},Js={class:"mapTitle"},$s={id:"mapCont",class:"mapCont"},ei=V(()=>u("div",null,"\u7ECF\u5EA6\uFF1A",-1)),ti=V(()=>u("div",null,"\u7ECF\u5EA6\uFF1A",-1)),si=V(()=>u("div",null,"\u822A\u901F\uFF1A",-1)),ii=V(()=>u("div",null,"\u8239\u824F\u5411\uFF1A",-1)),ni=V(()=>u("div",null,"\u822A\u8FF9\u5411\uFF1A",-1)),ri={props:{oneShip:{type:Object,default:{}}},setup(n){const e=n;Ne();const{proxy:t}=dt(),s=$(!1);let i=0,r,o=["---","---","---","---","---","---","---","---"],a=$(null);var l=null,g=null,h=null,w=null,y=null,_=null,f=null,F={route:new q({stroke:new Re({width:6,color:[237,212,0,0]})}),geoMarker:new q({image:new $t({radius:7,fill:new oe({color:"black"}),stroke:new Re({color:"red",width:2})})})};const b=ge({center:ee([118.26718,22.45402]),zoom:14,minZoom:2,maxZoom:18}),{oneShip:M}=Pe(e);Be(M,v=>{c(),i=0,ue()},{deep:!0});const W=ge({queryParams:{key:"7b581bc63821b05b2870456fbb6f47df",mmsi:"",start:"",end:""},selectedDays:[t.parseTime(new Date,"{y}-{m}-{d}")+" 00:00:00",t.parseTime(new Date,"{y}-{m}-{d}")+" 23:59:59"],lengSli:0,speedSli:4,nowHis:["---","---","---","---","---","---","---","---"]}),{queryParams:L,selectedDays:j,lengSli:Q,speedSli:z,nowHis:A}=Pe(W),de=function(){const v=new ye({visible:!0,source:new ve({url:"https://t1.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=317e52a409b6b382957e09003ee7e235"}),isGroup:!0,name:"\u5929\u5730\u56FE\u8DEF\u7F51"}),C=new ye({visible:!0,source:new ve({url:"https://t3.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=317e52a409b6b382957e09003ee7e235"}),isGroup:!0,name:"\u5929\u5730\u56FE\u6587\u5B57\u6807\u6CE8"});a.value=new Ke({layers:[v,C],view:new Je(b),target:"mapHis"})},ue=function(){M.value.mmsi!=""&&(L.value.mmsi=M.value.mmsi,L.value.start=new Date(j.value[0]).getTime(),L.value.end=new Date(j.value[1]).getTime(),ts(L.value).then(v=>{let C=[],O=ss(v.data)[L.value.mmsi];O=O.reverse(),O.forEach((m,x)=>{let K=ee([m.lon,m.lat],"EPSG:4326");m.glng=K[0],m.glat=K[1],C.push([m.glng,m.glat,t.parseTime(new Date(parseInt(m.createdAt)),"{y}-{m}-{d} {h}:{m}:{s}"),m.speed==""?0:m.speed,m.hdg==""?0:m.hdg,m.cog==""?0:m.cog,m.lon,m.lat])}),A.value=C[0],o=C[C.length-1];const N={type:"Feature",properties:{},geometry:{type:"LineString",coordinates:C}};_=new Os().readFeature(N,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}).getGeometry();const I=new D({type:"route",geometry:_});f=new Y(_.getFirstCoordinate()),y=new D({type:"geoMarker",geometry:f}),ce(),l=new ae({source:new le({features:[I]}),style:se,zIndex:2}),g=new ae({source:new le({features:[I,y]}),style:function(m){return F[m.get("type")]},zIndex:100}),h=B(_.getFirstCoordinate(),Is),w=B(_.getLastCoordinate(),bs),a.value.addLayer(h),a.value.addLayer(w),a.value.addLayer(g),a.value.addLayer(l),a.value.getView().animate({center:_.getFirstCoordinate(),duration:1e3});function T(m){return new q({image:new pe({src:m,anchor:[.5,.5],scale:1.1})})}function B(m,x){return new ae({style:T(x),source:new le({features:[new D({geometryName:"centerMark",geometry:new Y(m)})]})})}function se(m,x){for(var K=m.getGeometry(),nt=K.getLength(),rt=100*x/nt,Le=1e4,Te=[new q({stroke:new Re({color:"red",width:2})})],Fe=0;Fe<=1;Fe+=rt){var ie=K.getCoordinateAt(Fe);K.forEachSegment(function(J,H){if(!(J[0]==H[0]||J[1]==H[1])){var ke=H[0]-ie[0],Ve=H[1]-ie[1],je=ie[0]-J[0],Qe=ie[1]-J[1];if(ke!=je&&Ve!=Qe&&Math.abs(Le*ke*Qe-Le*je*Ve)<.001){var ot=H[0]-J[0],at=H[1]-J[1],lt=Math.atan2(at,ot);Te.push(new q({geometry:new Y(ie),image:new pe({scale:.1,src:Ls,anchor:[.5,.5],rotation:-lt+Math.PI*3/2}),text:new ze({text:H[2],textAlign:"center",textBaseline:"middle",font:"normal 10px \u5FAE\u8F6F\u96C5\u9ED1",offsetX:0,offsetY:16,fill:new oe({color:"#000"}),backgroundFill:new oe({color:"rgba(255, 255, 255, 0.8)"}),padding:[2,4,2,4]})}))}}})}return Te}}))},ce=function(){l!=null&&(i=0,Q.value=0,l.getSource().clear(),g.getSource().clear(),h.getSource().clear(),w.getSource().clear())};function he(v){const C=Number(z.value),O=v.frameState.time,N=O-r;if(i=(i+C*10*N/1e6)%2,r=O,i>1){c(),i=0,A.value=o;return}Q.value=i;const I=_.getCoordinateAt(i);f.setCoordinates(I);const T=as(v);T.setStyle(F.geoMarker),T.drawGeometry(f),A.value=I,a.value.render()}function d(){s.value=!0,r=Date.now(),g.on("postrender",he),y.setGeometry(null)}function c(){s.value=!1,y.setGeometry(f),g.un("postrender",he)}return Ue(()=>{de()}),(v,C)=>{const O=P("videoPlay"),N=P("el-icon"),I=P("videoPause"),T=P("el-slider"),B=P("el-date-picker"),se=P("el-button"),m=P("el-card");return k(),fe("div",null,[Ts,u("div",ks,[S(m,{class:"box-card","body-style":{width:"300px",padding:"0px !important"}},{default:G(()=>[u("div",Vs,[u("span",null,R(p(M).name),1)]),u("div",js,[u("div",Qs,[u("div",Ns,[s.value?(k(),ne(N,{key:1,onClick:c},{default:G(()=>[S(I)]),_:1})):(k(),ne(N,{key:0,onClick:d},{default:G(()=>[S(O)]),_:1}))]),u("div",Bs,[S(T,{modelValue:p(Q),"onUpdate:modelValue":C[0]||(C[0]=x=>Ye(Q)?Q.value=x:null),max:1,min:0},null,8,["modelValue"])])]),u("div",Us,[Ys,u("div",Xs,[S(T,{modelValue:p(z),"onUpdate:modelValue":C[1]||(C[1]=x=>Ye(z)?z.value=x:null),max:10,min:0},null,8,["modelValue"])])]),u("div",Ws,[Hs,S(B,{modelValue:p(j)[0],"onUpdate:modelValue":C[2]||(C[2]=x=>p(j)[0]=x),type:"datetime",placeholder:"\u9009\u62E9\u65E5\u671F\u65F6\u95F4"},null,8,["modelValue"])]),u("div",Zs,[Ds,S(B,{modelValue:p(j)[1],"onUpdate:modelValue":C[3]||(C[3]=x=>p(j)[1]=x),type:"datetime",placeholder:"\u9009\u62E9\u65E5\u671F\u65F6\u95F4"},null,8,["modelValue"])]),u("div",qs,[S(se,{style:{width:"100%"},type:"primary",onClick:ue},{default:G(()=>[zs]),_:1})])])]),_:1})]),u("div",Ks,[u("div",Js,R(p(A)[2].split("NaN")[0]),1),u("div",$s,[u("div",null,[ei,u("div",null,R(p(A)[6]=="---"?"---":parseFloat(p(A)[6])),1)]),u("div",null,[ti,u("div",null,R(p(A)[7]=="---"?"---":parseFloat(p(A)[7])),1)]),u("div",null,[si,u("div",null,R(p(A)[3]=="---"?"---":parseFloat(p(A)[3]).toFixed(1))+" km/h",1)]),u("div",null,[ii,u("div",null,R(p(A)[4]=="---"?"---":parseFloat(p(A)[4]).toFixed(1))+" \xB0",1)]),u("div",null,[ni,u("div",null,R(p(A)[5]=="---"?"---":parseFloat(p(A)[5]).toFixed(1))+" \xB0",1)])])])])}}};var oi=$e(ri,[["__scopeId","data-v-4020d383"]]);const te=n=>(Xe("data-v-27630e4c"),n=n(),We(),n),ai={class:"padding-lr-sm"},li={class:"head-container"},di={class:"head-container",style:{height:"calc(100vh - 126px)","overflow-y":"auto"}},ui=te(()=>u("div",{id:"map",style:{height:"calc(100vh - 84px)",width:"100%"}},null,-1)),ci={style:{position:"absolute",left:"0.5em",top:"0.5em"}},hi={slot:"header",class:"clearfix bg-blue padding-sm"},gi={style:{padding:"10px 20px"}},fi={class:"text item"},mi=te(()=>u("span",{class:"text-blue"},"\u7ECF\u5EA6\uFF1A",-1)),pi={class:"text item",style:{padding:"5px 0"}},yi=te(()=>u("span",{class:"text-blue"},"\u7EAC\u5EA6\uFF1A",-1)),vi={class:"text item"},Ci=te(()=>u("span",{class:"text-blue"},"\u822A\u901F\uFF1A",-1)),_i={class:"text item"},wi=te(()=>u("span",{class:"text-blue"},"\u5403\u6C34\uFF1A",-1)),Ai={class:"text item",style:{padding:"5px 0"}},Si=te(()=>u("span",{class:"text-blue"},"\u8239\u824F\u5411\uFF1A",-1)),Fi={style:{position:"absolute",right:"0.5em",top:"0.5em","z-index":"2005"}},Pi=U("\u5386\u53F2\u8F68\u8FF9"),Ei=U("\u5B9E\u65F6\u4F4D\u7F6E"),xi={key:0,style:{position:"absolute",right:"0",top:"0",width:"100%","z-index":"2000","background-color":"#000"}},Ri={setup(n){const e=Ne();let t=$(null),s=$(null);const i=ge({center:ee([118.26718,22.45402]),zoom:14,minZoom:2,maxZoom:18});let r=rs(),o=null,a=[],l=!1,g={},h=null;const w=$(""),y=$([]),_=ge({nowShip:{mmsi:"",name:"-----",lon:"-----",lat:"-----",hdg:"-----",sog:"-----"},hisShip:{},showHis:!1}),{nowShip:f,showHis:F,hisShip:b}=Pe(_),M=function(d){L(d)},W=function(d){if(d=="")y.value=a;else{let c=[];a.forEach(v=>{JSON.stringify(v).indexOf(d)!=-1&&c.push(v)}),y.value=c}},L=function(d){if(f.value.mmsi!=d){let c=y.value;for(let v=0;v<c.length;v++)if(c[v].mmsi==d){f.value=c[v],ce(f.value);break}}},j=function(){let d=document.getElementById("map");for(;d.firstChild;)d.removeChild(d.firstChild);t.value!=null&&t.value.clear();const c=new ye({visible:!0,source:new ve({url:"https://t1.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=317e52a409b6b382957e09003ee7e235"}),isGroup:!0,name:"\u5929\u5730\u56FE\u8DEF\u7F51"}),v=new ye({visible:!0,source:new ve({url:"https://t3.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=317e52a409b6b382957e09003ee7e235"}),isGroup:!0,name:"\u5929\u5730\u56FE\u6587\u5B57\u6807\u6CE8"});t.value=new Ke({layers:[c,v],view:new Je(i),target:"map"});var C=new D({});C.setStyle(Q(C)),s.value=new le({features:[C]}),h!=null&&t.value.removeLayer(h),h=new ae({source:s.value}),t.value.addLayer(h)},Q=function(d){return new q({image:new pe({anchor:d.values_==null?[0,0]:d.values_.anchor==null?[.5,.98]:d.values_.anchor,anchorOrigin:"top-right",src:es,rotation:(d.values_==null||d.values_.cog==null?0:d.values_.cog)*(Math.PI/180)})})},z=function(d){var c=new D({geometry:new Y(ee(d.ol)),name:d.name,key:d.mmsi,cog:d.hdg,anchor:d.anchor});c.setStyle(A(c)),g[d.mmsi]=new ae({source:new le({features:[c]})}),t.value.addLayer(g[d.mmsi])},A=function(d){return new q({image:new pe({anchor:d.values_==null?[0,0]:d.values_.anchor==null?[.5,1]:d.values_.anchor,anchorOrigin:"top-right",src:hs,rotation:(d.values_==null||d.values_.cog==null?0:d.values_.cog)*(Math.PI/180)}),text:new ze({textAlign:"center",font:"10px \u5FAE\u8F6F\u96C5\u9ED1",offsetX:0,offsetY:16,text:d.get("name"),fill:new oe({color:"#000"}),backgroundFill:new oe({color:"rgba(255, 255, 255, 0.8)"}),padding:[2,4,2,4]})})},de=function(){is(r.toString()).then(d=>{if(d.data!=null){let c="";d.data!=null?(c=d.data,localStorage.setItem("Histroy-List",c)):localStorage.getItem("Histroy-List")!=null&&localStorage.getItem("Histroy-List")!=null?c=localStorage.getItem("Histroy-List"):c="";let v=ns(c);f.value=v[0],ue(v)}})},ue=function(d){d.forEach(c=>{g[c.mmsi]!=null&&(g[c.mmsi].getSource().clear(),t.value.removeLayer(g[c.mmsi])),z(c)}),e.state.data.shipList=d,e.state.data.curShipMMsi==null&&(e.state.data.curShipMMsi="413859981"),f.value=d.filter(c=>c.mmsi==e.state.data.curShipMMsi)[0],e.state.data.curShipMMsi=f.value.mmsi,e.state.data.curShipSn=f.value.sn,e.state.data.curShipDevice=f.value.device,y.value=d,a=d,l||(l=!0,ce(f.value))},ce=function(d){s.value.clear();var c=new D({geometry:new Y(ee(d.ol)),cog:d.hdg,anchor:d.anchor});c.setStyle(Q(c)),s.value.addFeature(c),t.value.getView().animate({center:ee(f.value.ol),duration:1e3}),b.value=f.value,e.state.data.curShipMMsi=f.value.mmsi,e.state.data.curShipSn=f.value.sn,e.state.data.curShipDevice=f.value.device},he=function(){t.value&&t.value.on("click",function(d){if(!!t.value){var c=t.value.forEachFeatureAtPixel(d.pixel,function(v,C){return v});c!=null&&L(c.values_.key)}})};return Be([()=>e.state.data.curShipMMsi],([d])=>{L(d)}),Ue(()=>{j(),l=!1,setTimeout(()=>{de(),o=setInterval(()=>{de()},30*1e3),he()},100)}),ut(()=>{clearInterval(o)}),(d,c)=>{const v=P("el-input"),C=P("svg-icon"),O=P("el-menu-item"),N=P("el-menu"),I=P("el-col"),T=P("el-card"),B=P("el-button"),se=P("el-row");return k(),fe("div",ai,[S(se,{gutter:20},{default:G(()=>[S(I,{span:3,xs:24},{default:G(()=>[u("div",li,[S(v,{placeholder:"\u8BF7\u8F93\u5165\u8239\u8236\u540D\u79F0",clearable:"","prefix-icon":"Search",style:{"margin-top":"10px"},onInput:W,modelValue:w.value,"onUpdate:modelValue":c[0]||(c[0]=m=>w.value=m)},null,8,["modelValue"])]),u("div",di,[S(N,{"default-active":""+p(f).mmsi,onSelect:M},{default:G(()=>[(k(!0),fe(ct,null,ht(y.value,(m,x)=>(k(),ne(O,{index:""+m.mmsi,key:x},{title:G(()=>[S(C,{"icon-class":"ship",class:"text-blue"}),u("span",null,R(m.name),1)]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"])])]),_:1}),S(I,{span:21,xs:24,style:{position:"relative",padding:"0"}},{default:G(()=>[ui,u("div",ci,[S(T,{class:"box-card","body-style":{width:"200px",padding:"0px !important"}},{default:G(()=>[u("div",hi,[u("span",null,R(p(f).name),1)]),u("div",gi,[u("div",fi,[mi,U(R(p(f).lon),1)]),u("div",pi,[yi,U(R(p(f).lat),1)]),u("div",vi,[Ci,U(R(p(f).sog)+" \u8282",1)]),u("div",_i,[wi,U(R(p(f).draught)+" m",1)]),u("div",Ai,[Si,U(R(p(f).hdg)+" \xB0",1)])])]),_:1})]),u("div",Fi,[p(F)?Ee("",!0):(k(),ne(B,{key:0,type:"primary",onClick:c[1]||(c[1]=m=>F.value=!0)},{default:G(()=>[Pi]),_:1})),p(F)?(k(),ne(B,{key:1,type:"primary",onClick:c[2]||(c[2]=m=>F.value=!1)},{default:G(()=>[Ei]),_:1})):Ee("",!0)]),p(F)?(k(),fe("div",xi,[S(p(oi),{oneShip:p(b)},null,8,["oneShip"])])):Ee("",!0)]),_:1})]),_:1})])}}};var Ii=$e(Ri,[["__scopeId","data-v-27630e4c"]]);export{Ii as default};