53 lines
1.8 KiB
TypeScript
53 lines
1.8 KiB
TypeScript
// Module ID: 6417
|
|
// Function ID: 6418
|
|
// Name: SettingSearchSessionAnalyticsManager
|
|
// Dependencies: [1267, 6418, 2]
|
|
|
|
// Module 6417 (SettingSearchSessionAnalyticsManager)
|
|
import v1 from "v1" /* 1267 */;
|
|
import Tracking from "Tracking" /* 6418 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
class SettingSearchSessionAnalyticsManager {
|
|
constructor() {
|
|
return Object.assign({ searchSessionId: null, searchSessionStartTime: null, isQueryEnteredTracked: false });
|
|
}
|
|
getSearchSessionId() {
|
|
return this.searchSessionId;
|
|
}
|
|
isSessionActive() {
|
|
return null != this.searchSessionId;
|
|
}
|
|
initialize() {
|
|
const obj = v1;
|
|
this.searchSessionId = obj.v4();
|
|
this.searchSessionStartTime = Date.now();
|
|
this.isQueryEnteredTracked = false;
|
|
}
|
|
maybeTrackQueryEntered() {
|
|
if (!this.isQueryEnteredTracked) {
|
|
const obj = Tracking;
|
|
const result = obj.trackSettingSearchQueryEntered();
|
|
tmp.isQueryEnteredTracked = true;
|
|
}
|
|
}
|
|
terminate() {
|
|
const self = this;
|
|
const tmp = null != this.searchSessionId && null != self.searchSessionStartTime;
|
|
if (tmp) {
|
|
const _Date = Date;
|
|
const obj = { searchSessionDuration: Date.now() - self.searchSessionStartTime };
|
|
const trackSettingSearchClosed = Tracking.trackSettingSearchClosed;
|
|
Tracking;
|
|
const result = trackSettingSearchClosed(obj);
|
|
self.searchSessionId = null;
|
|
self.searchSessionStartTime = null;
|
|
self.isQueryEnteredTracked = false;
|
|
}
|
|
}
|
|
}
|
|
const prototype = SettingSearchSessionAnalyticsManager.prototype;
|
|
const prototype2 = SettingSearchSessionAnalyticsManager.prototype;
|
|
let result = size.fileFinishedImporting("modules/settings/tracking/SettingSearchSessionAnalyticsManager.tsx");
|
|
|
|
export default Object.assign({ searchSessionId: null, searchSessionStartTime: null, isQueryEnteredTracked: false });
|