@camstack/addon-post-analysis 0.1.19 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/dist-4mTLJ7BJ.mjs +20750 -0
  2. package/dist/dist-CS2K80so.js +20933 -0
  3. package/dist/embedding-encoder/index.js +977 -902
  4. package/dist/embedding-encoder/index.mjs +967 -860
  5. package/dist/enrichment-engine/index.js +834 -833
  6. package/dist/enrichment-engine/index.mjs +828 -832
  7. package/dist/pipeline-analytics/_stub.js +1680 -1397
  8. package/dist/pipeline-analytics/_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DOSUJ-U0.mjs +156 -0
  9. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DJvmVCso.mjs +26 -0
  10. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-B3Wx5J80.mjs +26 -0
  11. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.js-C0AuF9av.mjs +26 -0
  12. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-Bm-iyjmq.mjs +26 -0
  13. package/dist/pipeline-analytics/dist-CYZr2fwk.mjs +2726 -0
  14. package/dist/pipeline-analytics/hostInit-BazRS2O7.mjs +129 -0
  15. package/dist/pipeline-analytics/index.js +7133 -2558
  16. package/dist/pipeline-analytics/index.mjs +7124 -2557
  17. package/dist/pipeline-analytics/remoteEntry.js +134 -2973
  18. package/dist/pipeline-analytics/remoteEntry.ssr.js +33 -0
  19. package/dist/pipeline-analytics/virtualExposes-BgYzpJZG.mjs +27 -0
  20. package/dist/pipeline-analytics/virtual_mf-exposes-ssr___mfe_internal__addon_pipeline_analytics_widgets__remoteEntry_js-D7qgWCKX.mjs +10 -0
  21. package/dist/resolve-frame-5lMxmeI1.js +57 -0
  22. package/dist/resolve-frame-CT1T1tWy.mjs +44 -0
  23. package/package.json +26 -32
  24. package/dist/embedding-encoder/index.js.map +0 -1
  25. package/dist/embedding-encoder/index.mjs.map +0 -1
  26. package/dist/enrichment-engine/index.js.map +0 -1
  27. package/dist/enrichment-engine/index.mjs.map +0 -1
  28. package/dist/ffmpeg-config-DRONlBsj.mjs +0 -56
  29. package/dist/ffmpeg-config-DRONlBsj.mjs.map +0 -1
  30. package/dist/ffmpeg-config-uANz3sV5.js +0 -73
  31. package/dist/ffmpeg-config-uANz3sV5.js.map +0 -1
  32. package/dist/index-BFbwYH1P.js +0 -14343
  33. package/dist/index-BFbwYH1P.js.map +0 -1
  34. package/dist/index-BrTlzsrE.mjs +0 -14344
  35. package/dist/index-BrTlzsrE.mjs.map +0 -1
  36. package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/AudioHistoryChart.d.ts +0 -4
  37. package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/AudioMetricsPanel.d.ts +0 -10
  38. package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/DetectionHistoryChart.d.ts +0 -4
  39. package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/LiveStatsTab.d.ts +0 -5
  40. package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/MotionHistoryChart.d.ts +0 -4
  41. package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/OccupancyHistoryChart.d.ts +0 -4
  42. package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/OccupancyPanel.d.ts +0 -10
  43. package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/chart-utils.d.ts +0 -97
  44. package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/index.d.ts +0 -29
  45. package/dist/pipeline-analytics/@mf-types/widgets.d.ts +0 -2
  46. package/dist/pipeline-analytics/@mf-types.d.ts +0 -3
  47. package/dist/pipeline-analytics/@mf-types.zip +0 -0
  48. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-h5aXOPSA.mjs +0 -12
  49. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-NjF4kxzW.mjs +0 -19
  50. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-7HAAnpQu.mjs +0 -18
  51. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-DoWbefqS.mjs +0 -104
  52. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-52bfkwC8.mjs +0 -85
  53. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-CVrnrGED.mjs +0 -62
  54. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.mjs-BZTB2scQ.mjs +0 -88
  55. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-CJO5YKGV.mjs +0 -29
  56. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-BsyrX6NO.mjs +0 -36
  57. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_2_dom__loadShare__.mjs-Dp8hqYOB.mjs +0 -45
  58. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-B0h0AGOH.mjs +0 -6
  59. package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-BZjEt71l.mjs +0 -34
  60. package/dist/pipeline-analytics/_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-kZBmgzMg.mjs +0 -156
  61. package/dist/pipeline-analytics/client-BlxIUpgf.mjs +0 -9836
  62. package/dist/pipeline-analytics/getErrorShape-BPSzUA7W-TlK8ipWe.mjs +0 -211
  63. package/dist/pipeline-analytics/hostInit-qBB1Thhi.mjs +0 -168
  64. package/dist/pipeline-analytics/index-BoL0rgZt.mjs +0 -435
  65. package/dist/pipeline-analytics/index-CR1aiZDH.mjs +0 -185
  66. package/dist/pipeline-analytics/index-CWkKuNLr.mjs +0 -232
  67. package/dist/pipeline-analytics/index-DlhiA9R0.mjs +0 -2603
  68. package/dist/pipeline-analytics/index-DtdgkNgf.mjs +0 -725
  69. package/dist/pipeline-analytics/index-Dw6Q30NI.mjs +0 -1655
  70. package/dist/pipeline-analytics/index-Dy2V7VOm.mjs +0 -14379
  71. package/dist/pipeline-analytics/index-i47purqY.mjs +0 -37880
  72. package/dist/pipeline-analytics/index-xncRG7-x.mjs +0 -2713
  73. package/dist/pipeline-analytics/index.js.map +0 -1
  74. package/dist/pipeline-analytics/index.mjs.map +0 -1
  75. package/dist/pipeline-analytics/jsx-runtime-Dlbl3gpr.mjs +0 -55
  76. package/dist/pipeline-analytics/schemas-ClCuS4qa.mjs +0 -3594
  77. package/dist/pipeline-analytics/virtualExposes-8FzWTdq3.mjs +0 -42
  78. package/dist/playlist-generator-EhPaB7Hn.js +0 -48
  79. package/dist/playlist-generator-EhPaB7Hn.js.map +0 -1
  80. package/dist/playlist-generator-VTkgn53O.mjs +0 -48
  81. package/dist/playlist-generator-VTkgn53O.mjs.map +0 -1
  82. package/dist/recording/index.js +0 -257
  83. package/dist/recording/index.js.map +0 -1
  84. package/dist/recording/index.mjs +0 -235
  85. package/dist/recording/index.mjs.map +0 -1
  86. package/dist/recording-coordinator-BoGr5moz.js +0 -1052
  87. package/dist/recording-coordinator-BoGr5moz.js.map +0 -1
  88. package/dist/recording-coordinator-CsYH9LqF.mjs +0 -1012
  89. package/dist/recording-coordinator-CsYH9LqF.mjs.map +0 -1
  90. package/dist/recording-db-gOgaoQh0.js +0 -348
  91. package/dist/recording-db-gOgaoQh0.js.map +0 -1
  92. package/dist/recording-db-lIkSMTLq.mjs +0 -348
  93. package/dist/recording-db-lIkSMTLq.mjs.map +0 -1
  94. package/dist/recording-service-facade-B9lG6OFn.mjs +0 -123
  95. package/dist/recording-service-facade-B9lG6OFn.mjs.map +0 -1
  96. package/dist/recording-service-facade-Do1PKlAL.js +0 -123
  97. package/dist/recording-service-facade-Do1PKlAL.js.map +0 -1
  98. package/dist/storage-estimator-CRpoQc9j.js +0 -72
  99. package/dist/storage-estimator-CRpoQc9j.js.map +0 -1
  100. package/dist/storage-estimator-DzD8gWJH.mjs +0 -72
  101. package/dist/storage-estimator-DzD8gWJH.mjs.map +0 -1
