{
  "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
  "pkg": {
    "name": "dashboard",
    "version": "1.0.0",
    "private": true,
    "scripts": {
      "dev": "umi dev",
      "build": "umi build",
      "postinstall": "umi setup",
      "setup": "umi setup",
      "start": "npm run dev"
    },
    "dependencies": {
      "@ant-design/icons": "^5.2.6",
      "@antv/g6": "^5.0.51",
      "@antv/l7": "^2.25.2",
      "@antv/l7-react": "^2.4.3",
      "antd": "^5.12.2",
      "axios": "^1.6.2",
      "react": "^18.2.0",
      "react-dom": "^18.2.0",
      "recharts": "^3.8.0",
      "umi": "^4.0.0"
    },
    "devDependencies": {
      "@types/react": "^18.2.0",
      "@types/react-dom": "^18.2.0",
      "typescript": "^5.0.0"
    }
  },
  "pkgPath": "D:\\trae_projects\\makemd\\makemd\\dashboard\\package.json",
  "plugins": {
    "./node_modules/@umijs/core/dist/service/servicePlugin": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "preset",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/core/dist/service/servicePlugin.js",
      "id": "./node_modules/@umijs/core/dist/service/servicePlugin",
      "key": "servicePlugin",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "@umijs/preset-umi": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "preset",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/index.js",
      "id": "@umijs/preset-umi",
      "key": "umi",
      "config": {},
      "time": {
        "hooks": {},
        "register": 32
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/registerMethods": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/registerMethods.js",
      "id": "./node_modules/@umijs/preset-umi/dist/registerMethods",
      "key": "registerMethods",
      "config": {},
      "time": {
        "hooks": {
          "onStart": [
            0
          ]
        },
        "register": 5
      },
      "enableBy": "register"
    },
    "@umijs/did-you-know": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/did-you-know/dist/plugin.js",
      "id": "@umijs/did-you-know",
      "key": "umijsDidYouKnow",
      "config": {},
      "time": {
        "hooks": {
          "onStart": [
            7
          ]
        },
        "register": 5
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/404/404": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/404/404.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/404/404",
      "key": "404",
      "config": {},
      "time": {
        "hooks": {
          "modifyRoutes": [
            0
          ]
        },
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/aiDev/aiDev": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/aiDev/aiDev.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/aiDev/aiDev",
      "key": "aiDev",
      "config": {},
      "time": {
        "hooks": {},
        "register": 4
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/appData/appData": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/appData/appData.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/appData/appData",
      "key": "appData",
      "config": {},
      "time": {
        "hooks": {
          "modifyAppData": [
            353
          ]
        },
        "register": 54
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/appData/umiInfo": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/appData/umiInfo.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/appData/umiInfo",
      "key": "umiInfo",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/check/check": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/check/check.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/check/check",
      "key": "check",
      "config": {},
      "time": {
        "hooks": {
          "onCheckConfig": [
            0
          ],
          "onCheck": [
            1
          ]
        },
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/check/babel722": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/check/babel722.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/check/babel722",
      "key": "babel722",
      "config": {},
      "time": {
        "hooks": {
          "onCheck": [
            0
          ]
        },
        "register": 3
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/codeSplitting/codeSplitting": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/codeSplitting/codeSplitting.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/codeSplitting/codeSplitting",
      "key": "codeSplitting",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/configPlugins/configPlugins": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/configPlugins/configPlugins.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/configPlugins/configPlugins",
      "key": "configPlugins",
      "config": {},
      "time": {
        "hooks": {
          "modifyConfig": [
            0
          ]
        },
        "register": 30
      },
      "enableBy": "register"
    },
    "virtual: config-title": {
      "id": "virtual: config-title",
      "key": "title",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-styles": {
      "id": "virtual: config-styles",
      "key": "styles",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-scripts": {
      "id": "virtual: config-scripts",
      "key": "scripts",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-routes": {
      "id": "virtual: config-routes",
      "key": "routes",
      "config": {
        "onChange": "regenerateTmpFiles"
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-routeLoader": {
      "id": "virtual: config-routeLoader",
      "key": "routeLoader",
      "config": {
        "default": {
          "moduleType": "esm"
        }
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-reactRouter5Compat": {
      "id": "virtual: config-reactRouter5Compat",
      "key": "reactRouter5Compat",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-presets": {
      "id": "virtual: config-presets",
      "key": "presets",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-plugins": {
      "id": "virtual: config-plugins",
      "key": "plugins",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-npmClient": {
      "id": "virtual: config-npmClient",
      "key": "npmClient",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-mountElementId": {
      "id": "virtual: config-mountElementId",
      "key": "mountElementId",
      "config": {
        "default": "root"
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-metas": {
      "id": "virtual: config-metas",
      "key": "metas",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-links": {
      "id": "virtual: config-links",
      "key": "links",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-historyWithQuery": {
      "id": "virtual: config-historyWithQuery",
      "key": "historyWithQuery",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-history": {
      "id": "virtual: config-history",
      "key": "history",
      "config": {
        "default": {
          "type": "browser"
        }
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-headScripts": {
      "id": "virtual: config-headScripts",
      "key": "headScripts",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-esbuildMinifyIIFE": {
      "id": "virtual: config-esbuildMinifyIIFE",
      "key": "esbuildMinifyIIFE",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-conventionRoutes": {
      "id": "virtual: config-conventionRoutes",
      "key": "conventionRoutes",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-conventionLayout": {
      "id": "virtual: config-conventionLayout",
      "key": "conventionLayout",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-base": {
      "id": "virtual: config-base",
      "key": "base",
      "config": {
        "default": "/"
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-analyze": {
      "id": "virtual: config-analyze",
      "key": "analyze",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-writeToDisk": {
      "id": "virtual: config-writeToDisk",
      "key": "writeToDisk",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-transformRuntime": {
      "id": "virtual: config-transformRuntime",
      "key": "transformRuntime",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-theme": {
      "id": "virtual: config-theme",
      "key": "theme",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-targets": {
      "id": "virtual: config-targets",
      "key": "targets",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-svgr": {
      "id": "virtual: config-svgr",
      "key": "svgr",
      "config": {
        "default": {}
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-svgo": {
      "id": "virtual: config-svgo",
      "key": "svgo",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-stylusLoader": {
      "id": "virtual: config-stylusLoader",
      "key": "stylusLoader",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-styleLoader": {
      "id": "virtual: config-styleLoader",
      "key": "styleLoader",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-srcTranspilerOptions": {
      "id": "virtual: config-srcTranspilerOptions",
      "key": "srcTranspilerOptions",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-srcTranspiler": {
      "id": "virtual: config-srcTranspiler",
      "key": "srcTranspiler",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-sassLoader": {
      "id": "virtual: config-sassLoader",
      "key": "sassLoader",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-runtimePublicPath": {
      "id": "virtual: config-runtimePublicPath",
      "key": "runtimePublicPath",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-purgeCSS": {
      "id": "virtual: config-purgeCSS",
      "key": "purgeCSS",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-publicPath": {
      "id": "virtual: config-publicPath",
      "key": "publicPath",
      "config": {
        "default": "/"
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-proxy": {
      "id": "virtual: config-proxy",
      "key": "proxy",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-postcssLoader": {
      "id": "virtual: config-postcssLoader",
      "key": "postcssLoader",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-outputPath": {
      "id": "virtual: config-outputPath",
      "key": "outputPath",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-normalCSSLoaderModules": {
      "id": "virtual: config-normalCSSLoaderModules",
      "key": "normalCSSLoaderModules",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-mfsu": {
      "id": "virtual: config-mfsu",
      "key": "mfsu",
      "config": {
        "default": {
          "strategy": "eager"
        }
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-mdx": {
      "id": "virtual: config-mdx",
      "key": "mdx",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-manifest": {
      "id": "virtual: config-manifest",
      "key": "manifest",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-lessLoader": {
      "id": "virtual: config-lessLoader",
      "key": "lessLoader",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-jsMinifierOptions": {
      "id": "virtual: config-jsMinifierOptions",
      "key": "jsMinifierOptions",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-jsMinifier": {
      "id": "virtual: config-jsMinifier",
      "key": "jsMinifier",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-inlineLimit": {
      "id": "virtual: config-inlineLimit",
      "key": "inlineLimit",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-ignoreMomentLocale": {
      "id": "virtual: config-ignoreMomentLocale",
      "key": "ignoreMomentLocale",
      "config": {
        "default": true
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-https": {
      "id": "virtual: config-https",
      "key": "https",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-hash": {
      "id": "virtual: config-hash",
      "key": "hash",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-forkTSChecker": {
      "id": "virtual: config-forkTSChecker",
      "key": "forkTSChecker",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-fastRefresh": {
      "id": "virtual: config-fastRefresh",
      "key": "fastRefresh",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-extraPostCSSPlugins": {
      "id": "virtual: config-extraPostCSSPlugins",
      "key": "extraPostCSSPlugins",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-extraBabelPresets": {
      "id": "virtual: config-extraBabelPresets",
      "key": "extraBabelPresets",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-extraBabelPlugins": {
      "id": "virtual: config-extraBabelPlugins",
      "key": "extraBabelPlugins",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-extraBabelIncludes": {
      "id": "virtual: config-extraBabelIncludes",
      "key": "extraBabelIncludes",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-externals": {
      "id": "virtual: config-externals",
      "key": "externals",
      "config": {
        "default": {}
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-esm": {
      "id": "virtual: config-esm",
      "key": "esm",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-devtool": {
      "id": "virtual: config-devtool",
      "key": "devtool",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-depTranspiler": {
      "id": "virtual: config-depTranspiler",
      "key": "depTranspiler",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-define": {
      "id": "virtual: config-define",
      "key": "define",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-deadCode": {
      "id": "virtual: config-deadCode",
      "key": "deadCode",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-cssPublicPath": {
      "id": "virtual: config-cssPublicPath",
      "key": "cssPublicPath",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-cssMinifierOptions": {
      "id": "virtual: config-cssMinifierOptions",
      "key": "cssMinifierOptions",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-cssMinifier": {
      "id": "virtual: config-cssMinifier",
      "key": "cssMinifier",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-cssLoaderModules": {
      "id": "virtual: config-cssLoaderModules",
      "key": "cssLoaderModules",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-cssLoader": {
      "id": "virtual: config-cssLoader",
      "key": "cssLoader",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-copy": {
      "id": "virtual: config-copy",
      "key": "copy",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-checkDepCssModules": {
      "id": "virtual: config-checkDepCssModules",
      "key": "checkDepCssModules",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-chainWebpack": {
      "id": "virtual: config-chainWebpack",
      "key": "chainWebpack",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-cacheDirectoryPath": {
      "id": "virtual: config-cacheDirectoryPath",
      "key": "cacheDirectoryPath",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-babelLoaderCustomize": {
      "id": "virtual: config-babelLoaderCustomize",
      "key": "babelLoaderCustomize",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-autoprefixer": {
      "id": "virtual: config-autoprefixer",
      "key": "autoprefixer",
      "config": {},
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-autoCSSModules": {
      "id": "virtual: config-autoCSSModules",
      "key": "autoCSSModules",
      "config": {
        "default": true
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "virtual: config-alias": {
      "id": "virtual: config-alias",
      "key": "alias",
      "config": {
        "default": {
          "umi": "@@/exports",
          "react": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react",
          "react-dom": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react-dom",
          "react-router": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react-router",
          "react-router-dom": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react-router-dom"
        }
      },
      "type": "plugin",
      "enableBy": "register",
      "time": {
        "hooks": {},
        "register": 0
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/crossorigin/crossorigin": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/crossorigin/crossorigin.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/crossorigin/crossorigin",
      "key": "crossorigin",
      "config": {},
      "time": {
        "hooks": {},
        "register": 3
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/depsOnDemand/depsOnDemand": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/depsOnDemand/depsOnDemand.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/depsOnDemand/depsOnDemand",
      "key": "depsOnDemand",
      "config": {},
      "time": {
        "hooks": {
          "onStart": [
            3
          ]
        },
        "register": 4
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/devTool/devTool": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/devTool/devTool.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/devTool/devTool",
      "key": "devTool",
      "config": {},
      "time": {
        "hooks": {},
        "register": 5
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/esbuildHelperChecker/esbuildHelperChecker": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/esbuildHelperChecker/esbuildHelperChecker.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/esbuildHelperChecker/esbuildHelperChecker",
      "key": "esbuildHelperChecker",
      "config": {},
      "time": {
        "hooks": {},
        "register": 277
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/esmi/esmi": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/esmi/esmi.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/esmi/esmi",
      "key": "esmi",
      "config": {},
      "time": {
        "hooks": {},
        "register": 321
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/exportStatic/exportStatic": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/exportStatic/exportStatic.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/exportStatic/exportStatic",
      "key": "exportStatic",
      "config": {},
      "time": {
        "hooks": {},
        "register": 114
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/favicons/favicons": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/favicons/favicons.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/favicons/favicons",
      "key": "favicons",
      "config": {},
      "time": {
        "hooks": {
          "modifyAppData": [
            0
          ]
        },
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/helmet/helmet": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/helmet/helmet.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/helmet/helmet",
      "key": "helmet",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/icons/icons": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/icons/icons.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/icons/icons",
      "key": "icons",
      "config": {},
      "time": {
        "hooks": {},
        "register": 5
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/mock/mock": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/mock/mock.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/mock/mock",
      "key": "mock",
      "config": {},
      "time": {
        "hooks": {
          "onStart": [
            3
          ]
        },
        "register": 125
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/mpa/mpa": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/mpa/mpa.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/mpa/mpa",
      "key": "mpa",
      "config": {},
      "time": {
        "hooks": {},
        "register": 3
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/okam/okam": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/okam/okam.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/okam/okam",
      "key": "okam",
      "config": {},
      "time": {
        "hooks": {},
        "register": 4
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/overrides/overrides": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/overrides/overrides.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/overrides/overrides",
      "key": "overrides",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/phantomDependency/phantomDependency": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/phantomDependency/phantomDependency.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/phantomDependency/phantomDependency",
      "key": "phantomDependency",
      "config": {},
      "time": {
        "hooks": {},
        "register": 5
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/polyfill/polyfill": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/polyfill/polyfill.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/polyfill/polyfill",
      "key": "polyfill",
      "config": {},
      "time": {
        "hooks": {
          "modifyConfig": [
            1
          ]
        },
        "register": 4
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/polyfill/publicPathPolyfill": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/polyfill/publicPathPolyfill.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/polyfill/publicPathPolyfill",
      "key": "publicPathPolyfill",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/prepare/prepare": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/prepare/prepare.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/prepare/prepare",
      "key": "prepare",
      "config": {},
      "time": {
        "hooks": {},
        "register": 7
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/routePrefetch/routePrefetch": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/routePrefetch/routePrefetch.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/routePrefetch/routePrefetch",
      "key": "routePrefetch",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/stagewise/stagewise": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/stagewise/stagewise.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/stagewise/stagewise",
      "key": "stagewise",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/terminal/terminal": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/terminal/terminal.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/terminal/terminal",
      "key": "terminal",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/tmpFiles/tmpFiles": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/tmpFiles/tmpFiles.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/tmpFiles/tmpFiles",
      "key": "tmpFiles",
      "config": {},
      "time": {
        "hooks": {},
        "register": 25
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/clientLoader/clientLoader": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/clientLoader/clientLoader.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/clientLoader/clientLoader",
      "key": "clientLoader",
      "config": {},
      "time": {
        "hooks": {},
        "register": 6
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/routeProps/routeProps": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/routeProps/routeProps.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/routeProps/routeProps",
      "key": "routeProps",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/ssr/ssr": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/ssr/ssr.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/ssr/ssr",
      "key": "ssr",
      "config": {},
      "time": {
        "hooks": {},
        "register": 17
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/tmpFiles/configTypes": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/tmpFiles/configTypes.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/tmpFiles/configTypes",
      "key": "configTypes",
      "config": {},
      "time": {
        "hooks": {},
        "register": 9
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/transform/transform": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/transform/transform.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/transform/transform",
      "key": "transform",
      "config": {},
      "time": {
        "hooks": {},
        "register": 15
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/lowImport/lowImport": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/lowImport/lowImport.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/lowImport/lowImport",
      "key": "lowImport",
      "config": {},
      "time": {
        "hooks": {},
        "register": 9
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/vite/vite": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/vite/vite.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/vite/vite",
      "key": "vite",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/apiRoute/apiRoute": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/apiRoute/apiRoute.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/apiRoute/apiRoute",
      "key": "apiRoute",
      "config": {},
      "time": {
        "hooks": {},
        "register": 19
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/monorepo/redirect": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/monorepo/redirect.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/monorepo/redirect",
      "key": "monorepoRedirect",
      "config": {},
      "time": {
        "hooks": {},
        "register": 77
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/test/test": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/test/test.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/test/test",
      "key": "test",
      "config": {},
      "time": {
        "hooks": {},
        "register": 3
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/clickToComponent/clickToComponent": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/clickToComponent/clickToComponent.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/clickToComponent/clickToComponent",
      "key": "clickToComponent",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/legacy/legacy": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/legacy/legacy.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/legacy/legacy",
      "key": "legacy",
      "config": {},
      "time": {
        "hooks": {},
        "register": 5
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/classPropertiesLoose/classPropertiesLoose": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/classPropertiesLoose/classPropertiesLoose.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/classPropertiesLoose/classPropertiesLoose",
      "key": "classPropertiesLoose",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/webpack/webpack": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/webpack/webpack.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/webpack/webpack",
      "key": "preset-umi:webpack",
      "config": {},
      "time": {
        "hooks": {},
        "register": 7
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/swc/swc": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/swc/swc.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/swc/swc",
      "key": "swc",
      "config": {},
      "time": {
        "hooks": {
          "addOnDemandDeps": [
            0
          ]
        },
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/features/ui/ui": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/ui/ui.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/ui/ui",
      "key": "ui",
      "config": {},
      "time": {
        "hooks": {},
        "register": 15
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/mako/mako": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/mako/mako.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/mako/mako",
      "key": "mako",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/utoopack/utoopack": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/utoopack/utoopack.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/utoopack/utoopack",
      "key": "utoopack",
      "config": {},
      "time": {
        "hooks": {},
        "register": 4
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/hmrGuardian/hmrGuardian": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/hmrGuardian/hmrGuardian.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/hmrGuardian/hmrGuardian",
      "key": "hmrGuardian",
      "config": {},
      "time": {
        "hooks": {},
        "register": 12
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/routePreloadOnLoad/routePreloadOnLoad": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/routePreloadOnLoad/routePreloadOnLoad.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/routePreloadOnLoad/routePreloadOnLoad",
      "key": "routePreloadOnLoad",
      "config": {},
      "time": {
        "hooks": {},
        "register": 108
      }
    },
    "./node_modules/@umijs/preset-umi/dist/features/forget/forget": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/forget/forget.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/forget/forget",
      "key": "forget",
      "config": {},
      "time": {
        "hooks": {},
        "register": 3
      },
      "enableBy": "config"
    },
    "./node_modules/@umijs/preset-umi/dist/features/bundler/bundler": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/features/bundler/bundler.js",
      "id": "./node_modules/@umijs/preset-umi/dist/features/bundler/bundler",
      "key": "preset-umi:bundler",
      "config": {},
      "time": {
        "hooks": {},
        "register": 5
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/build": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/build.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/build",
      "key": "build",
      "config": {},
      "time": {
        "hooks": {},
        "register": 13
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/config/config": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/config/config.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/config/config",
      "key": "config",
      "config": {},
      "time": {
        "hooks": {},
        "register": 109
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/dev/dev": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/dev/dev.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/dev/dev",
      "key": "dev",
      "config": {},
      "time": {
        "hooks": {
          "modifyAppData": [
            40
          ]
        },
        "register": 141
      }
    },
    "./node_modules/@umijs/preset-umi/dist/commands/help": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/help.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/help",
      "key": "help",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/lint": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/lint.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/lint",
      "key": "lint",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/setup": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/setup.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/setup",
      "key": "setup",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/deadcode": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/deadcode.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/deadcode",
      "key": "deadcode",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/version": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/version.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/version",
      "key": "version",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/page": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/page.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/page",
      "key": "generator:page",
      "config": {},
      "time": {
        "hooks": {},
        "register": 6
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/prettier": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/prettier.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/prettier",
      "key": "generator:prettier",
      "config": {},
      "time": {
        "hooks": {},
        "register": 3
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/tsconfig": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/tsconfig.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/tsconfig",
      "key": "generator:tsconfig",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/jest": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/jest.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/jest",
      "key": "generator:jest",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/tailwindcss": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/tailwindcss.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/tailwindcss",
      "key": "generator:tailwindcss",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/dva": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/dva.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/dva",
      "key": "generator:dva",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/component": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/component.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/component",
      "key": "generator:component",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/mock": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/mock.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/mock",
      "key": "generator:mock",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/cypress": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/cypress.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/cypress",
      "key": "generator:cypress",
      "config": {},
      "time": {
        "hooks": {},
        "register": 8
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/api": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/api.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/api",
      "key": "generator:api",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/generators/precommit": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/generators/precommit.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/generators/precommit",
      "key": "generator:precommit",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/plugin": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/plugin.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/plugin",
      "key": "command:plugin",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/verify-commit": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/verify-commit.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/verify-commit",
      "key": "verifyCommit",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/preview": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/preview.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/preview",
      "key": "preview",
      "config": {},
      "time": {
        "hooks": {},
        "register": 49
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/preset-umi/dist/commands/mfsu/mfsu": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/preset-umi/dist/commands/mfsu/mfsu.js",
      "id": "./node_modules/@umijs/preset-umi/dist/commands/mfsu/mfsu",
      "key": "mfsu-cli",
      "config": {},
      "time": {
        "hooks": {},
        "register": 2
      },
      "enableBy": "register"
    },
    "@umijs/plugin-run": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/plugin-run/dist/index.js",
      "id": "@umijs/plugin-run",
      "key": "run",
      "config": {},
      "time": {
        "hooks": {},
        "register": 10
      },
      "enableBy": "register"
    },
    "./node_modules/@umijs/core/dist/service/generatePlugin": {
      "cwd": "D:\\trae_projects\\makemd\\makemd\\dashboard",
      "type": "plugin",
      "path": "D:/trae_projects/makemd/makemd/dashboard/node_modules/@umijs/core/dist/service/generatePlugin.js",
      "id": "./node_modules/@umijs/core/dist/service/generatePlugin",
      "key": "generatePlugin",
      "config": {},
      "time": {
        "hooks": {},
        "register": 1
      },
      "enableBy": "register"
    }
  },
  "presets": [],
  "name": "dev",
  "args": {
    "_": []
  },
  "userConfig": {},
  "mainConfigFile": null,
  "config": {
    "routeLoader": {
      "moduleType": "esm"
    },
    "mountElementId": "root",
    "history": {
      "type": "browser"
    },
    "base": "/",
    "svgr": {},
    "publicPath": "/",
    "mfsu": {
      "strategy": "eager"
    },
    "ignoreMomentLocale": true,
    "externals": {},
    "autoCSSModules": true,
    "alias": {
      "umi": "@@/exports",
      "react": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react",
      "react-dom": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react-dom",
      "react-router": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react-router",
      "react-router-dom": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react-router-dom",
      "@": "D:/trae_projects/makemd/makemd/dashboard/src",
      "@@": "D:/trae_projects/makemd/makemd/dashboard/src/.umi",
      "regenerator-runtime": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\regenerator-runtime"
    },
    "targets": {
      "chrome": 80
    }
  },
  "routes": {
    "Compliance/CertificateExpiryReminder": {
      "path": "Compliance/CertificateExpiryReminder",
      "id": "Compliance/CertificateExpiryReminder",
      "file": "Compliance/CertificateExpiryReminder.tsx",
      "absPath": "/Compliance/CertificateExpiryReminder",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Tag,\n  Row,\n  Col,\n  Statistic,\n  Alert,\n  List,\n  Badge,\n  Tooltip,\n  Switch,\n  message,\n  Divider,\n  Timeline,\n} from 'antd';\nimport {\n  BellOutlined,\n  ClockCircleOutlined,\n  WarningOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  SettingOutlined,\n  MailOutlined,\n  SyncOutlined,\n  FileTextOutlined,\n} from '@ant-design/icons';\nimport dayjs from 'dayjs';\n\ninterface ExpiryReminder {\n  id: string;\n  certNo: string;\n  certName: string;\n  certType: string;\n  productName: string;\n  expiryDate: string;\n  daysRemaining: number;\n  status: 'CRITICAL' | 'WARNING' | 'NOTICE' | 'SAFE';\n  reminderSent: boolean;\n  lastReminderDate?: string;\n  nextReminderDate?: string;\n  actions: string[];\n}\n\nconst MOCK_REMINDERS: ExpiryReminder[] = [\n  {\n    id: '1',\n    certNo: 'FCC-2025-045',\n    certName: 'FCC Declaration',\n    certType: 'FCC',\n    productName: 'Control Module B',\n    expiryDate: '2025-06-19',\n    daysRemaining: 93,\n    status: 'WARNING',\n    reminderSent: true,\n    lastReminderDate: '2025-03-15',\n    nextReminderDate: '2025-04-15',\n    actions: ['Initiate renewal process', 'Contact testing lab'],\n  },\n  {\n    id: '2',\n    certNo: 'RoHS-2024-112',\n    certName: 'RoHS Compliance Certificate',\n    certType: 'RoHS',\n    productName: 'Power Supply Unit C',\n    expiryDate: '2025-02-28',\n    daysRemaining: -18,\n    status: 'CRITICAL',\n    reminderSent: true,\n    lastReminderDate: '2025-03-01',\n    actions: ['Immediate re-certification required', 'Suspend product listing'],\n  },\n  {\n    id: '3',\n    certNo: 'CE-2026-001',\n    certName: 'CE Declaration of Conformity',\n    certType: 'CE',\n    productName: 'Industrial Sensor A',\n    expiryDate: '2027-01-14',\n    daysRemaining: 663,\n    status: 'SAFE',\n    reminderSent: false,\n    actions: [],\n  },\n  {\n    id: '4',\n    certNo: 'UL-2026-008',\n    certName: 'UL Safety Certification',\n    certType: 'UL',\n    productName: 'Communication Gateway D',\n    expiryDate: '2027-01-31',\n    daysRemaining: 680,\n    status: 'SAFE',\n    reminderSent: false,\n    actions: [],\n  },\n  {\n    id: '5',\n    certNo: 'ISO-2025-022',\n    certName: 'ISO 9001:2015',\n    certType: 'ISO',\n    productName: 'Company-wide',\n    expiryDate: '2025-09-30',\n    daysRemaining: 196,\n    status: 'NOTICE',\n    reminderSent: true,\n    lastReminderDate: '2025-03-01',\n    nextReminderDate: '2025-06-01',\n    actions: ['Schedule surveillance audit', 'Update quality manual'],\n  },\n];\n\nconst STATUS_CONFIG: Record<string, { color: string; text: string; icon: React.ReactNode; bgColor: string }> = {\n  CRITICAL: { color: 'error', text: 'Critical', icon: <CloseCircleOutlined />, bgColor: '#fff2f0' },\n  WARNING: { color: 'warning', text: 'Warning', icon: <WarningOutlined />, bgColor: '#fffbe6' },\n  NOTICE: { color: 'processing', text: 'Notice', icon: <ClockCircleOutlined />, bgColor: '#e6f7ff' },\n  SAFE: { color: 'success', text: 'Safe', icon: <CheckCircleOutlined />, bgColor: '#f6ffed' },\n};\n\nexport const CertificateExpiryReminder: React.FC = () => {\n  const [loading, setLoading] = useState(false);\n  const [reminders, setReminders] = useState<ExpiryReminder[]>(MOCK_REMINDERS);\n  const [settingsModalVisible, setSettingsModalVisible] = useState(false);\n  const [emailEnabled, setEmailEnabled] = useState(true);\n  const [autoRenewal, setAutoRenewal] = useState(false);\n\n  useEffect(() => {\n    checkReminders();\n  }, []);\n\n  const checkReminders = () => {\n    setLoading(true);\n    setTimeout(() => {\n      setLoading(false);\n      message.success('Reminders checked');\n    }, 1000);\n  };\n\n  const handleSendReminder = (reminder: ExpiryReminder) => {\n    Modal.confirm({\n      title: 'Send Reminder',\n      content: `Send expiry reminder for ${reminder.certNo}?`,\n      onOk: () => {\n        setReminders(reminders.map(r => \n          r.id === reminder.id ? { ...r, reminderSent: true, lastReminderDate: new Date().toISOString().split('T')[0] } : r\n        ));\n        message.success('Reminder sent successfully');\n      },\n    });\n  };\n\n  const handleInitiateRenewal = (reminder: ExpiryReminder) => {\n    Modal.confirm({\n      title: 'Initiate Renewal',\n      content: `Start renewal process for ${reminder.certNo}?`,\n      onOk: () => {\n        message.success('Renewal process initiated');\n      },\n    });\n  };\n\n  const getStatusTag = (status: string, days: number) => {\n    const config = STATUS_CONFIG[status];\n    if (days < 0) {\n      return <Tag color=\"error\" icon={<CloseCircleOutlined />}>EXPIRED</Tag>;\n    }\n    return <Tag color={config.color} icon={config.icon}>{config.text}</Tag>;\n  };\n\n  const criticalCount = reminders.filter(r => r.status === 'CRITICAL' || r.daysRemaining < 0).length;\n  const warningCount = reminders.filter(r => r.status === 'WARNING').length;\n  const noticeCount = reminders.filter(r => r.status === 'NOTICE').length;\n\n  return (\n    <div className=\"certificate-expiry-reminder-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic \n              title=\"Total Certificates\" \n              value={reminders.length} \n              prefix={<FileTextOutlined />} \n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card style={{ background: STATUS_CONFIG.CRITICAL.bgColor }}>\n            <Statistic \n              title=\"Critical / Expired\" \n              value={criticalCount} \n              valueStyle={{ color: '#ff4d4f' }}\n              prefix={<CloseCircleOutlined />} \n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card style={{ background: STATUS_CONFIG.WARNING.bgColor }}>\n            <Statistic \n              title=\"Warning\" \n              value={warningCount} \n              valueStyle={{ color: '#faad14' }}\n              prefix={<WarningOutlined />} \n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card style={{ background: STATUS_CONFIG.NOTICE.bgColor }}>\n            <Statistic \n              title=\"Notice\" \n              value={noticeCount} \n              valueStyle={{ color: '#1890ff' }}\n              prefix={<ClockCircleOutlined />} \n            />\n          </Card>\n        </Col>\n      </Row>\n\n      {criticalCount > 0 && (\n        <Alert\n          message=\"Critical Certificates Detected\"\n          description={`${criticalCount} certificate(s) have expired or are in critical status. Immediate action required to maintain compliance.`}\n          type=\"error\"\n          showIcon\n          icon={<CloseCircleOutlined />}\n          style={{ marginBottom: 24 }}\n          action={\n            <Button size=\"small\" danger onClick={() => message.info('Navigating to critical certificates...')}>\n              View Details\n            </Button>\n          }\n        />\n      )}\n\n      <Card \n        title=\"Certificate Expiry Reminders\" \n        extra={\n          <Space>\n            <Button icon={<SyncOutlined />} onClick={checkReminders} loading={loading}>\n              Refresh\n            </Button>\n            <Button icon={<SettingOutlined />} onClick={() => setSettingsModalVisible(true)}>\n              Settings\n            </Button>\n          </Space>\n        }\n      >\n        <List\n          itemLayout=\"horizontal\"\n          dataSource={reminders.sort((a, b) => a.daysRemaining - b.daysRemaining)}\n          renderItem={(item) => (\n            <List.Item\n              style={{ \n                background: item.daysRemaining < 0 ? '#fff2f0' : item.daysRemaining <= 90 ? '#fffbe6' : 'transparent',\n                padding: 16,\n                marginBottom: 8,\n                borderRadius: 8,\n              }}\n              actions={[\n                <Tooltip title=\"Send Reminder\">\n                  <Button \n                    type=\"link\" \n                    icon={<MailOutlined />} \n                    onClick={() => handleSendReminder(item)}\n                    disabled={item.reminderSent && item.daysRemaining > 30}\n                  />\n                </Tooltip>,\n                <Tooltip title=\"Initiate Renewal\">\n                  <Button \n                    type=\"link\" \n                    icon={<SyncOutlined />} \n                    onClick={() => handleInitiateRenewal(item)}\n                    disabled={item.status === 'SAFE'}\n                  />\n                </Tooltip>,\n              ]}\n            >\n              <List.Item.Meta\n                avatar={\n                  <Badge \n                    count={item.daysRemaining < 0 ? '!' : item.daysRemaining <= 30 ? item.daysRemaining : 0} \n                    offset={[-5, 5]}\n                  >\n                    <FileTextOutlined style={{ fontSize: 32, color: item.daysRemaining < 0 ? '#ff4d4f' : item.daysRemaining <= 90 ? '#faad14' : '#52c41a' }} />\n                  </Badge>\n                }\n                title={\n                  <Space>\n                    <span>{item.certNo}</span>\n                    {getStatusTag(item.status, item.daysRemaining)}\n                    {item.reminderSent && <Tag icon={<BellOutlined />} color=\"blue\">Reminder Sent</Tag>}\n                  </Space>\n                }\n                description={\n                  <>\n                    <div>{item.certName} - {item.productName}</div>\n                    <Space style={{ marginTop: 8 }}>\n                      <span>Expiry: {item.expiryDate}</span>\n                      <Divider type=\"vertical\" />\n                      <span style={{ \n                        color: item.daysRemaining < 0 ? '#ff4d4f' : item.daysRemaining <= 90 ? '#faad14' : '#52c41a',\n                        fontWeight: 'bold'\n                      }}>\n                        {item.daysRemaining < 0 \n                          ? `Expired ${Math.abs(item.daysRemaining)} days ago` \n                          : `${item.daysRemaining} days remaining`\n                        }\n                      </span>\n                    </Space>\n                  </>\n                }\n              />\n              {item.actions.length > 0 && (\n                <div style={{ marginLeft: 48 }}>\n                  <Timeline\n                    items={item.actions.map((action, index) => ({\n                      color: index === 0 ? 'red' : 'gray',\n                      children: action,\n                    }))}\n                  />\n                </div>\n              )}\n            </List.Item>\n          )}\n        />\n      </Card>\n\n      <Modal\n        title=\"Reminder Settings\"\n        open={settingsModalVisible}\n        onCancel={() => setSettingsModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setSettingsModalVisible(false)}>Close</Button>,\n          <Button key=\"save\" type=\"primary\" onClick={() => { message.success('Settings saved'); setSettingsModalVisible(false); }}>\n            Save Settings\n          </Button>,\n        ]}\n      >\n        <div style={{ padding: '16px 0' }}>\n          <div style={{ marginBottom: 24 }}>\n            <div style={{ marginBottom: 8, fontWeight: 500 }}>Email Notifications</div>\n            <Switch \n              checked={emailEnabled} \n              onChange={setEmailEnabled}\n              checkedChildren=\"Enabled\"\n              unCheckedChildren=\"Disabled\"\n            />\n            <div style={{ color: '#666', marginTop: 8 }}>\n              Receive email notifications for certificate expiry reminders\n            </div>\n          </div>\n\n          <div style={{ marginBottom: 24 }}>\n            <div style={{ marginBottom: 8, fontWeight: 500 }}>Auto-initiate Renewal</div>\n            <Switch \n              checked={autoRenewal} \n              onChange={setAutoRenewal}\n              checkedChildren=\"Enabled\"\n              unCheckedChildren=\"Disabled\"\n            />\n            <div style={{ color: '#666', marginTop: 8 }}>\n              Automatically initiate renewal process when certificate enters warning status\n            </div>\n          </div>\n\n          <Divider>Reminder Schedule</Divider>\n\n          <List\n            size=\"small\"\n            dataSource={[\n              { status: 'Critical', timing: '90 days before expiry', frequency: 'Weekly' },\n              { status: 'Warning', timing: '60 days before expiry', frequency: 'Bi-weekly' },\n              { status: 'Notice', timing: '30 days before expiry', frequency: 'Weekly' },\n              { status: 'Final', timing: '7 days before expiry', frequency: 'Daily' },\n            ]}\n            renderItem={(item) => (\n              <List.Item>\n                <List.Item.Meta\n                  title={item.status}\n                  description={`${item.timing} - ${item.frequency}`}\n                />\n              </List.Item>\n            )}\n          />\n        </div>\n      </Modal>\n    </div>\n  );\n};\n\nexport default CertificateExpiryReminder;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Compliance/CertificateExpiryReminder.tsx"
    },
    "Compliance/CertificateManage": {
      "path": "Compliance/CertificateManage",
      "id": "Compliance/CertificateManage",
      "file": "Compliance/CertificateManage.tsx",
      "absPath": "/Compliance/CertificateManage",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  Select,\n  DatePicker,\n  Upload,\n  Descriptions,\n  Divider,\n  message,\n  Tag,\n  Tabs,\n  Row,\n  Col,\n  Statistic,\n  Alert,\n  Tooltip,\n  Badge,\n} from 'antd';\nimport {\n  FileTextOutlined,\n  PlusOutlined,\n  EyeOutlined,\n  EditOutlined,\n  DeleteOutlined,\n  UploadOutlined,\n  DownloadOutlined,\n  CheckCircleOutlined,\n  ClockCircleOutlined,\n  CloseCircleOutlined,\n  WarningOutlined,\n  BellOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs from 'dayjs';\n\nconst { Option } = Select;\nconst { TabPane } = Tabs;\nconst { RangePicker } = DatePicker;\n\ninterface Certificate {\n  id: string;\n  certNo: string;\n  certName: string;\n  certType: 'CE' | 'FCC' | 'RoHS' | 'UL' | 'ISO' | 'FDA' | 'CCC' | 'OTHER';\n  productId: string;\n  productName: string;\n  issuer: string;\n  issueDate: string;\n  expiryDate: string;\n  status: 'VALID' | 'EXPIRED' | 'PENDING_RENEWAL' | 'REVOKED';\n  attachments: string[];\n  scope: string;\n  remark?: string;\n  createdAt: string;\n  updatedAt: string;\n}\n\nconst CERT_TYPES = [\n  { value: 'CE', label: 'CE Certification', color: 'blue' },\n  { value: 'FCC', label: 'FCC Certification', color: 'green' },\n  { value: 'RoHS', label: 'RoHS Compliance', color: 'purple' },\n  { value: 'UL', label: 'UL Certification', color: 'orange' },\n  { value: 'ISO', label: 'ISO Certification', color: 'cyan' },\n  { value: 'FDA', label: 'FDA Approval', color: 'red' },\n  { value: 'CCC', label: 'CCC Certification', color: 'gold' },\n  { value: 'OTHER', label: 'Other', color: 'default' },\n];\n\nconst STATUS_CONFIG: Record<string, { color: string; text: string; icon: React.ReactNode }> = {\n  VALID: { color: 'success', text: 'Valid', icon: <CheckCircleOutlined /> },\n  EXPIRED: { color: 'error', text: 'Expired', icon: <CloseCircleOutlined /> },\n  PENDING_RENEWAL: { color: 'warning', text: 'Pending Renewal', icon: <ClockCircleOutlined /> },\n  REVOKED: { color: 'red', text: 'Revoked', icon: <CloseCircleOutlined /> },\n};\n\nconst MOCK_PRODUCTS = [\n  { id: 'P001', name: 'Industrial Sensor A' },\n  { id: 'P002', name: 'Control Module B' },\n  { id: 'P003', name: 'Power Supply Unit C' },\n  { id: 'P004', name: 'Communication Gateway D' },\n];\n\nexport const CertificateManage: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [certificates, setCertificates] = useState<Certificate[]>([]);\n  const [createModalVisible, setCreateModalVisible] = useState(false);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [selectedCert, setSelectedCert] = useState<Certificate | null>(null);\n  const [activeTab, setActiveTab] = useState('all');\n\n  useEffect(() => {\n    fetchCertificates();\n  }, []);\n\n  const fetchCertificates = async () => {\n    setLoading(true);\n    try {\n      const mockCerts: Certificate[] = [\n        {\n          id: '1',\n          certNo: 'CE-2026-001',\n          certName: 'CE Declaration of Conformity',\n          certType: 'CE',\n          productId: 'P001',\n          productName: 'Industrial Sensor A',\n          issuer: 'TÜV SÜD',\n          issueDate: '2025-01-15',\n          expiryDate: '2027-01-14',\n          status: 'VALID',\n          attachments: ['ce_cert_2026_001.pdf', 'test_report.pdf'],\n          scope: 'Low Voltage Directive (LVD), EMC Directive',\n          createdAt: '2025-01-15 10:00:00',\n          updatedAt: '2025-01-15 10:00:00',\n        },\n        {\n          id: '2',\n          certNo: 'FCC-2025-045',\n          certName: 'FCC Declaration',\n          certType: 'FCC',\n          productId: 'P002',\n          productName: 'Control Module B',\n          issuer: 'FCC',\n          issueDate: '2024-06-20',\n          expiryDate: '2025-06-19',\n          status: 'PENDING_RENEWAL',\n          attachments: ['fcc_cert.pdf'],\n          scope: 'Part 15B Class B Digital Device',\n          remark: 'Renewal application submitted',\n          createdAt: '2024-06-20 14:30:00',\n          updatedAt: '2025-03-10 09:00:00',\n        },\n        {\n          id: '3',\n          certNo: 'RoHS-2024-112',\n          certName: 'RoHS Compliance Certificate',\n          certType: 'RoHS',\n          productId: 'P003',\n          productName: 'Power Supply Unit C',\n          issuer: 'SGS',\n          issueDate: '2024-03-01',\n          expiryDate: '2025-02-28',\n          status: 'EXPIRED',\n          attachments: ['rohs_cert.pdf'],\n          scope: 'RoHS 2.0 (2011/65/EU)',\n          remark: 'Needs re-certification',\n          createdAt: '2024-03-01 09:00:00',\n          updatedAt: '2025-03-01 00:00:00',\n        },\n        {\n          id: '4',\n          certNo: 'UL-2026-008',\n          certName: 'UL Safety Certification',\n          certType: 'UL',\n          productId: 'P004',\n          productName: 'Communication Gateway D',\n          issuer: 'Underwriters Laboratories',\n          issueDate: '2026-02-01',\n          expiryDate: '2027-01-31',\n          status: 'VALID',\n          attachments: ['ul_cert.pdf', 'safety_test.pdf'],\n          scope: 'UL 60950-1, Information Technology Equipment',\n          createdAt: '2026-02-01 11:00:00',\n          updatedAt: '2026-02-01 11:00:00',\n        },\n      ];\n      setCertificates(mockCerts);\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleCreateCert = async (values: any) => {\n    setLoading(true);\n    try {\n      const product = MOCK_PRODUCTS.find(p => p.id === values.productId);\n      const newCert: Certificate = {\n        id: `${Date.now()}`,\n        certNo: `${values.certType}-${new Date().getFullYear()}-${String(certificates.length + 1).padStart(3, '0')}`,\n        certName: values.certName,\n        certType: values.certType,\n        productId: values.productId,\n        productName: product?.name || '',\n        issuer: values.issuer,\n        issueDate: values.issueDate.format('YYYY-MM-DD'),\n        expiryDate: values.expiryDate.format('YYYY-MM-DD'),\n        status: 'VALID',\n        attachments: [],\n        scope: values.scope,\n        createdAt: new Date().toISOString(),\n        updatedAt: new Date().toISOString(),\n      };\n\n      setCertificates([newCert, ...certificates]);\n      message.success('Certificate created successfully');\n      setCreateModalVisible(false);\n      form.resetFields();\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleViewDetail = (cert: Certificate) => {\n    setSelectedCert(cert);\n    setDetailModalVisible(true);\n  };\n\n  const handleRenew = (cert: Certificate) => {\n    Modal.confirm({\n      title: 'Renew Certificate',\n      content: `Are you sure you want to initiate renewal for ${cert.certNo}?`,\n      onOk: () => {\n        setCertificates(certificates.map(c => \n          c.id === cert.id ? { ...c, status: 'PENDING_RENEWAL' as const, updatedAt: new Date().toISOString() } : c\n        ));\n        message.success('Renewal initiated');\n      },\n    });\n  };\n\n  const handleDelete = (certId: string) => {\n    Modal.confirm({\n      title: 'Delete Certificate',\n      content: 'Are you sure you want to delete this certificate?',\n      okType: 'danger',\n      onOk: () => {\n        setCertificates(certificates.filter(c => c.id !== certId));\n        message.success('Certificate deleted');\n      },\n    });\n  };\n\n  const getFilteredCerts = () => {\n    if (activeTab === 'all') return certificates;\n    if (activeTab === 'expiring') {\n      return certificates.filter(c => {\n        const daysUntilExpiry = dayjs(c.expiryDate).diff(dayjs(), 'day');\n        return daysUntilExpiry > 0 && daysUntilExpiry <= 90;\n      });\n    }\n    return certificates.filter(c => c.status === activeTab.toUpperCase());\n  };\n\n  const columns: ColumnsType<Certificate> = [\n    {\n      title: 'Cert No',\n      dataIndex: 'certNo',\n      key: 'certNo',\n      width: 130,\n      render: (no: string, record: Certificate) => (\n        <a onClick={() => handleViewDetail(record)}>{no}</a>\n      ),\n    },\n    {\n      title: 'Certificate Name',\n      dataIndex: 'certName',\n      key: 'certName',\n      width: 200,\n      ellipsis: true,\n    },\n    {\n      title: 'Type',\n      dataIndex: 'certType',\n      key: 'certType',\n      width: 100,\n      render: (type: string) => {\n        const config = CERT_TYPES.find(t => t.value === type);\n        return <Tag color={config?.color}>{type}</Tag>;\n      },\n    },\n    {\n      title: 'Product',\n      dataIndex: 'productName',\n      key: 'productName',\n      width: 160,\n    },\n    {\n      title: 'Issuer',\n      dataIndex: 'issuer',\n      key: 'issuer',\n      width: 120,\n    },\n    {\n      title: 'Issue Date',\n      dataIndex: 'issueDate',\n      key: 'issueDate',\n      width: 100,\n    },\n    {\n      title: 'Expiry Date',\n      dataIndex: 'expiryDate',\n      key: 'expiryDate',\n      width: 100,\n      render: (date: string, record: Certificate) => {\n        const daysUntilExpiry = dayjs(date).diff(dayjs(), 'day');\n        const isExpiringSoon = daysUntilExpiry > 0 && daysUntilExpiry <= 90;\n        return (\n          <Tooltip title={isExpiringSoon ? `Expires in ${daysUntilExpiry} days` : ''}>\n            <span style={{ color: isExpiringSoon || daysUntilExpiry <= 0 ? '#ff4d4f' : undefined }}>\n              {date}\n            </span>\n          </Tooltip>\n        );\n      },\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 120,\n      render: (status: string) => {\n        const config = STATUS_CONFIG[status];\n        return <Tag color={config.color} icon={config.icon}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Actions',\n      key: 'actions',\n      width: 150,\n      render: (_, record: Certificate) => (\n        <Space>\n          <Tooltip title=\"View Details\">\n            <Button type=\"link\" icon={<EyeOutlined />} onClick={() => handleViewDetail(record)} />\n          </Tooltip>\n          {record.status === 'VALID' && (\n            <Tooltip title=\"Renew\">\n              <Button type=\"link\" icon={<ClockCircleOutlined />} onClick={() => handleRenew(record)} />\n            </Tooltip>\n          )}\n          <Tooltip title=\"Delete\">\n            <Button type=\"link\" danger icon={<DeleteOutlined />} onClick={() => handleDelete(record.id)} />\n          </Tooltip>\n        </Space>\n      ),\n    },\n  ];\n\n  const stats = {\n    total: certificates.length,\n    valid: certificates.filter(c => c.status === 'VALID').length,\n    expiring: certificates.filter(c => {\n      const days = dayjs(c.expiryDate).diff(dayjs(), 'day');\n      return days > 0 && days <= 90;\n    }).length,\n    expired: certificates.filter(c => c.status === 'EXPIRED').length,\n  };\n\n  return (\n    <div className=\"certificate-manage-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Total Certificates\" value={stats.total} prefix={<FileTextOutlined />} />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Valid\" value={stats.valid} valueStyle={{ color: '#52c41a' }} prefix={<CheckCircleOutlined />} />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Expiring Soon\" value={stats.expiring} valueStyle={{ color: '#faad14' }} prefix={<WarningOutlined />} />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Expired\" value={stats.expired} valueStyle={{ color: '#ff4d4f' }} prefix={<CloseCircleOutlined />} />\n          </Card>\n        </Col>\n        <Col span={8}>\n          <Card>\n            <Alert\n              message=\"Certificate Expiry Reminder\"\n              description={`${stats.expiring} certificates are expiring within 90 days. Please initiate renewal process.`}\n              type=\"warning\"\n              showIcon\n              icon={<BellOutlined />}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card title=\"Certificate Management\" extra={\n        <Button type=\"primary\" icon={<PlusOutlined />} onClick={() => setCreateModalVisible(true)}>\n          Add Certificate\n        </Button>\n      }>\n        <Tabs activeKey={activeTab} onChange={setActiveTab}>\n          <TabPane tab=\"All\" key=\"all\" />\n          <TabPane tab={<Badge count={stats.expiring} offset={[10, 0]} size=\"small\">Expiring Soon</Badge>} key=\"expiring\" />\n          <TabPane tab=\"Valid\" key=\"valid\" />\n          <TabPane tab=\"Expired\" key=\"expired\" />\n          <TabPane tab=\"Pending Renewal\" key=\"pending_renewal\" />\n        </Tabs>\n\n        <Table\n          columns={columns}\n          dataSource={getFilteredCerts()}\n          rowKey=\"id\"\n          loading={loading}\n          pagination={{ pageSize: 10 }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Add New Certificate\"\n        open={createModalVisible}\n        onCancel={() => setCreateModalVisible(false)}\n        footer={null}\n        width={700}\n      >\n        <Form form={form} layout=\"vertical\" onFinish={handleCreateCert}>\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"certType\" label=\"Certificate Type\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select Type\">\n                  {CERT_TYPES.map(t => (\n                    <Option key={t.value} value={t.value}>{t.label}</Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"productId\" label=\"Product\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select Product\">\n                  {MOCK_PRODUCTS.map(p => (\n                    <Option key={p.id} value={p.id}>{p.name}</Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n          </Row>\n\n          <Form.Item name=\"certName\" label=\"Certificate Name\" rules={[{ required: true }]}>\n            <Input placeholder=\"Enter certificate name\" />\n          </Form.Item>\n\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"issuer\" label=\"Issuing Authority\" rules={[{ required: true }]}>\n                <Input placeholder=\"Enter issuer name\" />\n              </Form.Item>\n            </Col>\n            <Col span={6}>\n              <Form.Item name=\"issueDate\" label=\"Issue Date\" rules={[{ required: true }]}>\n                <DatePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n            <Col span={6}>\n              <Form.Item name=\"expiryDate\" label=\"Expiry Date\" rules={[{ required: true }]}>\n                <DatePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n          </Row>\n\n          <Form.Item name=\"scope\" label=\"Scope\">\n            <Input.TextArea rows={3} placeholder=\"Enter certification scope\" />\n          </Form.Item>\n\n          <Form.Item name=\"attachments\" label=\"Attachments\">\n            <Upload>\n              <Button icon={<UploadOutlined />}>Upload Files</Button>\n            </Upload>\n          </Form.Item>\n\n          <div style={{ textAlign: 'right' }}>\n            <Button onClick={() => setCreateModalVisible(false)} style={{ marginRight: 8 }}>Cancel</Button>\n            <Button type=\"primary\" htmlType=\"submit\" loading={loading}>Create Certificate</Button>\n          </div>\n        </Form>\n      </Modal>\n\n      <Modal\n        title=\"Certificate Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>Close</Button>,\n          selectedCert?.status === 'VALID' && (\n            <Button key=\"renew\" type=\"primary\" icon={<ClockCircleOutlined />} onClick={() => { handleRenew(selectedCert); setDetailModalVisible(false); }}>\n              Initiate Renewal\n            </Button>\n          ),\n        ]}\n        width={700}\n      >\n        {selectedCert && (\n          <>\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"Certificate No\">{selectedCert.certNo}</Descriptions.Item>\n              <Descriptions.Item label=\"Status\">\n                <Tag color={STATUS_CONFIG[selectedCert.status].color}>\n                  {STATUS_CONFIG[selectedCert.status].text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Certificate Name\" span={2}>{selectedCert.certName}</Descriptions.Item>\n              <Descriptions.Item label=\"Type\">\n                <Tag color={CERT_TYPES.find(t => t.value === selectedCert.certType)?.color}>\n                  {CERT_TYPES.find(t => t.value === selectedCert.certType)?.label}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Product\">{selectedCert.productName}</Descriptions.Item>\n              <Descriptions.Item label=\"Issuer\">{selectedCert.issuer}</Descriptions.Item>\n              <Descriptions.Item label=\"Issue Date\">{selectedCert.issueDate}</Descriptions.Item>\n              <Descriptions.Item label=\"Expiry Date\">{selectedCert.expiryDate}</Descriptions.Item>\n              <Descriptions.Item label=\"Scope\" span={2}>{selectedCert.scope}</Descriptions.Item>\n              {selectedCert.remark && (\n                <Descriptions.Item label=\"Remark\" span={2}>{selectedCert.remark}</Descriptions.Item>\n              )}\n            </Descriptions>\n\n            {selectedCert.attachments.length > 0 && (\n              <>\n                <Divider>Attachments</Divider>\n                <Space>\n                  {selectedCert.attachments.map((file, index) => (\n                    <Button key={index} icon={<DownloadOutlined />} size=\"small\">\n                      {file}\n                    </Button>\n                  ))}\n                </Space>\n              </>\n            )}\n          </>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default CertificateManage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Compliance/CertificateManage.tsx"
    },
    "AfterSales/CustomerService": {
      "path": "AfterSales/CustomerService",
      "id": "AfterSales/CustomerService",
      "file": "AfterSales/CustomerService.tsx",
      "absPath": "/AfterSales/CustomerService",
      "__content": "import React, { useState, useEffect, useRef } from 'react';\nimport {\n  Card,\n  Table,\n  Tag,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  Select,\n  Descriptions,\n  Divider,\n  message,\n  Tabs,\n  Badge,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  List,\n  Avatar,\n  Typography,\n  Dropdown,\n  Menu,\n  Popconfirm,\n} from 'antd';\nimport {\n  MessageOutlined,\n  UserOutlined,\n  SendOutlined,\n  ClockCircleOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  MoreOutlined,\n  PhoneOutlined,\n  MailOutlined,\n  FileTextOutlined,\n  ReloadOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { TextArea } = Input;\nconst { Option } = Select;\nconst { TabPane } = Tabs;\nconst { Text, Paragraph } = Typography;\n\ninterface CustomerServiceTicket {\n  id: string;\n  ticketId: string;\n  orderId: string;\n  customerId: string;\n  customerName: string;\n  customerEmail: string;\n  subject: string;\n  category: string;\n  priority: 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT';\n  status: 'OPEN' | 'IN_PROGRESS' | 'WAITING_CUSTOMER' | 'RESOLVED' | 'CLOSED';\n  assignedTo?: string;\n  createdAt: string;\n  updatedAt: string;\n  platform: string;\n  lastMessage?: string;\n  messageCount: number;\n}\n\ninterface ChatMessage {\n  id: string;\n  ticketId: string;\n  sender: 'CUSTOMER' | 'AGENT' | 'SYSTEM';\n  senderName: string;\n  content: string;\n  attachments?: string[];\n  createdAt: string;\n  isRead: boolean;\n}\n\nconst TICKET_STATUS_MAP: Record<string, { color: string; text: string }> = {\n  OPEN: { color: 'error', text: 'Open' },\n  IN_PROGRESS: { color: 'processing', text: 'In Progress' },\n  WAITING_CUSTOMER: { color: 'warning', text: 'Waiting Customer' },\n  RESOLVED: { color: 'success', text: 'Resolved' },\n  CLOSED: { color: 'default', text: 'Closed' },\n};\n\nconst PRIORITY_MAP: Record<string, { color: string; text: string }> = {\n  LOW: { color: 'default', text: 'Low' },\n  MEDIUM: { color: 'blue', text: 'Medium' },\n  HIGH: { color: 'orange', text: 'High' },\n  URGENT: { color: 'red', text: 'Urgent' },\n};\n\nconst CATEGORIES = [\n  { value: 'ORDER_ISSUE', label: 'Order Issue' },\n  { value: 'REFUND_REQUEST', label: 'Refund Request' },\n  { value: 'RETURN_REQUEST', label: 'Return Request' },\n  { value: 'SHIPPING_ISSUE', label: 'Shipping Issue' },\n  { value: 'PRODUCT_INQUIRY', label: 'Product Inquiry' },\n  { value: 'PAYMENT_ISSUE', label: 'Payment Issue' },\n  { value: 'OTHER', label: 'Other' },\n];\n\nconst QUICK_REPLIES = [\n  'Thank you for contacting us. How can I help you today?',\n  'I understand your concern. Let me check that for you.',\n  'I apologize for the inconvenience. We will resolve this as soon as possible.',\n  'Your request has been processed. Is there anything else I can help with?',\n  'Thank you for your patience. We are looking into this issue.',\n];\n\nexport const CustomerService: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [tickets, setTickets] = useState<CustomerServiceTicket[]>([]);\n  const [selectedTicket, setSelectedTicket] = useState<CustomerServiceTicket | null>(null);\n  const [messages, setMessages] = useState<ChatMessage[]>([]);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [chatModalVisible, setChatModalVisible] = useState(false);\n  const [newTicketModalVisible, setNewTicketModalVisible] = useState(false);\n  const [activeTab, setActiveTab] = useState('all');\n  const [messageInput, setMessageInput] = useState('');\n  const [stats, setStats] = useState({\n    total: 0,\n    open: 0,\n    inProgress: 0,\n    resolved: 0,\n    avgResponseTime: 0,\n  });\n  const chatEndRef = useRef<HTMLDivElement>(null);\n\n  useEffect(() => {\n    fetchTickets();\n  }, []);\n\n  useEffect(() => {\n    if (chatModalVisible && chatEndRef.current) {\n      chatEndRef.current.scrollIntoView({ behavior: 'smooth' });\n    }\n  }, [messages, chatModalVisible]);\n\n  const fetchTickets = async () => {\n    setLoading(true);\n    try {\n      const mockTickets: CustomerServiceTicket[] = [\n        {\n          id: '1',\n          ticketId: 'TKT-2026-001',\n          orderId: 'ORD-2026-001',\n          customerId: 'CUST_001',\n          customerName: 'John Smith',\n          customerEmail: 'john.smith@email.com',\n          subject: 'Order not received',\n          category: 'SHIPPING_ISSUE',\n          priority: 'HIGH',\n          status: 'OPEN',\n          createdAt: '2026-03-18 10:30:00',\n          updatedAt: '2026-03-18 11:00:00',\n          platform: 'Amazon',\n          lastMessage: 'When will my order arrive?',\n          messageCount: 3,\n        },\n        {\n          id: '2',\n          ticketId: 'TKT-2026-002',\n          orderId: 'ORD-2026-002',\n          customerId: 'CUST_002',\n          customerName: 'Emma Wilson',\n          customerEmail: 'emma.wilson@email.com',\n          subject: 'Request for refund',\n          category: 'REFUND_REQUEST',\n          priority: 'MEDIUM',\n          status: 'IN_PROGRESS',\n          assignedTo: 'Agent_001',\n          createdAt: '2026-03-17 14:20:00',\n          updatedAt: '2026-03-18 09:00:00',\n          platform: 'eBay',\n          lastMessage: 'I would like to request a refund for my order.',\n          messageCount: 5,\n        },\n        {\n          id: '3',\n          ticketId: 'TKT-2026-003',\n          orderId: 'ORD-2026-003',\n          customerId: 'CUST_003',\n          customerName: 'Michael Brown',\n          customerEmail: 'michael.brown@email.com',\n          subject: 'Product quality issue',\n          category: 'RETURN_REQUEST',\n          priority: 'LOW',\n          status: 'RESOLVED',\n          assignedTo: 'Agent_002',\n          createdAt: '2026-03-16 09:15:00',\n          updatedAt: '2026-03-17 16:30:00',\n          platform: 'Shopify',\n          lastMessage: 'Thank you for resolving my issue.',\n          messageCount: 8,\n        },\n        {\n          id: '4',\n          ticketId: 'TKT-2026-004',\n          orderId: 'ORD-2026-004',\n          customerId: 'CUST_004',\n          customerName: 'Sarah Davis',\n          customerEmail: 'sarah.davis@email.com',\n          subject: 'Payment failed',\n          category: 'PAYMENT_ISSUE',\n          priority: 'URGENT',\n          status: 'WAITING_CUSTOMER',\n          assignedTo: 'Agent_001',\n          createdAt: '2026-03-18 08:00:00',\n          updatedAt: '2026-03-18 10:00:00',\n          platform: 'Amazon',\n          lastMessage: 'Please provide your payment screenshot.',\n          messageCount: 4,\n        },\n      ];\n\n      setTickets(mockTickets);\n      calculateStats(mockTickets);\n    } catch (error) {\n      message.error('Failed to load tickets');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const calculateStats = (ticketList: CustomerServiceTicket[]) => {\n    setStats({\n      total: ticketList.length,\n      open: ticketList.filter((t) => t.status === 'OPEN').length,\n      inProgress: ticketList.filter((t) => t.status === 'IN_PROGRESS').length,\n      resolved: ticketList.filter((t) => t.status === 'RESOLVED').length,\n      avgResponseTime: 2.5,\n    });\n  };\n\n  const fetchMessages = async (ticketId: string) => {\n    const mockMessages: ChatMessage[] = [\n      {\n        id: '1',\n        ticketId,\n        sender: 'CUSTOMER',\n        senderName: selectedTicket?.customerName || 'Customer',\n        content: 'Hello, I have an issue with my order.',\n        createdAt: '2026-03-18 10:30:00',\n        isRead: true,\n      },\n      {\n        id: '2',\n        ticketId,\n        sender: 'AGENT',\n        senderName: 'Support Agent',\n        content: 'Hello! Thank you for contacting us. How can I help you today?',\n        createdAt: '2026-03-18 10:32:00',\n        isRead: true,\n      },\n      {\n        id: '3',\n        ticketId,\n        sender: 'CUSTOMER',\n        senderName: selectedTicket?.customerName || 'Customer',\n        content: 'My order was supposed to arrive yesterday but it hasnt been delivered yet.',\n        createdAt: '2026-03-18 10:35:00',\n        isRead: true,\n      },\n      {\n        id: '4',\n        ticketId,\n        sender: 'AGENT',\n        senderName: 'Support Agent',\n        content: 'I apologize for the delay. Let me check the status of your order for you.',\n        createdAt: '2026-03-18 10:38:00',\n        isRead: true,\n      },\n    ];\n    setMessages(mockMessages);\n  };\n\n  const handleViewDetail = (ticket: CustomerServiceTicket) => {\n    setSelectedTicket(ticket);\n    setDetailModalVisible(true);\n  };\n\n  const handleOpenChat = (ticket: CustomerServiceTicket) => {\n    setSelectedTicket(ticket);\n    setChatModalVisible(true);\n    fetchMessages(ticket.ticketId);\n  };\n\n  const handleSendMessage = async () => {\n    if (!messageInput.trim()) return;\n\n    const newMessage: ChatMessage = {\n      id: Date.now().toString(),\n      ticketId: selectedTicket?.ticketId || '',\n      sender: 'AGENT',\n      senderName: 'Support Agent',\n      content: messageInput,\n      createdAt: new Date().toISOString(),\n      isRead: true,\n    };\n\n    setMessages([...messages, newMessage]);\n    setMessageInput('');\n    message.success('Message sent');\n  };\n\n  const handleQuickReply = (reply: string) => {\n    setMessageInput(reply);\n  };\n\n  const handleStatusChange = async (ticketId: string, newStatus: string) => {\n    setLoading(true);\n    try {\n      console.log('Updating ticket status:', { ticketId, newStatus });\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Status updated successfully');\n      fetchTickets();\n    } catch (error) {\n      message.error('Failed to update status');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleCreateTicket = async () => {\n    try {\n      const values = await form.validateFields();\n      setLoading(true);\n\n      console.log('Creating new ticket:', values);\n\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      message.success('Ticket created successfully');\n      setNewTicketModalVisible(false);\n      form.resetFields();\n      fetchTickets();\n    } catch (error) {\n      message.error('Failed to create ticket');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const getFilteredTickets = () => {\n    if (activeTab === 'all') return tickets;\n    return tickets.filter((t) => t.status === activeTab.toUpperCase());\n  };\n\n  const columns: ColumnsType<CustomerServiceTicket> = [\n    {\n      title: 'Ticket ID',\n      dataIndex: 'ticketId',\n      key: 'ticketId',\n      width: 130,\n      render: (text: string, record) => (\n        <a onClick={() => handleViewDetail(record)}>{text}</a>\n      ),\n    },\n    {\n      title: 'Subject',\n      dataIndex: 'subject',\n      key: 'subject',\n      width: 200,\n      ellipsis: true,\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 120,\n    },\n    {\n      title: 'Platform',\n      dataIndex: 'platform',\n      key: 'platform',\n      width: 90,\n      render: (platform: string) => <Tag>{platform}</Tag>,\n    },\n    {\n      title: 'Category',\n      dataIndex: 'category',\n      key: 'category',\n      width: 130,\n      render: (category: string) => (\n        <Tag color=\"blue\">{CATEGORIES.find((c) => c.value === category)?.label || category}</Tag>\n      ),\n    },\n    {\n      title: 'Priority',\n      dataIndex: 'priority',\n      key: 'priority',\n      width: 90,\n      render: (priority: string) => {\n        const config = PRIORITY_MAP[priority];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 130,\n      render: (status: string) => {\n        const config = TICKET_STATUS_MAP[status];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Messages',\n      dataIndex: 'messageCount',\n      key: 'messageCount',\n      width: 80,\n      render: (count: number) => (\n        <Badge count={count} showZero color=\"#1890ff\" />\n      ),\n    },\n    {\n      title: 'Updated',\n      dataIndex: 'updatedAt',\n      key: 'updatedAt',\n      width: 150,\n    },\n    {\n      title: 'Actions',\n      key: 'action',\n      width: 150,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space>\n          <Tooltip title=\"View Details\">\n            <Button\n              type=\"link\"\n              icon={<FileTextOutlined />}\n              onClick={() => handleViewDetail(record)}\n            />\n          </Tooltip>\n          <Tooltip title=\"Chat\">\n            <Button\n              type=\"link\"\n              icon={<MessageOutlined />}\n              onClick={() => handleOpenChat(record)}\n            />\n          </Tooltip>\n          <Dropdown\n            overlay={\n              <Menu>\n                <Menu.Item\n                  key=\"resolve\"\n                  onClick={() => handleStatusChange(record.ticketId, 'RESOLVED')}\n                >\n                  Mark as Resolved\n                </Menu.Item>\n                <Menu.Item\n                  key=\"close\"\n                  onClick={() => handleStatusChange(record.ticketId, 'CLOSED')}\n                >\n                  Close Ticket\n                </Menu.Item>\n              </Menu>\n            }\n          >\n            <Button type=\"link\" icon={<MoreOutlined />} />\n          </Dropdown>\n        </Space>\n      ),\n    },\n  ];\n\n  return (\n    <div className=\"customer-service-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Total Tickets\"\n              value={stats.total}\n              prefix={<FileTextOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Open\"\n              value={stats.open}\n              valueStyle={{ color: '#f5222d' }}\n              prefix={<ClockCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"In Progress\"\n              value={stats.inProgress}\n              valueStyle={{ color: '#1890ff' }}\n              prefix={<MessageOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Resolved\"\n              value={stats.resolved}\n              valueStyle={{ color: '#52c41a' }}\n              prefix={<CheckCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={8}>\n          <Card>\n            <Statistic\n              title=\"Avg Response Time\"\n              value={stats.avgResponseTime}\n              suffix=\"hours\"\n              valueStyle={{ color: '#1890ff' }}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card\n        title=\"Customer Service Tickets\"\n        extra={\n          <Space>\n            <Button icon={<ReloadOutlined />} onClick={fetchTickets}>\n              Refresh\n            </Button>\n            <Button type=\"primary\" onClick={() => setNewTicketModalVisible(true)}>\n              New Ticket\n            </Button>\n          </Space>\n        }\n      >\n        <Tabs activeKey={activeTab} onChange={setActiveTab}>\n          <TabPane\n            tab={\n              <span>\n                <Badge count={stats.open} offset={[10, 0]} size=\"small\">\n                  All\n                </Badge>\n              </span>\n            }\n            key=\"all\"\n          />\n          <TabPane\n            tab={\n              <span>\n                <Badge count={stats.open} offset={[10, 0]} size=\"small\">\n                  Open\n                </Badge>\n              </span>\n            }\n            key=\"open\"\n          />\n          <TabPane tab=\"In Progress\" key=\"in_progress\" />\n          <TabPane tab=\"Waiting Customer\" key=\"waiting_customer\" />\n          <TabPane tab=\"Resolved\" key=\"resolved\" />\n          <TabPane tab=\"Closed\" key=\"closed\" />\n        </Tabs>\n\n        <Table\n          columns={columns}\n          dataSource={getFilteredTickets()}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1400 }}\n          pagination={{\n            showSizeChanger: true,\n            showTotal: (total) => `Total ${total} tickets`,\n          }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Ticket Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>\n            Close\n          </Button>,\n          <Button\n            key=\"chat\"\n            type=\"primary\"\n            icon={<MessageOutlined />}\n            onClick={() => {\n              setDetailModalVisible(false);\n              handleOpenChat(selectedTicket!);\n            }}\n          >\n            Open Chat\n          </Button>,\n        ]}\n        width={700}\n      >\n        {selectedTicket && (\n          <Descriptions bordered column={2}>\n            <Descriptions.Item label=\"Ticket ID\" span={2}>\n              {selectedTicket.ticketId}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Order ID\">{selectedTicket.orderId}</Descriptions.Item>\n            <Descriptions.Item label=\"Platform\">{selectedTicket.platform}</Descriptions.Item>\n            <Descriptions.Item label=\"Subject\" span={2}>\n              {selectedTicket.subject}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Category\">\n              {CATEGORIES.find((c) => c.value === selectedTicket.category)?.label}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Priority\">\n              <Tag color={PRIORITY_MAP[selectedTicket.priority].color}>\n                {PRIORITY_MAP[selectedTicket.priority].text}\n              </Tag>\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Status\">\n              <Tag color={TICKET_STATUS_MAP[selectedTicket.status].color}>\n                {TICKET_STATUS_MAP[selectedTicket.status].text}\n              </Tag>\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Assigned To\">\n              {selectedTicket.assignedTo || 'Unassigned'}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Customer Name\">\n              {selectedTicket.customerName}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Customer Email\">\n              <MailOutlined /> {selectedTicket.customerEmail}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Created At\">\n              {selectedTicket.createdAt}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Updated At\">\n              {selectedTicket.updatedAt}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Last Message\" span={2}>\n              <Text ellipsis>{selectedTicket.lastMessage}</Text>\n            </Descriptions.Item>\n          </Descriptions>\n        )}\n      </Modal>\n\n      <Modal\n        title={\n          <Space>\n            <MessageOutlined />\n            <span>Chat - {selectedTicket?.ticketId}</span>\n          </Space>\n        }\n        open={chatModalVisible}\n        onCancel={() => setChatModalVisible(false)}\n        footer={null}\n        width={700}\n      >\n        {selectedTicket && (\n          <>\n            <Card size=\"small\" style={{ marginBottom: 16, background: '#f5f5f5' }}>\n              <Descriptions column={3} size=\"small\">\n                <Descriptions.Item label=\"Customer\">\n                  {selectedTicket.customerName}\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Order\">{selectedTicket.orderId}</Descriptions.Item>\n                <Descriptions.Item label=\"Platform\">\n                  {selectedTicket.platform}\n                </Descriptions.Item>\n              </Descriptions>\n            </Card>\n\n            <div\n              style={{\n                height: 300,\n                overflowY: 'auto',\n                border: '1px solid #d9d9d9',\n                borderRadius: 4,\n                padding: 16,\n                marginBottom: 16,\n              }}\n            >\n              <List\n                dataSource={messages}\n                renderItem={(msg) => (\n                  <List.Item style={{ border: 'none', padding: '8px 0' }}>\n                    <div\n                      style={{\n                        display: 'flex',\n                        flexDirection: msg.sender === 'CUSTOMER' ? 'row' : 'row-reverse',\n                        width: '100%',\n                      }}\n                    >\n                      <Avatar\n                        style={{\n                          background: msg.sender === 'CUSTOMER' ? '#1890ff' : '#52c41a',\n                        }}\n                        icon={<UserOutlined />}\n                      />\n                      <div\n                        style={{\n                          maxWidth: '70%',\n                          marginLeft: msg.sender === 'CUSTOMER' ? 12 : 0,\n                          marginRight: msg.sender === 'AGENT' ? 12 : 0,\n                        }}\n                      >\n                        <div\n                          style={{\n                            background: msg.sender === 'CUSTOMER' ? '#e6f7ff' : '#f6ffed',\n                            padding: '8px 12px',\n                            borderRadius: 8,\n                          }}\n                        >\n                          <Text type=\"secondary\" style={{ fontSize: 12 }}>\n                            {msg.senderName} - {msg.createdAt}\n                          </Text>\n                          <Paragraph style={{ margin: '4px 0 0' }}>{msg.content}</Paragraph>\n                        </div>\n                      </div>\n                    </div>\n                  </List.Item>\n                )}\n              />\n              <div ref={chatEndRef} />\n            </div>\n\n            <div style={{ marginBottom: 12 }}>\n              <Text type=\"secondary\" style={{ fontSize: 12 }}>\n                Quick Replies:\n              </Text>\n              <div style={{ marginTop: 8 }}>\n                {QUICK_REPLIES.map((reply, index) => (\n                  <Tag\n                    key={index}\n                    style={{ cursor: 'pointer', marginBottom: 4 }}\n                    onClick={() => handleQuickReply(reply)}\n                  >\n                    {reply.substring(0, 30)}...\n                  </Tag>\n                ))}\n              </div>\n            </div>\n\n            <Space.Compact style={{ width: '100%' }}>\n              <TextArea\n                value={messageInput}\n                onChange={(e) => setMessageInput(e.target.value)}\n                placeholder=\"Type your message...\"\n                autoSize={{ minRows: 1, maxRows: 3 }}\n                onPressEnter={(e) => {\n                  if (!e.shiftKey) {\n                    e.preventDefault();\n                    handleSendMessage();\n                  }\n                }}\n                style={{ borderRadius: '4px 0 0 4px' }}\n              />\n              <Button\n                type=\"primary\"\n                icon={<SendOutlined />}\n                onClick={handleSendMessage}\n                style={{ height: 'auto' }}\n              >\n                Send\n              </Button>\n            </Space.Compact>\n          </>\n        )}\n      </Modal>\n\n      <Modal\n        title=\"Create New Ticket\"\n        open={newTicketModalVisible}\n        onCancel={() => setNewTicketModalVisible(false)}\n        onOk={handleCreateTicket}\n        confirmLoading={loading}\n        width={600}\n      >\n        <Form form={form} layout=\"vertical\">\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item\n                name=\"customerId\"\n                label=\"Customer ID\"\n                rules={[{ required: true }]}\n              >\n                <Input placeholder=\"Enter customer ID\" />\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item\n                name=\"orderId\"\n                label=\"Order ID\"\n                rules={[{ required: true }]}\n              >\n                <Input placeholder=\"Enter order ID\" />\n              </Form.Item>\n            </Col>\n          </Row>\n          <Form.Item\n            name=\"subject\"\n            label=\"Subject\"\n            rules={[{ required: true }]}\n          >\n            <Input placeholder=\"Enter ticket subject\" />\n          </Form.Item>\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item\n                name=\"category\"\n                label=\"Category\"\n                rules={[{ required: true }]}\n              >\n                <Select placeholder=\"Select category\">\n                  {CATEGORIES.map((cat) => (\n                    <Option key={cat.value} value={cat.value}>\n                      {cat.label}\n                    </Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item\n                name=\"priority\"\n                label=\"Priority\"\n                rules={[{ required: true }]}\n              >\n                <Select placeholder=\"Select priority\">\n                  <Option value=\"LOW\">Low</Option>\n                  <Option value=\"MEDIUM\">Medium</Option>\n                  <Option value=\"HIGH\">High</Option>\n                  <Option value=\"URGENT\">Urgent</Option>\n                </Select>\n              </Form.Item>\n            </Col>\n          </Row>\n          <Form.Item\n            name=\"description\"\n            label=\"Description\"\n            rules={[{ required: true }]}\n          >\n            <TextArea rows={4} placeholder=\"Describe the issue...\" />\n          </Form.Item>\n        </Form>\n      </Modal>\n    </div>\n  );\n};\n\nexport default CustomerService;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/AfterSales/CustomerService.tsx"
    },
    "Compliance/ComplianceCheck": {
      "path": "Compliance/ComplianceCheck",
      "id": "Compliance/ComplianceCheck",
      "file": "Compliance/ComplianceCheck.tsx",
      "absPath": "/Compliance/ComplianceCheck",
      "__content": "import React, { useState } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  Select,\n  Descriptions,\n  Divider,\n  message,\n  Tag,\n  Row,\n  Col,\n  Statistic,\n  Progress,\n  Alert,\n  Tabs,\n  Tooltip,\n} from 'antd';\nimport {\n  SafetyCertificateOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  WarningOutlined,\n  LoadingOutlined,\n  SyncOutlined,\n  FileSearchOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\nconst { TabPane } = Tabs;\n\ninterface ComplianceResult {\n  id: string;\n  productId: string;\n  productName: string;\n  platform: string;\n  checkDate: string;\n  overallStatus: 'PASS' | 'FAIL' | 'WARNING' | 'PENDING';\n  checks: {\n    certCompliance: boolean;\n    labelCompliance: boolean;\n    descriptionCompliance: boolean;\n    imageCompliance: boolean;\n    priceCompliance: boolean;\n    policyCompliance: boolean;\n  };\n  issues: string[];\n  score: number;\n}\n\nconst PLATFORMS = [\n  { value: 'Amazon', label: 'Amazon', rules: 15 },\n  { value: 'eBay', label: 'eBay', rules: 12 },\n  { value: 'Shopify', label: 'Shopify', rules: 10 },\n  { value: 'Walmart', label: 'Walmart', rules: 14 },\n  { value: 'AliExpress', label: 'AliExpress', rules: 11 },\n];\n\nconst MOCK_PRODUCTS = [\n  { id: 'P001', name: 'Industrial Sensor A', hasCert: true },\n  { id: 'P002', name: 'Control Module B', hasCert: true },\n  { id: 'P003', name: 'Power Supply Unit C', hasCert: false },\n  { id: 'P004', name: 'Communication Gateway D', hasCert: true },\n];\n\nconst MOCK_RESULTS: ComplianceResult[] = [\n  {\n    id: '1',\n    productId: 'P001',\n    productName: 'Industrial Sensor A',\n    platform: 'Amazon',\n    checkDate: '2026-03-18 10:30:00',\n    overallStatus: 'PASS',\n    checks: {\n      certCompliance: true,\n      labelCompliance: true,\n      descriptionCompliance: true,\n      imageCompliance: true,\n      priceCompliance: true,\n      policyCompliance: true,\n    },\n    issues: [],\n    score: 100,\n  },\n  {\n    id: '2',\n    productId: 'P002',\n    productName: 'Control Module B',\n    platform: 'Amazon',\n    checkDate: '2026-03-18 09:15:00',\n    overallStatus: 'WARNING',\n    checks: {\n      certCompliance: true,\n      labelCompliance: true,\n      descriptionCompliance: false,\n      imageCompliance: true,\n      priceCompliance: true,\n      policyCompliance: false,\n    },\n    issues: [\n      'Product description missing warranty information',\n      'Contains restricted keyword in bullet points',\n    ],\n    score: 75,\n  },\n  {\n    id: '3',\n    productId: 'P003',\n    productName: 'Power Supply Unit C',\n    platform: 'eBay',\n    checkDate: '2026-03-17 16:00:00',\n    overallStatus: 'FAIL',\n    checks: {\n      certCompliance: false,\n      labelCompliance: true,\n      descriptionCompliance: false,\n      imageCompliance: false,\n      priceCompliance: true,\n      policyCompliance: true,\n    },\n    issues: [\n      'Missing required CE certification',\n      'Product images missing watermark',\n      'Description contains promotional content',\n    ],\n    score: 40,\n  },\n];\n\nexport const ComplianceCheck: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [results, setResults] = useState<ComplianceResult[]>(MOCK_RESULTS);\n  const [checkModalVisible, setCheckModalVisible] = useState(false);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [selectedResult, setSelectedResult] = useState<ComplianceResult | null>(null);\n  const [activeTab, setActiveTab] = useState('all');\n\n  const handleRunCheck = async (values: any) => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 2000));\n      \n      const product = MOCK_PRODUCTS.find(p => p.id === values.productId);\n      const hasCert = product?.hasCert || false;\n      \n      const newResult: ComplianceResult = {\n        id: `${Date.now()}`,\n        productId: values.productId,\n        productName: product?.name || '',\n        platform: values.platform,\n        checkDate: new Date().toISOString(),\n        overallStatus: hasCert ? 'PASS' : 'FAIL',\n        checks: {\n          certCompliance: hasCert,\n          labelCompliance: true,\n          descriptionCompliance: hasCert,\n          imageCompliance: true,\n          priceCompliance: true,\n          policyCompliance: hasCert,\n        },\n        issues: hasCert ? [] : ['Missing required certification'],\n        score: hasCert ? 100 : 30,\n      };\n\n      setResults([newResult, ...results]);\n      message.success('Compliance check completed');\n      setCheckModalVisible(false);\n      form.resetFields();\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleViewDetail = (result: ComplianceResult) => {\n    setSelectedResult(result);\n    setDetailModalVisible(true);\n  };\n\n  const getStatusConfig = (status: string) => {\n    const configs: Record<string, { color: string; text: string; icon: React.ReactNode }> = {\n      PASS: { color: 'success', text: 'Pass', icon: <CheckCircleOutlined /> },\n      FAIL: { color: 'error', text: 'Fail', icon: <CloseCircleOutlined /> },\n      WARNING: { color: 'warning', text: 'Warning', icon: <WarningOutlined /> },\n      PENDING: { color: 'processing', text: 'Pending', icon: <LoadingOutlined /> },\n    };\n    return configs[status];\n  };\n\n  const getFilteredResults = () => {\n    if (activeTab === 'all') return results;\n    return results.filter(r => r.overallStatus.toLowerCase() === activeTab);\n  };\n\n  const columns: ColumnsType<ComplianceResult> = [\n    {\n      title: 'Product ID',\n      dataIndex: 'productId',\n      key: 'productId',\n      width: 100,\n    },\n    {\n      title: 'Product Name',\n      dataIndex: 'productName',\n      key: 'productName',\n      width: 180,\n    },\n    {\n      title: 'Platform',\n      dataIndex: 'platform',\n      key: 'platform',\n      width: 100,\n      render: (platform: string) => <Tag>{platform}</Tag>,\n    },\n    {\n      title: 'Score',\n      dataIndex: 'score',\n      key: 'score',\n      width: 150,\n      render: (score: number, record: ComplianceResult) => (\n        <Tooltip title={`${record.overallStatus}`}>\n          <Progress \n            percent={score} \n            size=\"small\"\n            status={record.overallStatus === 'PASS' ? 'success' : record.overallStatus === 'FAIL' ? 'exception' : 'normal'}\n            strokeColor={record.overallStatus === 'PASS' ? '#52c41a' : record.overallStatus === 'FAIL' ? '#ff4d4f' : '#faad14'}\n          />\n        </Tooltip>\n      ),\n    },\n    {\n      title: 'Status',\n      dataIndex: 'overallStatus',\n      key: 'overallStatus',\n      width: 100,\n      render: (status: string) => {\n        const config = getStatusConfig(status);\n        return <Tag color={config.color} icon={config.icon}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Check Date',\n      dataIndex: 'checkDate',\n      key: 'checkDate',\n      width: 160,\n    },\n    {\n      title: 'Issues',\n      dataIndex: 'issues',\n      key: 'issues',\n      width: 100,\n      render: (issues: string[]) => issues.length > 0 ? (\n        <Tag color=\"error\">{issues.length} issues</Tag>\n      ) : (\n        <Tag color=\"success\">No issues</Tag>\n      ),\n    },\n    {\n      title: 'Actions',\n      key: 'actions',\n      width: 100,\n      render: (_, record) => (\n        <Button type=\"link\" icon={<FileSearchOutlined />} onClick={() => handleViewDetail(record)}>\n          Details\n        </Button>\n      ),\n    },\n  ];\n\n  const stats = {\n    total: results.length,\n    pass: results.filter(r => r.overallStatus === 'PASS').length,\n    warning: results.filter(r => r.overallStatus === 'WARNING').length,\n    fail: results.filter(r => r.overallStatus === 'FAIL').length,\n  };\n\n  return (\n    <div className=\"compliance-check-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic title=\"Total Checks\" value={stats.total} prefix={<SafetyCertificateOutlined />} />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic \n              title=\"Passed\" \n              value={stats.pass} \n              valueStyle={{ color: '#52c41a' }} \n              prefix={<CheckCircleOutlined />} \n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic \n              title=\"Warnings\" \n              value={stats.warning} \n              valueStyle={{ color: '#faad14' }} \n              prefix={<WarningOutlined />} \n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic \n              title=\"Failed\" \n              value={stats.fail} \n              valueStyle={{ color: '#ff4d4f' }} \n              prefix={<CloseCircleOutlined />} \n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card title=\"Compliance Check Results\" extra={\n        <Button type=\"primary\" icon={<SyncOutlined />} onClick={() => setCheckModalVisible(true)}>\n          Run New Check\n        </Button>\n      }>\n        <Tabs activeKey={activeTab} onChange={setActiveTab}>\n          <TabPane tab=\"All\" key=\"all\" />\n          <TabPane tab=\"Pass\" key=\"pass\" />\n          <TabPane tab=\"Warning\" key=\"warning\" />\n          <TabPane tab=\"Fail\" key=\"fail\" />\n        </Tabs>\n\n        <Table\n          columns={columns}\n          dataSource={getFilteredResults()}\n          rowKey=\"id\"\n          loading={loading}\n          pagination={{ pageSize: 10 }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Run Compliance Check\"\n        open={checkModalVisible}\n        onCancel={() => setCheckModalVisible(false)}\n        footer={null}\n        width={500}\n      >\n        <Form form={form} layout=\"vertical\" onFinish={handleRunCheck}>\n          <Form.Item name=\"productId\" label=\"Product\" rules={[{ required: true }]}>\n            <Select placeholder=\"Select Product\">\n              {MOCK_PRODUCTS.map(p => (\n                <Option key={p.id} value={p.id}>\n                  {p.id} - {p.name}\n                </Option>\n              ))}\n            </Select>\n          </Form.Item>\n\n          <Form.Item name=\"platform\" label=\"Platform\" rules={[{ required: true }]}>\n            <Select placeholder=\"Select Platform\">\n              {PLATFORMS.map(p => (\n                <Option key={p.value} value={p.value}>\n                  {p.label} ({p.rules} rules)\n                </Option>\n              ))}\n            </Select>\n          </Form.Item>\n\n          <Alert\n            message=\"Compliance Check Scope\"\n            description=\"The check will validate your product against platform-specific rules including certification requirements, labeling standards, description guidelines, image requirements, pricing policies, and platform policies.\"\n            type=\"info\"\n            showIcon\n            style={{ marginBottom: 16 }}\n          />\n\n          <div style={{ textAlign: 'right' }}>\n            <Button onClick={() => setCheckModalVisible(false)} style={{ marginRight: 8 }}>Cancel</Button>\n            <Button type=\"primary\" htmlType=\"submit\" loading={loading} icon={<SafetyCertificateOutlined />}>\n              Start Check\n            </Button>\n          </div>\n        </Form>\n      </Modal>\n\n      <Modal\n        title=\"Compliance Check Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>Close</Button>,\n        ]}\n        width={700}\n      >\n        {selectedResult && (\n          <>\n            <Descriptions bordered column={2} style={{ marginBottom: 24 }}>\n              <Descriptions.Item label=\"Product\">{selectedResult.productName}</Descriptions.Item>\n              <Descriptions.Item label=\"Product ID\">{selectedResult.productId}</Descriptions.Item>\n              <Descriptions.Item label=\"Platform\">\n                <Tag>{selectedResult.platform}</Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Check Date\">{selectedResult.checkDate}</Descriptions.Item>\n              <Descriptions.Item label=\"Overall Status\">\n                <Tag color={getStatusConfig(selectedResult.overallStatus).color}>\n                  {getStatusConfig(selectedResult.overallStatus).text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Compliance Score\">\n                <Progress \n                  percent={selectedResult.score} \n                  status={selectedResult.overallStatus === 'PASS' ? 'success' : 'exception'}\n                  style={{ width: 150 }}\n                />\n              </Descriptions.Item>\n            </Descriptions>\n\n            <Divider>Compliance Checks</Divider>\n\n            <Row gutter={[16, 16]}>\n              <Col span={8}>\n                <Card size=\"small\">\n                  <Statistic \n                    title=\"Certification Compliance\" \n                    value={selectedResult.checks.certCompliance ? 'PASS' : 'FAIL'} \n                    valueStyle={{ color: selectedResult.checks.certCompliance ? '#52c41a' : '#ff4d4f' }}\n                    prefix={selectedResult.checks.certCompliance ? <CheckCircleOutlined /> : <CloseCircleOutlined />}\n                  />\n                </Card>\n              </Col>\n              <Col span={8}>\n                <Card size=\"small\">\n                  <Statistic \n                    title=\"Label Compliance\" \n                    value={selectedResult.checks.labelCompliance ? 'PASS' : 'FAIL'} \n                    valueStyle={{ color: selectedResult.checks.labelCompliance ? '#52c41a' : '#ff4d4f' }}\n                    prefix={selectedResult.checks.labelCompliance ? <CheckCircleOutlined /> : <CloseCircleOutlined />}\n                  />\n                </Card>\n              </Col>\n              <Col span={8}>\n                <Card size=\"small\">\n                  <Statistic \n                    title=\"Description Compliance\" \n                    value={selectedResult.checks.descriptionCompliance ? 'PASS' : 'FAIL'} \n                    valueStyle={{ color: selectedResult.checks.descriptionCompliance ? '#52c41a' : '#ff4d4f' }}\n                    prefix={selectedResult.checks.descriptionCompliance ? <CheckCircleOutlined /> : <CloseCircleOutlined />}\n                  />\n                </Card>\n              </Col>\n              <Col span={8}>\n                <Card size=\"small\">\n                  <Statistic \n                    title=\"Image Compliance\" \n                    value={selectedResult.checks.imageCompliance ? 'PASS' : 'FAIL'} \n                    valueStyle={{ color: selectedResult.checks.imageCompliance ? '#52c41a' : '#ff4d4f' }}\n                    prefix={selectedResult.checks.imageCompliance ? <CheckCircleOutlined /> : <CloseCircleOutlined />}\n                  />\n                </Card>\n              </Col>\n              <Col span={8}>\n                <Card size=\"small\">\n                  <Statistic \n                    title=\"Price Compliance\" \n                    value={selectedResult.checks.priceCompliance ? 'PASS' : 'FAIL'} \n                    valueStyle={{ color: selectedResult.checks.priceCompliance ? '#52c41a' : '#ff4d4f' }}\n                    prefix={selectedResult.checks.priceCompliance ? <CheckCircleOutlined /> : <CloseCircleOutlined />}\n                  />\n                </Card>\n              </Col>\n              <Col span={8}>\n                <Card size=\"small\">\n                  <Statistic \n                    title=\"Policy Compliance\" \n                    value={selectedResult.checks.policyCompliance ? 'PASS' : 'FAIL'} \n                    valueStyle={{ color: selectedResult.checks.policyCompliance ? '#52c41a' : '#ff4d4f' }}\n                    prefix={selectedResult.checks.policyCompliance ? <CheckCircleOutlined /> : <CloseCircleOutlined />}\n                  />\n                </Card>\n              </Col>\n            </Row>\n\n            {selectedResult.issues.length > 0 && (\n              <>\n                <Divider>Issues Found</Divider>\n                <Alert\n                  type=\"error\"\n                  message={`${selectedResult.issues.length} Issues Detected`}\n                  description={\n                    <ul style={{ marginBottom: 0, paddingLeft: 20 }}>\n                      {selectedResult.issues.map((issue, index) => (\n                        <li key={index}>{issue}</li>\n                      ))}\n                    </ul>\n                  }\n                />\n              </>\n            )}\n          </>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default ComplianceCheck;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Compliance/ComplianceCheck.tsx"
    },
    "Product/ProductPublishForm": {
      "path": "Product/ProductPublishForm",
      "id": "Product/ProductPublishForm",
      "file": "Product/ProductPublishForm.tsx",
      "absPath": "/Product/ProductPublishForm",
      "__content": "import React, { useState } from 'react';\nimport {\n  Card,\n  Form,\n  Input,\n  Select,\n  InputNumber,\n  Button,\n  Space,\n  Row,\n  Col,\n  Divider,\n  Upload,\n  message,\n  Tabs,\n  Table,\n  Tag,\n  Modal,\n  Switch,\n  Tooltip,\n  Alert,\n} from 'antd';\nimport {\n  PlusOutlined,\n  DeleteOutlined,\n  SaveOutlined,\n  SendOutlined,\n  InfoCircleOutlined,\n  ShopOutlined,\n  DollarOutlined,\n  BoxPlotOutlined,\n} from '@ant-design/icons';\nimport type { UploadFile } from 'antd/es/upload/interface';\n\nconst { Option } = Select;\nconst { TabPane } = Tabs;\nconst { TextArea } = Input;\n\ninterface ProductVariant {\n  id: string;\n  sku: string;\n  name: string;\n  price: number;\n  stock: number;\n  attributes: Record<string, string>;\n}\n\ninterface PublishFormValues {\n  name: string;\n  platform: string[];\n  category: string;\n  brand: string;\n  description: string;\n  price: number;\n  costPrice: number;\n  currency: string;\n  stock: number;\n  sku: string;\n  status: 'DRAFT' | 'PENDING' | 'ACTIVE';\n  autoPublish: boolean;\n  complianceCheck: boolean;\n}\n\nconst PLATFORMS = [\n  { value: 'Amazon', label: 'Amazon' },\n  { value: 'eBay', label: 'eBay' },\n  { value: 'Shopify', label: 'Shopify' },\n  { value: 'Walmart', label: 'Walmart' },\n  { value: 'AliExpress', label: 'AliExpress' },\n];\n\nconst CATEGORIES = [\n  { value: 'Industrial Automation > Sensors', label: 'Industrial Automation > Sensors' },\n  { value: 'Industrial Automation > Controllers', label: 'Industrial Automation > Controllers' },\n  { value: 'Industrial Automation > Motors', label: 'Industrial Automation > Motors' },\n  { value: 'Electronics > Components', label: 'Electronics > Components' },\n  { value: 'Tools > Power Tools', label: 'Tools > Power Tools' },\n];\n\nconst CURRENCIES = [\n  { value: 'USD', label: 'USD - US Dollar' },\n  { value: 'EUR', label: 'EUR - Euro' },\n  { value: 'GBP', label: 'GBP - British Pound' },\n  { value: 'CNY', label: 'CNY - Chinese Yuan' },\n];\n\nexport const ProductPublishForm: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [variants, setVariants] = useState<ProductVariant[]>([]);\n  const [fileList, setFileList] = useState<UploadFile[]>([]);\n  const [activeTab, setActiveTab] = useState('basic');\n\n  const handleAddVariant = () => {\n    const newVariant: ProductVariant = {\n      id: `v${Date.now()}`,\n      sku: '',\n      name: '',\n      price: 0,\n      stock: 0,\n      attributes: {},\n    };\n    setVariants([...variants, newVariant]);\n  };\n\n  const handleRemoveVariant = (id: string) => {\n    setVariants(variants.filter(v => v.id !== id));\n  };\n\n  const handleVariantChange = (id: string, field: string, value: any) => {\n    setVariants(variants.map(v => \n      v.id === id ? { ...v, [field]: value } : v\n    ));\n  };\n\n  const handleSaveDraft = async () => {\n    try {\n      await form.validateFields();\n      setLoading(true);\n      await new Promise(resolve => setTimeout(resolve, 1000));\n      message.success('Draft saved successfully');\n    } catch (error) {\n      message.error('Please fill in required fields');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleSubmit = async () => {\n    try {\n      const values = await form.validateFields();\n      setLoading(true);\n      \n      if (values.complianceCheck) {\n        await new Promise(resolve => setTimeout(resolve, 500));\n        message.info('Running compliance check...');\n      }\n      \n      await new Promise(resolve => setTimeout(resolve, 1000));\n      \n      Modal.success({\n        title: 'Product Submitted',\n        content: `Product \"${values.name}\" has been submitted for ${values.autoPublish ? 'auto-publish' : 'review'} on ${values.platform.join(', ')}.`,\n      });\n    } catch (error) {\n      message.error('Please fill in required fields');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const variantColumns = [\n    {\n      title: 'SKU',\n      dataIndex: 'sku',\n      key: 'sku',\n      render: (value: string, record: ProductVariant) => (\n        <Input \n          value={value} \n          onChange={(e) => handleVariantChange(record.id, 'sku', e.target.value)}\n          placeholder=\"SKU\"\n        />\n      ),\n    },\n    {\n      title: 'Name',\n      dataIndex: 'name',\n      key: 'name',\n      render: (value: string, record: ProductVariant) => (\n        <Input \n          value={value} \n          onChange={(e) => handleVariantChange(record.id, 'name', e.target.value)}\n          placeholder=\"Variant Name\"\n        />\n      ),\n    },\n    {\n      title: 'Price',\n      dataIndex: 'price',\n      key: 'price',\n      render: (value: number, record: ProductVariant) => (\n        <InputNumber \n          value={value} \n          onChange={(v) => handleVariantChange(record.id, 'price', v)}\n          min={0}\n          precision={2}\n          style={{ width: '100%' }}\n        />\n      ),\n    },\n    {\n      title: 'Stock',\n      dataIndex: 'stock',\n      key: 'stock',\n      render: (value: number, record: ProductVariant) => (\n        <InputNumber \n          value={value} \n          onChange={(v) => handleVariantChange(record.id, 'stock', v)}\n          min={0}\n          style={{ width: '100%' }}\n        />\n      ),\n    },\n    {\n      title: 'Action',\n      key: 'action',\n      render: (_: any, record: ProductVariant) => (\n        <Button \n          type=\"text\" \n          danger \n          icon={<DeleteOutlined />} \n          onClick={() => handleRemoveVariant(record.id)}\n        />\n      ),\n    },\n  ];\n\n  return (\n    <div className=\"product-publish-form-page\">\n      <Card title=\"Product Publish Form\">\n        <Form\n          form={form}\n          layout=\"vertical\"\n          initialValues={{\n            currency: 'USD',\n            status: 'DRAFT',\n            autoPublish: false,\n            complianceCheck: true,\n          }}\n        >\n          <Tabs activeKey={activeTab} onChange={setActiveTab}>\n            <TabPane tab=\"Basic Info\" key=\"basic\">\n              <Row gutter={24}>\n                <Col span={12}>\n                  <Form.Item\n                    name=\"name\"\n                    label=\"Product Name\"\n                    rules={[{ required: true, message: 'Please enter product name' }]}\n                  >\n                    <Input placeholder=\"Enter product name\" maxLength={200} showCount />\n                  </Form.Item>\n                </Col>\n                <Col span={12}>\n                  <Form.Item\n                    name=\"platform\"\n                    label=\"Target Platforms\"\n                    rules={[{ required: true, message: 'Please select at least one platform' }]}\n                  >\n                    <Select mode=\"multiple\" placeholder=\"Select platforms\">\n                      {PLATFORMS.map(p => (\n                        <Option key={p.value} value={p.value}>{p.label}</Option>\n                      ))}\n                    </Select>\n                  </Form.Item>\n                </Col>\n              </Row>\n\n              <Row gutter={24}>\n                <Col span={12}>\n                  <Form.Item\n                    name=\"category\"\n                    label=\"Category\"\n                    rules={[{ required: true, message: 'Please select category' }]}\n                  >\n                    <Select placeholder=\"Select category\" showSearch>\n                      {CATEGORIES.map(c => (\n                        <Option key={c.value} value={c.value}>{c.label}</Option>\n                      ))}\n                    </Select>\n                  </Form.Item>\n                </Col>\n                <Col span={12}>\n                  <Form.Item name=\"brand\" label=\"Brand\">\n                    <Input placeholder=\"Enter brand name\" />\n                  </Form.Item>\n                </Col>\n              </Row>\n\n              <Form.Item\n                name=\"description\"\n                label=\"Description\"\n                rules={[{ required: true, message: 'Please enter description' }]}\n              >\n                <TextArea rows={4} placeholder=\"Enter product description\" maxLength={5000} showCount />\n              </Form.Item>\n\n              <Divider>Product Images</Divider>\n\n              <Form.Item label=\"Images\">\n                <Upload\n                  listType=\"picture-card\"\n                  fileList={fileList}\n                  onChange={({ fileList }) => setFileList(fileList)}\n                  beforeUpload={() => false}\n                  multiple\n                >\n                  {fileList.length >= 8 ? null : (\n                    <div>\n                      <PlusOutlined />\n                      <div style={{ marginTop: 8 }}>Upload</div>\n                    </div>\n                  )}\n                </Upload>\n              </Form.Item>\n            </TabPane>\n\n            <TabPane tab={<><DollarOutlined /> Pricing</>} key=\"pricing\">\n              <Alert\n                message=\"Profit Margin Validation\"\n                description=\"B2B products must maintain at least 15% profit margin. B2C products require 20% minimum.\"\n                type=\"info\"\n                showIcon\n                style={{ marginBottom: 24 }}\n              />\n\n              <Row gutter={24}>\n                <Col span={8}>\n                  <Form.Item\n                    name=\"price\"\n                    label=\"Selling Price\"\n                    rules={[{ required: true, message: 'Please enter price' }]}\n                  >\n                    <InputNumber\n                      prefix=\"$\"\n                      min={0}\n                      precision={2}\n                      style={{ width: '100%' }}\n                      placeholder=\"0.00\"\n                    />\n                  </Form.Item>\n                </Col>\n                <Col span={8}>\n                  <Form.Item\n                    name=\"costPrice\"\n                    label=\"Cost Price\"\n                    rules={[{ required: true, message: 'Please enter cost price' }]}\n                  >\n                    <InputNumber\n                      prefix=\"$\"\n                      min={0}\n                      precision={2}\n                      style={{ width: '100%' }}\n                      placeholder=\"0.00\"\n                    />\n                  </Form.Item>\n                </Col>\n                <Col span={8}>\n                  <Form.Item name=\"currency\" label=\"Currency\">\n                    <Select>\n                      {CURRENCIES.map(c => (\n                        <Option key={c.value} value={c.value}>{c.label}</Option>\n                      ))}\n                    </Select>\n                  </Form.Item>\n                </Col>\n              </Row>\n            </TabPane>\n\n            <TabPane tab={<><BoxPlotOutlined /> Inventory</>} key=\"inventory\">\n              <Row gutter={24}>\n                <Col span={12}>\n                  <Form.Item\n                    name=\"sku\"\n                    label=\"SKU\"\n                    rules={[{ required: true, message: 'Please enter SKU' }]}\n                  >\n                    <Input placeholder=\"Enter SKU\" />\n                  </Form.Item>\n                </Col>\n                <Col span={12}>\n                  <Form.Item\n                    name=\"stock\"\n                    label=\"Initial Stock\"\n                    rules={[{ required: true, message: 'Please enter stock quantity' }]}\n                  >\n                    <InputNumber min={0} style={{ width: '100%' }} placeholder=\"0\" />\n                  </Form.Item>\n                </Col>\n              </Row>\n\n              <Divider>Variants</Divider>\n\n              <div style={{ marginBottom: 16 }}>\n                <Button type=\"dashed\" icon={<PlusOutlined />} onClick={handleAddVariant}>\n                  Add Variant\n                </Button>\n              </div>\n\n              <Table\n                columns={variantColumns}\n                dataSource={variants}\n                rowKey=\"id\"\n                pagination={false}\n                size=\"small\"\n                locale={{ emptyText: 'No variants added' }}\n              />\n            </TabPane>\n\n            <TabPane tab=\"Publish Settings\" key=\"settings\">\n              <Row gutter={24}>\n                <Col span={12}>\n                  <Form.Item\n                    name=\"status\"\n                    label=\"Status\"\n                    rules={[{ required: true }]}\n                  >\n                    <Select>\n                      <Option value=\"DRAFT\">Draft</Option>\n                      <Option value=\"PENDING\">Pending Review</Option>\n                      <Option value=\"ACTIVE\">Active</Option>\n                    </Select>\n                  </Form.Item>\n                </Col>\n              </Row>\n\n              <Form.Item\n                name=\"complianceCheck\"\n                label=\"Run Compliance Check\"\n                valuePropName=\"checked\"\n              >\n                <Switch checkedChildren=\"Yes\" unCheckedChildren=\"No\" />\n              </Form.Item>\n\n              <Form.Item\n                name=\"autoPublish\"\n                label=\"Auto Publish After Compliance Check\"\n                valuePropName=\"checked\"\n                extra=\"Product will be automatically published if compliance check passes\"\n              >\n                <Switch checkedChildren=\"Yes\" unCheckedChildren=\"No\" />\n              </Form.Item>\n\n              <Alert\n                message=\"Publishing Rules\"\n                description={\n                  <ul style={{ marginBottom: 0, paddingLeft: 20 }}>\n                    <li>All products must pass compliance check before publishing</li>\n                    <li>Products with profit margin below threshold will require manual approval</li>\n                    <li>Images must meet platform-specific requirements</li>\n                  </ul>\n                }\n                type=\"warning\"\n                showIcon\n              />\n            </TabPane>\n          </Tabs>\n\n          <Divider />\n\n          <Space style={{ width: '100%', justifyContent: 'flex-end' }}>\n            <Button onClick={() => form.resetFields()}>Reset</Button>\n            <Button icon={<SaveOutlined />} onClick={handleSaveDraft} loading={loading}>\n              Save Draft\n            </Button>\n            <Button type=\"primary\" icon={<SendOutlined />} onClick={handleSubmit} loading={loading}>\n              Submit for Review\n            </Button>\n          </Space>\n        </Form>\n      </Card>\n    </div>\n  );\n};\n\nexport default ProductPublishForm;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Product/ProductPublishForm.tsx"
    },
    "Logistics/LogisticsSelect": {
      "path": "Logistics/LogisticsSelect",
      "id": "Logistics/LogisticsSelect",
      "file": "Logistics/LogisticsSelect.tsx",
      "absPath": "/Logistics/LogisticsSelect",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  Select,\n  Radio,\n  Tag,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  message,\n  Descriptions,\n  Divider,\n  Alert,\n  Badge,\n  Steps,\n} from 'antd';\nimport {\n  TruckOutlined,\n  ClockCircleOutlined,\n  DollarOutlined,\n  EnvironmentOutlined,\n  CheckCircleOutlined,\n  InfoCircleOutlined,\n  ThunderboltOutlined,\n  SafetyOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs from 'dayjs';\n\nconst { Option } = Select;\n\ntype LogisticsChannel = 'EXPRESS' | 'STANDARD' | 'ECONOMY' | 'SPECIAL';\ntype LogisticsStatus = 'AVAILABLE' | 'UNAVAILABLE' | 'LIMITED';\n\ninterface LogisticsOption {\n  id: string;\n  channel: LogisticsChannel;\n  name: string;\n  carrier: string;\n  estimatedDays: number;\n  basePrice: number;\n  pricePerKg: number;\n  minWeight: number;\n  maxWeight: number;\n  status: LogisticsStatus;\n  features: string[];\n  trackingAvailable: boolean;\n  insuranceAvailable: boolean;\n}\n\ninterface OrderInfo {\n  orderId: string;\n  destination: string;\n  country: string;\n  weight: number;\n  volume: number;\n  productType: string;\n  declaredValue: number;\n}\n\ninterface SelectedLogistics {\n  orderId: string;\n  logisticsId: string;\n  logisticsName: string;\n  carrier: string;\n  estimatedDays: number;\n  totalPrice: number;\n  selectedAt: string;\n}\n\nconst CHANNEL_COLORS: Record<LogisticsChannel, string> = {\n  EXPRESS: 'red',\n  STANDARD: 'blue',\n  ECONOMY: 'green',\n  SPECIAL: 'purple',\n};\n\nconst CHANNEL_NAMES: Record<LogisticsChannel, string> = {\n  EXPRESS: 'Express',\n  STANDARD: 'Standard',\n  ECONOMY: 'Economy',\n  SPECIAL: 'Special Line',\n};\n\nconst STATUS_COLORS: Record<LogisticsStatus, string> = {\n  AVAILABLE: 'green',\n  UNAVAILABLE: 'red',\n  LIMITED: 'orange',\n};\n\nconst MOCK_LOGISTICS_OPTIONS: LogisticsOption[] = [\n  {\n    id: 'LOG-001',\n    channel: 'EXPRESS',\n    name: 'DHL Express',\n    carrier: 'DHL',\n    estimatedDays: 3,\n    basePrice: 25.0,\n    pricePerKg: 8.5,\n    minWeight: 0.5,\n    maxWeight: 70,\n    status: 'AVAILABLE',\n    features: ['Door-to-door', 'Signature required', 'Real-time tracking'],\n    trackingAvailable: true,\n    insuranceAvailable: true,\n  },\n  {\n    id: 'LOG-002',\n    channel: 'EXPRESS',\n    name: 'FedEx International Priority',\n    carrier: 'FedEx',\n    estimatedDays: 4,\n    basePrice: 22.0,\n    pricePerKg: 7.8,\n    minWeight: 0.5,\n    maxWeight: 68,\n    status: 'AVAILABLE',\n    features: ['Door-to-door', 'Customs clearance included'],\n    trackingAvailable: true,\n    insuranceAvailable: true,\n  },\n  {\n    id: 'LOG-003',\n    channel: 'STANDARD',\n    name: 'UPS Standard',\n    carrier: 'UPS',\n    estimatedDays: 7,\n    basePrice: 15.0,\n    pricePerKg: 5.5,\n    minWeight: 1,\n    maxWeight: 70,\n    status: 'AVAILABLE',\n    features: ['Tracking available', 'Insurance optional'],\n    trackingAvailable: true,\n    insuranceAvailable: true,\n  },\n  {\n    id: 'LOG-004',\n    channel: 'ECONOMY',\n    name: 'China Post Air Mail',\n    carrier: 'China Post',\n    estimatedDays: 20,\n    basePrice: 5.0,\n    pricePerKg: 2.0,\n    minWeight: 0.1,\n    maxWeight: 30,\n    status: 'AVAILABLE',\n    features: ['Budget friendly', 'Tracking limited'],\n    trackingAvailable: false,\n    insuranceAvailable: false,\n  },\n  {\n    id: 'LOG-005',\n    channel: 'SPECIAL',\n    name: 'Special Line - US',\n    carrier: '4PX',\n    estimatedDays: 10,\n    basePrice: 12.0,\n    pricePerKg: 4.0,\n    minWeight: 0.5,\n    maxWeight: 30,\n    status: 'LIMITED',\n    features: ['US dedicated line', 'Fast customs clearance', 'Tax included'],\n    trackingAvailable: true,\n    insuranceAvailable: true,\n  },\n];\n\nconst MOCK_ORDERS: OrderInfo[] = [\n  {\n    orderId: 'ORD-2026-001',\n    destination: 'Los Angeles, CA 90001',\n    country: 'US',\n    weight: 2.5,\n    volume: 0.02,\n    productType: 'Electronics',\n    declaredValue: 150.0,\n  },\n  {\n    orderId: 'ORD-2026-002',\n    destination: 'London, UK',\n    country: 'GB',\n    weight: 1.2,\n    volume: 0.01,\n    productType: 'Clothing',\n    declaredValue: 80.0,\n  },\n];\n\nexport const LogisticsSelect: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [logisticsOptions, setLogisticsOptions] = useState<LogisticsOption[]>(MOCK_LOGISTICS_OPTIONS);\n  const [selectedOrder, setSelectedOrder] = useState<OrderInfo | null>(null);\n  const [filteredOptions, setFilteredOptions] = useState<LogisticsOption[]>([]);\n  const [selectedLogistics, setSelectedLogistics] = useState<LogisticsOption | null>(null);\n  const [confirmModalVisible, setConfirmModalVisible] = useState(false);\n  const [channelFilter, setChannelFilter] = useState<LogisticsChannel | 'all'>('all');\n  const [resultModalVisible, setResultModalVisible] = useState(false);\n  const [selectedResult, setSelectedResult] = useState<SelectedLogistics | null>(null);\n\n  useEffect(() => {\n    loadLogisticsOptions();\n  }, []);\n\n  const loadLogisticsOptions = async () => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 500));\n      setLogisticsOptions(MOCK_LOGISTICS_OPTIONS);\n    } catch (error) {\n      message.error('Failed to load logistics options');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const calculatePrice = (option: LogisticsOption, weight: number): number => {\n    if (!selectedOrder) return 0;\n    const basePrice = option.basePrice;\n    const weightPrice = Math.max(0, weight - option.minWeight) * option.pricePerKg;\n    return Number((basePrice + weightPrice).toFixed(2));\n  };\n\n  const handleOrderSelect = (order: OrderInfo) => {\n    setSelectedOrder(order);\n    const options = logisticsOptions.filter(opt => \n      opt.status !== 'UNAVAILABLE' &&\n      order.weight >= opt.minWeight &&\n      order.weight <= opt.maxWeight\n    );\n    setFilteredOptions(options);\n    setSelectedLogistics(null);\n  };\n\n  const handleLogisticsSelect = (option: LogisticsOption) => {\n    setSelectedLogistics(option);\n  };\n\n  const handleConfirmSelection = () => {\n    if (!selectedOrder || !selectedLogistics) {\n      message.warning('Please select order and logistics');\n      return;\n    }\n    setConfirmModalVisible(true);\n  };\n\n  const handleConfirm = async () => {\n    if (!selectedOrder || !selectedLogistics) return;\n\n    setLoading(true);\n    try {\n      const result: SelectedLogistics = {\n        orderId: selectedOrder.orderId,\n        logisticsId: selectedLogistics.id,\n        logisticsName: selectedLogistics.name,\n        carrier: selectedLogistics.carrier,\n        estimatedDays: selectedLogistics.estimatedDays,\n        totalPrice: calculatePrice(selectedLogistics, selectedOrder.weight),\n        selectedAt: new Date().toISOString(),\n      };\n\n      setSelectedResult(result);\n      setConfirmModalVisible(false);\n      setResultModalVisible(true);\n      message.success('Logistics selected successfully');\n    } catch (error) {\n      message.error('Failed to select logistics');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const getFilteredByChannel = () => {\n    if (channelFilter === 'all') return filteredOptions;\n    return filteredOptions.filter(opt => opt.channel === channelFilter);\n  };\n\n  const columns: ColumnsType<LogisticsOption> = [\n    {\n      title: 'Channel',\n      dataIndex: 'channel',\n      key: 'channel',\n      width: 100,\n      render: (channel: LogisticsChannel) => (\n        <Tag color={CHANNEL_COLORS[channel]}>{CHANNEL_NAMES[channel]}</Tag>\n      ),\n    },\n    {\n      title: 'Carrier',\n      dataIndex: 'name',\n      key: 'name',\n      width: 200,\n      render: (name: string, record) => (\n        <Space direction=\"vertical\" size={0}>\n          <strong>{name}</strong>\n          <span style={{ fontSize: 12, color: '#888' }}>{record.carrier}</span>\n        </Space>\n      ),\n    },\n    {\n      title: 'Est. Days',\n      dataIndex: 'estimatedDays',\n      key: 'estimatedDays',\n      width: 100,\n      render: (days: number) => (\n        <Space>\n          <ClockCircleOutlined />\n          <span>{days} days</span>\n        </Space>\n      ),\n    },\n    {\n      title: 'Price',\n      key: 'price',\n      width: 120,\n      render: (_, record) => {\n        const price = selectedOrder ? calculatePrice(record, selectedOrder.weight) : 0;\n        return (\n          <strong style={{ color: '#1890ff' }}>\n            ${price.toFixed(2)}\n          </strong>\n        );\n      },\n    },\n    {\n      title: 'Features',\n      dataIndex: 'features',\n      key: 'features',\n      width: 250,\n      render: (features: string[]) => (\n        <Space wrap size={4}>\n          {features.slice(0, 3).map((feature, index) => (\n            <Tag key={index} style={{ fontSize: 11 }}>{feature}</Tag>\n          ))}\n        </Space>\n      ),\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 100,\n      render: (status: LogisticsStatus) => (\n        <Badge \n          status={status === 'AVAILABLE' ? 'success' : status === 'LIMITED' ? 'warning' : 'error'} \n          text={status}\n        />\n      ),\n    },\n    {\n      title: 'Action',\n      key: 'action',\n      width: 80,\n      render: (_, record) => (\n        <Radio\n          checked={selectedLogistics?.id === record.id}\n          onChange={() => handleLogisticsSelect(record)}\n          disabled={record.status === 'UNAVAILABLE'}\n        />\n      ),\n    },\n  ];\n\n  return (\n    <div className=\"logistics-select-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Available Channels\"\n              value={logisticsOptions.filter(o => o.status === 'AVAILABLE').length}\n              prefix={<TruckOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Express Options\"\n              value={logisticsOptions.filter(o => o.channel === 'EXPRESS').length}\n              prefix={<ThunderboltOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"With Tracking\"\n              value={logisticsOptions.filter(o => o.trackingAvailable).length}\n              prefix={<EnvironmentOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"With Insurance\"\n              value={logisticsOptions.filter(o => o.insuranceAvailable).length}\n              prefix={<SafetyOutlined />}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card title=\"Step 1: Select Order\" style={{ marginBottom: 16 }}>\n        <Row gutter={16}>\n          {MOCK_ORDERS.map(order => (\n            <Col span={12} key={order.orderId}>\n              <Card\n                hoverable\n                onClick={() => handleOrderSelect(order)}\n                style={{\n                  border: selectedOrder?.orderId === order.orderId ? '2px solid #1890ff' : undefined,\n                }}\n              >\n                <Descriptions column={2} size=\"small\">\n                  <Descriptions.Item label=\"Order ID\">\n                    <strong>{order.orderId}</strong>\n                  </Descriptions.Item>\n                  <Descriptions.Item label=\"Country\">\n                    <Tag>{order.country}</Tag>\n                  </Descriptions.Item>\n                  <Descriptions.Item label=\"Destination\" span={2}>\n                    <EnvironmentOutlined /> {order.destination}\n                  </Descriptions.Item>\n                  <Descriptions.Item label=\"Weight\">{order.weight} kg</Descriptions.Item>\n                  <Descriptions.Item label=\"Value\">${order.declaredValue}</Descriptions.Item>\n                </Descriptions>\n              </Card>\n            </Col>\n          ))}\n        </Row>\n      </Card>\n\n      {selectedOrder && (\n        <Card \n          title=\"Step 2: Select Logistics\"\n          extra={\n            <Space>\n              <Select\n                value={channelFilter}\n                onChange={setChannelFilter}\n                style={{ width: 150 }}\n              >\n                <Option value=\"all\">All Channels</Option>\n                <Option value=\"EXPRESS\">Express</Option>\n                <Option value=\"STANDARD\">Standard</Option>\n                <Option value=\"ECONOMY\">Economy</Option>\n                <Option value=\"SPECIAL\">Special Line</Option>\n              </Select>\n              <Button \n                type=\"primary\" \n                onClick={handleConfirmSelection}\n                disabled={!selectedLogistics}\n              >\n                Confirm Selection\n              </Button>\n            </Space>\n          }\n        >\n          <Alert\n            message={`Order: ${selectedOrder.orderId} | Weight: ${selectedOrder.weight}kg | Destination: ${selectedOrder.destination}`}\n            type=\"info\"\n            showIcon\n            style={{ marginBottom: 16 }}\n          />\n\n          <Table\n            columns={columns}\n            dataSource={getFilteredByChannel()}\n            rowKey=\"id\"\n            loading={loading}\n            pagination={false}\n            scroll={{ x: 1000 }}\n            onRow={(record) => ({\n              onClick: () => record.status !== 'UNAVAILABLE' && handleLogisticsSelect(record),\n              style: { cursor: record.status === 'UNAVAILABLE' ? 'not-allowed' : 'pointer' },\n            })}\n          />\n        </Card>\n      )}\n\n      <Modal\n        title=\"Confirm Logistics Selection\"\n        open={confirmModalVisible}\n        onCancel={() => setConfirmModalVisible(false)}\n        onOk={handleConfirm}\n        confirmLoading={loading}\n        okText=\"Confirm\"\n      >\n        {selectedOrder && selectedLogistics && (\n          <div>\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"Order ID\">{selectedOrder.orderId}</Descriptions.Item>\n              <Descriptions.Item label=\"Destination\">{selectedOrder.country}</Descriptions.Item>\n              <Descriptions.Item label=\"Weight\">{selectedOrder.weight} kg</Descriptions.Item>\n              <Descriptions.Item label=\"Product\">{selectedOrder.productType}</Descriptions.Item>\n            </Descriptions>\n            <Divider />\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"Logistics\">{selectedLogistics.name}</Descriptions.Item>\n              <Descriptions.Item label=\"Carrier\">{selectedLogistics.carrier}</Descriptions.Item>\n              <Descriptions.Item label=\"Est. Delivery\">{selectedLogistics.estimatedDays} days</Descriptions.Item>\n              <Descriptions.Item label=\"Channel\">\n                <Tag color={CHANNEL_COLORS[selectedLogistics.channel]}>\n                  {CHANNEL_NAMES[selectedLogistics.channel]}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Total Price\" span={2}>\n                <strong style={{ fontSize: 18, color: '#1890ff' }}>\n                  ${calculatePrice(selectedLogistics, selectedOrder.weight).toFixed(2)}\n                </strong>\n              </Descriptions.Item>\n            </Descriptions>\n          </div>\n        )}\n      </Modal>\n\n      <Modal\n        title=\"Selection Confirmed\"\n        open={resultModalVisible}\n        onCancel={() => setResultModalVisible(false)}\n        footer={[\n          <Button key=\"close\" type=\"primary\" onClick={() => setResultModalVisible(false)}>\n            Done\n          </Button>,\n        ]}\n      >\n        {selectedResult && (\n          <div>\n            <div style={{ textAlign: 'center', marginBottom: 24 }}>\n              <CheckCircleOutlined style={{ fontSize: 48, color: '#52c41a' }} />\n              <h3 style={{ marginTop: 16 }}>Logistics Successfully Selected</h3>\n            </div>\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"Order ID\">{selectedResult.orderId}</Descriptions.Item>\n              <Descriptions.Item label=\"Logistics\">{selectedResult.logisticsName}</Descriptions.Item>\n              <Descriptions.Item label=\"Carrier\">{selectedResult.carrier}</Descriptions.Item>\n              <Descriptions.Item label=\"Est. Delivery\">{selectedResult.estimatedDays} days</Descriptions.Item>\n              <Descriptions.Item label=\"Total Price\">\n                <strong style={{ color: '#1890ff' }}>${selectedResult.totalPrice.toFixed(2)}</strong>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Selected At\">\n                {dayjs(selectedResult.selectedAt).format('YYYY-MM-DD HH:mm:ss')}\n              </Descriptions.Item>\n            </Descriptions>\n          </div>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default LogisticsSelect;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Logistics/LogisticsSelect.tsx"
    },
    "AfterSales/RefundProcess": {
      "path": "AfterSales/RefundProcess",
      "id": "AfterSales/RefundProcess",
      "file": "AfterSales/RefundProcess.tsx",
      "absPath": "/AfterSales/RefundProcess",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Tag,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  Select,\n  InputNumber,\n  Descriptions,\n  Divider,\n  message,\n  Tabs,\n  Badge,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n} from 'antd';\nimport {\n  DollarOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  ClockCircleOutlined,\n  SyncOutlined,\n  EyeOutlined,\n  AuditOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { TextArea } = Input;\nconst { Option } = Select;\nconst { TabPane } = Tabs;\n\ninterface RefundRecord {\n  id: string;\n  orderId: string;\n  refundId: string;\n  customerId: string;\n  customerName: string;\n  amount: number;\n  currency: string;\n  reason: string;\n  status: 'PENDING' | 'APPROVED' | 'REJECTED' | 'PROCESSING' | 'COMPLETED' | 'FAILED';\n  createdAt: string;\n  updatedAt: string;\n  platform: string;\n  refundMethod: string;\n  transactionId?: string;\n  processedBy?: string;\n  remark?: string;\n}\n\nconst REFUND_STATUS_MAP: Record<string, { color: string; text: string; icon: React.ReactNode }> = {\n  PENDING: { color: 'warning', text: 'Pending', icon: <ClockCircleOutlined /> },\n  APPROVED: { color: 'success', text: 'Approved', icon: <CheckCircleOutlined /> },\n  REJECTED: { color: 'error', text: 'Rejected', icon: <CloseCircleOutlined /> },\n  PROCESSING: { color: 'processing', text: 'Processing', icon: <SyncOutlined spin /> },\n  COMPLETED: { color: 'success', text: 'Completed', icon: <CheckCircleOutlined /> },\n  FAILED: { color: 'error', text: 'Failed', icon: <CloseCircleOutlined /> },\n};\n\nconst REFUND_METHODS = [\n  { value: 'ORIGINAL', label: 'Original Payment Method' },\n  { value: 'STORE_CREDIT', label: 'Store Credit' },\n  { value: 'BANK_TRANSFER', label: 'Bank Transfer' },\n  { value: 'OTHER', label: 'Other' },\n];\n\nexport const RefundProcess: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [refundRecords, setRefundRecords] = useState<RefundRecord[]>([]);\n  const [selectedRecord, setSelectedRecord] = useState<RefundRecord | null>(null);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [processModalVisible, setProcessModalVisible] = useState(false);\n  const [activeTab, setActiveTab] = useState('all');\n  const [stats, setStats] = useState({\n    total: 0,\n    pending: 0,\n    processing: 0,\n    completed: 0,\n    totalAmount: 0,\n  });\n\n  useEffect(() => {\n    fetchRefundRecords();\n  }, []);\n\n  const fetchRefundRecords = async () => {\n    setLoading(true);\n    try {\n      const mockRecords: RefundRecord[] = [\n        {\n          id: '1',\n          orderId: 'ORD-2026-001',\n          refundId: 'REF-2026-001',\n          customerId: 'CUST_001',\n          customerName: 'John Smith',\n          amount: 59.98,\n          currency: 'USD',\n          reason: 'DEFECTIVE',\n          status: 'PENDING',\n          createdAt: '2026-03-18 10:30:00',\n          updatedAt: '2026-03-18 10:30:00',\n          platform: 'Amazon',\n          refundMethod: 'ORIGINAL',\n        },\n        {\n          id: '2',\n          orderId: 'ORD-2026-002',\n          refundId: 'REF-2026-002',\n          customerId: 'CUST_002',\n          customerName: 'Emma Wilson',\n          amount: 125.50,\n          currency: 'USD',\n          reason: 'WRONG_ITEM',\n          status: 'PROCESSING',\n          createdAt: '2026-03-17 14:20:00',\n          updatedAt: '2026-03-18 09:00:00',\n          platform: 'eBay',\n          refundMethod: 'ORIGINAL',\n          transactionId: 'TXN_123456',\n        },\n        {\n          id: '3',\n          orderId: 'ORD-2026-003',\n          refundId: 'REF-2026-003',\n          customerId: 'CUST_003',\n          customerName: 'Michael Brown',\n          amount: 45.00,\n          currency: 'USD',\n          reason: 'QUALITY_ISSUE',\n          status: 'COMPLETED',\n          createdAt: '2026-03-16 09:15:00',\n          updatedAt: '2026-03-17 16:30:00',\n          platform: 'Shopify',\n          refundMethod: 'ORIGINAL',\n          transactionId: 'TXN_789012',\n          processedBy: 'admin',\n        },\n        {\n          id: '4',\n          orderId: 'ORD-2026-004',\n          refundId: 'REF-2026-004',\n          customerId: 'CUST_004',\n          customerName: 'Sarah Davis',\n          amount: 89.99,\n          currency: 'USD',\n          reason: 'NOT_AS_DESCRIBED',\n          status: 'REJECTED',\n          createdAt: '2026-03-15 11:45:00',\n          updatedAt: '2026-03-16 10:00:00',\n          platform: 'Amazon',\n          refundMethod: 'ORIGINAL',\n          processedBy: 'manager',\n          remark: 'Customer did not provide sufficient evidence',\n        },\n      ];\n\n      setRefundRecords(mockRecords);\n      calculateStats(mockRecords);\n    } catch (error) {\n      message.error('Failed to load refund records');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const calculateStats = (records: RefundRecord[]) => {\n    setStats({\n      total: records.length,\n      pending: records.filter((r) => r.status === 'PENDING').length,\n      processing: records.filter((r) => r.status === 'PROCESSING').length,\n      completed: records.filter((r) => r.status === 'COMPLETED').length,\n      totalAmount: records\n        .filter((r) => r.status === 'COMPLETED')\n        .reduce((sum, r) => sum + r.amount, 0),\n    });\n  };\n\n  const handleViewDetail = (record: RefundRecord) => {\n    setSelectedRecord(record);\n    setDetailModalVisible(true);\n  };\n\n  const handleProcess = (record: RefundRecord) => {\n    setSelectedRecord(record);\n    form.setFieldsValue({\n      refundMethod: record.refundMethod,\n      amount: record.amount,\n    });\n    setProcessModalVisible(true);\n  };\n\n  const handleApprove = async () => {\n    try {\n      const values = await form.validateFields();\n      setLoading(true);\n\n      console.log('Approving refund:', {\n        refundId: selectedRecord?.refundId,\n        ...values,\n      });\n\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      message.success('Refund approved successfully');\n      setProcessModalVisible(false);\n      fetchRefundRecords();\n    } catch (error) {\n      message.error('Failed to approve refund');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleReject = async () => {\n    try {\n      const values = await form.validateFields(['remark']);\n      setLoading(true);\n\n      console.log('Rejecting refund:', {\n        refundId: selectedRecord?.refundId,\n        remark: values.remark,\n      });\n\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      message.success('Refund rejected');\n      setProcessModalVisible(false);\n      fetchRefundRecords();\n    } catch (error) {\n      message.error('Failed to reject refund');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const getFilteredRecords = () => {\n    if (activeTab === 'all') return refundRecords;\n    return refundRecords.filter((r) => r.status === activeTab.toUpperCase());\n  };\n\n  const columns: ColumnsType<RefundRecord> = [\n    {\n      title: 'Refund ID',\n      dataIndex: 'refundId',\n      key: 'refundId',\n      width: 140,\n      render: (text: string) => (\n        <a onClick={() => handleViewDetail(refundRecords.find((r) => r.refundId === text)!)}>\n          {text}\n        </a>\n      ),\n    },\n    {\n      title: 'Order ID',\n      dataIndex: 'orderId',\n      key: 'orderId',\n      width: 140,\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 120,\n    },\n    {\n      title: 'Platform',\n      dataIndex: 'platform',\n      key: 'platform',\n      width: 100,\n      render: (platform: string) => <Tag>{platform}</Tag>,\n    },\n    {\n      title: 'Amount',\n      dataIndex: 'amount',\n      key: 'amount',\n      width: 100,\n      render: (amount: number, record: RefundRecord) => (\n        <span style={{ fontWeight: 'bold' }}>\n          {record.currency} ${amount.toFixed(2)}\n        </span>\n      ),\n    },\n    {\n      title: 'Reason',\n      dataIndex: 'reason',\n      key: 'reason',\n      width: 150,\n      render: (reason: string) => reason.replace(/_/g, ' '),\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 120,\n      render: (status: string) => {\n        const config = REFUND_STATUS_MAP[status];\n        return (\n          <Tag icon={config.icon} color={config.color}>\n            {config.text}\n          </Tag>\n        );\n      },\n    },\n    {\n      title: 'Created',\n      dataIndex: 'createdAt',\n      key: 'createdAt',\n      width: 160,\n    },\n    {\n      title: 'Actions',\n      key: 'action',\n      width: 150,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space>\n          <Tooltip title=\"View Details\">\n            <Button\n              type=\"link\"\n              icon={<EyeOutlined />}\n              onClick={() => handleViewDetail(record)}\n            />\n          </Tooltip>\n          {(record.status === 'PENDING' || record.status === 'PROCESSING') && (\n            <Tooltip title=\"Process\">\n              <Button\n                type=\"link\"\n                icon={<AuditOutlined />}\n                onClick={() => handleProcess(record)}\n              />\n            </Tooltip>\n          )}\n        </Space>\n      ),\n    },\n  ];\n\n  return (\n    <div className=\"refund-process-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Total Refunds\"\n              value={stats.total}\n              prefix={<DollarOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Pending\"\n              value={stats.pending}\n              valueStyle={{ color: '#faad14' }}\n              prefix={<ClockCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Processing\"\n              value={stats.processing}\n              valueStyle={{ color: '#1890ff' }}\n              prefix={<SyncOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Completed\"\n              value={stats.completed}\n              valueStyle={{ color: '#52c41a' }}\n              prefix={<CheckCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={8}>\n          <Card>\n            <Statistic\n              title=\"Total Refunded Amount\"\n              value={stats.totalAmount}\n              precision={2}\n              prefix=\"$\"\n              valueStyle={{ color: '#52c41a' }}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card title=\"Refund Management\">\n        <Tabs activeKey={activeTab} onChange={setActiveTab}>\n          <TabPane\n            tab={\n              <span>\n                <Badge count={stats.pending} offset={[10, 0]} size=\"small\">\n                  All\n                </Badge>\n              </span>\n            }\n            key=\"all\"\n          />\n          <TabPane\n            tab={\n              <span>\n                <Badge count={stats.pending} offset={[10, 0]} size=\"small\">\n                  Pending\n                </Badge>\n              </span>\n            }\n            key=\"pending\"\n          />\n          <TabPane tab=\"Processing\" key=\"processing\" />\n          <TabPane tab=\"Completed\" key=\"completed\" />\n          <TabPane tab=\"Rejected\" key=\"rejected\" />\n        </Tabs>\n\n        <Table\n          columns={columns}\n          dataSource={getFilteredRecords()}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1200 }}\n          pagination={{\n            showSizeChanger: true,\n            showTotal: (total) => `Total ${total} records`,\n          }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Refund Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>\n            Close\n          </Button>,\n        ]}\n        width={700}\n      >\n        {selectedRecord && (\n          <Descriptions bordered column={2}>\n            <Descriptions.Item label=\"Refund ID\" span={2}>\n              {selectedRecord.refundId}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Order ID\">{selectedRecord.orderId}</Descriptions.Item>\n            <Descriptions.Item label=\"Platform\">{selectedRecord.platform}</Descriptions.Item>\n            <Descriptions.Item label=\"Customer ID\">{selectedRecord.customerId}</Descriptions.Item>\n            <Descriptions.Item label=\"Customer Name\">\n              {selectedRecord.customerName}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Amount\" span={2}>\n              <span style={{ fontSize: 18, fontWeight: 'bold', color: '#1890ff' }}>\n                {selectedRecord.currency} ${selectedRecord.amount.toFixed(2)}\n              </span>\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Reason\">\n              {selectedRecord.reason.replace(/_/g, ' ')}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Status\">\n              <Tag color={REFUND_STATUS_MAP[selectedRecord.status].color}>\n                {REFUND_STATUS_MAP[selectedRecord.status].text}\n              </Tag>\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Refund Method\">\n              {REFUND_METHODS.find((m) => m.value === selectedRecord.refundMethod)?.label}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Transaction ID\">\n              {selectedRecord.transactionId || '-'}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Created At\">\n              {selectedRecord.createdAt}\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Updated At\">\n              {selectedRecord.updatedAt}\n            </Descriptions.Item>\n            {selectedRecord.processedBy && (\n              <Descriptions.Item label=\"Processed By\">\n                {selectedRecord.processedBy}\n              </Descriptions.Item>\n            )}\n            {selectedRecord.remark && (\n              <Descriptions.Item label=\"Remark\" span={2}>\n                {selectedRecord.remark}\n              </Descriptions.Item>\n            )}\n          </Descriptions>\n        )}\n      </Modal>\n\n      <Modal\n        title=\"Process Refund\"\n        open={processModalVisible}\n        onCancel={() => setProcessModalVisible(false)}\n        footer={null}\n        width={600}\n      >\n        {selectedRecord && (\n          <>\n            <Descriptions bordered column={2} size=\"small\" style={{ marginBottom: 24 }}>\n              <Descriptions.Item label=\"Refund ID\">\n                {selectedRecord.refundId}\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Order ID\">{selectedRecord.orderId}</Descriptions.Item>\n              <Descriptions.Item label=\"Customer\">\n                {selectedRecord.customerName}\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Amount\">\n                ${selectedRecord.amount.toFixed(2)}\n              </Descriptions.Item>\n            </Descriptions>\n\n            <Divider />\n\n            <Form form={form} layout=\"vertical\">\n              <Form.Item\n                name=\"refundMethod\"\n                label=\"Refund Method\"\n                rules={[{ required: true }]}\n              >\n                <Select>\n                  {REFUND_METHODS.map((method) => (\n                    <Option key={method.value} value={method.value}>\n                      {method.label}\n                    </Option>\n                  ))}\n                </Select>\n              </Form.Item>\n\n              <Form.Item\n                name=\"amount\"\n                label=\"Refund Amount\"\n                rules={[{ required: true }]}\n              >\n                <InputNumber\n                  prefix=\"$\"\n                  precision={2}\n                  min={0}\n                  max={selectedRecord.amount}\n                  style={{ width: '100%' }}\n                />\n              </Form.Item>\n\n              <Form.Item name=\"remark\" label=\"Remark\">\n                <TextArea rows={3} placeholder=\"Enter remark (optional)\" />\n              </Form.Item>\n\n              <div style={{ textAlign: 'right' }}>\n                <Space>\n                  <Button onClick={() => setProcessModalVisible(false)}>Cancel</Button>\n                  <Button danger onClick={handleReject} loading={loading}>\n                    Reject\n                  </Button>\n                  <Button type=\"primary\" onClick={handleApprove} loading={loading}>\n                    Approve\n                  </Button>\n                </Space>\n              </div>\n            </Form>\n          </>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default RefundProcess;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/AfterSales/RefundProcess.tsx"
    },
    "B2BTrade/EnterpriseQuote": {
      "path": "B2BTrade/EnterpriseQuote",
      "id": "B2BTrade/EnterpriseQuote",
      "file": "B2BTrade/EnterpriseQuote.tsx",
      "absPath": "/B2BTrade/EnterpriseQuote",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Form,\n  Input,\n  Select,\n  Button,\n  Table,\n  Modal,\n  Descriptions,\n  Divider,\n  message,\n  Space,\n  Tag,\n  Row,\n  Col,\n  InputNumber,\n  DatePicker,\n  Tooltip,\n  Badge,\n  Statistic,\n} from 'antd';\nimport {\n  FileTextOutlined,\n  PlusOutlined,\n  CalculatorOutlined,\n  SendOutlined,\n  HistoryOutlined,\n  UserOutlined,\n  ShoppingOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\nconst { TextArea } = Input;\nconst { RangePicker } = DatePicker;\n\ninterface Customer {\n  id: string;\n  name: string;\n  email: string;\n  company: string;\n  tier: 'BASIC' | 'PRO' | 'ENTERPRISE';\n}\n\ninterface Product {\n  id: string;\n  sku: string;\n  name: string;\n  costPrice: number;\n  suggestedPrice: number;\n  moq: number;\n  stock: number;\n}\n\ninterface QuoteItem {\n  key: string;\n  productId: string;\n  sku: string;\n  productName: string;\n  quantity: number;\n  unitPrice: number;\n  discount: number;\n  totalPrice: number;\n  note?: string;\n}\n\ninterface Quotation {\n  id: string;\n  quoteId: string;\n  customerId: string;\n  customerName: string;\n  status: 'DRAFT' | 'PENDING' | 'SENT' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED';\n  validUntil: string;\n  totalAmount: number;\n  currency: string;\n  createdAt: string;\n  items: QuoteItem[];\n}\n\nconst QUOTE_STATUS_MAP: Record<string, { color: string; text: string }> = {\n  DRAFT: { color: 'default', text: 'Draft' },\n  PENDING: { color: 'processing', text: 'Pending' },\n  SENT: { color: 'blue', text: 'Sent' },\n  ACCEPTED: { color: 'success', text: 'Accepted' },\n  REJECTED: { color: 'error', text: 'Rejected' },\n  EXPIRED: { color: 'warning', text: 'Expired' },\n};\n\nconst CUSTOMER_TIERS = [\n  { value: 'BASIC', label: 'Basic', discount: 0 },\n  { value: 'PRO', label: 'Pro', discount: 5 },\n  { value: 'ENTERPRISE', label: 'Enterprise', discount: 10 },\n];\n\nconst MIN_PROFIT_RATE = 15;\n\nexport const EnterpriseQuote: React.FC = () => {\n  const [form] = Form.useForm();\n  const [itemForm] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [quotations, setQuotations] = useState<Quotation[]>([]);\n  const [customers, setCustomers] = useState<Customer[]>([]);\n  const [products, setProducts] = useState<Product[]>([]);\n  const [selectedCustomer, setSelectedCustomer] = useState<Customer | null>(null);\n  const [quoteItems, setQuoteItems] = useState<QuoteItem[]>([]);\n  const [createModalVisible, setCreateModalVisible] = useState(false);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [selectedQuote, setSelectedQuote] = useState<Quotation | null>(null);\n  const [addProductModalVisible, setAddProductModalVisible] = useState(false);\n  const [stats, setStats] = useState({\n    total: 0,\n    pending: 0,\n    accepted: 0,\n    totalAmount: 0,\n  });\n\n  useEffect(() => {\n    fetchQuotations();\n    fetchCustomers();\n    fetchProducts();\n  }, []);\n\n  const fetchQuotations = async () => {\n    setLoading(true);\n    try {\n      const mockQuotations: Quotation[] = [\n        {\n          id: '1',\n          quoteId: 'QT-2026-001',\n          customerId: 'CUST_001',\n          customerName: 'ABC Trading Co.',\n          status: 'SENT',\n          validUntil: '2026-04-18',\n          totalAmount: 15000.00,\n          currency: 'USD',\n          createdAt: '2026-03-18 10:00:00',\n          items: [],\n        },\n        {\n          id: '2',\n          quoteId: 'QT-2026-002',\n          customerId: 'CUST_002',\n          customerName: 'XYZ Electronics Ltd.',\n          status: 'PENDING',\n          validUntil: '2026-04-15',\n          totalAmount: 28500.00,\n          currency: 'USD',\n          createdAt: '2026-03-17 14:30:00',\n          items: [],\n        },\n        {\n          id: '3',\n          quoteId: 'QT-2026-003',\n          customerId: 'CUST_003',\n          customerName: 'Global Import Inc.',\n          status: 'ACCEPTED',\n          validUntil: '2026-04-10',\n          totalAmount: 42000.00,\n          currency: 'USD',\n          createdAt: '2026-03-15 09:00:00',\n          items: [],\n        },\n      ];\n      setQuotations(mockQuotations);\n      calculateStats(mockQuotations);\n    } catch (error) {\n      message.error('Failed to load quotations');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const fetchCustomers = async () => {\n    const mockCustomers: Customer[] = [\n      { id: 'CUST_001', name: 'ABC Trading Co.', email: 'contact@abc.com', company: 'ABC Trading', tier: 'ENTERPRISE' },\n      { id: 'CUST_002', name: 'XYZ Electronics Ltd.', email: 'sales@xyz.com', company: 'XYZ Electronics', tier: 'PRO' },\n      { id: 'CUST_003', name: 'Global Import Inc.', email: 'info@global.com', company: 'Global Import', tier: 'ENTERPRISE' },\n    ];\n    setCustomers(mockCustomers);\n  };\n\n  const fetchProducts = async () => {\n    const mockProducts: Product[] = [\n      { id: 'PROD_001', sku: 'SKU-001', name: 'Wireless Headphones', costPrice: 15.00, suggestedPrice: 25.00, moq: 100, stock: 5000 },\n      { id: 'PROD_002', sku: 'SKU-002', name: 'USB-C Cable', costPrice: 2.50, suggestedPrice: 5.00, moq: 500, stock: 10000 },\n      { id: 'PROD_003', sku: 'SKU-003', name: 'Phone Case', costPrice: 3.00, suggestedPrice: 8.00, moq: 200, stock: 8000 },\n    ];\n    setProducts(mockProducts);\n  };\n\n  const calculateStats = (quotes: Quotation[]) => {\n    setStats({\n      total: quotes.length,\n      pending: quotes.filter((q) => q.status === 'PENDING' || q.status === 'SENT').length,\n      accepted: quotes.filter((q) => q.status === 'ACCEPTED').length,\n      totalAmount: quotes.filter((q) => q.status === 'ACCEPTED').reduce((sum, q) => sum + q.totalAmount, 0),\n    });\n  };\n\n  const handleCustomerChange = (customerId: string) => {\n    const customer = customers.find((c) => c.id === customerId);\n    setSelectedCustomer(customer || null);\n  };\n\n  const handleAddProduct = async () => {\n    try {\n      const values = await itemForm.validateFields();\n      const product = products.find((p) => p.id === values.productId);\n      if (!product) return;\n\n      const tierDiscount = selectedCustomer\n        ? CUSTOMER_TIERS.find((t) => t.value === selectedCustomer.tier)?.discount || 0\n        : 0;\n      const unitPrice = values.unitPrice || product.suggestedPrice;\n      const discount = values.discount || tierDiscount;\n      const totalPrice = unitPrice * values.quantity * (1 - discount / 100);\n\n      const profitRate = ((unitPrice - product.costPrice) / product.costPrice) * 100;\n      if (profitRate < MIN_PROFIT_RATE) {\n        message.warning(`Warning: Profit rate (${profitRate.toFixed(1)}%) is below minimum (${MIN_PROFIT_RATE}%)`);\n      }\n\n      const newItem: QuoteItem = {\n        key: Date.now().toString(),\n        productId: product.id,\n        sku: product.sku,\n        productName: product.name,\n        quantity: values.quantity,\n        unitPrice,\n        discount,\n        totalPrice,\n        note: values.note,\n      };\n\n      setQuoteItems([...quoteItems, newItem]);\n      setAddProductModalVisible(false);\n      itemForm.resetFields();\n      message.success('Product added to quotation');\n    } catch (error) {\n      message.error('Failed to add product');\n    }\n  };\n\n  const handleRemoveItem = (key: string) => {\n    setQuoteItems(quoteItems.filter((item) => item.key !== key));\n  };\n\n  const handleSubmitQuotation = async () => {\n    try {\n      const values = await form.validateFields();\n      if (quoteItems.length === 0) {\n        message.error('Please add at least one product');\n        return;\n      }\n\n      setLoading(true);\n      const totalAmount = quoteItems.reduce((sum, item) => sum + item.totalPrice, 0);\n\n      const quotationData = {\n        customerId: values.customerId,\n        validUntil: values.validUntil,\n        items: quoteItems,\n        totalAmount,\n        currency: 'USD',\n        note: values.note,\n      };\n\n      console.log('Submitting quotation:', quotationData);\n\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      message.success('Quotation created successfully');\n      setCreateModalVisible(false);\n      form.resetFields();\n      setQuoteItems([]);\n      setSelectedCustomer(null);\n      fetchQuotations();\n    } catch (error) {\n      message.error('Failed to create quotation');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleViewDetail = (quote: Quotation) => {\n    setSelectedQuote(quote);\n    setDetailModalVisible(true);\n  };\n\n  const handleSendQuote = async (quoteId: string) => {\n    setLoading(true);\n    try {\n      console.log('Sending quotation:', quoteId);\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Quotation sent to customer');\n      fetchQuotations();\n    } catch (error) {\n      message.error('Failed to send quotation');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const itemColumns: ColumnsType<QuoteItem> = [\n    { title: 'SKU', dataIndex: 'sku', key: 'sku', width: 100 },\n    { title: 'Product', dataIndex: 'productName', key: 'productName' },\n    { title: 'Qty', dataIndex: 'quantity', key: 'quantity', width: 80 },\n    {\n      title: 'Unit Price',\n      dataIndex: 'unitPrice',\n      key: 'unitPrice',\n      width: 100,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Discount',\n      dataIndex: 'discount',\n      key: 'discount',\n      width: 80,\n      render: (discount: number) => `${discount}%`,\n    },\n    {\n      title: 'Total',\n      dataIndex: 'totalPrice',\n      key: 'totalPrice',\n      width: 100,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Action',\n      key: 'action',\n      width: 80,\n      render: (_, record) => (\n        <Button type=\"link\" danger onClick={() => handleRemoveItem(record.key)}>\n          Remove\n        </Button>\n      ),\n    },\n  ];\n\n  const quoteColumns: ColumnsType<Quotation> = [\n    {\n      title: 'Quote ID',\n      dataIndex: 'quoteId',\n      key: 'quoteId',\n      width: 130,\n      render: (text: string, record) => (\n        <a onClick={() => handleViewDetail(record)}>{text}</a>\n      ),\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 180,\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 100,\n      render: (status: string) => {\n        const config = QUOTE_STATUS_MAP[status];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Amount',\n      dataIndex: 'totalAmount',\n      key: 'totalAmount',\n      width: 120,\n      render: (amount: number) => (\n        <span style={{ fontWeight: 'bold' }}>${amount.toFixed(2)}</span>\n      ),\n    },\n    {\n      title: 'Valid Until',\n      dataIndex: 'validUntil',\n      key: 'validUntil',\n      width: 120,\n    },\n    {\n      title: 'Created',\n      dataIndex: 'createdAt',\n      key: 'createdAt',\n      width: 160,\n    },\n    {\n      title: 'Actions',\n      key: 'action',\n      width: 180,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space>\n          <Tooltip title=\"View Details\">\n            <Button type=\"link\" icon={<FileTextOutlined />} onClick={() => handleViewDetail(record)} />\n          </Tooltip>\n          {(record.status === 'DRAFT' || record.status === 'PENDING') && (\n            <Tooltip title=\"Send to Customer\">\n              <Button type=\"link\" icon={<SendOutlined />} onClick={() => handleSendQuote(record.quoteId)} />\n            </Tooltip>\n          )}\n        </Space>\n      ),\n    },\n  ];\n\n  const totalAmount = quoteItems.reduce((sum, item) => sum + item.totalPrice, 0);\n\n  return (\n    <div className=\"enterprise-quote-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic title=\"Total Quotations\" value={stats.total} prefix={<FileTextOutlined />} />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Pending\"\n              value={stats.pending}\n              valueStyle={{ color: '#1890ff' }}\n              prefix={<HistoryOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Accepted\"\n              value={stats.accepted}\n              valueStyle={{ color: '#52c41a' }}\n              prefix={<FileTextOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Amount\"\n              value={stats.totalAmount}\n              precision={2}\n              prefix=\"$\"\n              valueStyle={{ color: '#52c41a' }}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card\n        title=\"Enterprise Quotations\"\n        extra={\n          <Button type=\"primary\" icon={<PlusOutlined />} onClick={() => setCreateModalVisible(true)}>\n            Create Quotation\n          </Button>\n        }\n      >\n        <Table\n          columns={quoteColumns}\n          dataSource={quotations}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1000 }}\n          pagination={{\n            showSizeChanger: true,\n            showTotal: (total) => `Total ${total} quotations`,\n          }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Create New Quotation\"\n        open={createModalVisible}\n        onCancel={() => {\n          setCreateModalVisible(false);\n          setQuoteItems([]);\n          setSelectedCustomer(null);\n        }}\n        onOk={handleSubmitQuotation}\n        confirmLoading={loading}\n        width={900}\n      >\n        <Form form={form} layout=\"vertical\">\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"customerId\" label=\"Customer\" rules={[{ required: true }]}>\n                <Select\n                  placeholder=\"Select customer\"\n                  showSearch\n                  optionFilterProp=\"children\"\n                  onChange={handleCustomerChange}\n                >\n                  {customers.map((c) => (\n                    <Option key={c.id} value={c.id}>\n                      {c.name} ({c.company})\n                    </Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"validUntil\" label=\"Valid Until\" rules={[{ required: true }]}>\n                <DatePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n          </Row>\n\n          {selectedCustomer && (\n            <Card size=\"small\" style={{ marginBottom: 16, background: '#f5f5f5' }}>\n              <Descriptions column={3} size=\"small\">\n                <Descriptions.Item label=\"Tier\">\n                  <Tag color={selectedCustomer.tier === 'ENTERPRISE' ? 'gold' : 'blue'}>\n                    {selectedCustomer.tier}\n                  </Tag>\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Default Discount\">\n                  {CUSTOMER_TIERS.find((t) => t.value === selectedCustomer.tier)?.discount}%\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Email\">{selectedCustomer.email}</Descriptions.Item>\n              </Descriptions>\n            </Card>\n          )}\n\n          <Divider>Products</Divider>\n\n          <div style={{ marginBottom: 16 }}>\n            <Button icon={<PlusOutlined />} onClick={() => setAddProductModalVisible(true)}>\n              Add Product\n            </Button>\n          </div>\n\n          <Table\n            columns={itemColumns}\n            dataSource={quoteItems}\n            rowKey=\"key\"\n            pagination={false}\n            size=\"small\"\n            summary={() => (\n              <Table.Summary.Row>\n                <Table.Summary.Cell index={0} colSpan={5} align=\"right\">\n                  <strong>Total:</strong>\n                </Table.Summary.Cell>\n                <Table.Summary.Cell index={1}>\n                  <strong>${totalAmount.toFixed(2)}</strong>\n                </Table.Summary.Cell>\n                <Table.Summary.Cell index={2} />\n              </Table.Summary.Row>\n            )}\n          />\n\n          <Form.Item name=\"note\" label=\"Note\" style={{ marginTop: 16 }}>\n            <TextArea rows={2} placeholder=\"Add notes (optional)\" />\n          </Form.Item>\n        </Form>\n      </Modal>\n\n      <Modal\n        title=\"Add Product\"\n        open={addProductModalVisible}\n        onCancel={() => setAddProductModalVisible(false)}\n        onOk={handleAddProduct}\n        width={600}\n      >\n        <Form form={itemForm} layout=\"vertical\">\n          <Form.Item name=\"productId\" label=\"Product\" rules={[{ required: true }]}>\n            <Select placeholder=\"Select product\" showSearch optionFilterProp=\"children\">\n              {products.map((p) => (\n                <Option key={p.id} value={p.id}>\n                  {p.sku} - {p.name} (Cost: ${p.costPrice}, Suggested: ${p.suggestedPrice}, MOQ: {p.moq})\n                </Option>\n              ))}\n            </Select>\n          </Form.Item>\n          <Row gutter={16}>\n            <Col span={8}>\n              <Form.Item name=\"quantity\" label=\"Quantity\" rules={[{ required: true }]}>\n                <InputNumber min={1} style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n            <Col span={8}>\n              <Form.Item name=\"unitPrice\" label=\"Unit Price ($)\" rules={[{ required: true }]}>\n                <InputNumber min={0} precision={2} style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n            <Col span={8}>\n              <Form.Item name=\"discount\" label=\"Discount (%)\">\n                <InputNumber min={0} max={100} style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n          </Row>\n          <Form.Item name=\"note\" label=\"Note\">\n            <Input placeholder=\"Item note (optional)\" />\n          </Form.Item>\n        </Form>\n      </Modal>\n\n      <Modal\n        title=\"Quotation Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>\n            Close\n          </Button>,\n        ]}\n        width={700}\n      >\n        {selectedQuote && (\n          <Descriptions bordered column={2}>\n            <Descriptions.Item label=\"Quote ID\">{selectedQuote.quoteId}</Descriptions.Item>\n            <Descriptions.Item label=\"Status\">\n              <Tag color={QUOTE_STATUS_MAP[selectedQuote.status].color}>\n                {QUOTE_STATUS_MAP[selectedQuote.status].text}\n              </Tag>\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Customer\">{selectedQuote.customerName}</Descriptions.Item>\n            <Descriptions.Item label=\"Currency\">{selectedQuote.currency}</Descriptions.Item>\n            <Descriptions.Item label=\"Total Amount\" span={2}>\n              <span style={{ fontSize: 18, fontWeight: 'bold', color: '#1890ff' }}>\n                ${selectedQuote.totalAmount.toFixed(2)}\n              </span>\n            </Descriptions.Item>\n            <Descriptions.Item label=\"Valid Until\">{selectedQuote.validUntil}</Descriptions.Item>\n            <Descriptions.Item label=\"Created\">{selectedQuote.createdAt}</Descriptions.Item>\n          </Descriptions>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default EnterpriseQuote;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/B2BTrade/EnterpriseQuote.tsx"
    },
    "Logistics/LogisticsTrack": {
      "path": "Logistics/LogisticsTrack",
      "id": "Logistics/LogisticsTrack",
      "file": "Logistics/LogisticsTrack.tsx",
      "absPath": "/Logistics/LogisticsTrack",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Input,\n  Tag,\n  Row,\n  Col,\n  Statistic,\n  message,\n  Timeline,\n  Descriptions,\n  Divider,\n  Empty,\n  Spin,\n  Badge,\n  Progress,\n  Alert,\n} from 'antd';\nimport {\n  EnvironmentOutlined,\n  ClockCircleOutlined,\n  CheckCircleOutlined,\n  TruckOutlined,\n  SearchOutlined,\n  SyncOutlined,\n  CloseCircleOutlined,\n  LoadingOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs from 'dayjs';\n\ntype TrackingStatus = 'PENDING' | 'IN_TRANSIT' | 'CUSTOMS' | 'OUT_FOR_DELIVERY' | 'DELIVERED' | 'EXCEPTION';\n\ninterface TrackingEvent {\n  id: string;\n  timestamp: string;\n  location: string;\n  status: string;\n  description: string;\n}\n\ninterface TrackingInfo {\n  trackingNumber: string;\n  orderId: string;\n  carrier: string;\n  logisticsName: string;\n  origin: string;\n  destination: string;\n  status: TrackingStatus;\n  estimatedDelivery: string;\n  actualDelivery?: string;\n  weight: number;\n  events: TrackingEvent[];\n  lastUpdate: string;\n}\n\ninterface TrackingRecord {\n  id: string;\n  orderId: string;\n  trackingNumber: string;\n  carrier: string;\n  status: TrackingStatus;\n  lastUpdate: string;\n}\n\nconst STATUS_COLORS: Record<TrackingStatus, string> = {\n  PENDING: 'default',\n  IN_TRANSIT: 'blue',\n  CUSTOMS: 'orange',\n  OUT_FOR_DELIVERY: 'cyan',\n  DELIVERED: 'green',\n  EXCEPTION: 'red',\n};\n\nconst STATUS_ICONS: Record<TrackingStatus, React.ReactNode> = {\n  PENDING: <ClockCircleOutlined />,\n  IN_TRANSIT: <TruckOutlined />,\n  CUSTOMS: <SyncOutlined />,\n  OUT_FOR_DELIVERY: <TruckOutlined />,\n  DELIVERED: <CheckCircleOutlined />,\n  EXCEPTION: <CloseCircleOutlined />,\n};\n\nconst STATUS_PROGRESS: Record<TrackingStatus, number> = {\n  PENDING: 10,\n  IN_TRANSIT: 40,\n  CUSTOMS: 55,\n  OUT_FOR_DELIVERY: 80,\n  DELIVERED: 100,\n  EXCEPTION: 0,\n};\n\nconst MOCK_TRACKING_RECORDS: TrackingRecord[] = [\n  {\n    id: 'TRK-001',\n    orderId: 'ORD-2026-001',\n    trackingNumber: 'DHL123456789',\n    carrier: 'DHL',\n    status: 'IN_TRANSIT',\n    lastUpdate: '2026-03-18T14:30:00Z',\n  },\n  {\n    id: 'TRK-002',\n    orderId: 'ORD-2026-002',\n    trackingNumber: 'FedEx987654321',\n    carrier: 'FedEx',\n    status: 'OUT_FOR_DELIVERY',\n    lastUpdate: '2026-03-18T16:45:00Z',\n  },\n  {\n    id: 'TRK-003',\n    orderId: 'ORD-2026-003',\n    trackingNumber: 'UPS456789123',\n    carrier: 'UPS',\n    status: 'DELIVERED',\n    lastUpdate: '2026-03-17T10:20:00Z',\n  },\n];\n\nconst MOCK_TRACKING_DETAILS: Record<string, TrackingInfo> = {\n  'DHL123456789': {\n    trackingNumber: 'DHL123456789',\n    orderId: 'ORD-2026-001',\n    carrier: 'DHL',\n    logisticsName: 'DHL Express',\n    origin: 'Shenzhen, China',\n    destination: 'Los Angeles, CA, USA',\n    status: 'IN_TRANSIT',\n    estimatedDelivery: '2026-03-21',\n    weight: 2.5,\n    lastUpdate: '2026-03-18T14:30:00Z',\n    events: [\n      {\n        id: 'EVT-001',\n        timestamp: '2026-03-18T14:30:00Z',\n        location: 'Anchorage, AK, USA',\n        status: 'IN_TRANSIT',\n        description: 'Shipment in transit to destination',\n      },\n      {\n        id: 'EVT-002',\n        timestamp: '2026-03-17T22:15:00Z',\n        location: 'Shanghai, China',\n        status: 'IN_TRANSIT',\n        description: 'Departed from facility',\n      },\n      {\n        id: 'EVT-003',\n        timestamp: '2026-03-17T08:00:00Z',\n        location: 'Shenzhen, China',\n        status: 'IN_TRANSIT',\n        description: 'Shipment picked up',\n      },\n      {\n        id: 'EVT-004',\n        timestamp: '2026-03-16T15:30:00Z',\n        location: 'Shenzhen, China',\n        status: 'PENDING',\n        description: 'Shipment information received',\n      },\n    ],\n  },\n  'FedEx987654321': {\n    trackingNumber: 'FedEx987654321',\n    orderId: 'ORD-2026-002',\n    carrier: 'FedEx',\n    logisticsName: 'FedEx International Priority',\n    origin: 'Guangzhou, China',\n    destination: 'London, UK',\n    status: 'OUT_FOR_DELIVERY',\n    estimatedDelivery: '2026-03-18',\n    weight: 1.2,\n    lastUpdate: '2026-03-18T16:45:00Z',\n    events: [\n      {\n        id: 'EVT-005',\n        timestamp: '2026-03-18T16:45:00Z',\n        location: 'London, UK',\n        status: 'OUT_FOR_DELIVERY',\n        description: 'Out for delivery',\n      },\n      {\n        id: 'EVT-006',\n        timestamp: '2026-03-18T08:00:00Z',\n        location: 'London, UK',\n        status: 'IN_TRANSIT',\n        description: 'Arrived at local facility',\n      },\n      {\n        id: 'EVT-007',\n        timestamp: '2026-03-17T12:00:00Z',\n        location: 'Paris, France',\n        status: 'IN_TRANSIT',\n        description: 'In transit',\n      },\n      {\n        id: 'EVT-008',\n        timestamp: '2026-03-16T10:00:00Z',\n        location: 'Guangzhou, China',\n        status: 'PENDING',\n        description: 'Picked up',\n      },\n    ],\n  },\n  'UPS456789123': {\n    trackingNumber: 'UPS456789123',\n    orderId: 'ORD-2026-003',\n    carrier: 'UPS',\n    logisticsName: 'UPS Standard',\n    origin: 'Shanghai, China',\n    destination: 'New York, NY, USA',\n    status: 'DELIVERED',\n    estimatedDelivery: '2026-03-17',\n    actualDelivery: '2026-03-17T10:20:00Z',\n    weight: 3.0,\n    lastUpdate: '2026-03-17T10:20:00Z',\n    events: [\n      {\n        id: 'EVT-009',\n        timestamp: '2026-03-17T10:20:00Z',\n        location: 'New York, NY, USA',\n        status: 'DELIVERED',\n        description: 'Delivered - Signed by: J. SMITH',\n      },\n      {\n        id: 'EVT-010',\n        timestamp: '2026-03-17T08:00:00Z',\n        location: 'New York, NY, USA',\n        status: 'OUT_FOR_DELIVERY',\n        description: 'Out for delivery',\n      },\n      {\n        id: 'EVT-011',\n        timestamp: '2026-03-16T14:00:00Z',\n        location: 'New York, NY, USA',\n        status: 'IN_TRANSIT',\n        description: 'Arrived at facility',\n      },\n    ],\n  },\n};\n\nexport const LogisticsTrack: React.FC = () => {\n  const [loading, setLoading] = useState(false);\n  const [trackingRecords, setTrackingRecords] = useState<TrackingRecord[]>(MOCK_TRACKING_RECORDS);\n  const [searchValue, setSearchValue] = useState('');\n  const [selectedTracking, setSelectedTracking] = useState<TrackingInfo | null>(null);\n  const [detailLoading, setDetailLoading] = useState(false);\n\n  useEffect(() => {\n    loadTrackingRecords();\n  }, []);\n\n  const loadTrackingRecords = async () => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 500));\n      setTrackingRecords(MOCK_TRACKING_RECORDS);\n    } catch (error) {\n      message.error('Failed to load tracking records');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleSearch = async () => {\n    if (!searchValue.trim()) {\n      message.warning('Please enter tracking number or order ID');\n      return;\n    }\n\n    setDetailLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 800));\n      \n      const trackingInfo = MOCK_TRACKING_DETAILS[searchValue.toUpperCase()];\n      if (trackingInfo) {\n        setSelectedTracking(trackingInfo);\n      } else {\n        message.warning('Tracking information not found');\n      }\n    } catch (error) {\n      message.error('Failed to search tracking');\n    } finally {\n      setDetailLoading(false);\n    }\n  };\n\n  const handleRowClick = async (record: TrackingRecord) => {\n    setSearchValue(record.trackingNumber);\n    setDetailLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 500));\n      const trackingInfo = MOCK_TRACKING_DETAILS[record.trackingNumber];\n      if (trackingInfo) {\n        setSelectedTracking(trackingInfo);\n      }\n    } catch (error) {\n      message.error('Failed to load tracking details');\n    } finally {\n      setDetailLoading(false);\n    }\n  };\n\n  const columns: ColumnsType<TrackingRecord> = [\n    {\n      title: 'Order ID',\n      dataIndex: 'orderId',\n      key: 'orderId',\n      width: 150,\n      render: (id: string) => <strong>{id}</strong>,\n    },\n    {\n      title: 'Tracking Number',\n      dataIndex: 'trackingNumber',\n      key: 'trackingNumber',\n      width: 180,\n      render: (number: string) => <code>{number}</code>,\n    },\n    {\n      title: 'Carrier',\n      dataIndex: 'carrier',\n      key: 'carrier',\n      width: 100,\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 150,\n      render: (status: TrackingStatus) => (\n        <Tag color={STATUS_COLORS[status]} icon={STATUS_ICONS[status]}>\n          {status.replace(/_/g, ' ')}\n        </Tag>\n      ),\n    },\n    {\n      title: 'Last Update',\n      dataIndex: 'lastUpdate',\n      key: 'lastUpdate',\n      width: 180,\n      render: (time: string) => dayjs(time).format('YYYY-MM-DD HH:mm'),\n    },\n  ];\n\n  const getTimelineColor = (status: string) => {\n    if (status === 'DELIVERED') return 'green';\n    if (status === 'EXCEPTION') return 'red';\n    return 'blue';\n  };\n\n  const inTransitCount = trackingRecords.filter(r => \n    ['IN_TRANSIT', 'CUSTOMS', 'OUT_FOR_DELIVERY'].includes(r.status)\n  ).length;\n  const deliveredCount = trackingRecords.filter(r => r.status === 'DELIVERED').length;\n  const exceptionCount = trackingRecords.filter(r => r.status === 'EXCEPTION').length;\n\n  return (\n    <div className=\"logistics-track-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Shipments\"\n              value={trackingRecords.length}\n              prefix={<TruckOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"In Transit\"\n              value={inTransitCount}\n              valueStyle={{ color: '#1890ff' }}\n              prefix={<SyncOutlined spin />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Delivered\"\n              value={deliveredCount}\n              valueStyle={{ color: '#52c41a' }}\n              prefix={<CheckCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Exceptions\"\n              value={exceptionCount}\n              valueStyle={{ color: exceptionCount > 0 ? '#ff4d4f' : '#52c41a' }}\n              prefix={<CloseCircleOutlined />}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card \n        title=\"Track Shipment\"\n        style={{ marginBottom: 16 }}\n        extra={\n          <Button icon={<SyncOutlined />} onClick={loadTrackingRecords} loading={loading}>\n            Refresh\n          </Button>\n        }\n      >\n        <Space.Compact style={{ width: '100%' }}>\n          <Input\n            placeholder=\"Enter tracking number or order ID\"\n            value={searchValue}\n            onChange={(e) => setSearchValue(e.target.value)}\n            onPressEnter={handleSearch}\n            prefix={<SearchOutlined />}\n            size=\"large\"\n          />\n          <Button type=\"primary\" size=\"large\" onClick={handleSearch} loading={detailLoading}>\n            Track\n          </Button>\n        </Space.Compact>\n      </Card>\n\n      <Row gutter={16}>\n        <Col span={10}>\n          <Card title=\"Recent Shipments\">\n            <Table\n              columns={columns}\n              dataSource={trackingRecords}\n              rowKey=\"id\"\n              loading={loading}\n              pagination={false}\n              onRow={(record) => ({\n                onClick: () => handleRowClick(record),\n                style: { cursor: 'pointer' },\n              })}\n            />\n          </Card>\n        </Col>\n        <Col span={14}>\n          <Card title=\"Tracking Details\">\n            <Spin spinning={detailLoading} indicator={<LoadingOutlined />}>\n              {selectedTracking ? (\n                <div>\n                  <Alert\n                    message={\n                      <Space>\n                        <span>Tracking: <strong>{selectedTracking.trackingNumber}</strong></span>\n                        <Tag color={STATUS_COLORS[selectedTracking.status]} icon={STATUS_ICONS[selectedTracking.status]}>\n                          {selectedTracking.status.replace(/_/g, ' ')}\n                        </Tag>\n                      </Space>\n                    }\n                    type={selectedTracking.status === 'DELIVERED' ? 'success' : \n                          selectedTracking.status === 'EXCEPTION' ? 'error' : 'info'}\n                    showIcon\n                    style={{ marginBottom: 16 }}\n                  />\n\n                  <div style={{ marginBottom: 24 }}>\n                    <Progress\n                      percent={STATUS_PROGRESS[selectedTracking.status]}\n                      status={selectedTracking.status === 'EXCEPTION' ? 'exception' : \n                              selectedTracking.status === 'DELIVERED' ? 'success' : 'active'}\n                      format={() => selectedTracking.status.replace(/_/g, ' ')}\n                    />\n                  </div>\n\n                  <Descriptions bordered column={2} size=\"small\">\n                    <Descriptions.Item label=\"Order ID\">{selectedTracking.orderId}</Descriptions.Item>\n                    <Descriptions.Item label=\"Carrier\">{selectedTracking.carrier}</Descriptions.Item>\n                    <Descriptions.Item label=\"Origin\">\n                      <EnvironmentOutlined /> {selectedTracking.origin}\n                    </Descriptions.Item>\n                    <Descriptions.Item label=\"Destination\">\n                      <EnvironmentOutlined /> {selectedTracking.destination}\n                    </Descriptions.Item>\n                    <Descriptions.Item label=\"Weight\">{selectedTracking.weight} kg</Descriptions.Item>\n                    <Descriptions.Item label=\"Est. Delivery\">\n                      {selectedTracking.estimatedDelivery}\n                    </Descriptions.Item>\n                    {selectedTracking.actualDelivery && (\n                      <Descriptions.Item label=\"Actual Delivery\" span={2}>\n                        <strong style={{ color: '#52c41a' }}>\n                          {dayjs(selectedTracking.actualDelivery).format('YYYY-MM-DD HH:mm')}\n                        </strong>\n                      </Descriptions.Item>\n                    )}\n                  </Descriptions>\n\n                  <Divider>Tracking History</Divider>\n\n                  <Timeline\n                    items={selectedTracking.events.map(event => ({\n                      color: getTimelineColor(event.status),\n                      children: (\n                        <div>\n                          <div style={{ fontWeight: 500 }}>{event.description}</div>\n                          <div style={{ fontSize: 12, color: '#888' }}>\n                            <Space split={<span>|</span>}>\n                              <span>{dayjs(event.timestamp).format('YYYY-MM-DD HH:mm')}</span>\n                              <span><EnvironmentOutlined /> {event.location}</span>\n                            </Space>\n                          </div>\n                        </div>\n                      ),\n                    }))}\n                  />\n                </div>\n              ) : (\n                <Empty description=\"Select a shipment or enter tracking number to view details\" />\n              )}\n            </Spin>\n          </Card>\n        </Col>\n      </Row>\n    </div>\n  );\n};\n\nexport default LogisticsTrack;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Logistics/LogisticsTrack.tsx"
    },
    "B2BTrade/ContractManage": {
      "path": "B2BTrade/ContractManage",
      "id": "B2BTrade/ContractManage",
      "file": "B2BTrade/ContractManage.tsx",
      "absPath": "/B2BTrade/ContractManage",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Form,\n  Input,\n  Select,\n  Button,\n  Table,\n  Modal,\n  Descriptions,\n  Divider,\n  message,\n  Space,\n  Tag,\n  Row,\n  Col,\n  DatePicker,\n  Upload,\n  Tooltip,\n  Badge,\n  Statistic,\n  Timeline,\n  Tabs,\n  Popconfirm,\n} from 'antd';\nimport {\n  FileTextOutlined,\n  PlusOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  SyncOutlined,\n  UploadOutlined,\n  DownloadOutlined,\n  EyeOutlined,\n  EditOutlined,\n  DeleteOutlined,\n  HistoryOutlined,\n  ClockCircleOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\nconst { TabPane } = Tabs;\nconst { RangePicker } = DatePicker;\nconst { TextArea } = Input;\n\ninterface Contract {\n  id: string;\n  contractId: string;\n  contractNumber: string;\n  customerId: string;\n  customerName: string;\n  title: string;\n  type: 'SALES' | 'PURCHASE' | 'SERVICE' | 'NDA' | 'OTHER';\n  status: 'DRAFT' | 'PENDING_SIGN' | 'ACTIVE' | 'EXPIRED' | 'TERMINATED';\n  startDate: string;\n  endDate: string;\n  totalValue: number;\n  currency: string;\n  signedDate?: string;\n  signedBy?: string;\n  attachments: string[];\n  createdAt: string;\n  updatedAt: string;\n}\n\ninterface ContractHistory {\n  id: string;\n  contractId: string;\n  action: string;\n  operator: string;\n  timestamp: string;\n  remark?: string;\n}\n\ninterface Customer {\n  id: string;\n  name: string;\n  company: string;\n}\n\nconst CONTRACT_STATUS_MAP: Record<string, { color: string; text: string }> = {\n  DRAFT: { color: 'default', text: 'Draft' },\n  PENDING_SIGN: { color: 'processing', text: 'Pending Signature' },\n  ACTIVE: { color: 'success', text: 'Active' },\n  EXPIRED: { color: 'warning', text: 'Expired' },\n  TERMINATED: { color: 'error', text: 'Terminated' },\n};\n\nconst CONTRACT_TYPE_MAP: Record<string, { color: string; text: string }> = {\n  SALES: { color: 'blue', text: 'Sales Contract' },\n  PURCHASE: { color: 'green', text: 'Purchase Contract' },\n  SERVICE: { color: 'orange', text: 'Service Agreement' },\n  NDA: { color: 'purple', text: 'NDA' },\n  OTHER: { color: 'default', text: 'Other' },\n};\n\nexport const ContractManage: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [contracts, setContracts] = useState<Contract[]>([]);\n  const [customers, setCustomers] = useState<Customer[]>([]);\n  const [selectedContract, setSelectedContract] = useState<Contract | null>(null);\n  const [createModalVisible, setCreateModalVisible] = useState(false);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [editModalVisible, setEditModalVisible] = useState(false);\n  const [historyModalVisible, setHistoryModalVisible] = useState(false);\n  const [contractHistory, setContractHistory] = useState<ContractHistory[]>([]);\n  const [fileList, setFileList] = useState<any[]>([]);\n  const [stats, setStats] = useState({\n    total: 0,\n    active: 0,\n    expiringSoon: 0,\n    totalValue: 0,\n  });\n\n  useEffect(() => {\n    fetchContracts();\n    fetchCustomers();\n  }, []);\n\n  const fetchContracts = async () => {\n    setLoading(true);\n    try {\n      const mockContracts: Contract[] = [\n        {\n          id: '1',\n          contractId: 'CTR-2026-001',\n          contractNumber: 'SALES-2026-001',\n          customerId: 'CUST_001',\n          customerName: 'ABC Trading Co.',\n          title: 'Annual Sales Agreement',\n          type: 'SALES',\n          status: 'ACTIVE',\n          startDate: '2026-01-01',\n          endDate: '2026-12-31',\n          totalValue: 500000.00,\n          currency: 'USD',\n          signedDate: '2025-12-15',\n          signedBy: 'John Smith',\n          attachments: ['contract.pdf'],\n          createdAt: '2025-12-01 10:00:00',\n          updatedAt: '2025-12-15 14:00:00',\n        },\n        {\n          id: '2',\n          contractId: 'CTR-2026-002',\n          contractNumber: 'NDA-2026-001',\n          customerId: 'CUST_002',\n          customerName: 'XYZ Electronics Ltd.',\n          title: 'Non-Disclosure Agreement',\n          type: 'NDA',\n          status: 'ACTIVE',\n          startDate: '2026-02-01',\n          endDate: '2028-01-31',\n          totalValue: 0,\n          currency: 'USD',\n          signedDate: '2026-01-20',\n          signedBy: 'Emma Wilson',\n          attachments: ['nda.pdf'],\n          createdAt: '2026-01-10 09:00:00',\n          updatedAt: '2026-01-20 16:00:00',\n        },\n        {\n          id: '3',\n          contractId: 'CTR-2026-003',\n          contractNumber: 'PURCHASE-2026-001',\n          customerId: 'CUST_003',\n          customerName: 'Global Import Inc.',\n          title: 'Purchase Agreement Q2',\n          type: 'PURCHASE',\n          status: 'PENDING_SIGN',\n          startDate: '2026-04-01',\n          endDate: '2026-06-30',\n          totalValue: 150000.00,\n          currency: 'USD',\n          attachments: ['purchase_agreement.pdf'],\n          createdAt: '2026-03-15 11:00:00',\n          updatedAt: '2026-03-18 10:00:00',\n        },\n        {\n          id: '4',\n          contractId: 'CTR-2025-015',\n          contractNumber: 'SALES-2025-015',\n          customerId: 'CUST_001',\n          customerName: 'ABC Trading Co.',\n          title: 'Expired Sales Contract',\n          type: 'SALES',\n          status: 'EXPIRED',\n          startDate: '2025-01-01',\n          endDate: '2025-12-31',\n          totalValue: 350000.00,\n          currency: 'USD',\n          signedDate: '2025-01-05',\n          signedBy: 'John Smith',\n          attachments: ['old_contract.pdf'],\n          createdAt: '2025-01-01 10:00:00',\n          updatedAt: '2026-01-01 00:00:00',\n        },\n      ];\n      setContracts(mockContracts);\n      calculateStats(mockContracts);\n    } catch (error) {\n      message.error('Failed to load contracts');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const fetchCustomers = async () => {\n    const mockCustomers: Customer[] = [\n      { id: 'CUST_001', name: 'ABC Trading Co.', company: 'ABC Trading' },\n      { id: 'CUST_002', name: 'XYZ Electronics Ltd.', company: 'XYZ Electronics' },\n      { id: 'CUST_003', name: 'Global Import Inc.', company: 'Global Import' },\n    ];\n    setCustomers(mockCustomers);\n  };\n\n  const calculateStats = (contractList: Contract[]) => {\n    const today = new Date();\n    const thirtyDaysLater = new Date(today.getTime() + 30 * 24 * 60 * 60 * 1000);\n\n    setStats({\n      total: contractList.length,\n      active: contractList.filter((c) => c.status === 'ACTIVE').length,\n      expiringSoon: contractList.filter((c) => {\n        if (c.status !== 'ACTIVE') return false;\n        const endDate = new Date(c.endDate);\n        return endDate <= thirtyDaysLater && endDate >= today;\n      }).length,\n      totalValue: contractList.filter((c) => c.status === 'ACTIVE').reduce((sum, c) => sum + c.totalValue, 0),\n    });\n  };\n\n  const handleViewDetail = (contract: Contract) => {\n    setSelectedContract(contract);\n    setDetailModalVisible(true);\n  };\n\n  const handleEdit = (contract: Contract) => {\n    setSelectedContract(contract);\n    form.setFieldsValue({\n      customerId: contract.customerId,\n      title: contract.title,\n      type: contract.type,\n      startDate: contract.startDate,\n      endDate: contract.endDate,\n      totalValue: contract.totalValue,\n    });\n    setEditModalVisible(true);\n  };\n\n  const handleViewHistory = (contract: Contract) => {\n    setSelectedContract(contract);\n    const mockHistory: ContractHistory[] = [\n      { id: '1', contractId: contract.contractId, action: 'Created', operator: 'System', timestamp: contract.createdAt },\n      { id: '2', contractId: contract.contractId, action: 'Status changed to Pending Signature', operator: 'Admin', timestamp: '2026-03-16 10:00:00' },\n      { id: '3', contractId: contract.contractId, action: 'Document uploaded', operator: 'Admin', timestamp: '2026-03-17 14:00:00' },\n    ];\n    setContractHistory(mockHistory);\n    setHistoryModalVisible(true);\n  };\n\n  const handleCreateContract = async () => {\n    try {\n      const values = await form.validateFields();\n      setLoading(true);\n\n      const contractData = {\n        ...values,\n        attachments: fileList.map((f) => f.name),\n      };\n\n      console.log('Creating contract:', contractData);\n\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      message.success('Contract created successfully');\n      setCreateModalVisible(false);\n      form.resetFields();\n      setFileList([]);\n      fetchContracts();\n    } catch (error) {\n      message.error('Failed to create contract');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleUpdateContract = async () => {\n    try {\n      const values = await form.validateFields();\n      setLoading(true);\n\n      console.log('Updating contract:', { contractId: selectedContract?.contractId, ...values });\n\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      message.success('Contract updated successfully');\n      setEditModalVisible(false);\n      fetchContracts();\n    } catch (error) {\n      message.error('Failed to update contract');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleDeleteContract = async (contractId: string) => {\n    setLoading(true);\n    try {\n      console.log('Deleting contract:', contractId);\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Contract deleted successfully');\n      fetchContracts();\n    } catch (error) {\n      message.error('Failed to delete contract');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleStatusChange = async (contractId: string, newStatus: string) => {\n    setLoading(true);\n    try {\n      console.log('Changing status:', { contractId, newStatus });\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Status updated successfully');\n      fetchContracts();\n    } catch (error) {\n      message.error('Failed to update status');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleDownload = (filename: string) => {\n    message.info(`Downloading ${filename}...`);\n  };\n\n  const columns: ColumnsType<Contract> = [\n    {\n      title: 'Contract ID',\n      dataIndex: 'contractId',\n      key: 'contractId',\n      width: 130,\n      render: (text: string, record) => (\n        <a onClick={() => handleViewDetail(record)}>{text}</a>\n      ),\n    },\n    {\n      title: 'Contract Number',\n      dataIndex: 'contractNumber',\n      key: 'contractNumber',\n      width: 150,\n    },\n    {\n      title: 'Title',\n      dataIndex: 'title',\n      key: 'title',\n      width: 200,\n      ellipsis: true,\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 150,\n    },\n    {\n      title: 'Type',\n      dataIndex: 'type',\n      key: 'type',\n      width: 130,\n      render: (type: string) => {\n        const config = CONTRACT_TYPE_MAP[type];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 130,\n      render: (status: string) => {\n        const config = CONTRACT_STATUS_MAP[status];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Value',\n      dataIndex: 'totalValue',\n      key: 'totalValue',\n      width: 120,\n      render: (value: number) => value > 0 ? `$${value.toLocaleString()}` : '-',\n    },\n    {\n      title: 'End Date',\n      dataIndex: 'endDate',\n      key: 'endDate',\n      width: 110,\n    },\n    {\n      title: 'Actions',\n      key: 'action',\n      width: 180,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space>\n          <Tooltip title=\"View Details\">\n            <Button type=\"link\" icon={<EyeOutlined />} onClick={() => handleViewDetail(record)} />\n          </Tooltip>\n          <Tooltip title=\"Edit\">\n            <Button type=\"link\" icon={<EditOutlined />} onClick={() => handleEdit(record)} />\n          </Tooltip>\n          <Tooltip title=\"History\">\n            <Button type=\"link\" icon={<HistoryOutlined />} onClick={() => handleViewHistory(record)} />\n          </Tooltip>\n          {record.status === 'DRAFT' && (\n            <Popconfirm\n              title=\"Delete this contract?\"\n              onConfirm={() => handleDeleteContract(record.contractId)}\n            >\n              <Button type=\"link\" danger icon={<DeleteOutlined />} />\n            </Popconfirm>\n          )}\n        </Space>\n      ),\n    },\n  ];\n\n  return (\n    <div className=\"contract-manage-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic title=\"Total Contracts\" value={stats.total} prefix={<FileTextOutlined />} />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Active\"\n              value={stats.active}\n              valueStyle={{ color: '#52c41a' }}\n              prefix={<CheckCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Expiring Soon\"\n              value={stats.expiringSoon}\n              valueStyle={{ color: '#faad14' }}\n              prefix={<ClockCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Value\"\n              value={stats.totalValue}\n              precision={0}\n              prefix=\"$\"\n              valueStyle={{ color: '#1890ff' }}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card\n        title=\"Contract Management\"\n        extra={\n          <Button type=\"primary\" icon={<PlusOutlined />} onClick={() => setCreateModalVisible(true)}>\n            New Contract\n          </Button>\n        }\n      >\n        <Tabs defaultActiveKey=\"all\">\n          <TabPane tab=\"All Contracts\" key=\"all\" />\n          <TabPane tab=\"Active\" key=\"active\" />\n          <TabPane tab=\"Pending Signature\" key=\"pending\" />\n          <TabPane tab=\"Expired\" key=\"expired\" />\n        </Tabs>\n\n        <Table\n          columns={columns}\n          dataSource={contracts}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1400 }}\n          pagination={{\n            showSizeChanger: true,\n            showTotal: (total) => `Total ${total} contracts`,\n          }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Create New Contract\"\n        open={createModalVisible}\n        onCancel={() => setCreateModalVisible(false)}\n        onOk={handleCreateContract}\n        confirmLoading={loading}\n        width={700}\n      >\n        <Form form={form} layout=\"vertical\">\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"customerId\" label=\"Customer\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select customer\" showSearch optionFilterProp=\"children\">\n                  {customers.map((c) => (\n                    <Option key={c.id} value={c.id}>\n                      {c.name} ({c.company})\n                    </Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"type\" label=\"Contract Type\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select type\">\n                  {Object.entries(CONTRACT_TYPE_MAP).map(([key, value]) => (\n                    <Option key={key} value={key}>{value.text}</Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n          </Row>\n          <Form.Item name=\"title\" label=\"Contract Title\" rules={[{ required: true }]}>\n            <Input placeholder=\"Enter contract title\" />\n          </Form.Item>\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"startDate\" label=\"Start Date\" rules={[{ required: true }]}>\n                <DatePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"endDate\" label=\"End Date\" rules={[{ required: true }]}>\n                <DatePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n          </Row>\n          <Form.Item name=\"totalValue\" label=\"Contract Value\">\n            <InputNumber\n              prefix=\"$\"\n              min={0}\n              precision={2}\n              style={{ width: '100%' }}\n              placeholder=\"Enter contract value\"\n            />\n          </Form.Item>\n          <Form.Item label=\"Attachments\">\n            <Upload\n              fileList={fileList}\n              onChange={({ fileList }) => setFileList(fileList)}\n              beforeUpload={() => false}\n            >\n              <Button icon={<UploadOutlined />}>Upload Files</Button>\n            </Upload>\n          </Form.Item>\n          <Form.Item name=\"note\" label=\"Notes\">\n            <TextArea rows={3} placeholder=\"Add notes (optional)\" />\n          </Form.Item>\n        </Form>\n      </Modal>\n\n      <Modal\n        title=\"Edit Contract\"\n        open={editModalVisible}\n        onCancel={() => setEditModalVisible(false)}\n        onOk={handleUpdateContract}\n        confirmLoading={loading}\n        width={700}\n      >\n        <Form form={form} layout=\"vertical\">\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"customerId\" label=\"Customer\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select customer\" disabled>\n                  {customers.map((c) => (\n                    <Option key={c.id} value={c.id}>\n                      {c.name} ({c.company})\n                    </Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"type\" label=\"Contract Type\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select type\">\n                  {Object.entries(CONTRACT_TYPE_MAP).map(([key, value]) => (\n                    <Option key={key} value={key}>{value.text}</Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n          </Row>\n          <Form.Item name=\"title\" label=\"Contract Title\" rules={[{ required: true }]}>\n            <Input placeholder=\"Enter contract title\" />\n          </Form.Item>\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"startDate\" label=\"Start Date\" rules={[{ required: true }]}>\n                <DatePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"endDate\" label=\"End Date\" rules={[{ required: true }]}>\n                <DatePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n          </Row>\n          <Form.Item name=\"totalValue\" label=\"Contract Value\">\n            <InputNumber\n              prefix=\"$\"\n              min={0}\n              precision={2}\n              style={{ width: '100%' }}\n              placeholder=\"Enter contract value\"\n            />\n          </Form.Item>\n        </Form>\n      </Modal>\n\n      <Modal\n        title=\"Contract Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>\n            Close\n          </Button>,\n          selectedContract?.status === 'PENDING_SIGN' && (\n            <Button key=\"activate\" type=\"primary\" onClick={() => {\n              handleStatusChange(selectedContract.contractId, 'ACTIVE');\n              setDetailModalVisible(false);\n            }}>\n              Mark as Active\n            </Button>\n          ),\n        ]}\n        width={800}\n      >\n        {selectedContract && (\n          <>\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"Contract ID\">{selectedContract.contractId}</Descriptions.Item>\n              <Descriptions.Item label=\"Contract Number\">{selectedContract.contractNumber}</Descriptions.Item>\n              <Descriptions.Item label=\"Title\" span={2}>{selectedContract.title}</Descriptions.Item>\n              <Descriptions.Item label=\"Customer\">{selectedContract.customerName}</Descriptions.Item>\n              <Descriptions.Item label=\"Type\">\n                <Tag color={CONTRACT_TYPE_MAP[selectedContract.type].color}>\n                  {CONTRACT_TYPE_MAP[selectedContract.type].text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Status\">\n                <Tag color={CONTRACT_STATUS_MAP[selectedContract.status].color}>\n                  {CONTRACT_STATUS_MAP[selectedContract.status].text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Value\">\n                {selectedContract.totalValue > 0 ? `$${selectedContract.totalValue.toLocaleString()}` : '-'}\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Start Date\">{selectedContract.startDate}</Descriptions.Item>\n              <Descriptions.Item label=\"End Date\">{selectedContract.endDate}</Descriptions.Item>\n              {selectedContract.signedDate && (\n                <Descriptions.Item label=\"Signed Date\">{selectedContract.signedDate}</Descriptions.Item>\n              )}\n              {selectedContract.signedBy && (\n                <Descriptions.Item label=\"Signed By\">{selectedContract.signedBy}</Descriptions.Item>\n              )}\n              <Descriptions.Item label=\"Created\">{selectedContract.createdAt}</Descriptions.Item>\n              <Descriptions.Item label=\"Updated\">{selectedContract.updatedAt}</Descriptions.Item>\n            </Descriptions>\n\n            {selectedContract.attachments.length > 0 && (\n              <>\n                <Divider>Attachments</Divider>\n                <Space>\n                  {selectedContract.attachments.map((file, index) => (\n                    <Button\n                      key={index}\n                      icon={<DownloadOutlined />}\n                      onClick={() => handleDownload(file)}\n                    >\n                      {file}\n                    </Button>\n                  ))}\n                </Space>\n              </>\n            )}\n          </>\n        )}\n      </Modal>\n\n      <Modal\n        title=\"Contract History\"\n        open={historyModalVisible}\n        onCancel={() => setHistoryModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setHistoryModalVisible(false)}>\n            Close\n          </Button>,\n        ]}\n        width={600}\n      >\n        <Timeline\n          items={contractHistory.map((h) => ({\n            color: 'blue',\n            children: (\n              <div>\n                <p><strong>{h.action}</strong></p>\n                <p style={{ color: '#666', margin: 0 }}>\n                  {h.operator} - {h.timestamp}\n                </p>\n                {h.remark && <p style={{ color: '#999' }}>{h.remark}</p>}\n              </div>\n            ),\n          }))}\n        />\n      </Modal>\n    </div>\n  );\n};\n\nexport default ContractManage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/B2BTrade/ContractManage.tsx"
    },
    "Orders/OrderAggregation": {
      "path": "Orders/OrderAggregation",
      "id": "Orders/OrderAggregation",
      "file": "Orders/OrderAggregation.tsx",
      "absPath": "/Orders/OrderAggregation",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Tag,\n  Button,\n  Space,\n  Modal,\n  Row,\n  Col,\n  Statistic,\n  Select,\n  DatePicker,\n  Tabs,\n  Badge,\n  message,\n  Segmented,\n} from 'antd';\nimport {\n  SyncOutlined,\n  ReloadOutlined,\n  AppstoreOutlined,\n  UnorderedListOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\nconst { RangePicker } = DatePicker;\nconst { TabPane } = Tabs;\n\ninterface AggregatedOrder {\n  id: string;\n  platformOrderId: string;\n  platform: 'AMAZON' | 'EBAY' | 'SHOPIFY' | 'SHOPEE' | 'LAZADA';\n  customerName: string;\n  totalAmount: number;\n  currency: string;\n  status: string;\n  createdAt: string;\n  shopId: string;\n  shopName: string;\n}\n\nconst PLATFORM_MAP: Record<string, { color: string; text: string }> = {\n  AMAZON: { color: 'orange', text: 'Amazon' },\n  EBAY: { color: 'blue', text: 'eBay' },\n  SHOPIFY: { color: 'green', text: 'Shopify' },\n  SHOPEE: { color: 'red', text: 'Shopee' },\n  LAZADA: { color: 'purple', text: 'Lazada' },\n};\n\nexport const OrderAggregation: React.FC = () => {\n  const [loading, setLoading] = useState(false);\n  const [orders, setOrders] = useState<AggregatedOrder[]>([]);\n  const [viewMode, setViewMode] = useState<string>('table');\n  const [selectedPlatform, setSelectedPlatform] = useState<string>('all');\n  const [stats, setStats] = useState({\n    total: 0,\n    amazon: 0,\n    ebay: 0,\n    shopify: 0,\n    shopee: 0,\n    lazada: 0,\n  });\n\n  useEffect(() => {\n    fetchAggregatedOrders();\n  }, [selectedPlatform]);\n\n  const fetchAggregatedOrders = async () => {\n    setLoading(true);\n    try {\n      const mockOrders: AggregatedOrder[] = [\n        { id: '1', platformOrderId: 'AMZ-123456', platform: 'AMAZON', customerName: 'John Smith', totalAmount: 159.99, currency: 'USD', status: 'SHIPPED', createdAt: '2026-03-18 10:30:00', shopId: 'SHOP_001', shopName: 'US Store' },\n        { id: '2', platformOrderId: 'EB-789012', platform: 'EBAY', customerName: 'Emma Wilson', totalAmount: 89.50, currency: 'USD', status: 'PENDING', createdAt: '2026-03-18 09:15:00', shopId: 'SHOP_002', shopName: 'eBay Outlet' },\n        { id: '3', platformOrderId: 'SH-345678', platform: 'SHOPIFY', customerName: 'Michael Brown', totalAmount: 245.00, currency: 'USD', status: 'PROCESSING', createdAt: '2026-03-17 16:45:00', shopId: 'SHOP_003', shopName: 'Brand Store' },\n        { id: '4', platformOrderId: 'SP-901234', platform: 'SHOPEE', customerName: 'Sarah Davis', totalAmount: 78.00, currency: 'USD', status: 'DELIVERED', createdAt: '2026-03-15 11:20:00', shopId: 'SHOP_004', shopName: 'Shopee Mall' },\n        { id: '5', platformOrderId: 'LZ-567890', platform: 'LAZADA', customerName: 'David Lee', totalAmount: 120.00, currency: 'USD', status: 'SHIPPED', createdAt: '2026-03-18 08:00:00', shopId: 'SHOP_005', shopName: 'Lazada Seller' },\n        { id: '6', platformOrderId: 'AMZ-234567', platform: 'AMAZON', customerName: 'Lisa Chen', totalAmount: 320.00, currency: 'USD', status: 'PENDING', createdAt: '2026-03-18 12:00:00', shopId: 'SHOP_001', shopName: 'US Store' },\n        { id: '7', platformOrderId: 'EB-890123', platform: 'EBAY', customerName: 'Tom Wilson', totalAmount: 55.00, currency: 'USD', status: 'DELIVERED', createdAt: '2026-03-14 15:30:00', shopId: 'SHOP_002', shopName: 'eBay Outlet' },\n        { id: '8', platformOrderId: 'SH-456789', platform: 'SHOPIFY', customerName: 'Amy Zhang', totalAmount: 199.99, currency: 'USD', status: 'SHIPPED', createdAt: '2026-03-16 14:00:00', shopId: 'SHOP_003', shopName: 'Brand Store' },\n      ];\n\n      const filtered = selectedPlatform === 'all'\n        ? mockOrders\n        : mockOrders.filter((o) => o.platform === selectedPlatform);\n\n      setOrders(filtered);\n      calculateStats(mockOrders);\n    } catch (error) {\n      message.error('Failed to load aggregated orders');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const calculateStats = (orderList: AggregatedOrder[]) => {\n    setStats({\n      total: orderList.length,\n      amazon: orderList.filter((o) => o.platform === 'AMAZON').length,\n      ebay: orderList.filter((o) => o.platform === 'EBAY').length,\n      shopify: orderList.filter((o) => o.platform === 'SHOPIFY').length,\n      shopee: orderList.filter((o) => o.platform === 'SHOPEE').length,\n      lazada: orderList.filter((o) => o.platform === 'LAZADA').length,\n    });\n  };\n\n  const columns: ColumnsType<AggregatedOrder> = [\n    {\n      title: 'Platform Order ID',\n      dataIndex: 'platformOrderId',\n      key: 'platformOrderId',\n      width: 150,\n    },\n    {\n      title: 'Platform',\n      dataIndex: 'platform',\n      key: 'platform',\n      width: 100,\n      render: (platform: string) => {\n        const config = PLATFORM_MAP[platform];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Shop',\n      dataIndex: 'shopName',\n      key: 'shopName',\n      width: 120,\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 140,\n    },\n    {\n      title: 'Amount',\n      dataIndex: 'totalAmount',\n      key: 'totalAmount',\n      width: 100,\n      render: (amount: number) => <strong>${amount.toFixed(2)}</strong>,\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 100,\n      render: (status: string) => {\n        const colorMap: Record<string, string> = {\n          PENDING: 'warning',\n          PROCESSING: 'processing',\n          SHIPPED: 'blue',\n          DELIVERED: 'success',\n        };\n        return <Tag color={colorMap[status] || 'default'}>{status}</Tag>;\n      },\n    },\n    {\n      title: 'Created',\n      dataIndex: 'createdAt',\n      key: 'createdAt',\n      width: 160,\n    },\n  ];\n\n  return (\n    <div className=\"order-aggregation-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Total Orders\"\n              value={stats.total}\n              prefix={<AppstoreOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Amazon\"\n              value={stats.amazon}\n              valueStyle={{ color: '#fa8c16' }}\n              prefix={<Badge color=\"#fa8c16\" />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"eBay\"\n              value={stats.ebay}\n              valueStyle={{ color: '#1890ff' }}\n              prefix={<Badge color=\"#1890ff\" />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Shopify\"\n              value={stats.shopify}\n              valueStyle={{ color: '#52c41a' }}\n              prefix={<Badge color=\"#52c41a\" />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Shopee\"\n              value={stats.shopee}\n              valueStyle={{ color: '#f5222d' }}\n              prefix={<Badge color=\"#f5222d\" />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Lazada\"\n              value={stats.lazada}\n              valueStyle={{ color: '#722ed1' }}\n              prefix={<Badge color=\"#722ed1\" />}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card\n        title=\"Multi-Platform Order Aggregation\"\n        extra={\n          <Space>\n            <Select\n              value={selectedPlatform}\n              onChange={setSelectedPlatform}\n              style={{ width: 120 }}\n            >\n              <Option value=\"all\">All Platforms</Option>\n              <Option value=\"AMAZON\">Amazon</Option>\n              <Option value=\"EBAY\">eBay</Option>\n              <Option value=\"SHOPIFY\">Shopify</Option>\n              <Option value=\"SHOPEE\">Shopee</Option>\n              <Option value=\"LAZADA\">Lazada</Option>\n            </Select>\n            <Button icon={<ReloadOutlined />} onClick={fetchAggregatedOrders}>\n              Refresh\n            </Button>\n          </Space>\n        }\n      >\n        <Tabs defaultActiveKey=\"table\">\n          <TabPane\n            tab={\n              <span>\n                <UnorderedListOutlined /> Table View\n              </span>\n            }\n            key=\"table\"\n          >\n            <Table\n              columns={columns}\n              dataSource={orders}\n              rowKey=\"id\"\n              loading={loading}\n              scroll={{ x: 900 }}\n              pagination={{\n                showSizeChanger: true,\n                showTotal: (total) => `Total ${total} orders`,\n              }}\n            />\n          </TabPane>\n          <TabPane\n            tab={\n              <span>\n                <AppstoreOutlined /> Platform Summary\n              </span>\n            }\n            key=\"summary\"\n          >\n            <Row gutter={[16, 16]}>\n              {Object.entries(PLATFORM_MAP).map(([key, config]) => {\n                const platformOrders = orders.filter((o) => o.platform === key);\n                const totalAmount = platformOrders.reduce((sum, o) => sum + o.totalAmount, 0);\n                return (\n                  <Col span={8} key={key}>\n                    <Card\n                      title={<Tag color={config.color}>{config.text}</Tag>}\n                      hoverable\n                      style={{ cursor: 'pointer' }}\n                      onClick={() => setSelectedPlatform(key)}\n                    >\n                      <Row>\n                        <Col span={12}>\n                          <Statistic\n                            title=\"Orders\"\n                            value={platformOrders.length}\n                          />\n                        </Col>\n                        <Col span={12}>\n                          <Statistic\n                            title=\"Revenue\"\n                            value={totalAmount}\n                            precision={2}\n                            prefix=\"$\"\n                          />\n                        </Col>\n                      </Row>\n                    </Card>\n                  </Col>\n                );\n              })}\n            </Row>\n          </TabPane>\n        </Tabs>\n      </Card>\n    </div>\n  );\n};\n\nexport default OrderAggregation;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Orders/OrderAggregation.tsx"
    },
    "AfterSales/ReturnApply": {
      "path": "AfterSales/ReturnApply",
      "id": "AfterSales/ReturnApply",
      "file": "AfterSales/ReturnApply.tsx",
      "absPath": "/AfterSales/ReturnApply",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Form,\n  Input,\n  Select,\n  Button,\n  Table,\n  Modal,\n  Steps,\n  Upload,\n  message,\n  Space,\n  Tag,\n  Descriptions,\n  Divider,\n  Row,\n  Col,\n} from 'antd';\nimport {\n  UploadOutlined,\n  ArrowLeftOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { TextArea } = Input;\nconst { Option } = Select;\n\ninterface ReturnApplyProps {\n  orderId?: string;\n  onBack?: () => void;\n}\n\ninterface OrderItem {\n  id: string;\n  skuId: string;\n  productName: string;\n  quantity: number;\n  unitPrice: number;\n  totalPrice: number;\n}\n\ninterface ReturnFormData {\n  orderId: string;\n  returnReason: string;\n  returnDescription: string;\n  returnItems: string[];\n  images: string[];\n  contactPhone: string;\n}\n\nconst RETURN_REASONS = [\n  { value: 'DEFECTIVE', label: '商品有缺陷/损坏' },\n  { value: 'WRONG_ITEM', label: '发错商品' },\n  { value: 'QUALITY_ISSUE', label: '质量问题' },\n  { value: 'NOT_AS_DESCRIBED', label: '与描述不符' },\n  { value: 'SIZE_MISMATCH', label: '尺寸不符' },\n  { value: 'OTHER', label: '其他原因' },\n];\n\nconst RETURN_STATUS_MAP: Record<string, { color: string; text: string }> = {\n  PENDING: { color: 'processing', text: '待审核' },\n  APPROVED: { color: 'success', text: '已通过' },\n  REJECTED: { color: 'error', text: '已拒绝' },\n  PROCESSING: { color: 'blue', text: '处理中' },\n  COMPLETED: { color: 'success', text: '已完成' },\n  CANCELLED: { color: 'default', text: '已取消' },\n};\n\nexport const ReturnApply: React.FC<ReturnApplyProps> = ({ orderId, onBack }) => {\n  const [form] = Form.useForm();\n  const [currentStep, setCurrentStep] = useState(0);\n  const [orderItems, setOrderItems] = useState<OrderItem[]>([]);\n  const [selectedItems, setSelectedItems] = useState<string[]>([]);\n  const [loading, setLoading] = useState(false);\n  const [submitModalVisible, setSubmitModalVisible] = useState(false);\n  const [fileList, setFileList] = useState<any[]>([]);\n\n  useEffect(() => {\n    if (orderId) {\n      fetchOrderItems(orderId);\n    }\n  }, [orderId]);\n\n  const fetchOrderItems = async (id: string) => {\n    setLoading(true);\n    try {\n      const mockItems: OrderItem[] = [\n        {\n          id: 'item_001',\n          skuId: 'SKU_001',\n          productName: 'Wireless Bluetooth Headphones',\n          quantity: 2,\n          unitPrice: 29.99,\n          totalPrice: 59.98,\n        },\n        {\n          id: 'item_002',\n          skuId: 'SKU_002',\n          productName: 'USB-C Charging Cable',\n          quantity: 5,\n          unitPrice: 4.99,\n          totalPrice: 24.95,\n        },\n      ];\n      setOrderItems(mockItems);\n    } catch (error) {\n      message.error('Failed to load order items');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleSubmit = async () => {\n    try {\n      const values = await form.validateFields();\n      setLoading(true);\n\n      const returnData: ReturnFormData = {\n        orderId: orderId || '',\n        returnReason: values.returnReason,\n        returnDescription: values.returnDescription,\n        returnItems: selectedItems,\n        images: fileList.map((f) => f.response?.url || f.name),\n        contactPhone: values.contactPhone,\n      };\n\n      console.log('Submitting return application:', returnData);\n\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      message.success('Return application submitted successfully');\n      setCurrentStep(2);\n      setSubmitModalVisible(false);\n    } catch (error) {\n      message.error('Failed to submit return application');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleItemSelect = (selectedRowKeys: React.Key[]) => {\n    setSelectedItems(selectedRowKeys as string[]);\n  };\n\n  const columns: ColumnsType<OrderItem> = [\n    {\n      title: 'SKU',\n      dataIndex: 'skuId',\n      key: 'skuId',\n      width: 120,\n    },\n    {\n      title: 'Product Name',\n      dataIndex: 'productName',\n      key: 'productName',\n    },\n    {\n      title: 'Quantity',\n      dataIndex: 'quantity',\n      key: 'quantity',\n      width: 80,\n    },\n    {\n      title: 'Unit Price',\n      dataIndex: 'unitPrice',\n      key: 'unitPrice',\n      width: 100,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Total',\n      dataIndex: 'totalPrice',\n      key: 'totalPrice',\n      width: 100,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n  ];\n\n  const rowSelection = {\n    selectedRowKeys: selectedItems,\n    onChange: handleItemSelect,\n  };\n\n  const handleUploadChange = (info: any) => {\n    setFileList(info.fileList);\n  };\n\n  const steps = [\n    { title: 'Select Items', description: 'Choose items to return' },\n    { title: 'Fill Details', description: 'Provide return reason' },\n    { title: 'Submit', description: 'Review and submit' },\n  ];\n\n  return (\n    <div className=\"return-apply-page\">\n      <Card\n        title={\n          <Space>\n            {onBack && (\n              <Button icon={<ArrowLeftOutlined />} onClick={onBack}>\n                Back\n              </Button>\n            )}\n            <span>Return Application</span>\n          </Space>\n        }\n        extra={\n          <Tag color=\"blue\">\n            Order ID: {orderId || 'ORD-2026-001'}\n          </Tag>\n        }\n      >\n        <Steps current={currentStep} items={steps} style={{ marginBottom: 24 }} />\n\n        {currentStep === 0 && (\n          <>\n            <Descriptions title=\"Order Information\" bordered column={2} style={{ marginBottom: 24 }}>\n              <Descriptions.Item label=\"Order ID\">{orderId || 'ORD-2026-001'}</Descriptions.Item>\n              <Descriptions.Item label=\"Order Date\">2026-03-15</Descriptions.Item>\n              <Descriptions.Item label=\"Platform\">Amazon</Descriptions.Item>\n              <Descriptions.Item label=\"Total Amount\">$84.93</Descriptions.Item>\n            </Descriptions>\n\n            <Divider>Select Items to Return</Divider>\n\n            <Table\n              rowSelection={rowSelection}\n              columns={columns}\n              dataSource={orderItems}\n              rowKey=\"id\"\n              loading={loading}\n              pagination={false}\n            />\n\n            <div style={{ marginTop: 24, textAlign: 'right' }}>\n              <Button\n                type=\"primary\"\n                disabled={selectedItems.length === 0}\n                onClick={() => setCurrentStep(1)}\n              >\n                Next Step\n              </Button>\n            </div>\n          </>\n        )}\n\n        {currentStep === 1 && (\n          <Form form={form} layout=\"vertical\">\n            <Row gutter={24}>\n              <Col span={12}>\n                <Form.Item\n                  name=\"returnReason\"\n                  label=\"Return Reason\"\n                  rules={[{ required: true, message: 'Please select return reason' }]}\n                >\n                  <Select placeholder=\"Select return reason\" size=\"large\">\n                    {RETURN_REASONS.map((reason) => (\n                      <Option key={reason.value} value={reason.value}>\n                        {reason.label}\n                      </Option>\n                    ))}\n                  </Select>\n                </Form.Item>\n              </Col>\n              <Col span={12}>\n                <Form.Item\n                  name=\"contactPhone\"\n                  label=\"Contact Phone\"\n                  rules={[{ required: true, message: 'Please enter contact phone' }]}\n                >\n                  <Input placeholder=\"Enter contact phone number\" size=\"large\" />\n                </Form.Item>\n              </Col>\n            </Row>\n\n            <Form.Item\n              name=\"returnDescription\"\n              label=\"Description\"\n              rules={[{ required: true, message: 'Please describe the issue' }]}\n            >\n              <TextArea\n                rows={4}\n                placeholder=\"Please describe the issue in detail...\"\n                showCount\n                maxLength={500}\n              />\n            </Form.Item>\n\n            <Form.Item label=\"Upload Images (Optional)\">\n              <Upload\n                listType=\"picture-card\"\n                fileList={fileList}\n                onChange={handleUploadChange}\n                beforeUpload={() => false}\n                maxCount={5}\n              >\n                {fileList.length < 5 && (\n                  <div>\n                    <UploadOutlined />\n                    <div style={{ marginTop: 8 }}>Upload</div>\n                  </div>\n                )}\n              </Upload>\n              <div style={{ color: '#999', fontSize: 12 }}>\n                Support JPG, PNG format, max 5 images\n              </div>\n            </Form.Item>\n\n            <div style={{ marginTop: 24, textAlign: 'right' }}>\n              <Space>\n                <Button onClick={() => setCurrentStep(0)}>Previous</Button>\n                <Button type=\"primary\" onClick={() => setSubmitModalVisible(true)}>\n                  Submit Application\n                </Button>\n              </Space>\n            </div>\n          </Form>\n        )}\n\n        {currentStep === 2 && (\n          <div style={{ textAlign: 'center', padding: '40px 0' }}>\n            <CheckCircleOutlined style={{ fontSize: 64, color: '#52c41a' }} />\n            <h2 style={{ marginTop: 24 }}>Return Application Submitted</h2>\n            <p style={{ color: '#666' }}>\n              Your return application has been submitted successfully.\n              <br />\n              We will review your application within 1-2 business days.\n            </p>\n            <Descriptions bordered column={1} style={{ maxWidth: 400, margin: '24px auto' }}>\n              <Descriptions.Item label=\"Return ID\">RTN-2026-0001</Descriptions.Item>\n              <Descriptions.Item label=\"Status\">\n                <Tag color=\"processing\">Pending Review</Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Items Count\">{selectedItems.length}</Descriptions.Item>\n            </Descriptions>\n            <Button type=\"primary\" onClick={onBack}>\n              Return to Order List\n            </Button>\n          </div>\n        )}\n      </Card>\n\n      <Modal\n        title=\"Confirm Submission\"\n        open={submitModalVisible}\n        onCancel={() => setSubmitModalVisible(false)}\n        onOk={handleSubmit}\n        confirmLoading={loading}\n      >\n        <p>Are you sure you want to submit this return application?</p>\n        <Descriptions column={1} size=\"small\">\n          <Descriptions.Item label=\"Items Selected\">{selectedItems.length}</Descriptions.Item>\n          <Descriptions.Item label=\"Reason\">\n            {form.getFieldValue('returnReason')}\n          </Descriptions.Item>\n        </Descriptions>\n      </Modal>\n    </div>\n  );\n};\n\nexport default ReturnApply;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/AfterSales/ReturnApply.tsx"
    },
    "Auth/ResetPasswordPage": {
      "path": "Auth/ResetPasswordPage",
      "id": "Auth/ResetPasswordPage",
      "file": "Auth/ResetPasswordPage.tsx",
      "absPath": "/Auth/ResetPasswordPage",
      "__content": "import React, { useState } from 'react';\nimport {\n  Card,\n  Form,\n  Input,\n  Button,\n  Steps,\n  Typography,\n  Alert,\n  message,\n  Result,\n} from 'antd';\nimport {\n  MailOutlined,\n  SafetyOutlined,\n  LockOutlined,\n  EyeInvisibleOutlined,\n  EyeTwoTone,\n  ArrowLeftOutlined,\n  ReloadOutlined,\n} from '@ant-design/icons';\n\nconst { Title, Text, Link } = Typography;\nconst { Step } = Steps;\n\ninterface ResetPasswordFormValues {\n  email: string;\n  verificationCode: string;\n  newPassword: string;\n  confirmPassword: string;\n}\n\nexport const ResetPasswordPage: React.FC = () => {\n  const [form] = Form.useForm();\n  const [currentStep, setCurrentStep] = useState(0);\n  const [loading, setLoading] = useState(false);\n  const [error, setError] = useState<string | null>(null);\n  const [emailSent, setEmailSent] = useState(false);\n  const [resetComplete, setResetComplete] = useState(false);\n\n  const steps = [\n    { title: 'Email', description: 'Enter your email' },\n    { title: 'Verify', description: 'Enter code' },\n    { title: 'Reset', description: 'New password' },\n  ];\n\n  const handleSendCode = async (values: { email: string }) => {\n    setLoading(true);\n    setError(null);\n\n    try {\n      await new Promise(resolve => setTimeout(resolve, 1500));\n      setEmailSent(true);\n      message.success('Verification code sent to your email');\n      setCurrentStep(1);\n    } catch (err) {\n      setError('Failed to send verification code. Please try again.');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleVerifyCode = async (values: { verificationCode: string }) => {\n    setLoading(true);\n    setError(null);\n\n    try {\n      await new Promise(resolve => setTimeout(resolve, 1000));\n      if (values.verificationCode.length !== 6) {\n        setError('Invalid verification code');\n        return;\n      }\n      setCurrentStep(2);\n    } catch (err) {\n      setError('Verification failed. Please try again.');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleResetPassword = async (values: ResetPasswordFormValues) => {\n    setLoading(true);\n    setError(null);\n\n    try {\n      await new Promise(resolve => setTimeout(resolve, 1500));\n      setResetComplete(true);\n      message.success('Password reset successful!');\n    } catch (err) {\n      setError('Failed to reset password. Please try again.');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  if (resetComplete) {\n    return (\n      <div style={{\n        minHeight: '100vh',\n        display: 'flex',\n        alignItems: 'center',\n        justifyContent: 'center',\n        background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',\n        padding: 24,\n      }}>\n        <Card style={{ maxWidth: 500, width: '100%', borderRadius: 16 }}>\n          <Result\n            status=\"success\"\n            title=\"Password Reset Complete!\"\n            subTitle=\"Your password has been successfully reset. You can now log in with your new password.\"\n            extra={[\n              <Button type=\"primary\" size=\"large\" href=\"/auth/login\" key=\"login\">\n                Go to Login\n              </Button>,\n            ]}\n          />\n        </Card>\n      </div>\n    );\n  }\n\n  return (\n    <div style={{\n      minHeight: '100vh',\n      display: 'flex',\n      alignItems: 'center',\n      justifyContent: 'center',\n      background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',\n      padding: 24,\n    }}>\n      <Card\n        style={{\n          maxWidth: 500,\n          width: '100%',\n          borderRadius: 16,\n          boxShadow: '0 20px 60px rgba(0,0,0,0.3)',\n        }}\n        bodyStyle={{ padding: 40 }}\n      >\n        <div style={{ textAlign: 'center', marginBottom: 32 }}>\n          <Title level={3}>Reset Password</Title>\n          <Text type=\"secondary\">Follow the steps to reset your password</Text>\n        </div>\n\n        <Steps current={currentStep} style={{ marginBottom: 32 }}>\n          {steps.map(step => (\n            <Step key={step.title} title={step.title} description={step.description} />\n          ))}\n        </Steps>\n\n        {error && (\n          <Alert\n            message={error}\n            type=\"error\"\n            showIcon\n            style={{ marginBottom: 24 }}\n            closable\n            onClose={() => setError(null)}\n          />\n        )}\n\n        {currentStep === 0 && (\n          <Form\n            form={form}\n            layout=\"vertical\"\n            onFinish={handleSendCode}\n          >\n            <Form.Item\n              name=\"email\"\n              rules={[\n                { required: true, message: 'Please enter your email' },\n                { type: 'email', message: 'Please enter a valid email' },\n              ]}\n            >\n              <Input\n                prefix={<MailOutlined style={{ color: '#bfbfbf' }} />}\n                placeholder=\"Enter your email address\"\n                size=\"large\"\n              />\n            </Form.Item>\n\n            <Form.Item>\n              <Button\n                type=\"primary\"\n                htmlType=\"submit\"\n                size=\"large\"\n                block\n                loading={loading}\n              >\n                Send Verification Code\n              </Button>\n            </Form.Item>\n\n            <div style={{ textAlign: 'center' }}>\n              <Link href=\"/auth/login\">\n                <ArrowLeftOutlined /> Back to Login\n              </Link>\n            </div>\n          </Form>\n        )}\n\n        {currentStep === 1 && (\n          <Form\n            form={form}\n            layout=\"vertical\"\n            onFinish={handleVerifyCode}\n          >\n            <Alert\n              message=\"Check your email\"\n              description={`We've sent a 6-digit verification code to ${form.getFieldValue('email')}`}\n              type=\"info\"\n              showIcon\n              style={{ marginBottom: 24 }}\n            />\n\n            <Form.Item\n              name=\"verificationCode\"\n              rules={[\n                { required: true, message: 'Please enter verification code' },\n                { len: 6, message: 'Code must be 6 digits' },\n              ]}\n            >\n              <Input\n                prefix={<SafetyOutlined style={{ color: '#bfbfbf' }} />}\n                placeholder=\"Enter 6-digit code\"\n                size=\"large\"\n                maxLength={6}\n              />\n            </Form.Item>\n\n            <Form.Item>\n              <Button\n                type=\"primary\"\n                htmlType=\"submit\"\n                size=\"large\"\n                block\n                loading={loading}\n              >\n                Verify Code\n              </Button>\n            </Form.Item>\n\n            <div style={{ textAlign: 'center' }}>\n              <Button type=\"link\" onClick={() => setCurrentStep(0)} icon={<ReloadOutlined />}>\n                Resend Code\n              </Button>\n            </div>\n          </Form>\n        )}\n\n        {currentStep === 2 && (\n          <Form\n            form={form}\n            layout=\"vertical\"\n            onFinish={handleResetPassword}\n          >\n            <Form.Item\n              name=\"newPassword\"\n              rules={[\n                { required: true, message: 'Please enter new password' },\n                { min: 8, message: 'Password must be at least 8 characters' },\n                { pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)/, message: 'Must contain uppercase, lowercase and number' },\n              ]}\n            >\n              <Input.Password\n                prefix={<LockOutlined style={{ color: '#bfbfbf' }} />}\n                placeholder=\"New Password\"\n                size=\"large\"\n                iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}\n              />\n            </Form.Item>\n\n            <Form.Item\n              name=\"confirmPassword\"\n              dependencies={['newPassword']}\n              rules={[\n                { required: true, message: 'Please confirm new password' },\n                ({ getFieldValue }) => ({\n                  validator(_, value) {\n                    if (!value || getFieldValue('newPassword') === value) {\n                      return Promise.resolve();\n                    }\n                    return Promise.reject(new Error('Passwords do not match'));\n                  },\n                }),\n              ]}\n            >\n              <Input.Password\n                prefix={<LockOutlined style={{ color: '#bfbfbf' }} />}\n                placeholder=\"Confirm New Password\"\n                size=\"large\"\n                iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}\n              />\n            </Form.Item>\n\n            <Form.Item>\n              <Button\n                type=\"primary\"\n                htmlType=\"submit\"\n                size=\"large\"\n                block\n                loading={loading}\n              >\n                Reset Password\n              </Button>\n            </Form.Item>\n          </Form>\n        )}\n      </Card>\n    </div>\n  );\n};\n\nexport default ResetPasswordPage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Auth/ResetPasswordPage.tsx"
    },
    "Product/MaterialUpload": {
      "path": "Product/MaterialUpload",
      "id": "Product/MaterialUpload",
      "file": "Product/MaterialUpload.tsx",
      "absPath": "/Product/MaterialUpload",
      "__content": "import React, { useState } from 'react';\nimport {\n  Card,\n  Upload,\n  Button,\n  message,\n  Table,\n  Tag,\n  Space,\n  Modal,\n  Image,\n  Progress,\n  Divider,\n  Row,\n  Col,\n  Input,\n  Select,\n  Tooltip,\n  Alert,\n  Tabs,\n} from 'antd';\nimport {\n  UploadOutlined,\n  DeleteOutlined,\n  EyeOutlined,\n  CopyOutlined,\n  FolderOutlined,\n  FileImageOutlined,\n  FileOutlined,\n  VideoCameraOutlined,\n  ReloadOutlined,\n  SearchOutlined,\n  FilterOutlined,\n} from '@ant-design/icons';\nimport type { UploadFile } from 'antd/es/upload/interface';\n\nconst { Option } = Select;\nconst { TabPane } = Tabs;\n\ninterface MaterialFile {\n  id: string;\n  name: string;\n  type: 'image' | 'video' | 'document';\n  size: number;\n  url: string;\n  thumbnail?: string;\n  uploadedAt: string;\n  uploadedBy: string;\n  status: 'READY' | 'PROCESSING' | 'FAILED';\n  tags: string[];\n  productId?: string;\n  productName?: string;\n}\n\nconst MOCK_MATERIALS: MaterialFile[] = [\n  {\n    id: '1',\n    name: 'product_main_001.jpg',\n    type: 'image',\n    size: 2456789,\n    url: 'https://via.placeholder.com/800x800?text=Product+1',\n    thumbnail: 'https://via.placeholder.com/100x100?text=1',\n    uploadedAt: '2026-03-18 10:30:00',\n    uploadedBy: 'Admin',\n    status: 'READY',\n    tags: ['main', 'product'],\n    productId: 'P-2026-001',\n    productName: 'Industrial Sensor A',\n  },\n  {\n    id: '2',\n    name: 'product_gallery_002.jpg',\n    type: 'image',\n    size: 1890234,\n    url: 'https://via.placeholder.com/800x800?text=Product+2',\n    thumbnail: 'https://via.placeholder.com/100x100?text=2',\n    uploadedAt: '2026-03-18 10:35:00',\n    uploadedBy: 'Admin',\n    status: 'READY',\n    tags: ['gallery', 'product'],\n    productId: 'P-2026-001',\n    productName: 'Industrial Sensor A',\n  },\n  {\n    id: '3',\n    name: 'product_video_demo.mp4',\n    type: 'video',\n    size: 15678901,\n    url: 'https://example.com/video.mp4',\n    thumbnail: 'https://via.placeholder.com/100x100?text=Video',\n    uploadedAt: '2026-03-17 14:00:00',\n    uploadedBy: 'Operator',\n    status: 'PROCESSING',\n    tags: ['demo', 'video'],\n  },\n  {\n    id: '4',\n    name: 'product_manual.pdf',\n    type: 'document',\n    size: 567890,\n    url: 'https://example.com/manual.pdf',\n    uploadedAt: '2026-03-16 09:00:00',\n    uploadedBy: 'Admin',\n    status: 'READY',\n    tags: ['manual', 'document'],\n    productId: 'P-2026-002',\n    productName: 'Control Module B',\n  },\n];\n\nconst TYPE_CONFIG: Record<string, { color: string; icon: React.ReactNode }> = {\n  image: { color: 'blue', icon: <FileImageOutlined /> },\n  video: { color: 'purple', icon: <VideoCameraOutlined /> },\n  document: { color: 'green', icon: <FileOutlined /> },\n};\n\nconst STATUS_CONFIG: Record<string, { color: string; text: string }> = {\n  READY: { color: 'success', text: 'Ready' },\n  PROCESSING: { color: 'processing', text: 'Processing' },\n  FAILED: { color: 'error', text: 'Failed' },\n};\n\nconst formatFileSize = (bytes: number): string => {\n  if (bytes < 1024) return `${bytes} B`;\n  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n  if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n  return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;\n};\n\nexport const MaterialUpload: React.FC = () => {\n  const [fileList, setFileList] = useState<UploadFile[]>([]);\n  const [materials, setMaterials] = useState<MaterialFile[]>(MOCK_MATERIALS);\n  const [uploading, setUploading] = useState(false);\n  const [uploadProgress, setUploadProgress] = useState(0);\n  const [previewVisible, setPreviewVisible] = useState(false);\n  const [previewFile, setPreviewFile] = useState<MaterialFile | null>(null);\n  const [searchText, setSearchText] = useState('');\n  const [filterType, setFilterType] = useState<string>('all');\n\n  const handleUpload = async () => {\n    if (fileList.length === 0) {\n      message.warning('Please select files to upload');\n      return;\n    }\n\n    setUploading(true);\n    setUploadProgress(0);\n\n    for (let i = 0; i <= 100; i += 10) {\n      await new Promise(resolve => setTimeout(resolve, 200));\n      setUploadProgress(i);\n    }\n\n    const newMaterials: MaterialFile[] = fileList.map((file, index) => ({\n      id: `${Date.now()}-${index}`,\n      name: file.name,\n      type: file.type?.startsWith('image') ? 'image' : \n            file.type?.startsWith('video') ? 'video' : 'document',\n      size: file.size || 0,\n      url: URL.createObjectURL(file as any),\n      thumbnail: file.type?.startsWith('image') ? URL.createObjectURL(file as any) : undefined,\n      uploadedAt: new Date().toISOString(),\n      uploadedBy: 'Current User',\n      status: 'READY',\n      tags: [],\n    }));\n\n    setMaterials([...newMaterials, ...materials]);\n    setFileList([]);\n    setUploading(false);\n    message.success(`${fileList.length} file(s) uploaded successfully`);\n  };\n\n  const handleDelete = (id: string) => {\n    Modal.confirm({\n      title: 'Delete Material',\n      content: 'Are you sure you want to delete this file?',\n      okText: 'Delete',\n      okType: 'danger',\n      onOk: () => {\n        setMaterials(materials.filter(m => m.id !== id));\n        message.success('File deleted');\n      },\n    });\n  };\n\n  const handlePreview = (file: MaterialFile) => {\n    setPreviewFile(file);\n    setPreviewVisible(true);\n  };\n\n  const handleCopyUrl = (url: string) => {\n    navigator.clipboard.writeText(url);\n    message.success('URL copied to clipboard');\n  };\n\n  const getFilteredMaterials = () => {\n    return materials.filter(m => {\n      const matchesSearch = m.name.toLowerCase().includes(searchText.toLowerCase()) ||\n                           m.tags.some(t => t.toLowerCase().includes(searchText.toLowerCase()));\n      const matchesType = filterType === 'all' || m.type === filterType;\n      return matchesSearch && matchesType;\n    });\n  };\n\n  const columns = [\n    {\n      title: 'Preview',\n      dataIndex: 'thumbnail',\n      key: 'thumbnail',\n      width: 80,\n      render: (_: any, record: MaterialFile) => (\n        record.type === 'image' ? (\n          <Image\n            src={record.thumbnail}\n            alt={record.name}\n            width={50}\n            height={50}\n            style={{ objectFit: 'cover', borderRadius: 4 }}\n          />\n        ) : (\n          <div style={{ width: 50, height: 50, display: 'flex', alignItems: 'center', justifyContent: 'center', background: '#f5f5f5', borderRadius: 4 }}>\n            {TYPE_CONFIG[record.type].icon}\n          </div>\n        )\n      ),\n    },\n    {\n      title: 'Name',\n      dataIndex: 'name',\n      key: 'name',\n      render: (name: string, record: MaterialFile) => (\n        <Space>\n          <Tag color={TYPE_CONFIG[record.type].color} icon={TYPE_CONFIG[record.type].icon}>\n            {record.type.toUpperCase()}\n          </Tag>\n          <span>{name}</span>\n        </Space>\n      ),\n    },\n    {\n      title: 'Size',\n      dataIndex: 'size',\n      key: 'size',\n      width: 100,\n      render: (size: number) => formatFileSize(size),\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 100,\n      render: (status: string) => (\n        <Tag color={STATUS_CONFIG[status].color}>{STATUS_CONFIG[status].text}</Tag>\n      ),\n    },\n    {\n      title: 'Product',\n      dataIndex: 'productName',\n      key: 'productName',\n      width: 150,\n      render: (name: string) => name || <Tag>Unassigned</Tag>,\n    },\n    {\n      title: 'Uploaded',\n      dataIndex: 'uploadedAt',\n      key: 'uploadedAt',\n      width: 150,\n    },\n    {\n      title: 'Tags',\n      dataIndex: 'tags',\n      key: 'tags',\n      width: 150,\n      render: (tags: string[]) => tags.map(t => <Tag key={t}>{t}</Tag>),\n    },\n    {\n      title: 'Actions',\n      key: 'actions',\n      width: 120,\n      render: (_: any, record: MaterialFile) => (\n        <Space>\n          <Tooltip title=\"Preview\">\n            <Button type=\"text\" icon={<EyeOutlined />} onClick={() => handlePreview(record)} />\n          </Tooltip>\n          <Tooltip title=\"Copy URL\">\n            <Button type=\"text\" icon={<CopyOutlined />} onClick={() => handleCopyUrl(record.url)} />\n          </Tooltip>\n          <Tooltip title=\"Delete\">\n            <Button type=\"text\" danger icon={<DeleteOutlined />} onClick={() => handleDelete(record.id)} />\n          </Tooltip>\n        </Space>\n      ),\n    },\n  ];\n\n  const stats = {\n    total: materials.length,\n    images: materials.filter(m => m.type === 'image').length,\n    videos: materials.filter(m => m.type === 'video').length,\n    documents: materials.filter(m => m.type === 'document').length,\n    totalSize: materials.reduce((acc, m) => acc + m.size, 0),\n  };\n\n  return (\n    <div className=\"material-upload-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>\n              <FolderOutlined style={{ fontSize: 32, color: '#1890ff' }} />\n              <div>\n                <div style={{ color: '#666' }}>Total Files</div>\n                <div style={{ fontSize: 24, fontWeight: 'bold' }}>{stats.total}</div>\n              </div>\n            </div>\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>\n              <FileImageOutlined style={{ fontSize: 32, color: '#52c41a' }} />\n              <div>\n                <div style={{ color: '#666' }}>Images</div>\n                <div style={{ fontSize: 24, fontWeight: 'bold' }}>{stats.images}</div>\n              </div>\n            </div>\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>\n              <VideoCameraOutlined style={{ fontSize: 32, color: '#722ed1' }} />\n              <div>\n                <div style={{ color: '#666' }}>Videos</div>\n                <div style={{ fontSize: 24, fontWeight: 'bold' }}>{stats.videos}</div>\n              </div>\n            </div>\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>\n              <FileOutlined style={{ fontSize: 32, color: '#fa8c16' }} />\n              <div>\n                <div style={{ color: '#666' }}>Total Size</div>\n                <div style={{ fontSize: 24, fontWeight: 'bold' }}>{formatFileSize(stats.totalSize)}</div>\n              </div>\n            </div>\n          </Card>\n        </Col>\n      </Row>\n\n      <Card title=\"Upload Materials\">\n        <Tabs defaultActiveKey=\"upload\">\n          <TabPane tab=\"Upload\" key=\"upload\">\n            <Alert\n              message=\"Upload Guidelines\"\n              description=\"Supported formats: JPG, PNG, GIF, MP4, PDF. Maximum file size: 50MB per file. Recommended image resolution: 1000x1000 pixels or higher.\"\n              type=\"info\"\n              showIcon\n              style={{ marginBottom: 16 }}\n            />\n\n            <Upload\n              multiple\n              fileList={fileList}\n              onChange={({ fileList }) => setFileList(fileList)}\n              beforeUpload={() => false}\n              listType=\"picture\"\n            >\n              <Button icon={<UploadOutlined />}>Select Files</Button>\n            </Upload>\n\n            {uploading && (\n              <div style={{ marginTop: 16 }}>\n                <Progress percent={uploadProgress} status=\"active\" />\n              </div>\n            )}\n\n            <Divider />\n\n            <Space>\n              <Button\n                type=\"primary\"\n                onClick={handleUpload}\n                disabled={fileList.length === 0}\n                loading={uploading}\n              >\n                Start Upload\n              </Button>\n              <Button onClick={() => setFileList([])} disabled={fileList.length === 0}>\n                Clear\n              </Button>\n            </Space>\n          </TabPane>\n\n          <TabPane tab=\"Library\" key=\"library\">\n            <Space style={{ marginBottom: 16 }}>\n              <Input\n                placeholder=\"Search by name or tag\"\n                prefix={<SearchOutlined />}\n                value={searchText}\n                onChange={(e) => setSearchText(e.target.value)}\n                style={{ width: 250 }}\n              />\n              <Select value={filterType} onChange={setFilterType} style={{ width: 120 }}>\n                <Option value=\"all\">All Types</Option>\n                <Option value=\"image\">Images</Option>\n                <Option value=\"video\">Videos</Option>\n                <Option value=\"document\">Documents</Option>\n              </Select>\n              <Button icon={<ReloadOutlined />} onClick={() => { setSearchText(''); setFilterType('all'); }}>\n                Reset\n              </Button>\n            </Space>\n\n            <Table\n              columns={columns}\n              dataSource={getFilteredMaterials()}\n              rowKey=\"id\"\n              pagination={{ pageSize: 10 }}\n            />\n          </TabPane>\n        </Tabs>\n      </Card>\n\n      <Modal\n        title=\"File Preview\"\n        open={previewVisible}\n        onCancel={() => setPreviewVisible(false)}\n        footer={null}\n        width={800}\n      >\n        {previewFile && (\n          <div>\n            {previewFile.type === 'image' ? (\n              <Image src={previewFile.url} style={{ width: '100%' }} />\n            ) : (\n              <div style={{ textAlign: 'center', padding: 40 }}>\n                {TYPE_CONFIG[previewFile.type].icon}\n                <p style={{ marginTop: 16 }}>{previewFile.name}</p>\n                <p style={{ color: '#666' }}>{formatFileSize(previewFile.size)}</p>\n                <Button type=\"primary\" href={previewFile.url} target=\"_blank\">\n                  Open File\n                </Button>\n              </div>\n            )}\n          </div>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default MaterialUpload;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Product/MaterialUpload.tsx"
    },
    "UserAsset/PointsManage": {
      "path": "UserAsset/PointsManage",
      "id": "UserAsset/PointsManage",
      "file": "UserAsset/PointsManage.tsx",
      "absPath": "/UserAsset/PointsManage",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  InputNumber,\n  Select,\n  Tag,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  message,\n  Badge,\n  DatePicker,\n  Tabs,\n  Timeline,\n  Descriptions,\n  Divider,\n  Alert,\n  Result,\n} from 'antd';\nimport {\n  PlusOutlined,\n  MinusOutlined,\n  LockOutlined,\n  UnlockOutlined,\n  HistoryOutlined,\n  StarOutlined,\n  UserOutlined,\n  ClockCircleOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  ExclamationCircleOutlined,\n  GiftOutlined,\n  ShoppingCartOutlined,\n  TrophyOutlined,\n  EditOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs from 'dayjs';\n\nconst { Option } = Select;\nconst { RangePicker } = DatePicker;\nconst { TabPane } = Tabs;\n\ntype PointsSourceType = \n  | 'PURCHASE'\n  | 'REVIEW'\n  | 'REFERRAL'\n  | 'PROMOTION'\n  | 'ADMIN_ADJUST'\n  | 'EXPIRED'\n  | 'REFUND'\n  | 'MANUAL_DEDUCT';\n\ntype PointsStatus = 'PENDING' | 'CONFIRMED' | 'FROZEN' | 'EXPIRED' | 'CANCELLED';\n\ninterface PointsRecord {\n  id: string;\n  tenantId: string;\n  shopId: string;\n  userId: string;\n  userName: string;\n  taskId?: string;\n  traceId: string;\n  businessType: 'TOC' | 'TOB';\n  points: number;\n  balance: number;\n  sourceType: PointsSourceType;\n  sourceId?: string;\n  description: string;\n  status: PointsStatus;\n  expiredAt?: string;\n  createdAt: string;\n}\n\ninterface PointsOperationInput {\n  tenantId: string;\n  shopId: string;\n  userId: string;\n  points: number;\n  sourceType: PointsSourceType;\n  description: string;\n  taskId?: string;\n  traceId: string;\n  businessType: 'TOC' | 'TOB';\n  expiredAt?: string;\n}\n\ninterface PointsStatistics {\n  totalEarned: number;\n  totalSpent: number;\n  totalFrozen: number;\n  totalExpired: number;\n  todayEarned: number;\n  todaySpent: number;\n}\n\nconst SOURCE_TYPE_NAMES: Record<PointsSourceType, string> = {\n  PURCHASE: '购物获得',\n  REVIEW: '评价奖励',\n  REFERRAL: '推荐奖励',\n  PROMOTION: '活动奖励',\n  ADMIN_ADJUST: '管理员调整',\n  EXPIRED: '积分过期',\n  REFUND: '退款返还',\n  MANUAL_DEDUCT: '手动扣减',\n};\n\nconst SOURCE_TYPE_COLORS: Record<PointsSourceType, string> = {\n  PURCHASE: 'green',\n  REVIEW: 'blue',\n  REFERRAL: 'purple',\n  PROMOTION: 'orange',\n  ADMIN_ADJUST: 'cyan',\n  EXPIRED: 'red',\n  REFUND: 'gold',\n  MANUAL_DEDUCT: 'magenta',\n};\n\nconst STATUS_NAMES: Record<PointsStatus, string> = {\n  PENDING: '待确认',\n  CONFIRMED: '已确认',\n  FROZEN: '已冻结',\n  EXPIRED: '已过期',\n  CANCELLED: '已取消',\n};\n\nconst STATUS_COLORS: Record<PointsStatus, string> = {\n  PENDING: 'gold',\n  CONFIRMED: 'green',\n  FROZEN: 'blue',\n  EXPIRED: 'red',\n  CANCELLED: 'default',\n};\n\nconst STATUS_ICONS: Record<PointsStatus, React.ReactNode> = {\n  PENDING: <ClockCircleOutlined />,\n  CONFIRMED: <CheckCircleOutlined />,\n  FROZEN: <LockOutlined />,\n  EXPIRED: <ExclamationCircleOutlined />,\n  CANCELLED: <CloseCircleOutlined />,\n};\n\nconst MOCK_POINTS_RECORDS: PointsRecord[] = [\n  {\n    id: 'PR001',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U001',\n    userName: '张三',\n    traceId: 'TR001',\n    businessType: 'TOC',\n    points: 580,\n    balance: 5680,\n    sourceType: 'PURCHASE',\n    description: '订单 ORD-20260318-001 购物奖励',\n    status: 'CONFIRMED',\n    createdAt: '2026-03-18 14:30:00',\n  },\n  {\n    id: 'PR002',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U001',\n    userName: '张三',\n    traceId: 'TR002',\n    businessType: 'TOC',\n    points: 50,\n    balance: 5100,\n    sourceType: 'REVIEW',\n    description: '商品评价奖励',\n    status: 'CONFIRMED',\n    createdAt: '2026-03-17 10:20:00',\n  },\n  {\n    id: 'PR003',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U002',\n    userName: '李四',\n    traceId: 'TR003',\n    businessType: 'TOC',\n    points: 200,\n    balance: 2300,\n    sourceType: 'REFERRAL',\n    description: '推荐新用户注册奖励',\n    status: 'CONFIRMED',\n    createdAt: '2026-03-16 16:45:00',\n  },\n  {\n    id: 'PR004',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U003',\n    userName: '王五',\n    traceId: 'TR004',\n    businessType: 'TOC',\n    points: -500,\n    balance: 15800,\n    sourceType: 'MANUAL_DEDUCT',\n    description: '积分兑换优惠券',\n    status: 'CONFIRMED',\n    createdAt: '2026-03-15 09:10:00',\n  },\n  {\n    id: 'PR005',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U001',\n    userName: '张三',\n    traceId: 'TR005',\n    businessType: 'TOC',\n    points: 100,\n    balance: 5050,\n    sourceType: 'PROMOTION',\n    description: '新春活动奖励',\n    status: 'FROZEN',\n    expiredAt: '2026-04-15 23:59:59',\n    createdAt: '2026-03-10 00:00:00',\n  },\n  {\n    id: 'PR006',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U004',\n    userName: '赵六',\n    traceId: 'TR006',\n    businessType: 'TOC',\n    points: -200,\n    balance: 850,\n    sourceType: 'EXPIRED',\n    description: '2025年积分过期清理',\n    status: 'EXPIRED',\n    createdAt: '2026-01-01 00:00:00',\n  },\n];\n\nconst MOCK_STATISTICS: PointsStatistics = {\n  totalEarned: 156800,\n  totalSpent: 45200,\n  totalFrozen: 8500,\n  totalExpired: 3200,\n  todayEarned: 1580,\n  todaySpent: 450,\n};\n\nexport const PointsManage: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [pointsRecords, setPointsRecords] = useState<PointsRecord[]>(MOCK_POINTS_RECORDS);\n  const [statistics, setStatistics] = useState<PointsStatistics>(MOCK_STATISTICS);\n  const [operationModalVisible, setOperationModalVisible] = useState(false);\n  const [operationType, setOperationType] = useState<'ADD' | 'DEDUCT' | 'FREEZE'>('ADD');\n  const [selectedRecord, setSelectedRecord] = useState<PointsRecord | null>(null);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [searchParams, setSearchParams] = useState({\n    userId: '',\n    sourceType: undefined as PointsSourceType | undefined,\n    status: undefined as PointsStatus | undefined,\n    dateRange: null as [dayjs.Dayjs, dayjs.Dayjs] | null,\n  });\n\n  useEffect(() => {\n    loadPointsRecords();\n  }, []);\n\n  const loadPointsRecords = async () => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 500));\n      setPointsRecords(MOCK_POINTS_RECORDS);\n      setStatistics(MOCK_STATISTICS);\n    } catch (error) {\n      message.error('加载积分记录失败');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleSearch = () => {\n    let filtered = [...MOCK_POINTS_RECORDS];\n    \n    if (searchParams.userId) {\n      filtered = filtered.filter(\n        r => r.userId.includes(searchParams.userId) || \n             r.userName.includes(searchParams.userId)\n      );\n    }\n    \n    if (searchParams.sourceType) {\n      filtered = filtered.filter(r => r.sourceType === searchParams.sourceType);\n    }\n    \n    if (searchParams.status) {\n      filtered = filtered.filter(r => r.status === searchParams.status);\n    }\n    \n    if (searchParams.dateRange) {\n      const [start, end] = searchParams.dateRange;\n      filtered = filtered.filter(r => {\n        const date = dayjs(r.createdAt);\n        return date.isAfter(start) && date.isBefore(end);\n      });\n    }\n    \n    setPointsRecords(filtered);\n  };\n\n  const handleReset = () => {\n    setSearchParams({\n      userId: '',\n      sourceType: undefined,\n      status: undefined,\n      dateRange: null,\n    });\n    setPointsRecords(MOCK_POINTS_RECORDS);\n  };\n\n  const handleOperation = async (values: any) => {\n    try {\n      const traceId = `TR${Date.now()}`;\n      \n      message.success(`${operationType === 'ADD' ? '增加' : operationType === 'DEDUCT' ? '扣减' : '冻结'}积分成功`);\n      setOperationModalVisible(false);\n      form.resetFields();\n      loadPointsRecords();\n    } catch (error) {\n      message.error('操作失败');\n    }\n  };\n\n  const showRecordDetail = (record: PointsRecord) => {\n    setSelectedRecord(record);\n    setDetailModalVisible(true);\n  };\n\n  const columns: ColumnsType<PointsRecord> = [\n    {\n      title: '用户',\n      key: 'user',\n      width: 140,\n      render: (_, record) => (\n        <Space>\n          <UserOutlined />\n          <div>\n            <div style={{ fontWeight: 500 }}>{record.userName}</div>\n            <div style={{ fontSize: 12, color: '#999' }}>{record.userId}</div>\n          </div>\n        </Space>\n      ),\n    },\n    {\n      title: '积分变动',\n      dataIndex: 'points',\n      key: 'points',\n      width: 120,\n      align: 'right',\n      render: (points: number) => (\n        <span style={{ \n          color: points > 0 ? '#52c41a' : '#ff4d4f',\n          fontWeight: 500,\n          fontSize: 14,\n        }}>\n          {points > 0 ? '+' : ''}{points.toLocaleString()}\n        </span>\n      ),\n      sorter: (a, b) => a.points - b.points,\n    },\n    {\n      title: '变动后余额',\n      dataIndex: 'balance',\n      key: 'balance',\n      width: 120,\n      align: 'right',\n      render: (balance: number) => (\n        <span style={{ color: '#1890ff' }}>{balance.toLocaleString()}</span>\n      ),\n    },\n    {\n      title: '来源类型',\n      dataIndex: 'sourceType',\n      key: 'sourceType',\n      width: 120,\n      render: (type: PointsSourceType) => (\n        <Tag color={SOURCE_TYPE_COLORS[type]}>\n          {SOURCE_TYPE_NAMES[type]}\n        </Tag>\n      ),\n      filters: Object.entries(SOURCE_TYPE_NAMES).map(([key, name]) => ({\n        text: name,\n        value: key,\n      })),\n      onFilter: (value, record) => record.sourceType === value,\n    },\n    {\n      title: '描述',\n      dataIndex: 'description',\n      key: 'description',\n      width: 250,\n      ellipsis: true,\n    },\n    {\n      title: '状态',\n      dataIndex: 'status',\n      key: 'status',\n      width: 100,\n      render: (status: PointsStatus) => (\n        <Tag color={STATUS_COLORS[status]} icon={STATUS_ICONS[status]}>\n          {STATUS_NAMES[status]}\n        </Tag>\n      ),\n      filters: Object.entries(STATUS_NAMES).map(([key, name]) => ({\n        text: name,\n        value: key,\n      })),\n      onFilter: (value, record) => record.status === value,\n    },\n    {\n      title: '业务类型',\n      dataIndex: 'businessType',\n      key: 'businessType',\n      width: 90,\n      render: (type: 'TOC' | 'TOB') => (\n        <Tag color={type === 'TOC' ? 'blue' : 'green'}>{type}</Tag>\n      ),\n    },\n    {\n      title: '创建时间',\n      dataIndex: 'createdAt',\n      key: 'createdAt',\n      width: 160,\n      render: (time: string) => (\n        <Tooltip title={time}>\n          <span><ClockCircleOutlined /> {dayjs(time).format('MM-DD HH:mm')}</span>\n        </Tooltip>\n      ),\n      sorter: (a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime(),\n    },\n    {\n      title: '操作',\n      key: 'action',\n      width: 100,\n      fixed: 'right',\n      render: (_, record) => (\n        <Button type=\"link\" size=\"small\" onClick={() => showRecordDetail(record)}>\n          详情\n        </Button>\n      ),\n    },\n  ];\n\n  const renderStatistics = () => (\n    <Row gutter={16}>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"累计获得\"\n            value={statistics.totalEarned}\n            prefix={<StarOutlined style={{ color: '#52c41a' }} />}\n            valueStyle={{ color: '#52c41a' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"累计消耗\"\n            value={statistics.totalSpent}\n            prefix={<MinusOutlined style={{ color: '#ff4d4f' }} />}\n            valueStyle={{ color: '#ff4d4f' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"冻结积分\"\n            value={statistics.totalFrozen}\n            prefix={<LockOutlined style={{ color: '#1890ff' }} />}\n            valueStyle={{ color: '#1890ff' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"已过期\"\n            value={statistics.totalExpired}\n            prefix={<ExclamationCircleOutlined style={{ color: '#999' }} />}\n            valueStyle={{ color: '#999' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"今日获得\"\n            value={statistics.todayEarned}\n            prefix={<TrophyOutlined style={{ color: '#faad14' }} />}\n            valueStyle={{ color: '#faad14' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"今日消耗\"\n            value={statistics.todaySpent}\n            prefix={<ShoppingCartOutlined style={{ color: '#722ed1' }} />}\n            valueStyle={{ color: '#722ed1' }}\n          />\n        </Card>\n      </Col>\n    </Row>\n  );\n\n  const renderOperationModal = () => (\n    <Modal\n      title={\n        operationType === 'ADD' ? '增加积分' : \n        operationType === 'DEDUCT' ? '扣减积分' : '冻结积分'\n      }\n      open={operationModalVisible}\n      onCancel={() => {\n        setOperationModalVisible(false);\n        form.resetFields();\n      }}\n      onOk={() => form.submit()}\n      width={500}\n    >\n      <Alert\n        message={\n          operationType === 'ADD' ? '增加积分后立即生效，请确认操作' :\n          operationType === 'DEDUCT' ? '扣减积分将从用户可用积分中扣除，请确认' :\n          '冻结积分将暂时不可使用，解冻后恢复'\n        }\n        type=\"warning\"\n        showIcon\n        style={{ marginBottom: 16 }}\n      />\n      \n      <Form\n        form={form}\n        layout=\"vertical\"\n        onFinish={handleOperation}\n      >\n        <Form.Item\n          name=\"userId\"\n          label=\"用户ID\"\n          rules={[{ required: true, message: '请输入用户ID' }]}\n        >\n          <Input placeholder=\"输入用户ID\" />\n        </Form.Item>\n        \n        <Form.Item\n          name=\"points\"\n          label=\"积分数量\"\n          rules={[{ required: true, message: '请输入积分数量' }]}\n        >\n          <InputNumber \n            min={1} \n            style={{ width: '100%' }} \n            placeholder=\"输入积分数量\"\n          />\n        </Form.Item>\n        \n        <Form.Item\n          name=\"sourceType\"\n          label=\"来源类型\"\n          rules={[{ required: true, message: '请选择来源类型' }]}\n        >\n          <Select placeholder=\"选择来源类型\">\n            {operationType === 'ADD' && (\n              <>\n                <Option value=\"PURCHASE\">购物获得</Option>\n                <Option value=\"REVIEW\">评价奖励</Option>\n                <Option value=\"REFERRAL\">推荐奖励</Option>\n                <Option value=\"PROMOTION\">活动奖励</Option>\n                <Option value=\"ADMIN_ADJUST\">管理员调整</Option>\n              </>\n            )}\n            {operationType === 'DEDUCT' && (\n              <>\n                <Option value=\"MANUAL_DEDUCT\">手动扣减</Option>\n                <Option value=\"EXPIRED\">积分过期</Option>\n              </>\n            )}\n            {operationType === 'FREEZE' && (\n              <Option value=\"ADMIN_ADJUST\">管理员冻结</Option>\n            )}\n          </Select>\n        </Form.Item>\n        \n        <Form.Item\n          name=\"description\"\n          label=\"操作说明\"\n          rules={[{ required: true, message: '请输入操作说明' }]}\n        >\n          <Input.TextArea rows={3} placeholder=\"输入操作说明\" />\n        </Form.Item>\n        \n        {operationType === 'ADD' && (\n          <Form.Item\n            name=\"expiredAt\"\n            label=\"过期时间\"\n          >\n            <DatePicker style={{ width: '100%' }} placeholder=\"选择过期时间（可选）\" />\n          </Form.Item>\n        )}\n      </Form>\n    </Modal>\n  );\n\n  const renderDetailModal = () => {\n    if (!selectedRecord) return null;\n\n    return (\n      <Modal\n        title=\"积分记录详情\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={null}\n        width={600}\n      >\n        <Descriptions bordered column={2}>\n          <Descriptions.Item label=\"记录ID\">{selectedRecord.id}</Descriptions.Item>\n          <Descriptions.Item label=\"追踪ID\">{selectedRecord.traceId}</Descriptions.Item>\n          <Descriptions.Item label=\"用户ID\">{selectedRecord.userId}</Descriptions.Item>\n          <Descriptions.Item label=\"用户名\">{selectedRecord.userName}</Descriptions.Item>\n          <Descriptions.Item label=\"积分变动\">\n            <span style={{ \n              color: selectedRecord.points > 0 ? '#52c41a' : '#ff4d4f',\n              fontWeight: 500,\n            }}>\n              {selectedRecord.points > 0 ? '+' : ''}{selectedRecord.points}\n            </span>\n          </Descriptions.Item>\n          <Descriptions.Item label=\"变动后余额\">{selectedRecord.balance}</Descriptions.Item>\n          <Descriptions.Item label=\"来源类型\">\n            <Tag color={SOURCE_TYPE_COLORS[selectedRecord.sourceType]}>\n              {SOURCE_TYPE_NAMES[selectedRecord.sourceType]}\n            </Tag>\n          </Descriptions.Item>\n          <Descriptions.Item label=\"状态\">\n            <Tag color={STATUS_COLORS[selectedRecord.status]} icon={STATUS_ICONS[selectedRecord.status]}>\n              {STATUS_NAMES[selectedRecord.status]}\n            </Tag>\n          </Descriptions.Item>\n          <Descriptions.Item label=\"业务类型\">\n            <Tag color={selectedRecord.businessType === 'TOC' ? 'blue' : 'green'}>\n              {selectedRecord.businessType}\n            </Tag>\n          </Descriptions.Item>\n          <Descriptions.Item label=\"创建时间\">{selectedRecord.createdAt}</Descriptions.Item>\n          <Descriptions.Item label=\"描述\" span={2}>{selectedRecord.description}</Descriptions.Item>\n          {selectedRecord.expiredAt && (\n            <Descriptions.Item label=\"过期时间\">{selectedRecord.expiredAt}</Descriptions.Item>\n          )}\n          {selectedRecord.sourceId && (\n            <Descriptions.Item label=\"来源ID\">{selectedRecord.sourceId}</Descriptions.Item>\n          )}\n        </Descriptions>\n      </Modal>\n    );\n  };\n\n  return (\n    <div style={{ padding: 24 }}>\n      <Card title=\"积分管理\" style={{ marginBottom: 16 }}>\n        {renderStatistics()}\n      </Card>\n\n      <Card>\n        <Row gutter={16} style={{ marginBottom: 16 }}>\n          <Col span={4}>\n            <Input\n              placeholder=\"搜索用户ID/名称\"\n              value={searchParams.userId}\n              onChange={e => setSearchParams({ ...searchParams, userId: e.target.value })}\n              onPressEnter={handleSearch}\n            />\n          </Col>\n          <Col span={3}>\n            <Select\n              placeholder=\"来源类型\"\n              value={searchParams.sourceType}\n              onChange={value => setSearchParams({ ...searchParams, sourceType: value })}\n              allowClear\n              style={{ width: '100%' }}\n            >\n              {Object.entries(SOURCE_TYPE_NAMES).map(([key, name]) => (\n                <Option key={key} value={key}>{name}</Option>\n              ))}\n            </Select>\n          </Col>\n          <Col span={3}>\n            <Select\n              placeholder=\"状态\"\n              value={searchParams.status}\n              onChange={value => setSearchParams({ ...searchParams, status: value })}\n              allowClear\n              style={{ width: '100%' }}\n            >\n              {Object.entries(STATUS_NAMES).map(([key, name]) => (\n                <Option key={key} value={key}>{name}</Option>\n              ))}\n            </Select>\n          </Col>\n          <Col span={6}>\n            <RangePicker\n              value={searchParams.dateRange}\n              onChange={(dates) => setSearchParams({ \n                ...searchParams, \n                dateRange: dates as [dayjs.Dayjs, dayjs.Dayjs] | null \n              })}\n              style={{ width: '100%' }}\n            />\n          </Col>\n          <Col span={4}>\n            <Space>\n              <Button type=\"primary\" onClick={handleSearch}>搜索</Button>\n              <Button onClick={handleReset}>重置</Button>\n            </Space>\n          </Col>\n        </Row>\n\n        <Row style={{ marginBottom: 16 }}>\n          <Space>\n            <Button \n              type=\"primary\" \n              icon={<PlusOutlined />}\n              onClick={() => {\n                setOperationType('ADD');\n                setOperationModalVisible(true);\n              }}\n            >\n              增加积分\n            </Button>\n            <Button \n              danger\n              icon={<MinusOutlined />}\n              onClick={() => {\n                setOperationType('DEDUCT');\n                setOperationModalVisible(true);\n              }}\n            >\n              扣减积分\n            </Button>\n            <Button \n              icon={<LockOutlined />}\n              onClick={() => {\n                setOperationType('FREEZE');\n                setOperationModalVisible(true);\n              }}\n            >\n              冻结积分\n            </Button>\n          </Space>\n        </Row>\n\n        <Table\n          columns={columns}\n          dataSource={pointsRecords}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1400 }}\n          pagination={{\n            showSizeChanger: true,\n            showQuickJumper: true,\n            showTotal: (total) => `共 ${total} 条记录`,\n          }}\n        />\n      </Card>\n\n      {renderOperationModal()}\n      {renderDetailModal()}\n    </div>\n  );\n};\n\nexport default PointsManage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/UserAsset/PointsManage.tsx"
    },
    "Logistics/FreightCalc": {
      "path": "Logistics/FreightCalc",
      "id": "Logistics/FreightCalc",
      "file": "Logistics/FreightCalc.tsx",
      "absPath": "/Logistics/FreightCalc",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Form,\n  Input,\n  InputNumber,\n  Select,\n  Radio,\n  Tag,\n  Row,\n  Col,\n  Statistic,\n  message,\n  Divider,\n  Alert,\n  Tooltip,\n} from 'antd';\nimport {\n  DollarOutlined,\n  CalculateOutlined,\n  TruckOutlined,\n  InfoCircleOutlined,\n  EnvironmentOutlined,\n  WeightOutlined,\n  ThunderboltOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\nconst { TextArea } = Input;\n\ntype LogisticsChannel = 'EXPRESS' | 'STANDARD' | 'ECONOMY' | 'SPECIAL';\n\ninterface FreightQuote {\n  id: string;\n  channel: LogisticsChannel;\n  carrier: string;\n  name: string;\n  basePrice: number;\n  pricePerKg: number;\n  pricePerVol: number;\n  estimatedDays: number;\n  totalPrice: number;\n  fuelSurcharge: number;\n  remoteAreaSurcharge: number;\n  customsDuty: number;\n  insurance: number;\n  totalWithDuty: number;\n}\n\ninterface ProductInfo {\n  productId: string;\n  name: string;\n  weight: number;\n  length: number;\n  width: number;\n  height: number;\n  quantity: number;\n  declaredValue: number;\n  hsCode: string;\n}\n\ninterface DestinationInfo {\n  country: string;\n  city: string;\n  postalCode: string;\n  isRemoteArea: boolean;\n  customsRate: number;\n}\n\nconst CHANNEL_COLORS: Record<LogisticsChannel, string> = {\n  EXPRESS: 'red',\n  STANDARD: 'blue',\n  ECONOMY: 'green',\n  SPECIAL: 'purple',\n};\n\nconst COUNTRIES = [\n  { code: 'US', name: 'United States', customsRate: 0.06, remoteAreas: ['AK', 'HI', 'PR', 'VI'] },\n  { code: 'GB', name: 'United Kingdom', customsRate: 0.12, remoteAreas: [] },\n  { code: 'DE', name: 'Germany', customsRate: 0.19, remoteAreas: [] },\n  { code: 'FR', name: 'France', customsRate: 0.20, remoteAreas: [] },\n  { code: 'JP', name: 'Japan', customsRate: 0.08, remoteAreas: ['OKinawa', 'Hokkaido'] },\n  { code: 'AU', name: 'Australia', customsRate: 0.10, remoteAreas: ['NT', 'TAS'] },\n  { code: 'CA', name: 'Canada', customsRate: 0.05, remoteAreas: ['YT', 'NT', 'NU'] },\n];\n\nconst CARRIERS = [\n  {\n    channel: 'EXPRESS',\n    name: 'DHL Express',\n    basePrice: 25.0,\n    pricePerKg: 8.5,\n    pricePerVol: 150,\n    fuelRate: 0.15,\n  },\n  {\n    channel: 'EXPRESS',\n    name: 'FedEx',\n    basePrice: 22.0,\n    pricePerKg: 7.8,\n    pricePerVol: 140,\n    fuelRate: 0.12,\n  },\n  {\n    channel: 'STANDARD',\n    name: 'UPS',\n    basePrice: 15.0,\n    pricePerKg: 5.5,\n    pricePerVol: 100,\n    fuelRate: 0.10,\n  },\n  {\n    channel: 'STANDARD',\n    name: 'TNT',\n    basePrice: 14.0,\n    pricePerKg: 5.0,\n    pricePerVol: 95,\n    fuelRate: 0.10,\n  },\n  {\n    channel: 'ECONOMY',\n    name: 'China Post',\n    basePrice: 5.0,\n    pricePerKg: 2.0,\n    pricePerVol: 40,\n    fuelRate: 0.05,\n  },\n  {\n    channel: 'ECONOMY',\n    name: 'Sea Freight',\n    basePrice: 50.0,\n    pricePerKg: 0.8,\n    pricePerVol: 15,\n    fuelRate: 0.08,\n  },\n  {\n    channel: 'SPECIAL',\n    name: '4PX Special Line',\n    basePrice: 12.0,\n    pricePerKg: 4.0,\n    pricePerVol: 80,\n    fuelRate: 0.08,\n  },\n];\n\nexport const FreightCalc: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [quotes, setQuotes] = useState<FreightQuote[]>([]);\n  const [selectedCountry, setSelectedCountry] = useState<string>('');\n  const [isRemoteArea, setIsRemoteArea] = useState(false);\n  const [totalWeight, setTotalWeight] = useState(0);\n  const [totalVolume, setTotalVolume] = useState(0);\n  const [totalDeclaredValue, setTotalDeclaredValue] = useState(0);\n\n  useEffect(() => {\n    const values = form.getFieldsValue();\n    calculateTotals(values);\n  }, []);\n\n  const calculateTotals = (values: any) => {\n    const products = values.products || [];\n    const weight = products.reduce((sum: number, p: ProductInfo) => sum + (p.weight || 0) * (p.quantity || 1), 0);\n    const volume = products.reduce((sum: number, p: ProductInfo) => \n      sum + ((p.length || 0) * (p.width || 0) * (p.height || 0) / 1000000) * (p.quantity || 1), 0\n    );\n    const value = products.reduce((sum: number, p: ProductInfo) => sum + (p.declaredValue || 0) * (p.quantity || 1), 0);\n    \n    setTotalWeight(weight);\n    setTotalVolume(volume);\n    setTotalDeclaredValue(value);\n  };\n\n  const handleCalculate = async () => {\n    const values = await form.validateFields();\n    const { country, products, isInsured } = values;\n\n    const countryInfo = COUNTRIES.find(c => c.code === country);\n    if (!countryInfo) {\n      message.error('Please select a destination country');\n      return;\n    }\n\n    if (!products || products.length === 0) {\n      message.error('Please add at least one product');\n      return;\n    }\n\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 1000));\n\n      const calculatedQuotes: FreightQuote[] = CARRIERS.map(carrier => {\n        const weightCharge = Math.max(totalWeight, totalVolume * 167) * carrier.pricePerVol / carrier.pricePerVol * carrier.pricePerKg;\n        const baseFreight = carrier.basePrice + weightCharge;\n        const fuelSurcharge = baseFreight * carrier.fuelRate;\n        const remoteSurcharge = isRemoteArea ? baseFreight * 0.25 : 0;\n        const customsDuty = totalDeclaredValue * (countryInfo.customsRate / 100);\n        const insurance = isInsured ? Math.max(totalDeclaredValue * 0.005, 10) : 0;\n        const subtotal = baseFreight + fuelSurcharge + remoteSurcharge;\n        const totalWithDuty = subtotal + customsDuty + insurance;\n\n        return {\n          id: `QUOTE-${carrier.channel}-${Date.now()}`,\n          channel: carrier.channel,\n          carrier: carrier.name,\n          name: carrier.name,\n          basePrice: carrier.basePrice,\n          pricePerKg: carrier.pricePerKg,\n          pricePerVol: carrier.pricePerVol,\n          estimatedDays: carrier.channel === 'EXPRESS' ? 3 + Math.floor(Math.random() * 3) :\n                        carrier.channel === 'STANDARD' ? 7 + Math.floor(Math.random() * 5) :\n                        carrier.channel === 'ECONOMY' ? 15 + Math.floor(Math.random() * 10) : 10,\n          totalPrice: Number(subtotal.toFixed(2)),\n          fuelSurcharge: Number(fuelSurcharge.toFixed(2)),\n          remoteAreaSurcharge: Number(remoteSurcharge.toFixed(2)),\n          customsDuty: Number(customsDuty.toFixed(2)),\n          insurance: Number(insurance.toFixed(2)),\n          totalWithDuty: Number(totalWithDuty.toFixed(2)),\n        };\n      });\n\n      calculatedQuotes.sort((a, b) => a.totalWithDuty - b.totalWithDuty);\n      setQuotes(calculatedQuotes);\n    } catch (error) {\n      message.error('Failed to calculate freight');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleCountryChange = (countryCode: string) => {\n    setSelectedCountry(countryCode);\n    const countryInfo = COUNTRIES.find(c => c.code === countryCode);\n    if (countryInfo && countryInfo.remoteAreas.length > 0) {\n      setIsRemoteArea(false);\n    }\n  };\n\n  const columns: ColumnsType<FreightQuote> = [\n    {\n      title: 'Carrier',\n      dataIndex: 'name',\n      key: 'name',\n      width: 180,\n      render: (name: string, record) => (\n        <Space direction=\"vertical\" size={0}>\n          <strong>{name}</strong>\n          <Tag color={CHANNEL_COLORS[record.channel]}>{record.channel}</Tag>\n        </Space>\n      ),\n    },\n    {\n      title: 'Est. Days',\n      dataIndex: 'estimatedDays',\n      key: 'estimatedDays',\n      width: 100,\n      render: (days: number) => `${days} days`,\n    },\n    {\n      title: 'Base Freight',\n      dataIndex: 'totalPrice',\n      key: 'totalPrice',\n      width: 120,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Fuel Surcharge',\n      dataIndex: 'fuelSurcharge',\n      key: 'fuelSurcharge',\n      width: 120,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Remote Area',\n      dataIndex: 'remoteAreaSurcharge',\n      key: 'remoteAreaSurcharge',\n      width: 100,\n      render: (price: number) => price > 0 ? `$${price.toFixed(2)}` : '-',\n    },\n    {\n      title: 'Customs Duty',\n      dataIndex: 'customsDuty',\n      key: 'customsDuty',\n      width: 100,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Insurance',\n      dataIndex: 'insurance',\n      key: 'insurance',\n      width: 80,\n      render: (price: number) => price > 0 ? `$${price.toFixed(2)}` : '-',\n    },\n    {\n      title: 'Total',\n      dataIndex: 'totalWithDuty',\n      key: 'totalWithDuty',\n      width: 120,\n      render: (price: number, record, index) => (\n        <strong style={{ \n          color: index === 0 ? '#52c41a' : '#1890ff',\n          fontSize: index === 0 ? 16 : 14 \n        }}>\n          ${price.toFixed(2)}\n          {index === 0 && <Tag color=\"green\" style={{ marginLeft: 8 }}>Best</Tag>}\n        </strong>\n      ),\n    },\n  ];\n\n  const countryInfo = COUNTRIES.find(c => c.code === selectedCountry);\n\n  return (\n    <div className=\"freight-calc-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Weight\"\n              value={totalWeight}\n              suffix=\"kg\"\n              prefix={<WeightOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Volume\"\n              value={totalVolume}\n              suffix=\"m³\"\n              prefix={<TruckOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Declared Value\"\n              value={totalDeclaredValue}\n              precision={2}\n              prefix=\"$\"\n              prefixIcon={<DollarOutlined />}\n              valueStyle={{ color: '#1890ff' }}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Quotes Received\"\n              value={quotes.length}\n              prefix={<CalculateOutlined />}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card title=\"Freight Calculator\" style={{ marginBottom: 16 }}>\n        <Form form={form} layout=\"vertical\" onValuesChange={calculateTotals}>\n          <Row gutter={16}>\n            <Col span={8}>\n              <Form.Item\n                name=\"country\"\n                label=\"Destination Country\"\n                rules={[{ required: true, message: 'Please select country' }]}\n              >\n                <Select placeholder=\"Select country\" onChange={handleCountryChange}>\n                  {COUNTRIES.map(country => (\n                    <Option key={country.code} value={country.code}>\n                      {country.name} (Duty: {country.customsRate}%)\n                    </Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n            <Col span={8}>\n              <Form.Item name=\"city\" label=\"City\">\n                <Input placeholder=\"Enter city\" />\n              </Form.Item>\n            </Col>\n            <Col span={8}>\n              <Form.Item name=\"postalCode\" label=\"Postal Code\">\n                <Input placeholder=\"Enter postal code\" />\n              </Form.Item>\n            </Col>\n          </Row>\n\n          {countryInfo && countryInfo.remoteAreas.length > 0 && (\n            <Alert\n              message={\n                <Space>\n                  <InfoCircleOutlined />\n                  <span>\n                    Remote areas for {countryInfo.name}: {countryInfo.remoteAreas.join(', ')}\n                  </span>\n                </Space>\n              }\n              type=\"info\"\n              showIcon\n              style={{ marginBottom: 16 }}\n            />\n          )}\n\n          <Form.Item\n            name=\"isRemoteArea\"\n            label=\"Remote Area Surcharge\"\n            valuePropName=\"checked\"\n          >\n            <Radio.Group>\n              <Radio value={false}>Regular Area</Radio>\n              <Radio value={true}>Remote Area (+25%)</Radio>\n            </Radio.Group>\n          </Form.Item>\n\n          <Form.Item\n            name=\"isInsured\"\n            label=\"Insurance\"\n            valuePropName=\"checked\"\n          >\n            <Radio.Group>\n              <Radio value={false}>No Insurance</Radio>\n              <Radio value={true}>With Insurance (0.5%, min $10)</Radio>\n            </Radio.Group>\n          </Form.Item>\n\n          <Divider>Product Information</Divider>\n\n          <Form.List name=\"products\" initialValue={[{}]}>\n            {(fields, { add, remove }) => (\n              <>\n                {fields.map(({ key, name, ...restField }) => (\n                  <Row key={key} gutter={16} align=\"middle\">\n                    <Col span={4}>\n                      <Form.Item\n                        {...restField}\n                        name={[name, 'productId']}\n                        label=\"Product ID\"\n                      >\n                        <Input placeholder=\"ID\" />\n                      </Form.Item>\n                    </Col>\n                    <Col span={3}>\n                      <Form.Item\n                        {...restField}\n                        name={[name, 'quantity']}\n                        label=\"Qty\"\n                      >\n                        <InputNumber min={1} placeholder=\"1\" style={{ width: '100%' }} />\n                      </Form.Item>\n                    </Col>\n                    <Col span={3}>\n                      <Form.Item\n                        {...restField}\n                        name={[name, 'weight']}\n                        label=\"Weight(kg)\"\n                      >\n                        <InputNumber min={0.1} step={0.1} placeholder=\"0.5\" style={{ width: '100%' }} />\n                      </Form.Item>\n                    </Col>\n                    <Col span={3}>\n                      <Form.Item\n                        {...restField}\n                        name={[name, 'length']}\n                        label=\"L(cm)\"\n                      >\n                        <InputNumber min={1} placeholder=\"10\" style={{ width: '100%' }} />\n                      </Form.Item>\n                    </Col>\n                    <Col span={3}>\n                      <Form.Item\n                        {...restField}\n                        name={[name, 'width']}\n                        label=\"W(cm)\"\n                      >\n                        <InputNumber min={1} placeholder=\"10\" style={{ width: '100%' }} />\n                      </Form.Item>\n                    </Col>\n                    <Col span={3}>\n                      <Form.Item\n                        {...restField}\n                        name={[name, 'height']}\n                        label=\"H(cm)\"\n                      >\n                        <InputNumber min={1} placeholder=\"10\" style={{ width: '100%' }} />\n                      </Form.Item>\n                    </Col>\n                    <Col span={3}>\n                      <Form.Item\n                        {...restField}\n                        name={[name, 'declaredValue']}\n                        label=\"Value($)\"\n                      >\n                        <InputNumber min={0} placeholder=\"0\" style={{ width: '100%' }} />\n                      </Form.Item>\n                    </Col>\n                    <Col span={2}>\n                      <Button type=\"link\" danger onClick={() => remove(name)}>\n                        Remove\n                      </Button>\n                    </Col>\n                  </Row>\n                ))}\n                <Form.Item>\n                  <Button type=\"dashed\" onClick={() => add()} style={{ width: '100%' }}>\n                    + Add Product\n                  </Button>\n                </Form.Item>\n              </>\n            )}\n          </Form.List>\n\n          <Form.Item>\n            <Button \n              type=\"primary\" \n              icon={<CalculateOutlined />} \n              onClick={handleCalculate}\n              loading={loading}\n              size=\"large\"\n            >\n              Calculate Freight\n            </Button>\n          </Form.Item>\n        </Form>\n      </Card>\n\n      {quotes.length > 0 && (\n        <Card title=\"Freight Quotes\">\n          <Table\n            columns={columns}\n            dataSource={quotes}\n            rowKey=\"id\"\n            pagination={false}\n            scroll={{ x: 1100 }}\n          />\n        </Card>\n      )}\n    </div>\n  );\n};\n\nexport default FreightCalc;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Logistics/FreightCalc.tsx"
    },
    "Orders/ExceptionOrder": {
      "path": "Orders/ExceptionOrder",
      "id": "Orders/ExceptionOrder",
      "file": "Orders/ExceptionOrder.tsx",
      "absPath": "/Orders/ExceptionOrder",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Tag,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  Select,\n  message,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  Badge,\n  Tabs,\n  Descriptions,\n  Divider,\n  Alert,\n  Popconfirm,\n} from 'antd';\nimport {\n  WarningOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  SyncOutlined,\n  EyeOutlined,\n  ReloadOutlined,\n  ExclamationCircleOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\nconst { TabPane } = Tabs;\nconst { TextArea } = Input;\n\ninterface ExceptionOrder {\n  id: string;\n  orderId: string;\n  platform: string;\n  customerName: string;\n  totalAmount: number;\n  exceptionType: 'PAYMENT_FAILED' | 'OUT_OF_STOCK' | 'ADDRESS_INVALID' | 'FRAUD_SUSPECTED' | 'SHIPPING_FAILED' | 'OTHER';\n  severity: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';\n  status: 'OPEN' | 'IN_PROGRESS' | 'RESOLVED' | 'ESCALATED';\n  description: string;\n  createdAt: string;\n  assignedTo?: string;\n  resolution?: string;\n}\n\nconst EXCEPTION_TYPE_MAP: Record<string, { color: string; text: string }> = {\n  PAYMENT_FAILED: { color: 'red', text: 'Payment Failed' },\n  OUT_OF_STOCK: { color: 'orange', text: 'Out of Stock' },\n  ADDRESS_INVALID: { color: 'blue', text: 'Invalid Address' },\n  FRAUD_SUSPECTED: { color: 'purple', text: 'Fraud Suspected' },\n  SHIPPING_FAILED: { color: 'cyan', text: 'Shipping Failed' },\n  OTHER: { color: 'default', text: 'Other' },\n};\n\nconst SEVERITY_MAP: Record<string, { color: string; text: string }> = {\n  LOW: { color: 'default', text: 'Low' },\n  MEDIUM: { color: 'blue', text: 'Medium' },\n  HIGH: { color: 'orange', text: 'High' },\n  CRITICAL: { color: 'red', text: 'Critical' },\n};\n\nconst EXCEPTION_STATUS_MAP: Record<string, { color: string; text: string }> = {\n  OPEN: { color: 'error', text: 'Open' },\n  IN_PROGRESS: { color: 'processing', text: 'In Progress' },\n  RESOLVED: { color: 'success', text: 'Resolved' },\n  ESCALATED: { color: 'warning', text: 'Escalated' },\n};\n\nexport const ExceptionOrder: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [exceptions, setExceptions] = useState<ExceptionOrder[]>([]);\n  const [selectedException, setSelectedException] = useState<ExceptionOrder | null>(null);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [resolveModalVisible, setResolveModalVisible] = useState(false);\n  const [activeTab, setActiveTab] = useState('all');\n  const [stats, setStats] = useState({\n    total: 0,\n    open: 0,\n    critical: 0,\n    resolved: 0,\n  });\n\n  useEffect(() => {\n    fetchExceptions();\n  }, []);\n\n  const fetchExceptions = async () => {\n    setLoading(true);\n    try {\n      const mockExceptions: ExceptionOrder[] = [\n        {\n          id: '1',\n          orderId: 'ORD-2026-001',\n          platform: 'AMAZON',\n          customerName: 'John Smith',\n          totalAmount: 159.99,\n          exceptionType: 'PAYMENT_FAILED',\n          severity: 'HIGH',\n          status: 'OPEN',\n          description: 'Payment authorization failed. Customer card was declined.',\n          createdAt: '2026-03-18 10:30:00',\n        },\n        {\n          id: '2',\n          orderId: 'ORD-2026-002',\n          platform: 'EBAY',\n          customerName: 'Emma Wilson',\n          totalAmount: 89.50,\n          exceptionType: 'OUT_OF_STOCK',\n          severity: 'MEDIUM',\n          status: 'IN_PROGRESS',\n          description: 'Item SKU-001 is out of stock. Need to source from supplier.',\n          createdAt: '2026-03-18 09:15:00',\n          assignedTo: 'Agent_001',\n        },\n        {\n          id: '3',\n          orderId: 'ORD-2026-003',\n          platform: 'SHOPIFY',\n          customerName: 'Michael Brown',\n          totalAmount: 245.00,\n          exceptionType: 'ADDRESS_INVALID',\n          severity: 'LOW',\n          status: 'RESOLVED',\n          description: 'Shipping address incomplete. Missing zip code.',\n          createdAt: '2026-03-17 16:45:00',\n          resolution: 'Contacted customer and obtained correct address.',\n        },\n        {\n          id: '4',\n          orderId: 'ORD-2026-004',\n          platform: 'SHOPEE',\n          customerName: 'Sarah Davis',\n          totalAmount: 780.00,\n          exceptionType: 'FRAUD_SUSPECTED',\n          severity: 'CRITICAL',\n          status: 'ESCALATED',\n          description: 'Multiple high-value orders from same IP address. Possible fraud.',\n          createdAt: '2026-03-18 08:00:00',\n          assignedTo: 'Fraud_Team',\n        },\n        {\n          id: '5',\n          orderId: 'ORD-2026-005',\n          platform: 'AMAZON',\n          customerName: 'David Lee',\n          totalAmount: 120.00,\n          exceptionType: 'SHIPPING_FAILED',\n          severity: 'HIGH',\n          status: 'OPEN',\n          description: 'Carrier returned package. Address undeliverable.',\n          createdAt: '2026-03-17 14:20:00',\n        },\n      ];\n\n      setExceptions(mockExceptions);\n      calculateStats(mockExceptions);\n    } catch (error) {\n      message.error('Failed to load exception orders');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const calculateStats = (exceptionList: ExceptionOrder[]) => {\n    setStats({\n      total: exceptionList.length,\n      open: exceptionList.filter((e) => e.status === 'OPEN').length,\n      critical: exceptionList.filter((e) => e.severity === 'CRITICAL').length,\n      resolved: exceptionList.filter((e) => e.status === 'RESOLVED').length,\n    });\n  };\n\n  const handleViewDetail = (exception: ExceptionOrder) => {\n    setSelectedException(exception);\n    setDetailModalVisible(true);\n  };\n\n  const handleResolve = (exception: ExceptionOrder) => {\n    setSelectedException(exception);\n    form.resetFields();\n    setResolveModalVisible(true);\n  };\n\n  const handleSubmitResolution = async () => {\n    try {\n      const values = await form.validateFields();\n      setLoading(true);\n\n      console.log('Resolving exception:', {\n        exceptionId: selectedException?.id,\n        resolution: values.resolution,\n        action: values.action,\n      });\n\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      message.success('Exception resolved successfully');\n      setResolveModalVisible(false);\n      fetchExceptions();\n    } catch (error) {\n      message.error('Failed to resolve exception');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleEscalate = async (exceptionId: string) => {\n    setLoading(true);\n    try {\n      console.log('Escalating exception:', exceptionId);\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Exception escalated to supervisor');\n      fetchExceptions();\n    } catch (error) {\n      message.error('Failed to escalate exception');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleAutoResolve = async (exceptionId: string) => {\n    setLoading(true);\n    try {\n      console.log('Auto-resolving exception:', exceptionId);\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Auto-resolution applied');\n      fetchExceptions();\n    } catch (error) {\n      message.error('Failed to auto-resolve');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const getFilteredExceptions = () => {\n    if (activeTab === 'all') return exceptions;\n    if (activeTab === 'open') return exceptions.filter((e) => e.status === 'OPEN');\n    if (activeTab === 'in_progress') return exceptions.filter((e) => e.status === 'IN_PROGRESS');\n    if (activeTab === 'escalated') return exceptions.filter((e) => e.severity === 'CRITICAL' || e.status === 'ESCALATED');\n    if (activeTab === 'resolved') return exceptions.filter((e) => e.status === 'RESOLVED');\n    return exceptions;\n  };\n\n  const columns: ColumnsType<ExceptionOrder> = [\n    {\n      title: 'Order ID',\n      dataIndex: 'orderId',\n      key: 'orderId',\n      width: 130,\n      render: (text: string, record) => (\n        <a onClick={() => handleViewDetail(record)}>{text}</a>\n      ),\n    },\n    {\n      title: 'Type',\n      dataIndex: 'exceptionType',\n      key: 'exceptionType',\n      width: 140,\n      render: (type: string) => {\n        const config = EXCEPTION_TYPE_MAP[type];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Severity',\n      dataIndex: 'severity',\n      key: 'severity',\n      width: 90,\n      render: (severity: string) => {\n        const config = SEVERITY_MAP[severity];\n        return (\n          <Tag\n            color={config.color}\n            icon={severity === 'CRITICAL' ? <WarningOutlined /> : undefined}\n          >\n            {config.text}\n          </Tag>\n        );\n      },\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 110,\n      render: (status: string) => {\n        const config = EXCEPTION_STATUS_MAP[status];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 120,\n    },\n    {\n      title: 'Amount',\n      dataIndex: 'totalAmount',\n      key: 'totalAmount',\n      width: 90,\n      render: (amount: number) => <strong>${amount.toFixed(2)}</strong>,\n    },\n    {\n      title: 'Description',\n      dataIndex: 'description',\n      key: 'description',\n      ellipsis: true,\n      width: 200,\n    },\n    {\n      title: 'Created',\n      dataIndex: 'createdAt',\n      key: 'createdAt',\n      width: 150,\n    },\n    {\n      title: 'Actions',\n      key: 'action',\n      width: 150,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space>\n          <Tooltip title=\"View Details\">\n            <Button type=\"link\" icon={<EyeOutlined />} onClick={() => handleViewDetail(record)} />\n          </Tooltip>\n          {record.status !== 'RESOLVED' && (\n            <>\n              <Tooltip title=\"Resolve\">\n                <Button type=\"link\" icon={<CheckCircleOutlined />} onClick={() => handleResolve(record)} />\n              </Tooltip>\n              <Popconfirm\n                title=\"Escalate this exception?\"\n                onConfirm={() => handleEscalate(record.id)}\n              >\n                <Tooltip title=\"Escalate\">\n                  <Button type=\"link\" icon={<ExclamationCircleOutlined />} />\n                </Tooltip>\n              </Popconfirm>\n            </>\n          )}\n        </Space>\n      ),\n    },\n  ];\n\n  return (\n    <div className=\"exception-order-page\">\n      {stats.critical > 0 && (\n        <Alert\n          message={`${stats.critical} Critical Exception${stats.critical > 1 ? 's' : ''} Require Immediate Attention`}\n          type=\"error\"\n          showIcon\n          icon={<WarningOutlined />}\n          style={{ marginBottom: 16 }}\n        />\n      )}\n\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Exceptions\"\n              value={stats.total}\n              prefix={<WarningOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Open\"\n              value={stats.open}\n              valueStyle={{ color: '#f5222d' }}\n              prefix={<ExclamationCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Critical\"\n              value={stats.critical}\n              valueStyle={{ color: '#faad14' }}\n              prefix={<WarningOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Resolved\"\n              value={stats.resolved}\n              valueStyle={{ color: '#52c41a' }}\n              prefix={<CheckCircleOutlined />}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card\n        title=\"Exception Order Management\"\n        extra={\n          <Space>\n            <Button icon={<ReloadOutlined />} onClick={fetchExceptions}>\n              Refresh\n            </Button>\n          </Space>\n        }\n      >\n        <Tabs activeKey={activeTab} onChange={setActiveTab}>\n          <TabPane\n            tab={<Badge count={stats.open} offset={[10, 0]} size=\"small\">All</Badge>}\n            key=\"all\"\n          />\n          <TabPane tab=\"Open\" key=\"open\" />\n          <TabPane tab=\"In Progress\" key=\"in_progress\" />\n          <TabPane tab=\"Escalated\" key=\"escalated\" />\n          <TabPane tab=\"Resolved\" key=\"resolved\" />\n        </Tabs>\n\n        <Table\n          columns={columns}\n          dataSource={getFilteredExceptions()}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1300 }}\n          pagination={{\n            showSizeChanger: true,\n            showTotal: (total) => `Total ${total} exceptions`,\n          }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Exception Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>\n            Close\n          </Button>,\n          selectedException?.status !== 'RESOLVED' && (\n            <Button\n              key=\"resolve\"\n              type=\"primary\"\n              onClick={() => {\n                setDetailModalVisible(false);\n                handleResolve(selectedException!);\n              }}\n            >\n              Resolve\n            </Button>\n          ),\n        ]}\n        width={700}\n      >\n        {selectedException && (\n          <>\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"Order ID\">{selectedException.orderId}</Descriptions.Item>\n              <Descriptions.Item label=\"Platform\">{selectedException.platform}</Descriptions.Item>\n              <Descriptions.Item label=\"Exception Type\">\n                <Tag color={EXCEPTION_TYPE_MAP[selectedException.exceptionType].color}>\n                  {EXCEPTION_TYPE_MAP[selectedException.exceptionType].text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Severity\">\n                <Tag color={SEVERITY_MAP[selectedException.severity].color}>\n                  {SEVERITY_MAP[selectedException.severity].text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Status\">\n                <Tag color={EXCEPTION_STATUS_MAP[selectedException.status].color}>\n                  {EXCEPTION_STATUS_MAP[selectedException.status].text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Amount\">${selectedException.totalAmount.toFixed(2)}</Descriptions.Item>\n              <Descriptions.Item label=\"Customer\">{selectedException.customerName}</Descriptions.Item>\n              <Descriptions.Item label=\"Assigned To\">{selectedException.assignedTo || 'Unassigned'}</Descriptions.Item>\n              <Descriptions.Item label=\"Created\">{selectedException.createdAt}</Descriptions.Item>\n            </Descriptions>\n\n            <Divider>Description</Divider>\n            <p>{selectedException.description}</p>\n\n            {selectedException.resolution && (\n              <>\n                <Divider>Resolution</Divider>\n                <p style={{ color: '#52c41a' }}>{selectedException.resolution}</p>\n              </>\n            )}\n          </>\n        )}\n      </Modal>\n\n      <Modal\n        title=\"Resolve Exception\"\n        open={resolveModalVisible}\n        onCancel={() => setResolveModalVisible(false)}\n        onOk={handleSubmitResolution}\n        confirmLoading={loading}\n        width={600}\n      >\n        {selectedException && (\n          <>\n            <Alert\n              message={`${EXCEPTION_TYPE_MAP[selectedException.exceptionType].text} - ${selectedException.orderId}`}\n              description={selectedException.description}\n              type=\"info\"\n              showIcon\n              style={{ marginBottom: 16 }}\n            />\n\n            <Form form={form} layout=\"vertical\">\n              <Form.Item name=\"action\" label=\"Action Taken\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select action\">\n                  <Option value=\"CONTACT_CUSTOMER\">Contact Customer</Option>\n                  <Option value=\"REFUND_ISSUED\">Refund Issued</Option>\n                  <Option value=\"REPLACEMENT_SENT\">Replacement Sent</Option>\n                  <Option value=\"ADDRESS_UPDATED\">Address Updated</Option>\n                  <Option value=\"STOCK_ALLOCATED\">Stock Allocated</Option>\n                  <Option value=\"ORDER_CANCELLED\">Order Cancelled</Option>\n                  <Option value=\"OTHER\">Other</Option>\n                </Select>\n              </Form.Item>\n              <Form.Item name=\"resolution\" label=\"Resolution Notes\" rules={[{ required: true }]}>\n                <TextArea rows={4} placeholder=\"Describe how the exception was resolved...\" />\n              </Form.Item>\n            </Form>\n          </>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default ExceptionOrder;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Orders/ExceptionOrder.tsx"
    },
    "Product/ProductDetail": {
      "path": "Product/ProductDetail",
      "id": "Product/ProductDetail",
      "file": "Product/ProductDetail.tsx",
      "absPath": "/Product/ProductDetail",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Descriptions,\n  Button,\n  Space,\n  Tag,\n  Image,\n  Divider,\n  Row,\n  Col,\n  Tabs,\n  Table,\n  Modal,\n  message,\n  Spin,\n  Typography,\n  Tooltip,\n  Badge,\n} from 'antd';\nimport {\n  ShoppingCartOutlined,\n  EditOutlined,\n  DeleteOutlined,\n  CopyOutlined,\n  HistoryOutlined,\n  ShopOutlined,\n  TagOutlined,\n  DollarOutlined,\n  BoxPlotOutlined,\n  FileImageOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  SyncOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Title, Text } = Typography;\nconst { TabPane } = Tabs;\n\ninterface ProductDetail {\n  id: string;\n  productId: string;\n  platform: string;\n  name: string;\n  description: string;\n  category: string;\n  brand: string;\n  status: 'DRAFT' | 'PENDING' | 'ACTIVE' | 'INACTIVE' | 'SUSPENDED';\n  price: number;\n  costPrice: number;\n  currency: string;\n  stock: number;\n  sku: string;\n  images: string[];\n  attributes: Record<string, string>;\n  variants: ProductVariant[];\n  complianceStatus: 'COMPLIANT' | 'NON_COMPLIANT' | 'PENDING_REVIEW';\n  certificates: string[];\n  createdAt: string;\n  updatedAt: string;\n  publishedAt?: string;\n}\n\ninterface ProductVariant {\n  id: string;\n  sku: string;\n  name: string;\n  price: number;\n  stock: number;\n  attributes: Record<string, string>;\n}\n\ninterface PriceHistory {\n  id: string;\n  price: number;\n  currency: string;\n  changedAt: string;\n  changedBy: string;\n  reason: string;\n}\n\ninterface StockHistory {\n  id: string;\n  quantity: number;\n  type: 'IN' | 'OUT';\n  reason: string;\n  createdAt: string;\n}\n\nconst MOCK_PRODUCT: ProductDetail = {\n  id: '1',\n  productId: 'P-2026-001',\n  platform: 'Amazon',\n  name: 'Industrial Temperature Sensor Pro',\n  description: 'High-precision industrial temperature sensor with digital output. Suitable for manufacturing environments with temperature range -40°C to +125°C.',\n  category: 'Industrial Automation > Sensors',\n  brand: 'TechPro',\n  status: 'ACTIVE',\n  price: 89.99,\n  costPrice: 45.00,\n  currency: 'USD',\n  stock: 256,\n  sku: 'TP-TEMP-001',\n  images: [\n    'https://via.placeholder.com/400x400?text=Product+1',\n    'https://via.placeholder.com/400x400?text=Product+2',\n    'https://via.placeholder.com/400x400?text=Product+3',\n  ],\n  attributes: {\n    'Temperature Range': '-40°C to +125°C',\n    'Accuracy': '±0.5°C',\n    'Output Type': 'Digital (I2C)',\n    'Power Supply': '3.3V - 5V DC',\n    'Housing Material': 'Stainless Steel 316',\n    'IP Rating': 'IP67',\n  },\n  variants: [\n    { id: 'v1', sku: 'TP-TEMP-001-A', name: 'Standard Cable 1m', price: 89.99, stock: 150, attributes: { 'Cable Length': '1m' } },\n    { id: 'v2', sku: 'TP-TEMP-001-B', name: 'Extended Cable 3m', price: 99.99, stock: 80, attributes: { 'Cable Length': '3m' } },\n    { id: 'v3', sku: 'TP-TEMP-001-C', name: 'Extended Cable 5m', price: 109.99, stock: 26, attributes: { 'Cable Length': '5m' } },\n  ],\n  complianceStatus: 'COMPLIANT',\n  certificates: ['CE', 'FCC', 'RoHS'],\n  createdAt: '2025-12-15 10:00:00',\n  updatedAt: '2026-03-18 14:30:00',\n  publishedAt: '2025-12-20 09:00:00',\n};\n\nconst MOCK_PRICE_HISTORY: PriceHistory[] = [\n  { id: '1', price: 89.99, currency: 'USD', changedAt: '2026-03-18 14:30:00', changedBy: 'System', reason: 'Market price adjustment' },\n  { id: '2', price: 84.99, currency: 'USD', changedAt: '2026-02-01 10:00:00', changedBy: 'Admin', reason: 'Promotional pricing' },\n  { id: '3', price: 94.99, currency: 'USD', changedAt: '2025-12-20 09:00:00', changedBy: 'Admin', reason: 'Initial listing price' },\n];\n\nconst MOCK_STOCK_HISTORY: StockHistory[] = [\n  { id: '1', quantity: 50, type: 'IN', reason: 'Restock from supplier', createdAt: '2026-03-15 08:00:00' },\n  { id: '2', quantity: 25, type: 'OUT', reason: 'Order #ORD-2026-1234', createdAt: '2026-03-14 16:30:00' },\n  { id: '3', quantity: 100, type: 'IN', reason: 'Initial stock', createdAt: '2025-12-20 09:00:00' },\n];\n\nconst STATUS_CONFIG: Record<string, { color: string; text: string }> = {\n  DRAFT: { color: 'default', text: 'Draft' },\n  PENDING: { color: 'processing', text: 'Pending Review' },\n  ACTIVE: { color: 'success', text: 'Active' },\n  INACTIVE: { color: 'warning', text: 'Inactive' },\n  SUSPENDED: { color: 'error', text: 'Suspended' },\n};\n\nconst COMPLIANCE_CONFIG: Record<string, { color: string; icon: React.ReactNode }> = {\n  COMPLIANT: { color: 'success', icon: <CheckCircleOutlined /> },\n  NON_COMPLIANT: { color: 'error', icon: <CloseCircleOutlined /> },\n  PENDING_REVIEW: { color: 'warning', icon: <SyncOutlined spin /> },\n};\n\nexport const ProductDetail: React.FC = () => {\n  const [loading, setLoading] = useState(true);\n  const [product, setProduct] = useState<ProductDetail | null>(null);\n  const [priceHistory, setPriceHistory] = useState<PriceHistory[]>([]);\n  const [stockHistory, setStockHistory] = useState<StockHistory[]>([]);\n  const [editModalVisible, setEditModalVisible] = useState(false);\n\n  useEffect(() => {\n    fetchProductDetail();\n  }, []);\n\n  const fetchProductDetail = async () => {\n    setLoading(true);\n    await new Promise(resolve => setTimeout(resolve, 800));\n    setProduct(MOCK_PRODUCT);\n    setPriceHistory(MOCK_PRICE_HISTORY);\n    setStockHistory(MOCK_STOCK_HISTORY);\n    setLoading(false);\n  };\n\n  const handleEdit = () => {\n    setEditModalVisible(true);\n  };\n\n  const handleDelete = () => {\n    Modal.confirm({\n      title: 'Delete Product',\n      content: 'Are you sure you want to delete this product? This action cannot be undone.',\n      okText: 'Delete',\n      okType: 'danger',\n      onOk: () => {\n        message.success('Product deleted successfully');\n      },\n    });\n  };\n\n  const handleDuplicate = () => {\n    message.success('Product duplicated. Redirecting to edit page...');\n  };\n\n  const handlePublish = () => {\n    Modal.confirm({\n      title: 'Publish Product',\n      content: 'Publish this product to all connected platforms?',\n      onOk: () => {\n        message.success('Product published successfully');\n      },\n    });\n  };\n\n  const priceColumns: ColumnsType<PriceHistory> = [\n    { title: 'Price', dataIndex: 'price', key: 'price', render: (v, r) => `${r.currency} ${v.toFixed(2)}` },\n    { title: 'Changed At', dataIndex: 'changedAt', key: 'changedAt' },\n    { title: 'Changed By', dataIndex: 'changedBy', key: 'changedBy' },\n    { title: 'Reason', dataIndex: 'reason', key: 'reason' },\n  ];\n\n  const stockColumns: ColumnsType<StockHistory> = [\n    { \n      title: 'Type', \n      dataIndex: 'type', \n      key: 'type',\n      render: (type: string) => (\n        <Tag color={type === 'IN' ? 'green' : 'red'}>\n          {type === 'IN' ? 'Stock In' : 'Stock Out'}\n        </Tag>\n      )\n    },\n    { title: 'Quantity', dataIndex: 'quantity', key: 'quantity' },\n    { title: 'Reason', dataIndex: 'reason', key: 'reason' },\n    { title: 'Date', dataIndex: 'createdAt', key: 'createdAt' },\n  ];\n\n  const variantColumns: ColumnsType<ProductVariant> = [\n    { title: 'SKU', dataIndex: 'sku', key: 'sku' },\n    { title: 'Name', dataIndex: 'name', key: 'name' },\n    { title: 'Price', dataIndex: 'price', key: 'price', render: (v) => `USD ${v.toFixed(2)}` },\n    { \n      title: 'Stock', \n      dataIndex: 'stock', \n      key: 'stock',\n      render: (stock: number) => (\n        <Badge \n          count={stock} \n          showZero \n          style={{ backgroundColor: stock > 50 ? '#52c41a' : stock > 10 ? '#faad14' : '#ff4d4f' }}\n        />\n      )\n    },\n  ];\n\n  if (loading) {\n    return (\n      <div style={{ textAlign: 'center', padding: '100px 0' }}>\n        <Spin size=\"large\" />\n      </div>\n    );\n  }\n\n  if (!product) {\n    return <div>Product not found</div>;\n  }\n\n  const profitMargin = ((product.price - product.costPrice) / product.price * 100).toFixed(1);\n  const statusConfig = STATUS_CONFIG[product.status];\n  const complianceConfig = COMPLIANCE_CONFIG[product.complianceStatus];\n\n  return (\n    <div className=\"product-detail-page\">\n      <Card>\n        <Row gutter={24}>\n          <Col span={8}>\n            <Image.PreviewGroup>\n              <Image\n                src={product.images[0]}\n                alt={product.name}\n                style={{ width: '100%', borderRadius: 8 }}\n              />\n              <div style={{ display: 'none' }}>\n                {product.images.slice(1).map((img, idx) => (\n                  <Image key={idx} src={img} />\n                ))}\n              </div>\n            </Image.PreviewGroup>\n            <Space style={{ marginTop: 16, width: '100%' }} wrap>\n              {product.images.map((img, idx) => (\n                <Image\n                  key={idx}\n                  src={img}\n                  width={60}\n                  height={60}\n                  style={{ borderRadius: 4, objectFit: 'cover', cursor: 'pointer' }}\n                />\n              ))}\n            </Space>\n          </Col>\n          <Col span={16}>\n            <Space direction=\"vertical\" style={{ width: '100%' }} size=\"large\">\n              <div>\n                <Space>\n                  <Tag color=\"blue\">{product.platform}</Tag>\n                  <Tag color={statusConfig.color}>{statusConfig.text}</Tag>\n                  <Tag color={complianceConfig.color} icon={complianceConfig.icon}>\n                    {product.complianceStatus.replace('_', ' ')}\n                  </Tag>\n                </Space>\n                <Title level={3} style={{ marginTop: 8, marginBottom: 0 }}>{product.name}</Title>\n                <Text type=\"secondary\">SKU: {product.sku} | ID: {product.productId}</Text>\n              </div>\n\n              <Descriptions column={2} size=\"small\">\n                <Descriptions.Item label=\"Category\">{product.category}</Descriptions.Item>\n                <Descriptions.Item label=\"Brand\">{product.brand}</Descriptions.Item>\n                <Descriptions.Item label={<><DollarOutlined /> Price</>}>\n                  <Text strong style={{ fontSize: 18 }}>{product.currency} {product.price.toFixed(2)}</Text>\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Cost Price\">\n                  {product.currency} {product.costPrice.toFixed(2)}\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Profit Margin\">\n                  <Tag color={parseFloat(profitMargin) >= 30 ? 'green' : parseFloat(profitMargin) >= 15 ? 'orange' : 'red'}>\n                    {profitMargin}%\n                  </Tag>\n                </Descriptions.Item>\n                <Descriptions.Item label={<><BoxPlotOutlined /> Stock</>}>\n                  <Badge \n                    count={product.stock} \n                    showZero \n                    style={{ backgroundColor: product.stock > 50 ? '#52c41a' : product.stock > 10 ? '#faad14' : '#ff4d4f' }}\n                  />\n                </Descriptions.Item>\n              </Descriptions>\n\n              <div>\n                <Text strong>Certificates: </Text>\n                {product.certificates.map(cert => (\n                  <Tag key={cert} icon={<CheckCircleOutlined />} color=\"green\">{cert}</Tag>\n                ))}\n              </div>\n\n              <Divider style={{ margin: '12px 0' }} />\n\n              <Space>\n                <Button type=\"primary\" icon={<EditOutlined />} onClick={handleEdit}>Edit</Button>\n                <Button icon={<CopyOutlined />} onClick={handleDuplicate}>Duplicate</Button>\n                <Button icon={<ShopOutlined />} onClick={handlePublish}>Publish</Button>\n                <Button danger icon={<DeleteOutlined />} onClick={handleDelete}>Delete</Button>\n              </Space>\n            </Space>\n          </Col>\n        </Row>\n      </Card>\n\n      <Card style={{ marginTop: 16 }}>\n        <Tabs defaultActiveKey=\"description\">\n          <TabPane tab=\"Description\" key=\"description\">\n            <Text style={{ whiteSpace: 'pre-wrap' }}>{product.description}</Text>\n          </TabPane>\n          <TabPane tab=\"Attributes\" key=\"attributes\">\n            <Descriptions column={2} bordered size=\"small\">\n              {Object.entries(product.attributes).map(([key, value]) => (\n                <Descriptions.Item key={key} label={key}>{value}</Descriptions.Item>\n              ))}\n            </Descriptions>\n          </TabPane>\n          <TabPane tab=\"Variants\" key=\"variants\">\n            <Table\n              columns={variantColumns}\n              dataSource={product.variants}\n              rowKey=\"id\"\n              pagination={false}\n              size=\"small\"\n            />\n          </TabPane>\n          <TabPane tab={<><HistoryOutlined /> Price History</>} key=\"priceHistory\">\n            <Table\n              columns={priceColumns}\n              dataSource={priceHistory}\n              rowKey=\"id\"\n              pagination={{ pageSize: 5 }}\n              size=\"small\"\n            />\n          </TabPane>\n          <TabPane tab={<><BoxPlotOutlined /> Stock History</>} key=\"stockHistory\">\n            <Table\n              columns={stockColumns}\n              dataSource={stockHistory}\n              rowKey=\"id\"\n              pagination={{ pageSize: 5 }}\n              size=\"small\"\n            />\n          </TabPane>\n        </Tabs>\n      </Card>\n\n      <Modal\n        title=\"Edit Product\"\n        open={editModalVisible}\n        onCancel={() => setEditModalVisible(false)}\n        footer={null}\n        width={800}\n      >\n        <p>Edit form will be implemented here...</p>\n      </Modal>\n    </div>\n  );\n};\n\nexport default ProductDetail;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Product/ProductDetail.tsx"
    },
    "UserAsset/MemberLevel": {
      "path": "UserAsset/MemberLevel",
      "id": "UserAsset/MemberLevel",
      "file": "UserAsset/MemberLevel.tsx",
      "absPath": "/UserAsset/MemberLevel",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  InputNumber,\n  Select,\n  Tag,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  message,\n  Badge,\n  Progress,\n  Descriptions,\n  Divider,\n  Alert,\n  Switch,\n  Slider,\n  List,\n  Avatar,\n  Timeline,\n} from 'antd';\nimport {\n  CrownOutlined,\n  StarOutlined,\n  TrophyOutlined,\n  EditOutlined,\n  PlusOutlined,\n  DeleteOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  SettingOutlined,\n  GiftOutlined,\n  DollarOutlined,\n  PercentageOutlined,\n  ThunderboltOutlined,\n  RiseOutlined,\n  UserOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs from 'dayjs';\n\nconst { Option } = Select;\n\ntype MemberLevel = 'BRONZE' | 'SILVER' | 'GOLD' | 'PLATINUM' | 'DIAMOND';\n\ninterface MemberLevelRule {\n  id: string;\n  tenantId: string;\n  level: MemberLevel;\n  levelName: string;\n  minScore: number;\n  maxScore: number;\n  discount: number;\n  pointsMultiplier: number;\n  benefits: string[];\n  isActive: boolean;\n  createdAt: string;\n  updatedAt: string;\n}\n\ninterface MemberStatistics {\n  totalMembers: number;\n  levelDistribution: Record<MemberLevel, number>;\n  upgradeCount: number;\n  downgradeCount: number;\n  avgMemberScore: number;\n}\n\ninterface LevelChangeLog {\n  id: string;\n  userId: string;\n  userName: string;\n  oldLevel: MemberLevel;\n  newLevel: MemberLevel;\n  reason: string;\n  changedAt: string;\n}\n\nconst LEVEL_COLORS: Record<MemberLevel, string> = {\n  BRONZE: '#cd7f32',\n  SILVER: '#c0c0c0',\n  GOLD: '#ffd700',\n  PLATINUM: '#e5e4e2',\n  DIAMOND: '#b9f2ff',\n};\n\nconst LEVEL_NAMES: Record<MemberLevel, string> = {\n  BRONZE: '青铜会员',\n  SILVER: '白银会员',\n  GOLD: '黄金会员',\n  PLATINUM: '铂金会员',\n  DIAMOND: '钻石会员',\n};\n\nconst LEVEL_ICONS: Record<MemberLevel, React.ReactNode> = {\n  BRONZE: <StarOutlined />,\n  SILVER: <StarOutlined />,\n  GOLD: <CrownOutlined />,\n  PLATINUM: <CrownOutlined />,\n  DIAMOND: <CrownOutlined />,\n};\n\nconst MOCK_LEVEL_RULES: MemberLevelRule[] = [\n  {\n    id: 'LR001',\n    tenantId: 'T001',\n    level: 'BRONZE',\n    levelName: '青铜会员',\n    minScore: 0,\n    maxScore: 999,\n    discount: 1.00,\n    pointsMultiplier: 1.0,\n    benefits: ['生日优惠', '积分兑换'],\n    isActive: true,\n    createdAt: '2025-01-01 00:00:00',\n    updatedAt: '2025-01-01 00:00:00',\n  },\n  {\n    id: 'LR002',\n    tenantId: 'T001',\n    level: 'SILVER',\n    levelName: '白银会员',\n    minScore: 1000,\n    maxScore: 4999,\n    discount: 0.98,\n    pointsMultiplier: 1.1,\n    benefits: ['生日优惠', '积分兑换', '专属客服', '优先发货'],\n    isActive: true,\n    createdAt: '2025-01-01 00:00:00',\n    updatedAt: '2025-01-01 00:00:00',\n  },\n  {\n    id: 'LR003',\n    tenantId: 'T001',\n    level: 'GOLD',\n    levelName: '黄金会员',\n    minScore: 5000,\n    maxScore: 19999,\n    discount: 0.95,\n    pointsMultiplier: 1.2,\n    benefits: ['生日优惠', '积分兑换', '专属客服', '优先发货', '专属折扣', '免费退换'],\n    isActive: true,\n    createdAt: '2025-01-01 00:00:00',\n    updatedAt: '2025-01-01 00:00:00',\n  },\n  {\n    id: 'LR004',\n    tenantId: 'T001',\n    level: 'PLATINUM',\n    levelName: '铂金会员',\n    minScore: 20000,\n    maxScore: 99999,\n    discount: 0.90,\n    pointsMultiplier: 1.3,\n    benefits: ['生日优惠', '积分兑换', '专属客服', '优先发货', '专属折扣', '免费退换', 'VIP活动', '专属礼品'],\n    isActive: true,\n    createdAt: '2025-01-01 00:00:00',\n    updatedAt: '2025-01-01 00:00:00',\n  },\n  {\n    id: 'LR005',\n    tenantId: 'T001',\n    level: 'DIAMOND',\n    levelName: '钻石会员',\n    minScore: 100000,\n    maxScore: 999999999,\n    discount: 0.85,\n    pointsMultiplier: 1.5,\n    benefits: ['生日优惠', '积分兑换', '专属客服', '优先发货', '专属折扣', '免费退换', 'VIP活动', '专属礼品', '私人定制', '年度礼包'],\n    isActive: true,\n    createdAt: '2025-01-01 00:00:00',\n    updatedAt: '2025-01-01 00:00:00',\n  },\n];\n\nconst MOCK_STATISTICS: MemberStatistics = {\n  totalMembers: 1256,\n  levelDistribution: {\n    BRONZE: 580,\n    SILVER: 420,\n    GOLD: 180,\n    PLATINUM: 60,\n    DIAMOND: 16,\n  },\n  upgradeCount: 45,\n  downgradeCount: 8,\n  avgMemberScore: 4580,\n};\n\nconst MOCK_CHANGE_LOGS: LevelChangeLog[] = [\n  {\n    id: 'CL001',\n    userId: 'U001',\n    userName: '张三',\n    oldLevel: 'SILVER',\n    newLevel: 'GOLD',\n    reason: '消费积分达标自动升级',\n    changedAt: '2026-03-18 14:30:00',\n  },\n  {\n    id: 'CL002',\n    userId: 'U005',\n    userName: '孙七',\n    oldLevel: 'BRONZE',\n    newLevel: 'SILVER',\n    reason: '消费积分达标自动升级',\n    changedAt: '2026-03-17 10:20:00',\n  },\n  {\n    id: 'CL003',\n    userId: 'U006',\n    userName: '周八',\n    oldLevel: 'GOLD',\n    newLevel: 'SILVER',\n    reason: '年度积分清零降级',\n    changedAt: '2026-01-01 00:00:00',\n  },\n];\n\nexport const MemberLevel: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [levelRules, setLevelRules] = useState<MemberLevelRule[]>(MOCK_LEVEL_RULES);\n  const [statistics, setStatistics] = useState<MemberStatistics>(MOCK_STATISTICS);\n  const [changeLogs, setChangeLogs] = useState<LevelChangeLog[]>(MOCK_CHANGE_LOGS);\n  const [editModalVisible, setEditModalVisible] = useState(false);\n  const [selectedRule, setSelectedRule] = useState<MemberLevelRule | null>(null);\n  const [benefitInput, setBenefitInput] = useState('');\n\n  useEffect(() => {\n    loadLevelRules();\n  }, []);\n\n  const loadLevelRules = async () => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 500));\n      setLevelRules(MOCK_LEVEL_RULES);\n      setStatistics(MOCK_STATISTICS);\n      setChangeLogs(MOCK_CHANGE_LOGS);\n    } catch (error) {\n      message.error('加载会员等级数据失败');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleEditRule = (rule: MemberLevelRule) => {\n    setSelectedRule(rule);\n    form.setFieldsValue({\n      minScore: rule.minScore,\n      maxScore: rule.maxScore,\n      discount: rule.discount * 100,\n      pointsMultiplier: rule.pointsMultiplier,\n      benefits: rule.benefits,\n      isActive: rule.isActive,\n    });\n    setEditModalVisible(true);\n  };\n\n  const handleSaveRule = async (values: any) => {\n    try {\n      message.success('等级规则更新成功');\n      setEditModalVisible(false);\n      form.resetFields();\n      loadLevelRules();\n    } catch (error) {\n      message.error('更新失败');\n    }\n  };\n\n  const handleToggleActive = (rule: MemberLevelRule) => {\n    message.success(`${rule.levelName} 已${rule.isActive ? '停用' : '启用'}`);\n    loadLevelRules();\n  };\n\n  const columns: ColumnsType<MemberLevelRule> = [\n    {\n      title: '等级',\n      dataIndex: 'level',\n      key: 'level',\n      width: 150,\n      render: (level: MemberLevel, record) => (\n        <Space>\n          <Avatar \n            style={{ backgroundColor: LEVEL_COLORS[level] }} \n            icon={LEVEL_ICONS[level]} \n          />\n          <Tag color={LEVEL_COLORS[level]}>{record.levelName}</Tag>\n        </Space>\n      ),\n    },\n    {\n      title: '积分区间',\n      key: 'scoreRange',\n      width: 180,\n      render: (_, record) => (\n        <span>\n          {record.minScore.toLocaleString()} - {record.maxScore === 999999999 ? '∞' : record.maxScore.toLocaleString()}\n        </span>\n      ),\n    },\n    {\n      title: '折扣率',\n      dataIndex: 'discount',\n      key: 'discount',\n      width: 100,\n      render: (discount: number) => (\n        <Tag color={discount < 1 ? 'green' : 'default'}>\n          <PercentageOutlined /> {(discount * 100).toFixed(0)}%\n        </Tag>\n      ),\n    },\n    {\n      title: '积分倍率',\n      dataIndex: 'pointsMultiplier',\n      key: 'pointsMultiplier',\n      width: 100,\n      render: (multiplier: number) => (\n        <Tag color=\"blue\">\n          <ThunderboltOutlined /> {multiplier}x\n        </Tag>\n      ),\n    },\n    {\n      title: '权益数量',\n      dataIndex: 'benefits',\n      key: 'benefits',\n      width: 100,\n      render: (benefits: string[]) => (\n        <Badge count={benefits.length} showZero style={{ backgroundColor: '#1890ff' }} />\n      ),\n    },\n    {\n      title: '权益列表',\n      dataIndex: 'benefits',\n      key: 'benefitsList',\n      ellipsis: true,\n      render: (benefits: string[]) => (\n        <Tooltip title={benefits.join('、')}>\n          <span style={{ color: '#666' }}>{benefits.slice(0, 3).join('、')}{benefits.length > 3 ? '...' : ''}</span>\n        </Tooltip>\n      ),\n    },\n    {\n      title: '状态',\n      dataIndex: 'isActive',\n      key: 'isActive',\n      width: 100,\n      render: (isActive: boolean) => (\n        <Tag color={isActive ? 'green' : 'red'} icon={isActive ? <CheckCircleOutlined /> : <CloseCircleOutlined />}>\n          {isActive ? '启用' : '停用'}\n        </Tag>\n      ),\n    },\n    {\n      title: '操作',\n      key: 'action',\n      width: 150,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space>\n          <Button \n            type=\"link\" \n            size=\"small\" \n            icon={<EditOutlined />}\n            onClick={() => handleEditRule(record)}\n          >\n            编辑\n          </Button>\n          <Button \n            type=\"link\" \n            size=\"small\"\n            onClick={() => handleToggleActive(record)}\n          >\n            {record.isActive ? '停用' : '启用'}\n          </Button>\n        </Space>\n      ),\n    },\n  ];\n\n  const renderStatistics = () => (\n    <Row gutter={16}>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"会员总数\"\n            value={statistics.totalMembers}\n            prefix={<UserOutlined />}\n            valueStyle={{ color: '#1890ff' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"本月升级\"\n            value={statistics.upgradeCount}\n            prefix={<RiseOutlined />}\n            valueStyle={{ color: '#52c41a' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"本月降级\"\n            value={statistics.downgradeCount}\n            prefix={<RiseOutlined rotate={180} />}\n            valueStyle={{ color: '#ff4d4f' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"平均积分\"\n            value={statistics.avgMemberScore}\n            prefix={<StarOutlined />}\n            valueStyle={{ color: '#faad14' }}\n          />\n        </Card>\n      </Col>\n      <Col span={8}>\n        <Card title=\"等级分布\">\n          <Row gutter={8}>\n            {Object.entries(statistics.levelDistribution).map(([level, count]) => (\n              <Col span={4} key={level}>\n                <Tooltip title={`${LEVEL_NAMES[level as MemberLevel]}: ${count}人`}>\n                  <div style={{ textAlign: 'center', cursor: 'pointer' }}>\n                    <Avatar \n                      size=\"small\" \n                      style={{ backgroundColor: LEVEL_COLORS[level as MemberLevel] }} \n                      icon={LEVEL_ICONS[level as MemberLevel]} \n                    />\n                    <div style={{ fontSize: 12, marginTop: 4 }}>{count}</div>\n                  </div>\n                </Tooltip>\n              </Col>\n            ))}\n          </Row>\n        </Card>\n      </Col>\n    </Row>\n  );\n\n  const renderLevelPreview = () => (\n    <Card title=\"等级权益预览\" style={{ marginTop: 16 }}>\n      <Row gutter={16}>\n        {levelRules.filter(r => r.isActive).map(rule => (\n          <Col span={4} key={rule.id}>\n            <Card \n              size=\"small\"\n              style={{ \n                borderColor: LEVEL_COLORS[rule.level],\n                borderWidth: 2,\n              }}\n            >\n              <div style={{ textAlign: 'center' }}>\n                <Avatar \n                  size={48} \n                  style={{ backgroundColor: LEVEL_COLORS[rule.level] }} \n                  icon={LEVEL_ICONS[rule.level]} \n                />\n                <div style={{ fontWeight: 500, marginTop: 8 }}>{rule.levelName}</div>\n                <div style={{ fontSize: 12, color: '#999' }}>\n                  {rule.minScore.toLocaleString()}+ 积分\n                </div>\n                <Divider style={{ margin: '12px 0' }} />\n                <div style={{ fontSize: 12 }}>\n                  <div><PercentageOutlined /> 折扣: {(rule.discount * 100).toFixed(0)}%</div>\n                  <div><ThunderboltOutlined /> 积分: {rule.pointsMultiplier}x</div>\n                  <div><GiftOutlined /> 权益: {rule.benefits.length}项</div>\n                </div>\n              </div>\n            </Card>\n          </Col>\n        ))}\n      </Row>\n    </Card>\n  );\n\n  const renderChangeLogs = () => (\n    <Card title=\"等级变动记录\" style={{ marginTop: 16 }}>\n      <Table\n        dataSource={changeLogs}\n        rowKey=\"id\"\n        size=\"small\"\n        pagination={{ pageSize: 5 }}\n        columns={[\n          {\n            title: '用户',\n            key: 'user',\n            render: (_, record) => (\n              <Space>\n                <Avatar icon={<UserOutlined />} />\n                <span>{record.userName}</span>\n              </Space>\n            ),\n          },\n          {\n            title: '变动',\n            key: 'change',\n            render: (_, record) => (\n              <Space>\n                <Tag color={LEVEL_COLORS[record.oldLevel]}>{LEVEL_NAMES[record.oldLevel]}</Tag>\n                <RiseOutlined rotate={record.oldLevel < record.newLevel ? 0 : 180} />\n                <Tag color={LEVEL_COLORS[record.newLevel]}>{LEVEL_NAMES[record.newLevel]}</Tag>\n              </Space>\n            ),\n          },\n          {\n            title: '原因',\n            dataIndex: 'reason',\n            key: 'reason',\n          },\n          {\n            title: '时间',\n            dataIndex: 'changedAt',\n            key: 'changedAt',\n            render: (time: string) => dayjs(time).format('YYYY-MM-DD HH:mm'),\n          },\n        ]}\n      />\n    </Card>\n  );\n\n  const renderEditModal = () => (\n    <Modal\n      title={`编辑 ${selectedRule?.levelName || ''} 规则`}\n      open={editModalVisible}\n      onCancel={() => {\n        setEditModalVisible(false);\n        form.resetFields();\n      }}\n      onOk={() => form.submit()}\n      width={600}\n    >\n      <Alert\n        message=\"修改等级规则将影响所有该等级会员的权益，请谨慎操作\"\n        type=\"warning\"\n        showIcon\n        style={{ marginBottom: 16 }}\n      />\n      \n      <Form\n        form={form}\n        layout=\"vertical\"\n        onFinish={handleSaveRule}\n      >\n        <Row gutter={16}>\n          <Col span={12}>\n            <Form.Item\n              name=\"minScore\"\n              label=\"最低积分\"\n              rules={[{ required: true, message: '请输入最低积分' }]}\n            >\n              <InputNumber min={0} style={{ width: '100%' }} />\n            </Form.Item>\n          </Col>\n          <Col span={12}>\n            <Form.Item\n              name=\"maxScore\"\n              label=\"最高积分\"\n              rules={[{ required: true, message: '请输入最高积分' }]}\n            >\n              <InputNumber min={0} style={{ width: '100%' }} />\n            </Form.Item>\n          </Col>\n        </Row>\n        \n        <Row gutter={16}>\n          <Col span={12}>\n            <Form.Item\n              name=\"discount\"\n              label=\"折扣率 (%)\"\n              rules={[{ required: true, message: '请输入折扣率' }]}\n            >\n              <Slider \n                min={50} \n                max={100} \n                marks={{ 50: '50%', 75: '75%', 100: '100%' }}\n              />\n            </Form.Item>\n          </Col>\n          <Col span={12}>\n            <Form.Item\n              name=\"pointsMultiplier\"\n              label=\"积分倍率\"\n              rules={[{ required: true, message: '请输入积分倍率' }]}\n            >\n              <Select>\n                <Option value={1.0}>1.0x (标准)</Option>\n                <Option value={1.1}>1.1x</Option>\n                <Option value={1.2}>1.2x</Option>\n                <Option value={1.3}>1.3x</Option>\n                <Option value={1.5}>1.5x</Option>\n                <Option value={2.0}>2.0x (双倍)</Option>\n              </Select>\n            </Form.Item>\n          </Col>\n        </Row>\n        \n        <Form.Item\n          name=\"benefits\"\n          label=\"会员权益\"\n        >\n          <Select mode=\"tags\" placeholder=\"输入权益后回车添加\">\n            <Option value=\"生日优惠\">生日优惠</Option>\n            <Option value=\"积分兑换\">积分兑换</Option>\n            <Option value=\"专属客服\">专属客服</Option>\n            <Option value=\"优先发货\">优先发货</Option>\n            <Option value=\"专属折扣\">专属折扣</Option>\n            <Option value=\"免费退换\">免费退换</Option>\n            <Option value=\"VIP活动\">VIP活动</Option>\n            <Option value=\"专属礼品\">专属礼品</Option>\n            <Option value=\"私人定制\">私人定制</Option>\n            <Option value=\"年度礼包\">年度礼包</Option>\n          </Select>\n        </Form.Item>\n        \n        <Form.Item\n          name=\"isActive\"\n          label=\"状态\"\n          valuePropName=\"checked\"\n        >\n          <Switch checkedChildren=\"启用\" unCheckedChildren=\"停用\" />\n        </Form.Item>\n      </Form>\n    </Modal>\n  );\n\n  return (\n    <div style={{ padding: 24 }}>\n      <Card title=\"会员等级管理\" style={{ marginBottom: 16 }}>\n        {renderStatistics()}\n      </Card>\n\n      <Card>\n        <Row style={{ marginBottom: 16 }}>\n          <Space>\n            <Button type=\"primary\" icon={<SettingOutlined />}>\n              批量调整\n            </Button>\n            <Button icon={<RiseOutlined />}>\n              重新计算等级\n            </Button>\n          </Space>\n        </Row>\n\n        <Table\n          columns={columns}\n          dataSource={levelRules}\n          rowKey=\"id\"\n          loading={loading}\n          pagination={false}\n        />\n      </Card>\n\n      {renderLevelPreview()}\n      {renderChangeLogs()}\n      {renderEditModal()}\n    </div>\n  );\n};\n\nexport default MemberLevel;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/UserAsset/MemberLevel.tsx"
    },
    "ABTest/ABTestResults": {
      "path": "ABTest/ABTestResults",
      "id": "ABTest/ABTestResults",
      "file": "ABTest/ABTestResults.tsx",
      "absPath": "/ABTest/ABTestResults",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Tag,\n  Typography,\n  Statistic,\n  Row,\n  Col,\n  Progress,\n  Alert,\n  Button,\n  Space,\n  Tabs,\n  DatePicker,\n  Select,\n  Tooltip,\n  Badge,\n  Divider,\n  Empty,\n} from 'antd';\nimport {\n  ExperimentOutlined,\n  TrophyOutlined,\n  ArrowUpOutlined,\n  ArrowDownOutlined,\n  InfoCircleOutlined,\n  DownloadOutlined,\n  SyncOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  MinusCircleOutlined,\n} from '@ant-design/icons';\nimport {\n  LineChart,\n  Line,\n  XAxis,\n  YAxis,\n  CartesianGrid,\n  Tooltip as RechartsTooltip,\n  Legend,\n  ResponsiveContainer,\n  BarChart,\n  Bar,\n  PieChart,\n  Pie,\n  Cell,\n} from 'recharts';\nimport type { Dayjs } from 'dayjs';\n\nconst { Title, Text, Paragraph } = Typography;\nconst { TabPane } = Tabs;\nconst { RangePicker } = DatePicker;\nconst { Option } = Select;\n\ninterface TestResult {\n  id: string;\n  name: string;\n  status: 'RUNNING' | 'COMPLETED' | 'PAUSED' | 'DRAFT';\n  type: string;\n  startDate: string;\n  endDate?: string;\n  totalVisitors: number;\n  totalConversions: number;\n  confidenceLevel: number;\n  winner?: string;\n  variants: VariantResult[];\n}\n\ninterface VariantResult {\n  id: string;\n  name: string;\n  isControl: boolean;\n  visitors: number;\n  conversions: number;\n  conversionRate: number;\n  improvement: number;\n  confidenceInterval: [number, number];\n  isWinner: boolean;\n  isSignificant: boolean;\n}\n\ninterface DailyMetric {\n  date: string;\n  control: number;\n  variant: number;\n}\n\nexport const ABTestResultsPage: React.FC = () => {\n  const [loading, setLoading] = useState(false);\n  const [selectedTest, setSelectedTest] = useState<string | null>(null);\n  const [dateRange, setDateRange] = useState<[Dayjs, Dayjs] | null>(null);\n  const [activeTab, setActiveTab] = useState('overview');\n\n  // Mock data\n  const testResults: TestResult[] = [\n    {\n      id: 'test-001',\n      name: 'Homepage Banner Test',\n      status: 'COMPLETED',\n      type: 'UI',\n      startDate: '2024-03-01',\n      endDate: '2024-03-15',\n      totalVisitors: 50000,\n      totalConversions: 2500,\n      confidenceLevel: 95,\n      winner: 'Variant B',\n      variants: [\n        {\n          id: 'control',\n          name: 'Control (A)',\n          isControl: true,\n          visitors: 25000,\n          conversions: 1125,\n          conversionRate: 4.5,\n          improvement: 0,\n          confidenceInterval: [4.2, 4.8],\n          isWinner: false,\n          isSignificant: false,\n        },\n        {\n          id: 'variant-b',\n          name: 'Variant B',\n          isControl: false,\n          visitors: 25000,\n          conversions: 1375,\n          conversionRate: 5.5,\n          improvement: 22.2,\n          confidenceInterval: [5.2, 5.8],\n          isWinner: true,\n          isSignificant: true,\n        },\n      ],\n    },\n    {\n      id: 'test-002',\n      name: 'Pricing Strategy Test',\n      status: 'RUNNING',\n      type: 'PRICE',\n      startDate: '2024-03-10',\n      totalVisitors: 30000,\n      totalConversions: 1200,\n      confidenceLevel: 0,\n      variants: [\n        {\n          id: 'control',\n          name: 'Control ($99)',\n          isControl: true,\n          visitors: 15000,\n          conversions: 600,\n          conversionRate: 4.0,\n          improvement: 0,\n          confidenceInterval: [3.7, 4.3],\n          isWinner: false,\n          isSignificant: false,\n        },\n        {\n          id: 'variant-b',\n          name: 'Variant B ($89)',\n          isControl: false,\n          visitors: 15000,\n          conversions: 600,\n          conversionRate: 4.0,\n          improvement: 0,\n          confidenceInterval: [3.7, 4.3],\n          isWinner: false,\n          isSignificant: false,\n        },\n      ],\n    },\n  ];\n\n  const dailyMetrics: DailyMetric[] = [\n    { date: '2024-03-01', control: 4.2, variant: 4.5 },\n    { date: '2024-03-02', control: 4.3, variant: 4.8 },\n    { date: '2024-03-03', control: 4.1, variant: 4.6 },\n    { date: '2024-03-04', control: 4.4, variant: 5.0 },\n    { date: '2024-03-05', control: 4.5, variant: 5.2 },\n    { date: '2024-03-06', control: 4.3, variant: 5.1 },\n    { date: '2024-03-07', control: 4.6, variant: 5.3 },\n  ];\n\n  const trafficDistribution = [\n    { name: 'Control', value: 50, color: '#1890ff' },\n    { name: 'Variant B', value: 50, color: '#52c41a' },\n  ];\n\n  const getStatusColor = (status: string) => {\n    switch (status) {\n      case 'RUNNING': return 'processing';\n      case 'COMPLETED': return 'success';\n      case 'PAUSED': return 'warning';\n      case 'DRAFT': return 'default';\n      default: return 'default';\n    }\n  };\n\n  const getStatusIcon = (status: string) => {\n    switch (status) {\n      case 'RUNNING': return <SyncOutlined spin />;\n      case 'COMPLETED': return <CheckCircleOutlined />;\n      case 'PAUSED': return <MinusCircleOutlined />;\n      case 'DRAFT': return <InfoCircleOutlined />;\n      default: return null;\n    }\n  };\n\n  const columns = [\n    {\n      title: 'Test Name',\n      dataIndex: 'name',\n      key: 'name',\n      render: (text: string, record: TestResult) => (\n        <Space>\n          <Text strong>{text}</Text>\n          <Tag color={getStatusColor(record.status)}>\n            {getStatusIcon(record.status)} {record.status}\n          </Tag>\n        </Space>\n      ),\n    },\n    {\n      title: 'Type',\n      dataIndex: 'type',\n      key: 'type',\n      render: (type: string) => (\n        <Tag>{type}</Tag>\n      ),\n    },\n    {\n      title: 'Duration',\n      key: 'duration',\n      render: (_: any, record: TestResult) => (\n        <Text>{record.startDate} {record.endDate ? `to ${record.endDate}` : 'to present'}</Text>\n      ),\n    },\n    {\n      title: 'Visitors',\n      dataIndex: 'totalVisitors',\n      key: 'visitors',\n      render: (value: number) => value.toLocaleString(),\n    },\n    {\n      title: 'Winner',\n      key: 'winner',\n      render: (_: any, record: TestResult) => (\n        record.winner ? (\n          <Space>\n            <TrophyOutlined style={{ color: '#faad14' }} />\n            <Text type=\"success\" strong>{record.winner}</Text>\n          </Space>\n        ) : (\n          <Text type=\"secondary\">No winner yet</Text>\n        )\n      ),\n    },\n    {\n      title: 'Actions',\n      key: 'actions',\n      render: (_: any, record: TestResult) => (\n        <Space>\n          <Button type=\"link\" onClick={() => setSelectedTest(record.id)}>\n            View Details\n          </Button>\n          <Button type=\"link\" icon={<DownloadOutlined />}>\n            Export\n          </Button>\n        </Space>\n      ),\n    },\n  ];\n\n  const selectedTestData = testResults.find(t => t.id === selectedTest);\n\n  return (\n    <div style={{ padding: 24 }}>\n      <Title level={3}>\n        <ExperimentOutlined /> A/B Test Results\n      </Title>\n      <Paragraph type=\"secondary\">\n        Monitor and analyze your A/B test performance\n      </Paragraph>\n\n      <Card style={{ marginBottom: 24 }}>\n        <Space style={{ marginBottom: 16 }}>\n          <RangePicker onChange={dates => setDateRange(dates as [Dayjs, Dayjs])} />\n          <Select defaultValue=\"all\" style={{ width: 120 }}>\n            <Option value=\"all\">All Tests</Option>\n            <Option value=\"running\">Running</Option>\n            <Option value=\"completed\">Completed</Option>\n            <Option value=\"paused\">Paused</Option>\n          </Select>\n          <Button type=\"primary\" icon={<SyncOutlined />} loading={loading}>\n            Refresh\n          </Button>\n        </Space>\n\n        <Table\n          columns={columns}\n          dataSource={testResults}\n          rowKey=\"id\"\n          loading={loading}\n        />\n      </Card>\n\n      {selectedTestData && (\n        <Card>\n          <Tabs activeKey={activeTab} onChange={setActiveTab}>\n            <TabPane tab=\"Overview\" key=\"overview\">\n              <Row gutter={16} style={{ marginBottom: 24 }}>\n                <Col span={6}>\n                  <Statistic\n                    title=\"Total Visitors\"\n                    value={selectedTestData.totalVisitors}\n                    formatter={value => (value as number).toLocaleString()}\n                  />\n                </Col>\n                <Col span={6}>\n                  <Statistic\n                    title=\"Total Conversions\"\n                    value={selectedTestData.totalConversions}\n                    formatter={value => (value as number).toLocaleString()}\n                  />\n                </Col>\n                <Col span={6}>\n                  <Statistic\n                    title=\"Overall Conversion Rate\"\n                    value={((selectedTestData.totalConversions / selectedTestData.totalVisitors) * 100).toFixed(2)}\n                    suffix=\"%\"\n                  />\n                </Col>\n                <Col span={6}>\n                  <Statistic\n                    title=\"Confidence Level\"\n                    value={selectedTestData.confidenceLevel}\n                    suffix=\"%\"\n                    valueStyle={{ color: selectedTestData.confidenceLevel >= 95 ? '#52c41a' : '#faad14' }}\n                  />\n                </Col>\n              </Row>\n\n              {selectedTestData.winner && (\n                <Alert\n                  message=\"Test Completed\"\n                  description={\n                    <Space>\n                      <TrophyOutlined style={{ color: '#faad14' }} />\n                      <Text strong>{selectedTestData.winner}</Text>\n                      <Text>is the winner with</Text>\n                      <Text type=\"success\" strong>\n                        +{selectedTestData.variants.find(v => v.name === selectedTestData.winner)?.improvement.toFixed(1)}% improvement\n                      </Text>\n                    </Space>\n                  }\n                  type=\"success\"\n                  showIcon\n                  style={{ marginBottom: 24 }}\n                />\n              )}\n\n              <Title level={5}>Variant Performance</Title>\n              <Row gutter={16}>\n                {selectedTestData.variants.map(variant => (\n                  <Col span={12} key={variant.id}>\n                    <Card\n                      size=\"small\"\n                      title={\n                        <Space>\n                          <Text strong>{variant.name}</Text>\n                          {variant.isWinner && (\n                            <Tag color=\"success\" icon={<TrophyOutlined />}>Winner</Tag>\n                          )}\n                          {variant.isControl && (\n                            <Tag>Control</Tag>\n                          )}\n                        </Space>\n                      }\n                    >\n                      <Row gutter={16}>\n                        <Col span={12}>\n                          <Statistic\n                            title=\"Visitors\"\n                            value={variant.visitors}\n                            formatter={value => (value as number).toLocaleString()}\n                          />\n                        </Col>\n                        <Col span={12}>\n                          <Statistic\n                            title=\"Conversions\"\n                            value={variant.conversions}\n                            formatter={value => (value as number).toLocaleString()}\n                          />\n                        </Col>\n                      </Row>\n                      <Divider style={{ margin: '12px 0' }} />\n                      <Row gutter={16}>\n                        <Col span={12}>\n                          <Statistic\n                            title=\"Conversion Rate\"\n                            value={variant.conversionRate}\n                            suffix=\"%\"\n                            precision={2}\n                          />\n                        </Col>\n                        <Col span={12}>\n                          <Statistic\n                            title=\"Improvement\"\n                            value={variant.improvement}\n                            suffix=\"%\"\n                            precision={1}\n                            valueStyle={{ color: variant.improvement > 0 ? '#52c41a' : variant.improvement < 0 ? '#ff4d4f' : '#666' }}\n                            prefix={variant.improvement > 0 ? <ArrowUpOutlined /> : variant.improvement < 0 ? <ArrowDownOutlined /> : null}\n                          />\n                        </Col>\n                      </Row>\n                      <div style={{ marginTop: 12 }}>\n                        <Text type=\"secondary\" style={{ fontSize: 12 }}>\n                          Confidence Interval: [{variant.confidenceInterval[0].toFixed(1)}%, {variant.confidenceInterval[1].toFixed(1)}%]\n                        </Text>\n                        {variant.isSignificant && (\n                          <Tag color=\"success\" style={{ marginLeft: 8 }}>Statistically Significant</Tag>\n                        )}\n                      </div>\n                    </Card>\n                  </Col>\n                ))}\n              </Row>\n            </TabPane>\n\n            <TabPane tab=\"Trends\" key=\"trends\">\n              <Card title=\"Conversion Rate Over Time\" size=\"small\">\n                <ResponsiveContainer width=\"100%\" height={300}>\n                  <LineChart data={dailyMetrics}>\n                    <CartesianGrid strokeDasharray=\"3 3\" />\n                    <XAxis dataKey=\"date\" />\n                    <YAxis domain={[0, 6]} />\n                    <RechartsTooltip formatter={(value: number) => `${value.toFixed(2)}%`} />\n                    <Legend />\n                    <Line type=\"monotone\" dataKey=\"control\" name=\"Control\" stroke=\"#1890ff\" strokeWidth={2} />\n                    <Line type=\"monotone\" dataKey=\"variant\" name=\"Variant B\" stroke=\"#52c41a\" strokeWidth={2} />\n                  </LineChart>\n                </ResponsiveContainer>\n              </Card>\n\n              <Row gutter={16} style={{ marginTop: 16 }}>\n                <Col span={12}>\n                  <Card title=\"Traffic Distribution\" size=\"small\">\n                    <ResponsiveContainer width=\"100%\" height={250}>\n                      <PieChart>\n                        <Pie\n                          data={trafficDistribution}\n                          cx=\"50%\"\n                          cy=\"50%\"\n                          innerRadius={60}\n                          outerRadius={80}\n                          paddingAngle={5}\n                          dataKey=\"value\"\n                        >\n                          {trafficDistribution.map((entry, index) => (\n                            <Cell key={`cell-${index}`} fill={entry.color} />\n                          ))}\n                        </Pie>\n                        <RechartsTooltip />\n                        <Legend />\n                      </PieChart>\n                    </ResponsiveContainer>\n                  </Card>\n                </Col>\n                <Col span={12}>\n                  <Card title=\"Daily Visitors\" size=\"small\">\n                    <ResponsiveContainer width=\"100%\" height={250}>\n                      <BarChart data={dailyMetrics}>\n                        <CartesianGrid strokeDasharray=\"3 3\" />\n                        <XAxis dataKey=\"date\" />\n                        <YAxis />\n                        <RechartsTooltip />\n                        <Legend />\n                        <Bar dataKey=\"control\" name=\"Control\" fill=\"#1890ff\" />\n                        <Bar dataKey=\"variant\" name=\"Variant B\" fill=\"#52c41a\" />\n                      </BarChart>\n                    </ResponsiveContainer>\n                  </Card>\n                </Col>\n              </Row>\n            </TabPane>\n\n            <TabPane tab=\"Statistical Analysis\" key=\"statistics\">\n              <Card title=\"Statistical Significance\">\n                <Row gutter={16}>\n                  <Col span={8}>\n                    <Statistic\n                      title=\"P-Value\"\n                      value={0.023}\n                      precision={3}\n                      valueStyle={{ color: '#52c41a' }}\n                    />\n                    <Text type=\"secondary\">P &lt; 0.05 indicates statistical significance</Text>\n                  </Col>\n                  <Col span={8}>\n                    <Statistic\n                      title=\"Z-Score\"\n                      value={2.31}\n                      precision={2}\n                    />\n                  </Col>\n                  <Col span={8}>\n                    <Statistic\n                      title=\"Power\"\n                      value={85}\n                      suffix=\"%\"\n                    />\n                    <Text type=\"secondary\">Probability of detecting true effect</Text>\n                  </Col>\n                </Row>\n\n                <Divider />\n\n                <Title level={5}>Sample Size Analysis</Title>\n                <Progress\n                  percent={75}\n                  status=\"active\"\n                  format={percent => `${percent}% of required sample`}\n                />\n                <Paragraph type=\"secondary\">\n                  Current sample size is sufficient for detecting a 20% improvement with 95% confidence.\n                </Paragraph>\n              </Card>\n            </TabPane>\n          </Tabs>\n        </Card>\n      )}\n\n      {!selectedTestData && (\n        <Card>\n          <Empty\n            description=\"Select a test from the table above to view detailed results\"\n            image={Empty.PRESENTED_IMAGE_SIMPLE}\n          />\n        </Card>\n      )}\n    </div>\n  );\n};\n\nexport default ABTestResultsPage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/ABTest/ABTestResults.tsx"
    },
    "UserAsset/UserAssets": {
      "path": "UserAsset/UserAssets",
      "id": "UserAsset/UserAssets",
      "file": "UserAsset/UserAssets.tsx",
      "absPath": "/UserAsset/UserAssets",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  InputNumber,\n  Select,\n  Tag,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  message,\n  Badge,\n  Progress,\n  Descriptions,\n  DatePicker,\n  Tabs,\n  List,\n  Avatar,\n} from 'antd';\nimport {\n  UserOutlined,\n  DollarOutlined,\n  TrophyOutlined,\n  CrownOutlined,\n  GiftOutlined,\n  FireOutlined,\n  StarOutlined,\n  WalletOutlined,\n  ShoppingCartOutlined,\n  ClockCircleOutlined,\n  RiseOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs from 'dayjs';\n\nconst { Option } = Select;\nconst { RangePicker } = DatePicker;\nconst { TabPane } = Tabs;\n\ntype MemberLevel = 'BRONZE' | 'SILVER' | 'GOLD' | 'PLATINUM' | 'DIAMOND';\n\ninterface UserAsset {\n  id: string;\n  tenantId: string;\n  shopId: string;\n  userId: string;\n  userName: string;\n  userEmail: string;\n  totalPoints: number;\n  availablePoints: number;\n  frozenPoints: number;\n  totalSpent: number;\n  totalOrders: number;\n  memberLevel: MemberLevel;\n  memberScore: number;\n  cashbackBalance: number;\n  couponCount: number;\n  lastActiveAt: string;\n  createdAt: string;\n}\n\ninterface AssetStatistics {\n  totalUsers: number;\n  totalPoints: number;\n  totalSpent: number;\n  levelDistribution: Record<MemberLevel, number>;\n}\n\nconst LEVEL_COLORS: Record<MemberLevel, string> = {\n  BRONZE: '#cd7f32',\n  SILVER: '#c0c0c0',\n  GOLD: '#ffd700',\n  PLATINUM: '#e5e4e2',\n  DIAMOND: '#b9f2ff',\n};\n\nconst LEVEL_NAMES: Record<MemberLevel, string> = {\n  BRONZE: '青铜会员',\n  SILVER: '白银会员',\n  GOLD: '黄金会员',\n  PLATINUM: '铂金会员',\n  DIAMOND: '钻石会员',\n};\n\nconst LEVEL_ICONS: Record<MemberLevel, React.ReactNode> = {\n  BRONZE: <StarOutlined />,\n  SILVER: <StarOutlined />,\n  GOLD: <CrownOutlined />,\n  PLATINUM: <CrownOutlined />,\n  DIAMOND: <CrownOutlined />,\n};\n\nconst MOCK_USER_ASSETS: UserAsset[] = [\n  {\n    id: 'UA001',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U001',\n    userName: '张三',\n    userEmail: 'zhangsan@example.com',\n    totalPoints: 5680,\n    availablePoints: 5200,\n    frozenPoints: 480,\n    totalSpent: 12580.50,\n    totalOrders: 28,\n    memberLevel: 'GOLD',\n    memberScore: 12580,\n    cashbackBalance: 125.80,\n    couponCount: 5,\n    lastActiveAt: '2026-03-18 14:30:00',\n    createdAt: '2025-06-15 10:00:00',\n  },\n  {\n    id: 'UA002',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U002',\n    userName: '李四',\n    userEmail: 'lisi@example.com',\n    totalPoints: 2300,\n    availablePoints: 2100,\n    frozenPoints: 200,\n    totalSpent: 5620.00,\n    totalOrders: 15,\n    memberLevel: 'SILVER',\n    memberScore: 5620,\n    cashbackBalance: 56.20,\n    couponCount: 3,\n    lastActiveAt: '2026-03-17 09:15:00',\n    createdAt: '2025-08-20 14:30:00',\n  },\n  {\n    id: 'UA003',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U003',\n    userName: '王五',\n    userEmail: 'wangwu@example.com',\n    totalPoints: 15800,\n    availablePoints: 15000,\n    frozenPoints: 800,\n    totalSpent: 35680.00,\n    totalOrders: 52,\n    memberLevel: 'DIAMOND',\n    memberScore: 35680,\n    cashbackBalance: 356.80,\n    couponCount: 12,\n    lastActiveAt: '2026-03-18 16:45:00',\n    createdAt: '2024-12-01 08:00:00',\n  },\n  {\n    id: 'UA004',\n    tenantId: 'T001',\n    shopId: 'S001',\n    userId: 'U004',\n    userName: '赵六',\n    userEmail: 'zhaoliu@example.com',\n    totalPoints: 850,\n    availablePoints: 800,\n    frozenPoints: 50,\n    totalSpent: 1850.00,\n    totalOrders: 6,\n    memberLevel: 'BRONZE',\n    memberScore: 1850,\n    cashbackBalance: 18.50,\n    couponCount: 1,\n    lastActiveAt: '2026-03-15 11:20:00',\n    createdAt: '2026-01-10 16:00:00',\n  },\n];\n\nconst MOCK_STATISTICS: AssetStatistics = {\n  totalUsers: 1256,\n  totalPoints: 2856000,\n  totalSpent: 5689250.00,\n  levelDistribution: {\n    BRONZE: 580,\n    SILVER: 420,\n    GOLD: 180,\n    PLATINUM: 60,\n    DIAMOND: 16,\n  },\n};\n\nexport const UserAssets: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [userAssets, setUserAssets] = useState<UserAsset[]>(MOCK_USER_ASSETS);\n  const [statistics, setStatistics] = useState<AssetStatistics>(MOCK_STATISTICS);\n  const [selectedUser, setSelectedUser] = useState<UserAsset | null>(null);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [searchParams, setSearchParams] = useState({\n    keyword: '',\n    memberLevel: undefined as MemberLevel | undefined,\n  });\n\n  useEffect(() => {\n    loadUserAssets();\n  }, []);\n\n  const loadUserAssets = async () => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 500));\n      setUserAssets(MOCK_USER_ASSETS);\n      setStatistics(MOCK_STATISTICS);\n    } catch (error) {\n      message.error('加载用户资产数据失败');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleSearch = () => {\n    let filtered = [...MOCK_USER_ASSETS];\n    \n    if (searchParams.keyword) {\n      filtered = filtered.filter(\n        u => u.userName.includes(searchParams.keyword) || \n             u.userEmail.includes(searchParams.keyword) ||\n             u.userId.includes(searchParams.keyword)\n      );\n    }\n    \n    if (searchParams.memberLevel) {\n      filtered = filtered.filter(u => u.memberLevel === searchParams.memberLevel);\n    }\n    \n    setUserAssets(filtered);\n  };\n\n  const handleReset = () => {\n    setSearchParams({ keyword: '', memberLevel: undefined });\n    setUserAssets(MOCK_USER_ASSETS);\n  };\n\n  const showUserDetail = (user: UserAsset) => {\n    setSelectedUser(user);\n    setDetailModalVisible(true);\n  };\n\n  const columns: ColumnsType<UserAsset> = [\n    {\n      title: '用户信息',\n      key: 'userInfo',\n      width: 200,\n      render: (_, record) => (\n        <Space>\n          <Avatar icon={<UserOutlined />} style={{ backgroundColor: LEVEL_COLORS[record.memberLevel] }} />\n          <div>\n            <div style={{ fontWeight: 500 }}>{record.userName}</div>\n            <div style={{ fontSize: 12, color: '#999' }}>{record.userEmail}</div>\n          </div>\n        </Space>\n      ),\n    },\n    {\n      title: '会员等级',\n      dataIndex: 'memberLevel',\n      key: 'memberLevel',\n      width: 120,\n      render: (level: MemberLevel) => (\n        <Tag color={LEVEL_COLORS[level]} icon={LEVEL_ICONS[level]}>\n          {LEVEL_NAMES[level]}\n        </Tag>\n      ),\n      filters: Object.entries(LEVEL_NAMES).map(([key, name]) => ({\n        text: name,\n        value: key,\n      })),\n      onFilter: (value, record) => record.memberLevel === value,\n    },\n    {\n      title: '可用积分',\n      dataIndex: 'availablePoints',\n      key: 'availablePoints',\n      width: 120,\n      align: 'right',\n      render: (points: number) => (\n        <span style={{ color: '#1890ff', fontWeight: 500 }}>\n          {points.toLocaleString()}\n        </span>\n      ),\n      sorter: (a, b) => a.availablePoints - b.availablePoints,\n    },\n    {\n      title: '冻结积分',\n      dataIndex: 'frozenPoints',\n      key: 'frozenPoints',\n      width: 100,\n      align: 'right',\n      render: (points: number) => (\n        <span style={{ color: '#999' }}>{points.toLocaleString()}</span>\n      ),\n    },\n    {\n      title: '累计消费',\n      dataIndex: 'totalSpent',\n      key: 'totalSpent',\n      width: 130,\n      align: 'right',\n      render: (spent: number) => (\n        <span style={{ color: '#52c41a' }}>\n          ¥{spent.toLocaleString('zh-CN', { minimumFractionDigits: 2 })}\n        </span>\n      ),\n      sorter: (a, b) => a.totalSpent - b.totalSpent,\n    },\n    {\n      title: '订单数',\n      dataIndex: 'totalOrders',\n      key: 'totalOrders',\n      width: 90,\n      align: 'center',\n      render: (orders: number) => (\n        <Badge count={orders} showZero style={{ backgroundColor: '#1890ff' }} />\n      ),\n      sorter: (a, b) => a.totalOrders - b.totalOrders,\n    },\n    {\n      title: '返现余额',\n      dataIndex: 'cashbackBalance',\n      key: 'cashbackBalance',\n      width: 110,\n      align: 'right',\n      render: (balance: number) => (\n        <span style={{ color: '#faad14' }}>\n          ¥{balance.toFixed(2)}\n        </span>\n      ),\n    },\n    {\n      title: '优惠券',\n      dataIndex: 'couponCount',\n      key: 'couponCount',\n      width: 80,\n      align: 'center',\n      render: (count: number) => (\n        <Tag color=\"orange\" icon={<GiftOutlined />}>{count}</Tag>\n      ),\n    },\n    {\n      title: '最后活跃',\n      dataIndex: 'lastActiveAt',\n      key: 'lastActiveAt',\n      width: 160,\n      render: (time: string) => (\n        <Tooltip title={time}>\n          <span><ClockCircleOutlined /> {dayjs(time).format('MM-DD HH:mm')}</span>\n        </Tooltip>\n      ),\n      sorter: (a, b) => new Date(a.lastActiveAt).getTime() - new Date(b.lastActiveAt).getTime(),\n    },\n    {\n      title: '操作',\n      key: 'action',\n      width: 120,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space>\n          <Button type=\"link\" size=\"small\" onClick={() => showUserDetail(record)}>\n            详情\n          </Button>\n        </Space>\n      ),\n    },\n  ];\n\n  const renderStatistics = () => (\n    <Row gutter={16}>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"总用户数\"\n            value={statistics.totalUsers}\n            prefix={<UserOutlined />}\n            valueStyle={{ color: '#1890ff' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"总积分\"\n            value={statistics.totalPoints}\n            prefix={<StarOutlined />}\n            valueStyle={{ color: '#722ed1' }}\n          />\n        </Card>\n      </Col>\n      <Col span={4}>\n        <Card>\n          <Statistic\n            title=\"累计消费\"\n            value={statistics.totalSpent}\n            precision={2}\n            prefix={<DollarOutlined />}\n            valueStyle={{ color: '#52c41a' }}\n          />\n        </Card>\n      </Col>\n      <Col span={12}>\n        <Card title=\"会员等级分布\">\n          <Row gutter={8}>\n            {Object.entries(statistics.levelDistribution).map(([level, count]) => (\n              <Col span={4} key={level}>\n                <div style={{ textAlign: 'center' }}>\n                  <Tag color={LEVEL_COLORS[level as MemberLevel]} style={{ marginBottom: 4 }}>\n                    {LEVEL_NAMES[level as MemberLevel]}\n                  </Tag>\n                  <div style={{ fontWeight: 500 }}>{count}</div>\n                  <Progress \n                    percent={Math.round((count / statistics.totalUsers) * 100)} \n                    size=\"small\" \n                    showInfo={false}\n                    strokeColor={LEVEL_COLORS[level as MemberLevel]}\n                  />\n                </div>\n              </Col>\n            ))}\n          </Row>\n        </Card>\n      </Col>\n    </Row>\n  );\n\n  const renderUserDetail = () => {\n    if (!selectedUser) return null;\n\n    const nextLevelThresholds: Record<MemberLevel, number> = {\n      BRONZE: 1000,\n      SILVER: 5000,\n      GOLD: 20000,\n      PLATINUM: 100000,\n      DIAMOND: Infinity,\n    };\n\n    const currentThreshold = nextLevelThresholds[selectedUser.memberLevel];\n    const progress = selectedUser.memberLevel === 'DIAMOND' \n      ? 100 \n      : Math.min((selectedUser.memberScore / currentThreshold) * 100, 100);\n\n    return (\n      <Modal\n        title=\"用户资产详情\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={null}\n        width={800}\n      >\n        <Tabs defaultActiveKey=\"overview\">\n          <TabPane tab=\"资产概览\" key=\"overview\">\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"用户ID\">{selectedUser.userId}</Descriptions.Item>\n              <Descriptions.Item label=\"用户名\">{selectedUser.userName}</Descriptions.Item>\n              <Descriptions.Item label=\"邮箱\">{selectedUser.userEmail}</Descriptions.Item>\n              <Descriptions.Item label=\"会员等级\">\n                <Tag color={LEVEL_COLORS[selectedUser.memberLevel]} icon={LEVEL_ICONS[selectedUser.memberLevel]}>\n                  {LEVEL_NAMES[selectedUser.memberLevel]}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"会员积分\">{selectedUser.memberScore.toLocaleString()}</Descriptions.Item>\n              <Descriptions.Item label=\"升级进度\">\n                <Progress \n                  percent={progress} \n                  size=\"small\" \n                  format={() => `${selectedUser.memberScore.toLocaleString()} / ${currentThreshold.toLocaleString()}`}\n                />\n              </Descriptions.Item>\n            </Descriptions>\n\n            <Divider />\n\n            <Row gutter={16}>\n              <Col span={6}>\n                <Statistic\n                  title=\"可用积分\"\n                  value={selectedUser.availablePoints}\n                  prefix={<StarOutlined />}\n                  valueStyle={{ color: '#1890ff' }}\n                />\n              </Col>\n              <Col span={6}>\n                <Statistic\n                  title=\"冻结积分\"\n                  value={selectedUser.frozenPoints}\n                  prefix={<StarOutlined />}\n                  valueStyle={{ color: '#999' }}\n                />\n              </Col>\n              <Col span={6}>\n                <Statistic\n                  title=\"累计消费\"\n                  value={selectedUser.totalSpent}\n                  precision={2}\n                  prefix=\"¥\"\n                  valueStyle={{ color: '#52c41a' }}\n                />\n              </Col>\n              <Col span={6}>\n                <Statistic\n                  title=\"返现余额\"\n                  value={selectedUser.cashbackBalance}\n                  precision={2}\n                  prefix=\"¥\"\n                  valueStyle={{ color: '#faad14' }}\n                />\n              </Col>\n            </Row>\n          </TabPane>\n          <TabPane tab=\"消费统计\" key=\"spending\">\n            <Row gutter={16}>\n              <Col span={12}>\n                <Card>\n                  <Statistic\n                    title=\"总订单数\"\n                    value={selectedUser.totalOrders}\n                    prefix={<ShoppingCartOutlined />}\n                  />\n                </Card>\n              </Col>\n              <Col span={12}>\n                <Card>\n                  <Statistic\n                    title=\"客单价\"\n                    value={selectedUser.totalSpent / selectedUser.totalOrders}\n                    precision={2}\n                    prefix=\"¥\"\n                  />\n                </Card>\n              </Col>\n            </Row>\n          </TabPane>\n          <TabPane tab=\"优惠券\" key=\"coupons\">\n            <List\n              dataSource={Array(selectedUser.couponCount).fill(null).map((_, i) => ({\n                id: `CPN${i + 1}`,\n                name: `优惠券 ${i + 1}`,\n                value: Math.floor(Math.random() * 50) + 10,\n                minSpend: 100,\n                expireAt: dayjs().add(30, 'days').format('YYYY-MM-DD'),\n              }))}\n              renderItem={(item: any) => (\n                <List.Item>\n                  <List.Item.Meta\n                    avatar={<Avatar style={{ backgroundColor: '#faad14' }} icon={<GiftOutlined />} />}\n                    title={item.name}\n                    description={`满${item.minSpend}减${item.value} | 有效期至 ${item.expireAt}`}\n                  />\n                </List.Item>\n              )}\n            />\n          </TabPane>\n        </Tabs>\n      </Modal>\n    );\n  };\n\n  return (\n    <div style={{ padding: 24 }}>\n      <Card title=\"用户资产管理\" style={{ marginBottom: 16 }}>\n        {renderStatistics()}\n      </Card>\n\n      <Card>\n        <Row gutter={16} style={{ marginBottom: 16 }}>\n          <Col span={6}>\n            <Input\n              placeholder=\"搜索用户名/邮箱/ID\"\n              value={searchParams.keyword}\n              onChange={e => setSearchParams({ ...searchParams, keyword: e.target.value })}\n              onPressEnter={handleSearch}\n            />\n          </Col>\n          <Col span={4}>\n            <Select\n              placeholder=\"会员等级\"\n              value={searchParams.memberLevel}\n              onChange={value => setSearchParams({ ...searchParams, memberLevel: value })}\n              allowClear\n              style={{ width: '100%' }}\n            >\n              {Object.entries(LEVEL_NAMES).map(([key, name]) => (\n                <Option key={key} value={key}>\n                  <Tag color={LEVEL_COLORS[key as MemberLevel]}>{name}</Tag>\n                </Option>\n              ))}\n            </Select>\n          </Col>\n          <Col span={4}>\n            <Space>\n              <Button type=\"primary\" onClick={handleSearch}>搜索</Button>\n              <Button onClick={handleReset}>重置</Button>\n            </Space>\n          </Col>\n        </Row>\n\n        <Table\n          columns={columns}\n          dataSource={userAssets}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1400 }}\n          pagination={{\n            showSizeChanger: true,\n            showQuickJumper: true,\n            showTotal: (total) => `共 ${total} 条记录`,\n          }}\n        />\n      </Card>\n\n      {renderUserDetail()}\n    </div>\n  );\n};\n\nexport default UserAssets;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/UserAsset/UserAssets.tsx"
    },
    "ABTest/ABTestConfig": {
      "path": "ABTest/ABTestConfig",
      "id": "ABTest/ABTestConfig",
      "file": "ABTest/ABTestConfig.tsx",
      "absPath": "/ABTest/ABTestConfig",
      "__content": "import React, { useState } from 'react';\nimport {\n  Card,\n  Form,\n  Input,\n  Button,\n  Select,\n  Slider,\n  DatePicker,\n  Typography,\n  Alert,\n  Space,\n  Divider,\n  Steps,\n  Radio,\n  InputNumber,\n  Tag,\n  Tooltip,\n} from 'antd';\nimport {\n  ExperimentOutlined,\n  PlusOutlined,\n  DeleteOutlined,\n  InfoCircleOutlined,\n  SaveOutlined,\n  PlayCircleOutlined,\n} from '@ant-design/icons';\nimport type { Dayjs } from 'dayjs';\n\nconst { Title, Text, Paragraph } = Typography;\nconst { Option } = Select;\nconst { Step } = Steps;\nconst { RangePicker } = DatePicker;\n\ninterface TestVariant {\n  id: string;\n  name: string;\n  description: string;\n  trafficAllocation: number;\n  configuration: Record<string, any>;\n}\n\ninterface ABTestConfig {\n  name: string;\n  description: string;\n  type: 'UI' | 'PRICE' | 'CONTENT' | 'FEATURE';\n  targetMetric: string;\n  variants: TestVariant[];\n  trafficPercentage: number;\n  duration: number;\n  startDate?: Dayjs;\n  endDate?: Dayjs;\n  audience: {\n    segments: string[];\n    platforms: string[];\n    countries: string[];\n  };\n  successCriteria: {\n    metric: string;\n    threshold: number;\n    confidenceLevel: number;\n  };\n}\n\nexport const ABTestConfigPage: React.FC = () => {\n  const [form] = Form.useForm();\n  const [currentStep, setCurrentStep] = useState(0);\n  const [loading, setLoading] = useState(false);\n  const [error, setError] = useState<string | null>(null);\n  const [variants, setVariants] = useState<TestVariant[]>([\n    { id: 'control', name: 'Control (A)', description: 'Current version', trafficAllocation: 50, configuration: {} },\n    { id: 'variant-1', name: 'Variant B', description: 'Test version', trafficAllocation: 50, configuration: {} },\n  ]);\n\n  const testTypes = [\n    { value: 'UI', label: 'UI/UX Test', description: 'Test different user interface designs' },\n    { value: 'PRICE', label: 'Pricing Test', description: 'Test different pricing strategies' },\n    { value: 'CONTENT', label: 'Content Test', description: 'Test different content variations' },\n    { value: 'FEATURE', label: 'Feature Test', description: 'Test new feature adoption' },\n  ];\n\n  const targetMetrics = [\n    { value: 'conversion_rate', label: 'Conversion Rate' },\n    { value: 'revenue_per_user', label: 'Revenue Per User' },\n    { value: 'click_through_rate', label: 'Click-Through Rate' },\n    { value: 'bounce_rate', label: 'Bounce Rate' },\n    { value: 'session_duration', label: 'Session Duration' },\n    { value: 'add_to_cart_rate', label: 'Add to Cart Rate' },\n  ];\n\n  const audienceSegments = [\n    'New Visitors',\n    'Returning Customers',\n    'High Value Customers',\n    'Mobile Users',\n    'Desktop Users',\n    'VIP Members',\n  ];\n\n  const platforms = ['Amazon', 'Temu', 'TikTok', 'Shopee', 'Lazada'];\n  const countries = ['US', 'CA', 'UK', 'DE', 'FR', 'JP', 'AU'];\n\n  const steps = [\n    { title: 'Basic Info', description: 'Test details' },\n    { title: 'Variants', description: 'Test variations' },\n    { title: 'Audience', description: 'Target users' },\n    { title: 'Review', description: 'Final check' },\n  ];\n\n  const addVariant = () => {\n    const newVariant: TestVariant = {\n      id: `variant-${variants.length}`,\n      name: `Variant ${String.fromCharCode(66 + variants.length - 1)}`,\n      description: '',\n      trafficAllocation: 0,\n      configuration: {},\n    };\n    setVariants([...variants, newVariant]);\n  };\n\n  const removeVariant = (index: number) => {\n    if (variants.length <= 2) {\n      setError('At least 2 variants are required');\n      return;\n    }\n    const newVariants = variants.filter((_, i) => i !== index);\n    // Redistribute traffic evenly\n    const equalAllocation = Math.floor(100 / newVariants.length);\n    newVariants.forEach((v, i) => {\n      v.trafficAllocation = i === newVariants.length - 1 \n        ? 100 - (equalAllocation * (newVariants.length - 1))\n        : equalAllocation;\n    });\n    setVariants(newVariants);\n  };\n\n  const updateVariantAllocation = (index: number, value: number) => {\n    const newVariants = [...variants];\n    const oldValue = newVariants[index].trafficAllocation;\n    const diff = value - oldValue;\n    \n    newVariants[index].trafficAllocation = value;\n    \n    // Distribute the difference to other variants\n    const otherIndices = newVariants.map((_, i) => i).filter(i => i !== index);\n    const diffPerVariant = Math.floor(diff / otherIndices.length);\n    \n    otherIndices.forEach(i => {\n      newVariants[i].trafficAllocation = Math.max(0, newVariants[i].trafficAllocation - diffPerVariant);\n    });\n    \n    // Ensure total is 100\n    const total = newVariants.reduce((sum, v) => sum + v.trafficAllocation, 0);\n    if (total !== 100) {\n      newVariants[otherIndices[0]].trafficAllocation += (100 - total);\n    }\n    \n    setVariants(newVariants);\n  };\n\n  const handleNext = async () => {\n    try {\n      if (currentStep === 0) {\n        await form.validateFields(['name', 'type', 'targetMetric']);\n      } else if (currentStep === 1) {\n        const totalAllocation = variants.reduce((sum, v) => sum + v.trafficAllocation, 0);\n        if (totalAllocation !== 100) {\n          setError(`Traffic allocation must total 100%. Current: ${totalAllocation}%`);\n          return;\n        }\n      }\n      setError(null);\n      setCurrentStep(currentStep + 1);\n    } catch (err) {\n      // Validation failed\n    }\n  };\n\n  const handlePrev = () => {\n    setCurrentStep(currentStep - 1);\n    setError(null);\n  };\n\n  const handleSave = async () => {\n    setLoading(true);\n    try {\n      const values = await form.validateFields();\n      const config: ABTestConfig = {\n        ...values,\n        variants,\n      };\n      \n      // Simulate API call\n      await new Promise(resolve => setTimeout(resolve, 1500));\n      \n      // Success\n      setCurrentStep(4); // Success step\n    } catch (err) {\n      setError('Failed to save A/B test configuration');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const renderStepContent = () => {\n    switch (currentStep) {\n      case 0:\n        return (\n          <Space direction=\"vertical\" style={{ width: '100%' }} size=\"large\">\n            <Form.Item\n              name=\"name\"\n              label=\"Test Name\"\n              rules={[{ required: true, message: 'Please enter test name' }]}\n            >\n              <Input placeholder=\"e.g., Homepage Banner Test Q1 2024\" />\n            </Form.Item>\n\n            <Form.Item\n              name=\"description\"\n              label=\"Description\"\n              rules={[{ required: true, message: 'Please enter test description' }]}\n            >\n              <Input.TextArea \n                rows={3} \n                placeholder=\"Describe the purpose and hypothesis of this A/B test\"\n              />\n            </Form.Item>\n\n            <Form.Item\n              name=\"type\"\n              label=\"Test Type\"\n              rules={[{ required: true, message: 'Please select test type' }]}\n            >\n              <Select placeholder=\"Select test type\">\n                {testTypes.map(type => (\n                  <Option key={type.value} value={type.value}>\n                    <Space direction=\"vertical\" size={0}>\n                      <Text strong>{type.label}</Text>\n                      <Text type=\"secondary\" style={{ fontSize: 12 }}>{type.description}</Text>\n                    </Space>\n                  </Option>\n                ))}\n              </Select>\n            </Form.Item>\n\n            <Form.Item\n              name=\"targetMetric\"\n              label=\"Primary Metric\"\n              rules={[{ required: true, message: 'Please select target metric' }]}\n            >\n              <Select placeholder=\"Select primary success metric\">\n                {targetMetrics.map(metric => (\n                  <Option key={metric.value} value={metric.value}>\n                    {metric.label}\n                  </Option>\n                ))}\n              </Select>\n            </Form.Item>\n\n            <Form.Item\n              name=\"duration\"\n              label=\"Test Duration (days)\"\n              rules={[{ required: true, message: 'Please enter test duration' }]}\n            >\n              <InputNumber min={7} max={90} style={{ width: 200 }} />\n            </Form.Item>\n\n            <Form.Item\n              name=\"dateRange\"\n              label=\"Schedule\"\n            >\n              <RangePicker style={{ width: '100%' }} />\n            </Form.Item>\n          </Space>\n        );\n\n      case 1:\n        return (\n          <Space direction=\"vertical\" style={{ width: '100%' }} size=\"large\">\n            <Alert\n              message=\"Traffic Allocation\"\n              description=\"Distribute traffic percentage across variants. Total must equal 100%.\"\n              type=\"info\"\n              showIcon\n            />\n\n            {variants.map((variant, index) => (\n              <Card \n                key={variant.id}\n                size=\"small\"\n                title={\n                  <Space>\n                    <Tag color={index === 0 ? 'blue' : 'green'}>\n                      {variant.name}\n                    </Tag>\n                    {index === 0 && <Tag color=\"default\">Control</Tag>}\n                  </Space>\n                }\n                extra={\n                  index > 0 && (\n                    <Button\n                      type=\"text\"\n                      danger\n                      icon={<DeleteOutlined />}\n                      onClick={() => removeVariant(index)}\n                    />\n                  )\n                }\n              >\n                <Space direction=\"vertical\" style={{ width: '100%' }}>\n                  <Form.Item label=\"Description\" style={{ marginBottom: 8 }}>\n                    <Input\n                      value={variant.description}\n                      onChange={e => {\n                        const newVariants = [...variants];\n                        newVariants[index].description = e.target.value;\n                        setVariants(newVariants);\n                      }}\n                      placeholder=\"Describe this variant\"\n                    />\n                  </Form.Item>\n\n                  <Form.Item label=\"Traffic Allocation\" style={{ marginBottom: 8 }}>\n                    <Slider\n                      min={0}\n                      max={100}\n                      value={variant.trafficAllocation}\n                      onChange={value => updateVariantAllocation(index, value)}\n                      marks={{ 0: '0%', 50: '50%', 100: '100%' }}\n                    />\n                    <Text>{variant.trafficAllocation}%</Text>\n                  </Form.Item>\n                </Space>\n              </Card>\n            ))}\n\n            <Button\n              type=\"dashed\"\n              onClick={addVariant}\n              block\n              icon={<PlusOutlined />}\n            >\n              Add Variant\n            </Button>\n\n            <div style={{ textAlign: 'center' }}>\n              <Text type=\"secondary\">\n                Total Allocation: {' '}\n                <Text \n                  type={variants.reduce((sum, v) => sum + v.trafficAllocation, 0) === 100 ? 'success' : 'danger'}\n                  strong\n                >\n                  {variants.reduce((sum, v) => sum + v.trafficAllocation, 0)}%\n                </Text>\n              </Text>\n            </div>\n          </Space>\n        );\n\n      case 2:\n        return (\n          <Space direction=\"vertical\" style={{ width: '100%' }} size=\"large\">\n            <Form.Item\n              name={['audience', 'segments']}\n              label=\"Audience Segments\"\n            >\n              <Select mode=\"multiple\" placeholder=\"Select audience segments\">\n                {audienceSegments.map(segment => (\n                  <Option key={segment} value={segment}>{segment}</Option>\n                ))}\n              </Select>\n            </Form.Item>\n\n            <Form.Item\n              name={['audience', 'platforms']}\n              label=\"Target Platforms\"\n            >\n              <Select mode=\"multiple\" placeholder=\"Select platforms\">\n                {platforms.map(platform => (\n                  <Option key={platform} value={platform}>{platform}</Option>\n                ))}\n              </Select>\n            </Form.Item>\n\n            <Form.Item\n              name={['audience', 'countries']}\n              label=\"Target Countries\"\n            >\n              <Select mode=\"multiple\" placeholder=\"Select countries\">\n                {countries.map(country => (\n                  <Option key={country} value={country}>{country}</Option>\n                ))}\n              </Select>\n            </Form.Item>\n\n            <Form.Item\n              name=\"trafficPercentage\"\n              label=\"Traffic Percentage\"\n              tooltip=\"Percentage of eligible traffic to include in the test\"\n            >\n              <Slider\n                min={1}\n                max={100}\n                marks={{ 1: '1%', 25: '25%', 50: '50%', 75: '75%', 100: '100%' }}\n              />\n            </Form.Item>\n\n            <Divider />\n\n            <Title level={5}>Success Criteria</Title>\n\n            <Form.Item\n              name={['successCriteria', 'metric']}\n              label=\"Success Metric\"\n            >\n              <Select placeholder=\"Select success metric\">\n                {targetMetrics.map(metric => (\n                  <Option key={metric.value} value={metric.value}>\n                    {metric.label}\n                  </Option>\n                ))}\n              </Select>\n            </Form.Item>\n\n            <Form.Item\n              name={['successCriteria', 'threshold']}\n              label=\"Minimum Improvement (%)\"\n              tooltip=\"Minimum percentage improvement to declare a winner\"\n            >\n              <InputNumber min={1} max={50} suffix=\"%\" style={{ width: 200 }} />\n            </Form.Item>\n\n            <Form.Item\n              name={['successCriteria', 'confidenceLevel']}\n              label=\"Confidence Level\"\n            >\n              <Radio.Group>\n                <Radio.Button value={90}>90%</Radio.Button>\n                <Radio.Button value={95}>95%</Radio.Button>\n                <Radio.Button value={99}>99%</Radio.Button>\n              </Radio.Group>\n            </Form.Item>\n          </Space>\n        );\n\n      case 3:\n        const values = form.getFieldsValue();\n        return (\n          <Space direction=\"vertical\" style={{ width: '100%' }} size=\"large\">\n            <Alert\n              message=\"Review Configuration\"\n              description=\"Please review all settings before launching the test.\"\n              type=\"warning\"\n              showIcon\n            />\n\n            <Card title=\"Test Details\" size=\"small\">\n              <Paragraph>\n                <Text strong>Name: </Text>{values.name}\n              </Paragraph>\n              <Paragraph>\n                <Text strong>Type: </Text>{testTypes.find(t => t.value === values.type)?.label}\n              </Paragraph>\n              <Paragraph>\n                <Text strong>Target Metric: </Text>\n                {targetMetrics.find(m => m.value === values.targetMetric)?.label}\n              </Paragraph>\n              <Paragraph>\n                <Text strong>Duration: </Text>{values.duration} days\n              </Paragraph>\n            </Card>\n\n            <Card title=\"Variants\" size=\"small\">\n              {variants.map((variant, index) => (\n                <Paragraph key={variant.id}>\n                  <Tag color={index === 0 ? 'blue' : 'green'}>{variant.name}</Tag>\n                  <Text> - {variant.trafficAllocation}% traffic</Text>\n                  {variant.description && (\n                    <Text type=\"secondary\"> ({variant.description})</Text>\n                  )}\n                </Paragraph>\n              ))}\n            </Card>\n\n            <Card title=\"Audience\" size=\"small\">\n              <Paragraph>\n                <Text strong>Platforms: </Text>\n                {values.audience?.platforms?.join(', ') || 'All platforms'}\n              </Paragraph>\n              <Paragraph>\n                <Text strong>Countries: </Text>\n                {values.audience?.countries?.join(', ') || 'All countries'}\n              </Paragraph>\n              <Paragraph>\n                <Text strong>Traffic: </Text>\n                {values.trafficPercentage || 100}% of eligible users\n              </Paragraph>\n            </Card>\n          </Space>\n        );\n\n      case 4:\n        return (\n          <Alert\n            message=\"A/B Test Created Successfully!\"\n            description=\"Your test has been configured and is ready to launch. You can start the test from the test management page.\"\n            type=\"success\"\n            showIcon\n            action={\n              <Button type=\"primary\" href=\"/ab-test/results\">\n                View Test Dashboard\n              </Button>\n            }\n          />\n        );\n\n      default:\n        return null;\n    }\n  };\n\n  return (\n    <div style={{ padding: 24, maxWidth: 800, margin: '0 auto' }}>\n      <Card>\n        <Title level={3}>\n          <ExperimentOutlined /> Create A/B Test\n        </Title>\n        <Paragraph type=\"secondary\">\n          Configure and launch A/B tests to optimize your business metrics\n        </Paragraph>\n\n        <Steps current={currentStep} style={{ marginBottom: 32 }}>\n          {steps.map(step => (\n            <Step key={step.title} title={step.title} description={step.description} />\n          ))}\n        </Steps>\n\n        {error && (\n          <Alert\n            message={error}\n            type=\"error\"\n            showIcon\n            style={{ marginBottom: 16 }}\n            closable\n            onClose={() => setError(null)}\n          />\n        )}\n\n        <Form form={form} layout=\"vertical\">\n          {renderStepContent()}\n        </Form>\n\n        {currentStep < 4 && (\n          <div style={{ marginTop: 24, display: 'flex', justifyContent: 'space-between' }}>\n            <Button onClick={handlePrev} disabled={currentStep === 0}>\n              Previous\n            </Button>\n            <Space>\n              {currentStep < 3 ? (\n                <Button type=\"primary\" onClick={handleNext}>\n                  Next\n                </Button>\n              ) : (\n                <Button \n                  type=\"primary\" \n                  icon={<SaveOutlined />}\n                  onClick={handleSave}\n                  loading={loading}\n                >\n                  Save & Launch\n                </Button>\n              )}\n            </Space>\n          </div>\n        )}\n      </Card>\n    </div>\n  );\n};\n\nexport default ABTestConfigPage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/ABTest/ABTestConfig.tsx"
    },
    "B2B/EnterpriseQuote": {
      "path": "B2B/EnterpriseQuote",
      "id": "B2B/EnterpriseQuote",
      "file": "B2B/EnterpriseQuote.tsx",
      "absPath": "/B2B/EnterpriseQuote",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  InputNumber,\n  Select,\n  Descriptions,\n  Divider,\n  message,\n  Tag,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  Alert,\n  Result,\n} from 'antd';\nimport {\n  DollarOutlined,\n  FileTextOutlined,\n  CalculatorOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  WarningOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\n\ninterface QuoteItem {\n  key: string;\n  productId: string;\n  productName: string;\n  quantity: number;\n  basePrice: number;\n  unitPrice: number;\n  discountPercent: number;\n  totalAmount: number;\n  profitMargin: number;\n  isApproved: boolean;\n  rejectionReason?: string;\n}\n\ninterface Customer {\n  id: string;\n  name: string;\n  creditLevel: string;\n  creditLimit: number;\n  usedCredit: number;\n}\n\ninterface QuoteFormData {\n  customerId: string;\n  items: QuoteItem[];\n  validUntil: string;\n  remark: string;\n}\n\nconst MOCK_PRODUCTS = [\n  { id: 'P001', name: 'Industrial Sensor A', basePrice: 150.00 },\n  { id: 'P002', name: 'Control Module B', basePrice: 280.00 },\n  { id: 'P003', name: 'Power Supply Unit C', basePrice: 95.00 },\n  { id: 'P004', name: 'Communication Gateway D', basePrice: 420.00 },\n  { id: 'P005', name: 'Display Panel E', basePrice: 185.00 },\n];\n\nconst MOCK_CUSTOMERS: Customer[] = [\n  { id: 'C001', name: 'TechCorp Industries', creditLevel: 'A', creditLimit: 100000, usedCredit: 25000 },\n  { id: 'C002', name: 'Global Manufacturing Co', creditLevel: 'B', creditLimit: 50000, usedCredit: 15000 },\n  { id: 'C003', name: 'Smart Factory Solutions', creditLevel: 'A', creditLimit: 200000, usedCredit: 80000 },\n];\n\nconst CREDIT_LEVEL_COLORS: Record<string, string> = {\n  A: 'green',\n  B: 'blue',\n  C: 'orange',\n  D: 'red',\n};\n\nexport const EnterpriseQuote: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [quoteItems, setQuoteItems] = useState<QuoteItem[]>([]);\n  const [selectedCustomer, setSelectedCustomer] = useState<Customer | null>(null);\n  const [quoteModalVisible, setQuoteModalVisible] = useState(false);\n  const [resultModalVisible, setResultModalVisible] = useState(false);\n  const [quoteResult, setQuoteResult] = useState<any>(null);\n  const [profitWarning, setProfitWarning] = useState<string | null>(null);\n\n  useEffect(() => {\n    form.setFieldsValue({ items: [{}] });\n  }, []);\n\n  const calculatePrice = (productId: string, quantity: number): QuoteItem | null => {\n    const product = MOCK_PRODUCTS.find(p => p.id === productId);\n    if (!product) return null;\n\n    let discountPercent = 0;\n    if (quantity >= 500) discountPercent = 20;\n    else if (quantity >= 100) discountPercent = 15;\n    else if (quantity >= 50) discountPercent = 10;\n    else if (quantity >= 10) discountPercent = 5;\n\n    const unitPrice = Number((product.basePrice * (1 - discountPercent / 100)).toFixed(2));\n    const totalAmount = Number((unitPrice * quantity).toFixed(2));\n    const profitMargin = Number(((unitPrice - product.basePrice * 0.7) / unitPrice).toFixed(4));\n\n    const isApproved = profitMargin >= 0.15;\n    let rejectionReason: string | undefined;\n    if (!isApproved) {\n      rejectionReason = `Profit margin ${(profitMargin * 100).toFixed(2)}% is below the minimum threshold of 15% for B2B transactions`;\n    }\n\n    return {\n      key: `${productId}-${Date.now()}`,\n      productId,\n      productName: product.name,\n      quantity,\n      basePrice: product.basePrice,\n      unitPrice,\n      discountPercent,\n      totalAmount,\n      profitMargin,\n      isApproved,\n      rejectionReason,\n    };\n  };\n\n  const handleCustomerChange = (customerId: string) => {\n    const customer = MOCK_CUSTOMERS.find(c => c.id === customerId);\n    setSelectedCustomer(customer || null);\n  };\n\n  const handleAddItem = () => {\n    const values = form.getFieldsValue();\n    const newItem = calculatePrice(values.newProductId, values.newQuantity);\n    if (newItem) {\n      setQuoteItems([...quoteItems, newItem]);\n      form.setFieldsValue({ newProductId: undefined, newQuantity: undefined });\n      \n      if (!newItem.isApproved) {\n        setProfitWarning(newItem.rejectionReason || null);\n      }\n    }\n  };\n\n  const handleRemoveItem = (key: string) => {\n    setQuoteItems(quoteItems.filter(item => item.key !== key));\n  };\n\n  const handleSubmitQuote = async () => {\n    if (!selectedCustomer) {\n      message.error('Please select a customer');\n      return;\n    }\n    if (quoteItems.length === 0) {\n      message.error('Please add at least one item');\n      return;\n    }\n\n    const hasUnapproved = quoteItems.some(item => !item.isApproved);\n    if (hasUnapproved) {\n      Modal.confirm({\n        title: 'Profit Margin Warning',\n        icon: <WarningOutlined />,\n        content: 'Some items have profit margins below the 15% threshold. Do you want to proceed with PENDING_REVIEW status?',\n        onOk: () => submitQuote(),\n      });\n    } else {\n      await submitQuote();\n    }\n  };\n\n  const submitQuote = async () => {\n    setLoading(true);\n    try {\n      const totalAmount = quoteItems.reduce((sum, item) => sum + item.totalAmount, 0);\n      \n      const result = {\n        quoteId: `QT-${Date.now()}`,\n        customerId: selectedCustomer?.id,\n        customerName: selectedCustomer?.name,\n        items: quoteItems,\n        totalAmount,\n        status: quoteItems.every(item => item.isApproved) ? 'APPROVED' : 'PENDING_REVIEW',\n        createdAt: new Date().toISOString(),\n        validUntil: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(),\n      };\n\n      setQuoteResult(result);\n      setResultModalVisible(true);\n      message.success('Quote submitted successfully');\n    } catch (error) {\n      message.error('Failed to submit quote');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const columns: ColumnsType<QuoteItem> = [\n    {\n      title: 'Product ID',\n      dataIndex: 'productId',\n      key: 'productId',\n      width: 100,\n    },\n    {\n      title: 'Product Name',\n      dataIndex: 'productName',\n      key: 'productName',\n      width: 200,\n    },\n    {\n      title: 'Quantity',\n      dataIndex: 'quantity',\n      key: 'quantity',\n      width: 80,\n    },\n    {\n      title: 'Base Price',\n      dataIndex: 'basePrice',\n      key: 'basePrice',\n      width: 100,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Discount',\n      dataIndex: 'discountPercent',\n      key: 'discountPercent',\n      width: 80,\n      render: (discount: number) => `${discount}%`,\n    },\n    {\n      title: 'Unit Price',\n      dataIndex: 'unitPrice',\n      key: 'unitPrice',\n      width: 100,\n      render: (price: number) => <strong>${price.toFixed(2)}</strong>,\n    },\n    {\n      title: 'Total',\n      dataIndex: 'totalAmount',\n      key: 'totalAmount',\n      width: 100,\n      render: (amount: number) => <strong style={{ color: '#1890ff' }}>${amount.toFixed(2)}</strong>,\n    },\n    {\n      title: 'Profit Margin',\n      dataIndex: 'profitMargin',\n      key: 'profitMargin',\n      width: 100,\n      render: (margin: number, record: QuoteItem) => (\n        <Tag color={record.isApproved ? 'green' : 'red'}>\n          {(margin * 100).toFixed(1)}%\n        </Tag>\n      ),\n    },\n    {\n      title: 'Status',\n      dataIndex: 'isApproved',\n      key: 'isApproved',\n      width: 100,\n      render: (approved: boolean, record: QuoteItem) => (\n        <Tooltip title={record.rejectionReason}>\n          <Tag color={approved ? 'green' : 'red'} icon={approved ? <CheckCircleOutlined /> : <CloseCircleOutlined />}>\n            {approved ? 'Approved' : 'Rejected'}\n          </Tag>\n        </Tooltip>\n      ),\n    },\n    {\n      title: 'Action',\n      key: 'action',\n      width: 80,\n      render: (_, record) => (\n        <Button type=\"link\" danger onClick={() => handleRemoveItem(record.key)}>\n          Remove\n        </Button>\n      ),\n    },\n  ];\n\n  const totalAmount = quoteItems.reduce((sum, item) => sum + item.totalAmount, 0);\n  const totalProfit = quoteItems.reduce((sum, item) => sum + (item.unitPrice - item.basePrice * 0.7) * item.quantity, 0);\n\n  return (\n    <div className=\"enterprise-quote-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Quote Amount\"\n              value={totalAmount}\n              precision={2}\n              prefix={<DollarOutlined />}\n              valueStyle={{ color: '#1890ff' }}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Estimated Profit\"\n              value={totalProfit}\n              precision={2}\n              prefix=\"$\"\n              valueStyle={{ color: '#52c41a' }}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Items Count\"\n              value={quoteItems.length}\n              suffix=\"items\"\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Avg Profit Margin\"\n              value={quoteItems.length > 0 \n                ? (quoteItems.reduce((sum, item) => sum + item.profitMargin, 0) / quoteItems.length * 100).toFixed(1)\n                : 0}\n              suffix=\"%\"\n              valueStyle={{ \n                color: quoteItems.length > 0 && quoteItems.reduce((sum, item) => sum + item.profitMargin, 0) / quoteItems.length >= 0.15 \n                  ? '#52c41a' \n                  : '#ff4d4f' \n              }}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      {profitWarning && (\n        <Alert\n          message=\"Profit Margin Warning\"\n          description={profitWarning}\n          type=\"warning\"\n          showIcon\n          closable\n          onClose={() => setProfitWarning(null)}\n          style={{ marginBottom: 16 }}\n        />\n      )}\n\n      <Card title=\"Enterprise Quote Management\" extra={\n        <Space>\n          <Button type=\"primary\" onClick={handleSubmitQuote} loading={loading} icon={<FileTextOutlined />}>\n            Submit Quote\n          </Button>\n        </Space>\n      }>\n        <Form form={form} layout=\"vertical\">\n          <Row gutter={16}>\n            <Col span={8}>\n              <Form.Item name=\"customerId\" label=\"Customer\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select Customer\" onChange={handleCustomerChange}>\n                  {MOCK_CUSTOMERS.map(customer => (\n                    <Option key={customer.id} value={customer.id}>\n                      {customer.name} \n                      <Tag color={CREDIT_LEVEL_COLORS[customer.creditLevel]} style={{ marginLeft: 8 }}>\n                        Level {customer.creditLevel}\n                      </Tag>\n                    </Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n            <Col span={8}>\n              <Form.Item name=\"validUntil\" label=\"Valid Until\">\n                <Input type=\"date\" defaultValue={new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString().split('T')[0]} />\n              </Form.Item>\n            </Col>\n            <Col span={8}>\n              <Form.Item name=\"remark\" label=\"Remark\">\n                <Input placeholder=\"Enter remark\" />\n              </Form.Item>\n            </Col>\n          </Row>\n\n          {selectedCustomer && (\n            <Card size=\"small\" style={{ marginBottom: 16, background: '#fafafa' }}>\n              <Descriptions size=\"small\" column={4}>\n                <Descriptions.Item label=\"Credit Level\">\n                  <Tag color={CREDIT_LEVEL_COLORS[selectedCustomer.creditLevel]}>\n                    {selectedCustomer.creditLevel}\n                  </Tag>\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Credit Limit\">\n                  ${selectedCustomer.creditLimit.toLocaleString()}\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Used Credit\">\n                  ${selectedCustomer.usedCredit.toLocaleString()}\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Available Credit\">\n                  ${(selectedCustomer.creditLimit - selectedCustomer.usedCredit).toLocaleString()}\n                </Descriptions.Item>\n              </Descriptions>\n            </Card>\n          )}\n\n          <Divider>Add Quote Items</Divider>\n\n          <Row gutter={16}>\n            <Col span={10}>\n              <Form.Item name=\"newProductId\" label=\"Product\">\n                <Select placeholder=\"Select Product\">\n                  {MOCK_PRODUCTS.map(product => (\n                    <Option key={product.id} value={product.id}>\n                      {product.id} - {product.name} (${product.basePrice.toFixed(2)})\n                    </Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n            <Col span={6}>\n              <Form.Item name=\"newQuantity\" label=\"Quantity\">\n                <InputNumber min={1} placeholder=\"Qty\" style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n            <Col span={8}>\n              <Form.Item label=\" \">\n                <Button type=\"primary\" onClick={handleAddItem} icon={<CalculatorOutlined />}>\n                  Calculate & Add\n                </Button>\n              </Form.Item>\n            </Col>\n          </Row>\n        </Form>\n\n        <Divider>Quote Items</Divider>\n\n        <Table\n          columns={columns}\n          dataSource={quoteItems}\n          pagination={false}\n          scroll={{ x: 1000 }}\n          summary={() => (\n            <Table.Summary fixed>\n              <Table.Summary.Row>\n                <Table.Summary.Cell index={0} colSpan={6}>\n                  <strong>Total</strong>\n                </Table.Summary.Cell>\n                <Table.Summary.Cell index={1}>\n                  <strong style={{ color: '#1890ff', fontSize: 16 }}>\n                    ${totalAmount.toFixed(2)}\n                  </strong>\n                </Table.Summary.Cell>\n                <Table.Summary.Cell index={2} colSpan={3} />\n              </Table.Summary.Row>\n            </Table.Summary>\n          )}\n        />\n      </Card>\n\n      <Modal\n        title=\"Quote Result\"\n        open={resultModalVisible}\n        onCancel={() => setResultModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setResultModalVisible(false)}>\n            Close\n          </Button>,\n          <Button key=\"print\" type=\"primary\" onClick={() => message.info('Print functionality coming soon')}>\n            Print Quote\n          </Button>,\n        ]}\n        width={800}\n      >\n        {quoteResult && (\n          <Result\n            status={quoteResult.status === 'APPROVED' ? 'success' : 'warning'}\n            title={`Quote ${quoteResult.quoteId}`}\n            subTitle={quoteResult.status === 'APPROVED' \n              ? 'Quote has been approved automatically' \n              : 'Quote requires manual review due to profit margin constraints'}\n            extra={[\n              <Descriptions key=\"details\" bordered column={2} style={{ marginTop: 24 }}>\n                <Descriptions.Item label=\"Customer\">{quoteResult.customerName}</Descriptions.Item>\n                <Descriptions.Item label=\"Status\">\n                  <Tag color={quoteResult.status === 'APPROVED' ? 'green' : 'orange'}>\n                    {quoteResult.status}\n                  </Tag>\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Total Amount\">\n                  <strong style={{ fontSize: 18, color: '#1890ff' }}>\n                    ${quoteResult.totalAmount.toFixed(2)}\n                  </strong>\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Items Count\">{quoteResult.items.length}</Descriptions.Item>\n                <Descriptions.Item label=\"Created At\">\n                  {new Date(quoteResult.createdAt).toLocaleString()}\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Valid Until\">\n                  {new Date(quoteResult.validUntil).toLocaleDateString()}\n                </Descriptions.Item>\n              </Descriptions>,\n            ]}\n          />\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default EnterpriseQuote;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/B2B/EnterpriseQuote.tsx"
    },
    "B2BTrade/BatchOrder": {
      "path": "B2BTrade/BatchOrder",
      "id": "B2BTrade/BatchOrder",
      "file": "B2BTrade/BatchOrder.tsx",
      "absPath": "/B2BTrade/BatchOrder",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Form,\n  Input,\n  Select,\n  Button,\n  Table,\n  Modal,\n  Descriptions,\n  Divider,\n  message,\n  Space,\n  Tag,\n  Row,\n  Col,\n  InputNumber,\n  Steps,\n  Upload,\n  Tooltip,\n  Badge,\n  Statistic,\n  Progress,\n  Alert,\n} from 'antd';\nimport {\n  ShoppingCartOutlined,\n  UploadOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  SyncOutlined,\n  DownloadOutlined,\n  FileExcelOutlined,\n  UserOutlined,\n  DeleteOutlined,\n  EyeOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\nconst { TextArea } = Input;\n\ninterface BatchOrderItem {\n  key: string;\n  lineNumber: number;\n  productId: string;\n  sku: string;\n  productName: string;\n  quantity: number;\n  unitPrice: number;\n  totalPrice: number;\n  customerId: string;\n  customerName: string;\n  status: 'VALID' | 'INVALID' | 'PENDING';\n  error?: string;\n}\n\ninterface BatchOrder {\n  id: string;\n  batchId: string;\n  customerId: string;\n  customerName: string;\n  totalItems: number;\n  totalAmount: number;\n  currency: string;\n  status: 'DRAFT' | 'PENDING_REVIEW' | 'CONFIRMED' | 'PROCESSING' | 'COMPLETED' | 'CANCELLED';\n  createdAt: string;\n  validItems: number;\n  invalidItems: number;\n}\n\ninterface Customer {\n  id: string;\n  name: string;\n  company: string;\n  tier: 'BASIC' | 'PRO' | 'ENTERPRISE';\n}\n\nconst BATCH_STATUS_MAP: Record<string, { color: string; text: string; icon: React.ReactNode }> = {\n  DRAFT: { color: 'default', text: 'Draft', icon: <FileExcelOutlined /> },\n  PENDING_REVIEW: { color: 'processing', text: 'Pending Review', icon: <SyncOutlined spin /> },\n  CONFIRMED: { color: 'blue', text: 'Confirmed', icon: <CheckCircleOutlined /> },\n  PROCESSING: { color: 'blue', text: 'Processing', icon: <SyncOutlined spin /> },\n  COMPLETED: { color: 'success', text: 'Completed', icon: <CheckCircleOutlined /> },\n  CANCELLED: { color: 'error', text: 'Cancelled', icon: <CloseCircleOutlined /> },\n};\n\nconst ITEM_STATUS_MAP: Record<string, { color: string; text: string }> = {\n  VALID: { color: 'success', text: 'Valid' },\n  INVALID: { color: 'error', text: 'Invalid' },\n  PENDING: { color: 'warning', text: 'Pending' },\n};\n\nexport const BatchOrder: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [batchOrders, setBatchOrders] = useState<BatchOrder[]>([]);\n  const [customers, setCustomers] = useState<Customer[]>([]);\n  const [orderItems, setOrderItems] = useState<BatchOrderItem[]>([]);\n  const [currentStep, setCurrentStep] = useState(0);\n  const [createModalVisible, setCreateModalVisible] = useState(false);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [selectedBatch, setSelectedBatch] = useState<BatchOrder | null>(null);\n  const [selectedCustomer, setSelectedCustomer] = useState<Customer | null>(null);\n  const [fileList, setFileList] = useState<any[]>([]);\n  const [stats, setStats] = useState({\n    total: 0,\n    pending: 0,\n    processing: 0,\n    completed: 0,\n    totalAmount: 0,\n  });\n\n  useEffect(() => {\n    fetchBatchOrders();\n    fetchCustomers();\n  }, []);\n\n  const fetchBatchOrders = async () => {\n    setLoading(true);\n    try {\n      const mockOrders: BatchOrder[] = [\n        {\n          id: '1',\n          batchId: 'BO-2026-001',\n          customerId: 'CUST_001',\n          customerName: 'ABC Trading Co.',\n          totalItems: 50,\n          totalAmount: 25000.00,\n          currency: 'USD',\n          status: 'CONFIRMED',\n          createdAt: '2026-03-18 10:00:00',\n          validItems: 48,\n          invalidItems: 2,\n        },\n        {\n          id: '2',\n          batchId: 'BO-2026-002',\n          customerId: 'CUST_002',\n          customerName: 'XYZ Electronics Ltd.',\n          totalItems: 100,\n          totalAmount: 45000.00,\n          currency: 'USD',\n          status: 'PENDING_REVIEW',\n          createdAt: '2026-03-17 14:30:00',\n          validItems: 95,\n          invalidItems: 5,\n        },\n        {\n          id: '3',\n          batchId: 'BO-2026-003',\n          customerId: 'CUST_003',\n          customerName: 'Global Import Inc.',\n          totalItems: 200,\n          totalAmount: 85000.00,\n          currency: 'USD',\n          status: 'COMPLETED',\n          createdAt: '2026-03-15 09:00:00',\n          validItems: 200,\n          invalidItems: 0,\n        },\n      ];\n      setBatchOrders(mockOrders);\n      calculateStats(mockOrders);\n    } catch (error) {\n      message.error('Failed to load batch orders');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const fetchCustomers = async () => {\n    const mockCustomers: Customer[] = [\n      { id: 'CUST_001', name: 'ABC Trading Co.', company: 'ABC Trading', tier: 'ENTERPRISE' },\n      { id: 'CUST_002', name: 'XYZ Electronics Ltd.', company: 'XYZ Electronics', tier: 'PRO' },\n      { id: 'CUST_003', name: 'Global Import Inc.', company: 'Global Import', tier: 'ENTERPRISE' },\n    ];\n    setCustomers(mockCustomers);\n  };\n\n  const calculateStats = (orders: BatchOrder[]) => {\n    setStats({\n      total: orders.length,\n      pending: orders.filter((o) => o.status === 'PENDING_REVIEW').length,\n      processing: orders.filter((o) => o.status === 'PROCESSING').length,\n      completed: orders.filter((o) => o.status === 'COMPLETED').length,\n      totalAmount: orders.filter((o) => o.status === 'COMPLETED').reduce((sum, o) => sum + o.totalAmount, 0),\n    });\n  };\n\n  const handleCustomerChange = (customerId: string) => {\n    const customer = customers.find((c) => c.id === customerId);\n    setSelectedCustomer(customer || null);\n  };\n\n  const handleFileUpload = (info: any) => {\n    setFileList(info.fileList.slice(-1));\n    if (info.file.status === 'done' || info.file) {\n      parseUploadedFile(info.file);\n    }\n  };\n\n  const parseUploadedFile = (file: any) => {\n    const mockItems: BatchOrderItem[] = [\n      { key: '1', lineNumber: 1, productId: 'PROD_001', sku: 'SKU-001', productName: 'Wireless Headphones', quantity: 100, unitPrice: 22.00, totalPrice: 2200.00, customerId: selectedCustomer?.id || '', customerName: selectedCustomer?.name || '', status: 'VALID' },\n      { key: '2', lineNumber: 2, productId: 'PROD_002', sku: 'SKU-002', productName: 'USB-C Cable', quantity: 500, unitPrice: 4.50, totalPrice: 2250.00, customerId: selectedCustomer?.id || '', customerName: selectedCustomer?.name || '', status: 'VALID' },\n      { key: '3', lineNumber: 3, productId: 'PROD_003', sku: 'SKU-003', productName: 'Phone Case', quantity: 200, unitPrice: 7.00, totalPrice: 1400.00, customerId: selectedCustomer?.id || '', customerName: selectedCustomer?.name || '', status: 'VALID' },\n      { key: '4', lineNumber: 4, productId: 'PROD_004', sku: 'SKU-004', productName: 'Invalid Product', quantity: 50, unitPrice: 0, totalPrice: 0, customerId: selectedCustomer?.id || '', customerName: selectedCustomer?.name || '', status: 'INVALID', error: 'Product not found' },\n    ];\n    setOrderItems(mockItems);\n    setCurrentStep(1);\n    message.success('File parsed successfully');\n  };\n\n  const handleRemoveItem = (key: string) => {\n    setOrderItems(orderItems.filter((item) => item.key !== key));\n  };\n\n  const handleValidateItems = () => {\n    setLoading(true);\n    setTimeout(() => {\n      const validCount = orderItems.filter((i) => i.status === 'VALID').length;\n      const invalidCount = orderItems.filter((i) => i.status === 'INVALID').length;\n      message.success(`Validation complete: ${validCount} valid, ${invalidCount} invalid`);\n      setLoading(false);\n    }, 1000);\n  };\n\n  const handleSubmitBatch = async () => {\n    try {\n      const values = await form.validateFields();\n      const validItems = orderItems.filter((i) => i.status === 'VALID');\n      if (validItems.length === 0) {\n        message.error('No valid items to submit');\n        return;\n      }\n\n      setLoading(true);\n      const totalAmount = validItems.reduce((sum, item) => sum + item.totalPrice, 0);\n\n      const batchData = {\n        customerId: values.customerId,\n        items: validItems,\n        totalAmount,\n        note: values.note,\n      };\n\n      console.log('Submitting batch order:', batchData);\n\n      await new Promise((resolve) => setTimeout(resolve, 1000));\n\n      message.success('Batch order submitted successfully');\n      setCurrentStep(2);\n    } catch (error) {\n      message.error('Failed to submit batch order');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleViewDetail = (batch: BatchOrder) => {\n    setSelectedBatch(batch);\n    setDetailModalVisible(true);\n  };\n\n  const handleApproveBatch = async (batchId: string) => {\n    setLoading(true);\n    try {\n      console.log('Approving batch order:', batchId);\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Batch order approved');\n      fetchBatchOrders();\n    } catch (error) {\n      message.error('Failed to approve batch order');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleDownloadTemplate = () => {\n    message.info('Downloading template...');\n  };\n\n  const itemColumns: ColumnsType<BatchOrderItem> = [\n    { title: 'Line', dataIndex: 'lineNumber', key: 'lineNumber', width: 60 },\n    { title: 'SKU', dataIndex: 'sku', key: 'sku', width: 100 },\n    { title: 'Product', dataIndex: 'productName', key: 'productName' },\n    { title: 'Qty', dataIndex: 'quantity', key: 'quantity', width: 80 },\n    {\n      title: 'Unit Price',\n      dataIndex: 'unitPrice',\n      key: 'unitPrice',\n      width: 100,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Total',\n      dataIndex: 'totalPrice',\n      key: 'totalPrice',\n      width: 100,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 90,\n      render: (status: string) => {\n        const config = ITEM_STATUS_MAP[status];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Error',\n      dataIndex: 'error',\n      key: 'error',\n      width: 150,\n      render: (error?: string) => error ? <span style={{ color: '#f5222d' }}>{error}</span> : '-',\n    },\n    {\n      title: 'Action',\n      key: 'action',\n      width: 80,\n      render: (_, record) => (\n        <Button type=\"link\" danger icon={<DeleteOutlined />} onClick={() => handleRemoveItem(record.key)} />\n      ),\n    },\n  ];\n\n  const batchColumns: ColumnsType<BatchOrder> = [\n    {\n      title: 'Batch ID',\n      dataIndex: 'batchId',\n      key: 'batchId',\n      width: 130,\n      render: (text: string, record) => (\n        <a onClick={() => handleViewDetail(record)}>{text}</a>\n      ),\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 180,\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 130,\n      render: (status: string) => {\n        const config = BATCH_STATUS_MAP[status];\n        return <Tag icon={config.icon} color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Items',\n      key: 'items',\n      width: 120,\n      render: (_, record) => (\n        <Space>\n          <Badge count={record.validItems} style={{ backgroundColor: '#52c41a' }} />\n          <Badge count={record.invalidItems} style={{ backgroundColor: '#f5222d' }} />\n        </Space>\n      ),\n    },\n    {\n      title: 'Amount',\n      dataIndex: 'totalAmount',\n      key: 'totalAmount',\n      width: 120,\n      render: (amount: number) => (\n        <span style={{ fontWeight: 'bold' }}>${amount.toFixed(2)}</span>\n      ),\n    },\n    {\n      title: 'Created',\n      dataIndex: 'createdAt',\n      key: 'createdAt',\n      width: 160,\n    },\n    {\n      title: 'Actions',\n      key: 'action',\n      width: 150,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space>\n          <Tooltip title=\"View Details\">\n            <Button type=\"link\" icon={<EyeOutlined />} onClick={() => handleViewDetail(record)} />\n          </Tooltip>\n          {record.status === 'PENDING_REVIEW' && (\n            <Tooltip title=\"Approve\">\n              <Button type=\"link\" icon={<CheckCircleOutlined />} onClick={() => handleApproveBatch(record.batchId)} />\n            </Tooltip>\n          )}\n        </Space>\n      ),\n    },\n  ];\n\n  const validCount = orderItems.filter((i) => i.status === 'VALID').length;\n  const invalidCount = orderItems.filter((i) => i.status === 'INVALID').length;\n  const totalAmount = orderItems.filter((i) => i.status === 'VALID').reduce((sum, item) => sum + item.totalPrice, 0);\n\n  const steps = [\n    { title: 'Upload', description: 'Select customer & upload file' },\n    { title: 'Review', description: 'Validate items' },\n    { title: 'Submit', description: 'Confirm & submit' },\n  ];\n\n  return (\n    <div className=\"batch-order-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Total Batches\" value={stats.total} prefix={<ShoppingCartOutlined />} />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Pending Review\"\n              value={stats.pending}\n              valueStyle={{ color: '#faad14' }}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Processing\"\n              value={stats.processing}\n              valueStyle={{ color: '#1890ff' }}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Completed\"\n              value={stats.completed}\n              valueStyle={{ color: '#52c41a' }}\n            />\n          </Card>\n        </Col>\n        <Col span={8}>\n          <Card>\n            <Statistic\n              title=\"Total Amount\"\n              value={stats.totalAmount}\n              precision={2}\n              prefix=\"$\"\n              valueStyle={{ color: '#52c41a' }}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card\n        title=\"Batch Orders\"\n        extra={\n          <Button type=\"primary\" icon={<ShoppingCartOutlined />} onClick={() => {\n            setCreateModalVisible(true);\n            setCurrentStep(0);\n            setOrderItems([]);\n            setFileList([]);\n          }}>\n            Create Batch Order\n          </Button>\n        }\n      >\n        <Table\n          columns={batchColumns}\n          dataSource={batchOrders}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1100 }}\n          pagination={{\n            showSizeChanger: true,\n            showTotal: (total) => `Total ${total} batches`,\n          }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Create Batch Order\"\n        open={createModalVisible}\n        onCancel={() => setCreateModalVisible(false)}\n        footer={null}\n        width={1000}\n      >\n        <Steps current={currentStep} items={steps} style={{ marginBottom: 24 }} />\n\n        {currentStep === 0 && (\n          <Form form={form} layout=\"vertical\">\n            <Form.Item name=\"customerId\" label=\"Customer\" rules={[{ required: true }]}>\n              <Select\n                placeholder=\"Select customer\"\n                showSearch\n                optionFilterProp=\"children\"\n                onChange={handleCustomerChange}\n              >\n                {customers.map((c) => (\n                  <Option key={c.id} value={c.id}>\n                    {c.name} ({c.company})\n                  </Option>\n                ))}\n              </Select>\n            </Form.Item>\n\n            {selectedCustomer && (\n              <Alert\n                message={`Selected Customer: ${selectedCustomer.name} (${selectedCustomer.tier})`}\n                type=\"info\"\n                showIcon\n                style={{ marginBottom: 16 }}\n              />\n            )}\n\n            <Divider>Upload Order File</Divider>\n\n            <div style={{ marginBottom: 16 }}>\n              <Button icon={<DownloadOutlined />} onClick={handleDownloadTemplate}>\n                Download Template\n              </Button>\n            </div>\n\n            <Upload\n              accept=\".xlsx,.xls,.csv\"\n              fileList={fileList}\n              onChange={handleFileUpload}\n              beforeUpload={() => false}\n              maxCount={1}\n            >\n              <Button icon={<UploadOutlined />} disabled={!selectedCustomer}>\n                Select File\n              </Button>\n            </Upload>\n\n            <div style={{ marginTop: 16, color: '#666' }}>\n              Supported formats: Excel (.xlsx, .xls), CSV (.csv)\n            </div>\n          </Form>\n        )}\n\n        {currentStep === 1 && (\n          <>\n            <Row gutter={16} style={{ marginBottom: 16 }}>\n              <Col span={8}>\n                <Card size=\"small\">\n                  <Statistic\n                    title=\"Valid Items\"\n                    value={validCount}\n                    valueStyle={{ color: '#52c41a' }}\n                    prefix={<CheckCircleOutlined />}\n                  />\n                </Card>\n              </Col>\n              <Col span={8}>\n                <Card size=\"small\">\n                  <Statistic\n                    title=\"Invalid Items\"\n                    value={invalidCount}\n                    valueStyle={{ color: '#f5222d' }}\n                    prefix={<CloseCircleOutlined />}\n                  />\n                </Card>\n              </Col>\n              <Col span={8}>\n                <Card size=\"small\">\n                  <Statistic\n                    title=\"Total Amount\"\n                    value={totalAmount}\n                    precision={2}\n                    prefix=\"$\"\n                  />\n                </Card>\n              </Col>\n            </Row>\n\n            <div style={{ marginBottom: 16 }}>\n              <Space>\n                <Button onClick={handleValidateItems} loading={loading}>\n                  Re-validate\n                </Button>\n                <Button onClick={() => setCurrentStep(0)}>Back</Button>\n              </Space>\n            </div>\n\n            <Table\n              columns={itemColumns}\n              dataSource={orderItems}\n              rowKey=\"key\"\n              pagination={false}\n              scroll={{ y: 300 }}\n              size=\"small\"\n            />\n\n            <Form form={form} layout=\"vertical\" style={{ marginTop: 16 }}>\n              <Form.Item name=\"note\" label=\"Note\">\n                <TextArea rows={2} placeholder=\"Add notes (optional)\" />\n              </Form.Item>\n            </Form>\n\n            <div style={{ textAlign: 'right', marginTop: 16 }}>\n              <Space>\n                <Button onClick={() => setCreateModalVisible(false)}>Cancel</Button>\n                <Button\n                  type=\"primary\"\n                  onClick={handleSubmitBatch}\n                  loading={loading}\n                  disabled={validCount === 0}\n                >\n                  Submit Batch Order\n                </Button>\n              </Space>\n            </div>\n          </>\n        )}\n\n        {currentStep === 2 && (\n          <div style={{ textAlign: 'center', padding: '40px 0' }}>\n            <CheckCircleOutlined style={{ fontSize: 64, color: '#52c41a' }} />\n            <h2 style={{ marginTop: 24 }}>Batch Order Submitted</h2>\n            <p style={{ color: '#666' }}>\n              Your batch order has been submitted for review.\n              <br />\n              You will be notified once it is approved.\n            </p>\n            <Descriptions bordered column={1} style={{ maxWidth: 400, margin: '24px auto' }}>\n              <Descriptions.Item label=\"Batch ID\">BO-2026-NEW</Descriptions.Item>\n              <Descriptions.Item label=\"Status\">\n                <Tag color=\"processing\">Pending Review</Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Valid Items\">{validCount}</Descriptions.Item>\n              <Descriptions.Item label=\"Total Amount\">${totalAmount.toFixed(2)}</Descriptions.Item>\n            </Descriptions>\n            <Button type=\"primary\" onClick={() => setCreateModalVisible(false)}>\n              Done\n            </Button>\n          </div>\n        )}\n      </Modal>\n\n      <Modal\n        title=\"Batch Order Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>\n            Close\n          </Button>,\n        ]}\n        width={700}\n      >\n        {selectedBatch && (\n          <>\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"Batch ID\">{selectedBatch.batchId}</Descriptions.Item>\n              <Descriptions.Item label=\"Status\">\n                <Tag color={BATCH_STATUS_MAP[selectedBatch.status].color}>\n                  {BATCH_STATUS_MAP[selectedBatch.status].text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Customer\">{selectedBatch.customerName}</Descriptions.Item>\n              <Descriptions.Item label=\"Currency\">{selectedBatch.currency}</Descriptions.Item>\n              <Descriptions.Item label=\"Valid Items\">{selectedBatch.validItems}</Descriptions.Item>\n              <Descriptions.Item label=\"Invalid Items\">{selectedBatch.invalidItems}</Descriptions.Item>\n              <Descriptions.Item label=\"Total Amount\" span={2}>\n                <span style={{ fontSize: 18, fontWeight: 'bold', color: '#1890ff' }}>\n                  ${selectedBatch.totalAmount.toFixed(2)}\n                </span>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Created\">{selectedBatch.createdAt}</Descriptions.Item>\n            </Descriptions>\n\n            <Divider>Validation Progress</Divider>\n\n            <Progress\n              percent={Math.round((selectedBatch.validItems / selectedBatch.totalItems) * 100)}\n              status={selectedBatch.invalidItems > 0 ? 'exception' : 'success'}\n              format={() => `${selectedBatch.validItems}/${selectedBatch.totalItems} valid`}\n            />\n          </>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default BatchOrder;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/B2BTrade/BatchOrder.tsx"
    },
    "B2B/ContractManage": {
      "path": "B2B/ContractManage",
      "id": "B2B/ContractManage",
      "file": "B2B/ContractManage.tsx",
      "absPath": "/B2B/ContractManage",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  Select,\n  DatePicker,\n  Descriptions,\n  Divider,\n  message,\n  Tag,\n  Tabs,\n  Row,\n  Col,\n  Statistic,\n  Timeline,\n  Upload,\n  Tooltip,\n} from 'antd';\nimport {\n  FileTextOutlined,\n  PlusOutlined,\n  EyeOutlined,\n  EditOutlined,\n  CheckCircleOutlined,\n  ClockCircleOutlined,\n  CloseCircleOutlined,\n  SyncOutlined,\n  UploadOutlined,\n  DownloadOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs from 'dayjs';\n\nconst { Option } = Select;\nconst { TabPane } = Tabs;\nconst { RangePicker } = DatePicker;\n\ninterface Contract {\n  id: string;\n  contractNo: string;\n  customerId: string;\n  customerName: string;\n  title: string;\n  type: 'PURCHASE' | 'SALES' | 'SERVICE' | 'DISTRIBUTION' | 'OEM';\n  status: 'DRAFT' | 'PENDING_REVIEW' | 'ACTIVE' | 'EXPIRED' | 'TERMINATED' | 'RENEWED';\n  startDate: string;\n  endDate: string;\n  totalAmount: number;\n  signedDate?: string;\n  signedBy?: string;\n  attachments: string[];\n  terms: string;\n  remark?: string;\n  createdAt: string;\n  updatedAt: string;\n}\n\nconst MOCK_CUSTOMERS = [\n  { id: 'C001', name: 'TechCorp Industries' },\n  { id: 'C002', name: 'Global Manufacturing Co' },\n  { id: 'C003', name: 'Smart Factory Solutions' },\n];\n\nconst CONTRACT_TYPES = [\n  { value: 'PURCHASE', label: 'Purchase Contract' },\n  { value: 'SALES', label: 'Sales Contract' },\n  { value: 'SERVICE', label: 'Service Agreement' },\n  { value: 'DISTRIBUTION', label: 'Distribution Agreement' },\n  { value: 'OEM', label: 'OEM Contract' },\n];\n\nconst STATUS_CONFIG: Record<string, { color: string; text: string; icon: React.ReactNode }> = {\n  DRAFT: { color: 'default', text: 'Draft', icon: <EditOutlined /> },\n  PENDING_REVIEW: { color: 'warning', text: 'Pending Review', icon: <ClockCircleOutlined /> },\n  ACTIVE: { color: 'success', text: 'Active', icon: <CheckCircleOutlined /> },\n  EXPIRED: { color: 'error', text: 'Expired', icon: <CloseCircleOutlined /> },\n  TERMINATED: { color: 'red', text: 'Terminated', icon: <CloseCircleOutlined /> },\n  RENEWED: { color: 'blue', text: 'Renewed', icon: <SyncOutlined /> },\n};\n\nexport const ContractManage: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [contracts, setContracts] = useState<Contract[]>([]);\n  const [createModalVisible, setCreateModalVisible] = useState(false);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [selectedContract, setSelectedContract] = useState<Contract | null>(null);\n  const [activeTab, setActiveTab] = useState('all');\n\n  useEffect(() => {\n    fetchContracts();\n  }, []);\n\n  const fetchContracts = async () => {\n    setLoading(true);\n    try {\n      const mockContracts: Contract[] = [\n        {\n          id: '1',\n          contractNo: 'CTR-2026-001',\n          customerId: 'C001',\n          customerName: 'TechCorp Industries',\n          title: 'Annual Supply Agreement 2026',\n          type: 'SALES',\n          status: 'ACTIVE',\n          startDate: '2026-01-01',\n          endDate: '2026-12-31',\n          totalAmount: 500000,\n          signedDate: '2025-12-15',\n          signedBy: 'John Smith',\n          attachments: ['contract_ctr_2026_001.pdf'],\n          terms: 'Net 30 payment terms. Minimum order quantity: 100 units per SKU. Price adjustment clause applies after 6 months.',\n          createdAt: '2025-12-01 10:00:00',\n          updatedAt: '2025-12-15 14:30:00',\n        },\n        {\n          id: '2',\n          contractNo: 'CTR-2026-002',\n          customerId: 'C002',\n          customerName: 'Global Manufacturing Co',\n          title: 'OEM Manufacturing Agreement',\n          type: 'OEM',\n          status: 'PENDING_REVIEW',\n          startDate: '2026-03-01',\n          endDate: '2027-02-28',\n          totalAmount: 800000,\n          attachments: ['oem_agreement_draft.pdf', 'specification_v2.pdf'],\n          terms: 'Exclusive manufacturing rights for North America region. Quality standards: ISO 9001:2015. Lead time: 45 days.',\n          createdAt: '2026-03-10 09:00:00',\n          updatedAt: '2026-03-15 11:20:00',\n        },\n        {\n          id: '3',\n          contractNo: 'CTR-2025-015',\n          customerId: 'C003',\n          customerName: 'Smart Factory Solutions',\n          title: 'Distribution Partnership Agreement',\n          type: 'DISTRIBUTION',\n          status: 'EXPIRED',\n          startDate: '2025-01-01',\n          endDate: '2025-12-31',\n          totalAmount: 300000,\n          signedDate: '2024-12-20',\n          signedBy: 'Mike Johnson',\n          attachments: ['distribution_2025.pdf'],\n          terms: 'Non-exclusive distribution rights for West Coast region. Minimum annual purchase: $250,000.',\n          remark: 'Contract expired. Renewal pending.',\n          createdAt: '2024-12-10 14:00:00',\n          updatedAt: '2026-01-02 09:00:00',\n        },\n        {\n          id: '4',\n          contractNo: 'CTR-2026-003',\n          customerId: 'C001',\n          customerName: 'TechCorp Industries',\n          title: 'Service Level Agreement',\n          type: 'SERVICE',\n          status: 'DRAFT',\n          startDate: '2026-04-01',\n          endDate: '2027-03-31',\n          totalAmount: 120000,\n          attachments: [],\n          terms: '24/7 technical support. Response time: 4 hours for critical issues. On-site support included.',\n          createdAt: '2026-03-18 10:30:00',\n          updatedAt: '2026-03-18 10:30:00',\n        },\n      ];\n      setContracts(mockContracts);\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleCreateContract = async (values: any) => {\n    setLoading(true);\n    try {\n      const customer = MOCK_CUSTOMERS.find(c => c.id === values.customerId);\n      const newContract: Contract = {\n        id: `${Date.now()}`,\n        contractNo: `CTR-${new Date().getFullYear()}-${String(contracts.length + 1).padStart(3, '0')}`,\n        customerId: values.customerId,\n        customerName: customer?.name || '',\n        title: values.title,\n        type: values.type,\n        status: 'DRAFT',\n        startDate: values.dateRange[0].format('YYYY-MM-DD'),\n        endDate: values.dateRange[1].format('YYYY-MM-DD'),\n        totalAmount: values.totalAmount,\n        attachments: [],\n        terms: values.terms,\n        createdAt: new Date().toISOString(),\n        updatedAt: new Date().toISOString(),\n      };\n\n      setContracts([newContract, ...contracts]);\n      message.success('Contract created successfully');\n      setCreateModalVisible(false);\n      form.resetFields();\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleViewDetail = (contract: Contract) => {\n    setSelectedContract(contract);\n    setDetailModalVisible(true);\n  };\n\n  const handleSubmitForReview = (contractId: string) => {\n    Modal.confirm({\n      title: 'Submit for Review',\n      content: 'Are you sure you want to submit this contract for review?',\n      onOk: () => {\n        setContracts(contracts.map(c => \n          c.id === contractId ? { ...c, status: 'PENDING_REVIEW' as const, updatedAt: new Date().toISOString() } : c\n        ));\n        message.success('Contract submitted for review');\n      },\n    });\n  };\n\n  const handleApprove = (contractId: string) => {\n    Modal.confirm({\n      title: 'Approve Contract',\n      content: 'Are you sure you want to approve this contract?',\n      onOk: () => {\n        setContracts(contracts.map(c => \n          c.id === contractId ? { \n            ...c, \n            status: 'ACTIVE' as const, \n            signedDate: new Date().toISOString().split('T')[0],\n            signedBy: 'Current User',\n            updatedAt: new Date().toISOString() \n          } : c\n        ));\n        message.success('Contract approved');\n        setDetailModalVisible(false);\n      },\n    });\n  };\n\n  const getFilteredContracts = () => {\n    if (activeTab === 'all') return contracts;\n    if (activeTab === 'expiring') {\n      return contracts.filter(c => {\n        const daysUntilExpiry = dayjs(c.endDate).diff(dayjs(), 'day');\n        return daysUntilExpiry > 0 && daysUntilExpiry <= 30;\n      });\n    }\n    return contracts.filter(c => c.status === activeTab.toUpperCase());\n  };\n\n  const columns: ColumnsType<Contract> = [\n    {\n      title: 'Contract No',\n      dataIndex: 'contractNo',\n      key: 'contractNo',\n      width: 140,\n      render: (no: string, record: Contract) => (\n        <a onClick={() => handleViewDetail(record)}>{no}</a>\n      ),\n    },\n    {\n      title: 'Title',\n      dataIndex: 'title',\n      key: 'title',\n      width: 200,\n      ellipsis: true,\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 160,\n    },\n    {\n      title: 'Type',\n      dataIndex: 'type',\n      key: 'type',\n      width: 120,\n      render: (type: string) => {\n        const config = CONTRACT_TYPES.find(t => t.value === type);\n        return <Tag>{config?.label || type}</Tag>;\n      },\n    },\n    {\n      title: 'Amount',\n      dataIndex: 'totalAmount',\n      key: 'totalAmount',\n      width: 120,\n      render: (amount: number) => <strong>${amount.toLocaleString()}</strong>,\n    },\n    {\n      title: 'Period',\n      key: 'period',\n      width: 180,\n      render: (_, record: Contract) => `${record.startDate} ~ ${record.endDate}`,\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 120,\n      render: (status: string) => {\n        const config = STATUS_CONFIG[status];\n        return <Tag color={config.color} icon={config.icon}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Actions',\n      key: 'actions',\n      width: 150,\n      render: (_, record: Contract) => (\n        <Space>\n          <Tooltip title=\"View Details\">\n            <Button type=\"link\" icon={<EyeOutlined />} onClick={() => handleViewDetail(record)} />\n          </Tooltip>\n          {record.status === 'DRAFT' && (\n            <Tooltip title=\"Submit for Review\">\n              <Button type=\"link\" icon={<CheckCircleOutlined />} onClick={() => handleSubmitForReview(record.id)} />\n            </Tooltip>\n          )}\n        </Space>\n      ),\n    },\n  ];\n\n  const stats = {\n    total: contracts.length,\n    active: contracts.filter(c => c.status === 'ACTIVE').length,\n    pending: contracts.filter(c => c.status === 'PENDING_REVIEW').length,\n    expiring: contracts.filter(c => {\n      const daysUntilExpiry = dayjs(c.endDate).diff(dayjs(), 'day');\n      return daysUntilExpiry > 0 && daysUntilExpiry <= 30;\n    }).length,\n    totalAmount: contracts.filter(c => c.status === 'ACTIVE').reduce((sum, c) => sum + c.totalAmount, 0),\n  };\n\n  return (\n    <div className=\"contract-manage-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Total Contracts\" value={stats.total} prefix={<FileTextOutlined />} />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Active\" value={stats.active} valueStyle={{ color: '#52c41a' }} prefix={<CheckCircleOutlined />} />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Pending Review\" value={stats.pending} valueStyle={{ color: '#faad14' }} prefix={<ClockCircleOutlined />} />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Expiring Soon\" value={stats.expiring} valueStyle={{ color: '#ff4d4f' }} prefix={<CloseCircleOutlined />} />\n          </Card>\n        </Col>\n        <Col span={8}>\n          <Card>\n            <Statistic title=\"Active Contract Value\" value={stats.totalAmount} prefix=\"$\" valueStyle={{ color: '#1890ff' }} />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card title=\"Contract Management\" extra={\n        <Button type=\"primary\" icon={<PlusOutlined />} onClick={() => setCreateModalVisible(true)}>\n          New Contract\n        </Button>\n      }>\n        <Tabs activeKey={activeTab} onChange={setActiveTab}>\n          <TabPane tab=\"All\" key=\"all\" />\n          <TabPane tab=\"Draft\" key=\"draft\" />\n          <TabPane tab=\"Pending Review\" key=\"pending_review\" />\n          <TabPane tab=\"Active\" key=\"active\" />\n          <TabPane tab=\"Expiring Soon\" key=\"expiring\" />\n          <TabPane tab=\"Expired\" key=\"expired\" />\n        </Tabs>\n\n        <Table\n          columns={columns}\n          dataSource={getFilteredContracts()}\n          rowKey=\"id\"\n          loading={loading}\n          pagination={{ pageSize: 10 }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Create New Contract\"\n        open={createModalVisible}\n        onCancel={() => setCreateModalVisible(false)}\n        footer={null}\n        width={700}\n      >\n        <Form form={form} layout=\"vertical\" onFinish={handleCreateContract}>\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"customerId\" label=\"Customer\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select Customer\">\n                  {MOCK_CUSTOMERS.map(c => (\n                    <Option key={c.id} value={c.id}>{c.name}</Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"type\" label=\"Contract Type\" rules={[{ required: true }]}>\n                <Select placeholder=\"Select Type\">\n                  {CONTRACT_TYPES.map(t => (\n                    <Option key={t.value} value={t.value}>{t.label}</Option>\n                  ))}\n                </Select>\n              </Form.Item>\n            </Col>\n          </Row>\n\n          <Form.Item name=\"title\" label=\"Contract Title\" rules={[{ required: true }]}>\n            <Input placeholder=\"Enter contract title\" />\n          </Form.Item>\n\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"dateRange\" label=\"Contract Period\" rules={[{ required: true }]}>\n                <RangePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"totalAmount\" label=\"Total Amount\" rules={[{ required: true }]}>\n                <InputNumber prefix=\"$\" min={0} style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n          </Row>\n\n          <Form.Item name=\"terms\" label=\"Terms & Conditions\">\n            <Input.TextArea rows={4} placeholder=\"Enter contract terms and conditions\" />\n          </Form.Item>\n\n          <Form.Item name=\"attachments\" label=\"Attachments\">\n            <Upload>\n              <Button icon={<UploadOutlined />}>Upload Files</Button>\n            </Upload>\n          </Form.Item>\n\n          <div style={{ textAlign: 'right' }}>\n            <Button onClick={() => setCreateModalVisible(false)} style={{ marginRight: 8 }}>Cancel</Button>\n            <Button type=\"primary\" htmlType=\"submit\" loading={loading}>Create Contract</Button>\n          </div>\n        </Form>\n      </Modal>\n\n      <Modal\n        title=\"Contract Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={\n          selectedContract?.status === 'PENDING_REVIEW' ? [\n            <Button key=\"reject\" danger>Reject</Button>,\n            <Button key=\"approve\" type=\"primary\" onClick={() => handleApprove(selectedContract.id)}>Approve</Button>,\n          ] : [\n            <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>Close</Button>,\n          ]\n        }\n        width={800}\n      >\n        {selectedContract && (\n          <>\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"Contract No\">{selectedContract.contractNo}</Descriptions.Item>\n              <Descriptions.Item label=\"Status\">\n                <Tag color={STATUS_CONFIG[selectedContract.status].color}>\n                  {STATUS_CONFIG[selectedContract.status].text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Title\" span={2}>{selectedContract.title}</Descriptions.Item>\n              <Descriptions.Item label=\"Customer\">{selectedContract.customerName}</Descriptions.Item>\n              <Descriptions.Item label=\"Type\">\n                {CONTRACT_TYPES.find(t => t.value === selectedContract.type)?.label}\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Start Date\">{selectedContract.startDate}</Descriptions.Item>\n              <Descriptions.Item label=\"End Date\">{selectedContract.endDate}</Descriptions.Item>\n              <Descriptions.Item label=\"Total Amount\">\n                <strong style={{ fontSize: 16, color: '#1890ff' }}>${selectedContract.totalAmount.toLocaleString()}</strong>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Signed Date\">{selectedContract.signedDate || '-'}</Descriptions.Item>\n              <Descriptions.Item label=\"Signed By\">{selectedContract.signedBy || '-'}</Descriptions.Item>\n              <Descriptions.Item label=\"Terms & Conditions\" span={2}>\n                {selectedContract.terms}\n              </Descriptions.Item>\n              {selectedContract.remark && (\n                <Descriptions.Item label=\"Remark\" span={2}>{selectedContract.remark}</Descriptions.Item>\n              )}\n            </Descriptions>\n\n            <Divider>Contract Timeline</Divider>\n\n            <Timeline\n              items={[\n                { color: 'green', children: `Created: ${selectedContract.createdAt}` },\n                ...(selectedContract.status !== 'DRAFT' ? [{ color: 'blue', children: `Submitted for review` }] : []),\n                ...(selectedContract.signedDate ? [{ color: 'green', children: `Signed: ${selectedContract.signedDate} by ${selectedContract.signedBy}` }] : []),\n                { color: selectedContract.status === 'ACTIVE' ? 'green' : 'gray', children: `Status: ${STATUS_CONFIG[selectedContract.status].text}` },\n              ]}\n            />\n\n            {selectedContract.attachments.length > 0 && (\n              <>\n                <Divider>Attachments</Divider>\n                <Space>\n                  {selectedContract.attachments.map((file, index) => (\n                    <Button key={index} icon={<DownloadOutlined />} size=\"small\">\n                      {file}\n                    </Button>\n                  ))}\n                </Space>\n              </>\n            )}\n          </>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default ContractManage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/B2B/ContractManage.tsx"
    },
    "Orders/OrderDetail": {
      "path": "Orders/OrderDetail",
      "id": "Orders/OrderDetail",
      "file": "Orders/OrderDetail.tsx",
      "absPath": "/Orders/OrderDetail",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Descriptions,\n  Tag,\n  Button,\n  Space,\n  Table,\n  Timeline,\n  Divider,\n  Row,\n  Col,\n  Statistic,\n  Steps,\n  message,\n  Tabs,\n  Tooltip,\n  Modal,\n  Form,\n  Input,\n  Select,\n} from 'antd';\nimport {\n  ArrowLeftOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  SyncOutlined,\n  TruckOutlined,\n  ClockCircleOutlined,\n  DollarOutlined,\n  UserOutlined,\n  EnvironmentOutlined,\n  EditOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { TabPane } = Tabs;\nconst { TextArea } = Input;\n\ninterface OrderItem {\n  id: string;\n  sku: string;\n  productName: string;\n  quantity: number;\n  unitPrice: number;\n  totalPrice: number;\n  status: string;\n}\n\ninterface ShippingInfo {\n  carrier: string;\n  trackingNumber: string;\n  estimatedDelivery: string;\n  shippedAt?: string;\n}\n\ninterface OrderDetailData {\n  orderId: string;\n  platform: string;\n  status: string;\n  paymentStatus: string;\n  customer: {\n    name: string;\n    email: string;\n    phone: string;\n  };\n  shippingAddress: {\n    name: string;\n    address: string;\n    city: string;\n    state: string;\n    country: string;\n    postalCode: string;\n  };\n  items: OrderItem[];\n  subtotal: number;\n  shippingFee: number;\n  tax: number;\n  totalAmount: number;\n  currency: string;\n  shippingInfo?: ShippingInfo;\n  timeline: Array<{\n    status: string;\n    time: string;\n    description: string;\n  }>;\n  createdAt: string;\n  updatedAt: string;\n}\n\nconst ORDER_STATUS_MAP: Record<string, { color: string; text: string }> = {\n  PULLED: { color: 'default', text: 'Pulled' },\n  PENDING_REVIEW: { color: 'processing', text: 'Pending Review' },\n  CONFIRMED: { color: 'blue', text: 'Confirmed' },\n  ALLOCATED: { color: 'cyan', text: 'Allocated' },\n  READY_TO_SHIP: { color: 'geekblue', text: 'Ready to Ship' },\n  SHIPPED: { color: 'purple', text: 'Shipped' },\n  DELIVERED: { color: 'success', text: 'Delivered' },\n  CANCELLED: { color: 'error', text: 'Cancelled' },\n};\n\nconst STATUS_STEPS = [\n  { title: 'Pulled', status: 'PULLED' },\n  { title: 'Review', status: 'PENDING_REVIEW' },\n  { title: 'Confirmed', status: 'CONFIRMED' },\n  { title: 'Allocated', status: 'ALLOCATED' },\n  { title: 'Ready', status: 'READY_TO_SHIP' },\n  { title: 'Shipped', status: 'SHIPPED' },\n  { title: 'Delivered', status: 'DELIVERED' },\n];\n\ninterface OrderDetailProps {\n  orderId?: string;\n  onBack?: () => void;\n}\n\nexport const OrderDetail: React.FC<OrderDetailProps> = ({ orderId, onBack }) => {\n  const [loading, setLoading] = useState(false);\n  const [orderData, setOrderData] = useState<OrderDetailData | null>(null);\n  const [editModalVisible, setEditModalVisible] = useState(false);\n  const [form] = Form.useForm();\n\n  useEffect(() => {\n    if (orderId) {\n      fetchOrderDetail(orderId);\n    }\n  }, [orderId]);\n\n  const fetchOrderDetail = async (id: string) => {\n    setLoading(true);\n    try {\n      const mockData: OrderDetailData = {\n        orderId: id || 'ORD-2026-001',\n        platform: 'AMAZON',\n        status: 'SHIPPED',\n        paymentStatus: 'PAID',\n        customer: {\n          name: 'John Smith',\n          email: 'john.smith@email.com',\n          phone: '+1 (555) 123-4567',\n        },\n        shippingAddress: {\n          name: 'John Smith',\n          address: '123 Main Street, Apt 4B',\n          city: 'New York',\n          state: 'NY',\n          country: 'United States',\n          postalCode: '10001',\n        },\n        items: [\n          { id: '1', sku: 'SKU-001', productName: 'Wireless Bluetooth Headphones', quantity: 2, unitPrice: 49.99, totalPrice: 99.98, status: 'SHIPPED' },\n          { id: '2', sku: 'SKU-002', productName: 'USB-C Charging Cable', quantity: 3, unitPrice: 9.99, totalPrice: 29.97, status: 'SHIPPED' },\n          { id: '3', sku: 'SKU-003', productName: 'Phone Case', quantity: 1, unitPrice: 19.99, totalPrice: 19.99, status: 'SHIPPED' },\n        ],\n        subtotal: 149.94,\n        shippingFee: 5.99,\n        tax: 12.06,\n        totalAmount: 167.99,\n        currency: 'USD',\n        shippingInfo: {\n          carrier: 'FedEx',\n          trackingNumber: 'FX123456789US',\n          estimatedDelivery: '2026-03-22',\n          shippedAt: '2026-03-18 14:00:00',\n        },\n        timeline: [\n          { status: 'PULLED', time: '2026-03-18 10:30:00', description: 'Order pulled from Amazon' },\n          { status: 'PENDING_REVIEW', time: '2026-03-18 10:35:00', description: 'Order submitted for review' },\n          { status: 'CONFIRMED', time: '2026-03-18 11:00:00', description: 'Order confirmed by operator' },\n          { status: 'ALLOCATED', time: '2026-03-18 12:00:00', description: 'Stock allocated from warehouse' },\n          { status: 'READY_TO_SHIP', time: '2026-03-18 13:00:00', description: 'Order packed and ready' },\n          { status: 'SHIPPED', time: '2026-03-18 14:00:00', description: 'Shipped via FedEx' },\n        ],\n        createdAt: '2026-03-18 10:30:00',\n        updatedAt: '2026-03-18 14:00:00',\n      };\n      setOrderData(mockData);\n    } catch (error) {\n      message.error('Failed to load order details');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleStatusUpdate = async (newStatus: string) => {\n    setLoading(true);\n    try {\n      console.log('Updating status to:', newStatus);\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Status updated successfully');\n      if (orderId) fetchOrderDetail(orderId);\n    } catch (error) {\n      message.error('Failed to update status');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleEditAddress = () => {\n    if (orderData) {\n      form.setFieldsValue(orderData.shippingAddress);\n      setEditModalVisible(true);\n    }\n  };\n\n  const handleSaveAddress = async () => {\n    try {\n      const values = await form.validateFields();\n      console.log('Saving address:', values);\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Address updated successfully');\n      setEditModalVisible(false);\n    } catch (error) {\n      message.error('Failed to save address');\n    }\n  };\n\n  const getCurrentStep = () => {\n    if (!orderData) return 0;\n    const index = STATUS_STEPS.findIndex((s) => s.status === orderData.status);\n    return index >= 0 ? index : 0;\n  };\n\n  const itemColumns: ColumnsType<OrderItem> = [\n    { title: 'SKU', dataIndex: 'sku', key: 'sku', width: 100 },\n    { title: 'Product', dataIndex: 'productName', key: 'productName' },\n    { title: 'Qty', dataIndex: 'quantity', key: 'quantity', width: 60, align: 'center' },\n    {\n      title: 'Unit Price',\n      dataIndex: 'unitPrice',\n      key: 'unitPrice',\n      width: 100,\n      render: (price: number) => `$${price.toFixed(2)}`,\n    },\n    {\n      title: 'Total',\n      dataIndex: 'totalPrice',\n      key: 'totalPrice',\n      width: 100,\n      render: (price: number) => <strong>${price.toFixed(2)}</strong>,\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 100,\n      render: (status: string) => <Tag color=\"green\">{status}</Tag>,\n    },\n  ];\n\n  if (!orderData) {\n    return <Card loading={loading}>Loading...</Card>;\n  }\n\n  return (\n    <div className=\"order-detail-page\">\n      <Card\n        title={\n          <Space>\n            {onBack && (\n              <Button icon={<ArrowLeftOutlined />} onClick={onBack}>\n                Back\n              </Button>\n            )}\n            <span>Order Details</span>\n          </Space>\n        }\n        extra={\n          <Space>\n            <Tag color=\"blue\" style={{ fontSize: 14, padding: '4px 12px' }}>\n              {orderData.orderId}\n            </Tag>\n            <Tag color={ORDER_STATUS_MAP[orderData.status].color} style={{ fontSize: 14, padding: '4px 12px' }}>\n              {ORDER_STATUS_MAP[orderData.status].text}\n            </Tag>\n          </Space>\n        }\n      >\n        <Steps\n          current={getCurrentStep()}\n          status={orderData.status === 'CANCELLED' ? 'error' : 'process'}\n          items={STATUS_STEPS.map((s) => ({ title: s.title }))}\n          style={{ marginBottom: 24 }}\n        />\n\n        <Tabs defaultActiveKey=\"overview\">\n          <TabPane tab=\"Overview\" key=\"overview\">\n            <Row gutter={24}>\n              <Col span={16}>\n                <Card title=\"Order Items\" size=\"small\">\n                  <Table\n                    columns={itemColumns}\n                    dataSource={orderData.items}\n                    rowKey=\"id\"\n                    pagination={false}\n                    size=\"small\"\n                    summary={() => (\n                      <>\n                        <Table.Summary.Row>\n                          <Table.Summary.Cell index={0} colSpan={4} align=\"right\">Subtotal</Table.Summary.Cell>\n                          <Table.Summary.Cell index={1} colSpan={2}>${orderData.subtotal.toFixed(2)}</Table.Summary.Cell>\n                        </Table.Summary.Row>\n                        <Table.Summary.Row>\n                          <Table.Summary.Cell index={0} colSpan={4} align=\"right\">Shipping</Table.Summary.Cell>\n                          <Table.Summary.Cell index={1} colSpan={2}>${orderData.shippingFee.toFixed(2)}</Table.Summary.Cell>\n                        </Table.Summary.Row>\n                        <Table.Summary.Row>\n                          <Table.Summary.Cell index={0} colSpan={4} align=\"right\">Tax</Table.Summary.Cell>\n                          <Table.Summary.Cell index={1} colSpan={2}>${orderData.tax.toFixed(2)}</Table.Summary.Cell>\n                        </Table.Summary.Row>\n                        <Table.Summary.Row>\n                          <Table.Summary.Cell index={0} colSpan={4} align=\"right\"><strong>Total</strong></Table.Summary.Cell>\n                          <Table.Summary.Cell index={1} colSpan={2}>\n                            <strong style={{ fontSize: 16, color: '#1890ff' }}>\n                              ${orderData.totalAmount.toFixed(2)}\n                            </strong>\n                          </Table.Summary.Cell>\n                        </Table.Summary.Row>\n                      </>\n                    )}\n                  />\n                </Card>\n\n                <Card title=\"Shipping Information\" size=\"small\" style={{ marginTop: 16 }} extra={\n                  <Button type=\"link\" icon={<EditOutlined />} onClick={handleEditAddress}>Edit</Button>\n                }>\n                  <Descriptions column={2} size=\"small\">\n                    <Descriptions.Item label=\"Carrier\">{orderData.shippingInfo?.carrier || '-'}</Descriptions.Item>\n                    <Descriptions.Item label=\"Tracking #\">{orderData.shippingInfo?.trackingNumber || '-'}</Descriptions.Item>\n                    <Descriptions.Item label=\"Shipped At\">{orderData.shippingInfo?.shippedAt || '-'}</Descriptions.Item>\n                    <Descriptions.Item label=\"Est. Delivery\">{orderData.shippingInfo?.estimatedDelivery || '-'}</Descriptions.Item>\n                  </Descriptions>\n                </Card>\n              </Col>\n\n              <Col span={8}>\n                <Card title=\"Customer\" size=\"small\">\n                  <p><UserOutlined /> {orderData.customer.name}</p>\n                  <p>{orderData.customer.email}</p>\n                  <p>{orderData.customer.phone}</p>\n                </Card>\n\n                <Card title=\"Shipping Address\" size=\"small\" style={{ marginTop: 16 }}>\n                  <p><EnvironmentOutlined /> {orderData.shippingAddress.name}</p>\n                  <p>{orderData.shippingAddress.address}</p>\n                  <p>{orderData.shippingAddress.city}, {orderData.shippingAddress.state} {orderData.shippingAddress.postalCode}</p>\n                  <p>{orderData.shippingAddress.country}</p>\n                </Card>\n\n                <Card size=\"small\" style={{ marginTop: 16 }}>\n                  <Row gutter={16}>\n                    <Col span={12}>\n                      <Statistic title=\"Items\" value={orderData.items.length} />\n                    </Col>\n                    <Col span={12}>\n                      <Statistic title=\"Total Qty\" value={orderData.items.reduce((sum, i) => sum + i.quantity, 0)} />\n                    </Col>\n                  </Row>\n                </Card>\n              </Col>\n            </Row>\n          </TabPane>\n\n          <TabPane tab=\"Timeline\" key=\"timeline\">\n            <Timeline\n              items={orderData.timeline.map((t) => ({\n                color: t.status === orderData.status ? 'green' : 'blue',\n                children: (\n                  <div>\n                    <p><strong>{t.description}</strong></p>\n                    <p style={{ color: '#666', margin: 0 }}>{t.time}</p>\n                  </div>\n                ),\n              }))}\n            />\n          </TabPane>\n\n          <TabPane tab=\"Actions\" key=\"actions\">\n            <Space direction=\"vertical\" style={{ width: '100%' }}>\n              {orderData.status === 'PENDING_REVIEW' && (\n                <Card size=\"small\" title=\"Review Actions\">\n                  <Space>\n                    <Button type=\"primary\" icon={<CheckCircleOutlined />} onClick={() => handleStatusUpdate('CONFIRMED')}>\n                      Confirm Order\n                    </Button>\n                    <Button danger icon={<CloseCircleOutlined />} onClick={() => handleStatusUpdate('CANCELLED')}>\n                      Cancel Order\n                    </Button>\n                  </Space>\n                </Card>\n              )}\n              {orderData.status === 'CONFIRMED' && (\n                <Card size=\"small\" title=\"Fulfillment Actions\">\n                  <Space>\n                    <Button type=\"primary\" onClick={() => handleStatusUpdate('ALLOCATED')}>\n                      Allocate Stock\n                    </Button>\n                  </Space>\n                </Card>\n              )}\n              {orderData.status === 'ALLOCATED' && (\n                <Card size=\"small\" title=\"Shipping Actions\">\n                  <Space>\n                    <Button type=\"primary\" icon={<TruckOutlined />} onClick={() => handleStatusUpdate('READY_TO_SHIP')}>\n                      Mark Ready to Ship\n                    </Button>\n                  </Space>\n                </Card>\n              )}\n              {orderData.status === 'READY_TO_SHIP' && (\n                <Card size=\"small\" title=\"Shipping Actions\">\n                  <Space>\n                    <Button type=\"primary\" icon={<TruckOutlined />} onClick={() => handleStatusUpdate('SHIPPED')}>\n                      Mark as Shipped\n                    </Button>\n                  </Space>\n                </Card>\n              )}\n            </Space>\n          </TabPane>\n        </Tabs>\n      </Card>\n\n      <Modal\n        title=\"Edit Shipping Address\"\n        open={editModalVisible}\n        onCancel={() => setEditModalVisible(false)}\n        onOk={handleSaveAddress}\n      >\n        <Form form={form} layout=\"vertical\">\n          <Form.Item name=\"name\" label=\"Name\" rules={[{ required: true }]}>\n            <Input />\n          </Form.Item>\n          <Form.Item name=\"address\" label=\"Address\" rules={[{ required: true }]}>\n            <Input />\n          </Form.Item>\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"city\" label=\"City\" rules={[{ required: true }]}>\n                <Input />\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"state\" label=\"State\" rules={[{ required: true }]}>\n                <Input />\n              </Form.Item>\n            </Col>\n          </Row>\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item name=\"postalCode\" label=\"Postal Code\" rules={[{ required: true }]}>\n                <Input />\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item name=\"country\" label=\"Country\" rules={[{ required: true }]}>\n                <Input />\n              </Form.Item>\n            </Col>\n          </Row>\n        </Form>\n      </Modal>\n    </div>\n  );\n};\n\nexport default OrderDetail;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Orders/OrderDetail.tsx"
    },
    "Auth/RegisterPage": {
      "path": "Auth/RegisterPage",
      "id": "Auth/RegisterPage",
      "file": "Auth/RegisterPage.tsx",
      "absPath": "/Auth/RegisterPage",
      "__content": "import React, { useState } from 'react';\nimport {\n  Card,\n  Form,\n  Input,\n  Button,\n  Checkbox,\n  Space,\n  Divider,\n  Typography,\n  Alert,\n  message,\n  Steps,\n  Row,\n  Col,\n  Select,\n} from 'antd';\nimport {\n  UserOutlined,\n  LockOutlined,\n  MailOutlined,\n  SafetyOutlined,\n  EyeInvisibleOutlined,\n  EyeTwoTone,\n  UserAddOutlined,\n  CheckCircleOutlined,\n  ArrowLeftOutlined,\n  ArrowRightOutlined,\n  BankOutlined,\n  PhoneOutlined,\n} from '@ant-design/icons';\n\nconst { Title, Text, Link } = Typography;\nconst { Step } = Steps;\nconst { Option } = Select;\n\ninterface RegisterFormValues {\n  username: string;\n  email: string;\n  password: string;\n  confirmPassword: string;\n  companyName: string;\n  phone: string;\n  businessType: string;\n  agreeTerms: boolean;\n  captcha: string;\n}\n\nexport const RegisterPage: React.FC = () => {\n  const [form] = Form.useForm();\n  const [currentStep, setCurrentStep] = useState(0);\n  const [loading, setLoading] = useState(false);\n  const [registerError, setRegisterError] = useState<string | null>(null);\n  const [captchaCode, setCaptchaCode] = useState('');\n  const [registrationComplete, setRegistrationComplete] = useState(false);\n\n  const generateCaptcha = () => {\n    const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';\n    let result = '';\n    for (let i = 0; i < 4; i++) {\n      result += chars.charAt(Math.floor(Math.random() * chars.length));\n    }\n    setCaptchaCode(result);\n  };\n\n  React.useEffect(() => {\n    generateCaptcha();\n  }, []);\n\n  const steps = [\n    { title: 'Account', description: 'Basic info' },\n    { title: 'Business', description: 'Company details' },\n    { title: 'Verify', description: 'Confirmation' },\n  ];\n\n  const nextStep = async () => {\n    try {\n      if (currentStep === 0) {\n        await form.validateFields(['username', 'email', 'password', 'confirmPassword']);\n      } else if (currentStep === 1) {\n        await form.validateFields(['companyName', 'phone', 'businessType']);\n      }\n      setCurrentStep(currentStep + 1);\n    } catch (error) {\n      // Validation failed\n    }\n  };\n\n  const prevStep = () => {\n    setCurrentStep(currentStep - 1);\n  };\n\n  const handleRegister = async (values: RegisterFormValues) => {\n    setLoading(true);\n    setRegisterError(null);\n\n    try {\n      await new Promise(resolve => setTimeout(resolve, 2000));\n\n      if (values.captcha?.toUpperCase() !== captchaCode) {\n        setRegisterError('Invalid verification code');\n        generateCaptcha();\n        setLoading(false);\n        return;\n      }\n\n      setRegistrationComplete(true);\n      message.success('Registration successful!');\n    } catch (error) {\n      setRegisterError('Registration failed. Please try again.');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  if (registrationComplete) {\n    return (\n      <div style={{\n        minHeight: '100vh',\n        display: 'flex',\n        alignItems: 'center',\n        justifyContent: 'center',\n        background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',\n        padding: 24,\n      }}>\n        <Card style={{ maxWidth: 500, width: '100%', textAlign: 'center', borderRadius: 16 }}>\n          <CheckCircleOutlined style={{ fontSize: 80, color: '#52c41a', marginBottom: 24 }} />\n          <Title level={3}>Registration Complete!</Title>\n          <Text type=\"secondary\" style={{ display: 'block', marginBottom: 24 }}>\n            Your account has been created successfully. Please check your email to verify your account.\n          </Text>\n          <Button type=\"primary\" size=\"large\" href=\"/auth/login\">\n            Go to Login\n          </Button>\n        </Card>\n      </div>\n    );\n  }\n\n  return (\n    <div style={{\n      minHeight: '100vh',\n      display: 'flex',\n      alignItems: 'center',\n      justifyContent: 'center',\n      background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',\n      padding: 24,\n    }}>\n      <Card\n        style={{\n          maxWidth: 600,\n          width: '100%',\n          borderRadius: 16,\n          boxShadow: '0 20px 60px rgba(0,0,0,0.3)',\n        }}\n        bodyStyle={{ padding: 40 }}\n      >\n        <div style={{ textAlign: 'center', marginBottom: 32 }}>\n          <Title level={3}>Create Account</Title>\n          <Text type=\"secondary\">Join Crawlful Hub today</Text>\n        </div>\n\n        <Steps current={currentStep} style={{ marginBottom: 32 }}>\n          {steps.map(step => (\n            <Step key={step.title} title={step.title} description={step.description} />\n          ))}\n        </Steps>\n\n        {registerError && (\n          <Alert\n            message={registerError}\n            type=\"error\"\n            showIcon\n            style={{ marginBottom: 24 }}\n            closable\n            onClose={() => setRegisterError(null)}\n          />\n        )}\n\n        <Form\n          form={form}\n          layout=\"vertical\"\n          onFinish={handleRegister}\n        >\n          {currentStep === 0 && (\n            <>\n              <Form.Item\n                name=\"username\"\n                rules={[\n                  { required: true, message: 'Please enter username' },\n                  { min: 3, message: 'Username must be at least 3 characters' },\n                  { pattern: /^[a-zA-Z0-9_]+$/, message: 'Only letters, numbers and underscores allowed' },\n                ]}\n              >\n                <Input\n                  prefix={<UserOutlined style={{ color: '#bfbfbf' }} />}\n                  placeholder=\"Username\"\n                  size=\"large\"\n                />\n              </Form.Item>\n\n              <Form.Item\n                name=\"email\"\n                rules={[\n                  { required: true, message: 'Please enter email' },\n                  { type: 'email', message: 'Please enter valid email' },\n                ]}\n              >\n                <Input\n                  prefix={<MailOutlined style={{ color: '#bfbfbf' }} />}\n                  placeholder=\"Email\"\n                  size=\"large\"\n                />\n              </Form.Item>\n\n              <Form.Item\n                name=\"password\"\n                rules={[\n                  { required: true, message: 'Please enter password' },\n                  { min: 8, message: 'Password must be at least 8 characters' },\n                  { pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)/, message: 'Must contain uppercase, lowercase and number' },\n                ]}\n              >\n                <Input.Password\n                  prefix={<LockOutlined style={{ color: '#bfbfbf' }} />}\n                  placeholder=\"Password\"\n                  size=\"large\"\n                  iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}\n                />\n              </Form.Item>\n\n              <Form.Item\n                name=\"confirmPassword\"\n                dependencies={['password']}\n                rules={[\n                  { required: true, message: 'Please confirm password' },\n                  ({ getFieldValue }) => ({\n                    validator(_, value) {\n                      if (!value || getFieldValue('password') === value) {\n                        return Promise.resolve();\n                      }\n                      return Promise.reject(new Error('Passwords do not match'));\n                    },\n                  }),\n                ]}\n              >\n                <Input.Password\n                  prefix={<LockOutlined style={{ color: '#bfbfbf' }} />}\n                  placeholder=\"Confirm Password\"\n                  size=\"large\"\n                  iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}\n                />\n              </Form.Item>\n            </>\n          )}\n\n          {currentStep === 1 && (\n            <>\n              <Form.Item\n                name=\"companyName\"\n                rules={[{ required: true, message: 'Please enter company name' }]}\n              >\n                <Input\n                  prefix={<BankOutlined style={{ color: '#bfbfbf' }} />}\n                  placeholder=\"Company Name\"\n                  size=\"large\"\n                />\n              </Form.Item>\n\n              <Form.Item\n                name=\"phone\"\n                rules={[\n                  { required: true, message: 'Please enter phone number' },\n                  { pattern: /^\\+?[\\d\\s-()]+$/, message: 'Please enter valid phone number' },\n                ]}\n              >\n                <Input\n                  prefix={<PhoneOutlined style={{ color: '#bfbfbf' }} />}\n                  placeholder=\"Phone Number\"\n                  size=\"large\"\n                />\n              </Form.Item>\n\n              <Form.Item\n                name=\"businessType\"\n                rules={[{ required: true, message: 'Please select business type' }]}\n              >\n                <Select placeholder=\"Business Type\" size=\"large\">\n                  <Option value=\"manufacturer\">Manufacturer</Option>\n                  <Option value=\"trading\">Trading Company</Option>\n                  <Option value=\"wholesaler\">Wholesaler</Option>\n                  <Option value=\"retailer\">Retailer</Option>\n                  <Option value=\"other\">Other</Option>\n                </Select>\n              </Form.Item>\n            </>\n          )}\n\n          {currentStep === 2 && (\n            <>\n              <Form.Item\n                name=\"captcha\"\n                rules={[{ required: true, message: 'Please enter verification code' }]}\n              >\n                <Row gutter={8} align=\"middle\">\n                  <Col flex=\"auto\">\n                    <Input\n                      prefix={<SafetyOutlined style={{ color: '#bfbfbf' }} />}\n                      placeholder=\"Verification Code\"\n                      size=\"large\"\n                      maxLength={4}\n                    />\n                  </Col>\n                  <Col>\n                    <div\n                      onClick={generateCaptcha}\n                      style={{\n                        width: 100,\n                        height: 40,\n                        background: '#f0f2f5',\n                        display: 'flex',\n                        alignItems: 'center',\n                        justifyContent: 'center',\n                        fontFamily: 'monospace',\n                        fontSize: 20,\n                        letterSpacing: 4,\n                        cursor: 'pointer',\n                        userSelect: 'none',\n                        borderRadius: 4,\n                        color: '#1890ff',\n                        fontWeight: 'bold',\n                      }}\n                    >\n                      {captchaCode}\n                    </div>\n                  </Col>\n                </Row>\n              </Form.Item>\n\n              <Form.Item\n                name=\"agreeTerms\"\n                valuePropName=\"checked\"\n                rules={[\n                  {\n                    validator: (_, value) =>\n                      value ? Promise.resolve() : Promise.reject(new Error('Please agree to terms')),\n                  },\n                ]}\n              >\n                <Checkbox>\n                  I agree to the <Link href=\"/terms\">Terms of Service</Link> and{' '}\n                  <Link href=\"/privacy\">Privacy Policy</Link>\n                </Checkbox>\n              </Form.Item>\n            </>\n          )}\n\n          <Form.Item>\n            <Row justify=\"space-between\">\n              <Col>\n                {currentStep > 0 && (\n                  <Button icon={<ArrowLeftOutlined />} onClick={prevStep}>\n                    Previous\n                  </Button>\n                )}\n              </Col>\n              <Col>\n                {currentStep < 2 ? (\n                  <Button type=\"primary\" icon={<ArrowRightOutlined />} onClick={nextStep}>\n                    Next\n                  </Button>\n                ) : (\n                  <Button\n                    type=\"primary\"\n                    htmlType=\"submit\"\n                    loading={loading}\n                    icon={<UserAddOutlined />}\n                  >\n                    Create Account\n                  </Button>\n                )}\n              </Col>\n            </Row>\n          </Form.Item>\n        </Form>\n\n        <Divider />\n\n        <div style={{ textAlign: 'center' }}>\n          <Text type=\"secondary\">\n            Already have an account? <Link href=\"/auth/login\">Sign in</Link>\n          </Text>\n        </div>\n      </Card>\n    </div>\n  );\n};\n\nexport default RegisterPage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Auth/RegisterPage.tsx"
    },
    "AfterSales/index": {
      "path": "AfterSales",
      "id": "AfterSales/index",
      "file": "AfterSales/index.ts",
      "absPath": "/AfterSales",
      "__content": "export { ReturnApply } from './ReturnApply';\nexport { RefundProcess } from './RefundProcess';\nexport { CustomerService } from './CustomerService';\nexport { default as ReturnApplyPage } from './ReturnApply';\nexport { default as RefundProcessPage } from './RefundProcess';\nexport { default as CustomerServicePage } from './CustomerService';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/AfterSales/index.ts"
    },
    "Compliance/index": {
      "path": "Compliance",
      "id": "Compliance/index",
      "file": "Compliance/index.ts",
      "absPath": "/Compliance",
      "__content": "export { CertificateManage } from './CertificateManage';\nexport { ComplianceCheck } from './ComplianceCheck';\nexport { CertificateExpiryReminder } from './CertificateExpiryReminder';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Compliance/index.ts"
    },
    "Orders/OrderList": {
      "path": "Orders/OrderList",
      "id": "Orders/OrderList",
      "file": "Orders/OrderList.tsx",
      "absPath": "/Orders/OrderList",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Tag,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  Select,\n  DatePicker,\n  message,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  Badge,\n  Dropdown,\n  Menu,\n  Tabs,\n} from 'antd';\nimport {\n  EyeOutlined,\n  SyncOutlined,\n  DownloadOutlined,\n  ReloadOutlined,\n  FilterOutlined,\n  CheckCircleOutlined,\n  ClockCircleOutlined,\n  TruckOutlined,\n  CloseCircleOutlined,\n  MoreOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\nconst { RangePicker } = DatePicker;\nconst { TabPane } = Tabs;\n\ninterface Order {\n  id: string;\n  orderId: string;\n  platform: 'AMAZON' | 'EBAY' | 'SHOPIFY' | 'SHOPEE' | 'LAZADA';\n  customerName: string;\n  customerEmail: string;\n  totalAmount: number;\n  currency: string;\n  status: 'PULLED' | 'PENDING_REVIEW' | 'CONFIRMED' | 'ALLOCATED' | 'READY_TO_SHIP' | 'SHIPPED' | 'DELIVERED' | 'CANCELLED';\n  paymentStatus: 'PENDING' | 'PAID' | 'REFUNDED';\n  itemCount: number;\n  createdAt: string;\n  updatedAt: string;\n  shopId: string;\n  shopName: string;\n}\n\nconst ORDER_STATUS_MAP: Record<string, { color: string; text: string; icon: React.ReactNode }> = {\n  PULLED: { color: 'default', text: 'Pulled', icon: <ClockCircleOutlined /> },\n  PENDING_REVIEW: { color: 'processing', text: 'Pending Review', icon: <SyncOutlined spin /> },\n  CONFIRMED: { color: 'blue', text: 'Confirmed', icon: <CheckCircleOutlined /> },\n  ALLOCATED: { color: 'cyan', text: 'Allocated', icon: <CheckCircleOutlined /> },\n  READY_TO_SHIP: { color: 'geekblue', text: 'Ready to Ship', icon: <TruckOutlined /> },\n  SHIPPED: { color: 'purple', text: 'Shipped', icon: <TruckOutlined /> },\n  DELIVERED: { color: 'success', text: 'Delivered', icon: <CheckCircleOutlined /> },\n  CANCELLED: { color: 'error', text: 'Cancelled', icon: <CloseCircleOutlined /> },\n};\n\nconst PAYMENT_STATUS_MAP: Record<string, { color: string; text: string }> = {\n  PENDING: { color: 'warning', text: 'Pending' },\n  PAID: { color: 'success', text: 'Paid' },\n  REFUNDED: { color: 'default', text: 'Refunded' },\n};\n\nconst PLATFORM_MAP: Record<string, { color: string; text: string }> = {\n  AMAZON: { color: 'orange', text: 'Amazon' },\n  EBAY: { color: 'blue', text: 'eBay' },\n  SHOPIFY: { color: 'green', text: 'Shopify' },\n  SHOPEE: { color: 'red', text: 'Shopee' },\n  LAZADA: { color: 'purple', text: 'Lazada' },\n};\n\nexport const OrderList: React.FC = () => {\n  const [loading, setLoading] = useState(false);\n  const [orders, setOrders] = useState<Order[]>([]);\n  const [selectedOrder, setSelectedOrder] = useState<Order | null>(null);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [activeTab, setActiveTab] = useState('all');\n  const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);\n  const [stats, setStats] = useState({\n    total: 0,\n    pending: 0,\n    processing: 0,\n    shipped: 0,\n    totalAmount: 0,\n  });\n\n  useEffect(() => {\n    fetchOrders();\n  }, []);\n\n  const fetchOrders = async () => {\n    setLoading(true);\n    try {\n      const mockOrders: Order[] = [\n        {\n          id: '1',\n          orderId: 'ORD-2026-001',\n          platform: 'AMAZON',\n          customerName: 'John Smith',\n          customerEmail: 'john.smith@email.com',\n          totalAmount: 159.99,\n          currency: 'USD',\n          status: 'SHIPPED',\n          paymentStatus: 'PAID',\n          itemCount: 3,\n          createdAt: '2026-03-18 10:30:00',\n          updatedAt: '2026-03-18 14:00:00',\n          shopId: 'SHOP_001',\n          shopName: 'Main Store',\n        },\n        {\n          id: '2',\n          orderId: 'ORD-2026-002',\n          platform: 'EBAY',\n          customerName: 'Emma Wilson',\n          customerEmail: 'emma.wilson@email.com',\n          totalAmount: 89.50,\n          currency: 'USD',\n          status: 'PENDING_REVIEW',\n          paymentStatus: 'PAID',\n          itemCount: 2,\n          createdAt: '2026-03-18 09:15:00',\n          updatedAt: '2026-03-18 09:15:00',\n          shopId: 'SHOP_002',\n          shopName: 'eBay Outlet',\n        },\n        {\n          id: '3',\n          orderId: 'ORD-2026-003',\n          platform: 'SHOPIFY',\n          customerName: 'Michael Brown',\n          customerEmail: 'michael.brown@email.com',\n          totalAmount: 245.00,\n          currency: 'USD',\n          status: 'CONFIRMED',\n          paymentStatus: 'PAID',\n          itemCount: 5,\n          createdAt: '2026-03-17 16:45:00',\n          updatedAt: '2026-03-18 08:00:00',\n          shopId: 'SHOP_003',\n          shopName: 'Brand Store',\n        },\n        {\n          id: '4',\n          orderId: 'ORD-2026-004',\n          platform: 'SHOPEE',\n          customerName: 'Sarah Davis',\n          customerEmail: 'sarah.davis@email.com',\n          totalAmount: 78.00,\n          currency: 'USD',\n          status: 'DELIVERED',\n          paymentStatus: 'PAID',\n          itemCount: 1,\n          createdAt: '2026-03-15 11:20:00',\n          updatedAt: '2026-03-17 15:30:00',\n          shopId: 'SHOP_004',\n          shopName: 'Shopee Mall',\n        },\n        {\n          id: '5',\n          orderId: 'ORD-2026-005',\n          platform: 'AMAZON',\n          customerName: 'David Lee',\n          customerEmail: 'david.lee@email.com',\n          totalAmount: 320.00,\n          currency: 'USD',\n          status: 'PULLED',\n          paymentStatus: 'PENDING',\n          itemCount: 4,\n          createdAt: '2026-03-18 12:00:00',\n          updatedAt: '2026-03-18 12:00:00',\n          shopId: 'SHOP_001',\n          shopName: 'Main Store',\n        },\n      ];\n      setOrders(mockOrders);\n      calculateStats(mockOrders);\n    } catch (error) {\n      message.error('Failed to load orders');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const calculateStats = (orderList: Order[]) => {\n    setStats({\n      total: orderList.length,\n      pending: orderList.filter((o) => o.status === 'PENDING_REVIEW' || o.status === 'PULLED').length,\n      processing: orderList.filter((o) => ['CONFIRMED', 'ALLOCATED', 'READY_TO_SHIP'].includes(o.status)).length,\n      shipped: orderList.filter((o) => o.status === 'SHIPPED').length,\n      totalAmount: orderList.reduce((sum, o) => sum + o.totalAmount, 0),\n    });\n  };\n\n  const handleViewDetail = (order: Order) => {\n    setSelectedOrder(order);\n    setDetailModalVisible(true);\n  };\n\n  const handleStatusChange = async (orderId: string, newStatus: string) => {\n    setLoading(true);\n    try {\n      console.log('Updating order status:', { orderId, newStatus });\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success('Status updated successfully');\n      fetchOrders();\n    } catch (error) {\n      message.error('Failed to update status');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleBatchAction = async (action: string) => {\n    if (selectedRowKeys.length === 0) {\n      message.warning('Please select orders first');\n      return;\n    }\n    setLoading(true);\n    try {\n      console.log('Batch action:', { action, orderIds: selectedRowKeys });\n      await new Promise((resolve) => setTimeout(resolve, 500));\n      message.success(`Batch ${action} completed for ${selectedRowKeys.length} orders`);\n      setSelectedRowKeys([]);\n      fetchOrders();\n    } catch (error) {\n      message.error('Batch action failed');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleExport = () => {\n    message.info('Exporting orders...');\n  };\n\n  const getFilteredOrders = () => {\n    if (activeTab === 'all') return orders;\n    if (activeTab === 'pending') return orders.filter((o) => ['PULLED', 'PENDING_REVIEW'].includes(o.status));\n    if (activeTab === 'processing') return orders.filter((o) => ['CONFIRMED', 'ALLOCATED', 'READY_TO_SHIP'].includes(o.status));\n    if (activeTab === 'shipped') return orders.filter((o) => o.status === 'SHIPPED');\n    if (activeTab === 'delivered') return orders.filter((o) => o.status === 'DELIVERED');\n    return orders;\n  };\n\n  const columns: ColumnsType<Order> = [\n    {\n      title: 'Order ID',\n      dataIndex: 'orderId',\n      key: 'orderId',\n      width: 140,\n      render: (text: string, record) => (\n        <a onClick={() => handleViewDetail(record)}>{text}</a>\n      ),\n    },\n    {\n      title: 'Platform',\n      dataIndex: 'platform',\n      key: 'platform',\n      width: 100,\n      render: (platform: string) => {\n        const config = PLATFORM_MAP[platform];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 140,\n    },\n    {\n      title: 'Items',\n      dataIndex: 'itemCount',\n      key: 'itemCount',\n      width: 70,\n      align: 'center',\n    },\n    {\n      title: 'Amount',\n      dataIndex: 'totalAmount',\n      key: 'totalAmount',\n      width: 100,\n      render: (amount: number) => (\n        <span style={{ fontWeight: 'bold' }}>${amount.toFixed(2)}</span>\n      ),\n    },\n    {\n      title: 'Payment',\n      dataIndex: 'paymentStatus',\n      key: 'paymentStatus',\n      width: 90,\n      render: (status: string) => {\n        const config = PAYMENT_STATUS_MAP[status];\n        return <Tag color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 130,\n      render: (status: string) => {\n        const config = ORDER_STATUS_MAP[status];\n        return <Tag icon={config.icon} color={config.color}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Shop',\n      dataIndex: 'shopName',\n      key: 'shopName',\n      width: 120,\n    },\n    {\n      title: 'Created',\n      dataIndex: 'createdAt',\n      key: 'createdAt',\n      width: 160,\n    },\n    {\n      title: 'Actions',\n      key: 'action',\n      width: 120,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space>\n          <Tooltip title=\"View Details\">\n            <Button type=\"link\" icon={<EyeOutlined />} onClick={() => handleViewDetail(record)} />\n          </Tooltip>\n          <Dropdown\n            overlay={\n              <Menu>\n                {record.status === 'PULLED' && (\n                  <Menu.Item key=\"review\" onClick={() => handleStatusChange(record.orderId, 'PENDING_REVIEW')}>\n                    Submit for Review\n                  </Menu.Item>\n                )}\n                {record.status === 'PENDING_REVIEW' && (\n                  <Menu.Item key=\"confirm\" onClick={() => handleStatusChange(record.orderId, 'CONFIRMED')}>\n                    Confirm Order\n                  </Menu.Item>\n                )}\n                {record.status === 'CONFIRMED' && (\n                  <Menu.Item key=\"allocate\" onClick={() => handleStatusChange(record.orderId, 'ALLOCATED')}>\n                    Allocate Stock\n                  </Menu.Item>\n                )}\n                <Menu.Item key=\"cancel\" onClick={() => handleStatusChange(record.orderId, 'CANCELLED')}>\n                  Cancel Order\n                </Menu.Item>\n              </Menu>\n            }\n          >\n            <Button type=\"link\" icon={<MoreOutlined />} />\n          </Dropdown>\n        </Space>\n      ),\n    },\n  ];\n\n  const rowSelection = {\n    selectedRowKeys,\n    onChange: setSelectedRowKeys,\n  };\n\n  return (\n    <div className=\"order-list-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={4}>\n          <Card>\n            <Statistic title=\"Total Orders\" value={stats.total} />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Pending\"\n              value={stats.pending}\n              valueStyle={{ color: '#faad14' }}\n              prefix={<ClockCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Processing\"\n              value={stats.processing}\n              valueStyle={{ color: '#1890ff' }}\n              prefix={<SyncOutlined spin />}\n            />\n          </Card>\n        </Col>\n        <Col span={4}>\n          <Card>\n            <Statistic\n              title=\"Shipped\"\n              value={stats.shipped}\n              valueStyle={{ color: '#722ed1' }}\n              prefix={<TruckOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={8}>\n          <Card>\n            <Statistic\n              title=\"Total Amount\"\n              value={stats.totalAmount}\n              precision={2}\n              prefix=\"$\"\n              valueStyle={{ color: '#52c41a' }}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card\n        title=\"Order Management\"\n        extra={\n          <Space>\n            <Button icon={<ReloadOutlined />} onClick={fetchOrders}>\n              Refresh\n            </Button>\n            <Button icon={<DownloadOutlined />} onClick={handleExport}>\n              Export\n            </Button>\n          </Space>\n        }\n      >\n        <Tabs activeKey={activeTab} onChange={setActiveTab}>\n          <TabPane tab=\"All Orders\" key=\"all\" />\n          <TabPane tab={<Badge count={stats.pending} offset={[10, 0]} size=\"small\">Pending</Badge>} key=\"pending\" />\n          <TabPane tab=\"Processing\" key=\"processing\" />\n          <TabPane tab=\"Shipped\" key=\"shipped\" />\n          <TabPane tab=\"Delivered\" key=\"delivered\" />\n        </Tabs>\n\n        <div style={{ marginBottom: 16 }}>\n          <Space>\n            <Button\n              type=\"primary\"\n              disabled={selectedRowKeys.length === 0}\n              onClick={() => handleBatchAction('confirm')}\n            >\n              Batch Confirm ({selectedRowKeys.length})\n            </Button>\n            <Button\n              disabled={selectedRowKeys.length === 0}\n              onClick={() => handleBatchAction('allocate')}\n            >\n              Batch Allocate\n            </Button>\n            <Button\n              danger\n              disabled={selectedRowKeys.length === 0}\n              onClick={() => handleBatchAction('cancel')}\n            >\n              Batch Cancel\n            </Button>\n          </Space>\n        </div>\n\n        <Table\n          rowSelection={rowSelection}\n          columns={columns}\n          dataSource={getFilteredOrders()}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1300 }}\n          pagination={{\n            showSizeChanger: true,\n            showTotal: (total) => `Total ${total} orders`,\n          }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Order Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>\n            Close\n          </Button>,\n        ]}\n        width={700}\n      >\n        {selectedOrder && (\n          <>\n            <Row gutter={16}>\n              <Col span={12}>\n                <Card size=\"small\" title=\"Order Info\">\n                  <p><strong>Order ID:</strong> {selectedOrder.orderId}</p>\n                  <p><strong>Platform:</strong> <Tag color={PLATFORM_MAP[selectedOrder.platform].color}>{PLATFORM_MAP[selectedOrder.platform].text}</Tag></p>\n                  <p><strong>Status:</strong> <Tag color={ORDER_STATUS_MAP[selectedOrder.status].color}>{ORDER_STATUS_MAP[selectedOrder.status].text}</Tag></p>\n                  <p><strong>Payment:</strong> <Tag color={PAYMENT_STATUS_MAP[selectedOrder.paymentStatus].color}>{PAYMENT_STATUS_MAP[selectedOrder.paymentStatus].text}</Tag></p>\n                </Card>\n              </Col>\n              <Col span={12}>\n                <Card size=\"small\" title=\"Customer Info\">\n                  <p><strong>Name:</strong> {selectedOrder.customerName}</p>\n                  <p><strong>Email:</strong> {selectedOrder.customerEmail}</p>\n                  <p><strong>Shop:</strong> {selectedOrder.shopName}</p>\n                </Card>\n              </Col>\n            </Row>\n            <Card size=\"small\" title=\"Amount\" style={{ marginTop: 16 }}>\n              <Row>\n                <Col span={12}>\n                  <Statistic\n                    title=\"Total Amount\"\n                    value={selectedOrder.totalAmount}\n                    precision={2}\n                    prefix={selectedOrder.currency === 'USD' ? '$' : selectedOrder.currency}\n                  />\n                </Col>\n                <Col span={12}>\n                  <Statistic title=\"Items\" value={selectedOrder.itemCount} />\n                </Col>\n              </Row>\n            </Card>\n            <Card size=\"small\" title=\"Timestamps\" style={{ marginTop: 16 }}>\n              <p><strong>Created:</strong> {selectedOrder.createdAt}</p>\n              <p><strong>Updated:</strong> {selectedOrder.updatedAt}</p>\n            </Card>\n          </>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default OrderList;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Orders/OrderList.tsx"
    },
    "Logistics/index": {
      "path": "Logistics",
      "id": "Logistics/index",
      "file": "Logistics/index.ts",
      "absPath": "/Logistics",
      "__content": "export { LogisticsSelect } from './LogisticsSelect';\nexport { LogisticsTrack } from './LogisticsTrack';\nexport { FreightCalc } from './FreightCalc';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Logistics/index.ts"
    },
    "UserAsset/index": {
      "path": "UserAsset",
      "id": "UserAsset/index",
      "file": "UserAsset/index.ts",
      "absPath": "/UserAsset",
      "__content": "export { UserAssets } from './UserAssets';\nexport { PointsManage } from './PointsManage';\nexport { MemberLevel } from './MemberLevel';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/UserAsset/index.ts"
    },
    "Ad/ROIAnalysis": {
      "path": "Ad/ROIAnalysis",
      "id": "Ad/ROIAnalysis",
      "file": "Ad/ROIAnalysis.tsx",
      "absPath": "/Ad/ROIAnalysis",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  DatePicker,\n  Select,\n  Tag,\n  Row,\n  Col,\n  Statistic,\n  message,\n  Divider,\n  Descriptions,\n  Empty,\n  Spin,\n  Typography,\n  Progress,\n  Tooltip,\n} from 'antd';\nimport {\n  LineChartOutlined,\n  DollarOutlined,\n  PercentageOutlined,\n  RiseOutlined,\n  FallOutlined,\n  InfoCircleOutlined,\n  SyncOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs, { Dayjs } from 'dayjs';\n\nconst { Option } = Select;\nconst { Title, Text } = Typography;\nconst { RangePicker } = DatePicker;\n\ninterface ROIData {\n  adPlanId: string;\n  adPlanName: string;\n  platform: string;\n  totalSpend: number;\n  totalSales: number;\n  totalConversions: number;\n  roi: number;\n  roas: number;\n  ctr: number;\n  cpc: number;\n  acos: number;\n  impressions: number;\n  clicks: number;\n}\n\ninterface DateRange {\n  startDate: string;\n  endDate: string;\n}\n\nconst PLATFORM_COLORS: Record<string, string> = {\n  AMAZON: 'orange',\n  EBAY: 'blue',\n  SHOPEE: 'red',\n  TIKTOK: 'cyan',\n};\n\nconst MOCK_ROI_DATA: ROIData[] = [\n  {\n    adPlanId: 'ADP-001',\n    adPlanName: 'Summer Sale Campaign',\n    platform: 'AMAZON',\n    totalSpend: 1250.5,\n    totalSales: 5625.75,\n    totalConversions: 162,\n    roi: 350.0,\n    roas: 4.5,\n    ctr: 2.78,\n    cpc: 0.89,\n    acos: 22.22,\n    impressions: 125000,\n    clicks: 3475,\n  },\n  {\n    adPlanId: 'ADP-002',\n    adPlanName: 'New Product Launch',\n    platform: 'SHOPEE',\n    totalSpend: 3150.0,\n    totalSales: 11025.0,\n    totalConversions: 285,\n    roi: 250.0,\n    roas: 3.5,\n    ctr: 3.15,\n    cpc: 1.05,\n    acos: 28.57,\n    impressions: 180000,\n    clicks: 5670,\n  },\n  {\n    adPlanId: 'ADP-003',\n    adPlanName: 'Brand Awareness Q3',\n    platform: 'TIKTOK',\n    totalSpend: 890.25,\n    totalSales: 2670.75,\n    totalConversions: 89,\n    roi: 200.0,\n    roas: 3.0,\n    ctr: 4.52,\n    cpc: 0.45,\n    acos: 33.33,\n    impressions: 95000,\n    clicks: 4294,\n  },\n];\n\nconst AD_PLANS = [\n  { id: 'ADP-001', name: 'Summer Sale Campaign', platform: 'AMAZON' },\n  { id: 'ADP-002', name: 'New Product Launch', platform: 'SHOPEE' },\n  { id: 'ADP-003', name: 'Brand Awareness Q3', platform: 'TIKTOK' },\n];\n\nexport const ROIAnalysis: React.FC = () => {\n  const [loading, setLoading] = useState(false);\n  const [roiData, setRoiData] = useState<ROIData[]>([]);\n  const [selectedAdPlanId, setSelectedAdPlanId] = useState<string | null>(null);\n  const [dateRange, setDateRange] = useState<[Dayjs, Dayjs]>([\n    dayjs().subtract(30, 'days'),\n    dayjs(),\n  ]);\n  const [selectedRow, setSelectedRow] = useState<ROIData | null>(null);\n\n  useEffect(() => {\n    loadROIData();\n  }, []);\n\n  const loadROIData = async () => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 800));\n      setRoiData(MOCK_ROI_DATA);\n    } catch (error) {\n      message.error('Failed to load ROI data');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleRefresh = async () => {\n    await loadROIData();\n    message.success('ROI data refreshed');\n  };\n\n  const handleExport = () => {\n    message.info('Export functionality coming soon');\n  };\n\n  const getROIColor = (roi: number) => {\n    if (roi >= 300) return '#52c41a';\n    if (roi >= 200) return '#73d13d';\n    if (roi >= 100) return '#faad14';\n    return '#ff4d4f';\n  };\n\n  const getROASColor = (roas: number) => {\n    if (roas >= 4) return '#52c41a';\n    if (roas >= 3) return '#73d13d';\n    if (roas >= 2) return '#faad14';\n    return '#ff4d4f';\n  };\n\n  const getACOSColor = (acos: number) => {\n    if (acos <= 20) return '#52c41a';\n    if (acos <= 30) return '#faad14';\n    return '#ff4d4f';\n  };\n\n  const columns: ColumnsType<ROIData> = [\n    {\n      title: 'Ad Plan',\n      dataIndex: 'adPlanName',\n      key: 'adPlanName',\n      width: 200,\n      render: (name: string, record) => (\n        <Space direction=\"vertical\" size={0}>\n          <Text strong>{name}</Text>\n          <Tag color={PLATFORM_COLORS[record.platform]}>{record.platform}</Tag>\n        </Space>\n      ),\n    },\n    {\n      title: 'Spend',\n      dataIndex: 'totalSpend',\n      key: 'totalSpend',\n      width: 100,\n      render: (spend: number) => (\n        <Text type=\"danger\">${spend.toLocaleString(undefined, { minimumFractionDigits: 2 })}</Text>\n      ),\n    },\n    {\n      title: 'Sales',\n      dataIndex: 'totalSales',\n      key: 'totalSales',\n      width: 100,\n      render: (sales: number) => (\n        <Text type=\"success\">${sales.toLocaleString(undefined, { minimumFractionDigits: 2 })}</Text>\n      ),\n    },\n    {\n      title: 'ROI',\n      dataIndex: 'roi',\n      key: 'roi',\n      width: 100,\n      sorter: (a, b) => a.roi - b.roi,\n      render: (roi: number) => (\n        <Space>\n          {roi >= 100 ? <RiseOutlined style={{ color: getROIColor(roi) }} /> : <FallOutlined style={{ color: '#ff4d4f' }} />}\n          <Text strong style={{ color: getROIColor(roi) }}>{roi.toFixed(2)}%</Text>\n        </Space>\n      ),\n    },\n    {\n      title: 'ROAS',\n      dataIndex: 'roas',\n      key: 'roas',\n      width: 80,\n      sorter: (a, b) => a.roas - b.roas,\n      render: (roas: number) => (\n        <Text strong style={{ color: getROASColor(roas) }}>{roas.toFixed(2)}x</Text>\n      ),\n    },\n    {\n      title: 'ACoS',\n      dataIndex: 'acos',\n      key: 'acos',\n      width: 80,\n      sorter: (a, b) => a.acos - b.acos,\n      render: (acos: number) => (\n        <Text style={{ color: getACOSColor(acos) }}>{acos.toFixed(2)}%</Text>\n      ),\n    },\n    {\n      title: 'CTR',\n      dataIndex: 'ctr',\n      key: 'ctr',\n      width: 80,\n      render: (ctr: number) => `${ctr.toFixed(2)}%`,\n    },\n    {\n      title: 'CPC',\n      dataIndex: 'cpc',\n      key: 'cpc',\n      width: 80,\n      render: (cpc: number) => `$${cpc.toFixed(2)}`,\n    },\n    {\n      title: 'Conversions',\n      dataIndex: 'totalConversions',\n      key: 'totalConversions',\n      width: 100,\n      render: (conversions: number) => conversions.toLocaleString(),\n    },\n    {\n      title: 'Impressions',\n      dataIndex: 'impressions',\n      key: 'impressions',\n      width: 100,\n      render: (impressions: number) => impressions.toLocaleString(),\n    },\n    {\n      title: 'Clicks',\n      dataIndex: 'clicks',\n      key: 'clicks',\n      width: 80,\n      render: (clicks: number) => clicks.toLocaleString(),\n    },\n  ];\n\n  const filteredData = selectedAdPlanId\n    ? roiData.filter(d => d.adPlanId === selectedAdPlanId)\n    : roiData;\n\n  const totalSpend = filteredData.reduce((sum, d) => sum + d.totalSpend, 0);\n  const totalSales = filteredData.reduce((sum, d) => sum + d.totalSales, 0);\n  const totalConversions = filteredData.reduce((sum, d) => sum + d.totalConversions, 0);\n  const avgROI = filteredData.length > 0\n    ? filteredData.reduce((sum, d) => sum + d.roi, 0) / filteredData.length\n    : 0;\n  const avgROAS = totalSpend > 0 ? totalSales / totalSpend : 0;\n\n  return (\n    <div className=\"roi-analysis-page\">\n      <Card \n        title={\n          <Space>\n            <LineChartOutlined />\n            <span>ROI Analysis Dashboard</span>\n          </Space>\n        }\n        extra={\n          <Space>\n            <RangePicker\n              value={dateRange}\n              onChange={(dates) => dates && setDateRange(dates as [Dayjs, Dayjs])}\n              allowClear={false}\n            />\n            <Select\n              placeholder=\"All Ad Plans\"\n              style={{ width: 200 }}\n              allowClear\n              onChange={(value) => setSelectedAdPlanId(value)}\n            >\n              {AD_PLANS.map(plan => (\n                <Option key={plan.id} value={plan.id}>\n                  {plan.name}\n                </Option>\n              ))}\n            </Select>\n            <Button icon={<SyncOutlined />} onClick={handleRefresh} loading={loading}>\n              Refresh\n            </Button>\n          </Space>\n        }\n      >\n        <Spin spinning={loading}>\n          <Row gutter={16} style={{ marginBottom: 24 }}>\n            <Col span={6}>\n              <Card>\n                <Statistic\n                  title={\n                    <Space>\n                      Total Spend\n                      <Tooltip title=\"Total advertising spend in selected period\">\n                        <InfoCircleOutlined />\n                      </Tooltip>\n                    </Space>\n                  }\n                  value={totalSpend}\n                  precision={2}\n                  prefix={<DollarOutlined style={{ color: '#ff4d4f' }} />}\n                />\n              </Card>\n            </Col>\n            <Col span={6}>\n              <Card>\n                <Statistic\n                  title={\n                    <Space>\n                      Total Sales\n                      <Tooltip title=\"Total sales attributed to ads\">\n                        <InfoCircleOutlined />\n                      </Tooltip>\n                    </Space>\n                  }\n                  value={totalSales}\n                  precision={2}\n                  prefix={<DollarOutlined style={{ color: '#52c41a' }} />}\n                />\n              </Card>\n            </Col>\n            <Col span={6}>\n              <Card>\n                <Statistic\n                  title={\n                    <Space>\n                      Average ROI\n                      <Tooltip title=\"(Sales - Spend) / Spend * 100%\">\n                        <InfoCircleOutlined />\n                      </Tooltip>\n                    </Space>\n                  }\n                  value={avgROI}\n                  precision={2}\n                  suffix=\"%\"\n                  prefix={<PercentageOutlined style={{ color: getROIColor(avgROI) }} />}\n                  valueStyle={{ color: getROIColor(avgROI) }}\n                />\n              </Card>\n            </Col>\n            <Col span={6}>\n              <Card>\n                <Statistic\n                  title={\n                    <Space>\n                      Average ROAS\n                      <Tooltip title=\"Return on Ad Spend: Sales / Spend\">\n                        <InfoCircleOutlined />\n                      </Tooltip>\n                    </Space>\n                  }\n                  value={avgROAS}\n                  precision={2}\n                  suffix=\"x\"\n                  valueStyle={{ color: getROASColor(avgROAS) }}\n                />\n              </Card>\n            </Col>\n          </Row>\n\n          <Row gutter={16} style={{ marginBottom: 24 }}>\n            <Col span={6}>\n              <Card>\n                <Statistic\n                  title=\"Total Conversions\"\n                  value={totalConversions}\n                />\n              </Card>\n            </Col>\n            <Col span={6}>\n              <Card>\n                <Statistic\n                  title=\"Ad Plans Analyzed\"\n                  value={filteredData.length}\n                />\n              </Card>\n            </Col>\n            <Col span={12}>\n              <Card title=\"ROI Performance\">\n                <div style={{ display: 'flex', gap: 16 }}>\n                  {filteredData.slice(0, 3).map(item => (\n                    <div key={item.adPlanId} style={{ flex: 1 }}>\n                      <Text type=\"secondary\">{item.adPlanName}</Text>\n                      <Progress\n                        percent={Math.min(item.roi / 5, 100)}\n                        format={() => `${item.roi.toFixed(0)}%`}\n                        strokeColor={getROIColor(item.roi)}\n                        size=\"small\"\n                      />\n                    </div>\n                  ))}\n                </div>\n              </Card>\n            </Col>\n          </Row>\n\n          <Divider>ROI Details by Ad Plan</Divider>\n\n          {filteredData.length === 0 ? (\n            <Empty description=\"No ROI data available for selected criteria\" />\n          ) : (\n            <Table\n              columns={columns}\n              dataSource={filteredData}\n              rowKey=\"adPlanId\"\n              pagination={false}\n              scroll={{ x: 1200 }}\n              onRow={(record) => ({\n                onClick: () => setSelectedRow(record),\n                style: { cursor: 'pointer' },\n              })}\n            />\n          )}\n        </Spin>\n      </Card>\n\n      {selectedRow && (\n        <Card \n          title={`Detailed Analysis: ${selectedRow.adPlanName}`}\n          style={{ marginTop: 16 }}\n          extra={\n            <Button onClick={() => setSelectedRow(null)}>Close</Button>\n          }\n        >\n          <Row gutter={24}>\n            <Col span={12}>\n              <Descriptions bordered column={1} size=\"small\">\n                <Descriptions.Item label=\"Ad Plan ID\">\n                  <code>{selectedRow.adPlanId}</code>\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Platform\">\n                  <Tag color={PLATFORM_COLORS[selectedRow.platform]}>{selectedRow.platform}</Tag>\n                </Descriptions.Item>\n                <Descriptions.Item label=\"Analysis Period\">\n                  {dateRange[0].format('YYYY-MM-DD')} ~ {dateRange[1].format('YYYY-MM-DD')}\n                </Descriptions.Item>\n              </Descriptions>\n            </Col>\n            <Col span={12}>\n              <Descriptions bordered column={1} size=\"small\">\n                <Descriptions.Item label=\"ROI Formula\">\n                  <Text code>(Sales - Spend) / Spend × 100%</Text>\n                </Descriptions.Item>\n                <Descriptions.Item label=\"ROAS Formula\">\n                  <Text code>Sales / Spend</Text>\n                </Descriptions.Item>\n                <Descriptions.Item label=\"ACoS Formula\">\n                  <Text code>Spend / Sales × 100%</Text>\n                </Descriptions.Item>\n              </Descriptions>\n            </Col>\n          </Row>\n\n          <Divider>Performance Breakdown</Divider>\n\n          <Row gutter={16}>\n            <Col span={8}>\n              <Card size=\"small\">\n                <Statistic\n                  title=\"Profit\"\n                  value={selectedRow.totalSales - selectedRow.totalSpend}\n                  precision={2}\n                  prefix=\"$\"\n                  valueStyle={{ \n                    color: selectedRow.totalSales - selectedRow.totalSpend > 0 ? '#52c41a' : '#ff4d4f' \n                  }}\n                />\n              </Card>\n            </Col>\n            <Col span={8}>\n              <Card size=\"small\">\n                <Statistic\n                  title=\"Conversion Rate\"\n                  value={selectedRow.clicks > 0 ? (selectedRow.totalConversions / selectedRow.clicks * 100) : 0}\n                  precision={2}\n                  suffix=\"%\"\n                />\n              </Card>\n            </Col>\n            <Col span={8}>\n              <Card size=\"small\">\n                <Statistic\n                  title=\"Cost per Conversion\"\n                  value={selectedRow.totalConversions > 0 ? selectedRow.totalSpend / selectedRow.totalConversions : 0}\n                  precision={2}\n                  prefix=\"$\"\n                />\n              </Card>\n            </Col>\n          </Row>\n        </Card>\n      )}\n\n      <Card style={{ marginTop: 16 }}>\n        <Descriptions title=\"ROI Calculation Standards\" bordered column={2}>\n          <Descriptions.Item label=\"ROI Threshold (B2B)\">\n            <Tag color=\"red\">Minimum 15%</Tag>\n          </Descriptions.Item>\n          <Descriptions.Item label=\"ROI Threshold (B2C)\">\n            <Tag color=\"orange\">Minimum 20%</Tag>\n          </Descriptions.Item>\n          <Descriptions.Item label=\"ROAS Target\">\n            <Tag color=\"green\">≥ 3.0x (Recommended)</Tag>\n          </Descriptions.Item>\n          <Descriptions.Item label=\"ACoS Target\">\n            <Tag color=\"green\">≤ 30% (Recommended)</Tag>\n          </Descriptions.Item>\n        </Descriptions>\n      </Card>\n    </div>\n  );\n};\n\nexport default ROIAnalysis;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Ad/ROIAnalysis.tsx"
    },
    "Auth/LoginPage": {
      "path": "Auth/LoginPage",
      "id": "Auth/LoginPage",
      "file": "Auth/LoginPage.tsx",
      "absPath": "/Auth/LoginPage",
      "__content": "import React, { useState } from 'react';\nimport {\n  Card,\n  Form,\n  Input,\n  Button,\n  Checkbox,\n  Space,\n  Divider,\n  Typography,\n  Alert,\n  message,\n  Row,\n  Col,\n  Image,\n} from 'antd';\nimport {\n  UserOutlined,\n  LockOutlined,\n  SafetyOutlined,\n  EyeInvisibleOutlined,\n  EyeTwoTone,\n  LoginOutlined,\n  GoogleOutlined,\n  GithubOutlined,\n} from '@ant-design/icons';\n\nconst { Title, Text, Link } = Typography;\n\ninterface LoginFormValues {\n  username: string;\n  password: string;\n  remember: boolean;\n  captcha?: string;\n}\n\nexport const LoginPage: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [loginError, setLoginError] = useState<string | null>(null);\n  const [captchaCode, setCaptchaCode] = useState('');\n\n  const generateCaptcha = () => {\n    const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';\n    let result = '';\n    for (let i = 0; i < 4; i++) {\n      result += chars.charAt(Math.floor(Math.random() * chars.length));\n    }\n    setCaptchaCode(result);\n  };\n\n  React.useEffect(() => {\n    generateCaptcha();\n  }, []);\n\n  const handleLogin = async (values: LoginFormValues) => {\n    setLoading(true);\n    setLoginError(null);\n\n    try {\n      await new Promise(resolve => setTimeout(resolve, 1500));\n\n      if (values.captcha?.toUpperCase() !== captchaCode) {\n        setLoginError('Invalid verification code');\n        generateCaptcha();\n        setLoading(false);\n        return;\n      }\n\n      message.success('Login successful! Redirecting...');\n    } catch (error) {\n      setLoginError('Login failed. Please check your credentials.');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  return (\n    <div style={{\n      minHeight: '100vh',\n      display: 'flex',\n      alignItems: 'center',\n      justifyContent: 'center',\n      background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',\n      padding: 24,\n    }}>\n      <Row gutter={[48, 0]} align=\"middle\" style={{ maxWidth: 1000, width: '100%' }}>\n        <Col xs={0} md={12}>\n          <div style={{ color: 'white', paddingRight: 48 }}>\n            <Title level={1} style={{ color: 'white', marginBottom: 24 }}>\n              Crawlful Hub\n            </Title>\n            <Text style={{ color: 'rgba(255,255,255,0.9)', fontSize: 18, display: 'block', marginBottom: 32 }}>\n              Your all-in-one cross-border e-commerce management platform\n            </Text>\n            <Space direction=\"vertical\" size=\"large\" style={{ color: 'rgba(255,255,255,0.8)' }}>\n              <div>✓ Multi-platform integration</div>\n              <div>✓ Automated operations</div>\n              <div>✓ Real-time analytics</div>\n              <div>✓ Compliance management</div>\n            </Space>\n          </div>\n        </Col>\n\n        <Col xs={24} md={12}>\n          <Card\n            style={{\n              borderRadius: 16,\n              boxShadow: '0 20px 60px rgba(0,0,0,0.3)',\n            }}\n            bodyStyle={{ padding: 40 }}\n          >\n            <div style={{ textAlign: 'center', marginBottom: 32 }}>\n              <Title level={3}>Welcome Back</Title>\n              <Text type=\"secondary\">Sign in to your account</Text>\n            </div>\n\n            {loginError && (\n              <Alert\n                message={loginError}\n                type=\"error\"\n                showIcon\n                style={{ marginBottom: 24 }}\n                closable\n                onClose={() => setLoginError(null)}\n              />\n            )}\n\n            <Form\n              form={form}\n              layout=\"vertical\"\n              onFinish={handleLogin}\n              initialValues={{ remember: true }}\n            >\n              <Form.Item\n                name=\"username\"\n                rules={[\n                  { required: true, message: 'Please enter your username' },\n                  { min: 3, message: 'Username must be at least 3 characters' },\n                ]}\n              >\n                <Input\n                  prefix={<UserOutlined style={{ color: '#bfbfbf' }} />}\n                  placeholder=\"Username or Email\"\n                  size=\"large\"\n                />\n              </Form.Item>\n\n              <Form.Item\n                name=\"password\"\n                rules={[\n                  { required: true, message: 'Please enter your password' },\n                  { min: 6, message: 'Password must be at least 6 characters' },\n                ]}\n              >\n                <Input.Password\n                  prefix={<LockOutlined style={{ color: '#bfbfbf' }} />}\n                  placeholder=\"Password\"\n                  size=\"large\"\n                  iconRender={visible => (visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />)}\n                />\n              </Form.Item>\n\n              <Form.Item>\n                <Row gutter={8} align=\"middle\">\n                  <Col flex=\"auto\">\n                    <Form.Item\n                      name=\"captcha\"\n                      noStyle\n                      rules={[{ required: true, message: 'Please enter verification code' }]}\n                    >\n                      <Input\n                        prefix={<SafetyOutlined style={{ color: '#bfbfbf' }} />}\n                        placeholder=\"Verification Code\"\n                        size=\"large\"\n                        maxLength={4}\n                      />\n                    </Form.Item>\n                  </Col>\n                  <Col>\n                    <div\n                      onClick={generateCaptcha}\n                      style={{\n                        width: 100,\n                        height: 40,\n                        background: '#f0f2f5',\n                        display: 'flex',\n                        alignItems: 'center',\n                        justifyContent: 'center',\n                        fontFamily: 'monospace',\n                        fontSize: 20,\n                        letterSpacing: 4,\n                        cursor: 'pointer',\n                        userSelect: 'none',\n                        borderRadius: 4,\n                        color: '#1890ff',\n                        fontWeight: 'bold',\n                      }}\n                    >\n                      {captchaCode}\n                    </div>\n                  </Col>\n                </Row>\n              </Form.Item>\n\n              <Form.Item>\n                <Row justify=\"space-between\" align=\"middle\">\n                  <Col>\n                    <Form.Item name=\"remember\" valuePropName=\"checked\" noStyle>\n                      <Checkbox>Remember me</Checkbox>\n                    </Form.Item>\n                  </Col>\n                  <Col>\n                    <Link href=\"/auth/reset-password\">Forgot password?</Link>\n                  </Col>\n                </Row>\n              </Form.Item>\n\n              <Form.Item>\n                <Button\n                  type=\"primary\"\n                  htmlType=\"submit\"\n                  size=\"large\"\n                  block\n                  loading={loading}\n                  icon={<LoginOutlined />}\n                >\n                  Sign In\n                </Button>\n              </Form.Item>\n\n              <Divider>Or continue with</Divider>\n\n              <Space style={{ width: '100%', justifyContent: 'center' }}>\n                <Button icon={<GoogleOutlined />} size=\"large\">\n                  Google\n                </Button>\n                <Button icon={<GithubOutlined />} size=\"large\">\n                  GitHub\n                </Button>\n              </Space>\n\n              <div style={{ textAlign: 'center', marginTop: 24 }}>\n                <Text type=\"secondary\">\n                  Don't have an account? <Link href=\"/auth/register\">Sign up</Link>\n                </Text>\n              </div>\n            </Form>\n          </Card>\n        </Col>\n      </Row>\n    </div>\n  );\n};\n\nexport default LoginPage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Auth/LoginPage.tsx"
    },
    "B2B/BatchOrder": {
      "path": "B2B/BatchOrder",
      "id": "B2B/BatchOrder",
      "file": "B2B/BatchOrder.tsx",
      "absPath": "/B2B/BatchOrder",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  InputNumber,\n  Select,\n  Descriptions,\n  Divider,\n  message,\n  Tag,\n  Steps,\n  Result,\n  Row,\n  Col,\n  Statistic,\n  Alert,\n} from 'antd';\nimport {\n  ShoppingCartOutlined,\n  PlusOutlined,\n  DeleteOutlined,\n  SaveOutlined,\n  SendOutlined,\n  CheckCircleOutlined,\n  ClockCircleOutlined,\n  SyncOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\n\nconst { Option } = Select;\n\ninterface OrderItem {\n  key: string;\n  productId: string;\n  productName: string;\n  quantity: number;\n  unitPrice: number;\n  totalPrice: number;\n}\n\ninterface BatchOrder {\n  id: string;\n  customerId: string;\n  customerName: string;\n  items: OrderItem[];\n  totalAmount: number;\n  status: 'DRAFT' | 'SUBMITTED' | 'PROCESSING' | 'CONFIRMED' | 'SHIPPED' | 'COMPLETED' | 'CANCELLED';\n  createdAt: string;\n  estimatedDelivery?: string;\n  shippingAddress?: string;\n  remark?: string;\n}\n\nconst MOCK_PRODUCTS = [\n  { id: 'P001', name: 'Industrial Sensor A', price: 150.00, stock: 1000 },\n  { id: 'P002', name: 'Control Module B', price: 280.00, stock: 500 },\n  { id: 'P003', name: 'Power Supply Unit C', price: 95.00, stock: 2000 },\n  { id: 'P004', name: 'Communication Gateway D', price: 420.00, stock: 300 },\n  { id: 'P005', name: 'Display Panel E', price: 185.00, stock: 800 },\n];\n\nconst MOCK_CUSTOMERS = [\n  { id: 'C001', name: 'TechCorp Industries', contact: 'John Smith', phone: '+1-555-0101', address: '123 Industrial Ave, Los Angeles, CA' },\n  { id: 'C002', name: 'Global Manufacturing Co', contact: 'Jane Doe', phone: '+1-555-0102', address: '456 Factory Rd, Chicago, IL' },\n  { id: 'C003', name: 'Smart Factory Solutions', contact: 'Mike Johnson', phone: '+1-555-0103', address: '789 Tech Park, Seattle, WA' },\n];\n\nconst STATUS_CONFIG: Record<string, { color: string; text: string; icon: React.ReactNode }> = {\n  DRAFT: { color: 'default', text: 'Draft', icon: <ClockCircleOutlined /> },\n  SUBMITTED: { color: 'processing', text: 'Submitted', icon: <SendOutlined /> },\n  PROCESSING: { color: 'processing', text: 'Processing', icon: <SyncOutlined /> },\n  CONFIRMED: { color: 'blue', text: 'Confirmed', icon: <CheckCircleOutlined /> },\n  SHIPPED: { color: 'cyan', text: 'Shipped', icon: <SendOutlined /> },\n  COMPLETED: { color: 'green', text: 'Completed', icon: <CheckCircleOutlined /> },\n  CANCELLED: { color: 'red', text: 'Cancelled', icon: <DeleteOutlined /> },\n};\n\nexport const BatchOrder: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [orderItems, setOrderItems] = useState<OrderItem[]>([]);\n  const [orders, setOrders] = useState<BatchOrder[]>([]);\n  const [selectedCustomer, setSelectedCustomer] = useState<any>(null);\n  const [createModalVisible, setCreateModalVisible] = useState(false);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [selectedOrder, setSelectedOrder] = useState<BatchOrder | null>(null);\n  const [currentStep, setCurrentStep] = useState(0);\n\n  useEffect(() => {\n    fetchOrders();\n  }, []);\n\n  const fetchOrders = async () => {\n    setLoading(true);\n    try {\n      const mockOrders: BatchOrder[] = [\n        {\n          id: 'BO-2026-001',\n          customerId: 'C001',\n          customerName: 'TechCorp Industries',\n          items: [\n            { key: '1', productId: 'P001', productName: 'Industrial Sensor A', quantity: 50, unitPrice: 142.50, totalPrice: 7125 },\n            { key: '2', productId: 'P002', productName: 'Control Module B', quantity: 20, unitPrice: 266.00, totalPrice: 5320 },\n          ],\n          totalAmount: 12445,\n          status: 'PROCESSING',\n          createdAt: '2026-03-17 14:30:00',\n          estimatedDelivery: '2026-03-25',\n        },\n        {\n          id: 'BO-2026-002',\n          customerId: 'C002',\n          customerName: 'Global Manufacturing Co',\n          items: [\n            { key: '1', productId: 'P003', productName: 'Power Supply Unit C', quantity: 100, unitPrice: 85.50, totalPrice: 8550 },\n          ],\n          totalAmount: 8550,\n          status: 'CONFIRMED',\n          createdAt: '2026-03-16 10:00:00',\n          estimatedDelivery: '2026-03-23',\n        },\n        {\n          id: 'BO-2026-003',\n          customerId: 'C003',\n          customerName: 'Smart Factory Solutions',\n          items: [\n            { key: '1', productId: 'P004', productName: 'Communication Gateway D', quantity: 30, unitPrice: 399.00, totalPrice: 11970 },\n            { key: '2', productId: 'P005', productName: 'Display Panel E', quantity: 50, unitPrice: 175.75, totalPrice: 8787.50 },\n          ],\n          totalAmount: 20757.50,\n          status: 'COMPLETED',\n          createdAt: '2026-03-10 09:15:00',\n          estimatedDelivery: '2026-03-18',\n        },\n      ];\n      setOrders(mockOrders);\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleCustomerChange = (customerId: string) => {\n    const customer = MOCK_CUSTOMERS.find(c => c.id === customerId);\n    setSelectedCustomer(customer || null);\n  };\n\n  const handleAddItem = () => {\n    const values = form.getFieldsValue(['newProductId', 'newQuantity']);\n    if (!values.newProductId || !values.newQuantity) {\n      message.error('Please select product and enter quantity');\n      return;\n    }\n\n    const product = MOCK_PRODUCTS.find(p => p.id === values.newProductId);\n    if (!product) return;\n\n    if (values.newQuantity > product.stock) {\n      message.error(`Insufficient stock. Available: ${product.stock}`);\n      return;\n    }\n\n    const newItem: OrderItem = {\n      key: `${values.newProductId}-${Date.now()}`,\n      productId: product.id,\n      productName: product.name,\n      quantity: values.newQuantity,\n      unitPrice: product.price,\n      totalPrice: product.price * values.newQuantity,\n    };\n\n    setOrderItems([...orderItems, newItem]);\n    form.setFieldsValue({ newProductId: undefined, newQuantity: undefined });\n  };\n\n  const handleRemoveItem = (key: string) => {\n    setOrderItems(orderItems.filter(item => item.key !== key));\n  };\n\n  const handleCreateOrder = async () => {\n    if (!selectedCustomer) {\n      message.error('Please select a customer');\n      return;\n    }\n    if (orderItems.length === 0) {\n      message.error('Please add at least one item');\n      return;\n    }\n\n    setLoading(true);\n    try {\n      const newOrder: BatchOrder = {\n        id: `BO-${Date.now()}`,\n        customerId: selectedCustomer.id,\n        customerName: selectedCustomer.name,\n        items: orderItems,\n        totalAmount: orderItems.reduce((sum, item) => sum + item.totalPrice, 0),\n        status: 'DRAFT',\n        createdAt: new Date().toISOString(),\n      };\n\n      setOrders([newOrder, ...orders]);\n      message.success('Order created successfully');\n      setCreateModalVisible(false);\n      setOrderItems([]);\n      setSelectedCustomer(null);\n      form.resetFields();\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleSubmitOrder = async (orderId: string) => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 1000));\n      setOrders(orders.map(o => o.id === orderId ? { ...o, status: 'SUBMITTED' as const } : o));\n      message.success('Order submitted successfully');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleViewDetail = (order: BatchOrder) => {\n    setSelectedOrder(order);\n    setDetailModalVisible(true);\n  };\n\n  const columns: ColumnsType<BatchOrder> = [\n    {\n      title: 'Order ID',\n      dataIndex: 'id',\n      key: 'id',\n      width: 140,\n      render: (id: string) => <a onClick={() => handleViewDetail(orders.find(o => o.id === id)!)}>{id}</a>,\n    },\n    {\n      title: 'Customer',\n      dataIndex: 'customerName',\n      key: 'customerName',\n      width: 180,\n    },\n    {\n      title: 'Items',\n      dataIndex: 'items',\n      key: 'items',\n      width: 80,\n      render: (items: OrderItem[]) => `${items.length} items`,\n    },\n    {\n      title: 'Total Amount',\n      dataIndex: 'totalAmount',\n      key: 'totalAmount',\n      width: 120,\n      render: (amount: number) => <strong>${amount.toLocaleString()}</strong>,\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 120,\n      render: (status: string) => {\n        const config = STATUS_CONFIG[status];\n        return <Tag color={config.color} icon={config.icon}>{config.text}</Tag>;\n      },\n    },\n    {\n      title: 'Created',\n      dataIndex: 'createdAt',\n      key: 'createdAt',\n      width: 160,\n    },\n    {\n      title: 'Est. Delivery',\n      dataIndex: 'estimatedDelivery',\n      key: 'estimatedDelivery',\n      width: 120,\n    },\n    {\n      title: 'Actions',\n      key: 'actions',\n      width: 150,\n      render: (_, record) => (\n        <Space>\n          <Button type=\"link\" onClick={() => handleViewDetail(record)}>View</Button>\n          {record.status === 'DRAFT' && (\n            <Button type=\"link\" onClick={() => handleSubmitOrder(record.id)}>Submit</Button>\n          )}\n        </Space>\n      ),\n    },\n  ];\n\n  const orderColumns: ColumnsType<OrderItem> = [\n    { title: 'Product ID', dataIndex: 'productId', key: 'productId' },\n    { title: 'Product Name', dataIndex: 'productName', key: 'productName' },\n    { title: 'Quantity', dataIndex: 'quantity', key: 'quantity' },\n    { title: 'Unit Price', dataIndex: 'unitPrice', key: 'unitPrice', render: (p: number) => `$${p.toFixed(2)}` },\n    { title: 'Total', dataIndex: 'totalPrice', key: 'totalPrice', render: (t: number) => <strong>${t.toFixed(2)}</strong> },\n    {\n      title: 'Action',\n      key: 'action',\n      render: (_, record) => (\n        <Button type=\"link\" danger icon={<DeleteOutlined />} onClick={() => handleRemoveItem(record.key)} />\n      ),\n    },\n  ];\n\n  const totalAmount = orderItems.reduce((sum, item) => sum + item.totalPrice, 0);\n\n  return (\n    <div className=\"batch-order-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic title=\"Total Orders\" value={orders.length} prefix={<ShoppingCartOutlined />} />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic \n              title=\"Processing\" \n              value={orders.filter(o => o.status === 'PROCESSING' || o.status === 'SUBMITTED').length} \n              valueStyle={{ color: '#1890ff' }}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic \n              title=\"Completed\" \n              value={orders.filter(o => o.status === 'COMPLETED').length} \n              valueStyle={{ color: '#52c41a' }}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic \n              title=\"Total Amount\" \n              value={orders.reduce((sum, o) => sum + o.totalAmount, 0)} \n              precision={2} \n              prefix=\"$\" \n              valueStyle={{ color: '#1890ff' }}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card title=\"Batch Order Management\" extra={\n        <Button type=\"primary\" icon={<PlusOutlined />} onClick={() => setCreateModalVisible(true)}>\n          Create Order\n        </Button>\n      }>\n        <Table\n          columns={columns}\n          dataSource={orders}\n          rowKey=\"id\"\n          loading={loading}\n          pagination={{ pageSize: 10 }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Create Batch Order\"\n        open={createModalVisible}\n        onCancel={() => { setCreateModalVisible(false); setOrderItems([]); }}\n        footer={null}\n        width={800}\n      >\n        <Steps current={currentStep} style={{ marginBottom: 24 }}>\n          <Steps.Step title=\"Customer Info\" />\n          <Steps.Step title=\"Order Items\" />\n          <Steps.Step title=\"Confirm\" />\n        </Steps>\n\n        {currentStep === 0 && (\n          <Form form={form} layout=\"vertical\">\n            <Form.Item name=\"customerId\" label=\"Customer\" rules={[{ required: true }]}>\n              <Select placeholder=\"Select Customer\" onChange={handleCustomerChange}>\n                {MOCK_CUSTOMERS.map(c => (\n                  <Option key={c.id} value={c.id}>{c.name}</Option>\n                ))}\n              </Select>\n            </Form.Item>\n            {selectedCustomer && (\n              <Alert\n                type=\"info\"\n                message={`Contact: ${selectedCustomer.contact} | Phone: ${selectedCustomer.phone}`}\n                description={`Address: ${selectedCustomer.address}`}\n                style={{ marginBottom: 16 }}\n              />\n            )}\n            <div style={{ textAlign: 'right' }}>\n              <Button type=\"primary\" onClick={() => setCurrentStep(1)} disabled={!selectedCustomer}>\n                Next\n              </Button>\n            </div>\n          </Form>\n        )}\n\n        {currentStep === 1 && (\n          <>\n            <Form form={form} layout=\"horizontal\">\n              <Row gutter={16}>\n                <Col span={12}>\n                  <Form.Item name=\"newProductId\" label=\"Product\">\n                    <Select placeholder=\"Select Product\">\n                      {MOCK_PRODUCTS.map(p => (\n                        <Option key={p.id} value={p.id}>{p.id} - {p.name} ($ {p.price.toFixed(2)})</Option>\n                      ))}\n                    </Select>\n                  </Form.Item>\n                </Col>\n                <Col span={6}>\n                  <Form.Item name=\"newQuantity\" label=\"Quantity\">\n                    <InputNumber min={1} style={{ width: '100%' }} />\n                  </Form.Item>\n                </Col>\n                <Col span={6}>\n                  <Form.Item label=\" \">\n                    <Button type=\"primary\" icon={<PlusOutlined />} onClick={handleAddItem}>Add</Button>\n                  </Form.Item>\n                </Col>\n              </Row>\n            </Form>\n\n            <Table columns={orderColumns} dataSource={orderItems} pagination={false} size=\"small\" />\n\n            <Divider>Total: ${totalAmount.toFixed(2)}</Divider>\n\n            <div style={{ textAlign: 'right', marginTop: 16 }}>\n              <Button onClick={() => setCurrentStep(0)}>Back</Button>\n              <Button type=\"primary\" onClick={() => setCurrentStep(2)} disabled={orderItems.length === 0} style={{ marginLeft: 8 }}>\n                Next\n              </Button>\n            </div>\n          </>\n        )}\n\n        {currentStep === 2 && (\n          <>\n            <Descriptions bordered column={1}>\n              <Descriptions.Item label=\"Customer\">{selectedCustomer?.name}</Descriptions.Item>\n              <Descriptions.Item label=\"Contact\">{selectedCustomer?.contact}</Descriptions.Item>\n              <Descriptions.Item label=\"Phone\">{selectedCustomer?.phone}</Descriptions.Item>\n              <Descriptions.Item label=\"Address\">{selectedCustomer?.address}</Descriptions.Item>\n              <Descriptions.Item label=\"Items\">{orderItems.length} items</Descriptions.Item>\n              <Descriptions.Item label=\"Total Amount\">\n                <strong style={{ fontSize: 18, color: '#1890ff' }}>${totalAmount.toFixed(2)}</strong>\n              </Descriptions.Item>\n            </Descriptions>\n\n            <div style={{ textAlign: 'right', marginTop: 24 }}>\n              <Button onClick={() => setCurrentStep(1)}>Back</Button>\n              <Button type=\"primary\" icon={<SaveOutlined />} onClick={handleCreateOrder} loading={loading} style={{ marginLeft: 8 }}>\n                Create Order\n              </Button>\n            </div>\n          </>\n        )}\n      </Modal>\n\n      <Modal\n        title=\"Order Details\"\n        open={detailModalVisible}\n        onCancel={() => setDetailModalVisible(false)}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>Close</Button>,\n        ]}\n        width={700}\n      >\n        {selectedOrder && (\n          <>\n            <Descriptions bordered column={2} style={{ marginBottom: 24 }}>\n              <Descriptions.Item label=\"Order ID\">{selectedOrder.id}</Descriptions.Item>\n              <Descriptions.Item label=\"Status\">\n                <Tag color={STATUS_CONFIG[selectedOrder.status].color}>\n                  {STATUS_CONFIG[selectedOrder.status].text}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Customer\">{selectedOrder.customerName}</Descriptions.Item>\n              <Descriptions.Item label=\"Created\">{selectedOrder.createdAt}</Descriptions.Item>\n              <Descriptions.Item label=\"Est. Delivery\">{selectedOrder.estimatedDelivery || '-'}</Descriptions.Item>\n              <Descriptions.Item label=\"Total Amount\">\n                <strong style={{ fontSize: 16, color: '#1890ff' }}>${selectedOrder.totalAmount.toLocaleString()}</strong>\n              </Descriptions.Item>\n            </Descriptions>\n\n            <Table\n              columns={orderColumns.slice(0, -1)}\n              dataSource={selectedOrder.items}\n              pagination={false}\n              size=\"small\"\n            />\n          </>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default BatchOrder;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/B2B/BatchOrder.tsx"
    },
    "B2BTrade/index": {
      "path": "B2BTrade",
      "id": "B2BTrade/index",
      "file": "B2BTrade/index.ts",
      "absPath": "/B2BTrade",
      "__content": "export { EnterpriseQuote } from './EnterpriseQuote';\nexport { BatchOrder } from './BatchOrder';\nexport { ContractManage } from './ContractManage';\nexport { default as EnterpriseQuotePage } from './EnterpriseQuote';\nexport { default as BatchOrderPage } from './BatchOrder';\nexport { default as ContractManagePage } from './ContractManage';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/B2BTrade/index.ts"
    },
    "Ad/AdDelivery": {
      "path": "Ad/AdDelivery",
      "id": "Ad/AdDelivery",
      "file": "Ad/AdDelivery.tsx",
      "absPath": "/Ad/AdDelivery",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  InputNumber,\n  Select,\n  Tag,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  message,\n  Progress,\n  Divider,\n  Alert,\n  Descriptions,\n} from 'antd';\nimport {\n  RocketOutlined,\n  PlayCircleOutlined,\n  PauseCircleOutlined,\n  EyeOutlined,\n  DollarOutlined,\n  ThunderboltOutlined,\n  CheckCircleOutlined,\n  CloseCircleOutlined,\n  SyncOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs from 'dayjs';\n\nconst { Option } = Select;\n\ntype CampaignStatus = 'PENDING' | 'RUNNING' | 'PAUSED' | 'COMPLETED' | 'FAILED';\n\ninterface AdCampaign {\n  id: string;\n  ad_plan_id: string;\n  tenant_id: string;\n  product_id?: string;\n  sku_id?: string;\n  bid_amount: number;\n  clicks: number;\n  impressions: number;\n  spend: number;\n  sales: number;\n  conversions: number;\n  status: CampaignStatus;\n  created_at: string;\n  updated_at: string;\n}\n\ninterface AdPlan {\n  id: string;\n  name: string;\n  platform: string;\n  budget: number;\n  status: string;\n}\n\ninterface ExecuteCampaignParams {\n  adPlanId: string;\n  productId?: string;\n  skuId?: string;\n  bidAmount: number;\n}\n\nconst CAMPAIGN_STATUS_COLORS: Record<CampaignStatus, string> = {\n  PENDING: 'default',\n  RUNNING: 'green',\n  PAUSED: 'orange',\n  COMPLETED: 'blue',\n  FAILED: 'red',\n};\n\nconst CAMPAIGN_STATUS_ICONS: Record<CampaignStatus, React.ReactNode> = {\n  PENDING: <SyncOutlined spin />,\n  RUNNING: <PlayCircleOutlined />,\n  PAUSED: <PauseCircleOutlined />,\n  COMPLETED: <CheckCircleOutlined />,\n  FAILED: <CloseCircleOutlined />,\n};\n\nconst MOCK_AD_PLANS: AdPlan[] = [\n  { id: 'ADP-001', name: 'Summer Sale Campaign', platform: 'AMAZON', budget: 5000, status: 'ACTIVE' },\n  { id: 'ADP-002', name: 'New Product Launch', platform: 'SHOPEE', budget: 15000, status: 'ACTIVE' },\n  { id: 'ADP-003', name: 'Brand Awareness Q3', platform: 'TIKTOK', budget: 8000, status: 'DRAFT' },\n];\n\nconst MOCK_CAMPAIGNS: AdCampaign[] = [\n  {\n    id: 'CAMP-001',\n    ad_plan_id: 'ADP-001',\n    tenant_id: 'T001',\n    product_id: 'P001',\n    sku_id: 'SKU001',\n    bid_amount: 2.5,\n    clicks: 1250,\n    impressions: 45000,\n    spend: 312.5,\n    sales: 1562.5,\n    conversions: 45,\n    status: 'RUNNING',\n    created_at: '2026-06-01T10:00:00Z',\n    updated_at: '2026-06-15T14:30:00Z',\n  },\n  {\n    id: 'CAMP-002',\n    ad_plan_id: 'ADP-001',\n    tenant_id: 'T001',\n    product_id: 'P002',\n    sku_id: 'SKU002',\n    bid_amount: 1.8,\n    clicks: 890,\n    impressions: 32000,\n    spend: 160.2,\n    sales: 890.0,\n    conversions: 28,\n    status: 'RUNNING',\n    created_at: '2026-06-02T09:00:00Z',\n    updated_at: '2026-06-15T14:30:00Z',\n  },\n  {\n    id: 'CAMP-003',\n    ad_plan_id: 'ADP-002',\n    tenant_id: 'T001',\n    product_id: 'P003',\n    bid_amount: 3.0,\n    clicks: 2100,\n    impressions: 78000,\n    spend: 630.0,\n    sales: 3150.0,\n    conversions: 72,\n    status: 'RUNNING',\n    created_at: '2026-07-01T08:00:00Z',\n    updated_at: '2026-07-10T16:45:00Z',\n  },\n];\n\nconst MOCK_PRODUCTS = [\n  { id: 'P001', name: 'Wireless Earbuds Pro', sku: 'SKU001' },\n  { id: 'P002', name: 'Smart Watch X200', sku: 'SKU002' },\n  { id: 'P003', name: 'Bluetooth Speaker Mini', sku: 'SKU003' },\n  { id: 'P004', name: 'USB-C Hub 7-in-1', sku: 'SKU004' },\n];\n\nexport const AdDelivery: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [campaigns, setCampaigns] = useState<AdCampaign[]>(MOCK_CAMPAIGNS);\n  const [adPlans, setAdPlans] = useState<AdPlan[]>(MOCK_AD_PLANS);\n  const [modalVisible, setModalVisible] = useState(false);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [selectedCampaign, setSelectedCampaign] = useState<AdCampaign | null>(null);\n  const [selectedAdPlanId, setSelectedAdPlanId] = useState<string | null>(null);\n\n  useEffect(() => {\n    loadCampaigns();\n  }, []);\n\n  const loadCampaigns = async () => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 500));\n      setCampaigns(MOCK_CAMPAIGNS);\n    } catch (error) {\n      message.error('Failed to load campaigns');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleExecuteCampaign = async (values: ExecuteCampaignParams) => {\n    setLoading(true);\n    try {\n      const newCampaign: AdCampaign = {\n        id: `CAMP-${Date.now()}`,\n        ad_plan_id: values.adPlanId,\n        tenant_id: 'T001',\n        product_id: values.productId,\n        sku_id: values.skuId,\n        bid_amount: values.bidAmount,\n        clicks: 0,\n        impressions: 0,\n        spend: 0,\n        sales: 0,\n        conversions: 0,\n        status: 'RUNNING',\n        created_at: new Date().toISOString(),\n        updated_at: new Date().toISOString(),\n      };\n\n      setCampaigns([...campaigns, newCampaign]);\n      setModalVisible(false);\n      form.resetFields();\n      message.success('Campaign started successfully');\n    } catch (error) {\n      message.error('Failed to start campaign');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handlePauseCampaign = async (campaignId: string) => {\n    setLoading(true);\n    try {\n      setCampaigns(campaigns.map(c => \n        c.id === campaignId \n          ? { ...c, status: 'PAUSED' as CampaignStatus, updated_at: new Date().toISOString() }\n          : c\n      ));\n      message.success('Campaign paused');\n    } catch (error) {\n      message.error('Failed to pause campaign');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleResumeCampaign = async (campaignId: string) => {\n    setLoading(true);\n    try {\n      setCampaigns(campaigns.map(c => \n        c.id === campaignId \n          ? { ...c, status: 'RUNNING' as CampaignStatus, updated_at: new Date().toISOString() }\n          : c\n      ));\n      message.success('Campaign resumed');\n    } catch (error) {\n      message.error('Failed to resume campaign');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const openDetailModal = (campaign: AdCampaign) => {\n    setSelectedCampaign(campaign);\n    setDetailModalVisible(true);\n  };\n\n  const getAdPlanName = (adPlanId: string) => {\n    const plan = adPlans.find(p => p.id === adPlanId);\n    return plan ? plan.name : adPlanId;\n  };\n\n  const calculateCTR = (clicks: number, impressions: number) => {\n    if (impressions === 0) return 0;\n    return ((clicks / impressions) * 100).toFixed(2);\n  };\n\n  const calculateCPC = (spend: number, clicks: number) => {\n    if (clicks === 0) return 0;\n    return (spend / clicks).toFixed(2);\n  };\n\n  const calculateROAS = (sales: number, spend: number) => {\n    if (spend === 0) return 0;\n    return (sales / spend).toFixed(2);\n  };\n\n  const columns: ColumnsType<AdCampaign> = [\n    {\n      title: 'Campaign ID',\n      dataIndex: 'id',\n      key: 'id',\n      width: 120,\n      render: (id: string) => <code>{id}</code>,\n    },\n    {\n      title: 'Ad Plan',\n      dataIndex: 'ad_plan_id',\n      key: 'ad_plan_id',\n      width: 180,\n      render: (adPlanId: string) => getAdPlanName(adPlanId),\n    },\n    {\n      title: 'Product',\n      dataIndex: 'product_id',\n      key: 'product_id',\n      width: 150,\n      render: (productId?: string) => {\n        const product = MOCK_PRODUCTS.find(p => p.id === productId);\n        return product ? product.name : productId || '-';\n      },\n    },\n    {\n      title: 'Bid Amount',\n      dataIndex: 'bid_amount',\n      key: 'bid_amount',\n      width: 100,\n      render: (bid: number) => <strong>${bid.toFixed(2)}</strong>,\n    },\n    {\n      title: 'Impressions',\n      dataIndex: 'impressions',\n      key: 'impressions',\n      width: 100,\n      render: (impressions: number) => impressions.toLocaleString(),\n    },\n    {\n      title: 'Clicks',\n      dataIndex: 'clicks',\n      key: 'clicks',\n      width: 80,\n      render: (clicks: number) => clicks.toLocaleString(),\n    },\n    {\n      title: 'CTR',\n      key: 'ctr',\n      width: 80,\n      render: (_, record) => (\n        <span>{calculateCTR(record.clicks, record.impressions)}%</span>\n      ),\n    },\n    {\n      title: 'Spend',\n      dataIndex: 'spend',\n      key: 'spend',\n      width: 100,\n      render: (spend: number) => (\n        <span style={{ color: '#ff4d4f' }}>${spend.toFixed(2)}</span>\n      ),\n    },\n    {\n      title: 'Sales',\n      dataIndex: 'sales',\n      key: 'sales',\n      width: 100,\n      render: (sales: number) => (\n        <span style={{ color: '#52c41a' }}>${sales.toFixed(2)}</span>\n      ),\n    },\n    {\n      title: 'ROAS',\n      key: 'roas',\n      width: 80,\n      render: (_, record) => {\n        const roas = parseFloat(calculateROAS(record.sales, record.spend));\n        const color = roas >= 3 ? '#52c41a' : roas >= 2 ? '#faad14' : '#ff4d4f';\n        return <span style={{ color }}>{roas.toFixed(2)}x</span>;\n      },\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 100,\n      render: (status: CampaignStatus) => (\n        <Tag color={CAMPAIGN_STATUS_COLORS[status]} icon={CAMPAIGN_STATUS_ICONS[status]}>\n          {status}\n        </Tag>\n      ),\n    },\n    {\n      title: 'Actions',\n      key: 'actions',\n      width: 150,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space size=\"small\">\n          <Tooltip title=\"View Details\">\n            <Button \n              type=\"link\" \n              size=\"small\" \n              icon={<EyeOutlined />}\n              onClick={() => openDetailModal(record)}\n            />\n          </Tooltip>\n          {record.status === 'RUNNING' && (\n            <Tooltip title=\"Pause\">\n              <Button \n                type=\"link\" \n                size=\"small\" \n                icon={<PauseCircleOutlined />}\n                onClick={() => handlePauseCampaign(record.id)}\n              />\n            </Tooltip>\n          )}\n          {record.status === 'PAUSED' && (\n            <Tooltip title=\"Resume\">\n              <Button \n                type=\"link\" \n                size=\"small\" \n                icon={<PlayCircleOutlined />}\n                onClick={() => handleResumeCampaign(record.id)}\n              />\n            </Tooltip>\n          )}\n        </Space>\n      ),\n    },\n  ];\n\n  const totalSpend = campaigns.reduce((sum, c) => sum + c.spend, 0);\n  const totalSales = campaigns.reduce((sum, c) => sum + c.sales, 0);\n  const totalClicks = campaigns.reduce((sum, c) => sum + c.clicks, 0);\n  const totalImpressions = campaigns.reduce((sum, c) => sum + c.impressions, 0);\n  const runningCampaigns = campaigns.filter(c => c.status === 'RUNNING').length;\n\n  return (\n    <div className=\"ad-delivery-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Running Campaigns\"\n              value={runningCampaigns}\n              prefix={<ThunderboltOutlined style={{ color: '#1890ff' }} />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Spend\"\n              value={totalSpend}\n              precision={2}\n              prefix={<DollarOutlined style={{ color: '#ff4d4f' }} />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Sales\"\n              value={totalSales}\n              precision={2}\n              prefix={<DollarOutlined style={{ color: '#52c41a' }} />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Overall ROAS\"\n              value={totalSpend > 0 ? (totalSales / totalSpend).toFixed(2) : 0}\n              suffix=\"x\"\n              valueStyle={{ \n                color: totalSpend > 0 && totalSales / totalSpend >= 3 ? '#52c41a' : '#faad14' \n              }}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      {runningCampaigns > 0 && (\n        <Alert\n          message={`${runningCampaigns} campaign(s) currently running`}\n          description={`Total impressions: ${totalImpressions.toLocaleString()} | Total clicks: ${totalClicks.toLocaleString()} | CTR: ${calculateCTR(totalClicks, totalImpressions)}%`}\n          type=\"info\"\n          showIcon\n          icon={<RocketOutlined />}\n          style={{ marginBottom: 16 }}\n        />\n      )}\n\n      <Card \n        title=\"Ad Campaign Management\"\n        extra={\n          <Space>\n            <Select\n              placeholder=\"Filter by Ad Plan\"\n              style={{ width: 200 }}\n              allowClear\n              onChange={(value) => setSelectedAdPlanId(value)}\n            >\n              {adPlans.filter(p => p.status === 'ACTIVE').map(plan => (\n                <Option key={plan.id} value={plan.id}>{plan.name}</Option>\n              ))}\n            </Select>\n            <Button \n              type=\"primary\" \n              icon={<RocketOutlined />} \n              onClick={() => setModalVisible(true)}\n            >\n              Launch Campaign\n            </Button>\n          </Space>\n        }\n      >\n        <Table\n          columns={columns}\n          dataSource={selectedAdPlanId \n            ? campaigns.filter(c => c.ad_plan_id === selectedAdPlanId)\n            : campaigns\n          }\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1400 }}\n          pagination={{\n            pageSize: 10,\n            showSizeChanger: true,\n            showTotal: (total) => `Total ${total} campaigns`,\n          }}\n        />\n      </Card>\n\n      <Modal\n        title=\"Launch New Campaign\"\n        open={modalVisible}\n        onCancel={() => {\n          setModalVisible(false);\n          form.resetFields();\n        }}\n        footer={null}\n        width={500}\n      >\n        <Form\n          form={form}\n          layout=\"vertical\"\n          onFinish={handleExecuteCampaign}\n        >\n          <Form.Item\n            name=\"adPlanId\"\n            label=\"Ad Plan\"\n            rules={[{ required: true, message: 'Please select an ad plan' }]}\n          >\n            <Select placeholder=\"Select Ad Plan\">\n              {adPlans.filter(p => p.status === 'ACTIVE').map(plan => (\n                <Option key={plan.id} value={plan.id}>\n                  {plan.name} ({plan.platform})\n                </Option>\n              ))}\n            </Select>\n          </Form.Item>\n          <Form.Item\n            name=\"productId\"\n            label=\"Product\"\n          >\n            <Select placeholder=\"Select Product (Optional)\" allowClear>\n              {MOCK_PRODUCTS.map(product => (\n                <Option key={product.id} value={product.id}>\n                  {product.name} ({product.sku})\n                </Option>\n              ))}\n            </Select>\n          </Form.Item>\n          <Form.Item\n            name=\"bidAmount\"\n            label=\"Bid Amount ($)\"\n            rules={[{ required: true, message: 'Please enter bid amount' }]}\n          >\n            <InputNumber\n              min={0.01}\n              precision={2}\n              step={0.1}\n              style={{ width: '100%' }}\n              placeholder=\"Enter bid amount\"\n            />\n          </Form.Item>\n          <Form.Item>\n            <Space>\n              <Button type=\"primary\" htmlType=\"submit\" loading={loading} icon={<RocketOutlined />}>\n                Launch Campaign\n              </Button>\n              <Button onClick={() => {\n                setModalVisible(false);\n                form.resetFields();\n              }}>\n                Cancel\n              </Button>\n            </Space>\n          </Form.Item>\n        </Form>\n      </Modal>\n\n      <Modal\n        title=\"Campaign Details\"\n        open={detailModalVisible}\n        onCancel={() => {\n          setDetailModalVisible(false);\n          setSelectedCampaign(null);\n        }}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>\n            Close\n          </Button>,\n        ]}\n        width={700}\n      >\n        {selectedCampaign && (\n          <div>\n            <Descriptions bordered column={2}>\n              <Descriptions.Item label=\"Campaign ID\">\n                <code>{selectedCampaign.id}</code>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Status\">\n                <Tag color={CAMPAIGN_STATUS_COLORS[selectedCampaign.status]} icon={CAMPAIGN_STATUS_ICONS[selectedCampaign.status]}>\n                  {selectedCampaign.status}\n                </Tag>\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Ad Plan\">{getAdPlanName(selectedCampaign.ad_plan_id)}</Descriptions.Item>\n              <Descriptions.Item label=\"Bid Amount\">${selectedCampaign.bid_amount.toFixed(2)}</Descriptions.Item>\n              <Descriptions.Item label=\"Product\">\n                {MOCK_PRODUCTS.find(p => p.id === selectedCampaign.product_id)?.name || selectedCampaign.product_id || '-'}\n              </Descriptions.Item>\n              <Descriptions.Item label=\"SKU\">{selectedCampaign.sku_id || '-'}</Descriptions.Item>\n            </Descriptions>\n\n            <Divider>Performance Metrics</Divider>\n\n            <Row gutter={16}>\n              <Col span={6}>\n                <Statistic\n                  title=\"Impressions\"\n                  value={selectedCampaign.impressions}\n                />\n              </Col>\n              <Col span={6}>\n                <Statistic\n                  title=\"Clicks\"\n                  value={selectedCampaign.clicks}\n                />\n              </Col>\n              <Col span={6}>\n                <Statistic\n                  title=\"CTR\"\n                  value={calculateCTR(selectedCampaign.clicks, selectedCampaign.impressions)}\n                  suffix=\"%\"\n                />\n              </Col>\n              <Col span={6}>\n                <Statistic\n                  title=\"CPC\"\n                  value={calculateCPC(selectedCampaign.spend, selectedCampaign.clicks)}\n                  prefix=\"$\"\n                />\n              </Col>\n            </Row>\n            <Row gutter={16} style={{ marginTop: 16 }}>\n              <Col span={6}>\n                <Statistic\n                  title=\"Spend\"\n                  value={selectedCampaign.spend}\n                  precision={2}\n                  prefix=\"$\"\n                  valueStyle={{ color: '#ff4d4f' }}\n                />\n              </Col>\n              <Col span={6}>\n                <Statistic\n                  title=\"Sales\"\n                  value={selectedCampaign.sales}\n                  precision={2}\n                  prefix=\"$\"\n                  valueStyle={{ color: '#52c41a' }}\n                />\n              </Col>\n              <Col span={6}>\n                <Statistic\n                  title=\"Conversions\"\n                  value={selectedCampaign.conversions}\n                />\n              </Col>\n              <Col span={6}>\n                <Statistic\n                  title=\"ROAS\"\n                  value={calculateROAS(selectedCampaign.sales, selectedCampaign.spend)}\n                  suffix=\"x\"\n                  valueStyle={{ \n                    color: parseFloat(calculateROAS(selectedCampaign.sales, selectedCampaign.spend)) >= 3 \n                      ? '#52c41a' \n                      : '#faad14' \n                  }}\n                />\n              </Col>\n            </Row>\n\n            <Divider>Timeline</Divider>\n            <Descriptions column={2}>\n              <Descriptions.Item label=\"Created\">\n                {dayjs(selectedCampaign.created_at).format('YYYY-MM-DD HH:mm:ss')}\n              </Descriptions.Item>\n              <Descriptions.Item label=\"Last Updated\">\n                {dayjs(selectedCampaign.updated_at).format('YYYY-MM-DD HH:mm:ss')}\n              </Descriptions.Item>\n            </Descriptions>\n          </div>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default AdDelivery;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Ad/AdDelivery.tsx"
    },
    "Ad/AdPlanPage": {
      "path": "Ad/AdPlanPage",
      "id": "Ad/AdPlanPage",
      "file": "Ad/AdPlanPage.tsx",
      "absPath": "/Ad/AdPlanPage",
      "__content": "import React, { useState, useEffect } from 'react';\nimport {\n  Card,\n  Table,\n  Button,\n  Space,\n  Modal,\n  Form,\n  Input,\n  InputNumber,\n  Select,\n  DatePicker,\n  Tag,\n  Tooltip,\n  Row,\n  Col,\n  Statistic,\n  message,\n  Popconfirm,\n  Badge,\n} from 'antd';\nimport {\n  PlusOutlined,\n  EditOutlined,\n  DeleteOutlined,\n  PlayCircleOutlined,\n  PauseCircleOutlined,\n  EyeOutlined,\n  DollarOutlined,\n  CalendarOutlined,\n  CheckCircleOutlined,\n  ClockCircleOutlined,\n  WarningOutlined,\n} from '@ant-design/icons';\nimport type { ColumnsType } from 'antd/es/table';\nimport dayjs from 'dayjs';\n\nconst { Option } = Select;\nconst { RangePicker } = DatePicker;\n\ntype AdPlatform = 'AMAZON' | 'EBAY' | 'SHOPEE' | 'TIKTOK';\ntype AdPlanStatus = 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'COMPLETED' | 'PENDING_REVIEW';\n\ninterface AdPlan {\n  id: string;\n  tenant_id: string;\n  shop_id: string;\n  name: string;\n  platform: AdPlatform;\n  budget: number;\n  daily_budget?: number;\n  start_date?: string;\n  end_date?: string;\n  status: AdPlanStatus;\n  target_audience?: string;\n  keywords?: string[];\n  created_at: string;\n  updated_at: string;\n}\n\ninterface CreateAdPlanParams {\n  name: string;\n  platform: AdPlatform;\n  budget: number;\n  dailyBudget?: number;\n  startDate?: string;\n  endDate?: string;\n  targetAudience?: string;\n  keywords?: string[];\n}\n\nconst PLATFORM_COLORS: Record<AdPlatform, string> = {\n  AMAZON: 'orange',\n  EBAY: 'blue',\n  SHOPEE: 'red',\n  TIKTOK: 'cyan',\n};\n\nconst STATUS_COLORS: Record<AdPlanStatus, string> = {\n  DRAFT: 'default',\n  ACTIVE: 'green',\n  PAUSED: 'orange',\n  COMPLETED: 'blue',\n  PENDING_REVIEW: 'gold',\n};\n\nconst STATUS_ICONS: Record<AdPlanStatus, React.ReactNode> = {\n  DRAFT: <ClockCircleOutlined />,\n  ACTIVE: <CheckCircleOutlined />,\n  PAUSED: <PauseCircleOutlined />,\n  COMPLETED: <CheckCircleOutlined />,\n  PENDING_REVIEW: <WarningOutlined />,\n};\n\nconst MOCK_AD_PLANS: AdPlan[] = [\n  {\n    id: 'ADP-001',\n    tenant_id: 'T001',\n    shop_id: 'S001',\n    name: 'Summer Sale Campaign',\n    platform: 'AMAZON',\n    budget: 5000,\n    daily_budget: 200,\n    start_date: '2026-06-01',\n    end_date: '2026-06-30',\n    status: 'ACTIVE',\n    target_audience: 'Electronics enthusiasts',\n    keywords: ['electronics', 'gadgets', 'tech'],\n    created_at: '2026-05-15T10:00:00Z',\n    updated_at: '2026-05-15T10:00:00Z',\n  },\n  {\n    id: 'ADP-002',\n    tenant_id: 'T001',\n    shop_id: 'S001',\n    name: 'New Product Launch',\n    platform: 'SHOPEE',\n    budget: 15000,\n    daily_budget: 500,\n    start_date: '2026-07-01',\n    end_date: '2026-07-31',\n    status: 'PENDING_REVIEW',\n    target_audience: 'Young professionals',\n    keywords: ['lifestyle', 'trending'],\n    created_at: '2026-05-20T14:30:00Z',\n    updated_at: '2026-05-20T14:30:00Z',\n  },\n  {\n    id: 'ADP-003',\n    tenant_id: 'T001',\n    shop_id: 'S002',\n    name: 'Brand Awareness Q3',\n    platform: 'TIKTOK',\n    budget: 8000,\n    daily_budget: 300,\n    start_date: '2026-07-01',\n    end_date: '2026-09-30',\n    status: 'DRAFT',\n    created_at: '2026-05-22T09:15:00Z',\n    updated_at: '2026-05-22T09:15:00Z',\n  },\n];\n\nexport const AdPlanPage: React.FC = () => {\n  const [form] = Form.useForm();\n  const [loading, setLoading] = useState(false);\n  const [adPlans, setAdPlans] = useState<AdPlan[]>(MOCK_AD_PLANS);\n  const [modalVisible, setModalVisible] = useState(false);\n  const [detailModalVisible, setDetailModalVisible] = useState(false);\n  const [selectedPlan, setSelectedPlan] = useState<AdPlan | null>(null);\n  const [editingPlan, setEditingPlan] = useState<AdPlan | null>(null);\n  const [filterStatus, setFilterStatus] = useState<AdPlanStatus | 'all'>('all');\n  const [filterPlatform, setFilterPlatform] = useState<AdPlatform | 'all'>('all');\n\n  useEffect(() => {\n    loadAdPlans();\n  }, []);\n\n  const loadAdPlans = async () => {\n    setLoading(true);\n    try {\n      await new Promise(resolve => setTimeout(resolve, 500));\n      setAdPlans(MOCK_AD_PLANS);\n    } catch (error) {\n      message.error('Failed to load ad plans');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleCreatePlan = async (values: CreateAdPlanParams) => {\n    setLoading(true);\n    try {\n      const newPlan: AdPlan = {\n        id: `ADP-${Date.now()}`,\n        tenant_id: 'T001',\n        shop_id: 'S001',\n        name: values.name,\n        platform: values.platform,\n        budget: values.budget,\n        daily_budget: values.dailyBudget,\n        start_date: values.startDate,\n        end_date: values.endDate,\n        status: values.budget >= 10000 ? 'PENDING_REVIEW' : 'DRAFT',\n        target_audience: values.targetAudience,\n        keywords: values.keywords?.filter(k => k.trim()),\n        created_at: new Date().toISOString(),\n        updated_at: new Date().toISOString(),\n      };\n\n      setAdPlans([...adPlans, newPlan]);\n      setModalVisible(false);\n      form.resetFields();\n      message.success('Ad plan created successfully');\n      \n      if (newPlan.status === 'PENDING_REVIEW') {\n        message.warning('Budget exceeds $10,000, requires manual review');\n      }\n    } catch (error) {\n      message.error('Failed to create ad plan');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleUpdateStatus = async (planId: string, newStatus: AdPlanStatus) => {\n    setLoading(true);\n    try {\n      setAdPlans(adPlans.map(plan => \n        plan.id === planId \n          ? { ...plan, status: newStatus, updated_at: new Date().toISOString() }\n          : plan\n      ));\n      message.success(`Ad plan status updated to ${newStatus}`);\n    } catch (error) {\n      message.error('Failed to update status');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const handleDeletePlan = async (planId: string) => {\n    setLoading(true);\n    try {\n      setAdPlans(adPlans.filter(plan => plan.id !== planId));\n      message.success('Ad plan deleted successfully');\n    } catch (error) {\n      message.error('Failed to delete ad plan');\n    } finally {\n      setLoading(false);\n    }\n  };\n\n  const openCreateModal = () => {\n    setEditingPlan(null);\n    form.resetFields();\n    setModalVisible(true);\n  };\n\n  const openEditModal = (plan: AdPlan) => {\n    setEditingPlan(plan);\n    form.setFieldsValue({\n      name: plan.name,\n      platform: plan.platform,\n      budget: plan.budget,\n      dailyBudget: plan.daily_budget,\n      targetAudience: plan.target_audience,\n      keywords: plan.keywords,\n    });\n    setModalVisible(true);\n  };\n\n  const openDetailModal = (plan: AdPlan) => {\n    setSelectedPlan(plan);\n    setDetailModalVisible(true);\n  };\n\n  const filteredPlans = adPlans.filter(plan => {\n    if (filterStatus !== 'all' && plan.status !== filterStatus) return false;\n    if (filterPlatform !== 'all' && plan.platform !== filterPlatform) return false;\n    return true;\n  });\n\n  const columns: ColumnsType<AdPlan> = [\n    {\n      title: 'Plan ID',\n      dataIndex: 'id',\n      key: 'id',\n      width: 120,\n      render: (id: string) => <code>{id}</code>,\n    },\n    {\n      title: 'Name',\n      dataIndex: 'name',\n      key: 'name',\n      width: 200,\n      ellipsis: true,\n    },\n    {\n      title: 'Platform',\n      dataIndex: 'platform',\n      key: 'platform',\n      width: 100,\n      render: (platform: AdPlatform) => (\n        <Tag color={PLATFORM_COLORS[platform]}>{platform}</Tag>\n      ),\n    },\n    {\n      title: 'Budget',\n      dataIndex: 'budget',\n      key: 'budget',\n      width: 120,\n      render: (budget: number) => (\n        <strong style={{ color: '#1890ff' }}>${budget.toLocaleString()}</strong>\n      ),\n    },\n    {\n      title: 'Daily Budget',\n      dataIndex: 'daily_budget',\n      key: 'daily_budget',\n      width: 120,\n      render: (budget?: number) => budget ? `$${budget.toLocaleString()}` : '-',\n    },\n    {\n      title: 'Duration',\n      key: 'duration',\n      width: 180,\n      render: (_, record) => (\n        <Space>\n          <CalendarOutlined />\n          <span>\n            {record.start_date ? dayjs(record.start_date).format('YYYY-MM-DD') : '-'}\n            {' ~ '}\n            {record.end_date ? dayjs(record.end_date).format('YYYY-MM-DD') : '-'}\n          </span>\n        </Space>\n      ),\n    },\n    {\n      title: 'Status',\n      dataIndex: 'status',\n      key: 'status',\n      width: 130,\n      render: (status: AdPlanStatus) => (\n        <Tag color={STATUS_COLORS[status]} icon={STATUS_ICONS[status]}>\n          {status.replace('_', ' ')}\n        </Tag>\n      ),\n    },\n    {\n      title: 'Actions',\n      key: 'actions',\n      width: 200,\n      fixed: 'right',\n      render: (_, record) => (\n        <Space size=\"small\">\n          <Tooltip title=\"View Details\">\n            <Button \n              type=\"link\" \n              size=\"small\" \n              icon={<EyeOutlined />}\n              onClick={() => openDetailModal(record)}\n            />\n          </Tooltip>\n          {record.status === 'DRAFT' && (\n            <Tooltip title=\"Activate\">\n              <Button \n                type=\"link\" \n                size=\"small\" \n                icon={<PlayCircleOutlined />}\n                onClick={() => handleUpdateStatus(record.id, 'ACTIVE')}\n              />\n            </Tooltip>\n          )}\n          {record.status === 'ACTIVE' && (\n            <Tooltip title=\"Pause\">\n              <Button \n                type=\"link\" \n                size=\"small\" \n                icon={<PauseCircleOutlined />}\n                onClick={() => handleUpdateStatus(record.id, 'PAUSED')}\n              />\n            </Tooltip>\n          )}\n          {record.status === 'PAUSED' && (\n            <Tooltip title=\"Resume\">\n              <Button \n                type=\"link\" \n                size=\"small\" \n                icon={<PlayCircleOutlined />}\n                onClick={() => handleUpdateStatus(record.id, 'ACTIVE')}\n              />\n            </Tooltip>\n          )}\n          {record.status === 'PENDING_REVIEW' && (\n            <Tooltip title=\"Approve\">\n              <Button \n                type=\"link\" \n                size=\"small\" \n                style={{ color: '#52c41a' }}\n                onClick={() => handleUpdateStatus(record.id, 'ACTIVE')}\n              >\n                Approve\n              </Button>\n            </Tooltip>\n          )}\n          <Tooltip title=\"Edit\">\n            <Button \n              type=\"link\" \n              size=\"small\" \n              icon={<EditOutlined />}\n              onClick={() => openEditModal(record)}\n              disabled={record.status === 'ACTIVE'}\n            />\n          </Tooltip>\n          <Popconfirm\n            title=\"Delete this ad plan?\"\n            onConfirm={() => handleDeletePlan(record.id)}\n            okText=\"Yes\"\n            cancelText=\"No\"\n          >\n            <Tooltip title=\"Delete\">\n              <Button \n                type=\"link\" \n                size=\"small\" \n                danger \n                icon={<DeleteOutlined />}\n                disabled={record.status === 'ACTIVE'}\n              />\n            </Tooltip>\n          </Popconfirm>\n        </Space>\n      ),\n    },\n  ];\n\n  const totalBudget = adPlans.reduce((sum, plan) => sum + plan.budget, 0);\n  const activePlans = adPlans.filter(p => p.status === 'ACTIVE').length;\n  const pendingReview = adPlans.filter(p => p.status === 'PENDING_REVIEW').length;\n\n  return (\n    <div className=\"ad-plan-page\">\n      <Row gutter={16} style={{ marginBottom: 24 }}>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Ad Plans\"\n              value={adPlans.length}\n              suffix=\"plans\"\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Total Budget\"\n              value={totalBudget}\n              precision={0}\n              prefix={<DollarOutlined />}\n              valueStyle={{ color: '#1890ff' }}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Active Plans\"\n              value={activePlans}\n              valueStyle={{ color: '#52c41a' }}\n              prefix={<CheckCircleOutlined />}\n            />\n          </Card>\n        </Col>\n        <Col span={6}>\n          <Card>\n            <Statistic\n              title=\"Pending Review\"\n              value={pendingReview}\n              valueStyle={{ color: pendingReview > 0 ? '#faad14' : '#52c41a' }}\n              prefix={<WarningOutlined />}\n            />\n          </Card>\n        </Col>\n      </Row>\n\n      <Card \n        title=\"Ad Plan Management\"\n        extra={\n          <Space>\n            <Select \n              value={filterStatus} \n              onChange={setFilterStatus}\n              style={{ width: 150 }}\n            >\n              <Option value=\"all\">All Status</Option>\n              <Option value=\"DRAFT\">Draft</Option>\n              <Option value=\"ACTIVE\">Active</Option>\n              <Option value=\"PAUSED\">Paused</Option>\n              <Option value=\"PENDING_REVIEW\">Pending Review</Option>\n              <Option value=\"COMPLETED\">Completed</Option>\n            </Select>\n            <Select \n              value={filterPlatform} \n              onChange={setFilterPlatform}\n              style={{ width: 120 }}\n            >\n              <Option value=\"all\">All Platforms</Option>\n              <Option value=\"AMAZON\">Amazon</Option>\n              <Option value=\"EBAY\">eBay</Option>\n              <Option value=\"SHOPEE\">Shopee</Option>\n              <Option value=\"TIKTOK\">TikTok</Option>\n            </Select>\n            <Button type=\"primary\" icon={<PlusOutlined />} onClick={openCreateModal}>\n              Create Plan\n            </Button>\n          </Space>\n        }\n      >\n        <Table\n          columns={columns}\n          dataSource={filteredPlans}\n          rowKey=\"id\"\n          loading={loading}\n          scroll={{ x: 1300 }}\n          pagination={{\n            pageSize: 10,\n            showSizeChanger: true,\n            showTotal: (total) => `Total ${total} plans`,\n          }}\n        />\n      </Card>\n\n      <Modal\n        title={editingPlan ? 'Edit Ad Plan' : 'Create Ad Plan'}\n        open={modalVisible}\n        onCancel={() => {\n          setModalVisible(false);\n          setEditingPlan(null);\n          form.resetFields();\n        }}\n        footer={null}\n        width={600}\n      >\n        <Form\n          form={form}\n          layout=\"vertical\"\n          onFinish={handleCreatePlan}\n        >\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item\n                name=\"name\"\n                label=\"Plan Name\"\n                rules={[{ required: true, message: 'Please enter plan name' }]}\n              >\n                <Input placeholder=\"Enter plan name\" />\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item\n                name=\"platform\"\n                label=\"Platform\"\n                rules={[{ required: true, message: 'Please select platform' }]}\n              >\n                <Select placeholder=\"Select platform\">\n                  <Option value=\"AMAZON\">Amazon</Option>\n                  <Option value=\"EBAY\">eBay</Option>\n                  <Option value=\"SHOPEE\">Shopee</Option>\n                  <Option value=\"TIKTOK\">TikTok</Option>\n                </Select>\n              </Form.Item>\n            </Col>\n          </Row>\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item\n                name=\"budget\"\n                label=\"Total Budget ($)\"\n                rules={[{ required: true, message: 'Please enter budget' }]}\n              >\n                <InputNumber\n                  min={1}\n                  precision={2}\n                  style={{ width: '100%' }}\n                  placeholder=\"Enter total budget\"\n                />\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item\n                name=\"dailyBudget\"\n                label=\"Daily Budget ($)\"\n              >\n                <InputNumber\n                  min={1}\n                  precision={2}\n                  style={{ width: '100%' }}\n                  placeholder=\"Enter daily budget\"\n                />\n              </Form.Item>\n            </Col>\n          </Row>\n          <Row gutter={16}>\n            <Col span={12}>\n              <Form.Item\n                name=\"startDate\"\n                label=\"Start Date\"\n              >\n                <DatePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n            <Col span={12}>\n              <Form.Item\n                name=\"endDate\"\n                label=\"End Date\"\n              >\n                <DatePicker style={{ width: '100%' }} />\n              </Form.Item>\n            </Col>\n          </Row>\n          <Form.Item\n            name=\"targetAudience\"\n            label=\"Target Audience\"\n          >\n            <Input placeholder=\"Enter target audience\" />\n          </Form.Item>\n          <Form.Item\n            name=\"keywords\"\n            label=\"Keywords\"\n          >\n            <Select\n              mode=\"tags\"\n              placeholder=\"Add keywords\"\n              tokenSeparators={[',']}\n            />\n          </Form.Item>\n          <Form.Item>\n            <Space>\n              <Button type=\"primary\" htmlType=\"submit\" loading={loading}>\n                {editingPlan ? 'Update' : 'Create'}\n              </Button>\n              <Button onClick={() => {\n                setModalVisible(false);\n                setEditingPlan(null);\n                form.resetFields();\n              }}>\n                Cancel\n              </Button>\n            </Space>\n          </Form.Item>\n        </Form>\n      </Modal>\n\n      <Modal\n        title=\"Ad Plan Details\"\n        open={detailModalVisible}\n        onCancel={() => {\n          setDetailModalVisible(false);\n          setSelectedPlan(null);\n        }}\n        footer={[\n          <Button key=\"close\" onClick={() => setDetailModalVisible(false)}>\n            Close\n          </Button>,\n        ]}\n        width={700}\n      >\n        {selectedPlan && (\n          <div>\n            <Row gutter={[16, 16]}>\n              <Col span={12}>\n                <Card size=\"small\" title=\"Basic Info\">\n                  <p><strong>Plan ID:</strong> <code>{selectedPlan.id}</code></p>\n                  <p><strong>Name:</strong> {selectedPlan.name}</p>\n                  <p>\n                    <strong>Platform:</strong>{' '}\n                    <Tag color={PLATFORM_COLORS[selectedPlan.platform]}>\n                      {selectedPlan.platform}\n                    </Tag>\n                  </p>\n                  <p>\n                    <strong>Status:</strong>{' '}\n                    <Tag color={STATUS_COLORS[selectedPlan.status]} icon={STATUS_ICONS[selectedPlan.status]}>\n                      {selectedPlan.status.replace('_', ' ')}\n                    </Tag>\n                  </p>\n                </Card>\n              </Col>\n              <Col span={12}>\n                <Card size=\"small\" title=\"Budget & Duration\">\n                  <p><strong>Total Budget:</strong> ${selectedPlan.budget.toLocaleString()}</p>\n                  <p><strong>Daily Budget:</strong> {selectedPlan.daily_budget ? `$${selectedPlan.daily_budget.toLocaleString()}` : '-'}</p>\n                  <p><strong>Start Date:</strong> {selectedPlan.start_date || '-'}</p>\n                  <p><strong>End Date:</strong> {selectedPlan.end_date || '-'}</p>\n                </Card>\n              </Col>\n            </Row>\n            {selectedPlan.target_audience && (\n              <Card size=\"small\" title=\"Target Audience\" style={{ marginTop: 16 }}>\n                <p>{selectedPlan.target_audience}</p>\n              </Card>\n            )}\n            {selectedPlan.keywords && selectedPlan.keywords.length > 0 && (\n              <Card size=\"small\" title=\"Keywords\" style={{ marginTop: 16 }}>\n                <Space wrap>\n                  {selectedPlan.keywords.map((keyword, index) => (\n                    <Tag key={index}>{keyword}</Tag>\n                  ))}\n                </Space>\n              </Card>\n            )}\n            <Card size=\"small\" title=\"Timestamps\" style={{ marginTop: 16 }}>\n              <p><strong>Created:</strong> {dayjs(selectedPlan.created_at).format('YYYY-MM-DD HH:mm:ss')}</p>\n              <p><strong>Updated:</strong> {dayjs(selectedPlan.updated_at).format('YYYY-MM-DD HH:mm:ss')}</p>\n            </Card>\n          </div>\n        )}\n      </Modal>\n    </div>\n  );\n};\n\nexport default AdPlanPage;\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Ad/AdPlanPage.tsx"
    },
    "Product/index": {
      "path": "Product",
      "id": "Product/index",
      "file": "Product/index.ts",
      "absPath": "/Product",
      "__content": "export { ProductDetail } from './ProductDetail';\nexport { ProductPublishForm } from './ProductPublishForm';\nexport { MaterialUpload } from './MaterialUpload';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Product/index.ts"
    },
    "ABTest/index": {
      "path": "ABTest",
      "id": "ABTest/index",
      "file": "ABTest/index.ts",
      "absPath": "/ABTest",
      "__content": "export { ABTestConfigPage } from './ABTestConfig';\nexport { ABTestResultsPage } from './ABTestResults';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/ABTest/index.ts"
    },
    "Orders/index": {
      "path": "Orders",
      "id": "Orders/index",
      "file": "Orders/index.ts",
      "absPath": "/Orders",
      "__content": "export { OrderList } from './OrderList';\nexport { OrderDetail } from './OrderDetail';\nexport { OrderAggregation } from './OrderAggregation';\nexport { ExceptionOrder } from './ExceptionOrder';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Orders/index.ts"
    },
    "Auth/index": {
      "path": "Auth",
      "id": "Auth/index",
      "file": "Auth/index.ts",
      "absPath": "/Auth",
      "__content": "export { LoginPage } from './LoginPage';\nexport { RegisterPage } from './RegisterPage';\nexport { ResetPasswordPage } from './ResetPasswordPage';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Auth/index.ts"
    },
    "B2B/index": {
      "path": "B2B",
      "id": "B2B/index",
      "file": "B2B/index.ts",
      "absPath": "/B2B",
      "__content": "export { EnterpriseQuote } from './EnterpriseQuote';\nexport { BatchOrder } from './BatchOrder';\nexport { ContractManage } from './ContractManage';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/B2B/index.ts"
    },
    "Ad/index": {
      "path": "Ad",
      "id": "Ad/index",
      "file": "Ad/index.ts",
      "absPath": "/Ad",
      "__content": "export { AdPlanPage } from './AdPlanPage';\nexport { AdDelivery } from './AdDelivery';\nexport { ROIAnalysis } from './ROIAnalysis';\n",
      "__isJSFile": true,
      "__absFile": "D:/trae_projects/makemd/makemd/dashboard/src/pages/Ad/index.ts"
    }
  },
  "apiRoutes": {},
  "hasSrcDir": true,
  "npmClient": "cnpm",
  "umi": {
    "version": "4.6.31",
    "name": "Umi",
    "importSource": "umi",
    "cliName": "umi"
  },
  "bundleStatus": {
    "done": false
  },
  "mfsuBundleStatus": {
    "done": false
  },
  "react": {
    "version": "18.3.1",
    "path": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react"
  },
  "react-dom": {
    "version": "18.3.1",
    "path": "D:\\trae_projects\\makemd\\makemd\\dashboard\\node_modules\\react-dom"
  },
  "appJS": null,
  "locale": "zh-CN",
  "globalCSS": [],
  "globalJS": [],
  "overridesCSS": [],
  "bundler": "webpack",
  "git": {
    "originUrl": "https://github.com/Ansonfishing/makemd.git"
  },
  "framework": "react",
  "typescript": {
    "tsVersion": "5.9.3",
    "tslibVersion": "2.8.1"
  },
  "faviconFiles": [],
  "port": 8002,
  "host": "0.0.0.0",
  "ip": "192.168.110.169"
}
