n8n-editor-ui 2.1.1 → 2.2.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 (298) hide show
  1. package/data/node-popularity.json +0 -4
  2. package/dist/assets/{AddDataTableModal-Dz0DDl2J.js → AddDataTableModal-C07v9Nxn.js} +18 -19
  3. package/dist/assets/{AgentEditorModal-BucPtfuf.js → AgentEditorModal-BrtNn_I9.js} +51 -62
  4. package/dist/assets/{AgentEditorModal-CzlIqORm.css → AgentEditorModal-CnYw6elM.css} +7 -13
  5. package/dist/assets/{Alert-0hwMnhqx.js → Alert-CjCTAWnZ.js} +1 -1
  6. package/dist/assets/{AnnotationTagsDropdown.ee-FwAi0jQL.js → AnnotationTagsDropdown.ee-BLpUZufe.js} +2 -2
  7. package/dist/assets/{AuthView-DpssdaNh.js → AuthView-CqAePJa9.js} +5 -5
  8. package/dist/assets/BottomMenu-CRVyIu-B.css +474 -0
  9. package/dist/assets/BottomMenu-Cej7gwr4.js +547 -0
  10. package/dist/assets/{ChangePasswordView-DBihzMqB.js → ChangePasswordView-BuzmSLJ8.js} +15 -15
  11. package/dist/assets/{ChatAgentAvatar-BK95BHUo.css → ChatAgentAvatar-B68ZZ295.css} +18 -9
  12. package/dist/assets/{ChatAgentAvatar-DDaNlXcV.js → ChatAgentAvatar-CwpeLqqo.js} +17 -16
  13. package/dist/assets/{ChatSidebarOpener-B4_hEzpT.js → ChatLayout-Baw4DF5I.js} +9 -28
  14. package/dist/assets/{ChatPersonalAgentsView-DhQsTHJ3.js → ChatPersonalAgentsView-B9Pt0vxY.js} +29 -34
  15. package/dist/assets/ChatPersonalAgentsView-BiiyFIRl.css +159 -0
  16. package/dist/assets/ChatSidebar-Cmc2-HvU.js +526 -0
  17. package/dist/assets/{ChatSidebar-D0f-W0S9.css → ChatSidebar-DcNxY7Pt.css} +61 -336
  18. package/dist/assets/{ChatView-B1O45V-1.js → ChatView-C2ezV2fz.js} +121 -142
  19. package/dist/assets/{ChatView-mTIZIDr3.css → ChatView-DZODCD2o.css} +4 -4
  20. package/dist/assets/{ChatWorkflowAgentsView-U76sjiCh.js → ChatWorkflowAgentsView-DBmwl58I.js} +22 -23
  21. package/dist/assets/CollectionParameter-DvlRV-HR.js +50 -0
  22. package/dist/assets/{CommunityNodeUpdateInfo-DaqlFCWs.js → CommunityNodeUpdateInfo-DjXh6DHu.js} +8 -8
  23. package/dist/assets/{CopyInput-DjkkoSUR.js → CopyInput-D-Z7pmxS.js} +4 -4
  24. package/dist/assets/{CredentialIcon-B5mFnPOM.js → CredentialIcon-ClX-2bGh.js} +3 -3
  25. package/dist/assets/{CredentialPicker-DmA-dFkP.js → CredentialPicker-CrCc144c.js} +5 -6
  26. package/dist/assets/{CredentialSelectorModal-CVKa8AAF.js → CredentialSelectorModal-Da2na5my.js} +18 -20
  27. package/dist/assets/{CredentialsView-B2WvyZTw.js → CredentialsView-CqNF_Gka.js} +34 -37
  28. package/dist/assets/{DataTableActions-CGYkW0Ge.js → DataTableActions-D0ibHSoF.js} +5 -6
  29. package/dist/assets/{DataTableDetailsView-B-_rx-9L.js → DataTableDetailsView-BRY9rVV1.js} +22 -24
  30. package/dist/assets/{DataTableView-K-cZEOKP.js → DataTableView-D4ujwn7I.js} +31 -34
  31. package/dist/assets/DemoFooter-fhB0ZsZi.js +63 -0
  32. package/dist/assets/{Draggable-D6WWA0zM.js → Draggable-Bs1jTk_8.js} +1 -1
  33. package/dist/assets/{EmptySharedSectionActionBox-CR6VISbw.js → EmptySharedSectionActionBox-BBB3j3rf.js} +4 -4
  34. package/dist/assets/{EnterpriseEdition.ee-CZml4Gcj.js → EnterpriseEdition.ee-_BSL-rxT.js} +1 -1
  35. package/dist/assets/{EntityNotFound-5i3KSEDe.js → EntityNotFound-8qJnYCXt.js} +7 -7
  36. package/dist/assets/{EntityUnAuthorised-DHAtMGRv.js → EntityUnAuthorised-CYu0UXzr.js} +7 -7
  37. package/dist/assets/{ErrorView-CxNhrbRr.js → ErrorView-CrDo6qHL.js} +9 -9
  38. package/dist/assets/{EvaluationsRootView-DFRtR5a2.js → EvaluationsRootView-C_7tPZ3q.js} +36 -36
  39. package/dist/assets/{EvaluationsView-DDnL-VtS.js → EvaluationsView-DTmT_Mjm.js} +21 -21
  40. package/dist/assets/{ExecutionsTime-CNz8UC7l.css → ExecutionsTime-CMAp2_xF.css} +24 -21
  41. package/dist/assets/{ExecutionsTime-Bll0yiJm.js → ExecutionsTime-ncZBFujs.js} +37 -28
  42. package/dist/assets/{ExecutionsView-8Y-vd0QZ.js → ExecutionsView-DKx5PCwr.js} +34 -37
  43. package/dist/assets/{ExternalSecretsProviderConnectionSwitch.ee-BWWuVEWG.js → ExternalSecretsProviderConnectionSwitch.ee-DQZ57stj.js} +4 -4
  44. package/dist/assets/{FixedCollectionParameter-CsPQJVNL.js → FixedCollectionParameter-BJZ0eM-5.js} +45 -53
  45. package/dist/assets/{ForgotMyPasswordView-DXGbw-EL.js → ForgotMyPasswordView-D_k_YvIG.js} +15 -15
  46. package/dist/assets/{InsightsChartAverageRuntime-Bm0c6_UE.js → InsightsChartAverageRuntime-Cljk8p2A.js} +10 -10
  47. package/dist/assets/{InsightsChartFailed-D6TI96gu.js → InsightsChartFailed-DTmTcxHp.js} +8 -8
  48. package/dist/assets/{InsightsChartFailureRate-BXjbwEEr.js → InsightsChartFailureRate-BKL-1iTZ.js} +10 -10
  49. package/dist/assets/{InsightsChartTimeSaved-BPUaaTg8.js → InsightsChartTimeSaved-CIxYU033.js} +10 -10
  50. package/dist/assets/{InsightsChartTotal-D3aCqsFD.js → InsightsChartTotal-_2DLJIdR.js} +8 -8
  51. package/dist/assets/{InsightsDashboard-C9pPsgT2.js → InsightsDashboard--1f1U32C.js} +32 -34
  52. package/dist/assets/{InsightsPaywall-fDfWjnVB.js → InsightsPaywall-DwtdewB6.js} +15 -16
  53. package/dist/assets/{InsightsSummary-Bjy-SY3W.js → InsightsSummary-DWzL1ePo.js} +8 -8
  54. package/dist/assets/{InsightsTableWorkflows-CAslapaK.js → InsightsTableWorkflows-CHoJdUEl.js} +18 -18
  55. package/dist/assets/{ItemsRenderer-CuTgDOI7.js → ItemsRenderer-Bju44b_S.js} +10 -10
  56. package/dist/assets/{ItemsRenderer-Cr6c6uYy.css → ItemsRenderer-DkobJF9f.css} +4 -2
  57. package/dist/assets/{KeyboardShortcutTooltip-BSbSC7ko.js → KeyboardShortcutTooltip-srIzApSu.js} +1 -1
  58. package/dist/assets/{LogsPanel-BVg_Ph6Z.js → LogsPanel-C9nCXiIh.js} +24 -25
  59. package/dist/assets/LogsPanel-z0W4CHve.js +50 -0
  60. package/dist/assets/MCPConnectWorkflowsModal-CR5hRPTJ.js +301 -0
  61. package/dist/assets/MCPConnectWorkflowsModal-CS2q8ice.css +275 -0
  62. package/dist/assets/{MainHeader-DJA_Afhq.css → MainHeader-CSaAWCWj.css} +13 -13
  63. package/dist/assets/{MainHeader-CfOHJ5AX.js → MainHeader-Dtf7ohow.js} +97 -101
  64. package/dist/assets/{MainSidebar-bwCkn71q.css → MainSidebar-CEsQ8o1Y.css} +84 -304
  65. package/dist/assets/{MainSidebar-BLoE9rZO.js → MainSidebar-_37xftBv.js} +222 -694
  66. package/dist/assets/{MigrationRuleDetail-CmcZ36s9.js → MigrationRuleDetail-CCO__jC7.js} +20 -20
  67. package/dist/assets/{MigrationRules-Cf4vXtX8.js → MigrationRules-B0SPwFyT.js} +12 -12
  68. package/dist/assets/{Modal-BkPSKUmM.js → Modal-DrkMFWe3.js} +4 -4
  69. package/dist/assets/{ModelByIdSelectorModal-BoLoyNu7.js → ModelByIdSelectorModal-CoQLLeXk.js} +17 -18
  70. package/dist/assets/{NDVEmptyState-ClE3eiVz.js → NDVEmptyState-DKrc1TFh.js} +1 -1
  71. package/dist/assets/{NodeCreation-DFfRX0DY.js → NodeCreation-k3pkIHZY.js} +41 -49
  72. package/dist/assets/{NodeCreator-CO64k-3G.js → NodeCreator-B6D9_1wn.js} +47 -50
  73. package/dist/assets/{NodeCreator-C-ckvxD7.css → NodeCreator-OSIpRI6S.css} +25 -25
  74. package/dist/assets/{NodeDetailsView-BURiqx95.js → NodeDetailsView-DfMYS7Pz.js} +60 -68
  75. package/dist/assets/{NodeDetailsViewV2-XUrXwnja.js → NodeDetailsViewV2-DOCw_zWY.js} +61 -69
  76. package/dist/assets/{ModalDrawer-B-12esvU.css → NodeIcon-BDxr0f30.css} +5 -6
  77. package/dist/assets/{NodeIcon-CWyPkrTk.js → NodeIcon-DL6ucXJC.js} +4 -4
  78. package/dist/assets/{NodeSettings-CcYkiMI8.js → NodeSettings-CS2iUNwL.js} +17 -17
  79. package/dist/assets/{NodeView-BPGoqSQJ.js → NodeView-0XOeMCB7.js} +111 -106
  80. package/dist/assets/{OAuthConsentView-kdX_7fls.js → OAuthConsentView-WGFrtRYZ.js} +14 -14
  81. package/dist/assets/{ParameterInputList-CXEjv4Ky.css → ParameterInputList-0YoVowEI.css} +10 -7
  82. package/dist/assets/{ParameterInputList-DdA16d29.js → ParameterInputList-DTEJwrQm.js} +59 -56
  83. package/dist/assets/{PrebuiltAgentTemplatesView-CwoV26I0.js → PrebuiltAgentTemplatesView-CJ6VJ0XJ.js} +17 -19
  84. package/dist/assets/{ProjectBreadcrumb-3cTfM8kZ.js → ProjectBreadcrumb-FtcudW_2.js} +4 -4
  85. package/dist/assets/{ProjectCardBadge-DWmYy--A.js → ProjectCardBadge-C42B_oyx.js} +5 -5
  86. package/dist/assets/{ProjectHeader-CzeJhu2I.js → ProjectHeader-UBLuSGFT.js} +8 -8
  87. package/dist/assets/{ProjectIcon-Biy_-Ssg.js → ProjectIcon-CEp8nyYM.js} +1 -1
  88. package/dist/assets/{ProjectRoleView-D6dn38TT.js → ProjectRoleView-BQvsQqjp.js} +15 -16
  89. package/dist/assets/{ProjectRolesView-BljI8SKN.js → ProjectRolesView-CksItD9m.js} +16 -19
  90. package/dist/assets/{ProjectSettings-Cu6igv0N.js → ProjectSettings-DUSQ3i-j.js} +26 -28
  91. package/dist/assets/{ProjectSharing-YZRwVLxy.js → ProjectSharing-DcKfaqUD.js} +5 -5
  92. package/dist/assets/{ProjectVariables-ClTl8P4L.js → ProjectVariables-BEwMAsZl.js} +32 -35
  93. package/dist/assets/{ProviderSettingsModal-Bw0f0MFf.js → ProviderSettingsModal-D9LOoiTP.js} +21 -23
  94. package/dist/assets/{PushConnectionTracker-ClSwVP7t.js → PushConnectionTracker-CYhR1yeo.js} +3 -3
  95. package/dist/assets/{ResolversView-BC_8K9SU.js → ResolversView-MhtoNdHP.js} +15 -17
  96. package/dist/assets/{ResourceFiltersDropdown-BACE5ZTX.css → ResourceFiltersDropdown-Cma1Lj9J.css} +12 -9
  97. package/dist/assets/{ResourceFiltersDropdown-1x0v8WL5.js → ResourceFiltersDropdown-DJG8zh1q.js} +18 -18
  98. package/dist/assets/{ResourcesListLayout-DeXcgSE7.js → ResourcesListLayout-CBYWFTvd.js} +9 -9
  99. package/dist/assets/{RunDataHtml-DhjduYN-.js → RunDataHtml-B4A7gRBL.js} +3 -3
  100. package/dist/assets/{RunDataHtml-_b8v7-9v.js → RunDataHtml-CkjC7YuF.js} +1 -1
  101. package/dist/assets/{RunDataJson-CzijJVcS.js → RunDataJson-hUd8I9Iw.js} +14 -14
  102. package/dist/assets/{RunDataJsonActions-F_lYqidD.js → RunDataJsonActions-mj5kInPr.js} +15 -15
  103. package/dist/assets/{RunDataParsedAiContent-rfF9dj2q.js → RunDataParsedAiContent-DQYrKUHo.js} +8 -8
  104. package/dist/assets/RunDataParsedAiContent-DhKdg7Ux.js +24 -0
  105. package/dist/assets/{RunDataSearch-sHgYw75e.js → RunDataSearch-BanmtjON.js} +10 -10
  106. package/dist/assets/{RunDataTable-CcVCz6KL.js → RunDataTable-CLw-U45I.js} +18 -18
  107. package/dist/assets/{SamlOnboarding-_E1uKrqU.js → SamlOnboarding-CL7FFqOA.js} +15 -15
  108. package/dist/assets/{SaveButton-CKB6EQNE.js → SaveButton-DdOVpjST.js} +3 -3
  109. package/dist/assets/{SelectedItemsInfo-BvVqSABb.js → SelectedItemsInfo-DBuH5w0D.js} +2 -2
  110. package/dist/assets/{SettingsApiView-BTIamHhf.js → SettingsApiView-C0aDHviI.js} +17 -20
  111. package/dist/assets/{SettingsChatHubView-CcI8QRBj.js → SettingsChatHubView-xXbgxwbM.js} +19 -19
  112. package/dist/assets/{SettingsCommunityNodesView-DnxcG1WB.js → SettingsCommunityNodesView-BAxes_Db.js} +29 -36
  113. package/dist/assets/{SettingsExternalSecrets-CZeypg03.js → SettingsExternalSecrets-B6jdgfB7.js} +17 -18
  114. package/dist/assets/{SettingsLdapView-BocG9o4_.js → SettingsLdapView-CR2IAnRQ.js} +19 -22
  115. package/dist/assets/{SettingsLogStreamingView-Cb0TLdGI.js → SettingsLogStreamingView-DSRc5q9w.js} +17 -20
  116. package/dist/assets/{SettingsMCPView-B61X_NPm.js → SettingsMCPView-C7HQFidB.js} +136 -164
  117. package/dist/assets/{SettingsMCPView-CuJwNWhp.css → SettingsMCPView-DIdodQTu.css} +28 -41
  118. package/dist/assets/{SettingsPersonalView-DwALyVrM.js → SettingsPersonalView-DOH_Ml9N.js} +15 -16
  119. package/dist/assets/{SettingsSourceControl-o8jjZB6R.js → SettingsSourceControl-DH0mZaa0.js} +19 -21
  120. package/dist/assets/{SettingsSso-CWlyF0Ul.js → SettingsSso-CrWkteb1.js} +21 -24
  121. package/dist/assets/{SettingsUsageAndPlan-qLBre8L1.js → SettingsUsageAndPlan-DQzF59ve.js} +17 -19
  122. package/dist/assets/{SettingsUsersView-IoXkRrA3.js → SettingsUsersView-BZrQxtA7.js} +22 -25
  123. package/dist/assets/{SettingsView-BRggCZxl.js → SettingsView-LDjLlP2V.js} +14 -14
  124. package/dist/assets/{SetupTemplateFormStep-B16Nen7u.js → SetupTemplateFormStep-CwgC9pY3.js} +7 -7
  125. package/dist/assets/{SetupView-B_3dlp0F.js → SetupView-wJeD4wwM.js} +15 -15
  126. package/dist/assets/{SetupWorkflowCredentialsButton-DbpL-wd-.js → SetupWorkflowCredentialsButton-kVNSvjYZ.js} +14 -14
  127. package/dist/assets/{SetupWorkflowFromTemplateView-DtkJ3dhT.js → SetupWorkflowFromTemplateView-CBTduGfH.js} +21 -25
  128. package/dist/assets/{SeverityTag-Bdpvd3O4.js → SeverityTag-CuF3dVKd.js} +2 -2
  129. package/dist/assets/{SigninView-D0mRO95G.js → SigninView-DjWIkUJe.js} +16 -16
  130. package/dist/assets/{SignoutView-D-cEDvGt.js → SignoutView-CP6UttCg.js} +8 -8
  131. package/dist/assets/{SignupView-BGUF0a3y.js → SignupView-DKWZNap-.js} +15 -15
  132. package/dist/assets/{SkeletonAgentCard-BqWJHS47.js → SkeletonAgentCard-DcV1dSF-.js} +8 -8
  133. package/dist/assets/{TagsDropdown-CKHFeXgu.js → TagsDropdown-CuT_jHbX.js} +3 -3
  134. package/dist/assets/{TemplateCard-C1F6Sjp3.js → TemplateCard-DY1aPA-a.js} +6 -7
  135. package/dist/assets/{TemplateDetails-ByaDkPHZ.js → TemplateDetails-Cstu-YNP.js} +6 -7
  136. package/dist/assets/{TemplateList-IOK3RSuN.js → TemplateList-BfBs1Bpa.js} +5 -5
  137. package/dist/assets/{TemplatesCollectionView-CpjEgT9v.js → TemplatesCollectionView-DgKv-274.js} +22 -24
  138. package/dist/assets/{TemplatesSearchView-Ddpn7Bwp.js → TemplatesSearchView-BgdaZIha.js} +19 -21
  139. package/dist/assets/{TemplatesView-DRX4MxqG.js → TemplatesView-HPIEGoX2.js} +3 -3
  140. package/dist/assets/{TemplatesWorkflowView-DOl8Qqi3.js → TemplatesWorkflowView-3-fxkWIH.js} +23 -25
  141. package/dist/assets/{TestRunDetailView-TQvUYMub.js → TestRunDetailView-D9tH7Ptp.js} +19 -19
  142. package/dist/assets/{TimeAgo-DxwwBGgJ.js → TimeAgo-BpAJIqal.js} +3 -3
  143. package/dist/assets/{ToolsSelectorModal-D0Uim3wr.js → ToolsSelectorModal-DSyXV7Ag.js} +17 -18
  144. package/dist/assets/{TriggerPanel-Bkka_-zL.js → TriggerPanel-DDzH4j34.js} +18 -19
  145. package/dist/assets/{VirtualSchema-498CQIM4.js → VirtualSchema-BN0NQDyh.js} +15 -16
  146. package/dist/assets/VirtualSchema-rizWsPXH.js +35 -0
  147. package/dist/assets/{VueMarkdown-Cpmboohi.js → VueMarkdown-D7yo0t2n.js} +1 -1
  148. package/dist/assets/{WorkerView-D0MGMP-3.js → WorkerView-DeYRT0mS.js} +34 -41
  149. package/dist/assets/{WorkflowActivationErrorMessage-CQe9ZG_g.js → WorkflowActivationErrorMessage-D9ktIWO1.js} +1 -1
  150. package/dist/assets/{WorkflowActivator-xCBwqG20.css → WorkflowActivator-BGcCOUCH.css} +2 -2
  151. package/dist/assets/{WorkflowActivator-CQk3zJa2.js → WorkflowActivator-Cj1x_nLm.js} +13 -11
  152. package/dist/assets/{WorkflowExecutionsInfoAccordion-DrB1HwtD.js → WorkflowExecutionsInfoAccordion-DOW8-lUO.js} +11 -15
  153. package/dist/assets/{WorkflowExecutionsLandingPage-wZsE1MEB.js → WorkflowExecutionsLandingPage-D-k97H81.js} +19 -33
  154. package/dist/assets/{WorkflowExecutionsPreview-DhEx7EQF.js → WorkflowExecutionsPreview-bwSmtqxL.js} +22 -25
  155. package/dist/assets/{WorkflowExecutionsView-CDFxKpEl.js → WorkflowExecutionsView-BoJYR4A-.js} +50 -46
  156. package/dist/assets/{WorkflowExecutionsView-J4lWGYW8.css → WorkflowExecutionsView-DzHhxp4K.css} +2 -2
  157. package/dist/assets/{WorkflowHistory-D3BhOWlD.css → WorkflowHistory-BBHdNsOb.css} +147 -98
  158. package/dist/assets/{WorkflowHistory-_npGuIvZ.js → WorkflowHistory-DDwFxfgs.js} +329 -273
  159. package/dist/assets/WorkflowLocation-6rp_-CuW.css +164 -0
  160. package/dist/assets/WorkflowLocation-BcPFmw0j.js +164 -0
  161. package/dist/assets/{WorkflowOnboardingView-DJmpaFOM.js → WorkflowOnboardingView-CQjMFn6h.js} +8 -10
  162. package/dist/assets/{WorkflowPreview-CVFW6eRL.js → WorkflowPreview-C2LPnLG1.js} +4 -4
  163. package/dist/assets/{WorkflowTagsDropdown-Dp6YkEZ3.js → WorkflowTagsDropdown-ChfpozQB.js} +2 -2
  164. package/dist/assets/{WorkflowsView-B068TUtp.js → WorkflowsView-C3nCkxzz.js} +65 -84
  165. package/dist/assets/{_MapCache-BXj4WgHo.js → _MapCache-0zNxISSG.js} +78 -8
  166. package/dist/assets/{_baseOrderBy-GjkKJVvF.js → _baseOrderBy-CesQfsb9.js} +4 -4
  167. package/dist/assets/{_initCloneObject-GPxNDW5O.js → _initCloneObject-DrYdt_vX.js} +2 -2
  168. package/dist/assets/{aiTemplatesStarterCollection.store-Ca9czXOC.js → aiTemplatesStarterCollection.store-Bz4IH9Sr.js} +5 -5
  169. package/dist/assets/{apiKeys.store-D60Aub0Q.js → apiKeys.store-W8uXGfoe.js} +2 -2
  170. package/dist/assets/{assistant.store-C0GxcpwT.js → assistant.store-Cn9sEjYD.js} +6 -6
  171. package/dist/assets/{auth.eventBus-BD50qglP.js → auth.eventBus-D9L5FHI4.js} +1 -1
  172. package/dist/assets/{banners.store-COEGRZB2.js → banners.store-CRNqMmnn.js} +4 -4
  173. package/dist/assets/{builder.store--AJ05qsa.js → builder.store-YujiPssa.js} +5772 -157
  174. package/dist/assets/{chartjs.utils-BuKhcKwM.js → chartjs.utils-CoNBCTXc.js} +3 -3
  175. package/dist/assets/{chat.store-DwNzDu7-.js → chat.store-YbHxxnni.js} +124 -88
  176. package/dist/assets/{chatPanel.store-DcSNy2dM.js → chatPanel.store-DmxMXfyE.js} +17 -11
  177. package/dist/assets/{col-D5wesaQA.js → col-oSGwUVsR.js} +1 -2
  178. package/dist/assets/{constants-B6Jp7SZD.js → constants-D52YoOSp.js} +13 -13
  179. package/dist/assets/{constants-qk3hx0l8.js → constants-DLTaaipl.js} +2 -1
  180. package/dist/assets/{core-CiWhevuy.js → core-BbiIkN91.js} +1 -1
  181. package/dist/assets/{dataTable.store-DjA0BZm0.js → dataTable.store-CUsh5p9b.js} +3 -3
  182. package/dist/assets/{date-picker-ZPBpyB3m.js → date-picker-DeUybCvv.js} +2 -2
  183. package/dist/assets/{dateFormatter-DqsBbNBt.js → dateFormatter-DzJiM44k.js} +2 -2
  184. package/dist/assets/{dialog-DJAwPy6j.js → dialog-C4MrWHj5.js} +3 -3
  185. package/dist/assets/{dist-JIm44DPf.js → dist-DP_8je0B.js} +1 -1
  186. package/dist/assets/{en-b3uD8cvU.js → en-CF30SCh2.js} +11 -1
  187. package/dist/assets/en-DyO2pPiC.js +2 -0
  188. package/dist/assets/{es-BskBLtZB.js → es-DlTgUi2w.js} +1 -1
  189. package/dist/assets/{evaluation.constants-CE1pFRXt.js → evaluation.constants-0Qe9Ioy2.js} +3 -3
  190. package/dist/assets/{executions.store-Di5hWapE.js → executions.store-Dodf4hZt.js} +2 -2
  191. package/dist/assets/{externalSecrets.ee.store-DRAvYvQH.js → externalSecrets.ee.store-CRomIb5E.js} +3 -3
  192. package/dist/assets/{folders.store-CHmc_cIa.js → folders.store-Bld2a-oS.js} +3 -3
  193. package/dist/assets/{index-BPWWnUZx.js → index-BFbfC2Dj.js} +478 -172
  194. package/dist/assets/{index-BkLJ6ICr.css → index-Bl6XoGDE.css} +155 -24
  195. package/dist/assets/{insights.constants-B7y0cvTb.js → insights.constants-C8GITe6H.js} +1 -1
  196. package/dist/assets/{insights.store-CUBXm-KC.js → insights.store-CwovPTtG.js} +5 -5
  197. package/dist/assets/{insights.utils-Dc4VSauh.js → insights.utils-BjffJfoC.js} +4 -4
  198. package/dist/assets/{isEmpty-B9tt1d3-.js → isEmpty-OfTBXDAe.js} +26 -27
  199. package/dist/assets/{languageModules-CLe6cIYW.js → languageModules-D_uyjb6R.js} +1 -1
  200. package/dist/assets/{logStreaming.store-Cv3Kx61Q.js → logStreaming.store-fF1gjMD8.js} +2 -2
  201. package/dist/assets/mcp.constants-DQPD3Ntp.js +10 -0
  202. package/dist/assets/{mcp.store-BY003P3O.js → mcp.store-CaNRXC4L.js} +14 -3
  203. package/dist/assets/{merge-BfSiz1ty.js → merge-BmWPLD5Q.js} +1 -1
  204. package/dist/assets/{nodeCreator.store-CPxLvRpA.js → nodeCreator.store-CnQC3Thy.js} +11 -16
  205. package/dist/assets/{nodeIcon-CwI12n1T.js → nodeIcon-Bcr-G7rB.js} +3 -3
  206. package/dist/assets/{nodeTransforms-E21OvGFn.js → nodeTransforms-DK79e95H.js} +2 -2
  207. package/dist/assets/{orderBy-BD202wCl.js → orderBy-YGC4g6w9.js} +2 -2
  208. package/dist/assets/{personalizedTemplatesV3.store-Bzf1Cn2b.js → personalizedTemplatesV3.store-BKxUzmKZ.js} +3 -5
  209. package/dist/assets/{pickBy-DhNfLbj0.js → pickBy-BnWwuV2u.js} +2 -2
  210. package/dist/assets/{radio-_dKLhwOP.js → radio-DyB--77Q.js} +1 -2
  211. package/dist/assets/{readyToRun.store-2jju4pRU.js → readyToRun.store-BRvUlRSD.js} +6 -7
  212. package/dist/assets/{readyToRunWorkflows.store-Bx_siYQA.js → readyToRunWorkflows.store-BNsVPNB9.js} +5 -6
  213. package/dist/assets/{roles.store-CfxqweOK.js → roles.store-pbRRxt0E.js} +3 -3
  214. package/dist/assets/{router-WNnUej-x.js → router-nTea-Urj.js} +111 -90
  215. package/dist/assets/{sanitize-html-Cft-jOcY.js → sanitize-html-Cc45ZKm8.js} +1 -1
  216. package/dist/assets/{schemaPreview.store-Do_fvTej.js → schemaPreview.store-D6CQiOeI.js} +3 -3
  217. package/dist/assets/{semver-CJFCetEf.js → semver-CrR9VADA.js} +2 -2
  218. package/dist/assets/{sourceControl.eventBus-Cvxq2KVt.js → sourceControl.eventBus-KIeXsiU7.js} +1 -1
  219. package/dist/assets/{src-DS0bffpn.css → src-CWWagUhy.css} +729 -81
  220. package/dist/assets/{src-RwnQoRPP.js → src-DTY1hJHs.js} +1675 -3573
  221. package/dist/assets/{sso.store-BfZ0zC0E.js → sso.store-Di00dtDC.js} +2 -2
  222. package/dist/assets/{table-8YZ1ENjX.js → table-VmuGzK7A.js} +3 -3
  223. package/dist/assets/{templateActions-Cs0Obyiy.js → templateActions-DIWkQgOn.js} +5 -5
  224. package/dist/assets/{templateTransforms-wuELQNpD.js → templateTransforms-BYfEDiSK.js} +1 -1
  225. package/dist/assets/{truncate-BmR9EyjG.js → truncate-ByNK2lRy.js} +2266 -27
  226. package/dist/assets/{uniqBy-DbOFAEPx.js → uniqBy-CJFaA-UD.js} +1 -1
  227. package/dist/assets/{usage.store-BQa0qHOj.js → usage.store-BY4g7MNp.js} +2 -2
  228. package/dist/assets/{useActions-CMJSyR7r.js → useActions-CBZGt3Kf.js} +4 -4
  229. package/dist/assets/{useBeforeUnload-DpKXUfN8.js → useBeforeUnload-CQAM_lAW.js} +3 -3
  230. package/dist/assets/{useCanvasMapping-BqapVTrs.js → useCanvasMapping-C0deX2fv.js} +35 -32
  231. package/dist/assets/{useCanvasOperations-Biw6mnUM.js → useCanvasOperations-BQyHvbXi.js} +140 -28
  232. package/dist/assets/{useClipboard-DvY5RseI.js → useClipboard-CqFyEHaX.js} +2 -2
  233. package/dist/assets/{useCommandBar-UBYl6Lds.js → useCommandBar-I9Rh00u6.js} +26 -30
  234. package/dist/assets/{useCredentialResolvers-PAhMLRo2.js → useCredentialResolvers-CaMKldsZ.js} +4 -5
  235. package/dist/assets/{useCustomAgent-BRGYGAAN.js → useCustomAgent-DLwpqJcm.js} +25 -15
  236. package/dist/assets/{useDebounce-Cisb25yt.js → useDebounce-DGSOfe85.js} +2 -2
  237. package/dist/assets/{useExecutionData-OVx1QXVF.js → useExecutionData-BocEX1BJ.js} +1 -1
  238. package/dist/assets/{useExecutionDebugging-B8KvDhkA.js → useExecutionDebugging-CsWzUsUi.js} +6 -7
  239. package/dist/assets/{useExecutionHelpers-DkOSl_iJ.js → useExecutionHelpers-BWgzEc86.js} +5 -5
  240. package/dist/assets/{useImportCurlCommand-3YGPoLWh.js → useImportCurlCommand-DGIgJik0.js} +9 -9
  241. package/dist/assets/{useKeybindings-BcvGBvra.js → useKeybindings-DD-ZZkmj.js} +4 -4
  242. package/dist/assets/{useLogsTreeExpand-CbLhbpHd.js → useLogsTreeExpand-BQmkJc3D.js} +13 -13
  243. package/dist/assets/{useMcp-1Dma_uQx.js → useMcp-CtPU_6al.js} +2 -2
  244. package/dist/assets/{usePageRedirectionHelper-D0ob2A1J.js → usePageRedirectionHelper-TzgTKFxt.js} +3 -4
  245. package/dist/assets/{usePinnedData-B3-uxBtk.js → usePinnedData-Dztv0dCp.js} +4 -4
  246. package/dist/assets/{usePushConnection-BA2hhsGP.js → usePushConnection-Ce3EppRV.js} +12 -13
  247. package/dist/assets/{useRecentResources-C_Rg8cei.js → useRecentResources-fniP3oOE.js} +9 -8
  248. package/dist/assets/{useRunWorkflow-nBr2MJkO.js → useRunWorkflow-CJgkc0Iq.js} +9 -10
  249. package/dist/assets/{useSettingsItems-B7GpfNq3.js → useSettingsItems-Ds8JJZE_.js} +4 -4
  250. package/dist/assets/{useTelemetryContext-DHoBfjOQ.js → useTelemetryContext-Ds7-s6ZC.js} +1 -1
  251. package/dist/assets/{useWorkflowActivate-B3DYQS1P.js → useWorkflowActivate-DocAQ9u8.js} +7 -8
  252. package/dist/assets/{useWorkflowsCache-BNSc43ak.js → useWorkflowsCache-BXhjK2ZF.js} +1 -1
  253. package/dist/assets/{userRoleProvisioning.store-DAStBpkv.js → userRoleProvisioning.store-DNmA1ftX.js} +2 -2
  254. package/dist/assets/utils-C2GPI2gK.js +54 -0
  255. package/dist/assets/{versions.store-BIIVPCEy.js → versions.store-qQUmfjg3.js} +3 -3
  256. package/dist/index.html +109 -119
  257. package/package.json +1 -1
  258. package/dist/assets/ChatSidebar-DW6c9Blv.js +0 -555
  259. package/dist/assets/CollectionParameter-Ci_0m1Vk.js +0 -58
  260. package/dist/assets/DemoFooter-DuvjbD1c.js +0 -71
  261. package/dist/assets/FileSaver.min--9uV1QmK.js +0 -72
  262. package/dist/assets/LogsPanel-DZfIzuWL.js +0 -58
  263. package/dist/assets/ModalDrawer-DJsD4EIc.js +0 -277
  264. package/dist/assets/NodeIcon-eaW3atZy.css +0 -125
  265. package/dist/assets/RunDataParsedAiContent-DuwV5rNK.js +0 -24
  266. package/dist/assets/VirtualSchema-B-AQEHOc.js +0 -42
  267. package/dist/assets/cloudPlan.store-Dad6qPdn.js +0 -185
  268. package/dist/assets/en-BD3FHSTF.js +0 -2
  269. package/dist/assets/focusPanel.store-C5r79FXL.js +0 -208
  270. package/dist/assets/mcp.constants-svQUbNx5.js +0 -8
  271. package/dist/assets/npsSurvey.store-DF2xZcCA.js +0 -98
  272. package/dist/assets/overlay-Bil1NnPh.js +0 -165
  273. package/dist/assets/templates.store-C3DEfML8.js +0 -3915
  274. package/dist/assets/useChatHubSidebarState-CZrP-mNo.js +0 -29
  275. package/dist/assets/useMessage-DIJ5qCTv.js +0 -610
  276. package/dist/assets/useWorkflowSaving-B1uc1ePR.js +0 -229
  277. package/dist/assets/utils-BLHsa_NJ.js +0 -18
  278. /package/dist/assets/{AnimatedSpinner-g6zev3_N.js → AnimatedSpinner-wiGFgffA.js} +0 -0
  279. /package/dist/assets/{CalendarDate-B-JEhNYg.js → CalendarDate-zWqgZMlk.js} +0 -0
  280. /package/dist/assets/{ChatFile-8ik4bOn3.js → ChatFile-cnNK8Kf8.js} +0 -0
  281. /package/dist/assets/{ChatSidebarOpener-CxM-3LAt.css → ChatLayout-CxM-3LAt.css} +0 -0
  282. /package/dist/assets/{ChatPersonalAgentsView-BBfu-g98.css → ChatWorkflowAgentsView-BBfu-g98.css} +0 -0
  283. /package/dist/assets/{PageViewLayout-B889Bfwc.js → PageViewLayout-BHSzOio1.js} +0 -0
  284. /package/dist/assets/{TextWithHighlights-C4QSPTGM.js → TextWithHighlights-DjzuDrgO.js} +0 -0
  285. /package/dist/assets/{buttons.esm-CZxEX89d.js → buttons.esm-CT4flsfB.js} +0 -0
  286. /package/dist/assets/{chart-BxWK2ZOo.js → chart-CE3HWIkr.js} +0 -0
  287. /package/dist/assets/{core-CXk6RNMV.js → core-6W4wWNc1.js} +0 -0
  288. /package/dist/assets/{dateformat-hG8NERse.js → dateformat-CM9k0--B.js} +0 -0
  289. /package/dist/assets/{exports-CdZcr9ah.js → exports-hpMZaOPT.js} +0 -0
  290. /package/dist/assets/{fileUtils-D3GQ2UWQ.js → fileUtils-D_SiS8no.js} +0 -0
  291. /package/dist/assets/{path-browserify-BgjP7RyT.js → path-browserify-BtCDmZ3_.js} +0 -0
  292. /package/dist/assets/{retry-CMAFrhVi.js → retry-dP46utx2.js} +0 -0
  293. /package/dist/assets/{smartDecimal-Bi50OE4b.js → smartDecimal-DK6-_VSq.js} +0 -0
  294. /package/dist/assets/{sortByProperty-DAqnDMg7.js → sortByProperty-CV1aCzkS.js} +0 -0
  295. /package/dist/assets/{useIntersectionObserver-BZ6Jqnr3.js → useIntersectionObserver-DXKoRNFj.js} +0 -0
  296. /package/dist/assets/{vue-0rlD32wK.js → vue-Dg_43WEg.js} +0 -0
  297. /package/dist/assets/{vue-json-pretty-B9qWbmOF.js → vue-json-pretty-DGKuDe33.js} +0 -0
  298. /package/dist/assets/{xml-DSIt30t0.js → xml-B6veOr9z.js} +0 -0
