{"version":3,"file":"components/Charts/bootstrap.mjs","sources":["../../../src/components/Charts/bootstrap.tsx"],"sourcesContent":["import React from 'react';\nimport { Space } from 'antd';\nimport { SDK } from '@rsdoctor/types';\nimport { TextDrawer } from '../TextDrawer';\n\nimport './loader.scss';\nimport './tooltips.scss';\nimport {\n  CommonChartProps,\n  CommonExecutionEmptyTips,\n  CommonExecutionsChart,\n} from './common';\nimport { ServerAPIProvider } from '../Manifest';\nimport { Summary } from '@rsdoctor/utils/common';\nimport { ChartTypes } from './constants';\n\nexport const BootstrapChartContainer: React.FC<CommonChartProps> = ({\n  summary,\n}) => {\n  const { costs = [] } = summary || {};\n  const target = costs.find(\n    (e) => e.name === Summary.SummaryCostsDataName.Bootstrap,\n  );\n\n  const hooks: string[] = [\n    'environment',\n    'afterEnvironment',\n    'entryOption',\n    'afterPlugins',\n    'afterResolvers',\n    'initialize',\n    'beforeRun',\n    'run',\n    'watchRun',\n    'normalModuleFactory',\n    'contextModuleFactory',\n    'beforeCompile',\n  ];\n\n  if (!target) return null;\n\n  return (\n    <TextDrawer\n      containerProps={{ style: { display: 'inline' } }}\n      drawerProps={{ title: 'Chart of the \"Bootstrap -> BeforeCompile\" stage' }}\n      text={<Space>detail</Space>}\n    >\n      <ServerAPIProvider api={SDK.ServerAPI.API.GetPluginData} body={{ hooks }}>\n        {(res) =>\n          res && res.length ? (\n            <CommonExecutionsChart plugins={res} type={ChartTypes.Bootstrap} />\n          ) : (\n            <CommonExecutionEmptyTips />\n          )\n        }\n      </ServerAPIProvider>\n    </TextDrawer>\n  );\n};\n"],"names":["BootstrapChartContainer","summary","costs","target","e","Summary","hooks","TextDrawer","Space","ServerAPIProvider","SDK","res","CommonExecutionsChart","ChartTypes","CommonExecutionEmptyTips"],"mappings":";;;;;;;;;;;AAgBO,MAAMA,0BAAsD,CAAC,EAClEC,OAAO,EACR;IACC,MAAM,EAAEC,QAAQ,EAAE,EAAE,GAAGD,WAAW,CAAC;IACnC,MAAME,SAASD,MAAM,IAAI,CACvB,CAACE,IAAMA,EAAE,IAAI,KAAKC,QAAQ,oBAAoB,CAAC,SAAS;IAG1D,MAAMC,QAAkB;QACtB;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IAED,IAAI,CAACH,QAAQ,OAAO;IAEpB,OAAO,WAAP,GACE,IAACI,YAAUA;QACT,gBAAgB;YAAE,OAAO;gBAAE,SAAS;YAAS;QAAE;QAC/C,aAAa;YAAE,OAAO;QAAkD;QACxE,oBAAM,IAACC,OAAKA;sBAAC;;kBAEb,kBAACC,mBAAiBA;YAAC,KAAKC,IAAI,SAAS,CAAC,GAAG,CAAC,aAAa;YAAE,MAAM;gBAAEJ;YAAM;sBACpE,CAACK,MACAA,OAAOA,IAAI,MAAM,GAAG,WAAH,GACf,IAACC,uBAAqBA;oBAAC,SAASD;oBAAK,MAAME,WAAW,SAAS;mCAE/D,IAACC,0BAAwBA,CAAAA;;;AAMrC"}