signalk-onaplotter 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +52 -2
- package/index.js +310 -0
- package/package.json +28 -4
- package/public/OnaPlotter.styles.css +365 -0
- package/public/OnaPlotter.styles.css.br +0 -0
- package/public/OnaPlotter.styles.css.gz +0 -0
- package/public/_framework/Microsoft.AspNetCore.Components.Web.lzlha3sebn.wasm +0 -0
- package/public/_framework/Microsoft.AspNetCore.Components.Web.lzlha3sebn.wasm.br +0 -0
- package/public/_framework/Microsoft.AspNetCore.Components.Web.lzlha3sebn.wasm.gz +0 -0
- package/public/_framework/Microsoft.AspNetCore.Components.WebAssembly.hgb9kb1ko8.wasm +0 -0
- package/public/_framework/Microsoft.AspNetCore.Components.WebAssembly.hgb9kb1ko8.wasm.br +0 -0
- package/public/_framework/Microsoft.AspNetCore.Components.WebAssembly.hgb9kb1ko8.wasm.gz +0 -0
- package/public/_framework/Microsoft.AspNetCore.Components.ctlimky0ld.wasm +0 -0
- package/public/_framework/Microsoft.AspNetCore.Components.ctlimky0ld.wasm.br +0 -0
- package/public/_framework/Microsoft.AspNetCore.Components.ctlimky0ld.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.Abstractions.ex1njydbd4.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.Abstractions.ex1njydbd4.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.Abstractions.ex1njydbd4.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.EnvironmentVariables.dufoils7aa.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.EnvironmentVariables.dufoils7aa.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.EnvironmentVariables.dufoils7aa.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.Json.2cwa6dgvjw.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.Json.2cwa6dgvjw.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.Json.2cwa6dgvjw.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.tf0s85350j.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.tf0s85350j.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Configuration.tf0s85350j.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.DependencyInjection.Abstractions.ykrsa5qwvj.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.DependencyInjection.Abstractions.ykrsa5qwvj.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.DependencyInjection.Abstractions.ykrsa5qwvj.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.DependencyInjection.q4ogihpz4g.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.DependencyInjection.q4ogihpz4g.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.DependencyInjection.q4ogihpz4g.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Diagnostics.Abstractions.w51v02shrt.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Diagnostics.Abstractions.w51v02shrt.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Diagnostics.Abstractions.w51v02shrt.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Diagnostics.jdah25iecf.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Diagnostics.jdah25iecf.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Diagnostics.jdah25iecf.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Hosting.Abstractions.2esolmyrj5.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Hosting.Abstractions.2esolmyrj5.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Hosting.Abstractions.2esolmyrj5.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Logging.Abstractions.zwtdylwuov.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Logging.Abstractions.zwtdylwuov.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Logging.Abstractions.zwtdylwuov.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Logging.xmx5eyc5ch.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Logging.xmx5eyc5ch.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Logging.xmx5eyc5ch.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Options.bxcwufxpzd.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Options.bxcwufxpzd.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Options.bxcwufxpzd.wasm.gz +0 -0
- package/public/_framework/Microsoft.Extensions.Primitives.r28g7oh1t8.wasm +0 -0
- package/public/_framework/Microsoft.Extensions.Primitives.r28g7oh1t8.wasm.br +0 -0
- package/public/_framework/Microsoft.Extensions.Primitives.r28g7oh1t8.wasm.gz +0 -0
- package/public/_framework/Microsoft.JSInterop.WebAssembly.kthmj8ue8z.wasm +0 -0
- package/public/_framework/Microsoft.JSInterop.WebAssembly.kthmj8ue8z.wasm.br +0 -0
- package/public/_framework/Microsoft.JSInterop.WebAssembly.kthmj8ue8z.wasm.gz +0 -0
- package/public/_framework/Microsoft.JSInterop.z69euz7ekt.wasm +0 -0
- package/public/_framework/Microsoft.JSInterop.z69euz7ekt.wasm.br +0 -0
- package/public/_framework/Microsoft.JSInterop.z69euz7ekt.wasm.gz +0 -0
- package/public/_framework/OnaPlotter.g1oyk97tth.wasm +0 -0
- package/public/_framework/OnaPlotter.g1oyk97tth.wasm.br +0 -0
- package/public/_framework/OnaPlotter.g1oyk97tth.wasm.gz +0 -0
- package/public/_framework/System.Collections.0y3lxq9yiz.wasm +0 -0
- package/public/_framework/System.Collections.0y3lxq9yiz.wasm.br +0 -0
- package/public/_framework/System.Collections.0y3lxq9yiz.wasm.gz +0 -0
- package/public/_framework/System.Collections.Concurrent.y1gijyulzg.wasm +0 -0
- package/public/_framework/System.Collections.Concurrent.y1gijyulzg.wasm.br +0 -0
- package/public/_framework/System.Collections.Concurrent.y1gijyulzg.wasm.gz +0 -0
- package/public/_framework/System.Collections.Immutable.bv8sm0hn96.wasm +0 -0
- package/public/_framework/System.Collections.Immutable.bv8sm0hn96.wasm.br +0 -0
- package/public/_framework/System.Collections.Immutable.bv8sm0hn96.wasm.gz +0 -0
- package/public/_framework/System.Collections.NonGeneric.demk1o8khk.wasm +0 -0
- package/public/_framework/System.Collections.NonGeneric.demk1o8khk.wasm.br +0 -0
- package/public/_framework/System.Collections.NonGeneric.demk1o8khk.wasm.gz +0 -0
- package/public/_framework/System.Collections.Specialized.ybmtdn8n9q.wasm +0 -0
- package/public/_framework/System.Collections.Specialized.ybmtdn8n9q.wasm.br +0 -0
- package/public/_framework/System.Collections.Specialized.ybmtdn8n9q.wasm.gz +0 -0
- package/public/_framework/System.ComponentModel.Primitives.hdixdh1geb.wasm +0 -0
- package/public/_framework/System.ComponentModel.Primitives.hdixdh1geb.wasm.br +0 -0
- package/public/_framework/System.ComponentModel.Primitives.hdixdh1geb.wasm.gz +0 -0
- package/public/_framework/System.ComponentModel.TypeConverter.80a5fdjdf1.wasm +0 -0
- package/public/_framework/System.ComponentModel.TypeConverter.80a5fdjdf1.wasm.br +0 -0
- package/public/_framework/System.ComponentModel.TypeConverter.80a5fdjdf1.wasm.gz +0 -0
- package/public/_framework/System.ComponentModel.er3kikotc9.wasm +0 -0
- package/public/_framework/System.ComponentModel.er3kikotc9.wasm.br +0 -0
- package/public/_framework/System.ComponentModel.er3kikotc9.wasm.gz +0 -0
- package/public/_framework/System.Console.ztyrgmguq9.wasm +0 -0
- package/public/_framework/System.Console.ztyrgmguq9.wasm.br +0 -0
- package/public/_framework/System.Console.ztyrgmguq9.wasm.gz +0 -0
- package/public/_framework/System.Diagnostics.DiagnosticSource.8ovi6htwue.wasm +0 -0
- package/public/_framework/System.Diagnostics.DiagnosticSource.8ovi6htwue.wasm.br +0 -0
- package/public/_framework/System.Diagnostics.DiagnosticSource.8ovi6htwue.wasm.gz +0 -0
- package/public/_framework/System.IO.Pipelines.ehyowalz06.wasm +0 -0
- package/public/_framework/System.IO.Pipelines.ehyowalz06.wasm.br +0 -0
- package/public/_framework/System.IO.Pipelines.ehyowalz06.wasm.gz +0 -0
- package/public/_framework/System.Linq.77nzpgno3g.wasm +0 -0
- package/public/_framework/System.Linq.77nzpgno3g.wasm.br +0 -0
- package/public/_framework/System.Linq.77nzpgno3g.wasm.gz +0 -0
- package/public/_framework/System.Memory.96u3edrscq.wasm +0 -0
- package/public/_framework/System.Memory.96u3edrscq.wasm.br +0 -0
- package/public/_framework/System.Memory.96u3edrscq.wasm.gz +0 -0
- package/public/_framework/System.Net.Http.04zi0q3bww.wasm +0 -0
- package/public/_framework/System.Net.Http.04zi0q3bww.wasm.br +0 -0
- package/public/_framework/System.Net.Http.04zi0q3bww.wasm.gz +0 -0
- package/public/_framework/System.Net.Http.Json.dfsls33yd0.wasm +0 -0
- package/public/_framework/System.Net.Http.Json.dfsls33yd0.wasm.br +0 -0
- package/public/_framework/System.Net.Http.Json.dfsls33yd0.wasm.gz +0 -0
- package/public/_framework/System.Net.Primitives.3bql0h4h9x.wasm +0 -0
- package/public/_framework/System.Net.Primitives.3bql0h4h9x.wasm.br +0 -0
- package/public/_framework/System.Net.Primitives.3bql0h4h9x.wasm.gz +0 -0
- package/public/_framework/System.Net.WebSockets.Client.yabl5yso4d.wasm +0 -0
- package/public/_framework/System.Net.WebSockets.Client.yabl5yso4d.wasm.br +0 -0
- package/public/_framework/System.Net.WebSockets.Client.yabl5yso4d.wasm.gz +0 -0
- package/public/_framework/System.Net.WebSockets.btb8u9bs63.wasm +0 -0
- package/public/_framework/System.Net.WebSockets.btb8u9bs63.wasm.br +0 -0
- package/public/_framework/System.Net.WebSockets.btb8u9bs63.wasm.gz +0 -0
- package/public/_framework/System.ObjectModel.y2vjd96rm0.wasm +0 -0
- package/public/_framework/System.ObjectModel.y2vjd96rm0.wasm.br +0 -0
- package/public/_framework/System.ObjectModel.y2vjd96rm0.wasm.gz +0 -0
- package/public/_framework/System.Private.CoreLib.18u2ssdtkz.wasm +0 -0
- package/public/_framework/System.Private.CoreLib.18u2ssdtkz.wasm.br +0 -0
- package/public/_framework/System.Private.CoreLib.18u2ssdtkz.wasm.gz +0 -0
- package/public/_framework/System.Private.Uri.lipib74a1x.wasm +0 -0
- package/public/_framework/System.Private.Uri.lipib74a1x.wasm.br +0 -0
- package/public/_framework/System.Private.Uri.lipib74a1x.wasm.gz +0 -0
- package/public/_framework/System.Private.Xml.Linq.01wrv6yr49.wasm +0 -0
- package/public/_framework/System.Private.Xml.Linq.01wrv6yr49.wasm.br +0 -0
- package/public/_framework/System.Private.Xml.Linq.01wrv6yr49.wasm.gz +0 -0
- package/public/_framework/System.Private.Xml.h7x38gg1kw.wasm +0 -0
- package/public/_framework/System.Private.Xml.h7x38gg1kw.wasm.br +0 -0
- package/public/_framework/System.Private.Xml.h7x38gg1kw.wasm.gz +0 -0
- package/public/_framework/System.Runtime.InteropServices.JavaScript.fymien2tnc.wasm +0 -0
- package/public/_framework/System.Runtime.InteropServices.JavaScript.fymien2tnc.wasm.br +0 -0
- package/public/_framework/System.Runtime.InteropServices.JavaScript.fymien2tnc.wasm.gz +0 -0
- package/public/_framework/System.Runtime.InteropServices.h45u78t9gg.wasm +0 -0
- package/public/_framework/System.Runtime.InteropServices.h45u78t9gg.wasm.br +0 -0
- package/public/_framework/System.Runtime.InteropServices.h45u78t9gg.wasm.gz +0 -0
- package/public/_framework/System.Runtime.nqxxfenwc0.wasm +0 -0
- package/public/_framework/System.Runtime.nqxxfenwc0.wasm.br +0 -0
- package/public/_framework/System.Runtime.nqxxfenwc0.wasm.gz +0 -0
- package/public/_framework/System.Security.Cryptography.r8xdxuwcik.wasm +0 -0
- package/public/_framework/System.Security.Cryptography.r8xdxuwcik.wasm.br +0 -0
- package/public/_framework/System.Security.Cryptography.r8xdxuwcik.wasm.gz +0 -0
- package/public/_framework/System.Text.Encodings.Web.8tv8c2qml7.wasm +0 -0
- package/public/_framework/System.Text.Encodings.Web.8tv8c2qml7.wasm.br +0 -0
- package/public/_framework/System.Text.Encodings.Web.8tv8c2qml7.wasm.gz +0 -0
- package/public/_framework/System.Text.Json.vlj0ri24nf.wasm +0 -0
- package/public/_framework/System.Text.Json.vlj0ri24nf.wasm.br +0 -0
- package/public/_framework/System.Text.Json.vlj0ri24nf.wasm.gz +0 -0
- package/public/_framework/System.Text.RegularExpressions.syst47d0hk.wasm +0 -0
- package/public/_framework/System.Text.RegularExpressions.syst47d0hk.wasm.br +0 -0
- package/public/_framework/System.Text.RegularExpressions.syst47d0hk.wasm.gz +0 -0
- package/public/_framework/System.Threading.3w9td3odjb.wasm +0 -0
- package/public/_framework/System.Threading.3w9td3odjb.wasm.br +0 -0
- package/public/_framework/System.Threading.3w9td3odjb.wasm.gz +0 -0
- package/public/_framework/System.Web.HttpUtility.s6p043ak0k.wasm +0 -0
- package/public/_framework/System.Web.HttpUtility.s6p043ak0k.wasm.br +0 -0
- package/public/_framework/System.Web.HttpUtility.s6p043ak0k.wasm.gz +0 -0
- package/public/_framework/System.Xml.Linq.6jrwceho2h.wasm +0 -0
- package/public/_framework/System.Xml.Linq.6jrwceho2h.wasm.br +0 -0
- package/public/_framework/System.Xml.Linq.6jrwceho2h.wasm.gz +0 -0
- package/public/_framework/System.Xml.ReaderWriter.au2hkgm2hw.wasm +0 -0
- package/public/_framework/System.Xml.ReaderWriter.au2hkgm2hw.wasm.br +0 -0
- package/public/_framework/System.Xml.ReaderWriter.au2hkgm2hw.wasm.gz +0 -0
- package/public/_framework/System.Xml.XDocument.pllf66tpew.wasm +0 -0
- package/public/_framework/System.Xml.XDocument.pllf66tpew.wasm.br +0 -0
- package/public/_framework/System.Xml.XDocument.pllf66tpew.wasm.gz +0 -0
- package/public/_framework/System.n1lgwvdeih.wasm +0 -0
- package/public/_framework/System.n1lgwvdeih.wasm.br +0 -0
- package/public/_framework/System.n1lgwvdeih.wasm.gz +0 -0
- package/public/_framework/blazor.webassembly.js +2 -0
- package/public/_framework/blazor.webassembly.js.br +0 -0
- package/public/_framework/blazor.webassembly.js.gz +0 -0
- package/public/_framework/blazor.webassembly.js.map +1 -0
- package/public/_framework/blazor.webassembly.js.map.br +0 -0
- package/public/_framework/blazor.webassembly.js.map.gz +0 -0
- package/public/_framework/dotnet.js +462 -0
- package/public/_framework/dotnet.js.br +0 -0
- package/public/_framework/dotnet.js.gz +0 -0
- package/public/_framework/dotnet.native.0yslzj0e9x.wasm +0 -0
- package/public/_framework/dotnet.native.0yslzj0e9x.wasm.br +0 -0
- package/public/_framework/dotnet.native.0yslzj0e9x.wasm.gz +0 -0
- package/public/_framework/dotnet.native.ijy01f6viz.js +5502 -0
- package/public/_framework/dotnet.native.ijy01f6viz.js.br +0 -0
- package/public/_framework/dotnet.native.ijy01f6viz.js.gz +0 -0
- package/public/_framework/dotnet.runtime.uyfhwbfd13.js +4 -0
- package/public/_framework/dotnet.runtime.uyfhwbfd13.js.br +0 -0
- package/public/_framework/dotnet.runtime.uyfhwbfd13.js.gz +0 -0
- package/public/apple-touch-icon-180.png +0 -0
- package/public/appsettings.json +1 -0
- package/public/css/app.css +1 -0
- package/public/css/app.css.br +0 -0
- package/public/css/app.css.gz +0 -0
- package/public/css/bootstrap/bootstrap.min.css +5 -0
- package/public/css/bootstrap/bootstrap.min.css.br +0 -0
- package/public/css/bootstrap/bootstrap.min.css.gz +0 -0
- package/public/favicon.svg +19 -0
- package/public/favicon.svg.br +0 -0
- package/public/favicon.svg.gz +0 -0
- package/public/fonts/InterVariable.woff2 +0 -0
- package/public/icon-192.png +0 -0
- package/public/icon-512.png +0 -0
- package/public/index.html +208 -0
- package/public/js/activeRouteLayer.js +10 -0
- package/public/js/activeRouteLayer.js.br +0 -0
- package/public/js/activeRouteLayer.js.gz +0 -0
- package/public/js/aisLayer.js +12 -0
- package/public/js/aisLayer.js.br +0 -0
- package/public/js/aisLayer.js.gz +0 -0
- package/public/js/anchorLayer.js +1 -0
- package/public/js/anchorLayer.js.br +0 -0
- package/public/js/anchorLayer.js.gz +0 -0
- package/public/js/atonLayer.js +24 -0
- package/public/js/atonLayer.js.br +0 -0
- package/public/js/atonLayer.js.gz +0 -0
- package/public/js/boatIcons.js +1 -0
- package/public/js/boatIcons.js.br +0 -0
- package/public/js/boatIcons.js.gz +0 -0
- package/public/js/chartDownshift.js +1 -0
- package/public/js/chartDownshift.js.br +0 -0
- package/public/js/chartDownshift.js.gz +0 -0
- package/public/js/courseLineLayer.js +1 -0
- package/public/js/courseLineLayer.js.br +0 -0
- package/public/js/courseLineLayer.js.gz +0 -0
- package/public/js/deadman.js +1 -0
- package/public/js/deadman.js.br +0 -0
- package/public/js/deadman.js.gz +0 -0
- package/public/js/dragGhost.js +1 -0
- package/public/js/dragGhost.js.br +0 -0
- package/public/js/dragGhost.js.gz +0 -0
- package/public/js/errorRelayBoot.js +2 -0
- package/public/js/errorRelayBoot.js.br +0 -0
- package/public/js/errorRelayBoot.js.gz +0 -0
- package/public/js/format.js +1 -0
- package/public/js/format.js.br +0 -0
- package/public/js/format.js.gz +0 -0
- package/public/js/geoMath.js +1 -0
- package/public/js/geoMath.js.br +0 -0
- package/public/js/geoMath.js.gz +0 -0
- package/public/js/geomPixels.js +1 -0
- package/public/js/geomPixels.js.br +0 -0
- package/public/js/geomPixels.js.gz +0 -0
- package/public/js/historyMapLayer.js +1 -0
- package/public/js/historyMapLayer.js.br +0 -0
- package/public/js/historyMapLayer.js.gz +0 -0
- package/public/js/keyboardShortcuts.js +1 -0
- package/public/js/keyboardShortcuts.js.br +0 -0
- package/public/js/keyboardShortcuts.js.gz +0 -0
- package/public/js/laylineLayer.js +1 -0
- package/public/js/laylineLayer.js.br +0 -0
- package/public/js/laylineLayer.js.gz +0 -0
- package/public/js/leafletInterop.XG3NAVS4.js +170 -0
- package/public/js/leafletInterop.XG3NAVS4.js.br +0 -0
- package/public/js/leafletInterop.XG3NAVS4.js.gz +0 -0
- package/public/js/leafletInterop.js +1 -0
- package/public/js/mapRotation.js +1 -0
- package/public/js/mapRotation.js.br +0 -0
- package/public/js/mapRotation.js.gz +0 -0
- package/public/js/marinePoiLayer.js +35 -0
- package/public/js/marinePoiLayer.js.br +0 -0
- package/public/js/marinePoiLayer.js.gz +0 -0
- package/public/js/markerLayer.js +1 -0
- package/public/js/markerLayer.js.br +0 -0
- package/public/js/markerLayer.js.gz +0 -0
- package/public/js/measureLayer.js +1 -0
- package/public/js/measureLayer.js.br +0 -0
- package/public/js/measureLayer.js.gz +0 -0
- package/public/js/noteLayer.js +32 -0
- package/public/js/noteLayer.js.br +0 -0
- package/public/js/noteLayer.js.gz +0 -0
- package/public/js/overzoomLayer.js +1 -0
- package/public/js/overzoomLayer.js.br +0 -0
- package/public/js/overzoomLayer.js.gz +0 -0
- package/public/js/ownBoatPopup.js +1 -0
- package/public/js/ownBoatPopup.js.br +1 -0
- package/public/js/ownBoatPopup.js.gz +0 -0
- package/public/js/platform/audioAlert.js +1 -0
- package/public/js/platform/audioAlert.js.br +0 -0
- package/public/js/platform/audioAlert.js.gz +0 -0
- package/public/js/platform/fileTransfer.js +1 -0
- package/public/js/platform/fileTransfer.js.br +0 -0
- package/public/js/platform/fileTransfer.js.gz +0 -0
- package/public/js/platform/fullscreen.js +1 -0
- package/public/js/platform/fullscreen.js.br +0 -0
- package/public/js/platform/fullscreen.js.gz +0 -0
- package/public/js/platform/themeApply.js +1 -0
- package/public/js/platform/themeApply.js.br +0 -0
- package/public/js/platform/themeApply.js.gz +0 -0
- package/public/js/platform/viewport.js +1 -0
- package/public/js/platform/viewport.js.br +0 -0
- package/public/js/platform/viewport.js.gz +0 -0
- package/public/js/platform/wakeLock.js +1 -0
- package/public/js/platform/wakeLock.js.br +0 -0
- package/public/js/platform/wakeLock.js.gz +0 -0
- package/public/js/polygonEditLayer.js +1 -0
- package/public/js/polygonEditLayer.js.br +0 -0
- package/public/js/polygonEditLayer.js.gz +0 -0
- package/public/js/popupHelpers.js +1 -0
- package/public/js/popupHelpers.js.br +0 -0
- package/public/js/popupHelpers.js.gz +0 -0
- package/public/js/radarLayer.js +1 -0
- package/public/js/radarLayer.js.br +0 -0
- package/public/js/radarLayer.js.gz +0 -0
- package/public/js/radarProtobuf.js +1 -0
- package/public/js/radarProtobuf.js.br +0 -0
- package/public/js/radarProtobuf.js.gz +0 -0
- package/public/js/rangeScale.js +1 -0
- package/public/js/rangeScale.js.br +0 -0
- package/public/js/rangeScale.js.gz +0 -0
- package/public/js/regionLayer.js +10 -0
- package/public/js/regionLayer.js.br +0 -0
- package/public/js/regionLayer.js.gz +0 -0
- package/public/js/routeEditLayer.js +1 -0
- package/public/js/routeEditLayer.js.br +0 -0
- package/public/js/routeEditLayer.js.gz +0 -0
- package/public/js/routeLayer.js +10 -0
- package/public/js/routeLayer.js.br +0 -0
- package/public/js/routeLayer.js.gz +0 -0
- package/public/js/searchBoxJs.js +1 -0
- package/public/js/searchBoxJs.js.br +0 -0
- package/public/js/trackRuns.js +1 -0
- package/public/js/trackRuns.js.br +0 -0
- package/public/js/trackRuns.js.gz +0 -0
- package/public/js/version.g.js +1 -0
- package/public/js/visibility.js +1 -0
- package/public/js/visibility.js.br +0 -0
- package/public/js/visibility.js.gz +0 -0
- package/public/js/waypointLayer.js +44 -0
- package/public/js/waypointLayer.js.br +0 -0
- package/public/js/waypointLayer.js.gz +0 -0
- package/public/js/weatherLayer.js +1 -0
- package/public/js/weatherLayer.js.br +0 -0
- package/public/js/weatherLayer.js.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.css +4085 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css +6 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.min.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css +4084 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css +6 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.css +597 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css +6 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css +594 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +6 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.css +5402 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css +6 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css +5393 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +6 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.css +12057 -0
- package/public/lib/bootstrap/dist/css/bootstrap.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.min.css +6 -0
- package/public/lib/bootstrap/dist/css/bootstrap.min.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.min.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.min.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap.min.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.min.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.css +12030 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css +6 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.gz +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map +1 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map.br +0 -0
- package/public/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.js +6314 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.map +1 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.map.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.js.map.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.js +4447 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.js.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.js.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.js.map +1 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.js.map.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.js.map.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js +7 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.map.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.esm.min.js.map.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.js +4494 -0
- package/public/lib/bootstrap/dist/js/bootstrap.js.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.js.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.js.map +1 -0
- package/public/lib/bootstrap/dist/js/bootstrap.js.map.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.js.map.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.min.js +7 -0
- package/public/lib/bootstrap/dist/js/bootstrap.min.js.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.min.js.gz +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.min.js.map +1 -0
- package/public/lib/bootstrap/dist/js/bootstrap.min.js.map.br +0 -0
- package/public/lib/bootstrap/dist/js/bootstrap.min.js.map.gz +0 -0
- package/public/lib/leaflet/dist/images/layers-2x.png +0 -0
- package/public/lib/leaflet/dist/images/layers.png +0 -0
- package/public/lib/leaflet/dist/images/marker-icon-2x.png +0 -0
- package/public/lib/leaflet/dist/images/marker-icon.png +0 -0
- package/public/lib/leaflet/dist/images/marker-shadow.png +0 -0
- package/public/lib/leaflet/dist/leaflet.css +661 -0
- package/public/lib/leaflet/dist/leaflet.css.br +0 -0
- package/public/lib/leaflet/dist/leaflet.css.gz +0 -0
- package/public/lib/leaflet/dist/leaflet.js +6 -0
- package/public/lib/leaflet/dist/leaflet.js.br +0 -0
- package/public/lib/leaflet/dist/leaflet.js.gz +0 -0
- package/public/manifest.json +30 -0
- package/public/manifest.json.br +0 -0
- package/public/manifest.json.gz +0 -0
- package/public/service-worker.js +1741 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<!-- data-bs-theme is set by the inline boot script below from the
|
|
3
|
+
persisted theme in localStorage, BEFORE Bootstrap's CSS first
|
|
4
|
+
evaluates. This avoids a flash of dark-themed Bootstrap chrome on
|
|
5
|
+
a light-themed install (a hardcoded value would be visibly wrong
|
|
6
|
+
for half-a-second on light / high-contrast helms until
|
|
7
|
+
themeApply.js::setTheme caught up). themeApply.js owns
|
|
8
|
+
the attribute at runtime once Settings.Theme is known; this script
|
|
9
|
+
is just the pre-mount seed so first paint matches the helm's
|
|
10
|
+
persisted choice. -->
|
|
11
|
+
<html lang="en">
|
|
12
|
+
|
|
13
|
+
<head>
|
|
14
|
+
<meta charset="utf-8" />
|
|
15
|
+
<!-- maximum-scale=1.0 + user-scalable=no: disable iOS Safari's
|
|
16
|
+
document-level pinch-to-zoom and double-tap zoom. The chart
|
|
17
|
+
has its own pinch-to-zoom on the Leaflet container, and
|
|
18
|
+
document-level pinch zooms the HUD chrome OUT of position
|
|
19
|
+
(the cards float on absolute coordinates relative to the
|
|
20
|
+
viewport, not the page). Helms double-tap on AIS targets
|
|
21
|
+
and route lines constantly; without this, every other tap
|
|
22
|
+
triggers an iOS zoom. Trade-off: disables browser-level
|
|
23
|
+
zoom for vision-impaired users - mitigated by the high-
|
|
24
|
+
contrast theme + the Big-Type setting on the Map page. -->
|
|
25
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
|
26
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
27
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
28
|
+
<meta name="apple-mobile-web-app-title" content="OnaPlotter" />
|
|
29
|
+
<meta name="referrer" content="strict-origin-when-cross-origin" />
|
|
30
|
+
<base href="/signalk-onaplotter/" />
|
|
31
|
+
<!-- Pre-mount theme seed. Reads the same "ona.theme.v1" key that
|
|
32
|
+
AppSettingsService persists (falling back to the unversioned
|
|
33
|
+
spelling that AppSettingsService migrates on its first load)
|
|
34
|
+
and sets data-bs-theme + the matching theme-* class on <html> before Bootstrap CSS first
|
|
35
|
+
parses. Mirrors the fold logic in themeApply.js::setTheme:
|
|
36
|
+
dark stays dark, light + high-contrast collapse to Bootstrap's
|
|
37
|
+
"light" palette (Bootstrap only ships two), system resolves
|
|
38
|
+
via prefers-color-scheme so an iOS sunset flip lands on the
|
|
39
|
+
right palette before Blazor boots. Wrapped in try/catch
|
|
40
|
+
because localStorage throws in private-browsing mode and the
|
|
41
|
+
page must still boot. -->
|
|
42
|
+
<script>
|
|
43
|
+
(function () {
|
|
44
|
+
try {
|
|
45
|
+
var read = function (name) {
|
|
46
|
+
var v = localStorage.getItem('ona.' + name + '.v1');
|
|
47
|
+
return v !== null ? v : localStorage.getItem('ona.' + name);
|
|
48
|
+
};
|
|
49
|
+
var raw = read('theme');
|
|
50
|
+
var known = ['light', 'dark', 'system', 'high-contrast'];
|
|
51
|
+
var safe = known.indexOf(raw) >= 0 ? raw : 'system';
|
|
52
|
+
// Night-mode renders as dark + red-shift regardless of the stored
|
|
53
|
+
// theme; mirror MainLayout.EffectiveTheme here so first paint after
|
|
54
|
+
// a cold boot doesn't flash the light theme before Blazor takes over.
|
|
55
|
+
var night = read('nightMode') === 'true';
|
|
56
|
+
if (night) safe = 'dark';
|
|
57
|
+
var bs;
|
|
58
|
+
if (safe === 'dark') bs = 'dark';
|
|
59
|
+
else if (safe === 'system') {
|
|
60
|
+
bs = (window.matchMedia
|
|
61
|
+
&& window.matchMedia('(prefers-color-scheme: dark)').matches)
|
|
62
|
+
? 'dark' : 'light';
|
|
63
|
+
} else bs = 'light';
|
|
64
|
+
var html = document.documentElement;
|
|
65
|
+
html.setAttribute('data-bs-theme', bs);
|
|
66
|
+
html.classList.add('theme-' + safe);
|
|
67
|
+
// Same rule as themeApply.js::applyEffectiveLight; the
|
|
68
|
+
// light token block in app.css keys off this class.
|
|
69
|
+
if (bs === 'light') html.classList.add('theme-effective-light');
|
|
70
|
+
if (night) html.classList.add('night-mode-global');
|
|
71
|
+
} catch (_) {
|
|
72
|
+
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
|
73
|
+
}
|
|
74
|
+
})();
|
|
75
|
+
</script>
|
|
76
|
+
<!-- Bootstrap cut down to the rules the app uses (PurgeCSS, see
|
|
77
|
+
scripts/purge-bootstrap.config.mjs; ~50 KB instead of ~230 KB).
|
|
78
|
+
leaflet.css loads before app.css so app overrides of Leaflet's
|
|
79
|
+
popup / control chrome win on source order, not !important. -->
|
|
80
|
+
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
|
|
81
|
+
<link rel="stylesheet" href="lib/leaflet/dist/leaflet.css" />
|
|
82
|
+
<link rel="stylesheet" href="css/app.css" />
|
|
83
|
+
<link rel="stylesheet" href="OnaPlotter.styles.css" />
|
|
84
|
+
<!-- The HUD font is referenced from app.css, so without a preload
|
|
85
|
+
the browser only discovers it after CSS parse + first HUD
|
|
86
|
+
render. Same relative URL as the @font-face src. -->
|
|
87
|
+
<link rel="preload" href="fonts/InterVariable.woff2" as="font" type="font/woff2" crossorigin />
|
|
88
|
+
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
|
|
89
|
+
<link rel="manifest" href="manifest.json" />
|
|
90
|
+
<!-- iPad / iOS home-screen install: Safari rejects SVG for the
|
|
91
|
+
apple-touch-icon since iOS 18 and silently falls back to a
|
|
92
|
+
page screenshot. Pointing at a 180x180 PNG lets the home-
|
|
93
|
+
screen tile actually show the OnaPlotter logo. The PNG is
|
|
94
|
+
generated from favicon.svg by scripts/generate-pwa-icons.sh
|
|
95
|
+
(Playwright-based) and committed alongside the SVG. -->
|
|
96
|
+
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon-180.png" />
|
|
97
|
+
</head>
|
|
98
|
+
|
|
99
|
+
<body>
|
|
100
|
+
<!-- Boot loading screen. Lives inside #app so Blazor swaps it
|
|
101
|
+
out wholesale once the App component renders for the first
|
|
102
|
+
time. Inline SVG of the favicon (rather than <img src="...">)
|
|
103
|
+
so it renders before any external asset has loaded - on a
|
|
104
|
+
cold start the helm sees a recognisable brand frame within
|
|
105
|
+
the first paint, not the literal text "Loading...". The
|
|
106
|
+
build stamp is populated below from window.OnaPlotterBuild
|
|
107
|
+
(set by js/version.g.js, generated by the StampBuildInfo
|
|
108
|
+
MSBuild target). The check is no-op-safe if version.g.js
|
|
109
|
+
isn't present yet (fresh checkout, no build run). -->
|
|
110
|
+
<div id="app">
|
|
111
|
+
<div class="boot-shell">
|
|
112
|
+
<div class="boot-icon" aria-hidden="true">
|
|
113
|
+
<svg viewBox="0 0 32 32">
|
|
114
|
+
<defs>
|
|
115
|
+
<linearGradient id="bootBg" x1="0" y1="0" x2="1" y2="1">
|
|
116
|
+
<stop offset="0" stop-color="#1e293b" />
|
|
117
|
+
<stop offset="1" stop-color="#0f172a" />
|
|
118
|
+
</linearGradient>
|
|
119
|
+
</defs>
|
|
120
|
+
<rect width="32" height="32" rx="7" fill="url(#bootBg)" />
|
|
121
|
+
<path d="M11 14 L16 7 L21 14 Z" fill="#60a5fa" />
|
|
122
|
+
<path d="M4 20 Q8 17.5 12 20 T20 20 T28 20" fill="none" stroke="#3b82f6" stroke-width="2" stroke-linecap="round" />
|
|
123
|
+
<path d="M4 25 Q8 22.5 12 25 T20 25 T28 25" fill="none" stroke="#3b82f6" stroke-width="2" stroke-linecap="round" opacity="0.5" />
|
|
124
|
+
</svg>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="boot-title">OnaPlotter</div>
|
|
127
|
+
<div class="boot-spinner" role="progressbar" aria-label="Loading"></div>
|
|
128
|
+
<div class="boot-status">Loading chartplotter...</div>
|
|
129
|
+
<div class="boot-version" id="bootVersion"></div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<div id="blazor-error-ui">
|
|
134
|
+
An unhandled error has occurred.
|
|
135
|
+
<a href="" class="reload">Reload</a>
|
|
136
|
+
<a class="dismiss">X</a>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<!-- Error relay bootstrap: synchronous, loaded BEFORE the Blazor
|
|
140
|
+
runtime so the console.error wrapper + window listeners are
|
|
141
|
+
armed in time to catch boot-time component exceptions. The
|
|
142
|
+
Blazor WASM dispatcher catches Razor lifecycle errors
|
|
143
|
+
internally and only logs them via console.error - if our
|
|
144
|
+
wrapper isn't installed first, those errors never reach the
|
|
145
|
+
SignalK server log. See errorRelayBoot.js header for the
|
|
146
|
+
full rationale. -->
|
|
147
|
+
<script src="js/errorRelayBoot.js"></script>
|
|
148
|
+
<!-- Build stamp emitted by the StampBuildInfo MSBuild target.
|
|
149
|
+
No-op gracefully on fresh checkouts where the file hasn't
|
|
150
|
+
been generated yet (browser logs a 404, page works fine). -->
|
|
151
|
+
<script src="js/version.g.js"></script>
|
|
152
|
+
<script>
|
|
153
|
+
// Populate the boot-screen build stamp if the build artefact
|
|
154
|
+
// was loaded above. Stays empty otherwise so the loading
|
|
155
|
+
// screen doesn't show a stale "build undefined" stamp.
|
|
156
|
+
(function () {
|
|
157
|
+
try {
|
|
158
|
+
var b = window.OnaPlotterBuild;
|
|
159
|
+
if (!b) return;
|
|
160
|
+
var el = document.getElementById('bootVersion');
|
|
161
|
+
if (el) el.textContent = 'build ' + b.hash + ' · ' + b.utc + ' UTC';
|
|
162
|
+
} catch (_) { /* boot-time decoration; never block boot. */ }
|
|
163
|
+
})();
|
|
164
|
+
</script>
|
|
165
|
+
<script src="lib/leaflet/dist/leaflet.js"></script>
|
|
166
|
+
<script src="_framework/blazor.webassembly.js"></script>
|
|
167
|
+
<script>
|
|
168
|
+
if ('serviceWorker' in navigator) {
|
|
169
|
+
navigator.serviceWorker.register('service-worker.js');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Settings page filter helper. Settings.razor calls this on every
|
|
173
|
+
// keystroke in the "Find a setting" input: scroll the first
|
|
174
|
+
// matching form-label into view and add a .settings-highlight
|
|
175
|
+
// class for a second. Empty query clears any existing highlight.
|
|
176
|
+
window.onaSettingsFilter = function (query) {
|
|
177
|
+
const all = document.querySelectorAll('.form-label');
|
|
178
|
+
all.forEach(el => el.classList.remove('settings-highlight'));
|
|
179
|
+
const q = (query || '').trim().toLowerCase();
|
|
180
|
+
if (!q) return;
|
|
181
|
+
for (const label of all) {
|
|
182
|
+
if (label.textContent.toLowerCase().includes(q)) {
|
|
183
|
+
label.classList.add('settings-highlight');
|
|
184
|
+
label.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// Tiny scroll-to-bottom helper used by the route-edit waypoint
|
|
191
|
+
// list when the parent appends a new entry. Lives here (inline
|
|
192
|
+
// global) rather than in a JS module so the route-edit panel
|
|
193
|
+
// doesn't pay an import round-trip on every mount. Defensive
|
|
194
|
+
// against missing element or detached node so a stale call
|
|
195
|
+
// doesn't throw out of Blazor's render path.
|
|
196
|
+
window.scrollElementToBottom = function (el) {
|
|
197
|
+
try {
|
|
198
|
+
if (el && typeof el.scrollTo === 'function') {
|
|
199
|
+
el.scrollTo({ top: el.scrollHeight, behavior: 'smooth' });
|
|
200
|
+
} else if (el) {
|
|
201
|
+
el.scrollTop = el.scrollHeight;
|
|
202
|
+
}
|
|
203
|
+
} catch (_) { /* element gone / unmounted; harmless. */ }
|
|
204
|
+
};
|
|
205
|
+
</script>
|
|
206
|
+
</body>
|
|
207
|
+
|
|
208
|
+
</html>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{esc as w,wireClick as P,wireDeleteConfirm as E}from"./popupHelpers.js";import*as h from"./courseLineLayer.js";const M=L.divIcon({className:"active-wp-icon",html:'<div class="active-wp-pulse"></div>',iconSize:[24,24],iconAnchor:[12,12]});let d=null,f=null,v=null,R=null,y=null,l=null,m=null,g=!1,b=null;function D(t,e,o,i){return`
|
|
2
|
+
<div class="route-popup-body">
|
|
3
|
+
<div class="route-popup-title">${w(e||`Route ${t.substring(0,6)}`)}</div>
|
|
4
|
+
<div class="route-popup-meta">${o} WP · ${i.toFixed(1)} nm · active</div>
|
|
5
|
+
<div class="route-popup-actions">
|
|
6
|
+
<button class="route-deactivate-btn" type="button">Deactivate</button>
|
|
7
|
+
<button class="route-edit-btn" type="button">Edit</button>
|
|
8
|
+
<button class="route-delete-btn" type="button">Delete</button>
|
|
9
|
+
</div>
|
|
10
|
+
</div>`}export function init(t,e){d=t,f=e.colors,v=e.getDotNetRef,R=e.getEditModeFlags,y=e.editModeAddPoint}export function isOverlayHidden(){return g}export function setActiveRoute(t,e,o,i,a){if(b={coords:t,wpIdx:e,routeId:o,routeName:i,totalNm:a},clearActiveRoute(),g){console.warn("[setActiveRoute] activeOverlayHidden is still true; route render suppressed.");return}if(!d||!t||t.length<2)return;const r=Math.max(0,Math.min(t.length-1,e|0));l=L.layerGroup().addTo(d),h.setCoursePulseSuppressed(!0);const N=v(),x=!!(o&&N);r>=2&&L.polyline(t.slice(0,r),{color:f.bearing,weight:2,opacity:.5,dashArray:"2,6",lineCap:"round"}).addTo(l);const A=r>0?r-1:0;if(A<t.length-1&&L.polyline(t.slice(A),{color:f.bearing,weight:3,opacity:.8}).addTo(l),x){const n=L.polyline(t,{color:f.bearing,weight:36,opacity:0,interactive:!0}).addTo(l),c={className:"route-popup",maxWidth:320,autoClose:!0};n.bindPopup(()=>D(o,i,t.length,a),c),n.on("popupopen",s=>{P(s.popup,".route-deactivate-btn",v,"DeactivateActiveRoute",[],{close:"before"}),P(s.popup,".route-edit-btn",v,"EditRouteById",[o],{close:"before"}),E(s.popup,".route-delete-btn","DeleteRouteById",o,v)}),n.on("click",s=>{const u=R();if(u.routeEdit||u.polygonEdit||u.measure){L.DomEvent.stopPropagation(s);const p=s.latlng;if(!p)return;u.routeEdit?y("route",p.lat,p.lng):u.polygonEdit?y("polygon",p.lat,p.lng):y("measure",p.lat,p.lng),n.closePopup()}})}for(let n=0;n<t.length;n++){const c=n<r;if(n===r)continue;const u=L.circleMarker(t[n],{radius:c?3:5,color:f.bearing,fillColor:c?"#64748b":f.bearing,fillOpacity:c?.35:1,weight:c?1:1.5,opacity:c?.35:1});u.bindTooltip(`${n+1}`,{permanent:!1,direction:"right",offset:[8,0],className:"route-wp-tooltip"}),x&&O(u,o,n),u.addTo(l)}m=L.marker(t[r],{icon:M,zIndexOffset:900}).addTo(l),m.bindTooltip(`WP ${r+1}`,{permanent:!0,direction:"right",offset:[14,0],className:"route-wp-tooltip"})}function O(t,e,o){t.on("click",i=>{i&&i.originalEvent&&L.DomEvent.stopPropagation(i);const a=v();a&&a.invokeMethodAsync("JumpToRouteWaypoint",e,o).catch(()=>{})})}export function clearActiveRoute(){l&&d&&d.removeLayer(l),l=null,m=null,h.setCoursePulseSuppressed(!1)}export function refreshActiveRoute(){if(!b||g)return;const{coords:t,wpIdx:e,routeId:o,routeName:i,totalNm:a}=b;setActiveRoute(t,e,o,i,a)}export function setActiveOverlayHidden(t){g=!!t,t&&(h.clearCourseLine(),clearActiveRoute())}export function setActiveRouteStoppingPolyline(t){if(!d)return;const e=t?.3:1,o=t?.3:1;l&&l.eachLayer(function(i){try{i.setStyle({opacity:e,fillOpacity:o})}catch{}})}export function dispose(){l=null,m=null,g=!1,b=null,d=null,f=null,v=null,R=null,y=null}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{rangeRingLabel as yt}from"./format.js";import{esc as p}from"./popupHelpers.js";import{makeBoatSvg as vt,makeRadarSvg as Ct}from"./boatIcons.js";import{toLayoutPoint as wt,viewportSize as xt}from"./mapRotation.js";let a=null,$=null,j=!1,I=null,E=null,V=null,F=null,T=-1,W=0;class $t{constructor(e){this.ctx=e,this.v=null,this.s=null,this.marker=null,this.icon=null,this.pulse=!1,this.labelEl=null,this.labelText=null,this.vector=null,this.vectorColor=null,this.tipColor=null,this.tipEnd=null,this.trailPts=[],this.trail=null,this.cpaOwnLine=null,this.cpaOwnX=null,this.cpaTgtLine=null,this.cpaTgtX=null,this.cpaSegment=null,this.cpaSeverity=null,this.cpaLabel=null,this.cpaCompact=!1}removeVector(){c(this.vector),this.vector=null,this.vectorColor=null,this.tipColor&&z(this.tipColor),this.tipColor=null,this.tipEnd=null}removeOwnSideCpa(){c(this.cpaOwnLine),c(this.cpaOwnX),c(this.cpaSegment),this.cpaOwnLine=null,this.cpaOwnX=null,this.cpaSegment=null,this.cpaSeverity=null,this.cpaLabel=null,this.cpaCompact=!1}removeCpaOverlay(){this.removeOwnSideCpa(),c(this.cpaTgtLine),c(this.cpaTgtX),this.cpaTgtLine=null,this.cpaTgtX=null}removeLabel(){this.labelEl&&(this.labelEl.remove(),this.labelEl=null,this.labelText=null)}dispose(){this.removeCpaOverlay(),this.removeVector(),c(this.trail),this.trail=null,this.trailPts=[],this.removeLabel(),c(this.marker),this.marker=null}}const u=new Map,S=new Map,O=new Set,Tt=.01;export function isCollapsedDot(t){return t.length===2&&t[0].x===t[1].x&&t[0].y===t[1].y}let H=null;function Pt(t,e){return H||(H=L.Polyline.extend({_project(){L.Polyline.prototype._project.call(this);for(const n of this._rings)isCollapsedDot(n)&&(n[1]=n[1].add(L.point(Tt,0)))}})),new H(t,e)}function z(t){O.add(t)}export function tipDotParts(t,e){const n=[];for(const o of t)o.color===e&&n.push([o.end,o.end]);return n}function Et(){if(O.size===0||!a)return;const t=[];for(const e of u.values())e.tipColor&&t.push({color:e.tipColor,end:e.tipEnd});for(const e of O){const n=tipDotParts(t,e);let o=S.get(e);n.length===0?(c(o),S.delete(e)):o?o.setLatLngs(n):(o=Pt(n,{color:e,weight:5,lineCap:"round",smoothFactor:0,interactive:!1,pane:"aisCogVectors"}).addTo(a),S.set(e,o))}O.clear()}const K=12;let k=!0,m=null;export function applyTrailUpdate(t,e,n,o){if(e)return unpackLatLonPairs(e);let l=t;if(o>0&&(l=l.slice(Math.min(o,l.length))),n&&n.length>=2){l===t&&(l=t.slice());for(const s of unpackLatLonPairs(n))l.push(s)}return l}export function acceptsUpdate(t,e){return e.baseSeq===-1||e.baseSeq===t}export function toneColor(t,e,n){switch(t){case"buddy":return n.buddy;case"danger":return n.danger;case"radar":return n.radar;default:return e}}const N=200,X=new Map,M=new Map;let St=0;function J(t,e,n){if(!t.has(e)||n!==void 0&&t.size<n*.75)return;const o=t.get(e);t.delete(e),t.set(e,o)}function Q(t,e,n,o){for(t.has(e)&&t.delete(e),t.set(e,n);t.size>o;){const l=t.keys().next().value;t.delete(l)}}const B={},U={},G={},Y=28,tt=26;let w=0,b=0,et=!1,A=.5,nt=4,d=[],y=[],_=[],ot=!1,lt=!0,st=!0;export function init(t,e){if(a=t,$=e.colors,j=e.isSlowClient,I=e.getEditModeFlags,E=e.editModeAddPoint,V=e.flagUrl,F=e.rotateMarker,!t.getPane("aisCogVectors")){const n=t.createPane("aisCogVectors");n.style.zIndex="410",n.style.pointerEvents="none"}k=t.getZoom()>=K,t.on("zoomend",at)}function at(){if(!a)return;const t=a.getZoom()>=K;t!==k&&(k=t,q())}export function setBoatPosition(t,e){if(!(w===t&&b===e)){w=t,b=e;for(let n=0;n<d.length;n++){d[n].setLatLng([t,e]);const o=y[n];o&&o.setLatLng([t+_[n],e])}}}function it(t,e){return L.divIcon({className:"boat-icon",html:t,iconSize:[e,e],iconAnchor:[e/2,e/2]})}function Ot(t,e){const n=`${t}|${e||""}`;return B[n]||(B[n]=it(vt(t,Y,!1,e),Y)),B[n]}function kt(t){return U[t]||(U[t]=it(Ct(t,tt),tt)),U[t]}function Nt(t){if(!G[t]){const e=p(t),n=44,o=`
|
|
2
|
+
<div class="sart-icon sart-${e.toLowerCase()}">
|
|
3
|
+
<svg width="${n}" height="${n}" viewBox="-22 -22 44 44">
|
|
4
|
+
<circle cx="0" cy="0" r="18" fill="rgba(239,68,68,0.18)"
|
|
5
|
+
stroke="#ef4444" stroke-width="2"/>
|
|
6
|
+
<circle cx="0" cy="0" r="10" fill="rgba(239,68,68,0.35)"
|
|
7
|
+
stroke="#ef4444" stroke-width="1.2"/>
|
|
8
|
+
<text x="0" y="3" fill="#fff" font-size="7" font-weight="700"
|
|
9
|
+
text-anchor="middle" style="letter-spacing:0.05em;"
|
|
10
|
+
paint-order="stroke" stroke="#7f1d1d" stroke-width="0.6">${e}</text>
|
|
11
|
+
</svg>
|
|
12
|
+
</div>`;G[t]=L.divIcon({className:"sart-icon-wrapper",html:o,iconSize:[n,n],iconAnchor:[n/2,n/2]})}return G[t]}function Mt(t){if(!t)return Promise.resolve(null);let e=X.get(t);return e?(J(X,t,N),e):(e=(async()=>{try{const n=await fetch(V(t));if(!n.ok)return null;const o=await n.blob();return await new Promise((l,s)=>{const i=new FileReader;i.onload=()=>l(i.result),i.onerror=s,i.readAsDataURL(o)})}catch{return null}})(),Q(X,t,e,N),e.then(n=>Q(M,t,n,N)),e)}function At(t){if(!t)return"";if(M.has(t)){const n=M.get(t);return J(M,t,N),n?`<img class="ais-popup-flag" src="${p(n)}" alt="">`:""}const e=`ais-flag-ph-${++St}`;return queueMicrotask(()=>{Mt(t).then(n=>{const o=document.getElementById(e);o&&(n?(o.src=n,o.style.visibility=""):o.style.display="none")})}),`<img id="${e}" class="ais-popup-flag" alt="" style="visibility:hidden">`}export function unpackLatLonPairs(t){const e=new Array(t.length>>1);for(let n=0,o=0;n+1<t.length;n+=2,o++)e[o]=[t[n],t[n+1]];return e}function _t(t,e){let n=null;if(typeof t=="string"&&t.length>0){const s=new Date(t);if(!isNaN(s.getTime())){const i=String(s.getHours()).padStart(2,"0"),r=String(s.getMinutes()).padStart(2,"0");n=`${i}:${r}`}}const o=Dt(e);if(!n&&!o)return"";let l;return n&&o?l=`${n} (${o})`:l=n??o,`<tr><td>Last</td><td>${l}</td></tr>`}function Dt(t){if(typeof t!="number"||!isFinite(t)||t<0)return null;if(t<60)return`${Math.round(t)} s ago`;const e=Math.floor(t/60);if(e<60)return`${e} min ago`;const n=Math.floor(e/60),o=e-n*60;return`${n} h ${o} min ago`}export function buildAisPopupHtml(t){const e=t.v,n=t.s,o=n.mmsi||"",l=(h,R)=>h!=null?h.toFixed(R):"--",s=Date.parse(e.lastAisSeen),i=Number.isNaN(s)?null:(Date.now()+W-s)/1e3,r=_t(e.lastAisSeen,i),v=n.subtitle?`<div class="ais-popup-subtitle">${p(n.subtitle)}</div>`:"";let P="";e.cpaNm!=null&&e.tcpaMin!=null&&(P=`<tr><td>CPA</td><td class="${e.cpaThreat==="alarm"?"ais-popup-cpa-danger":"ais-popup-cpa"}"><strong>${e.cpaNm.toFixed(2)}</strong>nm in <strong>${e.tcpaMin.toFixed(0)}</strong>min</td></tr>`);let f="";if(e.colregsLabel){const h=e.colregsRole?`<div class="ais-popup-colregs-role ${e.colregsGiveWay?"ais-popup-colregs-give-way":"ais-popup-colregs-stand-on"}">${p(e.colregsRole)}</div>`:"",R=`<div class="ais-popup-colregs-label">${p(e.colregsLabel)}</div>`;f=`<tr><td class="ais-popup-colregs-label-cell">COLREGS <a href="#" data-ona-colregs="1" class="ais-popup-colregs-help" title="Open COLREGS quick reference">?</a></td><td class="ais-popup-colregs-cell">${h}${R}</td></tr>`}const x=o?`https://www.marinetraffic.com/en/ais/details/ships/mmsi:${p(o)}`:"",C=o?`https://www.vesselfinder.com/vessels?name=${p(o)}`:"",g=n.buddy?"\u2605 Remove buddy":"\u2606 Add buddy",mt=`data-ona-buddy="1" data-ctx="${p(e.context)}" data-mmsi="${p(o)}" data-nm="${p(n.name||"")}" data-is="${n.buddy?"1":"0"}"`,Lt=o?`<a href="#" ${mt} class="ais-popup-buddy">${g}</a>`:"",bt=`data-ona-snooze="1" data-ctx="${p(e.context)}" data-nm="${p(n.name||o)}"`,D=e.snoozable?`<a href="#" ${bt} class="ais-popup-snooze">\u266B Snooze alarm</a>`:"";let Z="";if(o||D){const h=[];o&&h.push(`<div class="ais-popup-links-row"><a href="${x}" target="_blank" rel="noopener" class="ais-popup-extern">MarineTraffic</a><a href="${C}" target="_blank" rel="noopener" class="ais-popup-extern">VesselFinder</a></div>`),D&&h.push(`<div class="ais-popup-links-row">${D}</div>`),Z='<div class="ais-popup-footer">'+h.join("")+"</div>"}return`<div class="ais-popup-content"><div class="ais-popup-header"><div class="ais-popup-title">${At(o)}${p(n.title)}</div>`+Lt+"</div>"+v+'<table class="ais-popup-table">'+P+f+`<tr><td>SOG</td><td>${l(e.sogKn,1)} kn</td></tr><tr><td>COG</td><td>${l(e.cogDeg,0)}°</td></tr><tr><td>HDG</td><td>${l(e.headingDeg,0)}°</td></tr><tr><td>Dist</td><td>${l(e.rangeNm,2)} nm</td></tr><tr><td>BRG</td><td>${l(e.bearingDeg,0)}°</td></tr>`+r+"</table>"+Z+"</div>"}export function updateAisTargets(t){if(!a||!t)return!1;if(j&&a.dragging&&a.dragging._moving||!acceptsUpdate(T,t))return T=-1,!1;const e=Date.parse(t.nowUtc);if(Number.isNaN(e)||(W=e-Date.now()),t.baseSeq===-1){const n=new Set(t.vessels.map(o=>o.context));for(const[o,l]of u)n.has(o)||rt(o,l)}for(const n of t.removed){const o=u.get(n);o&&rt(n,o)}try{for(const n of t.vessels){let o=u.get(n.context);if(!o){if(!n.static)return T=-1,!1;o=new $t(n.context),u.set(n.context,o)}Rt(o,n)}}finally{Et()}return T=t.seq,!0}function rt(t,e){e.dispose(),u.delete(t),m===t&&(m=null)}function Rt(t,e){e.static&&(t.s=e.static),t.v=e;const n=t.s;It(t,e,n),ct(t,n),t.marker.isPopupOpen()&&t.marker.setPopupContent(buildAisPopupHtml(t)),(e.trail||e.trailAppend||e.trailTrim)&&(t.trailPts=applyTrailUpdate(t.trailPts,e.trail,e.trailAppend,e.trailTrim??0),Ht(t)),zt(t,e,n),e.cpaOverlay==="alarm"||e.cpaOverlay==="awareness"&&t.ctx===m?ft(t):t.removeCpaOverlay()}function It(t,e,n){const o=toneColor(e.markerTone,n.shipColor,$),l=n.sartCategory?Nt(n.sartCategory):n.radar?kt(o):Ot(o,n.glyphCategory);let s=t.marker;s?((s._lastLat!==e.lat||s._lastLon!==e.lon)&&(s.setLatLng([e.lat,e.lon]),s._lastLat=e.lat,s._lastLon=e.lon),t.icon!==l&&(s.setIcon(l),t.icon=l,t.pulse=!1)):(s=L.marker([e.lat,e.lon],{icon:l}).addTo(a),t.marker=s,t.icon=l,s._lastLat=e.lat,s._lastLon=e.lon,Vt(t,s)),F(s,e.rotationRad);const i=s.getElement();if(!i)return;const r=!!e.pulse;t.pulse!==r&&(i.classList.toggle("cpa-pulse",r),t.pulse=r);const v=e.opacity??"";i.style.opacity!==v&&(i.style.opacity=v)}function Vt(t,e){e.on("click",n=>{const o=I();if(o.routeEdit||o.polygonEdit||o.measure){L.DomEvent.stopPropagation(n),L.DomEvent.preventDefault(n);const l=n.latlng||e.getLatLng();o.routeEdit?E("route",l.lat,l.lng):o.polygonEdit?E("polygon",l.lat,l.lng):E("measure",l.lat,l.lng),e.closePopup();return}Bt(t)}),e.bindPopup("",{closeButton:!1,maxWidth:420,className:"ais-popup",autoPan:!0,autoPanPadding:[20,20],keepInView:!0}),e.on("preclick",()=>{const n=e.getPopup();if(!n)return;if(!st||!a){n.options.autoPan=!0,n.options.offset=L.point(0,7);return}n.options.autoPan=!1;const o=a.latLngToContainerPoint(e.getLatLng()),l=wt(o.x,o.y);n.options.offset=l.y<xt().y*.3?L.point(0,240):L.point(0,7)}),e.on("popupopen",()=>{t.v&&e.setPopupContent(buildAisPopupHtml(t))})}function Ft(){const t=document.createElement("div");t.className="ais-label-slot",t.style.cssText="position:absolute;left:100%;top:0;height:100%;display:flex;align-items:center;padding-left:4px;pointer-events:none;";const e=document.createElement("span");return e.className="ais-label",t.appendChild(e),t}function ct(t,e){const o=t.v.labelVisible&&!ot&<&&k&&!!e.displayName?t.marker.getElement():null;if(!o){t.removeLabel();return}t.labelEl||(t.labelEl=Ft()),t.labelEl.parentNode!==o&&(o.appendChild(t.labelEl),t.labelEl.style.transformOrigin=`-${t.icon.options.iconSize[0]/2}px 50%`),t.labelText!==e.displayName&&(t.labelEl.firstChild.textContent=e.displayName,t.labelText=e.displayName)}function Ht(t){if(t.trailPts.length<2){c(t.trail),t.trail=null;return}t.trail?t.trail.setLatLngs(t.trailPts):t.trail=L.polyline(t.trailPts,{color:"#94a3b8",weight:1.2,opacity:.5,dashArray:"2,4",interactive:!1}).addTo(a)}function zt(t,e,n){if(e.vectorEndLat==null||e.vectorEndLon==null){t.removeVector();return}const o=[e.vectorEndLat,e.vectorEndLon],l=toneColor(e.vectorTone,n.shipColor,$);t.vector?(t.vector.setLatLngs([[e.lat,e.lon],o]),t.vectorColor!==l&&(t.vector.setStyle({color:l}),t.vectorColor=l)):(t.vector=L.polyline([[e.lat,e.lon],o],{color:l,weight:1.5,dashArray:"6,4",pane:"aisCogVectors"}).addTo(a),t.vectorColor=l),(t.tipColor!==l||t.tipEnd[0]!==o[0]||t.tipEnd[1]!==o[1])&&(t.tipColor&&t.tipColor!==l&&z(t.tipColor),t.tipColor=l,t.tipEnd=o,z(l))}function Xt(t){const e=t.v;return`<strong>${p(t.s.title)}</strong><br>${e.cpaNm.toFixed(2)}nm T -${e.tcpaMin.toFixed(0)}\u2032`}function pt(t,e,n,o){return t?(t.setLatLngs([e,n]),t.options.color!==o&&t.setStyle({color:o}),t):L.polyline([e,n],{color:o,weight:.8,dashArray:"2,7",opacity:.5}).addTo(a)}function ut(t,e,n,o){if(!t)return t=L.marker(e,{icon:L.divIcon({className:`cpa-x-marker cpa-x-${n}`,html:'<div class="cpa-x">\xD7</div>',iconSize:[18,18],iconAnchor:[9,9]}),interactive:!0,keyboard:!1}).addTo(a),t._severity=n,t.on("click",()=>{t.openTooltip(),u.get(o)?.marker?.openPopup()}),t;if(t.setLatLng(e),t._severity!==n){const l=t.getElement();l&&(l.classList.remove("cpa-x-danger","cpa-x-warn"),l.classList.add(`cpa-x-${n}`)),t._severity=n}return t}function ft(t){const e=t.v,n=e.cpaOverlay==="alarm",o=n?"danger":"warn",l=n?$.mob:$.guardWarn,s=[e.cpaPointLat,e.cpaPointLon];if(t.cpaTgtLine=pt(t.cpaTgtLine,[e.lat,e.lon],s,l),t.cpaTgtX=ut(t.cpaTgtX,s,o,t.ctx),e.ownCpaPointLat==null||e.ownCpaPointLon==null){t.removeOwnSideCpa();return}const i=[e.ownCpaPointLat,e.ownCpaPointLon];t.cpaOwnLine=pt(t.cpaOwnLine,[w,b],i,l),t.cpaOwnX=ut(t.cpaOwnX,i,o,t.ctx);let r=t.cpaSegment;r?(r.setLatLngs([i,s]),r.options.color!==l&&r.setStyle({color:l})):(r=L.polyline([i,s],{color:l,weight:1.6,opacity:.85,interactive:!0}).addTo(a),r.on("click",()=>{const g=u.get(t.ctx)?.marker;g&&(g.openTooltip(),g.openPopup())}),t.cpaSegment=r);const v=a.latLngToLayerPoint(L.latLng(i[0],i[1])),P=a.latLngToLayerPoint(L.latLng(s[0],s[1])),f=r.getTooltip(),x=cpaChipCompact(Math.hypot(P.x-v.x,P.y-v.y),f?t.cpaCompact:null),C=Xt(t);if(!f||x!==t.cpaCompact){f&&r.unbindTooltip(),r.bindTooltip(C,{permanent:n,direction:x?"top":"center",offset:x?[0,-6]:[0,0],sticky:!1,className:`cpa-label cpa-${o}`}),t.cpaCompact=x,t.cpaLabel=C,t.cpaSeverity=o,n&&r.openTooltip();return}if(t.cpaLabel!==C&&(f.setContent(C),t.cpaLabel=C),t.cpaSeverity!==o){f.options.className=`cpa-label cpa-${o}`;const g=f.getElement();g&&(g.classList.remove("cpa-danger","cpa-warn"),g.classList.add(`cpa-${o}`)),t.cpaSeverity=o}f.options.permanent!==n&&(f.options.permanent=n,n&&r.openTooltip())}const dt=70,gt=90;export function cpaChipCompact(t,e){return t<dt?!0:t>gt?!1:e??t<(dt+gt)/2}function Bt(t){if(!t.v||t.v.cpaOverlay!=="awareness")return;if(m===t.ctx){m=null,t.removeCpaOverlay();return}const e=m?u.get(m):null;m=t.ctx,e&&e.v?.cpaOverlay!=="alarm"&&e.removeCpaOverlay(),ft(t)}export function focusVessel(t){const e=u.get(t)?.marker;if(!e||!a)return!1;const n=e.getLatLng();return a.panTo(n,{animate:!0}),e.openPopup(),!0}export function setDistanceRings(t,e,n){et=!!t;const o=Number(e);Number.isFinite(o)&&o>0&&(A=o);const l=Math.round(Number(n));Number.isFinite(l)&&l>=1&&(nt=Math.min(l,8)),Ut()}function c(t){if(!(!t||!a))try{a.removeLayer(t)}catch{}}export function setFollow(t){st=!!t}function q(){for(const t of u.values())t.marker&&t.v&&ct(t,t.s)}export function setAisLabelsVisible(t){lt=!!t,q()}export function setHarborMode(t){ot=!!t,q()}function ht(){for(const t of d)c(t);for(const t of y)c(t);d=[],y=[],_=[]}function Ut(){if(!a)return;if(!et){ht();return}const t=Math.max(1,Math.min(8,nt|0)),e=Number.isFinite(A)&&A>0?A:.5;for(;d.length>t;)c(d.pop()),c(y.pop()),_.pop();for(let n=0;n<t;n++){const o=e*(n+1),l=o*1852;n<d.length?(d[n].setLatLng([w,b]),d[n].setRadius(l)):d.push(L.circle([w,b],{radius:l,color:"#888",weight:1,opacity:.5,dashArray:"2 4",fillOpacity:0,interactive:!1}).addTo(a));const s=l/111320;_[n]=s;const i=w+s,r=yt(o);n<y.length?(y[n].setLatLng([i,b]),y[n].setContent(r)):y.push(L.tooltip({permanent:!0,direction:"center",interactive:!1,className:"distance-ring-label"}).setLatLng([i,b]).setContent(r).addTo(a))}}export function dispose(){for(const t of u.values())t.dispose();u.clear();for(const t of S.values())c(t);S.clear(),O.clear(),a&&a.off("zoomend",at),m=null,T=-1,ht(),w=0,b=0,a=null,$=null,I=null,E=null,V=null,F=null}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{haversineMeters as R}from"./geoMath.js";const S=60,T=1e4;let t=null,a=null,n=null,o=null,c=null,m=!1;const s=[];let f=null,h=0,d=0;function M(){return!!(h&&d)}let A=null,O=null,u=null,g=null;const w=.5;export function init(e,l){t=e,a=l.colors}export function setBoatPosition(e,l){h=e,d=l,_(),I(e,l)}function _(){if(!n||!o||m)return;const e=n.getLatLng(),r=R(h,d,e.lat,e.lng)<=o.getRadius();if(r===A)return;A=r;const i=r?a.anchorOk:a.anchorDrag;o.setStyle({color:i,fillColor:i})}export function setAnchor(e,l,r){t&&(clearAnchor(),n=L.circleMarker([e,l],{radius:5,color:a.anchorOk,fillColor:a.anchorOk,fillOpacity:1}).addTo(t),o=L.circle([e,l],{radius:r,color:a.anchorOk,fillColor:a.anchorOk,fillOpacity:.06,weight:2,dashArray:"6,4"}).addTo(t),M()&&s.push({lat:h,lon:d,t:Date.now()}),v(e,l,r))}export function clearAnchor(){if(m=!1,A=null,O=null,g=null,!t){n=null,o=null,f=null,s.length=0,c=null,u=null;return}u&&(t.removeLayer(u),u=null),n&&(t.removeLayer(n),n=null),o&&(t.removeLayer(o),o=null),f&&(t.removeLayer(f),f=null),c&&(t.removeLayer(c),c=null),s.length=0}export function setAnchorIncomplete(e){m=!!e,!(!t||!n||!o)&&(m?(n.setStyle({color:"#f59e0b",fillColor:"#f59e0b",weight:2}),o.setStyle({color:"#f59e0b",fillColor:"#f59e0b",fillOpacity:.04,weight:1.5,dashArray:"2,8"})):(n.setStyle({color:a.anchorOk,fillColor:a.anchorOk,weight:1}),o.setStyle({color:a.anchorOk,fillColor:a.anchorOk,fillOpacity:.06,weight:2,dashArray:"6,4"}),A=null,M()&&_()))}export function setAnchorRaising(e){t&&(n&&n.setStyle(e?{opacity:.35,fillOpacity:.4}:{opacity:1,fillOpacity:1}),o&&o.setStyle(e?{opacity:.35,fillOpacity:.02,dashArray:"4,6"}:{opacity:1,fillOpacity:.06,dashArray:"6,4"}),c&&c.setStyle(e?{opacity:.3}:{opacity:.7}))}export function updateAnchorRadius(e){if(o&&o.setRadius(e),n){const l=n.getLatLng();v(l.lat,l.lng,e)}}export function setAnchorPosition(e,l){if(!t||!n)return;n.setLatLng([e,l]),o&&o.setLatLng([e,l]);const r=o?o.getRadius():0;v(e,l,r),u&&u.setLatLng([e,l])}export function setAnchorMoveMode(e){if(t)if(e){if(u||!n)return;const l=n.getLatLng();g={lat:l.lat,lon:l.lng},u=L.marker(l,{draggable:!0,keyboard:!1,zIndexOffset:1e3,icon:L.divIcon({className:"anchor-move-handle",html:'<div class="anchor-move-handle-dot"></div>',iconSize:[30,30],iconAnchor:[15,15]})}).addTo(t),u.on("drag",r=>{const i=r.target.getLatLng();g={lat:i.lat,lon:i.lng},setAnchorPosition(i.lat,i.lng)})}else u&&(t.removeLayer(u),u=null),g=null}export function getAnchorMovedLatLng(){return g}function v(e,l,r){if(!t)return;if(!Number.isFinite(h)||!Number.isFinite(d)||!Number.isFinite(e)||!Number.isFinite(l)){c&&(t.removeLayer(c),c=null),O=null;return}const i=Math.round(h*1e6)+","+Math.round(d*1e6)+","+Math.round(e*1e6)+","+Math.round(l*1e6);c&&O===i||(O=i,c?c.setLatLngs([[h,d],[e,l]]):c=L.polyline([[h,d],[e,l]],{color:a.anchorOk,weight:1.5,opacity:.7,dashArray:"4,3",interactive:!1}).addTo(t))}function I(e,l){if(!t)return;if(!n){f&&(t.removeLayer(f),f=null),s.length=0;return}let r=!1;const i=Date.now(),y=s[s.length-1];!y||i-y.t>=T?(s.push({lat:e,lon:l,t:i}),r=!0):R(y.lat,y.lon,e,l)>=w&&(y.lat=e,y.lon=l,r=!0);const x=i-S*6e4;for(;s.length>0&&s[0].t<x;)s.shift(),r=!0;if(n){const p=n.getLatLng(),C=o?o.getRadius():0;v(p.lat,p.lng,C)}if(!r||s.length<2)return;const k=s.map(p=>[p.lat,p.lon]);f?f.setLatLngs(k):f=L.polyline(k,{color:a.anchorOk,weight:2,opacity:.55,dashArray:"2,4",interactive:!1}).addTo(t)}export function dispose(){n=null,o=null,f=null,c=null,u=null,g=null,s.length=0,h=0,d=0,A=null,O=null,t=null,a=null}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{MarkerLayer as p}from"./markerLayer.js";import{esc as h}from"./popupHelpers.js";const u="#d62828",k="#06a13a",f="#f4c430",d="#1b1b1b",x="#1b1b1b",v="#d62828",$="#d62828",O="#f4c430",w="#3b82f6",_="#6b7280",l=new p;let a=null,c=!0;export function init(o){a=o,l.setMap(o)}function m(o,n,t){const s=t?"4 2":"0",e=1.5;if(o==="Cardinal")return`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
|
2
|
+
<rect x="9" y="3" width="10" height="10" fill="${n==="North"||n==="East"?d:f}" stroke="#000" stroke-width="${e}" stroke-dasharray="${s}" />
|
|
3
|
+
<rect x="9" y="13" width="10" height="10" fill="${n==="South"||n==="East"?d:f}" stroke="#000" stroke-width="${e}" stroke-dasharray="${s}" />
|
|
4
|
+
<text x="14" y="18" text-anchor="middle" font-size="11" font-weight="bold" fill="#fff" font-family="sans-serif">${n[0]}</text>
|
|
5
|
+
</svg>`;if(o==="Lateral"){const i=n==="Port"?u:k;return`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">${n==="Port"?`<rect x="6" y="6" width="16" height="16" fill="${i}" stroke="#000" stroke-width="${e}" stroke-dasharray="${s}" />`:`<polygon points="14,4 22,22 6,22" fill="${i}" stroke="#000" stroke-width="${e}" stroke-dasharray="${s}" />`}</svg>`}return o==="IsolatedDanger"?`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
|
6
|
+
<circle cx="14" cy="14" r="9" fill="${x}" stroke="#000" stroke-width="${e}" stroke-dasharray="${s}" />
|
|
7
|
+
<rect x="5" y="11" width="18" height="6" fill="${v}" />
|
|
8
|
+
<text x="14" y="18" text-anchor="middle" font-size="11" font-weight="bold" fill="#fff" font-family="sans-serif">!</text>
|
|
9
|
+
</svg>`:o==="SafeWater"?`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
|
10
|
+
<circle cx="14" cy="14" r="9" fill="#fff" stroke="#000" stroke-width="${e}" stroke-dasharray="${s}" />
|
|
11
|
+
<path d="M14 5 L14 23" stroke="${$}" stroke-width="6" />
|
|
12
|
+
</svg>`:o==="Special"?`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
|
13
|
+
<circle cx="14" cy="14" r="9" fill="${O}" stroke="#000" stroke-width="${e}" stroke-dasharray="${s}" />
|
|
14
|
+
<path d="M9 9 L19 19 M19 9 L9 19" stroke="#000" stroke-width="2" />
|
|
15
|
+
</svg>`:o==="BaseStation"?`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
|
16
|
+
<rect x="6" y="14" width="16" height="10" fill="${w}" stroke="#000" stroke-width="${e}" />
|
|
17
|
+
<path d="M14 14 L14 4 M10 7 L18 7 M11 4 L17 4" stroke="${w}" stroke-width="2" fill="none" />
|
|
18
|
+
</svg>`:`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 28 28">
|
|
19
|
+
<polygon points="14,5 23,14 14,23 5,14" fill="${_}" stroke="#000" stroke-width="${e}" stroke-dasharray="${s}" />
|
|
20
|
+
</svg>`}const g=new Map;function y(o,n,t){const s=o+"|"+n+"|"+(t?"1":"0");let e=g.get(s);return e!==void 0||(e=L.divIcon({className:"aton-marker",html:m(o,n,t),iconSize:[28,28],iconAnchor:[14,14]}),g.set(s,e)),e}export function buildAtonPopupHtml(o){return`<div class="aton-popup">
|
|
21
|
+
<strong>${h(o.title)}</strong>
|
|
22
|
+
${o.subtitle?`<div class="aton-popup-sub">${h(o.subtitle)}</div>`:""}
|
|
23
|
+
${o.detail?`<div class="aton-popup-mmsi">${h(o.detail)}</div>`:""}
|
|
24
|
+
</div>`}export function setAtons(o){if(!a)return;const n=new Set;for(const t of o){if(t.lat==null||t.lon==null||!isFinite(t.lat)||!isFinite(t.lon))continue;n.add(t.context);const s=y(t.symbol,t.side,!!t.virtual),e=buildAtonPopupHtml(t),i=l.get(t.context);if(i){const r=i.getLatLng();(r.lat!==t.lat||r.lng!==t.lon)&&i.setLatLng([t.lat,t.lon]),i._lastIcon!==s&&(i.setIcon(s),i._lastIcon=s),i._lastPopupHtml!==e&&(i.setPopupContent(e),i._lastPopupHtml=e)}else{const r=L.marker([t.lat,t.lon],{icon:s}).bindPopup(e,{autoPan:!1});r._lastIcon=s,r._lastPopupHtml=e,c&&r.addTo(a),l.set(t.context,r)}}for(const t of l.keys())n.has(t)||l.remove(t)}export function setAtonsVisible(o){if(a&&c!==!!o){c=!!o;for(const n of l.keys()){const t=l.get(n);t&&(c?t.addTo(a):a.removeLayer(t))}}}export function dispose(){l.clear(),a=null}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const $='stroke="rgba(0,0,0,0.4)" stroke-linejoin="round" fill="none"';export function makeBoatSvg(i,o,t,e){const n=o||28,r=n/2,s=`0,-${r-2} ${r-6},${r-4} 0,${r-8} -${r-6},${r-4}`;return`<svg width="${n}" height="${n}" viewBox="-${r} -${r} ${n} ${n}"><polygon points="${s}" ${$} stroke-width="${t?3.4:2.8}"/><polygon points="${s}" fill="${i}" ${t?'stroke="#fff" stroke-width="1.2" stroke-linejoin="round"':'stroke="rgba(255,255,255,0.5)" stroke-width="0.8" stroke-linejoin="round"'} opacity="${t?1:.9}"/>`+shipTypeGlyph(e)+"</svg>"}export function shipTypeGlyph(i){const o='stroke="rgba(0,0,0,0.7)" stroke-width="0.9" stroke-linecap="round"';switch(i){case"sail":return`<polygon points="0,-3 2.5,0 0,3 -2.5,0" fill="rgba(255,255,255,0.85)" ${o}/>`;case"fish":return`<line x1="-2.5" y1="-2" x2="2.5" y2="2" ${o}/><line x1="-2.5" y1="2" x2="2.5" y2="-2" ${o}/>`;case"commercial":return'<circle cx="0" cy="0.5" r="1.8" fill="rgba(0,0,0,0.75)"/>';case"service":return`<line x1="-2.5" y1="0" x2="2.5" y2="0" ${o}/><line x1="0" y1="-2.5" x2="0" y2="2.5" ${o}/>`;default:return""}}export function makeRadarSvg(i,o){const t=o||22,e=t/2,n=`0,-${e-3} ${e-4},${e-5} -${e-4},${e-5}`;return`<svg width="${t}" height="${t}" viewBox="-${e} -${e} ${t} ${t}"><polygon points="${n}" ${$} stroke-width="3.4"/><polygon points="${n}" fill="none" stroke="${i}" stroke-width="1.6" stroke-linejoin="round" opacity="0.95"/><circle cx="0" cy="0" r="2.4" fill="rgba(0,0,0,0.4)"/><circle cx="0" cy="0" r="1.6" fill="${i}"/></svg>`}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CHART_DOWNSHIFT_THRESHOLD=2;export function decideDownshift(s){const{errorZ:t,currentNative:e,minZoom:n,priorErrorsAtZ:r}=s;if(typeof t!="number"||!Number.isFinite(t))return{shouldDownshift:!1,newNative:e,nextErrorsAtZ:r,reason:"bad-coords"};if(typeof e!="number")return{shouldDownshift:!1,newNative:e,nextErrorsAtZ:r,reason:"bad-native"};if(t!==e)return{shouldDownshift:!1,newNative:e,nextErrorsAtZ:r,reason:"not-at-cap"};const o=(r??0)+1;if(o<2)return{shouldDownshift:!1,newNative:e,nextErrorsAtZ:o,reason:"below-threshold"};const i=typeof n=="number"&&Number.isFinite(n)?n:1;return e<=i+1?{shouldDownshift:!1,newNative:e,nextErrorsAtZ:o,reason:"below-floor"}:{shouldDownshift:!0,newNative:e-1,nextErrorsAtZ:0,reason:"downshift"}}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=null,S=null,c=null,u=null,x=!1,i=null,d=null,m=null,h=null,v=null,o=null,f=null,a=null,y=null,g=null;const P=L.divIcon({className:"active-wp-icon",html:'<div class="active-wp-pulse"></div>',iconSize:[16,16],iconAnchor:[8,8]});export function init(t,s){e=t,S=s.colors}export function setCourseLine(t,s,l,n,r){e&&(c?(t!==d||s!==m||l!==h||n!==v)&&(c.setLatLngs([[t,s],[l,n]]),d=t,m=s,h=l,v=n):(c=L.polyline([[t,s],[l,n]],{color:S.bearing,weight:2,opacity:.7,dashArray:"6,4"}).addTo(e),d=t,m=s,h=l,v=n),x?u&&e&&(e.removeLayer(u),u=null,o=null,f=null):u?(l!==o||n!==f)&&(u.setLatLng([l,n]),o=l,f=n):(u=L.marker([l,n],{icon:P,zIndexOffset:800,interactive:!1}).addTo(e),o=l,f=n),typeof r=="number"&&r>0?i?(l!==a||n!==y||r!==g)&&(i.setLatLng([l,n]),i.setRadius(r),a=l,y=n,g=r):(i=L.circle([l,n],{radius:r,color:S.bearing,weight:1,opacity:.55,dashArray:"4,4",fill:!1,interactive:!1}).addTo(e),a=l,y=n,g=r):i&&(e.removeLayer(i),i=null,a=null,y=null,g=null))}export function setCoursePulseSuppressed(t){x=!!t,x&&u&&e&&(e.removeLayer(u),u=null,o=null,f=null)}export function clearCourseLine(){c&&e&&(e.removeLayer(c),c=null),u&&e&&(e.removeLayer(u),u=null),i&&e&&(e.removeLayer(i),i=null),d=null,m=null,h=null,v=null,o=null,f=null,a=null,y=null,g=null}export function setStoppingDim(t){const s=t?.3:1;if(c)try{c.setStyle({opacity:s})}catch{}if(u)try{u.setOpacity(s)}catch{}if(i)try{i.setStyle({opacity:s})}catch{}}export function dispose(){c=null,u=null,i=null,d=null,m=null,h=null,v=null,o=null,f=null,a=null,y=null,g=null,e=null,S=null}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=null;const c=5e3;export function attachDeadman(o,r,i){if(e)return;const u=Number.isFinite(i)&&i>0?i:c;let n=null;const d=()=>{n=null,o.invokeMethodAsync(r).catch(()=>{})},t=()=>{n||(n=setTimeout(d,u))};document.addEventListener("pointerdown",t,{passive:!0}),document.addEventListener("keydown",t,{passive:!0}),e=()=>{document.removeEventListener("pointerdown",t),document.removeEventListener("keydown",t),n&&(clearTimeout(n),n=null),e=null},o.invokeMethodAsync(r).catch(()=>{})}export function detachDeadman(){e&&e()}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{haversineMeters as f,NM_PER_METER as g}from"./geoMath.js";export function formatDelta(o){return o<1e3?`\u0394 ${o.toFixed(0)} m`:`\u0394 ${(o*g).toFixed(2)} nm`}export function attachDragGhost(o,a){let l=null,n=null,t=null;o.on("dragstart",i=>{const e=a.container(),{className:r,html:s,size:c}=a.icon;t=i.target.getLatLng(),l=L.marker(t,{icon:L.divIcon({className:r,html:s,iconSize:[c,c],iconAnchor:[c/2,c/2]}),interactive:!1,keyboard:!1,zIndexOffset:500}).addTo(e),n=L.polyline([t,t],{color:a.color(),weight:1.5,opacity:.7,dashArray:"3,4",interactive:!1}).addTo(e),n.bindTooltip("\u0394 0 m",{permanent:!0,direction:"top",offset:[0,a.tooltipOffset],className:"measure-tooltip"}).openTooltip(t)}),o.on("drag",i=>{const e=i.target.getLatLng();if(a.onDrag(e)!==!1&&n&&t){n.setLatLngs([t,e]),n.setTooltipContent(formatDelta(f(t.lat,t.lng,e.lat,e.lng)));const r=n.getTooltip();r&&r.setLatLng(e)}}),o.on("dragend",()=>{const i=a.container();i&&(l&&i.removeLayer(l),n&&i.removeLayer(n)),l=null,n=null,t=null,a.onEnd?.()})}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){if(window.__onaErrorRelay)return;var w=200,m=800,S=8e3,h=2e3,v=0,a=null,c=!1,u=!1;function y(){if(a)return a;try{var e=document.baseURI||window.location.origin+"/";a=new URL("log",e).toString()}catch{a="/log"}return a}function i(e){if(!u)try{fetch(y(),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e),keepalive:!0}).then(function(r){r&&!r.ok&&(u=!0)}).catch(function(){u=!0})}catch{}}function s(){var e=Date.now();return e-v<w?!1:(v=e,!0)}function g(e){if(e==null)return"";if(e instanceof Error)return(e.stack||e.name+": "+e.message).toString();if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}window.addEventListener("error",function(e){if(s()){var r=e&&e.error||e;i({message:r&&r.message||String(e&&e.message||e||"unknown"),stack:r&&r.stack||"",url:window.location.href,userAgent:navigator.userAgent||"",ts:new Date().toISOString()})}}),window.addEventListener("unhandledrejection",function(e){if(s()){var r=e&&e.reason;i({message:r&&(r.message||String(r))||"unhandledrejection",stack:r&&r.stack||"",url:window.location.href,userAgent:navigator.userAgent||"",ts:new Date().toISOString()})}});var b=console.error.bind(console);{var f=function(){var e=arguments,r=function(){return b.apply(console,e)};if(c||!s())return r();c=!0;try{for(var t=Array.prototype.slice.call(e),n=null,o=0;o<t.length;o++)if(t[o]instanceof Error){n=t[o];break}var l=n?n.message||n.name||"Error":t.map(g).join(" ").slice(0,m),k=n?n.stack||"":t.map(g).join(`
|
|
2
|
+
`).slice(0,S);i({message:"console.error: "+l,stack:k,url:window.location.href,userAgent:navigator.userAgent||"",ts:new Date().toISOString()})}catch{}finally{c=!1}return r()};try{Object.defineProperty(f,"name",{value:"console.error"})}catch{}f.displayName="console.error",console.error=f}function d(){var e=document.getElementById("blazor-error-ui");if(!e){document.addEventListener("DOMContentLoaded",d,{once:!0});return}var r=!1,t=function(){return e.style.display&&e.style.display!=="none"},n=function(){var l=t();l&&!r&&s()&&i({message:"blazor-error-ui banner shown (see console.error entries for stack)",stack:(e.innerText||"").slice(0,h),url:window.location.href,userAgent:navigator.userAgent||"",ts:new Date().toISOString()}),r=l};n();var o=new MutationObserver(n);o.observe(e,{attributes:!0,attributeFilter:["style","class"]})}d(),window.__onaErrorRelay={report:function(e){s()&&i({message:e&&e.message||"manual report",stack:e&&e.stack||"",url:window.location.href,userAgent:navigator.userAgent||"",ts:new Date().toISOString()})}}})();
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const MS_TO_KNOTS=1.94384,METERS_PER_NM=1852;export function mobElapsed(t){let e=Math.floor(t);if(e<0&&(e=0),e<60)return`T+${e}s`;const o=Math.floor(e/60);return o<60?`T+${o}m`:`T+${Math.floor(o/60)}h${o%60}m`}export function latDms(t){const e=t>=0?"N":"S";return`${Math.abs(t).toFixed(5)}\xB0${e}`}export function lonDms(t){const e=t>=0?"E":"W";return`${Math.abs(t).toFixed(5)}\xB0${e}`}export function latLonDms(t,e,o=" "){return`${latDms(t)}${o}${lonDms(e)}`}export function rangeRingLabel(t){if(!isFinite(t)||t<=0)return"";let e;return t<1?e=t.toFixed(2).replace(/\.?0+$/,""):t<10?e=t.toFixed(1).replace(/\.0$/,""):e=Math.round(t).toString(),`${e} nm`}export function measureDistance(t){const e=t/1852,o=Math.round(t);return`${e.toFixed(2)} nm / ${o} m`}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const RAD=Math.PI/180,DEG=180/Math.PI,NM_PER_METER=1/1852,VECTOR_MINUTES=10;export function haversineMeters(r,s,n,t){const a=(n-r)*RAD,c=(t-s)*RAD,e=Math.sin(a/2)**2+Math.cos(r*RAD)*Math.cos(n*RAD)*Math.sin(c/2)**2;return 6371e3*2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e))}export function bearingDeg(r,s,n,t){const o=(t-s)*RAD,a=Math.sin(o)*Math.cos(n*RAD),c=Math.cos(r*RAD)*Math.sin(n*RAD)-Math.sin(r*RAD)*Math.cos(n*RAD)*Math.cos(o);return(Math.atan2(a,c)*DEG+360)%360}export function destPoint(r,s,n,t){const a=r*RAD,c=s*RAD,e=Math.asin(Math.sin(a)*Math.cos(t/6371e3)+Math.cos(a)*Math.sin(t/6371e3)*Math.cos(n)),h=c+Math.atan2(Math.sin(n)*Math.sin(t/6371e3)*Math.cos(a),Math.cos(t/6371e3)-Math.sin(a)*Math.sin(e));return[e*DEG,h*DEG]}export function vectorEnd(r,s,n,t,o){if(n==null||t==null||t<.1)return null;const a=typeof o=="number"&&isFinite(o)&&o>0?o:VECTOR_MINUTES;return destPoint(r,s,n,t*a*60)}export function chartBoundsBoxes(r){if(!Array.isArray(r)||r.length!==4||!r.every(Number.isFinite))return null;const[s,n,t,o]=r;if(n<-90||o>90||n>o||s<-540||s>540||t<-540||t>540)return null;if(s<=t)return[[[n,s],[o,t]]];const a=t+360;return[[[n,s],[o,a]],[[n,s-360],[o,t]]]}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function pointToSegmentPixels(x,t,e){const y=e.x-t.x,n=e.y-t.y,c=y*y+n*n;if(c===0)return Math.hypot(x.x-t.x,x.y-t.y);let o=((x.x-t.x)*y+(x.y-t.y)*n)/c;o=Math.max(0,Math.min(1,o));const h=t.x+o*y,i=t.y+o*n;return Math.hypot(x.x-h,x.y-i)}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let r=null,f=null,p=null,s=null;const u=new Map,d=new Map,h=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+?))?\s*\)$/;export function resolveColor(t,o){if(typeof t!="string")return"";const n=h.exec(t.trim());return n?(o(n[1])||"").trim()||(n[2]??"").trim():t}export function nearestIndex(t,o,n){let e=-1,l=1/0;for(let a=0;a<t.length;a++){const i=t[a][0]-o,c=t[a][1]-n,y=i*i+c*c;y<l&&(l=y,e=a)}return e}export function depthTooltip(t,o,n){const e=o&&n>=0?o[n]:null;return e==null||!isFinite(e)?t:`${t}<br>Depth here: ${e.toFixed(1)} m`}function g(t){const o=getComputedStyle(document.documentElement);return resolveColor(t,n=>o.getPropertyValue(n))}export function frameThrottle(t,o=e=>requestAnimationFrame(e),n=e=>cancelAnimationFrame(e)){let e=null,l=null;const a=(...i)=>{l=i,e===null&&(e=o(()=>{e=null,t(...l)}))};return a.cancel=()=>{e!==null&&n(e),e=null},a}function m(t,...o){f&&f.invokeMethodAsync(t,...o).catch(()=>{})}export function initHistoryMap(t,o,n,e,l,a){disposeHistoryMap(),f=a,r=L.map(t,{zoomControl:!0}).setView([o,n],e);for(const i of l||[])L.tileLayer(i.url,{maxZoom:i.maxZoom,opacity:i.opacity,attribution:i.attribution,referrerPolicy:"strict-origin-when-cross-origin"}).addTo(r);r.on("moveend",()=>{const i=r.getBounds();m("OnHistoryViewportChanged",i.getSouth(),i.getWest(),i.getNorth(),i.getEast())})}export function disposeHistoryMap(){r&&r.remove(),r=null,f=null,p=null,s=null,u.clear(),d.clear()}export function setView(t,o,n){r&&r.setView([t,o],n)}export function getViewportBounds(){if(!r)return null;const t=r.getBounds();return[t.getSouth(),t.getWest(),t.getNorth(),t.getEast()]}export function setBoatMarker(t,o,n){if(!r)return;p&&r.removeLayer(p);const e=g(n);p=L.circleMarker([t,o],{radius:7,color:e,fillColor:e,fillOpacity:1,weight:2}).bindTooltip("Current position").addTo(r)}export function addChartLayer(t,o,n,e,l,a){if(!r||d.has(t))return;const i={minZoom:n,maxZoom:e,opacity:l,keepBuffer:6,crossOrigin:"anonymous",attribution:"",errorTileUrl:""};a&&(i.bounds=L.latLngBounds(a[0],a[1]));const c=L.tileLayer(o,i);c.setZIndex(50),c.addTo(r),d.set(t,c)}export function removeChartLayer(t){const o=d.get(t);!r||!o||(r.removeLayer(o),d.delete(t))}const x={moving:{weight:3.5,opacity:.9,lineJoin:"round",lineCap:"round"},stationaryLine:{weight:2.5,opacity:.55,dashArray:"4 4",lineJoin:"round",lineCap:"round"}};function b(t){const o=g(t.color),n={sticky:!0,direction:"top"};if(t.style==="stationaryDot"){const l=t.coords[Math.floor(t.coords.length/2)];return L.circleMarker(l,{radius:5,color:o,fillColor:o,fillOpacity:.6,weight:1}).bindTooltip(t.tooltip,n)}const e=L.polyline(t.coords,{...x[t.style],color:o}).bindTooltip(t.tooltip,n);if(t.depths){let l=-1;const a=frameThrottle(i=>{const c=nearestIndex(t.coords,i.lat,i.lng);c!==l&&(l=c,e.setTooltipContent(depthTooltip(t.tooltip,t.depths,c)))});e.on("mousemove",i=>a(i.latlng)),e.on("mouseout",()=>{a.cancel(),l=-1,e.setTooltipContent(t.tooltip)})}return e}export function renderSegments(t,o){if(!r)return;for(const e of u.values())r.removeLayer(e);u.clear();let n=null;for(const e of t||[]){if(!e.coords||e.coords.length===0)continue;const l=b(e).addTo(r);l.on("click",i=>{L.DomEvent.stopPropagation(i),m("OpenTripDetailFromMap",e.index)}),u.set(e.index,l);const a=l.getBounds?l.getBounds():L.latLngBounds(l.getLatLng(),l.getLatLng());n=n?n.extend(a):a}o&&n&&r.fitBounds(n,{padding:[40,40]})}export function fitSegment(t){const o=u.get(t);if(!r||!o)return;r.invalidateSize();const n=o.getBounds?o.getBounds():L.latLngBounds(o.getLatLng(),o.getLatLng());r.fitBounds(n,{padding:[40,40]})}export function setPlaybackMarker(t,o,n){if(!r)return;s&&r.removeLayer(s);const e=g(n);s=L.circleMarker([t,o],{radius:8,color:e,fillColor:e,fillOpacity:1,weight:2}).bindTooltip("Playback").addTo(r)}export function movePlaybackMarker(t,o){s&&s.setLatLng([t,o])}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function isTypingTarget(t){if(!t)return!1;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"?!0:!!t.isContentEditable}export function shortcutKey(t){return typeof t.key=="string"&&t.key.length>0?t.key.toLowerCase():null}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{destPoint as y}from"./geoMath.js";let l=null,c=null,a=null,s=null,e=null,n=null;export function init(o,r){l=o,c=r.colors}export function setLaylines(o,r,d,P,t,i){if(!l)return;const u=5*1852,h=Math.abs(P),m=d-h,g=d+h,b=y(o,r,m,u),p=y(o,r,g,u);if(a?a.setLatLngs([[o,r],b]):a=L.polyline([[o,r],b],{color:c.anchorOk,weight:2,opacity:.7,dashArray:"10,6"}).addTo(l),s?s.setLatLngs([[o,r],p]):s=L.polyline([[o,r],p],{color:c.mob,weight:2,opacity:.7,dashArray:"10,6"}).addTo(l),t!=null&&i!=null){const f=y(t,i,m+Math.PI,u),v=y(t,i,g+Math.PI,u);e?e.setLatLngs([[t,i],f]):e=L.polyline([[t,i],f],{color:c.anchorOk,weight:1.5,opacity:.35,dashArray:"6,6"}).addTo(l),n?n.setLatLngs([[t,i],v]):n=L.polyline([[t,i],v],{color:c.mob,weight:1.5,opacity:.35,dashArray:"6,6"}).addTo(l)}else e&&l&&(l.removeLayer(e),e=null),n&&l&&(l.removeLayer(n),n=null)}export function clearLaylines(){a&&l&&(l.removeLayer(a),a=null),s&&l&&(l.removeLayer(s),s=null),e&&l&&(l.removeLayer(e),e=null),n&&l&&(l.removeLayer(n),n=null)}export function dispose(){a=null,s=null,e=null,n=null,l=null,c=null}
|
|
Binary file
|
|
Binary file
|