@@ -1,6 +1,35 @@
1
1
  import { t as __commonJSMin } from "./chunk-6z4oVpB-.js";
2
- import { $t as hasOwn, C as computed, D as createElementBlock, Dn as init_dist, Dt as getCurrentScope, En as global, F as getCurrentInstance, Ft as readonly, G as nextTick, Gt as unref, It as ref, Jt as NOOP, K as onActivated, L as h, Lt as shallowReactive, Nt as onScopeDispose, P as defineComponent, Pt as reactive, Q as onUnmounted, W as mergeProps, Xt as capitalize, Y as onDeactivated, Yt as camelize, Z as onMounted, _t as watch, at as renderSlot, cn as isObject, et as openBlock, gt as warn, jt as isRef, mn as isString, nn as isArray$4, nt as provide, tn as init_shared_esm_bundler, vt as watchEffect, w as createBaseVNode, z as inject, zt as shallowRef } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
3
- import { ct as isVue2, d as require__Symbol, l as require_isObjectLike, m as require_isArray, t as require__MapCache, u as require__baseGetTag } from "./_MapCache-BXj4WgHo.js";
2
+ import { $t as hasOwn, C as computed, Cn as toDisplayString, D as createElementBlock, Dn as init_dist, Dt as getCurrentScope, E as createCommentVNode, En as global, F as getCurrentInstance, Ft as readonly, G as nextTick, Gt as unref, It as ref, J as onBeforeUnmount, Jt as NOOP, K as onActivated, L as h, Lt as shallowReactive, M as createVNode, Nt as onScopeDispose, P as defineComponent, Pt as reactive, Q as onUnmounted, T as createBlock, V as isVNode, Vt as toRef, W as mergeProps, Xt as capitalize, Y as onDeactivated, Yt as camelize, Z as onMounted, _ as Fragment, _t as watch, an as isFunction, at as renderSlot, bn as normalizeStyle, bt as withCtx, cn as isObject, ct as resolveDynamicComponent, et as openBlock, gt as warn, h as withModifiers, jt as isRef, mn as isString, nn as isArray$4, nt as provide, p as vShow, pt as useSlots, tn as init_shared_esm_bundler, ut as useAttrs, vn as normalizeClass, vt as watchEffect, w as createBaseVNode, x as Text, xt as withDirectives, z as inject, zt as shallowRef } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
3
+ import { d as require__Symbol, l as require_isObjectLike, lt as isVue2, m as require_isArray, t as require__MapCache, u as require__baseGetTag } from "./_MapCache-0zNxISSG.js";
4
+ var FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])`;
5
+ var isVisible = (element) => {
6
+ return getComputedStyle(element).position === "fixed" ? false : element.offsetParent !== null;
7
+ };
8
+ var obtainAllFocusableElements$1 = (element) => {
9
+ return Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter((item) => isFocusable(item) && isVisible(item));
10
+ };
11
+ var isFocusable = (element) => {
12
+ if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) return true;
13
+ if (element.disabled) return false;
14
+ switch (element.nodeName) {
15
+ case "A": return !!element.href && element.rel !== "ignore";
16
+ case "INPUT": return !(element.type === "hidden" || element.type === "file");
17
+ case "BUTTON":
18
+ case "SELECT":
19
+ case "TEXTAREA": return true;
20
+ default: return false;
21
+ }
22
+ };
23
+ var triggerEvent = function(elm, name, ...opts) {
24
+ let eventName;
25
+ if (name.includes("mouse") || name.includes("click")) eventName = "MouseEvents";
26
+ else if (name.includes("key")) eventName = "KeyboardEvent";
27
+ else eventName = "HTMLEvents";
28
+ const evt = document.createEvent(eventName);
29
+ evt.initEvent(name, ...opts);
30
+ elm.dispatchEvent(evt);
31
+ return elm;
32
+ };
4
33
  var __defProp$9 = Object.defineProperty;
5
34
  var __defProps$6 = Object.defineProperties;
6
35
  var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
@@ -32,7 +61,7 @@ function computedEager(fn, options) {
32
61
  var _a;
33
62
  var isClient = typeof window !== "undefined";
34
63
  var isDef = (val) => typeof val !== "undefined";
35
- var isFunction$1 = (val) => typeof val === "function";
64
+ var isFunction$2 = (val) => typeof val === "function";
36
65
  var isString$1 = (val) => typeof val === "string";
37
66
  var noop$1 = () => {};
38
67
  var isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
@@ -424,7 +453,7 @@ function useVModel(props, key, emit, options = {}) {
424
453
  let event = eventName;
425
454
  if (!key) key = "modelValue";
426
455
  event = eventName || event || `update:${key.toString()}`;
427
- const cloneFn = (val) => !clone ? val : isFunction$1(clone) ? clone(val) : cloneFnJSON(val);
456
+ const cloneFn = (val) => !clone ? val : isFunction$2(clone) ? clone(val) : cloneFnJSON(val);
428
457
  const getValue$1 = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
429
458
  if (passive) {
430
459
  const proxy = ref(getValue$1());
@@ -519,12 +548,12 @@ function isObject$1(value) {
519
548
  }
520
549
  var isObject_default = isObject$1;
521
550
  var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
522
- function isFunction(value) {
551
+ function isFunction$1(value) {
523
552
  if (!isObject_default(value)) return false;
524
553
  var tag = _baseGetTag_default(value);
525
554
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
526
555
  }
527
- var isFunction_default = isFunction;
556
+ var isFunction_default = isFunction$1;
528
557
  var _coreJsData_default = _root_default["__core-js_shared__"];
529
558
  var maskSrcKey = function() {
530
559
  var uid = /[^.]+$/.exec(_coreJsData_default && _coreJsData_default.keys && _coreJsData_default.keys.IE_PROTO || "");
@@ -841,6 +870,10 @@ function fromPairs(pairs) {
841
870
  return result;
842
871
  }
843
872
  var fromPairs_default = fromPairs;
873
+ function isNil(value) {
874
+ return value == null;
875
+ }
876
+ var isNil_default = isNil;
844
877
  function baseSet(object, path, value, customizer) {
845
878
  if (!isObject_default(object)) return object;
846
879
  path = _castPath_default(path, object);
@@ -937,6 +970,47 @@ function addUnit(value, defaultUnit = "px") {
937
970
  else if (isString(value)) return value;
938
971
  debugWarn(SCOPE, "binding value must be a string or number");
939
972
  }
973
+ var scrollBarWidth;
974
+ var getScrollBarWidth = (namespace) => {
975
+ var _a$1;
976
+ if (!isClient) return 0;
977
+ if (scrollBarWidth !== void 0) return scrollBarWidth;
978
+ const outer = document.createElement("div");
979
+ outer.className = `${namespace}-scrollbar__wrap`;
980
+ outer.style.visibility = "hidden";
981
+ outer.style.width = "100px";
982
+ outer.style.position = "absolute";
983
+ outer.style.top = "-9999px";
984
+ document.body.appendChild(outer);
985
+ const widthNoScroll = outer.offsetWidth;
986
+ outer.style.overflow = "scroll";
987
+ const inner = document.createElement("div");
988
+ inner.style.width = "100%";
989
+ outer.appendChild(inner);
990
+ const widthWithScroll = inner.offsetWidth;
991
+ (_a$1 = outer.parentNode) == null || _a$1.removeChild(outer);
992
+ scrollBarWidth = widthNoScroll - widthWithScroll;
993
+ return scrollBarWidth;
994
+ };
995
+ function scrollIntoView(container, selected) {
996
+ if (!isClient) return;
997
+ if (!selected) {
998
+ container.scrollTop = 0;
999
+ return;
1000
+ }
1001
+ const offsetParents = [];
1002
+ let pointer = selected.offsetParent;
1003
+ while (pointer !== null && container !== pointer && container.contains(pointer)) {
1004
+ offsetParents.push(pointer);
1005
+ pointer = pointer.offsetParent;
1006
+ }
1007
+ const top = selected.offsetTop + offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0);
1008
+ const bottom = top + selected.offsetHeight;
1009
+ const viewRectTop = container.scrollTop;
1010
+ const viewRectBottom = viewRectTop + container.clientHeight;
1011
+ if (top < viewRectTop) container.scrollTop = top;
1012
+ else if (bottom > viewRectBottom) container.scrollTop = bottom - container.clientHeight;
1013
+ }
940
1014
  var arrow_down_default = /* @__PURE__ */ defineComponent({
941
1015
  name: "ArrowDown",
942
1016
  __name: "arrow-down",
@@ -1377,12 +1451,6 @@ var withInstallFunction = (fn, name) => {
1377
1451
  };
1378
1452
  return fn;
1379
1453
  };
1380
- var withInstallDirective = (directive, name) => {
1381
- directive.install = (app) => {
1382
- app.directive(name, directive);
1383
- };
1384
- return directive;
1385
- };
1386
1454
  var withNoopInstall = (component) => {
1387
1455
  component.install = NOOP;
1388
1456
  return component;
@@ -1404,6 +1472,20 @@ var EVENT_CODE = {
1404
1472
  home: "Home",
1405
1473
  end: "End"
1406
1474
  };
1475
+ var datePickTypes = [
1476
+ "year",
1477
+ "month",
1478
+ "date",
1479
+ "dates",
1480
+ "week",
1481
+ "datetime",
1482
+ "datetimerange",
1483
+ "daterange",
1484
+ "monthrange"
1485
+ ];
1486
+ var UPDATE_MODEL_EVENT = "update:modelValue";
1487
+ var CHANGE_EVENT = "change";
1488
+ var INPUT_EVENT = "input";
1407
1489
  var componentSizes = [
1408
1490
  "",
1409
1491
  "default",
@@ -1415,6 +1497,64 @@ var componentSizeMap = {
1415
1497
  default: 32,
1416
1498
  small: 24
1417
1499
  };
1500
+ var isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
1501
+ init_shared_esm_bundler();
1502
+ var PatchFlags = /* @__PURE__ */ ((PatchFlags2) => {
1503
+ PatchFlags2[PatchFlags2["TEXT"] = 1] = "TEXT";
1504
+ PatchFlags2[PatchFlags2["CLASS"] = 2] = "CLASS";
1505
+ PatchFlags2[PatchFlags2["STYLE"] = 4] = "STYLE";
1506
+ PatchFlags2[PatchFlags2["PROPS"] = 8] = "PROPS";
1507
+ PatchFlags2[PatchFlags2["FULL_PROPS"] = 16] = "FULL_PROPS";
1508
+ PatchFlags2[PatchFlags2["HYDRATE_EVENTS"] = 32] = "HYDRATE_EVENTS";
1509
+ PatchFlags2[PatchFlags2["STABLE_FRAGMENT"] = 64] = "STABLE_FRAGMENT";
1510
+ PatchFlags2[PatchFlags2["KEYED_FRAGMENT"] = 128] = "KEYED_FRAGMENT";
1511
+ PatchFlags2[PatchFlags2["UNKEYED_FRAGMENT"] = 256] = "UNKEYED_FRAGMENT";
1512
+ PatchFlags2[PatchFlags2["NEED_PATCH"] = 512] = "NEED_PATCH";
1513
+ PatchFlags2[PatchFlags2["DYNAMIC_SLOTS"] = 1024] = "DYNAMIC_SLOTS";
1514
+ PatchFlags2[PatchFlags2["HOISTED"] = -1] = "HOISTED";
1515
+ PatchFlags2[PatchFlags2["BAIL"] = -2] = "BAIL";
1516
+ return PatchFlags2;
1517
+ })(PatchFlags || {});
1518
+ var flattedChildren = (children) => {
1519
+ const vNodes = isArray$4(children) ? children : [children];
1520
+ const result = [];
1521
+ vNodes.forEach((child) => {
1522
+ var _a$1;
1523
+ if (isArray$4(child)) result.push(...flattedChildren(child));
1524
+ else if (isVNode(child) && isArray$4(child.children)) result.push(...flattedChildren(child.children));
1525
+ else {
1526
+ result.push(child);
1527
+ if (isVNode(child) && ((_a$1 = child.component) == null ? void 0 : _a$1.subTree)) result.push(...flattedChildren(child.component.subTree));
1528
+ }
1529
+ });
1530
+ return result;
1531
+ };
1532
+ var isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
1533
+ var mutable = (val) => val;
1534
+ var DEFAULT_EXCLUDE_KEYS = ["class", "style"];
1535
+ var LISTENER_PREFIX = /^on[A-Z]/;
1536
+ var useAttrs$1 = (params = {}) => {
1537
+ const { excludeListeners = false, excludeKeys } = params;
1538
+ const allExcludeKeys = computed(() => {
1539
+ return ((excludeKeys == null ? void 0 : excludeKeys.value) || []).concat(DEFAULT_EXCLUDE_KEYS);
1540
+ });
1541
+ const instance = getCurrentInstance();
1542
+ if (!instance) {
1543
+ debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
1544
+ return computed(() => ({}));
1545
+ }
1546
+ return computed(() => {
1547
+ var _a$1;
1548
+ return fromPairs_default(Object.entries((_a$1 = instance.proxy) == null ? void 0 : _a$1.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))));
1549
+ });
1550
+ };
1551
+ var useDeprecated = ({ from, replacement, scope, version: version$1, ref: ref$1, type = "API" }, condition) => {
1552
+ watch(() => unref(condition), (val) => {
1553
+ if (val) debugWarn(scope, `[${type}] ${from} is about to be deprecated in version ${version$1}, please use ${replacement} instead.
1554
+ For more detail, please visit: ${ref$1}
1555
+ `);
1556
+ }, { immediate: true });
1557
+ };
1418
1558
  var English = {
1419
1559
  name: "en",
1420
1560
  el: {
@@ -1639,6 +1779,48 @@ var useNamespace = (block, namespaceOverrides) => {
1639
1779
  cssVarBlockName
1640
1780
  };
1641
1781
  };
1782
+ var useProp = (name) => {
1783
+ const vm = getCurrentInstance();
1784
+ return computed(() => {
1785
+ var _a$1, _b;
1786
+ return (_b = (_a$1 = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a$1.$props) == null ? void 0 : _b[name];
1787
+ });
1788
+ };
1789
+ var defaultIdInjection = {
1790
+ prefix: Math.floor(Math.random() * 1e4),
1791
+ current: 0
1792
+ };
1793
+ var ID_INJECTION_KEY = Symbol("elIdInjection");
1794
+ var useIdInjection = () => {
1795
+ return getCurrentInstance() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
1796
+ };
1797
+ var useId = (deterministicId) => {
1798
+ const idInjection = useIdInjection();
1799
+ if (!isClient && idInjection === defaultIdInjection) debugWarn("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
1800
+ usage: app.provide(ID_INJECTION_KEY, {
1801
+ prefix: number,
1802
+ current: number,
1803
+ })`);
1804
+ const namespace = useGetDerivedNamespace();
1805
+ return computed(() => unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
1806
+ };
1807
+ var registeredEscapeHandlers = [];
1808
+ var cachedHandler = (e) => {
1809
+ const event = e;
1810
+ if (event.key === EVENT_CODE.esc) registeredEscapeHandlers.forEach((registeredHandler) => registeredHandler(event));
1811
+ };
1812
+ var useEscapeKeydown = (handler) => {
1813
+ onMounted(() => {
1814
+ if (registeredEscapeHandlers.length === 0) document.addEventListener("keydown", cachedHandler);
1815
+ if (isClient) registeredEscapeHandlers.push(handler);
1816
+ });
1817
+ onBeforeUnmount(() => {
1818
+ registeredEscapeHandlers = registeredEscapeHandlers.filter((registeredHandler) => registeredHandler !== handler);
1819
+ if (registeredEscapeHandlers.length === 0) {
1820
+ if (isClient) document.removeEventListener("keydown", cachedHandler);
1821
+ }
1822
+ });
1823
+ };
1642
1824
  var zIndex = ref(0);
