@atom8n/n8n-editor-ui 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 (310) hide show
  1. package/.stylelintcache +1 -0
  2. package/README.md +59 -0
  3. package/biome.jsonc +8 -0
  4. package/build.log +55 -0
  5. package/data/node-popularity.json +3998 -0
  6. package/dist/assets/AddDataTableModal-UINkk54_.js +1555 -0
  7. package/dist/assets/AgentEditorModal-CVww87TJ.js +358 -0
  8. package/dist/assets/Alert-Dy86dyOr.js +102 -0
  9. package/dist/assets/AnimatedSpinner-DmPN4poP.js +15 -0
  10. package/dist/assets/AnnotationTagsDropdown.ee-BJ7N9lek.js +71 -0
  11. package/dist/assets/AuthView-D2LWHrMp.js +106 -0
  12. package/dist/assets/BottomMenu-CIQiK_dJ.js +532 -0
  13. package/dist/assets/CalendarDate-DgQUMbNo.js +875 -0
  14. package/dist/assets/ChangePasswordView-Z6tUkw0u.js +133 -0
  15. package/dist/assets/ChatAgentAvatar-50YBnv3N.js +67 -0
  16. package/dist/assets/ChatFile-xZxmc2nV.js +146 -0
  17. package/dist/assets/ChatLayout-CTE_5SiM.js +96 -0
  18. package/dist/assets/ChatPersonalAgentsView-BGpHk03K.js +149 -0
  19. package/dist/assets/ChatSidebar-BkVwIypC.js +528 -0
  20. package/dist/assets/ChatView-BbbdeU9x.js +1559 -0
  21. package/dist/assets/ChatWorkflowAgentsView-BtunOxlC.js +116 -0
  22. package/dist/assets/CollectionParameter-BdcPG1lu.js +52 -0
  23. package/dist/assets/CommitMonoVariable-ytizKI8U.woff2 +0 -0
  24. package/dist/assets/CommunityNodeUpdateInfo-C37kca4W.js +273 -0
  25. package/dist/assets/CopyInput-DDZVu2iU.js +74 -0
  26. package/dist/assets/CredentialIcon-8YdTTFZ1.js +80 -0
  27. package/dist/assets/CredentialPicker-DWtj314o.js +293 -0
  28. package/dist/assets/CredentialSelectorModal-DTW2fKh0.js +138 -0
  29. package/dist/assets/CredentialsView-BjUchcCu.js +480 -0
  30. package/dist/assets/DataTableActions-DpAkoxg_.js +95 -0
  31. package/dist/assets/DataTableDetailsView-Coq7zdW5.js +41922 -0
  32. package/dist/assets/DataTableView-Cs-BIkzw.js +293 -0
  33. package/dist/assets/DemoFooter-Cga3jvi-.js +65 -0
  34. package/dist/assets/Draggable-vfvXl9Sp.js +105 -0
  35. package/dist/assets/EmptySharedSectionActionBox-DOXZtTCv.js +36 -0
  36. package/dist/assets/EnterpriseEdition.ee-D_rCFexM.js +15 -0
  37. package/dist/assets/EntityNotFound-3dhTRWsE.js +85 -0
  38. package/dist/assets/EntityUnAuthorised-ChJYZakE.js +66 -0
  39. package/dist/assets/ErrorView-zT9cX76a.js +61 -0
  40. package/dist/assets/EvaluationsRootView-C-OVWYnY.js +523 -0
  41. package/dist/assets/EvaluationsView-CJwJTruc.js +469 -0
  42. package/dist/assets/ExecutionsTime-DEQiyozR.js +573 -0
  43. package/dist/assets/ExecutionsView-Bd5Oh8TH.js +791 -0
  44. package/dist/assets/ExternalSecretsProviderConnectionSwitch.ee-C7Ih-uRo.js +191 -0
  45. package/dist/assets/FixedCollectionParameter-CYuTDW9t.js +496 -0
  46. package/dist/assets/ForgotMyPasswordView-Bs_L9P27.js +102 -0
  47. package/dist/assets/InsightsChartAverageRuntime-Bp3VA8_7.js +62 -0
  48. package/dist/assets/InsightsChartFailed-KPaNWoEr.js +52 -0
  49. package/dist/assets/InsightsChartFailureRate-DE6kE3FM.js +54 -0
  50. package/dist/assets/InsightsChartTimeSaved-auABNZlc.js +68 -0
  51. package/dist/assets/InsightsChartTotal-BKzYRKE7.js +56 -0
  52. package/dist/assets/InsightsDashboard-JWx4W6Db.js +473 -0
  53. package/dist/assets/InsightsPaywall-C8zLLKe8.js +63 -0
  54. package/dist/assets/InsightsSummary-cmN1lHDm.js +210 -0
  55. package/dist/assets/InsightsTableWorkflows-CqcC3IbQ.js +203 -0
  56. package/dist/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
  57. package/dist/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
  58. package/dist/assets/ItemsRenderer-DC8WVyMv.js +922 -0
  59. package/dist/assets/KeyboardShortcutTooltip-D8PAK5JP.js +31 -0
  60. package/dist/assets/LogsPanel-BR06u9RK.js +52 -0
  61. package/dist/assets/LogsPanel-C-_acMHp.js +2325 -0
  62. package/dist/assets/MCPConnectWorkflowsModal-3g8_iUa4.js +303 -0
  63. package/dist/assets/MainHeader-DiQc1edn.js +2153 -0
  64. package/dist/assets/MainSidebar-CoPGG5Ea.js +804 -0
  65. package/dist/assets/MigrationRuleDetail-BAxk1Pvl.js +295 -0
  66. package/dist/assets/MigrationRules-IW9lZMpE.js +285 -0
  67. package/dist/assets/Modal-CIzXlZdZ.js +204 -0
  68. package/dist/assets/ModelByIdSelectorModal-DLvBjzJO.js +115 -0
  69. package/dist/assets/NDVEmptyState-33UoX00I.js +19743 -0
  70. package/dist/assets/NodeCreation-BNzbSWSB.js +240 -0
  71. package/dist/assets/NodeCreator-BftgCKx7.js +1288 -0
  72. package/dist/assets/NodeDetailsView-CsoQCpcF.js +1075 -0
  73. package/dist/assets/NodeDetailsViewV2-C_wNQR_3.js +981 -0
  74. package/dist/assets/NodeIcon-B9VW6tX6.js +87 -0
  75. package/dist/assets/NodeSettings-ZwVip6VR.js +1872 -0
  76. package/dist/assets/NodeView-D4WUEvLB.js +2452 -0
  77. package/dist/assets/OAuthConsentView-DlrUqZbT.js +230 -0
  78. package/dist/assets/PageViewLayout-NT1KPFgy.js +12 -0
  79. package/dist/assets/ParameterInputList-sG2nz-Jo.js +38091 -0
  80. package/dist/assets/PrebuiltAgentTemplatesView-Csi5U8dc.js +154 -0
  81. package/dist/assets/ProjectBreadcrumb-C_XiY7sc.js +98 -0
  82. package/dist/assets/ProjectCardBadge-t_hs7vzx.js +209 -0
  83. package/dist/assets/ProjectHeader-Dq5Ihb26.js +549 -0
  84. package/dist/assets/ProjectIcon-DY8gGuHX.js +64 -0
  85. package/dist/assets/ProjectRoleView-Du-KTrAC.js +435 -0
  86. package/dist/assets/ProjectRolesView-DjxM_y4u.js +239 -0
  87. package/dist/assets/ProjectSettings-C6kWuV21.js +966 -0
  88. package/dist/assets/ProjectSharing-CVUgNWAY.js +262 -0
  89. package/dist/assets/ProjectVariables-CJlAo3dv.js +467 -0
  90. package/dist/assets/ProviderSettingsModal-BUFC2ZLv.js +307 -0
  91. package/dist/assets/PushConnectionTracker-DPBnGV0v.js +27 -0
  92. package/dist/assets/ResolversView-3BdkvvYA.js +209 -0
  93. package/dist/assets/ResourceFiltersDropdown-dgyXpcEX.js +159 -0
  94. package/dist/assets/ResourcesListLayout-qBLtomK6.js +631 -0
  95. package/dist/assets/RunDataHtml-BrW0OQra.js +7 -0
  96. package/dist/assets/RunDataHtml-Cleia4Cj.js +40 -0
  97. package/dist/assets/RunDataJson-uxkrhYRK.js +227 -0
  98. package/dist/assets/RunDataJsonActions-DkPk7E8d.js +5007 -0
  99. package/dist/assets/RunDataParsedAiContent-CtPRjig-.js +26 -0
  100. package/dist/assets/RunDataParsedAiContent-WAuqLQ5M.js +192 -0
  101. package/dist/assets/RunDataSearch-YBWUr93C.js +141 -0
  102. package/dist/assets/RunDataTable-DcXaBynW.js +631 -0
  103. package/dist/assets/SamlOnboarding-BTdQ_hr3.js +78 -0
  104. package/dist/assets/SaveButton-D5sQSxIk.js +89 -0
  105. package/dist/assets/SelectedItemsInfo-BHZ-NvF5.js +58 -0
  106. package/dist/assets/SettingsApiView-IfZTMXx1.js +313 -0
  107. package/dist/assets/SettingsChatHubView-gWh2X6vX.js +285 -0
  108. package/dist/assets/SettingsCommunityNodesView-D8VQtpGY.js +349 -0
  109. package/dist/assets/SettingsExternalSecrets-CpMc7mkW.js +233 -0
  110. package/dist/assets/SettingsLdapView-CU5a2MAy.js +2553 -0
  111. package/dist/assets/SettingsLogStreamingView-uojTe-oX.js +375 -0
  112. package/dist/assets/SettingsMCPView-B5Swp1C_.js +1214 -0
  113. package/dist/assets/SettingsPersonalView-Cr3aGood.js +402 -0
  114. package/dist/assets/SettingsSourceControl-DXOvFDEY.js +547 -0
  115. package/dist/assets/SettingsSso-27MfU1HV.js +1032 -0
  116. package/dist/assets/SettingsUsageAndPlan-DqIO-G46.js +419 -0
  117. package/dist/assets/SettingsUsersView-DfHB4_Kh.js +833 -0
  118. package/dist/assets/SettingsView-C4sA7Uny.js +90 -0
  119. package/dist/assets/SetupTemplateFormStep-BmiSzZin.js +258 -0
  120. package/dist/assets/SetupView-VORZ-L_u.js +112 -0
  121. package/dist/assets/SetupWorkflowCredentialsButton-DTmkOAW5.js +73 -0
  122. package/dist/assets/SetupWorkflowFromTemplateView-B9NupdJE.js +286 -0
  123. package/dist/assets/SeverityTag-CX1qTTNA.js +45 -0
  124. package/dist/assets/SigninView-D9_Pm16j.js +358 -0
  125. package/dist/assets/SignoutView-BFsjEAGz.js +19 -0
  126. package/dist/assets/SignupView-Am4ot0QZ.js +137 -0
  127. package/dist/assets/SkeletonAgentCard-C5TL-h8F.js +191 -0
  128. package/dist/assets/TagsDropdown-Bvx_Hd6Q.js +230 -0
  129. package/dist/assets/TemplateCard-CyQ1GuVz.js +105 -0
  130. package/dist/assets/TemplateDetails-CZRusTxE.js +124 -0
  131. package/dist/assets/TemplateList-DKvbwuiY.js +333 -0
  132. package/dist/assets/TemplatesCollectionView-D8dxU8By.js +184 -0
  133. package/dist/assets/TemplatesSearchView-CebC_GLs.js +1230 -0
  134. package/dist/assets/TemplatesView-025CcmIY.js +57 -0
  135. package/dist/assets/TemplatesWorkflowView-C2JfwJAn.js +170 -0
  136. package/dist/assets/TestRunDetailView-Ck78TTWO.js +395 -0
  137. package/dist/assets/TextWithHighlights-BxumwGnv.js +57 -0
  138. package/dist/assets/TimeAgo-C6EN4lCs.js +123 -0
  139. package/dist/assets/ToolsSelectorModal-8QJoUvRL.js +368 -0
  140. package/dist/assets/TriggerPanel-B6pacLkk.js +1225 -0
  141. package/dist/assets/VirtualSchema-B3zGe_8b.js +2402 -0
  142. package/dist/assets/VirtualSchema-Dkh0Cu5z.js +37 -0
  143. package/dist/assets/VueMarkdown-CQqJL9vK.js +28 -0
  144. package/dist/assets/WorkerView-Caznsljo.js +563 -0
  145. package/dist/assets/WorkflowActivationErrorMessage-CGrfPi9O.js +17 -0
  146. package/dist/assets/WorkflowActivator-BINnz0f7.js +362 -0
  147. package/dist/assets/WorkflowExecutionsInfoAccordion-Dg37yEfT.js +166 -0
  148. package/dist/assets/WorkflowExecutionsLandingPage-V2wdubhK.js +93 -0
  149. package/dist/assets/WorkflowExecutionsPreview-DdJaqYV6.js +616 -0
  150. package/dist/assets/WorkflowExecutionsView-DV8ySTfn.js +808 -0
  151. package/dist/assets/WorkflowHistory-GtaBMzIM.js +973 -0
  152. package/dist/assets/WorkflowLocation-CQ9Sq-2y.js +164 -0
  153. package/dist/assets/WorkflowOnboardingView-C49gt0Jr.js +61 -0
  154. package/dist/assets/WorkflowPreview-CXdvv4Nq.js +186 -0
  155. package/dist/assets/WorkflowTagsDropdown-QwbICWjN.js +71 -0
  156. package/dist/assets/WorkflowsView-B-MWIECO.js +3253 -0
  157. package/dist/assets/_MapCache-CcdIl4Ae.js +363 -0
  158. package/dist/assets/_baseOrderBy-N8Be_6z6.js +2989 -0
  159. package/dist/assets/_initCloneObject-viQQyT6o.js +80 -0
  160. package/dist/assets/_plugin-vue_export-helper-BwBpWJRZ.js +6 -0
  161. package/dist/assets/aiTemplatesStarterCollection.store-nL9nePkK.js +656 -0
  162. package/dist/assets/apiKeys.store-BhOFmP2j.js +51 -0
  163. package/dist/assets/assistant.store-CNywgN4S.js +518 -0
  164. package/dist/assets/auth.eventBus-CWXS0Qp7.js +5 -0
  165. package/dist/assets/banners.store-CGEcBTDn.js +195 -0
  166. package/dist/assets/builder.store-Czk2ipDE.js +31417 -0
  167. package/dist/assets/buttons.esm-yintpW2E.js +364 -0
  168. package/dist/assets/chart-CNvyywtJ.js +10958 -0
  169. package/dist/assets/chartjs.utils-BAE52Cv9.js +155 -0
  170. package/dist/assets/chat.store-290YeyrQ.js +865 -0
  171. package/dist/assets/chatPanel.store-NDaawEZL.js +118 -0
  172. package/dist/assets/chunk-6z4oVpB-.js +36 -0
  173. package/dist/assets/col-Cmt4cmuS.js +158 -0
  174. package/dist/assets/constants-C8OH4tTq.js +106256 -0
  175. package/dist/assets/constants-DMrsrpD7.js +32 -0
  176. package/dist/assets/core-B9gt_4yk.js +4 -0
  177. package/dist/assets/core-CP5FY4aX.js +1202 -0
  178. package/dist/assets/core-CRbPymLT.js +9741 -0
  179. package/dist/assets/dataTable.store-DmipQsol.js +207 -0
  180. package/dist/assets/date-picker-2IDsBs2n.js +4115 -0
  181. package/dist/assets/dateFormatter-ik4-9_9r.js +33 -0
  182. package/dist/assets/dateformat-hG8NERse.js +181 -0
  183. package/dist/assets/dialog-lMho1TD8.js +425 -0
  184. package/dist/assets/dist-Cw46Is-h.js +151 -0
  185. package/dist/assets/doppler-B__k0MeW.webp +0 -0
  186. package/dist/assets/element-icons-B-tDfklg.woff +0 -0
  187. package/dist/assets/element-icons-_lZGOqcG.ttf +0 -0
  188. package/dist/assets/empty-BuGRxzl4.js +2210 -0
  189. package/dist/assets/en-CF30SCh2.js +95 -0
  190. package/dist/assets/en-DyO2pPiC.js +2 -0
  191. package/dist/assets/es-BkUFJVtD.js +43338 -0
  192. package/dist/assets/evaluation.constants-GYAwmJnh.js +284 -0
  193. package/dist/assets/executions.store-B9uRYwgv.js +205 -0
  194. package/dist/assets/exports-Crx_gvt_.js +1799 -0
  195. package/dist/assets/externalSecrets.ee.store-BJh4a_6G.js +118 -0
  196. package/dist/assets/fileUtils-CRWqOQje.js +20 -0
  197. package/dist/assets/folders.store-yAFj-5Vl.js +235 -0
  198. package/dist/assets/get-BcEmeOxn.js +2781 -0
  199. package/dist/assets/index-SL8542zQ.js +28372 -0
  200. package/dist/assets/insights.constants-BkJCYJTL.js +55 -0
  201. package/dist/assets/insights.store-BFc3kDUo.js +61 -0
  202. package/dist/assets/insights.utils-CcLXdrrz.js +77 -0
  203. package/dist/assets/isEmpty-C3XXoHqJ.js +35216 -0
  204. package/dist/assets/languageModules-9LyndCqU.js +13862 -0
  205. package/dist/assets/logStreaming.store-IZhWe_VK.js +190 -0
  206. package/dist/assets/mcp.constants-_Jcn7fPq.js +10 -0
  207. package/dist/assets/mcp.store-B9yfcAN9.js +116 -0
  208. package/dist/assets/merge-DhuTk1HM.js +564 -0
  209. package/dist/assets/nodeCreator.store-Bpnrwp2l.js +5444 -0
  210. package/dist/assets/nodeIcon-D6X-ENYt.js +102 -0
  211. package/dist/assets/nodeTransforms-RzcOM0v2.js +42 -0
  212. package/dist/assets/orderBy-Cu9F9DU_.js +15 -0
  213. package/dist/assets/path-browserify-RUt2u7iT.js +328 -0
  214. package/dist/assets/personalizedTemplatesV3.store-BGYp0YBN.js +334 -0
  215. package/dist/assets/pickBy-UI0Jt4wC.js +18 -0
  216. package/dist/assets/preload-helper-dyVz7ck7.js +59 -0
  217. package/dist/assets/radio-CSce3UT0.js +262 -0
  218. package/dist/assets/readyToRun.store-YEMvPUqo.js +626 -0
  219. package/dist/assets/readyToRunWorkflows.store-G3srgIze.js +1319 -0
  220. package/dist/assets/retry-BgHaYzbB.js +23 -0
  221. package/dist/assets/roles.store-CRf_zJTb.js +51 -0
  222. package/dist/assets/router-DNpzz3GH.js +2631 -0
  223. package/dist/assets/sanitize-html-CbW56HUN.js +10758 -0
  224. package/dist/assets/schemaPreview.store-DUgN1yVE.js +113 -0
  225. package/dist/assets/semver-Bk6DGseV.js +1306 -0
  226. package/dist/assets/smartDecimal-DAZl4HKA.js +6 -0
  227. package/dist/assets/sortByProperty-Cn7iGKYu.js +8 -0
  228. package/dist/assets/sourceControl.eventBus-D47xXSc_.js +3 -0
  229. package/dist/assets/sqlite3-DBpDb1lf.wasm +0 -0
  230. package/dist/assets/sqlite3-opfs-async-proxy-vVtmDGHX.js +461 -0
  231. package/dist/assets/sqlite3-worker1-bundler-friendly-DLarOZDL.js +9405 -0
  232. package/dist/assets/src-jviYSG25.js +55454 -0
  233. package/dist/assets/sso.store-DyApJwhx.js +139 -0
  234. package/dist/assets/style-E3CrYFV8.css +111829 -0
  235. package/dist/assets/table-we1DjFMV.js +3944 -0
  236. package/dist/assets/templateActions-bEDSARw2.js +65 -0
  237. package/dist/assets/templateTransforms-BHWiRbtR.js +43 -0
  238. package/dist/assets/truncate-C0KYt7i3.js +4176 -0
  239. package/dist/assets/typescript.worker-CYqLvLHh.js +152048 -0
  240. package/dist/assets/uniqBy-xDyuCRP0.js +10 -0
  241. package/dist/assets/usage.store-CU5J_nGm.js +100 -0
  242. package/dist/assets/useActions-B1JckIRj.js +255 -0
  243. package/dist/assets/useBeforeUnload-DiDkvI8p.js +40 -0
  244. package/dist/assets/useCanvasMapping-BXT7rGhC.js +12570 -0
  245. package/dist/assets/useCanvasOperations-8ULLtMkY.js +1765 -0
  246. package/dist/assets/useClipboard-DvjhVHqJ.js +39 -0
  247. package/dist/assets/useCommandBar-C4tLJbKt.js +2425 -0
  248. package/dist/assets/useCredentialResolvers-BKeFGJnY.js +78 -0
  249. package/dist/assets/useCustomAgent-DpILEt5e.js +471 -0
  250. package/dist/assets/useDebounce-Br5_1ug-.js +147 -0
  251. package/dist/assets/useExecutionData-M5iKsX6z.js +23 -0
  252. package/dist/assets/useExecutionDebugging-8azMzbnd.js +191 -0
  253. package/dist/assets/useExecutionHelpers-BgRRhpBM.js +91 -0
  254. package/dist/assets/useImportCurlCommand-CKiEmX5P.js +8891 -0
  255. package/dist/assets/useIntersectionObserver-BWMwOueh.js +33 -0
  256. package/dist/assets/useKeybindings-B2jfN6rd.js +62 -0
  257. package/dist/assets/useLogsTreeExpand-sZViUfdM.js +843 -0
  258. package/dist/assets/useMcp-DoMOIfqT.js +27 -0
  259. package/dist/assets/usePageRedirectionHelper-DjkznpX6.js +51 -0
  260. package/dist/assets/usePinnedData-BhZkqttf.js +203 -0
  261. package/dist/assets/usePushConnection-DMS-F_IW.js +513 -0
  262. package/dist/assets/useRecentResources-BVORr7eM.js +118 -0
  263. package/dist/assets/useRunWorkflow-LO7ffLp9.js +950 -0
  264. package/dist/assets/useSettingsItems-BhZXwMZn.js +144 -0
  265. package/dist/assets/useTelemetryContext-V6bv4YRq.js +34 -0
  266. package/dist/assets/useWorkflowActivate-DeSmDXjI.js +152 -0
  267. package/dist/assets/useWorkflowsCache-DtcEEAIR.js +179 -0
  268. package/dist/assets/userRoleProvisioning.store-kkSIdeTo.js +33 -0
  269. package/dist/assets/utils-DI7dLldp.js +54 -0
  270. package/dist/assets/versions.store-B1z2OrLE.js +191 -0
  271. package/dist/assets/vue-CydWIhxN.js +4378 -0
  272. package/dist/assets/vue-json-pretty-CsGX66mG.js +1130 -0
  273. package/dist/assets/vue.runtime.esm-bundler-tP5dCd7J.js +7325 -0
  274. package/dist/assets/xml-B_oj6Mle.js +2060 -0
  275. package/dist/favicon.ico +0 -0
  276. package/dist/index.html +157 -0
  277. package/dist/static/base-path.js +1 -0
  278. package/dist/static/community_package_tooltip_img.png +0 -0
  279. package/dist/static/data-mapping-gif.gif +0 -0
  280. package/dist/static/form-grey.svg +1 -0
  281. package/dist/static/google-auth/disabled.dark.png +0 -0
  282. package/dist/static/google-auth/disabled.png +0 -0
  283. package/dist/static/google-auth/focus.dark.png +0 -0
  284. package/dist/static/google-auth/focus.png +0 -0
  285. package/dist/static/google-auth/normal.dark.png +0 -0
  286. package/dist/static/google-auth/normal.png +0 -0
  287. package/dist/static/google-auth/pressed.dark.png +0 -0
  288. package/dist/static/google-auth/pressed.png +0 -0
  289. package/dist/static/n8n-logo.png +0 -0
  290. package/dist/static/og_image.png +0 -0
  291. package/dist/static/open-ai.svg +1 -0
  292. package/dist/static/openChat.png +0 -0
  293. package/dist/static/posthog.init.js +41 -0
  294. package/dist/static/prefers-color-scheme.css +5 -0
  295. package/dist/static/webhook-icon.svg +1 -0
  296. package/dist/tree-sitter-bash.wasm +0 -0
  297. package/dist/tree-sitter.wasm +0 -0
  298. package/eslint.config.mjs +59 -0
  299. package/index.html +45 -0
  300. package/index.js +0 -0
  301. package/package.json +147 -0
  302. package/postcss.config.cjs +6 -0
  303. package/scripts/fetch-node-popularity.mjs +102 -0
  304. package/stylelint.config.mjs +9 -0
  305. package/tailwind.config.js +8 -0
  306. package/tsconfig.json +36 -0
  307. package/vite/i18n-locales-hmr-helpers.ts +19 -0
  308. package/vite/source-map-js-shim.ts +1 -0
  309. package/vite/vite-plugin-node-popularity.mts +32 -0
  310. package/vite.config.mts +304 -0
