Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cae411eae7
commit
1c411e402e
19809 changed files with 1962608 additions and 97 deletions
19
frontend/node_modules/es-toolkit/dist/compat/array/flatten.mjs
generated
vendored
Normal file
19
frontend/node_modules/es-toolkit/dist/compat/array/flatten.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { isArrayLike } from "../predicate/isArrayLike.mjs";
|
||||
//#region src/compat/array/flatten.ts
|
||||
function flatten(value, depth = 1) {
|
||||
const result = [];
|
||||
const flooredDepth = Math.floor(depth);
|
||||
if (!isArrayLike(value)) return result;
|
||||
const recursive = (arr, currentDepth) => {
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
const item = arr[i];
|
||||
if (currentDepth < flooredDepth && (Array.isArray(item) || Boolean(item?.[Symbol.isConcatSpreadable]) || item !== null && typeof item === "object" && Object.prototype.toString.call(item) === "[object Arguments]")) if (Array.isArray(item)) recursive(item, currentDepth + 1);
|
||||
else recursive(Array.from(item), currentDepth + 1);
|
||||
else result.push(item);
|
||||
}
|
||||
};
|
||||
recursive(Array.from(value), 0);
|
||||
return result;
|
||||
}
|
||||
//#endregion
|
||||
export { flatten };
|
||||
Loading…
Add table
Add a link
Reference in a new issue