@camstack/addon-post-analysis 1.2.243 → 1.2.244
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/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-zMqSbyyP.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DqVUwKib.mjs} +2 -2
- package/dist/pipeline-analytics/{hostInit-CCJzKURF.mjs → hostInit-Bn-3U_Qz.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +59 -15
- package/dist/pipeline-analytics/index.mjs +59 -15
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
21
|
+
version: "1.2.196",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_pipeline_analytics_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.2.
|
|
36
|
+
version: "1.2.161",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_pipeline_analytics_widgets",
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.196",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.161",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
|
@@ -59701,10 +59701,24 @@ var StationaryObjectRegistry = class {
|
|
|
59701
59701
|
*/
|
|
59702
59702
|
async promote(entry, config) {
|
|
59703
59703
|
const occupant = findParkedOccupant(this.list(entry.deviceId), entry.className, entry.bbox, (config ?? this.matchConfig).suppressIou, (config ?? this.matchConfig).wakeAssocIou);
|
|
59704
|
-
if (occupant !== void 0)
|
|
59705
|
-
|
|
59706
|
-
|
|
59707
|
-
|
|
59704
|
+
if (occupant !== void 0) {
|
|
59705
|
+
const merged = this.absorbInto(occupant, entry);
|
|
59706
|
+
this.logger.info("stationary promotion absorbed — the spot is already censused", {
|
|
59707
|
+
tags: { deviceId: occupant.deviceId },
|
|
59708
|
+
meta: {
|
|
59709
|
+
deviceId: occupant.deviceId,
|
|
59710
|
+
entryId: occupant.id,
|
|
59711
|
+
className: occupant.className,
|
|
59712
|
+
refusedTrackId: entry.sourceTrackId,
|
|
59713
|
+
parkedForMs: entry.becameStationaryAt - occupant.becameStationaryAt,
|
|
59714
|
+
gainedLabel: occupant.label === void 0 && entry.label !== void 0
|
|
59715
|
+
}
|
|
59716
|
+
});
|
|
59717
|
+
return {
|
|
59718
|
+
outcome: "merged",
|
|
59719
|
+
entry: merged
|
|
59720
|
+
};
|
|
59721
|
+
}
|
|
59708
59722
|
this.indexEntry(entry.deviceId, entry.id);
|
|
59709
59723
|
this.dirty.delete(entry.id);
|
|
59710
59724
|
await this.ledger.put(entry);
|
|
@@ -59728,17 +59742,6 @@ var StationaryObjectRegistry = class {
|
|
|
59728
59742
|
};
|
|
59729
59743
|
this.ledger.stage(merged);
|
|
59730
59744
|
this.dirty.add(merged.id);
|
|
59731
|
-
this.logger.info("stationary promotion absorbed — the spot is already censused", {
|
|
59732
|
-
tags: { deviceId: occupant.deviceId },
|
|
59733
|
-
meta: {
|
|
59734
|
-
deviceId: occupant.deviceId,
|
|
59735
|
-
entryId: occupant.id,
|
|
59736
|
-
className: occupant.className,
|
|
59737
|
-
refusedTrackId: refused.sourceTrackId,
|
|
59738
|
-
parkedForMs: refused.becameStationaryAt - occupant.becameStationaryAt,
|
|
59739
|
-
gainedLabel: occupant.label === void 0 && refused.label !== void 0
|
|
59740
|
-
}
|
|
59741
|
-
});
|
|
59742
59745
|
return merged;
|
|
59743
59746
|
}
|
|
59744
59747
|
/**
|
|
@@ -59827,6 +59830,7 @@ var StationaryObjectRegistry = class {
|
|
|
59827
59830
|
}
|
|
59828
59831
|
});
|
|
59829
59832
|
this.strikeCountersByDevice.clear();
|
|
59833
|
+
for (const deviceId of [...this.idsByDevice.keys()]) this.collapseDuplicates(deviceId);
|
|
59830
59834
|
for (const id of [...this.dirty]) {
|
|
59831
59835
|
this.dirty.delete(id);
|
|
59832
59836
|
const entry = this.ledger.get(id);
|
|
@@ -59968,6 +59972,46 @@ var StationaryObjectRegistry = class {
|
|
|
59968
59972
|
/** Retire one entry: index, staged advance, pending strike and durable row
|
|
59969
59973
|
* all go. A strike that outlived its entry would arm the NEXT entry to reuse
|
|
59970
59974
|
* the id — the registry mints UUIDs, but the invariant is cheap to keep. */
|
|
59975
|
+
/**
|
|
59976
|
+
* Fold every row that holds another row's spot into the OLDEST of them.
|
|
59977
|
+
*
|
|
59978
|
+
* The survivor is the oldest because it is the one carrying the object's real
|
|
59979
|
+
* `becameStationaryAt` — "parked since 14:30" is the fact the operator reads,
|
|
59980
|
+
* and the duplicates are all later re-discoveries of the same thing. It
|
|
59981
|
+
* inherits any identity the losers carry and that it lacks, and the losers'
|
|
59982
|
+
* rows are deleted outright: a retirement would announce a departure that
|
|
59983
|
+
* never happened.
|
|
59984
|
+
*
|
|
59985
|
+
* Uses the same predicate as the filter and the birth guard, so a collapse
|
|
59986
|
+
* can only ever remove a row that could not have been independently confirmed
|
|
59987
|
+
* anyway.
|
|
59988
|
+
*/
|
|
59989
|
+
collapseDuplicates(deviceId) {
|
|
59990
|
+
const entries = [...this.list(deviceId)].sort((a, b) => a.becameStationaryAt - b.becameStationaryAt);
|
|
59991
|
+
if (entries.length < 2) return;
|
|
59992
|
+
const survivors = [];
|
|
59993
|
+
for (const candidate of entries) {
|
|
59994
|
+
const occupant = findParkedOccupant(survivors, candidate.className, candidate.bbox, this.matchConfig.suppressIou, this.matchConfig.wakeAssocIou);
|
|
59995
|
+
if (occupant === void 0) {
|
|
59996
|
+
survivors.push(candidate);
|
|
59997
|
+
continue;
|
|
59998
|
+
}
|
|
59999
|
+
const merged = this.absorbInto(occupant, candidate);
|
|
60000
|
+
survivors[survivors.indexOf(occupant)] = merged;
|
|
60001
|
+
this.dropEntry(deviceId, candidate.id);
|
|
60002
|
+
this.logger.info("stationary duplicate collapsed — two rows, one spot", {
|
|
60003
|
+
tags: { deviceId },
|
|
60004
|
+
meta: {
|
|
60005
|
+
deviceId,
|
|
60006
|
+
keptEntryId: occupant.id,
|
|
60007
|
+
droppedEntryId: candidate.id,
|
|
60008
|
+
className: candidate.className,
|
|
60009
|
+
keptSinceMs: occupant.becameStationaryAt,
|
|
60010
|
+
droppedSinceMs: candidate.becameStationaryAt
|
|
60011
|
+
}
|
|
60012
|
+
});
|
|
60013
|
+
}
|
|
60014
|
+
}
|
|
59971
60015
|
dropEntry(deviceId, id) {
|
|
59972
60016
|
this.idsByDevice.get(deviceId)?.delete(id);
|
|
59973
60017
|
this.dirty.delete(id);
|
|
@@ -59627,10 +59627,24 @@ var StationaryObjectRegistry = class {
|
|
|
59627
59627
|
*/
|
|
59628
59628
|
async promote(entry, config) {
|
|
59629
59629
|
const occupant = findParkedOccupant(this.list(entry.deviceId), entry.className, entry.bbox, (config ?? this.matchConfig).suppressIou, (config ?? this.matchConfig).wakeAssocIou);
|
|
59630
|
-
if (occupant !== void 0)
|
|
59631
|
-
|
|
59632
|
-
|
|
59633
|
-
|
|
59630
|
+
if (occupant !== void 0) {
|
|
59631
|
+
const merged = this.absorbInto(occupant, entry);
|
|
59632
|
+
this.logger.info("stationary promotion absorbed — the spot is already censused", {
|
|
59633
|
+
tags: { deviceId: occupant.deviceId },
|
|
59634
|
+
meta: {
|
|
59635
|
+
deviceId: occupant.deviceId,
|
|
59636
|
+
entryId: occupant.id,
|
|
59637
|
+
className: occupant.className,
|
|
59638
|
+
refusedTrackId: entry.sourceTrackId,
|
|
59639
|
+
parkedForMs: entry.becameStationaryAt - occupant.becameStationaryAt,
|
|
59640
|
+
gainedLabel: occupant.label === void 0 && entry.label !== void 0
|
|
59641
|
+
}
|
|
59642
|
+
});
|
|
59643
|
+
return {
|
|
59644
|
+
outcome: "merged",
|
|
59645
|
+
entry: merged
|
|
59646
|
+
};
|
|
59647
|
+
}
|
|
59634
59648
|
this.indexEntry(entry.deviceId, entry.id);
|
|
59635
59649
|
this.dirty.delete(entry.id);
|
|
59636
59650
|
await this.ledger.put(entry);
|
|
@@ -59654,17 +59668,6 @@ var StationaryObjectRegistry = class {
|
|
|
59654
59668
|
};
|
|
59655
59669
|
this.ledger.stage(merged);
|
|
59656
59670
|
this.dirty.add(merged.id);
|
|
59657
|
-
this.logger.info("stationary promotion absorbed — the spot is already censused", {
|
|
59658
|
-
tags: { deviceId: occupant.deviceId },
|
|
59659
|
-
meta: {
|
|
59660
|
-
deviceId: occupant.deviceId,
|
|
59661
|
-
entryId: occupant.id,
|
|
59662
|
-
className: occupant.className,
|
|
59663
|
-
refusedTrackId: refused.sourceTrackId,
|
|
59664
|
-
parkedForMs: refused.becameStationaryAt - occupant.becameStationaryAt,
|
|
59665
|
-
gainedLabel: occupant.label === void 0 && refused.label !== void 0
|
|
59666
|
-
}
|
|
59667
|
-
});
|
|
59668
59671
|
return merged;
|
|
59669
59672
|
}
|
|
59670
59673
|
/**
|
|
@@ -59753,6 +59756,7 @@ var StationaryObjectRegistry = class {
|
|
|
59753
59756
|
}
|
|
59754
59757
|
});
|
|
59755
59758
|
this.strikeCountersByDevice.clear();
|
|
59759
|
+
for (const deviceId of [...this.idsByDevice.keys()]) this.collapseDuplicates(deviceId);
|
|
59756
59760
|
for (const id of [...this.dirty]) {
|
|
59757
59761
|
this.dirty.delete(id);
|
|
59758
59762
|
const entry = this.ledger.get(id);
|
|
@@ -59894,6 +59898,46 @@ var StationaryObjectRegistry = class {
|
|
|
59894
59898
|
/** Retire one entry: index, staged advance, pending strike and durable row
|
|
59895
59899
|
* all go. A strike that outlived its entry would arm the NEXT entry to reuse
|
|
59896
59900
|
* the id — the registry mints UUIDs, but the invariant is cheap to keep. */
|
|
59901
|
+
/**
|
|
59902
|
+
* Fold every row that holds another row's spot into the OLDEST of them.
|
|
59903
|
+
*
|
|
59904
|
+
* The survivor is the oldest because it is the one carrying the object's real
|
|
59905
|
+
* `becameStationaryAt` — "parked since 14:30" is the fact the operator reads,
|
|
59906
|
+
* and the duplicates are all later re-discoveries of the same thing. It
|
|
59907
|
+
* inherits any identity the losers carry and that it lacks, and the losers'
|
|
59908
|
+
* rows are deleted outright: a retirement would announce a departure that
|
|
59909
|
+
* never happened.
|
|
59910
|
+
*
|
|
59911
|
+
* Uses the same predicate as the filter and the birth guard, so a collapse
|
|
59912
|
+
* can only ever remove a row that could not have been independently confirmed
|
|
59913
|
+
* anyway.
|
|
59914
|
+
*/
|
|
59915
|
+
collapseDuplicates(deviceId) {
|
|
59916
|
+
const entries = [...this.list(deviceId)].sort((a, b) => a.becameStationaryAt - b.becameStationaryAt);
|
|
59917
|
+
if (entries.length < 2) return;
|
|
59918
|
+
const survivors = [];
|
|
59919
|
+
for (const candidate of entries) {
|
|
59920
|
+
const occupant = findParkedOccupant(survivors, candidate.className, candidate.bbox, this.matchConfig.suppressIou, this.matchConfig.wakeAssocIou);
|
|
59921
|
+
if (occupant === void 0) {
|
|
59922
|
+
survivors.push(candidate);
|
|
59923
|
+
continue;
|
|
59924
|
+
}
|
|
59925
|
+
const merged = this.absorbInto(occupant, candidate);
|
|
59926
|
+
survivors[survivors.indexOf(occupant)] = merged;
|
|
59927
|
+
this.dropEntry(deviceId, candidate.id);
|
|
59928
|
+
this.logger.info("stationary duplicate collapsed — two rows, one spot", {
|
|
59929
|
+
tags: { deviceId },
|
|
59930
|
+
meta: {
|
|
59931
|
+
deviceId,
|
|
59932
|
+
keptEntryId: occupant.id,
|
|
59933
|
+
droppedEntryId: candidate.id,
|
|
59934
|
+
className: candidate.className,
|
|
59935
|
+
keptSinceMs: occupant.becameStationaryAt,
|
|
59936
|
+
droppedSinceMs: candidate.becameStationaryAt
|
|
59937
|
+
}
|
|
59938
|
+
});
|
|
59939
|
+
}
|
|
59940
|
+
}
|
|
59897
59941
|
dropEntry(deviceId, id) {
|
|
59898
59942
|
this.idsByDevice.get(deviceId)?.delete(id);
|
|
59899
59943
|
this.dirty.delete(id);
|
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DqVUwKib.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-post-analysis",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.244",
|
|
4
4
|
"description": "Post-Analysis bundle — enrichment, embedding-encoder, pipeline-analytics. Multi-entry npm package shipping addons that consume pipeline output.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|