| 1332 | * @returns {any} |
| 1333 | */ |
| 1334 | export const resolveFlowObjValue = (obj: any, sourceObj: any): any => { |
| 1335 | if (typeof obj === 'object' && obj !== null) { |
| 1336 | const resolved: any = Array.isArray(obj) ? [] : {} |
| 1337 | for (const key in obj) { |
| 1338 | const value = obj[key] |
| 1339 | resolved[key] = resolveFlowObjValue(value, sourceObj) |
| 1340 | } |
| 1341 | return resolved |
| 1342 | } else if (typeof obj === 'string' && obj.startsWith('$flow')) { |
| 1343 | return customGet(sourceObj, obj) |
| 1344 | } else { |
| 1345 | return obj |
| 1346 | } |
| 1347 | } |
| 1348 | |
| 1349 | export const handleDocumentLoaderOutput = (docs: Document[], output: string) => { |
| 1350 | if (output === 'document') { |