@@ -1,1655 +0,0 @@
1
- import { i as _e, b as x, A as be, n as ve } from "./__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-52bfkwC8.mjs";
2
- import { _ as V, a as Ee } from "./__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-NjF4kxzW.mjs";
3
- class Pe {
4
- constructor() {
5
- this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
6
- }
7
- set(t, r) {
8
- this.keyToValue.set(t, r), this.valueToKey.set(r, t);
9
- }
10
- getByKey(t) {
11
- return this.keyToValue.get(t);
12
- }
13
- getByValue(t) {
14
- return this.valueToKey.get(t);
15
- }
16
- clear() {
17
- this.keyToValue.clear(), this.valueToKey.clear();
18
- }
19
- }
20
- class $ {
21
- constructor(t) {
22
- this.generateIdentifier = t, this.kv = new Pe();
23
- }
24
- register(t, r) {
25
- this.kv.getByValue(t) || (r || (r = this.generateIdentifier(t)), this.kv.set(r, t));
26
- }
27
- clear() {
28
- this.kv.clear();
29
- }
30
- getIdentifier(t) {
31
- return this.kv.getByValue(t);
32
- }
33
- getValue(t) {
34
- return this.kv.getByKey(t);
35
- }
36
- }
37
- class Ce extends $ {
38
- constructor() {
39
- super((t) => t.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
40
- }
41
- register(t, r) {
42
- typeof r == "object" ? (r.allowProps && this.classToAllowedProps.set(t, r.allowProps), super.register(t, r.identifier)) : super.register(t, r);
43
- }
44
- getAllowedProps(t) {
45
- return this.classToAllowedProps.get(t);
46
- }
47
- }
48
- function ke(e) {
49
- if ("values" in Object)
50
- return Object.values(e);
51
- const t = [];
52
- for (const r in e)
53
- e.hasOwnProperty(r) && t.push(e[r]);
54
- return t;
55
- }
56
- function Se(e, t) {
57
- const r = ke(e);
58
- if ("find" in r)
59
- return r.find(t);
60
- const s = r;
61
- for (let n = 0; n < s.length; n++) {
62
- const i = s[n];
63
- if (t(i))
64
- return i;
65
- }
66
- }
67
- function v(e, t) {
68
- Object.entries(e).forEach(([r, s]) => t(s, r));
69
- }
70
- function S(e, t) {
71
- return e.indexOf(t) !== -1;
72
- }
73
- function B(e, t) {
74
- for (let r = 0; r < e.length; r++) {
75
- const s = e[r];
76
- if (t(s))
77
- return s;
78
- }
79
- }
80
- class Te {
81
- constructor() {
82
- this.transfomers = {};
83
- }
84
- register(t) {
85
- this.transfomers[t.name] = t;
86
- }
87
- findApplicable(t) {
88
- return Se(this.transfomers, (r) => r.isApplicable(t));
89
- }
90
- findByName(t) {
91
- return this.transfomers[t];
92
- }
93
- }
94
- const Re = (e) => Object.prototype.toString.call(e).slice(8, -1), W = (e) => typeof e > "u", Ie = (e) => e === null, P = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, I = (e) => P(e) && Object.keys(e).length === 0, g = (e) => Array.isArray(e), Ae = (e) => typeof e == "string", Me = (e) => typeof e == "number" && !isNaN(e), Oe = (e) => typeof e == "boolean", De = (e) => e instanceof RegExp, C = (e) => e instanceof Map, k = (e) => e instanceof Set, K = (e) => Re(e) === "Symbol", Le = (e) => e instanceof Date && !isNaN(e.valueOf()), Y = (e) => e instanceof Error, U = (e) => typeof e == "number" && isNaN(e), Ne = (e) => Oe(e) || Ie(e) || W(e) || Me(e) || Ae(e) || K(e), xe = (e) => typeof e == "bigint", Ve = (e) => e === 1 / 0 || e === -1 / 0, Be = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Ue = (e) => e instanceof URL, A = (e) => e.replace(/\\/g, "\\\\").replace(/\./g, "\\."), R = (e) => e.map(String).map(A).join("."), E = (e, t) => {
95
- const r = [];
96
- let s = "";
97
- for (let i = 0; i < e.length; i++) {
98
- let o = e.charAt(i);
99
- if (!t && o === "\\") {
100
- const f = e.charAt(i + 1);
101
- if (f === "\\") {
102
- s += "\\", i++;
103
- continue;
104
- } else if (f !== ".")
105
- throw Error("invalid path");
106
- }
107
- if (o === "\\" && e.charAt(i + 1) === ".") {
108
- s += ".", i++;
109
- continue;
110
- }
111
- if (o === ".") {
112
- r.push(s), s = "";
113
- continue;
114
- }
115
- s += o;
116
- }
117
- const n = s;
118
- return r.push(n), r;
119
- };
120
- function y(e, t, r, s) {
121
- return {
122
- isApplicable: e,
123
- annotation: t,
124
- transform: r,
125
- untransform: s
126
- };
127
- }
128
- const G = [
129
- y(W, "undefined", () => null, () => {
130
- }),
131
- y(xe, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
132
- y(Le, "Date", (e) => e.toISOString(), (e) => new Date(e)),
133
- y(Y, "Error", (e, t) => {
134
- const r = {
135
- name: e.name,
136
- message: e.message
137
- };
138
- return "cause" in e && (r.cause = e.cause), t.allowedErrorProps.forEach((s) => {
139
- r[s] = e[s];
140
- }), r;
141
- }, (e, t) => {
142
- const r = new Error(e.message, { cause: e.cause });
143
- return r.name = e.name, r.stack = e.stack, t.allowedErrorProps.forEach((s) => {
144
- r[s] = e[s];
145
- }), r;
146
- }),
147
- y(De, "regexp", (e) => "" + e, (e) => {
148
- const t = e.slice(1, e.lastIndexOf("/")), r = e.slice(e.lastIndexOf("/") + 1);
149
- return new RegExp(t, r);
150
- }),
151
- y(
152
- k,
153
- "set",
154
- // (sets only exist in es6+)
155
- // eslint-disable-next-line es5/no-es6-methods
156
- (e) => [...e.values()],
157
- (e) => new Set(e)
158
- ),
159
- y(C, "map", (e) => [...e.entries()], (e) => new Map(e)),
160
- y((e) => U(e) || Ve(e), "number", (e) => U(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
161
- y((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
162
- y(Ue, "URL", (e) => e.toString(), (e) => new URL(e))
163
- ];
164
- function T(e, t, r, s) {
165
- return {
166
- isApplicable: e,
167
- annotation: t,
168
- transform: r,
169
- untransform: s
170
- };
171
- }
172
- const H = T((e, t) => K(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
173
- const s = r.symbolRegistry.getValue(t[1]);
174
- if (!s)
175
- throw new Error("Trying to deserialize unknown symbol");
176
- return s;
177
- }), ze = [
178
- Int8Array,
179
- Uint8Array,
180
- Int16Array,
181
- Uint16Array,
182
- Int32Array,
183
- Uint32Array,
184
- Float32Array,
185
- Float64Array,
186
- Uint8ClampedArray
187
- ].reduce((e, t) => (e[t.name] = t, e), {}), X = T(Be, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
188
- const r = ze[t[1]];
189
- if (!r)
190
- throw new Error("Trying to deserialize unknown typed array");
191
- return new r(e);
192
- });
193
- function Z(e, t) {
194
- return e?.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
195
- }
196
- const j = T(Z, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
197
- const r = t.classRegistry.getAllowedProps(e.constructor);
198
- if (!r)
199
- return { ...e };
200
- const s = {};
201
- return r.forEach((n) => {
202
- s[n] = e[n];
203
- }), s;
204
- }, (e, t, r) => {
205
- const s = r.classRegistry.getValue(t[1]);
206
- if (!s)
207
- throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
208
- return Object.assign(Object.create(s.prototype), e);
209
- }), Q = T((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, r) => {
210
- const s = r.customTransformerRegistry.findByName(t[1]);
211
- if (!s)
212
- throw new Error("Trying to deserialize unknown custom value");
213
- return s.deserialize(e);
214
- }), qe = [j, H, Q, X], z = (e, t) => {
215
- const r = B(qe, (n) => n.isApplicable(e, t));
216
- if (r)
217
- return {
218
- value: r.transform(e, t),
219
- type: r.annotation(e, t)
220
- };
221
- const s = B(G, (n) => n.isApplicable(e, t));
222
- if (s)
223
- return {
224
- value: s.transform(e, t),
225
- type: s.annotation
226
- };
227
- }, J = {};
228
- G.forEach((e) => {
229
- J[e.annotation] = e;
230
- });
231
- const Fe = (e, t, r) => {
232
- if (g(t))
233
- switch (t[0]) {
234
- case "symbol":
235
- return H.untransform(e, t, r);
236
- case "class":
237
- return j.untransform(e, t, r);
238
- case "custom":
239
- return Q.untransform(e, t, r);
240
- case "typed-array":
241
- return X.untransform(e, t, r);
242
- default:
243
- throw new Error("Unknown transformation: " + t);
244
- }
245
- else {
246
- const s = J[t];
247
- if (!s)
248
- throw new Error("Unknown transformation: " + t);
249
- return s.untransform(e, r);
250
- }
251
- }, b = (e, t) => {
252
- if (t > e.size)
253
- throw new Error("index out of bounds");
254
- const r = e.keys();
255
- for (; t > 0; )
256
- r.next(), t--;
257
- return r.next().value;
258
- };
259
- function ee(e) {
260
- if (S(e, "__proto__"))
261
- throw new Error("__proto__ is not allowed as a property");
262
- if (S(e, "prototype"))
263
- throw new Error("prototype is not allowed as a property");
264
- if (S(e, "constructor"))
265
- throw new Error("constructor is not allowed as a property");
266
- }
267
- const $e = (e, t) => {
268
- ee(t);
269
- for (let r = 0; r < t.length; r++) {
270
- const s = t[r];
271
- if (k(e))
272
- e = b(e, +s);
273
- else if (C(e)) {
274
- const n = +s, i = +t[++r] == 0 ? "key" : "value", o = b(e, n);
275
- switch (i) {
276
- case "key":
277
- e = o;
278
- break;
279
- case "value":
280
- e = e.get(o);
281
- break;
282
- }
283
- } else
284
- e = e[s];
285
- }
286
- return e;
287
- }, M = (e, t, r) => {
288
- if (ee(t), t.length === 0)
289
- return r(e);
290
- let s = e;
291
- for (let i = 0; i < t.length - 1; i++) {
292
- const o = t[i];
293
- if (g(s)) {
294
- const a = +o;
295
- s = s[a];
296
- } else if (P(s))
297
- s = s[o];
298
- else if (k(s)) {
299
- const a = +o;
300
- s = b(s, a);
301
- } else if (C(s)) {
302
- if (i === t.length - 2)
303
- break;
304
- const c = +o, f = +t[++i] == 0 ? "key" : "value", h = b(s, c);
305
- switch (f) {
306
- case "key":
307
- s = h;
308
- break;
309
- case "value":
310
- s = s.get(h);
311
- break;
312
- }
313
- }
314
- }
315
- const n = t[t.length - 1];
316
- if (g(s) ? s[+n] = r(s[+n]) : P(s) && (s[n] = r(s[n])), k(s)) {
317
- const i = b(s, +n), o = r(i);
318
- i !== o && (s.delete(i), s.add(o));
319
- }
320
- if (C(s)) {
321
- const i = +t[t.length - 2], o = b(s, i);
322
- switch (+n == 0 ? "key" : "value") {
323
- case "key": {
324
- const c = r(o);
325
- s.set(c, s.get(o)), c !== o && s.delete(o);
326
- break;
327
- }
328
- case "value": {
329
- s.set(o, r(s.get(o)));
330
- break;
331
- }
332
- }
333
- }
334
- return e;
335
- }, te = (e) => e < 1;
336
- function O(e, t, r, s = []) {
337
- if (!e)
338
- return;
339
- const n = te(r);
340
- if (!g(e)) {
341
- v(e, (a, c) => O(a, t, r, [
342
- ...s,
343
- ...E(c, n)
344
- ]));
345
- return;
346
- }
347
- const [i, o] = e;
348
- o && v(o, (a, c) => {
349
- O(a, t, r, [
350
- ...s,
351
- ...E(c, n)
352
- ]);
353
- }), t(i, s);
354
- }
355
- function We(e, t, r, s) {
356
- return O(t, (n, i) => {
357
- e = M(e, i, (o) => Fe(o, n, s));
358
- }, r), e;
359
- }
360
- function Ke(e, t, r) {
361
- const s = te(r);
362
- function n(i, o) {
363
- const a = $e(e, E(o, s));
364
- i.map((c) => E(c, s)).forEach((c) => {
365
- e = M(e, c, () => a);
366
- });
367
- }
368
- if (g(t)) {
369
- const [i, o] = t;
370
- i.forEach((a) => {
371
- e = M(e, E(a, s), () => e);
372
- }), o && v(o, n);
373
- } else
374
- v(t, n);
375
- return e;
376
- }
377
- const Ye = (e, t) => P(e) || g(e) || C(e) || k(e) || Y(e) || Z(e, t);
378
- function Ge(e, t, r) {
379
- const s = r.get(e);
380
- s ? s.push(t) : r.set(e, [t]);
381
- }
382
- function He(e, t) {
383
- const r = {};
384
- let s;
385
- return e.forEach((n) => {
386
- if (n.length <= 1)
387
- return;
388
- t || (n = n.map((a) => a.map(String)).sort((a, c) => a.length - c.length));
389
- const [i, ...o] = n;
390
- i.length === 0 ? s = o.map(R) : r[R(i)] = o.map(R);
391
- }), s ? I(r) ? [s] : [s, r] : I(r) ? void 0 : r;
392
- }
393
- const re = (e, t, r, s, n = [], i = [], o = /* @__PURE__ */ new Map()) => {
394
- const a = Ne(e);
395
- if (!a) {
396
- Ge(e, n, t);
397
- const u = o.get(e);
398
- if (u)
399
- return s ? {
400
- transformedValue: null
401
- } : u;
402
- }
403
- if (!Ye(e, r)) {
404
- const u = z(e, r), m = u ? {
405
- transformedValue: u.value,
406
- annotations: [u.type]
407
- } : {
408
- transformedValue: e
409
- };
410
- return a || o.set(e, m), m;
411
- }
412
- if (S(i, e))
413
- return {
414
- transformedValue: null
415
- };
416
- const c = z(e, r), f = c?.value ?? e, h = g(f) ? [] : {}, p = {};
417
- v(f, (u, m) => {
418
- if (m === "__proto__" || m === "constructor" || m === "prototype")
419
- throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);
420
- const _ = re(u, t, r, s, [...n, m], [...i, e], o);
421
- h[m] = _.transformedValue, g(_.annotations) ? p[A(m)] = _.annotations : P(_.annotations) && v(_.annotations, (w, we) => {
422
- p[A(m) + "." + we] = w;
423
- });
424
- });
425
- const d = I(p) ? {
426
- transformedValue: h,
427
- annotations: c ? [c.type] : void 0
428
- } : {
429
- transformedValue: h,
430
- annotations: c ? [c.type, p] : p
431
- };
432
- return a || o.set(e, d), d;
433
- };
434
- function se(e) {
435
- return Object.prototype.toString.call(e).slice(8, -1);
436
- }
437
- function q(e) {
438
- return se(e) === "Array";
439
- }
440
- function Xe(e) {
441
- if (se(e) !== "Object")
442
- return !1;
443
- const t = Object.getPrototypeOf(e);
444
- return !!t && t.constructor === Object && t === Object.prototype;
445
- }
446
- function Ze(e, t, r, s, n) {
447
- const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
448
- i === "enumerable" && (e[t] = r), n && i === "nonenumerable" && Object.defineProperty(e, t, {
449
- value: r,
450
- enumerable: !1,
451
- writable: !0,
452
- configurable: !0
453
- });
454
- }
455
- function D(e, t = {}) {
456
- if (q(e))
457
- return e.map((n) => D(n, t));
458
- if (!Xe(e))
459
- return e;
460
- const r = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
461
- return [...r, ...s].reduce((n, i) => {
462
- if (i === "__proto__" || q(t.props) && !t.props.includes(i))
463
- return n;
464
- const o = e[i], a = D(o, t);
465
- return Ze(n, i, a, e, t.nonenumerable), n;
466
- }, {});
467
- }
468
- class l {
469
- /**
470
- * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
471
- */
472
- constructor({ dedupe: t = !1 } = {}) {
473
- this.classRegistry = new Ce(), this.symbolRegistry = new $((r) => r.description ?? ""), this.customTransformerRegistry = new Te(), this.allowedErrorProps = [], this.dedupe = t;
474
- }
475
- serialize(t) {
476
- const r = /* @__PURE__ */ new Map(), s = re(t, r, this, this.dedupe), n = {
477
- json: s.transformedValue
478
- };
479
- s.annotations && (n.meta = {
480
- ...n.meta,
481
- values: s.annotations
482
- });
483
- const i = He(r, this.dedupe);
484
- return i && (n.meta = {
485
- ...n.meta,
486
- referentialEqualities: i
487
- }), n.meta && (n.meta.v = 1), n;
488
- }
489
- deserialize(t, r) {
490
- const { json: s, meta: n } = t;
491
- let i = r?.inPlace ? s : D(s);
492
- return n?.values && (i = We(i, n.values, n.v ?? 0, this)), n?.referentialEqualities && (i = Ke(i, n.referentialEqualities, n.v ?? 0)), i;
493
- }
494
- stringify(t) {
495
- return JSON.stringify(this.serialize(t));
496
- }
497
- parse(t) {
498
- return this.deserialize(JSON.parse(t), { inPlace: !0 });
499
- }
500
- registerClass(t, r) {
501
- this.classRegistry.register(t, r);
502
- }
503
- registerSymbol(t, r) {
504
- this.symbolRegistry.register(t, r);
505
- }
506
- registerCustom(t, r) {
507
- this.customTransformerRegistry.register({
508
- name: r,
509
- ...t
510
- });
511
- }
512
- allowErrorProps(...t) {
513
- this.allowedErrorProps.push(...t);
514
- }
515
- }
516
- l.defaultInstance = new l();
517
- l.serialize = l.defaultInstance.serialize.bind(l.defaultInstance);
518
- l.deserialize = l.defaultInstance.deserialize.bind(l.defaultInstance);
519
- l.stringify = l.defaultInstance.stringify.bind(l.defaultInstance);
520
- l.parse = l.defaultInstance.parse.bind(l.defaultInstance);
521
- l.registerClass = l.defaultInstance.registerClass.bind(l.defaultInstance);
522
- l.registerSymbol = l.defaultInstance.registerSymbol.bind(l.defaultInstance);
523
- l.registerCustom = l.defaultInstance.registerCustom.bind(l.defaultInstance);
524
- l.allowErrorProps = l.defaultInstance.allowErrorProps.bind(l.defaultInstance);
525
- l.serialize;
526
- l.deserialize;
527
- l.stringify;
528
- l.parse;
529
- l.registerClass;
530
- l.registerCustom;
531
- l.registerSymbol;
532
- l.allowErrorProps;
533
- const je = 1e4, Qe = 6e3, Je = 2e3, et = 3e4;
534
- class tt {
535
- /** Active server base URL. Mutable via `switchServerUrl()` so the
536
- * endpoint-race helper can pivot the transport onto a LAN candidate
537
- * after the initial public-URL bootstrap. */
538
- _serverUrl;
539
- useWs;
540
- baseRetryMs;
541
- maxRetryMs;
542
- onConnectionChange;
543
- token;
544
- _trpcClient;
545
- _wsClient = null;
546
- // Mirror — owns binding cache + state mirror + lifecycle listeners.
547
- // Lazily initialised on `init()`. Subsequent `reconnect()` disposes
548
- // the old mirror and rebuilds against the new tRPC client.
549
- mirror = null;
550
- mirrorInit = null;
551
- // Transport-readiness probe state. `connected` flips true the first
552
- // time `auth.me` succeeds against the current tRPC client; resets
553
- // on every `reconnect()` / `close()` so the next consumer waits for
554
- // a fresh handshake before issuing queries.
555
- connected = !1;
556
- connectedPromise = null;
557
- // System-cap namespaces — populated in the constructor from
558
- // `createSystemProxy(api)`. Each namespace is a `Pick<InferProvider<typeof cap>, …>`
559
- // shape generated by `scripts/generate-system-proxy.ts`.
560
- _systemProxy;
561
- // Connection-version + listener bookkeeping for the admin UI's
562
- // reconnect watchdog.
563
- _connectionVersion = 0;
564
- connectionListeners = /* @__PURE__ */ new Set();
565
- constructor(t) {
566
- this._serverUrl = t.serverUrl.replace(/\/+$/, ""), this.token = t.token;
567
- const r = typeof window < "u";
568
- this.useWs = t.useWebSocket ?? r, this.onConnectionChange = t.onConnectionChange, this.baseRetryMs = t.retryDelayMs ?? Je, this.maxRetryMs = t.maxRetryDelayMs ?? et, this._trpcClient = this.buildTrpcClient(), this._systemProxy = V(this._trpcClient);
569
- }
570
- // ── Connection state ─────────────────────────────────────────────
571
- /** Active server base URL (no trailing slash). */
572
- get serverUrl() {
573
- return this._serverUrl;
574
- }
575
- get connectionVersion() {
576
- return this._connectionVersion;
577
- }
578
- /**
579
- * Subscribe to connection-state transitions. Called with `('connected'
580
- * | 'disconnected' | 'connecting', version)` whenever the SDK opens,
581
- * closes, or starts a manual reconnect. Listener errors are swallowed
582
- * so a misbehaving consumer cannot break the SDK's event loop.
583
- */
584
- subscribeConnectionEvents(t) {
585
- return this.connectionListeners.add(t), () => {
586
- this.connectionListeners.delete(t);
587
- };
588
- }
589
- emitConnectionEvent(t) {
590
- try {
591
- this.onConnectionChange?.(t);
592
- } catch {
593
- }
594
- for (const r of this.connectionListeners)
595
- try {
596
- r(t, this._connectionVersion);
597
- } catch {
598
- }
599
- }
600
- // ── Lifecycle ────────────────────────────────────────────────────
601
- /**
602
- * Wait until the underlying tRPC transport is connected AND the
603
- * server has responded to a cheap auth round-trip (`auth.me`). This
604
- * is the canonical "ready to issue queries" gate.
605
- *
606
- * Why a probe, not just `ws.readyState === OPEN`?
607
- * The WS handshake completes asynchronously: tRPC's `wsLink`
608
- * queues outgoing messages and only flushes them after `open()`
609
- * resolves (post `connectionParams` send). On the server, the
610
- * tRPC context is created lazily once the connectionParams
611
- * message is received. A query fired between WS-open and
612
- * connection-params-processed is technically queued by tRPC, but
613
- * the auth context for that query is only resolved once the
614
- * handshake message is decoded server-side. A probe round-trip is
615
- * the safest way to confirm both sides have agreed on the auth
616
- * identity before the React tree starts firing parallel queries
617
- * (which can otherwise land before any addon-side service
618
- * discovery has settled, returning empty results that get cached).
619
- *
620
- * Idempotent — concurrent callers await the same in-flight Promise.
621
- * Bounded by `timeoutMs` (default 15s) — beyond which a
622
- * `Error('System.awaitConnected: probe timed out after Xms')` is
623
- * thrown so the host can render a clear error state instead of
624
- * hanging on a bricked socket.
625
- */
626
- async awaitConnected(t) {
627
- if (this.connected) return;
628
- if (this.connectedPromise) return this.connectedPromise;
629
- const r = t ?? 15e3;
630
- this.connectedPromise = (async () => {
631
- const s = this._trpcClient.auth.me.query();
632
- Number.isFinite(r) ? await new Promise((n, i) => {
633
- const o = setTimeout(
634
- () => i(new Error(`System.awaitConnected: probe timed out after ${r}ms`)),
635
- r
636
- );
637
- s.then(
638
- () => {
639
- clearTimeout(o), n();
640
- },
641
- (a) => {
642
- clearTimeout(o), i(a instanceof Error ? a : new Error(String(a)));
643
- }
644
- );
645
- }) : await s, this.connected = !0;
646
- })();
647
- try {
648
- await this.connectedPromise;
649
- } finally {
650
- this.connectedPromise = null;
651
- }
652
- }
653
- /**
654
- * Warm-boot the device mirror. Awaits the transport probe first
655
- * (`awaitConnected`) so the three mirror round-trips
656
- * (`getAllBindings` + `getAllSnapshots` + `listAll`) cannot race
657
- * against the WS auth handshake. Subsequent `getDevice(id)` calls
658
- * are sync; live `device.*` event subscriptions keep the caches
659
- * fresh.
660
- *
661
- * Idempotent — concurrent callers await the same in-flight Promise.
662
- */
663
- async init(t) {
664
- if (this.mirror?.isReady()) return;
665
- if (this.mirrorInit) return this.mirrorInit;
666
- const r = new Ee(this._trpcClient);
667
- return this.mirror = r, this.mirrorInit = (async () => {
668
- await this.awaitConnected(t), await r.init(t);
669
- })().finally(() => {
670
- this.mirrorInit = null;
671
- }), this.mirrorInit;
672
- }
673
- /** Promise that resolves once `init()` has completed. */
674
- async awaitReady() {
675
- if (!this.mirror?.isReady())
676
- return this.mirrorInit ? this.mirrorInit : this.init();
677
- }
678
- /** True after `init()` resolves. */
679
- isReady() {
680
- return this.mirror?.isReady() ?? !1;
681
- }
682
- /** True after the transport probe has succeeded at least once. */
683
- isConnected() {
684
- return this.connected;
685
- }
686
- /**
687
- * Force a fresh WebSocket handshake. Tears down the wsClient + tRPC
688
- * client + mirror (the mirror captures the tRPC reference at
689
- * construction time and would otherwise dispatch through a closed
690
- * client) and rebuilds them. No-op for HTTP transport.
691
- */
692
- reconnect() {
693
- this.useWs && (this.emitConnectionEvent("connecting"), this._wsClient?.close(), this.disposeMirror(), this.connected = !1, this.connectedPromise = null, this._trpcClient = this.buildTrpcClient(), this._systemProxy = V(this._trpcClient));
694
- }
695
- /**
696
- * Pivot the underlying tRPC transport onto a different base URL.
697
- * Used by the endpoint-race flow: the SDK opens against the public
698
- * URL the operator provided, calls `localNetwork.getConnectionEndpoints`
699
- * to discover LAN candidates, races them, and (when a faster one wins)
700
- * calls `switchServerUrl(winner)` to migrate every subsequent query
701
- * onto the LAN path without losing auth state.
702
- *
703
- * Keeps the auth token. Tears down the WS + mirror and rebuilds them
704
- * against the new URL — same machinery as `reconnect()` but with a
705
- * different target.
706
- */
707
- switchServerUrl(t) {
708
- const r = t.replace(/\/+$/, "");
709
- r !== this._serverUrl && (this._serverUrl = r, this.reconnect());
710
- }
711
- /**
712
- * Race the candidate base URLs reported by the hub's `local-network`
713
- * cap, pick the fastest one that responds, and (if it's different
714
- * from the current URL) pivot the transport onto it.
715
- *
716
- * Flow:
717
- * 1. Query `localNetwork.getConnectionEndpoints({ port })` over the
718
- * already-authenticated tRPC channel — the cap is auth-gated,
719
- * so the LAN IPs never leak to anonymous callers.
720
- * 2. For each candidate, fire a HEAD on `{baseUrl}/trpc/health`
721
- * with a short timeout (default 1500ms). The first 2xx wins.
722
- * 3. If the winner differs from `this.serverUrl`, call
723
- * `switchServerUrl(winner)` and return it. Otherwise return
724
- * the current URL unchanged.
725
- *
726
- * Bounded — if every candidate times out we keep the current URL.
727
- * Idempotent — safe to call on every connect / reconnect / network
728
- * change event.
729
- */
730
- async raceConnectionEndpoints(t) {
731
- const r = t?.perCandidateTimeoutMs ?? 1500, s = (() => {
732
- try {
733
- return new URL(this._serverUrl);
734
- } catch {
735
- return null;
736
- }
737
- })(), n = s?.port ? Number(s.port) : s?.protocol === "https:" ? 443 : 80, i = s?.protocol === "https:" ? "https" : "http", a = this._trpcClient.localNetwork?.getConnectionEndpoints;
738
- if (!a)
739
- return { winner: this._serverUrl, switched: !1 };
740
- let c;
741
- try {
742
- c = (await a.query({ port: n, ipv4Only: t?.ipv4Only, scheme: i })).endpoints;
743
- } catch {
744
- return { winner: this._serverUrl, switched: !1 };
745
- }
746
- if (c.length === 0)
747
- return { winner: this._serverUrl, switched: !1 };
748
- const f = await rt(c.map((h) => h.baseUrl), r);
749
- return !f || f === this._serverUrl ? { winner: f ?? this._serverUrl, switched: !1 } : (this.switchServerUrl(f), { winner: f, switched: !0 });
750
- }
751
- /** Tear down WS connection + mirror. The instance is unusable afterwards. */
752
- close() {
753
- this.disposeMirror(), this.connected = !1, this.connectedPromise = null, this._wsClient?.close();
754
- }
755
- disposeMirror() {
756
- this.mirror?.dispose(), this.mirror = null, this.mirrorInit = null;
757
- }
758
- // ── Auth ──────────────────────────────────────────────────────────
759
- async login(t, r) {
760
- const s = await this._trpcClient.auth.login.mutate({ username: t, password: r });
761
- if (typeof s == "object" && s !== null && "token" in s) {
762
- const n = s, i = n.token;
763
- typeof i == "string" && n.requiresTotp !== !0 && this.setToken(i);
764
- }
765
- return s;
766
- }
767
- /**
768
- * Second leg of the 2FA login. The caller passes the challenge
769
- * token returned by `login` (when `requiresTotp: true`) plus the
770
- * 6-digit code from the user's authenticator app. On success the
771
- * server mints the real session JWT, which we set as the active
772
- * token on this client.
773
- */
774
- async loginVerifyTotp(t, r) {
775
- const s = await this._trpcClient.auth.loginVerifyTotp.mutate({ challengeToken: t, code: r });
776
- if (typeof s == "object" && s !== null && "token" in s) {
777
- const n = s.token;
778
- typeof n == "string" && this.setToken(n);
779
- }
780
- return s;
781
- }
782
- async logout() {
783
- await this._trpcClient.auth.logout.mutate();
784
- }
785
- async getMe() {
786
- return await this._trpcClient.auth.me.query();
787
- }
788
- // ── Self-service auth (the signed-in user acting on themselves) ─────
789
- //
790
- // The hand-written `auth.*` router exposes 5 procedures that operate
791
- // on `ctx.user` (the JWT-bound identity), distinct from the admin
792
- // `user-management` cap that operates on arbitrary userIds. They live
793
- // on `System` rather than as codegen'd hooks because `auth.*` is a
794
- // legacy core router, not a `.cap.ts` — see the no-restricted-imports
795
- // rule in `eslint.config.mjs` for the canonical entry-point design.
796
- async changeOwnPassword(t) {
797
- return await this._trpcClient.auth.changeOwnPassword.mutate(t);
798
- }
799
- async setupOwnTotp() {
800
- return await this._trpcClient.auth.setupOwnTotp.mutate();
801
- }
802
- async confirmOwnTotp(t) {
803
- return await this._trpcClient.auth.confirmOwnTotp.mutate(t);
804
- }
805
- async disableOwnTotp() {
806
- return await this._trpcClient.auth.disableOwnTotp.mutate();
807
- }
808
- async getOwnTotpStatus() {
809
- return await this._trpcClient.auth.getOwnTotpStatus.query();
810
- }
811
- /** Update the auth token (e.g. after login or token refresh). */
812
- setToken(t) {
813
- this.token = t;
814
- }
815
- // ── Devices ──────────────────────────────────────────────────────
816
- /**
817
- * Synchronous snapshot of every device matching the optional filters.
818
- * Backed by the `SystemMirror` warm-boot cache — call `init()` first
819
- * (or `awaitReady()`) before invoking. Returns an empty array if the
820
- * mirror has not yet been booted.
821
- *
822
- * Each returned proxy has `binding` populated from the mirror's
823
- * binding cache (Phase 5 dedup), so consumers no longer need to
824
- * make a separate `deviceManager.getBindings` round-trip.
825
- */
826
- listDevices(t) {
827
- return this.mirror ? (t ? this.mirror.query(t) : this.mirror.getAllDevices()).map((s) => this.attachBinding(s)) : [];
828
- }
829
- /**
830
- * Sync lookup by numeric id. `null` if the mirror has not been booted
831
- * or the device is unknown.
832
- */
833
- getDevice(t) {
834
- const r = this.mirror?.getDeviceById(t) ?? null;
835
- return r ? this.attachBinding(r) : null;
836
- }
837
- /** Sync lookup by display name (exact match). */
838
- getDeviceByName(t) {
839
- const r = this.mirror?.getDeviceByName(t) ?? null;
840
- return r ? this.attachBinding(r) : null;
841
- }
842
- /** Sync lookup by stableId. */
843
- getDeviceByStableId(t) {
844
- const r = this.mirror?.getDeviceByStableId(t) ?? null;
845
- return r ? this.attachBinding(r) : null;
846
- }
847
- /**
848
- * Resolve when a device with `deviceId` becomes available. Resolves
849
- * immediately if already known; rejects with a timeout error
850
- * otherwise (default 30s).
851
- */
852
- async waitForDevice(t, r) {
853
- this.mirror || await this.init();
854
- const s = await this.mirror.waitForDevice(t, r ?? 3e4);
855
- return this.attachBinding(s);
856
- }
857
- /** Subscribe to `device.registered` events. */
858
- onDeviceAdded(t) {
859
- if (!this.mirror)
860
- throw new Error("System.onDeviceAdded: call init() before subscribing");
861
- return this.mirror.onDeviceAdded(t);
862
- }
863
- /** Subscribe to `device.unregistered` events. */
864
- onDeviceRemoved(t) {
865
- if (!this.mirror)
866
- throw new Error("System.onDeviceRemoved: call init() before subscribing");
867
- return this.mirror.onDeviceRemoved(t);
868
- }
869
- /**
870
- * Patch the proxy's `binding` field from the mirror's cache. The
871
- * generated `createDeviceProxy()` already sets `binding` to the
872
- * binding it was constructed with — this is a defensive overwrite
873
- * that uses the latest cached entry in case a `binding-changed`
874
- * event landed between proxy creation and access.
875
- */
876
- attachBinding(t) {
877
- const r = this.lookupBinding(t.deviceId);
878
- if (r === t.binding) return t;
879
- const s = t;
880
- return s.binding = r, t;
881
- }
882
- /** Fetch the latest cached binding from the mirror, or `null`. */
883
- lookupBinding(t) {
884
- return this.mirror ? this.mirror.getDeviceById(t)?.binding ?? null : null;
885
- }
886
- // ── System caps ──────────────────────────────────────────────────
887
- //
888
- // One getter per `scope: 'system'` capability. The actual surface
889
- // comes from `createSystemProxy(api)` (codegen). Adding a new
890
- // system cap regenerates the proxy and the new namespace surfaces
891
- // automatically via `system.<newCap>.<method>(input)`.
892
- get addonPages() {
893
- return this._systemProxy.addonPages;
894
- }
895
- get addonSettings() {
896
- return this._systemProxy.addonSettings;
897
- }
898
- get alerts() {
899
- return this._systemProxy.alerts;
900
- }
901
- get audioAnalyzer() {
902
- return this._systemProxy.audioAnalyzer;
903
- }
904
- get audioCodec() {
905
- return this._systemProxy.audioCodec;
906
- }
907
- get backup() {
908
- return this._systemProxy.backup;
909
- }
910
- get decoder() {
911
- return this._systemProxy.decoder;
912
- }
913
- get deviceManager() {
914
- return this._systemProxy.deviceManager;
915
- }
916
- get deviceProvider() {
917
- return this._systemProxy.deviceProvider;
918
- }
919
- get deviceState() {
920
- return this._systemProxy.deviceState;
921
- }
922
- get metricsProvider() {
923
- return this._systemProxy.metricsProvider;
924
- }
925
- get notificationOutput() {
926
- return this._systemProxy.notificationOutput;
927
- }
928
- get pipelineExecutor() {
929
- return this._systemProxy.pipelineExecutor;
930
- }
931
- get pipelineOrchestrator() {
932
- return this._systemProxy.pipelineOrchestrator;
933
- }
934
- get pipelineRunner() {
935
- return this._systemProxy.pipelineRunner;
936
- }
937
- get platformProbe() {
938
- return this._systemProxy.platformProbe;
939
- }
940
- get recordingEngine() {
941
- return this._systemProxy.recordingEngine;
942
- }
943
- get settingsStore() {
944
- return this._systemProxy.settingsStore;
945
- }
946
- get storage() {
947
- return this._systemProxy.storage;
948
- }
949
- get streamBroker() {
950
- return this._systemProxy.streamBroker;
951
- }
952
- get turnProvider() {
953
- return this._systemProxy.turnProvider;
954
- }
955
- get userManagement() {
956
- return this._systemProxy.userManagement;
957
- }
958
- // ── Live events ──────────────────────────────────────────────────
959
- /**
960
- * Subscribe to a single event category. Returns an unsubscribe
961
- * handle. Errors thrown by the listener are swallowed so a single
962
- * misbehaving consumer cannot tear down the WS subscription.
963
- *
964
- * Categories should be values from the `EventCategory` enum
965
- * (`@camstack/types`) — passing a raw string works for forward-compat
966
- * but loses type safety. The SDK forwards the value verbatim to the
967
- * server's `live.onEvent` subscription.
968
- */
969
- subscribeEvent(t, r) {
970
- const s = this._trpcClient.live.onEvent.subscribe(
971
- { category: t },
972
- {
973
- onData: (n) => {
974
- try {
975
- r(n);
976
- } catch {
977
- }
978
- }
979
- }
980
- );
981
- return () => {
982
- try {
983
- s.unsubscribe();
984
- } catch {
985
- }
986
- };
987
- }
988
- // ── Escape hatches ───────────────────────────────────────────────
989
- //
990
- // Kept public so the ui-library `<TrpcProvider>` can seed React
991
- // Query with the same WebSocket connection during Phase 2. Phase 4
992
- // is expected to revisit whether either field can be hidden.
993
- /** Direct tRPC client. Read once per call; rebuilt on `reconnect()`. */
994
- get trpcClient() {
995
- return this._trpcClient;
996
- }
997
- /**
998
- * Underlying WSClient (or `null` for HTTP transport). Used by
999
- * advanced consumers that need direct access to the WebSocket
1000
- * (e.g. for keep-alive metrics). Rebuilt on `reconnect()`.
1001
- */
1002
- get wsClient() {
1003
- return this._wsClient;
1004
- }
1005
- // ── Internals ────────────────────────────────────────────────────
1006
- buildTrpcClient() {
1007
- const t = () => {
1008
- const r = {};
1009
- return this.token && (r.Authorization = `Bearer ${this.token}`), r;
1010
- };
1011
- if (this.useWs) {
1012
- const r = this._serverUrl.replace(/^http/, "ws") + "/trpc", s = this.baseRetryMs, n = this.maxRetryMs;
1013
- return this._wsClient = _e({
1014
- url: r,
1015
- connectionParams: () => ({ token: this.token }),
1016
- retryDelayMs: (i) => Math.min(s * Math.pow(2, i), n),
1017
- keepAlive: {
1018
- enabled: !0,
1019
- intervalMs: je,
1020
- pongTimeoutMs: Qe
1021
- },
1022
- onOpen: () => {
1023
- this._connectionVersion += 1, this.emitConnectionEvent("connected");
1024
- },
1025
- onClose: () => {
1026
- this.emitConnectionEvent("disconnected");
1027
- }
1028
- }), x({
1029
- links: [be({ client: this._wsClient, transformer: l })]
1030
- });
1031
- }
1032
- return this._wsClient = null, x({
1033
- links: [ve({ url: `${this._serverUrl}/trpc`, headers: t, transformer: l })]
1034
- });
1035
- }
1036
- }
1037
- function ft(e) {
1038
- return new tt(e);
1039
- }
1040
- async function rt(e, t) {
1041
- if (e.length === 0) return null;
1042
- if (typeof fetch != "function") return e[0] ?? null;
1043
- const s = typeof window < "u" && typeof window.location < "u" && window.location.protocol === "https:" ? e.filter((o) => o.toLowerCase().startsWith("https://")) : e;
1044
- if (s.length === 0) return null;
1045
- const n = s.map(() => new AbortController()), i = s.map(async (o, a) => {
1046
- const c = n[a], f = setTimeout(() => c.abort(), t);
1047
- try {
1048
- const h = await fetch(`${o.replace(/\/+$/, "")}/trpc/health`, {
1049
- method: "GET",
1050
- signal: c.signal,
1051
- // Cross-origin probes from a browser sandbox are fine — the
1052
- // /trpc/health response is open-CORS by the Fastify default.
1053
- // No credentials needed (this is a transport-quality probe,
1054
- // not an auth round-trip).
1055
- credentials: "omit"
1056
- });
1057
- if (!h.ok) throw new Error(`${h.status}`);
1058
- return o;
1059
- } finally {
1060
- clearTimeout(f);
1061
- }
1062
- });
1063
- try {
1064
- const o = await Promise.any(i);
1065
- for (const a of n)
1066
- try {
1067
- a.abort();
1068
- } catch {
1069
- }
1070
- return o;
1071
- } catch {
1072
- return null;
1073
- }
1074
- }
1075
- var ne = /* @__PURE__ */ ((e) => (e.Motion = "motion", e.Person = "person", e.Vehicle = "vehicle", e.Animal = "animal", e.Audio = "audio", e.Face = "face", e.Plate = "plate", e.Package = "package", e.Doorbell = "doorbell", e.Sensor = "sensor", e))(ne || {});
1076
- const ie = [
1077
- "animal",
1078
- "dog_cat",
1079
- "dog",
1080
- "cat",
1081
- "horse",
1082
- "sheep",
1083
- "cow",
1084
- "elephant",
1085
- "bear",
1086
- "zebra",
1087
- "giraffe",
1088
- "mouse",
1089
- "rabbit",
1090
- "deer",
1091
- "lion",
1092
- "tiger",
1093
- "bird",
1094
- "eagle",
1095
- "owl",
1096
- "pigeon",
1097
- "fish",
1098
- "whale",
1099
- "dolphin",
1100
- "snake",
1101
- "turtle",
1102
- "lizard"
1103
- ], oe = [
1104
- "person",
1105
- "people",
1106
- "pedestrian",
1107
- "rider",
1108
- "driver",
1109
- "cyclist",
1110
- "skier",
1111
- "skateboarder",
1112
- "face",
1113
- "hand",
1114
- "head",
1115
- "body"
1116
- ], ae = [
1117
- "vehicle",
1118
- "car",
1119
- "truck",
1120
- "bus",
1121
- "motorcycle",
1122
- "bicycle",
1123
- "van",
1124
- "ambulance",
1125
- "police_car",
1126
- "fire_truck",
1127
- "train",
1128
- "subway",
1129
- "tram",
1130
- "airplane",
1131
- "boat",
1132
- "ship",
1133
- "helicopter"
1134
- ], le = [
1135
- "face",
1136
- "eyes",
1137
- "nose",
1138
- "mouth",
1139
- "ears",
1140
- "eyebrows",
1141
- "left_eye",
1142
- "right_eye",
1143
- "pupil",
1144
- "iris",
1145
- "eyelid",
1146
- "eye_corner",
1147
- "upper_lip",
1148
- "lower_lip",
1149
- "teeth",
1150
- "chin",
1151
- "cheek",
1152
- "forehead",
1153
- "jaw",
1154
- "glasses",
1155
- "sunglasses",
1156
- "facial_hair",
1157
- "beard",
1158
- "mustache",
1159
- "facial_landmark",
1160
- "facial_keypoint"
1161
- ], ce = [
1162
- "plate",
1163
- "license_plate",
1164
- "front_plate",
1165
- "rear_plate",
1166
- "motorcycle_plate",
1167
- "temporary_plate",
1168
- "dealer_plate",
1169
- "licensePlate",
1170
- "plate_number",
1171
- "plate_character",
1172
- "plate_digit",
1173
- "plate_letter",
1174
- "plate_symbol",
1175
- "plate_region",
1176
- "plate_country_identifier",
1177
- "plate_frame",
1178
- "plate_bolt",
1179
- "plate_sticker",
1180
- "plate_validation_tag",
1181
- "damaged_plate",
1182
- "obscured_plate",
1183
- "dirty_plate"
1184
- ], ue = ["motion", "movement", "other"], de = ["package", "packet"], fe = [
1185
- "audio"
1186
- /* Audio */
1187
- ], me = [
1188
- "speech",
1189
- "scream",
1190
- "babbling",
1191
- "yell",
1192
- "bellow",
1193
- "whoop",
1194
- "whispering",
1195
- "laughter",
1196
- "snicker",
1197
- "crying",
1198
- "cry",
1199
- "sigh",
1200
- "singing",
1201
- "choir",
1202
- "chant",
1203
- "mantra",
1204
- "child_singing",
1205
- "rapping",
1206
- "humming",
1207
- "groan",
1208
- "grunt",
1209
- "whistling",
1210
- "breathing",
1211
- "wheeze",
1212
- "snoring",
1213
- "gasp",
1214
- "pant",
1215
- "snort",
1216
- "cough",
1217
- "throat_clearing",
1218
- "sneeze",
1219
- "sniff",
1220
- "cheering",
1221
- "applause",
1222
- "chatter",
1223
- "crowd",
1224
- "children_playing",
1225
- "bark",
1226
- "yip",
1227
- "howl",
1228
- "bow-wow",
1229
- "growling",
1230
- "whimper_dog",
1231
- "purr",
1232
- "meow",
1233
- "hiss",
1234
- "caterwaul",
1235
- "pets",
1236
- "livestock",
1237
- "doorbell",
1238
- "ding-dong",
1239
- "door",
1240
- "slam",
1241
- "knock",
1242
- "alarm",
1243
- "telephone",
1244
- "music",
1245
- "dog",
1246
- "dogs"
1247
- ], he = ["doorbell", "ring"], pe = [
1248
- "lock",
1249
- "binary",
1250
- "flood",
1251
- "entry",
1252
- "door",
1253
- "leak",
1254
- "door_open",
1255
- "flooded",
1256
- "entry_open"
1257
- ], ye = {
1258
- ...ie.reduce((e, t) => ({
1259
- ...e,
1260
- [t]: "animal"
1261
- /* Animal */
1262
- }), {}),
1263
- ...oe.reduce((e, t) => ({
1264
- ...e,
1265
- [t]: "person"
1266
- /* Person */
1267
- }), {}),
1268
- ...ae.reduce((e, t) => ({
1269
- ...e,
1270
- [t]: "vehicle"
1271
- /* Vehicle */
1272
- }), {}),
1273
- ...ue.reduce((e, t) => ({
1274
- ...e,
1275
- [t]: "motion"
1276
- /* Motion */
1277
- }), {}),
1278
- ...de.reduce((e, t) => ({
1279
- ...e,
1280
- [t]: "package"
1281
- /* Package */
1282
- }), {}),
1283
- ...le.reduce((e, t) => ({
1284
- ...e,
1285
- [t]: "face"
1286
- /* Face */
1287
- }), {}),
1288
- ...ce.reduce((e, t) => ({
1289
- ...e,
1290
- [t]: "plate"
1291
- /* Plate */
1292
- }), {}),
1293
- ...fe.reduce((e, t) => ({
1294
- ...e,
1295
- [t]: "audio"
1296
- /* Audio */
1297
- }), {}),
1298
- ...me.reduce((e, t) => ({
1299
- ...e,
1300
- [t]: "audio"
1301
- /* Audio */
1302
- }), {}),
1303
- ...he.reduce((e, t) => ({
1304
- ...e,
1305
- [t]: "doorbell"
1306
- /* Doorbell */
1307
- }), {}),
1308
- ...pe.reduce((e, t) => ({
1309
- ...e,
1310
- [t]: "sensor"
1311
- /* Sensor */
1312
- }), {})
1313
- }, st = (e) => le.includes(e), nt = (e) => ce.includes(e), mt = (e) => ie.includes(e), ht = (e) => oe.includes(e), pt = (e) => ae.includes(e), yt = (e) => ue.includes(e), gt = (e) => he.includes(e), wt = (e) => de.includes(e), _t = (e) => fe.includes(e) || me.includes(e), bt = (e) => pe.includes(e), vt = (e) => st(e) || nt(e), Et = (e) => ye[e], Pt = (e) => {
1314
- const { className: t } = e, r = {
1315
- face: "person",
1316
- plate: "vehicle"
1317
- /* Vehicle */
1318
- }, s = ye[t];
1319
- return s && s !== t ? s : r[t];
1320
- }, it = Object.values(ne), L = it.filter(
1321
- (e) => e !== "motion"
1322
- /* Motion */
1323
- ), ge = [
1324
- "person",
1325
- "doorbell",
1326
- "package"
1327
- /* Package */
1328
- ], ot = [
1329
- ...ge,
1330
- "vehicle",
1331
- "animal",
1332
- "audio",
1333
- "face",
1334
- "plate"
1335
- /* Plate */
1336
- ], at = [...L];
1337
- function Ct(e, t) {
1338
- switch (e) {
1339
- case "critical":
1340
- return ge;
1341
- case "important":
1342
- return ot;
1343
- case "all":
1344
- return at;
1345
- case "custom":
1346
- return t?.length ? t : L;
1347
- default:
1348
- return L;
1349
- }
1350
- }
1351
- const F = {
1352
- // Scrypted PascalCase
1353
- Light: "light",
1354
- Switch: "switch",
1355
- WindowCovering: "cover",
1356
- Lock: "lock",
1357
- SecuritySystem: "alarm",
1358
- Buttons: "button",
1359
- Select: "select",
1360
- Siren: "siren",
1361
- Sensor: "sensor",
1362
- Entry: "entry",
1363
- Program: "script",
1364
- MediaPlayer: "media_player",
1365
- Outlet: "switch",
1366
- // Home Assistant lowercase domains
1367
- light: "light",
1368
- switch: "switch",
1369
- input_boolean: "switch",
1370
- cover: "cover",
1371
- lock: "lock",
1372
- alarm_control_panel: "alarm",
1373
- input_button: "button",
1374
- button: "button",
1375
- input_select: "select",
1376
- select: "select",
1377
- siren: "siren",
1378
- sensor: "sensor",
1379
- media_player: "media_player",
1380
- script: "script"
1381
- }, kt = {
1382
- light: "light",
1383
- switch: "switch",
1384
- input_boolean: "switch",
1385
- cover: "cover",
1386
- lock: "lock",
1387
- alarm_control_panel: "alarm",
1388
- input_button: "button",
1389
- button: "button",
1390
- input_select: "select",
1391
- select: "select",
1392
- siren: "siren",
1393
- sensor: "sensor",
1394
- binary_sensor: "sensor",
1395
- media_player: "media_player",
1396
- script: "script",
1397
- climate: "climate",
1398
- camera: "camera",
1399
- fan: "fan",
1400
- vacuum: "vacuum",
1401
- automation: "automation",
1402
- scene: "scene",
1403
- input_number: "sensor",
1404
- person: "person",
1405
- device_tracker: "tracker",
1406
- weather: "weather",
1407
- water_heater: "climate"
1408
- }, St = {
1409
- Light: "light",
1410
- Switch: "switch",
1411
- WindowCovering: "cover",
1412
- Lock: "lock",
1413
- SecuritySystem: "alarm",
1414
- Buttons: "button",
1415
- Select: "select",
1416
- Siren: "siren",
1417
- Sensor: "sensor",
1418
- Entry: "entry",
1419
- Program: "script",
1420
- MediaPlayer: "media_player",
1421
- Camera: "camera",
1422
- Doorbell: "doorbell",
1423
- Fan: "fan",
1424
- Outlet: "switch"
1425
- };
1426
- function Tt(e) {
1427
- const t = F[e];
1428
- if (t) return t;
1429
- const r = e.toLowerCase();
1430
- return F[r] ?? null;
1431
- }
1432
- const lt = [
1433
- "Entry",
1434
- "Light",
1435
- "Switch",
1436
- "Lock",
1437
- "SecuritySystem",
1438
- "Buttons",
1439
- "WindowCovering",
1440
- "Siren",
1441
- "Sensor",
1442
- "Select",
1443
- "Program"
1444
- ], Rt = new Set(lt), ct = [
1445
- "light",
1446
- "switch",
1447
- "input_boolean",
1448
- "cover",
1449
- "lock",
1450
- "alarm_control_panel",
1451
- "input_button",
1452
- "button",
1453
- "input_select",
1454
- "select",
1455
- "siren",
1456
- "media_player",
1457
- "script"
1458
- ], It = new Set(ct), N = [
1459
- {
1460
- id: "liveStream",
1461
- label: "Live Stream",
1462
- sources: { frigate: !0, scrypted: !0, rtsp: !0 },
1463
- adapterMethod: "getLiveStream"
1464
- },
1465
- {
1466
- id: "multiResolution",
1467
- label: "Multi-Resolution",
1468
- sources: { frigate: !0, scrypted: !0, rtsp: !1 },
1469
- adapterMethod: "getResolutions"
1470
- },
1471
- {
1472
- id: "motion",
1473
- label: "Motion Detection",
1474
- sources: { frigate: !1, scrypted: !0, rtsp: !1 },
1475
- adapterMethod: "getMotion"
1476
- },
1477
- {
1478
- id: "objectDetection",
1479
- label: "Object Detection",
1480
- sources: { frigate: !1, scrypted: !0, rtsp: !1 },
1481
- adapterMethod: "getObjectDetections"
1482
- },
1483
- {
1484
- id: "audioVolume",
1485
- label: "Audio Level",
1486
- sources: { frigate: !1, scrypted: !0, rtsp: !1 },
1487
- adapterMethod: "getAudioVolume"
1488
- },
1489
- {
1490
- id: "audioVolumes",
1491
- label: "Audio Volumes (dBFS)",
1492
- sources: { frigate: !1, scrypted: !0, rtsp: !1 },
1493
- adapterMethod: "getAudioVolumes"
1494
- },
1495
- {
1496
- id: "ptz",
1497
- label: "PTZ Control",
1498
- sources: { frigate: !1, scrypted: !0, rtsp: !1 },
1499
- adapterMethod: "getPTZ"
1500
- },
1501
- {
1502
- id: "intercom",
1503
- label: "Intercom (Mic)",
1504
- sources: { frigate: !1, scrypted: !0, rtsp: !1 },
1505
- adapterMethod: "getIntercomSupport"
1506
- },
1507
- {
1508
- id: "deviceStatus",
1509
- label: "Device Status",
1510
- sources: { frigate: !1, scrypted: !0, rtsp: !1 },
1511
- adapterMethod: "getStatus"
1512
- },
1513
- {
1514
- id: "timeline",
1515
- label: "Detection Timeline",
1516
- sources: { frigate: !0, scrypted: !0, rtsp: !1 },
1517
- adapterMethod: "getCameraDayData"
1518
- },
1519
- {
1520
- id: "clusteredTimeline",
1521
- label: "Clustered Timeline",
1522
- sources: { frigate: !0, scrypted: !0, rtsp: !1 },
1523
- requiresBackend: !0,
1524
- adapterMethod: "getClusteredDayData"
1525
- },
1526
- {
1527
- id: "detectionClasses",
1528
- label: "Detection Classes",
1529
- sources: { frigate: !0, scrypted: !0, rtsp: !1 },
1530
- adapterMethod: "getDetectionClasses"
1531
- },
1532
- {
1533
- id: "videoClips",
1534
- label: "Video Clips",
1535
- sources: { frigate: !0, scrypted: !0, rtsp: !1 },
1536
- adapterMethod: "getVideoClips"
1537
- },
1538
- {
1539
- id: "nvrPlayback",
1540
- label: "NVR Playback",
1541
- sources: { frigate: !0, scrypted: !0, rtsp: !1 },
1542
- adapterMethod: "getNvrPlaybackSupported"
1543
- },
1544
- {
1545
- id: "nvrScrub",
1546
- label: "NVR Scrub/Seek",
1547
- sources: { frigate: !1, scrypted: !0, rtsp: !1 },
1548
- adapterMethod: "seekRecordingStream"
1549
- },
1550
- {
1551
- id: "recordingThumbnail",
1552
- label: "Recording Thumbnails",
1553
- sources: { frigate: !0, scrypted: !0, rtsp: !1 },
1554
- adapterMethod: "getRecordingStreamThumbnail"
1555
- },
1556
- {
1557
- id: "nvrSeekToLive",
1558
- label: "Seek to Live",
1559
- sources: { frigate: !1, scrypted: !0, rtsp: !1 },
1560
- adapterMethod: "seekNvrToLive"
1561
- }
1562
- ];
1563
- function At(e, t, r) {
1564
- const s = N.find((n) => n.id === e);
1565
- return !(!s || !s.sources[t] || s.platforms && s.platforms[r] === !1);
1566
- }
1567
- function Mt(e) {
1568
- return N.filter((t) => t.sources[e]);
1569
- }
1570
- function Ot() {
1571
- return N.filter((e) => e.requiresBackend);
1572
- }
1573
- function Dt(e, t, r) {
1574
- if (e.length === 0) return null;
1575
- const s = t.viewportWidth * t.viewportHeight * (t.pixelRatio ?? 1), n = t.bandwidthMbps ?? 100, i = t.packetLoss ?? 0, o = t.rttMs ?? 50;
1576
- let a = "high";
1577
- t.maxResolution === "low" || t.isCellular || n < 1 || i > 0.05 ? a = "low" : t.maxResolution === "medium" || n < 5 || s < 5e5 || o > 200 ? a = "medium" : (t.maxResolution === "high" || s > 2e6) && (a = "high");
1578
- const c = {
1579
- main: "high",
1580
- sub: "medium",
1581
- ext: "low"
1582
- }, f = r ?? "native", h = e.map((d) => {
1583
- let u = 0;
1584
- const m = c[d.profile] ?? "medium";
1585
- if (m === a ? u += 100 : (a === "high" && m === "medium" || a === "medium" && m === "high" || a === "medium" && m === "low" || a === "low" && m === "medium") && (u += 50), d.transport === f ? u += 30 : d.transport === "native" ? u += 20 : d.transport === "rtsp" ? u += 15 : d.transport === "rtmp" && (u += 10), d.metadata?.width && d.metadata?.height) {
1586
- const w = d.metadata.width * d.metadata.height / Math.max(s, 1);
1587
- w >= 0.8 && w <= 2 ? u += 25 : w >= 0.5 && w <= 3 && (u += 15), w > 4 && n < 10 && (u -= 20);
1588
- }
1589
- return d.metadata?.codec && (n < 5 && d.metadata.codec.includes("265") && (u += 10), n >= 10 && d.metadata.codec.includes("264") && (u += 5)), { ...d, score: u, targetTier: a };
1590
- });
1591
- h.sort((d, u) => u.score - d.score);
1592
- const p = h[0];
1593
- return {
1594
- streamName: p.streamName,
1595
- profile: p.profile,
1596
- transport: p.transport,
1597
- label: p.label,
1598
- metadata: p.metadata,
1599
- reason: `${p.targetTier} quality → ${p.profile}/${p.transport} (score: ${p.score})`
1600
- };
1601
- }
1602
- function Lt(e, t) {
1603
- return t ? 10 : e.isCellular || (e.packetLoss ?? 0) > 0.02 ? 15 : 30;
1604
- }
1605
- export {
1606
- L as DEFAULT_ENABLED_CLASSES,
1607
- ne as DetectionClass,
1608
- ct as ELIGIBLE_HA_DOMAINS,
1609
- It as ELIGIBLE_HA_DOMAINS_SET,
1610
- lt as ELIGIBLE_SCRYPTED_DEVICE_TYPES,
1611
- Rt as ELIGIBLE_SCRYPTED_DEVICE_TYPES_SET,
1612
- N as FEATURE_MATRIX,
1613
- kt as HA_DOMAIN_TYPE_MAP,
1614
- F as RAW_TO_CANONICAL,
1615
- St as SCRYPTED_TYPE_TO_CANONICAL,
1616
- tt as System,
1617
- at as TIMELINE_PRESET_ALL,
1618
- ge as TIMELINE_PRESET_CRITICAL,
1619
- ot as TIMELINE_PRESET_IMPORTANT,
1620
- ie as animalClasses,
1621
- fe as audioClasses,
1622
- me as audioLabelClasses,
1623
- ft as createSystem,
1624
- it as defaultDetectionClasses,
1625
- ye as detectionClassesDefaultMap,
1626
- he as doorbellClasses,
1627
- le as faceClasses,
1628
- Ot as getBackendRequiredFeatures,
1629
- Tt as getCanonicalDeviceType,
1630
- Ct as getClassesForTimelinePreset,
1631
- Lt as getNextEvalInterval,
1632
- Et as getParentClass,
1633
- Pt as getParentDetectionClass,
1634
- Mt as getSourceFeatures,
1635
- mt as isAnimalClassname,
1636
- _t as isAudioClassname,
1637
- gt as isDoorbellClassname,
1638
- st as isFaceClassname,
1639
- At as isFeatureAvailable,
1640
- vt as isLabelDetection,
1641
- yt as isMotionClassname,
1642
- wt as isPackageClassname,
1643
- ht as isPersonClassname,
1644
- nt as isPlateClassname,
1645
- bt as isSensorLabelClassname,
1646
- pt as isVehicleClassname,
1647
- ce as licensePlateClasses,
1648
- ue as motionClasses,
1649
- de as packageClasses,
1650
- oe as personClasses,
1651
- rt as raceFastestEndpoint,
1652
- Dt as selectOptimalStream,
1653
- pe as sensorLabelClasses,
1654
- ae as vehicleClasses
1655
- };