1643
1825
  var defaultInitialZIndex = 2e3;
1644
1826
  var zIndexContextKey = Symbol("zIndexContextKey");
@@ -1659,6 +1841,37 @@ var useZIndex = (zIndexOverrides) => {
1659
1841
  nextZIndex
1660
1842
  };
1661
1843
  };
1844
+ function useCursor(input) {
1845
+ const selectionRef = ref();
1846
+ function recordCursor() {
1847
+ if (input.value == void 0) return;
1848
+ const { selectionStart, selectionEnd, value } = input.value;
1849
+ if (selectionStart == null || selectionEnd == null) return;
1850
+ selectionRef.value = {
1851
+ selectionStart,
1852
+ selectionEnd,
1853
+ value,
1854
+ beforeTxt: value.slice(0, Math.max(0, selectionStart)),
1855
+ afterTxt: value.slice(Math.max(0, selectionEnd))
1856
+ };
1857
+ }
1858
+ function setCursor() {
1859
+ if (input.value == void 0 || selectionRef.value == void 0) return;
1860
+ const { value } = input.value;
1861
+ const { beforeTxt, afterTxt, selectionStart } = selectionRef.value;
1862
+ if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0) return;
1863
+ let startPos = value.length;
1864
+ if (value.endsWith(afterTxt)) startPos = value.length - afterTxt.length;
1865
+ else if (value.startsWith(beforeTxt)) startPos = beforeTxt.length;
1866
+ else {
1867
+ const beforeLastChar = beforeTxt[selectionStart - 1];
1868
+ const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
1869
+ if (newIndex !== -1) startPos = newIndex + 1;
1870
+ }
1871
+ input.value.setSelectionRange(startPos, startPos);
1872
+ }
1873
+ return [recordCursor, setCursor];
1874
+ }
1662
1875
  var useSizeProp = buildProp({
1663
1876
  type: String,
1664
1877
  values: componentSizes,
@@ -1671,6 +1884,39 @@ var useGlobalSize = () => {
1671
1884
  return unref(injectedSize.size) || "";
1672
1885
  });
1673
1886
  };
1887
+ init_shared_esm_bundler();
1888
+ function useFocusController(target, { afterFocus, beforeBlur, afterBlur } = {}) {
1889
+ const { emit } = getCurrentInstance();
1890
+ const wrapperRef = shallowRef();
1891
+ const isFocused = ref(false);
1892
+ const handleFocus = (event) => {
1893
+ if (isFocused.value) return;
1894
+ isFocused.value = true;
1895
+ emit("focus", event);
1896
+ afterFocus?.();
1897
+ };
1898
+ const handleBlur = (event) => {
1899
+ var _a$1;
1900
+ if ((isFunction(beforeBlur) ? beforeBlur(event) : false) || event.relatedTarget && ((_a$1 = wrapperRef.value) == null ? void 0 : _a$1.contains(event.relatedTarget))) return;
1901
+ isFocused.value = false;
1902
+ emit("blur", event);
1903
+ afterBlur?.();
1904
+ };
1905
+ const handleClick = () => {
1906
+ var _a$1;
1907
+ (_a$1 = target.value) == null || _a$1.focus();
1908
+ };
1909
+ watch(wrapperRef, (el) => {
1910
+ if (el) el.setAttribute("tabindex", "-1");
1911
+ });
1912
+ useEventListener(wrapperRef, "click", handleClick);
1913
+ return {
1914
+ wrapperRef,
1915
+ isFocused,
1916
+ handleFocus,
1917
+ handleBlur
1918
+ };
1919
+ }
1674
1920
  var configProviderContextKey = Symbol();
1675
1921
  var globalConfig = ref();
1676
1922
  function useGlobalConfig(key, defaultValue = void 0) {
@@ -1770,6 +2016,1999 @@ var ElIcon = withInstall(/* @__PURE__ */ _export_sfc(/* @__PURE__ */ defineCompo
1770
2016
  };
1771
2017
  }
1772
2018
  }), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]));
