@marineyachtradar/signalk-plugin 0.2.1 → 0.5.0-beta.2

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.
Files changed (55) hide show
  1. package/README.md +48 -70
  2. package/package.json +42 -6
  3. package/plugin/config/schema.d.ts +13 -0
  4. package/plugin/config/schema.d.ts.map +1 -0
  5. package/plugin/config/schema.js +48 -0
  6. package/plugin/config/schema.js.map +1 -0
  7. package/plugin/index.d.ts +2 -0
  8. package/plugin/index.d.ts.map +1 -0
  9. package/plugin/index.js +359 -289
  10. package/plugin/index.js.map +1 -0
  11. package/plugin/mayara-client.d.ts +28 -0
  12. package/plugin/mayara-client.d.ts.map +1 -0
  13. package/plugin/mayara-client.js +102 -194
  14. package/plugin/mayara-client.js.map +1 -0
  15. package/plugin/radar-provider.d.ts +5 -0
  16. package/plugin/radar-provider.d.ts.map +1 -0
  17. package/plugin/radar-provider.js +192 -305
  18. package/plugin/radar-provider.js.map +1 -0
  19. package/plugin/spoke-forwarder.d.ts +30 -0
  20. package/plugin/spoke-forwarder.d.ts.map +1 -0
  21. package/plugin/spoke-forwarder.js +104 -136
  22. package/plugin/spoke-forwarder.js.map +1 -0
  23. package/plugin/types.d.ts +21 -0
  24. package/plugin/types.d.ts.map +1 -0
  25. package/plugin/types.js +3 -0
  26. package/plugin/types.js.map +1 -0
  27. package/public/540.js +2 -0
  28. package/public/540.js.LICENSE.txt +9 -0
  29. package/public/805.js +1 -0
  30. package/public/index.html +27 -39
  31. package/public/main.js +1 -0
  32. package/public/remoteEntry.js +1 -0
  33. package/public/api.js +0 -402
  34. package/public/assets/mayara_logo.png +0 -0
  35. package/public/base.css +0 -91
  36. package/public/control.html +0 -23
  37. package/public/control.js +0 -1155
  38. package/public/controls.css +0 -538
  39. package/public/discovery.css +0 -478
  40. package/public/favicon.ico +0 -0
  41. package/public/layout.css +0 -87
  42. package/public/mayara.js +0 -510
  43. package/public/proto/RadarMessage.proto +0 -41
  44. package/public/protobuf/protobuf.js +0 -9112
  45. package/public/protobuf/protobuf.js.map +0 -1
  46. package/public/protobuf/protobuf.min.js +0 -8
  47. package/public/protobuf/protobuf.min.js.map +0 -1
  48. package/public/radar.svg +0 -29
  49. package/public/render_webgpu.js +0 -886
  50. package/public/responsive.css +0 -29
  51. package/public/van-1.5.2.debug.js +0 -126
  52. package/public/van-1.5.2.js +0 -140
  53. package/public/van-1.5.2.min.js +0 -1
  54. package/public/viewer.html +0 -30
  55. package/public/viewer.js +0 -797
