Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
78 lines
3.1 KiB
TypeScript
78 lines
3.1 KiB
TypeScript
// Module ID: 16237
|
|
// Function ID: 16238
|
|
// Name: DeclarativeSystemNotifPermissionAnalytics
|
|
// Dependencies: [14727, 1078, 14733, 14729, 1245, 2]
|
|
// Exports: trackSystemNotifSettingsOpened, trackSystemNotifSettingsReenabled
|
|
|
|
// Module 16237 (DeclarativeSystemNotifPermissionAnalytics)
|
|
import Constants from "Constants" /* 1078 */;
|
|
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1245 */;
|
|
import NotificationSettingsConstants from "NotificationSettingsConstants" /* 14727 */;
|
|
import NotifTypes from "NotifTypes" /* 14729 */;
|
|
import notifications_NotificationSettingsUtils from "notifications/NotificationSettingsUtils" /* 14733 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
function getNotifTypesUsingSettings(items) {
|
|
const set1 = new Set();
|
|
const ids = [];
|
|
const names = [];
|
|
notifications_NotificationSettingsUtils;
|
|
for (const item10026 of tmp2) {
|
|
let notifType = item10026.notifType;
|
|
let hasItem = set.has(item10026.notifSetting);
|
|
if (hasItem) {
|
|
hasItem = !set1.has(notifType);
|
|
}
|
|
if (hasItem) {
|
|
let addResult = set1.add(notifType);
|
|
let _String = String;
|
|
let arr = ids.push(String(notifType));
|
|
let arr2 = names.push(NotifTypes.NotifTypes[notifType]);
|
|
}
|
|
continue;
|
|
}
|
|
return { ids, names };
|
|
}
|
|
const NOTIF_SETTINGS = NotificationSettingsConstants.NOTIF_SETTINGS;
|
|
const AnalyticEvents = Constants.AnalyticEvents;
|
|
const map = new Map(NOTIF_SETTINGS.map((item) => {
|
|
const items = [, ];
|
|
({ id: arr[0], string_id: arr[1] } = item);
|
|
return items;
|
|
}));
|
|
const result = size.fileFinishedImporting("modules/notifications/settings/DeclarativeSystemNotifPermissionAnalytics.tsx");
|
|
|
|
export const trackSystemNotifSettingsOpened = function trackSystemNotifSettingsOpened(notif_setting_id) {
|
|
value = map.get(notif_setting_id);
|
|
if (null != value) {
|
|
const items = [notif_setting_id];
|
|
const tmp3 = getNotifTypesUsingSettings(items);
|
|
const obj3 = { system_notif_channel_id: value, notif_setting_id, notif_type_ids: null, notif_type_names: null };
|
|
({ ids: obj2.notif_type_ids, names: obj2.notif_type_names } = tmp3);
|
|
AnalyticsUtilsDefault.track(AnalyticEvents.NOTIFICATION_SETTING_SYSTEM_SETTINGS_OPENED, obj3);
|
|
}
|
|
};
|
|
export const trackSystemNotifSettingsReenabled = function trackSystemNotifSettingsReenabled(disabledSettings, disabledSettings2, app_launch) {
|
|
const items = [];
|
|
const items1 = [];
|
|
const iter = disabledSettings[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
if (!set.has(nextResult)) {
|
|
value = map.get(tmp2);
|
|
if (null != value) {
|
|
let arr = items.push(tmp6);
|
|
let arr2 = items1.push(tmp2);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
if (0 !== items.length) {
|
|
const tmp13 = getNotifTypesUsingSettings(items1);
|
|
const obj = { reenabled_system_notif_channel_ids: items, reenabled_notif_setting_ids: items1, reenabled_notif_type_ids: null, reenabled_notif_type_names: null, source: null };
|
|
({ ids: obj3.reenabled_notif_type_ids, names: obj3.reenabled_notif_type_names } = tmp13);
|
|
obj.source = app_launch;
|
|
AnalyticsUtilsDefault.track(AnalyticEvents.NOTIFICATION_SETTING_SYSTEM_REENABLED, obj);
|
|
}
|
|
};
|