@kosdev-code/kos-ui-sdk 0.1.0-dev.5698 → 0.1.0-dev.5706
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/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/index.cjs +16 -16
- package/index.cjs.map +1 -1
- package/index.js +287 -288
- package/index.js.map +1 -1
- package/kos-models.json +1 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -539,7 +539,7 @@ const pd = [
|
|
|
539
539
|
"font-weight: bold"
|
|
540
540
|
].join(";"), Ws = (t) => (e) => {
|
|
541
541
|
C.getLevel() <= t && e();
|
|
542
|
-
},
|
|
542
|
+
}, g = {
|
|
543
543
|
...C,
|
|
544
544
|
ifDebug: Ws(C.levels.DEBUG),
|
|
545
545
|
ifInfo: Ws(C.levels.INFO),
|
|
@@ -567,7 +567,7 @@ const pd = [
|
|
|
567
567
|
}
|
|
568
568
|
}, ne = Symbol("SubscriptionHandlers"), N = Symbol("DependencyModels"), dr = Symbol("FutureService"), yt = Symbol("ChildModels"), hr = Symbol("ParentModel"), fr = Symbol("LogConfig"), vn = Symbol("ReferenceConfig"), Ba = Symbol("KosModelSymbol"), et = Symbol("ModelEffects"), vt = Symbol("CompanionParentModel"), Ha = Symbol("FutureContainerSetup"), qa = Symbol(
|
|
569
569
|
"MultipleFutureContainerSetup"
|
|
570
|
-
), pr = Symbol("FutureAliases"), za = Symbol("TroubleAwareSetup"), Va = Symbol("LoggerSetup"), Ka = Symbol("ContainerAwareSetup"), Bs = Symbol("StateMachineSetup"), Es = Symbol("StateEntryHandlers"), gr = Symbol("StateExitHandlers"), EM = Symbol("StateActionHandlers"), tn = Symbol("OptionsRequired"), md = Symbol("KosViewModelSymbol"), Ga = Symbol("ViewModelConfig"), yd = Symbol("ReloadAwareSetup"), wo =
|
|
570
|
+
), pr = Symbol("FutureAliases"), za = Symbol("TroubleAwareSetup"), Va = Symbol("LoggerSetup"), Ka = Symbol("ContainerAwareSetup"), Bs = Symbol("StateMachineSetup"), Es = Symbol("StateEntryHandlers"), gr = Symbol("StateExitHandlers"), EM = Symbol("StateActionHandlers"), tn = Symbol("OptionsRequired"), md = Symbol("KosViewModelSymbol"), Ga = Symbol("ViewModelConfig"), yd = Symbol("ReloadAwareSetup"), wo = g.createLogger({ group: "decorators", name: "fsm-injection" });
|
|
571
571
|
function Ya(t) {
|
|
572
572
|
const e = t[Bs];
|
|
573
573
|
if (!e)
|
|
@@ -853,7 +853,7 @@ const CM = ({ group: t } = { group: "" }) => (e) => {
|
|
|
853
853
|
class Qa {
|
|
854
854
|
static create({ modelId: e, modelTypeName: s, component: r }) {
|
|
855
855
|
const n = [r ?? "kos", s, e].filter(Boolean).join(".");
|
|
856
|
-
return
|
|
856
|
+
return g.createLogger({ name: n });
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
859
|
function Kd(t) {
|
|
@@ -896,7 +896,7 @@ function Gd(t) {
|
|
|
896
896
|
}
|
|
897
897
|
const DM = (t) => (e, s) => {
|
|
898
898
|
e[vn] = e[vn] || {}, e[vn][s] = t;
|
|
899
|
-
}, wn =
|
|
899
|
+
}, wn = g.createLogger({ name: "resolve-parameters" }), be = ({
|
|
900
900
|
value: t,
|
|
901
901
|
modelId: e,
|
|
902
902
|
modelData: s
|
|
@@ -1019,13 +1019,13 @@ function ts(t) {
|
|
|
1019
1019
|
if (!f)
|
|
1020
1020
|
throw new Error("Service request metadata not found for method");
|
|
1021
1021
|
try {
|
|
1022
|
-
const { default:
|
|
1022
|
+
const { default: m } = await Promise.resolve().then(() => $o), { resolvedPath: y, apiParams: v, finalBody: _, finalRequestOptions: U } = Yd(
|
|
1023
1023
|
f,
|
|
1024
1024
|
this,
|
|
1025
1025
|
u,
|
|
1026
1026
|
p
|
|
1027
1027
|
), [D, $] = await Wd(
|
|
1028
|
-
|
|
1028
|
+
m,
|
|
1029
1029
|
f.method,
|
|
1030
1030
|
y,
|
|
1031
1031
|
v,
|
|
@@ -1041,8 +1041,8 @@ function ts(t) {
|
|
|
1041
1041
|
);
|
|
1042
1042
|
let L = $;
|
|
1043
1043
|
return f.transform && (L = f.transform($)), [null, L];
|
|
1044
|
-
} catch (
|
|
1045
|
-
return [
|
|
1044
|
+
} catch (m) {
|
|
1045
|
+
return [m.message || "Unknown error", null];
|
|
1046
1046
|
}
|
|
1047
1047
|
};
|
|
1048
1048
|
if (Wa(d))
|
|
@@ -1061,7 +1061,7 @@ function ts(t) {
|
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
1063
|
var Zd = /* @__PURE__ */ ((t) => (t.GET = "GET", t.PUT = "PUT", t.POST = "POST", t.DELETE = "DELETE", t))(Zd || {}), he = /* @__PURE__ */ ((t) => (t.IMMEDIATE = "immediate", t.SINGLE = "single", t.TTL = "ttl", t.PERMANENT = "permanent", t.MANUAL = "manual", t))(he || {}), Ft = /* @__PURE__ */ ((t) => (t.ALL = "all", t.AFTER_REQUEST = "after-request", t.AFTER_RESPONSE = "after-response", t.NONE = "none", t))(Ft || {});
|
|
1064
|
-
const Xd =
|
|
1064
|
+
const Xd = g.createLogger({ name: "kos-state-machine" });
|
|
1065
1065
|
function xM(t, e) {
|
|
1066
1066
|
return (s) => (s.prototype[Bs] = {
|
|
1067
1067
|
config: {
|
|
@@ -1221,7 +1221,7 @@ class _o {
|
|
|
1221
1221
|
try {
|
|
1222
1222
|
await this._future.cancelFuture();
|
|
1223
1223
|
} catch (e) {
|
|
1224
|
-
throw
|
|
1224
|
+
throw g.error(e), e;
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
@@ -1353,7 +1353,7 @@ const ue = "canvas-renderer", rh = "kos.declarative.futureLifecycleWrapper", _n
|
|
|
1353
1353
|
return await r(e);
|
|
1354
1354
|
} catch (o) {
|
|
1355
1355
|
if (n.failurePolicy === "continue") {
|
|
1356
|
-
|
|
1356
|
+
g.error(`Error executing data loader for id ${t}`), g.error(o);
|
|
1357
1357
|
return;
|
|
1358
1358
|
}
|
|
1359
1359
|
throw new Mn(t, "dataLoader", o);
|
|
@@ -1377,7 +1377,7 @@ const ue = "canvas-renderer", rh = "kos.declarative.futureLifecycleWrapper", _n
|
|
|
1377
1377
|
return n(e, s);
|
|
1378
1378
|
} catch (i) {
|
|
1379
1379
|
if (o.failurePolicy === "continue")
|
|
1380
|
-
return
|
|
1380
|
+
return g.error(`Error executing property mapper for id ${t}`), g.error(i), "";
|
|
1381
1381
|
throw new Mn(t, "propertyMapper", i);
|
|
1382
1382
|
}
|
|
1383
1383
|
}
|
|
@@ -1401,7 +1401,7 @@ const ue = "canvas-renderer", rh = "kos.declarative.futureLifecycleWrapper", _n
|
|
|
1401
1401
|
Object.assign(n, a);
|
|
1402
1402
|
} catch (a) {
|
|
1403
1403
|
if (i.failurePolicy === "continue") {
|
|
1404
|
-
|
|
1404
|
+
g.error(`Error executing data mapper for id ${t}`), g.error(a);
|
|
1405
1405
|
continue;
|
|
1406
1406
|
}
|
|
1407
1407
|
throw new Mn(t, "dataMapper", a);
|
|
@@ -1412,7 +1412,7 @@ const ue = "canvas-renderer", rh = "kos.declarative.futureLifecycleWrapper", _n
|
|
|
1412
1412
|
canvas: {
|
|
1413
1413
|
registerRenderer: (t, e) => {
|
|
1414
1414
|
if (!M[ue]) {
|
|
1415
|
-
|
|
1415
|
+
g.warn(
|
|
1416
1416
|
`Canvas renderer extension point is not registered. Cannot register renderer "${t}".`
|
|
1417
1417
|
);
|
|
1418
1418
|
return;
|
|
@@ -1496,7 +1496,7 @@ class Ja {
|
|
|
1496
1496
|
}), Object.keys(s).forEach((n) => {
|
|
1497
1497
|
const o = s[n], i = this.data[n] || [];
|
|
1498
1498
|
if (ah(o, i))
|
|
1499
|
-
|
|
1499
|
+
g.debug(`KosContainerIndex - Index ${n} is the same`);
|
|
1500
1500
|
else {
|
|
1501
1501
|
this.data[n] = o;
|
|
1502
1502
|
const a = e.get(n) || /* @__PURE__ */ new Set();
|
|
@@ -1541,7 +1541,7 @@ function ch(t, e, s = []) {
|
|
|
1541
1541
|
)
|
|
1542
1542
|
);
|
|
1543
1543
|
}
|
|
1544
|
-
const de =
|
|
1544
|
+
const de = g.createLogger({ name: "kos-container-model" });
|
|
1545
1545
|
class Ze {
|
|
1546
1546
|
constructor(e) {
|
|
1547
1547
|
l(this, "_data");
|
|
@@ -1925,9 +1925,9 @@ const Te = async (t) => {
|
|
|
1925
1925
|
const e = T.getInstance().modelManager.getModelById(t.id);
|
|
1926
1926
|
e && await e.fsm.transitionTo(k.UNLOAD, b.UNLOADED);
|
|
1927
1927
|
}, jM = async (t) => {
|
|
1928
|
-
await T.getInstance().whenReady(), await T.getInstance().modelManager.reloadModel(t),
|
|
1928
|
+
await T.getInstance().whenReady(), await T.getInstance().modelManager.reloadModel(t), g.debug(
|
|
1929
1929
|
`reload model initiated for model ${t.id}, model ready: ${zn(t)} - ${Date.now()} `
|
|
1930
|
-
), await Te(t),
|
|
1930
|
+
), await Te(t), g.debug(
|
|
1931
1931
|
`reload model complete for model ${t.id}, model ready: ${zn(t)} - ${Date.now()} `
|
|
1932
1932
|
);
|
|
1933
1933
|
}, BM = async (t) => {
|
|
@@ -1978,7 +1978,7 @@ const Te = async (t) => {
|
|
|
1978
1978
|
}, li = (t, e) => {
|
|
1979
1979
|
const s = T.getInstance().modelManager.getModelById(t);
|
|
1980
1980
|
if (!s) {
|
|
1981
|
-
|
|
1981
|
+
g.info(`Model not found for id ${t}`);
|
|
1982
1982
|
return;
|
|
1983
1983
|
}
|
|
1984
1984
|
return Array.from(s.companionModels.all()).find(
|
|
@@ -1989,7 +1989,7 @@ const Te = async (t) => {
|
|
|
1989
1989
|
if (!e)
|
|
1990
1990
|
throw new Error("Model not found");
|
|
1991
1991
|
return e.isReady();
|
|
1992
|
-
}, hh =
|
|
1992
|
+
}, hh = g.createLogger({ name: "kos-model-factory" }), mr = {
|
|
1993
1993
|
byModelType: (t) => T.getInstance().modelManager.getModelFactory(
|
|
1994
1994
|
t
|
|
1995
1995
|
),
|
|
@@ -2224,7 +2224,7 @@ class Ne extends ec {
|
|
|
2224
2224
|
};
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
|
-
const Vn =
|
|
2227
|
+
const Vn = g.createLogger({ group: "decorators", name: "kos-model" });
|
|
2228
2228
|
function gh(t, e, s) {
|
|
2229
2229
|
var o;
|
|
2230
2230
|
const r = (o = t[hr]) == null ? void 0 : o.parentId;
|
|
@@ -2510,8 +2510,8 @@ function Mh(t, e) {
|
|
|
2510
2510
|
"getCompanionParent"
|
|
2511
2511
|
// Don't override our own getCompanionParent
|
|
2512
2512
|
], u = (f) => {
|
|
2513
|
-
const
|
|
2514
|
-
return Object.values(
|
|
2513
|
+
const m = i.constructor.prototype[ne] || {};
|
|
2514
|
+
return Object.values(m).some((y) => {
|
|
2515
2515
|
const v = y == null ? void 0 : y.handler;
|
|
2516
2516
|
return v === i[f] || v === i.constructor.prototype[f];
|
|
2517
2517
|
});
|
|
@@ -2523,8 +2523,8 @@ function Mh(t, e) {
|
|
|
2523
2523
|
Object.getOwnPropertyNames(p).filter((f) => !d(f)).forEach((f) => h.add(f)), p = Object.getPrototypeOf(p);
|
|
2524
2524
|
for (const f of h)
|
|
2525
2525
|
try {
|
|
2526
|
-
const
|
|
2527
|
-
typeof
|
|
2526
|
+
const m = i[f];
|
|
2527
|
+
typeof m == "function" ? t[f] = (...y) => m.apply(i, y) : Object.defineProperty(t, f, {
|
|
2528
2528
|
get: () => i[f],
|
|
2529
2529
|
set: (y) => {
|
|
2530
2530
|
i[f] = y;
|
|
@@ -2533,10 +2533,10 @@ function Mh(t, e) {
|
|
|
2533
2533
|
configurable: !0
|
|
2534
2534
|
// Allow MobX to make this observable
|
|
2535
2535
|
});
|
|
2536
|
-
} catch (
|
|
2536
|
+
} catch (m) {
|
|
2537
2537
|
Vn.debug(
|
|
2538
2538
|
`Skipping companion proxy for property ${f}:`,
|
|
2539
|
-
|
|
2539
|
+
m
|
|
2540
2540
|
);
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
@@ -2571,7 +2571,7 @@ const $h = {
|
|
|
2571
2571
|
var c;
|
|
2572
2572
|
const [s, r = {}] = e, n = J.createContext(s);
|
|
2573
2573
|
gh(t, s, r);
|
|
2574
|
-
const i = !!t.prototype[Va] ? null :
|
|
2574
|
+
const i = !!t.prototype[Va] ? null : g.createLogger({
|
|
2575
2575
|
name: t.prototype.modelTypeId,
|
|
2576
2576
|
group: ((c = t[fr]) == null ? void 0 : c.group) ?? "kos-model"
|
|
2577
2577
|
}), a = new t(s, r, {
|
|
@@ -2585,8 +2585,8 @@ function R(t) {
|
|
|
2585
2585
|
return (e) => {
|
|
2586
2586
|
var o, i;
|
|
2587
2587
|
const s = e, r = typeof t == "string" ? { modelTypeId: t, autoRegister: !1 } : { autoRegister: !1, ...t };
|
|
2588
|
-
s.prototype.modelTypeId = r.modelTypeId, s.prototype[Ba] = !0, (o = s.prototype)[ne] ?? (o[ne] = {}), (i = s.prototype)[N] ?? (i[N] = {}), r.optionsRequired && (s.prototype[tn] = !0),
|
|
2589
|
-
|
|
2588
|
+
s.prototype.modelTypeId = r.modelTypeId, s.prototype[Ba] = !0, (o = s.prototype)[ne] ?? (o[ne] = {}), (i = s.prototype)[N] ?? (i[N] = {}), r.optionsRequired && (s.prototype[tn] = !0), g.ifDebug(() => {
|
|
2589
|
+
g.debug(`Registering model with id ${r.modelTypeId}`);
|
|
2590
2590
|
});
|
|
2591
2591
|
const n = new Proxy(s, $h);
|
|
2592
2592
|
if (r.singleton !== void 0) {
|
|
@@ -2667,7 +2667,7 @@ function Ch(t, e) {
|
|
|
2667
2667
|
throttle: h,
|
|
2668
2668
|
buffer: p,
|
|
2669
2669
|
filter: f,
|
|
2670
|
-
once:
|
|
2670
|
+
once: m,
|
|
2671
2671
|
wildcardName: y,
|
|
2672
2672
|
flow: v,
|
|
2673
2673
|
requiresBaseline: _
|
|
@@ -2675,7 +2675,7 @@ function Ch(t, e) {
|
|
|
2675
2675
|
debounce: d,
|
|
2676
2676
|
throttle: h,
|
|
2677
2677
|
buffer: p,
|
|
2678
|
-
once:
|
|
2678
|
+
once: m
|
|
2679
2679
|
}), $ = xh(f, s);
|
|
2680
2680
|
return {
|
|
2681
2681
|
websocket: n,
|
|
@@ -2690,7 +2690,7 @@ function Ch(t, e) {
|
|
|
2690
2690
|
wildcardName: y,
|
|
2691
2691
|
flow: v,
|
|
2692
2692
|
requiresBaseline: _,
|
|
2693
|
-
once:
|
|
2693
|
+
once: m
|
|
2694
2694
|
};
|
|
2695
2695
|
}
|
|
2696
2696
|
function Dh(t, e) {
|
|
@@ -2893,7 +2893,7 @@ const Dn = /* @__PURE__ */ new Map(), tc = {
|
|
|
2893
2893
|
clearTimeout(s);
|
|
2894
2894
|
});
|
|
2895
2895
|
}
|
|
2896
|
-
}, Qh =
|
|
2896
|
+
}, Qh = g.createLogger({ name: "kos-dependency-manager" });
|
|
2897
2897
|
class Zh {
|
|
2898
2898
|
constructor() {
|
|
2899
2899
|
l(this, "_usedByCache", /* @__PURE__ */ new Map());
|
|
@@ -2926,7 +2926,7 @@ class Zh {
|
|
|
2926
2926
|
this._usedByCache.clear(), this._usesCache.clear();
|
|
2927
2927
|
}
|
|
2928
2928
|
}
|
|
2929
|
-
const di =
|
|
2929
|
+
const di = g.createLogger({ name: "kos-model-cache" });
|
|
2930
2930
|
class Xh {
|
|
2931
2931
|
constructor(e = []) {
|
|
2932
2932
|
l(this, "_modelsById", te.map(/* @__PURE__ */ new Map()));
|
|
@@ -3005,9 +3005,9 @@ function Bt(t, e) {
|
|
|
3005
3005
|
);
|
|
3006
3006
|
}
|
|
3007
3007
|
function Jh(t, e) {
|
|
3008
|
-
t.length !== 0 && (
|
|
3008
|
+
t.length !== 0 && (g.error(`${e} - ${t.length} error(s) occurred:`), t.forEach(({ error: s, context: r }, n) => {
|
|
3009
3009
|
const o = s instanceof yr ? s : Bt(s, r);
|
|
3010
|
-
|
|
3010
|
+
g.error(
|
|
3011
3011
|
` [${n + 1}/${t.length}] ${o.toDetailedString()}`
|
|
3012
3012
|
);
|
|
3013
3013
|
}));
|
|
@@ -3022,7 +3022,7 @@ function hi(t, e) {
|
|
|
3022
3022
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
3023
3023
|
});
|
|
3024
3024
|
}
|
|
3025
|
-
const ef = (t) => typeof t == "function", Zs =
|
|
3025
|
+
const ef = (t) => typeof t == "function", Zs = g.createLogger({ name: "kos-companion-instantiator" });
|
|
3026
3026
|
class tf {
|
|
3027
3027
|
constructor(e, s, r) {
|
|
3028
3028
|
this.registry = e, this.cache = s, this.createModel = r;
|
|
@@ -3204,7 +3204,7 @@ const nc = (t, e, s) => {
|
|
|
3204
3204
|
let r;
|
|
3205
3205
|
return { promise: new Promise((i, a) => {
|
|
3206
3206
|
r = setTimeout(() => {
|
|
3207
|
-
|
|
3207
|
+
g.error(
|
|
3208
3208
|
`Model ${e.modelId} - ${e.modelTypeName} - ${s} timed out after ${t}ms`
|
|
3209
3209
|
), a(
|
|
3210
3210
|
new uf(
|
|
@@ -3234,12 +3234,12 @@ const nc = (t, e, s) => {
|
|
|
3234
3234
|
modelData: t.modelData,
|
|
3235
3235
|
modelId: t.modelId
|
|
3236
3236
|
}), n = e.resolutionPolicy || ht.CREATE;
|
|
3237
|
-
|
|
3237
|
+
g.debug(
|
|
3238
3238
|
`Resolving dependent model ${e.modelType} with id ${r} (policy: ${n})`
|
|
3239
3239
|
);
|
|
3240
|
-
const o = Object.keys((e == null ? void 0 : e.options) || {}).reduce((f,
|
|
3241
|
-
const y = e.options[
|
|
3242
|
-
return f[
|
|
3240
|
+
const o = Object.keys((e == null ? void 0 : e.options) || {}).reduce((f, m) => {
|
|
3241
|
+
const y = e.options[m];
|
|
3242
|
+
return f[m] = be({
|
|
3243
3243
|
value: y,
|
|
3244
3244
|
modelData: t.modelData,
|
|
3245
3245
|
modelId: t.modelId
|
|
@@ -3247,7 +3247,7 @@ const nc = (t, e, s) => {
|
|
|
3247
3247
|
}, {}), i = T.getInstance().modelManager, a = i.registry.models[e.modelType];
|
|
3248
3248
|
if (!a) {
|
|
3249
3249
|
const f = `No model registered for type ${e.modelType}`;
|
|
3250
|
-
if (
|
|
3250
|
+
if (g.error(
|
|
3251
3251
|
`Failed to resolve dependency for model ${t.modelId}:
|
|
3252
3252
|
- Dependency Type: ${e.modelType}
|
|
3253
3253
|
- Dependency ID: ${r}
|
|
@@ -3256,7 +3256,7 @@ const nc = (t, e, s) => {
|
|
|
3256
3256
|
- Parent Model ID: ${t.modelId}
|
|
3257
3257
|
- Error: ${f}`
|
|
3258
3258
|
), n === ht.CONTINUE)
|
|
3259
|
-
return
|
|
3259
|
+
return g.warn(
|
|
3260
3260
|
`Model type not registered (policy: CONTINUE) - Model ${t.modelId} will continue without dependency ${e.modelType} [${r}]`
|
|
3261
3261
|
), { dependentModel: null, dataModelId: r, success: !1 };
|
|
3262
3262
|
throw new Error(
|
|
@@ -3267,7 +3267,7 @@ const nc = (t, e, s) => {
|
|
|
3267
3267
|
if (c) {
|
|
3268
3268
|
if (c.modelTypeName !== e.modelType) {
|
|
3269
3269
|
const f = `Model type mismatch: expected ${e.modelType}, found ${c.modelTypeName}`;
|
|
3270
|
-
if (
|
|
3270
|
+
if (g.error(
|
|
3271
3271
|
`Failed to resolve dependency for model ${t.modelId}:
|
|
3272
3272
|
- Dependency Type: ${e.modelType}
|
|
3273
3273
|
- Dependency ID: ${r}
|
|
@@ -3277,14 +3277,14 @@ const nc = (t, e, s) => {
|
|
|
3277
3277
|
- Found Model Type: ${c.modelTypeName}
|
|
3278
3278
|
- Error: ${f}`
|
|
3279
3279
|
), n === ht.CONTINUE)
|
|
3280
|
-
return
|
|
3280
|
+
return g.warn(
|
|
3281
3281
|
`Model type mismatch (policy: CONTINUE) - Model ${t.modelId} will continue without dependency`
|
|
3282
3282
|
), { dependentModel: null, dataModelId: r, success: !1 };
|
|
3283
3283
|
throw new Error(
|
|
3284
3284
|
`Dependency resolution failed - Model ${t.modelId} cannot resolve dependency ${e.modelType} [${r}]: ${f}`
|
|
3285
3285
|
);
|
|
3286
3286
|
}
|
|
3287
|
-
return
|
|
3287
|
+
return g.debug(
|
|
3288
3288
|
`Found existing dependent model ${e.modelType} with id ${r}`
|
|
3289
3289
|
), {
|
|
3290
3290
|
dependentModel: { model: c, data: c.modelData },
|
|
@@ -3292,16 +3292,16 @@ const nc = (t, e, s) => {
|
|
|
3292
3292
|
success: !0
|
|
3293
3293
|
};
|
|
3294
3294
|
}
|
|
3295
|
-
if (
|
|
3295
|
+
if (g.debug(
|
|
3296
3296
|
`Model ${e.modelType} [${r}] does not exist. Applying resolution policy: ${n}`
|
|
3297
3297
|
), n === ht.CONTINUE)
|
|
3298
|
-
return
|
|
3298
|
+
return g.warn(
|
|
3299
3299
|
`Model ${e.modelType} [${r}] not found (policy: CONTINUE) - Model ${t.modelId} will continue without this dependency`
|
|
3300
3300
|
), { dependentModel: null, dataModelId: r, success: !1 };
|
|
3301
3301
|
const u = Object.keys(o).length > 0, d = a.class || a.create;
|
|
3302
3302
|
if (((p = d == null ? void 0 : d.prototype) == null ? void 0 : p[tn]) === !0 && !u) {
|
|
3303
3303
|
const f = `Model ${e.modelType} requires options but none were provided`;
|
|
3304
|
-
throw
|
|
3304
|
+
throw g.error(
|
|
3305
3305
|
`Failed to resolve dependency for model ${t.modelId}:
|
|
3306
3306
|
- Dependency Type: ${e.modelType}
|
|
3307
3307
|
- Dependency ID: ${r}
|
|
@@ -3321,12 +3321,12 @@ const nc = (t, e, s) => {
|
|
|
3321
3321
|
r,
|
|
3322
3322
|
o
|
|
3323
3323
|
);
|
|
3324
|
-
return
|
|
3324
|
+
return g.debug(
|
|
3325
3325
|
`Successfully created dependent model ${e.modelType} with id ${r}`
|
|
3326
3326
|
), { dependentModel: f, dataModelId: r, success: !0 };
|
|
3327
3327
|
} catch (f) {
|
|
3328
|
-
const
|
|
3329
|
-
throw
|
|
3328
|
+
const m = f instanceof Error ? f.message : String(f);
|
|
3329
|
+
throw g.error(
|
|
3330
3330
|
`Failed to create dependency for model ${t.modelId}:
|
|
3331
3331
|
- Dependency Type: ${e.modelType}
|
|
3332
3332
|
- Dependency ID: ${r}
|
|
@@ -3334,27 +3334,27 @@ const nc = (t, e, s) => {
|
|
|
3334
3334
|
- Parent Model: ${t.modelTypeName}
|
|
3335
3335
|
- Parent Model ID: ${t.modelId}
|
|
3336
3336
|
- Provided Options: ${JSON.stringify(o, null, 2)}
|
|
3337
|
-
- Error: ${
|
|
3337
|
+
- Error: ${m}`
|
|
3338
3338
|
), n === ht.FAIL ? new Error(
|
|
3339
|
-
`Dependency resolution failed (policy: FAIL) - Model ${t.modelId} cannot resolve dependency ${e.modelType} [${r}]: ${
|
|
3339
|
+
`Dependency resolution failed (policy: FAIL) - Model ${t.modelId} cannot resolve dependency ${e.modelType} [${r}]: ${m}`
|
|
3340
3340
|
) : f;
|
|
3341
3341
|
}
|
|
3342
3342
|
}, ff = (t, e = O.READY) => {
|
|
3343
3343
|
var n;
|
|
3344
3344
|
const s = ((n = t.modelData) == null ? void 0 : n[N]) || {};
|
|
3345
|
-
return Object.keys(s).length === 0 ? (
|
|
3345
|
+
return Object.keys(s).length === 0 ? (g.debug(`${t.modelId} has no dependencies. Returning`), []) : Object.keys(s).filter((o) => s[o].lifecycle === e).map((o) => {
|
|
3346
3346
|
const i = s[o], a = hf(t, i);
|
|
3347
3347
|
if (!a.success || !a.dependentModel)
|
|
3348
|
-
return
|
|
3348
|
+
return g.debug(
|
|
3349
3349
|
`Skipping dependency ${i.modelType} with id ${a.dataModelId} - resolution failed with CONTINUE policy`
|
|
3350
3350
|
), t.modelData[o] = void 0, null;
|
|
3351
3351
|
const { dependentModel: c, dataModelId: u } = a;
|
|
3352
|
-
t.modelData[o] = c.data,
|
|
3352
|
+
t.modelData[o] = c.data, g.debug(
|
|
3353
3353
|
`waiting for dependent model ${i.modelType} with id ${u} - waiting for WHENREADY`
|
|
3354
3354
|
);
|
|
3355
|
-
const d = async (f,
|
|
3355
|
+
const d = async (f, m, y) => {
|
|
3356
3356
|
var v;
|
|
3357
|
-
await ((v = f.whenReady) == null ? void 0 : v.call(f)),
|
|
3357
|
+
await ((v = f.whenReady) == null ? void 0 : v.call(f)), g.debug(`dependent model ${m} with id ${y} - READY`);
|
|
3358
3358
|
}, { promise: h, cancel: p } = nc(
|
|
3359
3359
|
sc,
|
|
3360
3360
|
t,
|
|
@@ -3364,7 +3364,7 @@ const nc = (t, e, s) => {
|
|
|
3364
3364
|
d(c.model, i.modelType, u).then(() => {
|
|
3365
3365
|
p();
|
|
3366
3366
|
}).catch((f) => {
|
|
3367
|
-
const
|
|
3367
|
+
const m = Bt(f, {
|
|
3368
3368
|
modelType: i.modelType,
|
|
3369
3369
|
modelId: u,
|
|
3370
3370
|
parentModel: {
|
|
@@ -3374,25 +3374,25 @@ const nc = (t, e, s) => {
|
|
|
3374
3374
|
lifecycle: e,
|
|
3375
3375
|
operation: "dependency whenReady()"
|
|
3376
3376
|
});
|
|
3377
|
-
throw
|
|
3377
|
+
throw g.error(m.toDetailedString()), p(), m;
|
|
3378
3378
|
}),
|
|
3379
3379
|
h
|
|
3380
3380
|
]);
|
|
3381
3381
|
}).filter((o) => !!o);
|
|
3382
3382
|
}, pf = async (t, e, s, r) => {
|
|
3383
|
-
if (
|
|
3384
|
-
|
|
3383
|
+
if (g.debug(`Execute lifecycle with ${e.length} models`), e.length === 0) {
|
|
3384
|
+
g.debug(`${t.modelId} has no children. Returning`);
|
|
3385
3385
|
return;
|
|
3386
3386
|
}
|
|
3387
3387
|
if (!s) {
|
|
3388
|
-
|
|
3388
|
+
g.error(
|
|
3389
3389
|
`${t.modelId} is not transitioning with a valid target ${s}`
|
|
3390
3390
|
);
|
|
3391
3391
|
return;
|
|
3392
3392
|
}
|
|
3393
3393
|
const n = e.map((a) => {
|
|
3394
3394
|
let c;
|
|
3395
|
-
return An[s] && a ? c = An[s](a) : (a ||
|
|
3395
|
+
return An[s] && a ? c = An[s](a) : (a || g.error("model is undefined. This shouldn't happen"), An[s] || g.error(
|
|
3396
3396
|
`There is no promise in the Transition Map for ${s}`
|
|
3397
3397
|
)), {
|
|
3398
3398
|
promise: c,
|
|
@@ -3401,7 +3401,7 @@ const nc = (t, e, s) => {
|
|
|
3401
3401
|
type: a == null ? void 0 : a.modelTypeName,
|
|
3402
3402
|
status: a == null ? void 0 : a.status
|
|
3403
3403
|
};
|
|
3404
|
-
}).filter((a) => a.promise ? a.model ? !0 : (
|
|
3404
|
+
}).filter((a) => a.promise ? a.model ? !0 : (g.error(`No model found ${a.modelId}`), !1) : (g.error(`No promise found ${a.modelId}`), !1)), o = await Promise.allSettled(
|
|
3405
3405
|
n.map((a) => {
|
|
3406
3406
|
var d;
|
|
3407
3407
|
if (!a.model || !a.status)
|
|
@@ -3425,7 +3425,7 @@ const nc = (t, e, s) => {
|
|
|
3425
3425
|
lifecycle: r,
|
|
3426
3426
|
operation: `transition to ${s}`
|
|
3427
3427
|
});
|
|
3428
|
-
throw
|
|
3428
|
+
throw g.error(p.toDetailedString()), u(), p;
|
|
3429
3429
|
}),
|
|
3430
3430
|
c
|
|
3431
3431
|
]);
|
|
@@ -3464,9 +3464,9 @@ const nc = (t, e, s) => {
|
|
|
3464
3464
|
const r = (await Promise.allSettled(
|
|
3465
3465
|
ff(t, e)
|
|
3466
3466
|
)).filter((n) => n.status === "rejected");
|
|
3467
|
-
r.length && (
|
|
3467
|
+
r.length && (g.error(
|
|
3468
3468
|
`There were ${r.length} failed dependent models on ${e}`
|
|
3469
|
-
),
|
|
3469
|
+
), g.error(r));
|
|
3470
3470
|
};
|
|
3471
3471
|
function mf(t) {
|
|
3472
3472
|
const e = `KosModel(${t.modelTypeName}:${t.modelId})`;
|
|
@@ -3691,7 +3691,7 @@ class wf {
|
|
|
3691
3691
|
this.disposers = [];
|
|
3692
3692
|
}
|
|
3693
3693
|
}
|
|
3694
|
-
const Ef =
|
|
3694
|
+
const Ef = g.createLogger({ name: "model-active-machine" }), Mf = (t) => {
|
|
3695
3695
|
const e = _s(b.INACTIVE, {
|
|
3696
3696
|
[b.FAILED]: X(
|
|
3697
3697
|
x(k.GO_ACTIVE, b.ACTIVATING)
|
|
@@ -3741,7 +3741,7 @@ const Ef = m.createLogger({ name: "model-active-machine" }), Mf = (t) => {
|
|
|
3741
3741
|
e,
|
|
3742
3742
|
(r) => Ef.debug(r.machine.current)
|
|
3743
3743
|
), machine: e };
|
|
3744
|
-
}, fi =
|
|
3744
|
+
}, fi = g.createLogger({ name: "model-online-machine" }), _f = (t) => {
|
|
3745
3745
|
const e = _s(b.OFFLINE, {
|
|
3746
3746
|
[b.ONLINE]: X(
|
|
3747
3747
|
x(
|
|
@@ -3792,7 +3792,7 @@ const Ef = m.createLogger({ name: "model-active-machine" }), Mf = (t) => {
|
|
|
3792
3792
|
"error",
|
|
3793
3793
|
b.FAILED,
|
|
3794
3794
|
V(() => {
|
|
3795
|
-
|
|
3795
|
+
g.error(
|
|
3796
3796
|
`Model ${t.modelId} - ${t.modelTypeName} failed to initialize. Transitioning to FAILED state.`
|
|
3797
3797
|
), t.status = b.FAILED;
|
|
3798
3798
|
})
|
|
@@ -3897,7 +3897,7 @@ const Ef = m.createLogger({ name: "model-active-machine" }), Mf = (t) => {
|
|
|
3897
3897
|
[b.UNLOADED]: X(),
|
|
3898
3898
|
[b.FAILED]: X()
|
|
3899
3899
|
});
|
|
3900
|
-
}, $f =
|
|
3900
|
+
}, $f = g.createLogger({ name: "kos-model-lifecycle" }), Sf = (t) => ({ service: Ts(
|
|
3901
3901
|
Tf(t),
|
|
3902
3902
|
(s) => $f.debug(
|
|
3903
3903
|
`state machine for model ${t.modelId}: ${s.machine.current});`
|
|
@@ -4508,7 +4508,7 @@ const Bf = ({
|
|
|
4508
4508
|
Hf(e),
|
|
4509
4509
|
typeof s == "string" ? s : JSON.stringify(s)
|
|
4510
4510
|
), n = T.getInstance().transport.socket;
|
|
4511
|
-
n ? (
|
|
4511
|
+
n ? (g.debug("Sending message", r), n.socket.send(r)) : g.error("socket transport is not initialized");
|
|
4512
4512
|
}, qf = ({
|
|
4513
4513
|
path: t,
|
|
4514
4514
|
responseId: e,
|
|
@@ -4529,13 +4529,13 @@ const Bf = ({
|
|
|
4529
4529
|
Bf(e),
|
|
4530
4530
|
JSON.stringify(s)
|
|
4531
4531
|
), n = T.getInstance().transport.socket;
|
|
4532
|
-
n ? n.socket.send(r) :
|
|
4532
|
+
n ? n.socket.send(r) : g.error("socket transport is not initialized");
|
|
4533
4533
|
}, JM = (t, e) => {
|
|
4534
4534
|
const s = e.responseId ? { status: e.status, data: t } : t, r = $t(
|
|
4535
4535
|
qf(e),
|
|
4536
4536
|
JSON.stringify(s)
|
|
4537
4537
|
), n = T.getInstance().transport.socket;
|
|
4538
|
-
n ? n.socket.send(r) :
|
|
4538
|
+
n ? n.socket.send(r) : g.error("socket transport is not initialized");
|
|
4539
4539
|
}, zf = ({
|
|
4540
4540
|
topic: t
|
|
4541
4541
|
}) => {
|
|
@@ -4582,7 +4582,7 @@ const Bf = ({
|
|
|
4582
4582
|
zf(e),
|
|
4583
4583
|
JSON.stringify(s)
|
|
4584
4584
|
), n = T.getInstance().transport.socket;
|
|
4585
|
-
n ? n.socket.send(r) :
|
|
4585
|
+
n ? n.socket.send(r) : g.error("socket transport is not initialized");
|
|
4586
4586
|
}, Gf = ({
|
|
4587
4587
|
msg: t,
|
|
4588
4588
|
options: e
|
|
@@ -4591,7 +4591,7 @@ const Bf = ({
|
|
|
4591
4591
|
Kf(e),
|
|
4592
4592
|
JSON.stringify(s)
|
|
4593
4593
|
), n = T.getInstance().transport.socket;
|
|
4594
|
-
n ? n.socket.send(r) :
|
|
4594
|
+
n ? n.socket.send(r) : g.error("socket transport is not initialized");
|
|
4595
4595
|
}, Yf = ({
|
|
4596
4596
|
msg: t,
|
|
4597
4597
|
options: e
|
|
@@ -4600,14 +4600,14 @@ const Bf = ({
|
|
|
4600
4600
|
Vf(e),
|
|
4601
4601
|
JSON.stringify(s)
|
|
4602
4602
|
), n = T.getInstance().transport.socket;
|
|
4603
|
-
n ? n.socket.send(r) :
|
|
4603
|
+
n ? n.socket.send(r) : g.error("socket transport is not initialized");
|
|
4604
4604
|
}, pi = (t, e) => {
|
|
4605
4605
|
try {
|
|
4606
4606
|
return e ? t.body ?? t : JSON.parse(t.body);
|
|
4607
4607
|
} catch {
|
|
4608
4608
|
return t.body || t;
|
|
4609
4609
|
}
|
|
4610
|
-
}, at =
|
|
4610
|
+
}, at = g.createLogger({ name: "kos-fetch" }), Wf = process.env.KOS_WS_TIMEOUT ? parseInt(process.env.KOS_WS_TIMEOUT) : 3e4, Qf = () => new Promise((t) => {
|
|
4611
4611
|
setTimeout(() => {
|
|
4612
4612
|
t(!0);
|
|
4613
4613
|
}, 0);
|
|
@@ -4652,17 +4652,17 @@ const Bf = ({
|
|
|
4652
4652
|
}),
|
|
4653
4653
|
d.data
|
|
4654
4654
|
);
|
|
4655
|
-
return new Promise((f,
|
|
4655
|
+
return new Promise((f, m) => {
|
|
4656
4656
|
let y = null;
|
|
4657
4657
|
if (u.aborted) {
|
|
4658
4658
|
const D = u.reason;
|
|
4659
|
-
(D == null ? void 0 : D.name) === "TimeoutError" ? at.error(`Timeout occurred - url: ${t}`) : at.debug(`Request aborted - url: ${t}`),
|
|
4659
|
+
(D == null ? void 0 : D.name) === "TimeoutError" ? at.error(`Timeout occurred - url: ${t}`) : at.debug(`Request aborted - url: ${t}`), m(D || new DOMException("Aborted", "AbortError"));
|
|
4660
4660
|
return;
|
|
4661
4661
|
}
|
|
4662
4662
|
const v = () => {
|
|
4663
4663
|
y && y();
|
|
4664
4664
|
const D = u.reason;
|
|
4665
|
-
(D == null ? void 0 : D.name) === "TimeoutError" ? at.error(`Timeout occurred - url: ${t}`) : at.debug(`Request aborted - url: ${t}`),
|
|
4665
|
+
(D == null ? void 0 : D.name) === "TimeoutError" ? at.error(`Timeout occurred - url: ${t}`) : at.debug(`Request aborted - url: ${t}`), m(D || new DOMException("Aborted", "AbortError"));
|
|
4666
4666
|
};
|
|
4667
4667
|
u.addEventListener("abort", v, { once: !0 });
|
|
4668
4668
|
const _ = I(r, (D) => {
|
|
@@ -4741,7 +4741,7 @@ if (process.env.KOS_MOCK_FETCH === "true") {
|
|
|
4741
4741
|
const t = process.env.KOS_PORT || "9999";
|
|
4742
4742
|
Ue = fetch, we = `http://localhost:${t}`;
|
|
4743
4743
|
}
|
|
4744
|
-
const tp = () => ({ isMock: !1, URL: we }), Js =
|
|
4744
|
+
const tp = () => ({ isMock: !1, URL: we }), Js = g.createLogger({ name: "kos-service-request" }), gi = "errUnknown";
|
|
4745
4745
|
async function er(t, e, s, r, n) {
|
|
4746
4746
|
const o = r != null && r.path ? Object.keys(r.path).reduce(
|
|
4747
4747
|
(u, d) => String(u).replace(`{${d}}`, r == null ? void 0 : r.path[d]),
|
|
@@ -4788,7 +4788,7 @@ function ot() {
|
|
|
4788
4788
|
const je = ot(), $o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4789
4789
|
__proto__: null,
|
|
4790
4790
|
default: je
|
|
4791
|
-
}, Symbol.toStringTag, { value: "Module" })), ut =
|
|
4791
|
+
}, Symbol.toStringTag, { value: "Module" })), ut = g.createLogger({
|
|
4792
4792
|
name: "kos-service-request-manager",
|
|
4793
4793
|
group: "Model"
|
|
4794
4794
|
});
|
|
@@ -5417,7 +5417,7 @@ const Ie = class Ie {
|
|
|
5417
5417
|
), this.socket.onmessage = this.onMessage.bind(this), this.socket.onopen = this.onOpen.bind(this), this.socket.onclose = this.onClose.bind(this), this.socket.onerror = this.onError.bind(this), this.oldSend = this.socket.send, this.connectionEstablished = !1, I("/mock/msg/receive", (c) => {
|
|
5418
5418
|
var u, d;
|
|
5419
5419
|
if (c != null && c.body) {
|
|
5420
|
-
|
|
5420
|
+
g.wsReceive(c == null ? void 0 : c.body);
|
|
5421
5421
|
const h = {
|
|
5422
5422
|
data: c.body
|
|
5423
5423
|
};
|
|
@@ -5436,9 +5436,9 @@ const Ie = class Ie {
|
|
|
5436
5436
|
}
|
|
5437
5437
|
onMessage(e) {
|
|
5438
5438
|
try {
|
|
5439
|
-
|
|
5439
|
+
g.debug("webSocketTransport: onMessage received");
|
|
5440
5440
|
const { headers: s, body: r } = this.processMessageEvent(e);
|
|
5441
|
-
|
|
5441
|
+
g.wsReceive(e.data);
|
|
5442
5442
|
const n = s.subscription || s[this.RESPONSE_ID_HEADER] || s.topic || s.type;
|
|
5443
5443
|
if (n) {
|
|
5444
5444
|
let o = r, i = s;
|
|
@@ -5452,26 +5452,26 @@ const Ie = class Ie {
|
|
|
5452
5452
|
H(n, o, i);
|
|
5453
5453
|
}
|
|
5454
5454
|
} catch (s) {
|
|
5455
|
-
|
|
5455
|
+
g.error("onMessage exception", s.message, s.stack);
|
|
5456
5456
|
}
|
|
5457
5457
|
}
|
|
5458
5458
|
onOpen(e) {
|
|
5459
|
-
|
|
5459
|
+
g.info("websocket connection opened"), this.reconnectAttempts = 0, this.socket = e.currentTarget, Z(() => {
|
|
5460
5460
|
var s;
|
|
5461
5461
|
this.connectionEstablished = !0, this.alias && this.socket.send(`type:kos.addr.alias
|
|
5462
5462
|
alias:${this.alias}
|
|
5463
5463
|
|
|
5464
|
-
`),
|
|
5464
|
+
`), g.debug(
|
|
5465
5465
|
`sending ${this.offlineMessages.length} offline FOS messages`
|
|
5466
5466
|
), this.offlineMessages.forEach((r) => {
|
|
5467
5467
|
var n;
|
|
5468
|
-
|
|
5468
|
+
g.debug(`sending offline message ${r.msg}`), (n = this.socket) == null || n.send(r.msg);
|
|
5469
5469
|
}), this.offlineMessages = [], (s = this.onConnectionEstablished) == null || s.call(this);
|
|
5470
5470
|
});
|
|
5471
5471
|
}
|
|
5472
5472
|
onClose(e) {
|
|
5473
5473
|
const { code: s, reason: r, wasClean: n } = e;
|
|
5474
|
-
|
|
5474
|
+
g.warn(
|
|
5475
5475
|
`WebSocket closed: code=${s}, reason=${r || "none"}, wasClean=${n}`
|
|
5476
5476
|
), Z(() => {
|
|
5477
5477
|
this.connectionEstablished = !1;
|
|
@@ -5480,23 +5480,23 @@ alias:${this.alias}
|
|
|
5480
5480
|
if (this.onConnectionLost)
|
|
5481
5481
|
if (o && this.reconnectAttempts < Ie.MAX_RECONNECT_ATTEMPTS) {
|
|
5482
5482
|
const i = this.calculateBackoffDelay();
|
|
5483
|
-
|
|
5483
|
+
g.debug(
|
|
5484
5484
|
`Reconnecting in ${i}ms (attempt ${this.reconnectAttempts + 1}/${Ie.MAX_RECONNECT_ATTEMPTS})`
|
|
5485
5485
|
), setTimeout(() => {
|
|
5486
5486
|
var a;
|
|
5487
5487
|
this.reconnectAttempts++, (a = this.onConnectionLost) == null || a.call(this);
|
|
5488
5488
|
}, i);
|
|
5489
5489
|
} else
|
|
5490
|
-
this.reconnectAttempts >= Ie.MAX_RECONNECT_ATTEMPTS ? (
|
|
5490
|
+
this.reconnectAttempts >= Ie.MAX_RECONNECT_ATTEMPTS ? (g.error(
|
|
5491
5491
|
`Max reconnection attempts (${Ie.MAX_RECONNECT_ATTEMPTS}) reached. Giving up.`
|
|
5492
5492
|
), H("websocket.max_retries_exceeded", {
|
|
5493
5493
|
attempts: this.reconnectAttempts
|
|
5494
|
-
})) :
|
|
5494
|
+
})) : g.info(
|
|
5495
5495
|
`Not reconnecting due to close code ${s} (intentional close or configuration error)`
|
|
5496
5496
|
);
|
|
5497
5497
|
}
|
|
5498
5498
|
onError(e) {
|
|
5499
|
-
|
|
5499
|
+
g.error("websocket error: ", e), H("websocket.error", { event: e });
|
|
5500
5500
|
}
|
|
5501
5501
|
/**
|
|
5502
5502
|
* Determines whether to attempt reconnection based on WebSocket close code.
|
|
@@ -5553,7 +5553,7 @@ alias:${this.alias}
|
|
|
5553
5553
|
}
|
|
5554
5554
|
send(e) {
|
|
5555
5555
|
var s, r;
|
|
5556
|
-
if (
|
|
5556
|
+
if (g.wsSend(e), window.kosLogEvents) {
|
|
5557
5557
|
const { headers: n, body: o } = yi(String(e));
|
|
5558
5558
|
H(Zr.SEND, { headers: n, body: o });
|
|
5559
5559
|
}
|
|
@@ -5689,9 +5689,9 @@ class bi {
|
|
|
5689
5689
|
onConnectionEstablished: i,
|
|
5690
5690
|
onConnectionLost: a
|
|
5691
5691
|
}) {
|
|
5692
|
-
return
|
|
5692
|
+
return g.debug("initializing websocket connection"), g.warn(
|
|
5693
5693
|
`kosWindowWebsocketOpen: ${globalThis.kosWindowWebsocketOpen ? "true" : "false"}`
|
|
5694
|
-
),
|
|
5694
|
+
), g.warn(`fos: ${n ? "true" : "false"}`), window.kosMockWs || globalThis.kosWindowWebsocketOpen && !n ? (g.warn("Using bridged message transport"), new yp({
|
|
5695
5695
|
host: e,
|
|
5696
5696
|
port: s,
|
|
5697
5697
|
protocol: r,
|
|
@@ -5766,7 +5766,7 @@ class Is {
|
|
|
5766
5766
|
}
|
|
5767
5767
|
init() {
|
|
5768
5768
|
var e, s;
|
|
5769
|
-
if (
|
|
5769
|
+
if (g.warn(`Initializing WebSocketTransport on ${this.host}:${this.port}`), this.useFosTransport && (this.fosSocket = bi.build({
|
|
5770
5770
|
host: this.host,
|
|
5771
5771
|
port: this.fosPort || 9854,
|
|
5772
5772
|
protocol: this.protocol,
|
|
@@ -5791,7 +5791,7 @@ class Is {
|
|
|
5791
5791
|
return this;
|
|
5792
5792
|
}
|
|
5793
5793
|
_sendSubscriptionMessage(e, s, r = !1, n = !1, o) {
|
|
5794
|
-
var p, f,
|
|
5794
|
+
var p, f, m, y;
|
|
5795
5795
|
ct.debug(`${s} to topic ${e}`);
|
|
5796
5796
|
const i = $e(), a = i == null ? void 0 : i.connId, c = o ?? a ?? ((p = window == null ? void 0 : window.kosBridge) == null ? void 0 : p.call(window, "connId"));
|
|
5797
5797
|
ct.debug(`subscribing with connId ${c}`);
|
|
@@ -5802,7 +5802,7 @@ ${u}topics:${e}
|
|
|
5802
5802
|
` : `${u}type:kos.broker.${s}
|
|
5803
5803
|
|
|
5804
5804
|
["${e}"]`;
|
|
5805
|
-
if (r ? (f = this.fosSocket) == null ? void 0 : f.connectionEstablished : (
|
|
5805
|
+
if (r ? (f = this.fosSocket) == null ? void 0 : f.connectionEstablished : (m = this.socket) == null ? void 0 : m.connectionEstablished) {
|
|
5806
5806
|
const v = r ? this.fosSocket : this.socket;
|
|
5807
5807
|
(y = v == null ? void 0 : v.socket) == null || y.send(d);
|
|
5808
5808
|
} else {
|
|
@@ -5973,42 +5973,41 @@ class Mp {
|
|
|
5973
5973
|
}
|
|
5974
5974
|
createHandler(e, s) {
|
|
5975
5975
|
return async (r) => {
|
|
5976
|
-
var n, o;
|
|
5977
5976
|
try {
|
|
5978
|
-
const
|
|
5977
|
+
const n = this.extractWildcardCapture(
|
|
5979
5978
|
e,
|
|
5980
5979
|
r,
|
|
5981
5980
|
s
|
|
5982
|
-
),
|
|
5983
|
-
if (!this.model.isReady() || !
|
|
5984
|
-
|
|
5981
|
+
), o = this.isBaselineReady(e);
|
|
5982
|
+
if (!this.model.isReady() || !o) {
|
|
5983
|
+
o ? this.log.warn(
|
|
5985
5984
|
`Model ${this.modelId} not ready. Queuing message for ${e}`
|
|
5986
5985
|
) : this.log.warn(
|
|
5987
5986
|
`Baseline not ready for ${e}. Queuing message.`
|
|
5988
5987
|
);
|
|
5989
|
-
const
|
|
5990
|
-
const
|
|
5991
|
-
if (
|
|
5988
|
+
const i = () => {
|
|
5989
|
+
const a = pi(r, s.skipParse), c = s.transform(a);
|
|
5990
|
+
if (s.condition(c, this.modelData, r))
|
|
5992
5991
|
return this.callHandlerWithWildcard(
|
|
5993
5992
|
s,
|
|
5994
|
-
|
|
5995
|
-
|
|
5993
|
+
c,
|
|
5994
|
+
n,
|
|
5996
5995
|
r
|
|
5997
5996
|
);
|
|
5998
5997
|
};
|
|
5999
|
-
this.offlineQueue.enqueue(
|
|
5998
|
+
this.offlineQueue.enqueue(i, e, r);
|
|
6000
5999
|
} else {
|
|
6001
|
-
const
|
|
6002
|
-
if (
|
|
6000
|
+
const i = pi(r, s.skipParse), a = s.transform(i);
|
|
6001
|
+
if (s.condition(a, this.modelData, r))
|
|
6003
6002
|
return this.callHandlerWithWildcard(
|
|
6004
6003
|
s,
|
|
6005
|
-
|
|
6006
|
-
|
|
6004
|
+
a,
|
|
6005
|
+
n,
|
|
6007
6006
|
r
|
|
6008
6007
|
);
|
|
6009
6008
|
}
|
|
6010
|
-
} catch (
|
|
6011
|
-
this.log.error(`Error handling subscription for ${e}`,
|
|
6009
|
+
} catch (n) {
|
|
6010
|
+
this.log.error(`Error handling subscription for ${e}`, n);
|
|
6012
6011
|
}
|
|
6013
6012
|
};
|
|
6014
6013
|
}
|
|
@@ -6853,7 +6852,7 @@ class Pp {
|
|
|
6853
6852
|
this.companionManager.clear();
|
|
6854
6853
|
}
|
|
6855
6854
|
}
|
|
6856
|
-
const Pn =
|
|
6855
|
+
const Pn = g.createLogger({ name: "kos-model-instantiator" });
|
|
6857
6856
|
class Rp {
|
|
6858
6857
|
constructor(e, s) {
|
|
6859
6858
|
l(this, "companionInstantiator");
|
|
@@ -6983,7 +6982,7 @@ let kp = class {
|
|
|
6983
6982
|
return zs(e);
|
|
6984
6983
|
}
|
|
6985
6984
|
};
|
|
6986
|
-
const Lp = 10, Ei =
|
|
6985
|
+
const Lp = 10, Ei = g.createLogger({ name: "kos-model-manager" });
|
|
6987
6986
|
class Fp {
|
|
6988
6987
|
constructor() {
|
|
6989
6988
|
l(this, "cache");
|
|
@@ -7403,7 +7402,7 @@ const Np = (t) => {
|
|
|
7403
7402
|
r,
|
|
7404
7403
|
(o) => C.debug(o.machine.current)
|
|
7405
7404
|
), online: s };
|
|
7406
|
-
}, Q =
|
|
7405
|
+
}, Q = g.createLogger({ name: "kos-core" }), Up = () => {
|
|
7407
7406
|
const t = $e(), e = t == null ? void 0 : t.alias, s = process.env.KOS_CONNECTION_ALIAS;
|
|
7408
7407
|
return e || s || void 0;
|
|
7409
7408
|
}, jp = () => {
|
|
@@ -7434,9 +7433,9 @@ const Np = (t) => {
|
|
|
7434
7433
|
let s;
|
|
7435
7434
|
return { promise: new Promise((o, i) => {
|
|
7436
7435
|
s = setTimeout(() => {
|
|
7437
|
-
e ?
|
|
7436
|
+
e ? g.error(
|
|
7438
7437
|
`Model ${e.modelId} - ${e.modelTypeName} preloading - timed out after ${t}ms`
|
|
7439
|
-
) :
|
|
7438
|
+
) : g.error(`KOS Core preloading timed out after ${t}ms`), i(
|
|
7440
7439
|
new Error(
|
|
7441
7440
|
`Model ${e == null ? void 0 : e.modelId} - ${e == null ? void 0 : e.modelTypeName} - timed out after ${t}ms`
|
|
7442
7441
|
)
|
|
@@ -7611,8 +7610,8 @@ class T {
|
|
|
7611
7610
|
if (typeof h == "string") {
|
|
7612
7611
|
const f = e.models[h];
|
|
7613
7612
|
if (f != null && f.class) {
|
|
7614
|
-
const
|
|
7615
|
-
p =
|
|
7613
|
+
const m = f.class.prototype[vt];
|
|
7614
|
+
p = m == null ? void 0 : m.lifecycle;
|
|
7616
7615
|
}
|
|
7617
7616
|
}
|
|
7618
7617
|
e.companionModels[u].push({ type: h, lifecycle: p });
|
|
@@ -7628,7 +7627,7 @@ class T {
|
|
|
7628
7627
|
}
|
|
7629
7628
|
}
|
|
7630
7629
|
l(T, "_instance");
|
|
7631
|
-
const Kp =
|
|
7630
|
+
const Kp = g.createLogger({
|
|
7632
7631
|
name: "kos-model-visitor",
|
|
7633
7632
|
group: "kos-ui-core"
|
|
7634
7633
|
});
|
|
@@ -7889,7 +7888,7 @@ qs(eg, {
|
|
|
7889
7888
|
const s = sr.get(t);
|
|
7890
7889
|
if (!s)
|
|
7891
7890
|
return [];
|
|
7892
|
-
const r = s.map((a) => a(e)), o = (await Promise.allSettled(r)).map((a) => a.status === "fulfilled" ? a.value : (
|
|
7891
|
+
const r = s.map((a) => a(e)), o = (await Promise.allSettled(r)).map((a) => a.status === "fulfilled" ? a.value : (g.info(`Feature flag resolver ${t} failed: ${a.reason}`), [])).flat(), i = Array.from(new Set(o)).reduce(
|
|
7893
7892
|
(a, c) => (a[c] = !0, a),
|
|
7894
7893
|
{}
|
|
7895
7894
|
);
|
|
@@ -8010,10 +8009,10 @@ const h_ = async (t, e) => {
|
|
|
8010
8009
|
});
|
|
8011
8010
|
}, h), f = () => {
|
|
8012
8011
|
window.clearInterval(p), window.clearInterval(d), c();
|
|
8013
|
-
},
|
|
8014
|
-
f(), s && s(), i.signal.removeEventListener("abort",
|
|
8012
|
+
}, m = () => {
|
|
8013
|
+
f(), s && s(), i.signal.removeEventListener("abort", m);
|
|
8015
8014
|
};
|
|
8016
|
-
return i.signal.addEventListener("abort",
|
|
8015
|
+
return i.signal.addEventListener("abort", m), { cleanUpHeartbeat: f };
|
|
8017
8016
|
}, cg = (...t) => (e) => t.reduce((s, r) => r(s), e), lg = {
|
|
8018
8017
|
maxAttempts: 5,
|
|
8019
8018
|
baseDelayMs: 100,
|
|
@@ -8027,14 +8026,14 @@ async function m_(t, e) {
|
|
|
8027
8026
|
try {
|
|
8028
8027
|
return await t();
|
|
8029
8028
|
} catch (c) {
|
|
8030
|
-
if (
|
|
8029
|
+
if (g.error(`Attempt ${s} failed: ${c}`), s < n)
|
|
8031
8030
|
a = o * Math.pow(i, s), await new Promise((u) => setTimeout(u, a)), s++;
|
|
8032
8031
|
else
|
|
8033
8032
|
throw c;
|
|
8034
8033
|
}
|
|
8035
8034
|
throw new Error("All attempts failed");
|
|
8036
8035
|
}
|
|
8037
|
-
const ug =
|
|
8036
|
+
const ug = g.createLogger({ name: "kos-service-request" }), Ee = (t) => ({ isMock: !1, URL: we }), dg = (t, e, s) => async ({
|
|
8038
8037
|
id: r,
|
|
8039
8038
|
tracker: n,
|
|
8040
8039
|
urlOverride: o,
|
|
@@ -8059,20 +8058,20 @@ const ug = m.createLogger({ name: "kos-service-request" }), Ee = (t) => ({ isMoc
|
|
|
8059
8058
|
destinationAddress: p
|
|
8060
8059
|
});
|
|
8061
8060
|
try {
|
|
8062
|
-
const
|
|
8063
|
-
if (!
|
|
8061
|
+
const m = await s(o || `${e}/${r}`, f);
|
|
8062
|
+
if (!m.ok)
|
|
8064
8063
|
throw Error(
|
|
8065
|
-
`There was a problem deleting the model; returned status ${
|
|
8064
|
+
`There was a problem deleting the model; returned status ${m.status}`
|
|
8066
8065
|
);
|
|
8067
|
-
return await
|
|
8068
|
-
} catch (
|
|
8069
|
-
if (
|
|
8070
|
-
if (
|
|
8066
|
+
return await m.json() ?? void 0;
|
|
8067
|
+
} catch (m) {
|
|
8068
|
+
if (m instanceof DOMException) {
|
|
8069
|
+
if (m.name === "TimeoutError")
|
|
8071
8070
|
throw new G("Request timed out while deleting model");
|
|
8072
|
-
if (
|
|
8071
|
+
if (m.name === "AbortError")
|
|
8073
8072
|
throw new G("Request was cancelled while deleting model");
|
|
8074
8073
|
}
|
|
8075
|
-
throw
|
|
8074
|
+
throw m;
|
|
8076
8075
|
}
|
|
8077
8076
|
}, rs = (t, {
|
|
8078
8077
|
ordered: e,
|
|
@@ -8154,27 +8153,27 @@ const ug = m.createLogger({ name: "kos-service-request" }), Ee = (t) => ({ isMoc
|
|
|
8154
8153
|
const f = r || e;
|
|
8155
8154
|
ug.debug(`resolvedUrl: ${f}`);
|
|
8156
8155
|
try {
|
|
8157
|
-
const
|
|
8158
|
-
if (!
|
|
8156
|
+
const m = await s(f, p);
|
|
8157
|
+
if (!m.ok) {
|
|
8159
8158
|
let v;
|
|
8160
8159
|
try {
|
|
8161
|
-
v = await
|
|
8160
|
+
v = await m.json();
|
|
8162
8161
|
} catch {
|
|
8163
8162
|
}
|
|
8164
8163
|
throw new G(
|
|
8165
|
-
`There was a problem retrieving the model; returned status ${
|
|
8164
|
+
`There was a problem retrieving the model; returned status ${m.status}`,
|
|
8166
8165
|
v ?? void 0
|
|
8167
8166
|
);
|
|
8168
8167
|
}
|
|
8169
|
-
return await
|
|
8170
|
-
} catch (
|
|
8171
|
-
if (
|
|
8172
|
-
if (
|
|
8168
|
+
return await m.json() ?? void 0;
|
|
8169
|
+
} catch (m) {
|
|
8170
|
+
if (m instanceof DOMException) {
|
|
8171
|
+
if (m.name === "TimeoutError")
|
|
8173
8172
|
throw new G("Request timed out while retrieving model");
|
|
8174
|
-
if (
|
|
8173
|
+
if (m.name === "AbortError")
|
|
8175
8174
|
throw new G("Request was cancelled while retrieving model");
|
|
8176
8175
|
}
|
|
8177
|
-
throw
|
|
8176
|
+
throw m;
|
|
8178
8177
|
}
|
|
8179
8178
|
}, pg = (t, e, s) => async ({
|
|
8180
8179
|
urlOverride: r,
|
|
@@ -8201,31 +8200,31 @@ const ug = m.createLogger({ name: "kos-service-request" }), Ee = (t) => ({ isMoc
|
|
|
8201
8200
|
});
|
|
8202
8201
|
const f = r || `${e}/${n}`;
|
|
8203
8202
|
try {
|
|
8204
|
-
const
|
|
8205
|
-
if (!
|
|
8203
|
+
const m = await s(f, p);
|
|
8204
|
+
if (!m.ok) {
|
|
8206
8205
|
let v;
|
|
8207
8206
|
try {
|
|
8208
|
-
v = await
|
|
8207
|
+
v = await m.json();
|
|
8209
8208
|
} catch {
|
|
8210
8209
|
}
|
|
8211
8210
|
throw new G(
|
|
8212
|
-
`There was a problem retrieving the model; returned status ${
|
|
8211
|
+
`There was a problem retrieving the model; returned status ${m.status}`,
|
|
8213
8212
|
v ?? void 0
|
|
8214
8213
|
);
|
|
8215
8214
|
}
|
|
8216
|
-
return await
|
|
8217
|
-
} catch (
|
|
8218
|
-
if (
|
|
8219
|
-
if (
|
|
8215
|
+
return await m.json() ?? void 0;
|
|
8216
|
+
} catch (m) {
|
|
8217
|
+
if (m instanceof DOMException) {
|
|
8218
|
+
if (m.name === "TimeoutError")
|
|
8220
8219
|
throw new G(
|
|
8221
8220
|
"Request timed out while retrieving model by ID"
|
|
8222
8221
|
);
|
|
8223
|
-
if (
|
|
8222
|
+
if (m.name === "AbortError")
|
|
8224
8223
|
throw new G(
|
|
8225
8224
|
"Request was cancelled while retrieving model by ID"
|
|
8226
8225
|
);
|
|
8227
8226
|
}
|
|
8228
|
-
throw
|
|
8227
|
+
throw m;
|
|
8229
8228
|
}
|
|
8230
8229
|
};
|
|
8231
8230
|
class G extends Error {
|
|
@@ -8261,27 +8260,27 @@ const Ii = (t, e, s) => async ({
|
|
|
8261
8260
|
destinationAddress: p
|
|
8262
8261
|
});
|
|
8263
8262
|
try {
|
|
8264
|
-
const
|
|
8265
|
-
if (!
|
|
8263
|
+
const m = await s(n || e, f);
|
|
8264
|
+
if (!m.ok) {
|
|
8266
8265
|
let v;
|
|
8267
8266
|
try {
|
|
8268
|
-
v = await
|
|
8267
|
+
v = await m.json();
|
|
8269
8268
|
} catch {
|
|
8270
8269
|
}
|
|
8271
8270
|
throw new G(
|
|
8272
|
-
`There was a problem sending the POST data; returned status ${
|
|
8271
|
+
`There was a problem sending the POST data; returned status ${m.status}`,
|
|
8273
8272
|
v ?? void 0
|
|
8274
8273
|
);
|
|
8275
8274
|
}
|
|
8276
|
-
return await
|
|
8277
|
-
} catch (
|
|
8278
|
-
if (
|
|
8279
|
-
if (
|
|
8275
|
+
return await m.json() ?? void 0;
|
|
8276
|
+
} catch (m) {
|
|
8277
|
+
if (m instanceof DOMException) {
|
|
8278
|
+
if (m.name === "TimeoutError")
|
|
8280
8279
|
throw new G("Request timed out while adding model");
|
|
8281
|
-
if (
|
|
8280
|
+
if (m.name === "AbortError")
|
|
8282
8281
|
throw new G("Request was cancelled while adding model");
|
|
8283
8282
|
}
|
|
8284
|
-
throw
|
|
8283
|
+
throw m;
|
|
8285
8284
|
}
|
|
8286
8285
|
}, Oi = (t = "POST", e, s, r) => async ({
|
|
8287
8286
|
// Reqeust should be Request = unknown...
|
|
@@ -8296,10 +8295,10 @@ const Ii = (t, e, s) => async ({
|
|
|
8296
8295
|
signal: p,
|
|
8297
8296
|
destinationAddress: f
|
|
8298
8297
|
}) => {
|
|
8299
|
-
const
|
|
8298
|
+
const m = {
|
|
8300
8299
|
method: t
|
|
8301
8300
|
};
|
|
8302
|
-
n && (
|
|
8301
|
+
n && (m.body = JSON.stringify(n)), e && (m.destinationAddress = e), rs(m, {
|
|
8303
8302
|
timeout: h,
|
|
8304
8303
|
ordered: a,
|
|
8305
8304
|
studio: c,
|
|
@@ -8309,7 +8308,7 @@ const Ii = (t, e, s) => async ({
|
|
|
8309
8308
|
destinationAddress: f
|
|
8310
8309
|
});
|
|
8311
8310
|
try {
|
|
8312
|
-
const y = await r(i || `${s}/${o}`,
|
|
8311
|
+
const y = await r(i || `${s}/${o}`, m);
|
|
8313
8312
|
if (!y.ok) {
|
|
8314
8313
|
let _;
|
|
8315
8314
|
try {
|
|
@@ -8586,7 +8585,7 @@ const J = {
|
|
|
8586
8585
|
rootContext: () => Me.get("root")
|
|
8587
8586
|
};
|
|
8588
8587
|
J.createContext("root");
|
|
8589
|
-
const $_ = (t) => J.getContext(t.id), lt =
|
|
8588
|
+
const $_ = (t) => J.getContext(t.id), lt = g.createLogger({ name: "kos-data-container" });
|
|
8590
8589
|
class gc {
|
|
8591
8590
|
constructor(e) {
|
|
8592
8591
|
l(this, "_data");
|
|
@@ -9056,7 +9055,7 @@ class vg {
|
|
|
9056
9055
|
}, {}) : {};
|
|
9057
9056
|
}
|
|
9058
9057
|
}
|
|
9059
|
-
const mc =
|
|
9058
|
+
const mc = g.createLogger({ name: "intent-service" }), O_ = (t) => {
|
|
9060
9059
|
mo(`/kos/intent/${t.type}`) ? H(`/kos/intent/${t.type}`, t.options, {
|
|
9061
9060
|
"kos.intent.type": t.type
|
|
9062
9061
|
}) : mc.info(`No subscribers for intent ${t.type}. Intent not sent.`);
|
|
@@ -9077,7 +9076,7 @@ const mc = m.createLogger({ name: "intent-service" }), O_ = (t) => {
|
|
|
9077
9076
|
});
|
|
9078
9077
|
} else
|
|
9079
9078
|
mc.info(`No subscribers for intent ${t.type}. Intent not sent.`), e([null, { body: void 0, payload: void 0 }]);
|
|
9080
|
-
}), He =
|
|
9079
|
+
}), He = g.createLogger({ name: "app-startup-service" });
|
|
9081
9080
|
async function wg(t, e = {}) {
|
|
9082
9081
|
const {
|
|
9083
9082
|
timeout: s = 3e4,
|
|
@@ -9155,7 +9154,7 @@ async function A_() {
|
|
|
9155
9154
|
}
|
|
9156
9155
|
const Ci = Ns, yc = ha, ae = Z, ee = Xt, Eg = Jt, bc = te, vc = "Not Assigned", P_ = "kos.trouble.added", R_ = "kos.trouble.removed";
|
|
9157
9156
|
var ce = /* @__PURE__ */ ((t) => (t.TroubleRank = "kos.trouble.rank.mapper", t.TroubleColor = "kos.trouble.color.mapper", t.TroubleRole = "kos.trouble.role.mapper", t.RegionServicePath = "kos.region.service_path.mapper", t.ConfigServicePath = "kos.config.service_path.mapper", t))(ce || {}), wr = /* @__PURE__ */ ((t) => (t.TIME_CHANGE = "/kos/internal/time/time", t.DAY_CHANGE = "/kos/internal/time/day", t.TIMEZONE_CHANGE = "/kos/internal/time/timezone", t))(wr || {});
|
|
9158
|
-
const wc =
|
|
9157
|
+
const wc = g.createLogger({
|
|
9159
9158
|
name: "config-bean-service",
|
|
9160
9159
|
group: "Services"
|
|
9161
9160
|
}), Oo = we, Mg = (t) => (t == null ? void 0 : t.decimals) !== void 0, { postModel: _g, getOne: Tg } = ge.build({
|
|
@@ -9225,7 +9224,7 @@ function Pg(t, e) {
|
|
|
9225
9224
|
if (new RegExp(`^${s}$`).test(e))
|
|
9226
9225
|
return s;
|
|
9227
9226
|
}
|
|
9228
|
-
const Do = "config-bean-model", rr =
|
|
9227
|
+
const Do = "config-bean-model", rr = g.getLogger(Do), Rg = es("path");
|
|
9229
9228
|
function kg(t) {
|
|
9230
9229
|
return M.propertyMapper.hasMapper(
|
|
9231
9230
|
ce.ConfigServicePath
|
|
@@ -9521,7 +9520,7 @@ var Bg = Object.defineProperty, Hg = Object.getOwnPropertyDescriptor, Po = (t, e
|
|
|
9521
9520
|
(i = t[o]) && (n = (r ? i(e, s, n) : i(n)) || n);
|
|
9522
9521
|
return r && n && Bg(e, s, n), n;
|
|
9523
9522
|
};
|
|
9524
|
-
const Er = "region-info-model", ds =
|
|
9523
|
+
const Er = "region-info-model", ds = g.createLogger({ name: "region-info-model" });
|
|
9525
9524
|
function qg(t) {
|
|
9526
9525
|
return M.propertyMapper.hasMapper(
|
|
9527
9526
|
ce.RegionServicePath
|
|
@@ -10022,7 +10021,7 @@ function Qg(t, e) {
|
|
|
10022
10021
|
const r = new Date(s.getTime() + t * 1e3);
|
|
10023
10022
|
return gt(r, e);
|
|
10024
10023
|
}
|
|
10025
|
-
const Mr = "config-bean-prop-model", At =
|
|
10024
|
+
const Mr = "config-bean-prop-model", At = g.createLogger({ name: "config-bean-prop-model" }), Zg = es("path"), Xg = es("serviceBasePath");
|
|
10026
10025
|
let Cs = class {
|
|
10027
10026
|
constructor(t, e) {
|
|
10028
10027
|
l(this, "id");
|
|
@@ -10334,7 +10333,7 @@ let Cs = class {
|
|
|
10334
10333
|
var r, n, o, i, a, c, u, d, h, p, f;
|
|
10335
10334
|
const { unit: t, measure: e } = this.getConverterFromFormat(), s = t === "drt" ? "second" : t;
|
|
10336
10335
|
if (this.converter) {
|
|
10337
|
-
const
|
|
10336
|
+
const m = (r = this.converter) == null ? void 0 : r.measure, y = (o = (n = this.converter) == null ? void 0 : n.to) == null ? void 0 : o.measure, v = (a = (i = this.converter) == null ? void 0 : i.from) == null ? void 0 : a.measure, _ = m || y || v || e, U = ((u = (c = this.converter) == null ? void 0 : c.to) == null ? void 0 : u.unit) || this.regionInfo.getDefaultUnitForMeasure(
|
|
10338
10337
|
_,
|
|
10339
10338
|
((h = (d = this.converter) == null ? void 0 : d.to) == null ? void 0 : h.system) ?? this.regionInfo.defaultUnitSystem
|
|
10340
10339
|
), D = ((f = (p = this.converter) == null ? void 0 : p.to) == null ? void 0 : f.system) ?? this.regionInfo.getUnitSystem(U), $ = this.schemaFormat === "drt" ? "second" : this.schemaFormat || s;
|
|
@@ -10353,14 +10352,14 @@ let Cs = class {
|
|
|
10353
10352
|
};
|
|
10354
10353
|
}
|
|
10355
10354
|
if (s && e) {
|
|
10356
|
-
const
|
|
10355
|
+
const m = this.regionInfo.getDefaultUnitForMeasure(
|
|
10357
10356
|
e,
|
|
10358
10357
|
this.regionInfo.defaultUnitSystem
|
|
10359
|
-
), y = this.regionInfo.getUnitSystem(s), v = this.regionInfo.getUnitSystem(
|
|
10358
|
+
), y = this.regionInfo.getUnitSystem(s), v = this.regionInfo.getUnitSystem(m);
|
|
10360
10359
|
return {
|
|
10361
10360
|
measure: e,
|
|
10362
10361
|
to: {
|
|
10363
|
-
unit: y === v ? s :
|
|
10362
|
+
unit: y === v ? s : m
|
|
10364
10363
|
}
|
|
10365
10364
|
};
|
|
10366
10365
|
}
|
|
@@ -10449,7 +10448,7 @@ const Oc = (t) => ({
|
|
|
10449
10448
|
note: t.note,
|
|
10450
10449
|
tracker: t.tracker
|
|
10451
10450
|
}), Cc = (t, e) => {
|
|
10452
|
-
|
|
10451
|
+
g.debug(`future dto ${t.id} end state ${t.endState}`), g.debug(`future model ${e.id} end state ${e.endState}`), e.endState ? g.debug(`future model ${e.id} is already complete`) : (g.debug(`updating future model ${e.id}`), Z(() => {
|
|
10453
10452
|
const s = Oc(t);
|
|
10454
10453
|
ae(() => {
|
|
10455
10454
|
Object.keys(s).forEach((r) => {
|
|
@@ -10460,7 +10459,7 @@ const Oc = (t) => ({
|
|
|
10460
10459
|
}, Jg = (t) => (e) => (s) => t.build(String(e), s), Dc = (t) => (e) => cg(
|
|
10461
10460
|
Oc,
|
|
10462
10461
|
Jg(t)(e.tracker || e.id)
|
|
10463
|
-
)(e), nn =
|
|
10462
|
+
)(e), nn = g.createLogger({ name: "future-service", group: "Services" }), { isMock: em, URL: Vs } = Ee();
|
|
10464
10463
|
var wt = /* @__PURE__ */ ((t) => (t.Success = "SUCCESS", t.Fail = "FAIL", t.Aborted = "ABORT", t.Canceled = "CANCEL", t))(wt || {});
|
|
10465
10464
|
const { getAll: tm, modifyModel: sm, addModel: rm, deleteModel: nm, postModel: om } = ge.build({
|
|
10466
10465
|
destinationAddress: "",
|
|
@@ -10598,7 +10597,7 @@ var gm = Object.defineProperty, mm = Object.getOwnPropertyDescriptor, Rc = (t, e
|
|
|
10598
10597
|
(i = t[o]) && (n = (r ? i(e, s, n) : i(n)) || n);
|
|
10599
10598
|
return r && n && gm(e, s, n), n;
|
|
10600
10599
|
};
|
|
10601
|
-
const Rn =
|
|
10600
|
+
const Rn = g.getLogger(Ks.type);
|
|
10602
10601
|
let Dr = class {
|
|
10603
10602
|
/**
|
|
10604
10603
|
* @category Constructor
|
|
@@ -10738,7 +10737,7 @@ var Em = Object.defineProperty, Mm = Object.getOwnPropertyDescriptor, ko = (t, e
|
|
|
10738
10737
|
(i = t[o]) && (n = (r ? i(e, s, n) : i(n)) || n);
|
|
10739
10738
|
return r && n && Em(e, s, n), n;
|
|
10740
10739
|
};
|
|
10741
|
-
const nr =
|
|
10740
|
+
const nr = g.getLogger(Et.type);
|
|
10742
10741
|
let Ds = class {
|
|
10743
10742
|
constructor(t, e, s) {
|
|
10744
10743
|
l(this, "id");
|
|
@@ -10895,7 +10894,7 @@ Ds = ko([
|
|
|
10895
10894
|
], Ds);
|
|
10896
10895
|
const _m = Ds, { URL: Gs } = Ee(), { getOne: Tm, postModel: $m, deleteModel: Lc } = ge.build({
|
|
10897
10896
|
basePath: `${Gs}/api/keyVal`
|
|
10898
|
-
}), Gn =
|
|
10897
|
+
}), Gn = g.createLogger({
|
|
10899
10898
|
name: "key-value-service",
|
|
10900
10899
|
group: "Services"
|
|
10901
10900
|
}), Fc = async (t, e) => {
|
|
@@ -11046,8 +11045,8 @@ function Yn(t, e, s, r, n) {
|
|
|
11046
11045
|
for (var o = [], i = [], a, c, u, d, h = 0; h < t.length; h++) {
|
|
11047
11046
|
var p = t[h], f = p.type;
|
|
11048
11047
|
if (f === _e || f === Mt)
|
|
11049
|
-
Array.isArray(p.value) ? o.push.apply(o, Yn(p.value.map(function(
|
|
11050
|
-
return new P(_e,
|
|
11048
|
+
Array.isArray(p.value) ? o.push.apply(o, Yn(p.value.map(function(m) {
|
|
11049
|
+
return new P(_e, m);
|
|
11051
11050
|
}).concat(new P(Kt, p.value.length)), e, s, r, n)) : o.push(p);
|
|
11052
11051
|
else if (f === Ke && n.hasOwnProperty(p.value))
|
|
11053
11052
|
p = new P(_e, n[p.value]), o.push(p);
|
|
@@ -11104,9 +11103,9 @@ function ft(t, e, s) {
|
|
|
11104
11103
|
else if (p.value in e.unaryOps && e.parser.isOperatorEnabled(p.value))
|
|
11105
11104
|
r.push(e.unaryOps[p.value]);
|
|
11106
11105
|
else {
|
|
11107
|
-
var
|
|
11108
|
-
if (
|
|
11109
|
-
r.push(
|
|
11106
|
+
var m = s[p.value];
|
|
11107
|
+
if (m !== void 0)
|
|
11108
|
+
r.push(m);
|
|
11110
11109
|
else
|
|
11111
11110
|
throw new Error("undefined variable: " + p.value);
|
|
11112
11111
|
}
|
|
@@ -12305,7 +12304,7 @@ Oy(xr, "Registration");
|
|
|
12305
12304
|
xr = Iy([
|
|
12306
12305
|
R({ modelTypeId: Cy, singleton: !1 })
|
|
12307
12306
|
], xr);
|
|
12308
|
-
const xy = xr.Registration, Ay =
|
|
12307
|
+
const xy = xr.Registration, Ay = g.createLogger({
|
|
12309
12308
|
name: "kos-log-manager-service",
|
|
12310
12309
|
group: "Services"
|
|
12311
12310
|
}), Py = "/api/kos/logs/overrides", Gc = async () => (Ay.debug("sending GET for kos-log-manager"), await je.get(Py)), H_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -12353,7 +12352,7 @@ let Yt = class {
|
|
|
12353
12352
|
* @private
|
|
12354
12353
|
*/
|
|
12355
12354
|
resolveLoggers() {
|
|
12356
|
-
const t =
|
|
12355
|
+
const t = g.getLoggers(), s = Object.entries(t).map(
|
|
12357
12356
|
([r, n]) => ({
|
|
12358
12357
|
name: r,
|
|
12359
12358
|
level: Ny(n.getLevel())
|
|
@@ -12379,14 +12378,14 @@ let Yt = class {
|
|
|
12379
12378
|
Object.values(this.resolveLoggers()).filter(
|
|
12380
12379
|
(r) => r.name.startsWith(t.name)
|
|
12381
12380
|
).forEach((r) => {
|
|
12382
|
-
const n =
|
|
12381
|
+
const n = g.getLoggers()[r.name];
|
|
12383
12382
|
if (!n) {
|
|
12384
12383
|
this.logger.debug(`Logger ${r.name} not found`);
|
|
12385
12384
|
return;
|
|
12386
12385
|
}
|
|
12387
12386
|
n.setLevel(t.level);
|
|
12388
12387
|
});
|
|
12389
|
-
const s =
|
|
12388
|
+
const s = g.getLoggers()[t.name];
|
|
12390
12389
|
if (!s) {
|
|
12391
12390
|
this.logger.debug(`Logger ${t.name} not found`);
|
|
12392
12391
|
return;
|
|
@@ -12404,10 +12403,10 @@ let Yt = class {
|
|
|
12404
12403
|
Object.values(this.resolveLoggers()).filter(
|
|
12405
12404
|
(r) => r.name.startsWith(t.name)
|
|
12406
12405
|
).forEach((r) => {
|
|
12407
|
-
const n =
|
|
12406
|
+
const n = g.getLoggers()[r.name];
|
|
12408
12407
|
n || this.logger.debug(`Logger ${r.name} not found`), n == null || n.resetLevel();
|
|
12409
12408
|
});
|
|
12410
|
-
const s =
|
|
12409
|
+
const s = g.getLoggers()[t.name];
|
|
12411
12410
|
s || this.logger.debug(`Logger ${t.name} not found`), s == null || s.resetLevel(), globalThis.kos.logOverrides = this._overrides.data;
|
|
12412
12411
|
}
|
|
12413
12412
|
handleOverrideAdded(t, e) {
|
|
@@ -12480,7 +12479,7 @@ const Uy = new Ne({
|
|
|
12480
12479
|
}), { URL: Ys } = Ee(), { postModel: zo, getOne: jy } = ge.build({
|
|
12481
12480
|
basePath: `${Ys}/api/kos-time`
|
|
12482
12481
|
});
|
|
12483
|
-
|
|
12482
|
+
g.createLogger({
|
|
12484
12483
|
name: "kos-time-service",
|
|
12485
12484
|
group: "Services"
|
|
12486
12485
|
});
|
|
@@ -12656,13 +12655,13 @@ Jc([
|
|
|
12656
12655
|
Ar = Jc([
|
|
12657
12656
|
R(el)
|
|
12658
12657
|
], Ar);
|
|
12659
|
-
const Yy =
|
|
12658
|
+
const Yy = g.createLogger({
|
|
12660
12659
|
name: "log-stream-container-service",
|
|
12661
12660
|
group: "Services"
|
|
12662
12661
|
}), tl = () => {
|
|
12663
12662
|
var r;
|
|
12664
12663
|
const t = $e(), s = (t == null ? void 0 : t.connId) || ((r = window == null ? void 0 : window.kosBridge) == null ? void 0 : r.call(window, "connId"));
|
|
12665
|
-
return
|
|
12664
|
+
return g.error(`getKosConnectionId: ${s}`), s;
|
|
12666
12665
|
}, cs = tl(), Wy = "/api/kos/logs/node/{nodeId}/streams", sl = async () => (Yy.debug("sending GET for log-stream-container"), await je.get(
|
|
12667
12666
|
Wy,
|
|
12668
12667
|
{
|
|
@@ -13132,7 +13131,7 @@ const ab = (t) => (t == null ? void 0 : t.rank) !== void 0, cb = (t) => (t == nu
|
|
|
13132
13131
|
}), fl = () => {
|
|
13133
13132
|
var r;
|
|
13134
13133
|
const t = $e(), s = (t == null ? void 0 : t.connId) || ((r = window == null ? void 0 : window.kosBridge) == null ? void 0 : r.call(window, "connId"));
|
|
13135
|
-
return
|
|
13134
|
+
return g.error(`getKosConnectionId: ${s}`), s;
|
|
13136
13135
|
}, Ko = fl(), pl = async (t) => await fb({
|
|
13137
13136
|
urlOverride: `${pn}${t}`,
|
|
13138
13137
|
destinationAddress: Ko
|
|
@@ -13192,7 +13191,7 @@ qs(Zn, {
|
|
|
13192
13191
|
};
|
|
13193
13192
|
const r = s.map((i) => i(e));
|
|
13194
13193
|
return (await Promise.allSettled(r)).reduce(
|
|
13195
|
-
(i, a) => (a.status === "fulfilled" ? i = { ...i, ...a.value } :
|
|
13194
|
+
(i, a) => (a.status === "fulfilled" ? i = { ...i, ...a.value } : g.info(`Trouble mapper ${t} failed: ${a.reason}`), i),
|
|
13196
13195
|
{ ...e.data }
|
|
13197
13196
|
);
|
|
13198
13197
|
}
|
|
@@ -13207,7 +13206,7 @@ qs(gn, {
|
|
|
13207
13206
|
const s = ir.get(t);
|
|
13208
13207
|
if (!s)
|
|
13209
13208
|
return [];
|
|
13210
|
-
const r = s.map((i) => i(e)), o = (await Promise.allSettled(r)).map((i) => i.status === "fulfilled" ? i.value : (
|
|
13209
|
+
const r = s.map((i) => i(e)), o = (await Promise.allSettled(r)).map((i) => i.status === "fulfilled" ? i.value : (g.info(`Trouble mapper ${t} failed: ${i.reason}`), [])).flat();
|
|
13211
13210
|
return Array.from(new Set(o));
|
|
13212
13211
|
}
|
|
13213
13212
|
});
|
|
@@ -13290,7 +13289,7 @@ let kr = class {
|
|
|
13290
13289
|
role: h,
|
|
13291
13290
|
color: p,
|
|
13292
13291
|
servicePath: f,
|
|
13293
|
-
rawJson:
|
|
13292
|
+
rawJson: m,
|
|
13294
13293
|
...y
|
|
13295
13294
|
}, v) {
|
|
13296
13295
|
l(this, "id");
|
|
@@ -13312,7 +13311,7 @@ let kr = class {
|
|
|
13312
13311
|
l(this, "createTime");
|
|
13313
13312
|
l(this, "rawJson");
|
|
13314
13313
|
l(this, "_mapped", {});
|
|
13315
|
-
this.id = t, this.logger = v.logger, this.type = c, this._troubleId = n, this._resolvable = !!e, this.ifaces = a, this.rank = i, this.role = h, this.color = p, this.tags = s, this.info = r, this.group = u, this.rawJson =
|
|
13314
|
+
this.id = t, this.logger = v.logger, this.type = c, this._troubleId = n, this._resolvable = !!e, this.ifaces = a, this.rank = i, this.role = h, this.color = p, this.tags = s, this.info = r, this.group = u, this.rawJson = m, this.servicePath = f ?? "/api/kos/troubles", this.createTime = d, this.clientData = o, this.data = {}, Object.assign(this.data, y), this.futureHandler = new _o(this);
|
|
13316
13315
|
}
|
|
13317
13316
|
// -------------------LIFECYCLE----------------------------
|
|
13318
13317
|
getTitleWithContext(t) {
|
|
@@ -13518,7 +13517,7 @@ _t = mn([
|
|
|
13518
13517
|
], _t);
|
|
13519
13518
|
const Ps = _t.Registration, { URL: vl } = Ee(), { getAll: Tb } = ge.build({
|
|
13520
13519
|
basePath: `${vl}/api/kos/ota`
|
|
13521
|
-
}), qi =
|
|
13520
|
+
}), qi = g.createLogger({
|
|
13522
13521
|
name: "ota-service",
|
|
13523
13522
|
group: "Services"
|
|
13524
13523
|
}), $b = async () => {
|
|
@@ -13705,7 +13704,7 @@ function Cb(t) {
|
|
|
13705
13704
|
e && (e.abort(), e = void 0);
|
|
13706
13705
|
}, s.getController = () => e, s.isActive = () => !!e, s;
|
|
13707
13706
|
}
|
|
13708
|
-
const Fn =
|
|
13707
|
+
const Fn = g.createLogger({
|
|
13709
13708
|
name: "software-info-service",
|
|
13710
13709
|
group: "Services"
|
|
13711
13710
|
}), Go = async (t) => {
|
|
@@ -13793,7 +13792,7 @@ const eo = {
|
|
|
13793
13792
|
)
|
|
13794
13793
|
}, { URL: El } = Ee(), { getOne: Pb } = ge.build({
|
|
13795
13794
|
basePath: `${El}/api/kos/state`
|
|
13796
|
-
}), Rb =
|
|
13795
|
+
}), Rb = g.createLogger({
|
|
13797
13796
|
name: "state-bean-service",
|
|
13798
13797
|
group: "Services"
|
|
13799
13798
|
}), Ml = async ({ path: t }) => (Rb.debug("sending GET for state-bean"), await Pb({
|
|
@@ -13946,7 +13945,7 @@ const $l = {
|
|
|
13946
13945
|
factory: ve.Factory.create(ms)
|
|
13947
13946
|
}, { URL: jb } = Ee(), { getAll: Bb } = ge.build({
|
|
13948
13947
|
basePath: `${jb}/api/state-prop`
|
|
13949
|
-
}), Hb =
|
|
13948
|
+
}), Hb = g.createLogger({
|
|
13950
13949
|
name: "state-prop-service",
|
|
13951
13950
|
group: "Services"
|
|
13952
13951
|
}), qb = async () => (Hb.debug("sending GET for state-prop"), await Bb({})), Y_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -13954,7 +13953,7 @@ const $l = {
|
|
|
13954
13953
|
getStateProps: qb
|
|
13955
13954
|
}, Symbol.toStringTag, { value: "Module" })), { URL: Yo } = Ee(), { getOne: Sl } = ge.build({
|
|
13956
13955
|
basePath: `${Yo}/api/translation`
|
|
13957
|
-
}), Ms =
|
|
13956
|
+
}), Ms = g.createLogger({
|
|
13958
13957
|
name: "translation-service",
|
|
13959
13958
|
group: "Services"
|
|
13960
13959
|
}), zb = () => {
|
|
@@ -14380,7 +14379,7 @@ let Rs = class {
|
|
|
14380
14379
|
this.processEvent(e);
|
|
14381
14380
|
}
|
|
14382
14381
|
processEvent(t, e = !1) {
|
|
14383
|
-
|
|
14382
|
+
g.debug("kos event received");
|
|
14384
14383
|
const { body: s, headers: r } = t.body, n = r["request-id"] || r["response-id"], o = r["request-id"] || r["response-id"] || r.topic || r.type;
|
|
14385
14384
|
if (o) {
|
|
14386
14385
|
let i = o;
|
|
@@ -14399,7 +14398,7 @@ let Rs = class {
|
|
|
14399
14398
|
direction: e ? "send" : "receive",
|
|
14400
14399
|
mocked: !!r.mocked
|
|
14401
14400
|
};
|
|
14402
|
-
this.events.set(i, a),
|
|
14401
|
+
this.events.set(i, a), g.debug(`logged ${this.events.size} events`);
|
|
14403
14402
|
}
|
|
14404
14403
|
}
|
|
14405
14404
|
};
|
|
@@ -15075,8 +15074,8 @@ class mv extends Ct {
|
|
|
15075
15074
|
else if (i < c && i > c - this.trailColors.length) {
|
|
15076
15075
|
const f = c - i;
|
|
15077
15076
|
if (f < this.trailColors.length) {
|
|
15078
|
-
const
|
|
15079
|
-
u =
|
|
15077
|
+
const m = this.trailColors[f];
|
|
15078
|
+
u = m.r, d = m.g, h = m.b;
|
|
15080
15079
|
}
|
|
15081
15080
|
}
|
|
15082
15081
|
const p = (i * s + a) * 4;
|
|
@@ -15276,10 +15275,10 @@ class Ul extends Ct {
|
|
|
15276
15275
|
this.drawScrollingImage(s, r, n, i), this.checkScrollCompletion(s, r, n, i);
|
|
15277
15276
|
}
|
|
15278
15277
|
drawScrollingImage(s, r, n, o) {
|
|
15279
|
-
var h, p, f,
|
|
15278
|
+
var h, p, f, m, y, v, _, U, D;
|
|
15280
15279
|
const i = this.img.width / this.img.height;
|
|
15281
15280
|
let a, c;
|
|
15282
|
-
((h = this.scrollConfig) == null ? void 0 : h.maintainAspectRatio) !== !1 ? (p = this.scrollConfig) != null && p.height ? (c = this.scrollConfig.height, a = c * i) : (f = this.scrollConfig) != null && f.width ? (a = this.scrollConfig.width, c = a / i) : n === "left" || n === "right" ? (c = r, a = c * i) : (a = s, c = a / i) : (a = ((
|
|
15281
|
+
((h = this.scrollConfig) == null ? void 0 : h.maintainAspectRatio) !== !1 ? (p = this.scrollConfig) != null && p.height ? (c = this.scrollConfig.height, a = c * i) : (f = this.scrollConfig) != null && f.width ? (a = this.scrollConfig.width, c = a / i) : n === "left" || n === "right" ? (c = r, a = c * i) : (a = s, c = a / i) : (a = ((m = this.scrollConfig) == null ? void 0 : m.width) || s, c = ((y = this.scrollConfig) == null ? void 0 : y.height) || r);
|
|
15283
15282
|
let u, d;
|
|
15284
15283
|
switch (n === "left" || n === "right" ? (u = 0, ((v = this.scrollConfig) == null ? void 0 : v.offsetY) === "center" || ((_ = this.scrollConfig) == null ? void 0 : _.offsetY) === void 0 ? d = (r - c) / 2 : d = this.scrollConfig.offsetY) : (((U = this.scrollConfig) == null ? void 0 : U.offsetX) === "center" || ((D = this.scrollConfig) == null ? void 0 : D.offsetX) === void 0 ? u = (s - a) / 2 : u = this.scrollConfig.offsetX, d = 0), n) {
|
|
15285
15284
|
case "left": {
|
|
@@ -15341,12 +15340,12 @@ class Ul extends Ct {
|
|
|
15341
15340
|
}
|
|
15342
15341
|
}
|
|
15343
15342
|
checkScrollCompletion(s, r, n, o) {
|
|
15344
|
-
var h, p, f,
|
|
15343
|
+
var h, p, f, m, y;
|
|
15345
15344
|
if (!this.isPlaying)
|
|
15346
15345
|
return;
|
|
15347
15346
|
const i = this.img.width / this.img.height;
|
|
15348
15347
|
let a, c;
|
|
15349
|
-
switch (((h = this.scrollConfig) == null ? void 0 : h.maintainAspectRatio) !== !1 ? (p = this.scrollConfig) != null && p.height ? (c = this.scrollConfig.height, a = c * i) : (f = this.scrollConfig) != null && f.width ? (a = this.scrollConfig.width, c = a / i) : n === "left" || n === "right" ? (c = r, a = c * i) : (a = s, c = a / i) : (a = ((
|
|
15348
|
+
switch (((h = this.scrollConfig) == null ? void 0 : h.maintainAspectRatio) !== !1 ? (p = this.scrollConfig) != null && p.height ? (c = this.scrollConfig.height, a = c * i) : (f = this.scrollConfig) != null && f.width ? (a = this.scrollConfig.width, c = a / i) : n === "left" || n === "right" ? (c = r, a = c * i) : (a = s, c = a / i) : (a = ((m = this.scrollConfig) == null ? void 0 : m.width) || s, c = ((y = this.scrollConfig) == null ? void 0 : y.height) || r), n) {
|
|
15350
15349
|
case "left":
|
|
15351
15350
|
case "right":
|
|
15352
15351
|
this.loopConfig;
|
|
@@ -15981,7 +15980,7 @@ const ks = new Ne({
|
|
|
15981
15980
|
type: jl
|
|
15982
15981
|
}), { URL: Zo } = Ee(), { getOne: Bl } = ge.build({
|
|
15983
15982
|
basePath: `${Zo}/api/device`
|
|
15984
|
-
}), zr =
|
|
15983
|
+
}), zr = g.createLogger({ name: "device-service", group: "Services" }), Hl = async () => {
|
|
15985
15984
|
zr.debug("sending GET for device serial number");
|
|
15986
15985
|
try {
|
|
15987
15986
|
const t = await Bl({
|
|
@@ -16284,7 +16283,7 @@ const Gl = new Ae({
|
|
|
16284
16283
|
type: Kl
|
|
16285
16284
|
}), { URL: Rv } = Ee(), { getAll: kv } = ge.build({
|
|
16286
16285
|
basePath: `${Rv}/api/kos/network/interfaces`
|
|
16287
|
-
}), Wi =
|
|
16286
|
+
}), Wi = g.createLogger({
|
|
16288
16287
|
name: "network-interface-service",
|
|
16289
16288
|
group: "Services"
|
|
16290
16289
|
}), Yl = async () => {
|
|
@@ -16381,7 +16380,7 @@ const Gr = new Ne({
|
|
|
16381
16380
|
Gr.addRelatedModel(Gl);
|
|
16382
16381
|
const { URL: Nv } = Ee(), { getAll: Uv } = ge.build({
|
|
16383
16382
|
basePath: `${Nv}/api/kos/storage/devices`
|
|
16384
|
-
}), Qi =
|
|
16383
|
+
}), Qi = g.createLogger({
|
|
16385
16384
|
name: "storage-device-service",
|
|
16386
16385
|
group: "Services"
|
|
16387
16386
|
}), Zl = async () => {
|
|
@@ -16548,7 +16547,7 @@ const Fs = new Ne({
|
|
|
16548
16547
|
Fs.addRelatedModel(ao);
|
|
16549
16548
|
const { URL: Jo } = Ee(), { getAll: Vv, postModel: Kv } = ge.build({
|
|
16550
16549
|
basePath: `${Jo}/api/kos/update/available`
|
|
16551
|
-
}), Zi =
|
|
16550
|
+
}), Zi = g.createLogger({
|
|
16552
16551
|
name: "usb-update-service",
|
|
16553
16552
|
group: "Services"
|
|
16554
16553
|
}), eu = async () => {
|
|
@@ -16938,7 +16937,7 @@ const na = ot(), hT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
|
|
|
16938
16937
|
api: na,
|
|
16939
16938
|
default: na,
|
|
16940
16939
|
kosServiceRequest: aw
|
|
16941
|
-
}, Symbol.toStringTag, { value: "Module" })), lu = "/kos-timer-event", uu = "/kos-timer-event/tick", du = "defaultTimerEnd", vs =
|
|
16940
|
+
}, Symbol.toStringTag, { value: "Module" })), lu = "/kos-timer-event", uu = "/kos-timer-event/tick", du = "defaultTimerEnd", vs = g.createLogger({ name: "timer-manager" }), cw = (t) => t.updateProperty !== void 0;
|
|
16942
16941
|
class lw {
|
|
16943
16942
|
/**
|
|
16944
16943
|
* Creates a new timer.
|
|
@@ -16957,7 +16956,7 @@ class lw {
|
|
|
16957
16956
|
this.name = e;
|
|
16958
16957
|
const n = typeof s == "number" ? s : s.value || 60;
|
|
16959
16958
|
this.timeout = n, this.state = "inactive", this.remainingTime = n, cw(s) && ee(() => {
|
|
16960
|
-
|
|
16959
|
+
g.info(
|
|
16961
16960
|
`Updating config value timer ${e} with new timeout value ${s.value}`
|
|
16962
16961
|
);
|
|
16963
16962
|
const o = s.value || 60;
|
|
@@ -17165,7 +17164,7 @@ function pu(t, e, s = {}) {
|
|
|
17165
17164
|
} = s;
|
|
17166
17165
|
return async function(...a) {
|
|
17167
17166
|
const c = ss();
|
|
17168
|
-
|
|
17167
|
+
g.debug(
|
|
17169
17168
|
`Calling future service ${e} with tracker ${c}`
|
|
17170
17169
|
);
|
|
17171
17170
|
let u, d;
|
|
@@ -17174,21 +17173,21 @@ function pu(t, e, s = {}) {
|
|
|
17174
17173
|
tracker: c,
|
|
17175
17174
|
id: vc
|
|
17176
17175
|
});
|
|
17177
|
-
n && (h.namespace = n),
|
|
17178
|
-
|
|
17176
|
+
n && (h.namespace = n), g.debug(`waiting for future ${h.id} to be ready`), await Te(h), g.debug(`future ${h.id} is ready`), ae(() => {
|
|
17177
|
+
g.debug(`Adding future ${h.id} to futureHandler`), this.futureHandler.addFuture(h, r);
|
|
17179
17178
|
}), o && u && (d = ee(() => {
|
|
17180
|
-
(h.status === "CANCELLED" || h.endState === wt.Canceled) && (
|
|
17179
|
+
(h.status === "CANCELLED" || h.endState === wt.Canceled) && (g.debug(`Future ${h.id} cancelled, aborting request`), u == null || u.abort());
|
|
17181
17180
|
}), u.signal.addEventListener(
|
|
17182
17181
|
"abort",
|
|
17183
17182
|
async () => {
|
|
17184
17183
|
if (h.status !== "CANCELLED" && h.endState !== wt.Canceled && !h.endState) {
|
|
17185
|
-
|
|
17184
|
+
g.debug(
|
|
17186
17185
|
`AbortController aborted, cancelling future ${h.id}`
|
|
17187
17186
|
);
|
|
17188
17187
|
try {
|
|
17189
17188
|
await h.cancelFuture();
|
|
17190
17189
|
} catch (f) {
|
|
17191
|
-
|
|
17190
|
+
g.error(`Failed to cancel future ${h.id}:`, f);
|
|
17192
17191
|
}
|
|
17193
17192
|
}
|
|
17194
17193
|
},
|
|
@@ -17216,21 +17215,21 @@ function pu(t, e, s = {}) {
|
|
|
17216
17215
|
}
|
|
17217
17216
|
} else
|
|
17218
17217
|
f.push(c);
|
|
17219
|
-
const
|
|
17218
|
+
const m = (
|
|
17220
17219
|
// eslint-disable-next-line no-invalid-this
|
|
17221
17220
|
await t.apply(this, f)
|
|
17222
17221
|
);
|
|
17223
|
-
|
|
17224
|
-
const y = hw(
|
|
17225
|
-
return y ? (y.progress = 1,
|
|
17222
|
+
g.debug(`received future response for ${c}`, m);
|
|
17223
|
+
const y = hw(m) ? m : m == null ? void 0 : m.data;
|
|
17224
|
+
return y ? (y.progress = 1, g.debug("mapping future response to future model"), h.endState ? g.debug(
|
|
17226
17225
|
`future ${h.id} has already completed. Not updating the model`
|
|
17227
17226
|
) : Cc(y, h)) : this.futureHandler.removeFuture(r), p(), y;
|
|
17228
17227
|
} catch (f) {
|
|
17229
17228
|
if (p(), o && (u != null && u.signal.aborted)) {
|
|
17230
|
-
const
|
|
17231
|
-
throw
|
|
17229
|
+
const m = new Error("Operation cancelled");
|
|
17230
|
+
throw g.debug(`Operation ${e} was cancelled`), m;
|
|
17232
17231
|
}
|
|
17233
|
-
throw
|
|
17232
|
+
throw g.error(f), f;
|
|
17234
17233
|
}
|
|
17235
17234
|
};
|
|
17236
17235
|
}
|
|
@@ -17273,7 +17272,7 @@ function pT(t) {
|
|
|
17273
17272
|
};
|
|
17274
17273
|
};
|
|
17275
17274
|
}
|
|
17276
|
-
const Ht =
|
|
17275
|
+
const Ht = g.createLogger({ name: "services", group: "Services" }), gT = async (t, e) => fw(t, e, `${we}/api/server/login`), fw = async (t, e, s = `${we}/api/login`) => {
|
|
17277
17276
|
const r = await Ue(`${s}`, {
|
|
17278
17277
|
method: "POST",
|
|
17279
17278
|
destinationAddress: "",
|
|
@@ -17359,8 +17358,8 @@ function vT(t, e, s, r) {
|
|
|
17359
17358
|
} = n, u = o;
|
|
17360
17359
|
let d = 0, h = "PENDING", p = !0;
|
|
17361
17360
|
const f = /* @__PURE__ */ new Set();
|
|
17362
|
-
let
|
|
17363
|
-
return c && typeof c == "object" && (
|
|
17361
|
+
let m;
|
|
17362
|
+
return c && typeof c == "object" && (m = Xt(() => {
|
|
17364
17363
|
const y = c.progress || 0, v = c.status || "PENDING", _ = !c.endState;
|
|
17365
17364
|
(y !== d || v !== h || _ !== p) && (d = y, h = v, p = _, f.forEach((U) => {
|
|
17366
17365
|
try {
|
|
@@ -17376,7 +17375,7 @@ function vT(t, e, s, r) {
|
|
|
17376
17375
|
} catch (v) {
|
|
17377
17376
|
console.warn("Progress callback error:", v);
|
|
17378
17377
|
}
|
|
17379
|
-
})),
|
|
17378
|
+
})), m && m(), f.clear();
|
|
17380
17379
|
}), u.cancel = async () => {
|
|
17381
17380
|
i && !i.signal.aborted && i.abort(), a && await a(), p = !1, h = "CANCELLED", f.forEach((y) => {
|
|
17382
17381
|
try {
|
|
@@ -17384,7 +17383,7 @@ function vT(t, e, s, r) {
|
|
|
17384
17383
|
} catch (v) {
|
|
17385
17384
|
console.warn("Progress callback error:", v);
|
|
17386
17385
|
}
|
|
17387
|
-
}),
|
|
17386
|
+
}), m && m();
|
|
17388
17387
|
}, u.getController = () => i, u.isCancelled = () => (i == null ? void 0 : i.signal.aborted) ?? !1, Object.defineProperty(u, "progress", {
|
|
17389
17388
|
get: () => d,
|
|
17390
17389
|
enumerable: !0
|
|
@@ -17531,7 +17530,7 @@ const _w = {
|
|
|
17531
17530
|
[s]
|
|
17532
17531
|
);
|
|
17533
17532
|
return /* @__PURE__ */ w(ti.Provider, { value: { model: e, setModel: r }, children: t });
|
|
17534
|
-
}, gu =
|
|
17533
|
+
}, gu = g.createLogger({ name: "kos-model-hierarchy-context" }), Sw = {
|
|
17535
17534
|
models: [],
|
|
17536
17535
|
addModel: () => {
|
|
17537
17536
|
gu.debug("Default implementation being used. Do Nothing.");
|
|
@@ -17560,7 +17559,7 @@ const _w = {
|
|
|
17560
17559
|
const r = Ve(s.id);
|
|
17561
17560
|
return (r == null ? void 0 : r.type) === t;
|
|
17562
17561
|
}
|
|
17563
|
-
})[0], Cw =
|
|
17562
|
+
})[0], Cw = g.createLogger({ name: "kos-model-loader" }), Dw = () => /* @__PURE__ */ w("div", {}), xw = ({ fallback: t, children: e, ...s }) => /* @__PURE__ */ w($w, { children: /* @__PURE__ */ w(Mw, { fallback: t, children: /* @__PURE__ */ w(Bu, { children: /* @__PURE__ */ w(Aw, { ...s, children: e }) }) }) }), Aw = (t) => {
|
|
17564
17563
|
const [e, s] = E(), [r, n] = E(!1), { setModel: o } = bt(ti), i = bt(si);
|
|
17565
17564
|
if (S(() => {
|
|
17566
17565
|
t.model && (s(t.model), o(t.model), n(!0), i && i.addModel(t.model));
|
|
@@ -17675,25 +17674,25 @@ const oe = (t) => {
|
|
|
17675
17674
|
k.GO_ACTIVE,
|
|
17676
17675
|
b.ACTIVE
|
|
17677
17676
|
)), a(!0), d;
|
|
17678
|
-
} catch (
|
|
17679
|
-
throw u(
|
|
17677
|
+
} catch (m) {
|
|
17678
|
+
throw u(m.message), m;
|
|
17680
17679
|
}
|
|
17681
17680
|
}
|
|
17682
17681
|
let f;
|
|
17683
|
-
return o.kosCore && e && p().then((
|
|
17682
|
+
return o.kosCore && e && p().then((m) => {
|
|
17684
17683
|
f = ee(() => {
|
|
17685
|
-
const y = (
|
|
17684
|
+
const y = (m == null ? void 0 : m.status) === b.READY;
|
|
17686
17685
|
a(y);
|
|
17687
17686
|
});
|
|
17688
|
-
}).catch((
|
|
17689
|
-
console.error(
|
|
17687
|
+
}).catch((m) => {
|
|
17688
|
+
console.error(m);
|
|
17690
17689
|
}), () => {
|
|
17691
17690
|
if (r) {
|
|
17692
17691
|
if (h != null && h.id) {
|
|
17693
|
-
const
|
|
17692
|
+
const m = o.kosCore.modelManager.getModelById(
|
|
17694
17693
|
h.id
|
|
17695
17694
|
);
|
|
17696
|
-
|
|
17695
|
+
m == null || m.fsm.transitionTo(k.GO_INACTIVE, b.INACTIVE).then(() => {
|
|
17697
17696
|
if (n) {
|
|
17698
17697
|
const y = h.id;
|
|
17699
17698
|
qe(h).then(() => {
|
|
@@ -17786,7 +17785,7 @@ const Mu = Us(void 0), Hw = () => {
|
|
|
17786
17785
|
async function v() {
|
|
17787
17786
|
const U = (Array.isArray(f) ? f : [f]).map((se) => (o || Kb(se))()), L = (await Promise.allSettled(U)).map((se) => {
|
|
17788
17787
|
if (se.status === "rejected") {
|
|
17789
|
-
|
|
17788
|
+
g.warn("Failed to load localization descriptor", se.reason);
|
|
17790
17789
|
return;
|
|
17791
17790
|
}
|
|
17792
17791
|
return se.value;
|
|
@@ -17818,7 +17817,7 @@ const Mu = Us(void 0), Hw = () => {
|
|
|
17818
17817
|
}
|
|
17819
17818
|
v();
|
|
17820
17819
|
}, [s, c, r, p]);
|
|
17821
|
-
const
|
|
17820
|
+
const m = Y(() => i ? {
|
|
17822
17821
|
setLocale: (v) => {
|
|
17823
17822
|
d && (d.currentLocale = v);
|
|
17824
17823
|
}
|
|
@@ -17827,7 +17826,7 @@ const Mu = Us(void 0), Hw = () => {
|
|
|
17827
17826
|
throw new Error("Translations not ready");
|
|
17828
17827
|
}
|
|
17829
17828
|
}, [i, d]), y = i ? t : null;
|
|
17830
|
-
return /* @__PURE__ */ w(Mu.Provider, { value:
|
|
17829
|
+
return /* @__PURE__ */ w(Mu.Provider, { value: m, children: y });
|
|
17831
17830
|
}, PT = () => {
|
|
17832
17831
|
const t = bt(Mu);
|
|
17833
17832
|
if (!t)
|
|
@@ -17868,7 +17867,7 @@ function Kw({
|
|
|
17868
17867
|
const u = c.getContext("2d");
|
|
17869
17868
|
u == null || u.putImageData(a, 0, 0), t.imageSmoothingEnabled = !1, t.clearRect(0, 0, r * o, n * o), t.drawImage(c, 0, 0, r * o, n * o);
|
|
17870
17869
|
}
|
|
17871
|
-
const Gw =
|
|
17870
|
+
const Gw = g.createLogger({ name: "canvas-streamer" });
|
|
17872
17871
|
Gw.debug("main-view component loaded");
|
|
17873
17872
|
const Un = 10, Yw = pa(
|
|
17874
17873
|
({
|
|
@@ -18056,7 +18055,7 @@ function HT(t) {
|
|
|
18056
18055
|
return /* @__PURE__ */ w(n, { ...r, children: /* @__PURE__ */ w(t, { ...e, storageDeviceContainer: s }) });
|
|
18057
18056
|
};
|
|
18058
18057
|
}
|
|
18059
|
-
const jn =
|
|
18058
|
+
const jn = g.createLogger({ name: "use-timer" }), qT = ({
|
|
18060
18059
|
timerName: t,
|
|
18061
18060
|
onTimerExpired: e,
|
|
18062
18061
|
onTimerTick: s,
|
|
@@ -18182,7 +18181,7 @@ const lE = async () => {
|
|
|
18182
18181
|
return { t: re(
|
|
18183
18182
|
(d, h) => {
|
|
18184
18183
|
const p = e != null && e.keyPrefix ? `${e.keyPrefix}.${d}` : d;
|
|
18185
|
-
return a ? a.resolveKey(p, h) : (
|
|
18184
|
+
return a ? a.resolveKey(p, h) : (g.debug(
|
|
18186
18185
|
`Translation model ${t} not ready for key: ${p}`
|
|
18187
18186
|
), p);
|
|
18188
18187
|
},
|
|
@@ -18444,7 +18443,7 @@ function ME({
|
|
|
18444
18443
|
dayFormat: a = "short"
|
|
18445
18444
|
} = {}
|
|
18446
18445
|
}) {
|
|
18447
|
-
const c = $u(o, r), u = _E(o, r, t), d = TE(i, t), h = $E(i, t), p = Su(e, s), f = IE(e, s, t, n),
|
|
18446
|
+
const c = $u(o, r), u = _E(o, r, t), d = TE(i, t), h = $E(i, t), p = Su(e, s), f = IE(e, s, t, n), m = DE(s, e, f), y = OE(t, a);
|
|
18448
18447
|
return {
|
|
18449
18448
|
daysArray: p,
|
|
18450
18449
|
monthsArray: d,
|
|
@@ -18452,7 +18451,7 @@ function ME({
|
|
|
18452
18451
|
yearsOptionsArray: u,
|
|
18453
18452
|
monthsOptionsArray: h,
|
|
18454
18453
|
daysOptionsArray: f,
|
|
18455
|
-
calendarDayArray:
|
|
18454
|
+
calendarDayArray: m,
|
|
18456
18455
|
dayNamesArray: y
|
|
18457
18456
|
};
|
|
18458
18457
|
}
|
|
@@ -18557,7 +18556,7 @@ function t$({
|
|
|
18557
18556
|
daysOfWeekFilter: u = []
|
|
18558
18557
|
} = {}
|
|
18559
18558
|
}) {
|
|
18560
|
-
const [d, h] = E(e), [p, f] = E(c), [
|
|
18559
|
+
const [d, h] = E(e), [p, f] = E(c), [m, y] = E(s), [v, _] = E(r);
|
|
18561
18560
|
S(() => {
|
|
18562
18561
|
h(e);
|
|
18563
18562
|
}, [e]), S(() => {
|
|
@@ -18578,7 +18577,7 @@ function t$({
|
|
|
18578
18577
|
locale: t,
|
|
18579
18578
|
year: d,
|
|
18580
18579
|
yearRange: p,
|
|
18581
|
-
month:
|
|
18580
|
+
month: m,
|
|
18582
18581
|
formatOptions: {
|
|
18583
18582
|
yearFormat: n,
|
|
18584
18583
|
monthFormat: o,
|
|
@@ -18587,7 +18586,7 @@ function t$({
|
|
|
18587
18586
|
daysOfWeekFilter: u
|
|
18588
18587
|
}), { formattedDate: ie } = CE({
|
|
18589
18588
|
year: d,
|
|
18590
|
-
month:
|
|
18589
|
+
month: m,
|
|
18591
18590
|
day: v,
|
|
18592
18591
|
formatString: a
|
|
18593
18592
|
});
|
|
@@ -18598,7 +18597,7 @@ function t$({
|
|
|
18598
18597
|
setMonth: y,
|
|
18599
18598
|
setDay: _,
|
|
18600
18599
|
nextMonth: () => {
|
|
18601
|
-
const le =
|
|
18600
|
+
const le = m < 11 ? Re(d) : Re(d + 1), me = m < 11 ? m + 1 : 0;
|
|
18602
18601
|
if (!lr(le, me, v)) {
|
|
18603
18602
|
const it = ur(le, me);
|
|
18604
18603
|
_(it);
|
|
@@ -18606,7 +18605,7 @@ function t$({
|
|
|
18606
18605
|
me === 0 && h(le), y(me);
|
|
18607
18606
|
},
|
|
18608
18607
|
previousMonth: () => {
|
|
18609
|
-
const le = Re(
|
|
18608
|
+
const le = Re(m === 0 ? d - 1 : d), me = m === 0 ? 11 : m - 1;
|
|
18610
18609
|
if (!lr(le, me, v)) {
|
|
18611
18610
|
const it = ur(le, me);
|
|
18612
18611
|
_(it);
|
|
@@ -18615,19 +18614,19 @@ function t$({
|
|
|
18615
18614
|
},
|
|
18616
18615
|
nextYear: () => {
|
|
18617
18616
|
const le = d < p[1] ? d + 1 : p[0], me = Re(le);
|
|
18618
|
-
if (lr(me,
|
|
18617
|
+
if (lr(me, m, v))
|
|
18619
18618
|
h(le);
|
|
18620
18619
|
else {
|
|
18621
|
-
const it = ur(Re(d + 1),
|
|
18620
|
+
const it = ur(Re(d + 1), m);
|
|
18622
18621
|
_(it), h(le);
|
|
18623
18622
|
}
|
|
18624
18623
|
},
|
|
18625
18624
|
previousYear: () => {
|
|
18626
18625
|
const le = d > p[0] ? d - 1 : p[0], me = Re(le);
|
|
18627
|
-
if (lr(me,
|
|
18626
|
+
if (lr(me, m, v))
|
|
18628
18627
|
h(le);
|
|
18629
18628
|
else {
|
|
18630
|
-
const it = ur(Re(d - 1),
|
|
18629
|
+
const it = ur(Re(d - 1), m);
|
|
18631
18630
|
_(it), h(le);
|
|
18632
18631
|
}
|
|
18633
18632
|
}
|
|
@@ -18635,7 +18634,7 @@ function t$({
|
|
|
18635
18634
|
dateState: {
|
|
18636
18635
|
year: d,
|
|
18637
18636
|
yearRange: p,
|
|
18638
|
-
month:
|
|
18637
|
+
month: m,
|
|
18639
18638
|
day: v,
|
|
18640
18639
|
yearsArray: U,
|
|
18641
18640
|
yearsOptionsArray: D,
|
|
@@ -18688,9 +18687,9 @@ const PE = ({
|
|
|
18688
18687
|
return S(() => {
|
|
18689
18688
|
const d = Number(t), h = Math.floor(d / 3600), p = Math.floor(d % 3600 / 60), f = d % 60;
|
|
18690
18689
|
s(h), n(p), i(f);
|
|
18691
|
-
const
|
|
18692
|
-
|
|
18693
|
-
const y = new Date(
|
|
18690
|
+
const m = /* @__PURE__ */ new Date();
|
|
18691
|
+
m.setHours(0, 0, 0, 0);
|
|
18692
|
+
const y = new Date(m.getTime() + d * 1e3);
|
|
18694
18693
|
c(new Date(y));
|
|
18695
18694
|
}, [t]), {
|
|
18696
18695
|
hours: e,
|
|
@@ -18934,7 +18933,7 @@ function c$(t, e, s = BE) {
|
|
|
18934
18933
|
try {
|
|
18935
18934
|
r.observe(t, o);
|
|
18936
18935
|
} catch (i) {
|
|
18937
|
-
|
|
18936
|
+
g.error(i);
|
|
18938
18937
|
}
|
|
18939
18938
|
return () => {
|
|
18940
18939
|
r && r.disconnect();
|
|
@@ -18949,7 +18948,7 @@ const HE = {
|
|
|
18949
18948
|
const e = t.event.currentTarget.getBoundingClientRect(), [s, r] = t.xy;
|
|
18950
18949
|
return s < e.left || s > e.right || r < e.top || r > e.bottom;
|
|
18951
18950
|
}
|
|
18952
|
-
}, Bn =
|
|
18951
|
+
}, Bn = g.createLogger({
|
|
18953
18952
|
name: "usePressGesture",
|
|
18954
18953
|
group: "kos-hooks"
|
|
18955
18954
|
});
|
|
@@ -19075,12 +19074,12 @@ function YE({
|
|
|
19075
19074
|
}, []), u = re((y) => {
|
|
19076
19075
|
const v = new Date(y);
|
|
19077
19076
|
o(v);
|
|
19078
|
-
}, []), d = GE(n, r), { hourOptions: h, minuteOptions: p, secondOptions: f, amPmOptions:
|
|
19077
|
+
}, []), d = GE(n, r), { hourOptions: h, minuteOptions: p, secondOptions: f, amPmOptions: m } = KE({
|
|
19079
19078
|
formatOptions: t,
|
|
19080
19079
|
locale: s
|
|
19081
19080
|
});
|
|
19082
19081
|
return {
|
|
19083
|
-
amPmOptions:
|
|
19082
|
+
amPmOptions: m,
|
|
19084
19083
|
formattedTime: d,
|
|
19085
19084
|
hourOptions: h,
|
|
19086
19085
|
minuteOptions: p,
|
|
@@ -19132,7 +19131,7 @@ function h$(t) {
|
|
|
19132
19131
|
return s ? /* @__PURE__ */ w(ww, { message: "Wait a moment while your project reloads..." }) : /* @__PURE__ */ w(t, { ...e });
|
|
19133
19132
|
};
|
|
19134
19133
|
}
|
|
19135
|
-
const ca =
|
|
19134
|
+
const ca = g.createLogger({
|
|
19136
19135
|
name: "studio-properties-service",
|
|
19137
19136
|
group: "Services"
|
|
19138
19137
|
}), WE = "/api/kos/studio/properties", xu = async (t) => {
|
|
@@ -19214,7 +19213,7 @@ let co = class {
|
|
|
19214
19213
|
}
|
|
19215
19214
|
if (e) {
|
|
19216
19215
|
const s = Object.keys(e).reduce((r, n) => (r[n] = e[n] ?? n, r), {});
|
|
19217
|
-
this.data.setValues(s ?? la),
|
|
19216
|
+
this.data.setValues(s ?? la), g.ifDebug(
|
|
19218
19217
|
() => this.logger.debug(`studio-properties loaded: ${JSON.stringify(s)}`)
|
|
19219
19218
|
);
|
|
19220
19219
|
}
|
|
@@ -19335,7 +19334,7 @@ export {
|
|
|
19335
19334
|
Zd as KosFetchMethods,
|
|
19336
19335
|
Fa as KosGlobalConfig,
|
|
19337
19336
|
ac as KosHttpRouteManager,
|
|
19338
|
-
|
|
19337
|
+
g as KosLog,
|
|
19339
19338
|
Uy as KosLogManager,
|
|
19340
19339
|
H_ as KosLogManagerServices,
|
|
19341
19340
|
Qa as KosLoggerFactory,
|