2019
+ var formContextKey = Symbol("formContextKey");
2020
+ var formItemContextKey = Symbol("formItemContextKey");
2021
+ var useFormSize = (fallback, ignore = {}) => {
2022
+ const emptyRef = ref(void 0);
2023
+ const size = ignore.prop ? emptyRef : useProp("size");
2024
+ const globalConfig$1 = ignore.global ? emptyRef : useGlobalSize();
2025
+ const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
2026
+ const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
2027
+ return computed(() => size.value || unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig$1.value || "");
2028
+ };
2029
+ var useFormDisabled = (fallback) => {
2030
+ const disabled = useProp("disabled");
2031
+ const form = inject(formContextKey, void 0);
2032
+ return computed(() => disabled.value || unref(fallback) || (form == null ? void 0 : form.disabled) || false);
2033
+ };
2034
+ var useFormItem = () => {
2035
+ return {
2036
+ form: inject(formContextKey, void 0),
2037
+ formItem: inject(formItemContextKey, void 0)
2038
+ };
2039
+ };
2040
+ var useFormItemInputId = (props, { formItemContext, disableIdGeneration, disableIdManagement }) => {
2041
+ if (!disableIdGeneration) disableIdGeneration = ref(false);
2042
+ if (!disableIdManagement) disableIdManagement = ref(false);
2043
+ const inputId = ref();
2044
+ let idUnwatch = void 0;
2045
+ const isLabeledByFormItem = computed(() => {
2046
+ var _a$1;
2047
+ return !!(!props.label && formItemContext && formItemContext.inputIds && ((_a$1 = formItemContext.inputIds) == null ? void 0 : _a$1.length) <= 1);
2048
+ });
2049
+ onMounted(() => {
2050
+ idUnwatch = watch([toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration2]) => {
2051
+ const newId = id != null ? id : !disableIdGeneration2 ? useId().value : void 0;
2052
+ if (newId !== inputId.value) {
2053
+ if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
2054
+ inputId.value && formItemContext.removeInputId(inputId.value);
2055
+ if (!(disableIdManagement == null ? void 0 : disableIdManagement.value) && !disableIdGeneration2 && newId) formItemContext.addInputId(newId);
2056
+ }
2057
+ inputId.value = newId;
2058
+ }
2059
+ }, { immediate: true });
2060
+ });
2061
+ onUnmounted(() => {
2062
+ idUnwatch && idUnwatch();
2063
+ if (formItemContext == null ? void 0 : formItemContext.removeInputId) inputId.value && formItemContext.removeInputId(inputId.value);
2064
+ });
2065
+ return {
2066
+ isLabeledByFormItem,
2067
+ inputId
2068
+ };
2069
+ };
2070
+ var hiddenTextarea = void 0;
2071
+ var HIDDEN_STYLE = `
2072
+ height:0 !important;
2073
+ visibility:hidden !important;
2074
+ ${isFirefox() ? "" : "overflow:hidden !important;"}
2075
+ position:absolute !important;
2076
+ z-index:-1000 !important;
2077
+ top:0 !important;
2078
+ right:0 !important;
2079
+ `;
2080
+ var CONTEXT_STYLE = [
2081
+ "letter-spacing",
2082
+ "line-height",
2083
+ "padding-top",
2084
+ "padding-bottom",
2085
+ "font-family",
2086
+ "font-weight",
2087
+ "font-size",
2088
+ "text-rendering",
2089
+ "text-transform",
2090
+ "width",
2091
+ "text-indent",
2092
+ "padding-left",
2093
+ "padding-right",
2094
+ "border-width",
2095
+ "box-sizing"
2096
+ ];
2097
+ function calculateNodeStyling(targetElement) {
2098
+ const style = window.getComputedStyle(targetElement);
2099
+ const boxSizing = style.getPropertyValue("box-sizing");
2100
+ const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
2101
+ const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
2102
+ return {
2103
+ contextStyle: CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(";"),
2104
+ paddingSize,
2105
+ borderSize,
2106
+ boxSizing
2107
+ };
2108
+ }
2109
+ function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
2110
+ var _a$1;
2111
+ if (!hiddenTextarea) {
2112
+ hiddenTextarea = document.createElement("textarea");
2113
+ document.body.appendChild(hiddenTextarea);
2114
+ }
2115
+ const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
2116
+ hiddenTextarea.setAttribute("style", `${contextStyle};${HIDDEN_STYLE}`);
2117
+ hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
2118
+ let height = hiddenTextarea.scrollHeight;
2119
+ const result = {};
2120
+ if (boxSizing === "border-box") height = height + borderSize;
2121
+ else if (boxSizing === "content-box") height = height - paddingSize;
2122
+ hiddenTextarea.value = "";
2123
+ const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
2124
+ if (isNumber(minRows)) {
2125
+ let minHeight = singleRowHeight * minRows;
2126
+ if (boxSizing === "border-box") minHeight = minHeight + paddingSize + borderSize;
2127
+ height = Math.max(minHeight, height);
2128
+ result.minHeight = `${minHeight}px`;
2129
+ }
2130
+ if (isNumber(maxRows)) {
2131
+ let maxHeight = singleRowHeight * maxRows;
2132
+ if (boxSizing === "border-box") maxHeight = maxHeight + paddingSize + borderSize;
2133
+ height = Math.min(maxHeight, height);
2134
+ }
2135
+ result.height = `${height}px`;
2136
+ (_a$1 = hiddenTextarea.parentNode) == null || _a$1.removeChild(hiddenTextarea);
2137
+ hiddenTextarea = void 0;
2138
+ return result;
2139
+ }
2140
+ init_shared_esm_bundler();
2141
+ var inputProps = buildProps({
2142
+ id: {
2143
+ type: String,
2144
+ default: void 0
2145
+ },
2146
+ size: useSizeProp,
2147
+ disabled: Boolean,
2148
+ modelValue: {
2149
+ type: definePropType([
2150
+ String,
2151
+ Number,
2152
+ Object
2153
+ ]),
2154
+ default: ""
2155
+ },
2156
+ type: {
2157
+ type: String,
2158
+ default: "text"
2159
+ },
2160
+ resize: {
2161
+ type: String,
2162
+ values: [
2163
+ "none",
2164
+ "both",
2165
+ "horizontal",
2166
+ "vertical"
2167
+ ]
2168
+ },
2169
+ autosize: {
2170
+ type: definePropType([Boolean, Object]),
2171
+ default: false
2172
+ },
2173
+ autocomplete: {
2174
+ type: String,
2175
+ default: "off"
2176
+ },
2177
+ formatter: { type: Function },
2178
+ parser: { type: Function },
2179
+ placeholder: { type: String },
2180
+ form: { type: String },
2181
+ readonly: {
2182
+ type: Boolean,
2183
+ default: false
2184
+ },
2185
+ clearable: {
2186
+ type: Boolean,
2187
+ default: false
2188
+ },
2189
+ showPassword: {
2190
+ type: Boolean,
2191
+ default: false
2192
+ },
2193
+ showWordLimit: {
2194
+ type: Boolean,
2195
+ default: false
2196
+ },
2197
+ suffixIcon: { type: iconPropType },
2198
+ prefixIcon: { type: iconPropType },
2199
+ containerRole: {
2200
+ type: String,
2201
+ default: void 0
2202
+ },
2203
+ label: {
2204
+ type: String,
2205
+ default: void 0
2206
+ },
2207
+ tabindex: {
2208
+ type: [String, Number],
2209
+ default: 0
2210
+ },
2211
+ validateEvent: {
2212
+ type: Boolean,
2213
+ default: true
2214
+ },
2215
+ inputStyle: {
2216
+ type: definePropType([
2217
+ Object,
2218
+ Array,
2219
+ String
2220
+ ]),
2221
+ default: () => mutable({})
2222
+ },
2223
+ autofocus: {
2224
+ type: Boolean,
2225
+ default: false
2226
+ }
2227
+ });
2228
+ var inputEmits = {
2229
+ [UPDATE_MODEL_EVENT]: (value) => isString(value),
2230
+ input: (value) => isString(value),
2231
+ change: (value) => isString(value),
2232
+ focus: (evt) => evt instanceof FocusEvent,
2233
+ blur: (evt) => evt instanceof FocusEvent,
2234
+ clear: () => true,
2235
+ mouseleave: (evt) => evt instanceof MouseEvent,
2236
+ mouseenter: (evt) => evt instanceof MouseEvent,
2237
+ keydown: (evt) => evt instanceof Event,
2238
+ compositionstart: (evt) => evt instanceof CompositionEvent,
2239
+ compositionupdate: (evt) => evt instanceof CompositionEvent,
2240
+ compositionend: (evt) => evt instanceof CompositionEvent
2241
+ };
2242
+ init_shared_esm_bundler();
2243
+ var _hoisted_1 = ["role"];
2244
+ var _hoisted_2 = [
2245
+ "id",
2246
+ "type",
2247
+ "disabled",
2248
+ "formatter",
2249
+ "parser",
2250
+ "readonly",
2251
+ "autocomplete",
2252
+ "tabindex",
2253
+ "aria-label",
2254
+ "placeholder",
2255
+ "form",
2256
+ "autofocus"
2257
+ ];
2258
+ var _hoisted_3 = [
2259
+ "id",
2260
+ "tabindex",
2261
+ "disabled",
2262
+ "readonly",
2263
+ "autocomplete",
2264
+ "aria-label",
2265
+ "placeholder",
2266
+ "form",
2267
+ "autofocus"
2268
+ ];
2269
+ var ElInput = withInstall(/* @__PURE__ */ _export_sfc(/* @__PURE__ */ defineComponent({
2270
+ ...defineComponent({
2271
+ name: "ElInput",
2272
+ inheritAttrs: false
2273
+ }),
2274
+ props: inputProps,
2275
+ emits: inputEmits,
2276
+ setup(__props, { expose, emit }) {
2277
+ const props = __props;
2278
+ const rawAttrs = useAttrs();
2279
+ const slots = useSlots();
2280
+ const containerAttrs = computed(() => {
2281
+ const comboBoxAttrs = {};
2282
+ if (props.containerRole === "combobox") {
2283
+ comboBoxAttrs["aria-haspopup"] = rawAttrs["aria-haspopup"];
2284
+ comboBoxAttrs["aria-owns"] = rawAttrs["aria-owns"];
2285
+ comboBoxAttrs["aria-expanded"] = rawAttrs["aria-expanded"];
2286
+ }
2287
+ return comboBoxAttrs;
2288
+ });
2289
+ const containerKls = computed(() => [
2290
+ props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
2291
+ nsInput.m(inputSize.value),
2292
+ nsInput.is("disabled", inputDisabled.value),
2293
+ nsInput.is("exceed", inputExceed.value),
2294
+ {
2295
+ [nsInput.b("group")]: slots.prepend || slots.append,
2296
+ [nsInput.bm("group", "append")]: slots.append,
2297
+ [nsInput.bm("group", "prepend")]: slots.prepend,
2298
+ [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
2299
+ [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
2300
+ [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value
2301
+ },
2302
+ rawAttrs.class
2303
+ ]);
2304
+ const wrapperKls = computed(() => [nsInput.e("wrapper"), nsInput.is("focus", isFocused.value)]);
2305
+ const attrs = useAttrs$1({ excludeKeys: computed(() => {
2306
+ return Object.keys(containerAttrs.value);
2307
+ }) });
2308
+ const { form, formItem } = useFormItem();
2309
+ const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
2310
+ const inputSize = useFormSize();
2311
+ const inputDisabled = useFormDisabled();
2312
+ const nsInput = useNamespace("input");
2313
+ const nsTextarea = useNamespace("textarea");
2314
+ const input = shallowRef();
2315
+ const textarea = shallowRef();
2316
+ const hovering = ref(false);
2317
+ const isComposing = ref(false);
2318
+ const passwordVisible = ref(false);
2319
+ const countStyle = ref();
2320
+ const textareaCalcStyle = shallowRef(props.inputStyle);
2321
+ const _ref = computed(() => input.value || textarea.value);
2322
+ const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(_ref, { afterBlur() {
2323
+ var _a$1;
2324
+ if (props.validateEvent) (_a$1 = formItem == null ? void 0 : formItem.validate) == null || _a$1.call(formItem, "blur").catch((err) => debugWarn(err));
2325
+ } });
2326
+ const needStatusIcon = computed(() => {
2327
+ var _a$1;
2328
+ return (_a$1 = form == null ? void 0 : form.statusIcon) != null ? _a$1 : false;
2329
+ });
2330
+ const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
2331
+ const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
2332
+ const passwordIcon = computed(() => passwordVisible.value ? view_default : hide_default);
2333
+ const containerStyle = computed(() => [rawAttrs.style, props.inputStyle]);
2334
+ const textareaStyle = computed(() => [
2335
+ props.inputStyle,
2336
+ textareaCalcStyle.value,
2337
+ { resize: props.resize }
2338
+ ]);
2339
+ const nativeInputValue = computed(() => isNil_default(props.modelValue) ? "" : String(props.modelValue));
2340
+ const showClear = computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (isFocused.value || hovering.value));
2341
+ const showPwdVisible = computed(() => props.showPassword && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (!!nativeInputValue.value || isFocused.value));
2342
+ const isWordLimitVisible = computed(() => props.showWordLimit && !!attrs.value.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
2343
+ const textLength = computed(() => nativeInputValue.value.length);
2344
+ const inputExceed = computed(() => !!isWordLimitVisible.value && textLength.value > Number(attrs.value.maxlength));
2345
+ const suffixVisible = computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
2346
+ const [recordCursor, setCursor] = useCursor(input);
2347
+ useResizeObserver(textarea, (entries) => {
2348
+ onceInitSizeTextarea();
2349
+ if (!isWordLimitVisible.value || props.resize !== "both") return;
2350
+ const { width } = entries[0].contentRect;
2351
+ countStyle.value = { right: `calc(100% - ${width + 15 + 6}px)` };
2352
+ });
2353
+ const resizeTextarea = () => {
2354
+ const { type, autosize } = props;
2355
+ if (!isClient || type !== "textarea" || !textarea.value) return;
2356
+ if (autosize) {
2357
+ const minRows = isObject(autosize) ? autosize.minRows : void 0;
2358
+ const maxRows = isObject(autosize) ? autosize.maxRows : void 0;
2359
+ const textareaStyle2 = calcTextareaHeight(textarea.value, minRows, maxRows);
2360
+ textareaCalcStyle.value = {
2361
+ overflowY: "hidden",
2362
+ ...textareaStyle2
2363
+ };
2364
+ nextTick(() => {
2365
+ textarea.value.offsetHeight;
2366
+ textareaCalcStyle.value = textareaStyle2;
2367
+ });
2368
+ } else textareaCalcStyle.value = { minHeight: calcTextareaHeight(textarea.value).minHeight };
2369
+ };
2370
+ const createOnceInitResize = (resizeTextarea2) => {
2371
+ let isInit = false;
2372
+ return () => {
2373
+ var _a$1;
2374
+ if (isInit || !props.autosize) return;
2375
+ if (!(((_a$1 = textarea.value) == null ? void 0 : _a$1.offsetParent) === null)) {
2376
+ resizeTextarea2();
2377
+ isInit = true;
2378
+ }
2379
+ };
2380
+ };
2381
+ const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
2382
+ const setNativeInputValue = () => {
2383
+ const input2 = _ref.value;
2384
+ const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
2385
+ if (!input2 || input2.value === formatterValue) return;
2386
+ input2.value = formatterValue;
2387
+ };
2388
+ const handleInput = async (event) => {
2389
+ recordCursor();
2390
+ let { value } = event.target;
2391
+ if (props.formatter) value = props.parser ? props.parser(value) : value;
2392
+ if (isComposing.value) return;
2393
+ if (value === nativeInputValue.value) {
2394
+ setNativeInputValue();
2395
+ return;
2396
+ }
2397
+ emit(UPDATE_MODEL_EVENT, value);
2398
+ emit("input", value);
2399
+ await nextTick();
2400
+ setNativeInputValue();
2401
+ setCursor();
2402
+ };
2403
+ const handleChange = (event) => {
2404
+ emit("change", event.target.value);
2405
+ };
2406
+ const handleCompositionStart = (event) => {
2407
+ emit("compositionstart", event);
2408
+ isComposing.value = true;
2409
+ };
2410
+ const handleCompositionUpdate = (event) => {
2411
+ var _a$1;
2412
+ emit("compositionupdate", event);
2413
+ const text = (_a$1 = event.target) == null ? void 0 : _a$1.value;
2414
+ isComposing.value = !isKorean(text[text.length - 1] || "");
2415
+ };
2416
+ const handleCompositionEnd = (event) => {
2417
+ emit("compositionend", event);
2418
+ if (isComposing.value) {
2419
+ isComposing.value = false;
2420
+ handleInput(event);
2421
+ }
2422
+ };
2423
+ const handlePasswordVisible = () => {
2424
+ passwordVisible.value = !passwordVisible.value;
2425
+ focus();
2426
+ };
2427
+ const focus = async () => {
2428
+ var _a$1;
2429
+ await nextTick();
2430
+ (_a$1 = _ref.value) == null || _a$1.focus();
2431
+ };
2432
+ const blur = () => {
2433
+ var _a$1;
2434
+ return (_a$1 = _ref.value) == null ? void 0 : _a$1.blur();
2435
+ };
2436
+ const handleMouseLeave = (evt) => {
2437
+ hovering.value = false;
2438
+ emit("mouseleave", evt);
2439
+ };
2440
+ const handleMouseEnter = (evt) => {
2441
+ hovering.value = true;
2442
+ emit("mouseenter", evt);
2443
+ };
2444
+ const handleKeydown = (evt) => {
2445
+ emit("keydown", evt);
2446
+ };
2447
+ const select = () => {
2448
+ var _a$1;
2449
+ (_a$1 = _ref.value) == null || _a$1.select();
2450
+ };
2451
+ const clear = () => {
2452
+ emit(UPDATE_MODEL_EVENT, "");
2453
+ emit("change", "");
2454
+ emit("clear");
2455
+ emit("input", "");
2456
+ };
2457
+ watch(() => props.modelValue, () => {
2458
+ var _a$1;
2459
+ nextTick(() => resizeTextarea());
2460
+ if (props.validateEvent) (_a$1 = formItem == null ? void 0 : formItem.validate) == null || _a$1.call(formItem, "change").catch((err) => debugWarn(err));
2461
+ });
2462
+ watch(nativeInputValue, () => setNativeInputValue());
2463
+ watch(() => props.type, async () => {
2464
+ await nextTick();
2465
+ setNativeInputValue();
2466
+ resizeTextarea();
2467
+ });
2468
+ onMounted(() => {
2469
+ if (!props.formatter && props.parser) debugWarn("ElInput", "If you set the parser, you also need to set the formatter.");
2470
+ setNativeInputValue();
2471
+ nextTick(resizeTextarea);
2472
+ });
2473
+ expose({
2474
+ input,
2475
+ textarea,
2476
+ ref: _ref,
2477
+ textareaStyle,
2478
+ autosize: toRef(props, "autosize"),
2479
+ focus,
2480
+ blur,
2481
+ select,
2482
+ clear,
2483
+ resizeTextarea
2484
+ });
2485
+ return (_ctx, _cache) => {
2486
+ return withDirectives((openBlock(), createElementBlock("div", mergeProps(unref(containerAttrs), {
2487
+ class: unref(containerKls),
2488
+ style: unref(containerStyle),
2489
+ role: _ctx.containerRole,
2490
+ onMouseenter: handleMouseEnter,
2491
+ onMouseleave: handleMouseLeave
2492
+ }), [createCommentVNode(" input "), _ctx.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2493
+ createCommentVNode(" prepend slot "),
2494
+ _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
2495
+ key: 0,
2496
+ class: normalizeClass(unref(nsInput).be("group", "prepend"))
2497
+ }, [renderSlot(_ctx.$slots, "prepend")], 2)) : createCommentVNode("v-if", true),
2498
+ createBaseVNode("div", {
2499
+ ref_key: "wrapperRef",
2500
+ ref: wrapperRef,
2501
+ class: normalizeClass(unref(wrapperKls))
2502
+ }, [
2503
+ createCommentVNode(" prefix slot "),
2504
+ _ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock("span", {
2505
+ key: 0,
2506
+ class: normalizeClass(unref(nsInput).e("prefix"))
2507
+ }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("prefix-inner")) }, [renderSlot(_ctx.$slots, "prefix"), _ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
2508
+ key: 0,
2509
+ class: normalizeClass(unref(nsInput).e("icon"))
2510
+ }, {
2511
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))]),
2512
+ _: 1
2513
+ }, 8, ["class"])) : createCommentVNode("v-if", true)], 2)], 2)) : createCommentVNode("v-if", true),
2514
+ createBaseVNode("input", mergeProps({
2515
+ id: unref(inputId),
2516
+ ref_key: "input",
2517
+ ref: input,
2518
+ class: unref(nsInput).e("inner")
2519
+ }, unref(attrs), {
2520
+ type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
2521
+ disabled: unref(inputDisabled),
2522
+ formatter: _ctx.formatter,
2523
+ parser: _ctx.parser,
2524
+ readonly: _ctx.readonly,
2525
+ autocomplete: _ctx.autocomplete,
2526
+ tabindex: _ctx.tabindex,
2527
+ "aria-label": _ctx.label,
2528
+ placeholder: _ctx.placeholder,
2529
+ style: _ctx.inputStyle,
2530
+ form: props.form,
2531
+ autofocus: props.autofocus,
2532
+ onCompositionstart: handleCompositionStart,
2533
+ onCompositionupdate: handleCompositionUpdate,
2534
+ onCompositionend: handleCompositionEnd,
2535
+ onInput: handleInput,
2536
+ onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
2537
+ onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)),
2538
+ onChange: handleChange,
2539
+ onKeydown: handleKeydown
2540
+ }), null, 16, _hoisted_2),
2541
+ createCommentVNode(" suffix slot "),
2542
+ unref(suffixVisible) ? (openBlock(), createElementBlock("span", {
2543
+ key: 1,
2544
+ class: normalizeClass(unref(nsInput).e("suffix"))
2545
+ }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("suffix-inner")) }, [
2546
+ !unref(showClear) || !unref(showPwdVisible) || !unref(isWordLimitVisible) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [renderSlot(_ctx.$slots, "suffix"), _ctx.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), {
2547
+ key: 0,
2548
+ class: normalizeClass(unref(nsInput).e("icon"))
2549
+ }, {
2550
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon)))]),
2551
+ _: 1
2552
+ }, 8, ["class"])) : createCommentVNode("v-if", true)], 64)) : createCommentVNode("v-if", true),
2553
+ unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), {
2554
+ key: 1,
2555
+ class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]),
2556
+ onMousedown: withModifiers(unref(NOOP), ["prevent"]),
2557
+ onClick: clear
2558
+ }, {
2559
+ default: withCtx(() => [createVNode(unref(circle_close_default))]),
2560
+ _: 1
2561
+ }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
2562
+ unref(showPwdVisible) ? (openBlock(), createBlock(unref(ElIcon), {
2563
+ key: 2,
2564
+ class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("password")]),
2565
+ onClick: handlePasswordVisible
2566
+ }, {
2567
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(passwordIcon))))]),
2568
+ _: 1
2569
+ }, 8, ["class"])) : createCommentVNode("v-if", true),
2570
+ unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
2571
+ key: 3,
2572
+ class: normalizeClass(unref(nsInput).e("count"))
2573
+ }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("count-inner")) }, toDisplayString(unref(textLength)) + " / " + toDisplayString(unref(attrs).maxlength), 3)], 2)) : createCommentVNode("v-if", true),
2574
+ unref(validateState) && unref(validateIcon) && unref(needStatusIcon) ? (openBlock(), createBlock(unref(ElIcon), {
2575
+ key: 4,
2576
+ class: normalizeClass([
2577
+ unref(nsInput).e("icon"),
2578
+ unref(nsInput).e("validateIcon"),
2579
+ unref(nsInput).is("loading", unref(validateState) === "validating")
2580
+ ])
2581
+ }, {
2582
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(validateIcon))))]),
2583
+ _: 1
2584
+ }, 8, ["class"])) : createCommentVNode("v-if", true)
2585
+ ], 2)], 2)) : createCommentVNode("v-if", true)
2586
+ ], 2),
2587
+ createCommentVNode(" append slot "),
2588
+ _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
2589
+ key: 1,
2590
+ class: normalizeClass(unref(nsInput).be("group", "append"))
2591
+ }, [renderSlot(_ctx.$slots, "append")], 2)) : createCommentVNode("v-if", true)
2592
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2593
+ createCommentVNode(" textarea "),
2594
+ createBaseVNode("textarea", mergeProps({
2595
+ id: unref(inputId),
2596
+ ref_key: "textarea",
2597
+ ref: textarea,
2598
+ class: unref(nsTextarea).e("inner")
2599
+ }, unref(attrs), {
2600
+ tabindex: _ctx.tabindex,
2601
+ disabled: unref(inputDisabled),
2602
+ readonly: _ctx.readonly,
2603
+ autocomplete: _ctx.autocomplete,
2604
+ style: unref(textareaStyle),
2605
+ "aria-label": _ctx.label,
2606
+ placeholder: _ctx.placeholder,
2607
+ form: props.form,
2608
+ autofocus: props.autofocus,
2609
+ onCompositionstart: handleCompositionStart,
2610
+ onCompositionupdate: handleCompositionUpdate,
2611
+ onCompositionend: handleCompositionEnd,
2612
+ onInput: handleInput,
2613
+ onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
2614
+ onBlur: _cache[3] || (_cache[3] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)),
2615
+ onChange: handleChange,
2616
+ onKeydown: handleKeydown
2617
+ }), null, 16, _hoisted_3),
2618
+ unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
2619
+ key: 0,
2620
+ style: normalizeStyle(countStyle.value),
2621
+ class: normalizeClass(unref(nsInput).e("count"))
2622
+ }, toDisplayString(unref(textLength)) + " / " + toDisplayString(unref(attrs).maxlength), 7)) : createCommentVNode("v-if", true)
2623
+ ], 64))], 16, _hoisted_1)), [[vShow, _ctx.type !== "hidden"]]);
2624
+ };
2625
+ }
2626
+ }), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]));
2627
+ var FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
2628
+ var FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
2629
+ var FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented";
2630
+ var FOCUS_AFTER_TRAPPED_OPTS = {
2631
+ cancelable: true,
2632
+ bubbles: false
2633
+ };
2634
+ var FOCUSOUT_PREVENTED_OPTS = {
2635
+ cancelable: true,
2636
+ bubbles: false
2637
+ };
2638
+ var ON_TRAP_FOCUS_EVT = "focusAfterTrapped";
2639
+ var ON_RELEASE_FOCUS_EVT = "focusAfterReleased";
2640
+ var FOCUS_TRAP_INJECTION_KEY = Symbol("elFocusTrap");
2641
+ var focusReason = ref();
2642
+ var lastUserFocusTimestamp = ref(0);
2643
+ var lastAutomatedFocusTimestamp = ref(0);
2644
+ var focusReasonUserCount = 0;
2645
+ var obtainAllFocusableElements = (element) => {
2646
+ const nodes = [];
2647
+ const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
2648
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
2649
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
2650
+ return node.tabIndex >= 0 || node === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
2651
+ } });
2652
+ while (walker.nextNode()) nodes.push(walker.currentNode);
2653
+ return nodes;
2654
+ };
2655
+ var getVisibleElement = (elements, container) => {
2656
+ for (const element of elements) if (!isHidden(element, container)) return element;
2657
+ };
2658
+ var isHidden = (element, container) => {
2659
+ if (getComputedStyle(element).visibility === "hidden") return true;
2660
+ while (element) {
2661
+ if (container && element === container) return false;
2662
+ if (getComputedStyle(element).display === "none") return true;
2663
+ element = element.parentElement;
2664
+ }
2665
+ return false;
2666
+ };
2667
+ var getEdges = (container) => {
2668
+ const focusable = obtainAllFocusableElements(container);
2669
+ return [getVisibleElement(focusable, container), getVisibleElement(focusable.reverse(), container)];
2670
+ };
2671
+ var isSelectable = (element) => {
2672
+ return element instanceof HTMLInputElement && "select" in element;
2673
+ };
2674
+ var tryFocus = (element, shouldSelect) => {
2675
+ if (element && element.focus) {
2676
+ const prevFocusedElement = document.activeElement;
2677
+ element.focus({ preventScroll: true });
2678
+ lastAutomatedFocusTimestamp.value = window.performance.now();
2679
+ if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) element.select();
2680
+ }
2681
+ };
2682
+ function removeFromStack(list, item) {
2683
+ const copy = [...list];
2684
+ const idx = list.indexOf(item);
2685
+ if (idx !== -1) copy.splice(idx, 1);
2686
+ return copy;
2687
+ }
2688
+ var createFocusableStack = () => {
2689
+ let stack = [];
2690
+ const push = (layer) => {
2691
+ const currentLayer = stack[0];
2692
+ if (currentLayer && layer !== currentLayer) currentLayer.pause();
2693
+ stack = removeFromStack(stack, layer);
2694
+ stack.unshift(layer);
2695
+ };
2696
+ const remove = (layer) => {
2697
+ var _a$1, _b;
2698
+ stack = removeFromStack(stack, layer);
2699
+ (_b = (_a$1 = stack[0]) == null ? void 0 : _a$1.resume) == null || _b.call(_a$1);
2700
+ };
2701
+ return {
2702
+ push,
2703
+ remove
2704
+ };
2705
+ };
2706
+ var focusFirstDescendant = (elements, shouldSelect = false) => {
2707
+ const prevFocusedElement = document.activeElement;
2708
+ for (const element of elements) {
2709
+ tryFocus(element, shouldSelect);
2710
+ if (document.activeElement !== prevFocusedElement) return;
2711
+ }
2712
+ };
2713
+ var focusableStack = createFocusableStack();
2714
+ var isFocusCausedByUserEvent = () => {
2715
+ return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value;
2716
+ };
2717
+ var notifyFocusReasonPointer = () => {
2718
+ focusReason.value = "pointer";
2719
+ lastUserFocusTimestamp.value = window.performance.now();
2720
+ };
2721
+ var notifyFocusReasonKeydown = () => {
2722
+ focusReason.value = "keyboard";
2723
+ lastUserFocusTimestamp.value = window.performance.now();
2724
+ };
2725
+ var useFocusReason = () => {
2726
+ onMounted(() => {
2727
+ if (focusReasonUserCount === 0) {
2728
+ document.addEventListener("mousedown", notifyFocusReasonPointer);
2729
+ document.addEventListener("touchstart", notifyFocusReasonPointer);
2730
+ document.addEventListener("keydown", notifyFocusReasonKeydown);
2731
+ }
2732
+ focusReasonUserCount++;
2733
+ });
2734
+ onBeforeUnmount(() => {
2735
+ focusReasonUserCount--;
2736
+ if (focusReasonUserCount <= 0) {
2737
+ document.removeEventListener("mousedown", notifyFocusReasonPointer);
2738
+ document.removeEventListener("touchstart", notifyFocusReasonPointer);
2739
+ document.removeEventListener("keydown", notifyFocusReasonKeydown);
2740
+ }
2741
+ });
2742
+ return {
2743
+ focusReason,
2744
+ lastUserFocusTimestamp,
2745
+ lastAutomatedFocusTimestamp
2746
+ };
2747
+ };
2748
+ var createFocusOutPreventedEvent = (detail) => {
2749
+ return new CustomEvent(FOCUSOUT_PREVENTED, {
2750
+ ...FOCUSOUT_PREVENTED_OPTS,
2751
+ detail
2752
+ });
2753
+ };
2754
+ init_shared_esm_bundler();
2755
+ var _sfc_main = defineComponent({
2756
+ name: "ElFocusTrap",
2757
+ inheritAttrs: false,
2758
+ props: {
2759
+ loop: Boolean,
2760
+ trapped: Boolean,
2761
+ focusTrapEl: Object,
2762
+ focusStartEl: {
2763
+ type: [Object, String],
2764
+ default: "first"
2765
+ }
2766
+ },
2767
+ emits: [
2768
+ ON_TRAP_FOCUS_EVT,
2769
+ ON_RELEASE_FOCUS_EVT,
2770
+ "focusin",
2771
+ "focusout",
2772
+ "focusout-prevented",
2773
+ "release-requested"
2774
+ ],
2775
+ setup(props, { emit }) {
2776
+ const forwardRef = ref();
2777
+ let lastFocusBeforeTrapped;
2778
+ let lastFocusAfterTrapped;
2779
+ const { focusReason: focusReason$1 } = useFocusReason();
2780
+ useEscapeKeydown((event) => {
2781
+ if (props.trapped && !focusLayer.paused) emit("release-requested", event);
2782
+ });
2783
+ const focusLayer = {
2784
+ paused: false,
2785
+ pause() {
2786
+ this.paused = true;
2787
+ },
2788
+ resume() {
2789
+ this.paused = false;
2790
+ }
2791
+ };
2792
+ const onKeydown = (e) => {
2793
+ if (!props.loop && !props.trapped) return;
2794
+ if (focusLayer.paused) return;
2795
+ const { key, altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e;
2796
+ const { loop } = props;
2797
+ const isTabbing = key === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey;
2798
+ const currentFocusingEl = document.activeElement;
2799
+ if (isTabbing && currentFocusingEl) {
2800
+ const container = currentTarget;
2801
+ const [first, last] = getEdges(container);
2802
+ if (!(first && last)) {
2803
+ if (currentFocusingEl === container) {
2804
+ const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason$1.value });
2805
+ emit("focusout-prevented", focusoutPreventedEvent);
2806
+ if (!focusoutPreventedEvent.defaultPrevented) e.preventDefault();
2807
+ }
2808
+ } else if (!shiftKey && currentFocusingEl === last) {
2809
+ const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason$1.value });
2810
+ emit("focusout-prevented", focusoutPreventedEvent);
2811
+ if (!focusoutPreventedEvent.defaultPrevented) {
2812
+ e.preventDefault();
2813
+ if (loop) tryFocus(first, true);
2814
+ }
2815
+ } else if (shiftKey && [first, container].includes(currentFocusingEl)) {
2816
+ const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason$1.value });
2817
+ emit("focusout-prevented", focusoutPreventedEvent);
2818
+ if (!focusoutPreventedEvent.defaultPrevented) {
2819
+ e.preventDefault();
2820
+ if (loop) tryFocus(last, true);
2821
+ }
2822
+ }
2823
+ }
2824
+ };
2825
+ provide(FOCUS_TRAP_INJECTION_KEY, {
2826
+ focusTrapRef: forwardRef,
2827
+ onKeydown
2828
+ });
2829
+ watch(() => props.focusTrapEl, (focusTrapEl) => {
2830
+ if (focusTrapEl) forwardRef.value = focusTrapEl;
2831
+ }, { immediate: true });
2832
+ watch([forwardRef], ([forwardRef2], [oldForwardRef]) => {
2833
+ if (forwardRef2) {
2834
+ forwardRef2.addEventListener("keydown", onKeydown);
2835
+ forwardRef2.addEventListener("focusin", onFocusIn);
2836
+ forwardRef2.addEventListener("focusout", onFocusOut);
2837
+ }
2838
+ if (oldForwardRef) {
2839
+ oldForwardRef.removeEventListener("keydown", onKeydown);
2840
+ oldForwardRef.removeEventListener("focusin", onFocusIn);
2841
+ oldForwardRef.removeEventListener("focusout", onFocusOut);
2842
+ }
2843
+ });
2844
+ const trapOnFocus = (e) => {
2845
+ emit(ON_TRAP_FOCUS_EVT, e);
2846
+ };
2847
+ const releaseOnFocus = (e) => emit(ON_RELEASE_FOCUS_EVT, e);
2848
+ const onFocusIn = (e) => {
2849
+ const trapContainer = unref(forwardRef);
2850
+ if (!trapContainer) return;
2851
+ const target = e.target;
2852
+ const relatedTarget = e.relatedTarget;
2853
+ const isFocusedInTrap = target && trapContainer.contains(target);
2854
+ if (!props.trapped) {
2855
+ if (!(relatedTarget && trapContainer.contains(relatedTarget))) lastFocusBeforeTrapped = relatedTarget;
2856
+ }
2857
+ if (isFocusedInTrap) emit("focusin", e);
2858
+ if (focusLayer.paused) return;
2859
+ if (props.trapped) if (isFocusedInTrap) lastFocusAfterTrapped = target;
2860
+ else tryFocus(lastFocusAfterTrapped, true);
2861
+ };
2862
+ const onFocusOut = (e) => {
2863
+ const trapContainer = unref(forwardRef);
2864
+ if (focusLayer.paused || !trapContainer) return;
2865
+ if (props.trapped) {
2866
+ const relatedTarget = e.relatedTarget;
2867
+ if (!isNil_default(relatedTarget) && !trapContainer.contains(relatedTarget)) setTimeout(() => {
2868
+ if (!focusLayer.paused && props.trapped) {
2869
+ const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason$1.value });
2870
+ emit("focusout-prevented", focusoutPreventedEvent);
2871
+ if (!focusoutPreventedEvent.defaultPrevented) tryFocus(lastFocusAfterTrapped, true);
2872
+ }
2873
+ }, 0);
2874
+ } else {
2875
+ const target = e.target;
2876
+ if (!(target && trapContainer.contains(target))) emit("focusout", e);
2877
+ }
2878
+ };
2879
+ async function startTrap() {
2880
+ await nextTick();
2881
+ const trapContainer = unref(forwardRef);
2882
+ if (trapContainer) {
2883
+ focusableStack.push(focusLayer);
2884
+ const prevFocusedElement = trapContainer.contains(document.activeElement) ? lastFocusBeforeTrapped : document.activeElement;
2885
+ lastFocusBeforeTrapped = prevFocusedElement;
2886
+ if (!trapContainer.contains(prevFocusedElement)) {
2887
+ const focusEvent = new Event(FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS);
2888
+ trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
2889
+ trapContainer.dispatchEvent(focusEvent);
2890
+ if (!focusEvent.defaultPrevented) nextTick(() => {
2891
+ let focusStartEl = props.focusStartEl;
2892
+ if (!isString(focusStartEl)) {
2893
+ tryFocus(focusStartEl);
2894
+ if (document.activeElement !== focusStartEl) focusStartEl = "first";
2895
+ }
2896
+ if (focusStartEl === "first") focusFirstDescendant(obtainAllFocusableElements(trapContainer), true);
2897
+ if (document.activeElement === prevFocusedElement || focusStartEl === "container") tryFocus(trapContainer);
2898
+ });
2899
+ }
2900
+ }
2901
+ }
2902
+ function stopTrap() {
2903
+ const trapContainer = unref(forwardRef);
2904
+ if (trapContainer) {
2905
+ trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
2906
+ const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, {
2907
+ ...FOCUS_AFTER_TRAPPED_OPTS,
2908
+ detail: { focusReason: focusReason$1.value }
2909
+ });
2910
+ trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
2911
+ trapContainer.dispatchEvent(releasedEvent);
2912
+ if (!releasedEvent.defaultPrevented && (focusReason$1.value == "keyboard" || !isFocusCausedByUserEvent() || trapContainer.contains(document.activeElement))) tryFocus(lastFocusBeforeTrapped != null ? lastFocusBeforeTrapped : document.body);
2913
+ trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
2914
+ focusableStack.remove(focusLayer);
2915
+ }
2916
+ }
2917
+ onMounted(() => {
2918
+ if (props.trapped) startTrap();
2919
+ watch(() => props.trapped, (trapped) => {
2920
+ if (trapped) startTrap();
2921
+ else stopTrap();
2922
+ });
2923
+ });
2924
+ onBeforeUnmount(() => {
2925
+ if (props.trapped) stopTrap();
2926
+ });
2927
+ return { onKeydown };
2928
+ }
2929
+ });
2930
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
2931
+ return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
2932
+ }
2933
+ var ElFocusTrap = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);
2934
+ var buttonGroupContextKey = Symbol("buttonGroupContextKey");
2935
+ var useButton = (props, emit) => {
2936
+ useDeprecated({
2937
+ from: "type.text",
2938
+ replacement: "link",
2939
+ version: "3.0.0",
2940
+ scope: "props",
2941
+ ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
2942
+ }, computed(() => props.type === "text"));
2943
+ const buttonGroupContext = inject(buttonGroupContextKey, void 0);
2944
+ const globalConfig$1 = useGlobalConfig("button");
2945
+ const { form } = useFormItem();
2946
+ const _size = useFormSize(computed(() => buttonGroupContext == null ? void 0 : buttonGroupContext.size));
2947
+ const _disabled = useFormDisabled();
2948
+ const _ref = ref();
2949
+ const slots = useSlots();
2950
+ const _type = computed(() => props.type || (buttonGroupContext == null ? void 0 : buttonGroupContext.type) || "");
2951
+ const autoInsertSpace = computed(() => {
2952
+ var _a$1, _b, _c;
2953
+ return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a$1 = globalConfig$1.value) == null ? void 0 : _a$1.autoInsertSpace) != null ? _c : false;
2954
+ });
2955
+ const _props = computed(() => {
2956
+ if (props.tag === "button") return {
2957
+ ariaDisabled: _disabled.value || props.loading,
2958
+ disabled: _disabled.value || props.loading,
2959
+ autofocus: props.autofocus,
2960
+ type: props.nativeType
2961
+ };
2962
+ return {};
2963
+ });
2964
+ const shouldAddSpace = computed(() => {
2965
+ var _a$1;
2966
+ const defaultSlot = (_a$1 = slots.default) == null ? void 0 : _a$1.call(slots);
2967
+ if (autoInsertSpace.value && (defaultSlot == null ? void 0 : defaultSlot.length) === 1) {
2968
+ const slot = defaultSlot[0];
2969
+ if ((slot == null ? void 0 : slot.type) === Text) {
2970
+ const text = slot.children;
2971
+ return /^\p{Unified_Ideograph}{2}$/u.test(text.trim());
2972
+ }
2973
+ }
2974
+ return false;
2975
+ });
2976
+ const handleClick = (evt) => {
2977
+ if (props.nativeType === "reset") form?.resetFields();
2978
+ emit("click", evt);
2979
+ };
2980
+ return {
2981
+ _disabled,
2982
+ _size,
2983
+ _type,
2984
+ _ref,
2985
+ _props,
2986
+ shouldAddSpace,
2987
+ handleClick
2988
+ };
2989
+ };
2990
+ var buttonProps = buildProps({
2991
+ size: useSizeProp,
2992
+ disabled: Boolean,
2993
+ type: {
2994
+ type: String,
2995
+ values: [
2996
+ "default",
2997
+ "primary",
2998
+ "success",
2999
+ "warning",
3000
+ "info",
3001
+ "danger",
3002
+ "text",
3003
+ ""
3004
+ ],
3005
+ default: ""
3006
+ },
3007
+ icon: { type: iconPropType },
3008
+ nativeType: {
3009
+ type: String,
3010
+ values: [
3011
+ "button",
3012
+ "submit",
3013
+ "reset"
3014
+ ],
3015
+ default: "button"
3016
+ },
3017
+ loading: Boolean,
3018
+ loadingIcon: {
3019
+ type: iconPropType,
3020
+ default: () => loading_default
3021
+ },
3022
+ plain: Boolean,
3023
+ text: Boolean,
3024
+ link: Boolean,
3025
+ bg: Boolean,
3026
+ autofocus: Boolean,
3027
+ round: Boolean,
3028
+ circle: Boolean,
3029
+ color: String,
3030
+ dark: Boolean,
3031
+ autoInsertSpace: {
3032
+ type: Boolean,
3033
+ default: void 0
3034
+ },
3035
+ tag: {
3036
+ type: definePropType([String, Object]),
3037
+ default: "button"
3038
+ }
3039
+ });
3040
+ var buttonEmits = { click: (evt) => evt instanceof MouseEvent };
3041
+ function bound01(n, max) {
3042
+ if (isOnePointZero(n)) n = "100%";
3043
+ var isPercent = isPercentage(n);
3044
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
3045
+ if (isPercent) n = parseInt(String(n * max), 10) / 100;
3046
+ if (Math.abs(n - max) < 1e-6) return 1;
3047
+ if (max === 360) n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
3048
+ else n = n % max / parseFloat(String(max));
3049
+ return n;
3050
+ }
3051
+ function clamp01(val) {
3052
+ return Math.min(1, Math.max(0, val));
3053
+ }
3054
+ function isOnePointZero(n) {
3055
+ return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
3056
+ }
3057
+ function isPercentage(n) {
3058
+ return typeof n === "string" && n.indexOf("%") !== -1;
3059
+ }
3060
+ function boundAlpha(a) {
3061
+ a = parseFloat(a);
3062
+ if (isNaN(a) || a < 0 || a > 1) a = 1;
3063
+ return a;
3064
+ }
3065
+ function convertToPercentage(n) {
3066
+ if (n <= 1) return "".concat(Number(n) * 100, "%");
3067
+ return n;
3068
+ }
3069
+ function pad2(c) {
3070
+ return c.length === 1 ? "0" + c : String(c);
3071
+ }
3072
+ function rgbToRgb(r, g, b) {
3073
+ return {
3074
+ r: bound01(r, 255) * 255,
3075
+ g: bound01(g, 255) * 255,
3076
+ b: bound01(b, 255) * 255
3077
+ };
3078
+ }
3079
+ function rgbToHsl(r, g, b) {
3080
+ r = bound01(r, 255);
3081
+ g = bound01(g, 255);
3082
+ b = bound01(b, 255);
3083
+ var max = Math.max(r, g, b);
3084
+ var min = Math.min(r, g, b);
3085
+ var h$1 = 0;
3086
+ var s = 0;
3087
+ var l = (max + min) / 2;
3088
+ if (max === min) {
3089
+ s = 0;
3090
+ h$1 = 0;
3091
+ } else {
3092
+ var d = max - min;
3093
+ s = l > .5 ? d / (2 - max - min) : d / (max + min);
3094
+ switch (max) {
3095
+ case r:
3096
+ h$1 = (g - b) / d + (g < b ? 6 : 0);
3097
+ break;
3098
+ case g:
3099
+ h$1 = (b - r) / d + 2;
3100
+ break;
3101
+ case b:
3102
+ h$1 = (r - g) / d + 4;
3103
+ break;
3104
+ default: break;
3105
+ }
3106
+ h$1 /= 6;
3107
+ }
3108
+ return {
3109
+ h: h$1,
3110
+ s,
3111
+ l
3112
+ };
3113
+ }
3114
+ function hue2rgb(p, q, t) {
3115
+ if (t < 0) t += 1;
3116
+ if (t > 1) t -= 1;
3117
+ if (t < 1 / 6) return p + (q - p) * (6 * t);
3118
+ if (t < 1 / 2) return q;
3119
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
3120
+ return p;
3121
+ }
3122
+ function hslToRgb(h$1, s, l) {
3123
+ var r;
3124
+ var g;
3125
+ var b;
3126
+ h$1 = bound01(h$1, 360);
3127
+ s = bound01(s, 100);
3128
+ l = bound01(l, 100);
3129
+ if (s === 0) {
3130
+ g = l;
3131
+ b = l;
3132
+ r = l;
3133
+ } else {
3134
+ var q = l < .5 ? l * (1 + s) : l + s - l * s;
3135
+ var p = 2 * l - q;
3136
+ r = hue2rgb(p, q, h$1 + 1 / 3);
3137
+ g = hue2rgb(p, q, h$1);
3138
+ b = hue2rgb(p, q, h$1 - 1 / 3);
3139
+ }
3140
+ return {
3141
+ r: r * 255,
3142
+ g: g * 255,
3143
+ b: b * 255
3144
+ };
3145
+ }
3146
+ function rgbToHsv(r, g, b) {
3147
+ r = bound01(r, 255);
3148
+ g = bound01(g, 255);
3149
+ b = bound01(b, 255);
3150
+ var max = Math.max(r, g, b);
3151
+ var min = Math.min(r, g, b);
3152
+ var h$1 = 0;
3153
+ var v = max;
3154
+ var d = max - min;
3155
+ var s = max === 0 ? 0 : d / max;
3156
+ if (max === min) h$1 = 0;
3157
+ else {
3158
+ switch (max) {
3159
+ case r:
3160
+ h$1 = (g - b) / d + (g < b ? 6 : 0);
3161
+ break;
3162
+ case g:
3163
+ h$1 = (b - r) / d + 2;
3164
+ break;
3165
+ case b:
3166
+ h$1 = (r - g) / d + 4;
3167
+ break;
3168
+ default: break;
3169
+ }
3170
+ h$1 /= 6;
3171
+ }
3172
+ return {
3173
+ h: h$1,
3174
+ s,
3175
+ v
3176
+ };
3177
+ }
3178
+ function hsvToRgb(h$1, s, v) {
3179
+ h$1 = bound01(h$1, 360) * 6;
3180
+ s = bound01(s, 100);
3181
+ v = bound01(v, 100);
3182
+ var i$1 = Math.floor(h$1);
3183
+ var f = h$1 - i$1;
3184
+ var p = v * (1 - s);
3185
+ var q = v * (1 - f * s);
3186
+ var t = v * (1 - (1 - f) * s);
3187
+ var mod = i$1 % 6;
3188
+ var r = [
3189
+ v,
3190
+ q,
3191
+ p,
3192
+ p,
3193
+ t,
3194
+ v
3195
+ ][mod];
3196
+ var g = [
3197
+ t,
3198
+ v,
3199
+ v,
3200
+ q,
3201
+ p,
3202
+ p
3203
+ ][mod];
3204
+ var b = [
3205
+ p,
3206
+ p,
3207
+ t,
3208
+ v,
3209
+ v,
3210
+ q
3211
+ ][mod];
3212
+ return {
3213
+ r: r * 255,
3214
+ g: g * 255,
3215
+ b: b * 255
3216
+ };
3217
+ }
3218
+ function rgbToHex(r, g, b, allow3Char) {
3219
+ var hex = [
3220
+ pad2(Math.round(r).toString(16)),
3221
+ pad2(Math.round(g).toString(16)),
3222
+ pad2(Math.round(b).toString(16))
3223
+ ];
3224
+ if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
3225
+ return hex.join("");
3226
+ }
3227
+ function rgbaToHex(r, g, b, a, allow4Char) {
3228
+ var hex = [
3229
+ pad2(Math.round(r).toString(16)),
3230
+ pad2(Math.round(g).toString(16)),
3231
+ pad2(Math.round(b).toString(16)),
3232
+ pad2(convertDecimalToHex(a))
3233
+ ];
3234
+ if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
3235
+ return hex.join("");
3236
+ }
3237
+ function convertDecimalToHex(d) {
3238
+ return Math.round(parseFloat(d) * 255).toString(16);
3239
+ }
3240
+ function convertHexToDecimal(h$1) {
3241
+ return parseIntFromHex(h$1) / 255;
3242
+ }
3243
+ function parseIntFromHex(val) {
3244
+ return parseInt(val, 16);
3245
+ }
3246
+ function numberInputToObject(color) {
3247
+ return {
3248
+ r: color >> 16,
3249
+ g: (color & 65280) >> 8,
3250
+ b: color & 255
3251
+ };
3252
+ }
3253
+ var names = {
3254
+ aliceblue: "#f0f8ff",
3255
+ antiquewhite: "#faebd7",
3256
+ aqua: "#00ffff",
3257
+ aquamarine: "#7fffd4",
3258
+ azure: "#f0ffff",
3259
+ beige: "#f5f5dc",
3260
+ bisque: "#ffe4c4",
3261
+ black: "#000000",
3262
+ blanchedalmond: "#ffebcd",
3263
+ blue: "#0000ff",
3264
+ blueviolet: "#8a2be2",
3265
+ brown: "#a52a2a",
3266
+ burlywood: "#deb887",
3267
+ cadetblue: "#5f9ea0",
3268
+ chartreuse: "#7fff00",
3269
+ chocolate: "#d2691e",
3270
+ coral: "#ff7f50",
3271
+ cornflowerblue: "#6495ed",
3272
+ cornsilk: "#fff8dc",
3273
+ crimson: "#dc143c",
3274
+ cyan: "#00ffff",
3275
+ darkblue: "#00008b",
3276
+ darkcyan: "#008b8b",
3277
+ darkgoldenrod: "#b8860b",
3278
+ darkgray: "#a9a9a9",
3279
+ darkgreen: "#006400",
3280
+ darkgrey: "#a9a9a9",
3281
+ darkkhaki: "#bdb76b",
3282
+ darkmagenta: "#8b008b",
3283
+ darkolivegreen: "#556b2f",
3284
+ darkorange: "#ff8c00",
3285
+ darkorchid: "#9932cc",
3286
+ darkred: "#8b0000",
3287
+ darksalmon: "#e9967a",
3288
+ darkseagreen: "#8fbc8f",
3289
+ darkslateblue: "#483d8b",
3290
+ darkslategray: "#2f4f4f",
3291
+ darkslategrey: "#2f4f4f",
3292
+ darkturquoise: "#00ced1",
3293
+ darkviolet: "#9400d3",
3294
+ deeppink: "#ff1493",
3295
+ deepskyblue: "#00bfff",
3296
+ dimgray: "#696969",
3297
+ dimgrey: "#696969",
3298
+ dodgerblue: "#1e90ff",
3299
+ firebrick: "#b22222",
3300
+ floralwhite: "#fffaf0",
3301
+ forestgreen: "#228b22",
3302
+ fuchsia: "#ff00ff",
3303
+ gainsboro: "#dcdcdc",
3304
+ ghostwhite: "#f8f8ff",
3305
+ goldenrod: "#daa520",
3306
+ gold: "#ffd700",
3307
+ gray: "#808080",
3308
+ green: "#008000",
3309
+ greenyellow: "#adff2f",
3310
+ grey: "#808080",
3311
+ honeydew: "#f0fff0",
3312
+ hotpink: "#ff69b4",
3313
+ indianred: "#cd5c5c",
3314
+ indigo: "#4b0082",
3315
+ ivory: "#fffff0",
3316
+ khaki: "#f0e68c",
3317
+ lavenderblush: "#fff0f5",
3318
+ lavender: "#e6e6fa",
3319
+ lawngreen: "#7cfc00",
3320
+ lemonchiffon: "#fffacd",
3321
+ lightblue: "#add8e6",
3322
+ lightcoral: "#f08080",
3323
+ lightcyan: "#e0ffff",
3324
+ lightgoldenrodyellow: "#fafad2",
3325
+ lightgray: "#d3d3d3",
3326
+ lightgreen: "#90ee90",
3327
+ lightgrey: "#d3d3d3",
3328
+ lightpink: "#ffb6c1",
3329
+ lightsalmon: "#ffa07a",
3330
+ lightseagreen: "#20b2aa",
3331
+ lightskyblue: "#87cefa",
3332
+ lightslategray: "#778899",
3333
+ lightslategrey: "#778899",
3334
+ lightsteelblue: "#b0c4de",
3335
+ lightyellow: "#ffffe0",
3336
+ lime: "#00ff00",
3337
+ limegreen: "#32cd32",
3338
+ linen: "#faf0e6",
3339
+ magenta: "#ff00ff",
3340
+ maroon: "#800000",
3341
+ mediumaquamarine: "#66cdaa",
3342
+ mediumblue: "#0000cd",
3343
+ mediumorchid: "#ba55d3",
3344
+ mediumpurple: "#9370db",
3345
+ mediumseagreen: "#3cb371",
3346
+ mediumslateblue: "#7b68ee",
3347
+ mediumspringgreen: "#00fa9a",
3348
+ mediumturquoise: "#48d1cc",
3349
+ mediumvioletred: "#c71585",
3350
+ midnightblue: "#191970",
3351
+ mintcream: "#f5fffa",
3352
+ mistyrose: "#ffe4e1",
3353
+ moccasin: "#ffe4b5",
3354
+ navajowhite: "#ffdead",
3355
+ navy: "#000080",
3356
+ oldlace: "#fdf5e6",
3357
+ olive: "#808000",
3358
+ olivedrab: "#6b8e23",
3359
+ orange: "#ffa500",
3360
+ orangered: "#ff4500",
3361
+ orchid: "#da70d6",
3362
+ palegoldenrod: "#eee8aa",
3363
+ palegreen: "#98fb98",
3364
+ paleturquoise: "#afeeee",
3365
+ palevioletred: "#db7093",
3366
+ papayawhip: "#ffefd5",
3367
+ peachpuff: "#ffdab9",
3368
+ peru: "#cd853f",
3369
+ pink: "#ffc0cb",
3370
+ plum: "#dda0dd",
3371
+ powderblue: "#b0e0e6",
3372
+ purple: "#800080",
3373
+ rebeccapurple: "#663399",
3374
+ red: "#ff0000",
3375
+ rosybrown: "#bc8f8f",
3376
+ royalblue: "#4169e1",
3377
+ saddlebrown: "#8b4513",
3378
+ salmon: "#fa8072",
3379
+ sandybrown: "#f4a460",
3380
+ seagreen: "#2e8b57",
3381
+ seashell: "#fff5ee",
3382
+ sienna: "#a0522d",
3383
+ silver: "#c0c0c0",
3384
+ skyblue: "#87ceeb",
3385
+ slateblue: "#6a5acd",
3386
+ slategray: "#708090",
3387
+ slategrey: "#708090",
3388
+ snow: "#fffafa",
3389
+ springgreen: "#00ff7f",
3390
+ steelblue: "#4682b4",
3391
+ tan: "#d2b48c",
3392
+ teal: "#008080",
3393
+ thistle: "#d8bfd8",
3394
+ tomato: "#ff6347",
3395
+ turquoise: "#40e0d0",
3396
+ violet: "#ee82ee",
3397
+ wheat: "#f5deb3",
3398
+ white: "#ffffff",
3399
+ whitesmoke: "#f5f5f5",
3400
+ yellow: "#ffff00",
3401
+ yellowgreen: "#9acd32"
3402
+ };
3403
+ function inputToRGB(color) {
3404
+ var rgb = {
3405
+ r: 0,
3406
+ g: 0,
3407
+ b: 0
3408
+ };
3409
+ var a = 1;
3410
+ var s = null;
3411
+ var v = null;
3412
+ var l = null;
3413
+ var ok = false;
3414
+ var format = false;
3415
+ if (typeof color === "string") color = stringInputToObject(color);
3416
+ if (typeof color === "object") {
3417
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
3418
+ rgb = rgbToRgb(color.r, color.g, color.b);
3419
+ ok = true;
3420
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
3421
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
3422
+ s = convertToPercentage(color.s);
3423
+ v = convertToPercentage(color.v);
3424
+ rgb = hsvToRgb(color.h, s, v);
3425
+ ok = true;
3426
+ format = "hsv";
3427
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
3428
+ s = convertToPercentage(color.s);
3429
+ l = convertToPercentage(color.l);
3430
+ rgb = hslToRgb(color.h, s, l);
3431
+ ok = true;
3432
+ format = "hsl";
3433
+ }
3434
+ if (Object.prototype.hasOwnProperty.call(color, "a")) a = color.a;
3435
+ }
3436
+ a = boundAlpha(a);
3437
+ return {
3438
+ ok,
3439
+ format: color.format || format,
3440
+ r: Math.min(255, Math.max(rgb.r, 0)),
3441
+ g: Math.min(255, Math.max(rgb.g, 0)),
3442
+ b: Math.min(255, Math.max(rgb.b, 0)),
3443
+ a
3444
+ };
3445
+ }
3446
+ var CSS_UNIT = "(?:".concat("[-\\+]?\\d*\\.\\d+%?", ")|(?:").concat("[-\\+]?\\d+%?", ")");
3447
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
3448
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
3449
+ var matchers = {
3450
+ CSS_UNIT: new RegExp(CSS_UNIT),
3451
+ rgb: /* @__PURE__ */ new RegExp("rgb" + PERMISSIVE_MATCH3),
3452
+ rgba: /* @__PURE__ */ new RegExp("rgba" + PERMISSIVE_MATCH4),
3453
+ hsl: /* @__PURE__ */ new RegExp("hsl" + PERMISSIVE_MATCH3),
3454
+ hsla: /* @__PURE__ */ new RegExp("hsla" + PERMISSIVE_MATCH4),
3455
+ hsv: /* @__PURE__ */ new RegExp("hsv" + PERMISSIVE_MATCH3),
3456
+ hsva: /* @__PURE__ */ new RegExp("hsva" + PERMISSIVE_MATCH4),
3457
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
3458
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
3459
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
3460
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
3461
+ };
3462
+ function stringInputToObject(color) {
3463
+ color = color.trim().toLowerCase();
3464
+ if (color.length === 0) return false;
3465
+ var named = false;
3466
+ if (names[color]) {
3467
+ color = names[color];
3468
+ named = true;
3469
+ } else if (color === "transparent") return {
3470
+ r: 0,
3471
+ g: 0,
3472
+ b: 0,
3473
+ a: 0,
3474
+ format: "name"
3475
+ };
3476
+ var match = matchers.rgb.exec(color);
3477
+ if (match) return {
3478
+ r: match[1],
3479
+ g: match[2],
3480
+ b: match[3]
3481
+ };
3482
+ match = matchers.rgba.exec(color);
3483
+ if (match) return {
3484
+ r: match[1],
3485
+ g: match[2],
3486
+ b: match[3],
3487
+ a: match[4]
3488
+ };
3489
+ match = matchers.hsl.exec(color);
3490
+ if (match) return {
3491
+ h: match[1],
3492
+ s: match[2],
3493
+ l: match[3]
3494
+ };
3495
+ match = matchers.hsla.exec(color);
3496
+ if (match) return {
3497
+ h: match[1],
3498
+ s: match[2],
3499
+ l: match[3],
3500
+ a: match[4]
3501
+ };
3502
+ match = matchers.hsv.exec(color);
3503
+ if (match) return {
3504
+ h: match[1],
3505
+ s: match[2],
3506
+ v: match[3]
3507
+ };
3508
+ match = matchers.hsva.exec(color);
3509
+ if (match) return {
3510
+ h: match[1],
3511
+ s: match[2],
3512
+ v: match[3],
3513
+ a: match[4]
3514
+ };
3515
+ match = matchers.hex8.exec(color);
3516
+ if (match) return {
3517
+ r: parseIntFromHex(match[1]),
3518
+ g: parseIntFromHex(match[2]),
3519
+ b: parseIntFromHex(match[3]),
3520
+ a: convertHexToDecimal(match[4]),
3521
+ format: named ? "name" : "hex8"
3522
+ };
3523
+ match = matchers.hex6.exec(color);
3524
+ if (match) return {
3525
+ r: parseIntFromHex(match[1]),
3526
+ g: parseIntFromHex(match[2]),
3527
+ b: parseIntFromHex(match[3]),
3528
+ format: named ? "name" : "hex"
3529
+ };
3530
+ match = matchers.hex4.exec(color);
3531
+ if (match) return {
3532
+ r: parseIntFromHex(match[1] + match[1]),
3533
+ g: parseIntFromHex(match[2] + match[2]),
3534
+ b: parseIntFromHex(match[3] + match[3]),
3535
+ a: convertHexToDecimal(match[4] + match[4]),
3536
+ format: named ? "name" : "hex8"
3537
+ };
3538
+ match = matchers.hex3.exec(color);
3539
+ if (match) return {
3540
+ r: parseIntFromHex(match[1] + match[1]),
3541
+ g: parseIntFromHex(match[2] + match[2]),
3542
+ b: parseIntFromHex(match[3] + match[3]),
3543
+ format: named ? "name" : "hex"
3544
+ };
3545
+ return false;
3546
+ }
3547
+ function isValidCSSUnit(color) {
3548
+ return Boolean(matchers.CSS_UNIT.exec(String(color)));
3549
+ }
3550
+ var TinyColor = function() {
3551
+ function TinyColor$1(color, opts) {
3552
+ if (color === void 0) color = "";
3553
+ if (opts === void 0) opts = {};
3554
+ var _a$1;
3555
+ if (color instanceof TinyColor$1) return color;
3556
+ if (typeof color === "number") color = numberInputToObject(color);
3557
+ this.originalInput = color;
3558
+ var rgb = inputToRGB(color);
3559
+ this.originalInput = color;
3560
+ this.r = rgb.r;
3561
+ this.g = rgb.g;
3562
+ this.b = rgb.b;
3563
+ this.a = rgb.a;
3564
+ this.roundA = Math.round(100 * this.a) / 100;
3565
+ this.format = (_a$1 = opts.format) !== null && _a$1 !== void 0 ? _a$1 : rgb.format;
3566
+ this.gradientType = opts.gradientType;
3567
+ if (this.r < 1) this.r = Math.round(this.r);
3568
+ if (this.g < 1) this.g = Math.round(this.g);
3569
+ if (this.b < 1) this.b = Math.round(this.b);
3570
+ this.isValid = rgb.ok;
3571
+ }
3572
+ TinyColor$1.prototype.isDark = function() {
3573
+ return this.getBrightness() < 128;
3574
+ };
3575
+ TinyColor$1.prototype.isLight = function() {
3576
+ return !this.isDark();
3577
+ };
3578
+ TinyColor$1.prototype.getBrightness = function() {
3579
+ var rgb = this.toRgb();
3580
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
3581
+ };
3582
+ TinyColor$1.prototype.getLuminance = function() {
3583
+ var rgb = this.toRgb();
3584
+ var R;
3585
+ var G;
3586
+ var B;
3587
+ var RsRGB = rgb.r / 255;
3588
+ var GsRGB = rgb.g / 255;
3589
+ var BsRGB = rgb.b / 255;
3590
+ if (RsRGB <= .03928) R = RsRGB / 12.92;
3591
+ else R = Math.pow((RsRGB + .055) / 1.055, 2.4);
3592
+ if (GsRGB <= .03928) G = GsRGB / 12.92;
3593
+ else G = Math.pow((GsRGB + .055) / 1.055, 2.4);
3594
+ if (BsRGB <= .03928) B = BsRGB / 12.92;
3595
+ else B = Math.pow((BsRGB + .055) / 1.055, 2.4);
3596
+ return .2126 * R + .7152 * G + .0722 * B;
3597
+ };
3598
+ TinyColor$1.prototype.getAlpha = function() {
3599
+ return this.a;
3600
+ };
3601
+ TinyColor$1.prototype.setAlpha = function(alpha) {
3602
+ this.a = boundAlpha(alpha);
3603
+ this.roundA = Math.round(100 * this.a) / 100;
3604
+ return this;
3605
+ };
3606
+ TinyColor$1.prototype.isMonochrome = function() {
3607
+ return this.toHsl().s === 0;
3608
+ };
3609
+ TinyColor$1.prototype.toHsv = function() {
3610
+ var hsv = rgbToHsv(this.r, this.g, this.b);
3611
+ return {
3612
+ h: hsv.h * 360,
3613
+ s: hsv.s,
3614
+ v: hsv.v,
3615
+ a: this.a
3616
+ };
3617
+ };
3618
+ TinyColor$1.prototype.toHsvString = function() {
3619
+ var hsv = rgbToHsv(this.r, this.g, this.b);
3620
+ var h$1 = Math.round(hsv.h * 360);
3621
+ var s = Math.round(hsv.s * 100);
3622
+ var v = Math.round(hsv.v * 100);
3623
+ return this.a === 1 ? "hsv(".concat(h$1, ", ").concat(s, "%, ").concat(v, "%)") : "hsva(".concat(h$1, ", ").concat(s, "%, ").concat(v, "%, ").concat(this.roundA, ")");
3624
+ };
3625
+ TinyColor$1.prototype.toHsl = function() {
3626
+ var hsl = rgbToHsl(this.r, this.g, this.b);
3627
+ return {
3628
+ h: hsl.h * 360,
3629
+ s: hsl.s,
3630
+ l: hsl.l,
3631
+ a: this.a
3632
+ };
3633
+ };
3634
+ TinyColor$1.prototype.toHslString = function() {
3635
+ var hsl = rgbToHsl(this.r, this.g, this.b);
3636
+ var h$1 = Math.round(hsl.h * 360);
3637
+ var s = Math.round(hsl.s * 100);
3638
+ var l = Math.round(hsl.l * 100);
3639
+ return this.a === 1 ? "hsl(".concat(h$1, ", ").concat(s, "%, ").concat(l, "%)") : "hsla(".concat(h$1, ", ").concat(s, "%, ").concat(l, "%, ").concat(this.roundA, ")");
3640
+ };
3641
+ TinyColor$1.prototype.toHex = function(allow3Char) {
3642
+ if (allow3Char === void 0) allow3Char = false;
3643
+ return rgbToHex(this.r, this.g, this.b, allow3Char);
3644
+ };
3645
+ TinyColor$1.prototype.toHexString = function(allow3Char) {
3646
+ if (allow3Char === void 0) allow3Char = false;
3647
+ return "#" + this.toHex(allow3Char);
3648
+ };
3649
+ TinyColor$1.prototype.toHex8 = function(allow4Char) {
3650
+ if (allow4Char === void 0) allow4Char = false;
3651
+ return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
3652
+ };
3653
+ TinyColor$1.prototype.toHex8String = function(allow4Char) {
3654
+ if (allow4Char === void 0) allow4Char = false;
3655
+ return "#" + this.toHex8(allow4Char);
3656
+ };
3657
+ TinyColor$1.prototype.toHexShortString = function(allowShortChar) {
3658
+ if (allowShortChar === void 0) allowShortChar = false;
3659
+ return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
3660
+ };
3661
+ TinyColor$1.prototype.toRgb = function() {
3662
+ return {
3663
+ r: Math.round(this.r),
3664
+ g: Math.round(this.g),
3665
+ b: Math.round(this.b),
3666
+ a: this.a
3667
+ };
3668
+ };
3669
+ TinyColor$1.prototype.toRgbString = function() {
3670
+ var r = Math.round(this.r);
3671
+ var g = Math.round(this.g);
3672
+ var b = Math.round(this.b);
3673
+ return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(this.roundA, ")");
3674
+ };
3675
+ TinyColor$1.prototype.toPercentageRgb = function() {
3676
+ var fmt = function(x) {
3677
+ return "".concat(Math.round(bound01(x, 255) * 100), "%");
3678
+ };
3679
+ return {
3680
+ r: fmt(this.r),
3681
+ g: fmt(this.g),
3682
+ b: fmt(this.b),
3683
+ a: this.a
3684
+ };
3685
+ };
3686
+ TinyColor$1.prototype.toPercentageRgbString = function() {
3687
+ var rnd = function(x) {
3688
+ return Math.round(bound01(x, 255) * 100);
3689
+ };
3690
+ return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")");
3691
+ };
3692
+ TinyColor$1.prototype.toName = function() {
3693
+ if (this.a === 0) return "transparent";
3694
+ if (this.a < 1) return false;
3695
+ var hex = "#" + rgbToHex(this.r, this.g, this.b, false);
3696
+ for (var _i = 0, _a$1 = Object.entries(names); _i < _a$1.length; _i++) {
3697
+ var _b = _a$1[_i], key = _b[0];
3698
+ if (hex === _b[1]) return key;
3699
+ }
3700
+ return false;
3701
+ };
3702
+ TinyColor$1.prototype.toString = function(format) {
3703
+ var formatSet = Boolean(format);
3704
+ format = format !== null && format !== void 0 ? format : this.format;
3705
+ var formattedString = false;
3706
+ var hasAlpha = this.a < 1 && this.a >= 0;
3707
+ if (!formatSet && hasAlpha && (format.startsWith("hex") || format === "name")) {
3708
+ if (format === "name" && this.a === 0) return this.toName();
3709
+ return this.toRgbString();
3710
+ }
3711
+ if (format === "rgb") formattedString = this.toRgbString();
3712
+ if (format === "prgb") formattedString = this.toPercentageRgbString();
3713
+ if (format === "hex" || format === "hex6") formattedString = this.toHexString();
3714
+ if (format === "hex3") formattedString = this.toHexString(true);
3715
+ if (format === "hex4") formattedString = this.toHex8String(true);
3716
+ if (format === "hex8") formattedString = this.toHex8String();
3717
+ if (format === "name") formattedString = this.toName();
3718
+ if (format === "hsl") formattedString = this.toHslString();
3719
+ if (format === "hsv") formattedString = this.toHsvString();
3720
+ return formattedString || this.toHexString();
3721
+ };
3722
+ TinyColor$1.prototype.toNumber = function() {
3723
+ return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
3724
+ };
3725
+ TinyColor$1.prototype.clone = function() {
3726
+ return new TinyColor$1(this.toString());
3727
+ };
3728
+ TinyColor$1.prototype.lighten = function(amount) {
3729
+ if (amount === void 0) amount = 10;
3730
+ var hsl = this.toHsl();
3731
+ hsl.l += amount / 100;
3732
+ hsl.l = clamp01(hsl.l);
3733
+ return new TinyColor$1(hsl);
3734
+ };
3735
+ TinyColor$1.prototype.brighten = function(amount) {
3736
+ if (amount === void 0) amount = 10;
3737
+ var rgb = this.toRgb();
3738
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
3739
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
3740
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
3741
+ return new TinyColor$1(rgb);
3742
+ };
3743
+ TinyColor$1.prototype.darken = function(amount) {
3744
+ if (amount === void 0) amount = 10;
3745
+ var hsl = this.toHsl();
3746
+ hsl.l -= amount / 100;
3747
+ hsl.l = clamp01(hsl.l);
3748
+ return new TinyColor$1(hsl);
3749
+ };
3750
+ TinyColor$1.prototype.tint = function(amount) {
3751
+ if (amount === void 0) amount = 10;
3752
+ return this.mix("white", amount);
3753
+ };
3754
+ TinyColor$1.prototype.shade = function(amount) {
3755
+ if (amount === void 0) amount = 10;
3756
+ return this.mix("black", amount);
3757
+ };
3758
+ TinyColor$1.prototype.desaturate = function(amount) {
3759
+ if (amount === void 0) amount = 10;
3760
+ var hsl = this.toHsl();
3761
+ hsl.s -= amount / 100;
3762
+ hsl.s = clamp01(hsl.s);
3763
+ return new TinyColor$1(hsl);
3764
+ };
3765
+ TinyColor$1.prototype.saturate = function(amount) {
3766
+ if (amount === void 0) amount = 10;
3767
+ var hsl = this.toHsl();
3768
+ hsl.s += amount / 100;
3769
+ hsl.s = clamp01(hsl.s);
3770
+ return new TinyColor$1(hsl);
3771
+ };
3772
+ TinyColor$1.prototype.greyscale = function() {
3773
+ return this.desaturate(100);
3774
+ };
3775
+ TinyColor$1.prototype.spin = function(amount) {
3776
+ var hsl = this.toHsl();
3777
+ var hue = (hsl.h + amount) % 360;
3778
+ hsl.h = hue < 0 ? 360 + hue : hue;
3779
+ return new TinyColor$1(hsl);
3780
+ };
3781
+ TinyColor$1.prototype.mix = function(color, amount) {
3782
+ if (amount === void 0) amount = 50;
3783
+ var rgb1 = this.toRgb();
3784
+ var rgb2 = new TinyColor$1(color).toRgb();
3785
+ var p = amount / 100;
3786
+ return new TinyColor$1({
3787
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
3788
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
3789
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
3790
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
3791
+ });
3792
+ };
3793
+ TinyColor$1.prototype.analogous = function(results, slices) {
3794
+ if (results === void 0) results = 6;
3795
+ if (slices === void 0) slices = 30;
3796
+ var hsl = this.toHsl();
3797
+ var part = 360 / slices;
3798
+ var ret = [this];
3799
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
3800
+ hsl.h = (hsl.h + part) % 360;
3801
+ ret.push(new TinyColor$1(hsl));
3802
+ }
3803
+ return ret;
3804
+ };
3805
+ TinyColor$1.prototype.complement = function() {
3806
+ var hsl = this.toHsl();
3807
+ hsl.h = (hsl.h + 180) % 360;
3808
+ return new TinyColor$1(hsl);
3809
+ };
3810
+ TinyColor$1.prototype.monochromatic = function(results) {
3811
+ if (results === void 0) results = 6;
3812
+ var hsv = this.toHsv();
3813
+ var h$1 = hsv.h;
3814
+ var s = hsv.s;
3815
+ var v = hsv.v;
3816
+ var res = [];
3817
+ var modification = 1 / results;
3818
+ while (results--) {
3819
+ res.push(new TinyColor$1({
3820
+ h: h$1,
3821
+ s,
3822
+ v
3823
+ }));
3824
+ v = (v + modification) % 1;
3825
+ }
3826
+ return res;
3827
+ };
3828
+ TinyColor$1.prototype.splitcomplement = function() {
3829
+ var hsl = this.toHsl();
3830
+ var h$1 = hsl.h;
3831
+ return [
3832
+ this,
3833
+ new TinyColor$1({
3834
+ h: (h$1 + 72) % 360,
3835
+ s: hsl.s,
3836
+ l: hsl.l
3837
+ }),
3838
+ new TinyColor$1({
3839
+ h: (h$1 + 216) % 360,
3840
+ s: hsl.s,
3841
+ l: hsl.l
3842
+ })
3843
+ ];
3844
+ };
3845
+ TinyColor$1.prototype.onBackground = function(background) {
3846
+ var fg = this.toRgb();
3847
+ var bg = new TinyColor$1(background).toRgb();
3848
+ var alpha = fg.a + bg.a * (1 - fg.a);
3849
+ return new TinyColor$1({
3850
+ r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
3851
+ g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
3852
+ b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
3853
+ a: alpha
3854
+ });
3855
+ };
3856
+ TinyColor$1.prototype.triad = function() {
3857
+ return this.polyad(3);
3858
+ };
3859
+ TinyColor$1.prototype.tetrad = function() {
3860
+ return this.polyad(4);
3861
+ };
3862
+ TinyColor$1.prototype.polyad = function(n) {
3863
+ var hsl = this.toHsl();
3864
+ var h$1 = hsl.h;
3865
+ var result = [this];
3866
+ var increment = 360 / n;
3867
+ for (var i$1 = 1; i$1 < n; i$1++) result.push(new TinyColor$1({
3868
+ h: (h$1 + i$1 * increment) % 360,
3869
+ s: hsl.s,
3870
+ l: hsl.l
3871
+ }));
3872
+ return result;
3873
+ };
3874
+ TinyColor$1.prototype.equals = function(color) {
3875
+ return this.toRgbString() === new TinyColor$1(color).toRgbString();
3876
+ };
3877
+ return TinyColor$1;
3878
+ }();
3879
+ function darken(color, amount = 20) {
3880
+ return color.mix("#141414", amount).toString();
3881
+ }
3882
+ function useButtonCustomStyle(props) {
3883
+ const _disabled = useFormDisabled();
3884
+ const ns = useNamespace("button");
3885
+ return computed(() => {
3886
+ let styles = {};
3887
+ const buttonColor = props.color;
3888
+ if (buttonColor) {
3889
+ const color = new TinyColor(buttonColor);
3890
+ const activeBgColor = props.dark ? color.tint(20).toString() : darken(color, 20);
3891
+ if (props.plain) {
3892
+ styles = ns.cssVarBlock({
3893
+ "bg-color": props.dark ? darken(color, 90) : color.tint(90).toString(),
3894
+ "text-color": buttonColor,
3895
+ "border-color": props.dark ? darken(color, 50) : color.tint(50).toString(),
3896
+ "hover-text-color": `var(${ns.cssVarName("color-white")})`,
3897
+ "hover-bg-color": buttonColor,
3898
+ "hover-border-color": buttonColor,
3899
+ "active-bg-color": activeBgColor,
3900
+ "active-text-color": `var(${ns.cssVarName("color-white")})`,
3901
+ "active-border-color": activeBgColor
3902
+ });
3903
+ if (_disabled.value) {
3904
+ styles[ns.cssVarBlockName("disabled-bg-color")] = props.dark ? darken(color, 90) : color.tint(90).toString();
3905
+ styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? darken(color, 50) : color.tint(50).toString();
3906
+ styles[ns.cssVarBlockName("disabled-border-color")] = props.dark ? darken(color, 80) : color.tint(80).toString();
3907
+ }
3908
+ } else {
3909
+ const hoverBgColor = props.dark ? darken(color, 30) : color.tint(30).toString();
3910
+ const textColor = color.isDark() ? `var(${ns.cssVarName("color-white")})` : `var(${ns.cssVarName("color-black")})`;
3911
+ styles = ns.cssVarBlock({
3912
+ "bg-color": buttonColor,
3913
+ "text-color": textColor,
3914
+ "border-color": buttonColor,
3915
+ "hover-bg-color": hoverBgColor,
3916
+ "hover-text-color": textColor,
3917
+ "hover-border-color": hoverBgColor,
3918
+ "active-bg-color": activeBgColor,
3919
+ "active-border-color": activeBgColor
3920
+ });
3921
+ if (_disabled.value) {
3922
+ const disabledButtonColor = props.dark ? darken(color, 50) : color.tint(50).toString();
3923
+ styles[ns.cssVarBlockName("disabled-bg-color")] = disabledButtonColor;
3924
+ styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns.cssVarName("color-white")})`;
3925
+ styles[ns.cssVarBlockName("disabled-border-color")] = disabledButtonColor;
3926
+ }
3927
+ }
3928
+ }
3929
+ return styles;
3930
+ });
3931
+ }
3932
+ var Button = /* @__PURE__ */ _export_sfc(/* @__PURE__ */ defineComponent({
3933
+ ...defineComponent({ name: "ElButton" }),
3934
+ props: buttonProps,
3935
+ emits: buttonEmits,
3936
+ setup(__props, { expose, emit }) {
3937
+ const props = __props;
3938
+ const buttonStyle = useButtonCustomStyle(props);
3939
+ const ns = useNamespace("button");
3940
+ const { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } = useButton(props, emit);
3941
+ expose({
3942
+ ref: _ref,
3943
+ size: _size,
3944
+ type: _type,
3945
+ disabled: _disabled,
3946
+ shouldAddSpace
3947
+ });
3948
+ return (_ctx, _cache) => {
3949
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({
3950
+ ref_key: "_ref",
3951
+ ref: _ref
3952
+ }, unref(_props), {
3953
+ class: [
3954
+ unref(ns).b(),
3955
+ unref(ns).m(unref(_type)),
3956
+ unref(ns).m(unref(_size)),
3957
+ unref(ns).is("disabled", unref(_disabled)),
3958
+ unref(ns).is("loading", _ctx.loading),
3959
+ unref(ns).is("plain", _ctx.plain),
3960
+ unref(ns).is("round", _ctx.round),
3961
+ unref(ns).is("circle", _ctx.circle),
3962
+ unref(ns).is("text", _ctx.text),
3963
+ unref(ns).is("link", _ctx.link),
3964
+ unref(ns).is("has-bg", _ctx.bg)
3965
+ ],
3966
+ style: unref(buttonStyle),
3967
+ onClick: unref(handleClick)
3968
+ }), {
3969
+ default: withCtx(() => [_ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
3970
+ key: 1,
3971
+ class: normalizeClass(unref(ns).is("loading"))
3972
+ }, {
3973
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))]),
3974
+ _: 1
3975
+ }, 8, ["class"]))], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
3976
+ default: withCtx(() => [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })]),
3977
+ _: 3
3978
+ })) : createCommentVNode("v-if", true), _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
3979
+ key: 2,
3980
+ class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
3981
+ }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)]),
3982
+ _: 3
3983
+ }, 16, [
3984
+ "class",
3985
+ "style",
3986
+ "onClick"
3987
+ ]);
3988
+ };
3989
+ }
3990
+ }), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
3991
+ var buttonGroupProps = {
3992
+ size: buttonProps.size,
3993
+ type: buttonProps.type
3994
+ };
3995
+ var ButtonGroup = /* @__PURE__ */ _export_sfc(/* @__PURE__ */ defineComponent({
3996
+ ...defineComponent({ name: "ElButtonGroup" }),
3997
+ props: buttonGroupProps,
3998
+ setup(__props) {
3999
+ const props = __props;
4000
+ provide(buttonGroupContextKey, reactive({
4001
+ size: toRef(props, "size"),
4002
+ type: toRef(props, "type")
4003
+ }));
4004
+ const ns = useNamespace("button");
4005
+ return (_ctx, _cache) => {
4006
+ return openBlock(), createElementBlock("div", { class: normalizeClass(`${unref(ns).b("group")}`) }, [renderSlot(_ctx.$slots, "default")], 2);
4007
+ };
4008
+ }
4009
+ }), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
4010
+ var ElButton = withInstall(Button, { ButtonGroup });
4011
+ withNoopInstall(ButtonGroup);
1773
4012
  function createEventBus() {
1774
4013
  const handlers$1 = /* @__PURE__ */ new Map();
1775
4014
  return {
@@ -2415,7 +4654,7 @@ function createRouteRecordMatcher(record, parent, options) {
2415
4654
  return matcher;
2416
4655
  }
2417
4656
  function createRouterMatcher(routes, globalOptions) {
2418
- const matchers = [];
4657
+ const matchers$1 = [];
2419
4658
  const matcherMap = /* @__PURE__ */ new Map();
2420
4659
  globalOptions = mergeOptions({
2421
4660
  strict: false,
@@ -2471,14 +4710,14 @@ function createRouterMatcher(routes, globalOptions) {
2471
4710
  const matcher = matcherMap.get(matcherRef);
2472
4711
  if (matcher) {
2473
4712
  matcherMap.delete(matcherRef);
2474
- matchers.splice(matchers.indexOf(matcher), 1);
4713
+ matchers$1.splice(matchers$1.indexOf(matcher), 1);
2475
4714
  matcher.children.forEach(removeRoute);
2476
4715
  matcher.alias.forEach(removeRoute);
2477
4716
  }
2478
4717
  } else {
2479
- const index = matchers.indexOf(matcherRef);
4718
+ const index = matchers$1.indexOf(matcherRef);
2480
4719
  if (index > -1) {
2481
- matchers.splice(index, 1);
4720
+ matchers$1.splice(index, 1);
2482
4721
  if (matcherRef.record.name) matcherMap.delete(matcherRef.record.name);
2483
4722
  matcherRef.children.forEach(removeRoute);
2484
4723
  matcherRef.alias.forEach(removeRoute);
@@ -2486,11 +4725,11 @@ function createRouterMatcher(routes, globalOptions) {
2486
4725
  }
2487
4726
  }
2488
4727
  function getRoutes() {
2489
- return matchers;
4728
+ return matchers$1;
2490
4729
  }
2491
4730
  function insertMatcher(matcher) {
2492
- const index = findInsertionIndex(matcher, matchers);
2493
- matchers.splice(index, 0, matcher);
4731
+ const index = findInsertionIndex(matcher, matchers$1);
4732
+ matchers$1.splice(index, 0, matcher);
2494
4733
  if (matcher.record.name && !isAliasRecord(matcher)) matcherMap.set(matcher.record.name, matcher);
2495
4734
  }
2496
4735
  function resolve(location$1, currentLocation) {
@@ -2506,13 +4745,13 @@ function createRouterMatcher(routes, globalOptions) {
2506
4745
  path = matcher.stringify(params);
2507
4746
  } else if (location$1.path != null) {
2508
4747
  path = location$1.path;
2509
- matcher = matchers.find((m) => m.re.test(path));
4748
+ matcher = matchers$1.find((m) => m.re.test(path));
2510
4749
  if (matcher) {
2511
4750
  params = matcher.parse(path);
2512
4751
  name = matcher.record.name;
2513
4752
  }
2514
4753
  } else {
2515
- matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));
4754
+ matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers$1.find((m) => m.re.test(currentLocation.path));
2516
4755
  if (!matcher) throw createRouterError(1, {
2517
4756
  location: location$1,
2518
4757
  currentLocation
@@ -2537,7 +4776,7 @@ function createRouterMatcher(routes, globalOptions) {
2537
4776
  }
2538
4777
  routes.forEach((route) => addRoute(route));
2539
4778
  function clearRoutes() {
2540
- matchers.length = 0;
4779
+ matchers$1.length = 0;
2541
4780
  matcherMap.clear();
2542
4781
  }
2543
4782
  return {
@@ -2595,16 +4834,16 @@ function mergeOptions(defaults, partialOptions) {
2595
4834
  for (const key in defaults) options[key] = key in partialOptions ? partialOptions[key] : defaults[key];
2596
4835
  return options;
2597
4836
  }
2598
- function findInsertionIndex(matcher, matchers) {
4837
+ function findInsertionIndex(matcher, matchers$1) {
2599
4838
  let lower = 0;
2600
- let upper = matchers.length;
4839
+ let upper = matchers$1.length;
2601
4840
  while (lower !== upper) {
2602
4841
  const mid = lower + upper >> 1;
2603
- if (comparePathParserScore(matcher, matchers[mid]) < 0) upper = mid;
4842
+ if (comparePathParserScore(matcher, matchers$1[mid]) < 0) upper = mid;
2604
4843
  else lower = mid + 1;
2605
4844
  }
2606
4845
  const insertionAncestor = getInsertionAncestor(matcher);
2607
- if (insertionAncestor) upper = matchers.lastIndexOf(insertionAncestor, upper - 1);
4846
+ if (insertionAncestor) upper = matchers$1.lastIndexOf(insertionAncestor, upper - 1);
2608
4847
  return upper;
2609
4848
  }
2610
4849
  function getInsertionAncestor(matcher) {
@@ -4547,4 +6786,4 @@ function truncateBeforeLast(text, maxLength, lastCharsLength = 5) {
4547
6786
  if (lastCharsLength < 1) return chars.slice(0, maxLength).join("") + ellipsis;
4548
6787
  return chars.slice(0, maxLength - lastCharsLength - ellipsisLength).join("") + ellipsis + chars.slice(-lastCharsLength).join("");
4549
6788
  }
4550
- export { arrow_left_default as $, _getNative_default as $t, useGlobalSize as A, getProp as At, withInstall as B, get_default as Bt, isToolMessage as C, useTimeoutFn as Cn, addUnit as Ct, _export_sfc as D, debugWarn as Dt, ElIcon as E, removeClass as Et, useNamespace as F, isEmpty as Ft, TypeComponents as G, _Map_default as Gt, withInstallFunction as H, _toKey_default as Ht, useLocale as I, isNumber as It, iconPropType as J, _assignValue_default as Jt, TypeComponentsMap as K, _ListCache_default as Kt, componentSizeMap as L, isUndefined as Lt, useZIndex as M, escapeStringRegexp as Mt, defaultNamespace as N, isBoolean as Nt, useGlobalComponentSettings as O, throwError as Ot, useGetDerivedNamespace as P, isElement as Pt, arrow_down_default as Q, _defineProperty_default as Qt, componentSizes as R, _baseSet_default as Rt, isThinkingGroupMessage as S, tryOnScopeDispose as Sn, addClass as St, createEventBus as T, hasClass as Tt, withNoopInstall as U, _castPath_default as Ut, withInstallDirective as V, _baseGet_default as Vt, CloseComponents as W, _MapCache_default as Wt, buildProps as X, _baseAssignValue_default as Xt, buildProp as Y, eq_default as Yt, definePropType as Z, _isIndex_default as Zt, isNavigationFailure as _, useVModel as _n, picture_filled_default as _t, require__toKey as a, isSymbol_default as an, circle_close_default as at, useRouter as b, isClient as bn, warning_filled_default as bt, require__arrayMap as c, _Symbol_default as cn, d_arrow_left_default as ct, require_isSymbol as d, isFirefox as dn, document_default as dt, _toSource_default as en, arrow_right_default as et, require_lib as f, onClickOutside as fn, hide_default as ft, createWebHistory as g, useResizeObserver as gn, more_filled_default as gt, createRouter as h, useEventListener as hn, more_default as ht, require__baseGet as i, _arrayMap_default as in, circle_check_default as it, useSizeProp as j, capitalize$1 as jt, useGlobalConfig as k, entriesOf as kt, require_memoize as l, _root_default as ln, d_arrow_right_default as lt, RouterView as m, useDocumentVisibility as mn, minus_default as mt, truncateBeforeLast as n, isObject_default as nn, calendar_default as nt, require__castPath as o, isObjectLike_default as on, clock_default as ot, RouterLink as p, unrefElement as pn, loading_default as pt, ValidateComponentsMap as q, _isKey_default as qt, require_get as r, isArray_default as rn, check_default as rt, require_toString as s, _baseGetTag_default as sn, close_default as st, truncate as t, isFunction_default as tn, arrow_up_default as tt, require__isKey as u, _freeGlobal_default as un, delete_default as ut, onBeforeRouteLeave as v, useWindowFocus as vn, plus_default as vt, isWorkflowUpdatedMessage as w, getStyle as wt, isTaskAbortedMessage as x, isIOS as xn, zoom_in_default as xt, useRoute as y, computedEager as yn, view_default as yt, EVENT_CODE as z, fromPairs_default as zt };
6789
+ export { flattedChildren as $, escapeStringRegexp as $t, ElInput as A, _Symbol_default as An, d_arrow_right_default as At, useFocusController as B, computedEager as Bn, zoom_in_default as Bt, isToolMessage as C, isFunction_default as Cn, calendar_default as Ct, TinyColor as D, isSymbol_default as Dn, clock_default as Dt, ElButton as E, _arrayMap_default as En, circle_close_default as Et, formItemContextKey as F, useDocumentVisibility as Fn, more_default as Ft, defaultNamespace as G, obtainAllFocusableElements$1 as Gn, getStyle as Gt, useZIndex as H, isIOS as Hn, scrollIntoView as Ht, ElIcon as I, useEventListener as In, more_filled_default as It, useLocale as J, debugWarn as Jt, useGetDerivedNamespace as K, triggerEvent as Kn, hasClass as Kt, _export_sfc as L, useResizeObserver as Ln, picture_filled_default as Lt, useFormItemInputId as M, _freeGlobal_default as Mn, document_default as Mt, useFormDisabled as N, onClickOutside as Nn, loading_default as Nt, ElFocusTrap as O, isObjectLike_default as On, close_default as Ot, useFormSize as P, unrefElement as Pn, minus_default as Pt, PatchFlags as Q, capitalize$1 as Qt, useGlobalComponentSettings as R, useVModel as Rn, plus_default as Rt, isThinkingGroupMessage as S, _toSource_default as Sn, arrow_up_default as St, createEventBus as T, isArray_default as Tn, circle_check_default as Tt, useId as U, tryOnScopeDispose as Un, addClass as Ut, useSizeProp as V, isClient as Vn, getScrollBarWidth as Vt, useIdInjection as W, useTimeoutFn as Wn, addUnit as Wt, mutable as X, entriesOf as Xt, useDeprecated as Y, throwError as Yt, isKorean as Z, getProp as Zt, isNavigationFailure as _, eq_default as _n, buildProps as _t, require__toKey as a, _baseSet_default as an, UPDATE_MODEL_EVENT as at, useRouter as b, _defineProperty_default as bn, arrow_left_default as bt, require__arrayMap as c, get_default as cn, withInstall as ct, require_isSymbol as d, _castPath_default as dn, CloseComponents as dt, isBoolean as en, isValidComponentSize as et, require_lib as f, _MapCache_default as fn, TypeComponents as ft, createWebHistory as g, _assignValue_default as gn, buildProp as gt, createRouter as h, _isKey_default as hn, iconPropType as ht, require__baseGet as i, isUndefined as in, INPUT_EVENT as it, useFormItem as j, _root_default as jn, delete_default as jt, FOCUS_TRAP_INJECTION_KEY as k, _baseGetTag_default as kn, d_arrow_left_default as kt, require_memoize as l, _baseGet_default as ln, withInstallFunction as lt, RouterView as m, _ListCache_default as mn, ValidateComponentsMap as mt, truncateBeforeLast as n, isEmpty as nn, componentSizes as nt, require__castPath as o, isNil_default as on, datePickTypes as ot, RouterLink as p, _Map_default as pn, TypeComponentsMap as pt, useNamespace as q, removeClass as qt, require_get as r, isNumber as rn, CHANGE_EVENT as rt, require_toString as s, fromPairs_default as sn, EVENT_CODE as st, truncate as t, isElement as tn, componentSizeMap as tt, require__isKey as u, _toKey_default as un, withNoopInstall as ut, onBeforeRouteLeave as v, _baseAssignValue_default as vn, definePropType as vt, isWorkflowUpdatedMessage as w, isObject_default as wn, check_default as wt, isTaskAbortedMessage as x, _getNative_default as xn, arrow_right_default as xt, useRoute as y, _isIndex_default as yn, arrow_down_default as yt, useGlobalConfig as z, useWindowFocus as zn, warning_filled_default as zt };