@sim-design/training 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/README.md +481 -15
  2. package/dist/{ArrowLeftOutlined-CiSQq3bL.js → ArrowLeftOutlined-BxA84GXs.js} +1 -1
  3. package/dist/ArrowLeftOutlined-D785XjyB.js +12 -0
  4. package/dist/{AssessmentPlugin-Bx4VrBdV.js → AssessmentPlugin-D_iesmyg.js} +7 -7
  5. package/dist/AssessmentPlugin-zRr-IsdA.js +607 -0
  6. package/dist/CaseAnalysisPlugin-CXuQpkPd.js +2196 -0
  7. package/dist/CaseAnalysisPlugin-DytlXsRD.js +2196 -0
  8. package/dist/CaseDetailContent-DT5nCtRT.js +28613 -0
  9. package/dist/CaseDetailContent-Y7Q430MG.js +28595 -0
  10. package/dist/{CharacterDialoguePanel-Bvdab3qj.js → CharacterDialoguePanel-CdtUl-Sv.js} +178 -139
  11. package/dist/CharacterDialoguePanel-D_4YNFZv.js +815 -0
  12. package/dist/{CheckCircleFilled-Byo8CDfW.js → CheckCircleFilled-CnslIY7j.js} +1 -1
  13. package/dist/CheckCircleFilled-NvZaC2sk.js +12 -0
  14. package/dist/DecisionMakingPlugin-B_KQUFzW.js +1385 -0
  15. package/dist/DecisionMakingPlugin-ILLGek3S.js +1385 -0
  16. package/dist/{DecisionSelectPlugin-DtQ2KV34.js → DecisionSelectPlugin-BGQiHGBK.js} +20 -11
  17. package/dist/DecisionSelectPlugin-Bqmh6XGh.js +872 -0
  18. package/dist/{DecisionShared-Dh9oeQFT.js → DecisionShared-BHq1lEqt.js} +2 -2
  19. package/dist/DecisionShared-Be-zKZLT.js +65 -0
  20. package/dist/DeleteOutlined-BvMjU7m5.js +12 -0
  21. package/dist/DeleteOutlined-Dqy6M2LH.js +12 -0
  22. package/dist/{CustomLayoutRenderer--rnQrqQ2.js → DialogueFormPlugin-BpCeFadt.js} +22724 -21631
  23. package/dist/DialogueFormPlugin-CXlbxX-z.js +123617 -0
  24. package/dist/DialoguePlugin-CO7Nzv0K.js +596 -0
  25. package/dist/DialoguePlugin-DDNdsylz.js +596 -0
  26. package/dist/DocumentReviewPlugin-2CnKQwVG.js +1967 -0
  27. package/dist/DocumentReviewPlugin-qYYrnjvE.js +1967 -0
  28. package/dist/{EyeOutlined-XvOAKlLs.js → EyeOutlined-BrKCNjui.js} +1 -1
  29. package/dist/EyeOutlined-CW0tYV0f.js +12 -0
  30. package/dist/FormFillingPlugin-C3h8ySOZ.js +969 -0
  31. package/dist/FormFillingPlugin-CPmd76Qr.js +969 -0
  32. package/dist/HolderOutlined-CH0tShWu.js +12 -0
  33. package/dist/HolderOutlined-Dm6TBtqf.js +12 -0
  34. package/dist/ModelEditor-BjEbFloQ.js +11753 -0
  35. package/dist/ModelEditor-CwR67DFQ.js +11753 -0
  36. package/dist/{ProcessOperationPlugin-IijngDlX.js → ProcessOperationPlugin-1Lz431aC.js} +12 -12
  37. package/dist/ProcessOperationPlugin-BkmdG3ch.js +88 -0
  38. package/dist/QAPlugin-0C4kpq3J.js +172 -0
  39. package/dist/QAPlugin-UC8uywcg.js +172 -0
  40. package/dist/{ReloadOutlined-Daor2m11.js → ReloadOutlined-BZ92nlYF.js} +1 -1
  41. package/dist/ReloadOutlined-CYoPOwLl.js +12 -0
  42. package/dist/{SettingOutlined-CLEOgXB-.js → SettingOutlined-F466s0Ti.js} +33 -65
  43. package/dist/SettingOutlined-c2hikCfN.js +60 -0
  44. package/dist/StarFilled-Bilmj6UK.js +28 -0
  45. package/dist/StarFilled-CtH30fL0.js +28 -0
  46. package/dist/StrategyLabPlugin-CvO07sXV.js +12445 -0
  47. package/dist/StrategyLabPlugin-DUqZYctQ.js +12445 -0
  48. package/dist/ThunderboltOutlined-BpmoCKdV.js +28 -0
  49. package/dist/ThunderboltOutlined-DDQFi5Cv.js +28 -0
  50. package/dist/TrainingModelContainer-DqCsdC7C.js +11241 -0
  51. package/dist/TrainingModelContainer-yi8W6KFl.js +11241 -0
  52. package/dist/{UndoOutlined-ChUQYUul.js → UndoOutlined-6JZVzmdX.js} +26 -42
  53. package/dist/UndoOutlined-Dw6_9_OL.js +68 -0
  54. package/dist/{WarningFilled-1Rc4hr0C.js → WarningFilled-Cy1tvuQy.js} +1 -1
  55. package/dist/WarningFilled-lkr453eh.js +12 -0
  56. package/dist/{adapters-D1FFZFoA.js → adapters-BbCnXSYo.js} +2 -2
  57. package/dist/{analysisTools-CXyOvSZT.js → analysisTools-Cp5-3DaU.js} +59 -12
  58. package/dist/creator.js +4 -2
  59. package/dist/designTokens-walF_QkZ.js +23 -0
  60. package/dist/images/healthcare/bg.jpg +0 -0
  61. package/dist/{index-CYjdXPgc.js → index-C71iHgSs.js} +2640 -2722
  62. package/dist/{index-XuBVjlmu.js → index-CBvqcbIU.js} +7214 -7643
  63. package/dist/index-D94YNWTb.js +433 -0
  64. package/dist/index-DSYmOXnQ.js +6486 -0
  65. package/dist/index-fP97rKeQ.js +433 -0
  66. package/dist/index.js +8 -6
  67. package/dist/judgement-xTGXlDcn.js +29 -0
  68. package/dist/runtime.js +1 -1
  69. package/dist/sortable.esm-bm_c5vmI.js +3307 -0
  70. package/dist/types.js +1 -1
  71. package/dist/useDialogueLogic-D1lkUKUZ.js +576 -0
  72. package/dist/useDialogueLogic-vOJ9XRNP.js +576 -0
  73. package/dist-types/client/src/admin/CaseDataEditor.d.ts +20 -0
  74. package/dist-types/client/src/admin/CaseEditor.d.ts +19 -0
  75. package/dist-types/client/src/admin/DialogueFormCheckRulesEditor.d.ts +11 -0
  76. package/dist-types/client/src/admin/DialogueFormInitDataEditor.d.ts +31 -0
  77. package/dist-types/client/src/admin/InitDataEditors.d.ts +7 -0
  78. package/dist-types/client/src/admin/ModelEditor.d.ts +11 -0
  79. package/dist-types/client/src/admin/ModelPreview.d.ts +13 -0
  80. package/dist-types/client/src/admin/OptionSelector.d.ts +32 -0
  81. package/dist-types/client/src/admin/StageStepEditor.d.ts +20 -0
  82. package/dist-types/client/src/admin/StepAnswerKeyEditor.d.ts +19 -0
  83. package/dist-types/client/src/admin/StepByStepCreator.d.ts +27 -0
  84. package/dist-types/client/src/admin/components/AbilityMapEditor.d.ts +12 -0
  85. package/dist-types/client/src/admin/components/CasePreview.d.ts +8 -0
  86. package/dist-types/client/src/admin/components/StepAbilitySelector.d.ts +9 -0
  87. package/dist-types/client/src/admin/constants/creatorConstants.d.ts +39 -0
  88. package/dist-types/client/src/admin/editors/CaseAnalysisEditor.d.ts +11 -0
  89. package/dist-types/client/src/admin/editors/DecisionMakingEditor.d.ts +7 -0
  90. package/dist-types/client/src/admin/editors/DialogueEditor.d.ts +12 -0
  91. package/dist-types/client/src/admin/editors/DocumentReviewEditor.d.ts +7 -0
  92. package/dist-types/client/src/admin/editors/DocumentReviewRuntimeRulesEditor.d.ts +15 -0
  93. package/dist-types/client/src/admin/editors/FormFillingEditor.d.ts +33 -0
  94. package/dist-types/client/src/admin/editors/ModelUIConfigEditor.d.ts +5 -0
  95. package/dist-types/client/src/admin/editors/QAEditor.d.ts +6 -0
  96. package/dist-types/client/src/admin/editors/RouterEditors.d.ts +18 -0
  97. package/dist-types/client/src/admin/editors/StepBriefingEditor.d.ts +14 -0
  98. package/dist-types/client/src/admin/editors/StrategyLabEditor.d.ts +24 -0
  99. package/dist-types/client/src/admin/editors/decisionEditorParts.d.ts +18 -0
  100. package/dist-types/client/src/admin/editors/index.d.ts +8 -0
  101. package/dist-types/client/src/admin/editors/shared.d.ts +17 -0
  102. package/dist-types/client/src/admin/hooks/useStep1Intent.d.ts +16 -0
  103. package/dist-types/client/src/admin/hooks/useStep2Outline.d.ts +41 -0
  104. package/dist-types/client/src/admin/hooks/useStep3Details.d.ts +123 -0
  105. package/dist-types/client/src/admin/hooks/useStep4Cases.d.ts +48 -0
  106. package/dist-types/client/src/admin/hooks/useStep5Validation.d.ts +16 -0
  107. package/dist-types/client/src/admin/landingValidation.d.ts +74 -0
  108. package/dist-types/client/src/admin/schemaFieldUtils.d.ts +55 -0
  109. package/dist-types/client/src/admin/services.d.ts +461 -0
  110. package/dist-types/client/src/admin/shared-editors.d.ts +31 -0
  111. package/dist-types/client/src/admin/types/creatorArtifacts.d.ts +140 -0
  112. package/dist-types/client/src/components/AbilityMapView.d.ts +15 -0
  113. package/dist-types/client/src/components/CaseDetail/CaseDetailContent.d.ts +12 -0
  114. package/dist-types/client/src/components/ConversationalDataCollector/IntentConfirmPanel.d.ts +20 -0
  115. package/dist-types/client/src/components/ConversationalDataCollector/index.d.ts +7 -0
  116. package/dist-types/client/src/components/ConversationalDataCollector/intentState.d.ts +24 -0
  117. package/dist-types/client/src/components/ConversationalDataCollector/types.d.ts +95 -0
  118. package/dist-types/client/src/components/ConversationalDataCollector/utils.d.ts +62 -0
  119. package/dist-types/client/src/components/CustomLayoutRenderer.d.ts +8 -0
  120. package/dist-types/client/src/components/MarkdownRenderer.d.ts +15 -0
  121. package/dist-types/client/src/components/StrategyLabScene/VisualInputComponents.d.ts +85 -0
  122. package/dist-types/client/src/components/StrategyLabScene/components/AdversarialView.d.ts +18 -0
  123. package/dist-types/client/src/components/StrategyLabScene/components/BottomBar.d.ts +22 -0
  124. package/dist-types/client/src/components/StrategyLabScene/components/CharacterCard.d.ts +14 -0
  125. package/dist-types/client/src/components/StrategyLabScene/components/CharacterDialoguePanel.d.ts +32 -0
  126. package/dist-types/client/src/components/StrategyLabScene/components/CollaborativeView.d.ts +20 -0
  127. package/dist-types/client/src/components/StrategyLabScene/components/ComparisonView.d.ts +16 -0
  128. package/dist-types/client/src/components/StrategyLabScene/components/DecisionInput.d.ts +27 -0
  129. package/dist-types/client/src/components/StrategyLabScene/components/DecisionSwitcher.d.ts +14 -0
  130. package/dist-types/client/src/components/StrategyLabScene/components/EvaluationReport.d.ts +13 -0
  131. package/dist-types/client/src/components/StrategyLabScene/components/NodeChainPanels.d.ts +32 -0
  132. package/dist-types/client/src/components/StrategyLabScene/components/ProgressSteps.d.ts +15 -0
  133. package/dist-types/client/src/components/StrategyLabScene/components/SandboxView.d.ts +19 -0
  134. package/dist-types/client/src/components/StrategyLabScene/components/ScenarioPanel.d.ts +17 -0
  135. package/dist-types/client/src/components/StrategyLabScene/components/SimulationAnimation.d.ts +13 -0
  136. package/dist-types/client/src/components/StrategyLabScene/components/SimulationResult.d.ts +15 -0
  137. package/dist-types/client/src/components/StrategyLabScene/components/StressTestView.d.ts +22 -0
  138. package/dist-types/client/src/components/StrategyLabScene/themeMatching.d.ts +21 -0
  139. package/dist-types/client/src/components/StrategyLabScene/themes/education.d.ts +45 -0
  140. package/dist-types/client/src/components/StrategyLabScene/themes/healthcare.d.ts +7 -0
  141. package/dist-types/client/src/components/StrategyLabScene/themes/index.d.ts +22 -0
  142. package/dist-types/client/src/components/StrategyLabScene/themes/professional.d.ts +7 -0
  143. package/dist-types/client/src/components/StrategyLabScene/themes/technology.d.ts +7 -0
  144. package/dist-types/client/src/components/StrategyLabScene/types.d.ts +82 -0
  145. package/dist-types/client/src/components/StrategyLabScene/views/UnifiedStrategyLabView.d.ts +72 -0
  146. package/dist-types/client/src/components/TrainingEngine/BriefingQAChat.d.ts +19 -0
  147. package/dist-types/client/src/components/TrainingEngine/CaseInfoModal.d.ts +12 -0
  148. package/dist-types/client/src/components/TrainingEngine/CaseSelector.d.ts +15 -0
  149. package/dist-types/client/src/components/TrainingEngine/ClassicView.d.ts +7 -0
  150. package/dist-types/client/src/components/TrainingEngine/DashboardHomePage.d.ts +7 -0
  151. package/dist-types/client/src/components/TrainingEngine/EnhancedStudentProfilePanel.d.ts +9 -0
  152. package/dist-types/client/src/components/TrainingEngine/EvaluationPanel.d.ts +8 -0
  153. package/dist-types/client/src/components/TrainingEngine/GlobalQAPanel.d.ts +34 -0
  154. package/dist-types/client/src/components/TrainingEngine/GuidanceHistoryDrawer.d.ts +7 -0
  155. package/dist-types/client/src/components/TrainingEngine/GuidancePanel.d.ts +3 -0
  156. package/dist-types/client/src/components/TrainingEngine/ImmersiveGameView.d.ts +7 -0
  157. package/dist-types/client/src/components/TrainingEngine/PluginRenderer.d.ts +15 -0
  158. package/dist-types/client/src/components/TrainingEngine/ProgressTracker.d.ts +3 -0
  159. package/dist-types/client/src/components/TrainingEngine/StageAssessingOverlay.d.ts +17 -0
  160. package/dist-types/client/src/components/TrainingEngine/StageAssessmentPanel.d.ts +10 -0
  161. package/dist-types/client/src/components/TrainingEngine/StepExecutor.d.ts +20 -0
  162. package/dist-types/client/src/components/TrainingEngine/StepNodeMap.d.ts +15 -0
  163. package/dist-types/client/src/components/TrainingEngine/StudentProfilePanel.d.ts +6 -0
  164. package/dist-types/client/src/components/TrainingEngine/ThemeContext.d.ts +8 -0
  165. package/dist-types/client/src/components/TrainingEngine/TrainingMaterialsSidebar.d.ts +21 -0
  166. package/dist-types/client/src/components/TrainingEngine/TrainingModelContainer.d.ts +42 -0
  167. package/dist-types/client/src/components/TrainingEngine/ViewProps.d.ts +37 -0
  168. package/dist-types/client/src/components/TrainingEngine/profileDataSelectors.d.ts +23 -0
  169. package/dist-types/client/src/components/TrainingEngine/stepInitData.d.ts +42 -0
  170. package/dist-types/client/src/components/TrainingEngine/targetAbilityUtils.d.ts +11 -0
  171. package/dist-types/client/src/components/VisualizationRenderer/ChartRenderer.d.ts +12 -0
  172. package/dist-types/client/src/components/VisualizationRenderer/types.d.ts +41 -0
  173. package/dist-types/client/src/config/appConfig.d.ts +15 -0
  174. package/dist-types/client/src/configs/agentConfig.d.ts +66 -0
  175. package/dist-types/client/src/configs/intentDiscoveryConfig.d.ts +22 -0
  176. package/dist-types/client/src/data/mockTrainingModel.d.ts +10 -0
  177. package/dist-types/client/src/hooks/useAIService.d.ts +17 -0
  178. package/dist-types/client/src/hooks/useDialogueLogic.d.ts +53 -0
  179. package/dist-types/client/src/hooks/useFormFillingLogic.d.ts +26 -0
  180. package/dist-types/client/src/hooks/useFormRealtimeGuidance.d.ts +45 -0
  181. package/dist-types/client/src/hooks/useRealtimeGuidance.d.ts +66 -0
  182. package/dist-types/client/src/hooks/useStageAssessment.d.ts +8 -0
  183. package/dist-types/client/src/hooks/useStepExecution.d.ts +14 -0
  184. package/dist-types/client/src/hooks/useTrainingModel.d.ts +30 -0
  185. package/dist-types/client/src/lib/creator.d.ts +1 -0
  186. package/dist-types/client/src/lib/index.d.ts +1 -0
  187. package/dist-types/client/src/lib/types.d.ts +113 -22
  188. package/dist-types/client/src/plugins/AssessmentPlugin.d.ts +8 -0
  189. package/dist-types/client/src/plugins/CaseAnalysisPlugin.d.ts +9 -0
  190. package/dist-types/client/src/plugins/CaseAnalysisPluginView.d.ts +26 -0
  191. package/dist-types/client/src/plugins/DecisionSelectPlugin.d.ts +8 -0
  192. package/dist-types/client/src/plugins/DialogueFormPlugin.d.ts +9 -0
  193. package/dist-types/client/src/plugins/DialogueFormPluginView.d.ts +37 -0
  194. package/dist-types/client/src/plugins/DialoguePlugin.d.ts +8 -0
  195. package/dist-types/client/src/plugins/DialoguePluginView.d.ts +44 -0
  196. package/dist-types/client/src/plugins/DocumentReview/DocumentCard.d.ts +47 -0
  197. package/dist-types/client/src/plugins/DocumentReview/LayoutComponents.d.ts +47 -0
  198. package/dist-types/client/src/plugins/DocumentReview/MarkListPanel.d.ts +51 -0
  199. package/dist-types/client/src/plugins/DocumentReview/MarkModal.d.ts +37 -0
  200. package/dist-types/client/src/plugins/DocumentReview/ResultPanel.d.ts +32 -0
  201. package/dist-types/client/src/plugins/DocumentReview/Toolbar.d.ts +31 -0
  202. package/dist-types/client/src/plugins/DocumentReview/designTokens.d.ts +76 -0
  203. package/dist-types/client/src/plugins/DocumentReviewPlugin.d.ts +14 -0
  204. package/dist-types/client/src/plugins/ProcessOperationPlugin.d.ts +8 -0
  205. package/dist-types/client/src/plugins/QAPlugin.d.ts +9 -0
  206. package/dist-types/client/src/plugins/StrategyLabPlugin.d.ts +7 -0
  207. package/dist-types/client/src/plugins/decision-making/DecisionMakingPlugin.d.ts +4 -0
  208. package/dist-types/client/src/plugins/decision-making/DecisionWorkspace.d.ts +23 -0
  209. package/dist-types/client/src/plugins/decision-making/MaterialsPanel.d.ts +18 -0
  210. package/dist-types/client/src/plugins/decision-making/logic.d.ts +46 -0
  211. package/dist-types/client/src/plugins/decision-making/scoring.d.ts +79 -0
  212. package/dist-types/client/src/plugins/decision-making/styles.d.ts +743 -0
  213. package/dist-types/client/src/plugins/decision-making/types.d.ts +179 -0
  214. package/dist-types/client/src/plugins/form-filling/DocumentFormLayout.d.ts +22 -0
  215. package/dist-types/client/src/plugins/form-filling/FormAssistPanel.d.ts +20 -0
  216. package/dist-types/client/src/plugins/form-filling/FormFillingPlugin.d.ts +15 -0
  217. package/dist-types/client/src/plugins/form-filling/forms.d.ts +28 -0
  218. package/dist-types/client/src/plugins/form-filling/scoring.d.ts +86 -0
  219. package/dist-types/client/src/plugins/form-filling/useFormFilling.d.ts +42 -0
  220. package/dist-types/client/src/plugins/form-filling/validationRules.d.ts +26 -0
  221. package/dist-types/client/src/plugins/shared/DecisionShared.d.ts +54 -0
  222. package/dist-types/client/src/plugins/shared/FrameworkWidget.d.ts +19 -0
  223. package/dist-types/client/src/plugins/shared/PluginFooter.d.ts +4 -0
  224. package/dist-types/client/src/plugins/shared/PluginHeader.d.ts +4 -0
  225. package/dist-types/client/src/plugins/shared/analysisTools.d.ts +30 -0
  226. package/dist-types/client/src/plugins/shared/disturbanceUtils.d.ts +5 -0
  227. package/dist-types/client/src/plugins/shared/index.d.ts +5 -0
  228. package/dist-types/client/src/plugins/shared/jsonRepair.d.ts +39 -0
  229. package/dist-types/client/src/plugins/shared/judgement.d.ts +46 -0
  230. package/dist-types/client/src/plugins/shared/nodeChain.d.ts +15 -0
  231. package/dist-types/client/src/plugins/shared/renderFieldGrid.d.ts +16 -0
  232. package/dist-types/client/src/plugins/shared/reportBlocks.d.ts +33 -0
  233. package/dist-types/client/src/plugins/shared/reportEvaluation.d.ts +30 -0
  234. package/dist-types/client/src/plugins/shared/reportExport.d.ts +12 -0
  235. package/dist-types/client/src/plugins/shared/reportWorkbench/BlockPropertiesPanel.d.ts +9 -0
  236. package/dist-types/client/src/plugins/shared/reportWorkbench/BlockToolbox.d.ts +11 -0
  237. package/dist-types/client/src/plugins/shared/reportWorkbench/ReportWorkbench.d.ts +20 -0
  238. package/dist-types/client/src/plugins/shared/reportWorkbench/SortableBlock.d.ts +15 -0
  239. package/dist-types/client/src/plugins/shared/reportWorkbench/factory.d.ts +14 -0
  240. package/dist-types/client/src/plugins/shared/reportWorkbench/outlineDraft.d.ts +7 -0
  241. package/dist-types/client/src/plugins/shared/simulationEngine.d.ts +112 -0
  242. package/dist-types/client/src/plugins/shared/simulationModes.d.ts +21 -0
  243. package/dist-types/client/src/plugins/shared/themes.d.ts +5 -0
  244. package/dist-types/client/src/plugins/shared/types.d.ts +1247 -0
  245. package/dist-types/client/src/services/AICommandHandler.d.ts +68 -0
  246. package/dist-types/client/src/services/cozeApiClient.d.ts +44 -0
  247. package/dist-types/client/src/services/mockApi.d.ts +48 -0
  248. package/dist-types/client/src/services/storageService.d.ts +88 -0
  249. package/dist-types/client/src/stores/abilityStore.d.ts +33 -0
  250. package/dist-types/client/src/stores/dialogueStore.d.ts +30 -0
  251. package/dist-types/client/src/stores/formRegistryStore.d.ts +45 -0
  252. package/dist-types/client/src/stores/guidanceStore.d.ts +17 -0
  253. package/dist-types/client/src/stores/stepEvidenceStore.d.ts +14 -0
  254. package/dist-types/client/src/stores/strategyLabStore.d.ts +46 -0
  255. package/dist-types/client/src/stores/trainingStore.d.ts +84 -0
  256. package/dist-types/client/src/types/ai-commands.d.ts +144 -0
  257. package/dist-types/client/src/types.d.ts +17 -0
  258. package/dist-types/client/src/utils/abilityMapGenerator.d.ts +27 -0
  259. package/dist-types/client/src/utils/formUtils.d.ts +66 -0
  260. package/dist-types/client/src/utils/rule-engine.d.ts +36 -0
  261. package/dist-types/shared/types/index.d.ts +592 -0
  262. package/package.json +5 -3
  263. package/dist/CaseAnalysisPlugin-CQvF9_zr.js +0 -416
  264. package/dist/DialogueFormPlugin-C9ssnVMr.js +0 -959
  265. package/dist/DialoguePlugin-DU00QpmQ.js +0 -416
  266. package/dist/DocumentReviewPlugin-HNOZY1T4.js +0 -977
  267. package/dist/FormFillingPlugin-DURWsioi.js +0 -445
  268. package/dist/ModelEditor-BPJsPR0S.js +0 -8264
  269. package/dist/PluginHeader-B-GESJmT.js +0 -87
  270. package/dist/QAPlugin-Bh_UjK1N.js +0 -184
  271. package/dist/RadarChart-C5ZM0kWt.js +0 -24963
  272. package/dist/StrategyLabPlugin-DGeZsr_7.js +0 -14361
  273. package/dist/ThunderboltOutlined-nH_FO_4A.js +0 -44
  274. package/dist/ToolOutlined-DtuNJDB2.js +0 -28
  275. package/dist/TrainingModelContainer-DpW-uB8O.js +0 -11883
  276. package/dist/WarningOutlined-5g1d66hO.js +0 -164
  277. package/dist/judgement-D_9i7x9S.js +0 -20
  278. package/dist/useDialogueLogic-IHELcN3X.js +0 -368
