decord/source/modules/search/managers/AbstractSearchSessionAnalyticsManager.tsx

99 lines
3.1 KiB
TypeScript
Raw Normal View History

// Module ID: 12455
// Function ID: 12456
// Name: AbstractSearchSessionAnalyticsManager
// Dependencies: [1256, 12435, 2]
2026-07-20 16:05:17 +00:00
// Module 12455 (AbstractSearchSessionAnalyticsManager)
import v1 from "v1" /* 1256 */;
import SearchUtils from "SearchUtils" /* 12435 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
let result = size.fileFinishedImporting("modules/search/managers/AbstractSearchSessionAnalyticsManager.tsx");
2026-07-29 08:29:29 +00:00
class AbstractSearchSessionAnalyticsManager {
constructor() {
merged = Object.assign({ sessions: null });
2026-07-29 08:29:29 +00:00
map = new Map();
merged[0] = map;
return merged;
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = AbstractSearchSessionAnalyticsManager.prototype;
prototype["getSession"] = function getSession(searchContext) {
const sessions = this.sessions;
value = sessions.get(SearchUtils.getSearchContextId(searchContext));
2026-07-29 08:29:29 +00:00
if (value == null) {
value = null;
}
return value;
};
prototype["setSession"] = function setSession(searchContext, arg1) {
const searchContextId = SearchUtils.getSearchContextId(searchContext);
2026-07-29 08:29:29 +00:00
const sessions = this.sessions;
value = sessions.get(searchContextId);
2026-07-29 08:29:29 +00:00
if (value == null) {
const obj2 = { sessionId: v1.v4(), searchQueryId: null };
value = obj2;
2026-08-24 06:08:38 +00:00
const tmpResult = v1;
2026-07-29 08:29:29 +00:00
}
const sessions2 = this.sessions;
const merged = Object.assign(value);
const merged1 = Object.assign(arg1);
const result = sessions2.set(searchContextId, {});
2026-07-29 08:29:29 +00:00
};
prototype["deleteSession"] = function deleteSession(searchContext) {
const sessions = this.sessions;
sessions.delete(SearchUtils.getSearchContextId(searchContext));
2026-07-29 08:29:29 +00:00
};
prototype["getSessionId"] = function getSessionId(arg0) {
const session = this.getSession(arg0);
let sessionId;
if (session != null) {
sessionId = session.sessionId;
}
if (sessionId == null) {
sessionId = null;
}
return sessionId;
};
prototype["getQueryId"] = function getQueryId(arg0) {
const session = this.getSession(arg0);
let searchQueryId;
if (session != null) {
searchQueryId = session.searchQueryId;
}
if (searchQueryId == null) {
searchQueryId = null;
}
return searchQueryId;
};
prototype["refreshQueryId"] = function refreshQueryId(searchContext) {
2026-08-24 06:08:38 +00:00
const obj = { searchQueryId: v1.v4() };
2026-07-29 08:29:29 +00:00
this.setSession(searchContext, obj);
};
prototype["initialize"] = function initialize(arg0) {
const items = [arg0, ...HermesBuiltin.copyRestArgs()];
this._initialize.apply(items);
2026-08-24 06:08:38 +00:00
const obj = { sessionId: v1.v4(), searchQueryId: null };
2026-07-29 08:29:29 +00:00
this.setSession(arg0, obj);
};
prototype["terminate"] = function terminate(arg0) {
this._terminate(arg0);
this.deleteSession(arg0);
};
prototype["transferSession"] = function transferSession(arg0, searchContext) {
const self = this;
this._transferSession(arg0, searchContext);
let session = this.getSession(arg0);
const sessions = this.sessions;
const searchContextId = SearchUtils.getSearchContextId(searchContext);
2026-07-29 08:29:29 +00:00
if (session == null) {
const obj2 = { sessionId: v1.v4(), searchQueryId: null };
session = obj2;
2026-08-24 06:08:38 +00:00
const tmp3Result = v1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const result = sessions.set(searchContextId, session);
self.deleteSession(arg0);
};
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default AbstractSearchSessionAnalyticsManager;