@@ -1,143 +1,111 @@
1
- /**
2
- * SpokeForwarder - WebSocket client that forwards spoke data to SignalK's binaryStreamManager
3
- *
4
- * Connects to mayara-server's spoke WebSocket endpoint and forwards binary data
5
- * to SignalK's built-in binary stream infrastructure.
6
- *
7
- * SignalK clients connect to /signalk/v2/api/vessels/self/radars/{id}/stream
8
- * and receive the forwarded data automatically.
9
- */
10
-
11
- const WebSocket = require('ws')
12
-
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SpokeForwarder = void 0;
7
+ const ws_1 = __importDefault(require("ws"));
13
8
  class SpokeForwarder {
14
- /**
15
- * Create a SpokeForwarder
16
- * @param {object} options - Configuration options
17
- * @param {string} options.radarId - The radar ID
18
- * @param {string} options.url - WebSocket URL for mayara-server spoke stream
19
- * @param {object} options.binaryStreamManager - SignalK's binaryStreamManager
20
- * @param {function} options.debug - Debug logging function
21
- * @param {number} options.reconnectInterval - Reconnect interval in ms (default: 5000)
22
- */
23
- constructor({ radarId, url, binaryStreamManager, debug, reconnectInterval = 5000 }) {
24
- this.radarId = radarId
25
- this.url = url
26
- this.binaryStreamManager = binaryStreamManager
27
- this.debug = debug || (() => {})
28
- this.reconnectInterval = reconnectInterval
29
-
30
- this.ws = null
31
- this.reconnectTimer = null
32
- this.closed = false
33
- this.connected = false
34
-
35
- // Stream ID for binaryStreamManager (matches SignalK radar stream pattern)
36
- this.streamId = `radars/${radarId}`
37
- }
38
-
39
- /**
40
- * Start the forwarder - connect to mayara-server
41
- */
42
- start() {
43
- if (this.closed) return
44
- this.connect()
45
- }
46
-
47
- /**
48
- * Connect to mayara-server spoke WebSocket
49
- */
50
- connect() {
51
- if (this.closed) return
52
-
53
- this.debug(`Connecting to spoke stream: ${this.url}`)
54
-
55
- try {
56
- this.ws = new WebSocket(this.url)
57
- this.ws.binaryType = 'arraybuffer'
58
-
59
- this.ws.on('open', () => {
60
- this.connected = true
61
- this.debug(`Connected to spoke stream for ${this.radarId}`)
62
- })
63
-
64
- this.ws.on('message', (data) => {
65
- // Forward binary spoke data to SignalK's binaryStreamManager
66
- if (this.binaryStreamManager && data instanceof ArrayBuffer) {
67
- const buffer = Buffer.from(data)
68
- this.binaryStreamManager.emitData(this.streamId, buffer)
69
- } else if (this.binaryStreamManager && Buffer.isBuffer(data)) {
70
- this.binaryStreamManager.emitData(this.streamId, data)
9
+ radarId;
10
+ url;
11
+ binaryStreamManager;
12
+ debug;
13
+ reconnectMs;
14
+ ws = null;
15
+ reconnectTimer = null;
16
+ closed = false;
17
+ connected = false;
18
+ streamId;
19
+ constructor(options) {
20
+ this.radarId = options.radarId;
21
+ this.url = options.url;
22
+ this.binaryStreamManager = options.binaryStreamManager;
23
+ this.debug = options.debug ?? (() => { });
24
+ this.reconnectMs = options.reconnectInterval ?? 5000;
25
+ this.streamId = `radars/${options.radarId}`;
26
+ }
27
+ start() {
28
+ if (this.closed)
29
+ return;
30
+ this.connect();
31
+ }
32
+ connect() {
33
+ if (this.closed)
34
+ return;
35
+ this.debug(`Connecting to spoke stream: ${this.url}`);
36
+ try {
37
+ this.ws = new ws_1.default(this.url);
38
+ this.ws.on('open', () => {
39
+ this.connected = true;
40
+ this.debug(`Connected to spoke stream for ${this.radarId}`);
41
+ });
42
+ this.ws.on('message', (data) => {
43
+ let buf;
44
+ if (Buffer.isBuffer(data)) {
45
+ buf = data;
46
+ }
47
+ else if (data instanceof ArrayBuffer) {
48
+ buf = Buffer.from(data);
49
+ }
50
+ else if (Array.isArray(data)) {
51
+ buf = Buffer.concat(data);
52
+ }
53
+ else {
54
+ return;
55
+ }
56
+ if (buf.length > 0) {
57
+ this.binaryStreamManager.emitData(this.streamId, buf);
58
+ }
59
+ });
60
+ this.ws.on('error', (err) => {
61
+ this.connected = false;
62
+ this.debug(`Spoke stream error for ${this.radarId}: ${err.message}`);
63
+ });
64
+ this.ws.on('close', (code) => {
65
+ this.connected = false;
66
+ this.debug(`Spoke stream closed for ${this.radarId}: ${code}`);
67
+ if (!this.closed) {
68
+ this.scheduleReconnect();
69
+ }
70
+ });
71
71
  }
72
- })
73
-
74
- this.ws.on('error', (err) => {
75
- this.debug(`Spoke stream error for ${this.radarId}: ${err.message}`)
76
- })
77
-
78
- this.ws.on('close', (code, reason) => {
79
- this.connected = false
80
- this.debug(`Spoke stream closed for ${this.radarId}: ${code} ${reason}`)
81
-
82
- if (!this.closed) {
83
- this.scheduleReconnect()
72
+ catch (err) {
73
+ this.debug(`Failed to connect to spoke stream for ${this.radarId}: ${err instanceof Error ? err.message : String(err)}`);
74
+ this.scheduleReconnect();
84
75
  }
85
- })
86
- } catch (err) {
87
- this.debug(`Failed to connect to spoke stream for ${this.radarId}: ${err.message}`)
88
- if (!this.closed) {
89
- this.scheduleReconnect()
90
- }
91
76
  }
92
- }
93
-
94
- /**
95
- * Schedule a reconnection attempt
96
- */
97
- scheduleReconnect() {
98
- if (this.closed || this.reconnectTimer) return
99
-
100
- this.debug(`Scheduling reconnect for ${this.radarId} in ${this.reconnectInterval}ms`)
101
-
102
- this.reconnectTimer = setTimeout(() => {
103
- this.reconnectTimer = null
104
- if (!this.closed) {
105
- this.connect()
106
- }
107
- }, this.reconnectInterval)
108
- }
109
-
110
- /**
111
- * Check if the forwarder is connected
112
- * @returns {boolean}
113
- */
114
- isConnected() {
115
- return this.connected
116
- }
117
-
118
- /**
119
- * Stop the forwarder and close the WebSocket
120
- */
121
- stop() {
122
- this.closed = true
123
-
124
- if (this.reconnectTimer) {
125
- clearTimeout(this.reconnectTimer)
126
- this.reconnectTimer = null
77
+ scheduleReconnect() {
78
+ if (this.closed || this.reconnectTimer)
79
+ return;
80
+ this.debug(`Scheduling reconnect for ${this.radarId} in ${this.reconnectMs}ms`);
81
+ this.reconnectTimer = setTimeout(() => {
82
+ this.reconnectTimer = null;
83
+ if (!this.closed) {
84
+ this.connect();
85
+ }
86
+ }, this.reconnectMs);
87
+ }
88
+ isConnected() {
89
+ return this.connected;
127
90
  }
128
-
129
- if (this.ws) {
130
- try {
131
- this.ws.close()
132
- } catch (err) {
133
- // Ignore close errors
134
- }
135
- this.ws = null
91
+ stop() {
92
+ this.closed = true;
93
+ if (this.reconnectTimer) {
94
+ clearTimeout(this.reconnectTimer);
95
+ this.reconnectTimer = null;
96
+ }
97
+ if (this.ws) {
98
+ try {
99
+ this.ws.close();
100
+ }
101
+ catch {
102
+ // Ignore close errors
103
+ }
104
+ this.ws = null;
105
+ }
106
+ this.connected = false;
107
+ this.debug(`Stopped spoke forwarder for ${this.radarId}`);
136
108
  }
137
-
138
- this.connected = false
139
- this.debug(`Stopped spoke forwarder for ${this.radarId}`)
140
- }
141
109
  }
142
-
143
- module.exports = SpokeForwarder
110
+ exports.SpokeForwarder = SpokeForwarder;
111
+ //# sourceMappingURL=spoke-forwarder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spoke-forwarder.js","sourceRoot":"","sources":["../src/spoke-forwarder.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA0B;AAc1B,MAAa,cAAc;IACjB,OAAO,CAAQ;IACf,GAAG,CAAQ;IACX,mBAAmB,CAAqB;IACxC,KAAK,CAAuB;IAC5B,WAAW,CAAQ;IAEnB,EAAE,GAAqB,IAAI,CAAA;IAC3B,cAAc,GAAyC,IAAI,CAAA;IAC3D,MAAM,GAAG,KAAK,CAAA;IACd,SAAS,GAAG,KAAK,CAAA;IACj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
5
+ export interface MayaraServerAPI extends ServerAPI {
6
+ binaryStreamManager?: BinaryStreamManager;
7
+ }
8
+ export interface ContainerManagerApi {
9
+ getRuntime: () => {
10
+ runtime: string;
11
+ version: string;
12
+ } | null;
13
+ ensureRunning: (name: string, config: unknown) => Promise<void>;
14
+ stop: (name: string) => Promise<void>;
15
+ remove: (name: string) => Promise<void>;
16
+ getState: (name: string) => Promise<'running' | 'stopped' | 'missing' | 'no-runtime'>;
17
+ pullImage: (image: string, onProgress?: (msg: string) => void) => Promise<void>;
18
+ imageExists: (image: string) => Promise<boolean>;
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/C;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;CAC1C;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC7D,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/D,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC,CAAA;IACrF,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/E,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CACjD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/public/540.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 540.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_marineyachtradar_signalk_plugin=self.webpackChunk_marineyachtradar_signalk_plugin||[]).push([[540],{869(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),c=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),d=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,m={};function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function v(){}function S(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=b.prototype;var E=S.prototype=new v;E.constructor=S,_(E,b.prototype),E.isPureReactComponent=!0;var g=Array.isArray;function w(){}var k={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function j(e,t,r){var o=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==o?o:null,props:r}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var R=/\/+/g;function $(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function T(e,t,o,u,a){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var c,s,f=!1;if(null===e)f=!0;else switch(i){case"bigint":case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case n:case r:f=!0;break;case p:return T((f=e._init)(e._payload),t,o,u,a)}}if(f)return a=a(e),f=""===u?"."+$(e,0):u,g(a)?(o="",null!=f&&(o=f.replace(R,"$&/")+"/"),T(a,t,o,"",function(e){return e})):null!=a&&(C(a)&&(c=a,s=o+(null==a.key||e&&e.key===a.key?"":(""+a.key).replace(R,"$&/")+"/")+f,a=j(c.type,s,c.props)),t.push(a)),1;f=0;var l,y=""===u?".":u+":";if(g(e))for(var h=0;h<e.length;h++)f+=T(u=e[h],t,o,i=y+$(u,h),a);else if("function"==typeof(h=null===(l=e)||"object"!=typeof l?null:"function"==typeof(l=d&&l[d]||l["@@iterator"])?l:null))for(e=h.call(e),h=0;!(u=e.next()).done;)f+=T(u=u.value,t,o,i=y+$(u,h++),a);else if("object"===i){if("function"==typeof e.then)return T(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(w,w):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,o,u,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return f}function x(e,t,n){if(null==e)return e;var r=[],o=0;return T(e,r,"","",function(e){return t.call(n,e,o++)}),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},I={map:x,forEach:function(e,t,n){x(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return x(e,function(){t++}),t},toArray:function(e){return x(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=y,t.Children=I,t.Component=b,t.Fragment=o,t.Profiler=a,t.PureComponent=S,t.StrictMode=u,t.Suspense=f,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return k.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=_({},e.props),o=e.key;if(null!=t)for(u in void 0!==t.key&&(o=""+t.key),t)!H.call(t,u)||"key"===u||"__self"===u||"__source"===u||"ref"===u&&void 0===t.ref||(r[u]=t[u]);var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){for(var a=Array(u),i=0;i<u;i++)a[i]=arguments[i+2];r.children=a}return j(e.type,o,r)},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:i,_context:e},e},t.createElement=function(e,t,n){var r,o={},u=null;if(null!=t)for(r in void 0!==t.key&&(u=""+t.key),t)H.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(o[r]=t[r]);var a=arguments.length-2;if(1===a)o.children=n;else if(1<a){for(var i=Array(a),c=0;c<a;c++)i[c]=arguments[c+2];o.children=i}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===o[r]&&(o[r]=a[r]);return j(e,u,o)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=k.T,n={};k.T=n;try{var r=e(),o=k.S;null!==o&&o(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(w,O)}catch(e){O(e)}finally{null!==t&&null!==n.types&&(t.types=n.types),k.T=t}},t.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},t.use=function(e){return k.H.use(e)},t.useActionState=function(e,t,n){return k.H.useActionState(e,t,n)},t.useCallback=function(e,t){return k.H.useCallback(e,t)},t.useContext=function(e){return k.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return k.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return k.H.useEffect(e,t)},t.useEffectEvent=function(e){return k.H.useEffectEvent(e)},t.useId=function(){return k.H.useId()},t.useImperativeHandle=function(e,t,n){return k.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return k.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return k.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return k.H.useMemo(e,t)},t.useOptimistic=function(e,t){return k.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return k.H.useReducer(e,t,n)},t.useRef=function(e){return k.H.useRef(e)},t.useState=function(e){return k.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return k.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return k.H.useTransition()},t.version="19.2.4"},540(e,t,n){e.exports=n(869)}}]);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license React
3
+ * react.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
package/public/805.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_marineyachtradar_signalk_plugin=self.webpackChunk_marineyachtradar_signalk_plugin||[]).push([[805],{805(e,t,a){a.r(t),a.d(t,{default:()=>i});var n=a(231);const r={root:{fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',color:"#333",padding:"16px 0"},sectionTitle:{fontSize:13,fontWeight:600,color:"#888",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:10,marginTop:24},btn:{display:"inline-flex",alignItems:"center",gap:8,padding:"8px 16px",border:"none",borderRadius:6,fontSize:13,fontWeight:600,cursor:"pointer"},btnPrimary:{background:"#3b82f6",color:"#fff"},btnDisabled:{opacity:.5,cursor:"not-allowed"},status:{marginTop:8,fontSize:12,minHeight:18},card:{display:"flex",alignItems:"center",gap:14,padding:"14px 18px",background:"#f8f9fa",border:"1px solid #e0e0e0",borderRadius:10,marginBottom:12},cardIcon:{width:44,height:44,borderRadius:10,display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,flexShrink:0},cardInfo:{flex:1},cardTitle:{fontSize:15,fontWeight:600,color:"#333"},cardMeta:{fontSize:12,color:"#888"},stateIndicator:{width:10,height:10,borderRadius:"50%",flexShrink:0},fieldRow:{display:"flex",alignItems:"center",gap:12,marginBottom:10},label:{fontSize:13,fontWeight:500,color:"#555",width:180,flexShrink:0},select:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,background:"#fff",color:"#333",minWidth:200},input:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,background:"#fff",color:"#333",width:200},inputSmall:{padding:"6px 10px",borderRadius:6,border:"1px solid #ccc",fontSize:13,background:"#fff",color:"#333",width:80},checkbox:{width:16,height:16,accentColor:"#3b82f6"},hint:{fontSize:11,color:"#aaa",marginLeft:8},empty:{textAlign:"center",padding:"30px 16px",color:"#999",fontSize:13},tag:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:600,marginLeft:8},tagPre:{background:"#fef3c7",color:"#92400e"},tagLatest:{background:"#dcfce7",color:"#166534"},statsGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(140px, 1fr))",gap:10,marginBottom:12},statCard:{padding:"12px 16px",background:"#f8f9fa",border:"1px solid #e0e0e0",borderRadius:10,textAlign:"center"},statValue:{fontSize:22,fontWeight:700,color:"#333"},statLabel:{fontSize:11,color:"#888",marginTop:2}};function l({title:e,children:t}){const[a,l]=(0,n.useState)(!1);return n.createElement("div",null,n.createElement("div",{style:{...r.sectionTitle,cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",gap:6},onClick:()=>l(!a)},n.createElement("span",{style:{fontSize:10,transition:"transform 0.15s",transform:a?"rotate(90deg)":"rotate(0deg)"}},"▶"),e),a&&n.createElement("div",{style:{marginBottom:16}},t))}function i({configuration:e,save:t}){const a=e||{},[i,o]=(0,n.useState)(!1!==a.managedContainer),[s,c]=(0,n.useState)(a.mayaraVersion||"latest"),[d,m]=(0,n.useState)((a.mayaraArgs||[]).join(" ")),[p,g]=(0,n.useState)(a.host||"localhost"),[u,f]=(0,n.useState)(a.port||6502),[y,b]=(0,n.useState)(a.secure||!1),[h,v]=(0,n.useState)(a.discoveryPollInterval||10),[E,k]=(0,n.useState)(a.reconnectInterval||5),[S,x]=(0,n.useState)([]),[C,w]=(0,n.useState)(!1),[I,R]=(0,n.useState)(null),[T,z]=(0,n.useState)(!0),[P,W]=(0,n.useState)(""),[j,A]=(0,n.useState)(!1),[U,B]=(0,n.useState)(!1),[F,N]=(0,n.useState)(!1),_=(0,n.useCallback)(async()=>{w(!0);try{const e=await fetch("/plugins/mayara-server-signalk-plugin/api/versions");e.ok&&x(await e.json())}catch{}w(!1)},[]),L=(0,n.useCallback)(async()=>{try{const e=await fetch("/plugins/mayara-server-signalk-plugin/status");e.ok?R(await e.json()):R({connected:!1,radars:[]})}catch{R({connected:!1,radars:[]})}z(!1)},[]);(0,n.useEffect)(()=>{_(),L();const e=setInterval(L,5e3);return()=>clearInterval(e)},[_,L]);const M=I&&I.connected,D=I?I.radars.length:0,O=I?.container?.state,V=(I?.container?.image||"").split(":")[1]||"unknown",H=(!(S.length>0&&"latest"===s)&&S.length>0&&S.some(e=>e.tag===s),S.filter(e=>!e.prerelease).slice(0,5)),G=S.filter(e=>e.prerelease).slice(0,3);return n.createElement("div",{style:r.root},n.createElement("div",{style:r.sectionTitle},"mayara-server Status"),T?n.createElement("div",{style:r.empty},"Checking connection..."):M?n.createElement(n.Fragment,null,n.createElement("div",{style:r.card},n.createElement("div",{style:{...r.cardIcon,background:"#1e40af",color:"#fff"}},"R"),n.createElement("div",{style:r.cardInfo},n.createElement("div",{style:r.cardTitle},"mayara-server"),n.createElement("div",{style:r.cardMeta},p,":",u," · ",D," radar",1!==D?"s":""," · ",V)),n.createElement("div",{style:{...r.stateIndicator,background:"#10b981"},title:"Connected"})),D>0&&n.createElement("div",{style:r.statsGrid},I.radars.map(e=>{const t=(I.spokeForwarders||[]).find(t=>t.radarId===e);return n.createElement("div",{key:e,style:r.statCard},n.createElement("div",{style:r.statValue},n.createElement("div",{style:{...r.stateIndicator,background:t&&t.connected?"#10b981":"#f59e0b",display:"inline-block",marginRight:6}})),n.createElement("div",{style:r.statLabel},e))}))):n.createElement("div",{style:r.card},n.createElement("div",{style:{...r.cardIcon,background:"#fef2f2",color:"#ef4444"}},"R"),n.createElement("div",{style:r.cardInfo},n.createElement("div",{style:r.cardTitle},"mayara-server"),n.createElement("div",{style:r.cardMeta},"Not connected",i?" — waiting for container":` — check ${p}:${u}`)),n.createElement("div",{style:{...r.stateIndicator,background:"#ef4444"}})),n.createElement("div",{style:r.sectionTitle},"Container"),n.createElement("div",{style:r.fieldRow},n.createElement("span",{style:r.label},"Managed container"),n.createElement("input",{type:"checkbox",style:r.checkbox,checked:i,onChange:e=>o(e.target.checked)}),n.createElement("span",{style:r.hint},i?"signalk-container manages mayara-server":"Connect to external instance")),i&&n.createElement(n.Fragment,null,n.createElement("div",{style:r.fieldRow},n.createElement("span",{style:r.label},"Image version"),n.createElement("select",{style:r.select,value:s,onChange:e=>c(e.target.value)},n.createElement("option",{value:"latest"},"latest (recommended)"),n.createElement("option",{value:"main"},"main (development)"),G.map(e=>n.createElement("option",{key:e.tag,value:e.tag},e.tag," (pre-release)")),H.map((e,t)=>n.createElement("option",{key:e.tag,value:e.tag},e.tag,0===t?" (current stable)":""))),C&&n.createElement("span",{style:r.hint},"loading..."),n.createElement("button",{style:{...r.btn,...r.btnPrimary,padding:"4px 10px",fontSize:11},onClick:_,title:"Refresh available versions"},"↻"),i&&n.createElement(n.Fragment,null,n.createElement("button",{style:{...r.btn,background:"#6b7280",color:"#fff",padding:"4px 12px",fontSize:11,...F?r.btnDisabled:{}},onClick:async()=>{N(!0),W("Pulling latest image to check for updates..."),A(!1);try{const e=await fetch("/plugins/mayara-server-signalk-plugin/api/check-update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tag:s})}),t=await e.json();e.ok?(W(t.updateAvailable?"⚠️ "+t.message:"✅ "+t.message),A(!1)):(W("Check failed: "+(t.error||e.statusText)),A(!0))}catch(e){W("Check failed: "+e.message),A(!0)}N(!1)},disabled:F||U,title:"Pull latest image to check for updates"},F?"Checking...":"Check"),"running"===O&&n.createElement("button",{style:{...r.btn,background:"#f59e0b",color:"#fff",padding:"4px 12px",fontSize:11,...U?r.btnDisabled:{}},onClick:async()=>{B(!0),W("Pulling image, stopping and recreating container..."),A(!1);try{const e=await fetch("/plugins/mayara-server-signalk-plugin/api/update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tag:s})});if(e.ok)W("Updated! Save config to restart with new version.");else{const t=await e.json();W("Update failed: "+(t.error||e.statusText)),A(!0)}}catch(e){W("Update failed: "+e.message),A(!0)}B(!1)},disabled:U||F,title:"Pull selected version, stop and recreate container"},U?"Updating...":"Update"))),n.createElement(l,{title:"Advanced"},n.createElement("div",{style:r.fieldRow},n.createElement("span",{style:r.label},"Arguments"),n.createElement("input",{style:{...r.input,width:300},placeholder:"--brand furuno --interface eth0",value:d,onChange:e=>m(e.target.value)}),n.createElement("span",{style:r.hint},"limit brand/interface, --emulator, etc.")))),n.createElement(l,{title:"Connection"},n.createElement("div",{style:r.fieldRow},n.createElement("span",{style:r.label},"Host"),n.createElement("input",{style:{...r.input,...i?{opacity:.5}:{}},value:i?"127.0.0.1":p,onChange:e=>g(e.target.value),disabled:i}),i&&n.createElement("span",{style:r.hint},"auto (container runs locally)")),n.createElement("div",{style:r.fieldRow},n.createElement("span",{style:r.label},"Port"),n.createElement("input",{style:r.inputSmall,type:"number",value:u,onChange:e=>f(Number(e.target.value))})),n.createElement("div",{style:r.fieldRow},n.createElement("span",{style:r.label},"Use HTTPS/WSS"),n.createElement("input",{type:"checkbox",style:r.checkbox,checked:y,onChange:e=>b(e.target.checked)})),n.createElement("div",{style:r.fieldRow},n.createElement("span",{style:r.label},"Discovery interval (s)"),n.createElement("input",{style:r.inputSmall,type:"number",value:h,onChange:e=>v(Number(e.target.value))})),n.createElement("div",{style:r.fieldRow},n.createElement("span",{style:r.label},"Reconnect interval (s)"),n.createElement("input",{style:r.inputSmall,type:"number",value:E,onChange:e=>k(Number(e.target.value))}))),P&&n.createElement("div",{style:{...r.status,color:j?"#ef4444":"#10b981",marginTop:16}},P),n.createElement("div",{style:{marginTop:24}},n.createElement("button",{style:{...r.btn,...r.btnPrimary},onClick:()=>{const e=d.trim()?d.trim().split(/\s+/):[];t({managedContainer:i,mayaraVersion:s,mayaraArgs:e,host:i?"127.0.0.1":p,port:u,secure:y,discoveryPollInterval:h,reconnectInterval:E}),W("Saved! Plugin will restart."),A(!1)}},"Save Configuration")))}}}]);
package/public/index.html CHANGED
@@ -1,45 +1,33 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html>
3
3
  <head>
4
- <title>Mayara Radar</title>
5
- <meta charset="utf-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
8
- <meta http-equiv="Pragma" content="no-cache" />
9
- <meta http-equiv="Expires" content="0" />
10
- <link type="text/css" rel="stylesheet" href="base.css?v=1" />
11
- <link type="text/css" rel="stylesheet" href="discovery.css?v=1" />
12
- <script type="module" src="mayara.js?v=3"></script>
4
+ <meta charset="utf-8">
5
+ <title>MaYaRa Radar</title>
6
+ <script>
7
+ fetch('/plugins/mayara-server-signalk-plugin/api/gui-url')
8
+ .then(r => r.json())
9
+ .then(data => {
10
+ // Replace localhost/127.0.0.1 with browser's hostname (for managed containers)
11
+ const url = new URL(data.url);
12
+ if (url.hostname === 'localhost' || url.hostname === '127.0.0.1') {
13
+ url.hostname = window.location.hostname;
14
+ }
15
+ window.location.href = url.href;
16
+ })
17
+ .catch(() => {
18
+ document.getElementById('msg').textContent = 'mayara-server not reachable. Check plugin configuration.';
19
+ });
20
+ </script>
21
+ <style>
22
+ body { font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #111; color: #ccc; }
23
+ .box { text-align: center; }
24
+ .box img { width: 80px; margin-bottom: 16px; }
25
+ </style>
13
26
  </head>
14
27
  <body>
15
- <div class="myr_discovery_container">
16
- <div class="myr_discovery_header">
17
- <div class="myr_radar_icon">
18
- <svg viewBox="0 0 100 100" class="myr_radar_sweep">
19
- <circle cx="50" cy="50" r="45" fill="none" stroke="currentColor" stroke-width="1" opacity="0.3"/>
20
- <circle cx="50" cy="50" r="30" fill="none" stroke="currentColor" stroke-width="1" opacity="0.3"/>
21
- <circle cx="50" cy="50" r="15" fill="none" stroke="currentColor" stroke-width="1" opacity="0.3"/>
22
- <line x1="50" y1="50" x2="50" y2="5" stroke="currentColor" stroke-width="2" class="myr_sweep_line"/>
23
- </svg>
24
- </div>
25
- <h1>Mayara Radar</h1>
26
- </div>
27
-
28
- <div id="webgpu_warning" class="myr_webgpu_warning" style="display: none;">
29
- </div>
30
-
31
- <div id="radars" class="myr_discovery_section">
32
- <div class="myr_detecting">
33
- <span class="myr_pulse"></span>
34
- Detecting radars...
35
- </div>
36
- </div>
37
-
38
- <div id="interfaces" class="myr_discovery_section">
39
- </div>
40
-
41
- <div id="info" class="myr_discovery_section">
42
- </div>
43
- </div>
28
+ <div class="box">
29
+ <img src="assets/mayara_logo.png" alt="MaYaRa">
30
+ <p id="msg">Redirecting to mayara-server...</p>
31
+ </div>
44
32
  </body>
45
33
  </html>
package/public/main.js ADDED
@@ -0,0 +1 @@
1
+ (()=>{var e,r,t={316(){}},a={};function n(e){var r=a[e];if(void 0!==r)return r.exports;var o=a[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.m=t,n.c=a,n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+".js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@marineyachtradar/signalk-plugin:",n.l=(t,a,o,i)=>{if(e[t])e[t].push(a);else{var l,c;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){l=p;break}}l||(c=!0,(l=document.createElement("script")).charset="utf-8",n.nc&&l.setAttribute("nonce",n.nc),l.setAttribute("data-webpack",r+o),l.src=t),e[t]=[a];var d=(r,a)=>{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach(e=>e(a)),r)return r(a)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),c&&document.head.appendChild(l)}},(()=>{n.S={};var e={},r={};n.I=(t,a)=>{a||(a=[]);var o=r[t];if(o||(o=r[t]={}),!(a.indexOf(o)>=0)){if(a.push(o),e[t])return e[t];n.o(n.S,t)||(n.S[t]={});var i=n.S[t],l="@marineyachtradar/signalk-plugin",c=[];return"default"===t&&((e,r,t,a)=>{var o=i[e]=i[e]||{},c=o[r];(!c||!c.loaded&&(1!=!c.eager?a:l>c.from))&&(o[r]={get:()=>n.e(540).then(()=>()=>n(540)),from:l,eager:!1})})("react","19.2.4"),e[t]=c.length?Promise.all(c).then(()=>e[t]=1):1}}})(),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var r=n.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var a=t.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=t[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={792:0};n.f.j=(r,t)=>{var a=n.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else{var o=new Promise((t,n)=>a=e[r]=[t,n]);t.push(a[2]=o);var i=n.p+n.u(r),l=new Error;n.l(i,t=>{if(n.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var o=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,a[1](l)}},"chunk-"+r,r)}};var r=(r,t)=>{var a,o,[i,l,c]=t,s=0;if(i.some(r=>0!==e[r])){for(a in l)n.o(l,a)&&(n.m[a]=l[a]);c&&c(n)}for(r&&r(t);s<i.length;s++)o=i[s],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunk_marineyachtradar_signalk_plugin=self.webpackChunk_marineyachtradar_signalk_plugin||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),n(316)})();
@@ -0,0 +1 @@
1
+ var _marineyachtradar_signalk_plugin;(()=>{"use strict";var e,r,t,n,a,o,i,u,l,s,f,p,c,d,h,g,v,m,y,b={623(e,r,t){var n={"./PluginConfigurationPanel":()=>t.e(805).then(()=>()=>t(805))},a=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),t.R=void 0,r),o=(e,r)=>{if(t.S){var n="default",a=t.S[n];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>a,init:()=>o})}},w={};function S(e){var r=w[e];if(void 0!==r)return r.exports;var t=w[e]={exports:{}};return b[e](t,t.exports,S),t.exports}S.m=b,S.c=w,S.d=(e,r)=>{for(var t in r)S.o(r,t)&&!S.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},S.f={},S.e=e=>Promise.all(Object.keys(S.f).reduce((r,t)=>(S.f[t](e,r),r),[])),S.u=e=>e+".js",S.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),S.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@marineyachtradar/signalk-plugin:",S.l=(t,n,a,o)=>{if(e[t])e[t].push(n);else{var i,u;if(void 0!==a)for(var l=document.getElementsByTagName("script"),s=0;s<l.length;s++){var f=l[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+a){i=f;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",S.nc&&i.setAttribute("nonce",S.nc),i.setAttribute("data-webpack",r+a),i.src=t),e[t]=[n];var p=(r,n)=>{i.onerror=i.onload=null,clearTimeout(c);var a=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(n)),r)return r(n)},c=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),u&&document.head.appendChild(i)}},S.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{S.S={};var e={},r={};S.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];S.o(S.S,t)||(S.S[t]={});var o=S.S[t],i="@marineyachtradar/signalk-plugin",u=[];return"default"===t&&((e,r,t,n)=>{var a=o[e]=o[e]||{},u=a[r];(!u||!u.loaded&&(1!=!u.eager?n:i>u.from))&&(a[r]={get:()=>S.e(540).then(()=>()=>S(540)),from:i,eager:!1})})("react","19.2.4"),e[t]=u.length?Promise.all(u).then(()=>e[t]=1):1}}})(),(()=>{var e;S.g.importScripts&&(e=S.g.location+"");var r=S.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),S.p=e})(),t=e=>{var r=e=>e.split(".").map(e=>+e==e?+e:e),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var a=e[n],o=(typeof a)[0];if(n>=r.length)return"u"==o;var i=r[n],u=(typeof i)[0];if(o!=u)return"o"==o&&"n"==u||"s"==u||"u"==o;if("o"!=o&&"u"!=o&&a!=i)return a<i;n++}},a=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,t+="u"==(typeof(u=e[o]))[0]?"-":(n>0?".":"")+(n=2,u);return t}var i=[];for(o=1;o<e.length;o++){var u=e[o];i.push(0===u?"not("+l()+")":1===u?"("+l()+" || "+l()+")":2===u?i.pop()+" "+i.pop():a(u))}return l();function l(){return i.pop().replace(/^\((.+)\)$/,"$1")}},o=(e,r)=>{if(0 in e){r=t(r);var n=e[0],a=n<0;a&&(n=-n-1);for(var i=0,u=1,l=!0;;u++,i++){var s,f,p=u<e.length?(typeof e[u])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!l||("u"==p?u>n&&!a:""==p!=a);if("u"==f){if(!l||"u"!=p)return!1}else if(l)if(p==f)if(u<=n){if(s!=e[u])return!1}else{if(a?s>e[u]:s<e[u])return!1;s!=e[u]&&(l=!1)}else if("s"!=p&&"n"!=p){if(a||u<=n)return!1;l=!1,u--}else{if(u<=n||f<p!=a)return!1;l=!1}else"s"!=p&&"n"!=p&&(l=!1,u--)}}var c=[],d=c.pop.bind(c);for(i=1;i<e.length;i++){var h=e[i];c.push(1==h?d()|d():2==h?d()&d():h?o(h,r):!d())}return!!d()},i=(e,r)=>e&&S.o(e,r),u=e=>(e.loaded=1,e.get()),l=e=>Object.keys(e).reduce((r,t)=>(e[t].eager&&(r[t]=e[t]),r),{}),s=(e,r,t)=>{var a=t?l(e[r]):e[r];return Object.keys(a).reduce((e,r)=>!e||!a[e].loaded&&n(e,r)?r:e,0)},f=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+a(n)+")",p=e=>{throw new Error(e)},c=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},d=(e,r,t)=>t?t():((e,r)=>p("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),h=(e=>function(r,t,n,a,o){var i=S.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,S.S[r],t,!1,a,o)):e(r,S.S[r],t,n,a,o)})((e,r,t,n,a,l)=>{if(!i(r,t))return d(e,t,l);var p=s(r,t,n);return o(a,p)||c(f(r,t,p,a)),u(r[t][p])}),g={},v={231:()=>h("default","react",!1,[1,19],()=>S.e(540).then(()=>()=>S(540)))},m={805:[231]},y={},S.f.consumes=(e,r)=>{S.o(m,e)&&m[e].forEach(e=>{if(S.o(g,e))return r.push(g[e]);if(!y[e]){var t=r=>{g[e]=0,S.m[e]=t=>{delete S.c[e],t.exports=r()}};y[e]=!0;var n=r=>{delete g[e],S.m[e]=t=>{throw delete S.c[e],r}};try{var a=v[e]();a.then?r.push(g[e]=a.then(t).catch(n)):t(a)}catch(e){n(e)}}})},(()=>{var e={717:0};S.f.j=(r,t)=>{var n=S.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var a=new Promise((t,a)=>n=e[r]=[t,a]);t.push(n[2]=a);var o=S.p+S.u(r),i=new Error;S.l(o,t=>{if(S.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,n[1](i)}},"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[o,i,u]=t,l=0;if(o.some(r=>0!==e[r])){for(n in i)S.o(i,n)&&(S.m[n]=i[n]);u&&u(S)}for(r&&r(t);l<o.length;l++)a=o[l],S.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=self.webpackChunk_marineyachtradar_signalk_plugin=self.webpackChunk_marineyachtradar_signalk_plugin||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var k=S(623);_marineyachtradar_signalk_plugin=k})();