@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,3307 @@
1
+ import M, { useRef as I, useMemo as A, useLayoutEffect as Bn, useEffect as N, useCallback as F, useState as $, memo as Fn, useReducer as $n, createContext as Ye, useContext as ve, cloneElement as Xn, forwardRef as jn } from "react";
2
+ import { unstable_batchedUpdates as Ze, createPortal as Yn } from "react-dom";
3
+ function Kn() {
4
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
5
+ t[n] = arguments[n];
6
+ return A(
7
+ () => (r) => {
8
+ t.forEach((o) => o(r));
9
+ },
10
+ // eslint-disable-next-line react-hooks/exhaustive-deps
11
+ t
12
+ );
13
+ }
14
+ const ct = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
15
+ function Re(e) {
16
+ const t = Object.prototype.toString.call(e);
17
+ return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
18
+ t === "[object global]";
19
+ }
20
+ function Rt(e) {
21
+ return "nodeType" in e;
22
+ }
23
+ function X(e) {
24
+ var t, n;
25
+ return e ? Re(e) ? e : Rt(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
26
+ }
27
+ function Et(e) {
28
+ const {
29
+ Document: t
30
+ } = X(e);
31
+ return e instanceof t;
32
+ }
33
+ function Ke(e) {
34
+ return Re(e) ? !1 : e instanceof X(e).HTMLElement;
35
+ }
36
+ function Qt(e) {
37
+ return e instanceof X(e).SVGElement;
38
+ }
39
+ function Ee(e) {
40
+ return e ? Re(e) ? e.document : Rt(e) ? Et(e) ? e : Ke(e) || Qt(e) ? e.ownerDocument : document : document : document;
41
+ }
42
+ const _ = ct ? Bn : N;
43
+ function ut(e) {
44
+ const t = I(e);
45
+ return _(() => {
46
+ t.current = e;
47
+ }), F(function() {
48
+ for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
49
+ r[o] = arguments[o];
50
+ return t.current == null ? void 0 : t.current(...r);
51
+ }, []);
52
+ }
53
+ function Wn() {
54
+ const e = I(null), t = F((r, o) => {
55
+ e.current = setInterval(r, o);
56
+ }, []), n = F(() => {
57
+ e.current !== null && (clearInterval(e.current), e.current = null);
58
+ }, []);
59
+ return [t, n];
60
+ }
61
+ function $e(e, t) {
62
+ t === void 0 && (t = [e]);
63
+ const n = I(e);
64
+ return _(() => {
65
+ n.current !== e && (n.current = e);
66
+ }, t), n;
67
+ }
68
+ function We(e, t) {
69
+ const n = I();
70
+ return A(
71
+ () => {
72
+ const r = e(n.current);
73
+ return n.current = r, r;
74
+ },
75
+ // eslint-disable-next-line react-hooks/exhaustive-deps
76
+ [...t]
77
+ );
78
+ }
79
+ function rt(e) {
80
+ const t = ut(e), n = I(null), r = F(
81
+ (o) => {
82
+ o !== n.current && (t == null || t(o, n.current)), n.current = o;
83
+ },
84
+ //eslint-disable-next-line
85
+ []
86
+ );
87
+ return [n, r];
88
+ }
89
+ function ot(e) {
90
+ const t = I();
91
+ return N(() => {
92
+ t.current = e;
93
+ }, [e]), t.current;
94
+ }
95
+ let mt = {};
96
+ function Ue(e, t) {
97
+ return A(() => {
98
+ if (t)
99
+ return t;
100
+ const n = mt[e] == null ? 0 : mt[e] + 1;
101
+ return mt[e] = n, e + "-" + n;
102
+ }, [e, t]);
103
+ }
104
+ function Zt(e) {
105
+ return function(t) {
106
+ for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
107
+ r[o - 1] = arguments[o];
108
+ return r.reduce((i, s) => {
109
+ const a = Object.entries(s);
110
+ for (const [l, c] of a) {
111
+ const d = i[l];
112
+ d != null && (i[l] = d + e * c);
113
+ }
114
+ return i;
115
+ }, {
116
+ ...t
117
+ });
118
+ };
119
+ }
120
+ const Se = /* @__PURE__ */ Zt(1), Xe = /* @__PURE__ */ Zt(-1);
121
+ function Un(e) {
122
+ return "clientX" in e && "clientY" in e;
123
+ }
124
+ function dt(e) {
125
+ if (!e)
126
+ return !1;
127
+ const {
128
+ KeyboardEvent: t
129
+ } = X(e.target);
130
+ return t && e instanceof t;
131
+ }
132
+ function Hn(e) {
133
+ if (!e)
134
+ return !1;
135
+ const {
136
+ TouchEvent: t
137
+ } = X(e.target);
138
+ return t && e instanceof t;
139
+ }
140
+ function it(e) {
141
+ if (Hn(e)) {
142
+ if (e.touches && e.touches.length) {
143
+ const {
144
+ clientX: t,
145
+ clientY: n
146
+ } = e.touches[0];
147
+ return {
148
+ x: t,
149
+ y: n
150
+ };
151
+ } else if (e.changedTouches && e.changedTouches.length) {
152
+ const {
153
+ clientX: t,
154
+ clientY: n
155
+ } = e.changedTouches[0];
156
+ return {
157
+ x: t,
158
+ y: n
159
+ };
160
+ }
161
+ }
162
+ return Un(e) ? {
163
+ x: e.clientX,
164
+ y: e.clientY
165
+ } : null;
166
+ }
167
+ const be = /* @__PURE__ */ Object.freeze({
168
+ Translate: {
169
+ toString(e) {
170
+ if (!e)
171
+ return;
172
+ const {
173
+ x: t,
174
+ y: n
175
+ } = e;
176
+ return "translate3d(" + (t ? Math.round(t) : 0) + "px, " + (n ? Math.round(n) : 0) + "px, 0)";
177
+ }
178
+ },
179
+ Scale: {
180
+ toString(e) {
181
+ if (!e)
182
+ return;
183
+ const {
184
+ scaleX: t,
185
+ scaleY: n
186
+ } = e;
187
+ return "scaleX(" + t + ") scaleY(" + n + ")";
188
+ }
189
+ },
190
+ Transform: {
191
+ toString(e) {
192
+ if (e)
193
+ return [be.Translate.toString(e), be.Scale.toString(e)].join(" ");
194
+ }
195
+ },
196
+ Transition: {
197
+ toString(e) {
198
+ let {
199
+ property: t,
200
+ duration: n,
201
+ easing: r
202
+ } = e;
203
+ return t + " " + n + "ms " + r;
204
+ }
205
+ }
206
+ }), Ft = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
207
+ function Vn(e) {
208
+ return e.matches(Ft) ? e : e.querySelector(Ft);
209
+ }
210
+ const qn = {
211
+ display: "none"
212
+ };
213
+ function Gn(e) {
214
+ let {
215
+ id: t,
216
+ value: n
217
+ } = e;
218
+ return M.createElement("div", {
219
+ id: t,
220
+ style: qn
221
+ }, n);
222
+ }
223
+ function Jn(e) {
224
+ let {
225
+ id: t,
226
+ announcement: n,
227
+ ariaLiveType: r = "assertive"
228
+ } = e;
229
+ const o = {
230
+ position: "fixed",
231
+ top: 0,
232
+ left: 0,
233
+ width: 1,
234
+ height: 1,
235
+ margin: -1,
236
+ border: 0,
237
+ padding: 0,
238
+ overflow: "hidden",
239
+ clip: "rect(0 0 0 0)",
240
+ clipPath: "inset(100%)",
241
+ whiteSpace: "nowrap"
242
+ };
243
+ return M.createElement("div", {
244
+ id: t,
245
+ style: o,
246
+ role: "status",
247
+ "aria-live": r,
248
+ "aria-atomic": !0
249
+ }, n);
250
+ }
251
+ function _n() {
252
+ const [e, t] = $("");
253
+ return {
254
+ announce: F((r) => {
255
+ r != null && t(r);
256
+ }, []),
257
+ announcement: e
258
+ };
259
+ }
260
+ const en = /* @__PURE__ */ Ye(null);
261
+ function Qn(e) {
262
+ const t = ve(en);
263
+ N(() => {
264
+ if (!t)
265
+ throw new Error("useDndMonitor must be used within a children of <DndContext>");
266
+ return t(e);
267
+ }, [e, t]);
268
+ }
269
+ function Zn() {
270
+ const [e] = $(() => /* @__PURE__ */ new Set()), t = F((r) => (e.add(r), () => e.delete(r)), [e]);
271
+ return [F((r) => {
272
+ let {
273
+ type: o,
274
+ event: i
275
+ } = r;
276
+ e.forEach((s) => {
277
+ var a;
278
+ return (a = s[o]) == null ? void 0 : a.call(s, i);
279
+ });
280
+ }, [e]), t];
281
+ }
282
+ const er = {
283
+ draggable: `
284
+ To pick up a draggable item, press the space bar.
285
+ While dragging, use the arrow keys to move the item.
286
+ Press space again to drop the item in its new position, or press escape to cancel.
287
+ `
288
+ }, tr = {
289
+ onDragStart(e) {
290
+ let {
291
+ active: t
292
+ } = e;
293
+ return "Picked up draggable item " + t.id + ".";
294
+ },
295
+ onDragOver(e) {
296
+ let {
297
+ active: t,
298
+ over: n
299
+ } = e;
300
+ return n ? "Draggable item " + t.id + " was moved over droppable area " + n.id + "." : "Draggable item " + t.id + " is no longer over a droppable area.";
301
+ },
302
+ onDragEnd(e) {
303
+ let {
304
+ active: t,
305
+ over: n
306
+ } = e;
307
+ return n ? "Draggable item " + t.id + " was dropped over droppable area " + n.id : "Draggable item " + t.id + " was dropped.";
308
+ },
309
+ onDragCancel(e) {
310
+ let {
311
+ active: t
312
+ } = e;
313
+ return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
314
+ }
315
+ };
316
+ function nr(e) {
317
+ let {
318
+ announcements: t = tr,
319
+ container: n,
320
+ hiddenTextDescribedById: r,
321
+ screenReaderInstructions: o = er
322
+ } = e;
323
+ const {
324
+ announce: i,
325
+ announcement: s
326
+ } = _n(), a = Ue("DndLiveRegion"), [l, c] = $(!1);
327
+ if (N(() => {
328
+ c(!0);
329
+ }, []), Qn(A(() => ({
330
+ onDragStart(u) {
331
+ let {
332
+ active: g
333
+ } = u;
334
+ i(t.onDragStart({
335
+ active: g
336
+ }));
337
+ },
338
+ onDragMove(u) {
339
+ let {
340
+ active: g,
341
+ over: f
342
+ } = u;
343
+ t.onDragMove && i(t.onDragMove({
344
+ active: g,
345
+ over: f
346
+ }));
347
+ },
348
+ onDragOver(u) {
349
+ let {
350
+ active: g,
351
+ over: f
352
+ } = u;
353
+ i(t.onDragOver({
354
+ active: g,
355
+ over: f
356
+ }));
357
+ },
358
+ onDragEnd(u) {
359
+ let {
360
+ active: g,
361
+ over: f
362
+ } = u;
363
+ i(t.onDragEnd({
364
+ active: g,
365
+ over: f
366
+ }));
367
+ },
368
+ onDragCancel(u) {
369
+ let {
370
+ active: g,
371
+ over: f
372
+ } = u;
373
+ i(t.onDragCancel({
374
+ active: g,
375
+ over: f
376
+ }));
377
+ }
378
+ }), [i, t])), !l)
379
+ return null;
380
+ const d = M.createElement(M.Fragment, null, M.createElement(Gn, {
381
+ id: r,
382
+ value: o.draggable
383
+ }), M.createElement(Jn, {
384
+ id: a,
385
+ announcement: s
386
+ }));
387
+ return n ? Yn(d, n) : d;
388
+ }
389
+ var P;
390
+ (function(e) {
391
+ e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
392
+ })(P || (P = {}));
393
+ function st() {
394
+ }
395
+ function Lo(e, t) {
396
+ return A(
397
+ () => ({
398
+ sensor: e,
399
+ options: t ?? {}
400
+ }),
401
+ // eslint-disable-next-line react-hooks/exhaustive-deps
402
+ [e, t]
403
+ );
404
+ }
405
+ function Po() {
406
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
407
+ t[n] = arguments[n];
408
+ return A(
409
+ () => [...t].filter((r) => r != null),
410
+ // eslint-disable-next-line react-hooks/exhaustive-deps
411
+ [...t]
412
+ );
413
+ }
414
+ const Q = /* @__PURE__ */ Object.freeze({
415
+ x: 0,
416
+ y: 0
417
+ });
418
+ function tn(e, t) {
419
+ return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
420
+ }
421
+ function rr(e, t) {
422
+ const n = it(e);
423
+ if (!n)
424
+ return "0 0";
425
+ const r = {
426
+ x: (n.x - t.left) / t.width * 100,
427
+ y: (n.y - t.top) / t.height * 100
428
+ };
429
+ return r.x + "% " + r.y + "%";
430
+ }
431
+ function nn(e, t) {
432
+ let {
433
+ data: {
434
+ value: n
435
+ }
436
+ } = e, {
437
+ data: {
438
+ value: r
439
+ }
440
+ } = t;
441
+ return n - r;
442
+ }
443
+ function or(e, t) {
444
+ let {
445
+ data: {
446
+ value: n
447
+ }
448
+ } = e, {
449
+ data: {
450
+ value: r
451
+ }
452
+ } = t;
453
+ return r - n;
454
+ }
455
+ function $t(e) {
456
+ let {
457
+ left: t,
458
+ top: n,
459
+ height: r,
460
+ width: o
461
+ } = e;
462
+ return [{
463
+ x: t,
464
+ y: n
465
+ }, {
466
+ x: t + o,
467
+ y: n
468
+ }, {
469
+ x: t,
470
+ y: n + r
471
+ }, {
472
+ x: t + o,
473
+ y: n + r
474
+ }];
475
+ }
476
+ function rn(e, t) {
477
+ if (!e || e.length === 0)
478
+ return null;
479
+ const [n] = e;
480
+ return n[t];
481
+ }
482
+ function Xt(e, t, n) {
483
+ return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
484
+ x: t + e.width * 0.5,
485
+ y: n + e.height * 0.5
486
+ };
487
+ }
488
+ const ko = (e) => {
489
+ let {
490
+ collisionRect: t,
491
+ droppableRects: n,
492
+ droppableContainers: r
493
+ } = e;
494
+ const o = Xt(t, t.left, t.top), i = [];
495
+ for (const s of r) {
496
+ const {
497
+ id: a
498
+ } = s, l = n.get(a);
499
+ if (l) {
500
+ const c = tn(Xt(l), o);
501
+ i.push({
502
+ id: a,
503
+ data: {
504
+ droppableContainer: s,
505
+ value: c
506
+ }
507
+ });
508
+ }
509
+ }
510
+ return i.sort(nn);
511
+ }, ir = (e) => {
512
+ let {
513
+ collisionRect: t,
514
+ droppableRects: n,
515
+ droppableContainers: r
516
+ } = e;
517
+ const o = $t(t), i = [];
518
+ for (const s of r) {
519
+ const {
520
+ id: a
521
+ } = s, l = n.get(a);
522
+ if (l) {
523
+ const c = $t(l), d = o.reduce((g, f, w) => g + tn(c[w], f), 0), u = Number((d / 4).toFixed(4));
524
+ i.push({
525
+ id: a,
526
+ data: {
527
+ droppableContainer: s,
528
+ value: u
529
+ }
530
+ });
531
+ }
532
+ }
533
+ return i.sort(nn);
534
+ };
535
+ function sr(e, t) {
536
+ const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), i = Math.min(t.top + t.height, e.top + e.height), s = o - r, a = i - n;
537
+ if (r < o && n < i) {
538
+ const l = t.width * t.height, c = e.width * e.height, d = s * a, u = d / (l + c - d);
539
+ return Number(u.toFixed(4));
540
+ }
541
+ return 0;
542
+ }
543
+ const ar = (e) => {
544
+ let {
545
+ collisionRect: t,
546
+ droppableRects: n,
547
+ droppableContainers: r
548
+ } = e;
549
+ const o = [];
550
+ for (const i of r) {
551
+ const {
552
+ id: s
553
+ } = i, a = n.get(s);
554
+ if (a) {
555
+ const l = sr(a, t);
556
+ l > 0 && o.push({
557
+ id: s,
558
+ data: {
559
+ droppableContainer: i,
560
+ value: l
561
+ }
562
+ });
563
+ }
564
+ }
565
+ return o.sort(or);
566
+ };
567
+ function lr(e, t, n) {
568
+ return {
569
+ ...e,
570
+ scaleX: t && n ? t.width / n.width : 1,
571
+ scaleY: t && n ? t.height / n.height : 1
572
+ };
573
+ }
574
+ function on(e, t) {
575
+ return e && t ? {
576
+ x: e.left - t.left,
577
+ y: e.top - t.top
578
+ } : Q;
579
+ }
580
+ function cr(e) {
581
+ return function(n) {
582
+ for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
583
+ o[i - 1] = arguments[i];
584
+ return o.reduce((s, a) => ({
585
+ ...s,
586
+ top: s.top + e * a.y,
587
+ bottom: s.bottom + e * a.y,
588
+ left: s.left + e * a.x,
589
+ right: s.right + e * a.x
590
+ }), {
591
+ ...n
592
+ });
593
+ };
594
+ }
595
+ const ur = /* @__PURE__ */ cr(1);
596
+ function sn(e) {
597
+ if (e.startsWith("matrix3d(")) {
598
+ const t = e.slice(9, -1).split(/, /);
599
+ return {
600
+ x: +t[12],
601
+ y: +t[13],
602
+ scaleX: +t[0],
603
+ scaleY: +t[5]
604
+ };
605
+ } else if (e.startsWith("matrix(")) {
606
+ const t = e.slice(7, -1).split(/, /);
607
+ return {
608
+ x: +t[4],
609
+ y: +t[5],
610
+ scaleX: +t[0],
611
+ scaleY: +t[3]
612
+ };
613
+ }
614
+ return null;
615
+ }
616
+ function dr(e, t, n) {
617
+ const r = sn(t);
618
+ if (!r)
619
+ return e;
620
+ const {
621
+ scaleX: o,
622
+ scaleY: i,
623
+ x: s,
624
+ y: a
625
+ } = r, l = e.left - s - (1 - o) * parseFloat(n), c = e.top - a - (1 - i) * parseFloat(n.slice(n.indexOf(" ") + 1)), d = o ? e.width / o : e.width, u = i ? e.height / i : e.height;
626
+ return {
627
+ width: d,
628
+ height: u,
629
+ top: c,
630
+ right: l + d,
631
+ bottom: c + u,
632
+ left: l
633
+ };
634
+ }
635
+ const fr = {
636
+ ignoreTransform: !1
637
+ };
638
+ function Ae(e, t) {
639
+ t === void 0 && (t = fr);
640
+ let n = e.getBoundingClientRect();
641
+ if (t.ignoreTransform) {
642
+ const {
643
+ transform: c,
644
+ transformOrigin: d
645
+ } = X(e).getComputedStyle(e);
646
+ c && (n = dr(n, c, d));
647
+ }
648
+ const {
649
+ top: r,
650
+ left: o,
651
+ width: i,
652
+ height: s,
653
+ bottom: a,
654
+ right: l
655
+ } = n;
656
+ return {
657
+ top: r,
658
+ left: o,
659
+ width: i,
660
+ height: s,
661
+ bottom: a,
662
+ right: l
663
+ };
664
+ }
665
+ function jt(e) {
666
+ return Ae(e, {
667
+ ignoreTransform: !0
668
+ });
669
+ }
670
+ function gr(e) {
671
+ const t = e.innerWidth, n = e.innerHeight;
672
+ return {
673
+ top: 0,
674
+ left: 0,
675
+ right: t,
676
+ bottom: n,
677
+ width: t,
678
+ height: n
679
+ };
680
+ }
681
+ function hr(e, t) {
682
+ return t === void 0 && (t = X(e).getComputedStyle(e)), t.position === "fixed";
683
+ }
684
+ function vr(e, t) {
685
+ t === void 0 && (t = X(e).getComputedStyle(e));
686
+ const n = /(auto|scroll|overlay)/;
687
+ return ["overflow", "overflowX", "overflowY"].some((o) => {
688
+ const i = t[o];
689
+ return typeof i == "string" ? n.test(i) : !1;
690
+ });
691
+ }
692
+ function ft(e, t) {
693
+ const n = [];
694
+ function r(o) {
695
+ if (t != null && n.length >= t || !o)
696
+ return n;
697
+ if (Et(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
698
+ return n.push(o.scrollingElement), n;
699
+ if (!Ke(o) || Qt(o) || n.includes(o))
700
+ return n;
701
+ const i = X(e).getComputedStyle(o);
702
+ return o !== e && vr(o, i) && n.push(o), hr(o, i) ? n : r(o.parentNode);
703
+ }
704
+ return e ? r(e) : n;
705
+ }
706
+ function an(e) {
707
+ const [t] = ft(e, 1);
708
+ return t ?? null;
709
+ }
710
+ function yt(e) {
711
+ return !ct || !e ? null : Re(e) ? e : Rt(e) ? Et(e) || e === Ee(e).scrollingElement ? window : Ke(e) ? e : null : null;
712
+ }
713
+ function ln(e) {
714
+ return Re(e) ? e.scrollX : e.scrollLeft;
715
+ }
716
+ function cn(e) {
717
+ return Re(e) ? e.scrollY : e.scrollTop;
718
+ }
719
+ function Dt(e) {
720
+ return {
721
+ x: ln(e),
722
+ y: cn(e)
723
+ };
724
+ }
725
+ var k;
726
+ (function(e) {
727
+ e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
728
+ })(k || (k = {}));
729
+ function un(e) {
730
+ return !ct || !e ? !1 : e === document.scrollingElement;
731
+ }
732
+ function dn(e) {
733
+ const t = {
734
+ x: 0,
735
+ y: 0
736
+ }, n = un(e) ? {
737
+ height: window.innerHeight,
738
+ width: window.innerWidth
739
+ } : {
740
+ height: e.clientHeight,
741
+ width: e.clientWidth
742
+ }, r = {
743
+ x: e.scrollWidth - n.width,
744
+ y: e.scrollHeight - n.height
745
+ }, o = e.scrollTop <= t.y, i = e.scrollLeft <= t.x, s = e.scrollTop >= r.y, a = e.scrollLeft >= r.x;
746
+ return {
747
+ isTop: o,
748
+ isLeft: i,
749
+ isBottom: s,
750
+ isRight: a,
751
+ maxScroll: r,
752
+ minScroll: t
753
+ };
754
+ }
755
+ const pr = {
756
+ x: 0.2,
757
+ y: 0.2
758
+ };
759
+ function br(e, t, n, r, o) {
760
+ let {
761
+ top: i,
762
+ left: s,
763
+ right: a,
764
+ bottom: l
765
+ } = n;
766
+ r === void 0 && (r = 10), o === void 0 && (o = pr);
767
+ const {
768
+ isTop: c,
769
+ isBottom: d,
770
+ isLeft: u,
771
+ isRight: g
772
+ } = dn(e), f = {
773
+ x: 0,
774
+ y: 0
775
+ }, w = {
776
+ x: 0,
777
+ y: 0
778
+ }, h = {
779
+ height: t.height * o.y,
780
+ width: t.width * o.x
781
+ };
782
+ return !c && i <= t.top + h.height ? (f.y = k.Backward, w.y = r * Math.abs((t.top + h.height - i) / h.height)) : !d && l >= t.bottom - h.height && (f.y = k.Forward, w.y = r * Math.abs((t.bottom - h.height - l) / h.height)), !g && a >= t.right - h.width ? (f.x = k.Forward, w.x = r * Math.abs((t.right - h.width - a) / h.width)) : !u && s <= t.left + h.width && (f.x = k.Backward, w.x = r * Math.abs((t.left + h.width - s) / h.width)), {
783
+ direction: f,
784
+ speed: w
785
+ };
786
+ }
787
+ function mr(e) {
788
+ if (e === document.scrollingElement) {
789
+ const {
790
+ innerWidth: i,
791
+ innerHeight: s
792
+ } = window;
793
+ return {
794
+ top: 0,
795
+ left: 0,
796
+ right: i,
797
+ bottom: s,
798
+ width: i,
799
+ height: s
800
+ };
801
+ }
802
+ const {
803
+ top: t,
804
+ left: n,
805
+ right: r,
806
+ bottom: o
807
+ } = e.getBoundingClientRect();
808
+ return {
809
+ top: t,
810
+ left: n,
811
+ right: r,
812
+ bottom: o,
813
+ width: e.clientWidth,
814
+ height: e.clientHeight
815
+ };
816
+ }
817
+ function fn(e) {
818
+ return e.reduce((t, n) => Se(t, Dt(n)), Q);
819
+ }
820
+ function yr(e) {
821
+ return e.reduce((t, n) => t + ln(n), 0);
822
+ }
823
+ function wr(e) {
824
+ return e.reduce((t, n) => t + cn(n), 0);
825
+ }
826
+ function gn(e, t) {
827
+ if (t === void 0 && (t = Ae), !e)
828
+ return;
829
+ const {
830
+ top: n,
831
+ left: r,
832
+ bottom: o,
833
+ right: i
834
+ } = t(e);
835
+ an(e) && (o <= 0 || i <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
836
+ block: "center",
837
+ inline: "center"
838
+ });
839
+ }
840
+ const xr = [["x", ["left", "right"], yr], ["y", ["top", "bottom"], wr]];
841
+ class At {
842
+ constructor(t, n) {
843
+ this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
844
+ const r = ft(n), o = fn(r);
845
+ this.rect = {
846
+ ...t
847
+ }, this.width = t.width, this.height = t.height;
848
+ for (const [i, s, a] of xr)
849
+ for (const l of s)
850
+ Object.defineProperty(this, l, {
851
+ get: () => {
852
+ const c = a(r), d = o[i] - c;
853
+ return this.rect[l] + d;
854
+ },
855
+ enumerable: !0
856
+ });
857
+ Object.defineProperty(this, "rect", {
858
+ enumerable: !1
859
+ });
860
+ }
861
+ }
862
+ class ze {
863
+ constructor(t) {
864
+ this.target = void 0, this.listeners = [], this.removeAll = () => {
865
+ this.listeners.forEach((n) => {
866
+ var r;
867
+ return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
868
+ });
869
+ }, this.target = t;
870
+ }
871
+ add(t, n, r) {
872
+ var o;
873
+ (o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
874
+ }
875
+ }
876
+ function Dr(e) {
877
+ const {
878
+ EventTarget: t
879
+ } = X(e);
880
+ return e instanceof t ? e : Ee(e);
881
+ }
882
+ function wt(e, t) {
883
+ const n = Math.abs(e.x), r = Math.abs(e.y);
884
+ return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
885
+ }
886
+ var q;
887
+ (function(e) {
888
+ e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
889
+ })(q || (q = {}));
890
+ function Yt(e) {
891
+ e.preventDefault();
892
+ }
893
+ function Cr(e) {
894
+ e.stopPropagation();
895
+ }
896
+ var D;
897
+ (function(e) {
898
+ e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
899
+ })(D || (D = {}));
900
+ const hn = {
901
+ start: [D.Space, D.Enter],
902
+ cancel: [D.Esc],
903
+ end: [D.Space, D.Enter, D.Tab]
904
+ }, Sr = (e, t) => {
905
+ let {
906
+ currentCoordinates: n
907
+ } = t;
908
+ switch (e.code) {
909
+ case D.Right:
910
+ return {
911
+ ...n,
912
+ x: n.x + 25
913
+ };
914
+ case D.Left:
915
+ return {
916
+ ...n,
917
+ x: n.x - 25
918
+ };
919
+ case D.Down:
920
+ return {
921
+ ...n,
922
+ y: n.y + 25
923
+ };
924
+ case D.Up:
925
+ return {
926
+ ...n,
927
+ y: n.y - 25
928
+ };
929
+ }
930
+ };
931
+ class vn {
932
+ constructor(t) {
933
+ this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
934
+ const {
935
+ event: {
936
+ target: n
937
+ }
938
+ } = t;
939
+ this.props = t, this.listeners = new ze(Ee(n)), this.windowListeners = new ze(X(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
940
+ }
941
+ attach() {
942
+ this.handleStart(), this.windowListeners.add(q.Resize, this.handleCancel), this.windowListeners.add(q.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(q.Keydown, this.handleKeyDown));
943
+ }
944
+ handleStart() {
945
+ const {
946
+ activeNode: t,
947
+ onStart: n
948
+ } = this.props, r = t.node.current;
949
+ r && gn(r), n(Q);
950
+ }
951
+ handleKeyDown(t) {
952
+ if (dt(t)) {
953
+ const {
954
+ active: n,
955
+ context: r,
956
+ options: o
957
+ } = this.props, {
958
+ keyboardCodes: i = hn,
959
+ coordinateGetter: s = Sr,
960
+ scrollBehavior: a = "smooth"
961
+ } = o, {
962
+ code: l
963
+ } = t;
964
+ if (i.end.includes(l)) {
965
+ this.handleEnd(t);
966
+ return;
967
+ }
968
+ if (i.cancel.includes(l)) {
969
+ this.handleCancel(t);
970
+ return;
971
+ }
972
+ const {
973
+ collisionRect: c
974
+ } = r.current, d = c ? {
975
+ x: c.left,
976
+ y: c.top
977
+ } : Q;
978
+ this.referenceCoordinates || (this.referenceCoordinates = d);
979
+ const u = s(t, {
980
+ active: n,
981
+ context: r.current,
982
+ currentCoordinates: d
983
+ });
984
+ if (u) {
985
+ const g = Xe(u, d), f = {
986
+ x: 0,
987
+ y: 0
988
+ }, {
989
+ scrollableAncestors: w
990
+ } = r.current;
991
+ for (const h of w) {
992
+ const v = t.code, {
993
+ isTop: b,
994
+ isRight: m,
995
+ isLeft: p,
996
+ isBottom: C,
997
+ maxScroll: S,
998
+ minScroll: R
999
+ } = dn(h), y = mr(h), x = {
1000
+ x: Math.min(v === D.Right ? y.right - y.width / 2 : y.right, Math.max(v === D.Right ? y.left : y.left + y.width / 2, u.x)),
1001
+ y: Math.min(v === D.Down ? y.bottom - y.height / 2 : y.bottom, Math.max(v === D.Down ? y.top : y.top + y.height / 2, u.y))
1002
+ }, T = v === D.Right && !m || v === D.Left && !p, L = v === D.Down && !C || v === D.Up && !b;
1003
+ if (T && x.x !== u.x) {
1004
+ const O = h.scrollLeft + g.x, G = v === D.Right && O <= S.x || v === D.Left && O >= R.x;
1005
+ if (G && !g.y) {
1006
+ h.scrollTo({
1007
+ left: O,
1008
+ behavior: a
1009
+ });
1010
+ return;
1011
+ }
1012
+ G ? f.x = h.scrollLeft - O : f.x = v === D.Right ? h.scrollLeft - S.x : h.scrollLeft - R.x, f.x && h.scrollBy({
1013
+ left: -f.x,
1014
+ behavior: a
1015
+ });
1016
+ break;
1017
+ } else if (L && x.y !== u.y) {
1018
+ const O = h.scrollTop + g.y, G = v === D.Down && O <= S.y || v === D.Up && O >= R.y;
1019
+ if (G && !g.x) {
1020
+ h.scrollTo({
1021
+ top: O,
1022
+ behavior: a
1023
+ });
1024
+ return;
1025
+ }
1026
+ G ? f.y = h.scrollTop - O : f.y = v === D.Down ? h.scrollTop - S.y : h.scrollTop - R.y, f.y && h.scrollBy({
1027
+ top: -f.y,
1028
+ behavior: a
1029
+ });
1030
+ break;
1031
+ }
1032
+ }
1033
+ this.handleMove(t, Se(Xe(u, this.referenceCoordinates), f));
1034
+ }
1035
+ }
1036
+ }
1037
+ handleMove(t, n) {
1038
+ const {
1039
+ onMove: r
1040
+ } = this.props;
1041
+ t.preventDefault(), r(n);
1042
+ }
1043
+ handleEnd(t) {
1044
+ const {
1045
+ onEnd: n
1046
+ } = this.props;
1047
+ t.preventDefault(), this.detach(), n();
1048
+ }
1049
+ handleCancel(t) {
1050
+ const {
1051
+ onCancel: n
1052
+ } = this.props;
1053
+ t.preventDefault(), this.detach(), n();
1054
+ }
1055
+ detach() {
1056
+ this.listeners.removeAll(), this.windowListeners.removeAll();
1057
+ }
1058
+ }
1059
+ vn.activators = [{
1060
+ eventName: "onKeyDown",
1061
+ handler: (e, t, n) => {
1062
+ let {
1063
+ keyboardCodes: r = hn,
1064
+ onActivation: o
1065
+ } = t, {
1066
+ active: i
1067
+ } = n;
1068
+ const {
1069
+ code: s
1070
+ } = e.nativeEvent;
1071
+ if (r.start.includes(s)) {
1072
+ const a = i.activatorNode.current;
1073
+ return a && e.target !== a ? !1 : (e.preventDefault(), o == null || o({
1074
+ event: e.nativeEvent
1075
+ }), !0);
1076
+ }
1077
+ return !1;
1078
+ }
1079
+ }];
1080
+ function Kt(e) {
1081
+ return !!(e && "distance" in e);
1082
+ }
1083
+ function Wt(e) {
1084
+ return !!(e && "delay" in e);
1085
+ }
1086
+ class Ot {
1087
+ constructor(t, n, r) {
1088
+ var o;
1089
+ r === void 0 && (r = Dr(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
1090
+ const {
1091
+ event: i
1092
+ } = t, {
1093
+ target: s
1094
+ } = i;
1095
+ this.props = t, this.events = n, this.document = Ee(s), this.documentListeners = new ze(this.document), this.listeners = new ze(r), this.windowListeners = new ze(X(s)), this.initialCoordinates = (o = it(i)) != null ? o : Q, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
1096
+ }
1097
+ attach() {
1098
+ const {
1099
+ events: t,
1100
+ props: {
1101
+ options: {
1102
+ activationConstraint: n,
1103
+ bypassActivationConstraint: r
1104
+ }
1105
+ }
1106
+ } = this;
1107
+ if (this.listeners.add(t.move.name, this.handleMove, {
1108
+ passive: !1
1109
+ }), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(q.Resize, this.handleCancel), this.windowListeners.add(q.DragStart, Yt), this.windowListeners.add(q.VisibilityChange, this.handleCancel), this.windowListeners.add(q.ContextMenu, Yt), this.documentListeners.add(q.Keydown, this.handleKeydown), n) {
1110
+ if (r != null && r({
1111
+ event: this.props.event,
1112
+ activeNode: this.props.activeNode,
1113
+ options: this.props.options
1114
+ }))
1115
+ return this.handleStart();
1116
+ if (Wt(n)) {
1117
+ this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
1118
+ return;
1119
+ }
1120
+ if (Kt(n)) {
1121
+ this.handlePending(n);
1122
+ return;
1123
+ }
1124
+ }
1125
+ this.handleStart();
1126
+ }
1127
+ detach() {
1128
+ this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
1129
+ }
1130
+ handlePending(t, n) {
1131
+ const {
1132
+ active: r,
1133
+ onPending: o
1134
+ } = this.props;
1135
+ o(r, t, this.initialCoordinates, n);
1136
+ }
1137
+ handleStart() {
1138
+ const {
1139
+ initialCoordinates: t
1140
+ } = this, {
1141
+ onStart: n
1142
+ } = this.props;
1143
+ t && (this.activated = !0, this.documentListeners.add(q.Click, Cr, {
1144
+ capture: !0
1145
+ }), this.removeTextSelection(), this.documentListeners.add(q.SelectionChange, this.removeTextSelection), n(t));
1146
+ }
1147
+ handleMove(t) {
1148
+ var n;
1149
+ const {
1150
+ activated: r,
1151
+ initialCoordinates: o,
1152
+ props: i
1153
+ } = this, {
1154
+ onMove: s,
1155
+ options: {
1156
+ activationConstraint: a
1157
+ }
1158
+ } = i;
1159
+ if (!o)
1160
+ return;
1161
+ const l = (n = it(t)) != null ? n : Q, c = Xe(o, l);
1162
+ if (!r && a) {
1163
+ if (Kt(a)) {
1164
+ if (a.tolerance != null && wt(c, a.tolerance))
1165
+ return this.handleCancel();
1166
+ if (wt(c, a.distance))
1167
+ return this.handleStart();
1168
+ }
1169
+ if (Wt(a) && wt(c, a.tolerance))
1170
+ return this.handleCancel();
1171
+ this.handlePending(a, c);
1172
+ return;
1173
+ }
1174
+ t.cancelable && t.preventDefault(), s(l);
1175
+ }
1176
+ handleEnd() {
1177
+ const {
1178
+ onAbort: t,
1179
+ onEnd: n
1180
+ } = this.props;
1181
+ this.detach(), this.activated || t(this.props.active), n();
1182
+ }
1183
+ handleCancel() {
1184
+ const {
1185
+ onAbort: t,
1186
+ onCancel: n
1187
+ } = this.props;
1188
+ this.detach(), this.activated || t(this.props.active), n();
1189
+ }
1190
+ handleKeydown(t) {
1191
+ t.code === D.Esc && this.handleCancel();
1192
+ }
1193
+ removeTextSelection() {
1194
+ var t;
1195
+ (t = this.document.getSelection()) == null || t.removeAllRanges();
1196
+ }
1197
+ }
1198
+ const Rr = {
1199
+ cancel: {
1200
+ name: "pointercancel"
1201
+ },
1202
+ move: {
1203
+ name: "pointermove"
1204
+ },
1205
+ end: {
1206
+ name: "pointerup"
1207
+ }
1208
+ };
1209
+ class pn extends Ot {
1210
+ constructor(t) {
1211
+ const {
1212
+ event: n
1213
+ } = t, r = Ee(n.target);
1214
+ super(t, Rr, r);
1215
+ }
1216
+ }
1217
+ pn.activators = [{
1218
+ eventName: "onPointerDown",
1219
+ handler: (e, t) => {
1220
+ let {
1221
+ nativeEvent: n
1222
+ } = e, {
1223
+ onActivation: r
1224
+ } = t;
1225
+ return !n.isPrimary || n.button !== 0 ? !1 : (r == null || r({
1226
+ event: n
1227
+ }), !0);
1228
+ }
1229
+ }];
1230
+ const Er = {
1231
+ move: {
1232
+ name: "mousemove"
1233
+ },
1234
+ end: {
1235
+ name: "mouseup"
1236
+ }
1237
+ };
1238
+ var Ct;
1239
+ (function(e) {
1240
+ e[e.RightClick = 2] = "RightClick";
1241
+ })(Ct || (Ct = {}));
1242
+ class Ar extends Ot {
1243
+ constructor(t) {
1244
+ super(t, Er, Ee(t.event.target));
1245
+ }
1246
+ }
1247
+ Ar.activators = [{
1248
+ eventName: "onMouseDown",
1249
+ handler: (e, t) => {
1250
+ let {
1251
+ nativeEvent: n
1252
+ } = e, {
1253
+ onActivation: r
1254
+ } = t;
1255
+ return n.button === Ct.RightClick ? !1 : (r == null || r({
1256
+ event: n
1257
+ }), !0);
1258
+ }
1259
+ }];
1260
+ const xt = {
1261
+ cancel: {
1262
+ name: "touchcancel"
1263
+ },
1264
+ move: {
1265
+ name: "touchmove"
1266
+ },
1267
+ end: {
1268
+ name: "touchend"
1269
+ }
1270
+ };
1271
+ class Or extends Ot {
1272
+ constructor(t) {
1273
+ super(t, xt);
1274
+ }
1275
+ static setup() {
1276
+ return window.addEventListener(xt.move.name, t, {
1277
+ capture: !1,
1278
+ passive: !1
1279
+ }), function() {
1280
+ window.removeEventListener(xt.move.name, t);
1281
+ };
1282
+ function t() {
1283
+ }
1284
+ }
1285
+ }
1286
+ Or.activators = [{
1287
+ eventName: "onTouchStart",
1288
+ handler: (e, t) => {
1289
+ let {
1290
+ nativeEvent: n
1291
+ } = e, {
1292
+ onActivation: r
1293
+ } = t;
1294
+ const {
1295
+ touches: o
1296
+ } = n;
1297
+ return o.length > 1 ? !1 : (r == null || r({
1298
+ event: n
1299
+ }), !0);
1300
+ }
1301
+ }];
1302
+ var Be;
1303
+ (function(e) {
1304
+ e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
1305
+ })(Be || (Be = {}));
1306
+ var at;
1307
+ (function(e) {
1308
+ e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
1309
+ })(at || (at = {}));
1310
+ function Ir(e) {
1311
+ let {
1312
+ acceleration: t,
1313
+ activator: n = Be.Pointer,
1314
+ canScroll: r,
1315
+ draggingRect: o,
1316
+ enabled: i,
1317
+ interval: s = 5,
1318
+ order: a = at.TreeOrder,
1319
+ pointerCoordinates: l,
1320
+ scrollableAncestors: c,
1321
+ scrollableAncestorRects: d,
1322
+ delta: u,
1323
+ threshold: g
1324
+ } = e;
1325
+ const f = Tr({
1326
+ delta: u,
1327
+ disabled: !i
1328
+ }), [w, h] = Wn(), v = I({
1329
+ x: 0,
1330
+ y: 0
1331
+ }), b = I({
1332
+ x: 0,
1333
+ y: 0
1334
+ }), m = A(() => {
1335
+ switch (n) {
1336
+ case Be.Pointer:
1337
+ return l ? {
1338
+ top: l.y,
1339
+ bottom: l.y,
1340
+ left: l.x,
1341
+ right: l.x
1342
+ } : null;
1343
+ case Be.DraggableRect:
1344
+ return o;
1345
+ }
1346
+ }, [n, o, l]), p = I(null), C = F(() => {
1347
+ const R = p.current;
1348
+ if (!R)
1349
+ return;
1350
+ const y = v.current.x * b.current.x, x = v.current.y * b.current.y;
1351
+ R.scrollBy(y, x);
1352
+ }, []), S = A(() => a === at.TreeOrder ? [...c].reverse() : c, [a, c]);
1353
+ N(
1354
+ () => {
1355
+ if (!i || !c.length || !m) {
1356
+ h();
1357
+ return;
1358
+ }
1359
+ for (const R of S) {
1360
+ if ((r == null ? void 0 : r(R)) === !1)
1361
+ continue;
1362
+ const y = c.indexOf(R), x = d[y];
1363
+ if (!x)
1364
+ continue;
1365
+ const {
1366
+ direction: T,
1367
+ speed: L
1368
+ } = br(R, x, m, t, g);
1369
+ for (const O of ["x", "y"])
1370
+ f[O][T[O]] || (L[O] = 0, T[O] = 0);
1371
+ if (L.x > 0 || L.y > 0) {
1372
+ h(), p.current = R, w(C, s), v.current = L, b.current = T;
1373
+ return;
1374
+ }
1375
+ }
1376
+ v.current = {
1377
+ x: 0,
1378
+ y: 0
1379
+ }, b.current = {
1380
+ x: 0,
1381
+ y: 0
1382
+ }, h();
1383
+ },
1384
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1385
+ [
1386
+ t,
1387
+ C,
1388
+ r,
1389
+ h,
1390
+ i,
1391
+ s,
1392
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1393
+ JSON.stringify(m),
1394
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1395
+ JSON.stringify(f),
1396
+ w,
1397
+ c,
1398
+ S,
1399
+ d,
1400
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1401
+ JSON.stringify(g)
1402
+ ]
1403
+ );
1404
+ }
1405
+ const Nr = {
1406
+ x: {
1407
+ [k.Backward]: !1,
1408
+ [k.Forward]: !1
1409
+ },
1410
+ y: {
1411
+ [k.Backward]: !1,
1412
+ [k.Forward]: !1
1413
+ }
1414
+ };
1415
+ function Tr(e) {
1416
+ let {
1417
+ delta: t,
1418
+ disabled: n
1419
+ } = e;
1420
+ const r = ot(t);
1421
+ return We((o) => {
1422
+ if (n || !r || !o)
1423
+ return Nr;
1424
+ const i = {
1425
+ x: Math.sign(t.x - r.x),
1426
+ y: Math.sign(t.y - r.y)
1427
+ };
1428
+ return {
1429
+ x: {
1430
+ [k.Backward]: o.x[k.Backward] || i.x === -1,
1431
+ [k.Forward]: o.x[k.Forward] || i.x === 1
1432
+ },
1433
+ y: {
1434
+ [k.Backward]: o.y[k.Backward] || i.y === -1,
1435
+ [k.Forward]: o.y[k.Forward] || i.y === 1
1436
+ }
1437
+ };
1438
+ }, [n, t, r]);
1439
+ }
1440
+ function Mr(e, t) {
1441
+ const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
1442
+ return We((o) => {
1443
+ var i;
1444
+ return t == null ? null : (i = r ?? o) != null ? i : null;
1445
+ }, [r, t]);
1446
+ }
1447
+ function Lr(e, t) {
1448
+ return A(() => e.reduce((n, r) => {
1449
+ const {
1450
+ sensor: o
1451
+ } = r, i = o.activators.map((s) => ({
1452
+ eventName: s.eventName,
1453
+ handler: t(s.handler, r)
1454
+ }));
1455
+ return [...n, ...i];
1456
+ }, []), [e, t]);
1457
+ }
1458
+ var je;
1459
+ (function(e) {
1460
+ e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
1461
+ })(je || (je = {}));
1462
+ var St;
1463
+ (function(e) {
1464
+ e.Optimized = "optimized";
1465
+ })(St || (St = {}));
1466
+ const Ut = /* @__PURE__ */ new Map();
1467
+ function Pr(e, t) {
1468
+ let {
1469
+ dragging: n,
1470
+ dependencies: r,
1471
+ config: o
1472
+ } = t;
1473
+ const [i, s] = $(null), {
1474
+ frequency: a,
1475
+ measure: l,
1476
+ strategy: c
1477
+ } = o, d = I(e), u = v(), g = $e(u), f = F(function(b) {
1478
+ b === void 0 && (b = []), !g.current && s((m) => m === null ? b : m.concat(b.filter((p) => !m.includes(p))));
1479
+ }, [g]), w = I(null), h = We((b) => {
1480
+ if (u && !n)
1481
+ return Ut;
1482
+ if (!b || b === Ut || d.current !== e || i != null) {
1483
+ const m = /* @__PURE__ */ new Map();
1484
+ for (let p of e) {
1485
+ if (!p)
1486
+ continue;
1487
+ if (i && i.length > 0 && !i.includes(p.id) && p.rect.current) {
1488
+ m.set(p.id, p.rect.current);
1489
+ continue;
1490
+ }
1491
+ const C = p.node.current, S = C ? new At(l(C), C) : null;
1492
+ p.rect.current = S, S && m.set(p.id, S);
1493
+ }
1494
+ return m;
1495
+ }
1496
+ return b;
1497
+ }, [e, i, n, u, l]);
1498
+ return N(() => {
1499
+ d.current = e;
1500
+ }, [e]), N(
1501
+ () => {
1502
+ u || f();
1503
+ },
1504
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1505
+ [n, u]
1506
+ ), N(
1507
+ () => {
1508
+ i && i.length > 0 && s(null);
1509
+ },
1510
+ //eslint-disable-next-line react-hooks/exhaustive-deps
1511
+ [JSON.stringify(i)]
1512
+ ), N(
1513
+ () => {
1514
+ u || typeof a != "number" || w.current !== null || (w.current = setTimeout(() => {
1515
+ f(), w.current = null;
1516
+ }, a));
1517
+ },
1518
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1519
+ [a, u, f, ...r]
1520
+ ), {
1521
+ droppableRects: h,
1522
+ measureDroppableContainers: f,
1523
+ measuringScheduled: i != null
1524
+ };
1525
+ function v() {
1526
+ switch (c) {
1527
+ case je.Always:
1528
+ return !1;
1529
+ case je.BeforeDragging:
1530
+ return n;
1531
+ default:
1532
+ return !n;
1533
+ }
1534
+ }
1535
+ }
1536
+ function It(e, t) {
1537
+ return We((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
1538
+ }
1539
+ function kr(e, t) {
1540
+ return It(e, t);
1541
+ }
1542
+ function zr(e) {
1543
+ let {
1544
+ callback: t,
1545
+ disabled: n
1546
+ } = e;
1547
+ const r = ut(t), o = A(() => {
1548
+ if (n || typeof window > "u" || typeof window.MutationObserver > "u")
1549
+ return;
1550
+ const {
1551
+ MutationObserver: i
1552
+ } = window;
1553
+ return new i(r);
1554
+ }, [r, n]);
1555
+ return N(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1556
+ }
1557
+ function gt(e) {
1558
+ let {
1559
+ callback: t,
1560
+ disabled: n
1561
+ } = e;
1562
+ const r = ut(t), o = A(
1563
+ () => {
1564
+ if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
1565
+ return;
1566
+ const {
1567
+ ResizeObserver: i
1568
+ } = window;
1569
+ return new i(r);
1570
+ },
1571
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1572
+ [n]
1573
+ );
1574
+ return N(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
1575
+ }
1576
+ function Br(e) {
1577
+ return new At(Ae(e), e);
1578
+ }
1579
+ function Ht(e, t, n) {
1580
+ t === void 0 && (t = Br);
1581
+ const [r, o] = $(null);
1582
+ function i() {
1583
+ o((l) => {
1584
+ if (!e)
1585
+ return null;
1586
+ if (e.isConnected === !1) {
1587
+ var c;
1588
+ return (c = l ?? n) != null ? c : null;
1589
+ }
1590
+ const d = t(e);
1591
+ return JSON.stringify(l) === JSON.stringify(d) ? l : d;
1592
+ });
1593
+ }
1594
+ const s = zr({
1595
+ callback(l) {
1596
+ if (e)
1597
+ for (const c of l) {
1598
+ const {
1599
+ type: d,
1600
+ target: u
1601
+ } = c;
1602
+ if (d === "childList" && u instanceof HTMLElement && u.contains(e)) {
1603
+ i();
1604
+ break;
1605
+ }
1606
+ }
1607
+ }
1608
+ }), a = gt({
1609
+ callback: i
1610
+ });
1611
+ return _(() => {
1612
+ i(), e ? (a == null || a.observe(e), s == null || s.observe(document.body, {
1613
+ childList: !0,
1614
+ subtree: !0
1615
+ })) : (a == null || a.disconnect(), s == null || s.disconnect());
1616
+ }, [e]), r;
1617
+ }
1618
+ function Fr(e) {
1619
+ const t = It(e);
1620
+ return on(e, t);
1621
+ }
1622
+ const Vt = [];
1623
+ function $r(e) {
1624
+ const t = I(e), n = We((r) => e ? r && r !== Vt && e && t.current && e.parentNode === t.current.parentNode ? r : ft(e) : Vt, [e]);
1625
+ return N(() => {
1626
+ t.current = e;
1627
+ }, [e]), n;
1628
+ }
1629
+ function Xr(e) {
1630
+ const [t, n] = $(null), r = I(e), o = F((i) => {
1631
+ const s = yt(i.target);
1632
+ s && n((a) => a ? (a.set(s, Dt(s)), new Map(a)) : null);
1633
+ }, []);
1634
+ return N(() => {
1635
+ const i = r.current;
1636
+ if (e !== i) {
1637
+ s(i);
1638
+ const a = e.map((l) => {
1639
+ const c = yt(l);
1640
+ return c ? (c.addEventListener("scroll", o, {
1641
+ passive: !0
1642
+ }), [c, Dt(c)]) : null;
1643
+ }).filter((l) => l != null);
1644
+ n(a.length ? new Map(a) : null), r.current = e;
1645
+ }
1646
+ return () => {
1647
+ s(e), s(i);
1648
+ };
1649
+ function s(a) {
1650
+ a.forEach((l) => {
1651
+ const c = yt(l);
1652
+ c == null || c.removeEventListener("scroll", o);
1653
+ });
1654
+ }
1655
+ }, [o, e]), A(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => Se(i, s), Q) : fn(e) : Q, [e, t]);
1656
+ }
1657
+ function qt(e, t) {
1658
+ t === void 0 && (t = []);
1659
+ const n = I(null);
1660
+ return N(
1661
+ () => {
1662
+ n.current = null;
1663
+ },
1664
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1665
+ t
1666
+ ), N(() => {
1667
+ const r = e !== Q;
1668
+ r && !n.current && (n.current = e), !r && n.current && (n.current = null);
1669
+ }, [e]), n.current ? Xe(e, n.current) : Q;
1670
+ }
1671
+ function jr(e) {
1672
+ N(
1673
+ () => {
1674
+ if (!ct)
1675
+ return;
1676
+ const t = e.map((n) => {
1677
+ let {
1678
+ sensor: r
1679
+ } = n;
1680
+ return r.setup == null ? void 0 : r.setup();
1681
+ });
1682
+ return () => {
1683
+ for (const n of t)
1684
+ n == null || n();
1685
+ };
1686
+ },
1687
+ // TO-DO: Sensors length could theoretically change which would not be a valid dependency
1688
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1689
+ e.map((t) => {
1690
+ let {
1691
+ sensor: n
1692
+ } = t;
1693
+ return n;
1694
+ })
1695
+ );
1696
+ }
1697
+ function Yr(e, t) {
1698
+ return A(() => e.reduce((n, r) => {
1699
+ let {
1700
+ eventName: o,
1701
+ handler: i
1702
+ } = r;
1703
+ return n[o] = (s) => {
1704
+ i(s, t);
1705
+ }, n;
1706
+ }, {}), [e, t]);
1707
+ }
1708
+ function bn(e) {
1709
+ return A(() => e ? gr(e) : null, [e]);
1710
+ }
1711
+ const Gt = [];
1712
+ function Kr(e, t) {
1713
+ t === void 0 && (t = Ae);
1714
+ const [n] = e, r = bn(n ? X(n) : null), [o, i] = $(Gt);
1715
+ function s() {
1716
+ i(() => e.length ? e.map((l) => un(l) ? r : new At(t(l), l)) : Gt);
1717
+ }
1718
+ const a = gt({
1719
+ callback: s
1720
+ });
1721
+ return _(() => {
1722
+ a == null || a.disconnect(), s(), e.forEach((l) => a == null ? void 0 : a.observe(l));
1723
+ }, [e]), o;
1724
+ }
1725
+ function mn(e) {
1726
+ if (!e)
1727
+ return null;
1728
+ if (e.children.length > 1)
1729
+ return e;
1730
+ const t = e.children[0];
1731
+ return Ke(t) ? t : e;
1732
+ }
1733
+ function Wr(e) {
1734
+ let {
1735
+ measure: t
1736
+ } = e;
1737
+ const [n, r] = $(null), o = F((c) => {
1738
+ for (const {
1739
+ target: d
1740
+ } of c)
1741
+ if (Ke(d)) {
1742
+ r((u) => {
1743
+ const g = t(d);
1744
+ return u ? {
1745
+ ...u,
1746
+ width: g.width,
1747
+ height: g.height
1748
+ } : g;
1749
+ });
1750
+ break;
1751
+ }
1752
+ }, [t]), i = gt({
1753
+ callback: o
1754
+ }), s = F((c) => {
1755
+ const d = mn(c);
1756
+ i == null || i.disconnect(), d && (i == null || i.observe(d)), r(d ? t(d) : null);
1757
+ }, [t, i]), [a, l] = rt(s);
1758
+ return A(() => ({
1759
+ nodeRef: a,
1760
+ rect: n,
1761
+ setRef: l
1762
+ }), [n, a, l]);
1763
+ }
1764
+ const Ur = [{
1765
+ sensor: pn,
1766
+ options: {}
1767
+ }, {
1768
+ sensor: vn,
1769
+ options: {}
1770
+ }], Hr = {
1771
+ current: {}
1772
+ }, nt = {
1773
+ draggable: {
1774
+ measure: jt
1775
+ },
1776
+ droppable: {
1777
+ measure: jt,
1778
+ strategy: je.WhileDragging,
1779
+ frequency: St.Optimized
1780
+ },
1781
+ dragOverlay: {
1782
+ measure: Ae
1783
+ }
1784
+ };
1785
+ class Fe extends Map {
1786
+ get(t) {
1787
+ var n;
1788
+ return t != null && (n = super.get(t)) != null ? n : void 0;
1789
+ }
1790
+ toArray() {
1791
+ return Array.from(this.values());
1792
+ }
1793
+ getEnabled() {
1794
+ return this.toArray().filter((t) => {
1795
+ let {
1796
+ disabled: n
1797
+ } = t;
1798
+ return !n;
1799
+ });
1800
+ }
1801
+ getNodeFor(t) {
1802
+ var n, r;
1803
+ return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
1804
+ }
1805
+ }
1806
+ const Vr = {
1807
+ activatorEvent: null,
1808
+ active: null,
1809
+ activeNode: null,
1810
+ activeNodeRect: null,
1811
+ collisions: null,
1812
+ containerNodeRect: null,
1813
+ draggableNodes: /* @__PURE__ */ new Map(),
1814
+ droppableRects: /* @__PURE__ */ new Map(),
1815
+ droppableContainers: /* @__PURE__ */ new Fe(),
1816
+ over: null,
1817
+ dragOverlay: {
1818
+ nodeRef: {
1819
+ current: null
1820
+ },
1821
+ rect: null,
1822
+ setRef: st
1823
+ },
1824
+ scrollableAncestors: [],
1825
+ scrollableAncestorRects: [],
1826
+ measuringConfiguration: nt,
1827
+ measureDroppableContainers: st,
1828
+ windowRect: null,
1829
+ measuringScheduled: !1
1830
+ }, yn = {
1831
+ activatorEvent: null,
1832
+ activators: [],
1833
+ active: null,
1834
+ activeNodeRect: null,
1835
+ ariaDescribedById: {
1836
+ draggable: ""
1837
+ },
1838
+ dispatch: st,
1839
+ draggableNodes: /* @__PURE__ */ new Map(),
1840
+ over: null,
1841
+ measureDroppableContainers: st
1842
+ }, He = /* @__PURE__ */ Ye(yn), wn = /* @__PURE__ */ Ye(Vr);
1843
+ function qr() {
1844
+ return {
1845
+ draggable: {
1846
+ active: null,
1847
+ initialCoordinates: {
1848
+ x: 0,
1849
+ y: 0
1850
+ },
1851
+ nodes: /* @__PURE__ */ new Map(),
1852
+ translate: {
1853
+ x: 0,
1854
+ y: 0
1855
+ }
1856
+ },
1857
+ droppable: {
1858
+ containers: new Fe()
1859
+ }
1860
+ };
1861
+ }
1862
+ function Gr(e, t) {
1863
+ switch (t.type) {
1864
+ case P.DragStart:
1865
+ return {
1866
+ ...e,
1867
+ draggable: {
1868
+ ...e.draggable,
1869
+ initialCoordinates: t.initialCoordinates,
1870
+ active: t.active
1871
+ }
1872
+ };
1873
+ case P.DragMove:
1874
+ return e.draggable.active == null ? e : {
1875
+ ...e,
1876
+ draggable: {
1877
+ ...e.draggable,
1878
+ translate: {
1879
+ x: t.coordinates.x - e.draggable.initialCoordinates.x,
1880
+ y: t.coordinates.y - e.draggable.initialCoordinates.y
1881
+ }
1882
+ }
1883
+ };
1884
+ case P.DragEnd:
1885
+ case P.DragCancel:
1886
+ return {
1887
+ ...e,
1888
+ draggable: {
1889
+ ...e.draggable,
1890
+ active: null,
1891
+ initialCoordinates: {
1892
+ x: 0,
1893
+ y: 0
1894
+ },
1895
+ translate: {
1896
+ x: 0,
1897
+ y: 0
1898
+ }
1899
+ }
1900
+ };
1901
+ case P.RegisterDroppable: {
1902
+ const {
1903
+ element: n
1904
+ } = t, {
1905
+ id: r
1906
+ } = n, o = new Fe(e.droppable.containers);
1907
+ return o.set(r, n), {
1908
+ ...e,
1909
+ droppable: {
1910
+ ...e.droppable,
1911
+ containers: o
1912
+ }
1913
+ };
1914
+ }
1915
+ case P.SetDroppableDisabled: {
1916
+ const {
1917
+ id: n,
1918
+ key: r,
1919
+ disabled: o
1920
+ } = t, i = e.droppable.containers.get(n);
1921
+ if (!i || r !== i.key)
1922
+ return e;
1923
+ const s = new Fe(e.droppable.containers);
1924
+ return s.set(n, {
1925
+ ...i,
1926
+ disabled: o
1927
+ }), {
1928
+ ...e,
1929
+ droppable: {
1930
+ ...e.droppable,
1931
+ containers: s
1932
+ }
1933
+ };
1934
+ }
1935
+ case P.UnregisterDroppable: {
1936
+ const {
1937
+ id: n,
1938
+ key: r
1939
+ } = t, o = e.droppable.containers.get(n);
1940
+ if (!o || r !== o.key)
1941
+ return e;
1942
+ const i = new Fe(e.droppable.containers);
1943
+ return i.delete(n), {
1944
+ ...e,
1945
+ droppable: {
1946
+ ...e.droppable,
1947
+ containers: i
1948
+ }
1949
+ };
1950
+ }
1951
+ default:
1952
+ return e;
1953
+ }
1954
+ }
1955
+ function Jr(e) {
1956
+ let {
1957
+ disabled: t
1958
+ } = e;
1959
+ const {
1960
+ active: n,
1961
+ activatorEvent: r,
1962
+ draggableNodes: o
1963
+ } = ve(He), i = ot(r), s = ot(n == null ? void 0 : n.id);
1964
+ return N(() => {
1965
+ if (!t && !r && i && s != null) {
1966
+ if (!dt(i) || document.activeElement === i.target)
1967
+ return;
1968
+ const a = o.get(s);
1969
+ if (!a)
1970
+ return;
1971
+ const {
1972
+ activatorNode: l,
1973
+ node: c
1974
+ } = a;
1975
+ if (!l.current && !c.current)
1976
+ return;
1977
+ requestAnimationFrame(() => {
1978
+ for (const d of [l.current, c.current]) {
1979
+ if (!d)
1980
+ continue;
1981
+ const u = Vn(d);
1982
+ if (u) {
1983
+ u.focus();
1984
+ break;
1985
+ }
1986
+ }
1987
+ });
1988
+ }
1989
+ }, [r, t, o, s, i]), null;
1990
+ }
1991
+ function xn(e, t) {
1992
+ let {
1993
+ transform: n,
1994
+ ...r
1995
+ } = t;
1996
+ return e != null && e.length ? e.reduce((o, i) => i({
1997
+ transform: o,
1998
+ ...r
1999
+ }), n) : n;
2000
+ }
2001
+ function _r(e) {
2002
+ return A(
2003
+ () => ({
2004
+ draggable: {
2005
+ ...nt.draggable,
2006
+ ...e == null ? void 0 : e.draggable
2007
+ },
2008
+ droppable: {
2009
+ ...nt.droppable,
2010
+ ...e == null ? void 0 : e.droppable
2011
+ },
2012
+ dragOverlay: {
2013
+ ...nt.dragOverlay,
2014
+ ...e == null ? void 0 : e.dragOverlay
2015
+ }
2016
+ }),
2017
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2018
+ [e == null ? void 0 : e.draggable, e == null ? void 0 : e.droppable, e == null ? void 0 : e.dragOverlay]
2019
+ );
2020
+ }
2021
+ function Qr(e) {
2022
+ let {
2023
+ activeNode: t,
2024
+ measure: n,
2025
+ initialRect: r,
2026
+ config: o = !0
2027
+ } = e;
2028
+ const i = I(!1), {
2029
+ x: s,
2030
+ y: a
2031
+ } = typeof o == "boolean" ? {
2032
+ x: o,
2033
+ y: o
2034
+ } : o;
2035
+ _(() => {
2036
+ if (!s && !a || !t) {
2037
+ i.current = !1;
2038
+ return;
2039
+ }
2040
+ if (i.current || !r)
2041
+ return;
2042
+ const c = t == null ? void 0 : t.node.current;
2043
+ if (!c || c.isConnected === !1)
2044
+ return;
2045
+ const d = n(c), u = on(d, r);
2046
+ if (s || (u.x = 0), a || (u.y = 0), i.current = !0, Math.abs(u.x) > 0 || Math.abs(u.y) > 0) {
2047
+ const g = an(c);
2048
+ g && g.scrollBy({
2049
+ top: u.y,
2050
+ left: u.x
2051
+ });
2052
+ }
2053
+ }, [t, s, a, r, n]);
2054
+ }
2055
+ const ht = /* @__PURE__ */ Ye({
2056
+ ...Q,
2057
+ scaleX: 1,
2058
+ scaleY: 1
2059
+ });
2060
+ var he;
2061
+ (function(e) {
2062
+ e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
2063
+ })(he || (he = {}));
2064
+ const zo = /* @__PURE__ */ Fn(function(t) {
2065
+ var n, r, o, i;
2066
+ let {
2067
+ id: s,
2068
+ accessibility: a,
2069
+ autoScroll: l = !0,
2070
+ children: c,
2071
+ sensors: d = Ur,
2072
+ collisionDetection: u = ar,
2073
+ measuring: g,
2074
+ modifiers: f,
2075
+ ...w
2076
+ } = t;
2077
+ const h = $n(Gr, void 0, qr), [v, b] = h, [m, p] = Zn(), [C, S] = $(he.Uninitialized), R = C === he.Initialized, {
2078
+ draggable: {
2079
+ active: y,
2080
+ nodes: x,
2081
+ translate: T
2082
+ },
2083
+ droppable: {
2084
+ containers: L
2085
+ }
2086
+ } = v, O = y != null ? x.get(y) : null, G = I({
2087
+ initial: null,
2088
+ translated: null
2089
+ }), J = A(() => {
2090
+ var B;
2091
+ return y != null ? {
2092
+ id: y,
2093
+ // It's possible for the active node to unmount while dragging
2094
+ data: (B = O == null ? void 0 : O.data) != null ? B : Hr,
2095
+ rect: G
2096
+ } : null;
2097
+ }, [y, O]), Z = I(null), [Oe, Ve] = $(null), [Y, qe] = $(null), re = $e(w, Object.values(w)), Ie = Ue("DndDescribedBy", s), Ge = A(() => L.getEnabled(), [L]), j = _r(g), {
2098
+ droppableRects: oe,
2099
+ measureDroppableContainers: pe,
2100
+ measuringScheduled: Ne
2101
+ } = Pr(Ge, {
2102
+ dragging: R,
2103
+ dependencies: [T.x, T.y],
2104
+ config: j.droppable
2105
+ }), H = Mr(x, y), Je = A(() => Y ? it(Y) : null, [Y]), le = zn(), ie = kr(H, j.draggable.measure);
2106
+ Qr({
2107
+ activeNode: y != null ? x.get(y) : null,
2108
+ config: le.layoutShiftCompensation,
2109
+ initialRect: ie,
2110
+ measure: j.draggable.measure
2111
+ });
2112
+ const E = Ht(H, j.draggable.measure, ie), Te = Ht(H ? H.parentElement : null), ee = I({
2113
+ activatorEvent: null,
2114
+ active: null,
2115
+ activeNode: H,
2116
+ collisionRect: null,
2117
+ collisions: null,
2118
+ droppableRects: oe,
2119
+ draggableNodes: x,
2120
+ draggingNode: null,
2121
+ draggingNodeRect: null,
2122
+ droppableContainers: L,
2123
+ over: null,
2124
+ scrollableAncestors: [],
2125
+ scrollAdjustedTranslate: null
2126
+ }), me = L.getNodeFor((n = ee.current.over) == null ? void 0 : n.id), se = Wr({
2127
+ measure: j.dragOverlay.measure
2128
+ }), ye = (r = se.nodeRef.current) != null ? r : H, we = R ? (o = se.rect) != null ? o : E : null, Nt = !!(se.nodeRef.current && se.rect), Tt = Fr(Nt ? null : E), vt = bn(ye ? X(ye) : null), ce = $r(R ? me ?? H : null), _e = Kr(ce), Qe = xn(f, {
2129
+ transform: {
2130
+ x: T.x - Tt.x,
2131
+ y: T.y - Tt.y,
2132
+ scaleX: 1,
2133
+ scaleY: 1
2134
+ },
2135
+ activatorEvent: Y,
2136
+ active: J,
2137
+ activeNodeRect: E,
2138
+ containerNodeRect: Te,
2139
+ draggingNodeRect: we,
2140
+ over: ee.current.over,
2141
+ overlayNodeRect: se.rect,
2142
+ scrollableAncestors: ce,
2143
+ scrollableAncestorRects: _e,
2144
+ windowRect: vt
2145
+ }), Mt = Je ? Se(Je, T) : null, Lt = Xr(ce), In = qt(Lt), Nn = qt(Lt, [E]), xe = Se(Qe, In), De = we ? ur(we, Qe) : null, Me = J && De ? u({
2146
+ active: J,
2147
+ collisionRect: De,
2148
+ droppableRects: oe,
2149
+ droppableContainers: Ge,
2150
+ pointerCoordinates: Mt
2151
+ }) : null, Pt = rn(Me, "id"), [ue, kt] = $(null), Tn = Nt ? Qe : Se(Qe, Nn), Mn = lr(Tn, (i = ue == null ? void 0 : ue.rect) != null ? i : null, E), pt = I(null), zt = F(
2152
+ (B, K) => {
2153
+ let {
2154
+ sensor: W,
2155
+ options: de
2156
+ } = K;
2157
+ if (Z.current == null)
2158
+ return;
2159
+ const V = x.get(Z.current);
2160
+ if (!V)
2161
+ return;
2162
+ const U = B.nativeEvent, te = new W({
2163
+ active: Z.current,
2164
+ activeNode: V,
2165
+ event: U,
2166
+ options: de,
2167
+ // Sensors need to be instantiated with refs for arguments that change over time
2168
+ // otherwise they are frozen in time with the stale arguments
2169
+ context: ee,
2170
+ onAbort(z) {
2171
+ if (!x.get(z))
2172
+ return;
2173
+ const {
2174
+ onDragAbort: ne
2175
+ } = re.current, ae = {
2176
+ id: z
2177
+ };
2178
+ ne == null || ne(ae), m({
2179
+ type: "onDragAbort",
2180
+ event: ae
2181
+ });
2182
+ },
2183
+ onPending(z, fe, ne, ae) {
2184
+ if (!x.get(z))
2185
+ return;
2186
+ const {
2187
+ onDragPending: Pe
2188
+ } = re.current, ge = {
2189
+ id: z,
2190
+ constraint: fe,
2191
+ initialCoordinates: ne,
2192
+ offset: ae
2193
+ };
2194
+ Pe == null || Pe(ge), m({
2195
+ type: "onDragPending",
2196
+ event: ge
2197
+ });
2198
+ },
2199
+ onStart(z) {
2200
+ const fe = Z.current;
2201
+ if (fe == null)
2202
+ return;
2203
+ const ne = x.get(fe);
2204
+ if (!ne)
2205
+ return;
2206
+ const {
2207
+ onDragStart: ae
2208
+ } = re.current, Le = {
2209
+ activatorEvent: U,
2210
+ active: {
2211
+ id: fe,
2212
+ data: ne.data,
2213
+ rect: G
2214
+ }
2215
+ };
2216
+ Ze(() => {
2217
+ ae == null || ae(Le), S(he.Initializing), b({
2218
+ type: P.DragStart,
2219
+ initialCoordinates: z,
2220
+ active: fe
2221
+ }), m({
2222
+ type: "onDragStart",
2223
+ event: Le
2224
+ }), Ve(pt.current), qe(U);
2225
+ });
2226
+ },
2227
+ onMove(z) {
2228
+ b({
2229
+ type: P.DragMove,
2230
+ coordinates: z
2231
+ });
2232
+ },
2233
+ onEnd: Ce(P.DragEnd),
2234
+ onCancel: Ce(P.DragCancel)
2235
+ });
2236
+ pt.current = te;
2237
+ function Ce(z) {
2238
+ return async function() {
2239
+ const {
2240
+ active: ne,
2241
+ collisions: ae,
2242
+ over: Le,
2243
+ scrollAdjustedTranslate: Pe
2244
+ } = ee.current;
2245
+ let ge = null;
2246
+ if (ne && Pe) {
2247
+ const {
2248
+ cancelDrop: ke
2249
+ } = re.current;
2250
+ ge = {
2251
+ activatorEvent: U,
2252
+ active: ne,
2253
+ collisions: ae,
2254
+ delta: Pe,
2255
+ over: Le
2256
+ }, z === P.DragEnd && typeof ke == "function" && await Promise.resolve(ke(ge)) && (z = P.DragCancel);
2257
+ }
2258
+ Z.current = null, Ze(() => {
2259
+ b({
2260
+ type: z
2261
+ }), S(he.Uninitialized), kt(null), Ve(null), qe(null), pt.current = null;
2262
+ const ke = z === P.DragEnd ? "onDragEnd" : "onDragCancel";
2263
+ if (ge) {
2264
+ const bt = re.current[ke];
2265
+ bt == null || bt(ge), m({
2266
+ type: ke,
2267
+ event: ge
2268
+ });
2269
+ }
2270
+ });
2271
+ };
2272
+ }
2273
+ },
2274
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2275
+ [x]
2276
+ ), Ln = F((B, K) => (W, de) => {
2277
+ const V = W.nativeEvent, U = x.get(de);
2278
+ if (
2279
+ // Another sensor is already instantiating
2280
+ Z.current !== null || // No active draggable
2281
+ !U || // Event has already been captured
2282
+ V.dndKit || V.defaultPrevented
2283
+ )
2284
+ return;
2285
+ const te = {
2286
+ active: U
2287
+ };
2288
+ B(W, K.options, te) === !0 && (V.dndKit = {
2289
+ capturedBy: K.sensor
2290
+ }, Z.current = de, zt(W, K));
2291
+ }, [x, zt]), Bt = Lr(d, Ln);
2292
+ jr(d), _(() => {
2293
+ E && C === he.Initializing && S(he.Initialized);
2294
+ }, [E, C]), N(
2295
+ () => {
2296
+ const {
2297
+ onDragMove: B
2298
+ } = re.current, {
2299
+ active: K,
2300
+ activatorEvent: W,
2301
+ collisions: de,
2302
+ over: V
2303
+ } = ee.current;
2304
+ if (!K || !W)
2305
+ return;
2306
+ const U = {
2307
+ active: K,
2308
+ activatorEvent: W,
2309
+ collisions: de,
2310
+ delta: {
2311
+ x: xe.x,
2312
+ y: xe.y
2313
+ },
2314
+ over: V
2315
+ };
2316
+ Ze(() => {
2317
+ B == null || B(U), m({
2318
+ type: "onDragMove",
2319
+ event: U
2320
+ });
2321
+ });
2322
+ },
2323
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2324
+ [xe.x, xe.y]
2325
+ ), N(
2326
+ () => {
2327
+ const {
2328
+ active: B,
2329
+ activatorEvent: K,
2330
+ collisions: W,
2331
+ droppableContainers: de,
2332
+ scrollAdjustedTranslate: V
2333
+ } = ee.current;
2334
+ if (!B || Z.current == null || !K || !V)
2335
+ return;
2336
+ const {
2337
+ onDragOver: U
2338
+ } = re.current, te = de.get(Pt), Ce = te && te.rect.current ? {
2339
+ id: te.id,
2340
+ rect: te.rect.current,
2341
+ data: te.data,
2342
+ disabled: te.disabled
2343
+ } : null, z = {
2344
+ active: B,
2345
+ activatorEvent: K,
2346
+ collisions: W,
2347
+ delta: {
2348
+ x: V.x,
2349
+ y: V.y
2350
+ },
2351
+ over: Ce
2352
+ };
2353
+ Ze(() => {
2354
+ kt(Ce), U == null || U(z), m({
2355
+ type: "onDragOver",
2356
+ event: z
2357
+ });
2358
+ });
2359
+ },
2360
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2361
+ [Pt]
2362
+ ), _(() => {
2363
+ ee.current = {
2364
+ activatorEvent: Y,
2365
+ active: J,
2366
+ activeNode: H,
2367
+ collisionRect: De,
2368
+ collisions: Me,
2369
+ droppableRects: oe,
2370
+ draggableNodes: x,
2371
+ draggingNode: ye,
2372
+ draggingNodeRect: we,
2373
+ droppableContainers: L,
2374
+ over: ue,
2375
+ scrollableAncestors: ce,
2376
+ scrollAdjustedTranslate: xe
2377
+ }, G.current = {
2378
+ initial: we,
2379
+ translated: De
2380
+ };
2381
+ }, [J, H, Me, De, x, ye, we, oe, L, ue, ce, xe]), Ir({
2382
+ ...le,
2383
+ delta: T,
2384
+ draggingRect: De,
2385
+ pointerCoordinates: Mt,
2386
+ scrollableAncestors: ce,
2387
+ scrollableAncestorRects: _e
2388
+ });
2389
+ const Pn = A(() => ({
2390
+ active: J,
2391
+ activeNode: H,
2392
+ activeNodeRect: E,
2393
+ activatorEvent: Y,
2394
+ collisions: Me,
2395
+ containerNodeRect: Te,
2396
+ dragOverlay: se,
2397
+ draggableNodes: x,
2398
+ droppableContainers: L,
2399
+ droppableRects: oe,
2400
+ over: ue,
2401
+ measureDroppableContainers: pe,
2402
+ scrollableAncestors: ce,
2403
+ scrollableAncestorRects: _e,
2404
+ measuringConfiguration: j,
2405
+ measuringScheduled: Ne,
2406
+ windowRect: vt
2407
+ }), [J, H, E, Y, Me, Te, se, x, L, oe, ue, pe, ce, _e, j, Ne, vt]), kn = A(() => ({
2408
+ activatorEvent: Y,
2409
+ activators: Bt,
2410
+ active: J,
2411
+ activeNodeRect: E,
2412
+ ariaDescribedById: {
2413
+ draggable: Ie
2414
+ },
2415
+ dispatch: b,
2416
+ draggableNodes: x,
2417
+ over: ue,
2418
+ measureDroppableContainers: pe
2419
+ }), [Y, Bt, J, E, b, Ie, x, ue, pe]);
2420
+ return M.createElement(en.Provider, {
2421
+ value: p
2422
+ }, M.createElement(He.Provider, {
2423
+ value: kn
2424
+ }, M.createElement(wn.Provider, {
2425
+ value: Pn
2426
+ }, M.createElement(ht.Provider, {
2427
+ value: Mn
2428
+ }, c)), M.createElement(Jr, {
2429
+ disabled: (a == null ? void 0 : a.restoreFocus) === !1
2430
+ })), M.createElement(nr, {
2431
+ ...a,
2432
+ hiddenTextDescribedById: Ie
2433
+ }));
2434
+ function zn() {
2435
+ const B = (Oe == null ? void 0 : Oe.autoScrollEnabled) === !1, K = typeof l == "object" ? l.enabled === !1 : l === !1, W = R && !B && !K;
2436
+ return typeof l == "object" ? {
2437
+ ...l,
2438
+ enabled: W
2439
+ } : {
2440
+ enabled: W
2441
+ };
2442
+ }
2443
+ }), Zr = /* @__PURE__ */ Ye(null), Jt = "button", eo = "Draggable";
2444
+ function to(e) {
2445
+ let {
2446
+ id: t,
2447
+ data: n,
2448
+ disabled: r = !1,
2449
+ attributes: o
2450
+ } = e;
2451
+ const i = Ue(eo), {
2452
+ activators: s,
2453
+ activatorEvent: a,
2454
+ active: l,
2455
+ activeNodeRect: c,
2456
+ ariaDescribedById: d,
2457
+ draggableNodes: u,
2458
+ over: g
2459
+ } = ve(He), {
2460
+ role: f = Jt,
2461
+ roleDescription: w = "draggable",
2462
+ tabIndex: h = 0
2463
+ } = o ?? {}, v = (l == null ? void 0 : l.id) === t, b = ve(v ? ht : Zr), [m, p] = rt(), [C, S] = rt(), R = Yr(s, t), y = $e(n);
2464
+ _(
2465
+ () => (u.set(t, {
2466
+ id: t,
2467
+ key: i,
2468
+ node: m,
2469
+ activatorNode: C,
2470
+ data: y
2471
+ }), () => {
2472
+ const T = u.get(t);
2473
+ T && T.key === i && u.delete(t);
2474
+ }),
2475
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2476
+ [u, t]
2477
+ );
2478
+ const x = A(() => ({
2479
+ role: f,
2480
+ tabIndex: h,
2481
+ "aria-disabled": r,
2482
+ "aria-pressed": v && f === Jt ? !0 : void 0,
2483
+ "aria-roledescription": w,
2484
+ "aria-describedby": d.draggable
2485
+ }), [r, f, h, v, w, d.draggable]);
2486
+ return {
2487
+ active: l,
2488
+ activatorEvent: a,
2489
+ activeNodeRect: c,
2490
+ attributes: x,
2491
+ isDragging: v,
2492
+ listeners: r ? void 0 : R,
2493
+ node: m,
2494
+ over: g,
2495
+ setNodeRef: p,
2496
+ setActivatorNodeRef: S,
2497
+ transform: b
2498
+ };
2499
+ }
2500
+ function Dn() {
2501
+ return ve(wn);
2502
+ }
2503
+ const no = "Droppable", ro = {
2504
+ timeout: 25
2505
+ };
2506
+ function oo(e) {
2507
+ let {
2508
+ data: t,
2509
+ disabled: n = !1,
2510
+ id: r,
2511
+ resizeObserverConfig: o
2512
+ } = e;
2513
+ const i = Ue(no), {
2514
+ active: s,
2515
+ dispatch: a,
2516
+ over: l,
2517
+ measureDroppableContainers: c
2518
+ } = ve(He), d = I({
2519
+ disabled: n
2520
+ }), u = I(!1), g = I(null), f = I(null), {
2521
+ disabled: w,
2522
+ updateMeasurementsFor: h,
2523
+ timeout: v
2524
+ } = {
2525
+ ...ro,
2526
+ ...o
2527
+ }, b = $e(h ?? r), m = F(
2528
+ () => {
2529
+ if (!u.current) {
2530
+ u.current = !0;
2531
+ return;
2532
+ }
2533
+ f.current != null && clearTimeout(f.current), f.current = setTimeout(() => {
2534
+ c(Array.isArray(b.current) ? b.current : [b.current]), f.current = null;
2535
+ }, v);
2536
+ },
2537
+ //eslint-disable-next-line react-hooks/exhaustive-deps
2538
+ [v]
2539
+ ), p = gt({
2540
+ callback: m,
2541
+ disabled: w || !s
2542
+ }), C = F((x, T) => {
2543
+ p && (T && (p.unobserve(T), u.current = !1), x && p.observe(x));
2544
+ }, [p]), [S, R] = rt(C), y = $e(t);
2545
+ return N(() => {
2546
+ !p || !S.current || (p.disconnect(), u.current = !1, p.observe(S.current));
2547
+ }, [S, p]), N(
2548
+ () => (a({
2549
+ type: P.RegisterDroppable,
2550
+ element: {
2551
+ id: r,
2552
+ key: i,
2553
+ disabled: n,
2554
+ node: S,
2555
+ rect: g,
2556
+ data: y
2557
+ }
2558
+ }), () => a({
2559
+ type: P.UnregisterDroppable,
2560
+ key: i,
2561
+ id: r
2562
+ })),
2563
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2564
+ [r]
2565
+ ), N(() => {
2566
+ n !== d.current.disabled && (a({
2567
+ type: P.SetDroppableDisabled,
2568
+ id: r,
2569
+ key: i,
2570
+ disabled: n
2571
+ }), d.current.disabled = n);
2572
+ }, [r, i, n, a]), {
2573
+ active: s,
2574
+ rect: g,
2575
+ isOver: (l == null ? void 0 : l.id) === r,
2576
+ node: S,
2577
+ over: l,
2578
+ setNodeRef: R
2579
+ };
2580
+ }
2581
+ function io(e) {
2582
+ let {
2583
+ animation: t,
2584
+ children: n
2585
+ } = e;
2586
+ const [r, o] = $(null), [i, s] = $(null), a = ot(n);
2587
+ return !n && !r && a && o(a), _(() => {
2588
+ if (!i)
2589
+ return;
2590
+ const l = r == null ? void 0 : r.key, c = r == null ? void 0 : r.props.id;
2591
+ if (l == null || c == null) {
2592
+ o(null);
2593
+ return;
2594
+ }
2595
+ Promise.resolve(t(c, i)).then(() => {
2596
+ o(null);
2597
+ });
2598
+ }, [t, r, i]), M.createElement(M.Fragment, null, n, r ? Xn(r, {
2599
+ ref: s
2600
+ }) : null);
2601
+ }
2602
+ const so = {
2603
+ x: 0,
2604
+ y: 0,
2605
+ scaleX: 1,
2606
+ scaleY: 1
2607
+ };
2608
+ function ao(e) {
2609
+ let {
2610
+ children: t
2611
+ } = e;
2612
+ return M.createElement(He.Provider, {
2613
+ value: yn
2614
+ }, M.createElement(ht.Provider, {
2615
+ value: so
2616
+ }, t));
2617
+ }
2618
+ const lo = {
2619
+ position: "fixed",
2620
+ touchAction: "none"
2621
+ }, co = (e) => dt(e) ? "transform 250ms ease" : void 0, uo = /* @__PURE__ */ jn((e, t) => {
2622
+ let {
2623
+ as: n,
2624
+ activatorEvent: r,
2625
+ adjustScale: o,
2626
+ children: i,
2627
+ className: s,
2628
+ rect: a,
2629
+ style: l,
2630
+ transform: c,
2631
+ transition: d = co
2632
+ } = e;
2633
+ if (!a)
2634
+ return null;
2635
+ const u = o ? c : {
2636
+ ...c,
2637
+ scaleX: 1,
2638
+ scaleY: 1
2639
+ }, g = {
2640
+ ...lo,
2641
+ width: a.width,
2642
+ height: a.height,
2643
+ top: a.top,
2644
+ left: a.left,
2645
+ transform: be.Transform.toString(u),
2646
+ transformOrigin: o && r ? rr(r, a) : void 0,
2647
+ transition: typeof d == "function" ? d(r) : d,
2648
+ ...l
2649
+ };
2650
+ return M.createElement(n, {
2651
+ className: s,
2652
+ style: g,
2653
+ ref: t
2654
+ }, i);
2655
+ }), fo = (e) => (t) => {
2656
+ let {
2657
+ active: n,
2658
+ dragOverlay: r
2659
+ } = t;
2660
+ const o = {}, {
2661
+ styles: i,
2662
+ className: s
2663
+ } = e;
2664
+ if (i != null && i.active)
2665
+ for (const [a, l] of Object.entries(i.active))
2666
+ l !== void 0 && (o[a] = n.node.style.getPropertyValue(a), n.node.style.setProperty(a, l));
2667
+ if (i != null && i.dragOverlay)
2668
+ for (const [a, l] of Object.entries(i.dragOverlay))
2669
+ l !== void 0 && r.node.style.setProperty(a, l);
2670
+ return s != null && s.active && n.node.classList.add(s.active), s != null && s.dragOverlay && r.node.classList.add(s.dragOverlay), function() {
2671
+ for (const [l, c] of Object.entries(o))
2672
+ n.node.style.setProperty(l, c);
2673
+ s != null && s.active && n.node.classList.remove(s.active);
2674
+ };
2675
+ }, go = (e) => {
2676
+ let {
2677
+ transform: {
2678
+ initial: t,
2679
+ final: n
2680
+ }
2681
+ } = e;
2682
+ return [{
2683
+ transform: be.Transform.toString(t)
2684
+ }, {
2685
+ transform: be.Transform.toString(n)
2686
+ }];
2687
+ }, ho = {
2688
+ duration: 250,
2689
+ easing: "ease",
2690
+ keyframes: go,
2691
+ sideEffects: /* @__PURE__ */ fo({
2692
+ styles: {
2693
+ active: {
2694
+ opacity: "0"
2695
+ }
2696
+ }
2697
+ })
2698
+ };
2699
+ function vo(e) {
2700
+ let {
2701
+ config: t,
2702
+ draggableNodes: n,
2703
+ droppableContainers: r,
2704
+ measuringConfiguration: o
2705
+ } = e;
2706
+ return ut((i, s) => {
2707
+ if (t === null)
2708
+ return;
2709
+ const a = n.get(i);
2710
+ if (!a)
2711
+ return;
2712
+ const l = a.node.current;
2713
+ if (!l)
2714
+ return;
2715
+ const c = mn(s);
2716
+ if (!c)
2717
+ return;
2718
+ const {
2719
+ transform: d
2720
+ } = X(s).getComputedStyle(s), u = sn(d);
2721
+ if (!u)
2722
+ return;
2723
+ const g = typeof t == "function" ? t : po(t);
2724
+ return gn(l, o.draggable.measure), g({
2725
+ active: {
2726
+ id: i,
2727
+ data: a.data,
2728
+ node: l,
2729
+ rect: o.draggable.measure(l)
2730
+ },
2731
+ draggableNodes: n,
2732
+ dragOverlay: {
2733
+ node: s,
2734
+ rect: o.dragOverlay.measure(c)
2735
+ },
2736
+ droppableContainers: r,
2737
+ measuringConfiguration: o,
2738
+ transform: u
2739
+ });
2740
+ });
2741
+ }
2742
+ function po(e) {
2743
+ const {
2744
+ duration: t,
2745
+ easing: n,
2746
+ sideEffects: r,
2747
+ keyframes: o
2748
+ } = {
2749
+ ...ho,
2750
+ ...e
2751
+ };
2752
+ return (i) => {
2753
+ let {
2754
+ active: s,
2755
+ dragOverlay: a,
2756
+ transform: l,
2757
+ ...c
2758
+ } = i;
2759
+ if (!t)
2760
+ return;
2761
+ const d = {
2762
+ x: a.rect.left - s.rect.left,
2763
+ y: a.rect.top - s.rect.top
2764
+ }, u = {
2765
+ scaleX: l.scaleX !== 1 ? s.rect.width * l.scaleX / a.rect.width : 1,
2766
+ scaleY: l.scaleY !== 1 ? s.rect.height * l.scaleY / a.rect.height : 1
2767
+ }, g = {
2768
+ x: l.x - d.x,
2769
+ y: l.y - d.y,
2770
+ ...u
2771
+ }, f = o({
2772
+ ...c,
2773
+ active: s,
2774
+ dragOverlay: a,
2775
+ transform: {
2776
+ initial: l,
2777
+ final: g
2778
+ }
2779
+ }), [w] = f, h = f[f.length - 1];
2780
+ if (JSON.stringify(w) === JSON.stringify(h))
2781
+ return;
2782
+ const v = r == null ? void 0 : r({
2783
+ active: s,
2784
+ dragOverlay: a,
2785
+ ...c
2786
+ }), b = a.node.animate(f, {
2787
+ duration: t,
2788
+ easing: n,
2789
+ fill: "forwards"
2790
+ });
2791
+ return new Promise((m) => {
2792
+ b.onfinish = () => {
2793
+ v == null || v(), m();
2794
+ };
2795
+ });
2796
+ };
2797
+ }
2798
+ let _t = 0;
2799
+ function bo(e) {
2800
+ return A(() => {
2801
+ if (e != null)
2802
+ return _t++, _t;
2803
+ }, [e]);
2804
+ }
2805
+ const Bo = /* @__PURE__ */ M.memo((e) => {
2806
+ let {
2807
+ adjustScale: t = !1,
2808
+ children: n,
2809
+ dropAnimation: r,
2810
+ style: o,
2811
+ transition: i,
2812
+ modifiers: s,
2813
+ wrapperElement: a = "div",
2814
+ className: l,
2815
+ zIndex: c = 999
2816
+ } = e;
2817
+ const {
2818
+ activatorEvent: d,
2819
+ active: u,
2820
+ activeNodeRect: g,
2821
+ containerNodeRect: f,
2822
+ draggableNodes: w,
2823
+ droppableContainers: h,
2824
+ dragOverlay: v,
2825
+ over: b,
2826
+ measuringConfiguration: m,
2827
+ scrollableAncestors: p,
2828
+ scrollableAncestorRects: C,
2829
+ windowRect: S
2830
+ } = Dn(), R = ve(ht), y = bo(u == null ? void 0 : u.id), x = xn(s, {
2831
+ activatorEvent: d,
2832
+ active: u,
2833
+ activeNodeRect: g,
2834
+ containerNodeRect: f,
2835
+ draggingNodeRect: v.rect,
2836
+ over: b,
2837
+ overlayNodeRect: v.rect,
2838
+ scrollableAncestors: p,
2839
+ scrollableAncestorRects: C,
2840
+ transform: R,
2841
+ windowRect: S
2842
+ }), T = It(g), L = vo({
2843
+ config: r,
2844
+ draggableNodes: w,
2845
+ droppableContainers: h,
2846
+ measuringConfiguration: m
2847
+ }), O = T ? v.setRef : void 0;
2848
+ return M.createElement(ao, null, M.createElement(io, {
2849
+ animation: L
2850
+ }, u && y ? M.createElement(uo, {
2851
+ key: y,
2852
+ id: u.id,
2853
+ ref: O,
2854
+ as: a,
2855
+ activatorEvent: d,
2856
+ adjustScale: t,
2857
+ className: l,
2858
+ transition: i,
2859
+ rect: T,
2860
+ style: {
2861
+ zIndex: c,
2862
+ ...o
2863
+ },
2864
+ transform: x
2865
+ }, n) : null));
2866
+ });
2867
+ function Cn(e, t, n) {
2868
+ const r = e.slice();
2869
+ return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
2870
+ }
2871
+ function mo(e, t) {
2872
+ return e.reduce((n, r, o) => {
2873
+ const i = t.get(r);
2874
+ return i && (n[o] = i), n;
2875
+ }, Array(e.length));
2876
+ }
2877
+ function et(e) {
2878
+ return e !== null && e >= 0;
2879
+ }
2880
+ function yo(e, t) {
2881
+ if (e === t)
2882
+ return !0;
2883
+ if (e.length !== t.length)
2884
+ return !1;
2885
+ for (let n = 0; n < e.length; n++)
2886
+ if (e[n] !== t[n])
2887
+ return !1;
2888
+ return !0;
2889
+ }
2890
+ function wo(e) {
2891
+ return typeof e == "boolean" ? {
2892
+ draggable: e,
2893
+ droppable: e
2894
+ } : e;
2895
+ }
2896
+ const Sn = (e) => {
2897
+ let {
2898
+ rects: t,
2899
+ activeIndex: n,
2900
+ overIndex: r,
2901
+ index: o
2902
+ } = e;
2903
+ const i = Cn(t, r, n), s = t[o], a = i[o];
2904
+ return !a || !s ? null : {
2905
+ x: a.left - s.left,
2906
+ y: a.top - s.top,
2907
+ scaleX: a.width / s.width,
2908
+ scaleY: a.height / s.height
2909
+ };
2910
+ }, tt = {
2911
+ scaleX: 1,
2912
+ scaleY: 1
2913
+ }, Fo = (e) => {
2914
+ var t;
2915
+ let {
2916
+ activeIndex: n,
2917
+ activeNodeRect: r,
2918
+ index: o,
2919
+ rects: i,
2920
+ overIndex: s
2921
+ } = e;
2922
+ const a = (t = i[n]) != null ? t : r;
2923
+ if (!a)
2924
+ return null;
2925
+ if (o === n) {
2926
+ const c = i[s];
2927
+ return c ? {
2928
+ x: 0,
2929
+ y: n < s ? c.top + c.height - (a.top + a.height) : c.top - a.top,
2930
+ ...tt
2931
+ } : null;
2932
+ }
2933
+ const l = xo(i, o, n);
2934
+ return o > n && o <= s ? {
2935
+ x: 0,
2936
+ y: -a.height - l,
2937
+ ...tt
2938
+ } : o < n && o >= s ? {
2939
+ x: 0,
2940
+ y: a.height + l,
2941
+ ...tt
2942
+ } : {
2943
+ x: 0,
2944
+ y: 0,
2945
+ ...tt
2946
+ };
2947
+ };
2948
+ function xo(e, t, n) {
2949
+ const r = e[t], o = e[t - 1], i = e[t + 1];
2950
+ return r ? n < t ? o ? r.top - (o.top + o.height) : i ? i.top - (r.top + r.height) : 0 : i ? i.top - (r.top + r.height) : o ? r.top - (o.top + o.height) : 0 : 0;
2951
+ }
2952
+ const Rn = "Sortable", En = /* @__PURE__ */ M.createContext({
2953
+ activeIndex: -1,
2954
+ containerId: Rn,
2955
+ disableTransforms: !1,
2956
+ items: [],
2957
+ overIndex: -1,
2958
+ useDragOverlay: !1,
2959
+ sortedRects: [],
2960
+ strategy: Sn,
2961
+ disabled: {
2962
+ draggable: !1,
2963
+ droppable: !1
2964
+ }
2965
+ });
2966
+ function $o(e) {
2967
+ let {
2968
+ children: t,
2969
+ id: n,
2970
+ items: r,
2971
+ strategy: o = Sn,
2972
+ disabled: i = !1
2973
+ } = e;
2974
+ const {
2975
+ active: s,
2976
+ dragOverlay: a,
2977
+ droppableRects: l,
2978
+ over: c,
2979
+ measureDroppableContainers: d
2980
+ } = Dn(), u = Ue(Rn, n), g = a.rect !== null, f = A(() => r.map((R) => typeof R == "object" && "id" in R ? R.id : R), [r]), w = s != null, h = s ? f.indexOf(s.id) : -1, v = c ? f.indexOf(c.id) : -1, b = I(f), m = !yo(f, b.current), p = v !== -1 && h === -1 || m, C = wo(i);
2981
+ _(() => {
2982
+ m && w && d(f);
2983
+ }, [m, f, w, d]), N(() => {
2984
+ b.current = f;
2985
+ }, [f]);
2986
+ const S = A(
2987
+ () => ({
2988
+ activeIndex: h,
2989
+ containerId: u,
2990
+ disabled: C,
2991
+ disableTransforms: p,
2992
+ items: f,
2993
+ overIndex: v,
2994
+ useDragOverlay: g,
2995
+ sortedRects: mo(f, l),
2996
+ strategy: o
2997
+ }),
2998
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2999
+ [h, u, C.draggable, C.droppable, p, f, v, l, g, o]
3000
+ );
3001
+ return M.createElement(En.Provider, {
3002
+ value: S
3003
+ }, t);
3004
+ }
3005
+ const Do = (e) => {
3006
+ let {
3007
+ id: t,
3008
+ items: n,
3009
+ activeIndex: r,
3010
+ overIndex: o
3011
+ } = e;
3012
+ return Cn(n, r, o).indexOf(t);
3013
+ }, Co = (e) => {
3014
+ let {
3015
+ containerId: t,
3016
+ isSorting: n,
3017
+ wasDragging: r,
3018
+ index: o,
3019
+ items: i,
3020
+ newIndex: s,
3021
+ previousItems: a,
3022
+ previousContainerId: l,
3023
+ transition: c
3024
+ } = e;
3025
+ return !c || !r || a !== i && o === s ? !1 : n ? !0 : s !== o && t === l;
3026
+ }, So = {
3027
+ duration: 200,
3028
+ easing: "ease"
3029
+ }, An = "transform", Ro = /* @__PURE__ */ be.Transition.toString({
3030
+ property: An,
3031
+ duration: 0,
3032
+ easing: "linear"
3033
+ }), Eo = {
3034
+ roleDescription: "sortable"
3035
+ };
3036
+ function Ao(e) {
3037
+ let {
3038
+ disabled: t,
3039
+ index: n,
3040
+ node: r,
3041
+ rect: o
3042
+ } = e;
3043
+ const [i, s] = $(null), a = I(n);
3044
+ return _(() => {
3045
+ if (!t && n !== a.current && r.current) {
3046
+ const l = o.current;
3047
+ if (l) {
3048
+ const c = Ae(r.current, {
3049
+ ignoreTransform: !0
3050
+ }), d = {
3051
+ x: l.left - c.left,
3052
+ y: l.top - c.top,
3053
+ scaleX: l.width / c.width,
3054
+ scaleY: l.height / c.height
3055
+ };
3056
+ (d.x || d.y) && s(d);
3057
+ }
3058
+ }
3059
+ n !== a.current && (a.current = n);
3060
+ }, [t, n, r, o]), N(() => {
3061
+ i && s(null);
3062
+ }, [i]), i;
3063
+ }
3064
+ function Xo(e) {
3065
+ let {
3066
+ animateLayoutChanges: t = Co,
3067
+ attributes: n,
3068
+ disabled: r,
3069
+ data: o,
3070
+ getNewIndex: i = Do,
3071
+ id: s,
3072
+ strategy: a,
3073
+ resizeObserverConfig: l,
3074
+ transition: c = So
3075
+ } = e;
3076
+ const {
3077
+ items: d,
3078
+ containerId: u,
3079
+ activeIndex: g,
3080
+ disabled: f,
3081
+ disableTransforms: w,
3082
+ sortedRects: h,
3083
+ overIndex: v,
3084
+ useDragOverlay: b,
3085
+ strategy: m
3086
+ } = ve(En), p = Oo(r, f), C = d.indexOf(s), S = A(() => ({
3087
+ sortable: {
3088
+ containerId: u,
3089
+ index: C,
3090
+ items: d
3091
+ },
3092
+ ...o
3093
+ }), [u, o, C, d]), R = A(() => d.slice(d.indexOf(s)), [d, s]), {
3094
+ rect: y,
3095
+ node: x,
3096
+ isOver: T,
3097
+ setNodeRef: L
3098
+ } = oo({
3099
+ id: s,
3100
+ data: S,
3101
+ disabled: p.droppable,
3102
+ resizeObserverConfig: {
3103
+ updateMeasurementsFor: R,
3104
+ ...l
3105
+ }
3106
+ }), {
3107
+ active: O,
3108
+ activatorEvent: G,
3109
+ activeNodeRect: J,
3110
+ attributes: Z,
3111
+ setNodeRef: Oe,
3112
+ listeners: Ve,
3113
+ isDragging: Y,
3114
+ over: qe,
3115
+ setActivatorNodeRef: re,
3116
+ transform: Ie
3117
+ } = to({
3118
+ id: s,
3119
+ data: S,
3120
+ attributes: {
3121
+ ...Eo,
3122
+ ...n
3123
+ },
3124
+ disabled: p.draggable
3125
+ }), Ge = Kn(L, Oe), j = !!O, oe = j && !w && et(g) && et(v), pe = !b && Y, Ne = pe && oe ? Ie : null, Je = oe ? Ne ?? (a ?? m)({
3126
+ rects: h,
3127
+ activeNodeRect: J,
3128
+ activeIndex: g,
3129
+ overIndex: v,
3130
+ index: C
3131
+ }) : null, le = et(g) && et(v) ? i({
3132
+ id: s,
3133
+ items: d,
3134
+ activeIndex: g,
3135
+ overIndex: v
3136
+ }) : C, ie = O == null ? void 0 : O.id, E = I({
3137
+ activeId: ie,
3138
+ items: d,
3139
+ newIndex: le,
3140
+ containerId: u
3141
+ }), Te = d !== E.current.items, ee = t({
3142
+ active: O,
3143
+ containerId: u,
3144
+ isDragging: Y,
3145
+ isSorting: j,
3146
+ id: s,
3147
+ index: C,
3148
+ items: d,
3149
+ newIndex: E.current.newIndex,
3150
+ previousItems: E.current.items,
3151
+ previousContainerId: E.current.containerId,
3152
+ transition: c,
3153
+ wasDragging: E.current.activeId != null
3154
+ }), me = Ao({
3155
+ disabled: !ee,
3156
+ index: C,
3157
+ node: x,
3158
+ rect: y
3159
+ });
3160
+ return N(() => {
3161
+ j && E.current.newIndex !== le && (E.current.newIndex = le), u !== E.current.containerId && (E.current.containerId = u), d !== E.current.items && (E.current.items = d);
3162
+ }, [j, le, u, d]), N(() => {
3163
+ if (ie === E.current.activeId)
3164
+ return;
3165
+ if (ie != null && E.current.activeId == null) {
3166
+ E.current.activeId = ie;
3167
+ return;
3168
+ }
3169
+ const ye = setTimeout(() => {
3170
+ E.current.activeId = ie;
3171
+ }, 50);
3172
+ return () => clearTimeout(ye);
3173
+ }, [ie]), {
3174
+ active: O,
3175
+ activeIndex: g,
3176
+ attributes: Z,
3177
+ data: S,
3178
+ rect: y,
3179
+ index: C,
3180
+ newIndex: le,
3181
+ items: d,
3182
+ isOver: T,
3183
+ isSorting: j,
3184
+ isDragging: Y,
3185
+ listeners: Ve,
3186
+ node: x,
3187
+ overIndex: v,
3188
+ over: qe,
3189
+ setNodeRef: Ge,
3190
+ setActivatorNodeRef: re,
3191
+ setDroppableNodeRef: L,
3192
+ setDraggableNodeRef: Oe,
3193
+ transform: me ?? Je,
3194
+ transition: se()
3195
+ };
3196
+ function se() {
3197
+ if (
3198
+ // Temporarily disable transitions for a single frame to set up derived transforms
3199
+ me || // Or to prevent items jumping to back to their "new" position when items change
3200
+ Te && E.current.newIndex === C
3201
+ )
3202
+ return Ro;
3203
+ if (!(pe && !dt(G) || !c) && (j || ee))
3204
+ return be.Transition.toString({
3205
+ ...c,
3206
+ property: An
3207
+ });
3208
+ }
3209
+ }
3210
+ function Oo(e, t) {
3211
+ var n, r;
3212
+ return typeof e == "boolean" ? {
3213
+ draggable: e,
3214
+ // Backwards compatibility
3215
+ droppable: !1
3216
+ } : {
3217
+ draggable: (n = e == null ? void 0 : e.draggable) != null ? n : t.draggable,
3218
+ droppable: (r = e == null ? void 0 : e.droppable) != null ? r : t.droppable
3219
+ };
3220
+ }
3221
+ function lt(e) {
3222
+ if (!e)
3223
+ return !1;
3224
+ const t = e.data.current;
3225
+ return !!(t && "sortable" in t && typeof t.sortable == "object" && "containerId" in t.sortable && "items" in t.sortable && "index" in t.sortable);
3226
+ }
3227
+ const Io = [D.Down, D.Right, D.Up, D.Left], jo = (e, t) => {
3228
+ let {
3229
+ context: {
3230
+ active: n,
3231
+ collisionRect: r,
3232
+ droppableRects: o,
3233
+ droppableContainers: i,
3234
+ over: s,
3235
+ scrollableAncestors: a
3236
+ }
3237
+ } = t;
3238
+ if (Io.includes(e.code)) {
3239
+ if (e.preventDefault(), !n || !r)
3240
+ return;
3241
+ const l = [];
3242
+ i.getEnabled().forEach((u) => {
3243
+ if (!u || u != null && u.disabled)
3244
+ return;
3245
+ const g = o.get(u.id);
3246
+ if (g)
3247
+ switch (e.code) {
3248
+ case D.Down:
3249
+ r.top < g.top && l.push(u);
3250
+ break;
3251
+ case D.Up:
3252
+ r.top > g.top && l.push(u);
3253
+ break;
3254
+ case D.Left:
3255
+ r.left > g.left && l.push(u);
3256
+ break;
3257
+ case D.Right:
3258
+ r.left < g.left && l.push(u);
3259
+ break;
3260
+ }
3261
+ });
3262
+ const c = ir({
3263
+ collisionRect: r,
3264
+ droppableRects: o,
3265
+ droppableContainers: l
3266
+ });
3267
+ let d = rn(c, "id");
3268
+ if (d === (s == null ? void 0 : s.id) && c.length > 1 && (d = c[1].id), d != null) {
3269
+ const u = i.get(n.id), g = i.get(d), f = g ? o.get(g.id) : null, w = g == null ? void 0 : g.node.current;
3270
+ if (w && f && u && g) {
3271
+ const v = ft(w).some((R, y) => a[y] !== R), b = On(u, g), m = No(u, g), p = v || !b ? {
3272
+ x: 0,
3273
+ y: 0
3274
+ } : {
3275
+ x: m ? r.width - f.width : 0,
3276
+ y: m ? r.height - f.height : 0
3277
+ }, C = {
3278
+ x: f.left,
3279
+ y: f.top
3280
+ };
3281
+ return p.x && p.y ? C : Xe(C, p);
3282
+ }
3283
+ }
3284
+ }
3285
+ };
3286
+ function On(e, t) {
3287
+ return !lt(e) || !lt(t) ? !1 : e.data.current.sortable.containerId === t.data.current.sortable.containerId;
3288
+ }
3289
+ function No(e, t) {
3290
+ return !lt(e) || !lt(t) || !On(e, t) ? !1 : e.data.current.sortable.index < t.data.current.sortable.index;
3291
+ }
3292
+ export {
3293
+ be as C,
3294
+ zo as D,
3295
+ vn as K,
3296
+ pn as P,
3297
+ $o as S,
3298
+ Po as a,
3299
+ Lo as b,
3300
+ ko as c,
3301
+ Cn as d,
3302
+ Bo as e,
3303
+ oo as f,
3304
+ jo as s,
3305
+ Xo as u,
3306
+ Fo as v
3307
+ };