@@ -0,0 +1,969 @@
1
+ import { g as me, f as xe, k as ye, u as ve, m as Se, n as je, o as $e, p as te, a as ue, q as de, t as Fe, j as o, r as ke, c as Ne } from "./CaseDetailContent-Y7Q430MG.js";
2
+ import { useState as K, useRef as Z, useCallback as O, useMemo as E, useEffect as ee } from "react";
3
+ import { message as we, Alert as Be, Button as Ce } from "antd";
4
+ import { a as Ie } from "./judgement-xTGXlDcn.js";
5
+ import { d as oe } from "./designTokens-walF_QkZ.js";
6
+ const ne = (e) => e.map((n) => `- ${n.label}:${n.value}`).join(`
7
+ `), Ee = (e, n = {}) => {
8
+ const x = me("COACH_AGENT"), { domain: m = "金融", tellerRoleName: u = "业务人员" } = n, [c, f] = K(!1), l = Z(null), s = (r) => {
9
+ var h, t;
10
+ const v = (h = r.businessRules) != null && h.length ? `
11
+ ## 业务规则(约束,非答案)
12
+ ${r.businessRules.map((j, z) => `${z + 1}. ${j}`).join(`
13
+ `)}
14
+ ` : "", d = (t = r.deterministicFindings) != null && t.length ? `
15
+ ## 已知客观问题(前端已处理,勿重复提示格式/必填/位数)
16
+ ${r.deterministicFindings.map((j) => `- ${j}`).join(`
17
+ `)}
18
+ ` : "";
19
+ return `
20
+ 你正在为一名${r.targetPosition || u}的"单证/表单填写"实训提供过程性实时指导。
21
+
22
+ ## 实训场景信息
23
+ - 模型名称:${r.modelName || ""}
24
+ - 业务领域:${r.domain || m}
25
+ - 业务类型:${r.businessType || ""}
26
+ - 当前单证:${r.formName || ""}
27
+ ${r.scenario ? `
28
+ ## 场景背景
29
+ ${r.scenario}
30
+ ` : ""}${r.caseBackground ? `
31
+ ## 案例背景
32
+ ${r.caseBackground}
33
+ ` : ""}${v}
34
+ ## 学员填写进度
35
+ 必填完成度:${r.requiredFilled} / ${r.requiredTotal}
36
+
37
+ ## 已填字段快照
38
+ ${ne(r.filledSnapshot) || "(暂无)"}
39
+
40
+ ## 最近变化字段
41
+ ${ne(r.changedFields) || "(无)"}
42
+ ${d}
43
+ ## 指导要求
44
+ 基于学员当前填写动态,判断是否需要给予过程性引导。要求:
45
+ - 只在确有必要时给出指导;填写正常则返回空(severity 省略或 message 为空)。
46
+ - 不要提示字段格式、必填、位数、单位等前端已处理的低层问题。
47
+ - 不要直接给出标准答案或具体应填值,只做方向性提示(如指出某字段与场景/业务规则可能不符、跨单证一致性风险、业务逻辑遗漏、明显异常取值)。
48
+ - 语言简洁,面向学员。
49
+
50
+ 严格输出 JSON:{"type":"guidance","severity":"info|warning|error","data":{"message":"...","suggestion":"...(可选)"}};无需指导时输出 {"type":"guidance","data":{"message":""}}。
51
+ `.trim();
52
+ }, b = (r) => {
53
+ var d;
54
+ const v = (d = r.deterministicFindings) != null && d.length ? `
55
+ 新增/未决客观问题:
56
+ ${r.deterministicFindings.map((h) => `- ${h}`).join(`
57
+ `)}` : "";
58
+ return `
59
+ 学员新填/修改了以下字段:
60
+ ${ne(r.changedFields) || "(无明显变化)"}
61
+ 必填完成度:${r.requiredFilled} / ${r.requiredTotal}${v}
62
+
63
+ 沿用之前的场景与规则,判断是否需要给予过程性引导(标准同前:不提示格式/必填、不泄露答案、只做方向性提示,正常则返回空)。
64
+ 严格输出同样的 guidance JSON。
65
+ `.trim();
66
+ }, a = O(
67
+ async (r) => {
68
+ if (!(!e || !x)) {
69
+ f(!0);
70
+ try {
71
+ const v = l.current ? b(r) : s(r), d = await xe({
72
+ botId: x,
73
+ prompt: v,
74
+ token: e,
75
+ conversationId: l.current || void 0,
76
+ autoSaveHistory: !0
77
+ });
78
+ if (d.conversationId && (l.current = d.conversationId), !d.response) return;
79
+ let h;
80
+ try {
81
+ h = JSON.parse(d.response);
82
+ } catch {
83
+ return;
84
+ }
85
+ const t = h.type === "guidance" && h.data, j = t ? h.severity || h.data.severity : h.severity, z = t ? h.data.message : h.message, P = t ? h.data.suggestion : h.suggestion;
86
+ if (!(t ? !!z : h.needGuidance) || !j || !z) return;
87
+ ye.getState().addGuidance({ severity: j, message: z, suggestion: P });
88
+ } catch (v) {
89
+ console.warn("表单实时指导失败:", v);
90
+ } finally {
91
+ f(!1);
92
+ }
93
+ }
94
+ },
95
+ [e, x]
96
+ ), p = O(() => {
97
+ l.current = null;
98
+ }, []);
99
+ return { evaluateFormGuidance: a, resetGuidance: p, loading: c };
100
+ };
101
+ function ze(e, n, x = {}) {
102
+ const { onRealtimeData: m, onFieldChanged: u } = x, { currentCase: c } = ve(), f = ue, l = E(() => Se(e), [e]), s = E(() => je(l), [l]), b = E(() => $e(l), [l]), a = n == null ? void 0 : n.validationRules, p = E(() => {
103
+ const g = /* @__PURE__ */ new Set();
104
+ for (const i of s) {
105
+ const S = i.validation;
106
+ (S && typeof te[S] == "function" || i.type === "number" && (i.min != null || i.max != null)) && g.add(i.name);
107
+ }
108
+ if (Array.isArray(a))
109
+ for (const i of a)
110
+ i && typeof i.field == "string" && g.add(i.field);
111
+ return g;
112
+ }, [s, a]), r = E(() => {
113
+ const g = {};
114
+ return l.forEach((i) => {
115
+ g[i.formName] = (i.fields || []).map((S) => S.name);
116
+ }), g;
117
+ }, [l]);
118
+ ee(() => {
119
+ l.forEach((g) => {
120
+ g.fields && g.fields.length > 0 && f.getState().registerTemplate(g.formName, {
121
+ formName: g.formName,
122
+ fields: g.fields,
123
+ mode: g.mode
124
+ });
125
+ });
126
+ }, [l, f]);
127
+ const v = E(() => {
128
+ const g = c || {}, i = f.getState().filledData;
129
+ let S = {};
130
+ return S = { ...S, ...de(e == null ? void 0 : e.customerData, g, i) }, l.forEach(($) => {
131
+ S = { ...S, ...de($.customerData, g, i) };
132
+ }), l.forEach(($) => {
133
+ const A = f.getState().getFilledData($.formName);
134
+ A && (S = { ...S, ...A });
135
+ }), S;
136
+ }, [l, e == null ? void 0 : e.customerData, c]), [d, h] = K(v), [t, j] = K({}), [z, P] = K({}), H = O(
137
+ (g) => {
138
+ const i = {}, S = {};
139
+ for (const y of s) {
140
+ const L = g[y.name];
141
+ if (L == null || L === "") continue;
142
+ const J = y.validation;
143
+ if (J && typeof te[J] == "function")
144
+ try {
145
+ const k = te[J](L, y.min, y.max);
146
+ k && k.valid === !1 && (i[y.name] = k.message || "格式不正确");
147
+ } catch {
148
+ }
149
+ if (y.type === "number" && J !== "amount" && !i[y.name]) {
150
+ const k = typeof L == "number" ? L : Number(L);
151
+ Number.isFinite(k) && (y.min != null && k < y.min ? i[y.name] = `不能小于 ${y.min}` : y.max != null && k > y.max && (i[y.name] = `不能大于 ${y.max}`));
152
+ }
153
+ }
154
+ const $ = f.getState().filledData, A = Fe(a, g, $, c || {});
155
+ new Set(s.map((y) => y.name));
156
+ for (const y of A)
157
+ y.level === "error" ? i[y.field] = i[y.field] || y.message : S[y.field] || (S[y.field] = { level: y.level, message: y.message });
158
+ j(i), P(S);
159
+ },
160
+ [s, a, f, c]
161
+ );
162
+ ee(() => {
163
+ h(v), l.forEach((g) => {
164
+ const i = r[g.formName] || [], S = {};
165
+ i.forEach(($) => {
166
+ v[$] !== void 0 && (S[$] = v[$]);
167
+ }), Object.keys(S).length > 0 && f.getState().saveFilledData(g.formName, S);
168
+ }), H(v);
169
+ }, [e == null ? void 0 : e.stepId, c]);
170
+ const _ = O(
171
+ (g, i) => {
172
+ h((S) => {
173
+ const $ = { ...S, [g]: i }, A = b[g];
174
+ if (A) {
175
+ const y = r[A] || [], L = {};
176
+ y.forEach((X) => {
177
+ $[X] !== void 0 && (L[X] = $[X]);
178
+ }), f.getState().saveFilledData(A, L);
179
+ }
180
+ return H($), $;
181
+ }), m == null || m({ type: "formChange", field: g, value: i }), u == null || u(g, i);
182
+ },
183
+ [b, r, f, H, m, u]
184
+ ), re = O(() => {
185
+ for (const i of l)
186
+ for (const S of i.fields || [])
187
+ if (S.required) {
188
+ const $ = d[S.name];
189
+ if ($ == null || $ === "")
190
+ return {
191
+ ok: !1,
192
+ reason: `请填写「${S.label || S.name}」(${i.title || i.formName})`,
193
+ firstErrorFormName: i.formName
194
+ };
195
+ }
196
+ const g = Object.keys(t);
197
+ if (g.length > 0) {
198
+ const i = b[g[0]];
199
+ return { ok: !1, reason: t[g[0]], firstErrorFormName: i };
200
+ }
201
+ return { ok: !0 };
202
+ }, [l, d, t, b]);
203
+ return {
204
+ forms: l,
205
+ allFields: s,
206
+ formData: d,
207
+ validationErrors: t,
208
+ fieldValidation: z,
209
+ caseData: c,
210
+ validatedFieldNames: p,
211
+ handleFieldChange: _,
212
+ checkSubmit: re
213
+ };
214
+ }
215
+ const N = oe.colors, He = (e) => {
216
+ const n = e || "";
217
+ return /(人身|人寿|寿险|身故|life|投保|保险单)/i.test(n) ? "📄" : /(财产|企业财产|property)/i.test(n) ? "🏠" : /(车|机动车|motor|auto|vehicle)/i.test(n) ? "🚗" : /(健康|医疗|重疾|health|medical)/i.test(n) ? "❤️" : "📝";
218
+ }, Le = (e) => {
219
+ const n = e.map((m) => m.colSpan ?? 1), x = n.reduce((m, u) => Math.max(m, u), 1);
220
+ return n.every((m) => m >= 3) ? "cols-full" : x >= 3 ? "cols-3" : "cols-2";
221
+ }, Te = {
222
+ "cols-2": "repeat(2, 1fr)",
223
+ "cols-3": "repeat(3, 1fr)",
224
+ "cols-full": "1fr"
225
+ };
226
+ function We(e) {
227
+ const n = e.fields || [];
228
+ if (e.groups && e.groups.length > 0) {
229
+ const u = new Map(n.map((s) => [s.name, s])), c = /* @__PURE__ */ new Set(), f = [];
230
+ e.groups.forEach((s) => {
231
+ const b = (s.fields || []).map((a) => u.get(a)).filter((a) => !!a);
232
+ b.forEach((a) => c.add(a.name)), b.length > 0 && f.push({ key: s.key, title: s.title, fields: b });
233
+ });
234
+ const l = n.filter((s) => !c.has(s.name));
235
+ return l.length > 0 && f.push({ key: "__rest", title: "", fields: l }), f;
236
+ }
237
+ const x = [], m = /* @__PURE__ */ new Map();
238
+ return n.forEach((u) => {
239
+ const c = u.group ?? "__default";
240
+ m.has(c) || (m.set(c, []), x.push(c)), m.get(c).push(u);
241
+ }), x.map((u) => ({ key: u, title: u === "__default" ? "" : u, fields: m.get(u) }));
242
+ }
243
+ const Ae = ({
244
+ forms: e,
245
+ formData: n,
246
+ validationErrors: x,
247
+ fieldValidation: m,
248
+ columns: u,
249
+ activeFormName: c,
250
+ onActiveFormChange: f,
251
+ onFieldChange: l,
252
+ onFieldFocus: s,
253
+ resolveText: b
254
+ }) => {
255
+ const a = E(
256
+ () => e.find((d) => d.formName === c) || e[0],
257
+ [e, c]
258
+ ), p = E(() => {
259
+ const d = {};
260
+ return e.forEach((h) => {
261
+ const t = h.fields || [], j = t.filter((H) => H.required), z = j.filter((H) => {
262
+ const _ = n[H.name];
263
+ return _ != null && _ !== "";
264
+ }).length, P = t.filter((H) => x[H.name]).length;
265
+ d[h.formName] = { filled: z, total: j.length, errors: P };
266
+ }), d;
267
+ }, [e, n, x]);
268
+ if (!a) return null;
269
+ const r = We(a), v = a.columns || u;
270
+ return /* @__PURE__ */ o.jsxs("div", { style: F.documentCard, children: [
271
+ e.length > 1 && /* @__PURE__ */ o.jsx("div", { style: F.tabBar, children: e.map((d) => {
272
+ const h = d.formName === a.formName, t = p[d.formName];
273
+ return /* @__PURE__ */ o.jsxs(
274
+ "div",
275
+ {
276
+ onClick: () => f(d.formName),
277
+ style: { ...F.tabItem, ...h ? F.tabItemActive : null },
278
+ children: [
279
+ /* @__PURE__ */ o.jsx("span", { style: { fontSize: 18 }, children: He(b(d.title)) }),
280
+ b(d.title) || d.formName,
281
+ t && t.errors > 0 ? /* @__PURE__ */ o.jsx("span", { style: { ...F.tabBadge, background: N.error }, children: t.errors }) : t && t.total > 0 ? /* @__PURE__ */ o.jsxs(
282
+ "span",
283
+ {
284
+ style: {
285
+ ...F.tabBadge,
286
+ background: t.filled >= t.total ? N.success : h ? N.secondary : "#bbb"
287
+ },
288
+ children: [
289
+ t.filled,
290
+ "/",
291
+ t.total
292
+ ]
293
+ }
294
+ ) : null
295
+ ]
296
+ },
297
+ d.formName
298
+ );
299
+ }) }),
300
+ /* @__PURE__ */ o.jsxs("div", { style: F.tabPanel, children: [
301
+ /* @__PURE__ */ o.jsxs("div", { style: F.docHeader, children: [
302
+ /* @__PURE__ */ o.jsx("div", { style: F.docTitle, children: b(a.title) || a.formName }),
303
+ a.titleEn && /* @__PURE__ */ o.jsx("div", { style: F.docTitleEn, children: b(a.titleEn) }),
304
+ a.subtitle && /* @__PURE__ */ o.jsx("div", { style: F.docSubtitle, children: b(a.subtitle) }),
305
+ a.docNo && /* @__PURE__ */ o.jsx("div", { style: F.docNo, children: b(a.docNo) })
306
+ ] }),
307
+ r.map((d) => {
308
+ const h = Le(d.fields);
309
+ return /* @__PURE__ */ o.jsxs("div", { style: F.formSection, children: [
310
+ d.title && /* @__PURE__ */ o.jsx("div", { style: F.formSectionTitle, children: d.title }),
311
+ /* @__PURE__ */ o.jsx("div", { style: { ...F.formGrid, gridTemplateColumns: Te[h] }, children: d.fields.map((t) => /* @__PURE__ */ o.jsx(
312
+ Re,
313
+ {
314
+ field: t,
315
+ value: n[t.name],
316
+ error: x[t.name],
317
+ warning: m[t.name],
318
+ columns: v,
319
+ resolveText: b,
320
+ onChange: l,
321
+ onFocus: s
322
+ },
323
+ t.name
324
+ )) })
325
+ ] }, d.key);
326
+ })
327
+ ] })
328
+ ] });
329
+ }, Re = ({
330
+ field: e,
331
+ value: n,
332
+ error: x,
333
+ warning: m,
334
+ resolveText: u,
335
+ onChange: c,
336
+ onFocus: f
337
+ }) => {
338
+ const [l, s] = K(!1), b = x ? "error" : m ? m.level : null, a = x || (m == null ? void 0 : m.message), p = x ? N.error : (m == null ? void 0 : m.level) === "warning" ? N.warning : l ? N.borderFocus : "#bfdbfe", r = e.readonly ? F.fieldRo : {
339
+ ...F.fieldEditable,
340
+ borderColor: p,
341
+ boxShadow: l && !e.readonly ? oe.shadows.focus : void 0
342
+ }, v = () => {
343
+ s(!0), f == null || f(e);
344
+ }, d = () => s(!1);
345
+ return /* @__PURE__ */ o.jsxs("div", { style: { ...F.fieldItem, gridColumn: (e.colSpan ?? 1) > 1 ? "1 / -1" : void 0 }, children: [
346
+ /* @__PURE__ */ o.jsxs("label", { style: F.fieldLabel, children: [
347
+ /* @__PURE__ */ o.jsx("span", { children: u(e.label) }),
348
+ e.labelEn && /* @__PURE__ */ o.jsxs("span", { style: F.fieldLabelEn, children: [
349
+ " / ",
350
+ e.labelEn
351
+ ] }),
352
+ e.required && /* @__PURE__ */ o.jsx("span", { style: F.requiredStar, children: "*" })
353
+ ] }),
354
+ Me(e, n, r, v, d, c, u),
355
+ a && /* @__PURE__ */ o.jsx(
356
+ "div",
357
+ {
358
+ style: {
359
+ ...F.fieldMessage,
360
+ color: b === "error" ? N.error : b === "warning" ? N.warning : N.info
361
+ },
362
+ children: a
363
+ }
364
+ ),
365
+ !a && e.hint && /* @__PURE__ */ o.jsx("div", { style: F.fieldHint, children: u(e.hint) })
366
+ ] });
367
+ };
368
+ function Me(e, n, x, m, u, c, f) {
369
+ if (e.readonly)
370
+ return /* @__PURE__ */ o.jsx("div", { style: x, children: n != null && n !== "" ? String(n) : "—" });
371
+ const l = { onFocus: m, onBlur: u, style: x, id: `ff-${e.name}` };
372
+ switch (e.type) {
373
+ case "select":
374
+ return /* @__PURE__ */ o.jsxs(
375
+ "select",
376
+ {
377
+ ...l,
378
+ value: n ?? "",
379
+ onChange: (s) => c(e.name, s.target.value),
380
+ children: [
381
+ /* @__PURE__ */ o.jsx("option", { value: "", children: "请选择" }),
382
+ (e.options || []).map((s) => {
383
+ const b = typeof s == "string" ? s : s.value, a = typeof s == "string" ? s : s.label;
384
+ return /* @__PURE__ */ o.jsx("option", { value: b, children: a }, b);
385
+ })
386
+ ]
387
+ }
388
+ );
389
+ case "number":
390
+ return /* @__PURE__ */ o.jsx(
391
+ "input",
392
+ {
393
+ ...l,
394
+ type: "number",
395
+ value: n ?? "",
396
+ min: e.min,
397
+ max: e.max,
398
+ step: e.step,
399
+ placeholder: `请输入${f(e.label)}`,
400
+ onChange: (s) => c(e.name, s.target.value === "" ? "" : Number(s.target.value))
401
+ }
402
+ );
403
+ case "date":
404
+ return /* @__PURE__ */ o.jsx(
405
+ "input",
406
+ {
407
+ ...l,
408
+ type: "date",
409
+ value: n ?? "",
410
+ onChange: (s) => c(e.name, s.target.value)
411
+ }
412
+ );
413
+ case "textarea":
414
+ return /* @__PURE__ */ o.jsx(
415
+ "textarea",
416
+ {
417
+ ...l,
418
+ rows: 4,
419
+ value: n ?? "",
420
+ maxLength: e.maxLength,
421
+ placeholder: `请输入${f(e.label)}`,
422
+ onChange: (s) => c(e.name, s.target.value)
423
+ }
424
+ );
425
+ default:
426
+ return e.maxLength && e.maxLength > 30 ? /* @__PURE__ */ o.jsx(
427
+ "textarea",
428
+ {
429
+ ...l,
430
+ rows: 4,
431
+ value: n ?? "",
432
+ maxLength: e.maxLength,
433
+ placeholder: `请输入${f(e.label)}`,
434
+ onChange: (s) => c(e.name, s.target.value)
435
+ }
436
+ ) : /* @__PURE__ */ o.jsx(
437
+ "input",
438
+ {
439
+ ...l,
440
+ type: "text",
441
+ value: n ?? "",
442
+ maxLength: e.maxLength,
443
+ placeholder: `请输入${f(e.label)}`,
444
+ onChange: (s) => c(e.name, s.target.value)
445
+ }
446
+ );
447
+ }
448
+ }
449
+ const F = {
450
+ documentCard: {
451
+ background: N.surface,
452
+ borderRadius: 10,
453
+ boxShadow: "0 4px 20px rgba(0,0,0,0.12)",
454
+ overflow: "hidden"
455
+ },
456
+ tabBar: {
457
+ display: "flex",
458
+ background: "#fafbfc",
459
+ borderBottom: `1px solid ${N.border}`,
460
+ overflowX: "auto"
461
+ },
462
+ tabItem: {
463
+ padding: "14px 28px",
464
+ fontSize: 16,
465
+ fontWeight: 600,
466
+ color: N.textSecondary,
467
+ cursor: "pointer",
468
+ // 拆分写法:tabItemActive 只改 borderBottomColor,基态若用 borderBottom 简写会在切走激活态时
469
+ // 触发"移除 borderBottomColor 而 borderBottom 仍在"的样式冲突告警
470
+ borderBottomWidth: 3,
471
+ borderBottomStyle: "solid",
472
+ borderBottomColor: "transparent",
473
+ whiteSpace: "nowrap",
474
+ transition: "all 0.2s",
475
+ display: "flex",
476
+ alignItems: "center",
477
+ gap: 8
478
+ },
479
+ tabItemActive: { color: N.primary, borderBottomColor: N.primary, background: "#fff" },
480
+ tabBadge: {
481
+ display: "inline-flex",
482
+ alignItems: "center",
483
+ justifyContent: "center",
484
+ minWidth: 22,
485
+ height: 22,
486
+ padding: "0 7px",
487
+ borderRadius: 11,
488
+ fontSize: 12.5,
489
+ fontWeight: 700,
490
+ color: "#fff"
491
+ },
492
+ tabPanel: { padding: "30px 40px" },
493
+ docHeader: {
494
+ textAlign: "center",
495
+ marginBottom: 34,
496
+ paddingBottom: 24,
497
+ borderBottom: "2.5px solid #1e40af"
498
+ },
499
+ docTitle: {
500
+ fontFamily: "'SimHei', '黑体', sans-serif",
501
+ fontSize: 28,
502
+ fontWeight: "bold",
503
+ letterSpacing: 6,
504
+ marginBottom: 6,
505
+ color: "#1e3a5f"
506
+ },
507
+ docTitleEn: {
508
+ fontSize: 12,
509
+ color: N.textDisabled,
510
+ letterSpacing: 1.5,
511
+ textTransform: "uppercase",
512
+ marginBottom: 8
513
+ },
514
+ docSubtitle: { fontSize: 16, color: N.textSecondary, fontWeight: 500, letterSpacing: 1 },
515
+ docNo: {
516
+ display: "inline-block",
517
+ marginTop: 8,
518
+ fontFamily: "'Courier New', monospace",
519
+ fontSize: 13.5,
520
+ color: N.secondary,
521
+ background: "#eff6ff",
522
+ border: "1px solid #bfdbfe",
523
+ borderRadius: 4,
524
+ padding: "3px 10px",
525
+ fontWeight: 600
526
+ },
527
+ formSection: { marginBottom: 30 },
528
+ formSectionTitle: {
529
+ fontSize: 16,
530
+ fontWeight: 700,
531
+ color: "#fff",
532
+ background: "#1e40af",
533
+ marginBottom: 18,
534
+ padding: "8px 14px",
535
+ borderRadius: 3,
536
+ letterSpacing: 0.5
537
+ },
538
+ formGrid: { display: "grid", gap: "16px 32px" },
539
+ fieldItem: { display: "flex", flexDirection: "column", gap: 5, padding: "2px 0", position: "relative" },
540
+ fieldLabel: {
541
+ fontSize: 13.5,
542
+ color: N.textSecondary,
543
+ fontWeight: 600,
544
+ display: "flex",
545
+ alignItems: "center",
546
+ gap: 2,
547
+ lineHeight: 1.4
548
+ },
549
+ fieldLabelEn: { fontSize: 11, color: "#94a3b8", fontWeight: 400 },
550
+ requiredStar: { color: N.error, marginLeft: 2 },
551
+ fieldEditable: {
552
+ background: "#ffffff",
553
+ // 拆分写法:FieldItem 合并 controlStyle 时会叠加 borderColor(非简写),基态用 border 简写会构成混用
554
+ borderWidth: 1.5,
555
+ borderStyle: "solid",
556
+ borderColor: "#bfdbfe",
557
+ padding: "7px 11px",
558
+ fontSize: 14,
559
+ borderRadius: 4,
560
+ width: "100%",
561
+ boxSizing: "border-box",
562
+ color: "#1e293b",
563
+ outline: "none",
564
+ transition: "all 0.2s"
565
+ },
566
+ fieldRo: {
567
+ background: "#f1f5f9",
568
+ color: "#475569",
569
+ border: "1px solid #e2e8f0",
570
+ padding: "7px 11px",
571
+ fontSize: 14,
572
+ borderRadius: 4,
573
+ width: "100%",
574
+ boxSizing: "border-box",
575
+ fontWeight: 500
576
+ },
577
+ fieldMessage: { fontSize: 12, lineHeight: 1.4 },
578
+ fieldHint: { fontSize: 11.5, color: N.textDisabled, lineHeight: 1.4 }
579
+ }, W = oe.colors, Y = {
580
+ pass: { bg: "#f6ffed", border: "#b7eb8f", color: "#389e0d", icon: "✓" },
581
+ error: { bg: "#fff1f0", border: "#ffa39e", color: W.error, icon: "✕" },
582
+ warning: { bg: "#fffbe6", border: "#ffe58f", color: "#d48806", icon: "!" },
583
+ info: { bg: "#e6f4ff", border: "#91caff", color: W.info, icon: "i" }
584
+ }, Ge = ({
585
+ allFields: e,
586
+ formData: n,
587
+ validationErrors: x,
588
+ fieldValidation: m,
589
+ validatedFieldNames: u,
590
+ focusedField: c,
591
+ resolveText: f
592
+ }) => {
593
+ const l = E(() => {
594
+ const p = [], r = /* @__PURE__ */ new Set(), v = new Map(e.map((t) => [t.name, f(t.label)])), d = (t) => v.get(t) || t;
595
+ for (const [t, j] of Object.entries(x))
596
+ !j || r.has(t) || (p.push({ name: t, label: d(t), tone: "error", message: j }), r.add(t));
597
+ for (const [t, j] of Object.entries(m))
598
+ !j || r.has(t) || (p.push({ name: t, label: d(t), tone: j.level === "info" ? "info" : "warning", message: j.message }), r.add(t));
599
+ for (const t of e) {
600
+ if (r.has(t.name) || !u.has(t.name)) continue;
601
+ const j = n[t.name];
602
+ j != null && j !== "" && (p.push({ name: t.name, label: d(t.name), tone: "pass", message: "校验通过" }), r.add(t.name));
603
+ }
604
+ const h = { error: 0, warning: 1, info: 2, pass: 3 };
605
+ return p.sort((t, j) => h[t.tone] - h[j.tone]);
606
+ }, [e, n, x, m, u, f]), s = E(() => l.filter((p) => p.tone === "error").length, [l]), b = E(
607
+ () => l.filter((p) => p.tone === "warning" || p.tone === "info").length,
608
+ [l]
609
+ ), a = E(() => {
610
+ let p = 0;
611
+ for (const r of e) {
612
+ if (r.readonly || u.has(r.name)) continue;
613
+ const v = n[r.name];
614
+ v != null && v !== "" && (p += 1);
615
+ }
616
+ return p;
617
+ }, [e, n, u]);
618
+ return /* @__PURE__ */ o.jsxs("aside", { style: I.panel, children: [
619
+ /* @__PURE__ */ o.jsxs("div", { style: I.panelHeader, children: [
620
+ /* @__PURE__ */ o.jsx("span", { style: I.panelHeaderIcon, children: "🤖" }),
621
+ " AI 实时辅助",
622
+ /* @__PURE__ */ o.jsx("span", { style: I.onlineBadge, children: "引擎已就绪" })
623
+ ] }),
624
+ /* @__PURE__ */ o.jsxs("div", { style: I.body, children: [
625
+ /* @__PURE__ */ o.jsx("div", { style: I.sectionLabel, children: "当前字段引导" }),
626
+ /* @__PURE__ */ o.jsx("div", { style: I.hintBox, children: c ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
627
+ /* @__PURE__ */ o.jsx("div", { style: I.hintTitle, children: f(c.label) }),
628
+ /* @__PURE__ */ o.jsx("div", { style: I.hintContent, children: c.hint ? f(c.hint) : "请根据场景资料与填写规范完成本字段。" })
629
+ ] }) : /* @__PURE__ */ o.jsx("div", { style: I.hintContent, children: "点击左侧表单中的输入框,这里将显示该字段的填写引导。" }) }),
630
+ /* @__PURE__ */ o.jsx("div", { style: { ...I.sectionLabel, marginTop: 20 }, children: "实时校验动态" }),
631
+ (s > 0 || b > 0) && /* @__PURE__ */ o.jsx(
632
+ "div",
633
+ {
634
+ style: {
635
+ ...I.valSummary,
636
+ background: s > 0 ? Y.error.bg : Y.warning.bg,
637
+ borderColor: s > 0 ? Y.error.border : Y.warning.border,
638
+ color: s > 0 ? Y.error.color : Y.warning.color
639
+ },
640
+ children: s > 0 ? `✕ ${s} 处校验未通过,请修正后再提交${b > 0 ? `(另有 ${b} 处提示)` : ""}` : `! ${b} 处提示需确认`
641
+ }
642
+ ),
643
+ /* @__PURE__ */ o.jsx("div", { style: I.valList, children: l.length === 0 && a === 0 ? /* @__PURE__ */ o.jsx("div", { style: I.emptyHint, children: "暂无校验数据,请开始填写表单…" }) : l.map((p) => {
644
+ const r = Y[p.tone];
645
+ return /* @__PURE__ */ o.jsxs(
646
+ "div",
647
+ {
648
+ style: { ...I.valItem, background: r.bg, borderColor: r.border },
649
+ children: [
650
+ /* @__PURE__ */ o.jsx("span", { style: { ...I.valIcon, color: r.color }, children: r.icon }),
651
+ /* @__PURE__ */ o.jsxs("span", { style: { color: r.color, fontSize: 12.5, lineHeight: 1.5 }, children: [
652
+ /* @__PURE__ */ o.jsx("strong", { children: p.label }),
653
+ ":",
654
+ p.message
655
+ ] })
656
+ ]
657
+ },
658
+ p.name
659
+ );
660
+ }) }),
661
+ a > 0 && /* @__PURE__ */ o.jsxs("div", { style: I.neutralNote, children: [
662
+ "另有 ",
663
+ a,
664
+ " 个已填字段无自动校验项,内容正确性将在提交后评估。"
665
+ ] })
666
+ ] })
667
+ ] });
668
+ }, I = {
669
+ panel: {
670
+ width: 320,
671
+ flexShrink: 0,
672
+ background: "#f8fafc",
673
+ borderLeft: `1px solid ${W.border}`,
674
+ display: "flex",
675
+ flexDirection: "column",
676
+ overflow: "hidden"
677
+ },
678
+ panelHeader: {
679
+ display: "flex",
680
+ alignItems: "center",
681
+ gap: 8,
682
+ padding: "14px 18px",
683
+ background: "#fff",
684
+ borderBottom: `1px solid ${W.border}`,
685
+ fontSize: 13.5,
686
+ fontWeight: 700,
687
+ color: W.textPrimary
688
+ },
689
+ panelHeaderIcon: { fontSize: 16 },
690
+ onlineBadge: {
691
+ marginLeft: "auto",
692
+ fontSize: 11,
693
+ color: "#389e0d",
694
+ background: "#f6ffed",
695
+ border: "1px solid #b7eb8f",
696
+ borderRadius: 10,
697
+ padding: "1px 8px"
698
+ },
699
+ body: { flex: 1, overflowY: "auto", padding: 18 },
700
+ sectionLabel: {
701
+ fontSize: 11,
702
+ fontWeight: 700,
703
+ color: W.textDisabled,
704
+ letterSpacing: 1,
705
+ textTransform: "uppercase",
706
+ marginBottom: 10
707
+ },
708
+ hintBox: {
709
+ background: "#fff",
710
+ border: "1px solid #e0eaff",
711
+ borderLeft: `3px solid ${W.primary}`,
712
+ borderRadius: 8,
713
+ padding: 14
714
+ },
715
+ hintTitle: { fontSize: 14, fontWeight: 700, color: W.textPrimary, marginBottom: 6 },
716
+ hintContent: { fontSize: 12.5, color: W.textSecondary, lineHeight: 1.6 },
717
+ valSummary: {
718
+ // 拆分写法:渲染处按状态叠加 borderColor,基态用 border 简写会构成简写/非简写混用告警
719
+ borderWidth: 1,
720
+ borderStyle: "solid",
721
+ borderRadius: 6,
722
+ padding: "8px 12px",
723
+ marginBottom: 10,
724
+ fontSize: 12.5,
725
+ fontWeight: 700,
726
+ lineHeight: 1.5
727
+ },
728
+ valList: { display: "flex", flexDirection: "column", gap: 8 },
729
+ emptyHint: {
730
+ fontSize: 12.5,
731
+ color: W.textDisabled,
732
+ fontStyle: "italic",
733
+ padding: "12px 14px",
734
+ background: "#f1f5f9",
735
+ border: "1px dashed #d0d7de",
736
+ borderRadius: 6
737
+ },
738
+ valItem: {
739
+ display: "flex",
740
+ alignItems: "flex-start",
741
+ gap: 8,
742
+ padding: "9px 12px",
743
+ // 拆分写法:渲染处会叠加 borderColor(按状态着色),基态用 border 简写会构成简写/非简写混用
744
+ borderWidth: 1,
745
+ borderStyle: "solid",
746
+ borderRadius: 6
747
+ },
748
+ valIcon: { fontWeight: 700, fontSize: 13, lineHeight: 1.5, flexShrink: 0 },
749
+ neutralNote: {
750
+ marginTop: 10,
751
+ fontSize: 11.5,
752
+ color: W.textDisabled,
753
+ lineHeight: 1.5,
754
+ padding: "8px 12px",
755
+ background: "#f1f5f9",
756
+ borderRadius: 6
757
+ }
758
+ }, fe = (e) => e != null && e !== "";
759
+ function Oe(e) {
760
+ if (!e) return;
761
+ const n = [];
762
+ e.scenario && n.push(String(e.scenario));
763
+ const x = (f) => f && typeof f == "object" ? Object.entries(f).filter(([, l]) => l != null && typeof l != "object").map(([l, s]) => `${l}:${s}`).join(";") : "", m = x(e.customerInfo);
764
+ m && n.push(`客户信息:${m}`);
765
+ const u = x(e.businessData);
766
+ u && n.push(`业务数据:${u}`);
767
+ const c = n.join(`
768
+ `);
769
+ return c.length > 0 ? c.slice(0, 1200) : void 0;
770
+ }
771
+ const G = oe.colors, Ye = ({ initData: e, runtimeRules: n, onFinish: x, onRealtimeData: m }) => {
772
+ var ie, ae, ce;
773
+ const u = ue((w) => w.filledData), c = Z(/* @__PURE__ */ new Set()), f = Z(0), l = Z(""), s = O((w) => {
774
+ c.current.add(w), f.current = Date.now();
775
+ }, []), b = ze(e, n, { onRealtimeData: m, onFieldChanged: s }), {
776
+ forms: a,
777
+ allFields: p,
778
+ formData: r,
779
+ validationErrors: v,
780
+ fieldValidation: d,
781
+ caseData: h,
782
+ validatedFieldNames: t,
783
+ handleFieldChange: j,
784
+ checkSubmit: z
785
+ } = b, [P, H] = K(""), [_, re] = K(null), g = E(() => ({ ...h || {}, ...e || {} }), [h, e]), i = O(
786
+ (w) => w ? ke(w, g, u) : "",
787
+ [g, u]
788
+ ), S = P || ((ie = a[0]) == null ? void 0 : ie.formName) || "", $ = E(() => {
789
+ const w = p.length, R = p.filter((Q) => {
790
+ const C = r[Q.name];
791
+ return C != null && C !== "";
792
+ }).length, U = w > 0 ? Math.round(R / w * 100) : 0;
793
+ return { total: w, filled: R, percent: U };
794
+ }, [p, r]), A = me("COACH_AGENT"), y = (e == null ? void 0 : e.currentUser) || { userId: "", name: "" }, { token: L } = Ne(A, y), { evaluateFormGuidance: X, resetGuidance: J } = Ee(L, { domain: e == null ? void 0 : e.domain }), k = n == null ? void 0 : n.realtimeGuidance, se = (k == null ? void 0 : k.enabled) !== !1, le = Z(() => {
795
+ });
796
+ le.current = () => {
797
+ if (c.current.size === 0 || !L) return;
798
+ const w = (k == null ? void 0 : k.settleMs) ?? 1500;
799
+ if (Date.now() - f.current < w) return;
800
+ const R = p.filter((B) => fe(r[B.name]) && !B.readonly).map((B) => ({ label: i(B.label), value: String(r[B.name]) })), U = JSON.stringify(R);
801
+ if (U === l.current) {
802
+ c.current.clear();
803
+ return;
804
+ }
805
+ l.current = U;
806
+ const Q = [...c.current];
807
+ c.current.clear();
808
+ const C = Q.map((B) => {
809
+ const q = p.find((D) => D.name === B);
810
+ return { label: q ? i(q.label) : B, value: String(r[B] ?? "") };
811
+ }), M = p.filter((B) => B.required), V = {
812
+ modelName: e == null ? void 0 : e.modelName,
813
+ domain: e == null ? void 0 : e.domain,
814
+ businessType: e == null ? void 0 : e.businessType,
815
+ targetPosition: e == null ? void 0 : e.targetPosition,
816
+ scenario: i(e == null ? void 0 : e.scenario),
817
+ formName: a.map((B) => i(B.title) || B.formName).join(" / "),
818
+ caseBackground: Oe(h),
819
+ filledSnapshot: R,
820
+ changedFields: C,
821
+ requiredTotal: M.length,
822
+ requiredFilled: M.filter((B) => fe(r[B.name])).length,
823
+ deterministicFindings: Object.entries(v).map(
824
+ ([B, q]) => {
825
+ var D;
826
+ return `${((D = p.find((be) => be.name === B)) == null ? void 0 : D.label) || B}:${q}`;
827
+ }
828
+ ),
829
+ businessRules: (n == null ? void 0 : n.businessRules) || (e == null ? void 0 : e.businessRules)
830
+ };
831
+ X(V);
832
+ }, ee(() => {
833
+ if (!se) return;
834
+ const w = (k == null ? void 0 : k.intervalMs) ?? 5e3, R = setInterval(() => le.current(), w);
835
+ return () => clearInterval(R);
836
+ }, [se, k == null ? void 0 : k.intervalMs]), ee(() => {
837
+ J(), c.current.clear(), l.current = "";
838
+ }, [e == null ? void 0 : e.stepId, J]);
839
+ const pe = ((ae = e == null ? void 0 : e.uiConfig) == null ? void 0 : ae.columns) ?? 2, ge = ((ce = e == null ? void 0 : e.uiConfig) == null ? void 0 : ce.submitButtonText) || "提交单证", he = O(() => {
840
+ const w = z();
841
+ if (!w.ok) {
842
+ we.warning(w.reason || "请完善表单后再提交"), w.firstErrorFormName && H(w.firstErrorFormName);
843
+ return;
844
+ }
845
+ const R = {};
846
+ a.forEach((C) => {
847
+ const M = {};
848
+ (C.fields || []).forEach((V) => {
849
+ r[V.name] !== void 0 && (M[V.name] = r[V.name]);
850
+ }), R[C.formName] = M;
851
+ });
852
+ const U = { ...r, __byForm: R }, Q = p.map((C) => C.name).filter((C) => r[C] != null && r[C] !== "");
853
+ x({
854
+ stepId: (e == null ? void 0 : e.stepId) || "unknown",
855
+ operationType: "form-submit",
856
+ operationData: U,
857
+ operationLog: [{ action: "submit", data: U, timestamp: Date.now() }],
858
+ timestamp: Date.now(),
859
+ evidenceSummary: Ie({
860
+ sourceStepId: (e == null ? void 0 : e.stepId) || "unknown",
861
+ sourceStepName: (e == null ? void 0 : e.stepName) || "表单填写",
862
+ sourceType: "form-filling",
863
+ title: `${(e == null ? void 0 : e.stepName) || "表单填写"}摘要`,
864
+ summary: `已完成 ${a.length} 张单证、共 ${Q.length} 个字段的填写。`,
865
+ keyFacts: Q.slice(0, 6).map((C) => {
866
+ var M;
867
+ return {
868
+ label: ((M = p.find((V) => V.name === C)) == null ? void 0 : M.label) || C,
869
+ value: String(r[C] ?? "")
870
+ };
871
+ })
872
+ })
873
+ });
874
+ }, [z, a, r, p, e, x]);
875
+ return a.length === 0 ? /* @__PURE__ */ o.jsx(Be, { message: "表单模板未找到", description: "该步骤未配置 forms 或 formTemplate。", type: "error", showIcon: !0 }) : /* @__PURE__ */ o.jsxs("div", { style: T.root, children: [
876
+ /* @__PURE__ */ o.jsxs("div", { style: T.topBar, children: [
877
+ /* @__PURE__ */ o.jsx("div", { style: T.topTitle, children: i(e == null ? void 0 : e.stepName) || "保险单证填写" }),
878
+ /* @__PURE__ */ o.jsxs("div", { style: T.progressWrap, children: [
879
+ /* @__PURE__ */ o.jsxs("div", { style: T.progressMeta, children: [
880
+ /* @__PURE__ */ o.jsxs("span", { children: [
881
+ "完成进度:",
882
+ $.filled,
883
+ " / ",
884
+ $.total
885
+ ] }),
886
+ /* @__PURE__ */ o.jsxs("span", { style: { color: G.primary, fontWeight: 700 }, children: [
887
+ $.percent,
888
+ "%"
889
+ ] })
890
+ ] }),
891
+ /* @__PURE__ */ o.jsx("div", { style: T.progressTrack, children: /* @__PURE__ */ o.jsx("div", { style: { ...T.progressBar, width: `${$.percent}%` } }) })
892
+ ] })
893
+ ] }),
894
+ /* @__PURE__ */ o.jsxs("div", { style: T.main, children: [
895
+ /* @__PURE__ */ o.jsx("div", { style: T.center, children: /* @__PURE__ */ o.jsx(
896
+ Ae,
897
+ {
898
+ forms: a,
899
+ formData: r,
900
+ validationErrors: v,
901
+ fieldValidation: d,
902
+ columns: pe,
903
+ activeFormName: S,
904
+ onActiveFormChange: H,
905
+ onFieldChange: j,
906
+ onFieldFocus: re,
907
+ resolveText: i
908
+ }
909
+ ) }),
910
+ /* @__PURE__ */ o.jsx(
911
+ Ge,
912
+ {
913
+ allFields: p,
914
+ formData: r,
915
+ validationErrors: v,
916
+ fieldValidation: d,
917
+ validatedFieldNames: t,
918
+ focusedField: _,
919
+ resolveText: i
920
+ }
921
+ )
922
+ ] }),
923
+ /* @__PURE__ */ o.jsxs("div", { style: T.bottomBar, children: [
924
+ /* @__PURE__ */ o.jsx("span", { style: T.bottomHint, children: Object.keys(v).length > 0 ? `存在 ${Object.keys(v).length} 处需修正的问题` : "请核对各单证信息后提交" }),
925
+ /* @__PURE__ */ o.jsx(Ce, { type: "primary", size: "large", onClick: he, children: ge })
926
+ ] })
927
+ ] });
928
+ }, T = {
929
+ root: {
930
+ display: "flex",
931
+ flexDirection: "column",
932
+ height: "100%",
933
+ minHeight: "78vh",
934
+ background: G.background
935
+ },
936
+ topBar: {
937
+ display: "flex",
938
+ alignItems: "center",
939
+ gap: 24,
940
+ padding: "12px 24px",
941
+ background: "#fff",
942
+ borderBottom: `1px solid ${G.border}`
943
+ },
944
+ topTitle: { fontSize: 16, fontWeight: 700, color: G.textPrimary, whiteSpace: "nowrap" },
945
+ progressWrap: { flex: 1, maxWidth: 520 },
946
+ progressMeta: {
947
+ display: "flex",
948
+ justifyContent: "space-between",
949
+ fontSize: 12.5,
950
+ color: G.textSecondary,
951
+ marginBottom: 4
952
+ },
953
+ progressTrack: { width: "100%", height: 8, background: "#e9eef5", borderRadius: 4, overflow: "hidden" },
954
+ progressBar: { height: 8, background: G.primary, borderRadius: 4, transition: "width 0.4s ease" },
955
+ main: { display: "flex", flex: 1, minHeight: 0, overflow: "hidden" },
956
+ center: { flex: 1, minWidth: 0, overflowY: "auto", padding: "24px 26px" },
957
+ bottomBar: {
958
+ display: "flex",
959
+ alignItems: "center",
960
+ justifyContent: "space-between",
961
+ padding: "12px 24px",
962
+ background: "#fff",
963
+ borderTop: `1px solid ${G.border}`
964
+ },
965
+ bottomHint: { fontSize: 13, color: G.textSecondary }
966
+ };
967
+ export {
968
+ Ye as default
969
+ };