signalk-questdb 2.4.0 → 2.5.1
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/.coderabbit.yaml +17 -2
- package/.release-please-manifest.json +1 -1
- package/AGENTS.md +80 -0
- package/CLAUDE.md +1 -79
- package/README.md +34 -12
- package/dist/api-contract.d.ts +1 -1
- package/dist/change-gate.d.ts +6 -6
- package/dist/change-gate.js +8 -6
- package/dist/change-gate.js.map +1 -1
- package/dist/config/schema.d.ts +1 -0
- package/dist/config/schema.js +6 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +42 -54
- package/dist/index.js.map +1 -1
- package/dist/path-matcher.d.ts +5 -4
- package/dist/path-matcher.js +17 -10
- package/dist/path-matcher.js.map +1 -1
- package/dist/restore.d.ts +10 -6
- package/dist/restore.js +22 -8
- package/dist/restore.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AppPanel-C293yEHl.js → AppPanel-D_HLFa10.js} +1 -1
- package/public/assets/PluginConfigurationPanel-DhWC94G3.js +13 -0
- package/public/assets/{_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-BH9mY6vj.js → _virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-CTTydXPl.js} +1 -1
- package/public/assets/{_virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__loadShare__shared-H1lSL0nN.js → _virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__loadShare__shared-BgRwx7LZ.js} +1 -1
- package/public/assets/{dist-BhVCbinB.js → dist-B4My1YVh.js} +1 -1
- package/public/assets/helpers-PTLizuYm.js +1 -0
- package/public/assets/hostInit-Dvn0aCSd.js +1 -0
- package/public/assets/{index-QJC86Uvi.js → index-j5iNctbW.js} +2 -2
- package/public/assets/pendingShares-BHVf8sM9.js +2 -0
- package/public/assets/{utils-D62kKhzq.js → utils-BesU7hIa.js} +1 -1
- package/public/assets/{vite-preload-helper-CRzLMJPS.js → vite-preload-helper-DclECHGd.js} +1 -1
- package/public/remoteEntry.js +2 -2
- package/public/assets/PluginConfigurationPanel-7qfy8fIR.js +0 -11
- package/public/assets/helpers-CvnX61Ju.js +0 -1
- package/public/assets/hostInit-Ds8KD_fS.js +0 -1
- package/public/assets/pendingShares-DemvETkM.js +0 -2
package/dist/path-matcher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-matcher.js","sourceRoot":"","sources":["../src/path-matcher.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,yCAAyC;AACzC,EAAE;AACF,sDAAsD;AACtD,8EAA8E;AAC9E,8EAA8E;AAC9E,2EAA2E;AAC3E,6EAA6E;AAC7E,8EAA8E;AAC9E,+BAA+B;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,wEAAwE;AACxE,8EAA8E;AAC9E,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAErC,2EAA2E;AAC3E,6EAA6E;AAC7E,iEAAiE;AACjE,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B,MAAM,OAAO,WAAW;IACL,QAAQ,CAAc;IACtB,KAAK,CAAc;IACnB,KAAK,GAAG,IAAI,GAAG,EAAmB,CAAC;IAEpD,YAAY,QAAkB;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAK,MAAM,OAAO,IAAI,QAAQ,IAAI,EAAE,EAAE,CAAC;YACrC,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;YAC1C,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S,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACrB,CAAC;CACF"}
|
package/dist/restore.d.ts
CHANGED
|
@@ -29,12 +29,16 @@ export interface RestoreDeps {
|
|
|
29
29
|
selfContext: string;
|
|
30
30
|
debug: (msg: string) => void;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
32
|
+
* Reads the Signal K data model, as `app.getPath` does. A value the model
|
|
33
|
+
* already holds is never replaced: it came in since the server started, so
|
|
34
|
+
* a stored row is at best as new, or comes from a source the server's
|
|
35
|
+
* priorities passed over. Replaying an older fix would move the vessel
|
|
36
|
+
* backwards on the chart. This covers a vessel heard before the recorder
|
|
37
|
+
* subscribed, one heard while the query ran, and a plugin restart, which
|
|
38
|
+
* leaves the model's positions in place (issue #242). Timestamps are not
|
|
39
|
+
* compared: rows carry the server's receive time, the model the source's.
|
|
36
40
|
*/
|
|
37
|
-
|
|
41
|
+
getPath: (path: string) => unknown;
|
|
38
42
|
}
|
|
39
43
|
export interface RestoreOptions {
|
|
40
44
|
/** Replay window. Values older than this are skipped entirely. */
|
|
@@ -50,7 +54,7 @@ export interface RestoreResult {
|
|
|
50
54
|
contexts: number;
|
|
51
55
|
values: number;
|
|
52
56
|
skippedStale: number;
|
|
53
|
-
/** Contexts skipped because the
|
|
57
|
+
/** Contexts skipped because the model already holds their position. */
|
|
54
58
|
skippedLive: number;
|
|
55
59
|
}
|
|
56
60
|
export declare function restoreFromHistory(deps: RestoreDeps, options: RestoreOptions): Promise<RestoreResult>;
|
package/dist/restore.js
CHANGED
|
@@ -201,6 +201,15 @@ function snapshotSQL(sinceIso, identitySinceIso, withKind) {
|
|
|
201
201
|
function isMissingKindColumn(err) {
|
|
202
202
|
return /Invalid column:\s*value_kind/i.test(err instanceof Error ? err.message : String(err));
|
|
203
203
|
}
|
|
204
|
+
// A leaf the server has written holds `value`, but a node can exist without
|
|
205
|
+
// one: meta published for a path creates it. A vessel name is a plain string
|
|
206
|
+
// at the context's root, with no leaf around it.
|
|
207
|
+
function inModel(node) {
|
|
208
|
+
if (typeof node === "object" && node !== null) {
|
|
209
|
+
return node.value !== undefined;
|
|
210
|
+
}
|
|
211
|
+
return node !== undefined;
|
|
212
|
+
}
|
|
204
213
|
function decodeValue(row) {
|
|
205
214
|
const text = row.valuetext;
|
|
206
215
|
if (text === null || text === undefined)
|
|
@@ -298,10 +307,11 @@ export async function restoreFromHistory(deps, options) {
|
|
|
298
307
|
// target that never expires.
|
|
299
308
|
if (!entry.byPath.has("navigation.position"))
|
|
300
309
|
continue;
|
|
301
|
-
//
|
|
302
|
-
//
|
|
303
|
-
|
|
304
|
-
|
|
310
|
+
// Stored "self" is a placeholder for whatever this server's self context
|
|
311
|
+
// is; every other context is already a real Signal K context string.
|
|
312
|
+
const context = storedContext === "self" ? selfContext : storedContext;
|
|
313
|
+
// Already drawn, from a fix at least as new as the stored one.
|
|
314
|
+
if (inModel(deps.getPath(`${context}.navigation.position`))) {
|
|
305
315
|
skippedLive++;
|
|
306
316
|
continue;
|
|
307
317
|
}
|
|
@@ -324,6 +334,13 @@ export async function restoreFromHistory(deps, options) {
|
|
|
324
334
|
entry.byPath.set(path, { ...newest, value, isName: false });
|
|
325
335
|
}
|
|
326
336
|
}
|
|
337
|
+
// Looked up after the leaves are joined, under the bare path the model
|
|
338
|
+
// keeps an object identity at.
|
|
339
|
+
for (const path of entry.byPath.keys()) {
|
|
340
|
+
if (inModel(deps.getPath(`${context}.${path}`))) {
|
|
341
|
+
entry.byPath.delete(path);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
327
344
|
// One update per distinct recorded time. These paths were sampled at
|
|
328
345
|
// different moments — an AIS name repeats every ~6 minutes while position
|
|
329
346
|
// arrives every few seconds — so putting them all under the newest
|
|
@@ -336,9 +353,6 @@ export async function restoreFromHistory(deps, options) {
|
|
|
336
353
|
: { path, value: row.value });
|
|
337
354
|
byTimestamp.set(row.ts, group);
|
|
338
355
|
}
|
|
339
|
-
// Stored "self" is a placeholder for whatever this server's self context
|
|
340
|
-
// is; every other context is already a real Signal K context string.
|
|
341
|
-
const context = storedContext === "self" ? selfContext : storedContext;
|
|
342
356
|
handleMessage({
|
|
343
357
|
context,
|
|
344
358
|
updates: [...byTimestamp].map(([timestamp, values]) => ({
|
|
@@ -354,7 +368,7 @@ export async function restoreFromHistory(deps, options) {
|
|
|
354
368
|
}
|
|
355
369
|
debug(`restored ${contexts} context(s), ${values} value(s) from history` +
|
|
356
370
|
(skippedStale ? `, skipped ${skippedStale} stale row(s)` : "") +
|
|
357
|
-
(skippedLive ? `, skipped ${skippedLive} already
|
|
371
|
+
(skippedLive ? `, skipped ${skippedLive} already in the model` : ""));
|
|
358
372
|
return { contexts, values, skippedStale, skippedLive };
|
|
359
373
|
}
|
|
360
374
|
//# sourceMappingURL=restore.js.map
|
package/dist/restore.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restore.js","sourceRoot":"","sources":["../src/restore.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"restore.js","sourceRoot":"","sources":["../src/restore.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAuCxD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,YAAY,GAAG;IACnB,qBAAqB;IACrB,iCAAiC;IACjC,4BAA4B;IAC5B,wBAAwB;IACxB,4BAA4B;IAC5B,kBAAkB;CACV,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,MAAM,cAAc,GAAG;IACrB,yEAAyE;IACzE,wEAAwE;IACxE,yDAAyD;IACzD,2EAA2E;IAC3E,qEAAqE;IACrE,qEAAqE;IACr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,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QACjC,CAAC;QAED,aAAa,CAAC;YACZ,OAAO;YACP,OAAO,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;gBACtD,mEAAmE;gBACnE,iEAAiE;gBACjE,OAAO,EAAE,cAAc;gBACvB,SAAS;gBACT,MAAM;aACP,CAAC,CAAC;SACJ,CAAC,CAAC;QAEH,QAAQ,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED,KAAK,CACH,YAAY,QAAQ,gBAAgB,MAAM,wBAAwB;QAChE,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,YAAY,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9D,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,WAAW,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC,CACvE,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AACzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "signalk-questdb",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "QuestDB history provider for Signal K — replaces signalk-to-influxdb",
|
|
6
6
|
"keywords": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"test:panel": "npm run build:panel-test && node --test \"dist-panel-test/src/test/panel/**/*.test.js\""
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
40
|
+
"node": ">=24"
|
|
41
41
|
},
|
|
42
42
|
"author": "Dirk Wahrheit <dirkwahrheit@gmail.com>",
|
|
43
43
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@js-temporal/polyfill": "^0.5.0",
|
|
50
50
|
"minimatch": "^11.0.3",
|
|
51
51
|
"saxes": "^6.0.0",
|
|
52
|
-
"signalk-container-helper": "^0.
|
|
52
|
+
"signalk-container-helper": "^0.15.1",
|
|
53
53
|
"typebox": "^1.3.11"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@module-federation/vite": "^1.20.4",
|
|
58
58
|
"@signalk/server-api": "latest",
|
|
59
59
|
"@types/express": "^5.0.0",
|
|
60
|
-
"@types/node": "^
|
|
60
|
+
"@types/node": "^24.0.0",
|
|
61
61
|
"@types/react": "^19.2.18",
|
|
62
62
|
"@types/react-dom": "^19.2.4",
|
|
63
63
|
"@vitejs/plugin-react": "^6.0.5",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,i as t,n}from"./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__loadShare__shared-
|
|
1
|
+
import{a as e,i as t,n}from"./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__loadShare__shared-BgRwx7LZ.js";var r=`/plugins/signalk-questdb/console/`;function i(){let[i,a]=t(null);return n(()=>{let e=!1;return fetch(r,{method:`GET`}).then(t=>{e||a(t.ok)}).catch(()=>{e||a(!1)}),()=>{e=!0}},[]),i===null?e.createElement(`div`,{style:{padding:`1rem`}},`Loading QuestDB console…`):i?e.createElement(`iframe`,{src:r,title:`QuestDB Console`,style:{width:`100%`,height:`100%`,minHeight:`80vh`,border:0},sandbox:`allow-scripts allow-same-origin`}):e.createElement(`div`,{style:{padding:`1rem`,maxWidth:`40rem`}},e.createElement(`h4`,null,`QuestDB console unavailable`),e.createElement(`p`,null,`The console could not be loaded. The usual causes are that the QuestDB container is not running, or that the`,` `,e.createElement(`strong`,null,`QuestDB console webapp`),` option is switched off in the plugin configuration.`))}export{i as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{a as e,i as t,n,r,t as i}from"./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__loadShare__shared-BgRwx7LZ.js";var a={root:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,color:`#333`,padding:`16px 0`},sectionToggle:{color:`#555`,display:`flex`,alignItems:`center`,gap:6,width:`100%`,textAlign:`left`,background:`none`,border:`none`,padding:0,cursor:`pointer`,userSelect:`none`},sectionMarker:{fontSize:11,transition:`transform 0.15s`},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`},btnSecondary:{background:`#f1f5f9`,color:`#475569`,border:`1px solid #e2e8f0`},btnWarn:{background:`#f59e0b`,color:`#fff`},btnDanger:{background:`#ef4444`,color:`#fff`},btnDisabled:{opacity:.5,cursor:`not-allowed`},btnSmall:{padding:`4px 12px`,fontSize:12},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},link:{color:`#3b82f6`,textDecoration:`none`,fontSize:13,fontWeight:600},textarea:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,fontFamily:`monospace`,background:`#fff`,color:`#333`,width:`100%`,minHeight:70,boxSizing:`border-box`,resize:`vertical`},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`},warnBanner:{padding:`12px 16px`,background:`#fef2f2`,border:`1px solid #fecaca`,borderRadius:10,marginBottom:12,fontSize:13,color:`#991b1b`,lineHeight:1.5},warnBannerTitle:{fontWeight:700,marginBottom:4},infoBanner:{padding:`12px 16px`,background:`#fffbeb`,border:`1px solid #fde68a`,borderRadius:10,marginBottom:12,fontSize:13,color:`#92400e`,lineHeight:1.5},bannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},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}},o={ok:`#10b981`,warn:`#f59e0b`,error:`#ef4444`};function s(e,t){if(!e)return{versions:null,versionsError:`⚠ Could not reach GitHub — showing last known versions, retry`};let n=t&&typeof t==`object`?t:{},r=Array.isArray(n)?n:Array.isArray(n.versions)?n.versions:[],i=!Array.isArray(n)&&n.sources&&typeof n.sources==`object`?n.sources:{},a=``;return i.prImages===`rate-limited`?a=`⚠ GitHub rate-limited — PR test images temporarily unavailable, retry shortly`:i.releases===`rate-limited`?a=`⚠ GitHub rate-limited — some versions temporarily unavailable, retry shortly`:(i.prImages===`error`||i.releases===`error`)&&(a=`⚠ Could not fetch some versions from GitHub, retry`),{versions:r,versionsError:a}}function c(e,t={}){let{stableCount:n=5,preCount:r=3}=t,i=e.filter(e=>typeof e.pr==`number`),a=e.filter(e=>typeof e.pr!=`number`);return{prVersions:i,stableVersions:a.filter(e=>!e.prerelease).slice(0,n),preVersions:a.filter(e=>e.prerelease).slice(0,r)}}function l(e,t=[`latest`],n={}){let{prVersions:r,stableVersions:i,preVersions:a}=c(e,n);return new Set([...t,...a.map(e=>e.tag),...i.map(e=>e.tag),...r.map(e=>e.tag)])}function u(e,t,n=[`latest`],r={}){return e?l(t,n,r).has(e)?null:e:null}function d(e){return e==null?`—`:e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function f(e,a={}){let{intervalMs:o=5e3}=a,[s,c]=t(null),[l,u]=t(!0),d=r(0),f=r(a.fallback??null),p=i(async t=>{let n=++d.current,r=f.current;try{let n=await(await fetch(e,{signal:t})).json().catch(()=>null);n&&typeof n==`object`&&(r=n)}catch{}n===d.current&&(c(r),u(!1))},[e]);return n(()=>{let e=!1,t=null,n=new AbortController,r=async()=>{await p(n.signal),!e&&o>0&&(t=setTimeout(()=>void r(),o))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[p,o]),{status:s,loading:l,refresh:()=>p()}}function p(e){let[a,o]=t([]),[c,l]=t(``),[u,d]=t(!1),f=r(0),p=i(async()=>{let t=++f.current;d(!0);try{let n=await fetch(e),r=await n.json().catch(()=>null),i=s(n.ok,r);if(t!==f.current)return;i.versions!==null&&o(i.versions),l(i.versionsError)}catch{if(t!==f.current)return;l(`⚠ Offline — showing last known versions`)}d(!1)},[e]);return n(()=>{p()},[p]),{versions:a,versionsError:c,loading:u,refresh:p}}function m({children:t,color:n}){return e.createElement(`span`,{style:{...a.hint,...n?{color:n}:{}}},t)}function h({state:t=`ok`,color:n,title:r,style:i}){return e.createElement(`div`,{style:{...a.stateIndicator,background:n??o[t],...i},title:r})}function g({icon:t,iconBackground:n,iconColor:r,title:i,meta:s,state:c=`ok`,stateTitle:l,link:u,children:d}){let f=c===`error`&&!n;return e.createElement(`div`,{style:a.card},e.createElement(`div`,{style:{...a.cardIcon,background:f?`#fef2f2`:n??`#3b82f6`,color:f?o.error:r??`#fff`}},t),e.createElement(`div`,{style:a.cardInfo},e.createElement(`div`,{style:a.cardTitle},i),s!=null&&e.createElement(`div`,{style:a.cardMeta},s)),d,u&&e.createElement(`a`,{href:u.href,target:`_blank`,rel:`noopener noreferrer`,style:a.link},u.label),e.createElement(h,{state:c,title:l}))}function _({title:n,defaultOpen:r=!1,children:i}){let[o,s]=t(r);return e.createElement(`div`,null,e.createElement(`button`,{type:`button`,"aria-expanded":o,style:{...a.sectionTitle,...a.sectionToggle},onClick:()=>s(!o)},e.createElement(`span`,{style:{...a.sectionMarker,transform:o?`rotate(90deg)`:`rotate(0deg)`}},`▶`),n),o&&e.createElement(`div`,{style:{marginBottom:16}},i))}var v={primary:a.btnPrimary,secondary:a.btnSecondary,warn:a.btnWarn,danger:a.btnDanger};function y({variant:t=`primary`,small:n=!1,busy:r=!1,busyLabel:i,disabled:o=!1,onClick:s,title:c,style:l,children:u}){let d=o||r;return e.createElement(`button`,{type:`button`,style:{...a.btn,...v[t],...n?a.btnSmall:{},...d?a.btnDisabled:{},...l},onClick:s,disabled:d,title:c},r?i??u:u)}function b({message:t,error:n=!1,id:r,style:i}){let s={...a.status,color:n?o.error:o.ok,marginTop:16,...i},c=t&&!n?t:``;return e.createElement(e.Fragment,null,e.createElement(`div`,{role:`status`,id:c?r:void 0,style:c?s:void 0},c),t&&n&&e.createElement(`div`,{role:`alert`,id:r,style:s},t))}var x=[{tag:`latest`,label:`latest (recommended)`}];function S({value:t,onChange:n,versions:r,floatingOptions:i=x,stableCount:s,preCount:l,loading:d=!1,error:f,onRefresh:p,disabled:h=!1,style:g}){let _={stableCount:s,preCount:l},{prVersions:v,stableVersions:b,preVersions:S}=c(r,_),C=u(t,r,i.map(e=>e.tag),_);return e.createElement(e.Fragment,null,e.createElement(`select`,{style:{...a.select,...g},value:t,onChange:e=>n(e.target.value),disabled:h},i.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.label??t.tag)),S.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,` (pre-release)`)),b.map((t,n)=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,n===0?` (current stable)`:``)),v.length>0&&e.createElement(`optgroup`,{label:`PR test images`},v.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,t.title?` — ${t.title}`:``))),C&&e.createElement(`option`,{value:C},C,` (running)`)),d&&e.createElement(m,null,`loading releases...`),p&&e.createElement(y,{small:!0,style:{padding:`4px 10px`,fontSize:11},onClick:p,title:`Refresh available versions`},`↻`),f&&e.createElement(m,{color:o.error},f))}var C={...a,warnBannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},fieldHelp:{fontSize:12,color:`#666`,marginTop:6,lineHeight:1.5},migrationItem:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,marginBottom:8},migrationActions:{display:`flex`,gap:8,alignItems:`center`}},ee=8388608,te=3e5,w=3e5,T=1,E={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`};function D(e){return e.replace(/&(?:#(\d+)|#x([0-9a-fA-F]+)|(amp|lt|gt|quot|apos));/g,(e,t,n,r)=>{if(r!==void 0)return E[r];let i=t===void 0?Number.parseInt(n,16):Number(t);return i<=1114111?String.fromCodePoint(i):e})}function O(e){return/^AIS\b/.test(e)||/^\d{9}$/.test(e)}var ne=/[^\s/>]+/y,re=[`trkpt`,`time`,`trkseg`,`trk`,`name`,`gpx`];function ie(e,t){for(let n of re)if(e.startsWith(n,t)){let r=e.charCodeAt(t+n.length);if(r<=32||r===47||r===62)return n}ne.lastIndex=t;let n=ne.exec(e)?.[0]??``,r=n.indexOf(`:`);return r>=0?n.slice(r+1):n}function ae(e,t,n,r){let i=e.indexOf(t,n);for(;i>=0&&i<r;){let n=e.charCodeAt(i-1),a=i+t.length;for(;e.charCodeAt(a)===32;)a++;if((n===32||n===9||n===10||n===13)&&e.charCodeAt(a)===61){let t=a+1;for(;e.charCodeAt(t)===32;)t++;let n=e[t];if(n!==`"`&&n!==`'`)return NaN;let i=e.indexOf(n,t+1);return i>0&&i<r?Number(e.slice(t+1,i)):NaN}i=e.indexOf(t,i+1)}return NaN}async function oe(e,t=()=>{},n,r=ee){let i=new Map,a=new TextDecoder(`utf-8`),o=[],s=``,c=``,l=!1,u=[],d=(e,t)=>{if(C!==2){c+=e;return}let n=u[u.length-1];n&&n.cdata===t?n.value+=e:u.push({value:e,cdata:t})},f=null,p=null,m=null,h=0,g=0,_=``,v=-1/0,y=``,b=NaN,x=e=>{p=e;let t=i.get(e);t||(t={name:e,tracks:0,points:0,from:null,to:null,samples:[]},i.set(e,t)),t.tracks++,f=t,v=-1/0},S=()=>{let e=f,t=m;if(m=null,!e||t===null)return;e.points++;let n=_.trim(),r=n.slice(0,16);r!==y&&(y=r,b=Date.parse(n));let i=b;if(Number.isFinite(i)&&((e.from===null||i<e.from)&&(e.from=i),(e.to===null||i>e.to)&&(e.to=i),i-v>=te)){let r=ae(t,`lat`,h,g),a=ae(t,`lon`,h,g);Number.isFinite(r)&&Number.isFinite(a)&&(e.samples.push(Date.parse(n),r,a),v=i)}},C=0,w=()=>{let e=o.length;return e<2||o[0]!==`gpx`||o[1]!==`trk`?0:e===2?1:e===3?o[2]===`name`?2:o[2]===`trkseg`?3:0:o[2]!==`trkseg`||o[3]!==`trkpt`?0:e===4?4:e===5&&o[4]===`time`?5:0},T=(e,t)=>{let n=s+e,r=0;for(;;){let e=n.indexOf(`<`,r);if(e<0){l&&d(n.slice(r),!1),s=``;return}l&&d(n.slice(r,e),!1);let i=null,a=n.charCodeAt(e+1);(a===33||a===63)&&(n.startsWith(`<!--`,e)?i=`-->`:n.startsWith(`<![CDATA[`,e)?i=`]]>`:a===63&&(i=`?>`));let v=i?n.indexOf(i,e):n.indexOf(`>`,e);if(v<0){s=t?``:n.slice(e);return}let y=v+(i?i.length:1);i===`]]>`&&l&&d(n.slice(e+9,v),!0),r=y,i||(a===47?(C===2&&p===null?x(u.map(e=>e.cdata?e.value:D(e.value)).join(``).trim()):C===5?_=c:C===4?S():C===1&&(f=null),o.pop()):a!==33&&(o.push(ie(n,e+1)),C=w(),C===1?(p=null,f=null):C===3&&p===null?x(``):C===4&&(m=n,h=e,g=v,_=``),n.charCodeAt(v-1)===47&&(C===4&&S(),o.pop())),C=w(),c=``,u=[],l=C===2||C===5)}};for(let i=0;i<e.size;i+=r){if(n?.aborted)throw new DOMException(`Scan aborted`,`AbortError`);let o=new Uint8Array(await e.slice(i,i+r).arrayBuffer());T(a.decode(o,{stream:!0}),!1),t(Math.min(e.size,i+r))}return T(a.decode(),!0),ue([...i.values()])}function k(e,t,n,r){let i=Math.PI/180,a=Math.sin((n-e)*i/2)**2+Math.cos(e*i)*Math.cos(n*i)*Math.sin((r-t)*i/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(a)))}function se(e){let t=[];for(let n=0;n<e.length;n+=3)t.push([e[n],e[n+1],e[n+2]]);return t.sort((e,t)=>e[0]-t[0])}function ce(e,t,n){let r=e[t],i=e[t+1];if(r&&i&&r[0]<=n&&n<=i[0]&&i[0]-r[0]<=2*w){let e=i[0]===r[0]?0:(n-r[0])/(i[0]-r[0]),t=i[2]-r[2];return t>180?t-=360:t<-180&&(t+=360),[r[1]+e*(i[1]-r[1]),r[2]+e*t]}let a=[r,i].filter(e=>e!==void 0&&Math.abs(e[0]-n)<=w).sort((e,t)=>Math.abs(e[0]-n)-Math.abs(t[0]-n))[0];return a?[a[1],a[2]]:null}function le(e,t){let n=[],r=0;for(let[i,a,o]of e){for(;r<t.length-1&&t[r+1][0]<=i;)r++;let e=ce(t,r,i);e&&n.push({km:k(a,o,e[0],e[1]),at:i})}return n.length===0?null:{km:[...n].sort((e,t)=>e.km-t.km)[Math.floor(n.length/2)].km,at:n[0].at}}function ue(e){let t=[...e].sort((e,t)=>t.points-e.points),n=new Map(e.map(e=>[e,se(e.samples)])),r=t.find(e=>!O(e.name)&&e.name!==``);return t.map(e=>{let i=O(e.name),a=null;if(!i)for(let r of t){if(r===e)break;if(O(r.name))continue;let t=le(n.get(e),n.get(r));if(t&&t.km>T){a={name:r.name,...t};break}}let o=!i&&a===null&&(e===r||e.tracks>=2&&e.name!==``);return{name:e.name,tracks:e.tracks,points:e.points,from:e.from,to:e.to,otherVessel:i,conflict:a,selected:o}})}var A=`/plugins/signalk-questdb/api/gpx-import`,de=5,fe=2e3,j=class extends Error{status;constructor(e,t){super(e),this.status=t}};async function M(e){try{return await e.json()}catch{return{error:`${e.status} ${e.statusText}`}}}async function pe(e){let t=e.fetch??fetch,n=e.sleep??(e=>new Promise(t=>setTimeout(t,e))),{file:r,signal:i}=e,a=e.sliceBytes??4194304,o=await t(A,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({filename:e.filename,size:r.size,tracks:e.tracks,fillGapsOnly:e.fillGapsOnly})}),s=await M(o);if(!o.ok||!s.import)throw new j(s.error??`The import could not start`,s.import??null);let c=s.import;e.onStatus(c);let l=`${A}/${encodeURIComponent(c.id)}`,u=async()=>{throw await t(l,{method:`DELETE`}).catch(()=>void 0),new DOMException(`The import was aborted`,`AbortError`)},d=0;for(;c.received<r.size;){i.aborted&&await u();let o=c.received,s;try{let e=await r.slice(o,o+a).arrayBuffer();s=await t(`${l}?offset=${o}`,{method:`PUT`,headers:{"content-type":`application/octet-stream`},body:e})}catch(e){if(i.aborted&&await u(),++d>de)throw e;await n(fe);let r=await t(A).then(M,()=>null);r?.import?.id===c.id&&(c=r.import);continue}let f=await M(s);if(s.status===409&&f.import?.state===`receiving`){if(f.import.received===o){if(++d>de)throw new j(f.error??`The slice at byte ${o} was refused`,f.import);await n(fe)}c=f.import}else{if(!s.ok||!f.import)throw new j(f.error??`The slice at byte ${o} was refused`,f.import??null);d=0,c=f.import,e.onStatus(c)}}i.aborted&&await u();let f;try{f=await t(`${l}/finish`,{method:`POST`,signal:i})}catch(e){throw i.aborted&&await u(),e}let p=await M(f);if(i.aborted&&await u(),!f.ok||!p.import||p.import.state!==`finished`)throw new j(p.error??`The import could not finish`,p.import??null);return e.onStatus(p.import),p.import}var N=e=>e===null?`?`:new Date(e).toISOString().slice(0,10),me=(e,t)=>t>0?Math.min(100,Math.floor(e/t*100)):0,he={receiving:`Importing`,finishing:`Finishing`,finished:`Import complete`,failed:`Import failed`,aborted:`Import aborted`};function ge({value:t}){return e.createElement(`div`,{role:`progressbar`,"aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,style:{height:8,background:`#e5e7eb`,borderRadius:4,overflow:`hidden`,margin:`8px 0`}},e.createElement(`div`,{style:{width:`${t}%`,height:`100%`,background:`#2563eb`}}))}function _e({status:t}){let n=t.summary;return e.createElement(`div`,{style:{...C.empty,padding:`12px`,textAlign:`left`}},e.createElement(`div`,null,e.createElement(`strong`,null,he[t.state]),t.filename?` — ${t.filename}`:``),t.state===`receiving`&&e.createElement(ge,{value:me(t.received,t.size)}),e.createElement(`div`,{style:C.cardMeta},(t.received/1e6).toFixed(0),` of `,(t.size/1e6).toFixed(0),` `,`MB read · `,d(n.imported),` rows written ·`,` `,d(n.alreadyRecorded),` points already recorded ·`,` `,d(n.invalid),` invalid`),n.from&&n.to&&e.createElement(`div`,{style:C.cardMeta},`From `,n.from.slice(0,10),` to `,n.to.slice(0,10)),t.error&&e.createElement(`div`,{style:{...C.cardMeta,color:`#b91c1c`}},t.error))}function ve({archiveResolutionSeconds:i}){let[a,o]=t(null),[s,c]=t(0),[l,u]=t(null),[f,p]=t(new Set),[m,h]=t(!0),[g,_]=t(null),[v,b]=t(null),[x,S]=t(null),[ee,te]=t(!1),w=r(null),T=r(null),E=r(0);n(()=>{let e=!1,t=E.current;return fetch(A).then(e=>e.json()).then(n=>{!e&&t===E.current&&n.import&&_(n.import)}).catch(()=>void 0),()=>{e=!0,T.current?.abort()}},[]);let D=v!==`importing`&&(g?.state===`receiving`||g?.state===`finishing`);n(()=>{if(!D)return;let e=setInterval(()=>{let e=E.current;fetch(A).then(e=>e.json()).then(t=>{e===E.current&&t.import&&_(t.import)}).catch(()=>void 0)},2e3);return()=>clearInterval(e)},[D]);let O=async e=>{T.current?.abort();let t=new AbortController;T.current=t,o(e),u(null),S(null),c(0),b(`scanning`);try{let n=await oe(e,c,t.signal);u(n),p(new Set(n.filter(e=>e.selected).map(e=>e.name)))}catch(e){t.signal.aborted||S(e instanceof Error?e.message:String(e))}finally{T.current===t&&(T.current=null),b(null)}},ne=async()=>{if(!a)return;let e=++E.current,t=new AbortController;w.current=t,S(null),b(`importing`);try{await pe({file:a,filename:a.name,tracks:[...f],fillGapsOnly:m,onStatus:_,signal:t.signal})}catch(e){e instanceof j&&e.status&&_(e.status),t.signal.aborted||S(e instanceof Error?e.message:String(e))}finally{w.current===t&&(w.current=null),b(null)}let n=await fetch(A).then(e=>e.json()).catch(()=>null);e===E.current&&n?.import&&_(n.import)},re=async()=>{if(E.current++,w.current?.abort(),g){let e=await(await fetch(`${A}/${encodeURIComponent(g.id)}`,{method:`DELETE`}).catch(()=>null))?.json().catch(()=>null);e?.import&&_(e.import)}},ie=e=>p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),ae=g?.state===`receiving`||g?.state===`finishing`,k=l?.filter(e=>e.otherVessel)??[];return e.createElement(`div`,null,e.createElement(`div`,{style:{fontSize:13,color:`#555`,marginBottom:10}},`Import a track exported from a chartplotter (GPX) into the archive, where retention never drops it. Points are thinned to one per`,` `,i>0?`${i} s`:`recorded point`,` `,`(Archive resolution). The file is read here first, so you choose which tracks are your own before anything is uploaded.`),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`GPX file`),e.createElement(`input`,{type:`file`,accept:`.gpx,application/gpx+xml`,"aria-label":`GPX file`,disabled:v!==null,onChange:e=>{let t=e.target.files?.[0];t&&O(t)}})),v===`scanning`&&a&&e.createElement(`div`,{style:C.cardMeta},`Reading `,a.name,`…`,e.createElement(ge,{value:me(s,a.size)})),l&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:{...C.label,width:`auto`,margin:`10px 0 6px`}},`Tracks in the file, by name`),e.createElement(`table`,{style:{width:`100%`,fontSize:13,borderSpacing:0}},e.createElement(`thead`,null,e.createElement(`tr`,{style:{textAlign:`left`,color:`#666`}},e.createElement(`th`,null),e.createElement(`th`,null,`Name`),e.createElement(`th`,null,`Tracks`),e.createElement(`th`,null,`Points`),e.createElement(`th`,null,`Period`),e.createElement(`th`,null))),e.createElement(`tbody`,null,l.filter(e=>!e.otherVessel||ee).map(t=>e.createElement(`tr`,{key:t.name},e.createElement(`td`,null,e.createElement(`input`,{type:`checkbox`,style:C.checkbox,"aria-label":`Import ${t.name||`(no name)`}`,checked:f.has(t.name),disabled:v!==null,onChange:()=>ie(t.name)})),e.createElement(`td`,null,t.name||e.createElement(`em`,null,`(no name)`)),e.createElement(`td`,null,d(t.tracks)),e.createElement(`td`,null,d(t.points)),e.createElement(`td`,null,N(t.from),` – `,N(t.to)),e.createElement(`td`,{style:{color:`#92400e`}},t.otherVessel?`AIS target`:t.conflict?`${Math.round(t.conflict.km).toLocaleString()} km from “${t.conflict.name}” on ${N(t.conflict.at)}: another vessel?`:``))),k.length>0&&e.createElement(`tr`,null,e.createElement(`td`,null),e.createElement(`td`,{colSpan:5},e.createElement(`button`,{type:`button`,style:{...C.link,background:`none`,border:0,padding:0},onClick:()=>te(e=>!e)},ee?`Hide`:`Show`,` `,k.length,` AIS target`,k.length===1?``:`s`,` (`,d(k.reduce((e,t)=>e+t.points,0)),` `,`points)`))))),e.createElement(`div`,{style:{...C.fieldRow,marginTop:10}},e.createElement(`span`,{style:C.label},`Skip recorded times`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,"aria-label":`Skip times already recorded`,checked:m,disabled:v!==null,onChange:e=>h(e.target.checked)}),e.createElement(`span`,{style:C.hint},`leave out points where QuestDB already has positions of the vessel within the same five minutes`)),e.createElement(`div`,{style:{display:`flex`,gap:8}},e.createElement(y,{variant:`primary`,busy:v===`importing`,busyLabel:`Importing…`,disabled:f.size===0||v!==null||ae,onClick:()=>void ne()},`Import ${f.size} track name${f.size===1?``:`s`}`))),x&&e.createElement(`div`,{style:{...C.cardMeta,color:`#b91c1c`,marginTop:8}},x),g&&e.createElement(`div`,{style:{marginTop:10}},e.createElement(_e,{status:g}),ae&&e.createElement(y,{variant:`warn`,small:!0,onClick:()=>void re()},`Abort`)))}function ye(e){return Object.entries(e??{}).map(([e,t])=>`${e} ${t}`).join(`
|
|
2
|
+
`)}function be(e){let t={},n=[];for(let r of e.split(`
|
|
3
|
+
`)){let e=r.trim();if(e===``)continue;let i=e.split(/\s+/),a=i.length===2?Number(i[1]):NaN;!Number.isFinite(a)||a<0||Object.hasOwn(t,i[0])?n.push(e):t[i[0]]=a}return{rates:t,invalid:n}}var P=e=>typeof e==`object`&&!!e;function xe(e){let t=P(e)?e.sources:void 0;return Array.isArray(t)?t.filter(e=>P(e)&&typeof e.type==`string`&&typeof e.url==`string`&&typeof e.status==`string`&&(e.version===void 0||typeof e.version==`string`)):[]}function Se(e){let t=P(e)?e.buckets:void 0;return Array.isArray(t)?t.filter(e=>P(e)&&typeof e.name==`string`&&(e.id===void 0||typeof e.id==`string`)&&(e.retentionSeconds===void 0||typeof e.retentionSeconds==`number`)):[]}function Ce(e){let t=P(e)?e.measurements:void 0;return Array.isArray(t)?t.filter(e=>P(e)&&typeof e.name==`string`&&Array.isArray(e.fields)):[]}function we(e){let t=P(e)?e.run:void 0;if(!P(t)||typeof t.id!=`string`||typeof t.state!=`string`)return;let n=t.state;if(n!==`running`&&n!==`done`&&n!==`failed`&&n!==`cancelled`)return;let r=P(t.progress)?t.progress:{},i=e=>typeof e==`number`&&Number.isFinite(e)?e:0,a=e=>typeof e==`string`?e:void 0;return{id:t.id,state:n,url:a(t.url)??``,bucket:a(t.bucket)??``,startedAt:a(t.startedAt)??``,finishedAt:a(t.finishedAt),error:a(t.error),resumedFrom:P(t.resumedFrom)?{measurement:a(t.resumedFrom.measurement),windowStart:a(t.resumedFrom.windowStart)}:void 0,progress:{read:i(r.read),written:i(r.written),skipped:i(r.skipped),measurementsDone:i(r.measurementsDone),measurementsTotal:i(r.measurementsTotal),currentMeasurement:a(r.currentMeasurement),currentWindowStart:a(r.currentWindowStart)}}}function Te(e){let t=e=>typeof e==`number`&&Number.isFinite(e)&&e>0?Math.floor(e):0;return{rows:t(P(e)?e.rows:void 0),dropped:t(P(e)?e.dropped:void 0)}}function Ee(e){let t=P(e)&&Array.isArray(e.contexts)?e.contexts.filter(e=>typeof e==`string`&&!!e):[],n=P(e)&&typeof e.self==`string`&&t.includes(e.self)?e.self:void 0;return{contexts:t,self:n,selfBy:n!==void 0&&P(e)&&(e.selfBy===`tag`||e.selfBy===`identity`)?e.selfBy:void 0}}function F(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function De(e){let t=P(e)?e.interrupted:void 0;if(P(t)&&typeof t.url==`string`&&typeof t.type==`string`&&typeof t.bucket==`string`&&typeof t.from==`string`&&typeof t.to==`string`&&typeof t.updatedAt==`string`)return{url:t.url,type:t.type,bucket:t.bucket,from:t.from,to:t.to,updatedAt:t.updatedAt,measurementsDone:typeof t.measurementsDone==`number`&&Number.isFinite(t.measurementsDone)?t.measurementsDone:0,measurement:typeof t.measurement==`string`?t.measurement:void 0,windowStart:typeof t.windowStart==`string`?t.windowStart:void 0}}function Oe(e,t){let n=new Date(e),r=new Date(t);return Number.isNaN(n.getTime())||Number.isNaN(r.getTime())?{error:`Enter a valid From and To date for the import.`}:r<=n?{error:`The To date must be after the From date.`}:{from:n.toISOString(),to:r.toISOString()}}function I(e){return e instanceof Error?e.message:String(e)}function L(e,t){return e??t}var ke=[`none`,`lz4`,`zstd`],Ae={padding:`4px 12px`,fontSize:12};function je(e){return ke.includes(e)?e:`lz4`}function Me({configuration:a,save:o}){let s=a||{},[c,l]=t(s.questdbHost||`127.0.0.1`),[u,m]=t(s.questdbIlpPort||9009),[h,v]=t(s.questdbHttpPort||9e3),[x,ee]=t(s.questdbPgPort||8812),[te,w]=t(s.questdbVersion||`latest`),[T,E]=t(s.managedContainer!==!1),[D,O]=t(s.recordSelf!==!1),[ne,re]=t(s.recordOthers!==!1),[ie,ae]=t(s.recordAllSources===!0),[oe,k]=t(s.restoreOnStart===!0),[se,ce]=t(s.enableConsole!==!1),[le,ue]=t(s.historySourcePolicyAll===!0),[A,de]=t((s.restoreMaxAgeMinutes??0)>0?s.restoreMaxAgeMinutes:9),[fe,j]=t(s.defaultSamplingRate??2e3),[M,pe]=t(ye(s.samplingRates)),[N,me]=t(String(s.ilpFlushIntervalMs??5e3)),[he,ge]=t(String(s.unchangedHeartbeatSeconds??300)),[_e,P]=t(s.retentionDays||0),[ke,Me]=t(s.archiveOwnTrack!==!1),[Ne,Pe]=t((Array.isArray(s.archivePaths)?s.archivePaths:[]).join(`
|
|
4
|
+
`)),[Fe,Ie]=t(String(s.archiveResolutionSeconds??10)),[Le,Re]=t(s.pathFilter?.mode===`include`?`include`:`exclude`),[ze,Be]=t((Array.isArray(s.pathFilter?.paths)?s.pathFilter.paths:[]).join(`
|
|
5
|
+
`)),[Ve,He]=t(s.compression||`lz4`),[Ue,We]=t(s.compressionLevel||3),[Ge,Ke]=t(s.networkName||`sk-network`),[qe,Je]=t(s.exposeToContainers||!1),{versions:Ye,versionsError:Xe,loading:Ze,refresh:Qe}=p(`/plugins/signalk-questdb/api/versions`),{status:R,loading:$e,refresh:et}=f(`/plugins/signalk-questdb/api/status`,{fallback:{status:`not_running`},intervalMs:5e3}),[tt,nt]=t(null),[rt,it]=t(!1),[z,at]=t(``),[B,ot]=t(null),[st,ct]=t(``),[lt,ut]=t(``),[dt,ft]=t(``),[pt,mt]=t(``),[ht,gt]=t(null),[V,_t]=t(``),[H,vt]=t(null),[yt,bt]=t(!1),[xt,St]=t(!1),[U,Ct]=t(null),[wt,Tt]=t(``),[Et,Dt]=t(!0),[Ot,kt]=t(``),[At,jt]=t(``),[W,G]=t(null),[Mt,Nt]=t(!1),[Pt,Ft]=t(null),[It,Lt]=t(!1),[K,q]=t(null),[Rt,J]=t(``),[zt,Y]=t(!1),[X,Bt]=t(null),[Vt,Ht]=t(!1),[Ut,Wt]=t(!1),[Gt,Kt]=t(!1),[qt,Jt]=t(!1),[Yt,Z]=t(``),[Xt,Zt]=t(null),[Qt,$t]=t(!1),en=r(0),[tn,nn]=t(!1),rn=i(async e=>{let t=++en.current;try{let n=await fetch(`/plugins/signalk-questdb/api/wal-diagnosis`,{signal:e});if(t!==en.current)return;if(n.ok){let e=await n.json();if(t!==en.current)return;Zt(e),$t(!1)}else $t(!0)}catch{t===en.current&&$t(!0)}},[]),an=!!(R&&R.status===`running`&&(R.suspendedTables||[]).length>0);n(()=>{if(!an){Zt(null),$t(!1);return}let e=!1,t=null,n=new AbortController,r=async()=>{await rn(n.signal),e||(t=setTimeout(r,15e3))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[an,rn]);let on=async(e,t)=>{let n=t.tailSkip?`
|
|
6
|
+
|
|
7
|
+
WARNING: this is the newest pending segment — skipping it drops the ENTIRE pending backlog.`:``;if(window.confirm(`Skip the unreadable WAL segment on ${e}?\n\nThis permanently loses ${d(t.skippedTxns)} transaction(s) recorded between ${t.skipWindowStart} and ${t.skipWindowEnd}. Everything after the skipped segment is replayed without loss.`+n)){nn(!0),Z(``);try{let n=await fetch(`/plugins/signalk-questdb/api/resume-wal/skip`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({table:e,confirmPlan:t})}),r=await n.json().catch(()=>({error:n.statusText}));n.ok?Z(r.message??``):Z(`Skip failed: ${L(r.error,`unknown error`)}`),et(),rn()}catch(e){Z(`Skip failed: ${I(e)}`)}nn(!1)}},sn=async()=>{Ht(!0);try{let e=await fetch(`/plugins/signalk-questdb/api/update/check`);e.ok&&Bt(await e.json())}catch{}Ht(!1)},cn=async()=>{Wt(!0),J(`Pulling new image and restarting...`),Y(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/update/apply`,{method:`POST`});if(e.ok){let t=await e.json();J(t.message??``),Bt(null),t.newVersion&&w(t.newVersion),et()}else{let t=await e.json().catch(()=>({error:e.statusText}));J(`Update failed: ${L(t.error,`unknown error`)}`),Y(!0)}}catch(e){J(`Update failed: ${I(e)}`),Y(!0)}Wt(!1)},ln=async()=>{if(window.confirm(`Remove the QuestDB container and DELETE ALL recorded data? This cannot be undone.`)){Kt(!0),J(`Removing QuestDB container and data...`),Y(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/purge-data`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));e.ok?(J(t.message??``),et()):(J(`Remove failed: ${L(t.error,`unknown error`)}`),Y(!0))}catch(e){J(`Remove failed: ${I(e)}`),Y(!0)}Kt(!1)}},un=async()=>{Jt(!0),Z(``);try{let e=await fetch(`/plugins/signalk-questdb/api/resume-wal`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));if(e.ok){let e=(t.results||[]).filter(e=>!e.ok);Z(e.length===0?`${L(t.message,`Resume requested`)}. Recording resumes as the backlog drains — the banner clears once tables catch up.`:`${L(t.message,`Resume requested`)}. `+e.map(e=>`${e.table}: ${e.error}`).join(` · `)),et(),rn()}else Z(`Resume failed: ${L(t.error,`unknown error`)}`)}catch(e){Z(`Resume failed: ${I(e)}`)}Jt(!1)},dn=async()=>{it(!0),J(``);try{let e=z?`?url=${encodeURIComponent(z)}`:``,t=await fetch(`/plugins/signalk-questdb/api/migration/detect${e}`);if(t.ok){let e=xe(await t.json().catch(()=>null));nt(e),e.length===0&&(J(z?`No InfluxDB found at ${z}.`:`No InfluxDB instances detected on localhost:8086.`),Y(!1))}}catch(e){J(`Detection failed: `+I(e)),Y(!0)}it(!1)},Q=i(()=>({token:st||void 0,org:lt||void 0,username:dt||void 0,password:pt||void 0}),[st,lt,dt,pt]),fn=i(async(e,t=Q())=>{bt(!0),J(``),_t(``);try{let n=await fetch(`/plugins/signalk-questdb/api/migration/buckets`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e.url,type:e.type,...t})}),r=await n.json().catch(()=>null),i=Se(r);gt(i),n.ok?i.length===0?(J(`No buckets found. InfluxDB 2.x needs an API token with read access.`),Y(!0)):i.length===1&&_t(i[0].name):(J(r?.error??`Could not list buckets.`),Y(!0))}catch(e){J(`Could not list buckets: `+I(e)),Y(!0)}bt(!1)},[Q]),pn=r(Q);n(()=>{pn.current=Q},[Q]),n(()=>{if(Ct(null),Tt(``),St(!1),!B||!V)return;let e=!1;return St(!0),(async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/contexts`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:B.url,type:B.type,bucket:V,...pn.current()})}),n=await t.json().catch(()=>null);if(e)return;if(!t.ok){J(n?.error??`Could not list the vessels.`),Y(!0);return}let r=Ee(n);Ct(r),Tt(r.self??(r.contexts.length===1?r.contexts[0]:``))}catch(t){if(e)return;J(`Could not list the vessels: `+I(t)),Y(!0)}finally{e||St(!1)}})(),()=>{e=!0}},[B,V]);let mn=i(async()=>{if(B&&V){bt(!0);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/measurements`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:B.url,type:B.type,bucket:V,...Q()})}),t=await e.json().catch(()=>null),n=Ce(t);vt(n),e.ok||(J(t?.error??`Could not list measurements.`),Y(!0))}catch(e){J(`Could not list measurements: `+I(e)),Y(!0)}bt(!1)}},[B,V,Q]),hn=async()=>{if(!B||!V)return;let e=Oe(Ot,At);if(`error`in e)J(e.error),Y(!0);else{Nt(!0),J(``);try{let t=await fetch(`/plugins/signalk-questdb/api/migration/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:B.url,type:B.type,bucket:V,...Q(),from:e.from,to:e.to,sourceSelfContext:wt||void 0,others:Et?`keep`:`skip`})}),n=await t.json().catch(()=>null);t.ok?(G(we(n)??null),q(null)):(J(n?.error??`Could not start migration.`),Y(!0))}catch(e){J(`Could not start migration: `+I(e)),Y(!0)}Nt(!1)}},gn=async()=>{Nt(!0),J(``),Y(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({resume:!0,...Q()})}),t=await e.json().catch(()=>null);e.ok?(G(we(t)??null),q(null)):(J(t?.error??`Could not resume the import.`),Y(!0))}catch(e){J(`Could not resume the import: `+I(e)),Y(!0)}Nt(!1)},_n=async()=>{if(window.confirm(`Discard the saved position? The import will then start again from the beginning. Rows already imported are kept and are not duplicated.`)){J(``),Y(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/discard`,{method:`POST`});if(e.ok)q(null);else{let t=await e.json().catch(()=>null);J(t?.error??`Could not discard the saved position.`),Y(!0)}}catch(e){J(`Could not discard: `+I(e)),Y(!0)}}},vn=async()=>{try{let e=await(await fetch(`/plugins/signalk-questdb/api/migration/cancel`,{method:`POST`})).json().catch(()=>null);G(we(e)??W)}catch(e){J(`Could not cancel: `+I(e)),Y(!0)}};n(()=>{if(W?.state!==`running`)return;let e=!1,t,n=async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/status`),n=await t.json().catch(()=>null),r=we(n);if(!e){if(r)G(r),q(De(n)??null);else if(t.ok){let e=De(n)??null;G(null),q(e),J(e?`The import stopped because the Signal K server restarted. It can be resumed from its saved position below.`:`The import stopped because the Signal K server restarted before a position was saved. Start it again — already-imported rows are not duplicated.`),Y(!0)}}}catch{}e||(t=setTimeout(n,1e3))};return t=setTimeout(n,1e3),()=>{e=!0,clearTimeout(t)}},[W?.state]),n(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/legacy-rows`),{rows:n}=Te(await t.json().catch(()=>null));!e&&t.ok&&Ft(n)}catch{}})(),()=>{e=!0}},[]);let yn=async()=>{if(Pt&&window.confirm(`Remove ${d(Pt)} rows imported under suffixed paths?\n\nThis rebuilds the string table without them, which can take a few minutes on a large database. Recording continues meanwhile. Run the import again afterwards to get these rows under their real paths.`)){Lt(!0),J(``),Y(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/legacy-rows/remove`,{method:`POST`}),t=await e.json().catch(()=>null);if(e.ok){let{rows:e,dropped:n}=Te(t);Ft(0),J(`Removed ${d(e)} rows. Run the import again to get them under their real paths.`+(n>0?` ${d(n)} live samples could not be kept while the table was swapped.`:``)),n>0&&Y(!0)}else J(t?.error??`Could not remove the rows.`),Y(!0)}catch(e){J(`Could not remove the rows: `+I(e)),Y(!0)}Lt(!1)}};n(()=>{let e=!1;return(async()=>{try{let t=await(await fetch(`/plugins/signalk-questdb/api/migration/status`)).json().catch(()=>null),n=we(t);if(e)return;n&&G(n),q(De(t)??null)}catch{}})(),()=>{e=!0}},[]);let[bn,xn]=t(``),[Sn,Cn]=t(``),[wn,Tn]=t(`parquet`),[En,Dn]=t(!1),On=()=>{let e=Number(N);if(N===``||!Number.isFinite(e)||e<500||e>3e5){J(`Write batch interval must be 500–300000 ms.`),Y(!0);return}let t=Number(he);if(he===``||!Number.isFinite(t)||t<0){J(`Unchanged-value heartbeat must be 0 or more seconds (0 = off).`),Y(!0);return}let n=be(M);if(n.invalid.length>0){J(`Per-path sampling rates need a pattern and 0 or more ms on each line, each pattern once: ${n.invalid.join(`, `)}`),Y(!0);return}let r=Number(Fe);Fe===``||!Number.isInteger(r)||r<0?(J(`Archive resolution must be a whole number of seconds, 0 or more.`),Y(!0)):(o({...s,questdbHost:c,questdbIlpPort:u,questdbHttpPort:h,questdbPgPort:x,questdbVersion:te,managedContainer:T,defaultSamplingRate:fe,ilpFlushIntervalMs:e,unchangedHeartbeatSeconds:t,recordSelf:D,recordOthers:ne,recordAllSources:ie,restoreOnStart:oe,historySourcePolicyAll:le,enableConsole:se,restoreMaxAgeMinutes:A,retentionDays:_e,archiveOwnTrack:ke,archivePaths:Ne.split(`
|
|
8
|
+
`).map(e=>e.trim()).filter(Boolean),archiveResolutionSeconds:r,compression:Ve,compressionLevel:Ue,networkName:Ge,exposeToContainers:qe,pathFilter:{mode:Le,paths:ze.split(`
|
|
9
|
+
`).map(e=>e.trim()).filter(Boolean)},samplingRates:n.rates}),J(`Saved! Plugin will restart with new configuration.`),Y(!1))},kn=async()=>{if(!bn||!Sn)J(`Set both from and to dates for export.`),Y(!0);else{Dn(!0),J(`Exporting ${wn.toUpperCase()}...`),Y(!1);try{let e=`/plugins/signalk-questdb/api/export?from=${encodeURIComponent(bn)}&to=${encodeURIComponent(Sn)}&format=${wn}`,t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({error:t.statusText}));J(`Export failed: ${L(e.error,`unknown error`)}`),Y(!0),Dn(!1);return}let n=await t.blob(),r=wn===`parquet`?`parquet`:`csv`,i=document.createElement(`a`);i.href=URL.createObjectURL(n),i.download=`signalk-export-${bn.slice(0,10)}.${r}`,i.click(),URL.revokeObjectURL(i.href),J(`Exported ${(n.size/1024/1024).toFixed(1)} MB`)}catch(e){J(`Export failed: ${I(e)}`),Y(!0)}Dn(!1)}},An=R&&R.status===`running`,jn=An&&R.suspendedTables||[],Mn=jn.length>0,Nn=An&&R.schemaMismatch||!1,$=An&&R.ulimitClamp||null,Pn=$!==null&&$.granted<=0,Fn=R?.hostMaxMapCount?.tooLow&&R.hostMaxMapCount||null;return e.createElement(`div`,{style:C.root},e.createElement(`div`,{style:C.sectionTitle},`QuestDB Status`),Fn&&e.createElement(`div`,{style:C.infoBanner},e.createElement(`div`,{style:C.warnBannerTitle},`Host vm.max_map_count is low — `,d(Fn.current),` `,`(QuestDB recommends `,d(Fn.recommended),`)`),`QuestDB memory-maps every partition and WAL segment it touches. As the database grows, this kernel limit can run out — mmap then fails with out-of-memory errors even though RAM is free, which shows up as slow or failing history queries, can suspend recording, and can take QuestDB down entirely. Run this in a shell on the host machine — not inside the QuestDB container, which can neither change the kernel-global limit nor has sudo (takes effect immediately, no restart needed):`,e.createElement(`code`,{style:C.warnBannerCode},`echo 'vm.max_map_count=${Fn.recommended}' | sudo tee /etc/sysctl.d/99-questdb.conf && sudo sysctl --system`)),$e?e.createElement(`div`,{style:C.empty},`Checking QuestDB...`):An?e.createElement(e.Fragment,null,Mn&&e.createElement(`div`,{style:C.warnBanner},e.createElement(`div`,{style:C.warnBannerTitle},`QuestDB WAL suspended — recording stalled`),`Rows are arriving but no longer commit, so the counts below have stopped advancing. This follows an error while QuestDB applied the write-ahead log — see the reason reported per table below. Resuming replays every pending transaction, so no data is lost.`,e.createElement(`code`,{style:C.warnBannerCode},jn.map(e=>{let t=String(e.errorMessage||e.errorTag||`reason not reported`).replace(/[\r\n]+/g,` `),n=(Xt?.tables||[]).find(t=>t.name===e.name),r=n?.suspendedSince?` — frozen since ${n.suspendedSince}`:``;return`${e.name}: ${d(e.txnLag)} txns behind — ${t}${r}`}).join(`
|
|
10
|
+
`)),(Xt?.tables||[]).filter(e=>e.applyError).map(t=>e.createElement(`div`,{key:t.name,style:{marginTop:8,fontSize:12}},`QuestDB's own log reports the apply failure on`,` `,e.createElement(`code`,null,t.name),` as:`,e.createElement(`code`,{style:C.warnBannerCode},t.applyError))),e.createElement(`div`,{style:{marginTop:10}},e.createElement(y,{variant:`primary`,busy:qt,busyLabel:`Resuming...`,disabled:tn,onClick:un},`Resume recording`)),jn.filter(e=>e.autoResume===`failed`).map(t=>{let n=(Xt?.tables||[]).find(e=>e.name===t.name);if(n?.partitionOpenFailure)return e.createElement(`div`,{key:t.name,style:{marginTop:12}},e.createElement(`div`,{style:C.warnBannerTitle},t.name,`: table data damaged — automatic repair not possible`),`QuestDB fails while opening this table's stored data, before it reaches any pending transaction. That means the commit record on disk describes rows whose data never made it to storage — the signature of a power loss during a write. Skipping transactions cannot fix this (the failure happens before them) and would discard the `,d(t.txnLag),` pending transactions for nothing, so no repair button is offered. Recovering this table means repairing its commit record by hand; please open an issue with the error above. Recording continues into the other tables, and “Resume recording” will re-suspend this one within milliseconds — it is safe to press, but it cannot repair this damage.`);let r=n?.skipPlan;return r?e.createElement(`div`,{key:t.name,style:{marginTop:12}},e.createElement(`div`,{style:C.warnBannerTitle},t.name,`: automatic resume failed — WAL segment unreadable`),`A lossless resume was attempted and the table re-suspended at the same transaction: the write-ahead-log segment at the stall point cannot be read back (typically corrupted by an unclean shutdown mid-write). Replaying can never get past it. The only repair is to skip the unreadable segment, losing`,` `,e.createElement(`b`,null,d(r.skippedTxns),` transaction(s)`),` `,`recorded between `,e.createElement(`b`,null,r.skipWindowStart),` and`,` `,e.createElement(`b`,null,r.skipWindowEnd),r.tailSkip?` — and this is the newest pending segment, so skipping it drops the ENTIRE pending backlog`:` — everything after the skipped segment (${d(Math.max(0,t.txnLag-r.skippedTxns))} txns) is replayed without loss`,`.`,e.createElement(`div`,{style:{marginTop:8}},e.createElement(y,{variant:`danger`,busy:tn,busyLabel:`Skipping...`,disabled:qt||Qt,onClick:()=>on(t.name,r)},`Skip unreadable segment (loses data)`),Qt&&e.createElement(`div`,{style:{marginTop:6,fontSize:12}},`The diagnosis could not be refreshed — the numbers above may be stale. The skip re-enables once a refresh succeeds.`))):null}),e.createElement(`div`,{style:{marginTop:8,fontSize:12}},`Manual fallback in the QuestDB SQL console (`,e.createElement(`code`,null,`:9000`),`), one statement at a time — avoid running it from several tabs, the console retries a busy statement forever:`,e.createElement(`code`,{style:C.warnBannerCode},jn.map(e=>{let t=`"${String(e.name).replace(/"/g,`""`)}"`,n=(Xt?.tables||[]).find(t=>t.name===e.name),r=[`ALTER TABLE ${t} RESUME WAL;`];return e.autoResume===`failed`&&n?.skipPlan&&!Qt&&r.push(`-- if the resume re-suspends: skip the unreadable segment (loses ${d(n.skipPlan.skippedTxns)} txns)`,`ALTER TABLE ${t} RESUME WAL FROM TXN ${n.skipPlan.skipToTxn};`),r.join(`
|
|
11
|
+
`)}).join(`
|
|
12
|
+
`)))),Yt&&e.createElement(`div`,{style:C.infoBanner},Yt),Nn&&e.createElement(`div`,{style:C.warnBanner},e.createElement(`div`,{style:C.warnBannerTitle},`QuestDB table schema mismatch — data not readable`),`A QuestDB table was re-created by ILP ingestion with the wrong timestamp column, so rows are being stored but reads filtering on time (history, Grafana, and the counts above) return nothing. The plugin rebuilds the affected table with the correct schema automatically within a minute; if this persists, restart the plugin. (The few rows written into the wrong-schema table are lost — they were unreadable anyway.)`),$&&e.createElement(`div`,{style:C.infoBanner},e.createElement(`div`,{style:C.warnBannerTitle},Pn?`QuestDB open-files request rejected by the host`:`QuestDB open-files limit capped by the host`),Pn?e.createElement(e.Fragment,null,`QuestDB requested a `,e.createElement(`code`,null,$.ulimit),` limit of`,` `,d($.requested),`, but the container host rejected it, so QuestDB is running with the runtime's default limits. This is typical for podman machine on macOS, where the limits live inside the VM and cannot be read from here. Raise the limits of the service that runs the container runtime (on macOS: inside the VM, via`,` `,e.createElement(`code`,null,`podman machine ssh`),`), then remove the container once with `,e.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` and restart Signal K — a restart alone cannot re-grant a rejected ask.`):e.createElement(e.Fragment,null,`QuestDB requested a `,e.createElement(`code`,null,$.ulimit),` limit of`,` `,d($.requested),`, but this host only allows `,d($.granted),`, so it was capped. QuestDB is running on the lower limit. To grant the full value, raise the host limit for the user running the container runtime — under rootless Podman that means a systemd`,` `,e.createElement(`code`,null,`user@.service`),` `,e.createElement(`code`,null,`LimitNOFILE`),` drop-in (editing `,e.createElement(`code`,null,`/etc/security/limits.conf`),` alone is usually not enough) — then restart the Signal K server so the plugin can re-create the QuestDB container with the raised limit (signalk-container 1.25.3+; on older versions remove the container once with`,` `,e.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` instead).`),` `,`This warning clears itself once the container is running with the full value.`,` `,e.createElement(`a`,{href:Pn?`https://github.com/dirkwa/signalk-questdb#questdb-container-never-starts-on-macos-podman-machine`:`https://github.com/dirkwa/signalk-container#raising-the-open-files-limit-nofile`,target:`_blank`,rel:`noreferrer`,style:{color:`#92400e`,textDecoration:`underline`}},`Step-by-step instructions`),`.`),e.createElement(g,{icon:`Q`,iconBackground:`#7c3aed`,iconColor:`#fff`,title:`QuestDB`,meta:e.createElement(e.Fragment,null,R?.endpoint||`${c}:${h}`,` `,`· `,Mn?`WAL suspended`:`Recording`),state:Mn?`error`:`ok`,stateTitle:Mn?`WAL suspended`:`Running`}),e.createElement(`div`,{style:C.statsGrid},e.createElement(`div`,{style:C.statCard},e.createElement(`div`,{style:C.statValue},d(R.totalRows)),e.createElement(`div`,{style:C.statLabel},`Total Rows`)),e.createElement(`div`,{style:C.statCard},e.createElement(`div`,{style:C.statValue},d(R.activePathsToday)),e.createElement(`div`,{style:C.statLabel},`Active Paths Today`)),R.restore&&e.createElement(`div`,{style:C.statCard},e.createElement(`div`,{style:C.statValue},R.restore.failed?`—`:d(R.restore.contexts)),e.createElement(`div`,{style:C.statLabel},R.restore.failed?`Restore failed`:`Vessels Restored`))),e.createElement(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:12}},X&&X.updateAvailable?e.createElement(e.Fragment,null,e.createElement(`span`,{style:{fontSize:13}},`v`,X.currentVersion,` →`,` `,e.createElement(`strong`,null,`v`,X.latestVersion),` available`),e.createElement(y,{variant:`primary`,busy:Ut,busyLabel:`Updating...`,onClick:cn,style:Ae},`Update QuestDB`)):X&&!X.updateAvailable?e.createElement(`span`,{style:{fontSize:12,color:`#888`}},`v`,X.currentVersion,` (up to date)`):e.createElement(y,{variant:`secondary`,busy:Vt,busyLabel:`Checking...`,onClick:sn,style:Ae},`Check for updates`))):e.createElement(g,{icon:`Q`,title:`QuestDB`,meta:e.createElement(e.Fragment,null,R?.status===`unhealthy`?`Not responding`:`Not running`,T?` — enable plugin to start container`:``),state:`error`}),e.createElement(`div`,{style:C.sectionTitle},`Image Version`),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`QuestDB version`),e.createElement(S,{value:te,onChange:w,versions:Ye,loading:Ze,onRefresh:()=>void Qe(),error:Xe,stableCount:3,preCount:2})),e.createElement(`div`,{style:C.sectionTitle},`Connection`),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Managed container`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,checked:T,onChange:e=>E(e.target.checked)}),e.createElement(`span`,{style:C.hint},T?`signalk-container manages QuestDB`:`Connect to external QuestDB`)),!T&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`QuestDB host`),e.createElement(`input`,{style:C.input,value:c,onChange:e=>l(e.target.value)})),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`HTTP port (queries)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,value:h,onChange:e=>v(Number(e.target.value))})),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`ILP port (writes)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))}))),T&&e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Bind to 0.0.0.0`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,checked:qe,onChange:e=>Je(e.target.checked)}),e.createElement(`span`,{style:{...C.hint,color:qe?`#ef4444`:void 0}},qe?`Caution! This exposes your data to the network`:`Signal K reaches QuestDB automatically — only enable to reach it from another machine or a separate-Docker Grafana`)),T&&qe&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`HTTP port (queries)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,value:h,onChange:e=>v(Number(e.target.value))})),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`ILP port (writes)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))})),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`PostgreSQL wire port`),e.createElement(`input`,{style:C.inputSmall,type:`number`,value:x,onChange:e=>ee(Number(e.target.value))}),e.createElement(`span`,{style:C.hint},`for Grafana`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Container network`),e.createElement(`input`,{style:C.input,value:Ge,onChange:e=>Ke(e.target.value)}),e.createElement(`span`,{style:C.hint},`shared with signalk-grafana`))),e.createElement(`div`,{style:C.sectionTitle},`Recording`),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Default sampling rate (ms)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,value:fe,onChange:e=>j(Number(e.target.value))}),e.createElement(`span`,{style:C.hint},`1000 = max 1 write/sec per path (0 = every update)`)),e.createElement(`div`,{style:{marginBottom:10}},e.createElement(`div`,{style:{...C.label,width:`auto`,marginBottom:6}},`Per-path sampling rates (one per line: pattern, then ms)`),e.createElement(`textarea`,{style:C.textarea,"aria-label":`Per-path sampling rates`,value:M,onChange:e=>pe(e.target.value)}),e.createElement(`div`,{style:C.fieldHelp},`Overrides the default rate for the paths a pattern matches. environment.wind.* 0 records every change of the wind at wire speed (an unchanged value still waits for the heartbeat, except a vessel position, which is written even when unchanged); tanks.* 10000 writes tanks at most every 10 s. Wire speed on a busy path writes many rows: a wind sensor at 10 Hz, angle and speed, is about 1.7 million rows a day.`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Unchanged-value heartbeat (s)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,min:0,"aria-label":`Unchanged-value heartbeat in seconds`,value:he,onChange:e=>ge(e.target.value)}),e.createElement(`span`,{style:C.hint},`a value that has not changed is written once per this many seconds; changes are written at the sampling rate (default 300, 0 = every sample)`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Write batch interval (ms)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,min:500,max:3e5,"aria-label":`Write batch interval in milliseconds`,value:N,onChange:e=>me(e.target.value)}),e.createElement(`span`,{style:C.hint},`one QuestDB transaction per table per interval; longer = bigger batches, but up to this many ms lost on a hard crash (default 5000)`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Record own vessel`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,checked:D,onChange:e=>O(e.target.checked)})),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Record AIS targets`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,checked:ne,onChange:e=>re(e.target.checked)})),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Record all sources`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,"aria-label":`Record all sources`,checked:ie,onChange:e=>ae(e.target.checked)}),e.createElement(`span`,{style:C.hint},`also record the sources a source priority hides, e.g. to calibrate a sensor or compare two GPS receivers. Each source is sampled on its own, so a path with three sources writes up to three times the rows`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Restore vessels on startup`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,"aria-label":`Restore vessels on startup`,checked:oe,onChange:e=>k(e.target.checked)}),e.createElement(`span`,{style:C.hint},`replay each vessel's last recorded position after a restart, so AIS targets appear at once instead of only when they next transmit`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Allow sourcePolicy=all`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,"aria-label":`Allow sourcePolicy=all in the History API`,checked:le,onChange:e=>ue(e.target.checked)}),e.createElement(`span`,{style:C.hint},`let History API callers split a path into one column per recording source. Off by default: a path recorded by four receivers becomes four queries and four columns, which is markedly more work on a Pi-class host. Requests that name a source explicitly are unaffected`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`QuestDB console webapp`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,"aria-label":`QuestDB console webapp`,checked:se,onChange:e=>ce(e.target.checked)}),e.createElement(`span`,{style:C.hint},`serve QuestDB's own console inside the Signal K admin UI (admin only). It is a full SQL client — unlike the read-only query endpoint it can modify and delete recorded data`)),oe&&e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Restore max age (minutes)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,min:1,"aria-label":`Restore max age (minutes)`,value:A,onChange:e=>{let t=Number(e.target.value);Number.isFinite(t)&&t>=1&&de(t)}}),e.createElement(`span`,{style:C.hint},`only replay values this recent (default 9, matching Freeboard's AIS expiry); higher puts staler positions on the chart`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Retention (days)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,value:_e,onChange:e=>P(Number(e.target.value))}),e.createElement(`span`,{style:C.hint},`0 = keep forever`)),_e>0&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Keep own track`),e.createElement(`input`,{type:`checkbox`,style:C.checkbox,"aria-label":`Keep own track beyond retention`,checked:ke,onChange:e=>Me(e.target.checked)}),e.createElement(`span`,{style:C.hint},`copy the own vessel's positions into an archive retention never drops, so the own track stays available however old`)),e.createElement(`div`,{style:{marginBottom:10}},e.createElement(`div`,{style:{...C.label,width:`auto`,marginBottom:6}},`Archived own-vessel paths (one per line, glob supported)`),e.createElement(`textarea`,{style:C.textarea,"aria-label":`Own-vessel paths to keep beyond retention`,value:Ne,onChange:e=>Pe(e.target.value)}),e.createElement(`div`,{style:C.fieldHelp},`Numeric paths only, e.g. environment.depth.* for the depth along the track. Other vessels are never archived.`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Archive resolution (s)`),e.createElement(`input`,{style:C.inputSmall,type:`number`,min:0,step:1,"aria-label":`Archive resolution (seconds)`,value:Fe,onChange:e=>Ie(e.target.value)}),e.createElement(`span`,{style:C.hint},`one row per path per interval (default 10); 0 keeps every recorded row`))),e.createElement(_,{title:`Path filtering`,defaultOpen:ze.trim()!==``},e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Filter mode`),e.createElement(`select`,{style:C.select,value:Le,onChange:e=>Re(e.target.value===`include`?`include`:`exclude`)},e.createElement(`option`,{value:`exclude`},`Exclude matching paths`),e.createElement(`option`,{value:`include`},`Include only matching paths`))),e.createElement(`div`,{style:{marginBottom:10}},e.createElement(`div`,{style:{...C.label,width:`auto`,marginBottom:6}},`Path patterns (one per line, glob supported) — optional`),e.createElement(`textarea`,{style:C.textarea,value:ze,onChange:e=>Be(e.target.value),placeholder:`notifications.*
|
|
13
|
+
environment.wind.*`}),e.createElement(`div`,{style:C.fieldHelp},`Empty = record everything (the default). Nothing is filtered out unless you list a pattern here.`),e.createElement(`div`,{style:{...C.hint,marginLeft:0}},Le===`exclude`?`These paths are NOT recorded; everything else is.`:`ONLY these paths are recorded; everything else is dropped.`))),e.createElement(_,{title:`Compression (on-disk)`},e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Compression codec`),e.createElement(`select`,{style:C.select,value:Ve,onChange:e=>He(je(e.target.value))},e.createElement(`option`,{value:`none`},`None`),e.createElement(`option`,{value:`lz4`},`LZ4 (fast)`),e.createElement(`option`,{value:`zstd`},`ZSTD (smaller)`)),e.createElement(`span`,{style:C.hint},`applies to new data after save`)),Ve===`zstd`&&e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`ZSTD level`),e.createElement(`input`,{style:C.inputSmall,type:`number`,min:`1`,max:`22`,value:Ue,onChange:e=>We(Number(e.target.value))}),e.createElement(`span`,{style:C.hint},`1 (fast) to 22 (smallest)`))),e.createElement(_,{title:`GPX track import`},e.createElement(ve,{archiveResolutionSeconds:s.archiveResolutionSeconds??10})),e.createElement(_,{title:`InfluxDB Migration`},Pt!==null&&Pt>0&&e.createElement(`div`,{style:{...C.empty,padding:`12px`,textAlign:`left`,marginBottom:12}},e.createElement(`div`,null,e.createElement(`strong`,null,d(Pt),` rows from an earlier import`),` `,`sit under paths nothing reads`),e.createElement(`div`,{style:C.fieldHelp},`Imports made before 2.1.5 from a signalk-to-influxdb 1.x database filed strings, booleans and positions under paths ending in`,` `,e.createElement(`code`,null,`.stringValue`),`, `,e.createElement(`code`,null,`.boolValue`),` or`,` `,e.createElement(`code`,null,`.jsonValue`),`. Removing them rebuilds the string table without them; run the import again afterwards and they land under their real paths.`),e.createElement(`div`,{style:{...C.migrationActions,marginTop:10}},e.createElement(y,{variant:`danger`,busy:It,busyLabel:`Removing...`,disabled:W?.state===`running`,onClick:yn},`Remove these rows`))),K&&W?.state!==`running`&&e.createElement(`div`,{style:{...C.empty,padding:`12px`,textAlign:`left`,marginBottom:12}},e.createElement(`div`,null,e.createElement(`strong`,null,`An import was interrupted`),` — ${K.bucket} from ${K.url}`),e.createElement(`div`,{style:C.cardMeta},F(K.from),` to`,` `,F(K.to),`.`,` `,K.measurementsDone,` measurements finished`,K.measurement?`, stopped in ${K.measurement}`+(K.windowStart?` at ${F(K.windowStart)}`:``):``,`. Position saved `,F(K.updatedAt),`.`),e.createElement(`div`,{style:C.fieldHelp},`Resuming continues from the saved position; rows already imported are not duplicated. If InfluxDB needs credentials, select the instance and enter them first — they are never stored.`),e.createElement(`div`,{style:{...C.migrationActions,marginTop:10}},e.createElement(y,{variant:`primary`,busy:Mt,busyLabel:`Resuming...`,onClick:gn},`Resume import`),e.createElement(y,{variant:`danger`,onClick:_n},`Discard saved position`))),e.createElement(`div`,{style:{display:`flex`,gap:10,alignItems:`center`,marginBottom:10}},e.createElement(y,{variant:`primary`,busy:rt,busyLabel:`Detecting...`,onClick:dn},`Detect InfluxDB`),e.createElement(`span`,{style:C.hint},`Checks localhost:8086 for InfluxDB 1.x and 2.x`)),tt&&tt.length>0&&e.createElement(`div`,null,tt.map((t,n)=>{let r=B?.url===t.url&&B?.type===t.type,i=()=>{ot(t),gt(null),_t(``),vt(null),ct(``),ut(``),ft(``),mt(``),t.type!==`influxdb2`&&fn(t,{token:void 0,org:void 0,username:void 0,password:void 0})};return e.createElement(`div`,{key:n,role:`button`,tabIndex:0,"aria-pressed":r,style:{...C.migrationItem,cursor:`pointer`,outline:r?`2px solid #22adf6`:void 0},onClick:i,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i())}},e.createElement(`div`,{style:{...C.cardIcon,width:36,height:36,fontSize:16,background:t.type===`influxdb2`?`#020a47`:`#22adf6`,color:`#fff`}},t.type===`influxdb2`?`2`:`1`),e.createElement(`div`,{style:C.cardInfo},e.createElement(`div`,{style:C.cardTitle},`InfluxDB `,t.type===`influxdb2`?`2.x`:`1.x`,e.createElement(`span`,{style:{...C.tag,...C.tagLatest}},t.status)),e.createElement(`div`,{style:C.cardMeta},t.url,` · v`,t.version)),e.createElement(`div`,{style:C.cardMeta},r?`selected`:`click to select`))})),e.createElement(`div`,{style:{...C.fieldRow,marginTop:10}},e.createElement(`span`,{style:C.label},`Manual InfluxDB URL`),e.createElement(`input`,{style:C.input,placeholder:`http://192.168.1.100:8086`,"aria-label":`Manual InfluxDB URL`,value:z,onChange:e=>at(e.target.value)}),e.createElement(`span`,{style:C.hint},`for remote instances`)),tt&&tt.length===0&&!rt&&e.createElement(`div`,{style:{...C.empty,padding:`16px`,textAlign:`left`}},`No InfluxDB found on localhost. Use manual URL above for remote instances.`),B&&e.createElement(`div`,{style:{marginTop:14}},e.createElement(`div`,{style:C.fieldHelp},B.type===`influxdb2`?`InfluxDB 2.x needs an API token with read access to the bucket, and the organisation name.`:`InfluxDB 1.x needs a username and password only if the server has authentication enabled.`),B.type===`influxdb2`?e.createElement(e.Fragment,null,e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`API token`),e.createElement(`input`,{style:C.input,type:`password`,"aria-label":`InfluxDB API token`,value:st,onChange:e=>ct(e.target.value)}),e.createElement(`span`,{style:C.hint},`not stored`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Organisation`),e.createElement(`input`,{style:C.input,"aria-label":`InfluxDB organisation`,value:lt,onChange:e=>ut(e.target.value)}))):e.createElement(e.Fragment,null,e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Username`),e.createElement(`input`,{style:C.input,"aria-label":`InfluxDB username`,value:dt,onChange:e=>ft(e.target.value)}),e.createElement(`span`,{style:C.hint},`blank if auth is off`)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Password`),e.createElement(`input`,{style:C.input,type:`password`,"aria-label":`InfluxDB password`,value:pt,onChange:e=>mt(e.target.value)}),e.createElement(`span`,{style:C.hint},`not stored`))),e.createElement(`div`,{style:{...C.fieldRow,marginTop:4}},e.createElement(`span`,{style:C.label}),e.createElement(y,{busy:yt,busyLabel:`Loading...`,onClick:()=>void fn(B)},B.type===`influxdb2`?`List buckets`:`List databases`)),ht&&ht.length>0&&e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},B.type===`influxdb2`?`Bucket`:`Database`),e.createElement(`select`,{style:C.select,"aria-label":`InfluxDB bucket or database to import from`,value:V,onChange:e=>{_t(e.target.value),vt(null)}},e.createElement(`option`,{value:``},`Select...`),ht.map(t=>e.createElement(`option`,{key:t.name,value:t.name},t.name))),e.createElement(y,{busy:yt,busyLabel:`...`,onClick:()=>void mn()},`Preview paths`)),xt&&e.createElement(`div`,{style:C.fieldHelp},`Listing the vessels in the bucket... On a large bucket this takes a while; the import waits for it.`),U&&U.contexts.length>0&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Your vessel`),e.createElement(`select`,{style:C.select,"aria-label":`Which vessel in the source is this one`,value:wt,onChange:e=>Tt(e.target.value)},U.contexts.length>1&&e.createElement(`option`,{value:``},`Select...`),U.contexts.map(t=>e.createElement(`option`,{key:t,value:t},t,t===U.self?U.selfBy===`tag`?` (recorded as the own vessel)`:` (this server)`:``)))),U.contexts.length>1&&e.createElement(e.Fragment,null,!U.self&&e.createElement(`div`,{style:C.fieldHelp},`The source holds `,U.contexts.length,` `,`vessels, does not say which was its own, and none of them is this server's identity. Pick the one the recording server used for this boat; its history is imported as this vessel.`),e.createElement(`label`,{style:{...C.fieldHelp,display:`block`}},e.createElement(`input`,{type:`checkbox`,checked:Et,onChange:e=>Dt(e.target.checked)}),` `,`Also import the other vessels (AIS targets), each under its own context`))),H&&e.createElement(`div`,{style:C.fieldHelp},H.length,` measurement`,H.length===1?``:`s`,` found`,H.length>0&&e.createElement(e.Fragment,null,` `,`— e.g.`,` `,H.slice(0,3).map(e=>e.name).join(`, `),H.length>3?`, ...`:``)),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`From`),e.createElement(`input`,{style:C.input,type:`datetime-local`,"aria-label":`Import range start`,value:Ot,onChange:e=>kt(e.target.value)})),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`To`),e.createElement(`input`,{style:C.input,type:`datetime-local`,"aria-label":`Import range end`,value:At,onChange:e=>jt(e.target.value)})),e.createElement(`div`,{style:C.fieldHelp},`Imported rows are tagged `,e.createElement(`code`,null,`source=influxdb-import`),` and written with their original timestamps, so re-running the same range overwrites rather than duplicating.`),e.createElement(`div`,{style:{...C.migrationActions,marginTop:10}},e.createElement(y,{variant:`primary`,busy:Mt,busyLabel:`Starting...`,disabled:!V||!Ot||!At||xt||(U?.contexts.length??0)>1&&!wt||W?.state===`running`,onClick:hn},`Start import`),W?.state===`running`&&e.createElement(y,{variant:`danger`,onClick:vn},`Cancel`))),W&&e.createElement(`div`,{style:{...C.empty,padding:`12px`,textAlign:`left`}},e.createElement(`div`,null,e.createElement(`strong`,null,W.state===`running`?`Importing`:W.state===`done`?`Import complete`:W.state===`cancelled`?`Import cancelled`:`Import failed`),W.bucket?` from ${W.bucket}`:``),W.resumedFrom&&e.createElement(`div`,{style:C.cardMeta},`Resumed`,W.resumedFrom.measurement?` in ${W.resumedFrom.measurement}`+(W.resumedFrom.windowStart?` at ${F(W.resumedFrom.windowStart)}`:``):` from the saved position`,`; the totals include the earlier run.`),e.createElement(`div`,{style:C.cardMeta},d(W.progress.written),` written,`,` `,d(W.progress.skipped),` skipped,`,` `,W.progress.measurementsDone,`/`,W.progress.measurementsTotal,` measurements`,W.progress.currentMeasurement?` — ${W.progress.currentMeasurement}`:``),W.error&&e.createElement(`div`,{style:{...C.cardMeta,color:`#b91c1c`}},W.error))),e.createElement(_,{title:`Data Export`},e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`From`),e.createElement(`input`,{style:C.input,type:`datetime-local`,value:bn,onChange:e=>xn(e.target.value)})),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`To`),e.createElement(`input`,{style:C.input,type:`datetime-local`,value:Sn,onChange:e=>Cn(e.target.value)})),e.createElement(`div`,{style:C.fieldRow},e.createElement(`span`,{style:C.label},`Format`),e.createElement(`select`,{style:C.select,value:wn,onChange:e=>Tn(e.target.value)},e.createElement(`option`,{value:`parquet`},`Parquet`),e.createElement(`option`,{value:`csv`},`CSV`))),e.createElement(y,{variant:`primary`,busy:En,busyLabel:`Exporting...`,onClick:kn},`Export Data`)),s.managedContainer!==!1&&e.createElement(_,{title:`Danger zone`},e.createElement(`div`,{style:{fontSize:13,color:`#555`,marginBottom:10}},`Remove the QuestDB container and permanently delete all recorded data. Use this to fully reset QuestDB — Signal K's plugin-uninstall cannot delete this data on rootless Podman. This cannot be undone.`),e.createElement(y,{variant:`danger`,busy:Gt,busyLabel:`Removing...`,onClick:ln},`Remove container & all data`)),e.createElement(b,{message:Rt,error:zt,style:{marginTop:16}}),e.createElement(`div`,{style:{marginTop:24}},e.createElement(y,{onClick:On},`Save Configuration`)))}export{Me as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./dist-
|
|
1
|
+
import"./dist-B4My1YVh.js";import{t as e}from"./vite-preload-helper-DclECHGd.js";var t=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},n={react:async()=>await e(()=>import(`./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__prebuild__react__prebuild__-CTXDWPi7.js`),[],import.meta.url)},r={react:{name:`react`,version:`19.3.1`,scope:[`default`],loaded:!1,materialize:!0,eager:!1,from:`signalk_questdb`,canLiveRebind:!0,get(){let e=r.react;return e.lib?e.lib:(e.loading||=(async()=>{try{let{react:r}=n,i=t({...await r()});return i.__esModule!==!0&&Object.defineProperty(i,"__esModule",{value:!0,enumerable:!1}),e.lib=function(){return i},e.loaded=!0,e.lib}finally{e.loading=void 0}})(),e.loading)},shareConfig:{singleton:!0,requiredVersion:`^19.2.4`,strictVersion:!1,eager:!1}}},i=[];export{i as usedRemotes,r as usedShared};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vite-preload-helper-
|
|
1
|
+
import{n as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vite-preload-helper-DclECHGd.js";var n=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},r=Symbol.for(`module-federation.shared-cache-listeners`),i=e=>{let t=e[r];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,r,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},a=(e,t,n)=>{let r=i(e);(r[t.canonical]||=new Set).add(n)},o=Symbol.for(`module-federation.shared-cache-owners`),ee=e=>{let t=e[o];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,o,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},s=e=>{let t=[e,e?.default];for(let e of t)if(e&&typeof e==`object`){for(let t of[`__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,`__TEST_INTERNALS`,`__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`]){let n=e[t];if(n&&typeof n==`object`)return{internals:n}}if(typeof e.useState==`function`)return{hook:e.useState}}},te=(e,t)=>{if(e===t)return!0;let n=s(e),r=s(t);if(!n||!r)return!1;let i=n.internals,a=r.internals;return i!==void 0||a!==void 0?i!==void 0&&i===a:typeof n.hook==`function`&&n.hook===r.hook},ne=(e,t,i,a)=>{let s=n(e,t);if(s!==void 0&&te(s,i))return i;e[t.canonical]=i;let ne=t.aliases||[];for(let t of ne)Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0});let c=e[o];a===void 0?c&&delete c[t.canonical]:ee(e)[t.canonical]=a;let l=e[r]?.[t.canonical];if(l)for(let e of l)e(i);return i},c=e({Activity:()=>oe,Children:()=>m,Component:()=>h,Fragment:()=>g,Profiler:()=>_,PureComponent:()=>v,StrictMode:()=>y,Suspense:()=>b,ViewTransition:()=>x,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:()=>S,__COMPILER_RUNTIME:()=>C,__moduleExports:()=>$,addTransitionType:()=>w,cache:()=>T,cacheSignal:()=>E,cloneElement:()=>D,createContext:()=>O,createElement:()=>k,createRef:()=>A,default:()=>p,forwardRef:()=>j,isValidElement:()=>M,lazy:()=>N,memo:()=>se,startTransition:()=>P,unstable_useCacheRefresh:()=>F,use:()=>I,useActionState:()=>L,useCallback:()=>R,useContext:()=>z,useDebugValue:()=>B,useDeferredValue:()=>V,useEffect:()=>H,useEffectEvent:()=>U,useId:()=>W,useImperativeHandle:()=>G,useInsertionEffect:()=>K,useLayoutEffect:()=>q,useMemo:()=>J,useOptimistic:()=>ce,useReducer:()=>le,useRef:()=>Y,useState:()=>X,useSyncExternalStore:()=>ue,useTransition:()=>de,version:()=>Z}),l=`__mf_init__virtual:mf:__mfe_internal__signalk_questdb__mf_owner__97224418320974__mf_v__runtimeInit__mf_v__.js__`,u=globalThis[l];if(!u){let e,t,n=new Promise((n,r)=>{e=n,t=r});u=globalThis[l]={initPromise:n,initResolve:e,initReject:t}}var re=u.initPromise,d=`__mf_module_cache__`;globalThis[d]||={share:{},remote:{}},globalThis[d].share||={},globalThis[d].remote||={};var f=globalThis[d],ie=e=>{let t=f.pendingShareLoads||=[];t.push(e);let n=()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)};return e.then(n,n),e};for(let e of Object.keys(f.share))if(e.startsWith(`default:`)){let t=e.slice(8);f.share[t]===void 0&&(f.share[t]=f.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;f.share[t]===void 0&&(f.share[t]=f.share[e])}var ae=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},p,oe,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,se,P,F,I,L,R,z,B,V,H,U,W,G,K,q,J,ce,le,Y,X,ue,de,Z,Q=e=>{$=e,oe=e.Activity,m=e.Children,h=e.Component,g=e.Fragment,_=e.Profiler,v=e.PureComponent,y=e.StrictMode,b=e.Suspense,x=e.ViewTransition,S=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=e.__COMPILER_RUNTIME,w=e.addTransitionType,T=e.cache,E=e.cacheSignal,D=e.cloneElement,O=e.createContext,k=e.createElement,A=e.createRef,j=e.forwardRef,M=e.isValidElement,N=e.lazy,se=e.memo,P=e.startTransition,F=e.unstable_useCacheRefresh,I=e.use,L=e.useActionState,R=e.useCallback,z=e.useContext,B=e.useDebugValue,V=e.useDeferredValue,H=e.useEffect,U=e.useEffectEvent,W=e.useId,G=e.useImperativeHandle,K=e.useInsertionEffect,q=e.useLayoutEffect,J=e.useMemo,ce=e.useOptimistic,le=e.useReducer,Y=e.useRef,X=e.useState,ue=e.useSyncExternalStore,de=e.useTransition,Z=e.version,p=e.default??e};a(f.share,{canonical:`default:react`,aliases:[`react`]},Q);var $=n(f.share,{canonical:`default:react`,aliases:[`react`]});$===void 0?ie(re.then(()=>{if($=n(f.share,{canonical:`default:react`,aliases:[`react`]}),$!==void 0)Q($);else return t(()=>import(`./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__prebuild__react__prebuild__-CTXDWPi7.js`).then(e=>{$=ae(e),ne(f.share,{canonical:`default:react`,aliases:[`react`]},$,`signalk_questdb`)}),[],import.meta.url)})):Q($);export{p as a,X as i,H as n,c as o,Y as r,R as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,i as t,o as n,r,t as i}from"./utils-
|
|
1
|
+
import{a as e,i as t,o as n,r,t as i}from"./utils-BesU7hIa.js";function a(e){let i=new((t())||r)({id:`${e.name}@${e.version||Date.now()}`,...e});return n(i),i}var o=null;function s(e){let t=i(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),o||=t,t):(o=a(n),o)}e(r);export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-BesU7hIa.js";({...e.global});var t=e.share;e.utils;export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./helpers-PTLizuYm.js";import{t}from"./vite-preload-helper-DclECHGd.js";var n=`__mf_module_cache__`;globalThis[n]||={share:{},remote:{}},globalThis[n].share||={},globalThis[n].remote||={};var r=globalThis[n];for(let e of Object.keys(r.share))if(e.startsWith(`default:`)){let t=e.slice(8);r.share[t]===void 0&&(r.share[t]=r.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;r.share[t]===void 0&&(r.share[t]=r.share[e])}var i;async function a(){return i||=(async()=>{let n=function(e,t,n,r){let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},i=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},a=Symbol.for(`module-federation.shared-cache-listeners`),o=Symbol.for(`module-federation.shared-cache-owners`),s=e=>{let t=e[o];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,o,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},c=(e,t)=>e[o]?.[t.canonical],l=e=>{let t=[e,e?.default];for(let e of t)if(e&&typeof e==`object`){for(let t of[`__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,`__TEST_INTERNALS`,`__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`]){let n=e[t];if(n&&typeof n==`object`)return{internals:n}}if(typeof e.useState==`function`)return{hook:e.useState}}},u=(e,t)=>{if(e===t)return!0;let n=l(e),r=l(t);if(!n||!r)return!1;let i=n.internals,a=r.internals;return i!==void 0||a!==void 0?i!==void 0&&i===a:typeof n.hook==`function`&&n.hook===r.hook},d=(e,t,n,r)=>{let c=i(e,t);if(c!==void 0&&u(c,n))return n;e[t.canonical]=n;let l=t.aliases||[];for(let t of l)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let d=e[o];r===void 0?d&&delete d[t.canonical]:s(e)[t.canonical]=r;let f=e[a]?.[t.canonical];if(f)for(let e of f)e(n);return n},f=await(await t(()=>import(`../remoteEntry.js`),[],import.meta.url)).init(),{usedShared:p}=await t(async()=>{let{usedShared:e}=await import(`./_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-CTTydXPl.js`);return{usedShared:e}},[],import.meta.url),m=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},h=(e,t)=>y(t).some(n=>Object.keys(f.shareScopeMap?.[n]?.[e]||{}).some(e=>e!==t.version)),g=[[`react`]];{let e=new Set(g.flat()),t=Object.keys(p).filter(t=>!e.has(t));t.length&&g.push(t)}let _=Symbol(`mf.originalSharedProvider`),v={emit:e=>e},y=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],b=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[_]:r});return n},x=(t,n,r,i)=>{if(!t||!r)return;let a=Object.fromEntries(Object.entries(t).filter(([,e])=>e?.shareConfig?.import!==!1));if(Object.keys(a).length===0)return;let o=y(r),s=b(a,i),c={};for(let e of o)c[e||`default`]={[n]:s};let l=e.getRegisteredShare(c,n,{...r,scope:o,strategy:i},v)?.shared;return l?.[_]||l},S=(e,t,n,r)=>n.shareConfig?.singleton?Object.values(e||{}).some(e=>e?.shareConfig?.import!==!1):!!x(e,t,{...n,scope:[r]},`version-first`),C=r.pinnedShareOwners||=new Set,w=r.hostShareInit,T;r.hostShareInit=new Promise(e=>{T=e}),await w;try{for(let e of g)await Promise.all(e.map(async e=>{let t=p[e];if(!t||t.materialize===!1&&!t.lazy||t.treeShaking)return;let a=n(e,t.shareConfig?.singleton,t.version,t.scope),o=()=>{if(!t.shareConfig?.singleton||i(r.share,a)===void 0)return!1;let e=c(r.share,a);return e===void 0?!1:e===`signalk_questdb`?C.has(e):!(f.options?.remotes||[]).some(t=>t.name===e)&&(C.add(e),!0)};if(!o()&&(i(r.share,a)===void 0||h(e,t)||!t.shareConfig?.singleton&&c(r.share,a)!==`signalk_questdb`)){if(t.shareConfig?.import===!1){let n=y(t),r=n=>!S(f.shareScopeMap?.[n]?.[e],e,t,n);if(n.some(r)){f.__mfKeepAdoptedProviders||(f.__mfKeepAdoptedProviders=!0,f.sharedHandler?.hooks?.lifecycle?.afterRegisterShare?.on?.(e=>{let{shared:t,previousShared:n,registeredShared:r}=e||{},i=f.shareScopeMap?.[e.scope]?.[e.pkgName];t&&i&&(t.shareConfig?.import===!1?r===t&&n&&n.shareConfig?.import!==!1&&i[t.version]===t&&(i[t.version]=n):r!==t&&r?.shareConfig?.import===!1&&!r.loaded&&i[t.version]===r&&(i[t.version]=t))}));for(let i of globalThis.__FEDERATION__?.__INSTANCES__||[])for(let a of n){let n=i?.shareScopeMap?.[a]?.[e];if(!S(n,e,t,a)||!r(a))continue;let o=(f.shareScopeMap[a]||={})[e]||={};for(let[e,t]of Object.entries(n))t?.shareConfig?.import!==!1&&(o[e]&&o[e].shareConfig?.import!==!1||(o[e]=t))}}if(n.every(r))return}await f.loadShare(e,{customShareInfo:{shareConfig:t.shareConfig}}).then(async e=>{if(e===!1||o())return;let t=typeof e==`function`?e():e,n=m(await Promise.resolve(t));d(r.share,a,n,`signalk_questdb`)})}}))}finally{T()}for(let[e,t]of Object.entries(p)){if(!t.lib||t.treeShaking||t.shareConfig?.import===!1)continue;let i=n(e,t.shareConfig?.singleton,t.version,t.scope);if(c(r.share,i)===`signalk_questdb`)for(let n of Array.isArray(t.scope)?t.scope:[t.scope||`default`]){let r=f.shareScopeMap?.[n]?.[e],i=r?.[t.version];i&&i.get===t.get&&!i.lib&&(Object.values(r).some(e=>e!==i&&(e?.lib||e?.loaded))||(i.lib=t.lib,i.loaded=!0))}}return f})(),i}i=a();export{i as hostInitPromise,a as initHost};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./helpers-
|
|
2
|
-
import{t as e}from"./vite-preload-helper-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./helpers-PTLizuYm.js","./utils-BesU7hIa.js","./pendingShares-BHVf8sM9.js","./vite-preload-helper-DclECHGd.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./vite-preload-helper-DclECHGd.js";var t=`__mf_module_cache__`;globalThis[t]||={share:{},remote:{}},globalThis[t].share||={},globalThis[t].remote||={};var n=globalThis[t];for(let e of Object.keys(n.share))if(e.startsWith(`default:`)){let t=e.slice(8);n.share[t]===void 0&&(n.share[t]=n.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;n.share[t]===void 0&&(n.share[t]=n.share[e])}(async()=>{let t=await e(()=>import(`./hostInit-Dvn0aCSd.js`),__vite__mapDeps([0,1]),import.meta.url);await t.__tla;let{initHost:r}=t;await r();let i=await e(()=>import(`./pendingShares-BHVf8sM9.js`),__vite__mapDeps([2,3]),import.meta.url).catch(()=>void 0);i&&typeof i.preloadPendingShares==`function`&&await i.preloadPendingShares(),n.pendingShareLoads&&await Promise.all(n.pendingShareLoads);let a=globalThis.__mf_module_cache_react_server__;a?.pendingShareLoads&&await Promise.all(a.pendingShareLoads)})().then(()=>e(()=>import(`./configpanel-BvRk9kiK.js`),[],import.meta.url));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./utils-BesU7hIa.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./vite-preload-helper-DclECHGd.js";var t=`__mf_module_cache__`;globalThis[t]||={share:{},remote:{}},globalThis[t].share||={},globalThis[t].remote||={};var n=globalThis[t];for(let e of Object.keys(n.share))if(e.startsWith(`default:`)){let t=e.slice(8);n.share[t]===void 0&&(n.share[t]=n.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;n.share[t]===void 0&&(n.share[t]=n.share[e])}var r=function(e,t,n,r){let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},i=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},a=[[`react`,()=>e(()=>import(`./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__97224418320974__loadShare__shared-BgRwx7LZ.js`).then(e=>e.o),[],import.meta.url)]];async function o(){if(a.length===0)return;let t=`react-dom/client`,{usedShared:o}=await e(async()=>{let{usedShared:e}=await import(`./_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-CTTydXPl.js`);return{usedShared:e}},__vite__mapDeps([0]),import.meta.url);await Promise.all(a.map(async([e,a])=>{let s=o[e],c=s??(e===t?o[`react-dom`]:void 0);if(!c||c.treeShaking||c.shareConfig?.import===!1||s&&s.materialize===!1&&e!==t)return;let l=r(e,c.shareConfig?.singleton,c.version,c.scope);i(n.share,l)===void 0&&await a().catch(t=>console.warn(`[module-federation] shared preload failed:`,e,t))}))}export{o as preloadPendingShares};
|