decord/source/1507_nanoid.js

116 lines
3.7 KiB
JavaScript
Raw Normal View History

2026-08-11 06:20:06 +00:00
// Module ID: 1507
// Function ID: 1508
2026-07-23 10:11:24 +00:00
// Name: nanoid
2026-08-11 06:20:06 +00:00
// Dependencies: [1508]
2026-07-20 16:05:17 +00:00
2026-08-11 06:20:06 +00:00
// Module 1507 (nanoid)
2026-07-23 10:11:24 +00:00
const require = arg1;
const dependencyMap = arg6;
2026-08-06 08:05:19 +00:00
arg5.BaseRouter = {
getStateForAction(routeNames, type) {
let closure_0 = type;
2026-07-20 16:05:17 +00:00
type = type.type;
2026-08-06 08:05:19 +00:00
if ("SET_PARAMS" !== type) {
if ("REPLACE_PARAMS" !== type) {
if ("RESET" === type) {
const payload = type.payload;
if (null == payload) {
return null;
} else {
const _Set = Set;
const set = new Set(routeNames.routeNames);
let tmp8 = null;
if (0 !== payload.routes.length) {
const routes2 = payload.routes;
tmp8 = null;
if (!routes2.some((name) => !set.has(name.name))) {
let tmp3 = payload;
if (false === payload.stale) {
let tmp4 = null;
if (routeNames.routeNames.length === payload.routeNames.length) {
routeNames = payload.routeNames;
tmp4 = null;
if (!routeNames.some((arg0) => !set.has(arg0))) {
const _Number = Number;
tmp4 = null;
if (Number.isInteger(payload.index)) {
tmp4 = null;
if (payload.index >= 0) {
tmp4 = null;
if (payload.index < payload.routes.length) {
let obj = {};
let merged = Object.assign(payload);
let routes = payload.routes;
obj.routes = routes.map((name) => {
if (!("key" in name)) {
const obj = {};
const merged = Object.assign(name);
const _HermesInternal = HermesInternal;
obj.key = "" + name.name + "-" + type(index[0]).nanoid();
let tmp = obj;
const obj2 = type(index[0]);
} else {
tmp = name;
}
return tmp;
});
tmp4 = obj;
}
}
}
}
2026-07-20 16:05:17 +00:00
}
2026-08-06 08:05:19 +00:00
tmp3 = tmp4;
}
tmp8 = tmp3;
2026-07-20 16:05:17 +00:00
}
}
2026-08-06 08:05:19 +00:00
return tmp8;
2026-07-20 16:05:17 +00:00
}
2026-08-06 08:05:19 +00:00
} else {
return null;
2026-07-20 16:05:17 +00:00
}
}
2026-08-06 08:05:19 +00:00
}
if (type.source) {
routes = routeNames.routes;
let index = routes.findIndex((key) => key.key === type.source);
2026-07-20 16:05:17 +00:00
} else {
2026-08-06 08:05:19 +00:00
index = routeNames.index;
2026-07-20 16:05:17 +00:00
}
2026-08-06 08:05:19 +00:00
let tmp9 = null;
if (-1 !== index) {
obj = {};
let merged1 = Object.assign(routeNames);
const routes1 = routeNames.routes;
obj.routes = routes1.map((params) => {
let payload;
if (arg1 !== index) {
return params;
} else {
const obj = {};
const merged = Object.assign(params);
payload = type;
if ("REPLACE_PARAMS" === type.type) {
({ payload, params } = payload);
} else {
params = {};
const merged1 = Object.assign(params.params);
const merged2 = Object.assign(payload.payload.params);
}
obj.params = params;
}
});
tmp9 = obj;
}
return tmp9;
2026-07-20 16:05:17 +00:00
},
shouldActionChangeFocus(type) {
2026-08-06 08:05:19 +00:00
let tmp = "NAVIGATE" === type.type;
if (!tmp) {
tmp = "NAVIGATE_DEPRECATED" === type.type;
}
return tmp;
2026-07-20 16:05:17 +00:00
}
};