vue-hook-optimizer 0.0.53 → 0.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
    
        package/dist/index.js.map
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            {"version":3,"sources":["../src/index.ts","../src/analyze/template.ts","../src/analyze/setupScript.ts","../src/analyze/utils.ts","../src/analyze/options.ts","../src/analyze/tsx.ts","../src/utils/traverse.ts","../src/suggest/split.ts","../src/suggest/filter.ts","../src/suggest/utils.ts","../src/suggest/index.ts","../src/vis.ts"],"sourcesContent":["export { parse } from '@vue/compiler-sfc';\nexport * from './analyze';\nexport * from './suggest';\nexport { getVisData } from './vis';\nexport type { TypedNode } from './analyze/utils';\nexport { NodeType } from './analyze/utils';\n","import { babelParse, compileTemplate } from '@vue/compiler-sfc';\nimport _traverse from '@babel/traverse';\n\nconst traverse: typeof _traverse\n  // @ts-expect-error unwarp default\n  = _traverse.default?.default || _traverse.default || _traverse;\n\nexport function analyze(\n  content: string,\n) {\n  const id = 'template';\n  const { code } = compileTemplate({\n    id,\n    source: content,\n    filename: `${id}.js`,\n  });\n\n  // console.log(code);\n  const ast = babelParse(code, { sourceType: 'module', plugins: [\n    'typescript',\n  ] });\n\n  // ----\n\n  const nodes = new Set<string>();\n\n  traverse(ast, {\n    MemberExpression(path) {\n      if (path.type === 'MemberExpression') {\n        if (path.node.object && path.node.object.type === 'Identifier' && path.node.object.name === '_ctx') {\n          if (path.node.property && path.node.property.type === 'Identifier') {\n            nodes.add(path.node.property.name);\n          }\n        }\n      }\n    },\n    ObjectProperty(path) {\n      if (path.node.key.type === 'Identifier' && path.node.key.name === 'ref') {\n        if (path.node.value.type === 'StringLiteral') {\n          const name = path.node.value.value;\n          name && nodes.add(name);\n        }\n      }\n    },\n    // component\n    CallExpression(path) {\n      if (path.node.callee.type === 'Identifier' && path.node.callee.name === '_resolveComponent') {\n        if (path.node.arguments[0].type === 'StringLiteral') {\n          const name = path.node.arguments[0].value;\n          name && nodes.add(name);\n        }\n      }\n    },\n  });\n\n  return nodes;\n}\n","import { babelParse } from '@vue/compiler-sfc';\nimport type { Scope } from '@babel/traverse';\nimport _traverse from '@babel/traverse';\nimport type * as t from '@babel/types';\nimport { NodeCollection, NodeType, getComment } from './utils';\n\nconst traverse: typeof _traverse\n  // @ts-expect-error unwarp default\n  = _traverse.default?.default || _traverse.default || _traverse;\n\nexport function processSetup(\n  ast: t.Node,\n  parentScope?: Scope,\n  parentPath?: t.Node,\n  _spread?: string[],\n  _lineOffset = 0,\n) {\n  const spread = _spread || [];\n\n  const nodeCollection = new NodeCollection(_lineOffset);\n\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n    spread: new Map<string, Set<string>>(),\n  };\n\n  traverse(ast, {\n    VariableDeclaration(path) {\n      path.node.declarations.forEach((declaration) => {\n        if (declaration.id.type === 'ArrayPattern') {\n          declaration.id.elements.forEach((element) => {\n            if (element?.type === 'Identifier') {\n              const name = element.name;\n              const binding = path.scope.getBinding(name);\n\n              if (\n                binding\n                && (path.parent.type === 'Program'\n                || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n                )\n                && !(declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && ['defineProps', 'defineEmits'].includes(declaration.init?.callee.name)\n                )\n              ) {\n                graph.nodes.add(name);\n                nodeCollection.addNode(name, element, {\n                  comment: getComment(path.node),\n                });\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                }\n              }\n            }\n            if (element?.type === 'RestElement' && element.argument.type === 'Identifier') {\n              const name = element.argument.name;\n              const binding = path.scope.getBinding(name);\n\n              if (\n                binding\n                && (path.parent.type === 'Program'\n                || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n                )\n                && !(declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && ['defineProps', 'defineEmits'].includes(declaration.init?.callee.name)\n                )\n              ) {\n                graph.nodes.add(name);\n                nodeCollection.addNode(name, element.argument, {\n                  comment: getComment(path.node),\n                });\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                }\n              }\n            }\n          });\n        }\n        if (declaration.id.type === 'ObjectPattern') {\n          declaration.id.properties.forEach((property) => {\n            if (property.type === 'ObjectProperty' && property.value.type === 'Identifier') {\n              const name = property.value.name;\n              const binding = path.scope.getBinding(name);\n              if (\n                binding\n                && (path.parent.type === 'Program'\n                || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n                )\n                && !(declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && ['defineProps', 'defineEmits'].includes(declaration.init?.callee.name)\n                )\n              ) {\n                graph.nodes.add(name);\n                nodeCollection.addNode(name, property.value, {\n                  comment: getComment(property),\n                });\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                }\n              }\n            }\n\n            if (property.type === 'RestElement' && property.argument.type === 'Identifier') {\n              const name = property.argument.name;\n              const binding = path.scope.getBinding(name);\n              if (\n                binding\n                && (path.parent.type === 'Program'\n                || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n                )\n                && !(declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && ['defineProps', 'defineEmits'].includes(declaration.init?.callee.name)\n                )\n              ) {\n                graph.nodes.add(name);\n                nodeCollection.addNode(name, property.argument, {\n                  comment: getComment(property),\n                });\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                }\n              }\n            }\n          });\n        }\n        if (declaration.id?.type === 'Identifier') {\n          const name = declaration.id.name;\n          const binding = path.scope.getBinding(name);\n          if (\n            binding\n            && (path.parent.type === 'Program'\n            || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n            )\n            && !(declaration.init?.type === 'CallExpression'\n            && declaration.init?.callee.type === 'Identifier'\n            && ['defineProps', 'defineEmits'].includes(declaration.init?.callee.name)\n            )\n          ) {\n            graph.nodes.add(name);\n            nodeCollection.addNode(name, declaration, {\n              comment: getComment(path.node),\n            });\n            if (!graph.edges.get(name)) {\n              graph.edges.set(name, new Set());\n            }\n\n            if (spread.includes(name)) {\n              if (declaration.init?.type === 'ObjectExpression') {\n                declaration.init?.properties.forEach((prop) => {\n                  if (\n                    (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod')\n                    && prop.key.type === 'Identifier'\n                  ) {\n                    const keyName = prop.key.name;\n                    graph.nodes.add(keyName);\n                    nodeCollection.addNode(keyName, prop, {\n                      comment: getComment(prop),\n                    });\n                    if (!graph.edges.get(keyName)) {\n                      graph.edges.set(keyName, new Set());\n                    }\n                    if (graph.spread.has(name)) {\n                      graph.spread.get(name)?.add(keyName);\n                    }\n                    else {\n                      graph.spread.set(name, new Set([keyName]));\n                    }\n                  }\n                  else if (prop.type === 'SpreadElement') {\n                    console.warn('not support spread in spread');\n                  }\n                });\n              }\n              if (\n                declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && declaration.init?.callee.name === 'reactive'\n              ) {\n                const arg = declaration.init?.arguments[0];\n                if (arg.type === 'ObjectExpression') {\n                  arg.properties.forEach((prop) => {\n                    if (\n                      (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod')\n                      && prop.key.type === 'Identifier'\n                    ) {\n                      const keyName = prop.key.name;\n                      graph.nodes.add(keyName);\n                      nodeCollection.addNode(keyName, prop, {\n                        comment: getComment(prop),\n                      });\n                      if (!graph.edges.get(keyName)) {\n                        graph.edges.set(keyName, new Set());\n                      }\n                      if (graph.spread.has(name)) {\n                        graph.spread.get(name)?.add(keyName);\n                      }\n                      else {\n                        graph.spread.set(name, new Set([keyName]));\n                      }\n                    }\n                    else if (prop.type === 'SpreadElement') {\n                      console.warn('not support spread in spread');\n                    }\n                  });\n                }\n              }\n            }\n          }\n        }\n      });\n    },\n    FunctionDeclaration(path) {\n      const name = path.node.id?.name;\n      if (name) {\n        const binding = path.scope.getBinding(name);\n        if (binding && (path.parent.type === 'Program'\n          || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n        )) {\n          graph.nodes.add(name);\n          nodeCollection.addNode(name, path.node.id!, {\n            isMethod: true,\n            comment: getComment(path.node),\n          });\n          if (!graph.edges.get(name)) {\n            graph.edges.set(name, new Set());\n          }\n        }\n      }\n    },\n  }, parentScope, parentPath);\n\n  // get the relation between the variable and the function\n\n  traverse(ast, {\n    FunctionDeclaration(path) {\n      const name = path.node.id?.name;\n      if (name && graph.nodes.has(name)) {\n        traverse(path.node.body, {\n          Identifier(path1) {\n            const binding = path1.scope.getBinding(path1.node.name);\n            if (\n              graph.nodes.has(path1.node.name)\n              && (\n                (path1.parent.type !== 'MemberExpression'\n                && path1.parent.type !== 'OptionalMemberExpression')\n                || path1.parent.object === path1.node\n              )\n              && (binding?.scope.block.type === 'Program'\n              || (parentScope === binding?.scope)\n              )\n            ) {\n              graph.edges.get(name)?.add(path1.node.name);\n            }\n          },\n          MemberExpression(path1) {\n            if (\n              path1.node.object.type === 'Identifier'\n              && spread.includes(path1.node.object.name)\n            ) {\n              const binding = path1.scope.getBinding(path1.node.object.name);\n              if (\n                spread.includes(path1.node.object.name)\n                && path1.node.property.type === 'Identifier'\n                && (binding?.scope.block.type === 'Program'\n                || (parentScope === binding?.scope)\n                )\n              ) {\n                graph.edges.get(name)?.add(path1.node.property.name);\n              }\n            }\n          },\n        }, path.scope, path);\n      }\n    },\n\n    VariableDeclarator(path) {\n      if (path.node.init) {\n        if (path.node.id.type === 'ArrayPattern') {\n          path.node.id.elements.forEach((element) => {\n            if (element?.type === 'Identifier') {\n              const name = element.name;\n              if (name && graph.nodes.has(name) && path.node.init?.type === 'CallExpression') {\n                traverse(path.node.init, {\n                  Identifier(path1) {\n                    const binding = path1.scope.getBinding(path1.node.name);\n                    if (\n                      graph.nodes.has(path1.node.name)\n                      && (\n                        (path1.parent.type !== 'MemberExpression'\n                        && path1.parent.type !== 'OptionalMemberExpression')\n                        || path1.parent.object === path1.node\n                      )\n                      && (binding?.scope.block.type === 'Program'\n                      || (parentScope === binding?.scope)\n                      )\n                    ) {\n                      graph.edges.get(name)?.add(path1.node.name);\n                    }\n                  },\n                  MemberExpression(path1) {\n                    if (\n                      path1.node.object.type === 'Identifier'\n                      && spread.includes(path1.node.object.name)\n                    ) {\n                      const binding = path1.scope.getBinding(path1.node.object.name);\n                      if (\n                        spread.includes(path1.node.object.name)\n                        && path1.node.property.type === 'Identifier'\n                        && (binding?.scope.block.type === 'Program'\n                        || (parentScope === binding?.scope)\n                        )\n                      ) {\n                        graph.edges.get(name)?.add(path1.node.property.name);\n                      }\n                    }\n                  },\n                }, path.scope, path);\n              }\n            }\n          });\n        }\n        else if (path.node.id.type === 'ObjectPattern') {\n          path.node.id.properties.forEach((property) => {\n            if (property.type === 'ObjectProperty' && property.value.type === 'Identifier') {\n              const name = property.value.name;\n              if (name && graph.nodes.has(name) && path.node.init) {\n                traverse(path.node.init, {\n                  Identifier(path1) {\n                    const binding = path1.scope.getBinding(path1.node.name);\n                    if (\n                      graph.nodes.has(path1.node.name)\n                      && (\n                        (path1.parent.type !== 'MemberExpression'\n                        && path1.parent.type !== 'OptionalMemberExpression')\n                        || path1.parent.object === path1.node\n                      )\n                      && (binding?.scope.block.type === 'Program'\n                      || (parentScope === binding?.scope)\n                      )\n                    ) {\n                      graph.edges.get(name)?.add(path1.node.name);\n                    }\n                  },\n                  MemberExpression(path1) {\n                    if (\n                      path1.node.object.type === 'Identifier'\n                      && spread.includes(path1.node.object.name)\n                    ) {\n                      const binding = path1.scope.getBinding(path1.node.object.name);\n                      if (\n                        spread.includes(path1.node.object.name)\n                        && path1.node.property.type === 'Identifier'\n                        && (binding?.scope.block.type === 'Program'\n                        || (parentScope === binding?.scope)\n                        )\n                      ) {\n                        graph.edges.get(name)?.add(path1.node.property.name);\n                      }\n                    }\n                  },\n                }, path.scope, path);\n              }\n            }\n          });\n        }\n        else if ([\n          'CallExpression',\n          'ArrowFunctionExpression',\n          'FunctionDeclaration',\n        ].includes(path.node.init.type)\n        && path.node.id.type === 'Identifier'\n        ) {\n          const name = path.node.id?.name;\n          if (name && graph.nodes.has(name)) {\n            traverse(path.node.init, {\n              Identifier(path1) {\n                const binding = path1.scope.getBinding(path1.node.name);\n                if (\n                  graph.nodes.has(path1.node.name)\n                  && (\n                    (path1.parent.type !== 'MemberExpression'\n                    && path1.parent.type !== 'OptionalMemberExpression')\n                    || path1.parent.object === path1.node\n                  )\n                  && (binding?.scope.block.type === 'Program'\n                  || (parentScope === binding?.scope)\n                  )\n                ) {\n                  graph.edges.get(name)?.add(path1.node.name);\n                }\n              },\n              MemberExpression(path1) {\n                if (\n                  path1.node.object.type === 'Identifier'\n                  && spread.includes(path1.node.object.name)\n                ) {\n                  const binding = path1.scope.getBinding(path1.node.object.name);\n                  if (\n                    spread.includes(path1.node.object.name)\n                    && path1.node.property.type === 'Identifier'\n                    && (binding?.scope.block.type === 'Program'\n                    || (parentScope === binding?.scope)\n                    )\n                  ) {\n                    graph.edges.get(name)?.add(path1.node.property.name);\n                  }\n                }\n              },\n            }, path.scope, path);\n          }\n        }\n        else if (path.node.id.type === 'Identifier') {\n          const name = path.node.id.name;\n          if (path.node.init.type === 'Identifier') {\n            const binding = path.scope.getBinding(path.node.init.name);\n            if (\n              graph.nodes.has(path.node.init.name)\n              && (binding?.scope.block.type === 'Program'\n              || (parentScope === binding?.scope)\n              )\n            ) {\n              graph.edges.get(name)?.add(path.node.init.name);\n            }\n          }\n          else {\n            traverse(path.node.init, {\n              Identifier(path1) {\n                const binding = path1.scope.getBinding(path1.node.name);\n                if (\n                  graph.nodes.has(path1.node.name)\n                  && (\n                    (path1.parent.type !== 'MemberExpression'\n                    && path1.parent.type !== 'OptionalMemberExpression')\n                    || path1.parent.object === path1.node\n                  )\n                  && (binding?.scope.block.type === 'Program'\n                  || (parentScope === binding?.scope)\n                  )\n                ) {\n                  graph.edges.get(name)?.add(path1.node.name);\n                }\n              },\n            }, path.scope, path);\n          }\n        }\n      }\n    },\n\n    ObjectMethod(path) {\n      if (path.node.key.type === 'Identifier' && graph.nodes.has(path.node.key.name)) {\n        const name = path.node.key.name;\n\n        traverse(path.node.body, {\n          Identifier(path1) {\n            const binding = path1.scope.getBinding(path1.node.name);\n            if (\n              graph.nodes.has(path1.node.name)\n              && (\n                (path1.parent.type !== 'MemberExpression'\n                && path1.parent.type !== 'OptionalMemberExpression')\n                || path1.parent.object === path1.node\n              )\n              && (binding?.scope.block.type === 'Program'\n              || (parentScope === binding?.scope)\n              )\n            ) {\n              graph.edges.get(name)?.add(path1.node.name);\n            }\n          },\n          MemberExpression(path1) {\n            if (\n              path1.node.object.type === 'Identifier'\n              && spread.includes(path1.node.object.name)\n            ) {\n              const binding = path1.scope.getBinding(path1.node.object.name);\n              if (\n                spread.includes(path1.node.object.name)\n                && path1.node.property.type === 'Identifier'\n                && (binding?.scope.block.type === 'Program'\n                || (parentScope === binding?.scope)\n                )\n              ) {\n                graph.edges.get(name)?.add(path1.node.property.name);\n              }\n            }\n          },\n        }, path.scope, path);\n      }\n    },\n\n    ObjectProperty(path) {\n      if (path.node.key.type === 'Identifier' && graph.nodes.has(path.node.key.name)) {\n        const name = path.node.key.name;\n\n        traverse(path.node.value, {\n          MemberExpression(path1) {\n            if (\n              path1.node.object.type === 'Identifier'\n              && spread.includes(path1.node.object.name)\n            ) {\n              const binding = path1.scope.getBinding(path1.node.object.name);\n              if (\n                spread.includes(path1.node.object.name)\n                && path1.node.property.type === 'Identifier'\n                && (binding?.scope.block.type === 'Program'\n                || (parentScope === binding?.scope)\n                )\n              ) {\n                graph.edges.get(name)?.add(path1.node.property.name);\n              }\n            }\n          },\n        }, path.scope, path);\n      }\n    },\n\n    ExpressionStatement(path) {\n      if (path.node.expression.type === 'CallExpression' && path.node.expression.callee.type === 'Identifier') {\n        const hookName = path.node.expression.callee.name;\n        const hookBinding = path.scope.getBinding(hookName);\n        if (!(hookBinding === undefined || hookBinding?.scope.block.type === 'Program'\n          || parentScope === hookBinding?.scope)) {\n          return;\n        }\n\n        const watchArgs = new Set<t.Identifier>();\n        if (hookName === 'watch') {\n          if (path.node.expression.arguments[0].type === 'Identifier') {\n            const binding = path.scope.getBinding(path.node.expression.arguments[0].name);\n            if (\n              graph.nodes.has(path.node.expression.arguments[0].name)\n              && (binding?.scope.block.type === 'Program'\n              || parentScope === binding?.scope)\n            ) {\n              watchArgs.add(path.node.expression.arguments[0]);\n            }\n          }\n          else {\n            traverse(path.node.expression.arguments[0], {\n              Identifier(path1) {\n                const binding = path1.scope.getBinding(path1.node.name);\n                if (\n                  graph.nodes.has(path1.node.name)\n                  && (\n                    (path1.parent.type !== 'MemberExpression'\n                    && path1.parent.type !== 'OptionalMemberExpression')\n                    || path1.parent.object === path1.node\n                  )\n                  && (binding?.scope.block.type === 'Program'\n                  || parentScope === binding?.scope)\n                ) {\n                  watchArgs.add(path1.node);\n                }\n              },\n            }, path.scope, path);\n          }\n        }\n        else if (hookName === 'useEffect' && path.node.expression.arguments[1].type === 'ArrayExpression') {\n          traverse(path.node.expression.arguments[1], {\n            Identifier(path1) {\n              const binding = path1.scope.getBinding(path1.node.name);\n              if (\n                graph.nodes.has(path1.node.name)\n                && (\n                  (path1.parent.type !== 'MemberExpression'\n                  && path1.parent.type !== 'OptionalMemberExpression')\n                  || path1.parent.object === path1.node\n                )\n                && (binding?.scope.block.type === 'Program'\n                || parentScope === binding?.scope)\n              ) {\n                watchArgs.add(path1.node);\n              }\n            },\n          }, path.scope, path);\n        }\n        path.node.expression.arguments.forEach((argNode, index) => {\n          if (hookName === 'watch' && index === 0 && argNode.type === 'Identifier') {\n            const _node = nodeCollection.getNode(argNode.name);\n            if (_node?.info?.used) {\n              _node?.info?.used?.add(hookName);\n            }\n            else if (_node) {\n              _node.info = {\n                ..._node?.info,\n                used: new Set([hookName]),\n              };\n            }\n            return;\n          }\n          traverse(argNode, {\n            Identifier(path1) {\n              const binding = path1.scope.getBinding(path1.node.name);\n              if (\n                graph.nodes.has(path1.node.name)\n                && (\n                  (path1.parent.type !== 'MemberExpression'\n                  && path1.parent.type !== 'OptionalMemberExpression')\n                  || path1.parent.object === path1.node\n                )\n                && (binding?.scope.block.type === 'Program'\n                || parentScope === binding?.scope)\n              ) {\n                if (['watch', 'useEffect'].includes(hookName) && watchArgs.size > 0) {\n                  const watchArgsNames = Array.from(watchArgs).map(arg => arg.name);\n                  watchArgs.forEach((watchArg) => {\n                    if (!watchArgsNames.includes(path1.node.name)) {\n                      graph.edges.get(watchArg.name)?.add(path1.node.name);\n                    }\n                  });\n                }\n                const _node = nodeCollection.getNode(path1.node.name);\n                if (_node?.info?.used) {\n                  _node?.info?.used?.add(hookName);\n                }\n                else if (_node) {\n                  _node.info = {\n                    ..._node?.info,\n                    used: new Set([hookName]),\n                  };\n                }\n              }\n            },\n          }, path.scope, path);\n        });\n      }\n    },\n  }, parentScope, parentPath);\n\n  return {\n    graph,\n    nodeCollection,\n  };\n}\n\nexport function analyze(\n  content: string,\n  lineOffset = 0,\n  jsx = false,\n) {\n  // console.log(content);\n  const ast = babelParse(content, { sourceType: 'module', plugins: [\n    'typescript',\n    ...jsx\n      ? ['jsx' as const]\n      : [],\n  ] });\n\n  // ---\n  const { graph, nodeCollection } = processSetup(ast, undefined, undefined, undefined, lineOffset);\n  return nodeCollection.map(graph);\n}\n","import type * as t from '@babel/types';\n\nexport interface TypedNode {\n  label: string\n  type: NodeType\n  info?: Partial<{\n    line: number\n    column: number\n    comment: string\n    used: Set<string>\n  }>\n};\n\nexport enum NodeType {\n  var = 'var',\n  fun = 'fun',\n}\n\ninterface Options {\n  isComputed: boolean\n  isMethod: boolean\n  comment: string\n};\n\nexport class NodeCollection {\n  lineOffset = 0;\n  addInfo = true;\n  constructor(_lineOffset = 0, _addInfo = true) {\n    this.lineOffset = _lineOffset;\n    this.addInfo = _addInfo;\n  }\n\n  nodes = new Map<string, TypedNode>();\n\n  addNode(\n    label: string,\n    node: t.Node,\n    options: Partial<Options> = { isComputed: false, isMethod: false, comment: '' },\n  ) {\n    if (this.nodes.has(label)) {\n      return;\n    }\n    if (\n      (!options.isComputed && (\n        (node.type === 'VariableDeclarator' && [\n          'ArrowFunctionExpression',\n          'FunctionDeclaration',\n          'FunctionExpression',\n        ].includes(node.init?.type || ''))\n        || (node.type === 'ObjectProperty' && [\n          'ArrowFunctionExpression',\n          'FunctionDeclaration',\n          'FunctionExpression',\n        ].includes(node.value?.type || ''))\n        || node.type === 'FunctionDeclaration'\n        || node.type === 'ObjectMethod'\n        || node.type === 'ArrowFunctionExpression'\n        || node.type === 'FunctionExpression'\n      ))\n      || options.isMethod\n    ) {\n      this.nodes.set(label, {\n        label,\n        type: NodeType.fun,\n        ...(this.addInfo\n          ? {\n            info: {\n              line: (node.loc?.start.line || 1) - 1 + this.lineOffset,\n              column: node.loc?.start.column || 0,\n              ...options.comment\n                ? { comment: options.comment }\n                : {},\n            },\n          }\n          : {}),\n      });\n    }\n    else {\n      this.nodes.set(label, {\n        label,\n        type: NodeType.var,\n        ...(this.addInfo\n          ? {\n            info: {\n              line: (node.loc?.start.line || 1) - 1 + this.lineOffset,\n              column: node.loc?.start.column || 0,\n              ...options.comment\n                ? { comment: options.comment }\n                : {},\n            },\n          }\n          : {}),\n      });\n    }\n  }\n\n  addTypedNode(label: string, node: TypedNode) {\n    this.nodes.set(label, {\n      label,\n      type: node.type,\n      ...(this.addInfo\n        ? {\n          info: {\n            ...(node.info || {}),\n          },\n        }\n        : {}),\n    });\n  }\n\n  getNode(label: string) {\n    return this.nodes.get(label);\n  }\n\n  map(graph: {\n    nodes: Set<string>\n    edges: Map<string, Set<string>>\n  }) {\n    const nodes = new Set(Array.from(graph.nodes).map((node) => {\n      return this.nodes.get(node)!;\n    }).filter(node => !!node));\n\n    const edges = new Map(Array.from(graph.edges).map(([from, to]) => {\n      return [this.nodes.get(from)!, new Set(Array.from(to).map((node) => {\n        return this.nodes.get(node)!;\n      }).filter(node => !!node))];\n    }));\n\n    return {\n      nodes,\n      edges,\n    };\n  }\n}\n\nexport function getComment(node: t.Node) {\n  let comment = '';\n\n  node.leadingComments?.forEach((_comment) => {\n    if (_comment.loc!.end.line > node.loc!.start.line) {\n      return;\n    }\n    if (_comment.value.trim().startsWith('*')) {\n      comment += `${_comment.value.trim().replace(/^[\\s]*\\*+[\\s]*\\**/gm, '').trim()}\\n`;\n    }\n  });\n\n  node.trailingComments?.forEach((_comment) => {\n    if (_comment.loc!.end.line > node.loc!.start.line) {\n      return;\n    }\n    if (_comment.value.trim().startsWith('*')) {\n      comment += `${_comment.value.trim().replace(/^[\\s]*\\*+[\\s]*\\**/gm, '').trim()}\\n`;\n    }\n    else {\n      comment += `${_comment.value.trim()}\\n`;\n    }\n  });\n\n  return comment.trim();\n}\n","import { babelParse } from '@vue/compiler-sfc';\nimport type { NodePath } from '@babel/traverse';\nimport _traverse from '@babel/traverse';\nimport type * as t from '@babel/types';\nimport { processSetup } from './setupScript';\nimport { NodeCollection, getComment } from './utils';\n\nconst traverse: typeof _traverse\n  // @ts-expect-error unwarp default\n  = _traverse.default?.default || _traverse.default || _traverse;\n\nconst vueLifeCycleHooks = [\n  'beforeCreate',\n  'created',\n  'beforeMount',\n  'mounted',\n  'beforeUpdate',\n  'updated',\n  'beforeDestroy',\n  'destroyed',\n  'activated',\n  'deactivated',\n  'errorCaptured',\n  'renderTracked',\n  'renderTriggered',\n];\n\nexport function analyze(\n  content: string,\n  lineOffset = 0,\n  jsx = false,\n) {\n  // console.log({lineOffset});\n  // console.log(content);\n  const ast = babelParse(content, { sourceType: 'module', plugins: [\n    'typescript',\n    ...jsx\n      ? ['jsx' as const]\n      : [],\n  ] });\n\n  // ---\n\n  let nodeCollection = new NodeCollection(lineOffset);\n\n  const tNodes = new Map<string, t.Identifier>();\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n  };\n\n  /** used in render block or setup return */\n  const nodesUsedInTemplate = new Set<string>();\n\n  function process(node: t.ObjectExpression, path: NodePath<t.ExportDefaultDeclaration>) {\n    traverse(node, {\n      ObjectProperty(path1) {\n        if (\n          (\n            path.node.declaration.type === 'ObjectExpression'\n            && path1.parent === path.node.declaration\n          ) || (\n            path.node.declaration.type === 'CallExpression'\n            && path1.parent === path.node.declaration.arguments[0]\n          )\n        ) {\n          // data\n          if (\n            path1.node.key.type === 'Identifier'\n            && path1.node.key.name === 'data'\n            && (\n              path1.node.value.type === 'ArrowFunctionExpression'\n              || path1.node.value.type === 'FunctionExpression'\n            )\n          ) {\n            const dataNode = path1.node.value;\n\n            traverse(dataNode, {\n              ReturnStatement(path2) {\n                if (path2.parent === dataNode.body) {\n                  if (path2.node.argument?.type === 'ObjectExpression') {\n                    path2.node.argument.properties.forEach((prop) => {\n                      if (prop.type === 'ObjectProperty') {\n                        if (prop.key.type === 'Identifier') {\n                          const name = prop.key.name;\n                          graph.nodes.add(name);\n                          tNodes.set(name, prop.key);\n                          nodeCollection.addNode(name, prop, {\n                            comment: getComment(prop),\n                          });\n                          if (!graph.edges.get(name)) {\n                            graph.edges.set(name, new Set());\n                          }\n                        }\n                      }\n                    });\n                  }\n                }\n              },\n            }, path1.scope, path1);\n          }\n\n          // computed\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'computed') {\n            const computedNode = path1.node;\n            if (computedNode.value.type === 'ObjectExpression') {\n              computedNode.value.properties.forEach((prop) => {\n                if (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') {\n                  if (prop.key.type === 'Identifier') {\n                    const name = prop.key.name;\n                    graph.nodes.add(name);\n                    tNodes.set(name, prop.key);\n                    nodeCollection.addNode(name, prop, {\n                      isComputed: true,\n                      comment: getComment(prop),\n                    });\n                    if (!graph.edges.get(name)) {\n                      graph.edges.set(name, new Set());\n                    }\n                  }\n                }\n              });\n            }\n          }\n\n          // methods\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'methods') {\n            const methodsNode = path1.node;\n            if (methodsNode.value.type === 'ObjectExpression') {\n              methodsNode.value.properties.forEach((prop) => {\n                if (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') {\n                  if (prop.key.type === 'Identifier') {\n                    const name = prop.key.name;\n                    graph.nodes.add(name);\n                    tNodes.set(name, prop.key);\n                    nodeCollection.addNode(name, prop, {\n                      isMethod: true,\n                      comment: getComment(prop),\n                    });\n                    if (!graph.edges.get(name)) {\n                      graph.edges.set(name, new Set());\n                    }\n                  }\n                }\n              });\n            }\n          }\n\n          if (\n            path1.node.key.type === 'Identifier'\n            && path1.node.key.name === 'render'\n            && (\n              path1.node.value.type === 'ArrowFunctionExpression'\n              || path1.node.value.type === 'FunctionExpression'\n            )\n          ) {\n            traverse(path1.node.value, {\n              ReturnStatement(path2) {\n                const templateNode = path2.node;\n                traverse(templateNode, {\n                  MemberExpression(path3) {\n                    if (path3.node.object && path3.node.object.type === 'ThisExpression') {\n                      if (path3.node.property && path3.node.property.type === 'Identifier') {\n                        nodesUsedInTemplate.add(path3.node.property.name);\n                      }\n                    }\n                  },\n                }, path2.scope, path2);\n              },\n            }, path1.scope, path1);\n          }\n        }\n      },\n      ObjectMethod(path1) {\n        if (\n          (\n            path.node.declaration.type === 'ObjectExpression'\n            && path1.parent === path.node.declaration\n          ) || (\n            path.node.declaration.type === 'CallExpression'\n            && path1.parent === path.node.declaration.arguments[0]\n          )\n        ) {\n          // setup\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'setup') {\n            const setupNode = path1.node;\n\n            const spread: string[] = [];\n\n            traverse(setupNode, {\n              ReturnStatement(path2) {\n                if (path2.node.argument?.type === 'ObjectExpression') {\n                  const returnNode = path2.node.argument;\n                  traverse(returnNode, {\n                    SpreadElement(path3) {\n                      // ...toRefs(xxx)\n                      if (\n                        path3.node.argument.type === 'CallExpression'\n                        && path3.node.argument.callee.type === 'Identifier'\n                        && path3.node.argument.callee.name === 'toRefs'\n                        && path3.node.argument.arguments[0].type === 'Identifier'\n                      ) {\n                        spread.push(path3.node.argument.arguments[0].name);\n                      }\n                      // ...xxx\n                      else if (\n                        path3.node.argument.type === 'Identifier'\n                      ) {\n                        spread.push(path3.node.argument.name);\n                      }\n                    },\n                  }, path2.scope, path2);\n                }\n                if (\n                  path2.node.argument?.type === 'FunctionExpression'\n                  || path2.node.argument?.type === 'ArrowFunctionExpression'\n                ) {\n                  const templateNode = path2.node.argument.body;\n                  traverse(templateNode, {\n                    Identifier(path3) {\n                      const binding = path3.scope.getBinding(path3.node.name);\n                      if (binding?.scope === path1.scope) {\n                        nodesUsedInTemplate.add(path3.node.name);\n                      }\n                    },\n                    JSXIdentifier(path3) {\n                      const binding = path3.scope.getBinding(path3.node.name);\n                      if (binding?.scope === path1.scope) {\n                        nodesUsedInTemplate.add(path3.node.name);\n                      }\n                    },\n                  }, path2.scope, path2);\n                }\n              },\n            }, path1.scope, path1);\n\n            const {\n              graph: {\n                nodes: tempNodes,\n                edges: tempEdges,\n                spread: tempSpread,\n              },\n              nodeCollection: tempNodeCollection,\n            } = processSetup(setupNode, path1.scope, setupNode, spread, lineOffset);\n\n            // 3 filter data by return\n            traverse(setupNode, {\n              ReturnStatement(path2) {\n                // only process return in setupNode scope\n                if (path2.scope !== path1.scope) {\n                  return;\n                }\n\n                if (path2.node.argument?.type === 'ObjectExpression') {\n                  const returnNode = path2.node.argument;\n                  traverse(returnNode, {\n                    ObjectProperty(path3) {\n                      if (path3.parent === returnNode) {\n                        if (\n                          path3.node.key.type === 'Identifier'\n                          && path3.node.value.type === 'Identifier'\n                          && tempNodes.has(path3.node.value.name)\n                        ) {\n                          const valName = path3.node.value.name;\n                          if (!graph.nodes.has(valName)) {\n                            graph.nodes.add(valName);\n                            tNodes.set(valName, path3.node.value);\n                            nodeCollection.addTypedNode(\n                              valName,\n                              tempNodeCollection.nodes.get(valName)!,\n                            );\n                          }\n                          if (!graph.edges.has(valName)) {\n                            graph.edges.set(valName, new Set([...Array.from(\n                              tempEdges.get(valName) || new Set<string>(),\n                            )]));\n                          }\n\n                          const name = path3.node.key.name;\n                          if (name !== valName) {\n                            graph.nodes.add(name);\n                            tNodes.set(name, path3.node.key);\n                            nodeCollection.addNode(name, path3.node.key, {\n                              comment: getComment(path3.node),\n                            });\n                            graph.edges.set(name, new Set([valName]));\n                          }\n                        }\n                      }\n                    },\n                    SpreadElement(path3) {\n                      // ...toRefs(xxx)\n                      if (\n                        path3.node.argument.type === 'CallExpression'\n                        && path3.node.argument.callee.type === 'Identifier'\n                        && path3.node.argument.callee.name === 'toRefs'\n                        && path3.node.argument.arguments[0].type === 'Identifier'\n                        && tempSpread.get(path3.node.argument.arguments[0].name)\n                      ) {\n                        tempSpread.get(path3.node.argument.arguments[0].name)?.forEach((name) => {\n                          graph.nodes.add(name);\n                          // @ts-expect-error Identifier\n                          tNodes.set(name, path3.node.argument.arguments[0]);\n                          nodeCollection.addTypedNode(name, tempNodeCollection.nodes.get(name)!);\n                          if (!graph.edges.get(name)) {\n                            graph.edges.set(name, new Set());\n                            tempEdges.get(name)?.forEach((edge) => {\n                              graph.edges.get(name)?.add(edge);\n                            });\n                          }\n                        });\n                      }\n                      // ...xxx\n                      else if (\n                        path3.node.argument.type === 'Identifier'\n                        && tempSpread.get(path3.node.argument.name)\n                      ) {\n                        tempSpread.get(path3.node.argument.name)?.forEach((name) => {\n                          graph.nodes.add(name);\n                          // @ts-expect-error Identifier\n                          tNodes.set(name, path3.node.argument);\n                          nodeCollection.addTypedNode(name, tempNodeCollection.nodes.get(name)!);\n                          if (!graph.edges.get(name)) {\n                            graph.edges.set(name, new Set());\n                            tempEdges.get(name)?.forEach((edge) => {\n                              graph.edges.get(name)?.add(edge);\n                            });\n                          }\n                        });\n                      }\n                    },\n                  }, path2.scope, path2);\n                }\n                else {\n                  graph.edges = tempEdges;\n                  graph.nodes = tempNodes;\n                  nodeCollection = tempNodeCollection;\n                }\n              },\n            }, path1.scope, path1);\n          }\n\n          // data\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'data') {\n            const dataNode = path1.node;\n\n            traverse(dataNode, {\n              ReturnStatement(path2) {\n                if (path2.parent === dataNode.body) {\n                  if (path2.node.argument?.type === 'ObjectExpression') {\n                    path2.node.argument.properties.forEach((prop) => {\n                      if (prop.type === 'ObjectProperty') {\n                        if (prop.key.type === 'Identifier') {\n                          const name = prop.key.name;\n                          graph.nodes.add(name);\n                          tNodes.set(name, prop.key);\n                          nodeCollection.addNode(name, prop, {\n                            comment: getComment(prop),\n                          });\n                          if (!graph.edges.get(name)) {\n                            graph.edges.set(name, new Set());\n                          }\n                        }\n                      }\n                    });\n                  }\n                }\n              },\n            }, path1.scope, path1);\n          }\n\n          // render\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'render') {\n            traverse(path1.node, {\n              ReturnStatement(path2) {\n                const templateNode = path2.node;\n                traverse(templateNode, {\n                  MemberExpression(path3) {\n                    if (path3.node.object && path3.node.object.type === 'ThisExpression') {\n                      if (path3.node.property && path3.node.property.type === 'Identifier') {\n                        nodesUsedInTemplate.add(path3.node.property.name);\n                      }\n                    }\n                  },\n                }, path2.scope, path2);\n              },\n            }, path1.scope, path1);\n          }\n        }\n      },\n    }, path.scope, path);\n\n    traverse(node, {\n      ObjectMethod(path1) {\n        if (\n          (\n            path.node.declaration.type === 'ObjectExpression'\n            && path1.parent === path.node.declaration\n          ) || (\n            path.node.declaration.type === 'CallExpression'\n            && path1.parent === path.node.declaration.arguments[0]\n          )\n        ) {\n          if (path1.node.key.type === 'Identifier' && vueLifeCycleHooks.includes(path1.node.key.name)) {\n            const hookName = path1.node.key.name;\n\n            traverse(path1.node.body, {\n              MemberExpression(path2) {\n                if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                  const _node = nodeCollection.getNode(path2.node.property.name);\n                  if (_node?.info?.used) {\n                    _node?.info?.used?.add(hookName);\n                  }\n                  else if (_node) {\n                    _node.info = {\n                      ..._node?.info,\n                      used: new Set([hookName]),\n                    };\n                  }\n                }\n              },\n            }, path1.scope, path1);\n          }\n        }\n      },\n      ObjectProperty(path1) {\n        if (\n          (\n            path.node.declaration.type === 'ObjectExpression'\n            && path1.parent === path.node.declaration\n          ) || (\n            path.node.declaration.type === 'CallExpression'\n            && path1.parent === path.node.declaration.arguments[0]\n          )\n        ) {\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'computed') {\n            const computedNode = path1.node;\n            if (computedNode.value.type === 'ObjectExpression') {\n              computedNode.value.properties.forEach((prop) => {\n                if (prop.type === 'ObjectMethod' && prop.key.type === 'Identifier') {\n                  const name = prop.key.name;\n                  traverse(prop, {\n                    MemberExpression(path2) {\n                      if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                        graph.edges.get(name)?.add(path2.node.property.name);\n                      }\n                    },\n                  }, path1.scope, path1);\n                }\n\n                if (\n                  prop.type === 'ObjectProperty'\n                  && prop.key.type === 'Identifier'\n                  && prop.value.type === 'ObjectExpression'\n                ) {\n                  const name = prop.key.name;\n                  prop.value.properties.forEach((prop1) => {\n                    if (\n                      prop1.type === 'ObjectProperty'\n                      && prop1.key.type === 'Identifier'\n                      && prop1.key.name === 'get'\n                    ) {\n                      traverse(prop1, {\n                        MemberExpression(path2) {\n                          if (\n                            path2.node.object.type === 'ThisExpression'\n                            && path2.node.property.type === 'Identifier'\n                          ) {\n                            graph.edges.get(name)?.add(path2.node.property.name);\n                          }\n                        },\n                      }, path1.scope, path1);\n                    }\n                  });\n                }\n              });\n            }\n          }\n\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'methods') {\n            const methodsNode = path1.node;\n            if (methodsNode.value.type === 'ObjectExpression') {\n              methodsNode.value.properties.forEach((prop) => {\n                if (\n                  (prop.type === 'ObjectMethod'\n                  || prop.type === 'ObjectProperty')\n                  && prop.key.type === 'Identifier'\n                ) {\n                  const name = prop.key.name;\n                  traverse(prop, {\n                    MemberExpression(path2) {\n                      if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                        graph.edges.get(name)?.add(path2.node.property.name);\n                      }\n                    },\n                  }, path1.scope, path1);\n                }\n              });\n            }\n          }\n\n          if (path1.node.key.type === 'Identifier' && ['watch', ...vueLifeCycleHooks].includes(path1.node.key.name)) {\n            const hookName = path1.node.key.name;\n\n            if (hookName === 'watch' && path1.node.value.type === 'ObjectExpression') {\n              path1.node.value.properties.forEach((prop) => {\n                if ((prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') && (\n                  prop.key.type === 'Identifier' || prop.key.type === 'StringLiteral'\n                )) {\n                  const keyName = prop.key.type === 'Identifier'\n                    ? prop.key.name\n                    : prop.key.type === 'StringLiteral'\n                      ? prop.key.value.split('.')[0]\n                      : '';\n                  const watchArg = tNodes.get(keyName);\n\n                  const _node = nodeCollection.getNode(keyName);\n                  if (_node?.info?.used) {\n                    _node?.info?.used?.add(hookName);\n                  }\n                  else if (_node) {\n                    _node.info = {\n                      ..._node?.info,\n                      used: new Set([hookName]),\n                    };\n                  }\n\n                  traverse(path1.node.value, {\n                    MemberExpression(path2) {\n                      if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                        if (watchArg && watchArg.name !== path2.node.property.name) {\n                          graph.edges.get(watchArg.name)?.add(path2.node.property.name);\n                        }\n                      }\n                    },\n                  }, path1.scope, path1);\n                }\n              });\n            }\n            else {\n              traverse(path1.node.value, {\n                MemberExpression(path2) {\n                  if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                    const _node = nodeCollection.getNode(path2.node.property.name);\n                    if (_node?.info?.used) {\n                      _node?.info?.used?.add(hookName);\n                    }\n                    else if (_node) {\n                      _node.info = {\n                        ..._node?.info,\n                        used: new Set([hookName]),\n                      };\n                    }\n                  }\n                },\n              }, path1.scope, path1);\n            }\n          }\n        }\n      },\n    }, path.scope, path);\n  }\n\n  traverse(ast, {\n    ExportDefaultDeclaration(path) {\n      // export default {}\n      if (path.node.declaration.type === 'ObjectExpression') {\n        process(path.node.declaration, path);\n      }\n      // export default defineComponent({})\n      else if (path.node.declaration.type === 'CallExpression'\n        && path.node.declaration.callee.type === 'Identifier'\n        && path.node.declaration.callee.name === 'defineComponent'\n        && path.node.declaration.arguments[0].type === 'ObjectExpression'\n      ) {\n        process(path.node.declaration.arguments[0], path);\n      }\n    },\n  });\n\n  return {\n    graph: nodeCollection.map(graph),\n    nodesUsedInTemplate,\n  };\n}\n","import type { NodePath, Scope } from '@babel/traverse';\nimport _traverse from '@babel/traverse';\nimport type * as t from '@babel/types';\nimport { babelParse } from '@vue/compiler-sfc';\nimport type {\n  IAddEdge,\n  IAddNode,\n  IReturnData,\n  IUsedNode,\n} from '../utils/traverse';\nimport {\n  addGraphBySpreadIdentifier,\n  addIdentifiesToGraphByScanReturn,\n  addSpreadToGraphByScanReturn,\n  collectionSpread,\n  parseEdgeFunctionPattern,\n  parseEdgeLeftArrayPattern,\n  parseEdgeLeftIdentifierPattern,\n  parseEdgeLeftObjectPattern,\n  parseNodeArrayPattern,\n  parseNodeFunctionPattern,\n  parseNodeIdentifierPattern,\n  parseNodeObjectPattern,\n  parseReturnJsxPattern,\n  traverse,\n  traverseSetup,\n} from '../utils/traverse';\nimport { NodeCollection, getComment } from './utils';\n\ninterface IProcessMain {\n  node: t.Node\n  type: 'vue' | 'react'\n  lineOffset?: number\n  addInfo?: boolean\n}\n\ninterface IProcessBranch {\n  node: t.ObjectExpression\n  lineOffset?: number\n  addInfo?: boolean\n  parentScope?: Scope\n  parentNode?: t.ExportDefaultDeclaration\n  parentPath: NodePath<t.ExportDefaultDeclaration>\n  spread?: string[]\n}\n\ntype IProcessReact = {\n  node: t.BlockStatement\n  lineOffset?: number\n  addInfo?: boolean\n  parentScope: Scope\n  parentNode: t.FunctionDeclaration\n  parentPath: NodePath<t.FunctionDeclaration>\n} | {\n  node: t.BlockStatement\n  lineOffset?: number\n  addInfo?: boolean\n  parentScope: Scope\n  parentNode: t.ClassMethod\n  parentPath: NodePath<t.ClassMethod>\n};\n\n// deal when setup return object\nfunction processByReturnNotJSX(params: IProcessBranch) {\n  const { node, parentPath, lineOffset, addInfo } = params;\n  const spread: string[] = [];\n\n  const nodeCollection = new NodeCollection(lineOffset, addInfo);\n\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n  };\n\n  // 解析return, 收集spread\n  const setupPath = traverseSetup({ node, parentScope: parentPath.scope, parentPath });\n\n  // setup return\n  collectionSpread({ path: setupPath, spread });\n\n  // 收集除return之外的所有节点和边\n  const {\n    graph: {\n      nodes: tempNodes,\n      edges: tempEdges,\n      spread: tempSpread,\n    },\n    nodeCollection: tempNodeCollection,\n    nodesUsedInTemplate,\n  } = processByReturnJSX({ node, parentPath, spread, lineOffset, addInfo });\n\n  // 根据return信息添加必要节点\n  addIdentifiesToGraphByScanReturn({\n    path: setupPath,\n    graph,\n    nodeCollection,\n    tempNodeCollection,\n    tempEdges,\n  });\n\n  // 根据return信息添加必要节点\n  addSpreadToGraphByScanReturn({\n    path: setupPath,\n    graph,\n    nodeCollection,\n    tempNodeCollection,\n    tempEdges,\n    tempSpread,\n  });\n\n  return {\n    graph,\n    nodeCollection,\n    nodesUsedInTemplate,\n  };\n}\n\n// deal when setup return jsx\nfunction processByReturnJSX(params: IProcessBranch) {\n  const { node, parentPath, spread = [], lineOffset, addInfo } = params;\n\n  const nodeCollection = new NodeCollection(lineOffset, addInfo);\n  const nodesUsedInTemplate = new Set<string>();\n\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n    spread: new Map<string, Set<string>>(),\n  };\n\n  function addNode({ name, node, path, scope }: IAddNode, commentParentNode?: t.Node) {\n    const binding = path.scope.getBinding(name);\n    if (scope === binding?.scope) {\n      graph.nodes.add(name);\n      nodeCollection.addNode(name, node, {\n        comment: commentParentNode\n          ? getComment(commentParentNode)\n          : '',\n      });\n      if (!graph.edges.get(name)) {\n        graph.edges.set(name, new Set());\n      }\n    }\n  }\n\n  function addEdge({ fromName, toName, path, scope, toScope, collectionNodes }: IAddEdge) {\n    const bindingScope = toScope || path.scope.getBinding(toName)?.scope;\n    if (scope === bindingScope && collectionNodes.has(toName)) {\n      graph.edges.get(fromName)?.add(toName);\n    }\n  }\n\n  function addUsed({ name, path, parentPath }: IUsedNode) {\n    const binding = path.scope.getBinding(name);\n    if (binding?.scope === parentPath.scope) {\n      nodesUsedInTemplate.add(name);\n    }\n  }\n\n  const setupPath = traverseSetup({ node, parentScope: parentPath.scope, parentPath });\n  const setupScope = setupPath.scope;\n  const setupNode = setupPath.node;\n\n  // 收集节点, 并收集spread依赖\n  traverse(setupNode, {\n    VariableDeclarator(path1) {\n      parseNodeIdentifierPattern({\n        path: path1,\n        rootScope: setupScope,\n        cb: (params) => {\n          if (!spread.includes(params.name)) {\n            addNode(params, path1.node);\n          }\n          else {\n            addGraphBySpreadIdentifier({\n              path: path1,\n              graph,\n              nodeCollection,\n              iname: params.name,\n            });\n          }\n        },\n      });\n\n      parseNodeObjectPattern({\n        path: path1,\n        rootScope: setupScope,\n        cb: addNode,\n      });\n\n      parseNodeArrayPattern({\n        path: path1,\n        rootScope: setupScope,\n        cb: addNode,\n      });\n    },\n    FunctionDeclaration(path1) {\n      parseNodeFunctionPattern({\n        path: path1,\n        rootScope: setupScope,\n        cb: addNode,\n      });\n    },\n  }, setupScope, setupPath);\n\n  // 搜集jsx模版使用节点\n  setupPath.traverse({\n    ReturnStatement(path2) {\n      // setup return jsx\n      parseReturnJsxPattern({\n        path: path2,\n        parentPath: setupPath,\n        cb: addUsed,\n      });\n    },\n  });\n\n  // 收集边\n  traverse(setupNode, {\n    VariableDeclarator(path1) {\n      parseEdgeLeftIdentifierPattern({\n        path: path1,\n        rootScope: setupScope,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n        spread,\n      });\n\n      parseEdgeLeftObjectPattern({\n        path: path1,\n        rootScope: setupScope,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n\n      parseEdgeLeftArrayPattern({\n        path: path1,\n        rootScope: setupScope,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n    },\n    FunctionDeclaration(path1) {\n      parseEdgeFunctionPattern({\n        path: path1,\n        rootScope: setupScope,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n    },\n  }, setupScope, setupPath);\n\n  return {\n    graph,\n    nodeCollection,\n    nodesUsedInTemplate,\n  };\n}\n\nfunction processByReact(params: IProcessReact) {\n  const { node, parentScope, parentPath, lineOffset, addInfo } = params;\n\n  const nodeCollection = new NodeCollection(lineOffset, addInfo);\n  const nodesUsedInTemplate = new Set<string>();\n\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n    spread: new Map<string, Set<string>>(),\n  };\n\n  function addNode({ name, node, path, scope }: IAddNode, commentParentNode?: t.Node) {\n    const binding = path.scope.getBinding(name);\n    if (scope === binding?.scope) {\n      graph.nodes.add(name);\n      nodeCollection.addNode(name, node, {\n        comment: commentParentNode\n          ? getComment(commentParentNode)\n          : '',\n      });\n      if (!graph.edges.get(name)) {\n        graph.edges.set(name, new Set());\n      }\n    }\n  }\n\n  function addEdge({ fromName, toName, path, scope, toScope, collectionNodes }: IAddEdge) {\n    const bindingScope = toScope || path.scope.getBinding(toName)?.scope;\n    if (scope === bindingScope && collectionNodes.has(toName)) {\n      graph.edges.get(fromName)?.add(toName);\n    }\n  }\n\n  function addUsed({ name, path, parentPath }: IUsedNode) {\n    const binding = path.scope.getBinding(name);\n    if (binding?.scope === parentPath.scope) {\n      nodesUsedInTemplate.add(name);\n    }\n  }\n\n  // 收集节点依赖\n  traverse(node, {\n    VariableDeclarator(path1) {\n      parseNodeIdentifierPattern({\n        path: path1,\n        rootScope: parentScope!,\n        cb: (params) => {\n          addNode(params, path1.node);\n        },\n      });\n\n      parseNodeObjectPattern({\n        path: path1,\n        rootScope: parentScope!,\n        cb: addNode,\n      });\n\n      parseNodeArrayPattern({\n        path: path1,\n        rootScope: parentScope!,\n        cb: addNode,\n      });\n    },\n    FunctionDeclaration(path1) {\n      parseNodeFunctionPattern({\n        path: path1,\n        rootScope: parentScope!,\n        cb: addNode,\n      });\n    },\n  }, parentScope, parentPath);\n\n  // 搜集jsx模版使用节点\n  traverse(node, {\n    ReturnStatement(path2) {\n      // setup return jsx\n      parseReturnJsxPattern({\n        path: path2,\n        parentPath,\n        cb: addUsed,\n      });\n    },\n  }, parentScope, parentPath);\n\n  // 收集边\n  traverse(node, {\n    VariableDeclarator(path1) {\n      parseEdgeLeftIdentifierPattern({\n        path: path1,\n        rootScope: parentScope!,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n\n      parseEdgeLeftObjectPattern({\n        path: path1,\n        rootScope: parentScope!,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n\n      parseEdgeLeftArrayPattern({\n        path: path1,\n        rootScope: parentScope!,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n    },\n    FunctionDeclaration(path1) {\n      parseEdgeFunctionPattern({\n        path: path1,\n        rootScope: parentScope!,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n    },\n  }, parentScope, parentPath);\n\n  return {\n    graph,\n    nodeCollection,\n    nodesUsedInTemplate,\n  };\n}\n\nexport function processTsx(params: IProcessMain) {\n  let result: IReturnData | undefined;\n\n  function process(params: IProcessBranch) {\n    const { node, parentPath } = params;\n    // resolve `return` then determine use processByReturnJSX or processByReturnNotJSX\n    const setupPath = traverseSetup({ node, parentScope: parentPath.scope, parentPath });\n\n    setupPath.traverse({\n      ReturnStatement(path) {\n        if (path.node.argument\n          && (path.node.argument.type === 'ArrowFunctionExpression'\n          || path.node.argument.type === 'FunctionExpression')\n          && (path.node.argument.body.type === 'JSXElement'\n          || path.node.argument.body.type === 'JSXFragment')\n        ) {\n          result = processByReturnJSX(params);\n        }\n        else {\n          result = processByReturnNotJSX(params);\n        }\n      },\n    });\n  }\n\n  traverse(params.node, {\n    ExportDefaultDeclaration(path) {\n      if (params.type === 'vue') {\n        if (path.node.declaration.type === 'ObjectExpression') {\n          // export default {}\n          process({\n            ...params,\n            node: path.node.declaration,\n            parentNode: path.node,\n            parentPath: path,\n          });\n        }\n        else if (\n          path.node.declaration.type === 'CallExpression'\n          && path.node.declaration.callee.type === 'Identifier'\n          && path.node.declaration.callee.name === 'defineComponent'\n          && path.node.declaration.arguments[0].type === 'ObjectExpression'\n        ) {\n          // export default defineComponent({})\n          process({\n            ...params,\n            node: path.node.declaration.arguments[0],\n            parentNode: path.node,\n            parentPath: path,\n          });\n        }\n      }\n      if (params.type === 'react') {\n        if (\n          (path.node.declaration.type === 'FunctionDeclaration'\n          || path.node.declaration.type === 'ArrowFunctionExpression')\n          && path.node.declaration.body.type === 'BlockStatement'\n        ) {\n          // export default function () {}\n\n          const functionPath = path.get('declaration') as NodePath<t.FunctionDeclaration>;\n\n          result = processByReact({\n            ...params,\n            node: path.node.declaration.body,\n            parentNode: functionPath.node,\n            parentPath: functionPath,\n            parentScope: functionPath.scope,\n          });\n        }\n        if (path.node.declaration.type === 'ClassDeclaration') {\n          // export default class Index {}\n\n          const renderFunction = path.node.declaration.body.body.find((node) => {\n            if (node.type === 'ClassMethod' && node.key.type === 'Identifier' && node.key.name === 'render') {\n              return node;\n            }\n            return undefined;\n          }) as t.ClassMethod;\n          if (!renderFunction) {\n            return;\n          }\n\n          const renderPath = path.get(`declaration.body.body.${\n            path.node.declaration.body.body.indexOf(renderFunction)\n          }`) as NodePath<t.ClassMethod>;\n\n          result = processByReact({\n            ...params,\n            node: renderFunction.body,\n            parentNode: renderFunction,\n            parentPath: renderPath,\n            parentScope: renderPath.scope,\n          });\n        }\n      }\n    },\n  });\n\n  return result!;\n}\n\nexport function analyze(\n  content: string,\n  type = 'vue' as 'vue' | 'react',\n  lineOffset = 0,\n  addInfo = true,\n) {\n  const ast = babelParse(content, { sourceType: 'module', plugins: [\n    'typescript',\n    'jsx',\n  ] });\n\n  const { graph, nodeCollection, nodesUsedInTemplate } = processTsx({\n    node: ast,\n    type,\n    lineOffset,\n    addInfo,\n  });\n\n  return {\n    graph: nodeCollection.map(graph),\n    nodesUsedInTemplate,\n  };\n}\n","import type * as t from '@babel/types';\nimport type { NodePath, Scope } from '@babel/traverse';\nimport _traverse from '@babel/traverse';\nimport type { NodeCollection } from '../analyze/utils';\nimport { getComment } from '../analyze/utils';\n\nexport const traverse: typeof _traverse\n  // @ts-expect-error unwarp default\n  = _traverse.default?.default || _traverse.default || _traverse;\n\nexport interface IReturnData {\n  graph: {\n    nodes: Set<string>\n    edges: Map<string, Set<string>>\n    spread?: Map<string, Set<string>>\n  }\n  nodeCollection: NodeCollection\n  nodesUsedInTemplate: Set<string>\n}\n\nexport interface IAddNode {\n  name: string\n  node: t.Node\n  path: NodePath<t.VariableDeclarator | t.FunctionDeclaration>\n  scope: Scope\n}\n\nexport interface IUsedNode {\n  name: string\n  path: NodePath<t.Identifier>\n  parentPath: NodePath<t.Node>\n}\n\nexport interface IAddEdge {\n  fromName: string\n  toName: string\n  path: NodePath<t.Identifier | t.MemberExpression>\n  scope: Scope\n  toScope?: Scope\n  collectionNodes: Set<string>\n}\n\nexport interface IParseVariable {\n  path: NodePath<t.VariableDeclarator>\n  rootScope: Scope\n}\n\nexport interface IParseNodeBase extends IParseVariable {\n  cb?: (params: IAddNode) => void\n}\n\nexport interface IParseEdgeBase extends IParseVariable {\n  cb?: (params: IAddEdge) => void\n  collectionNodes: Set<string>\n  spread?: string[]\n}\n\nexport interface IRescureObject {\n  node: t.ObjectPattern\n  rootScope: Scope\n  res: t.Identifier[]\n  parentScope: Scope\n  parentPath: NodePath<t.VariableDeclarator | t.ObjectProperty>\n}\n\nexport interface IRescureArray {\n  node: t.ArrayPattern\n  rootScope: Scope\n  res: t.Identifier[]\n  parentScope: Scope\n  parentPath: NodePath<t.VariableDeclarator | t.ArrayPattern>\n}\n\nexport interface IParseNodeFunction {\n  path: NodePath<t.FunctionDeclaration>\n  rootScope: Scope\n  cb?: (params: IAddNode) => void\n}\n\nexport interface IParseEdgeFunction {\n  path: NodePath<t.FunctionDeclaration>\n  rootScope: Scope\n  cb?: (params: IAddEdge) => void\n  collectionNodes: Set<string>\n}\n\nexport interface IParseReturnJSX {\n  path: NodePath<t.ReturnStatement>\n  parentPath: NodePath<t.Node>\n  cb?: (params: IUsedNode) => void\n}\n\nexport interface IParseSetup {\n  node: t.ObjectExpression\n  parentScope: Scope\n  parentPath: NodePath<t.ExportDefaultDeclaration>\n}\n\nexport interface ICollectSpread {\n  path: NodePath<t.ObjectMethod>\n  spread: string[]\n}\n\nexport interface IAddIdentifiesToGraphByScanReturn {\n  path: NodePath<t.ObjectMethod>\n  graph: IReturnData['graph']\n  nodeCollection: IReturnData['nodeCollection']\n  tempNodeCollection: IReturnData['nodeCollection']\n  tempEdges: IReturnData['graph']['edges']\n}\n\nexport interface IAddSpreadToGraphByScanReturn {\n  path: NodePath<t.ObjectMethod>\n  graph: IReturnData['graph']\n  nodeCollection: IReturnData['nodeCollection']\n  tempNodeCollection: IReturnData['nodeCollection']\n  tempEdges: IReturnData['graph']['edges']\n  tempSpread: Map<string, Set<string>>\n}\n\nexport interface IAddGraphBySpreadIdentifier {\n  path: NodePath<t.VariableDeclarator>\n  graph: IReturnData['graph'] & {\n    spread: Map<string, Set<string>>\n  }\n  nodeCollection: IReturnData['nodeCollection']\n  iname: string\n}\n\n/**\n * 递归遍历如下结构:\n * let { loc, loc: locd, loc: { start, end }, loc: { start: { line: { deep } }} } = node;\n * 解出 loc, locd, start, end, deep\n */\nexport function rescureObjectPattern({ node, rootScope, res, parentScope, parentPath }: IRescureObject) {\n  traverse(node, {\n    ObjectProperty(path1) {\n      if (path1.node.type === 'ObjectProperty'\n        && path1.node.key.type === 'Identifier' && path1.node.value.type === 'Identifier') {\n        const name = path1.node.value.name;\n        const _scope = path1.scope.getBinding(name)?.scope;\n        if (_scope && _scope === rootScope) {\n          res.push(path1.node.value);\n        }\n      }\n      else if (path1.node.type === 'ObjectProperty'\n        && path1.node.key.type === 'Identifier' && path1.node.value.type === 'ObjectPattern') {\n        rescureObjectPattern({\n          node: path1.node.value,\n          rootScope,\n          res,\n          parentScope: path1.scope,\n          parentPath: path1,\n        });\n      }\n    },\n    RestElement(path1) {\n      if (path1.node.argument.type === 'Identifier') {\n        const name = path1.node.argument.name;\n        const _scope = path1.scope.getBinding(name)?.scope;\n        if (_scope && _scope === rootScope) {\n          res.push(path1.node.argument);\n        }\n      }\n    },\n  }, parentScope, parentPath);\n}\n\n/**\n * 递归遍历如下结构:\n * let [foo, [bar, baz]] = [1, [[2], 3]];\n * 解出 foo, bar, baz\n */\nexport function rescureArrayPattern({ node, rootScope, res, parentScope, parentPath }: IRescureArray) {\n  traverse(node, {\n    Identifier(path1) {\n      if (path1.node.type === 'Identifier') {\n        const name = path1.node.name;\n        const _scope = path1.scope.getBinding(name)?.scope;\n        if (_scope && _scope === rootScope) {\n          res.push(path1.node);\n        }\n      }\n    },\n    ArrayPattern(path1) {\n      if (path1.node.type === 'ArrayPattern') {\n        rescureArrayPattern({\n          node: path1.node,\n          rootScope,\n          res,\n          parentScope: path1.scope,\n          parentPath: path1,\n        });\n      }\n    },\n  }, parentScope, parentPath);\n}\n\nexport function parseNodeIdentifierPattern({\n  path,\n  rootScope,\n  cb,\n}: IParseNodeBase) {\n  if (path.node.id.type !== 'Identifier') {\n    return;\n  }\n\n  if (path.node.init?.type === 'ArrowFunctionExpression' || path.node.init?.type === 'FunctionExpression') {\n    // const speak = () => {}\n    cb?.({\n      name: path.node.id.name,\n      node: path.node,\n      path,\n      scope: rootScope,\n    });\n  }\n  else {\n    // const open = 22\n    cb?.({\n      name: path.node.id.name,\n      node: path.node,\n      path,\n      scope: rootScope,\n    });\n  }\n}\n\nexport function parseNodeObjectPattern({ path, rootScope, cb }: IParseNodeBase) {\n  if (path.node.id.type !== 'ObjectPattern') {\n    return;\n  }\n\n  path.node.id.properties.forEach((property) => {\n    if (property.type === 'ObjectProperty'\n      && property.key.type === 'Identifier' && property.value.type === 'Identifier') {\n      // const { x } = obj\n      cb?.({\n        name: property.value.name,\n        node: property,\n        path,\n        scope: rootScope,\n      });\n    }\n    else if (property.type === 'ObjectProperty'\n      && property.key.type === 'Identifier' && property.value.type === 'AssignmentPattern') {\n      // const { x = 3 } = obj\n      cb?.({\n        name: property.key.name,\n        node: property,\n        path,\n        scope: rootScope,\n      });\n    }\n    else if (property.type === 'RestElement' && property.argument.type === 'Identifier') {\n      // const { ...rest } = obj\n      cb?.({\n        name: property.argument.name,\n        node: property,\n        path,\n        scope: rootScope,\n      });\n    }\n    else if (property.type === 'ObjectProperty'\n      && property.key.type === 'Identifier' && property.value.type === 'ObjectPattern') {\n      // let { loc, loc: locd, loc: { start, end } } = node;\n      const res: t.Identifier[] = [];\n      rescureObjectPattern({\n        node: property.value,\n        rootScope,\n        res,\n        parentScope: path.scope,\n        parentPath: path,\n      });\n      res.forEach(r => cb?.({\n        name: r.name,\n        node: r,\n        path,\n        scope: rootScope,\n      }));\n    }\n  });\n}\n\nexport function parseNodeArrayPattern({ path, rootScope, cb }: IParseNodeBase) {\n  if (path.node.id.type !== 'ArrayPattern') {\n    return;\n  }\n\n  path.node.id.elements.forEach((ele) => {\n    if (ele?.type === 'Identifier') {\n      // const [arr, brr] = array\n      cb?.({\n        name: ele.name,\n        node: ele,\n        path,\n        scope: rootScope,\n      });\n    }\n    else if (ele?.type === 'ArrayPattern') {\n      // let [foo, [bar, baz]] = array;\n      const res: t.Identifier[] = [];\n      rescureArrayPattern({\n        node: ele,\n        rootScope,\n        res,\n        parentScope: path.scope,\n        parentPath: path,\n      });\n      res.forEach(r => cb?.({\n        name: r.name,\n        node: r,\n        path,\n        scope: rootScope,\n      }));\n    }\n    else if (ele?.type === 'AssignmentPattern') {\n      if (ele.left.type === 'Identifier') {\n        // let [yy = 'b'] = array;\n        cb?.({\n          name: ele.left.name,\n          node: ele,\n          path,\n          scope: rootScope,\n        });\n      }\n    }\n    else if (ele?.type === 'RestElement') {\n      if (ele.argument.type === 'Identifier') {\n        // const [arr2, ...rest2] = array\n        cb?.({\n          name: ele.argument.name,\n          node: ele,\n          path,\n          scope: rootScope,\n        });\n      }\n    }\n  });\n}\n\nexport function parseNodeFunctionPattern({ path, rootScope, cb }: IParseNodeFunction) {\n  if (path.node.type !== 'FunctionDeclaration') {\n    return;\n  }\n  if (path.node.id?.type === 'Identifier') {\n    // function abc () {}\n    cb?.({\n      name: path.node.id.name,\n      node: path.node,\n      path,\n      scope: rootScope,\n    });\n  }\n}\n\nexport function parseEdgeLeftIdentifierPattern({ path, rootScope, cb, collectionNodes, spread }: IParseEdgeBase) {\n  if (!path.node.id || path.node.id.type !== 'Identifier') {\n    return;\n  }\n\n  if (path.node.init?.type\n    && [\n      'ArrowFunctionExpression',\n      'FunctionExpression',\n      'CallExpression',\n      'ObjectExpression',\n      'ArrayExpression',\n    ].includes(path.node.init.type)\n  ) {\n    // if (graph.nodes.has(path.node.id.name) && path.scope.getBinding(path.node.id.name)?.scope === rootScope) {\n    if (collectionNodes.has(path.node.id.name) && path.scope.getBinding(path.node.id.name)?.scope === rootScope) {\n      const name = path.node.id.name;\n      traverse(path.node.init, {\n        Identifier(path1) {\n          // graph.edges.get(name)?.add(path1.node.name);\n\n          const binding = path1.scope.getBinding(path1.node.name);\n          if (\n            binding?.scope === rootScope\n            && collectionNodes.has(path1.node.name)\n            && (\n              (path1.parent.type !== 'MemberExpression'\n              && path1.parent.type !== 'OptionalMemberExpression')\n              || path1.parent.object === path1.node\n            )\n          ) {\n            cb?.({\n              fromName: name,\n              toName: path1.node.name,\n              path: path1,\n              scope: rootScope,\n              collectionNodes,\n            });\n          }\n        },\n        MemberExpression(path1) {\n          if (spread?.length && path1.node.object.type === 'Identifier'\n            && spread.includes(path1.node.object.name)\n            && path1.node.property.type === 'Identifier') {\n            cb?.({\n              fromName: name,\n              toName: path1.node.property.name,\n              toScope: path1.scope.getBinding(path1.node.object.name)?.scope,\n              path: path1,\n              scope: rootScope,\n              collectionNodes,\n            });\n          }\n        },\n      }, path.scope, path);\n    }\n  }\n}\n\nexport function parseEdgeLeftObjectPattern({ path, rootScope, cb, collectionNodes }: IParseEdgeBase) {\n  if (!path.node.id || path.node.id.type !== 'ObjectPattern') {\n    return;\n  }\n  if (path.node.init?.type\n    && [\n      'ArrowFunctionExpression',\n      'FunctionExpression',\n      'CallExpression',\n      'ObjectExpression',\n      'ArrayExpression',\n    ].includes(path.node.init.type)\n  ) {\n    const res: t.Identifier[] = [];\n    rescureObjectPattern({\n      node: path.node.id,\n      rootScope,\n      res,\n      parentScope: path.scope,\n      parentPath: path,\n    });\n\n    // res.filter(r => (graph.nodes.has(r.name) && path.scope.getBinding(r.name)?.scope === rootScope));\n    res.filter(r => (collectionNodes.has(r.name) && path.scope.getBinding(r.name)?.scope === rootScope));\n\n    traverse(path.node.init, {\n      Identifier(path1) {\n        const binding = path1.scope.getBinding(path1.node.name);\n        if (\n          binding?.scope === rootScope\n          && collectionNodes.has(path1.node.name)\n          && (\n            (path1.parent.type !== 'MemberExpression'\n            && path1.parent.type !== 'OptionalMemberExpression')\n            || path1.parent.object === path1.node\n          )\n        ) {\n          res.forEach((r) => {\n            cb?.({\n              fromName: r.name,\n              toName: path1.node.name,\n              path: path1,\n              scope: rootScope,\n              collectionNodes,\n            });\n          });\n        }\n      },\n    }, path.scope, path);\n  }\n}\n\nexport function parseEdgeLeftArrayPattern({ path, rootScope, cb, collectionNodes }: IParseEdgeBase) {\n  if (!path.node.id || path.node.id.type !== 'ArrayPattern') {\n    return;\n  }\n  if (path.node.init?.type\n    && [\n      'ArrowFunctionExpression',\n      'FunctionExpression',\n      'CallExpression',\n      'ObjectExpression',\n      'ArrayExpression',\n    ].includes(path.node.init.type)\n  ) {\n    const res: t.Identifier[] = [];\n    rescureArrayPattern({\n      node: path.node.id,\n      rootScope,\n      res,\n      parentScope: path.scope,\n      parentPath: path,\n    });\n\n    res.filter(r => (collectionNodes.has(r.name) && path.scope.getBinding(r.name)?.scope === rootScope));\n\n    traverse(path.node.init, {\n      Identifier(path1) {\n        const binding = path1.scope.getBinding(path1.node.name);\n        if (\n          binding?.scope === rootScope\n          && collectionNodes.has(path1.node.name)\n          && (\n            (path1.parent.type !== 'MemberExpression'\n            && path1.parent.type !== 'OptionalMemberExpression')\n            || path1.parent.object === path1.node\n          )\n        ) {\n          res.forEach((r) => {\n            cb?.({\n              fromName: r.name,\n              toName: path1.node.name,\n              path: path1,\n              scope: rootScope,\n              collectionNodes,\n            });\n          });\n        }\n      },\n    }, path.scope, path);\n  }\n}\n\nexport function parseEdgeFunctionPattern({ path, rootScope, cb, collectionNodes }: IParseEdgeFunction) {\n  if (!path.node.id) {\n    return;\n  }\n  if (collectionNodes.has(path.node.id.name) && path.scope.getBinding(path.node.id.name)?.scope === rootScope) {\n    const name = path.node.id.name;\n    traverse(path.node.body, {\n      Identifier(path1) {\n        const binding = path1.scope.getBinding(path1.node.name);\n        if (binding?.scope === rootScope && collectionNodes.has(path1.node.name)) {\n          cb?.({\n            fromName: name,\n            toName: path1.node.name,\n            path: path1,\n            scope: rootScope,\n            collectionNodes,\n          });\n        }\n      },\n    }, path.scope, path);\n  }\n}\n\nexport function parseReturnJsxPattern({ path, parentPath, cb }: IParseReturnJSX) {\n  if (\n    path.node.argument\n    && (\n      // return () => (<div></div>)\n      // return function() (<div></div>)\n      (\n        (\n          path.node.argument.type === 'ArrowFunctionExpression'\n          || path.node.argument.type === 'FunctionExpression'\n        ) && (\n          path.node.argument.body.type === 'JSXElement'\n          || path.node.argument.body.type === 'JSXFragment'\n        )\n      )\n      // return (<div></div>)\n      || (\n        path.node.argument.type === 'JSXElement'\n        || path.node.argument.type === 'JSXFragment'\n      )\n    )\n  ) {\n    path.traverse({\n      Identifier(path1) {\n        // if (path1.scope.getBinding(path1.node.name)?.scope === parentPath.scope) {\n        //   nodesUsedInTemplate.add(path1.node.name);\n        // }\n        cb?.({\n          name: path1.node.name,\n          path: path1,\n          parentPath,\n        });\n      },\n    });\n  }\n}\n\nexport function traverseSetup({ node, parentScope, parentPath }: IParseSetup) {\n  let path: NodePath<t.ObjectMethod>;\n\n  traverse(node, {\n    ObjectMethod(path1) {\n      if (\n        (\n          parentPath.node.declaration.type === 'ObjectExpression'\n          && path1.parent === parentPath.node.declaration\n        ) || (\n          parentPath.node.declaration.type === 'CallExpression'\n          && path1.parent === parentPath.node.declaration.arguments[0]\n        )\n      ) {\n        if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'setup') {\n          path = path1;\n        }\n      }\n    },\n  }, parentScope, parentPath);\n\n  return path!;\n}\n\nexport function collectionSpread({ path: path1, spread }: ICollectSpread) {\n  path1.traverse({\n    ReturnStatement(path2) {\n      // get setup return obj spread\n      if (path2.node.argument?.type === 'ObjectExpression') {\n        const returnNode = path2.node.argument;\n        traverse(returnNode, {\n          SpreadElement(path3) {\n            // ...toRefs(xxx)\n            if (\n              path3.node.argument.type === 'CallExpression'\n              && path3.node.argument.callee.type === 'Identifier'\n              && path3.node.argument.callee.name === 'toRefs'\n              && path3.node.argument.arguments[0].type === 'Identifier'\n            ) {\n              spread.push(path3.node.argument.arguments[0].name);\n            }\n            // ...xxx\n            else if (\n              path3.node.argument.type === 'Identifier'\n            ) {\n              spread.push(path3.node.argument.name);\n            }\n          },\n        }, path2.scope, path2);\n      }\n    },\n  });\n}\n\nexport function addIdentifiesToGraphByScanReturn(\n  { path: path1, graph, nodeCollection, tempNodeCollection, tempEdges }: IAddIdentifiesToGraphByScanReturn,\n) {\n  path1.traverse({\n    ReturnStatement(path2) {\n      // get setup return obj spread\n      if (path2.node.argument?.type === 'ObjectExpression') {\n        const returnNode = path2.node.argument;\n        traverse(returnNode, {\n          ObjectProperty(path3) {\n            // not spread node\n            if (path3.parent === returnNode) {\n              if (path3.node.key.type === 'Identifier' && path3.node.value.type === 'Identifier') {\n                const valName = path3.node.value.name;\n                if (!graph.nodes.has(valName)) {\n                  graph.nodes.add(valName);\n                  nodeCollection.addTypedNode(\n                    valName,\n                    tempNodeCollection.nodes.get(valName)!,\n                  );\n                }\n                if (!graph.edges.has(valName)) {\n                  graph.edges.set(valName, new Set([...Array.from(\n                    tempEdges.get(valName) || new Set<string>(),\n                  )]));\n                }\n\n                const name = path3.node.key.name;\n                if (name !== valName) {\n                  graph.nodes.add(name);\n                  nodeCollection.addNode(name, path3.node.key, {\n                    comment: getComment(path3.node),\n                  });\n                  graph.edges.set(name, new Set([valName]));\n                }\n              }\n            }\n          },\n        }, path2.scope, path2);\n      }\n    },\n  });\n}\n\nexport function addSpreadToGraphByScanReturn(\n  { path: path1, graph, nodeCollection, tempNodeCollection, tempEdges, tempSpread }: IAddSpreadToGraphByScanReturn,\n) {\n  path1.traverse({\n    ReturnStatement(path2) {\n      // get setup return obj spread\n      if (path2.node.argument?.type === 'ObjectExpression') {\n        const returnNode = path2.node.argument;\n        traverse(returnNode, {\n          SpreadElement(path3) {\n            // ...toRefs(xxx)\n            if (\n              path3.node.argument.type === 'CallExpression'\n              && path3.node.argument.callee.type === 'Identifier'\n              && path3.node.argument.callee.name === 'toRefs'\n              && path3.node.argument.arguments[0].type === 'Identifier'\n              && tempSpread.get(path3.node.argument.arguments[0].name)\n            ) {\n              tempSpread.get(path3.node.argument.arguments[0].name)?.forEach((name) => {\n                graph.nodes.add(name);\n                nodeCollection.addTypedNode(name, tempNodeCollection.nodes.get(name)!);\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                  tempEdges.get(name)?.forEach((edge) => {\n                    graph.edges.get(name)?.add(edge);\n                  });\n                }\n              });\n            }\n            // ...xxx\n            else if (\n              path3.node.argument.type === 'Identifier'\n              && tempSpread.get(path3.node.argument.name)\n            ) {\n              tempSpread.get(path3.node.argument.name)?.forEach((name) => {\n                graph.nodes.add(name);\n                nodeCollection.addTypedNode(name, tempNodeCollection.nodes.get(name)!);\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                  tempEdges.get(name)?.forEach((edge) => {\n                    graph.edges.get(name)?.add(edge);\n                  });\n                }\n              });\n            }\n          },\n        }, path2.scope, path2);\n      }\n    },\n  });\n}\n\nexport function addGraphBySpreadIdentifier({ path: path1, graph, nodeCollection, iname }: IAddGraphBySpreadIdentifier) {\n  if (path1.node.init?.type === 'ObjectExpression') {\n    path1.node.init?.properties.forEach((prop) => {\n      if (\n        (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod')\n        && prop.key.type === 'Identifier'\n      ) {\n        const keyName = prop.key.name;\n        graph.nodes.add(keyName);\n        nodeCollection.addNode(keyName, prop, {\n          comment: getComment(prop),\n        });\n        if (!graph.edges.get(keyName)) {\n          graph.edges.set(keyName, new Set());\n        }\n        if (graph.spread.has(iname)) {\n          graph.spread.get(iname)?.add(keyName);\n        }\n        else {\n          graph.spread.set(iname, new Set([keyName]));\n        }\n      }\n      else if (prop.type === 'SpreadElement') {\n        console.warn('not support spread in spread');\n      }\n    });\n  }\n\n  if (\n    path1.node.init?.type === 'CallExpression'\n    && path1.node.init?.callee.type === 'Identifier'\n    && path1.node.init?.callee.name === 'reactive'\n  ) {\n    const arg = path1.node.init?.arguments[0];\n    if (arg.type === 'ObjectExpression') {\n      arg.properties.forEach((prop) => {\n        if (\n          (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod')\n          && prop.key.type === 'Identifier'\n        ) {\n          const keyName = prop.key.name;\n          graph.nodes.add(keyName);\n          nodeCollection.addNode(keyName, prop, {\n            comment: getComment(prop),\n          });\n          if (!graph.edges.get(keyName)) {\n            graph.edges.set(keyName, new Set());\n          }\n          if (graph.spread.has(iname)) {\n            graph.spread.get(iname)?.add(keyName);\n          }\n          else {\n            graph.spread.set(iname, new Set([keyName]));\n          }\n        }\n        else if (prop.type === 'SpreadElement') {\n          console.warn('not support spread in spread');\n        }\n      });\n    }\n  }\n}\n","import type { TypedNode } from '../analyze/utils';\n\nfunction dfs(\n  graph: Map<TypedNode, Set<TypedNode>>,\n  node: TypedNode,\n  targets: Set<TypedNode>,\n  visited: Set<TypedNode>,\n  component: Set<TypedNode>,\n) {\n  component.add(node);\n  visited.add(node);\n  targets.forEach((target) => {\n    if (!visited.has(target)) {\n      dfs(graph, target, graph.get(target) || new Set(), visited, component);\n    }\n  });\n}\n\nfunction haveIntersection(setA: Set<TypedNode>, setB: Set<TypedNode>): boolean {\n  for (const item of setA) {\n    if (setB.has(item)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nfunction mergeSets(arr: Set<TypedNode>[]): Set<TypedNode>[] {\n  let result: Set<TypedNode>[] = [...arr];\n  for (let i = 0; i < result.length; i++) {\n    for (let j = i + 1; j < result.length; j++) {\n      if (haveIntersection(result[i], result[j])) {\n        const newSet = new Set([...result[i], ...result[j]]);\n        result.splice(j, 1);\n        result.splice(i, 1);\n        result = [...result, newSet];\n        return mergeSets(result);\n      }\n    }\n  }\n  return result;\n}\n\nexport function splitGraph(\n  graph: Map<TypedNode, Set<TypedNode>>,\n) {\n  const components = [] as Set<TypedNode>[];\n\n  const sorted = Array.from(graph).sort((a, b) => b[1].size - a[1].size);\n\n  (new Map(sorted)).forEach((targets, node) => {\n    const visited = new Set<TypedNode>();\n    if (!visited.has(node)) {\n      const component = new Set<TypedNode>();\n      dfs(graph, node, targets, visited, component);\n      components.push(component);\n    }\n  });\n\n  return mergeSets(components).map((component) => {\n    const subGraph = new Map<TypedNode, Set<TypedNode>>();\n    component.forEach((node) => {\n      const targets = graph.get(node);\n      if (targets) {\n        subGraph.set(node, targets);\n      }\n    });\n    return subGraph;\n  });\n}\n","import type { TypedNode } from '../analyze/utils';\nimport { NodeType } from '../analyze/utils';\n\n/**\n * Filter out nodes that have no indegree.\n */\nexport function noIndegreeFilter(\n  graph: Map<TypedNode, Set<TypedNode>>,\n) {\n  const nodes = Array.from(graph.keys());\n  const indegree = new Map<TypedNode, number>();\n  nodes.forEach((node) => {\n    indegree.set(node, 0);\n  });\n  graph.forEach((targets, node) => {\n    targets.forEach((target) => {\n      indegree.set(target, (indegree.get(target) || 0) + 1);\n    });\n  });\n  return nodes.filter(node => indegree.get(node) === 0);\n}\n\n/**\n * Filter out nodes that have no outdegree.\n */\nexport function noOutdegreeFilter(\n  graph: Map<TypedNode, Set<TypedNode>>,\n) {\n  const zeroOutdegreeNodes = [];\n\n  for (const [node, edges] of graph.entries()) {\n    if (edges.size === 0) {\n      zeroOutdegreeNodes.push(node);\n    }\n  }\n\n  return zeroOutdegreeNodes;\n}\n\n// ---\n\nfunction removeVariable(\n  graph: Map<TypedNode, Set<TypedNode>>,\n  targets: Set<TypedNode>,\n) {\n  const newTarget = new Set<TypedNode>();\n  targets.forEach((target) => {\n    if (target.type === NodeType.var) {\n      const nodes = graph.get(target);\n      nodes?.forEach((node) => {\n        newTarget.add(node);\n      });\n    }\n    if (target.type === NodeType.fun) {\n      newTarget.add(target);\n    }\n  });\n  return newTarget;\n}\n\n/**\n * only save function nodes\n */\nexport function onlyFunctions(\n  graph: Map<TypedNode, Set<TypedNode>>,\n): Map<TypedNode, Set<TypedNode>> {\n  const result = new Map<TypedNode, Set<TypedNode>>();\n  graph.forEach((targets, node) => {\n    if (node.type === NodeType.fun) {\n      const nodes = removeVariable(graph, targets);\n      result.set(node, nodes);\n    }\n  });\n  return result;\n}\n\n// ---\n\nexport function findLinearPaths(graph: Map<TypedNode, Set<TypedNode>>) {\n  const linearPaths = [];\n\n  const visitedNodes = new Set();\n\n  for (const [node, edges] of graph.entries()) {\n    if (edges.size === 1 && !visitedNodes.has(node) && node.type === NodeType.fun) {\n      const path = [node];\n      let nextNode = Array.from(edges)[0];\n\n      visitedNodes.add(node);\n\n      while (graph.get(nextNode)?.size === 1) {\n        if (visitedNodes.has(nextNode)) {\n          break;\n        }\n        path.push(nextNode);\n        visitedNodes.add(nextNode);\n        nextNode = Array.from(graph.get(nextNode)!)[0];\n      }\n\n      if (path.length > 1) {\n        linearPaths.push(path);\n      }\n    }\n  }\n\n  return linearPaths;\n}\n\n// ---\n\nexport function findArticulationPoints(graph: Map<TypedNode, Set<TypedNode>>) {\n  const noIndegreeNodes = noIndegreeFilter(graph);\n  let time = 0;\n  const low = new Map<TypedNode, number>();\n  const disc = new Map<TypedNode, number>();\n  const parent = new Map<TypedNode, TypedNode | null>();\n  const ap = new Set<TypedNode>();\n  const visited = new Set<TypedNode>();\n\n  function APUtil(graph: Map<TypedNode, Set<TypedNode>>, node: TypedNode) {\n    let children = 0;\n    disc.set(node, time);\n    low.set(node, time);\n    time++;\n    visited.add(node);\n\n    for (const neighbor of graph.get(node) || []) {\n      if (!visited.has(neighbor)) {\n        children++;\n        parent.set(neighbor, node);\n        APUtil(graph, neighbor);\n        low.set(node, Math.min(low.get(node)!, low.get(neighbor)!));\n        if (parent.get(node) === null && children > 1) {\n          ap.add(node);\n        }\n        if (parent.get(node) !== null && low.get(neighbor)! >= disc.get(node)!) {\n          ap.add(node);\n        }\n      }\n      else if (neighbor !== parent.get(node)) {\n        low.set(node, Math.min(low.get(node)!, disc.get(neighbor)!));\n      }\n    }\n  }\n\n  for (const node of graph.keys()) {\n    if (!visited.has(node) && !noIndegreeNodes.includes(node)) {\n      APUtil(graph, node);\n    }\n  }\n  return ap;\n}\n","import type { TypedNode } from '../analyze/utils';\n\nexport function hasCycle(graph: Map<TypedNode, Set<TypedNode>>): { hasCycle: boolean, cycleNodes: TypedNode[] } {\n  const visited: Set<TypedNode> = new Set();\n  const onStack: Set<TypedNode> = new Set();\n  const stack: TypedNode[] = [];\n\n  function dfs(node: TypedNode): boolean {\n    if (visited.has(node)) {\n      if (onStack.has(node)) {\n        // Find the start of the cycle.\n        while (stack[0] !== node) {\n          onStack.delete(stack.shift()!);\n        }\n        return true;\n      }\n      return false;\n    }\n\n    visited.add(node);\n    onStack.add(node);\n    stack.push(node);\n\n    for (const neighbor of (graph.get(node) || new Set())) {\n      if (dfs(neighbor)) {\n        return true;\n      }\n    }\n\n    onStack.delete(node);\n    stack.pop();\n    return false;\n  }\n\n  for (const [node, targets] of graph) {\n    if (dfs(node)) {\n      return { hasCycle: true, cycleNodes: [...stack] };\n    }\n  }\n\n  return { hasCycle: false, cycleNodes: [] };\n}\n","import * as t from '@babel/types';\nimport type { TypedNode } from '../analyze/utils';\nimport { NodeType } from '../analyze/utils';\nimport { splitGraph } from './split';\nimport { findArticulationPoints, findLinearPaths, noIndegreeFilter, noOutdegreeFilter, onlyFunctions } from './filter';\nimport { hasCycle } from './utils';\n\nexport enum SuggestionType {\n  info = 'info',\n  warning = 'warning',\n  error = 'error',\n}\n\nexport interface Suggestion {\n  type: SuggestionType\n  message: string\n  nodeInfo?: TypedNode | Array<TypedNode>\n};\n\nexport function gen(\n  graph: {\n    nodes: Set<TypedNode>\n    edges: Map<TypedNode, Set<TypedNode>>\n  },\n  usedNodes: Set<string>,\n) {\n  const suggestions: Suggestion[] = [];\n  const splitedGraph = splitGraph(graph.edges);\n  // console.log(splitedGraph);\n  splitedGraph.forEach((g) => {\n    const nodes = Array.from(g.keys());\n\n    if (splitedGraph.length > 1) {\n      if (nodes.length > 2 && nodes.some(node => !usedNodes.has(node.label))) {\n        suggestions.push({\n          type: SuggestionType.info,\n          message: `Nodes [${\n            nodes.length > 10\n              ? `${nodes.slice(0, 10).map(node => node.label).join(',')}...(${nodes.length})`\n              : nodes.map(node => node.label).join(',')\n          }] are isolated, perhaps you can refactor them to an isolated file.`,\n          nodeInfo: nodes,\n        });\n      }\n    }\n\n    if (nodes.length > 1 && nodes.every(node => !usedNodes.has(node.label) && !node.info?.used?.size)) {\n      suggestions.push({\n        type: SuggestionType.info,\n        message: `Nodes [${\n          nodes.length > 10\n            ? `${nodes.slice(0, 10).map(node => node.label).join(',')}...`\n            : nodes.map(node => node.label).join(',')\n        }] are not used, perhaps you can remove them.`,\n        nodeInfo: nodes,\n      });\n    }\n    const hasCycleResult = hasCycle(g);\n    if (hasCycleResult.hasCycle) {\n      suggestions.push({\n        type: SuggestionType.error,\n        message: `There is a loop call in nodes [${\n          hasCycleResult.cycleNodes.map(node => node.label).join(',')\n        }], perhaps you can refactor it.`,\n        nodeInfo: hasCycleResult.cycleNodes,\n      });\n    }\n\n    const paths = findLinearPaths(g);\n    paths.forEach((path) => {\n      suggestions.push({\n        type: SuggestionType.warning,\n        message: `Nodes [${\n          path.length > 10\n            ? `${path.slice(0, 10).map(node => node.label).join(',')}...(${path.length})`\n            : path.map(node => node.label).join(',')\n        }] are have function chain calls, perhaps you can refactor it.`,\n        nodeInfo: path,\n      });\n    });\n\n    if (g.size > 5) {\n      const ap = findArticulationPoints(g);\n      ap.forEach((node) => {\n        if (node.type === NodeType.fun) {\n          suggestions.push({\n            type: SuggestionType.info,\n\n            message: `Node [${\n              node.label\n            }] is an articulation point, perhaps you need to pay special attention to this node.`,\n            nodeInfo: node,\n          });\n        }\n      });\n    }\n  });\n\n  const noIndegreeNodes = noIndegreeFilter(graph.edges);\n  noIndegreeNodes.forEach((node) => {\n    if (!usedNodes.has(node.label) && !node.info?.used?.size) {\n      suggestions.push({\n        type: SuggestionType.info,\n        message: `Node [${node.label}] is not used, perhaps you can remove it.`,\n        nodeInfo: node,\n      });\n    }\n  });\n\n  // const noOutdegreeNodes = noOutdegreeFilter(graph.edges);\n  // noOutdegreeNodes.forEach(node => {\n  //   if(!usedNodes.has(node.label)) {\n  //     suggestions.push({\n  //       type: SuggestionType.info,\n  //       message: `Node [${node.label}] is not used, perhaps you can remove it.`,\n  //       nodeInfo: node,\n  //     });\n  //   }\n  // });\n\n  return suggestions;\n}\n","import type { Data, Edge, Node } from 'vis-network';\nimport type { TypedNode } from './analyze/utils';\n\ntype CustomNode = Node & {\n  info: TypedNode['info']\n};\n\nexport function getVisData(\n  graph: {\n    nodes: Set<TypedNode>\n    edges: Map<TypedNode, Set<TypedNode>>\n  },\n  usedNodes: Set<string>,\n) {\n  const nodes: CustomNode[] = [];\n  const edges: Edge[] = [];\n\n  graph.nodes.forEach((node) => {\n    nodes.push({\n      id: node.label,\n      label: node.label,\n      shape: node.type === 'var'\n        ? 'dot'\n        : 'diamond',\n      group: usedNodes.has(node.label) || node.info?.used?.size\n        ? 'used'\n        : 'normal',\n      title: `${\n        node.info?.used?.size\n          ? `used by ${Array.from(node.info?.used || [])?.map(i => `\\`${i}\\``).join(',')}\\n\\n`\n          : ''\n      }${\n        usedNodes.has(node.label)\n          ? 'used in template\\n\\n'\n          : ''\n      }${node.info?.comment || ''}`.trim() || undefined,\n      info: node.info,\n    });\n  });\n\n  graph.edges.forEach((edge, key) => {\n    edge.forEach((to) => {\n      if (!to) {\n        return;\n      }\n      edges.push({\n        from: key.label,\n        to: to.label,\n        arrows: {\n          to: {\n            enabled: true,\n            scaleFactor: 0.8,\n          },\n        },\n      });\n    });\n  });\n\n  return {\n    nodes,\n    edges,\n  };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,0BAAAA;AAAA,EAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAC,uBAAsB;;;ACAtB,0BAA4C;AAC5C,sBAAsB;AAEtB,IAAM,WAEF,gBAAAC,QAAU,SAAS,WAAW,gBAAAA,QAAU,WAAW,gBAAAA;AAEhD,SAAS,QACd,SACA;AACA,QAAM,KAAK;AACX,QAAM,EAAE,KAAK,QAAI,qCAAgB;AAAA,IAC/B;AAAA,IACA,QAAQ;AAAA,IACR,UAAU,GAAG,EAAE;AAAA,EACjB,CAAC;AAGD,QAAM,UAAM,gCAAW,MAAM,EAAE,YAAY,UAAU,SAAS;AAAA,IAC5D;AAAA,EACF,EAAE,CAAC;AAIH,QAAM,QAAQ,oBAAI,IAAY;AAE9B,WAAS,KAAK;AAAA,IACZ,iBAAiB,MAAM;AACrB,UAAI,KAAK,SAAS,oBAAoB;AACpC,YAAI,KAAK,KAAK,UAAU,KAAK,KAAK,OAAO,SAAS,gBAAgB,KAAK,KAAK,OAAO,SAAS,QAAQ;AAClG,cAAI,KAAK,KAAK,YAAY,KAAK,KAAK,SAAS,SAAS,cAAc;AAClE,kBAAM,IAAI,KAAK,KAAK,SAAS,IAAI;AAAA,UACnC;AAAA,QAC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gB,CAAC;AAEvB,QAAM,MAAM,QAAQ,CAAC,SAAS;AAC5B,UAAM,KAAK;AAAA,MACT,IAAI,KAAK;AAAA,MACT,OAAO,KAAK;AAAA,MACZ,OAAO,KAAK,SAAS,QACjB,QACA;AAAA,MACJ,OAAO,UAAU,IAAI,KAAK,KAAK,KAAK,KAAK,MAAM,MAAM,OACjD,SACA;AAAA,MACJ,OAAO,GACL,KAAK,MAAM,MAAM,OACb,WAAW,MAAM,KAAK,KAAK,MAAM,QAAQ,CAAC,CAAC,GAAG,IAAI,OAAK,KAAK,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC;AAAA;AAAA,IAC5E,EACN,GACE,UAAU,IAAI,KAAK,KAAK,IACpB,yBACA,EACN,GAAG,KAAK,MAAM,WAAW,EAAE,GAAG,KAAK,KAAK;AAAA,MACxC,MAAM,KAAK;AAAA,IACb,CAAC;AAAA,EACH,CAAC;AAED,QAAM,MAAM,QAAQ,CAAC,MAAM,QAAQ;AACjC,SAAK,QAAQ,CAAC,OAAO;AACnB,UAAI,CAAC,IAAI;AACP;AAAA,MACF;AACA,YAAM,KAAK;AAAA,QACT,MAAM,IAAI;AAAA,QACV,IAAI,GAAG;AAAA,QACP,QAAQ;AAAA,UACN,IAAI;AAAA,YACF,SAAS;AAAA,YACT,aAAa;AAAA,UACf;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;","names":["analyze","import_compiler_sfc","_traverse","import_compiler_sfc","import_traverse","NodeType","traverse","_traverse","analyze","import_compiler_sfc","import_traverse","traverse","_traverse","analyze","import_compiler_sfc","import_traverse","traverse","_traverse","node","parentPath","traverse","params","analyze","graph","dfs","SuggestionType"]}
         | 
| 1 | 
            +
            {"version":3,"sources":["../src/index.ts","../src/analyze/template.ts","../src/analyze/setupScript.ts","../src/analyze/utils.ts","../src/analyze/options.ts","../src/analyze/tsx.ts","../src/utils/traverse.ts","../src/suggest/split.ts","../src/suggest/filter.ts","../src/suggest/utils.ts","../src/suggest/index.ts","../src/vis.ts"],"sourcesContent":["export { parse } from '@vue/compiler-sfc';\nexport * from './analyze';\nexport * from './suggest';\nexport { getVisData } from './vis';\nexport type { TypedNode } from './analyze/utils';\nexport { NodeType } from './analyze/utils';\n","import { babelParse, compileTemplate } from '@vue/compiler-sfc';\nimport _traverse from '@babel/traverse';\n\nconst traverse: typeof _traverse\n  // @ts-expect-error unwarp default\n  = _traverse.default?.default || _traverse.default || _traverse;\n\nexport function analyze(\n  content: string,\n) {\n  const id = 'template';\n  const { code } = compileTemplate({\n    id,\n    source: content,\n    filename: `${id}.js`,\n  });\n\n  // console.log(code);\n  const ast = babelParse(code, { sourceType: 'module', plugins: [\n    'typescript',\n  ] });\n\n  // ----\n\n  const nodes = new Set<string>();\n\n  traverse(ast, {\n    MemberExpression(path) {\n      if (path.type === 'MemberExpression') {\n        if (path.node.object && path.node.object.type === 'Identifier' && path.node.object.name === '_ctx') {\n          if (path.node.property && path.node.property.type === 'Identifier') {\n            nodes.add(path.node.property.name);\n          }\n        }\n      }\n    },\n    ObjectProperty(path) {\n      if (path.node.key.type === 'Identifier' && path.node.key.name === 'ref') {\n        if (path.node.value.type === 'StringLiteral') {\n          const name = path.node.value.value;\n          name && nodes.add(name);\n        }\n      }\n    },\n    // component\n    CallExpression(path) {\n      if (path.node.callee.type === 'Identifier' && path.node.callee.name === '_resolveComponent') {\n        if (path.node.arguments[0].type === 'StringLiteral') {\n          const name = path.node.arguments[0].value;\n          name && nodes.add(name);\n        }\n      }\n    },\n  });\n\n  return nodes;\n}\n","import { babelParse } from '@vue/compiler-sfc';\nimport type { Scope } from '@babel/traverse';\nimport _traverse from '@babel/traverse';\nimport type * as t from '@babel/types';\nimport { NodeCollection, NodeType, getComment } from './utils';\n\nconst traverse: typeof _traverse\n  // @ts-expect-error unwarp default\n  = _traverse.default?.default || _traverse.default || _traverse;\n\nconst ignoreFunctionsName = ['defineProps', 'defineEmits', 'withDefaults'];\n\nexport function processSetup(\n  ast: t.Node,\n  parentScope?: Scope,\n  parentPath?: t.Node,\n  _spread?: string[],\n  _lineOffset = 0,\n) {\n  const spread = _spread || [];\n\n  const nodeCollection = new NodeCollection(_lineOffset);\n\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n    spread: new Map<string, Set<string>>(),\n  };\n\n  traverse(ast, {\n    VariableDeclaration(path) {\n      path.node.declarations.forEach((declaration) => {\n        if (declaration.id.type === 'ArrayPattern') {\n          declaration.id.elements.forEach((element) => {\n            if (element?.type === 'Identifier') {\n              const name = element.name;\n              const binding = path.scope.getBinding(name);\n\n              if (\n                binding\n                && (path.parent.type === 'Program'\n                || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n                )\n                && !(declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && ignoreFunctionsName.includes(declaration.init?.callee.name)\n                )\n              ) {\n                graph.nodes.add(name);\n                nodeCollection.addNode(name, element, {\n                  comment: getComment(path.node),\n                });\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                }\n              }\n            }\n            if (element?.type === 'RestElement' && element.argument.type === 'Identifier') {\n              const name = element.argument.name;\n              const binding = path.scope.getBinding(name);\n\n              if (\n                binding\n                && (path.parent.type === 'Program'\n                || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n                )\n                && !(declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && ignoreFunctionsName.includes(declaration.init?.callee.name)\n                )\n              ) {\n                graph.nodes.add(name);\n                nodeCollection.addNode(name, element.argument, {\n                  comment: getComment(path.node),\n                });\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                }\n              }\n            }\n          });\n        }\n        if (declaration.id.type === 'ObjectPattern') {\n          declaration.id.properties.forEach((property) => {\n            if (property.type === 'ObjectProperty' && property.value.type === 'Identifier') {\n              const name = property.value.name;\n              const binding = path.scope.getBinding(name);\n              if (\n                binding\n                && (path.parent.type === 'Program'\n                || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n                )\n                && !(declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && ignoreFunctionsName.includes(declaration.init?.callee.name)\n                )\n              ) {\n                graph.nodes.add(name);\n                nodeCollection.addNode(name, property.value, {\n                  comment: getComment(property),\n                });\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                }\n              }\n            }\n\n            if (property.type === 'RestElement' && property.argument.type === 'Identifier') {\n              const name = property.argument.name;\n              const binding = path.scope.getBinding(name);\n              if (\n                binding\n                && (path.parent.type === 'Program'\n                || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n                )\n                && !(declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && ignoreFunctionsName.includes(declaration.init?.callee.name)\n                )\n              ) {\n                graph.nodes.add(name);\n                nodeCollection.addNode(name, property.argument, {\n                  comment: getComment(property),\n                });\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                }\n              }\n            }\n          });\n        }\n        if (declaration.id?.type === 'Identifier') {\n          const name = declaration.id.name;\n          const binding = path.scope.getBinding(name);\n          if (\n            binding\n            && (path.parent.type === 'Program'\n            || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n            )\n            && !(declaration.init?.type === 'CallExpression'\n            && declaration.init?.callee.type === 'Identifier'\n            && ignoreFunctionsName.includes(declaration.init?.callee.name)\n            )\n          ) {\n            graph.nodes.add(name);\n            nodeCollection.addNode(name, declaration, {\n              comment: getComment(path.node),\n            });\n            if (!graph.edges.get(name)) {\n              graph.edges.set(name, new Set());\n            }\n\n            if (spread.includes(name)) {\n              if (declaration.init?.type === 'ObjectExpression') {\n                declaration.init?.properties.forEach((prop) => {\n                  if (\n                    (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod')\n                    && prop.key.type === 'Identifier'\n                  ) {\n                    const keyName = prop.key.name;\n                    graph.nodes.add(keyName);\n                    nodeCollection.addNode(keyName, prop, {\n                      comment: getComment(prop),\n                    });\n                    if (!graph.edges.get(keyName)) {\n                      graph.edges.set(keyName, new Set());\n                    }\n                    if (graph.spread.has(name)) {\n                      graph.spread.get(name)?.add(keyName);\n                    }\n                    else {\n                      graph.spread.set(name, new Set([keyName]));\n                    }\n                  }\n                  else if (prop.type === 'SpreadElement') {\n                    console.warn('not support spread in spread');\n                  }\n                });\n              }\n              if (\n                declaration.init?.type === 'CallExpression'\n                && declaration.init?.callee.type === 'Identifier'\n                && declaration.init?.callee.name === 'reactive'\n              ) {\n                const arg = declaration.init?.arguments[0];\n                if (arg.type === 'ObjectExpression') {\n                  arg.properties.forEach((prop) => {\n                    if (\n                      (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod')\n                      && prop.key.type === 'Identifier'\n                    ) {\n                      const keyName = prop.key.name;\n                      graph.nodes.add(keyName);\n                      nodeCollection.addNode(keyName, prop, {\n                        comment: getComment(prop),\n                      });\n                      if (!graph.edges.get(keyName)) {\n                        graph.edges.set(keyName, new Set());\n                      }\n                      if (graph.spread.has(name)) {\n                        graph.spread.get(name)?.add(keyName);\n                      }\n                      else {\n                        graph.spread.set(name, new Set([keyName]));\n                      }\n                    }\n                    else if (prop.type === 'SpreadElement') {\n                      console.warn('not support spread in spread');\n                    }\n                  });\n                }\n              }\n            }\n          }\n        }\n      });\n    },\n    FunctionDeclaration(path) {\n      const name = path.node.id?.name;\n      if (name) {\n        const binding = path.scope.getBinding(name);\n        if (binding && (path.parent.type === 'Program'\n          || (parentPath?.type === 'ObjectMethod' && parentPath.body === path.parent)\n        )) {\n          graph.nodes.add(name);\n          nodeCollection.addNode(name, path.node.id!, {\n            isMethod: true,\n            comment: getComment(path.node),\n          });\n          if (!graph.edges.get(name)) {\n            graph.edges.set(name, new Set());\n          }\n        }\n      }\n    },\n  }, parentScope, parentPath);\n\n  // get the relation between the variable and the function\n\n  traverse(ast, {\n    FunctionDeclaration(path) {\n      const name = path.node.id?.name;\n      if (name && graph.nodes.has(name)) {\n        traverse(path.node.body, {\n          Identifier(path1) {\n            const binding = path1.scope.getBinding(path1.node.name);\n            if (\n              graph.nodes.has(path1.node.name)\n              && (\n                (path1.parent.type !== 'MemberExpression'\n                && path1.parent.type !== 'OptionalMemberExpression')\n                || path1.parent.object === path1.node\n              )\n              && (binding?.scope.block.type === 'Program'\n              || (parentScope === binding?.scope)\n              )\n            ) {\n              graph.edges.get(name)?.add(path1.node.name);\n            }\n          },\n          MemberExpression(path1) {\n            if (\n              path1.node.object.type === 'Identifier'\n              && spread.includes(path1.node.object.name)\n            ) {\n              const binding = path1.scope.getBinding(path1.node.object.name);\n              if (\n                spread.includes(path1.node.object.name)\n                && path1.node.property.type === 'Identifier'\n                && (binding?.scope.block.type === 'Program'\n                || (parentScope === binding?.scope)\n                )\n              ) {\n                graph.edges.get(name)?.add(path1.node.property.name);\n              }\n            }\n          },\n        }, path.scope, path);\n      }\n    },\n\n    VariableDeclarator(path) {\n      if (path.node.init) {\n        if (path.node.id.type === 'ArrayPattern') {\n          path.node.id.elements.forEach((element) => {\n            if (element?.type === 'Identifier') {\n              const name = element.name;\n              if (name && graph.nodes.has(name) && path.node.init?.type === 'CallExpression') {\n                traverse(path.node.init, {\n                  Identifier(path1) {\n                    const binding = path1.scope.getBinding(path1.node.name);\n                    if (\n                      graph.nodes.has(path1.node.name)\n                      && (\n                        (path1.parent.type !== 'MemberExpression'\n                        && path1.parent.type !== 'OptionalMemberExpression')\n                        || path1.parent.object === path1.node\n                      )\n                      && (binding?.scope.block.type === 'Program'\n                      || (parentScope === binding?.scope)\n                      )\n                    ) {\n                      graph.edges.get(name)?.add(path1.node.name);\n                    }\n                  },\n                  MemberExpression(path1) {\n                    if (\n                      path1.node.object.type === 'Identifier'\n                      && spread.includes(path1.node.object.name)\n                    ) {\n                      const binding = path1.scope.getBinding(path1.node.object.name);\n                      if (\n                        spread.includes(path1.node.object.name)\n                        && path1.node.property.type === 'Identifier'\n                        && (binding?.scope.block.type === 'Program'\n                        || (parentScope === binding?.scope)\n                        )\n                      ) {\n                        graph.edges.get(name)?.add(path1.node.property.name);\n                      }\n                    }\n                  },\n                }, path.scope, path);\n              }\n            }\n          });\n        }\n        else if (path.node.id.type === 'ObjectPattern') {\n          path.node.id.properties.forEach((property) => {\n            if (property.type === 'ObjectProperty' && property.value.type === 'Identifier') {\n              const name = property.value.name;\n              if (name && graph.nodes.has(name) && path.node.init) {\n                traverse(path.node.init, {\n                  Identifier(path1) {\n                    const binding = path1.scope.getBinding(path1.node.name);\n                    if (\n                      graph.nodes.has(path1.node.name)\n                      && (\n                        (path1.parent.type !== 'MemberExpression'\n                        && path1.parent.type !== 'OptionalMemberExpression')\n                        || path1.parent.object === path1.node\n                      )\n                      && (binding?.scope.block.type === 'Program'\n                      || (parentScope === binding?.scope)\n                      )\n                    ) {\n                      graph.edges.get(name)?.add(path1.node.name);\n                    }\n                  },\n                  MemberExpression(path1) {\n                    if (\n                      path1.node.object.type === 'Identifier'\n                      && spread.includes(path1.node.object.name)\n                    ) {\n                      const binding = path1.scope.getBinding(path1.node.object.name);\n                      if (\n                        spread.includes(path1.node.object.name)\n                        && path1.node.property.type === 'Identifier'\n                        && (binding?.scope.block.type === 'Program'\n                        || (parentScope === binding?.scope)\n                        )\n                      ) {\n                        graph.edges.get(name)?.add(path1.node.property.name);\n                      }\n                    }\n                  },\n                }, path.scope, path);\n              }\n            }\n          });\n        }\n        else if ([\n          'CallExpression',\n          'ArrowFunctionExpression',\n          'FunctionDeclaration',\n        ].includes(path.node.init.type)\n        && path.node.id.type === 'Identifier'\n        ) {\n          const name = path.node.id?.name;\n          if (name && graph.nodes.has(name)) {\n            traverse(path.node.init, {\n              Identifier(path1) {\n                const binding = path1.scope.getBinding(path1.node.name);\n                if (\n                  graph.nodes.has(path1.node.name)\n                  && (\n                    (path1.parent.type !== 'MemberExpression'\n                    && path1.parent.type !== 'OptionalMemberExpression')\n                    || path1.parent.object === path1.node\n                  )\n                  && (binding?.scope.block.type === 'Program'\n                  || (parentScope === binding?.scope)\n                  )\n                ) {\n                  graph.edges.get(name)?.add(path1.node.name);\n                }\n              },\n              MemberExpression(path1) {\n                if (\n                  path1.node.object.type === 'Identifier'\n                  && spread.includes(path1.node.object.name)\n                ) {\n                  const binding = path1.scope.getBinding(path1.node.object.name);\n                  if (\n                    spread.includes(path1.node.object.name)\n                    && path1.node.property.type === 'Identifier'\n                    && (binding?.scope.block.type === 'Program'\n                    || (parentScope === binding?.scope)\n                    )\n                  ) {\n                    graph.edges.get(name)?.add(path1.node.property.name);\n                  }\n                }\n              },\n            }, path.scope, path);\n          }\n        }\n        else if (path.node.id.type === 'Identifier') {\n          const name = path.node.id.name;\n          if (path.node.init.type === 'Identifier') {\n            const binding = path.scope.getBinding(path.node.init.name);\n            if (\n              graph.nodes.has(path.node.init.name)\n              && (binding?.scope.block.type === 'Program'\n              || (parentScope === binding?.scope)\n              )\n            ) {\n              graph.edges.get(name)?.add(path.node.init.name);\n            }\n          }\n          else {\n            traverse(path.node.init, {\n              Identifier(path1) {\n                const binding = path1.scope.getBinding(path1.node.name);\n                if (\n                  graph.nodes.has(path1.node.name)\n                  && (\n                    (path1.parent.type !== 'MemberExpression'\n                    && path1.parent.type !== 'OptionalMemberExpression')\n                    || path1.parent.object === path1.node\n                  )\n                  && (binding?.scope.block.type === 'Program'\n                  || (parentScope === binding?.scope)\n                  )\n                ) {\n                  graph.edges.get(name)?.add(path1.node.name);\n                }\n              },\n            }, path.scope, path);\n          }\n        }\n      }\n    },\n\n    ObjectMethod(path) {\n      if (path.node.key.type === 'Identifier' && graph.nodes.has(path.node.key.name)) {\n        const name = path.node.key.name;\n\n        traverse(path.node.body, {\n          Identifier(path1) {\n            const binding = path1.scope.getBinding(path1.node.name);\n            if (\n              graph.nodes.has(path1.node.name)\n              && (\n                (path1.parent.type !== 'MemberExpression'\n                && path1.parent.type !== 'OptionalMemberExpression')\n                || path1.parent.object === path1.node\n              )\n              && (binding?.scope.block.type === 'Program'\n              || (parentScope === binding?.scope)\n              )\n            ) {\n              graph.edges.get(name)?.add(path1.node.name);\n            }\n          },\n          MemberExpression(path1) {\n            if (\n              path1.node.object.type === 'Identifier'\n              && spread.includes(path1.node.object.name)\n            ) {\n              const binding = path1.scope.getBinding(path1.node.object.name);\n              if (\n                spread.includes(path1.node.object.name)\n                && path1.node.property.type === 'Identifier'\n                && (binding?.scope.block.type === 'Program'\n                || (parentScope === binding?.scope)\n                )\n              ) {\n                graph.edges.get(name)?.add(path1.node.property.name);\n              }\n            }\n          },\n        }, path.scope, path);\n      }\n    },\n\n    ObjectProperty(path) {\n      if (path.node.key.type === 'Identifier' && graph.nodes.has(path.node.key.name)) {\n        const name = path.node.key.name;\n\n        traverse(path.node.value, {\n          MemberExpression(path1) {\n            if (\n              path1.node.object.type === 'Identifier'\n              && spread.includes(path1.node.object.name)\n            ) {\n              const binding = path1.scope.getBinding(path1.node.object.name);\n              if (\n                spread.includes(path1.node.object.name)\n                && path1.node.property.type === 'Identifier'\n                && (binding?.scope.block.type === 'Program'\n                || (parentScope === binding?.scope)\n                )\n              ) {\n                graph.edges.get(name)?.add(path1.node.property.name);\n              }\n            }\n          },\n        }, path.scope, path);\n      }\n    },\n\n    ExpressionStatement(path) {\n      if (path.node.expression.type === 'CallExpression' && path.node.expression.callee.type === 'Identifier') {\n        const hookName = path.node.expression.callee.name;\n        const hookBinding = path.scope.getBinding(hookName);\n        if (!(hookBinding === undefined || hookBinding?.scope.block.type === 'Program'\n          || parentScope === hookBinding?.scope)) {\n          return;\n        }\n\n        const watchArgs = new Set<t.Identifier>();\n        if (hookName === 'watch') {\n          if (path.node.expression.arguments[0].type === 'Identifier') {\n            const binding = path.scope.getBinding(path.node.expression.arguments[0].name);\n            if (\n              graph.nodes.has(path.node.expression.arguments[0].name)\n              && (binding?.scope.block.type === 'Program'\n              || parentScope === binding?.scope)\n            ) {\n              watchArgs.add(path.node.expression.arguments[0]);\n            }\n          }\n          else {\n            traverse(path.node.expression.arguments[0], {\n              Identifier(path1) {\n                const binding = path1.scope.getBinding(path1.node.name);\n                if (\n                  graph.nodes.has(path1.node.name)\n                  && (\n                    (path1.parent.type !== 'MemberExpression'\n                    && path1.parent.type !== 'OptionalMemberExpression')\n                    || path1.parent.object === path1.node\n                  )\n                  && (binding?.scope.block.type === 'Program'\n                  || parentScope === binding?.scope)\n                ) {\n                  watchArgs.add(path1.node);\n                }\n              },\n            }, path.scope, path);\n          }\n        }\n        else if (hookName === 'useEffect' && path.node.expression.arguments[1].type === 'ArrayExpression') {\n          traverse(path.node.expression.arguments[1], {\n            Identifier(path1) {\n              const binding = path1.scope.getBinding(path1.node.name);\n              if (\n                graph.nodes.has(path1.node.name)\n                && (\n                  (path1.parent.type !== 'MemberExpression'\n                  && path1.parent.type !== 'OptionalMemberExpression')\n                  || path1.parent.object === path1.node\n                )\n                && (binding?.scope.block.type === 'Program'\n                || parentScope === binding?.scope)\n              ) {\n                watchArgs.add(path1.node);\n              }\n            },\n          }, path.scope, path);\n        }\n        path.node.expression.arguments.forEach((argNode, index) => {\n          if (hookName === 'watch' && index === 0 && argNode.type === 'Identifier') {\n            const _node = nodeCollection.getNode(argNode.name);\n            if (_node?.info?.used) {\n              _node?.info?.used?.add(hookName);\n            }\n            else if (_node) {\n              _node.info = {\n                ..._node?.info,\n                used: new Set([hookName]),\n              };\n            }\n            return;\n          }\n          traverse(argNode, {\n            Identifier(path1) {\n              const binding = path1.scope.getBinding(path1.node.name);\n              if (\n                graph.nodes.has(path1.node.name)\n                && (\n                  (path1.parent.type !== 'MemberExpression'\n                  && path1.parent.type !== 'OptionalMemberExpression')\n                  || path1.parent.object === path1.node\n                )\n                && (binding?.scope.block.type === 'Program'\n                || parentScope === binding?.scope)\n              ) {\n                if (['watch', 'useEffect'].includes(hookName) && watchArgs.size > 0) {\n                  const watchArgsNames = Array.from(watchArgs).map(arg => arg.name);\n                  watchArgs.forEach((watchArg) => {\n                    if (!watchArgsNames.includes(path1.node.name)) {\n                      graph.edges.get(watchArg.name)?.add(path1.node.name);\n                    }\n                  });\n                }\n                const _node = nodeCollection.getNode(path1.node.name);\n                if (_node?.info?.used) {\n                  _node?.info?.used?.add(hookName);\n                }\n                else if (_node) {\n                  _node.info = {\n                    ..._node?.info,\n                    used: new Set([hookName]),\n                  };\n                }\n              }\n            },\n          }, path.scope, path);\n        });\n      }\n    },\n  }, parentScope, parentPath);\n\n  return {\n    graph,\n    nodeCollection,\n  };\n}\n\nexport function analyze(\n  content: string,\n  lineOffset = 0,\n  jsx = false,\n) {\n  // console.log(content);\n  const ast = babelParse(content, { sourceType: 'module', plugins: [\n    'typescript',\n    ...jsx\n      ? ['jsx' as const]\n      : [],\n  ] });\n\n  // ---\n  const { graph, nodeCollection } = processSetup(ast, undefined, undefined, undefined, lineOffset);\n  return nodeCollection.map(graph);\n}\n","import type * as t from '@babel/types';\n\nexport interface TypedNode {\n  label: string\n  type: NodeType\n  info?: Partial<{\n    line: number\n    column: number\n    comment: string\n    used: Set<string>\n  }>\n};\n\nexport enum NodeType {\n  var = 'var',\n  fun = 'fun',\n}\n\ninterface Options {\n  isComputed: boolean\n  isMethod: boolean\n  comment: string\n};\n\nexport class NodeCollection {\n  lineOffset = 0;\n  addInfo = true;\n  constructor(_lineOffset = 0, _addInfo = true) {\n    this.lineOffset = _lineOffset;\n    this.addInfo = _addInfo;\n  }\n\n  nodes = new Map<string, TypedNode>();\n\n  addNode(\n    label: string,\n    node: t.Node,\n    options: Partial<Options> = { isComputed: false, isMethod: false, comment: '' },\n  ) {\n    if (this.nodes.has(label)) {\n      return;\n    }\n    if (\n      (!options.isComputed && (\n        (node.type === 'VariableDeclarator' && [\n          'ArrowFunctionExpression',\n          'FunctionDeclaration',\n          'FunctionExpression',\n        ].includes(node.init?.type || ''))\n        || (node.type === 'ObjectProperty' && [\n          'ArrowFunctionExpression',\n          'FunctionDeclaration',\n          'FunctionExpression',\n        ].includes(node.value?.type || ''))\n        || node.type === 'FunctionDeclaration'\n        || node.type === 'ObjectMethod'\n        || node.type === 'ArrowFunctionExpression'\n        || node.type === 'FunctionExpression'\n      ))\n      || options.isMethod\n    ) {\n      this.nodes.set(label, {\n        label,\n        type: NodeType.fun,\n        ...(this.addInfo\n          ? {\n            info: {\n              line: (node.loc?.start.line || 1) - 1 + this.lineOffset,\n              column: node.loc?.start.column || 0,\n              ...options.comment\n                ? { comment: options.comment }\n                : {},\n            },\n          }\n          : {}),\n      });\n    }\n    else {\n      this.nodes.set(label, {\n        label,\n        type: NodeType.var,\n        ...(this.addInfo\n          ? {\n            info: {\n              line: (node.loc?.start.line || 1) - 1 + this.lineOffset,\n              column: node.loc?.start.column || 0,\n              ...options.comment\n                ? { comment: options.comment }\n                : {},\n            },\n          }\n          : {}),\n      });\n    }\n  }\n\n  addTypedNode(label: string, node: TypedNode) {\n    this.nodes.set(label, {\n      label,\n      type: node.type,\n      ...(this.addInfo\n        ? {\n          info: {\n            ...(node.info || {}),\n          },\n        }\n        : {}),\n    });\n  }\n\n  getNode(label: string) {\n    return this.nodes.get(label);\n  }\n\n  map(graph: {\n    nodes: Set<string>\n    edges: Map<string, Set<string>>\n  }) {\n    const nodes = new Set(Array.from(graph.nodes).map((node) => {\n      return this.nodes.get(node)!;\n    }).filter(node => !!node));\n\n    const edges = new Map(Array.from(graph.edges).map(([from, to]) => {\n      return [this.nodes.get(from)!, new Set(Array.from(to).map((node) => {\n        return this.nodes.get(node)!;\n      }).filter(node => !!node))];\n    }));\n\n    return {\n      nodes,\n      edges,\n    };\n  }\n}\n\nexport function getComment(node: t.Node) {\n  let comment = '';\n\n  node.leadingComments?.forEach((_comment) => {\n    if (_comment.loc!.end.line > node.loc!.start.line) {\n      return;\n    }\n    if (_comment.value.trim().startsWith('*')) {\n      comment += `${_comment.value.trim().replace(/^[\\s]*\\*+[\\s]*\\**/gm, '').trim()}\\n`;\n    }\n  });\n\n  node.trailingComments?.forEach((_comment) => {\n    if (_comment.loc!.end.line > node.loc!.start.line) {\n      return;\n    }\n    if (_comment.value.trim().startsWith('*')) {\n      comment += `${_comment.value.trim().replace(/^[\\s]*\\*+[\\s]*\\**/gm, '').trim()}\\n`;\n    }\n    else {\n      comment += `${_comment.value.trim()}\\n`;\n    }\n  });\n\n  return comment.trim();\n}\n","import { babelParse } from '@vue/compiler-sfc';\nimport type { NodePath } from '@babel/traverse';\nimport _traverse from '@babel/traverse';\nimport type * as t from '@babel/types';\nimport { processSetup } from './setupScript';\nimport { NodeCollection, getComment } from './utils';\n\nconst traverse: typeof _traverse\n  // @ts-expect-error unwarp default\n  = _traverse.default?.default || _traverse.default || _traverse;\n\nconst vueLifeCycleHooks = [\n  'beforeCreate',\n  'created',\n  'beforeMount',\n  'mounted',\n  'beforeUpdate',\n  'updated',\n  'beforeDestroy',\n  'destroyed',\n  'activated',\n  'deactivated',\n  'errorCaptured',\n  'renderTracked',\n  'renderTriggered',\n];\n\nexport function analyze(\n  content: string,\n  lineOffset = 0,\n  jsx = false,\n) {\n  // console.log({lineOffset});\n  // console.log(content);\n  const ast = babelParse(content, { sourceType: 'module', plugins: [\n    'typescript',\n    ...jsx\n      ? ['jsx' as const]\n      : [],\n  ] });\n\n  // ---\n\n  let nodeCollection = new NodeCollection(lineOffset);\n\n  const tNodes = new Map<string, t.Identifier>();\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n  };\n\n  /** used in render block or setup return */\n  const nodesUsedInTemplate = new Set<string>();\n\n  function process(node: t.ObjectExpression, path: NodePath<t.ExportDefaultDeclaration>) {\n    traverse(node, {\n      ObjectProperty(path1) {\n        if (\n          (\n            path.node.declaration.type === 'ObjectExpression'\n            && path1.parent === path.node.declaration\n          ) || (\n            path.node.declaration.type === 'CallExpression'\n            && path1.parent === path.node.declaration.arguments[0]\n          )\n        ) {\n          // data\n          if (\n            path1.node.key.type === 'Identifier'\n            && path1.node.key.name === 'data'\n            && (\n              path1.node.value.type === 'ArrowFunctionExpression'\n              || path1.node.value.type === 'FunctionExpression'\n            )\n          ) {\n            const dataNode = path1.node.value;\n\n            traverse(dataNode, {\n              ReturnStatement(path2) {\n                if (path2.parent === dataNode.body) {\n                  if (path2.node.argument?.type === 'ObjectExpression') {\n                    path2.node.argument.properties.forEach((prop) => {\n                      if (prop.type === 'ObjectProperty') {\n                        if (prop.key.type === 'Identifier') {\n                          const name = prop.key.name;\n                          graph.nodes.add(name);\n                          tNodes.set(name, prop.key);\n                          nodeCollection.addNode(name, prop, {\n                            comment: getComment(prop),\n                          });\n                          if (!graph.edges.get(name)) {\n                            graph.edges.set(name, new Set());\n                          }\n                        }\n                      }\n                    });\n                  }\n                }\n              },\n            }, path1.scope, path1);\n          }\n\n          // computed\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'computed') {\n            const computedNode = path1.node;\n            if (computedNode.value.type === 'ObjectExpression') {\n              computedNode.value.properties.forEach((prop) => {\n                if (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') {\n                  if (prop.key.type === 'Identifier') {\n                    const name = prop.key.name;\n                    graph.nodes.add(name);\n                    tNodes.set(name, prop.key);\n                    nodeCollection.addNode(name, prop, {\n                      isComputed: true,\n                      comment: getComment(prop),\n                    });\n                    if (!graph.edges.get(name)) {\n                      graph.edges.set(name, new Set());\n                    }\n                  }\n                }\n              });\n            }\n          }\n\n          // methods\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'methods') {\n            const methodsNode = path1.node;\n            if (methodsNode.value.type === 'ObjectExpression') {\n              methodsNode.value.properties.forEach((prop) => {\n                if (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') {\n                  if (prop.key.type === 'Identifier') {\n                    const name = prop.key.name;\n                    graph.nodes.add(name);\n                    tNodes.set(name, prop.key);\n                    nodeCollection.addNode(name, prop, {\n                      isMethod: true,\n                      comment: getComment(prop),\n                    });\n                    if (!graph.edges.get(name)) {\n                      graph.edges.set(name, new Set());\n                    }\n                  }\n                }\n              });\n            }\n          }\n\n          if (\n            path1.node.key.type === 'Identifier'\n            && path1.node.key.name === 'render'\n            && (\n              path1.node.value.type === 'ArrowFunctionExpression'\n              || path1.node.value.type === 'FunctionExpression'\n            )\n          ) {\n            traverse(path1.node.value, {\n              ReturnStatement(path2) {\n                const templateNode = path2.node;\n                traverse(templateNode, {\n                  MemberExpression(path3) {\n                    if (path3.node.object && path3.node.object.type === 'ThisExpression') {\n                      if (path3.node.property && path3.node.property.type === 'Identifier') {\n                        nodesUsedInTemplate.add(path3.node.property.name);\n                      }\n                    }\n                  },\n                }, path2.scope, path2);\n              },\n            }, path1.scope, path1);\n          }\n        }\n      },\n      ObjectMethod(path1) {\n        if (\n          (\n            path.node.declaration.type === 'ObjectExpression'\n            && path1.parent === path.node.declaration\n          ) || (\n            path.node.declaration.type === 'CallExpression'\n            && path1.parent === path.node.declaration.arguments[0]\n          )\n        ) {\n          // setup\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'setup') {\n            const setupNode = path1.node;\n\n            const spread: string[] = [];\n\n            traverse(setupNode, {\n              ReturnStatement(path2) {\n                if (path2.node.argument?.type === 'ObjectExpression') {\n                  const returnNode = path2.node.argument;\n                  traverse(returnNode, {\n                    SpreadElement(path3) {\n                      // ...toRefs(xxx)\n                      if (\n                        path3.node.argument.type === 'CallExpression'\n                        && path3.node.argument.callee.type === 'Identifier'\n                        && path3.node.argument.callee.name === 'toRefs'\n                        && path3.node.argument.arguments[0].type === 'Identifier'\n                      ) {\n                        spread.push(path3.node.argument.arguments[0].name);\n                      }\n                      // ...xxx\n                      else if (\n                        path3.node.argument.type === 'Identifier'\n                      ) {\n                        spread.push(path3.node.argument.name);\n                      }\n                    },\n                  }, path2.scope, path2);\n                }\n                if (\n                  path2.node.argument?.type === 'FunctionExpression'\n                  || path2.node.argument?.type === 'ArrowFunctionExpression'\n                ) {\n                  const templateNode = path2.node.argument.body;\n                  traverse(templateNode, {\n                    Identifier(path3) {\n                      const binding = path3.scope.getBinding(path3.node.name);\n                      if (binding?.scope === path1.scope) {\n                        nodesUsedInTemplate.add(path3.node.name);\n                      }\n                    },\n                    JSXIdentifier(path3) {\n                      const binding = path3.scope.getBinding(path3.node.name);\n                      if (binding?.scope === path1.scope) {\n                        nodesUsedInTemplate.add(path3.node.name);\n                      }\n                    },\n                  }, path2.scope, path2);\n                }\n              },\n            }, path1.scope, path1);\n\n            const {\n              graph: {\n                nodes: tempNodes,\n                edges: tempEdges,\n                spread: tempSpread,\n              },\n              nodeCollection: tempNodeCollection,\n            } = processSetup(setupNode, path1.scope, setupNode, spread, lineOffset);\n\n            // 3 filter data by return\n            traverse(setupNode, {\n              ReturnStatement(path2) {\n                // only process return in setupNode scope\n                if (path2.scope !== path1.scope) {\n                  return;\n                }\n\n                if (path2.node.argument?.type === 'ObjectExpression') {\n                  const returnNode = path2.node.argument;\n                  traverse(returnNode, {\n                    ObjectProperty(path3) {\n                      if (path3.parent === returnNode) {\n                        if (\n                          path3.node.key.type === 'Identifier'\n                          && path3.node.value.type === 'Identifier'\n                          && tempNodes.has(path3.node.value.name)\n                        ) {\n                          const valName = path3.node.value.name;\n                          if (!graph.nodes.has(valName)) {\n                            graph.nodes.add(valName);\n                            tNodes.set(valName, path3.node.value);\n                            nodeCollection.addTypedNode(\n                              valName,\n                              tempNodeCollection.nodes.get(valName)!,\n                            );\n                          }\n                          if (!graph.edges.has(valName)) {\n                            graph.edges.set(valName, new Set([...Array.from(\n                              tempEdges.get(valName) || new Set<string>(),\n                            )]));\n                          }\n\n                          const name = path3.node.key.name;\n                          if (name !== valName) {\n                            graph.nodes.add(name);\n                            tNodes.set(name, path3.node.key);\n                            nodeCollection.addNode(name, path3.node.key, {\n                              comment: getComment(path3.node),\n                            });\n                            graph.edges.set(name, new Set([valName]));\n                          }\n                        }\n                      }\n                    },\n                    SpreadElement(path3) {\n                      // ...toRefs(xxx)\n                      if (\n                        path3.node.argument.type === 'CallExpression'\n                        && path3.node.argument.callee.type === 'Identifier'\n                        && path3.node.argument.callee.name === 'toRefs'\n                        && path3.node.argument.arguments[0].type === 'Identifier'\n                        && tempSpread.get(path3.node.argument.arguments[0].name)\n                      ) {\n                        tempSpread.get(path3.node.argument.arguments[0].name)?.forEach((name) => {\n                          graph.nodes.add(name);\n                          // @ts-expect-error Identifier\n                          tNodes.set(name, path3.node.argument.arguments[0]);\n                          nodeCollection.addTypedNode(name, tempNodeCollection.nodes.get(name)!);\n                          if (!graph.edges.get(name)) {\n                            graph.edges.set(name, new Set());\n                            tempEdges.get(name)?.forEach((edge) => {\n                              graph.edges.get(name)?.add(edge);\n                            });\n                          }\n                        });\n                      }\n                      // ...xxx\n                      else if (\n                        path3.node.argument.type === 'Identifier'\n                        && tempSpread.get(path3.node.argument.name)\n                      ) {\n                        tempSpread.get(path3.node.argument.name)?.forEach((name) => {\n                          graph.nodes.add(name);\n                          // @ts-expect-error Identifier\n                          tNodes.set(name, path3.node.argument);\n                          nodeCollection.addTypedNode(name, tempNodeCollection.nodes.get(name)!);\n                          if (!graph.edges.get(name)) {\n                            graph.edges.set(name, new Set());\n                            tempEdges.get(name)?.forEach((edge) => {\n                              graph.edges.get(name)?.add(edge);\n                            });\n                          }\n                        });\n                      }\n                    },\n                  }, path2.scope, path2);\n                }\n                else {\n                  graph.edges = tempEdges;\n                  graph.nodes = tempNodes;\n                  nodeCollection = tempNodeCollection;\n                }\n              },\n            }, path1.scope, path1);\n          }\n\n          // data\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'data') {\n            const dataNode = path1.node;\n\n            traverse(dataNode, {\n              ReturnStatement(path2) {\n                if (path2.parent === dataNode.body) {\n                  if (path2.node.argument?.type === 'ObjectExpression') {\n                    path2.node.argument.properties.forEach((prop) => {\n                      if (prop.type === 'ObjectProperty') {\n                        if (prop.key.type === 'Identifier') {\n                          const name = prop.key.name;\n                          graph.nodes.add(name);\n                          tNodes.set(name, prop.key);\n                          nodeCollection.addNode(name, prop, {\n                            comment: getComment(prop),\n                          });\n                          if (!graph.edges.get(name)) {\n                            graph.edges.set(name, new Set());\n                          }\n                        }\n                      }\n                    });\n                  }\n                }\n              },\n            }, path1.scope, path1);\n          }\n\n          // render\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'render') {\n            traverse(path1.node, {\n              ReturnStatement(path2) {\n                const templateNode = path2.node;\n                traverse(templateNode, {\n                  MemberExpression(path3) {\n                    if (path3.node.object && path3.node.object.type === 'ThisExpression') {\n                      if (path3.node.property && path3.node.property.type === 'Identifier') {\n                        nodesUsedInTemplate.add(path3.node.property.name);\n                      }\n                    }\n                  },\n                }, path2.scope, path2);\n              },\n            }, path1.scope, path1);\n          }\n        }\n      },\n    }, path.scope, path);\n\n    traverse(node, {\n      ObjectMethod(path1) {\n        if (\n          (\n            path.node.declaration.type === 'ObjectExpression'\n            && path1.parent === path.node.declaration\n          ) || (\n            path.node.declaration.type === 'CallExpression'\n            && path1.parent === path.node.declaration.arguments[0]\n          )\n        ) {\n          if (path1.node.key.type === 'Identifier' && vueLifeCycleHooks.includes(path1.node.key.name)) {\n            const hookName = path1.node.key.name;\n\n            traverse(path1.node.body, {\n              MemberExpression(path2) {\n                if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                  const _node = nodeCollection.getNode(path2.node.property.name);\n                  if (_node?.info?.used) {\n                    _node?.info?.used?.add(hookName);\n                  }\n                  else if (_node) {\n                    _node.info = {\n                      ..._node?.info,\n                      used: new Set([hookName]),\n                    };\n                  }\n                }\n              },\n            }, path1.scope, path1);\n          }\n        }\n      },\n      ObjectProperty(path1) {\n        if (\n          (\n            path.node.declaration.type === 'ObjectExpression'\n            && path1.parent === path.node.declaration\n          ) || (\n            path.node.declaration.type === 'CallExpression'\n            && path1.parent === path.node.declaration.arguments[0]\n          )\n        ) {\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'computed') {\n            const computedNode = path1.node;\n            if (computedNode.value.type === 'ObjectExpression') {\n              computedNode.value.properties.forEach((prop) => {\n                if (prop.type === 'ObjectMethod' && prop.key.type === 'Identifier') {\n                  const name = prop.key.name;\n                  traverse(prop, {\n                    MemberExpression(path2) {\n                      if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                        graph.edges.get(name)?.add(path2.node.property.name);\n                      }\n                    },\n                  }, path1.scope, path1);\n                }\n\n                if (\n                  prop.type === 'ObjectProperty'\n                  && prop.key.type === 'Identifier'\n                  && prop.value.type === 'ObjectExpression'\n                ) {\n                  const name = prop.key.name;\n                  prop.value.properties.forEach((prop1) => {\n                    if (\n                      prop1.type === 'ObjectProperty'\n                      && prop1.key.type === 'Identifier'\n                      && prop1.key.name === 'get'\n                    ) {\n                      traverse(prop1, {\n                        MemberExpression(path2) {\n                          if (\n                            path2.node.object.type === 'ThisExpression'\n                            && path2.node.property.type === 'Identifier'\n                          ) {\n                            graph.edges.get(name)?.add(path2.node.property.name);\n                          }\n                        },\n                      }, path1.scope, path1);\n                    }\n                  });\n                }\n              });\n            }\n          }\n\n          if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'methods') {\n            const methodsNode = path1.node;\n            if (methodsNode.value.type === 'ObjectExpression') {\n              methodsNode.value.properties.forEach((prop) => {\n                if (\n                  (prop.type === 'ObjectMethod'\n                  || prop.type === 'ObjectProperty')\n                  && prop.key.type === 'Identifier'\n                ) {\n                  const name = prop.key.name;\n                  traverse(prop, {\n                    MemberExpression(path2) {\n                      if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                        graph.edges.get(name)?.add(path2.node.property.name);\n                      }\n                    },\n                  }, path1.scope, path1);\n                }\n              });\n            }\n          }\n\n          if (path1.node.key.type === 'Identifier' && ['watch', ...vueLifeCycleHooks].includes(path1.node.key.name)) {\n            const hookName = path1.node.key.name;\n\n            if (hookName === 'watch' && path1.node.value.type === 'ObjectExpression') {\n              path1.node.value.properties.forEach((prop) => {\n                if ((prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') && (\n                  prop.key.type === 'Identifier' || prop.key.type === 'StringLiteral'\n                )) {\n                  const keyName = prop.key.type === 'Identifier'\n                    ? prop.key.name\n                    : prop.key.type === 'StringLiteral'\n                      ? prop.key.value.split('.')[0]\n                      : '';\n                  const watchArg = tNodes.get(keyName);\n\n                  const _node = nodeCollection.getNode(keyName);\n                  if (_node?.info?.used) {\n                    _node?.info?.used?.add(hookName);\n                  }\n                  else if (_node) {\n                    _node.info = {\n                      ..._node?.info,\n                      used: new Set([hookName]),\n                    };\n                  }\n\n                  traverse(path1.node.value, {\n                    MemberExpression(path2) {\n                      if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                        if (watchArg && watchArg.name !== path2.node.property.name) {\n                          graph.edges.get(watchArg.name)?.add(path2.node.property.name);\n                        }\n                      }\n                    },\n                  }, path1.scope, path1);\n                }\n              });\n            }\n            else {\n              traverse(path1.node.value, {\n                MemberExpression(path2) {\n                  if (path2.node.object.type === 'ThisExpression' && path2.node.property.type === 'Identifier') {\n                    const _node = nodeCollection.getNode(path2.node.property.name);\n                    if (_node?.info?.used) {\n                      _node?.info?.used?.add(hookName);\n                    }\n                    else if (_node) {\n                      _node.info = {\n                        ..._node?.info,\n                        used: new Set([hookName]),\n                      };\n                    }\n                  }\n                },\n              }, path1.scope, path1);\n            }\n          }\n        }\n      },\n    }, path.scope, path);\n  }\n\n  traverse(ast, {\n    ExportDefaultDeclaration(path) {\n      // export default {}\n      if (path.node.declaration.type === 'ObjectExpression') {\n        process(path.node.declaration, path);\n      }\n      // export default defineComponent({})\n      else if (path.node.declaration.type === 'CallExpression'\n        && path.node.declaration.callee.type === 'Identifier'\n        && path.node.declaration.callee.name === 'defineComponent'\n        && path.node.declaration.arguments[0].type === 'ObjectExpression'\n      ) {\n        process(path.node.declaration.arguments[0], path);\n      }\n    },\n  });\n\n  return {\n    graph: nodeCollection.map(graph),\n    nodesUsedInTemplate,\n  };\n}\n","import type { NodePath, Scope } from '@babel/traverse';\nimport _traverse from '@babel/traverse';\nimport type * as t from '@babel/types';\nimport { babelParse } from '@vue/compiler-sfc';\nimport type {\n  IAddEdge,\n  IAddNode,\n  IReturnData,\n  IUsedNode,\n} from '../utils/traverse';\nimport {\n  addGraphBySpreadIdentifier,\n  addIdentifiesToGraphByScanReturn,\n  addSpreadToGraphByScanReturn,\n  collectionSpread,\n  parseEdgeFunctionPattern,\n  parseEdgeLeftArrayPattern,\n  parseEdgeLeftIdentifierPattern,\n  parseEdgeLeftObjectPattern,\n  parseNodeArrayPattern,\n  parseNodeFunctionPattern,\n  parseNodeIdentifierPattern,\n  parseNodeObjectPattern,\n  parseReturnJsxPattern,\n  traverse,\n  traverseSetup,\n} from '../utils/traverse';\nimport { NodeCollection, getComment } from './utils';\n\ninterface IProcessMain {\n  node: t.Node\n  type: 'vue' | 'react'\n  lineOffset?: number\n  addInfo?: boolean\n}\n\ninterface IProcessBranch {\n  node: t.ObjectExpression\n  lineOffset?: number\n  addInfo?: boolean\n  parentScope?: Scope\n  parentNode?: t.ExportDefaultDeclaration\n  parentPath: NodePath<t.ExportDefaultDeclaration>\n  spread?: string[]\n}\n\ntype IProcessReact = {\n  node: t.BlockStatement\n  lineOffset?: number\n  addInfo?: boolean\n  parentScope: Scope\n  parentNode: t.FunctionDeclaration\n  parentPath: NodePath<t.FunctionDeclaration>\n} | {\n  node: t.BlockStatement\n  lineOffset?: number\n  addInfo?: boolean\n  parentScope: Scope\n  parentNode: t.ClassMethod\n  parentPath: NodePath<t.ClassMethod>\n};\n\n// deal when setup return object\nfunction processByReturnNotJSX(params: IProcessBranch) {\n  const { node, parentPath, lineOffset, addInfo } = params;\n  const spread: string[] = [];\n\n  const nodeCollection = new NodeCollection(lineOffset, addInfo);\n\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n  };\n\n  // 解析return, 收集spread\n  const setupPath = traverseSetup({ node, parentScope: parentPath.scope, parentPath });\n\n  // setup return\n  collectionSpread({ path: setupPath, spread });\n\n  // 收集除return之外的所有节点和边\n  const {\n    graph: {\n      nodes: tempNodes,\n      edges: tempEdges,\n      spread: tempSpread,\n    },\n    nodeCollection: tempNodeCollection,\n    nodesUsedInTemplate,\n  } = processByReturnJSX({ node, parentPath, spread, lineOffset, addInfo });\n\n  // 根据return信息添加必要节点\n  addIdentifiesToGraphByScanReturn({\n    path: setupPath,\n    graph,\n    nodeCollection,\n    tempNodeCollection,\n    tempEdges,\n  });\n\n  // 根据return信息添加必要节点\n  addSpreadToGraphByScanReturn({\n    path: setupPath,\n    graph,\n    nodeCollection,\n    tempNodeCollection,\n    tempEdges,\n    tempSpread,\n  });\n\n  return {\n    graph,\n    nodeCollection,\n    nodesUsedInTemplate,\n  };\n}\n\n// deal when setup return jsx\nfunction processByReturnJSX(params: IProcessBranch) {\n  const { node, parentPath, spread = [], lineOffset, addInfo } = params;\n\n  const nodeCollection = new NodeCollection(lineOffset, addInfo);\n  const nodesUsedInTemplate = new Set<string>();\n\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n    spread: new Map<string, Set<string>>(),\n  };\n\n  function addNode({ name, node, path, scope }: IAddNode, commentParentNode?: t.Node) {\n    const binding = path.scope.getBinding(name);\n    if (scope === binding?.scope) {\n      graph.nodes.add(name);\n      nodeCollection.addNode(name, node, {\n        comment: commentParentNode\n          ? getComment(commentParentNode)\n          : '',\n      });\n      if (!graph.edges.get(name)) {\n        graph.edges.set(name, new Set());\n      }\n    }\n  }\n\n  function addEdge({ fromName, toName, path, scope, toScope, collectionNodes }: IAddEdge) {\n    const bindingScope = toScope || path.scope.getBinding(toName)?.scope;\n    if (scope === bindingScope && collectionNodes.has(toName)) {\n      graph.edges.get(fromName)?.add(toName);\n    }\n  }\n\n  function addUsed({ name, path, parentPath }: IUsedNode) {\n    const binding = path.scope.getBinding(name);\n    if (binding?.scope === parentPath.scope) {\n      nodesUsedInTemplate.add(name);\n    }\n  }\n\n  const setupPath = traverseSetup({ node, parentScope: parentPath.scope, parentPath });\n  const setupScope = setupPath.scope;\n  const setupNode = setupPath.node;\n\n  // 收集节点, 并收集spread依赖\n  traverse(setupNode, {\n    VariableDeclarator(path1) {\n      parseNodeIdentifierPattern({\n        path: path1,\n        rootScope: setupScope,\n        cb: (params) => {\n          if (!spread.includes(params.name)) {\n            addNode(params, path1.node);\n          }\n          else {\n            addGraphBySpreadIdentifier({\n              path: path1,\n              graph,\n              nodeCollection,\n              iname: params.name,\n            });\n          }\n        },\n      });\n\n      parseNodeObjectPattern({\n        path: path1,\n        rootScope: setupScope,\n        cb: addNode,\n      });\n\n      parseNodeArrayPattern({\n        path: path1,\n        rootScope: setupScope,\n        cb: addNode,\n      });\n    },\n    FunctionDeclaration(path1) {\n      parseNodeFunctionPattern({\n        path: path1,\n        rootScope: setupScope,\n        cb: addNode,\n      });\n    },\n  }, setupScope, setupPath);\n\n  // 搜集jsx模版使用节点\n  setupPath.traverse({\n    ReturnStatement(path2) {\n      // setup return jsx\n      parseReturnJsxPattern({\n        path: path2,\n        parentPath: setupPath,\n        cb: addUsed,\n      });\n    },\n  });\n\n  // 收集边\n  traverse(setupNode, {\n    VariableDeclarator(path1) {\n      parseEdgeLeftIdentifierPattern({\n        path: path1,\n        rootScope: setupScope,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n        spread,\n      });\n\n      parseEdgeLeftObjectPattern({\n        path: path1,\n        rootScope: setupScope,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n\n      parseEdgeLeftArrayPattern({\n        path: path1,\n        rootScope: setupScope,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n    },\n    FunctionDeclaration(path1) {\n      parseEdgeFunctionPattern({\n        path: path1,\n        rootScope: setupScope,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n    },\n  }, setupScope, setupPath);\n\n  return {\n    graph,\n    nodeCollection,\n    nodesUsedInTemplate,\n  };\n}\n\nfunction processByReact(params: IProcessReact) {\n  const { node, parentScope, parentPath, lineOffset, addInfo } = params;\n\n  const nodeCollection = new NodeCollection(lineOffset, addInfo);\n  const nodesUsedInTemplate = new Set<string>();\n\n  const graph = {\n    nodes: new Set<string>(),\n    edges: new Map<string, Set<string>>(),\n    spread: new Map<string, Set<string>>(),\n  };\n\n  function addNode({ name, node, path, scope }: IAddNode, commentParentNode?: t.Node) {\n    const binding = path.scope.getBinding(name);\n    if (scope === binding?.scope) {\n      graph.nodes.add(name);\n      nodeCollection.addNode(name, node, {\n        comment: commentParentNode\n          ? getComment(commentParentNode)\n          : '',\n      });\n      if (!graph.edges.get(name)) {\n        graph.edges.set(name, new Set());\n      }\n    }\n  }\n\n  function addEdge({ fromName, toName, path, scope, toScope, collectionNodes }: IAddEdge) {\n    const bindingScope = toScope || path.scope.getBinding(toName)?.scope;\n    if (scope === bindingScope && collectionNodes.has(toName)) {\n      graph.edges.get(fromName)?.add(toName);\n    }\n  }\n\n  function addUsed({ name, path, parentPath }: IUsedNode) {\n    const binding = path.scope.getBinding(name);\n    if (binding?.scope === parentPath.scope) {\n      nodesUsedInTemplate.add(name);\n    }\n  }\n\n  // 收集节点依赖\n  traverse(node, {\n    VariableDeclarator(path1) {\n      parseNodeIdentifierPattern({\n        path: path1,\n        rootScope: parentScope!,\n        cb: (params) => {\n          addNode(params, path1.node);\n        },\n      });\n\n      parseNodeObjectPattern({\n        path: path1,\n        rootScope: parentScope!,\n        cb: addNode,\n      });\n\n      parseNodeArrayPattern({\n        path: path1,\n        rootScope: parentScope!,\n        cb: addNode,\n      });\n    },\n    FunctionDeclaration(path1) {\n      parseNodeFunctionPattern({\n        path: path1,\n        rootScope: parentScope!,\n        cb: addNode,\n      });\n    },\n  }, parentScope, parentPath);\n\n  // 搜集jsx模版使用节点\n  traverse(node, {\n    ReturnStatement(path2) {\n      // setup return jsx\n      parseReturnJsxPattern({\n        path: path2,\n        parentPath,\n        cb: addUsed,\n      });\n    },\n  }, parentScope, parentPath);\n\n  // 收集边\n  traverse(node, {\n    VariableDeclarator(path1) {\n      parseEdgeLeftIdentifierPattern({\n        path: path1,\n        rootScope: parentScope!,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n\n      parseEdgeLeftObjectPattern({\n        path: path1,\n        rootScope: parentScope!,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n\n      parseEdgeLeftArrayPattern({\n        path: path1,\n        rootScope: parentScope!,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n    },\n    FunctionDeclaration(path1) {\n      parseEdgeFunctionPattern({\n        path: path1,\n        rootScope: parentScope!,\n        collectionNodes: graph.nodes,\n        cb: addEdge,\n      });\n    },\n  }, parentScope, parentPath);\n\n  return {\n    graph,\n    nodeCollection,\n    nodesUsedInTemplate,\n  };\n}\n\nexport function processTsx(params: IProcessMain) {\n  let result: IReturnData | undefined;\n\n  function process(params: IProcessBranch) {\n    const { node, parentPath } = params;\n    // resolve `return` then determine use processByReturnJSX or processByReturnNotJSX\n    const setupPath = traverseSetup({ node, parentScope: parentPath.scope, parentPath });\n\n    setupPath.traverse({\n      ReturnStatement(path) {\n        if (path.node.argument\n          && (path.node.argument.type === 'ArrowFunctionExpression'\n          || path.node.argument.type === 'FunctionExpression')\n          && (path.node.argument.body.type === 'JSXElement'\n          || path.node.argument.body.type === 'JSXFragment')\n        ) {\n          result = processByReturnJSX(params);\n        }\n        else {\n          result = processByReturnNotJSX(params);\n        }\n      },\n    });\n  }\n\n  traverse(params.node, {\n    ExportDefaultDeclaration(path) {\n      if (params.type === 'vue') {\n        if (path.node.declaration.type === 'ObjectExpression') {\n          // export default {}\n          process({\n            ...params,\n            node: path.node.declaration,\n            parentNode: path.node,\n            parentPath: path,\n          });\n        }\n        else if (\n          path.node.declaration.type === 'CallExpression'\n          && path.node.declaration.callee.type === 'Identifier'\n          && path.node.declaration.callee.name === 'defineComponent'\n          && path.node.declaration.arguments[0].type === 'ObjectExpression'\n        ) {\n          // export default defineComponent({})\n          process({\n            ...params,\n            node: path.node.declaration.arguments[0],\n            parentNode: path.node,\n            parentPath: path,\n          });\n        }\n      }\n      if (params.type === 'react') {\n        if (\n          (path.node.declaration.type === 'FunctionDeclaration'\n          || path.node.declaration.type === 'ArrowFunctionExpression')\n          && path.node.declaration.body.type === 'BlockStatement'\n        ) {\n          // export default function () {}\n\n          const functionPath = path.get('declaration') as NodePath<t.FunctionDeclaration>;\n\n          result = processByReact({\n            ...params,\n            node: path.node.declaration.body,\n            parentNode: functionPath.node,\n            parentPath: functionPath,\n            parentScope: functionPath.scope,\n          });\n        }\n        if (path.node.declaration.type === 'ClassDeclaration') {\n          // export default class Index {}\n\n          const renderFunction = path.node.declaration.body.body.find((node) => {\n            if (node.type === 'ClassMethod' && node.key.type === 'Identifier' && node.key.name === 'render') {\n              return node;\n            }\n            return undefined;\n          }) as t.ClassMethod;\n          if (!renderFunction) {\n            return;\n          }\n\n          const renderPath = path.get(`declaration.body.body.${\n            path.node.declaration.body.body.indexOf(renderFunction)\n          }`) as NodePath<t.ClassMethod>;\n\n          result = processByReact({\n            ...params,\n            node: renderFunction.body,\n            parentNode: renderFunction,\n            parentPath: renderPath,\n            parentScope: renderPath.scope,\n          });\n        }\n      }\n    },\n  });\n\n  return result!;\n}\n\nexport function analyze(\n  content: string,\n  type = 'vue' as 'vue' | 'react',\n  lineOffset = 0,\n  addInfo = true,\n) {\n  const ast = babelParse(content, { sourceType: 'module', plugins: [\n    'typescript',\n    'jsx',\n  ] });\n\n  const { graph, nodeCollection, nodesUsedInTemplate } = processTsx({\n    node: ast,\n    type,\n    lineOffset,\n    addInfo,\n  });\n\n  return {\n    graph: nodeCollection.map(graph),\n    nodesUsedInTemplate,\n  };\n}\n","import type * as t from '@babel/types';\nimport type { NodePath, Scope } from '@babel/traverse';\nimport _traverse from '@babel/traverse';\nimport type { NodeCollection } from '../analyze/utils';\nimport { getComment } from '../analyze/utils';\n\nexport const traverse: typeof _traverse\n  // @ts-expect-error unwarp default\n  = _traverse.default?.default || _traverse.default || _traverse;\n\nexport interface IReturnData {\n  graph: {\n    nodes: Set<string>\n    edges: Map<string, Set<string>>\n    spread?: Map<string, Set<string>>\n  }\n  nodeCollection: NodeCollection\n  nodesUsedInTemplate: Set<string>\n}\n\nexport interface IAddNode {\n  name: string\n  node: t.Node\n  path: NodePath<t.VariableDeclarator | t.FunctionDeclaration>\n  scope: Scope\n}\n\nexport interface IUsedNode {\n  name: string\n  path: NodePath<t.Identifier>\n  parentPath: NodePath<t.Node>\n}\n\nexport interface IAddEdge {\n  fromName: string\n  toName: string\n  path: NodePath<t.Identifier | t.MemberExpression>\n  scope: Scope\n  toScope?: Scope\n  collectionNodes: Set<string>\n}\n\nexport interface IParseVariable {\n  path: NodePath<t.VariableDeclarator>\n  rootScope: Scope\n}\n\nexport interface IParseNodeBase extends IParseVariable {\n  cb?: (params: IAddNode) => void\n}\n\nexport interface IParseEdgeBase extends IParseVariable {\n  cb?: (params: IAddEdge) => void\n  collectionNodes: Set<string>\n  spread?: string[]\n}\n\nexport interface IRescureObject {\n  node: t.ObjectPattern\n  rootScope: Scope\n  res: t.Identifier[]\n  parentScope: Scope\n  parentPath: NodePath<t.VariableDeclarator | t.ObjectProperty>\n}\n\nexport interface IRescureArray {\n  node: t.ArrayPattern\n  rootScope: Scope\n  res: t.Identifier[]\n  parentScope: Scope\n  parentPath: NodePath<t.VariableDeclarator | t.ArrayPattern>\n}\n\nexport interface IParseNodeFunction {\n  path: NodePath<t.FunctionDeclaration>\n  rootScope: Scope\n  cb?: (params: IAddNode) => void\n}\n\nexport interface IParseEdgeFunction {\n  path: NodePath<t.FunctionDeclaration>\n  rootScope: Scope\n  cb?: (params: IAddEdge) => void\n  collectionNodes: Set<string>\n}\n\nexport interface IParseReturnJSX {\n  path: NodePath<t.ReturnStatement>\n  parentPath: NodePath<t.Node>\n  cb?: (params: IUsedNode) => void\n}\n\nexport interface IParseSetup {\n  node: t.ObjectExpression\n  parentScope: Scope\n  parentPath: NodePath<t.ExportDefaultDeclaration>\n}\n\nexport interface ICollectSpread {\n  path: NodePath<t.ObjectMethod>\n  spread: string[]\n}\n\nexport interface IAddIdentifiesToGraphByScanReturn {\n  path: NodePath<t.ObjectMethod>\n  graph: IReturnData['graph']\n  nodeCollection: IReturnData['nodeCollection']\n  tempNodeCollection: IReturnData['nodeCollection']\n  tempEdges: IReturnData['graph']['edges']\n}\n\nexport interface IAddSpreadToGraphByScanReturn {\n  path: NodePath<t.ObjectMethod>\n  graph: IReturnData['graph']\n  nodeCollection: IReturnData['nodeCollection']\n  tempNodeCollection: IReturnData['nodeCollection']\n  tempEdges: IReturnData['graph']['edges']\n  tempSpread: Map<string, Set<string>>\n}\n\nexport interface IAddGraphBySpreadIdentifier {\n  path: NodePath<t.VariableDeclarator>\n  graph: IReturnData['graph'] & {\n    spread: Map<string, Set<string>>\n  }\n  nodeCollection: IReturnData['nodeCollection']\n  iname: string\n}\n\n/**\n * 递归遍历如下结构:\n * let { loc, loc: locd, loc: { start, end }, loc: { start: { line: { deep } }} } = node;\n * 解出 loc, locd, start, end, deep\n */\nexport function rescureObjectPattern({ node, rootScope, res, parentScope, parentPath }: IRescureObject) {\n  traverse(node, {\n    ObjectProperty(path1) {\n      if (path1.node.type === 'ObjectProperty'\n        && path1.node.key.type === 'Identifier' && path1.node.value.type === 'Identifier') {\n        const name = path1.node.value.name;\n        const _scope = path1.scope.getBinding(name)?.scope;\n        if (_scope && _scope === rootScope) {\n          res.push(path1.node.value);\n        }\n      }\n      else if (path1.node.type === 'ObjectProperty'\n        && path1.node.key.type === 'Identifier' && path1.node.value.type === 'ObjectPattern') {\n        rescureObjectPattern({\n          node: path1.node.value,\n          rootScope,\n          res,\n          parentScope: path1.scope,\n          parentPath: path1,\n        });\n      }\n    },\n    RestElement(path1) {\n      if (path1.node.argument.type === 'Identifier') {\n        const name = path1.node.argument.name;\n        const _scope = path1.scope.getBinding(name)?.scope;\n        if (_scope && _scope === rootScope) {\n          res.push(path1.node.argument);\n        }\n      }\n    },\n  }, parentScope, parentPath);\n}\n\n/**\n * 递归遍历如下结构:\n * let [foo, [bar, baz]] = [1, [[2], 3]];\n * 解出 foo, bar, baz\n */\nexport function rescureArrayPattern({ node, rootScope, res, parentScope, parentPath }: IRescureArray) {\n  traverse(node, {\n    Identifier(path1) {\n      if (path1.node.type === 'Identifier') {\n        const name = path1.node.name;\n        const _scope = path1.scope.getBinding(name)?.scope;\n        if (_scope && _scope === rootScope) {\n          res.push(path1.node);\n        }\n      }\n    },\n    ArrayPattern(path1) {\n      if (path1.node.type === 'ArrayPattern') {\n        rescureArrayPattern({\n          node: path1.node,\n          rootScope,\n          res,\n          parentScope: path1.scope,\n          parentPath: path1,\n        });\n      }\n    },\n  }, parentScope, parentPath);\n}\n\nexport function parseNodeIdentifierPattern({\n  path,\n  rootScope,\n  cb,\n}: IParseNodeBase) {\n  if (path.node.id.type !== 'Identifier') {\n    return;\n  }\n\n  if (path.node.init?.type === 'ArrowFunctionExpression' || path.node.init?.type === 'FunctionExpression') {\n    // const speak = () => {}\n    cb?.({\n      name: path.node.id.name,\n      node: path.node,\n      path,\n      scope: rootScope,\n    });\n  }\n  else {\n    // const open = 22\n    cb?.({\n      name: path.node.id.name,\n      node: path.node,\n      path,\n      scope: rootScope,\n    });\n  }\n}\n\nexport function parseNodeObjectPattern({ path, rootScope, cb }: IParseNodeBase) {\n  if (path.node.id.type !== 'ObjectPattern') {\n    return;\n  }\n\n  path.node.id.properties.forEach((property) => {\n    if (property.type === 'ObjectProperty'\n      && property.key.type === 'Identifier' && property.value.type === 'Identifier') {\n      // const { x } = obj\n      cb?.({\n        name: property.value.name,\n        node: property,\n        path,\n        scope: rootScope,\n      });\n    }\n    else if (property.type === 'ObjectProperty'\n      && property.key.type === 'Identifier' && property.value.type === 'AssignmentPattern') {\n      // const { x = 3 } = obj\n      cb?.({\n        name: property.key.name,\n        node: property,\n        path,\n        scope: rootScope,\n      });\n    }\n    else if (property.type === 'RestElement' && property.argument.type === 'Identifier') {\n      // const { ...rest } = obj\n      cb?.({\n        name: property.argument.name,\n        node: property,\n        path,\n        scope: rootScope,\n      });\n    }\n    else if (property.type === 'ObjectProperty'\n      && property.key.type === 'Identifier' && property.value.type === 'ObjectPattern') {\n      // let { loc, loc: locd, loc: { start, end } } = node;\n      const res: t.Identifier[] = [];\n      rescureObjectPattern({\n        node: property.value,\n        rootScope,\n        res,\n        parentScope: path.scope,\n        parentPath: path,\n      });\n      res.forEach(r => cb?.({\n        name: r.name,\n        node: r,\n        path,\n        scope: rootScope,\n      }));\n    }\n  });\n}\n\nexport function parseNodeArrayPattern({ path, rootScope, cb }: IParseNodeBase) {\n  if (path.node.id.type !== 'ArrayPattern') {\n    return;\n  }\n\n  path.node.id.elements.forEach((ele) => {\n    if (ele?.type === 'Identifier') {\n      // const [arr, brr] = array\n      cb?.({\n        name: ele.name,\n        node: ele,\n        path,\n        scope: rootScope,\n      });\n    }\n    else if (ele?.type === 'ArrayPattern') {\n      // let [foo, [bar, baz]] = array;\n      const res: t.Identifier[] = [];\n      rescureArrayPattern({\n        node: ele,\n        rootScope,\n        res,\n        parentScope: path.scope,\n        parentPath: path,\n      });\n      res.forEach(r => cb?.({\n        name: r.name,\n        node: r,\n        path,\n        scope: rootScope,\n      }));\n    }\n    else if (ele?.type === 'AssignmentPattern') {\n      if (ele.left.type === 'Identifier') {\n        // let [yy = 'b'] = array;\n        cb?.({\n          name: ele.left.name,\n          node: ele,\n          path,\n          scope: rootScope,\n        });\n      }\n    }\n    else if (ele?.type === 'RestElement') {\n      if (ele.argument.type === 'Identifier') {\n        // const [arr2, ...rest2] = array\n        cb?.({\n          name: ele.argument.name,\n          node: ele,\n          path,\n          scope: rootScope,\n        });\n      }\n    }\n  });\n}\n\nexport function parseNodeFunctionPattern({ path, rootScope, cb }: IParseNodeFunction) {\n  if (path.node.type !== 'FunctionDeclaration') {\n    return;\n  }\n  if (path.node.id?.type === 'Identifier') {\n    // function abc () {}\n    cb?.({\n      name: path.node.id.name,\n      node: path.node,\n      path,\n      scope: rootScope,\n    });\n  }\n}\n\nexport function parseEdgeLeftIdentifierPattern({ path, rootScope, cb, collectionNodes, spread }: IParseEdgeBase) {\n  if (!path.node.id || path.node.id.type !== 'Identifier') {\n    return;\n  }\n\n  if (path.node.init?.type\n    && [\n      'ArrowFunctionExpression',\n      'FunctionExpression',\n      'CallExpression',\n      'ObjectExpression',\n      'ArrayExpression',\n    ].includes(path.node.init.type)\n  ) {\n    // if (graph.nodes.has(path.node.id.name) && path.scope.getBinding(path.node.id.name)?.scope === rootScope) {\n    if (collectionNodes.has(path.node.id.name) && path.scope.getBinding(path.node.id.name)?.scope === rootScope) {\n      const name = path.node.id.name;\n      traverse(path.node.init, {\n        Identifier(path1) {\n          // graph.edges.get(name)?.add(path1.node.name);\n\n          const binding = path1.scope.getBinding(path1.node.name);\n          if (\n            binding?.scope === rootScope\n            && collectionNodes.has(path1.node.name)\n            && (\n              (path1.parent.type !== 'MemberExpression'\n              && path1.parent.type !== 'OptionalMemberExpression')\n              || path1.parent.object === path1.node\n            )\n          ) {\n            cb?.({\n              fromName: name,\n              toName: path1.node.name,\n              path: path1,\n              scope: rootScope,\n              collectionNodes,\n            });\n          }\n        },\n        MemberExpression(path1) {\n          if (spread?.length && path1.node.object.type === 'Identifier'\n            && spread.includes(path1.node.object.name)\n            && path1.node.property.type === 'Identifier') {\n            cb?.({\n              fromName: name,\n              toName: path1.node.property.name,\n              toScope: path1.scope.getBinding(path1.node.object.name)?.scope,\n              path: path1,\n              scope: rootScope,\n              collectionNodes,\n            });\n          }\n        },\n      }, path.scope, path);\n    }\n  }\n}\n\nexport function parseEdgeLeftObjectPattern({ path, rootScope, cb, collectionNodes }: IParseEdgeBase) {\n  if (!path.node.id || path.node.id.type !== 'ObjectPattern') {\n    return;\n  }\n  if (path.node.init?.type\n    && [\n      'ArrowFunctionExpression',\n      'FunctionExpression',\n      'CallExpression',\n      'ObjectExpression',\n      'ArrayExpression',\n    ].includes(path.node.init.type)\n  ) {\n    const res: t.Identifier[] = [];\n    rescureObjectPattern({\n      node: path.node.id,\n      rootScope,\n      res,\n      parentScope: path.scope,\n      parentPath: path,\n    });\n\n    // res.filter(r => (graph.nodes.has(r.name) && path.scope.getBinding(r.name)?.scope === rootScope));\n    res.filter(r => (collectionNodes.has(r.name) && path.scope.getBinding(r.name)?.scope === rootScope));\n\n    traverse(path.node.init, {\n      Identifier(path1) {\n        const binding = path1.scope.getBinding(path1.node.name);\n        if (\n          binding?.scope === rootScope\n          && collectionNodes.has(path1.node.name)\n          && (\n            (path1.parent.type !== 'MemberExpression'\n            && path1.parent.type !== 'OptionalMemberExpression')\n            || path1.parent.object === path1.node\n          )\n        ) {\n          res.forEach((r) => {\n            cb?.({\n              fromName: r.name,\n              toName: path1.node.name,\n              path: path1,\n              scope: rootScope,\n              collectionNodes,\n            });\n          });\n        }\n      },\n    }, path.scope, path);\n  }\n}\n\nexport function parseEdgeLeftArrayPattern({ path, rootScope, cb, collectionNodes }: IParseEdgeBase) {\n  if (!path.node.id || path.node.id.type !== 'ArrayPattern') {\n    return;\n  }\n  if (path.node.init?.type\n    && [\n      'ArrowFunctionExpression',\n      'FunctionExpression',\n      'CallExpression',\n      'ObjectExpression',\n      'ArrayExpression',\n    ].includes(path.node.init.type)\n  ) {\n    const res: t.Identifier[] = [];\n    rescureArrayPattern({\n      node: path.node.id,\n      rootScope,\n      res,\n      parentScope: path.scope,\n      parentPath: path,\n    });\n\n    res.filter(r => (collectionNodes.has(r.name) && path.scope.getBinding(r.name)?.scope === rootScope));\n\n    traverse(path.node.init, {\n      Identifier(path1) {\n        const binding = path1.scope.getBinding(path1.node.name);\n        if (\n          binding?.scope === rootScope\n          && collectionNodes.has(path1.node.name)\n          && (\n            (path1.parent.type !== 'MemberExpression'\n            && path1.parent.type !== 'OptionalMemberExpression')\n            || path1.parent.object === path1.node\n          )\n        ) {\n          res.forEach((r) => {\n            cb?.({\n              fromName: r.name,\n              toName: path1.node.name,\n              path: path1,\n              scope: rootScope,\n              collectionNodes,\n            });\n          });\n        }\n      },\n    }, path.scope, path);\n  }\n}\n\nexport function parseEdgeFunctionPattern({ path, rootScope, cb, collectionNodes }: IParseEdgeFunction) {\n  if (!path.node.id) {\n    return;\n  }\n  if (collectionNodes.has(path.node.id.name) && path.scope.getBinding(path.node.id.name)?.scope === rootScope) {\n    const name = path.node.id.name;\n    traverse(path.node.body, {\n      Identifier(path1) {\n        const binding = path1.scope.getBinding(path1.node.name);\n        if (binding?.scope === rootScope && collectionNodes.has(path1.node.name)) {\n          cb?.({\n            fromName: name,\n            toName: path1.node.name,\n            path: path1,\n            scope: rootScope,\n            collectionNodes,\n          });\n        }\n      },\n    }, path.scope, path);\n  }\n}\n\nexport function parseReturnJsxPattern({ path, parentPath, cb }: IParseReturnJSX) {\n  if (\n    path.node.argument\n    && (\n      // return () => (<div></div>)\n      // return function() (<div></div>)\n      (\n        (\n          path.node.argument.type === 'ArrowFunctionExpression'\n          || path.node.argument.type === 'FunctionExpression'\n        ) && (\n          path.node.argument.body.type === 'JSXElement'\n          || path.node.argument.body.type === 'JSXFragment'\n        )\n      )\n      // return (<div></div>)\n      || (\n        path.node.argument.type === 'JSXElement'\n        || path.node.argument.type === 'JSXFragment'\n      )\n    )\n  ) {\n    path.traverse({\n      Identifier(path1) {\n        // if (path1.scope.getBinding(path1.node.name)?.scope === parentPath.scope) {\n        //   nodesUsedInTemplate.add(path1.node.name);\n        // }\n        cb?.({\n          name: path1.node.name,\n          path: path1,\n          parentPath,\n        });\n      },\n    });\n  }\n}\n\nexport function traverseSetup({ node, parentScope, parentPath }: IParseSetup) {\n  let path: NodePath<t.ObjectMethod>;\n\n  traverse(node, {\n    ObjectMethod(path1) {\n      if (\n        (\n          parentPath.node.declaration.type === 'ObjectExpression'\n          && path1.parent === parentPath.node.declaration\n        ) || (\n          parentPath.node.declaration.type === 'CallExpression'\n          && path1.parent === parentPath.node.declaration.arguments[0]\n        )\n      ) {\n        if (path1.node.key.type === 'Identifier' && path1.node.key.name === 'setup') {\n          path = path1;\n        }\n      }\n    },\n  }, parentScope, parentPath);\n\n  return path!;\n}\n\nexport function collectionSpread({ path: path1, spread }: ICollectSpread) {\n  path1.traverse({\n    ReturnStatement(path2) {\n      // get setup return obj spread\n      if (path2.node.argument?.type === 'ObjectExpression') {\n        const returnNode = path2.node.argument;\n        traverse(returnNode, {\n          SpreadElement(path3) {\n            // ...toRefs(xxx)\n            if (\n              path3.node.argument.type === 'CallExpression'\n              && path3.node.argument.callee.type === 'Identifier'\n              && path3.node.argument.callee.name === 'toRefs'\n              && path3.node.argument.arguments[0].type === 'Identifier'\n            ) {\n              spread.push(path3.node.argument.arguments[0].name);\n            }\n            // ...xxx\n            else if (\n              path3.node.argument.type === 'Identifier'\n            ) {\n              spread.push(path3.node.argument.name);\n            }\n          },\n        }, path2.scope, path2);\n      }\n    },\n  });\n}\n\nexport function addIdentifiesToGraphByScanReturn(\n  { path: path1, graph, nodeCollection, tempNodeCollection, tempEdges }: IAddIdentifiesToGraphByScanReturn,\n) {\n  path1.traverse({\n    ReturnStatement(path2) {\n      // get setup return obj spread\n      if (path2.node.argument?.type === 'ObjectExpression') {\n        const returnNode = path2.node.argument;\n        traverse(returnNode, {\n          ObjectProperty(path3) {\n            // not spread node\n            if (path3.parent === returnNode) {\n              if (path3.node.key.type === 'Identifier' && path3.node.value.type === 'Identifier') {\n                const valName = path3.node.value.name;\n                if (!graph.nodes.has(valName)) {\n                  graph.nodes.add(valName);\n                  nodeCollection.addTypedNode(\n                    valName,\n                    tempNodeCollection.nodes.get(valName)!,\n                  );\n                }\n                if (!graph.edges.has(valName)) {\n                  graph.edges.set(valName, new Set([...Array.from(\n                    tempEdges.get(valName) || new Set<string>(),\n                  )]));\n                }\n\n                const name = path3.node.key.name;\n                if (name !== valName) {\n                  graph.nodes.add(name);\n                  nodeCollection.addNode(name, path3.node.key, {\n                    comment: getComment(path3.node),\n                  });\n                  graph.edges.set(name, new Set([valName]));\n                }\n              }\n            }\n          },\n        }, path2.scope, path2);\n      }\n    },\n  });\n}\n\nexport function addSpreadToGraphByScanReturn(\n  { path: path1, graph, nodeCollection, tempNodeCollection, tempEdges, tempSpread }: IAddSpreadToGraphByScanReturn,\n) {\n  path1.traverse({\n    ReturnStatement(path2) {\n      // get setup return obj spread\n      if (path2.node.argument?.type === 'ObjectExpression') {\n        const returnNode = path2.node.argument;\n        traverse(returnNode, {\n          SpreadElement(path3) {\n            // ...toRefs(xxx)\n            if (\n              path3.node.argument.type === 'CallExpression'\n              && path3.node.argument.callee.type === 'Identifier'\n              && path3.node.argument.callee.name === 'toRefs'\n              && path3.node.argument.arguments[0].type === 'Identifier'\n              && tempSpread.get(path3.node.argument.arguments[0].name)\n            ) {\n              tempSpread.get(path3.node.argument.arguments[0].name)?.forEach((name) => {\n                graph.nodes.add(name);\n                nodeCollection.addTypedNode(name, tempNodeCollection.nodes.get(name)!);\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                  tempEdges.get(name)?.forEach((edge) => {\n                    graph.edges.get(name)?.add(edge);\n                  });\n                }\n              });\n            }\n            // ...xxx\n            else if (\n              path3.node.argument.type === 'Identifier'\n              && tempSpread.get(path3.node.argument.name)\n            ) {\n              tempSpread.get(path3.node.argument.name)?.forEach((name) => {\n                graph.nodes.add(name);\n                nodeCollection.addTypedNode(name, tempNodeCollection.nodes.get(name)!);\n                if (!graph.edges.get(name)) {\n                  graph.edges.set(name, new Set());\n                  tempEdges.get(name)?.forEach((edge) => {\n                    graph.edges.get(name)?.add(edge);\n                  });\n                }\n              });\n            }\n          },\n        }, path2.scope, path2);\n      }\n    },\n  });\n}\n\nexport function addGraphBySpreadIdentifier({ path: path1, graph, nodeCollection, iname }: IAddGraphBySpreadIdentifier) {\n  if (path1.node.init?.type === 'ObjectExpression') {\n    path1.node.init?.properties.forEach((prop) => {\n      if (\n        (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod')\n        && prop.key.type === 'Identifier'\n      ) {\n        const keyName = prop.key.name;\n        graph.nodes.add(keyName);\n        nodeCollection.addNode(keyName, prop, {\n          comment: getComment(prop),\n        });\n        if (!graph.edges.get(keyName)) {\n          graph.edges.set(keyName, new Set());\n        }\n        if (graph.spread.has(iname)) {\n          graph.spread.get(iname)?.add(keyName);\n        }\n        else {\n          graph.spread.set(iname, new Set([keyName]));\n        }\n      }\n      else if (prop.type === 'SpreadElement') {\n        console.warn('not support spread in spread');\n      }\n    });\n  }\n\n  if (\n    path1.node.init?.type === 'CallExpression'\n    && path1.node.init?.callee.type === 'Identifier'\n    && path1.node.init?.callee.name === 'reactive'\n  ) {\n    const arg = path1.node.init?.arguments[0];\n    if (arg.type === 'ObjectExpression') {\n      arg.properties.forEach((prop) => {\n        if (\n          (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod')\n          && prop.key.type === 'Identifier'\n        ) {\n          const keyName = prop.key.name;\n          graph.nodes.add(keyName);\n          nodeCollection.addNode(keyName, prop, {\n            comment: getComment(prop),\n          });\n          if (!graph.edges.get(keyName)) {\n            graph.edges.set(keyName, new Set());\n          }\n          if (graph.spread.has(iname)) {\n            graph.spread.get(iname)?.add(keyName);\n          }\n          else {\n            graph.spread.set(iname, new Set([keyName]));\n          }\n        }\n        else if (prop.type === 'SpreadElement') {\n          console.warn('not support spread in spread');\n        }\n      });\n    }\n  }\n}\n","import type { TypedNode } from '../analyze/utils';\n\nfunction dfs(\n  graph: Map<TypedNode, Set<TypedNode>>,\n  node: TypedNode,\n  targets: Set<TypedNode>,\n  visited: Set<TypedNode>,\n  component: Set<TypedNode>,\n) {\n  component.add(node);\n  visited.add(node);\n  targets.forEach((target) => {\n    if (!visited.has(target)) {\n      dfs(graph, target, graph.get(target) || new Set(), visited, component);\n    }\n  });\n}\n\nfunction haveIntersection(setA: Set<TypedNode>, setB: Set<TypedNode>): boolean {\n  for (const item of setA) {\n    if (setB.has(item)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nfunction mergeSets(arr: Set<TypedNode>[]): Set<TypedNode>[] {\n  let result: Set<TypedNode>[] = [...arr];\n  for (let i = 0; i < result.length; i++) {\n    for (let j = i + 1; j < result.length; j++) {\n      if (haveIntersection(result[i], result[j])) {\n        const newSet = new Set([...result[i], ...result[j]]);\n        result.splice(j, 1);\n        result.splice(i, 1);\n        result = [...result, newSet];\n        return mergeSets(result);\n      }\n    }\n  }\n  return result;\n}\n\nexport function splitGraph(\n  graph: Map<TypedNode, Set<TypedNode>>,\n) {\n  const components = [] as Set<TypedNode>[];\n\n  const sorted = Array.from(graph).sort((a, b) => b[1].size - a[1].size);\n\n  (new Map(sorted)).forEach((targets, node) => {\n    const visited = new Set<TypedNode>();\n    if (!visited.has(node)) {\n      const component = new Set<TypedNode>();\n      dfs(graph, node, targets, visited, component);\n      components.push(component);\n    }\n  });\n\n  return mergeSets(components).map((component) => {\n    const subGraph = new Map<TypedNode, Set<TypedNode>>();\n    component.forEach((node) => {\n      const targets = graph.get(node);\n      if (targets) {\n        subGraph.set(node, targets);\n      }\n    });\n    return subGraph;\n  });\n}\n","import type { TypedNode } from '../analyze/utils';\nimport { NodeType } from '../analyze/utils';\n\n/**\n * Filter out nodes that have no indegree.\n */\nexport function noIndegreeFilter(\n  graph: Map<TypedNode, Set<TypedNode>>,\n) {\n  const nodes = Array.from(graph.keys());\n  const indegree = new Map<TypedNode, number>();\n  nodes.forEach((node) => {\n    indegree.set(node, 0);\n  });\n  graph.forEach((targets, node) => {\n    targets.forEach((target) => {\n      indegree.set(target, (indegree.get(target) || 0) + 1);\n    });\n  });\n  return nodes.filter(node => indegree.get(node) === 0);\n}\n\n/**\n * Filter out nodes that have no outdegree.\n */\nexport function noOutdegreeFilter(\n  graph: Map<TypedNode, Set<TypedNode>>,\n) {\n  const zeroOutdegreeNodes = [];\n\n  for (const [node, edges] of graph.entries()) {\n    if (edges.size === 0) {\n      zeroOutdegreeNodes.push(node);\n    }\n  }\n\n  return zeroOutdegreeNodes;\n}\n\n// ---\n\nfunction removeVariable(\n  graph: Map<TypedNode, Set<TypedNode>>,\n  targets: Set<TypedNode>,\n) {\n  const newTarget = new Set<TypedNode>();\n  targets.forEach((target) => {\n    if (target.type === NodeType.var) {\n      const nodes = graph.get(target);\n      nodes?.forEach((node) => {\n        newTarget.add(node);\n      });\n    }\n    if (target.type === NodeType.fun) {\n      newTarget.add(target);\n    }\n  });\n  return newTarget;\n}\n\n/**\n * only save function nodes\n */\nexport function onlyFunctions(\n  graph: Map<TypedNode, Set<TypedNode>>,\n): Map<TypedNode, Set<TypedNode>> {\n  const result = new Map<TypedNode, Set<TypedNode>>();\n  graph.forEach((targets, node) => {\n    if (node.type === NodeType.fun) {\n      const nodes = removeVariable(graph, targets);\n      result.set(node, nodes);\n    }\n  });\n  return result;\n}\n\n// ---\n\nexport function findLinearPaths(graph: Map<TypedNode, Set<TypedNode>>) {\n  const linearPaths = [];\n\n  const visitedNodes = new Set();\n\n  for (const [node, edges] of graph.entries()) {\n    if (edges.size === 1 && !visitedNodes.has(node) && node.type === NodeType.fun) {\n      const path = [node];\n      let nextNode = Array.from(edges)[0];\n\n      visitedNodes.add(node);\n\n      while (graph.get(nextNode)?.size === 1) {\n        if (visitedNodes.has(nextNode)) {\n          break;\n        }\n        path.push(nextNode);\n        visitedNodes.add(nextNode);\n        nextNode = Array.from(graph.get(nextNode)!)[0];\n      }\n\n      if (path.length > 1) {\n        linearPaths.push(path);\n      }\n    }\n  }\n\n  return linearPaths;\n}\n\n// ---\n\nexport function findArticulationPoints(graph: Map<TypedNode, Set<TypedNode>>) {\n  const noIndegreeNodes = noIndegreeFilter(graph);\n  let time = 0;\n  const low = new Map<TypedNode, number>();\n  const disc = new Map<TypedNode, number>();\n  const parent = new Map<TypedNode, TypedNode | null>();\n  const ap = new Set<TypedNode>();\n  const visited = new Set<TypedNode>();\n\n  function APUtil(graph: Map<TypedNode, Set<TypedNode>>, node: TypedNode) {\n    let children = 0;\n    disc.set(node, time);\n    low.set(node, time);\n    time++;\n    visited.add(node);\n\n    for (const neighbor of graph.get(node) || []) {\n      if (!visited.has(neighbor)) {\n        children++;\n        parent.set(neighbor, node);\n        APUtil(graph, neighbor);\n        low.set(node, Math.min(low.get(node)!, low.get(neighbor)!));\n        if (parent.get(node) === null && children > 1) {\n          ap.add(node);\n        }\n        if (parent.get(node) !== null && low.get(neighbor)! >= disc.get(node)!) {\n          ap.add(node);\n        }\n      }\n      else if (neighbor !== parent.get(node)) {\n        low.set(node, Math.min(low.get(node)!, disc.get(neighbor)!));\n      }\n    }\n  }\n\n  for (const node of graph.keys()) {\n    if (!visited.has(node) && !noIndegreeNodes.includes(node)) {\n      APUtil(graph, node);\n    }\n  }\n  return ap;\n}\n","import type { TypedNode } from '../analyze/utils';\n\nexport function hasCycle(graph: Map<TypedNode, Set<TypedNode>>): { hasCycle: boolean, cycleNodes: TypedNode[] } {\n  const visited: Set<TypedNode> = new Set();\n  const onStack: Set<TypedNode> = new Set();\n  const stack: TypedNode[] = [];\n\n  function dfs(node: TypedNode): boolean {\n    if (visited.has(node)) {\n      if (onStack.has(node)) {\n        // Find the start of the cycle.\n        while (stack[0] !== node) {\n          onStack.delete(stack.shift()!);\n        }\n        return true;\n      }\n      return false;\n    }\n\n    visited.add(node);\n    onStack.add(node);\n    stack.push(node);\n\n    for (const neighbor of (graph.get(node) || new Set())) {\n      if (dfs(neighbor)) {\n        return true;\n      }\n    }\n\n    onStack.delete(node);\n    stack.pop();\n    return false;\n  }\n\n  for (const [node, targets] of graph) {\n    if (dfs(node)) {\n      return { hasCycle: true, cycleNodes: [...stack] };\n    }\n  }\n\n  return { hasCycle: false, cycleNodes: [] };\n}\n","import * as t from '@babel/types';\nimport type { TypedNode } from '../analyze/utils';\nimport { NodeType } from '../analyze/utils';\nimport { splitGraph } from './split';\nimport { findArticulationPoints, findLinearPaths, noIndegreeFilter, noOutdegreeFilter, onlyFunctions } from './filter';\nimport { hasCycle } from './utils';\n\nexport enum SuggestionType {\n  info = 'info',\n  warning = 'warning',\n  error = 'error',\n}\n\nexport interface Suggestion {\n  type: SuggestionType\n  message: string\n  nodeInfo?: TypedNode | Array<TypedNode>\n};\n\nexport function gen(\n  graph: {\n    nodes: Set<TypedNode>\n    edges: Map<TypedNode, Set<TypedNode>>\n  },\n  usedNodes: Set<string>,\n) {\n  const suggestions: Suggestion[] = [];\n  const splitedGraph = splitGraph(graph.edges);\n  // console.log(splitedGraph);\n  splitedGraph.forEach((g) => {\n    const nodes = Array.from(g.keys());\n\n    if (splitedGraph.length > 1) {\n      if (nodes.length > 2 && nodes.some(node => !usedNodes.has(node.label))) {\n        suggestions.push({\n          type: SuggestionType.info,\n          message: `Nodes [${\n            nodes.length > 10\n              ? `${nodes.slice(0, 10).map(node => node.label).join(',')}...(${nodes.length})`\n              : nodes.map(node => node.label).join(',')\n          }] are isolated, perhaps you can refactor them to an isolated file.`,\n          nodeInfo: nodes,\n        });\n      }\n    }\n\n    if (nodes.length > 1 && nodes.every(node => !usedNodes.has(node.label) && !node.info?.used?.size)) {\n      suggestions.push({\n        type: SuggestionType.info,\n        message: `Nodes [${\n          nodes.length > 10\n            ? `${nodes.slice(0, 10).map(node => node.label).join(',')}...`\n            : nodes.map(node => node.label).join(',')\n        }] are not used, perhaps you can remove them.`,\n        nodeInfo: nodes,\n      });\n    }\n    const hasCycleResult = hasCycle(g);\n    if (hasCycleResult.hasCycle) {\n      suggestions.push({\n        type: SuggestionType.error,\n        message: `There is a loop call in nodes [${\n          hasCycleResult.cycleNodes.map(node => node.label).join(',')\n        }], perhaps you can refactor it.`,\n        nodeInfo: hasCycleResult.cycleNodes,\n      });\n    }\n\n    const paths = findLinearPaths(g);\n    paths.forEach((path) => {\n      suggestions.push({\n        type: SuggestionType.warning,\n        message: `Nodes [${\n          path.length > 10\n            ? `${path.slice(0, 10).map(node => node.label).join(',')}...(${path.length})`\n            : path.map(node => node.label).join(',')\n        }] are have function chain calls, perhaps you can refactor it.`,\n        nodeInfo: path,\n      });\n    });\n\n    if (g.size > 5) {\n      const ap = findArticulationPoints(g);\n      ap.forEach((node) => {\n        if (node.type === NodeType.fun) {\n          suggestions.push({\n            type: SuggestionType.info,\n\n            message: `Node [${\n              node.label\n            }] is an articulation point, perhaps you need to pay special attention to this node.`,\n            nodeInfo: node,\n          });\n        }\n      });\n    }\n  });\n\n  const noIndegreeNodes = noIndegreeFilter(graph.edges);\n  noIndegreeNodes.forEach((node) => {\n    if (!usedNodes.has(node.label) && !node.info?.used?.size) {\n      suggestions.push({\n        type: SuggestionType.info,\n        message: `Node [${node.label}] is not used, perhaps you can remove it.`,\n        nodeInfo: node,\n      });\n    }\n  });\n\n  // const noOutdegreeNodes = noOutdegreeFilter(graph.edges);\n  // noOutdegreeNodes.forEach(node => {\n  //   if(!usedNodes.has(node.label)) {\n  //     suggestions.push({\n  //       type: SuggestionType.info,\n  //       message: `Node [${node.label}] is not used, perhaps you can remove it.`,\n  //       nodeInfo: node,\n  //     });\n  //   }\n  // });\n\n  return suggestions;\n}\n","import type { Data, Edge, Node } from 'vis-network';\nimport type { TypedNode } from './analyze/utils';\n\ntype CustomNode = Node & {\n  info: TypedNode['info']\n};\n\nexport function getVisData(\n  graph: {\n    nodes: Set<TypedNode>\n    edges: Map<TypedNode, Set<TypedNode>>\n  },\n  usedNodes: Set<string>,\n) {\n  const nodes: CustomNode[] = [];\n  const edges: Edge[] = [];\n\n  graph.nodes.forEach((node) => {\n    nodes.push({\n      id: node.label,\n      label: node.label,\n      shape: node.type === 'var'\n        ? 'dot'\n        : 'diamond',\n      group: usedNodes.has(node.label) || node.info?.used?.size\n        ? 'used'\n        : 'normal',\n      title: `${\n        node.info?.used?.size\n          ? `used by ${Array.from(node.info?.used || [])?.map(i => `\\`${i}\\``).join(',')}\\n\\n`\n          : ''\n      }${\n        usedNodes.has(node.label)\n          ? 'used in template\\n\\n'\n          : ''\n      }${node.info?.comment || ''}`.trim() || undefined,\n      info: node.info,\n    });\n  });\n\n  graph.edges.forEach((edge, key) => {\n    edge.forEach((to) => {\n      if (!to) {\n        return;\n      }\n      edges.push({\n        from: key.label,\n        to: to.label,\n        arrows: {\n          to: {\n            enabled: true,\n            scaleFactor: 0.8,\n          },\n        },\n      });\n    });\n  });\n\n  return {\n    nodes,\n    edges,\n  };\n}\n"],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;AAAA,IAC5E,EACN,GACE,UAAU,IAAI,KAAK,KAAK,IACpB,yBACA,EACN,GAAG,KAAK,MAAM,WAAW,EAAE,GAAG,KAAK,KAAK;AAAA,MACxC,MAAM,KAAK;AAAA,IACb,CAAC;AAAA,EACH,CAAC;AAED,QAAM,MAAM,QAAQ,CAAC,MAAM,QAAQ;AACjC,SAAK,QAAQ,CAAC,OAAO;AACnB,UAAI,CAAC,IAAI;AACP;AAAA,MACF;AACA,YAAM,KAAK;AAAA,QACT,MAAM,IAAI;AAAA,QACV,IAAI,GAAG;AAAA,QACP,QAAQ;AAAA,UACN,IAAI;AAAA,YACF,SAAS;AAAA,YACT,aAAa;AAAA,UACf;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;","names":["analyze","import_compiler_sfc","_traverse","import_compiler_sfc","import_traverse","NodeType","traverse","_traverse","analyze","import_compiler_sfc","import_traverse","traverse","_traverse","analyze","import_compiler_sfc","import_traverse","traverse","_traverse","node","parentPath","traverse","params","analyze","graph","dfs","SuggestionType"]}
         |