@@ -0,0 +1,4176 @@
1
+ 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, 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, 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, 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";
2
+ import { Y as isVue2 } from "./core-CRbPymLT.js";
3
+ 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])`;
4
+ var isVisible = (element) => {
5
+ return getComputedStyle(element).position === "fixed" ? false : element.offsetParent !== null;
6
+ };
7
+ var obtainAllFocusableElements$1 = (element) => {
8
+ return Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter((item) => isFocusable(item) && isVisible(item));
9
+ };
10
+ var isFocusable = (element) => {
11
+ if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null) return true;
12
+ if (element.disabled) return false;
13
+ switch (element.nodeName) {
14
+ case "A": return !!element.href && element.rel !== "ignore";
15
+ case "INPUT": return !(element.type === "hidden" || element.type === "file");
16
+ case "BUTTON":
17
+ case "SELECT":
18
+ case "TEXTAREA": return true;
19
+ default: return false;
20
+ }
21
+ };
22
+ var triggerEvent = function(elm, name, ...opts) {
23
+ let eventName;
24
+ if (name.includes("mouse") || name.includes("click")) eventName = "MouseEvents";
25
+ else if (name.includes("key")) eventName = "KeyboardEvent";
26
+ else eventName = "HTMLEvents";
27
+ const evt = document.createEvent(eventName);
28
+ evt.initEvent(name, ...opts);
29
+ elm.dispatchEvent(evt);
30
+ return elm;
31
+ };
32
+ var __defProp$9 = Object.defineProperty;
33
+ var __defProps$6 = Object.defineProperties;
34
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
35
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
36
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
37
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
38
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, {
39
+ enumerable: true,
40
+ configurable: true,
41
+ writable: true,
42
+ value
43
+ }) : obj[key] = value;
44
+ var __spreadValues$9 = (a, b) => {
45
+ for (var prop in b || (b = {})) if (__hasOwnProp$b.call(b, prop)) __defNormalProp$9(a, prop, b[prop]);
46
+ if (__getOwnPropSymbols$b) {
47
+ for (var prop of __getOwnPropSymbols$b(b)) if (__propIsEnum$b.call(b, prop)) __defNormalProp$9(a, prop, b[prop]);
48
+ }
49
+ return a;
50
+ };
51
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
52
+ function computedEager(fn, options) {
53
+ var _a$1;
54
+ const result = shallowRef();
55
+ watchEffect(() => {
56
+ result.value = fn();
57
+ }, __spreadProps$6(__spreadValues$9({}, options), { flush: (_a$1 = options == null ? void 0 : options.flush) != null ? _a$1 : "sync" }));
58
+ return readonly(result);
59
+ }
60
+ var _a;
61
+ var isClient = typeof window !== "undefined";
62
+ var isDef = (val) => typeof val !== "undefined";
63
+ var isFunction$2 = (val) => typeof val === "function";
64
+ var isString$1 = (val) => typeof val === "string";
65
+ var noop = () => {};
66
+ var isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
67
+ function resolveUnref(r) {
68
+ return typeof r === "function" ? r() : unref(r);
69
+ }
70
+ function identity(arg) {
71
+ return arg;
72
+ }
73
+ function tryOnScopeDispose(fn) {
74
+ if (getCurrentScope()) {
75
+ onScopeDispose(fn);
76
+ return true;
77
+ }
78
+ return false;
79
+ }
80
+ function tryOnMounted(fn, sync = true) {
81
+ if (getCurrentInstance()) onMounted(fn);
82
+ else if (sync) fn();
83
+ else nextTick(fn);
84
+ }
85
+ function useTimeoutFn(cb, interval, options = {}) {
86
+ const { immediate = true } = options;
87
+ const isPending = ref(false);
88
+ let timer = null;
89
+ function clear() {
90
+ if (timer) {
91
+ clearTimeout(timer);
92
+ timer = null;
93
+ }
94
+ }
95
+ function stop() {
96
+ isPending.value = false;
97
+ clear();
98
+ }
99
+ function start(...args) {
100
+ clear();
101
+ isPending.value = true;
102
+ timer = setTimeout(() => {
103
+ isPending.value = false;
104
+ timer = null;
105
+ cb(...args);
106
+ }, resolveUnref(interval));
107
+ }
108
+ if (immediate) {
109
+ isPending.value = true;
110
+ if (isClient) start();
111
+ }
112
+ tryOnScopeDispose(stop);
113
+ return {
114
+ isPending: readonly(isPending),
115
+ start,
116
+ stop
117
+ };
118
+ }
119
+ init_dist();
120
+ function unrefElement(elRef) {
121
+ var _a$1;
122
+ const plain = resolveUnref(elRef);
123
+ return (_a$1 = plain == null ? void 0 : plain.$el) != null ? _a$1 : plain;
124
+ }
125
+ var defaultWindow = isClient ? window : void 0;
126
+ var defaultDocument = isClient ? window.document : void 0;
127
+ isClient && window.navigator;
128
+ isClient && window.location;
129
+ function useEventListener(...args) {
130
+ let target;
131
+ let events;
132
+ let listeners;
133
+ let options;
134
+ if (isString$1(args[0]) || Array.isArray(args[0])) {
135
+ [events, listeners, options] = args;
136
+ target = defaultWindow;
137
+ } else [target, events, listeners, options] = args;
138
+ if (!target) return noop;
139
+ if (!Array.isArray(events)) events = [events];
140
+ if (!Array.isArray(listeners)) listeners = [listeners];
141
+ const cleanups = [];
142
+ const cleanup = () => {
143
+ cleanups.forEach((fn) => fn());
144
+ cleanups.length = 0;
145
+ };
146
+ const register = (el, event, listener, options2) => {
147
+ el.addEventListener(event, listener, options2);
148
+ return () => el.removeEventListener(event, listener, options2);
149
+ };
150
+ const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
151
+ cleanup();
152
+ if (!el) return;
153
+ cleanups.push(...events.flatMap((event) => {
154
+ return listeners.map((listener) => register(el, event, listener, options2));
155
+ }));
156
+ }, {
157
+ immediate: true,
158
+ flush: "post"
159
+ });
160
+ const stop = () => {
161
+ stopWatch();
162
+ cleanup();
163
+ };
164
+ tryOnScopeDispose(stop);
165
+ return stop;
166
+ }
167
+ var _iOSWorkaround = false;
168
+ function onClickOutside(target, handler, options = {}) {
169
+ const { window: window$1 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
170
+ if (!window$1) return;
171
+ if (isIOS && !_iOSWorkaround) {
172
+ _iOSWorkaround = true;
173
+ Array.from(window$1.document.body.children).forEach((el) => el.addEventListener("click", noop));
174
+ }
175
+ let shouldListen = true;
176
+ const shouldIgnore = (event) => {
177
+ return ignore.some((target2) => {
178
+ if (typeof target2 === "string") return Array.from(window$1.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));
179
+ else {
180
+ const el = unrefElement(target2);
181
+ return el && (event.target === el || event.composedPath().includes(el));
182
+ }
183
+ });
184
+ };
185
+ const listener = (event) => {
186
+ const el = unrefElement(target);
187
+ if (!el || el === event.target || event.composedPath().includes(el)) return;
188
+ if (event.detail === 0) shouldListen = !shouldIgnore(event);
189
+ if (!shouldListen) {
190
+ shouldListen = true;
191
+ return;
192
+ }
193
+ handler(event);
194
+ };
195
+ const cleanup = [
196
+ useEventListener(window$1, "click", listener, {
197
+ passive: true,
198
+ capture
199
+ }),
200
+ useEventListener(window$1, "pointerdown", (e) => {
201
+ const el = unrefElement(target);
202
+ if (el) shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);
203
+ }, { passive: true }),
204
+ detectIframe && useEventListener(window$1, "blur", (event) => {
205
+ var _a$1;
206
+ const el = unrefElement(target);
207
+ if (((_a$1 = window$1.document.activeElement) == null ? void 0 : _a$1.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window$1.document.activeElement))) handler(event);
208
+ })
209
+ ].filter(Boolean);
210
+ const stop = () => cleanup.forEach((fn) => fn());
211
+ return stop;
212
+ }
213
+ function useSupported(callback, sync = false) {
214
+ const isSupported = ref();
215
+ const update = () => isSupported.value = Boolean(callback());
216
+ update();
217
+ tryOnMounted(update, sync);
218
+ return isSupported;
219
+ }
220
+ function cloneFnJSON(source) {
221
+ return JSON.parse(JSON.stringify(source));
222
+ }
223
+ var _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
224
+ var globalKey = "__vueuse_ssr_handlers__";
225
+ _global[globalKey] = _global[globalKey] || {};
226
+ _global[globalKey];
227
+ function useDocumentVisibility({ document: document$1 = defaultDocument } = {}) {
228
+ if (!document$1) return ref("visible");
229
+ const visibility = ref(document$1.visibilityState);
230
+ useEventListener(document$1, "visibilitychange", () => {
231
+ visibility.value = document$1.visibilityState;
232
+ });
233
+ return visibility;
234
+ }
235
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
236
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
237
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
238
+ var __objRest$2 = (source, exclude) => {
239
+ var target = {};
240
+ for (var prop in source) if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
241
+ if (source != null && __getOwnPropSymbols$g) {
242
+ for (var prop of __getOwnPropSymbols$g(source)) if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop)) target[prop] = source[prop];
243
+ }
244
+ return target;
245
+ };
246
+ function useResizeObserver(target, callback, options = {}) {
247
+ const _a$1 = options, { window: window$1 = defaultWindow } = _a$1, observerOptions = __objRest$2(_a$1, ["window"]);
248
+ let observer;
249
+ const isSupported = useSupported(() => window$1 && "ResizeObserver" in window$1);
250
+ const cleanup = () => {
251
+ if (observer) {
252
+ observer.disconnect();
253
+ observer = void 0;
254
+ }
255
+ };
256
+ const stopWatch = watch(() => unrefElement(target), (el) => {
257
+ cleanup();
258
+ if (isSupported.value && window$1 && el) {
259
+ observer = new ResizeObserver(callback);
260
+ observer.observe(el, observerOptions);
261
+ }
262
+ }, {
263
+ immediate: true,
264
+ flush: "post"
265
+ });
266
+ const stop = () => {
267
+ cleanup();
268
+ stopWatch();
269
+ };
270
+ tryOnScopeDispose(stop);
271
+ return {
272
+ isSupported,
273
+ stop
274
+ };
275
+ }
276
+ var SwipeDirection;
277
+ (function(SwipeDirection2) {
278
+ SwipeDirection2["UP"] = "UP";
279
+ SwipeDirection2["RIGHT"] = "RIGHT";
280
+ SwipeDirection2["DOWN"] = "DOWN";
281
+ SwipeDirection2["LEFT"] = "LEFT";
282
+ SwipeDirection2["NONE"] = "NONE";
283
+ })(SwipeDirection || (SwipeDirection = {}));
284
+ var __defProp = Object.defineProperty;
285
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
286
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
287
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
288
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
289
+ enumerable: true,
290
+ configurable: true,
291
+ writable: true,
292
+ value
293
+ }) : obj[key] = value;
294
+ var __spreadValues = (a, b) => {
295
+ for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
296
+ if (__getOwnPropSymbols) {
297
+ for (var prop of __getOwnPropSymbols(b)) if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
298
+ }
299
+ return a;
300
+ };
301
+ __spreadValues({ linear: identity }, {
302
+ easeInSine: [
303
+ .12,
304
+ 0,
305
+ .39,
306
+ 0
307
+ ],
308
+ easeOutSine: [
309
+ .61,
310
+ 1,
311
+ .88,
312
+ 1
313
+ ],
314
+ easeInOutSine: [
315
+ .37,
316
+ 0,
317
+ .63,
318
+ 1
319
+ ],
320
+ easeInQuad: [
321
+ .11,
322
+ 0,
323
+ .5,
324
+ 0
325
+ ],
326
+ easeOutQuad: [
327
+ .5,
328
+ 1,
329
+ .89,
330
+ 1
331
+ ],
332
+ easeInOutQuad: [
333
+ .45,
334
+ 0,
335
+ .55,
336
+ 1
337
+ ],
338
+ easeInCubic: [
339
+ .32,
340
+ 0,
341
+ .67,
342
+ 0
343
+ ],
344
+ easeOutCubic: [
345
+ .33,
346
+ 1,
347
+ .68,
348
+ 1
349
+ ],
350
+ easeInOutCubic: [
351
+ .65,
352
+ 0,
353
+ .35,
354
+ 1
355
+ ],
356
+ easeInQuart: [
357
+ .5,
358
+ 0,
359
+ .75,
360
+ 0
361
+ ],
362
+ easeOutQuart: [
363
+ .25,
364
+ 1,
365
+ .5,
366
+ 1
367
+ ],
368
+ easeInOutQuart: [
369
+ .76,
370
+ 0,
371
+ .24,
372
+ 1
373
+ ],
374
+ easeInQuint: [
375
+ .64,
376
+ 0,
377
+ .78,
378
+ 0
379
+ ],
380
+ easeOutQuint: [
381
+ .22,
382
+ 1,
383
+ .36,
384
+ 1
385
+ ],
386
+ easeInOutQuint: [
387
+ .83,
388
+ 0,
389
+ .17,
390
+ 1
391
+ ],
392
+ easeInExpo: [
393
+ .7,
394
+ 0,
395
+ .84,
396
+ 0
397
+ ],
398
+ easeOutExpo: [
399
+ .16,
400
+ 1,
401
+ .3,
402
+ 1
403
+ ],
404
+ easeInOutExpo: [
405
+ .87,
406
+ 0,
407
+ .13,
408
+ 1
409
+ ],
410
+ easeInCirc: [
411
+ .55,
412
+ 0,
413
+ 1,
414
+ .45
415
+ ],
416
+ easeOutCirc: [
417
+ 0,
418
+ .55,
419
+ .45,
420
+ 1
421
+ ],
422
+ easeInOutCirc: [
423
+ .85,
424
+ 0,
425
+ .15,
426
+ 1
427
+ ],
428
+ easeInBack: [
429
+ .36,
430
+ 0,
431
+ .66,
432
+ -.56
433
+ ],
434
+ easeOutBack: [
435
+ .34,
436
+ 1.56,
437
+ .64,
438
+ 1
439
+ ],
440
+ easeInOutBack: [
441
+ .68,
442
+ -.6,
443
+ .32,
444
+ 1.6
445
+ ]
446
+ });
447
+ function useVModel(props, key, emit, options = {}) {
448
+ var _a$1, _b, _c;
449
+ const { clone = false, passive = false, eventName, deep = false, defaultValue } = options;
450
+ const vm = getCurrentInstance();
451
+ const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a$1 = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a$1.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
452
+ let event = eventName;
453
+ if (!key) key = "modelValue";
454
+ event = eventName || event || `update:${key.toString()}`;
455
+ const cloneFn = (val) => !clone ? val : isFunction$2(clone) ? clone(val) : cloneFnJSON(val);
456
+ const getValue$1 = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;
457
+ if (passive) {
458
+ const proxy = ref(getValue$1());
459
+ watch(() => props[key], (v) => proxy.value = cloneFn(v));
460
+ watch(proxy, (v) => {
461
+ if (v !== props[key] || deep) _emit(event, v);
462
+ }, { deep });
463
+ return proxy;
464
+ } else return computed({
465
+ get() {
466
+ return getValue$1();
467
+ },
468
+ set(value) {
469
+ _emit(event, value);
470
+ }
471
+ });
472
+ }
473
+ function useWindowFocus({ window: window$1 = defaultWindow } = {}) {
474
+ if (!window$1) return ref(false);
475
+ const focused = ref(window$1.document.hasFocus());
476
+ useEventListener(window$1, "blur", () => {
477
+ focused.value = false;
478
+ });
479
+ useEventListener(window$1, "focus", () => {
480
+ focused.value = true;
481
+ });
482
+ return focused;
483
+ }
484
+ var isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent);
485
+ init_dist();
486
+ var _freeGlobal_default = typeof global == "object" && global && global.Object === Object && global;
487
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
488
+ var _root_default = _freeGlobal_default || freeSelf || Function("return this")();
489
+ var _Symbol_default = _root_default.Symbol;
490
+ var objectProto$1 = Object.prototype;
491
+ var hasOwnProperty$4 = objectProto$1.hasOwnProperty;
492
+ var nativeObjectToString$1 = objectProto$1.toString;
493
+ var symToStringTag$1 = _Symbol_default ? _Symbol_default.toStringTag : void 0;
494
+ function getRawTag(value) {
495
+ var isOwn = hasOwnProperty$4.call(value, symToStringTag$1), tag = value[symToStringTag$1];
496
+ try {
497
+ value[symToStringTag$1] = void 0;
498
+ var unmasked = true;
499
+ } catch (e) {}
500
+ var result = nativeObjectToString$1.call(value);
501
+ if (unmasked) if (isOwn) value[symToStringTag$1] = tag;
502
+ else delete value[symToStringTag$1];
503
+ return result;
504
+ }
505
+ var _getRawTag_default = getRawTag;
506
+ var nativeObjectToString = Object.prototype.toString;
507
+ function objectToString(value) {
508
+ return nativeObjectToString.call(value);
509
+ }
510
+ var _objectToString_default = objectToString;
511
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
512
+ var symToStringTag = _Symbol_default ? _Symbol_default.toStringTag : void 0;
513
+ function baseGetTag(value) {
514
+ if (value == null) return value === void 0 ? undefinedTag : nullTag;
515
+ return symToStringTag && symToStringTag in Object(value) ? _getRawTag_default(value) : _objectToString_default(value);
516
+ }
517
+ var _baseGetTag_default = baseGetTag;
518
+ function isObjectLike(value) {
519
+ return value != null && typeof value == "object";
520
+ }
521
+ var isObjectLike_default = isObjectLike;
522
+ var symbolTag = "[object Symbol]";
523
+ function isSymbol(value) {
524
+ return typeof value == "symbol" || isObjectLike_default(value) && _baseGetTag_default(value) == symbolTag;
525
+ }
526
+ var isSymbol_default = isSymbol;
527
+ function arrayMap(array, iteratee) {
528
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
529
+ while (++index < length) result[index] = iteratee(array[index], index, array);
530
+ return result;
531
+ }
532
+ var _arrayMap_default = arrayMap;
533
+ var isArray_default = Array.isArray;
534
+ var INFINITY$1 = Infinity;
535
+ var symbolProto = _Symbol_default ? _Symbol_default.prototype : void 0, symbolToString = symbolProto ? symbolProto.toString : void 0;
536
+ function baseToString(value) {
537
+ if (typeof value == "string") return value;
538
+ if (isArray_default(value)) return _arrayMap_default(value, baseToString) + "";
539
+ if (isSymbol_default(value)) return symbolToString ? symbolToString.call(value) : "";
540
+ var result = value + "";
541
+ return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
542
+ }
543
+ var _baseToString_default = baseToString;
544
+ var reWhitespace = /\s/;
545
+ function trimmedEndIndex(string) {
546
+ var index = string.length;
547
+ while (index-- && reWhitespace.test(string.charAt(index)));
548
+ return index;
549
+ }
550
+ var _trimmedEndIndex_default = trimmedEndIndex;
551
+ var reTrimStart = /^\s+/;
552
+ function baseTrim(string) {
553
+ return string ? string.slice(0, _trimmedEndIndex_default(string) + 1).replace(reTrimStart, "") : string;
554
+ }
555
+ var _baseTrim_default = baseTrim;
556
+ function isObject$1(value) {
557
+ var type = typeof value;
558
+ return value != null && (type == "object" || type == "function");
559
+ }
560
+ var isObject_default = isObject$1;
561
+ var NAN = NaN;
562
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
563
+ var reIsBinary = /^0b[01]+$/i;
564
+ var reIsOctal = /^0o[0-7]+$/i;
565
+ var freeParseInt = parseInt;
566
+ function toNumber(value) {
567
+ if (typeof value == "number") return value;
568
+ if (isSymbol_default(value)) return NAN;
569
+ if (isObject_default(value)) {
570
+ var other = typeof value.valueOf == "function" ? value.valueOf() : value;
571
+ value = isObject_default(other) ? other + "" : other;
572
+ }
573
+ if (typeof value != "string") return value === 0 ? value : +value;
574
+ value = _baseTrim_default(value);
575
+ var isBinary = reIsBinary.test(value);
576
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
577
+ }
578
+ var toNumber_default = toNumber;
579
+ var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
580
+ function isFunction$1(value) {
581
+ if (!isObject_default(value)) return false;
582
+ var tag = _baseGetTag_default(value);
583
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
584
+ }
585
+ var isFunction_default = isFunction$1;
586
+ var _coreJsData_default = _root_default["__core-js_shared__"];
587
+ var maskSrcKey = function() {
588
+ var uid = /[^.]+$/.exec(_coreJsData_default && _coreJsData_default.keys && _coreJsData_default.keys.IE_PROTO || "");
589
+ return uid ? "Symbol(src)_1." + uid : "";
590
+ }();
591
+ function isMasked(func) {
592
+ return !!maskSrcKey && maskSrcKey in func;
593
+ }
594
+ var _isMasked_default = isMasked;
595
+ var funcToString$1 = Function.prototype.toString;
596
+ function toSource(func) {
597
+ if (func != null) {
598
+ try {
599
+ return funcToString$1.call(func);
600
+ } catch (e) {}
601
+ try {
602
+ return func + "";
603
+ } catch (e) {}
604
+ }
605
+ return "";
606
+ }
607
+ var _toSource_default = toSource;
608
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
609
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
610
+ var funcProto = Function.prototype, objectProto = Object.prototype;
611
+ var funcToString = funcProto.toString;
612
+ var hasOwnProperty$3 = objectProto.hasOwnProperty;
613
+ var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
614
+ function baseIsNative(value) {
615
+ if (!isObject_default(value) || _isMasked_default(value)) return false;
616
+ return (isFunction_default(value) ? reIsNative : reIsHostCtor).test(_toSource_default(value));
617
+ }
618
+ var _baseIsNative_default = baseIsNative;
619
+ function getValue(object, key) {
620
+ return object == null ? void 0 : object[key];
621
+ }
622
+ var _getValue_default = getValue;
623
+ function getNative(object, key) {
624
+ var value = _getValue_default(object, key);
625
+ return _baseIsNative_default(value) ? value : void 0;
626
+ }
627
+ var _getNative_default = getNative;
628
+ var _defineProperty_default = function() {
629
+ try {
630
+ var func = _getNative_default(Object, "defineProperty");
631
+ func({}, "", {});
632
+ return func;
633
+ } catch (e) {}
634
+ }();
635
+ var MAX_SAFE_INTEGER = 9007199254740991;
636
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
637
+ function isIndex(value, length) {
638
+ var type = typeof value;
639
+ length = length == null ? MAX_SAFE_INTEGER : length;
640
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
641
+ }
642
+ var _isIndex_default = isIndex;
643
+ function baseAssignValue(object, key, value) {
644
+ if (key == "__proto__" && _defineProperty_default) _defineProperty_default(object, key, {
645
+ "configurable": true,
646
+ "enumerable": true,
647
+ "value": value,
648
+ "writable": true
649
+ });
650
+ else object[key] = value;
651
+ }
652
+ var _baseAssignValue_default = baseAssignValue;
653
+ function eq(value, other) {
654
+ return value === other || value !== value && other !== other;
655
+ }
656
+ var eq_default = eq;
657
+ var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
658
+ function assignValue(object, key, value) {
659
+ var objValue = object[key];
660
+ if (!(hasOwnProperty$2.call(object, key) && eq_default(objValue, value)) || value === void 0 && !(key in object)) _baseAssignValue_default(object, key, value);
661
+ }
662
+ var _assignValue_default = assignValue;
663
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
664
+ function isKey(value, object) {
665
+ if (isArray_default(value)) return false;
666
+ var type = typeof value;
667
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol_default(value)) return true;
668
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
669
+ }
670
+ var _isKey_default = isKey;
671
+ var _nativeCreate_default = _getNative_default(Object, "create");
672
+ function hashClear() {
673
+ this.__data__ = _nativeCreate_default ? _nativeCreate_default(null) : {};
674
+ this.size = 0;
675
+ }
676
+ var _hashClear_default = hashClear;
677
+ function hashDelete(key) {
678
+ var result = this.has(key) && delete this.__data__[key];
679
+ this.size -= result ? 1 : 0;
680
+ return result;
681
+ }
682
+ var _hashDelete_default = hashDelete;
683
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
684
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
685
+ function hashGet(key) {
686
+ var data = this.__data__;
687
+ if (_nativeCreate_default) {
688
+ var result = data[key];
689
+ return result === HASH_UNDEFINED$1 ? void 0 : result;
690
+ }
691
+ return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
692
+ }
693
+ var _hashGet_default = hashGet;
694
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
695
+ function hashHas(key) {
696
+ var data = this.__data__;
697
+ return _nativeCreate_default ? data[key] !== void 0 : hasOwnProperty.call(data, key);
698
+ }
699
+ var _hashHas_default = hashHas;
700
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
701
+ function hashSet(key, value) {
702
+ var data = this.__data__;
703
+ this.size += this.has(key) ? 0 : 1;
704
+ data[key] = _nativeCreate_default && value === void 0 ? HASH_UNDEFINED : value;
705
+ return this;
706
+ }
707
+ var _hashSet_default = hashSet;
708
+ function Hash(entries) {
709
+ var index = -1, length = entries == null ? 0 : entries.length;
710
+ this.clear();
711
+ while (++index < length) {
712
+ var entry = entries[index];
713
+ this.set(entry[0], entry[1]);
714
+ }
715
+ }
716
+ Hash.prototype.clear = _hashClear_default;
717
+ Hash.prototype["delete"] = _hashDelete_default;
718
+ Hash.prototype.get = _hashGet_default;
719
+ Hash.prototype.has = _hashHas_default;
720
+ Hash.prototype.set = _hashSet_default;
721
+ var _Hash_default = Hash;
722
+ function listCacheClear() {
723
+ this.__data__ = [];
724
+ this.size = 0;
725
+ }
726
+ var _listCacheClear_default = listCacheClear;
727
+ function assocIndexOf(array, key) {
728
+ var length = array.length;
729
+ while (length--) if (eq_default(array[length][0], key)) return length;
730
+ return -1;
731
+ }
732
+ var _assocIndexOf_default = assocIndexOf;
733
+ var splice = Array.prototype.splice;
734
+ function listCacheDelete(key) {
735
+ var data = this.__data__, index = _assocIndexOf_default(data, key);
736
+ if (index < 0) return false;
737
+ if (index == data.length - 1) data.pop();
738
+ else splice.call(data, index, 1);
739
+ --this.size;
740
+ return true;
741
+ }
742
+ var _listCacheDelete_default = listCacheDelete;
743
+ function listCacheGet(key) {
744
+ var data = this.__data__, index = _assocIndexOf_default(data, key);
745
+ return index < 0 ? void 0 : data[index][1];
746
+ }
747
+ var _listCacheGet_default = listCacheGet;
748
+ function listCacheHas(key) {
749
+ return _assocIndexOf_default(this.__data__, key) > -1;
750
+ }
751
+ var _listCacheHas_default = listCacheHas;
752
+ function listCacheSet(key, value) {
753
+ var data = this.__data__, index = _assocIndexOf_default(data, key);
754
+ if (index < 0) {
755
+ ++this.size;
756
+ data.push([key, value]);
757
+ } else data[index][1] = value;
758
+ return this;
759
+ }
760
+ var _listCacheSet_default = listCacheSet;
761
+ function ListCache(entries) {
762
+ var index = -1, length = entries == null ? 0 : entries.length;
763
+ this.clear();
764
+ while (++index < length) {
765
+ var entry = entries[index];
766
+ this.set(entry[0], entry[1]);
767
+ }
768
+ }
769
+ ListCache.prototype.clear = _listCacheClear_default;
770
+ ListCache.prototype["delete"] = _listCacheDelete_default;
771
+ ListCache.prototype.get = _listCacheGet_default;
772
+ ListCache.prototype.has = _listCacheHas_default;
773
+ ListCache.prototype.set = _listCacheSet_default;
774
+ var _ListCache_default = ListCache;
775
+ var _Map_default = _getNative_default(_root_default, "Map");
776
+ function mapCacheClear() {
777
+ this.size = 0;
778
+ this.__data__ = {
779
+ "hash": new _Hash_default(),
780
+ "map": new (_Map_default || _ListCache_default)(),
781
+ "string": new _Hash_default()
782
+ };
783
+ }
784
+ var _mapCacheClear_default = mapCacheClear;
785
+ function isKeyable(value) {
786
+ var type = typeof value;
787
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
788
+ }
789
+ var _isKeyable_default = isKeyable;
790
+ function getMapData(map, key) {
791
+ var data = map.__data__;
792
+ return _isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
793
+ }
794
+ var _getMapData_default = getMapData;
795
+ function mapCacheDelete(key) {
796
+ var result = _getMapData_default(this, key)["delete"](key);
797
+ this.size -= result ? 1 : 0;
798
+ return result;
799
+ }
800
+ var _mapCacheDelete_default = mapCacheDelete;
801
+ function mapCacheGet(key) {
802
+ return _getMapData_default(this, key).get(key);
803
+ }
804
+ var _mapCacheGet_default = mapCacheGet;
805
+ function mapCacheHas(key) {
806
+ return _getMapData_default(this, key).has(key);
807
+ }
808
+ var _mapCacheHas_default = mapCacheHas;
809
+ function mapCacheSet(key, value) {
810
+ var data = _getMapData_default(this, key), size = data.size;
811
+ data.set(key, value);
812
+ this.size += data.size == size ? 0 : 1;
813
+ return this;
814
+ }
815
+ var _mapCacheSet_default = mapCacheSet;
816
+ function MapCache(entries) {
817
+ var index = -1, length = entries == null ? 0 : entries.length;
818
+ this.clear();
819
+ while (++index < length) {
820
+ var entry = entries[index];
821
+ this.set(entry[0], entry[1]);
822
+ }
823
+ }
824
+ MapCache.prototype.clear = _mapCacheClear_default;
825
+ MapCache.prototype["delete"] = _mapCacheDelete_default;
826
+ MapCache.prototype.get = _mapCacheGet_default;
827
+ MapCache.prototype.has = _mapCacheHas_default;
828
+ MapCache.prototype.set = _mapCacheSet_default;
829
+ var _MapCache_default = MapCache;
830
+ var FUNC_ERROR_TEXT$1 = "Expected a function";
831
+ function memoize(func, resolver) {
832
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") throw new TypeError(FUNC_ERROR_TEXT$1);
833
+ var memoized = function() {
834
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
835
+ if (cache.has(key)) return cache.get(key);
836
+ var result = func.apply(this, args);
837
+ memoized.cache = cache.set(key, result) || cache;
838
+ return result;
839
+ };
840
+ memoized.cache = new (memoize.Cache || _MapCache_default)();
841
+ return memoized;
842
+ }
843
+ memoize.Cache = _MapCache_default;
844
+ var memoize_default = memoize;
845
+ var MAX_MEMOIZE_SIZE = 500;
846
+ function memoizeCapped(func) {
847
+ var result = memoize_default(func, function(key) {
848
+ if (cache.size === MAX_MEMOIZE_SIZE) cache.clear();
849
+ return key;
850
+ });
851
+ var cache = result.cache;
852
+ return result;
853
+ }
854
+ var _memoizeCapped_default = memoizeCapped;
855
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
856
+ var reEscapeChar = /\\(\\)?/g;
857
+ var _stringToPath_default = _memoizeCapped_default(function(string) {
858
+ var result = [];
859
+ if (string.charCodeAt(0) === 46) result.push("");
860
+ string.replace(rePropName, function(match, number, quote, subString) {
861
+ result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
862
+ });
863
+ return result;
864
+ });
865
+ function toString(value) {
866
+ return value == null ? "" : _baseToString_default(value);
867
+ }
868
+ var toString_default = toString;
869
+ function castPath(value, object) {
870
+ if (isArray_default(value)) return value;
871
+ return _isKey_default(value, object) ? [value] : _stringToPath_default(toString_default(value));
872
+ }
873
+ var _castPath_default = castPath;
874
+ var INFINITY = Infinity;
875
+ function toKey(value) {
876
+ if (typeof value == "string" || isSymbol_default(value)) return value;
877
+ var result = value + "";
878
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
879
+ }
880
+ var _toKey_default = toKey;
881
+ function baseGet(object, path) {
882
+ path = _castPath_default(path, object);
883
+ var index = 0, length = path.length;
884
+ while (object != null && index < length) object = object[_toKey_default(path[index++])];
885
+ return index && index == length ? object : void 0;
886
+ }
887
+ var _baseGet_default = baseGet;
888
+ function get(object, path, defaultValue) {
889
+ var result = object == null ? void 0 : _baseGet_default(object, path);
890
+ return result === void 0 ? defaultValue : result;
891
+ }
892
+ var get_default = get;
893
+ var now = function() {
894
+ return _root_default.Date.now();
895
+ };
896
+ var now_default = now;
897
+ var FUNC_ERROR_TEXT = "Expected a function";
898
+ var nativeMax = Math.max, nativeMin = Math.min;
899
+ function debounce(func, wait, options) {
900
+ var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
901
+ if (typeof func != "function") throw new TypeError(FUNC_ERROR_TEXT);
902
+ wait = toNumber_default(wait) || 0;
903
+ if (isObject_default(options)) {
904
+ leading = !!options.leading;
905
+ maxing = "maxWait" in options;
906
+ maxWait = maxing ? nativeMax(toNumber_default(options.maxWait) || 0, wait) : maxWait;
907
+ trailing = "trailing" in options ? !!options.trailing : trailing;
908
+ }
909
+ function invokeFunc(time) {
910
+ var args = lastArgs, thisArg = lastThis;
911
+ lastArgs = lastThis = void 0;
912
+ lastInvokeTime = time;
913
+ result = func.apply(thisArg, args);
914
+ return result;
915
+ }
916
+ function leadingEdge(time) {
917
+ lastInvokeTime = time;
918
+ timerId = setTimeout(timerExpired, wait);
919
+ return leading ? invokeFunc(time) : result;
920
+ }
921
+ function remainingWait(time) {
922
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
923
+ return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
924
+ }
925
+ function shouldInvoke(time) {
926
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
927
+ return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
928
+ }
929
+ function timerExpired() {
930
+ var time = now_default();
931
+ if (shouldInvoke(time)) return trailingEdge(time);
932
+ timerId = setTimeout(timerExpired, remainingWait(time));
933
+ }
934
+ function trailingEdge(time) {
935
+ timerId = void 0;
936
+ if (trailing && lastArgs) return invokeFunc(time);
937
+ lastArgs = lastThis = void 0;
938
+ return result;
939
+ }
940
+ function cancel() {
941
+ if (timerId !== void 0) clearTimeout(timerId);
942
+ lastInvokeTime = 0;
943
+ lastArgs = lastCallTime = lastThis = timerId = void 0;
944
+ }
945
+ function flush() {
946
+ return timerId === void 0 ? result : trailingEdge(now_default());
947
+ }
948
+ function debounced() {
949
+ var time = now_default(), isInvoking = shouldInvoke(time);
950
+ lastArgs = arguments;
951
+ lastThis = this;
952
+ lastCallTime = time;
953
+ if (isInvoking) {
954
+ if (timerId === void 0) return leadingEdge(lastCallTime);
955
+ if (maxing) {
956
+ clearTimeout(timerId);
957
+ timerId = setTimeout(timerExpired, wait);
958
+ return invokeFunc(lastCallTime);
959
+ }
960
+ }
961
+ if (timerId === void 0) timerId = setTimeout(timerExpired, wait);
962
+ return result;
963
+ }
964
+ debounced.cancel = cancel;
965
+ debounced.flush = flush;
966
+ return debounced;
967
+ }
968
+ var debounce_default = debounce;
969
+ function fromPairs(pairs) {
970
+ var index = -1, length = pairs == null ? 0 : pairs.length, result = {};
971
+ while (++index < length) {
972
+ var pair = pairs[index];
973
+ result[pair[0]] = pair[1];
974
+ }
975
+ return result;
976
+ }
977
+ var fromPairs_default = fromPairs;
978
+ function isNil(value) {
979
+ return value == null;
980
+ }
981
+ var isNil_default = isNil;
982
+ function baseSet(object, path, value, customizer) {
983
+ if (!isObject_default(object)) return object;
984
+ path = _castPath_default(path, object);
985
+ var index = -1, length = path.length, lastIndex = length - 1, nested = object;
986
+ while (nested != null && ++index < length) {
987
+ var key = _toKey_default(path[index]), newValue = value;
988
+ if (key === "__proto__" || key === "constructor" || key === "prototype") return object;
989
+ if (index != lastIndex) {
990
+ var objValue = nested[key];
991
+ newValue = customizer ? customizer(objValue, key, nested) : void 0;
992
+ if (newValue === void 0) newValue = isObject_default(objValue) ? objValue : _isIndex_default(path[index + 1]) ? [] : {};
993
+ }
994
+ _assignValue_default(nested, key, newValue);
995
+ nested = nested[key];
996
+ }
997
+ return object;
998
+ }
999
+ var _baseSet_default = baseSet;
1000
+ function set(object, path, value) {
1001
+ return object == null ? object : _baseSet_default(object, path, value);
1002
+ }
1003
+ var set_default = set;
1004
+ init_shared_esm_bundler();
1005
+ var isUndefined = (val) => val === void 0;
1006
+ var isBoolean = (val) => typeof val === "boolean";
1007
+ var isNumber = (val) => typeof val === "number";
1008
+ var isEmpty = (val) => !val && val !== 0 || isArray(val) && val.length === 0 || isObject(val) && !Object.keys(val).length;
1009
+ var isElement = (e) => {
1010
+ if (typeof Element === "undefined") return false;
1011
+ return e instanceof Element;
1012
+ };
1013
+ var isStringNumber = (val) => {
1014
+ if (!isString(val)) return false;
1015
+ return !Number.isNaN(Number(val));
1016
+ };
1017
+ init_shared_esm_bundler();
1018
+ var escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
1019
+ var capitalize$1 = (str) => capitalize(str);
1020
+ var keysOf = (arr) => Object.keys(arr);
1021
+ var entriesOf = (arr) => Object.entries(arr);
1022
+ var getProp = (obj, path, defaultValue) => {
1023
+ return {
1024
+ get value() {
1025
+ return get_default(obj, path, defaultValue);
1026
+ },
1027
+ set value(val) {
1028
+ set_default(obj, path, val);
1029
+ }
1030
+ };
1031
+ };
1032
+ var ElementPlusError = class extends Error {
1033
+ constructor(m) {
1034
+ super(m);
1035
+ this.name = "ElementPlusError";
1036
+ }
1037
+ };
1038
+ function throwError(scope, m) {
1039
+ throw new ElementPlusError(`[${scope}] ${m}`);
1040
+ }
1041
+ function debugWarn(scope, message) {}
1042
+ init_shared_esm_bundler();
1043
+ var SCOPE = "utils/dom/style";
1044
+ var classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
1045
+ var hasClass = (el, cls) => {
1046
+ if (!el || !cls) return false;
1047
+ if (cls.includes(" ")) throw new Error("className should not contain space.");
1048
+ return el.classList.contains(cls);
1049
+ };
1050
+ var addClass = (el, cls) => {
1051
+ if (!el || !cls.trim()) return;
1052
+ el.classList.add(...classNameToArray(cls));
1053
+ };
1054
+ var removeClass = (el, cls) => {
1055
+ if (!el || !cls.trim()) return;
1056
+ el.classList.remove(...classNameToArray(cls));
1057
+ };
1058
+ var getStyle = (element, styleName) => {
1059
+ var _a$1;
1060
+ if (!isClient || !element || !styleName) return "";
1061
+ let key = camelize(styleName);
1062
+ if (key === "float") key = "cssFloat";
1063
+ try {
1064
+ const style = element.style[key];
1065
+ if (style) return style;
1066
+ const computed$1 = (_a$1 = document.defaultView) == null ? void 0 : _a$1.getComputedStyle(element, "");
1067
+ return computed$1 ? computed$1[key] : "";
1068
+ } catch (e) {
1069
+ return element.style[key];
1070
+ }
1071
+ };
1072
+ function addUnit(value, defaultUnit = "px") {
1073
+ if (!value) return "";
1074
+ if (isNumber(value) || isStringNumber(value)) return `${value}${defaultUnit}`;
1075
+ else if (isString(value)) return value;
1076
+ debugWarn(SCOPE, "binding value must be a string or number");
1077
+ }
1078
+ var scrollBarWidth;
1079
+ var getScrollBarWidth = (namespace) => {
1080
+ var _a$1;
1081
+ if (!isClient) return 0;
1082
+ if (scrollBarWidth !== void 0) return scrollBarWidth;
1083
+ const outer = document.createElement("div");
1084
+ outer.className = `${namespace}-scrollbar__wrap`;
1085
+ outer.style.visibility = "hidden";
1086
+ outer.style.width = "100px";
1087
+ outer.style.position = "absolute";
1088
+ outer.style.top = "-9999px";
1089
+ document.body.appendChild(outer);
1090
+ const widthNoScroll = outer.offsetWidth;
1091
+ outer.style.overflow = "scroll";
1092
+ const inner = document.createElement("div");
1093
+ inner.style.width = "100%";
1094
+ outer.appendChild(inner);
1095
+ const widthWithScroll = inner.offsetWidth;
1096
+ (_a$1 = outer.parentNode) == null || _a$1.removeChild(outer);
1097
+ scrollBarWidth = widthNoScroll - widthWithScroll;
1098
+ return scrollBarWidth;
1099
+ };
1100
+ function scrollIntoView(container, selected) {
1101
+ if (!isClient) return;
1102
+ if (!selected) {
1103
+ container.scrollTop = 0;
1104
+ return;
1105
+ }
1106
+ const offsetParents = [];
1107
+ let pointer = selected.offsetParent;
1108
+ while (pointer !== null && container !== pointer && container.contains(pointer)) {
1109
+ offsetParents.push(pointer);
1110
+ pointer = pointer.offsetParent;
1111
+ }
1112
+ const top = selected.offsetTop + offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0);
1113
+ const bottom = top + selected.offsetHeight;
1114
+ const viewRectTop = container.scrollTop;
1115
+ const viewRectBottom = viewRectTop + container.clientHeight;
1116
+ if (top < viewRectTop) container.scrollTop = top;
1117
+ else if (bottom > viewRectBottom) container.scrollTop = bottom - container.clientHeight;
1118
+ }
1119
+ var arrow_down_default = /* @__PURE__ */ defineComponent({
1120
+ name: "ArrowDown",
1121
+ __name: "arrow-down",
1122
+ setup(__props) {
1123
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1124
+ xmlns: "http://www.w3.org/2000/svg",
1125
+ viewBox: "0 0 1024 1024"
1126
+ }, [createBaseVNode("path", {
1127
+ fill: "currentColor",
1128
+ d: "M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"
1129
+ })]));
1130
+ }
1131
+ });
1132
+ var arrow_left_default = /* @__PURE__ */ defineComponent({
1133
+ name: "ArrowLeft",
1134
+ __name: "arrow-left",
1135
+ setup(__props) {
1136
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1137
+ xmlns: "http://www.w3.org/2000/svg",
1138
+ viewBox: "0 0 1024 1024"
1139
+ }, [createBaseVNode("path", {
1140
+ fill: "currentColor",
1141
+ d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"
1142
+ })]));
1143
+ }
1144
+ });
1145
+ var arrow_right_default = /* @__PURE__ */ defineComponent({
1146
+ name: "ArrowRight",
1147
+ __name: "arrow-right",
1148
+ setup(__props) {
1149
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1150
+ xmlns: "http://www.w3.org/2000/svg",
1151
+ viewBox: "0 0 1024 1024"
1152
+ }, [createBaseVNode("path", {
1153
+ fill: "currentColor",
1154
+ d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
1155
+ })]));
1156
+ }
1157
+ });
1158
+ var arrow_up_default = /* @__PURE__ */ defineComponent({
1159
+ name: "ArrowUp",
1160
+ __name: "arrow-up",
1161
+ setup(__props) {
1162
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1163
+ xmlns: "http://www.w3.org/2000/svg",
1164
+ viewBox: "0 0 1024 1024"
1165
+ }, [createBaseVNode("path", {
1166
+ fill: "currentColor",
1167
+ d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"
1168
+ })]));
1169
+ }
1170
+ });
1171
+ var calendar_default = /* @__PURE__ */ defineComponent({
1172
+ name: "Calendar",
1173
+ __name: "calendar",
1174
+ setup(__props) {
1175
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1176
+ xmlns: "http://www.w3.org/2000/svg",
1177
+ viewBox: "0 0 1024 1024"
1178
+ }, [createBaseVNode("path", {
1179
+ fill: "currentColor",
1180
+ d: "M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"
1181
+ })]));
1182
+ }
1183
+ });
1184
+ var check_default = /* @__PURE__ */ defineComponent({
1185
+ name: "Check",
1186
+ __name: "check",
1187
+ setup(__props) {
1188
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1189
+ xmlns: "http://www.w3.org/2000/svg",
1190
+ viewBox: "0 0 1024 1024"
1191
+ }, [createBaseVNode("path", {
1192
+ fill: "currentColor",
1193
+ d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
1194
+ })]));
1195
+ }
1196
+ });
1197
+ var circle_check_default = /* @__PURE__ */ defineComponent({
1198
+ name: "CircleCheck",
1199
+ __name: "circle-check",
1200
+ setup(__props) {
1201
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1202
+ xmlns: "http://www.w3.org/2000/svg",
1203
+ viewBox: "0 0 1024 1024"
1204
+ }, [createBaseVNode("path", {
1205
+ fill: "currentColor",
1206
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
1207
+ }), createBaseVNode("path", {
1208
+ fill: "currentColor",
1209
+ d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
1210
+ })]));
1211
+ }
1212
+ });
1213
+ var circle_close_filled_default = /* @__PURE__ */ defineComponent({
1214
+ name: "CircleCloseFilled",
1215
+ __name: "circle-close-filled",
1216
+ setup(__props) {
1217
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1218
+ xmlns: "http://www.w3.org/2000/svg",
1219
+ viewBox: "0 0 1024 1024"
1220
+ }, [createBaseVNode("path", {
1221
+ fill: "currentColor",
1222
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
1223
+ })]));
1224
+ }
1225
+ });
1226
+ var circle_close_default = /* @__PURE__ */ defineComponent({
1227
+ name: "CircleClose",
1228
+ __name: "circle-close",
1229
+ setup(__props) {
1230
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1231
+ xmlns: "http://www.w3.org/2000/svg",
1232
+ viewBox: "0 0 1024 1024"
1233
+ }, [createBaseVNode("path", {
1234
+ fill: "currentColor",
1235
+ d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
1236
+ }), createBaseVNode("path", {
1237
+ fill: "currentColor",
1238
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
1239
+ })]));
1240
+ }
1241
+ });
1242
+ var clock_default = /* @__PURE__ */ defineComponent({
1243
+ name: "Clock",
1244
+ __name: "clock",
1245
+ setup(__props) {
1246
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1247
+ xmlns: "http://www.w3.org/2000/svg",
1248
+ viewBox: "0 0 1024 1024"
1249
+ }, [
1250
+ createBaseVNode("path", {
1251
+ fill: "currentColor",
1252
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
1253
+ }),
1254
+ createBaseVNode("path", {
1255
+ fill: "currentColor",
1256
+ d: "M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"
1257
+ }),
1258
+ createBaseVNode("path", {
1259
+ fill: "currentColor",
1260
+ d: "M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"
1261
+ })
1262
+ ]));
1263
+ }
1264
+ });
1265
+ var close_default = /* @__PURE__ */ defineComponent({
1266
+ name: "Close",
1267
+ __name: "close",
1268
+ setup(__props) {
1269
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1270
+ xmlns: "http://www.w3.org/2000/svg",
1271
+ viewBox: "0 0 1024 1024"
1272
+ }, [createBaseVNode("path", {
1273
+ fill: "currentColor",
1274
+ d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
1275
+ })]));
1276
+ }
1277
+ });
1278
+ var d_arrow_left_default = /* @__PURE__ */ defineComponent({
1279
+ name: "DArrowLeft",
1280
+ __name: "d-arrow-left",
1281
+ setup(__props) {
1282
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1283
+ xmlns: "http://www.w3.org/2000/svg",
1284
+ viewBox: "0 0 1024 1024"
1285
+ }, [createBaseVNode("path", {
1286
+ fill: "currentColor",
1287
+ d: "M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"
1288
+ })]));
1289
+ }
1290
+ });
1291
+ var d_arrow_right_default = /* @__PURE__ */ defineComponent({
1292
+ name: "DArrowRight",
1293
+ __name: "d-arrow-right",
1294
+ setup(__props) {
1295
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1296
+ xmlns: "http://www.w3.org/2000/svg",
1297
+ viewBox: "0 0 1024 1024"
1298
+ }, [createBaseVNode("path", {
1299
+ fill: "currentColor",
1300
+ d: "M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"
1301
+ })]));
1302
+ }
1303
+ });
1304
+ var delete_default = /* @__PURE__ */ defineComponent({
1305
+ name: "Delete",
1306
+ __name: "delete",
1307
+ setup(__props) {
1308
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1309
+ xmlns: "http://www.w3.org/2000/svg",
1310
+ viewBox: "0 0 1024 1024"
1311
+ }, [createBaseVNode("path", {
1312
+ fill: "currentColor",
1313
+ d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
1314
+ })]));
1315
+ }
1316
+ });
1317
+ var document_default = /* @__PURE__ */ defineComponent({
1318
+ name: "Document",
1319
+ __name: "document",
1320
+ setup(__props) {
1321
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1322
+ xmlns: "http://www.w3.org/2000/svg",
1323
+ viewBox: "0 0 1024 1024"
1324
+ }, [createBaseVNode("path", {
1325
+ fill: "currentColor",
1326
+ d: "M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"
1327
+ })]));
1328
+ }
1329
+ });
1330
+ var hide_default = /* @__PURE__ */ defineComponent({
1331
+ name: "Hide",
1332
+ __name: "hide",
1333
+ setup(__props) {
1334
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1335
+ xmlns: "http://www.w3.org/2000/svg",
1336
+ viewBox: "0 0 1024 1024"
1337
+ }, [createBaseVNode("path", {
1338
+ fill: "currentColor",
1339
+ d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
1340
+ }), createBaseVNode("path", {
1341
+ fill: "currentColor",
1342
+ d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
1343
+ })]));
1344
+ }
1345
+ });
1346
+ var info_filled_default = /* @__PURE__ */ defineComponent({
1347
+ name: "InfoFilled",
1348
+ __name: "info-filled",
1349
+ setup(__props) {
1350
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1351
+ xmlns: "http://www.w3.org/2000/svg",
1352
+ viewBox: "0 0 1024 1024"
1353
+ }, [createBaseVNode("path", {
1354
+ fill: "currentColor",
1355
+ d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
1356
+ })]));
1357
+ }
1358
+ });
1359
+ var loading_default = /* @__PURE__ */ defineComponent({
1360
+ name: "Loading",
1361
+ __name: "loading",
1362
+ setup(__props) {
1363
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1364
+ xmlns: "http://www.w3.org/2000/svg",
1365
+ viewBox: "0 0 1024 1024"
1366
+ }, [createBaseVNode("path", {
1367
+ fill: "currentColor",
1368
+ d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
1369
+ })]));
1370
+ }
1371
+ });
1372
+ var minus_default = /* @__PURE__ */ defineComponent({
1373
+ name: "Minus",
1374
+ __name: "minus",
1375
+ setup(__props) {
1376
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1377
+ xmlns: "http://www.w3.org/2000/svg",
1378
+ viewBox: "0 0 1024 1024"
1379
+ }, [createBaseVNode("path", {
1380
+ fill: "currentColor",
1381
+ d: "M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"
1382
+ })]));
1383
+ }
1384
+ });
1385
+ var more_filled_default = /* @__PURE__ */ defineComponent({
1386
+ name: "MoreFilled",
1387
+ __name: "more-filled",
1388
+ setup(__props) {
1389
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1390
+ xmlns: "http://www.w3.org/2000/svg",
1391
+ viewBox: "0 0 1024 1024"
1392
+ }, [createBaseVNode("path", {
1393
+ fill: "currentColor",
1394
+ d: "M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"
1395
+ })]));
1396
+ }
1397
+ });
1398
+ var more_default = /* @__PURE__ */ defineComponent({
1399
+ name: "More",
1400
+ __name: "more",
1401
+ setup(__props) {
1402
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1403
+ xmlns: "http://www.w3.org/2000/svg",
1404
+ viewBox: "0 0 1024 1024"
1405
+ }, [createBaseVNode("path", {
1406
+ fill: "currentColor",
1407
+ d: "M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"
1408
+ })]));
1409
+ }
1410
+ });
1411
+ var picture_filled_default = /* @__PURE__ */ defineComponent({
1412
+ name: "PictureFilled",
1413
+ __name: "picture-filled",
1414
+ setup(__props) {
1415
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1416
+ xmlns: "http://www.w3.org/2000/svg",
1417
+ viewBox: "0 0 1024 1024"
1418
+ }, [createBaseVNode("path", {
1419
+ fill: "currentColor",
1420
+ d: "M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"
1421
+ })]));
1422
+ }
1423
+ });
1424
+ var plus_default = /* @__PURE__ */ defineComponent({
1425
+ name: "Plus",
1426
+ __name: "plus",
1427
+ setup(__props) {
1428
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1429
+ xmlns: "http://www.w3.org/2000/svg",
1430
+ viewBox: "0 0 1024 1024"
1431
+ }, [createBaseVNode("path", {
1432
+ fill: "currentColor",
1433
+ d: "M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"
1434
+ })]));
1435
+ }
1436
+ });
1437
+ var success_filled_default = /* @__PURE__ */ defineComponent({
1438
+ name: "SuccessFilled",
1439
+ __name: "success-filled",
1440
+ setup(__props) {
1441
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1442
+ xmlns: "http://www.w3.org/2000/svg",
1443
+ viewBox: "0 0 1024 1024"
1444
+ }, [createBaseVNode("path", {
1445
+ fill: "currentColor",
1446
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
1447
+ })]));
1448
+ }
1449
+ });
1450
+ var view_default = /* @__PURE__ */ defineComponent({
1451
+ name: "View",
1452
+ __name: "view",
1453
+ setup(__props) {
1454
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1455
+ xmlns: "http://www.w3.org/2000/svg",
1456
+ viewBox: "0 0 1024 1024"
1457
+ }, [createBaseVNode("path", {
1458
+ fill: "currentColor",
1459
+ d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
1460
+ })]));
1461
+ }
1462
+ });
1463
+ var warning_filled_default = /* @__PURE__ */ defineComponent({
1464
+ name: "WarningFilled",
1465
+ __name: "warning-filled",
1466
+ setup(__props) {
1467
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1468
+ xmlns: "http://www.w3.org/2000/svg",
1469
+ viewBox: "0 0 1024 1024"
1470
+ }, [createBaseVNode("path", {
1471
+ fill: "currentColor",
1472
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
1473
+ })]));
1474
+ }
1475
+ });
1476
+ var zoom_in_default = /* @__PURE__ */ defineComponent({
1477
+ name: "ZoomIn",
1478
+ __name: "zoom-in",
1479
+ setup(__props) {
1480
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1481
+ xmlns: "http://www.w3.org/2000/svg",
1482
+ viewBox: "0 0 1024 1024"
1483
+ }, [createBaseVNode("path", {
1484
+ fill: "currentColor",
1485
+ d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
1486
+ })]));
1487
+ }
1488
+ });
1489
+ init_shared_esm_bundler();
1490
+ var epPropKey = "__epPropKey";
1491
+ var definePropType = (val) => val;
1492
+ var isEpProp = (val) => isObject(val) && !!val["__epPropKey"];
1493
+ var buildProp = (prop, key) => {
1494
+ if (!isObject(prop) || isEpProp(prop)) return prop;
1495
+ const { values, required, default: defaultValue, type, validator } = prop;
1496
+ const epProp = {
1497
+ type,
1498
+ required: !!required,
1499
+ validator: values || validator ? (val) => {
1500
+ let valid = false;
1501
+ let allowedValues = [];
1502
+ if (values) {
1503
+ allowedValues = Array.from(values);
1504
+ if (hasOwn(prop, "default")) allowedValues.push(defaultValue);
1505
+ valid || (valid = allowedValues.includes(val));
1506
+ }
1507
+ if (validator) valid || (valid = validator(val));
1508
+ if (!valid && allowedValues.length > 0) {
1509
+ const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
1510
+ warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
1511
+ }
1512
+ return valid;
1513
+ } : void 0,
1514
+ [epPropKey]: true
1515
+ };
1516
+ if (hasOwn(prop, "default")) epProp.default = defaultValue;
1517
+ return epProp;
1518
+ };
1519
+ var buildProps = (props) => fromPairs_default(Object.entries(props).map(([key, option]) => [key, buildProp(option, key)]));
1520
+ var iconPropType = definePropType([
1521
+ String,
1522
+ Object,
1523
+ Function
1524
+ ]);
1525
+ var CloseComponents = { Close: close_default };
1526
+ var TypeComponents = {
1527
+ Close: close_default,
1528
+ SuccessFilled: success_filled_default,
1529
+ InfoFilled: info_filled_default,
1530
+ WarningFilled: warning_filled_default,
1531
+ CircleCloseFilled: circle_close_filled_default
1532
+ };
1533
+ var TypeComponentsMap = {
1534
+ success: success_filled_default,
1535
+ warning: warning_filled_default,
1536
+ error: circle_close_filled_default,
1537
+ info: info_filled_default
1538
+ };
1539
+ var ValidateComponentsMap = {
1540
+ validating: loading_default,
1541
+ success: circle_check_default,
1542
+ error: circle_close_default
1543
+ };
1544
+ init_shared_esm_bundler();
1545
+ var withInstall = (main, extra) => {
1546
+ main.install = (app) => {
1547
+ for (const comp of [main, ...Object.values(extra != null ? extra : {})]) app.component(comp.name, comp);
1548
+ };
1549
+ if (extra) for (const [key, comp] of Object.entries(extra)) main[key] = comp;
1550
+ return main;
1551
+ };
1552
+ var withInstallFunction = (fn, name) => {
1553
+ fn.install = (app) => {
1554
+ fn._context = app._context;
1555
+ app.config.globalProperties[name] = fn;
1556
+ };
1557
+ return fn;
1558
+ };
1559
+ var withNoopInstall = (component) => {
1560
+ component.install = NOOP;
1561
+ return component;
1562
+ };
1563
+ var EVENT_CODE = {
1564
+ tab: "Tab",
1565
+ enter: "Enter",
1566
+ space: "Space",
1567
+ left: "ArrowLeft",
1568
+ up: "ArrowUp",
1569
+ right: "ArrowRight",
1570
+ down: "ArrowDown",
1571
+ esc: "Escape",
1572
+ delete: "Delete",
1573
+ backspace: "Backspace",
1574
+ numpadEnter: "NumpadEnter",
1575
+ pageUp: "PageUp",
1576
+ pageDown: "PageDown",
1577
+ home: "Home",
1578
+ end: "End"
1579
+ };
1580
+ var datePickTypes = [
1581
+ "year",
1582
+ "month",
1583
+ "date",
1584
+ "dates",
1585
+ "week",
1586
+ "datetime",
1587
+ "datetimerange",
1588
+ "daterange",
1589
+ "monthrange"
1590
+ ];
1591
+ var UPDATE_MODEL_EVENT = "update:modelValue";
1592
+ var CHANGE_EVENT = "change";
1593
+ var INPUT_EVENT = "input";
1594
+ var componentSizes = [
1595
+ "",
1596
+ "default",
1597
+ "small",
1598
+ "large"
1599
+ ];
1600
+ var componentSizeMap = {
1601
+ large: 40,
1602
+ default: 32,
1603
+ small: 24
1604
+ };
1605
+ var isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
1606
+ init_shared_esm_bundler();
1607
+ var PatchFlags = /* @__PURE__ */ ((PatchFlags2) => {
1608
+ PatchFlags2[PatchFlags2["TEXT"] = 1] = "TEXT";
1609
+ PatchFlags2[PatchFlags2["CLASS"] = 2] = "CLASS";
1610
+ PatchFlags2[PatchFlags2["STYLE"] = 4] = "STYLE";
1611
+ PatchFlags2[PatchFlags2["PROPS"] = 8] = "PROPS";
1612
+ PatchFlags2[PatchFlags2["FULL_PROPS"] = 16] = "FULL_PROPS";
1613
+ PatchFlags2[PatchFlags2["HYDRATE_EVENTS"] = 32] = "HYDRATE_EVENTS";
1614
+ PatchFlags2[PatchFlags2["STABLE_FRAGMENT"] = 64] = "STABLE_FRAGMENT";
1615
+ PatchFlags2[PatchFlags2["KEYED_FRAGMENT"] = 128] = "KEYED_FRAGMENT";
1616
+ PatchFlags2[PatchFlags2["UNKEYED_FRAGMENT"] = 256] = "UNKEYED_FRAGMENT";
1617
+ PatchFlags2[PatchFlags2["NEED_PATCH"] = 512] = "NEED_PATCH";
1618
+ PatchFlags2[PatchFlags2["DYNAMIC_SLOTS"] = 1024] = "DYNAMIC_SLOTS";
1619
+ PatchFlags2[PatchFlags2["HOISTED"] = -1] = "HOISTED";
1620
+ PatchFlags2[PatchFlags2["BAIL"] = -2] = "BAIL";
1621
+ return PatchFlags2;
1622
+ })(PatchFlags || {});
1623
+ var flattedChildren = (children) => {
1624
+ const vNodes = isArray(children) ? children : [children];
1625
+ const result = [];
1626
+ vNodes.forEach((child) => {
1627
+ var _a$1;
1628
+ if (isArray(child)) result.push(...flattedChildren(child));
1629
+ else if (isVNode(child) && isArray(child.children)) result.push(...flattedChildren(child.children));
1630
+ else {
1631
+ result.push(child);
1632
+ if (isVNode(child) && ((_a$1 = child.component) == null ? void 0 : _a$1.subTree)) result.push(...flattedChildren(child.component.subTree));
1633
+ }
1634
+ });
1635
+ return result;
1636
+ };
1637
+ var isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
1638
+ var mutable = (val) => val;
1639
+ var DEFAULT_EXCLUDE_KEYS = ["class", "style"];
1640
+ var LISTENER_PREFIX = /^on[A-Z]/;
1641
+ var useAttrs$1 = (params = {}) => {
1642
+ const { excludeListeners = false, excludeKeys } = params;
1643
+ const allExcludeKeys = computed(() => {
1644
+ return ((excludeKeys == null ? void 0 : excludeKeys.value) || []).concat(DEFAULT_EXCLUDE_KEYS);
1645
+ });
1646
+ const instance = getCurrentInstance();
1647
+ if (!instance) {
1648
+ debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
1649
+ return computed(() => ({}));
1650
+ }
1651
+ return computed(() => {
1652
+ var _a$1;
1653
+ 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))));
1654
+ });
1655
+ };
1656
+ var useDeprecated = ({ from, replacement, scope, version: version$1, ref: ref$1, type = "API" }, condition) => {
1657
+ watch(() => unref(condition), (val) => {
1658
+ if (val) debugWarn(scope, `[${type}] ${from} is about to be deprecated in version ${version$1}, please use ${replacement} instead.
1659
+ For more detail, please visit: ${ref$1}
1660
+ `);
1661
+ }, { immediate: true });
1662
+ };
1663
+ var English = {
1664
+ name: "en",
1665
+ el: {
1666
+ colorpicker: {
1667
+ confirm: "OK",
1668
+ clear: "Clear",
1669
+ defaultLabel: "color picker",
1670
+ description: "current color is {color}. press enter to select a new color."
1671
+ },
1672
+ datepicker: {
1673
+ now: "Now",
1674
+ today: "Today",
1675
+ cancel: "Cancel",
1676
+ clear: "Clear",
1677
+ confirm: "OK",
1678
+ dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
1679
+ monthTablePrompt: "Use the arrow keys and enter to select the month",
1680
+ yearTablePrompt: "Use the arrow keys and enter to select the year",
1681
+ selectedDate: "Selected date",
1682
+ selectDate: "Select date",
1683
+ selectTime: "Select time",
1684
+ startDate: "Start Date",
1685
+ startTime: "Start Time",
1686
+ endDate: "End Date",
1687
+ endTime: "End Time",
1688
+ prevYear: "Previous Year",
1689
+ nextYear: "Next Year",
1690
+ prevMonth: "Previous Month",
1691
+ nextMonth: "Next Month",
1692
+ year: "",
1693
+ month1: "January",
1694
+ month2: "February",
1695
+ month3: "March",
1696
+ month4: "April",
1697
+ month5: "May",
1698
+ month6: "June",
1699
+ month7: "July",
1700
+ month8: "August",
1701
+ month9: "September",
1702
+ month10: "October",
1703
+ month11: "November",
1704
+ month12: "December",
1705
+ week: "week",
1706
+ weeks: {
1707
+ sun: "Sun",
1708
+ mon: "Mon",
1709
+ tue: "Tue",
1710
+ wed: "Wed",
1711
+ thu: "Thu",
1712
+ fri: "Fri",
1713
+ sat: "Sat"
1714
+ },
1715
+ weeksFull: {
1716
+ sun: "Sunday",
1717
+ mon: "Monday",
1718
+ tue: "Tuesday",
1719
+ wed: "Wednesday",
1720
+ thu: "Thursday",
1721
+ fri: "Friday",
1722
+ sat: "Saturday"
1723
+ },
1724
+ months: {
1725
+ jan: "Jan",
1726
+ feb: "Feb",
1727
+ mar: "Mar",
1728
+ apr: "Apr",
1729
+ may: "May",
1730
+ jun: "Jun",
1731
+ jul: "Jul",
1732
+ aug: "Aug",
1733
+ sep: "Sep",
1734
+ oct: "Oct",
1735
+ nov: "Nov",
1736
+ dec: "Dec"
1737
+ }
1738
+ },
1739
+ inputNumber: {
1740
+ decrease: "decrease number",
1741
+ increase: "increase number"
1742
+ },
1743
+ select: {
1744
+ loading: "Loading",
1745
+ noMatch: "No matching data",
1746
+ noData: "No data",
1747
+ placeholder: "Select"
1748
+ },
1749
+ dropdown: { toggleDropdown: "Toggle Dropdown" },
1750
+ cascader: {
1751
+ noMatch: "No matching data",
1752
+ loading: "Loading",
1753
+ placeholder: "Select",
1754
+ noData: "No data"
1755
+ },
1756
+ pagination: {
1757
+ goto: "Go to",
1758
+ pagesize: "/page",
1759
+ total: "Total {total}",
1760
+ pageClassifier: "",
1761
+ page: "Page",
1762
+ prev: "Go to previous page",
1763
+ next: "Go to next page",
1764
+ currentPage: "page {pager}",
1765
+ prevPages: "Previous {pager} pages",
1766
+ nextPages: "Next {pager} pages",
1767
+ deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
1768
+ },
1769
+ dialog: { close: "Close this dialog" },
1770
+ drawer: { close: "Close this dialog" },
1771
+ messagebox: {
1772
+ title: "Message",
1773
+ confirm: "OK",
1774
+ cancel: "Cancel",
1775
+ error: "Illegal input",
1776
+ close: "Close this dialog"
1777
+ },
1778
+ upload: {
1779
+ deleteTip: "press delete to remove",
1780
+ delete: "Delete",
1781
+ preview: "Preview",
1782
+ continue: "Continue"
1783
+ },
1784
+ slider: {
1785
+ defaultLabel: "slider between {min} and {max}",
1786
+ defaultRangeStartLabel: "pick start value",
1787
+ defaultRangeEndLabel: "pick end value"
1788
+ },
1789
+ table: {
1790
+ emptyText: "No Data",
1791
+ confirmFilter: "Confirm",
1792
+ resetFilter: "Reset",
1793
+ clearFilter: "All",
1794
+ sumText: "Sum"
1795
+ },
1796
+ tree: { emptyText: "No Data" },
1797
+ transfer: {
1798
+ noMatch: "No matching data",
1799
+ noData: "No data",
1800
+ titles: ["List 1", "List 2"],
1801
+ filterPlaceholder: "Enter keyword",
1802
+ noCheckedFormat: "{total} items",
1803
+ hasCheckedFormat: "{checked}/{total} checked"
1804
+ },
1805
+ image: { error: "FAILED" },
1806
+ pageHeader: { title: "Back" },
1807
+ popconfirm: {
1808
+ confirmButtonText: "Yes",
1809
+ cancelButtonText: "No"
1810
+ }
1811
+ }
1812
+ };
1813
+ var buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
1814
+ var translate = (path, option, locale) => get_default(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
1815
+ var _a$1;
1816
+ return `${(_a$1 = option == null ? void 0 : option[key]) != null ? _a$1 : `{${key}}`}`;
1817
+ });
1818
+ var buildLocaleContext = (locale) => {
1819
+ return {
1820
+ lang: computed(() => unref(locale).name),
1821
+ locale: isRef(locale) ? locale : ref(locale),
1822
+ t: buildTranslator(locale)
1823
+ };
1824
+ };
1825
+ var localeContextKey = Symbol("localeContextKey");
1826
+ var useLocale = (localeOverrides) => {
1827
+ const locale = localeOverrides || inject(localeContextKey, ref());
1828
+ return buildLocaleContext(computed(() => locale.value || English));
1829
+ };
1830
+ var defaultNamespace = "el";
1831
+ var statePrefix = "is-";
1832
+ var _bem = (namespace, block, blockSuffix, element, modifier) => {
1833
+ let cls = `${namespace}-${block}`;
1834
+ if (blockSuffix) cls += `-${blockSuffix}`;
1835
+ if (element) cls += `__${element}`;
1836
+ if (modifier) cls += `--${modifier}`;
1837
+ return cls;
1838
+ };
1839
+ var namespaceContextKey = Symbol("namespaceContextKey");
1840
+ var useGetDerivedNamespace = (namespaceOverrides) => {
1841
+ const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref("el")) : ref("el"));
1842
+ return computed(() => {
1843
+ return unref(derivedNamespace) || "el";
1844
+ });
1845
+ };
1846
+ var useNamespace = (block, namespaceOverrides) => {
1847
+ const namespace = useGetDerivedNamespace(namespaceOverrides);
1848
+ const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
1849
+ const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
1850
+ const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
1851
+ const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
1852
+ const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
1853
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
1854
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
1855
+ const is = (name, ...args) => {
1856
+ const state = args.length >= 1 ? args[0] : true;
1857
+ return name && state ? `${statePrefix}${name}` : "";
1858
+ };
1859
+ const cssVar = (object) => {
1860
+ const styles = {};
1861
+ for (const key in object) if (object[key]) styles[`--${namespace.value}-${key}`] = object[key];
1862
+ return styles;
1863
+ };
1864
+ const cssVarBlock = (object) => {
1865
+ const styles = {};
1866
+ for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${key}`] = object[key];
1867
+ return styles;
1868
+ };
1869
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
1870
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
1871
+ return {
1872
+ namespace,
1873
+ b,
1874
+ e,
1875
+ m,
1876
+ be,
1877
+ em,
1878
+ bm,
1879
+ bem,
1880
+ is,
1881
+ cssVar,
1882
+ cssVarName,
1883
+ cssVarBlock,
1884
+ cssVarBlockName
1885
+ };
1886
+ };
1887
+ var useProp = (name) => {
1888
+ const vm = getCurrentInstance();
1889
+ return computed(() => {
1890
+ var _a$1, _b;
1891
+ return (_b = (_a$1 = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a$1.$props) == null ? void 0 : _b[name];
1892
+ });
1893
+ };
1894
+ var defaultIdInjection = {
1895
+ prefix: Math.floor(Math.random() * 1e4),
1896
+ current: 0
1897
+ };
1898
+ var ID_INJECTION_KEY = Symbol("elIdInjection");
1899
+ var useIdInjection = () => {
1900
+ return getCurrentInstance() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
1901
+ };
1902
+ var useId = (deterministicId) => {
1903
+ const idInjection = useIdInjection();
1904
+ 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
1905
+ usage: app.provide(ID_INJECTION_KEY, {
1906
+ prefix: number,
1907
+ current: number,
1908
+ })`);
1909
+ const namespace = useGetDerivedNamespace();
1910
+ return computed(() => unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
1911
+ };
1912
+ var registeredEscapeHandlers = [];
1913
+ var cachedHandler = (e) => {
1914
+ const event = e;
1915
+ if (event.key === EVENT_CODE.esc) registeredEscapeHandlers.forEach((registeredHandler) => registeredHandler(event));
1916
+ };
1917
+ var useEscapeKeydown = (handler) => {
1918
+ onMounted(() => {
1919
+ if (registeredEscapeHandlers.length === 0) document.addEventListener("keydown", cachedHandler);
1920
+ if (isClient) registeredEscapeHandlers.push(handler);
1921
+ });
1922
+ onBeforeUnmount(() => {
1923
+ registeredEscapeHandlers = registeredEscapeHandlers.filter((registeredHandler) => registeredHandler !== handler);
1924
+ if (registeredEscapeHandlers.length === 0) {
1925
+ if (isClient) document.removeEventListener("keydown", cachedHandler);
1926
+ }
1927
+ });
1928
+ };
1929
+ var zIndex = ref(0);
1930
+ var defaultInitialZIndex = 2e3;
1931
+ var zIndexContextKey = Symbol("zIndexContextKey");
1932
+ var useZIndex = (zIndexOverrides) => {
1933
+ const zIndexInjection = zIndexOverrides || (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0);
1934
+ const initialZIndex = computed(() => {
1935
+ const zIndexFromInjection = unref(zIndexInjection);
1936
+ return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
1937
+ });
1938
+ const currentZIndex = computed(() => initialZIndex.value + zIndex.value);
1939
+ const nextZIndex = () => {
1940
+ zIndex.value++;
1941
+ return currentZIndex.value;
1942
+ };
1943
+ return {
1944
+ initialZIndex,
1945
+ currentZIndex,
1946
+ nextZIndex
1947
+ };
1948
+ };
1949
+ function useCursor(input) {
1950
+ const selectionRef = ref();
1951
+ function recordCursor() {
1952
+ if (input.value == void 0) return;
1953
+ const { selectionStart, selectionEnd, value } = input.value;
1954
+ if (selectionStart == null || selectionEnd == null) return;
1955
+ selectionRef.value = {
1956
+ selectionStart,
1957
+ selectionEnd,
1958
+ value,
1959
+ beforeTxt: value.slice(0, Math.max(0, selectionStart)),
1960
+ afterTxt: value.slice(Math.max(0, selectionEnd))
1961
+ };
1962
+ }
1963
+ function setCursor() {
1964
+ if (input.value == void 0 || selectionRef.value == void 0) return;
1965
+ const { value } = input.value;
1966
+ const { beforeTxt, afterTxt, selectionStart } = selectionRef.value;
1967
+ if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0) return;
1968
+ let startPos = value.length;
1969
+ if (value.endsWith(afterTxt)) startPos = value.length - afterTxt.length;
1970
+ else if (value.startsWith(beforeTxt)) startPos = beforeTxt.length;
1971
+ else {
1972
+ const beforeLastChar = beforeTxt[selectionStart - 1];
1973
+ const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
1974
+ if (newIndex !== -1) startPos = newIndex + 1;
1975
+ }
1976
+ input.value.setSelectionRange(startPos, startPos);
1977
+ }
1978
+ return [recordCursor, setCursor];
1979
+ }
1980
+ var useSizeProp = buildProp({
1981
+ type: String,
1982
+ values: componentSizes,
1983
+ required: false
1984
+ });
1985
+ var SIZE_INJECTION_KEY = Symbol("size");
1986
+ var useGlobalSize = () => {
1987
+ const injectedSize = inject(SIZE_INJECTION_KEY, {});
1988
+ return computed(() => {
1989
+ return unref(injectedSize.size) || "";
1990
+ });
1991
+ };
1992
+ init_shared_esm_bundler();
1993
+ function useFocusController(target, { afterFocus, beforeBlur, afterBlur } = {}) {
1994
+ const { emit } = getCurrentInstance();
1995
+ const wrapperRef = shallowRef();
1996
+ const isFocused = ref(false);
1997
+ const handleFocus = (event) => {
1998
+ if (isFocused.value) return;
1999
+ isFocused.value = true;
2000
+ emit("focus", event);
2001
+ afterFocus?.();
2002
+ };
2003
+ const handleBlur = (event) => {
2004
+ var _a$1;
2005
+ if ((isFunction(beforeBlur) ? beforeBlur(event) : false) || event.relatedTarget && ((_a$1 = wrapperRef.value) == null ? void 0 : _a$1.contains(event.relatedTarget))) return;
2006
+ isFocused.value = false;
2007
+ emit("blur", event);
2008
+ afterBlur?.();
2009
+ };
2010
+ const handleClick = () => {
2011
+ var _a$1;
2012
+ (_a$1 = target.value) == null || _a$1.focus();
2013
+ };
2014
+ watch(wrapperRef, (el) => {
2015
+ if (el) el.setAttribute("tabindex", "-1");
2016
+ });
2017
+ useEventListener(wrapperRef, "click", handleClick);
2018
+ return {
2019
+ wrapperRef,
2020
+ isFocused,
2021
+ handleFocus,
2022
+ handleBlur
2023
+ };
2024
+ }
2025
+ var configProviderContextKey = Symbol();
2026
+ var globalConfig = ref();
2027
+ function useGlobalConfig(key, defaultValue = void 0) {
2028
+ const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
2029
+ if (key) return computed(() => {
2030
+ var _a$1, _b;
2031
+ return (_b = (_a$1 = config.value) == null ? void 0 : _a$1[key]) != null ? _b : defaultValue;
2032
+ });
2033
+ else return config;
2034
+ }
2035
+ function useGlobalComponentSettings(block, sizeFallback) {
2036
+ const config = useGlobalConfig();
2037
+ const ns = useNamespace(block, computed(() => {
2038
+ var _a$1;
2039
+ return ((_a$1 = config.value) == null ? void 0 : _a$1.namespace) || "el";
2040
+ }));
2041
+ const locale = useLocale(computed(() => {
2042
+ var _a$1;
2043
+ return (_a$1 = config.value) == null ? void 0 : _a$1.locale;
2044
+ }));
2045
+ const zIndex$1 = useZIndex(computed(() => {
2046
+ var _a$1;
2047
+ return ((_a$1 = config.value) == null ? void 0 : _a$1.zIndex) || 2e3;
2048
+ }));
2049
+ const size = computed(() => {
2050
+ var _a$1;
2051
+ return unref(sizeFallback) || ((_a$1 = config.value) == null ? void 0 : _a$1.size) || "";
2052
+ });
2053
+ provideGlobalConfig(computed(() => unref(config) || {}));
2054
+ return {
2055
+ ns,
2056
+ locale,
2057
+ zIndex: zIndex$1,
2058
+ size
2059
+ };
2060
+ }
2061
+ var provideGlobalConfig = (config, app, global$1 = false) => {
2062
+ var _a$1;
2063
+ const inSetup = !!getCurrentInstance();
2064
+ const oldConfig = inSetup ? useGlobalConfig() : void 0;
2065
+ const provideFn = (_a$1 = app == null ? void 0 : app.provide) != null ? _a$1 : inSetup ? provide : void 0;
2066
+ if (!provideFn) {
2067
+ debugWarn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
2068
+ return;
2069
+ }
2070
+ const context = computed(() => {
2071
+ const cfg = unref(config);
2072
+ if (!(oldConfig == null ? void 0 : oldConfig.value)) return cfg;
2073
+ return mergeConfig(oldConfig.value, cfg);
2074
+ });
2075
+ provideFn(configProviderContextKey, context);
2076
+ provideFn(localeContextKey, computed(() => context.value.locale));
2077
+ provideFn(namespaceContextKey, computed(() => context.value.namespace));
2078
+ provideFn(zIndexContextKey, computed(() => context.value.zIndex));
2079
+ provideFn(SIZE_INJECTION_KEY, { size: computed(() => context.value.size || "") });
2080
+ if (global$1 || !globalConfig.value) globalConfig.value = context.value;
2081
+ return context;
2082
+ };
2083
+ var mergeConfig = (a, b) => {
2084
+ var _a$1;
2085
+ const keys = [.../* @__PURE__ */ new Set([...keysOf(a), ...keysOf(b)])];
2086
+ const obj = {};
2087
+ for (const key of keys) obj[key] = (_a$1 = b[key]) != null ? _a$1 : a[key];
2088
+ return obj;
2089
+ };
2090
+ var _export_sfc = (sfc, props) => {
2091
+ const target = sfc.__vccOpts || sfc;
2092
+ for (const [key, val] of props) target[key] = val;
2093
+ return target;
2094
+ };
2095
+ var iconProps = buildProps({
2096
+ size: { type: definePropType([Number, String]) },
2097
+ color: { type: String }
2098
+ });
2099
+ var ElIcon = withInstall(/* @__PURE__ */ _export_sfc(/* @__PURE__ */ defineComponent({
2100
+ ...defineComponent({
2101
+ name: "ElIcon",
2102
+ inheritAttrs: false
2103
+ }),
2104
+ props: iconProps,
2105
+ setup(__props) {
2106
+ const props = __props;
2107
+ const ns = useNamespace("icon");
2108
+ const style = computed(() => {
2109
+ const { size, color } = props;
2110
+ if (!size && !color) return {};
2111
+ return {
2112
+ fontSize: isUndefined(size) ? void 0 : addUnit(size),
2113
+ "--color": color
2114
+ };
2115
+ });
2116
+ return (_ctx, _cache) => {
2117
+ return openBlock(), createElementBlock("i", mergeProps({
2118
+ class: unref(ns).b(),
2119
+ style: unref(style)
2120
+ }, _ctx.$attrs), [renderSlot(_ctx.$slots, "default")], 16);
2121
+ };
2122
+ }
2123
+ }), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]));
2124
+ var formContextKey = Symbol("formContextKey");
2125
+ var formItemContextKey = Symbol("formItemContextKey");
2126
+ var useFormSize = (fallback, ignore = {}) => {
2127
+ const emptyRef = ref(void 0);
2128
+ const size = ignore.prop ? emptyRef : useProp("size");
2129
+ const globalConfig$1 = ignore.global ? emptyRef : useGlobalSize();
2130
+ const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
2131
+ const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
2132
+ return computed(() => size.value || unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig$1.value || "");
2133
+ };
2134
+ var useFormDisabled = (fallback) => {
2135
+ const disabled = useProp("disabled");
2136
+ const form = inject(formContextKey, void 0);
2137
+ return computed(() => disabled.value || unref(fallback) || (form == null ? void 0 : form.disabled) || false);
2138
+ };
2139
+ var useFormItem = () => {
2140
+ return {
2141
+ form: inject(formContextKey, void 0),
2142
+ formItem: inject(formItemContextKey, void 0)
2143
+ };
2144
+ };
2145
+ var useFormItemInputId = (props, { formItemContext, disableIdGeneration, disableIdManagement }) => {
2146
+ if (!disableIdGeneration) disableIdGeneration = ref(false);
2147
+ if (!disableIdManagement) disableIdManagement = ref(false);
2148
+ const inputId = ref();
2149
+ let idUnwatch = void 0;
2150
+ const isLabeledByFormItem = computed(() => {
2151
+ var _a$1;
2152
+ return !!(!props.label && formItemContext && formItemContext.inputIds && ((_a$1 = formItemContext.inputIds) == null ? void 0 : _a$1.length) <= 1);
2153
+ });
2154
+ onMounted(() => {
2155
+ idUnwatch = watch([toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration2]) => {
2156
+ const newId = id != null ? id : !disableIdGeneration2 ? useId().value : void 0;
2157
+ if (newId !== inputId.value) {
2158
+ if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
2159
+ inputId.value && formItemContext.removeInputId(inputId.value);
2160
+ if (!(disableIdManagement == null ? void 0 : disableIdManagement.value) && !disableIdGeneration2 && newId) formItemContext.addInputId(newId);
2161
+ }
2162
+ inputId.value = newId;
2163
+ }
2164
+ }, { immediate: true });
2165
+ });
2166
+ onUnmounted(() => {
2167
+ idUnwatch && idUnwatch();
2168
+ if (formItemContext == null ? void 0 : formItemContext.removeInputId) inputId.value && formItemContext.removeInputId(inputId.value);
2169
+ });
2170
+ return {
2171
+ isLabeledByFormItem,
2172
+ inputId
2173
+ };
2174
+ };
2175
+ var hiddenTextarea = void 0;
2176
+ var HIDDEN_STYLE = `
2177
+ height:0 !important;
2178
+ visibility:hidden !important;
2179
+ ${isFirefox() ? "" : "overflow:hidden !important;"}
2180
+ position:absolute !important;
2181
+ z-index:-1000 !important;
2182
+ top:0 !important;
2183
+ right:0 !important;
2184
+ `;
2185
+ var CONTEXT_STYLE = [
2186
+ "letter-spacing",
2187
+ "line-height",
2188
+ "padding-top",
2189
+ "padding-bottom",
2190
+ "font-family",
2191
+ "font-weight",
2192
+ "font-size",
2193
+ "text-rendering",
2194
+ "text-transform",
2195
+ "width",
2196
+ "text-indent",
2197
+ "padding-left",
2198
+ "padding-right",
2199
+ "border-width",
2200
+ "box-sizing"
2201
+ ];
2202
+ function calculateNodeStyling(targetElement) {
2203
+ const style = window.getComputedStyle(targetElement);
2204
+ const boxSizing = style.getPropertyValue("box-sizing");
2205
+ const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
2206
+ const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
2207
+ return {
2208
+ contextStyle: CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(";"),
2209
+ paddingSize,
2210
+ borderSize,
2211
+ boxSizing
2212
+ };
2213
+ }
2214
+ function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
2215
+ var _a$1;
2216
+ if (!hiddenTextarea) {
2217
+ hiddenTextarea = document.createElement("textarea");
2218
+ document.body.appendChild(hiddenTextarea);
2219
+ }
2220
+ const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
2221
+ hiddenTextarea.setAttribute("style", `${contextStyle};${HIDDEN_STYLE}`);
2222
+ hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
2223
+ let height = hiddenTextarea.scrollHeight;
2224
+ const result = {};
2225
+ if (boxSizing === "border-box") height = height + borderSize;
2226
+ else if (boxSizing === "content-box") height = height - paddingSize;
2227
+ hiddenTextarea.value = "";
2228
+ const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
2229
+ if (isNumber(minRows)) {
2230
+ let minHeight = singleRowHeight * minRows;
2231
+ if (boxSizing === "border-box") minHeight = minHeight + paddingSize + borderSize;
2232
+ height = Math.max(minHeight, height);
2233
+ result.minHeight = `${minHeight}px`;
2234
+ }
2235
+ if (isNumber(maxRows)) {
2236
+ let maxHeight = singleRowHeight * maxRows;
2237
+ if (boxSizing === "border-box") maxHeight = maxHeight + paddingSize + borderSize;
2238
+ height = Math.min(maxHeight, height);
2239
+ }
2240
+ result.height = `${height}px`;
2241
+ (_a$1 = hiddenTextarea.parentNode) == null || _a$1.removeChild(hiddenTextarea);
2242
+ hiddenTextarea = void 0;
2243
+ return result;
2244
+ }
2245
+ init_shared_esm_bundler();
2246
+ var inputProps = buildProps({
2247
+ id: {
2248
+ type: String,
2249
+ default: void 0
2250
+ },
2251
+ size: useSizeProp,
2252
+ disabled: Boolean,
2253
+ modelValue: {
2254
+ type: definePropType([
2255
+ String,
2256
+ Number,
2257
+ Object
2258
+ ]),
2259
+ default: ""
2260
+ },
2261
+ type: {
2262
+ type: String,
2263
+ default: "text"
2264
+ },
2265
+ resize: {
2266
+ type: String,
2267
+ values: [
2268
+ "none",
2269
+ "both",
2270
+ "horizontal",
2271
+ "vertical"
2272
+ ]
2273
+ },
2274
+ autosize: {
2275
+ type: definePropType([Boolean, Object]),
2276
+ default: false
2277
+ },
2278
+ autocomplete: {
2279
+ type: String,
2280
+ default: "off"
2281
+ },
2282
+ formatter: { type: Function },
2283
+ parser: { type: Function },
2284
+ placeholder: { type: String },
2285
+ form: { type: String },
2286
+ readonly: {
2287
+ type: Boolean,
2288
+ default: false
2289
+ },
2290
+ clearable: {
2291
+ type: Boolean,
2292
+ default: false
2293
+ },
2294
+ showPassword: {
2295
+ type: Boolean,
2296
+ default: false
2297
+ },
2298
+ showWordLimit: {
2299
+ type: Boolean,
2300
+ default: false
2301
+ },
2302
+ suffixIcon: { type: iconPropType },
2303
+ prefixIcon: { type: iconPropType },
2304
+ containerRole: {
2305
+ type: String,
2306
+ default: void 0
2307
+ },
2308
+ label: {
2309
+ type: String,
2310
+ default: void 0
2311
+ },
2312
+ tabindex: {
2313
+ type: [String, Number],
2314
+ default: 0
2315
+ },
2316
+ validateEvent: {
2317
+ type: Boolean,
2318
+ default: true
2319
+ },
2320
+ inputStyle: {
2321
+ type: definePropType([
2322
+ Object,
2323
+ Array,
2324
+ String
2325
+ ]),
2326
+ default: () => mutable({})
2327
+ },
2328
+ autofocus: {
2329
+ type: Boolean,
2330
+ default: false
2331
+ }
2332
+ });
2333
+ var inputEmits = {
2334
+ [UPDATE_MODEL_EVENT]: (value) => isString(value),
2335
+ input: (value) => isString(value),
2336
+ change: (value) => isString(value),
2337
+ focus: (evt) => evt instanceof FocusEvent,
2338
+ blur: (evt) => evt instanceof FocusEvent,
2339
+ clear: () => true,
2340
+ mouseleave: (evt) => evt instanceof MouseEvent,
2341
+ mouseenter: (evt) => evt instanceof MouseEvent,
2342
+ keydown: (evt) => evt instanceof Event,
2343
+ compositionstart: (evt) => evt instanceof CompositionEvent,
2344
+ compositionupdate: (evt) => evt instanceof CompositionEvent,
2345
+ compositionend: (evt) => evt instanceof CompositionEvent
2346
+ };
2347
+ init_shared_esm_bundler();
2348
+ var _hoisted_1 = ["role"];
2349
+ var _hoisted_2 = [
2350
+ "id",
2351
+ "type",
2352
+ "disabled",
2353
+ "formatter",
2354
+ "parser",
2355
+ "readonly",
2356
+ "autocomplete",
2357
+ "tabindex",
2358
+ "aria-label",
2359
+ "placeholder",
2360
+ "form",
2361
+ "autofocus"
2362
+ ];
2363
+ var _hoisted_3 = [
2364
+ "id",
2365
+ "tabindex",
2366
+ "disabled",
2367
+ "readonly",
2368
+ "autocomplete",
2369
+ "aria-label",
2370
+ "placeholder",
2371
+ "form",
2372
+ "autofocus"
2373
+ ];
2374
+ var ElInput = withInstall(/* @__PURE__ */ _export_sfc(/* @__PURE__ */ defineComponent({
2375
+ ...defineComponent({
2376
+ name: "ElInput",
2377
+ inheritAttrs: false
2378
+ }),
2379
+ props: inputProps,
2380
+ emits: inputEmits,
2381
+ setup(__props, { expose, emit }) {
2382
+ const props = __props;
2383
+ const rawAttrs = useAttrs();
2384
+ const slots = useSlots();
2385
+ const containerAttrs = computed(() => {
2386
+ const comboBoxAttrs = {};
2387
+ if (props.containerRole === "combobox") {
2388
+ comboBoxAttrs["aria-haspopup"] = rawAttrs["aria-haspopup"];
2389
+ comboBoxAttrs["aria-owns"] = rawAttrs["aria-owns"];
2390
+ comboBoxAttrs["aria-expanded"] = rawAttrs["aria-expanded"];
2391
+ }
2392
+ return comboBoxAttrs;
2393
+ });
2394
+ const containerKls = computed(() => [
2395
+ props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
2396
+ nsInput.m(inputSize.value),
2397
+ nsInput.is("disabled", inputDisabled.value),
2398
+ nsInput.is("exceed", inputExceed.value),
2399
+ {
2400
+ [nsInput.b("group")]: slots.prepend || slots.append,
2401
+ [nsInput.bm("group", "append")]: slots.append,
2402
+ [nsInput.bm("group", "prepend")]: slots.prepend,
2403
+ [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
2404
+ [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
2405
+ [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value
2406
+ },
2407
+ rawAttrs.class
2408
+ ]);
2409
+ const wrapperKls = computed(() => [nsInput.e("wrapper"), nsInput.is("focus", isFocused.value)]);
2410
+ const attrs = useAttrs$1({ excludeKeys: computed(() => {
2411
+ return Object.keys(containerAttrs.value);
2412
+ }) });
2413
+ const { form, formItem } = useFormItem();
2414
+ const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
2415
+ const inputSize = useFormSize();
2416
+ const inputDisabled = useFormDisabled();
2417
+ const nsInput = useNamespace("input");
2418
+ const nsTextarea = useNamespace("textarea");
2419
+ const input = shallowRef();
2420
+ const textarea = shallowRef();
2421
+ const hovering = ref(false);
2422
+ const isComposing = ref(false);
2423
+ const passwordVisible = ref(false);
2424
+ const countStyle = ref();
2425
+ const textareaCalcStyle = shallowRef(props.inputStyle);
2426
+ const _ref = computed(() => input.value || textarea.value);
2427
+ const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(_ref, { afterBlur() {
2428
+ var _a$1;
2429
+ if (props.validateEvent) (_a$1 = formItem == null ? void 0 : formItem.validate) == null || _a$1.call(formItem, "blur").catch((err) => debugWarn(err));
2430
+ } });
2431
+ const needStatusIcon = computed(() => {
2432
+ var _a$1;
2433
+ return (_a$1 = form == null ? void 0 : form.statusIcon) != null ? _a$1 : false;
2434
+ });
2435
+ const validateState = computed(() => (formItem == null ? void 0 : formItem.validateState) || "");
2436
+ const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
2437
+ const passwordIcon = computed(() => passwordVisible.value ? view_default : hide_default);
2438
+ const containerStyle = computed(() => [rawAttrs.style, props.inputStyle]);
2439
+ const textareaStyle = computed(() => [
2440
+ props.inputStyle,
2441
+ textareaCalcStyle.value,
2442
+ { resize: props.resize }
2443
+ ]);
2444
+ const nativeInputValue = computed(() => isNil_default(props.modelValue) ? "" : String(props.modelValue));
2445
+ const showClear = computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (isFocused.value || hovering.value));
2446
+ const showPwdVisible = computed(() => props.showPassword && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (!!nativeInputValue.value || isFocused.value));
2447
+ const isWordLimitVisible = computed(() => props.showWordLimit && !!attrs.value.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
2448
+ const textLength = computed(() => nativeInputValue.value.length);
2449
+ const inputExceed = computed(() => !!isWordLimitVisible.value && textLength.value > Number(attrs.value.maxlength));
2450
+ const suffixVisible = computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
2451
+ const [recordCursor, setCursor] = useCursor(input);
2452
+ useResizeObserver(textarea, (entries) => {
2453
+ onceInitSizeTextarea();
2454
+ if (!isWordLimitVisible.value || props.resize !== "both") return;
2455
+ const { width } = entries[0].contentRect;
2456
+ countStyle.value = { right: `calc(100% - ${width + 15 + 6}px)` };
2457
+ });
2458
+ const resizeTextarea = () => {
2459
+ const { type, autosize } = props;
2460
+ if (!isClient || type !== "textarea" || !textarea.value) return;
2461
+ if (autosize) {
2462
+ const minRows = isObject(autosize) ? autosize.minRows : void 0;
2463
+ const maxRows = isObject(autosize) ? autosize.maxRows : void 0;
2464
+ const textareaStyle2 = calcTextareaHeight(textarea.value, minRows, maxRows);
2465
+ textareaCalcStyle.value = {
2466
+ overflowY: "hidden",
2467
+ ...textareaStyle2
2468
+ };
2469
+ nextTick(() => {
2470
+ textarea.value.offsetHeight;
2471
+ textareaCalcStyle.value = textareaStyle2;
2472
+ });
2473
+ } else textareaCalcStyle.value = { minHeight: calcTextareaHeight(textarea.value).minHeight };
2474
+ };
2475
+ const createOnceInitResize = (resizeTextarea2) => {
2476
+ let isInit = false;
2477
+ return () => {
2478
+ var _a$1;
2479
+ if (isInit || !props.autosize) return;
2480
+ if (!(((_a$1 = textarea.value) == null ? void 0 : _a$1.offsetParent) === null)) {
2481
+ resizeTextarea2();
2482
+ isInit = true;
2483
+ }
2484
+ };
2485
+ };
2486
+ const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
2487
+ const setNativeInputValue = () => {
2488
+ const input2 = _ref.value;
2489
+ const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
2490
+ if (!input2 || input2.value === formatterValue) return;
2491
+ input2.value = formatterValue;
2492
+ };
2493
+ const handleInput = async (event) => {
2494
+ recordCursor();
2495
+ let { value } = event.target;
2496
+ if (props.formatter) value = props.parser ? props.parser(value) : value;
2497
+ if (isComposing.value) return;
2498
+ if (value === nativeInputValue.value) {
2499
+ setNativeInputValue();
2500
+ return;
2501
+ }
2502
+ emit(UPDATE_MODEL_EVENT, value);
2503
+ emit("input", value);
2504
+ await nextTick();
2505
+ setNativeInputValue();
2506
+ setCursor();
2507
+ };
2508
+ const handleChange = (event) => {
2509
+ emit("change", event.target.value);
2510
+ };
2511
+ const handleCompositionStart = (event) => {
2512
+ emit("compositionstart", event);
2513
+ isComposing.value = true;
2514
+ };
2515
+ const handleCompositionUpdate = (event) => {
2516
+ var _a$1;
2517
+ emit("compositionupdate", event);
2518
+ const text = (_a$1 = event.target) == null ? void 0 : _a$1.value;
2519
+ isComposing.value = !isKorean(text[text.length - 1] || "");
2520
+ };
2521
+ const handleCompositionEnd = (event) => {
2522
+ emit("compositionend", event);
2523
+ if (isComposing.value) {
2524
+ isComposing.value = false;
2525
+ handleInput(event);
2526
+ }
2527
+ };
2528
+ const handlePasswordVisible = () => {
2529
+ passwordVisible.value = !passwordVisible.value;
2530
+ focus();
2531
+ };
2532
+ const focus = async () => {
2533
+ var _a$1;
2534
+ await nextTick();
2535
+ (_a$1 = _ref.value) == null || _a$1.focus();
2536
+ };
2537
+ const blur = () => {
2538
+ var _a$1;
2539
+ return (_a$1 = _ref.value) == null ? void 0 : _a$1.blur();
2540
+ };
2541
+ const handleMouseLeave = (evt) => {
2542
+ hovering.value = false;
2543
+ emit("mouseleave", evt);
2544
+ };
2545
+ const handleMouseEnter = (evt) => {
2546
+ hovering.value = true;
2547
+ emit("mouseenter", evt);
2548
+ };
2549
+ const handleKeydown = (evt) => {
2550
+ emit("keydown", evt);
2551
+ };
2552
+ const select = () => {
2553
+ var _a$1;
2554
+ (_a$1 = _ref.value) == null || _a$1.select();
2555
+ };
2556
+ const clear = () => {
2557
+ emit(UPDATE_MODEL_EVENT, "");
2558
+ emit("change", "");
2559
+ emit("clear");
2560
+ emit("input", "");
2561
+ };
2562
+ watch(() => props.modelValue, () => {
2563
+ var _a$1;
2564
+ nextTick(() => resizeTextarea());
2565
+ if (props.validateEvent) (_a$1 = formItem == null ? void 0 : formItem.validate) == null || _a$1.call(formItem, "change").catch((err) => debugWarn(err));
2566
+ });
2567
+ watch(nativeInputValue, () => setNativeInputValue());
2568
+ watch(() => props.type, async () => {
2569
+ await nextTick();
2570
+ setNativeInputValue();
2571
+ resizeTextarea();
2572
+ });
2573
+ onMounted(() => {
2574
+ if (!props.formatter && props.parser) debugWarn("ElInput", "If you set the parser, you also need to set the formatter.");
2575
+ setNativeInputValue();
2576
+ nextTick(resizeTextarea);
2577
+ });
2578
+ expose({
2579
+ input,
2580
+ textarea,
2581
+ ref: _ref,
2582
+ textareaStyle,
2583
+ autosize: toRef(props, "autosize"),
2584
+ focus,
2585
+ blur,
2586
+ select,
2587
+ clear,
2588
+ resizeTextarea
2589
+ });
2590
+ return (_ctx, _cache) => {
2591
+ return withDirectives((openBlock(), createElementBlock("div", mergeProps(unref(containerAttrs), {
2592
+ class: unref(containerKls),
2593
+ style: unref(containerStyle),
2594
+ role: _ctx.containerRole,
2595
+ onMouseenter: handleMouseEnter,
2596
+ onMouseleave: handleMouseLeave
2597
+ }), [createCommentVNode(" input "), _ctx.type !== "textarea" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2598
+ createCommentVNode(" prepend slot "),
2599
+ _ctx.$slots.prepend ? (openBlock(), createElementBlock("div", {
2600
+ key: 0,
2601
+ class: normalizeClass(unref(nsInput).be("group", "prepend"))
2602
+ }, [renderSlot(_ctx.$slots, "prepend")], 2)) : createCommentVNode("v-if", true),
2603
+ createBaseVNode("div", {
2604
+ ref_key: "wrapperRef",
2605
+ ref: wrapperRef,
2606
+ class: normalizeClass(unref(wrapperKls))
2607
+ }, [
2608
+ createCommentVNode(" prefix slot "),
2609
+ _ctx.$slots.prefix || _ctx.prefixIcon ? (openBlock(), createElementBlock("span", {
2610
+ key: 0,
2611
+ class: normalizeClass(unref(nsInput).e("prefix"))
2612
+ }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("prefix-inner")) }, [renderSlot(_ctx.$slots, "prefix"), _ctx.prefixIcon ? (openBlock(), createBlock(unref(ElIcon), {
2613
+ key: 0,
2614
+ class: normalizeClass(unref(nsInput).e("icon"))
2615
+ }, {
2616
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.prefixIcon)))]),
2617
+ _: 1
2618
+ }, 8, ["class"])) : createCommentVNode("v-if", true)], 2)], 2)) : createCommentVNode("v-if", true),
2619
+ createBaseVNode("input", mergeProps({
2620
+ id: unref(inputId),
2621
+ ref_key: "input",
2622
+ ref: input,
2623
+ class: unref(nsInput).e("inner")
2624
+ }, unref(attrs), {
2625
+ type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
2626
+ disabled: unref(inputDisabled),
2627
+ formatter: _ctx.formatter,
2628
+ parser: _ctx.parser,
2629
+ readonly: _ctx.readonly,
2630
+ autocomplete: _ctx.autocomplete,
2631
+ tabindex: _ctx.tabindex,
2632
+ "aria-label": _ctx.label,
2633
+ placeholder: _ctx.placeholder,
2634
+ style: _ctx.inputStyle,
2635
+ form: props.form,
2636
+ autofocus: props.autofocus,
2637
+ onCompositionstart: handleCompositionStart,
2638
+ onCompositionupdate: handleCompositionUpdate,
2639
+ onCompositionend: handleCompositionEnd,
2640
+ onInput: handleInput,
2641
+ onFocus: _cache[0] || (_cache[0] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
2642
+ onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)),
2643
+ onChange: handleChange,
2644
+ onKeydown: handleKeydown
2645
+ }), null, 16, _hoisted_2),
2646
+ createCommentVNode(" suffix slot "),
2647
+ unref(suffixVisible) ? (openBlock(), createElementBlock("span", {
2648
+ key: 1,
2649
+ class: normalizeClass(unref(nsInput).e("suffix"))
2650
+ }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("suffix-inner")) }, [
2651
+ !unref(showClear) || !unref(showPwdVisible) || !unref(isWordLimitVisible) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [renderSlot(_ctx.$slots, "suffix"), _ctx.suffixIcon ? (openBlock(), createBlock(unref(ElIcon), {
2652
+ key: 0,
2653
+ class: normalizeClass(unref(nsInput).e("icon"))
2654
+ }, {
2655
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.suffixIcon)))]),
2656
+ _: 1
2657
+ }, 8, ["class"])) : createCommentVNode("v-if", true)], 64)) : createCommentVNode("v-if", true),
2658
+ unref(showClear) ? (openBlock(), createBlock(unref(ElIcon), {
2659
+ key: 1,
2660
+ class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("clear")]),
2661
+ onMousedown: withModifiers(unref(NOOP), ["prevent"]),
2662
+ onClick: clear
2663
+ }, {
2664
+ default: withCtx(() => [createVNode(unref(circle_close_default))]),
2665
+ _: 1
2666
+ }, 8, ["class", "onMousedown"])) : createCommentVNode("v-if", true),
2667
+ unref(showPwdVisible) ? (openBlock(), createBlock(unref(ElIcon), {
2668
+ key: 2,
2669
+ class: normalizeClass([unref(nsInput).e("icon"), unref(nsInput).e("password")]),
2670
+ onClick: handlePasswordVisible
2671
+ }, {
2672
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(passwordIcon))))]),
2673
+ _: 1
2674
+ }, 8, ["class"])) : createCommentVNode("v-if", true),
2675
+ unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
2676
+ key: 3,
2677
+ class: normalizeClass(unref(nsInput).e("count"))
2678
+ }, [createBaseVNode("span", { class: normalizeClass(unref(nsInput).e("count-inner")) }, toDisplayString(unref(textLength)) + " / " + toDisplayString(unref(attrs).maxlength), 3)], 2)) : createCommentVNode("v-if", true),
2679
+ unref(validateState) && unref(validateIcon) && unref(needStatusIcon) ? (openBlock(), createBlock(unref(ElIcon), {
2680
+ key: 4,
2681
+ class: normalizeClass([
2682
+ unref(nsInput).e("icon"),
2683
+ unref(nsInput).e("validateIcon"),
2684
+ unref(nsInput).is("loading", unref(validateState) === "validating")
2685
+ ])
2686
+ }, {
2687
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(validateIcon))))]),
2688
+ _: 1
2689
+ }, 8, ["class"])) : createCommentVNode("v-if", true)
2690
+ ], 2)], 2)) : createCommentVNode("v-if", true)
2691
+ ], 2),
2692
+ createCommentVNode(" append slot "),
2693
+ _ctx.$slots.append ? (openBlock(), createElementBlock("div", {
2694
+ key: 1,
2695
+ class: normalizeClass(unref(nsInput).be("group", "append"))
2696
+ }, [renderSlot(_ctx.$slots, "append")], 2)) : createCommentVNode("v-if", true)
2697
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2698
+ createCommentVNode(" textarea "),
2699
+ createBaseVNode("textarea", mergeProps({
2700
+ id: unref(inputId),
2701
+ ref_key: "textarea",
2702
+ ref: textarea,
2703
+ class: unref(nsTextarea).e("inner")
2704
+ }, unref(attrs), {
2705
+ tabindex: _ctx.tabindex,
2706
+ disabled: unref(inputDisabled),
2707
+ readonly: _ctx.readonly,
2708
+ autocomplete: _ctx.autocomplete,
2709
+ style: unref(textareaStyle),
2710
+ "aria-label": _ctx.label,
2711
+ placeholder: _ctx.placeholder,
2712
+ form: props.form,
2713
+ autofocus: props.autofocus,
2714
+ onCompositionstart: handleCompositionStart,
2715
+ onCompositionupdate: handleCompositionUpdate,
2716
+ onCompositionend: handleCompositionEnd,
2717
+ onInput: handleInput,
2718
+ onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
2719
+ onBlur: _cache[3] || (_cache[3] = (...args) => unref(handleBlur) && unref(handleBlur)(...args)),
2720
+ onChange: handleChange,
2721
+ onKeydown: handleKeydown
2722
+ }), null, 16, _hoisted_3),
2723
+ unref(isWordLimitVisible) ? (openBlock(), createElementBlock("span", {
2724
+ key: 0,
2725
+ style: normalizeStyle(countStyle.value),
2726
+ class: normalizeClass(unref(nsInput).e("count"))
2727
+ }, toDisplayString(unref(textLength)) + " / " + toDisplayString(unref(attrs).maxlength), 7)) : createCommentVNode("v-if", true)
2728
+ ], 64))], 16, _hoisted_1)), [[vShow, _ctx.type !== "hidden"]]);
2729
+ };
2730
+ }
2731
+ }), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]));
2732
+ var FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
2733
+ var FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
2734
+ var FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented";
2735
+ var FOCUS_AFTER_TRAPPED_OPTS = {
2736
+ cancelable: true,
2737
+ bubbles: false
2738
+ };
2739
+ var FOCUSOUT_PREVENTED_OPTS = {
2740
+ cancelable: true,
2741
+ bubbles: false
2742
+ };
2743
+ var ON_TRAP_FOCUS_EVT = "focusAfterTrapped";
2744
+ var ON_RELEASE_FOCUS_EVT = "focusAfterReleased";
2745
+ var FOCUS_TRAP_INJECTION_KEY = Symbol("elFocusTrap");
2746
+ var focusReason = ref();
2747
+ var lastUserFocusTimestamp = ref(0);
2748
+ var lastAutomatedFocusTimestamp = ref(0);
2749
+ var focusReasonUserCount = 0;
2750
+ var obtainAllFocusableElements = (element) => {
2751
+ const nodes = [];
2752
+ const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
2753
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
2754
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
2755
+ return node.tabIndex >= 0 || node === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
2756
+ } });
2757
+ while (walker.nextNode()) nodes.push(walker.currentNode);
2758
+ return nodes;
2759
+ };
2760
+ var getVisibleElement = (elements, container) => {
2761
+ for (const element of elements) if (!isHidden(element, container)) return element;
2762
+ };
2763
+ var isHidden = (element, container) => {
2764
+ if (getComputedStyle(element).visibility === "hidden") return true;
2765
+ while (element) {
2766
+ if (container && element === container) return false;
2767
+ if (getComputedStyle(element).display === "none") return true;
2768
+ element = element.parentElement;
2769
+ }
2770
+ return false;
2771
+ };
2772
+ var getEdges = (container) => {
2773
+ const focusable = obtainAllFocusableElements(container);
2774
+ return [getVisibleElement(focusable, container), getVisibleElement(focusable.reverse(), container)];
2775
+ };
2776
+ var isSelectable = (element) => {
2777
+ return element instanceof HTMLInputElement && "select" in element;
2778
+ };
2779
+ var tryFocus = (element, shouldSelect) => {
2780
+ if (element && element.focus) {
2781
+ const prevFocusedElement = document.activeElement;
2782
+ element.focus({ preventScroll: true });
2783
+ lastAutomatedFocusTimestamp.value = window.performance.now();
2784
+ if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) element.select();
2785
+ }
2786
+ };
2787
+ function removeFromStack(list, item) {
2788
+ const copy = [...list];
2789
+ const idx = list.indexOf(item);
2790
+ if (idx !== -1) copy.splice(idx, 1);
2791
+ return copy;
2792
+ }
2793
+ var createFocusableStack = () => {
2794
+ let stack = [];
2795
+ const push = (layer) => {
2796
+ const currentLayer = stack[0];
2797
+ if (currentLayer && layer !== currentLayer) currentLayer.pause();
2798
+ stack = removeFromStack(stack, layer);
2799
+ stack.unshift(layer);
2800
+ };
2801
+ const remove = (layer) => {
2802
+ var _a$1, _b;
2803
+ stack = removeFromStack(stack, layer);
2804
+ (_b = (_a$1 = stack[0]) == null ? void 0 : _a$1.resume) == null || _b.call(_a$1);
2805
+ };
2806
+ return {
2807
+ push,
2808
+ remove
2809
+ };
2810
+ };
2811
+ var focusFirstDescendant = (elements, shouldSelect = false) => {
2812
+ const prevFocusedElement = document.activeElement;
2813
+ for (const element of elements) {
2814
+ tryFocus(element, shouldSelect);
2815
+ if (document.activeElement !== prevFocusedElement) return;
2816
+ }
2817
+ };
2818
+ var focusableStack = createFocusableStack();
2819
+ var isFocusCausedByUserEvent = () => {
2820
+ return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value;
2821
+ };
2822
+ var notifyFocusReasonPointer = () => {
2823
+ focusReason.value = "pointer";
2824
+ lastUserFocusTimestamp.value = window.performance.now();
2825
+ };
2826
+ var notifyFocusReasonKeydown = () => {
2827
+ focusReason.value = "keyboard";
2828
+ lastUserFocusTimestamp.value = window.performance.now();
2829
+ };
2830
+ var useFocusReason = () => {
2831
+ onMounted(() => {
2832
+ if (focusReasonUserCount === 0) {
2833
+ document.addEventListener("mousedown", notifyFocusReasonPointer);
2834
+ document.addEventListener("touchstart", notifyFocusReasonPointer);
2835
+ document.addEventListener("keydown", notifyFocusReasonKeydown);
2836
+ }
2837
+ focusReasonUserCount++;
2838
+ });
2839
+ onBeforeUnmount(() => {
2840
+ focusReasonUserCount--;
2841
+ if (focusReasonUserCount <= 0) {
2842
+ document.removeEventListener("mousedown", notifyFocusReasonPointer);
2843
+ document.removeEventListener("touchstart", notifyFocusReasonPointer);
2844
+ document.removeEventListener("keydown", notifyFocusReasonKeydown);
2845
+ }
2846
+ });
2847
+ return {
2848
+ focusReason,
2849
+ lastUserFocusTimestamp,
2850
+ lastAutomatedFocusTimestamp
2851
+ };
2852
+ };
2853
+ var createFocusOutPreventedEvent = (detail) => {
2854
+ return new CustomEvent(FOCUSOUT_PREVENTED, {
2855
+ ...FOCUSOUT_PREVENTED_OPTS,
2856
+ detail
2857
+ });
2858
+ };
2859
+ init_shared_esm_bundler();
2860
+ var _sfc_main = defineComponent({
2861
+ name: "ElFocusTrap",
2862
+ inheritAttrs: false,
2863
+ props: {
2864
+ loop: Boolean,
2865
+ trapped: Boolean,
2866
+ focusTrapEl: Object,
2867
+ focusStartEl: {
2868
+ type: [Object, String],
2869
+ default: "first"
2870
+ }
2871
+ },
2872
+ emits: [
2873
+ ON_TRAP_FOCUS_EVT,
2874
+ ON_RELEASE_FOCUS_EVT,
2875
+ "focusin",
2876
+ "focusout",
2877
+ "focusout-prevented",
2878
+ "release-requested"
2879
+ ],
2880
+ setup(props, { emit }) {
2881
+ const forwardRef = ref();
2882
+ let lastFocusBeforeTrapped;
2883
+ let lastFocusAfterTrapped;
2884
+ const { focusReason: focusReason$1 } = useFocusReason();
2885
+ useEscapeKeydown((event) => {
2886
+ if (props.trapped && !focusLayer.paused) emit("release-requested", event);
2887
+ });
2888
+ const focusLayer = {
2889
+ paused: false,
2890
+ pause() {
2891
+ this.paused = true;
2892
+ },
2893
+ resume() {
2894
+ this.paused = false;
2895
+ }
2896
+ };
2897
+ const onKeydown = (e) => {
2898
+ if (!props.loop && !props.trapped) return;
2899
+ if (focusLayer.paused) return;
2900
+ const { key, altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e;
2901
+ const { loop } = props;
2902
+ const isTabbing = key === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey;
2903
+ const currentFocusingEl = document.activeElement;
2904
+ if (isTabbing && currentFocusingEl) {
2905
+ const container = currentTarget;
2906
+ const [first, last] = getEdges(container);
2907
+ if (!(first && last)) {
2908
+ if (currentFocusingEl === container) {
2909
+ const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason$1.value });
2910
+ emit("focusout-prevented", focusoutPreventedEvent);
2911
+ if (!focusoutPreventedEvent.defaultPrevented) e.preventDefault();
2912
+ }
2913
+ } else if (!shiftKey && currentFocusingEl === last) {
2914
+ const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason$1.value });
2915
+ emit("focusout-prevented", focusoutPreventedEvent);
2916
+ if (!focusoutPreventedEvent.defaultPrevented) {
2917
+ e.preventDefault();
2918
+ if (loop) tryFocus(first, true);
2919
+ }
2920
+ } else if (shiftKey && [first, container].includes(currentFocusingEl)) {
2921
+ const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason$1.value });
2922
+ emit("focusout-prevented", focusoutPreventedEvent);
2923
+ if (!focusoutPreventedEvent.defaultPrevented) {
2924
+ e.preventDefault();
2925
+ if (loop) tryFocus(last, true);
2926
+ }
2927
+ }
2928
+ }
2929
+ };
2930
+ provide(FOCUS_TRAP_INJECTION_KEY, {
2931
+ focusTrapRef: forwardRef,
2932
+ onKeydown
2933
+ });
2934
+ watch(() => props.focusTrapEl, (focusTrapEl) => {
2935
+ if (focusTrapEl) forwardRef.value = focusTrapEl;
2936
+ }, { immediate: true });
2937
+ watch([forwardRef], ([forwardRef2], [oldForwardRef]) => {
2938
+ if (forwardRef2) {
2939
+ forwardRef2.addEventListener("keydown", onKeydown);
2940
+ forwardRef2.addEventListener("focusin", onFocusIn);
2941
+ forwardRef2.addEventListener("focusout", onFocusOut);
2942
+ }
2943
+ if (oldForwardRef) {
2944
+ oldForwardRef.removeEventListener("keydown", onKeydown);
2945
+ oldForwardRef.removeEventListener("focusin", onFocusIn);
2946
+ oldForwardRef.removeEventListener("focusout", onFocusOut);
2947
+ }
2948
+ });
2949
+ const trapOnFocus = (e) => {
2950
+ emit(ON_TRAP_FOCUS_EVT, e);
2951
+ };
2952
+ const releaseOnFocus = (e) => emit(ON_RELEASE_FOCUS_EVT, e);
2953
+ const onFocusIn = (e) => {
2954
+ const trapContainer = unref(forwardRef);
2955
+ if (!trapContainer) return;
2956
+ const target = e.target;
2957
+ const relatedTarget = e.relatedTarget;
2958
+ const isFocusedInTrap = target && trapContainer.contains(target);
2959
+ if (!props.trapped) {
2960
+ if (!(relatedTarget && trapContainer.contains(relatedTarget))) lastFocusBeforeTrapped = relatedTarget;
2961
+ }
2962
+ if (isFocusedInTrap) emit("focusin", e);
2963
+ if (focusLayer.paused) return;
2964
+ if (props.trapped) if (isFocusedInTrap) lastFocusAfterTrapped = target;
2965
+ else tryFocus(lastFocusAfterTrapped, true);
2966
+ };
2967
+ const onFocusOut = (e) => {
2968
+ const trapContainer = unref(forwardRef);
2969
+ if (focusLayer.paused || !trapContainer) return;
2970
+ if (props.trapped) {
2971
+ const relatedTarget = e.relatedTarget;
2972
+ if (!isNil_default(relatedTarget) && !trapContainer.contains(relatedTarget)) setTimeout(() => {
2973
+ if (!focusLayer.paused && props.trapped) {
2974
+ const focusoutPreventedEvent = createFocusOutPreventedEvent({ focusReason: focusReason$1.value });
2975
+ emit("focusout-prevented", focusoutPreventedEvent);
2976
+ if (!focusoutPreventedEvent.defaultPrevented) tryFocus(lastFocusAfterTrapped, true);
2977
+ }
2978
+ }, 0);
2979
+ } else {
2980
+ const target = e.target;
2981
+ if (!(target && trapContainer.contains(target))) emit("focusout", e);
2982
+ }
2983
+ };
2984
+ async function startTrap() {
2985
+ await nextTick();
2986
+ const trapContainer = unref(forwardRef);
2987
+ if (trapContainer) {
2988
+ focusableStack.push(focusLayer);
2989
+ const prevFocusedElement = trapContainer.contains(document.activeElement) ? lastFocusBeforeTrapped : document.activeElement;
2990
+ lastFocusBeforeTrapped = prevFocusedElement;
2991
+ if (!trapContainer.contains(prevFocusedElement)) {
2992
+ const focusEvent = new Event(FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS);
2993
+ trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
2994
+ trapContainer.dispatchEvent(focusEvent);
2995
+ if (!focusEvent.defaultPrevented) nextTick(() => {
2996
+ let focusStartEl = props.focusStartEl;
2997
+ if (!isString(focusStartEl)) {
2998
+ tryFocus(focusStartEl);
2999
+ if (document.activeElement !== focusStartEl) focusStartEl = "first";
3000
+ }
3001
+ if (focusStartEl === "first") focusFirstDescendant(obtainAllFocusableElements(trapContainer), true);
3002
+ if (document.activeElement === prevFocusedElement || focusStartEl === "container") tryFocus(trapContainer);
3003
+ });
3004
+ }
3005
+ }
3006
+ }
3007
+ function stopTrap() {
3008
+ const trapContainer = unref(forwardRef);
3009
+ if (trapContainer) {
3010
+ trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
3011
+ const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, {
3012
+ ...FOCUS_AFTER_TRAPPED_OPTS,
3013
+ detail: { focusReason: focusReason$1.value }
3014
+ });
3015
+ trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
3016
+ trapContainer.dispatchEvent(releasedEvent);
3017
+ if (!releasedEvent.defaultPrevented && (focusReason$1.value == "keyboard" || !isFocusCausedByUserEvent() || trapContainer.contains(document.activeElement))) tryFocus(lastFocusBeforeTrapped != null ? lastFocusBeforeTrapped : document.body);
3018
+ trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
3019
+ focusableStack.remove(focusLayer);
3020
+ }
3021
+ }
3022
+ onMounted(() => {
3023
+ if (props.trapped) startTrap();
3024
+ watch(() => props.trapped, (trapped) => {
3025
+ if (trapped) startTrap();
3026
+ else stopTrap();
3027
+ });
3028
+ });
3029
+ onBeforeUnmount(() => {
3030
+ if (props.trapped) stopTrap();
3031
+ });
3032
+ return { onKeydown };
3033
+ }
3034
+ });
3035
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3036
+ return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
3037
+ }
3038
+ 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"]]);
3039
+ var buttonGroupContextKey = Symbol("buttonGroupContextKey");
3040
+ var useButton = (props, emit) => {
3041
+ useDeprecated({
3042
+ from: "type.text",
3043
+ replacement: "link",
3044
+ version: "3.0.0",
3045
+ scope: "props",
3046
+ ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
3047
+ }, computed(() => props.type === "text"));
3048
+ const buttonGroupContext = inject(buttonGroupContextKey, void 0);
3049
+ const globalConfig$1 = useGlobalConfig("button");
3050
+ const { form } = useFormItem();
3051
+ const _size = useFormSize(computed(() => buttonGroupContext == null ? void 0 : buttonGroupContext.size));
3052
+ const _disabled = useFormDisabled();
3053
+ const _ref = ref();
3054
+ const slots = useSlots();
3055
+ const _type = computed(() => props.type || (buttonGroupContext == null ? void 0 : buttonGroupContext.type) || "");
3056
+ const autoInsertSpace = computed(() => {
3057
+ var _a$1, _b, _c;
3058
+ return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a$1 = globalConfig$1.value) == null ? void 0 : _a$1.autoInsertSpace) != null ? _c : false;
3059
+ });
3060
+ const _props = computed(() => {
3061
+ if (props.tag === "button") return {
3062
+ ariaDisabled: _disabled.value || props.loading,
3063
+ disabled: _disabled.value || props.loading,
3064
+ autofocus: props.autofocus,
3065
+ type: props.nativeType
3066
+ };
3067
+ return {};
3068
+ });
3069
+ const shouldAddSpace = computed(() => {
3070
+ var _a$1;
3071
+ const defaultSlot = (_a$1 = slots.default) == null ? void 0 : _a$1.call(slots);
3072
+ if (autoInsertSpace.value && (defaultSlot == null ? void 0 : defaultSlot.length) === 1) {
3073
+ const slot = defaultSlot[0];
3074
+ if ((slot == null ? void 0 : slot.type) === Text) {
3075
+ const text = slot.children;
3076
+ return /^\p{Unified_Ideograph}{2}$/u.test(text.trim());
3077
+ }
3078
+ }
3079
+ return false;
3080
+ });
3081
+ const handleClick = (evt) => {
3082
+ if (props.nativeType === "reset") form?.resetFields();
3083
+ emit("click", evt);
3084
+ };
3085
+ return {
3086
+ _disabled,
3087
+ _size,
3088
+ _type,
3089
+ _ref,
3090
+ _props,
3091
+ shouldAddSpace,
3092
+ handleClick
3093
+ };
3094
+ };
3095
+ var buttonProps = buildProps({
3096
+ size: useSizeProp,
3097
+ disabled: Boolean,
3098
+ type: {
3099
+ type: String,
3100
+ values: [
3101
+ "default",
3102
+ "primary",
3103
+ "success",
3104
+ "warning",
3105
+ "info",
3106
+ "danger",
3107
+ "text",
3108
+ ""
3109
+ ],
3110
+ default: ""
3111
+ },
3112
+ icon: { type: iconPropType },
3113
+ nativeType: {
3114
+ type: String,
3115
+ values: [
3116
+ "button",
3117
+ "submit",
3118
+ "reset"
3119
+ ],
3120
+ default: "button"
3121
+ },
3122
+ loading: Boolean,
3123
+ loadingIcon: {
3124
+ type: iconPropType,
3125
+ default: () => loading_default
3126
+ },
3127
+ plain: Boolean,
3128
+ text: Boolean,
3129
+ link: Boolean,
3130
+ bg: Boolean,
3131
+ autofocus: Boolean,
3132
+ round: Boolean,
3133
+ circle: Boolean,
3134
+ color: String,
3135
+ dark: Boolean,
3136
+ autoInsertSpace: {
3137
+ type: Boolean,
3138
+ default: void 0
3139
+ },
3140
+ tag: {
3141
+ type: definePropType([String, Object]),
3142
+ default: "button"
3143
+ }
3144
+ });
3145
+ var buttonEmits = { click: (evt) => evt instanceof MouseEvent };
3146
+ function bound01(n, max) {
3147
+ if (isOnePointZero(n)) n = "100%";
3148
+ var isPercent = isPercentage(n);
3149
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
3150
+ if (isPercent) n = parseInt(String(n * max), 10) / 100;
3151
+ if (Math.abs(n - max) < 1e-6) return 1;
3152
+ if (max === 360) n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
3153
+ else n = n % max / parseFloat(String(max));
3154
+ return n;
3155
+ }
3156
+ function clamp01(val) {
3157
+ return Math.min(1, Math.max(0, val));
3158
+ }
3159
+ function isOnePointZero(n) {
3160
+ return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
3161
+ }
3162
+ function isPercentage(n) {
3163
+ return typeof n === "string" && n.indexOf("%") !== -1;
3164
+ }
3165
+ function boundAlpha(a) {
3166
+ a = parseFloat(a);
3167
+ if (isNaN(a) || a < 0 || a > 1) a = 1;
3168
+ return a;
3169
+ }
3170
+ function convertToPercentage(n) {
3171
+ if (n <= 1) return "".concat(Number(n) * 100, "%");
3172
+ return n;
3173
+ }
3174
+ function pad2(c) {
3175
+ return c.length === 1 ? "0" + c : String(c);
3176
+ }
3177
+ function rgbToRgb(r, g, b) {
3178
+ return {
3179
+ r: bound01(r, 255) * 255,
3180
+ g: bound01(g, 255) * 255,
3181
+ b: bound01(b, 255) * 255
3182
+ };
3183
+ }
3184
+ function rgbToHsl(r, g, b) {
3185
+ r = bound01(r, 255);
3186
+ g = bound01(g, 255);
3187
+ b = bound01(b, 255);
3188
+ var max = Math.max(r, g, b);
3189
+ var min = Math.min(r, g, b);
3190
+ var h = 0;
3191
+ var s = 0;
3192
+ var l = (max + min) / 2;
3193
+ if (max === min) {
3194
+ s = 0;
3195
+ h = 0;
3196
+ } else {
3197
+ var d = max - min;
3198
+ s = l > .5 ? d / (2 - max - min) : d / (max + min);
3199
+ switch (max) {
3200
+ case r:
3201
+ h = (g - b) / d + (g < b ? 6 : 0);
3202
+ break;
3203
+ case g:
3204
+ h = (b - r) / d + 2;
3205
+ break;
3206
+ case b:
3207
+ h = (r - g) / d + 4;
3208
+ break;
3209
+ default: break;
3210
+ }
3211
+ h /= 6;
3212
+ }
3213
+ return {
3214
+ h,
3215
+ s,
3216
+ l
3217
+ };
3218
+ }
3219
+ function hue2rgb(p, q, t) {
3220
+ if (t < 0) t += 1;
3221
+ if (t > 1) t -= 1;
3222
+ if (t < 1 / 6) return p + (q - p) * (6 * t);
3223
+ if (t < 1 / 2) return q;
3224
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
3225
+ return p;
3226
+ }
3227
+ function hslToRgb(h, s, l) {
3228
+ var r;
3229
+ var g;
3230
+ var b;
3231
+ h = bound01(h, 360);
3232
+ s = bound01(s, 100);
3233
+ l = bound01(l, 100);
3234
+ if (s === 0) {
3235
+ g = l;
3236
+ b = l;
3237
+ r = l;
3238
+ } else {
3239
+ var q = l < .5 ? l * (1 + s) : l + s - l * s;
3240
+ var p = 2 * l - q;
3241
+ r = hue2rgb(p, q, h + 1 / 3);
3242
+ g = hue2rgb(p, q, h);
3243
+ b = hue2rgb(p, q, h - 1 / 3);
3244
+ }
3245
+ return {
3246
+ r: r * 255,
3247
+ g: g * 255,
3248
+ b: b * 255
3249
+ };
3250
+ }
3251
+ function rgbToHsv(r, g, b) {
3252
+ r = bound01(r, 255);
3253
+ g = bound01(g, 255);
3254
+ b = bound01(b, 255);
3255
+ var max = Math.max(r, g, b);
3256
+ var min = Math.min(r, g, b);
3257
+ var h = 0;
3258
+ var v = max;
3259
+ var d = max - min;
3260
+ var s = max === 0 ? 0 : d / max;
3261
+ if (max === min) h = 0;
3262
+ else {
3263
+ switch (max) {
3264
+ case r:
3265
+ h = (g - b) / d + (g < b ? 6 : 0);
3266
+ break;
3267
+ case g:
3268
+ h = (b - r) / d + 2;
3269
+ break;
3270
+ case b:
3271
+ h = (r - g) / d + 4;
3272
+ break;
3273
+ default: break;
3274
+ }
3275
+ h /= 6;
3276
+ }
3277
+ return {
3278
+ h,
3279
+ s,
3280
+ v
3281
+ };
3282
+ }
3283
+ function hsvToRgb(h, s, v) {
3284
+ h = bound01(h, 360) * 6;
3285
+ s = bound01(s, 100);
3286
+ v = bound01(v, 100);
3287
+ var i = Math.floor(h);
3288
+ var f = h - i;
3289
+ var p = v * (1 - s);
3290
+ var q = v * (1 - f * s);
3291
+ var t = v * (1 - (1 - f) * s);
3292
+ var mod = i % 6;
3293
+ var r = [
3294
+ v,
3295
+ q,
3296
+ p,
3297
+ p,
3298
+ t,
3299
+ v
3300
+ ][mod];
3301
+ var g = [
3302
+ t,
3303
+ v,
3304
+ v,
3305
+ q,
3306
+ p,
3307
+ p
3308
+ ][mod];
3309
+ var b = [
3310
+ p,
3311
+ p,
3312
+ t,
3313
+ v,
3314
+ v,
3315
+ q
3316
+ ][mod];
3317
+ return {
3318
+ r: r * 255,
3319
+ g: g * 255,
3320
+ b: b * 255
3321
+ };
3322
+ }
3323
+ function rgbToHex(r, g, b, allow3Char) {
3324
+ var hex = [
3325
+ pad2(Math.round(r).toString(16)),
3326
+ pad2(Math.round(g).toString(16)),
3327
+ pad2(Math.round(b).toString(16))
3328
+ ];
3329
+ 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);
3330
+ return hex.join("");
3331
+ }
3332
+ function rgbaToHex(r, g, b, a, allow4Char) {
3333
+ var hex = [
3334
+ pad2(Math.round(r).toString(16)),
3335
+ pad2(Math.round(g).toString(16)),
3336
+ pad2(Math.round(b).toString(16)),
3337
+ pad2(convertDecimalToHex(a))
3338
+ ];
3339
+ 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);
3340
+ return hex.join("");
3341
+ }
3342
+ function convertDecimalToHex(d) {
3343
+ return Math.round(parseFloat(d) * 255).toString(16);
3344
+ }
3345
+ function convertHexToDecimal(h) {
3346
+ return parseIntFromHex(h) / 255;
3347
+ }
3348
+ function parseIntFromHex(val) {
3349
+ return parseInt(val, 16);
3350
+ }
3351
+ function numberInputToObject(color) {
3352
+ return {
3353
+ r: color >> 16,
3354
+ g: (color & 65280) >> 8,
3355
+ b: color & 255
3356
+ };
3357
+ }
3358
+ var names = {
3359
+ aliceblue: "#f0f8ff",
3360
+ antiquewhite: "#faebd7",
3361
+ aqua: "#00ffff",
3362
+ aquamarine: "#7fffd4",
3363
+ azure: "#f0ffff",
3364
+ beige: "#f5f5dc",
3365
+ bisque: "#ffe4c4",
3366
+ black: "#000000",
3367
+ blanchedalmond: "#ffebcd",
3368
+ blue: "#0000ff",
3369
+ blueviolet: "#8a2be2",
3370
+ brown: "#a52a2a",
3371
+ burlywood: "#deb887",
3372
+ cadetblue: "#5f9ea0",
3373
+ chartreuse: "#7fff00",
3374
+ chocolate: "#d2691e",
3375
+ coral: "#ff7f50",
3376
+ cornflowerblue: "#6495ed",
3377
+ cornsilk: "#fff8dc",
3378
+ crimson: "#dc143c",
3379
+ cyan: "#00ffff",
3380
+ darkblue: "#00008b",
3381
+ darkcyan: "#008b8b",
3382
+ darkgoldenrod: "#b8860b",
3383
+ darkgray: "#a9a9a9",
3384
+ darkgreen: "#006400",
3385
+ darkgrey: "#a9a9a9",
3386
+ darkkhaki: "#bdb76b",
3387
+ darkmagenta: "#8b008b",
3388
+ darkolivegreen: "#556b2f",
3389
+ darkorange: "#ff8c00",
3390
+ darkorchid: "#9932cc",
3391
+ darkred: "#8b0000",
3392
+ darksalmon: "#e9967a",
3393
+ darkseagreen: "#8fbc8f",
3394
+ darkslateblue: "#483d8b",
3395
+ darkslategray: "#2f4f4f",
3396
+ darkslategrey: "#2f4f4f",
3397
+ darkturquoise: "#00ced1",
3398
+ darkviolet: "#9400d3",
3399
+ deeppink: "#ff1493",
3400
+ deepskyblue: "#00bfff",
3401
+ dimgray: "#696969",
3402
+ dimgrey: "#696969",
3403
+ dodgerblue: "#1e90ff",
3404
+ firebrick: "#b22222",
3405
+ floralwhite: "#fffaf0",
3406
+ forestgreen: "#228b22",
3407
+ fuchsia: "#ff00ff",
3408
+ gainsboro: "#dcdcdc",
3409
+ ghostwhite: "#f8f8ff",
3410
+ goldenrod: "#daa520",
3411
+ gold: "#ffd700",
3412
+ gray: "#808080",
3413
+ green: "#008000",
3414
+ greenyellow: "#adff2f",
3415
+ grey: "#808080",
3416
+ honeydew: "#f0fff0",
3417
+ hotpink: "#ff69b4",
3418
+ indianred: "#cd5c5c",
3419
+ indigo: "#4b0082",
3420
+ ivory: "#fffff0",
3421
+ khaki: "#f0e68c",
3422
+ lavenderblush: "#fff0f5",
3423
+ lavender: "#e6e6fa",
3424
+ lawngreen: "#7cfc00",
3425
+ lemonchiffon: "#fffacd",
3426
+ lightblue: "#add8e6",
3427
+ lightcoral: "#f08080",
3428
+ lightcyan: "#e0ffff",
3429
+ lightgoldenrodyellow: "#fafad2",
3430
+ lightgray: "#d3d3d3",
3431
+ lightgreen: "#90ee90",
3432
+ lightgrey: "#d3d3d3",
3433
+ lightpink: "#ffb6c1",
3434
+ lightsalmon: "#ffa07a",
3435
+ lightseagreen: "#20b2aa",
3436
+ lightskyblue: "#87cefa",
3437
+ lightslategray: "#778899",
3438
+ lightslategrey: "#778899",
3439
+ lightsteelblue: "#b0c4de",
3440
+ lightyellow: "#ffffe0",
3441
+ lime: "#00ff00",
3442
+ limegreen: "#32cd32",
3443
+ linen: "#faf0e6",
3444
+ magenta: "#ff00ff",
3445
+ maroon: "#800000",
3446
+ mediumaquamarine: "#66cdaa",
3447
+ mediumblue: "#0000cd",
3448
+ mediumorchid: "#ba55d3",
3449
+ mediumpurple: "#9370db",
3450
+ mediumseagreen: "#3cb371",
3451
+ mediumslateblue: "#7b68ee",
3452
+ mediumspringgreen: "#00fa9a",
3453
+ mediumturquoise: "#48d1cc",
3454
+ mediumvioletred: "#c71585",
3455
+ midnightblue: "#191970",
3456
+ mintcream: "#f5fffa",
3457
+ mistyrose: "#ffe4e1",
3458
+ moccasin: "#ffe4b5",
3459
+ navajowhite: "#ffdead",
3460
+ navy: "#000080",
3461
+ oldlace: "#fdf5e6",
3462
+ olive: "#808000",
3463
+ olivedrab: "#6b8e23",
3464
+ orange: "#ffa500",
3465
+ orangered: "#ff4500",
3466
+ orchid: "#da70d6",
3467
+ palegoldenrod: "#eee8aa",
3468
+ palegreen: "#98fb98",
3469
+ paleturquoise: "#afeeee",
3470
+ palevioletred: "#db7093",
3471
+ papayawhip: "#ffefd5",
3472
+ peachpuff: "#ffdab9",
3473
+ peru: "#cd853f",
3474
+ pink: "#ffc0cb",
3475
+ plum: "#dda0dd",
3476
+ powderblue: "#b0e0e6",
3477
+ purple: "#800080",
3478
+ rebeccapurple: "#663399",
3479
+ red: "#ff0000",
3480
+ rosybrown: "#bc8f8f",
3481
+ royalblue: "#4169e1",
3482
+ saddlebrown: "#8b4513",
3483
+ salmon: "#fa8072",
3484
+ sandybrown: "#f4a460",
3485
+ seagreen: "#2e8b57",
3486
+ seashell: "#fff5ee",
3487
+ sienna: "#a0522d",
3488
+ silver: "#c0c0c0",
3489
+ skyblue: "#87ceeb",
3490
+ slateblue: "#6a5acd",
3491
+ slategray: "#708090",
3492
+ slategrey: "#708090",
3493
+ snow: "#fffafa",
3494
+ springgreen: "#00ff7f",
3495
+ steelblue: "#4682b4",
3496
+ tan: "#d2b48c",
3497
+ teal: "#008080",
3498
+ thistle: "#d8bfd8",
3499
+ tomato: "#ff6347",
3500
+ turquoise: "#40e0d0",
3501
+ violet: "#ee82ee",
3502
+ wheat: "#f5deb3",
3503
+ white: "#ffffff",
3504
+ whitesmoke: "#f5f5f5",
3505
+ yellow: "#ffff00",
3506
+ yellowgreen: "#9acd32"
3507
+ };
3508
+ function inputToRGB(color) {
3509
+ var rgb = {
3510
+ r: 0,
3511
+ g: 0,
3512
+ b: 0
3513
+ };
3514
+ var a = 1;
3515
+ var s = null;
3516
+ var v = null;
3517
+ var l = null;
3518
+ var ok = false;
3519
+ var format = false;
3520
+ if (typeof color === "string") color = stringInputToObject(color);
3521
+ if (typeof color === "object") {
3522
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
3523
+ rgb = rgbToRgb(color.r, color.g, color.b);
3524
+ ok = true;
3525
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
3526
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
3527
+ s = convertToPercentage(color.s);
3528
+ v = convertToPercentage(color.v);
3529
+ rgb = hsvToRgb(color.h, s, v);
3530
+ ok = true;
3531
+ format = "hsv";
3532
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
3533
+ s = convertToPercentage(color.s);
3534
+ l = convertToPercentage(color.l);
3535
+ rgb = hslToRgb(color.h, s, l);
3536
+ ok = true;
3537
+ format = "hsl";
3538
+ }
3539
+ if (Object.prototype.hasOwnProperty.call(color, "a")) a = color.a;
3540
+ }
3541
+ a = boundAlpha(a);
3542
+ return {
3543
+ ok,
3544
+ format: color.format || format,
3545
+ r: Math.min(255, Math.max(rgb.r, 0)),
3546
+ g: Math.min(255, Math.max(rgb.g, 0)),
3547
+ b: Math.min(255, Math.max(rgb.b, 0)),
3548
+ a
3549
+ };
3550
+ }
3551
+ var CSS_UNIT = "(?:".concat("[-\\+]?\\d*\\.\\d+%?", ")|(?:").concat("[-\\+]?\\d+%?", ")");
3552
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
3553
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
3554
+ var matchers = {
3555
+ CSS_UNIT: new RegExp(CSS_UNIT),
3556
+ rgb: /* @__PURE__ */ new RegExp("rgb" + PERMISSIVE_MATCH3),
3557
+ rgba: /* @__PURE__ */ new RegExp("rgba" + PERMISSIVE_MATCH4),
3558
+ hsl: /* @__PURE__ */ new RegExp("hsl" + PERMISSIVE_MATCH3),
3559
+ hsla: /* @__PURE__ */ new RegExp("hsla" + PERMISSIVE_MATCH4),
3560
+ hsv: /* @__PURE__ */ new RegExp("hsv" + PERMISSIVE_MATCH3),
3561
+ hsva: /* @__PURE__ */ new RegExp("hsva" + PERMISSIVE_MATCH4),
3562
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
3563
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
3564
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
3565
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
3566
+ };
3567
+ function stringInputToObject(color) {
3568
+ color = color.trim().toLowerCase();
3569
+ if (color.length === 0) return false;
3570
+ var named = false;
3571
+ if (names[color]) {
3572
+ color = names[color];
3573
+ named = true;
3574
+ } else if (color === "transparent") return {
3575
+ r: 0,
3576
+ g: 0,
3577
+ b: 0,
3578
+ a: 0,
3579
+ format: "name"
3580
+ };
3581
+ var match = matchers.rgb.exec(color);
3582
+ if (match) return {
3583
+ r: match[1],
3584
+ g: match[2],
3585
+ b: match[3]
3586
+ };
3587
+ match = matchers.rgba.exec(color);
3588
+ if (match) return {
3589
+ r: match[1],
3590
+ g: match[2],
3591
+ b: match[3],
3592
+ a: match[4]
3593
+ };
3594
+ match = matchers.hsl.exec(color);
3595
+ if (match) return {
3596
+ h: match[1],
3597
+ s: match[2],
3598
+ l: match[3]
3599
+ };
3600
+ match = matchers.hsla.exec(color);
3601
+ if (match) return {
3602
+ h: match[1],
3603
+ s: match[2],
3604
+ l: match[3],
3605
+ a: match[4]
3606
+ };
3607
+ match = matchers.hsv.exec(color);
3608
+ if (match) return {
3609
+ h: match[1],
3610
+ s: match[2],
3611
+ v: match[3]
3612
+ };
3613
+ match = matchers.hsva.exec(color);
3614
+ if (match) return {
3615
+ h: match[1],
3616
+ s: match[2],
3617
+ v: match[3],
3618
+ a: match[4]
3619
+ };
3620
+ match = matchers.hex8.exec(color);
3621
+ if (match) return {
3622
+ r: parseIntFromHex(match[1]),
3623
+ g: parseIntFromHex(match[2]),
3624
+ b: parseIntFromHex(match[3]),
3625
+ a: convertHexToDecimal(match[4]),
3626
+ format: named ? "name" : "hex8"
3627
+ };
3628
+ match = matchers.hex6.exec(color);
3629
+ if (match) return {
3630
+ r: parseIntFromHex(match[1]),
3631
+ g: parseIntFromHex(match[2]),
3632
+ b: parseIntFromHex(match[3]),
3633
+ format: named ? "name" : "hex"
3634
+ };
3635
+ match = matchers.hex4.exec(color);
3636
+ if (match) return {
3637
+ r: parseIntFromHex(match[1] + match[1]),
3638
+ g: parseIntFromHex(match[2] + match[2]),
3639
+ b: parseIntFromHex(match[3] + match[3]),
3640
+ a: convertHexToDecimal(match[4] + match[4]),
3641
+ format: named ? "name" : "hex8"
3642
+ };
3643
+ match = matchers.hex3.exec(color);
3644
+ if (match) return {
3645
+ r: parseIntFromHex(match[1] + match[1]),
3646
+ g: parseIntFromHex(match[2] + match[2]),
3647
+ b: parseIntFromHex(match[3] + match[3]),
3648
+ format: named ? "name" : "hex"
3649
+ };
3650
+ return false;
3651
+ }
3652
+ function isValidCSSUnit(color) {
3653
+ return Boolean(matchers.CSS_UNIT.exec(String(color)));
3654
+ }
3655
+ var TinyColor = function() {
3656
+ function TinyColor$1(color, opts) {
3657
+ if (color === void 0) color = "";
3658
+ if (opts === void 0) opts = {};
3659
+ var _a$1;
3660
+ if (color instanceof TinyColor$1) return color;
3661
+ if (typeof color === "number") color = numberInputToObject(color);
3662
+ this.originalInput = color;
3663
+ var rgb = inputToRGB(color);
3664
+ this.originalInput = color;
3665
+ this.r = rgb.r;
3666
+ this.g = rgb.g;
3667
+ this.b = rgb.b;
3668
+ this.a = rgb.a;
3669
+ this.roundA = Math.round(100 * this.a) / 100;
3670
+ this.format = (_a$1 = opts.format) !== null && _a$1 !== void 0 ? _a$1 : rgb.format;
3671
+ this.gradientType = opts.gradientType;
3672
+ if (this.r < 1) this.r = Math.round(this.r);
3673
+ if (this.g < 1) this.g = Math.round(this.g);
3674
+ if (this.b < 1) this.b = Math.round(this.b);
3675
+ this.isValid = rgb.ok;
3676
+ }
3677
+ TinyColor$1.prototype.isDark = function() {
3678
+ return this.getBrightness() < 128;
3679
+ };
3680
+ TinyColor$1.prototype.isLight = function() {
3681
+ return !this.isDark();
3682
+ };
3683
+ TinyColor$1.prototype.getBrightness = function() {
3684
+ var rgb = this.toRgb();
3685
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
3686
+ };
3687
+ TinyColor$1.prototype.getLuminance = function() {
3688
+ var rgb = this.toRgb();
3689
+ var R;
3690
+ var G;
3691
+ var B;
3692
+ var RsRGB = rgb.r / 255;
3693
+ var GsRGB = rgb.g / 255;
3694
+ var BsRGB = rgb.b / 255;
3695
+ if (RsRGB <= .03928) R = RsRGB / 12.92;
3696
+ else R = Math.pow((RsRGB + .055) / 1.055, 2.4);
3697
+ if (GsRGB <= .03928) G = GsRGB / 12.92;
3698
+ else G = Math.pow((GsRGB + .055) / 1.055, 2.4);
3699
+ if (BsRGB <= .03928) B = BsRGB / 12.92;
3700
+ else B = Math.pow((BsRGB + .055) / 1.055, 2.4);
3701
+ return .2126 * R + .7152 * G + .0722 * B;
3702
+ };
3703
+ TinyColor$1.prototype.getAlpha = function() {
3704
+ return this.a;
3705
+ };
3706
+ TinyColor$1.prototype.setAlpha = function(alpha) {
3707
+ this.a = boundAlpha(alpha);
3708
+ this.roundA = Math.round(100 * this.a) / 100;
3709
+ return this;
3710
+ };
3711
+ TinyColor$1.prototype.isMonochrome = function() {
3712
+ return this.toHsl().s === 0;
3713
+ };
3714
+ TinyColor$1.prototype.toHsv = function() {
3715
+ var hsv = rgbToHsv(this.r, this.g, this.b);
3716
+ return {
3717
+ h: hsv.h * 360,
3718
+ s: hsv.s,
3719
+ v: hsv.v,
3720
+ a: this.a
3721
+ };
3722
+ };
3723
+ TinyColor$1.prototype.toHsvString = function() {
3724
+ var hsv = rgbToHsv(this.r, this.g, this.b);
3725
+ var h = Math.round(hsv.h * 360);
3726
+ var s = Math.round(hsv.s * 100);
3727
+ var v = Math.round(hsv.v * 100);
3728
+ return this.a === 1 ? "hsv(".concat(h, ", ").concat(s, "%, ").concat(v, "%)") : "hsva(".concat(h, ", ").concat(s, "%, ").concat(v, "%, ").concat(this.roundA, ")");
3729
+ };
3730
+ TinyColor$1.prototype.toHsl = function() {
3731
+ var hsl = rgbToHsl(this.r, this.g, this.b);
3732
+ return {
3733
+ h: hsl.h * 360,
3734
+ s: hsl.s,
3735
+ l: hsl.l,
3736
+ a: this.a
3737
+ };
3738
+ };
3739
+ TinyColor$1.prototype.toHslString = function() {
3740
+ var hsl = rgbToHsl(this.r, this.g, this.b);
3741
+ var h = Math.round(hsl.h * 360);
3742
+ var s = Math.round(hsl.s * 100);
3743
+ var l = Math.round(hsl.l * 100);
3744
+ return this.a === 1 ? "hsl(".concat(h, ", ").concat(s, "%, ").concat(l, "%)") : "hsla(".concat(h, ", ").concat(s, "%, ").concat(l, "%, ").concat(this.roundA, ")");
3745
+ };
3746
+ TinyColor$1.prototype.toHex = function(allow3Char) {
3747
+ if (allow3Char === void 0) allow3Char = false;
3748
+ return rgbToHex(this.r, this.g, this.b, allow3Char);
3749
+ };
3750
+ TinyColor$1.prototype.toHexString = function(allow3Char) {
3751
+ if (allow3Char === void 0) allow3Char = false;
3752
+ return "#" + this.toHex(allow3Char);
3753
+ };
3754
+ TinyColor$1.prototype.toHex8 = function(allow4Char) {
3755
+ if (allow4Char === void 0) allow4Char = false;
3756
+ return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
3757
+ };
3758
+ TinyColor$1.prototype.toHex8String = function(allow4Char) {
3759
+ if (allow4Char === void 0) allow4Char = false;
3760
+ return "#" + this.toHex8(allow4Char);
3761
+ };
3762
+ TinyColor$1.prototype.toHexShortString = function(allowShortChar) {
3763
+ if (allowShortChar === void 0) allowShortChar = false;
3764
+ return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
3765
+ };
3766
+ TinyColor$1.prototype.toRgb = function() {
3767
+ return {
3768
+ r: Math.round(this.r),
3769
+ g: Math.round(this.g),
3770
+ b: Math.round(this.b),
3771
+ a: this.a
3772
+ };
3773
+ };
3774
+ TinyColor$1.prototype.toRgbString = function() {
3775
+ var r = Math.round(this.r);
3776
+ var g = Math.round(this.g);
3777
+ var b = Math.round(this.b);
3778
+ return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(this.roundA, ")");
3779
+ };
3780
+ TinyColor$1.prototype.toPercentageRgb = function() {
3781
+ var fmt = function(x) {
3782
+ return "".concat(Math.round(bound01(x, 255) * 100), "%");
3783
+ };
3784
+ return {
3785
+ r: fmt(this.r),
3786
+ g: fmt(this.g),
3787
+ b: fmt(this.b),
3788
+ a: this.a
3789
+ };
3790
+ };
3791
+ TinyColor$1.prototype.toPercentageRgbString = function() {
3792
+ var rnd = function(x) {
3793
+ return Math.round(bound01(x, 255) * 100);
3794
+ };
3795
+ 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, ")");
3796
+ };
3797
+ TinyColor$1.prototype.toName = function() {
3798
+ if (this.a === 0) return "transparent";
3799
+ if (this.a < 1) return false;
3800
+ var hex = "#" + rgbToHex(this.r, this.g, this.b, false);
3801
+ for (var _i = 0, _a$1 = Object.entries(names); _i < _a$1.length; _i++) {
3802
+ var _b = _a$1[_i], key = _b[0];
3803
+ if (hex === _b[1]) return key;
3804
+ }
3805
+ return false;
3806
+ };
3807
+ TinyColor$1.prototype.toString = function(format) {
3808
+ var formatSet = Boolean(format);
3809
+ format = format !== null && format !== void 0 ? format : this.format;
3810
+ var formattedString = false;
3811
+ var hasAlpha = this.a < 1 && this.a >= 0;
3812
+ if (!formatSet && hasAlpha && (format.startsWith("hex") || format === "name")) {
3813
+ if (format === "name" && this.a === 0) return this.toName();
3814
+ return this.toRgbString();
3815
+ }
3816
+ if (format === "rgb") formattedString = this.toRgbString();
3817
+ if (format === "prgb") formattedString = this.toPercentageRgbString();
3818
+ if (format === "hex" || format === "hex6") formattedString = this.toHexString();
3819
+ if (format === "hex3") formattedString = this.toHexString(true);
3820
+ if (format === "hex4") formattedString = this.toHex8String(true);
3821
+ if (format === "hex8") formattedString = this.toHex8String();
3822
+ if (format === "name") formattedString = this.toName();
3823
+ if (format === "hsl") formattedString = this.toHslString();
3824
+ if (format === "hsv") formattedString = this.toHsvString();
3825
+ return formattedString || this.toHexString();
3826
+ };
3827
+ TinyColor$1.prototype.toNumber = function() {
3828
+ return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
3829
+ };
3830
+ TinyColor$1.prototype.clone = function() {
3831
+ return new TinyColor$1(this.toString());
3832
+ };
3833
+ TinyColor$1.prototype.lighten = function(amount) {
3834
+ if (amount === void 0) amount = 10;
3835
+ var hsl = this.toHsl();
3836
+ hsl.l += amount / 100;
3837
+ hsl.l = clamp01(hsl.l);
3838
+ return new TinyColor$1(hsl);
3839
+ };
3840
+ TinyColor$1.prototype.brighten = function(amount) {
3841
+ if (amount === void 0) amount = 10;
3842
+ var rgb = this.toRgb();
3843
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
3844
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
3845
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
3846
+ return new TinyColor$1(rgb);
3847
+ };
3848
+ TinyColor$1.prototype.darken = function(amount) {
3849
+ if (amount === void 0) amount = 10;
3850
+ var hsl = this.toHsl();
3851
+ hsl.l -= amount / 100;
3852
+ hsl.l = clamp01(hsl.l);
3853
+ return new TinyColor$1(hsl);
3854
+ };
3855
+ TinyColor$1.prototype.tint = function(amount) {
3856
+ if (amount === void 0) amount = 10;
3857
+ return this.mix("white", amount);
3858
+ };
3859
+ TinyColor$1.prototype.shade = function(amount) {
3860
+ if (amount === void 0) amount = 10;
3861
+ return this.mix("black", amount);
3862
+ };
3863
+ TinyColor$1.prototype.desaturate = function(amount) {
3864
+ if (amount === void 0) amount = 10;
3865
+ var hsl = this.toHsl();
3866
+ hsl.s -= amount / 100;
3867
+ hsl.s = clamp01(hsl.s);
3868
+ return new TinyColor$1(hsl);
3869
+ };
3870
+ TinyColor$1.prototype.saturate = function(amount) {
3871
+ if (amount === void 0) amount = 10;
3872
+ var hsl = this.toHsl();
3873
+ hsl.s += amount / 100;
3874
+ hsl.s = clamp01(hsl.s);
3875
+ return new TinyColor$1(hsl);
3876
+ };
3877
+ TinyColor$1.prototype.greyscale = function() {
3878
+ return this.desaturate(100);
3879
+ };
3880
+ TinyColor$1.prototype.spin = function(amount) {
3881
+ var hsl = this.toHsl();
3882
+ var hue = (hsl.h + amount) % 360;
3883
+ hsl.h = hue < 0 ? 360 + hue : hue;
3884
+ return new TinyColor$1(hsl);
3885
+ };
3886
+ TinyColor$1.prototype.mix = function(color, amount) {
3887
+ if (amount === void 0) amount = 50;
3888
+ var rgb1 = this.toRgb();
3889
+ var rgb2 = new TinyColor$1(color).toRgb();
3890
+ var p = amount / 100;
3891
+ return new TinyColor$1({
3892
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
3893
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
3894
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
3895
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
3896
+ });
3897
+ };
3898
+ TinyColor$1.prototype.analogous = function(results, slices) {
3899
+ if (results === void 0) results = 6;
3900
+ if (slices === void 0) slices = 30;
3901
+ var hsl = this.toHsl();
3902
+ var part = 360 / slices;
3903
+ var ret = [this];
3904
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
3905
+ hsl.h = (hsl.h + part) % 360;
3906
+ ret.push(new TinyColor$1(hsl));
3907
+ }
3908
+ return ret;
3909
+ };
3910
+ TinyColor$1.prototype.complement = function() {
3911
+ var hsl = this.toHsl();
3912
+ hsl.h = (hsl.h + 180) % 360;
3913
+ return new TinyColor$1(hsl);
3914
+ };
3915
+ TinyColor$1.prototype.monochromatic = function(results) {
3916
+ if (results === void 0) results = 6;
3917
+ var hsv = this.toHsv();
3918
+ var h = hsv.h;
3919
+ var s = hsv.s;
3920
+ var v = hsv.v;
3921
+ var res = [];
3922
+ var modification = 1 / results;
3923
+ while (results--) {
3924
+ res.push(new TinyColor$1({
3925
+ h,
3926
+ s,
3927
+ v
3928
+ }));
3929
+ v = (v + modification) % 1;
3930
+ }
3931
+ return res;
3932
+ };
3933
+ TinyColor$1.prototype.splitcomplement = function() {
3934
+ var hsl = this.toHsl();
3935
+ var h = hsl.h;
3936
+ return [
3937
+ this,
3938
+ new TinyColor$1({
3939
+ h: (h + 72) % 360,
3940
+ s: hsl.s,
3941
+ l: hsl.l
3942
+ }),
3943
+ new TinyColor$1({
3944
+ h: (h + 216) % 360,
3945
+ s: hsl.s,
3946
+ l: hsl.l
3947
+ })
3948
+ ];
3949
+ };
3950
+ TinyColor$1.prototype.onBackground = function(background) {
3951
+ var fg = this.toRgb();
3952
+ var bg = new TinyColor$1(background).toRgb();
3953
+ var alpha = fg.a + bg.a * (1 - fg.a);
3954
+ return new TinyColor$1({
3955
+ r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
3956
+ g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
3957
+ b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
3958
+ a: alpha
3959
+ });
3960
+ };
3961
+ TinyColor$1.prototype.triad = function() {
3962
+ return this.polyad(3);
3963
+ };
3964
+ TinyColor$1.prototype.tetrad = function() {
3965
+ return this.polyad(4);
3966
+ };
3967
+ TinyColor$1.prototype.polyad = function(n) {
3968
+ var hsl = this.toHsl();
3969
+ var h = hsl.h;
3970
+ var result = [this];
3971
+ var increment = 360 / n;
3972
+ for (var i = 1; i < n; i++) result.push(new TinyColor$1({
3973
+ h: (h + i * increment) % 360,
3974
+ s: hsl.s,
3975
+ l: hsl.l
3976
+ }));
3977
+ return result;
3978
+ };
3979
+ TinyColor$1.prototype.equals = function(color) {
3980
+ return this.toRgbString() === new TinyColor$1(color).toRgbString();
3981
+ };
3982
+ return TinyColor$1;
3983
+ }();
3984
+ function darken(color, amount = 20) {
3985
+ return color.mix("#141414", amount).toString();
3986
+ }
3987
+ function useButtonCustomStyle(props) {
3988
+ const _disabled = useFormDisabled();
3989
+ const ns = useNamespace("button");
3990
+ return computed(() => {
3991
+ let styles = {};
3992
+ const buttonColor = props.color;
3993
+ if (buttonColor) {
3994
+ const color = new TinyColor(buttonColor);
3995
+ const activeBgColor = props.dark ? color.tint(20).toString() : darken(color, 20);
3996
+ if (props.plain) {
3997
+ styles = ns.cssVarBlock({
3998
+ "bg-color": props.dark ? darken(color, 90) : color.tint(90).toString(),
3999
+ "text-color": buttonColor,
4000
+ "border-color": props.dark ? darken(color, 50) : color.tint(50).toString(),
4001
+ "hover-text-color": `var(${ns.cssVarName("color-white")})`,
4002
+ "hover-bg-color": buttonColor,
4003
+ "hover-border-color": buttonColor,
4004
+ "active-bg-color": activeBgColor,
4005
+ "active-text-color": `var(${ns.cssVarName("color-white")})`,
4006
+ "active-border-color": activeBgColor
4007
+ });
4008
+ if (_disabled.value) {
4009
+ styles[ns.cssVarBlockName("disabled-bg-color")] = props.dark ? darken(color, 90) : color.tint(90).toString();
4010
+ styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? darken(color, 50) : color.tint(50).toString();
4011
+ styles[ns.cssVarBlockName("disabled-border-color")] = props.dark ? darken(color, 80) : color.tint(80).toString();
4012
+ }
4013
+ } else {
4014
+ const hoverBgColor = props.dark ? darken(color, 30) : color.tint(30).toString();
4015
+ const textColor = color.isDark() ? `var(${ns.cssVarName("color-white")})` : `var(${ns.cssVarName("color-black")})`;
4016
+ styles = ns.cssVarBlock({
4017
+ "bg-color": buttonColor,
4018
+ "text-color": textColor,
4019
+ "border-color": buttonColor,
4020
+ "hover-bg-color": hoverBgColor,
4021
+ "hover-text-color": textColor,
4022
+ "hover-border-color": hoverBgColor,
4023
+ "active-bg-color": activeBgColor,
4024
+ "active-border-color": activeBgColor
4025
+ });
4026
+ if (_disabled.value) {
4027
+ const disabledButtonColor = props.dark ? darken(color, 50) : color.tint(50).toString();
4028
+ styles[ns.cssVarBlockName("disabled-bg-color")] = disabledButtonColor;
4029
+ styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns.cssVarName("color-white")})`;
4030
+ styles[ns.cssVarBlockName("disabled-border-color")] = disabledButtonColor;
4031
+ }
4032
+ }
4033
+ }
4034
+ return styles;
4035
+ });
4036
+ }
4037
+ var Button = /* @__PURE__ */ _export_sfc(/* @__PURE__ */ defineComponent({
4038
+ ...defineComponent({ name: "ElButton" }),
4039
+ props: buttonProps,
4040
+ emits: buttonEmits,
4041
+ setup(__props, { expose, emit }) {
4042
+ const props = __props;
4043
+ const buttonStyle = useButtonCustomStyle(props);
4044
+ const ns = useNamespace("button");
4045
+ const { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } = useButton(props, emit);
4046
+ expose({
4047
+ ref: _ref,
4048
+ size: _size,
4049
+ type: _type,
4050
+ disabled: _disabled,
4051
+ shouldAddSpace
4052
+ });
4053
+ return (_ctx, _cache) => {
4054
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({
4055
+ ref_key: "_ref",
4056
+ ref: _ref
4057
+ }, unref(_props), {
4058
+ class: [
4059
+ unref(ns).b(),
4060
+ unref(ns).m(unref(_type)),
4061
+ unref(ns).m(unref(_size)),
4062
+ unref(ns).is("disabled", unref(_disabled)),
4063
+ unref(ns).is("loading", _ctx.loading),
4064
+ unref(ns).is("plain", _ctx.plain),
4065
+ unref(ns).is("round", _ctx.round),
4066
+ unref(ns).is("circle", _ctx.circle),
4067
+ unref(ns).is("text", _ctx.text),
4068
+ unref(ns).is("link", _ctx.link),
4069
+ unref(ns).is("has-bg", _ctx.bg)
4070
+ ],
4071
+ style: unref(buttonStyle),
4072
+ onClick: unref(handleClick)
4073
+ }), {
4074
+ default: withCtx(() => [_ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
4075
+ key: 1,
4076
+ class: normalizeClass(unref(ns).is("loading"))
4077
+ }, {
4078
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))]),
4079
+ _: 1
4080
+ }, 8, ["class"]))], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
4081
+ default: withCtx(() => [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })]),
4082
+ _: 3
4083
+ })) : createCommentVNode("v-if", true), _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
4084
+ key: 2,
4085
+ class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
4086
+ }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("v-if", true)]),
4087
+ _: 3
4088
+ }, 16, [
4089
+ "class",
4090
+ "style",
4091
+ "onClick"
4092
+ ]);
4093
+ };
4094
+ }
4095
+ }), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
4096
+ var buttonGroupProps = {
4097
+ size: buttonProps.size,
4098
+ type: buttonProps.type
4099
+ };
4100
+ var ButtonGroup = /* @__PURE__ */ _export_sfc(/* @__PURE__ */ defineComponent({
4101
+ ...defineComponent({ name: "ElButtonGroup" }),
4102
+ props: buttonGroupProps,
4103
+ setup(__props) {
4104
+ const props = __props;
4105
+ provide(buttonGroupContextKey, reactive({
4106
+ size: toRef(props, "size"),
4107
+ type: toRef(props, "type")
4108
+ }));
4109
+ const ns = useNamespace("button");
4110
+ return (_ctx, _cache) => {
4111
+ return openBlock(), createElementBlock("div", { class: normalizeClass(`${unref(ns).b("group")}`) }, [renderSlot(_ctx.$slots, "default")], 2);
4112
+ };
4113
+ }
4114
+ }), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
4115
+ var ElButton = withInstall(Button, { ButtonGroup });
4116
+ withNoopInstall(ButtonGroup);
4117
+ function createEventBus() {
4118
+ const handlers$1 = /* @__PURE__ */ new Map();
4119
+ return {
4120
+ on(eventName, fn) {
4121
+ let eventFns = handlers$1.get(eventName);
4122
+ if (!eventFns) eventFns = [fn];
4123
+ else eventFns.push(fn);
4124
+ handlers$1.set(eventName, eventFns);
4125
+ },
4126
+ once(eventName, fn) {
4127
+ const handler = (payload) => {
4128
+ this.off(eventName, handler);
4129
+ fn(payload);
4130
+ };
4131
+ this.on(eventName, handler);
4132
+ },
4133
+ off(eventName, fn) {
4134
+ const eventFns = handlers$1.get(eventName);
4135
+ if (eventFns) eventFns.splice(eventFns.indexOf(fn) >>> 0, 1);
4136
+ },
4137
+ emit(eventName, event) {
4138
+ const eventFns = handlers$1.get(eventName);
4139
+ if (eventFns) eventFns.slice().forEach((handler) => {
4140
+ handler(event);
4141
+ });
4142
+ }
4143
+ };
4144
+ }
4145
+ function isTaskAbortedMessage(msg) {
4146
+ return msg.type === "text" && "aborted" in msg && msg.aborted;
4147
+ }
4148
+ function isWorkflowUpdatedMessage(msg) {
4149
+ return msg.type === "workflow-updated";
4150
+ }
4151
+ function isToolMessage(msg) {
4152
+ return msg.type === "tool";
4153
+ }
4154
+ function isThinkingGroupMessage(msg) {
4155
+ return msg.type === "thinking-group";
4156
+ }
4157
+ const truncate = (text, length = 30) => text.length > length ? text.slice(0, length) + "..." : text;
4158
+ function truncateBeforeLast(text, maxLength, lastCharsLength = 5) {
4159
+ const chars = [];
4160
+ const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
4161
+ for (const { segment } of segmenter.segment(text)) chars.push(segment);
4162
+ if (chars.length <= maxLength) return text;
4163
+ const lastWordIndex = chars.findLastIndex((ch) => ch.match(/^\s+$/)) + 1;
4164
+ const lastWord = chars.slice(lastWordIndex);
4165
+ const ellipsis = "…";
4166
+ const ellipsisLength = 1;
4167
+ if (lastWord.length < 15) {
4168
+ const charsToRemove = chars.length - maxLength + ellipsisLength;
4169
+ const indexBeforeLastWord = lastWordIndex;
4170
+ const keepLength = indexBeforeLastWord - charsToRemove;
4171
+ if (keepLength > 0) return chars.slice(0, keepLength).join("") + ellipsis + chars.slice(indexBeforeLastWord).join("");
4172
+ }
4173
+ if (lastCharsLength < 1) return chars.slice(0, maxLength).join("") + ellipsis;
4174
+ return chars.slice(0, maxLength - lastCharsLength - ellipsisLength).join("") + ellipsis + chars.slice(-lastCharsLength).join("");
4175
+ }
4176
+ export { buildProps as $, _assignValue_default as $t, useLocale as A, debugWarn as At, INPUT_EVENT as B, isUndefined as Bt, useSizeProp as C, computedEager as Cn, getScrollBarWidth as Ct, defaultNamespace as D, useTimeoutFn as Dn, getStyle as Dt, useIdInjection as E, tryOnScopeDispose as En, addUnit as Et, flattedChildren as F, escapeStringRegexp as Ft, withInstallFunction as G, get_default as Gt, datePickTypes as H, isNil_default as Ht, isValidComponentSize as I, isBoolean as It, TypeComponents as J, _castPath_default as Jt, withNoopInstall as K, _baseGet_default as Kt, componentSizeMap as L, isElement as Lt, mutable as M, entriesOf as Mt, isKorean as N, getProp as Nt, useGetDerivedNamespace as O, obtainAllFocusableElements$1 as On, hasClass as Ot, PatchFlags as P, capitalize$1 as Pt, buildProp as Q, _isKey_default as Qt, componentSizes as R, isEmpty as Rt, useFocusController as S, useWindowFocus as Sn, zoom_in_default as St, useId as T, isIOS as Tn, addClass as Tt, EVENT_CODE as U, fromPairs_default as Ut, UPDATE_MODEL_EVENT as V, _baseSet_default as Vt, withInstall as W, debounce_default as Wt, ValidateComponentsMap as X, _Map_default as Xt, TypeComponentsMap as Y, _MapCache_default as Yt, iconPropType as Z, _ListCache_default as Zt, formItemContextKey as _, unrefElement as _n, more_default as _t, isToolMessage as a, _toSource_default as an, calendar_default as at, useGlobalComponentSettings as b, useResizeObserver as bn, plus_default as bt, ElButton as c, isObject_default as cn, circle_close_default as ct, FOCUS_TRAP_INJECTION_KEY as d, isObjectLike_default as dn, d_arrow_left_default as dt, eq_default as en, definePropType as et, ElInput as f, _baseGetTag_default as fn, d_arrow_right_default as ft, useFormSize as g, onClickOutside as gn, minus_default as gt, useFormDisabled as h, _freeGlobal_default as hn, loading_default as ht, isThinkingGroupMessage as i, _getNative_default as in, arrow_up_default as it, useDeprecated as j, throwError as jt, useNamespace as k, triggerEvent as kn, removeClass as kt, TinyColor as l, isArray_default as ln, clock_default as lt, useFormItemInputId as m, _root_default as mn, document_default as mt, truncateBeforeLast as n, _isIndex_default as nn, arrow_left_default as nt, isWorkflowUpdatedMessage as o, isFunction_default as on, check_default as ot, useFormItem as p, _Symbol_default as pn, delete_default as pt, CloseComponents as q, _toKey_default as qt, isTaskAbortedMessage as r, _defineProperty_default as rn, arrow_right_default as rt, createEventBus as s, toNumber_default as sn, circle_check_default as st, truncate as t, _baseAssignValue_default as tn, arrow_down_default as tt, ElFocusTrap as u, _arrayMap_default as un, close_default as ut, ElIcon as v, useDocumentVisibility as vn, more_filled_default as vt, useZIndex as w, isClient as wn, scrollIntoView as wt, useGlobalConfig as x, useVModel as xn, warning_filled_default as xt, _export_sfc as y, useEventListener as yn, picture_filled_default as yt, CHANGE_EVENT as z, isNumber as zt };