{"version":3,"file":"index-DWnKer9T.mjs","sources":["../node_modules/@antscorp/antsomi-ui/es/components/icons/AddChartIcon.js","../node_modules/es-toolkit/dist/object/mapValues.mjs","../src/hooks/useSize.ts","../src/components/ConversationMessage/hooks/useCMStore.ts","../src/schemas/tiptap.ts","../src/components/CoordinatePicker/CoordinatePicker.tsx","../node_modules/react-error-boundary/dist/react-error-boundary.esm.js","../src/components/ConversationMessage/components/ErrorBoundary/ErrorBoundary.tsx","../src/components/ConversationMessage/components/ChartComposer/constants.ts","../src/components/ConversationMessage/components/ChartComposer/utils.ts","../src/components/ConversationMessage/components/ChartComposer/ChartComposer.tsx","../src/components/ConversationMessage/extensions/NodeViews/BarChart/Extension.tsx","../src/components/ConversationMessage/extensions/NodeViews/DatasourceSelect/Extension.tsx","../src/components/ConversationMessage/extensions/NodeViews/Heatmap/Extension.ts","../src/components/ConversationMessage/extensions/NodeViews/LineChart/Extension.tsx","../src/components/ConversationMessage/extensions/NodeViews/PieChart/Extension.tsx","../src/components/ConversationMessage/extensions/NodeViews/ScatterChart/Extension.tsx","../src/components/ConversationMessage/extensions/NodeViews/ScoreCard/Extension.tsx","../src/components/ConversationMessage/extensions/NodeViews/SunburstChart/Extension.tsx","../src/components/ConversationMessage/extensions/NodeViews/TreemapChart/Extension.tsx","../src/components/ConversationMessage/hocs/ChartNodeViewRenderer.tsx","../src/components/ConversationMessage/extensions/NodeViews/AreaChart/Extension.tsx","../src/components/ConversationMessage/components/Content/Content.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport { useIcon } from './hooks/useIcon';\nexport const AddChartIcon = forwardRef((props, ref) => {\n    const { width, height } = useIcon(props);\n    return (_jsxs(\"svg\", { viewBox: \"0 0 24 24\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", ...props, ref: ref, width: width, height: height, children: [_jsx(\"path\", { d: \"M13 19V14H16V19H13ZM9 19V10H12V19H9ZM5 19V12H8V19H5Z\", fill: \"currentColor\" }), _jsx(\"path\", { d: \"M14 10V8H12V6H14V4H16V6H18V8H16V10H14Z\", fill: \"#005EB8\" })] }));\n});\n","function mapValues(object, getNewValue) {\n    const result = {};\n    const keys = Object.keys(object);\n    for (let i = 0; i < keys.length; i++) {\n        const key = keys[i];\n        const value = object[key];\n        result[key] = getNewValue(value, key, object);\n    }\n    return result;\n}\n\nexport { mapValues };\n","import useResizeObserver from '@react-hook/resize-observer';\nimport React from 'react';\nimport { useDebounce } from 'use-debounce';\n\nexport const useSize = (\n\ttarget: React.RefObject<HTMLElement>,\n\topts?: {\n\t\tdelay: number;\n\t\tenabled?: boolean;\n\t},\n) => {\n\tconst { delay = 0, enabled = true } = opts || {};\n\n\tconst [size, setSize] = useDebounce<DOMRect | undefined>(undefined, delay);\n\n\tReact.useLayoutEffect(() => {\n\t\tif (!(target.current && enabled)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetSize(target.current.getBoundingClientRect());\n\t}, [target, setSize, enabled]);\n\n\t// Where the magic happens\n\tuseResizeObserver(target, (entry) => setSize(entry.contentRect));\n\n\treturn size;\n};\n","import { useContext } from 'react';\nimport { useStore } from 'zustand';\nimport { ConversationMessageContext } from '../provider';\nimport type { ConversationMessageStore } from '../types';\n\nexport const useCMStore = <T>(selector: (store: ConversationMessageStore) => T) => {\n\tconst storeContext = useContext(ConversationMessageContext);\n\n\tif (!storeContext) {\n\t\tthrow new Error('useCMStore must be used within ConversationMessageProvider');\n\t}\n\n\treturn useStore(storeContext, selector);\n};\n","import { isEmpty } from 'es-toolkit/compat';\nimport { z } from 'zod';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\n\nexport const BaseNodeViewAttrsSchema = z.object({\n\ttitle: z.coerce.string().optional(),\n});\n\nexport const ListFieldAttr = z.coerce.string().transform((attrValue) => {\n\treturn attrValue.split(',').filter((v) => !isEmpty(v));\n});\n\nexport const PieChartAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.piechart),\n\tdimension: ListFieldAttr,\n\tmetric: ListFieldAttr,\n\tdateRange: ListFieldAttr,\n}).transform((v) => {\n\tconst { dateRange, ...rest } = v;\n\n\treturn { ...rest, dateRangeDimension: dateRange };\n});\n\nexport const BarChartAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.barchart),\n\tdimension: ListFieldAttr,\n\tmetric: ListFieldAttr,\n\tdateRange: ListFieldAttr,\n}).transform((v) => {\n\tconst { dateRange, ...rest } = v;\n\n\treturn { ...rest, dateRangeDimension: dateRange };\n});\n\nexport const LineChartAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.linechart),\n\tdimension: ListFieldAttr,\n\tmetric: ListFieldAttr,\n\tdateRange: ListFieldAttr,\n}).transform((v) => {\n\tconst { dateRange, ...rest } = v;\n\n\treturn { ...rest, timeDimension: dateRange };\n});\n\nexport const AreaChartAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.areachart),\n\tdimension: ListFieldAttr,\n\tmetric: ListFieldAttr,\n\tdateRange: ListFieldAttr,\n\ttimeRange: ListFieldAttr,\n}).transform((v) => {\n\tconst { timeRange, dateRange, ...rest } = v;\n\n\treturn { ...rest, timeDimension: timeRange, dateRangeDimension: dateRange };\n});\n\nexport const ScoreCardAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.scorecard),\n\tmetric: ListFieldAttr,\n\tdateRange: ListFieldAttr,\n}).transform((v) => {\n\tconst { dateRange, ...rest } = v;\n\n\treturn { ...rest, dimension: [], dateRangeDimension: dateRange };\n});\n\nexport const TreemapAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.treemap),\n\tdimension: ListFieldAttr,\n\tmetric: ListFieldAttr,\n\tdateRange: ListFieldAttr,\n}).transform((v) => {\n\tconst { dateRange, ...rest } = v;\n\n\treturn { ...rest, dateRangeDimension: dateRange };\n});\n\nexport const SunBurstChartAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.sunburstchart),\n\tdimension: ListFieldAttr,\n\tmetric: ListFieldAttr,\n\tdateRange: ListFieldAttr,\n}).transform((v) => {\n\tconst { dateRange, ...rest } = v;\n\n\treturn { ...rest, dateRangeDimension: dateRange };\n});\n\nexport const ScatterChartAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.scatterchart),\n\tdimension: ListFieldAttr,\n\tmetricX: ListFieldAttr,\n\tmetricY: ListFieldAttr,\n\tbubleSize: ListFieldAttr,\n\tdateRange: ListFieldAttr,\n}).transform((v) => {\n\tconst { dateRange, ...rest } = v;\n\n\tconst metric: string[] = [];\n\n\treturn { ...rest, dateRangeDimension: dateRange, metric };\n});\n\nexport const HeatmapAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.heatmap),\n\tdimension: ListFieldAttr,\n\tmetric: ListFieldAttr,\n\trowDimension: ListFieldAttr,\n\tcolumnDimension: ListFieldAttr,\n\tdateRange: ListFieldAttr,\n}).transform((v) => {\n\tconst { dateRange, ...rest } = v;\n\n\treturn { ...rest, dateRangeDimension: dateRange };\n});\n\nexport const ChartNodeViewAttrsSchema = z.union([\n\tPieChartAttrsSchema,\n\tBarChartAttrsSchema,\n\tLineChartAttrsSchema,\n\tAreaChartAttrsSchema,\n\tTreemapAttrsSchema,\n\tSunBurstChartAttrsSchema,\n\tScatterChartAttrsSchema,\n\tHeatmapAttrsSchema,\n\tScoreCardAttrsSchema,\n]);\n\nexport const DatasourceSelectAttrsSchema = BaseNodeViewAttrsSchema.extend({\n\tidentifier: z.literal(MESSAGE_NODE_VIEW.identifier.selectDataSource),\n\tdataSourceId: z.coerce.number().nullable(),\n});\n\nexport const NodeViewAttrsSchema = z.union([\n\tDatasourceSelectAttrsSchema,\n\tPieChartAttrsSchema,\n\tBarChartAttrsSchema,\n\tLineChartAttrsSchema,\n\tAreaChartAttrsSchema,\n\tTreemapAttrsSchema,\n\tSunBurstChartAttrsSchema,\n\tScatterChartAttrsSchema,\n\tHeatmapAttrsSchema,\n\tScoreCardAttrsSchema,\n]);\n","import { Button, type ButtonProps, Tooltip } from '@antscorp/antsomi-ui';\nimport { AddChartIcon } from '@antscorp/antsomi-ui/es/components/icons';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { useUnmount } from '@/hooks';\n\ntype CoordinatePickerProps = ButtonProps &\n\tPartial<{\n\t\tonSelectPosition: (\n\t\t\tpos: {\n\t\t\t\tx: number;\n\t\t\t\ty: number;\n\t\t\t},\n\t\t\tdomEvent: MouseEvent,\n\t\t) => void;\n\t\ttooltip: string;\n\t}>;\n\nexport const CoordinatePicker = (props: CoordinatePickerProps) => {\n\tconst { tooltip, onSelectPosition, onClick, children = <AddChartIcon />, ...buttonProps } = props;\n\n\tconst beforeSelecting = useRef<{ cursor?: string }>({\n\t\tcursor: undefined,\n\t});\n\n\tconst [isSelecting, setIsSelecting] = useState<boolean>(false);\n\n\tuseUnmount(() => {\n\t\thandleCleanUp();\n\t});\n\n\tconst handleCleanUp = useCallback(() => {\n\t\tsetIsSelecting(false);\n\n\t\tif (beforeSelecting.current.cursor !== undefined) {\n\t\t\tdocument.body.style.setProperty('cursor', beforeSelecting.current.cursor);\n\t\t\tbeforeSelecting.current.cursor = undefined;\n\t\t}\n\t}, []);\n\n\tconst handleSelect = useCallback(\n\t\t(e: MouseEvent) => {\n\t\t\te.preventDefault();\n\n\t\t\thandleCleanUp();\n\n\t\t\tonSelectPosition?.(\n\t\t\t\t{\n\t\t\t\t\tx: e.clientX,\n\t\t\t\t\ty: e.clientY,\n\t\t\t\t},\n\t\t\t\te,\n\t\t\t);\n\t\t},\n\t\t[onSelectPosition, handleCleanUp],\n\t);\n\n\tconst handleBeforeSelect = useCallback(\n\t\t(e: React.MouseEvent<HTMLElement>) => {\n\t\t\te.stopPropagation();\n\n\t\t\tsetIsSelecting(true);\n\t\t\tbeforeSelecting.current.cursor = document.body.style.cursor;\n\t\t\tdocument.body.style.setProperty('cursor', 'crosshair', 'important');\n\n\t\t\tonClick?.(e);\n\t\t},\n\t\t[onClick],\n\t);\n\n\tuseEffect(() => {\n\t\tif (isSelecting) {\n\t\t\tconst controller = new AbortController();\n\n\t\t\twindow.addEventListener('click', handleSelect, { signal: controller.signal });\n\n\t\t\treturn () => {\n\t\t\t\tcontroller.abort();\n\t\t\t};\n\t\t}\n\t}, [isSelecting, handleSelect]);\n\n\treturn (\n\t\t<Tooltip title={tooltip}>\n\t\t\t<Button {...buttonProps} onClick={handleBeforeSelect}>\n\t\t\t\t{children}\n\t\t\t</Button>\n\t\t</Tooltip>\n\t);\n};\n","'use client';\nimport { createContext, Component, createElement, useContext, useState, useMemo, forwardRef } from 'react';\n\nconst ErrorBoundaryContext = createContext(null);\n\nconst initialState = {\n  didCatch: false,\n  error: null\n};\nclass ErrorBoundary extends Component {\n  constructor(props) {\n    super(props);\n    this.resetErrorBoundary = this.resetErrorBoundary.bind(this);\n    this.state = initialState;\n  }\n  static getDerivedStateFromError(error) {\n    return {\n      didCatch: true,\n      error\n    };\n  }\n  resetErrorBoundary() {\n    const {\n      error\n    } = this.state;\n    if (error !== null) {\n      var _this$props$onReset, _this$props;\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {\n        args,\n        reason: \"imperative-api\"\n      });\n      this.setState(initialState);\n    }\n  }\n  componentDidCatch(error, info) {\n    var _this$props$onError, _this$props2;\n    (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);\n  }\n  componentDidUpdate(prevProps, prevState) {\n    const {\n      didCatch\n    } = this.state;\n    const {\n      resetKeys\n    } = this.props;\n\n    // There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,\n    // we'd end up resetting the error boundary immediately.\n    // This would likely trigger a second error to be thrown.\n    // So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n    if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n      var _this$props$onReset2, _this$props3;\n      (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {\n        next: resetKeys,\n        prev: prevProps.resetKeys,\n        reason: \"keys\"\n      });\n      this.setState(initialState);\n    }\n  }\n  render() {\n    const {\n      children,\n      fallbackRender,\n      FallbackComponent,\n      fallback\n    } = this.props;\n    const {\n      didCatch,\n      error\n    } = this.state;\n    let childToRender = children;\n    if (didCatch) {\n      const props = {\n        error,\n        resetErrorBoundary: this.resetErrorBoundary\n      };\n      if (typeof fallbackRender === \"function\") {\n        childToRender = fallbackRender(props);\n      } else if (FallbackComponent) {\n        childToRender = createElement(FallbackComponent, props);\n      } else if (fallback !== undefined) {\n        childToRender = fallback;\n      } else {\n        throw error;\n      }\n    }\n    return createElement(ErrorBoundaryContext.Provider, {\n      value: {\n        didCatch,\n        error,\n        resetErrorBoundary: this.resetErrorBoundary\n      }\n    }, childToRender);\n  }\n}\nfunction hasArrayChanged() {\n  let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n  let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));\n}\n\nfunction assertErrorBoundaryContext(value) {\n  if (value == null || typeof value.didCatch !== \"boolean\" || typeof value.resetErrorBoundary !== \"function\") {\n    throw new Error(\"ErrorBoundaryContext not found\");\n  }\n}\n\nfunction useErrorBoundary() {\n  const context = useContext(ErrorBoundaryContext);\n  assertErrorBoundaryContext(context);\n  const [state, setState] = useState({\n    error: null,\n    hasError: false\n  });\n  const memoized = useMemo(() => ({\n    resetBoundary: () => {\n      context.resetErrorBoundary();\n      setState({\n        error: null,\n        hasError: false\n      });\n    },\n    showBoundary: error => setState({\n      error,\n      hasError: true\n    })\n  }), [context.resetErrorBoundary]);\n  if (state.hasError) {\n    throw state.error;\n  }\n  return memoized;\n}\n\nfunction withErrorBoundary(component, errorBoundaryProps) {\n  const Wrapped = forwardRef((props, ref) => createElement(ErrorBoundary, errorBoundaryProps, createElement(component, {\n    ...props,\n    ref\n  })));\n\n  // Format for display in DevTools\n  const name = component.displayName || component.name || \"Unknown\";\n  Wrapped.displayName = \"withErrorBoundary(\".concat(name, \")\");\n  return Wrapped;\n}\n\nexport { ErrorBoundary, ErrorBoundaryContext, useErrorBoundary, withErrorBoundary };\n","import { Alert } from '@antscorp/antsomi-ui';\nimport { NodeViewWrapper } from '@tiptap/react';\nimport React from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport styles from './styles.module.css';\n\nexport const NodeViewErrorBoundary = (props: { children: React.ReactNode }) => {\n\treturn (\n\t\t<ErrorBoundary\n\t\t\tfallback={\n\t\t\t\t<NodeViewWrapper className={styles['node-view-wrapper']}>\n\t\t\t\t\t<Alert\n\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\tmessage=\"Node View\"\n\t\t\t\t\t\tdescription={\"Some thing when wrong, can't render this node\"}\n\t\t\t\t\t/>\n\t\t\t\t</NodeViewWrapper>\n\t\t\t}\n\t\t\tonError={(error) => {\n\t\t\t\t// biome-ignore lint/suspicious/noConsole: \"\"\n\t\t\t\tconsole.error(error);\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n","export const ACTION_KEY = {\n\tGetInsight: 'get_insight',\n} as const;\n\nexport const ACTIONS = {\n\t[ACTION_KEY.GetInsight]: {\n\t\tkey: ACTION_KEY.GetInsight,\n\t\tlabel: 'Get Insights',\n\t},\n} as const;\n","import clsx from 'clsx';\nimport type { ChartNodeViewAttrs, ChartNodeViewClasses } from '@/types/tiptap';\nimport styles from './styles.module.css';\n\nexport const getChartWrapperCls = (params: {\n\twrapperClassName?: ChartNodeViewClasses['wrapper'];\n\tattrs?: ChartNodeViewAttrs;\n}) => {\n\tconst { wrapperClassName, attrs } = params;\n\n\tconst baseCls = clsx(styles['chart-wrapper'], attrs && styles[attrs.identifier]);\n\n\tif (typeof wrapperClassName === 'string') {\n\t\treturn clsx(baseCls, wrapperClassName);\n\t}\n\n\tif (attrs && wrapperClassName) {\n\t\treturn clsx(baseCls, wrapperClassName(attrs));\n\t}\n\n\treturn baseCls;\n};\n","import { AddChartIcon, MoreIcon } from '@antscorp/antsomi-ui/es/components/icons';\nimport { NodeViewWrapper } from '@tiptap/react';\nimport { type ReactNode, useCallback, useEffect, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport { CoordinatePicker } from '@/components/CoordinatePicker';\nimport { NodeViewErrorBoundary } from '../ErrorBoundary';\nimport styles from './styles.module.css';\nimport type { ChartComposerProps } from './types';\nimport '@/assets/css/main.css';\nimport { Dropdown } from '@antscorp/antsomi-ui';\nimport clsx from 'clsx';\nimport { useSize } from '@/hooks';\nimport type { ChartFormatedData } from '@/types/tiptap';\nimport { ACTION_KEY, ACTIONS } from './constants';\nimport { getChartWrapperCls } from './utils';\n\ndeclare module 'react' {\n\tinterface CSSProperties {\n\t\t'--chart_identifier'?: string;\n\t}\n}\n\nexport function ChartComposer(props: ChartComposerProps) {\n\tconst { children, options, attrs } = props;\n\n\tconst slotTopRef = useRef<HTMLDivElement>(null);\n\tconst chartWrapperRef = useRef<HTMLDivElement>(null);\n\n\tconst chartWrapperSize = useSize(chartWrapperRef, { delay: 400 });\n\n\tconst { classes, buttonAddChartProps, onGetInsight } = options || {};\n\n\tconst onGetInsightRef = useRef(onGetInsight);\n\n\tuseEffect(() => {\n\t\tonGetInsightRef.current = onGetInsight;\n\t}, [onGetInsight]);\n\n\tconst renderDropdownAction = useCallback(\n\t\t(data: ChartFormatedData) => {\n\t\t\tif (!(slotTopRef.current && attrs)) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn createPortal(\n\t\t\t\t<Dropdown\n\t\t\t\t\tclassName={styles['dropdown-action']}\n\t\t\t\t\tplacement=\"bottomRight\"\n\t\t\t\t\tmenu={{\n\t\t\t\t\t\titems: Object.values(ACTIONS),\n\t\t\t\t\t\tonClick: ({ key }) => {\n\t\t\t\t\t\t\tif (key === ACTION_KEY.GetInsight) {\n\t\t\t\t\t\t\t\tonGetInsightRef.current?.({ attrs, data });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<MoreIcon size={18} />\n\t\t\t\t</Dropdown>,\n\t\t\t\tslotTopRef.current,\n\t\t\t);\n\t\t},\n\t\t[attrs],\n\t);\n\n\tconst renderChildren = useCallback(() => {\n\t\tif (typeof children !== 'function') {\n\t\t\treturn children;\n\t\t}\n\n\t\treturn children({\n\t\t\tsize: chartWrapperSize,\n\t\t\trenderDropdownAction,\n\t\t});\n\t}, [chartWrapperSize, children, renderDropdownAction]);\n\n\tconst renderSlotBottom = useCallback(() => {\n\t\tconst els: ReactNode[] = [];\n\n\t\tif (buttonAddChartProps?.show && attrs) {\n\t\t\tels.push(\n\t\t\t\t<CoordinatePicker\n\t\t\t\t\tkey={'coordinuate-picker'}\n\t\t\t\t\ttooltip={buttonAddChartProps.tooltip}\n\t\t\t\t\tonSelectPosition={(pos, e) => {\n\t\t\t\t\t\tbuttonAddChartProps?.onSelectPosition?.({ pos, attrs, domEvent: e });\n\t\t\t\t\t}}\n\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\tbuttonAddChartProps.onClick?.({ domEvent: e, attrs });\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<AddChartIcon />\n\t\t\t\t</CoordinatePicker>,\n\t\t\t);\n\t\t}\n\n\t\treturn els.length > 0 ? <div className={styles['slot-bottom']}>{els}</div> : null;\n\t}, [attrs, buttonAddChartProps]);\n\n\tif (!attrs) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<NodeViewErrorBoundary>\n\t\t\t<NodeViewWrapper className={styles['chart-composer-root']}>\n\t\t\t\t<div ref={slotTopRef} className={clsx(styles['slot-top'])}>\n\t\t\t\t\t<div\n\t\t\t\t\t\tref={chartWrapperRef}\n\t\t\t\t\t\tclassName={getChartWrapperCls({\n\t\t\t\t\t\t\tattrs,\n\t\t\t\t\t\t\twrapperClassName: classes?.wrapper,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderChildren()}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t{renderSlotBottom()}\n\t\t\t</NodeViewWrapper>\n\t\t</NodeViewErrorBoundary>\n\t);\n}\n","import { mergeAttributes, Node } from '@tiptap/react';\nimport { mapValues } from 'es-toolkit';\nimport { lazy } from 'react';\nimport type { z } from 'zod';\nimport { ChartNodeViewRenderer } from '@/components/ConversationMessage/hocs';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { BarChartAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewOpts } from '@/types/tiptap';\n\nconst BarChartNodeView = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.BarChartNodeView })),\n);\n\nexport const NAME = 'barchart';\n\nexport const BarChartExtension = Node.create<ChartNodeViewOpts>({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddOptions() {\n\t\treturn {\n\t\t\tmessageId: '',\n\t\t\tdataSourceId: 0,\n\t\t};\n\t},\n\taddAttributes() {\n\t\tconst attrs: z.input<typeof BarChartAttrsSchema> = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.barchart,\n\t\t\tdateRange: '',\n\t\t\tmetric: '',\n\t\t\tdimension: '',\n\t\t};\n\n\t\treturn mapValues(attrs, (v) => ({ default: v }));\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t\tgetAttrs: (el) =>\n\t\t\t\t\tel.getAttribute('identifier') === MESSAGE_NODE_VIEW.identifier.barchart && null,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\taddNodeView() {\n\t\treturn ChartNodeViewRenderer(BarChartNodeView);\n\t},\n});\n","import { mergeAttributes, Node, ReactNodeViewRenderer } from '@tiptap/react';\nimport { lazy } from 'react';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { DatasourceSelectAttrs } from '@/types/tiptap';\n\nconst NodeViewComponent = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.NodeViewComponent })),\n);\n\nexport const NAME = 'datasourceSelect';\n\nexport const NodeExtension = Node.create({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddAttributes() {\n\t\tconst attrs: DatasourceSelectAttrs = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.selectDataSource,\n\t\t\tdataSourceId: null,\n\t\t};\n\n\t\treturn attrs;\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\taddNodeView() {\n\t\tconst nodeView = ReactNodeViewRenderer(NodeViewComponent);\n\n\t\treturn nodeView;\n\t},\n});\n","import { mergeAttributes, Node } from '@tiptap/react';\nimport { mapValues } from 'es-toolkit';\nimport { lazy } from 'react';\nimport type { z } from 'zod';\nimport { ChartNodeViewRenderer } from '@/components/ConversationMessage/hocs';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { HeatmapAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewOpts } from '@/types/tiptap';\n\nconst HeatmapNodeView = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.HeatmapNodeView })),\n);\n\nexport const NAME = 'heatmap';\n\nexport const HeatmapExtension = Node.create<ChartNodeViewOpts>({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddOptions() {\n\t\treturn {\n\t\t\tmessageId: '',\n\t\t\tdataSourceId: 0,\n\t\t};\n\t},\n\taddAttributes() {\n\t\tconst attrs: z.input<typeof HeatmapAttrsSchema> = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.heatmap,\n\t\t\tdateRange: '',\n\t\t\tdimension: '',\n\t\t\tmetric: '',\n\t\t\tcolumnDimension: '',\n\t\t\trowDimension: '',\n\t\t};\n\n\t\treturn mapValues(attrs, (v) => ({ default: v }));\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t\tgetAttrs: (el) =>\n\t\t\t\t\tel.getAttribute('identifier') === MESSAGE_NODE_VIEW.identifier.heatmap && null,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\taddNodeView() {\n\t\treturn ChartNodeViewRenderer(HeatmapNodeView);\n\t},\n});\n","import { mergeAttributes, Node } from '@tiptap/react';\nimport { mapValues } from 'es-toolkit';\nimport { lazy } from 'react';\nimport type { z } from 'zod';\nimport { ChartNodeViewRenderer } from '@/components/ConversationMessage/hocs';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { LineChartAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewOpts } from '@/types/tiptap';\n\nconst LineChartNodeView = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.LineChartNodeView })),\n);\n\nexport const NAME = 'linechart';\n\nexport const LineChartExtension = Node.create<ChartNodeViewOpts>({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddOptions() {\n\t\treturn {\n\t\t\tmessageId: '',\n\t\t\tdataSourceId: 0,\n\t\t};\n\t},\n\taddAttributes() {\n\t\tconst attrs: z.input<typeof LineChartAttrsSchema> = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.linechart,\n\t\t\tdateRange: '',\n\t\t\tmetric: '',\n\t\t\tdimension: '',\n\t\t};\n\n\t\treturn mapValues(attrs, (v) => ({ default: v }));\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t\tgetAttrs: (el) =>\n\t\t\t\t\tel.getAttribute('identifier') === MESSAGE_NODE_VIEW.identifier.linechart && null,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\taddNodeView() {\n\t\treturn ChartNodeViewRenderer(LineChartNodeView);\n\t},\n});\n","import { mergeAttributes, Node } from '@tiptap/react';\nimport { mapValues } from 'es-toolkit';\nimport { lazy } from 'react';\nimport type { z } from 'zod';\nimport { ChartNodeViewRenderer } from '@/components/ConversationMessage/hocs';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { PieChartAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewOpts } from '@/types/tiptap';\n\nconst PieChartNodeView = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.PieChartNodeView })),\n);\n\nexport const NAME = 'piechart';\n\nexport const PieChartExtension = Node.create<ChartNodeViewOpts>({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddOptions() {\n\t\treturn {\n\t\t\tmessageId: '',\n\t\t\tdataSourceId: 0,\n\t\t};\n\t},\n\taddAttributes() {\n\t\tconst attrs: z.input<typeof PieChartAttrsSchema> = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.piechart,\n\t\t\tdateRange: '',\n\t\t\tmetric: '',\n\t\t\tdimension: '',\n\t\t};\n\n\t\treturn mapValues(attrs, (v) => ({ default: v }));\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t\tgetAttrs: (el) =>\n\t\t\t\t\tel.getAttribute('identifier') === MESSAGE_NODE_VIEW.identifier.piechart && null,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\taddNodeView() {\n\t\treturn ChartNodeViewRenderer(PieChartNodeView);\n\t},\n});\n","import { mergeAttributes, Node } from '@tiptap/react';\nimport { mapValues } from 'es-toolkit';\nimport { lazy } from 'react';\nimport type { z } from 'zod';\nimport { ChartNodeViewRenderer } from '@/components/ConversationMessage/hocs';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { ScatterChartAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewOpts } from '@/types/tiptap';\n\nconst ScatterChartNodeView = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.ScatterChartNodeView })),\n);\n\nexport const NAME = 'scatterchart';\n\nexport const ScatterChartExtension = Node.create<ChartNodeViewOpts>({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddOptions() {\n\t\treturn {\n\t\t\tmessageId: '',\n\t\t\tdataSourceId: 0,\n\t\t};\n\t},\n\taddAttributes() {\n\t\tconst attrs: z.input<typeof ScatterChartAttrsSchema> = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.scatterchart,\n\t\t\tdateRange: '',\n\t\t\tmetricX: '',\n\t\t\tmetricY: '',\n\t\t\tbubleSize: '',\n\t\t\tdimension: '',\n\t\t};\n\n\t\treturn mapValues(attrs, (v) => ({ default: v }));\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t\tgetAttrs: (el) =>\n\t\t\t\t\tel.getAttribute('identifier') === MESSAGE_NODE_VIEW.identifier.scatterchart && null,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\taddNodeView() {\n\t\treturn ChartNodeViewRenderer(ScatterChartNodeView);\n\t},\n});\n","import { mergeAttributes, Node } from '@tiptap/react';\nimport { mapValues } from 'es-toolkit';\nimport { lazy } from 'react';\nimport type { z } from 'zod';\nimport { ChartNodeViewRenderer } from '@/components/ConversationMessage/hocs';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { ScoreCardAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewOpts } from '@/types/tiptap';\n\nconst ScoreCardNodeView = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.ScoreCardNodeView })),\n);\n\nexport const NAME = 'scorecard';\n\nexport const ScoreCardExtension = Node.create<ChartNodeViewOpts>({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddOptions() {\n\t\treturn {\n\t\t\tmessageId: '',\n\t\t\tdataSourceId: 0,\n\t\t};\n\t},\n\taddAttributes() {\n\t\tconst attrs: z.input<typeof ScoreCardAttrsSchema> = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.scorecard,\n\t\t\tdateRange: '',\n\t\t\tmetric: '',\n\t\t};\n\n\t\treturn mapValues(attrs, (v) => ({ default: v }));\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t\tgetAttrs: (el) =>\n\t\t\t\t\tel.getAttribute('identifier') === MESSAGE_NODE_VIEW.identifier.scorecard && null,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\n\taddNodeView() {\n\t\treturn ChartNodeViewRenderer(ScoreCardNodeView);\n\t},\n});\n","import { mergeAttributes, Node } from '@tiptap/react';\nimport { mapValues } from 'es-toolkit';\nimport { lazy } from 'react';\nimport type { z } from 'zod';\nimport { ChartNodeViewRenderer } from '@/components/ConversationMessage/hocs';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { SunBurstChartAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewOpts } from '@/types/tiptap';\n\nconst SunburstChartNodeView = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.SunburstChartNodeView })),\n);\n\nexport const NAME = 'sunburstchart';\n\nexport const SunBurstChartExtension = Node.create<ChartNodeViewOpts>({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddOptions() {\n\t\treturn {\n\t\t\tmessageId: '',\n\t\t\tdataSourceId: 0,\n\t\t};\n\t},\n\taddAttributes() {\n\t\tconst attrs: z.input<typeof SunBurstChartAttrsSchema> = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.sunburstchart,\n\t\t\tdateRange: '',\n\t\t\tmetric: '',\n\t\t\tdimension: '',\n\t\t};\n\n\t\treturn mapValues(attrs, (v) => ({ default: v }));\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t\tgetAttrs: (el) =>\n\t\t\t\t\tel.getAttribute('identifier') === MESSAGE_NODE_VIEW.identifier.sunburstchart && null,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\taddNodeView() {\n\t\treturn ChartNodeViewRenderer(SunburstChartNodeView);\n\t},\n});\n","import { mergeAttributes, Node } from '@tiptap/react';\nimport { mapValues } from 'es-toolkit';\nimport { lazy } from 'react';\nimport type { z } from 'zod';\nimport { ChartNodeViewRenderer } from '@/components/ConversationMessage/hocs';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { TreemapAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewOpts } from '@/types/tiptap';\n\nconst TreemapNodeView = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.TreemapNodeView })),\n);\n\nexport const NAME = 'treemap';\n\nexport const TreemapExtension = Node.create<ChartNodeViewOpts>({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddOptions() {\n\t\treturn {\n\t\t\tmessageId: '',\n\t\t\tdataSourceId: 0,\n\t\t};\n\t},\n\taddAttributes() {\n\t\tconst attrs: z.input<typeof TreemapAttrsSchema> = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.treemap,\n\t\t\tdateRange: '',\n\t\t\tmetric: '',\n\t\t\tdimension: '',\n\t\t};\n\n\t\treturn mapValues(attrs, (v) => ({ default: v }));\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t\tgetAttrs: (el) =>\n\t\t\t\t\tel.getAttribute('identifier') === MESSAGE_NODE_VIEW.identifier.treemap && null,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\taddNodeView() {\n\t\treturn ChartNodeViewRenderer(TreemapNodeView);\n\t},\n});\n","import { Suspense } from '@antscorp/antsomi-ui';\nimport {\n\ttype NodeViewRenderer,\n\tReactNodeViewRenderer,\n\ttype ReactNodeViewRendererOptions,\n} from '@tiptap/react';\nimport React from 'react';\nimport { useDeepCompareMemo } from 'use-deep-compare';\nimport { ChartNodeViewAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewProps } from '@/types/tiptap';\nimport { ChartComposer } from '../extensions/NodeViews';\n\nexport const ChartNodeViewRenderer = (\n\tComponent: React.ComponentType<ChartNodeViewProps>,\n\toptions?: Partial<ReactNodeViewRendererOptions>,\n): NodeViewRenderer => {\n\treturn ReactNodeViewRenderer((props) => {\n\t\t// biome-ignore lint/correctness/useHookAtTopLevel: \"\"\n\t\tconst parsedAttrs = useDeepCompareMemo(() => {\n\t\t\treturn ChartNodeViewAttrsSchema.safeParse(props.node.attrs);\n\t\t}, [props.node.attrs]);\n\n\t\treturn (\n\t\t\t<ChartComposer\n\t\t\t\tattrs={parsedAttrs.success ? parsedAttrs.data : undefined}\n\t\t\t\toptions={props.extension.options}\n\t\t\t>\n\t\t\t\t{({ size, renderDropdownAction }) => (\n\t\t\t\t\t<Suspense>\n\t\t\t\t\t\t<Component\n\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\tchartWrapperSize={size}\n\t\t\t\t\t\t\trenderDropdownAction={renderDropdownAction}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Suspense>\n\t\t\t\t)}\n\t\t\t</ChartComposer>\n\t\t);\n\t}, options);\n};\n","import { mergeAttributes, Node } from '@tiptap/react';\nimport { mapValues } from 'es-toolkit';\nimport { lazy } from 'react';\nimport type { z } from 'zod';\nimport { ChartNodeViewRenderer } from '@/components/ConversationMessage/hocs';\nimport { MESSAGE_NODE_VIEW } from '@/constants/lib';\nimport type { AreaChartAttrsSchema } from '@/schemas/tiptap';\nimport type { ChartNodeViewOpts } from '@/types/tiptap';\n\nconst AreaChartNodeView = lazy(() =>\n\timport('./Component').then((m) => ({ default: m.AreaChartNodeView })),\n);\n\nexport const NAME = 'areachart';\n\nexport const AreaChartExtension = Node.create<ChartNodeViewOpts>({\n\tname: NAME,\n\tgroup: 'block',\n\tatom: true,\n\taddOptions() {\n\t\treturn {\n\t\t\tmessageId: '',\n\t\t\tdataSourceId: 0,\n\t\t};\n\t},\n\taddAttributes() {\n\t\tconst attrs: z.input<typeof AreaChartAttrsSchema> = {\n\t\t\tidentifier: MESSAGE_NODE_VIEW.identifier.areachart,\n\t\t\tdateRange: '',\n\t\t\tmetric: '',\n\t\t\tdimension: '',\n\t\t\ttimeRange: '',\n\t\t};\n\n\t\treturn mapValues(attrs, (v) => ({ default: v }));\n\t},\n\tparseHTML() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttag: MESSAGE_NODE_VIEW.tag,\n\t\t\t\tgetAttrs: (el) =>\n\t\t\t\t\tel.getAttribute('identifier') === MESSAGE_NODE_VIEW.identifier.areachart && null,\n\t\t\t},\n\t\t];\n\t},\n\trenderHTML({ HTMLAttributes }) {\n\t\treturn [MESSAGE_NODE_VIEW.tag, mergeAttributes(HTMLAttributes)];\n\t},\n\taddNodeView() {\n\t\treturn ChartNodeViewRenderer(AreaChartNodeView);\n\t},\n});\n","import { Suspense } from '@antscorp/antsomi-ui';\nimport clsx from 'clsx';\nimport { lazy, memo, useCallback } from 'react';\nimport { MESSAGE_TYPE } from '@/constants/lib';\nimport { useCMStore } from '../../hooks';\nimport styles from './styles.module.css';\n\nconst RequestDatasouce = lazy(() =>\n\timport('../RequestDatasouce').then((m) => ({ default: m.RequestDatasouce })),\n);\n\nconst TextualContent = lazy(() =>\n\timport('../TextualContent').then((m) => ({ default: m.TextualContent })),\n);\n\nconst SelectedDataSource = lazy(() =>\n\timport('../SelectedDataSource').then((m) => ({ default: m.SelectedDataSource })),\n);\n\nconst HelperContent = lazy(() =>\n\timport('../HelperContent').then((m) => ({ default: m.HelperContent })),\n);\n\ntype ContentProps = {\n\tclassName?: string;\n};\n\nexport const Content = memo((props: ContentProps) => {\n\tconst { className } = props;\n\n\tconst messageContentType = useCMStore((store) => store.message.content.type);\n\n\tconst renderContentEl = useCallback(() => {\n\t\tswitch (messageContentType) {\n\t\t\tcase MESSAGE_TYPE.chart:\n\t\t\tcase MESSAGE_TYPE.text: {\n\t\t\t\treturn (\n\t\t\t\t\t<Suspense>\n\t\t\t\t\t\t<TextualContent />\n\t\t\t\t\t</Suspense>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcase MESSAGE_TYPE.selectDatasource: {\n\t\t\t\treturn (\n\t\t\t\t\t<Suspense>\n\t\t\t\t\t\t<SelectedDataSource />\n\t\t\t\t\t</Suspense>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcase MESSAGE_TYPE.reqDatasource: {\n\t\t\t\treturn (\n\t\t\t\t\t<Suspense>\n\t\t\t\t\t\t<RequestDatasouce />\n\t\t\t\t\t</Suspense>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcase MESSAGE_TYPE.helper: {\n\t\t\t\treturn <HelperContent />;\n\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}, [messageContentType]);\n\n\treturn (\n\t\t<div className={clsx('conver-message-content', styles.content, className)}>\n\t\t\t{renderContentEl()}\n\t\t</div>\n\t);\n});\n"],"names":["AddChartIcon","forwardRef","props","ref","width","height","useIcon","_jsxs","_jsx","mapValues","object","getNewValue","result","keys","key","value","useSize","target","opts","delay","enabled","size","setSize","useDebounce","React","useResizeObserver","entry","useCMStore","selector","storeContext","useContext","ConversationMessageContext","useStore","BaseNodeViewAttrsSchema","z.object","z.coerce.string","ListFieldAttr","attrValue","v","isEmpty","PieChartAttrsSchema","z.literal","MESSAGE_NODE_VIEW","dateRange","rest","BarChartAttrsSchema","LineChartAttrsSchema","AreaChartAttrsSchema","timeRange","ScoreCardAttrsSchema","TreemapAttrsSchema","SunBurstChartAttrsSchema","ScatterChartAttrsSchema","HeatmapAttrsSchema","ChartNodeViewAttrsSchema","z.union","DatasourceSelectAttrsSchema","z.coerce.number","CoordinatePicker","tooltip","onSelectPosition","onClick","children","buttonProps","beforeSelecting","useRef","isSelecting","setIsSelecting","useState","useUnmount","handleCleanUp","useCallback","handleSelect","e","handleBeforeSelect","useEffect","controller","Tooltip","Button","ErrorBoundaryContext","createContext","initialState","ErrorBoundary","Component","error","_this$props$onReset","_this$props","_len","args","_key","info","_this$props$onError","_this$props2","prevProps","prevState","didCatch","resetKeys","hasArrayChanged","_this$props$onReset2","_this$props3","fallbackRender","FallbackComponent","fallback","childToRender","createElement","a","b","item","index","NodeViewErrorBoundary","NodeViewWrapper","styles","Alert","ACTION_KEY","ACTIONS","getChartWrapperCls","params","wrapperClassName","attrs","baseCls","clsx","ChartComposer","options","slotTopRef","chartWrapperRef","chartWrapperSize","classes","buttonAddChartProps","onGetInsight","onGetInsightRef","renderDropdownAction","data","createPortal","Dropdown","MoreIcon","renderChildren","renderSlotBottom","els","pos","BarChartNodeView","lazy","m","NAME","BarChartExtension","Node","el","HTMLAttributes","mergeAttributes","ChartNodeViewRenderer","NodeViewComponent","ReactNodeViewRenderer","HeatmapNodeView","HeatmapExtension","LineChartNodeView","LineChartExtension","PieChartNodeView","PieChartExtension","ScatterChartNodeView","ScatterChartExtension","ScoreCardNodeView","ScoreCardExtension","SunburstChartNodeView","SunBurstChartExtension","TreemapNodeView","TreemapExtension","parsedAttrs","useDeepCompareMemo","Suspense","AreaChartNodeView","AreaChartExtension","RequestDatasouce","TextualContent","SelectedDataSource","HelperContent","Content","memo","className","messageContentType","store","renderContentEl","MESSAGE_TYPE"],"mappings":";;;;;;;;AAGO,MAAMA,IAAeC,GAAW,CAACC,GAAOC,MAAQ;AACnD,QAAM,EAAE,OAAAC,GAAO,QAAAC,MAAWC,GAAQJ,CAAK;AACvC,SAAQK,EAAAA,KAAM,OAAO,EAAE,SAAS,aAAa,MAAM,gBAAgB,OAAO,8BAA8B,GAAGL,GAAO,KAAKC,GAAK,OAAOC,GAAO,QAAQC,GAAQ,UAAU,CAACG,EAAAA,IAAK,QAAQ,EAAE,GAAG,wDAAwD,MAAM,gBAAgB,GAAGA,EAAAA,IAAK,QAAQ,EAAE,GAAG,0CAA0C,MAAM,UAAS,CAAE,CAAC,GAAG;AAC7V,CAAC;ACND,SAASC,EAAUC,GAAQC,GAAa;AACpC,QAAMC,IAAS,CAAA,GACTC,IAAO,OAAO,KAAKH,CAAM;AAC/B,WAAS,IAAI,GAAG,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