@runeya/runeya 2.0.135 → 2.0.136
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.
- package/{chat-IQBWQCTK.js → chat-UBUGGGBZ.js} +3 -3
- package/{chunk-GISLEYNE.js → chunk-5JUONZ3G.js} +3 -3
- package/{chunk-M3UUGW5Z.js → chunk-G4CR7O3L.js} +66 -395
- package/chunk-G4CR7O3L.js.map +1 -0
- package/{companion-YQ7CGW7W.js → companion-U3FKH7SQ.js} +2 -2
- package/index.js +3 -3
- package/package.json +1 -1
- package/{src-NMMPS4ZF.js → src-XAKZS5VF.js} +4 -4
- package/{src-NMMPS4ZF.js.map → src-XAKZS5VF.js.map} +1 -1
- package/web/assets/AgentScalarChatInterface.vue-BGGkpyp3.js +13 -0
- package/web/assets/AgentTerminalPage-B8gLray2.js +1 -0
- package/web/assets/AiChatPage-BKITsyMx.js +1 -0
- package/web/assets/AppLayout-B72S4nTi.css +1 -0
- package/web/assets/AppLayout-BYw7v2sp.js +1 -0
- package/web/assets/AuditPage-nHTwzyia.js +1 -0
- package/web/assets/CloudAccountPage-DuaZz2j4.js +1 -0
- package/web/assets/CloudAccountPage-XHxI-ixD.js +1 -0
- package/web/assets/CloudMessagingPage-B2N5K-Xs.js +2 -0
- package/web/assets/DashboardPage-VoWJeWh_.js +1 -0
- package/web/assets/DirectoryPickerDialog-B5SuJOhv.js +1 -0
- package/web/assets/{EditorIcon-Bhdvfd12.js → EditorIcon-DXYoMZnL.js} +2 -2
- package/web/assets/{EnvironmentForm-qEODCXoN.js → EnvironmentForm-D3pZuxVn.js} +2 -2
- package/web/assets/EnvironmentFormPage-BIXbPTN5.js +1 -0
- package/web/assets/EnvironmentListPage-CHa-Ni3w.js +1 -0
- package/web/assets/KanbanBoardPage-B46zbE2H.css +1 -0
- package/web/assets/KanbanBoardPage-BFTNpm8P.js +4 -0
- package/web/assets/KanbanListPage-CYuIrKXH.js +1 -0
- package/web/assets/LaunchProjectPage-jy-R3Fiw.js +1 -0
- package/web/assets/LaunchServicesPage-DX7nyo36.js +1 -0
- package/web/assets/LaunchShell-BHfseuPM.js +1 -0
- package/web/assets/LogViewer-C-pHXudR.js +3 -0
- package/web/assets/OrgKeyPrompt-OPnK5oPm.js +1 -0
- package/web/assets/OrgLogo-Cxa49Tl3.js +1 -0
- package/web/assets/{ProcessControls-DM8lfeiV.js → ProcessControls-DXDyR6XX.js} +1 -1
- package/web/assets/ProcessDetailPage-DNKTwgPW.js +1 -0
- package/web/assets/ProcessMetrics-CdQc_8Z0.js +168 -0
- package/web/assets/RandomJobTestPage-BE8HkgSb.js +2 -0
- package/web/assets/ScenarioEditorPage-COC03w7b.css +1 -0
- package/web/assets/ScenarioEditorPage-Coo6ExzZ.js +14 -0
- package/web/assets/SendToChatDialog-ClXerpCU.js +1 -0
- package/web/assets/ServiceControlsBar-C7HrPjQI.js +1 -0
- package/web/assets/{ServiceDetailPage-cQNK1uWq.css → ServiceDetailPage-BhFOqSte.css} +1 -1
- package/web/assets/ServiceDetailPage-Cxuy0Yix.js +2 -0
- package/web/assets/ServiceFormPage-CCOu1h8v.js +1 -0
- package/web/assets/{SettingsPage-CDugr781.css → SettingsPage-DA7lVKfg.css} +1 -1
- package/web/assets/SettingsPage-Dt1ViDQe.js +2063 -0
- package/web/assets/UnlockPage-C5iEOAKH.js +1 -0
- package/web/assets/VaultMigrationPage-CwRWvFY7.js +1 -0
- package/web/assets/VersionBadge-Bqb72GXf.js +1 -0
- package/web/assets/WikiPage-Bl1jDKKp.js +1 -0
- package/web/assets/WikiView-58u6vU3q.js +1 -0
- package/web/assets/WikiView-BqO5AEaY.css +1 -0
- package/web/assets/add-scalar-classes-CT5KQbzH.js +387 -0
- package/web/assets/{autocomplete-ChFfCprn.js → autocomplete-DobAPPYJ.js} +3 -3
- package/web/assets/{basic-shape-diamond.svg-DMXCGOOi.js → basic-shape-diamond.svg-FbeAPLc-.js} +1 -1
- package/web/assets/{basic-shape-hexagon.svg-CYIcPMdS.js → basic-shape-hexagon.svg-CtwcdpTe.js} +1 -1
- package/web/assets/{basic-shape-primary-circle-ellipse-round.svg-Cwmrd1Ez.js → basic-shape-primary-circle-ellipse-round.svg-DsSs3S2_.js} +1 -1
- package/web/assets/{basic-shape-primary-square-rectangle.svg-C6jxeZnm.js → basic-shape-primary-square-rectangle.svg-CNe1RNx8.js} +1 -1
- package/web/assets/{basic-shape-shield.svg-DbCz35E5.js → basic-shape-shield.svg-DwZMLfah.js} +1 -1
- package/web/assets/{browser-CIvjpXha.js → browser-DsZ9HxVm.js} +1 -1
- package/web/assets/{browser-Dqcl_H7_.js → browser-Dz1gvldT.js} +1 -1
- package/web/assets/card-46tM5yU0.js +32 -0
- package/web/assets/{checkbox-D2Iuu4UI.js → checkbox-DPknldTJ.js} +3 -3
- package/web/assets/chevronup-D2Lr2GiV.js +151 -0
- package/web/assets/{chip-C6j_aNV_.js → chip-Caiakd-N.js} +2 -2
- package/web/assets/client-KL5c1Dog.js +24 -0
- package/web/assets/cloud-chat.store-Belo5SKd.js +1 -0
- package/web/assets/cloud-client-Cqa2Udt8.js +1 -0
- package/web/assets/cloud-session-56bUtkSL.js +2 -0
- package/web/assets/cloud-session-Dqm0C6H5.js +1 -0
- package/web/assets/column-DQ53_qc6.js +763 -0
- package/web/assets/{composables-CSWX_0A0.js → composables-CHyZa9ag.js} +1 -1
- package/web/assets/{computer-device-desktop-monitor.svg-B2C-kd0i.js → computer-device-desktop-monitor.svg-CwiGN14T.js} +1 -1
- package/web/assets/{computer-device-desktop.svg-3yHh_J9J.js → computer-device-desktop.svg-BC2VdXDZ.js} +1 -1
- package/web/assets/{computer-device-laptop.svg-DFT8iA2v.js → computer-device-laptop.svg-BOp8AKN6.js} +1 -1
- package/web/assets/{computer-device-mobile-phone-android-samsung-back.svg-CMmFiUFT.js → computer-device-mobile-phone-android-samsung-back.svg-CmbpPX1u.js} +1 -1
- package/web/assets/{computer-device-mobile-phone-android-samsung.svg-zfLcL76y.js → computer-device-mobile-phone-android-samsung.svg-_WGKWVtZ.js} +1 -1
- package/web/assets/{computer-device-mobile-phone-iphone-x-back.svg-avbsjvM5.js → computer-device-mobile-phone-iphone-x-back.svg-DmLh97KG.js} +1 -1
- package/web/assets/{computer-device-mobile-phone-iphone-x.svg-d5iGTMZf.js → computer-device-mobile-phone-iphone-x.svg-C7-5mdyV.js} +1 -1
- package/web/assets/{computer-device-mobile-tablet-touch.svg-Bs2yfb4a.js → computer-device-mobile-tablet-touch.svg-DiUaSnhU.js} +1 -1
- package/web/assets/{computer-device-mobile-tablet.svg-C4zqv1Np.js → computer-device-mobile-tablet.svg-B6nfbYm_.js} +1 -1
- package/web/assets/{computer-device-network-ethernet-cat6.svg-BNu3-DX-.js → computer-device-network-ethernet-cat6.svg-DwtVKy79.js} +1 -1
- package/web/assets/{computer-device-network-lan-www.svg-DKWvhIUS.js → computer-device-network-lan-www.svg-vQKfG3Xz.js} +1 -1
- package/web/assets/{computer-device-network-wifi-connection.svg-BeVB4uVk.js → computer-device-network-wifi-connection.svg-DhHaOUge.js} +1 -1
- package/web/assets/{computer-device-network-wifi-router.svg-ByESRUy1.js → computer-device-network-wifi-router.svg-1dQS4k4J.js} +1 -1
- package/web/assets/{cssMode-CYkE5lQ9.js → cssMode-CdQL22W5.js} +1 -1
- package/web/assets/{divider-CA3yAI2V.js → divider-DhYR4BAO.js} +2 -2
- package/web/assets/{docx-preview-DWhG4PqM.js → docx-preview-D-jP_CCs.js} +1 -1
- package/web/assets/{ecology-science-erlenmeyer-flask.svg-D-XnpZzI.js → ecology-science-erlenmeyer-flask.svg-D76wQVA2.js} +1 -1
- package/web/assets/{fieldset-B8HuDLeH.js → fieldset-BtOjs_Hh.js} +2 -2
- package/web/assets/{freemarker2-D4-v7trZ.js → freemarker2-BADW9vhy.js} +1 -1
- package/web/assets/{handlebars-DjpO5k1R.js → handlebars-CwWQD_C8.js} +1 -1
- package/web/assets/{html-DFrFD9Vs.js → html-y87CEbe3.js} +1 -1
- package/web/assets/{htmlMode-DOefWnsd.js → htmlMode-CVagtvVh.js} +1 -1
- package/web/assets/{image-flash-lightning.svg-D3j4zBSy.js → image-flash-lightning.svg-OvpKi3a3.js} +1 -1
- package/web/assets/{image-picture-flower.svg-DQwZxx5i.js → image-picture-flower.svg-DLOePozT.js} +1 -1
- package/web/assets/index-CKOtBNaZ.css +1 -0
- package/web/assets/{index-C0stqCbw.js → index-CcIrffU_.js} +363 -583
- package/web/assets/{interface-alert-exclamation-diamond.svg-Wi3odtkW.js → interface-alert-exclamation-diamond.svg-4Vk7SoQ1.js} +1 -1
- package/web/assets/{interface-alert-exclamation-triangle-warning.svg-CReCCTTv.js → interface-alert-exclamation-triangle-warning.svg-BLAvc4am.js} +1 -1
- package/web/assets/{interface-alert-information-circle.svg-CcYDlXW6.js → interface-alert-information-circle.svg-CaAXpDAI.js} +1 -1
- package/web/assets/{interface-award-crown.svg-nShV1eoE.js → interface-award-crown.svg-CW7XG0wx.js} +1 -1
- package/web/assets/{interface-bookmark.svg-C7rl6oRl.js → interface-bookmark-tag.svg-DPWVVeZU.js} +1 -1
- package/web/assets/{interface-bookmark-tag.svg-Bcxcf9m_.js → interface-bookmark.svg-BpLEuOv2.js} +1 -1
- package/web/assets/{interface-calendar-date-one.svg-Dr1oFk40.js → interface-calendar-date-one.svg-DbBgvI4W.js} +1 -1
- package/web/assets/{interface-content-book-open-pages.svg-5k2_6iyY.js → interface-content-book-open-pages.svg-BbsuvPZM.js} +1 -1
- package/web/assets/{interface-content-book-page.svg-CVq67m2W.js → interface-content-book-page.svg-DbRPz1j8.js} +1 -1
- package/web/assets/{interface-content-file.svg-BTGOcunz.js → interface-content-file.svg-OJPKABxS.js} +1 -1
- package/web/assets/{interface-content-folder.svg-c7jw0JHU.js → interface-content-folder.svg-3D_5OE_-.js} +1 -1
- package/web/assets/interface-content-folder.svg-8mYqkDao.js +1 -0
- package/web/assets/{interface-copy-clipboard.svg-CDxFW9t5.js → interface-copy-clipboard.svg-DqthVh9J.js} +1 -1
- package/web/assets/{interface-edit-attachment.svg-ALzerCj2.js → interface-edit-attachment.svg-BAPCnZ0B.js} +1 -1
- package/web/assets/{interface-edit-binocular.svg-B8ugIA3a.js → interface-edit-binocular.svg-BoV39ouF.js} +1 -1
- package/web/assets/{interface-edit-magic-wand.svg-DUS1BcE7.js → interface-edit-magic-wand.svg-Cz36nKVn.js} +1 -1
- package/web/assets/{interface-edit-tool-paint-roller.svg-B2yecsyu.js → interface-edit-tool-paint-roller.svg-DZUQotD5.js} +1 -1
- package/web/assets/{interface-edit-tool-pencil.svg-CXrPC_TT.js → interface-edit-tool-pencil.svg-DBf1Y9Tj.js} +1 -1
- package/web/assets/{interface-favorite-award.svg-Cp_oIcCh.js → interface-favorite-award.svg-B93sRjxf.js} +1 -1
- package/web/assets/{interface-favorite-flag.svg-B36MDZwI.js → interface-favorite-flag.svg-DKHuT11J.js} +1 -1
- package/web/assets/{interface-favorite-heart.svg-CTV6u1U4.js → interface-favorite-heart.svg-Bw5FZQ7d.js} +1 -1
- package/web/assets/{interface-favorite-star.svg-OdL5QrWJ.js → interface-favorite-star.svg-CgLbct_b.js} +1 -1
- package/web/assets/{interface-favorite-stars-sparkles.svg-BqWJOXGz.js → interface-favorite-stars-sparkles.svg-B7cYS4ef.js} +1 -1
- package/web/assets/{interface-hierarchy-flowchart.svg-CuSQQZNq.js → interface-hierarchy-flowchart.svg-zwuaRdWq.js} +1 -1
- package/web/assets/{interface-home-house.svg-C3MlUubV.js → interface-home-house.svg-B85yMFCe.js} +1 -1
- package/web/assets/{interface-hyperlink.svg-BYd5gh77.js → interface-hyperlink.svg-US6b-Svn.js} +1 -1
- package/web/assets/{interface-lighting-brightness.svg-Dg3GdUm9.js → interface-lighting-brightness.svg-mZWkhb7f.js} +1 -1
- package/web/assets/{interface-lock-closed.svg-DwBww-yp.js → interface-lock-closed.svg-9oHuNwuY.js} +1 -1
- package/web/assets/{interface-lock-open-unlock.svg-BPSHjpM5.js → interface-lock-open-unlock.svg-DBetdJny.js} +1 -1
- package/web/assets/{interface-login-key.svg-CAKOhBJY.js → interface-login-key.svg-BZnZTYd1.js} +1 -1
- package/web/assets/{interface-search.svg-C-J35EwT.js → interface-search.svg-CMXAOoam.js} +1 -1
- package/web/assets/{interface-setting-cog.svg-CPTM4JUK.js → interface-setting-cog.svg-CKckatt7.js} +1 -1
- package/web/assets/{interface-share-megaphone-bullhorn.svg-De8kepxS.js → interface-share-megaphone-bullhorn.svg-DH7kVqN-.js} +1 -1
- package/web/assets/{interface-share-rocket.svg-Drx2GamR.js → interface-share-rocket.svg-BNXcMugi.js} +1 -1
- package/web/assets/{interface-share-satellite.svg-CpcvwNrN.js → interface-share-satellite.svg-Bb8t607w.js} +1 -1
- package/web/assets/{interface-share-space-ship.svg-C1rwdvlT.js → interface-share-space-ship.svg-Dk4rbLtF.js} +1 -1
- package/web/assets/{interface-share.svg-CgYmRRi3.js → interface-share.svg-CtX8dq5i.js} +1 -1
- package/web/assets/{interface-signal-square.svg-D18HXtaZ.js → interface-signal-square.svg-DmUIlYTd.js} +1 -1
- package/web/assets/{interface-time-clock-circle.svg-CnJh3zUx.js → interface-time-clock-circle.svg-D2ZNaXT3.js} +1 -1
- package/web/assets/{interface-time-hour-glass.svg-CJ43-28R.js → interface-time-hour-glass.svg-Ddo-8hHe.js} +1 -1
- package/web/assets/{interface-users-multiple.svg-DUoZG3ny.js → interface-users-multiple.svg-Jh7S0sT4.js} +1 -1
- package/web/assets/{interface-weather-moon.svg-C6iv_sYC.js → interface-weather-moon.svg-DbdQFgL2.js} +1 -1
- package/web/assets/{javascript-C9ITR2y1.js → javascript-BVGFyXBk.js} +1 -1
- package/web/assets/{jsonMode-CVg8GDEH.js → jsonMode-vnFlxYl9.js} +2 -2
- package/web/assets/{liquid-QQuSH6xu.js → liquid-DieKMEvN.js} +1 -1
- package/web/assets/{lspLanguageFeatures-Dw4848W6.js → lspLanguageFeatures-DoeI-8Y7.js} +3 -3
- package/web/assets/{mail-chat-bubble-square.svg-BazJ_62-.js → mail-chat-bubble-square.svg-CApdU2ea.js} +1 -1
- package/web/assets/{mail-send-email-paper-airplane.svg-B-Dxyqfp.js → mail-send-email-paper-airplane.svg-jjZ0KB32.js} +1 -1
- package/web/assets/{mail-send-envelope.svg-C8b7sbKN.js → mail-send-envelope.svg-B6Tsoh-8.js} +1 -1
- package/web/assets/{mdx-DAF1FZmF.js → mdx-BCkszXid.js} +1 -1
- package/web/assets/{minus-CSyILGbg.js → minus-DfLQX3s2.js} +2 -2
- package/web/assets/modal-CCco27Sn.js +5 -0
- package/web/assets/modal-D4J85_wC.js +1 -0
- package/web/assets/{money-cashier-receipt.svg--Lc3cf7X.js → money-cashier-receipt.svg-DM-I8Snr.js} +1 -1
- package/web/assets/{money-currency-dollar-pay.svg-Dj5mJsZo.js → money-currency-dollar-pay.svg-CkDRewrV.js} +1 -1
- package/web/assets/{money-graph-arrow-increase.svg-BxDK2s6g.js → money-graph-arrow-increase.svg-BT4KLHWz.js} +1 -1
- package/web/assets/{money-graph-bar-chart-increase.svg-DGZaFMZM.js → money-graph-bar-chart-increase.svg-EvyIJ3Uu.js} +1 -1
- package/web/assets/{multiselect-Dn8j6BKj.js → multiselect-BmjidXlj.js} +3 -3
- package/web/assets/{nature-ecology-leaf.svg-CWHdLRYI.js → nature-ecology-leaf.svg-uZBwXdg9.js} +1 -1
- package/web/assets/{password-BHZmKoIG.js → password-D1R5w1qL.js} +4 -4
- package/web/assets/{phone-telephone.svg-DsOG1joc.js → phone-telephone.svg-BSvOskIB.js} +1 -1
- package/web/assets/{plus-fHFXXVKA.js → plus-CNGSRnxy.js} +6 -6
- package/web/assets/process.store-p1LqnpY2.js +1 -0
- package/web/assets/{programming-bug.svg-QYUdmLY5.js → programming-bug.svg-CLnGs4K-.js} +1 -1
- package/web/assets/{programming-cloud.svg-C6znZJ-C.js → programming-cloud.svg-CxBovXBR.js} +1 -1
- package/web/assets/{programming-computer-database-server.svg-3XQZgkj3.js → programming-computer-database-server.svg-C1JmOyio.js} +1 -1
- package/web/assets/{programming-computer-database.svg-6OF1JaA-.js → programming-computer-database.svg-BRjyOzP4.js} +1 -1
- package/web/assets/{programming-module-four-layout.svg-DN7C2xQ3.js → programming-module-four-layout.svg-Blwzw6Qz.js} +1 -1
- package/web/assets/{programming-module-three.svg-8zjQz2zh.js → programming-module-three.svg-6bkrmWsU.js} +1 -1
- package/web/assets/{programming-module.svg-BQpaVQTI.js → programming-module.svg-CBS9xKxX.js} +1 -1
- package/web/assets/{programming-script-code.svg-C5U07Bnn.js → programming-script-code.svg-BVhyoAD3.js} +1 -1
- package/web/assets/project-launch.store-BBYtCcv8.js +1 -0
- package/web/assets/project.store-D_2v7amt.js +1 -0
- package/web/assets/{python-CIZTrsB5.js → python-CiPYtj_d.js} +1 -1
- package/web/assets/{radiobutton-DiazMmAi.js → radiobutton--KWBHcDP.js} +3 -2
- package/web/assets/{razor-BN7EghYh.js → razor-CSoWGP30.js} +1 -1
- package/web/assets/router-CRKT3825.js +1 -0
- package/web/assets/{selectbutton-BLjfO8t-.js → selectbutton-C0NL5n4w.js} +4 -4
- package/web/assets/settings-scope-DblmUa3N.js +1 -0
- package/web/assets/{settings.store-BfxfuLM2.js → settings.store-DKTQyerJ.js} +1 -1
- package/web/assets/{shopping-cart.svg-qy6s5BGQ.js → shopping-cart.svg-C-8NG_Po.js} +1 -1
- package/web/assets/{shopping-gift-present.svg-C9HdpVxJ.js → shopping-gift-present.svg-Bp6q5VzJ.js} +1 -1
- package/web/assets/{shopping-shipping-box-parcel-package.svg-CMFuFIDh.js → shopping-shipping-box-parcel-package.svg-DeWaEIwm.js} +1 -1
- package/web/assets/{src-DzTHX0Uv.js → src-BHR3l7pa.js} +17 -17
- package/web/assets/{src-CkT0Buv_.css → src-BN5gTC76.css} +1 -1
- package/web/assets/src-BRLkogf3.js +1 -0
- package/web/assets/{tag-new-circle.svg-CfhsqJra.js → tag-new-circle.svg-CTljXsqE.js} +1 -1
- package/web/assets/theme-BZzt_Sgl.js +1 -0
- package/web/assets/{toggleswitch-CjP0YQIo.js → toggleswitch-d41l5g27.js} +2 -2
- package/web/assets/{travel-map-earth-globe.svg-DoZqANqT.js → travel-map-earth-globe.svg-BUkcntCp.js} +1 -1
- package/web/assets/trpc-Db0Atu8A.js +1 -0
- package/web/assets/{tsMode-tM0mPX0S.js → tsMode-B2c-rCAa.js} +4 -4
- package/web/assets/{typescript-BEUIW-V_.js → typescript-CmW4u_GQ.js} +1 -1
- package/web/assets/useAiChatDrawer-0QJJVXul.js +1 -0
- package/web/assets/useCloudOrg-E4l-99WA.js +1 -0
- package/web/assets/useEnvVarAutocomplete-BDqUWoGr.js +102 -0
- package/web/assets/{useProjectCatalog-BdouNxux.js → useProjectCatalog-Cxt-hL1H.js} +1 -1
- package/web/assets/{useProjectCloudOrg-BHkyD0dP.js → useProjectCloudOrg-CwLTQLIO.js} +1 -1
- package/web/assets/useServiceUrlHost-VIA3uP5-.js +1 -0
- package/web/assets/{xml-dZzMKM-n.js → xml-BxMqu3hT.js} +1 -1
- package/web/assets/{yaml-Bm1gOrCp.js → yaml-Djx7E3R1.js} +1 -1
- package/web/index.html +2 -2
- package/chunk-M3UUGW5Z.js.map +0 -1
- package/web/assets/AgentScalarChatInterface.vue-DMB64kMa.js +0 -13
- package/web/assets/AgentTerminalPage-RN_RhpdH.js +0 -1
- package/web/assets/AiChatPage-9ko8n9o-.js +0 -1
- package/web/assets/AppLayout-C_tqGN1Z.js +0 -1
- package/web/assets/AppLayout-Db2KGjwQ.css +0 -1
- package/web/assets/AuditPage-CiOsIB_G.js +0 -1
- package/web/assets/CloudAccountPage-BPQs7Ukh.js +0 -1
- package/web/assets/CloudAccountPage-vlELc9s4.js +0 -1
- package/web/assets/CloudMessagingPage-CXVBG7G_.js +0 -2
- package/web/assets/DashboardPage-DaN6l4Aq.js +0 -1
- package/web/assets/DirectoryPickerDialog-DMAE3RCc.js +0 -1
- package/web/assets/EnvironmentFormPage-CsdoKvWm.js +0 -1
- package/web/assets/EnvironmentListPage-DNvRlujy.js +0 -1
- package/web/assets/KanbanBoardPage-BvJB1vAN.js +0 -4
- package/web/assets/KanbanBoardPage-acfjgSse.css +0 -1
- package/web/assets/KanbanListPage-BXS70nXB.js +0 -1
- package/web/assets/LaunchProjectPage-qh5FY_Hp.js +0 -1
- package/web/assets/LaunchServicesPage-cRa4PpoA.js +0 -1
- package/web/assets/LaunchShell-Xp_uKnnV.js +0 -1
- package/web/assets/LogViewer-DEa33rcG.js +0 -3
- package/web/assets/OrgKeyPrompt-DjAzt1_e.js +0 -1
- package/web/assets/OrgLogo-B90FSNG_.js +0 -1
- package/web/assets/ProcessDetailPage-CWOy22x2.js +0 -1
- package/web/assets/ProcessMetrics-C2I4giT-.js +0 -51
- package/web/assets/RandomJobTestPage-DwHtCAFt.js +0 -2
- package/web/assets/ScenarioEditorPage-CsqHIJjY.js +0 -14
- package/web/assets/ScenarioEditorPage-GmFIXPDj.css +0 -1
- package/web/assets/SendToChatDialog-CKm3Uyu8.js +0 -1
- package/web/assets/ServiceControlsBar-Cqr7rrv_.js +0 -1
- package/web/assets/ServiceDetailPage-CcBr0uNs.js +0 -2
- package/web/assets/ServiceFormPage-CzSFKd5J.js +0 -1
- package/web/assets/SettingsPage-BXY3tCv6.js +0 -2063
- package/web/assets/UnlockPage-Dz_ZeUOS.js +0 -1
- package/web/assets/VaultMigrationPage-ac8mXUny.js +0 -1
- package/web/assets/VersionBadge-DkNYiMGe.js +0 -1
- package/web/assets/WikiPage-ZAFnZhOV.js +0 -1
- package/web/assets/WikiView-CaUVD3f1.css +0 -1
- package/web/assets/WikiView-DEv8qkPA.js +0 -1
- package/web/assets/add-scalar-classes-DsQIWkxF.js +0 -387
- package/web/assets/card-BFnzVWOY.js +0 -32
- package/web/assets/client-DI09uuoY.js +0 -24
- package/web/assets/cloud-chat.store-DiiPfn2Z.js +0 -1
- package/web/assets/cloud-client-CvBR_p1A.js +0 -1
- package/web/assets/cloud-session-B__x9RFv.js +0 -2
- package/web/assets/cloud-session-CL_GKNrJ.js +0 -1
- package/web/assets/column-CrgQlR1x.js +0 -763
- package/web/assets/index-rUoTy8xc.css +0 -1
- package/web/assets/interface-content-folder.svg-Vn-2b_F8.js +0 -1
- package/web/assets/modal-BmOMX0EL.js +0 -5
- package/web/assets/modal-X_BQCOfK.js +0 -1
- package/web/assets/process.store-C0m4Wixd.js +0 -1
- package/web/assets/project-launch.store-GKs5Jjsm.js +0 -1
- package/web/assets/project.store-C_os4Nr_.js +0 -1
- package/web/assets/router-29Kkqv0z.js +0 -1
- package/web/assets/settings-scope-nt8KoQ24.js +0 -1
- package/web/assets/src-BFi137TM.js +0 -1
- package/web/assets/tabpanel-D9tIljjF.js +0 -150
- package/web/assets/theme-To2Yx9kx.js +0 -1
- package/web/assets/trpc-DiE7rC1k.js +0 -1
- package/web/assets/useAiChatDrawer-DorHkhHZ.js +0 -1
- package/web/assets/useCloudOrg-ieBKFf0P.js +0 -1
- package/web/assets/useEnvVarAutocomplete-Dqk4Xmzl.js +0 -1
- package/web/assets/useServiceUrlHost-D3DylMsX.js +0 -1
- /package/{chat-IQBWQCTK.js.map → chat-UBUGGGBZ.js.map} +0 -0
- /package/{chunk-GISLEYNE.js.map → chunk-5JUONZ3G.js.map} +0 -0
- /package/{companion-YQ7CGW7W.js.map → companion-U3FKH7SQ.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/docx-preview-
|
|
2
|
-
import{$n as e
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/docx-preview-D-jP_CCs.js","assets/index-CcIrffU_.js","assets/index-CKOtBNaZ.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$n as e,$t as t,Ar as n,Ci as r,Di as i,Ei as a,Er as o,Fn as s,Fr as c,G as l,Ga as u,Gr as d,Hn as f,Hr as p,Ia as m,In as h,Jn as g,K as _,Kn as v,Ln as y,Lr as b,Mi as x,Nr as S,Or as C,Pa as w,Pi as T,Pr as E,Qt as D,Sa as O,Ta as k,Ti as A,Ui as j,Wi as ee,Wn as te,Wr as ne,Xr as M,Xt as re,Yr as ie,Zi as ae,_i as oe,aa as se,bi as N,cr as ce,ei as le,fr as ue,gi as de,gn as fe,hn as pe,hr as me,ia as he,in as ge,ji as P,jn as _e,ln as ve,ma as ye,mn as be,nn as xe,nr as Se,oa as Ce,oi as we,pr as Te,qi as Ee,ra as F,ri as De,rn as Oe,sa as ke,ta as I,tn as Ae,va as L,vi as je,vr as Me,wa as Ne,wi as R,xi as Pe,ya as z,yr as Fe,zn as B,zr as Ie}from"./index-CcIrffU_.js";import{n as Le,t as Re}from"./radiobutton--KWBHcDP.js";import{t as ze}from"./checkbox-DPknldTJ.js";import{t as Be}from"./selectbutton-C0NL5n4w.js";import{t as Ve}from"./multiselect-BmjidXlj.js";import{a as He,i as Ue,n as We,o as Ge,r as Ke,s as qe,t as Je}from"./chevronup-D2Lr2GiV.js";import{t as Ye}from"./autocomplete-DobAPPYJ.js";var Xe=ce.extend({name:`slider`,style:`
|
|
3
3
|
.p-slider {
|
|
4
4
|
display: block;
|
|
5
5
|
position: relative;
|
|
@@ -90,9 +90,9 @@ import{$n as e,Ai as t,Br as n,Ci as r,Cn as i,Di as a,Ea as o,Er as s,Fr as c,G
|
|
|
90
90
|
inset-inline-start: 0;
|
|
91
91
|
width: 100%;
|
|
92
92
|
}
|
|
93
|
-
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-slider p-component`,{"p-disabled":n.disabled,"p-invalid":t.$invalid,"p-slider-horizontal":n.orientation===`horizontal`,"p-slider-vertical":n.orientation===`vertical`}]},range:`p-slider-range`,handle:`p-slider-handle`},inlineStyles:{handle:{position:`absolute`},range:{position:`absolute`}}}),Ze={name:`BaseSlider`,extends:
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function it(e,t){if(e){if(typeof e==`string`)return ot(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ot(e,t):void 0}}function at(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function V(e){if(Array.isArray(e))return ot(e)}function ot(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var st={name:`Slider`,extends:Ze,inheritAttrs:!1,emits:[`change`,`slideend`],dragging:!1,handleIndex:null,initX:null,initY:null,barWidth:null,barHeight:null,dragListener:null,dragEndListener:null,beforeUnmount:function(){this.unbindDragListeners()},methods:{updateDomData:function(){var e=this.$el.getBoundingClientRect();this.initX=e.left+
|
|
95
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _t(e,t){if(e){if(typeof e==`string`)return bt(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(e,t):void 0}}function vt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function yt(e){if(Array.isArray(e))return bt(e)}function bt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xt(e,t,n,r,
|
|
93
|
+
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-slider p-component`,{"p-disabled":n.disabled,"p-invalid":t.$invalid,"p-slider-horizontal":n.orientation===`horizontal`,"p-slider-vertical":n.orientation===`vertical`}]},range:`p-slider-range`,handle:`p-slider-handle`},inlineStyles:{handle:{position:`absolute`},range:{position:`absolute`}}}),Ze={name:`BaseSlider`,extends:fe,props:{min:{type:Number,default:0},max:{type:Number,default:100},orientation:{type:String,default:`horizontal`},step:{type:Number,default:null},range:{type:Boolean,default:!1},tabindex:{type:Number,default:0},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:Xe,provide:function(){return{$pcSlider:this,$parentInstance:this}}};function Qe(e){"@babel/helpers - typeof";return Qe=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Qe(e)}function $e(e,t,n){return(t=et(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){var t=tt(e,`string`);return Qe(t)==`symbol`?t:t+``}function tt(e,t){if(Qe(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qe(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nt(e){return V(e)||at(e)||it(e)||rt()}function rt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function it(e,t){if(e){if(typeof e==`string`)return ot(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ot(e,t):void 0}}function at(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function V(e){if(Array.isArray(e))return ot(e)}function ot(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var st={name:`Slider`,extends:Ze,inheritAttrs:!1,emits:[`change`,`slideend`],dragging:!1,handleIndex:null,initX:null,initY:null,barWidth:null,barHeight:null,dragListener:null,dragEndListener:null,beforeUnmount:function(){this.unbindDragListeners()},methods:{updateDomData:function(){var e=this.$el.getBoundingClientRect();this.initX=e.left+Ie(),this.initY=e.top+Te(),this.barWidth=this.$el.offsetWidth,this.barHeight=this.$el.offsetHeight},setValue:function(e){var t,r=e.touches?e.touches[0].pageX:e.pageX,i=e.touches?e.touches[0].pageY:e.pageY;t=this.orientation===`horizontal`?n(this.$el)?(this.initX+this.barWidth-r)*100/this.barWidth:(r-this.initX)*100/this.barWidth:(this.initY+this.barHeight-i)*100/this.barHeight;var a=(this.max-this.min)*(t/100)+this.min;if(this.step){var o=this.range?this.value[this.handleIndex]:this.value,s=a-o;s<0?a=o+Math.ceil(a/this.step-o/this.step)*this.step:s>0&&(a=o+Math.floor(a/this.step-o/this.step)*this.step)}else a=Math.floor(a);this.updateModel(e,a)},updateModel:function(e,t){var n=Math.round(t*100)/100,r;this.range?(r=this.value?nt(this.value):[],this.handleIndex==0?(n<this.min?n=this.min:n>=this.max&&(n=this.max),r[0]=n):(n>this.max?n=this.max:n<=this.min&&(n=this.min),r[1]=n)):(n<this.min?n=this.min:n>this.max&&(n=this.max),r=n),this.writeValue(r,e),this.$emit(`change`,r)},onDragStart:function(e,t){this.disabled||(this.$el.setAttribute(`data-p-sliding`,!0),this.dragging=!0,this.updateDomData(),this.range&&this.value[0]===this.max?this.handleIndex=0:this.handleIndex=t,e.currentTarget.focus())},onDrag:function(e){this.dragging&&this.setValue(e)},onDragEnd:function(e){this.dragging&&(this.dragging=!1,this.$el.setAttribute(`data-p-sliding`,!1),this.$emit(`slideend`,{originalEvent:e,value:this.value}))},onBarClick:function(e){this.disabled||o(e.target,`data-pc-section`)!==`handle`&&(this.updateDomData(),this.setValue(e))},onMouseDown:function(e,t){this.bindDragListeners(),this.onDragStart(e,t)},onKeyDown:function(e,t){switch(this.handleIndex=t,e.code){case`ArrowDown`:case`ArrowLeft`:this.decrementValue(e,t),e.preventDefault();break;case`ArrowUp`:case`ArrowRight`:this.incrementValue(e,t),e.preventDefault();break;case`PageDown`:this.decrementValue(e,t,!0),e.preventDefault();break;case`PageUp`:this.incrementValue(e,t,!0),e.preventDefault();break;case`Home`:this.updateModel(e,this.min),e.preventDefault();break;case`End`:this.updateModel(e,this.max),e.preventDefault();break}},onBlur:function(e,t){var n,r;(n=(r=this.formField).onBlur)==null||n.call(r,e)},decrementValue:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=this.range?this.step?this.value[t]-this.step:this.value[t]-1:this.step?this.value-this.step:!this.step&&n?this.value-10:this.value-1;this.updateModel(e,r),e.preventDefault()},incrementValue:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=this.range?this.step?this.value[t]+this.step:this.value[t]+1:this.step?this.value+this.step:!this.step&&n?this.value+10:this.value+1;this.updateModel(e,r),e.preventDefault()},bindDragListeners:function(){this.dragListener||(this.dragListener=this.onDrag.bind(this),document.addEventListener(`mousemove`,this.dragListener)),this.dragEndListener||(this.dragEndListener=this.onDragEnd.bind(this),document.addEventListener(`mouseup`,this.dragEndListener))},unbindDragListeners:function(){this.dragListener&&=(document.removeEventListener(`mousemove`,this.dragListener),null),this.dragEndListener&&=(document.removeEventListener(`mouseup`,this.dragEndListener),null)},rangeStyle:function(){if(this.range){var e=this.rangeEndPosition>this.rangeStartPosition?this.rangeEndPosition-this.rangeStartPosition:this.rangeStartPosition-this.rangeEndPosition,t=this.rangeEndPosition>this.rangeStartPosition?this.rangeStartPosition:this.rangeEndPosition;return this.horizontal?{"inset-inline-start":t+`%`,width:e+`%`}:{bottom:t+`%`,height:e+`%`}}else if(this.horizontal)return{width:this.handlePosition+`%`};else return{height:this.handlePosition+`%`}},handleStyle:function(){return this.horizontal?{"inset-inline-start":this.handlePosition+`%`}:{bottom:this.handlePosition+`%`}},rangeStartHandleStyle:function(){return this.horizontal?{"inset-inline-start":this.rangeStartPosition+`%`}:{bottom:this.rangeStartPosition+`%`}},rangeEndHandleStyle:function(){return this.horizontal?{"inset-inline-start":this.rangeEndPosition+`%`}:{bottom:this.rangeEndPosition+`%`}}},computed:{value:function(){return this.range?[this.d_value?.[0]??this.min,this.d_value?.[1]??this.max]:this.d_value??this.min},horizontal:function(){return this.orientation===`horizontal`},vertical:function(){return this.orientation===`vertical`},handlePosition:function(){return this.value<this.min?0:this.value>this.max?100:(this.value-this.min)*100/(this.max-this.min)},rangeStartPosition:function(){return this.value&&this.value[0]!==void 0?this.value[0]<this.min?0:(this.value[0]-this.min)*100/(this.max-this.min):0},rangeEndPosition:function(){return this.value&&this.value.length===2&&this.value[1]!==void 0?this.value[1]>this.max?100:(this.value[1]-this.min)*100/(this.max-this.min):100},dataP:function(){return d($e({},this.orientation,this.orientation))}}},ct=[`data-p`],lt=[`data-p`],ut=[`tabindex`,`aria-valuemin`,`aria-valuenow`,`aria-valuemax`,`aria-labelledby`,`aria-label`,`aria-orientation`,`data-p`],dt=[`tabindex`,`aria-valuemin`,`aria-valuenow`,`aria-valuemax`,`aria-labelledby`,`aria-label`,`aria-orientation`,`data-p`],ft=[`tabindex`,`aria-valuemin`,`aria-valuenow`,`aria-valuemax`,`aria-labelledby`,`aria-label`,`aria-orientation`,`data-p`];function pt(e,t,n,r,o,s){return I(),i(`div`,j({class:e.cx(`root`),onClick:t[18]||=function(){return s.onBarClick&&s.onBarClick.apply(s,arguments)}},e.ptmi(`root`),{"data-p-sliding":!1,"data-p":s.dataP}),[R(`span`,j({class:e.cx(`range`),style:[e.sx(`range`),s.rangeStyle()]},e.ptm(`range`),{"data-p":s.dataP}),null,16,lt),e.range?a(``,!0):(I(),i(`span`,j({key:0,class:e.cx(`handle`),style:[e.sx(`handle`),s.handleStyle()],onTouchstartPassive:t[0]||=function(e){return s.onDragStart(e)},onTouchmovePassive:t[1]||=function(e){return s.onDrag(e)},onTouchend:t[2]||=function(e){return s.onDragEnd(e)},onMousedown:t[3]||=function(e){return s.onMouseDown(e)},onKeydown:t[4]||=function(e){return s.onKeyDown(e)},onBlur:t[5]||=function(e){return s.onBlur(e)},tabindex:e.tabindex,role:`slider`,"aria-valuemin":e.min,"aria-valuenow":e.d_value,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm(`handle`),{"data-p":s.dataP}),null,16,ut)),e.range?(I(),i(`span`,j({key:1,class:e.cx(`handle`),style:[e.sx(`handle`),s.rangeStartHandleStyle()],onTouchstartPassive:t[6]||=function(e){return s.onDragStart(e,0)},onTouchmovePassive:t[7]||=function(e){return s.onDrag(e)},onTouchend:t[8]||=function(e){return s.onDragEnd(e)},onMousedown:t[9]||=function(e){return s.onMouseDown(e,0)},onKeydown:t[10]||=function(e){return s.onKeyDown(e,0)},onBlur:t[11]||=function(e){return s.onBlur(e,0)},tabindex:e.tabindex,role:`slider`,"aria-valuemin":e.min,"aria-valuenow":e.d_value?e.d_value[0]:null,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm(`startHandler`),{"data-p":s.dataP}),null,16,dt)):a(``,!0),e.range?(I(),i(`span`,j({key:2,class:e.cx(`handle`),style:[e.sx(`handle`),s.rangeEndHandleStyle()],onTouchstartPassive:t[12]||=function(e){return s.onDragStart(e,1)},onTouchmovePassive:t[13]||=function(e){return s.onDrag(e)},onTouchend:t[14]||=function(e){return s.onDragEnd(e)},onMousedown:t[15]||=function(e){return s.onMouseDown(e,1)},onKeydown:t[16]||=function(e){return s.onKeyDown(e,1)},onBlur:t[17]||=function(e){return s.onBlur(e,1)},tabindex:e.tabindex,role:`slider`,"aria-valuemin":e.min,"aria-valuenow":e.d_value?e.d_value[1]:null,"aria-valuemax":e.max,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-orientation":e.orientation},e.ptm(`endHandler`),{"data-p":s.dataP}),null,16,ft)):a(``,!0)],16,ct)}st.render=pt;var mt={name:`CalendarIcon`,extends:v};function ht(e){return yt(e)||vt(e)||_t(e)||gt()}function gt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _t(e,t){if(e){if(typeof e==`string`)return bt(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(e,t):void 0}}function vt(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function yt(e){if(Array.isArray(e))return bt(e)}function bt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xt(e,t,n,r,a,o){return I(),i(`svg`,j({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),ht(t[0]||=[R(`path`,{d:`M10.7838 1.51351H9.83783V0.567568C9.83783 0.417039 9.77804 0.272676 9.6716 0.166237C9.56516 0.0597971 9.42079 0 9.27027 0C9.11974 0 8.97538 0.0597971 8.86894 0.166237C8.7625 0.272676 8.7027 0.417039 8.7027 0.567568V1.51351H5.29729V0.567568C5.29729 0.417039 5.2375 0.272676 5.13106 0.166237C5.02462 0.0597971 4.88025 0 4.72973 0C4.5792 0 4.43484 0.0597971 4.3284 0.166237C4.22196 0.272676 4.16216 0.417039 4.16216 0.567568V1.51351H3.21621C2.66428 1.51351 2.13494 1.73277 1.74467 2.12305C1.35439 2.51333 1.13513 3.04266 1.13513 3.59459V11.9189C1.13513 12.4709 1.35439 13.0002 1.74467 13.3905C2.13494 13.7807 2.66428 14 3.21621 14H10.7838C11.3357 14 11.865 13.7807 12.2553 13.3905C12.6456 13.0002 12.8649 12.4709 12.8649 11.9189V3.59459C12.8649 3.04266 12.6456 2.51333 12.2553 2.12305C11.865 1.73277 11.3357 1.51351 10.7838 1.51351ZM3.21621 2.64865H4.16216V3.59459C4.16216 3.74512 4.22196 3.88949 4.3284 3.99593C4.43484 4.10237 4.5792 4.16216 4.72973 4.16216C4.88025 4.16216 5.02462 4.10237 5.13106 3.99593C5.2375 3.88949 5.29729 3.74512 5.29729 3.59459V2.64865H8.7027V3.59459C8.7027 3.74512 8.7625 3.88949 8.86894 3.99593C8.97538 4.10237 9.11974 4.16216 9.27027 4.16216C9.42079 4.16216 9.56516 4.10237 9.6716 3.99593C9.77804 3.88949 9.83783 3.74512 9.83783 3.59459V2.64865H10.7838C11.0347 2.64865 11.2753 2.74831 11.4527 2.92571C11.6301 3.10311 11.7297 3.34371 11.7297 3.59459V5.67568H2.27027V3.59459C2.27027 3.34371 2.36993 3.10311 2.54733 2.92571C2.72473 2.74831 2.96533 2.64865 3.21621 2.64865ZM10.7838 12.8649H3.21621C2.96533 12.8649 2.72473 12.7652 2.54733 12.5878C2.36993 12.4104 2.27027 12.1698 2.27027 11.9189V6.81081H11.7297V11.9189C11.7297 12.1698 11.6301 12.4104 11.4527 12.5878C11.2753 12.7652 11.0347 12.8649 10.7838 12.8649Z`,fill:`currentColor`},null,-1)]),16)}mt.render=xt;var St=ce.extend({name:`datepicker`,style:`
|
|
96
96
|
.p-datepicker {
|
|
97
97
|
display: inline-flex;
|
|
98
98
|
max-width: 100%;
|
|
@@ -552,35 +552,35 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
552
552
|
border-start-end-radius: dt('datepicker.dropdown.border.radius');
|
|
553
553
|
border-end-end-radius: dt('datepicker.dropdown.border.radius');
|
|
554
554
|
}
|
|
555
|
-
`,classes:{root:function(e){var t=e.instance,n=e.state;return[`p-datepicker p-component p-inputwrapper`,{"p-invalid":t.$invalid,"p-inputwrapper-filled":t.$filled,"p-inputwrapper-focus":n.focused||n.overlayVisible,"p-focus":n.focused||n.overlayVisible,"p-datepicker-fluid":t.$fluid}]},pcInputText:`p-datepicker-input`,clearIcon:`p-datepicker-clear-icon`,dropdown:`p-datepicker-dropdown`,inputIconContainer:`p-datepicker-input-icon-container`,inputIcon:`p-datepicker-input-icon`,panel:function(e){var t=e.props;return[`p-datepicker-panel p-component`,{"p-datepicker-panel-inline":t.inline,"p-disabled":t.disabled,"p-datepicker-timeonly":t.timeOnly}]},calendarContainer:`p-datepicker-calendar-container`,calendar:`p-datepicker-calendar`,header:`p-datepicker-header`,pcPrevButton:`p-datepicker-prev-button`,title:`p-datepicker-title`,selectMonth:`p-datepicker-select-month`,selectYear:`p-datepicker-select-year`,decade:`p-datepicker-decade`,pcNextButton:`p-datepicker-next-button`,dayView:`p-datepicker-day-view`,weekHeader:`p-datepicker-weekheader p-disabled`,weekNumber:`p-datepicker-weeknumber`,weekLabelContainer:`p-datepicker-weeklabel-container p-disabled`,weekDayCell:`p-datepicker-weekday-cell`,weekDay:`p-datepicker-weekday`,dayCell:function(e){var t=e.date;return[`p-datepicker-day-cell`,{"p-datepicker-other-month":t.otherMonth,"p-datepicker-today":t.today}]},day:function(e){var t=e.instance,n=e.props,r=e.state,i=e.date,a=``;if(t.isRangeSelection()&&t.isSelected(i)&&i.selectable){var o=typeof r.rawValue[0]==`string`?t.parseValue(r.rawValue[0])[0]:r.rawValue[0],s=typeof r.rawValue[1]==`string`?t.parseValue(r.rawValue[1])[0]:r.rawValue[1];a=t.isDateEquals(o,i)||t.isDateEquals(s,i)?`p-datepicker-day-selected`:`p-datepicker-day-selected-range`}return[`p-datepicker-day`,{"p-datepicker-day-selected":!t.isRangeSelection()&&t.isSelected(i)&&i.selectable,"p-disabled":n.disabled||!i.selectable},a]},monthView:`p-datepicker-month-view`,month:function(e){var t=e.instance,n=e.props,r=e.month,i=e.index;return[`p-datepicker-month`,{"p-datepicker-month-selected":t.isMonthSelected(i),"p-disabled":n.disabled||!r.selectable}]},yearView:`p-datepicker-year-view`,year:function(e){var t=e.instance,n=e.props,r=e.year;return[`p-datepicker-year`,{"p-datepicker-year-selected":t.isYearSelected(r.value),"p-disabled":n.disabled||!r.selectable}]},timePicker:`p-datepicker-time-picker`,hourPicker:`p-datepicker-hour-picker`,pcIncrementButton:`p-datepicker-increment-button`,pcDecrementButton:`p-datepicker-decrement-button`,separator:`p-datepicker-separator`,minutePicker:`p-datepicker-minute-picker`,secondPicker:`p-datepicker-second-picker`,ampmPicker:`p-datepicker-ampm-picker`,buttonbar:`p-datepicker-buttonbar`,pcTodayButton:`p-datepicker-today-button`,pcClearButton:`p-datepicker-clear-button`},inlineStyles:{root:function(e){var t=e.props;return{position:t.appendTo===`self`||t.showClear?`relative`:void 0}}}}),Ct={name:`BaseDatePicker`,extends:
|
|
555
|
+
`,classes:{root:function(e){var t=e.instance,n=e.state;return[`p-datepicker p-component p-inputwrapper`,{"p-invalid":t.$invalid,"p-inputwrapper-filled":t.$filled,"p-inputwrapper-focus":n.focused||n.overlayVisible,"p-focus":n.focused||n.overlayVisible,"p-datepicker-fluid":t.$fluid}]},pcInputText:`p-datepicker-input`,clearIcon:`p-datepicker-clear-icon`,dropdown:`p-datepicker-dropdown`,inputIconContainer:`p-datepicker-input-icon-container`,inputIcon:`p-datepicker-input-icon`,panel:function(e){var t=e.props;return[`p-datepicker-panel p-component`,{"p-datepicker-panel-inline":t.inline,"p-disabled":t.disabled,"p-datepicker-timeonly":t.timeOnly}]},calendarContainer:`p-datepicker-calendar-container`,calendar:`p-datepicker-calendar`,header:`p-datepicker-header`,pcPrevButton:`p-datepicker-prev-button`,title:`p-datepicker-title`,selectMonth:`p-datepicker-select-month`,selectYear:`p-datepicker-select-year`,decade:`p-datepicker-decade`,pcNextButton:`p-datepicker-next-button`,dayView:`p-datepicker-day-view`,weekHeader:`p-datepicker-weekheader p-disabled`,weekNumber:`p-datepicker-weeknumber`,weekLabelContainer:`p-datepicker-weeklabel-container p-disabled`,weekDayCell:`p-datepicker-weekday-cell`,weekDay:`p-datepicker-weekday`,dayCell:function(e){var t=e.date;return[`p-datepicker-day-cell`,{"p-datepicker-other-month":t.otherMonth,"p-datepicker-today":t.today}]},day:function(e){var t=e.instance,n=e.props,r=e.state,i=e.date,a=``;if(t.isRangeSelection()&&t.isSelected(i)&&i.selectable){var o=typeof r.rawValue[0]==`string`?t.parseValue(r.rawValue[0])[0]:r.rawValue[0],s=typeof r.rawValue[1]==`string`?t.parseValue(r.rawValue[1])[0]:r.rawValue[1];a=t.isDateEquals(o,i)||t.isDateEquals(s,i)?`p-datepicker-day-selected`:`p-datepicker-day-selected-range`}return[`p-datepicker-day`,{"p-datepicker-day-selected":!t.isRangeSelection()&&t.isSelected(i)&&i.selectable,"p-disabled":n.disabled||!i.selectable},a]},monthView:`p-datepicker-month-view`,month:function(e){var t=e.instance,n=e.props,r=e.month,i=e.index;return[`p-datepicker-month`,{"p-datepicker-month-selected":t.isMonthSelected(i),"p-disabled":n.disabled||!r.selectable}]},yearView:`p-datepicker-year-view`,year:function(e){var t=e.instance,n=e.props,r=e.year;return[`p-datepicker-year`,{"p-datepicker-year-selected":t.isYearSelected(r.value),"p-disabled":n.disabled||!r.selectable}]},timePicker:`p-datepicker-time-picker`,hourPicker:`p-datepicker-hour-picker`,pcIncrementButton:`p-datepicker-increment-button`,pcDecrementButton:`p-datepicker-decrement-button`,separator:`p-datepicker-separator`,minutePicker:`p-datepicker-minute-picker`,secondPicker:`p-datepicker-second-picker`,ampmPicker:`p-datepicker-ampm-picker`,buttonbar:`p-datepicker-buttonbar`,pcTodayButton:`p-datepicker-today-button`,pcClearButton:`p-datepicker-clear-button`},inlineStyles:{root:function(e){var t=e.props;return{position:t.appendTo===`self`||t.showClear?`relative`:void 0}}}}),Ct={name:`BaseDatePicker`,extends:pe,props:{selectionMode:{type:String,default:`single`},dateFormat:{type:String,default:null},updateModelType:{type:String,default:`date`},inline:{type:Boolean,default:!1},showOtherMonths:{type:Boolean,default:!0},selectOtherMonths:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1},iconDisplay:{type:String,default:`button`},icon:{type:String,default:void 0},prevIcon:{type:String,default:void 0},nextIcon:{type:String,default:void 0},incrementIcon:{type:String,default:void 0},decrementIcon:{type:String,default:void 0},numberOfMonths:{type:Number,default:1},responsiveOptions:Array,breakpoint:{type:String,default:`769px`},view:{type:String,default:`date`},minDate:{type:Date,value:null},maxDate:{type:Date,value:null},disabledDates:{type:Array,value:null},disabledDays:{type:Array,value:null},maxDateCount:{type:Number,value:null},showOnFocus:{type:Boolean,default:!0},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},showButtonBar:{type:Boolean,default:!1},shortYearCutoff:{type:String,default:`+10`},showTime:{type:Boolean,default:!1},timeOnly:{type:Boolean,default:!1},hourFormat:{type:String,default:`24`},stepHour:{type:Number,default:1},stepMinute:{type:Number,default:1},stepSecond:{type:Number,default:1},showSeconds:{type:Boolean,default:!1},hideOnDateTimeSelect:{type:Boolean,default:!1},hideOnRangeSelection:{type:Boolean,default:!1},timeSeparator:{type:String,default:`:`},showWeek:{type:Boolean,default:!1},manualInput:{type:Boolean,default:!0},showClear:{type:Boolean,default:!1},appendTo:{type:[String,Object],default:`body`},readonly:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},todayButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,size:`small`}}},clearButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,size:`small`}}},navigatorButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,rounded:!0}}},timepickerButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,rounded:!0}}},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:St,provide:function(){return{$pcDatePicker:this,$parentInstance:this}}};function wt(e,t,n){return(t=Tt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tt(e){var t=Et(e,`string`);return Dt(t)==`symbol`?t:t+``}function Et(e,t){if(Dt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Dt(e){"@babel/helpers - typeof";return Dt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Dt(e)}function Ot(e){return jt(e)||At(e)||Nt(e)||kt()}function kt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
556
556
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function At(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function jt(e){if(Array.isArray(e))return Pt(e)}function Mt(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=Nt(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
557
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Nt(e,t){if(e){if(typeof e==`string`)return Pt(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pt(e,t):void 0}}function Pt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ft={name:`DatePicker`,extends:Ct,inheritAttrs:!1,emits:[`show`,`hide`,`input`,`month-change`,`year-change`,`date-select`,`today-click`,`clear-click`,`focus`,`blur`,`keydown`],inject:{$pcFluid:{default:null}},navigationState:null,timePickerChange:!1,scrollHandler:null,outsideClickListener:null,resizeListener:null,matchMediaListener:null,matchMediaOrientationListener:null,overlay:null,input:null,previousButton:null,nextButton:null,timePickerTimer:null,preventFocus:!1,typeUpdate:!1,data:function(){return{currentMonth:null,currentYear:null,currentHour:null,currentMinute:null,currentSecond:null,pm:null,focused:!1,overlayVisible:!1,currentView:this.view,query:null,queryMatches:!1,queryOrientation:null,focusedDateIndex:0,rawValue:null}},watch:{modelValue:{immediate:!0,handler:function(e){var t;this.rawValue=typeof e==`string`?this.safeParse(e):e,this.updateCurrentMetaData(),!this.typeUpdate&&!this.inline&&this.input&&(this.input.value=this.formatValue(this.rawValue)),this.typeUpdate=!1,(t=this.$refs.clearIcon)!=null&&(t=t.$el)!=null&&t.style&&(this.$refs.clearIcon.$el.style.display=Ae(e)?`none`:`block`)}},showTime:function(){this.updateCurrentMetaData()},minDate:function(){this.updateCurrentMetaData()},maxDate:function(){this.updateCurrentMetaData()},months:function(){this.overlay&&(this.focused||(this.inline&&(this.preventFocus=!0),setTimeout(this.updateFocus,0)))},numberOfMonths:function(){this.destroyResponsiveStyleElement(),this.createResponsiveStyle()},responsiveOptions:function(){this.destroyResponsiveStyleElement(),this.createResponsiveStyle()},currentView:function(){var e=this;Promise.resolve(null).then(function(){return e.alignOverlay()})},view:function(e){this.currentView=e}},created:function(){this.updateCurrentMetaData()},mounted:function(){if(this.createResponsiveStyle(),this.bindMatchMediaListener(),this.bindMatchMediaOrientationListener(),this.inline)this.disabled||(this.preventFocus=!0,this.initFocusableCell());else{var e;this.input.value=this.inputFieldValue,(e=this.$refs.clearIcon)!=null&&(e=e.$el)!=null&&e.style&&(this.$refs.clearIcon.$el.style.display=this.$filled?`block`:`none`)}},updated:function(){this.overlay&&(this.preventFocus=!0,setTimeout(this.updateFocus,0)),this.input&&this.selectionStart!=null&&this.selectionEnd!=null&&(this.input.selectionStart=this.selectionStart,this.input.selectionEnd=this.selectionEnd,this.selectionStart=null,this.selectionEnd=null)},beforeUnmount:function(){this.timePickerTimer&&clearTimeout(this.timePickerTimer),this.destroyResponsiveStyleElement(),this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindMatchMediaListener(),this.unbindMatchMediaOrientationListener(),this.scrollHandler&&=(this.scrollHandler.destroy(),null),this.overlay&&this.autoZIndex&&Re.clear(this.overlay),this.overlay=null},methods:{isSelected:function(e){if(this.rawValue){if(this.isSingleSelection())return this.isDateEquals(this.parseValueForComparison(this.rawValue),e);if(this.isMultipleSelection()){var t=!1,n=Mt(this.rawValue),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;if(t=this.isDateEquals(this.parseValueForComparison(i),e),t)break}}catch(e){n.e(e)}finally{n.f()}return t}else if(this.isRangeSelection()){var a=this.parseValueForComparison(this.rawValue[0]);if(this.rawValue[1]){var o=this.parseValueForComparison(this.rawValue[1]);return this.isDateEquals(a,e)||this.isDateEquals(o,e)||this.isDateBetween(a,o,e)}else return this.isDateEquals(a,e)}}return!1},isMonthSelected:function(e){var t=this;if(this.isMultipleSelection())return this.rawValue?.some(function(n){var r=t.parseValueForComparison(n);return r.getMonth()===e&&r.getFullYear()===t.currentYear});if(this.isRangeSelection()){var n,r,i=(n=this.rawValue)!=null&&n[0]?this.parseValueForComparison(this.rawValue[0]):null,a=(r=this.rawValue)!=null&&r[1]?this.parseValueForComparison(this.rawValue[1]):null;if(a){var o=new Date(this.currentYear,e,1),s=new Date(i.getFullYear(),i.getMonth(),1),c=new Date(a.getFullYear(),a.getMonth(),1);return o>=s&&o<=c}else return i?.getFullYear()===this.currentYear&&i?.getMonth()===e}else return this.rawValue?.getMonth()===e&&this.rawValue?.getFullYear()===this.currentYear},isYearSelected:function(e){var t=this;if(this.isMultipleSelection())return this.rawValue?.some(function(n){return t.parseValueForComparison(n).getFullYear()===e});if(this.isRangeSelection()){var n,r,i=(n=this.rawValue)!=null&&n[0]?this.parseValueForComparison(this.rawValue[0]):null,a=(r=this.rawValue)!=null&&r[1]?this.parseValueForComparison(this.rawValue[1]):null,o=i?i.getFullYear():null,s=a?a.getFullYear():null;return o===e||s===e||o<e&&s>e}else return this.rawValue?.getFullYear()===e},isDateEquals:function(e,t){return e?e.getDate()===t.day&&e.getMonth()===t.month&&e.getFullYear()===t.year:!1},isDateBetween:function(e,t,n){var r=!1,i=this.parseValueForComparison(e),a=this.parseValueForComparison(t);if(i&&a){var o=new Date(n.year,n.month,n.day);return i.getTime()<=o.getTime()&&a.getTime()>=o.getTime()}return r},getFirstDayOfMonthIndex:function(e,t){var n=new Date;n.setDate(1),n.setMonth(e),n.setFullYear(t);var r=n.getDay()+this.sundayIndex;return r>=7?r-7:r},getDaysCountInMonth:function(e,t){return 32-this.daylightSavingAdjust(new Date(t,e,32)).getDate()},getDaysCountInPrevMonth:function(e,t){var n=this.getPreviousMonthAndYear(e,t);return this.getDaysCountInMonth(n.month,n.year)},getPreviousMonthAndYear:function(e,t){var n,r;return e===0?(n=11,r=t-1):(n=e-1,r=t),{month:n,year:r}},getNextMonthAndYear:function(e,t){var n,r;return e===11?(n=0,r=t+1):(n=e+1,r=t),{month:n,year:r}},daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},isToday:function(e,t,n,r){return e.getDate()===t&&e.getMonth()===n&&e.getFullYear()===r},isSelectable:function(e,t,n,r){var i=!0,a=!0,o=!0,s=!0;return r&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>n||this.minDate.getFullYear()===n&&(this.minDate.getMonth()>t||this.minDate.getMonth()===t&&this.minDate.getDate()>e))&&(i=!1),this.maxDate&&(this.maxDate.getFullYear()<n||this.maxDate.getFullYear()===n&&(this.maxDate.getMonth()<t||this.maxDate.getMonth()===t&&this.maxDate.getDate()<e))&&(a=!1),this.disabledDates&&(o=!this.isDateDisabled(e,t,n)),this.disabledDays&&(s=!this.isDayDisabled(e,t,n)),i&&a&&o&&s)},onOverlayEnter:function(e){c(e,this.inline?void 0:{position:`absolute`,top:`0`}),this.autoZIndex&&Re.set(`overlay`,e,this.baseZIndex||this.$primevue.config.zIndex.overlay),this.$attrSelector&&e.setAttribute(this.$attrSelector,``),this.alignOverlay(),this.$emit(`show`)},onOverlayEnterComplete:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener()},onOverlayAfterLeave:function(e){this.autoZIndex&&Re.clear(e)},onOverlayLeave:function(){this.currentView=this.view,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit(`hide`),this.overlay=null},onPrevButtonClick:function(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)},onNextButtonClick:function(e){this.navigationState={backward:!1,button:!0},this.navForward(e)},navBackward:function(e){e.preventDefault(),this.isEnabled()&&(this.currentView===`month`?(this.decrementYear(),this.$emit(`year-change`,{month:this.currentMonth,year:this.currentYear})):this.currentView===`year`?this.decrementDecade():e.shiftKey?this.decrementYear():(this.currentMonth===0?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.$emit(`month-change`,{month:this.currentMonth+1,year:this.currentYear})))},navForward:function(e){e.preventDefault(),this.isEnabled()&&(this.currentView===`month`?(this.incrementYear(),this.$emit(`year-change`,{month:this.currentMonth,year:this.currentYear})):this.currentView===`year`?this.incrementDecade():e.shiftKey?this.incrementYear():(this.currentMonth===11?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.$emit(`month-change`,{month:this.currentMonth+1,year:this.currentYear})))},decrementYear:function(){this.currentYear--},decrementDecade:function(){this.currentYear-=10},incrementYear:function(){this.currentYear++},incrementDecade:function(){this.currentYear+=10},switchToMonthView:function(e){this.currentView=`month`,setTimeout(this.updateFocus,0),e.preventDefault()},switchToYearView:function(e){this.currentView=`year`,setTimeout(this.updateFocus,0),e.preventDefault()},isEnabled:function(){return!this.disabled&&!this.readonly},updateCurrentTimeMeta:function(e){var t=e.getHours();this.hourFormat===`12`&&(this.pm=t>11,t>=12&&(t=t==12?12:t-12)),this.currentHour=Math.floor(t/this.stepHour)*this.stepHour,this.currentMinute=Math.floor(e.getMinutes()/this.stepMinute)*this.stepMinute,this.currentSecond=Math.floor(e.getSeconds()/this.stepSecond)*this.stepSecond},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.isOutsideClicked(t)&&(e.overlayVisible=!1)},document.addEventListener(`mousedown`,this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&=(document.removeEventListener(`mousedown`,this.outsideClickListener),null)},bindScrollListener:function(){var e=this;this.scrollHandler||=new Te(this.$refs.container,function(){e.overlayVisible&&=!1}),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!N()&&(e.overlayVisible=!1)},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),null)},bindMatchMediaListener:function(){var e=this;if(!this.matchMediaListener){var t=matchMedia(`(max-width: ${this.breakpoint})`);this.query=t,this.queryMatches=t.matches,this.matchMediaListener=function(){e.queryMatches=t.matches,e.mobileActive=!1},this.query.addEventListener(`change`,this.matchMediaListener)}},unbindMatchMediaListener:function(){this.matchMediaListener&&=(this.query.removeEventListener(`change`,this.matchMediaListener),null)},bindMatchMediaOrientationListener:function(){var e=this;this.matchMediaOrientationListener||(this.queryOrientation=matchMedia(`(orientation: portrait)`),this.matchMediaOrientationListener=function(){e.alignOverlay()},this.queryOrientation.addEventListener(`change`,this.matchMediaOrientationListener))},unbindMatchMediaOrientationListener:function(){this.matchMediaOrientationListener&&=(this.queryOrientation.removeEventListener(`change`,this.matchMediaOrientationListener),this.queryOrientation=null,null)},isOutsideClicked:function(e){var t=e.composedPath();return!(this.$el.isSameNode(e.target)||this.isNavIconClicked(e)||t.includes(this.$el)||t.includes(this.overlay))},isNavIconClicked:function(e){return this.previousButton&&(this.previousButton.isSameNode(e.target)||this.previousButton.contains(e.target))||this.nextButton&&(this.nextButton.isSameNode(e.target)||this.nextButton.contains(e.target))},alignOverlay:function(){this.overlay&&(this.appendTo===`self`||this.inline?s(this.overlay,this.$el):(this.view===`date`?(this.overlay.style.width=ae(this.overlay)+`px`,this.overlay.style.minWidth=ae(this.$el)+`px`):this.overlay.style.width=ae(this.$el)+`px`,D(this.overlay,this.$el)))},onButtonClick:function(){this.isEnabled()&&(this.overlayVisible?this.overlayVisible=!1:(this.input.focus(),this.overlayVisible=!0))},isDateDisabled:function(e,t,n){if(this.disabledDates){var r=Mt(this.disabledDates),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;if(a.getFullYear()===n&&a.getMonth()===t&&a.getDate()===e)return!0}}catch(e){r.e(e)}finally{r.f()}}return!1},isDayDisabled:function(e,t,n){if(this.disabledDays){var r=new Date(n,t,e).getDay();return this.disabledDays.indexOf(r)!==-1}return!1},onMonthDropdownChange:function(e){this.currentMonth=parseInt(e),this.$emit(`month-change`,{month:this.currentMonth+1,year:this.currentYear})},onYearDropdownChange:function(e){this.currentYear=parseInt(e),this.$emit(`year-change`,{month:this.currentMonth,year:this.currentYear})},onDateSelect:function(e,t){var r=this;if(!(this.disabled||!t.selectable)){if(n(this.overlay,`table td span:not([data-p-disabled="true"])`).forEach(function(e){return e.tabIndex=-1}),e&&e.currentTarget.focus(),this.isMultipleSelection()&&this.isSelected(t)){var i=this.rawValue.filter(function(e){return!r.isDateEquals(r.parseValueForComparison(e),t)});this.updateModel(i)}else this.shouldSelectDate(t)&&(t.otherMonth?(this.currentMonth=t.month,this.currentYear=t.year,this.selectDate(t)):this.selectDate(t));this.isSingleSelection()&&(!this.showTime||this.hideOnDateTimeSelect)&&(this.input&&this.input.focus(),setTimeout(function(){r.overlayVisible=!1},150))}},selectDate:function(e){var t=this,n=new Date(e.year,e.month,e.day);this.showTime&&(this.hourFormat===`12`&&this.currentHour!==12&&this.pm?n.setHours(this.currentHour+12):n.setHours(this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.showSeconds?this.currentSecond:0)),this.minDate&&this.minDate>n&&(n=this.minDate,this.currentHour=n.getHours(),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate<n&&(n=this.maxDate,this.currentHour=n.getHours(),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds());var r=null;if(this.isSingleSelection())r=n;else if(this.isMultipleSelection())r=this.rawValue?[].concat(Ot(this.rawValue),[n]):[n];else if(this.isRangeSelection())if(this.rawValue&&this.rawValue.length){var i=this.parseValueForComparison(this.rawValue[0]),a=this.rawValue[1];!a&&n.getTime()>=i.getTime()?(a=n,this.focusedDateIndex=1):(i=n,a=null,this.focusedDateIndex=0),r=[i,a]}else r=[n,null],this.focusedDateIndex=0;r!==null&&this.updateModel(r),this.isRangeSelection()&&this.hideOnRangeSelection&&r[1]!==null&&setTimeout(function(){t.overlayVisible=!1},150),this.$emit(`date-select`,n)},updateModel:function(e){var t=this;if(this.rawValue=e,this.updateModelType===`date`)if(this.isSingleSelection())this.writeValue(e);else{var n=null;Array.isArray(e)&&(n=e.map(function(e){return t.parseValueForComparison(e)})),this.writeValue(n)}else if(this.updateModelType==`string`){if(this.isSingleSelection())this.writeValue(this.formatDateTime(e));else if(this.isMultipleSelection()){var r=null;Array.isArray(e)&&(r=e.map(function(e){return t.formatDateTime(e)})),this.writeValue(r)}else if(this.isRangeSelection()){var i=null;Array.isArray(e)&&(i=e.map(function(e){return e==null?null:typeof e==`string`?e:t.formatDateTime(e)})),this.writeValue(i)}}},shouldSelectDate:function(){return this.isMultipleSelection()?this.maxDateCount==null?!0:this.maxDateCount>(this.rawValue?this.rawValue.length:0):!0},isSingleSelection:function(){return this.selectionMode===`single`},isRangeSelection:function(){return this.selectionMode===`range`},isMultipleSelection:function(){return this.selectionMode===`multiple`},formatValue:function(e){if(typeof e==`string`)return this.dateFormat?isNaN(new Date(e))?e:this.formatDate(new Date(e),this.dateFormat):e;var t=``;if(e)try{if(this.isSingleSelection())t=this.formatDateTime(e);else if(this.isMultipleSelection())for(var n=0;n<e.length;n++){var r=typeof e[n]==`string`?this.formatDateTime(this.parseValueForComparison(e[n])):this.formatDateTime(e[n]);t+=r,n!==e.length-1&&(t+=`, `)}else if(this.isRangeSelection()&&e&&e.length){var i=this.parseValueForComparison(e[0]),a=this.parseValueForComparison(e[1]);t=this.formatDateTime(i),a&&(t+=` - `+this.formatDateTime(a))}}catch{t=e}return t},formatDateTime:function(e){var t=null;return Ce(e)&&Ne(e)?this.timeOnly?t=this.formatTime(e):(t=this.formatDate(e,this.datePattern),this.showTime&&(t+=` `+this.formatTime(e))):this.updateModelType===`string`&&(t=e),t},formatDate:function(e,t){if(!e)return``;var n,r=function(e){var r=n+1<t.length&&t.charAt(n+1)===e;return r&&n++,r},i=function(e,t,n){var i=``+t;if(r(e))for(;i.length<n;)i=`0`+i;return i},a=function(e,t,n,i){return r(e)?i[t]:n[t]},o=``,s=!1;if(e)for(n=0;n<t.length;n++)if(s)t.charAt(n)===`'`&&!r(`'`)?s=!1:o+=t.charAt(n);else switch(t.charAt(n)){case`d`:o+=i(`d`,e.getDate(),2);break;case`D`:o+=a(`D`,e.getDay(),this.$primevue.config.locale.dayNamesShort,this.$primevue.config.locale.dayNames);break;case`o`:o+=i(`o`,Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case`m`:o+=i(`m`,e.getMonth()+1,2);break;case`M`:o+=a(`M`,e.getMonth(),this.$primevue.config.locale.monthNamesShort,this.$primevue.config.locale.monthNames);break;case`y`:o+=r(`y`)?e.getFullYear():(e.getFullYear()%100<10?`0`:``)+e.getFullYear()%100;break;case`@`:o+=e.getTime();break;case`!`:o+=e.getTime()*1e4+this.ticksTo1970;break;case`'`:r(`'`)?o+=`'`:s=!0;break;default:o+=t.charAt(n)}return o},formatTime:function(e){if(!e)return``;var t=``,n=e.getHours(),r=e.getMinutes(),i=e.getSeconds();return this.hourFormat===`12`&&n>11&&n!==12&&(n-=12),this.hourFormat===`12`?t+=n===0?12:n<10?`0`+n:n:t+=n<10?`0`+n:n,t+=`:`,t+=r<10?`0`+r:r,this.showSeconds&&(t+=`:`,t+=i<10?`0`+i:i),this.hourFormat===`12`&&(t+=e.getHours()>11?` ${this.$primevue.config.locale.pm}`:` ${this.$primevue.config.locale.am}`),t},onTodayButtonClick:function(e){var t=new Date,n={day:t.getDate(),month:t.getMonth(),year:t.getFullYear(),otherMonth:t.getMonth()!==this.currentMonth||t.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(null,n),this.$emit(`today-click`,t),e.preventDefault()},onClearButtonClick:function(e){this.updateModel(null),this.overlayVisible=!1,this.$emit(`clear-click`,e),e.preventDefault()},onTimePickerElementMouseDown:function(e,t,n){this.isEnabled()&&(this.repeat(e,null,t,n),e.preventDefault())},onTimePickerElementMouseUp:function(e){this.isEnabled()&&(this.clearTimePickerTimer(),this.updateModelTime(),e.preventDefault())},onTimePickerElementMouseLeave:function(){this.clearTimePickerTimer()},onTimePickerElementKeyDown:function(e,t,n){switch(e.code){case`Enter`:case`NumpadEnter`:case`Space`:this.isEnabled()&&(this.repeat(e,null,t,n),e.preventDefault());break}},onTimePickerElementKeyUp:function(e){switch(e.code){case`Enter`:case`NumpadEnter`:case`Space`:this.isEnabled()&&(this.clearTimePickerTimer(),this.updateModelTime(),e.preventDefault());break}},repeat:function(e,t,n,r){var i=this,a=t||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(function(){i.repeat(e,100,n,r)},a),n){case 0:r===1?this.incrementHour(e):this.decrementHour(e);break;case 1:r===1?this.incrementMinute(e):this.decrementMinute(e);break;case 2:r===1?this.incrementSecond(e):this.decrementSecond(e);break}},convertTo24Hour:function(e,t){return this.hourFormat==`12`?e===12?t?12:0:t?e+12:e:e},validateTime:function(e,t,n,r){var i=this.viewDate,a=this.convertTo24Hour(e,r);this.isRangeSelection()&&(i=this.rawValue?this.rawValue[1]||this.rawValue[0]:i),this.isMultipleSelection()&&(i=this.rawValue?this.rawValue[this.rawValue.length-1]:i);var o=i?i.toDateString():null;return!(this.minDate&&o&&this.minDate.toDateString()===o&&(this.minDate.getHours()>a||this.minDate.getHours()===a&&(this.minDate.getMinutes()>t||this.minDate.getMinutes()===t&&this.minDate.getSeconds()>n))||this.maxDate&&o&&this.maxDate.toDateString()===o&&(this.maxDate.getHours()<a||this.maxDate.getHours()===a&&(this.maxDate.getMinutes()<t||this.maxDate.getMinutes()===t&&this.maxDate.getSeconds()<n)))},incrementHour:function(e){var t=this.currentHour,n=this.currentHour+Number(this.stepHour),r=this.pm;this.hourFormat==`24`?n=n>=24?n-24:n:this.hourFormat==`12`&&(t<12&&n>11&&(r=!this.pm),n=n>=13?n-12:n),this.validateTime(n,this.currentMinute,this.currentSecond,r)&&(this.currentHour=n,this.pm=r),e.preventDefault()},decrementHour:function(e){var t=this.currentHour-this.stepHour,n=this.pm;this.hourFormat==`24`?t=t<0?24+t:t:this.hourFormat==`12`&&(this.currentHour===12&&(n=!this.pm),t=t<=0?12+t:t),this.validateTime(t,this.currentMinute,this.currentSecond,n)&&(this.currentHour=t,this.pm=n),e.preventDefault()},incrementMinute:function(e){var t=this.currentMinute+Number(this.stepMinute);this.validateTime(this.currentHour,t,this.currentSecond,this.pm)&&(this.currentMinute=t>59?t-60:t),e.preventDefault()},decrementMinute:function(e){var t=this.currentMinute-this.stepMinute;t=t<0?60+t:t,this.validateTime(this.currentHour,t,this.currentSecond,this.pm)&&(this.currentMinute=t),e.preventDefault()},incrementSecond:function(e){var t=this.currentSecond+Number(this.stepSecond);this.validateTime(this.currentHour,this.currentMinute,t,this.pm)&&(this.currentSecond=t>59?t-60:t),e.preventDefault()},decrementSecond:function(e){var t=this.currentSecond-this.stepSecond;t=t<0?60+t:t,this.validateTime(this.currentHour,this.currentMinute,t,this.pm)&&(this.currentSecond=t),e.preventDefault()},updateModelTime:function(){var e=this;this.timePickerChange=!0;var t=this.viewDate;this.isRangeSelection()&&(t=this.rawValue?this.rawValue[this.focusedDateIndex]||this.rawValue[0]:t),this.isMultipleSelection()&&(t=this.rawValue?this.rawValue[this.rawValue.length-1]:t),t=t?new Date(t.getTime()):new Date,this.hourFormat==`12`?this.currentHour===12?t.setHours(this.pm?12:0):t.setHours(this.pm?this.currentHour+12:this.currentHour):t.setHours(this.currentHour),t.setMinutes(this.currentMinute),t.setSeconds(this.currentSecond),this.isRangeSelection()&&(t=this.rawValue&&this.focusedDateIndex===1&&this.rawValue[1]?[this.rawValue[0],t]:this.rawValue&&this.focusedDateIndex===0?[t,this.rawValue[1]]:[t,null]),this.isMultipleSelection()&&(t=this.rawValue?[].concat(Ot(this.rawValue.slice(0,-1)),[t]):[t]),this.updateModel(t),this.$emit(`date-select`,t),setTimeout(function(){return e.timePickerChange=!1},0)},toggleAMPM:function(e){!this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,!this.pm)&&(this.maxDate||this.minDate)||(this.pm=!this.pm,this.updateModelTime(),e.preventDefault())},clearTimePickerTimer:function(){this.timePickerTimer&&clearInterval(this.timePickerTimer)},onMonthSelect:function(e,t){t.month;var n=t.index;this.view===`month`?this.onDateSelect(e,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.currentView=`date`,this.$emit(`month-change`,{month:this.currentMonth+1,year:this.currentYear})),setTimeout(this.updateFocus,0)},onYearSelect:function(e,t){this.view===`year`?this.onDateSelect(e,{year:t.value,month:0,day:1,selectable:!0}):(this.currentYear=t.value,this.currentView=`month`,this.$emit(`year-change`,{month:this.currentMonth,year:this.currentYear})),setTimeout(this.updateFocus,0)},updateCurrentMetaData:function(){var e=this.viewDate;if(this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.showTime||this.timeOnly){var t=e;this.isRangeSelection()&&this.rawValue&&this.rawValue[this.focusedDateIndex]&&(t=this.rawValue[this.focusedDateIndex]),this.updateCurrentTimeMeta(t)}},isValidSelection:function(e){var t=this;if(e==null)return!0;var n=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(n=!1):e.every(function(e){return t.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)})&&this.isRangeSelection()&&(n=e.length>1&&e[1]>=e[0]),n},parseValue:function(e){if(!e||e.trim().length===0)return null;var t;if(this.isSingleSelection())t=this.parseDateTime(e);else if(this.isMultipleSelection()){var n=e.split(`,`);t=[];var r=Mt(n),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;t.push(this.parseDateTime(a.trim()))}}catch(e){r.e(e)}finally{r.f()}}else if(this.isRangeSelection()){var o=e.split(` - `);t=[];for(var s=0;s<o.length;s++)t[s]=this.parseDateTime(o[s].trim())}return t},safeParse:function(e){try{return this.parseValue(e)}catch{var t=new Date(e);return isNaN(t.getTime())?null:this.isSingleSelection()?t:[t]}},parseValueForComparison:function(e){if(typeof e==`string`){var t=this.parseValue(e);return this.isSingleSelection()?t:t[0]}return e},parseDateTime:function(e){var t,n=`${this.$primevue.config.locale.am}|${this.$primevue.config.locale.pm}|am|pm`,r=e.match(RegExp(`(?:(.+?) )?(\\d{2}:\\d{2}(?::\\d{2})?)(?:\\s+(${n}))?`,`i`));if(this.timeOnly)t=new Date,this.populateTime(t,r[2],r[3]);else{var i=this.datePattern;this.showTime?(t=this.parseDate(r[1],i),this.populateTime(t,r[2],r[3])):t=this.parseDate(e,i)}return t},populateTime:function(e,t,n){if(this.hourFormat==`12`&&!n)throw`Invalid Time`;this.pm=n.toLowerCase()===this.$primevue.config.locale.pm.toLowerCase()||n.toLowerCase()===`pm`;var r=this.parseTime(t);e.setHours(r.hour),e.setMinutes(r.minute),e.setSeconds(r.second)},parseTime:function(e){var t=e.split(`:`),n=this.showSeconds?3:2,r=/^[0-9][0-9]$/;if(t.length!==n||!t[0].match(r)||!t[1].match(r)||this.showSeconds&&!t[2].match(r))throw`Invalid time`;var i=parseInt(t[0]),a=parseInt(t[1]),o=this.showSeconds?parseInt(t[2]):null;if(isNaN(i)||isNaN(a)||i>23||a>59||this.hourFormat==`12`&&i>12||this.showSeconds&&(isNaN(o)||o>59))throw`Invalid time`;return this.hourFormat==`12`&&i!==12&&this.pm?i+=12:this.hourFormat==`12`&&i==12&&!this.pm&&(i=0),{hour:i,minute:a,second:o}},parseDate:function(e,t){if(t==null||e==null)throw`Invalid arguments`;if(e=Dt(e)===`object`?e.toString():e+``,e===``)return null;var n,r,i,a=0,o=typeof this.shortYearCutoff==`string`?new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10):this.shortYearCutoff,s=-1,c=-1,l=-1,u=-1,d=!1,f,p=function(e){var r=n+1<t.length&&t.charAt(n+1)===e;return r&&n++,r},m=function(t){var n=p(t),r=t===`@`?14:t===`!`?20:t===`y`&&n?4:t===`o`?3:2,i=t===`y`?r:1,o=RegExp(`^\\d{`+i+`,`+r+`}`),s=e.substring(a).match(o);if(!s)throw`Missing number at position `+a;return a+=s[0].length,parseInt(s[0],10)},h=function(t,n,r){for(var i=-1,o=p(t)?r:n,s=[],c=0;c<o.length;c++)s.push([c,o[c]]);s.sort(function(e,t){return-(e[1].length-t[1].length)});for(var l=0;l<s.length;l++){var u=s[l][1];if(e.substr(a,u.length).toLowerCase()===u.toLowerCase()){i=s[l][0],a+=u.length;break}}if(i!==-1)return i+1;throw`Unknown name at position `+a},g=function(){if(e.charAt(a)!==t.charAt(n))throw`Unexpected literal at position `+a;a++};for(this.currentView===`month`&&(l=1),this.currentView===`year`&&(l=1,c=1),n=0;n<t.length;n++)if(d)t.charAt(n)===`'`&&!p(`'`)?d=!1:g();else switch(t.charAt(n)){case`d`:l=m(`d`);break;case`D`:h(`D`,this.$primevue.config.locale.dayNamesShort,this.$primevue.config.locale.dayNames);break;case`o`:u=m(`o`);break;case`m`:c=m(`m`);break;case`M`:c=h(`M`,this.$primevue.config.locale.monthNamesShort,this.$primevue.config.locale.monthNames);break;case`y`:s=m(`y`);break;case`@`:f=new Date(m(`@`)),s=f.getFullYear(),c=f.getMonth()+1,l=f.getDate();break;case`!`:f=new Date((m(`!`)-this.ticksTo1970)/1e4),s=f.getFullYear(),c=f.getMonth()+1,l=f.getDate();break;case`'`:p(`'`)?g():d=!0;break;default:g()}if(a<e.length&&(i=e.substr(a),!/^\s+/.test(i)))throw`Extra/unparsed characters found in date: `+i;if(s===-1?s=new Date().getFullYear():s<100&&(s+=new Date().getFullYear()-new Date().getFullYear()%100+(s<=o?0:-100)),u>-1){c=1,l=u;do{if(r=this.getDaysCountInMonth(c-1,s),l<=r)break;c++,l-=r}while(!0)}if(f=this.daylightSavingAdjust(new Date(s,c-1,l)),f.getFullYear()!==s||f.getMonth()+1!==c||f.getDate()!==l)throw`Invalid date`;return f},getWeekNumber:function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t.getTime())/864e5)/7)+1},onDateCellKeydown:function(e,t,n){e.preventDefault();var r=e.currentTarget,i=r.parentElement,a=A(i);switch(e.code){case`ArrowDown`:if(r.tabIndex=`-1`,i.parentElement.nextElementSibling){var o=A(i.parentElement),s=Array.from(i.parentElement.parentElement.children).slice(o+1).find(function(e){var t=e.children[a].children[0];return!y(t,`data-p-disabled`)});if(s){var c=s.children[a].children[0];c.tabIndex=`0`,c.focus()}else this.navigationState={backward:!1},this.navForward(e)}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break;case`ArrowUp`:if(r.tabIndex=`-1`,e.altKey)this.overlayVisible=!1,this.focused=!0;else if(i.parentElement.previousElementSibling){var l=A(i.parentElement),u=Array.from(i.parentElement.parentElement.children).slice(0,l).reverse().find(function(e){var t=e.children[a].children[0];return!y(t,`data-p-disabled`)});if(u){var d=u.children[a].children[0];d.tabIndex=`0`,d.focus()}else this.navigationState={backward:!0},this.navBackward(e)}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break;case`ArrowLeft`:if(r.tabIndex=`-1`,i.previousElementSibling){var f=Array.from(i.parentElement.children).slice(0,a).reverse().find(function(e){var t=e.children[0];return!y(t,`data-p-disabled`)});if(f){var p=f.children[0];p.tabIndex=`0`,p.focus()}else this.navigateToMonth(e,!0,n)}else this.navigateToMonth(e,!0,n);e.preventDefault();break;case`ArrowRight`:if(r.tabIndex=`-1`,i.nextElementSibling){var m=Array.from(i.parentElement.children).slice(a+1).find(function(e){var t=e.children[0];return!y(t,`data-p-disabled`)});if(m){var h=m.children[0];h.tabIndex=`0`,h.focus()}else this.navigateToMonth(e,!1,n)}else this.navigateToMonth(e,!1,n);e.preventDefault();break;case`Enter`:case`NumpadEnter`:case`Space`:this.onDateSelect(e,t),e.preventDefault();break;case`Escape`:this.overlayVisible=!1,e.preventDefault();break;case`Tab`:this.inline||this.trapFocus(e);break;case`Home`:r.tabIndex=`-1`;var g=i.parentElement.children[0].children[0];y(g,`data-p-disabled`)?this.navigateToMonth(e,!0,n):(g.tabIndex=`0`,g.focus()),e.preventDefault();break;case`End`:r.tabIndex=`-1`;var _=i.parentElement,v=_.children[_.children.length-1].children[0];y(v,`data-p-disabled`)?this.navigateToMonth(e,!1,n):(v.tabIndex=`0`,v.focus()),e.preventDefault();break;case`PageUp`:r.tabIndex=`-1`,e.shiftKey?(this.navigationState={backward:!0},this.navBackward(e)):this.navigateToMonth(e,!0,n),e.preventDefault();break;case`PageDown`:r.tabIndex=`-1`,e.shiftKey?(this.navigationState={backward:!1},this.navForward(e)):this.navigateToMonth(e,!1,n),e.preventDefault();break}},navigateToMonth:function(e,t,r){if(t)if(this.numberOfMonths===1||r===0)this.navigationState={backward:!0},this.navBackward(e);else{var i=this.overlay.children[r-1],a=n(i,`table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`),o=a[a.length-1];o.tabIndex=`0`,o.focus()}else if(this.numberOfMonths===1||r===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(e);else{var s=this.overlay.children[r+1],c=ce(s,`table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`);c.tabIndex=`0`,c.focus()}},onMonthCellKeydown:function(e,t){var n=e.currentTarget;switch(e.code){case`ArrowUp`:case`ArrowDown`:n.tabIndex=`-1`;var r=n.parentElement.children,i=A(n),a=r[e.code===`ArrowDown`?i+3:i-3];a&&(a.tabIndex=`0`,a.focus()),e.preventDefault();break;case`ArrowLeft`:n.tabIndex=`-1`;var o=n.previousElementSibling;o?(o.tabIndex=`0`,o.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break;case`ArrowRight`:n.tabIndex=`-1`;var s=n.nextElementSibling;s?(s.tabIndex=`0`,s.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break;case`PageUp`:if(e.shiftKey)return;this.navigationState={backward:!0},this.navBackward(e);break;case`PageDown`:if(e.shiftKey)return;this.navigationState={backward:!1},this.navForward(e);break;case`Enter`:case`NumpadEnter`:case`Space`:this.onMonthSelect(e,t),e.preventDefault();break;case`Escape`:this.overlayVisible=!1,e.preventDefault();break;case`Tab`:this.trapFocus(e);break}},onYearCellKeydown:function(e,t){var n=e.currentTarget;switch(e.code){case`ArrowUp`:case`ArrowDown`:n.tabIndex=`-1`;var r=n.parentElement.children,i=A(n),a=r[e.code===`ArrowDown`?i+2:i-2];a&&(a.tabIndex=`0`,a.focus()),e.preventDefault();break;case`ArrowLeft`:n.tabIndex=`-1`;var o=n.previousElementSibling;o?(o.tabIndex=`0`,o.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break;case`ArrowRight`:n.tabIndex=`-1`;var s=n.nextElementSibling;s?(s.tabIndex=`0`,s.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break;case`PageUp`:if(e.shiftKey)return;this.navigationState={backward:!0},this.navBackward(e);break;case`PageDown`:if(e.shiftKey)return;this.navigationState={backward:!1},this.navForward(e);break;case`Enter`:case`NumpadEnter`:case`Space`:this.onYearSelect(e,t),e.preventDefault();break;case`Escape`:this.overlayVisible=!1,e.preventDefault();break;case`Tab`:this.trapFocus(e);break}},updateFocus:function(){var e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?this.previousButton&&this.previousButton.focus():this.nextButton&&this.nextButton.focus();else{if(this.navigationState.backward){var t=this.currentView===`month`?n(this.overlay,`[data-pc-section="monthview"] [data-pc-section="month"]:not([data-p-disabled="true"])`):this.currentView===`year`?n(this.overlay,`[data-pc-section="yearview"] [data-pc-section="year"]:not([data-p-disabled="true"])`):n(this.overlay,`table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`);t&&t.length>0&&(e=t[t.length-1])}else e=this.currentView===`month`?ce(this.overlay,`[data-pc-section="monthview"] [data-pc-section="month"]:not([data-p-disabled="true"])`):this.currentView===`year`?ce(this.overlay,`[data-pc-section="yearview"] [data-pc-section="year"]:not([data-p-disabled="true"])`):ce(this.overlay,`table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`);e&&(e.tabIndex=`0`,e.focus())}this.navigationState=null}else this.initFocusableCell()},initFocusableCell:function(){var e;if(this.currentView===`month`){var t=n(this.overlay,`[data-pc-section="monthview"] [data-pc-section="month"]`),r=ce(this.overlay,`[data-pc-section="monthview"] [data-pc-section="month"][data-p-selected="true"]`);t.forEach(function(e){return e.tabIndex=-1}),e=r||t[0]}else if(this.currentView===`year`){var i=n(this.overlay,`[data-pc-section="yearview"] [data-pc-section="year"]`),a=ce(this.overlay,`[data-pc-section="yearview"] [data-pc-section="year"][data-p-selected="true"]`);i.forEach(function(e){return e.tabIndex=-1}),e=a||i[0]}else e=ce(this.overlay,`span[data-p-selected="true"]`),!e&&(e=ce(this.overlay,`td[data-p-today="true"] span:not([data-p-disabled="true"]):not([data-p-ink="true"])`)||ce(this.overlay,`.p-datepicker-calendar td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`));e&&(e.tabIndex=`0`,!this.preventFocus&&this.overlay&&!this.overlay.contains(document.activeElement)&&e.focus(),this.preventFocus=!1)},trapFocus:function(e){e.preventDefault();var t=re(this.overlay);if(t&&t.length>0)if(!document.activeElement)t[0].focus();else{var n=t.indexOf(document.activeElement);if(e.shiftKey)n===-1||n===0?t[t.length-1].focus():t[n-1].focus();else if(n===-1)if(this.timeOnly)t[0].focus();else{var r=t.findIndex(function(e){return e.tagName===`SPAN`});r===-1&&(r=t.findIndex(function(e){return e.tagName===`BUTTON`})),r===-1?t[0].focus():t[r].focus()}else n===t.length-1?t[0].focus():t[n+1].focus()}},onContainerButtonKeydown:function(e){switch(e.code){case`Tab`:this.trapFocus(e);break;case`Escape`:this.overlayVisible=!1,e.preventDefault();break}this.$emit(`keydown`,e)},onInput:function(e){try{var t;this.selectionStart=this.input.selectionStart,this.selectionEnd=this.input.selectionEnd,(t=this.$refs.clearIcon)!=null&&(t=t.$el)!=null&&t.style&&(this.$refs.clearIcon.$el.style.display=Ae(e.target.value)?`none`:`block`);var n=this.parseValue(e.target.value);this.isValidSelection(n)&&(this.typeUpdate=!0,this.updateModel(this.updateModelType===`string`?this.formatValue(n):n),this.updateCurrentMetaData())}catch{}this.$emit(`input`,e)},onInputClick:function(){this.showOnFocus&&this.isEnabled()&&!this.overlayVisible&&(this.overlayVisible=!0)},onFocus:function(e){this.showOnFocus&&this.isEnabled()&&(this.overlayVisible=!0),this.focused=!0,this.$emit(`focus`,e)},onBlur:function(e){var t,n,r;this.$emit(`blur`,{originalEvent:e,value:e.target.value}),(t=(n=this.formField).onBlur)==null||t.call(n),this.focused=!1,e.target.value=this.formatValue(this.rawValue),(r=this.$refs.clearIcon)!=null&&(r=r.$el)!=null&&r.style&&(this.$refs.clearIcon.$el.style.display=Ae(e.target.value)?`none`:`block`)},onKeyDown:function(e){if(e.code===`ArrowDown`&&this.overlay)this.trapFocus(e);else if(e.code===`ArrowDown`&&!this.overlay)this.overlayVisible=!0;else if(e.code===`Escape`)this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault(),e.stopPropagation());else if(e.code===`Tab`)this.overlay&&re(this.overlay).forEach(function(e){return e.tabIndex=`-1`}),this.overlayVisible&&=!1;else if(e.code===`Enter`){if(this.manualInput&&e.target.value!==null&&e.target.value?.trim()!==``)try{var t=this.parseValue(e.target.value);this.isValidSelection(t)&&(this.overlayVisible=!1)}catch{}this.$emit(`keydown`,e)}},overlayRef:function(e){this.overlay=e},inputRef:function(e){this.input=e?e.$el:void 0},previousButtonRef:function(e){this.previousButton=e?e.$el:void 0},nextButtonRef:function(e){this.nextButton=e?e.$el:void 0},getMonthName:function(e){return this.$primevue.config.locale.monthNames[e]},getYear:function(e){return this.currentView===`month`?this.currentYear:e.year},onClearClick:function(){this.updateModel(null),this.overlayVisible=!1},onOverlayClick:function(e){e.stopPropagation(),this.inline||fe.emit(`overlay-click`,{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){switch(e.code){case`Escape`:this.inline||(this.input.focus(),this.overlayVisible=!1,e.stopPropagation());break}},onOverlayMouseUp:function(e){this.onOverlayClick(e)},createResponsiveStyle:function(){if(this.numberOfMonths>1&&this.responsiveOptions&&!this.isUnstyled){if(!this.responsiveStyleElement){var e;this.responsiveStyleElement=document.createElement(`style`),this.responsiveStyleElement.type=`text/css`,d(this.responsiveStyleElement,`nonce`,(e=this.$primevue)==null||(e=e.config)==null||(e=e.csp)==null?void 0:e.nonce),document.body.appendChild(this.responsiveStyleElement)}var t=``;if(this.responsiveOptions)for(var n=Oe(),r=Ot(this.responsiveOptions).filter(function(e){return!!(e.breakpoint&&e.numMonths)}).sort(function(e,t){return-1*n(e.breakpoint,t.breakpoint)}),i=0;i<r.length;i++){for(var a=r[i],o=a.breakpoint,s=a.numMonths,c=`
|
|
557
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Nt(e,t){if(e){if(typeof e==`string`)return Pt(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pt(e,t):void 0}}function Pt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ft={name:`DatePicker`,extends:Ct,inheritAttrs:!1,emits:[`show`,`hide`,`input`,`month-change`,`year-change`,`date-select`,`today-click`,`clear-click`,`focus`,`blur`,`keydown`],inject:{$pcFluid:{default:null}},navigationState:null,timePickerChange:!1,scrollHandler:null,outsideClickListener:null,resizeListener:null,matchMediaListener:null,matchMediaOrientationListener:null,overlay:null,input:null,previousButton:null,nextButton:null,timePickerTimer:null,preventFocus:!1,typeUpdate:!1,data:function(){return{currentMonth:null,currentYear:null,currentHour:null,currentMinute:null,currentSecond:null,pm:null,focused:!1,overlayVisible:!1,currentView:this.view,query:null,queryMatches:!1,queryOrientation:null,focusedDateIndex:0,rawValue:null}},watch:{modelValue:{immediate:!0,handler:function(e){var t;this.rawValue=typeof e==`string`?this.safeParse(e):e,this.updateCurrentMetaData(),!this.typeUpdate&&!this.inline&&this.input&&(this.input.value=this.formatValue(this.rawValue)),this.typeUpdate=!1,(t=this.$refs.clearIcon)!=null&&(t=t.$el)!=null&&t.style&&(this.$refs.clearIcon.$el.style.display=le(e)?`none`:`block`)}},showTime:function(){this.updateCurrentMetaData()},minDate:function(){this.updateCurrentMetaData()},maxDate:function(){this.updateCurrentMetaData()},months:function(){this.overlay&&(this.focused||(this.inline&&(this.preventFocus=!0),setTimeout(this.updateFocus,0)))},numberOfMonths:function(){this.destroyResponsiveStyleElement(),this.createResponsiveStyle()},responsiveOptions:function(){this.destroyResponsiveStyleElement(),this.createResponsiveStyle()},currentView:function(){var e=this;Promise.resolve(null).then(function(){return e.alignOverlay()})},view:function(e){this.currentView=e}},created:function(){this.updateCurrentMetaData()},mounted:function(){if(this.createResponsiveStyle(),this.bindMatchMediaListener(),this.bindMatchMediaOrientationListener(),this.inline)this.disabled||(this.preventFocus=!0,this.initFocusableCell());else{var e;this.input.value=this.inputFieldValue,(e=this.$refs.clearIcon)!=null&&(e=e.$el)!=null&&e.style&&(this.$refs.clearIcon.$el.style.display=this.$filled?`block`:`none`)}},updated:function(){this.overlay&&(this.preventFocus=!0,setTimeout(this.updateFocus,0)),this.input&&this.selectionStart!=null&&this.selectionEnd!=null&&(this.input.selectionStart=this.selectionStart,this.input.selectionEnd=this.selectionEnd,this.selectionStart=null,this.selectionEnd=null)},beforeUnmount:function(){this.timePickerTimer&&clearTimeout(this.timePickerTimer),this.destroyResponsiveStyleElement(),this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindMatchMediaListener(),this.unbindMatchMediaOrientationListener(),this.scrollHandler&&=(this.scrollHandler.destroy(),null),this.overlay&&this.autoZIndex&&ue.clear(this.overlay),this.overlay=null},methods:{isSelected:function(e){if(this.rawValue){if(this.isSingleSelection())return this.isDateEquals(this.parseValueForComparison(this.rawValue),e);if(this.isMultipleSelection()){var t=!1,n=Mt(this.rawValue),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;if(t=this.isDateEquals(this.parseValueForComparison(i),e),t)break}}catch(e){n.e(e)}finally{n.f()}return t}else if(this.isRangeSelection()){var a=this.parseValueForComparison(this.rawValue[0]);if(this.rawValue[1]){var o=this.parseValueForComparison(this.rawValue[1]);return this.isDateEquals(a,e)||this.isDateEquals(o,e)||this.isDateBetween(a,o,e)}else return this.isDateEquals(a,e)}}return!1},isMonthSelected:function(e){var t=this;if(this.isMultipleSelection())return this.rawValue?.some(function(n){var r=t.parseValueForComparison(n);return r.getMonth()===e&&r.getFullYear()===t.currentYear});if(this.isRangeSelection()){var n,r,i=(n=this.rawValue)!=null&&n[0]?this.parseValueForComparison(this.rawValue[0]):null,a=(r=this.rawValue)!=null&&r[1]?this.parseValueForComparison(this.rawValue[1]):null;if(a){var o=new Date(this.currentYear,e,1),s=new Date(i.getFullYear(),i.getMonth(),1),c=new Date(a.getFullYear(),a.getMonth(),1);return o>=s&&o<=c}else return i?.getFullYear()===this.currentYear&&i?.getMonth()===e}else return this.rawValue?.getMonth()===e&&this.rawValue?.getFullYear()===this.currentYear},isYearSelected:function(e){var t=this;if(this.isMultipleSelection())return this.rawValue?.some(function(n){return t.parseValueForComparison(n).getFullYear()===e});if(this.isRangeSelection()){var n,r,i=(n=this.rawValue)!=null&&n[0]?this.parseValueForComparison(this.rawValue[0]):null,a=(r=this.rawValue)!=null&&r[1]?this.parseValueForComparison(this.rawValue[1]):null,o=i?i.getFullYear():null,s=a?a.getFullYear():null;return o===e||s===e||o<e&&s>e}else return this.rawValue?.getFullYear()===e},isDateEquals:function(e,t){return e?e.getDate()===t.day&&e.getMonth()===t.month&&e.getFullYear()===t.year:!1},isDateBetween:function(e,t,n){var r=!1,i=this.parseValueForComparison(e),a=this.parseValueForComparison(t);if(i&&a){var o=new Date(n.year,n.month,n.day);return i.getTime()<=o.getTime()&&a.getTime()>=o.getTime()}return r},getFirstDayOfMonthIndex:function(e,t){var n=new Date;n.setDate(1),n.setMonth(e),n.setFullYear(t);var r=n.getDay()+this.sundayIndex;return r>=7?r-7:r},getDaysCountInMonth:function(e,t){return 32-this.daylightSavingAdjust(new Date(t,e,32)).getDate()},getDaysCountInPrevMonth:function(e,t){var n=this.getPreviousMonthAndYear(e,t);return this.getDaysCountInMonth(n.month,n.year)},getPreviousMonthAndYear:function(e,t){var n,r;return e===0?(n=11,r=t-1):(n=e-1,r=t),{month:n,year:r}},getNextMonthAndYear:function(e,t){var n,r;return e===11?(n=0,r=t+1):(n=e+1,r=t),{month:n,year:r}},daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},isToday:function(e,t,n,r){return e.getDate()===t&&e.getMonth()===n&&e.getFullYear()===r},isSelectable:function(e,t,n,r){var i=!0,a=!0,o=!0,s=!0;return r&&!this.selectOtherMonths?!1:(this.minDate&&(this.minDate.getFullYear()>n||this.minDate.getFullYear()===n&&(this.minDate.getMonth()>t||this.minDate.getMonth()===t&&this.minDate.getDate()>e))&&(i=!1),this.maxDate&&(this.maxDate.getFullYear()<n||this.maxDate.getFullYear()===n&&(this.maxDate.getMonth()<t||this.maxDate.getMonth()===t&&this.maxDate.getDate()<e))&&(a=!1),this.disabledDates&&(o=!this.isDateDisabled(e,t,n)),this.disabledDays&&(s=!this.isDayDisabled(e,t,n)),i&&a&&o&&s)},onOverlayEnter:function(e){C(e,this.inline?void 0:{position:`absolute`,top:`0`}),this.autoZIndex&&ue.set(`overlay`,e,this.baseZIndex||this.$primevue.config.zIndex.overlay),this.$attrSelector&&e.setAttribute(this.$attrSelector,``),this.alignOverlay(),this.$emit(`show`)},onOverlayEnterComplete:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener()},onOverlayAfterLeave:function(e){this.autoZIndex&&ue.clear(e)},onOverlayLeave:function(){this.currentView=this.view,this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit(`hide`),this.overlay=null},onPrevButtonClick:function(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)},onNextButtonClick:function(e){this.navigationState={backward:!1,button:!0},this.navForward(e)},navBackward:function(e){e.preventDefault(),this.isEnabled()&&(this.currentView===`month`?(this.decrementYear(),this.$emit(`year-change`,{month:this.currentMonth,year:this.currentYear})):this.currentView===`year`?this.decrementDecade():e.shiftKey?this.decrementYear():(this.currentMonth===0?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.$emit(`month-change`,{month:this.currentMonth+1,year:this.currentYear})))},navForward:function(e){e.preventDefault(),this.isEnabled()&&(this.currentView===`month`?(this.incrementYear(),this.$emit(`year-change`,{month:this.currentMonth,year:this.currentYear})):this.currentView===`year`?this.incrementDecade():e.shiftKey?this.incrementYear():(this.currentMonth===11?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.$emit(`month-change`,{month:this.currentMonth+1,year:this.currentYear})))},decrementYear:function(){this.currentYear--},decrementDecade:function(){this.currentYear-=10},incrementYear:function(){this.currentYear++},incrementDecade:function(){this.currentYear+=10},switchToMonthView:function(e){this.currentView=`month`,setTimeout(this.updateFocus,0),e.preventDefault()},switchToYearView:function(e){this.currentView=`year`,setTimeout(this.updateFocus,0),e.preventDefault()},isEnabled:function(){return!this.disabled&&!this.readonly},updateCurrentTimeMeta:function(e){var t=e.getHours();this.hourFormat===`12`&&(this.pm=t>11,t>=12&&(t=t==12?12:t-12)),this.currentHour=Math.floor(t/this.stepHour)*this.stepHour,this.currentMinute=Math.floor(e.getMinutes()/this.stepMinute)*this.stepMinute,this.currentSecond=Math.floor(e.getSeconds()/this.stepSecond)*this.stepSecond},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.isOutsideClicked(t)&&(e.overlayVisible=!1)},document.addEventListener(`mousedown`,this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&=(document.removeEventListener(`mousedown`,this.outsideClickListener),null)},bindScrollListener:function(){var t=this;this.scrollHandler||=new e(this.$refs.container,function(){t.overlayVisible&&=!1}),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!E()&&(e.overlayVisible=!1)},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),null)},bindMatchMediaListener:function(){var e=this;if(!this.matchMediaListener){var t=matchMedia(`(max-width: ${this.breakpoint})`);this.query=t,this.queryMatches=t.matches,this.matchMediaListener=function(){e.queryMatches=t.matches,e.mobileActive=!1},this.query.addEventListener(`change`,this.matchMediaListener)}},unbindMatchMediaListener:function(){this.matchMediaListener&&=(this.query.removeEventListener(`change`,this.matchMediaListener),null)},bindMatchMediaOrientationListener:function(){var e=this;this.matchMediaOrientationListener||(this.queryOrientation=matchMedia(`(orientation: portrait)`),this.matchMediaOrientationListener=function(){e.alignOverlay()},this.queryOrientation.addEventListener(`change`,this.matchMediaOrientationListener))},unbindMatchMediaOrientationListener:function(){this.matchMediaOrientationListener&&=(this.queryOrientation.removeEventListener(`change`,this.matchMediaOrientationListener),this.queryOrientation=null,null)},isOutsideClicked:function(e){var t=e.composedPath();return!(this.$el.isSameNode(e.target)||this.isNavIconClicked(e)||t.includes(this.$el)||t.includes(this.overlay))},isNavIconClicked:function(e){return this.previousButton&&(this.previousButton.isSameNode(e.target)||this.previousButton.contains(e.target))||this.nextButton&&(this.nextButton.isSameNode(e.target)||this.nextButton.contains(e.target))},alignOverlay:function(){this.overlay&&(this.appendTo===`self`||this.inline?Fe(this.overlay,this.$el):(this.view===`date`?(this.overlay.style.width=p(this.overlay)+`px`,this.overlay.style.minWidth=p(this.$el)+`px`):this.overlay.style.width=p(this.$el)+`px`,me(this.overlay,this.$el)))},onButtonClick:function(){this.isEnabled()&&(this.overlayVisible?this.overlayVisible=!1:(this.input.focus(),this.overlayVisible=!0))},isDateDisabled:function(e,t,n){if(this.disabledDates){var r=Mt(this.disabledDates),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;if(a.getFullYear()===n&&a.getMonth()===t&&a.getDate()===e)return!0}}catch(e){r.e(e)}finally{r.f()}}return!1},isDayDisabled:function(e,t,n){if(this.disabledDays){var r=new Date(n,t,e).getDay();return this.disabledDays.indexOf(r)!==-1}return!1},onMonthDropdownChange:function(e){this.currentMonth=parseInt(e),this.$emit(`month-change`,{month:this.currentMonth+1,year:this.currentYear})},onYearDropdownChange:function(e){this.currentYear=parseInt(e),this.$emit(`year-change`,{month:this.currentMonth,year:this.currentYear})},onDateSelect:function(e,t){var n=this;if(!(this.disabled||!t.selectable)){if(S(this.overlay,`table td span:not([data-p-disabled="true"])`).forEach(function(e){return e.tabIndex=-1}),e&&e.currentTarget.focus(),this.isMultipleSelection()&&this.isSelected(t)){var r=this.rawValue.filter(function(e){return!n.isDateEquals(n.parseValueForComparison(e),t)});this.updateModel(r)}else this.shouldSelectDate(t)&&(t.otherMonth?(this.currentMonth=t.month,this.currentYear=t.year,this.selectDate(t)):this.selectDate(t));this.isSingleSelection()&&(!this.showTime||this.hideOnDateTimeSelect)&&(this.input&&this.input.focus(),setTimeout(function(){n.overlayVisible=!1},150))}},selectDate:function(e){var t=this,n=new Date(e.year,e.month,e.day);this.showTime&&(this.hourFormat===`12`&&this.currentHour!==12&&this.pm?n.setHours(this.currentHour+12):n.setHours(this.currentHour),n.setMinutes(this.currentMinute),n.setSeconds(this.showSeconds?this.currentSecond:0)),this.minDate&&this.minDate>n&&(n=this.minDate,this.currentHour=n.getHours(),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds()),this.maxDate&&this.maxDate<n&&(n=this.maxDate,this.currentHour=n.getHours(),this.currentMinute=n.getMinutes(),this.currentSecond=n.getSeconds());var r=null;if(this.isSingleSelection())r=n;else if(this.isMultipleSelection())r=this.rawValue?[].concat(Ot(this.rawValue),[n]):[n];else if(this.isRangeSelection())if(this.rawValue&&this.rawValue.length){var i=this.parseValueForComparison(this.rawValue[0]),a=this.rawValue[1];!a&&n.getTime()>=i.getTime()?(a=n,this.focusedDateIndex=1):(i=n,a=null,this.focusedDateIndex=0),r=[i,a]}else r=[n,null],this.focusedDateIndex=0;r!==null&&this.updateModel(r),this.isRangeSelection()&&this.hideOnRangeSelection&&r[1]!==null&&setTimeout(function(){t.overlayVisible=!1},150),this.$emit(`date-select`,n)},updateModel:function(e){var t=this;if(this.rawValue=e,this.updateModelType===`date`)if(this.isSingleSelection())this.writeValue(e);else{var n=null;Array.isArray(e)&&(n=e.map(function(e){return t.parseValueForComparison(e)})),this.writeValue(n)}else if(this.updateModelType==`string`){if(this.isSingleSelection())this.writeValue(this.formatDateTime(e));else if(this.isMultipleSelection()){var r=null;Array.isArray(e)&&(r=e.map(function(e){return t.formatDateTime(e)})),this.writeValue(r)}else if(this.isRangeSelection()){var i=null;Array.isArray(e)&&(i=e.map(function(e){return e==null?null:typeof e==`string`?e:t.formatDateTime(e)})),this.writeValue(i)}}},shouldSelectDate:function(){return this.isMultipleSelection()?this.maxDateCount==null?!0:this.maxDateCount>(this.rawValue?this.rawValue.length:0):!0},isSingleSelection:function(){return this.selectionMode===`single`},isRangeSelection:function(){return this.selectionMode===`range`},isMultipleSelection:function(){return this.selectionMode===`multiple`},formatValue:function(e){if(typeof e==`string`)return this.dateFormat?isNaN(new Date(e))?e:this.formatDate(new Date(e),this.dateFormat):e;var t=``;if(e)try{if(this.isSingleSelection())t=this.formatDateTime(e);else if(this.isMultipleSelection())for(var n=0;n<e.length;n++){var r=typeof e[n]==`string`?this.formatDateTime(this.parseValueForComparison(e[n])):this.formatDateTime(e[n]);t+=r,n!==e.length-1&&(t+=`, `)}else if(this.isRangeSelection()&&e&&e.length){var i=this.parseValueForComparison(e[0]),a=this.parseValueForComparison(e[1]);t=this.formatDateTime(i),a&&(t+=` - `+this.formatDateTime(a))}}catch{t=e}return t},formatDateTime:function(e){var t=null;return ie(e)&&De(e)?this.timeOnly?t=this.formatTime(e):(t=this.formatDate(e,this.datePattern),this.showTime&&(t+=` `+this.formatTime(e))):this.updateModelType===`string`&&(t=e),t},formatDate:function(e,t){if(!e)return``;var n,r=function(e){var r=n+1<t.length&&t.charAt(n+1)===e;return r&&n++,r},i=function(e,t,n){var i=``+t;if(r(e))for(;i.length<n;)i=`0`+i;return i},a=function(e,t,n,i){return r(e)?i[t]:n[t]},o=``,s=!1;if(e)for(n=0;n<t.length;n++)if(s)t.charAt(n)===`'`&&!r(`'`)?s=!1:o+=t.charAt(n);else switch(t.charAt(n)){case`d`:o+=i(`d`,e.getDate(),2);break;case`D`:o+=a(`D`,e.getDay(),this.$primevue.config.locale.dayNamesShort,this.$primevue.config.locale.dayNames);break;case`o`:o+=i(`o`,Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case`m`:o+=i(`m`,e.getMonth()+1,2);break;case`M`:o+=a(`M`,e.getMonth(),this.$primevue.config.locale.monthNamesShort,this.$primevue.config.locale.monthNames);break;case`y`:o+=r(`y`)?e.getFullYear():(e.getFullYear()%100<10?`0`:``)+e.getFullYear()%100;break;case`@`:o+=e.getTime();break;case`!`:o+=e.getTime()*1e4+this.ticksTo1970;break;case`'`:r(`'`)?o+=`'`:s=!0;break;default:o+=t.charAt(n)}return o},formatTime:function(e){if(!e)return``;var t=``,n=e.getHours(),r=e.getMinutes(),i=e.getSeconds();return this.hourFormat===`12`&&n>11&&n!==12&&(n-=12),this.hourFormat===`12`?t+=n===0?12:n<10?`0`+n:n:t+=n<10?`0`+n:n,t+=`:`,t+=r<10?`0`+r:r,this.showSeconds&&(t+=`:`,t+=i<10?`0`+i:i),this.hourFormat===`12`&&(t+=e.getHours()>11?` ${this.$primevue.config.locale.pm}`:` ${this.$primevue.config.locale.am}`),t},onTodayButtonClick:function(e){var t=new Date,n={day:t.getDate(),month:t.getMonth(),year:t.getFullYear(),otherMonth:t.getMonth()!==this.currentMonth||t.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(null,n),this.$emit(`today-click`,t),e.preventDefault()},onClearButtonClick:function(e){this.updateModel(null),this.overlayVisible=!1,this.$emit(`clear-click`,e),e.preventDefault()},onTimePickerElementMouseDown:function(e,t,n){this.isEnabled()&&(this.repeat(e,null,t,n),e.preventDefault())},onTimePickerElementMouseUp:function(e){this.isEnabled()&&(this.clearTimePickerTimer(),this.updateModelTime(),e.preventDefault())},onTimePickerElementMouseLeave:function(){this.clearTimePickerTimer()},onTimePickerElementKeyDown:function(e,t,n){switch(e.code){case`Enter`:case`NumpadEnter`:case`Space`:this.isEnabled()&&(this.repeat(e,null,t,n),e.preventDefault());break}},onTimePickerElementKeyUp:function(e){switch(e.code){case`Enter`:case`NumpadEnter`:case`Space`:this.isEnabled()&&(this.clearTimePickerTimer(),this.updateModelTime(),e.preventDefault());break}},repeat:function(e,t,n,r){var i=this,a=t||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(function(){i.repeat(e,100,n,r)},a),n){case 0:r===1?this.incrementHour(e):this.decrementHour(e);break;case 1:r===1?this.incrementMinute(e):this.decrementMinute(e);break;case 2:r===1?this.incrementSecond(e):this.decrementSecond(e);break}},convertTo24Hour:function(e,t){return this.hourFormat==`12`?e===12?t?12:0:t?e+12:e:e},validateTime:function(e,t,n,r){var i=this.viewDate,a=this.convertTo24Hour(e,r);this.isRangeSelection()&&(i=this.rawValue?this.rawValue[1]||this.rawValue[0]:i),this.isMultipleSelection()&&(i=this.rawValue?this.rawValue[this.rawValue.length-1]:i);var o=i?i.toDateString():null;return!(this.minDate&&o&&this.minDate.toDateString()===o&&(this.minDate.getHours()>a||this.minDate.getHours()===a&&(this.minDate.getMinutes()>t||this.minDate.getMinutes()===t&&this.minDate.getSeconds()>n))||this.maxDate&&o&&this.maxDate.toDateString()===o&&(this.maxDate.getHours()<a||this.maxDate.getHours()===a&&(this.maxDate.getMinutes()<t||this.maxDate.getMinutes()===t&&this.maxDate.getSeconds()<n)))},incrementHour:function(e){var t=this.currentHour,n=this.currentHour+Number(this.stepHour),r=this.pm;this.hourFormat==`24`?n=n>=24?n-24:n:this.hourFormat==`12`&&(t<12&&n>11&&(r=!this.pm),n=n>=13?n-12:n),this.validateTime(n,this.currentMinute,this.currentSecond,r)&&(this.currentHour=n,this.pm=r),e.preventDefault()},decrementHour:function(e){var t=this.currentHour-this.stepHour,n=this.pm;this.hourFormat==`24`?t=t<0?24+t:t:this.hourFormat==`12`&&(this.currentHour===12&&(n=!this.pm),t=t<=0?12+t:t),this.validateTime(t,this.currentMinute,this.currentSecond,n)&&(this.currentHour=t,this.pm=n),e.preventDefault()},incrementMinute:function(e){var t=this.currentMinute+Number(this.stepMinute);this.validateTime(this.currentHour,t,this.currentSecond,this.pm)&&(this.currentMinute=t>59?t-60:t),e.preventDefault()},decrementMinute:function(e){var t=this.currentMinute-this.stepMinute;t=t<0?60+t:t,this.validateTime(this.currentHour,t,this.currentSecond,this.pm)&&(this.currentMinute=t),e.preventDefault()},incrementSecond:function(e){var t=this.currentSecond+Number(this.stepSecond);this.validateTime(this.currentHour,this.currentMinute,t,this.pm)&&(this.currentSecond=t>59?t-60:t),e.preventDefault()},decrementSecond:function(e){var t=this.currentSecond-this.stepSecond;t=t<0?60+t:t,this.validateTime(this.currentHour,this.currentMinute,t,this.pm)&&(this.currentSecond=t),e.preventDefault()},updateModelTime:function(){var e=this;this.timePickerChange=!0;var t=this.viewDate;this.isRangeSelection()&&(t=this.rawValue?this.rawValue[this.focusedDateIndex]||this.rawValue[0]:t),this.isMultipleSelection()&&(t=this.rawValue?this.rawValue[this.rawValue.length-1]:t),t=t?new Date(t.getTime()):new Date,this.hourFormat==`12`?this.currentHour===12?t.setHours(this.pm?12:0):t.setHours(this.pm?this.currentHour+12:this.currentHour):t.setHours(this.currentHour),t.setMinutes(this.currentMinute),t.setSeconds(this.currentSecond),this.isRangeSelection()&&(t=this.rawValue&&this.focusedDateIndex===1&&this.rawValue[1]?[this.rawValue[0],t]:this.rawValue&&this.focusedDateIndex===0?[t,this.rawValue[1]]:[t,null]),this.isMultipleSelection()&&(t=this.rawValue?[].concat(Ot(this.rawValue.slice(0,-1)),[t]):[t]),this.updateModel(t),this.$emit(`date-select`,t),setTimeout(function(){return e.timePickerChange=!1},0)},toggleAMPM:function(e){!this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,!this.pm)&&(this.maxDate||this.minDate)||(this.pm=!this.pm,this.updateModelTime(),e.preventDefault())},clearTimePickerTimer:function(){this.timePickerTimer&&clearInterval(this.timePickerTimer)},onMonthSelect:function(e,t){t.month;var n=t.index;this.view===`month`?this.onDateSelect(e,{year:this.currentYear,month:n,day:1,selectable:!0}):(this.currentMonth=n,this.currentView=`date`,this.$emit(`month-change`,{month:this.currentMonth+1,year:this.currentYear})),setTimeout(this.updateFocus,0)},onYearSelect:function(e,t){this.view===`year`?this.onDateSelect(e,{year:t.value,month:0,day:1,selectable:!0}):(this.currentYear=t.value,this.currentView=`month`,this.$emit(`year-change`,{month:this.currentMonth,year:this.currentYear})),setTimeout(this.updateFocus,0)},updateCurrentMetaData:function(){var e=this.viewDate;if(this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.showTime||this.timeOnly){var t=e;this.isRangeSelection()&&this.rawValue&&this.rawValue[this.focusedDateIndex]&&(t=this.rawValue[this.focusedDateIndex]),this.updateCurrentTimeMeta(t)}},isValidSelection:function(e){var t=this;if(e==null)return!0;var n=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(n=!1):e.every(function(e){return t.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)})&&this.isRangeSelection()&&(n=e.length>1&&e[1]>=e[0]),n},parseValue:function(e){if(!e||e.trim().length===0)return null;var t;if(this.isSingleSelection())t=this.parseDateTime(e);else if(this.isMultipleSelection()){var n=e.split(`,`);t=[];var r=Mt(n),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;t.push(this.parseDateTime(a.trim()))}}catch(e){r.e(e)}finally{r.f()}}else if(this.isRangeSelection()){var o=e.split(` - `);t=[];for(var s=0;s<o.length;s++)t[s]=this.parseDateTime(o[s].trim())}return t},safeParse:function(e){try{return this.parseValue(e)}catch{var t=new Date(e);return isNaN(t.getTime())?null:this.isSingleSelection()?t:[t]}},parseValueForComparison:function(e){if(typeof e==`string`){var t=this.parseValue(e);return this.isSingleSelection()?t:t[0]}return e},parseDateTime:function(e){var t,n=`${this.$primevue.config.locale.am}|${this.$primevue.config.locale.pm}|am|pm`,r=e.match(RegExp(`(?:(.+?) )?(\\d{2}:\\d{2}(?::\\d{2})?)(?:\\s+(${n}))?`,`i`));if(this.timeOnly)t=new Date,this.populateTime(t,r[2],r[3]);else{var i=this.datePattern;this.showTime?(t=this.parseDate(r[1],i),this.populateTime(t,r[2],r[3])):t=this.parseDate(e,i)}return t},populateTime:function(e,t,n){if(this.hourFormat==`12`&&!n)throw`Invalid Time`;this.pm=n.toLowerCase()===this.$primevue.config.locale.pm.toLowerCase()||n.toLowerCase()===`pm`;var r=this.parseTime(t);e.setHours(r.hour),e.setMinutes(r.minute),e.setSeconds(r.second)},parseTime:function(e){var t=e.split(`:`),n=this.showSeconds?3:2,r=/^[0-9][0-9]$/;if(t.length!==n||!t[0].match(r)||!t[1].match(r)||this.showSeconds&&!t[2].match(r))throw`Invalid time`;var i=parseInt(t[0]),a=parseInt(t[1]),o=this.showSeconds?parseInt(t[2]):null;if(isNaN(i)||isNaN(a)||i>23||a>59||this.hourFormat==`12`&&i>12||this.showSeconds&&(isNaN(o)||o>59))throw`Invalid time`;return this.hourFormat==`12`&&i!==12&&this.pm?i+=12:this.hourFormat==`12`&&i==12&&!this.pm&&(i=0),{hour:i,minute:a,second:o}},parseDate:function(e,t){if(t==null||e==null)throw`Invalid arguments`;if(e=Dt(e)===`object`?e.toString():e+``,e===``)return null;var n,r,i,a=0,o=typeof this.shortYearCutoff==`string`?new Date().getFullYear()%100+parseInt(this.shortYearCutoff,10):this.shortYearCutoff,s=-1,c=-1,l=-1,u=-1,d=!1,f,p=function(e){var r=n+1<t.length&&t.charAt(n+1)===e;return r&&n++,r},m=function(t){var n=p(t),r=t===`@`?14:t===`!`?20:t===`y`&&n?4:t===`o`?3:2,i=t===`y`?r:1,o=RegExp(`^\\d{`+i+`,`+r+`}`),s=e.substring(a).match(o);if(!s)throw`Missing number at position `+a;return a+=s[0].length,parseInt(s[0],10)},h=function(t,n,r){for(var i=-1,o=p(t)?r:n,s=[],c=0;c<o.length;c++)s.push([c,o[c]]);s.sort(function(e,t){return-(e[1].length-t[1].length)});for(var l=0;l<s.length;l++){var u=s[l][1];if(e.substr(a,u.length).toLowerCase()===u.toLowerCase()){i=s[l][0],a+=u.length;break}}if(i!==-1)return i+1;throw`Unknown name at position `+a},g=function(){if(e.charAt(a)!==t.charAt(n))throw`Unexpected literal at position `+a;a++};for(this.currentView===`month`&&(l=1),this.currentView===`year`&&(l=1,c=1),n=0;n<t.length;n++)if(d)t.charAt(n)===`'`&&!p(`'`)?d=!1:g();else switch(t.charAt(n)){case`d`:l=m(`d`);break;case`D`:h(`D`,this.$primevue.config.locale.dayNamesShort,this.$primevue.config.locale.dayNames);break;case`o`:u=m(`o`);break;case`m`:c=m(`m`);break;case`M`:c=h(`M`,this.$primevue.config.locale.monthNamesShort,this.$primevue.config.locale.monthNames);break;case`y`:s=m(`y`);break;case`@`:f=new Date(m(`@`)),s=f.getFullYear(),c=f.getMonth()+1,l=f.getDate();break;case`!`:f=new Date((m(`!`)-this.ticksTo1970)/1e4),s=f.getFullYear(),c=f.getMonth()+1,l=f.getDate();break;case`'`:p(`'`)?g():d=!0;break;default:g()}if(a<e.length&&(i=e.substr(a),!/^\s+/.test(i)))throw`Extra/unparsed characters found in date: `+i;if(s===-1?s=new Date().getFullYear():s<100&&(s+=new Date().getFullYear()-new Date().getFullYear()%100+(s<=o?0:-100)),u>-1){c=1,l=u;do{if(r=this.getDaysCountInMonth(c-1,s),l<=r)break;c++,l-=r}while(!0)}if(f=this.daylightSavingAdjust(new Date(s,c-1,l)),f.getFullYear()!==s||f.getMonth()+1!==c||f.getDate()!==l)throw`Invalid date`;return f},getWeekNumber:function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t.getTime())/864e5)/7)+1},onDateCellKeydown:function(e,t,n){e.preventDefault();var r=e.currentTarget,i=r.parentElement,a=Me(i);switch(e.code){case`ArrowDown`:if(r.tabIndex=`-1`,i.parentElement.nextElementSibling){var s=Me(i.parentElement),c=Array.from(i.parentElement.parentElement.children).slice(s+1).find(function(e){var t=e.children[a].children[0];return!o(t,`data-p-disabled`)});if(c){var l=c.children[a].children[0];l.tabIndex=`0`,l.focus()}else this.navigationState={backward:!1},this.navForward(e)}else this.navigationState={backward:!1},this.navForward(e);e.preventDefault();break;case`ArrowUp`:if(r.tabIndex=`-1`,e.altKey)this.overlayVisible=!1,this.focused=!0;else if(i.parentElement.previousElementSibling){var u=Me(i.parentElement),d=Array.from(i.parentElement.parentElement.children).slice(0,u).reverse().find(function(e){var t=e.children[a].children[0];return!o(t,`data-p-disabled`)});if(d){var f=d.children[a].children[0];f.tabIndex=`0`,f.focus()}else this.navigationState={backward:!0},this.navBackward(e)}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break;case`ArrowLeft`:if(r.tabIndex=`-1`,i.previousElementSibling){var p=Array.from(i.parentElement.children).slice(0,a).reverse().find(function(e){var t=e.children[0];return!o(t,`data-p-disabled`)});if(p){var m=p.children[0];m.tabIndex=`0`,m.focus()}else this.navigateToMonth(e,!0,n)}else this.navigateToMonth(e,!0,n);e.preventDefault();break;case`ArrowRight`:if(r.tabIndex=`-1`,i.nextElementSibling){var h=Array.from(i.parentElement.children).slice(a+1).find(function(e){var t=e.children[0];return!o(t,`data-p-disabled`)});if(h){var g=h.children[0];g.tabIndex=`0`,g.focus()}else this.navigateToMonth(e,!1,n)}else this.navigateToMonth(e,!1,n);e.preventDefault();break;case`Enter`:case`NumpadEnter`:case`Space`:this.onDateSelect(e,t),e.preventDefault();break;case`Escape`:this.overlayVisible=!1,e.preventDefault();break;case`Tab`:this.inline||this.trapFocus(e);break;case`Home`:r.tabIndex=`-1`;var _=i.parentElement.children[0].children[0];o(_,`data-p-disabled`)?this.navigateToMonth(e,!0,n):(_.tabIndex=`0`,_.focus()),e.preventDefault();break;case`End`:r.tabIndex=`-1`;var v=i.parentElement,y=v.children[v.children.length-1].children[0];o(y,`data-p-disabled`)?this.navigateToMonth(e,!1,n):(y.tabIndex=`0`,y.focus()),e.preventDefault();break;case`PageUp`:r.tabIndex=`-1`,e.shiftKey?(this.navigationState={backward:!0},this.navBackward(e)):this.navigateToMonth(e,!0,n),e.preventDefault();break;case`PageDown`:r.tabIndex=`-1`,e.shiftKey?(this.navigationState={backward:!1},this.navForward(e)):this.navigateToMonth(e,!1,n),e.preventDefault();break}},navigateToMonth:function(e,t,n){if(t)if(this.numberOfMonths===1||n===0)this.navigationState={backward:!0},this.navBackward(e);else{var r=this.overlay.children[n-1],i=S(r,`table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`),a=i[i.length-1];a.tabIndex=`0`,a.focus()}else if(this.numberOfMonths===1||n===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(e);else{var o=this.overlay.children[n+1],s=ne(o,`table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`);s.tabIndex=`0`,s.focus()}},onMonthCellKeydown:function(e,t){var n=e.currentTarget;switch(e.code){case`ArrowUp`:case`ArrowDown`:n.tabIndex=`-1`;var r=n.parentElement.children,i=Me(n),a=r[e.code===`ArrowDown`?i+3:i-3];a&&(a.tabIndex=`0`,a.focus()),e.preventDefault();break;case`ArrowLeft`:n.tabIndex=`-1`;var o=n.previousElementSibling;o?(o.tabIndex=`0`,o.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break;case`ArrowRight`:n.tabIndex=`-1`;var s=n.nextElementSibling;s?(s.tabIndex=`0`,s.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break;case`PageUp`:if(e.shiftKey)return;this.navigationState={backward:!0},this.navBackward(e);break;case`PageDown`:if(e.shiftKey)return;this.navigationState={backward:!1},this.navForward(e);break;case`Enter`:case`NumpadEnter`:case`Space`:this.onMonthSelect(e,t),e.preventDefault();break;case`Escape`:this.overlayVisible=!1,e.preventDefault();break;case`Tab`:this.trapFocus(e);break}},onYearCellKeydown:function(e,t){var n=e.currentTarget;switch(e.code){case`ArrowUp`:case`ArrowDown`:n.tabIndex=`-1`;var r=n.parentElement.children,i=Me(n),a=r[e.code===`ArrowDown`?i+2:i-2];a&&(a.tabIndex=`0`,a.focus()),e.preventDefault();break;case`ArrowLeft`:n.tabIndex=`-1`;var o=n.previousElementSibling;o?(o.tabIndex=`0`,o.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break;case`ArrowRight`:n.tabIndex=`-1`;var s=n.nextElementSibling;s?(s.tabIndex=`0`,s.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break;case`PageUp`:if(e.shiftKey)return;this.navigationState={backward:!0},this.navBackward(e);break;case`PageDown`:if(e.shiftKey)return;this.navigationState={backward:!1},this.navForward(e);break;case`Enter`:case`NumpadEnter`:case`Space`:this.onYearSelect(e,t),e.preventDefault();break;case`Escape`:this.overlayVisible=!1,e.preventDefault();break;case`Tab`:this.trapFocus(e);break}},updateFocus:function(){var e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?this.previousButton&&this.previousButton.focus():this.nextButton&&this.nextButton.focus();else{if(this.navigationState.backward){var t=this.currentView===`month`?S(this.overlay,`[data-pc-section="monthview"] [data-pc-section="month"]:not([data-p-disabled="true"])`):this.currentView===`year`?S(this.overlay,`[data-pc-section="yearview"] [data-pc-section="year"]:not([data-p-disabled="true"])`):S(this.overlay,`table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`);t&&t.length>0&&(e=t[t.length-1])}else e=this.currentView===`month`?ne(this.overlay,`[data-pc-section="monthview"] [data-pc-section="month"]:not([data-p-disabled="true"])`):this.currentView===`year`?ne(this.overlay,`[data-pc-section="yearview"] [data-pc-section="year"]:not([data-p-disabled="true"])`):ne(this.overlay,`table td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`);e&&(e.tabIndex=`0`,e.focus())}this.navigationState=null}else this.initFocusableCell()},initFocusableCell:function(){var e;if(this.currentView===`month`){var t=S(this.overlay,`[data-pc-section="monthview"] [data-pc-section="month"]`),n=ne(this.overlay,`[data-pc-section="monthview"] [data-pc-section="month"][data-p-selected="true"]`);t.forEach(function(e){return e.tabIndex=-1}),e=n||t[0]}else if(this.currentView===`year`){var r=S(this.overlay,`[data-pc-section="yearview"] [data-pc-section="year"]`),i=ne(this.overlay,`[data-pc-section="yearview"] [data-pc-section="year"][data-p-selected="true"]`);r.forEach(function(e){return e.tabIndex=-1}),e=i||r[0]}else e=ne(this.overlay,`span[data-p-selected="true"]`),!e&&(e=ne(this.overlay,`td[data-p-today="true"] span:not([data-p-disabled="true"]):not([data-p-ink="true"])`)||ne(this.overlay,`.p-datepicker-calendar td span:not([data-p-disabled="true"]):not([data-p-ink="true"])`));e&&(e.tabIndex=`0`,!this.preventFocus&&this.overlay&&!this.overlay.contains(document.activeElement)&&e.focus(),this.preventFocus=!1)},trapFocus:function(e){e.preventDefault();var t=b(this.overlay);if(t&&t.length>0)if(!document.activeElement)t[0].focus();else{var n=t.indexOf(document.activeElement);if(e.shiftKey)n===-1||n===0?t[t.length-1].focus():t[n-1].focus();else if(n===-1)if(this.timeOnly)t[0].focus();else{var r=t.findIndex(function(e){return e.tagName===`SPAN`});r===-1&&(r=t.findIndex(function(e){return e.tagName===`BUTTON`})),r===-1?t[0].focus():t[r].focus()}else n===t.length-1?t[0].focus():t[n+1].focus()}},onContainerButtonKeydown:function(e){switch(e.code){case`Tab`:this.trapFocus(e);break;case`Escape`:this.overlayVisible=!1,e.preventDefault();break}this.$emit(`keydown`,e)},onInput:function(e){try{var t;this.selectionStart=this.input.selectionStart,this.selectionEnd=this.input.selectionEnd,(t=this.$refs.clearIcon)!=null&&(t=t.$el)!=null&&t.style&&(this.$refs.clearIcon.$el.style.display=le(e.target.value)?`none`:`block`);var n=this.parseValue(e.target.value);this.isValidSelection(n)&&(this.typeUpdate=!0,this.updateModel(this.updateModelType===`string`?this.formatValue(n):n),this.updateCurrentMetaData())}catch{}this.$emit(`input`,e)},onInputClick:function(){this.showOnFocus&&this.isEnabled()&&!this.overlayVisible&&(this.overlayVisible=!0)},onFocus:function(e){this.showOnFocus&&this.isEnabled()&&(this.overlayVisible=!0),this.focused=!0,this.$emit(`focus`,e)},onBlur:function(e){var t,n,r;this.$emit(`blur`,{originalEvent:e,value:e.target.value}),(t=(n=this.formField).onBlur)==null||t.call(n),this.focused=!1,e.target.value=this.formatValue(this.rawValue),(r=this.$refs.clearIcon)!=null&&(r=r.$el)!=null&&r.style&&(this.$refs.clearIcon.$el.style.display=le(e.target.value)?`none`:`block`)},onKeyDown:function(e){if(e.code===`ArrowDown`&&this.overlay)this.trapFocus(e);else if(e.code===`ArrowDown`&&!this.overlay)this.overlayVisible=!0;else if(e.code===`Escape`)this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault(),e.stopPropagation());else if(e.code===`Tab`)this.overlay&&b(this.overlay).forEach(function(e){return e.tabIndex=`-1`}),this.overlayVisible&&=!1;else if(e.code===`Enter`){if(this.manualInput&&e.target.value!==null&&e.target.value?.trim()!==``)try{var t=this.parseValue(e.target.value);this.isValidSelection(t)&&(this.overlayVisible=!1)}catch{}this.$emit(`keydown`,e)}},overlayRef:function(e){this.overlay=e},inputRef:function(e){this.input=e?e.$el:void 0},previousButtonRef:function(e){this.previousButton=e?e.$el:void 0},nextButtonRef:function(e){this.nextButton=e?e.$el:void 0},getMonthName:function(e){return this.$primevue.config.locale.monthNames[e]},getYear:function(e){return this.currentView===`month`?this.currentYear:e.year},onClearClick:function(){this.updateModel(null),this.overlayVisible=!1},onOverlayClick:function(e){e.stopPropagation(),this.inline||ge.emit(`overlay-click`,{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){switch(e.code){case`Escape`:this.inline||(this.input.focus(),this.overlayVisible=!1,e.stopPropagation());break}},onOverlayMouseUp:function(e){this.onOverlayClick(e)},createResponsiveStyle:function(){if(this.numberOfMonths>1&&this.responsiveOptions&&!this.isUnstyled){if(!this.responsiveStyleElement){var e;this.responsiveStyleElement=document.createElement(`style`),this.responsiveStyleElement.type=`text/css`,c(this.responsiveStyleElement,`nonce`,(e=this.$primevue)==null||(e=e.config)==null||(e=e.csp)==null?void 0:e.nonce),document.body.appendChild(this.responsiveStyleElement)}var t=``;if(this.responsiveOptions)for(var n=M(),r=Ot(this.responsiveOptions).filter(function(e){return!!(e.breakpoint&&e.numMonths)}).sort(function(e,t){return-1*n(e.breakpoint,t.breakpoint)}),i=0;i<r.length;i++){for(var a=r[i],o=a.breakpoint,s=a.numMonths,l=`
|
|
558
558
|
.p-datepicker-panel[${this.$attrSelector}] .p-datepicker-calendar:nth-child(${s}) .p-datepicker-next-button {
|
|
559
559
|
display: inline-flex;
|
|
560
560
|
}
|
|
561
|
-
`,
|
|
562
|
-
.p-datepicker-panel[${this.$attrSelector}] .p-datepicker-calendar:nth-child(${
|
|
561
|
+
`,u=s;u<this.numberOfMonths;u++)l+=`
|
|
562
|
+
.p-datepicker-panel[${this.$attrSelector}] .p-datepicker-calendar:nth-child(${u+1}) {
|
|
563
563
|
display: none;
|
|
564
564
|
}
|
|
565
565
|
`;t+=`
|
|
566
566
|
@media screen and (max-width: ${o}) {
|
|
567
|
-
${
|
|
567
|
+
${l}
|
|
568
568
|
}
|
|
569
|
-
`}this.responsiveStyleElement.innerHTML=t}},destroyResponsiveStyleElement:function(){this.responsiveStyleElement&&=(this.responsiveStyleElement.remove(),null)},dayDataP:function(e){return C({today:e.today,"other-month":e.otherMonth,selected:this.isSelected(e),disabled:!e.selectable})}},computed:{viewDate:function(){var e=this.rawValue;if(e&&Array.isArray(e))if(this.isRangeSelection())if(e.length===0)e=null;else if(e.length===1)e=e[0];else{var t=this.parseValueForComparison(e[0]),n=new Date(t.getFullYear(),t.getMonth()+this.numberOfMonths,1);if(!e[1]||e[1]<n)e=e[0];else{var r=this.parseValueForComparison(e[1]);e=new Date(r.getFullYear(),r.getMonth()-this.numberOfMonths+1,1)}}else this.isMultipleSelection()&&(e=e[e.length-1]);if(e&&typeof e!=`string`)return e;var i=new Date;return this.maxDate&&this.maxDate<i?this.maxDate:this.minDate&&this.minDate>i?this.minDate:i},inputFieldValue:function(){return this.formatValue(this.rawValue)},months:function(){for(var e=[],t=0;t<this.numberOfMonths;t++){var n=this.currentMonth+t,r=this.currentYear;n>11&&(n=n%11-1,r+=1);for(var i=[],a=this.getFirstDayOfMonthIndex(n,r),o=this.getDaysCountInMonth(n,r),s=this.getDaysCountInPrevMonth(n,r),c=1,l=new Date,u=[],d=Math.ceil((o+a)/7),f=0;f<d;f++){var p=[];if(f==0){for(var m=s-a+1;m<=s;m++){var h=this.getPreviousMonthAndYear(n,r);p.push({day:m,month:h.month,year:h.year,otherMonth:!0,today:this.isToday(l,m,h.month,h.year),selectable:this.isSelectable(m,h.month,h.year,!0)})}for(var g=7-p.length,_=0;_<g;_++)p.push({day:c,month:n,year:r,today:this.isToday(l,c,n,r),selectable:this.isSelectable(c,n,r,!1)}),c++}else for(var v=0;v<7;v++){if(c>o){var y=this.getNextMonthAndYear(n,r);p.push({day:c-o,month:y.month,year:y.year,otherMonth:!0,today:this.isToday(l,c-o,y.month,y.year),selectable:this.isSelectable(c-o,y.month,y.year,!0)})}else p.push({day:c,month:n,year:r,today:this.isToday(l,c,n,r),selectable:this.isSelectable(c,n,r,!1)});c++}this.showWeek&&u.push(this.getWeekNumber(new Date(p[0].year,p[0].month,p[0].day))),i.push(p)}e.push({month:n,year:r,dates:i,weekNumbers:u})}return e},weekDays:function(){for(var e=[],t=this.$primevue.config.locale.firstDayOfWeek,n=0;n<7;n++)e.push(this.$primevue.config.locale.dayNamesMin[t]),t=t==6?0:++t;return e},ticksTo1970:function(){return 719162*24*60*60*1e7},sundayIndex:function(){return this.$primevue.config.locale.firstDayOfWeek>0?7-this.$primevue.config.locale.firstDayOfWeek:0},datePattern:function(){return this.dateFormat||this.$primevue.config.locale.dateFormat},monthPickerValues:function(){for(var e=this,t=[],n=function(t){if(e.minDate){var n=e.minDate.getMonth(),r=e.minDate.getFullYear();if(e.currentYear<r||e.currentYear===r&&t<n)return!1}if(e.maxDate){var i=e.maxDate.getMonth(),a=e.maxDate.getFullYear();if(e.currentYear>a||e.currentYear===a&&t>i)return!1}return!0},r=0;r<=11;r++)t.push({value:this.$primevue.config.locale.monthNamesShort[r],selectable:n(r)});return t},yearPickerValues:function(){for(var e=this,t=[],n=this.currentYear-this.currentYear%10,r=function(t){return!(e.minDate&&e.minDate.getFullYear()>t||e.maxDate&&e.maxDate.getFullYear()<t)},i=0;i<10;i++)t.push({value:n+i,selectable:r(n+i)});return t},formattedCurrentHour:function(){return this.currentHour==0&&this.hourFormat==`12`?this.currentHour+12:this.currentHour<10?`0`+this.currentHour:this.currentHour},formattedCurrentMinute:function(){return this.currentMinute<10?`0`+this.currentMinute:this.currentMinute},formattedCurrentSecond:function(){return this.currentSecond<10?`0`+this.currentSecond:this.currentSecond},todayLabel:function(){return this.$primevue.config.locale.today},clearLabel:function(){return this.$primevue.config.locale.clear},weekHeaderLabel:function(){return this.$primevue.config.locale.weekHeader},monthNames:function(){return this.$primevue.config.locale.monthNames},switchViewButtonDisabled:function(){return this.numberOfMonths>1||this.disabled},isClearIconVisible:function(){return this.showClear&&this.rawValue!=null&&!this.disabled},panelId:function(){return this.$id+`_panel`},containerDataP:function(){return C({fluid:this.$fluid})},panelDataP:function(){return C(wt({inline:this.inline},`portal-`+this.appendTo,`portal-`+this.appendTo))},inputIconDataP:function(){return C(wt({},this.size,this.size))},timePickerDataP:function(){return C({"time-only":this.timeOnly})},hourIncrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,0,1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,0,1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},hourDecrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,0,-1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,0,-1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},minuteIncrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,1,1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,1,1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},minuteDecrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,1,-1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,1,-1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},secondIncrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,2,1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,2,1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},secondDecrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,2,-1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,2,-1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}}},components:{InputText:Le,Button:p,Portal:je,CalendarIcon:mt,ChevronLeftIcon:Ue,ChevronRightIcon:Me,ChevronUpIcon:me,ChevronDownIcon:de,TimesIcon:se},directives:{ripple:ie}},It=[`id`,`data-p`],Lt=[`disabled`,`aria-label`,`aria-expanded`,`aria-controls`],Rt=[`data-p`],zt=[`id`,`role`,`aria-modal`,`aria-label`,`data-p`],Bt=[`disabled`,`aria-label`],Vt=[`disabled`,`aria-label`],Ht=[`disabled`,`aria-label`],Ut=[`disabled`,`aria-label`],Wt=[`data-p-disabled`],Gt=[`abbr`],Kt=[`data-p-disabled`],qt=[`aria-label`,`data-p-today`,`data-p-other-month`],Jt=[`onClick`,`onKeydown`,`aria-selected`,`aria-disabled`,`data-p`],Yt=[`onClick`,`onKeydown`,`data-p-disabled`,`data-p-selected`],Xt=[`onClick`,`onKeydown`,`data-p-disabled`,`data-p-selected`],Zt=[`data-p`];function Qt(e,t,n,i,s,c){var l=he(`InputText`),u=he(`TimesIcon`),d=he(`Button`),f=he(`Portal`),p=Ee(`ripple`);return F(),x(`span`,P({ref:`container`,id:e.$id,class:e.cx(`root`),style:e.sx(`root`),"data-p":c.containerDataP},e.ptmi(`root`)),[e.inline?v(``,!0):(F(),_(l,{key:0,ref:c.inputRef,id:e.inputId,role:`combobox`,class:R([e.inputClass,e.cx(`pcInputText`)]),style:ye(e.inputStyle),defaultValue:c.inputFieldValue,placeholder:e.placeholder,name:e.name,size:e.size,invalid:e.invalid,variant:e.variant,fluid:e.fluid,required:e.required,unstyled:e.unstyled,autocomplete:`off`,"aria-autocomplete":`none`,"aria-haspopup":`dialog`,"aria-expanded":s.overlayVisible,"aria-controls":s.overlayVisible?c.panelId:void 0,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,inputmode:`none`,disabled:e.disabled,readonly:!e.manualInput||e.readonly,tabindex:0,onInput:c.onInput,onClick:c.onInputClick,onFocus:c.onFocus,onBlur:c.onBlur,onKeydown:c.onKeyDown,"data-p-has-dropdown":e.showIcon&&e.iconDisplay===`button`&&!e.inline,"data-p-has-e-icon":e.showIcon&&e.iconDisplay===`input`&&!e.inline,pt:e.ptm(`pcInputText`)},null,8,`id.class.style.defaultValue.placeholder.name.size.invalid.variant.fluid.required.unstyled.aria-expanded.aria-controls.aria-labelledby.aria-label.disabled.readonly.onInput.onClick.onFocus.onBlur.onKeydown.data-p-has-dropdown.data-p-has-e-icon.pt`.split(`.`))),e.showClear&&!e.inline?I(e.$slots,`clearicon`,{key:1,class:R(e.cx(`clearIcon`)),clearCallback:c.onClearClick},function(){return[B(u,P({ref:`clearIcon`,class:[e.cx(`clearIcon`)],onClick:c.onClearClick},e.ptm(`clearIcon`)),null,16,[`class`,`onClick`])]}):v(``,!0),e.showIcon&&e.iconDisplay===`button`&&!e.inline?I(e.$slots,`dropdownbutton`,{key:2,toggleCallback:c.onButtonClick},function(){return[L(`button`,P({class:e.cx(`dropdown`),disabled:e.disabled,onClick:t[0]||=function(){return c.onButtonClick&&c.onButtonClick.apply(c,arguments)},type:`button`,"aria-label":e.$primevue.config.locale.chooseDate,"aria-haspopup":`dialog`,"aria-expanded":s.overlayVisible,"aria-controls":c.panelId},e.ptm(`dropdown`)),[I(e.$slots,`dropdownicon`,{class:R(e.icon)},function(){return[(F(),_(Se(e.icon?`span`:`CalendarIcon`),P({class:e.icon},e.ptm(`dropdownIcon`)),null,16,[`class`]))]})],16,Lt)]}):e.showIcon&&e.iconDisplay===`input`&&!e.inline?(F(),x(a,{key:3},[e.$slots.inputicon||e.showIcon?(F(),x(`span`,P({key:0,class:e.cx(`inputIconContainer`),"data-p":c.inputIconDataP},e.ptm(`inputIconContainer`)),[I(e.$slots,`inputicon`,{class:R(e.cx(`inputIcon`)),clickCallback:c.onButtonClick},function(){return[(F(),_(Se(e.icon?`i`:`CalendarIcon`),P({class:[e.icon,e.cx(`inputIcon`)],onClick:c.onButtonClick},e.ptm(`inputicon`)),null,16,[`class`,`onClick`]))]})],16,Rt)):v(``,!0)],64)):v(``,!0),B(f,{appendTo:e.appendTo,disabled:e.inline},{default:O(function(){return[B(De,P({name:`p-anchored-overlay`,onEnter:t[58]||=function(e){return c.onOverlayEnter(e)},onAfterEnter:c.onOverlayEnterComplete,onAfterLeave:c.onOverlayAfterLeave,onLeave:c.onOverlayLeave},e.ptm(`transition`)),{default:O(function(){return[e.inline||s.overlayVisible?(F(),x(`div`,P({key:0,ref:c.overlayRef,id:c.panelId,class:[e.cx(`panel`),e.panelClass],style:e.panelStyle,role:e.inline?null:`dialog`,"aria-modal":e.inline?null:`true`,"aria-label":e.$primevue.config.locale.chooseDate,onClick:t[55]||=function(){return c.onOverlayClick&&c.onOverlayClick.apply(c,arguments)},onKeydown:t[56]||=function(){return c.onOverlayKeyDown&&c.onOverlayKeyDown.apply(c,arguments)},onMouseup:t[57]||=function(){return c.onOverlayMouseUp&&c.onOverlayMouseUp.apply(c,arguments)},"data-p":c.panelDataP},e.ptm(`panel`)),[e.timeOnly?v(``,!0):(F(),x(a,{key:0},[L(`div`,P({class:e.cx(`calendarContainer`)},e.ptm(`calendarContainer`)),[(F(!0),x(a,null,z(c.months,function(n,i){return F(),x(`div`,P({key:n.month+n.year,class:e.cx(`calendar`)},{ref_for:!0},e.ptm(`calendar`)),[L(`div`,P({class:e.cx(`header`)},{ref_for:!0},e.ptm(`header`)),[I(e.$slots,`header`),I(e.$slots,`prevbutton`,{actionCallback:function(e){return c.onPrevButtonClick(e)},keydownCallback:function(e){return c.onContainerButtonKeydown(e)}},function(){return[o(B(d,P({ref_for:!0,ref:c.previousButtonRef,class:e.cx(`pcPrevButton`),disabled:e.disabled,"aria-label":s.currentView===`year`?e.$primevue.config.locale.prevDecade:s.currentView===`month`?e.$primevue.config.locale.prevYear:e.$primevue.config.locale.prevMonth,unstyled:e.unstyled,onClick:c.onPrevButtonClick,onKeydown:c.onContainerButtonKeydown},{ref_for:!0},e.navigatorButtonProps,{pt:e.ptm(`pcPrevButton`),"data-pc-group-section":`navigator`}),{icon:O(function(t){return[I(e.$slots,`previcon`,{},function(){return[(F(),_(Se(e.prevIcon?`span`:`ChevronLeftIcon`),P({class:[e.prevIcon,t.class]},{ref_for:!0},e.ptm(`pcPrevButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`class`,`disabled`,`aria-label`,`unstyled`,`onClick`,`onKeydown`,`pt`]),[[r,i===0]])]}),L(`div`,P({class:e.cx(`title`)},{ref_for:!0},e.ptm(`title`)),[e.$primevue.config.locale.showMonthAfterYear?(F(),x(a,{key:0},[s.currentView===`year`?v(``,!0):(F(),x(`button`,P({key:0,type:`button`,onClick:t[1]||=function(){return c.switchToYearView&&c.switchToYearView.apply(c,arguments)},onKeydown:t[2]||=function(){return c.onContainerButtonKeydown&&c.onContainerButtonKeydown.apply(c,arguments)},class:e.cx(`selectYear`),disabled:c.switchViewButtonDisabled,"aria-label":e.$primevue.config.locale.chooseYear},{ref_for:!0},e.ptm(`selectYear`),{"data-pc-group-section":`view`}),g(c.getYear(n)),17,Bt)),s.currentView===`date`?(F(),x(`button`,P({key:1,type:`button`,onClick:t[3]||=function(){return c.switchToMonthView&&c.switchToMonthView.apply(c,arguments)},onKeydown:t[4]||=function(){return c.onContainerButtonKeydown&&c.onContainerButtonKeydown.apply(c,arguments)},class:e.cx(`selectMonth`),disabled:c.switchViewButtonDisabled,"aria-label":e.$primevue.config.locale.chooseMonth},{ref_for:!0},e.ptm(`selectMonth`),{"data-pc-group-section":`view`}),g(c.getMonthName(n.month)),17,Vt)):v(``,!0)],64)):(F(),x(a,{key:1},[s.currentView===`date`?(F(),x(`button`,P({key:0,type:`button`,onClick:t[5]||=function(){return c.switchToMonthView&&c.switchToMonthView.apply(c,arguments)},onKeydown:t[6]||=function(){return c.onContainerButtonKeydown&&c.onContainerButtonKeydown.apply(c,arguments)},class:e.cx(`selectMonth`),disabled:c.switchViewButtonDisabled,"aria-label":e.$primevue.config.locale.chooseMonth},{ref_for:!0},e.ptm(`selectMonth`),{"data-pc-group-section":`view`}),g(c.getMonthName(n.month)),17,Ht)):v(``,!0),s.currentView===`year`?v(``,!0):(F(),x(`button`,P({key:1,type:`button`,onClick:t[7]||=function(){return c.switchToYearView&&c.switchToYearView.apply(c,arguments)},onKeydown:t[8]||=function(){return c.onContainerButtonKeydown&&c.onContainerButtonKeydown.apply(c,arguments)},class:e.cx(`selectYear`),disabled:c.switchViewButtonDisabled,"aria-label":e.$primevue.config.locale.chooseYear},{ref_for:!0},e.ptm(`selectYear`),{"data-pc-group-section":`view`}),g(c.getYear(n)),17,Ut))],64)),s.currentView===`year`?(F(),x(`span`,P({key:2,class:e.cx(`decade`)},{ref_for:!0},e.ptm(`decade`)),[I(e.$slots,`decade`,{years:c.yearPickerValues},function(){return[w(g(c.yearPickerValues[0].value)+` - `+g(c.yearPickerValues[c.yearPickerValues.length-1].value),1)]})],16)):v(``,!0)],16),I(e.$slots,`nextbutton`,{actionCallback:function(e){return c.onNextButtonClick(e)},keydownCallback:function(e){return c.onContainerButtonKeydown(e)}},function(){return[o(B(d,P({ref_for:!0,ref:c.nextButtonRef,class:e.cx(`pcNextButton`),disabled:e.disabled,"aria-label":s.currentView===`year`?e.$primevue.config.locale.nextDecade:s.currentView===`month`?e.$primevue.config.locale.nextYear:e.$primevue.config.locale.nextMonth,unstyled:e.unstyled,onClick:c.onNextButtonClick,onKeydown:c.onContainerButtonKeydown},{ref_for:!0},e.navigatorButtonProps,{pt:e.ptm(`pcNextButton`),"data-pc-group-section":`navigator`}),{icon:O(function(t){return[I(e.$slots,`nexticon`,{},function(){return[(F(),_(Se(e.nextIcon?`span`:`ChevronRightIcon`),P({class:[e.nextIcon,t.class]},{ref_for:!0},e.ptm(`pcNextButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`class`,`disabled`,`aria-label`,`unstyled`,`onClick`,`onKeydown`,`pt`]),[[r,e.numberOfMonths===1?!0:i===e.numberOfMonths-1]])]})],16),s.currentView===`date`?(F(),x(`table`,P({key:0,class:e.cx(`dayView`),role:`grid`},{ref_for:!0},e.ptm(`dayView`)),[L(`thead`,P({ref_for:!0},e.ptm(`tableHeader`)),[L(`tr`,P({ref_for:!0},e.ptm(`tableHeaderRow`)),[e.showWeek?(F(),x(`th`,P({key:0,scope:`col`,class:e.cx(`weekHeader`)},{ref_for:!0},e.ptm(`weekHeader`,{context:{disabled:e.showWeek}}),{"data-p-disabled":e.showWeek,"data-pc-group-section":`tableheadercell`}),[I(e.$slots,`weekheaderlabel`,{},function(){return[L(`span`,P({ref_for:!0},e.ptm(`weekHeaderLabel`,{context:{disabled:e.showWeek}}),{"data-pc-group-section":`tableheadercelllabel`}),g(c.weekHeaderLabel),17)]})],16,Wt)):v(``,!0),(F(!0),x(a,null,z(c.weekDays,function(t){return F(),x(`th`,P({key:t,scope:`col`,abbr:t},{ref_for:!0},e.ptm(`tableHeaderCell`),{"data-pc-group-section":`tableheadercell`,class:e.cx(`weekDayCell`)}),[L(`span`,P({class:e.cx(`weekDay`)},{ref_for:!0},e.ptm(`weekDay`),{"data-pc-group-section":`tableheadercelllabel`}),g(t),17)],16,Gt)}),128))],16)],16),L(`tbody`,P({ref_for:!0},e.ptm(`tableBody`)),[(F(!0),x(a,null,z(n.dates,function(t,r){return F(),x(`tr`,P({key:t[0].day+``+t[0].month},{ref_for:!0},e.ptm(`tableBodyRow`)),[e.showWeek?(F(),x(`td`,P({key:0,class:e.cx(`weekNumber`)},{ref_for:!0},e.ptm(`weekNumber`),{"data-pc-group-section":`tablebodycell`}),[L(`span`,P({class:e.cx(`weekLabelContainer`)},{ref_for:!0},e.ptm(`weekLabelContainer`,{context:{disabled:e.showWeek}}),{"data-p-disabled":e.showWeek,"data-pc-group-section":`tablebodycelllabel`}),[I(e.$slots,`weeklabel`,{weekNumber:n.weekNumbers[r]},function(){return[n.weekNumbers[r]<10?(F(),x(`span`,P({key:0,style:{visibility:`hidden`}},{ref_for:!0},e.ptm(`weekLabel`)),`0`,16)):v(``,!0),w(` `+g(n.weekNumbers[r]),1)]})],16,Kt)],16)):v(``,!0),(F(!0),x(a,null,z(t,function(t){return F(),x(`td`,P({key:t.day+``+t.month,"aria-label":t.day,class:e.cx(`dayCell`,{date:t})},{ref_for:!0},e.ptm(`dayCell`,{context:{date:t,today:t.today,otherMonth:t.otherMonth,selected:c.isSelected(t),disabled:!t.selectable}}),{"data-p-today":t.today,"data-p-other-month":t.otherMonth,"data-pc-group-section":`tablebodycell`}),[e.showOtherMonths||!t.otherMonth?o((F(),x(`span`,P({key:0,class:e.cx(`day`,{date:t}),onClick:function(e){return c.onDateSelect(e,t)},draggable:`false`,onKeydown:function(e){return c.onDateCellKeydown(e,t,i)},"aria-selected":c.isSelected(t),"aria-disabled":!t.selectable},{ref_for:!0},e.ptm(`day`,{context:{date:t,today:t.today,otherMonth:t.otherMonth,selected:c.isSelected(t),disabled:!t.selectable}}),{"data-p":c.dayDataP(t),"data-pc-group-section":`tablebodycelllabel`}),[I(e.$slots,`date`,{date:t},function(){return[w(g(t.day),1)]})],16,Jt)),[[p]]):v(``,!0),c.isSelected(t)?(F(),x(`div`,P({key:1,class:`p-hidden-accessible`,"aria-live":`polite`},{ref_for:!0},e.ptm(`hiddenSelectedDay`),{"data-p-hidden-accessible":!0}),g(t.day),17)):v(``,!0)],16,qt)}),128))],16)}),128))],16)],16)):v(``,!0)],16)}),128))],16),s.currentView===`month`?(F(),x(`div`,P({key:0,class:e.cx(`monthView`)},e.ptm(`monthView`)),[(F(!0),x(a,null,z(c.monthPickerValues,function(t,n){return o((F(),x(`span`,P({key:t,onClick:function(e){return c.onMonthSelect(e,{month:t,index:n})},onKeydown:function(e){return c.onMonthCellKeydown(e,{month:t,index:n})},class:e.cx(`month`,{month:t,index:n})},{ref_for:!0},e.ptm(`month`,{context:{month:t,monthIndex:n,selected:c.isMonthSelected(n),disabled:!t.selectable}}),{"data-p-disabled":!t.selectable,"data-p-selected":c.isMonthSelected(n)}),[w(g(t.value)+` `,1),c.isMonthSelected(n)?(F(),x(`div`,P({key:0,class:`p-hidden-accessible`,"aria-live":`polite`},{ref_for:!0},e.ptm(`hiddenMonth`),{"data-p-hidden-accessible":!0}),g(t.value),17)):v(``,!0)],16,Yt)),[[p]])}),128))],16)):v(``,!0),s.currentView===`year`?(F(),x(`div`,P({key:1,class:e.cx(`yearView`)},e.ptm(`yearView`)),[(F(!0),x(a,null,z(c.yearPickerValues,function(t){return o((F(),x(`span`,P({key:t.value,onClick:function(e){return c.onYearSelect(e,t)},onKeydown:function(e){return c.onYearCellKeydown(e,t)},class:e.cx(`year`,{year:t})},{ref_for:!0},e.ptm(`year`,{context:{year:t,selected:c.isYearSelected(t.value),disabled:!t.selectable}}),{"data-p-disabled":!t.selectable,"data-p-selected":c.isYearSelected(t.value)}),[w(g(t.value)+` `,1),c.isYearSelected(t.value)?(F(),x(`div`,P({key:0,class:`p-hidden-accessible`,"aria-live":`polite`},{ref_for:!0},e.ptm(`hiddenYear`),{"data-p-hidden-accessible":!0}),g(t.value),17)):v(``,!0)],16,Xt)),[[p]])}),128))],16)):v(``,!0)],64)),(e.showTime||e.timeOnly)&&s.currentView===`date`?(F(),x(`div`,P({key:1,class:e.cx(`timePicker`),"data-p":c.timePickerDataP},e.ptm(`timePicker`)),[L(`div`,P({class:e.cx(`hourPicker`)},e.ptm(`hourPicker`),{"data-pc-group-section":`timepickerContainer`}),[I(e.$slots,`hourincrementbutton`,{callbacks:c.hourIncrementCallbacks},function(){return[B(d,P({class:e.cx(`pcIncrementButton`),"aria-label":e.$primevue.config.locale.nextHour,unstyled:e.unstyled,onMousedown:t[9]||=function(e){return c.onTimePickerElementMouseDown(e,0,1)},onMouseup:t[10]||=function(e){return c.onTimePickerElementMouseUp(e)},onKeydown:[c.onContainerButtonKeydown,t[12]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,0,1)},[`enter`]),t[13]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,0,1)},[`space`])],onMouseleave:t[11]||=function(e){return c.onTimePickerElementMouseLeave()},onKeyup:[t[14]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`enter`]),t[15]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcIncrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:O(function(t){return[I(e.$slots,`incrementicon`,{},function(){return[(F(),_(Se(e.incrementIcon?`span`:`ChevronUpIcon`),P({class:[e.incrementIcon,t.class]},e.ptm(`pcIncrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`unstyled`,`onKeydown`,`pt`])]}),L(`span`,P(e.ptm(`hour`),{"data-pc-group-section":`timepickerlabel`}),g(c.formattedCurrentHour),17),I(e.$slots,`hourdecrementbutton`,{callbacks:c.hourDecrementCallbacks},function(){return[B(d,P({class:e.cx(`pcDecrementButton`),"aria-label":e.$primevue.config.locale.prevHour,unstyled:e.unstyled,onMousedown:t[16]||=function(e){return c.onTimePickerElementMouseDown(e,0,-1)},onMouseup:t[17]||=function(e){return c.onTimePickerElementMouseUp(e)},onKeydown:[c.onContainerButtonKeydown,t[19]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,0,-1)},[`enter`]),t[20]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,0,-1)},[`space`])],onMouseleave:t[18]||=function(e){return c.onTimePickerElementMouseLeave()},onKeyup:[t[21]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`enter`]),t[22]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcDecrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:O(function(t){return[I(e.$slots,`decrementicon`,{},function(){return[(F(),_(Se(e.decrementIcon?`span`:`ChevronDownIcon`),P({class:[e.decrementIcon,t.class]},e.ptm(`pcDecrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`unstyled`,`onKeydown`,`pt`])]})],16),L(`div`,P(e.ptm(`separatorContainer`),{"data-pc-group-section":`timepickerContainer`}),[L(`span`,P(e.ptm(`separator`),{"data-pc-group-section":`timepickerlabel`}),g(e.timeSeparator),17)],16),L(`div`,P({class:e.cx(`minutePicker`)},e.ptm(`minutePicker`),{"data-pc-group-section":`timepickerContainer`}),[I(e.$slots,`minuteincrementbutton`,{callbacks:c.minuteIncrementCallbacks},function(){return[B(d,P({class:e.cx(`pcIncrementButton`),"aria-label":e.$primevue.config.locale.nextMinute,disabled:e.disabled,unstyled:e.unstyled,onMousedown:t[23]||=function(e){return c.onTimePickerElementMouseDown(e,1,1)},onMouseup:t[24]||=function(e){return c.onTimePickerElementMouseUp(e)},onKeydown:[c.onContainerButtonKeydown,t[26]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,1,1)},[`enter`]),t[27]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,1,1)},[`space`])],onMouseleave:t[25]||=function(e){return c.onTimePickerElementMouseLeave()},onKeyup:[t[28]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`enter`]),t[29]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcIncrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:O(function(t){return[I(e.$slots,`incrementicon`,{},function(){return[(F(),_(Se(e.incrementIcon?`span`:`ChevronUpIcon`),P({class:[e.incrementIcon,t.class]},e.ptm(`pcIncrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]}),L(`span`,P(e.ptm(`minute`),{"data-pc-group-section":`timepickerlabel`}),g(c.formattedCurrentMinute),17),I(e.$slots,`minutedecrementbutton`,{callbacks:c.minuteDecrementCallbacks},function(){return[B(d,P({class:e.cx(`pcDecrementButton`),"aria-label":e.$primevue.config.locale.prevMinute,disabled:e.disabled,unstyled:e.unstyled,onMousedown:t[30]||=function(e){return c.onTimePickerElementMouseDown(e,1,-1)},onMouseup:t[31]||=function(e){return c.onTimePickerElementMouseUp(e)},onKeydown:[c.onContainerButtonKeydown,t[33]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,1,-1)},[`enter`]),t[34]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,1,-1)},[`space`])],onMouseleave:t[32]||=function(e){return c.onTimePickerElementMouseLeave()},onKeyup:[t[35]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`enter`]),t[36]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcDecrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:O(function(t){return[I(e.$slots,`decrementicon`,{},function(){return[(F(),_(Se(e.decrementIcon?`span`:`ChevronDownIcon`),P({class:[e.decrementIcon,t.class]},e.ptm(`pcDecrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]})],16),e.showSeconds?(F(),x(`div`,P({key:0,class:e.cx(`separatorContainer`)},e.ptm(`separatorContainer`),{"data-pc-group-section":`timepickerContainer`}),[L(`span`,P(e.ptm(`separator`),{"data-pc-group-section":`timepickerlabel`}),g(e.timeSeparator),17)],16)):v(``,!0),e.showSeconds?(F(),x(`div`,P({key:1,class:e.cx(`secondPicker`)},e.ptm(`secondPicker`),{"data-pc-group-section":`timepickerContainer`}),[I(e.$slots,`secondincrementbutton`,{callbacks:c.secondIncrementCallbacks},function(){return[B(d,P({class:e.cx(`pcIncrementButton`),"aria-label":e.$primevue.config.locale.nextSecond,disabled:e.disabled,unstyled:e.unstyled,onMousedown:t[37]||=function(e){return c.onTimePickerElementMouseDown(e,2,1)},onMouseup:t[38]||=function(e){return c.onTimePickerElementMouseUp(e)},onKeydown:[c.onContainerButtonKeydown,t[40]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,2,1)},[`enter`]),t[41]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,2,1)},[`space`])],onMouseleave:t[39]||=function(e){return c.onTimePickerElementMouseLeave()},onKeyup:[t[42]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`enter`]),t[43]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcIncrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:O(function(t){return[I(e.$slots,`incrementicon`,{},function(){return[(F(),_(Se(e.incrementIcon?`span`:`ChevronUpIcon`),P({class:[e.incrementIcon,t.class]},e.ptm(`pcIncrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]}),L(`span`,P(e.ptm(`second`),{"data-pc-group-section":`timepickerlabel`}),g(c.formattedCurrentSecond),17),I(e.$slots,`seconddecrementbutton`,{callbacks:c.secondDecrementCallbacks},function(){return[B(d,P({class:e.cx(`pcDecrementButton`),"aria-label":e.$primevue.config.locale.prevSecond,disabled:e.disabled,unstyled:e.unstyled,onMousedown:t[44]||=function(e){return c.onTimePickerElementMouseDown(e,2,-1)},onMouseup:t[45]||=function(e){return c.onTimePickerElementMouseUp(e)},onKeydown:[c.onContainerButtonKeydown,t[47]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,2,-1)},[`enter`]),t[48]||=Fe(function(e){return c.onTimePickerElementMouseDown(e,2,-1)},[`space`])],onMouseleave:t[46]||=function(e){return c.onTimePickerElementMouseLeave()},onKeyup:[t[49]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`enter`]),t[50]||=Fe(function(e){return c.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcDecrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:O(function(t){return[I(e.$slots,`decrementicon`,{},function(){return[(F(),_(Se(e.decrementIcon?`span`:`ChevronDownIcon`),P({class:[e.decrementIcon,t.class]},e.ptm(`pcDecrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]})],16)):v(``,!0),e.hourFormat==`12`?(F(),x(`div`,P({key:2,class:e.cx(`separatorContainer`)},e.ptm(`separatorContainer`),{"data-pc-group-section":`timepickerContainer`}),[L(`span`,P(e.ptm(`separator`),{"data-pc-group-section":`timepickerlabel`}),g(e.timeSeparator),17)],16)):v(``,!0),e.hourFormat==`12`?(F(),x(`div`,P({key:3,class:e.cx(`ampmPicker`)},e.ptm(`ampmPicker`)),[I(e.$slots,`ampmincrementbutton`,{toggleCallback:function(e){return c.toggleAMPM(e)},keydownCallback:function(e){return c.onContainerButtonKeydown(e)}},function(){return[B(d,P({class:e.cx(`pcIncrementButton`),"aria-label":e.$primevue.config.locale.am,disabled:e.disabled,unstyled:e.unstyled,onClick:t[51]||=function(e){return c.toggleAMPM(e)},onKeydown:c.onContainerButtonKeydown},e.timepickerButtonProps,{pt:e.ptm(`pcIncrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:O(function(t){return[I(e.$slots,`incrementicon`,{class:R(e.cx(`incrementIcon`))},function(){return[(F(),_(Se(e.incrementIcon?`span`:`ChevronUpIcon`),P({class:[e.cx(`incrementIcon`),t.class]},e.ptm(`pcIncrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]}),L(`span`,P(e.ptm(`ampm`),{"data-pc-group-section":`timepickerlabel`}),g(s.pm?e.$primevue.config.locale.pm:e.$primevue.config.locale.am),17),I(e.$slots,`ampmdecrementbutton`,{toggleCallback:function(e){return c.toggleAMPM(e)},keydownCallback:function(e){return c.onContainerButtonKeydown(e)}},function(){return[B(d,P({class:e.cx(`pcDecrementButton`),"aria-label":e.$primevue.config.locale.pm,disabled:e.disabled,onClick:t[52]||=function(e){return c.toggleAMPM(e)},onKeydown:c.onContainerButtonKeydown},e.timepickerButtonProps,{pt:e.ptm(`pcDecrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:O(function(t){return[I(e.$slots,`decrementicon`,{class:R(e.cx(`decrementIcon`))},function(){return[(F(),_(Se(e.decrementIcon?`span`:`ChevronDownIcon`),P({class:[e.cx(`decrementIcon`),t.class]},e.ptm(`pcDecrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`onKeydown`,`pt`])]})],16)):v(``,!0)],16,Zt)):v(``,!0),e.showButtonBar?(F(),x(`div`,P({key:2,class:e.cx(`buttonbar`)},e.ptm(`buttonbar`)),[I(e.$slots,`buttonbar`,{todayCallback:function(e){return c.onTodayButtonClick(e)},clearCallback:function(e){return c.onClearButtonClick(e)}},function(){return[I(e.$slots,`todaybutton`,{actionCallback:function(e){return c.onTodayButtonClick(e)},keydownCallback:function(e){return c.onContainerButtonKeydown(e)}},function(){return[B(d,P({label:c.todayLabel,onClick:t[53]||=function(e){return c.onTodayButtonClick(e)},class:e.cx(`pcTodayButton`),unstyled:e.unstyled,onKeydown:c.onContainerButtonKeydown},e.todayButtonProps,{pt:e.ptm(`pcTodayButton`),"data-pc-group-section":`button`}),null,16,[`label`,`class`,`unstyled`,`onKeydown`,`pt`])]}),I(e.$slots,`clearbutton`,{actionCallback:function(e){return c.onClearButtonClick(e)},keydownCallback:function(e){return c.onContainerButtonKeydown(e)}},function(){return[B(d,P({label:c.clearLabel,onClick:t[54]||=function(e){return c.onClearButtonClick(e)},class:e.cx(`pcClearButton`),unstyled:e.unstyled,onKeydown:c.onContainerButtonKeydown},e.clearButtonProps,{pt:e.ptm(`pcClearButton`),"data-pc-group-section":`button`}),null,16,[`label`,`class`,`unstyled`,`onKeydown`,`pt`])]})]})],16)):v(``,!0),I(e.$slots,`footer`)],16,zt)):v(``,!0)]}),_:3},16,[`onAfterEnter`,`onAfterLeave`,`onLeave`])]}),_:3},8,[`appendTo`,`disabled`])],16,It)}Ft.render=Qt;function $t(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let[n,r,i]=[Number(t[1]),Number(t[2]),Number(t[3])],a=new Date(n,r-1,i);return a.getFullYear()===n&&a.getMonth()===r-1&&a.getDate()===i?a:null}function en(e,t=new Date){let n=$t(e);if(!n)return null;let r=new Date(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((n.getTime()-r.getTime())/864e5)}function tn(e,t=new Date){let n=en(e,t);return n===null?null:n<0?`overdue`:n===0?`today`:n<=2?`soon`:`later`}function nn(e,t){let n=$t(e);return n?n.toLocaleDateString(t,{day:`2-digit`,month:`2-digit`,year:`numeric`}):e}function rn(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t=Math.imul(t^e.charCodeAt(n),16777619);t^=t>>>16,t=Math.imul(t,2246822507),t^=t>>>13,t=Math.imul(t,3266489909),t^=t>>>16;let n=(t>>>0)%360;return{background:`linear-gradient(135deg, hsl(${n} 62% 52%), hsl(${(n+40)%360} 62% 46%))`}}var an={class:`kb-card__top`},on={class:`kb-card__title`},sn={class:`kb-card__actions`},cn={key:0,class:`kb-card__groups`},ln={key:1,class:`kb-card__assignees`},un=[`title`],dn=[`src`,`onError`],fn={key:2,class:`kb-card__badges`},pn={key:1,class:`kb-card__prio`},mn={key:2,class:`pi pi-arrow-up`},hn={key:3,class:`kb-card__img-badge`},gn={key:4,class:`pi pi-align-left`},_n={key:5,class:`kb-card__img-badge`},vn={key:0,class:`pi pi-sparkles`},yn=[`src`],bn={key:1,class:`pi pi-comment`},xn=u(M({__name:`KanbanCardTile`,props:{card:{},t:{type:Function},avatarUrl:{type:Function},childCount:{},hasParent:{type:Boolean},currentUserId:{}},setup(e){let n=e,r=t(()=>{let e=n.card.assignees??[],t=n.currentUserId,r=t?e.findIndex(e=>e.id===t):-1;return r>0?[e[r],...e.slice(0,r),...e.slice(r+1)]:e}),i=t(()=>{let e=n.card.lastCommentBy;if(!e)return null;let t=e.author===`ai`;return!e.id&&!t?null:{id:e.id,ai:t,label:e.name||n.t(`card.lastCommentByAi`)}}),s=t(()=>{let e=n.card.deadline;if(!e)return null;let t=tn(e);return t?{label:nn(e),state:t}:null}),c=te(new Set);function l(e){return e.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)}return(e,t)=>{let u=Ee(`tooltip`);return F(),x(a,null,[L(`div`,an,[L(`span`,on,g(n.card.title),1),L(`div`,sn,[I(e.$slots,`actions`,{},void 0,!0)])]),n.card.groups?.length?(F(),x(`div`,cn,[(F(!0),x(a,null,z(n.card.groups,e=>(F(),x(`span`,{key:e,class:`kb-card__group`},g(e),1))),128))])):v(``,!0),n.card.assignees?.length?(F(),x(`div`,ln,[(F(!0),x(a,null,z(r.value,e=>(F(),x(`span`,{key:e.id,class:`kb-card__avatar`,style:ye(S(rn)(e.id)),title:e.name},[n.avatarUrl&&!c.has(e.id)?(F(),x(`img`,{key:0,src:n.avatarUrl(e.id),alt:``,onError:t=>c.add(e.id)},null,40,dn)):(F(),x(a,{key:1},[w(g(l(e.name)),1)],64))],12,un))),128))])):v(``,!0),n.card.markdown||n.card.images.length||n.card.commentCount||n.childCount||n.hasParent||s.value||e.$slots.badges?(F(),x(`div`,fn,[s.value?o((F(),x(`span`,{key:0,class:R([`kb-card__deadline`,`kb-card__deadline--${s.value.state}`])},[t[1]||=L(`i`,{class:`pi pi-calendar`},null,-1),w(` `+g(s.value.label),1)],2)),[[u,n.t(`card.deadlineTooltip`),void 0,{bottom:!0}]]):v(``,!0),n.card.priority?o((F(),x(`span`,pn,[w(g(n.card.priority),1)])),[[u,n.t(`editor.priorityLabel`),void 0,{bottom:!0}]]):v(``,!0),n.hasParent?o((F(),x(`i`,mn,null,512)),[[u,n.t(`card.hasParent`),void 0,{bottom:!0}]]):v(``,!0),n.childCount?o((F(),x(`span`,hn,[t[2]||=L(`i`,{class:`pi pi-sitemap`},null,-1),w(` `+g(n.childCount),1)])),[[u,n.t(`card.hasChildren`),void 0,{bottom:!0}]]):v(``,!0),n.card.markdown?(F(),x(`i`,gn)):v(``,!0),n.card.images.length?(F(),x(`span`,_n,[t[3]||=L(`i`,{class:`pi pi-image`},null,-1),w(` `+g(n.card.images.length),1)])):v(``,!0),n.card.commentCount?o((F(),x(`span`,{key:6,class:R([`kb-card__img-badge kb-card__comments`,{"kb-card__comments--bubble":i.value}])},[i.value?(F(),x(`span`,{key:0,class:R([`kb-card__avatar kb-card__avatar--mini`,{"kb-card__avatar--ai":i.value.ai}]),style:ye(i.value.id?S(rn)(i.value.id):void 0)},[i.value.ai&&!i.value.id?(F(),x(`i`,vn)):i.value.id&&n.avatarUrl&&!c.has(i.value.id)?(F(),x(`img`,{key:1,src:n.avatarUrl(i.value.id),alt:``,onError:t[0]||=e=>c.add(i.value.id)},null,40,yn)):(F(),x(a,{key:2},[w(g(l(i.value.label)),1)],64))],6)):(F(),x(`i`,bn)),w(` `+g(n.card.commentCount),1)],2)),[[u,i.value?n.t(`card.lastCommentBy`,{name:i.value.label}):void 0,void 0,{bottom:!0}]]):v(``,!0),I(e.$slots,`badges`,{},void 0,!0)])):v(``,!0)],64)}}}),[[`__scopeId`,`data-v-bded8d7d`]]);function Sn(e){let t=new Map;for(let n of e)n.createdBy&&!t.has(n.createdBy.id)&&t.set(n.createdBy.id,n.createdBy.name);return[...t].map(([e,t])=>({userId:e,name:t})).sort((e,t)=>e.name.localeCompare(t.name))}function Cn(e,t){return t.length?!!e.createdBy&&t.includes(e.createdBy.id):!0}function wn(e){return e?l.sanitize(f.parse(e,{async:!1}),{ALLOWED_TAGS:[`p`,`br`,`strong`,`em`,`del`,`code`,`pre`,`blockquote`,`ul`,`ol`,`li`,`h1`,`h2`,`h3`,`h4`,`a`,`span`],ALLOWED_ATTR:[`href`,`target`,`rel`,`class`]}):``}var Tn={key:0,class:`kb-files__thumb`},En=[`src`,`alt`],Dn={key:1,class:`pi pi-file kb-files__icon`},On=[`title`,`onClick`],kn=[`title`],An={class:`kb-files__size`},jn=[`title`,`onClick`],Mn=u(M({__name:`AttachmentList`,props:{files:{},preview:{},openable:{type:Boolean,default:!0},removable:{type:Boolean,default:!1},removeLabel:{default:``},compact:{type:Boolean,default:!1}},emits:[`open`,`remove`],setup(e,{emit:t}){let n=t;function r(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}return(t,i)=>e.files.length?(F(),x(`ul`,{key:0,class:R([`kb-files`,{"kb-files--inline":e.compact}])},[(F(!0),x(a,null,z(e.files,(t,a)=>(F(),x(`li`,{key:t.id,class:`kb-files__item`},[e.preview(t)?(F(),x(`span`,Tn,[L(`img`,{src:e.preview(t),alt:t.name},null,8,En)])):(F(),x(`i`,Dn)),e.openable?(F(),x(`button`,{key:2,class:`kb-files__name`,title:t.name,onClick:k(e=>n(`open`,t),[`stop`])},g(t.name),9,On)):(F(),x(`span`,{key:3,class:`kb-files__name kb-files__name--static`,title:t.name},g(t.name),9,kn)),L(`span`,An,g(r(t.size)),1),e.removable?(F(),x(`button`,{key:4,class:`kb-files__remove`,title:e.removeLabel,onClick:k(e=>n(`remove`,a),[`stop`])},[...i[0]||=[L(`i`,{class:`pi pi-times`},null,-1)]],8,jn)):v(``,!0)]))),128))],2)):v(``,!0)}}),[[`__scopeId`,`data-v-f30e50ba`]]),Nn=Uint8Array,Pn=Uint16Array,Fn=Int32Array,In=new Nn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ln=new Nn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Rn=new Nn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),zn=function(e,t){for(var n=new Pn(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new Fn(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},Bn=zn(In,2),Vn=Bn.b,Hn=Bn.r;Vn[28]=258,Hn[258]=28;var Un=zn(Ln,0),Wn=Un.b;Un.r;for(var Gn=new Pn(32768),Kn=0;Kn<32768;++Kn){var qn=(Kn&43690)>>1|(Kn&21845)<<1;qn=(qn&52428)>>2|(qn&13107)<<2,qn=(qn&61680)>>4|(qn&3855)<<4,Gn[Kn]=((qn&65280)>>8|(qn&255)<<8)>>1}for(var Jn=(function(e,t,n){for(var r=e.length,i=0,a=new Pn(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new Pn(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new Pn(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[Gn[d]>>c]=l}else for(s=new Pn(r),i=0;i<r;++i)e[i]&&(s[i]=Gn[o[e[i]-1]++]>>15-e[i]);return s}),Yn=new Nn(288),Kn=0;Kn<144;++Kn)Yn[Kn]=8;for(var Kn=144;Kn<256;++Kn)Yn[Kn]=9;for(var Kn=256;Kn<280;++Kn)Yn[Kn]=7;for(var Kn=280;Kn<288;++Kn)Yn[Kn]=8;for(var Xn=new Nn(32),Kn=0;Kn<32;++Kn)Xn[Kn]=5;var Zn=Jn(Yn,9,1),Qn=Jn(Xn,5,1),$n=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},er=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},tr=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},nr=function(e){return(e+7)/8|0},rr=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Nn(e.subarray(t,n))},ir=[`unexpected EOF`,`invalid block type`,`invalid length/literal`,`invalid distance`,`stream finished`,`no stream handler`,,`no callback`,`invalid UTF-8 data`,`extra field too long`,`date not in range 1980-2099`,`filename too long`,`stream finishing`,`invalid zip data`],ar=function(e,t,n){var r=Error(t||ir[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,ar),!n)throw r;return r},or=function(e,t,n,r){var i=e.length,a=r?r.length:0;if(!i||t.f&&!t.l)return n||new Nn(0);var o=!n,s=o||t.i!=2,c=t.i;o&&(n=new Nn(i*3));var l=function(e){var t=n.length;if(e>t){var r=new Nn(Math.max(t*2,e));r.set(n),n=r}},u=t.f||0,d=t.p||0,f=t.b||0,p=t.l,m=t.d,h=t.m,g=t.n,_=i*8;do{if(!p){u=er(e,d,1);var v=er(e,d+1,3);if(d+=3,v)if(v==1)p=Zn,m=Qn,h=9,g=5;else if(v==2){var y=er(e,d,31)+257,b=er(e,d+10,15)+4,x=y+er(e,d+5,31)+1;d+=14;for(var S=new Nn(x),C=new Nn(19),w=0;w<b;++w)C[Rn[w]]=er(e,d+w*3,7);d+=b*3;for(var T=$n(C),E=(1<<T)-1,D=Jn(C,T,1),w=0;w<x;){var O=D[er(e,d,E)];d+=O&15;var k=O>>4;if(k<16)S[w++]=k;else{var A=0,j=0;for(k==16?(j=3+er(e,d,3),d+=2,A=S[w-1]):k==17?(j=3+er(e,d,7),d+=3):k==18&&(j=11+er(e,d,127),d+=7);j--;)S[w++]=A}}var ee=S.subarray(0,y),te=S.subarray(y);h=$n(ee),g=$n(te),p=Jn(ee,h,1),m=Jn(te,g,1)}else ar(1);else{var k=nr(d)+4,M=e[k-4]|e[k-3]<<8,N=k+M;if(N>i){c&&ar(0);break}s&&l(f+M),n.set(e.subarray(k,N),f),t.b=f+=M,t.p=d=N*8,t.f=u;continue}if(d>_){c&&ar(0);break}}s&&l(f+131072);for(var ne=(1<<h)-1,re=(1<<g)-1,P=d;;P=d){var A=p[tr(e,d)&ne],ie=A>>4;if(d+=A&15,d>_){c&&ar(0);break}if(A||ar(2),ie<256)n[f++]=ie;else if(ie==256){P=d,p=null;break}else{var ae=ie-254;if(ie>264){var w=ie-257,oe=In[w];ae=er(e,d,(1<<oe)-1)+Vn[w],d+=oe}var se=m[tr(e,d)&re],ce=se>>4;se||ar(3),d+=se&15;var te=Wn[ce];if(ce>3){var oe=Ln[ce];te+=tr(e,d)&(1<<oe)-1,d+=oe}if(d>_){c&&ar(0);break}s&&l(f+131072);var le=f+ae;if(f<te){var ue=a-te,F=Math.min(te,le);for(ue+f<0&&ar(3);f<F;++f)n[f]=r[ue+f]}for(;f<le;++f)n[f]=n[f-te]}}t.l=p,t.p=P,t.b=f,t.f=u,p&&(u=1,t.m=h,t.d=m,t.n=g)}while(!u);return f!=n.length&&o?rr(n,0,f):n.subarray(0,f)},sr=new Nn(0),cr=function(e,t){return e[t]|e[t+1]<<8},lr=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},ur=function(e,t){return lr(e,t)+lr(e,t+4)*4294967296};function dr(e,t){return or(e,{i:2},t&&t.out,t&&t.dictionary)}var fr=typeof TextDecoder<`u`&&new TextDecoder;try{fr.decode(sr,{stream:!0})}catch{}var pr=function(e){for(var t=``,n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:rr(e,n-1)};i?i==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function mr(e,t){if(t){for(var n=``,r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}else if(fr)return fr.decode(e);else{var i=pr(e),a=i.s,n=i.r;return n.length&&ar(8),a}}var hr=function(e,t){return t+30+cr(e,t+26)+cr(e,t+28)},gr=function(e,t,n){var r=cr(e,t+28),i=mr(e.subarray(t+46,t+46+r),!(cr(e,t+8)&2048)),a=t+46+r,o=lr(e,t+20),s=n&&o==4294967295?_r(e,a):[o,lr(e,t+24),lr(e,t+42)],c=s[0],l=s[1],u=s[2];return[cr(e,t+10),c,l,i,a+cr(e,t+30)+cr(e,t+32),u]},_r=function(e,t){for(;cr(e,t)!=1;t+=4+cr(e,t+2));return[ur(e,t+12),ur(e,t+4),ur(e,t+20)]};function vr(e,t){for(var n={},r=e.length-22;lr(e,r)!=101010256;--r)(!r||e.length-r>65558)&&ar(13);var i=cr(e,r+8);if(!i)return{};var a=lr(e,r+16),o=a==4294967295||i==65535;if(o){var s=lr(e,r-12);o=lr(e,s)==101075792,o&&(i=lr(e,s+32),a=lr(e,s+48))}for(var c=t&&t.filter,l=0;l<i;++l){var u=gr(e,a,o),d=u[0],f=u[1],p=u[2],m=u[3],h=u[4],g=u[5],_=hr(e,g);a=h,(!c||c({name:m,size:f,originalSize:p,compression:d}))&&(d?d==8?n[m]=dr(e.subarray(_,_+f),{out:new Nn(p)}):ar(14,`unknown compression type `+d):n[m]=rr(e,_,_+f))}return n}var yr=2e3,br=100,xr=5e3,Sr=300,Cr={csv:`sheet`,tsv:`sheet`,xlsx:`sheet`,xlsm:`sheet`,ods:`sheet`,docx:`doc`,odt:`doc`,pptx:`slides`,odp:`slides`},wr={"text/csv":`sheet`,"text/tab-separated-values":`sheet`,"application/csv":`sheet`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":`sheet`,"application/vnd.ms-excel.sheet.macroenabled.12":`sheet`,"application/vnd.oasis.opendocument.spreadsheet":`sheet`,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":`doc`,"application/vnd.oasis.opendocument.text":`doc`,"application/vnd.openxmlformats-officedocument.presentationml.presentation":`slides`,"application/vnd.oasis.opendocument.presentation":`slides`};function Tr(e,t){return Cr[t.toLowerCase().split(`.`).pop()??``]??wr[(e||``).toLowerCase().split(`;`)[0].trim()]??null}async function Er(e,t,n,r){let i=n.toLowerCase().split(`.`).pop()??``;if(i===`csv`||i===`tsv`)return Mr(new TextDecoder().decode(t),n);let a=vr(new Uint8Array(t)),o=a[`content.xml`];return o?zr(e,mr(o)):e===`doc`?{mode:`render`,render:e=>Dr(t,r,e)}:e===`slides`?Lr(a):Or(t,r)}async function Dr(e,t,n){let{renderAsync:r}=await T(async()=>{let{renderAsync:e}=await import(`./docx-preview-DWhG4PqM.js`);return{renderAsync:e}},__vite__mapDeps([0,1,2]));await r(new Blob([e],{type:t}),n,void 0,{inWrapper:!0,breakPages:!0,renderAltChunks:!1,renderComments:!1,useBase64URL:!0}),Ar(n)}async function Or(e,t){let n=(await T(async()=>{let{default:e}=await import(`./browser-D3d3061H.js`);return{default:e}},[])).default,r=await n(new Blob([e],{type:t})),i=!1,a=r.map((e,t)=>(e.data.length>yr&&(i=!0),{name:e.sheet||`Sheet${t+1}`,rows:e.data.slice(0,yr).map(e=>(e.length>br&&(i=!0),e.slice(0,br).map(kr)))}));if(!a.length)throw Error(`no worksheet`);return{mode:`sheet`,sheets:a,truncated:i}}function kr(e){if(e==null)return``;if(e instanceof Date){let t=e.toISOString();return t.endsWith(`T00:00:00.000Z`)?t.slice(0,10):t.slice(0,19).replace(`T`,` `)}if(typeof e==`object`)try{return JSON.stringify(e)??``}catch{return`[objet]`}return typeof e==`string`?e:String(e)}function Ar(e){for(let t of Array.from(e.querySelectorAll(`script, iframe, object, embed`)))t.remove();for(let t of Array.from(e.querySelectorAll(`*`)))for(let e of Array.from(t.attributes)){let n=e.name.toLowerCase();(n.startsWith(`on`)||/^(href|src|xlink:href)$/.test(n)&&/^\s*javascript:/i.test(e.value))&&t.removeAttribute(e.name)}}function jr(e){let t=e.slice(0,4096).split(/\r?\n/)[0]??``,n=[`,`,`;`,` `,`|`].map(e=>[e,t.split(e).length]);return n.sort((e,t)=>t[1]-e[1]),n[0][1]>1?n[0][0]:`,`}function Mr(e,t){let n=t.toLowerCase().endsWith(`.tsv`)?` `:jr(e),r=[],i=[],a=``,o=!1;for(let t=0;t<e.length;t+=1){let s=e[t];if(o){s===`"`?e[t+1]===`"`?(a+=`"`,t+=1):o=!1:a+=s;continue}if(s===`"`)o=!0;else if(s===n)i.push(a),a=``;else if(s===`
|
|
569
|
+
`}this.responsiveStyleElement.innerHTML=t}},destroyResponsiveStyleElement:function(){this.responsiveStyleElement&&=(this.responsiveStyleElement.remove(),null)},dayDataP:function(e){return d({today:e.today,"other-month":e.otherMonth,selected:this.isSelected(e),disabled:!e.selectable})}},computed:{viewDate:function(){var e=this.rawValue;if(e&&Array.isArray(e))if(this.isRangeSelection())if(e.length===0)e=null;else if(e.length===1)e=e[0];else{var t=this.parseValueForComparison(e[0]),n=new Date(t.getFullYear(),t.getMonth()+this.numberOfMonths,1);if(!e[1]||e[1]<n)e=e[0];else{var r=this.parseValueForComparison(e[1]);e=new Date(r.getFullYear(),r.getMonth()-this.numberOfMonths+1,1)}}else this.isMultipleSelection()&&(e=e[e.length-1]);if(e&&typeof e!=`string`)return e;var i=new Date;return this.maxDate&&this.maxDate<i?this.maxDate:this.minDate&&this.minDate>i?this.minDate:i},inputFieldValue:function(){return this.formatValue(this.rawValue)},months:function(){for(var e=[],t=0;t<this.numberOfMonths;t++){var n=this.currentMonth+t,r=this.currentYear;n>11&&(n=n%11-1,r+=1);for(var i=[],a=this.getFirstDayOfMonthIndex(n,r),o=this.getDaysCountInMonth(n,r),s=this.getDaysCountInPrevMonth(n,r),c=1,l=new Date,u=[],d=Math.ceil((o+a)/7),f=0;f<d;f++){var p=[];if(f==0){for(var m=s-a+1;m<=s;m++){var h=this.getPreviousMonthAndYear(n,r);p.push({day:m,month:h.month,year:h.year,otherMonth:!0,today:this.isToday(l,m,h.month,h.year),selectable:this.isSelectable(m,h.month,h.year,!0)})}for(var g=7-p.length,_=0;_<g;_++)p.push({day:c,month:n,year:r,today:this.isToday(l,c,n,r),selectable:this.isSelectable(c,n,r,!1)}),c++}else for(var v=0;v<7;v++){if(c>o){var y=this.getNextMonthAndYear(n,r);p.push({day:c-o,month:y.month,year:y.year,otherMonth:!0,today:this.isToday(l,c-o,y.month,y.year),selectable:this.isSelectable(c-o,y.month,y.year,!0)})}else p.push({day:c,month:n,year:r,today:this.isToday(l,c,n,r),selectable:this.isSelectable(c,n,r,!1)});c++}this.showWeek&&u.push(this.getWeekNumber(new Date(p[0].year,p[0].month,p[0].day))),i.push(p)}e.push({month:n,year:r,dates:i,weekNumbers:u})}return e},weekDays:function(){for(var e=[],t=this.$primevue.config.locale.firstDayOfWeek,n=0;n<7;n++)e.push(this.$primevue.config.locale.dayNamesMin[t]),t=t==6?0:++t;return e},ticksTo1970:function(){return 719162*24*60*60*1e7},sundayIndex:function(){return this.$primevue.config.locale.firstDayOfWeek>0?7-this.$primevue.config.locale.firstDayOfWeek:0},datePattern:function(){return this.dateFormat||this.$primevue.config.locale.dateFormat},monthPickerValues:function(){for(var e=this,t=[],n=function(t){if(e.minDate){var n=e.minDate.getMonth(),r=e.minDate.getFullYear();if(e.currentYear<r||e.currentYear===r&&t<n)return!1}if(e.maxDate){var i=e.maxDate.getMonth(),a=e.maxDate.getFullYear();if(e.currentYear>a||e.currentYear===a&&t>i)return!1}return!0},r=0;r<=11;r++)t.push({value:this.$primevue.config.locale.monthNamesShort[r],selectable:n(r)});return t},yearPickerValues:function(){for(var e=this,t=[],n=this.currentYear-this.currentYear%10,r=function(t){return!(e.minDate&&e.minDate.getFullYear()>t||e.maxDate&&e.maxDate.getFullYear()<t)},i=0;i<10;i++)t.push({value:n+i,selectable:r(n+i)});return t},formattedCurrentHour:function(){return this.currentHour==0&&this.hourFormat==`12`?this.currentHour+12:this.currentHour<10?`0`+this.currentHour:this.currentHour},formattedCurrentMinute:function(){return this.currentMinute<10?`0`+this.currentMinute:this.currentMinute},formattedCurrentSecond:function(){return this.currentSecond<10?`0`+this.currentSecond:this.currentSecond},todayLabel:function(){return this.$primevue.config.locale.today},clearLabel:function(){return this.$primevue.config.locale.clear},weekHeaderLabel:function(){return this.$primevue.config.locale.weekHeader},monthNames:function(){return this.$primevue.config.locale.monthNames},switchViewButtonDisabled:function(){return this.numberOfMonths>1||this.disabled},isClearIconVisible:function(){return this.showClear&&this.rawValue!=null&&!this.disabled},panelId:function(){return this.$id+`_panel`},containerDataP:function(){return d({fluid:this.$fluid})},panelDataP:function(){return d(wt({inline:this.inline},`portal-`+this.appendTo,`portal-`+this.appendTo))},inputIconDataP:function(){return d(wt({},this.size,this.size))},timePickerDataP:function(){return d({"time-only":this.timeOnly})},hourIncrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,0,1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,0,1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},hourDecrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,0,-1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,0,-1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},minuteIncrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,1,1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,1,1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},minuteDecrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,1,-1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,1,-1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},secondIncrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,2,1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,2,1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}},secondDecrementCallbacks:function(){var e=this;return{mousedown:function(t){return e.onTimePickerElementMouseDown(t,2,-1)},mouseup:function(t){return e.onTimePickerElementMouseUp(t)},mouseleave:function(){return e.onTimePickerElementMouseLeave()},keydown:function(t){return e.onTimePickerElementKeyDown(t,2,-1)},keyup:function(t){return e.onTimePickerElementKeyUp(t)}}}},components:{InputText:be,Button:B,Portal:g,CalendarIcon:mt,ChevronLeftIcon:Ge,ChevronRightIcon:Le,ChevronUpIcon:Je,ChevronDownIcon:Ae,TimesIcon:te},directives:{ripple:f}},It=[`id`,`data-p`],Lt=[`disabled`,`aria-label`,`aria-expanded`,`aria-controls`],Rt=[`data-p`],zt=[`id`,`role`,`aria-modal`,`aria-label`,`data-p`],Bt=[`disabled`,`aria-label`],Vt=[`disabled`,`aria-label`],Ht=[`disabled`,`aria-label`],Ut=[`disabled`,`aria-label`],Wt=[`data-p-disabled`],Gt=[`abbr`],Kt=[`data-p-disabled`],qt=[`aria-label`,`data-p-today`,`data-p-other-month`],Jt=[`onClick`,`onKeydown`,`aria-selected`,`aria-disabled`,`data-p`],Yt=[`onClick`,`onKeydown`,`data-p-disabled`,`data-p-selected`],Xt=[`onClick`,`onKeydown`,`data-p-disabled`,`data-p-selected`],Zt=[`data-p`];function Qt(e,t,n,r,o,s){var c=se(`InputText`),l=se(`TimesIcon`),u=se(`Button`),d=se(`Portal`),f=Ce(`ripple`);return I(),i(`span`,j({ref:`container`,id:e.$id,class:e.cx(`root`),style:e.sx(`root`),"data-p":s.containerDataP},e.ptmi(`root`)),[e.inline?a(``,!0):(I(),A(c,{key:0,ref:s.inputRef,id:e.inputId,role:`combobox`,class:O([e.inputClass,e.cx(`pcInputText`)]),style:Ne(e.inputStyle),defaultValue:s.inputFieldValue,placeholder:e.placeholder,name:e.name,size:e.size,invalid:e.invalid,variant:e.variant,fluid:e.fluid,required:e.required,unstyled:e.unstyled,autocomplete:`off`,"aria-autocomplete":`none`,"aria-haspopup":`dialog`,"aria-expanded":o.overlayVisible,"aria-controls":o.overlayVisible?s.panelId:void 0,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,inputmode:`none`,disabled:e.disabled,readonly:!e.manualInput||e.readonly,tabindex:0,onInput:s.onInput,onClick:s.onInputClick,onFocus:s.onFocus,onBlur:s.onBlur,onKeydown:s.onKeyDown,"data-p-has-dropdown":e.showIcon&&e.iconDisplay===`button`&&!e.inline,"data-p-has-e-icon":e.showIcon&&e.iconDisplay===`input`&&!e.inline,pt:e.ptm(`pcInputText`)},null,8,`id.class.style.defaultValue.placeholder.name.size.invalid.variant.fluid.required.unstyled.aria-expanded.aria-controls.aria-labelledby.aria-label.disabled.readonly.onInput.onClick.onFocus.onBlur.onKeydown.data-p-has-dropdown.data-p-has-e-icon.pt`.split(`.`))),e.showClear&&!e.inline?he(e.$slots,`clearicon`,{key:1,class:O(e.cx(`clearIcon`)),clearCallback:s.onClearClick},function(){return[x(l,j({ref:`clearIcon`,class:[e.cx(`clearIcon`)],onClick:s.onClearClick},e.ptm(`clearIcon`)),null,16,[`class`,`onClick`])]}):a(``,!0),e.showIcon&&e.iconDisplay===`button`&&!e.inline?he(e.$slots,`dropdownbutton`,{key:2,toggleCallback:s.onButtonClick},function(){return[R(`button`,j({class:e.cx(`dropdown`),disabled:e.disabled,onClick:t[0]||=function(){return s.onButtonClick&&s.onButtonClick.apply(s,arguments)},type:`button`,"aria-label":e.$primevue.config.locale.chooseDate,"aria-haspopup":`dialog`,"aria-expanded":o.overlayVisible,"aria-controls":s.panelId},e.ptm(`dropdown`)),[he(e.$slots,`dropdownicon`,{class:O(e.icon)},function(){return[(I(),A(ke(e.icon?`span`:`CalendarIcon`),j({class:e.icon},e.ptm(`dropdownIcon`)),null,16,[`class`]))]})],16,Lt)]}):e.showIcon&&e.iconDisplay===`input`&&!e.inline?(I(),i(N,{key:3},[e.$slots.inputicon||e.showIcon?(I(),i(`span`,j({key:0,class:e.cx(`inputIconContainer`),"data-p":s.inputIconDataP},e.ptm(`inputIconContainer`)),[he(e.$slots,`inputicon`,{class:O(e.cx(`inputIcon`)),clickCallback:s.onButtonClick},function(){return[(I(),A(ke(e.icon?`i`:`CalendarIcon`),j({class:[e.icon,e.cx(`inputIcon`)],onClick:s.onButtonClick},e.ptm(`inputicon`)),null,16,[`class`,`onClick`]))]})],16,Rt)):a(``,!0)],64)):a(``,!0),x(d,{appendTo:e.appendTo,disabled:e.inline},{default:L(function(){return[x(we,j({name:`p-anchored-overlay`,onEnter:t[58]||=function(e){return s.onOverlayEnter(e)},onAfterEnter:s.onOverlayEnterComplete,onAfterLeave:s.onOverlayAfterLeave,onLeave:s.onOverlayLeave},e.ptm(`transition`)),{default:L(function(){return[e.inline||o.overlayVisible?(I(),i(`div`,j({key:0,ref:s.overlayRef,id:s.panelId,class:[e.cx(`panel`),e.panelClass],style:e.panelStyle,role:e.inline?null:`dialog`,"aria-modal":e.inline?null:`true`,"aria-label":e.$primevue.config.locale.chooseDate,onClick:t[55]||=function(){return s.onOverlayClick&&s.onOverlayClick.apply(s,arguments)},onKeydown:t[56]||=function(){return s.onOverlayKeyDown&&s.onOverlayKeyDown.apply(s,arguments)},onMouseup:t[57]||=function(){return s.onOverlayMouseUp&&s.onOverlayMouseUp.apply(s,arguments)},"data-p":s.panelDataP},e.ptm(`panel`)),[e.timeOnly?a(``,!0):(I(),i(N,{key:0},[R(`div`,j({class:e.cx(`calendarContainer`)},e.ptm(`calendarContainer`)),[(I(!0),i(N,null,F(s.months,function(n,r){return I(),i(`div`,j({key:n.month+n.year,class:e.cx(`calendar`)},{ref_for:!0},e.ptm(`calendar`)),[R(`div`,j({class:e.cx(`header`)},{ref_for:!0},e.ptm(`header`)),[he(e.$slots,`header`),he(e.$slots,`prevbutton`,{actionCallback:function(e){return s.onPrevButtonClick(e)},keydownCallback:function(e){return s.onContainerButtonKeydown(e)}},function(){return[z(x(u,j({ref_for:!0,ref:s.previousButtonRef,class:e.cx(`pcPrevButton`),disabled:e.disabled,"aria-label":o.currentView===`year`?e.$primevue.config.locale.prevDecade:o.currentView===`month`?e.$primevue.config.locale.prevYear:e.$primevue.config.locale.prevMonth,unstyled:e.unstyled,onClick:s.onPrevButtonClick,onKeydown:s.onContainerButtonKeydown},{ref_for:!0},e.navigatorButtonProps,{pt:e.ptm(`pcPrevButton`),"data-pc-group-section":`navigator`}),{icon:L(function(t){return[he(e.$slots,`previcon`,{},function(){return[(I(),A(ke(e.prevIcon?`span`:`ChevronLeftIcon`),j({class:[e.prevIcon,t.class]},{ref_for:!0},e.ptm(`pcPrevButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`class`,`disabled`,`aria-label`,`unstyled`,`onClick`,`onKeydown`,`pt`]),[[de,r===0]])]}),R(`div`,j({class:e.cx(`title`)},{ref_for:!0},e.ptm(`title`)),[e.$primevue.config.locale.showMonthAfterYear?(I(),i(N,{key:0},[o.currentView===`year`?a(``,!0):(I(),i(`button`,j({key:0,type:`button`,onClick:t[1]||=function(){return s.switchToYearView&&s.switchToYearView.apply(s,arguments)},onKeydown:t[2]||=function(){return s.onContainerButtonKeydown&&s.onContainerButtonKeydown.apply(s,arguments)},class:e.cx(`selectYear`),disabled:s.switchViewButtonDisabled,"aria-label":e.$primevue.config.locale.chooseYear},{ref_for:!0},e.ptm(`selectYear`),{"data-pc-group-section":`view`}),k(s.getYear(n)),17,Bt)),o.currentView===`date`?(I(),i(`button`,j({key:1,type:`button`,onClick:t[3]||=function(){return s.switchToMonthView&&s.switchToMonthView.apply(s,arguments)},onKeydown:t[4]||=function(){return s.onContainerButtonKeydown&&s.onContainerButtonKeydown.apply(s,arguments)},class:e.cx(`selectMonth`),disabled:s.switchViewButtonDisabled,"aria-label":e.$primevue.config.locale.chooseMonth},{ref_for:!0},e.ptm(`selectMonth`),{"data-pc-group-section":`view`}),k(s.getMonthName(n.month)),17,Vt)):a(``,!0)],64)):(I(),i(N,{key:1},[o.currentView===`date`?(I(),i(`button`,j({key:0,type:`button`,onClick:t[5]||=function(){return s.switchToMonthView&&s.switchToMonthView.apply(s,arguments)},onKeydown:t[6]||=function(){return s.onContainerButtonKeydown&&s.onContainerButtonKeydown.apply(s,arguments)},class:e.cx(`selectMonth`),disabled:s.switchViewButtonDisabled,"aria-label":e.$primevue.config.locale.chooseMonth},{ref_for:!0},e.ptm(`selectMonth`),{"data-pc-group-section":`view`}),k(s.getMonthName(n.month)),17,Ht)):a(``,!0),o.currentView===`year`?a(``,!0):(I(),i(`button`,j({key:1,type:`button`,onClick:t[7]||=function(){return s.switchToYearView&&s.switchToYearView.apply(s,arguments)},onKeydown:t[8]||=function(){return s.onContainerButtonKeydown&&s.onContainerButtonKeydown.apply(s,arguments)},class:e.cx(`selectYear`),disabled:s.switchViewButtonDisabled,"aria-label":e.$primevue.config.locale.chooseYear},{ref_for:!0},e.ptm(`selectYear`),{"data-pc-group-section":`view`}),k(s.getYear(n)),17,Ut))],64)),o.currentView===`year`?(I(),i(`span`,j({key:2,class:e.cx(`decade`)},{ref_for:!0},e.ptm(`decade`)),[he(e.$slots,`decade`,{years:s.yearPickerValues},function(){return[P(k(s.yearPickerValues[0].value)+` - `+k(s.yearPickerValues[s.yearPickerValues.length-1].value),1)]})],16)):a(``,!0)],16),he(e.$slots,`nextbutton`,{actionCallback:function(e){return s.onNextButtonClick(e)},keydownCallback:function(e){return s.onContainerButtonKeydown(e)}},function(){return[z(x(u,j({ref_for:!0,ref:s.nextButtonRef,class:e.cx(`pcNextButton`),disabled:e.disabled,"aria-label":o.currentView===`year`?e.$primevue.config.locale.nextDecade:o.currentView===`month`?e.$primevue.config.locale.nextYear:e.$primevue.config.locale.nextMonth,unstyled:e.unstyled,onClick:s.onNextButtonClick,onKeydown:s.onContainerButtonKeydown},{ref_for:!0},e.navigatorButtonProps,{pt:e.ptm(`pcNextButton`),"data-pc-group-section":`navigator`}),{icon:L(function(t){return[he(e.$slots,`nexticon`,{},function(){return[(I(),A(ke(e.nextIcon?`span`:`ChevronRightIcon`),j({class:[e.nextIcon,t.class]},{ref_for:!0},e.ptm(`pcNextButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`class`,`disabled`,`aria-label`,`unstyled`,`onClick`,`onKeydown`,`pt`]),[[de,e.numberOfMonths===1?!0:r===e.numberOfMonths-1]])]})],16),o.currentView===`date`?(I(),i(`table`,j({key:0,class:e.cx(`dayView`),role:`grid`},{ref_for:!0},e.ptm(`dayView`)),[R(`thead`,j({ref_for:!0},e.ptm(`tableHeader`)),[R(`tr`,j({ref_for:!0},e.ptm(`tableHeaderRow`)),[e.showWeek?(I(),i(`th`,j({key:0,scope:`col`,class:e.cx(`weekHeader`)},{ref_for:!0},e.ptm(`weekHeader`,{context:{disabled:e.showWeek}}),{"data-p-disabled":e.showWeek,"data-pc-group-section":`tableheadercell`}),[he(e.$slots,`weekheaderlabel`,{},function(){return[R(`span`,j({ref_for:!0},e.ptm(`weekHeaderLabel`,{context:{disabled:e.showWeek}}),{"data-pc-group-section":`tableheadercelllabel`}),k(s.weekHeaderLabel),17)]})],16,Wt)):a(``,!0),(I(!0),i(N,null,F(s.weekDays,function(t){return I(),i(`th`,j({key:t,scope:`col`,abbr:t},{ref_for:!0},e.ptm(`tableHeaderCell`),{"data-pc-group-section":`tableheadercell`,class:e.cx(`weekDayCell`)}),[R(`span`,j({class:e.cx(`weekDay`)},{ref_for:!0},e.ptm(`weekDay`),{"data-pc-group-section":`tableheadercelllabel`}),k(t),17)],16,Gt)}),128))],16)],16),R(`tbody`,j({ref_for:!0},e.ptm(`tableBody`)),[(I(!0),i(N,null,F(n.dates,function(t,o){return I(),i(`tr`,j({key:t[0].day+``+t[0].month},{ref_for:!0},e.ptm(`tableBodyRow`)),[e.showWeek?(I(),i(`td`,j({key:0,class:e.cx(`weekNumber`)},{ref_for:!0},e.ptm(`weekNumber`),{"data-pc-group-section":`tablebodycell`}),[R(`span`,j({class:e.cx(`weekLabelContainer`)},{ref_for:!0},e.ptm(`weekLabelContainer`,{context:{disabled:e.showWeek}}),{"data-p-disabled":e.showWeek,"data-pc-group-section":`tablebodycelllabel`}),[he(e.$slots,`weeklabel`,{weekNumber:n.weekNumbers[o]},function(){return[n.weekNumbers[o]<10?(I(),i(`span`,j({key:0,style:{visibility:`hidden`}},{ref_for:!0},e.ptm(`weekLabel`)),`0`,16)):a(``,!0),P(` `+k(n.weekNumbers[o]),1)]})],16,Kt)],16)):a(``,!0),(I(!0),i(N,null,F(t,function(t){return I(),i(`td`,j({key:t.day+``+t.month,"aria-label":t.day,class:e.cx(`dayCell`,{date:t})},{ref_for:!0},e.ptm(`dayCell`,{context:{date:t,today:t.today,otherMonth:t.otherMonth,selected:s.isSelected(t),disabled:!t.selectable}}),{"data-p-today":t.today,"data-p-other-month":t.otherMonth,"data-pc-group-section":`tablebodycell`}),[e.showOtherMonths||!t.otherMonth?z((I(),i(`span`,j({key:0,class:e.cx(`day`,{date:t}),onClick:function(e){return s.onDateSelect(e,t)},draggable:`false`,onKeydown:function(e){return s.onDateCellKeydown(e,t,r)},"aria-selected":s.isSelected(t),"aria-disabled":!t.selectable},{ref_for:!0},e.ptm(`day`,{context:{date:t,today:t.today,otherMonth:t.otherMonth,selected:s.isSelected(t),disabled:!t.selectable}}),{"data-p":s.dayDataP(t),"data-pc-group-section":`tablebodycelllabel`}),[he(e.$slots,`date`,{date:t},function(){return[P(k(t.day),1)]})],16,Jt)),[[f]]):a(``,!0),s.isSelected(t)?(I(),i(`div`,j({key:1,class:`p-hidden-accessible`,"aria-live":`polite`},{ref_for:!0},e.ptm(`hiddenSelectedDay`),{"data-p-hidden-accessible":!0}),k(t.day),17)):a(``,!0)],16,qt)}),128))],16)}),128))],16)],16)):a(``,!0)],16)}),128))],16),o.currentView===`month`?(I(),i(`div`,j({key:0,class:e.cx(`monthView`)},e.ptm(`monthView`)),[(I(!0),i(N,null,F(s.monthPickerValues,function(t,n){return z((I(),i(`span`,j({key:t,onClick:function(e){return s.onMonthSelect(e,{month:t,index:n})},onKeydown:function(e){return s.onMonthCellKeydown(e,{month:t,index:n})},class:e.cx(`month`,{month:t,index:n})},{ref_for:!0},e.ptm(`month`,{context:{month:t,monthIndex:n,selected:s.isMonthSelected(n),disabled:!t.selectable}}),{"data-p-disabled":!t.selectable,"data-p-selected":s.isMonthSelected(n)}),[P(k(t.value)+` `,1),s.isMonthSelected(n)?(I(),i(`div`,j({key:0,class:`p-hidden-accessible`,"aria-live":`polite`},{ref_for:!0},e.ptm(`hiddenMonth`),{"data-p-hidden-accessible":!0}),k(t.value),17)):a(``,!0)],16,Yt)),[[f]])}),128))],16)):a(``,!0),o.currentView===`year`?(I(),i(`div`,j({key:1,class:e.cx(`yearView`)},e.ptm(`yearView`)),[(I(!0),i(N,null,F(s.yearPickerValues,function(t){return z((I(),i(`span`,j({key:t.value,onClick:function(e){return s.onYearSelect(e,t)},onKeydown:function(e){return s.onYearCellKeydown(e,t)},class:e.cx(`year`,{year:t})},{ref_for:!0},e.ptm(`year`,{context:{year:t,selected:s.isYearSelected(t.value),disabled:!t.selectable}}),{"data-p-disabled":!t.selectable,"data-p-selected":s.isYearSelected(t.value)}),[P(k(t.value)+` `,1),s.isYearSelected(t.value)?(I(),i(`div`,j({key:0,class:`p-hidden-accessible`,"aria-live":`polite`},{ref_for:!0},e.ptm(`hiddenYear`),{"data-p-hidden-accessible":!0}),k(t.value),17)):a(``,!0)],16,Xt)),[[f]])}),128))],16)):a(``,!0)],64)),(e.showTime||e.timeOnly)&&o.currentView===`date`?(I(),i(`div`,j({key:1,class:e.cx(`timePicker`),"data-p":s.timePickerDataP},e.ptm(`timePicker`)),[R(`div`,j({class:e.cx(`hourPicker`)},e.ptm(`hourPicker`),{"data-pc-group-section":`timepickerContainer`}),[he(e.$slots,`hourincrementbutton`,{callbacks:s.hourIncrementCallbacks},function(){return[x(u,j({class:e.cx(`pcIncrementButton`),"aria-label":e.$primevue.config.locale.nextHour,unstyled:e.unstyled,onMousedown:t[9]||=function(e){return s.onTimePickerElementMouseDown(e,0,1)},onMouseup:t[10]||=function(e){return s.onTimePickerElementMouseUp(e)},onKeydown:[s.onContainerButtonKeydown,t[12]||=oe(function(e){return s.onTimePickerElementMouseDown(e,0,1)},[`enter`]),t[13]||=oe(function(e){return s.onTimePickerElementMouseDown(e,0,1)},[`space`])],onMouseleave:t[11]||=function(e){return s.onTimePickerElementMouseLeave()},onKeyup:[t[14]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`enter`]),t[15]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcIncrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:L(function(t){return[he(e.$slots,`incrementicon`,{},function(){return[(I(),A(ke(e.incrementIcon?`span`:`ChevronUpIcon`),j({class:[e.incrementIcon,t.class]},e.ptm(`pcIncrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`unstyled`,`onKeydown`,`pt`])]}),R(`span`,j(e.ptm(`hour`),{"data-pc-group-section":`timepickerlabel`}),k(s.formattedCurrentHour),17),he(e.$slots,`hourdecrementbutton`,{callbacks:s.hourDecrementCallbacks},function(){return[x(u,j({class:e.cx(`pcDecrementButton`),"aria-label":e.$primevue.config.locale.prevHour,unstyled:e.unstyled,onMousedown:t[16]||=function(e){return s.onTimePickerElementMouseDown(e,0,-1)},onMouseup:t[17]||=function(e){return s.onTimePickerElementMouseUp(e)},onKeydown:[s.onContainerButtonKeydown,t[19]||=oe(function(e){return s.onTimePickerElementMouseDown(e,0,-1)},[`enter`]),t[20]||=oe(function(e){return s.onTimePickerElementMouseDown(e,0,-1)},[`space`])],onMouseleave:t[18]||=function(e){return s.onTimePickerElementMouseLeave()},onKeyup:[t[21]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`enter`]),t[22]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcDecrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:L(function(t){return[he(e.$slots,`decrementicon`,{},function(){return[(I(),A(ke(e.decrementIcon?`span`:`ChevronDownIcon`),j({class:[e.decrementIcon,t.class]},e.ptm(`pcDecrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`unstyled`,`onKeydown`,`pt`])]})],16),R(`div`,j(e.ptm(`separatorContainer`),{"data-pc-group-section":`timepickerContainer`}),[R(`span`,j(e.ptm(`separator`),{"data-pc-group-section":`timepickerlabel`}),k(e.timeSeparator),17)],16),R(`div`,j({class:e.cx(`minutePicker`)},e.ptm(`minutePicker`),{"data-pc-group-section":`timepickerContainer`}),[he(e.$slots,`minuteincrementbutton`,{callbacks:s.minuteIncrementCallbacks},function(){return[x(u,j({class:e.cx(`pcIncrementButton`),"aria-label":e.$primevue.config.locale.nextMinute,disabled:e.disabled,unstyled:e.unstyled,onMousedown:t[23]||=function(e){return s.onTimePickerElementMouseDown(e,1,1)},onMouseup:t[24]||=function(e){return s.onTimePickerElementMouseUp(e)},onKeydown:[s.onContainerButtonKeydown,t[26]||=oe(function(e){return s.onTimePickerElementMouseDown(e,1,1)},[`enter`]),t[27]||=oe(function(e){return s.onTimePickerElementMouseDown(e,1,1)},[`space`])],onMouseleave:t[25]||=function(e){return s.onTimePickerElementMouseLeave()},onKeyup:[t[28]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`enter`]),t[29]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcIncrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:L(function(t){return[he(e.$slots,`incrementicon`,{},function(){return[(I(),A(ke(e.incrementIcon?`span`:`ChevronUpIcon`),j({class:[e.incrementIcon,t.class]},e.ptm(`pcIncrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]}),R(`span`,j(e.ptm(`minute`),{"data-pc-group-section":`timepickerlabel`}),k(s.formattedCurrentMinute),17),he(e.$slots,`minutedecrementbutton`,{callbacks:s.minuteDecrementCallbacks},function(){return[x(u,j({class:e.cx(`pcDecrementButton`),"aria-label":e.$primevue.config.locale.prevMinute,disabled:e.disabled,unstyled:e.unstyled,onMousedown:t[30]||=function(e){return s.onTimePickerElementMouseDown(e,1,-1)},onMouseup:t[31]||=function(e){return s.onTimePickerElementMouseUp(e)},onKeydown:[s.onContainerButtonKeydown,t[33]||=oe(function(e){return s.onTimePickerElementMouseDown(e,1,-1)},[`enter`]),t[34]||=oe(function(e){return s.onTimePickerElementMouseDown(e,1,-1)},[`space`])],onMouseleave:t[32]||=function(e){return s.onTimePickerElementMouseLeave()},onKeyup:[t[35]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`enter`]),t[36]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcDecrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:L(function(t){return[he(e.$slots,`decrementicon`,{},function(){return[(I(),A(ke(e.decrementIcon?`span`:`ChevronDownIcon`),j({class:[e.decrementIcon,t.class]},e.ptm(`pcDecrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]})],16),e.showSeconds?(I(),i(`div`,j({key:0,class:e.cx(`separatorContainer`)},e.ptm(`separatorContainer`),{"data-pc-group-section":`timepickerContainer`}),[R(`span`,j(e.ptm(`separator`),{"data-pc-group-section":`timepickerlabel`}),k(e.timeSeparator),17)],16)):a(``,!0),e.showSeconds?(I(),i(`div`,j({key:1,class:e.cx(`secondPicker`)},e.ptm(`secondPicker`),{"data-pc-group-section":`timepickerContainer`}),[he(e.$slots,`secondincrementbutton`,{callbacks:s.secondIncrementCallbacks},function(){return[x(u,j({class:e.cx(`pcIncrementButton`),"aria-label":e.$primevue.config.locale.nextSecond,disabled:e.disabled,unstyled:e.unstyled,onMousedown:t[37]||=function(e){return s.onTimePickerElementMouseDown(e,2,1)},onMouseup:t[38]||=function(e){return s.onTimePickerElementMouseUp(e)},onKeydown:[s.onContainerButtonKeydown,t[40]||=oe(function(e){return s.onTimePickerElementMouseDown(e,2,1)},[`enter`]),t[41]||=oe(function(e){return s.onTimePickerElementMouseDown(e,2,1)},[`space`])],onMouseleave:t[39]||=function(e){return s.onTimePickerElementMouseLeave()},onKeyup:[t[42]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`enter`]),t[43]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcIncrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:L(function(t){return[he(e.$slots,`incrementicon`,{},function(){return[(I(),A(ke(e.incrementIcon?`span`:`ChevronUpIcon`),j({class:[e.incrementIcon,t.class]},e.ptm(`pcIncrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]}),R(`span`,j(e.ptm(`second`),{"data-pc-group-section":`timepickerlabel`}),k(s.formattedCurrentSecond),17),he(e.$slots,`seconddecrementbutton`,{callbacks:s.secondDecrementCallbacks},function(){return[x(u,j({class:e.cx(`pcDecrementButton`),"aria-label":e.$primevue.config.locale.prevSecond,disabled:e.disabled,unstyled:e.unstyled,onMousedown:t[44]||=function(e){return s.onTimePickerElementMouseDown(e,2,-1)},onMouseup:t[45]||=function(e){return s.onTimePickerElementMouseUp(e)},onKeydown:[s.onContainerButtonKeydown,t[47]||=oe(function(e){return s.onTimePickerElementMouseDown(e,2,-1)},[`enter`]),t[48]||=oe(function(e){return s.onTimePickerElementMouseDown(e,2,-1)},[`space`])],onMouseleave:t[46]||=function(e){return s.onTimePickerElementMouseLeave()},onKeyup:[t[49]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`enter`]),t[50]||=oe(function(e){return s.onTimePickerElementMouseUp(e)},[`space`])]},e.timepickerButtonProps,{pt:e.ptm(`pcDecrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:L(function(t){return[he(e.$slots,`decrementicon`,{},function(){return[(I(),A(ke(e.decrementIcon?`span`:`ChevronDownIcon`),j({class:[e.decrementIcon,t.class]},e.ptm(`pcDecrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]})],16)):a(``,!0),e.hourFormat==`12`?(I(),i(`div`,j({key:2,class:e.cx(`separatorContainer`)},e.ptm(`separatorContainer`),{"data-pc-group-section":`timepickerContainer`}),[R(`span`,j(e.ptm(`separator`),{"data-pc-group-section":`timepickerlabel`}),k(e.timeSeparator),17)],16)):a(``,!0),e.hourFormat==`12`?(I(),i(`div`,j({key:3,class:e.cx(`ampmPicker`)},e.ptm(`ampmPicker`)),[he(e.$slots,`ampmincrementbutton`,{toggleCallback:function(e){return s.toggleAMPM(e)},keydownCallback:function(e){return s.onContainerButtonKeydown(e)}},function(){return[x(u,j({class:e.cx(`pcIncrementButton`),"aria-label":e.$primevue.config.locale.am,disabled:e.disabled,unstyled:e.unstyled,onClick:t[51]||=function(e){return s.toggleAMPM(e)},onKeydown:s.onContainerButtonKeydown},e.timepickerButtonProps,{pt:e.ptm(`pcIncrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:L(function(t){return[he(e.$slots,`incrementicon`,{class:O(e.cx(`incrementIcon`))},function(){return[(I(),A(ke(e.incrementIcon?`span`:`ChevronUpIcon`),j({class:[e.cx(`incrementIcon`),t.class]},e.ptm(`pcIncrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`unstyled`,`onKeydown`,`pt`])]}),R(`span`,j(e.ptm(`ampm`),{"data-pc-group-section":`timepickerlabel`}),k(o.pm?e.$primevue.config.locale.pm:e.$primevue.config.locale.am),17),he(e.$slots,`ampmdecrementbutton`,{toggleCallback:function(e){return s.toggleAMPM(e)},keydownCallback:function(e){return s.onContainerButtonKeydown(e)}},function(){return[x(u,j({class:e.cx(`pcDecrementButton`),"aria-label":e.$primevue.config.locale.pm,disabled:e.disabled,onClick:t[52]||=function(e){return s.toggleAMPM(e)},onKeydown:s.onContainerButtonKeydown},e.timepickerButtonProps,{pt:e.ptm(`pcDecrementButton`),"data-pc-group-section":`timepickerbutton`}),{icon:L(function(t){return[he(e.$slots,`decrementicon`,{class:O(e.cx(`decrementIcon`))},function(){return[(I(),A(ke(e.decrementIcon?`span`:`ChevronDownIcon`),j({class:[e.cx(`decrementIcon`),t.class]},e.ptm(`pcDecrementButton`).icon,{"data-pc-group-section":`timepickerlabel`}),null,16,[`class`]))]})]}),_:3},16,[`class`,`aria-label`,`disabled`,`onKeydown`,`pt`])]})],16)):a(``,!0)],16,Zt)):a(``,!0),e.showButtonBar?(I(),i(`div`,j({key:2,class:e.cx(`buttonbar`)},e.ptm(`buttonbar`)),[he(e.$slots,`buttonbar`,{todayCallback:function(e){return s.onTodayButtonClick(e)},clearCallback:function(e){return s.onClearButtonClick(e)}},function(){return[he(e.$slots,`todaybutton`,{actionCallback:function(e){return s.onTodayButtonClick(e)},keydownCallback:function(e){return s.onContainerButtonKeydown(e)}},function(){return[x(u,j({label:s.todayLabel,onClick:t[53]||=function(e){return s.onTodayButtonClick(e)},class:e.cx(`pcTodayButton`),unstyled:e.unstyled,onKeydown:s.onContainerButtonKeydown},e.todayButtonProps,{pt:e.ptm(`pcTodayButton`),"data-pc-group-section":`button`}),null,16,[`label`,`class`,`unstyled`,`onKeydown`,`pt`])]}),he(e.$slots,`clearbutton`,{actionCallback:function(e){return s.onClearButtonClick(e)},keydownCallback:function(e){return s.onContainerButtonKeydown(e)}},function(){return[x(u,j({label:s.clearLabel,onClick:t[54]||=function(e){return s.onClearButtonClick(e)},class:e.cx(`pcClearButton`),unstyled:e.unstyled,onKeydown:s.onContainerButtonKeydown},e.clearButtonProps,{pt:e.ptm(`pcClearButton`),"data-pc-group-section":`button`}),null,16,[`label`,`class`,`unstyled`,`onKeydown`,`pt`])]})]})],16)):a(``,!0),he(e.$slots,`footer`)],16,zt)):a(``,!0)]}),_:3},16,[`onAfterEnter`,`onAfterLeave`,`onLeave`])]}),_:3},8,[`appendTo`,`disabled`])],16,It)}Ft.render=Qt;function $t(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let[n,r,i]=[Number(t[1]),Number(t[2]),Number(t[3])],a=new Date(n,r-1,i);return a.getFullYear()===n&&a.getMonth()===r-1&&a.getDate()===i?a:null}function en(e,t=new Date){let n=$t(e);if(!n)return null;let r=new Date(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((n.getTime()-r.getTime())/864e5)}function tn(e,t=new Date){let n=en(e,t);return n===null?null:n<0?`overdue`:n===0?`today`:n<=2?`soon`:`later`}function nn(e,t){let n=$t(e);return n?n.toLocaleDateString(t,{day:`2-digit`,month:`2-digit`,year:`numeric`}):e}function rn(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t=Math.imul(t^e.charCodeAt(n),16777619);t^=t>>>16,t=Math.imul(t,2246822507),t^=t>>>13,t=Math.imul(t,3266489909),t^=t>>>16;let n=(t>>>0)%360;return{background:`linear-gradient(135deg, hsl(${n} 62% 52%), hsl(${(n+40)%360} 62% 46%))`}}var an={class:`kb-card__top`},on={class:`kb-card__title`},sn={class:`kb-card__actions`},cn={key:0,class:`kb-card__groups`},ln={key:1,class:`kb-card__assignees`},un=[`title`],dn=[`src`,`onError`],fn={key:2,class:`kb-card__badges`},pn={key:1,class:`kb-card__prio`},mn={key:2,class:`pi pi-arrow-up`},hn={key:3,class:`kb-card__img-badge`},gn={key:4,class:`pi pi-align-left`},_n={key:5,class:`kb-card__img-badge`},vn={key:0,class:`pi pi-sparkles`},yn=[`src`],bn={key:1,class:`pi pi-comment`},xn=s(T({__name:`KanbanCardTile`,props:{card:{},t:{type:Function},avatarUrl:{type:Function},childCount:{},hasParent:{type:Boolean},currentUserId:{}},setup(e){let t=e,n=r(()=>{let e=t.card.assignees??[],n=t.currentUserId,r=n?e.findIndex(e=>e.id===n):-1;return r>0?[e[r],...e.slice(0,r),...e.slice(r+1)]:e}),o=r(()=>{let e=t.card.lastCommentBy;if(!e)return null;let n=e.author===`ai`;return!e.id&&!n?null:{id:e.id,ai:n,label:e.name||t.t(`card.lastCommentByAi`)}}),s=r(()=>{let e=t.card.deadline;if(!e)return null;let n=tn(e);return n?{label:nn(e),state:n}:null}),c=w(new Set);function l(e){return e.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)}return(e,r)=>{let d=Ce(`tooltip`);return I(),i(N,null,[R(`div`,an,[R(`span`,on,k(t.card.title),1),R(`div`,sn,[he(e.$slots,`actions`,{},void 0,!0)])]),t.card.groups?.length?(I(),i(`div`,cn,[(I(!0),i(N,null,F(t.card.groups,e=>(I(),i(`span`,{key:e,class:`kb-card__group`},k(e),1))),128))])):a(``,!0),t.card.assignees?.length?(I(),i(`div`,ln,[(I(!0),i(N,null,F(n.value,e=>(I(),i(`span`,{key:e.id,class:`kb-card__avatar`,style:Ne(u(rn)(e.id)),title:e.name},[t.avatarUrl&&!c.has(e.id)?(I(),i(`img`,{key:0,src:t.avatarUrl(e.id),alt:``,onError:t=>c.add(e.id)},null,40,dn)):(I(),i(N,{key:1},[P(k(l(e.name)),1)],64))],12,un))),128))])):a(``,!0),t.card.markdown||t.card.images.length||t.card.commentCount||t.childCount||t.hasParent||s.value||e.$slots.badges?(I(),i(`div`,fn,[s.value?z((I(),i(`span`,{key:0,class:O([`kb-card__deadline`,`kb-card__deadline--${s.value.state}`])},[r[1]||=R(`i`,{class:`pi pi-calendar`},null,-1),P(` `+k(s.value.label),1)],2)),[[d,t.t(`card.deadlineTooltip`),void 0,{bottom:!0}]]):a(``,!0),t.card.priority?z((I(),i(`span`,pn,[P(k(t.card.priority),1)])),[[d,t.t(`editor.priorityLabel`),void 0,{bottom:!0}]]):a(``,!0),t.hasParent?z((I(),i(`i`,mn,null,512)),[[d,t.t(`card.hasParent`),void 0,{bottom:!0}]]):a(``,!0),t.childCount?z((I(),i(`span`,hn,[r[2]||=R(`i`,{class:`pi pi-sitemap`},null,-1),P(` `+k(t.childCount),1)])),[[d,t.t(`card.hasChildren`),void 0,{bottom:!0}]]):a(``,!0),t.card.markdown?(I(),i(`i`,gn)):a(``,!0),t.card.images.length?(I(),i(`span`,_n,[r[3]||=R(`i`,{class:`pi pi-image`},null,-1),P(` `+k(t.card.images.length),1)])):a(``,!0),t.card.commentCount?z((I(),i(`span`,{key:6,class:O([`kb-card__img-badge kb-card__comments`,{"kb-card__comments--bubble":o.value}])},[o.value?(I(),i(`span`,{key:0,class:O([`kb-card__avatar kb-card__avatar--mini`,{"kb-card__avatar--ai":o.value.ai}]),style:Ne(o.value.id?u(rn)(o.value.id):void 0)},[o.value.ai&&!o.value.id?(I(),i(`i`,vn)):o.value.id&&t.avatarUrl&&!c.has(o.value.id)?(I(),i(`img`,{key:1,src:t.avatarUrl(o.value.id),alt:``,onError:r[0]||=e=>c.add(o.value.id)},null,40,yn)):(I(),i(N,{key:2},[P(k(l(o.value.label)),1)],64))],6)):(I(),i(`i`,bn)),P(` `+k(t.card.commentCount),1)],2)),[[d,o.value?t.t(`card.lastCommentBy`,{name:o.value.label}):void 0,void 0,{bottom:!0}]]):a(``,!0),he(e.$slots,`badges`,{},void 0,!0)])):a(``,!0)],64)}}}),[[`__scopeId`,`data-v-bded8d7d`]]);function Sn(e){let t=new Map;for(let n of e)n.createdBy&&!t.has(n.createdBy.id)&&t.set(n.createdBy.id,n.createdBy.name);return[...t].map(([e,t])=>({userId:e,name:t})).sort((e,t)=>e.name.localeCompare(t.name))}function Cn(e,t){return t.length?!!e.createdBy&&t.includes(e.createdBy.id):!0}function wn(e){return e?l.sanitize(_.parse(e,{async:!1}),{ALLOWED_TAGS:[`p`,`br`,`strong`,`em`,`del`,`code`,`pre`,`blockquote`,`ul`,`ol`,`li`,`h1`,`h2`,`h3`,`h4`,`a`,`span`],ALLOWED_ATTR:[`href`,`target`,`rel`,`class`]}):``}var Tn={key:0,class:`kb-files__thumb`},En=[`src`,`alt`],Dn={key:1,class:`pi pi-file kb-files__icon`},On=[`title`,`onClick`],kn=[`title`],An={class:`kb-files__size`},jn=[`title`,`onClick`],Mn=s(T({__name:`AttachmentList`,props:{files:{},preview:{},openable:{type:Boolean,default:!0},removable:{type:Boolean,default:!1},removeLabel:{default:``},compact:{type:Boolean,default:!1}},emits:[`open`,`remove`],setup(e,{emit:t}){let n=t;function r(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}return(t,o)=>e.files.length?(I(),i(`ul`,{key:0,class:O([`kb-files`,{"kb-files--inline":e.compact}])},[(I(!0),i(N,null,F(e.files,(t,s)=>(I(),i(`li`,{key:t.id,class:`kb-files__item`},[e.preview(t)?(I(),i(`span`,Tn,[R(`img`,{src:e.preview(t),alt:t.name},null,8,En)])):(I(),i(`i`,Dn)),e.openable?(I(),i(`button`,{key:2,class:`kb-files__name`,title:t.name,onClick:je(e=>n(`open`,t),[`stop`])},k(t.name),9,On)):(I(),i(`span`,{key:3,class:`kb-files__name kb-files__name--static`,title:t.name},k(t.name),9,kn)),R(`span`,An,k(r(t.size)),1),e.removable?(I(),i(`button`,{key:4,class:`kb-files__remove`,title:e.removeLabel,onClick:je(e=>n(`remove`,s),[`stop`])},[...o[0]||=[R(`i`,{class:`pi pi-times`},null,-1)]],8,jn)):a(``,!0)]))),128))],2)):a(``,!0)}}),[[`__scopeId`,`data-v-f30e50ba`]]),Nn=Uint8Array,Pn=Uint16Array,Fn=Int32Array,In=new Nn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ln=new Nn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Rn=new Nn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),zn=function(e,t){for(var n=new Pn(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new Fn(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},Bn=zn(In,2),Vn=Bn.b,Hn=Bn.r;Vn[28]=258,Hn[258]=28;var Un=zn(Ln,0),Wn=Un.b;Un.r;for(var Gn=new Pn(32768),Kn=0;Kn<32768;++Kn){var qn=(Kn&43690)>>1|(Kn&21845)<<1;qn=(qn&52428)>>2|(qn&13107)<<2,qn=(qn&61680)>>4|(qn&3855)<<4,Gn[Kn]=((qn&65280)>>8|(qn&255)<<8)>>1}for(var Jn=(function(e,t,n){for(var r=e.length,i=0,a=new Pn(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new Pn(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new Pn(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[Gn[d]>>c]=l}else for(s=new Pn(r),i=0;i<r;++i)e[i]&&(s[i]=Gn[o[e[i]-1]++]>>15-e[i]);return s}),Yn=new Nn(288),Kn=0;Kn<144;++Kn)Yn[Kn]=8;for(var Kn=144;Kn<256;++Kn)Yn[Kn]=9;for(var Kn=256;Kn<280;++Kn)Yn[Kn]=7;for(var Kn=280;Kn<288;++Kn)Yn[Kn]=8;for(var Xn=new Nn(32),Kn=0;Kn<32;++Kn)Xn[Kn]=5;var Zn=Jn(Yn,9,1),Qn=Jn(Xn,5,1),$n=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},er=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},tr=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},nr=function(e){return(e+7)/8|0},rr=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Nn(e.subarray(t,n))},ir=[`unexpected EOF`,`invalid block type`,`invalid length/literal`,`invalid distance`,`stream finished`,`no stream handler`,,`no callback`,`invalid UTF-8 data`,`extra field too long`,`date not in range 1980-2099`,`filename too long`,`stream finishing`,`invalid zip data`],ar=function(e,t,n){var r=Error(t||ir[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,ar),!n)throw r;return r},or=function(e,t,n,r){var i=e.length,a=r?r.length:0;if(!i||t.f&&!t.l)return n||new Nn(0);var o=!n,s=o||t.i!=2,c=t.i;o&&(n=new Nn(i*3));var l=function(e){var t=n.length;if(e>t){var r=new Nn(Math.max(t*2,e));r.set(n),n=r}},u=t.f||0,d=t.p||0,f=t.b||0,p=t.l,m=t.d,h=t.m,g=t.n,_=i*8;do{if(!p){u=er(e,d,1);var v=er(e,d+1,3);if(d+=3,v)if(v==1)p=Zn,m=Qn,h=9,g=5;else if(v==2){var y=er(e,d,31)+257,b=er(e,d+10,15)+4,x=y+er(e,d+5,31)+1;d+=14;for(var S=new Nn(x),C=new Nn(19),w=0;w<b;++w)C[Rn[w]]=er(e,d+w*3,7);d+=b*3;for(var T=$n(C),E=(1<<T)-1,D=Jn(C,T,1),w=0;w<x;){var O=D[er(e,d,E)];d+=O&15;var k=O>>4;if(k<16)S[w++]=k;else{var A=0,j=0;for(k==16?(j=3+er(e,d,3),d+=2,A=S[w-1]):k==17?(j=3+er(e,d,7),d+=3):k==18&&(j=11+er(e,d,127),d+=7);j--;)S[w++]=A}}var ee=S.subarray(0,y),te=S.subarray(y);h=$n(ee),g=$n(te),p=Jn(ee,h,1),m=Jn(te,g,1)}else ar(1);else{var k=nr(d)+4,ne=e[k-4]|e[k-3]<<8,M=k+ne;if(M>i){c&&ar(0);break}s&&l(f+ne),n.set(e.subarray(k,M),f),t.b=f+=ne,t.p=d=M*8,t.f=u;continue}if(d>_){c&&ar(0);break}}s&&l(f+131072);for(var re=(1<<h)-1,ie=(1<<g)-1,ae=d;;ae=d){var A=p[tr(e,d)&re],oe=A>>4;if(d+=A&15,d>_){c&&ar(0);break}if(A||ar(2),oe<256)n[f++]=oe;else if(oe==256){ae=d,p=null;break}else{var se=oe-254;if(oe>264){var w=oe-257,N=In[w];se=er(e,d,(1<<N)-1)+Vn[w],d+=N}var ce=m[tr(e,d)&ie],le=ce>>4;ce||ar(3),d+=ce&15;var te=Wn[le];if(le>3){var N=Ln[le];te+=tr(e,d)&(1<<N)-1,d+=N}if(d>_){c&&ar(0);break}s&&l(f+131072);var ue=f+se;if(f<te){var de=a-te,fe=Math.min(te,ue);for(de+f<0&&ar(3);f<fe;++f)n[f]=r[de+f]}for(;f<ue;++f)n[f]=n[f-te]}}t.l=p,t.p=ae,t.b=f,t.f=u,p&&(u=1,t.m=h,t.d=m,t.n=g)}while(!u);return f!=n.length&&o?rr(n,0,f):n.subarray(0,f)},sr=new Nn(0),cr=function(e,t){return e[t]|e[t+1]<<8},lr=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},ur=function(e,t){return lr(e,t)+lr(e,t+4)*4294967296};function dr(e,t){return or(e,{i:2},t&&t.out,t&&t.dictionary)}var fr=typeof TextDecoder<`u`&&new TextDecoder;try{fr.decode(sr,{stream:!0})}catch{}var pr=function(e){for(var t=``,n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:rr(e,n-1)};i?i==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function mr(e,t){if(t){for(var n=``,r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}else if(fr)return fr.decode(e);else{var i=pr(e),a=i.s,n=i.r;return n.length&&ar(8),a}}var hr=function(e,t){return t+30+cr(e,t+26)+cr(e,t+28)},gr=function(e,t,n){var r=cr(e,t+28),i=mr(e.subarray(t+46,t+46+r),!(cr(e,t+8)&2048)),a=t+46+r,o=lr(e,t+20),s=n&&o==4294967295?_r(e,a):[o,lr(e,t+24),lr(e,t+42)],c=s[0],l=s[1],u=s[2];return[cr(e,t+10),c,l,i,a+cr(e,t+30)+cr(e,t+32),u]},_r=function(e,t){for(;cr(e,t)!=1;t+=4+cr(e,t+2));return[ur(e,t+12),ur(e,t+4),ur(e,t+20)]};function vr(e,t){for(var n={},r=e.length-22;lr(e,r)!=101010256;--r)(!r||e.length-r>65558)&&ar(13);var i=cr(e,r+8);if(!i)return{};var a=lr(e,r+16),o=a==4294967295||i==65535;if(o){var s=lr(e,r-12);o=lr(e,s)==101075792,o&&(i=lr(e,s+32),a=lr(e,s+48))}for(var c=t&&t.filter,l=0;l<i;++l){var u=gr(e,a,o),d=u[0],f=u[1],p=u[2],m=u[3],h=u[4],g=u[5],_=hr(e,g);a=h,(!c||c({name:m,size:f,originalSize:p,compression:d}))&&(d?d==8?n[m]=dr(e.subarray(_,_+f),{out:new Nn(p)}):ar(14,`unknown compression type `+d):n[m]=rr(e,_,_+f))}return n}var yr=2e3,br=100,xr=5e3,Sr=300,Cr={csv:`sheet`,tsv:`sheet`,xlsx:`sheet`,xlsm:`sheet`,ods:`sheet`,docx:`doc`,odt:`doc`,pptx:`slides`,odp:`slides`},wr={"text/csv":`sheet`,"text/tab-separated-values":`sheet`,"application/csv":`sheet`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":`sheet`,"application/vnd.ms-excel.sheet.macroenabled.12":`sheet`,"application/vnd.oasis.opendocument.spreadsheet":`sheet`,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":`doc`,"application/vnd.oasis.opendocument.text":`doc`,"application/vnd.openxmlformats-officedocument.presentationml.presentation":`slides`,"application/vnd.oasis.opendocument.presentation":`slides`};function Tr(e,t){return Cr[t.toLowerCase().split(`.`).pop()??``]??wr[(e||``).toLowerCase().split(`;`)[0].trim()]??null}async function Er(e,t,n,r){let i=n.toLowerCase().split(`.`).pop()??``;if(i===`csv`||i===`tsv`)return Mr(new TextDecoder().decode(t),n);let a=vr(new Uint8Array(t)),o=a[`content.xml`];return o?zr(e,mr(o)):e===`doc`?{mode:`render`,render:e=>Dr(t,r,e)}:e===`slides`?Lr(a):Or(t,r)}async function Dr(e,t,n){let{renderAsync:r}=await _e(async()=>{let{renderAsync:e}=await import(`./docx-preview-D-jP_CCs.js`);return{renderAsync:e}},__vite__mapDeps([0,1,2]));await r(new Blob([e],{type:t}),n,void 0,{inWrapper:!0,breakPages:!0,renderAltChunks:!1,renderComments:!1,useBase64URL:!0}),Ar(n)}async function Or(e,t){let n=(await _e(async()=>{let{default:e}=await import(`./browser-D3d3061H.js`);return{default:e}},[])).default,r=await n(new Blob([e],{type:t})),i=!1,a=r.map((e,t)=>(e.data.length>yr&&(i=!0),{name:e.sheet||`Sheet${t+1}`,rows:e.data.slice(0,yr).map(e=>(e.length>br&&(i=!0),e.slice(0,br).map(kr)))}));if(!a.length)throw Error(`no worksheet`);return{mode:`sheet`,sheets:a,truncated:i}}function kr(e){if(e==null)return``;if(e instanceof Date){let t=e.toISOString();return t.endsWith(`T00:00:00.000Z`)?t.slice(0,10):t.slice(0,19).replace(`T`,` `)}if(typeof e==`object`)try{return JSON.stringify(e)??``}catch{return`[objet]`}return typeof e==`string`?e:String(e)}function Ar(e){for(let t of Array.from(e.querySelectorAll(`script, iframe, object, embed`)))t.remove();for(let t of Array.from(e.querySelectorAll(`*`)))for(let e of Array.from(t.attributes)){let n=e.name.toLowerCase();(n.startsWith(`on`)||/^(href|src|xlink:href)$/.test(n)&&/^\s*javascript:/i.test(e.value))&&t.removeAttribute(e.name)}}function jr(e){let t=e.slice(0,4096).split(/\r?\n/)[0]??``,n=[`,`,`;`,` `,`|`].map(e=>[e,t.split(e).length]);return n.sort((e,t)=>t[1]-e[1]),n[0][1]>1?n[0][0]:`,`}function Mr(e,t){let n=t.toLowerCase().endsWith(`.tsv`)?` `:jr(e),r=[],i=[],a=``,o=!1;for(let t=0;t<e.length;t+=1){let s=e[t];if(o){s===`"`?e[t+1]===`"`?(a+=`"`,t+=1):o=!1:a+=s;continue}if(s===`"`)o=!0;else if(s===n)i.push(a),a=``;else if(s===`
|
|
570
570
|
`||s===`\r`){if(s===`\r`&&e[t+1]===`
|
|
571
571
|
`&&(t+=1),i.push(a),a=``,r.push(i),i=[],r.length>=yr)break}else a+=s}(a||i.length)&&(i.push(a),r.push(i));let s=r.length>=yr;return{mode:`sheet`,sheets:[{name:t||`CSV`,rows:r.map(Nr)}],truncated:s}}function Nr(e){return e.length>br?e.slice(0,br):e}function Pr(e){let t=new DOMParser().parseFromString(e,`application/xml`);if(t.getElementsByTagName(`parsererror`).length)throw Error(`invalid XML`);return t}function Fr(e,t){return Array.from(e.getElementsByTagName(t))}function Ir(e,t){return Fr(e,t).map(e=>e.textContent??``).join(``)}function Lr(e){let t=Object.keys(e).filter(e=>/^ppt\/slides\/slide\d+\.xml$/.test(e)).sort((e,t)=>Rr(e)-Rr(t));if(!t.length)throw Error(`no slide`);let n=[];for(let r of t.slice(0,Sr)){let t=Fr(Pr(mr(e[r])),`a:p`).map(e=>Ir(e,`a:t`).trim()).filter(Boolean);n.push({title:t[0]??``,lines:t.slice(1)})}return{mode:`slides`,slides:n,truncated:t.length>Sr}}function Rr(e){return Number(/(\d+)\.xml$/.exec(e)?.[1]??0)}function zr(e,t){let n=Pr(t);return e===`sheet`?Vr(n):e===`doc`?Hr(n):Ur(n)}function Br(e,t,n){let r=Number(e.getAttribute(t)??`1`);return!Number.isFinite(r)||r<1?1:Math.min(r,n)}function Vr(e){let t=[],n=!1;for(let r of Fr(e,`table:table`)){let e=[];for(let t of Fr(r,`table:table-row`)){if(e.length>=yr){n=!0;break}let r=[];for(let e of Fr(t,`table:table-cell`)){if(r.length>=br){n=!0;break}let t=Fr(e,`text:p`).map(e=>e.textContent??``).join(`
|
|
572
|
-
`),i=Br(e,`table:number-columns-repeated`,br);for(let e=0;e<(t?i:1);e+=1)r.push(t)}for(;r.length&&r[r.length-1]===``;)r.pop();let i=Br(t,`table:number-rows-repeated`,yr);for(let t=0;t<(r.length?i:1);t+=1)e.push([...r])}for(;e.length&&e[e.length-1].length===0;)e.pop();t.push({name:r.getAttribute(`table:name`)||`Table${t.length+1}`,rows:e})}if(!t.length)throw Error(`no table`);return{mode:`sheet`,sheets:t,truncated:n}}function Hr(e){let t=e.getElementsByTagName(`office:text`)[0];if(!t)throw Error(`no text body`);let n=[],r=!1,i=e=>{for(let t of Array.from(e.children)){if(n.length>=xr){r=!0;return}let e=(t.textContent??``).trim();if(t.tagName===`text:h`)e&&n.push({type:`heading`,level:Math.min(6,Number(t.getAttribute(`text:outline-level`)??`1`)||1),text:e});else if(t.tagName===`text:p`)e&&n.push({type:`paragraph`,text:e});else if(t.tagName===`text:list`)for(let e of Fr(t,`text:list-item`)){let t=(e.textContent??``).trim();t&&n.push({type:`list`,text:t})}else t.tagName===`table:table`?n.push({type:`table`,rows:Fr(t,`table:table-row`).slice(0,yr).map(e=>Fr(e,`table:table-cell`).slice(0,br).map(e=>(e.textContent??``).trim()))}):t.children.length&&i(t)}};return i(t),{mode:`blocks`,blocks:n,truncated:r}}function Ur(e){let t=Fr(e,`draw:page`);if(!t.length)throw Error(`no slide`);return{mode:`slides`,slides:t.slice(0,Sr).map(e=>{let t=Fr(e,`text:p`).map(e=>(e.textContent??``).trim()).filter(Boolean);return{title:t[0]??``,lines:t.slice(1)}}),truncated:t.length>Sr}}var Wr={key:0,class:`kb-upload`},Gr={key:0,class:`kb-upload__list`},Kr=[`title`],qr={class:`kb-upload__bar`},Jr={class:`kb-upload__pct`},Yr={key:1,class:`kb-upload__status`},Xr={key:2,class:`kb-upload__errors`},Zr=u(M({__name:`UploadProgress`,props:{queue:{},errors:{},uploading:{type:Boolean,default:!1},uploadingLabel:{default:``}},setup(e){return(t,n)=>e.queue.length||e.errors.length||e.uploading&&!e.queue.length?(F(),x(`div`,Wr,[e.queue.length?(F(),x(`ul`,Gr,[(F(!0),x(a,null,z(e.queue,e=>(F(),x(`li`,{key:e.key},[L(`span`,{class:`kb-upload__name`,title:e.name},g(e.name),9,Kr),L(`span`,qr,[L(`span`,{class:`kb-upload__bar-fill`,style:ye({width:`${Math.round(e.ratio*100)}%`})},null,4)]),L(`span`,Jr,g(Math.round(e.ratio*100))+`%`,1)]))),128))])):e.uploading?(F(),x(`p`,Yr,g(e.uploadingLabel),1)):v(``,!0),e.errors.length?(F(),x(`ul`,Xr,[(F(!0),x(a,null,z(e.errors,(e,t)=>(F(),x(`li`,{key:t},g(e.name)+` — `+g(e.reason),1))),128))])):v(``,!0)])):v(``,!0)}}),[[`__scopeId`,`data-v-06e54521`]]);function Qr(e,t){let n=new Map(e.map(e=>[e.id,e])),r=[],i=new Set,a=t;for(;a&&n.has(a)&&!i.has(a);)i.add(a),r.unshift(a),a=n.get(a).parentId;return r}function $r(e,t){let n=[],r=new Map,i=[...e].sort((e,t)=>e.order-t.order||e.id.localeCompare(t.id));for(let e of i){let i=n;for(let n of Qr(t,e.groupId)){let e=r.get(n);e||(e={kind:`group`,id:n,children:[]},r.set(n,e),i.push(e)),i=e.children}i.push({kind:`column`,id:e.id,children:[]})}let a=e=>{let i=r.get(e.id);if(i)return i;let o={kind:`group`,id:e.id,children:[]};r.set(e.id,o);let s=e.parentId?t.find(t=>t.id===e.parentId):void 0;return(s?a(s).children:n).push(o),o};for(let e of t)Qr(t,e.id).length&&a(e);return n}function ei(e){return e.flatMap(e=>e.kind===`column`?[e.id]:ei(e.children))}function ti(e,t,n,r){let i=$r(e,t),a=e=>{let t=e.findIndex(e=>e.id===n);if(t!==-1){let n=t+r;if(n<0||n>=e.length)return!1;let[i]=e.splice(t,1);return e.splice(n,0,i),!0}return e.some(e=>e.kind===`group`&&a(e.children))};return a(i)?ei(i):null}var ni={class:`kg-lead`},ri={key:0,class:`kg-create`},ii={class:`kg-tree`},ai={key:0,class:`kg-empty`},oi=[`draggable`,`onDragstart`,`onDragover`,`onDrop`],si={key:2,class:`kg-row__title`},ci={key:3,class:`kg-row__count`},li={key:4,class:`kg-row__actions`},ui=[`onClick`],di={class:`kg-loose__label`},fi={key:0,class:`kg-empty`},pi=[`draggable`,`onDragstart`],mi={class:`kg-row__title`},hi=u(M({__name:`KanbanColumnGroups`,props:{visible:{type:Boolean},columns:{},groups:{},readOnly:{type:Boolean},t:{type:Function}},emits:[`update:visible`,`intent`],setup(e,{emit:n}){let r=e,i=n,o=xe(),s=r.t,c=[`#f97316`,`#22c55e`,`#3b82f6`,`#a855f7`,`#ec4899`,`#64748b`],l=t(()=>new Map(r.groups.map(e=>[e.id,e])));function u(e){return r.columns.filter(t=>(t.groupId&&l.value.has(t.groupId)?t.groupId:void 0)===e)}function d(e){return r.groups.filter(t=>(t.parentId??void 0)===e)}function f(e){return u(e).length+d(e).reduce((e,t)=>e+f(t.id),0)}let m=t(()=>$r(r.columns,r.groups)),h=t(()=>{let e=[],t=(n,i)=>{for(let a of n){if(a.kind===`column`){if(i===0)continue;let t=r.columns.find(e=>e.id===a.id);t&&e.push({kind:`column`,id:t.id,title:t.title,depth:i});continue}let n=l.value.get(a.id);n&&(e.push({kind:`group`,id:n.id,title:n.title,color:n.color,depth:i,columnCount:f(n.id)}),t(a.children,i+1))}};return t(m.value,0),e});function y(e,t){let n=ti(r.columns,r.groups,e,t);n&&i(`intent`,{kind:`columns-reorder`,columnIds:n})}function b(e,t){return ti(r.columns,r.groups,e,t)!==null}let C=t(()=>u(void 0)),w=j(``);function T(){let e=w.value.trim();e&&(i(`intent`,{kind:`group-add`,title:e,color:c[r.groups.length%c.length]}),w.value=``)}let E=j(null);function D(e){e.kind===`group`&&(E.value={id:e.id,title:e.title})}function A(){let e=E.value;if(!e)return;let t=e.title.trim(),n=l.value.get(e.id);t&&n&&t!==n.title&&i(`intent`,{kind:`group-update`,groupId:e.id,patch:{title:t}}),E.value=null}function ee(e,t){let n=l.value.get(e)?.color;i(`intent`,{kind:`group-update`,groupId:e,patch:{color:n===t?null:t}})}function te(e){e.kind===`group`&&o.require({message:s(`groups.deleteConfirm`,{title:e.title}),header:s(`groups.deleteHeader`),icon:`pi pi-exclamation-triangle`,acceptClass:`p-button-danger`,accept:()=>i(`intent`,{kind:`group-delete`,groupId:e.id})})}let M=j(null),N=j(null);function re(e,t,n){r.readOnly||(M.value={kind:e,id:t},n.dataTransfer?.setData(`text/plain`,t),n.dataTransfer&&(n.dataTransfer.effectAllowed=`move`))}function P(e,t){if(!e)return!1;if(e.kind===`column`||t===null)return!0;let n=t,r=new Set;for(;n&&!r.has(n);){if(n===e.id)return!1;r.add(n),n=l.value.get(n)?.parentId}return!0}function ie(e){let t=e.relatedTarget;t&&e.currentTarget.contains(t)||(N.value=null)}function ae(e,t){P(M.value,e)&&(t.preventDefault(),N.value=e??`root`)}function oe(e){let t=r.columns.find(t=>t.id===e)?.groupId;return t&&l.value.has(t)?t:null}function se(e){let t=M.value,n=P(t,e);N.value=null,M.value=null,!(!t||!n)&&i(`intent`,{kind:`group-assign`,member:t,groupId:e})}function ce(){i(`update:visible`,!1)}return(t,n)=>(F(),_(S(ne),{visible:e.visible,header:S(s)(`groups.title`),modal:!0,style:{width:`540px`},"onUpdate:visible":ce},{default:O(()=>[L(`p`,ni,g(S(s)(`groups.lead`)),1),e.readOnly?v(``,!0):(F(),x(`div`,ri,[B(S(Le),{modelValue:w.value,"onUpdate:modelValue":n[0]||=e=>w.value=e,placeholder:S(s)(`groups.newPlaceholder`),class:`kg-create__input`,onKeyup:Fe(T,[`enter`])},null,8,[`modelValue`,`placeholder`]),B(S(p),{label:S(s)(`groups.create`),icon:`pi pi-plus`,size:`small`,onClick:T},null,8,[`label`])])),L(`div`,ii,[h.value.length?v(``,!0):(F(),x(`div`,ai,g(S(s)(`groups.empty`)),1)),(F(!0),x(a,null,z(h.value,t=>(F(),x(`div`,{key:`${t.kind}-${t.id}`,class:R([`kg-row`,{"kg-row--group":t.kind===`group`,"kg-row--target":N.value===t.id}]),style:ye({paddingLeft:`${t.depth*1.25}rem`}),draggable:!e.readOnly,onDragstart:e=>re(t.kind,t.id,e),onDragover:e=>ae(t.kind===`group`?t.id:oe(t.id),e),onDragleave:ie,onDrop:k(e=>se(t.kind===`group`?t.id:oe(t.id)),[`prevent`]),onDragend:n[2]||=e=>{M.value=null,N.value=null}},[L(`i`,{class:R([t.kind===`group`?`pi pi-folder`:`pi pi-list`,`kg-row__icon`])},null,2),t.kind===`group`?(F(),x(`span`,{key:0,class:`kg-swatch`,style:ye({background:t.color||`var(--p-text-muted-color)`})},null,4)):v(``,!0),E.value&&E.value.id===t.id?(F(),_(S(Le),{key:1,modelValue:E.value.title,"onUpdate:modelValue":n[1]||=e=>E.value.title=e,class:`kg-row__rename`,autofocus:``,onKeyup:Fe(A,[`enter`]),onBlur:A},null,8,[`modelValue`])):(F(),x(`span`,si,g(t.title),1)),t.kind===`group`?(F(),x(`span`,ci,g(S(s)(`groups.columnCount`,{count:t.columnCount})),1)):v(``,!0),e.readOnly?v(``,!0):(F(),x(`div`,li,[B(S(p),{icon:`pi pi-chevron-up`,text:``,size:`small`,disabled:!b(t.id,-1),"aria-label":S(s)(`groups.moveUp`),class:`kg-move`,onClick:e=>y(t.id,-1)},null,8,[`disabled`,`aria-label`,`onClick`]),B(S(p),{icon:`pi pi-chevron-down`,text:``,size:`small`,disabled:!b(t.id,1),"aria-label":S(s)(`groups.moveDown`),class:`kg-move`,onClick:e=>y(t.id,1)},null,8,[`disabled`,`aria-label`,`onClick`]),t.kind===`group`?(F(),x(a,{key:0},[(F(),x(a,null,z(c,e=>L(`span`,{key:e,class:R([`kg-dot`,{"kg-dot--on":t.color===e}]),style:ye({background:e}),onClick:n=>ee(t.id,e)},null,14,ui)),64)),B(S(p),{icon:`pi pi-pencil`,text:``,size:`small`,onClick:e=>D(t)},null,8,[`onClick`]),B(S(p),{icon:`pi pi-trash`,text:``,size:`small`,severity:`danger`,onClick:e=>te(t)},null,8,[`onClick`])],64)):v(``,!0)]))],46,oi))),128))]),L(`div`,{class:R([`kg-loose`,{"kg-row--target":N.value===`root`}]),onDragover:n[4]||=e=>ae(null,e),onDragleave:ie,onDrop:n[5]||=k(e=>se(null),[`prevent`])},[L(`div`,di,g(S(s)(`groups.loose`)),1),C.value.length?v(``,!0):(F(),x(`div`,fi,g(S(s)(`groups.looseEmpty`)),1)),(F(!0),x(a,null,z(C.value,t=>(F(),x(`div`,{key:t.id,class:`kg-row`,draggable:!e.readOnly,onDragstart:e=>re(`column`,t.id,e),onDragend:n[3]||=e=>{M.value=null,N.value=null}},[n[6]||=L(`i`,{class:`pi pi-list kg-row__icon`},null,-1),L(`span`,mi,g(t.title),1)],40,pi))),128))],34)]),_:1},8,[`visible`,`header`]))}}),[[`__scopeId`,`data-v-48711454`]]),gi=[[`second`,60],[`minute`,60],[`hour`,24],[`day`,7],[`week`,4.35],[`month`,12],[`year`,1/0]];function _i(e,t,n=new Date){let r=new Date(e).getTime();if(Number.isNaN(r))return null;let i=Math.min(0,(r-n.getTime())/1e3),a=new Intl.RelativeTimeFormat(t,{numeric:`auto`});for(let[e,t]of gi){if(Math.abs(i)<t)return a.format(Math.round(i),e);i/=t}return null}var vi={class:`cc`},yi={key:0,class:`cc__empty`},bi={class:`cc__head`},xi=[`aria-expanded`,`aria-controls`,`onClick`],Si={class:`cc__head-text`},Ci={class:`cc__title`},wi={class:`cc__sub`},Ti={key:0,class:`cc__last`},Ei=[`datetime`],Di={class:`cc__origin`},Oi={key:1,class:`cc__pending`,role:`status`},ki={class:`cc__actions`},Ai=[`href`,`title`],ji={class:`cc__out-label`},Mi={key:0,class:`cc__elsewhere`},Ni=[`onClick`],Pi=[`id`],Fi=[`onClick`],Ii={class:`cc__thread`},Li={key:0,class:`cc__msg-head`},Ri={class:`cc__avatar`,"aria-hidden":`true`},zi={class:`cc__author`},Bi={class:`cc__role`},Vi=[`datetime`],Hi={class:`cc__bubble`},Ui=[`innerHTML`],Wi={key:2,class:`cc__missing`},Gi={key:3,class:`cc__missing`},Ki=6,qi=u(M({__name:`CardConversationsPanel`,props:{t:{type:Function},conversations:{},canEdit:{type:Boolean},locale:{},resync:{type:Function},preview:{type:Function}},emits:[`unlink`,`open-card`,`open-file`],setup(e,{emit:n}){let r=e,i=n,o=r.t;function s(e){if(e)try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`?t.toString():void 0}catch{return}}let c=t(()=>r.canEdit&&r.resync!==void 0),l=te(new Set);async function u(e){if(!(!r.resync||l.has(e))){l.add(e);try{await r.resync(e)}finally{l.delete(e)}}}let d=te(new Map);function f(e){return d.get(e)??r.conversations.length===1}function m(e){d.set(e,!f(e))}let h=te(new Set);Ie(()=>r.conversations.map(e=>e.id).join(`|`),()=>{for(let e of d.keys())r.conversations.some(t=>t.id===e)||d.delete(e)});function y(e){let t=[];e.opening&&t.push({key:`${e.id}:opening`,author:e.opening.author,body:e.opening.body,internal:!1,sentAt:null,attachments:e.opening.attachments,missingAttachments:e.opening.missingAttachments});for(let n of e.messages)t.push({key:`${e.id}:${n.id}`,author:n.author,body:n.body,internal:n.internal,sentAt:n.sentAt,attachments:n.attachments,missingAttachments:n.missingAttachments});return t.map((e,n)=>{let r=t[n-1];return{...e,followup:!!(r&&r.author.name===e.author.name&&r.author.role===e.author.role&&r.internal===e.internal)}})}function b(e){return e.messages.length+(e.opening?1:0)}function C(e){return h.has(e.id)?0:Math.max(0,y(e).length-Ki)}function T(e){let t=y(e),n=C(e);return n?t.slice(n).map((e,t)=>t===0?{...e,followup:!1}:e):t}function E(e){return e.messages.at(-1)?.sentAt??e.updatedAt??null}function D(e){let t=e.trim().split(/\s+/).filter(Boolean);return((t[0]?.[0]??``)+(t.length>1?t.at(-1)[0]:``)).toUpperCase()||`?`}function O(e){return new Date(e).toLocaleString(r.locale,{day:`numeric`,month:`short`,hour:`2-digit`,minute:`2-digit`})}function k(e){return _i(e,r.locale)??O(e)}return(t,n)=>(F(),x(`div`,vi,[e.conversations.length?v(``,!0):(F(),x(`p`,yi,g(S(o)(`conversations.empty`)),1)),(F(!0),x(a,null,z(e.conversations,t=>(F(),x(`article`,{key:t.id,class:R([`cc__conv`,{"cc__conv--open":f(t.id)}])},[L(`header`,bi,[L(`button`,{type:`button`,class:`cc__toggle`,"aria-expanded":f(t.id),"aria-controls":`cc-thread-${t.id}`,onClick:e=>m(t.id)},[n[5]||=L(`i`,{class:`pi pi-chevron-right cc__chevron`,"aria-hidden":`true`},null,-1),L(`span`,Si,[L(`span`,Ci,g(t.title),1),L(`span`,wi,[L(`span`,{class:R([`cc__state`,`cc__state--${t.state}`])},[n[1]||=L(`span`,{class:`cc__dot`,"aria-hidden":`true`},null,-1),w(g(S(o)(`conversations.state.${t.state}`)),1)],2),L(`span`,null,g(S(o)(`conversations.messages`,{count:b(t)})),1),E(t)?(F(),x(`span`,Ti,[n[2]||=w(`· `,-1),L(`time`,{datetime:E(t)},g(k(E(t))),9,Ei)])):v(``,!0),L(`span`,Di,`· `+g(S(o)(`conversations.origin.${t.origin}`)),1),t.filesPending?(F(),x(`span`,Oi,[n[3]||=w(` · `,-1),n[4]||=L(`i`,{class:`pi pi-spin pi-spinner`,"aria-hidden":`true`},null,-1),w(` `+g(S(o)(`conversations.filesPending`)),1)])):v(``,!0)])])],8,xi),L(`div`,ki,[s(t.url)?(F(),x(`a`,{key:0,href:s(t.url),target:`_blank`,rel:`noopener noreferrer`,class:`cc__out`,title:S(o)(`conversations.openAtProviderHint`,{name:S(o)(`conversations.providers.${t.provider}`)})},[n[6]||=L(`i`,{class:`pi pi-external-link`,"aria-hidden":`true`},null,-1),L(`span`,ji,g(S(o)(`conversations.openAtProvider`)),1)],8,Ai)):v(``,!0),c.value?(F(),_(S(p),{key:1,icon:`pi pi-sync`,text:``,rounded:``,size:`small`,severity:`secondary`,loading:l.has(t.id),"aria-label":S(o)(`conversations.resync`),title:S(o)(`conversations.resync`),onClick:e=>u(t.id)},null,8,[`loading`,`aria-label`,`title`,`onClick`])):v(``,!0),e.canEdit?(F(),_(S(p),{key:2,icon:`pi pi-times`,text:``,rounded:``,size:`small`,severity:`secondary`,"aria-label":S(o)(`conversations.unlink`),title:S(o)(`conversations.unlink`),onClick:e=>i(`unlink`,t.id)},null,8,[`aria-label`,`title`,`onClick`])):v(``,!0)])]),t.otherCards.length?(F(),x(`p`,Mi,[n[7]||=L(`i`,{class:`pi pi-link`,"aria-hidden":`true`},null,-1),w(` `+g(S(o)(`conversations.alsoOn`))+` `,1),(F(!0),x(a,null,z(t.otherCards,e=>(F(),x(`button`,{key:e.cardId,type:`button`,class:`cc__card-link`,onClick:t=>i(`open-card`,{boardId:e.boardId,cardId:e.cardId})},g(e.title),9,Ni))),128))])):v(``,!0),f(t.id)?(F(),x(`div`,{key:1,id:`cc-thread-${t.id}`,class:`cc__thread-wrap`},[C(t)>0?(F(),x(`button`,{key:0,type:`button`,class:`cc__earlier`,onClick:e=>h.add(t.id)},[n[8]||=L(`i`,{class:`pi pi-angle-up`,"aria-hidden":`true`},null,-1),w(` `+g(S(o)(`conversations.showEarlier`,{count:C(t)})),1)],8,Fi)):v(``,!0),L(`ol`,Ii,[(F(!0),x(a,null,z(T(t),r=>(F(),x(`li`,{key:r.key,class:R([`cc__msg`,[`cc__msg--${r.author.role}`,{"cc__msg--internal":r.internal,"cc__msg--followup":r.followup}]])},[r.followup?v(``,!0):(F(),x(`div`,Li,[L(`span`,Ri,g(D(r.author.name)),1),L(`strong`,zi,g(r.author.name),1),L(`span`,Bi,g(r.internal?S(o)(`conversations.internal`):S(o)(`conversations.role.${r.author.role}`)),1),r.sentAt?(F(),x(`time`,{key:0,datetime:r.sentAt,class:`cc__time`},g(O(r.sentAt)),9,Vi)):v(``,!0)])),L(`div`,Hi,[r.body?(F(),x(`div`,{key:0,class:`cc__body`,innerHTML:S(wn)(r.body)},null,8,Ui)):v(``,!0),r.attachments.length?(F(),_(Mn,{key:1,files:r.attachments,preview:e.preview,compact:``,onOpen:n[0]||=e=>i(`open-file`,e)},null,8,[`files`,`preview`])):v(``,!0),r.missingAttachments.length&&t.filesPending?(F(),x(`p`,Wi,[n[9]||=L(`i`,{class:`pi pi-spin pi-spinner`,"aria-hidden":`true`},null,-1),w(` `+g(S(o)(`conversations.filesPendingNames`,{names:r.missingAttachments.join(`, `)})),1)])):r.missingAttachments.length?(F(),x(`p`,Gi,[n[10]||=L(`i`,{class:`pi pi-exclamation-circle`,"aria-hidden":`true`},null,-1),w(` `+g(S(o)(`conversations.missingFiles`,{names:r.missingAttachments.join(`, `)})),1)])):v(``,!0)])],2))),128))])],8,Pi)):v(``,!0)],2))),128))]))}}),[[`__scopeId`,`data-v-4a8523a2`]]),Ji={class:`cl`},Yi={class:`cl__search`},Xi={key:0,class:`cl__empty`},Zi={key:1,class:`cl__results`},Qi={class:`cl__hit-main`},$i={key:0,class:`cl__preview`},ea={key:1,class:`cl__elsewhere`},ta=[`onClick`],na=u(M({__name:`ConversationLinkDialog`,props:{t:{type:Function},visible:{type:Boolean},providerLabel:{},integrations:{},cardId:{},linkedIds:{},search:{type:Function},link:{type:Function}},emits:[`close`,`linked`,`open-card`],setup(e,{emit:t}){let n=e,r=t,i=n.t,o=j(``);Ie(()=>n.integrations,e=>{e.some(e=>e.id===o.value)||(o.value=e[0]?.id??``)},{immediate:!0});let s=j(``),c=j([]),l=j(!1),u=j(!1),d=j(null);Ie(()=>[n.visible,n.cardId],()=>{s.value=``,c.value=[],u.value=!1});async function f(){if(!(!s.value.trim()||!o.value)){l.value=!0;try{c.value=await n.search(o.value,s.value.trim()),u.value=!0}finally{l.value=!1}}}function m(e){return e.linkedCards.filter(e=>e.cardId!==n.cardId)}async function h(e){d.value=e.id;try{await n.link(e.connectionId,e.externalId)&&r(`linked`)}finally{d.value=null}}return(t,n)=>(F(),_(S(ne),{visible:e.visible,modal:``,header:S(i)(`conversations.linkTitle`,{name:e.providerLabel}),style:{width:`min(40rem, 95vw)`},"onUpdate:visible":n[2]||=e=>{e||r(`close`)}},{default:O(()=>[L(`div`,Ji,[e.integrations.length?(F(),x(a,{key:0},[L(`div`,Yi,[e.integrations.length>1?(F(),_(S(ke),{key:0,modelValue:o.value,"onUpdate:modelValue":n[0]||=e=>o.value=e,options:e.integrations,"option-label":`name`,"option-value":`id`,class:`cl__connection`},null,8,[`modelValue`,`options`])):v(``,!0),B(S(Le),{modelValue:s.value,"onUpdate:modelValue":n[1]||=e=>s.value=e,placeholder:S(i)(`conversations.searchPlaceholder`),class:`cl__query`,autofocus:``,onKeydown:Fe(k(f,[`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`]),B(S(p),{label:S(i)(`conversations.search`),icon:`pi pi-search`,size:`small`,loading:l.value,disabled:!s.value.trim(),onClick:f},null,8,[`label`,`loading`,`disabled`])]),u.value&&!c.value.length&&!l.value?(F(),x(`p`,Xi,g(S(i)(`conversations.noResults`)),1)):v(``,!0),c.value.length?(F(),x(`ul`,Zi,[(F(!0),x(a,null,z(c.value,t=>(F(),x(`li`,{key:t.id,class:`cl__hit`},[L(`div`,Qi,[L(`strong`,null,g(t.title),1),L(`span`,{class:R([`cl__state`,`cl__state--${t.state}`])},g(S(i)(`conversations.state.${t.state}`)),3),t.preview?(F(),x(`p`,$i,g(t.preview),1)):v(``,!0),m(t).length?(F(),x(`p`,ea,[w(g(S(i)(`conversations.alsoOn`))+` `,1),(F(!0),x(a,null,z(m(t),e=>(F(),x(`button`,{key:e.cardId,type:`button`,class:`cl__card-link`,onClick:t=>r(`open-card`,{boardId:e.boardId,cardId:e.cardId})},g(e.title),9,ta))),128))])):v(``,!0)]),e.linkedIds.includes(t.id)?(F(),_(S(p),{key:0,label:S(i)(`conversations.linked`),size:`small`,severity:`secondary`,disabled:``},null,8,[`label`])):(F(),_(S(p),{key:1,label:S(i)(`conversations.link`),icon:`pi pi-link`,size:`small`,loading:d.value===t.id,onClick:e=>h(t)},null,8,[`label`,`loading`,`onClick`]))]))),128))])):v(``,!0)],64)):v(``,!0)])]),_:1},8,[`visible`,`header`]))}}),[[`__scopeId`,`data-v-cf4bf84b`]]),ra={class:`kb-header`},ia={class:`kb-header__search`},aa={key:1,class:`kb-header__search-more`},oa={key:1,class:`kb-header__readonly`},sa={class:`kb-boardwrap`},ca={class:`kb-band__title`},la={class:`kb-band__count`},ua=[`data-col-id`,`onPointerdown`,`onTouchstart`],da=[`title`,`onClick`],fa={class:`kb-col__count`},pa={key:0,class:`pi pi-bell kb-col__bell--on`},ma={key:1,class:`kb-col__header`},ha=[`value`,`readonly`,`onBlur`],ga={class:`kb-col__header-right`},_a={key:1,class:`pi pi-check-circle kb-col__done`},va={class:`kb-col__count`},ya=[`onClick`],ba={key:3,class:`kb-col__cards`},xa=[`data-card-id`,`onPointerdown`,`onTouchstart`,`onClick`],Sa=[`onClick`],Ca=[`onClick`],wa={key:0,class:`kb-col__empty`},Ta=[`onClick`],Ea={class:`kb-subscribe__lead`},Da={class:`kb-subscribe__legend`},Oa={class:`kb-subscribe__options`},ka={class:`kb-subscribe__option`},Aa={class:`kb-subscribe__legend`},ja={class:`kb-subscribe__options`},Ma={class:`kb-subscribe__no`},Na={class:`kb-subscribe__legend`},Pa={class:`kb-subscribe__options`},Fa={class:`kb-subscribe__channels`},Ia={key:1,class:`kb-subscribe__channels`},La={class:`kb-tpl-intro`},Ra={class:`kb-tpl-list`},za=[`onClick`],Ba={key:0,class:`kb-add-col`},Va={key:0,class:`kb-add-col__form`},Ha={class:`kb-add-col__actions`},Ua={class:`kb-filters__body`},Wa={class:`kb-filters__section`},Ga={class:`kb-side__label`},Ka={class:`kb-ops`},qa=[`onClick`],Ja={key:0,class:`kb-prio`},Ya={class:`kb-prio__value`},Xa={key:1,class:`kb-side__hint`},Za={class:`kb-filters__section`},Qa={class:`kb-side__label`},$a={class:`kb-colors`},eo=[`onClick`],to={class:`kb-filters__section`},no={class:`kb-side__label`},ro={key:0,class:`pi pi-ban`},io={class:`kb-filters__section`},ao={class:`kb-side__label`},oo={key:0,class:`pi pi-ban`},so={key:0,class:`kb-filters__section`},co={class:`kb-side__label`},lo={class:`kb-filters__section`},uo={class:`kb-side__label`},fo={key:0,class:`pi pi-ban`},po={key:1,class:`kb-link__col`},mo={class:`kb-side__hint`},ho={class:`kb-archive__hint`},go={class:`kb-archive__search`},_o={key:0,class:`kb-archive__empty`},vo={key:1,class:`kb-archive__empty`},yo={key:2,class:`kb-archive__empty`},bo={key:0,class:`kb-archive__filtered`},xo={key:1,class:`kb-archive__filtered`},So={class:`kb-archive__list`},Co=[`onClick`],wo=[`onClick`],To={class:`kb-archive__meta`},Eo={key:0},Do={key:1},Oo={key:0,class:`kb-dialog`},ko={class:`kb-dialog__main`},Ao={key:0,class:`kb-dialog__archived`},jo={class:`kb-dialog__edit-content`},Mo={class:`kb-dialog__field`},No={for:`kanban-card-title`,class:`kb-dialog__label`},Po={class:`kb-dialog__field`},Fo={for:`kanban-card-content`,class:`kb-dialog__label`},Io={class:`kb-dialog__field`},Lo={for:`kanban-card-images`,class:`kb-dialog__label`},Ro={key:0,class:`kb-dialog__images`},zo=[`src`],Bo=[`onClick`],Vo={key:1,class:`kb-dialog__upload`},Ho={class:`kb-rel`},Uo={key:0,class:`kb-rel__section`},Wo={class:`kb-rel__title`},Go={key:0,class:`kb-rel__table`},Ko={class:`kb-rel__people`},qo={class:`kb-rel__num`},Jo={class:`kb-rel__actions-col`},Yo={class:`kb-rel__card`},Xo={class:`kb-rel__board`},Zo={class:`kb-rel__people`},Qo={key:0,class:`kb-card__assignees`},$o=[`title`],es=[`src`,`onError`],ts={key:1,class:`kb-rel__none`},ns={class:`kb-rel__num`},rs={class:`kb-rel__actions-col`},is=[`title`],as=[`title`],os={key:1,class:`kb-rel__empty`},ss={class:`kb-coloption`},cs={class:`kb-link__col`},ls={key:1,class:`kb-rel__section`},us={class:`kb-rel__title`},ds={key:0,class:`kb-rel__table`},fs={class:`kb-rel__people`},ps={class:`kb-rel__num`},ms={class:`kb-rel__actions-col`},hs={class:`kb-rel__card`},gs={class:`kb-rel__board`},_s={class:`kb-rel__people`},vs={key:0,class:`kb-card__assignees`},ys=[`title`],bs=[`src`,`onError`],xs={key:1,class:`kb-rel__none`},Ss={class:`kb-rel__num`},Cs={class:`kb-rel__actions-col`},ws=[`title`,`onClick`],Ts=[`title`,`onClick`],Es={key:1,class:`kb-rel__empty`},Ds={class:`kb-coloption`},Os={class:`kb-link__col`},ks={key:2,class:`kb-rel__empty`},As={class:`kb-comments`},js={key:0,class:`kb-comments__empty`},Ms={key:1,class:`kb-comments__list`},Ns=[`onClick`],Ps={key:0,class:`pi pi-sparkles`},Fs=[`src`,`onError`],Is={key:3,class:`pi pi-user`},Ls={class:`kb-comments__body`},Rs={class:`kb-comments__meta`},zs={class:`kb-comments__author`},Bs={class:`kb-comments__time`},Vs={key:0,class:`kb-comments__edited`},Hs={key:1,class:`kb-comments__tools`},Us=[`title`,`onClick`],Ws=[`title`,`onClick`],Gs={class:`kb-comments__actions`},Ks=[`onClick`,`innerHTML`],qs=[`onClick`],Js=[`onKeydown`],Ys={class:`kb-comments__actions`},Xs=[`title`],Zs={class:`kb-comments__hint`},Qs={class:`kb-history`},$s={key:0,class:`kb-history__empty`},ec={key:1,class:`kb-history__timeline`},tc=[`onClick`],nc={class:`kb-history__icon`},rc={class:`kb-history__body`},ic={class:`kb-history__label`},ac={key:0,class:`pi pi-external-link`,style:{"font-size":`0.625rem`,"margin-left":`0.25rem`}},oc={key:0,class:`kb-history__detail`},sc={class:`kb-history__time`},cc={class:`kb-side`},lc={class:`kb-side__block kb-side__meta`},uc={key:0},dc={class:`kb-side__group kb-side__group--where`},fc={key:0,class:`kb-side__block`},pc={class:`kb-side__label`},mc={key:1,class:`kb-archived-pick`},hc={key:2,class:`kb-side__hint`},gc={key:1,class:`kb-side__block`},_c={class:`kb-side__label`},vc=[`aria-label`],yc={class:`kb-colgroup__label`},bc={class:`kb-coloption`},xc={key:0,class:`pi pi-arrow-right kb-coloption__away`},Sc={key:2,class:`kb-side__block`},Cc={class:`kb-side__label`},wc=[`aria-label`],Tc=[`title`],Ec=[`src`,`onError`],Dc={class:`kb-assignee`},Oc=[`src`,`onError`],kc={class:`kb-side__group kb-side__group--plan`},Ac={class:`kb-side__block`},jc={class:`kb-side__label`},Mc={key:0,class:`kb-prio__value`},Nc={key:0,class:`kb-prio`},Pc=[`title`],Fc={key:2,class:`kb-side__hint`},Ic={class:`kb-side__block`},Lc={class:`kb-side__label`},Rc={class:`kb-deadline`},zc=[`title`],Bc={key:0,class:`kb-side__hint`},Vc={class:`kb-side__group kb-side__group--tags`},Hc={class:`kb-side__block`},Uc={class:`kb-side__label`},Wc=[`aria-label`],Gc={class:`kb-groups__option`},Kc={class:`kb-side__block`},qc={class:`kb-side__label`},Jc=[`aria-label`],Yc={class:`kb-colors`},Xc=[`disabled`],Zc=[`disabled`,`onClick`],Qc={class:`kb-side__group kb-side__group--links`},$c={key:0,class:`kb-side__block`},el={class:`kb-side__label`},tl={class:`kb-tree`},nl={key:0,class:`pi pi-angle-right kb-tree__branch`},rl=[`title`,`onClick`],il={class:`kb-tree__label`},al={key:1,class:`kb-side__block`},ol={class:`kb-side__label`},sl={class:`kb-convs`},cl=[`aria-label`,`onClick`],ll={class:`kb-convs__count`},ul={key:1,class:`kb-convs__name`},dl={key:2,class:`kb-side__block`},fl={class:`kb-side__label`},pl={class:`kb-side__convs`},ml=[`title`,`onClick`],hl={class:`kb-side__conv-label`},gl={key:3,class:`kb-side__block`},_l={class:`kb-side__label`},vl={class:`kb-side__actions`},yl={key:0,class:`kb-side__block kb-side__danger`},bl={class:`kb-dialog__footer`},xl={key:0,class:`kb-dialog__unsaved`},Sl={key:0,class:`kb-viewer`},Cl=[`src`,`alt`],wl=[`src`,`title`],Tl=[`src`],El=[`src`],Dl={key:4,class:`kb-viewer__office`},Ol={key:0,class:`kb-viewer__tabs`},kl=[`onClick`],Al={class:`kb-viewer__scroll`},jl={key:0,class:`kb-viewer__table`},Ml={key:1,class:`kb-viewer__empty`},Nl={key:5,class:`kb-viewer__office`},Pl={class:`kb-viewer__scroll kb-viewer__doc`},Fl={key:0},Il={key:1},Ll={key:2},Rl={key:3,class:`kb-viewer__li`},zl={key:4,class:`kb-viewer__table`},Bl={key:5},Vl={key:0,class:`kb-viewer__empty`},Hl={key:6,class:`kb-viewer__office`},Ul={class:`kb-viewer__scroll kb-viewer__slides`},Wl={class:`kb-viewer__slide-no`},Gl={key:0},Kl={key:7,class:`kb-viewer__office`},ql={key:0,class:`kb-viewer__empty`},Jl={key:8,class:`kb-viewer__text`},Yl={key:9,class:`kb-viewer__truncated`},Xl={key:0,class:`kb-colmenu`},Zl={class:`kb-colmenu__host`},Ql=`\0void`,$l=26,eu=512*1024,tu=55*1024*1024,nu=5*1024*1024,ru=400,iu=8,au=5,ou=60,su=12,cu=u(M({__name:`KanbanBoard`,props:{columns:{},columnGroups:{default:()=>[]},name:{},readOnly:{type:Boolean,default:!1},t:{},resolveConversationId:{type:Function,default:void 0},currentUserId:{default:void 0},members:{default:()=>[]},avatarUrl:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},fetchAttachment:{type:Function,default:void 0},columnSubscriptions:{default:void 0},teams:{default:()=>[]},manageableTeamIds:{default:void 0},columnTeamSubscriptions:{default:()=>({})},deleteAttachment:{type:Function,default:void 0},templates:{default:()=>[]},loadHistory:{type:Function,default:void 0},histories:{default:void 0},addComment:{type:Function,default:void 0},editComment:{type:Function,default:void 0},removeComment:{type:Function,default:void 0},moveCard:{type:Function,default:void 0},otherBoards:{default:()=>[]},moveCardToBoard:{type:Function,default:void 0},cardLinks:{default:()=>[]},linkedCards:{default:()=>[]},setCardParent:{type:Function,default:void 0},conversationIntegrations:{default:()=>[]},cardConversations:{default:()=>({})},loadConversations:{type:Function,default:void 0},searchConversations:{type:Function,default:void 0},linkConversation:{type:Function,default:void 0},unlinkConversation:{type:Function,default:void 0},resyncConversation:{type:Function,default:void 0},archivedCards:{default:()=>[]},loadingArchive:{type:Boolean,default:!1},archiveTruncated:{type:Boolean,default:!1},searchMatches:{default:null},searchTruncated:{type:Boolean,default:!1}},emits:[`intent`,`back`,`open-conversation`,`card-open`,`update-column-subscription`,`open-linked-card`,`load-archive`,`search-cards`],setup(e,{expose:n,emit:i}){let s=e,c=t(()=>s.loadHistory!==void 0),l=i,u=xe(),d=s.t;function f(){if(crypto.randomUUID)return crypto.randomUUID();let e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function m(e){return JSON.parse(JSON.stringify(e))}let h=j(m(s.columns));Ie(()=>s.columns,e=>{h.value=m(e),an()});function y(e,t){h.value=e,t&&l(`intent`,t)}let b=j(``),C=j(!1),T=j(``),E=t(()=>[...h.value].sort((e,t)=>e.order-t.order).map(e=>({...e,cards:[...e.cards].sort((e,t)=>e.order-t.order)}))),D=j(!1),A=j(`gte`),M=j(null),N=j([]),re=j([]),P=j([]),ie=j([]),ae=j(!1),se=j(!1),ce=j(!1),le=j([]),ue=t(()=>{let e=new Set;for(let t of le.value){for(let n of hn(t,`up`))e.add(n);for(let n of hn(t,`down`))e.add(n)}return e}),de=t(()=>M.value!==null||A.value===`none`),fe=t(()=>(de.value?1:0)+(N.value.length?1:0)+(re.value.length||ae.value?1:0)+(P.value.length||se.value?1:0)+(ie.value.length?1:0)+(le.value.length||ce.value?1:0));function me(){M.value=null,A.value=`gte`,N.value=[],re.value=[],P.value=[],ie.value=[],le.value=[],ae.value=!1,se.value=!1,ce.value=!1}function he(e){if(A.value===`none`){if(e.priority!==void 0)return!1}else if(M.value!==null){let t=e.priority;if(t===void 0||A.value===`eq`&&t!==M.value||A.value===`gte`&&t<M.value||A.value===`lte`&&t>M.value)return!1}if(N.value.length&&!N.value.includes(e.color??``))return!1;let t=e.groups??[];if(re.value.length||ae.value){let e=re.value.length&&t.some(e=>re.value.includes(e)),n=ae.value&&t.length===0;if(!e&&!n)return!1}let n=e.assignees??[];if(P.value.length||se.value){let e=P.value.length&&n.some(e=>P.value.includes(e.id)),t=se.value&&n.length===0;if(!e&&!t)return!1}if(!Cn(e,ie.value))return!1;if(le.value.length||ce.value){let t=le.value.length&&ue.value.has(e.id),n=ce.value&&!un(e.id)&&dn(e.id).length===0;if(!t&&!n)return!1}return!0}let _e=t({get:()=>ae.value?[Ql,...re.value]:re.value,set:e=>{ae.value=e.includes(Ql),re.value=e.filter(e=>e!==Ql)}}),be=t(()=>[Ql,...bt.value]),Se=t({get:()=>se.value?[Ql,...P.value]:P.value,set:e=>{se.value=e.includes(Ql),P.value=e.filter(e=>e!==Ql)}}),Ce=t(()=>!Bn.value&&!!s.currentUserId&&s.members.some(e=>e.userId===s.currentUserId)&&!_t.value.includes(s.currentUserId));function we(){s.currentUserId&&!_t.value.includes(s.currentUserId)&&(_t.value=[..._t.value,s.currentUserId])}let Te=t(()=>[{userId:Ql,name:d(`filters.noAssignees`)},...s.members]),De=t({get:()=>ce.value?[Ql,...le.value]:le.value,set:e=>{ce.value=e.includes(Ql),le.value=e.filter(e=>e!==Ql)}}),Oe=t(()=>Sn([...E.value.flatMap(e=>e.cards),...s.archivedCards])),Ae=t(()=>[{id:Ql,title:d(`filters.noFamily`),column:``},...E.value.flatMap(e=>e.cards.map(t=>({id:t.id,title:t.title,column:e.title}))),...s.archivedCards.map(e=>({id:e.id,title:e.title,column:d(`archive.title`)}))]),je=t(()=>{let e=s.searchMatches,t=fe.value>0;return!e&&!t?E.value:E.value.map(n=>({...n,cards:n.cards.filter(n=>(!e||e.has(n.id))&&(!t||he(n)))}))}),Me=j(!1),Ne=t(()=>new Map((s.columnGroups??[]).map(e=>[e.id,e])));function Re(e){let t=[],n=new Set,r=e;for(;r&&Ne.value.has(r)&&!n.has(r);)n.add(r),t.unshift(r),r=Ne.value.get(r).parentId;return t}let Ve=t(()=>{let e=new Map;for(let t of je.value)Re(t.groupId).forEach((n,r)=>{let i=Ne.value.get(n),a=e.get(n)??{id:n,title:i.title,color:i.color,depth:r,colIds:[]};a.colIds.push(t.id),e.set(n,a)});return[...e.values()]}),Ue=t(()=>Ve.value.length?(Math.max(...Ve.value.map(e=>e.depth))+1)*$l:0),Xe=j(null),Ze=j([]);function Qe(){let e=Xe.value;if(!e||!Ve.value.length){Ze.value=[];return}Ze.value=Ve.value.flatMap(t=>{let n=t.colIds.map(t=>e.querySelector(`[data-col-id="${CSS.escape(t)}"]`)).filter(e=>e!==null);if(!n.length)return[];let r=Math.min(...n.map(e=>e.offsetLeft)),i=Math.max(...n.map(e=>e.offsetLeft+e.offsetWidth)),a=n.reduce((e,t)=>e+(je.value.find(e=>e.id===t.dataset.colId)?.cards.length??0),0);return[{id:t.id,title:t.title,color:t.color,top:t.depth*$l,left:r,width:i-r,count:a}]})}let $e=null;ve(()=>{if(Qe(),typeof ResizeObserver<`u`&&Xe.value){$e=new ResizeObserver(()=>Qe()),$e.observe(Xe.value);for(let e of Xe.value.querySelectorAll(`.kb-col`))$e.observe(e)}}),pe(()=>$e?.disconnect()),Ie(()=>[je.value.map(e=>`${e.id}:${e.groupId??``}:${e.cards.length}`).join(`|`),s.columnGroups],()=>{oe(()=>{if(Qe(),!(!$e||!Xe.value))for(let e of Xe.value.querySelectorAll(`.kb-col`))$e.observe(e)})},{deep:!0});function et(e){return h.value.find(t=>t.id===e)?.title??``}function tt(e,t,n){e.history=[...e.history??[],{type:t,timestamp:new Date().toISOString(),detail:n}]}function nt(){if(s.readOnly||!T.value.trim())return;let e=T.value.trim();y([...h.value,{id:f(),title:e,order:h.value.length,cards:[]}],{kind:`column-add`,title:e}),T.value=``,C.value=!1}function rt(e){if(s.readOnly)return;let t=h.value.find(t=>t.id===e);if(!t)return;let n=!t.done;y(h.value.map(t=>t.id===e?{...t,done:n||void 0}:t),{kind:`column-set-done`,columnId:e,done:n})}function it(e){if(s.readOnly)return;let t=h.value.find(t=>t.id===e);u.require({message:d(`column.confirmDeleteMessage`,{title:t?.title??``,count:t?.cards.length??0}),header:d(`column.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>y(h.value.filter(t=>t.id!==e),{kind:`column-delete`,columnId:e})})}function at(e,t){s.readOnly||!t.trim()||y(h.value.map(n=>n.id===e?{...n,title:t.trim()}:n),{kind:`column-rename`,columnId:e,title:t.trim()})}let V=j(null),ot=j(``),ct=j(``),lt=j([]),ut=j([]),dt=j(!1),ft=j([]),pt=j([]),mt=0,ht=j([]),gt=te(new Map),_t=j([]),vt=j([]),yt=j([]),bt=t(()=>{let e=new Set;for(let t of h.value)for(let n of t.cards)for(let t of n.groups??[])e.add(t);for(let t of s.archivedCards)for(let n of t.groups??[])e.add(n);return[...e].sort((e,t)=>e.localeCompare(t))});function xt(e){let t=e.query.trim(),n=new Set(vt.value),r=bt.value.filter(e=>!n.has(e)&&(!t||e.toLowerCase().includes(t.toLowerCase()))),i=bt.value.some(e=>e.toLowerCase()===t.toLowerCase());yt.value=t&&!i&&!n.has(t)?[t,...r]:r}let St=j(null),Ct=j(null),wt=t(()=>{let e=Tt(Ct.value),t=e?en(e):null;return t===null?``:t<0?d(`editor.deadlineOverdue`,{count:-t}):t===0?d(`editor.deadlineToday`):d(`editor.deadlineIn`,{count:t})});function Tt(e){if(!e)return null;let t=e=>String(e).padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function Et(e){if(!e)return null;let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r,12)}function Dt(){s.readOnly||(St.value=5)}function Ot(e){let t=e.trim();!t||vt.value.includes(t)||(vt.value=[...vt.value,t])}let kt=j(!1);function At(e){let t=e.target?.closest(`.p-autocomplete`)?.querySelector(`input`);return t instanceof HTMLInputElement?t:null}function jt(){kt.value=!0}function Mt(e){let t=At(e);if(t){if(e.type===`keydown`){if(t.getAttribute(`aria-activedescendant`))return;Nt(t);return}kt.value=!1,setTimeout(()=>{if(kt.value){kt.value=!1,t.value=``;return}Nt(t)},0)}}function Nt(e){e.value.trim()&&(Ot(e.value),e.value=``)}let Pt=j(``),It=[`#ef4444`,`#f97316`,`#eab308`,`#22c55e`,`#06b6d4`,`#3b82f6`,`#8b5cf6`,`#ec4899`],Lt=j(``),Rt=j(`edit`),zt=j(``),Bt=j([]),Vt=j(null),Ht=j(null),Ut=j(null),Wt=j(``);async function Gt(){await oe(),Ht.value?.scrollIntoView({block:`end`})}Ie(V,e=>l(`card-open`,e));let Kt=j(null),qt=j(`bottom`);function Jt(e,t=`bottom`){if(!s.readOnly){if(qt.value=t,s.templates.length===0){Xt(e,``);return}Kt.value=e}}function Yt(e){let t=Kt.value;Kt.value=null,t&&Xt(t,e?.content??``)}function Xt(e,t){let n=h.value.find(t=>t.id===e);if(!n)return;let r=new Date().toISOString();Zt(e,{id:f(),title:d(`card.defaultTitle`),markdown:t,images:[],order:qt.value===`top`?0:n.cards.length,...c.value?{}:{history:[{type:`created`,timestamp:r,detail:d(`card.inColumn`,{name:et(e)})}]},createdAt:r,updatedAt:r})}function Zt(e,t){if(mr(),V.value={colId:e,card:{...t,history:[...t.history??[]]}},s.loadHistory&&Rn(t.id)){let n=s.histories?.[t.id];n&&(V.value={colId:e,card:{...t,history:n}}),s.loadHistory(t.id)}s.loadConversations&&Rn(t.id)&&s.loadConversations(t.id),ot.value=t.title,ct.value=t.markdown??``,lt.value=[...t.images],ut.value=[...t.attachments??[]],ft.value=[],ht.value=[],zt.value=``,Bt.value=[],pr(ut.value),pr((t.history??[]).flatMap(e=>e.attachments??[])),_t.value=(t.assignees??[]).map(e=>e.id),Pt.value=t.color??``,vt.value=[...t.groups??[]],St.value=t.priority??null,Ct.value=Et(t.deadline),Lt.value=e,Rt.value=`edit`}Ie(()=>V.value?s.histories?.[V.value.card.id]:void 0,e=>{let t=V.value;!e||!t||t.card.history===e||(V.value={colId:t.colId,card:{...t.card,history:e}},pr(e.flatMap(e=>e.attachments??[])))});let Qt=t(()=>{let e=V.value;return e?!Rn(e.card.id):!1}),$t=t(()=>{let e=V.value;if(!e)return!1;if(Qt.value)return!0;let t=e.card,n=(e,t)=>JSON.stringify(e)===JSON.stringify(t);return ot.value!==t.title||ct.value!==(t.markdown??``)||Lt.value!==e.colId||!n(lt.value,t.images)||!n(ut.value,t.attachments??[])||!n(_t.value,(t.assignees??[]).map(e=>e.id))||Pt.value!==(t.color??``)||!n(vt.value,t.groups??[])||St.value!==(t.priority??null)||Tt(Ct.value)!==(t.deadline??null)}),tn=t(()=>$t.value||zt.value.trim().length>0||Bt.value.length>0||Ut.value!==null);function nn(){if(!tn.value){sn();return}u.require({message:d(`editor.confirmDiscardMessage`),header:d(`editor.confirmDiscardHeader`),icon:`pi pi-exclamation-triangle`,acceptClass:`p-button-danger`,acceptLabel:d(`editor.discard`),rejectLabel:d(`editor.keepEditing`),accept:()=>sn()})}function an(){let e=V.value;if(!e)return;let t=h.value.flatMap(e=>e.cards).find(t=>t.id===e.card.id)??Ln.value.get(e.card.id);if(!t)return;if(!$t.value){let n=h.value.find(e=>e.cards.some(e=>e.id===t.id))?.id??e.colId;V.value={colId:n,card:{...t,history:e.card.history}},ot.value=t.title,ct.value=t.markdown??``,lt.value=[...t.images],ut.value=[...t.attachments??[]],_t.value=(t.assignees??[]).map(e=>e.id),Pt.value=t.color??``,vt.value=[...t.groups??[]],St.value=t.priority??null,Ct.value=Et(t.deadline),Lt.value=n}if(t.history===void 0)return;let n=V.value;if(!n)return;let r=e=>`${e.type}|${e.timestamp}|${e.detail??``}`,i=new Set((t.history??[]).map(r)),a=[...t.history??[],...(n.card.history??[]).filter(e=>!i.has(r(e)))].sort((e,t)=>e.timestamp.localeCompare(t.timestamp));V.value={colId:n.colId,card:{...n.card,history:a}}}function on(){let e=ht.value;if(ht.value=[],s.deleteAttachment)for(let t of e)s.deleteAttachment(t)}function sn(){V.value=null,Br(),kr(),mr(),on()}function cn(){if(Bn.value||!V.value)return;let{colId:e,card:t}=V.value,n=ot.value||d(`card.untitled`),r=c.value?[]:[...t.history??[]],i=()=>new Date().toISOString();!c.value&&n!==t.title&&t.title!==d(`card.defaultTitle`)&&r.push({type:`title_changed`,timestamp:i(),detail:`"${t.title}" → "${n}"`}),!c.value&&ct.value!==t.markdown&&r.push({type:`edited`,timestamp:i()});let a=c.value?0:lt.value.length-t.images.length;a>0?r.push({type:`image_added`,timestamp:i(),detail:`${a} image(s) added`}):a<0&&r.push({type:`image_removed`,timestamp:i(),detail:`${Math.abs(a)} image(s) removed`});let o=_t.value.map(e=>({id:e,name:s.members.find(t=>t.userId===e)?.name??e})),u=c.value?[]:o.filter(e=>!(t.assignees??[]).some(t=>t.id===e.id));u.length&&r.push({type:`edited`,timestamp:i(),detail:d(`editor.assignedDetail`,{names:u.map(e=>e.name).join(`, `)})});let f=[...new Set(vt.value.map(e=>e.trim()).filter(Boolean))],{color:p,priority:m,groups:g,deadline:_,...v}=t,b={...v,title:n,markdown:ct.value,images:lt.value,attachments:ut.value,assignees:o,...Pt.value?{color:Pt.value}:{},...f.length?{groups:f}:{},...St.value===null?{}:{priority:St.value},...Tt(Ct.value)?{deadline:Tt(Ct.value)}:{},history:c.value?t.history:r,updatedAt:i()},x=Lt.value||e;!c.value&&x!==e&&r.push({type:`moved`,timestamp:i(),detail:`${et(e)} → ${et(x)}`});let S=!Rn(b.id),C=S?{kind:`card-add`,columnId:x,card:b,placement:qt.value}:{kind:`card-update`,cardId:b.id,patch:{title:b.title,markdown:b.markdown,priority:b.priority??null,color:b.color??null,deadline:b.deadline??null,groups:b.groups??[],assignees:o.map(e=>e.id),attachments:b.attachments,images:b.images}};!S&&x!==e&&l(`intent`,{kind:`card-move`,cardId:b.id,toColumnId:x}),y(h.value.map(t=>{if(t.id===e&&x!==e)return{...t,cards:t.cards.filter(e=>e.id!==b.id)};if(t.id!==x)return t;if(t.cards.some(e=>e.id===b.id))return{...t,cards:t.cards.map(e=>e.id===b.id?b:e)};let n=qt.value===`top`?[b,...t.cards]:[...t.cards,b];return{...t,cards:n.map((e,t)=>({...e,order:t}))}}),C),ht.value=[],V.value={colId:x,card:b},Lt.value=x}function ln(e,t){for(let n of h.value){let r=n.cards.find(e=>e.id===t);if(r)return{cardId:t,boardId:e,title:r.title,boardName:d(`editor.relationsHereBoard`),columnTitle:n.title,here:!0,assignees:r.assignees??[],commentCount:r.commentCount??(r.history??[]).filter(e=>e.type===`comment`).length}}let n=s.linkedCards.find(n=>n.cardId===t&&n.boardId===e);return n?{cardId:t,boardId:e,title:n.title,boardName:n.boardName,columnTitle:n.columnTitle,here:!1,assignees:n.assignees??[],commentCount:n.commentCount??0}:null}function un(e){return s.cardLinks.find(t=>t.childCardId===e)}function dn(e){return s.cardLinks.filter(t=>t.parentCardId===e)}function fn(e){return dn(e).length}let pn=t(()=>{let e=V.value;if(!e)return null;let t=un(e.card.id);return t?ln(t.parentBoardId,t.parentCardId):null}),mn=t(()=>{let e=V.value;return e?dn(e.card.id).flatMap(e=>{let t=ln(e.childBoardId,e.childCardId);return t?[t]:[]}):[]});function hn(e,t){let n=new Set([e]),r=[e];for(let e=0;e<r.length&&e<=s.cardLinks.length;e+=1){let i=t===`down`?dn(r[e]).map(e=>e.childCardId):[un(r[e])?.parentCardId].filter(e=>!!e);for(let e of i)n.has(e)||(n.add(e),r.push(e))}return n}function gn(e){return E.value.flatMap(t=>t.cards.filter(t=>!e.has(t.id)).map(e=>({id:e.id,title:e.title,column:t.title})))}let _n=t(()=>{let e=V.value;return e?gn(hn(e.card.id,`down`)):[]}),vn=t(()=>{let e=V.value;if(!e)return[];let t=hn(e.card.id,`up`);for(let n of dn(e.card.id))t.add(n.childCardId);return gn(t)});function yn(e){let t=V.value;!t||Bn.value||!s.setCardParent||s.setCardParent(t.card.id,e)}function bn(e){let t=V.value;!t||!e||Bn.value||!s.setCardParent||s.setCardParent(e,t.card.id)}function Tn(e){Bn.value||!s.setCardParent||s.setCardParent(e,null)}let En=t(()=>!Bn.value&&s.setCardParent!==void 0&&!!V.value&&h.value.some(e=>e.cards.some(e=>e.id===V.value?.card.id))),Dn=t(()=>{let e=V.value;if(!e)return[];let t=[],n=new Set([e.card.id]),r=e.card.id;for(let e=0;e<=s.cardLinks.length;e+=1){let e=un(r);if(!e||n.has(e.parentCardId))break;let i=ln(e.parentBoardId,e.parentCardId);if(!i)break;n.add(e.parentCardId),t.push(i),r=e.parentCardId}return t.reverse()}),On=t(()=>(pn.value?1:0)+mn.value.length);function kn(e,t){for(let t of h.value){let n=t.cards.find(t=>t.id===e);if(n){Zt(t.id,n);return}}t&&l(`open-linked-card`,{boardId:t,cardId:e})}let An=t(()=>{let e=E.value.map(e=>({id:e.id,title:e.title,boardId:``})),t=[{label:d(`editor.columnGroupHere`),items:e}];if(!Bn.value&&s.moveCardToBoard)for(let e of s.otherBoards)e.columns.length&&t.push({label:e.name,items:e.columns.map(t=>({id:`${e.id}:${t.id}`,title:t.title,boardId:e.id}))});return t});function jn(e){let[t,n]=e.includes(`:`)?e.split(`:`):[``,e];if(!t){Lt.value=n??``;return}let r=V.value,i=s.otherBoards.find(e=>e.id===t),a=i?.columns.find(e=>e.id===n);Bn.value||!r||!i||!a||!s.moveCardToBoard||u.require({message:d(`editor.moveToBoardConfirm`,{board:i.name,column:a.title}),header:d(`editor.moveToBoardHeader`),icon:`pi pi-arrow-right-arrow-left`,accept:()=>{let e=r.card.id;sn(),s.moveCardToBoard?.(e,t,a.id)}})}let Nn=j(!1),Pn=j(``),Fn=j(``),In=t(()=>[{id:``,title:d(`archive.allColumns`)},...h.value.map(e=>({id:e.id,title:e.title}))]),Ln=t(()=>new Map(s.archivedCards.map(e=>[e.id,e])));function Rn(e){return h.value.some(t=>t.cards.some(t=>t.id===e))||Ln.value.has(e)?!0:!!(V.value?.card.id===e&&V.value.card.archivedAt)}let zn=t(()=>!!(V.value&&(V.value.card.archivedAt||Ln.value.has(V.value.card.id)))),Bn=t(()=>s.readOnly||zn.value),Vn=t(()=>V.value?s.cardConversations[V.value.card.id]??[]:[]),Hn=t(()=>[...new Set(Vn.value.map(e=>e.provider))].sort()),Un=t(()=>!V.value||!Rn(V.value.card.id)?[]:[...new Set(s.conversationIntegrations.map(e=>e.provider))].sort()),Wn=j(null);Ie(Hn,e=>{Rt.value.startsWith(`conv-`)&&!e.includes(Rt.value.slice(5))&&(Rt.value=`edit`)});function Gn(){let e=Wn.value;Wn.value=null,e&&(Rt.value=`conv-${e}`)}let Kn=t(()=>!Bn.value&&s.linkConversation!==void 0&&s.searchConversations!==void 0);Ie(Vn,e=>{let t=e.flatMap(e=>[...e.opening?.attachments??[],...e.messages.flatMap(e=>e.attachments)]);t.length&&pr(t)});function qn(e){return Vn.value.filter(t=>t.provider===e)}function Jn(e){return s.conversationIntegrations.filter(t=>t.provider===e)}function Yn(e,t){return s.searchConversations?s.searchConversations(e,t):Promise.resolve([])}function Xn(e,t){let n=V.value?.card.id;return n&&s.linkConversation?s.linkConversation(n,e,t):Promise.resolve(!1)}function Zn(e){let t=V.value?.card.id;return t&&s.resyncConversation?s.resyncConversation(t,e):Promise.resolve(!1)}function Qn(e){let t=V.value?.card.id;t&&s.unlinkConversation&&s.unlinkConversation(t,e)}function $n(e){Zt(e.archivedFrom?.columnId??``,e)}let er=t(()=>fe.value?s.archivedCards.filter(he):s.archivedCards),tr=t(()=>s.archivedCards.length-er.value.length),nr=null;function rr(){Nn.value=!0,l(`load-archive`,Pn.value,Fn.value)}Ie(Pn,e=>{Nn.value&&(nr&&clearTimeout(nr),nr=setTimeout(()=>l(`load-archive`,e,Fn.value),250))}),Ie(Fn,e=>{Nn.value&&(nr&&clearTimeout(nr),l(`load-archive`,Pn.value,e))});let ir=null;Ie(b,e=>{if(ir&&clearTimeout(ir),!e.trim()){l(`search-cards`,``);return}ir=setTimeout(()=>l(`search-cards`,e),250)}),pe(()=>{ir&&clearTimeout(ir),nr&&clearTimeout(nr)});function ar(e,t){s.readOnly||(y(h.value.map(n=>n.id===e?{...n,cards:n.cards.filter(e=>e.id!==t)}:n),{kind:`card-archive`,cardId:t}),V.value?.card.id===t&&sn())}let or=j(null);Ie(()=>V.value?.card.id,()=>{or.value=null});function sr(e,t){if(s.readOnly)return;let n=h.value.find(e=>e.id===t);if(!n)return;let r=new Date().toISOString(),i={id:f(),title:e.title,markdown:e.markdown,order:n.cards.reduce((e,t)=>Math.max(e,t.order),-1)+1,createdAt:r,updatedAt:r,history:[],images:[],...e.priority===void 0?{}:{priority:e.priority},...e.groups?.length?{groups:[...e.groups]}:{},...e.color?{color:e.color}:{},...e.deadline?{deadline:e.deadline}:{}};y(h.value.map(e=>e.id===t?{...e,cards:[...e.cards,i]}:e),{kind:`card-add`,columnId:t,card:i,placement:`bottom`})}function cr(e,t){if(!s.readOnly){if(t){l(`intent`,{kind:`card-unarchive`,cardId:e,toColumnId:t});return}l(`intent`,{kind:`card-unarchive`,cardId:e})}}function lr(e,t){if(s.readOnly)return;let n=h.value.find(t=>t.id===e)?.cards.find(e=>e.id===t);u.require({message:d(`editor.confirmDeleteMessage`,{title:n?.title??``}),header:d(`editor.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>{y(h.value.map(n=>n.id===e?{...n,cards:n.cards.filter(e=>e.id!==t)}:n),{kind:`card-delete`,cardId:t}),sn()}})}function ur(){if(Bn.value||!V.value||!zt.value.trim()&&!Bt.value.length)return;let{colId:e,card:t}=V.value,n=Bt.value;if(s.addComment){let e=zt.value.trim(),r=t.id;zt.value=``,ht.value=ht.value.filter(e=>!n.some(t=>t.id===e.id)),Bt.value=[],s.addComment(r,e,n.length?{attachments:n}:{}).then(t=>{t||(zt.value.trim()||(zt.value=e),Bt.value=[...n,...Bt.value])});return}}let dr=/^image\/(png|jpeg|webp|gif)$/;function fr(e){return gt.get(e.id)}async function pr(e){if(s.fetchAttachment)for(let t of e){if(!dr.test(t.contentType)||gt.has(t.id))continue;let e=await s.fetchAttachment(t);e&>.set(t.id,e)}}function mr(){for(let e of gt.values())URL.revokeObjectURL(e);gt.clear()}let hr=/^video\/(mp4|webm|ogg)$/,gr=/^audio\/(mpeg|mp3|ogg|wav|x-wav|webm)$/,_r=/^(text\/|application\/(json|xml|xhtml\+xml|javascript|x-yaml|yaml)$)/;function vr(e){let t=e.contentType||``;if(dr.test(t))return`image`;if(t===`application/pdf`)return`pdf`;if(hr.test(t))return`video`;if(gr.test(t))return`audio`;let n=Tr(t,e.name);return n?e.size<=20971520?n:null:_r.test(t)&&e.size<=eu?`text`:null}let yr=j(null),br=j(0),xr=t(()=>{let e=yr.value?.office;return e?.mode===`sheet`?e.sheets[br.value]??e.sheets[0]??null:null}),Sr=j(null),Cr=j(!1);Ie([()=>yr.value?.office,Sr],async([e,t])=>{if(!(!t||e?.mode!==`render`)){t.replaceChildren(),Cr.value=!1;try{await e.render(t)}catch{Cr.value=!0}}});async function wr(e){let t=vr(e),n=gt.get(e.id),r=n??await s.fetchAttachment?.(e)??null;if(!r){ft.value=[...ft.value,{name:e.name,reason:d(`editor.downloadFailed`)}];return}if(!t){Dr(r,e.name,!n);return}let i,a;if(t===`text`)try{i=await(await fetch(r)).text()}catch{Dr(r,e.name,!n);return}else if(t===`sheet`||t===`doc`||t===`slides`)try{a=await Er(t,await(await fetch(r)).arrayBuffer(),e.name,e.contentType||``)}catch{Dr(r,e.name,!n);return}kr(),br.value=0,yr.value={file:e,url:r,kind:t,text:i,office:a,cached:!!n}}function Dr(e,t,n){let r=document.createElement(`a`);r.href=e,r.download=t||`file`,r.rel=`noopener`,document.body.appendChild(r),r.click(),r.remove(),n&&setTimeout(()=>URL.revokeObjectURL(e),6e4)}function Or(){let e=yr.value;e&&Dr(e.url,e.file.name,!1)}function kr(){let e=yr.value;yr.value=null,e&&!e.cached&&URL.revokeObjectURL(e.url)}function Ar(e){ut.value=ut.value.filter((t,n)=>n!==e)}let jr=te(new Set);function Mr(e){return e.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)}let Nr=t(()=>s.members.map(e=>({id:e.userId,label:e.name})));function Pr(e){return s.members.find(t=>t.userId===e)?.name??e}function Fr(e){return!!s.currentUserId&&e.authorUser?.id===s.currentUserId}function Ir(e){return e.author===`ai`?null:e.authorUser?.id??null}function Lr(e){return e.author===`ai`?d(`comments.authorAi`):Fr(e)?d(`comments.authorYou`):e.authorUser?.name??d(`comments.authorYou`)}function Rr(e){if(!V.value)return;let{colId:t,card:n}=V.value;V.value={colId:t,card:{...n,history:e}},y(h.value.map(r=>r.id===t?{...r,cards:r.cards.map(t=>t.id===n.id?{...t,history:e}:t)}:r))}function zr(e){Ut.value=e.id??null,Wt.value=e.detail??``}function Br(){Ut.value=null,Wt.value=``}function Vr(){let e=Ut.value,t=Wt.value.trim();if(Bn.value||!e||!t||!V.value)return;let{card:n}=V.value,r=(n.history??[]).map(n=>n.id===e?{...n,detail:t,editedAt:new Date().toISOString()}:n);if(s.editComment){let i=(n.history??[]).find(t=>t.id===e);s.editComment(n.id,e,t,i?.attachments),Rr(r)}Br()}function Hr(e){return e.id??`${e.type}|${e.timestamp}`}function Ur(e){return e.type===`comment`&&e.author===`ai`}function Wr(e){return Fr(e)||Ur(e)}function Gr(e){if(Bn.value||!Wr(e)||!V.value)return;let t=Hr(e);u.require({message:d(`comments.confirmDeleteMessage`),header:d(`comments.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>{let n=V.value;if(!n)return;let r=(n.card.history??[]).filter(e=>Hr(e)!==t);s.removeComment&&e.id&&(s.removeComment(n.card.id,e.id),Rr(r))}})}let Kr=t(()=>s.columnSubscriptions!==void 0),qr=j(null),Jr=[`entered`,`left`,`created`,`deleted`],Yr=[`email`,`chat`],Xr=[...Jr],Qr=[...Yr],$r=j([...Xr]),ei=j([...Qr]),ti=j(null),ni=t(()=>s.manageableTeamIds?s.teams.filter(e=>s.manageableTeamIds.includes(e.id)):s.teams);function ri(e,t=null){return t?s.columnTeamSubscriptions?.[e]?.find(e=>e.teamId===t)??null:s.columnSubscriptions?.[e]??null}function ii(e){return ri(e)!==null}let ai=t(()=>{let e=qr.value;return e?(s.columnTeamSubscriptions?.[e]??[]).map(e=>s.teams.find(t=>t.id===e.teamId)?.name).filter(e=>!!e):[]}),oi=te(new Set),si=new Map,ci=null;function li(e,t){t.scrollWidth>t.clientWidth+1||t.scrollHeight>t.clientHeight+1?oi.add(e):oi.delete(e)}function ui(e,t){let n=si.get(t);if(n&&n!==e&&ci?.unobserve(n),!(e instanceof HTMLElement)){si.delete(t),oi.delete(t);return}si.set(t,e),typeof ResizeObserver<`u`&&(ci??=new ResizeObserver(e=>{for(let t of e)for(let[e,n]of si)n===t.target&&li(e,n)}),ci.observe(e)),li(t,e)}Ie(()=>h.value.flatMap(e=>[e.title,...e.cards.map(e=>e.title)]).join(`\0`),()=>void oe(()=>{for(let[e,t]of si)li(e,t)})),pe(()=>ci?.disconnect());function di(e,t){return{value:oi.has(e)?t:``,showDelay:0,hideDelay:0}}let fi=j(null),pi=j(null);function mi(e,t){pi.value=t,fi.value?.toggle(e)}function gi(e){let t=pi.value;t&&(fi.value?.hide(),e(t.id))}function _i(e,t){let n=ri(e,t);$r.value=n?[...n.kinds]:[...Xr],ei.value=n?[...n.channels]:[...Qr]}function vi(e){ti.value=null,_i(e,null),qr.value=e}function yi(e){ti.value=e,qr.value&&_i(qr.value,e)}let bi=t(()=>$r.value.length>0&&ei.value.length>0),xi=t(()=>ti.value?{teamId:ti.value}:{}),Si=t(()=>qr.value?ri(qr.value,ti.value)!==null:!1);function Ci(){let e=qr.value;!e||!bi.value||(l(`update-column-subscription`,{columnId:e,subscription:{kinds:[...$r.value],channels:[...ei.value]},...xi.value}),qr.value=null)}function wi(){let e=qr.value;e&&(l(`update-column-subscription`,{columnId:e,subscription:null,...xi.value}),qr.value=null)}let Ti=t(()=>s.columns.find(e=>e.id===qr.value)??null),Ei=te(new Set),Di=te(new Set),Oi=t(()=>`runeya.kanban.collapsedColumns.${s.name}`),ki=t(()=>`runeya.kanban.expandedColumns.${s.name}`);function Ai(e,t){t.clear();try{let n=window.localStorage.getItem(e);if(!n)return;let r=JSON.parse(n);if(Array.isArray(r))for(let e of r)typeof e==`string`&&t.add(e)}catch{}}function ji(){Ai(Oi.value,Ei),Ai(ki.value,Di)}function Mi(){try{window.localStorage.setItem(Oi.value,JSON.stringify([...Ei])),window.localStorage.setItem(ki.value,JSON.stringify([...Di]))}catch{}}ji(),Ie(Oi,ji);function Ni(e){let t=s.columns.find(t=>t.id===e);return!!t&&t.cards.length===0}function Pi(e){return Ei.has(e)?!0:Ni(e)&&!Di.has(e)}function Fi(e){Pi(e)?(Ei.delete(e),Ni(e)&&Di.add(e)):(Di.delete(e),Ni(e)||Ei.add(e)),Mi()}let Ii=t(()=>(V.value?.card.history??[]).filter(e=>e.type===`comment`));Ie([Rt,Ii],([e])=>{e===`comments`&&(Gt(),Xi())}),Ie(()=>V.value?.card.id,()=>{Bi.clear(),Vi.clear()});function Li(e){if(/^(https?:|mailto:)/i.test(e)){window.open(e,`_blank`,`noopener,noreferrer`);return}e.startsWith(`#`)||e.startsWith(`/`)&&window.open(e,`_blank`,`noopener,noreferrer`)}function Ri(e){let t=(e.target?.closest(`a`))?.getAttribute(`href`);return t?(e.preventDefault(),e.stopPropagation(),Li(t),!0):!1}let zi=wn,Bi=te(new Set),Vi=te(new Set);function Hi(e,t){return e.id??`i${t}`}function Ui(e,t){return Bi.has(Hi(e,t))}function Wi(e,t){let n=Hi(e,t);return Vi.has(n)||Bi.has(n)}function Gi(e,t){let n=Hi(e,t);Bi.has(n)?Bi.delete(n):Bi.add(n)}function Ki(e,t,n){Ri(n)||Qi(e)||Wi(e,t)&&(n.stopPropagation(),Gi(e,t))}let Ji=new Map;function Yi(e,t,n){let r=Hi(t,n);if(!(e instanceof HTMLElement)){Ji.delete(r);return}Ji.set(r,e),!Bi.has(r)&&(e.scrollHeight-e.clientHeight>1?Vi.add(r):Vi.delete(r))}async function Xi(){await oe();for(let[e,t]of Ji)Bi.has(e)||(t.scrollHeight-t.clientHeight>1?Vi.add(e):Vi.delete(e))}function Zi(e){return s.resolveConversationId?s.resolveConversationId(e):e.conversationId??null}function Qi(e){return!!Zi(e)}let $i=t(()=>{let e=V.value?.card;if(!e)return[];let t=e.conversationEvents??e.history??[],n=new Set,r=[];for(let e of t){if(e.type!==`conversation_started`&&e.type!==`scenario_started`)continue;let t=Zi(e);if(!t||n.has(t))continue;n.add(t);let i=e.detail??``,a=i.includes(` — `)?i.slice(0,i.lastIndexOf(` — `)).trim():``,o=lu(e.timestamp);r.push({id:t,label:o,title:a||cu.value[e.type]})}return r});function ea(e){let t=Zi(e);t&&l(`open-conversation`,t)}let ta={created:`pi pi-plus-circle`,edited:`pi pi-pencil`,moved:`pi pi-arrow-right-arrow-left`,image_added:`pi pi-image`,image_removed:`pi pi-trash`,title_changed:`pi pi-tag`,conversation_started:`pi pi-comments`,scenario_started:`pi pi-sitemap`,comment:`pi pi-comment`,archived:`pi pi-inbox`,unarchived:`pi pi-replay`},cu=t(()=>({created:d(`history.events.created`),edited:d(`history.events.edited`),moved:d(`history.events.moved`),image_added:d(`history.events.image_added`),image_removed:d(`history.events.image_removed`),title_changed:d(`history.events.title_changed`),archived:d(`history.events.archived`),unarchived:d(`history.events.unarchived`),conversation_started:d(`history.events.conversation_started`),scenario_started:d(`history.events.scenario_started`),comment:d(`history.events.comment`)}));function lu(e){let t=new Date(e);return`${t.toLocaleDateString()} ${t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`}function uu(e){return new Promise(t=>{let n=new FileReader;n.onload=()=>t(typeof n.result==`string`?n.result:null),n.onerror=()=>t(null),n.readAsDataURL(e)})}async function du(e){let t=[];for(let n of e){if(n.size===0){ft.value=[...ft.value,{name:n.name,reason:d(`editor.uploadEmpty`)}];continue}if(n.size>tu){ft.value=[...ft.value,{name:n.name,reason:d(`editor.uploadTooLarge`)}];continue}if(!s.uploadImage){ft.value=[...ft.value,{name:n.name,reason:d(`editor.uploadUnavailable`)}];continue}let e=`${mt+=1}`;pt.value=[...pt.value,{key:e,name:n.name,ratio:0}];try{let r=await s.uploadImage(n,t=>{pt.value=pt.value.map(n=>n.key===e?{...n,ratio:t}:n)});r?(t.push(r),ht.value=[...ht.value,r]):ft.value=[...ft.value,{name:n.name,reason:d(`editor.uploadFailed`)}]}finally{pt.value=pt.value.filter(t=>t.key!==e)}}return t}async function fu(e){let t=e.target;if(!t.files)return;let n=Array.from(t.files);t.value=``,dt.value=!0,ft.value=[];try{let e=await du(n);Bt.value=[...Bt.value,...e],pr(e)}finally{dt.value=!1}}async function pu(e,t){if(!(Bn.value||!e.length)){dt.value=!0,ft.value=[];try{let n=await du(e);if(!n.length)return;t===`comment`?Bt.value=[...Bt.value,...n]:ut.value=[...ut.value,...n],pr(n)}finally{dt.value=!1}}}function mu(e){Bt.value=Bt.value.filter((t,n)=>n!==e)}async function hu(e){let t=e.target;if(!t.files)return;let n=Array.from(t.files);t.value=``,dt.value=!0,ft.value=[],pt.value=[];try{if(s.uploadImage){let e=await du(n);ut.value=[...ut.value,...e],pr(e);return}for(let e of n){if(!e.type.startsWith(`image/`)||e.size>nu){ft.value=[...ft.value,{name:e.name,reason:d(`editor.uploadUnavailable`)}];continue}let t=await uu(e);if(!t){ft.value=[...ft.value,{name:e.name,reason:d(`editor.uploadFailed`)}];continue}lt.value=[...lt.value,t],Vt.value?.insertImage(t)}}finally{dt.value=!1}}function H(e){u.require({message:d(`editor.confirmRemoveImageMessage`),header:d(`editor.confirmRemoveImageHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>{lt.value=lt.value.filter((t,n)=>n!==e)}})}let U=j(null),W=j(null),gu=null,G=null,_u=`before`,vu=null,yu=`before`,bu=null,xu=null,Su=null,K=[`kb-card--drop-before`,`kb-card--drop-after`],Cu=[`kb-col--col-drop-before`,`kb-col--col-drop-after`];function wu(e,t){bu&&bu!==e&&bu.classList.remove(...K),bu=e,e&&(e.classList.toggle(`kb-card--drop-before`,t===`before`),e.classList.toggle(`kb-card--drop-after`,t===`after`))}function q(e){xu&&xu!==e&&xu.classList.remove(`kb-col--dragover`),xu=e,e?.classList.add(`kb-col--dragover`)}function Tu(e,t){Su&&Su!==e&&Su.classList.remove(...Cu),Su=e,e&&(e.classList.toggle(`kb-col--col-drop-before`,t===`before`),e.classList.toggle(`kb-col--col-drop-after`,t===`after`))}function Eu(){wu(null,`before`),q(null),Tu(null,`before`)}let Du=j(null),Ou=j(null),ku=j(!1),Au=null,ju=null,Mu=null,Nu={x:0,y:0},Pu={x:0,y:0},Fu=!1,Iu=j(null);function Lu(e,t){Au&&cancelAnimationFrame(Au);let n=Iu.value?.querySelector(`.kb-board`),r=()=>{let i=!1;if(n){let t=n.getBoundingClientRect();e<t.left+ou&&n.scrollLeft>0?(n.scrollLeft-=su,i=!0):e>t.right-ou&&n.scrollLeft<n.scrollWidth-n.clientWidth&&(n.scrollLeft+=su,i=!0)}let a=zu(e,t)?.closest(`.kb-col__cards`);if(a){let e=a.getBoundingClientRect();t<e.top+ou&&a.scrollTop>0?(a.scrollTop-=su,i=!0):t>e.bottom-ou&&a.scrollTop<a.scrollHeight-a.clientHeight&&(a.scrollTop+=su,i=!0)}i&&Uu(e,t),Au=i&&ku.value?requestAnimationFrame(r):null};Au=requestAnimationFrame(r)}function Ru(){Au&&=(cancelAnimationFrame(Au),null)}function zu(e,t){Ou.value&&(Ou.value.style.display=`none`);let n=document.elementFromPoint(e,t);return Ou.value&&(Ou.value.style.display=``),n}function Bu(){ju&&=(clearTimeout(ju),null),Mu=null}function Vu(e){if(!Mu)return;let{type:t,colId:n,cardId:r,el:i}=Mu;Du.value=t,ku.value=!0,t===`card`&&r?(U.value={colId:n,cardId:r},W.value=null):(W.value=n,U.value=null),e&&navigator.vibrate&&navigator.vibrate(30);let a=t===`card`?i.closest(`.kb-card`):i.closest(`.kb-col`);if(a){let e=a.cloneNode(!0);e.style.cssText=`position:fixed;pointer-events:none;z-index:9999;opacity:0.8;width:${a.getBoundingClientRect().width}px;transform:rotate(2deg);`,document.body.appendChild(e),Ou.value=e}Mu=null}function Hu(e,t){Ou.value&&(Ou.value.style.left=`${e-40}px`,Ou.value.style.top=`${t-20}px`)}function Uu(e,t){let n=zu(e,t);if(!n||!Iu.value?.contains(n)){gu=null,G=null,vu=null,Eu();return}if(Du.value===`card`){let e=n.closest(`.kb-card`),r=n.closest(`.kb-col`);if(e&&r){let n=e.dataset.cardId||``,i=r.dataset.colId||``;if(n&&i){let a=e.getBoundingClientRect(),o=t-a.top<a.height/2?`before`:`after`;gu!==i&&(gu=i,q(r)),(G!==n||_u!==o)&&(G=n,_u=o,wu(e,o))}}else if(r){let e=r.dataset.colId||``;e&&(gu=e,G=null,q(r),wu(null,`before`))}}else if(Du.value===`column`){let t=n.closest(`.kb-col`);if(t){let n=t.dataset.colId||``;if(n&&n!==W.value){let r=t.getBoundingClientRect(),i=e-r.left<r.width/2?`before`:`after`;(vu!==n||yu!==i)&&(vu=n,yu=i,Tu(t,i))}}}}function Wu(){Bu(),Ru(),Ou.value&&=(Ou.value.remove(),null),ku.value&&(Du.value===`card`&&gu?rd(gu):Du.value===`column`&&vu&&id(vu)),Du.value=null,ku.value=!1,nd()}function Gu(e){return!!e?.closest(`button, a, input, textarea, select, [contenteditable="true"]`)}function Ku(e,t,n,r){s.readOnly||e.pointerType===`touch`||e.button!==0||Gu(e.target)||(Bu(),Fu=!1,Mu={type:t,colId:n,cardId:r,el:e.target},e.currentTarget.setPointerCapture?.(e.pointerId),Nu={x:e.clientX,y:e.clientY},Pu={...Nu},document.addEventListener(`pointermove`,Ju),document.addEventListener(`pointerup`,Yu),document.addEventListener(`pointercancel`,Yu),window.addEventListener(`wheel`,Zu,{passive:!0}),window.addEventListener(`scroll`,Zu,{capture:!0,passive:!0}),window.addEventListener(`keydown`,qu))}function qu(e){e.key===`Escape`&&(gu=null,G=null,vu=null,Eu(),Yu())}function Ju(e){if(Pu={x:e.clientX,y:e.clientY},!ku.value){if(!Mu||Math.hypot(e.clientX-Nu.x,e.clientY-Nu.y)<au)return;Vu(!1)}e.preventDefault(),Hu(e.clientX,e.clientY),Lu(e.clientX,e.clientY),Uu(e.clientX,e.clientY)}function Yu(){Xu(),ku.value&&(Fu=!0),Wu()}function Xu(){document.removeEventListener(`pointermove`,Ju),document.removeEventListener(`pointerup`,Yu),document.removeEventListener(`pointercancel`,Yu),window.removeEventListener(`wheel`,Zu),window.removeEventListener(`scroll`,Zu,{capture:!0}),window.removeEventListener(`keydown`,qu)}function Zu(){ku.value&&Uu(Pu.x,Pu.y)}function Qu(e){Fu&&(Fu=!1,e.stopImmediatePropagation(),e.preventDefault())}pe(()=>{Xu(),Ru(),Ou.value&&=(Ou.value.remove(),null)});function $u(e,t,n,r){if(s.readOnly||Gu(e.target))return;Bu();let i=e.touches[0],a=i.clientX,o=i.clientY;Mu={type:t,colId:n,cardId:r,el:e.target};let c=e=>{let t=e.touches[0],n=t.clientX-a,r=t.clientY-o;Math.sqrt(n*n+r*r)>iu&&(Bu(),document.removeEventListener(`touchmove`,c))};document.addEventListener(`touchmove`,c,{passive:!0}),ju=setTimeout(()=>{document.removeEventListener(`touchmove`,c),Vu(!0)},ru)}function ed(e){if(!ku.value)return;e.preventDefault();let t=e.touches[0];Pu={x:t.clientX,y:t.clientY},Hu(t.clientX,t.clientY),Lu(t.clientX,t.clientY),Uu(t.clientX,t.clientY)}function td(){Wu()}function nd(){U.value=null,gu=null,G=null,W.value=null,vu=null,Eu()}function rd(e){if(s.readOnly)return;if(W.value){id(e);return}if(!U.value)return;let{colId:t,cardId:n}=U.value,r=et(t),i=et(e),a=null,o=h.value.map(e=>e.id===t?(a=e.cards.find(e=>e.id===n)??null,{...e,cards:e.cards.filter(e=>e.id!==n)}):e),l=0;if(a){let n={...a};!c.value&&t!==e&&tt(n,`moved`,`"${r}" → "${i}"`),o=o.map(t=>{if(t.id!==e)return t;let r=[...t.cards].sort((e,t)=>e.order-t.order),i=r.length;if(G){let e=r.findIndex(e=>e.id===G);e!==-1&&(i=_u===`before`?e:e+1)}return l=i,r.splice(i,0,n),{...t,cards:r.map((e,t)=>({...e,order:t}))}})}if(U.value=null,gu=null,G=null,Eu(),s.moveCard&&a){h.value=o,s.moveCard(a.id,e,l);return}y(o,a?{kind:`card-move`,cardId:a.id,toColumnId:e,toIndex:l}:void 0)}function id(e){if(s.readOnly||!W.value||W.value===e){W.value=null,vu=null,Eu();return}let t=[...h.value].sort((e,t)=>e.order-t.order),n=t.findIndex(e=>e.id===W.value),r=t.splice(n,1)[0],i=t.findIndex(t=>t.id===e);t.splice(yu===`before`?i:i+1,0,r),W.value=null,vu=null,Eu(),y(t.map((e,t)=>({...e,order:t})),{kind:`columns-reorder`,columnIds:t.map(e=>e.id)})}return n({openCardEditor:Zt,closeCardEditor:sn,saveCard:cn,editingCard:V}),(t,n)=>{let i=Ee(`tooltip`);return F(),x(`div`,{ref_key:`rootEl`,ref:Iu,class:`kb`},[L(`header`,ra,[B(S(p),{icon:`pi pi-arrow-left`,text:``,rounded:``,size:`small`,onClick:n[0]||=e=>l(`back`)}),o((F(),x(`h1`,{class:`kb-header__title`,ref:e=>ui(e,`board`)},[w(g(e.name),1)])),[[i,di(`board`,e.name),void 0,{bottom:!0}]]),L(`span`,ia,[n[69]||=L(`i`,{class:`pi pi-search`},null,-1),B(S(Le),{modelValue:b.value,"onUpdate:modelValue":n[1]||=e=>b.value=e,placeholder:S(d)(`searchPlaceholder`),size:`small`,class:`kb-header__search-input`},null,8,[`modelValue`,`placeholder`]),b.value?(F(),_(S(p),{key:0,icon:`pi pi-times`,text:``,rounded:``,size:`small`,onClick:n[2]||=e=>b.value=``})):v(``,!0),e.searchTruncated?(F(),x(`small`,aa,g(S(d)(`searchTruncated`)),1)):v(``,!0)]),o(B(S(p),{icon:`pi pi-filter`,text:``,rounded:``,size:`small`,badge:fe.value?String(fe.value):void 0,"badge-severity":`info`,class:R({"kb-header__filter--on":fe.value}),onClick:n[3]||=e=>D.value=!0},null,8,[`badge`,`class`]),[[i,S(d)(`filters.open`),void 0,{bottom:!0}]]),o(B(S(p),{icon:`pi pi-inbox`,text:``,rounded:``,size:`small`,onClick:rr},null,512),[[i,S(d)(`archive.open`),void 0,{bottom:!0}]]),e.readOnly?v(``,!0):o((F(),_(S(p),{key:0,icon:`pi pi-sitemap`,text:``,rounded:``,size:`small`,onClick:n[4]||=e=>Me.value=!0},null,512)),[[i,S(d)(`groups.title`),void 0,{bottom:!0}]]),e.readOnly?(F(),x(`span`,oa,[n[70]||=L(`i`,{class:`pi pi-lock`},null,-1),w(` `+g(S(d)(`readOnly.badge`)),1)])):v(``,!0),I(t.$slots,`header-actions`,{},void 0,!0)]),I(t.$slots,`banner`,{},void 0,!0),L(`div`,sa,[Ue.value?(F(),x(`div`,{key:0,class:`kb-bands`,style:ye({height:`${Ue.value}px`})},[(F(!0),x(a,null,z(Ze.value,e=>(F(),x(`div`,{key:e.id,class:`kb-band`,style:ye({left:`${e.left}px`,width:`${e.width}px`,top:`${e.top}px`,"--kb-band-color":e.color||`var(--p-text-muted-color)`})},[L(`span`,ca,g(e.title),1),L(`span`,la,g(e.count),1)],4))),128))],4)):v(``,!0),L(`div`,{ref_key:`boardEl`,ref:Xe,class:`kb-board`},[(F(!0),x(a,null,z(je.value,r=>(F(),x(`div`,{key:r.id,class:R([`kb-col`,{"kb-col--collapsed":Pi(r.id),"kb-col--dragging":W.value===r.id}]),"data-col-id":r.id,onPointerdown:e=>Ku(e,`column`,r.id),onTouchstart:e=>$u(e,`column`,r.id),onTouchmove:ed,onTouchend:td,onContextmenu:n[8]||=k(()=>{},[`prevent`])},[Pi(r.id)?(F(),x(`button`,{key:0,class:R([`kb-col__strip`,{"kb-col__strip--empty":r.cards.length===0}]),title:S(d)(`column.expand`),onClick:e=>Fi(r.id)},[n[71]||=L(`i`,{class:`pi pi-angle-double-right`},null,-1),L(`span`,fa,g(r.cards.length),1),ii(r.id)?(F(),x(`i`,pa)):v(``,!0),o((F(),x(`span`,{class:`kb-col__strip-title`,ref_for:!0,ref:e=>ui(e,`strip:${r.id}`)},[w(g(r.title),1)])),[[i,di(`strip:${r.id}`,r.title),void 0,{right:!0}]])],10,da)):(F(),x(`div`,ma,[o(L(`input`,{class:`kb-col__title`,ref_for:!0,ref:e=>ui(e,`col:${r.id}`),value:r.title,readonly:e.readOnly,onBlur:e=>at(r.id,e.target.value),onKeyup:n[5]||=Fe(e=>e.target.blur(),[`enter`]),onMousedown:n[6]||=k(()=>{},[`stop`])},null,40,ha),[[i,di(`col:${r.id}`,r.title),void 0,{bottom:!0}]]),L(`div`,ga,[Kr.value&&ii(r.id)?o((F(),_(S(p),{key:0,icon:`pi pi-bell`,text:``,rounded:``,size:`small`,class:`kb-col__bell--on`,onClick:e=>vi(r.id)},null,8,[`onClick`])),[[i,S(d)(`column.unsubscribe`),void 0,{bottom:!0}]]):v(``,!0),r.done?o((F(),x(`i`,_a,null,512)),[[i,S(d)(`column.doneBadge`),void 0,{bottom:!0}]]):v(``,!0),o(B(S(p),{icon:`pi pi-ellipsis-v`,text:``,rounded:``,size:`small`,class:R([`kb-col__menu-btn`,{"kb-col__menu-btn--open":pi.value?.id===r.id}]),onClick:e=>mi(e,r)},null,8,[`class`,`onClick`]),[[i,S(d)(`column.menu`),void 0,{bottom:!0}]]),L(`span`,va,g(r.cards.length),1)])])),!e.readOnly&&!Pi(r.id)?(F(),x(`button`,{key:2,class:`kb-col__add-card kb-col__add-card--top`,onClick:e=>Jt(r.id,`top`)},[n[72]||=L(`i`,{class:`pi pi-plus`},null,-1),w(` `+g(S(d)(`column.addCard`)),1)],8,ya)):v(``,!0),Pi(r.id)?v(``,!0):(F(),x(`div`,ba,[(F(!0),x(a,null,z(r.cards,a=>(F(),x(`div`,{key:a.id,class:R([`kb-card`,{"kb-card--colored":a.color}]),style:ye(a.color?{borderTopColor:a.color}:void 0),"data-card-id":a.id,onPointerdown:k(e=>Ku(e,`card`,r.id,a.id),[`stop`]),onTouchstart:k(e=>$u(e,`card`,r.id,a.id),[`stop`]),onTouchmove:ed,onTouchend:td,onContextmenu:n[7]||=k(()=>{},[`prevent`]),onClickCapture:Qu,onClick:e=>Zt(r.id,a)},[B(xn,{card:a,t:S(d),"avatar-url":e.avatarUrl,"current-user-id":s.currentUserId,"child-count":fn(a.id),"has-parent":!!un(a.id)},{actions:O(()=>[I(t.$slots,`card-actions`,{card:a,column:r},void 0,!0),e.readOnly?v(``,!0):o((F(),x(`button`,{key:0,class:`kb-card__delete`,onClick:k(e=>ar(r.id,a.id),[`stop`])},[...n[73]||=[L(`i`,{class:`pi pi-inbox`},null,-1)]],8,Sa)),[[i,S(d)(`archive.cardTooltip`),void 0,{bottom:!0}]]),e.readOnly?v(``,!0):o((F(),x(`button`,{key:1,class:`kb-card__delete`,onClick:k(e=>lr(r.id,a.id),[`stop`])},[...n[74]||=[L(`i`,{class:`pi pi-times`},null,-1)]],8,Ca)),[[i,S(d)(`card.deleteTooltip`),void 0,{bottom:!0}]])]),badges:O(()=>[I(t.$slots,`card-badges`,{card:a},void 0,!0)]),_:2},1032,[`card`,`t`,`avatar-url`,`current-user-id`,`child-count`,`has-parent`])],46,xa))),128)),r.cards.length===0?(F(),x(`div`,wa,g(S(d)(`column.dropZone`)),1)):v(``,!0)])),!e.readOnly&&!Pi(r.id)?(F(),x(`button`,{key:4,class:`kb-col__add-card`,onClick:e=>Jt(r.id)},[n[75]||=L(`i`,{class:`pi pi-plus`},null,-1),w(` `+g(S(d)(`column.addCard`)),1)],8,Ta)):v(``,!0)],42,ua))),128)),B(S(ne),{visible:qr.value!==null,modal:``,header:S(d)(`column.subscribeTitle`),style:{width:`30rem`},"onUpdate:visible":n[13]||=e=>{e||(qr.value=null)}},{footer:O(()=>[Si.value?(F(),_(S(p),{key:0,label:ti.value?S(d)(`column.unsubscribeTeam`):S(d)(`column.unsubscribe`),severity:`danger`,text:``,onClick:wi},null,8,[`label`])):v(``,!0),B(S(p),{label:S(d)(`editor.cancel`),text:``,onClick:n[12]||=e=>qr.value=null},null,8,[`label`]),B(S(p),{label:Si.value?S(d)(`editor.save`):S(d)(`column.subscribeConfirm`),icon:`pi pi-bell`,disabled:!bi.value,onClick:Ci},null,8,[`label`,`disabled`])]),default:O(()=>[L(`p`,Ea,g(S(d)(`column.subscribeIntro`,{column:Ti.value?.title??``})),1),ni.value.length?(F(),x(a,{key:0},[L(`p`,Da,g(S(d)(`column.subscribeTargetLabel`)),1),L(`div`,Oa,[L(`label`,ka,[B(S(Be),{"model-value":ti.value,value:null,"onUpdate:modelValue":n[9]||=e=>yi(null)},null,8,[`model-value`]),L(`span`,null,g(S(d)(`column.subscribeTargetMe`)),1)]),(F(!0),x(a,null,z(ni.value,e=>(F(),x(`label`,{key:e.id,class:`kb-subscribe__option`},[B(S(Be),{"model-value":ti.value,value:e.id,"onUpdate:modelValue":t=>yi(e.id)},null,8,[`model-value`,`value`,`onUpdate:modelValue`]),L(`span`,null,g(e.name),1)]))),128))])],64)):v(``,!0),L(`p`,Aa,g(S(d)(`column.subscribeEventsLabel`)),1),L(`div`,ja,[(F(),x(a,null,z(Jr,e=>L(`label`,{key:e,class:`kb-subscribe__option`},[B(S(ze),{modelValue:$r.value,"onUpdate:modelValue":n[10]||=e=>$r.value=e,value:e},null,8,[`modelValue`,`value`]),L(`span`,null,g(S(d)(`column.subscribeKind.${e}`)),1)])),64))]),L(`p`,Ma,[n[76]||=L(`i`,{class:`pi pi-times`},null,-1),w(` `+g(S(d)(`column.subscribeNotReorder`)),1)]),L(`p`,Na,g(S(d)(`column.subscribeChannelsLabel`)),1),L(`div`,Pa,[(F(),x(a,null,z(Yr,e=>L(`label`,{key:e,class:`kb-subscribe__option`},[B(S(ze),{modelValue:ei.value,"onUpdate:modelValue":n[11]||=e=>ei.value=e,value:e},null,8,[`modelValue`,`value`]),L(`span`,null,g(S(d)(`column.subscribeChannel.${e}`)),1)])),64))]),L(`p`,Fa,g(S(d)(`column.subscribeOwnActions`)),1),ai.value.length?(F(),x(`p`,Ia,g(S(d)(`column.subscribeTeamsFollowing`,{teams:ai.value.join(`, `)})),1)):v(``,!0)]),_:1},8,[`visible`,`header`]),B(S(ne),{visible:Kt.value!==null,header:S(d)(`templates.pickHeader`),modal:!0,style:{width:`420px`},"onUpdate:visible":n[15]||=e=>{e||(Kt.value=null)}},{default:O(()=>[L(`p`,La,g(S(d)(`templates.pickIntro`)),1),L(`div`,Ra,[L(`button`,{class:`kb-tpl-option`,onClick:n[14]||=e=>Yt(null)},[n[77]||=L(`i`,{class:`pi pi-file`},null,-1),w(` `+g(S(d)(`templates.blank`)),1)]),(F(!0),x(a,null,z(e.templates,e=>(F(),x(`button`,{key:e.id,class:`kb-tpl-option`,onClick:t=>Yt(e)},[n[78]||=L(`i`,{class:`pi pi-file-edit`},null,-1),w(` `+g(e.name),1)],8,za))),128))])]),_:1},8,[`visible`,`header`]),e.readOnly?v(``,!0):(F(),x(`div`,Ba,[C.value?(F(),x(`div`,Va,[B(S(Le),{modelValue:T.value,"onUpdate:modelValue":n[16]||=e=>T.value=e,placeholder:S(d)(`column.titlePlaceholder`),autofocus:``,class:`w-full`,onKeyup:[Fe(nt,[`enter`]),n[17]||=Fe(e=>C.value=!1,[`escape`])]},null,8,[`modelValue`,`placeholder`]),L(`div`,Ha,[B(S(p),{label:S(d)(`addColumnButton`),size:`small`,disabled:!T.value.trim(),onClick:nt},null,8,[`label`,`disabled`]),B(S(p),{icon:`pi pi-times`,text:``,size:`small`,onClick:n[18]||=e=>C.value=!1})])])):(F(),x(`button`,{key:1,class:`kb-add-col__trigger`,onClick:n[19]||=e=>C.value=!0},[n[79]||=L(`i`,{class:`pi pi-plus`},null,-1),w(` `+g(S(d)(`addColumn`)),1)]))]))],512)]),B(hi,{visible:Me.value,"onUpdate:visible":n[20]||=e=>Me.value=e,columns:h.value,groups:e.columnGroups,"read-only":e.readOnly,t:S(d),onIntent:n[21]||=e=>l(`intent`,e)},null,8,[`visible`,`columns`,`groups`,`read-only`,`t`]),B(S(ee),{visible:D.value,"onUpdate:visible":n[31]||=e=>D.value=e,position:`right`,header:S(d)(`filters.title`),class:`kb-filters`},{footer:O(()=>[B(S(p),{label:S(d)(`filters.reset`),icon:`pi pi-filter-slash`,text:``,disabled:!fe.value,onClick:me},null,8,[`label`,`disabled`])]),default:O(()=>[L(`div`,Ua,[L(`section`,Wa,[L(`span`,Ga,g(S(d)(`filters.priority`)),1),de.value?(F(),x(a,{key:1},[L(`div`,Ka,[(F(),x(a,null,z([`lte`,`eq`,`gte`],e=>o(L(`button`,{key:e,class:R([`kb-ops__btn`,{"kb-ops__btn--on":A.value===e}]),onClick:t=>{A.value=e,M.value===null&&(M.value=5)}},[w(g(e===`lte`?`≤`:e===`eq`?`=`:`≥`),1)],10,qa),[[i,{value:S(d)(`filters.priorityOp.${e}`),showDelay:0,hideDelay:0},void 0,{bottom:!0}]])),64)),o((F(),x(`button`,{class:R([`kb-ops__btn kb-ops__btn--none`,{"kb-ops__btn--on":A.value===`none`}]),onClick:n[23]||=e=>{A.value=A.value===`none`?`gte`:`none`,M.value=A.value===`none`?null:5}},[...n[81]||=[L(`i`,{class:`pi pi-ban`},null,-1)]],2)),[[i,{value:S(d)(`filters.priorityOp.none`),showDelay:0,hideDelay:0},void 0,{bottom:!0}]])]),A.value===`none`?v(``,!0):(F(),x(`div`,Ja,[B(S(st),{"model-value":M.value??5,min:1,max:10,step:1,class:`kb-prio__slider`,"onUpdate:modelValue":n[24]||=e=>M.value=Array.isArray(e)?e[0]??null:e},null,8,[`model-value`]),L(`span`,Ya,g(M.value),1)])),L(`button`,{class:`kb-prio__set`,onClick:n[25]||=e=>{M.value=null,A.value=`gte`}},[n[82]||=L(`i`,{class:`pi pi-times`},null,-1),w(` `+g(S(d)(`filters.clearOne`)),1)]),A.value===`none`?v(``,!0):(F(),x(`p`,Xa,g(S(d)(`filters.priorityHint`)),1))],64)):(F(),x(`button`,{key:0,class:`kb-prio__set`,onClick:n[22]||=e=>M.value=5},[n[80]||=L(`i`,{class:`pi pi-plus`},null,-1),w(` `+g(S(d)(`filters.priorityAdd`)),1)]))]),L(`section`,Za,[L(`span`,Qa,g(S(d)(`filters.colors`)),1),L(`div`,$a,[o((F(),x(`button`,{class:R([`kb-colors__swatch kb-colors__swatch--none`,{"kb-colors__swatch--on":N.value.includes(``)}]),onClick:n[26]||=e=>N.value=N.value.includes(``)?N.value.filter(e=>e!==``):[...N.value,``]},[...n[83]||=[L(`i`,{class:`pi pi-ban`},null,-1)]],2)),[[i,{value:S(d)(`editor.colorNone`),showDelay:0,hideDelay:0},void 0,{bottom:!0}]]),(F(),x(a,null,z(It,e=>o(L(`button`,{key:e,class:R([`kb-colors__swatch`,{"kb-colors__swatch--on":N.value.includes(e)}]),style:ye({background:e}),onClick:t=>N.value=N.value.includes(e)?N.value.filter(t=>t!==e):[...N.value,e]},null,14,eo),[[i,{value:e,showDelay:0,hideDelay:0},void 0,{bottom:!0}]])),64))])]),L(`section`,to,[L(`span`,no,g(S(d)(`filters.groups`)),1),B(S(He),{modelValue:_e.value,"onUpdate:modelValue":n[27]||=e=>_e.value=e,options:be.value,placeholder:S(d)(`filters.groupsPlaceholder`),display:`chip`,filter:be.value.length>6,class:`kb-filters__control`},{option:O(({option:e})=>[L(`span`,{class:R([`kb-void`,{"kb-void--is":e===Ql}])},[e===Ql?(F(),x(`i`,ro)):v(``,!0),w(` `+g(e===Ql?S(d)(`filters.noGroups`):e),1)],2)]),chip:O(({value:e})=>[L(`span`,{class:R([`kb-void`,{"kb-void--is":e===Ql}])},g(e===Ql?S(d)(`filters.noGroups`):e),3)]),_:1},8,[`modelValue`,`options`,`placeholder`,`filter`])]),L(`section`,io,[L(`span`,ao,g(S(d)(`filters.assignees`)),1),B(S(He),{modelValue:Se.value,"onUpdate:modelValue":n[28]||=e=>Se.value=e,options:Te.value,"option-label":`name`,"option-value":`userId`,placeholder:S(d)(`filters.assigneesPlaceholder`),display:`chip`,filter:``,class:`kb-filters__control`},{option:O(({option:e})=>[L(`span`,{class:R([`kb-void`,{"kb-void--is":e.userId===Ql}])},[e.userId===Ql?(F(),x(`i`,oo)):v(``,!0),w(` `+g(e.name),1)],2)]),_:1},8,[`modelValue`,`options`,`placeholder`])]),Oe.value.length?(F(),x(`section`,so,[L(`span`,co,g(S(d)(`filters.creators`)),1),B(S(He),{modelValue:ie.value,"onUpdate:modelValue":n[29]||=e=>ie.value=e,options:Oe.value,"option-label":`name`,"option-value":`userId`,placeholder:S(d)(`filters.creatorsPlaceholder`),display:`chip`,filter:``,class:`kb-filters__control`},null,8,[`modelValue`,`options`,`placeholder`])])):v(``,!0),L(`section`,lo,[L(`span`,uo,g(S(d)(`filters.family`)),1),B(S(He),{modelValue:De.value,"onUpdate:modelValue":n[30]||=e=>De.value=e,options:Ae.value,"option-label":`title`,"option-value":`id`,placeholder:S(d)(`filters.familyPlaceholder`),display:`chip`,filter:``,class:`kb-filters__control`},{option:O(({option:e})=>[L(`span`,{class:R([`kb-void`,{"kb-void--is":e.id===Ql}])},[e.id===Ql?(F(),x(`i`,fo)):v(``,!0),L(`span`,null,g(e.title),1),e.column?(F(),x(`span`,po,g(e.column),1)):v(``,!0)],2)]),_:1},8,[`modelValue`,`options`,`placeholder`]),L(`p`,mo,g(S(d)(`filters.familyHint`)),1)])])]),_:1},8,[`visible`,`header`]),B(S(ee),{visible:Nn.value,"onUpdate:visible":n[36]||=e=>Nn.value=e,position:`right`,header:S(d)(`archive.title`),class:`kb-archive`},{default:O(()=>[L(`p`,ho,g(S(d)(`archive.hint`)),1),L(`span`,go,[n[84]||=L(`i`,{class:`pi pi-search`},null,-1),B(S(Le),{modelValue:Pn.value,"onUpdate:modelValue":n[32]||=e=>Pn.value=e,placeholder:S(d)(`archive.searchPlaceholder`),size:`small`,class:`kb-archive__search-input`},null,8,[`modelValue`,`placeholder`]),Pn.value?(F(),_(S(p),{key:0,icon:`pi pi-times`,text:``,rounded:``,size:`small`,onClick:n[33]||=e=>Pn.value=``})):v(``,!0),o(B(S(p),{icon:`pi pi-filter`,text:``,rounded:``,size:`small`,badge:fe.value?String(fe.value):void 0,"badge-severity":`info`,class:R({"kb-header__filter--on":fe.value}),onClick:n[34]||=e=>D.value=!0},null,8,[`badge`,`class`]),[[i,S(d)(`filters.open`),void 0,{bottom:!0}]])]),B(S(ke),{modelValue:Fn.value,"onUpdate:modelValue":n[35]||=e=>Fn.value=e,options:In.value,"option-label":`title`,"option-value":`id`,size:`small`,class:`kb-archive__column`,"aria-label":S(d)(`archive.columnFilter`)},null,8,[`modelValue`,`options`,`aria-label`]),e.loadingArchive?(F(),x(`p`,_o,g(S(d)(`archive.loading`)),1)):e.archivedCards.length?er.value.length?(F(),x(a,{key:3},[tr.value?(F(),x(`p`,bo,[w(g(S(d)(`archive.filteredOut`,{count:tr.value}))+` `,1),L(`button`,{class:`kb-archive__reset`,onClick:me},g(S(d)(`filters.reset`)),1)])):v(``,!0),e.archiveTruncated?(F(),x(`p`,xo,[n[85]||=L(`i`,{class:`pi pi-exclamation-circle`},null,-1),w(` `+g(S(d)(`archive.truncated`)),1)])):v(``,!0),L(`ul`,So,[(F(!0),x(a,null,z(er.value,r=>(F(),x(`li`,{key:r.id,class:R([`kb-card kb-archive__card`,{"kb-card--colored":r.color}]),style:ye(r.color?{borderTopColor:r.color}:void 0),onClick:e=>$n(r)},[B(xn,{card:r,t:S(d),"avatar-url":e.avatarUrl,"current-user-id":s.currentUserId,"child-count":fn(r.id),"has-parent":!!un(r.id)},{actions:O(()=>[e.readOnly?v(``,!0):o((F(),x(`button`,{key:0,class:`kb-card__delete`,onClick:k(e=>cr(r.id),[`stop`])},[...n[86]||=[L(`i`,{class:`pi pi-replay`},null,-1)]],8,wo)),[[i,S(d)(`archive.restore`),void 0,{left:!0}]])]),badges:O(()=>[I(t.$slots,`card-badges`,{card:r},void 0,!0)]),_:2},1032,[`card`,`t`,`avatar-url`,`current-user-id`,`child-count`,`has-parent`]),L(`div`,To,[r.archivedFrom?(F(),x(`span`,Eo,[n[87]||=L(`i`,{class:`pi pi-arrow-right-arrow-left`},null,-1),w(` `+g(S(d)(`archive.fromColumn`,{column:r.archivedFrom.columnTitle})),1)])):v(``,!0),r.archivedAt?(F(),x(`span`,Do,g(new Date(r.archivedAt).toLocaleDateString()),1)):v(``,!0)])],14,Co))),128))])],64)):(F(),x(`p`,yo,g(S(d)(`archive.allFiltered`,{count:tr.value})),1)):(F(),x(`p`,vo,g(Pn.value||Fn.value?S(d)(`archive.noMatch`):S(d)(`archive.empty`)),1))]),_:3},8,[`visible`,`header`]),B(S(ne),{visible:!!V.value,header:ot.value.trim()||S(d)(`card.untitled`),modal:!0,"dismissable-mask":!tn.value,class:R([`kb-card-dialog`,{"kb-card-dialog--colored":Pt.value}]),style:ye({width:`min(1400px, 92vw)`,height:`90vh`,...Pt.value?{"--kb-card-color":Pt.value}:{}}),breakpoints:{"1040px":`95vw`},"onUpdate:visible":n[62]||=e=>{e||nn()}},{footer:O(()=>[L(`div`,bl,[tn.value&&!Bn.value?(F(),x(`span`,xl,[n[119]||=L(`i`,{class:`pi pi-exclamation-circle`},null,-1),w(` `+g(S(d)(`editor.unsavedHint`)),1)])):v(``,!0),B(S(p),{label:S(d)(`editor.close`),text:``,onClick:nn},null,8,[`label`]),Bn.value?v(``,!0):(F(),_(S(p),{key:1,label:S(d)(`editor.save`),icon:`pi pi-check`,onClick:cn},null,8,[`label`]))])]),default:O(()=>[V.value?(F(),x(`div`,Oo,[L(`div`,ko,[zn.value?(F(),x(`p`,Ao,[n[88]||=L(`i`,{class:`pi pi-inbox`},null,-1),w(` `+g(S(d)(`archive.editorReadOnly`)),1)])):v(``,!0),B(S(Ke),{value:Rt.value,"onUpdate:value":n[45]||=e=>Rt.value=e},{default:O(()=>[B(S(We),null,{default:O(()=>[B(S(qe),{value:`edit`},{default:O(()=>[n[89]||=L(`i`,{class:`pi pi-pencil`,style:{"margin-right":`0.375rem`}},null,-1),w(g(S(d)(`editor.tabs.edit`)),1)]),_:1}),En.value||On.value?(F(),_(S(qe),{key:0,value:`relations`},{default:O(()=>[n[90]||=L(`i`,{class:`pi pi-sitemap`,style:{"margin-right":`0.375rem`}},null,-1),w(g(S(d)(`editor.tabs.relations`,{count:On.value})),1)]),_:1})):v(``,!0),(F(!0),x(a,null,z(Hn.value,e=>(F(),_(S(qe),{key:e,value:`conv-${e}`},{default:O(()=>[n[91]||=L(`i`,{class:`pi pi-envelope`,style:{"margin-right":`0.375rem`}},null,-1),w(g(S(d)(`editor.tabs.conversations`,{name:S(d)(`conversations.providers.${e}`),count:qn(e).length})),1)]),_:2},1032,[`value`]))),128)),B(S(qe),{value:`comments`},{default:O(()=>[n[92]||=L(`i`,{class:`pi pi-comments`,style:{"margin-right":`0.375rem`}},null,-1),w(g(S(d)(`editor.tabs.comments`,{count:Ii.value.length||(V.value.card.commentCount??0)})),1)]),_:1}),B(S(qe),{value:`history`},{default:O(()=>[n[93]||=L(`i`,{class:`pi pi-history`,style:{"margin-right":`0.375rem`}},null,-1),w(g(S(d)(`editor.tabs.history`,{count:V.value.card.history?.length??0})),1)]),_:1})]),_:1}),B(S(Ge),null,{default:O(()=>[B(S(Je),{value:`edit`},{default:O(()=>[L(`div`,jo,[L(`div`,Mo,[L(`label`,No,g(S(d)(`editor.titleLabel`)),1),B(S(Le),{id:`kanban-card-title`,modelValue:ot.value,"onUpdate:modelValue":n[37]||=e=>ot.value=e,disabled:Bn.value,autofocus:``,onKeyup:Fe(cn,[`enter`])},null,8,[`modelValue`,`disabled`])]),L(`div`,Po,[L(`label`,Fo,g(S(d)(`editor.contentLabel`)),1),B(S(ge),{id:`kanban-card-content`,ref_key:`tiptapRef`,ref:Vt,modelValue:ct.value,"onUpdate:modelValue":n[38]||=e=>ct.value=e,markdown:``,"min-height":`20rem`,"max-height":`none`,editable:!Bn.value,placeholder:S(d)(`editor.contentPlaceholder`),"handle-files":e=>pu(e,`card`),mentions:Nr.value,"attachment-src":gt,onLinkClick:Li},null,8,[`modelValue`,`editable`,`placeholder`,`handle-files`,`mentions`,`attachment-src`])]),L(`div`,Io,[L(`label`,Lo,g(S(d)(`editor.filesLabel`)),1),lt.value.length?(F(),x(`div`,Ro,[(F(!0),x(a,null,z(lt.value,(e,t)=>(F(),x(`div`,{key:t,class:`kb-dialog__thumb`},[L(`img`,{src:e,alt:`attachment`},null,8,zo),Bn.value?v(``,!0):(F(),x(`button`,{key:0,class:`kb-dialog__thumb-remove`,onClick:e=>H(t)},[...n[94]||=[L(`i`,{class:`pi pi-times`},null,-1)]],8,Bo))]))),128))])):v(``,!0),B(Mn,{files:ut.value,preview:fr,removable:!Bn.value,"remove-label":S(d)(`editor.removeFile`),onOpen:wr,onRemove:Ar},null,8,[`files`,`removable`,`remove-label`]),B(Zr,{queue:pt.value,errors:ft.value,uploading:dt.value,"uploading-label":S(d)(`editor.uploading`)},null,8,[`queue`,`errors`,`uploading`,`uploading-label`]),Bn.value?v(``,!0):(F(),x(`label`,Vo,[n[95]||=L(`i`,{class:`pi pi-upload`},null,-1),w(` `+g(S(d)(`editor.attachFile`))+` `,1),L(`input`,{id:`kanban-card-images`,type:`file`,multiple:``,onChange:hu},null,32)]))])])]),_:1}),B(S(Je),{value:`relations`},{default:O(()=>[L(`div`,Ho,[pn.value||En.value?(F(),x(`section`,Uo,[L(`h4`,Wo,[n[96]||=L(`i`,{class:`pi pi-arrow-up`},null,-1),w(` `+g(S(d)(`editor.parentLabel`)),1)]),pn.value?(F(),x(`table`,Go,[L(`thead`,null,[L(`tr`,null,[L(`th`,null,g(S(d)(`editor.relationsColCard`)),1),L(`th`,null,g(S(d)(`editor.relationsColBoard`)),1),L(`th`,null,g(S(d)(`editor.relationsColColumn`)),1),L(`th`,Ko,g(S(d)(`editor.relationsColAssignees`)),1),L(`th`,qo,g(S(d)(`editor.relationsColComments`)),1),L(`th`,Jo,g(S(d)(`editor.relationsColActions`)),1)])]),L(`tbody`,null,[L(`tr`,null,[L(`td`,Yo,[o((F(),x(`span`,{class:`kb-rel__card-title`,ref:e=>ui(e,`rel:${pn.value?.cardId??``}`)},[w(g(pn.value.title),1)])),[[i,di(`rel:${pn.value.cardId}`,pn.value.title),void 0,{top:!0}]])]),L(`td`,{class:R([`kb-rel__board`,{"kb-rel__board--away":!pn.value.here}])},[o((F(),x(`span`,{class:`kb-rel__card-title`,ref:e=>ui(e,`relb:${pn.value?.cardId??``}`)},[w(g(pn.value.boardName),1)])),[[i,di(`relb:${pn.value?.cardId??``}`,pn.value?.boardName??``),void 0,{top:!0}]])],2),L(`td`,Xo,[o((F(),x(`span`,{class:`kb-rel__card-title`,ref:e=>ui(e,`relc:${pn.value?.cardId??``}`)},[w(g(pn.value.columnTitle),1)])),[[i,di(`relc:${pn.value?.cardId??``}`,pn.value?.columnTitle??``),void 0,{top:!0}]])]),L(`td`,Zo,[pn.value.assignees.length?(F(),x(`div`,Qo,[(F(!0),x(a,null,z(pn.value.assignees,t=>(F(),x(`span`,{key:t.id,class:`kb-card__avatar`,style:ye(S(rn)(t.id)),title:t.name},[e.avatarUrl&&!jr.has(t.id)?(F(),x(`img`,{key:0,src:e.avatarUrl(t.id),alt:``,onError:e=>jr.add(t.id)},null,40,es)):(F(),x(a,{key:1},[w(g(Mr(t.name)),1)],64))],12,$o))),128))])):(F(),x(`span`,ts,`—`))]),L(`td`,ns,g(pn.value.commentCount||`—`),1),L(`td`,rs,[L(`button`,{class:`kb-rel__action`,title:pn.value.here?S(d)(`editor.childOpen`):S(d)(`editor.openOnBoard`,{board:pn.value.boardName}),onClick:n[39]||=e=>kn(pn.value.cardId,pn.value.boardId)},[...n[97]||=[L(`i`,{class:`pi pi-arrow-up-right`},null,-1)]],8,is),En.value?(F(),x(`button`,{key:0,class:`kb-rel__action kb-rel__action--detach`,title:S(d)(`editor.detach`),onClick:n[40]||=e=>yn(null)},[...n[98]||=[L(`i`,{class:`pi pi-times`},null,-1)]],8,as)):v(``,!0)])])])])):(F(),x(`p`,os,g(S(d)(`editor.parentEmptyState`)),1)),En.value?(F(),_(S(ke),{key:2,"model-value":null,options:_n.value,"option-label":`title`,"option-value":`id`,filter:_n.value.length>6,"filter-placeholder":S(d)(`editor.parentSearchPlaceholder`),"empty-message":S(d)(`editor.parentEmpty`),"empty-filter-message":S(d)(`editor.parentEmpty`),placeholder:pn.value?S(d)(`editor.parentReplace`):S(d)(`editor.parentAdd`),class:`kb-rel__picker`,"onUpdate:modelValue":yn},{option:O(({option:e})=>[L(`span`,ss,[L(`span`,null,g(e.title),1),L(`span`,cs,g(e.column),1)])]),_:1},8,[`options`,`filter`,`filter-placeholder`,`empty-message`,`empty-filter-message`,`placeholder`])):v(``,!0)])):v(``,!0),mn.value.length||En.value?(F(),x(`section`,ls,[L(`h4`,us,[n[99]||=L(`i`,{class:`pi pi-arrow-down`},null,-1),w(` `+g(S(d)(`editor.childrenLabel`,{count:mn.value.length})),1)]),mn.value.length?(F(),x(`table`,ds,[L(`thead`,null,[L(`tr`,null,[L(`th`,null,g(S(d)(`editor.relationsColCard`)),1),L(`th`,null,g(S(d)(`editor.relationsColBoard`)),1),L(`th`,null,g(S(d)(`editor.relationsColColumn`)),1),L(`th`,fs,g(S(d)(`editor.relationsColAssignees`)),1),L(`th`,ps,g(S(d)(`editor.relationsColComments`)),1),L(`th`,ms,g(S(d)(`editor.relationsColActions`)),1)])]),L(`tbody`,null,[(F(!0),x(a,null,z(mn.value,t=>(F(),x(`tr`,{key:t.cardId},[L(`td`,hs,[o((F(),x(`span`,{class:`kb-rel__card-title`,ref_for:!0,ref:e=>ui(e,`rel:${t.cardId}`)},[w(g(t.title),1)])),[[i,di(`rel:${t.cardId}`,t.title),void 0,{top:!0}]])]),L(`td`,{class:R([`kb-rel__board`,{"kb-rel__board--away":!t.here}])},[o((F(),x(`span`,{class:`kb-rel__card-title`,ref_for:!0,ref:e=>ui(e,`relb:${t.cardId}`)},[w(g(t.boardName),1)])),[[i,di(`relb:${t.cardId}`,t.boardName),void 0,{top:!0}]])],2),L(`td`,gs,[o((F(),x(`span`,{class:`kb-rel__card-title`,ref_for:!0,ref:e=>ui(e,`relc:${t.cardId}`)},[w(g(t.columnTitle),1)])),[[i,di(`relc:${t.cardId}`,t.columnTitle),void 0,{top:!0}]])]),L(`td`,_s,[t.assignees.length?(F(),x(`div`,vs,[(F(!0),x(a,null,z(t.assignees,t=>(F(),x(`span`,{key:t.id,class:`kb-card__avatar`,style:ye(S(rn)(t.id)),title:t.name},[e.avatarUrl&&!jr.has(t.id)?(F(),x(`img`,{key:0,src:e.avatarUrl(t.id),alt:``,onError:e=>jr.add(t.id)},null,40,bs)):(F(),x(a,{key:1},[w(g(Mr(t.name)),1)],64))],12,ys))),128))])):(F(),x(`span`,xs,`—`))]),L(`td`,Ss,g(t.commentCount||`—`),1),L(`td`,Cs,[L(`button`,{class:`kb-rel__action`,title:t.here?S(d)(`editor.childOpen`):S(d)(`editor.openOnBoard`,{board:t.boardName}),onClick:e=>kn(t.cardId,t.boardId)},[...n[100]||=[L(`i`,{class:`pi pi-arrow-up-right`},null,-1)]],8,ws),En.value?(F(),x(`button`,{key:0,class:`kb-rel__action kb-rel__action--detach`,title:S(d)(`editor.detach`),onClick:e=>Tn(t.cardId)},[...n[101]||=[L(`i`,{class:`pi pi-times`},null,-1)]],8,Ts)):v(``,!0)])]))),128))])])):(F(),x(`p`,Es,g(S(d)(`editor.childrenEmptyState`)),1)),En.value?(F(),_(S(ke),{key:2,"model-value":null,options:vn.value,"option-label":`title`,"option-value":`id`,filter:vn.value.length>6,"filter-placeholder":S(d)(`editor.parentSearchPlaceholder`),"empty-message":S(d)(`editor.parentEmpty`),"empty-filter-message":S(d)(`editor.parentEmpty`),placeholder:S(d)(`editor.childAdd`),class:`kb-rel__picker`,"onUpdate:modelValue":bn},{option:O(({option:e})=>[L(`span`,Ds,[L(`span`,null,g(e.title),1),L(`span`,Os,g(e.column),1)])]),_:1},8,[`options`,`filter`,`filter-placeholder`,`empty-message`,`empty-filter-message`,`placeholder`])):v(``,!0)])):v(``,!0),!En.value&&!pn.value&&!mn.value.length?(F(),x(`p`,ks,g(S(d)(`editor.relationsEmpty`)),1)):v(``,!0)])]),_:1}),B(S(Je),{value:`comments`},{default:O(()=>[L(`div`,As,[Ii.value.length?(F(),x(`div`,Ms,[(F(!0),x(a,null,z(Ii.value,(t,r)=>(F(),x(`div`,{key:r,class:R([`kb-comments__item`,{"kb-comments__item--ai":t.author===`ai`,"kb-comments__item--clickable":Qi(t)}]),onClick:e=>Qi(t)&&ea(t)},[L(`div`,{class:R([`kb-comments__avatar`,{"kb-comments__avatar--photo":!!Ir(t)}]),style:ye(Ir(t)?S(rn)(Ir(t)):void 0)},[t.author===`ai`?(F(),x(`i`,Ps)):Ir(t)&&e.avatarUrl&&!jr.has(Ir(t))?(F(),x(`img`,{key:1,src:e.avatarUrl(Ir(t)),alt:``,onError:e=>jr.add(Ir(t))},null,40,Fs)):t.authorUser?.name?(F(),x(a,{key:2},[w(g(Mr(t.authorUser.name)),1)],64)):(F(),x(`i`,Is))],6),L(`div`,Ls,[L(`div`,Rs,[L(`span`,zs,g(Lr(t)),1),L(`span`,Bs,g(lu(t.timestamp)),1),t.editedAt?(F(),x(`span`,Vs,g(S(d)(`comments.edited`)),1)):v(``,!0),!Bn.value&&Wr(t)&&Ut.value!==t.id?(F(),x(`span`,Hs,[Fr(t)?(F(),x(`button`,{key:0,class:`kb-comments__tool`,title:S(d)(`comments.edit`),onClick:k(e=>zr(t),[`stop`])},[...n[103]||=[L(`i`,{class:`pi pi-pencil`},null,-1)]],8,Us)):v(``,!0),L(`button`,{class:`kb-comments__tool`,title:S(d)(`comments.delete`),onClick:k(e=>Gr(t),[`stop`])},[...n[104]||=[L(`i`,{class:`pi pi-trash`},null,-1)]],8,Ws)])):v(``,!0)]),Ut.value===t.id?(F(),x(`div`,{key:0,class:`kb-comments__edit`,onClick:n[42]||=k(()=>{},[`stop`])},[B(S(ge),{modelValue:Wt.value,"onUpdate:modelValue":n[41]||=e=>Wt.value=e,markdown:``,"min-height":`1.4rem`,"max-height":`7.1rem`,mentions:Nr.value,onLinkClick:Li},null,8,[`modelValue`,`mentions`]),L(`div`,Gs,[B(S(p),{label:S(d)(`editor.cancel`),size:`small`,text:``,onClick:Br},null,8,[`label`]),B(S(p),{label:S(d)(`editor.save`),size:`small`,disabled:!Wt.value.trim(),onClick:Vr},null,8,[`label`,`disabled`])])])):t.detail?(F(),x(a,{key:1},[L(`div`,{ref_for:!0,ref:e=>Yi(e,t,r),class:R([`kb-comments__text kb-comments__text--markdown`,{"kb-comments__text--clamped":!Ui(t,r),"kb-comments__text--toggleable":Wi(t,r)&&!Qi(t)}]),onClick:e=>Ki(t,r,e),innerHTML:S(zi)(t.detail)},null,10,Ks),Wi(t,r)?(F(),x(`button`,{key:0,class:`kb-comments__more`,onClick:k(e=>Gi(t,r),[`stop`])},g(Ui(t,r)?S(d)(`comments.showLess`):S(d)(`comments.showMore`)),9,qs)):v(``,!0)],64)):v(``,!0),Ut.value===t.id?v(``,!0):(F(),_(Mn,{key:2,files:t.attachments??[],preview:fr,compact:``,onOpen:wr},null,8,[`files`]))])],10,Ns))),128)),L(`div`,{ref_key:`commentsEndEl`,ref:Ht},null,512)])):(F(),x(`div`,js,[n[102]||=L(`i`,{class:`pi pi-comments`},null,-1),L(`span`,null,g(S(d)(`comments.empty`)),1)])),Bn.value?v(``,!0):(F(),x(`div`,{key:2,class:`kb-comments__input`,onKeydown:[Fe(k(ur,[`ctrl`,`prevent`]),[`enter`]),Fe(k(ur,[`meta`,`prevent`]),[`enter`])]},[B(S(ge),{modelValue:zt.value,"onUpdate:modelValue":n[43]||=e=>zt.value=e,markdown:``,placeholder:S(d)(`comments.placeholder`),"min-height":`1.4rem`,"max-height":`7.1rem`,"handle-files":e=>pu(e,`comment`),mentions:Nr.value,onLinkClick:Li},null,8,[`modelValue`,`placeholder`,`handle-files`,`mentions`]),B(Mn,{files:Bt.value,preview:fr,openable:!1,removable:``,"remove-label":S(d)(`editor.removeFile`),compact:``,onRemove:mu},null,8,[`files`,`remove-label`]),B(Zr,{queue:pt.value,errors:ft.value,uploading:dt.value,"uploading-label":S(d)(`editor.uploading`)},null,8,[`queue`,`errors`,`uploading`,`uploading-label`]),L(`div`,Ys,[L(`label`,{class:`kb-comments__attach`,title:S(d)(`comments.attach`)},[n[105]||=L(`i`,{class:`pi pi-paperclip`},null,-1),L(`input`,{type:`file`,multiple:``,onChange:fu},null,32)],8,Xs),L(`span`,Zs,g(S(d)(`comments.sendHint`)),1),B(S(p),{label:S(d)(`comments.send`),icon:`pi pi-send`,size:`small`,disabled:!zt.value.trim()&&!Bt.value.length,onClick:ur},null,8,[`label`,`disabled`])])],40,Js))])]),_:1}),B(S(Je),{value:`history`},{default:O(()=>[L(`div`,Qs,[V.value.card.history?.length?(F(),x(`div`,ec,[(F(!0),x(a,null,z([...V.value.card.history].reverse(),(e,t)=>(F(),x(`div`,{key:t,class:R([`kb-history__item`,{"kb-history__item--clickable":Qi(e)}]),onClick:t=>Qi(e)&&ea(e)},[L(`div`,nc,[L(`i`,{class:R(ta[e.type])},null,2)]),L(`div`,rc,[L(`span`,ic,[w(g(cu.value[e.type])+` `,1),Qi(e)?(F(),x(`i`,ac)):v(``,!0)]),e.detail?(F(),x(`span`,oc,g(e.detail),1)):v(``,!0),L(`span`,sc,[w(g(lu(e.timestamp))+` `,1),e.authorUser?.name?(F(),x(a,{key:0},[w(` · `+g(S(d)(`history.by`,{name:e.authorUser.name})),1)],64)):v(``,!0)])])],10,tc))),128))])):(F(),x(`div`,$s,[n[106]||=L(`i`,{class:`pi pi-clock`},null,-1),L(`span`,null,g(S(d)(`history.empty`)),1)]))])]),_:1}),(F(!0),x(a,null,z(Hn.value,t=>(F(),_(S(Je),{key:t,value:`conv-${t}`},{default:O(()=>[B(qi,{t:S(d),conversations:qn(t),"can-edit":Kn.value,preview:fr,resync:e.resyncConversation?Zn:void 0,onOpenFile:wr,onUnlink:Qn,onOpenCard:n[44]||=e=>kn(e.cardId,e.boardId)},null,8,[`t`,`conversations`,`can-edit`,`resync`])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`value`]),V.value&&Wn.value?(F(),_(na,{key:1,t:S(d),visible:!!Wn.value,"provider-label":S(d)(`conversations.providers.${Wn.value}`),integrations:Jn(Wn.value),"card-id":V.value.card.id,"linked-ids":Vn.value.map(e=>e.id),search:Yn,link:Xn,onClose:n[46]||=e=>Wn.value=null,onLinked:Gn,onOpenCard:n[47]||=e=>{Wn.value=null,kn(e.cardId,e.boardId)}},null,8,[`t`,`visible`,`provider-label`,`integrations`,`card-id`,`linked-ids`])):v(``,!0)]),L(`aside`,cc,[L(`div`,lc,[V.value.card.createdBy?(F(),x(`p`,uc,[n[107]||=L(`i`,{class:`pi pi-user`},null,-1),w(` `+g(S(d)(`editor.createdBy`,{name:V.value.card.createdBy.name})),1)])):v(``,!0),L(`p`,null,[n[108]||=L(`i`,{class:`pi pi-calendar-plus`},null,-1),w(` `+g(lu(V.value.card.createdAt)),1)]),L(`p`,null,[n[109]||=L(`i`,{class:`pi pi-clock`},null,-1),w(` `+g(lu(V.value.card.updatedAt)),1)])]),L(`div`,dc,[zn.value?(F(),x(`div`,fc,[L(`span`,pc,g(S(d)(`editor.columnSettingLabel`)),1),!e.readOnly&&!Qt.value?(F(),_(S(ke),{key:0,"model-value":V.value.card.archivedFrom?.columnId??null,options:E.value.map(e=>({id:e.id,title:e.title})),"option-label":`title`,"option-value":`id`,placeholder:S(d)(`archive.editorPick`),size:`small`,class:`kb-side__control`,"onUpdate:modelValue":n[48]||=e=>{or.value=e}},null,8,[`model-value`,`options`,`placeholder`])):v(``,!0),or.value?(F(),x(`div`,mc,[B(S(p),{label:S(d)(`archive.pickMove`),icon:`pi pi-replay`,size:`small`,onClick:n[49]||=e=>{cr(V.value.card.id,or.value),or.value=null,sn()}},null,8,[`label`]),B(S(p),{label:S(d)(`archive.pickCopy`),icon:`pi pi-copy`,size:`small`,severity:`secondary`,outlined:``,onClick:n[50]||=e=>{sr(V.value.card,or.value),or.value=null}},null,8,[`label`]),B(S(p),{label:S(d)(`editor.cancel`),size:`small`,text:``,severity:`secondary`,onClick:n[51]||=e=>or.value=null},null,8,[`label`])])):(F(),x(`p`,hc,[n[110]||=L(`i`,{class:`pi pi-inbox`},null,-1),w(` `+g(S(d)(`archive.editorPickHint`)),1)]))])):(F(),x(`div`,gc,[L(`span`,_c,[w(g(S(d)(`editor.columnSettingLabel`))+` `,1),e.otherBoards.length&&e.moveCardToBoard&&!Bn.value?o((F(),x(`i`,{key:0,class:`pi pi-info-circle kb-side__info`,tabindex:`0`,"aria-label":S(d)(`editor.moveToBoardHint`)},null,8,vc)),[[i,{value:S(d)(`editor.moveToBoardHint`),showDelay:150},void 0,{left:!0}]]):v(``,!0)]),B(S(ke),{"model-value":Lt.value,options:An.value,"option-label":`title`,"option-value":`id`,"option-group-label":`label`,"option-group-children":`items`,disabled:Bn.value,filter:An.value.length>1,"filter-placeholder":S(d)(`editor.columnSearchPlaceholder`),"empty-filter-message":S(d)(`editor.columnSearchEmpty`),"auto-filter-focus":!0,size:`small`,class:`kb-side__control`,"onUpdate:modelValue":jn},{optiongroup:O(({option:e})=>[L(`span`,{class:R([`kb-colgroup`,{"kb-colgroup--away":e.items[0]?.boardId}])},[L(`i`,{class:R(e.items[0]?.boardId?`pi pi-th-large`:`pi pi-map-marker`)},null,2),L(`span`,yc,g(e.label),1)],2)]),option:O(({option:e})=>[L(`span`,bc,[e.boardId?(F(),x(`i`,xc)):v(``,!0),L(`span`,null,g(e.title),1)])]),_:1},8,[`model-value`,`options`,`disabled`,`filter`,`filter-placeholder`,`empty-filter-message`])])),e.members.length?(F(),x(`div`,Sc,[L(`span`,Cc,[w(g(S(d)(`editor.assigneesLabel`)),1),Ce.value?(F(),x(`button`,{key:0,type:`button`,class:`kb-side__self`,onClick:we},g(S(d)(`editor.assignMe`)),1)):v(``,!0),o(L(`i`,{class:`pi pi-info-circle kb-side__info`,tabindex:`0`,"aria-label":S(d)(`editor.assigneesHint`)},null,8,wc),[[i,{value:S(d)(`editor.assigneesHint`),showDelay:150},void 0,{left:!0}]])]),B(S(He),{modelValue:_t.value,"onUpdate:modelValue":n[52]||=e=>_t.value=e,options:e.members,"option-label":`name`,"option-value":`userId`,placeholder:S(d)(`editor.assigneesPlaceholder`),disabled:Bn.value,display:`chip`,filter:``,size:`small`,class:`kb-side__control`},{chip:O(({value:t})=>[L(`span`,{class:`kb-card__avatar`,style:ye(S(rn)(t)),title:Pr(t)},[e.avatarUrl&&!jr.has(t)?(F(),x(`img`,{key:0,src:e.avatarUrl(t),alt:``,onError:e=>jr.add(t)},null,40,Ec)):(F(),x(a,{key:1},[w(g(Mr(Pr(t))),1)],64))],12,Tc)]),option:O(({option:t})=>[L(`span`,Dc,[L(`span`,{class:`kb-card__avatar`,style:ye(S(rn)(t.userId))},[e.avatarUrl&&!jr.has(t.userId)?(F(),x(`img`,{key:0,src:e.avatarUrl(t.userId),alt:``,onError:e=>jr.add(t.userId)},null,40,Oc)):(F(),x(a,{key:1},[w(g(Mr(t.name)),1)],64))],4),w(` `+g(t.name),1)])]),_:1},8,[`modelValue`,`options`,`placeholder`,`disabled`])])):v(``,!0)]),L(`div`,kc,[L(`div`,Ac,[L(`span`,jc,[w(g(S(d)(`editor.priorityLabel`))+` `,1),St.value===null?v(``,!0):(F(),x(`span`,Mc,g(St.value)+`/10`,1))]),St.value===null?Bn.value?(F(),x(`p`,Fc,g(S(d)(`editor.priorityNone`)),1)):(F(),x(`button`,{key:1,class:`kb-prio__set`,onClick:Dt},[n[112]||=L(`i`,{class:`pi pi-plus`},null,-1),w(` `+g(S(d)(`editor.priorityAdd`)),1)])):(F(),x(`div`,Nc,[B(S(st),{modelValue:St.value,"onUpdate:modelValue":n[53]||=e=>St.value=e,min:1,max:10,step:1,disabled:Bn.value,class:`kb-prio__slider`},null,8,[`modelValue`,`disabled`]),Bn.value?v(``,!0):(F(),x(`button`,{key:0,class:`kb-prio__clear`,title:S(d)(`editor.priorityClear`),onClick:n[54]||=e=>St.value=null},[...n[111]||=[L(`i`,{class:`pi pi-times`},null,-1)]],8,Pc))]))]),L(`div`,Ic,[L(`span`,Lc,g(S(d)(`editor.deadlineLabel`)),1),L(`div`,Rc,[B(S(Ft),{modelValue:Ct.value,"onUpdate:modelValue":n[55]||=e=>Ct.value=e,"date-format":`dd/mm/yy`,"show-icon":``,"icon-display":`input`,"show-button-bar":``,disabled:Bn.value,placeholder:S(d)(`editor.deadlineNone`),size:`small`,class:`kb-side__control`},null,8,[`modelValue`,`disabled`,`placeholder`]),!Bn.value&&Ct.value?(F(),x(`button`,{key:0,class:`kb-prio__clear`,title:S(d)(`editor.deadlineClear`),onClick:n[56]||=e=>Ct.value=null},[...n[113]||=[L(`i`,{class:`pi pi-times`},null,-1)]],8,zc)):v(``,!0)]),Ct.value?(F(),x(`p`,Bc,g(wt.value),1)):v(``,!0)])]),L(`div`,Vc,[L(`div`,Hc,[L(`span`,Uc,[w(g(S(d)(`editor.groupsLabel`)),1),o(L(`i`,{class:`pi pi-info-circle kb-side__info`,tabindex:`0`,"aria-label":S(d)(`editor.groupsHint`)},null,8,Wc),[[i,{value:S(d)(`editor.groupsHint`),showDelay:150},void 0,{left:!0}]])]),B(S(Ye),{modelValue:vt.value,"onUpdate:modelValue":n[57]||=e=>vt.value=e,multiple:``,suggestions:yt.value,disabled:Bn.value,placeholder:vt.value.length?``:S(d)(`editor.groupsPlaceholder`),"complete-on-focus":!0,delay:120,size:`small`,class:`kb-side__control kb-groups`,onComplete:xt,onItemSelect:jt,onKeydown:Fe(Mt,[`enter`]),onFocusout:Mt},{option:O(({option:e})=>[L(`span`,Gc,[L(`i`,{class:R(bt.value.includes(e)?`pi pi-tag`:`pi pi-plus`)},null,2),L(`span`,null,g(bt.value.includes(e)?e:S(d)(`editor.groupsCreate`,{name:e})),1)])]),_:1},8,[`modelValue`,`suggestions`,`disabled`,`placeholder`])]),L(`div`,Kc,[L(`span`,qc,[w(g(S(d)(`editor.colorLabel`)),1),o(L(`i`,{class:`pi pi-info-circle kb-side__info`,tabindex:`0`,"aria-label":S(d)(`editor.colorHint`)},null,8,Jc),[[i,{value:S(d)(`editor.colorHint`),showDelay:150},void 0,{left:!0}]])]),L(`div`,Yc,[o((F(),x(`button`,{class:R([`kb-colors__swatch kb-colors__swatch--none`,{"kb-colors__swatch--on":!Pt.value}]),disabled:Bn.value,onClick:n[58]||=e=>Pt.value=``},[...n[114]||=[L(`i`,{class:`pi pi-ban`},null,-1)]],10,Xc)),[[i,{value:S(d)(`editor.colorNone`),showDelay:0,hideDelay:0},void 0,{bottom:!0}]]),(F(),x(a,null,z(It,e=>o(L(`button`,{key:e,class:R([`kb-colors__swatch`,{"kb-colors__swatch--on":Pt.value===e}]),style:ye({background:e}),disabled:Bn.value,onClick:t=>Pt.value=e},null,14,Zc),[[i,{value:e,showDelay:0,hideDelay:0},void 0,{bottom:!0}]])),64))])])]),L(`div`,Qc,[Dn.value.length?(F(),x(`div`,$c,[L(`span`,el,g(S(d)(`editor.ancestryLabel`)),1),L(`ul`,tl,[(F(!0),x(a,null,z(Dn.value,(e,t)=>(F(),x(`li`,{key:e.cardId,class:`kb-tree__row`,style:ye({paddingLeft:`${t*.75}rem`})},[t?(F(),x(`i`,nl)):v(``,!0),L(`button`,{class:`kb-tree__label`,title:e.here?S(d)(`editor.childOpen`):S(d)(`editor.openOnBoard`,{board:e.boardName}),onClick:t=>kn(e.cardId,e.boardId)},g(e.title),9,rl)],4))),128)),L(`li`,{class:`kb-tree__row kb-tree__row--self`,style:ye({paddingLeft:`${Dn.value.length*.75}rem`})},[n[115]||=L(`i`,{class:`pi pi-angle-right kb-tree__branch`},null,-1),L(`span`,il,g(ot.value.trim()||S(d)(`card.untitled`)),1)],4)])])):v(``,!0),Un.value.length&&(Kn.value||Vn.value.length)?(F(),x(`div`,al,[L(`span`,ol,g(S(d)(`conversations.sideLabel`)),1),L(`ul`,sl,[(F(!0),x(a,null,z(Un.value,e=>(F(),x(`li`,{key:e,class:`kb-convs__row`},[qn(e).length?(F(),x(`button`,{key:0,type:`button`,class:`kb-convs__name kb-convs__name--open`,"aria-label":S(d)(`conversations.linkedCount`,{name:S(d)(`conversations.providers.${e}`),count:qn(e).length}),onClick:t=>Rt.value=`conv-${e}`},[n[116]||=L(`i`,{class:`pi pi-comments`,"aria-hidden":`true`},null,-1),L(`span`,null,g(S(d)(`conversations.providers.${e}`)),1),L(`span`,ll,g(qn(e).length),1)],8,cl)):(F(),x(`span`,ul,[n[117]||=L(`i`,{class:`pi pi-comments`,"aria-hidden":`true`},null,-1),L(`span`,null,g(S(d)(`conversations.providers.${e}`)),1)])),Kn.value?o((F(),_(S(p),{key:2,icon:`pi pi-link`,size:`small`,text:``,rounded:``,class:`kb-convs__link`,"aria-label":S(d)(`conversations.linkFrom`,{name:S(d)(`conversations.providers.${e}`)}),onClick:t=>Wn.value=e},null,8,[`aria-label`,`onClick`])),[[i,{value:S(d)(`conversations.linkFrom`,{name:S(d)(`conversations.providers.${e}`)}),showDelay:150},void 0,{left:!0}]]):v(``,!0)]))),128))])])):v(``,!0),$i.value.length?(F(),x(`div`,dl,[L(`span`,fl,g(S(d)(`editor.conversationsLabel`)),1),L(`div`,pl,[(F(!0),x(a,null,z($i.value,e=>(F(),x(`a`,{key:e.id,class:`kb-side__conv`,title:e.title,onClick:t=>l(`open-conversation`,e.id)},[n[118]||=L(`i`,{class:`pi pi-comments`},null,-1),L(`span`,hl,g(e.label),1)],8,ml))),128))])])):v(``,!0),t.$slots[`card-editor-actions`]&&!zn.value?(F(),x(`div`,gl,[L(`span`,_l,g(S(d)(`editor.actionsLabel`)),1),L(`div`,vl,[I(t.$slots,`card-editor-actions`,{card:V.value.card,colId:V.value.colId,draft:{title:ot.value,markdown:ct.value}},void 0,!0)])])):v(``,!0)]),!e.readOnly&&!Qt.value?(F(),x(`div`,yl,[zn.value?(F(),_(S(p),{key:0,label:S(d)(`archive.restore`),icon:`pi pi-replay`,severity:`secondary`,text:``,size:`small`,onClick:n[59]||=e=>{cr(V.value.card.id),sn()}},null,8,[`label`])):(F(),_(S(p),{key:1,label:S(d)(`archive.cardAction`),icon:`pi pi-inbox`,severity:`secondary`,text:``,size:`small`,onClick:n[60]||=e=>ar(V.value.colId,V.value.card.id)},null,8,[`label`])),B(S(p),{label:S(d)(`editor.deleteCard`),icon:`pi pi-trash`,severity:`danger`,text:``,size:`small`,onClick:n[61]||=e=>lr(V.value.colId,V.value.card.id)},null,8,[`label`])])):v(``,!0)])])):v(``,!0)]),_:3},8,[`visible`,`header`,`dismissable-mask`,`class`,`style`]),B(S(ne),{visible:!!yr.value,header:yr.value?.file.name??``,modal:!0,"dismissable-mask":``,class:`kb-viewer-dialog`,style:{width:`min(1200px, 92vw)`,height:`88vh`},"onUpdate:visible":n[63]||=e=>{e||kr()}},{footer:O(()=>[B(S(p),{label:S(d)(`editor.viewerDownload`),icon:`pi pi-download`,text:``,onClick:Or},null,8,[`label`]),B(S(p),{label:S(d)(`editor.close`),onClick:kr},null,8,[`label`])]),default:O(()=>[yr.value?(F(),x(`div`,Sl,[yr.value.kind===`image`?(F(),x(`img`,{key:0,src:yr.value.url,alt:yr.value.file.name,class:`kb-viewer__image`},null,8,Cl)):yr.value.kind===`pdf`?(F(),x(`iframe`,{key:1,src:yr.value.url,title:yr.value.file.name,class:`kb-viewer__frame`},null,8,wl)):yr.value.kind===`video`?(F(),x(`video`,{key:2,src:yr.value.url,controls:``,class:`kb-viewer__media`},null,8,Tl)):yr.value.kind===`audio`?(F(),x(`audio`,{key:3,src:yr.value.url,controls:``,class:`kb-viewer__audio`},null,8,El)):yr.value.office?.mode===`sheet`?(F(),x(`div`,Dl,[yr.value.office.sheets.length>1?(F(),x(`div`,Ol,[(F(!0),x(a,null,z(yr.value.office.sheets,(e,t)=>(F(),x(`button`,{key:e.name+t,class:R([`kb-viewer__tab`,{"kb-viewer__tab--active":t===br.value}]),onClick:e=>br.value=t},g(e.name),11,kl))),128))])):v(``,!0),L(`div`,Al,[xr.value&&xr.value.rows.length?(F(),x(`table`,jl,[L(`thead`,null,[L(`tr`,null,[(F(!0),x(a,null,z(xr.value.rows[0],(e,t)=>(F(),x(`th`,{key:t},g(e),1))),128))])]),L(`tbody`,null,[(F(!0),x(a,null,z(xr.value.rows.slice(1),(e,t)=>(F(),x(`tr`,{key:t},[(F(!0),x(a,null,z(e,(e,t)=>(F(),x(`td`,{key:t},g(e),1))),128))]))),128))])])):(F(),x(`p`,Ml,g(S(d)(`editor.viewerEmpty`)),1))])])):yr.value.office?.mode===`blocks`?(F(),x(`div`,Nl,[L(`div`,Pl,[(F(!0),x(a,null,z(yr.value.office.blocks,(e,t)=>(F(),x(a,{key:t},[e.type===`heading`&&e.level===1?(F(),x(`h1`,Fl,g(e.text),1)):e.type===`heading`&&e.level===2?(F(),x(`h2`,Il,g(e.text),1)):e.type===`heading`?(F(),x(`h3`,Ll,g(e.text),1)):e.type===`list`?(F(),x(`li`,Rl,g(e.text),1)):e.type===`table`?(F(),x(`table`,zl,[L(`tbody`,null,[(F(!0),x(a,null,z(e.rows,(e,t)=>(F(),x(`tr`,{key:t},[(F(!0),x(a,null,z(e,(e,t)=>(F(),x(`td`,{key:t},g(e),1))),128))]))),128))])])):(F(),x(`p`,Bl,g(e.text),1))],64))),128)),yr.value.office.blocks.length?v(``,!0):(F(),x(`p`,Vl,g(S(d)(`editor.viewerEmpty`)),1))])])):yr.value.office?.mode===`slides`?(F(),x(`div`,Hl,[L(`div`,Ul,[(F(!0),x(a,null,z(yr.value.office.slides,(e,t)=>(F(),x(`section`,{key:t,class:`kb-viewer__slide`},[L(`span`,Wl,g(t+1),1),e.title?(F(),x(`h3`,Gl,g(e.title),1)):v(``,!0),(F(!0),x(a,null,z(e.lines,(e,t)=>(F(),x(`p`,{key:t},g(e),1))),128))]))),128))])])):yr.value.office?.mode===`render`?(F(),x(`div`,Kl,[Cr.value?(F(),x(`p`,ql,g(S(d)(`editor.viewerFailed`)),1)):v(``,!0),o(L(`div`,{ref_key:`renderHost`,ref:Sr,class:`kb-viewer__scroll kb-viewer__render`},null,512),[[r,!Cr.value]])])):(F(),x(`pre`,Jl,g(yr.value.text),1)),yr.value.office&&yr.value.office.mode!==`render`&&yr.value.office.truncated?(F(),x(`p`,Yl,[n[120]||=L(`i`,{class:`pi pi-exclamation-triangle`},null,-1),w(` `+g(S(d)(`editor.viewerTruncated`)),1)])):v(``,!0)])):v(``,!0)]),_:1},8,[`visible`,`header`]),B(S(Pe),{ref_key:`colMenu`,ref:fi,onHide:n[68]||=e=>pi.value=null},{default:O(()=>[pi.value?(F(),x(`div`,Xl,[L(`div`,Zl,[I(t.$slots,`column-actions`,{column:pi.value},void 0,!0)]),Kr.value?(F(),x(`button`,{key:0,class:`kb-colmenu__item`,onClick:n[64]||=e=>gi(vi)},[n[121]||=L(`i`,{class:`pi pi-bell`},null,-1),L(`span`,null,g(ii(pi.value.id)?S(d)(`column.unsubscribe`):S(d)(`column.subscribe`)),1)])):v(``,!0),e.readOnly?v(``,!0):(F(),x(`button`,{key:1,class:`kb-colmenu__item`,onClick:n[65]||=e=>gi(rt)},[n[122]||=L(`i`,{class:`pi pi-check-circle`},null,-1),L(`span`,null,g(pi.value.done?S(d)(`column.unmarkDone`):S(d)(`column.markDone`)),1)])),L(`button`,{class:`kb-colmenu__item`,onClick:n[66]||=e=>gi(Fi)},[n[123]||=L(`i`,{class:`pi pi-angle-double-left`},null,-1),L(`span`,null,g(S(d)(`column.collapse`)),1)]),e.readOnly?v(``,!0):(F(),x(`button`,{key:2,class:`kb-colmenu__item kb-colmenu__item--danger`,onClick:n[67]||=e=>gi(it)},[n[124]||=L(`i`,{class:`pi pi-trash`},null,-1),L(`span`,null,g(S(d)(`column.deleteTooltip`)),1)]))])):v(``,!0)]),_:3},512)],512)}}}),[[`__scopeId`,`data-v-6f2f6859`]]),lu=Object.defineProperty,uu=Object.defineProperties,du=Object.getOwnPropertyDescriptors,fu=Object.getOwnPropertySymbols,pu=Object.prototype.hasOwnProperty,mu=Object.prototype.propertyIsEnumerable,hu=(e,t,n)=>t in e?lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,H=(e,t)=>{for(var n in t||={})pu.call(t,n)&&hu(e,n,t[n]);if(fu)for(var n of fu(t))mu.call(t,n)&&hu(e,n,t[n]);return e},U=(e,t)=>uu(e,du(t)),W=(e,t,n)=>hu(e,typeof t==`symbol`?t:t+``,n),gu=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),G=class{static isSSR(){return typeof window>`u`||typeof document>`u`}static isBrowser(){return!this.isSSR()}static hasAPI(e){return this.isSSR()?!1:window[e]!==void 0}static getApex(){return typeof window<`u`&&window.Apex?window.Apex:typeof globalThis<`u`&&globalThis.Apex?globalThis.Apex:{}}},_u=class e{constructor(e,t=null){this.nodeName=e,this.namespaceURI=t,this.attributes=new Map,this.children=[],this.textContent=``,this.style={},this.classList=new vu,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){if(e&&e!==this){if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}e.parentNode=this,this.children.push(e)}return e}removeChild(e){let t=this.children.indexOf(e);return t!==-1&&(this.children.splice(t,1),e.parentNode=null),e}insertBefore(e,t){if(!t)return this.appendChild(e);if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}let n=this.children.indexOf(t);return n!==-1&&(e.parentNode=this,this.children.splice(n,0,e)),e}cloneNode(t=!1){let n=new e(this.nodeName,this.namespaceURI);return n.textContent=this.textContent,this.attributes.forEach((e,t)=>{n.attributes.set(t,e)}),Object.assign(n.style,this.style),t&&this.children.forEach(e=>{e.cloneNode&&n.appendChild(e.cloneNode(!0))}),n}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let e=this;for(;e.parentNode;)e=e.parentNode;return e}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let e=``;if(this.attributes.forEach((t,n)=>{e+=` ${n}="${t}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${e}/>`;let t=this.children.map(e=>e.toString()).join(``);return`<${this.nodeName}${e}>${this.textContent}${t}</${this.nodeName}>`}get innerHTML(){return this.children.map(e=>e.toString()).join(``)}set innerHTML(e){this.children=[],this.textContent=e}get outerHTML(){return this.toString()}get isConnected(){return!0}},vu=class{constructor(){this.classes=new Set}add(...e){e.forEach(e=>this.classes.add(e))}remove(...e){e.forEach(e=>this.classes.delete(e))}contains(e){return this.classes.has(e)}toggle(e,t){return t===!0?(this.classes.add(e),!0):t===!1||this.classes.has(e)?(this.classes.delete(e),!1):(this.classes.add(e),!0)}toString(){return Array.from(this.classes).join(` `)}},yu=class{constructor(){this.SVGNS=`http://www.w3.org/2000/svg`,this.XLINKNS=`http://www.w3.org/1999/xlink`}createElementNS(e,t){return new _u(t,e)}createTextNode(e){let t={nodeName:`#text`,nodeType:3,textContent:e,toString(){return t.textContent}};return t}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString(e){return e.toString?e.toString():``}}}createDOMParser(){return{parseFromString(e,t){let n=new _u(`root`);return n.innerHTML=e,{documentElement:n}}}}},bu=null,xu=null,Su=null,K=class{static init(){G.isSSR()&&!bu&&(bu=new yu)}static createElement(e){return G.isSSR()?(bu||this.init(),bu.createElementNS(null,e)):document.createElement(e)}static createElementNS(e,t){return G.isSSR()?(bu||this.init(),bu.createElementNS(e,t)):document.createElementNS(e,t)}static createTextNode(e){return G.isSSR()?(bu||this.init(),bu.createTextNode(e)):document.createTextNode(e)}static querySelector(e){return G.isSSR()?null:document.querySelector(e)}static querySelectorAll(e){return G.isSSR()?[]:document.querySelectorAll(e)}static getComputedStyle(e){return G.isSSR()?{}:window.getComputedStyle(e)}static matchMedia(e){if(G.isSSR()||typeof window.matchMedia!=`function`)return null;try{return window.matchMedia(e)}catch{return null}}static getBoundingClientRect(e){return G.isSSR()?(bu||this.init(),bu.getBoundingClientRect(e)):e?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return G.isSSR()?(bu||this.init(),xu||=bu.createXMLSerializer(),xu):(xu||=new XMLSerializer,xu)}static getDOMParser(){return G.isSSR()?(bu||this.init(),Su||=bu.createDOMParser(),Su):(Su||=new DOMParser,Su)}static addWindowEventListener(e,t,n){G.isBrowser()&&window.addEventListener(e,t,n)}static removeWindowEventListener(e,t,n){G.isBrowser()&&window.removeEventListener(e,t,n)}static requestAnimationFrame(e){return G.isBrowser()?window.requestAnimationFrame(e):(e(0),null)}static cancelAnimationFrame(e){G.isBrowser()&&e&&window.cancelAnimationFrame(e)}static elementExists(e){return e?G.isSSR()?e._ssrMode===!0||e.nodeName!==void 0:e.getRootNode?e.getRootNode({composed:!0})===document||e.isConnected:!1:!1}static getWindow(){return G.isBrowser()?window:null}static getDocument(){return G.isBrowser()?document:null}static _getShim(){return bu}static _resetShim(){bu=null,xu=null,Su=null}},Cu=new WeakMap,wu=0,q=class e{static isObject(e){return e&&typeof e==`object`&&!Array.isArray(e)}static is(e,t){return Object.prototype.toString.call(t)===`[object `+e+`]`}static isSafari(){return G.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(e,t){if(!this.isObject(e)&&this.isObject(t))return this.clone(t);let n=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(r=>{this.isObject(t[r])&&r in e?n[r]=this.extend(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}static copySeriesShallow(e){return Array.isArray(e)?e.map(e=>this.isObject(e)?H({},e):e):e}static extendArray(t,n){let r=[];return t.map(t=>{r.push(e.extend(n,t))}),t=r,t}static monthMod(e){return e%12}static clone(e,t=new WeakMap,n=!1){if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);let r;if(Array.isArray(e))if(n)r=e.slice();else{r=[],t.set(e,r);for(let n=0;n<e.length;n++)r[n]=this.clone(e[n],t,!1)}else if(e instanceof Date)r=new Date(e.getTime());else if(n)r=Object.assign({},e);else for(let n in r={},t.set(e,r),e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=this.clone(e[n],t,!1));return r}static shallowClone(e){return typeof e!=`object`||!e?e:Array.isArray(e)?e.slice():Object.assign({},e)}static stringifyForCompare(e){return JSON.stringify(e,(e,t)=>{if(typeof t!=`function`)return t;let n=Cu.get(t);return n===void 0&&(n=++wu,Cu.set(t,n)),`__apx_fn_${n}`})}static shallowEqual(e,t){if(e===t)return!0;if(!e||!t)return!1;if(typeof e!=`object`||typeof t!=`object`)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}static log10(e){return Math.log(e)/Math.LN10}static roundToBase10(e){return 10**Math.floor(Math.log10(e))}static roundToBase(e,t){return t**+Math.floor(Math.log(e)/Math.log(t))}static parseNumber(e){return typeof e==`number`||e===null?e:parseFloat(e)}static stripNumber(e,t=2){return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(e){return e.toString().includes(`e`)?Math.round(e):e}static elementExists(e){return!(!e||!e.isConnected)}static getDimensions(e){if(!e)return[0,0];if(G.isSSR())return[e._ssrWidth||400,e._ssrHeight||300];let t;try{t=getComputedStyle(e,null)}catch{return[e.clientWidth||0,e.clientHeight||0]}let n=e.clientWidth,r=e.clientHeight;if(!n||!r){let t=e.getBoundingClientRect();n||=t.width,r||=t.height}return r-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),n-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),[n,r]}static getBoundingClientRect(e){if(!e)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(G.isSSR())return K.getBoundingClientRect(e);let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}static getLargestStringFromArr(e){return e.reduce((e,t)=>(Array.isArray(t)&&(t=t.reduce((e,t)=>e.length>t.length?e:t)),e.length>t.length?e:t),0)}static hexToRgba(e=`#999999`,t=.6){e.substring(0,1)!==`#`&&(e=`#999999`);let n=e.replace(`#`,``),r=n.match(RegExp(`(.{`+n.length/3+`})`,`g`))||[];for(let e=0;e<r.length;e++)r[e]=parseInt(r[e].length===1?r[e]+r[e]:r[e],16);return t!==void 0&&r.push(t),`rgba(`+r.join(`,`)+`)`}static getOpacityFromRGBA(e){return parseFloat(e.replace(/^.*,(.+)\)/,`$1`))}static parseHex(e){if(typeof e!=`string`)return null;let t=e.trim().replace(`#`,``);return t.length===3&&(t=t.split(``).map(e=>e+e).join(``)),/^[0-9a-fA-F]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]:null}static relativeLuminance([e,t,n]){let r=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)}static getContrastRatio(t,n){let r=e.parseHex(t),i=e.parseHex(n);if(!r||!i)return 0;let a=e.relativeLuminance(r),o=e.relativeLuminance(i),s=Math.max(a,o),c=Math.min(a,o);return(s+.05)/(c+.05)}static rgb2hex(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?`#`+(`0`+parseInt(e[1],10).toString(16)).slice(-2)+(`0`+parseInt(e[2],10).toString(16)).slice(-2)+(`0`+parseInt(e[3],10).toString(16)).slice(-2):``}shadeRGBColor(e,t){let n=t.split(`,`),r=e<0?0:255,i=e<0?e*-1:e,a=parseInt(n[0].slice(4),10),o=parseInt(n[1],10),s=parseInt(n[2],10);return`rgb(`+(Math.round((r-a)*i)+a)+`,`+(Math.round((r-o)*i)+o)+`,`+(Math.round((r-s)*i)+s)+`)`}shadeHexColor(e,t){let n=parseInt(t.slice(1),16),r=e<0?0:255,i=e<0?e*-1:e,a=n>>16,o=n>>8&255,s=n&255;return`#`+(16777216+(Math.round((r-a)*i)+a)*65536+(Math.round((r-o)*i)+o)*256+(Math.round((r-s)*i)+s)).toString(16).slice(1)}shadeColor(t,n){return e.isColorHex(n)?this.shadeHexColor(t,n):this.shadeRGBColor(t,n)}static isColorHex(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}static isCSSVariable(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.startsWith(`var(`)&&t.endsWith(`)`)}static getThemeColor(t){if(!e.isCSSVariable(t)||G.isSSR())return t;let n=document.createElement(`div`);n.style.cssText=`position:fixed; left: -9999px; visibility:hidden;`,n.style.color=t,document.body.appendChild(n);let r;try{r=window.getComputedStyle(n).color}finally{n.parentNode&&n.parentNode.removeChild(n)}return r}static applyOpacityToColor(e,t){let n=Number(t);return Number.isFinite(n)?n<=0?`transparent`:n>=1?e:`color-mix(in srgb, ${e} ${Math.round(n*100)}%, transparent)`:e}static getPolygonPos(e,t){let n=[],r=Math.PI*2/t;for(let i=0;i<t;i++){let t={};t.x=e*Math.sin(i*r),t.y=-e*Math.cos(i*r),n.push(t)}return n}static polarToCartesian(e,t,n,r){let i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}static escapeString(e,t=`x`){let n=e.toString().slice();return n=n.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,t),n}static negToZero(e){return e<0?0:e}static moveIndexInArray(e,t,n){if(n>=e.length){let t=n-e.length+1;for(;t--;)e.push(void 0)}return e.splice(n,0,e.splice(t,1)[0]),e}static extractNumber(e){return parseFloat(e.replace(/[^\d.]*/g,``))}static findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}static setELstyles(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e.style[n]=t[n])}static preciseAddition(e,t){let n=(String(e).split(`.`)[1]||``).length,r=(String(t).split(`.`)[1]||``).length,i=10**Math.max(n,r);return(Math.round(e*i)+Math.round(t*i))/i}static isNumber(e){return!isNaN(e)&&parseFloat(String(Number(e)))===e&&!isNaN(parseInt(e,10))}static isFloat(e){return Number(e)===e&&e%1!=0}static isMsEdge(){if(G.isSSR())return!1;let e=window.navigator.userAgent,t=e.indexOf(`Edge/`);return t>0?parseInt(e.substring(t+5,e.indexOf(`.`,t)),10):!1}static getGCD(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));for(r>1?(e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r)):r=1;t;){let n=t;t=e%t,e=n}return e/r}static getPrimeFactors(e){let t=[],n=2;for(;e>=2;)e%n==0?(t.push(n),e/=n):n++;return t}static mod(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));return e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r),e%t/r}},Tu=class{constructor(e){this.w=e,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(e){return typeof e==`number`?!1:!isNaN(this.parseDate(e))}getTimeStamp(e){return isNaN(Date.parse(e))?e:this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime()}getDate(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}parseDate(e){let t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);if(typeof e!=`string`)return NaN;let n=Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `));return n=this.getTimeStamp(n),n}parseDateWithTimezone(e){return Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `))}formatDate(e,t){let n=this.w.globals.locale,r=this.w.config.xaxis.labels.datetimeUTC,i=[`\0`,...n.months],a=[``,...n.shortMonths],o=[``,...n.days],s=[``,...n.shortDays];function c(e,t=2){let n=e+``;for(;n.length<t;)n=`0`+n;return n}let l=r?e.getUTCFullYear():e.getFullYear();t=t.replace(/(^|[^\\])yyyy+/g,`$1`+l),t=t.replace(/(^|[^\\])yy/g,`$1`+l.toString().substr(2,2)),t=t.replace(/(^|[^\\])y/g,`$1`+l);let u=(r?e.getUTCMonth():e.getMonth())+1;t=t.replace(/(^|[^\\])MMMM+/g,`$1`+i[0]),t=t.replace(/(^|[^\\])MMM/g,`$1`+a[0]),t=t.replace(/(^|[^\\])MM/g,`$1`+c(u)),t=t.replace(/(^|[^\\])M/g,`$1`+u);let d=r?e.getUTCDate():e.getDate();t=t.replace(/(^|[^\\])dddd+/g,`$1`+o[0]),t=t.replace(/(^|[^\\])ddd/g,`$1`+s[0]),t=t.replace(/(^|[^\\])dd/g,`$1`+c(d)),t=t.replace(/(^|[^\\])d/g,`$1`+d);let f=r?e.getUTCHours():e.getHours();t=t.replace(/(^|[^\\])HH+/g,`$1`+c(f)),t=t.replace(/(^|[^\\])H/g,`$1`+f);let p=f>12?f-12:f===0?12:f;t=t.replace(/(^|[^\\])hh+/g,`$1`+c(p)),t=t.replace(/(^|[^\\])h/g,`$1`+p);let m=r?e.getUTCMinutes():e.getMinutes();t=t.replace(/(^|[^\\])mm+/g,`$1`+c(m)),t=t.replace(/(^|[^\\])m/g,`$1`+m);let h=r?e.getUTCSeconds():e.getSeconds();t=t.replace(/(^|[^\\])ss+/g,`$1`+c(h)),t=t.replace(/(^|[^\\])s/g,`$1`+h);let g=r?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,`$1`+c(g,3)),g=Math.round(g/10),t=t.replace(/(^|[^\\])ff/g,`$1`+c(g)),g=Math.round(g/10),t=t.replace(/(^|[^\\])f/g,`$1`+g);let _=f<12?`AM`:`PM`;t=t.replace(/(^|[^\\])TT+/g,`$1`+_),t=t.replace(/(^|[^\\])T/g,`$1`+_.charAt(0));let v=_.toLowerCase();t=t.replace(/(^|[^\\])tt+/g,`$1`+v),t=t.replace(/(^|[^\\])t/g,`$1`+v.charAt(0));let y=-e.getTimezoneOffset(),b=r||!y?`Z`:y>0?`+`:`-`;if(!r){y=Math.abs(y);let e=Math.floor(y/60),t=y%60;b+=c(e)+`:`+c(t)}t=t.replace(/(^|[^\\])K/g,`$1`+b);let x=(r?e.getUTCDay():e.getDay())+1;return t=t.replace(new RegExp(o[0],`g`),o[x]),t=t.replace(new RegExp(s[0],`g`),s[x]),t=t.replace(new RegExp(i[0],`g`),i[u]),t=t.replace(new RegExp(a[0],`g`),a[u]),t=t.replace(/\\(.)/g,`$1`),t}getTimeUnitsfromTimestamp(e,t){let n=this.w;n.config.xaxis.min!==void 0&&(e=n.config.xaxis.min),n.config.xaxis.max!==void 0&&(t=n.config.xaxis.max);let r=this.getDate(e),i=this.getDate(t),a=this.formatDate(r,`yyyy MM dd HH mm ss fff`).split(` `),o=this.formatDate(i,`yyyy MM dd HH mm ss fff`).split(` `);return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(o[0],10)}}isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}calculcateLastDaysOfMonth(e,t,n){return this.determineDaysOfMonths(e,t)-n}determineDaysOfYear(e){let t=365;return this.isLeapYear(e)&&(t=366),t}determineRemainingDaysOfYear(e,t,n){let r=this.daysCntOfYear[t]+n;return t>1&&this.isLeapYear(e)&&r++,r}determineDaysOfMonths(e,t){let n=30;switch(e=q.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(n=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:n=31;break;default:n=31;break}return n}getDateFields(e,t){let n=new Date(e);return t?{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),ms:n.getUTCMilliseconds(),weekday:n.getUTCDay()}:{year:n.getFullYear(),month:n.getMonth(),date:n.getDate(),hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds(),ms:n.getMilliseconds(),weekday:n.getDay()}}addInterval(e,t,n,r){let i=new Date(e);if(r)switch(t){case`year`:i.setUTCFullYear(i.getUTCFullYear()+n);break;case`month`:i.setUTCMonth(i.getUTCMonth()+n);break;case`week`:i.setUTCDate(i.getUTCDate()+n*7);break;case`day`:i.setUTCDate(i.getUTCDate()+n);break;case`hour`:i.setUTCHours(i.getUTCHours()+n);break;case`minute`:i.setUTCMinutes(i.getUTCMinutes()+n);break;case`second`:i.setUTCSeconds(i.getUTCSeconds()+n);break}else switch(t){case`year`:i.setFullYear(i.getFullYear()+n);break;case`month`:i.setMonth(i.getMonth()+n);break;case`week`:i.setDate(i.getDate()+n*7);break;case`day`:i.setDate(i.getDate()+n);break;case`hour`:i.setHours(i.getHours()+n);break;case`minute`:i.setMinutes(i.getMinutes()+n);break;case`second`:i.setSeconds(i.getSeconds()+n);break}return i.getTime()}ceilToBoundary(e,t,n,r){let i=new Date(e);if(r)switch(t){case`second`:{let t=i.getUTCSeconds(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(r),i.getTime())}case`minute`:{let t=i.getUTCMinutes(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(r),i.getTime())}case`hour`:{let t=i.getUTCHours(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(r),i.getTime())}case`day`:return i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0),i.setUTCDate(i.getUTCDate()+1),i.getTime());case`week`:{let t=10080*60*1e3,r=Date.UTC(1970,0,5);i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0);let a=i.getTime(),o=Math.ceil((a-r)/t),s=r+Math.ceil(o/n)*n*t;return s>=e?s:s+n*t}case`month`:{let t=i.getUTCMonth(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCDate()===1&&i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0),i.setUTCDate(1),i.setUTCMonth(r),i.getTime())}case`year`:{let t=i.getUTCFullYear(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMonth()===0&&i.getUTCDate()===1&&i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:Date.UTC(r,0,1)}}else switch(t){case`second`:{let t=i.getSeconds(),r=Math.ceil(t/n)*n;return r===t&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(r),i.getTime())}case`minute`:{let t=i.getMinutes(),r=Math.ceil(t/n)*n;return r===t&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(r),i.getTime())}case`hour`:{let t=i.getHours(),r=Math.ceil(t/n)*n;return r===t&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(r),i.getTime())}case`day`:return i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0),i.setDate(i.getDate()+1),i.getTime());case`week`:{let t=10080*60*1e3,r=new Date(1970,0,5).getTime();i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0);let a=i.getTime(),o=Math.ceil((a-r)/t),s=r+Math.ceil(o/n)*n*t;return s>=e?s:s+n*t}case`month`:{let t=i.getMonth(),r=Math.ceil(t/n)*n;return r===t&&i.getDate()===1&&i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0),i.setDate(1),i.setMonth(r),i.getTime())}case`year`:{let t=i.getFullYear(),r=Math.ceil(t/n)*n;return r===t&&i.getMonth()===0&&i.getDate()===1&&i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:new Date(r,0,1).getTime()}}return e}isAtBoundary(e,t,n){let r=this.getDateFields(e,n);switch(t){case`year`:return r.month===0&&r.date===1&&r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`month`:return r.date===1&&r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`day`:return r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`hour`:return r.minute===0&&r.second===0&&r.ms===0;case`minute`:return r.second===0&&r.ms===0;case`second`:return r.ms===0}return!1}},Eu=class{constructor(e){this.w=e,this.tooltipKeyFormat=`dd MMM`}xLabelFormat(e,t,n,r){let i=this.w;if(i.config.xaxis.type===`datetime`&&i.config.xaxis.labels.formatter===void 0&&i.config.tooltip.x.formatter===void 0){let e=new Tu(this.w);return e.formatDate(e.getDate(t),i.config.tooltip.x.format)}return e(t,n,r)}defaultGeneralFormatter(e){return Array.isArray(e)?e.map(e=>e):e}defaultYFormatter(e,t){let n=this.w;if(q.isNumber(e))if(n.globals.yValueDecimal!==0)e=e.toFixed(t.decimalsInFloat===void 0?n.globals.yValueDecimal:t.decimalsInFloat);else{let t=e.toFixed(0);e=Number(t)===e?t:e.toFixed(1)}return e}setLabelFormatters(){let e=this.w,t=e.formatters;return t.xaxisTooltipFormatter=e=>this.defaultGeneralFormatter(e),t.ttKeyFormatter=e=>this.defaultGeneralFormatter(e),t.ttZFormatter=e=>e,t.legendFormatter=e=>this.defaultGeneralFormatter(e),e.config.xaxis.labels.formatter===void 0?t.xLabelFormatter=t=>{if(q.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&e.config.xaxis.type===`numeric`){if(q.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);{let n=e.globals.maxX-e.globals.minX;if(n>0){let e=n/10,r=Math.max(0,-Math.floor(Math.log10(e)));return t.toFixed(r)}return t.toFixed(0)}}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minY<4?t.toFixed(1):t.toFixed(0)}return t}:t.xLabelFormatter=e.config.xaxis.labels.formatter,typeof e.config.tooltip.x.formatter==`function`?t.ttKeyFormatter=e.config.tooltip.x.formatter:t.ttKeyFormatter=t.xLabelFormatter,typeof e.config.xaxis.tooltip.formatter==`function`&&(t.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||e.config.tooltip.y.formatter!==void 0)&&(t.ttVal=e.config.tooltip.y),e.config.tooltip.z.formatter!==void 0&&(t.ttZFormatter=e.config.tooltip.z.formatter),e.config.legend.formatter!==void 0&&(t.legendFormatter=e.config.legend.formatter),t.yLabelFormatters=[],e.config.yaxis.forEach((n,r)=>{if(n.labels.formatter!==void 0)t.yLabelFormatters[r]=n.labels.formatter;else if(e.config.chart.type===`violin`){let n=e=>typeof e==`number`&&isFinite(e)?`${Math.round(e*100)/100}`:e;t.yLabelFormatters[r]=t=>e.globals.xyCharts?Array.isArray(t)?t.map(n):n(t):t}else t.yLabelFormatters[r]=t=>e.globals.xyCharts?Array.isArray(t)?t.map(e=>this.defaultYFormatter(e,n)):this.defaultYFormatter(t,n):t}),e.globals}heatmapLabelFormatters(){let e=this.w;if(e.config.chart.type===`heatmap`){e.globals.yAxisScale[0].result=e.seriesData.seriesNames.slice();let t=e.seriesData.seriesNames.reduce((e,t)=>e.length>t.length?e:t,0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}},Du={name:`en`,options:{months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],toolbar:{exportToSVG:`Download SVG`,exportToPNG:`Download PNG`,exportToCSV:`Download CSV`,menu:`Menu`,selection:`Selection`,selectionZoom:`Selection Zoom`,zoomIn:`Zoom In`,zoomOut:`Zoom Out`,pan:`Panning`,reset:`Reset Zoom`,measure:`Measure`}}},Ou=class{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:`11px`,fontWeight:400,fontFamily:void 0,cssClass:``},formatter:void 0},axisBorder:{show:!1,color:`#e0e0e0`,width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:`#e0e0e0`,width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:`11px`,fontWeight:900,fontFamily:void 0,cssClass:``}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:`front`,stroke:{color:`#b6b6b6`,width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:`#fff`,strokeWidth:2,strokeColor:`#333`,shape:`circle`,offsetX:0,offsetY:0,cssClass:``},label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`middle`,offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:`#c2c2c2`,borderColor:`#c2c2c2`,borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:`100%`,yAxisIndex:0,label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`end`,position:`right`,offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:`#c2c2c2`,borderColor:`#c2c2c2`,borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`middle`,orientation:`vertical`,position:`top`,offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:``,textAnchor:`start`,foreColor:void 0,fontSize:`13px`,fontFamily:void 0,fontWeight:400,appendTo:`.apexcharts-annotations`,backgroundColor:`transparent`,borderColor:`#c2c2c2`,borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:`placeholder`,data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:`auto`,minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,order:`first-seen`,limit:void 0,virtualize:`auto`,scales:{x:`shared`,y:`shared`,color:`shared`,size:`shared`},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:`edges`},legend:`shared`,toolbar:`shared`,tooltip:`panel`,zoom:`sync`,promote:!0,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:`easeInOutSine`,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:``,locales:[Du],defaultLocale:`en`,perspectives:{serializeOptions:[`theme`,`xaxis`,`yaxis`,`title`,`subtitle`]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:`svg`,rendererThreshold:8e3,layers:{series:`auto`,grid:`svg`,annotations:`svg`,dataLabels:`svg`},dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:`#000`,opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,crossFilter:void 0,filterChange:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:`#373d3f`,fontFamily:`Helvetica, Arial, sans-serif`,height:`auto`,parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,print:{enabled:!0,width:700},id:void 0,group:void 0,nonce:void 0,license:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:`x`,fill:{color:`#24292e`,opacity:.1},stroke:{width:1,color:`#24292e`,opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},link:{enabled:!1,mode:`highlight`,dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:`span`,key:`m`,pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:[`annotate`,`xline`,`yline`,`measure`],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:`Note`,line:{text:``,strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:`normal`,streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:`,`,headerCategory:`category`,headerValue:`value`,categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0,embedFonts:!0},autoSelected:`zoom`},type:`line`,width:`100%`,zoom:{enabled:!0,type:`x`,autoScaleYaxis:!1,allowMouseWheelZoom:`auto`,pinch:`auto`,zoomedArea:{fill:{color:`#90CAF9`,opacity:.4},stroke:{color:`#0D47A1`,opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:`lttb`,targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:`origin`},bar:{horizontal:!1,columnWidth:`70%`,barHeight:`70%`,distributed:!1,borderRadius:0,borderRadiusApplication:`around`,rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,dumbbell:{connector:{color:void 0,opacity:.55},dataLabels:{enabled:!1,offset:6,colorFromMarker:!0,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,colors:void 0}},tooltip:{differenceLabel:`Difference`}},isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:`top`,maxItems:100,hideOverflowingLabels:!0,orientation:`horizontal`,total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:`#373d3f`,fontSize:`12px`,fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:`#00B746`,downward:`#EF403C`},wick:{useFillColor:!0}},boxPlot:{colors:{upper:`#00E396`,lower:`#008FFB`},whiskers:`minmax`,points:{show:!1,shape:`circle`,size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:`series-dark`,strokeColor:`#fff`,strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:`individual`,side:`both`,box:{show:!1,width:`15%`,whiskers:`minmax`,strokeWidth:1,fillColor:void 0,capWidth:.5},points:{show:!0,shape:`circle`,size:2.5,jitter:.5,constrainToViolin:!0,position:`center`,laneWidth:`40%`,maxPoints:3e3,opacity:.9,fillColor:`series-dark`,strokeColor:`#fff`,strokeWidth:1}},histogram:{bins:`auto`,binWidth:void 0,range:void 0,normalize:`count`,cumulative:!1,overlap:!0},heatmap:{shape:`rect`,radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:`70%`,height:`70%`,thickness:12,align:`center`,stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:`11px`,fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},waterfall:{colors:{positive:`#00A86F`,negative:`#FF4560`,subtotal:void 0,total:void 0},connectors:{show:!0,color:void 0,strokeWidth:1,strokeDashArray:3}},streamgraph:{offset:`wiggle`,order:`inside-out`,hover:{show:!0,opacity:.35},labels:{show:!0,minWidth:24,minFontSize:9,maxFontSize:30,style:{fontSize:`auto`,fontFamily:void 0,fontWeight:600,colors:void 0}}},funnel:{shape:`rectangle`,lastShape:`flat`},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:`scale`,minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:`70%`,height:`70%`,thickness:12,align:`center`,stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:`11px`,fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:`auto`,padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:`left`,offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:``}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:`#000`,borderWidth:1,borderRadius:2,style:{background:`rgba(0, 0, 0, 0.6)`,color:`#fff`,fontSize:`12px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:`grouped`,positions:void 0,transition:`group`,shape:`circle`,image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:`contain`,scale:1,padding:0,fallback:`circle`},size:`auto`,columns:{size:`inherit`},grid:{columns:10,total:void 0,fillFrom:`bottom`,split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:`lanes`,spread:`swarm`,orientation:`horizontal`,tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:`z`,sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:`auto`,minRadius:void 0,scale:`area`},spacing:1.05,borderRadius:0,gather:{motion:`auto`,spring:`crisp`,easing:`outCubic`,overshoot:1.70158,enter:`burst`},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:`auto`},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:`top`,curved:!0,fontSize:`13px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:`arc`,min:0,max:100,bands:[],bandsStyle:{strokeWidth:`40%`,gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:`#666`,placement:`outside`},minor:{count:4,length:5,width:1,color:`#999`,placement:`outside`},labels:{show:!1,offset:6,fontSize:`11px`,fontFamily:void 0,fontWeight:400,color:`#666`,formatter(e){return String(e)}}},needle:{color:`#333`,length:`85%`,baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:`ease-out`}},hollow:{margin:5,size:`50%`,background:`transparent`,image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:`front`,stroke:void 0,strokeWidth:1,strokeDasharray:void 0,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:`#000`,opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:`#f2f2f2`,strokeWidth:`97%`,opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:`#000`,opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:`16px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter(e){return e}},value:{show:!0,fontSize:`14px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(e){return e+`%`}},total:{show:!1,label:`Total`,fontSize:`16px`,fontWeight:600,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>e+t,0)/e.seriesData.series.length+`%`}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:`16px`,formatter(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:`65%`,background:`transparent`,labels:{show:!1,name:{show:!0,fontSize:`16px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(e){return e}},value:{show:!0,fontSize:`20px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(e){return e}},total:{show:!1,showAlways:!1,label:`Total`,fontSize:`16px`,fontWeight:400,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>e+t,0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:`#e8e8e8`},spokes:{strokeWidth:1,connectorColors:`#e8e8e8`}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:`15%`,borderRadius:0,spacing:1,leaf:`extend`,partition:`normalize`,tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:400,colors:void 0}}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:`#e8e8e8`,connectorColors:`#e8e8e8`,fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter(e){return e===null?``:e},textAnchor:`middle`,distributed:!1,offsetX:0,offsetY:0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:`#fff`,backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:`#fff`,dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8},animate:{enabled:!0},countUp:{enabled:!1}},fill:{type:`solid`,colors:void 0,opacity:.85,gradient:{shade:`dark`,type:`horizontal`,shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:`squares`,width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:`#e0e0e0`,strokeDashArray:0,position:`back`,xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:`top-left`,separator:` / `,rootLabel:`All`,offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:`#fff`}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:`bottom`,horizontalAlign:`center`,inverseOrder:!1,fontSize:`12px`,fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:`vertical`,labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:`#fff`,strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:`circle`,offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3},largeDatasetThreshold:0},noData:{text:void 0,align:`center`,offsetX:0,offsetY:0,style:{color:void 0,fontSize:`14px`,fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:`lighten`,value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:`darken`,value:.35}}},title:{text:void 0,align:`left`,margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:`14px`,fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:`left`,margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:`12px`,fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:`smooth`,lineCap:`butt`,width:2,colors:void 0,dashArray:0,fill:{type:`solid`,colors:void 0,opacity:.85,gradient:{shade:`dark`,type:`horizontal`,shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:`light`,cssClass:``,style:{fontSize:`12px`,fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:`dd MMM`,formatter:void 0},y:{formatter:void 0,title:{formatter(e){return e?e+`: `:``}}},z:{formatter:void 0,title:`Size: `},marker:{show:!0,fillColors:void 0},items:{display:`flex`},fixed:{enabled:!1,position:`topRight`,offsetX:0,offsetY:0}},xaxis:{type:`category`,categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:`12px`,fontWeight:400,fontFamily:void 0,cssClass:``},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:`yyyy`,month:`MMM`,day:`dd MMM`,hour:`HH:mm`,minute:`HH:mm`,second:`HH:mm:ss`}},group:{groups:[],style:{colors:[],fontSize:`12px`,fontWeight:400,fontFamily:void 0,cssClass:``}},axisBorder:{show:!0,color:`#e0e0e0`,width:`100%`,height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:`#e0e0e0`,height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:`on`,min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:`bottom`,title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:`12px`,fontWeight:900,fontFamily:void 0,cssClass:``}},crosshairs:{show:!0,width:1,position:`back`,opacity:.9,stroke:{color:`#b6b6b6`,width:1,dashArray:3},fill:{type:`solid`,color:`#B1B9C4`,gradient:{colorFrom:`#D8E3F0`,colorTo:`#BED1E6`,stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:``,palette:`palette1`,tokens:!0,follow:!1,name:``,monochrome:{enabled:!1,color:`#008FFB`,shadeTo:`light`,shadeIntensity:.65},accessibility:{colorBlindMode:``}}}}},ku={funnel:`bar`,pyramid:`bar`,gauge:`radialBar`,waffle:`unit`,histogram:`bar`,waterfall:`rangeBar`,dumbbell:`rangeBar`,streamgraph:`rangeArea`,raincloud:`violin`},Au=`_apexOwnedByType`,ju=(e,t)=>{let n=t;return n[Au]=e,t},Mu=[`tooltip.custom`,`tooltip.shared`,`tooltip.intersect`,`tooltip.followCursor`,`dataLabels.enabled`,`dataLabels.formatter`,`plotOptions.bar.dataLabels.position`,`markers.size`,`plotOptions.violin.side`,`plotOptions.violin.box.show`,`plotOptions.violin.box.whiskers`,`plotOptions.violin.points.position`,`states.hover.filter.type`,`states.active.filter.type`,`xaxis.crosshairs.width`,`xaxis.tickPlacement`,`xaxis.tooltip.enabled`,`chart.zoom.enabled`,`chart.animations.dynamicAnimation.enabled`],Nu=(e,t)=>{let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=n[e]}return n},Pu=(e,t,n)=>{let r=t.split(`.`),i=r.pop(),a=e;for(let e of r)(a[e]==null||typeof a[e]!=`object`)&&(a[e]={}),a=a[e];n===void 0?delete a[i]:a[i]=n},Fu=(e,t)=>{let n=ku[e];return{chart:{type:n||e,requestedType:n?e:void 0,stacked:t.chart?.stacked},plotOptions:{bar:{isFunnel:e===`funnel`||e===`pyramid`},histogram:t.plotOptions?.histogram},series:t.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},Iu=(e,t)=>{if(typeof e==`function`)return Array.isArray(e[Au])?!0:typeof t==`function`&&String(e)===String(t);if(typeof t==`function`)return e===void 0;if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}},Lu=({isTimeline:e,seriesIndex:t,dataPointIndex:n,y1:r,y2:i,w:a})=>{let o=a.rangeData.seriesRangeStart[t][n],s=a.rangeData.seriesRangeEnd[t][n],c=a.labelData.labels[n],l=a.config.series[t].name?a.config.series[t].name:``,u=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,f={w:a,seriesIndex:t,dataPointIndex:n,start:o,end:s};typeof d==`function`&&(l=d(l,f)),a.config.series[t].data[n]?.x&&(c=a.config.series[t].data[n].x),e||a.config.xaxis.type===`datetime`&&(c=new Eu(a).xLabelFormat(a.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new Tu(a).formatDate,w:a})),typeof u==`function`&&(c=u(c,f)),Number.isFinite(r)&&Number.isFinite(i)&&(o=r,s=i);let p=``,m=``,h=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type===`datetime`){let e=new Tu(a);p=e.formatDate(e.getDate(o),a.config.tooltip.x.format),m=e.formatDate(e.getDate(s),a.config.tooltip.x.format)}else p=o,m=s;else p=a.config.tooltip.x.formatter(o),m=a.config.tooltip.x.formatter(s);return{start:o,end:s,startVal:p,endVal:m,ylabel:c,color:h,seriesName:l}},Ru=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a,seriesIndex:o,dataPointIndex:s}=e,c=e.w.globals.tooltip.tooltipLabels.getFormatters(o);i=c.yLbFormatter(i),a=c.yLbFormatter(a);let l=c.yLbFormatter(e.w.seriesData.series[o][s]),u=``,d=`<span class="value start-value">
|
|
572
|
+
`),i=Br(e,`table:number-columns-repeated`,br);for(let e=0;e<(t?i:1);e+=1)r.push(t)}for(;r.length&&r[r.length-1]===``;)r.pop();let i=Br(t,`table:number-rows-repeated`,yr);for(let t=0;t<(r.length?i:1);t+=1)e.push([...r])}for(;e.length&&e[e.length-1].length===0;)e.pop();t.push({name:r.getAttribute(`table:name`)||`Table${t.length+1}`,rows:e})}if(!t.length)throw Error(`no table`);return{mode:`sheet`,sheets:t,truncated:n}}function Hr(e){let t=e.getElementsByTagName(`office:text`)[0];if(!t)throw Error(`no text body`);let n=[],r=!1,i=e=>{for(let t of Array.from(e.children)){if(n.length>=xr){r=!0;return}let e=(t.textContent??``).trim();if(t.tagName===`text:h`)e&&n.push({type:`heading`,level:Math.min(6,Number(t.getAttribute(`text:outline-level`)??`1`)||1),text:e});else if(t.tagName===`text:p`)e&&n.push({type:`paragraph`,text:e});else if(t.tagName===`text:list`)for(let e of Fr(t,`text:list-item`)){let t=(e.textContent??``).trim();t&&n.push({type:`list`,text:t})}else t.tagName===`table:table`?n.push({type:`table`,rows:Fr(t,`table:table-row`).slice(0,yr).map(e=>Fr(e,`table:table-cell`).slice(0,br).map(e=>(e.textContent??``).trim()))}):t.children.length&&i(t)}};return i(t),{mode:`blocks`,blocks:n,truncated:r}}function Ur(e){let t=Fr(e,`draw:page`);if(!t.length)throw Error(`no slide`);return{mode:`slides`,slides:t.slice(0,Sr).map(e=>{let t=Fr(e,`text:p`).map(e=>(e.textContent??``).trim()).filter(Boolean);return{title:t[0]??``,lines:t.slice(1)}}),truncated:t.length>Sr}}var Wr={key:0,class:`kb-upload`},Gr={key:0,class:`kb-upload__list`},Kr=[`title`],qr={class:`kb-upload__bar`},Jr={class:`kb-upload__pct`},Yr={key:1,class:`kb-upload__status`},Xr={key:2,class:`kb-upload__errors`},Zr=s(T({__name:`UploadProgress`,props:{queue:{},errors:{},uploading:{type:Boolean,default:!1},uploadingLabel:{default:``}},setup(e){return(t,n)=>e.queue.length||e.errors.length||e.uploading&&!e.queue.length?(I(),i(`div`,Wr,[e.queue.length?(I(),i(`ul`,Gr,[(I(!0),i(N,null,F(e.queue,e=>(I(),i(`li`,{key:e.key},[R(`span`,{class:`kb-upload__name`,title:e.name},k(e.name),9,Kr),R(`span`,qr,[R(`span`,{class:`kb-upload__bar-fill`,style:Ne({width:`${Math.round(e.ratio*100)}%`})},null,4)]),R(`span`,Jr,k(Math.round(e.ratio*100))+`%`,1)]))),128))])):e.uploading?(I(),i(`p`,Yr,k(e.uploadingLabel),1)):a(``,!0),e.errors.length?(I(),i(`ul`,Xr,[(I(!0),i(N,null,F(e.errors,(e,t)=>(I(),i(`li`,{key:t},k(e.name)+` — `+k(e.reason),1))),128))])):a(``,!0)])):a(``,!0)}}),[[`__scopeId`,`data-v-06e54521`]]);function Qr(e,t){let n=new Map(e.map(e=>[e.id,e])),r=[],i=new Set,a=t;for(;a&&n.has(a)&&!i.has(a);)i.add(a),r.unshift(a),a=n.get(a).parentId;return r}function $r(e,t){let n=[],r=new Map,i=[...e].sort((e,t)=>e.order-t.order||e.id.localeCompare(t.id));for(let e of i){let i=n;for(let n of Qr(t,e.groupId)){let e=r.get(n);e||(e={kind:`group`,id:n,children:[]},r.set(n,e),i.push(e)),i=e.children}i.push({kind:`column`,id:e.id,children:[]})}let a=e=>{let i=r.get(e.id);if(i)return i;let o={kind:`group`,id:e.id,children:[]};r.set(e.id,o);let s=e.parentId?t.find(t=>t.id===e.parentId):void 0;return(s?a(s).children:n).push(o),o};for(let e of t)Qr(t,e.id).length&&a(e);return n}function ei(e){return e.flatMap(e=>e.kind===`column`?[e.id]:ei(e.children))}function ti(e,t,n,r){let i=$r(e,t),a=e=>{let t=e.findIndex(e=>e.id===n);if(t!==-1){let n=t+r;if(n<0||n>=e.length)return!1;let[i]=e.splice(t,1);return e.splice(n,0,i),!0}return e.some(e=>e.kind===`group`&&a(e.children))};return a(i)?ei(i):null}var ni={class:`kg-lead`},ri={key:0,class:`kg-create`},ii={class:`kg-tree`},ai={key:0,class:`kg-empty`},oi=[`draggable`,`onDragstart`,`onDragover`,`onDrop`],si={key:2,class:`kg-row__title`},ci={key:3,class:`kg-row__count`},li={key:4,class:`kg-row__actions`},ui=[`onClick`],di={class:`kg-loose__label`},fi={key:0,class:`kg-empty`},pi=[`draggable`,`onDragstart`],mi={class:`kg-row__title`},hi=s(T({__name:`KanbanColumnGroups`,props:{visible:{type:Boolean},columns:{},groups:{},readOnly:{type:Boolean},t:{type:Function}},emits:[`update:visible`,`intent`],setup(e,{emit:t}){let n=e,o=t,s=Se(),c=n.t,l=[`#f97316`,`#22c55e`,`#3b82f6`,`#a855f7`,`#ec4899`,`#64748b`],d=r(()=>new Map(n.groups.map(e=>[e.id,e])));function f(e){return n.columns.filter(t=>(t.groupId&&d.value.has(t.groupId)?t.groupId:void 0)===e)}function p(e){return n.groups.filter(t=>(t.parentId??void 0)===e)}function h(e){return f(e).length+p(e).reduce((e,t)=>e+h(t.id),0)}let g=r(()=>$r(n.columns,n.groups)),_=r(()=>{let e=[],t=(r,i)=>{for(let a of r){if(a.kind===`column`){if(i===0)continue;let t=n.columns.find(e=>e.id===a.id);t&&e.push({kind:`column`,id:t.id,title:t.title,depth:i});continue}let r=d.value.get(a.id);r&&(e.push({kind:`group`,id:r.id,title:r.title,color:r.color,depth:i,columnCount:h(r.id)}),t(a.children,i+1))}};return t(g.value,0),e});function v(e,t){let r=ti(n.columns,n.groups,e,t);r&&o(`intent`,{kind:`columns-reorder`,columnIds:r})}function b(e,t){return ti(n.columns,n.groups,e,t)!==null}let S=r(()=>f(void 0)),C=m(``);function w(){let e=C.value.trim();e&&(o(`intent`,{kind:`group-add`,title:e,color:l[n.groups.length%l.length]}),C.value=``)}let T=m(null);function E(e){e.kind===`group`&&(T.value={id:e.id,title:e.title})}function D(){let e=T.value;if(!e)return;let t=e.title.trim(),n=d.value.get(e.id);t&&n&&t!==n.title&&o(`intent`,{kind:`group-update`,groupId:e.id,patch:{title:t}}),T.value=null}function j(e,t){let n=d.value.get(e)?.color;o(`intent`,{kind:`group-update`,groupId:e,patch:{color:n===t?null:t}})}function ee(e){e.kind===`group`&&s.require({message:c(`groups.deleteConfirm`,{title:e.title}),header:c(`groups.deleteHeader`),icon:`pi pi-exclamation-triangle`,acceptClass:`p-button-danger`,accept:()=>o(`intent`,{kind:`group-delete`,groupId:e.id})})}let te=m(null),ne=m(null);function M(e,t,r){n.readOnly||(te.value={kind:e,id:t},r.dataTransfer?.setData(`text/plain`,t),r.dataTransfer&&(r.dataTransfer.effectAllowed=`move`))}function re(e,t){if(!e)return!1;if(e.kind===`column`||t===null)return!0;let n=t,r=new Set;for(;n&&!r.has(n);){if(n===e.id)return!1;r.add(n),n=d.value.get(n)?.parentId}return!0}function ie(e){let t=e.relatedTarget;t&&e.currentTarget.contains(t)||(ne.value=null)}function ae(e,t){re(te.value,e)&&(t.preventDefault(),ne.value=e??`root`)}function se(e){let t=n.columns.find(t=>t.id===e)?.groupId;return t&&d.value.has(t)?t:null}function ce(e){let t=te.value,n=re(t,e);ne.value=null,te.value=null,!(!t||!n)&&o(`intent`,{kind:`group-assign`,member:t,groupId:e})}function le(){o(`update:visible`,!1)}return(t,n)=>(I(),A(u(y),{visible:e.visible,header:u(c)(`groups.title`),modal:!0,style:{width:`540px`},"onUpdate:visible":le},{default:L(()=>[R(`p`,ni,k(u(c)(`groups.lead`)),1),e.readOnly?a(``,!0):(I(),i(`div`,ri,[x(u(be),{modelValue:C.value,"onUpdate:modelValue":n[0]||=e=>C.value=e,placeholder:u(c)(`groups.newPlaceholder`),class:`kg-create__input`,onKeyup:oe(w,[`enter`])},null,8,[`modelValue`,`placeholder`]),x(u(B),{label:u(c)(`groups.create`),icon:`pi pi-plus`,size:`small`,onClick:w},null,8,[`label`])])),R(`div`,ii,[_.value.length?a(``,!0):(I(),i(`div`,ai,k(u(c)(`groups.empty`)),1)),(I(!0),i(N,null,F(_.value,t=>(I(),i(`div`,{key:`${t.kind}-${t.id}`,class:O([`kg-row`,{"kg-row--group":t.kind===`group`,"kg-row--target":ne.value===t.id}]),style:Ne({paddingLeft:`${t.depth*1.25}rem`}),draggable:!e.readOnly,onDragstart:e=>M(t.kind,t.id,e),onDragover:e=>ae(t.kind===`group`?t.id:se(t.id),e),onDragleave:ie,onDrop:je(e=>ce(t.kind===`group`?t.id:se(t.id)),[`prevent`]),onDragend:n[2]||=e=>{te.value=null,ne.value=null}},[R(`i`,{class:O([t.kind===`group`?`pi pi-folder`:`pi pi-list`,`kg-row__icon`])},null,2),t.kind===`group`?(I(),i(`span`,{key:0,class:`kg-swatch`,style:Ne({background:t.color||`var(--p-text-muted-color)`})},null,4)):a(``,!0),T.value&&T.value.id===t.id?(I(),A(u(be),{key:1,modelValue:T.value.title,"onUpdate:modelValue":n[1]||=e=>T.value.title=e,class:`kg-row__rename`,autofocus:``,onKeyup:oe(D,[`enter`]),onBlur:D},null,8,[`modelValue`])):(I(),i(`span`,si,k(t.title),1)),t.kind===`group`?(I(),i(`span`,ci,k(u(c)(`groups.columnCount`,{count:t.columnCount})),1)):a(``,!0),e.readOnly?a(``,!0):(I(),i(`div`,li,[x(u(B),{icon:`pi pi-chevron-up`,text:``,size:`small`,disabled:!b(t.id,-1),"aria-label":u(c)(`groups.moveUp`),class:`kg-move`,onClick:e=>v(t.id,-1)},null,8,[`disabled`,`aria-label`,`onClick`]),x(u(B),{icon:`pi pi-chevron-down`,text:``,size:`small`,disabled:!b(t.id,1),"aria-label":u(c)(`groups.moveDown`),class:`kg-move`,onClick:e=>v(t.id,1)},null,8,[`disabled`,`aria-label`,`onClick`]),t.kind===`group`?(I(),i(N,{key:0},[(I(),i(N,null,F(l,e=>R(`span`,{key:e,class:O([`kg-dot`,{"kg-dot--on":t.color===e}]),style:Ne({background:e}),onClick:n=>j(t.id,e)},null,14,ui)),64)),x(u(B),{icon:`pi pi-pencil`,text:``,size:`small`,onClick:e=>E(t)},null,8,[`onClick`]),x(u(B),{icon:`pi pi-trash`,text:``,size:`small`,severity:`danger`,onClick:e=>ee(t)},null,8,[`onClick`])],64)):a(``,!0)]))],46,oi))),128))]),R(`div`,{class:O([`kg-loose`,{"kg-row--target":ne.value===`root`}]),onDragover:n[4]||=e=>ae(null,e),onDragleave:ie,onDrop:n[5]||=je(e=>ce(null),[`prevent`])},[R(`div`,di,k(u(c)(`groups.loose`)),1),S.value.length?a(``,!0):(I(),i(`div`,fi,k(u(c)(`groups.looseEmpty`)),1)),(I(!0),i(N,null,F(S.value,t=>(I(),i(`div`,{key:t.id,class:`kg-row`,draggable:!e.readOnly,onDragstart:e=>M(`column`,t.id,e),onDragend:n[3]||=e=>{te.value=null,ne.value=null}},[n[6]||=R(`i`,{class:`pi pi-list kg-row__icon`},null,-1),R(`span`,mi,k(t.title),1)],40,pi))),128))],34)]),_:1},8,[`visible`,`header`]))}}),[[`__scopeId`,`data-v-48711454`]]),gi=[[`second`,60],[`minute`,60],[`hour`,24],[`day`,7],[`week`,4.35],[`month`,12],[`year`,1/0]];function _i(e,t,n=new Date){let r=new Date(e).getTime();if(Number.isNaN(r))return null;let i=Math.min(0,(r-n.getTime())/1e3),a=new Intl.RelativeTimeFormat(t,{numeric:`auto`});for(let[e,t]of gi){if(Math.abs(i)<t)return a.format(Math.round(i),e);i/=t}return null}var vi={class:`cc`},yi={key:0,class:`cc__empty`},bi={class:`cc__head`},xi=[`aria-expanded`,`aria-controls`,`onClick`],Si={class:`cc__head-text`},Ci={class:`cc__title`},wi={class:`cc__sub`},Ti={key:0,class:`cc__last`},Ei=[`datetime`],Di={class:`cc__origin`},Oi={key:1,class:`cc__pending`,role:`status`},ki={class:`cc__actions`},Ai=[`href`,`title`],ji={class:`cc__out-label`},Mi={key:0,class:`cc__elsewhere`},Ni=[`onClick`],Pi=[`id`],Fi=[`onClick`],Ii={class:`cc__thread`},Li={key:0,class:`cc__msg-head`},Ri={class:`cc__avatar`,"aria-hidden":`true`},zi={class:`cc__author`},Bi={class:`cc__role`},Vi=[`datetime`],Hi={class:`cc__bubble`},Ui=[`innerHTML`],Wi={key:2,class:`cc__missing`},Gi={key:3,class:`cc__missing`},Ki=6,qi=s(T({__name:`CardConversationsPanel`,props:{t:{type:Function},conversations:{},canEdit:{type:Boolean},locale:{},resync:{type:Function},preview:{type:Function}},emits:[`unlink`,`open-card`,`open-file`],setup(e,{emit:t}){let n=e,o=t,s=n.t;function c(e){if(e)try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`?t.toString():void 0}catch{return}}let l=r(()=>n.canEdit&&n.resync!==void 0),d=w(new Set);async function f(e){if(!(!n.resync||d.has(e))){d.add(e);try{await n.resync(e)}finally{d.delete(e)}}}let p=w(new Map);function m(e){return p.get(e)??n.conversations.length===1}function h(e){p.set(e,!m(e))}let g=w(new Set);ye(()=>n.conversations.map(e=>e.id).join(`|`),()=>{for(let e of p.keys())n.conversations.some(t=>t.id===e)||p.delete(e)});function _(e){let t=[];e.opening&&t.push({key:`${e.id}:opening`,author:e.opening.author,body:e.opening.body,internal:!1,sentAt:null,attachments:e.opening.attachments,missingAttachments:e.opening.missingAttachments});for(let n of e.messages)t.push({key:`${e.id}:${n.id}`,author:n.author,body:n.body,internal:n.internal,sentAt:n.sentAt,attachments:n.attachments,missingAttachments:n.missingAttachments});return t.map((e,n)=>{let r=t[n-1];return{...e,followup:!!(r&&r.author.name===e.author.name&&r.author.role===e.author.role&&r.internal===e.internal)}})}function v(e){return e.messages.length+(e.opening?1:0)}function y(e){return g.has(e.id)?0:Math.max(0,_(e).length-Ki)}function b(e){let t=_(e),n=y(e);return n?t.slice(n).map((e,t)=>t===0?{...e,followup:!1}:e):t}function x(e){return e.messages.at(-1)?.sentAt??e.updatedAt??null}function S(e){let t=e.trim().split(/\s+/).filter(Boolean);return((t[0]?.[0]??``)+(t.length>1?t.at(-1)[0]:``)).toUpperCase()||`?`}function C(e){return new Date(e).toLocaleString(n.locale,{day:`numeric`,month:`short`,hour:`2-digit`,minute:`2-digit`})}function T(e){return _i(e,n.locale)??C(e)}return(t,n)=>(I(),i(`div`,vi,[e.conversations.length?a(``,!0):(I(),i(`p`,yi,k(u(s)(`conversations.empty`)),1)),(I(!0),i(N,null,F(e.conversations,t=>(I(),i(`article`,{key:t.id,class:O([`cc__conv`,{"cc__conv--open":m(t.id)}])},[R(`header`,bi,[R(`button`,{type:`button`,class:`cc__toggle`,"aria-expanded":m(t.id),"aria-controls":`cc-thread-${t.id}`,onClick:e=>h(t.id)},[n[5]||=R(`i`,{class:`pi pi-chevron-right cc__chevron`,"aria-hidden":`true`},null,-1),R(`span`,Si,[R(`span`,Ci,k(t.title),1),R(`span`,wi,[R(`span`,{class:O([`cc__state`,`cc__state--${t.state}`])},[n[1]||=R(`span`,{class:`cc__dot`,"aria-hidden":`true`},null,-1),P(k(u(s)(`conversations.state.${t.state}`)),1)],2),R(`span`,null,k(u(s)(`conversations.messages`,{count:v(t)})),1),x(t)?(I(),i(`span`,Ti,[n[2]||=P(`· `,-1),R(`time`,{datetime:x(t)},k(T(x(t))),9,Ei)])):a(``,!0),R(`span`,Di,`· `+k(u(s)(`conversations.origin.${t.origin}`)),1),t.filesPending?(I(),i(`span`,Oi,[n[3]||=P(` · `,-1),n[4]||=R(`i`,{class:`pi pi-spin pi-spinner`,"aria-hidden":`true`},null,-1),P(` `+k(u(s)(`conversations.filesPending`)),1)])):a(``,!0)])])],8,xi),R(`div`,ki,[c(t.url)?(I(),i(`a`,{key:0,href:c(t.url),target:`_blank`,rel:`noopener noreferrer`,class:`cc__out`,title:u(s)(`conversations.openAtProviderHint`,{name:u(s)(`conversations.providers.${t.provider}`)})},[n[6]||=R(`i`,{class:`pi pi-external-link`,"aria-hidden":`true`},null,-1),R(`span`,ji,k(u(s)(`conversations.openAtProvider`)),1)],8,Ai)):a(``,!0),l.value?(I(),A(u(B),{key:1,icon:`pi pi-sync`,text:``,rounded:``,size:`small`,severity:`secondary`,loading:d.has(t.id),"aria-label":u(s)(`conversations.resync`),title:u(s)(`conversations.resync`),onClick:e=>f(t.id)},null,8,[`loading`,`aria-label`,`title`,`onClick`])):a(``,!0),e.canEdit?(I(),A(u(B),{key:2,icon:`pi pi-times`,text:``,rounded:``,size:`small`,severity:`secondary`,"aria-label":u(s)(`conversations.unlink`),title:u(s)(`conversations.unlink`),onClick:e=>o(`unlink`,t.id)},null,8,[`aria-label`,`title`,`onClick`])):a(``,!0)])]),t.otherCards.length?(I(),i(`p`,Mi,[n[7]||=R(`i`,{class:`pi pi-link`,"aria-hidden":`true`},null,-1),P(` `+k(u(s)(`conversations.alsoOn`))+` `,1),(I(!0),i(N,null,F(t.otherCards,e=>(I(),i(`button`,{key:e.cardId,type:`button`,class:`cc__card-link`,onClick:t=>o(`open-card`,{boardId:e.boardId,cardId:e.cardId})},k(e.title),9,Ni))),128))])):a(``,!0),m(t.id)?(I(),i(`div`,{key:1,id:`cc-thread-${t.id}`,class:`cc__thread-wrap`},[y(t)>0?(I(),i(`button`,{key:0,type:`button`,class:`cc__earlier`,onClick:e=>g.add(t.id)},[n[8]||=R(`i`,{class:`pi pi-angle-up`,"aria-hidden":`true`},null,-1),P(` `+k(u(s)(`conversations.showEarlier`,{count:y(t)})),1)],8,Fi)):a(``,!0),R(`ol`,Ii,[(I(!0),i(N,null,F(b(t),r=>(I(),i(`li`,{key:r.key,class:O([`cc__msg`,[`cc__msg--${r.author.role}`,{"cc__msg--internal":r.internal,"cc__msg--followup":r.followup}]])},[r.followup?a(``,!0):(I(),i(`div`,Li,[R(`span`,Ri,k(S(r.author.name)),1),R(`strong`,zi,k(r.author.name),1),R(`span`,Bi,k(r.internal?u(s)(`conversations.internal`):u(s)(`conversations.role.${r.author.role}`)),1),r.sentAt?(I(),i(`time`,{key:0,datetime:r.sentAt,class:`cc__time`},k(C(r.sentAt)),9,Vi)):a(``,!0)])),R(`div`,Hi,[r.body?(I(),i(`div`,{key:0,class:`cc__body`,innerHTML:u(wn)(r.body)},null,8,Ui)):a(``,!0),r.attachments.length?(I(),A(Mn,{key:1,files:r.attachments,preview:e.preview,compact:``,onOpen:n[0]||=e=>o(`open-file`,e)},null,8,[`files`,`preview`])):a(``,!0),r.missingAttachments.length&&t.filesPending?(I(),i(`p`,Wi,[n[9]||=R(`i`,{class:`pi pi-spin pi-spinner`,"aria-hidden":`true`},null,-1),P(` `+k(u(s)(`conversations.filesPendingNames`,{names:r.missingAttachments.join(`, `)})),1)])):r.missingAttachments.length?(I(),i(`p`,Gi,[n[10]||=R(`i`,{class:`pi pi-exclamation-circle`,"aria-hidden":`true`},null,-1),P(` `+k(u(s)(`conversations.missingFiles`,{names:r.missingAttachments.join(`, `)})),1)])):a(``,!0)])],2))),128))])],8,Pi)):a(``,!0)],2))),128))]))}}),[[`__scopeId`,`data-v-4a8523a2`]]),Ji={class:`cl`},Yi={class:`cl__search`},Xi={key:0,class:`cl__empty`},Zi={key:1,class:`cl__results`},Qi={class:`cl__hit-main`},$i={key:0,class:`cl__preview`},ea={key:1,class:`cl__elsewhere`},ta=[`onClick`],na=s(T({__name:`ConversationLinkDialog`,props:{t:{type:Function},visible:{type:Boolean},providerLabel:{},integrations:{},cardId:{},linkedIds:{},search:{type:Function},link:{type:Function}},emits:[`close`,`linked`,`open-card`],setup(e,{emit:t}){let n=e,r=t,o=n.t,s=m(``);ye(()=>n.integrations,e=>{e.some(e=>e.id===s.value)||(s.value=e[0]?.id??``)},{immediate:!0});let c=m(``),l=m([]),d=m(!1),f=m(!1),p=m(null);ye(()=>[n.visible,n.cardId],()=>{c.value=``,l.value=[],f.value=!1});async function h(){if(!(!c.value.trim()||!s.value)){d.value=!0;try{l.value=await n.search(s.value,c.value.trim()),f.value=!0}finally{d.value=!1}}}function g(e){return e.linkedCards.filter(e=>e.cardId!==n.cardId)}async function _(e){p.value=e.id;try{await n.link(e.connectionId,e.externalId)&&r(`linked`)}finally{p.value=null}}return(t,n)=>(I(),A(u(y),{visible:e.visible,modal:``,header:u(o)(`conversations.linkTitle`,{name:e.providerLabel}),style:{width:`min(40rem, 95vw)`},"onUpdate:visible":n[2]||=e=>{e||r(`close`)}},{default:L(()=>[R(`div`,Ji,[e.integrations.length?(I(),i(N,{key:0},[R(`div`,Yi,[e.integrations.length>1?(I(),A(u(re),{key:0,modelValue:s.value,"onUpdate:modelValue":n[0]||=e=>s.value=e,options:e.integrations,"option-label":`name`,"option-value":`id`,class:`cl__connection`},null,8,[`modelValue`,`options`])):a(``,!0),x(u(be),{modelValue:c.value,"onUpdate:modelValue":n[1]||=e=>c.value=e,placeholder:u(o)(`conversations.searchPlaceholder`),class:`cl__query`,autofocus:``,onKeydown:oe(je(h,[`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`]),x(u(B),{label:u(o)(`conversations.search`),icon:`pi pi-search`,size:`small`,loading:d.value,disabled:!c.value.trim(),onClick:h},null,8,[`label`,`loading`,`disabled`])]),f.value&&!l.value.length&&!d.value?(I(),i(`p`,Xi,k(u(o)(`conversations.noResults`)),1)):a(``,!0),l.value.length?(I(),i(`ul`,Zi,[(I(!0),i(N,null,F(l.value,t=>(I(),i(`li`,{key:t.id,class:`cl__hit`},[R(`div`,Qi,[R(`strong`,null,k(t.title),1),R(`span`,{class:O([`cl__state`,`cl__state--${t.state}`])},k(u(o)(`conversations.state.${t.state}`)),3),t.preview?(I(),i(`p`,$i,k(t.preview),1)):a(``,!0),g(t).length?(I(),i(`p`,ea,[P(k(u(o)(`conversations.alsoOn`))+` `,1),(I(!0),i(N,null,F(g(t),e=>(I(),i(`button`,{key:e.cardId,type:`button`,class:`cl__card-link`,onClick:t=>r(`open-card`,{boardId:e.boardId,cardId:e.cardId})},k(e.title),9,ta))),128))])):a(``,!0)]),e.linkedIds.includes(t.id)?(I(),A(u(B),{key:0,label:u(o)(`conversations.linked`),size:`small`,severity:`secondary`,disabled:``},null,8,[`label`])):(I(),A(u(B),{key:1,label:u(o)(`conversations.link`),icon:`pi pi-link`,size:`small`,loading:p.value===t.id,onClick:e=>_(t)},null,8,[`label`,`loading`,`onClick`]))]))),128))])):a(``,!0)],64)):a(``,!0)])]),_:1},8,[`visible`,`header`]))}}),[[`__scopeId`,`data-v-cf4bf84b`]]),ra={class:`kb-header`},ia={class:`kb-header__search`},aa={key:1,class:`kb-header__search-more`},oa={key:1,class:`kb-header__readonly`},sa={class:`kb-boardwrap`},ca={class:`kb-band__title`},la={class:`kb-band__count`},ua=[`data-col-id`,`onPointerdown`,`onTouchstart`],da=[`title`,`onClick`],fa={class:`kb-col__count`},pa={key:0,class:`pi pi-bell kb-col__bell--on`},ma={key:1,class:`kb-col__header`},ha=[`value`,`readonly`,`onBlur`],ga={class:`kb-col__header-right`},_a={key:1,class:`pi pi-check-circle kb-col__done`},va={class:`kb-col__count`},ya=[`onClick`],ba={key:3,class:`kb-col__cards`},xa=[`data-card-id`,`onPointerdown`,`onTouchstart`,`onClick`],Sa=[`onClick`],Ca=[`onClick`],wa={key:0,class:`kb-col__empty`},Ta=[`onClick`],Ea={class:`kb-subscribe__lead`},Da={class:`kb-subscribe__legend`},Oa={class:`kb-subscribe__options`},ka={class:`kb-subscribe__option`},Aa={class:`kb-subscribe__legend`},ja={class:`kb-subscribe__options`},Ma={class:`kb-subscribe__no`},Na={class:`kb-subscribe__legend`},Pa={class:`kb-subscribe__options`},Fa={class:`kb-subscribe__channels`},Ia={key:1,class:`kb-subscribe__channels`},La={class:`kb-tpl-intro`},Ra={class:`kb-tpl-list`},za=[`onClick`],Ba={key:0,class:`kb-add-col`},Va={key:0,class:`kb-add-col__form`},Ha={class:`kb-add-col__actions`},Ua={class:`kb-filters__body`},Wa={class:`kb-filters__section`},Ga={class:`kb-side__label`},Ka={class:`kb-ops`},qa=[`onClick`],Ja={key:0,class:`kb-prio`},Ya={class:`kb-prio__value`},Xa={key:1,class:`kb-side__hint`},Za={class:`kb-filters__section`},Qa={class:`kb-side__label`},$a={class:`kb-colors`},eo=[`onClick`],to={class:`kb-filters__section`},no={class:`kb-side__label`},ro={key:0,class:`pi pi-ban`},io={class:`kb-filters__section`},ao={class:`kb-side__label`},oo={key:0,class:`pi pi-ban`},so={key:0,class:`kb-filters__section`},co={class:`kb-side__label`},lo={class:`kb-filters__section`},uo={class:`kb-side__label`},fo={key:0,class:`pi pi-ban`},po={key:1,class:`kb-link__col`},mo={class:`kb-side__hint`},ho={class:`kb-archive__hint`},go={class:`kb-archive__search`},_o={key:0,class:`kb-archive__empty`},vo={key:1,class:`kb-archive__empty`},yo={key:2,class:`kb-archive__empty`},bo={key:0,class:`kb-archive__filtered`},xo={key:1,class:`kb-archive__filtered`},So={class:`kb-archive__list`},Co=[`onClick`],wo=[`onClick`],To={class:`kb-archive__meta`},Eo={key:0},Do={key:1},Oo={key:0,class:`kb-dialog`},ko={class:`kb-dialog__main`},Ao={key:0,class:`kb-dialog__archived`},jo={class:`kb-dialog__edit-content`},Mo={class:`kb-dialog__field`},No={for:`kanban-card-title`,class:`kb-dialog__label`},Po={class:`kb-dialog__field`},Fo={for:`kanban-card-content`,class:`kb-dialog__label`},Io={class:`kb-dialog__field`},Lo={for:`kanban-card-images`,class:`kb-dialog__label`},Ro={key:0,class:`kb-dialog__images`},zo=[`src`],Bo=[`onClick`],Vo={key:1,class:`kb-dialog__upload`},Ho={class:`kb-rel`},Uo={key:0,class:`kb-rel__section`},Wo={class:`kb-rel__title`},Go={key:0,class:`kb-rel__table`},Ko={class:`kb-rel__people`},qo={class:`kb-rel__num`},Jo={class:`kb-rel__actions-col`},Yo={class:`kb-rel__card`},Xo={class:`kb-rel__board`},Zo={class:`kb-rel__people`},Qo={key:0,class:`kb-card__assignees`},$o=[`title`],es=[`src`,`onError`],ts={key:1,class:`kb-rel__none`},ns={class:`kb-rel__num`},rs={class:`kb-rel__actions-col`},is=[`title`],as=[`title`],os={key:1,class:`kb-rel__empty`},ss={class:`kb-coloption`},cs={class:`kb-link__col`},ls={key:1,class:`kb-rel__section`},us={class:`kb-rel__title`},ds={key:0,class:`kb-rel__table`},fs={class:`kb-rel__people`},ps={class:`kb-rel__num`},ms={class:`kb-rel__actions-col`},hs={class:`kb-rel__card`},gs={class:`kb-rel__board`},_s={class:`kb-rel__people`},vs={key:0,class:`kb-card__assignees`},ys=[`title`],bs=[`src`,`onError`],xs={key:1,class:`kb-rel__none`},Ss={class:`kb-rel__num`},Cs={class:`kb-rel__actions-col`},ws=[`title`,`onClick`],Ts=[`title`,`onClick`],Es={key:1,class:`kb-rel__empty`},Ds={class:`kb-coloption`},Os={class:`kb-link__col`},ks={key:2,class:`kb-rel__empty`},As={class:`kb-comments`},js={key:0,class:`kb-comments__empty`},Ms={key:1,class:`kb-comments__list`},Ns=[`onClick`],Ps={key:0,class:`pi pi-sparkles`},Fs=[`src`,`onError`],Is={key:3,class:`pi pi-user`},Ls={class:`kb-comments__body`},Rs={class:`kb-comments__meta`},zs={class:`kb-comments__author`},Bs={class:`kb-comments__time`},Vs={key:0,class:`kb-comments__edited`},Hs={key:1,class:`kb-comments__tools`},Us=[`title`,`onClick`],Ws=[`title`,`onClick`],Gs={class:`kb-comments__actions`},Ks=[`onClick`,`innerHTML`],qs=[`onClick`],Js=[`onKeydown`],Ys={class:`kb-comments__actions`},Xs=[`title`],Zs={class:`kb-comments__hint`},Qs={class:`kb-history`},$s={key:0,class:`kb-history__empty`},ec={key:1,class:`kb-history__timeline`},tc=[`onClick`],nc={class:`kb-history__icon`},rc={class:`kb-history__body`},ic={class:`kb-history__label`},ac={key:0,class:`pi pi-external-link`,style:{"font-size":`0.625rem`,"margin-left":`0.25rem`}},oc={key:0,class:`kb-history__detail`},sc={class:`kb-history__time`},cc={class:`kb-side`},lc={class:`kb-side__block kb-side__meta`},uc={key:0},dc={class:`kb-side__group kb-side__group--where`},fc={key:0,class:`kb-side__block`},pc={class:`kb-side__label`},mc={key:1,class:`kb-archived-pick`},hc={key:2,class:`kb-side__hint`},gc={key:1,class:`kb-side__block`},_c={class:`kb-side__label`},vc=[`aria-label`],yc={class:`kb-colgroup__label`},bc={class:`kb-coloption`},xc={key:0,class:`pi pi-arrow-right kb-coloption__away`},Sc={key:2,class:`kb-side__block`},Cc={class:`kb-side__label`},wc=[`aria-label`],Tc=[`title`],Ec=[`src`,`onError`],Dc={class:`kb-assignee`},Oc=[`src`,`onError`],kc={class:`kb-side__group kb-side__group--plan`},Ac={class:`kb-side__block`},jc={class:`kb-side__label`},Mc={key:0,class:`kb-prio__value`},Nc={key:0,class:`kb-prio`},Pc=[`title`],Fc={key:2,class:`kb-side__hint`},Ic={class:`kb-side__block`},Lc={class:`kb-side__label`},Rc={class:`kb-deadline`},zc=[`title`],Bc={key:0,class:`kb-side__hint`},Vc={class:`kb-side__group kb-side__group--tags`},Hc={class:`kb-side__block`},Uc={class:`kb-side__label`},Wc=[`aria-label`],Gc={class:`kb-groups__option`},Kc={class:`kb-side__block`},qc={class:`kb-side__label`},Jc=[`aria-label`],Yc={class:`kb-colors`},Xc=[`disabled`],Zc=[`disabled`,`onClick`],Qc={class:`kb-side__group kb-side__group--links`},$c={key:0,class:`kb-side__block`},el={class:`kb-side__label`},tl={class:`kb-tree`},nl={key:0,class:`pi pi-angle-right kb-tree__branch`},rl=[`title`,`onClick`],il={class:`kb-tree__label`},al={key:1,class:`kb-side__block`},ol={class:`kb-side__label`},sl={class:`kb-convs`},cl=[`aria-label`,`onClick`],ll={class:`kb-convs__count`},ul={key:1,class:`kb-convs__name`},dl={key:2,class:`kb-side__block`},fl={class:`kb-side__label`},pl={class:`kb-side__convs`},ml=[`title`,`onClick`],hl={class:`kb-side__conv-label`},gl={key:3,class:`kb-side__block`},_l={class:`kb-side__label`},vl={class:`kb-side__actions`},yl={key:0,class:`kb-side__block kb-side__danger`},bl={class:`kb-dialog__footer`},xl={key:0,class:`kb-dialog__unsaved`},Sl={key:0,class:`kb-viewer`},Cl=[`src`,`alt`],wl=[`src`,`title`],Tl=[`src`],El=[`src`],Dl={key:4,class:`kb-viewer__office`},Ol={key:0,class:`kb-viewer__tabs`},kl=[`onClick`],Al={class:`kb-viewer__scroll`},jl={key:0,class:`kb-viewer__table`},Ml={key:1,class:`kb-viewer__empty`},Nl={key:5,class:`kb-viewer__office`},Pl={class:`kb-viewer__scroll kb-viewer__doc`},Fl={key:0},Il={key:1},Ll={key:2},Rl={key:3,class:`kb-viewer__li`},zl={key:4,class:`kb-viewer__table`},Bl={key:5},Vl={key:0,class:`kb-viewer__empty`},Hl={key:6,class:`kb-viewer__office`},Ul={class:`kb-viewer__scroll kb-viewer__slides`},Wl={class:`kb-viewer__slide-no`},Gl={key:0},Kl={key:7,class:`kb-viewer__office`},ql={key:0,class:`kb-viewer__empty`},Jl={key:8,class:`kb-viewer__text`},Yl={key:9,class:`kb-viewer__truncated`},Xl={key:0,class:`kb-colmenu`},Zl={class:`kb-colmenu__host`},Ql=`\0void`,$l=26,eu=512*1024,tu=55*1024*1024,nu=5*1024*1024,ru=400,iu=8,au=5,ou=60,su=12,cu=s(T({__name:`KanbanBoard`,props:{columns:{},columnGroups:{default:()=>[]},name:{},readOnly:{type:Boolean,default:!1},t:{},resolveConversationId:{type:Function,default:void 0},currentUserId:{default:void 0},members:{default:()=>[]},avatarUrl:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},fetchAttachment:{type:Function,default:void 0},columnSubscriptions:{default:void 0},teams:{default:()=>[]},manageableTeamIds:{default:void 0},columnTeamSubscriptions:{default:()=>({})},deleteAttachment:{type:Function,default:void 0},templates:{default:()=>[]},loadHistory:{type:Function,default:void 0},histories:{default:void 0},addComment:{type:Function,default:void 0},editComment:{type:Function,default:void 0},removeComment:{type:Function,default:void 0},moveCard:{type:Function,default:void 0},otherBoards:{default:()=>[]},moveCardToBoard:{type:Function,default:void 0},cardLinks:{default:()=>[]},linkedCards:{default:()=>[]},setCardParent:{type:Function,default:void 0},conversationIntegrations:{default:()=>[]},cardConversations:{default:()=>({})},loadConversations:{type:Function,default:void 0},searchConversations:{type:Function,default:void 0},linkConversation:{type:Function,default:void 0},unlinkConversation:{type:Function,default:void 0},resyncConversation:{type:Function,default:void 0},archivedCards:{default:()=>[]},loadingArchive:{type:Boolean,default:!1},archiveTruncated:{type:Boolean,default:!1},searchMatches:{default:null},searchTruncated:{type:Boolean,default:!1}},emits:[`intent`,`back`,`open-conversation`,`card-open`,`update-column-subscription`,`open-linked-card`,`load-archive`,`search-cards`],setup(e,{expose:t,emit:n}){let o=e,s=r(()=>o.loadHistory!==void 0),c=n,l=Se(),d=o.t;function f(){if(crypto.randomUUID)return crypto.randomUUID();let e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function p(e){return JSON.parse(JSON.stringify(e))}let g=m(p(o.columns));ye(()=>o.columns,e=>{g.value=p(e),an()});function _(e,t){g.value=e,t&&c(`intent`,t)}let v=m(``),b=m(!1),S=m(``),C=r(()=>[...g.value].sort((e,t)=>e.order-t.order).map(e=>({...e,cards:[...e.cards].sort((e,t)=>e.order-t.order)}))),T=m(!1),E=m(`gte`),D=m(null),j=m([]),te=m([]),ne=m([]),M=m([]),ie=m(!1),se=m(!1),ce=m(!1),le=m([]),ue=r(()=>{let e=new Set;for(let t of le.value){for(let n of hn(t,`up`))e.add(n);for(let n of hn(t,`down`))e.add(n)}return e}),fe=r(()=>D.value!==null||E.value===`none`),pe=r(()=>(fe.value?1:0)+(j.value.length?1:0)+(te.value.length||ie.value?1:0)+(ne.value.length||se.value?1:0)+(M.value.length?1:0)+(le.value.length||ce.value?1:0));function me(){D.value=null,E.value=`gte`,j.value=[],te.value=[],ne.value=[],M.value=[],le.value=[],ie.value=!1,se.value=!1,ce.value=!1}function ge(e){if(E.value===`none`){if(e.priority!==void 0)return!1}else if(D.value!==null){let t=e.priority;if(t===void 0||E.value===`eq`&&t!==D.value||E.value===`gte`&&t<D.value||E.value===`lte`&&t>D.value)return!1}if(j.value.length&&!j.value.includes(e.color??``))return!1;let t=e.groups??[];if(te.value.length||ie.value){let e=te.value.length&&t.some(e=>te.value.includes(e)),n=ie.value&&t.length===0;if(!e&&!n)return!1}let n=e.assignees??[];if(ne.value.length||se.value){let e=ne.value.length&&n.some(e=>ne.value.includes(e.id)),t=se.value&&n.length===0;if(!e&&!t)return!1}if(!Cn(e,M.value))return!1;if(le.value.length||ce.value){let t=le.value.length&&ue.value.has(e.id),n=ce.value&&!un(e.id)&&dn(e.id).length===0;if(!t&&!n)return!1}return!0}let _e=r({get:()=>ie.value?[Ql,...te.value]:te.value,set:e=>{ie.value=e.includes(Ql),te.value=e.filter(e=>e!==Ql)}}),xe=r(()=>[Ql,...bt.value]),we=r({get:()=>se.value?[Ql,...ne.value]:ne.value,set:e=>{se.value=e.includes(Ql),ne.value=e.filter(e=>e!==Ql)}}),Te=r(()=>!Bn.value&&!!o.currentUserId&&o.members.some(e=>e.userId===o.currentUserId)&&!_t.value.includes(o.currentUserId));function De(){o.currentUserId&&!_t.value.includes(o.currentUserId)&&(_t.value=[..._t.value,o.currentUserId])}let ke=r(()=>[{userId:Ql,name:d(`filters.noAssignees`)},...o.members]),Ae=r({get:()=>ce.value?[Ql,...le.value]:le.value,set:e=>{ce.value=e.includes(Ql),le.value=e.filter(e=>e!==Ql)}}),Me=r(()=>Sn([...C.value.flatMap(e=>e.cards),...o.archivedCards])),Pe=r(()=>[{id:Ql,title:d(`filters.noFamily`),column:``},...C.value.flatMap(e=>e.cards.map(t=>({id:t.id,title:t.title,column:e.title}))),...o.archivedCards.map(e=>({id:e.id,title:e.title,column:d(`archive.title`)}))]),Fe=r(()=>{let e=o.searchMatches,t=pe.value>0;return!e&&!t?C.value:C.value.map(n=>({...n,cards:n.cards.filter(n=>(!e||e.has(n.id))&&(!t||ge(n)))}))}),Ie=m(!1),Le=r(()=>new Map((o.columnGroups??[]).map(e=>[e.id,e])));function Be(e){let t=[],n=new Set,r=e;for(;r&&Le.value.has(r)&&!n.has(r);)n.add(r),t.unshift(r),r=Le.value.get(r).parentId;return t}let Ge=r(()=>{let e=new Map;for(let t of Fe.value)Be(t.groupId).forEach((n,r)=>{let i=Le.value.get(n),a=e.get(n)??{id:n,title:i.title,color:i.color,depth:r,colIds:[]};a.colIds.push(t.id),e.set(n,a)});return[...e.values()]}),Je=r(()=>Ge.value.length?(Math.max(...Ge.value.map(e=>e.depth))+1)*$l:0),Xe=m(null),Ze=m([]);function Qe(){let e=Xe.value;if(!e||!Ge.value.length){Ze.value=[];return}Ze.value=Ge.value.flatMap(t=>{let n=t.colIds.map(t=>e.querySelector(`[data-col-id="${CSS.escape(t)}"]`)).filter(e=>e!==null);if(!n.length)return[];let r=Math.min(...n.map(e=>e.offsetLeft)),i=Math.max(...n.map(e=>e.offsetLeft+e.offsetWidth)),a=n.reduce((e,t)=>e+(Fe.value.find(e=>e.id===t.dataset.colId)?.cards.length??0),0);return[{id:t.id,title:t.title,color:t.color,top:t.depth*$l,left:r,width:i-r,count:a}]})}let $e=null;ae(()=>{if(Qe(),typeof ResizeObserver<`u`&&Xe.value){$e=new ResizeObserver(()=>Qe()),$e.observe(Xe.value);for(let e of Xe.value.querySelectorAll(`.kb-col`))$e.observe(e)}}),Ee(()=>$e?.disconnect()),ye(()=>[Fe.value.map(e=>`${e.id}:${e.groupId??``}:${e.cards.length}`).join(`|`),o.columnGroups],()=>{ee(()=>{if(Qe(),!(!$e||!Xe.value))for(let e of Xe.value.querySelectorAll(`.kb-col`))$e.observe(e)})},{deep:!0});function et(e){return g.value.find(t=>t.id===e)?.title??``}function tt(e,t,n){e.history=[...e.history??[],{type:t,timestamp:new Date().toISOString(),detail:n}]}function nt(){if(o.readOnly||!S.value.trim())return;let e=S.value.trim();_([...g.value,{id:f(),title:e,order:g.value.length,cards:[]}],{kind:`column-add`,title:e}),S.value=``,b.value=!1}function rt(e){if(o.readOnly)return;let t=g.value.find(t=>t.id===e);if(!t)return;let n=!t.done;_(g.value.map(t=>t.id===e?{...t,done:n||void 0}:t),{kind:`column-set-done`,columnId:e,done:n})}function it(e){if(o.readOnly)return;let t=g.value.find(t=>t.id===e);l.require({message:d(`column.confirmDeleteMessage`,{title:t?.title??``,count:t?.cards.length??0}),header:d(`column.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>_(g.value.filter(t=>t.id!==e),{kind:`column-delete`,columnId:e})})}function at(e,t){o.readOnly||!t.trim()||_(g.value.map(n=>n.id===e?{...n,title:t.trim()}:n),{kind:`column-rename`,columnId:e,title:t.trim()})}let V=m(null),ot=m(``),ct=m(``),lt=m([]),ut=m([]),dt=m(!1),ft=m([]),pt=m([]),mt=0,ht=m([]),gt=w(new Map),_t=m([]),vt=m([]),yt=m([]),bt=r(()=>{let e=new Set;for(let t of g.value)for(let n of t.cards)for(let t of n.groups??[])e.add(t);for(let t of o.archivedCards)for(let n of t.groups??[])e.add(n);return[...e].sort((e,t)=>e.localeCompare(t))});function xt(e){let t=e.query.trim(),n=new Set(vt.value),r=bt.value.filter(e=>!n.has(e)&&(!t||e.toLowerCase().includes(t.toLowerCase()))),i=bt.value.some(e=>e.toLowerCase()===t.toLowerCase());yt.value=t&&!i&&!n.has(t)?[t,...r]:r}let St=m(null),Ct=m(null),wt=r(()=>{let e=Tt(Ct.value),t=e?en(e):null;return t===null?``:t<0?d(`editor.deadlineOverdue`,{count:-t}):t===0?d(`editor.deadlineToday`):d(`editor.deadlineIn`,{count:t})});function Tt(e){if(!e)return null;let t=e=>String(e).padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function Et(e){if(!e)return null;let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r,12)}function Dt(){o.readOnly||(St.value=5)}function Ot(e){let t=e.trim();!t||vt.value.includes(t)||(vt.value=[...vt.value,t])}let kt=m(!1);function At(e){let t=e.target?.closest(`.p-autocomplete`)?.querySelector(`input`);return t instanceof HTMLInputElement?t:null}function jt(){kt.value=!0}function Mt(e){let t=At(e);if(t){if(e.type===`keydown`){if(t.getAttribute(`aria-activedescendant`))return;Nt(t);return}kt.value=!1,setTimeout(()=>{if(kt.value){kt.value=!1,t.value=``;return}Nt(t)},0)}}function Nt(e){e.value.trim()&&(Ot(e.value),e.value=``)}let Pt=m(``),It=[`#ef4444`,`#f97316`,`#eab308`,`#22c55e`,`#06b6d4`,`#3b82f6`,`#8b5cf6`,`#ec4899`],Lt=m(``),Rt=m(`edit`),zt=m(``),Bt=m([]),Vt=m(null),Ht=m(null),Ut=m(null),Wt=m(``);async function Gt(){await ee(),Ht.value?.scrollIntoView({block:`end`})}ye(V,e=>c(`card-open`,e));let Kt=m(null),qt=m(`bottom`);function Jt(e,t=`bottom`){if(!o.readOnly){if(qt.value=t,o.templates.length===0){Xt(e,``);return}Kt.value=e}}function Yt(e){let t=Kt.value;Kt.value=null,t&&Xt(t,e?.content??``)}function Xt(e,t){let n=g.value.find(t=>t.id===e);if(!n)return;let r=new Date().toISOString();Zt(e,{id:f(),title:d(`card.defaultTitle`),markdown:t,images:[],order:qt.value===`top`?0:n.cards.length,...s.value?{}:{history:[{type:`created`,timestamp:r,detail:d(`card.inColumn`,{name:et(e)})}]},createdAt:r,updatedAt:r})}function Zt(e,t){if(mr(),V.value={colId:e,card:{...t,history:[...t.history??[]]}},o.loadHistory&&Rn(t.id)){let n=o.histories?.[t.id];n&&(V.value={colId:e,card:{...t,history:n}}),o.loadHistory(t.id)}o.loadConversations&&Rn(t.id)&&o.loadConversations(t.id),ot.value=t.title,ct.value=t.markdown??``,lt.value=[...t.images],ut.value=[...t.attachments??[]],ft.value=[],ht.value=[],zt.value=``,Bt.value=[],pr(ut.value),pr((t.history??[]).flatMap(e=>e.attachments??[])),_t.value=(t.assignees??[]).map(e=>e.id),Pt.value=t.color??``,vt.value=[...t.groups??[]],St.value=t.priority??null,Ct.value=Et(t.deadline),Lt.value=e,Rt.value=`edit`}ye(()=>V.value?o.histories?.[V.value.card.id]:void 0,e=>{let t=V.value;!e||!t||t.card.history===e||(V.value={colId:t.colId,card:{...t.card,history:e}},pr(e.flatMap(e=>e.attachments??[])))});let Qt=r(()=>{let e=V.value;return e?!Rn(e.card.id):!1}),$t=r(()=>{let e=V.value;if(!e)return!1;if(Qt.value)return!0;let t=e.card,n=(e,t)=>JSON.stringify(e)===JSON.stringify(t);return ot.value!==t.title||ct.value!==(t.markdown??``)||Lt.value!==e.colId||!n(lt.value,t.images)||!n(ut.value,t.attachments??[])||!n(_t.value,(t.assignees??[]).map(e=>e.id))||Pt.value!==(t.color??``)||!n(vt.value,t.groups??[])||St.value!==(t.priority??null)||Tt(Ct.value)!==(t.deadline??null)}),tn=r(()=>$t.value||zt.value.trim().length>0||Bt.value.length>0||Ut.value!==null);function nn(){if(!tn.value){sn();return}l.require({message:d(`editor.confirmDiscardMessage`),header:d(`editor.confirmDiscardHeader`),icon:`pi pi-exclamation-triangle`,acceptClass:`p-button-danger`,acceptLabel:d(`editor.discard`),rejectLabel:d(`editor.keepEditing`),accept:()=>sn()})}function an(){let e=V.value;if(!e)return;let t=g.value.flatMap(e=>e.cards).find(t=>t.id===e.card.id)??Ln.value.get(e.card.id);if(!t)return;if(!$t.value){let n=g.value.find(e=>e.cards.some(e=>e.id===t.id))?.id??e.colId;V.value={colId:n,card:{...t,history:e.card.history}},ot.value=t.title,ct.value=t.markdown??``,lt.value=[...t.images],ut.value=[...t.attachments??[]],_t.value=(t.assignees??[]).map(e=>e.id),Pt.value=t.color??``,vt.value=[...t.groups??[]],St.value=t.priority??null,Ct.value=Et(t.deadline),Lt.value=n}if(t.history===void 0)return;let n=V.value;if(!n)return;let r=e=>`${e.type}|${e.timestamp}|${e.detail??``}`,i=new Set((t.history??[]).map(r)),a=[...t.history??[],...(n.card.history??[]).filter(e=>!i.has(r(e)))].sort((e,t)=>e.timestamp.localeCompare(t.timestamp));V.value={colId:n.colId,card:{...n.card,history:a}}}function on(){let e=ht.value;if(ht.value=[],o.deleteAttachment)for(let t of e)o.deleteAttachment(t)}function sn(){V.value=null,Br(),kr(),mr(),on()}function cn(){if(Bn.value||!V.value)return;let{colId:e,card:t}=V.value,n=ot.value||d(`card.untitled`),r=s.value?[]:[...t.history??[]],i=()=>new Date().toISOString();!s.value&&n!==t.title&&t.title!==d(`card.defaultTitle`)&&r.push({type:`title_changed`,timestamp:i(),detail:`"${t.title}" → "${n}"`}),!s.value&&ct.value!==t.markdown&&r.push({type:`edited`,timestamp:i()});let a=s.value?0:lt.value.length-t.images.length;a>0?r.push({type:`image_added`,timestamp:i(),detail:`${a} image(s) added`}):a<0&&r.push({type:`image_removed`,timestamp:i(),detail:`${Math.abs(a)} image(s) removed`});let l=_t.value.map(e=>({id:e,name:o.members.find(t=>t.userId===e)?.name??e})),u=s.value?[]:l.filter(e=>!(t.assignees??[]).some(t=>t.id===e.id));u.length&&r.push({type:`edited`,timestamp:i(),detail:d(`editor.assignedDetail`,{names:u.map(e=>e.name).join(`, `)})});let f=[...new Set(vt.value.map(e=>e.trim()).filter(Boolean))],{color:p,priority:m,groups:h,deadline:v,...y}=t,b={...y,title:n,markdown:ct.value,images:lt.value,attachments:ut.value,assignees:l,...Pt.value?{color:Pt.value}:{},...f.length?{groups:f}:{},...St.value===null?{}:{priority:St.value},...Tt(Ct.value)?{deadline:Tt(Ct.value)}:{},history:s.value?t.history:r,updatedAt:i()},x=Lt.value||e;!s.value&&x!==e&&r.push({type:`moved`,timestamp:i(),detail:`${et(e)} → ${et(x)}`});let S=!Rn(b.id),C=S?{kind:`card-add`,columnId:x,card:b,placement:qt.value}:{kind:`card-update`,cardId:b.id,patch:{title:b.title,markdown:b.markdown,priority:b.priority??null,color:b.color??null,deadline:b.deadline??null,groups:b.groups??[],assignees:l.map(e=>e.id),attachments:b.attachments,images:b.images}};!S&&x!==e&&c(`intent`,{kind:`card-move`,cardId:b.id,toColumnId:x}),_(g.value.map(t=>{if(t.id===e&&x!==e)return{...t,cards:t.cards.filter(e=>e.id!==b.id)};if(t.id!==x)return t;if(t.cards.some(e=>e.id===b.id))return{...t,cards:t.cards.map(e=>e.id===b.id?b:e)};let n=qt.value===`top`?[b,...t.cards]:[...t.cards,b];return{...t,cards:n.map((e,t)=>({...e,order:t}))}}),C),ht.value=[],V.value={colId:x,card:b},Lt.value=x}function ln(e,t){for(let n of g.value){let r=n.cards.find(e=>e.id===t);if(r)return{cardId:t,boardId:e,title:r.title,boardName:d(`editor.relationsHereBoard`),columnTitle:n.title,here:!0,assignees:r.assignees??[],commentCount:r.commentCount??(r.history??[]).filter(e=>e.type===`comment`).length}}let n=o.linkedCards.find(n=>n.cardId===t&&n.boardId===e);return n?{cardId:t,boardId:e,title:n.title,boardName:n.boardName,columnTitle:n.columnTitle,here:!1,assignees:n.assignees??[],commentCount:n.commentCount??0}:null}function un(e){return o.cardLinks.find(t=>t.childCardId===e)}function dn(e){return o.cardLinks.filter(t=>t.parentCardId===e)}function fn(e){return dn(e).length}let pn=r(()=>{let e=V.value;if(!e)return null;let t=un(e.card.id);return t?ln(t.parentBoardId,t.parentCardId):null}),mn=r(()=>{let e=V.value;return e?dn(e.card.id).flatMap(e=>{let t=ln(e.childBoardId,e.childCardId);return t?[t]:[]}):[]});function hn(e,t){let n=new Set([e]),r=[e];for(let e=0;e<r.length&&e<=o.cardLinks.length;e+=1){let i=t===`down`?dn(r[e]).map(e=>e.childCardId):[un(r[e])?.parentCardId].filter(e=>!!e);for(let e of i)n.has(e)||(n.add(e),r.push(e))}return n}function gn(e){return C.value.flatMap(t=>t.cards.filter(t=>!e.has(t.id)).map(e=>({id:e.id,title:e.title,column:t.title})))}let _n=r(()=>{let e=V.value;return e?gn(hn(e.card.id,`down`)):[]}),vn=r(()=>{let e=V.value;if(!e)return[];let t=hn(e.card.id,`up`);for(let n of dn(e.card.id))t.add(n.childCardId);return gn(t)});function yn(e){let t=V.value;!t||Bn.value||!o.setCardParent||o.setCardParent(t.card.id,e)}function bn(e){let t=V.value;!t||!e||Bn.value||!o.setCardParent||o.setCardParent(e,t.card.id)}function Tn(e){Bn.value||!o.setCardParent||o.setCardParent(e,null)}let En=r(()=>!Bn.value&&o.setCardParent!==void 0&&!!V.value&&g.value.some(e=>e.cards.some(e=>e.id===V.value?.card.id))),Dn=r(()=>{let e=V.value;if(!e)return[];let t=[],n=new Set([e.card.id]),r=e.card.id;for(let e=0;e<=o.cardLinks.length;e+=1){let e=un(r);if(!e||n.has(e.parentCardId))break;let i=ln(e.parentBoardId,e.parentCardId);if(!i)break;n.add(e.parentCardId),t.push(i),r=e.parentCardId}return t.reverse()}),On=r(()=>(pn.value?1:0)+mn.value.length);function kn(e,t){for(let t of g.value){let n=t.cards.find(t=>t.id===e);if(n){Zt(t.id,n);return}}t&&c(`open-linked-card`,{boardId:t,cardId:e})}let An=r(()=>{let e=C.value.map(e=>({id:e.id,title:e.title,boardId:``})),t=[{label:d(`editor.columnGroupHere`),items:e}];if(!Bn.value&&o.moveCardToBoard)for(let e of o.otherBoards)e.columns.length&&t.push({label:e.name,items:e.columns.map(t=>({id:`${e.id}:${t.id}`,title:t.title,boardId:e.id}))});return t});function jn(e){let[t,n]=e.includes(`:`)?e.split(`:`):[``,e];if(!t){Lt.value=n??``;return}let r=V.value,i=o.otherBoards.find(e=>e.id===t),a=i?.columns.find(e=>e.id===n);Bn.value||!r||!i||!a||!o.moveCardToBoard||l.require({message:d(`editor.moveToBoardConfirm`,{board:i.name,column:a.title}),header:d(`editor.moveToBoardHeader`),icon:`pi pi-arrow-right-arrow-left`,accept:()=>{let e=r.card.id;sn(),o.moveCardToBoard?.(e,t,a.id)}})}let Nn=m(!1),Pn=m(``),Fn=m(``),In=r(()=>[{id:``,title:d(`archive.allColumns`)},...g.value.map(e=>({id:e.id,title:e.title}))]),Ln=r(()=>new Map(o.archivedCards.map(e=>[e.id,e])));function Rn(e){return g.value.some(t=>t.cards.some(t=>t.id===e))||Ln.value.has(e)?!0:!!(V.value?.card.id===e&&V.value.card.archivedAt)}let zn=r(()=>!!(V.value&&(V.value.card.archivedAt||Ln.value.has(V.value.card.id)))),Bn=r(()=>o.readOnly||zn.value),Vn=r(()=>V.value?o.cardConversations[V.value.card.id]??[]:[]),Hn=r(()=>[...new Set(Vn.value.map(e=>e.provider))].sort()),Un=r(()=>!V.value||!Rn(V.value.card.id)?[]:[...new Set(o.conversationIntegrations.map(e=>e.provider))].sort()),Wn=m(null);ye(Hn,e=>{Rt.value.startsWith(`conv-`)&&!e.includes(Rt.value.slice(5))&&(Rt.value=`edit`)});function Gn(){let e=Wn.value;Wn.value=null,e&&(Rt.value=`conv-${e}`)}let Kn=r(()=>!Bn.value&&o.linkConversation!==void 0&&o.searchConversations!==void 0);ye(Vn,e=>{let t=e.flatMap(e=>[...e.opening?.attachments??[],...e.messages.flatMap(e=>e.attachments)]);t.length&&pr(t)});function qn(e){return Vn.value.filter(t=>t.provider===e)}function Jn(e){return o.conversationIntegrations.filter(t=>t.provider===e)}function Yn(e,t){return o.searchConversations?o.searchConversations(e,t):Promise.resolve([])}function Xn(e,t){let n=V.value?.card.id;return n&&o.linkConversation?o.linkConversation(n,e,t):Promise.resolve(!1)}function Zn(e){let t=V.value?.card.id;return t&&o.resyncConversation?o.resyncConversation(t,e):Promise.resolve(!1)}function Qn(e){let t=V.value?.card.id;t&&o.unlinkConversation&&o.unlinkConversation(t,e)}function $n(e){Zt(e.archivedFrom?.columnId??``,e)}let er=r(()=>pe.value?o.archivedCards.filter(ge):o.archivedCards),tr=r(()=>o.archivedCards.length-er.value.length),nr=null;function rr(){Nn.value=!0,c(`load-archive`,Pn.value,Fn.value)}ye(Pn,e=>{Nn.value&&(nr&&clearTimeout(nr),nr=setTimeout(()=>c(`load-archive`,e,Fn.value),250))}),ye(Fn,e=>{Nn.value&&(nr&&clearTimeout(nr),c(`load-archive`,Pn.value,e))});let ir=null;ye(v,e=>{if(ir&&clearTimeout(ir),!e.trim()){c(`search-cards`,``);return}ir=setTimeout(()=>c(`search-cards`,e),250)}),Ee(()=>{ir&&clearTimeout(ir),nr&&clearTimeout(nr)});function ar(e,t){o.readOnly||(_(g.value.map(n=>n.id===e?{...n,cards:n.cards.filter(e=>e.id!==t)}:n),{kind:`card-archive`,cardId:t}),V.value?.card.id===t&&sn())}let or=m(null);ye(()=>V.value?.card.id,()=>{or.value=null});function sr(e,t){if(o.readOnly)return;let n=g.value.find(e=>e.id===t);if(!n)return;let r=new Date().toISOString(),i={id:f(),title:e.title,markdown:e.markdown,order:n.cards.reduce((e,t)=>Math.max(e,t.order),-1)+1,createdAt:r,updatedAt:r,history:[],images:[],...e.priority===void 0?{}:{priority:e.priority},...e.groups?.length?{groups:[...e.groups]}:{},...e.color?{color:e.color}:{},...e.deadline?{deadline:e.deadline}:{}};_(g.value.map(e=>e.id===t?{...e,cards:[...e.cards,i]}:e),{kind:`card-add`,columnId:t,card:i,placement:`bottom`})}function cr(e,t){if(!o.readOnly){if(t){c(`intent`,{kind:`card-unarchive`,cardId:e,toColumnId:t});return}c(`intent`,{kind:`card-unarchive`,cardId:e})}}function lr(e,t){if(o.readOnly)return;let n=g.value.find(t=>t.id===e)?.cards.find(e=>e.id===t);l.require({message:d(`editor.confirmDeleteMessage`,{title:n?.title??``}),header:d(`editor.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>{_(g.value.map(n=>n.id===e?{...n,cards:n.cards.filter(e=>e.id!==t)}:n),{kind:`card-delete`,cardId:t}),sn()}})}function ur(){if(Bn.value||!V.value||!zt.value.trim()&&!Bt.value.length)return;let{colId:e,card:t}=V.value,n=Bt.value;if(o.addComment){let e=zt.value.trim(),r=t.id;zt.value=``,ht.value=ht.value.filter(e=>!n.some(t=>t.id===e.id)),Bt.value=[],o.addComment(r,e,n.length?{attachments:n}:{}).then(t=>{t||(zt.value.trim()||(zt.value=e),Bt.value=[...n,...Bt.value])});return}}let dr=/^image\/(png|jpeg|webp|gif)$/;function fr(e){return gt.get(e.id)}async function pr(e){if(o.fetchAttachment)for(let t of e){if(!dr.test(t.contentType)||gt.has(t.id))continue;let e=await o.fetchAttachment(t);e&>.set(t.id,e)}}function mr(){for(let e of gt.values())URL.revokeObjectURL(e);gt.clear()}let hr=/^video\/(mp4|webm|ogg)$/,gr=/^audio\/(mpeg|mp3|ogg|wav|x-wav|webm)$/,_r=/^(text\/|application\/(json|xml|xhtml\+xml|javascript|x-yaml|yaml)$)/;function vr(e){let t=e.contentType||``;if(dr.test(t))return`image`;if(t===`application/pdf`)return`pdf`;if(hr.test(t))return`video`;if(gr.test(t))return`audio`;let n=Tr(t,e.name);return n?e.size<=20971520?n:null:_r.test(t)&&e.size<=eu?`text`:null}let yr=m(null),br=m(0),xr=r(()=>{let e=yr.value?.office;return e?.mode===`sheet`?e.sheets[br.value]??e.sheets[0]??null:null}),Sr=m(null),Cr=m(!1);ye([()=>yr.value?.office,Sr],async([e,t])=>{if(!(!t||e?.mode!==`render`)){t.replaceChildren(),Cr.value=!1;try{await e.render(t)}catch{Cr.value=!0}}});async function wr(e){let t=vr(e),n=gt.get(e.id),r=n??await o.fetchAttachment?.(e)??null;if(!r){ft.value=[...ft.value,{name:e.name,reason:d(`editor.downloadFailed`)}];return}if(!t){Dr(r,e.name,!n);return}let i,a;if(t===`text`)try{i=await(await fetch(r)).text()}catch{Dr(r,e.name,!n);return}else if(t===`sheet`||t===`doc`||t===`slides`)try{a=await Er(t,await(await fetch(r)).arrayBuffer(),e.name,e.contentType||``)}catch{Dr(r,e.name,!n);return}kr(),br.value=0,yr.value={file:e,url:r,kind:t,text:i,office:a,cached:!!n}}function Dr(e,t,n){let r=document.createElement(`a`);r.href=e,r.download=t||`file`,r.rel=`noopener`,document.body.appendChild(r),r.click(),r.remove(),n&&setTimeout(()=>URL.revokeObjectURL(e),6e4)}function Or(){let e=yr.value;e&&Dr(e.url,e.file.name,!1)}function kr(){let e=yr.value;yr.value=null,e&&!e.cached&&URL.revokeObjectURL(e.url)}function Ar(e){ut.value=ut.value.filter((t,n)=>n!==e)}let jr=w(new Set);function Mr(e){return e.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)}let Nr=r(()=>o.members.map(e=>({id:e.userId,label:e.name})));function Pr(e){return o.members.find(t=>t.userId===e)?.name??e}function Fr(e){return!!o.currentUserId&&e.authorUser?.id===o.currentUserId}function Ir(e){return e.author===`ai`?null:e.authorUser?.id??null}function Lr(e){return e.author===`ai`?d(`comments.authorAi`):Fr(e)?d(`comments.authorYou`):e.authorUser?.name??d(`comments.authorYou`)}function Rr(e){if(!V.value)return;let{colId:t,card:n}=V.value;V.value={colId:t,card:{...n,history:e}},_(g.value.map(r=>r.id===t?{...r,cards:r.cards.map(t=>t.id===n.id?{...t,history:e}:t)}:r))}function zr(e){Ut.value=e.id??null,Wt.value=e.detail??``}function Br(){Ut.value=null,Wt.value=``}function Vr(){let e=Ut.value,t=Wt.value.trim();if(Bn.value||!e||!t||!V.value)return;let{card:n}=V.value,r=(n.history??[]).map(n=>n.id===e?{...n,detail:t,editedAt:new Date().toISOString()}:n);if(o.editComment){let i=(n.history??[]).find(t=>t.id===e);o.editComment(n.id,e,t,i?.attachments),Rr(r)}Br()}function Hr(e){return e.id??`${e.type}|${e.timestamp}`}function Ur(e){return e.type===`comment`&&e.author===`ai`}function Wr(e){return Fr(e)||Ur(e)}function Gr(e){if(Bn.value||!Wr(e)||!V.value)return;let t=Hr(e);l.require({message:d(`comments.confirmDeleteMessage`),header:d(`comments.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>{let n=V.value;if(!n)return;let r=(n.card.history??[]).filter(e=>Hr(e)!==t);o.removeComment&&e.id&&(o.removeComment(n.card.id,e.id),Rr(r))}})}let Kr=r(()=>o.columnSubscriptions!==void 0),qr=m(null),Jr=[`entered`,`left`,`created`,`deleted`],Yr=[`email`,`chat`],Xr=[...Jr],Qr=[...Yr],$r=m([...Xr]),ei=m([...Qr]),ti=m(null),ni=r(()=>o.manageableTeamIds?o.teams.filter(e=>o.manageableTeamIds.includes(e.id)):o.teams);function ri(e,t=null){return t?o.columnTeamSubscriptions?.[e]?.find(e=>e.teamId===t)??null:o.columnSubscriptions?.[e]??null}function ii(e){return ri(e)!==null}let ai=r(()=>{let e=qr.value;return e?(o.columnTeamSubscriptions?.[e]??[]).map(e=>o.teams.find(t=>t.id===e.teamId)?.name).filter(e=>!!e):[]}),oi=w(new Set),si=new Map,ci=null;function li(e,t){t.scrollWidth>t.clientWidth+1||t.scrollHeight>t.clientHeight+1?oi.add(e):oi.delete(e)}function ui(e,t){let n=si.get(t);if(n&&n!==e&&ci?.unobserve(n),!(e instanceof HTMLElement)){si.delete(t),oi.delete(t);return}si.set(t,e),typeof ResizeObserver<`u`&&(ci??=new ResizeObserver(e=>{for(let t of e)for(let[e,n]of si)n===t.target&&li(e,n)}),ci.observe(e)),li(t,e)}ye(()=>g.value.flatMap(e=>[e.title,...e.cards.map(e=>e.title)]).join(`\0`),()=>void ee(()=>{for(let[e,t]of si)li(e,t)})),Ee(()=>ci?.disconnect());function di(e,t){return{value:oi.has(e)?t:``,showDelay:0,hideDelay:0}}let fi=m(null),pi=m(null);function mi(e,t){pi.value=t,fi.value?.toggle(e)}function gi(e){let t=pi.value;t&&(fi.value?.hide(),e(t.id))}function _i(e,t){let n=ri(e,t);$r.value=n?[...n.kinds]:[...Xr],ei.value=n?[...n.channels]:[...Qr]}function vi(e){ti.value=null,_i(e,null),qr.value=e}function yi(e){ti.value=e,qr.value&&_i(qr.value,e)}let bi=r(()=>$r.value.length>0&&ei.value.length>0),xi=r(()=>ti.value?{teamId:ti.value}:{}),Si=r(()=>qr.value?ri(qr.value,ti.value)!==null:!1);function Ci(){let e=qr.value;!e||!bi.value||(c(`update-column-subscription`,{columnId:e,subscription:{kinds:[...$r.value],channels:[...ei.value]},...xi.value}),qr.value=null)}function wi(){let e=qr.value;e&&(c(`update-column-subscription`,{columnId:e,subscription:null,...xi.value}),qr.value=null)}let Ti=r(()=>o.columns.find(e=>e.id===qr.value)??null),Ei=w(new Set),Di=w(new Set),Oi=r(()=>`runeya.kanban.collapsedColumns.${o.name}`),ki=r(()=>`runeya.kanban.expandedColumns.${o.name}`);function Ai(e,t){t.clear();try{let n=window.localStorage.getItem(e);if(!n)return;let r=JSON.parse(n);if(Array.isArray(r))for(let e of r)typeof e==`string`&&t.add(e)}catch{}}function ji(){Ai(Oi.value,Ei),Ai(ki.value,Di)}function Mi(){try{window.localStorage.setItem(Oi.value,JSON.stringify([...Ei])),window.localStorage.setItem(ki.value,JSON.stringify([...Di]))}catch{}}ji(),ye(Oi,ji);function Ni(e){let t=o.columns.find(t=>t.id===e);return!!t&&t.cards.length===0}function Pi(e){return Ei.has(e)?!0:Ni(e)&&!Di.has(e)}function Fi(e){Pi(e)?(Ei.delete(e),Ni(e)&&Di.add(e)):(Di.delete(e),Ni(e)||Ei.add(e)),Mi()}let Ii=r(()=>(V.value?.card.history??[]).filter(e=>e.type===`comment`));ye([Rt,Ii],([e])=>{e===`comments`&&(Gt(),Xi())}),ye(()=>V.value?.card.id,()=>{Bi.clear(),Vi.clear()});function Li(e){if(/^(https?:|mailto:)/i.test(e)){window.open(e,`_blank`,`noopener,noreferrer`);return}e.startsWith(`#`)||e.startsWith(`/`)&&window.open(e,`_blank`,`noopener,noreferrer`)}function Ri(e){let t=(e.target?.closest(`a`))?.getAttribute(`href`);return t?(e.preventDefault(),e.stopPropagation(),Li(t),!0):!1}let zi=wn,Bi=w(new Set),Vi=w(new Set);function Hi(e,t){return e.id??`i${t}`}function Ui(e,t){return Bi.has(Hi(e,t))}function Wi(e,t){let n=Hi(e,t);return Vi.has(n)||Bi.has(n)}function Gi(e,t){let n=Hi(e,t);Bi.has(n)?Bi.delete(n):Bi.add(n)}function Ki(e,t,n){Ri(n)||Qi(e)||Wi(e,t)&&(n.stopPropagation(),Gi(e,t))}let Ji=new Map;function Yi(e,t,n){let r=Hi(t,n);if(!(e instanceof HTMLElement)){Ji.delete(r);return}Ji.set(r,e),!Bi.has(r)&&(e.scrollHeight-e.clientHeight>1?Vi.add(r):Vi.delete(r))}async function Xi(){await ee();for(let[e,t]of Ji)Bi.has(e)||(t.scrollHeight-t.clientHeight>1?Vi.add(e):Vi.delete(e))}function Zi(e){return o.resolveConversationId?o.resolveConversationId(e):e.conversationId??null}function Qi(e){return!!Zi(e)}let $i=r(()=>{let e=V.value?.card;if(!e)return[];let t=e.conversationEvents??e.history??[],n=new Set,r=[];for(let e of t){if(e.type!==`conversation_started`&&e.type!==`scenario_started`)continue;let t=Zi(e);if(!t||n.has(t))continue;n.add(t);let i=e.detail??``,a=i.includes(` — `)?i.slice(0,i.lastIndexOf(` — `)).trim():``,o=lu(e.timestamp);r.push({id:t,label:o,title:a||cu.value[e.type]})}return r});function ea(e){let t=Zi(e);t&&c(`open-conversation`,t)}let ta={created:`pi pi-plus-circle`,edited:`pi pi-pencil`,moved:`pi pi-arrow-right-arrow-left`,image_added:`pi pi-image`,image_removed:`pi pi-trash`,title_changed:`pi pi-tag`,conversation_started:`pi pi-comments`,scenario_started:`pi pi-sitemap`,comment:`pi pi-comment`,archived:`pi pi-inbox`,unarchived:`pi pi-replay`},cu=r(()=>({created:d(`history.events.created`),edited:d(`history.events.edited`),moved:d(`history.events.moved`),image_added:d(`history.events.image_added`),image_removed:d(`history.events.image_removed`),title_changed:d(`history.events.title_changed`),archived:d(`history.events.archived`),unarchived:d(`history.events.unarchived`),conversation_started:d(`history.events.conversation_started`),scenario_started:d(`history.events.scenario_started`),comment:d(`history.events.comment`)}));function lu(e){let t=new Date(e);return`${t.toLocaleDateString()} ${t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`}function uu(e){return new Promise(t=>{let n=new FileReader;n.onload=()=>t(typeof n.result==`string`?n.result:null),n.onerror=()=>t(null),n.readAsDataURL(e)})}async function du(e){let t=[];for(let n of e){if(n.size===0){ft.value=[...ft.value,{name:n.name,reason:d(`editor.uploadEmpty`)}];continue}if(n.size>tu){ft.value=[...ft.value,{name:n.name,reason:d(`editor.uploadTooLarge`)}];continue}if(!o.uploadImage){ft.value=[...ft.value,{name:n.name,reason:d(`editor.uploadUnavailable`)}];continue}let e=`${mt+=1}`;pt.value=[...pt.value,{key:e,name:n.name,ratio:0}];try{let r=await o.uploadImage(n,t=>{pt.value=pt.value.map(n=>n.key===e?{...n,ratio:t}:n)});r?(t.push(r),ht.value=[...ht.value,r]):ft.value=[...ft.value,{name:n.name,reason:d(`editor.uploadFailed`)}]}finally{pt.value=pt.value.filter(t=>t.key!==e)}}return t}async function fu(e){let t=e.target;if(!t.files)return;let n=Array.from(t.files);t.value=``,dt.value=!0,ft.value=[];try{let e=await du(n);Bt.value=[...Bt.value,...e],pr(e)}finally{dt.value=!1}}async function pu(e,t){if(!(Bn.value||!e.length)){dt.value=!0,ft.value=[];try{let n=await du(e);if(!n.length)return;t===`comment`?Bt.value=[...Bt.value,...n]:ut.value=[...ut.value,...n],pr(n)}finally{dt.value=!1}}}function mu(e){Bt.value=Bt.value.filter((t,n)=>n!==e)}async function hu(e){let t=e.target;if(!t.files)return;let n=Array.from(t.files);t.value=``,dt.value=!0,ft.value=[],pt.value=[];try{if(o.uploadImage){let e=await du(n);ut.value=[...ut.value,...e],pr(e);return}for(let e of n){if(!e.type.startsWith(`image/`)||e.size>nu){ft.value=[...ft.value,{name:e.name,reason:d(`editor.uploadUnavailable`)}];continue}let t=await uu(e);if(!t){ft.value=[...ft.value,{name:e.name,reason:d(`editor.uploadFailed`)}];continue}lt.value=[...lt.value,t],Vt.value?.insertImage(t)}}finally{dt.value=!1}}function H(e){l.require({message:d(`editor.confirmRemoveImageMessage`),header:d(`editor.confirmRemoveImageHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>{lt.value=lt.value.filter((t,n)=>n!==e)}})}let U=m(null),W=m(null),gu=null,G=null,_u=`before`,vu=null,yu=`before`,bu=null,xu=null,Su=null,K=[`kb-card--drop-before`,`kb-card--drop-after`],Cu=[`kb-col--col-drop-before`,`kb-col--col-drop-after`];function wu(e,t){bu&&bu!==e&&bu.classList.remove(...K),bu=e,e&&(e.classList.toggle(`kb-card--drop-before`,t===`before`),e.classList.toggle(`kb-card--drop-after`,t===`after`))}function q(e){xu&&xu!==e&&xu.classList.remove(`kb-col--dragover`),xu=e,e?.classList.add(`kb-col--dragover`)}function Tu(e,t){Su&&Su!==e&&Su.classList.remove(...Cu),Su=e,e&&(e.classList.toggle(`kb-col--col-drop-before`,t===`before`),e.classList.toggle(`kb-col--col-drop-after`,t===`after`))}function Eu(){wu(null,`before`),q(null),Tu(null,`before`)}let Du=m(null),Ou=m(null),ku=m(!1),Au=null,ju=null,Mu=null,Nu={x:0,y:0},Pu={x:0,y:0},Fu=!1,Iu=m(null);function Lu(e,t){Au&&cancelAnimationFrame(Au);let n=Iu.value?.querySelector(`.kb-board`),r=()=>{let i=!1;if(n){let t=n.getBoundingClientRect();e<t.left+ou&&n.scrollLeft>0?(n.scrollLeft-=su,i=!0):e>t.right-ou&&n.scrollLeft<n.scrollWidth-n.clientWidth&&(n.scrollLeft+=su,i=!0)}let a=zu(e,t)?.closest(`.kb-col__cards`);if(a){let e=a.getBoundingClientRect();t<e.top+ou&&a.scrollTop>0?(a.scrollTop-=su,i=!0):t>e.bottom-ou&&a.scrollTop<a.scrollHeight-a.clientHeight&&(a.scrollTop+=su,i=!0)}i&&Uu(e,t),Au=i&&ku.value?requestAnimationFrame(r):null};Au=requestAnimationFrame(r)}function Ru(){Au&&=(cancelAnimationFrame(Au),null)}function zu(e,t){Ou.value&&(Ou.value.style.display=`none`);let n=document.elementFromPoint(e,t);return Ou.value&&(Ou.value.style.display=``),n}function Bu(){ju&&=(clearTimeout(ju),null),Mu=null}function Vu(e){if(!Mu)return;let{type:t,colId:n,cardId:r,el:i}=Mu;Du.value=t,ku.value=!0,t===`card`&&r?(U.value={colId:n,cardId:r},W.value=null):(W.value=n,U.value=null),e&&navigator.vibrate&&navigator.vibrate(30);let a=t===`card`?i.closest(`.kb-card`):i.closest(`.kb-col`);if(a){let e=a.cloneNode(!0);e.style.cssText=`position:fixed;pointer-events:none;z-index:9999;opacity:0.8;width:${a.getBoundingClientRect().width}px;transform:rotate(2deg);`,document.body.appendChild(e),Ou.value=e}Mu=null}function Hu(e,t){Ou.value&&(Ou.value.style.left=`${e-40}px`,Ou.value.style.top=`${t-20}px`)}function Uu(e,t){let n=zu(e,t);if(!n||!Iu.value?.contains(n)){gu=null,G=null,vu=null,Eu();return}if(Du.value===`card`){let e=n.closest(`.kb-card`),r=n.closest(`.kb-col`);if(e&&r){let n=e.dataset.cardId||``,i=r.dataset.colId||``;if(n&&i){let a=e.getBoundingClientRect(),o=t-a.top<a.height/2?`before`:`after`;gu!==i&&(gu=i,q(r)),(G!==n||_u!==o)&&(G=n,_u=o,wu(e,o))}}else if(r){let e=r.dataset.colId||``;e&&(gu=e,G=null,q(r),wu(null,`before`))}}else if(Du.value===`column`){let t=n.closest(`.kb-col`);if(t){let n=t.dataset.colId||``;if(n&&n!==W.value){let r=t.getBoundingClientRect(),i=e-r.left<r.width/2?`before`:`after`;(vu!==n||yu!==i)&&(vu=n,yu=i,Tu(t,i))}}}}function Wu(){Bu(),Ru(),Ou.value&&=(Ou.value.remove(),null),ku.value&&(Du.value===`card`&&gu?rd(gu):Du.value===`column`&&vu&&id(vu)),Du.value=null,ku.value=!1,nd()}function Gu(e){return!!e?.closest(`button, a, input, textarea, select, [contenteditable="true"]`)}function Ku(e,t,n,r){o.readOnly||e.pointerType===`touch`||e.button!==0||Gu(e.target)||(Bu(),Fu=!1,Mu={type:t,colId:n,cardId:r,el:e.target},e.currentTarget.setPointerCapture?.(e.pointerId),Nu={x:e.clientX,y:e.clientY},Pu={...Nu},document.addEventListener(`pointermove`,Ju),document.addEventListener(`pointerup`,Yu),document.addEventListener(`pointercancel`,Yu),window.addEventListener(`wheel`,Zu,{passive:!0}),window.addEventListener(`scroll`,Zu,{capture:!0,passive:!0}),window.addEventListener(`keydown`,qu))}function qu(e){e.key===`Escape`&&(gu=null,G=null,vu=null,Eu(),Yu())}function Ju(e){if(Pu={x:e.clientX,y:e.clientY},!ku.value){if(!Mu||Math.hypot(e.clientX-Nu.x,e.clientY-Nu.y)<au)return;Vu(!1)}e.preventDefault(),Hu(e.clientX,e.clientY),Lu(e.clientX,e.clientY),Uu(e.clientX,e.clientY)}function Yu(){Xu(),ku.value&&(Fu=!0),Wu()}function Xu(){document.removeEventListener(`pointermove`,Ju),document.removeEventListener(`pointerup`,Yu),document.removeEventListener(`pointercancel`,Yu),window.removeEventListener(`wheel`,Zu),window.removeEventListener(`scroll`,Zu,{capture:!0}),window.removeEventListener(`keydown`,qu)}function Zu(){ku.value&&Uu(Pu.x,Pu.y)}function Qu(e){Fu&&(Fu=!1,e.stopImmediatePropagation(),e.preventDefault())}Ee(()=>{Xu(),Ru(),Ou.value&&=(Ou.value.remove(),null)});function $u(e,t,n,r){if(o.readOnly||Gu(e.target))return;Bu();let i=e.touches[0],a=i.clientX,s=i.clientY;Mu={type:t,colId:n,cardId:r,el:e.target};let c=e=>{let t=e.touches[0],n=t.clientX-a,r=t.clientY-s;Math.sqrt(n*n+r*r)>iu&&(Bu(),document.removeEventListener(`touchmove`,c))};document.addEventListener(`touchmove`,c,{passive:!0}),ju=setTimeout(()=>{document.removeEventListener(`touchmove`,c),Vu(!0)},ru)}function ed(e){if(!ku.value)return;e.preventDefault();let t=e.touches[0];Pu={x:t.clientX,y:t.clientY},Hu(t.clientX,t.clientY),Lu(t.clientX,t.clientY),Uu(t.clientX,t.clientY)}function td(){Wu()}function nd(){U.value=null,gu=null,G=null,W.value=null,vu=null,Eu()}function rd(e){if(o.readOnly)return;if(W.value){id(e);return}if(!U.value)return;let{colId:t,cardId:n}=U.value,r=et(t),i=et(e),a=null,c=g.value.map(e=>e.id===t?(a=e.cards.find(e=>e.id===n)??null,{...e,cards:e.cards.filter(e=>e.id!==n)}):e),l=0;if(a){let n={...a};!s.value&&t!==e&&tt(n,`moved`,`"${r}" → "${i}"`),c=c.map(t=>{if(t.id!==e)return t;let r=[...t.cards].sort((e,t)=>e.order-t.order),i=r.length;if(G){let e=r.findIndex(e=>e.id===G);e!==-1&&(i=_u===`before`?e:e+1)}return l=i,r.splice(i,0,n),{...t,cards:r.map((e,t)=>({...e,order:t}))}})}if(U.value=null,gu=null,G=null,Eu(),o.moveCard&&a){g.value=c,o.moveCard(a.id,e,l);return}_(c,a?{kind:`card-move`,cardId:a.id,toColumnId:e,toIndex:l}:void 0)}function id(e){if(o.readOnly||!W.value||W.value===e){W.value=null,vu=null,Eu();return}let t=[...g.value].sort((e,t)=>e.order-t.order),n=t.findIndex(e=>e.id===W.value),r=t.splice(n,1)[0],i=t.findIndex(t=>t.id===e);t.splice(yu===`before`?i:i+1,0,r),W.value=null,vu=null,Eu(),_(t.map((e,t)=>({...e,order:t})),{kind:`columns-reorder`,columnIds:t.map(e=>e.id)})}return t({openCardEditor:Zt,closeCardEditor:sn,saveCard:cn,editingCard:V}),(t,n)=>{let r=Ce(`tooltip`);return I(),i(`div`,{ref_key:`rootEl`,ref:Iu,class:`kb`},[R(`header`,ra,[x(u(B),{icon:`pi pi-arrow-left`,text:``,rounded:``,size:`small`,onClick:n[0]||=e=>c(`back`)}),z((I(),i(`h1`,{class:`kb-header__title`,ref:e=>ui(e,`board`)},[P(k(e.name),1)])),[[r,di(`board`,e.name),void 0,{bottom:!0}]]),R(`span`,ia,[n[69]||=R(`i`,{class:`pi pi-search`},null,-1),x(u(be),{modelValue:v.value,"onUpdate:modelValue":n[1]||=e=>v.value=e,placeholder:u(d)(`searchPlaceholder`),size:`small`,class:`kb-header__search-input`},null,8,[`modelValue`,`placeholder`]),v.value?(I(),A(u(B),{key:0,icon:`pi pi-times`,text:``,rounded:``,size:`small`,onClick:n[2]||=e=>v.value=``})):a(``,!0),e.searchTruncated?(I(),i(`small`,aa,k(u(d)(`searchTruncated`)),1)):a(``,!0)]),z(x(u(B),{icon:`pi pi-filter`,text:``,rounded:``,size:`small`,badge:pe.value?String(pe.value):void 0,"badge-severity":`info`,class:O({"kb-header__filter--on":pe.value}),onClick:n[3]||=e=>T.value=!0},null,8,[`badge`,`class`]),[[r,u(d)(`filters.open`),void 0,{bottom:!0}]]),z(x(u(B),{icon:`pi pi-inbox`,text:``,rounded:``,size:`small`,onClick:rr},null,512),[[r,u(d)(`archive.open`),void 0,{bottom:!0}]]),e.readOnly?a(``,!0):z((I(),A(u(B),{key:0,icon:`pi pi-sitemap`,text:``,rounded:``,size:`small`,onClick:n[4]||=e=>Ie.value=!0},null,512)),[[r,u(d)(`groups.title`),void 0,{bottom:!0}]]),e.readOnly?(I(),i(`span`,oa,[n[70]||=R(`i`,{class:`pi pi-lock`},null,-1),P(` `+k(u(d)(`readOnly.badge`)),1)])):a(``,!0),he(t.$slots,`header-actions`,{},void 0,!0)]),he(t.$slots,`banner`,{},void 0,!0),R(`div`,sa,[Je.value?(I(),i(`div`,{key:0,class:`kb-bands`,style:Ne({height:`${Je.value}px`})},[(I(!0),i(N,null,F(Ze.value,e=>(I(),i(`div`,{key:e.id,class:`kb-band`,style:Ne({left:`${e.left}px`,width:`${e.width}px`,top:`${e.top}px`,"--kb-band-color":e.color||`var(--p-text-muted-color)`})},[R(`span`,ca,k(e.title),1),R(`span`,la,k(e.count),1)],4))),128))],4)):a(``,!0),R(`div`,{ref_key:`boardEl`,ref:Xe,class:`kb-board`},[(I(!0),i(N,null,F(Fe.value,s=>(I(),i(`div`,{key:s.id,class:O([`kb-col`,{"kb-col--collapsed":Pi(s.id),"kb-col--dragging":W.value===s.id}]),"data-col-id":s.id,onPointerdown:e=>Ku(e,`column`,s.id),onTouchstart:e=>$u(e,`column`,s.id),onTouchmove:ed,onTouchend:td,onContextmenu:n[8]||=je(()=>{},[`prevent`])},[Pi(s.id)?(I(),i(`button`,{key:0,class:O([`kb-col__strip`,{"kb-col__strip--empty":s.cards.length===0}]),title:u(d)(`column.expand`),onClick:e=>Fi(s.id)},[n[71]||=R(`i`,{class:`pi pi-angle-double-right`},null,-1),R(`span`,fa,k(s.cards.length),1),ii(s.id)?(I(),i(`i`,pa)):a(``,!0),z((I(),i(`span`,{class:`kb-col__strip-title`,ref_for:!0,ref:e=>ui(e,`strip:${s.id}`)},[P(k(s.title),1)])),[[r,di(`strip:${s.id}`,s.title),void 0,{right:!0}]])],10,da)):(I(),i(`div`,ma,[z(R(`input`,{class:`kb-col__title`,ref_for:!0,ref:e=>ui(e,`col:${s.id}`),value:s.title,readonly:e.readOnly,onBlur:e=>at(s.id,e.target.value),onKeyup:n[5]||=oe(e=>e.target.blur(),[`enter`]),onMousedown:n[6]||=je(()=>{},[`stop`])},null,40,ha),[[r,di(`col:${s.id}`,s.title),void 0,{bottom:!0}]]),R(`div`,ga,[Kr.value&&ii(s.id)?z((I(),A(u(B),{key:0,icon:`pi pi-bell`,text:``,rounded:``,size:`small`,class:`kb-col__bell--on`,onClick:e=>vi(s.id)},null,8,[`onClick`])),[[r,u(d)(`column.unsubscribe`),void 0,{bottom:!0}]]):a(``,!0),s.done?z((I(),i(`i`,_a,null,512)),[[r,u(d)(`column.doneBadge`),void 0,{bottom:!0}]]):a(``,!0),z(x(u(B),{icon:`pi pi-ellipsis-v`,text:``,rounded:``,size:`small`,class:O([`kb-col__menu-btn`,{"kb-col__menu-btn--open":pi.value?.id===s.id}]),onClick:e=>mi(e,s)},null,8,[`class`,`onClick`]),[[r,u(d)(`column.menu`),void 0,{bottom:!0}]]),R(`span`,va,k(s.cards.length),1)])])),!e.readOnly&&!Pi(s.id)?(I(),i(`button`,{key:2,class:`kb-col__add-card kb-col__add-card--top`,onClick:e=>Jt(s.id,`top`)},[n[72]||=R(`i`,{class:`pi pi-plus`},null,-1),P(` `+k(u(d)(`column.addCard`)),1)],8,ya)):a(``,!0),Pi(s.id)?a(``,!0):(I(),i(`div`,ba,[(I(!0),i(N,null,F(s.cards,c=>(I(),i(`div`,{key:c.id,class:O([`kb-card`,{"kb-card--colored":c.color}]),style:Ne(c.color?{borderTopColor:c.color}:void 0),"data-card-id":c.id,onPointerdown:je(e=>Ku(e,`card`,s.id,c.id),[`stop`]),onTouchstart:je(e=>$u(e,`card`,s.id,c.id),[`stop`]),onTouchmove:ed,onTouchend:td,onContextmenu:n[7]||=je(()=>{},[`prevent`]),onClickCapture:Qu,onClick:e=>Zt(s.id,c)},[x(xn,{card:c,t:u(d),"avatar-url":e.avatarUrl,"current-user-id":o.currentUserId,"child-count":fn(c.id),"has-parent":!!un(c.id)},{actions:L(()=>[he(t.$slots,`card-actions`,{card:c,column:s},void 0,!0),e.readOnly?a(``,!0):z((I(),i(`button`,{key:0,class:`kb-card__delete`,onClick:je(e=>ar(s.id,c.id),[`stop`])},[...n[73]||=[R(`i`,{class:`pi pi-inbox`},null,-1)]],8,Sa)),[[r,u(d)(`archive.cardTooltip`),void 0,{bottom:!0}]]),e.readOnly?a(``,!0):z((I(),i(`button`,{key:1,class:`kb-card__delete`,onClick:je(e=>lr(s.id,c.id),[`stop`])},[...n[74]||=[R(`i`,{class:`pi pi-times`},null,-1)]],8,Ca)),[[r,u(d)(`card.deleteTooltip`),void 0,{bottom:!0}]])]),badges:L(()=>[he(t.$slots,`card-badges`,{card:c},void 0,!0)]),_:2},1032,[`card`,`t`,`avatar-url`,`current-user-id`,`child-count`,`has-parent`])],46,xa))),128)),s.cards.length===0?(I(),i(`div`,wa,k(u(d)(`column.dropZone`)),1)):a(``,!0)])),!e.readOnly&&!Pi(s.id)?(I(),i(`button`,{key:4,class:`kb-col__add-card`,onClick:e=>Jt(s.id)},[n[75]||=R(`i`,{class:`pi pi-plus`},null,-1),P(` `+k(u(d)(`column.addCard`)),1)],8,Ta)):a(``,!0)],42,ua))),128)),x(u(y),{visible:qr.value!==null,modal:``,header:u(d)(`column.subscribeTitle`),style:{width:`30rem`},"onUpdate:visible":n[13]||=e=>{e||(qr.value=null)}},{footer:L(()=>[Si.value?(I(),A(u(B),{key:0,label:ti.value?u(d)(`column.unsubscribeTeam`):u(d)(`column.unsubscribe`),severity:`danger`,text:``,onClick:wi},null,8,[`label`])):a(``,!0),x(u(B),{label:u(d)(`editor.cancel`),text:``,onClick:n[12]||=e=>qr.value=null},null,8,[`label`]),x(u(B),{label:Si.value?u(d)(`editor.save`):u(d)(`column.subscribeConfirm`),icon:`pi pi-bell`,disabled:!bi.value,onClick:Ci},null,8,[`label`,`disabled`])]),default:L(()=>[R(`p`,Ea,k(u(d)(`column.subscribeIntro`,{column:Ti.value?.title??``})),1),ni.value.length?(I(),i(N,{key:0},[R(`p`,Da,k(u(d)(`column.subscribeTargetLabel`)),1),R(`div`,Oa,[R(`label`,ka,[x(u(Re),{"model-value":ti.value,value:null,"onUpdate:modelValue":n[9]||=e=>yi(null)},null,8,[`model-value`]),R(`span`,null,k(u(d)(`column.subscribeTargetMe`)),1)]),(I(!0),i(N,null,F(ni.value,e=>(I(),i(`label`,{key:e.id,class:`kb-subscribe__option`},[x(u(Re),{"model-value":ti.value,value:e.id,"onUpdate:modelValue":t=>yi(e.id)},null,8,[`model-value`,`value`,`onUpdate:modelValue`]),R(`span`,null,k(e.name),1)]))),128))])],64)):a(``,!0),R(`p`,Aa,k(u(d)(`column.subscribeEventsLabel`)),1),R(`div`,ja,[(I(),i(N,null,F(Jr,e=>R(`label`,{key:e,class:`kb-subscribe__option`},[x(u(ze),{modelValue:$r.value,"onUpdate:modelValue":n[10]||=e=>$r.value=e,value:e},null,8,[`modelValue`,`value`]),R(`span`,null,k(u(d)(`column.subscribeKind.${e}`)),1)])),64))]),R(`p`,Ma,[n[76]||=R(`i`,{class:`pi pi-times`},null,-1),P(` `+k(u(d)(`column.subscribeNotReorder`)),1)]),R(`p`,Na,k(u(d)(`column.subscribeChannelsLabel`)),1),R(`div`,Pa,[(I(),i(N,null,F(Yr,e=>R(`label`,{key:e,class:`kb-subscribe__option`},[x(u(ze),{modelValue:ei.value,"onUpdate:modelValue":n[11]||=e=>ei.value=e,value:e},null,8,[`modelValue`,`value`]),R(`span`,null,k(u(d)(`column.subscribeChannel.${e}`)),1)])),64))]),R(`p`,Fa,k(u(d)(`column.subscribeOwnActions`)),1),ai.value.length?(I(),i(`p`,Ia,k(u(d)(`column.subscribeTeamsFollowing`,{teams:ai.value.join(`, `)})),1)):a(``,!0)]),_:1},8,[`visible`,`header`]),x(u(y),{visible:Kt.value!==null,header:u(d)(`templates.pickHeader`),modal:!0,style:{width:`420px`},"onUpdate:visible":n[15]||=e=>{e||(Kt.value=null)}},{default:L(()=>[R(`p`,La,k(u(d)(`templates.pickIntro`)),1),R(`div`,Ra,[R(`button`,{class:`kb-tpl-option`,onClick:n[14]||=e=>Yt(null)},[n[77]||=R(`i`,{class:`pi pi-file`},null,-1),P(` `+k(u(d)(`templates.blank`)),1)]),(I(!0),i(N,null,F(e.templates,e=>(I(),i(`button`,{key:e.id,class:`kb-tpl-option`,onClick:t=>Yt(e)},[n[78]||=R(`i`,{class:`pi pi-file-edit`},null,-1),P(` `+k(e.name),1)],8,za))),128))])]),_:1},8,[`visible`,`header`]),e.readOnly?a(``,!0):(I(),i(`div`,Ba,[b.value?(I(),i(`div`,Va,[x(u(be),{modelValue:S.value,"onUpdate:modelValue":n[16]||=e=>S.value=e,placeholder:u(d)(`column.titlePlaceholder`),autofocus:``,class:`w-full`,onKeyup:[oe(nt,[`enter`]),n[17]||=oe(e=>b.value=!1,[`escape`])]},null,8,[`modelValue`,`placeholder`]),R(`div`,Ha,[x(u(B),{label:u(d)(`addColumnButton`),size:`small`,disabled:!S.value.trim(),onClick:nt},null,8,[`label`,`disabled`]),x(u(B),{icon:`pi pi-times`,text:``,size:`small`,onClick:n[18]||=e=>b.value=!1})])])):(I(),i(`button`,{key:1,class:`kb-add-col__trigger`,onClick:n[19]||=e=>b.value=!0},[n[79]||=R(`i`,{class:`pi pi-plus`},null,-1),P(` `+k(u(d)(`addColumn`)),1)]))]))],512)]),x(hi,{visible:Ie.value,"onUpdate:visible":n[20]||=e=>Ie.value=e,columns:g.value,groups:e.columnGroups,"read-only":e.readOnly,t:u(d),onIntent:n[21]||=e=>c(`intent`,e)},null,8,[`visible`,`columns`,`groups`,`read-only`,`t`]),x(u(h),{visible:T.value,"onUpdate:visible":n[31]||=e=>T.value=e,position:`right`,header:u(d)(`filters.title`),class:`kb-filters`},{footer:L(()=>[x(u(B),{label:u(d)(`filters.reset`),icon:`pi pi-filter-slash`,text:``,disabled:!pe.value,onClick:me},null,8,[`label`,`disabled`])]),default:L(()=>[R(`div`,Ua,[R(`section`,Wa,[R(`span`,Ga,k(u(d)(`filters.priority`)),1),fe.value?(I(),i(N,{key:1},[R(`div`,Ka,[(I(),i(N,null,F([`lte`,`eq`,`gte`],e=>z(R(`button`,{key:e,class:O([`kb-ops__btn`,{"kb-ops__btn--on":E.value===e}]),onClick:t=>{E.value=e,D.value===null&&(D.value=5)}},[P(k(e===`lte`?`≤`:e===`eq`?`=`:`≥`),1)],10,qa),[[r,{value:u(d)(`filters.priorityOp.${e}`),showDelay:0,hideDelay:0},void 0,{bottom:!0}]])),64)),z((I(),i(`button`,{class:O([`kb-ops__btn kb-ops__btn--none`,{"kb-ops__btn--on":E.value===`none`}]),onClick:n[23]||=e=>{E.value=E.value===`none`?`gte`:`none`,D.value=E.value===`none`?null:5}},[...n[81]||=[R(`i`,{class:`pi pi-ban`},null,-1)]],2)),[[r,{value:u(d)(`filters.priorityOp.none`),showDelay:0,hideDelay:0},void 0,{bottom:!0}]])]),E.value===`none`?a(``,!0):(I(),i(`div`,Ja,[x(u(st),{"model-value":D.value??5,min:1,max:10,step:1,class:`kb-prio__slider`,"onUpdate:modelValue":n[24]||=e=>D.value=Array.isArray(e)?e[0]??null:e},null,8,[`model-value`]),R(`span`,Ya,k(D.value),1)])),R(`button`,{class:`kb-prio__set`,onClick:n[25]||=e=>{D.value=null,E.value=`gte`}},[n[82]||=R(`i`,{class:`pi pi-times`},null,-1),P(` `+k(u(d)(`filters.clearOne`)),1)]),E.value===`none`?a(``,!0):(I(),i(`p`,Xa,k(u(d)(`filters.priorityHint`)),1))],64)):(I(),i(`button`,{key:0,class:`kb-prio__set`,onClick:n[22]||=e=>D.value=5},[n[80]||=R(`i`,{class:`pi pi-plus`},null,-1),P(` `+k(u(d)(`filters.priorityAdd`)),1)]))]),R(`section`,Za,[R(`span`,Qa,k(u(d)(`filters.colors`)),1),R(`div`,$a,[z((I(),i(`button`,{class:O([`kb-colors__swatch kb-colors__swatch--none`,{"kb-colors__swatch--on":j.value.includes(``)}]),onClick:n[26]||=e=>j.value=j.value.includes(``)?j.value.filter(e=>e!==``):[...j.value,``]},[...n[83]||=[R(`i`,{class:`pi pi-ban`},null,-1)]],2)),[[r,{value:u(d)(`editor.colorNone`),showDelay:0,hideDelay:0},void 0,{bottom:!0}]]),(I(),i(N,null,F(It,e=>z(R(`button`,{key:e,class:O([`kb-colors__swatch`,{"kb-colors__swatch--on":j.value.includes(e)}]),style:Ne({background:e}),onClick:t=>j.value=j.value.includes(e)?j.value.filter(t=>t!==e):[...j.value,e]},null,14,eo),[[r,{value:e,showDelay:0,hideDelay:0},void 0,{bottom:!0}]])),64))])]),R(`section`,to,[R(`span`,no,k(u(d)(`filters.groups`)),1),x(u(Ve),{modelValue:_e.value,"onUpdate:modelValue":n[27]||=e=>_e.value=e,options:xe.value,placeholder:u(d)(`filters.groupsPlaceholder`),display:`chip`,filter:xe.value.length>6,class:`kb-filters__control`},{option:L(({option:e})=>[R(`span`,{class:O([`kb-void`,{"kb-void--is":e===Ql}])},[e===Ql?(I(),i(`i`,ro)):a(``,!0),P(` `+k(e===Ql?u(d)(`filters.noGroups`):e),1)],2)]),chip:L(({value:e})=>[R(`span`,{class:O([`kb-void`,{"kb-void--is":e===Ql}])},k(e===Ql?u(d)(`filters.noGroups`):e),3)]),_:1},8,[`modelValue`,`options`,`placeholder`,`filter`])]),R(`section`,io,[R(`span`,ao,k(u(d)(`filters.assignees`)),1),x(u(Ve),{modelValue:we.value,"onUpdate:modelValue":n[28]||=e=>we.value=e,options:ke.value,"option-label":`name`,"option-value":`userId`,placeholder:u(d)(`filters.assigneesPlaceholder`),display:`chip`,filter:``,class:`kb-filters__control`},{option:L(({option:e})=>[R(`span`,{class:O([`kb-void`,{"kb-void--is":e.userId===Ql}])},[e.userId===Ql?(I(),i(`i`,oo)):a(``,!0),P(` `+k(e.name),1)],2)]),_:1},8,[`modelValue`,`options`,`placeholder`])]),Me.value.length?(I(),i(`section`,so,[R(`span`,co,k(u(d)(`filters.creators`)),1),x(u(Ve),{modelValue:M.value,"onUpdate:modelValue":n[29]||=e=>M.value=e,options:Me.value,"option-label":`name`,"option-value":`userId`,placeholder:u(d)(`filters.creatorsPlaceholder`),display:`chip`,filter:``,class:`kb-filters__control`},null,8,[`modelValue`,`options`,`placeholder`])])):a(``,!0),R(`section`,lo,[R(`span`,uo,k(u(d)(`filters.family`)),1),x(u(Ve),{modelValue:Ae.value,"onUpdate:modelValue":n[30]||=e=>Ae.value=e,options:Pe.value,"option-label":`title`,"option-value":`id`,placeholder:u(d)(`filters.familyPlaceholder`),display:`chip`,filter:``,class:`kb-filters__control`},{option:L(({option:e})=>[R(`span`,{class:O([`kb-void`,{"kb-void--is":e.id===Ql}])},[e.id===Ql?(I(),i(`i`,fo)):a(``,!0),R(`span`,null,k(e.title),1),e.column?(I(),i(`span`,po,k(e.column),1)):a(``,!0)],2)]),_:1},8,[`modelValue`,`options`,`placeholder`]),R(`p`,mo,k(u(d)(`filters.familyHint`)),1)])])]),_:1},8,[`visible`,`header`]),x(u(h),{visible:Nn.value,"onUpdate:visible":n[36]||=e=>Nn.value=e,position:`right`,header:u(d)(`archive.title`),class:`kb-archive`},{default:L(()=>[R(`p`,ho,k(u(d)(`archive.hint`)),1),R(`span`,go,[n[84]||=R(`i`,{class:`pi pi-search`},null,-1),x(u(be),{modelValue:Pn.value,"onUpdate:modelValue":n[32]||=e=>Pn.value=e,placeholder:u(d)(`archive.searchPlaceholder`),size:`small`,class:`kb-archive__search-input`},null,8,[`modelValue`,`placeholder`]),Pn.value?(I(),A(u(B),{key:0,icon:`pi pi-times`,text:``,rounded:``,size:`small`,onClick:n[33]||=e=>Pn.value=``})):a(``,!0),z(x(u(B),{icon:`pi pi-filter`,text:``,rounded:``,size:`small`,badge:pe.value?String(pe.value):void 0,"badge-severity":`info`,class:O({"kb-header__filter--on":pe.value}),onClick:n[34]||=e=>T.value=!0},null,8,[`badge`,`class`]),[[r,u(d)(`filters.open`),void 0,{bottom:!0}]])]),x(u(re),{modelValue:Fn.value,"onUpdate:modelValue":n[35]||=e=>Fn.value=e,options:In.value,"option-label":`title`,"option-value":`id`,size:`small`,class:`kb-archive__column`,"aria-label":u(d)(`archive.columnFilter`)},null,8,[`modelValue`,`options`,`aria-label`]),e.loadingArchive?(I(),i(`p`,_o,k(u(d)(`archive.loading`)),1)):e.archivedCards.length?er.value.length?(I(),i(N,{key:3},[tr.value?(I(),i(`p`,bo,[P(k(u(d)(`archive.filteredOut`,{count:tr.value}))+` `,1),R(`button`,{class:`kb-archive__reset`,onClick:me},k(u(d)(`filters.reset`)),1)])):a(``,!0),e.archiveTruncated?(I(),i(`p`,xo,[n[85]||=R(`i`,{class:`pi pi-exclamation-circle`},null,-1),P(` `+k(u(d)(`archive.truncated`)),1)])):a(``,!0),R(`ul`,So,[(I(!0),i(N,null,F(er.value,s=>(I(),i(`li`,{key:s.id,class:O([`kb-card kb-archive__card`,{"kb-card--colored":s.color}]),style:Ne(s.color?{borderTopColor:s.color}:void 0),onClick:e=>$n(s)},[x(xn,{card:s,t:u(d),"avatar-url":e.avatarUrl,"current-user-id":o.currentUserId,"child-count":fn(s.id),"has-parent":!!un(s.id)},{actions:L(()=>[e.readOnly?a(``,!0):z((I(),i(`button`,{key:0,class:`kb-card__delete`,onClick:je(e=>cr(s.id),[`stop`])},[...n[86]||=[R(`i`,{class:`pi pi-replay`},null,-1)]],8,wo)),[[r,u(d)(`archive.restore`),void 0,{left:!0}]])]),badges:L(()=>[he(t.$slots,`card-badges`,{card:s},void 0,!0)]),_:2},1032,[`card`,`t`,`avatar-url`,`current-user-id`,`child-count`,`has-parent`]),R(`div`,To,[s.archivedFrom?(I(),i(`span`,Eo,[n[87]||=R(`i`,{class:`pi pi-arrow-right-arrow-left`},null,-1),P(` `+k(u(d)(`archive.fromColumn`,{column:s.archivedFrom.columnTitle})),1)])):a(``,!0),s.archivedAt?(I(),i(`span`,Do,k(new Date(s.archivedAt).toLocaleDateString()),1)):a(``,!0)])],14,Co))),128))])],64)):(I(),i(`p`,yo,k(u(d)(`archive.allFiltered`,{count:tr.value})),1)):(I(),i(`p`,vo,k(Pn.value||Fn.value?u(d)(`archive.noMatch`):u(d)(`archive.empty`)),1))]),_:3},8,[`visible`,`header`]),x(u(y),{visible:!!V.value,header:ot.value.trim()||u(d)(`card.untitled`),modal:!0,"dismissable-mask":!tn.value,class:O([`kb-card-dialog`,{"kb-card-dialog--colored":Pt.value}]),style:Ne({width:`min(1400px, 92vw)`,height:`90vh`,...Pt.value?{"--kb-card-color":Pt.value}:{}}),breakpoints:{"1040px":`95vw`},"onUpdate:visible":n[62]||=e=>{e||nn()}},{footer:L(()=>[R(`div`,bl,[tn.value&&!Bn.value?(I(),i(`span`,xl,[n[119]||=R(`i`,{class:`pi pi-exclamation-circle`},null,-1),P(` `+k(u(d)(`editor.unsavedHint`)),1)])):a(``,!0),x(u(B),{label:u(d)(`editor.close`),text:``,onClick:nn},null,8,[`label`]),Bn.value?a(``,!0):(I(),A(u(B),{key:1,label:u(d)(`editor.save`),icon:`pi pi-check`,onClick:cn},null,8,[`label`]))])]),default:L(()=>[V.value?(I(),i(`div`,Oo,[R(`div`,ko,[zn.value?(I(),i(`p`,Ao,[n[88]||=R(`i`,{class:`pi pi-inbox`},null,-1),P(` `+k(u(d)(`archive.editorReadOnly`)),1)])):a(``,!0),x(u(qe),{value:Rt.value,"onUpdate:value":n[45]||=e=>Rt.value=e},{default:L(()=>[x(u(He),null,{default:L(()=>[x(u(Ue),{value:`edit`},{default:L(()=>[n[89]||=R(`i`,{class:`pi pi-pencil`,style:{"margin-right":`0.375rem`}},null,-1),P(k(u(d)(`editor.tabs.edit`)),1)]),_:1}),En.value||On.value?(I(),A(u(Ue),{key:0,value:`relations`},{default:L(()=>[n[90]||=R(`i`,{class:`pi pi-sitemap`,style:{"margin-right":`0.375rem`}},null,-1),P(k(u(d)(`editor.tabs.relations`,{count:On.value})),1)]),_:1})):a(``,!0),(I(!0),i(N,null,F(Hn.value,e=>(I(),A(u(Ue),{key:e,value:`conv-${e}`},{default:L(()=>[n[91]||=R(`i`,{class:`pi pi-envelope`,style:{"margin-right":`0.375rem`}},null,-1),P(k(u(d)(`editor.tabs.conversations`,{name:u(d)(`conversations.providers.${e}`),count:qn(e).length})),1)]),_:2},1032,[`value`]))),128)),x(u(Ue),{value:`comments`},{default:L(()=>[n[92]||=R(`i`,{class:`pi pi-comments`,style:{"margin-right":`0.375rem`}},null,-1),P(k(u(d)(`editor.tabs.comments`,{count:Ii.value.length||(V.value.card.commentCount??0)})),1)]),_:1}),x(u(Ue),{value:`history`},{default:L(()=>[n[93]||=R(`i`,{class:`pi pi-history`,style:{"margin-right":`0.375rem`}},null,-1),P(k(u(d)(`editor.tabs.history`,{count:V.value.card.history?.length??0})),1)]),_:1})]),_:1}),x(u(Ke),null,{default:L(()=>[x(u(We),{value:`edit`},{default:L(()=>[R(`div`,jo,[R(`div`,Mo,[R(`label`,No,k(u(d)(`editor.titleLabel`)),1),x(u(be),{id:`kanban-card-title`,modelValue:ot.value,"onUpdate:modelValue":n[37]||=e=>ot.value=e,disabled:Bn.value,autofocus:``,onKeyup:oe(cn,[`enter`])},null,8,[`modelValue`,`disabled`])]),R(`div`,Po,[R(`label`,Fo,k(u(d)(`editor.contentLabel`)),1),x(u(ve),{id:`kanban-card-content`,ref_key:`tiptapRef`,ref:Vt,modelValue:ct.value,"onUpdate:modelValue":n[38]||=e=>ct.value=e,markdown:``,"min-height":`20rem`,"max-height":`none`,editable:!Bn.value,placeholder:u(d)(`editor.contentPlaceholder`),"handle-files":e=>pu(e,`card`),mentions:Nr.value,"attachment-src":gt,onLinkClick:Li},null,8,[`modelValue`,`editable`,`placeholder`,`handle-files`,`mentions`,`attachment-src`])]),R(`div`,Io,[R(`label`,Lo,k(u(d)(`editor.filesLabel`)),1),lt.value.length?(I(),i(`div`,Ro,[(I(!0),i(N,null,F(lt.value,(e,t)=>(I(),i(`div`,{key:t,class:`kb-dialog__thumb`},[R(`img`,{src:e,alt:`attachment`},null,8,zo),Bn.value?a(``,!0):(I(),i(`button`,{key:0,class:`kb-dialog__thumb-remove`,onClick:e=>H(t)},[...n[94]||=[R(`i`,{class:`pi pi-times`},null,-1)]],8,Bo))]))),128))])):a(``,!0),x(Mn,{files:ut.value,preview:fr,removable:!Bn.value,"remove-label":u(d)(`editor.removeFile`),onOpen:wr,onRemove:Ar},null,8,[`files`,`removable`,`remove-label`]),x(Zr,{queue:pt.value,errors:ft.value,uploading:dt.value,"uploading-label":u(d)(`editor.uploading`)},null,8,[`queue`,`errors`,`uploading`,`uploading-label`]),Bn.value?a(``,!0):(I(),i(`label`,Vo,[n[95]||=R(`i`,{class:`pi pi-upload`},null,-1),P(` `+k(u(d)(`editor.attachFile`))+` `,1),R(`input`,{id:`kanban-card-images`,type:`file`,multiple:``,onChange:hu},null,32)]))])])]),_:1}),x(u(We),{value:`relations`},{default:L(()=>[R(`div`,Ho,[pn.value||En.value?(I(),i(`section`,Uo,[R(`h4`,Wo,[n[96]||=R(`i`,{class:`pi pi-arrow-up`},null,-1),P(` `+k(u(d)(`editor.parentLabel`)),1)]),pn.value?(I(),i(`table`,Go,[R(`thead`,null,[R(`tr`,null,[R(`th`,null,k(u(d)(`editor.relationsColCard`)),1),R(`th`,null,k(u(d)(`editor.relationsColBoard`)),1),R(`th`,null,k(u(d)(`editor.relationsColColumn`)),1),R(`th`,Ko,k(u(d)(`editor.relationsColAssignees`)),1),R(`th`,qo,k(u(d)(`editor.relationsColComments`)),1),R(`th`,Jo,k(u(d)(`editor.relationsColActions`)),1)])]),R(`tbody`,null,[R(`tr`,null,[R(`td`,Yo,[z((I(),i(`span`,{class:`kb-rel__card-title`,ref:e=>ui(e,`rel:${pn.value?.cardId??``}`)},[P(k(pn.value.title),1)])),[[r,di(`rel:${pn.value.cardId}`,pn.value.title),void 0,{top:!0}]])]),R(`td`,{class:O([`kb-rel__board`,{"kb-rel__board--away":!pn.value.here}])},[z((I(),i(`span`,{class:`kb-rel__card-title`,ref:e=>ui(e,`relb:${pn.value?.cardId??``}`)},[P(k(pn.value.boardName),1)])),[[r,di(`relb:${pn.value?.cardId??``}`,pn.value?.boardName??``),void 0,{top:!0}]])],2),R(`td`,Xo,[z((I(),i(`span`,{class:`kb-rel__card-title`,ref:e=>ui(e,`relc:${pn.value?.cardId??``}`)},[P(k(pn.value.columnTitle),1)])),[[r,di(`relc:${pn.value?.cardId??``}`,pn.value?.columnTitle??``),void 0,{top:!0}]])]),R(`td`,Zo,[pn.value.assignees.length?(I(),i(`div`,Qo,[(I(!0),i(N,null,F(pn.value.assignees,t=>(I(),i(`span`,{key:t.id,class:`kb-card__avatar`,style:Ne(u(rn)(t.id)),title:t.name},[e.avatarUrl&&!jr.has(t.id)?(I(),i(`img`,{key:0,src:e.avatarUrl(t.id),alt:``,onError:e=>jr.add(t.id)},null,40,es)):(I(),i(N,{key:1},[P(k(Mr(t.name)),1)],64))],12,$o))),128))])):(I(),i(`span`,ts,`—`))]),R(`td`,ns,k(pn.value.commentCount||`—`),1),R(`td`,rs,[R(`button`,{class:`kb-rel__action`,title:pn.value.here?u(d)(`editor.childOpen`):u(d)(`editor.openOnBoard`,{board:pn.value.boardName}),onClick:n[39]||=e=>kn(pn.value.cardId,pn.value.boardId)},[...n[97]||=[R(`i`,{class:`pi pi-arrow-up-right`},null,-1)]],8,is),En.value?(I(),i(`button`,{key:0,class:`kb-rel__action kb-rel__action--detach`,title:u(d)(`editor.detach`),onClick:n[40]||=e=>yn(null)},[...n[98]||=[R(`i`,{class:`pi pi-times`},null,-1)]],8,as)):a(``,!0)])])])])):(I(),i(`p`,os,k(u(d)(`editor.parentEmptyState`)),1)),En.value?(I(),A(u(re),{key:2,"model-value":null,options:_n.value,"option-label":`title`,"option-value":`id`,filter:_n.value.length>6,"filter-placeholder":u(d)(`editor.parentSearchPlaceholder`),"empty-message":u(d)(`editor.parentEmpty`),"empty-filter-message":u(d)(`editor.parentEmpty`),placeholder:pn.value?u(d)(`editor.parentReplace`):u(d)(`editor.parentAdd`),class:`kb-rel__picker`,"onUpdate:modelValue":yn},{option:L(({option:e})=>[R(`span`,ss,[R(`span`,null,k(e.title),1),R(`span`,cs,k(e.column),1)])]),_:1},8,[`options`,`filter`,`filter-placeholder`,`empty-message`,`empty-filter-message`,`placeholder`])):a(``,!0)])):a(``,!0),mn.value.length||En.value?(I(),i(`section`,ls,[R(`h4`,us,[n[99]||=R(`i`,{class:`pi pi-arrow-down`},null,-1),P(` `+k(u(d)(`editor.childrenLabel`,{count:mn.value.length})),1)]),mn.value.length?(I(),i(`table`,ds,[R(`thead`,null,[R(`tr`,null,[R(`th`,null,k(u(d)(`editor.relationsColCard`)),1),R(`th`,null,k(u(d)(`editor.relationsColBoard`)),1),R(`th`,null,k(u(d)(`editor.relationsColColumn`)),1),R(`th`,fs,k(u(d)(`editor.relationsColAssignees`)),1),R(`th`,ps,k(u(d)(`editor.relationsColComments`)),1),R(`th`,ms,k(u(d)(`editor.relationsColActions`)),1)])]),R(`tbody`,null,[(I(!0),i(N,null,F(mn.value,t=>(I(),i(`tr`,{key:t.cardId},[R(`td`,hs,[z((I(),i(`span`,{class:`kb-rel__card-title`,ref_for:!0,ref:e=>ui(e,`rel:${t.cardId}`)},[P(k(t.title),1)])),[[r,di(`rel:${t.cardId}`,t.title),void 0,{top:!0}]])]),R(`td`,{class:O([`kb-rel__board`,{"kb-rel__board--away":!t.here}])},[z((I(),i(`span`,{class:`kb-rel__card-title`,ref_for:!0,ref:e=>ui(e,`relb:${t.cardId}`)},[P(k(t.boardName),1)])),[[r,di(`relb:${t.cardId}`,t.boardName),void 0,{top:!0}]])],2),R(`td`,gs,[z((I(),i(`span`,{class:`kb-rel__card-title`,ref_for:!0,ref:e=>ui(e,`relc:${t.cardId}`)},[P(k(t.columnTitle),1)])),[[r,di(`relc:${t.cardId}`,t.columnTitle),void 0,{top:!0}]])]),R(`td`,_s,[t.assignees.length?(I(),i(`div`,vs,[(I(!0),i(N,null,F(t.assignees,t=>(I(),i(`span`,{key:t.id,class:`kb-card__avatar`,style:Ne(u(rn)(t.id)),title:t.name},[e.avatarUrl&&!jr.has(t.id)?(I(),i(`img`,{key:0,src:e.avatarUrl(t.id),alt:``,onError:e=>jr.add(t.id)},null,40,bs)):(I(),i(N,{key:1},[P(k(Mr(t.name)),1)],64))],12,ys))),128))])):(I(),i(`span`,xs,`—`))]),R(`td`,Ss,k(t.commentCount||`—`),1),R(`td`,Cs,[R(`button`,{class:`kb-rel__action`,title:t.here?u(d)(`editor.childOpen`):u(d)(`editor.openOnBoard`,{board:t.boardName}),onClick:e=>kn(t.cardId,t.boardId)},[...n[100]||=[R(`i`,{class:`pi pi-arrow-up-right`},null,-1)]],8,ws),En.value?(I(),i(`button`,{key:0,class:`kb-rel__action kb-rel__action--detach`,title:u(d)(`editor.detach`),onClick:e=>Tn(t.cardId)},[...n[101]||=[R(`i`,{class:`pi pi-times`},null,-1)]],8,Ts)):a(``,!0)])]))),128))])])):(I(),i(`p`,Es,k(u(d)(`editor.childrenEmptyState`)),1)),En.value?(I(),A(u(re),{key:2,"model-value":null,options:vn.value,"option-label":`title`,"option-value":`id`,filter:vn.value.length>6,"filter-placeholder":u(d)(`editor.parentSearchPlaceholder`),"empty-message":u(d)(`editor.parentEmpty`),"empty-filter-message":u(d)(`editor.parentEmpty`),placeholder:u(d)(`editor.childAdd`),class:`kb-rel__picker`,"onUpdate:modelValue":bn},{option:L(({option:e})=>[R(`span`,Ds,[R(`span`,null,k(e.title),1),R(`span`,Os,k(e.column),1)])]),_:1},8,[`options`,`filter`,`filter-placeholder`,`empty-message`,`empty-filter-message`,`placeholder`])):a(``,!0)])):a(``,!0),!En.value&&!pn.value&&!mn.value.length?(I(),i(`p`,ks,k(u(d)(`editor.relationsEmpty`)),1)):a(``,!0)])]),_:1}),x(u(We),{value:`comments`},{default:L(()=>[R(`div`,As,[Ii.value.length?(I(),i(`div`,Ms,[(I(!0),i(N,null,F(Ii.value,(t,r)=>(I(),i(`div`,{key:r,class:O([`kb-comments__item`,{"kb-comments__item--ai":t.author===`ai`,"kb-comments__item--clickable":Qi(t)}]),onClick:e=>Qi(t)&&ea(t)},[R(`div`,{class:O([`kb-comments__avatar`,{"kb-comments__avatar--photo":!!Ir(t)}]),style:Ne(Ir(t)?u(rn)(Ir(t)):void 0)},[t.author===`ai`?(I(),i(`i`,Ps)):Ir(t)&&e.avatarUrl&&!jr.has(Ir(t))?(I(),i(`img`,{key:1,src:e.avatarUrl(Ir(t)),alt:``,onError:e=>jr.add(Ir(t))},null,40,Fs)):t.authorUser?.name?(I(),i(N,{key:2},[P(k(Mr(t.authorUser.name)),1)],64)):(I(),i(`i`,Is))],6),R(`div`,Ls,[R(`div`,Rs,[R(`span`,zs,k(Lr(t)),1),R(`span`,Bs,k(lu(t.timestamp)),1),t.editedAt?(I(),i(`span`,Vs,k(u(d)(`comments.edited`)),1)):a(``,!0),!Bn.value&&Wr(t)&&Ut.value!==t.id?(I(),i(`span`,Hs,[Fr(t)?(I(),i(`button`,{key:0,class:`kb-comments__tool`,title:u(d)(`comments.edit`),onClick:je(e=>zr(t),[`stop`])},[...n[103]||=[R(`i`,{class:`pi pi-pencil`},null,-1)]],8,Us)):a(``,!0),R(`button`,{class:`kb-comments__tool`,title:u(d)(`comments.delete`),onClick:je(e=>Gr(t),[`stop`])},[...n[104]||=[R(`i`,{class:`pi pi-trash`},null,-1)]],8,Ws)])):a(``,!0)]),Ut.value===t.id?(I(),i(`div`,{key:0,class:`kb-comments__edit`,onClick:n[42]||=je(()=>{},[`stop`])},[x(u(ve),{modelValue:Wt.value,"onUpdate:modelValue":n[41]||=e=>Wt.value=e,markdown:``,"min-height":`1.4rem`,"max-height":`7.1rem`,mentions:Nr.value,onLinkClick:Li},null,8,[`modelValue`,`mentions`]),R(`div`,Gs,[x(u(B),{label:u(d)(`editor.cancel`),size:`small`,text:``,onClick:Br},null,8,[`label`]),x(u(B),{label:u(d)(`editor.save`),size:`small`,disabled:!Wt.value.trim(),onClick:Vr},null,8,[`label`,`disabled`])])])):t.detail?(I(),i(N,{key:1},[R(`div`,{ref_for:!0,ref:e=>Yi(e,t,r),class:O([`kb-comments__text kb-comments__text--markdown`,{"kb-comments__text--clamped":!Ui(t,r),"kb-comments__text--toggleable":Wi(t,r)&&!Qi(t)}]),onClick:e=>Ki(t,r,e),innerHTML:u(zi)(t.detail)},null,10,Ks),Wi(t,r)?(I(),i(`button`,{key:0,class:`kb-comments__more`,onClick:je(e=>Gi(t,r),[`stop`])},k(Ui(t,r)?u(d)(`comments.showLess`):u(d)(`comments.showMore`)),9,qs)):a(``,!0)],64)):a(``,!0),Ut.value===t.id?a(``,!0):(I(),A(Mn,{key:2,files:t.attachments??[],preview:fr,compact:``,onOpen:wr},null,8,[`files`]))])],10,Ns))),128)),R(`div`,{ref_key:`commentsEndEl`,ref:Ht},null,512)])):(I(),i(`div`,js,[n[102]||=R(`i`,{class:`pi pi-comments`},null,-1),R(`span`,null,k(u(d)(`comments.empty`)),1)])),Bn.value?a(``,!0):(I(),i(`div`,{key:2,class:`kb-comments__input`,onKeydown:[oe(je(ur,[`ctrl`,`prevent`]),[`enter`]),oe(je(ur,[`meta`,`prevent`]),[`enter`])]},[x(u(ve),{modelValue:zt.value,"onUpdate:modelValue":n[43]||=e=>zt.value=e,markdown:``,placeholder:u(d)(`comments.placeholder`),"min-height":`1.4rem`,"max-height":`7.1rem`,"handle-files":e=>pu(e,`comment`),mentions:Nr.value,onLinkClick:Li},null,8,[`modelValue`,`placeholder`,`handle-files`,`mentions`]),x(Mn,{files:Bt.value,preview:fr,openable:!1,removable:``,"remove-label":u(d)(`editor.removeFile`),compact:``,onRemove:mu},null,8,[`files`,`remove-label`]),x(Zr,{queue:pt.value,errors:ft.value,uploading:dt.value,"uploading-label":u(d)(`editor.uploading`)},null,8,[`queue`,`errors`,`uploading`,`uploading-label`]),R(`div`,Ys,[R(`label`,{class:`kb-comments__attach`,title:u(d)(`comments.attach`)},[n[105]||=R(`i`,{class:`pi pi-paperclip`},null,-1),R(`input`,{type:`file`,multiple:``,onChange:fu},null,32)],8,Xs),R(`span`,Zs,k(u(d)(`comments.sendHint`)),1),x(u(B),{label:u(d)(`comments.send`),icon:`pi pi-send`,size:`small`,disabled:!zt.value.trim()&&!Bt.value.length,onClick:ur},null,8,[`label`,`disabled`])])],40,Js))])]),_:1}),x(u(We),{value:`history`},{default:L(()=>[R(`div`,Qs,[V.value.card.history?.length?(I(),i(`div`,ec,[(I(!0),i(N,null,F([...V.value.card.history].reverse(),(e,t)=>(I(),i(`div`,{key:t,class:O([`kb-history__item`,{"kb-history__item--clickable":Qi(e)}]),onClick:t=>Qi(e)&&ea(e)},[R(`div`,nc,[R(`i`,{class:O(ta[e.type])},null,2)]),R(`div`,rc,[R(`span`,ic,[P(k(cu.value[e.type])+` `,1),Qi(e)?(I(),i(`i`,ac)):a(``,!0)]),e.detail?(I(),i(`span`,oc,k(e.detail),1)):a(``,!0),R(`span`,sc,[P(k(lu(e.timestamp))+` `,1),e.authorUser?.name?(I(),i(N,{key:0},[P(` · `+k(u(d)(`history.by`,{name:e.authorUser.name})),1)],64)):a(``,!0)])])],10,tc))),128))])):(I(),i(`div`,$s,[n[106]||=R(`i`,{class:`pi pi-clock`},null,-1),R(`span`,null,k(u(d)(`history.empty`)),1)]))])]),_:1}),(I(!0),i(N,null,F(Hn.value,t=>(I(),A(u(We),{key:t,value:`conv-${t}`},{default:L(()=>[x(qi,{t:u(d),conversations:qn(t),"can-edit":Kn.value,preview:fr,resync:e.resyncConversation?Zn:void 0,onOpenFile:wr,onUnlink:Qn,onOpenCard:n[44]||=e=>kn(e.cardId,e.boardId)},null,8,[`t`,`conversations`,`can-edit`,`resync`])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`value`]),V.value&&Wn.value?(I(),A(na,{key:1,t:u(d),visible:!!Wn.value,"provider-label":u(d)(`conversations.providers.${Wn.value}`),integrations:Jn(Wn.value),"card-id":V.value.card.id,"linked-ids":Vn.value.map(e=>e.id),search:Yn,link:Xn,onClose:n[46]||=e=>Wn.value=null,onLinked:Gn,onOpenCard:n[47]||=e=>{Wn.value=null,kn(e.cardId,e.boardId)}},null,8,[`t`,`visible`,`provider-label`,`integrations`,`card-id`,`linked-ids`])):a(``,!0)]),R(`aside`,cc,[R(`div`,lc,[V.value.card.createdBy?(I(),i(`p`,uc,[n[107]||=R(`i`,{class:`pi pi-user`},null,-1),P(` `+k(u(d)(`editor.createdBy`,{name:V.value.card.createdBy.name})),1)])):a(``,!0),R(`p`,null,[n[108]||=R(`i`,{class:`pi pi-calendar-plus`},null,-1),P(` `+k(lu(V.value.card.createdAt)),1)]),R(`p`,null,[n[109]||=R(`i`,{class:`pi pi-clock`},null,-1),P(` `+k(lu(V.value.card.updatedAt)),1)])]),R(`div`,dc,[zn.value?(I(),i(`div`,fc,[R(`span`,pc,k(u(d)(`editor.columnSettingLabel`)),1),!e.readOnly&&!Qt.value?(I(),A(u(re),{key:0,"model-value":V.value.card.archivedFrom?.columnId??null,options:C.value.map(e=>({id:e.id,title:e.title})),"option-label":`title`,"option-value":`id`,placeholder:u(d)(`archive.editorPick`),size:`small`,class:`kb-side__control`,"onUpdate:modelValue":n[48]||=e=>{or.value=e}},null,8,[`model-value`,`options`,`placeholder`])):a(``,!0),or.value?(I(),i(`div`,mc,[x(u(B),{label:u(d)(`archive.pickMove`),icon:`pi pi-replay`,size:`small`,onClick:n[49]||=e=>{cr(V.value.card.id,or.value),or.value=null,sn()}},null,8,[`label`]),x(u(B),{label:u(d)(`archive.pickCopy`),icon:`pi pi-copy`,size:`small`,severity:`secondary`,outlined:``,onClick:n[50]||=e=>{sr(V.value.card,or.value),or.value=null}},null,8,[`label`]),x(u(B),{label:u(d)(`editor.cancel`),size:`small`,text:``,severity:`secondary`,onClick:n[51]||=e=>or.value=null},null,8,[`label`])])):(I(),i(`p`,hc,[n[110]||=R(`i`,{class:`pi pi-inbox`},null,-1),P(` `+k(u(d)(`archive.editorPickHint`)),1)]))])):(I(),i(`div`,gc,[R(`span`,_c,[P(k(u(d)(`editor.columnSettingLabel`))+` `,1),e.otherBoards.length&&e.moveCardToBoard&&!Bn.value?z((I(),i(`i`,{key:0,class:`pi pi-info-circle kb-side__info`,tabindex:`0`,"aria-label":u(d)(`editor.moveToBoardHint`)},null,8,vc)),[[r,{value:u(d)(`editor.moveToBoardHint`),showDelay:150},void 0,{left:!0}]]):a(``,!0)]),x(u(re),{"model-value":Lt.value,options:An.value,"option-label":`title`,"option-value":`id`,"option-group-label":`label`,"option-group-children":`items`,disabled:Bn.value,filter:An.value.length>1,"filter-placeholder":u(d)(`editor.columnSearchPlaceholder`),"empty-filter-message":u(d)(`editor.columnSearchEmpty`),"auto-filter-focus":!0,size:`small`,class:`kb-side__control`,"onUpdate:modelValue":jn},{optiongroup:L(({option:e})=>[R(`span`,{class:O([`kb-colgroup`,{"kb-colgroup--away":e.items[0]?.boardId}])},[R(`i`,{class:O(e.items[0]?.boardId?`pi pi-th-large`:`pi pi-map-marker`)},null,2),R(`span`,yc,k(e.label),1)],2)]),option:L(({option:e})=>[R(`span`,bc,[e.boardId?(I(),i(`i`,xc)):a(``,!0),R(`span`,null,k(e.title),1)])]),_:1},8,[`model-value`,`options`,`disabled`,`filter`,`filter-placeholder`,`empty-filter-message`])])),e.members.length?(I(),i(`div`,Sc,[R(`span`,Cc,[P(k(u(d)(`editor.assigneesLabel`)),1),Te.value?(I(),i(`button`,{key:0,type:`button`,class:`kb-side__self`,onClick:De},k(u(d)(`editor.assignMe`)),1)):a(``,!0),z(R(`i`,{class:`pi pi-info-circle kb-side__info`,tabindex:`0`,"aria-label":u(d)(`editor.assigneesHint`)},null,8,wc),[[r,{value:u(d)(`editor.assigneesHint`),showDelay:150},void 0,{left:!0}]])]),x(u(Ve),{modelValue:_t.value,"onUpdate:modelValue":n[52]||=e=>_t.value=e,options:e.members,"option-label":`name`,"option-value":`userId`,placeholder:u(d)(`editor.assigneesPlaceholder`),disabled:Bn.value,display:`chip`,filter:``,size:`small`,class:`kb-side__control`},{chip:L(({value:t})=>[R(`span`,{class:`kb-card__avatar`,style:Ne(u(rn)(t)),title:Pr(t)},[e.avatarUrl&&!jr.has(t)?(I(),i(`img`,{key:0,src:e.avatarUrl(t),alt:``,onError:e=>jr.add(t)},null,40,Ec)):(I(),i(N,{key:1},[P(k(Mr(Pr(t))),1)],64))],12,Tc)]),option:L(({option:t})=>[R(`span`,Dc,[R(`span`,{class:`kb-card__avatar`,style:Ne(u(rn)(t.userId))},[e.avatarUrl&&!jr.has(t.userId)?(I(),i(`img`,{key:0,src:e.avatarUrl(t.userId),alt:``,onError:e=>jr.add(t.userId)},null,40,Oc)):(I(),i(N,{key:1},[P(k(Mr(t.name)),1)],64))],4),P(` `+k(t.name),1)])]),_:1},8,[`modelValue`,`options`,`placeholder`,`disabled`])])):a(``,!0)]),R(`div`,kc,[R(`div`,Ac,[R(`span`,jc,[P(k(u(d)(`editor.priorityLabel`))+` `,1),St.value===null?a(``,!0):(I(),i(`span`,Mc,k(St.value)+`/10`,1))]),St.value===null?Bn.value?(I(),i(`p`,Fc,k(u(d)(`editor.priorityNone`)),1)):(I(),i(`button`,{key:1,class:`kb-prio__set`,onClick:Dt},[n[112]||=R(`i`,{class:`pi pi-plus`},null,-1),P(` `+k(u(d)(`editor.priorityAdd`)),1)])):(I(),i(`div`,Nc,[x(u(st),{modelValue:St.value,"onUpdate:modelValue":n[53]||=e=>St.value=e,min:1,max:10,step:1,disabled:Bn.value,class:`kb-prio__slider`},null,8,[`modelValue`,`disabled`]),Bn.value?a(``,!0):(I(),i(`button`,{key:0,class:`kb-prio__clear`,title:u(d)(`editor.priorityClear`),onClick:n[54]||=e=>St.value=null},[...n[111]||=[R(`i`,{class:`pi pi-times`},null,-1)]],8,Pc))]))]),R(`div`,Ic,[R(`span`,Lc,k(u(d)(`editor.deadlineLabel`)),1),R(`div`,Rc,[x(u(Ft),{modelValue:Ct.value,"onUpdate:modelValue":n[55]||=e=>Ct.value=e,"date-format":`dd/mm/yy`,"show-icon":``,"icon-display":`input`,"show-button-bar":``,disabled:Bn.value,placeholder:u(d)(`editor.deadlineNone`),size:`small`,class:`kb-side__control`},null,8,[`modelValue`,`disabled`,`placeholder`]),!Bn.value&&Ct.value?(I(),i(`button`,{key:0,class:`kb-prio__clear`,title:u(d)(`editor.deadlineClear`),onClick:n[56]||=e=>Ct.value=null},[...n[113]||=[R(`i`,{class:`pi pi-times`},null,-1)]],8,zc)):a(``,!0)]),Ct.value?(I(),i(`p`,Bc,k(wt.value),1)):a(``,!0)])]),R(`div`,Vc,[R(`div`,Hc,[R(`span`,Uc,[P(k(u(d)(`editor.groupsLabel`)),1),z(R(`i`,{class:`pi pi-info-circle kb-side__info`,tabindex:`0`,"aria-label":u(d)(`editor.groupsHint`)},null,8,Wc),[[r,{value:u(d)(`editor.groupsHint`),showDelay:150},void 0,{left:!0}]])]),x(u(Ye),{modelValue:vt.value,"onUpdate:modelValue":n[57]||=e=>vt.value=e,multiple:``,suggestions:yt.value,disabled:Bn.value,placeholder:vt.value.length?``:u(d)(`editor.groupsPlaceholder`),"complete-on-focus":!0,delay:120,size:`small`,class:`kb-side__control kb-groups`,onComplete:xt,onItemSelect:jt,onKeydown:oe(Mt,[`enter`]),onFocusout:Mt},{option:L(({option:e})=>[R(`span`,Gc,[R(`i`,{class:O(bt.value.includes(e)?`pi pi-tag`:`pi pi-plus`)},null,2),R(`span`,null,k(bt.value.includes(e)?e:u(d)(`editor.groupsCreate`,{name:e})),1)])]),_:1},8,[`modelValue`,`suggestions`,`disabled`,`placeholder`])]),R(`div`,Kc,[R(`span`,qc,[P(k(u(d)(`editor.colorLabel`)),1),z(R(`i`,{class:`pi pi-info-circle kb-side__info`,tabindex:`0`,"aria-label":u(d)(`editor.colorHint`)},null,8,Jc),[[r,{value:u(d)(`editor.colorHint`),showDelay:150},void 0,{left:!0}]])]),R(`div`,Yc,[z((I(),i(`button`,{class:O([`kb-colors__swatch kb-colors__swatch--none`,{"kb-colors__swatch--on":!Pt.value}]),disabled:Bn.value,onClick:n[58]||=e=>Pt.value=``},[...n[114]||=[R(`i`,{class:`pi pi-ban`},null,-1)]],10,Xc)),[[r,{value:u(d)(`editor.colorNone`),showDelay:0,hideDelay:0},void 0,{bottom:!0}]]),(I(),i(N,null,F(It,e=>z(R(`button`,{key:e,class:O([`kb-colors__swatch`,{"kb-colors__swatch--on":Pt.value===e}]),style:Ne({background:e}),disabled:Bn.value,onClick:t=>Pt.value=e},null,14,Zc),[[r,{value:e,showDelay:0,hideDelay:0},void 0,{bottom:!0}]])),64))])])]),R(`div`,Qc,[Dn.value.length?(I(),i(`div`,$c,[R(`span`,el,k(u(d)(`editor.ancestryLabel`)),1),R(`ul`,tl,[(I(!0),i(N,null,F(Dn.value,(e,t)=>(I(),i(`li`,{key:e.cardId,class:`kb-tree__row`,style:Ne({paddingLeft:`${t*.75}rem`})},[t?(I(),i(`i`,nl)):a(``,!0),R(`button`,{class:`kb-tree__label`,title:e.here?u(d)(`editor.childOpen`):u(d)(`editor.openOnBoard`,{board:e.boardName}),onClick:t=>kn(e.cardId,e.boardId)},k(e.title),9,rl)],4))),128)),R(`li`,{class:`kb-tree__row kb-tree__row--self`,style:Ne({paddingLeft:`${Dn.value.length*.75}rem`})},[n[115]||=R(`i`,{class:`pi pi-angle-right kb-tree__branch`},null,-1),R(`span`,il,k(ot.value.trim()||u(d)(`card.untitled`)),1)],4)])])):a(``,!0),Un.value.length&&(Kn.value||Vn.value.length)?(I(),i(`div`,al,[R(`span`,ol,k(u(d)(`conversations.sideLabel`)),1),R(`ul`,sl,[(I(!0),i(N,null,F(Un.value,e=>(I(),i(`li`,{key:e,class:`kb-convs__row`},[qn(e).length?(I(),i(`button`,{key:0,type:`button`,class:`kb-convs__name kb-convs__name--open`,"aria-label":u(d)(`conversations.linkedCount`,{name:u(d)(`conversations.providers.${e}`),count:qn(e).length}),onClick:t=>Rt.value=`conv-${e}`},[n[116]||=R(`i`,{class:`pi pi-comments`,"aria-hidden":`true`},null,-1),R(`span`,null,k(u(d)(`conversations.providers.${e}`)),1),R(`span`,ll,k(qn(e).length),1)],8,cl)):(I(),i(`span`,ul,[n[117]||=R(`i`,{class:`pi pi-comments`,"aria-hidden":`true`},null,-1),R(`span`,null,k(u(d)(`conversations.providers.${e}`)),1)])),Kn.value?z((I(),A(u(B),{key:2,icon:`pi pi-link`,size:`small`,text:``,rounded:``,class:`kb-convs__link`,"aria-label":u(d)(`conversations.linkFrom`,{name:u(d)(`conversations.providers.${e}`)}),onClick:t=>Wn.value=e},null,8,[`aria-label`,`onClick`])),[[r,{value:u(d)(`conversations.linkFrom`,{name:u(d)(`conversations.providers.${e}`)}),showDelay:150},void 0,{left:!0}]]):a(``,!0)]))),128))])])):a(``,!0),$i.value.length?(I(),i(`div`,dl,[R(`span`,fl,k(u(d)(`editor.conversationsLabel`)),1),R(`div`,pl,[(I(!0),i(N,null,F($i.value,e=>(I(),i(`a`,{key:e.id,class:`kb-side__conv`,title:e.title,onClick:t=>c(`open-conversation`,e.id)},[n[118]||=R(`i`,{class:`pi pi-comments`},null,-1),R(`span`,hl,k(e.label),1)],8,ml))),128))])])):a(``,!0),t.$slots[`card-editor-actions`]&&!zn.value?(I(),i(`div`,gl,[R(`span`,_l,k(u(d)(`editor.actionsLabel`)),1),R(`div`,vl,[he(t.$slots,`card-editor-actions`,{card:V.value.card,colId:V.value.colId,draft:{title:ot.value,markdown:ct.value}},void 0,!0)])])):a(``,!0)]),!e.readOnly&&!Qt.value?(I(),i(`div`,yl,[zn.value?(I(),A(u(B),{key:0,label:u(d)(`archive.restore`),icon:`pi pi-replay`,severity:`secondary`,text:``,size:`small`,onClick:n[59]||=e=>{cr(V.value.card.id),sn()}},null,8,[`label`])):(I(),A(u(B),{key:1,label:u(d)(`archive.cardAction`),icon:`pi pi-inbox`,severity:`secondary`,text:``,size:`small`,onClick:n[60]||=e=>ar(V.value.colId,V.value.card.id)},null,8,[`label`])),x(u(B),{label:u(d)(`editor.deleteCard`),icon:`pi pi-trash`,severity:`danger`,text:``,size:`small`,onClick:n[61]||=e=>lr(V.value.colId,V.value.card.id)},null,8,[`label`])])):a(``,!0)])])):a(``,!0)]),_:3},8,[`visible`,`header`,`dismissable-mask`,`class`,`style`]),x(u(y),{visible:!!yr.value,header:yr.value?.file.name??``,modal:!0,"dismissable-mask":``,class:`kb-viewer-dialog`,style:{width:`min(1200px, 92vw)`,height:`88vh`},"onUpdate:visible":n[63]||=e=>{e||kr()}},{footer:L(()=>[x(u(B),{label:u(d)(`editor.viewerDownload`),icon:`pi pi-download`,text:``,onClick:Or},null,8,[`label`]),x(u(B),{label:u(d)(`editor.close`),onClick:kr},null,8,[`label`])]),default:L(()=>[yr.value?(I(),i(`div`,Sl,[yr.value.kind===`image`?(I(),i(`img`,{key:0,src:yr.value.url,alt:yr.value.file.name,class:`kb-viewer__image`},null,8,Cl)):yr.value.kind===`pdf`?(I(),i(`iframe`,{key:1,src:yr.value.url,title:yr.value.file.name,class:`kb-viewer__frame`},null,8,wl)):yr.value.kind===`video`?(I(),i(`video`,{key:2,src:yr.value.url,controls:``,class:`kb-viewer__media`},null,8,Tl)):yr.value.kind===`audio`?(I(),i(`audio`,{key:3,src:yr.value.url,controls:``,class:`kb-viewer__audio`},null,8,El)):yr.value.office?.mode===`sheet`?(I(),i(`div`,Dl,[yr.value.office.sheets.length>1?(I(),i(`div`,Ol,[(I(!0),i(N,null,F(yr.value.office.sheets,(e,t)=>(I(),i(`button`,{key:e.name+t,class:O([`kb-viewer__tab`,{"kb-viewer__tab--active":t===br.value}]),onClick:e=>br.value=t},k(e.name),11,kl))),128))])):a(``,!0),R(`div`,Al,[xr.value&&xr.value.rows.length?(I(),i(`table`,jl,[R(`thead`,null,[R(`tr`,null,[(I(!0),i(N,null,F(xr.value.rows[0],(e,t)=>(I(),i(`th`,{key:t},k(e),1))),128))])]),R(`tbody`,null,[(I(!0),i(N,null,F(xr.value.rows.slice(1),(e,t)=>(I(),i(`tr`,{key:t},[(I(!0),i(N,null,F(e,(e,t)=>(I(),i(`td`,{key:t},k(e),1))),128))]))),128))])])):(I(),i(`p`,Ml,k(u(d)(`editor.viewerEmpty`)),1))])])):yr.value.office?.mode===`blocks`?(I(),i(`div`,Nl,[R(`div`,Pl,[(I(!0),i(N,null,F(yr.value.office.blocks,(e,t)=>(I(),i(N,{key:t},[e.type===`heading`&&e.level===1?(I(),i(`h1`,Fl,k(e.text),1)):e.type===`heading`&&e.level===2?(I(),i(`h2`,Il,k(e.text),1)):e.type===`heading`?(I(),i(`h3`,Ll,k(e.text),1)):e.type===`list`?(I(),i(`li`,Rl,k(e.text),1)):e.type===`table`?(I(),i(`table`,zl,[R(`tbody`,null,[(I(!0),i(N,null,F(e.rows,(e,t)=>(I(),i(`tr`,{key:t},[(I(!0),i(N,null,F(e,(e,t)=>(I(),i(`td`,{key:t},k(e),1))),128))]))),128))])])):(I(),i(`p`,Bl,k(e.text),1))],64))),128)),yr.value.office.blocks.length?a(``,!0):(I(),i(`p`,Vl,k(u(d)(`editor.viewerEmpty`)),1))])])):yr.value.office?.mode===`slides`?(I(),i(`div`,Hl,[R(`div`,Ul,[(I(!0),i(N,null,F(yr.value.office.slides,(e,t)=>(I(),i(`section`,{key:t,class:`kb-viewer__slide`},[R(`span`,Wl,k(t+1),1),e.title?(I(),i(`h3`,Gl,k(e.title),1)):a(``,!0),(I(!0),i(N,null,F(e.lines,(e,t)=>(I(),i(`p`,{key:t},k(e),1))),128))]))),128))])])):yr.value.office?.mode===`render`?(I(),i(`div`,Kl,[Cr.value?(I(),i(`p`,ql,k(u(d)(`editor.viewerFailed`)),1)):a(``,!0),z(R(`div`,{ref_key:`renderHost`,ref:Sr,class:`kb-viewer__scroll kb-viewer__render`},null,512),[[de,!Cr.value]])])):(I(),i(`pre`,Jl,k(yr.value.text),1)),yr.value.office&&yr.value.office.mode!==`render`&&yr.value.office.truncated?(I(),i(`p`,Yl,[n[120]||=R(`i`,{class:`pi pi-exclamation-triangle`},null,-1),P(` `+k(u(d)(`editor.viewerTruncated`)),1)])):a(``,!0)])):a(``,!0)]),_:1},8,[`visible`,`header`]),x(u(Oe),{ref_key:`colMenu`,ref:fi,onHide:n[68]||=e=>pi.value=null},{default:L(()=>[pi.value?(I(),i(`div`,Xl,[R(`div`,Zl,[he(t.$slots,`column-actions`,{column:pi.value},void 0,!0)]),Kr.value?(I(),i(`button`,{key:0,class:`kb-colmenu__item`,onClick:n[64]||=e=>gi(vi)},[n[121]||=R(`i`,{class:`pi pi-bell`},null,-1),R(`span`,null,k(ii(pi.value.id)?u(d)(`column.unsubscribe`):u(d)(`column.subscribe`)),1)])):a(``,!0),e.readOnly?a(``,!0):(I(),i(`button`,{key:1,class:`kb-colmenu__item`,onClick:n[65]||=e=>gi(rt)},[n[122]||=R(`i`,{class:`pi pi-check-circle`},null,-1),R(`span`,null,k(pi.value.done?u(d)(`column.unmarkDone`):u(d)(`column.markDone`)),1)])),R(`button`,{class:`kb-colmenu__item`,onClick:n[66]||=e=>gi(Fi)},[n[123]||=R(`i`,{class:`pi pi-angle-double-left`},null,-1),R(`span`,null,k(u(d)(`column.collapse`)),1)]),e.readOnly?a(``,!0):(I(),i(`button`,{key:2,class:`kb-colmenu__item kb-colmenu__item--danger`,onClick:n[67]||=e=>gi(it)},[n[124]||=R(`i`,{class:`pi pi-trash`},null,-1),R(`span`,null,k(u(d)(`column.deleteTooltip`)),1)]))])):a(``,!0)]),_:3},512)],512)}}}),[[`__scopeId`,`data-v-6f2f6859`]]),lu=Object.defineProperty,uu=Object.defineProperties,du=Object.getOwnPropertyDescriptors,fu=Object.getOwnPropertySymbols,pu=Object.prototype.hasOwnProperty,mu=Object.prototype.propertyIsEnumerable,hu=(e,t,n)=>t in e?lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,H=(e,t)=>{for(var n in t||={})pu.call(t,n)&&hu(e,n,t[n]);if(fu)for(var n of fu(t))mu.call(t,n)&&hu(e,n,t[n]);return e},U=(e,t)=>uu(e,du(t)),W=(e,t,n)=>hu(e,typeof t==`symbol`?t:t+``,n),gu=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),G=class{static isSSR(){return typeof window>`u`||typeof document>`u`}static isBrowser(){return!this.isSSR()}static hasAPI(e){return this.isSSR()?!1:window[e]!==void 0}static getApex(){return typeof window<`u`&&window.Apex?window.Apex:typeof globalThis<`u`&&globalThis.Apex?globalThis.Apex:{}}},_u=class e{constructor(e,t=null){this.nodeName=e,this.namespaceURI=t,this.attributes=new Map,this.children=[],this.textContent=``,this.style={},this.classList=new vu,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){if(e&&e!==this){if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}e.parentNode=this,this.children.push(e)}return e}removeChild(e){let t=this.children.indexOf(e);return t!==-1&&(this.children.splice(t,1),e.parentNode=null),e}insertBefore(e,t){if(!t)return this.appendChild(e);if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}let n=this.children.indexOf(t);return n!==-1&&(e.parentNode=this,this.children.splice(n,0,e)),e}cloneNode(t=!1){let n=new e(this.nodeName,this.namespaceURI);return n.textContent=this.textContent,this.attributes.forEach((e,t)=>{n.attributes.set(t,e)}),Object.assign(n.style,this.style),t&&this.children.forEach(e=>{e.cloneNode&&n.appendChild(e.cloneNode(!0))}),n}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let e=this;for(;e.parentNode;)e=e.parentNode;return e}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let e=``;if(this.attributes.forEach((t,n)=>{e+=` ${n}="${t}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${e}/>`;let t=this.children.map(e=>e.toString()).join(``);return`<${this.nodeName}${e}>${this.textContent}${t}</${this.nodeName}>`}get innerHTML(){return this.children.map(e=>e.toString()).join(``)}set innerHTML(e){this.children=[],this.textContent=e}get outerHTML(){return this.toString()}get isConnected(){return!0}},vu=class{constructor(){this.classes=new Set}add(...e){e.forEach(e=>this.classes.add(e))}remove(...e){e.forEach(e=>this.classes.delete(e))}contains(e){return this.classes.has(e)}toggle(e,t){return t===!0?(this.classes.add(e),!0):t===!1||this.classes.has(e)?(this.classes.delete(e),!1):(this.classes.add(e),!0)}toString(){return Array.from(this.classes).join(` `)}},yu=class{constructor(){this.SVGNS=`http://www.w3.org/2000/svg`,this.XLINKNS=`http://www.w3.org/1999/xlink`}createElementNS(e,t){return new _u(t,e)}createTextNode(e){let t={nodeName:`#text`,nodeType:3,textContent:e,toString(){return t.textContent}};return t}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString(e){return e.toString?e.toString():``}}}createDOMParser(){return{parseFromString(e,t){let n=new _u(`root`);return n.innerHTML=e,{documentElement:n}}}}},bu=null,xu=null,Su=null,K=class{static init(){G.isSSR()&&!bu&&(bu=new yu)}static createElement(e){return G.isSSR()?(bu||this.init(),bu.createElementNS(null,e)):document.createElement(e)}static createElementNS(e,t){return G.isSSR()?(bu||this.init(),bu.createElementNS(e,t)):document.createElementNS(e,t)}static createTextNode(e){return G.isSSR()?(bu||this.init(),bu.createTextNode(e)):document.createTextNode(e)}static querySelector(e){return G.isSSR()?null:document.querySelector(e)}static querySelectorAll(e){return G.isSSR()?[]:document.querySelectorAll(e)}static getComputedStyle(e){return G.isSSR()?{}:window.getComputedStyle(e)}static matchMedia(e){if(G.isSSR()||typeof window.matchMedia!=`function`)return null;try{return window.matchMedia(e)}catch{return null}}static getBoundingClientRect(e){return G.isSSR()?(bu||this.init(),bu.getBoundingClientRect(e)):e?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return G.isSSR()?(bu||this.init(),xu||=bu.createXMLSerializer(),xu):(xu||=new XMLSerializer,xu)}static getDOMParser(){return G.isSSR()?(bu||this.init(),Su||=bu.createDOMParser(),Su):(Su||=new DOMParser,Su)}static addWindowEventListener(e,t,n){G.isBrowser()&&window.addEventListener(e,t,n)}static removeWindowEventListener(e,t,n){G.isBrowser()&&window.removeEventListener(e,t,n)}static requestAnimationFrame(e){return G.isBrowser()?window.requestAnimationFrame(e):(e(0),null)}static cancelAnimationFrame(e){G.isBrowser()&&e&&window.cancelAnimationFrame(e)}static elementExists(e){return e?G.isSSR()?e._ssrMode===!0||e.nodeName!==void 0:e.getRootNode?e.getRootNode({composed:!0})===document||e.isConnected:!1:!1}static getWindow(){return G.isBrowser()?window:null}static getDocument(){return G.isBrowser()?document:null}static _getShim(){return bu}static _resetShim(){bu=null,xu=null,Su=null}},Cu=new WeakMap,wu=0,q=class e{static isObject(e){return e&&typeof e==`object`&&!Array.isArray(e)}static is(e,t){return Object.prototype.toString.call(t)===`[object `+e+`]`}static isSafari(){return G.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(e,t){if(!this.isObject(e)&&this.isObject(t))return this.clone(t);let n=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(r=>{this.isObject(t[r])&&r in e?n[r]=this.extend(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}static copySeriesShallow(e){return Array.isArray(e)?e.map(e=>this.isObject(e)?H({},e):e):e}static extendArray(t,n){let r=[];return t.map(t=>{r.push(e.extend(n,t))}),t=r,t}static monthMod(e){return e%12}static clone(e,t=new WeakMap,n=!1){if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);let r;if(Array.isArray(e))if(n)r=e.slice();else{r=[],t.set(e,r);for(let n=0;n<e.length;n++)r[n]=this.clone(e[n],t,!1)}else if(e instanceof Date)r=new Date(e.getTime());else if(n)r=Object.assign({},e);else for(let n in r={},t.set(e,r),e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=this.clone(e[n],t,!1));return r}static shallowClone(e){return typeof e!=`object`||!e?e:Array.isArray(e)?e.slice():Object.assign({},e)}static stringifyForCompare(e){return JSON.stringify(e,(e,t)=>{if(typeof t!=`function`)return t;let n=Cu.get(t);return n===void 0&&(n=++wu,Cu.set(t,n)),`__apx_fn_${n}`})}static shallowEqual(e,t){if(e===t)return!0;if(!e||!t)return!1;if(typeof e!=`object`||typeof t!=`object`)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}static log10(e){return Math.log(e)/Math.LN10}static roundToBase10(e){return 10**Math.floor(Math.log10(e))}static roundToBase(e,t){return t**+Math.floor(Math.log(e)/Math.log(t))}static parseNumber(e){return typeof e==`number`||e===null?e:parseFloat(e)}static stripNumber(e,t=2){return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(e){return e.toString().includes(`e`)?Math.round(e):e}static elementExists(e){return!(!e||!e.isConnected)}static getDimensions(e){if(!e)return[0,0];if(G.isSSR())return[e._ssrWidth||400,e._ssrHeight||300];let t;try{t=getComputedStyle(e,null)}catch{return[e.clientWidth||0,e.clientHeight||0]}let n=e.clientWidth,r=e.clientHeight;if(!n||!r){let t=e.getBoundingClientRect();n||=t.width,r||=t.height}return r-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),n-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),[n,r]}static getBoundingClientRect(e){if(!e)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(G.isSSR())return K.getBoundingClientRect(e);let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}static getLargestStringFromArr(e){return e.reduce((e,t)=>(Array.isArray(t)&&(t=t.reduce((e,t)=>e.length>t.length?e:t)),e.length>t.length?e:t),0)}static hexToRgba(e=`#999999`,t=.6){e.substring(0,1)!==`#`&&(e=`#999999`);let n=e.replace(`#`,``),r=n.match(RegExp(`(.{`+n.length/3+`})`,`g`))||[];for(let e=0;e<r.length;e++)r[e]=parseInt(r[e].length===1?r[e]+r[e]:r[e],16);return t!==void 0&&r.push(t),`rgba(`+r.join(`,`)+`)`}static getOpacityFromRGBA(e){return parseFloat(e.replace(/^.*,(.+)\)/,`$1`))}static parseHex(e){if(typeof e!=`string`)return null;let t=e.trim().replace(`#`,``);return t.length===3&&(t=t.split(``).map(e=>e+e).join(``)),/^[0-9a-fA-F]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]:null}static relativeLuminance([e,t,n]){let r=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)}static getContrastRatio(t,n){let r=e.parseHex(t),i=e.parseHex(n);if(!r||!i)return 0;let a=e.relativeLuminance(r),o=e.relativeLuminance(i),s=Math.max(a,o),c=Math.min(a,o);return(s+.05)/(c+.05)}static rgb2hex(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?`#`+(`0`+parseInt(e[1],10).toString(16)).slice(-2)+(`0`+parseInt(e[2],10).toString(16)).slice(-2)+(`0`+parseInt(e[3],10).toString(16)).slice(-2):``}shadeRGBColor(e,t){let n=t.split(`,`),r=e<0?0:255,i=e<0?e*-1:e,a=parseInt(n[0].slice(4),10),o=parseInt(n[1],10),s=parseInt(n[2],10);return`rgb(`+(Math.round((r-a)*i)+a)+`,`+(Math.round((r-o)*i)+o)+`,`+(Math.round((r-s)*i)+s)+`)`}shadeHexColor(e,t){let n=parseInt(t.slice(1),16),r=e<0?0:255,i=e<0?e*-1:e,a=n>>16,o=n>>8&255,s=n&255;return`#`+(16777216+(Math.round((r-a)*i)+a)*65536+(Math.round((r-o)*i)+o)*256+(Math.round((r-s)*i)+s)).toString(16).slice(1)}shadeColor(t,n){return e.isColorHex(n)?this.shadeHexColor(t,n):this.shadeRGBColor(t,n)}static isColorHex(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}static isCSSVariable(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.startsWith(`var(`)&&t.endsWith(`)`)}static getThemeColor(t){if(!e.isCSSVariable(t)||G.isSSR())return t;let n=document.createElement(`div`);n.style.cssText=`position:fixed; left: -9999px; visibility:hidden;`,n.style.color=t,document.body.appendChild(n);let r;try{r=window.getComputedStyle(n).color}finally{n.parentNode&&n.parentNode.removeChild(n)}return r}static applyOpacityToColor(e,t){let n=Number(t);return Number.isFinite(n)?n<=0?`transparent`:n>=1?e:`color-mix(in srgb, ${e} ${Math.round(n*100)}%, transparent)`:e}static getPolygonPos(e,t){let n=[],r=Math.PI*2/t;for(let i=0;i<t;i++){let t={};t.x=e*Math.sin(i*r),t.y=-e*Math.cos(i*r),n.push(t)}return n}static polarToCartesian(e,t,n,r){let i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}static escapeString(e,t=`x`){let n=e.toString().slice();return n=n.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,t),n}static negToZero(e){return e<0?0:e}static moveIndexInArray(e,t,n){if(n>=e.length){let t=n-e.length+1;for(;t--;)e.push(void 0)}return e.splice(n,0,e.splice(t,1)[0]),e}static extractNumber(e){return parseFloat(e.replace(/[^\d.]*/g,``))}static findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}static setELstyles(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e.style[n]=t[n])}static preciseAddition(e,t){let n=(String(e).split(`.`)[1]||``).length,r=(String(t).split(`.`)[1]||``).length,i=10**Math.max(n,r);return(Math.round(e*i)+Math.round(t*i))/i}static isNumber(e){return!isNaN(e)&&parseFloat(String(Number(e)))===e&&!isNaN(parseInt(e,10))}static isFloat(e){return Number(e)===e&&e%1!=0}static isMsEdge(){if(G.isSSR())return!1;let e=window.navigator.userAgent,t=e.indexOf(`Edge/`);return t>0?parseInt(e.substring(t+5,e.indexOf(`.`,t)),10):!1}static getGCD(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));for(r>1?(e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r)):r=1;t;){let n=t;t=e%t,e=n}return e/r}static getPrimeFactors(e){let t=[],n=2;for(;e>=2;)e%n==0?(t.push(n),e/=n):n++;return t}static mod(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));return e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r),e%t/r}},Tu=class{constructor(e){this.w=e,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(e){return typeof e==`number`?!1:!isNaN(this.parseDate(e))}getTimeStamp(e){return isNaN(Date.parse(e))?e:this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime()}getDate(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}parseDate(e){let t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);if(typeof e!=`string`)return NaN;let n=Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `));return n=this.getTimeStamp(n),n}parseDateWithTimezone(e){return Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `))}formatDate(e,t){let n=this.w.globals.locale,r=this.w.config.xaxis.labels.datetimeUTC,i=[`\0`,...n.months],a=[``,...n.shortMonths],o=[``,...n.days],s=[``,...n.shortDays];function c(e,t=2){let n=e+``;for(;n.length<t;)n=`0`+n;return n}let l=r?e.getUTCFullYear():e.getFullYear();t=t.replace(/(^|[^\\])yyyy+/g,`$1`+l),t=t.replace(/(^|[^\\])yy/g,`$1`+l.toString().substr(2,2)),t=t.replace(/(^|[^\\])y/g,`$1`+l);let u=(r?e.getUTCMonth():e.getMonth())+1;t=t.replace(/(^|[^\\])MMMM+/g,`$1`+i[0]),t=t.replace(/(^|[^\\])MMM/g,`$1`+a[0]),t=t.replace(/(^|[^\\])MM/g,`$1`+c(u)),t=t.replace(/(^|[^\\])M/g,`$1`+u);let d=r?e.getUTCDate():e.getDate();t=t.replace(/(^|[^\\])dddd+/g,`$1`+o[0]),t=t.replace(/(^|[^\\])ddd/g,`$1`+s[0]),t=t.replace(/(^|[^\\])dd/g,`$1`+c(d)),t=t.replace(/(^|[^\\])d/g,`$1`+d);let f=r?e.getUTCHours():e.getHours();t=t.replace(/(^|[^\\])HH+/g,`$1`+c(f)),t=t.replace(/(^|[^\\])H/g,`$1`+f);let p=f>12?f-12:f===0?12:f;t=t.replace(/(^|[^\\])hh+/g,`$1`+c(p)),t=t.replace(/(^|[^\\])h/g,`$1`+p);let m=r?e.getUTCMinutes():e.getMinutes();t=t.replace(/(^|[^\\])mm+/g,`$1`+c(m)),t=t.replace(/(^|[^\\])m/g,`$1`+m);let h=r?e.getUTCSeconds():e.getSeconds();t=t.replace(/(^|[^\\])ss+/g,`$1`+c(h)),t=t.replace(/(^|[^\\])s/g,`$1`+h);let g=r?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,`$1`+c(g,3)),g=Math.round(g/10),t=t.replace(/(^|[^\\])ff/g,`$1`+c(g)),g=Math.round(g/10),t=t.replace(/(^|[^\\])f/g,`$1`+g);let _=f<12?`AM`:`PM`;t=t.replace(/(^|[^\\])TT+/g,`$1`+_),t=t.replace(/(^|[^\\])T/g,`$1`+_.charAt(0));let v=_.toLowerCase();t=t.replace(/(^|[^\\])tt+/g,`$1`+v),t=t.replace(/(^|[^\\])t/g,`$1`+v.charAt(0));let y=-e.getTimezoneOffset(),b=r||!y?`Z`:y>0?`+`:`-`;if(!r){y=Math.abs(y);let e=Math.floor(y/60),t=y%60;b+=c(e)+`:`+c(t)}t=t.replace(/(^|[^\\])K/g,`$1`+b);let x=(r?e.getUTCDay():e.getDay())+1;return t=t.replace(new RegExp(o[0],`g`),o[x]),t=t.replace(new RegExp(s[0],`g`),s[x]),t=t.replace(new RegExp(i[0],`g`),i[u]),t=t.replace(new RegExp(a[0],`g`),a[u]),t=t.replace(/\\(.)/g,`$1`),t}getTimeUnitsfromTimestamp(e,t){let n=this.w;n.config.xaxis.min!==void 0&&(e=n.config.xaxis.min),n.config.xaxis.max!==void 0&&(t=n.config.xaxis.max);let r=this.getDate(e),i=this.getDate(t),a=this.formatDate(r,`yyyy MM dd HH mm ss fff`).split(` `),o=this.formatDate(i,`yyyy MM dd HH mm ss fff`).split(` `);return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(o[0],10)}}isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}calculcateLastDaysOfMonth(e,t,n){return this.determineDaysOfMonths(e,t)-n}determineDaysOfYear(e){let t=365;return this.isLeapYear(e)&&(t=366),t}determineRemainingDaysOfYear(e,t,n){let r=this.daysCntOfYear[t]+n;return t>1&&this.isLeapYear(e)&&r++,r}determineDaysOfMonths(e,t){let n=30;switch(e=q.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(n=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:n=31;break;default:n=31;break}return n}getDateFields(e,t){let n=new Date(e);return t?{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),ms:n.getUTCMilliseconds(),weekday:n.getUTCDay()}:{year:n.getFullYear(),month:n.getMonth(),date:n.getDate(),hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds(),ms:n.getMilliseconds(),weekday:n.getDay()}}addInterval(e,t,n,r){let i=new Date(e);if(r)switch(t){case`year`:i.setUTCFullYear(i.getUTCFullYear()+n);break;case`month`:i.setUTCMonth(i.getUTCMonth()+n);break;case`week`:i.setUTCDate(i.getUTCDate()+n*7);break;case`day`:i.setUTCDate(i.getUTCDate()+n);break;case`hour`:i.setUTCHours(i.getUTCHours()+n);break;case`minute`:i.setUTCMinutes(i.getUTCMinutes()+n);break;case`second`:i.setUTCSeconds(i.getUTCSeconds()+n);break}else switch(t){case`year`:i.setFullYear(i.getFullYear()+n);break;case`month`:i.setMonth(i.getMonth()+n);break;case`week`:i.setDate(i.getDate()+n*7);break;case`day`:i.setDate(i.getDate()+n);break;case`hour`:i.setHours(i.getHours()+n);break;case`minute`:i.setMinutes(i.getMinutes()+n);break;case`second`:i.setSeconds(i.getSeconds()+n);break}return i.getTime()}ceilToBoundary(e,t,n,r){let i=new Date(e);if(r)switch(t){case`second`:{let t=i.getUTCSeconds(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(r),i.getTime())}case`minute`:{let t=i.getUTCMinutes(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(r),i.getTime())}case`hour`:{let t=i.getUTCHours(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(r),i.getTime())}case`day`:return i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0),i.setUTCDate(i.getUTCDate()+1),i.getTime());case`week`:{let t=10080*60*1e3,r=Date.UTC(1970,0,5);i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0);let a=i.getTime(),o=Math.ceil((a-r)/t),s=r+Math.ceil(o/n)*n*t;return s>=e?s:s+n*t}case`month`:{let t=i.getUTCMonth(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCDate()===1&&i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0),i.setUTCDate(1),i.setUTCMonth(r),i.getTime())}case`year`:{let t=i.getUTCFullYear(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMonth()===0&&i.getUTCDate()===1&&i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:Date.UTC(r,0,1)}}else switch(t){case`second`:{let t=i.getSeconds(),r=Math.ceil(t/n)*n;return r===t&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(r),i.getTime())}case`minute`:{let t=i.getMinutes(),r=Math.ceil(t/n)*n;return r===t&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(r),i.getTime())}case`hour`:{let t=i.getHours(),r=Math.ceil(t/n)*n;return r===t&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(r),i.getTime())}case`day`:return i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0),i.setDate(i.getDate()+1),i.getTime());case`week`:{let t=10080*60*1e3,r=new Date(1970,0,5).getTime();i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0);let a=i.getTime(),o=Math.ceil((a-r)/t),s=r+Math.ceil(o/n)*n*t;return s>=e?s:s+n*t}case`month`:{let t=i.getMonth(),r=Math.ceil(t/n)*n;return r===t&&i.getDate()===1&&i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0),i.setDate(1),i.setMonth(r),i.getTime())}case`year`:{let t=i.getFullYear(),r=Math.ceil(t/n)*n;return r===t&&i.getMonth()===0&&i.getDate()===1&&i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:new Date(r,0,1).getTime()}}return e}isAtBoundary(e,t,n){let r=this.getDateFields(e,n);switch(t){case`year`:return r.month===0&&r.date===1&&r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`month`:return r.date===1&&r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`day`:return r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`hour`:return r.minute===0&&r.second===0&&r.ms===0;case`minute`:return r.second===0&&r.ms===0;case`second`:return r.ms===0}return!1}},Eu=class{constructor(e){this.w=e,this.tooltipKeyFormat=`dd MMM`}xLabelFormat(e,t,n,r){let i=this.w;if(i.config.xaxis.type===`datetime`&&i.config.xaxis.labels.formatter===void 0&&i.config.tooltip.x.formatter===void 0){let e=new Tu(this.w);return e.formatDate(e.getDate(t),i.config.tooltip.x.format)}return e(t,n,r)}defaultGeneralFormatter(e){return Array.isArray(e)?e.map(e=>e):e}defaultYFormatter(e,t){let n=this.w;if(q.isNumber(e))if(n.globals.yValueDecimal!==0)e=e.toFixed(t.decimalsInFloat===void 0?n.globals.yValueDecimal:t.decimalsInFloat);else{let t=e.toFixed(0);e=Number(t)===e?t:e.toFixed(1)}return e}setLabelFormatters(){let e=this.w,t=e.formatters;return t.xaxisTooltipFormatter=e=>this.defaultGeneralFormatter(e),t.ttKeyFormatter=e=>this.defaultGeneralFormatter(e),t.ttZFormatter=e=>e,t.legendFormatter=e=>this.defaultGeneralFormatter(e),e.config.xaxis.labels.formatter===void 0?t.xLabelFormatter=t=>{if(q.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&e.config.xaxis.type===`numeric`){if(q.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);{let n=e.globals.maxX-e.globals.minX;if(n>0){let e=n/10,r=Math.max(0,-Math.floor(Math.log10(e)));return t.toFixed(r)}return t.toFixed(0)}}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minY<4?t.toFixed(1):t.toFixed(0)}return t}:t.xLabelFormatter=e.config.xaxis.labels.formatter,typeof e.config.tooltip.x.formatter==`function`?t.ttKeyFormatter=e.config.tooltip.x.formatter:t.ttKeyFormatter=t.xLabelFormatter,typeof e.config.xaxis.tooltip.formatter==`function`&&(t.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||e.config.tooltip.y.formatter!==void 0)&&(t.ttVal=e.config.tooltip.y),e.config.tooltip.z.formatter!==void 0&&(t.ttZFormatter=e.config.tooltip.z.formatter),e.config.legend.formatter!==void 0&&(t.legendFormatter=e.config.legend.formatter),t.yLabelFormatters=[],e.config.yaxis.forEach((n,r)=>{if(n.labels.formatter!==void 0)t.yLabelFormatters[r]=n.labels.formatter;else if(e.config.chart.type===`violin`){let n=e=>typeof e==`number`&&isFinite(e)?`${Math.round(e*100)/100}`:e;t.yLabelFormatters[r]=t=>e.globals.xyCharts?Array.isArray(t)?t.map(n):n(t):t}else t.yLabelFormatters[r]=t=>e.globals.xyCharts?Array.isArray(t)?t.map(e=>this.defaultYFormatter(e,n)):this.defaultYFormatter(t,n):t}),e.globals}heatmapLabelFormatters(){let e=this.w;if(e.config.chart.type===`heatmap`){e.globals.yAxisScale[0].result=e.seriesData.seriesNames.slice();let t=e.seriesData.seriesNames.reduce((e,t)=>e.length>t.length?e:t,0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}},Du={name:`en`,options:{months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],toolbar:{exportToSVG:`Download SVG`,exportToPNG:`Download PNG`,exportToCSV:`Download CSV`,menu:`Menu`,selection:`Selection`,selectionZoom:`Selection Zoom`,zoomIn:`Zoom In`,zoomOut:`Zoom Out`,pan:`Panning`,reset:`Reset Zoom`,measure:`Measure`}}},Ou=class{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:`11px`,fontWeight:400,fontFamily:void 0,cssClass:``},formatter:void 0},axisBorder:{show:!1,color:`#e0e0e0`,width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:`#e0e0e0`,width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:`11px`,fontWeight:900,fontFamily:void 0,cssClass:``}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:`front`,stroke:{color:`#b6b6b6`,width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:`#fff`,strokeWidth:2,strokeColor:`#333`,shape:`circle`,offsetX:0,offsetY:0,cssClass:``},label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`middle`,offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:`#c2c2c2`,borderColor:`#c2c2c2`,borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:`100%`,yAxisIndex:0,label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`end`,position:`right`,offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:`#c2c2c2`,borderColor:`#c2c2c2`,borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`middle`,orientation:`vertical`,position:`top`,offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:``,textAnchor:`start`,foreColor:void 0,fontSize:`13px`,fontFamily:void 0,fontWeight:400,appendTo:`.apexcharts-annotations`,backgroundColor:`transparent`,borderColor:`#c2c2c2`,borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:`placeholder`,data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:`auto`,minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,order:`first-seen`,limit:void 0,virtualize:`auto`,scales:{x:`shared`,y:`shared`,color:`shared`,size:`shared`},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:`edges`},legend:`shared`,toolbar:`shared`,tooltip:`panel`,zoom:`sync`,promote:!0,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:`easeInOutSine`,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:``,locales:[Du],defaultLocale:`en`,perspectives:{serializeOptions:[`theme`,`xaxis`,`yaxis`,`title`,`subtitle`]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:`svg`,rendererThreshold:8e3,layers:{series:`auto`,grid:`svg`,annotations:`svg`,dataLabels:`svg`},dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:`#000`,opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,crossFilter:void 0,filterChange:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:`#373d3f`,fontFamily:`Helvetica, Arial, sans-serif`,height:`auto`,parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,print:{enabled:!0,width:700},id:void 0,group:void 0,nonce:void 0,license:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:`x`,fill:{color:`#24292e`,opacity:.1},stroke:{width:1,color:`#24292e`,opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},link:{enabled:!1,mode:`highlight`,dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:`span`,key:`m`,pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:[`annotate`,`xline`,`yline`,`measure`],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:`Note`,line:{text:``,strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:`normal`,streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:`,`,headerCategory:`category`,headerValue:`value`,categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0,embedFonts:!0},autoSelected:`zoom`},type:`line`,width:`100%`,zoom:{enabled:!0,type:`x`,autoScaleYaxis:!1,allowMouseWheelZoom:`auto`,pinch:`auto`,zoomedArea:{fill:{color:`#90CAF9`,opacity:.4},stroke:{color:`#0D47A1`,opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:`lttb`,targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:`origin`},bar:{horizontal:!1,columnWidth:`70%`,barHeight:`70%`,distributed:!1,borderRadius:0,borderRadiusApplication:`around`,rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,dumbbell:{connector:{color:void 0,opacity:.55},dataLabels:{enabled:!1,offset:6,colorFromMarker:!0,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,colors:void 0}},tooltip:{differenceLabel:`Difference`}},isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:`top`,maxItems:100,hideOverflowingLabels:!0,orientation:`horizontal`,total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:`#373d3f`,fontSize:`12px`,fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:`#00B746`,downward:`#EF403C`},wick:{useFillColor:!0}},boxPlot:{colors:{upper:`#00E396`,lower:`#008FFB`},whiskers:`minmax`,points:{show:!1,shape:`circle`,size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:`series-dark`,strokeColor:`#fff`,strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:`individual`,side:`both`,box:{show:!1,width:`15%`,whiskers:`minmax`,strokeWidth:1,fillColor:void 0,capWidth:.5},points:{show:!0,shape:`circle`,size:2.5,jitter:.5,constrainToViolin:!0,position:`center`,laneWidth:`40%`,maxPoints:3e3,opacity:.9,fillColor:`series-dark`,strokeColor:`#fff`,strokeWidth:1}},histogram:{bins:`auto`,binWidth:void 0,range:void 0,normalize:`count`,cumulative:!1,overlap:!0},heatmap:{shape:`rect`,radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:`70%`,height:`70%`,thickness:12,align:`center`,stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:`11px`,fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},waterfall:{colors:{positive:`#00A86F`,negative:`#FF4560`,subtotal:void 0,total:void 0},connectors:{show:!0,color:void 0,strokeWidth:1,strokeDashArray:3}},streamgraph:{offset:`wiggle`,order:`inside-out`,hover:{show:!0,opacity:.35},labels:{show:!0,minWidth:24,minFontSize:9,maxFontSize:30,style:{fontSize:`auto`,fontFamily:void 0,fontWeight:600,colors:void 0}}},funnel:{shape:`rectangle`,lastShape:`flat`},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:`scale`,minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:`70%`,height:`70%`,thickness:12,align:`center`,stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:`11px`,fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:`auto`,padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:`left`,offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:``}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:`#000`,borderWidth:1,borderRadius:2,style:{background:`rgba(0, 0, 0, 0.6)`,color:`#fff`,fontSize:`12px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:`grouped`,positions:void 0,transition:`group`,shape:`circle`,image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:`contain`,scale:1,padding:0,fallback:`circle`},size:`auto`,columns:{size:`inherit`},grid:{columns:10,total:void 0,fillFrom:`bottom`,split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:`lanes`,spread:`swarm`,orientation:`horizontal`,tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:`z`,sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:`auto`,minRadius:void 0,scale:`area`},spacing:1.05,borderRadius:0,gather:{motion:`auto`,spring:`crisp`,easing:`outCubic`,overshoot:1.70158,enter:`burst`},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:`auto`},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:`top`,curved:!0,fontSize:`13px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:`arc`,min:0,max:100,bands:[],bandsStyle:{strokeWidth:`40%`,gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:`#666`,placement:`outside`},minor:{count:4,length:5,width:1,color:`#999`,placement:`outside`},labels:{show:!1,offset:6,fontSize:`11px`,fontFamily:void 0,fontWeight:400,color:`#666`,formatter(e){return String(e)}}},needle:{color:`#333`,length:`85%`,baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:`ease-out`}},hollow:{margin:5,size:`50%`,background:`transparent`,image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:`front`,stroke:void 0,strokeWidth:1,strokeDasharray:void 0,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:`#000`,opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:`#f2f2f2`,strokeWidth:`97%`,opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:`#000`,opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:`16px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter(e){return e}},value:{show:!0,fontSize:`14px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(e){return e+`%`}},total:{show:!1,label:`Total`,fontSize:`16px`,fontWeight:600,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>e+t,0)/e.seriesData.series.length+`%`}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:`16px`,formatter(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:`65%`,background:`transparent`,labels:{show:!1,name:{show:!0,fontSize:`16px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(e){return e}},value:{show:!0,fontSize:`20px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(e){return e}},total:{show:!1,showAlways:!1,label:`Total`,fontSize:`16px`,fontWeight:400,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>e+t,0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:`#e8e8e8`},spokes:{strokeWidth:1,connectorColors:`#e8e8e8`}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:`15%`,borderRadius:0,spacing:1,leaf:`extend`,partition:`normalize`,tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:400,colors:void 0}}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:`#e8e8e8`,connectorColors:`#e8e8e8`,fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter(e){return e===null?``:e},textAnchor:`middle`,distributed:!1,offsetX:0,offsetY:0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:`#fff`,backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:`#fff`,dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8},animate:{enabled:!0},countUp:{enabled:!1}},fill:{type:`solid`,colors:void 0,opacity:.85,gradient:{shade:`dark`,type:`horizontal`,shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:`squares`,width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:`#e0e0e0`,strokeDashArray:0,position:`back`,xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:`top-left`,separator:` / `,rootLabel:`All`,offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:`#fff`}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:`bottom`,horizontalAlign:`center`,inverseOrder:!1,fontSize:`12px`,fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:`vertical`,labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:`#fff`,strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:`circle`,offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3},largeDatasetThreshold:0},noData:{text:void 0,align:`center`,offsetX:0,offsetY:0,style:{color:void 0,fontSize:`14px`,fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:`lighten`,value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:`darken`,value:.35}}},title:{text:void 0,align:`left`,margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:`14px`,fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:`left`,margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:`12px`,fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:`smooth`,lineCap:`butt`,width:2,colors:void 0,dashArray:0,fill:{type:`solid`,colors:void 0,opacity:.85,gradient:{shade:`dark`,type:`horizontal`,shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:`light`,cssClass:``,style:{fontSize:`12px`,fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:`dd MMM`,formatter:void 0},y:{formatter:void 0,title:{formatter(e){return e?e+`: `:``}}},z:{formatter:void 0,title:`Size: `},marker:{show:!0,fillColors:void 0},items:{display:`flex`},fixed:{enabled:!1,position:`topRight`,offsetX:0,offsetY:0}},xaxis:{type:`category`,categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:`12px`,fontWeight:400,fontFamily:void 0,cssClass:``},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:`yyyy`,month:`MMM`,day:`dd MMM`,hour:`HH:mm`,minute:`HH:mm`,second:`HH:mm:ss`}},group:{groups:[],style:{colors:[],fontSize:`12px`,fontWeight:400,fontFamily:void 0,cssClass:``}},axisBorder:{show:!0,color:`#e0e0e0`,width:`100%`,height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:`#e0e0e0`,height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:`on`,min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:`bottom`,title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:`12px`,fontWeight:900,fontFamily:void 0,cssClass:``}},crosshairs:{show:!0,width:1,position:`back`,opacity:.9,stroke:{color:`#b6b6b6`,width:1,dashArray:3},fill:{type:`solid`,color:`#B1B9C4`,gradient:{colorFrom:`#D8E3F0`,colorTo:`#BED1E6`,stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:``,palette:`palette1`,tokens:!0,follow:!1,name:``,monochrome:{enabled:!1,color:`#008FFB`,shadeTo:`light`,shadeIntensity:.65},accessibility:{colorBlindMode:``}}}}},ku={funnel:`bar`,pyramid:`bar`,gauge:`radialBar`,waffle:`unit`,histogram:`bar`,waterfall:`rangeBar`,dumbbell:`rangeBar`,streamgraph:`rangeArea`,raincloud:`violin`},Au=`_apexOwnedByType`,ju=(e,t)=>{let n=t;return n[Au]=e,t},Mu=[`tooltip.custom`,`tooltip.shared`,`tooltip.intersect`,`tooltip.followCursor`,`dataLabels.enabled`,`dataLabels.formatter`,`plotOptions.bar.dataLabels.position`,`markers.size`,`plotOptions.violin.side`,`plotOptions.violin.box.show`,`plotOptions.violin.box.whiskers`,`plotOptions.violin.points.position`,`states.hover.filter.type`,`states.active.filter.type`,`xaxis.crosshairs.width`,`xaxis.tickPlacement`,`xaxis.tooltip.enabled`,`chart.zoom.enabled`,`chart.animations.dynamicAnimation.enabled`],Nu=(e,t)=>{let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=n[e]}return n},Pu=(e,t,n)=>{let r=t.split(`.`),i=r.pop(),a=e;for(let e of r)(a[e]==null||typeof a[e]!=`object`)&&(a[e]={}),a=a[e];n===void 0?delete a[i]:a[i]=n},Fu=(e,t)=>{let n=ku[e];return{chart:{type:n||e,requestedType:n?e:void 0,stacked:t.chart?.stacked},plotOptions:{bar:{isFunnel:e===`funnel`||e===`pyramid`},histogram:t.plotOptions?.histogram},series:t.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},Iu=(e,t)=>{if(typeof e==`function`)return Array.isArray(e[Au])?!0:typeof t==`function`&&String(e)===String(t);if(typeof t==`function`)return e===void 0;if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}},Lu=({isTimeline:e,seriesIndex:t,dataPointIndex:n,y1:r,y2:i,w:a})=>{let o=a.rangeData.seriesRangeStart[t][n],s=a.rangeData.seriesRangeEnd[t][n],c=a.labelData.labels[n],l=a.config.series[t].name?a.config.series[t].name:``,u=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,f={w:a,seriesIndex:t,dataPointIndex:n,start:o,end:s};typeof d==`function`&&(l=d(l,f)),a.config.series[t].data[n]?.x&&(c=a.config.series[t].data[n].x),e||a.config.xaxis.type===`datetime`&&(c=new Eu(a).xLabelFormat(a.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new Tu(a).formatDate,w:a})),typeof u==`function`&&(c=u(c,f)),Number.isFinite(r)&&Number.isFinite(i)&&(o=r,s=i);let p=``,m=``,h=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type===`datetime`){let e=new Tu(a);p=e.formatDate(e.getDate(o),a.config.tooltip.x.format),m=e.formatDate(e.getDate(s),a.config.tooltip.x.format)}else p=o,m=s;else p=a.config.tooltip.x.formatter(o),m=a.config.tooltip.x.formatter(s);return{start:o,end:s,startVal:p,endVal:m,ylabel:c,color:h,seriesName:l}},Ru=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a,seriesIndex:o,dataPointIndex:s}=e,c=e.w.globals.tooltip.tooltipLabels.getFormatters(o);i=c.yLbFormatter(i),a=c.yLbFormatter(a);let l=c.yLbFormatter(e.w.seriesData.series[o][s]),u=``,d=`<span class="value start-value">
|
|
573
573
|
${i}
|
|
574
574
|
</span> <span class="separator">-</span> <span class="value end-value">
|
|
575
575
|
${a}
|
|
576
576
|
</span>`;return u=e.w.globals.comboCharts?e.w.config.series[o].type===`rangeArea`||e.w.config.series[o].type===`rangeBar`?d:`<span>${l}</span>`:d,`<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: `+t+`">`+(n||``)+`</span></div><div> <span class="category">`+r+`: </span> `+u+` </div></div>`},zu=class e{constructor(e){this.opts=e}static forType(t){let n=new e(t),r=[`line`,`area`,`bar`,`candlestick`,`boxPlot`,`violin`,`rangeBar`,`rangeArea`,`bubble`,`scatter`,`heatmap`,`treemap`,`unit`,`sunburst`,`pie`,`polarArea`,`donut`,`radar`,`radialBar`],i=t.chart.requestedType,a;return a=i===`funnel`||i===`pyramid`?n[i]():i===`gauge`?n.gauge():i===`histogram`?n.histogram():i===`waterfall`?n.waterfall():i===`dumbbell`?n.dumbbell():i===`streamgraph`?n.streamgraph():i===`raincloud`?n.raincloud():r.indexOf(t.chart.type)===-1?n.line():n[t.chart.type](),t.plotOptions?.bar?.isFunnel&&(a=n.funnel()),t.chart.stacked&&t.chart.type===`bar`&&(a=n.stackedBars()),a}static handOverTypeDefaults(t,n,r){let i=t.chart.requestedType||t.chart.type;if(!n||n===i)return;let a=new Ou().init(),o=q.extend(a,e.forType(Fu(n,t))),s=q.extend(a,e.forType(Fu(i,t)));for(let e of Mu){if(r&&Nu(r,e)!==void 0)continue;let n=Nu(o,e),i=Nu(s,e);n===void 0&&i===void 0||Iu(Nu(t,e),n)&&Pu(t,e,i)}}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text=``,this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:`straight`},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(e){return this.hideYAxis(),q.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(e,t){let n=t.w.config.series[t.seriesIndex].name;return e===null?``:n+`: `+e},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:`top`,labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:`straight`}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:`center`}}},dataLabels:{style:{colors:[`#fff`]},background:{enabled:!1}},stroke:{width:0,lineCap:`square`},fill:{opacity:.85},legend:{markers:{shape:`square`}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:`between`,crosshairs:{width:`barWidth`,position:`back`,fill:{type:`gradient`},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),U(H({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:`around`,borderRadius:0,dataLabels:{position:`center`}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}pyramid(){return this.funnel()}gauge(){return U(H({},this.radialBar()),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:`60%`},track:{background:`#e7e7e7`,strokeWidth:`100%`,margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:`32px`,fontWeight:600,offsetY:8}}}}})}waterfall(){let e=this.rangeBar();return U(H({},e),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!0}}},plotOptions:U(H({},e.plotOptions),{bar:U(H({},e.plotOptions.bar),{columnWidth:`60%`,barHeight:`60%`})}),dataLabels:U(H({},e.dataLabels),{enabled:!0,background:{enabled:!0,backgroundColor:`#fff`,foreColor:`#373d3f`,borderColor:`#e3e8ee`,opacity:.92}}),legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!1}})}histogram(){let e=Array.isArray(this.opts?.series)&&this.opts.series.length>1&&this.opts?.plotOptions?.histogram?.overlap!==!1;return U(H({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:`100%`,borderRadius:0,dataLabels:{position:`top`}}},dataLabels:{enabled:!1},fill:e?{opacity:.65}:{},stroke:e?{show:!1}:{show:!0,width:1,colors:[`#fff`]},xaxis:{type:`numeric`,tooltip:{enabled:!1}},tooltip:{shared:e,intersect:!1,x:{formatter:(e,t)=>{let n=t?.w?.histogramData?.edges,r=t?.dataPointIndex;if(!Array.isArray(n)||typeof r!=`number`||r<0)return String(e);let i=n[r],a=n[r+1];if(i===void 0||a===void 0)return String(e);let o=e=>Number.isInteger(e)?String(e):e.toFixed(2);return`${o(i)} to ${o(a)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:ju([`candlestick`],({seriesIndex:e,dataPointIndex:t,w:n})=>this._getBoxTooltip(n,e,t,[`Open`,`High`,``,`Low`,`Close`],`candlestick`))},states:{active:{filter:{type:`none`}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:[`#24292e`]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:ju([`boxPlot`],({seriesIndex:e,dataPointIndex:t,w:n})=>this._getBoxTooltip(n,e,t,[`Minimum`,`Q1`,`Median`,`Q3`,`Maximum`],`boxPlot`))},markers:{size:7,strokeWidth:1,strokeColors:`#111`},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:[`#24292e`]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:ju([`violin`],({seriesIndex:e,dataPointIndex:t,w:n})=>this._getViolinTooltip(n,e,t))},states:{active:{filter:{type:`none`}}},xaxis:{crosshairs:{width:1}}}}raincloud(){let e=this.violin(),t=this.opts?.plotOptions?.bar?.horizontal===!0;return U(H({},e),{plotOptions:{violin:{side:t?`top`:`right`,box:{show:!0,whiskers:`tukey`},points:{position:t?`bottom`:`left`,jitter:.85}}},tooltip:U(H({},e.tooltip),{custom:ju([`raincloud`],({seriesIndex:e,dataPointIndex:t,w:n})=>this._getRaincloudTooltip(n,e,t))})})}rangeBar(){let e=e=>{let{color:t,seriesName:n,ylabel:r,startVal:i,endVal:a}=Lu(U(H({},e),{isTimeline:!0}));return Ru(U(H({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))},t=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a}=Lu(e);return Ru(U(H({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:`square`},plotOptions:{bar:{borderRadius:0,dataLabels:{position:`center`}}},dataLabels:{enabled:!1,formatter(e,{seriesIndex:t,dataPointIndex:n,w:r}){let i=()=>{let e=r.rangeData.seriesRangeStart[t][n];return r.rangeData.seriesRangeEnd[t][n]-e};return r.globals.comboCharts?r.config.series[t].type===`rangeBar`||r.config.series[t].type===`rangeArea`?i():e:i()},background:{enabled:!1},style:{colors:[`#fff`]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:ju([`rangeBar`],n=>n.w.config.plotOptions&&n.w.config.plotOptions.bar&&n.w.config.plotOptions.bar.horizontal?e(n):t(n))},xaxis:{tickPlacement:`between`,tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(){let e=this.rangeBar(),t=(e,t,n)=>`<div class="apexcharts-tooltip-dumbbell-endpoint"><span class="series-name" style="color: `+t+`">`+e+`</span> <span class="value">`+n+`</span></div>`;return U(H({},e),{chart:{stacked:!1,zoom:{enabled:!1}},plotOptions:U(H({},e.plotOptions),{bar:U(H({},e.plotOptions.bar),{barHeight:6,columnWidth:6,dumbbell:{dataLabels:{enabled:!0}}})}),dataLabels:U(H({},e.dataLabels),{enabled:!1}),legend:{show:!0,position:`bottom`,horizontalAlign:`left`,markers:{shape:`circle`}},tooltip:{shared:!1,intersect:!0,followCursor:!1,custom:ju([`rangeBar`],e=>{let{w:n,dataPointIndex:r,seriesIndex:i}=e,a=n.dumbbellData;if(!a||a.form!==`series`){let{color:t,seriesName:n,ylabel:r,start:i,end:a}=Lu(e);return Ru(U(H({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))}let o=a.values[r]||[],s=n.globals.tooltip.tooltipLabels.getFormatters(i),c=n.labelData.labels[r]??``,l=``,u=[];for(let e=0;e<o.length;e++)o[e]===null||a.hidden.indexOf(e)!==-1||(u.push(o[e]),l+=t(a.names[e],n.globals.colors[e],s.yLbFormatter(o[e])));let d=u.length===2?`<div class="apexcharts-tooltip-dumbbell-gap"><span class="category">`+n.config.plotOptions.bar.dumbbell.tooltip.differenceLabel+`: </span><span class="value">`+s.yLbFormatter(Math.abs(u[1]-u[0]))+`</span></div>`:``;return`<div class="apexcharts-tooltip-rangebar apexcharts-tooltip-dumbbell"><div><span class="category">`+c+`</span></div>`+l+d+`</div>`})}})}dumbbellSizing(e){return e.plotOptions.bar?.barHeight||(e.plotOptions.bar.barHeight=2),e.plotOptions.bar?.columnWidth||(e.plotOptions.bar.columnWidth=2),e}area(){return{stroke:{width:4,fill:{type:`solid`,gradient:{inverseColors:!1,shade:`light`,type:`vertical`,opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:`gradient`,gradient:{inverseColors:!1,shade:`light`,type:`vertical`,opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){let e=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a}=Lu(e);return Ru(U(H({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))};return{stroke:{curve:`straight`,width:0},fill:{type:`solid`,opacity:.6},markers:{size:0},states:{hover:{filter:{type:`none`}},active:{filter:{type:`none`}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:ju([`rangeArea`],t=>e(t))}}}streamgraph(){let e=this.rangeArea(),t=e=>{let{w:t,dataPointIndex:n,seriesIndex:r}=e,i=t.streamgraphData;if(!i||!Array.isArray(i.order)){let{color:t,seriesName:n,ylabel:r,start:i,end:a}=Lu(e);return Ru(U(H({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))}let{ylabel:a}=Lu(e),o=(()=>{let e=t.streamgraphData,i=t.dom.baseEl&&t.dom.baseEl.querySelector(`.apexcharts-svg`),a=t.interact&&t.interact.clientY,o=t.globals.maxY-t.globals.minY;if(!i||a==null||!o||!isFinite(o))return r;let s=i.getBoundingClientRect(),c=t.globals.svgWidth?s.width/t.globals.svgWidth:1,l=(a-s.top)/(c||1)-t.layout.translateY,u=t.layout.gridHeight,d=e=>{let n=(e-t.globals.minY)/o;return t.config.yaxis[0]?.reversed?n*u:u-n*u},f=r,p=1/0;for(let t=0;t<e.order.length;t++){let r=e.order[t],i=e.lows[r]&&e.lows[r][n],a=e.highs[r]&&e.highs[r][n];if(i==null||a==null)continue;let o=d(a),s=d(i),c=Math.min(o,s),u=Math.max(o,s);if(l>=c&&l<=u)return r;let m=l<c?c-l:l-u;m<p&&(p=m,f=r)}return f})(),s=t.formatters.ttVal!==void 0,c=(e,n)=>{if(s){let r=t.globals.tooltip.tooltipLabels.getFormatters(e);if(typeof r.yLbFormatter==`function`)return r.yLbFormatter(n)}return Number.isInteger(n)?String(n):String(Number(n.toFixed(6)))},l=``,u=0;for(let e=i.order.length-1;e>=0;e--){let r=i.order[e],a=i.values[r]?.[n];a==null||!isFinite(a)||(u+=a,l+=`<div class="apexcharts-tooltip-stream-band`+(r===o?` apexcharts-active`:``)+`"><span class="apexcharts-tooltip-marker" style="background-color: `+t.globals.colors[r]+`"></span><span class="series-name">`+i.names[r]+`</span> <span class="value">`+c(r,a)+`</span></div>`)}let d=i.offset===`expand`?``:`<div class="apexcharts-tooltip-stream-total"><span class="series-name">Total</span> <span class="value">`+c(r,u)+`</span></div>`;return`<div class="apexcharts-tooltip-stream"><div class="apexcharts-tooltip-title">`+a+`</div>`+l+d+`</div>`};return U(H({},e),{chart:{stacked:!1},stroke:{curve:`monotoneCubic`,width:0},fill:{type:`solid`,opacity:1},dataLabels:{enabled:!1},grid:{yaxis:{lines:{show:!1}}},markers:{size:0,hover:{size:0,sizeOffset:0}},tooltip:{intersect:!1,shared:!1,followCursor:!0,custom:ju([`streamgraph`],e=>t(e))},legend:{show:!0,position:`top`,horizontalAlign:`center`}})}brush(e){return q.extend(e,{chart:{toolbar:{autoSelected:`selection`,show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;let t=e.dataLabels.formatter;return e.yaxis.forEach((t,n)=>{e.yaxis[n].min=0,e.yaxis[n].max=100}),e.chart.type===`bar`&&(e.dataLabels.formatter=t||function(e){return typeof e==`number`?e&&e.toFixed(0)+`%`:e}),e}stackedBars(){let e=this.bar();return U(H({},e),{plotOptions:U(H({},e.plotOptions),{bar:U(H({},e.plotOptions.bar),{borderRadiusApplication:`end`})})})}convertCatToNumeric(e){return e.xaxis.convertedCatToNumeric=!0,e}convertCatToNumericXaxis(e,t){e.xaxis.type=`numeric`,e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(e){return q.isNumber(e)?Math.floor(e):e};let n=e.xaxis.labels.formatter,r=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return t&&t.length&&(r=t.map(e=>Array.isArray(e)?e:String(e))),r&&r.length&&(e.xaxis.labels.formatter=function(e){return q.isNumber(e)?n(r[Math.floor(e)-1]):n(e)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||`dataPoints`,e}bubble(){return{dataLabels:{style:{colors:[`#fff`]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:`solid`,gradient:{shade:`light`,inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:[`#fff`]}},stroke:{colors:[`#fff`]},tooltip:{followCursor:!1,marker:{show:!1},x:{show:!1}},legend:{position:`top`,markers:{shape:`square`}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:[`#fff`]}},stroke:{show:!0,width:2,colors:[`#fff`]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:`bottom`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:[`#fff`]},dropShadow:{enabled:!0}},stroke:{colors:[`#fff`]},fill:{opacity:1},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(e){return typeof e==`number`?e.toFixed(1)+`%`:e},style:{colors:[`#fff`]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:[`#fff`]},fill:{opacity:1,gradient:{shade:`light`,stops:[0,100]}},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return typeof e==`number`?e.toFixed(1)+`%`:e},style:{colors:[`#fff`]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:[`#fff`]},fill:{opacity:1,gradient:{shade:`light`,shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return typeof e==`number`?e.toFixed(1)+`%`:e},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:`11px`}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:e=>e,style:{colors:[`#a8a8a8`],fontSize:`11px`}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:`butt`},fill:{gradient:{shade:`dark`,shadeIntensity:.4,inverseColors:!1,type:`diagonal2`,opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:`right`},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(e,t,n,r,i){let a=e.candleData.seriesCandleO[t][n],o=e.candleData.seriesCandleH[t][n],s=e.candleData.seriesCandleM[t][n],c=e.candleData.seriesCandleL[t][n],l=e.candleData.seriesCandleC[t][n],u=e.config.series[t];return u.type&&u.type!==i?`<div class="apexcharts-custom-tooltip">
|
|
577
577
|
${u.name?u.name:`series-`+(t+1)}: <strong>${e.seriesData.series[t][n]}</strong>
|
|
578
|
-
</div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div>${r[0]}: <span class="value">`+a+`</span></div><div>${r[1]}: <span class="value">`+o+`</span></div>`+(s?`<div>${r[2]}: <span class="value">`+s+`</span></div>`:``)+`<div>${r[3]}: <span class="value">`+c+`</span></div><div>${r[4]}: <span class="value">`+l+`</span></div></div>`}_getViolinTooltip(e,t,n){let r=e.violinData.seriesViolinMin[t]?.[n],i=e.violinData.seriesViolinMax[t]?.[n],a=e.violinData.seriesViolinPoints[t]?.[n]||[],o=e.config.series[t].name||`series-`+(t+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${o}</div><div>Min: <span class="value">${r}</span></div><div>Max: <span class="value">${i}</span></div><div>Observations: <span class="value">${a.length}</span></div></div>`}_getRaincloudTooltip(e,t,n){let r=e.violinData.seriesViolinSummary[t]?.[n];if(!r)return this._getViolinTooltip(e,t,n);let i=e.violinData.seriesViolinPoints[t]?.[n]||[],a=e.config.series[t].name||`series-`+(t+1),o=e=>{if(!isFinite(e))return String(e);let t=Math.round(e);return Math.abs(e-t)<1e-6?String(t):String(Number(e.toFixed(2)))},[s,c,l,u,d]=r;return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${a}</div><div>Whisker high: <span class="value">${o(d)}</span></div><div>Q3: <span class="value">${o(u)}</span></div><div>Median: <span class="value">${o(l)}</span></div><div>Q1: <span class="value">${o(c)}</span></div><div>Whisker low: <span class="value">${o(s)}</span></div><div>Observations: <span class="value">${i.length}</span></div></div>`}},Bu=class{constructor(e){this.opts=e}init({responsiveOverride:e}){let t=this.opts,n=new Ou,r=new zu(t);t=this.normalizeAliasedChartType(t),this.chartType=t.chart.type,t=this.extendYAxis(t),t=this.extendAnnotations(t);let i=n.init(),a={};if(t&&typeof t==`object`){let n=zu.forType(t);t.chart.brush?.enabled&&(n=r.brush(n)),t.plotOptions?.line?.isSlopeChart&&(n=r.slope()),t.chart.stacked&&t.chart.stackType===`100%`&&(t=r.stacked100(t)),t.plotOptions?.bar?.isDumbbell&&t.chart.requestedType!==`dumbbell`&&(t=r.dumbbellSizing(t)),this.checkForDarkTheme(G.getApex()),this.checkForDarkTheme(t),t.xaxis=t.xaxis||G.getApex().xaxis||{},e||(t.xaxis.convertedCatToNumeric=!1),t=this.checkForCatToNumericXAxis(this.chartType,n,t),(t.chart.sparkline?.enabled||G.getApex().chart?.sparkline?.enabled)&&(n=r.sparkline(n)),a=q.extend(i,n)}let o=q.extend(a,G.getApex());return i=q.extend(o,t),i=this.handleUserInputErrors(i),i}normalizeAliasedChartType(e){if(!e||!e.chart)return e;let t=e.chart.type;return!t||!ku[t]?e:(e.chart.requestedType=t,t===`waffle`?(e.plotOptions=e.plotOptions||{},e.plotOptions.unit=e.plotOptions.unit||{},e.plotOptions.unit.layout??(e.plotOptions.unit.layout=`grid`),e.plotOptions.unit.shape??(e.plotOptions.unit.shape=`square`),e.chart.type=`unit`):t===`funnel`||t===`pyramid`?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel=!0,e.plotOptions.bar.horizontal=!0,e.chart.type=`bar`,t===`pyramid`?e.plotOptions.bar.isPyramid=!0:e.plotOptions.bar.isPyramid=!1):t===`gauge`?e.chart.type=`radialBar`:t===`waterfall`?(e.chart.stacked=!1,e.chart.type=`rangeBar`):t===`dumbbell`?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isDumbbell=!0,e.plotOptions.bar.horizontal??(e.plotOptions.bar.horizontal=!0),e.chart.stacked=!1,e.chart.type=`rangeBar`):t===`streamgraph`?(e.chart.stacked=!1,e.yaxis=e.yaxis||{},!Array.isArray(e.yaxis)&&e.yaxis.show==null&&(e.yaxis.show=!1),e.chart.type=`rangeArea`):t===`histogram`?(e.xaxis=e.xaxis||{},e.xaxis.type??(e.xaxis.type=`numeric`),e.chart.type=`bar`):t===`raincloud`&&(e.chart.type=`violin`),e)}checkForCatToNumericXAxis(e,t,n){let r=new zu(n),i=(e===`bar`||e===`boxPlot`||e===`violin`)&&n.plotOptions?.bar?.horizontal,a=e===`pie`||e===`polarArea`||e===`donut`||e===`radar`||e===`radialBar`||e===`heatmap`||e===`unit`||e===`sunburst`,o=n.xaxis.type!==`datetime`&&n.xaxis.type!==`numeric`,s=(e===`scatter`||e===`bubble`)&&n.plotOptions?.scatter?.jitter?.enabled,c=n.xaxis.tickPlacement?n.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return!i&&!a&&!s&&o&&c!==`between`&&(n=r.convertCatToNumeric(n)),n}extendYAxis(e,t){let n=new Ou;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={});let r=G.getApex();e.yaxis.constructor!==Array&&r.yaxis&&r.yaxis.constructor!==Array&&(e.yaxis=q.extend(e.yaxis,r.yaxis)),e.yaxis.constructor===Array?e.yaxis=q.extendArray(e.yaxis,n.yAxis):e.yaxis=[q.extend(n.yAxis,e.yaxis)];let i=!1;e.yaxis.forEach(e=>{e.logarithmic&&(i=!0)});let a=e.series;return t&&!a&&(a=t.config.series),i&&a.length!==e.yaxis.length&&a.length&&(e.yaxis=a.map((t,r)=>{if(t.name||(a[r].name=`series-${r+1}`),e.yaxis[r])return e.yaxis[r].seriesName=a[r].name,e.yaxis[r];{let t=q.extend(n.yAxis,e.yaxis[0]);return t.show=!1,t}})),i&&a.length>1&&a.length!==e.yaxis.length&&console.warn(`A multi-series logarithmic chart should have equal number of series and y-axes`),e}extendAnnotations(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e),e}extendYAxisAnnotations(e){let t=new Ou;return e.annotations.yaxis=q.extendArray(e.annotations.yaxis===void 0?[]:e.annotations.yaxis,t.yAxisAnnotation),e}extendXAxisAnnotations(e){let t=new Ou;return e.annotations.xaxis=q.extendArray(e.annotations.xaxis===void 0?[]:e.annotations.xaxis,t.xAxisAnnotation),e}extendPointAnnotations(e){let t=new Ou;return e.annotations.points=q.extendArray(e.annotations.points===void 0?[]:e.annotations.points,t.pointAnnotation),e}checkForDarkTheme(e){e.theme&&e.theme.mode===`dark`&&(e.tooltip||={},e.tooltip.theme!==`light`&&(e.tooltip.theme=`dark`),e.chart.foreColor||(e.chart.foreColor=`#f6f7f8`),e.theme.palette||(e.theme.palette=`palette4`))}handleUserInputErrors(e){let t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw Error(`tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.`);if(t.chart.type===`bar`&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw Error(`Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false`);t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return(t.chart.type===`bar`||t.chart.type===`rangeBar`)&&t.tooltip.shared&&t.xaxis.crosshairs.width===`barWidth`&&t.series.length>1&&(t.xaxis.crosshairs.width=`tickWidth`),(t.chart.type===`candlestick`||t.chart.type===`boxPlot`)&&t.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${t.chart.type} chart is not supported.`),t.yaxis[0].reversed=!1),t}},Vu=1.618,Hu=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],Uu=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],Wu=class{initGlobalVars(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.maxValsInArrayIndex=0,e.yValueDecimal=0,e.allSeriesHasEqualX=!0,e.hasNullValues=!1,e.invalidLogScale=!1,e.seriesRangeName={},e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0,e.disableZoomIn=!1,e.disableZoomOut=!1,e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.rotateXLabels=!1,e.overlappingXLabels=!1,e.radialSize=0,e.barHeight=0,e.barWidth=0,e.animationEnded=!1,e.isDestroyed=!1,e.bulkRevealScheduled=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.barCanvasCoords=null,e.activeRenderer=null,e.dataLabelsRects=[],e.lastDrawnDataLabelsIndexes=[],e.textRectsCache=new Map,e.domCache=new Map,e.dimensionCache={},e.cachedSelectors={},e.seriesNS||this._attachNamespaces(e)}_attachNamespaces(e){let t=(t,n,r=n)=>{Object.defineProperty(t,r,{get(){return e[n]},set(t){e[n]=t},enumerable:!0,configurable:!0})},n={};t(n,`series`,`data`);for(let e of`seriesNames.seriesX.seriesZ.seriesXvalues.seriesYvalues.seriesGoals.seriesLog.seriesColors.seriesPercent.seriesTotals.stackedSeriesTotals.seriesCandleO.seriesCandleH.seriesCandleM.seriesCandleL.seriesCandleC.seriesRangeStart.seriesRangeEnd.seriesRange.seriesYAxisMap.seriesYAxisReverseMap.seriesGroups.barGroups.lineGroups.areaGroups.originalSeries.collapsedSeries.collapsedSeriesIndices.ancillaryCollapsedSeries.ancillaryCollapsedSeriesIndices.collapsingSeriesIndices.allSeriesCollapsed.risingSeries.previousPaths.ignoreYAxisIndexes.labels.categoryLabels.timescaleLabels.groups`.split(`.`))t(n,e);Object.defineProperty(e,`seriesNS`,{value:n,writable:!1,enumerable:!1,configurable:!0});let r={};for(let e of`minX.maxX.initialMinX.initialMaxX.minY.maxY.minYArr.maxYArr.minZ.maxZ.minDate.maxDate.minXDiff.xRange.yRange.zRange.xAxisScale.yAxisScale.xAxisTicksPositions.xTickAmount.multiAxisTickAmount.dataPoints.maxValsInArrayIndex.isXNumeric.isMultipleYAxis.isMultiLineX.isDataXYZ.dataFormatXNumeric.allSeriesHasEqualX.hasNullValues.dataWasParsed.hasXaxisGroups.hasSeriesGroups.skipFirstTimelinelabel.skipLastTimelinelabel.yValueDecimal.invalidLogScale.noLabelsProvided`.split(`.`))t(r,e);Object.defineProperty(e,`axes`,{value:r,writable:!1,enumerable:!1,configurable:!0});let i={};for(let e of[`svgWidth`,`svgHeight`,`gridWidth`,`gridHeight`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`translateYAxisX`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yAxisLabelsWidth`,`yAxisWidths`,`yLabelsCoords`,`yTitleCoords`,`padHorizontal`,`barPadForNumericAxis`,`rotateXLabels`,`scaleX`,`scaleY`,`radialSize`,`defaultLabels`,`overlappingXLabels`])t(i,e);Object.defineProperty(e,`layout`,{value:i,writable:!1,enumerable:!1,configurable:!0});let a={};for(let e of[`domCache`,`dimensionCache`,`cachedSelectors`,`textRectsCache`,`pointsArray`,`dataLabelsRects`,`lastDrawnDataLabelsIndexes`,`delayedElements`,`resizeTimer`,`selectionResizeTimer`,`resizeObserver`])t(a,e);Object.defineProperty(e,`cache`,{value:a,writable:!1,enumerable:!1,configurable:!0})}globalVars(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0,batched:!1},LINE_HEIGHT_RATIO:Vu,axisCharts:!0,isSlopeChart:e.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,streamScrolled:!1,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:Hu,niceScaleDefaultTicks:Uu,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(e){let t=[],n=null;Object.defineProperty(e,`initialSeries`,{configurable:!0,enumerable:!0,get(){return n===null&&(n=q.clone(t)),n},set(r){t=q.copySeriesShallow(r),n=null,e._initialSeriesPeek=t}}),e._initialSeriesPeek=t}init(e){let t=this.globalVars(e);this.initGlobalVars(t),this.defineLazyInitialSeries(t);let n=q.extend({},e);return n.series=q.copySeriesShallow(e.series),t.initialConfig=n,t.initialSeries=e.series,t.lastXAxis=q.clone(t.initialConfig.xaxis),t.lastYAxis=q.clone(t.initialConfig.yaxis),t}},Gu=class{constructor(e){this.opts=e}init(){let e=new Bu(this.opts).init({responsiveOverride:!1}),t=new Wu().init(e),n={config:e,globals:t,dom:{},interact:{zoomEnabled:e.chart.toolbar.autoSelected===`zoom`&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected===`pan`&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected===`selection`&&e.chart.toolbar.tools.selection,measureEnabled:e.chart.toolbar.autoSelected===`measure`&&!!e.chart.toolbar.tools.measure&&!!(e.chart.measure&&e.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:G.isBrowser()?`ontouchstart`in window||navigator.maxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinSummary:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:``,capped:!1},waterfallData:{values:[],cumulative:[],kinds:[],geometry:null},dumbbellData:null,streamgraphData:null,labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[],unitData:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(t,`dom`,{get(){return n.dom},set(e){n.dom=e},enumerable:!1,configurable:!0});for(let e of[`xLabelFormatter`,`yLabelFormatters`,`xaxisTooltipFormatter`,`ttKeyFormatter`,`ttVal`,`ttZFormatter`,`legendFormatter`])Object.defineProperty(t,e,{get(){return n.formatters[e]},set(t){n.formatters[e]=t},enumerable:!1,configurable:!0});for(let e of[`zoomEnabled`,`panEnabled`,`selectionEnabled`,`zoomed`,`selection`,`visibleXRange`,`selectedDataPoints`,`mousedown`,`clientX`,`clientY`,`lastClientPosition`,`capturedSeriesIndex`,`capturedDataPointIndex`,`disableZoomIn`,`disableZoomOut`,`isTouchDevice`])Object.defineProperty(t,e,{get(){return n.interact[e]},set(t){n.interact[e]=t},enumerable:!1,configurable:!0});for(let e of[`gridHeight`,`gridWidth`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`rotateXLabels`,`xAxisHeight`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yLabelsCoords`,`yTitleCoords`,`gridPad`])Object.defineProperty(t,e,{get(){return n.layout[e]},set(t){n.layout[e]=t},enumerable:!1,configurable:!0});for(let e of[`series`,`seriesNames`,`seriesX`,`seriesZ`,`seriesColors`,`seriesGoals`,`stackedSeriesTotals`,`stackedSeriesTotalsByGroups`])Object.defineProperty(t,e,{get(){return n.seriesData[e]},set(t){n.seriesData[e]=t},enumerable:!1,configurable:!0});for(let e of[`isXNumeric`,`dataFormatXNumeric`,`isDataXYZ`,`isRangeData`,`isRangeBar`,`isMultiLineX`,`noLabelsProvided`,`dataWasParsed`])Object.defineProperty(t,e,{get(){return n.axisFlags[e]},set(t){n.axisFlags[e]=t},enumerable:!1,configurable:!0});for(let e of[`labels`,`categoryLabels`,`timescaleLabels`,`hasXaxisGroups`,`groups`,`seriesGroups`])Object.defineProperty(t,e,{get(){return n.labelData[e]},set(t){n.labelData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesRangeStart`,`seriesRangeEnd`,`seriesRange`])Object.defineProperty(t,e,{get(){return n.rangeData[e]},set(t){n.rangeData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesCandleO`,`seriesCandleH`,`seriesCandleM`,`seriesCandleL`,`seriesCandleC`])Object.defineProperty(t,e,{get(){return n.candleData[e]},set(t){n.candleData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesViolinDensity`,`seriesViolinPoints`,`seriesViolinMin`,`seriesViolinMax`])Object.defineProperty(t,e,{get(){return n.violinData[e]},set(t){n.violinData[e]=t},enumerable:!1,configurable:!0});return n}},Ku=class{constructor(e){this.w=e}static checkComboSeries(e,t){let n=!1,r=0,i=0;return t===void 0&&(t=`line`),e.length&&e[0].type!==void 0&&e.forEach(e=>{(e.type===`bar`||e.type===`column`||e.type===`candlestick`||e.type===`boxPlot`||e.type===`violin`)&&r++,e.type!==void 0&&e.type!==t&&i++}),i>0&&(n=!0),{comboBarCount:r,comboCharts:n}}getStackedSeriesTotals(e=[]){let t=this.w,n=[];if(t.seriesData.series.length===0)return n;for(let r=0;r<t.seriesData.series[t.globals.maxValsInArrayIndex].length;r++){let i=0;for(let n=0;n<t.seriesData.series.length;n++)t.seriesData.series[n][r]!==void 0&&e.indexOf(n)===-1&&(i+=t.seriesData.series[n][r]);n.push(i)}return n}getSeriesTotalByIndex(e=null){if(e===null)return this.w.config.series.reduce((e,t)=>e+t,0);{let t=this.w.seriesData.series[e];return Array.isArray(t)?t.reduce((e,t)=>e+t,0):t??0}}getStackedSeriesTotalsByGroups(){let e=this.w,t=[];return e.labelData.seriesGroups.forEach(n=>{let r=[];e.config.series.forEach((t,i)=>{n.indexOf(e.seriesData.seriesNames[i])>-1&&r.push(i)});let i=e.seriesData.series.map((e,t)=>r.indexOf(t)===-1?t:-1).filter(e=>e!==-1);t.push(this.getStackedSeriesTotals(i))}),t}setSeriesYAxisMappings(){let e=this.w.globals,t=this.w.config,n=[],r=[],i=[],a=this.w.seriesData.series.length>t.yaxis.length||t.yaxis.some(e=>Array.isArray(e.seriesName));t.series.forEach((e,t)=>{i.push(t),r.push(null)}),t.yaxis.forEach((e,t)=>{n[t]=[]});let o=[];t.yaxis.forEach((e,r)=>{let s=!1;if(e.seriesName){let o=[];Array.isArray(e.seriesName)?o=e.seriesName:o.push(e.seriesName),o.forEach(e=>{t.series.forEach((t,o)=>{if(t.name===e){let e=o;r===o||a?!a||i.indexOf(o)>-1?n[r].push([r,o]):console.warn(`Series '`+t.name+`' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes.`):(n[o].push([o,r]),e=r),s=!0,e=i.indexOf(e),e!==-1&&i.splice(e,1)}})})}s||o.push(r)}),n=n.map(e=>{let t=[];return e.forEach(e=>{r[e[1]]=e[0],t.push(e[1])}),t});let s=t.yaxis.length-1;for(let e=0;e<o.length&&(s=o[e],n[s]=[],i);e++){let e=i[0];i.shift(),n[s].push(e),r[e]=s}i.forEach(e=>{n[s].push(e),r[e]=s}),e.seriesYAxisMap=n.map(e=>e),e.seriesYAxisReverseMap=r.map(e=>e),e.seriesYAxisMap.forEach((e,n)=>{e.forEach(e=>{if(t.series[e]&&t.series[e].group===void 0){let r=t.series[e];r.group=`apexcharts-axis-${n.toString()}`}})})}isSeriesNull(e=null){let t=[],n=this.w.config.series;return t=e===null?n.filter(e=>e!==null):n[e]&&Array.isArray(n[e].data)?n[e].data.filter(e=>e!==null):n[e]!==null&&n[e]!==void 0?[n[e]]:[],t.length===0}seriesHaveSameValues(e){let t=this.w.seriesData.series[e];return Array.isArray(t)?t.every((e,t,n)=>e===n[0]):!0}getCategoryLabels(e){let t=this.w,n=e.slice();return t.config.xaxis.convertedCatToNumeric&&(n=e.map(e=>t.config.xaxis.labels.formatter(e-t.globals.minX+1))),n}getLargestSeries(){let e=this.w;e.globals.maxValsInArrayIndex=e.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,e.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){let e=this.w,t=0;return e.globals.markers.size.forEach(e=>{t=Math.max(t,e)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(e=>{t=Math.max(t,e.size)}),t>0&&(e.config.markers.hover.size>0?t=e.config.markers.hover.size:t+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=t,t}getSeriesTotals(){let e=this.w;e.globals.seriesTotals=e.seriesData.series.map(e=>{let t=0;if(Array.isArray(e))for(let n=0;n<e.length;n++)t+=e[n];else t+=e;return t})}getSeriesTotalsXRange(e,t){let n=this.w;return n.seriesData.series.map((r,i)=>{let a=0;for(let o=0;o<r.length;o++)n.seriesData.seriesX[i][o]>e&&n.seriesData.seriesX[i][o]<t&&(a+=r[o]);return a})}getPercentSeries(){let e=this.w;e.globals.seriesPercent=e.seriesData.series.map(t=>{let n=[];if(Array.isArray(t))for(let r=0;r<t.length;r++){let i=e.seriesData.stackedSeriesTotals[r],a=0;i&&(a=100*t[r]/i),n.push(a)}else{let r=e.globals.seriesTotals.reduce((e,t)=>e+t,0),i=100*t/r;n.push(i)}return n})}getCalculatedRatios(){let e=this.w,t=e.globals,n=[],r=0,i=0,a=0,o=0,s=[],c=.1,l=0;if(t.yRange=[],t.isMultipleYAxis)for(let e=0;e<t.minYArr.length;e++)t.yRange.push(Math.abs(t.minYArr[e]-t.maxYArr[e])),s.push(0);else t.yRange.push(Math.abs(t.minY-t.maxY));t.xRange=Math.abs(t.maxX-t.minX),t.zRange=Math.abs(t.maxZ-t.minZ);for(let e=0;e<t.yRange.length;e++)n.push(t.yRange[e]/this.w.layout.gridHeight);if(i=t.xRange/this.w.layout.gridWidth,r=t.yRange/this.w.layout.gridWidth,a=t.xRange/this.w.layout.gridHeight,o=t.zRange/this.w.layout.gridHeight*16,o||=1,t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0){let e=t;e.hasNegs=!0}if(e.globals.seriesYAxisReverseMap.length>0){let a=(t,r)=>{let i=e.config.yaxis[e.globals.seriesYAxisReverseMap[r]];if(!i||i.logarithmic)return 0;let a=t<0?-1:1;return t=Math.abs(t),-a*t/n[r]};if(t.isMultipleYAxis){s=[];for(let e=0;e<n.length;e++)s.push(a(t.minYArr[e],e))}else s=[],s.push(a(t.minY,0)),t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(c=-t.minY/r,l=t.minX/i)}else s=[],s.push(0),c=0,l=0;return{yRatio:n,invertedYRatio:r,zRatio:o,xRatio:i,invertedXRatio:a,baseLineInvertedY:c,baseLineY:s,baseLineX:l}}getLogSeries(e){let t=this.w;return t.globals.seriesLog=e.map((e,n)=>{let r=t.globals.seriesYAxisReverseMap[n];return t.config.yaxis[r]&&t.config.yaxis[r].logarithmic?e.map(e=>e===null?null:this.getLogVal(t.config.yaxis[r].logBase,e,n)):e}),t.globals.invalidLogScale?e:t.globals.seriesLog}getLogValAtSeriesIndex(e,t){if(e===null)return null;let n=this.w,r=n.globals.seriesYAxisReverseMap[t];return n.config.yaxis[r]&&n.config.yaxis[r].logarithmic?this.getLogVal(n.config.yaxis[r].logBase,e,t):e}getBaseLog(e,t){return Math.log(t)/Math.log(e)}getLogVal(e,t,n){if(t<=0)return 0;let r=this.w,i=r.globals.minYArr[n]===0?-1:this.getBaseLog(e,r.globals.minYArr[n]),a=(r.globals.maxYArr[n]===0?0:this.getBaseLog(e,r.globals.maxYArr[n]))-i;return(this.getBaseLog(e,t)-i)/a}getLogYRatios(e){let t=this.w,n=this.w.globals,r=n;return r.yLogRatio=e.slice(),r.logYRange=n.yRange.map((e,i)=>{let a=t.globals.seriesYAxisReverseMap[i];return t.config.yaxis[a]&&this.w.config.yaxis[a].logarithmic?(r.yLogRatio[i]=1/this.w.layout.gridHeight,1):n.yRange[i]}),r.invalidLogScale?e.slice():r.yLogRatio}static extendArrayProps(e,t,n){return t?.yaxis&&(t=e.extendYAxis(t,n)),t?.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t?.annotations?.xaxis&&(t=e.extendXAxisAnnotations(t)),t?.annotations?.points&&(t=e.extendPointAnnotations(t))),t}drawSeriesByGroup(e,t,n,r){let i=this.w,a=[];return e.series.length>0&&t.forEach(t=>{let o=[],s=[];e.i.forEach((n,r)=>{i.config.series[n].group===t&&(o.push(e.series[r]),s.push(n))}),o.length>0&&a.push(r.draw(o,n,s))}),a}},qu=`http://www.w3.org/2000/svg`,Ju=class e{constructor(e,t){typeof e==`object`?(this.x=e.x,this.y=e.y):(this.x=e||0,this.y=t||0)}transform(e){return e.apply(this)}clone(){return new e(this.x,this.y)}},Yu=class e{constructor(e,t,n,r,i,a){this.a=e??1,this.b=t??0,this.c=n??0,this.d=r??1,this.e=i??0,this.f=a??0}rotate(t){let n=t*Math.PI/180,r=Math.cos(n),i=Math.sin(n);return this.multiply(new e(r,i,-i,r,0,0))}scale(t,n){return this.multiply(new e(t,0,0,n??t,0,0))}multiply(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}apply(e){return new Ju(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)}},Xu=class{constructor(e,t,n,r){this.x=e,this.y=t,this.w=n,this.h=r,this.width=n,this.height=r,this.x2=e+n,this.y2=t+r}};function Zu(e){if(!e||typeof e!=`string`)return[[`M`,0,0]];let t=[],n=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,r=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,i,a=[],o=[];for(;(i=n.exec(e))!==null;)a.push(i[1]),o.push(i.index);for(let n=0;n<a.length;n++){let i=o[n]+a[n].length,s=n+1<o.length?o[n+1]:e.length,c=e.substring(i,s),l=[],u;for(r.lastIndex=0;(u=r.exec(c))!==null;)l.push(parseFloat(u[0]));let d=a[n].toUpperCase();if(d===`Z`)t.push([`Z`]);else if(d===`M`||d===`L`||d===`T`)for(let e=0;e<l.length;e+=2)t.push([d,l[e],l[e+1]]);else if(d===`H`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`V`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`C`)for(let e=0;e<l.length;e+=6)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5]]);else if(d===`S`||d===`Q`)for(let e=0;e<l.length;e+=4)t.push([d,l[e],l[e+1],l[e+2],l[e+3]]);else if(d===`A`)for(let e=0;e<l.length;e+=7)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5],l[e+6]])}return t.length===0&&t.push([`M`,0,0]),t}function Qu(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;return e.forEach(e=>{for(let a=1;a<e.length;a+=2)if(a+1<=e.length){let o=e[a],s=e[a+1];typeof o==`number`&&typeof s==`number`&&(o<t&&(t=o),o>r&&(r=o),s<n&&(n=s),s>i&&(i=s))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:n,width:r-t,height:i-n}}function $u(e){return e.map(e=>e.join(` `)).join(` `)}function ed(e){switch(e[0]){case`z`:case`Z`:e[0]=`L`,e[1]=this.start[0],e[2]=this.start[1];break;case`H`:e[0]=`L`,e[2]=this.pos[1];break;case`V`:e[0]=`L`,e[2]=e[1],e[1]=this.pos[0];break;case`T`:e[0]=`Q`,e[3]=e[1],e[4]=e[2],e[1]=this.reflection[1],e[2]=this.reflection[0];break;case`S`:e[0]=`C`,e[6]=e[4],e[5]=e[3],e[4]=e[2],e[3]=e[1],e[2]=this.reflection[1],e[1]=this.reflection[0];break}return e}function td(e){var t=e.length;return this.pos=[e[t-2],e[t-1]],`SCQT`.indexOf(e[0])!=-1&&(this.reflection=[2*this.pos[0]-e[t-4],2*this.pos[1]-e[t-3]]),e}function nd(e){var t=[e];switch(e[0]){case`M`:return this.pos=this.start=[e[1],e[2]],t;case`L`:e[5]=e[3]=e[1],e[6]=e[4]=e[2],e[1]=this.pos[0],e[2]=this.pos[1];break;case`Q`:e[6]=e[4],e[5]=e[3],e[4]=e[4]*1/3+e[2]*2/3,e[3]=e[3]*1/3+e[1]*2/3,e[2]=this.pos[1]*1/3+e[2]*2/3,e[1]=this.pos[0]*1/3+e[1]*2/3;break;case`A`:t=id(this.pos??[],e),e=t[0];break}return e[0]=`C`,this.pos=[e[5],e[6]],this.reflection=[2*e[5]-e[3],2*e[6]-e[4]],t}function rd(e,t){if(t===!1)return!1;for(var n=t,r=e.length;n<r;++n)if(e[n][0]==`M`)return n;return!1}function id(e,t){var n=Math.abs(t[1]),r=Math.abs(t[2]),i=t[3]%360,a=t[4],o=t[5],s=t[6],c=t[7],l=new Ju(e[0],e[1]),u=new Ju(s,c),d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,ee,te=[],M,N,ne,re;if(n===0||r===0||l.x===u.x&&l.y===u.y)return[[`C`,l.x,l.y,u.x,u.y,u.x,u.y]];for(d=new Ju((l.x-u.x)/2,(l.y-u.y)/2).transform(new Yu().rotate(i)),f=d.x*d.x/(n*n)+d.y*d.y/(r*r),f>1&&(f=Math.sqrt(f),n=f*n,r=f*r),p=new Yu().rotate(i).scale(1/n,1/r).rotate(-i),l=l.transform(p),u=u.transform(p),m=[u.x-l.x,u.y-l.y],g=m[0]*m[0]+m[1]*m[1],h=Math.sqrt(g),m[0]/=h,m[1]/=h,_=g<4?Math.sqrt(1-g/4):0,a===o&&(_*=-1),v=new Ju((u.x+l.x)/2+_*-m[1],(u.y+l.y)/2+_*m[0]),y=new Ju(l.x-v.x,l.y-v.y),b=new Ju(u.x-v.x,u.y-v.y),x=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(x*=-1),S=Math.acos(b.x/Math.sqrt(b.x*b.x+b.y*b.y)),b.y<0&&(S*=-1),o&&x>S&&(S+=2*Math.PI),!o&&x<S&&(S-=2*Math.PI),w=Math.ceil(Math.abs(x-S)*2/Math.PI),E=[],D=x,C=(S-x)/w,T=4*Math.tan(C/4)/3,j=0;j<=w;j++)k=Math.cos(D),O=Math.sin(D),A=new Ju(v.x+k,v.y+O),E[j]=[new Ju(A.x+T*O,A.y-T*k),A,new Ju(A.x-T*O,A.y+T*k)],D+=C;for(E[0][0]=E[0][1].clone(),E[E.length-1][2]=E[E.length-1][1].clone(),p=new Yu().rotate(i).scale(n,r).rotate(-i),j=0,ee=E.length;j<ee;j++)E[j][0]=E[j][0].transform(p),E[j][1]=E[j][1].transform(p),E[j][2]=E[j][2].transform(p);for(j=1,ee=E.length;j<ee;j++)A=E[j-1][2],M=A.x,N=A.y,A=E[j][0],ne=A.x,re=A.y,A=E[j][1],s=A.x,c=A.y,te.push([`C`,M,N,ne,re,s,c]);return te}function ad(e,t,n,r,i,a){for(var o=e.slice(t,n||void 0),s=r.slice(i,a||void 0),c=0,l={pos:[0,0],start:[0,0]},u={pos:[0,0],start:[0,0]};o[c]=ed.call(l,o[c]),s[c]=ed.call(u,s[c]),o[c][0]!=s[c][0]||o[c][0]==`M`||o[c][0]==`A`&&(o[c][4]!=s[c][4]||o[c][5]!=s[c][5])?(Array.prototype.splice.apply(o,[c,1].concat(nd.call(l,o[c]))),Array.prototype.splice.apply(s,[c,1].concat(nd.call(u,s[c])))):(o[c]=td.call(l,o[c]),s[c]=td.call(u,s[c])),!(++c==o.length&&c==s.length);)c==o.length&&o.push([`C`,l.pos[0],l.pos[1],l.pos[0],l.pos[1],l.pos[0],l.pos[1]]),c==s.length&&s.push([`C`,u.pos[0],u.pos[1],u.pos[0],u.pos[1],u.pos[0],u.pos[1]]);return{start:o,dest:s}}function od(e,t){for(var n=Zu(e),r=Zu(t),i=0,a=0,o=!1,s=!1,c;!(i===!1&&a===!1);){if(o=rd(n,i===!1?!1:i+1),s=rd(r,a===!1?!1:a+1),i===!1){let e=Qu(c.start);i=e.height==0||e.width==0?n.push(n[0])-1:n.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}if(a===!1){let e=Qu(c.dest);a=e.height==0||e.width==0?r.push(r[0])-1:r.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}c=ad(n,i,o,r,a,s),n=n.slice(0,i).concat(c.start,o===!1?[]:n.slice(o)),r=r.slice(0,a).concat(c.dest,s===!1?[]:r.slice(s)),i=o===!1?!1:i+c.start.length,a=s===!1?!1:a+c.dest.length}return{start:n,dest:r}}function sd(e,t){var n=od(e,t),r=n.start,i=n.dest;return function(e){return $u(r.map(function(t,n){return i[n].map(function(r,a){return a===0?r:t[a]+(i[n][a]-t[a])*e})}))}}var cd=null,ld=null;function ud(e,t){let n=Array(t);if(!G.isBrowser()){let r=Qu(Zu(e)),i=r.x+r.width/2,a=r.y+r.height/2;for(let e=0;e<t;e++)n[e]={x:i,y:a};return n}cd||(cd=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),cd.setAttribute(`width`,`0`),cd.setAttribute(`height`,`0`),cd.setAttribute(`style`,`position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;`),ld=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),cd.appendChild(ld),document.body.appendChild(cd)),ld.setAttribute(`d`,e||`M0 0`);let r=0;try{r=ld.getTotalLength()}catch{r=0}if(!r||!isFinite(r)){let r=Qu(Zu(e)),i=r.x+r.width/2,a=r.y+r.height/2;for(let e=0;e<t;e++)n[e]={x:i,y:a};return n}for(let e=0;e<t;e++)try{let i=ld.getPointAtLength(e/t*r);n[e]={x:i.x,y:i.y}}catch{n[e]={x:0,y:0}}return n}function dd(e,t,n=96){let r=ud(e,n),i=ud(t,n),a=0,o=1/0;for(let e=0;e<n;e++){let t=0;for(let a=0;a<n;a++){let s=r[(a+e)%n],c=i[a],l=s.x-c.x,u=s.y-c.y;if(t+=l*l+u*u,t>=o)break}t<o&&(o=t,a=e)}let s=Array(n);for(let e=0;e<n;e++)s[e]=r[(e+a)%n];return function(e){let t=``;for(let r=0;r<n;r++){let n=s[r],a=i[r],o=n.x+(a.x-n.x)*e,c=n.y+(a.y-n.y)*e;t+=(r===0?`M`:`L`)+o.toFixed(3)+` `+c.toFixed(3)+` `}return t+`Z`}}function fd(e){return-Math.cos(e*Math.PI)/2+.5}var pd=fd;function md(e){pd=typeof e==`function`?e:fd}function hd(e){if(!e||typeof e!=`string`)return null;if(e[0]===`#`){let t=e.slice(1);t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255,1]}let t=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]===void 0?1:+t[4]]:null}function gd(e,t,n){return`rgba(${Math.round(e[0]+(t[0]-e[0])*n)},${Math.round(e[1]+(t[1]-e[1])*n)},${Math.round(e[2]+(t[2]-e[2])*n)},${e[3]+(t[3]-e[3])*n})`}var _d=class e{constructor(e,t,n){this.el=e,this.duration=t??300,this.delay=n||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm=`commands`,this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(e){return typeof e==`function`&&(this._easing=e),this._schedule(),this}attr(e){return this._attrTarget=e,this._schedule(),this}plot(e,t,n){return this._plotTarget=e,t&&(this._plotAlgorithm=t),this._plotSnap=n||null,this._schedule(),this}after(e){return this._afterCb=e,this._schedule(),this}during(e){return this._duringCb=e,this._schedule(),this}animate(t,n){let r=new e(this.el,t,n);return this._next=r,r._root=this._root||this,r}_schedule(){let e=this._root||this;e._scheduled||(e._scheduled=!0,queueMicrotask(()=>e._executeChain()))}_executeChain(){let e=[],t=this;for(;t;)e.push(t),t=t._next;let n=0;e.forEach(e=>{n+=e.delay,e._execute(n),n+=e.duration})}_execute(e){let t=this.el,n=this.duration;if(n<=1){let n=()=>{this._attrTarget&&t.attr(this._attrTarget),this._plotTarget&&t.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(t)};e>0?setTimeout(n,e):n();return}let r=()=>{let e={},r={},i={};if(this._attrTarget)for(let n of Object.keys(this._attrTarget)){let a=t.attr(n);e[n]=a;let o=hd(a),s=hd(String(this._attrTarget[n]));o&&s&&(r[n]=o,i[n]=s)}let a=null;if(this._plotTarget){let e=t.attr(`d`)||``;try{a=this._plotAlgorithm===`polygons`?dd(e,this._plotTarget):sd(e,this._plotTarget)}catch{a=null}}let o=performance.now(),s=this._easing||pd,c=l=>{let u=l-o,d=Math.min(u/n,1),f=s(d);if(this._attrTarget)if(d>=1)t.attr(this._attrTarget);else{let n={};for(let t of Object.keys(this._attrTarget))if(r[t]&&i[t])n[t]=gd(r[t],i[t],f);else{let r=parseFloat(e[t]),i=parseFloat(this._attrTarget[t]);!isNaN(r)&&!isNaN(i)&&(n[t]=r+(i-r)*f)}t.attr(n)}a&&d<1&&t.attr(`d`,a(f)),this._duringCb&&this._duringCb(f),d<1?K.requestAnimationFrame(c):(this._plotTarget&&t.attr(`d`,this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(t))};K.requestAnimationFrame(c)};e>0?setTimeout(r,e):r()}};function vd(e){e.prototype.animate=function(e,t){return new _d(this,e,t)}}function yd(e){return-Math.cos(e*Math.PI)/2+.5}function bd(e,t,n,r){e=Math.min(Math.max(e,0),1),n=Math.min(Math.max(n,0),1);let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c,u=e=>((o*e+a)*e+i)*e,d=e=>((l*e+c)*e+s)*e,f=e=>{let t=0,n=1,r=e;if(r<t)return t;if(r>n)return n;for(;t<n;){let i=u(r);if(Math.abs(i-e)<1e-4)return r;e>i?t=r:n=r,r=(t+n)/2}return r};return e=>e<=0?0:e>=1?1:d(f(e))}var xd=new Map;xd.set(`linear`,e=>e),xd.set(`easeInOutSine`,yd),xd.set(`easeInSine`,e=>1-Math.cos(e*Math.PI/2)),xd.set(`easeOutSine`,e=>Math.sin(e*Math.PI/2)),xd.set(`easeInQuad`,e=>e*e),xd.set(`easeOutQuad`,e=>1-(1-e)*(1-e)),xd.set(`easeInOutQuad`,e=>e<.5?2*e*e:1-(-2*e+2)**2/2),xd.set(`easeInCubic`,e=>e*e*e),xd.set(`easeOutCubic`,e=>1-(1-e)**3),xd.set(`easeInOutCubic`,e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2),xd.set(`easeOutBack`,e=>{let t=1.70158;return 1+(t+1)*(e-1)**3+t*(e-1)**2}),xd.set(`easeInOutBack`,e=>{let t=1.70158*1.525;return e<.5?(2*e)**2*((t+1)*2*e-t)/2:((2*e-2)**2*((t+1)*(e*2-2)+t)+2)/2});function Sd(e,t){typeof e==`string`&&e&&typeof t==`function`&&xd.set(e,t)}function Cd(e){return Array.isArray(e)&&e.length===4&&e.every(e=>typeof e==`number`)}function wd(e){return typeof e==`function`?Td(e):Cd(e)?bd(e[0],e[1],e[2],e[3]):typeof e==`string`&&xd.has(e)?Td(xd.get(e)):yd}function Td(e){return t=>{let n=e(t);return typeof n==`number`&&isFinite(n)?n:t}}var Ed=`http://www.w3.org/2000/svg`;function Dd(e){return 1-(1-e)**3}function Od(e){let t=1.70158;return 1+(t+1)*(e-1)**3+t*(e-1)**2}var kd=null;function Ad(){if(!G.isBrowser())return!1;try{return kd||=window.matchMedia(`(prefers-reduced-motion: reduce)`),!!kd.matches}catch{return!1}}function jd(e,t,n){if(!G.isBrowser()||n.globals.dataChanged||n.globals.resized)return!1;let r=n.config.chart.animations;if(!r||r.enabled===!1)return!1;let i=n.config.chart.type;if(i!==`line`&&i!==`area`&&i!==`rangeArea`||!(n.layout.gridWidth>0))return!1;let a=(r.speed||800)*2,o=Math.max(0,Math.min(1,t/n.layout.gridWidth)),s=(1-Math.cbrt(1-o))*a,c=e.node.style;c.opacity=`0`;let l=null,u=e=>{l===null&&(l=e),e-l>=s?c.opacity=``:K.requestAnimationFrame(u)};return K.requestAnimationFrame(u),!0}function Md(e){let t=e.config.chart.animations;t&&(t.respectReducedMotion!==!1&&Ad()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1)),md(wd(t.easing)))}function Nd(e){let t=e.style,n=e.index||0,r=typeof e.baseDelay==`number`?e.baseDelay:40,i=e.row||0,a=e.col||0,o=e.groupIndex||0,s=e.perGroup||1,c=e.centerDistance||0;switch(t){case`none`:return 0;case`diagonal`:return(i+a)*r;case`group`:return o*r+n%s*(r/4);case`centroid`:return c*r*(n+1);case`sequential`:default:return n*r}}var Pd=class{constructor(e,t){this.w=e,this.ctx=t}animateLine(e,t,n,r){e.attr(t).animate(r).attr(n)}animateMarker(e,t,n,r){e.attr({opacity:0}).animate(t).attr({opacity:1}).after(()=>{r()})}animatePop(e,{speed:t,delay:n=0,onComplete:r}){let i=this.w;if(!G.isBrowser()||!i.globals.shouldAnimate||t<1){r&&r();return}let a=e.node.style;a.transformBox=`fill-box`,a.transformOrigin=`center`,a.transform=`scale(0)`,a.opacity=`0`;let o=performance.now()+n,s=e=>{if(i.globals.isDestroyed)return;let n=Math.max(0,Math.min(1,(e-o)/t));a.transform=`scale(${Od(n)})`,a.opacity=String(Math.min(1,n*2)),n<1?K.requestAnimationFrame(s):(a.transform=``,a.transformOrigin=``,a.transformBox=``,a.opacity=``,r&&r())};K.requestAnimationFrame(s)}animateRect(e,t,n,r,i,a=0){e.attr(t).animate(r,a).attr(n).after(()=>i())}animatePathsGradually(e){let{el:t,realIndex:n,j:r,fill:i,pathFrom:a,pathTo:o,pathToInterp:s,speed:c,delay:l,scrollMorph:u}=e,d=this,f=this.w,p=0;f.config.chart.animations.animateGradually.enabled&&(p=f.config.chart.animations.animateGradually.delay),f.config.chart.animations.dynamicAnimation.enabled&&f.globals.dataChanged&&f.config.chart.type!==`bar`&&(p=0),d.morphSVG(t,n,r,f.config.chart.type===`line`&&!f.globals.comboCharts?`stroke`:i,a,o,c,l*p,u,s)}revealBulk(e){let t=this.w;if(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node}),!G.isBrowser()||!t.globals.shouldAnimate){this.animationCompleted(e);return}t.globals.bulkRevealScheduled||(t.globals.bulkRevealScheduled=!0,K.requestAnimationFrame(()=>{t.globals.isDestroyed||(t.globals.bulkRevealScheduled=!1,this.animationCompleted(e))}))}showDelayedElements(){this.w.globals.delayedElements.forEach(e=>{if(e.holdUntilComplete&&!this.w.globals.animationEnded)return;let t=e.el;t.classList.remove(`apexcharts-element-hidden`),t.classList.add(`apexcharts-hidden-element-shown`)})}animationCompleted(e){let t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd==`function`&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}animateDraw(e,{realIndex:t,j:n,isFill:r,isLast:i,speed:a,delay:o,mask:s}){let c=this.w,l=this,u=()=>{i&&c.globals.shouldAnimate&&l.animationCompleted(e),l.showDelayedElements()};if(!G.isBrowser()||!c.globals.shouldAnimate||a<1){u();return}let d=e.node,f=()=>{let e=s&&s.type===`radial`,i=c.layout.gridWidth+8,l=s&&s.cx||0,f=s&&s.cy||0,p=(s&&s.r||c.layout.gridWidth/2)+4,m=`apexDrawMask${c.globals.cuid}-${t}-${n??0}-${r?`f`:`s`}`,h=K.createElementNS(Ed,`mask`);h.setAttribute(`id`,m),h.setAttribute(`maskUnits`,`userSpaceOnUse`);let g;if(e){let e=p;h.setAttribute(`x`,String(l-e)),h.setAttribute(`y`,String(f-e)),h.setAttribute(`width`,String(e*2)),h.setAttribute(`height`,String(e*2)),g=K.createElementNS(Ed,`circle`),g.setAttribute(`cx`,String(l)),g.setAttribute(`cy`,String(f)),g.setAttribute(`r`,`0`),g.setAttribute(`fill`,`#fff`)}else h.setAttribute(`x`,`-4`),h.setAttribute(`y`,`-4`),h.setAttribute(`width`,String(i)),h.setAttribute(`height`,String(c.layout.gridHeight+8)),g=K.createElementNS(Ed,`rect`),g.setAttribute(`x`,`-4`),g.setAttribute(`y`,`-4`),g.setAttribute(`width`,`0`),g.setAttribute(`height`,String(c.layout.gridHeight+8)),g.setAttribute(`fill`,`#fff`);h.appendChild(g),c.dom.elDefs.node.appendChild(h),d.setAttribute(`mask`,`url(#${m})`);let _=performance.now()+(o||0),v=t=>{if(c.globals.isDestroyed)return;let n=Math.max(0,Math.min(1,(t-_)/a)),r=Dd(n);e?g.setAttribute(`r`,String(r*p)):g.setAttribute(`width`,String(r*i)),n<1?K.requestAnimationFrame(v):(d.removeAttribute(`mask`),h.parentNode&&h.parentNode.removeChild(h),u())};K.requestAnimationFrame(v)},p=e=>{d.setAttribute(`stroke-dasharray`,String(e)),d.setAttribute(`stroke-dashoffset`,String(e));let t=performance.now()+(o||0),n=r=>{if(c.globals.isDestroyed)return;let i=Math.max(0,Math.min(1,(r-t)/a));d.setAttribute(`stroke-dashoffset`,String(e*(1-Dd(i)))),i<1?K.requestAnimationFrame(n):(d.removeAttribute(`stroke-dasharray`),d.removeAttribute(`stroke-dashoffset`),u())};K.requestAnimationFrame(n)};K.requestAnimationFrame(()=>{if(c.globals.isDestroyed)return;if(r){f();return}let e=d.getAttribute(`stroke-dasharray`);if(e&&e!==`0`&&e!==``){f();return}let t=0;try{typeof d.getTotalLength==`function`&&(t=d.getTotalLength())}catch{t=0}if(!t){u();return}p(t)})}morphSVG(e,t,n,r,i,a,o,s,c,l){let u=this.w;i||=e.attr(`pathFrom`),a||=e.attr(`pathTo`);let d=()=>(u.config.chart.type===`radar`&&(o=1),`M 0 ${u.layout.gridHeight}`);(!i||i.indexOf(`undefined`)>-1||i.indexOf(`NaN`)>-1)&&(i=d()),(!a.trim()||a.indexOf(`undefined`)>-1||a.indexOf(`NaN`)>-1)&&(a=d(),l=void 0),l&&(!l.trim()||l.indexOf(`undefined`)>-1||l.indexOf(`NaN`)>-1)&&(l=void 0),u.globals.shouldAnimate||(o=1);let f=(this.ctx?.morphTypeChange)?.isActive()===!0?`polygons`:`commands`,p=null;if(u.globals.dataChanged){let e=u.config.chart.animations.dynamicAnimation.easing;e==null?c&&(p=wd(`linear`)):p=wd(e)}let m=e.plot(i).animate(o,s);p&&m.ease(p),m.plot(l||a,f,l?a:void 0).after(()=>{if(q.isNumber(n)){let t=u.seriesData.series[u.globals.maxValsInArrayIndex];t&&n===t.length-2&&u.globals.shouldAnimate&&this.animationCompleted(e)}else r!==`none`&&u.globals.shouldAnimate&&(!u.globals.comboCharts&&t===u.seriesData.series.length-1||u.globals.comboCharts)&&this.animationCompleted(e);this.showDelayedElements()})}},Fd={lighten:.15,darken:.35},Id=class e{constructor(e){this.w=e}static isSliceChart(e){let t=e.config.chart.type;return t===`pie`||t===`donut`||t===`polarArea`}static hoverOutlineOwnsHoverState(t){return e.isSliceChart(t)&&t.config.states.hover.filter.type!==`none`&&t.config.plotOptions.pie.hoverOutline?.show===!0}static sliceOffsetOwnsActiveState(t){return e.isSliceChart(t)&&t.config.chart.type!==`polarArea`&&t.config.plotOptions.pie.expandOnClick===!0&&t.config.plotOptions.pie.expandOffset>0&&!e.drilldownBlocksSliceOffset(t)}static drilldownBlocksSliceOffset(t){return e.isSliceChart(t)&&t.config.drilldown?.enabled===!0}getDefaultFilter(e,t){let n=this.w;e.unfilter&&e.unfilter(!0),n.config.chart.dropShadow.enabled&&this.dropShadow(e,n.config.chart.dropShadow,t)}applyFilter(e,t,n,r){var i;let a=this.w;if(e.unfilter&&e.unfilter(!0),n===`none`){this.getDefaultFilter(e,t);return}let o=a.config.chart.dropShadow,s=n===`lighten`?Fd.lighten:Fd.darken,c=Math.max(0,Math.min(1,typeof r==`number`?r:s)),l=1-c,u=n===`lighten`?c:0;e.filterWith&&(e.filterWith(e=>{e.colorMatrix({type:`matrix`,values:`
|
|
578
|
+
</div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div>${r[0]}: <span class="value">`+a+`</span></div><div>${r[1]}: <span class="value">`+o+`</span></div>`+(s?`<div>${r[2]}: <span class="value">`+s+`</span></div>`:``)+`<div>${r[3]}: <span class="value">`+c+`</span></div><div>${r[4]}: <span class="value">`+l+`</span></div></div>`}_getViolinTooltip(e,t,n){let r=e.violinData.seriesViolinMin[t]?.[n],i=e.violinData.seriesViolinMax[t]?.[n],a=e.violinData.seriesViolinPoints[t]?.[n]||[],o=e.config.series[t].name||`series-`+(t+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${o}</div><div>Min: <span class="value">${r}</span></div><div>Max: <span class="value">${i}</span></div><div>Observations: <span class="value">${a.length}</span></div></div>`}_getRaincloudTooltip(e,t,n){let r=e.violinData.seriesViolinSummary[t]?.[n];if(!r)return this._getViolinTooltip(e,t,n);let i=e.violinData.seriesViolinPoints[t]?.[n]||[],a=e.config.series[t].name||`series-`+(t+1),o=e=>{if(!isFinite(e))return String(e);let t=Math.round(e);return Math.abs(e-t)<1e-6?String(t):String(Number(e.toFixed(2)))},[s,c,l,u,d]=r;return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${a}</div><div>Whisker high: <span class="value">${o(d)}</span></div><div>Q3: <span class="value">${o(u)}</span></div><div>Median: <span class="value">${o(l)}</span></div><div>Q1: <span class="value">${o(c)}</span></div><div>Whisker low: <span class="value">${o(s)}</span></div><div>Observations: <span class="value">${i.length}</span></div></div>`}},Bu=class{constructor(e){this.opts=e}init({responsiveOverride:e}){let t=this.opts,n=new Ou,r=new zu(t);t=this.normalizeAliasedChartType(t),this.chartType=t.chart.type,t=this.extendYAxis(t),t=this.extendAnnotations(t);let i=n.init(),a={};if(t&&typeof t==`object`){let n=zu.forType(t);t.chart.brush?.enabled&&(n=r.brush(n)),t.plotOptions?.line?.isSlopeChart&&(n=r.slope()),t.chart.stacked&&t.chart.stackType===`100%`&&(t=r.stacked100(t)),t.plotOptions?.bar?.isDumbbell&&t.chart.requestedType!==`dumbbell`&&(t=r.dumbbellSizing(t)),this.checkForDarkTheme(G.getApex()),this.checkForDarkTheme(t),t.xaxis=t.xaxis||G.getApex().xaxis||{},e||(t.xaxis.convertedCatToNumeric=!1),t=this.checkForCatToNumericXAxis(this.chartType,n,t),(t.chart.sparkline?.enabled||G.getApex().chart?.sparkline?.enabled)&&(n=r.sparkline(n)),a=q.extend(i,n)}let o=q.extend(a,G.getApex());return i=q.extend(o,t),i=this.handleUserInputErrors(i),i}normalizeAliasedChartType(e){if(!e||!e.chart)return e;let t=e.chart.type;return!t||!ku[t]?e:(e.chart.requestedType=t,t===`waffle`?(e.plotOptions=e.plotOptions||{},e.plotOptions.unit=e.plotOptions.unit||{},e.plotOptions.unit.layout??(e.plotOptions.unit.layout=`grid`),e.plotOptions.unit.shape??(e.plotOptions.unit.shape=`square`),e.chart.type=`unit`):t===`funnel`||t===`pyramid`?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel=!0,e.plotOptions.bar.horizontal=!0,e.chart.type=`bar`,t===`pyramid`?e.plotOptions.bar.isPyramid=!0:e.plotOptions.bar.isPyramid=!1):t===`gauge`?e.chart.type=`radialBar`:t===`waterfall`?(e.chart.stacked=!1,e.chart.type=`rangeBar`):t===`dumbbell`?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isDumbbell=!0,e.plotOptions.bar.horizontal??(e.plotOptions.bar.horizontal=!0),e.chart.stacked=!1,e.chart.type=`rangeBar`):t===`streamgraph`?(e.chart.stacked=!1,e.yaxis=e.yaxis||{},!Array.isArray(e.yaxis)&&e.yaxis.show==null&&(e.yaxis.show=!1),e.chart.type=`rangeArea`):t===`histogram`?(e.xaxis=e.xaxis||{},e.xaxis.type??(e.xaxis.type=`numeric`),e.chart.type=`bar`):t===`raincloud`&&(e.chart.type=`violin`),e)}checkForCatToNumericXAxis(e,t,n){let r=new zu(n),i=(e===`bar`||e===`boxPlot`||e===`violin`)&&n.plotOptions?.bar?.horizontal,a=e===`pie`||e===`polarArea`||e===`donut`||e===`radar`||e===`radialBar`||e===`heatmap`||e===`unit`||e===`sunburst`,o=n.xaxis.type!==`datetime`&&n.xaxis.type!==`numeric`,s=(e===`scatter`||e===`bubble`)&&n.plotOptions?.scatter?.jitter?.enabled,c=n.xaxis.tickPlacement?n.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return!i&&!a&&!s&&o&&c!==`between`&&(n=r.convertCatToNumeric(n)),n}extendYAxis(e,t){let n=new Ou;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={});let r=G.getApex();e.yaxis.constructor!==Array&&r.yaxis&&r.yaxis.constructor!==Array&&(e.yaxis=q.extend(e.yaxis,r.yaxis)),e.yaxis.constructor===Array?e.yaxis=q.extendArray(e.yaxis,n.yAxis):e.yaxis=[q.extend(n.yAxis,e.yaxis)];let i=!1;e.yaxis.forEach(e=>{e.logarithmic&&(i=!0)});let a=e.series;return t&&!a&&(a=t.config.series),i&&a.length!==e.yaxis.length&&a.length&&(e.yaxis=a.map((t,r)=>{if(t.name||(a[r].name=`series-${r+1}`),e.yaxis[r])return e.yaxis[r].seriesName=a[r].name,e.yaxis[r];{let t=q.extend(n.yAxis,e.yaxis[0]);return t.show=!1,t}})),i&&a.length>1&&a.length!==e.yaxis.length&&console.warn(`A multi-series logarithmic chart should have equal number of series and y-axes`),e}extendAnnotations(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e),e}extendYAxisAnnotations(e){let t=new Ou;return e.annotations.yaxis=q.extendArray(e.annotations.yaxis===void 0?[]:e.annotations.yaxis,t.yAxisAnnotation),e}extendXAxisAnnotations(e){let t=new Ou;return e.annotations.xaxis=q.extendArray(e.annotations.xaxis===void 0?[]:e.annotations.xaxis,t.xAxisAnnotation),e}extendPointAnnotations(e){let t=new Ou;return e.annotations.points=q.extendArray(e.annotations.points===void 0?[]:e.annotations.points,t.pointAnnotation),e}checkForDarkTheme(e){e.theme&&e.theme.mode===`dark`&&(e.tooltip||={},e.tooltip.theme!==`light`&&(e.tooltip.theme=`dark`),e.chart.foreColor||(e.chart.foreColor=`#f6f7f8`),e.theme.palette||(e.theme.palette=`palette4`))}handleUserInputErrors(e){let t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw Error(`tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.`);if(t.chart.type===`bar`&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw Error(`Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false`);t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return(t.chart.type===`bar`||t.chart.type===`rangeBar`)&&t.tooltip.shared&&t.xaxis.crosshairs.width===`barWidth`&&t.series.length>1&&(t.xaxis.crosshairs.width=`tickWidth`),(t.chart.type===`candlestick`||t.chart.type===`boxPlot`)&&t.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${t.chart.type} chart is not supported.`),t.yaxis[0].reversed=!1),t}},Vu=1.618,Hu=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],Uu=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],Wu=class{initGlobalVars(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.maxValsInArrayIndex=0,e.yValueDecimal=0,e.allSeriesHasEqualX=!0,e.hasNullValues=!1,e.invalidLogScale=!1,e.seriesRangeName={},e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0,e.disableZoomIn=!1,e.disableZoomOut=!1,e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.rotateXLabels=!1,e.overlappingXLabels=!1,e.radialSize=0,e.barHeight=0,e.barWidth=0,e.animationEnded=!1,e.isDestroyed=!1,e.bulkRevealScheduled=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.barCanvasCoords=null,e.activeRenderer=null,e.dataLabelsRects=[],e.lastDrawnDataLabelsIndexes=[],e.textRectsCache=new Map,e.domCache=new Map,e.dimensionCache={},e.cachedSelectors={},e.seriesNS||this._attachNamespaces(e)}_attachNamespaces(e){let t=(t,n,r=n)=>{Object.defineProperty(t,r,{get(){return e[n]},set(t){e[n]=t},enumerable:!0,configurable:!0})},n={};t(n,`series`,`data`);for(let e of`seriesNames.seriesX.seriesZ.seriesXvalues.seriesYvalues.seriesGoals.seriesLog.seriesColors.seriesPercent.seriesTotals.stackedSeriesTotals.seriesCandleO.seriesCandleH.seriesCandleM.seriesCandleL.seriesCandleC.seriesRangeStart.seriesRangeEnd.seriesRange.seriesYAxisMap.seriesYAxisReverseMap.seriesGroups.barGroups.lineGroups.areaGroups.originalSeries.collapsedSeries.collapsedSeriesIndices.ancillaryCollapsedSeries.ancillaryCollapsedSeriesIndices.collapsingSeriesIndices.allSeriesCollapsed.risingSeries.previousPaths.ignoreYAxisIndexes.labels.categoryLabels.timescaleLabels.groups`.split(`.`))t(n,e);Object.defineProperty(e,`seriesNS`,{value:n,writable:!1,enumerable:!1,configurable:!0});let r={};for(let e of`minX.maxX.initialMinX.initialMaxX.minY.maxY.minYArr.maxYArr.minZ.maxZ.minDate.maxDate.minXDiff.xRange.yRange.zRange.xAxisScale.yAxisScale.xAxisTicksPositions.xTickAmount.multiAxisTickAmount.dataPoints.maxValsInArrayIndex.isXNumeric.isMultipleYAxis.isMultiLineX.isDataXYZ.dataFormatXNumeric.allSeriesHasEqualX.hasNullValues.dataWasParsed.hasXaxisGroups.hasSeriesGroups.skipFirstTimelinelabel.skipLastTimelinelabel.yValueDecimal.invalidLogScale.noLabelsProvided`.split(`.`))t(r,e);Object.defineProperty(e,`axes`,{value:r,writable:!1,enumerable:!1,configurable:!0});let i={};for(let e of[`svgWidth`,`svgHeight`,`gridWidth`,`gridHeight`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`translateYAxisX`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yAxisLabelsWidth`,`yAxisWidths`,`yLabelsCoords`,`yTitleCoords`,`padHorizontal`,`barPadForNumericAxis`,`rotateXLabels`,`scaleX`,`scaleY`,`radialSize`,`defaultLabels`,`overlappingXLabels`])t(i,e);Object.defineProperty(e,`layout`,{value:i,writable:!1,enumerable:!1,configurable:!0});let a={};for(let e of[`domCache`,`dimensionCache`,`cachedSelectors`,`textRectsCache`,`pointsArray`,`dataLabelsRects`,`lastDrawnDataLabelsIndexes`,`delayedElements`,`resizeTimer`,`selectionResizeTimer`,`resizeObserver`])t(a,e);Object.defineProperty(e,`cache`,{value:a,writable:!1,enumerable:!1,configurable:!0})}globalVars(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0,batched:!1},LINE_HEIGHT_RATIO:Vu,axisCharts:!0,isSlopeChart:e.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,streamScrolled:!1,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:Hu,niceScaleDefaultTicks:Uu,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(e){let t=[],n=null;Object.defineProperty(e,`initialSeries`,{configurable:!0,enumerable:!0,get(){return n===null&&(n=q.clone(t)),n},set(r){t=q.copySeriesShallow(r),n=null,e._initialSeriesPeek=t}}),e._initialSeriesPeek=t}init(e){let t=this.globalVars(e);this.initGlobalVars(t),this.defineLazyInitialSeries(t);let n=q.extend({},e);return n.series=q.copySeriesShallow(e.series),t.initialConfig=n,t.initialSeries=e.series,t.lastXAxis=q.clone(t.initialConfig.xaxis),t.lastYAxis=q.clone(t.initialConfig.yaxis),t}},Gu=class{constructor(e){this.opts=e}init(){let e=new Bu(this.opts).init({responsiveOverride:!1}),t=new Wu().init(e),n={config:e,globals:t,dom:{},interact:{zoomEnabled:e.chart.toolbar.autoSelected===`zoom`&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected===`pan`&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected===`selection`&&e.chart.toolbar.tools.selection,measureEnabled:e.chart.toolbar.autoSelected===`measure`&&!!e.chart.toolbar.tools.measure&&!!(e.chart.measure&&e.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:G.isBrowser()?`ontouchstart`in window||navigator.maxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinSummary:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:``,capped:!1},waterfallData:{values:[],cumulative:[],kinds:[],geometry:null},dumbbellData:null,streamgraphData:null,labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[],unitData:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(t,`dom`,{get(){return n.dom},set(e){n.dom=e},enumerable:!1,configurable:!0});for(let e of[`xLabelFormatter`,`yLabelFormatters`,`xaxisTooltipFormatter`,`ttKeyFormatter`,`ttVal`,`ttZFormatter`,`legendFormatter`])Object.defineProperty(t,e,{get(){return n.formatters[e]},set(t){n.formatters[e]=t},enumerable:!1,configurable:!0});for(let e of[`zoomEnabled`,`panEnabled`,`selectionEnabled`,`zoomed`,`selection`,`visibleXRange`,`selectedDataPoints`,`mousedown`,`clientX`,`clientY`,`lastClientPosition`,`capturedSeriesIndex`,`capturedDataPointIndex`,`disableZoomIn`,`disableZoomOut`,`isTouchDevice`])Object.defineProperty(t,e,{get(){return n.interact[e]},set(t){n.interact[e]=t},enumerable:!1,configurable:!0});for(let e of[`gridHeight`,`gridWidth`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`rotateXLabels`,`xAxisHeight`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yLabelsCoords`,`yTitleCoords`,`gridPad`])Object.defineProperty(t,e,{get(){return n.layout[e]},set(t){n.layout[e]=t},enumerable:!1,configurable:!0});for(let e of[`series`,`seriesNames`,`seriesX`,`seriesZ`,`seriesColors`,`seriesGoals`,`stackedSeriesTotals`,`stackedSeriesTotalsByGroups`])Object.defineProperty(t,e,{get(){return n.seriesData[e]},set(t){n.seriesData[e]=t},enumerable:!1,configurable:!0});for(let e of[`isXNumeric`,`dataFormatXNumeric`,`isDataXYZ`,`isRangeData`,`isRangeBar`,`isMultiLineX`,`noLabelsProvided`,`dataWasParsed`])Object.defineProperty(t,e,{get(){return n.axisFlags[e]},set(t){n.axisFlags[e]=t},enumerable:!1,configurable:!0});for(let e of[`labels`,`categoryLabels`,`timescaleLabels`,`hasXaxisGroups`,`groups`,`seriesGroups`])Object.defineProperty(t,e,{get(){return n.labelData[e]},set(t){n.labelData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesRangeStart`,`seriesRangeEnd`,`seriesRange`])Object.defineProperty(t,e,{get(){return n.rangeData[e]},set(t){n.rangeData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesCandleO`,`seriesCandleH`,`seriesCandleM`,`seriesCandleL`,`seriesCandleC`])Object.defineProperty(t,e,{get(){return n.candleData[e]},set(t){n.candleData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesViolinDensity`,`seriesViolinPoints`,`seriesViolinMin`,`seriesViolinMax`])Object.defineProperty(t,e,{get(){return n.violinData[e]},set(t){n.violinData[e]=t},enumerable:!1,configurable:!0});return n}},Ku=class{constructor(e){this.w=e}static checkComboSeries(e,t){let n=!1,r=0,i=0;return t===void 0&&(t=`line`),e.length&&e[0].type!==void 0&&e.forEach(e=>{(e.type===`bar`||e.type===`column`||e.type===`candlestick`||e.type===`boxPlot`||e.type===`violin`)&&r++,e.type!==void 0&&e.type!==t&&i++}),i>0&&(n=!0),{comboBarCount:r,comboCharts:n}}getStackedSeriesTotals(e=[]){let t=this.w,n=[];if(t.seriesData.series.length===0)return n;for(let r=0;r<t.seriesData.series[t.globals.maxValsInArrayIndex].length;r++){let i=0;for(let n=0;n<t.seriesData.series.length;n++)t.seriesData.series[n][r]!==void 0&&e.indexOf(n)===-1&&(i+=t.seriesData.series[n][r]);n.push(i)}return n}getSeriesTotalByIndex(e=null){if(e===null)return this.w.config.series.reduce((e,t)=>e+t,0);{let t=this.w.seriesData.series[e];return Array.isArray(t)?t.reduce((e,t)=>e+t,0):t??0}}getStackedSeriesTotalsByGroups(){let e=this.w,t=[];return e.labelData.seriesGroups.forEach(n=>{let r=[];e.config.series.forEach((t,i)=>{n.indexOf(e.seriesData.seriesNames[i])>-1&&r.push(i)});let i=e.seriesData.series.map((e,t)=>r.indexOf(t)===-1?t:-1).filter(e=>e!==-1);t.push(this.getStackedSeriesTotals(i))}),t}setSeriesYAxisMappings(){let e=this.w.globals,t=this.w.config,n=[],r=[],i=[],a=this.w.seriesData.series.length>t.yaxis.length||t.yaxis.some(e=>Array.isArray(e.seriesName));t.series.forEach((e,t)=>{i.push(t),r.push(null)}),t.yaxis.forEach((e,t)=>{n[t]=[]});let o=[];t.yaxis.forEach((e,r)=>{let s=!1;if(e.seriesName){let o=[];Array.isArray(e.seriesName)?o=e.seriesName:o.push(e.seriesName),o.forEach(e=>{t.series.forEach((t,o)=>{if(t.name===e){let e=o;r===o||a?!a||i.indexOf(o)>-1?n[r].push([r,o]):console.warn(`Series '`+t.name+`' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes.`):(n[o].push([o,r]),e=r),s=!0,e=i.indexOf(e),e!==-1&&i.splice(e,1)}})})}s||o.push(r)}),n=n.map(e=>{let t=[];return e.forEach(e=>{r[e[1]]=e[0],t.push(e[1])}),t});let s=t.yaxis.length-1;for(let e=0;e<o.length&&(s=o[e],n[s]=[],i);e++){let e=i[0];i.shift(),n[s].push(e),r[e]=s}i.forEach(e=>{n[s].push(e),r[e]=s}),e.seriesYAxisMap=n.map(e=>e),e.seriesYAxisReverseMap=r.map(e=>e),e.seriesYAxisMap.forEach((e,n)=>{e.forEach(e=>{if(t.series[e]&&t.series[e].group===void 0){let r=t.series[e];r.group=`apexcharts-axis-${n.toString()}`}})})}isSeriesNull(e=null){let t=[],n=this.w.config.series;return t=e===null?n.filter(e=>e!==null):n[e]&&Array.isArray(n[e].data)?n[e].data.filter(e=>e!==null):n[e]!==null&&n[e]!==void 0?[n[e]]:[],t.length===0}seriesHaveSameValues(e){let t=this.w.seriesData.series[e];return Array.isArray(t)?t.every((e,t,n)=>e===n[0]):!0}getCategoryLabels(e){let t=this.w,n=e.slice();return t.config.xaxis.convertedCatToNumeric&&(n=e.map(e=>t.config.xaxis.labels.formatter(e-t.globals.minX+1))),n}getLargestSeries(){let e=this.w;e.globals.maxValsInArrayIndex=e.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,e.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){let e=this.w,t=0;return e.globals.markers.size.forEach(e=>{t=Math.max(t,e)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(e=>{t=Math.max(t,e.size)}),t>0&&(e.config.markers.hover.size>0?t=e.config.markers.hover.size:t+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=t,t}getSeriesTotals(){let e=this.w;e.globals.seriesTotals=e.seriesData.series.map(e=>{let t=0;if(Array.isArray(e))for(let n=0;n<e.length;n++)t+=e[n];else t+=e;return t})}getSeriesTotalsXRange(e,t){let n=this.w;return n.seriesData.series.map((r,i)=>{let a=0;for(let o=0;o<r.length;o++)n.seriesData.seriesX[i][o]>e&&n.seriesData.seriesX[i][o]<t&&(a+=r[o]);return a})}getPercentSeries(){let e=this.w;e.globals.seriesPercent=e.seriesData.series.map(t=>{let n=[];if(Array.isArray(t))for(let r=0;r<t.length;r++){let i=e.seriesData.stackedSeriesTotals[r],a=0;i&&(a=100*t[r]/i),n.push(a)}else{let r=e.globals.seriesTotals.reduce((e,t)=>e+t,0),i=100*t/r;n.push(i)}return n})}getCalculatedRatios(){let e=this.w,t=e.globals,n=[],r=0,i=0,a=0,o=0,s=[],c=.1,l=0;if(t.yRange=[],t.isMultipleYAxis)for(let e=0;e<t.minYArr.length;e++)t.yRange.push(Math.abs(t.minYArr[e]-t.maxYArr[e])),s.push(0);else t.yRange.push(Math.abs(t.minY-t.maxY));t.xRange=Math.abs(t.maxX-t.minX),t.zRange=Math.abs(t.maxZ-t.minZ);for(let e=0;e<t.yRange.length;e++)n.push(t.yRange[e]/this.w.layout.gridHeight);if(i=t.xRange/this.w.layout.gridWidth,r=t.yRange/this.w.layout.gridWidth,a=t.xRange/this.w.layout.gridHeight,o=t.zRange/this.w.layout.gridHeight*16,o||=1,t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0){let e=t;e.hasNegs=!0}if(e.globals.seriesYAxisReverseMap.length>0){let a=(t,r)=>{let i=e.config.yaxis[e.globals.seriesYAxisReverseMap[r]];if(!i||i.logarithmic)return 0;let a=t<0?-1:1;return t=Math.abs(t),-a*t/n[r]};if(t.isMultipleYAxis){s=[];for(let e=0;e<n.length;e++)s.push(a(t.minYArr[e],e))}else s=[],s.push(a(t.minY,0)),t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(c=-t.minY/r,l=t.minX/i)}else s=[],s.push(0),c=0,l=0;return{yRatio:n,invertedYRatio:r,zRatio:o,xRatio:i,invertedXRatio:a,baseLineInvertedY:c,baseLineY:s,baseLineX:l}}getLogSeries(e){let t=this.w;return t.globals.seriesLog=e.map((e,n)=>{let r=t.globals.seriesYAxisReverseMap[n];return t.config.yaxis[r]&&t.config.yaxis[r].logarithmic?e.map(e=>e===null?null:this.getLogVal(t.config.yaxis[r].logBase,e,n)):e}),t.globals.invalidLogScale?e:t.globals.seriesLog}getLogValAtSeriesIndex(e,t){if(e===null)return null;let n=this.w,r=n.globals.seriesYAxisReverseMap[t];return n.config.yaxis[r]&&n.config.yaxis[r].logarithmic?this.getLogVal(n.config.yaxis[r].logBase,e,t):e}getBaseLog(e,t){return Math.log(t)/Math.log(e)}getLogVal(e,t,n){if(t<=0)return 0;let r=this.w,i=r.globals.minYArr[n]===0?-1:this.getBaseLog(e,r.globals.minYArr[n]),a=(r.globals.maxYArr[n]===0?0:this.getBaseLog(e,r.globals.maxYArr[n]))-i;return(this.getBaseLog(e,t)-i)/a}getLogYRatios(e){let t=this.w,n=this.w.globals,r=n;return r.yLogRatio=e.slice(),r.logYRange=n.yRange.map((e,i)=>{let a=t.globals.seriesYAxisReverseMap[i];return t.config.yaxis[a]&&this.w.config.yaxis[a].logarithmic?(r.yLogRatio[i]=1/this.w.layout.gridHeight,1):n.yRange[i]}),r.invalidLogScale?e.slice():r.yLogRatio}static extendArrayProps(e,t,n){return t?.yaxis&&(t=e.extendYAxis(t,n)),t?.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t?.annotations?.xaxis&&(t=e.extendXAxisAnnotations(t)),t?.annotations?.points&&(t=e.extendPointAnnotations(t))),t}drawSeriesByGroup(e,t,n,r){let i=this.w,a=[];return e.series.length>0&&t.forEach(t=>{let o=[],s=[];e.i.forEach((n,r)=>{i.config.series[n].group===t&&(o.push(e.series[r]),s.push(n))}),o.length>0&&a.push(r.draw(o,n,s))}),a}},qu=`http://www.w3.org/2000/svg`,Ju=class e{constructor(e,t){typeof e==`object`?(this.x=e.x,this.y=e.y):(this.x=e||0,this.y=t||0)}transform(e){return e.apply(this)}clone(){return new e(this.x,this.y)}},Yu=class e{constructor(e,t,n,r,i,a){this.a=e??1,this.b=t??0,this.c=n??0,this.d=r??1,this.e=i??0,this.f=a??0}rotate(t){let n=t*Math.PI/180,r=Math.cos(n),i=Math.sin(n);return this.multiply(new e(r,i,-i,r,0,0))}scale(t,n){return this.multiply(new e(t,0,0,n??t,0,0))}multiply(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}apply(e){return new Ju(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)}},Xu=class{constructor(e,t,n,r){this.x=e,this.y=t,this.w=n,this.h=r,this.width=n,this.height=r,this.x2=e+n,this.y2=t+r}};function Zu(e){if(!e||typeof e!=`string`)return[[`M`,0,0]];let t=[],n=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,r=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,i,a=[],o=[];for(;(i=n.exec(e))!==null;)a.push(i[1]),o.push(i.index);for(let n=0;n<a.length;n++){let i=o[n]+a[n].length,s=n+1<o.length?o[n+1]:e.length,c=e.substring(i,s),l=[],u;for(r.lastIndex=0;(u=r.exec(c))!==null;)l.push(parseFloat(u[0]));let d=a[n].toUpperCase();if(d===`Z`)t.push([`Z`]);else if(d===`M`||d===`L`||d===`T`)for(let e=0;e<l.length;e+=2)t.push([d,l[e],l[e+1]]);else if(d===`H`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`V`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`C`)for(let e=0;e<l.length;e+=6)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5]]);else if(d===`S`||d===`Q`)for(let e=0;e<l.length;e+=4)t.push([d,l[e],l[e+1],l[e+2],l[e+3]]);else if(d===`A`)for(let e=0;e<l.length;e+=7)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5],l[e+6]])}return t.length===0&&t.push([`M`,0,0]),t}function Qu(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;return e.forEach(e=>{for(let a=1;a<e.length;a+=2)if(a+1<=e.length){let o=e[a],s=e[a+1];typeof o==`number`&&typeof s==`number`&&(o<t&&(t=o),o>r&&(r=o),s<n&&(n=s),s>i&&(i=s))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:n,width:r-t,height:i-n}}function $u(e){return e.map(e=>e.join(` `)).join(` `)}function ed(e){switch(e[0]){case`z`:case`Z`:e[0]=`L`,e[1]=this.start[0],e[2]=this.start[1];break;case`H`:e[0]=`L`,e[2]=this.pos[1];break;case`V`:e[0]=`L`,e[2]=e[1],e[1]=this.pos[0];break;case`T`:e[0]=`Q`,e[3]=e[1],e[4]=e[2],e[1]=this.reflection[1],e[2]=this.reflection[0];break;case`S`:e[0]=`C`,e[6]=e[4],e[5]=e[3],e[4]=e[2],e[3]=e[1],e[2]=this.reflection[1],e[1]=this.reflection[0];break}return e}function td(e){var t=e.length;return this.pos=[e[t-2],e[t-1]],`SCQT`.indexOf(e[0])!=-1&&(this.reflection=[2*this.pos[0]-e[t-4],2*this.pos[1]-e[t-3]]),e}function nd(e){var t=[e];switch(e[0]){case`M`:return this.pos=this.start=[e[1],e[2]],t;case`L`:e[5]=e[3]=e[1],e[6]=e[4]=e[2],e[1]=this.pos[0],e[2]=this.pos[1];break;case`Q`:e[6]=e[4],e[5]=e[3],e[4]=e[4]*1/3+e[2]*2/3,e[3]=e[3]*1/3+e[1]*2/3,e[2]=this.pos[1]*1/3+e[2]*2/3,e[1]=this.pos[0]*1/3+e[1]*2/3;break;case`A`:t=id(this.pos??[],e),e=t[0];break}return e[0]=`C`,this.pos=[e[5],e[6]],this.reflection=[2*e[5]-e[3],2*e[6]-e[4]],t}function rd(e,t){if(t===!1)return!1;for(var n=t,r=e.length;n<r;++n)if(e[n][0]==`M`)return n;return!1}function id(e,t){var n=Math.abs(t[1]),r=Math.abs(t[2]),i=t[3]%360,a=t[4],o=t[5],s=t[6],c=t[7],l=new Ju(e[0],e[1]),u=new Ju(s,c),d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,ee,te=[],ne,M,re,ie;if(n===0||r===0||l.x===u.x&&l.y===u.y)return[[`C`,l.x,l.y,u.x,u.y,u.x,u.y]];for(d=new Ju((l.x-u.x)/2,(l.y-u.y)/2).transform(new Yu().rotate(i)),f=d.x*d.x/(n*n)+d.y*d.y/(r*r),f>1&&(f=Math.sqrt(f),n=f*n,r=f*r),p=new Yu().rotate(i).scale(1/n,1/r).rotate(-i),l=l.transform(p),u=u.transform(p),m=[u.x-l.x,u.y-l.y],g=m[0]*m[0]+m[1]*m[1],h=Math.sqrt(g),m[0]/=h,m[1]/=h,_=g<4?Math.sqrt(1-g/4):0,a===o&&(_*=-1),v=new Ju((u.x+l.x)/2+_*-m[1],(u.y+l.y)/2+_*m[0]),y=new Ju(l.x-v.x,l.y-v.y),b=new Ju(u.x-v.x,u.y-v.y),x=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(x*=-1),S=Math.acos(b.x/Math.sqrt(b.x*b.x+b.y*b.y)),b.y<0&&(S*=-1),o&&x>S&&(S+=2*Math.PI),!o&&x<S&&(S-=2*Math.PI),w=Math.ceil(Math.abs(x-S)*2/Math.PI),E=[],D=x,C=(S-x)/w,T=4*Math.tan(C/4)/3,j=0;j<=w;j++)k=Math.cos(D),O=Math.sin(D),A=new Ju(v.x+k,v.y+O),E[j]=[new Ju(A.x+T*O,A.y-T*k),A,new Ju(A.x-T*O,A.y+T*k)],D+=C;for(E[0][0]=E[0][1].clone(),E[E.length-1][2]=E[E.length-1][1].clone(),p=new Yu().rotate(i).scale(n,r).rotate(-i),j=0,ee=E.length;j<ee;j++)E[j][0]=E[j][0].transform(p),E[j][1]=E[j][1].transform(p),E[j][2]=E[j][2].transform(p);for(j=1,ee=E.length;j<ee;j++)A=E[j-1][2],ne=A.x,M=A.y,A=E[j][0],re=A.x,ie=A.y,A=E[j][1],s=A.x,c=A.y,te.push([`C`,ne,M,re,ie,s,c]);return te}function ad(e,t,n,r,i,a){for(var o=e.slice(t,n||void 0),s=r.slice(i,a||void 0),c=0,l={pos:[0,0],start:[0,0]},u={pos:[0,0],start:[0,0]};o[c]=ed.call(l,o[c]),s[c]=ed.call(u,s[c]),o[c][0]!=s[c][0]||o[c][0]==`M`||o[c][0]==`A`&&(o[c][4]!=s[c][4]||o[c][5]!=s[c][5])?(Array.prototype.splice.apply(o,[c,1].concat(nd.call(l,o[c]))),Array.prototype.splice.apply(s,[c,1].concat(nd.call(u,s[c])))):(o[c]=td.call(l,o[c]),s[c]=td.call(u,s[c])),!(++c==o.length&&c==s.length);)c==o.length&&o.push([`C`,l.pos[0],l.pos[1],l.pos[0],l.pos[1],l.pos[0],l.pos[1]]),c==s.length&&s.push([`C`,u.pos[0],u.pos[1],u.pos[0],u.pos[1],u.pos[0],u.pos[1]]);return{start:o,dest:s}}function od(e,t){for(var n=Zu(e),r=Zu(t),i=0,a=0,o=!1,s=!1,c;!(i===!1&&a===!1);){if(o=rd(n,i===!1?!1:i+1),s=rd(r,a===!1?!1:a+1),i===!1){let e=Qu(c.start);i=e.height==0||e.width==0?n.push(n[0])-1:n.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}if(a===!1){let e=Qu(c.dest);a=e.height==0||e.width==0?r.push(r[0])-1:r.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}c=ad(n,i,o,r,a,s),n=n.slice(0,i).concat(c.start,o===!1?[]:n.slice(o)),r=r.slice(0,a).concat(c.dest,s===!1?[]:r.slice(s)),i=o===!1?!1:i+c.start.length,a=s===!1?!1:a+c.dest.length}return{start:n,dest:r}}function sd(e,t){var n=od(e,t),r=n.start,i=n.dest;return function(e){return $u(r.map(function(t,n){return i[n].map(function(r,a){return a===0?r:t[a]+(i[n][a]-t[a])*e})}))}}var cd=null,ld=null;function ud(e,t){let n=Array(t);if(!G.isBrowser()){let r=Qu(Zu(e)),i=r.x+r.width/2,a=r.y+r.height/2;for(let e=0;e<t;e++)n[e]={x:i,y:a};return n}cd||(cd=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),cd.setAttribute(`width`,`0`),cd.setAttribute(`height`,`0`),cd.setAttribute(`style`,`position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;`),ld=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),cd.appendChild(ld),document.body.appendChild(cd)),ld.setAttribute(`d`,e||`M0 0`);let r=0;try{r=ld.getTotalLength()}catch{r=0}if(!r||!isFinite(r)){let r=Qu(Zu(e)),i=r.x+r.width/2,a=r.y+r.height/2;for(let e=0;e<t;e++)n[e]={x:i,y:a};return n}for(let e=0;e<t;e++)try{let i=ld.getPointAtLength(e/t*r);n[e]={x:i.x,y:i.y}}catch{n[e]={x:0,y:0}}return n}function dd(e,t,n=96){let r=ud(e,n),i=ud(t,n),a=0,o=1/0;for(let e=0;e<n;e++){let t=0;for(let a=0;a<n;a++){let s=r[(a+e)%n],c=i[a],l=s.x-c.x,u=s.y-c.y;if(t+=l*l+u*u,t>=o)break}t<o&&(o=t,a=e)}let s=Array(n);for(let e=0;e<n;e++)s[e]=r[(e+a)%n];return function(e){let t=``;for(let r=0;r<n;r++){let n=s[r],a=i[r],o=n.x+(a.x-n.x)*e,c=n.y+(a.y-n.y)*e;t+=(r===0?`M`:`L`)+o.toFixed(3)+` `+c.toFixed(3)+` `}return t+`Z`}}function fd(e){return-Math.cos(e*Math.PI)/2+.5}var pd=fd;function md(e){pd=typeof e==`function`?e:fd}function hd(e){if(!e||typeof e!=`string`)return null;if(e[0]===`#`){let t=e.slice(1);t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255,1]}let t=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]===void 0?1:+t[4]]:null}function gd(e,t,n){return`rgba(${Math.round(e[0]+(t[0]-e[0])*n)},${Math.round(e[1]+(t[1]-e[1])*n)},${Math.round(e[2]+(t[2]-e[2])*n)},${e[3]+(t[3]-e[3])*n})`}var _d=class e{constructor(e,t,n){this.el=e,this.duration=t??300,this.delay=n||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm=`commands`,this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(e){return typeof e==`function`&&(this._easing=e),this._schedule(),this}attr(e){return this._attrTarget=e,this._schedule(),this}plot(e,t,n){return this._plotTarget=e,t&&(this._plotAlgorithm=t),this._plotSnap=n||null,this._schedule(),this}after(e){return this._afterCb=e,this._schedule(),this}during(e){return this._duringCb=e,this._schedule(),this}animate(t,n){let r=new e(this.el,t,n);return this._next=r,r._root=this._root||this,r}_schedule(){let e=this._root||this;e._scheduled||(e._scheduled=!0,queueMicrotask(()=>e._executeChain()))}_executeChain(){let e=[],t=this;for(;t;)e.push(t),t=t._next;let n=0;e.forEach(e=>{n+=e.delay,e._execute(n),n+=e.duration})}_execute(e){let t=this.el,n=this.duration;if(n<=1){let n=()=>{this._attrTarget&&t.attr(this._attrTarget),this._plotTarget&&t.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(t)};e>0?setTimeout(n,e):n();return}let r=()=>{let e={},r={},i={};if(this._attrTarget)for(let n of Object.keys(this._attrTarget)){let a=t.attr(n);e[n]=a;let o=hd(a),s=hd(String(this._attrTarget[n]));o&&s&&(r[n]=o,i[n]=s)}let a=null;if(this._plotTarget){let e=t.attr(`d`)||``;try{a=this._plotAlgorithm===`polygons`?dd(e,this._plotTarget):sd(e,this._plotTarget)}catch{a=null}}let o=performance.now(),s=this._easing||pd,c=l=>{let u=l-o,d=Math.min(u/n,1),f=s(d);if(this._attrTarget)if(d>=1)t.attr(this._attrTarget);else{let n={};for(let t of Object.keys(this._attrTarget))if(r[t]&&i[t])n[t]=gd(r[t],i[t],f);else{let r=parseFloat(e[t]),i=parseFloat(this._attrTarget[t]);!isNaN(r)&&!isNaN(i)&&(n[t]=r+(i-r)*f)}t.attr(n)}a&&d<1&&t.attr(`d`,a(f)),this._duringCb&&this._duringCb(f),d<1?K.requestAnimationFrame(c):(this._plotTarget&&t.attr(`d`,this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(t))};K.requestAnimationFrame(c)};e>0?setTimeout(r,e):r()}};function vd(e){e.prototype.animate=function(e,t){return new _d(this,e,t)}}function yd(e){return-Math.cos(e*Math.PI)/2+.5}function bd(e,t,n,r){e=Math.min(Math.max(e,0),1),n=Math.min(Math.max(n,0),1);let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c,u=e=>((o*e+a)*e+i)*e,d=e=>((l*e+c)*e+s)*e,f=e=>{let t=0,n=1,r=e;if(r<t)return t;if(r>n)return n;for(;t<n;){let i=u(r);if(Math.abs(i-e)<1e-4)return r;e>i?t=r:n=r,r=(t+n)/2}return r};return e=>e<=0?0:e>=1?1:d(f(e))}var xd=new Map;xd.set(`linear`,e=>e),xd.set(`easeInOutSine`,yd),xd.set(`easeInSine`,e=>1-Math.cos(e*Math.PI/2)),xd.set(`easeOutSine`,e=>Math.sin(e*Math.PI/2)),xd.set(`easeInQuad`,e=>e*e),xd.set(`easeOutQuad`,e=>1-(1-e)*(1-e)),xd.set(`easeInOutQuad`,e=>e<.5?2*e*e:1-(-2*e+2)**2/2),xd.set(`easeInCubic`,e=>e*e*e),xd.set(`easeOutCubic`,e=>1-(1-e)**3),xd.set(`easeInOutCubic`,e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2),xd.set(`easeOutBack`,e=>{let t=1.70158;return 1+(t+1)*(e-1)**3+t*(e-1)**2}),xd.set(`easeInOutBack`,e=>{let t=1.70158*1.525;return e<.5?(2*e)**2*((t+1)*2*e-t)/2:((2*e-2)**2*((t+1)*(e*2-2)+t)+2)/2});function Sd(e,t){typeof e==`string`&&e&&typeof t==`function`&&xd.set(e,t)}function Cd(e){return Array.isArray(e)&&e.length===4&&e.every(e=>typeof e==`number`)}function wd(e){return typeof e==`function`?Td(e):Cd(e)?bd(e[0],e[1],e[2],e[3]):typeof e==`string`&&xd.has(e)?Td(xd.get(e)):yd}function Td(e){return t=>{let n=e(t);return typeof n==`number`&&isFinite(n)?n:t}}var Ed=`http://www.w3.org/2000/svg`;function Dd(e){return 1-(1-e)**3}function Od(e){let t=1.70158;return 1+(t+1)*(e-1)**3+t*(e-1)**2}var kd=null;function Ad(){if(!G.isBrowser())return!1;try{return kd||=window.matchMedia(`(prefers-reduced-motion: reduce)`),!!kd.matches}catch{return!1}}function jd(e,t,n){if(!G.isBrowser()||n.globals.dataChanged||n.globals.resized)return!1;let r=n.config.chart.animations;if(!r||r.enabled===!1)return!1;let i=n.config.chart.type;if(i!==`line`&&i!==`area`&&i!==`rangeArea`||!(n.layout.gridWidth>0))return!1;let a=(r.speed||800)*2,o=Math.max(0,Math.min(1,t/n.layout.gridWidth)),s=(1-Math.cbrt(1-o))*a,c=e.node.style;c.opacity=`0`;let l=null,u=e=>{l===null&&(l=e),e-l>=s?c.opacity=``:K.requestAnimationFrame(u)};return K.requestAnimationFrame(u),!0}function Md(e){let t=e.config.chart.animations;t&&(t.respectReducedMotion!==!1&&Ad()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1)),md(wd(t.easing)))}function Nd(e){let t=e.style,n=e.index||0,r=typeof e.baseDelay==`number`?e.baseDelay:40,i=e.row||0,a=e.col||0,o=e.groupIndex||0,s=e.perGroup||1,c=e.centerDistance||0;switch(t){case`none`:return 0;case`diagonal`:return(i+a)*r;case`group`:return o*r+n%s*(r/4);case`centroid`:return c*r*(n+1);case`sequential`:default:return n*r}}var Pd=class{constructor(e,t){this.w=e,this.ctx=t}animateLine(e,t,n,r){e.attr(t).animate(r).attr(n)}animateMarker(e,t,n,r){e.attr({opacity:0}).animate(t).attr({opacity:1}).after(()=>{r()})}animatePop(e,{speed:t,delay:n=0,onComplete:r}){let i=this.w;if(!G.isBrowser()||!i.globals.shouldAnimate||t<1){r&&r();return}let a=e.node.style;a.transformBox=`fill-box`,a.transformOrigin=`center`,a.transform=`scale(0)`,a.opacity=`0`;let o=performance.now()+n,s=e=>{if(i.globals.isDestroyed)return;let n=Math.max(0,Math.min(1,(e-o)/t));a.transform=`scale(${Od(n)})`,a.opacity=String(Math.min(1,n*2)),n<1?K.requestAnimationFrame(s):(a.transform=``,a.transformOrigin=``,a.transformBox=``,a.opacity=``,r&&r())};K.requestAnimationFrame(s)}animateRect(e,t,n,r,i,a=0){e.attr(t).animate(r,a).attr(n).after(()=>i())}animatePathsGradually(e){let{el:t,realIndex:n,j:r,fill:i,pathFrom:a,pathTo:o,pathToInterp:s,speed:c,delay:l,scrollMorph:u}=e,d=this,f=this.w,p=0;f.config.chart.animations.animateGradually.enabled&&(p=f.config.chart.animations.animateGradually.delay),f.config.chart.animations.dynamicAnimation.enabled&&f.globals.dataChanged&&f.config.chart.type!==`bar`&&(p=0),d.morphSVG(t,n,r,f.config.chart.type===`line`&&!f.globals.comboCharts?`stroke`:i,a,o,c,l*p,u,s)}revealBulk(e){let t=this.w;if(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node}),!G.isBrowser()||!t.globals.shouldAnimate){this.animationCompleted(e);return}t.globals.bulkRevealScheduled||(t.globals.bulkRevealScheduled=!0,K.requestAnimationFrame(()=>{t.globals.isDestroyed||(t.globals.bulkRevealScheduled=!1,this.animationCompleted(e))}))}showDelayedElements(){this.w.globals.delayedElements.forEach(e=>{if(e.holdUntilComplete&&!this.w.globals.animationEnded)return;let t=e.el;t.classList.remove(`apexcharts-element-hidden`),t.classList.add(`apexcharts-hidden-element-shown`)})}animationCompleted(e){let t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd==`function`&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}animateDraw(e,{realIndex:t,j:n,isFill:r,isLast:i,speed:a,delay:o,mask:s}){let c=this.w,l=this,u=()=>{i&&c.globals.shouldAnimate&&l.animationCompleted(e),l.showDelayedElements()};if(!G.isBrowser()||!c.globals.shouldAnimate||a<1){u();return}let d=e.node,f=()=>{let e=s&&s.type===`radial`,i=c.layout.gridWidth+8,l=s&&s.cx||0,f=s&&s.cy||0,p=(s&&s.r||c.layout.gridWidth/2)+4,m=`apexDrawMask${c.globals.cuid}-${t}-${n??0}-${r?`f`:`s`}`,h=K.createElementNS(Ed,`mask`);h.setAttribute(`id`,m),h.setAttribute(`maskUnits`,`userSpaceOnUse`);let g;if(e){let e=p;h.setAttribute(`x`,String(l-e)),h.setAttribute(`y`,String(f-e)),h.setAttribute(`width`,String(e*2)),h.setAttribute(`height`,String(e*2)),g=K.createElementNS(Ed,`circle`),g.setAttribute(`cx`,String(l)),g.setAttribute(`cy`,String(f)),g.setAttribute(`r`,`0`),g.setAttribute(`fill`,`#fff`)}else h.setAttribute(`x`,`-4`),h.setAttribute(`y`,`-4`),h.setAttribute(`width`,String(i)),h.setAttribute(`height`,String(c.layout.gridHeight+8)),g=K.createElementNS(Ed,`rect`),g.setAttribute(`x`,`-4`),g.setAttribute(`y`,`-4`),g.setAttribute(`width`,`0`),g.setAttribute(`height`,String(c.layout.gridHeight+8)),g.setAttribute(`fill`,`#fff`);h.appendChild(g),c.dom.elDefs.node.appendChild(h),d.setAttribute(`mask`,`url(#${m})`);let _=performance.now()+(o||0),v=t=>{if(c.globals.isDestroyed)return;let n=Math.max(0,Math.min(1,(t-_)/a)),r=Dd(n);e?g.setAttribute(`r`,String(r*p)):g.setAttribute(`width`,String(r*i)),n<1?K.requestAnimationFrame(v):(d.removeAttribute(`mask`),h.parentNode&&h.parentNode.removeChild(h),u())};K.requestAnimationFrame(v)},p=e=>{d.setAttribute(`stroke-dasharray`,String(e)),d.setAttribute(`stroke-dashoffset`,String(e));let t=performance.now()+(o||0),n=r=>{if(c.globals.isDestroyed)return;let i=Math.max(0,Math.min(1,(r-t)/a));d.setAttribute(`stroke-dashoffset`,String(e*(1-Dd(i)))),i<1?K.requestAnimationFrame(n):(d.removeAttribute(`stroke-dasharray`),d.removeAttribute(`stroke-dashoffset`),u())};K.requestAnimationFrame(n)};K.requestAnimationFrame(()=>{if(c.globals.isDestroyed)return;if(r){f();return}let e=d.getAttribute(`stroke-dasharray`);if(e&&e!==`0`&&e!==``){f();return}let t=0;try{typeof d.getTotalLength==`function`&&(t=d.getTotalLength())}catch{t=0}if(!t){u();return}p(t)})}morphSVG(e,t,n,r,i,a,o,s,c,l){let u=this.w;i||=e.attr(`pathFrom`),a||=e.attr(`pathTo`);let d=()=>(u.config.chart.type===`radar`&&(o=1),`M 0 ${u.layout.gridHeight}`);(!i||i.indexOf(`undefined`)>-1||i.indexOf(`NaN`)>-1)&&(i=d()),(!a.trim()||a.indexOf(`undefined`)>-1||a.indexOf(`NaN`)>-1)&&(a=d(),l=void 0),l&&(!l.trim()||l.indexOf(`undefined`)>-1||l.indexOf(`NaN`)>-1)&&(l=void 0),u.globals.shouldAnimate||(o=1);let f=(this.ctx?.morphTypeChange)?.isActive()===!0?`polygons`:`commands`,p=null;if(u.globals.dataChanged){let e=u.config.chart.animations.dynamicAnimation.easing;e==null?c&&(p=wd(`linear`)):p=wd(e)}let m=e.plot(i).animate(o,s);p&&m.ease(p),m.plot(l||a,f,l?a:void 0).after(()=>{if(q.isNumber(n)){let t=u.seriesData.series[u.globals.maxValsInArrayIndex];t&&n===t.length-2&&u.globals.shouldAnimate&&this.animationCompleted(e)}else r!==`none`&&u.globals.shouldAnimate&&(!u.globals.comboCharts&&t===u.seriesData.series.length-1||u.globals.comboCharts)&&this.animationCompleted(e);this.showDelayedElements()})}},Fd={lighten:.15,darken:.35},Id=class e{constructor(e){this.w=e}static isSliceChart(e){let t=e.config.chart.type;return t===`pie`||t===`donut`||t===`polarArea`}static hoverOutlineOwnsHoverState(t){return e.isSliceChart(t)&&t.config.states.hover.filter.type!==`none`&&t.config.plotOptions.pie.hoverOutline?.show===!0}static sliceOffsetOwnsActiveState(t){return e.isSliceChart(t)&&t.config.chart.type!==`polarArea`&&t.config.plotOptions.pie.expandOnClick===!0&&t.config.plotOptions.pie.expandOffset>0&&!e.drilldownBlocksSliceOffset(t)}static drilldownBlocksSliceOffset(t){return e.isSliceChart(t)&&t.config.drilldown?.enabled===!0}getDefaultFilter(e,t){let n=this.w;e.unfilter&&e.unfilter(!0),n.config.chart.dropShadow.enabled&&this.dropShadow(e,n.config.chart.dropShadow,t)}applyFilter(e,t,n,r){var i;let a=this.w;if(e.unfilter&&e.unfilter(!0),n===`none`){this.getDefaultFilter(e,t);return}let o=a.config.chart.dropShadow,s=n===`lighten`?Fd.lighten:Fd.darken,c=Math.max(0,Math.min(1,typeof r==`number`?r:s)),l=1-c,u=n===`lighten`?c:0;e.filterWith&&(e.filterWith(e=>{e.colorMatrix({type:`matrix`,values:`
|
|
579
579
|
${l} 0 0 0 ${u}
|
|
580
580
|
0 ${l} 0 0 ${u}
|
|
581
581
|
0 0 ${l} 0 ${u}
|
|
582
582
|
0 0 0 1 0
|
|
583
|
-
`,in:`SourceGraphic`,result:`brightness`}),o.enabled&&this.addShadow(e,t,o,`brightness`)}),o.noUserSpaceOnUse||(i=e.filterer()?.node)==null||i.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node))}addShadow(e,t,n,r){let i=this.w,{blur:a,top:o,left:s,color:c,opacity:l}=n;if(c=Array.isArray(c)?c[t]:c,i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries.indexOf(t)===-1)return e;e.offset({in:r,dx:s,dy:o,result:`offset`}),e.gaussianBlur({in:`offset`,stdDeviation:a,result:`blur`}),e.flood({"flood-color":c,"flood-opacity":l,result:`flood`}),e.composite({in:`flood`,in2:`blur`,operator:`in`,result:`shadow`}),e.merge([`shadow`,r])}dropShadow(e,t,n=0){var r;let i=this.w;return e.unfilter&&e.unfilter(!0),q.isMsEdge()&&i.config.chart.type===`radialBar`||i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries?.indexOf(n)===-1||e.filterWith&&(e.filterWith(e=>{this.addShadow(e,n,t,`SourceGraphic`)}),t.noUserSpaceOnUse||(r=e.filterer()?.node)==null||r.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node)),e}setSelectionFilter(t,n,r){let i=this.w;if(i.interact.selectedDataPoints[n]!==void 0&&i.interact.selectedDataPoints[n].indexOf(r)>-1){if(t.node.setAttribute(`selected`,!0),e.sliceOffsetOwnsActiveState(i))return;let r=i.config.states.active.filter;r.type!==`none`&&this.applyFilter(t,n,r.type,r.value)}}_scaleFilterSize(e){e&&(t=>{for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.setAttribute(n,t[n])})({width:`200%`,height:`200%`,x:`-50%`,y:`-50%`})}},J=class e{constructor(e,t=null){this.w=e,this.ctx=t}roundPathCorners(e,t){e.indexOf(`NaN`)>-1&&(e=``);function n(e,t,n){var i=t.x-e.x,a=t.y-e.y,o=Math.sqrt(i*i+a*a);return o?r(e,t,Math.min(1,n/o)):{x:e.x,y:e.y}}function r(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function i(e,t){e.length>2&&(e[e.length-2]=t.x,e[e.length-1]=t.y)}function a(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}var o=e.split(/[,\s]/).reduce(function(e,t){var n=t.match(/^([a-zA-Z])(.+)/);return n?(e.push(n[1]),e.push(n[2])):e.push(t),e},[]).reduce(function(e,t){return parseFloat(t)==t&&e.length?e[e.length-1].push(t):e.push([t]),e},[]),s=[];if(o.length>1){var c=a(o[0]),l=null;o[o.length-1][0]==`Z`&&o[0].length>2&&(l=[`L`,c.x,c.y],o[o.length-1]=l),s.push(o[0]);for(var u=1;u<o.length;u++){var d=s[s.length-1],f=o[u],p=f==l?o[1]:o[u+1];if(p&&d&&d.length>2&&f[0]==`L`&&p.length>2&&p[0]==`L`){var m=a(d),h=a(f),g=a(p),_=n(h,m,t),v=n(h,g,t);i(f,_),f.origPoint=h,s.push(f);var y=r(_,h,.5),b=r(h,v,.5),x=[`C`,y.x,y.y,b.x,b.y,v.x,v.y];x.origPoint=h,s.push(x)}else s.push(f)}if(l){var S=a(s[s.length-1]);s.push([`Z`]),i(s[0],S)}}else s=o;return s.reduce(function(e,t){return e+t.join(` `)+` `},``)}drawLine(e,t,n,r,i=`#a8a8a8`,a=0,o=null,s=`butt`){return this.w.dom.Paper.line().attr({x1:e,y1:t,x2:n,y2:r,stroke:i,"stroke-dasharray":a,"stroke-width":o,"stroke-linecap":s})}drawRect(e=0,t=0,n=0,r=0,i=0,a=`#fefefe`,o=1,s=null,c=null,l=0){let u=this.w.dom.Paper.rect();return u.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,rx:i,ry:i,opacity:o,"stroke-width":s===null?0:s,stroke:c===null?`none`:c,"stroke-dasharray":l}),u.node.setAttribute(`fill`,a),u}drawPolygon(e,t=`#e1e1e1`,n=1,r=`none`){return this.w.dom.Paper.polygon(e).attr({fill:r,stroke:t,"stroke-width":n})}drawCircle(e,t=null){let n=this.w;e<0&&(e=0);let r=n.dom.Paper.circle(e*2);return t!==null&&r.attr(t),r}drawPath({d:e=``,stroke:t=`#a8a8a8`,strokeWidth:n=1,fill:r,fillOpacity:i=1,strokeOpacity:a=1,classes:o,strokeLinecap:s=null,strokeDashArray:c=0}){let l=this.w;return s===null&&(s=l.config.stroke.lineCap),(e.indexOf(`undefined`)>-1||e.indexOf(`NaN`)>-1)&&(e=`M 0 ${l.layout.gridHeight}`),l.dom.Paper.path(e).attr({fill:r,"fill-opacity":i,stroke:t,"stroke-opacity":a,"stroke-linecap":s,"stroke-width":n,"stroke-dasharray":c,class:o})}group(e=null){let t=this.w.dom.Paper.group();return e!==null&&t.attr(e),t}move(e,t){return[`M`,e,t].join(` `)}line(e,t,n=null){return n===`H`?[` H`,e].join(` `):n===`V`?[` V`,t].join(` `):[` L`,e,t].join(` `)}curve(e,t,n,r,i,a){return[`C`,e,t,n,r,i,a].join(` `)}quadraticCurve(e,t,n,r){return[`Q`,e,t,n,r].join(` `)}arc(e,t,n,r,i,a,o,s=!1){let c=`A`;return s&&(c=`a`),[c,e,t,n,r,i,a,o].join(` `)}renderPaths({j:e,realIndex:t,pathFrom:n,pathTo:r,pathToInterp:i,stroke:a,strokeWidth:o,strokeLinecap:s,fill:c,animationDelay:l,initialSpeed:u,dataChangeSpeed:d,className:f,chartType:p,shouldClipToGrid:m=!0,bindEventsOnPaths:h=!0,drawShadow:g=!0,drawMask:_=null,scrollMorph:v=!1}){let y=this.w,b=new Id(this.w),x=new Pd(this.w,this.ctx??void 0),S=this.w.config.chart.animations.enabled,C=S&&this.w.config.chart.animations.dynamicAnimation.enabled;if(n&&n.startsWith(`M 0 0 `)&&r){let e=r.match(/^M\s+[\d.-]+\s+[\d.-]+/);e&&(n=n.replace(/^M\s+0\s+0/,e[0]))}let w,T=(this.ctx?.morphTypeChange)?.isActive()===!0,E=!!(S&&!y.globals.resized||C&&y.globals.dataChanged&&y.globals.shouldAnimate||T&&S&&y.globals.shouldAnimate),D=typeof f==`string`&&(f.indexOf(`apexcharts-line`)>-1||f.indexOf(`apexcharts-area`)>-1||f.indexOf(`apexcharts-rangeArea`)>-1||f.indexOf(`apexcharts-radar`)>-1),O=!!(S&&!y.globals.resized&&!y.globals.dataChanged&&D),k=y.config.chart.animations.largeDatasetThreshold??0,A=!!(E&&!O&&k>0&&y.globals.dataPoints>k),j=!!((p===`candlestick`||p===`boxPlot`)&&E&&!O&&y.globals.dataChanged&&!T),ee=A||j;E&&!O&&!ee?w=n:(w=r,E||(y.globals.animationEnded=!0));let te=y.config.stroke.dashArray,
|
|
583
|
+
`,in:`SourceGraphic`,result:`brightness`}),o.enabled&&this.addShadow(e,t,o,`brightness`)}),o.noUserSpaceOnUse||(i=e.filterer()?.node)==null||i.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node))}addShadow(e,t,n,r){let i=this.w,{blur:a,top:o,left:s,color:c,opacity:l}=n;if(c=Array.isArray(c)?c[t]:c,i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries.indexOf(t)===-1)return e;e.offset({in:r,dx:s,dy:o,result:`offset`}),e.gaussianBlur({in:`offset`,stdDeviation:a,result:`blur`}),e.flood({"flood-color":c,"flood-opacity":l,result:`flood`}),e.composite({in:`flood`,in2:`blur`,operator:`in`,result:`shadow`}),e.merge([`shadow`,r])}dropShadow(e,t,n=0){var r;let i=this.w;return e.unfilter&&e.unfilter(!0),q.isMsEdge()&&i.config.chart.type===`radialBar`||i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries?.indexOf(n)===-1||e.filterWith&&(e.filterWith(e=>{this.addShadow(e,n,t,`SourceGraphic`)}),t.noUserSpaceOnUse||(r=e.filterer()?.node)==null||r.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node)),e}setSelectionFilter(t,n,r){let i=this.w;if(i.interact.selectedDataPoints[n]!==void 0&&i.interact.selectedDataPoints[n].indexOf(r)>-1){if(t.node.setAttribute(`selected`,!0),e.sliceOffsetOwnsActiveState(i))return;let r=i.config.states.active.filter;r.type!==`none`&&this.applyFilter(t,n,r.type,r.value)}}_scaleFilterSize(e){e&&(t=>{for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.setAttribute(n,t[n])})({width:`200%`,height:`200%`,x:`-50%`,y:`-50%`})}},J=class e{constructor(e,t=null){this.w=e,this.ctx=t}roundPathCorners(e,t){e.indexOf(`NaN`)>-1&&(e=``);function n(e,t,n){var i=t.x-e.x,a=t.y-e.y,o=Math.sqrt(i*i+a*a);return o?r(e,t,Math.min(1,n/o)):{x:e.x,y:e.y}}function r(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function i(e,t){e.length>2&&(e[e.length-2]=t.x,e[e.length-1]=t.y)}function a(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}var o=e.split(/[,\s]/).reduce(function(e,t){var n=t.match(/^([a-zA-Z])(.+)/);return n?(e.push(n[1]),e.push(n[2])):e.push(t),e},[]).reduce(function(e,t){return parseFloat(t)==t&&e.length?e[e.length-1].push(t):e.push([t]),e},[]),s=[];if(o.length>1){var c=a(o[0]),l=null;o[o.length-1][0]==`Z`&&o[0].length>2&&(l=[`L`,c.x,c.y],o[o.length-1]=l),s.push(o[0]);for(var u=1;u<o.length;u++){var d=s[s.length-1],f=o[u],p=f==l?o[1]:o[u+1];if(p&&d&&d.length>2&&f[0]==`L`&&p.length>2&&p[0]==`L`){var m=a(d),h=a(f),g=a(p),_=n(h,m,t),v=n(h,g,t);i(f,_),f.origPoint=h,s.push(f);var y=r(_,h,.5),b=r(h,v,.5),x=[`C`,y.x,y.y,b.x,b.y,v.x,v.y];x.origPoint=h,s.push(x)}else s.push(f)}if(l){var S=a(s[s.length-1]);s.push([`Z`]),i(s[0],S)}}else s=o;return s.reduce(function(e,t){return e+t.join(` `)+` `},``)}drawLine(e,t,n,r,i=`#a8a8a8`,a=0,o=null,s=`butt`){return this.w.dom.Paper.line().attr({x1:e,y1:t,x2:n,y2:r,stroke:i,"stroke-dasharray":a,"stroke-width":o,"stroke-linecap":s})}drawRect(e=0,t=0,n=0,r=0,i=0,a=`#fefefe`,o=1,s=null,c=null,l=0){let u=this.w.dom.Paper.rect();return u.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,rx:i,ry:i,opacity:o,"stroke-width":s===null?0:s,stroke:c===null?`none`:c,"stroke-dasharray":l}),u.node.setAttribute(`fill`,a),u}drawPolygon(e,t=`#e1e1e1`,n=1,r=`none`){return this.w.dom.Paper.polygon(e).attr({fill:r,stroke:t,"stroke-width":n})}drawCircle(e,t=null){let n=this.w;e<0&&(e=0);let r=n.dom.Paper.circle(e*2);return t!==null&&r.attr(t),r}drawPath({d:e=``,stroke:t=`#a8a8a8`,strokeWidth:n=1,fill:r,fillOpacity:i=1,strokeOpacity:a=1,classes:o,strokeLinecap:s=null,strokeDashArray:c=0}){let l=this.w;return s===null&&(s=l.config.stroke.lineCap),(e.indexOf(`undefined`)>-1||e.indexOf(`NaN`)>-1)&&(e=`M 0 ${l.layout.gridHeight}`),l.dom.Paper.path(e).attr({fill:r,"fill-opacity":i,stroke:t,"stroke-opacity":a,"stroke-linecap":s,"stroke-width":n,"stroke-dasharray":c,class:o})}group(e=null){let t=this.w.dom.Paper.group();return e!==null&&t.attr(e),t}move(e,t){return[`M`,e,t].join(` `)}line(e,t,n=null){return n===`H`?[` H`,e].join(` `):n===`V`?[` V`,t].join(` `):[` L`,e,t].join(` `)}curve(e,t,n,r,i,a){return[`C`,e,t,n,r,i,a].join(` `)}quadraticCurve(e,t,n,r){return[`Q`,e,t,n,r].join(` `)}arc(e,t,n,r,i,a,o,s=!1){let c=`A`;return s&&(c=`a`),[c,e,t,n,r,i,a,o].join(` `)}renderPaths({j:e,realIndex:t,pathFrom:n,pathTo:r,pathToInterp:i,stroke:a,strokeWidth:o,strokeLinecap:s,fill:c,animationDelay:l,initialSpeed:u,dataChangeSpeed:d,className:f,chartType:p,shouldClipToGrid:m=!0,bindEventsOnPaths:h=!0,drawShadow:g=!0,drawMask:_=null,scrollMorph:v=!1}){let y=this.w,b=new Id(this.w),x=new Pd(this.w,this.ctx??void 0),S=this.w.config.chart.animations.enabled,C=S&&this.w.config.chart.animations.dynamicAnimation.enabled;if(n&&n.startsWith(`M 0 0 `)&&r){let e=r.match(/^M\s+[\d.-]+\s+[\d.-]+/);e&&(n=n.replace(/^M\s+0\s+0/,e[0]))}let w,T=(this.ctx?.morphTypeChange)?.isActive()===!0,E=!!(S&&!y.globals.resized||C&&y.globals.dataChanged&&y.globals.shouldAnimate||T&&S&&y.globals.shouldAnimate),D=typeof f==`string`&&(f.indexOf(`apexcharts-line`)>-1||f.indexOf(`apexcharts-area`)>-1||f.indexOf(`apexcharts-rangeArea`)>-1||f.indexOf(`apexcharts-radar`)>-1),O=!!(S&&!y.globals.resized&&!y.globals.dataChanged&&D),k=y.config.chart.animations.largeDatasetThreshold??0,A=!!(E&&!O&&k>0&&y.globals.dataPoints>k),j=!!((p===`candlestick`||p===`boxPlot`)&&E&&!O&&y.globals.dataChanged&&!T),ee=A||j;E&&!O&&!ee?w=n:(w=r,E||(y.globals.animationEnded=!0));let te=y.config.stroke.dashArray,ne=0;ne=Array.isArray(te)?te[t]:y.config.stroke.dashArray;let M=this.drawPath({d:w,stroke:a,strokeWidth:o,fill:c,fillOpacity:1,classes:f,strokeLinecap:s,strokeDashArray:ne});M.attr(`index`,t),m&&(p===`bar`&&!y.globals.isBarHorizontal||y.globals.comboCharts?M.attr({"clip-path":`url(#gridRectBarMask${y.globals.cuid})`}):M.attr({"clip-path":`url(#gridRectMask${y.globals.cuid})`})),y.config.chart.dropShadow.enabled&&g&&b.dropShadow(M,y.config.chart.dropShadow,t),h&&(M.node.addEventListener(`mouseenter`,this.pathMouseEnter.bind(this,M)),M.node.addEventListener(`mouseleave`,this.pathMouseLeave.bind(this,M)),M.node.addEventListener(`mousedown`,this.pathMouseDown.bind(this,M))),M.attr({pathTo:r,pathFrom:n});let re={el:M,j:e,realIndex:t,pathFrom:n,pathTo:r,pathToInterp:i,fill:c,strokeWidth:o,delay:l,scrollMorph:v};if(S&&!y.globals.resized&&!y.globals.dataChanged)if(O){let n=u*2,r=a===`none`||o===0,i=y.seriesData.series.length,s=y.globals.comboCharts?!0:t===i-1;x.animateDraw(M,{realIndex:t,j:e,isFill:r,isLast:s,speed:n,delay:0,mask:_})}else ee||x.animatePathsGradually(U(H({},re),{speed:u}));else (y.globals.resized||!y.globals.dataChanged)&&!ee&&x.showDelayedElements();return E&&!ee&&(y.globals.dataChanged&&C||T)&&x.animatePathsGradually(U(H({},re),{speed:d})),ee&&x.revealBulk(M),M}drawPattern(e,t,n,r=`#a8a8a8`,i=0){return this.w.dom.Paper.pattern(t,n,a=>{e===`horizontalLines`?a.line(0,0,n,0).stroke({color:r,width:i+1}):e===`verticalLines`?a.line(0,0,0,t).stroke({color:r,width:i+1}):e===`slantedLines`?a.line(0,0,t,n).stroke({color:r,width:i}):e===`squares`?a.rect(t,n).fill(`none`).stroke({color:r,width:i}):e===`circles`&&a.circle(t).fill(`none`).stroke({color:r,width:i})})}drawGradient(e,t,n,r,i,a=null,o=null,s=[],c=0,l=!1){let u=this.w,d;t.length<9&&t.indexOf(`#`)===0&&(t=q.hexToRgba(t,r)),n.length<9&&n.indexOf(`#`)===0&&(n=q.hexToRgba(n,i));let f=0,p=1,m=1,h=null;o!==null&&(f=o[0]===void 0?0:o[0]/100,p=o[1]===void 0?1:o[1]/100,m=o[2]===void 0?1:o[2]/100,h=o[3]===void 0?null:o[3]/100);let g=u.config.chart.type===`donut`||u.config.chart.type===`pie`||u.config.chart.type===`polarArea`||u.config.chart.type===`bubble`;if(d=!s||s.length===0?u.dom.Paper.gradient(g?`radial`:`linear`,e=>{e.stop(f,t,r),e.stop(p,n,i),e.stop(m,n,i),h!==null&&e.stop(h,t,r)}):u.dom.Paper.gradient(g?`radial`:`linear`,e=>{(Array.isArray(s[c])?s[c]:Array.isArray(s[0])?s[0]||[]:s).forEach(t=>{e.stop(t.offset/100,t.color,t.opacity)})}),!g)e===`vertical`?l?(d.attr({gradientUnits:`userSpaceOnUse`}),d.from(0,0).to(0,u.layout.gridHeight)):d.from(0,0).to(0,1):e===`diagonal`?d.from(0,0).to(1,1):e===`horizontal`?d.from(0,1).to(1,1):e===`diagonal2`&&d.from(1,0).to(0,1);else{let e=u.layout.gridWidth/2,t=u.layout.gridHeight/2;u.config.chart.type===`bubble`?d.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2}):d.attr({gradientUnits:`userSpaceOnUse`,cx:e,cy:t,r:a})}return d}getTextBasedOnMaxWidth({text:e,maxWidth:t,fontSize:n,fontFamily:r}){let i=this.getTextRects(e,n,r,``),a=i.width/e.length,o=Math.floor(t/a);return t<i.width?e.slice(0,o-3)+`...`:e}drawText({x:e,y:t,text:n,textAnchor:r,fontSize:i,fontFamily:a,fontWeight:o,foreColor:s,opacity:c,maxWidth:l,cssClass:u=``,isPlainText:d=!0,dominantBaseline:f=`auto`}){let p=this.w;n===void 0&&(n=``);let m=n;r||=`start`,(!s||!s.length)&&(s=p.config.chart.foreColor),a||=p.config.chart.fontFamily,i||=`11px`,o||=`regular`;let h={maxWidth:l,fontSize:i,fontFamily:a},g;return Array.isArray(n)?g=p.dom.Paper.text(e=>{for(let t=0;t<n.length;t++)m=n[t],l&&(m=this.getTextBasedOnMaxWidth(H({text:n[t]},h))),t===0?e.tspan(m):e.tspan(m).newLine()}):(l&&(m=this.getTextBasedOnMaxWidth(H({text:n},h))),g=d?p.dom.Paper.plain(n):p.dom.Paper.text(e=>e.tspan(m))),g.attr({x:e,y:t,"text-anchor":r,"dominant-baseline":f,"font-size":i,"font-family":a,"font-weight":o,fill:s,class:`apexcharts-text `+u}),g.node.style.fontFamily=a,g.node.style.opacity=c,g}getMarkerPath(e,t,n,r){let i=``;switch(n){case`cross`:r/=1.4,i=`M ${e-r} ${t-r} L ${e+r} ${t+r} M ${e-r} ${t+r} L ${e+r} ${t-r}`;break;case`plus`:r/=1.12,i=`M ${e-r} ${t} L ${e+r} ${t} M ${e} ${t-r} L ${e} ${t+r}`;break;case`star`:case`sparkle`:{let a=5;r*=1.15,n===`sparkle`&&(r/=1.1,a=4);let o=Math.PI/a;for(let n=0;n<=2*a;n++){let a=n*o,s=n%2==0?r:r/2,c=e+s*Math.sin(a),l=t-s*Math.cos(a);i+=(n===0?`M`:`L`)+c+`,`+l}i+=`Z`;break}case`triangle`:i=`M ${e} ${t-r}
|
|
584
584
|
L ${e+r} ${t+r}
|
|
585
585
|
L ${e-r} ${t+r}
|
|
586
586
|
Z`;break;case`square`:case`rect`:r/=1.125,i=`M ${e-r} ${t-r}
|
|
@@ -2521,7 +2521,7 @@ rect.legend-mouseover-inactive,
|
|
|
2521
2521
|
`,B_=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2522
2522
|
<path d="M4 6h16M4 12h16M4 18h16"/>
|
|
2523
2523
|
</svg>
|
|
2524
|
-
`,V_=class{constructor(e,t){this.w=e,this.ctx=t,this.ev=this.w.config.chart.events,this.selectedClass=`apexcharts-selected`,this.localeValues=this.w.globals.locale.toolbar,this.minX=e.globals.minX,this.maxX=e.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){var e,t;let n=this.w,r=()=>Q.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),i=()=>{let e=Q.createElementNS(`http://www.w3.org/1999/xhtml`,`button`);return e.setAttribute(`type`,`button`),e},a=r();if(a.setAttribute(`class`,`apexcharts-toolbar`),a.style.top=n.config.chart.toolbar.offsetY+`px`,a.style.right=-n.config.chart.toolbar.offsetX+3+`px`,n.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elMeasure=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=r(),this.elCustomIcons=[],this.t=n.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons.push(i());let o=[],s=(e,t,r)=>{let i=e.toLowerCase();this.t[i]&&n.config.chart.zoom.enabled&&o.push({el:t,icon:typeof this.t[i]==`string`?this.t[i]:r,title:this.localeValues[e],class:`apexcharts-${i}-icon`})};s(`zoomIn`,this.elZoomIn,I_),s(`zoomOut`,this.elZoomOut,L_);let c=e=>{this.t[e]&&n.config.chart[e].enabled&&o.push({el:e===`zoom`?this.elZoom:this.elSelection,icon:typeof this.t[e]==`string`?this.t[e]:e===`zoom`?P_:R_,title:this.localeValues[e===`zoom`?`selectionZoom`:`selection`],class:`apexcharts-${e}-icon`})};c(`zoom`),c(`selection`),this.t.pan&&n.config.chart.zoom.enabled&&o.push({el:this.elPan,icon:typeof this.t.pan==`string`?this.t.pan:N_,title:this.localeValues.pan,class:`apexcharts-pan-icon`}),this.t.measure&&n.config.chart.measure&&n.config.chart.measure.enabled&&o.push({el:this.elMeasure,icon:typeof this.t.measure==`string`?this.t.measure:z_,title:this.localeValues.measure||`Measure`,class:`apexcharts-measure-icon`}),s(`reset`,this.elZoomReset,F_),this.t.download&&o.push({el:this.elMenuIcon,icon:typeof this.t.download==`string`?this.t.download:B_,title:this.localeValues.menu,class:`apexcharts-menu-icon`});for(let e=0;e<this.elCustomIcons.length;e++)o.push({el:this.elCustomIcons[e],icon:this.t.customIcons[e].icon,title:this.t.customIcons[e].title,index:this.t.customIcons[e].index,class:`apexcharts-toolbar-custom-icon `+this.t.customIcons[e].class});o.forEach((e,t)=>{e.index&&$.moveIndexInArray(o,t,e.index)});for(let e=0;e<o.length;e++)Z.setAttrs(o[e].el,{class:o[e].class,title:o[e].title,"aria-label":o[e].title}),o[e].el.innerHTML=o[e].icon,a.appendChild(o[e].el);this.elZoom.parentNode&&this.elZoom.setAttribute(`aria-pressed`,String(!!n.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute(`aria-pressed`,String(!!n.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute(`aria-pressed`,String(!!n.interact.panEnabled)),this.elMeasure.parentNode&&this.elMeasure.setAttribute(`aria-pressed`,String(!!n.interact.measureEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute(`aria-haspopup`,`true`),this.elMenuIcon.setAttribute(`aria-expanded`,`false`)),this._createHamburgerMenu(a),n.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):n.interact.panEnabled?this.elPan.classList.add(this.selectedClass):n.interact.selectionEnabled?this.elSelection.classList.add(this.selectedClass):n.interact.measureEnabled&&this.elMeasure&&(this.elMeasure.classList.add(this.selectedClass),(t=(e=this.ctx.measure)?.startMeasure)==null||t.call(e)),this.addToolbarEventListeners()}_createHamburgerMenu(e){this.elMenuItems=[],e.appendChild(this.elMenu),Z.setAttrs(this.elMenu,{class:`apexcharts-menu`,role:`menu`});let t=[{name:`exportSVG`,title:this.localeValues.exportToSVG},{name:`exportPNG`,title:this.localeValues.exportToPNG},{name:`exportCSV`,title:this.localeValues.exportToCSV}];for(let e=0;e<t.length;e++)this.elMenuItems.push(Q.createElementNS(`http://www.w3.org/1999/xhtml`,`div`)),this.elMenuItems[e].innerHTML=t[e].title,Z.setAttrs(this.elMenuItems[e],{class:`apexcharts-menu-item ${t[e].name}`,title:t[e].title,role:`menuitem`,tabindex:`-1`}),this.elMenu.appendChild(this.elMenuItems[e])}addToolbarEventListeners(){var e,t,n,r,i,a,o,s,c;(e=this.elZoomReset)==null||e.addEventListener(`click`,this.handleZoomReset.bind(this)),(t=this.elSelection)==null||t.addEventListener(`click`,this.toggleZoomSelection.bind(this,`selection`)),(n=this.elZoom)==null||n.addEventListener(`click`,this.toggleZoomSelection.bind(this,`zoom`)),(r=this.elZoomIn)==null||r.addEventListener(`click`,this.handleZoomIn.bind(this)),(i=this.elZoomOut)==null||i.addEventListener(`click`,this.handleZoomOut.bind(this)),(a=this.elPan)==null||a.addEventListener(`click`,this.togglePanning.bind(this)),(o=this.elMeasure)==null||o.addEventListener(`click`,this.toggleMeasure.bind(this)),(s=this.elMenuIcon)==null||s.addEventListener(`click`,this.toggleMenu.bind(this)),this.elMenuItems.forEach(e=>{e.classList.contains(`exportSVG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`svg`)):e.classList.contains(`exportPNG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`png`)):e.classList.contains(`exportCSV`)&&e.addEventListener(`click`,this.handleDownload.bind(this,`csv`))});for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener(`click`,this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMeasure,this.elMenuIcon,...this.elCustomIcons].forEach(e=>{e.addEventListener(`keydown`,t=>{if(t.key===`Enter`||t.key===` `){t.preventDefault();let n=e.className;e.click(),requestAnimationFrame(()=>{let e=this.w.dom.baseEl;if(!e)return;let t=n.split(` `).find(e=>e.startsWith(`apexcharts-`));if(!t)return;let r=e.querySelector(`.${t}`);r&&r.focus()})}})}),(c=this.elMenuIcon)==null||c.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this.elMenu?.classList.contains(`apexcharts-menu-open`)||this.toggleMenu(),window.setTimeout(()=>{let t=e.key===`ArrowDown`?0:this.elMenuItems.length-1;this.elMenuItems[t]&&this.elMenuItems[t].focus()},20))}),this.elMenuItems.forEach((e,t)=>{e.addEventListener(`keydown`,n=>{var r;n.key===`ArrowDown`?(n.preventDefault(),(this.elMenuItems[t+1]||this.elMenuItems[0]).focus()):n.key===`ArrowUp`?(n.preventDefault(),(this.elMenuItems[t-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):n.key===`Escape`||n.key===`Tab`?(this._closeMenu(),(r=this.elMenuIcon)==null||r.focus(),n.key===`Tab`||n.preventDefault()):(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),e.click())})})}toggleZoomSelection(e){this.ctx.getSyncedCharts().forEach(t=>{let n=t.ctx.toolbar,r=e===`selection`?`selectionEnabled`:`zoomEnabled`,i=!!t.w.globals[r];n.toggleOtherControls();let a=e===`selection`?n.elSelection:n.elZoom;i||(t.w.globals[r]=!0,a.classList.add(n.selectedClass)),a.setAttribute(`aria-pressed`,String(!!t.w.globals[r]))})}toggleMeasure(){var e,t,n,r;let i=this.w,a=!i.interact.measureEnabled;this.toggleOtherControls(),a&&(i.interact.measureEnabled=!0,(e=this.elMeasure)==null||e.classList.add(this.selectedClass),(n=(t=this.ctx.measure)?.startMeasure)==null||n.call(t)),(r=this.elMeasure)==null||r.setAttribute(`aria-pressed`,String(i.interact.measureEnabled))}getToolbarIconsReference(){let e=this.w;this.elZoom||=e.dom.baseEl.querySelector(`.apexcharts-zoom-icon`),this.elPan||=e.dom.baseEl.querySelector(`.apexcharts-pan-icon`),this.elSelection||=e.dom.baseEl.querySelector(`.apexcharts-selection-icon`),this.elMeasure||=e.dom.baseEl.querySelector(`.apexcharts-measure-icon`)}enableZoomPanFromToolbar(e){this.toggleOtherControls(),e===`pan`?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;let t=e===`pan`?this.elPan:this.elZoom,n=e===`pan`?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),n&&n.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{let t=e.ctx.toolbar,n=!!e.w.interact.panEnabled;t.toggleOtherControls(),n||(e.w.interact.panEnabled=!0,t.elPan.classList.add(t.selectedClass)),t.elPan.setAttribute(`aria-pressed`,String(!!e.w.interact.panEnabled))})}toggleOtherControls(){var e,t,n;let r=this.w;r.interact.panEnabled=!1,r.interact.zoomEnabled=!1,r.interact.selectionEnabled=!1,r.interact.measureEnabled&&(r.interact.measureEnabled=!1,(t=(e=this.ctx.measure)?.stopMeasure)==null||t.call(e),(n=this.elMeasure)==null||n.setAttribute(`aria-pressed`,`false`)),this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom,this.elMeasure].forEach(e=>{e&&e.classList.remove(this.selectedClass)})}_currentXRange(){let e=this.w;return e.axisFlags.isRangeBar?{minX:e.globals.minY,maxX:e.globals.maxY}:{minX:e.globals.minX,maxX:e.globals.maxX}}handleZoomIn(){let e=this.w,{minX:t,maxX:n}=this._currentXRange();this.minX=t,this.maxX=n;let r=(t+n)/2,i=(t+r)/2,a=(n+r)/2,o=this._getNewMinXMaxX(i,a);e.interact.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}handleZoomOut(){let e=this.w,{minX:t,maxX:n}=this._currentXRange();if(this.minX=t,this.maxX=n,e.config.xaxis.type===`datetime`&&new Date(t).getUTCFullYear()<1e3)return;let r=(t+n)/2,i=t-(r-t),a=n-(r-n),o=this._getNewMinXMaxX(i,a);e.interact.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}_getNewMinXMaxX(e,t){let n=this.w.config.xaxis.convertedCatToNumeric;return{minX:n?Math.floor(e):e,maxX:n?Math.floor(t):t}}zoomUpdateOptions(e,t){let n=this.w;if(e===void 0&&t===void 0){this.handleZoomReset();return}if(n.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=n.globals.dataPoints),t-e<2))return;let r={min:e,max:t},i=this.getBeforeZoomRange(r,void 0);i&&(r=i.xaxis);let a={xaxis:r};if(!n.globals.initialConfig)return;let o=$.clone(n.globals.initialConfig.yaxis);n.config.chart.group||(a.yaxis=o),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(a,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(r,o)}zoomCallback(e,t){typeof this.ev.zoomed==`function`&&(this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t}),this.ctx.events.fireEvent(`zoomed`,{xaxis:e,yaxis:t}))}getBeforeZoomRange(e,t){let n=null;return typeof this.ev.beforeZoom==`function`&&(n=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),n}toggleMenu(){window.setTimeout(()=>{var e,t;this.elMenu?.classList.contains(`apexcharts-menu-open`)?this._closeMenu():((e=this.elMenu)==null||e.classList.add(`apexcharts-menu-open`),(t=this.elMenuIcon)==null||t.setAttribute(`aria-expanded`,`true`))},0)}_closeMenu(){var e,t;(e=this.elMenu)==null||e.classList.remove(`apexcharts-menu-open`),(t=this.elMenuIcon)==null||t.setAttribute(`aria-expanded`,`false`)}handleDownload(e){let t=this.w,n=new __(this.w,this.ctx);switch(e){case`svg`:n.exportToSVG();break;case`png`:n.exportToPng();break;case`csv`:n.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter});break}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{let t=e.w;if(!t.interact.zoomed)return;if(t.globals.lastXAxis.min=t.globals.initialConfig.xaxis.min,t.globals.lastXAxis.max=t.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof t.config.chart.events.beforeResetZoom==`function`){let n=t.config.chart.events.beforeResetZoom(e,t);n&&e.updateHelpers.revertDefaultAxisMinMax(n)}typeof t.config.chart.events.zoomed==`function`&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max});let n=e.ctx.series.emptyCollapsedSeries($.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(n,t.config.chart.animations.dynamicAnimation.enabled),t.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null}},H_=class e{static xRatio(e){let t=e.layout.gridWidth||1;return(e.globals.maxX-e.globals.minX)/t}static dataXToPx(t,n){return(n-t.globals.minX)/e.xRatio(t)}static pxToDataX(t,n){return t.globals.minX+n*e.xRatio(t)}static screenXToPlotPx(e,t){let n=e.dom.baseEl,r=n&&n.querySelector(`.apexcharts-svg`);if(!r)return t-e.layout.translateX;let i=r.getBoundingClientRect(),a=e.globals.svgWidth?i.width/e.globals.svgWidth:1;return(t-i.left)/(a||1)-e.layout.translateX}},U_=240,W_=.05,G_=.92,K_=.02,q_=16.6667,J_=15,Y_=0,X_=class extends V_{constructor(e,t){super(e,t),this.w=e,this.ctx=t,this.dragged=!1,this.graphics=new Z(this.w),this.eventList=[`mousedown`,`mouseleave`,`mousemove`,`touchstart`,`touchmove`,`mouseup`,`touchend`],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection=`none`}init({xyRatios:e}){let t=this.w,n=this;this.xyRatios=e,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.constraints=new n_(0,0,t.layout.gridWidth,t.layout.gridHeight),this.zoomRect.node.classList.add(`apexcharts-zoom-rect`),this.selectionRect.node.classList.add(`apexcharts-selection-rect`),t.dom.Paper.add(this.zoomRect),t.dom.Paper.add(this.selectionRect),t.config.chart.selection.type===`x`?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:t.layout.gridWidth,maxY:t.layout.gridHeight}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):t.config.chart.selection.type===`y`?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:t.layout.gridWidth}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):this.slDraggableRect=this.selectionRect.draggable().on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)),this.preselectedSelection(),this.hoverArea=t.dom.baseEl.querySelector(`${t.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add(`apexcharts-zoomable`),this.eventList.forEach(t=>{var r;(r=this.hoverArea)==null||r.addEventListener(t,n.svgMouseEvents.bind(n,e),{capture:!1,passive:!0})}),this._wheelZoomEnabled()&&this.hoverArea.addEventListener(`wheel`,n.mouseWheelEvent.bind(n),{capture:!1,passive:!1}),this._momentumEnabled()&&[`touchstart`,`touchmove`,`touchend`,`touchcancel`].forEach(e=>{var t;(t=this.hoverArea)==null||t.addEventListener(e,n.momentumTouch.bind(n),{capture:!1,passive:!1})}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null}svgMouseEvents(e,t){let n=this.w,r=this.ctx.toolbar;if(n.interact.momentum&&n.interact.momentum.busy||this._momentumEnabled()&&t.touches&&t.touches.length>1)return;let i=n.interact.zoomEnabled?n.config.chart.zoom.type:n.config.chart.selection.type,a=n.config.chart.toolbar.autoSelected;if(a!==`measure`&&(t.shiftKey?(n.interact.shiftWasPressed=!0,r.enableZoomPanFromToolbar(a===`pan`?`zoom`:`pan`)):n.interact.shiftWasPressed&&(r.enableZoomPanFromToolbar(a),n.interact.shiftWasPressed=!1)),!t.target)return;let o=t.target.classList,s;if(t.target.parentNode&&t.target.parentNode!==null&&(s=t.target.parentNode.classList),!(o.contains(`apexcharts-legend-marker`)||o.contains(`apexcharts-legend-text`)||s&&s.contains(`apexcharts-toolbar`))){if(this.clientX=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientX:t.type===`touchend`?t.changedTouches[0].clientX:t.clientX,this.clientY=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientY:t.type===`touchend`?t.changedTouches[0].clientY:t.clientY,t.type===`mousedown`&&t.which===1||t.type===`touchstart`){let e=this._gridRect();if(!e)return;this.startX=this._screenXToPlotPx(this.clientX),this.startY=this.clientY-e.top,this.dragged=!1,this.w.interact.mousedown=!0}(t.type===`mousemove`&&t.which===1||t.type===`touchmove`)&&(this.dragged=!0,n.interact.panEnabled?(n.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:i,xyRatios:this.xyRatios})):(this.w.interact.mousedown&&n.interact.zoomEnabled||this.w.interact.mousedown&&n.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:i}))),(t.type===`mouseup`||t.type===`touchend`||t.type===`mouseleave`)&&this.handleMouseUp({zoomtype:i}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:e,isResized:t}){let n=this.w,r=this._gridRect();r&&(this.w.interact.mousedown||t)&&(this.endX=this._screenXToPlotPx(this.clientX),this.endY=this.clientY-r.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(n.interact.zoomEnabled||n.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:e})),n.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}_incidentalZoomEnabled(e){let t=this.w.config.chart;return!t.zoom||!t.zoom.enabled?!1:e===`auto`?!!(t.toolbar?.show&&t.toolbar?.tools?.reset):!!e}_wheelZoomEnabled(){let{zoom:e}=this.w.config.chart;return this._incidentalZoomEnabled(e&&e.allowMouseWheelZoom)}_wheel(){let e=this.w.interact;return e.wheel||={factor:1,clientX:0,rafId:null,endTimer:null},e.wheel}mouseWheelEvent(e){e.preventDefault();let t=this._wheel(),n=e.deltaY;e.deltaMode===1?n*=33:e.deltaMode===2&&(n*=330),t.factor*=2**(n/U_),t.clientX=e.clientX,t.rafId??=requestAnimationFrame(()=>this._applyWheelZoom()),t.endTimer&&clearTimeout(t.endTimer),t.endTimer=setTimeout(()=>this._endWheelZoom(),150)}_applyWheelZoom(){let e=this.w,t=this._wheel();t.rafId=null;let n=t.factor;if(t.factor=1,n===1||e.globals.isDestroyed)return;let r=this._gridRect();if(!r||!r.width)return;let{min:i,max:a}=this._currentXWindow(),o=a-i,s=Math.min(Math.max((t.clientX-r.left)/r.width,0),1),c=o*n,l=this._clampBounds();if(l){let t=e.globals.minXDiff>0&&isFinite(e.globals.minXDiff)?e.globals.minXDiff:0,n=Math.max(t*2,(l.max-l.min)*1e-6);c<n&&(c=n),c>l.max-l.min&&(c=l.max-l.min)}let u=i+s*o-s*c,d=u+c,f=o*1e-9;if(Math.abs(u-i)<f&&Math.abs(d-a)<f||isNaN(u)||isNaN(d))return;let p=this.getBeforeZoomRange({min:u,max:d},void 0);p&&p.xaxis&&(u=p.xaxis.min,d=p.xaxis.max),this._applyXRange(u,d,!0)}_endWheelZoom(){let e=this.w,t=this._wheel();if(t.endTimer=null,e.globals.isDestroyed||!e.interact.zoomed)return;let{min:n,max:r}=this._currentXWindow(),i=e.globals.initialConfig?$.clone(e.globals.initialConfig.yaxis):[],a=this.ctx.toolbar;a&&a.zoomCallback({min:n,max:r},i)}makeSelectionRectDraggable(){let e=this.w;if(!this.selectionRect)return;let t=this.selectionRect.node.getBoundingClientRect();t.width>0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(e,t,n,r,i)=>i===`l`||i===`r`?e.circle(8).css({"stroke-width":1,stroke:`#333`,fill:`#fff`}):e.circle(0),updateHandle:(e,t)=>e.center(t[0],t[1])}).resize().on(`resize`,()=>{if(this._clampSelectionRectToPlot(),e.interact.selectionEnabled)e.interact.selection={x:parseFloat(this.selectionRect.node.getAttribute(`x`)),y:parseFloat(this.selectionRect.node.getAttribute(`y`)),width:parseFloat(this.selectionRect.node.getAttribute(`width`)),height:parseFloat(this.selectionRect.node.getAttribute(`height`))},clearTimeout(this.w.globals.selectionResizeTimer??void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},30);else{let t=e.interact.zoomEnabled?e.config.chart.zoom.type:e.config.chart.selection.type;this.handleMouseUp({zoomtype:t,isResized:!0})}}))}preselectedSelection(){let e=this.w,t=this.xyRatios;if(!e.interact.zoomEnabled){if(e.interact.selection!==void 0&&e.interact.selection!==null)this.drawSelectionRect(X(Y({},e.interact.selection),{translateX:e.layout.translateX,translateY:e.layout.translateY}));else if(e.config.chart.selection.xaxis.min!==void 0&&e.config.chart.selection.xaxis.max!==void 0){let n=H_.dataXToPx(e,e.config.chart.selection.xaxis.min),r=H_.dataXToPx(e,e.config.chart.selection.xaxis.max)-n;e.axisFlags.isRangeBar&&(n=(e.config.chart.selection.xaxis.min-e.globals.yAxisScale[0].niceMin)/t.invertedYRatio,r=(e.config.chart.selection.xaxis.max-e.config.chart.selection.xaxis.min)/t.invertedYRatio);let i={x:n,y:0,width:r,height:e.layout.gridHeight,translateX:e.layout.translateX,translateY:e.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(i),this.makeSelectionRectDraggable(),typeof e.config.chart.events.selection==`function`&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:e,y:t,width:n,height:r,translateX:i=0,translateY:a=0}){let o=this.w,s=this.zoomRect,c=this.selectionRect;if(this.dragged||o.interact.selection!==null){let l={transform:`translate(`+i+`, `+a+`)`};o.interact.zoomEnabled&&this.dragged&&(n<0&&(n=1),s.attr({x:e,y:t,width:n,height:r,fill:o.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":o.config.chart.zoom.zoomedArea.fill.opacity,stroke:o.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":o.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":o.config.chart.zoom.zoomedArea.stroke.opacity}),Z.setAttrs(s.node,l)),o.interact.selectionEnabled&&(c.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,fill:o.config.chart.selection.fill.color,"fill-opacity":o.config.chart.selection.fill.opacity,stroke:o.config.chart.selection.stroke.color,"stroke-width":o.config.chart.selection.stroke.width,"stroke-dasharray":o.config.chart.selection.stroke.dashArray,"stroke-opacity":o.config.chart.selection.stroke.opacity}),Z.setAttrs(c.node,l))}}_clampSelectionRectToPlot(){let e=this.selectionRect;if(!e||!e.node)return;let t=this.w.layout.gridWidth;if(!(t>Y_))return;let n=parseFloat(e.node.getAttribute(`x`))||0,r=parseFloat(e.node.getAttribute(`width`))||0,i=e=>Math.min(Math.max(e,Y_),t),a=i(n),o=i(n+r);a===n&&o===n+r||(e.attr({x:a,width:o-a}),e._updateSelectPositions&&e._updateSelectPositions())}hideSelectionRect(e){e&&e.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:e,zoomtype:t}){let n=this.w,r=e,i=this._gridRect();if(!i)return;let a=r.startX-1,o=r.startY,s=!1,c=!1,l=this._screenXToPlotPx(r.clientX),u=r.clientY-i.top,d=l-a,f=u-o,p={translateX:n.layout.translateX,translateY:n.layout.translateY};return Math.abs(d+a)>n.layout.gridWidth?d=n.layout.gridWidth-a:l<0&&(d=a),a>l&&(s=!0,d=Math.abs(d)),o>u&&(c=!0,f=Math.abs(f)),p=t===`x`?{x:s?a-d:a,y:0,width:d,height:n.layout.gridHeight}:t===`y`?{x:0,y:c?o-f:o,width:n.layout.gridWidth,height:f}:{x:s?a-d:a,y:c?o-f:o,width:d,height:f},p=X(Y({},p),{translateX:n.layout.translateX,translateY:n.layout.translateY}),r.drawSelectionRect(p),r.selectionDragging(`resizing`),p}selectionDragging(e,t){let n=this.w;if(!t)return;t.preventDefault();let{handler:r,box:i}=t.detail,a=this.constraints,{x:o,y:s}=i;o<a.x&&(o=a.x),s<a.y&&(s=a.y),i.x2>a.x2&&(o=a.x2-i.w),i.y2>a.y2&&(s=a.y2-i.h),r.move(o,s);let c=this.selectionRect,l=0;e===`resizing`&&(l=30);let u=e=>parseFloat(c.node.getAttribute(e)),d={x:u(`x`),y:u(`y`),width:u(`width`),height:u(`height`)};n.interact.selection=d;let f=n.config.chart.link,p=!!(f&&(f.enabled||typeof f.dimension==`function`));(typeof n.config.chart.events.selection==`function`||p)&&n.interact.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer??void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},l))}_emitSelectionFromRect(){var e;let t=this.w;if(!t.interact.selectionEnabled)return;let n=t.config.chart.link,r=!!(n&&(n.enabled||typeof n.dimension==`function`));if(typeof t.config.chart.events.selection!=`function`&&!r)return;let i=this._gridRect();if(!i)return;let a=this.selectionRect.node.getBoundingClientRect(),o=this.xyRatios,s,c,l,u,d=this._screenXToPlotPx(a.left),f=this._screenXToPlotPx(a.right);if(t.axisFlags.isRangeBar)s=t.globals.yAxisScale[0].niceMin+d*o.invertedYRatio,c=t.globals.yAxisScale[0].niceMin+f*o.invertedYRatio,l=0,u=1;else{if(!t.globals.xAxisScale)return;s=H_.pxToDataX(t,d),c=H_.pxToDataX(t,f),l=t.globals.yAxisScale[0].niceMin+(i.bottom-a.bottom)*o.yRatio[0],u=t.globals.yAxisScale[0].niceMax-(a.top-i.top)*o.yRatio[0]}let p={xaxis:{min:s,max:c},yaxis:{min:l,max:u}};typeof t.config.chart.events.selection==`function`&&t.config.chart.events.selection(this.ctx,p),t.config.chart.brush.enabled&&t.config.chart.events.brushScrolled!==void 0&&t.config.chart.events.brushScrolled(this.ctx,p),(e=this.ctx.linkedViews)==null||e.onSourceSelection(p.xaxis)}selectionDrawn({context:e,zoomtype:t}){var n;let r=this.w,i=e,a=this.xyRatios,o=this.ctx.toolbar,s=r.interact.zoomEnabled?i.zoomRect.node.getBoundingClientRect():i.selectionRect.node.getBoundingClientRect(),c=i._gridRect();if(!c)return;let l=this._screenXToPlotPx(s.left),u=this._screenXToPlotPx(s.right),d=s.top-c.top,f=s.bottom-c.top,p,m;r.axisFlags.isRangeBar?(p=r.globals.yAxisScale[0].niceMin+l*a.invertedYRatio,m=r.globals.yAxisScale[0].niceMin+u*a.invertedYRatio):(p=H_.pxToDataX(r,l),m=H_.pxToDataX(r,u));let h=[],g=[];if(r.config.yaxis.forEach((e,t)=>{let n=r.globals.seriesYAxisMap[t][0],i=r.globals.yAxisScale[t].niceMax-a.yRatio[n]*d,o=r.globals.yAxisScale[t].niceMax-a.yRatio[n]*f;h.push(i),g.push(o)}),i.dragged&&(i.dragX>10||i.dragY>10)&&p!==m){if(r.interact.zoomEnabled){if(!r.globals.initialConfig)return;let e=$.clone(r.globals.initialConfig.yaxis),n=$.clone(r.globals.initialConfig.xaxis);if(r.interact.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(p=Math.floor(p),m=Math.floor(m),p<1&&(p=1,m=r.globals.dataPoints),m-p<2&&(m=p+1)),(t===`xy`||t===`x`)&&(n={min:p,max:m}),(t===`xy`||t===`y`)&&e.forEach((t,n)=>{e[n].min=g[n],e[n].max=h[n]}),o){let t=o.getBeforeZoomRange(n,e);t&&(n=t.xaxis?t.xaxis:n,e=t.yaxis?t.yaxis:e)}let a={xaxis:n};r.config.chart.group||(a.yaxis=e),i.ctx.updateHelpers._updateOptions(a,!1,i.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed==`function`&&o.zoomCallback(n,e)}else if(r.interact.selectionEnabled){let e=null,a=null;if(a={min:p,max:m},t===`xy`||t===`y`){let t=$.clone(r.config.yaxis);e=t,t.forEach((e,n)=>{t[n].min=g[n],t[n].max=h[n]})}r.interact.selection=i.selection,typeof r.config.chart.events.selection==`function`&&r.config.chart.events.selection(i.ctx,{xaxis:a,yaxis:e}),(n=i.ctx.linkedViews)==null||n.onSourceSelection(a)}}}panDragging({context:e}){let t=this.w,n=e;if(t.interact.lastClientPosition.x!==void 0){let e=t.interact.lastClientPosition.x-n.clientX,r=(t.interact.lastClientPosition.y??0)-n.clientY;Math.abs(e)>Math.abs(r)&&e>0?this.moveDirection=`left`:Math.abs(e)>Math.abs(r)&&e<0?this.moveDirection=`right`:Math.abs(r)>Math.abs(e)&&r>0?this.moveDirection=`up`:Math.abs(r)>Math.abs(e)&&r<0&&(this.moveDirection=`down`)}t.interact.lastClientPosition={x:n.clientX,y:n.clientY};let r=t.axisFlags.isRangeBar?t.globals.minY:t.globals.minX,i=t.axisFlags.isRangeBar?t.globals.maxY:t.globals.maxX;n.panScrolled(r,i)}panScrolled(e,t){let n=this.w,r=this.xyRatios;if(!n.globals.initialConfig)return;let i=$.clone(n.globals.initialConfig.yaxis),a=r.xRatio,o=n.globals.minX,s=n.globals.maxX;if(n.axisFlags.isRangeBar&&(a=r.invertedYRatio,o=n.globals.minY,s=n.globals.maxY),this.moveDirection===`left`?(e=o+n.layout.gridWidth/J_*a,t=s+n.layout.gridWidth/J_*a):this.moveDirection===`right`&&(e=o-n.layout.gridWidth/J_*a,t=s-n.layout.gridWidth/J_*a),!n.axisFlags.isRangeBar){let r=n.globals.dataReducerRawMinX??n.globals.initialMinX,i=n.globals.dataReducerRawMaxX??n.globals.initialMaxX;(e<r||t>i)&&(e=o,t=s)}let c={xaxis:{min:e,max:t}};n.config.chart.group||(c.yaxis=i),this.updateScrolledChart(c,e,t)}updateScrolledChart(e,t,n){let r=this.w;if(this.ctx.updateHelpers._updateOptions(e,!1,!1),typeof r.config.chart.events.scrolled==`function`){let e={xaxis:{min:t,max:n}};r.config.chart.events.scrolled(this.ctx,e),this.ctx.events.fireEvent(`scrolled`,e)}}_momentumEnabled(){return this._pinchEnabled()||this._panInertiaEnabled()}_pinchEnabled(){return this._incidentalZoomEnabled(this.w.config.chart.zoom.pinch)}_panInertiaEnabled(){let e=this.w.config.chart;return!!(e.pan&&e.pan.inertia)}_m(){let e=this.w.interact;return e.momentum||={busy:!1,pinch:null,panState:null,samples:[],inertiaRAF:null},e.momentum}_currentXWindow(){let e=this.w;return e.axisFlags.isRangeBar?{min:e.globals.minY,max:e.globals.maxY}:{min:e.globals.minX,max:e.globals.maxX}}_gridRect(){let e=this.w.dom.baseEl,t=e&&e.querySelector(`.apexcharts-grid`);return t?t.getBoundingClientRect():null}_screenXToPlotPx(e){return H_.screenXToPlotPx(this.w,e)}_clampBounds(){let e=this.w;return e.axisFlags.isRangeBar?null:{min:e.globals.dataReducerRawMinX??e.globals.initialMinX,max:e.globals.dataReducerRawMaxX??e.globals.initialMaxX}}_applyXRange(e,t,n){let r=this.w;if(!r.globals.initialConfig)return!1;let i=this._currentXWindow(),a=n&&t-e>i.max-i.min,o=this._clampBounds();if(o){let n=t-e;e<o.min&&(e=o.min,t=e+n),t>o.max&&(t=o.max,e=t-n),e<o.min&&(e=o.min)}if(r.config.xaxis.convertedCatToNumeric&&(e=Math.floor(e),t=a?Math.ceil(t):Math.floor(t),e<1&&(e=1),o&&t>o.max&&(t=Math.floor(o.max)),t-e<2)||!(t>e))return!1;let s={xaxis:{min:e,max:t}};return r.config.chart.group||(s.yaxis=$.clone(r.globals.initialConfig.yaxis)),n&&(r.interact.zoomed=!0),this.ctx.updateHelpers._updateOptions(s,!1,!1),{minX:e,maxX:t}}_cancelInertia(){let e=this._m();e.inertiaRAF!=null&&(cancelAnimationFrame(e.inertiaRAF),e.inertiaRAF=null)}_fireScrolled(){let e=this.w;if(typeof e.config.chart.events.scrolled!=`function`)return;let{min:t,max:n}=this._currentXWindow(),r={xaxis:{min:t,max:n}};e.config.chart.events.scrolled(this.ctx,r),this.ctx.events.fireEvent(`scrolled`,r)}_pushSample(e,t){let n=this._m().samples;for(n.push({x:e,t});n.length>6;)n.shift()}momentumTouch(e){let t=this.w,n=this._m(),r=e.type;if(r===`touchstart`){this._cancelInertia();let r=this._gridRect();if(!r)return;if(e.touches.length>=2&&this._pinchEnabled())e.preventDefault(),n.busy=!0,n.panState=null,this._beginPinch(e,r);else if(e.touches.length===1&&this._panInertiaEnabled()&&t.interact.panEnabled){n.busy=!0,n.pinch=null;let r=e.touches[0],i=this._currentXWindow(),a=t.layout.gridWidth||1;n.panState={startX:r.clientX,startY:r.clientY,axis:null,minX0:i.min,maxX0:i.max,ratio0:(i.max-i.min)/a},n.samples=[{x:r.clientX,t:e.timeStamp}]}return}if(r===`touchmove`){n.pinch&&e.touches.length>=2?(e.preventDefault(),this._movePinch(e)):n.panState&&e.touches.length===1&&this._movePan(e);return}n.pinch?e.touches.length<2&&this._endPinch():n.panState&&e.touches.length===0&&this._endPan(),e.touches.length===0&&(t.interact.mousedown=!1,this.dragged=!1,n.inertiaRAF==null&&!n.pinch&&!n.panState&&(n.busy=!1))}_beginPinch(e,t){let n=this.w,r=e.touches[0],i=e.touches[1],a=Math.hypot(i.clientX-r.clientX,i.clientY-r.clientY)||1,o=(r.clientX+i.clientX)/2-t.left-n.globals.barPadForNumericAxis,{min:s,max:c}=this._currentXWindow();this._m().pinch={d0:a,cx0:o,minX0:s,maxX0:c,gridWidth:n.layout.gridWidth||1}}_movePinch(e){let t=this.w,n=this._m().pinch;if(!n)return;let r=this._gridRect();if(!r)return;let i=e.touches[0],a=e.touches[1],o=Math.hypot(a.clientX-i.clientX,a.clientY-i.clientY)||1,s=(i.clientX+a.clientX)/2-r.left-t.globals.barPadForNumericAxis,c=n.maxX0-n.minX0,l=c*(n.d0/o),u=n.minX0+n.cx0/n.gridWidth*c-s/n.gridWidth*l,d=u+l,f=this._clampBounds();if(f){let e=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,n=Math.max(e*2,(f.max-f.min)*1e-6);if(d-u<n){let e=(u+d)/2;u=e-n/2,d=e+n/2}}this._applyXRange(u,d,!0)}_endPinch(){let e=this.w,t=this._m();t.pinch=null;let{min:n,max:r}=this._currentXWindow(),i={min:n,max:r},a=e.globals.initialConfig?$.clone(e.globals.initialConfig.yaxis):[],o=this.ctx.toolbar;o&&o.zoomCallback(i,a)}_movePan(e){let t=this._m(),n=t.panState,r=e.touches[0];if(!n.axis){let i=Math.abs(r.clientX-n.startX),a=Math.abs(r.clientY-n.startY);if(i<6&&a<6){this._pushSample(r.clientX,e.timeStamp);return}if(a>i){t.busy=!1,t.panState=null;return}n.axis=`x`}if(n.axis!==`x`)return;e.preventDefault();let i=(r.clientX-n.startX)*n.ratio0;this._pushSample(r.clientX,e.timeStamp),this._applyXRange(n.minX0-i,n.maxX0-i,!1)}_endPan(){let e=this._m(),t=e.panState;e.panState=null;let n=0,r=e.samples;if(r.length>=2){let e=r[0],t=r[r.length-1],i=t.t-e.t;i>0&&(n=(t.x-e.x)/i)}e.samples=[],t&&t.axis===`x`&&this._panInertiaEnabled()&&Math.abs(n)>W_?this._startInertia(n):(e.busy=!1,this._fireScrolled())}_startInertia(e){let t=this.w,n=this._m(),r=t.config.chart.pan&&t.config.chart.pan.friction,i=typeof r==`number`?Math.min(Math.max(r,.5),.999):G_,a=e,o=null;n.busy=!0;let s=e=>{if(t.globals.isDestroyed){n.inertiaRAF=null,n.busy=!1;return}if(o==null){o=e,n.inertiaRAF=requestAnimationFrame(s);return}let r=e-o;if(o=e,a*=i**+(r/q_),Math.abs(a)<K_){n.inertiaRAF=null,n.busy=!1,this._fireScrolled();return}let c=this._currentXWindow(),l=t.layout.gridWidth||1,u=(c.max-c.min)/l,d=a*r*u,f=this._applyXRange(c.min-d,c.max-d,!1),p=this._clampBounds();if(!f||p&&(d>0&&f.minX<=p.min+(p.max-p.min)*1e-6||d<0&&f.maxX>=p.max-(p.max-p.min)*1e-6)){n.inertiaRAF=null,n.busy=!1,this._fireScrolled();return}n.inertiaRAF=requestAnimationFrame(s)};n.inertiaRAF=requestAnimationFrame(s)}};kh.registerFeatures({toolbar:V_,zoomPanSelection:X_});var Z_=class{constructor(e){this.w=e.w,this.annoCtx=e}setOrientations(e,t=null){let n=this.w;if(e.label.orientation===`vertical`){let r=t===null?0:t,i=n.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${r}']`);if(i!==null){let t=i.getBBox();i.setAttribute(`x`,String(parseFloat(i.getAttribute(`x`)??`0`)-t.height+4));let n=e.label.position===`top`?t.width:-t.width;i.setAttribute(`y`,String(parseFloat(i.getAttribute(`y`)??`0`)+n));let{x:r,y:a}=this.annoCtx.graphics.rotateAroundCenter(i);i.setAttribute(`transform`,`rotate(-90 ${r} ${a})`)}}}addBackgroundToAnno(e,t){let n=this.w;if(!e||!t.label.text||!String(t.label.text).trim())return null;let r=n.dom.baseEl.querySelector(`.apexcharts-grid`);if(!r)return null;let i=r.getBoundingClientRect(),a=r.getBBox(),o=i.width/a.width||1,s=e.getBoundingClientRect(),{left:c,right:l,top:u,bottom:d}=t.label.style.padding;t.label.orientation===`vertical`&&([u,d,c,l]=[c,l,u,d]);let f=i.left-a.x*o,p=i.top-a.y*o,m=(s.left-f)/o-c,h=(s.top-p)/o-u,g=this.annoCtx.graphics.drawRect(m,h,s.width/o+c+l,s.height/o+u+d,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&g.node.classList.add(t.id),g}annotationsBackground(){let e=this.w,t=(t,n,r)=>{let i=e.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${n}']`);if(i){let n=i.parentNode,r=this.addBackgroundToAnno(i,t);if(r){n?.insertBefore(r.node,i);let a=i.getAttribute(`x`);a!==null&&Wh(r,parseFloat(a),e),t.label.mouseEnter&&r.node.addEventListener(`mouseenter`,t.label.mouseEnter.bind(this,t)),t.label.mouseLeave&&r.node.addEventListener(`mouseleave`,t.label.mouseLeave.bind(this,t)),t.label.click&&r.node.addEventListener(`click`,t.label.click.bind(this,t))}}};e.config.annotations.xaxis.forEach((e,n)=>t(e,n,`xaxis`)),e.config.annotations.yaxis.forEach((e,n)=>t(e,n,`yaxis`)),e.config.annotations.points.forEach((e,n)=>t(e,n,`point`))}usesCategoryX(){let e=this.w;return(e.config.xaxis.type===`category`||e.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!e.axisFlags.dataFormatXNumeric&&!e.config.chart.sparkline.enabled}hasXDomain(){let e=this.w;return this.annoCtx.invertAxis?$.isNumber(e.globals.minY)&&$.isNumber(e.globals.yRange[0]):this.usesCategoryX()?e.labelData.labels.length>0||e.labelData.categoryLabels.length>0:$.isNumber(e.globals.minX)&&$.isNumber(e.globals.xRange)}getY1Y2(e,t){let n=this.w,r=e===`y1`?t.y:t.y2,i=typeof r==`string`&&r.includes(`px`),a,o=!1;if(this.annoCtx.invertAxis){let e=n.config.xaxis.convertedCatToNumeric?n.labelData.categoryLabels:n.labelData.labels,o=e.indexOf(r);if(!i&&o===-1)return{yP:0,clipped:!0};let s=n.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${o+1})`);a=s?parseFloat(s.getAttribute(`y`)??`0`):(n.layout.gridHeight/e.length-1)*(o+1)-n.globals.barHeight,t.seriesIndex!==void 0&&n.globals.barHeight&&(a-=n.globals.barHeight/2*(n.seriesData.series.length-1)-n.globals.barHeight*t.seriesIndex)}else{if(!n.config.yaxis[t.yAxisIndex])return{yP:0,clipped:!0};let e=n.globals.seriesYAxisMap[t.yAxisIndex]?.[0]??null;if(e===null&&n.seriesData.series.length)return{yP:0,clipped:!0};let i=e===null?n.globals.minY:n.globals.minYArr[e],s=e===null?n.globals.maxY-n.globals.minY:n.globals.yRange[e],c=n.config.yaxis[t.yAxisIndex].logarithmic&&e!==null?new Xh(this.w).getLogVal(n.config.yaxis[t.yAxisIndex].logBase,r,e)/n.globals.yLogRatio[e]:(r-i)/(s/n.layout.gridHeight);a=n.layout.gridHeight-Math.min(Math.max(c,0),n.layout.gridHeight),o=c>n.layout.gridHeight||c<0,t.marker&&(t.y===void 0||t.y===null)&&(a=0),n.config.yaxis[t.yAxisIndex]?.reversed&&(a=c)}return i&&(a=parseFloat(r)),{yP:a,clipped:o}}getX1X2(e,t){let n=this.w,r=e===`x1`?t.x:t.x2,i=this.annoCtx.invertAxis?n.globals.minY:n.globals.minX,a=this.annoCtx.invertAxis?n.globals.maxY:n.globals.maxX,o=this.annoCtx.invertAxis?n.globals.yRange[0]:n.globals.xRange,s=!1,c=typeof r==`string`&&r.includes(`px`),l=r==null&&t.marker;if(!c&&!l&&!this.hasXDomain())return{x:0,clipped:!0};let u=this.annoCtx.inversedReversedAxis?(a-r)/(o/n.layout.gridWidth):(r-i)/(o/n.layout.gridWidth);return(n.config.xaxis.type===`category`||n.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!n.axisFlags.dataFormatXNumeric&&(n.config.chart.sparkline.enabled||(u=this.getStringX(r))),typeof r==`string`&&r.includes(`px`)&&(u=parseFloat(r)),r==null&&t.marker&&(u=n.layout.gridWidth),t.seriesIndex!==void 0&&n.globals.barWidth&&!this.annoCtx.invertAxis&&(u-=n.globals.barWidth/2*(n.seriesData.series.length-1)-n.globals.barWidth*t.seriesIndex),typeof u!=`number`&&(u=0,s=!0),parseFloat(u.toFixed(10))>parseFloat(n.layout.gridWidth.toFixed(10))?(u=n.layout.gridWidth,s=!0):u<0&&(u=0,s=!0),{x:u,clipped:s}}getStringX(e){let t=this.w,n=e;if(t.config.xaxis.convertedCatToNumeric&&t.labelData.categoryLabels.length){let n=String(e);e=t.labelData.categoryLabels.findIndex(e=>String(e)===n)+1}let r=t.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(e),i=t.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${r+1})`);return i&&(n=parseFloat(i.getAttribute(`x`)??`0`)),n}},Q_=class{constructor(e){this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Z_(this.annoCtx)}addXaxisAnnotation(e,t,n){let r=this.w,i=this.helpers.getX1X2(`x1`,e),a=i.x,o=i.clipped,s=!0,c,l=e.label.text,u=e.strokeDashArray;if($.isNumber(a)){if(e.x2===null||e.x2===void 0){if(!o){let n=this.annoCtx.graphics.drawLine(a+e.offsetX,0+e.offsetY,a+e.offsetX,r.layout.gridHeight+e.offsetY,e.borderColor,u,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id),Wh(n,a+e.offsetX,r)}}else{let n=this.helpers.getX1X2(`x2`,e);if(c=n.x,s=n.clipped,c<a){let e=a;a=c,c=e}let i=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,c-a,r.layout.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,u);i.node.classList.add(`apexcharts-annotation-rect`),i.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(i.node),e.id&&i.node.classList.add(e.id),Wh(i,a+e.offsetX,r)}if(!(o&&s)){let i=this.annoCtx.graphics.getTextRects(l,e.label.style.fontSize),o=e.label.position===`top`?4:e.label.position===`center`?r.layout.gridHeight/2+(e.label.orientation===`vertical`?i.width/2:0):r.layout.gridHeight,s=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:o+e.label.offsetY-(e.label.orientation===`vertical`?e.label.position===`top`?i.width/2-12:-i.width/2:0),text:l,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});s.attr({rel:n}),t.appendChild(s.node),Wh(s,a+e.label.offsetX,r),this.annoCtx.helpers.setOrientations(e,n)}}}drawXAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-xaxis-annotations`});return e.config.annotations.xaxis.map((e,n)=>{this.addXaxisAnnotation(e,t.node,n)}),t}},$_=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Z_(this.annoCtx),this.axesUtils=new pg(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(e,t,n){let r=this.w,i=e.strokeDashArray,a=this.helpers.getY1Y2(`y1`,e),o=a.yP,s=a.clipped,c,l=!0,u=!1,d=e.label.text;if(e.y2===null||e.y2===void 0){if(!s){u=!0;let n=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,i,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}else{if(a=this.helpers.getY1Y2(`y2`,e),c=a.yP,l=a.clipped,c>o){let e=o;o=c,c=e}if(!(s&&l)){u=!0;let n=this.annoCtx.graphics.drawRect(0+e.offsetX,c+e.offsetY,this._getYAxisAnnotationWidth(e),o-c,0,e.fillColor,e.opacity,1,e.borderColor,i);n.node.classList.add(`apexcharts-annotation-rect`),n.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}if(u){let i=e.label.position===`right`?r.layout.gridWidth:e.label.position===`center`?r.layout.gridWidth/2:0,a=this.annoCtx.graphics.drawText({x:i+e.label.offsetX,y:(c??o)+e.label.offsetY-3,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});a.attr({rel:n}),t.appendChild(a.node)}}_getYAxisAnnotationWidth(e){let t=this.w,n=t.layout.gridWidth;return n=e.width.indexOf(`%`)>-1?t.layout.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10),n+e.offsetX}drawYAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-yaxis-annotations`});return e.config.annotations.yaxis.forEach((e,n)=>{e.yAxisIndex=this.axesUtils.translateYAxisIndex(e.yAxisIndex),this.axesUtils.isYAxisHidden(e.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||this.addYaxisAnnotation(e,t.node,n)}),t}},ev=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Z_(this.annoCtx)}addPointAnnotation(e,t,n){let r=this.w;if(r.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)return;let i=this.helpers.getX1X2(`x1`,e),a=i.x,o=i.clipped,s=this.helpers.getY1Y2(`y1`,e),c=s.yP,l=s.clipped;if($.isNumber(a)&&!(l||o)){let i={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:`apexcharts-point-annotation-marker ${e.marker.cssClass} ${e.id?e.id:``}`},o=this.annoCtx.graphics.drawMarker(a+e.marker.offsetX,c+e.marker.offsetY,i);t.appendChild(o.node);let s=[o.node];Wh(o,a,r);let l=e.label.text?e.label.text:``,u=this.getConstrainedLabelX(l,a+e.label.offsetX,e.label),d=this.annoCtx.graphics.drawText({x:u,y:c+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:l,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-point-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});if(d.attr({rel:n}),t.appendChild(d.node),Wh(d,a,r),e.customSVG.SVG){let n=this.annoCtx.graphics.group({class:`apexcharts-point-annotations-custom-svg `+e.customSVG.cssClass});n.attr({transform:`translate(${a+e.customSVG.offsetX}, ${c+e.customSVG.offsetY})`}),n.node.innerHTML=e.customSVG.SVG,t.appendChild(n.node),s.push(n.node)}if(e.image.path){let t=e.image.width?e.image.width:20,n=e.image.height?e.image.height:20;o=this.annoCtx.addImage({x:a+e.image.offsetX-t/2,y:c+e.image.offsetY-n/2,width:t,height:n,path:e.image.path,appendTo:`.apexcharts-point-annotations`}),s.push(o.node)}e.tooltip&&e.tooltip.enabled&&s.forEach(t=>{t.addEventListener(`mouseenter`,()=>{this.showPointTooltip(e,t)}),t.addEventListener(`mouseleave`,()=>{this.hidePointTooltip()})}),e.mouseEnter&&o.node.addEventListener(`mouseenter`,e.mouseEnter.bind(this,e)),e.mouseLeave&&o.node.addEventListener(`mouseleave`,e.mouseLeave.bind(this,e)),e.click&&o.node.addEventListener(`click`,e.click.bind(this,e))}}getConstrainedLabelX(e,t,n){let r=this.w;if(!e)return t;let{width:i}=this.annoCtx.graphics.getTextRects(e,n.style.fontSize,n.style.fontFamily,void 0,!0,n.style.fontWeight),a,o;switch(n.textAnchor){case`start`:a=t,o=t+i;break;case`end`:a=t-i,o=t;break;default:a=t-i/2,o=t+i/2}let s=n.style.padding||{};return a-=s.left||0,o+=s.right||0,a<0?t-a:o>r.layout.gridWidth?t-(o-r.layout.gridWidth):t}getPointTooltipEl(){let e=this.w,t=e.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip`);return t||(t=Q.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.classList.add(`apexcharts-tooltip`,`apexcharts-annotation-tooltip`),e.dom.elWrap.appendChild(t)),t}getPointTooltipContent(e){let t=this.w,n=e.tooltip||{};if(typeof n.formatter==`function`)return n.formatter({annotation:e,seriesIndex:e.seriesIndex,id:e.id,w:t});let r=n.text==null?e.label&&e.label.text:n.text;return Array.isArray(r)&&(r=r.join(`<br/>`)),r==null?``:String(r)}showPointTooltip(e,t){let n=this.w,r=this.getPointTooltipContent(e);if(!r)return;let i=this.getPointTooltipEl();i.innerHTML=r;let a=e.tooltip.theme||n.config.tooltip.theme||`light`;i.classList.remove(`apexcharts-theme-light`,`apexcharts-theme-dark`),i.classList.add(`apexcharts-theme-${a}`),i.classList.add(`apexcharts-active`);let o=n.dom.elWrap.getBoundingClientRect(),s=t.getBoundingClientRect(),c=i.getBoundingClientRect(),l=e.tooltip.offsetX||0,u=e.tooltip.offsetY||0,d=s.left-o.left+s.width/2-c.width/2,f=s.top-o.top-c.height-10;d=Math.max(0,Math.min(d,o.width-c.width)),f<0&&(f=s.top-o.top+s.height+10),i.style.left=d+l+`px`,i.style.top=f+u+`px`}hidePointTooltip(){let e=this.w.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip`);e&&e.classList.remove(`apexcharts-active`)}drawPointAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-point-annotations`});return e.config.annotations.points.map((e,n)=>{this.addPointAnnotation(e,t.node,n)}),t}},tv=class{constructor(e,{theme:t=null,timeScale:n=null}={}){this.w=e,this.theme=t,this.timeScale=n,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new Z(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Z_(this),this.xAxisAnnotations=new Q_(this),this.yAxisAnnotations=new $_(this),this.pointsAnnotations=new ev(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){let e=this.w;if(e.globals.axisCharts){let t=this.yAxisAnnotations.drawYAxisAnnotations(),n=this.xAxisAnnotations.drawXAxisAnnotations(),r=this.pointsAnnotations.drawPointAnnotations(),i=e.config.chart.animations.enabled,a=[t,n,r],o=[n.node,t.node,r.node],s=e.config.chart.type===`line`||e.config.chart.type===`area`||e.config.chart.type===`rangeArea`,c=[s,!1,s];for(let t=0;t<3;t++)e.dom.elGraphical.add(a[t]),i&&!e.globals.resized&&!e.globals.dataChanged&&e.config.chart.type!==`scatter`&&e.config.chart.type!==`bubble`&&e.globals.dataPoints>1&&!c[t]&&o[t].classList.add(`apexcharts-element-hidden`),e.globals.delayedElements.push({el:o[t],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(e=>{this.addImage(e)})}drawTextAnnos(){this.w.config.annotations.texts.map(e=>{this.addText(e)})}addXaxisAnnotation(e,t,n){this.xAxisAnnotations.addXaxisAnnotation(e,t,n)}addYaxisAnnotation(e,t,n){this.yAxisAnnotations.addYaxisAnnotation(e,t,n)}addPointAnnotation(e,t,n){this.pointsAnnotations.addPointAnnotation(e,t,n)}addText(e){let{x:t,y:n,text:r,textAnchor:i,foreColor:a,fontSize:o,fontFamily:s,fontWeight:c,cssClass:l,backgroundColor:u,borderWidth:d,strokeDashArray:f,borderRadius:p,borderColor:m,appendTo:h=`.apexcharts-svg`,paddingLeft:g=4,paddingRight:_=4,paddingBottom:v=2,paddingTop:y=2}=e,b=this.w,x=this.graphics.drawText({x:t,y:n,text:r,textAnchor:i||`start`,fontSize:o||`12px`,fontWeight:c||`regular`,fontFamily:s||b.config.chart.fontFamily,foreColor:a||b.config.chart.foreColor,cssClass:`apexcharts-text `+l?l:``}),S=b.dom.baseEl.querySelector(h);S&&S.appendChild(x.node);let C=x.bbox();if(r){let e=this.graphics.drawRect(C.x-g,C.y-y,C.width+g+_,C.height+v+y,p,u||`transparent`,1,d,m,f);S.insertBefore(e.node,x.node)}}addImage(e){let t=this.w,{path:n,x:r=0,y:i=0,width:a=20,height:o=20,appendTo:s=`.apexcharts-svg`}=e,c=t.dom.Paper.image(n);c.size(a,o).move(r,i);let l=t.dom.baseEl.querySelector(s);return l&&l.appendChild(c.node),c}addXaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`xaxis`,contextMethod:n.addXaxisAnnotation}),n}addYaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`yaxis`,contextMethod:n.addYaxisAnnotation}),n}addPointAnnotationExternal(e,t,n){return this.invertAxis===void 0&&(this.invertAxis=n.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`point`,contextMethod:n.addPointAnnotation}),n}addAnnotationExternal({params:e,pushToMemory:t,context:n,type:r,contextMethod:i}){let a=n,o=a.w,s=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations`),c=s.childNodes.length+1,l=new kg,u=Object.assign({},r===`xaxis`?l.xAxisAnnotation:r===`yaxis`?l.yAxisAnnotation:l.pointAnnotation),d=$.extend(u,e);switch(r){case`xaxis`:this.addXaxisAnnotation(d,s,c);break;case`yaxis`:this.addYaxisAnnotation(d,s,c);break;case`point`:this.addPointAnnotation(d,s,c);break}let f=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${c}']`),p=this.helpers.addBackgroundToAnno(f,d);return p&&s.insertBefore(p.node,f),t&&o.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:$.randomId(),method:i,label:`addAnnotation`,params:e}),n}_removeAnnotationTooltip(e){let t=e.dom.elWrap&&e.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip`);t&&t.parentNode&&t.parentNode.removeChild(t)}clearAnnotations(e){let t=e.w;this._removeAnnotationTooltip(t);let n=t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations`);for(let e=t.globals.memory.methodsToExec.length-1;e>=0;e--)(t.globals.memory.methodsToExec[e].label===`addText`||t.globals.memory.methodsToExec[e].label===`addAnnotation`)&&t.globals.memory.methodsToExec.splice(e,1);Array.prototype.forEach.call(n,e=>{for(;e.firstChild;)e.removeChild(e.firstChild)})}removeAnnotation(e,t){let n=e.w;this._removeAnnotationTooltip(n);let r=n.dom.baseEl.querySelectorAll(`.${t}`);r&&(n.globals.memory.methodsToExec.map((e,r)=>{e.id===t&&n.globals.memory.methodsToExec.splice(r,1)}),Object.keys(n.config.annotations).forEach(e=>{let r=n.config.annotations[e];Array.isArray(r)&&(n.config.annotations[e]=r.filter(e=>e.id!==t))}),Array.prototype.forEach.call(r,e=>{e.parentElement.removeChild(e)}))}};kh.registerFeatures({annotations:tv});var nv=class{constructor(e,t){this.w=e,this.ctx=t,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._tooltipDismissed=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._lastPointerDownAt=0}init(){let e=this.w.dom.Paper.node;e&&(e.setAttribute(`tabindex`,`0`),e.addEventListener(`focus`,this._onFocus),e.addEventListener(`blur`,this._onBlur),e.addEventListener(`mousedown`,this._onPointerDown,{capture:!0}),e.addEventListener(`pointerdown`,this._onPointerDown,{capture:!0}),e.addEventListener(`touchstart`,this._onPointerDown,{capture:!0,passive:!0}),e.addEventListener(`keydown`,this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener(`legendClick`,this._onLegendClick))}destroy(){let e=this.w,t=e.dom.Paper&&e.dom.Paper.node;this.ctx.events.removeEventListener(`legendClick`,this._onLegendClick),t&&(t.removeEventListener(`focus`,this._onFocus),t.removeEventListener(`blur`,this._onBlur),t.removeEventListener(`keydown`,this._onKeyDown),t.removeEventListener(`mousedown`,this._onPointerDown,{capture:!0}),t.removeEventListener(`pointerdown`,this._onPointerDown,{capture:!0}),t.removeEventListener(`touchstart`,this._onPointerDown,{capture:!0}))}_onPointerDown(){this._lastPointerDownAt=Date.now()}handleKey(e){}_onFocus(){this._isNavEnabled()&&(Date.now()-this._lastPointerDownAt<100||(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint()))}_onBlur(){this.active=!1,this._tooltipDismissed=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(e){var t,n,r;if(!(!this._isNavEnabled()||!this.active)){if(e.shiftKey&&(e.key===`ArrowRight`||e.key===`ArrowLeft`)&&this._canPan()){e.preventDefault(),this._panBy(e.key===`ArrowRight`?1:-1);return}switch(e.key){case`ArrowRight`:e.preventDefault(),this._move(0,1);break;case`ArrowLeft`:e.preventDefault(),this._move(0,-1);break;case`ArrowUp`:e.preventDefault(),this._move(-1,0);break;case`ArrowDown`:e.preventDefault(),this._move(1,0);break;case`Home`:e.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case`End`:e.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case`Enter`:case` `:e.preventDefault(),this._fireClick();break;case`+`:case`=`:this._canZoom()&&(e.preventDefault(),(t=this.ctx.toolbar)==null||t.handleZoomIn(),this._announce(`Zoomed in`));break;case`-`:case`_`:this._canZoom()&&(e.preventDefault(),(n=this.ctx.toolbar)==null||n.handleZoomOut(),this._announce(`Zoomed out`));break;case`0`:this._canZoom()&&this.w.interact.zoomed&&(e.preventDefault(),(r=this.ctx.toolbar)==null||r.handleZoomReset(),this._announce(`Zoom reset`));break;case`Escape`:e.preventDefault(),this._tooltipDismissed?(this.active=!1,this._tooltipDismissed=!1,this._hideFocus()):(this._tooltipDismissed=!0,this._hideFocus());break}}}_canZoom(){let e=this.w;return!!(e.globals.axisCharts&&e.config.chart.zoom&&e.config.chart.zoom.enabled)}_canPan(){return this._canZoom()}_panBy(e){let t=this.w,n=this.ctx.toolbar;if(!n)return;let r=Number(t.globals.minX),i=Number(t.globals.maxX);if(!isFinite(r)||!isFinite(i)||r===i)return;let a=(i-r)*.1*e;n.zoomUpdateOptions(r+a,i+a),this._announce(e>0?`Panned right`:`Panned left`)}_move(e,t){let n=this.w,r=n.config.chart.accessibility.keyboard.navigation.wrapAround;if(e!==0){let t=this.w.globals.tooltip;if(t&&t.tConfig&&t.tConfig.shared){let e=this.dataPointIndex;if(t.tooltipUtil&&t.tooltipUtil.isXoverlap(e)&&t.tooltipUtil.isInitialSeriesSameLen())return}let i=this._getSeriesCount(),a=this.seriesIndex+e,o=0;for(;o<i&&(a<0&&(a=r?i-1:0),a>=i&&(a=r?0:i-1),n.globals.collapsedSeriesIndices.includes(a));)a+=e,o++;this.seriesIndex=a;let s=this._getDataPointCount(a);this.dataPointIndex>=s&&(this.dataPointIndex=s-1)}if(t!==0){let e=this._getDataPointCount(this.seriesIndex),n=this.dataPointIndex+t;n<0&&(n=r?e-1:0),n>=e&&(n=r?0:e-1),this.dataPointIndex=n,t>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(t)}this._showCurrentPoint()}_skipNullForward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r+1)%n,i++;this.dataPointIndex=r}}_skipNullBackward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r-1+n)%n,i++;this.dataPointIndex=r}}_showCurrentPoint(){let{seriesIndex:e,dataPointIndex:t}=this,n=this.w,r=n.globals.tooltip;!r||!r.ttItems||(n.interact.capturedSeriesIndex=e,n.interact.capturedDataPointIndex=t,this._applyFocusClass(e,t),this._showTooltip(e,t,r))}_hideFocus(){let e=this.w,t=e.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!t)return;t.marker&&t.marker.resetPointsSize(),this._enlargedScatterMarker=null;let n=t.getElTooltip();n&&(n.classList.remove(`apexcharts-active`),e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&n.setAttribute(`aria-hidden`,`true`)),e.dom.baseEl.classList.remove(`apexcharts-tooltip-active`);let r=t.getElXCrosshairs();r&&r.classList.remove(`apexcharts-active`)}_showTooltip(e,t,n){let r=this.w,i=r.config.chart.type,a=n.getElTooltip();if(!a)return;let o=n.getCachedDimensions();n.tooltipRect={x:0,y:0,ttWidth:o.ttWidth||0,ttHeight:o.ttHeight||0},this._setSyntheticEvent(e,t,n),r.dom.baseEl.classList.add(`apexcharts-tooltip-active`),a.classList.add(`apexcharts-active`),r.config.chart.accessibility.enabled&&r.config.chart.accessibility.announcements.enabled&&a.removeAttribute(`aria-hidden`),i===`pie`||i===`donut`||i===`polarArea`?this._showTooltipNonAxis(e,t,n,a):i===`radialBar`?this._showTooltipRadialBar(e,t,n,a):i===`heatmap`||i===`treemap`?this._showTooltipHeatTree(e,t,n,a,i):i===`bar`||i===`candlestick`||i===`boxPlot`||i===`violin`||i===`rangeBar`?this._showTooltipBar(e,t,n):this._showTooltipAxisLine(e,t,n)}_setSyntheticEvent(e,t,n){let r=this.w,i=r.config.chart.type,a=0,o=0,s=this._getFocusableElement(e,t);if(s){let e=s.getBoundingClientRect();a=e.left+e.width/2,o=e.top+e.height/2}else if(r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}else{let e=r.dom.Paper&&r.dom.Paper.node;if(e){let t=e.getBoundingClientRect();a=t.left+t.width/2,o=t.top+t.height/2}}if((i===`line`||i===`area`||i===`rangeArea`||i===`scatter`||i===`bubble`||i===`radar`)&&r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}n.e={type:`mousemove`,clientX:a,clientY:o}}_showTooltipBar(e,t,n){let r=this.w,i=n.tConfig.shared&&(n.tooltipUtil.isXoverlap(t)||r.globals.isBarHorizontal)&&n.tooltipUtil.isInitialSeriesSameLen(),a=r.rangeData.seriesRange?.[e]?.[t]?.y?.[0];n.tooltipLabels.drawSeriesTexts(X(Y(Y({ttItems:n.ttItems,i:e,j:t},a?.y1!==void 0&&{y1:a.y1}),a?.y2!==void 0&&{y2:a.y2}),{shared:i}));let o=`.apexcharts-series[data\\:realIndex='${e}']`,s=r.dom.Paper.findOne(`${o} path[j='${t}'], ${o} circle[j='${t}'], ${o} rect[j='${t}']`);if(s&&(this._leaveHoveredBar(),new Z(this.w,this.ctx).pathMouseEnter(s,null),this._hoveredBarEl=s),r.globals.isBarHorizontal){let e=s&&s.node;if(e){let t=r.dom.elWrap.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.left-t.left,o=i.top-t.top,s=i.height,c=i.width,l=n.tooltipRect.ttWidth||0,u=n.tooltipRect.ttHeight||0,d=o+s/2-u/2,f=a+c;a<(n.xyRatios&&n.xyRatios.baseLineInvertedY!=null?n.xyRatios.baseLineInvertedY:t.width/2)&&(f=a-l);let p=n.getElTooltip();p&&(p.style.left=f+`px`,p.style.top=d+`px`)}}else n.tooltipPosition.moveStickyTooltipOverBars(t,e)}_showTooltipAxisLine(e,t,n){let r=this.w,i=r.config.chart.type,a=n.tConfig.shared&&n.tooltipUtil.isXoverlap(t)&&n.tooltipUtil.isInitialSeriesSameLen();n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:a});let o=i===`scatter`||i===`bubble`,s=r.globals.markers.largestSize>0&&!r.globals.markers.batched;o?this._showScatterBubblePoint(e,t,n):s?a?n.marker.enlargePoints(t):n.tooltipPosition.moveDynamicPointOnHover(t,e):a?n.tooltipPosition.moveDynamicPointsOnHover(t):n.tooltipPosition.moveDynamicPointOnHover(t,e)}_showScatterBubblePoint(e,t,n){let r=this.w.dom.baseEl;this._enlargedScatterMarker&&=(n.marker.oldPointSize(this._enlargedScatterMarker),null);let i=r.querySelector(`.apexcharts-series[data\\:realIndex='${e}']`);if(!i)return;let a=i.querySelector(`.apexcharts-marker[rel='${t}']`);a&&(n.marker.enlargeCurrentPoint(t,a),this._enlargedScatterMarker=a)}_showTooltipNonAxis(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:t,shared:!1});let a=r.getBoundingClientRect(),o=a.width||n.tooltipRect.ttWidth||0,s=a.height||n.tooltipRect.ttHeight||0,c=i.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${t}']`),l=n.getSliceAnchor(c);l&&(r.style.left=l.x-o/2+`px`,r.style.top=l.y-s-10+`px`)}_showTooltipRadialBar(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,shared:!1});let{ttWidth:a=0,ttHeight:o=0}=n.getCachedDimensions(),s=i.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`);if(s){let t=parseFloat(s.getAttribute(`data:angle`)??``)||0,n=(i.config.plotOptions.radialBar.startAngle||0)+t/2,c=i.layout.gridWidth/2,l=i.layout.gridHeight/2,u=i.globals.radialSize||Math.min(i.layout.gridWidth,i.layout.gridHeight)/2,d=i.seriesData.series.length,f=u/Math.max(d,1),p=u-e*f,m=(p+(p-f))/2,h=$.polarToCartesian(c,l,m,n),g=h.x+(i.layout.translateX||0),_=h.y+(i.layout.translateY||0);r.style.left=g-a/2+`px`,r.style.top=_-o-10+`px`}}_showTooltipHeatTree(e,t,n,r,i){let a=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:!1});let o=r.getBoundingClientRect(),s=o.width||n.tooltipRect.ttWidth||0,c=o.height||n.tooltipRect.ttHeight||0,l=i===`heatmap`?`apexcharts-heatmap-rect`:`apexcharts-treemap-rect`,u=a.dom.baseEl.querySelector(`.${l}[i='${e}'][j='${t}']`);if(u){let e=a.dom.elWrap.getBoundingClientRect(),t=u.getBoundingClientRect(),i=t.left-e.left,o=t.top-e.top,l=t.width,d=t.height,f=parseFloat(u.getAttribute(`cx`)??``),p=parseFloat(u.getAttribute(`width`)??``);n.tooltipPosition.moveXCrosshairs(f+p/2);let m=i+l+s/2,h=o+d/2-c/2;i+l>a.layout.gridWidth/2&&(m=i-s/2),r.style.left=m+`px`,r.style.top=h+`px`}}_applyFocusClass(e,t){this._removeFocusClass();let n=this._getFocusableElement(e,t)||this._getBatchedFocusEl(e);if(n){n.classList.add(`apexcharts-keyboard-focused`),n.setAttribute(`role`,`img`);let r=this._buildPointLabel(e,t);r&&n.setAttribute(`aria-label`,r),this._focusedEl=n}}_getBatchedFocusEl(e){return this.w.globals.markers.batched?this.w.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`):null}_removeFocusClass(){this._focusedEl&&=(this._focusedEl.classList.remove(`apexcharts-keyboard-focused`),this._focusedEl.removeAttribute(`role`),this._focusedEl.removeAttribute(`aria-label`),null)}_buildPointLabel(e,t){let n=this.w,r=n.config.chart.type,i=n.seriesData.seriesNames||[],a=n.seriesData.series||[];if(r===`pie`||r===`donut`||r===`polarArea`){let e=(n.labelData?.labels&&n.labelData.labels[t])??``,r=Array.isArray(a)?a[t]:``;return e?`${e}: ${r}`:`${r}`}if(r===`radialBar`)return`${i[e]||`Series ${e+1}`}: ${Array.isArray(a)?a[e]:``}`;let o=i[e]||`Series ${e+1}`,s=(Array.isArray(a[e])?a[e]:[])[t],c=s==null?``:String(s),l=n.formatters?.yLabelFormatters?.[e];if(typeof l==`function`)try{c=l(s,{seriesIndex:e,dataPointIndex:t,w:n})}catch{}let u=``,d=n.labelData?.categoryLabels,f=n.seriesData?.seriesX?.[e];if(Array.isArray(d)&&d[t]!=null)u=String(d[t]);else if(Array.isArray(f)&&f[t]!=null){let r=n.formatters?.xLabelFormatter;if(typeof r==`function`)try{u=String(r(f[t],{seriesIndex:e,dataPointIndex:t,w:n}))}catch{u=String(f[t])}else u=String(f[t])}return u?`${o}: ${c}, ${u}`:`${o}: ${c}`}_leaveHoveredBar(){this._hoveredBarEl&&=(new Z(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),null)}_getFocusableElement(e,t){let n=this.w,r=n.config.chart.type,i=n.dom.baseEl;return r===`pie`||r===`donut`||r===`polarArea`?i.querySelector(`.apexcharts-pie-area[j='${t}']`):r===`heatmap`?i.querySelector(`.apexcharts-heatmap-rect[i='${e}'][j='${t}']`):r===`treemap`?i.querySelector(`.apexcharts-treemap-rect[i='${e}'][j='${t}']`):r===`radialBar`?i.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`):r===`bar`||r===`candlestick`||r===`boxPlot`||r===`violin`||r===`rangeBar`?i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`):i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker[rel='${t}']`)||null}_fireClick(){let e=this.w.globals.tooltip;e&&e.markerClick({type:`mouseup`,clientX:0,clientY:0},this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){let e=this.w.config.chart.accessibility;return e.enabled&&e.keyboard.enabled&&e.keyboard.navigation.enabled}_getSeriesCount(){let e=this.w,t=e.config.chart.type;return t===`pie`||t===`donut`||t===`polarArea`?1:e.seriesData.series.length}_getDataPointCount(e){let t=this.w,n=t.config.chart.type;if(n===`pie`||n===`donut`||n===`polarArea`)return t.seriesData.series.length;let r=t.seriesData.series;return r[e]&&Array.isArray(r[e])?r[e].length:0}_clampCursor(){let e=this._getSeriesCount();this.seriesIndex>=e&&(this.seriesIndex=e-1),this.seriesIndex<0&&(this.seriesIndex=0);let t=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=t&&(this.dataPointIndex=t-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){let e=this.w,t=e.globals,n=this.seriesIndex;if(!e.interact.zoomed)return;let r=e.seriesData.seriesX&&e.seriesData.seriesX[n];if(!r||!r.length)return;let i=t.minX,a=t.maxX;if(i===void 0||a===void 0)return;let o=r[this.dataPointIndex];if(o>=i&&o<=a)return;let s=r.length;for(let e=0;e<s;e++)if(r[e]>=i&&r[e]<=a){this.dataPointIndex=e;return}}_snapToVisibleRangeInDirection(e){let t=this.w,n=t.globals,r=this.seriesIndex,i=t.seriesData.seriesX&&t.seriesData.seriesX[r];if(!i||!i.length)return;let a=n.minX,o=n.maxX;if(a===void 0||o===void 0)return;let s=i.length;if(e>=0){for(let e=0;e<s;e++)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}else for(let e=s-1;e>=0;e--)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}_isDataPointVisible(e,t){let n=this.w,r=n.globals;if(!n.interact.zoomed)return!0;let i=n.seriesData.seriesX&&n.seriesData.seriesX[e];if(!i)return!0;let a=i[t];return a===void 0?!0:a>=r.minX&&a<=r.maxX}_announce(e){let t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;let n=t.dom.baseEl;if(!n)return;let r=n.querySelector(`.apexcharts-sr-status`);r&&(r.textContent=``,setTimeout(()=>{r.textContent=e},0))}};kh.registerFeatures({keyboardNavigation:nv});function rv(e,t){if(!(t>0))return[];if(t===1)return[Y({},e)];let n=e.width>=e.height,r=n?e.width:e.height,i=n?e.height:e.width,a=i>0?r/i:t,o=Math.max(1,Math.ceil(Math.sqrt(a*t)));o>t&&(o=t);let s=Math.floor(t/o),c=t-s*o,l=[],u=r/o,d=0;for(let t=0;t<o;t++){let t=s+(c>0?1:0);c>0&&c--;let r=t>0?i/t:0;for(let i=0;i<t;i++)l.push(n?{x:e.x+d,y:e.y+i*r,width:u,height:r}:{x:e.x+i*r,y:e.y+d,width:r,height:u});d+=u}return l}function iv(e,t,n){if(!(t>0))return[];let r=e.width>=e.height,i=r?e.width:e.height,a=r?e.height:e.width,o=r?e.y:e.x,s=o+a,c=a>0?i/a:t,l=Math.max(Math.ceil(Math.sqrt(c*t)),Math.ceil(i/16));l>=1||(l=1),l>t&&(l=t);let u=Math.floor(t/l),d=t-u*l,f=[],p=i/l,m=r?e.x:e.y;for(let e=0;e<l;e++){let e=u+(d>0?1:0);d>0&&d--;let t=[],i=n(m,m+p,r);if(Array.isArray(i))for(let e=0;e<i.length;e++){let n=i[e];if(!n)continue;let r=Math.max(o,Math.min(n[0],n[1])),a=Math.min(s,Math.max(n[0],n[1]));a>r&&t.push([r,a])}t.length||t.push([o,s]);let a=t.reduce((e,t)=>e+(t[1]-t[0]),0),c=t.map(n=>a>0?(n[1]-n[0])/a*e:e/t.length),l=c.map(e=>Math.floor(e)),h=l.reduce((e,t)=>e+t,0),g=c.map((e,t)=>({i:t,frac:e-Math.floor(e)})).sort((e,t)=>t.frac-e.frac);for(let t=0;h<e;t++,h++)l[g[t%g.length].i]++;for(let e=0;e<t.length;e++){let n=l[e];if(n<=0)continue;let i=t[e][0],a=(t[e][1]-i)/n;for(let e=0;e<n;e++)f.push(r?{x:m,y:i+e*a,width:p,height:a}:{x:i+e*a,y:m,width:a,height:p})}m+=p}return f}function av(e,t,n,r,i,a){let o=i===n?0:Math.round(32767*((e-n)/(i-n))),s=a===r?0:Math.round(32767*((t-r)/(a-r))),c=0;for(let e=32768;e>=1;e/=2){let t=(o&e)>0?1:0,n=(s&e)>0?1:0;if(c+=e*e*(3*t^n),n===0){t===1&&(o=e-1-o,s=e-1-s);let n=o;o=s,s=n}}return c}function ov(e,t){let n=1/0,r=1/0,i=-1/0,a=-1/0,o=e.map(e=>{let[o,s]=t(e);return o<n&&(n=o),o>i&&(i=o),s<r&&(r=s),s>a&&(a=s),[o,s]});return e.map((e,t)=>({item:e,d:av(o[t][0],o[t][1],n,r,i,a)})).sort((e,t)=>e.d-t.d).map(e=>e.item)}function sv(e){if(!e||typeof e!=`string`)return null;let t=e.trim();if(t[0]===`#`){let e=t.slice(1);return e.length===3?[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),1]:e.length===6||e.length===8?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),e.length===8?parseInt(e.slice(6,8),16)/255:1]:null}let n=t.match(/^rgba?\(([^)]+)\)$/i);if(n){let e=n[1].split(`,`).map(e=>parseFloat(e));return e.length<3||e.some(e=>!isFinite(e))?null:[e[0],e[1],e[2],e.length>3?e[3]:1]}return null}function cv(e,t){let n=sv(e),r=sv(t);return!n||!r?null:e=>{let t=Math.round(n[0]+(r[0]-n[0])*e),i=Math.round(n[1]+(r[1]-n[1])*e),a=Math.round(n[2]+(r[2]-n[2])*e),o=n[3]+(r[3]-n[3])*e;return o>=1?`rgb(${t},${i},${a})`:`rgba(${t},${i},${a},${o})`}}function lv(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}function uv({pieces:e,duration:t,onPieceDone:n,onAllDone:r}){let i=!1,a=Date.now(),o=Math.max(1,t),s=(e,t)=>{let n=e.from,r=e.to,i=e.el;i.setAttribute(`x`,String(n.x+(r.x-n.x)*t)),i.setAttribute(`y`,String(n.y+(r.y-n.y)*t)),i.setAttribute(`width`,String(Math.max(0,n.width+(r.width-n.width)*t))),i.setAttribute(`height`,String(Math.max(0,n.height+(r.height-n.height)*t))),i.setAttribute(`rx`,String(Math.max(0,n.rx+(r.rx-n.rx)*t))),e.fill?i.setAttribute(`fill`,e.fill(t)):t>=1&&e.fillEnd&&i.setAttribute(`fill`,e.fillEnd)},c=()=>{if(i)return;let t=Date.now()-a,l=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i._done)continue;let a=(t-i.delay)/o;if(a<1&&(l=!0),a<=0)continue;let c=Math.min(1,a);s(i,lv(c)),c>=1&&(i._done=!0,n&&n(i))}l?Q.requestAnimationFrame(c):r&&r()};return Q.requestAnimationFrame(c),()=>{i=!0}}var dv=new Set([`bar`,`funnel`,`pyramid`,`histogram`]),fv=new Set([`pie`,`donut`,`polarArea`,`radialBar`,`gauge`]),pv=new Set([`unit`,`waffle`]),mv=new Set([`treemap`,`sunburst`]),hv=new Set([`boxPlot`,`violin`]),gv=.55,_v=1500,vv=300;function yv(e){return dv.has(e)?`bar`:fv.has(e)?`radial`:pv.has(e)?`unit`:mv.has(e)?`partition`:hv.has(e)?`summary`:null}var bv=class{constructor(e,t){this.w=e,this.ctx=t,this._snapshot=null,this._ghost=null,this._pieceLayer=null,this._pieceCancel=null}canMorphTypes(e,t){if(e===t)return!1;let n=yv(e),r=yv(t);return!n||!r?!1:n===`partition`==(r===`partition`)?!0:n!==`unit`&&r!==`unit`}isCompatibleSeriesShape(e,t,n){if(!Array.isArray(n)||n.length===0)return!1;let r=yv(e),i=yv(t);return i===`unit`?n.every(e=>typeof e==`number`)?!0:n.every(e=>e&&typeof e==`object`&&Array.isArray(e.data)):i===`partition`?!0:i===`radial`?n.every(e=>typeof e==`number`)?!0:n.length===1&&n[0]&&typeof n[0]==`object`&&Array.isArray(n[0].data):i===`bar`||i===`summary`?n.every(e=>e&&typeof e==`object`&&Array.isArray(e.data)):r!==null&&i!==null}captureBeforeDestroy({fromType:e,toType:t,newSeries:n}){if(this._snapshot=null,this._removeGhost(),this._cancelPieces(),!d_.isBrowser())return!1;let r=this.w.config.chart.animations;if(!r||r.enabled===!1||r.chartTypeMorph&&r.chartTypeMorph.enabled===!1||r.respectReducedMotion&&Uh()||!this.canMorphTypes(e,t)||!this.isCompatibleSeriesShape(e,t,n))return!1;let{marks:i,branches:a,unitDots:o}=this._captureFromDOM(e);if(!i.length)return!1;let s=this._buildMapping(i,e,t,n,a);if(s.size===0)return!1;this._snapshot={fromType:e,toType:t,mapping:s,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}};let c=yv(e),l=yv(t),u=this._canProbePaths();if(l===`unit`&&(c===`bar`||c===`summary`||c===`radial`&&u)){let e=this._countUnitSeries(n);this._snapshot.pieceOut=e>0&&e<=_v}else if(c===`unit`&&(l===`bar`||l===`summary`||l===`radial`&&u)){let e=0;if(o.forEach(t=>{e+=t.length}),e>0&&e<=_v){this._snapshot.pieceIn=!0,this._snapshot.sourceDots=o;let e=[];l===`radial`?(Array.isArray(n)?n:[]).forEach((t,n)=>{e.push(`${n}:0`)}):(Array.isArray(n)?n:[]).forEach((t,n)=>{let r=t&&Array.isArray(t.data)?t.data:[];for(let t=0;t<r.length;t++)e.push(`${n}:${t}`)}),this._snapshot.keyOrder=e}}return this._needsGhost(e,t)&&!this._snapshot.pieceOut&&!this._snapshot.pieceIn&&this._captureGhost(),this.w.globals.previousPaths=[],!0}_needsGhost(e,t){return yv(e)===`unit`||yv(t)===`unit`}_captureGhost(){var e;let t=this.w.dom?.Paper,n=t&&t.node;if(!n||typeof n.cloneNode!=`function`)return;let r=n.cloneNode(!0);typeof r.querySelectorAll==`function`&&[`.apexcharts-xaxis`,`.apexcharts-yaxis`,`.apexcharts-grid`,`.apexcharts-gridlines-horizontal`,`.apexcharts-gridlines-vertical`,`.apexcharts-legend`,`.apexcharts-title-text`,`.apexcharts-subtitle-text`,`.apexcharts-annotations`,`.apexcharts-zoom-rect`,`.apexcharts-selection-rect`,`.apexcharts-xcrosshairs`,`.apexcharts-ycrosshairs`].forEach(e=>{r.querySelectorAll(e).forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)})}),typeof r.querySelectorAll==`function`&&r.querySelectorAll(`[id]`).forEach(e=>{e.removeAttribute(`id`)}),(e=r.removeAttribute)==null||e.call(r,`id`),this._ghost=r}_mountGhost(){var e,t;let n=this._ghost;if(!n||!d_.isBrowser())return;let r=this.w.dom?.elWrap;if(!r||typeof r.appendChild!=`function`){this._ghost=null;return}let i=n.style;i&&(i.position=`absolute`,i.left=`0`,i.top=`0`,i.background=`transparent`,i.pointerEvents=`none`,i.opacity=`1`),(e=n.setAttribute)==null||e.call(n,`aria-hidden`,`true`),(t=n.setAttribute)==null||t.call(n,`class`,`apexcharts-morph-ghost`),r.appendChild(n);let a=this.getSpeed(),o=Math.max(120,Math.round(a*gv));Q.requestAnimationFrame(()=>{i&&(i.transition=`opacity ${o}ms ease-in`,i.opacity=`0`)}),setTimeout(()=>this._removeGhost(),o+60)}_removeGhost(){let e=this._ghost;this._ghost=null,e&&e.parentNode&&e.parentNode.removeChild(e)}_countUnitSeries(e){if(!Array.isArray(e))return 0;let t=0;for(let n of e){if(!n||typeof n!=`object`||!Array.isArray(n.data))return 0;t+=n.data.length}return t}usesPieceTakeover(){return!!(this._snapshot&&this._snapshot.pieceOut)}claimsTargetMark(e,t){return!!(this._snapshot&&this._snapshot.pieceIn&&this._snapshot.mapping.has(`${e}:${t}`))}_makePieceLayer(){let e=this.w.dom?.elGraphical,t=e&&e.node;if(!t||typeof t.appendChild!=`function`)return null;let n=Q.createElementNS(`http://www.w3.org/2000/svg`,`g`);if(!n)return null;n.setAttribute(`class`,`apexcharts-morph-pieces`),n.setAttribute(`pointer-events`,`none`);let r=this.w.globals?.cuid;return r&&n.setAttribute(`clip-path`,`url(#gridRectBarMask${r})`),t.appendChild(n),this._pieceLayer=n,n}_revealPieceHidden(){let e=this.w.globals.dom?.baseEl;!e||typeof e.querySelectorAll!=`function`||e.querySelectorAll(`[data-piece-hidden]`).forEach(e=>{e.removeAttribute(`opacity`),e.removeAttribute(`data-piece-hidden`)})}_cancelPieces(){this._pieceCancel&&=(this._pieceCancel(),null);let e=this._pieceLayer;this._pieceLayer=null,e&&e.parentNode&&e.parentNode.removeChild(e),this._revealPieceHidden()}_canProbePaths(){if(!d_.isBrowser())return!1;let e=Q.createElementNS(`http://www.w3.org/2000/svg`,`path`);return!!e&&typeof e.isPointInFill==`function`}_makeExtentProber(e,t,n){let r=n.ownerDocument.createElementNS(`http://www.w3.org/2000/svg`,`path`);r.setAttribute(`d`,e),r.setAttribute(`fill`,`#000`),r.setAttribute(`stroke`,`#000`),r.setAttribute(`stroke-width`,`3`),r.setAttribute(`visibility`,`hidden`),n.appendChild(r);let i=r.ownerSVGElement;if(typeof r.isPointInFill!=`function`||!i||typeof i.createSVGPoint!=`function`)return n.removeChild(r),null;let a=i.createSVGPoint(),o=(e,t)=>{a.x=e,a.y=t;let n=r;return n.isPointInFill(a)||typeof n.isPointInStroke==`function`&&n.isPointInStroke(a)};return{intervalsAt:(e,n,r)=>{let i=r?t.y:t.x,a=i+(r?t.height:t.width);if(!(a>i))return null;let s=(e,t)=>r?o(t,e):o(e,t),c=[e+(n-e)*.1,(e+n)/2,n-(n-e)*.1],l=(e,t,n)=>{let r=t,i=e;for(let e=0;e<6;e++){let e=(r+i)/2;s(e,n)?i=e:r=e}return(r+i)/2},u=(a-i)/48,d=Array(49).fill(null),f=!1;for(let e of c)for(let t=0;t<=48;t++)d[t]===null&&s(i+t*u,e)&&(d[t]=e,f=!0);if(!f)return null;let p=[],m=-1;for(let e=0;e<=49;e++){let t=e<=48&&d[e]!==null;if(t&&m<0&&(m=e),!t&&m>=0){let t=e-1,n=d[m],r=m===0?i:l(i+m*u,i+(m-1)*u,n),o=t===48?a:l(i+t*u,i+(t+1)*u,d[t]);o>r&&p.push([r,o]),m=-1}}return p.length?p:null},dispose:()=>{r.parentNode&&r.parentNode.removeChild(r)}}}_separatePieces(){let e=this._snapshot,t=this.w.globals.dom?.baseEl;if(!e||!t)return this._revealPieceHidden();let n=new Map,r=0;if(t.querySelectorAll(`.apexcharts-unit-area`).forEach(e=>{let t=parseInt(e.getAttribute(`i`)??``,10);if(isNaN(t))return;let i=e.getAttribute(`cx`),a,o,s=3;if(i!=null)a=parseFloat(i),o=parseFloat(e.getAttribute(`cy`)??``),s=parseFloat(e.getAttribute(`r`)??`3`)||3;else{let t=parseFloat(e.getAttribute(`width`)??`0`)||0,n=parseFloat(e.getAttribute(`height`)??`0`)||0;a=parseFloat(e.getAttribute(`x`)??``)+t/2,o=parseFloat(e.getAttribute(`y`)??``)+n/2,s=Math.max(t,n)/2||3}if(!isFinite(a)||!isFinite(o))return;let c=n.get(t);c||(c=[],n.set(t,c)),c.push({el:e,x:a,y:o,r:s,fill:e.getAttribute(`fill`)}),r++}),r===0||r>_v)return this._revealPieceHidden();let i=this._makePieceLayer();if(!i)return this._revealPieceHidden();let a=[],o=i.ownerDocument,s=yv(e.fromType),c=s===`summary`||s===`radial`;if(Array.from(n.keys()).sort((e,t)=>e-t).forEach(t=>{let r=n.get(t),s=this.getInitialBBoxFor(t),l=e.mapping.get(`${t}:0`);if(!s||!l){r.forEach(e=>{e.el.removeAttribute(`opacity`),e.el.removeAttribute(`data-piece-hidden`)});return}let u=l.fill&&l.fill.indexOf(`url(`)!==0?l.fill:this.w.globals.colors?.[t]||r[0].fill,d=null;if(c){let e=this.getInitialPathFor(t,0);e&&(d=this._makeExtentProber(e,s,i))}let f=d?iv(s,r.length,d.intervalsAt):rv(s,r.length);d&&d.dispose();let p=ov(f,e=>[e.x+e.width/2,e.y+e.height/2]),m=ov(r,e=>[e.x,e.y]);for(let e=0;e<m.length;e++){let n=p[e],r=m[e],s=o.createElementNS(`http://www.w3.org/2000/svg`,`rect`);s.setAttribute(`data-i`,String(t)),s.setAttribute(`x`,String(n.x)),s.setAttribute(`y`,String(n.y)),s.setAttribute(`width`,String(n.width)),s.setAttribute(`height`,String(n.height)),s.setAttribute(`rx`,`0`),s.setAttribute(`fill`,String(u)),i.appendChild(s),a.push({el:s,from:{x:n.x,y:n.y,width:n.width,height:n.height,rx:0},to:{x:r.x-r.r,y:r.y-r.r,width:r.r*2,height:r.r*2,rx:r.r},fill:cv(u,r.fill),fillEnd:r.fill,delay:0,meta:{dotEl:r.el}})}}),!a.length)return this._cancelPieces();this._runPieces(a,e=>{let t=e.meta.dotEl;t.removeAttribute(`opacity`),t.removeAttribute(`data-piece-hidden`),e.el.parentNode&&e.el.parentNode.removeChild(e.el)})}_combinePieces(){let e=this._snapshot,t=this.w.globals.dom?.baseEl;if(!e||!e.sourceDots||!e.keyOrder||!t)return this._revealPieceHidden();let n=this._collectTargetMarks(e.toType);if(!n.size)return this._revealPieceHidden();let r=e.oldLayout.translateX-(this.w.layout.translateX||0),i=e.oldLayout.translateY-(this.w.layout.translateY||0),a=Array.from(e.sourceDots.keys()).sort((e,t)=>e-t),o=this._makePieceLayer();if(!o)return this._revealPieceHidden();let s=o.ownerDocument,c=[],l=yv(e.toType),u=l===`summary`||l===`radial`;for(let t=0;t<a.length;t++){let l=e.sourceDots.get(a[t]),d=e.keyOrder[t],f=d?n.get(d):null;if(!f||!l||!l.length){f&&f.els.forEach(e=>{e.removeAttribute(`opacity`),e.removeAttribute(`data-piece-hidden`)});continue}let p=f.fill&&f.fill.indexOf(`url(`)!==0?f.fill:this.w.globals.colors?.[f.realIndex]||l[0].fill,m=null;if(u){let e=f.d||f.els.map(e=>e.getAttribute(`pathTo`)||e.getAttribute(`d`)).filter(Boolean).join(` `);e&&(m=this._makeExtentProber(e,f.bbox,o))}let h=m?iv(f.bbox,l.length,m.intervalsAt):rv(f.bbox,l.length);m&&m.dispose();let g=ov(h,e=>[e.x+e.width/2,e.y+e.height/2]),_=ov(l,e=>[e.x,e.y]),v={remaining:_.length,els:f.els,tiles:[]};for(let e=0;e<_.length;e++){let t=_[e],n=g[e],a=s.createElementNS(`http://www.w3.org/2000/svg`,`rect`),l=t.x+r-t.r,u=t.y+i-t.r;a.setAttribute(`data-key`,d),a.setAttribute(`x`,String(l)),a.setAttribute(`y`,String(u)),a.setAttribute(`width`,String(t.r*2)),a.setAttribute(`height`,String(t.r*2)),a.setAttribute(`rx`,String(t.r)),a.setAttribute(`fill`,String(t.fill||p)),o.appendChild(a),v.tiles.push(a),c.push({el:a,from:{x:l,y:u,width:t.r*2,height:t.r*2,rx:t.r},to:{x:n.x,y:n.y,width:n.width,height:n.height,rx:0},fill:cv(t.fill,p),fillEnd:String(p),delay:0,meta:{markState:v}})}}if(!c.length)return this._cancelPieces();this._runPieces(c,e=>{let t=e.meta.markState;t.remaining--,t.remaining===0&&(t.els.forEach(e=>{e.removeAttribute(`opacity`),e.removeAttribute(`data-piece-hidden`)}),t.tiles.forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)}))})}_runPieces(e,t){let n=this.getSpeed(),r=Math.min(vv,n*.35),i=Math.max(180,n-r);for(let t=0;t<e.length;t++)e[t].delay=e.length>1?t/(e.length-1)*r:0;this._pieceCancel=uv({pieces:e,duration:i,onPieceDone:t,onAllDone:()=>{this._pieceCancel=null,this._cancelPieces()}})}_collectTargetMarks(e){let t=this.w.globals.dom?.baseEl,n=new Map;if(!t)return n;let r=yv(e);if(r===`radial`)return t.querySelectorAll(`.apexcharts-pie-series .apexcharts-pie-area`).forEach((e,t)=>{let r=e.getAttribute(`data:pathFinal`)||e.getAttribute(`d`);if(!r||!r.trim())return;let i=this._pathBBox(r);i&&n.set(`${t}:0`,{realIndex:t,j:0,d:r,bbox:{x:i.minX,y:i.minY,width:i.maxX-i.minX,height:i.maxY-i.minY},fill:e.getAttribute(`fill`),els:[e]})}),n;let i=r===`summary`?`.apexcharts-${e}-series`:`.apexcharts-bar-series`;return t.querySelectorAll(`${i} .apexcharts-series`).forEach(e=>{let t=parseInt(e.getAttribute(`data:realIndex`)??`0`,10)||0,r=0;e.querySelectorAll(`path[pathTo]`).forEach(e=>{let i=e.getAttribute(`pathTo`)||e.getAttribute(`d`);if(!i||!i.trim())return;let a=parseInt(e.getAttribute(`j`)??``,10),o=isNaN(a)?r++:a,s=this._pathBBox(i);if(!s)return;let c=`${t}:${o}`,l=n.get(c);l?(l.els.push(e),l.bbox={x:Math.min(l.bbox.x,s.minX),y:Math.min(l.bbox.y,s.minY),width:Math.max(l.bbox.x+l.bbox.width,s.maxX)-Math.min(l.bbox.x,s.minX),height:Math.max(l.bbox.y+l.bbox.height,s.maxY)-Math.min(l.bbox.y,s.minY)}):n.set(c,{realIndex:t,j:o,bbox:{x:s.minX,y:s.minY,width:s.maxX-s.minX,height:s.maxY-s.minY},fill:e.getAttribute(`fill`),els:[e]})})}),n}_captureFromDOM(e){let t=this.w.globals.dom?.baseEl;if(!t)return{marks:[],branches:[],unitDots:new Map};let n=[],r=[],i=new Map,a=yv(e);if(a===`bar`)t.querySelectorAll(`.apexcharts-bar-series .apexcharts-series`).forEach(e=>{let t=parseInt(e.getAttribute(`data:realIndex`)??`0`,10);e.querySelectorAll(`path[pathTo]`).forEach((e,r)=>{let i=e.getAttribute(`pathTo`)||e.getAttribute(`d`);i&&n.push({realIndex:t,j:r,d:i,fill:e.getAttribute(`fill`)})})});else if(a===`summary`){let r=new Map;t.querySelectorAll(`.apexcharts-${e}-area`).forEach(e=>{let t=parseInt(e.getAttribute(`j`)??``,10);if(isNaN(t))return;let n=e.getAttribute(`pathTo`)||e.getAttribute(`d`);if(!n||!n.trim())return;let i=typeof e.closest==`function`?e.closest(`.apexcharts-series`):null,a=parseInt(i?.getAttribute(`data:realIndex`)??`0`,10)||0,o=`${a}:${t}`,s=r.get(o);s?s.d+=` ${n}`:r.set(o,{realIndex:a,j:t,d:n,fill:e.getAttribute(`fill`)})}),Array.from(r.values()).sort((e,t)=>e.realIndex-t.realIndex||e.j-t.j).forEach(e=>n.push(e))}else if(a===`partition`)if(e===`treemap`){let e=e=>{let t=parseFloat(e.getAttribute(`x`)??``),n=parseFloat(e.getAttribute(`y`)??``),r=parseFloat(e.getAttribute(`width`)??``),i=parseFloat(e.getAttribute(`height`)??``);return[t,n,r,i].every(e=>isFinite(e))?`M ${t} ${n} L ${t+r} ${n} L ${t+r} ${n+i} L ${t} ${n+i} Z`:null};t.querySelectorAll(`.apexcharts-treemap-rect`).forEach(t=>{let r=e(t);r&&n.push({realIndex:parseInt(t.getAttribute(`i`)??`0`,10)||0,j:parseInt(t.getAttribute(`j`)??`0`,10)||0,d:r,fill:t.getAttribute(`fill`),key:t.getAttribute(`data:key`)||null})}),t.querySelectorAll(`.apexcharts-treemap-parent-rect`).forEach(t=>{let n=e(t),i=t.getAttribute(`data:key`);!n||!i||r.push({key:i,d:n,fill:t.getAttribute(`fill`)})})}else{let e=t.querySelectorAll(`.apexcharts-sunburst-arc`),i=[];e.forEach(e=>{e.getAttribute(`data:leaf`)===`true`&&i.push(e)}),(i.length?i:Array.from(e)).forEach((e,t)=>{let r=e.getAttribute(`d`);!r||!r.trim()||n.push({realIndex:t,j:0,d:r,fill:e.getAttribute(`fill`),key:e.getAttribute(`data:key`)||null})}),e.forEach(e=>{if(e.getAttribute(`data:leaf`)===`true`)return;let t=e.getAttribute(`d`),n=e.getAttribute(`data:key`);!t||!t.trim()||!n||r.push({key:n,d:t,fill:e.getAttribute(`fill`)})})}else if(a===`unit`){let e=t.querySelectorAll(`.apexcharts-unit-area`),r=new Map;e.forEach(e=>{let t=parseInt(e.getAttribute(`i`)??``,10);if(isNaN(t))return;let n=e.getAttribute(`cx`),a,o,s=3;if(n!=null)a=parseFloat(n),o=parseFloat(e.getAttribute(`cy`)??``),s=parseFloat(e.getAttribute(`r`)??`3`)||3;else{let t=parseFloat(e.getAttribute(`width`)??`0`)||0,n=parseFloat(e.getAttribute(`height`)??`0`)||0;a=parseFloat(e.getAttribute(`x`)??``)+t/2,o=parseFloat(e.getAttribute(`y`)??``)+n/2,s=Math.max(t,n)/2||3}if(!isFinite(a)||!isFinite(o))return;let c=i.get(t);c||(c=[],i.set(t,c)),c.push({x:a,y:o,r:s,fill:e.getAttribute(`fill`)});let l=r.get(t);if(!l){r.set(t,{minX:a,minY:o,maxX:a,maxY:o,fill:e.getAttribute(`fill`)});return}a<l.minX&&(l.minX=a),a>l.maxX&&(l.maxX=a),o<l.minY&&(l.minY=o),o>l.maxY&&(l.maxY=o)}),Array.from(r.keys()).sort((e,t)=>e-t).forEach(e=>{let t=r.get(e),i=t.minX-2,a=t.minY-2,o=t.maxX+2,s=t.maxY+2;n.push({realIndex:e,j:0,d:`M ${i} ${a} L ${o} ${a} L ${o} ${s} L ${i} ${s} Z`,fill:t.fill})})}else if(a===`radial`)if(e===`radialBar`||e===`gauge`){let e=this.w.layout.gridWidth/2,r=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;t.querySelectorAll(`.apexcharts-radial-series .apexcharts-radialbar-area`).forEach(t=>{let i=t.parentElement,a=parseInt(i?.getAttribute(`data:realIndex`)??`0`,10),o=t.getAttribute(`d`);if(!o)return;let s=parseFloat(t.getAttribute(`stroke-width`)||`0`),c=s>1&&this._radialArcToFilledSegment(o,s,e,r)||o;n.push({realIndex:a,j:0,d:c,fill:t.getAttribute(`stroke`)})})}else t.querySelectorAll(`.apexcharts-pie-series .apexcharts-pie-area`).forEach((e,t)=>{let r=e.getAttribute(`d`);r&&n.push({realIndex:t,j:0,d:r,fill:e.getAttribute(`fill`)})});return{marks:n,branches:r,unitDots:i}}_radialArcToFilledSegment(e,t,n,r){let i=e.match(/M\s*(-?[\d.]+)\s+(-?[\d.]+)\s+A\s*(-?[\d.]+)\s+(?:-?[\d.]+)\s+(?:-?[\d.]+)\s+(\d)\s+(\d)\s+(-?[\d.]+)\s+(-?[\d.]+)/);if(!i)return null;let a=parseFloat(i[1]),o=parseFloat(i[2]),s=parseFloat(i[3]),c=parseInt(i[4],10),l=parseInt(i[5],10),u=parseFloat(i[6]),d=parseFloat(i[7]);if(!isFinite(s)||s<=0)return null;let f=t/2,p=s+f,m=Math.max(0,s-f),h=(e,t,i)=>{let a=e-n,o=t-r,s=Math.sqrt(a*a+o*o);if(s===0)return{x:n,y:r};let c=i/s;return{x:n+a*c,y:r+o*c}},g=h(a,o,p),_=h(u,d,p),v=h(a,o,m),y=h(u,d,m),b=l?0:1;return`M ${g.x} ${g.y} A ${p} ${p} 0 ${c} ${l} ${_.x} ${_.y} L ${y.x} ${y.y} A ${m} ${m} 0 ${c} ${b} ${v.x} ${v.y} Z`}buildRingSegmentPath(e,t,n,r,i,a){let o=r/2,s=n+o,c=Math.max(0,n-o),l=(i-90)*Math.PI/180,u=(a-90)*Math.PI/180,d={x:e+s*Math.cos(l),y:t+s*Math.sin(l)},f={x:e+s*Math.cos(u),y:t+s*Math.sin(u)},p={x:e+c*Math.cos(l),y:t+c*Math.sin(l)},m={x:e+c*Math.cos(u),y:t+c*Math.sin(u)},h=a>i?1:0,g=Math.abs(a-i)>180?1:0;return`M ${d.x} ${d.y} A ${s} ${s} 0 ${g} ${h} ${f.x} ${f.y} L ${m.x} ${m.y} A ${c} ${c} 0 ${g} ${1-h} ${p.x} ${p.y} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(e,t,n,r,i){let a=new Map,o=yv(n),s=e.slice().sort((e,t)=>e.realIndex-t.realIndex||e.j-t.j);if(o===`partition`&&i&&i.length){let e=s.filter(e=>e.key);e.length===s.length&&(e.forEach(e=>{a.set(`key:${e.key}`,{d:e.d,fill:e.fill})}),i.forEach(e=>{a.set(`key:${e.key}`,{d:e.d,fill:e.fill})}))}if(o===`radial`||o===`unit`||o===`partition`)return s.forEach((e,t)=>{a.set(`${t}:0`,{d:e.d,fill:e.fill})}),a;if(o===`bar`||o===`summary`){let e=[];return(Array.isArray(r)?r:[]).forEach((t,n)=>{let r=t&&Array.isArray(t.data)?t.data:[];for(let t=0;t<r.length;t++)e.push({realIndex:n,j:t})}),s.forEach((t,n)=>{let r=e[n];r&&a.set(`${r.realIndex}:${r.j}`,{d:t.d,fill:t.fill})}),a}return a}isActive(){return this._snapshot!==null}getInitialPathFor(e,t){if(!this._snapshot)return null;let n=this._snapshot.mapping.get(`${e}:${t}`);if(!n)return null;let r=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),i=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return r===0&&i===0?n.d:this._translatePathD(n.d,r,i)}_translatePathD(e,t,n){return t===0&&n===0?e:Bg(e).map(e=>{let r=e[0];return r===`Z`?`Z`:r===`M`||r===`L`||r===`T`?`${r} ${e[1]+t} ${e[2]+n}`:r===`H`?`${r} ${e[1]+t}`:r===`V`?`${r} ${e[1]+n}`:r===`C`?`${r} ${e[1]+t} ${e[2]+n} ${e[3]+t} ${e[4]+n} ${e[5]+t} ${e[6]+n}`:r===`S`||r===`Q`?`${r} ${e[1]+t} ${e[2]+n} ${e[3]+t} ${e[4]+n}`:r===`A`?`${r} ${e[1]} ${e[2]} ${e[3]} ${e[4]} ${e[5]} ${e[6]+t} ${e[7]+n}`:e.join(` `)}).join(` `)}getInitialCenterFor(e){let t=this.getInitialBBoxFor(e);return t?{x:t.x+t.width/2,y:t.y+t.height/2}:null}getInitialPathAt(e){return this.getInitialPathFor(e,0)}getInitialPathForKey(e){return!this._snapshot||!e?null:this.getInitialPathFor(`key`,e)}hasKeyedMarks(){if(!this._snapshot)return!1;for(let e of this._snapshot.mapping.keys())if(typeof e==`string`&&e.startsWith(`key:`))return!0;return!1}getInitialSlotFor(e,t,n){let r=this.getInitialBBoxFor(e);if(!r)return null;let i=r.x+r.width/2,a=r.y+r.height/2;if(!(n>1)||!(t>=0))return{x:i,y:a};let o=(Math.min(t,n-1)+.5)/n;return r.height>=r.width?{x:i,y:r.y+r.height*(1-o)}:{x:r.x+r.width*o,y:a}}getInitialBBoxFor(e){if(!this._snapshot)return null;let t=this._snapshot.mapping.get(`${e}:0`);if(!t)return null;let n=this._pathBBox(t.d);if(!n)return null;let r=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),i=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return{x:n.minX+r,y:n.minY+i,width:n.maxX-n.minX,height:n.maxY-n.minY}}_pathBBox(e){let t=Bg(e),n=1/0,r=1/0,i=-1/0,a=-1/0,o=!1;return t.forEach(e=>{let t=e[0];if(t===`Z`)return;let s=[];if(t===`H`)s=[[e[1],(r+a)/2||e[1]]];else if(t===`V`)s=[[(n+i)/2||e[1],e[1]]];else if(t===`A`)s=[[e[6],e[7]]];else for(let t=1;t+1<e.length;t+=2)s.push([e[t],e[t+1]]);s.forEach(([e,t])=>{!isFinite(e)||!isFinite(t)||(o=!0,e<n&&(n=e),e>i&&(i=e),t<r&&(r=t),t>a&&(a=t))})}),o?{minX:n,minY:r,maxX:i,maxY:a}:null}getInitialFillFor(e,t){if(!this._snapshot)return null;let n=this._snapshot.mapping.get(`${e}:${t}`);return n?n.fill:null}getSpeed(){let e=this.w.config.chart.animations;return e.chartTypeMorph&&e.chartTypeMorph.speed||e.speed||600}applyChromeFade(){if(!this._snapshot||!d_.isBrowser())return;let e=this.w.globals.dom?.baseEl;if(!e)return;this._snapshot.pieceOut?this._separatePieces():this._snapshot.pieceIn?this._combinePieces():this._mountGhost();let t=this.getSpeed();[`.apexcharts-xaxis`,`.apexcharts-yaxis`,`.apexcharts-grid`,`.apexcharts-gridlines-horizontal`,`.apexcharts-gridlines-vertical`,`.apexcharts-legend`,`.apexcharts-title-text`,`.apexcharts-subtitle-text`].forEach(n=>{e.querySelectorAll(n).forEach(e=>{e.style&&(e.style.opacity=`0`,e.style.transition=`opacity ${t}ms ease-out`,Q.requestAnimationFrame(()=>{e.style.opacity=`1`}),setTimeout(()=>{e.style.transition=``,e.style.opacity=``},t+80))})}),setTimeout(()=>this.cleanup(),t+100)}cleanup(){this._snapshot=null,this._removeGhost(),this._cancelPieces()}};kh.registerFeatures({morphTypeChange:bv});var xv=`http://www.w3.org/1999/xhtml`,Sv=18;function Cv(e,t){return Y(Y({show:!0,position:`top-left`,separator:` / `,rootLabel:`All`,offsetX:0,offsetY:0,formatter:void 0},e.config.drilldown&&e.config.drilldown.breadcrumb||{}),t||{})}function wv(e,t){let n=[`.apexcharts-title-text`,`.apexcharts-subtitle-text`].map(t=>e.dom.baseEl.querySelector(t)).filter(e=>e!==null);if(!n.length)return;let r=e.dom.elWrap.getBoundingClientRect().top;for(let e=0;e<n.length+1;e++){let e=t.getBoundingClientRect(),i=n.find(t=>{let n=t.getBoundingClientRect();return e.left<n.right&&e.right>n.left&&e.top<n.bottom&&e.bottom>n.top});if(!i)break;t.style.top=`${i.getBoundingClientRect().bottom-r+4}px`}}function Tv(e,t){let n=e.layout.translateY||0,r=e.dom.elWrap;if(!r)return n;let i=e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-label`);if(!i.length)return n;let a=r.getBoundingClientRect().top,o=t.getBoundingClientRect(),s=n;for(let e=0;e<i.length;e++){let t=i[e].getBoundingClientRect();t.height&&(t.left>=o.right||t.right<=o.left||(s=Math.min(s,t.top-a)))}return s}function Ev(e,t,n,r){let i=t?.dimensions?.dimHelpers,a=i?i.getTitleSubtitleCoords(`title`).height+i.getTitleSubtitleCoords(`subtitle`).height:0,o=n.getBoundingClientRect().height||Sv,s=r&&r.offsetY||0,c=Tv(e,n);if(c-a>=o+1)return n.style.top=`${c-o-1+s}px`,!0;n.style.top=`${a+s}px`;let l=e.config.theme.mode===`dark`;return n.style.background=l?`rgba(20,24,30,0.82)`:`rgba(255,255,255,0.86)`,n.style.borderRadius=`4px`,!1}function Dv(e){let t=e.dom.elWrap;if(!t)return;let n=t.querySelector(`.apexcharts-breadcrumb`);n&&n.parentNode&&n.parentNode.removeChild(n)}function Ov(e,t){if(!d_.isBrowser())return null;let n=e.dom.elWrap;if(!n)return null;Dv(e);let r=t.config||Cv(e);if(r.show===!1)return null;let i=t.crumbs||[];if(i.length<2)return null;let a=Q.createElementNS(xv,`nav`);a.setAttribute(`class`,`apexcharts-breadcrumb`),a.setAttribute(`aria-label`,t.ariaLabel||`Breadcrumb`),kv(a,r),t.compact&&(a.style.fontSize=`11px`,a.style.padding=`0 2px`);let o=r.separator==null?` / `:r.separator;return i.forEach((e,n)=>{if(n>0){let e=Q.createElementNS(xv,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.setAttribute(`aria-hidden`,`true`),e.textContent=o,a.appendChild(e)}let s=n===0?r.rootLabel??`All`:e.label;if(typeof r.formatter==`function`&&(s=r.formatter(s,{index:n,depth:i.length-1,data:e.data})),n===i.length-1){let e=Q.createElementNS(xv,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),e.setAttribute(`aria-current`,`page`),e.textContent=String(s),a.appendChild(e);return}let c=Q.createElementNS(xv,`button`);if(c.setAttribute(`type`,`button`),c.setAttribute(`class`,`apexcharts-breadcrumb-item`),n===0){let e=Q.createElementNS(xv,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),e.setAttribute(`aria-hidden`,`true`),e.textContent=`←`,c.appendChild(e)}let l=Q.createElementNS(xv,`span`);l.setAttribute(`class`,`apexcharts-breadcrumb-label`),l.textContent=String(s),c.appendChild(l),c.addEventListener(`click`,()=>t.onNavigate(n,e)),a.appendChild(c)}),n.appendChild(a),a}function kv(e,t){let n=t.offsetX||0,r=t.offsetY||0;e.style.position=`absolute`,e.style.top=r+`px`,t.position===`top-right`?e.style.right=-n+3+`px`:e.style.left=n+`px`}var Av=`http://www.w3.org/1999/xhtml`,jv=class{constructor(e,t,n){this.w=e,this.ctx=t,this.drilldown=n}render(e){if(!d_.isBrowser())return;let t=this.w,n=t.dom.elWrap;if(!n)return;let r=n.querySelector(`.apexcharts-breadcrumb`);r&&r.parentNode&&r.parentNode.removeChild(r);let i=t.config.drilldown&&t.config.drilldown.breadcrumb;if(!i||i.show===!1||this.drilldown.depth===0)return;let a=Q.createElementNS(Av,`nav`);a.setAttribute(`class`,`apexcharts-breadcrumb`),a.setAttribute(`aria-label`,`Drilldown breadcrumb`),this._position(a,i);let o=i.separator==null?` / `:i.separator;e.forEach((t,n)=>{if(n>0){let e=Q.createElementNS(Av,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.setAttribute(`aria-hidden`,`true`),e.textContent=o,a.appendChild(e)}let r=this._label(t,n);if(n===e.length-1){let e=Q.createElementNS(Av,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),e.setAttribute(`aria-current`,`page`),e.textContent=r,a.appendChild(e)}else{let e=Q.createElementNS(Av,`button`);if(e.setAttribute(`type`,`button`),e.setAttribute(`class`,`apexcharts-breadcrumb-item`),n===0){let t=Q.createElementNS(Av,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),t.setAttribute(`aria-hidden`,`true`),t.textContent=`←`,e.appendChild(t)}let t=Q.createElementNS(Av,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-label`),t.textContent=r,e.appendChild(t),e.addEventListener(`click`,()=>this.drilldown.drillToLevel(n)),a.appendChild(e)}}),n.appendChild(a),this.w.globals.axisCharts&&Ev(this.w,this.ctx,a,i),this._avoidChromeOverlap(a)}_avoidChromeOverlap(e){let t=this.w,n=[`.apexcharts-title-text`,`.apexcharts-subtitle-text`].map(e=>t.dom.baseEl.querySelector(e)).filter(e=>e!==null);if(!n.length)return;let r=t.dom.elWrap.getBoundingClientRect().top;for(let t=0;t<n.length+1;t++){let t=e.getBoundingClientRect(),i=n.find(e=>{let n=e.getBoundingClientRect();return t.left<n.right&&t.right>n.left&&t.top<n.bottom&&t.bottom>n.top});if(!i)break;e.style.top=`${i.getBoundingClientRect().bottom-r+4}px`}}_label(e,t){let n=this.w.config.drilldown.breadcrumb,r;if(t===0)r=n.rootLabel==null?`All`:n.rootLabel;else{let t=(this.w.config.drilldown.series||[]).find(t=>t&&t.id===e);r=t&&t.name||String(e)}return typeof n.formatter==`function`?n.formatter(r,{index:t,depth:this.drilldown.depth}):r}_position(e,t){let n=t.offsetX||0,r=t.offsetY||0;e.style.position=`absolute`,e.style.top=r+`px`,t.position===`top-right`?e.style.right=-n+3+`px`:e.style.left=n+`px`}},Mv=`http://www.w3.org/1999/xhtml`,Nv=`apexcharts-drilldown-loading`,Pv=class{constructor(e){this.w=e,this.el=null}_cfg(){let e=this.w.config.drilldown,t=e&&e.loading;return t===!1?{show:!1}:t||{}}show(){if(!d_.isBrowser())return;let e=this._cfg();if(e.show===!1)return;let t=this.w.dom.elWrap;if(!t)return;this.hide();let n=Q.createElementNS(Mv,`div`);n.setAttribute(`class`,Nv),n.setAttribute(`role`,`status`),n.setAttribute(`aria-live`,`polite`),n.setAttribute(`aria-label`,e.text||`Loading`);let r=Q.createElementNS(Mv,`div`);if(r.setAttribute(`class`,`${Nv}-spinner`),r.setAttribute(`aria-hidden`,`true`),n.appendChild(r),e.text){let t=Q.createElementNS(Mv,`span`);t.setAttribute(`class`,`${Nv}-text`),t.textContent=e.text,n.appendChild(t)}t.appendChild(n),this.el=n}hide(){let e=this.w.dom.elWrap;if(e){let t=e.querySelectorAll(`.${Nv}`);for(let e=0;e<t.length;e++){let n=t[e];n.parentNode&&n.parentNode.removeChild(n)}}else this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);this.el=null}},Fv=32,Iv=`__apexDrilldownMarker`,Lv=class{constructor(e,t){this.w=e,this.ctx=t,this.stack=[],this.rootSnapshot=null,this._wired=!1,this._asyncCache=new Map,this._pending=null,this._warnedUnreachable=!1,this._warnedNoSliceOffset=!1,this.breadcrumb=new jv(e,t,this),this.loading=new Pv(e),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onPlotDown=this._onPlotDown.bind(this),this._onPlotClick=this._onPlotClick.bind(this),this._downAt=null,this._plotClickWired=null,this.init()}init(){let e=this.w;!e.config.drilldown||!e.config.drilldown.enabled||this._wired||(this._wired=!0,this.ctx.addEventListener(`dataPointSelection`,this._onPointSelect),this.ctx.addEventListener(`mounted`,this._afterRender),this.ctx.addEventListener(`updated`,this._afterRender),e.config.markers&&(e.config.markers.discrete=this._drillMarkers(e.config.series)))}get path(){return[`root`,...this.stack.map(e=>e.id)]}get depth(){return this.stack.length}drillDown(e,t,n){let r=this._resolveChild(e);return r?this._drillInto(r,t,n):typeof this.w.config.drilldown.onDrillDown==`function`?this._drillDownAsync(e,t,n):(console.warn(`ApexCharts: drilldown id "${e}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(e){let t=this.stack.length;if(e<0||e>=t)return Promise.resolve(this.ctx);let n=this.path[this.path.length-1],r=e===0?this.rootSnapshot:this.stack[e].restore;this.stack=this.stack.slice(0,e);let i=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(r),`up`,{from:n,to:i})}_resolveChild(e){let t=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(t)&&t.find(t=>t&&t.id===e)||null}_drillInto(e,t,n){if(this.stack.length>=Fv)return console.warn(`ApexCharts: drilldown max depth (${Fv}) reached.`),Promise.resolve(this.ctx);this.rootSnapshot||=this._snapshot();let r=this.path[this.path.length-1];return this.stack.push({id:e.id,name:e.name,restore:this._snapshot()}),this._apply(this._viewFromChild(e),`down`,{from:r,to:e.id,point:t,seriesIndex:n&&n.seriesIndex,dataPointIndex:n&&n.dataPointIndex})}_drillDownAsync(e,t,n){let r=this.w.config.drilldown.onDrillDown,i=this._cacheGet(e);if(i)return this._drillInto(i,t,n);if(this._pending)return this._pending;let a;this.loading.show();try{a=r({id:e,point:t,seriesIndex:n&&n.seriesIndex,dataPointIndex:n&&n.dataPointIndex})}catch(t){return this.loading.hide(),this._fire(`drillDownError`,{id:e,error:t}),Promise.resolve(this.ctx)}let o=()=>{this._pending=null,this.loading.hide()},s=Promise.resolve(a).then(r=>{if(o(),this._isDead())return this.ctx;if(!r||!r.data)return this._fire(`drillDownError`,{id:e,error:Error(`drilldown: onDrillDown resolved without a drillable level for id "${e}" (expected an object with a \`data\` array).`)}),this.ctx;let i=r.id==null?X(Y({},r),{id:e}):r;return this._cacheSet(e,i),this._drillInto(i,t,n)},t=>(o(),this._isDead()||this._fire(`drillDownError`,{id:e,error:t}),this.ctx));return this._pending=s,s}_isDead(){let e=this.w;return!e||!e.globals||e.globals.isDestroyed===!0}_cacheEnabled(){let e=this.w.config.drilldown;return!!(e&&e.cache!==!1)}_cacheGet(e){return!this._cacheEnabled()||e==null?null:this._asyncCache.get(e)||null}_cacheSet(e,t){!this._cacheEnabled()||e==null||this._asyncCache.set(e,t)}clearCache(e){return e==null?this._asyncCache.clear():this._asyncCache.delete(e),this.ctx}_snapshot(){let e=this.w.config,t=this._overrideFields(),n={series:this._uncollapseSeries($.clone(e.series))};return Array.isArray(e.labels)&&e.labels.length&&(n.labels=$.clone(e.labels)),n.chart={type:e.chart.type,stacked:e.chart.stacked},t.has(`xaxis`)&&(n.xaxis=$.clone(e.xaxis)),t.has(`yaxis`)&&(n.yaxis=$.clone(e.yaxis)),t.has(`colors`)&&(n.colors=e.colors?$.clone(e.colors):void 0),t.has(`plotOptions`)&&(n.plotOptions=$.clone(e.plotOptions)),t.has(`fill`)&&(n.fill=$.clone(e.fill)),t.has(`legend`)&&(n.legend=$.clone(e.legend)),n}_uncollapseSeries(e){let t=this.w,n=t.globals,r=[...n.collapsedSeries||[],...n.ancillaryCollapsedSeries||[]];if(!r.length)return e;let i=t.config.chart.type,a=(i===`pie`||i===`donut`||i===`polarArea`)&&e.length===1&&e[0]&&typeof e[0]==`object`&&Array.isArray(e[0].data)?e[0].data:e;for(let t of r){let r=t.index;n.axisCharts?e[r]&&(e[r].data=Array.isArray(t.data)?t.data.slice():t.data):a[r]&&typeof a[r]==`object`?a[r].y=t.data:a[r]!==void 0&&(a[r]=t.data)}return e}_overrideFields(){let e=new Set,t=this.w.config.drilldown&&this.w.config.drilldown.series||[];for(let n of t)n&&(n.xaxis&&e.add(`xaxis`),n.yaxis&&e.add(`yaxis`),n.colors&&e.add(`colors`),n.plotOptions&&e.add(`plotOptions`),n.fill&&e.add(`fill`),n.legend&&e.add(`legend`));return e}_copyOptionalViewFields(e,t){t.xaxis&&(e.xaxis=t.xaxis),t.yaxis&&(e.yaxis=t.yaxis),t.colors&&(e.colors=t.colors),t.plotOptions&&(e.plotOptions=t.plotOptions),t.fill&&(e.fill=t.fill),t.legend&&(e.legend=t.legend)}_viewFromChild(e){let t={};Array.isArray(e.series)?t.series=e.series:t.series=[{name:e.name||``,data:e.data}];let n={};return e.chart&&e.chart.type&&(n.type=e.chart.type),e.chart&&e.chart.stacked!=null&&(n.stacked=e.chart.stacked),Object.keys(n).length&&(t.chart=n),this._copyOptionalViewFields(t,e),t}_viewFromSnapshot(e){let t={series:e.series,chart:e.chart};return e.labels&&e.labels.length&&(t.labels=e.labels),this._copyOptionalViewFields(t,e),t}_apply(e,t,n){let r=this.w;r.interact.selectedDataPoints=[],r.globals.collapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeries=[],r.globals.ancillaryCollapsedSeriesIndices=[],r.globals.allSeriesCollapsed=!1,r.globals.risingSeries=[],e.markers=X(Y({},e.markers||{}),{discrete:this._drillMarkers(e.series)});let i=(!r.config.drilldown.animation||r.config.drilldown.animation.enabled!==!1)&&r.config.chart.animations.enabled!==!1;t===`down`&&this._fire(`drillDownStart`,n);let a=t=>this.ctx.updateOptions(e,!1,t,!1,!1),o=()=>(this._fire(t===`down`?`drillDownEnd`:`drillUp`,n),this.ctx);if(i&&this._zoomEnabled()){let e=this._triggerOrigin(n);if(e)return this._zoomDrill(e,t,()=>a(!1)).then(o)}return a(i).then(o)}_zoomEnabled(){let e=this.w.config.drilldown&&this.w.config.drilldown.animation;return!!(e&&e.zoomFromPoint)}_svgNode(){let e=this.w.dom&&this.w.dom.Paper;return e&&e.node?e.node:null}_markGroup(){let e=this._svgNode();return!e||typeof e.querySelector!=`function`?null:e.querySelector(`.apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap`)}_triggerOrigin(e){if(!d_.isBrowser())return null;let t=this._svgNode(),n=this._markGroup();if(!t||!n||typeof n.animate!=`function`||typeof t.getBoundingClientRect!=`function`)return null;let r=t.getBoundingClientRect(),i=null;if(e&&e.seriesIndex!=null&&e.dataPointIndex!=null&&this.w.dom.baseEl&&(i=this.w.dom.baseEl.querySelector(`[index="${e.seriesIndex}"][j="${e.dataPointIndex}"]`)),i&&typeof i.getBoundingClientRect==`function`){let e=i.getBoundingClientRect();return{x:e.left+e.width/2-r.left,y:e.top+e.height/2-r.top}}let a=n.getBoundingClientRect();return{x:a.left+a.width/2-r.left,y:a.top+a.height/2-r.top}}_zoomDrill(e,t,n){return Rh(this,null,function*(){let r=this._zoomDuration(),i=t===`down`,a=Math.round(r*.55),o=i?`scale(1.03)`:`scale(0.97)`,s=i?`scaleX(0.55) scaleY(0.85)`:`scale(1.04)`,c=t=>{t.style.transformBox=`view-box`,t.style.transformOrigin=`${e.x}px ${e.y}px`},l=e=>{e.style.transform=``,e.style.opacity=``,e.style.transformOrigin=``,e.style.transformBox=``},u=this._markGroup(),d=null;if(u){c(u),d=u.animate([{transform:`scale(1)`,opacity:1},{transform:o,opacity:0}],{duration:a,easing:`ease-in`,fill:`forwards`});try{yield d.finished}catch{}}yield n();let f=this._markGroup();if(f){c(f),f.style.opacity=`0`,f.style.transform=s,d&&u===f&&d.cancel();let e=f.animate([{transform:s,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:r,easing:`cubic-bezier(0.16, 1, 0.3, 1)`,fill:`forwards`});try{yield e.finished}catch{}l(f),e.cancel()}})}_zoomDuration(){let e=this.w.config.drilldown&&this.w.config.drilldown.animation,t=e&&typeof e.speed==`number`?e.speed:260;return Math.max(80,t)}_fire(e,t){let n=this.w.config.chart.events&&this.w.config.chart.events[e];typeof n==`function`&&n(t,this.ctx,this.w),this.ctx.events.fireEvent(e,[t,this.ctx,this.w])}_onPointSelect(e,t,n){if(!n)return;let r=this._pointAt(n.seriesIndex,n.dataPointIndex);if(r&&typeof r==`object`&&r.drilldown!=null)return this.drillDown(r.drilldown,r,n);if(typeof this.w.config.drilldown.onDrillDown==`function`)return this._drillDownAsync(null,r,n)}_pointAt(e,t){let n=this.w.config.series;if(!Array.isArray(n)||e==null||t==null)return null;let r=n[e];return!r||!Array.isArray(r.data)||r.data[t]==null?null:r.data[t]}_afterRender(){let e=this.w;!e.config.drilldown||!e.config.drilldown.enabled||(this._markDrillableTargets(),this._wirePlotClick(),this.breadcrumb.render(this.path),e.config.markers&&(e.config.markers.discrete=this._drillMarkers(e.config.series)))}_markDrillableTargets(){if(!d_.isBrowser())return;let e=this.w,t=e.dom.baseEl,n=e.config.series;if(!t||!Array.isArray(n))return;let r=0;n.forEach((e,n)=>{let i=e&&Array.isArray(e.data)?e.data:null;i&&i.forEach((e,i)=>{if(!e||typeof e!=`object`||e.drilldown==null)return;let a=t.querySelectorAll(`[index="${n}"][j="${i}"]`);a.length||r++,a.forEach(e=>{this._isClickThroughMark(e)&&e.classList.remove(`no-pointer-events`),e.classList.add(`apexcharts-drilldown-target`)})})}),r&&!this._warnedUnreachable&&(this._warnedUnreachable=!0,console.warn(`ApexCharts: ${r} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \`drilldown.marker\` on, or give the series markers of its own (\`markers.size > 0\`).`))}warnSliceOffsetDisabled(){this._warnedNoSliceOffset||(this._warnedNoSliceOffset=!0,console.warn("ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered."))}_wirePlotClick(){if(!d_.isBrowser())return;let e=this.w.dom.baseEl;!e||this._plotClickWired===e||(this._plotClickWired&&(this._plotClickWired.removeEventListener(`mousedown`,this._onPlotDown),this._plotClickWired.removeEventListener(`click`,this._onPlotClick)),e.addEventListener(`mousedown`,this._onPlotDown),e.addEventListener(`click`,this._onPlotClick),this._plotClickWired=e)}_onPlotDown(e){this._downAt={x:e.clientX,y:e.clientY}}_onPlotClick(e){let t=this.w;if(!t.config.drilldown||!t.config.drilldown.enabled)return;let n=this._downAt;if(this._downAt=null,n&&Math.hypot(e.clientX-n.x,e.clientY-n.y)>4)return;let r=e.target;if(!r||typeof r.closest!=`function`||r.closest(`.apexcharts-drilldown-target`)||r.closest(`.apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip`))return;let i=t.interact.capturedSeriesIndex,a=t.interact.capturedDataPointIndex;if(i==null||a==null||i<0||a<0||!this._isPointBasedSeries(t.config.series[i]))return;let o=this._pointAt(i,a);if(!(!o||typeof o!=`object`||o.drilldown==null))return this.drillDown(o.drilldown,o,{seriesIndex:i,dataPointIndex:a})}_isClickThroughMark(e){return!e.classList||!e.classList.contains(`no-pointer-events`)||!e.classList.contains(`apexcharts-marker`)?!1:!(typeof e.closest==`function`&&e.closest(`.apexcharts-tooltip`))}_drillMarkers(e){let t=this.w,n=t.config.drilldown,r=Array.isArray(t.config.markers&&t.config.markers.discrete)?t.config.markers.discrete.filter(e=>!e||!e[Iv]):[],i=n&&n.marker||{};if(i.show===!1||!Array.isArray(e))return r;let a=[];return e.forEach((e,t)=>{if(!this._seriesNeedsDrillMarker(t,e))return;let n=e&&Array.isArray(e.data)?e.data:null;n&&n.forEach((e,n)=>{if(!e||typeof e!=`object`||e.drilldown==null)return;let r={seriesIndex:t,dataPointIndex:n,[Iv]:!0};i.size!==void 0&&(r.size=i.size),i.shape!==void 0&&(r.shape=i.shape),i.fillColor!==void 0&&(r.fillColor=i.fillColor),i.strokeColor!==void 0&&(r.strokeColor=i.strokeColor),a.push(r)})}),r.concat(a)}_seriesNeedsDrillMarker(e,t){if(!this._isPointBasedSeries(t))return!1;let n=this.w.config.markers&&this.w.config.markers.size,r=Array.isArray(n)?n[e]:n;return!(Number(r)>0)}_isPointBasedSeries(e){let t=e&&e.type||this.w.config.chart.type;return t===`line`||t===`area`}};kh.registerFeatures({drilldown:Lv});var Rv=`__apexcharts_plugins__`;function zv(){let e=globalThis;return e[Rv]||(e[Rv]={}),e[Rv]}function Bv(e){return zv()[e]||null}var Vv=4,Hv=[`updateOptions`,`updateSeries`,`appendData`,`appendSeries`,`toggleSeries`,`showSeries`,`hideSeries`,`highlightSeries`,`isSeriesHidden`,`zoomX`,`addXaxisAnnotation`,`addYaxisAnnotation`,`addPointAnnotation`,`clearAnnotations`,`removeAnnotation`,`dataURI`,`exportToCSV`];function Uv(e){let t={};return Hv.forEach(n=>{typeof e[n]==`function`&&(t[n]=e[n].bind(e))}),Object.freeze(t)}function Wv(e,t){let n=t=>(t&&e.add(t),t),r={get node(){return e.node},path(e={}){let{d:r=``,stroke:i=`#000`,width:a=1,fill:o=`none`,opacity:s=1,dash:c=0,className:l=``}=e;return n(t.drawPath({d:r,stroke:i,strokeWidth:a,fill:o,fillOpacity:o===`none`?0:s,strokeOpacity:s,strokeDashArray:c,classes:l}))},line(e={}){let{x1:r,y1:i,x2:a,y2:o,stroke:s=`#000`,width:c=1,dash:l=0}=e;return n(t.drawLine(r,i,a,o,s,l,c))},rect(e={}){let{x:r=0,y:i=0,w:a=0,h:o=0,r:s=0,fill:c=`#000`,stroke:l=null,opacity:u=1}=e;return n(t.drawRect(r,i,a,o,s,c,u,l==null?null:1,l))},circle(e={}){let{cx:r=0,cy:i=0,r:a=0,fill:o=`#000`,stroke:s=null}=e;return n(t.drawCircle(a,{cx:r,cy:i,fill:o,stroke:s||`none`}))},text(e={}){let{x:r=0,y:i=0,text:a=``,color:o,size:s,anchor:c=`start`,weight:l}=e;return n(t.drawText({x:r,y:i,text:a,textAnchor:c,fontSize:s,foreColor:o,fontWeight:l}))},clear(){let t=e.node;for(;t.firstChild;)t.removeChild(t.firstChild);return r}};return r}function Gv(e,t){let n=e.ctx,r=e.w,i={name:t.def.name,version:Vv,get options(){return t.options},on(e,n){let r=t.handlers;return r.has(e)||r.set(e,[]),r.get(e).push(n),i},off(e,n){let r=t.handlers.get(e);if(r){let e=r.indexOf(n);e>-1&&r.splice(e,1)}return i},store:{},layer(n){return e._layer(t.def.name,n||{})},get scales(){return e._currentScales},get data(){return e._lastData||=e._dataSnapshot()},theme:Object.freeze({get mode(){return r.config.theme.mode},get foreColor(){return r.config.chart.foreColor},seriesColor(e){return r.globals.colors[e]},token(t){return e._token(t)}}),chart:Uv(n),get info(){return Object.freeze({type:String(r.config.chart&&(r.config.chart.requestedType||r.config.chart.type)||`line`),axisChart:r.globals.axisCharts===!0,datetimeX:!!(r.config.xaxis&&r.config.xaxis.type===`datetime`),horizontalBars:!!(r.config.plotOptions&&r.config.plotOptions.bar&&r.config.plotOptions.bar.horizontal),dataLabels:Object.freeze({enabled:!!(r.config.dataLabels&&r.config.dataLabels.enabled),enabledOnSeries:Array.isArray(r.config.dataLabels&&r.config.dataLabels.enabledOnSeries)?r.config.dataLabels.enabledOnSeries.slice():null})})},get categories(){return e._categories()},markDerived(n){return e._markDerived(t.def.name,n),i},reserve(n){return e._reserve(t.def.name,n),i},pointer(n){return e._onPointer(t.def.name,n)},emit(e,r){n.events.fireEvent(`plugin:${t.def.name}:${e}`,[n,r])},get el(){return r.dom.baseEl}};return Object.freeze(i)}var Kv=class e{constructor(e,t){this.w=e,this.ctx=t,this.active=[],this._layers=new Map,this._currentScales=null,this._lastPluginsRef=null,this._lastData=null,this._updatedWired=!1,this._derived=null,this._reserved=null,this._reserveTimer=null,this._pointerSubs=null,this._pointerWired=null,this._onUpdated=this._onUpdated.bind(this),this._init()}_init(){(this.w.config.plugins||[]).map((e,t)=>({entry:e,order:e.order==null?t:e.order})).sort((e,t)=>e.order-t.order).forEach(e=>this._activate(e.entry)),this._lastPluginsRef=this.w.config.plugins,this._wireUpdated()}_wireUpdated(){this._updatedWired||=(this.ctx.addEventListener(`updated`,this._onUpdated),!0)}_onUpdated(){this._repairInitialSeries(),this.dispatch(`afterUpdate`,{pass:`update`})}_activate(e){let t=Bv(e.name);if(!t){console.error(`[apexcharts] plugin "${e.name}" is not registered.`);return}let n=t.apiVersion==null?1:Math.trunc(t.apiVersion);if(!(n>=1)||n>Vv){console.error(`[apexcharts] plugin "${t.name}" targets Weave API v${t.apiVersion}, host is v${Vv}; skipped.`);return}let r={def:t,options:Object.freeze(Y({},e.options||{})),handlers:new Map,disabled:!1,failures:0,api:null};r.api=Gv(this,r),this.active.push(r),this._guard(r,`setup`,()=>t.setup(r.api))}dispatch(e,t){if(e===`draw`&&(this._reconcile(),this._resetLayers()),this._lastData=null,!this.active.length)return;e===`afterParse`?this._currentScales=null:t&&`xyRatios`in t&&this._setScales(t.xyRatios);let n=t&&t.pass||`full`,r=null;for(let t of this.active){if(t.disabled)continue;let i=t.handlers.get(e);if(!i||!i.length)continue;r===null&&(r=this._dataSnapshot(),this._lastData=r);let a={api:t.api,scales:this._currentScales,data:r,pass:n,hook:e};for(let n of i.slice())this._guard(t,e,()=>n(a))}}_guard(e,t,n){if(!e.disabled)try{n()}catch(n){console.error(`[apexcharts] plugin "${e.def.name}" threw in "${t}":`,n),e.failures=(e.failures||0)+1,e.failures>=3&&(e.disabled=!0,console.error(`[apexcharts] plugin "${e.def.name}" disabled after repeated errors.`))}}_setScales(e){let t=this.w,n=t.globals,r=t.layout;if(!e||!n.axisCharts){this._currentScales=null;return}let i=e.xRatio,a=e.yRatio||[],o=e=>a[e]==null?a[0]:a[e],s=e=>n.maxYArr[e]==null?n.maxY:n.maxYArr[e],c=e=>n.minYArr[e]==null?n.minY:n.minYArr[e],l=!t.axisFlags.isXNumeric&&!n.isBarHorizontal&&n.dataPoints>0,u=l?r.gridWidth/n.dataPoints:0;this._currentScales={x:l?e=>u*(e+.5):e=>(e-n.minX)/i,y:(e,t=0)=>(s(t)-e)/o(t),domainX:l?[-.5,n.dataPoints-.5]:[n.minX,n.maxX],domainY:(e=0)=>[c(e),s(e)],gridWidth:r.gridWidth,gridHeight:r.gridHeight,ratios:e}}_dataSnapshot(){let e=this.w,t=e.globals,n=e.seriesData.series||[],r=e.seriesData.seriesX||[],i=Array.isArray(e.config.series)?e.config.series:[];return n.map((e,n)=>{let a=Array.isArray(e)?e:[e],o=r[n]||[],s=a.map((e,t)=>({x:o[t]==null?t:o[t],y:e})),c=i[n],l=c&&typeof c==`object`&&Array.isArray(c.data)?c.data:[];return{name:t.seriesNames?t.seriesNames[n]:void 0,hidden:(t.collapsedSeriesIndices||[]).includes(n),color:t.colors?t.colors[n]:void 0,points:s,raw:l}})}_categories(){let e=this.w,t=e.globals,n=e.config.xaxis&&Array.isArray(e.config.xaxis.categories)?e.config.xaxis.categories:[],r=Array.isArray(t.categoryLabels)?t.categoryLabels:[],i=Array.isArray(t.labels)?t.labels:[],a=n.length?n:r.length?r:i,o=e.seriesData.series||[],s=0;for(let e=0;e<o.length;e++){let t=o[e];Array.isArray(t)&&t.length>s&&(s=t.length)}s||=a.length;let c=[];for(let e=0;e<s;e++){let t=a[e];c.push(t==null?String(e+1):String(t))}return c}_markDerived(e,t){this._derived||=new Map;let n=Array.isArray(t)?t.map(e=>String(e)):[];n.length?this._derived.set(e,n):this._derived.delete(e),this._repairInitialSeries()}_onPointer(e,t){if(typeof t!=`function`)return()=>{};this._pointerSubs||=new Map;let n=this._pointerSubs.get(e)||[];return n.push(t),this._pointerSubs.set(e,n),this._wirePointer(),()=>{let n=this._pointerSubs&&this._pointerSubs.get(e);if(!n)return;let r=n.indexOf(t);r>-1&&n.splice(r,1)}}_wirePointer(){if(this._pointerWired||!this.ctx||typeof this.ctx.addEventListener!=`function`)return;let e=[[`enter`,`dataPointMouseEnter`],[`leave`,`dataPointMouseLeave`],[`select`,`dataPointSelection`]];this._pointerWired=[];for(let[t,n]of e){let e=(e,n,r)=>{this._emitPointer(t,r)};this.ctx.addEventListener(n,e),this._pointerWired.push([n,e])}}_emitPointer(t,n){if(!this._pointerSubs||!this._pointerSubs.size)return;let r=n&&typeof n.seriesIndex==`number`?n.seriesIndex:-1,i=n&&typeof n.dataPointIndex==`number`?n.dataPointIndex:-1,a=this._categories()||[],o=this.w,s=o&&o.config&&o.config.series||[],c={type:t,seriesIndex:r,dataPointIndex:i,category:i>-1?a[i]:void 0,seriesName:e._seriesName(s,r),selected:t===`select`?e._isSelected(n,r,i):void 0};for(let[e,t]of this._pointerSubs)for(let n of t.slice())try{n(c)}catch(t){console.warn(`[apexcharts] plugin "`+e+`" threw in a pointer handler`,t)}}static _seriesName(e,t){if(t<0)return;let n=e[t];if(!(!n||typeof n!=`object`))return typeof n.name==`string`?n.name:void 0}static _isSelected(e,t,n){let r=e&&e.selectedDataPoints;if(!Array.isArray(r)||t<0)return;let i=r[t];return Array.isArray(i)?i.indexOf(n)>-1:!1}_reserve(t,n){let r=e._normaliseBox(n),i=this._reserved?this._reserved.get(t):void 0;if(r){if(i&&i.left===r.left&&i.right===r.right&&i.top===r.top&&i.bottom===r.bottom)return;this._reserved||=new Map,this._reserved.set(t,r)}else{if(!i||!this._reserved)return;this._reserved.delete(t)}this._resizeForReservation()}static _normaliseBox(e){if(!e||typeof e!=`object`)return null;let t=e=>Number.isFinite(e)&&e>0?Math.round(e):0,n={left:t(e.left),right:t(e.right),top:t(e.top),bottom:t(e.bottom)};return n.left||n.right||n.top||n.bottom?n:null}reservedBox(){if(!this._reserved||this._reserved.size===0)return e.NO_RESERVATION;let t={left:0,right:0,top:0,bottom:0};for(let e of this._reserved.values())t.left+=e.left,t.right+=e.right,t.top+=e.top,t.bottom+=e.bottom;return t}_resizeForReservation(){this._reserveTimer??=setTimeout(()=>{this._reserveTimer=null;let e=this.w.globals;if(!e.isDestroyed){e.resized=!0,e.dataChanged=!1;try{this.ctx.update()}catch{}}},0)}_derivedNames(){let e=new Set;if(!this._derived)return e;for(let t of this._derived.values())for(let n of t)e.add(n);return e}_repairInitialSeries(){let e=this._derivedNames();if(!e.size)return;let t=this.w,n=(Array.isArray(t.config.series)?t.config.series:[]).filter(t=>!e.has(String(t&&t.name)));if(n.length)try{t.globals.initialSeries=n,t.globals.initialConfig&&Array.isArray(t.globals.initialConfig.series)&&(t.globals.initialConfig.series=n)}catch{}}_token(e){let t=this.w,n=t.globals;switch(e){case`foreColor`:return t.config.chart.foreColor;case`background`:return t.config.chart.background;case`accent`:case`primary`:return n.colors?n.colors[0]:void 0;default:return/^series-\d+$/.test(e)&&n.colors?n.colors[Number(e.split(`-`)[1])]:void 0}}_layer(e,{z:t=`front`,className:n=``}={}){let r=this._layers.get(e);if(!r){r=this.ctx.graphics.group({class:`apexcharts-plugin-${e} ${n}`.trim()});let i=this.w.dom.elGraphical.node;t===`behind`?i.insertBefore(r.node,i.firstChild):i.appendChild(r.node),r.node.setAttribute(`aria-hidden`,`true`),this._layers.set(e,r)}return Wv(r,this.ctx.graphics)}_resetLayers(){let e=this.w.dom.elGraphical,t=e&&e.node;if(t){let e=t.querySelectorAll(`g[class*="apexcharts-plugin-"]`);Array.prototype.forEach.call(e,e=>e.remove())}this._layers.clear()}_reconcile(){let e=this.w.config.plugins||[];if(e===this._lastPluginsRef)return;this._lastPluginsRef=e;let t=new Map(e.map((e,t)=>[e.name,{entry:e,order:e.order==null?t:e.order}]));for(let e=this.active.length-1;e>=0;e--){let n=this.active[e],r=t.get(n.def.name);r?n.options=Object.freeze(Y({},r.entry.options||{})):(this._guard(n,`destroy`,()=>n.def.destroy&&n.def.destroy(n.api)),this.active.splice(e,1),this._reserve(n.def.name,null))}let n=new Set(this.active.map(e=>e.def.name)),r=[];t.forEach((e,t)=>{n.has(t)||r.push(e)}),r.sort((e,t)=>e.order-t.order).forEach(e=>this._activate(e.entry))}teardown(e){if(!e){this.dispatch(`destroy`);for(let e of this.active)this._guard(e,`destroy`,()=>e.def.destroy&&e.def.destroy(e.api));if(this.active=[],this._derived=null,this._reserved=null,this._pointerSubs=null,this._pointerWired){for(let[e,t]of this._pointerWired)this.ctx.removeEventListener&&this.ctx.removeEventListener(e,t);this._pointerWired=null}this._reserveTimer!=null&&(clearTimeout(this._reserveTimer),this._reserveTimer=null),this._updatedWired&&=(this.ctx.removeEventListener&&this.ctx.removeEventListener(`updated`,this._onUpdated),!1)}this._layers.clear()}};Lh(Kv,`NO_RESERVATION`,Object.freeze({left:0,right:0,top:0,bottom:0}));var qv=Kv;kh.registerFeatures({weave:qv});function Jv(e,t){let n=e&&e.renderer;return n&&n.kind&&n.kind!==`svg`?n:t}function Yv(e,t){let n=class{constructor(e,t,n){this.w=e,this.ctx=t,this.xyRatios=n,this._warned=!1}draw(n,r,i){var a,o;let s=this.w,c=new Z(s,this.ctx),l=Jv(this.ctx,c),u=c.group({class:`apexcharts-marks-series`});return n.forEach((n,r)=>{let a=Array.isArray(i)?i[r]:r,o=c.group({class:`apexcharts-series`,rel:a+1,seriesName:$.escapeString(s.seriesData.seriesNames[a]),"data:realIndex":a}),d=this._scales(a,(s.seriesData.series[a]||[]).length),f=s.globals.colors[a],p=s.config.series[a]?.data||[],m=s.seriesData.seriesX[a]||[],h=s.seriesData.series[a]||[];s.globals.seriesXvalues[a]=[],s.globals.seriesYvalues[a]=[],s.globals.pointsArray[a]===void 0&&(s.globals.pointsArray[a]=[]);for(let n=0;n<h.length;n++){let r=h[n];if(r==null)continue;let i=m[n],c=d.xAt(n,i),u=d.y(r),g=this._api(l,o,a,n);try{t.renderItem({datum:p[n],x:c,y:u,scales:d,api:g,seriesIndex:a,dataPointIndex:n,color:f})}catch(t){this._warned||=(console.warn(`[apexcharts] renderItem for series type "${e}" threw; skipping datum:`,t),!0)}s.globals.seriesXvalues[a][n]=c,s.globals.seriesYvalues[a][n]=u,s.globals.pointsArray[a][n]=[c,u]}c.setupEventDelegation(o,`.apexcharts-marks-mark`),u.add(o)}),(o=(a=this.ctx.animations)?.animationCompleted)==null||o.call(a,u),u}_scales(e,t){let n=this.w.globals,r=this.w.config,i=this.xyRatios.xRatio,a=this.xyRatios.yRatio,o=n.seriesYAxisReverseMap?.[e]??0,s=Array.isArray(a)?a[o]??a[0]:a,c=n.maxYArr,l=Array.isArray(c)&&c.length?c[o]??n.maxY:n.maxY,u=n.gridWidth,d=n.gridHeight,f=!n.isXNumeric,p=t||n.dataPoints||1,m=p>0?u/p:u,h=r.xaxis.tickPlacement===`on`,g=e=>i?(e-n.minX)/i:u/2,_=e=>(l-e)/s,v=(e,t)=>f?h&&p>1?e/(p-1)*u:(e+.5)*m:g(t),y=n.minXDiff||1;return{x:g,xAt:v,y:_,gridWidth:u,gridHeight:d,band:f?m:i?y/i:u}}_api(e,t,n,r){let i=e=>{if(e){try{e.node.setAttribute(`index`,String(n)),e.node.setAttribute(`j`,String(r)),e.node.classList.add(`apexcharts-marks-mark`)}catch{}t.add(e)}return e};return{path:(t={})=>i(e.drawPath({d:t.d||``,stroke:t.stroke??`#000`,strokeWidth:t.width??t.strokeWidth??1,fill:t.fill??`none`,fillOpacity:t.fillOpacity??(t.fill&&t.fill!==`none`?t.opacity??1:0),strokeOpacity:t.strokeOpacity??t.opacity??1,strokeDashArray:t.dash??0,strokeLinecap:t.lineCap})),line:(t={})=>i(e.drawLine(t.x1,t.y1,t.x2,t.y2,t.stroke??`#000`,t.dash??0,t.width??t.strokeWidth??1)),rect:(t={})=>i(e.drawRect(t.x??0,t.y??0,t.w??0,t.h??0,t.r??0,t.fill??`#000`,t.opacity??1,t.stroke==null?null:t.strokeWidth??1,t.stroke)),circle:(t={})=>i(e.drawCircle(t.r??0,{cx:t.cx??0,cy:t.cy??0,fill:t.fill??`#000`,stroke:t.stroke||`none`,"stroke-width":t.strokeWidth??(t.stroke?1:0)})),text:(t={})=>i(e.drawText({x:t.x??0,y:t.y??0,text:t.text??``,textAnchor:t.anchor??`start`,fontSize:t.size,foreColor:t.color,fontWeight:t.weight}))}}};return n.dataType=t.dataType||`xy`,n.yExtent=typeof t.yExtent==`function`?t.yExtent:null,n}kh._customSeriesFactory=Yv;var Xv=`(prefers-color-scheme: dark)`,Zv=`(prefers-contrast: more)`,Qv=class e{constructor(e,t){if(this.w=e,this.ctx=t,e.config.theme.follow!==`os`||!d_.isBrowser())return;let n=this._ensureMedia();n&&(this._applyToConfig(n),this._ensureListeners(n))}_ensureMedia(){if(!this.ctx._osThemeMedia){let e=Q.matchMedia(Xv),t=Q.matchMedia(Zv);if(!e&&!t)return null;this.ctx._osThemeMedia={dark:e,contrast:t,handler:null}}return this.ctx._osThemeMedia}_applyToConfig(e){let t=this.w.config.theme;e.dark&&(t.mode=e.dark.matches?`dark`:`light`),e.contrast&&e.contrast.matches&&(t.accessibility=t.accessibility||{},t.accessibility.colorBlindMode=`highContrast`)}_ensureListeners(t){if(t.handler)return;let n=this.ctx,r=()=>{let e=n._osThemeMedia;if(!e)return;let t={mode:e.dark&&e.dark.matches?`dark`:`light`};e.contrast&&e.contrast.matches?t.accessibility={colorBlindMode:`highContrast`}:t.accessibility={colorBlindMode:``},n.updateOptions({theme:t},!1,!0,!1)};e._add(t.dark,r),e._add(t.contrast,r),t.handler=r}teardown(){let t=this.ctx._osThemeMedia;t&&(t.handler&&(e._remove(t.dark,t.handler),e._remove(t.contrast,t.handler)),this.ctx._osThemeMedia=null)}static _add(e,t){e&&(typeof e.addEventListener==`function`?e.addEventListener(`change`,t):typeof e.addListener==`function`&&e.addListener(t))}static _remove(e,t){e&&(typeof e.removeEventListener==`function`?e.removeEventListener(`change`,t):typeof e.removeListener==`function`&&e.removeListener(t))}};kh.registerFeatures({osThemeWatcher:Qv});var $v=`__apexcharts_series_transforms__`;globalThis[$v]||(globalThis[$v]={});function ey(){return globalThis[$v]}function ty(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerSeriesTransform requires a non-empty name.`);return}if(typeof t!=`function`){console.warn(`ApexCharts: registerSeriesTransform("${e}") expects a function (series, w) => series.`);return}ey()[e]=t}var ny=`__apexcharts_row_sources__`;globalThis[ny]||(globalThis[ny]={});function ry(){return globalThis[ny]}function iy(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerRowSource requires a non-empty name.`);return}if(typeof t!=`function`){console.warn(`ApexCharts: registerRowSource("${e}") expects a function (w, opts) => series.`);return}ry()[e]=t}var ay=1e3;function oy(e,t){let n=e.length;if(n===0)return NaN;if(n===1)return e[0];let r=(n-1)*t,i=Math.floor(r),a=Math.ceil(r);return i===a?e[i]:e[i]+(e[a]-e[i])*(r-i)}function sy(e){let t=e.length;if(t<2)return 0;let n=0;for(let r=0;r<t;r++)n+=e[r];let r=n/t,i=0;for(let n=0;n<t;n++){let t=e[n]-r;i+=t*t}return Math.sqrt(i/t)}function cy(e,t,n){let r=e.length,i=e=>t/Math.max(1,Math.ceil(e));switch(n){case`sqrt`:return{width:i(Math.sqrt(r)),rule:`sqrt`};case`rice`:return{width:i(2*Math.cbrt(r)),rule:`rice`};case`scott`:{let t=sy(e);return t>0?{width:3.49*t*r**(-1/3),rule:`scott`}:{width:i(Math.log2(r)+1),rule:`sturges`}}case`fd`:{let t=oy(e,.75)-oy(e,.25);return t>0?{width:2*t*r**(-1/3),rule:`fd`}:{width:i(Math.log2(r)+1),rule:`sturges`}}case`auto`:{let t=i(Math.log2(r)+1),n=oy(e,.75)-oy(e,.25);if(n<=0)return{width:t,rule:`sturges`};let a=2*n*r**(-1/3);return a<t?{width:a,rule:`fd`}:{width:t,rule:`sturges`}}case`sturges`:default:return{width:i(Math.log2(r)+1),rule:`sturges`}}}function ly(e,t={}){if(!Array.isArray(e)||e.length===0)return null;let n=e.slice().sort((e,t)=>e-t),r=n[0],i=n[n.length-1],a=t.range;if(Array.isArray(a)&&a.length===2){let e=Number(a[0]),t=Number(a[1]);isFinite(e)&&isFinite(t)&&t>e&&(r=e,i=t)}if(!(i>r)){let e=Math.abs(r)>0?Math.abs(r)*.05:.5;return{edges:[r-e,r+e],binWidth:e*2,rule:`single`,capped:!1}}let o=i-r,s,c;if(typeof t.binWidth==`number`&&t.binWidth>0)s=t.binWidth,c=`binWidth`;else if(typeof t.bins==`number`&&t.bins>=1)s=o/Math.floor(t.bins),c=`count`;else{let e=cy(n,o,typeof t.bins==`string`?t.bins:`auto`);s=e.width,c=e.rule}(!isFinite(s)||s<=0)&&(s=o);let l=Math.ceil(o/s);(!isFinite(l)||l<1)&&(l=1);let u=!1;l>ay&&(l=ay,s=o/l,u=!0),s=o/l;let d=Array(l+1);for(let e=0;e<=l;e++)d[e]=r+e*s;return d[l]=Math.max(d[l],i),{edges:d,binWidth:s,rule:c,capped:u}}function uy(e,t){let n=t.length-1;if(!(e>=t[0])||e>t[n])return-1;if(e===t[n])return n-1;let r=(t[n]-t[0])/n;if(r>0){let i=Math.floor((e-t[0])/r);return i<0&&(i=0),i>n-1&&(i=n-1),e<t[i]?i--:e>=t[i+1]&&i++,i<0||i>n-1?-1:i}let i=0,a=n-1;for(;i<=a;){let n=i+a>>1;if(e<t[n])a=n-1;else if(e>=t[n+1])i=n+1;else return n}return-1}function dy(e,t){let n=Array(Math.max(0,t.length-1)).fill(0);for(let r=0;r<e.length;r++){let i=uy(e[r],t);i>=0&&n[i]++}return n}function fy(e,t){let n=Math.max(0,t.length-1),r=Array(n);for(let e=0;e<n;e++)r[e]=[];for(let n=0;n<e.length;n++){let i=uy(e[n],t);i>=0&&r[i].push(e[n])}return r}function py(e,t={}){if(!Array.isArray(e)||e.length===0)return null;let n=e.slice().sort((e,t)=>e-t),r=oy(n,.25),i=oy(n,.5),a=oy(n,.75),o=a-r,s=n[0],c=n[n.length-1],l=[];if(t.whiskers===`tukey`&&o>0){let e=r-1.5*o,t=a+1.5*o,i=0;for(;i<n.length&&n[i]<e;)i++;let u=n.length-1;for(;u>=0&&n[u]>t;)u--;i<=u&&(s=n[i],c=n[u],l=n.slice(0,i).concat(n.slice(u+1)))}return{summary:[s,r,i,a,c],outliers:l,iqr:o}}function my(e,t={}){if(!Array.isArray(e)||e.length===0)return null;let n=e.slice().sort((e,t)=>e-t),r=n.length,i=t.bandwidth;if(!(typeof i==`number`&&i>0)){let e=sy(n),t=oy(n,.75)-oy(n,.25);i=.9*(t>0?Math.min(e,t/1.349):e)*r**(-1/5)}if(!isFinite(i)||i<=0){let e=n[0],t=Math.abs(e)>0?Math.abs(e)*.001:.001;return{density:[[e-t,0],[e,1],[e+t,0]],bandwidth:t}}let a=Math.max(8,Math.floor(t.resolution||64)),o=n[0]-2*i,s=(n[r-1]+2*i-o)/(a-1),c=1/(r*i*Math.sqrt(2*Math.PI)),l=[];for(let e=0;e<a;e++){let t=o+e*s,a=0;for(let e=0;e<r;e++){let r=(t-n[e])/i;a+=Math.exp(-.5*r*r)}l.push([t,a*c])}return{density:l,bandwidth:i}}function hy(e,t={}){let n=e.slice();if(t.cumulative){let e=0;n=n.map(t=>e+=t)}let r=e.reduce((e,t)=>e+t,0);if(r<=0)return n;if(t.normalize===`relative`)return n.map(e=>e/r*100);if(t.normalize===`density`){let e=t.binWidth;if(typeof e==`number`&&e>0)return n.map(t=>t/(r*e))}return n}function gy(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return null;let n=null;if(Array.isArray(e.points)?n=e.points:Array.isArray(e.y?.points)?n=e.y.points:t&&Array.isArray(e.y)&&typeof e.y[0]==`number`&&(n=e.y),!n)return null;let r=[];for(let e=0;e<n.length;e++){let t=$.parseNumber(n[e]);t!==null&&isFinite(t)&&r.push(t)}return r.length?r:null}function _y(e){let t=[];if(!Array.isArray(e))return t;for(let n=0;n<e.length;n++){let r=e[n],i=r;Array.isArray(r)?i=r.length===1?r[0]:r[1]:r&&typeof r==`object`&&(i=r.y===void 0?r.x:r.y);let a=$.parseNumber(i);a!==null&&isFinite(a)&&t.push(a)}return t}function vy(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.histogramRawSeries||=e.map(e=>X(Y({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.histogramRawSeries,a=n.plotOptions?.histogram||{},o=i.map(e=>_y(e?.data)),s=[];if(o.length===1)s=o[0];else for(let e of o)s=s.concat(e);let c=ly(s,{bins:a.bins,binWidth:a.binWidth,range:a.range});if(!c)return t.histogramData={edges:[],binWidth:0,counts:[],rule:``,capped:!1},i;let{edges:l,binWidth:u}=c,d=o.map(e=>dy(e,l));t.histogramData={edges:l,binWidth:u,counts:d,rule:c.rule,capped:c.capped};let f=r.collapsedSeriesIndices||[];return i.map((e,t)=>{if(f.indexOf(t)!==-1)return X(Y({},e),{data:[]});let n=hy(d[t],{normalize:a.normalize,cumulative:a.cumulative,binWidth:u}),r=[];for(let e=0;e<n.length;e++)r.push({x:(l[e]+l[e+1])/2,y:n[e]});return X(Y({},e),{data:r})})}var yy=new WeakSet;function by(e,t){if(!Array.isArray(e))return e;let n=t.config.plotOptions?.boxPlot?.whiskers||`minmax`;return e.map(e=>{if(!Array.isArray(e?.data))return e;let t=!1,r=e.data.map(e=>{if(Array.isArray(e?.y)&&e.y.length===5&&!yy.has(e))return e;let r=gy(e,!1);if(!r)return e;let i=py(r,{whiskers:n});if(!i)return e;t=!0;let a=X(Y({},e),{y:i.summary,points:r});return yy.add(a),a});return t?X(Y({},e),{data:r}):e})}function xy(e,t){if(!Array.isArray(e))return e;let n=t.config.plotOptions?.violin?.kde||{};return e.map(e=>{if(!Array.isArray(e?.data))return e;let t=!1,r=e.data.map(e=>{if(Array.isArray(e?.y?.density)&&e.y.density.length&&!yy.has(e))return e;let r=gy(e,!0);if(!r)return e;let i=my(r,{bandwidth:n.bandwidth,resolution:n.resolution});if(!i)return e;t=!0;let a=X(Y({},e),{y:{density:i.density,points:r}});return yy.add(a),a});return t?X(Y({},e),{data:r}):e})}var Sy=3e3;function Cy(e,t){let n=0,r=0;for(let t of e)n+=t.length,t.length>r&&(r=t.length);if(n<=t)return{clusters:e,stride:1,total:n,kept:n};let i=t=>{let n=0;for(let r of e)n+=Math.ceil(r.length/t);return n},a=Math.max(2,Math.ceil(n/t));for(;a<r&&i(a)>t;)a++;let o=0;return{clusters:e.map(e=>{let t=[];for(let n=0;n<e.length;n+=a)t.push(e[n]);return o+=t.length,t}),stride:a,total:n,kept:o}}function wy(e,t,n){let r=n&&n.maxRows!=null?n.maxRows:Sy,i=Cy(t.map(e=>e.rows),r);i.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${i.total} rows to ${i.kept} (every ${i.stride}${i.stride===2?`nd`:i.stride===3?`rd`:`th`} row) to stay under maxRows=${r}. Raise maxRows to draw more.`);let a=e.globals&&e.globals.colors||[];return t.map((e,t)=>{let n=a[e.realIndex]||a[0];return{name:e.name,data:i.clusters[t].map((r,i)=>Y({id:`${e.realIndex}:${t}:${i}`,x:e.name,y:r},n?{fillColor:n}:{}))}})}function Ty(e,t){let n=e.globals,r=e.histogramData,i=n&&n.histogramRawSeries;if(!r||!Array.isArray(r.edges)||r.edges.length<2||!Array.isArray(i)||!i.length)return null;let a=n&&n.collapsedSeriesIndices||[],o=r.edges,s=[];return i.forEach((t,n)=>{if(a.indexOf(n)!==-1)return;let r=fy(_y(t&&t.data),o),c=e.seriesData&&e.seriesData.seriesNames?.[n]||t?.name;r.forEach((e,t)=>{let r=`${Ey(o[t])}-${Ey(o[t+1])}`;s.push({name:i.length>1&&c?`${c} ${r}`:r,realIndex:n,rows:e})})}),s.length?wy(e,s,t):null}function Ey(e){if(!isFinite(e))return String(e);let t=Math.round(e);return Math.abs(e-t)<1e-6?String(t):String(Number(e.toFixed(2)))}function Dy(e){return(t,n)=>{let r=e(t);if(!Array.isArray(r)||!r.length)return null;let i=t.globals&&t.globals.collapsedSeriesIndices||[],a=t.globals&&(t.globals.categoryLabels?.length?t.globals.categoryLabels:t.globals.labels)||[],o=[];return r.forEach((e,n)=>{if(i.indexOf(n)!==-1||!Array.isArray(e))return;let s=t.seriesData&&t.seriesData.seriesNames?.[n];e.forEach((e,t)=>{let i=a[t]==null?`#${t+1}`:String(a[t]);o.push({name:r.length>1&&s?`${s} ${i}`:i,realIndex:n,rows:Array.isArray(e)?e.slice():[]})})}),o.length?wy(t,o,n):null}}var Oy=Dy(e=>e.candleData?.seriesBoxPoints),ky=Dy(e=>e.violinData?.seriesViolinPoints);ty(`histogram`,vy),ty(`boxPlot`,by),ty(`violin`,xy),iy(`histogram`,Ty),iy(`boxPlot`,Oy),iy(`violin`,ky);var Ay=class{constructor(e,t){this.w=e,this.ctx=t}isActive(){return this.w.config.chart.requestedType===`waterfall`}drawConnectors(){let e=this.w;if(!this.isActive())return;let t=e.config.plotOptions?.waterfall?.connectors;if(!t||t.show===!1)return;let n=e.dom.elGraphical,r=e.waterfallData&&e.waterfallData.geometry;if(!n||!r)return;this.removeConnectors();let i=new Z(e,this.ctx),a=i.group({class:`apexcharts-waterfall-connectors`}),o=t.color||e.config.grid.borderColor,s=t.strokeWidth==null?1:t.strokeWidth,c=t.strokeDashArray==null?3:t.strokeDashArray,l=0;for(let e=0;e<r.length;e++){let t=r[e];if(Array.isArray(t))for(let e=0;e<t.length-1;e++){let n=t[e],r=t[e+1];if(!n||!r||!(r.slotStart-n.slotEnd>.5))continue;let u=n.horizontal?i.drawLine(n.levelEnd,n.slotEnd,n.levelEnd,r.slotStart,o,c,s):i.drawLine(n.slotEnd,n.levelEnd,r.slotStart,n.levelEnd,o,c,s);u.node.classList.add(`apexcharts-waterfall-connector`),a.add(u),l++}}if(!l)return;a.attr(`clip-path`,`url(#gridRectBarMask${e.globals.cuid})`);let u=n.node.querySelector(`.apexcharts-xaxis`);u?n.node.insertBefore(a.node,u):n.add(a),this.holdUntilBarsLand(a)}removeConnectors(){let e=this.w.dom.elGraphical,t=e&&e.node.querySelector(`.apexcharts-waterfall-connectors`);t&&t.parentNode&&t.parentNode.removeChild(t)}holdUntilBarsLand(e){let t=this.w;d_.isBrowser()&&t.globals.shouldAnimate&&!t.globals.animationEnded&&(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node,holdUntilComplete:!0}))}};function jy(e,t,n){let r=n&&n[t]!==void 0?n[t]:t+1;return e==null?{x:r,y:null,isSubtotal:!1,isTotal:!1,rest:{}}:Array.isArray(e)?{x:e[0]===void 0?r:e[0],y:e[1],isSubtotal:!1,isTotal:!1,rest:{}}:typeof e==`object`?{x:e.x===void 0?r:e.x,y:e.y,isSubtotal:e.isSubtotal===!0,isTotal:e.isTotal===!0,rest:e}:{x:r,y:e,isSubtotal:!1,isTotal:!1,rest:{}}}function My(e){for(let t=0;t<e.length;t++){let n=e[t],r=Array.isArray(n)?n[1]:n&&typeof n==`object`?n.y:n;if(Array.isArray(r)&&r.length===2)return!0}return!1}function Ny(e,t,n){if(e&&e.fillColor)return e.fillColor;let r=n[t];return typeof r==`string`&&r?r:void 0}function Py(e,t,n){let r=[],i=[],a=[],o=[],s=0,c=0;for(let l=0;l<e.length;l++){let{x:u,y:d,isSubtotal:f,isTotal:p,rest:m}=jy(e[l],l,t),h,g,_;if(p||f)h=p?0:c,g=s,_=p?`total`:`subtotal`,c=s;else{let e=$.parseNumber(d);if(e===null||!isFinite(e)){r.push(X(Y({},m),{x:u,y:null})),i.push(null),a.push(s),o.push(null);continue}h=s,g=s+e,s=g,_=e<0?`negative`:`positive`}let v=Ny(m,_,n);r.push(Y(X(Y({},m),{x:u,y:[h,g]}),v?{fillColor:v}:{})),i.push(g-h),a.push(s),o.push(_)}return{data:r,values:i,cumulative:a,kinds:o}}function Fy(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.waterfallRawSeries||=e.map(e=>X(Y({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.waterfallRawSeries,a=n.plotOptions?.waterfall?.colors||{},o=n.xaxis?.categories,s=r.collapsedSeriesIndices||[],c=[],l=[],u=[],d=i.map((e,t)=>{let n=Array.isArray(e?.data)?e.data:[];if(s.indexOf(t)!==-1)return c[t]=[],l[t]=[],u[t]=[],X(Y({},e),{data:[]});if(My(n))return c[t]=n.map(e=>{let t=Array.isArray(e)?e[1]:e&&typeof e==`object`?e.y:e;if(!Array.isArray(t))return null;let n=$.parseNumber(t[0]),r=$.parseNumber(t[1]);return n===null||r===null?null:r-n}),l[t]=n.map(e=>{let t=Array.isArray(e)?e[1]:e&&typeof e==`object`?e.y:e,n=Array.isArray(t)?$.parseNumber(t[1]):null;return n===null?0:n}),u[t]=n.map(()=>null),e;let r=Py(n,o,a);return c[t]=r.values,l[t]=r.cumulative,u[t]=r.kinds,X(Y({},e),{data:r.data})});return t.waterfallData={values:c,cumulative:l,kinds:u,geometry:[]},d}ty(`waterfall`,Fy),kh.registerFeatures({waterfall:Ay});function Iy(e,t,n){let r=n&&n[t]!==void 0?n[t]:t+1;return e==null?{x:r,y:null,rest:{}}:Array.isArray(e)?{x:e[0]===void 0?r:e[0],y:e[1],rest:{}}:typeof e==`object`?{x:e.x===void 0?r:e.x,y:e.y,rest:e}:{x:r,y:e,rest:{}}}function Ly(e){for(let t=0;t<e.length;t++){let n=e[t],r=Array.isArray(n)?n[1]:n&&typeof n==`object`?n.y:n;if(Array.isArray(r)&&r.length===2)return!0}return!1}function Ry(e,t){let n=[],r=[],i=new Map,a=[];for(let o=0;o<e.length;o++){let s=Array.isArray(e[o]?.data)?e[o].data:[],c=new Map;for(let e=0;e<s.length;e++){let{x:a,y:o,rest:l}=Iy(s[e],e,t),u=a instanceof Date?a.getTime():a;i.has(u)||(i.set(u,n.length),n.push(a),r.push(Y({},l)));let d=i.get(u);c.set(d,$.parseNumber(o))}a.push(c)}return{xs:n,rows:r,byX:a}}function zy(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.dumbbellRawSeries||=e.map(e=>X(Y({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.dumbbellRawSeries;if(i.some(e=>Ly(Array.isArray(e?.data)?e.data:[])))return t.dumbbellData={form:`pairs`,names:[],values:[],order:[],carrier:0,hidden:[]},e;let a=n.xaxis?.categories,o=r.collapsedSeriesIndices||[],{xs:s,rows:c,byX:l}=Ry(i,a),u=[],d=[],f=[];for(let e=0;e<i.length;e++)o.indexOf(e)===-1&&f.push(e);let p=[];for(let e=0;e<s.length;e++){let t=[];for(let n=0;n<i.length;n++){let r=l[n].has(e)?l[n].get(e):null;t.push(r==null||!isFinite(r)?null:r)}u.push(t);let n=null,r=null,a=-1,o=-1;for(let e=0;e<f.length;e++){let i=f[e],s=t[i];s!==null&&((n===null||s<n)&&(n=s,a=i),(r===null||s>r)&&(r=s,o=i))}if(n===null||r===null){d.push(null),p.push(X(Y({},c[e]),{x:s[e],y:null}));continue}d.push([a,o]),p.push(X(Y({},c[e]),{x:s[e],y:[n,r]}))}t.dumbbellData={form:`series`,names:i.map((e,t)=>e?.name??`Series ${t+1}`),values:u,order:d,carrier:f.length?f[0]:0,hidden:i.map((e,t)=>t).filter(e=>o.indexOf(e)!==-1)};let m=t.dumbbellData.carrier;return i.map((e,t)=>X(Y({},e),{data:t===m&&f.length?p:[]}))}ty(`dumbbell`,zy);var By=3,Vy=class{constructor(e,t){this.w=e,this.ctx=t,this._hovered=-1}isActive(){return this.w.config.chart.requestedType===`streamgraph`}_yPx(e){let t=this.w,n=t.globals,r=t.layout.gridHeight,i=n.maxY-n.minY;if(!i||!isFinite(i))return r/2;let a=(e-n.minY)/i;return t.config.yaxis[0]?.reversed?a*r:r-a*r}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){let e=this.w;if(!this.isActive())return;let t=e.config.plotOptions?.streamgraph?.labels;if(!t||t.show===!1)return;let n=e.dom.elGraphical,r=e.streamgraphData;if(!n||!r)return;this.removeLabels();let i=new Z(e,this.ctx),a=i.group({class:`apexcharts-streamgraph-labels`}),o=t.style?.fontSize||`auto`,s=t.style?.fontFamily||e.config.chart.fontFamily,c=t.style?.fontWeight||600,l=t.minWidth==null?24:t.minWidth,u=[];for(let e=0;e<r.order.length;e++){let t=r.order[e],n=this._placeLabel(t,{fontSize:o,fontFamily:s,fontWeight:c,minWidth:l,graphics:i});n&&u.push(n)}let d=0;for(let e of this._deconflict(u)){let n=e.k,r=i.drawText({x:e.x,y:e.y,text:e.text,textAnchor:`middle`,dominantBaseline:`middle`,fontSize:e.fontSize,fontFamily:s,fontWeight:c,foreColor:t.style?.colors?.[n]||e.color,cssClass:`apexcharts-streamgraph-label`});r.node.setAttribute(`data:realIndex`,String(n)),a.add(r),d++}if(!d)return;let f=n.node.querySelector(`.apexcharts-xaxis`);f?n.node.insertBefore(a.node,f):n.add(a),this.holdUntilBandsLand(a)}_placeLabel(e,{fontSize:t,fontFamily:n,fontWeight:r,minWidth:i,graphics:a}){let o=this.w,s=o.streamgraphData,c=s.lows[e],l=s.highs[e];if(!c||!l)return null;let u=o.globals.seriesXvalues[e],d=c.length;if(!Array.isArray(u)||u.length<d||d===0)return null;let f=Array(d),p=0;for(let e=0;e<d;e++){let t=Math.abs(this._yPx(l[e])-this._yPx(c[e]));f[e]=t,t>p&&(p=t)}if(p<=0)return null;let m=this._resolveFontSize(t,p),h=String(s.names[e]),g=m,_=a.getTextRects(h,`${g}px`,n,``,!0,r);if(p<_.height+By*2)return null;let v=this._widestRun(f,u,_.height+By*2,d);if(!v)return null;if(_.width>v.width&&t===`auto`){let e=Math.floor(g*(v.width/_.width));if(e<this._autoBounds().min||(g=e,_=a.getTextRects(h,`${g}px`,n,``,!0,r),p<_.height+By*2))return null}let y=_.height+By*2,b=[];for(let t of this._runs(f,y,d)){let r=Number(u[t.l]),o=Number(u[t.r]);if(!isFinite(r)||!isFinite(o))continue;let s=o-r;if(s<=0&&d>1){let e=Math.abs(Number(u[Math.min(t.r+1,d-1)])-Number(u[Math.max(t.l-1,0)]));s=isFinite(e)?e:0}if(s<i||s<_.width*.35)continue;let f=_.width<=s?h:a.getTextBasedOnMaxWidth({text:h,maxWidth:s,fontSize:`${g}px`,fontFamily:n});if(!f||f===`...`)continue;let p=f===h?_.width:_.width*(f.length/h.length),m=[r+s/2];s>p*2.2&&m.push(r+p/2+2,o-p/2-2);for(let n of m){let r=t.l,i=1/0;for(let e=t.l;e<=t.r;e++){let t=Math.abs(Number(u[e])-n);t<i&&(i=t,r=e)}b.push({x:n,y:(this._yPx(c[r])+this._yPx(l[r]))/2,text:f,color:this._contrastOn(e),fontSize:`${g}px`,width:p,height:_.height})}if(b.length>=6)break}return b.length?{k:e,weight:p,candidates:b}:null}_runs(e,t,n){let r=[],i=0;for(;i<n;){if(e[i]<t){i++;continue}let a=i,o=e[i];for(;a+1<n&&e[a+1]>=t;)a++,e[a]>o&&(o=e[a]);r.push({l:i,r:a,maxT:o}),i=a+1}return r.sort((e,t)=>t.maxT-e.maxT)}_widestRun(e,t,n,r){let i=-1;for(let a of this._runs(e,n,r)){let e=Number(t[a.r])-Number(t[a.l]);isFinite(e)&&e>i&&(i=e)}return i>=0?{width:i}:null}_deconflict(e){let t=e.slice().sort((e,t)=>t.weight-e.weight),n=[],r=e=>!n.some(t=>e.left<t.box.right&&e.right>t.box.left&&e.top<t.box.bottom&&e.bottom>t.box.top);for(let e of t)for(let t of e.candidates){let i={left:t.x-t.width/2,right:t.x+t.width/2,top:t.y-t.height/2,bottom:t.y+t.height/2};if(r(i)){n.push(X(Y({k:e.k},t),{box:i}));break}}return n}_autoBounds(){let e=this.w.config.plotOptions?.streamgraph?.labels||{};return{min:e.minFontSize==null?9:e.minFontSize,max:e.maxFontSize==null?30:e.maxFontSize}}_resolveFontSize(e,t){if(e!==`auto`){let t=parseFloat(e);return isFinite(t)&&t>0?t:12}let{min:n,max:r}=this._autoBounds();return Math.max(n,Math.min(r,Math.round(t*.36)))}_contrastOn(e){let t=this.w,n=t.globals.colors?.[e],r=typeof n==`string`?$.parseHex(n):null;return r?$.relativeLuminance(r)>.45?`#000000`:`#ffffff`:t.config.chart.foreColor}removeLabels(){let e=this.w.dom.elGraphical,t=e&&e.node.querySelector(`.apexcharts-streamgraph-labels`);t&&t.parentNode&&t.parentNode.removeChild(t)}bindHover(){let e=this.w;if(!d_.isBrowser()||this._hoverCfg().show===!1)return;let t=e.dom.baseEl&&e.dom.baseEl.querySelector(`.apexcharts-svg`);!t||t.__apexStreamHover||(t.__apexStreamHover=!0,t.addEventListener(`mousemove`,e=>{!this.isActive()||!this.w.streamgraphData||this._dim(this._bandAt(e))}),t.addEventListener(`mouseleave`,()=>{this._dim(-1)}))}_hoverCfg(){return this.w.config.plotOptions?.streamgraph?.hover||{}}_bandAt(e){let t=this.w,n=t.streamgraphData;if(!n||!n.order.length)return-1;let r=t.dom.baseEl&&t.dom.baseEl.querySelector(`.apexcharts-svg`);if(!r)return-1;let i=r.getBoundingClientRect(),a=t.globals.svgWidth?i.width/t.globals.svgWidth:1,o=H_.screenXToPlotPx(t,e.clientX),s=(e.clientY-i.top)/(a||1)-t.layout.translateY;if(o<0||o>t.layout.gridWidth||s<0||s>t.layout.gridHeight)return-1;let c=t.globals.seriesXvalues[n.order[0]];if(!Array.isArray(c)||!c.length)return-1;let l=t.interact?t.interact.capturedDataPointIndex:-1,u=-1;if(l>=0&&l<c.length)u=l;else{let e=1/0;for(let t=0;t<c.length;t++){let n=Math.abs(Number(c[t])-o);n<e&&(e=n,u=t)}}if(u<0)return-1;let d=-1,f=1/0;for(let e=0;e<n.order.length;e++){let t=n.order[e],r=this._yPx(n.highs[t][u]),i=this._yPx(n.lows[t][u]),a=Math.min(r,i),o=Math.max(r,i);if(s>=a&&s<=o)return t;let c=s<a?a-s:s-o;c<f&&(f=c,d=t)}return d}_dim(e){let t=this.w;if(e===this._hovered)return;this._hovered=e;let n=this._hoverCfg(),r=n.opacity==null?.35:n.opacity,i=t.dom.baseEl.querySelectorAll(`.apexcharts-series`),a=t.dom.baseEl.querySelectorAll(`.apexcharts-streamgraph-label`),o=(t,n)=>e<0||n===e;for(let e=0;e<i.length;e++){let t=i[e];t.style.transition=`opacity .15s ease`,t.style.opacity=o(t,Number(t.getAttribute(`data:realIndex`)))?``:String(r)}for(let e=0;e<a.length;e++){let n=a[e];n.style.transition=`opacity .15s ease, fill .15s ease`,o(n,Number(n.getAttribute(`data:realIndex`)))?this._restoreLabel(n):(n.getAttribute(`data:fill`)||n.setAttribute(`data:fill`,n.getAttribute(`fill`)||``),n.setAttribute(`fill`,t.config.chart.foreColor),n.style.opacity=`0.65`)}}_restoreLabel(e){let t=e.getAttribute(`data:fill`);t&&e.setAttribute(`fill`,t),e.style.opacity=``}clearDim(){this._hovered=-1;let e=this.w;if(!e.dom.baseEl)return;let t=e.dom.baseEl.querySelectorAll(`.apexcharts-series`);for(let e=0;e<t.length;e++){let n=t[e];n.style.opacity=``}let n=e.dom.baseEl.querySelectorAll(`.apexcharts-streamgraph-label`);for(let e=0;e<n.length;e++)this._restoreLabel(n[e])}holdUntilBandsLand(e){let t=this.w;d_.isBrowser()&&t.globals.shouldAnimate&&!t.globals.animationEnded&&(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node,holdUntilComplete:!0}))}},Hy=[`wiggle`,`silhouette`,`zero`,`expand`],Uy=[`inside-out`,`inverse`,`none`];function Wy(e,t,n){let r=n&&n[t]!==void 0?n[t]:t+1;return e==null?{x:r,y:null,rest:{}}:Array.isArray(e)?{x:e[0]===void 0?r:e[0],y:e[1],rest:{}}:typeof e==`object`?{x:e.x===void 0?r:e.x,y:e.y,rest:e}:{x:r,y:e,rest:{}}}function Gy(e){for(let t=0;t<e.length;t++){let n=e[t],r=Array.isArray(n)?n[1]:n&&typeof n==`object`?n.y:n;if(Array.isArray(r)&&r.length===2)return!0}return!1}function Ky(e,t){let n=[],r=[],i=new Map,a=[];for(let o=0;o<e.length;o++){let s=Array.isArray(e[o]?.data)?e[o].data:[],c=new Map;for(let e=0;e<s.length;e++){let{x:a,y:o,rest:l}=Wy(s[e],e,t),u=a instanceof Date?a.getTime():a;i.has(u)||(i.set(u,n.length),n.push(a),r.push(Y({},l))),c.set(i.get(u),$.parseNumber(o))}a.push(c)}return{xs:n,rows:r,grids:a}}function qy(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n]instanceof Date?e[n].getTime():e[n];if(typeof r!=`number`||!isFinite(r))return null;t.push(n)}let n=t.map(t=>({j:t,v:e[t]instanceof Date?e[t].getTime():e[t]}));n.sort((e,t)=>e.v-t.v);let r=n.map(e=>e.j);for(let e=0;e<r.length;e++)if(r[e]!==e)return r;return null}function Jy(e,t,n){if(e===`none`)return t.slice();if(e===`inverse`)return t.slice().reverse();let r={},i={};for(let e=0;e<t.length;e++){let a=t[e],o=n[a],s=0,c=-1/0,l=0;for(let e=0;e<o.length;e++)s+=o[e],o[e]>c&&(c=o[e],l=e);r[a]=s,i[a]=l}let a=t.slice().sort((e,t)=>i[e]-i[t]||e-t),o=0,s=0,c=[],l=[];for(let e=0;e<a.length;e++){let t=a[e];o<s?(o+=r[t],c.push(t)):(s+=r[t],l.push(t))}return l.reverse().concat(c)}function Yy(e,t,n,r){let i=Array(r).fill(0);if(r===0||t.length===0||e===`zero`||e===`expand`)return i;if(e===`silhouette`){for(let e=0;e<r;e++){let r=0;for(let i=0;i<t.length;i++)r+=n[t[i]][e];i[e]=-r/2}return i}let a=0;for(let e=1;e<r;e++){let r=0,o=0;for(let i=0;i<t.length;i++){let a=n[t[i]],s=a[e],c=(s-a[e-1])/2;for(let r=0;r<i;r++){let i=n[t[r]];c+=i[e]-i[e-1]}r+=s,o+=c*s}r&&(a-=o/r),i[e]=a}return i}function Xy(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.streamgraphRawSeries||=e.map(e=>X(Y({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.streamgraphRawSeries;if(i.some(e=>Gy(Array.isArray(e?.data)?e.data:[])))return t.streamgraphData=null,e;let a=n.plotOptions?.streamgraph||{},o=Hy.indexOf(a.offset)===-1?`wiggle`:a.offset,s=Uy.indexOf(a.order)===-1?`inside-out`:a.order,c=n.xaxis?.categories,l=r.collapsedSeriesIndices||[],{xs:u,rows:d,grids:f}=Ky(i,c),p=qy(u),m=p?p.map(e=>u[e]):u,h=p?p.map(e=>d[e]):d,g=m.length,_=!1,v=[];for(let e=0;e<i.length;e++){let t=Array(g);for(let n=0;n<g;n++){let r=f[e].get(p?p[n]:n),i=r==null?0:Number(r);isFinite(i)||(i=0),i<0&&(_=!0,i=0),t[n]=i}v.push(t)}_&&!r.streamgraphWarnedNegative&&(r.streamgraphWarnedNegative=!0,console.warn(`ApexCharts: a streamgraph stacks parts of a whole, so negative values have no band to draw and were treated as 0. Use a stacked area (chart.type: "area", chart.stacked: true) for data that goes below zero.`));let y=[];for(let e=0;e<i.length;e++)l.indexOf(e)===-1&&y.push(e);let b=v;if(o===`expand`){b=v.map(e=>e.slice());for(let e=0;e<g;e++){let t=0;for(let n=0;n<y.length;n++)t+=b[y[n]][e];if(t)for(let n=0;n<y.length;n++)b[y[n]][e]/=t}}let x=Jy(s,y,b),S=Yy(o,x,b,g),C=i.map(()=>null),w=i.map(()=>null);for(let e=0;e<x.length;e++)C[x[e]]=Array(g),w[x[e]]=Array(g);for(let e=0;e<g;e++){let t=S[e];for(let n=0;n<x.length;n++){let r=x[n],i=C[r],a=w[r];i[e]=t,t+=b[r][e],a[e]=t}}return t.streamgraphData={names:i.map((e,t)=>e?.name??`Series ${t+1}`),xs:m,values:v,lows:C,highs:w,order:x,offset:o,hidden:i.map((e,t)=>t).filter(e=>l.indexOf(e)!==-1)},i.map((e,t)=>{let n=C[t],r=w[t];if(!n||!r)return X(Y({},e),{data:[]});let i=Array(g);for(let e=0;e<g;e++)i[e]=X(Y({},h[e]),{x:m[e],y:[n[e],r[e]]});return X(Y({},e),{data:i})})}ty(`streamgraph`,Xy),kh.registerFeatures({streamgraph:Vy});var Zy=(e,t,n,r)=>{if(typeof e!=`function`)return e;let i=e({series:t.seriesData.series,seriesIndex:n,dataPointIndex:r,w:t});return Number.isFinite(i)?i:0};function Qy(e){return-Math.cos(e*Math.PI)/2+.5}function $y(e,t,n,r){e=Math.min(Math.max(e,0),1),n=Math.min(Math.max(n,0),1);let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c,u=e=>((o*e+a)*e+i)*e,d=e=>((l*e+c)*e+s)*e,f=e=>{let t=0,n=1,r=e;if(r<t)return t;if(r>n)return n;for(;t<n;){let i=u(r);if(Math.abs(i-e)<1e-4)return r;e>i?t=r:n=r,r=(t+n)/2}return r};return e=>e<=0?0:e>=1?1:d(f(e))}var eb=new Map;eb.set(`linear`,e=>e),eb.set(`easeInOutSine`,Qy),eb.set(`easeInSine`,e=>1-Math.cos(e*Math.PI/2)),eb.set(`easeOutSine`,e=>Math.sin(e*Math.PI/2)),eb.set(`easeInQuad`,e=>e*e),eb.set(`easeOutQuad`,e=>1-(1-e)*(1-e)),eb.set(`easeInOutQuad`,e=>e<.5?2*e*e:1-(-2*e+2)**2/2),eb.set(`easeInCubic`,e=>e*e*e),eb.set(`easeOutCubic`,e=>1-(1-e)**3),eb.set(`easeInOutCubic`,e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2),eb.set(`easeOutBack`,e=>{let t=1.70158;return 1+(t+1)*(e-1)**3+t*(e-1)**2}),eb.set(`easeInOutBack`,e=>{let t=1.70158*1.525;return e<.5?(2*e)**2*((t+1)*2*e-t)/2:((2*e-2)**2*((t+1)*(e*2-2)+t)+2)/2});function tb(e){return Array.isArray(e)&&e.length===4&&e.every(e=>typeof e==`number`)}function nb(e){return typeof e==`function`?rb(e):tb(e)?$y(e[0],e[1],e[2],e[3]):typeof e==`string`&&eb.has(e)?rb(eb.get(e)):Qy}function rb(e){return t=>{let n=e(t);return typeof n==`number`&&isFinite(n)?n:t}}function ib(e,t){let n=new Set(e.exits),r=[],i=0;for(let t=0;t<e.toOld.length;t++){let a=e.toOld[t];if(a!==-1){for(;i<a;)n.has(i)&&r.push({oldJ:i,newJ:-1}),i++;r.push({oldJ:a,newJ:t}),i=a+1}else r.push({oldJ:-1,newJ:t})}for(;i<t;)n.has(i)&&r.push({oldJ:i,newJ:-1}),i++;return r}function ab(e,t,n){if(!e||typeof e!=`string`)return null;let r=Bg(e);if(!r.length||r[0][0]!==`M`)return null;for(let e=1;e<r.length;e++)if(r[e][0]===`M`)return null;let i=r,a=null;if(n){if(r.length<5||(a=r.slice(-3),i=r.slice(0,-3),a[2][0]!==`Z`)||a[1][0]!==`L`||a[0][0]!==`L`&&a[0][0]!==`C`)return null}else if(r[r.length-1][0]===`Z`)return null;if(i.length!==t||i.length<2)return null;let o=i[1][0];if(o!==`L`&&o!==`C`)return null;for(let e=2;e<i.length;e++)if(i[e][0]!==o)return null;let s=i.map(e=>e[0]===`C`?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(let e of s)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:i,closing:a,segType:o,anchors:s}}function ob(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function sb(e,t,n){let r=e,i=[t[1],t[2]],a=[t[3],t[4]],o=[t[5],t[6]],s=ob(r,i,n),c=ob(i,a,n),l=ob(a,o,n),u=ob(s,c,n),d=ob(c,l,n),f=ob(u,d,n);return{first:[`C`,s[0],s[1],u[0],u[1],f[0],f[1]],second:[`C`,d[0],d[1],l[0],l[1],o[0],o[1]],mid:f}}function cb(e,t,n){let r=[t[1],t[2]],i=ob(e,r,n);return{first:[`L`,i[0],i[1]],second:[`L`,r[0],r[1]],mid:i}}function lb(e,t){let{body:n,closing:r,segType:i,anchors:a}=e,o=a.length,s=t.length,c=e=>i===`C`?[`C`,e[0],e[1],e[0],e[1],e[0],e[1]]:[`L`,e[0],e[1]],l=[[`M`,a[0][0],a[0][1]]],u=0;for(;u<s&&t[u]!==0;)u++;for(let e=1;e<=u;e++)l.push(c(a[0]));let d=u+1;for(let e=0;e<o-1;e++){let r=0;for(;d+r<s&&t[d+r]===-1;)r++;let o=n[e+1];if(!r)l.push(o.slice());else{let t=r+1,n=a[e],s=o;for(let e=0;e<r;e++){let r=1/(t-e),a=i===`C`?sb(n,s,r):cb(n,s,r);l.push(a.first),n=a.mid,s=a.second}l.push(s)}d+=r+1}for(;d<s;)l.push(c(a[o-1])),d++;return r&&r.forEach(e=>l.push(e.slice())),l}function ub(e,t,n,r,i,a){let o=ab(e,r,a);if(!o)return null;let s=ab(t,i,a);if(!s||o.segType!==s.segType||(o.closing||s.closing)&&(!o.closing||!s.closing||o.closing[0][0]!==s.closing[0][0]))return null;let c=n.map(e=>e.oldJ),l=n.map(e=>e.newJ);return{from:Ug(lb(o,c)),toInterp:Ug(lb(s,l))}}function db(e){let t=e.config.chart.animations;if(!t||t.enabled===!1||!t.dynamicAnimation||t.dynamicAnimation.enabled===!1)return!1;let n=t.largeDatasetThreshold??0;return n>0&&e.globals.dataPoints>n?!1:!!(d_.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate)}function fb(e,t,n){if(e.axisFlags?.isXNumeric){let r=e.seriesData?.seriesX?.[t];if(r&&r.length&&r[n]!=null)return`x:`+r[n]}let r=e.globals.labels?.[n];return r!=null&&String(r)!==``?`c:`+(Array.isArray(r)?r.join(` `):String(r)):`j:`+n}function pb(e,t,n){if(e.isXNumeric){let r=e.seriesX?.[t];if(r&&r.length&&r[n]!=null)return`x:`+r[n]}let r=e.labels?.[n];return r!=null&&String(r)!==``?`c:`+(Array.isArray(r)?r.join(` `):String(r)):`j:`+n}function mb(e,t){let n=new Map;e.forEach((e,t)=>{n.has(e)||n.set(e,t)});let r=Array(t.length),i=new Set,a=-1,o=!0,s=e.length===t.length;t.forEach((e,t)=>{let c=n.has(e)&&!i.has(n.get(e))?n.get(e):-1;r[t]=c,c!==-1&&(i.add(c),c<a&&(o=!1),a=c),c!==t&&(s=!1)});let c=[];for(let t=0;t<e.length;t++)i.has(t)||c.push(t);return{toOld:r,exits:c,ordered:o,changed:!s}}function hb(e){let t=new Map;return e.map(e=>{let n=t.get(e)||0;return t.set(e,n+1),n===0?e:`${e}#${n}`})}function gb(e,t,n=!1,r=!1){if(!db(e))return null;let i=e.globals.prevStreamFrame;if(!i)return null;let a=i.seriesY?.[t],o=e.seriesData.series?.[t];if(!Array.isArray(a)||!Array.isArray(o)||!a.length||!o.length)return null;let s=hb(a.map((e,n)=>pb(i,t,n))),c=hb(o.map((n,r)=>fb(e,t,r))),l=mb(s,c);return!l.ordered&&!r||!l.changed&&!n?null:{join:l,oldKeys:s,newKeys:c}}function _b(e){let t=e.config.chart.animations;return nb(t.dynamicAnimation?.easing??t.easing)}function vb(e,t,n,r,i){let a=performance.now(),o=s=>{if(e.globals.isDestroyed)return;let c=Math.max(0,Math.min(1,(s-a)/t));r(n(c),c),c<1?Q.requestAnimationFrame(o):i&&i()};Q.requestAnimationFrame(o)}function yb(e,{elPointsMain:t,realIndex:n,speed:r}){if(!t?.node)return!1;let i=gb(e,n,!0);if(!i)return!1;let a=e.globals.prevStreamFrame;if(!a)return!1;let o=a.xPixels?.[n],s=a.yPixels?.[n];if(!o||!s)return!1;let c=t.node.querySelectorAll(`.apexcharts-marker`);if(!c.length)return!1;let l=e.globals.seriesXvalues?.[n]||[],u=e.globals.seriesYvalues?.[n]||[],d=_b(e),f=Math.max(1,r||1);return t.node.classList.remove(`apexcharts-element-hidden`),c.forEach(t=>{let r=parseInt(t.getAttribute(`j`)??t.getAttribute(`rel`)??``,10);if(!isFinite(r)||r<0||r>=i.join.toOld.length)return;let c=i.join.toOld[r],p=l[r]!=null&&u[r]!=null?[l[r],u[r]]:null;if(c===-1||!p){let n=t.style;n.opacity=`0`,vb(e,f,d,e=>{n.opacity=String(e)},()=>{n.opacity=``});return}let m=(o[c]??NaN)-p[0],h=(s[c]??NaN)-p[1];if(!isFinite(m)||!isFinite(h))return;let g=a.rPixels?.[n]?.[c]??NaN,_=parseFloat(t.getAttribute(`r`)??t.getAttribute(`default-marker-size`)??``),v=isFinite(g)&&isFinite(_)&&_>0&&Math.abs(g-_)>.25;if(!(Math.abs(m)>=.5||Math.abs(h)>=.5)&&!v)return;let y=e=>{let n=m*(1-e),r=h*(1-e);if(v){let i=(g+(_-g)*e)/_;t.setAttribute(`transform`,`translate(${n+p[0]*(1-i)}, ${r+p[1]*(1-i)}) scale(${i})`)}else t.setAttribute(`transform`,`translate(${n}, ${r})`)};y(0),vb(e,f,d,y,()=>{t.removeAttribute(`transform`)})}),!0}function bb(e,{type:t,realIndex:n,pathFromLine:r,pathFromArea:i,linePaths:a,areaPaths:o}){let s=gb(e,n);if(!s)return null;let{join:c,oldKeys:l,newKeys:u}=s,d=e.globals.prevStreamFrame;if(!d)return null;let f=d.seriesY?.[n],p=e.seriesData.series?.[n];if(f.length<2||p.length<2||f.some(e=>e===null)||p.some(e=>e===null))return null;let m=ib(c,l.length),h={};return Array.isArray(a)&&a.length===1&&r&&(h.line=ub(r,a[0],m,l.length,u.length,!1)),t===`area`&&Array.isArray(o)&&o.length===1&&i&&(h.area=ub(i,o[0],m,l.length,u.length,!0)),!h.line&&!h.area?null:h}function xb(e){let t=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(e||``);if(!t)return null;let n=parseFloat(t[1]),r=parseFloat(t[2]);return isFinite(n)&&isFinite(r)?{x:n,y:r}:null}function Sb({w:e,elSeries:t,record:n,newKeys:r,isHorizontal:i,speed:a}){if(!db(e)||!n||!Array.isArray(n.paths)||!t?.node)return;let o=new Set(r),s=n.paths.filter(e=>e&&e.d&&e.key!=null&&!o.has(e.key));if(!s.length)return;let c=new Z(e),l=e.globals.colors?.[parseInt(String(n.realIndex),10)];s.forEach(n=>{let r=n.fill||l||`#c8c8c8`;String(r).indexOf(`url(`)===0&&(r=l||`#c8c8c8`);let o=c.drawPath({d:n.d,stroke:`none`,strokeWidth:0,fill:r,fillOpacity:1,classes:`apexcharts-bar-ghost`}),s=o.node;s.setAttribute(`pointer-events`,`none`),o.attr(`clip-path`,`url(#gridRectBarMask${e.globals.cuid})`),t.node.insertBefore(s,t.node.firstChild);let u=xb(n.d),d=i?`left center`:`center bottom`;try{let e=s.getBBox();u&&e&&(d=i?Math.abs(u.x-e.x)<=Math.abs(u.x-(e.x+e.width))?`left center`:`right center`:Math.abs(u.y-(e.y+e.height))<=Math.abs(u.y-e.y)?`center bottom`:`center top`)}catch{}let f=s.style;f.transformBox=`fill-box`,f.transformOrigin=d;let p=Math.max(1,a||1),m=performance.now(),h=t=>{if(e.globals.isDestroyed||!s.parentNode)return;let n=Math.max(0,Math.min(1,(t-m)/p)),r=1-(1-n)**3,a=1-r;f.transform=i?`scaleX(${a})`:`scaleY(${a})`,f.opacity=String(1-r),n<1?Q.requestAnimationFrame(h):s.parentNode.removeChild(s)};Q.requestAnimationFrame(h)})}var Cb=class{constructor(e){this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||=this.w.config.dataLabels.formatter}handleBarDataLabels(e){let{x:t,y:n,y1:r,y2:i,i:a,j:o,realIndex:s,columnGroupIndex:c,barHeight:l,barWidth:u,barXPosition:d,barYPosition:f,visibleSeries:p}=e,m=this.w,h=new Z(this.barCtx.w),g=m.waterfallData&&m.waterfallData.values,_=g&&g[s]&&g[s][o]!=null?g[s][o]:null,v=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth,y,b;m.axisFlags.isXNumeric&&!m.globals.isBarHorizontal?(y=t+u*(p+1),b=n+l*(p+1)-v):(y=t+u*p,b=n+l*p);let x=null,S=null,C=t,w=n,T={},E=m.config.dataLabels,D=this.barCtx.barOptions.dataLabels,O=this.barCtx.barOptions.dataLabels.total;f!==void 0&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(b=f,w=f),d!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(y=d,C=d);let k=Zy(E.offsetX,m,s,o),A=Zy(E.offsetY,m,s,o),j={width:0,height:0};if(m.config.dataLabels.enabled){let e=_===null?m.seriesData.series[s][o]:_;j=h.getTextRects(m.config.dataLabels.formatter?m.config.dataLabels.formatter(e,X(Y({},m),{seriesIndex:s,dataPointIndex:o,w:m})):m.formatters.yLabelFormatters[0](e),parseFloat(E.style.fontSize).toString(),E.style.fontFamily,void 0,!0,E.style.fontWeight)}let ee={x:t,y:n,i:a,j:o,realIndex:s,columnGroupIndex:c,bcx:y,bcy:b,barHeight:l,barWidth:u,textRects:j,strokeWidth:v,dataLabelsX:C,dataLabelsY:w,dataLabelsConfig:E,barDataLabelsConfig:D,barTotalDataLabelsConfig:O,offX:k,offY:A};if(T=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(ee):this.calculateColumnsDataLabelsPosition(ee),_!==null&&this.barCtx.isHorizontal&&D.position===`center`){let e=m.waterfallData.geometry?.[s]?.[o];e&&e.horizontal&&(T.dataLabelsX=(e.levelStart+e.levelEnd)/2+k)}return x=this.drawCalculatedDataLabels({x:T.dataLabelsX,y:T.dataLabelsY,val:_===null?this.barCtx.isRangeBar?[r,i]:m.config.chart.stackType===`100%`?m.globals.seriesPercent[s][o]:m.seriesData.series[s][o]:_,i:s,j:o,barWidth:u,barHeight:l,textRects:j,dataLabelsConfig:E}),m.config.chart.stacked&&O.enabled&&(S=this.drawTotalDataLabels({x:T.totalDataLabelsX,y:T.totalDataLabelsY,barWidth:u,barHeight:l,realIndex:s,j:o,textAnchor:T.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:s,j:o}),rawVal:this.getStackedTotalValue({realIndex:s,j:o}),dataLabelsConfig:E,barTotalDataLabelsConfig:O})),{dataLabelsPos:T,dataLabels:x,totalDataLabels:S}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(e){if(!this.hasMultipleSeriesGroups())return null;let t=this.barCtx.barHelpers.getSeriesGroupIndex(e);return t<0?null:{groupIndex:t,group:this.w.labelData.seriesGroups[t]}}drawsStackedTotal(e){let t=this.barCtx.lastActiveBarSerieIndexByGroup,n=this.getTotalGroupContext(e);return n&&t&&t.length>n.groupIndex?t[n.groupIndex]===e:this.barCtx.lastActiveBarSerieIndex===e}getStackedTotalValue({realIndex:e,j:t}){let n=this.w,r=this.getTotalGroupContext(e),i=n.seriesData.stackedSeriesTotalsByGroups;return r&&i&&i[r.groupIndex]?i[r.groupIndex][t]:this.barCtx.stackedSeriesTotals[t]}getStackedTotalDataLabel({realIndex:e,j:t}){let n=this.w,r=this.getStackedTotalValue({realIndex:e,j:t});return this.totalFormatter&&(r=this.totalFormatter(r,X(Y({},n),{seriesIndex:e,dataPointIndex:t,w:n}))),r}calculateColumnsDataLabelsPosition(e){let t=this.w,{i:n,j:r,realIndex:i,y:a,bcx:o,barWidth:s,barHeight:c,textRects:l,dataLabelsX:u,dataLabelsY:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,strokeWidth:h,offX:g,offY:_}=e,v,y,b=o;c=Math.abs(c);let x=t.config.plotOptions.bar.dataLabels.orientation===`vertical`,{zeroEncounters:S}=this.barCtx.barHelpers.getZeroValueEncounters({i:n,j:r});o-=h/2;let C=t.layout.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?u+=s/2:(u=t.axisFlags.isXNumeric?o-s/2+g:o-C+s/2+g,!t.config.chart.stacked&&S>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=s*S)),x&&(u=u+l.height/2-h/2-2);let w=t.seriesData.series[n][r]<0,T=a;switch(this.barCtx.isReversed&&(T=a+(w?c:-c)),p.position){case`center`:d=x?w?T-c/2+_:T+c/2-_:w?T-c/2+l.height/2+_:T+c/2+l.height/2-_;break;case`bottom`:d=x?w?T-c+_:T+c-_:w?T-c+l.height+h+_:T+c-l.height/2+h-_;break;case`top`:d=x?w?T+_:T-_:w?T-l.height/2-_:T+l.height+_;break}let E=T,D=this.getTotalGroupContext(i);if((D?[D.group]:t.labelData.seriesGroups).forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevY.forEach(e=>{E=w?Math.max(e[r],E):Math.min(e[r],E)})}),this.drawsStackedTotal(i)&&m.enabled){let e=new Z(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:i,j:r}),f.fontSize);v=w?E-e.height/2-_-m.offsetY+18:E+e.height+_+m.offsetY-18;let n=C;y=b+(t.axisFlags.isXNumeric?-s/2:s/2-n)+m.offsetX}return t.config.chart.stacked||(d<0?d=0+h:d+l.height/3>t.layout.gridHeight&&(d=t.layout.gridHeight-h)),{bcx:o,bcy:a,dataLabelsX:u,dataLabelsY:d,totalDataLabelsX:y,totalDataLabelsY:v,totalDataLabelsAnchor:`middle`}}calculateBarsDataLabelsPosition(e){let t=this.w,{x:n,i:r,j:i,realIndex:a,bcy:o,barHeight:s,barWidth:c,textRects:l,dataLabelsX:u,strokeWidth:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,offX:h,offY:g}=e,_=t.layout.gridHeight/t.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});c=Math.abs(c);let y;if(this.barCtx.isPyramid){let e=l.centerOffset??0;y=o+s/2+g-e}else y=o-(this.barCtx.isRangeBar?0:_)+s/2+l.height/2+g-3;!t.config.chart.stacked&&v>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=s*v);let b,x,S=`start`,C=t.seriesData.series[r][i]<0,w=n;if(this.barCtx.isReversed&&(w=n+(C?-c:c),S=C?`start`:`end`),this.barCtx.isPyramid)u=t.layout.gridWidth/2+h;else switch(p.position){case`center`:u=C?w+c/2-h:Math.max(l.width/2,w-c/2)+h;break;case`bottom`:u=C?w+c-d-h:w-c+d+h;break;case`top`:u=C?w-d-h:w-d+h;break}let T=w,E=this.getTotalGroupContext(a);if((E?[E.group]:t.labelData.seriesGroups).forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevX.forEach(e=>{T=C?Math.min(e[i],T):Math.max(e[i],T)})}),this.drawsStackedTotal(a)&&m.enabled){let e=new Z(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),f.fontSize);C?(b=T-d-h-m.offsetX,S=`end`):b=T+h+m.offsetX+(this.barCtx.isReversed?-(c+d):d),x=y-l.height/2+e.height/2+m.offsetY+d,t.globals.barGroups.length>1&&!E&&(x-=t.globals.barGroups.length/2*(s/2))}if(!t.config.chart.stacked){let e=C&&f.textAnchor!==`middle`?f.textAnchor===`start`?`end`:`start`:f.textAnchor,n;n=p.orientation===`vertical`?l.height/2:e===`end`?l.width:e===`middle`?l.width/2:0;let r=(p.orientation===`vertical`?l.height:l.width)-n;u+r>t.layout.gridWidth-d&&(u=t.layout.gridWidth-r-d),u-n<d&&(u=n+d)}return{bcx:n,bcy:o,dataLabelsX:u,dataLabelsY:y,totalDataLabelsX:b,totalDataLabelsY:x,totalDataLabelsAnchor:S}}drawCalculatedDataLabels({x:e,y:t,val:n,i:r,j:i,textRects:a,barHeight:o,barWidth:s,dataLabelsConfig:c}){let l=this.w,u=`rotate(0)`;l.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(u=`rotate(-90, ${e}, ${t})`);let d=new $h(this.barCtx.w,this.barCtx.ctx),f=new Z(this.barCtx.w),p=c.formatter,m=null,h=l.globals.collapsedSeriesIndices.indexOf(r)>-1,g=(l.globals.collapsingSeriesIndices||[]).indexOf(r)>-1;if(g){let e=l.globals.prevDataLabels?.get(`${r}::${fb(l,r,i)}`);e&&isFinite(e.val)&&(n=e.val)}if(c.enabled&&(!h||g)){m=f.group({class:`apexcharts-data-labels`,transform:u});let h=l.config.dataLabels;(h.animate?.enabled||h.countUp?.enabled)&&(m.node.setAttribute(`data:dlKey`,`${r}::${fb(l,r,i)}`),m.node.setAttribute(`data:dlJ`,String(i)),typeof n==`number`&&isFinite(n)&&m.node.setAttribute(`data:dlVal`,String(n)));let _=``;n!==void 0&&(_=p(n,X(Y({},l),{seriesIndex:r,dataPointIndex:i,w:l}))),!n&&l.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(_=``);let v=l.seriesData.series[r][i]<0,y=l.config.plotOptions.bar.dataLabels.position;l.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(y===`top`&&(v?c.textAnchor=`end`:c.textAnchor=`start`),y===`center`&&(c.textAnchor=`middle`),y===`bottom`&&(v?c.textAnchor=`end`:c.textAnchor=`start`)),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&s<f.getTextRects(_,parseFloat(c.style.fontSize).toString()).width&&(_=``),l.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!g&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(s)&&(_=``):a.height/1.6>Math.abs(o)&&(_=``));let b=Y({},c);this.barCtx.isHorizontal&&n<0&&(c.textAnchor===`start`?b.textAnchor=`end`:c.textAnchor===`end`&&(b.textAnchor=`start`)),d.plotDataLabelsText({x:e,y:t,text:_,i:r,j:i,parent:m,dataLabelsConfig:b,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}drawTotalDataLabels({x:e,y:t,val:n,rawVal:r,realIndex:i,j:a,textAnchor:o,barTotalDataLabelsConfig:s}){let c=new Z(this.barCtx.w),l;if(s.enabled&&e!==void 0&&t!==void 0&&this.drawsStackedTotal(i)){l=c.drawText({x:e,y:t,foreColor:s.style.color,text:n,textAnchor:o,fontFamily:s.style.fontFamily,fontSize:s.style.fontSize,fontWeight:s.style.fontWeight}),l.attr({class:`apexcharts-datalabel-total`,cx:e,cy:t});let u=this.w.config.dataLabels;if(u.animate?.enabled||u.countUp?.enabled){let{groupIndex:e}=this.barCtx.barHelpers.getGroupIndex(i);l.node.setAttribute(`data:dlTotalKey`,`${e}::${fb(this.w,i,a)}`),l.node.setAttribute(`data:dlTotalSeries`,String(i)),typeof r==`number`&&isFinite(r)&&l.node.setAttribute(`data:dlTotalVal`,String(r))}}return l}};function wb(e){return e?.config?.chart?.requestedType!==`histogram`||e.config.plotOptions?.histogram?.overlap===!1?!1:(e.seriesData?.series?.length??0)>1}var Tb=class{constructor(e){this.w=e.w,this.barCtx=e}initVariables(e){let t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let n=0;n<e.length;n++)if(e[n].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[n].length),t.axisFlags.isXNumeric)for(let r=0;r<e[n].length;r++)t.seriesData.seriesX[n][r]>t.globals.minX&&t.seriesData.seriesX[n][r]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(t.seriesData.series),$.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(e=>e.map(e=>`none`))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1)}barSlotXSpan(){let e=this.w;if(this._slotXSpan!==void 0)return this._slotXSpan;let t=0;if(e.globals.dataPoints<=1){let n=e.globals.maxX-e.globals.minX;t=n>0?n/4:0}else if(t=this._unionMinXGap(),!(t>0)||!isFinite(t)){let n=e.globals.minXDiff;t=n>0&&isFinite(n)&&n!==.5?n:0}return this._slotXSpan=t,t}_unionMinXGap(){let e=this.w.seriesData.seriesX||[],t=[];for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)&&r.length>0&&t.push(r)}if(!t.length)return 0;let n=Array(t.length).fill(0),r=NaN,i=1/0;for(;;){let e=1/0,a=-1;for(let r=0;r<t.length;r++){let i=t[r];for(;n[r]<i.length&&typeof i[n[r]]!=`number`;)n[r]++;if(n[r]>=i.length)continue;let o=i[n[r]];if(o!==o){n[r]++,r--;continue}o<e&&(e=o,a=r)}if(a===-1)break;if(n[a]++,r===r){let t=e-r;t>0&&t<i&&(i=t)}r=e}return isFinite(i)?i:0}initialPositions(e){let t=this.w,n,r,i,a,o,s,c,l,u=t.globals.dataPoints;this.barCtx.isRangeBar&&(u=t.labelData.labels.length);let d=this.barCtx.seriesLen;if((t.config.plotOptions.bar.rangeBarGroupRows||wb(t))&&(d=1),this.barCtx.isHorizontal)i=t.layout.gridHeight/u,o=i/d,t.axisFlags.isXNumeric&&(i=t.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf(`%`)===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+t.globals.padHorizontal+(this.barCtx.isReversed?t.layout.gridWidth:0)-(this.barCtx.isReversed?this.barCtx.baseLineInvertedY*2:0),this.barCtx.isFunnel&&(l=t.layout.gridWidth/2),r=(i-o*this.barCtx.seriesLen)/2;else{if(a=t.layout.gridWidth/this.barCtx.visibleItems,t.config.xaxis.convertedCatToNumeric&&(a=t.layout.gridWidth/t.globals.dataPoints),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,t.axisFlags.isXNumeric){let e=this.barCtx.xRatio,t=this.barSlotXSpan();t>0&&t/e>0&&(a=t/e),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,s<1&&(s=1)}String(this.barCtx.barOptions.columnWidth).indexOf(`%`)===-1&&(s=parseInt(this.barCtx.barOptions.columnWidth,10)),c=t.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?t.layout.gridHeight:0)+(this.barCtx.isReversed?this.barCtx.baseLineY[this.barCtx.translationsIndex]*2:0),n=t.axisFlags.isXNumeric?this.barCtx.getBarXForNumericXAxis({x:n,j:0,realIndex:e,barWidth:s}).x:t.globals.padHorizontal+$.noExponents(a-s*this.barCtx.seriesLen)/2}return t.globals.barHeight=o,t.globals.barWidth=s,{x:n,y:r,yDivision:i,xDivision:a,barHeight:o,barWidth:s,zeroH:c,zeroW:l}}initializeStackedPrevVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].prevY=[],e[t].prevX=[],e[t].prevYF=[],e[t].prevXF=[],e[t].prevYVal=[],e[t].prevXVal=[]})}initializeStackedXYVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].xArrj=[],e[t].xArrjF=[],e[t].xArrjVal=[],e[t].yArrj=[],e[t].yArrjF=[],e[t].yArrjVal=[]})}getPathFillColor(e,t,n,r){let i=this.w,a=new tg(this.barCtx.w),o=null,s=this.barCtx.barOptions.distributed?n:t,c=!1;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(r=>{e[t][n]>=r.from&&e[t][n]<=r.to&&(o=r.color,c=!0)});let l=this.getDumbbellConnectorFill(t,n)||i.config.series[t].data[n]?.fill,u=this.barCtx.barOptions.isDumbbell?i.config.plotOptions.bar.dumbbell.connector:null,d;return u&&u.color&&(o=u.color,d=u.opacity),{color:a.fillPath({seriesNumber:this.barCtx.barOptions.distributed?s:r,dataPointIndex:n,color:o,opacity:d,value:e[t][n],fillConfig:l,fillType:l?.type?l.type:Array.isArray(i.config.fill.type)?i.config.fill.type[r]:i.config.fill.type}),useRangeColor:c}}getDumbbellConnectorFill(e,t){let n=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;let r=n.dumbbellData;if(!r||r.form!==`series`)return null;let i=n.config.plotOptions.bar.dumbbell.connector;if(i.color)return null;let a=r.order[t];if(!a)return null;let o=n.globals.colors[a[0]],s=n.globals.colors[a[1]];return!o||!s?null:{type:`gradient`,gradient:{type:this.barCtx.isHorizontal?`horizontal`:`vertical`,gradientFrom:o,gradientTo:s,opacityFrom:i.opacity,opacityTo:i.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}}getStrokeWidth(e,t,n){let r=0,i=this.w;return this.barCtx.series[e][t]===void 0||this.barCtx.series[e][t]===null||i.config.chart.type===`bar`&&!this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(r=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth)),r}getStackedSeriesIndices(e){let t=this.w,n=t.labelData.seriesGroups,r=t.globals.columnSeries?new Set(t.globals.columnSeries.i):null,i=e=>!r||r.has(e);if(!n||n.length<2){let t=Array.from({length:e},(e,t)=>t).filter(i);return t.length?[t]:[]}let a=Array.from({length:n.length},()=>[]),o=[];for(let t=0;t<e;t++){if(!i(t))continue;let e=this.getSeriesGroupIndex(t);e>-1?a[e].push(t):o.push(t)}return o.length&&a.push(o),a.filter(e=>e.length>0)}createBorderRadiusArr(e){let t=this.w,n=!this.w.config.chart.stacked||t.config.plotOptions.bar.borderRadius<=0,r=e.length,i=e[0]?.length|0,a=Array.from({length:r},()=>Array(i).fill(n?`top`:`none`));if(n)return a;let o=this.w.config.chart.type===`bar`&&i===1,s=o?`top`:`both`,c=o?`top`:`bottom`;for(let t of this.getStackedSeriesIndices(r))for(let n=0;n<i;n++){let r=[],i=[];for(let a of t){let t=e[a][n];t>0?r.push(a):t<0&&i.push(a)}if(r.length>0&&i.length===0)if(r.length===1)a[r[0]][n]=s;else{let e=r[0],t=r[r.length-1];for(let i of r)a[i][n]=i===e?c:i===t?`top`:`none`}else if(i.length>0&&r.length===0)if(i.length===1)a[i[0]][n]=`both`;else{let e=Math.max(...i),t=Math.min(...i);for(let r of i)a[r][n]=r===e?`bottom`:r===t?`top`:`none`}else if(r.length>0&&i.length>0){let e=r[r.length-1];for(let t of r)a[t][n]=t===e?`top`:`none`;let t=Math.max(...i);for(let e of i)a[e][n]=e===t?`bottom`:`none`}}return a}barBackground({j:e,i:t,x1:n,x2:r,y1:i,y2:a,elSeries:o}){let s=this.w,c=new Z(this.barCtx.w),l=new cg(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&l===t){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);let t=this.barCtx.barOptions.colors.backgroundBarColors[e],l=c.drawRect(n===void 0?0:n,i===void 0?0:i,r===void 0?s.layout.gridWidth:r,a===void 0?s.layout.gridHeight:a,this.barCtx.barOptions.colors.backgroundBarRadius,t,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(l),l.node.classList.add(`apexcharts-backgroundBar`)}}getColumnPaths({barWidth:e,barXPosition:t,y1:n,y2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){let f=new Z(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let p=e,m=t;d.config.series[c].data[u]?.columnWidthOffset&&(m=t-d.config.series[c].data[u].columnWidthOffset/2,p=e+d.config.series[c].data[u].columnWidthOffset);let h=i/2,g=m+h,_=m+p-h,v=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001-h*v,r+=.001+h*v;let y=f.line(_,n),b=d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`,x=f.move(g,n)+f.line(g,r)+f.line(_,r)+y+b,S=x;this.arrBorderRadius[c][u]!==`none`&&(S=f.roundPathCorners(S,d.config.plotOptions.bar.borderRadius));let C=null,w=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(c,u);if(w?C=w:d.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(c,u,S,x)),C??=f.move(g,n)+f.line(g,n)+y+y+y+y+y+f.line(g,n)+b,d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.yArrj.push(r-h*v),e.yArrjF.push(Math.abs(n-r+i*v)),e.yArrjVal.push(this.barCtx.series[l][u])}return{pathTo:S,pathFrom:C,drawnBox:{x1:g,x2:_,y1:n,y2:r}}}getFunnelTrapezoidPaths({barYPosition:e,barHeight:t,series:n,i:r,j:i,realIndex:a,strokeWidth:o,w:s}){let c=new Z(this.barCtx.w),l=s.layout.gridWidth/2,u=e=>Math.abs(e/this.barCtx.invertedYRatio)/2,d=u(n[r][i]),f=i===n[r].length-1,p=s.config.plotOptions.funnel.lastShape===`taper`?`taper`:`flat`,m;m=f?p===`taper`?0:d:u(n[r][i+1]);let h=o/2,g=e+h,_=e+t-h,v=l-d,y=l+d,b=l-m,x=l+m,S=c.move(v,g)+c.line(y,g)+c.line(x,_)+c.line(b,_)+` Z`,C=null,w=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(a,i);return w?C=w:s.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(a,i,S)),C??=c.move(l,g)+c.line(l,g)+c.line(l,_)+c.line(l,_)+` Z`,{pathTo:S,pathFrom:C,x:y,x1:v,barXPosition:l}}computePyramidLayout(e){let t=this.w,n=t.layout.gridHeight,r=t.layout.gridWidth,i=e.map(e=>Math.abs(Number(e)||0)),a=i.reduce((e,t)=>e+t,0);if(a===0||n<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));let o=r/2,s=0,c=[];for(let e=0;e<i.length;e++){let t=s/a;s+=i[e];let r=s/a,l=t*n,u=r*n;c.push({y:l,height:u-l,topHalf:t*o,bottomHalf:r*o})}return c}getPyramidPaths({barYPosition:e,barHeight:t,topHalf:n,bottomHalf:r,realIndex:i,j:a,strokeWidth:o,w:s}){let c=new Z(this.barCtx.w),l=s.layout.gridWidth/2,u=o/2,d=e+u,f=e+t-u,p=l-n,m=l+n,h=l-r,g=l+r,_=c.move(p,d)+c.line(m,d)+c.line(g,f)+c.line(h,f)+` Z`,v=null,y=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(i,a);return y?v=y:s.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(i,a,_)),v??=c.move(l,d)+c.line(l,d)+c.line(l,f)+c.line(l,f)+` Z`,{pathTo:_,pathFrom:v,x:m,x1:p,barXPosition:l}}getBarpaths({barYPosition:e,barHeight:t,x1:n,x2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){let f=new Z(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let p=e,m=t;d.config.series[c].data[u]?.barHeightOffset&&(p=e-d.config.series[c].data[u].barHeightOffset/2,m=t+d.config.series[c].data[u].barHeightOffset);let h=i/2,g=p+h,_=p+m-h,v=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001+h*v,r+=.001-h*v;let y=this.barCtx.isFunnel,b=y?(n+r)/2:n,x=f.line(n,_),S=d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`,C=f.move(n,g)+f.line(r,g)+f.line(r,_)+x+S,w=C;this.arrBorderRadius[c][u]!==`none`&&(w=f.roundPathCorners(w,d.config.plotOptions.bar.borderRadius));let T=null,E=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(c,u);if(E?T=E:d.globals.previousPaths.length>0&&(T=this.barCtx.getPreviousPath(c,u,w,C)),T==null){let e=y?f.line(b,_):x;T=f.move(b,g)+f.line(b,g)+e+e+e+e+e+f.line(b,g)+S}if(d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.xArrj.push(r+h*v),e.xArrjF.push(Math.abs(n-r-i*v)),e.xArrjVal.push(this.barCtx.series[l][u])}return{pathTo:w,pathFrom:T,drawnBox:{x1:n,x2:r,y1:g,y2:_}}}getXForValue(e,t,n=!0){let r=n?t:null;return e!=null&&(r=t+e/this.barCtx.invertedYRatio-(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)*2),r}getYForValue(e,t,n,r=!0){let i=r?t:null;return e!=null&&(i=t-e/this.barCtx.yRatio[n]+(this.barCtx.isReversed?e/this.barCtx.yRatio[n]:0)*2),i}getGoalValues(e,t,n,r,i,a){let o=this.w,s=[],c=(r,i)=>{s.push({[e]:e===`x`?this.getXForValue(r,t,!1):this.getYForValue(r,n,a,!1),attrs:i})};if(o.seriesData.seriesGoals[r]&&o.seriesData.seriesGoals[r][i]&&Array.isArray(o.seriesData.seriesGoals[r][i])&&o.seriesData.seriesGoals[r][i].forEach(e=>{c(e.value,e)}),this.barCtx.barOptions.isDumbbell){let t=this.getDumbbellEnds(r,i);if(t.length){let n={strokeHeight:e===`x`?0:o.globals.markers.size[r],strokeWidth:e===`x`?o.globals.markers.size[r]:0,strokeDashArray:0,strokeLineCap:`round`},a=0,s=0;for(let e=1;e<t.length;e++)t[e].value<t[a].value&&(a=e),t[e].value>t[s].value&&(s=e);let l=o.config.plotOptions.bar.dumbbell.dataLabels;t.forEach((e,t)=>{let o=X(Y({},n),{strokeColor:e.color});l.enabled&&(t===a||t===s)&&(o.label={text:this.getDumbbellLabelText(e.value,r,i,e.index),color:l.colorFromMarker?e.color:Array.isArray(l.style.colors)?l.style.colors[e.index]||l.style.colors[0]:l.style.colors,outward:t===a&&a!==s?-1:1}),c(e.value,o)})}}return s}getDumbbellEnds(e,t){let n=this.w,r=[],i=n.dumbbellData;if(i&&i.form===`series`){let e=i.values[t]||[];for(let t=0;t<e.length;t++){let a=e[t];a===null||i.hidden.indexOf(t)!==-1||r.push({value:a,color:n.globals.colors[t],index:t})}return r}if(!n.rangeData.seriesRange.length)return r;let a=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:n.globals.colors,o=t=>Array.isArray(a[e])?a[e][t]:a[e];return[{value:n.rangeData.seriesRangeStart[e][t],color:o(0),index:0},{value:n.rangeData.seriesRangeEnd[e][t],color:o(1),index:1}]}getDumbbellLabelText(e,t,n,r){let i=this.w,a=i.config.plotOptions.bar.dumbbell.dataLabels;if(typeof a.formatter==`function`)return a.formatter(e,{seriesIndex:t,dataPointIndex:n,endpointIndex:r,w:i});let o=this.barCtx.isHorizontal?i.formatters.xLabelFormatter:i.formatters.yLabelFormatters[0];return typeof o==`function`?o(e,n,i):String(e)}drawGoalLine({barXPosition:e,barYPosition:t,goalX:n,goalY:r,barWidth:i,barHeight:a}){if(!(Array.isArray(n)&&n.length>0||Array.isArray(r)&&r.length>0))return null;let o=new Z(this.barCtx.w),s=o.group({class:`apexcharts-bar-goals-groups`});s.node.classList.add(`apexcharts-element-hidden`),this.barCtx.w.globals.delayedElements.push({el:s.node}),s.attr(`clip-path`,`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let c=null;return this.barCtx.isHorizontal?Array.isArray(n)&&n.forEach(e=>{if(e.x>=-1&&e.x<=o.w.layout.gridWidth+1){let n=e.attrs.strokeHeight===void 0?a/2:e.attrs.strokeHeight,r=t+n+a/2;c=o.drawLine(e.x,r-n*2,e.x,r,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeWidth?e.attrs.strokeWidth:2,e.attrs.strokeLineCap),s.add(c),e.attrs.label&&s.add(this.drawDumbbellLabel(e.attrs,{x:e.x,y:r-n,horizontal:!0,markerSize:e.attrs.strokeWidth||0}))}}):Array.isArray(r)&&r.forEach(t=>{if(t.y>=-1&&t.y<=o.w.layout.gridHeight+1){let n=t.attrs.strokeWidth===void 0?i/2:t.attrs.strokeWidth,r=e+n+i/2;c=o.drawLine(r-n*2,t.y,r,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),s.add(c),t.attrs.label&&s.add(this.drawDumbbellLabel(t.attrs,{x:r-n,y:t.y,horizontal:!1,markerSize:t.attrs.strokeHeight||0}))}}),s}drawDumbbellLabel(e,t){let n=this.w,r=new Z(n),i=n.config.plotOptions.bar.dumbbell.dataLabels,a=t.markerSize/2+i.offset,o=e.label.outward;return r.drawText({x:t.x+(t.horizontal?a*o:0),y:t.y-(t.horizontal?0:a*o),text:e.label.text,textAnchor:t.horizontal?o<0?`end`:`start`:`middle`,dominantBaseline:t.horizontal?`central`:o<0?`hanging`:`auto`,foreColor:e.label.color,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,cssClass:`apexcharts-dumbbell-label`})}drawBarShadow({prevPaths:e,currPaths:t,color:n,realIndex:r,j:i}){let a=this.w,{x:o,x1:s,barYPosition:c}=e,{x:l,x1:u,barYPosition:d}=t,f=c+t.barHeight,p=new Z(this.barCtx.w),m=new $,h=p.move(s,f)+p.line(o,f)+p.line(l,d)+p.line(u,d)+p.line(s,f)+(a.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[r][i]===`both`?` Z`:` z`);return p.drawPath({d:h,fill:m.shadeColor(.5,$.rgb2hex(n)),stroke:`none`,strokeWidth:0,fillOpacity:1,classes:`apexcharts-bar-shadow apexcharts-decoration-element`})}getZeroValueEncounters({i:e,j:t}){let n=this.w,r=0,i=0;return(n.config.plotOptions.bar.horizontal?n.seriesData.series.map((e,t)=>t):n.globals.columnSeries?.i.map(e=>e)||[]).forEach(a=>{let o=n.globals.seriesPercent[a][t];o&&r++,a<e&&o===0&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getSeriesGroupIndex(e){let t=this.w;return t.labelData.seriesGroups.findIndex(n=>n.indexOf(t.seriesData.seriesNames[e])>-1)}getGroupIndex(e){let t=this.w,n=t.labelData.seriesGroups.findIndex(n=>n.indexOf(t.seriesData.seriesNames[e])>-1),r=this.barCtx.columnGroupIndices,i=r.indexOf(n);return i<0&&(r.push(n),i=r.length-1),{groupIndex:n,columnGroupIndex:i}}},Eb=class e{constructor(e,t,n){this.ctx=t,this.w=e,this.barOptions=e.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=e.config.stroke.width,this.isNullValue=!1,this.isRangeBar=e.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.rangeData.seriesRange.length&&e.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=n,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,this.xyRatios!==null&&(this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;let r=new cg(this.w);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex(`desc`,[`bar`,`column`]),this.lastActiveBarSerieIndexByGroup=r.getActiveConfigSeriesIndexByGroup([`bar`,`column`]),this.columnGroupIndices=[];let i=r.getBarSeriesIndices();this.stackedSeriesTotals=new Xh(this.w).getStackedSeriesTotals(this.w.config.series.map((e,t)=>i.indexOf(t)===-1?t:-1).filter(e=>e!==-1)),this.barHelpers=new Tb(this)}draw(e,t){let n=this.w,r=new Z(this.w),i=new Xh(this.w);e=i.getLogSeries(e),this.series=e,this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let a=r.group({class:`apexcharts-bar-series apexcharts-plot-series`});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn(`WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts`);for(let i=0,o=0;i<e.length;i++,o++){let s,c,l=[],u=[],d=n.globals.comboCharts?t[i]:i,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=r.group({class:`apexcharts-series`,rel:i+1,seriesName:$.escapeString(n.seriesData.seriesNames[d]),"data:realIndex":d});cg.addCollapsedClassToSeries(this.w,p,d),e[i].length>0&&(this.visibleI+=1),this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[d],this.translationsIndex=d);let m=this.translationsIndex;this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(e[i]));let h=this.barHelpers.initialPositions(d),{y:g,yDivision:_,zeroW:v,x:y,xDivision:b,zeroH:x}=h,S=h.barHeight,C=h.barWidth;c=g,s=y,this.isHorizontal||u.push(s+(C??0)/2);let w=r.group({class:`apexcharts-datalabels`,"data:realIndex":d});n.globals.delayedElements.push({el:w.node,holdUntilComplete:!n.config.dataLabels.animate?.enabled&&this.isLengthTransition(d)}),w.node.classList.add(`apexcharts-element-hidden`);let T=r.group({class:`apexcharts-bar-goals-markers`}),E=r.group({class:`apexcharts-bar-shadows`});n.globals.delayedElements.push({el:E.node}),E.node.classList.add(`apexcharts-element-hidden`);for(let t=0;t<e[i].length;t++){let r=this.barHelpers.getStrokeWidth(i,t,d),a=null,h={indexes:{i,j:t,realIndex:d,translationsIndex:m,bc:o},x:s,y:c,strokeWidth:r,elSeries:p};this.isHorizontal?(a=this.drawBarPaths(X(Y({},h),{barHeight:S,zeroW:v,yDivision:_})),C=this.series[i][t]/this.invertedYRatio):(a=this.drawColumnPaths(X(Y({},h),{xDivision:b,barWidth:C,zeroH:x})),S=this.series[i][t]/this.yRatio[m]);let g=this.barHelpers.getPathFillColor(e,i,t,d);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&n.config.plotOptions.funnel?.shape!==`trapezoid`&&this.pathArr.length&&t>0){let e=this.barHelpers.drawBarShadow({color:typeof g.color==`string`&&g.color?.indexOf(`url`)===-1?g.color:$.hexToRgba(n.globals.colors[i]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:a,realIndex:d,j:t});E.add(e),n.config.chart.dropShadow.enabled&&new ng(this.w).dropShadow(e,n.config.chart.dropShadow,d)}this.pathArr.push(a);let y=this.barHelpers.drawGoalLine({barXPosition:a.barXPosition,barYPosition:a.barYPosition,goalX:a.goalX,goalY:a.goalY,barHeight:S,barWidth:C});y&&T.add(y),c=a.y,s=a.x,t>0&&u.push(s+(C??0)/2),l.push(c),this.renderSeries(X(Y({realIndex:d,pathFill:g.color},g.useRangeColor?{lineFill:g.color}:{}),{j:t,i,columnGroupIndex:f,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:r,elSeries:p,x:s,y:c,series:e,barHeight:Math.abs(a.barHeight?a.barHeight:S),barWidth:Math.abs(a.barWidth?a.barWidth:C),elDataLabelsWrap:w,elGoalsMarkers:T,elBarShadows:E,visibleSeries:this.visibleI,type:`bar`}))}if(n.globals.seriesXvalues[d]=u,n.globals.seriesYvalues[d]=l,n.globals.previousPaths.length>0){let t=[];for(let r=0;r<e[i].length;r++)t.push(fb(n,d,r));Sb({w:n,elSeries:p,record:this._prevRecord(d),newKeys:t,isHorizontal:this.isHorizontal,speed:n.config.chart.animations.dynamicAnimation.speed})}a.add(p)}return a}renderSeries({realIndex:e,pathFill:t,lineFill:n,j:r,i,columnGroupIndex:a,pathFrom:o,pathTo:s,strokeWidth:c,elSeries:l,x:u,y:d,y1:f,y2:p,series:m,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,elDataLabelsWrap:y,elGoalsMarkers:b,elBarShadows:x,visibleSeries:S,type:C,classes:w}){var T,E;let D=this.w,O=new Z(this.w,this.ctx),k=Jv(this.ctx,O),A=!1,j=this._pathToInterp;if(this._pathToInterp=null,l._bindingsDelegated||(l._bindingsDelegated=!0,O.setupEventDelegation(l,`.apexcharts-${C}-area`)),!n){let t=typeof D.globals.stroke.colors[e]==`function`?function(e){let t=D.config.stroke.colors,n;return Array.isArray(t)&&t.length>0&&(n=t[e],n||=``,typeof n==`function`)?n({value:D.seriesData.series[e][r],dataPointIndex:r,w:D}):n}(e):D.globals.stroke.colors[e];n=this.barOptions.distributed?D.globals.stroke.colors[r]:t}let ee=D.config.chart.animations,te=ee.animateGradually,M=te&&te.enabled!==!1&&!(D.globals.dataChanged&&this.isLayoutShift(e)),N=0,ne=0;if(M){let e=D.globals.dataPoints||1,t=te.delay||0,n=Math.min(t,ee.speed*.5/Math.max(1,e));ne=Vh({style:`sequential`,index:r,baseDelay:n}),D.config.chart.stacked&&!D.globals.dataChanged&&(ne+=i*n*.5),N=ne/(t||1)}let re=new Cb(this).handleBarDataLabels({x:u,y:d,y1:f,y2:p,i,j:r,series:m,realIndex:e,columnGroupIndex:a,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,visibleSeries:S});if(ne>0){let e=D.config.dataLabels;if(e.animate?.enabled||e.countUp?.enabled){let e=String(Math.round(ne));(T=re.dataLabels?.node)==null||T.setAttribute(`data:dlDelay`,e),(E=re.totalDataLabels?.node)==null||E.setAttribute(`data:dlDelay`,e)}}if(D.globals.isBarHorizontal||(re.dataLabelsPos.dataLabelsX+Math.max(g,D.globals.barPadForNumericAxis)<0||re.dataLabelsPos.dataLabelsX-Math.max(g,D.globals.barPadForNumericAxis)>D.layout.gridWidth)&&(A=!0),D.config.series[i].data[r]&&D.config.series[i].data[r].strokeColor&&(n=D.config.series[i].data[r].strokeColor),this.isNullValue&&D.globals.collapsingSeriesIndices.indexOf(e)===-1&&(t=`none`),!A){let a=this.ctx.morphTypeChange?.isActive()===!0,u=a?this.ctx.morphTypeChange.getSpeed():D.config.chart.animations.dynamicAnimation.speed,d=a&&this.ctx.morphTypeChange.claimsTargetMark(e,r);d&&(o=s,N=0);let m=k.renderPaths({i,j:r,realIndex:e,pathFrom:o,pathTo:s,stroke:n,strokeWidth:c,strokeLineCap:D.config.stroke.lineCap,fill:t,pathToInterp:j,animationDelay:N,initialSpeed:D.config.chart.animations.speed,dataChangeSpeed:u,className:`apexcharts-${C}-area${w?` ${w}`:``}`,chartType:C,bindEventsOnPaths:!1});m.attr(`clip-path`,`url(#gridRectBarMask${D.globals.cuid})`),d&&(m.node.setAttribute(`opacity`,`0`),m.node.setAttribute(`data-piece-hidden`,`1`));let _=D.config.forecastDataPoints;_.count>0&&r>=D.globals.dataPoints-_.count&&(m.node.setAttribute(`stroke-dasharray`,_.dashArray),m.node.setAttribute(`stroke-width`,_.strokeWidth),m.node.setAttribute(`fill-opacity`,_.fillOpacity)),f!==void 0&&p!==void 0&&(m.attr(`data-range-y1`,f),m.attr(`data-range-y2`,p)),new ng(this.w).setSelectionFilter(m,e,r),l.add(m),m.attr({cy:re.dataLabelsPos.bcy,cx:re.dataLabelsPos.bcx,j:r,val:D.seriesData.series[i][r],barHeight:h,barWidth:g,"data:pathKey":fb(D,e,r)}),k.kind===`canvas`&&(D.globals.barCanvasCoords||(D.globals.barCanvasCoords={}),D.globals.barCanvasCoords[e]||(D.globals.barCanvasCoords[e]={}),D.globals.barCanvasCoords[e][r]={cx:re.dataLabelsPos.bcx,cy:re.dataLabelsPos.bcy,barWidth:g}),re.dataLabels!==null&&y.add(re.dataLabels),re.totalDataLabels&&y.add(re.totalDataLabels),l.add(y),b&&l.add(b),x&&l.add(x)}return l}drawBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,yDivision:o,elSeries:s}){let c=this.w,l=e.i,u=e.j,d;if(c.axisFlags.isXNumeric)a=(c.seriesData.seriesX[l][u]-c.globals.minX)/this.invertedXRatio-t,d=a+t*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:l,j:u});e>0&&(t=this.seriesLen*t/e),d=a+t*this.visibleI,d-=t*n}else d=a+t*this.visibleI;let f=this.isFunnel&&c.config.plotOptions.funnel.shape===`trapezoid`,p=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[u]:null,m=!!p;if(p)d=p.y,t=p.height;else if(this.isFunnel&&!f){let e=r??0;r=e-(this.barHelpers.getXForValue(this.series[l][u],e)-e)/2}i=this.barHelpers.getXForValue(this.series[l][u],r??0);let h;return h=p?this.barHelpers.getPyramidPaths({barYPosition:d,barHeight:t,topHalf:p.topHalf,bottomHalf:p.bottomHalf,realIndex:e.realIndex,j:u,strokeWidth:n,w:c}):f?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:d,barHeight:t,series:this.series,i:l,j:u,realIndex:e.realIndex,strokeWidth:n,w:c}):this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:r,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,i:l,j:u,w:c}),(f||m)&&(r=h.x1,i=h.x),!c.axisFlags.isXNumeric&&!m&&(a+=o),m&&(a=d),this.barHelpers.barBackground({j:u,i:l,y1:d-t*this.visibleI,y2:t*this.seriesLen,elSeries:s}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x1:r,x:i,y:a,goalX:this.barHelpers.getGoalValues(`x`,r,null,e.realIndex,u,0),barYPosition:d,barHeight:t}}drawColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,strokeWidth:o,elSeries:s}){let c=this.w,l=e.realIndex,u=e.translationsIndex,d=e.i,f=e.j,p=e.bc,m;if(c.axisFlags.isXNumeric){let e=this.getBarXForNumericXAxis({x:t,j:f,realIndex:l,barWidth:i});t=e.x,m=e.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:d,j:f});e>0&&(i=this.seriesLen*i/e),m=t+i*this.visibleI,m-=i*n}else m=t+i*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][f],a,u);let h=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:i,y1:a,y2:n,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:l,i:d,j:f,w:c});return c.axisFlags.isXNumeric||(t+=r),this.barHelpers.barBackground({bc:p,j:f,i:d,x1:m-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:s}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x:t,y:n,goalY:this.barHelpers.getGoalValues(`y`,null,a,l,f,u),barXPosition:m,barWidth:i}}getBarXForNumericXAxis({x:e,barWidth:t,realIndex:n,j:r}){let i=this.w,a=n;return i.seriesData.seriesX[n].length||(a=i.globals.maxValsInArrayIndex),$.isNumber(i.seriesData.seriesX[a][r])&&(e=H_.dataXToPx(i,i.seriesData.seriesX[a][r])-t*this.seriesLen/2),{barXPosition:e+(wb(i)?0:t*this.visibleI),x:e}}_prevRecord(e){let t=this.w,n=null;for(let r=0;r<t.globals.previousPaths.length;r++){let i=t.globals.previousPaths[r];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(e),10)&&(n=i)}return n}_prevKeyedPaths(e){if(this._prevKeyed||={},this._prevKeyed[e]!==void 0)return this._prevKeyed[e];let t=this._prevRecord(e),n=null;if(t&&t.paths.every(e=>e.key!=null)){let e=new Map;t.paths.forEach(t=>{e.set(t.key,t)}),n=e}return this._prevKeyed[e]=n,n}isLengthTransition(e){if(this._ltCache||={},this._ltCache[e]!==void 0)return this._ltCache[e];let t=this.w,n=!1;if(db(t)&&t.globals.previousPaths.length>0){let r=this._prevRecord(e),i=t.seriesData.series[e]?.length??0;if(!r)n=i>0;else if(r.paths.length!==i)n=!0;else{let r=this._prevKeyedPaths(e);if(r){for(let a=0;a<i;a++)if(!r.has(fb(t,e,a))){n=!0;break}}}}return this._ltCache[e]=n,n}isLayoutShift(e){if(this.isLengthTransition(e))return!0;if(this._layoutShiftCache||={},this._layoutShiftCache[e]!==void 0)return this._layoutShiftCache[e];let t=gb(this.w,e,!0,!0),n=!!(t&&t.join.changed);return this._layoutShiftCache[e]=n,n}getPreviousPath(t,n,r,i){let a=this.w;this._pathToInterp=null;let o=this._prevRecord(t);if(!o)return db(a)?null:r;let s=null,c=!1,l=this._prevKeyedPaths(t);if(l){let e=l.get(fb(a,t,n));e?s=e.d:c=!0}else o.paths[n]===void 0?c=!0:s=o.paths[n].d;if(s){let t=e.pathCommandCount(s),n=e.pathCommandCount(r);if(t===n)return s;let o=new Z(a),c=t=>{let n=e.pathBox(t);return n?Math.min(n.maxX-n.minX,n.maxY-n.minY):0},l=t<n?c(s)>1:c(r)>1;if(t<n){let t=o.roundPathCorners(s,0);if(e.pathCommandCount(t)===n){if(l&&i){let t=o.roundPathCorners(i,0);e.pathCommandCount(t)===n&&(this._pathToInterp=t)}return t}}else{let n=o.roundPathCorners(r,0);if(e.pathCommandCount(n)===t){if(this._pathToInterp=n,l){let n=e.squareLike(s),r=n?o.roundPathCorners(n,0):null;if(r&&e.pathCommandCount(r)===t)return r}return s}}}return c&&db(a)?null:r}static pathBox(e){if(!e)return null;let t=[],n=/([MLC])([^MLCZz]*)/g,r;for(;(r=n.exec(e))!==null;){let e=r[2].trim().split(/[\s,]+/).map(Number);e.length<2||e.some(isNaN)||t.push([e[e.length-2],e[e.length-1]])}if(t.length<3)return null;let i=t.map(e=>e[0]),a=t.map(e=>e[1]);return{minX:Math.min(...i),maxX:Math.max(...i),minY:Math.min(...a),maxY:Math.max(...a),start:t[0],vertical:Math.abs(t[1][0]-t[0][0])<Math.abs(t[1][1]-t[0][1])}}static squareLike(t){let n=e.pathBox(t);if(!n)return null;let{minX:r,maxX:i,minY:a,maxY:o,start:s,vertical:c}=n,l=(e,t,n)=>Math.abs(e-t)<=Math.abs(e-n)?[t,n]:[n,t],u,d,f,p;c?(u=Math.abs(s[0]-r)<=Math.abs(s[0]-i)?r:i,d=u===r?i:r,[f,p]=l(s[1],a,o)):(f=Math.abs(s[1]-a)<=Math.abs(s[1]-o)?a:o,p=f===a?o:a,[u,d]=l(s[0],r,i));let m=t.trim().endsWith(`Z`)?` Z`:` z`;return c?`M ${u} ${f} L ${u} ${p} L ${d} ${p} L ${d} ${f}${m}`:`M ${u} ${f} L ${d} ${f} L ${d} ${p} L ${u} ${p}${m}`}getPreviousFlip(e,t){let n=this.w,r=this._prevRecord(e);if(!r)return null;let i=this._prevKeyedPaths(e),a=i?i.get(fb(n,e,t)):r.paths[t];return a?!!a.flip:null}static pathCommandCount(e){if(!e)return 0;let t=e.match(/[A-Za-z]/g);return t?t.length:0}},Db=class extends Eb{draw(e,t){let n=this.w;this.graphics=new Z(this.w),this.bar=new Eb(this.w,this.ctx,this.xyRatios);let r=new Xh(this.w);e=r.getLogSeries(e),this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e),n.config.chart.stackType===`100%`&&(e=n.globals.comboCharts?t.map(e=>n.globals.seriesPercent[e]):n.globals.seriesPercent.slice()),this.series=e,this.barHelpers.initializeStackedPrevVars(this);let i=this.graphics.group({class:`apexcharts-bar-series apexcharts-plot-series`}),a=0,o=0,s=n.config.chart.animations,c=s.enabled&&s.dynamicAnimation.enabled&&n.globals.previousPaths.length>0,l=!1;for(let r=0,s=0;r<e.length;r++,s++){let u=n.globals.comboCharts?t[r]:r,{groupIndex:d,columnGroupIndex:f}=this.barHelpers.getGroupIndex(u);this.groupCtx=this[n.labelData.seriesGroups[d]];let p=[],m=[],h=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[u][0],h=u),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;let g=this.graphics.group({class:`apexcharts-series`,seriesName:$.escapeString(n.seriesData.seriesNames[u]),rel:r+1,"data:realIndex":u});cg.addCollapsedClassToSeries(this.w,g,u);let _=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":u});cg.addCollapsedClassToSeries(this.w,_,u),(n.globals.collapsingSeriesIndices||[]).indexOf(u)>-1&&_.node.style.setProperty(`--apexcharts-dl-exit`,`${n.config.chart.animations.dynamicAnimation.speed}ms`);let v=this.graphics.group({class:`apexcharts-bar-goals-markers`}),y=this.initialPositions(a,o,void 0,void 0,void 0,void 0,h),{xDivision:b,yDivision:x,zeroH:S,zeroW:C}=y,w=y.barHeight,T=y.barWidth;o=y.y,a=y.x,n.globals.barHeight=w,n.globals.barWidth=T,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(e=>isNaN(e))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>S),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let t=0;t<n.globals.dataPoints;t++){let i=this.barHelpers.getStrokeWidth(r,t,u),y={indexes:{i:r,j:t,realIndex:u,translationsIndex:h,bc:s},strokeWidth:i,x:a,y:o,elSeries:g,columnGroupIndex:f,seriesGroup:n.labelData.seriesGroups[d]},E=null;this.isHorizontal?(E=this.drawStackedBarPaths(X(Y({},y),{zeroW:C,barHeight:w,yDivision:x})),T=this.series[r][t]/this.invertedYRatio):(E=this.drawStackedColumnPaths(X(Y({},y),{xDivision:b,barWidth:T,zeroH:S})),w=this.series[r][t]/this.yRatio[h]);let D=this.barHelpers.drawGoalLine({barXPosition:E.barXPosition,barYPosition:E.barYPosition,goalX:E.goalX,goalY:E.goalY,barHeight:w,barWidth:T});D&&v.add(D),o=E.y,a=E.x,p.push(a),m.push(o);let O=this.barHelpers.getPathFillColor(e,r,t,u),k=``,A=n.globals.isBarHorizontal?`apexcharts-flip-x`:`apexcharts-flip-y`,j=this.barHelpers.arrBorderRadius[u][t]===`bottom`&&n.seriesData.series[u][t]>0||this.barHelpers.arrBorderRadius[u][t]===`top`&&n.seriesData.series[u][t]<0,ee=c&&!j&&this.getPreviousFlip(u,t);(j||ee)&&(k=A),ee&&(k+=` apexcharts-flip-held`,l=!0),g=this.renderSeries(X(Y({realIndex:u,pathFill:O.color},O.useRangeColor?{lineFill:O.color}:{}),{j:t,i:r,columnGroupIndex:f,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:i,elSeries:g,x:a,y:o,series:e,barHeight:w,barWidth:T,elDataLabelsWrap:_,elGoalsMarkers:v,type:`bar`,visibleSeries:f,classes:k}))}n.globals.seriesXvalues[u]=p,n.globals.seriesYvalues[u]=m,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),i.add(g)}return l&&this.settleHeldMirrors(),i}settleHeldMirrors(){let e=this.w;if(!d_.isBrowser())return;let t=e.config.chart.animations,n=(t.dynamicAnimation.speed||0)+(t.speed||0)+100;setTimeout(()=>{e.globals.isDestroyed||!$.elementExists(e.dom.baseEl)||e.dom.baseEl.querySelectorAll(`.apexcharts-flip-held`).forEach(e=>{e.classList.remove(`apexcharts-flip-held`,`apexcharts-flip-y`,`apexcharts-flip-x`)})},n)}initialPositions(e,t,n,r,i,a,o){let s=this.w,c,l;if(this.isHorizontal){r=s.layout.gridHeight/s.globals.dataPoints;let e=s.config.plotOptions.bar.barHeight;c=String(e).indexOf(`%`)===-1?parseInt(e,10):r*parseInt(e,10)/100,a=s.globals.padHorizontal+(this.isReversed?s.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),t=(r-c)/2}else{n=s.layout.gridWidth/s.globals.dataPoints,l=n;let t=s.config.plotOptions.bar.columnWidth,r=s.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;r>0?(n=r/this.xRatio,l=n*parseInt(this.barOptions.columnWidth,10)/100):l*=parseInt(t,10)/100,String(t).indexOf(`%`)===-1&&(l=parseInt(t,10)),i=this.isReversed?this.baseLineY[o]:s.layout.gridHeight-this.baseLineY[o],e=s.globals.padHorizontal+(n-l)/2}let u=s.globals.barGroups.length||1;return{x:e,y:t,yDivision:r,xDivision:n,barHeight:(c??0)/u,barWidth:(l??0)/u,zeroH:i,zeroW:a}}drawStackedBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,columnGroupIndex:o,seriesGroup:s,yDivision:c,elSeries:l}){let u=this.w,d=a+o*t,f,p=e.i,m=e.j,h=e.realIndex,g=e.translationsIndex,_=0;for(let e=0;e<this.groupCtx.prevXF.length;e++)_+=this.groupCtx.prevXF[e][m];let v=this.groupCtx.prevX.length;if(v>0){let e=r;this.groupCtx.prevXVal[v-1][m]<0?e=this.series[p]?.[m]>=0?this.groupCtx.prevX[v-1][m]+_-(this.isReversed?_:0)*2:this.groupCtx.prevX[v-1][m]:this.groupCtx.prevXVal[v-1][m]>=0&&(e=this.series[p]?.[m]>=0?this.groupCtx.prevX[v-1][m]:this.groupCtx.prevX[v-1][m]-_+(this.isReversed?_:0)*2),f=e}else f=r;i=this.series[p]?.[m]===null?f:f+this.series[p]?.[m]/this.invertedYRatio-(this.isReversed?this.series[p]?.[m]/this.invertedYRatio:0)*2;let y=this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:f,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,seriesGroup:s,i:p,j:m,w:u});return this.barHelpers.barBackground({j:m,i:p,y1:d,y2:t,elSeries:l}),a+=c,{pathTo:y.pathTo,pathFrom:y.pathFrom,goalX:this.barHelpers.getGoalValues(`x`,r,null,h,m,g),barXPosition:f,barYPosition:d,x:i,y:a}}drawStackedColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,columnGroupIndex:o,seriesGroup:s,elSeries:c}){let l=this.w,u=e.i,d=e.j,f=e.bc,p=e.realIndex,m=e.translationsIndex;if(l.axisFlags.isXNumeric){let e=l.seriesData.seriesX[p][d];e||=0,t=(e-l.globals.minX)/this.xRatio-i/2*l.globals.barGroups.length}let h=t+o*i,g,_=0;for(let e=0;e<this.groupCtx.prevYF.length;e++)_+=isNaN(this.groupCtx.prevYF[e][d])?0:this.groupCtx.prevYF[e][d];let v=this.groupCtx.prevY.length;if(v>0&&!l.axisFlags.isXNumeric||v>0&&l.axisFlags.isXNumeric&&l.seriesData.seriesX[p-1][d]===l.seriesData.seriesX[p][d]){let e,t,n=Math.min(this.yRatio.length+1,p+1);if(this.groupCtx.prevY[v-1]!==void 0&&this.groupCtx.prevY[v-1].length){for(let e=1;e<n;e++)if(!isNaN(this.groupCtx.prevY[v-e]?.[d])){t=this.groupCtx.prevY[v-e][d];break}}for(let r=1;r<n;r++)if(this.groupCtx.prevYVal[v-r]?.[d]<0){e=this.series[u]?.[d]>=0?t-_+(this.isReversed?_:0)*2:t;break}else if(this.groupCtx.prevYVal[v-r]?.[d]>=0){e=this.series[u]?.[d]>=0?t:t+_-(this.isReversed?_:0)*2;break}e===void 0&&(e=l.layout.gridHeight),g=this.groupCtx.prevYF[0]?.every(e=>e===0)&&this.groupCtx.prevYF.slice(1,v).every(e=>e.every(e=>isNaN(e)))?a:e}else g=a;n=this.series[u]?.[d]?g-this.series[u]?.[d]/this.yRatio[m]+(this.isReversed?this.series[u]?.[d]/this.yRatio[m]:0)*2:g;let y=this.barHelpers.getColumnPaths({barXPosition:h,barWidth:i,y1:g,y2:n,yRatio:this.yRatio[m],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:s,realIndex:e.realIndex,i:u,j:d,w:l});return this.barHelpers.barBackground({bc:f,j:d,i:u,x1:h,x2:i,elSeries:c}),{pathTo:y.pathTo,pathFrom:y.pathFrom,goalY:this.barHelpers.getGoalValues(`y`,null,a,p,d,0),barXPosition:h,x:l.axisFlags.isXNumeric?t:t+r,y:n}}};function Ob({w:e,points:t,seedA:n,seedB:r,center:i,halfExtent:a,alongFn:o,isHorizontal:s,options:c,clampAt:l,sideSign:u}){let d=c;if(!d||d.show===!1||!t||!t.length)return[];let f=d.maxPoints||3e3,p=t.length>f?Math.ceil(t.length/f):1,m=d.size==null?2.5:d.size,h=a*(d.jitter==null?.5:d.jitter),g=d.constrainToViolin!==!1&&typeof l==`function`,_=d.shape===`square`,v=d.colorScale,y=v&&Array.isArray(v.colors)&&v.colors.length>0,b=y?Math.max(2,v.steps||24):1,x=y&&v.min!=null?v.min:e.globals.minY,S=(y&&v.max!=null?v.max:e.globals.maxY)-x||1,C=y?Array(b).fill(``):[``];for(let e=0;e<t.length;e+=p){let a=t[e],c=o(a),d=(Mb(n*7919+r*100003+e)-.5)*2*h;if(g){let e=l(a);d>e&&(d=e),d<-e&&(d=-e)}u&&(d=Math.abs(d)*u);let f=s?c:i+d,p=s?i+d:c,v=_?Pb(f,p,m):Nb(f,p,m);if(y){let e=(a-x)/S;e<0&&(e=0),e>1&&(e=1),C[Math.round(e*(b-1))]+=v}else C[0]+=v}if(!y)return C[0]?[{fill:null,d:C[0]}]:[];let w=[];for(let e=0;e<b;e++)C[e]&&w.push({fill:jb(v.colors,e/(b-1)),d:C[e]});return w}function kb({graphics:e,w:t,elSeries:n,pointsByCat:r,options:i,distributed:a,realIndex:o,wrapClass:s,pointClass:c}){if(!i||i.show===!1||!r.length)return;let l=i.opacity==null?.9:i.opacity,u=i.strokeColor==null?`#fff`:i.strokeColor,d=i.strokeWidth==null?1:i.strokeWidth,f=t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged,p=e.group({class:f?`${s} apexcharts-element-hidden`:s});f&&t.globals.delayedElements.push({el:p.node}),r.forEach(({groups:n,j:r})=>{let s=a?t.globals.colors[r]:t.globals.colors[o],f=i.fillColor,m=f===`series`?s:f===`series-dark`?Ab(s,.45):f||Ab(s,.45);n.forEach(n=>{let i=e.drawPath({d:n.d,fill:n.fill==null?m:n.fill,stroke:d>0?u:`none`,strokeWidth:d,fillOpacity:l,classes:c});i.attr(`data:realIndex`,o),i.attr(`j`,r),i.attr(`clip-path`,`url(#gridRectBarMask${t.globals.cuid})`),i.node.style.pointerEvents=`none`,p.add(i)})}),n.add(p)}function Ab(e,t){let n=$.parseHex(e);if(!n)return e;let r=Math.max(0,1-t);return`rgb(${Math.round(n[0]*r)},${Math.round(n[1]*r)},${Math.round(n[2]*r)})`}function jb(e,t){if(!e.length)return`#000`;if(e.length===1)return e[0];let n=Math.max(0,Math.min(1,t))*(e.length-1),r=Math.floor(n),i=n-r,a=$.parseHex(e[r])||[0,0,0],o=$.parseHex(e[Math.min(r+1,e.length-1)])||a,s=(e,t)=>Math.round(e+(t-e)*i);return`rgb(${s(a[0],o[0])},${s(a[1],o[1])},${s(a[2],o[2])})`}function Mb(e){let t=(e^2654435769)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}function Nb(e,t,n){return`M ${e-n} ${t} a ${n} ${n} 0 1 0 ${2*n} 0 a ${n} ${n} 0 1 0 ${-2*n} 0 `}function Pb(e,t,n){return`M ${e-n} ${t-n} h ${2*n} v ${2*n} h ${-2*n} z `}var Fb=class extends Eb{draw(e,t,n){let r=this.w,i=new Z(this.w),a=r.globals.comboCharts?t:r.config.chart.type,o=new tg(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type===`ohlc`,this.coreUtils=new Xh(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let s=i.group({class:`apexcharts-${a}-series apexcharts-plot-series`});for(let t=0;t<e.length;t++){this.isBoxPlot=r.config.chart.type===`boxPlot`||r.config.series[t].type===`boxPlot`;let a,c,l=[],u=[],d=r.globals.comboCharts?n[t]:t,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=i.group({class:`apexcharts-series`,seriesName:$.escapeString(r.seriesData.seriesNames[d]),rel:t+1,"data:realIndex":d});cg.addCollapsedClassToSeries(this.w,p,d),e[t].length>0&&(this.visibleI+=1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],m=d);let{y:h,barHeight:g,yDivision:_,zeroW:v,x:y,barWidth:b,xDivision:x,zeroH:S}=this.barHelpers.initialPositions(d);c=h,a=y,u.push(a+(b??0)/2);let C=i.group({class:`apexcharts-datalabels`,"data:realIndex":d}),w=i.group({class:`apexcharts-bar-goals-markers`}),T=this.isBoxPlot?this.boxOptions.points:null,E=[],D=r.layout.gridWidth,O=b??0;for(let n=0;n<r.globals.dataPoints;n++){let i=this.barHelpers.getStrokeWidth(t,n,d),s=null,h={indexes:{i:t,j:n,realIndex:d,translationsIndex:m},x:a,y:c,strokeWidth:i,elSeries:p};if(s=this.isHorizontal?this.drawHorizontalBoxPaths(X(Y({},h),{yDivision:_,barHeight:g,zeroW:v})):this.drawVerticalBoxPaths(X(Y({},h),{xDivision:x,barWidth:b,zeroH:S,cullBounds:{lo:-O,hi:D+O}})),c=s.y,a=s.x,n>0&&u.push(a+(b??0)/2),l.push(c),s.culled)continue;let y=this.barHelpers.drawGoalLine({barXPosition:s.barXPosition,barYPosition:s.barYPosition,goalX:s.goalX,goalY:s.goalY,barHeight:g,barWidth:b});if(y&&w.add(y),s.pathTo.forEach((l,u)=>{let m=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?s.color[u]:r.globals.stroke.colors[t],h=o.fillPath({seriesNumber:d,dataPointIndex:n,color:s.color[u],value:e[t][n]});this.renderSeries({realIndex:d,pathFill:h,lineFill:m,j:n,i:t,pathFrom:s.pathFrom,pathTo:l,strokeWidth:i,elSeries:p,x:a,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,elGoalsMarkers:w,visibleSeries:this.visibleI,type:r.config.chart.type})}),T&&T.show!==!1){let e=r.candleData.seriesBoxPoints[d]?.[n];if(e&&e.length){let t=e=>this.coreUtils.getLogValAtSeriesIndex(e,d),i,a,o;if(this.isHorizontal){let e=this.invertedYRatio,n=g??0,r=v??0;i=s.barYPosition+n/2,a=n/2,o=n=>r+t(n)/e}else{let e=this.yRatio[m],n=b??0,r=S??0;i=s.barXPosition+n/2,a=n/2,o=n=>r-t(n)/e}let c=Ob({w:r,points:e,seedA:d,seedB:n,center:i,halfExtent:a,alongFn:o,isHorizontal:this.isHorizontal,options:T});c.length&&E.push({groups:c,j:n})}}}T&&kb({graphics:i,w:r,elSeries:p,pointsByCat:E,options:T,distributed:r.config.plotOptions.bar.distributed,realIndex:d,wrapClass:`apexcharts-boxPlot-points-wrap`,pointClass:`apexcharts-boxPlot-points`}),r.globals.seriesXvalues[d]=u,r.globals.seriesYvalues[d]=l,s.add(p)}return s}drawVerticalBoxPaths({indexes:e,x:t,xDivision:n,barWidth:r,zeroH:i,strokeWidth:a,cullBounds:o=null}){let s=this.w,c=new Z(this.w),l=e.i,u=e.j,{colors:d}=s.config.plotOptions.candlestick,{colors:f}=this.boxOptions,p=e.realIndex,m=e=>Array.isArray(e)?e[p]:e,h=m(d.upward),g=m(d.downward),_=this.yRatio[e.translationsIndex],v=this.getOHLCValue(p,u),y=i,b=i,x=v.o<v.c?[h]:[g];this.isBoxPlot&&(x=[m(f.lower),m(f.upper)]);let S=Math.min(v.o,v.c),C=Math.max(v.o,v.c),w=v.m;s.axisFlags.isXNumeric&&(t=(s.seriesData.seriesX[p][u]-s.globals.minX)/this.xRatio-r/2);let T=t+r*this.visibleI;if(this.series[l]?.[u]===void 0||this.series[l]?.[u]===null?(S=i,C=i):(S=i-S/_,C=i-C/_,y=i-v.h/_,b=i-v.l/_,w=i-v.m/_),o&&(T+r<o.lo||T>o.hi))return{pathTo:null,pathFrom:null,x:s.axisFlags.isXNumeric?t:t+n,y:C,barXPosition:T,color:x,culled:!0};let E;if(this.isOHLC){let e=T+r/2,t=i-v.o/_,n=i-v.c/_;E=[c.move(e,y)+c.line(e,b)+c.move(e,t)+c.line(T,t)+c.move(e,n)+c.line(T+r,n)]}else E=this.isBoxPlot?[c.move(T,S)+c.line(T+r/2,S)+c.line(T+r/2,y)+c.line(T+r/4,y)+c.line(T+r-r/4,y)+c.line(T+r/2,y)+c.line(T+r/2,S)+c.line(T+r,S)+c.line(T+r,w)+c.line(T,w)+c.line(T,S+a/2),c.move(T,w)+c.line(T+r,w)+c.line(T+r,C)+c.line(T+r/2,C)+c.line(T+r/2,b)+c.line(T+r-r/4,b)+c.line(T+r/4,b)+c.line(T+r/2,b)+c.line(T+r/2,C)+c.line(T,C)+c.line(T,w)+`z`]:[c.move(T,C)+c.line(T+r/2,C)+c.line(T+r/2,y)+c.line(T+r/2,C)+c.line(T+r,C)+c.line(T+r,S)+c.line(T+r/2,S)+c.line(T+r/2,b)+c.line(T+r/2,S)+c.line(T,S)+c.line(T,C-a/2)];let D=null,O=(this.ctx?.morphTypeChange)?.getInitialPathFor(p,u);return O?D=O:s.globals.previousPaths.length>0&&(D=this.getPreviousPath(p,u,E[0])),D??=c.move(T+r/2,S)+c.move(T,S),s.axisFlags.isXNumeric||(t+=n),{pathTo:E,pathFrom:D,x:t,y:C,goalY:this.barHelpers.getGoalValues(`y`,null,i,p,u,e.translationsIndex),barXPosition:T,color:x}}drawHorizontalBoxPaths({indexes:e,y:t,yDivision:n,barHeight:r,zeroW:i,strokeWidth:a}){let o=this.w,s=new Z(this.w),c=e.i,l=e.j,u=e.realIndex,{colors:d}=o.config.plotOptions.candlestick,{colors:f}=this.boxOptions,p=e=>Array.isArray(e)?e[u]:e,m=this.invertedYRatio,h=this.getOHLCValue(u,l),g=h.o<h.c?[p(d.upward)]:[p(d.downward)];this.isBoxPlot&&(g=[p(f.lower),p(f.upper)]);let _=i,v=i,y=Math.min(h.o,h.c),b=Math.max(h.o,h.c),x=h.m;o.axisFlags.isXNumeric&&(t=(o.seriesData.seriesX[u][l]-o.globals.minX)/this.invertedXRatio-r/2);let S=t+r*this.visibleI;this.series[c]?.[l]===void 0||this.series[c]?.[l]===null?(y=i,b=i):(y=i+y/m,b=i+b/m,_=i+h.h/m,v=i+h.l/m,x=i+h.m/m);let C=[s.move(y,S)+s.line(y,S+r/2)+s.line(_,S+r/2)+s.line(_,S+r/2-r/4)+s.line(_,S+r/2+r/4)+s.line(_,S+r/2)+s.line(y,S+r/2)+s.line(y,S+r)+s.line(x,S+r)+s.line(x,S)+s.line(y+a/2,S),s.move(x,S)+s.line(x,S+r)+s.line(b,S+r)+s.line(b,S+r/2)+s.line(v,S+r/2)+s.line(v,S+r-r/4)+s.line(v,S+r/4)+s.line(v,S+r/2)+s.line(b,S+r/2)+s.line(b,S)+s.line(x,S)+`z`],w=null,T=(this.ctx?.morphTypeChange)?.getInitialPathFor(u,l);return T?w=T:o.globals.previousPaths.length>0&&(w=this.getPreviousPath(u,l,C[0])),w??=s.move(y,S+r/2)+s.move(y,S),o.axisFlags.isXNumeric||(t+=n),{pathTo:C,pathFrom:w,x:b,y:t,goalX:this.barHelpers.getGoalValues(`x`,i,null,u,l,0),barYPosition:S,color:g}}getOHLCValue(e,t){let n=this.w,r=this.coreUtils,i=n=>n[e]&&n[e][t]!=null?r.getLogValAtSeriesIndex(n[e][t],e):0,a=i(n.candleData.seriesCandleH),o=i(n.candleData.seriesCandleO),s=i(n.candleData.seriesCandleM),c=i(n.candleData.seriesCandleC),l=i(n.candleData.seriesCandleL);return{o:this.isBoxPlot?a:o,h:this.isBoxPlot?o:a,m:s,l:this.isBoxPlot?c:l,c:this.isBoxPlot?l:c}}},Ib=e=>{let t=Bb(e),n=e.length-1,r=[],i,a,o,s;for(let r=0;r<n;r++)o=zb(e[r],e[r+1]),Math.abs(o)<1e-6?t[r]=t[r+1]=0:(i=t[r]/o,a=t[r+1]/o,s=i*i+a*a,s>9&&(s=o*3/Math.sqrt(s),t[r]=s*i,t[r+1]=s*a));for(let i=0;i<=n;i++)s=(e[Math.min(n,i+1)][0]-e[Math.max(0,i-1)][0])/(6*(1+t[i]*t[i])),r.push([s||0,t[i]*s||0]);return r},Lb=e=>{let t=``;for(let n=0;n<e.length;n++){let r=e[n],i=r.length;i>4?(t+=`C${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`,t+=`, ${r[4]}, ${r[5]}`):i>2&&(t+=`S${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`)}return t},Rb={points(e){let t=Ib(e),n=e[1],r=e[0],i=[],a=t[1],o=t[0];i.push(r,[r[0]+o[0],r[1]+o[1],n[0]-a[0],n[1]-a[1],n[0],n[1]]);for(let n=2,r=t.length;n<r;n++){let r=e[n],a=t[n];i.push([r[0]-a[0],r[1]-a[1],r[0],r[1]])}return i},slice(e,t,n){let r=e.slice(t,n);if(t){if(n-t>1&&r[1].length<6){let e=r[0].length;r[1]=[r[0][e-2]*2-r[0][e-4],r[0][e-1]*2-r[0][e-3]].concat(r[1])}r[0]=r[0].slice(-2)}return r}};function zb(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Bb(e){let t=[],n=e[0],r=e[1],i=t[0]=zb(n,r),a=1;for(let o=e.length-1;a<o;a++)n=r,r=e[a+1],t[a]=(i+(i=zb(n,r)))*.5;return t[a]=i,t}var Vb=class extends Eb{draw(e,t,n){let r=this.w,i=new Z(this.w),a=new tg(this.w);this.violinOptions=r.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.boxOptions=this.violinOptions.box||{},this.cloudSign=Ub(this.violinOptions.side),this.rainSign=this.pointsOptions.show===!1?0:Ub(this.pointsOptions.position),this.boxShown=this.boxOptions.show===!0,this.boxFrac=this.boxShown?Wb(this.boxOptions.width,.15):0,this.rainFrac=Wb(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||`individual`,this.distributed=r.config.plotOptions.bar.distributed,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.coreUtils=new Xh(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let o=i.group({class:`apexcharts-violin-series apexcharts-plot-series`});for(let t=0;t<e.length;t++){let s,c,l=[],u=[],d=r.globals.comboCharts?n[t]:t,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=i.group({class:`apexcharts-series`,seriesName:$.escapeString(r.seriesData.seriesNames[d]),rel:t+1,"data:realIndex":d});cg.addCollapsedClassToSeries(this.w,p,d),e[t].length>0&&(this.visibleI+=1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],m=d);let{y:h,barHeight:g,yDivision:_,zeroW:v,x:y,barWidth:b,xDivision:x,zeroH:S}=this.barHelpers.initialPositions(d);c=h,s=y,u.push(s+(b??0)/2);let C=i.group({class:`apexcharts-datalabels`,"data:realIndex":d});this.seriesMaxWeight=0,this.normalize===`group`&&(r.violinData.seriesViolinDensity[d]||[]).forEach(e=>{e&&e.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=e.maxWeight)});let w=[];for(let n=0;n<r.globals.dataPoints;n++){let i=this.barHelpers.getStrokeWidth(t,n,d),o=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:t,j:n,realIndex:d,translationsIndex:m},y:c,yDivision:_,barHeight:g,zeroW:v}):this.drawVerticalViolin({indexes:{i:t,j:n,realIndex:d,translationsIndex:m},x:s,xDivision:x,barWidth:b,zeroH:S});s=o.x,c=o.y,n>0&&u.push(o.center),l.push(o.alongRepresentative);let h=this.buildPointsSubPath({realIndex:d,j:n,center:o.center,halfExtent:o.halfExtent,alongFn:o.alongFn,density:o.density,maxWeight:o.maxWeight,cloudBase:o.cloudBase,cloudMaxPx:o.cloudMaxPx,rainCenter:o.rainCenter,rainHalfPx:o.rainHalfPx});h.length&&w.push({groups:h,j:n});let y=a.fillPath({seriesNumber:this.distributed?n:d,dataPointIndex:n,color:this.distributed?r.globals.colors[n]:void 0,value:e[t][n]});this.renderSeries({realIndex:d,pathFill:y,lineFill:r.globals.stroke.colors[d],j:n,i:t,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:i,elSeries:p,x:s,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:`violin`});let T=p.node.querySelector(`path.apexcharts-violin-area[j='${n}']`);if(T&&isFinite(o.alongRepresentative)&&T.setAttribute(this.isHorizontal?`cx`:`cy`,`${o.alongRepresentative}`),o.boxPaths){let i=this.boxOptions.strokeWidth??1;o.boxPaths.forEach(a=>{this.renderSeries({realIndex:d,pathFill:a.filled?this.boxOptions.fillColor||y:`none`,lineFill:r.globals.stroke.colors[d],j:n,i:t,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:i,elSeries:p,x:s,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:`violin`,classes:`apexcharts-raincloud-box`})})}}kb({graphics:i,w:r,elSeries:p,pointsByCat:w,options:this.pointsOptions,distributed:this.distributed,realIndex:d,wrapClass:`apexcharts-violin-points-wrap`,pointClass:`apexcharts-violin-points`}),r.globals.seriesXvalues[d]=u,r.globals.seriesYvalues[d]=l,o.add(p)}return o}drawVerticalViolin({indexes:e,x:t,xDivision:n,barWidth:r,zeroH:i}){let a=this.w,{realIndex:o,j:s,translationsIndex:c}=e,l=this.yRatio[c];a.axisFlags.isXNumeric&&(t=(a.seriesData.seriesX[o][s]-a.globals.minX)/this.xRatio-r/2);let u=t+r*this.visibleI+r/2,d=r/2,f=this.getDensity(o,s),p=this.effectiveMaxWeight(f),m=e=>i-this.logVal(e,o)/l,h=Gb({halfExtent:d,cloudSign:this.cloudSign??0,rainSign:this.rainSign??0,boxFrac:this.boxFrac??0,rainFrac:this.rainFrac??0}),g=u+h.cloudBaseOff,_=this.buildBodyPath({nodes:f.nodes,center:g,halfExtent:h.cloudMaxPx,maxWeight:p,vertical:!0,alongFn:m,collapsed:!1,sideSign:this.cloudSign}),v=null,y=(this.ctx?.morphTypeChange)?.getInitialPathFor(o,s);return y?v=y:a.globals.previousPaths.length>0&&(v=this.getPreviousPath(o,s,_)),v??=this.buildBodyPath({nodes:f.nodes,center:g,halfExtent:h.cloudMaxPx,maxWeight:p,vertical:!0,alongFn:m,collapsed:!0,sideSign:this.cloudSign}),a.axisFlags.isXNumeric||(t+=n),{pathTo:_,pathFrom:v,x:t,y:i,center:u,halfExtent:d,alongFn:m,density:f,maxWeight:p,cloudBase:g,cloudMaxPx:h.cloudMaxPx,rainCenter:u+h.rainCenterOff,rainHalfPx:h.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:o,j:s,boxCenter:u+h.boxCenterOff,boxHalfPx:h.boxHalfPx,alongFn:m,vertical:!0}),alongRepresentative:m(this.series[e.i][s]??0)}}drawHorizontalViolin({indexes:e,y:t,yDivision:n,barHeight:r,zeroW:i}){let a=this.w,{realIndex:o,j:s}=e,c=this.invertedYRatio;a.axisFlags.isXNumeric&&(t=(a.seriesData.seriesX[o][s]-a.globals.minX)/this.invertedXRatio-r/2);let l=t+r*this.visibleI+r/2,u=r/2,d=this.getDensity(o,s),f=this.effectiveMaxWeight(d),p=e=>i+this.logVal(e,o)/c,m=Gb({halfExtent:u,cloudSign:this.cloudSign??0,rainSign:this.rainSign??0,boxFrac:this.boxFrac??0,rainFrac:this.rainFrac??0}),h=l+m.cloudBaseOff,g=this.buildBodyPath({nodes:d.nodes,center:h,halfExtent:m.cloudMaxPx,maxWeight:f,vertical:!1,alongFn:p,collapsed:!1,sideSign:this.cloudSign}),_=null,v=(this.ctx?.morphTypeChange)?.getInitialPathFor(o,s);return v?_=v:a.globals.previousPaths.length>0&&(_=this.getPreviousPath(o,s,g)),_??=this.buildBodyPath({nodes:d.nodes,center:h,halfExtent:m.cloudMaxPx,maxWeight:f,vertical:!1,alongFn:p,collapsed:!0,sideSign:this.cloudSign}),a.axisFlags.isXNumeric||(t+=n),{pathTo:g,pathFrom:_,x:i,y:t,center:l,halfExtent:u,alongFn:p,maxWeight:f,density:d,cloudBase:h,cloudMaxPx:m.cloudMaxPx,rainCenter:l+m.rainCenterOff,rainHalfPx:m.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:o,j:s,boxCenter:l+m.boxCenterOff,boxHalfPx:m.boxHalfPx,alongFn:p,vertical:!1}),alongRepresentative:p(this.series[e.i][s]??0)}}getDensity(e,t){let n=this.w.violinData.seriesViolinDensity[e]?.[t];if(!n||!n.values.length)return{nodes:[],maxWeight:0};let r=n.values.map((e,t)=>t);r.sort((e,t)=>n.values[e]-n.values[t]);let i=[],a=null;for(let e of r){let t=n.values[e];a!==null&&t===a||(i.push({v:t,w:n.weights[e]}),a=t)}return{nodes:i,maxWeight:n.maxWeight}}effectiveMaxWeight(e){return this.normalize===`group`&&this.seriesMaxWeight>0?this.seriesMaxWeight:e.maxWeight}buildBodyPath({nodes:e,center:t,halfExtent:n,maxWeight:r,vertical:i,alongFn:a,collapsed:o,sideSign:s=0}){let c=new Z(this.w);if(e.length===0){let e=a(0);return i?c.move(t,e)+c.line(t,e):c.move(e,t)+c.line(e,t)}let l=e=>{if(o||r<=0)return 0;let t=e/r*n*this.bandwidthScale;return Math.min(n,Math.max(0,t))},u=[],d=[];for(let n=0;n<e.length;n++){let r=a(e[n].v),o=l(e[n].w),c=s===0?t+o:t+s*o,f=s===0?t-o:t;i?(u.push([c,r]),d.push([f,r])):(u.push([r,c]),d.push([r,f]))}return d.reverse(),this.smoothSegment(u,i,!1)+this.smoothSegment(d,i,!0)+`z`}buildBoxSubPaths({realIndex:e,j:t,boxCenter:n,boxHalfPx:r,alongFn:i,vertical:a}){let o=this.w;if(!this.boxShown||r<=0)return null;let s=o.violinData.seriesViolinSummary[e]?.[t];if(!s)return null;let c=r*Math.min(1,Math.max(0,this.boxOptions.capWidth??.5)),[l,u,d,f,p]=s.map(e=>i(e)),m=(e,t)=>{let r=new Z(this.w),i=(e,t)=>a?[e,t]:[t,e],o=e=>e.map(([e,t],n)=>n===0?r.move(e,t):r.line(e,t)).join(``),s=n;return{whiskers:o([i(s,l),i(s,u)])+o([i(s,f),i(s,p)])+o([i(s-e,l),i(s+e,l)])+o([i(s-e,p),i(s+e,p)]),box:o([i(s-t,u),i(s+t,u),i(s+t,f),i(s-t,f)])+`z`+o([i(s-t,d),i(s+t,d)])}},h=m(c,r),g=m(0,0),_=(n,r)=>{let i=null;return o.globals.previousPaths.length>0&&(i=this.getPreviousPath(e,t,n)),i??r};return[{pathTo:h.whiskers,pathFrom:_(h.whiskers,g.whiskers),filled:!1},{pathTo:h.box,pathFrom:_(h.box,g.box),filled:!0}]}smoothSegment(e,t,n){let r=new Z(this.w),i=e[0],a=n?r.line(i[0],i[1]):r.move(i[0],i[1]);if(e.length<3||!this.strictlyMonotonic(e,t)){for(let t=1;t<e.length;t++)a+=r.line(e[t][0],e[t][1]);return a}let o=e.map(([e,n])=>t?[n,e]:[e,n]),s=Rb.points(o),c=t?s.map(Hb):s;return a+=Lb(c),a}strictlyMonotonic(e,t){let n=t?1:0;for(let t=1;t<e.length;t++)if(e[t][n]===e[t-1][n])return!1;return!0}buildPointsSubPath({realIndex:e,j:t,center:n,halfExtent:r,alongFn:i,density:a,maxWeight:o,cloudBase:s,cloudMaxPx:c,rainCenter:l,rainHalfPx:u}){let d=this.rainSign!==0,f=d?l:this.cloudSign===0?n:s,p=d?u:this.cloudSign===0?r:c;return Ob({w:this.w,points:this.w.violinData.seriesViolinPoints[e]?.[t],seedA:e,seedB:t,center:f,halfExtent:p,alongFn:i,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:d?null:e=>this.halfWidthAtValue(e,a,p,o),sideSign:d?0:this.cloudSign})}halfWidthAtValue(e,t,n,r){let{nodes:i}=t,a=r??t.maxWeight;if(!i.length||a<=0)return 0;let o=e=>Math.min(n,e/a*n*this.bandwidthScale);if(e<=i[0].v)return o(i[0].w);if(e>=i[i.length-1].v)return o(i[i.length-1].w);for(let t=1;t<i.length;t++)if(e<=i[t].v){let n=i[t-1],r=i[t],a=r.v===n.v?0:(e-n.v)/(r.v-n.v);return o(n.w+(r.w-n.w)*a)}return 0}logVal(e,t){return this.coreUtils.getLogValAtSeriesIndex(e,t)}};function Hb(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(e[n+1],e[n]);return t}function Ub(e){return e===`right`||e===`bottom`?1:e===`left`||e===`top`?-1:0}function Wb(e,t){let n=t;if(typeof e==`string`&&e.trim().endsWith(`%`)){let t=parseFloat(e);isFinite(t)&&(n=t/100)}else typeof e==`number`&&isFinite(e)&&(n=e);return Math.min(.5,Math.max(0,n))}function Gb({halfExtent:e,cloudSign:t,rainSign:n,boxFrac:r,rainFrac:i}){let a=r*e,o=n===0?e:i*e,s=n===0?0:n*(e-o);if(t===0)return{cloudBaseOff:0,cloudMaxPx:e,boxCenterOff:0,boxHalfPx:a,rainCenterOff:s,rainHalfPx:o};let c=n===0?0:i,l=2*Math.max(0,1-c-r)*e,u=t*(e-l);return{cloudBaseOff:u,cloudMaxPx:l,boxCenterOff:u-t*a,boxHalfPx:a,rainCenterOff:s,rainHalfPx:o}}var Kb=class{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){let e=this.w,t=!1,n=e.config.plotOptions[e.config.chart.type];return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,n,r){let i=this.w,a=1,o=i.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,n);i.globals.hasNegs||r?a=i.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(o*1.25):(1-s.percent/100)*(o*1.25):s.percent<=0?1-(1+s.percent/100)*o:(1-s.percent/100)*o:(a=1-s.percent/100,e===`treemap`&&(a=(1-s.percent/100)*(o*1.25)));let c=s.color,l=new $;if(i.config.plotOptions[e].enableShades)if(this.w.config.theme.mode===`dark`){let e=l.shadeColor(a*-1,s.color);c=$.hexToRgba($.isColorHex(e)?e:$.rgb2hex(e),i.config.fill.opacity)}else{let e=l.shadeColor(a,s.color);c=$.hexToRgba($.isColorHex(e)?e:$.rgb2hex(e),i.config.fill.opacity)}return{color:c,colorProps:s}}determineColor(e,t,n){let r=this.w,i=r.seriesData.series[t][n],a=r.config.plotOptions[e],o=a.colorScale.inverse?n:t;a.distributed&&r.config.chart.type===`treemap`&&(o=n);let s=r.globals.colors[o],c=null,l,u;if(!a.distributed&&e===`heatmap`)l=r.globals.minY,u=r.globals.maxY;else{let e=r.seriesData.series[t];l=e.length?e[0]:0,u=l;for(let t=1;t<e.length;t++)e[t]<l&&(l=e[t]),e[t]>u&&(u=e[t])}let d=a.colorScale.min,f=a.colorScale.max;d!==void 0&&f!==void 0&&f>d?(l=d,u=f):d!==void 0&&(l=d<r.globals.minY?d:r.globals.minY,u=f>r.globals.maxY?f:r.globals.maxY);let p=Math.abs(u)+Math.abs(l),m=p===0?0:100*Math.min(Math.max(i,l),u)/p;return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(e=>{if(i>=e.from&&i<=e.to){s=e.color,c=e.foreColor?e.foreColor:null,l=e.from,u=e.to;let t=Math.abs(u)+Math.abs(l);m=t===0?0:100*i/t}}),{color:s,foreColor:c,percent:m}}calculateDataLabels({text:e,x:t,y:n,i:r,j:i,colorProps:a,fontSize:o}){let s=this.w,c=s.config.dataLabels,l=new Z(this.w),u=new $h(this.w,this.ctx),d=null;if(c.enabled){d=l.group({class:`apexcharts-data-labels`});let f=Zy(c.offsetX,s,r,i),p=Zy(c.offsetY,s,r,i),m=t+f,h=n+parseFloat(c.style.fontSize)/3+p;u.plotDataLabelsText({x:m,y:h,text:e,i:r,j:i,color:a.foreColor,parent:d,fontSize:o,dataLabelsConfig:c})}return d}},qb=class{constructor(e,t,n){this.ctx=t,this.w=e,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Kb(e,t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.shape=this.w.config.plotOptions.heatmap.shape||`rect`,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(e){let t=this.w,n=new Z(this.w,this.ctx),r=n.group({class:`apexcharts-heatmap`}),i=t.layout.gridWidth/t.globals.dataPoints,a=t.layout.gridHeight/t.seriesData.series.length,o=(t.config.xaxis.type===`numeric`||t.config.xaxis.type===`datetime`)&&t.axisFlags.isXNumeric&&this.xRatio>0,s=i;if(o){let e=t.globals.minXDiff;s=Number.isFinite(e)&&e>0?e/this.xRatio:i}let c=this.shape;o&&c===`hexagon`&&(c=`rect`);let l=Jv(this.ctx,n),u=c===`rect`&&l!==n&&typeof l.drawRectCell==`function`;c===`hexagon`?this.applyHexagonClipPath(r,n,i,a):r.attr(`clip-path`,`url(#gridRectMask${t.globals.cuid})`);let d=Array.isArray(t.config.fill.opacity)?t.config.fill.opacity[0]??1:t.config.fill.opacity??1,f=0,p=!1;this.negRange=this.helpers.checkColorRange();let m=e.slice();t.config.yaxis[0].reversed&&(p=!0,m.reverse());for(let h=p?0:m.length-1;p?h<m.length:h>=0;p?h++:h--){let p=n.group({class:`apexcharts-series apexcharts-heatmap-series`,seriesName:$.escapeString(t.seriesData.seriesNames[h]),rel:h+1,"data:realIndex":h});if(cg.addCollapsedClassToSeries(this.w,p,h),u||n.setupEventDelegation(p,`.apexcharts-heatmap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new ng(this.w).dropShadow(p,e,h)}let g=0,_=t.config.plotOptions.heatmap.shadeIntensity,v=Math.round(f/a),y=c===`hexagon`?(v%2==0?-1:1)*i/4:0,b=0;for(let r=0;r<t.globals.dataPoints;r++){if(!o&&t.seriesData.seriesX.length&&!t.globals.allSeriesHasEqualX&&t.globals.minX+t.globals.minXDiff*r<t.seriesData.seriesX[h][b]){g+=i;continue}if(b>=m[h].length)break;let v=o?s:i;if(o){let e=t.seriesData.seriesX[h]?t.seriesData.seriesX[h][b]:null;if(e==null||e!==e){b++;continue}g=(e-t.globals.minX)/this.xRatio-s/2}let x=this.helpers.getShadeColor(t.config.chart.type,h,b,this.negRange),S=x.color,C=x.colorProps;t.config.fill.type===`image`&&(S=new tg(this.w).fillPath({seriesNumber:h,dataPointIndex:b,opacity:t.globals.hasNegs?C.percent<0?1-(1+C.percent/100):_+C.percent/100:C.percent/100,patternID:$.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:v,height:t.config.fill.image.height?t.config.fill.image.height:a}));let w=this.rectRadius,T=t.config.plotOptions.heatmap.useFillColorAsStroke?S:t.globals.stroke.colors[0];if(u)l.drawRectCell(g,f,v,a,{fill:S,fillOpacity:d,stroke:T,strokeWidth:this.strokeWidth,radius:w,seriesIndex:h,dataPointIndex:b});else{let r=c===`rect`,i=r?n.drawRect(g,f,v,a,w):n.drawPath({d:this.cellShapePath(c,g+y,f,v,a),stroke:T,strokeWidth:this.strokeWidth,fill:S,fillOpacity:1});if(i.attr({cx:g+y,cy:f}),i.node.classList.add(`apexcharts-heatmap-rect`),p.add(i),i.attr({fill:S,i:h,index:h,j:b,val:e[h][b],"stroke-width":this.strokeWidth,stroke:T,color:S}),r||i.attr({width:v,height:a}),t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;if(t.globals.resized||(e=t.config.chart.animations.speed),r)this.animateHeatMap(i,g,f,v,a,e,h,b);else{let t=new Bh(this.w);t.animatePop(i,{speed:e,delay:this.enterStaggerDelay(e,h,b),onComplete:()=>{t.animationCompleted(i)}})}}if(t.globals.dataChanged){let e=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){e=this.dynamicAnim.speed;let n=t.globals.previousPaths[h]&&t.globals.previousPaths[h][b]&&t.globals.previousPaths[h][b].color;n||=`rgba(255, 255, 255, 0)`,this.animateHeatColor(i,$.isColorHex(n)?n:$.rgb2hex(n),$.isColorHex(S)?S:$.rgb2hex(S),e)}}}let E=t.config.dataLabels.formatter,D=E(t.seriesData.series[h][b],{value:t.seriesData.series[h][b],seriesIndex:h,dataPointIndex:b,w:t}),O=this.helpers.calculateDataLabels({text:D,x:g+y+v/2,y:f+a/2,i:h,j:b,colorProps:C,series:m});O!==null&&p.add(O),o||(g+=i),b++}f+=a,r.add(p)}let h=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?h.unshift(``):h.push(``),t.globals.yAxisScale[0].result=h,r}animateHeatMap(e,t,n,r,i,a,o=0,s=0){let c=new Bh(this.w),l=this.enterStaggerDelay(a,o,s);c.animateRect(e,{x:t+r/2,y:n+i/2,width:0,height:0},{x:t,y:n,width:r,height:i},a,()=>{c.animationCompleted(e)},l)}enterStaggerDelay(e,t,n){let r=this.w,i=r.config.chart.animations.animateGradually;if(!i||i.enabled===!1)return 0;let a=((r.seriesData.series||[]).length||1)+(r.globals.dataPoints||1)-2;return Vh({style:`diagonal`,index:n,row:t,col:n,baseDelay:Math.min(i.delay||0,e*.5/Math.max(1,a))})}cellShapePath(e,t,n,r,i){let a=t+r/2,o=n+i/2;if(e===`circle`){let e=Math.min(r,i)/2;return`M ${a-e} ${o} a ${e} ${e} 0 1 0 ${e*2} 0 a ${e} ${e} 0 1 0 ${-e*2} 0 Z`}if(e===`diamond`)return`M ${a} ${n} L ${t+r} ${o} L ${a} ${n+i} L ${t} ${o} Z`;let s=t+r;return`M ${a} ${n-i/6} L ${s} ${n+i/6} L ${s} ${n+i*5/6} L ${a} ${n+i*7/6} L ${t} ${n+i*5/6} L ${t} ${n+i/6} Z`}applyHexagonClipPath(e,t,n,r){let i=this.w,a=this.strokeWidth/2+2,o=`heatmapHexMask${i.globals.cuid}`,s=i.dom.elDefs.node,c=s.querySelector(`clipPath[id="${o}"]`);c&&c.parentNode&&c.parentNode.removeChild(c);let l=Q.createElementNS(r_,`clipPath`);l.setAttribute(`id`,o),l.appendChild(t.drawRect(-n/4-a,-r/6-a,i.layout.gridWidth+n/2+a*2,i.layout.gridHeight+r/3+a*2,0,`#fff`).node),s.appendChild(l),e.attr(`clip-path`,`url(#${o})`)}animateHeatColor(e,t,n,r){e.attr({fill:t}).animate(r).attr({fill:n})}},Jb=class{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){let n=this.w;if((n.config.fill.type===`gradient`||n.config.fill.type[e]===`gradient`)&&new Xh(this.lineCtx.w).seriesHaveSameValues(e)){let n=t[e].slice();n[n.length-1]=n[n.length-1]+1e-6,t[e]=n}return t}calculatePoints({series:e,realIndex:t,x:n,y:r,i,j:a,prevY:o}){let s=this.w,c=[],l=[],u=this.lineCtx.categoryAxisCorrection+s.config.markers.offsetX;return s.axisFlags.isXNumeric&&(u=(s.seriesData.seriesX[t][0]-s.globals.minX)/this.lineCtx.xRatio+s.config.markers.offsetX),a===0&&(c.push(u),l.push($.isNumber(e[i][0])?o+s.config.markers.offsetY:null)),c.push(n+s.config.markers.offsetX),l.push($.isNumber(e[i][a+1])?r+s.config.markers.offsetY:null),{x:c,y:l}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:n}){let r=this.w;for(let i=0;i<r.globals.previousPaths.length;i++){let a=r.globals.previousPaths[i];(a.type===`line`||a.type===`area`)&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(n,10)&&(a.type===`line`?(this.lineCtx.appendPathFrom=!1,e=r.globals.previousPaths[i].paths[0].d):a.type===`area`&&(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[i].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[i].paths[1]&&(e=r.globals.previousPaths[i].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:n,prevY:r,lineYPosition:i,translationsIndex:a}){let o=this.w,s=o.config.chart.stacked&&!o.globals.comboCharts||o.config.chart.stacked&&o.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[t]?.type===`bar`||this.w.config.series[t]?.type===`column`);if(n[e]?.[0]!==void 0){if(s)if(e>0){let e=this.lineCtx.stackTopAt(t,0);i=e===void 0?this.lineCtx.zeroY:e}else i=this.lineCtx.zeroY;else i=this.lineCtx.zeroY;r=i-n[e][0]/this.lineCtx.yRatio[a]+(this.lineCtx.isReversed?n[e][0]/this.lineCtx.yRatio[a]:0)*2}else if(s&&e>0&&n[e][0]===void 0){for(let t=e-1;t>=0;t--)if(n[t][0]!==null&&n[t][0]!==void 0){i=this.lineCtx.prevSeriesY[t][0],r=i;break}}return{prevY:r,lineYPosition:i}}};function Yb(e,t,n,r){let i=e.globals,a=i.prevStreamFrame;if(!a||!i.dataChanged||!e.axisFlags?.isXNumeric)return null;let o=a.seriesX[t],s=a.seriesY[t],c=e.seriesData.seriesX[t],l=e.seriesData.series[t];if(!o||!s||!c||!l||o.length<3||c.length<3)return null;let u=-1;for(let e=0;e<o.length;e++)if(o[e]===c[0]){u=e;break}if(u===-1)return null;let d=Math.min(o.length-u,c.length);if(d<2)return null;let f=c.length-d;if(u===0&&f===0)return null;for(let e=0;e<d;e++){if(o[u+e]!==c[e])return null;let t=s[u+e],n=l[e];if(t!==n&&!(t==null&&n==null))return null}let p=a.xPixels[t],m=a.yPixels[t];if(!p||!m)return null;let h=-1,g=-1;for(let e=0;e<d;e++)p[u+e]==null||m[u+e]==null||n[e]==null||r[e]==null||(h===-1&&(h=e),g=e);if(h===-1||g<=h)return null;let _=n[h],v=n[g],y=p[u+h],b=p[u+g];if(Math.abs(v-_)<1e-6)return null;let x=(b-y)/(v-_),S=y-x*_;if(!isFinite(x)||!isFinite(S)||Math.abs(x-1)>.02||Math.abs(S)<.5)return null;let C=h,w=h;for(let e=h;e<=g;e++){let t=r[e];t==null||m[u+e]==null||(t<r[C]&&(C=e),t>r[w]&&(w=e))}let T=1,E=0,D=r[C],O=r[w];if(Math.abs(O-D)>1e-6?(T=(m[u+w]-m[u+C])/(O-D),E=m[u+C]-T*D):E=m[u+C]-D,!isFinite(T)||!isFinite(E)||T<.2||T>5)return null;let k=Math.floor((h+g)/2);if(k!==h&&k!==g&&n[k]!=null&&p[u+k]!=null){let e=x*n[k]+S;if(Math.abs(e-p[u+k])>1.5)return null;if(r[k]!=null&&m[u+k]!=null){let e=T*r[k]+E;if(Math.abs(e-m[u+k])>1.5)return null}}return i.streamScrolled=!0,{ax:x,bx:S,ay:T,by:E}}var Xb=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Zb(e,t){let{ax:n,bx:r,ay:i,by:a}=t,o=[],s=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g,c;for(;(c=s.exec(e))!==null;){let e=c[1].toUpperCase(),t=(c[2].match(Xb)||[]).map(parseFloat);if(e===`Z`){o.push(`z`);continue}if(e===`H`){for(let e of t)o.push(`H ${n*e+r}`);continue}if(e===`V`){for(let e of t)o.push(`V ${i*e+a}`);continue}if(e===`A`){for(let e=0;e+6<t.length;e+=7)o.push(`A ${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${n*t[e+5]+r} ${i*t[e+6]+a}`);continue}let s=[];for(let e=0;e+1<t.length;e+=2)s.push(`${n*t[e]+r} ${i*t[e+1]+a}`);s.length&&o.push(`${e} ${s.join(` `)}`)}return o.join(` `)}var Qb=class{constructor(e,t,n,r){this.ctx=t,this.w=e,this.xyRatios=n,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!(this.w.config.chart.type!==`bubble`&&this.w.config.chart.type!==`scatter`)||r,this.scatter=new zh(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Jb(this),this.markers=new ig(this.w,this.ctx),this.prevSeriesY=[],this.prevSeriesYByX=new Map,this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null,this._elLastPointsWrap=null}draw(e,t,n,r){let i=this.w,a=new Z(this.w),o=i.globals.comboCharts?t:i.config.chart.type,s=a.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),c=new Xh(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;let l=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);let a=i.globals.comboCharts?n[t]:t,s=this.yRatio.length>1?a:0;this._initSerieVariables(e,t,a);let c=[],u=[],d=[],f=i.globals.padHorizontal+this.categoryAxisCorrection,p=[],m=[];cg.addCollapsedClassToSeries(this.w,this.elSeries,a),i.axisFlags.isXNumeric&&i.seriesData.seriesX.length>0&&(f=(i.seriesData.seriesX[a][0]-i.globals.minX)/this.xRatio),d.push(f);let h=f,g,_=h,v=this.zeroY,y=this.zeroY;v=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:e,prevY:v,lineYPosition:0,translationsIndex:s}).prevY,i.config.stroke.curve===`monotoneCubic`&&e[t][0]===null?c.push(null):c.push(v);let b=v,x;o===`rangeArea`&&(x=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:r,prevY:y,lineYPosition:0,translationsIndex:s}),y=x.prevY,g=y,u.push(c[0]===null?null:y));let S=this._calculatePathsFrom({type:o,series:e,i:t,realIndex:a,translationsIndex:s,prevX:_,prevY:v,prevY2:y}),C=[c[0]],w=[u[0]],T={type:o,series:e,realIndex:a,translationsIndex:s,i:t,x:f,y:1,pX:h,pY:b,pathsFrom:S,linePaths:p,areaPaths:m,seriesIndex:n,lineYPosition:0,xArrj:d,yArrj:c,y2Arrj:u,seriesRangeEnd:r},E=this._iterateOverDataPoints(X(Y({},T),{iterations:o===`rangeArea`?e[t].length-1:void 0,isRangeStart:!0}));if(o===`rangeArea`){let e=this._calculatePathsFrom({series:r,i:t,realIndex:a,prevX:_,prevY:y}),n=this._iterateOverDataPoints(X(Y({},T),{series:r,xArrj:[f],yArrj:C,y2Arrj:w,pY:g,areaPaths:E.areaPaths,pathsFrom:e,iterations:r[t].length-1,isRangeStart:!1})),i=E.linePaths.length/2;for(let e=0;e<i;e++)E.linePaths[e]=n.linePaths[e+i]+E.linePaths[e];E.linePaths.splice(i),E.pathFromLine=n.pathFromLine+E.pathFromLine}else /z\s*$/i.test(E.pathFromArea)||(E.pathFromArea+=`z`);this._handlePaths({type:o,realIndex:a,i:t,paths:E}),this.markers.flushBatch(this.elPointsMain,a),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(i.config.series[0]?.zIndex!==void 0&&l.sort((e,t)=>Number(e.node.getAttribute(`zIndex`))-Number(t.node.getAttribute(`zIndex`))),i.config.chart.stacked)for(let e=l.length-1;e>=0;e--)s.add(l[e]);else for(let e=0;e<l.length;e++)s.add(l[e]);return s}_initSerieVariables(e,t,n){let r=this.w,i=new Z(this.w);this.xDivision=r.layout.gridWidth/(r.globals.dataPoints-(r.config.xaxis.tickPlacement===`on`?1:0)),this.strokeWidth=Array.isArray(r.config.stroke.width)?r.config.stroke.width[n]:r.config.stroke.width;let a=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[n],a=n),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.layout.gridHeight-this.baseLineY[a]-(this.isReversed?r.layout.gridHeight:0)+(this.isReversed?this.baseLineY[a]*2:0),this.areaBottomY=this.zeroY,(this.zeroY>r.layout.gridHeight||r.config.plotOptions.area.fillTo===`end`)&&(this.areaBottomY=r.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;let o=r.config.series[n];if(this.elSeries=i.group({class:`apexcharts-series`,zIndex:o.zIndex===void 0?n:o.zIndex,seriesName:$.escapeString(r.seriesData.seriesNames[n])}),this.elPointsMain=i.group({class:`apexcharts-series-markers-wrap`,"data:realIndex":n}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,r.globals.hasNullValues){let e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[r.layout.gridHeight+r.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});e!==null&&this.elPointsMain.add(e)}this.elDataLabelsWrap=i.group({class:`apexcharts-datalabels`,"data:realIndex":n});let s=e[t].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":s,rel:t+1,"data:realIndex":n}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:n,realIndex:r,translationsIndex:i,prevX:a,prevY:o,prevY2:s}){let c=this.w,l=new Z(this.w),u,d,f,p;if(t[n][0]===null){for(let e=0;e<t[n].length;e++)if(t[n][e]!==null){a=this.xDivision*e,o=this.zeroY-t[n][e]/this.yRatio[i],u=l.move(a,o),d=l.move(a,this.areaBottomY);break}}else u=l.move(a,o),e===`rangeArea`&&(u=l.move(a,s)+l.line(a,o)),d=l.move(a,this.areaBottomY)+l.line(a,o);if(f=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),p=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),c.globals.previousPaths.length>0){let e=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:p,realIndex:r});f=e.pathFromLine,p=e.pathFromArea}return{prevX:a,prevY:o,linePath:u,areaPath:d,pathFromLine:f,pathFromArea:p}}_stackKey(e,t){if(!this.w.axisFlags.isXNumeric)return t;let n=this.w.seriesData.seriesX[e];return n?n[t]:void 0}stackTopAt(e,t){let n=this._stackKey(e,t);if(n!=null)return this.prevSeriesYByX.get(n)}_recordStackTops(e,t){let n=this.w;if(Array.isArray(t)&&!(n.globals.collapsedSeriesIndices.indexOf(e)!==-1||n.globals.ancillaryCollapsedSeriesIndices.indexOf(e)!==-1))for(let n=0;n<t.length;n++){let r=this._stackKey(e,n);if(r==null)continue;let i=t[n];$.isNumber(i)&&this.prevSeriesYByX.set(r,i)}}_handlePaths({type:e,realIndex:t,i:n,paths:r}){let i=this.w,a=new Z(this.w),o=Jv(this.ctx,a),s=new tg(this.w);this.prevSeriesY.push(r.yArrj),this._recordStackTops(t,r.yArrj);let c=null;(e===`line`||e===`area`)&&i.globals.dataChanged&&(c=Yb(i,t,r.xArrj,r.yArrj));let l=null;!c&&(e===`line`||e===`area`)&&(l=bb(i,{type:e,realIndex:t,pathFromLine:r.pathFromLine,pathFromArea:r.pathFromArea,linePaths:r.linePaths,areaPaths:r.areaPaths})),i.globals.seriesXvalues[t]=r.xArrj,i.globals.seriesYvalues[t]=r.yArrj;let u=i.config.forecastDataPoints;if(u.count>0&&e!==`rangeArea`){let e=i.globals.seriesXvalues[t][i.globals.seriesXvalues[t].length-u.count-1],n=a.drawRect(e,0,i.layout.gridWidth,i.layout.gridHeight,0);i.dom.elForecastMask.appendChild(n.node);let r=a.drawRect(0,0,e,i.layout.gridHeight,0);i.dom.elNonForecastMask.appendChild(r.node)}this.pointsChart?yb(i,{elPointsMain:this.elPointsMain,realIndex:t,speed:i.config.chart.animations.dynamicAnimation.speed}):(i.globals.delayedElements.push({el:this.elPointsMain.node,index:t}),yb(i,{elPointsMain:this.elPointsMain,realIndex:t,speed:i.config.chart.animations.dynamicAnimation.speed}),gb(i,t)&&this.elDataLabelsWrap?.node&&(this.elDataLabelsWrap.node.classList.add(`apexcharts-element-hidden`),i.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));let d={i:n,realIndex:t,animationDelay:n,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`},f=r.numericXY,p=e===`line`||e===`area`,m=p&&r.linePaths.length>1?[r.linePaths.join(` `)]:r.linePaths,h=p&&r.areaPaths.length>1?[r.areaPaths.join(` `)]:r.areaPaths;if(e===`area`){let e=s.fillPath({seriesNumber:t});for(let t=0;t<h.length;t++){let n=o.renderPaths(X(Y({},d),{pathFrom:c?Zb(r.areaPaths[t],c):l?.area?.from??r.pathFromArea,pathTo:h[t],pathToNumeric:f?{xs:f.xs,ys:f.ys,closeY:f.areaCloseY}:void 0,pathToInterp:l?.area?.toInterp,scrollMorph:!!c,stroke:`none`,strokeWidth:0,strokeLineCap:null,fill:e}));this.elSeries.add(n)}}if(i.config.stroke.show&&!this.pointsChart){let a=null;if(e===`line`)a=s.fillPath({seriesNumber:t,i:n});else if(i.config.stroke.fill.type===`solid`)a=i.globals.stroke.colors[t];else{let e=i.config.fill;i.config.fill=i.config.stroke.fill,a=s.fillPath({seriesNumber:t,i:n}),i.config.fill=e}for(let n=0;n<m.length;n++){let p=a;e===`rangeArea`&&(p=s.fillPath({seriesNumber:t}));let h=X(Y({},d),{pathFrom:c?Zb(r.linePaths[n],c):l?.line?.from??r.pathFromLine,pathTo:m[n],pathToNumeric:f?{xs:f.xs,ys:f.ys}:void 0,pathToInterp:l?.line?.toInterp,scrollMorph:!!c,stroke:a,strokeWidth:this.strokeWidth,strokeLineCap:i.config.stroke.lineCap,fill:e===`rangeArea`?p:`none`}),g=o.renderPaths(h);if(this.elSeries.add(g),g.attr(`fill-rule`,`evenodd`),u.count>0&&e!==`rangeArea`){let e=o.renderPaths(h);e.node.setAttribute(`stroke-dasharray`,u.dashArray),u.strokeWidth&&e.node.setAttribute(`stroke-width`,u.strokeWidth),this.elSeries.add(e),e.attr(`clip-path`,`url(#forecastMask${i.globals.cuid})`),g.attr(`clip-path`,`url(#nonForecastMask${i.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:n,realIndex:r,translationsIndex:i,i:a,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,seriesIndex:p,lineYPosition:m,xArrj:h,yArrj:g,y2Arrj:_,isRangeStart:v,seriesRangeEnd:y}){let b=this.w,x=new Z(this.w),S=this.yRatio,{prevY:C,linePath:w,areaPath:T,pathFromLine:E,pathFromArea:D}=u,O=$.isNumber(b.globals.minYArr[r])?b.globals.minYArr[r]:b.globals.minY;n||=b.globals.dataPoints>1?b.globals.dataPoints-1:b.globals.dataPoints;let k=(e,t)=>t-e/S[i]+(this.isReversed?e/S[i]:0)*2,A=s,j=b.config.chart.stacked&&!b.globals.comboCharts||b.config.chart.stacked&&b.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[r]?.type===`bar`||this.w.config.series[r]?.type===`column`),ee=b.config.stroke.curve;Array.isArray(ee)&&(ee=Array.isArray(p)?ee[p[a]]:ee[a]);let te=0,M,N=this.pointsChart?this._scatterJitterPx(r):null;if(ee===`straight`&&!this.pointsChart){let p=this._fastStraightPath({type:e,series:t,i:a,realIndex:r,translationsIndex:i,iterations:n,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,xArrj:h,yArrj:g,y2Arrj:_,stackSeries:j});if(p)return p}for(let i=0;i<n&&t[a].length!==0;i++){let u=t[a][i+1]===void 0||t[a][i+1]===null;if(b.axisFlags.isXNumeric){let e=b.seriesData.seriesX[r][i+1];b.seriesData.seriesX[r][i+1]===void 0&&(e=b.seriesData.seriesX[r][n-1]),o=(e-b.globals.minX)/this.xRatio}else o+=this.xDivision;if(j)if(a>0&&b.globals.collapsedSeries.length<b.config.series.length-1)if((e=>{for(let t=e;t>=0;t--){let e=p?.[t]??t;if(b.globals.collapsedSeriesIndices.indexOf(e)===-1&&b.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1)return t}return-1})(a-1)<0)m=this.zeroY;else{let e=this.stackTopAt(r,i+1);m=e===void 0?this.zeroY:e}else m=this.zeroY;else m=this.zeroY;u?s=k(O,m):(s=k(t[a][i+1],m),e===`rangeArea`&&(A=k(y[a][i+1],m)));let S=o,ne=s;if(N){let e=r*100003+(i+1);N.x&&(S=o+(Mb(e*7919+13)-.5)*2*N.x),N.y&&(ne=s+(Mb(e*6271+97)-.5)*2*N.y)}h.push(t[a][i+1]===null?null:S),u&&(b.config.stroke.curve===`smooth`||b.config.stroke.curve===`monotoneCubic`)?(g.push(null),_.push(null)):(g.push(ne),_.push(A));let re=this.lineHelpers.calculatePoints({series:t,x:S,y:ne,realIndex:r,i:a,j:i,prevY:C}),P=this._createPaths({type:e,series:t,i:a,j:i,x:o,y:s,y2:A,xArrj:h,yArrj:g,y2Arrj:_,pX:c,pY:l,pathState:te,segmentStartX:M,linePath:w,areaPath:T,linePaths:d,areaPaths:f,curve:ee,isRangeStart:v});f=P.areaPaths,d=P.linePaths,c=P.pX,l=P.pY,te=P.pathState,M=P.segmentStartX,T=P.areaPath,w=P.linePath,this.appendPathFrom&&!b.globals.hasNullValues&&!(ee===`monotoneCubic`&&e===`rangeArea`)&&(E+=x.line(o,this.areaBottomY),D+=x.line(o,this.areaBottomY)),this.handleNullDataPoints(t,re,a,i,r),this._handleMarkersAndLabels({type:e,pointsPos:re,i:a,j:i,realIndex:r,isRangeStart:v})}return{yArrj:g,xArrj:h,pathFromArea:D,areaPaths:f,pathFromLine:E,linePaths:d,linePath:w,areaPath:T}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:n,i:r,j:i,realIndex:a}){let o=this.w,s=new $h(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,i,{realIndex:a,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!o.globals.dataChanged&&!o.globals.resized&&!o.globals.markers.batched)&&o.seriesData.series[r].length>1&&this.elPointsMain.node.classList.add(`apexcharts-element-hidden`);let e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:a,j:i+1});e!==null&&e!==this._elLastPointsWrap&&(this.elPointsMain.add(e),this._elLastPointsWrap=e)}let c=s.drawDataLabel({type:e,isRangeStart:n,pos:t,i:a,j:i+1});c!==null&&this.elDataLabelsWrap.add(c)}_scatterJitterPx(e){let t=this.w,n=t.config.plotOptions.scatter?.jitter;if(!n||!n.enabled||!n.x&&!n.y)return null;let r=t.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,i=this.yRatio.length>1?e:0,a=this.yRatio[i]?1/this.yRatio[i]:0;return{x:(n.x||0)*r,y:(n.y||0)*a}}_fastStraightPath({type:e,series:t,i:n,realIndex:r,translationsIndex:i,iterations:a,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,xArrj:p,yArrj:m,y2Arrj:h,stackSeries:g}){let _=this.w;if(e!==`line`&&e!==`area`||_.globals.comboCharts||g||_.config.dataLabels.enabled||_.config.markers.discrete.length||_.globals.markers.size[r]>0)return null;let v=t[n],y=v.length;if(!a||y<2||y-1!==a)return null;for(let e=0;e<=a;e++)if(v[e]==null)return null;let b=_.axisFlags.isXNumeric,x=b?_.seriesData.seriesX[r]:null;if(b&&(!x||x.length<y))return null;let S=this.yRatio[i],C=this.isReversed,w=this.zeroY,T=this.areaBottomY,E=this.xRatio,D=_.globals.minX,O=this.xDivision,k=_.config.markers.offsetX,A=_.config.markers.offsetY,j=this.appendPathFrom&&!_.globals.hasNullValues,{pathFromLine:ee,pathFromArea:te}=u,M=this.ctx&&this.ctx.renderer,N=!!(M&&M.kind&&M.kind!==`svg`),ne=!N||_.globals.dataChanged&&!!_.globals.prevStreamFrame,re=N?new Float64Array(y):null,P=N?new Float64Array(y):null;re&&P&&(re[0]=c,P[0]=l),_.globals.pointsArray[r]===void 0&&(_.globals.pointsArray[r]=[]);let ie=_.globals.pointsArray[r],ae=x?(x[0]-D)/E+k:this.categoryAxisCorrection+k;ie.push([ae,u.prevY+A]);let oe=ne?Array(a+1):[];ne&&(oe[0]=`M `+c+` `+l);let se=ne&&j?Array(a):null,ce=o,le=c,ue=l;for(let e=0;e<a;e++){x?le=(x[e+1]-D)/E:(ce+=O,le=ce);let t=v[e+1];ue=w-t/S+(C?t/S:0)*2,p.push(le),m.push(ue),h.push(s),ie.push([le+k,ue+A]),ne&&(oe[e+1]=` L `+le+` `+ue,se&&(se[e]=` L `+le+` `+T)),re&&P&&(re[e+1]=le,P[e+1]=ue)}let F=``,de=``;if(ne&&(F=oe.join(``),de=F+` L `+le+` `+T+` L `+c+` `+T+`z`),se){let e=se.join(``);ee+=e,te+=e}else !ne&&j&&(ee+=` L `+le+` `+T,te+=` L `+le+` `+T);return d.push(F),f.push(de),{yArrj:m,xArrj:p,pathFromArea:te,areaPaths:f,pathFromLine:ee,linePaths:d,linePath:F,areaPath:de,numericXY:re?{xs:re,ys:P,areaCloseY:T}:void 0}}_createPaths({type:e,series:t,i:n,j:r,x:i,y:a,xArrj:o,yArrj:s,y2:c,y2Arrj:l,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h,linePaths:g,areaPaths:_,curve:v,isRangeStart:y}){let b=new Z(this.w),x=this.areaBottomY,S=e===`rangeArea`,C=e===`rangeArea`&&y;switch(v){case`monotoneCubic`:{let e=y?s:l,i=(e,t)=>e.map((e,n)=>[e,t[n]]).filter(e=>e[1]!==null),a=e=>{let t=[],n=0;return e.forEach(e=>{e===null?n>0&&(t.push(n),n=0):n++}),n>0&&t.push(n),t},c=(e,t)=>{let n=a(e),r=[];for(let e=0,i=0;e<n.length;i+=n[e++])r[e]=Rb.slice(t,i,i+n[e]);return r};switch(f){case 0:if(e[r+1]===null)break;f=1;case 1:if(!(S?o.length===t[n].length:r===t[n].length-2))break;case 2:{let t=y?o:o.slice().reverse(),n=y?e:e.slice().reverse(),r=i(t,n),a=r.length>1?Rb.points(r):r,s=[];S&&(C?_=r:s=_.reverse());let l=0,u=0;if(c(n,a).forEach(e=>{l++;let t=Lb(e),n=u;u+=e.length;let i=u-1;C?m=b.move(r[n][0],r[n][1])+t:S?m=b.move(s[n][0],s[n][1])+b.line(r[n][0],r[n][1])+t+b.line(s[i][0],s[i][1]):(m=b.move(r[n][0],r[n][1])+t,h=m+b.line(r[i][0],x)+b.line(r[n][0],x)+`z`,_.push(h)),g.push(m)}),S&&l>1&&!C){let e=g.slice(l).reverse();g.splice(l),e.forEach(e=>g.push(e))}f=0;break}}break}case`smooth`:{let e=(i-u)*.35;if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||t[n][r+1]===void 0){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=b.curve(u+e,d,i-e,a,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)C?m+=b.line(u,c):m+=b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=b.curve(u+e,d,i-e,a,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.curve(i,a,i,a,i,c)+b.move(i,c)),h+=b.curve(i,a,i,a,i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}break}u=i,d=a;break}default:{let e=(e,t,n)=>{let r=``;switch(e){case`stepline`:r=b.line(t,null,`H`)+b.line(null,n,`V`);break;case`linestep`:r=b.line(null,n,`V`)+b.line(t,null,`H`);break;case`straight`:r=b.line(t,n);break}return r};if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||t[n][r+1]===void 0){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=e(v,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)C?m+=b.line(u,c):m+=b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=e(v,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.line(i,c)),h+=b.line(i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}break}u=i,d=a;break}}return{linePaths:g,areaPaths:_,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h}}handleNullDataPoints(e,t,n,r,i){let a=this.w;if(e[n][r]===null&&a.config.markers.showNullDataPoints||e[n].length===1){let e=this.strokeWidth-a.config.markers.strokeWidth/2;e>0||(e=0);let n=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:i,j:r+1,pSize:e,alwaysDrawMarker:!0});n!==null&&this.elPointsMain.add(n)}}};function $b(e,t){let{lines:n,lineHeight:r,anchor:i,elbow:a,labelX:o,labelY:s,side:c,connector:l,style:u,foreColor:d}=t,f=new Z(e),p=f.group({class:t.groupClass||`apexcharts-outer-label-group`});if(l.show){let e=`M ${i.x} ${i.y} L ${a.x} ${a.y} L ${o} ${s}`,n=f.drawPath({d:e,stroke:l.color,strokeWidth:l.width,fill:`none`,strokeLinecap:`round`});n.node.classList.add(t.connectorClass||`apexcharts-outer-label-connector`),p.add(n)}let m=c===`right`?o+4:o-4,h=n.length,g=s-(h-1)*r/2,_=f.drawText({x:m,y:g,text:h===1?n[0]:n,textAnchor:c===`right`?`start`:`end`,fontSize:u.fontSize,fontFamily:u.fontFamily,fontWeight:u.fontWeight,foreColor:d,dominantBaseline:`central`,cssClass:t.textClass||`apexcharts-outer-label`});if(h>1){let e=_.node.getElementsByTagName(`tspan`);for(let t=0;t<e.length;t++)e[t].setAttribute(`x`,`${m}`),e[t].setAttribute(`dy`,t===0?`0`:`${r}`)}return p.add(_),p}function ex(e,t,n={}){let r=new Z(e),i=n.fontSize||`12px`,a=parseFloat(i)||12,o=0;return t.forEach(e=>{if(e==null||e===``)return;let t=`${e}`,s=r.getTextRects(t,i,n.fontFamily,``).width;o=Math.max(o,s>0?s:t.length*a*.58)}),o}function tx(e,t,n,r){let i=e.slice().sort((e,t)=>e.idealY-t.idealY);i.forEach(e=>{e.labelY=e.idealY});for(let e=1;e<i.length;e++)i[e].labelY-i[e-1].labelY<t&&(i[e].labelY=i[e-1].labelY+t);let a=i[i.length-1],o=a?a.labelY-n:0;if(o>0)for(let e=i.length-1;e>=0;e--)i[e].labelY-=o,e<i.length-1&&i[e+1].labelY-i[e].labelY<t&&(i[e].labelY=i[e+1].labelY-t);if(r!=null&&i.length&&i[0].labelY<r){let e=r-i[0].labelY;for(let t=0;t<i.length;t++)i[t].labelY+=e}}var nx=class{constructor(e){this.w=e}drawYAxisTexts(e,t,n,r){let i=this.w,a=i.config.yaxis[0],o=i.formatters.yLabelFormatters[0];return new Z(this.w).drawText({x:e+a.labels.offsetX,y:t+a.labels.offsetY,text:o(r,n),textAnchor:`middle`,fontSize:a.labels.style.fontSize,fontFamily:a.labels.style.fontFamily,foreColor:Array.isArray(a.labels.style.colors)?a.labels.style.colors[n]:a.labels.style.colors})}getMaxLabelWidth(e,{fontSize:t,fontFamily:n}={}){let r=new Z(this.w),i=0;return e.forEach(e=>{if(e==null||e===``)return;let a=r.getTextRects(`${e}`,t||`12px`,n,``);i=Math.max(i,a.width)}),i}drawExternalLabel(e){return $b(this.w,X(Y({},e),{groupClass:`apexcharts-pie-name-label-group`,textClass:`apexcharts-pie-name-label`,connectorClass:`apexcharts-pie-label-connector`}))}},rx=Math.PI/180,ix=180/Math.PI;function ax(e,t,n,r){return{x:e+n*Math.cos((r-90)*rx),y:t+n*Math.sin((r-90)*rx)}}var ox=e=>`${e.x} ${e.y}`;function sx({cx:e,cy:t,rIn:n,rOut:r,a0:i,a1:a,r:o,spanDeg:s}){let c=(n,r)=>ax(e,t,n,r),l=o/r*ix,u=o/n*ix,d=c(r,i+l),f=c(r,a-l),p=s-2*l>180?1:0,m=c(r,a),h=c(r-o,a),g=c(r,i),_=c(r-o,i),v=c(n,a-u),y=c(n,i+u),b=s-2*u>180?1:0,x=c(n,a),S=c(n+o,a),C=c(n,i),w=c(n+o,i);return[`M`,ox(d),`A`,r,r,0,p,1,ox(f),`Q`,ox(m),ox(h),`L`,ox(S),`Q`,ox(x),ox(v),`A`,n,n,0,b,0,ox(y),`Q`,ox(C),ox(w),`L`,ox(_),`Q`,ox(g),ox(d),`Z`].join(` `)}function cx({cx:e,cy:t,rOut:n,a0:r,a1:i,r:a,spanDeg:o}){let s=(n,r)=>ax(e,t,n,r),c=a/n*ix,l=s(n,r+c),u=s(n,i-c),d=o-2*c>180?1:0,f=s(n,i),p=s(n-a,i),m=s(n,r),h=s(n-a,r);return[`M`,ox(l),`A`,n,n,0,d,1,ox(u),`Q`,ox(f),ox(p),`L`,`${e} ${t}`,`L`,ox(h),`Q`,ox(m),ox(l),`Z`].join(` `)}function lx({cx:e,cy:t,rIn:n,rOut:r,a0:i,a1:a,spanDeg:o}){let s=(n,r)=>ax(e,t,n,r),c=o>180?1:0,l=s(r,i),u=s(r,a),d=s(n,a),f=s(n,i);return[`M`,ox(l),`A`,r,r,0,c,1,ox(u),`L`,ox(d),`A`,n,n,0,c,0,ox(f),`Z`].join(` `)}var ux=`transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)`,dx=`opacity 180ms ease-out`,fx=class{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=Math.min(e.layout.gridWidth,e.layout.gridHeight),this.centerY=e.layout.gridHeight/2,this.centerX=e.layout.gridWidth/2,e.config.chart.type===`radialBar`?this.fullAngle=360:this.fullAngle=Math.abs(e.config.plotOptions.pie.endAngle-e.config.plotOptions.pie.startAngle),this.initialAngle=e.config.plotOptions.pie.startAngle%this.fullAngle,e.globals.radialSize=this.defaultSize/2.05-e.config.stroke.width-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.externalCfg=e.config.plotOptions.pie.dataLabels.external;let n=e.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||n.fontSize,fontFamily:this.externalCfg.fontFamily||n.fontFamily,fontWeight:this.externalCfg.fontWeight||n.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,e.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&this.chartType!==`polarArea`,this.showExternalLabels&&!e.globals.noData&&this.reserveExternalLabelSpace(),this.donutSize=e.globals.radialSize*parseInt(e.config.plotOptions.pie.donut.size,10)/100;let r=e.config.plotOptions.pie.customScale,i=e.layout.gridWidth/2,a=e.layout.gridHeight/2;this.translateX=i-i*r,this.translateY=a-a*r,this.dataLabelsGroup=new Z(this.w).group({class:`apexcharts-datalabels-group`,transform:`translate(${this.translateX}, ${this.translateY}) scale(${r})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSliceSizes=[],this.sliceLabelGroups={},this.externalLabelGroups={},this.elHoverOutline=null,this.elHoverOutlinePath=null,this.hoverOutlineIndex=-1,this.prevSectorAngleArr=[]}getExternalLabelText(e){let t=this.w,n=t.seriesData.seriesNames[e],r=this.externalCfg.formatter;return typeof r==`function`?r(n,{seriesIndex:e,percent:t.globals.seriesPercent?.[e]?.[0],value:t.globals.seriesTotals?.[e],w:t}):n==null?``:`${n}`}getExternalLabelLines(e){let t=this.getExternalLabelText(e);return(Array.isArray(t)?t:`${t??``}`.split(`
|
|
2525
|
-
`)).map(e=>e==null?``:`${e}`)}reserveExternalLabelSpace(){let e=this.w,t=new nx(e),n=(e.seriesData.seriesNames||[]).map((e,t)=>this.getExternalLabelLines(t)),r=t.getMaxLabelWidth(n.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=n.reduce((e,t)=>Math.max(e,t.length),1),this.externalLabelLineH=Math.round((parseFloat(this.externalLabelStyle.fontSize)||12)*1.35);let i=this.externalCfg.connector,a=this.externalLabelMaxLines*this.externalLabelLineH,o=r+(i.length||0)+(i.gap||0)+12,s=a/2+(i.gap||0)+6,c=Math.min(e.globals.radialSize,e.layout.gridWidth/2-o,e.layout.gridHeight/2-s);e.globals.radialSize=Math.max(c,this.defaultSize*.15),e.globals.pieExternalLabelMarginY=s;let l=e.config.chart.height?String(e.config.chart.height):``;this.centerY=l!==``&&l!==`auto`?e.layout.gridHeight/2:e.globals.radialSize+s}draw(e){let t=this,n=this.w,r=new Z(this.w),i=r.group({class:`apexcharts-pie`});if(n.globals.noData)return i;let a=0;for(let t=0;t<e.length;t++)a+=$.negToZero(e[t]);let o=[],s=r.group();a===0&&(a=1e-5),e.forEach(e=>{this.maxY=Math.max(this.maxY,e)}),n.config.yaxis[0].max&&(this.maxY=n.config.yaxis[0].max),n.config.grid.position===`back`&&this.chartType===`polarArea`&&this.drawPolarElements(i);let c=n.globals.collapsedSeriesIndices||[],l=1;if(this.chartType===`polarArea`){let t=0;for(let n=0;n<e.length;n++)c.indexOf(n)===-1&&t++;l=Math.max(1,t)}for(let t=0;t<e.length;t++){let r=this.fullAngle*$.negToZero(e[t])/a;o.push(r),this.chartType===`polarArea`?(o[t]=c.indexOf(t)>-1?0:this.fullAngle/l,this.sliceSizes.push(n.globals.radialSize*e[t]/(this.maxY||1))):this.sliceSizes.push(n.globals.radialSize)}let u=this.ctx.morphTypeChange?.isActive()===!0;if(n.globals.dataChanged&&!u)if(this.chartType===`polarArea`){let e=n.globals.previousPaths,t=n.globals.prevPolarAngles;if(Array.isArray(t)&&t.length===e.length)this.prevSectorAngleArr=t.slice();else for(let t=0;t<e.length;t++)this.prevSectorAngleArr.push(this.fullAngle/Math.max(1,e.length));let r=0;for(let t=0;t<e.length;t++)r=Math.max(r,$.negToZero(e[t]));n.config.yaxis[0].max&&(r=n.config.yaxis[0].max),this.prevSliceSizes=e.map(e=>n.globals.radialSize*$.negToZero(e)/(r||1))}else{let e=0;for(let t=0;t<n.globals.previousPaths.length;t++)e+=$.negToZero(n.globals.previousPaths[t]);let t;for(let r=0;r<n.globals.previousPaths.length;r++)t=this.fullAngle*$.negToZero(n.globals.previousPaths[r])/e,this.prevSectorAngleArr.push(t)}if(this.chartType===`polarArea`&&(n.globals.prevPolarAngles=o.slice()),this.donutSize<0&&(this.donutSize=0),this.chartType===`donut`){let e=r.drawCircle(this.donutSize);e.attr({cx:this.centerX,cy:this.centerY,fill:n.config.plotOptions.pie.donut.background?n.config.plotOptions.pie.donut.background:`transparent`}),s.add(e)}let d=t.drawArcs(o,e);if(this.sliceLabels.forEach(e=>{d.add(e)}),s.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${n.config.plotOptions.pie.customScale})`}),s.add(d),i.add(s),this.donutDataLabels.show){let e=this.initialAnim&&!n.globals.resized&&!n.globals.dataChanged&&this.animDur>0,t=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:e?0:this.donutDataLabels.show});if(e){let e=this.dataLabelsGroup.node;e.style.transition=`opacity 280ms ease-out`,setTimeout(()=>{e.style.opacity=`1`},this.animDur)}i.add(t)}return n.config.grid.position===`front`&&this.chartType===`polarArea`&&this.drawPolarElements(i),i}drawArcs(e,t){var n,r;let i=this.w,a=new ng(this.w),o=new Z(this.w),s=new tg(this.w),c=o.group({class:`apexcharts-slices`});this.elHoverOutline=o.group({class:`apexcharts-pie-hover-outline`}),this.elHoverOutline.node.style.pointerEvents=`none`,this.elHoverOutline.node.style.opacity=`0`,i.config.chart.animations.enabled&&(this.elHoverOutline.node.style.transition=dx),c.add(this.elHoverOutline);let l=this.initialAngle,u=this.initialAngle,d=this.initialAngle,f=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;let p=this.ctx.morphTypeChange?.isActive()===!0;for(let m=0;m<e.length;m++){let h=o.group({class:`apexcharts-series apexcharts-pie-series`,seriesName:$.escapeString(i.seriesData.seriesNames[m]),rel:m+1,"data:realIndex":m});c.add(h),l=d,u=f,d=l+e[m],f=u+this.prevSectorAngleArr[m];let g=d<l?this.fullAngle+d-l:d-l,_=s.fillPath({seriesNumber:m,size:this.sliceSizes[m],value:t[m]}),v=p?this.ctx.morphTypeChange.getInitialPathFor(m,0):null,y=this.chartType===`polarArea`&&i.globals.dataChanged&&!p?this.prevSliceSizes[m]||0:void 0,b=v||this.getChangedPath(u,f,y),x=o.drawPath({d:b,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[m]??this.lineColorArr[m%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:_,fillOpacity:i.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${m}`});if(x.attr({index:0,j:m}),a.setSelectionFilter(x,0,m),i.config.chart.dropShadow.enabled){let e=i.config.chart.dropShadow;a.dropShadow(x,e,m)}this.addListeners(x,this.donutDataLabels,m);let S={x:0,y:0},C=(l+g/2)%this.fullAngle,w={x:this.centerX,y:this.centerY};this.chartType===`pie`||this.chartType===`polarArea`?(S=$.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,C),w=$.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/2,C)):this.chartType===`donut`&&(S=$.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,C),w=$.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2,C)),Z.setAttrs(x.node,{"data:angle":g,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":t[m],"data:cx":w.x,"data:cy":w.y}),h.add(x);let T=!1;if(p){let e=this.getPiePath({me:this,startAngle:l,angle:g,size:this.sliceSizes[m]});x.node.setAttribute(`data:pathFinal`,e),T=(n=this.ctx.morphTypeChange).claimsTargetMark?.call(n,m,0)===!0,T&&(x.attr({d:e}),x.node.setAttribute(`data:pathOrig`,e),x.node.setAttribute(`opacity`,`0`),x.node.setAttribute(`data-piece-hidden`,`1`))}let E=0;if(this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged?(E=g/this.fullAngle*i.config.chart.animations.speed,E===0&&(E=1),this.animDur=E+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),!T)if(p&&v){let e=this.getPiePath({me:this,startAngle:l,angle:g,size:this.sliceSizes[m]}),t=this.ctx.morphTypeChange.getSpeed(),n=this.ctx.animations;x.node.setAttribute(`data:pathOrig`,e);let r=x.animate(t).plot(e,`polygons`).attr({"stroke-width":this.strokeWidth});r&&typeof r.after==`function`?r.after(()=>n.animationCompleted(x)):n.animationCompleted(x)}else this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(x,{size:this.sliceSizes[m],prevSize:y,endAngle:d,startAngle:l,prevStartAngle:u,prevEndAngle:f,animateStartingPos:!0,i:m,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(x,{size:this.sliceSizes[m],endAngle:d,startAngle:l,i:m,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:E});if(this.getExpandOffset()>0?x.node.addEventListener(`mouseup`,this.pieClicked.bind(this,m)):m===0&&ng.drilldownBlocksSliceOffset(i)&&((r=this.ctx.drilldown)==null||r.warnSliceOffsetDisabled()),i.interact.selectedDataPoints[0]!==void 0&&i.interact.selectedDataPoints[0].indexOf(m)>-1)if(this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged&&this.animDur>0){let e=this,t=m;setTimeout(()=>e.pieClicked(t,{animate:!1}),this.animDur)}else this.pieClicked(m,{animate:!1});if(i.config.dataLabels.enabled){let t=S.x,n=S.y,r=100*g/this.fullAngle+`%`;if(g!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[m]){let e=i.config.dataLabels.formatter;e!==void 0&&(r=e(i.globals.seriesPercent[m][0],{seriesIndex:m,w:i}));let s=i.globals.dataLabels.style.colors[m],c=o.group({class:`apexcharts-datalabels`}),l=o.drawText({x:t,y:n,text:r,textAnchor:`middle`,fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:s});if(c.add(l),i.config.dataLabels.dropShadow.enabled){let e=i.config.dataLabels.dropShadow;a.dropShadow(l,e)}l.node.classList.add(`apexcharts-pie-label`),i.config.chart.animations.animate&&i.globals.resized===!1&&(l.node.classList.add(`apexcharts-pie-label-delay`),l.node.style.animationDelay=i.config.chart.animations.speed/940+`s`),this.sliceLabels.push(c),this.sliceLabelGroups[m]=c.node}}if(this.showExternalLabels&&g!==0){let e=this.getExternalLabelLines(m);if(e.some(e=>e!==``)){let t=$.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,C),n=$.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize+(this.externalCfg.connector.gap||0),C),r=n.x>=this.centerX,a=r?n.x+(this.externalCfg.connector.length||0):n.x-(this.externalCfg.connector.length||0);this.externalLabels.push({i:m,lines:e,anchor:t,elbow:n,side:r?`right`:`left`,labelX:a+parseFloat(this.externalCfg.offsetX||0),idealY:n.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||i.globals.colors[m],foreColor:this.externalCfg.color||i.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();let e=d_.isBrowser()&&(p||this.dynamicAnim&&i.globals.dataChanged||this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged);this.externalLabels.forEach(t=>{let n=new nx(i).drawExternalLabel({lines:t.lines,lineHeight:this.externalLabelLineH,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:t.connectorColor},style:this.externalLabelStyle,foreColor:t.foreColor});e&&(n.node.classList.add(`apexcharts-element-hidden`),i.globals.delayedElements.push({el:n.node})),this.externalLabelGroups[t.i]=n.node,c.add(n)})}return c}placeExternalLabels(){let e=this.w,t=this.externalLabelMaxLines*this.externalLabelLineH+2,n=this.centerY+e.globals.radialSize+e.globals.pieExternalLabelMarginY;[`left`,`right`].forEach(e=>{tx(this.externalLabels.filter(t=>t.side===e),t,n)})}addListeners(e,t,n){let r=new Z(this.w,this.ctx);e.node.addEventListener(`mouseenter`,r.pathMouseEnter.bind(r,e)),e.node.addEventListener(`mouseleave`,r.pathMouseLeave.bind(r,e)),e.node.addEventListener(`mouseleave`,this.revertDataLabelsInner.bind(this)),typeof n==`number`&&(e.node.addEventListener(`mouseenter`,this.showHoverOutline.bind(this,n)),e.node.addEventListener(`mouseleave`,this.hideHoverOutline.bind(this))),e.node.addEventListener(`mousedown`,r.pathMouseDown.bind(r,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener(`mouseenter`,this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener(`mousedown`,this.printDataLabelsInner.bind(this,e.node,t)))}animatePaths(e,t){let n=this.w,r=this,i=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,a=i,o=t.startAngle,s=t.startAngle;t.prevStartAngle!==void 0&&t.prevEndAngle!==void 0&&(o=t.prevEndAngle,a=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===n.config.series.length-1&&(i+s>this.fullAngle?t.endAngle-=i+s:i+s<this.fullAngle&&(t.endAngle+=this.fullAngle-(i+s))),i===this.fullAngle&&(i=this.fullAngle-.01),r.animateArc(e,o,s,i,a,t)}animateArc(e,t,n,r,i,a){let o=this,s=this.w,c=new Bh(this.w),l=a.size,u;(isNaN(t)||isNaN(i))&&(t=n,i=r,a.dur=0);let d=r,f=n,p=t<n?this.fullAngle+t-n:t-n,m=typeof a.prevSize==`number`;s.globals.dataChanged&&a.shouldSetPrevPaths&&a.prevEndAngle&&(u=o.getPiePath({me:o,startAngle:a.prevStartAngle,angle:a.prevEndAngle<a.prevStartAngle?this.fullAngle+a.prevEndAngle-a.prevStartAngle:a.prevEndAngle-a.prevStartAngle,size:m?a.prevSize:l}),e.attr({d:u})),a.dur===0?(u=o.getPiePath({me:o,startAngle:f,angle:r,size:l}),a.isTrack||(s.globals.animationEnded=!0),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u,"stroke-width":o.strokeWidth})):e.animate(a.dur,a.animBeginArr[a.i]).after(function(){(o.chartType===`pie`||o.chartType===`donut`||o.chartType===`polarArea`)&&this.animate(s.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),a.i===s.config.series.length-1&&c.animationCompleted(e)}).during(s=>{d=p+(r-p)*s,a.animateStartingPos&&(d=i+(r-i)*s,f=t-i+(n-(t-i))*s),u=o.getPiePath({me:o,startAngle:f,angle:d,size:m?a.prevSize+(l-a.prevSize)*s:l}),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u})})}pieClicked(e,t){let n=this.w,r=this,i=!(t&&t.animate===!1),a=n.dom.Paper.findOne(`.apexcharts-${r.chartType.toLowerCase()}-slice-${e}`);if(!a)return;if(a.attr(`data:pieClicked`)===`true`){a.attr({"data:pieClicked":`false`}),this.revertDataLabelsInner(),this.offsetSlice(e,0,i);return}let o=n.dom.baseEl.getElementsByClassName(`apexcharts-pie-area`);Array.prototype.forEach.call(o,e=>{let t=e.getAttribute(`data:pieClicked`)===`true`;e.setAttribute(`data:pieClicked`,`false`),t&&this.offsetSlice(parseInt(e.getAttribute(`j`),10),0,i)}),n.interact.capturedDataPointIndex=e,a.attr(`data:pieClicked`,`true`),this.offsetSlice(e,this.getExpandOffset(),i)}getExpandOffset(){let e=this.w.config.plotOptions.pie;if(!e.expandOnClick||this.chartType===`polarArea`||ng.drilldownBlocksSliceOffset(this.w))return 0;let t=Number(e.expandOffset);return Number.isFinite(t)&&t>0?t:0}getSliceMovers(e){let t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return[t?t.node:null,this.sliceLabelGroups[e],this.externalLabelGroups[e],this.hoverOutlineIndex===e&&this.elHoverOutlinePath?this.elHoverOutlinePath.node:null].filter(Boolean)}offsetSlice(e,t,n=!0){let r=this.w;if(!r.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`))return;let{dx:i,dy:a}=this.getSliceOffsetVector(e,t),o=`translate(${i} ${a})`,s=n&&r.config.chart.animations.enabled?ux:``;this.getSliceMovers(e).forEach(e=>{e.style.transition=s,e.setAttribute(`transform`,o)})}getSliceOffsetVector(e,t){let n=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`),r=n?parseFloat(n.attr(`data:angle`)):NaN;if(!t||!Number.isFinite(r)||r>=this.fullAngle)return{dx:0,dy:0};let i=parseFloat(n.attr(`data:startAngle`)),a=Math.PI*(i+r/2-90)/180;return{dx:t*Math.cos(a),dy:t*Math.sin(a)}}showHoverOutline(e){let t=this.w;if(!ng.hoverOutlineOwnsHoverState(t)||!this.elHoverOutline)return;let n=this.getHoverOutlinePath(e);if(!n)return;let r=t.config.plotOptions.pie.hoverOutline,i=r.color||t.globals.colors[e];this.elHoverOutlinePath||(this.elHoverOutlinePath=new Z(t).drawPath({d:n,fill:i,strokeWidth:0,classes:`apexcharts-pie-hover-outline-band`}),this.elHoverOutline.add(this.elHoverOutlinePath)),this.elHoverOutlinePath.attr({d:n,fill:i,"fill-opacity":r.opacity});let{dx:a,dy:o}=this.getSliceOffsetVector(e,this.isSliceOut(e)?this.getExpandOffset():0);this.elHoverOutlinePath.node.style.transition=``,this.elHoverOutlinePath.node.setAttribute(`transform`,`translate(${a} ${o})`),this.hoverOutlineIndex=e,this.elHoverOutline.node.style.opacity=`1`}hideHoverOutline(){this.elHoverOutline&&(this.elHoverOutline.node.style.opacity=`0`)}isSliceOut(e){let t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return!!t&&t.attr(`data:pieClicked`)===`true`}getHoverOutlinePath(e){let t=this.w,n=t.config.plotOptions.pie.hoverOutline,r=t.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);if(!r)return null;let i=parseFloat(r.attr(`data:angle`));if(!Number.isFinite(i)||i<=0)return null;let a=this.sliceSizes[e],o=Number(n.size);if(!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return null;let{startDeg:s,spanDeg:c}=this.getSliceExtent({me:this,startAngle:parseFloat(r.attr(`data:startAngle`)),angle:i,size:a});if(!(c>0))return null;let l=a+(this.strokeWidth||0)/2+(Number(n.gap)||0),u=l+o,d={cx:this.centerX,cy:this.centerY,rIn:l,rOut:u,a0:s,a1:s+c,spanDeg:c},f=Math.min(o/2,c*Math.PI/180/2*l);return f>.5?sx(X(Y({},d),{r:f})):lx(d)}getChangedPath(e,t,n){let r=``;return this.dynamicAnim&&this.w.globals.dataChanged&&(r=this.getPiePath({me:this,startAngle:e,angle:t-e,size:typeof n==`number`?n:this.size})),r}getSliceExtent({me:e,startAngle:t,angle:n,size:r}){let i=this.w,a=t,o=n+t;Math.ceil(o)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(o=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01);let s=o-a,c=e.chartType===`pie`||e.chartType===`donut`||e.chartType===`polarArea`,l=i.config.plotOptions.pie.spacing;if(c&&l>0&&s>0){let t=e.chartType===`donut`?(r+e.donutSize)/2:r,n=t>0?l/t*(180/Math.PI):0,i=Math.min(n/2,Math.max(0,s/2-.5));a+=i,s-=2*i}return o=a+s,Math.ceil(o)>this.fullAngle&&(o-=this.fullAngle),{startDeg:a,spanDeg:s,endDeg:o}}getPiePath({me:e,startAngle:t,angle:n,size:r}){let i,a=this.w,o=new Z(this.w),{startDeg:s,spanDeg:c,endDeg:l}=this.getSliceExtent({me:e,startAngle:t,angle:n,size:r}),u=e.chartType===`pie`||e.chartType===`donut`||e.chartType===`polarArea`,d=Math.PI*(s-90)/180,f=a.config.plotOptions.pie.borderRadius;if(f>0&&u){let t=this.getRoundedSlicePath({me:e,startDeg:s,spanDeg:c,size:r,borderRadius:f});if(t)return t}let p=Math.PI*(l-90)/180,m=e.centerX+r*Math.cos(d),h=e.centerY+r*Math.sin(d),g=e.centerX+r*Math.cos(p),_=e.centerY+r*Math.sin(p),v=$.polarToCartesian(e.centerX,e.centerY,e.donutSize,l),y=$.polarToCartesian(e.centerX,e.centerY,e.donutSize,s),b=c>180?1:0,x=[`M`,m,h,`A`,r,r,0,b,1,g,_];return i=e.chartType===`donut`?[...x,`L`,v.x,v.y,`A`,e.donutSize,e.donutSize,0,b,0,y.x,y.y,`L`,m,h,`z`].join(` `):e.chartType===`pie`||e.chartType===`polarArea`?[...x,`L`,e.centerX,e.centerY,`L`,m,h].join(` `):[...x].join(` `),o.roundPathCorners(i,this.strokeWidth*2)}getRoundedSlicePath({me:e,startDeg:t,spanDeg:n,size:r,borderRadius:i}){if(!(n>0))return null;let a=Math.PI/180,o=e.centerX,s=e.centerY,c=e.chartType===`donut`,l=r,u=c?e.donutSize:0,d=n*a,f=i;if(f=Math.min(f,d*l/2),c?(f=Math.min(f,d*u/2),f=Math.min(f,(l-u)/2)):f=Math.min(f,l/2),!(f>.5))return null;let p=t,m=t+n;return c?sx({cx:o,cy:s,rIn:u,rOut:l,a0:p,a1:m,r:f,spanDeg:n}):cx({cx:o,cy:s,rOut:l,a0:p,a1:m,r:f,spanDeg:n})}drawPolarElements(e){let t=this.w,n=new sg(this.w),r=new Z(this.w),i=new nx(this.w),a=r.group(),o=r.group(),s=n.niceScale(0,Math.ceil(this.maxY),0),c=s.result.reverse(),l=s.result.length;this.maxY=s.niceMax;let u=t.globals.radialSize,d=u/(l-1);for(let e=0;e<l-1;e++){let n=r.drawCircle(u);if(n.attr({cx:this.centerX,cy:this.centerY,fill:`none`,"stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){let n=i.drawYAxisTexts(this.centerX,this.centerY-u+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,e,c[e]);o.add(n)}a.add(n),u-=d}this.drawSpokes(e),e.add(a),e.add(o)}renderInnerDataLabels(e,t,n){let r=this.w,i=new Z(this.w),a=t.total.show;e.node.innerHTML=``,e.node.style.opacity=n.opacity;let o=n.centerX,s=this.donutDataLabels.total.label?n.centerY:n.centerY-n.centerY/6,c,l;c=t.name.color===void 0?r.globals.colors[0]:t.name.color;let u=t.name.fontSize,d=t.name.fontFamily,f=t.name.fontWeight;l=t.value.color===void 0?r.config.chart.foreColor:t.value.color;let p=t.value.formatter,m=``,h=``;if(a?(c=t.total.color,u=t.total.fontSize,d=t.total.fontFamily,f=t.total.fontWeight,h=this.donutDataLabels.total.label?t.total.label:``,m=t.total.formatter(r)):r.seriesData.series.length===1&&(m=p(r.seriesData.series[0],r),h=r.seriesData.seriesNames[0]),h&&=t.name.formatter(h,t.total.show,r),t.name.show){let n=i.drawText({x:o,y:s+parseFloat(t.name.offsetY),text:h,textAnchor:`middle`,foreColor:c,fontSize:u,fontWeight:f,fontFamily:d});n.node.classList.add(`apexcharts-datalabel-label`),e.add(n)}if(t.value.show){let n=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,r=i.drawText({x:o,y:s+n,text:m,textAnchor:`middle`,foreColor:l,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});r.node.classList.add(`apexcharts-datalabel-value`),e.add(r)}return e}printInnerLabels(e,t,n,r){let i=this.w,a;r?a=e.name.color===void 0?i.globals.colors[parseInt(r.parentNode.getAttribute(`rel`),10)-1]:e.name.color:i.seriesData.series.length>1&&e.total.show&&(a=e.total.color);let o=i.dom.baseEl.querySelector(`.apexcharts-datalabel-label`),s=i.dom.baseEl.querySelector(`.apexcharts-datalabel-value`),c=e.value.formatter;n=c(n,i),!r&&typeof e.total.formatter==`function`&&(n=e.total.formatter(i));let l=t===e.total.label;if(t=this.donutDataLabels.total.label?e.name.formatter(t,l,i):``,o!==null&&(o.textContent=t),s!==null&&(s.textContent=n),o!==null){let e=o;e.style.fill=a}}printDataLabelsInner(e,t){let n=this.w,r=e.getAttribute(`data:value`),i=n.seriesData.seriesNames[parseInt(e.parentNode.getAttribute(`rel`),10)-1];n.seriesData.series.length>1&&this.printInnerLabels(t,i,r,e);let a=n.dom.baseEl.querySelector(`.apexcharts-datalabels-group`);if(a!==null){let e=a;e.style.opacity=`1`}}drawSpokes(e){let t=this.w,n=new Z(this.w),r=t.config.plotOptions.polarArea.spokes;if(r.strokeWidth===0)return;let i=[],a=360/t.seriesData.series.length;for(let e=0;e<t.seriesData.series.length;e++)i.push($.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+a*e));i.forEach((t,i)=>{let a=n.drawLine(t.x,t.y,this.centerX,this.centerY,Array.isArray(r.connectorColors)?r.connectorColors[i]:r.connectorColors);e.add(a)})}revertDataLabelsInner(){let e=this.w;if(this.donutDataLabels.show){let t=e.dom.Paper.findOne(`.apexcharts-datalabels-group`),n=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.dom.Paper.findOne(`.apexcharts-radialbar, .apexcharts-pie`).add(n)}}},px=5,mx=class{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new Z(this.w),this.lineColorArr=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=e.globals.svgHeight<e.globals.svgWidth?e.layout.gridHeight:e.layout.gridWidth,this.isLog=e.config.yaxis[0].logarithmic,this.logBase=e.config.yaxis[0].logBase,this.coreUtils=new Xh(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,e.globals.maxY,0):e.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):e.globals.minY,this.polygons=e.config.plotOptions.radar.polygons,this.strokeWidth=e.config.stroke.show?e.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-e.config.chart.dropShadow.blur,e.config.xaxis.labels.show&&(this.size-=e.layout.xAxisLabelsWidth/1.75),e.config.plotOptions.radar.size!==void 0&&(this.size=e.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(e){let t=this.w,n=new tg(this.w),r=[],i=new $h(this.w,this.ctx);e.length&&(this.dataPointsLen=e[t.globals.maxValsInArrayIndex].length),this.disAngle=Math.PI*2/this.dataPointsLen;let a=t.layout.gridWidth/2,o=t.layout.gridHeight/2,s=a+t.config.plotOptions.radar.offsetX,c=o+t.config.plotOptions.radar.offsetY,l=this.graphics.group({class:`apexcharts-radar-series apexcharts-plot-series`,transform:`translate(${s||0}, ${c||0})`}),u=[],d=null,f=null;if(this.yaxisLabels=this.graphics.group({class:`apexcharts-yaxis`}),e.forEach((e,a)=>{let o=e.length===t.globals.dataPoints,s=this.graphics.group().attr({class:`apexcharts-series`,"data:longestSeries":o,seriesName:$.escapeString(t.seriesData.seriesNames[a]),rel:a+1,"data:realIndex":a});this.dataRadiusOfPercent[a]=[],this.dataRadius[a]=[],this.angleArr[a]=[],e.forEach((e,t)=>{let n=Math.abs(this.maxValue-this.minValue);e-=this.minValue,this.isLog&&(e=this.coreUtils.getLogVal(this.logBase,e,0)),this.dataRadiusOfPercent[a][t]=e/n,this.dataRadius[a][t]=this.dataRadiusOfPercent[a][t]*this.size,this.angleArr[a][t]=t*this.disAngle}),u=this.getDataPointsPos(this.dataRadius[a],this.angleArr[a]);let c=this.createPaths(u,{x:0,y:0});d=this.graphics.group({class:`apexcharts-series-markers-wrap apexcharts-element-hidden`}),f=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":a}),t.globals.delayedElements.push({el:d.node,index:a});let l={i:a,realIndex:a,animationDelay:a,initialSpeed:t.config.chart.animations.speed,dataChangeSpeed:t.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-radar`,shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:t.globals.stroke.colors[a],strokeLineCap:t.config.stroke.lineCap},p=null;t.globals.previousPaths.length>0&&(p=this.getPreviousPath(a));for(let e=0;e<c.linePathsTo.length;e++){let r=this.graphics.renderPaths(X(Y({},l),{pathFrom:p===null?c.linePathsFrom[e]:p,pathTo:c.linePathsTo[e],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[a]:this.strokeWidth,fill:`none`,drawShadow:!1}));s.add(r);let i=n.fillPath({seriesNumber:a}),o=this.graphics.renderPaths(X(Y({},l),{pathFrom:p===null?c.areaPathsFrom[e]:p,pathTo:c.areaPathsTo[e],strokeWidth:0,fill:i,drawShadow:!1,drawMask:{type:`radial`,cx:0,cy:0,r:this.size}}));if(t.config.chart.dropShadow.enabled){let e=new ng(this.w),n=t.config.chart.dropShadow;e.dropShadow(o,Object.assign({},n,{noUserSpaceOnUse:!0}),a)}s.add(o)}e.forEach((e,n)=>{let r=new ig(this.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-marker`,seriesIndex:a,dataPointIndex:n});r.pSize||(r.pSize=px,r.pointFillColor=`transparent`,r.pointStrokeColor=`transparent`,r.pointStrokeWidth=0);let o=this.graphics.drawMarker(u[n].x,u[n].y,r);o.attr(`rel`,n),o.attr(`j`,n),o.attr(`index`,a),o.node.setAttribute(`default-marker-size`,r.pSize);let c=this.graphics.group({class:`apexcharts-series-markers`});c&&c.add(o),d.add(c),s.add(d);let l=t.config.dataLabels;if(l.enabled){let e=l.formatter(t.seriesData.series[a][n],{seriesIndex:a,dataPointIndex:n,w:t});i.plotDataLabelsText({x:u[n].x,y:u[n].y,text:e,textAnchor:`middle`,i:a,j:a,seriesIndex:a,dataPointIndex:n,parent:f,offsetCorrection:!1,dataLabelsConfig:Y({},l)})}s.add(f)}),r.push(s)}),this.drawPolygons({parent:l}),t.config.xaxis.labels.show){let e=this.drawXAxisTexts();l.add(e)}return r.forEach(e=>{l.add(e)}),l.add(this.yaxisLabels),l}drawPolygons(e){let t=this.w,{parent:n}=e,r=new nx(this.w),i=t.globals.yAxisScale[0].result.reverse(),a=i.length,o=[],s=this.size/(a-1);for(let e=0;e<a;e++)o[e]=s*e;o.reverse();let c=[],l=[];o.forEach((e,t)=>{let n=$.getPolygonPos(e,this.dataPointsLen),r=``;n.forEach((e,n)=>{if(t===0){let t=this.graphics.drawLine(e.x,e.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[n]:this.polygons.connectorColors);l.push(t)}n===0&&this.yaxisLabelsTextsPos.push({x:e.x,y:e.y}),r+=e.x+`,`+e.y+` `}),c.push(r)}),c.forEach((e,r)=>{let i=this.polygons.strokeColors,a=this.polygons.strokeWidth,o=this.graphics.drawPolygon(e,Array.isArray(i)?i[r]:i,Array.isArray(a)?a[r]:a,t.globals.radarPolygons.fill.colors[r]);n.add(o)}),l.forEach(e=>{n.add(e)}),t.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((e,t)=>{let n=r.drawYAxisTexts(e.x,e.y,t,i[t]);this.yaxisLabels.add(n)})}drawXAxisTexts(){let e=this.w,t=e.config.xaxis.labels,n=this.graphics.group({class:`apexcharts-xaxis`}),r=$.getPolygonPos(this.size,this.dataPointsLen);return e.labelData.labels.forEach((i,a)=>{let o=e.config.xaxis.labels.formatter,s=new $h(this.w,this.ctx);if(r[a]){let c=this.getTextPos(r[a],this.size),l=o(i,{seriesIndex:-1,dataPointIndex:a,w:e});s.plotDataLabelsText({x:c.newX,y:c.newY,text:l,textAnchor:c.textAnchor,i:a,j:a,parent:n,className:`apexcharts-xaxis-label`,color:Array.isArray(t.style.colors)&&t.style.colors[a]?t.style.colors[a]:`#a8a8a8`,dataLabelsConfig:Y({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},t),offsetCorrection:!1}).on(`click`,t=>{if(typeof e.config.chart.events.xAxisLabelClick==`function`){let n=Object.assign({},e,{labelIndex:a});e.config.chart.events.xAxisLabelClick(t,this.ctx,n)}})}}),n}createPaths(e,t){let n=[],r=[],i=[],a=[];if(e.length){r=[this.graphics.move(t.x,t.y)],a=[this.graphics.move(t.x,t.y)];let o=this.graphics.move(e[0].x,e[0].y),s=this.graphics.move(e[0].x,e[0].y);e.forEach((t,n)=>{o+=this.graphics.line(t.x,t.y),s+=this.graphics.line(t.x,t.y),n===e.length-1&&(o+=`Z`,s+=`Z`)}),n.push(o),i.push(s)}return{linePathsFrom:r,linePathsTo:n,areaPathsFrom:a,areaPathsTo:i}}getTextPos(e,t){let n=`middle`,r=e.x,i=e.y;return Math.abs(e.x)>=10?e.x>0?(n=`start`,r+=10):e.x<0&&(n=`end`,r-=10):n=`middle`,Math.abs(e.y)>=t-10&&(e.y<0?i-=10:e.y>0&&(i+=10)),{textAnchor:n,newX:r,newY:i}}getPreviousPath(e){let t=this.w,n=null;for(let r=0;r<t.globals.previousPaths.length;r++){let i=t.globals.previousPaths[r];i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(e),10)&&t.globals.previousPaths[r].paths[0]!==void 0&&(n=t.globals.previousPaths[r].paths[0].d)}return n}getDataPointsPos(e,t,n=this.dataPointsLen){e||=[],t||=[];let r=[];for(let i=0;i<n;i++){let n={};n.x=e[i]*Math.sin(t[i]),n.y=-e[i]*Math.cos(t[i]),r.push(n)}return r}},hx=class extends fx{constructor(e,t){super(e,t),this.ctx=t,this.w=e,this.animBeginArr=[0],this.animDur=0,this.startAngle=e.config.plotOptions.radialBar.startAngle,this.endAngle=e.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(e.config.plotOptions.radialBar.endAngle-e.config.plotOptions.radialBar.startAngle),this.trackStartAngle=e.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=e.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||=this.startAngle,this.trackEndAngle||=this.endAngle,this.endAngle===360&&(this.endAngle=359.99),this.margin=parseInt(e.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(e){let t=this.w,n=new Z(this.w),r=n.group({class:`apexcharts-radialbar`});if(t.globals.noData)return r;let i=n.group(),a=t.layout.gridHeight/2,o=t.layout.gridWidth/2,s=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(s=s-t.config.stroke.width-t.config.chart.dropShadow.blur);let c=t.globals.fill.colors,l=t.config.plotOptions.radialBar,u=Array.isArray(l.bands)&&l.bands.length>0,d=u&&l.bandsStyle&&l.bandsStyle.hideTrackWhenPresent,f=l.shape===`needle`;if(l.track.show&&!d){let t=this.drawTracks({size:s,centerX:o,centerY:a,colorArr:c,series:e});i.add(t)}if(u){let t=this.drawBands({size:s,centerX:o,centerY:a,series:e});i.add(t)}let p=this.drawArcs({size:s,centerX:o,centerY:a,colorArr:c,series:e,skipValueArc:f&&!l.needle?.showValueArc});if(l.ticks&&l.ticks.show){let n=this.drawTicks({size:s,centerX:o,centerY:a,series:e});if(this.initialAnim&&!t.globals.dataChanged&&!t.globals.resized&&d_.isBrowser()&&t.globals.shouldAnimate){let e=n.node;e.style.opacity=`0`,e.style.transition=`opacity 280ms ease-out`;let r=t.config.chart.animations.speed||800;setTimeout(()=>{e.style.opacity=`1`},r)}i.add(n)}if(f){let t=this.drawNeedle({size:s,centerX:o,centerY:a,series:e});i.add(t)}let m=360;t.config.plotOptions.radialBar.startAngle<0&&(m=this.totalAngle);let h=(360-m)/360;if(t.globals.radialSize=s-s*h,this.radialDataLabels.value.show){let e=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=e*h}return i.add(p.g),t.config.plotOptions.radialBar.hollow.position===`front`&&(p.g.add(p.elHollow),p.dataLabels&&p.g.add(p.dataLabels)),r.add(i),r}drawTracks(e){let t=this.w,n=new Z(this.w),r=n.group({class:`apexcharts-tracks`}),i=new ng(this.w),a=new tg(this.w),o=this.getStrokeWidth(e);e.size-=o/2;for(let s=0;s<e.series.length;s++){let c=n.group({class:`apexcharts-radialbar-track apexcharts-track`});r.add(c),c.attr({rel:s+1}),e.size=e.size-o-this.margin;let l=t.config.plotOptions.radialBar.track,u=a.fillPath({seriesNumber:0,size:e.size,fillColors:Array.isArray(l.background)?l.background[s]:l.background,solid:!0}),d=this.trackStartAngle,f=this.trackEndAngle;Math.abs(f)+Math.abs(d)>=360&&(f=360-Math.abs(this.startAngle)-.1);let p=n.drawPath({d:``,stroke:u,strokeWidth:o*parseInt(l.strokeWidth,10)/100,fill:`none`,strokeOpacity:l.opacity,classes:`apexcharts-radialbar-area`});if(l.dropShadow.enabled){let e=l.dropShadow;i.dropShadow(p,e)}c.add(p),p.attr(`id`,`apexcharts-radialbarTrack-`+s),this.animatePaths(p,{centerX:e.centerX,centerY:e.centerY,endAngle:f,startAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}drawArcs(e){let t=this.w,n=new Z(this.w),r=new tg(this.w),i=new ng(this.w),a=n.group(),o=this.getStrokeWidth(e);e.size-=o/2;let s=t.config.plotOptions.radialBar.hollow.background,c=e.size-o*e.series.length-this.margin*e.series.length-o*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,l=c-t.config.plotOptions.radialBar.hollow.margin;t.config.plotOptions.radialBar.hollow.image!==void 0&&(s=this.drawHollowImage(e,a,c,s));let u=this.drawHollow({size:l,centerX:e.centerX,centerY:e.centerY,fill:s||`transparent`});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){let e=t.config.plotOptions.radialBar.hollow.dropShadow;i.dropShadow(u,e)}let d=1;!this.radialDataLabels.total.show&&t.seriesData.series.length>1&&(d=0);let f=null;if(this.radialDataLabels.show){let n=t.dom.Paper.findOne(`.apexcharts-datalabels-group`);f=this.renderInnerDataLabels(n,this.radialDataLabels,{hollowSize:c,centerX:e.centerX,centerY:e.centerY,opacity:d})}t.config.plotOptions.radialBar.hollow.position===`back`&&(a.add(u),f&&a.add(f));let p=!1;t.config.plotOptions.radialBar.inverseOrder&&(p=!0);let m=this.ctx.morphTypeChange?.isActive()===!0;for(let s=p?e.series.length-1:0;p?s>=0:s<e.series.length;p?s--:s++){let c=n.group({class:`apexcharts-series apexcharts-radial-series`,seriesName:$.escapeString(t.seriesData.seriesNames[s])});a.add(c),c.attr({rel:s+1,"data:realIndex":s}),cg.addCollapsedClassToSeries(this.w,c,s),e.size=e.size-o-this.margin;let l=r.fillPath({seriesNumber:s,size:e.size,value:e.series[s]}),u=this.startAngle,d,f=t.config.plotOptions.radialBar,p=typeof f.min==`number`?f.min:0,h=typeof f.max==`number`?f.max:100,g=h===p?1:h-p,_=e=>{let t=Math.min(Math.max(e,p),h);return Math.max(0,(t-p)/g)},v=_($.negToZero(e.series[s])),y=Math.round(this.totalAngle*v)+this.startAngle,b;t.globals.dataChanged&&(d=this.startAngle,b=Math.round(this.totalAngle*_($.negToZero(t.globals.previousPaths[s])))+d),Math.abs(y)+Math.abs(u)>360&&(y-=.01),Math.abs(b)+Math.abs(d)>360&&(b-=.01);let x=y-u,S=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[s]:t.config.stroke.dashArray,C=m?this.ctx.morphTypeChange.getInitialPathFor(s,0):null,w=m?this.ctx.morphTypeChange.getFromType():null,T=!!C&&(w===`bar`||w===`funnel`||w===`pyramid`||w===`pie`||w===`donut`||w===`polarArea`),E=n.drawPath({d:C||``,stroke:T||e.skipValueArc?`transparent`:l,strokeWidth:T||e.skipValueArc?0:o,fill:T?l:`none`,fillOpacity:t.config.fill.opacity,classes:`apexcharts-radialbar-area apexcharts-radialbar-slice-`+s,strokeDashArray:S}),D=u+x/2,O=$.polarToCartesian(e.centerX,e.centerY,e.size,D);if(Z.setAttrs(E.node,{"data:angle":x,"data:value":e.series[s],"data:cx":O.x,"data:cy":O.y}),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;i.dropShadow(E,e,s)}if(i.setSelectionFilter(E,0,s),this.addListeners(E,this.radialDataLabels),c.add(E),E.attr({index:0,j:s}),this.barLabels.enabled){let r=$.polarToCartesian(e.centerX,e.centerY,e.size,u),i=this.barLabels.formatter(t.seriesData.seriesNames[s],{seriesIndex:s,w:t}),a=[`apexcharts-radialbar-label`];this.barLabels.onClick||a.push(`apexcharts-no-click`);let o=this.barLabels.useSeriesColors?t.globals.colors[s]:t.config.chart.foreColor;o||=t.config.chart.foreColor;let l=r.x+this.barLabels.offsetX,d=r.y+this.barLabels.offsetY,f=n.drawText({x:l,y:d,text:i,textAnchor:`end`,dominantBaseline:`middle`,fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:o,cssClass:a.join(` `)});f.on(`click`,this.onBarLabelClick),f.attr({rel:s+1}),u!==0&&f.attr({"transform-origin":`${l} ${d}`,transform:`rotate(${u} 0 0)`}),c.add(f)}let k=0;if(this.initialAnim&&!t.globals.resized&&!t.globals.dataChanged&&(k=t.config.chart.animations.speed),t.globals.dataChanged&&(k=t.config.chart.animations.dynamicAnimation.speed),this.animDur=k/(e.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),m&&C){let t=this.ctx.morphTypeChange.getSpeed(),n=this.getPiePath({me:this,startAngle:u,angle:x,size:e.size});if(T){let r=this.ctx.morphTypeChange.buildRingSegmentPath(e.centerX,e.centerY,e.size,o,u,u+x);E.animate(t).plot(r,`polygons`).after(function(){this.attr({d:n,fill:`none`,stroke:e.skipValueArc?`transparent`:l,"stroke-width":e.skipValueArc?0:o})})}else E.animate(t).plot(n,`polygons`).attr({"stroke-width":o})}else this.animatePaths(E,{centerX:e.centerX,centerY:e.centerY,endAngle:y,startAngle:u,prevEndAngle:b,prevStartAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:this.animBeginArr,dur:k,shouldSetPrevPaths:!0})}return{g:a,elHollow:u,dataLabels:f}}_angleAtValue(e){let t=this.w.config.plotOptions.radialBar,n=typeof t.min==`number`?t.min:0,r=typeof t.max==`number`?t.max:100,i=r===n?n+1:r,a=(Math.max(n,Math.min(i,Number(e)))-n)/(i-n);return this.startAngle+a*(this.endAngle-this.startAngle)}_describeArc(e,t,n,r,i){let a=$.polarToCartesian(e,t,n,i),o=$.polarToCartesian(e,t,n,r),s=i-r,c=Math.abs(s)>180?1:0;return`M ${a.x} ${a.y} A ${n} ${n} 0 ${c} 0 ${o.x} ${o.y}`}drawBands(e){let t=this.w,n=new Z(this.w),r=t.config.plotOptions.radialBar,i=r.bands||[],a=n.group({class:`apexcharts-gauge-bands`}),o=this.getStrokeWidth(e),s=e.size-o/2-o-this.margin,c=o*parseInt(r.bandsStyle.strokeWidth,10)/100,l=typeof r.min==`number`?r.min:0,u=typeof r.max==`number`?r.max:100,d=u===l?0:(r.bandsStyle.gap||0)*((this.endAngle-this.startAngle)/(u-l));for(let t=0;t<i.length;t++){let o=i[t];if(o.from===void 0||o.to===void 0)continue;let l=this._angleAtValue(o.from),u=this._angleAtValue(o.to),f=Math.min(l,u)+d/2,p=Math.max(l,u)-d/2;if(p-f<=0)continue;let m=n.drawPath({d:this._describeArc(e.centerX,e.centerY,s,f,p),stroke:o.color||`#ccc`,strokeWidth:c,fill:`none`,strokeLinecap:r.bandsStyle.linecap||`butt`,classes:`apexcharts-gauge-band`});m.node.setAttribute(`data-band-index`,String(t)),a.add(m)}return a}drawTicks(e){let t=this.w,n=new Z(this.w),r=t.config.plotOptions.radialBar,i=r.ticks,a=n.group({class:`apexcharts-gauge-ticks`}),o=this.getStrokeWidth(e),s=e.size-o/2-o-this.margin,c=typeof r.min==`number`?r.min:0,l=typeof r.max==`number`?r.max:100,u=Math.max(2,i.major?.count??11),d=Math.max(0,i.minor?.count??0),f=(t,r,o)=>{let c=this._angleAtValue(t),l=r.length??8,u=r.placement===`inside`?s-l:s,d=r.placement===`inside`?s:s+l,f=$.polarToCartesian(e.centerX,e.centerY,u,c),p=$.polarToCartesian(e.centerX,e.centerY,d,c),m=n.drawLine(f.x,f.y,p.x,p.y,r.color||(o?`#666`:`#999`),0,r.width||(o?2:1));if(a.add(m),o&&i.labels?.show){let o=(r.placement===`inside`?u:d)+(r.placement===`inside`?-1:1)*(i.labels.offset??6),s=$.polarToCartesian(e.centerX,e.centerY,o,c),l=typeof i.labels.formatter==`function`?i.labels.formatter(t):String(t),f=n.drawText({x:s.x,y:s.y,text:l,textAnchor:`middle`,dominantBaseline:`middle`,fontFamily:i.labels.fontFamily,fontSize:i.labels.fontSize,fontWeight:i.labels.fontWeight,foreColor:i.labels.color,cssClass:`apexcharts-gauge-tick-label`});a.add(f)}};for(let e=0;e<u;e++)if(f(c+e/(u-1)*(l-c),i.major||{},!0),e<u-1&&d>0)for(let t=1;t<=d;t++)f(c+(e+t/(d+1))/(u-1)*(l-c),i.minor||{},!1);return a}drawNeedle(e){let t=this.w,n=new Z(this.w),r=t.config.plotOptions.radialBar.needle||{},i=n.group({class:`apexcharts-gauge-needle`});if(!e.series||e.series.length===0)return i;let a=this.getStrokeWidth(e),o=e.size-a/2-a-this.margin,s=typeof r.length==`string`&&r.length.endsWith(`%`)?o*parseInt(r.length,10)/100:Number(r.length||o*.85),c=r.baseWidth??4,l=r.tipWidth??1,u=r.color||`#333`,d=e.centerX,f=Number(r.offsetY??0),p=e.centerY+f,m=`M ${d+c/2} ${p} A ${c/2} ${c/2} 0 0 1 ${d-c/2} ${p} L ${d-l/2} ${p-s} L ${d+l/2} ${p-s} Z`,h=n.drawPath({d:m,stroke:u,strokeWidth:0,fill:u,classes:`apexcharts-gauge-needle-shape`});i.add(h);let g=Number(e.series[0]),_=this._angleAtValue(g),v=this.initialAnim&&!t.globals.dataChanged&&!t.globals.resized,y=this.ctx,b=typeof y._lastNeedleAngle==`number`?y._lastNeedleAngle:this.startAngle;if(y._lastNeedleAngle=_,d_.isBrowser()&&t.globals.shouldAnimate&&(v||t.globals.dataChanged)&&b!==_){let e=i.node;e.setAttribute(`transform-origin`,`${d} ${p}`),e.setAttribute(`transform`,`rotate(${b})`);let n=r.animation?.duration&&Number(r.animation.duration)||r.animationSpeed&&Number(r.animationSpeed)||t.config.chart.animations.dynamicAnimation?.speed||t.config.chart.animations.speed||800,a=1.70158;a+1;let o=v?e=>1+2.70158*(e-1)**3+a*(e-1)**2:e=>1-(1-e)**3;t.globals.radialNeedleRAF!=null&&(Q.cancelAnimationFrame(t.globals.radialNeedleRAF),t.globals.radialNeedleRAF=null);let s=performance.now(),c=r=>{if(this.w.globals.isDestroyed){t.globals.radialNeedleRAF=null;return}let i=Math.max(0,Math.min(1,(r-s)/n)),a=b+(_-b)*o(i);e.setAttribute(`transform`,`rotate(${a})`),i<1?t.globals.radialNeedleRAF=Q.requestAnimationFrame(c):t.globals.radialNeedleRAF=null};t.globals.radialNeedleRAF=Q.requestAnimationFrame(c)}else i.attr({"transform-origin":`${d} ${p}`,transform:`rotate(${_})`});return i}drawHollow(e){let t=new Z(this.w),n=this.w.config.plotOptions.radialBar.hollow,r=t.drawCircle(e.size*2),i={class:`apexcharts-radialbar-hollow`,cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill};return(n.stroke||n.strokeDasharray)&&(i.stroke=n.stroke||`transparent`,i[`stroke-width`]=n.strokeWidth??1,n.strokeDasharray&&(i[`stroke-dasharray`]=n.strokeDasharray)),r.attr(i),r}drawHollowImage(e,t,n,r){let i=this.w,a=new tg(this.w),o=$.randomId(),s=i.config.plotOptions.radialBar.hollow.image;if(i.config.plotOptions.radialBar.hollow.imageClipped)a.clippedImgArea({width:n,height:n,image:s,patternID:`pattern${i.globals.cuid}${o}`}),r=`url(#pattern${i.globals.cuid}${o})`;else{let n=i.config.plotOptions.radialBar.hollow.imageWidth,r=i.config.plotOptions.radialBar.hollow.imageHeight;if(n===void 0&&r===void 0){let n=i.dom.Paper.image(s,function(t){this.move(e.centerX-t.width/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-t.height/2+i.config.plotOptions.radialBar.hollow.imageOffsetY)});t.add(n)}else{let a=i.dom.Paper.image(s,function(){this.move(e.centerX-n/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-r/2+i.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(n,r)});t.add(a)}}return r}getStrokeWidth(e){let t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}onBarLabelClick(e){let t=e.target,n=parseInt(t.getAttribute(`rel`)??``,10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.seriesData.seriesNames[n],{w:i,seriesIndex:n})}},gx=class extends Eb{draw(e,t){let n=this.w,r=new Z(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=n.rangeData.seriesRangeStart,this.seriesRangeEnd=n.rangeData.seriesRangeEnd,this.barHelpers.initVariables(e);let i=r.group({class:`apexcharts-rangebar-series apexcharts-plot-series`});for(let a=0;a<e.length;a++){let o,s,c=n.globals.comboCharts?t[a]:a,{columnGroupIndex:l}=this.barHelpers.getGroupIndex(c),u=r.group({class:`apexcharts-series`,seriesName:$.escapeString(n.seriesData.seriesNames[c]),rel:a+1,"data:realIndex":c});cg.addCollapsedClassToSeries(this.w,u,c),e[a].length>0&&(this.visibleI+=1);let d=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[c][0],d=c);let f=this.barHelpers.initialPositions(c),{y:p,zeroW:m,x:h,zeroH:g}=f,_=f.barWidth??0,v=f.barHeight??0,y=f.yDivision??0,b=f.xDivision??0;s=p,o=h;let x=r.group({class:`apexcharts-datalabels`,"data:realIndex":c}),S=r.group({class:`apexcharts-rangebar-goals-markers`});for(let t=0;t<n.globals.dataPoints;t++){let r=this.barHelpers.getStrokeWidth(a,t,c),i=this.seriesRangeStart[a][t],p=this.seriesRangeEnd[a][t],h=null,C=null,w=null,T={x:o,y:s,strokeWidth:r,elSeries:u},E=this.seriesLen;if(n.config.plotOptions.bar.rangeBarGroupRows&&(E=1),n.config.series[a].data?.[t]===void 0)break;if(this.isHorizontal){w=s+v*this.visibleI;let e=(y-v*E)/2;if(n.config.series[a].data?.[t]?.x){let n=this.detectOverlappingBars({i:a,j:t,barYPosition:w,srty:e,barHeight:v,yDivision:y,initPositions:f});v=n.barHeight,w=n.barYPosition}h=this.drawRangeBarPaths(Y({indexes:{i:a,j:t,realIndex:c},barHeight:v,barYPosition:w,zeroW:m,yDivision:y,y1:i,y2:p},T)),_=h.barWidth}else{n.axisFlags.isXNumeric&&(o=(n.seriesData.seriesX[a][t]-n.globals.minX)/this.xRatio-_/2),C=o+_*this.visibleI;let e=(b-_*E)/2;if(n.config.series[a].data?.[t]?.x){let n=this.detectOverlappingBars({i:a,j:t,barXPosition:C,srtx:e,barWidth:_,xDivision:b,initPositions:f});_=n.barWidth,C=n.barXPosition}h=this.drawRangeColumnPaths(Y({indexes:{i:a,j:t,realIndex:c,translationsIndex:d},barWidth:_,barXPosition:C,zeroH:g,xDivision:b},T)),v=h.barHeight}let D=this.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:w,goalX:h.goalX,goalY:h.goalY,barHeight:v,barWidth:_});D&&S.add(D),s=h.y,o=h.x;let O=this.barHelpers.getPathFillColor(e,a,t,c);this.renderSeries({realIndex:c,pathFill:O.color,lineFill:O.useRangeColor?O.color:n.globals.stroke.colors[c],j:t,i:a,x:o,y:s,y1:i,y2:p,pathFrom:h.pathFrom,pathTo:h.pathTo,strokeWidth:r,elSeries:u,series:e,barHeight:v,barWidth:_,barXPosition:C,barYPosition:w,columnGroupIndex:l,elDataLabelsWrap:x,elGoalsMarkers:S,visibleSeries:this.visibleI,type:`rangebar`})}i.add(u)}return i}detectOverlappingBars({i:e,j:t,barYPosition:n,barXPosition:r,srty:i,srtx:a,barHeight:o,barWidth:s,yDivision:c,xDivision:l,initPositions:u}){let d=this.w,f=[],p=d.globals.seriesRangeName?.[e]?.[t],m=d.config.series[e].data?.[t]?.x,h=Array.isArray(m)?m.join(` `):m,g=d.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(h),_=d.rangeData.seriesRange[e].findIndex(e=>e.x===h&&e.overlaps?.size>0);return this.isHorizontal?(n=d.config.plotOptions.bar.rangeBarGroupRows?i+c*g:i+o*this.visibleI+c*g,_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(d.rangeData.seriesRange[e][_].overlaps),f.indexOf(p)>-1&&(o=u.barHeight/f.length,n=o*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+f.indexOf(p))+c*g))):(g>-1&&!d.labelData.timescaleLabels.length&&(r=d.config.plotOptions.bar.rangeBarGroupRows?a+l*g:a+s*this.visibleI+l*g),_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(d.rangeData.seriesRange[e][_].overlaps),f.indexOf(p)>-1&&(s=u.barWidth/f.length,r=s*this.visibleI+l*(100-parseInt(this.barOptions.barWidth,10))/100/2+s*(this.visibleI+f.indexOf(p))+l*g))),{barYPosition:n,barXPosition:r,barHeight:o,barWidth:s}}drawRangeColumnPaths({indexes:e,x:t,xDivision:n,barWidth:r,barXPosition:i,zeroH:a}){let o=this.w,{i:s,j:c,realIndex:l,translationsIndex:u}=e,d=this.yRatio[u],f=this.getRangeValue(l,c),p=Math.min(f.start,f.end),m=Math.max(f.start,f.end),h=!(this.series[s]?.[c]===void 0||this.series[s]?.[c]===null);h?(p=a-p/d,m=a-m/d):p=a;let g=Math.abs(m-p),_=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:r,y1:p,y2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l,i:l,j:c,w:o});if(h){let e=_.drawnBox,t=f.end>=f.start;this.recordColumnGeometry(l,c,{slotStart:e.x1,slotEnd:e.x2,levelStart:t?e.y1:e.y2,levelEnd:t?e.y2:e.y1,horizontal:!1})}if(!o.axisFlags.isXNumeric)t+=n;else{let e=this.getBarXForNumericXAxis({x:t,j:c,realIndex:l,barWidth:r});t=e.x,i=e.barXPosition}return{pathTo:_.pathTo,pathFrom:_.pathFrom,barHeight:g,x:t,y:f.start<0&&f.end<0?p:m,goalY:this.barHelpers.getGoalValues(`y`,null,a,l,c,u),barXPosition:i}}preventBarOverflow(e){let t=this.w;return e<0&&(e=0),e>t.layout.gridWidth&&(e=t.layout.gridWidth),e}drawRangeBarPaths({indexes:e,y:t,y1:n,y2:r,yDivision:i,barHeight:a,barYPosition:o,zeroW:s}){let c=this.w,{realIndex:l,j:u}=e,d=this.preventBarOverflow(s+n/this.invertedYRatio),f=this.preventBarOverflow(s+r/this.invertedYRatio),p=this.getRangeValue(l,u),m=Math.abs(f-d),h=this.barHelpers.getBarpaths({barYPosition:o,barHeight:a,x1:d,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l,realIndex:l,j:u,w:c});if(p.start!=null&&p.end!=null){let e=h.drawnBox;this.recordColumnGeometry(l,u,{slotStart:e.y1,slotEnd:e.y2,levelStart:e.x1,levelEnd:e.x2,horizontal:!0})}return c.axisFlags.isXNumeric||(t+=i),{pathTo:h.pathTo,pathFrom:h.pathFrom,barWidth:m,x:p.start<0&&p.end<0?d:f,goalX:this.barHelpers.getGoalValues(`x`,s,null,l,u,0),y:t}}recordColumnGeometry(e,t,n){let r=this.w.waterfallData&&this.w.waterfallData.geometry;r&&(!isFinite(n.slotStart)||!isFinite(n.levelEnd)||(r[e]||(r[e]=[]),r[e][t]=n))}getRangeValue(e,t){let n=this.w;return{start:n.rangeData.seriesRangeStart[e][t],end:n.rangeData.seriesRangeEnd[e][t]}}};function _x(e,t){let n=0;for(let t=0;t<e.length;t++)n+=e[t];let r=t/n,i=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]*r;return i}function vx(e,t,n,r){let i=r*r,a=n*n;return Math.max(i*t/a,a/(i*e))}function yx(e,t,n,r,i,a){return e===0?!0:vx(t,n,r,a)>=vx(Math.min(t,i),Math.max(n,i),r+i,a)}function bx(e,t,n,r,i,a,o,s){if(o>=s){let o=r/s,c=a;for(let r=0;r<n;r++){let n=t[r]/o;e.push([i,c,i+o,c+n]),c+=n}}else{let s=r/o,c=i;for(let r=0;r<n;r++){let n=t[r]/s;e.push([c,a,c+n,a+s]),c+=n}}}function xx(e,t,n,r,i){let a=[],o=e.length;if(o===0)return a;let s=Array(o),c=0,l=0,u=1/0,d=-1/0,f=0;for(;f<o;){let o=Math.min(r,i),p=e[f];if(yx(c,u,d,l,p,o))s[c]=p,c++,l+=p,p<u&&(u=p),p>d&&(d=p),f++;else{if(bx(a,s,c,l,t,n,r,i),r>=i){let e=l/i;t+=e,r-=e}else{let e=l/r;n+=e,i-=e}c=0,l=0,u=1/0,d=-1/0}}return c>0&&bx(a,s,c,l,t,n,r,i),a}function Sx(e,t,n){let r=e.length,i=Array(r);for(let t=0;t<r;t++){let n=0,r=e[t];for(let e=0;e<r.length;e++)n+=r[e];i[t]=n}let a=xx(_x(i,t*n),0,0,t,n),o=Array(r);for(let t=0;t<r;t++){let n=a[t],r=n[0],i=n[1],s=n[2]-r,c=n[3]-i;o[t]=xx(_x(e[t],s*c),r,i,s,c)}return o}function Cx(e){let t=e.children;if(t&&t.length){let n=0;for(let e=0;e<t.length;e++)n+=Cx(t[e]);return e._area=n,n}let n=Number(e.value),r=isNaN(n)?0:Math.abs(n);return e._area=r,r}function wx(e,t,n,r,i,a,o,s){let c=e.length;if(c===0||r<=0||i<=0)return;let l=Array(c),u=0;for(let t=0;t<c;t++)l[t]=e[t]._area,u+=l[t];if(u<=0)return;let d=xx(_x(l,r*i),t,n,r,i);for(let t=0;t<c;t++){let n=e[t],r=d[t];if(!r)continue;n.rect=r,n.depth=a;let i=n.children;if(!i||!i.length)continue;let c=r[2]-r[0],l=r[3]-r[1],u=Math.max(0,o(n,a,c,l)||0);(u*2>=c||u*2>=l)&&(u=0);let f=Math.max(0,s(n,a,c,l)||0);f>0&&l-u*2-f<f&&(f=0),n.headerHeight=f,wx(i,r[0]+u,r[1]+f+u,c-u*2,l-f-u*2,a+1,o,s)}}function Tx(e,t,n,r={}){if(!Array.isArray(e)||e.length===0)return e||[];let i=r.padding||(()=>0),a=r.header||(()=>0);for(let t=0;t<e.length;t++)Cx(e[t]);return wx(e,0,0,t,n,0,i,a),e}var Ex={generate:Sx,generateNested:Tx};function Dx(e,t){let n=e.config.drilldown;return(n&&Array.isArray(n.series)?n.series:[]).find(e=>e&&e.id===t)}function Ox(e,t,n,r,i,a=null,o={}){let s=t&&typeof t==`object`,c=s?t.x??t.name??``:``,l=s?Number(t.y??t.value):Number(t),u={name:String(c),value:isNaN(l)?null:l,color:s&&t.color?t.color:void 0,_key:`${i}/${n}:${c}`};if(r&&!u.color&&(u.color=r[n%r.length]),o.keepDatum&&(u._datum=t),s&&Array.isArray(t.children)&&t.children.length)u.children=t.children.map((t,n)=>Ox(e,t,n,null,u._key,a,o));else if(s&&t.drilldown!=null&&o.expandDrilldown!==!1){let n=a||new Set;if(!n.has(t.drilldown)){let r=Dx(e,t.drilldown);if(r&&Array.isArray(r.data)&&r.data.length){let i=new Set(n);i.add(t.drilldown);let a=Array.isArray(r.colors)?r.colors:null;u.children=r.data.map((t,n)=>Ox(e,t,n,a,u._key,i,o))}}}return u}function kx(e,t={}){let n=e.config.series,r=n&&n[0],i=r&&Array.isArray(r.data)?r.data:n;return Array.isArray(i)?i.map((n,r)=>Ox(e,n,r,null,``,null,t)):[]}function Ax(e,t,n={}){let r=t||e.config.series;return Array.isArray(r)?r.map((t,r)=>{let i=t&&Array.isArray(t.data)?t.data:[],a=`${r}:${t?.name??``}`;return{name:String(t?.name??``),value:null,color:t?.color||void 0,_key:a,_seriesIndex:r,children:i.map((t,r)=>Ox(e,t,r,null,a,null,n))}}):[]}function jx(e){e.children&&e.children.length&&(e.children.forEach(e=>jx(e)),(e.value==null||isNaN(e.value))&&(e.value=e.children.reduce((e,t)=>e+Math.max(0,t.value||0),0))),(e.value==null||isNaN(e.value))&&(e.value=0)}function Mx(e){if(typeof e!=`string`)return``;let t=e.indexOf(`/`);return t===-1?``:e.slice(t)}function Nx(e){let t=[],n=0;return e.forEach((e,r)=>{let i=[],a=(e,t,o)=>{e._parent=o,e._depth=t,e._si=r,e._leaf=!(e.children&&e.children.length),t>n&&(n=t),e._leaf?(e._di=i.length,i.push(e)):(e._di=-1,e.children.forEach(n=>a(n,t+1,e)))};a(e,0,null),t.push(i)}),{leaves:t,maxDepth:n}}function Px(e){let t=e.globals.treemapRoots;if(t&&t.length)return{roots:t,maxDepth:e.globals.treemapMaxDepth||1,nested:!0};let n=Ax(e,e.config.series,{keepDatum:!0,expandDrilldown:!1});n.forEach(jx);let{maxDepth:r}=Nx(n);return{roots:n,maxDepth:r,nested:!1}}var Fx=e=>(e[2]-e[0])*(e[3]-e[1]),Ix=class{constructor(e,t){this.ctx=t,this.w=e,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Kb(e,t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[],this.roots=[],this.drawn=[],this.nested=!1,this.showParents=!1,this.scale=null,this._levelCache=null,this._total=null,this._avgLabelSize=null,this._tooltipEl=null,this._tipOwned=!1,this._morphLeafIndex=0}draw(e){let t=this.w,n=new Z(this.w,this.ctx),r=new tg(this.w),i=n.group({class:`apexcharts-treemap`});if(t.globals.noData)return i;e.forEach(e=>{e.map(e=>Math.abs(e))}),this.negRange=this.helpers.checkColorRange(),t.config.series.forEach((e,t)=>{e.data.forEach(e=>{Array.isArray(this.labels[t])||(this.labels[t]=[]),this.labels[t].push(e.x)})});let a=Px(t);this.nested=a.nested,this.roots=a.roots,this.scale=O_(t);let o=a.roots.length===1?a.roots[0].children||[]:a.roots;this.drawn=o;let s=t.config.plotOptions.treemap.parents;this.showParents=s.show===!0||s.show!==!1&&this.nested;let c=this._resolveFocus(o),l=c?[c]:o;Ex.generateNested(l,t.layout.gridWidth,t.layout.gridHeight,{padding:(e,t,n,r)=>this.showParents?this._levelPadding(t,n,r):0,header:(e,t,n,r)=>this.showParents?this._levelHeader(e,t,n,r):0});let u=this.ctx?.morphTypeChange,d=!!u&&typeof u.isActive==`function`&&u.isActive()&&typeof u.getInitialPathAt==`function`;this._morphLeafIndex=0;let f=this._leavesBySeries(l,t.config.series.length),p=this.showParents?this._parentsBySeries(l,t.config.series.length):[];return f.forEach((a,o)=>{let s=n.group({class:`apexcharts-series apexcharts-treemap-series`,seriesName:$.escapeString(t.seriesData.seriesNames[o]),rel:o+1,"data:realIndex":o});if(n.setupEventDelegation(s,`.apexcharts-treemap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new ng(this.w).dropShadow(i,e,o)}let c=n.group({class:`apexcharts-data-labels`}),l={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};this.showParents&&(p[o]||[]).forEach(e=>{this._drawParent(s,e,o)});let u=t.config.chart.animations,f=u.animateGradually,m=f&&f.enabled!==!1,h=Array(a.length).fill(0);if(m){let e=a.length||1,t=Math.min(f.delay||0,u.speed*.5/e);a.map((e,t)=>({j:t,area:e.rect?Fx(e.rect):0})).sort((e,t)=>t.area-e.area).forEach((e,n)=>{h[e.j]=n*t})}a.forEach((i,a)=>{let c=i.rect;if(!c)return;let u=i._di,f=c[0],p=c[1],m=c[2],g=c[3];l.xMin=Math.min(l.xMin,f),l.yMin=Math.min(l.yMin,p),l.xMax=Math.max(l.xMax,m),l.yMax=Math.max(l.yMax,g);let _=this._leafColor(o,u),v=_.color,y=r.fillPath({color:v,seriesNumber:o,dataPointIndex:u}),b=d?this._morphSourceForLeaf(i):null,x=b?n.drawPath({d:this._tilePath(f,p,m,g),fill:`#fff`,stroke:t.config.plotOptions.treemap.useFillColorAsStroke?v:t.globals.stroke.colors[o],strokeWidth:this.strokeWidth,fillOpacity:1}):n.drawRect(f,p,m-f,g-p,t.config.plotOptions.treemap.borderRadius,`#fff`,1,this.strokeWidth,t.config.plotOptions.treemap.useFillColorAsStroke?v:t.globals.stroke.colors[o]);x.attr({cx:f,cy:p,index:o,i:o,j:u,width:m-f,height:g-p,fill:y}),x.node.classList.add(`apexcharts-treemap-rect`),x.node.setAttribute(`data:key`,Mx(i._key));let S={x:f+(m-f)/2,y:p+(g-p)/2,width:0,height:0},C={x:f,y:p,width:m-f,height:g-p};if(b)this._morphTile(x,b,this._tilePath(f,p,m,g),this.ctx.morphTypeChange.getSpeed(),o,u);else if(t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;t.globals.resized||(e=t.config.chart.animations.speed),this.animateTreemap(x,S,C,e,h[a]||0)}if(t.globals.dataChanged){let e=1;this.dynamicAnim.enabled&&t.globals.shouldAnimate&&(e=this.dynamicAnim.speed,t.globals.previousPaths[o]&&t.globals.previousPaths[o][u]&&t.globals.previousPaths[o][u].rect&&(S=t.globals.previousPaths[o][u].rect),this.animateTreemap(x,S,C,e))}let w=this.getFontSize(c);t.config.plotOptions.treemap.dataLabels.format===`truncate`&&(w=parseInt(String(t.config.dataLabels.style.fontSize),10));let T=null;if(t.config.dataLabels.enabled&&this._labelCanShow(w,m-f,g-p)){let n=t.config.dataLabels.formatter(this.labels[o][u],{value:t.seriesData.series[o][u],seriesIndex:o,dataPointIndex:u,w:t});t.config.plotOptions.treemap.dataLabels.format===`truncate`&&(n=this.truncateLabels(String(n),w,f,p,m,g)),t.seriesData.series[o][u]&&(T=this.helpers.calculateDataLabels({text:n,x:(f+m)/2,y:(p+g)/2+this.strokeWidth/2+w/3,i:o,j:u,colorProps:_,fontSize:w,series:e})),t.config.dataLabels.enabled&&T&&this.rotateToFitLabel(T,w,n,f,p,m,g)}s.add(x),T!==null&&s.add(T)});let g=t.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&t.config.series.length>1&&g&&g.show){let e=t.config.series[o].name||``;if(e&&l.xMin<1/0&&l.yMin<1/0){let{offsetX:r,offsetY:i,borderColor:a,borderWidth:o,borderRadius:c,style:u}=g,d=u.color||t.config.chart.foreColor,f={left:u.padding.left,right:u.padding.right,top:u.padding.top,bottom:u.padding.bottom},p=n.getTextRects(e,u.fontSize,u.fontFamily),m=p.width+f.left+f.right,h=p.height+f.top+f.bottom,_=l.xMin+(r||0),v=l.yMin+(i||0),y=n.drawRect(_,v,m,h,c,u.background,1,o,a),b=n.drawText({x:_+f.left,y:v+f.top+(p?.height??0)*.75,text:e,fontSize:u.fontSize,fontFamily:u.fontFamily,fontWeight:u.fontWeight,foreColor:d,cssClass:u.cssClass||``});s.add(y),s.add(b)}}s.add(c),i.add(s)}),this._renderBreadcrumb(),i}_levelCfg(e){if(this._levelCache||=[],this._levelCache[e])return this._levelCache[e];let t=this.w.config.plotOptions.treemap,n=t.parents||{},r=(t.levels||[])[e]||{},i=X(Y(Y({},n),r),{header:X(Y(Y({},n.header||{}),r.header||{}),{style:Y(Y({},(n.header||{}).style||{}),(r.header||{}).style||{})}),hover:Y(Y({},n.hover||{}),r.hover||{})});return this._levelCache[e]=i,i}_levelPadding(e,t,n){let r=this._levelCfg(e);return Number(r.padding)||0}_levelHeader(e,t,n,r){let i=this._levelCfg(t).header||{};if(i.show===!1)return 0;let a=Number(i.height);return!Number.isFinite(a)||a<=0||n<(Number(i.minWidth)||40)||r<a*2?0:a}_leavesBySeries(e,t){let n=Array(Math.max(1,t));for(let e=0;e<n.length;e++)n[e]=[];let r=e=>{if(e.children&&e.children.length)e.children.forEach(r);else{let t=e._si||0;n[t]&&n[t].push(e)}};return e.forEach(r),n}_parentsBySeries(e,t){let n=Array(Math.max(1,t));for(let e=0;e<n.length;e++)n[e]=[];let r=e=>{if(!e.children||!e.children.length)return;let t=e._si||0;n[t]&&n[t].push(e),e.children.forEach(r)};return e.forEach(r),n.forEach(e=>e.sort((e,t)=>(e.depth||0)-(t.depth||0))),n}_leafColor(e,t){let n=this.w;if(this.scale){let r=T_(n,e,t);if(r!=null){let e=this.scale.at(r);return{color:e,foreColor:k_(e),colorProps:{color:e,foreColor:k_(e),percent:0}}}}return this.helpers.getShadeColor(n.config.chart.type,e,t,this.negRange)}_parentChrome(e){let t=this.w,n=this._levelCfg(e),r=t.config.theme.mode===`dark`,i=(n.header||{}).style||{},a=Math.min(e,3),o=r?255:0,s=`${o},${o},${o}`;return{fill:n.fill||`rgba(${s},${(r?.04:.03)+a*.02})`,fillOpacity:n.fillOpacity==null?1:n.fillOpacity,borderColor:n.borderColor||`rgba(${s},${r?.18:.14})`,borderWidth:n.borderWidth==null?1:n.borderWidth,borderRadius:n.borderRadius==null?t.config.plotOptions.treemap.borderRadius:n.borderRadius,headerBg:i.background||`rgba(${s},${r?.1:.07})`,headerColor:i.color||(r?`#e8e8e8`:t.config.chart.foreColor),headerFontSize:i.fontSize||`12px`,headerFontFamily:i.fontFamily||t.config.chart.fontFamily,headerFontWeight:i.fontWeight==null?600:i.fontWeight,hoverColor:n.hover&&n.hover.color||(r?`rgba(255,255,255,0.85)`:`rgba(0,0,0,0.7)`),hoverWidth:n.hover&&n.hover.width||2,hoverShow:!(n.hover&&n.hover.show===!1)}}_drawParent(e,t,n){let r=t.rect;if(!r)return;let i=this.w,a=new Z(this.w,this.ctx),o=t.depth||0,s=this._levelCfg(o),c=this._parentChrome(o),l=r[0],u=r[1],d=r[2]-r[0],f=r[3]-r[1];if(d<=0||f<=0)return;let p=a.group({class:`apexcharts-treemap-parent`,"data:depth":o,"data:name":$.escapeString(t.name)}),m=Mx(t._key),h=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(m):null,g=h?a.drawPath({d:this._tilePath(l,u,l+d,u+f),fill:c.fill,stroke:c.borderColor,strokeWidth:c.borderWidth,fillOpacity:c.fillOpacity}):a.drawRect(l,u,d,f,c.borderRadius,c.fill,c.fillOpacity,c.borderWidth,c.borderColor);g.node.classList.add(`apexcharts-treemap-parent-rect`),g.node.setAttribute(`data:key`,m),g.node.setAttribute(`data:depth`,String(o)),h&&this._morphTile(g,h,this._tilePath(l,u,l+d,u+f),this.ctx.morphTypeChange.getSpeed(),n,o),p.add(g);let _=t.headerHeight||0,v=``;if(_>0){let e=s.header||{},r=a.drawRect(l,u,d,_,0,c.headerBg,1,0,`transparent`);r.node.classList.add(`apexcharts-treemap-parent-header`),p.add(r);let f=String(t.name??``);typeof e.formatter==`function`?f=String(e.formatter(t.name,{value:t.value,depth:o,seriesIndex:n,node:t,w:i})):e.showValue&&(f=`${f} ${this._formatValue(t.value)}`),v=f;let m=Number(e.offsetX)||0,h=e.align||`left`,y=Math.max(0,d-12-Math.abs(m)),b=parseFloat(String(c.headerFontSize))||12,x=a.getTextBasedOnMaxWidth({text:f,maxWidth:y,fontSize:b});if(x){let t=l+6+m,n=`start`;h===`center`?(t=l+d/2+m,n=`middle`):h===`right`&&(t=l+d-6+m,n=`end`);let r=a.drawText({x:t,y:u+_/2+b/3+(Number(e.offsetY)||0),text:x,textAnchor:n,fontSize:c.headerFontSize,fontFamily:c.headerFontFamily,fontWeight:c.headerFontWeight,foreColor:c.headerColor,cssClass:`apexcharts-treemap-parent-label ${e.style&&e.style.cssClass||``}`});r.node.setAttribute(`pointer-events`,`none`),p.add(r)}this._attachParentEvents(r.node,t,c,g),this._makeParentAccessible(r.node,t,c,g,v)}this._attachParentEvents(g.node,t,c,g),p.node.setAttribute(`role`,`group`),p.node.setAttribute(`aria-label`,this._parentLabel(t,v)),e.add(p)}_parentLabel(e,t){let n=this._drawnTotal(),r=n>0?(e._area/n*100).toFixed(1):`0`,i=this._countLeaves(e);return`${t&&String(t).trim()?String(t).replace(/\s+/g,` `).trim():`${e.name}, ${this._formatValue(e._area)}`}, ${i} ${i===1?`item`:`items`}, ${r}% of total`}_makeParentAccessible(e,t,n,r,i){!e||!e.setAttribute||this._zoomEnabled()&&(e.setAttribute(`role`,`button`),e.setAttribute(`tabindex`,`0`),e.setAttribute(`aria-label`,`${this._parentLabel(t,i)}. Zoom in`),e.setAttribute(`aria-expanded`,`false`),!(!d_.isBrowser()||!e.addEventListener)&&(e.addEventListener(`focus`,()=>{r.node.setAttribute(`stroke`,n.hoverColor),r.node.setAttribute(`stroke-width`,String(n.hoverWidth+1))}),e.addEventListener(`blur`,()=>{r.node.setAttribute(`stroke`,n.borderColor),r.node.setAttribute(`stroke-width`,String(n.borderWidth))}),e.addEventListener(`keydown`,e=>{e.key!==`Enter`&&e.key!==` `&&e.key!==`Spacebar`||(e.preventDefault(),this._zoomTo(t,!0))})))}_attachParentEvents(e,t,n,r){if(!d_.isBrowser()||!e||!e.addEventListener)return;let i=this.w;n.hoverShow&&(e.addEventListener(`mouseenter`,()=>{r.node.setAttribute(`stroke`,n.hoverColor),r.node.setAttribute(`stroke-width`,String(n.hoverWidth))}),e.addEventListener(`mouseleave`,()=>{r.node.setAttribute(`stroke`,n.borderColor),r.node.setAttribute(`stroke-width`,String(n.borderWidth))})),i.config.tooltip.enabled&&(e.addEventListener(`mouseenter`,e=>this._showParentTooltip(e,t)),e.addEventListener(`mousemove`,e=>this._positionTooltip(e)),e.addEventListener(`mouseleave`,()=>this._hideParentTooltip())),this._zoomEnabled()&&(e.style.cursor=`pointer`,e.addEventListener(`click`,()=>this._zoomTo(t)))}_zoomEnabled(){let e=this.w,t=e.config.plotOptions.treemap.zoom;if(!t||!t.enabled||!this.showParents)return!1;let n=e.config.drilldown;return n&&n.enabled&&Array.isArray(n.series)&&n.series.length?(this._warnedZoomConflict||(this._warnedZoomConflict=!0,console.warn("ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead.")),!1):!0}_resolveFocus(e){let t=this.w.globals.treemapFocusKey;if(!t||!this._zoomEnabled())return null;let n=null,r=e=>{if(!n){if(e._key===t){n=e;return}e.children&&e.children.forEach(r)}};return e.forEach(r),n&&n.children&&n.children.length?n:null}_zoomTo(e,t=!1){let n=this.w;if(!e||!e.children||!e.children.length)return;let r=n.globals.treemapFocusKey===e._key?null:e._key;n.globals.treemapFocusKey=r,this._hideParentTooltip();let i=this.ctx.update();!t||!i||typeof i.then!=`function`||i.then(()=>{if(!d_.isBrowser())return;let e=n.dom.baseEl.querySelector(`.apexcharts-breadcrumb .apexcharts-breadcrumb-item`);if(e&&e.focus){e.focus();return}let t=n.dom.baseEl.querySelector(`.apexcharts-treemap-parent-header[tabindex]`);t&&t.focus&&t.focus()})}_focusChain(){let e=[],t=new Set(this.drawn||[]),n=this._resolveFocus(this.drawn||[]);for(;n&&(e.unshift(n),!t.has(n));)n=n._parent;return e}_breadcrumbCfg(){let e=this.w.config.plotOptions.treemap.zoom;return Cv(this.w,e&&e.breadcrumb)}_renderBreadcrumb(){if(!d_.isBrowser())return;let e=this.w;if(!e.dom.elWrap||(Dv(e),!this._zoomEnabled()))return;let t=this._focusChain();if(!t.length)return;let n=Ov(e,{ariaLabel:`Treemap breadcrumb`,config:this._breadcrumbCfg(),compact:!0,crumbs:[{label:`All`,data:null}].concat(t.map(e=>({label:e.name,data:e}))),onNavigate:(t,n)=>{e.globals.treemapFocusKey=n.data?n.data._key:null,this._hideParentTooltip(),this.ctx.update()}});n&&(this._placeBreadcrumb(n),wv(e,n))}_placeBreadcrumb(e){let t=this.w,n=t.layout.translateY||0,r=this.ctx?.dimensions?.dimHelpers,i=r?r.getTitleSubtitleCoords(`title`).height+r.getTitleSubtitleCoords(`subtitle`).height:0,a=e.getBoundingClientRect().height||Sv;if(n-i>=a+1){e.style.top=`${n-a-1}px`;return}e.style.top=`${i}px`;let o=t.config.theme.mode===`dark`;e.style.background=o?`rgba(20,24,30,0.82)`:`rgba(255,255,255,0.86)`,e.style.borderRadius=`4px`}_showParentTooltip(e,t){let n=this.w,r=this._tip();if(!r)return;let i=this._drawnTotal(),a=t._parent?t._parent._area:i,o=i>0?(t._area/i*100).toFixed(1):`0.0`,s=a>0?(t._area/a*100).toFixed(1):o,c=this.w.config.plotOptions.treemap.parents,l=c&&c.tooltip&&c.tooltip.formatter,u=this._countLeaves(t),d;if(typeof l==`function`)d=l({name:t.name,value:t._area,depth:t.depth||0,leafCount:u,percentOfParent:Number(s),percentOfTotal:Number(o),node:t,w:n});else{let e=this._parentChrome(t.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${n.config.tooltip.fillSeriesColor?`background-color:${e};`:``}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${$.escapeString(t.name)}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(t._area)}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${u} items, </span><span class="apexcharts-tooltip-text-y-value">${s}% of parent, ${o}% of total</span></div></div></div>`}r.innerHTML=d,r.classList.add(`apexcharts-active`),r.style.opacity=`1`,this._tipOwned=!0,this._positionTooltip(e)}_tip(){return this._tooltipEl||=this.w.dom.baseEl.querySelector(`.apexcharts-tooltip`),this._tooltipEl}_positionTooltip(e){let t=this._tip();if(!t||!this._tipOwned)return;let n=this.w.dom.elWrap.getBoundingClientRect(),r=t.offsetWidth,i=t.offsetHeight,a=e.clientX-n.left+12;a+r>n.width&&(a=e.clientX-n.left-r-12),a=Math.max(0,Math.min(a,n.width-r));let o=e.clientY-n.top+12;o+i>n.height&&(o=e.clientY-n.top-i-12),o=Math.max(0,Math.min(o,n.height-i)),t.style.left=a+`px`,t.style.top=o+`px`}_hideParentTooltip(){let e=this._tip();!e||!this._tipOwned||(this._tipOwned=!1,e.classList.remove(`apexcharts-active`),e.style.opacity=`0`)}_drawnTotal(){return this._total??=(this.drawn||[]).reduce((e,t)=>e+this._subtreeArea(t),0),this._total||0}_subtreeArea(e){if(e._area!=null)return e._area;let t=e.children;if(t&&t.length){let e=0;for(let n=0;n<t.length;n++)e+=this._subtreeArea(t[n]);return e}let n=Number(e.value);return isNaN(n)?0:Math.abs(n)}_countLeaves(e){return!e.children||!e.children.length?1:e.children.reduce((e,t)=>e+this._countLeaves(t),0)}_formatValue(e){let t=this.w,n=t.config.tooltip?.y?.formatter||t.config.yaxis?.[0]?.labels?.formatter;if(typeof n==`function`)try{return String(n(e,{seriesIndex:0,dataPointIndex:0,w:t}))}catch{}return String(e)}_labelCanShow(e,t,n){if(!Number.isFinite(e)||e<=0)return!1;let r=this.w.config.plotOptions.treemap.dataLabels;return e<(r&&r.minFontSize!=null?Number(r.minFontSize):0)?!1:Math.max(t,n)>=e}_averageLabelSize(){if(this._avgLabelSize!=null)return this._avgLabelSize;function e(t){let n,r=0;if(Array.isArray(t[0]))for(n=0;n<t.length;n++)r+=e(t[n]);else for(n=0;n<t.length;n++)r+=t[n].length;return r}function t(e){let n,r=0;if(Array.isArray(e[0]))for(n=0;n<e.length;n++)r+=t(e[n]);else for(n=0;n<e.length;n++)r+=1;return r}return this._avgLabelSize=e(this.labels)/t(this.labels),this._avgLabelSize}getFontSize(e){let t=this.w,n=this._averageLabelSize();function r(e,r){let i=(e*r)**.5;return Math.min(i/n,parseInt(t.config.dataLabels.style.fontSize,10))}return r(e[2]-e[0],e[3]-e[1])}rotateToFitLabel(e,t,n,r,i,a,o){let s=new Z(this.w),c=s.getTextRects(n,String(t));if(c.width+this.w.config.stroke.width+5>a-r&&c.width<=o-i){let t=s.rotateAroundCenter(e.node);e.node.setAttribute(`transform`,`rotate(-90 ${t.x} ${t.y}) translate(${c.height/3})`)}}truncateLabels(e,t,n,r,i,a){let o=new Z(this.w),s=o.getTextRects(e,String(t)).width+this.w.config.stroke.width+5>i-n&&a-r>i-n?a-r:i-n,c=o.getTextBasedOnMaxWidth({text:e,maxWidth:s,fontSize:t});return e.length!==c.length&&s/t<5?``:c}_morphKeyed(){let e=this.ctx?.morphTypeChange;return!!(e&&typeof e.hasKeyedMarks==`function`&&e.hasKeyedMarks()&&typeof e.getInitialPathForKey==`function`)}_morphSourceForLeaf(e){let t=this.ctx?.morphTypeChange;if(!t||typeof t.getInitialPathAt!=`function`)return null;if(this._morphKeyed()){let n=t.getInitialPathForKey(Mx(e._key));if(n)return n}return t.getInitialPathAt(this._morphLeafIndex++)}_tilePath(e,t,n,r){return`M ${e} ${t} L ${n} ${t} L ${n} ${r} L ${e} ${r} Z`}_morphTile(e,t,n,r,i,a){new Bh(this.w,this.ctx).morphSVG(e,i,a,`none`,t,n,r,0)}animateTreemap(e,t,n,r,i=0){let a=new Bh(this.w);a.animateRect(e,t,n,r,()=>{a.animationCompleted(e)},i)}},Lx=.05,Rx=.05,zx=1/45;function Bx(e,t,n,r){return{value:e,velocity:0,target:e,stiffness:t,damping:n}}function Vx(e,t){if(t<=0)return Ux(e);let n=t;for(;n>0;){let t=Math.min(n,zx),r=-e.stiffness*(e.value-e.target)-e.damping*e.velocity;e.velocity+=r*t,e.value+=e.velocity*t,n-=t}return!!Ux(e)&&(e.value=e.target,e.velocity=0,!0)}function Hx(e,t){e.target=t}function Ux(e){let t=e.restVelocity??Lx,n=e.restDisplacement??Rx;return Math.abs(e.velocity)<t&&Math.abs(e.value-e.target)<n}var Wx={crisp:[210,26],gentle:[120,20],snappy:[320,30]};function Gx(e){return Wx[e??`crisp`]??Wx.crisp}var Kx=`__apexcharts_unit_layouts__`;globalThis[Kx]||(globalThis[Kx]={});function qx(){return globalThis[Kx]}function Jx(e){return e&&qx()[e]||null}var Yx=`__apexcharts_unit_marks__`;globalThis[Yx]||(globalThis[Yx]={});function Xx(){return globalThis[Yx]}function Zx(e,t){if(typeof e==`string`){let t=e.trim();return t?Object.freeze({name:`anonymous`,path:t,viewBox:[0,0,100,100]}):null}if(!e||typeof e!=`object`||typeof e.path!=`string`||!e.path.trim())return null;let n=Array.isArray(e.viewBox)&&e.viewBox.length===4?e.viewBox.map(Number):[0,0,100,100];return!n.every(e=>isFinite(e))||n[2]<=0||n[3]<=0?null:Object.freeze(X(Y({},e),{name:e.name||`anonymous`,path:e.path.trim(),viewBox:n,fillRule:e.fillRule===`evenodd`?`evenodd`:void 0}))}function Qx(e){return e&&Xx()[e]||null}var $x=Math.PI*(3-Math.sqrt(5));function eS(e){return 1-(1-e)**3}function tS(e){return t=>1+(e+1)*(t-1)**3+e*(t-1)**2}function nS(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}var rS=800,iS=.25,aS=0,oS=1,sS=2;function cS(e,t){let[n,r]=Gx(e),i=rS/Math.max(1,t);return[n*i*i,r*i]}var lS=class{constructor(e,t){this.ctx=t,this.w=e,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(e){let t=this.w,n=new Z(t,this.ctx),r=n.group({class:`apexcharts-unit`});if(t.globals.noData||!Array.isArray(e)||e.length===0)return r;let i=t.config.plotOptions.unit,a=i.layout===`packed`?`packed`:i.layout===`columns`?`columns`:i.layout===`grid`?`grid`:i.layout===`scatter`?`scatter`:i.layout===`arc`?`arc`:i.layout===`custom`?`custom`:`grouped`,o=i.transition,s=o===`flow`,c=o===`identity`,l=i.unitValue>0?i.unitValue:1,u=e.map(e=>{let t=Math.abs($.parseNumber(e))/l;return t>0?Math.max(1,Math.round(t)):0});u=this._applyMaxUnits(u,i.maxUnits);let d=u.reduce((e,t)=>e+t,0),f=a===`packed`?this._layoutPacked(u,i):a===`columns`?this._layoutColumns(u,i):a===`grid`?this._layoutGrid(u,i):a===`scatter`?this._layoutScatter(i):a===`arc`?this._layoutArc(u,i):a===`custom`?this._layoutCustom(u,i):this._layoutGrouped(u,i),p=a===`grid`&&!!(i.grid&&i.grid.split);p&&this._drawGridTrack(r,n,i),a===`scatter`&&this._drawScatterAxes(r,n);let m=this._lastDotR,h=this._shouldAnimate(),g=this.ctx&&this.ctx.morphTypeChange,_=h&&!!g&&typeof g.isActive==`function`&&g.isActive()&&typeof g.getInitialCenterFor==`function`,v=_&&typeof g.getInitialSlotFor==`function`,y=_&&typeof g.usesPieceTakeover==`function`&&g.usesPieceTakeover(),b=h&&!_&&this.ctx?this.ctx._unitPrevDots:null,x=new Map,S=[],C=t.seriesData.unitData||[],w=this._bubbleStats(C,i,m),T=0;if(f.forEach(e=>{let o=t.globals.colors[e.i]||t.globals.colors[0]||`#008FFB`,l=n.group({class:`apexcharts-series`,seriesName:$.escapeString(t.seriesData.seriesNames[e.i]||`series-${e.i+1}`),rel:e.i+1,"data:realIndex":e.i}),f=_&&!v?g.getInitialCenterFor(e.i):null,E=e.dots.length,D=C[e.i];if(e.dots.forEach((t,r)=>{let a=t.j==null?r:t.j,u=D?D[a]:void 0,d=u&&typeof u==`object`&&u.fillColor?u.fillColor:o,_=t.r==null?w?this._radiusForValue(this._unitValueOf(u),w):m:t.r,C=this._markSpecFor(i,u,e.i,_),O=this._drawDot(n,i,_,d,e.i,a,C);l.add(O);let k;if(c){let e=u&&typeof u==`object`?u.id==null?u.name:u.id:void 0;k=e==null?`g:${T}`:`id:${e}`}else k=s?String(T):t.slot==null?`${e.i}:${a}`:`slot:${t.slot}`;if(T++,x.set(k,{x:t.x,y:t.y,fill:d,r:_,spec:C}),y)this._place(O.node,C,t.x,t.y),O.node.setAttribute(`opacity`,`0`),O.node.setAttribute(`data-piece-hidden`,`1`);else if(h){let n=b&&b.get(k),r=n||(v?g.getInitialSlotFor(e.i,a,E):f),o=i.gather&&i.gather.enter||`burst`,s=p||o===`fade`||o===`rise`,c=r?r.x:s?t.x:e.cx,l=r?r.y:o===`rise`&&!p?t.y+14:s?t.y:e.cy;O.node.style.opacity=r?`1`:`0`,this._place(O.node,C,c,l),S.push({node:O.node,spec:C,x:t.x,y:t.y,cx0:c,cy0:l,key:k,r0:n&&n.r!=null?n.r:_,r1:_,fill0:n?n.fill:d,fill1:d,delay:0,isEnter:!r})}else this._place(O.node,C,t.x,t.y)}),(a===`grouped`||a===`columns`||p)&&i.clusterLabels&&i.clusterLabels.show&&u[e.i]>0){let t=p?this._gridDenom:d;this._drawClusterLabel(l,e,u[e.i],t,i,o)}r.add(l)}),this._outerLabelsOn(i)&&this._drawOuterLabels(r,f,u,d,i,h&&!b),b){let e=this._collectExits(b,x,i);if(e.length){let t=n.group({class:`apexcharts-unit-exits`});r.add(t),this._runExits(t,e,i)}}return this.ctx&&(this.ctx._unitPrevDots=x),this.ctx&&(!h||_)&&(this.ctx._unitSprings=null),h&&S.length?this._runGather(S):t.globals.animationEnded=!0,r}_applyMaxUnits(e,t){let n=e.reduce((e,t)=>e+t,0);if(!t||t<=0||n<=t)return e;let r=t/n;return console.warn(`[ApexCharts] unit chart: ${n} dots exceeds maxUnits (${t}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`),e.map(e=>e>0?Math.max(1,Math.round(e*r)):0)}_layoutCustom(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=e.reduce((e,t)=>e+t,0),o=this._resolveLayoutProvider(t);if(!o)return console.warn(`[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'.`),this._layoutGrouped(e,t);let s=this._outerLabelsOn(t)?this._outerLabelGutter(e,t):0;this._lastOuterGutter=s;let c={x:s,y:0,width:Math.max(1,r-s*2),height:i},l=Math.sqrt(c.width*c.height/Math.PI),u=this._resolveStep(t,l,a);this._lastDotR=this._dotRadiusFromStep(u,t);let d=this._lastDotR,f=this._layoutObjects(e,d),p;try{p=o(f,c)}catch(n){return console.warn(`[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.`,n),this._layoutGrouped(e,t)}if(!Array.isArray(p))return console.warn(`[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'.`),this._layoutGrouped(e,t);let m=new Map;p.forEach(e=>{!e||!isFinite(e.x)||!isFinite(e.y)||m.set(String(e.id),{x:e.x,y:e.y,r:typeof e.r==`number`&&e.r>0?e.r:void 0})});let h=e.map((e,t)=>({i:t,cx:r/2,cy:i/2,outerR:d,dots:[]}));return f.forEach(e=>{let t=m.get(e.id);t&&h[e.seriesIndex].dots.push({x:t.x,y:t.y,r:t.r,j:e.dataPointIndex})}),h.forEach(e=>{if(!e.dots.length)return;let t=0,n=0;e.dots.forEach(e=>{t+=e.x,n+=e.y}),e.cx=t/e.dots.length,e.cy=n/e.dots.length;let r=0;e.dots.forEach(t=>{r=Math.max(r,Math.hypot(t.x-e.cx,t.y-e.cy))}),e.outerR=r+d}),h}_layoutObjects(e,t){let n=this.w,r=n.seriesData.unitData||[],i=n.seriesData.seriesNames||[],a=[],o=0;return e.forEach((e,n)=>{let s=r[n];for(let r=0;r<e;r++){let e=s?s[r]:void 0,c=e&&typeof e==`object`&&(e.id!=null||e.name!=null)?String(e.id==null?e.name:e.id):`${n}:${r}`;a.push({id:c,index:o,seriesIndex:n,dataPointIndex:r,label:i[n],value:this._unitValueOf(e)??void 0,datum:e,r:t}),o++}}),a}_resolveLayoutProvider(e){let t=e.positions;if(typeof t==`function`)return t;if(typeof t==`string`&&t){let e=Jx(t);if(e)return e;console.warn(`[ApexCharts] unit chart: no layout named "${t}" is registered. Register one with ApexCharts.registerUnitLayout("${t}", fn).`)}return null}_layoutGrouped(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=t.clusterLabels&&t.clusterLabels.show?30:6,o=e.map((e,t)=>t).filter(t=>e[t]>0),s=Math.max(1,o.length),c=Array(e.length).fill(-1);o.forEach((e,t)=>c[e]=t);let l=r/s,u=i-a,d=Math.max(1,...e),f=Math.min(l,u)*.08,p=Math.max(4,Math.min(l,u)/2-f),m=this._resolveStep(t,p,d);this._lastDotR=this._dotRadiusFromStep(m,t);let h=this._lastDotR,g=a+u/2,_=e.map(e=>m*Math.sqrt(Math.max(1,e))+h),v=e=>c[e]>=0?l*(c[e]+.5):r/2,y=e.map((e,t)=>v(t)),b=o.map(e=>_[e]),x=!1;for(let e=1;e<s;e++)if(y[o[e]]-y[o[e-1]]<b[e]+b[e-1]){x=!0;break}if(x){let t=Math.max(2*h,8),n=b.reduce((e,t)=>e+2*t,0)+t*(s-1),i;if(n<=r){let e=(r-n)/2;i=b.map(n=>{let r=e+n;return e+=2*n+t,r})}else if(s===1)i=[r/2];else{let e=b[0],t=r-b[s-1];i=b.map((n,r)=>e+(t-e)*r/(s-1))}y=e.map((e,t)=>c[t]>=0?i[c[t]]:r/2)}return e.map((e,t)=>({i:t,cx:y[t],cy:g,outerR:_[t],dots:this._spiral(y[t],g,e,m,0)}))}_layoutPacked(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=Math.max(1,e.reduce((e,t)=>e+t,0)),o=Math.max(4,Math.min(r,i-6)/2-Math.min(r,i)*.06),s=this._resolveStep(t,o,a);this._lastDotR=this._dotRadiusFromStep(s,t);let c=r/2,l=6+(i-6)/2,u=e.map((e,t)=>t);t.sortByGroup!==!1&&u.sort((t,n)=>e[t]-e[n]);let d=e.map((e,t)=>({i:t,cx:c,cy:l,outerR:s*Math.sqrt(a)+this._lastDotR,dots:[]})),f=0;return u.forEach(t=>{for(let n=0;n<e[t];n++){let e=s*Math.sqrt(f+.5),n=f*$x;d[t].dots.push({x:c+e*Math.cos(n),y:l+e*Math.sin(n),slot:f}),f++}}),d}_layoutArc(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=Math.max(1,e.reduce((e,t)=>e+t,0)),o=t.arc||{},s=typeof o.startAngle==`number`?o.startAngle:-90,c=typeof o.endAngle==`number`?o.endAngle:90,l=s*Math.PI/180,u=c*Math.PI/180,d=u-l||Math.PI,f=Math.max(0,Math.min(.95,typeof o.innerRadiusRatio==`number`?o.innerRadiusRatio:.4)),p=e=>Math.sin(e),m=e=>-Math.cos(e),h=this._arcBounds(l,u),g=Math.min(r,i)*.04,_=Math.max(1e-6,h.maxX-h.minX),v=Math.max(1e-6,h.maxY-h.minY),y=Math.max(4,Math.min((r-2*g)/_,(i-2*g)/v)),b=y*f,x=r/2-(h.minX+h.maxX)/2*y,S=i/2-(h.minY+h.maxY)/2*y,C=this._arcAllocate(a,b,y,d,t);this._lastDotR=C.dotR;let w=[];for(let e=0;e<C.R;e++){let t=C.radii[e],n=C.seatsPerRow[e];for(let e=0;e<n;e++){let r=n===1?(l+u)/2:l+d*(e+.5)/n;w.push({a:r,x:x+t*p(r),y:S+t*m(r)})}}w.sort((e,t)=>e.a-t.a);let T=e.map((e,t)=>({i:t,cx:x,cy:S,outerR:y,dots:[]})),E=0,D=0;return w.forEach((t,n)=>{for(;E<e.length&&D>=e[E];)E++,D=0;E>=e.length||(T[E].dots.push({x:t.x,y:t.y,slot:n}),D++)}),T}_arcBounds(e,t){let n=e=>Math.sin(e),r=e=>-Math.cos(e),i=Math.min(e,t),a=Math.max(e,t),o=[0,n(e),n(t)],s=[0,r(e),r(t)],c=Math.PI/2;for(let e=Math.ceil(i/c);e*c<=a;e++)o.push(n(e*c)),s.push(r(e*c));return{minX:Math.min(...o),maxX:Math.max(...o),minY:Math.min(...s),maxY:Math.max(...s)}}_arcAllocate(e,t,n,r,i){let a=i.spacing>0?i.spacing:1.05,o=Math.abs(r)||Math.PI,s=this._fixedRadius(i),c=r=>{r=Math.max(1,Math.round(r));let i=[];for(let e=0;e<r;e++)i.push(r===1?(t+n)/2:t+(n-t)*(e/(r-1)));let s=i.reduce((e,t)=>e+t,0)||1,c=i.map(t=>e*t/s),l=c.map(e=>Math.floor(e)),u=e-l.reduce((e,t)=>e+t,0);for(c.map((e,t)=>({idx:t,frac:e-Math.floor(e)})).sort((e,t)=>t.frac-e.frac).forEach(e=>{u>0&&(l[e.idx]++,u--)});u>0;)l[r-1]++,u--;let d=r===1?n-t||n:(n-t)/(r-1),f=1/0;for(let e=0;e<r;e++){let t=l[e];if(t<=0)continue;let n=i[e]*o/t;n<f&&(f=n)}let p=Math.min(d,f);return{R:r,radii:i,seatsPerRow:l,dotR:Math.max(1,p/(2*a))}},l=i.arc&&i.arc.rows,u;if(typeof l==`number`&&l>=1)u=c(l);else if(s){let e=2*s*a;u=c((n-t)/e+1)}else{let t=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(e))+6));u=c(1);for(let e=2;e<=t;e++){let t=c(e);t.dotR>u.dotR&&(u=t)}}return s&&(u.dotR=s),u}_layoutColumns(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=!!(t.clusterLabels&&t.clusterLabels.show),o=a&&t.clusterLabels.position===`bottom`,s=a&&!o?30:6,c=e.map((e,t)=>t).filter(t=>e[t]>0),l=Math.max(1,c.length),u=Array(e.length).fill(-1);c.forEach((e,t)=>u[e]=t);let d=r/l,f=d*.62,p=Math.max(8,i*.04)+(o?30:0),m=Math.max(4,i-s-p),h=Math.max(1,...e),g=t.spacing>0?t.spacing:1,_=t.columns?t.columns.size:void 0,v;v=t.shape!==`image`&&_===`auto`?null:t.shape!==`image`&&typeof _==`number`&&_>0?_:this._fixedRadius(t);let y=1,b=0;if(v){b=2*v*g,this._lastDotR=v;let e=Math.max(1,Math.floor(m/b)),t=Math.max(1,Math.floor(f/b));y=Math.max(1,Math.min(t,Math.ceil(h/e)))}else{let e=0,t=Math.max(1,Math.min(40,Math.round(f/4)));for(let n=1;n<=t;n++){let t=Math.ceil(h/n),r=Math.min(f/n,m/t);r>e&&(e=r,y=n)}b=e,this._lastDotR=Math.max(1,b/(2*g))}let x=this._lastDotR,S=Math.ceil(h/y),C=s+(m+Math.min(m,S*b))/2;return e.map((e,t)=>{let n=u[t]>=0?d*(u[t]+.5):r/2,i=Math.ceil(Math.max(1,e)/y)*b,a=n-y*b/2+b/2,o=[];for(let t=0;t<e;t++){let e=Math.floor(t/y),n=t%y;o.push({x:a+n*b,y:C-x-e*b})}return{i:t,cx:n,cy:C-i/2,outerR:i/2,flat:!0,dots:o}})}_layoutGrid(e,t){if(t.grid&&t.grid.split)return this._layoutGridSplit(e,t);this._gridTrack=null;let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=t.grid||{},o=Math.max(1,Math.round(a.columns>0?a.columns:10)),s=a.fillFrom===`top`?`top`:`bottom`,c=a.total>0?this._largestRemainder(e,Math.round(a.total)):e.slice(),l=c.reduce((e,t)=>e+t,0),u=Math.max(1,Math.ceil(Math.max(1,l)/o)),d=t.spacing>0?t.spacing:1,f=Math.max(4,r),p=Math.max(4,i-6),m=this._fixedRadius(t),h=0;m?(h=2*m*d,this._lastDotR=m):(h=Math.min(f/o,p/u),this._lastDotR=Math.max(1,h/(2*d)));let g=o*h,_=u*h,v=(r-g)/2+h/2,y=6+(p-_)/2,b=e=>s===`bottom`?y+_-h/2-e*h:y+h/2+e*h,x=e.map((e,t)=>({i:t,cx:r/2,cy:6+p/2,outerR:Math.max(g,_)/2,dots:[]})),S=0;for(let e=0;e<c.length;e++)for(let t=0;t<c[e];t++){let t=S%o,n=Math.floor(S/o);x[e].dots.push({x:v+t*h,y:b(n),slot:S}),S++}return x}_layoutGridSplit(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=t.grid||{},o=Math.max(1,Math.round(a.columns>0?a.columns:10)),s=a.fillFrom===`top`?`top`:`bottom`,c=Math.max(1,Math.round(a.total>0?a.total:100)),l=Math.max(1,Math.ceil(c/o)),u=e.map((e,t)=>t).filter(t=>e[t]>0),d=Math.max(1,u.length),f=a.max>0?a.max:Math.max(1,...e),p=Math.max(1,Math.round(a.tileColumns>0?a.tileColumns:Math.ceil(Math.sqrt(d)))),m=Math.max(1,Math.ceil(d/p)),h=!(t.clusterLabels&&t.clusterLabels.show===!1),g=h&&t.clusterLabels&&t.clusterLabels.position===`bottom`,_=h&&!g?22:4,v=h&&g?22:4,y=r/p,b=i/m,x=Math.max(4,y*.86),S=Math.max(4,b-_-v),C=t.spacing>0?t.spacing:1,w=this._fixedRadius(t),T=0;w?(T=2*w*C,this._lastDotR=w):(T=Math.min(x/o,S/l),this._lastDotR=Math.max(1,T/(2*C)));let E=o*T,D=l*T,O=(e,t)=>s===`bottom`?e+D-T/2-t*T:e+T/2+t*T,k=[],A=[];return u.forEach((t,n)=>{let r=n%p,i=Math.floor(n/p),a=r*y,s=i*b,l=a+(y-E)/2+T/2,u=s+_+(S-D)/2,d=e=>({x:l+e%o*T,y:O(u,Math.floor(e/o))});for(let e=0;e<c;e++)k.push(d(e));let m=Math.max(0,Math.min(c,Math.round(e[t]/f*c))),h=[];for(let e=0;e<m;e++){let t=d(e);h.push({x:t.x,y:t.y,slot:n*c+e})}A.push({i:t,cx:a+y/2,cy:u+D/2,outerR:D/2,flat:!0,split:!0,dots:h})}),this._gridDenom=f,this._gridTrack={cells:k},A}_drawGridTrack(e,t,n){let r=this._gridTrack;if(!r||!r.cells||!r.cells.length)return;let i=this._lastDotR,a=(n.grid||{}).trackColor||`rgba(128,128,128,0.14)`,o=t.group({class:`apexcharts-unit-track`});r.cells.forEach(e=>{let r;if(n.shape===`square`){let o=i*2;r=t.drawRect(0,0,o,o,n.borderRadius||0,a,1,0,`none`),r.node.setAttribute(`fill`,a),r.node.setAttribute(`x`,String(e.x-i)),r.node.setAttribute(`y`,String(e.y-i))}else r=t.drawCircle(i,{fill:a,"stroke-width":0,stroke:`none`}),r.node.setAttribute(`fill`,a),r.node.setAttribute(`cx`,String(e.x)),r.node.setAttribute(`cy`,String(e.y));r.node.classList.add(`apexcharts-unit-track-cell`),o.add(r)}),e.add(o)}_layoutScatter(e){let t=this.w,n=e.scatter||{};if(n.y===`value`)return this._layoutScatter2D(e);if(n.orientation===`vertical`)return this._layoutScatterVertical(e);let r=t.layout.gridWidth,i=t.layout.gridHeight,a=t.seriesData.unitData||[],o=t.seriesData.seriesNames||[],s=e=>this._unitValueOf(e),c=this._scatterSizeStats(n,a),l=a.map(e=>Array.isArray(e)?e.map(s):[]),u=e=>e!=null&&isFinite(e),d=l.map((e,t)=>t).filter(e=>l[e].some(u)),f=Math.max(1,d.length),p=1/0,m=-1/0;l.forEach(e=>e.forEach(e=>{e!=null&&isFinite(e)&&(e<p&&(p=e),e>m&&(m=e))})),p===1/0&&(p=0,m=1);let h=Math.max(2,Math.round(n.tickAmount>0?n.tickAmount:5)),g=this._scatterValueDomain(n,p,m,h),_=g.min,v=g.max,y=v-_||1,b=n.laneLabelWidth==null?f>1?92:8:Math.max(0,n.laneLabelWidth),x=30+(n.xTitle?20:0),S=b,C=r-8,w=i-x,T=Math.max(4,C-S),E=Math.max(4,w-10),D=e=>S+(e-_)/y*T,O=E/f,k=e=>10+O*(e+.5),A=0,j=this._fixedRadius(e);if(j)A=j;else{let e=Math.max(1,...d.map(e=>l[e].filter(u).length));A=Math.max(2,Math.min(6,O*.12,T/(2.5*Math.sqrt(e))))}this._lastDotR=A;let ee=e.spacing>0?e.spacing:1,te=Math.max(.5,A*ee),M=n.spread===`jitter`,N=[],ne=[],re=c?c.rMax:A;return d.forEach((e,t)=>{let n=k(t);ne.push({i:e,cy:n,name:o[e]||`series-${e+1}`});let r=(a[e]||[]).map((e,t)=>{let r=s(e),i={j:t,px:D(u(r)?r:_),y:n};return c&&(i.r=this._scatterRadius(e,c,A)),i});if(M){let e=Math.max(re,O/2-re);r.forEach((t,r)=>{t.y=n+((r*9301+49297)%233280/233280*2-1)*e})}else this._beeswarm(r,n,A,te,re);N.push({i:e,cx:(S+C)/2,cy:n,outerR:O/2,dots:r.map(e=>({x:e.px,y:e.y,r:e.r}))})}),this._scatterAxis={mode:`1d`,plotL:S,plotR:C,plotT:10,plotB:w,xMin:_,xMax:v,plotX:D,ticks:g.ticks,lanes:ne,xTitle:n.xTitle,formatter:typeof n.xFormatter==`function`?n.xFormatter:null,gridlines:n.gridlines!==!1},N}_layoutScatterVertical(e){let t=this.w,n=e.scatter||{},r=t.layout.gridWidth,i=t.layout.gridHeight,a=t.seriesData.unitData||[],o=t.seriesData.seriesNames||[],s=e=>this._unitValueOf(e),c=this._scatterSizeStats(n,a),l=a.map(e=>Array.isArray(e)?e.map(s):[]),u=e=>e!=null&&isFinite(e),d=l.map((e,t)=>t).filter(e=>l[e].some(u)),f=Math.max(1,d.length),p=1/0,m=-1/0;l.forEach(e=>e.forEach(e=>{e!=null&&isFinite(e)&&(e<p&&(p=e),e>m&&(m=e))})),p===1/0&&(p=0,m=1);let h=Math.max(2,Math.round(n.tickAmount>0?n.tickAmount:5)),g=this._scatterValueDomain(n,p,m,h),_=g.min,v=g.max,y=v-_||1,b=46+(n.xTitle?18:0),x=f>1?26:10,S=b,C=r-10,w=i-x,T=Math.max(4,C-S),E=Math.max(4,w-10),D=e=>w-(e-_)/y*E,O=T/f,k=e=>S+O*(e+.5),A=0,j=this._fixedRadius(e);if(j)A=j;else{let e=Math.max(1,...d.map(e=>l[e].filter(u).length));A=Math.max(2,Math.min(6,O*.12,E/(2.5*Math.sqrt(e))))}this._lastDotR=A;let ee=e.spacing>0?e.spacing:1,te=Math.max(.5,A*ee),M=n.spread===`jitter`,N=[],ne=[],re=c?c.rMax:A;return d.forEach((e,t)=>{let n=k(t);ne.push({i:e,cx:n,name:o[e]||`series-${e+1}`});let r=(a[e]||[]).map((e,t)=>{let r=s(e),i={j:t,py:D(u(r)?r:_),x:n};return c&&(i.r=this._scatterRadius(e,c,A)),i});if(M){let e=Math.max(re,O/2-re);r.forEach((t,r)=>{t.x=n+((r*9301+49297)%233280/233280*2-1)*e})}else this._beeswarm(r,n,A,te,re,!0);N.push({i:e,cx:n,cy:(10+w)/2,outerR:O/2,dots:r.map(e=>({x:e.x,y:e.py,r:e.r}))})}),this._scatterAxis={mode:`1d`,orientation:`vertical`,plotL:S,plotR:C,plotT:10,plotB:w,vMin:_,vMax:v,plotY:D,ticks:g.ticks,lanes:ne,valueTitle:n.xTitle,formatter:typeof n.xFormatter==`function`?n.xFormatter:null,gridlines:n.gridlines!==!1},N}_layoutScatter2D(e){let t=this.w,n=t.layout.gridWidth,r=t.layout.gridHeight,i=e.scatter||{},a=t.seriesData.unitData||[],o=e=>typeof e==`number`&&isFinite(e),s=e=>e&&typeof e==`object`?e.x:null,c=e=>e&&typeof e==`object`?e.y==null?e.value:e.y:null,l=a.map((e,t)=>t).filter(e=>(a[e]||[]).some(e=>o(s(e))&&o(c(e)))),u=1/0,d=-1/0,f=1/0,p=-1/0;a.forEach(e=>(e||[]).forEach(e=>{let t=s(e),n=c(e);o(t)&&o(n)&&(t<u&&(u=t),t>d&&(d=t),n<f&&(f=n),n>p&&(p=n))})),u===1/0&&(u=0,d=1,f=0,p=1);let m=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),h=Math.max(2,Math.round(i.yTickAmount>0?i.yTickAmount:5)),g=this._niceScale(i.xMin==null?u:i.xMin,i.xMax==null?d:i.xMax,m),_=this._niceScale(i.yMin==null?f:i.yMin,i.yMax==null?p:i.yMax,h),v=i.xMin==null?g.min:i.xMin,y=i.xMax==null?g.max:i.xMax,b=i.yMin==null?_.min:i.yMin,x=i.yMax==null?_.max:i.yMax,S=y-v||1,C=x-b||1,w=46+(i.yTitle?18:0),T=30+(i.xTitle?20:0),E=w,D=n-12,O=r-T,k=Math.max(4,D-E),A=Math.max(4,O-10),j=e=>E+(e-v)/S*k,ee=e=>O-(e-b)/C*A,te=this._scatterSizeStats(i,a),M=this._fixedRadius(e)||5;this._lastDotR=M;let N=[];l.forEach(e=>{let t=(a[e]||[]).map(e=>{let t=s(e),n=c(e);return{x:j(o(t)?t:v),y:ee(o(n)?n:b),r:te?this._scatterRadius(e,te,M):void 0}});N.push({i:e,cx:(E+D)/2,cy:(10+O)/2,outerR:A/2,dots:t})});let ne=(e,t,n,r,i,a)=>{let o=[];if(i)for(let t=0;t<a;t++)o.push(e+n*t/(a-1));else{let i=r||n/Math.max(1,a-1);for(let n=e;n<=t+i*.5;n+=i)o.push(Math.abs(n)<i*1e-9?0:n)}return o};return this._scatterAxis={mode:`2d`,plotL:E,plotR:D,plotT:10,plotB:O,plotX:j,plotY:ee,xTicks:ne(v,y,S,g.spacing,i.xMin!=null||i.xMax!=null,m),yTicks:ne(b,x,C,_.spacing,i.yMin!=null||i.yMax!=null,h),xTitle:i.xTitle,yTitle:i.yTitle,xFormatter:typeof i.xFormatter==`function`?i.xFormatter:null,yFormatter:typeof i.yFormatter==`function`?i.yFormatter:null,gridlines:i.gridlines!==!1},N}_scatterSizeStats(e,t){let n=e&&e.sizeRange;if(!Array.isArray(n)||n.length<2)return null;let r=Math.max(.5,+n[0]),i=Math.max(r,+n[1]),a=e.sizeField||`z`,o=1/0,s=-1/0;return t.forEach(e=>(e||[]).forEach(e=>{let t=e&&typeof e==`object`?e[a]:null;typeof t==`number`&&isFinite(t)&&(t<o&&(o=t),t>s&&(s=t))})),o===1/0?null:{zmin:o,zmax:s,rMin:r,rMax:i,field:a}}_scatterRadius(e,t,n){if(!t)return n;let r=e&&typeof e==`object`?e[t.field]:null;if(typeof r!=`number`||!isFinite(r))return t.rMin;let i=t.zmax>t.zmin?(r-t.zmin)/(t.zmax-t.zmin):1,a=Math.max(0,Math.min(1,i)),o=t.rMin*t.rMin,s=t.rMax*t.rMax;return Math.sqrt(o+a*(s-o))}_beeswarm(e,t,n,r,i,a=!1){let o=a?`py`:`px`,s=a?`x`:`y`,c=e.slice().sort((e,t)=>e[o]-t[o]),l=[],u=i??n;c.forEach(e=>{let i=e.r==null?n:e.r,a=0;for(let n=0;n<2e3;n++){let s=n===0?0:Math.ceil(n/2)*r*(n%2?1:-1),c=t+s,d=!0;for(let t=l.length-1;t>=0;t--){let n=l[t],r=e[o]-n.f;if(r>i+u)break;let a=i+n.r,s=c-n.s;if(r*r+s*s<a*a){d=!1;break}}if(d){a=s;break}}e[s]=t+a,l.push({f:e[o],s:e[s],r:i})})}_scatterValueDomain(e,t,n,r){let i=(e,t,n)=>{let r=[];for(let i=e;i<=t+n*.5;i+=n)r.push(Math.abs(i)<n*1e-9?0:i);return r};if(e.xMin!=null||e.xMax!=null){let a=e.xMin==null?t:e.xMin,o=e.xMax==null?n:e.xMax;o>a||(o=a+1);let s=(o-a)/Math.max(1,r-1);return t<a&&(a-=Math.ceil((a-t)/s)*s),n>o&&(o+=Math.ceil((n-o)/s)*s),{min:a,max:o,ticks:i(a,o,s)}}let a=this._niceScale(t,n,r),o=a.spacing||(a.max-a.min)/Math.max(1,r-1);return{min:a.min,max:a.max,ticks:i(a.min,a.max,o)}}_niceScale(e,t,n){let r=e,i=t;i>r||(i=r+1);let a=this._niceNum(i-r,!1),o=this._niceNum(a/Math.max(1,n-1),!0);return{min:Math.floor(r/o)*o,max:Math.ceil(i/o)*o,spacing:o}}_niceNum(e,t){let n=e>0?e:1,r=Math.floor(Math.log(n)/Math.LN10),i=n/10**r,a;return a=t?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10,a*10**r}_drawScatterAxes(e,t){let n=this.w;if(!d_.isBrowser())return;let r=this._scatterAxis;if(!r)return;let i=`http://www.w3.org/2000/svg`,a=t.group({class:`apexcharts-unit-axis`}),o=n.config.grid&&n.config.grid.borderColor||`rgba(128,128,128,0.18)`,s=`rgba(128,128,128,0.5)`,c=n.config.xaxis&&n.config.xaxis.labels&&n.config.xaxis.labels.style&&n.config.xaxis.labels.style.colors,l=Array.isArray(c)?c[0]:c,u=l||`rgba(120,130,140,0.9)`,d=(e,t,n,r,o)=>{let s=Q.createElementNS(i,`line`);s.setAttribute(`x1`,String(e)),s.setAttribute(`y1`,String(t)),s.setAttribute(`x2`,String(n)),s.setAttribute(`y2`,String(r)),s.setAttribute(`stroke`,o),s.setAttribute(`shape-rendering`,`crispEdges`),a.node.appendChild(s)},f=(e,t,r,o,s,c,l,u)=>{let d=Q.createElementNS(i,`text`);d.setAttribute(`class`,u),d.setAttribute(`x`,String(t)),d.setAttribute(`y`,String(r)),d.setAttribute(`text-anchor`,o),d.setAttribute(`dominant-baseline`,`middle`),d.setAttribute(`font-size`,`${c}px`),d.setAttribute(`font-family`,n.config.chart.fontFamily||`inherit`),d.setAttribute(`font-weight`,String(l)),d.setAttribute(`fill`,s),d.textContent=e,a.node.appendChild(d)};if(r.mode===`2d`){if(r.yTicks.forEach(e=>{let t=r.plotY(e);r.gridlines&&d(r.plotL,t,r.plotR,t,o),f(r.yFormatter?String(r.yFormatter(e)):this._formatTick(e),r.plotL-8,t,`end`,u,11,400,`apexcharts-unit-tick`)}),r.xTicks.forEach(e=>{let t=r.plotX(e);r.gridlines&&d(t,r.plotT,t,r.plotB,o),f(r.xFormatter?String(r.xFormatter(e)):this._formatTick(e),t,r.plotB+14,`middle`,u,11,400,`apexcharts-unit-tick`)}),d(r.plotL,r.plotB,r.plotR,r.plotB,s),d(r.plotL,r.plotT,r.plotL,r.plotB,s),r.xTitle&&f(String(r.xTitle),(r.plotL+r.plotR)/2,r.plotB+32,`middle`,u,12,600,`apexcharts-unit-axis-title`),r.yTitle){let e=Q.createElementNS(i,`text`);e.setAttribute(`class`,`apexcharts-unit-axis-title`);let t=(r.plotT+r.plotB)/2;e.setAttribute(`x`,`14`),e.setAttribute(`y`,String(t)),e.setAttribute(`text-anchor`,`middle`),e.setAttribute(`font-size`,`12px`),e.setAttribute(`font-family`,n.config.chart.fontFamily||`inherit`),e.setAttribute(`font-weight`,`600`),e.setAttribute(`fill`,u),e.setAttribute(`transform`,`rotate(-90 14 ${t})`),e.textContent=String(r.yTitle),a.node.appendChild(e)}e.add(a);return}if(r.orientation===`vertical`){if(r.ticks.forEach(e=>{let t=r.plotY(e);r.gridlines&&d(r.plotL,t,r.plotR,t,o),f(r.formatter?String(r.formatter(e)):this._formatTick(e),r.plotL-8,t,`end`,u,11,400,`apexcharts-unit-tick`)}),d(r.plotL,r.plotT,r.plotL,r.plotB,s),r.valueTitle){let e=Q.createElementNS(i,`text`);e.setAttribute(`class`,`apexcharts-unit-axis-title`);let t=(r.plotT+r.plotB)/2;e.setAttribute(`x`,`14`),e.setAttribute(`y`,String(t)),e.setAttribute(`text-anchor`,`middle`),e.setAttribute(`font-size`,`12px`),e.setAttribute(`font-family`,n.config.chart.fontFamily||`inherit`),e.setAttribute(`font-weight`,`600`),e.setAttribute(`fill`,u),e.setAttribute(`transform`,`rotate(-90 14 ${t})`),e.textContent=String(r.valueTitle),a.node.appendChild(e)}r.lanes.forEach(e=>{let t=l||n.globals.colors[e.i]||n.globals.colors[0]||`#008FFB`;f(e.name,e.cx,r.plotB+16,`middle`,t,12,600,`apexcharts-unit-lane-label`)}),e.add(a);return}r.ticks.forEach((e,t)=>{let n=r.plotX(e);r.gridlines&&d(n,r.plotT,n,r.plotB,o);let i=r.formatter?String(r.formatter(e)):this._formatTick(e),a=t===0?`start`:t===r.ticks.length-1?`end`:`middle`;f(i,n,r.plotB+14,a,u,11,400,`apexcharts-unit-tick`)}),d(r.plotL,r.plotB,r.plotR,r.plotB,s),r.xTitle&&f(String(r.xTitle),(r.plotL+r.plotR)/2,r.plotB+32,`middle`,u,12,600,`apexcharts-unit-axis-title`),r.plotL>12&&r.lanes.forEach(e=>{let t=l||n.globals.colors[e.i]||n.globals.colors[0]||`#008FFB`;f(e.name,r.plotL-8,e.cy,`end`,t,12,600,`apexcharts-unit-lane-label`)}),e.add(a)}_formatTick(e){if(!isFinite(e))return``;let t=Math.abs(e);return t>=1e6?`${+(e/1e6).toFixed(1)}M`:t>=1e4?`${+(e/1e3).toFixed(1)}k`:Number.isInteger(e)?String(e):String(+e.toFixed(2))}_largestRemainder(e,t){let n=e.reduce((e,t)=>e+t,0);if(n<=0||t<=0)return e.map(()=>0);let r=e.map(e=>e/n*t),i=r.map(e=>Math.floor(e)),a=i.reduce((e,t)=>e+t,0),o=Math.max(0,t-a),s=r.map((e,t)=>({i:t,frac:e-Math.floor(e)})).sort((e,t)=>t.frac-e.frac),c=i.slice();for(let e=0;e<o&&e<s.length;e++)c[s[e].i]++;return c}_spiral(e,t,n,r,i){let a=[];for(let o=0;o<n;o++){let n=i+o,s=r*Math.sqrt(n+.5),c=n*$x;a.push({x:e+s*Math.cos(c),y:t+s*Math.sin(c)})}return a}_fixedRadius(e){return e.shape===`image`&&e.image?Math.max(e.image.width||20,e.image.height||20)/2:this._bubbleActive(e)&&typeof e.sizeByValue.maxRadius==`number`?e.sizeByValue.maxRadius>0?e.sizeByValue.maxRadius:null:typeof e.size==`number`&&e.size>0?e.size:null}_bubbleActive(e){let t=e.sizeByValue;return!!(t&&t.enabled&&e.shape!==`image`&&e.shape!==`square`)}_unitValueOf(e){if(typeof e==`number`)return e;if(e&&typeof e==`object`){let t=e.value==null?e.y:e.value;return typeof t==`number`?t:null}return null}_radiusForValue(e,t){if(e==null||!isFinite(e))return t.minR;let n=t.max>t.min?(e-t.min)/(t.max-t.min):1,r=Math.max(0,Math.min(1,n));if(t.scale===`linear`)return t.minR+r*(t.maxR-t.minR);let i=t.minR*t.minR,a=t.maxR*t.maxR;return Math.sqrt(i+r*(a-i))}_bubbleStats(e,t,n){if(!this._bubbleActive(t))return null;let r=1/0,i=-1/0;if(e.forEach(e=>{e&&e.forEach(e=>{let t=this._unitValueOf(e);t!=null&&isFinite(t)&&(t<r&&(r=t),t>i&&(i=t))})}),r===1/0||i<r)return null;let a=t.sizeByValue,o=n,s=Math.max(1,Math.min(o,typeof a.minRadius==`number`?a.minRadius:o*.35));return{min:r,max:i,minR:s,maxR:o,scale:a.scale===`linear`?`linear`:`area`}}_resolveStep(e,t,n){let r=e.spacing>0?e.spacing:1,i=this._fixedRadius(e);return i?2*i*r:t/(Math.sqrt(Math.max(1,n))+.5)}_dotRadiusFromStep(e,t){let n=t.spacing>0?t.spacing:1;return this._fixedRadius(t)||Math.max(1,e/(2*n))}_isCorner(e){return e.shape===`square`||e.shape===`image`}_halfExtent(e,t){if(e.shape===`image`&&e.image)return{hx:(e.image.width||20)/2,hy:(e.image.height||20)/2};let n=t??this._lastDotR;return{hx:n,hy:n}}_place(e,t,n,r){let i=t;i.pk===sS?e.setAttribute(`transform`,`translate(`+(n-i.ox)+`,`+(r-i.oy)+i.tail):i.pk===oS?(e.setAttribute(`x`,String(n-i.hx)),e.setAttribute(`y`,String(r-i.hy))):(e.setAttribute(`cx`,String(n)),e.setAttribute(`cy`,String(r)))}_baseSpec(e,t){let n=t??this._lastDotR;if(!this._isCorner(e))return{pk:aS,r:n};let{hx:r,hy:i}=this._halfExtent(e,n);return{pk:oS,hx:r,hy:i,r:n}}_resolveMark(e){if(e==null)return null;if(typeof e==`object`)return Zx(e);if(typeof e!=`string`||!e)return null;let t=e.trim();return t[0]===`M`||t[0]===`m`?Zx(t):Qx(t)||(this._markWarned||=new Set,this._markWarned.has(t)||(this._markWarned.add(t),console.warn(`[ApexCharts] unit chart: no mark named "${t}" is registered. Register one with ApexCharts.registerUnitMark("${t}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(e,t,n){let r=Math.round(t*10)/10,i=e.name+`|`+e.path.length+`|`+r,a=this._specCache.get(i);if(a)return a;let o=e.viewBox||[0,0,100,100],s=Math.max(0,Math.min(.9,n.padding||0)),c=typeof n.scale==`number`&&n.scale>0?n.scale:1,l=2*r*(1-s)*c,u=n.fit===`width`?l/o[2]:n.fit===`height`?l/o[3]:l/Math.max(o[2],o[3]),d=Object.freeze({pk:sS,mark:e,d:e.path,fillRule:e.fillRule,s:u,ox:(o[0]+o[2]/2)*u,oy:(o[1]+o[3]/2)*u,tail:`) scale(`+u+`)`,r});return this._specCache.set(i,d),d}_markSpecFor(e,t,n,r){if(e.shape!==`pictogram`)return this._baseSpec(e,r);let i=e.pictogram||{},a=t&&typeof t==`object`?t.mark:void 0,o=Array.isArray(i.mark)?i.mark[n%i.mark.length]:i.mark,s=this._resolveMark(a??o);return s?this._glyphSpec(s,r,i):this._baseSpec(X(Y({},e),{shape:i.fallback===`square`?`square`:`circle`}),r)}_drawDot(e,t,n,r,i,a,o){let s=this.w,c=s.config.stroke.show?s.config.stroke.width:0,l=Array.isArray(s.globals.stroke.colors)&&s.globals.stroke.colors[i]||`none`,u=typeof s.config.fill.opacity==`number`?s.config.fill.opacity:1,d;if(o&&o.pk===sS)d=s.dom.Paper.path(o.d),d.node.setAttribute(`fill`,r),o.fillRule===`evenodd`&&d.node.setAttribute(`fill-rule`,`evenodd`),u<1&&d.node.setAttribute(`fill-opacity`,String(u)),d.node.setAttribute(`data:r`,String(o.r));else if(t.shape===`image`&&t.image&&t.image.src){let e=t.image.width||20,n=t.image.height||20;d=s.dom.Paper.image(t.image.src),d.node.setAttribute(`width`,String(e)),d.node.setAttribute(`height`,String(n)),d.node.setAttribute(`preserveAspectRatio`,`xMidYMid meet`),t.image.tint&&d.node.setAttribute(`filter`,`url(#${this._tintFilter(r)})`)}else if(t.shape===`square`){let i=n*2;d=e.drawRect(0,0,i,i,t.borderRadius||0,r,1,c,l),d.node.setAttribute(`fill`,r),u<1&&d.node.setAttribute(`fill-opacity`,String(u))}else d=e.drawCircle(n,{fill:r,"stroke-width":c,stroke:l}),d.node.setAttribute(`fill`,r),u<1&&d.node.setAttribute(`fill-opacity`,String(u));return d.node.classList.add(`apexcharts-unit-area`),d.node.setAttribute(`i`,String(i)),d.node.setAttribute(`j`,String(a)),d}_tintFilter(e){let t=this.w,n=`http://www.w3.org/2000/svg`,r=String(e).replace(/[^a-zA-Z0-9]/g,``),i=`apexcharts-unit-tint-${t.globals.chartID}-${r}`,a=t.dom.Paper.node;if(a.querySelector(`#${i}`))return i;let o=a.querySelector(`defs`);o||(o=Q.createElementNS(n,`defs`),a.insertBefore(o,a.firstChild));let s=Q.createElementNS(n,`filter`);s.setAttribute(`id`,i),s.setAttribute(`x`,`0%`),s.setAttribute(`y`,`0%`),s.setAttribute(`width`,`100%`),s.setAttribute(`height`,`100%`);let c=Q.createElementNS(n,`feFlood`);c.setAttribute(`flood-color`,e),c.setAttribute(`result`,`flood`);let l=Q.createElementNS(n,`feComposite`);return l.setAttribute(`in`,`flood`),l.setAttribute(`in2`,`SourceAlpha`),l.setAttribute(`operator`,`in`),s.appendChild(c),s.appendChild(l),o.appendChild(s),i}_placeDot(e,t,n,r,i){this._place(e,i||this._baseSpec(t),n,r)}_rgb(e){if(typeof e!=`string`)return null;let t=e.trim();if(t[0]===`#`){t.length===4&&(t=`#`+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);let e=parseInt(t.slice(1,7),16);return isNaN(e)?null:[e>>16&255,e>>8&255,e&255]}let n=t.match(/rgba?\(([^)]+)\)/);if(n){let e=n[1].split(`,`).map(e=>parseFloat(e));if(e.length>=3&&e.every(e=>!isNaN(e)))return[e[0],e[1],e[2]]}return null}_shouldAnimate(){let e=this.w,t=e.config.chart.animations;return!(!d_.isBrowser()||!t||t.enabled===!1||e.globals.shouldAnimate===!1||e.globals.resized&&!e.globals.dataChanged||t.respectReducedMotion&&Uh())}_seedSprings(e,t,n){let[r,i]=cS(t.spring,n),a=this.ctx?this.ctx._unitSprings:null,o=new Map;for(let t=0;t<e.length;t++){let n=e[t],s=a&&!n.isEnter&&n.key!=null?a.get(n.key):null,c=s?s.x:Bx(n.cx0,r,i),l=s?s.y:Bx(n.cy0,r,i);s&&(c.stiffness=r,l.stiffness=r,c.damping=i,l.damping=i,n.cx0=c.value,n.cy0=l.value,this._place(n.node,n.spec,n.cx0,n.cy0),(c.velocity!==0||l.velocity!==0)&&(n.delay=0)),n.sx=c,n.sy=l,n.key!=null&&o.set(n.key,{x:c,y:l})}this.ctx&&(this.ctx._unitSprings=o)}_runGather(e){let t=this.w,n=t.config.plotOptions.unit,r=Math.max(1,t.config.chart.animations.speed||800),i=Math.min(r*.6,450),a=e.length;for(let t=0;t<a;t++)e[t].delay=a>1?t/(a-1)*i:0;let o=n.gather||{},s=o.motion||`auto`;s===`spring`||s===`auto`&&(!o.easing||o.easing===`outCubic`)?this._seedSprings(e,o,r):this.ctx&&(this.ctx._unitSprings=null);for(let t=0;t<a;t++){let n=e[t];n.spec.pk===aS&&n.r0!=null&&n.r1!=null&&n.r0!==n.r1&&n.node.setAttribute(`r`,String(n.r0))}for(let t=0;t<a;t++){let n=e[t];n.fill0&&n.fill1&&n.fill0!==n.fill1&&(n._c0=this._rgb(n.fill0),n._c1=this._rgb(n.fill1))}let c=o.easing===`outBack`?tS(typeof o.overshoot==`number`?o.overshoot:1.70158):o.easing===`inOutCubic`?nS:eS;this.w.globals.unitGatherRAF!=null&&(Q.cancelAnimationFrame(this.w.globals.unitGatherRAF),this.w.globals.unitGatherRAF=null);let l=performance.now(),u=l,d=t=>{if(this.w.globals.isDestroyed){this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0;return}let n=Math.min(iS,Math.max(0,(t-u)/1e3));u=t;let i=!0;for(let o=0;o<a;o++){let a=e[o],s=t-l-a.delay,u=Math.max(0,Math.min(1,s/r)),d=eS(u),f,p;if(a.sx&&a.sy){s>=0&&!a.released&&(Hx(a.sx,a.x),Hx(a.sy,a.y),a.released=!0);let e=Vx(a.sx,n),t=Vx(a.sy,n);(!a.released||!e||!t)&&(i=!1),f=a.sx.value,p=a.sy.value}else{let e=c(u);f=a.cx0+(a.x-a.cx0)*e,p=a.cy0+(a.y-a.cy0)*e}if(this._place(a.node,a.spec,f,p),a.isEnter&&(a.node.style.opacity=String(Math.min(1,u*2.5))),a._c0&&a._c1){let e=Math.round(a._c0[0]+(a._c1[0]-a._c0[0])*d),t=Math.round(a._c0[1]+(a._c1[1]-a._c0[1])*d),n=Math.round(a._c0[2]+(a._c1[2]-a._c0[2])*d);a.node.setAttribute(`fill`,`rgb(${e},${t},${n})`)}a.spec.pk===aS&&a.r0!=null&&a.r1!=null&&a.r0!==a.r1&&a.node.setAttribute(`r`,String(a.r0+(a.r1-a.r0)*d)),u<1&&(i=!1)}if(i){for(let t=0;t<a;t++){let n=e[t];n.node.style.opacity=``,n._c1&&n.fill1&&n.node.setAttribute(`fill`,n.fill1),n.spec.pk===aS&&n.r0!=null&&n.r1!=null&&n.r0!==n.r1&&n.node.setAttribute(`r`,String(n.r1))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=Q.requestAnimationFrame(d)};this.w.globals.unitGatherRAF=Q.requestAnimationFrame(d)}_collectExits(e,t,n){let r=Math.max(0,n.maxUnits||5e3),i=[];for(let[n,a]of e)if(!t.has(n)&&(i.push(a),i.length>=r))break;return i}_runExits(e,t,n){let r=this.w,i=new Z(r,this.ctx),a=this._lastDotR,o=r.layout.gridWidth/2,s=r.layout.gridHeight/2,c=n.layout===`grid`||n.layout===`scatter`||n.layout===`arc`||n.layout===`custom`?0:.35,l=[];if(t.forEach(t=>{let r=t.r==null?a:t.r,o=t.spec||this._baseSpec(n,r),s=this._drawDot(i,n,r,t.fill,0,0,o);s.node.classList.add(`apexcharts-unit-exit`),this._place(s.node,o,t.x,t.y),e.add(s),l.push({node:s.node,x0:t.x,y0:t.y,spec:o})}),!this._shouldAnimate()){l.forEach(e=>e.node.remove());return}let u=Math.max(1,r.config.chart.animations.speed||800);this.w.globals.unitExitRAF!=null&&(Q.cancelAnimationFrame(this.w.globals.unitExitRAF),this.w.globals.unitExitRAF=null);let d=performance.now(),f=t=>{if(this.w.globals.isDestroyed){this.w.globals.unitExitRAF=null;return}let n=Math.max(0,Math.min(1,(t-d)/u)),r=eS(n);for(let e=0;e<l.length;e++){let t=l[e];if(c){let e=t.x0+(o-t.x0)*r*c,n=t.y0+(s-t.y0)*r*c;this._place(t.node,t.spec,e,n)}t.node.style.opacity=String(1-r)}n<1?this.w.globals.unitExitRAF=Q.requestAnimationFrame(f):(this.w.globals.unitExitRAF=null,e.node&&e.node.remove())};this.w.globals.unitExitRAF=Q.requestAnimationFrame(f)}_outerLabelsOn(e){let t=e.clusterLabels;return!!(e.layout===`custom`&&t&&t.show!==!1&&t.external&&t.external.show)}_outerLabelLines(e,t,n,r){let i=this.w,a=i.seriesData.seriesNames[e]||`series-${e+1}`,o=n>0?t/n*100:0,s=r.clusterLabels,c=typeof s.formatter==`function`?s.formatter(a,{seriesIndex:e,value:t,percent:o,w:i}):`${a}
|
|
2524
|
+
`,V_=class{constructor(e,t){this.w=e,this.ctx=t,this.ev=this.w.config.chart.events,this.selectedClass=`apexcharts-selected`,this.localeValues=this.w.globals.locale.toolbar,this.minX=e.globals.minX,this.maxX=e.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){var e,t;let n=this.w,r=()=>Q.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),i=()=>{let e=Q.createElementNS(`http://www.w3.org/1999/xhtml`,`button`);return e.setAttribute(`type`,`button`),e},a=r();if(a.setAttribute(`class`,`apexcharts-toolbar`),a.style.top=n.config.chart.toolbar.offsetY+`px`,a.style.right=-n.config.chart.toolbar.offsetX+3+`px`,n.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elMeasure=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=r(),this.elCustomIcons=[],this.t=n.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons.push(i());let o=[],s=(e,t,r)=>{let i=e.toLowerCase();this.t[i]&&n.config.chart.zoom.enabled&&o.push({el:t,icon:typeof this.t[i]==`string`?this.t[i]:r,title:this.localeValues[e],class:`apexcharts-${i}-icon`})};s(`zoomIn`,this.elZoomIn,I_),s(`zoomOut`,this.elZoomOut,L_);let c=e=>{this.t[e]&&n.config.chart[e].enabled&&o.push({el:e===`zoom`?this.elZoom:this.elSelection,icon:typeof this.t[e]==`string`?this.t[e]:e===`zoom`?P_:R_,title:this.localeValues[e===`zoom`?`selectionZoom`:`selection`],class:`apexcharts-${e}-icon`})};c(`zoom`),c(`selection`),this.t.pan&&n.config.chart.zoom.enabled&&o.push({el:this.elPan,icon:typeof this.t.pan==`string`?this.t.pan:N_,title:this.localeValues.pan,class:`apexcharts-pan-icon`}),this.t.measure&&n.config.chart.measure&&n.config.chart.measure.enabled&&o.push({el:this.elMeasure,icon:typeof this.t.measure==`string`?this.t.measure:z_,title:this.localeValues.measure||`Measure`,class:`apexcharts-measure-icon`}),s(`reset`,this.elZoomReset,F_),this.t.download&&o.push({el:this.elMenuIcon,icon:typeof this.t.download==`string`?this.t.download:B_,title:this.localeValues.menu,class:`apexcharts-menu-icon`});for(let e=0;e<this.elCustomIcons.length;e++)o.push({el:this.elCustomIcons[e],icon:this.t.customIcons[e].icon,title:this.t.customIcons[e].title,index:this.t.customIcons[e].index,class:`apexcharts-toolbar-custom-icon `+this.t.customIcons[e].class});o.forEach((e,t)=>{e.index&&$.moveIndexInArray(o,t,e.index)});for(let e=0;e<o.length;e++)Z.setAttrs(o[e].el,{class:o[e].class,title:o[e].title,"aria-label":o[e].title}),o[e].el.innerHTML=o[e].icon,a.appendChild(o[e].el);this.elZoom.parentNode&&this.elZoom.setAttribute(`aria-pressed`,String(!!n.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute(`aria-pressed`,String(!!n.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute(`aria-pressed`,String(!!n.interact.panEnabled)),this.elMeasure.parentNode&&this.elMeasure.setAttribute(`aria-pressed`,String(!!n.interact.measureEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute(`aria-haspopup`,`true`),this.elMenuIcon.setAttribute(`aria-expanded`,`false`)),this._createHamburgerMenu(a),n.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):n.interact.panEnabled?this.elPan.classList.add(this.selectedClass):n.interact.selectionEnabled?this.elSelection.classList.add(this.selectedClass):n.interact.measureEnabled&&this.elMeasure&&(this.elMeasure.classList.add(this.selectedClass),(t=(e=this.ctx.measure)?.startMeasure)==null||t.call(e)),this.addToolbarEventListeners()}_createHamburgerMenu(e){this.elMenuItems=[],e.appendChild(this.elMenu),Z.setAttrs(this.elMenu,{class:`apexcharts-menu`,role:`menu`});let t=[{name:`exportSVG`,title:this.localeValues.exportToSVG},{name:`exportPNG`,title:this.localeValues.exportToPNG},{name:`exportCSV`,title:this.localeValues.exportToCSV}];for(let e=0;e<t.length;e++)this.elMenuItems.push(Q.createElementNS(`http://www.w3.org/1999/xhtml`,`div`)),this.elMenuItems[e].innerHTML=t[e].title,Z.setAttrs(this.elMenuItems[e],{class:`apexcharts-menu-item ${t[e].name}`,title:t[e].title,role:`menuitem`,tabindex:`-1`}),this.elMenu.appendChild(this.elMenuItems[e])}addToolbarEventListeners(){var e,t,n,r,i,a,o,s,c;(e=this.elZoomReset)==null||e.addEventListener(`click`,this.handleZoomReset.bind(this)),(t=this.elSelection)==null||t.addEventListener(`click`,this.toggleZoomSelection.bind(this,`selection`)),(n=this.elZoom)==null||n.addEventListener(`click`,this.toggleZoomSelection.bind(this,`zoom`)),(r=this.elZoomIn)==null||r.addEventListener(`click`,this.handleZoomIn.bind(this)),(i=this.elZoomOut)==null||i.addEventListener(`click`,this.handleZoomOut.bind(this)),(a=this.elPan)==null||a.addEventListener(`click`,this.togglePanning.bind(this)),(o=this.elMeasure)==null||o.addEventListener(`click`,this.toggleMeasure.bind(this)),(s=this.elMenuIcon)==null||s.addEventListener(`click`,this.toggleMenu.bind(this)),this.elMenuItems.forEach(e=>{e.classList.contains(`exportSVG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`svg`)):e.classList.contains(`exportPNG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`png`)):e.classList.contains(`exportCSV`)&&e.addEventListener(`click`,this.handleDownload.bind(this,`csv`))});for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener(`click`,this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMeasure,this.elMenuIcon,...this.elCustomIcons].forEach(e=>{e.addEventListener(`keydown`,t=>{if(t.key===`Enter`||t.key===` `){t.preventDefault();let n=e.className;e.click(),requestAnimationFrame(()=>{let e=this.w.dom.baseEl;if(!e)return;let t=n.split(` `).find(e=>e.startsWith(`apexcharts-`));if(!t)return;let r=e.querySelector(`.${t}`);r&&r.focus()})}})}),(c=this.elMenuIcon)==null||c.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this.elMenu?.classList.contains(`apexcharts-menu-open`)||this.toggleMenu(),window.setTimeout(()=>{let t=e.key===`ArrowDown`?0:this.elMenuItems.length-1;this.elMenuItems[t]&&this.elMenuItems[t].focus()},20))}),this.elMenuItems.forEach((e,t)=>{e.addEventListener(`keydown`,n=>{var r;n.key===`ArrowDown`?(n.preventDefault(),(this.elMenuItems[t+1]||this.elMenuItems[0]).focus()):n.key===`ArrowUp`?(n.preventDefault(),(this.elMenuItems[t-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):n.key===`Escape`||n.key===`Tab`?(this._closeMenu(),(r=this.elMenuIcon)==null||r.focus(),n.key===`Tab`||n.preventDefault()):(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),e.click())})})}toggleZoomSelection(e){this.ctx.getSyncedCharts().forEach(t=>{let n=t.ctx.toolbar,r=e===`selection`?`selectionEnabled`:`zoomEnabled`,i=!!t.w.globals[r];n.toggleOtherControls();let a=e===`selection`?n.elSelection:n.elZoom;i||(t.w.globals[r]=!0,a.classList.add(n.selectedClass)),a.setAttribute(`aria-pressed`,String(!!t.w.globals[r]))})}toggleMeasure(){var e,t,n,r;let i=this.w,a=!i.interact.measureEnabled;this.toggleOtherControls(),a&&(i.interact.measureEnabled=!0,(e=this.elMeasure)==null||e.classList.add(this.selectedClass),(n=(t=this.ctx.measure)?.startMeasure)==null||n.call(t)),(r=this.elMeasure)==null||r.setAttribute(`aria-pressed`,String(i.interact.measureEnabled))}getToolbarIconsReference(){let e=this.w;this.elZoom||=e.dom.baseEl.querySelector(`.apexcharts-zoom-icon`),this.elPan||=e.dom.baseEl.querySelector(`.apexcharts-pan-icon`),this.elSelection||=e.dom.baseEl.querySelector(`.apexcharts-selection-icon`),this.elMeasure||=e.dom.baseEl.querySelector(`.apexcharts-measure-icon`)}enableZoomPanFromToolbar(e){this.toggleOtherControls(),e===`pan`?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;let t=e===`pan`?this.elPan:this.elZoom,n=e===`pan`?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),n&&n.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{let t=e.ctx.toolbar,n=!!e.w.interact.panEnabled;t.toggleOtherControls(),n||(e.w.interact.panEnabled=!0,t.elPan.classList.add(t.selectedClass)),t.elPan.setAttribute(`aria-pressed`,String(!!e.w.interact.panEnabled))})}toggleOtherControls(){var e,t,n;let r=this.w;r.interact.panEnabled=!1,r.interact.zoomEnabled=!1,r.interact.selectionEnabled=!1,r.interact.measureEnabled&&(r.interact.measureEnabled=!1,(t=(e=this.ctx.measure)?.stopMeasure)==null||t.call(e),(n=this.elMeasure)==null||n.setAttribute(`aria-pressed`,`false`)),this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom,this.elMeasure].forEach(e=>{e&&e.classList.remove(this.selectedClass)})}_currentXRange(){let e=this.w;return e.axisFlags.isRangeBar?{minX:e.globals.minY,maxX:e.globals.maxY}:{minX:e.globals.minX,maxX:e.globals.maxX}}handleZoomIn(){let e=this.w,{minX:t,maxX:n}=this._currentXRange();this.minX=t,this.maxX=n;let r=(t+n)/2,i=(t+r)/2,a=(n+r)/2,o=this._getNewMinXMaxX(i,a);e.interact.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}handleZoomOut(){let e=this.w,{minX:t,maxX:n}=this._currentXRange();if(this.minX=t,this.maxX=n,e.config.xaxis.type===`datetime`&&new Date(t).getUTCFullYear()<1e3)return;let r=(t+n)/2,i=t-(r-t),a=n-(r-n),o=this._getNewMinXMaxX(i,a);e.interact.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}_getNewMinXMaxX(e,t){let n=this.w.config.xaxis.convertedCatToNumeric;return{minX:n?Math.floor(e):e,maxX:n?Math.floor(t):t}}zoomUpdateOptions(e,t){let n=this.w;if(e===void 0&&t===void 0){this.handleZoomReset();return}if(n.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=n.globals.dataPoints),t-e<2))return;let r={min:e,max:t},i=this.getBeforeZoomRange(r,void 0);i&&(r=i.xaxis);let a={xaxis:r};if(!n.globals.initialConfig)return;let o=$.clone(n.globals.initialConfig.yaxis);n.config.chart.group||(a.yaxis=o),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(a,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(r,o)}zoomCallback(e,t){typeof this.ev.zoomed==`function`&&(this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t}),this.ctx.events.fireEvent(`zoomed`,{xaxis:e,yaxis:t}))}getBeforeZoomRange(e,t){let n=null;return typeof this.ev.beforeZoom==`function`&&(n=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),n}toggleMenu(){window.setTimeout(()=>{var e,t;this.elMenu?.classList.contains(`apexcharts-menu-open`)?this._closeMenu():((e=this.elMenu)==null||e.classList.add(`apexcharts-menu-open`),(t=this.elMenuIcon)==null||t.setAttribute(`aria-expanded`,`true`))},0)}_closeMenu(){var e,t;(e=this.elMenu)==null||e.classList.remove(`apexcharts-menu-open`),(t=this.elMenuIcon)==null||t.setAttribute(`aria-expanded`,`false`)}handleDownload(e){let t=this.w,n=new __(this.w,this.ctx);switch(e){case`svg`:n.exportToSVG();break;case`png`:n.exportToPng();break;case`csv`:n.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter});break}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{let t=e.w;if(!t.interact.zoomed)return;if(t.globals.lastXAxis.min=t.globals.initialConfig.xaxis.min,t.globals.lastXAxis.max=t.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof t.config.chart.events.beforeResetZoom==`function`){let n=t.config.chart.events.beforeResetZoom(e,t);n&&e.updateHelpers.revertDefaultAxisMinMax(n)}typeof t.config.chart.events.zoomed==`function`&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max});let n=e.ctx.series.emptyCollapsedSeries($.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(n,t.config.chart.animations.dynamicAnimation.enabled),t.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null}},H_=class e{static xRatio(e){let t=e.layout.gridWidth||1;return(e.globals.maxX-e.globals.minX)/t}static dataXToPx(t,n){return(n-t.globals.minX)/e.xRatio(t)}static pxToDataX(t,n){return t.globals.minX+n*e.xRatio(t)}static screenXToPlotPx(e,t){let n=e.dom.baseEl,r=n&&n.querySelector(`.apexcharts-svg`);if(!r)return t-e.layout.translateX;let i=r.getBoundingClientRect(),a=e.globals.svgWidth?i.width/e.globals.svgWidth:1;return(t-i.left)/(a||1)-e.layout.translateX}},U_=240,W_=.05,G_=.92,K_=.02,q_=16.6667,J_=15,Y_=0,X_=class extends V_{constructor(e,t){super(e,t),this.w=e,this.ctx=t,this.dragged=!1,this.graphics=new Z(this.w),this.eventList=[`mousedown`,`mouseleave`,`mousemove`,`touchstart`,`touchmove`,`mouseup`,`touchend`],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection=`none`}init({xyRatios:e}){let t=this.w,n=this;this.xyRatios=e,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.constraints=new n_(0,0,t.layout.gridWidth,t.layout.gridHeight),this.zoomRect.node.classList.add(`apexcharts-zoom-rect`),this.selectionRect.node.classList.add(`apexcharts-selection-rect`),t.dom.Paper.add(this.zoomRect),t.dom.Paper.add(this.selectionRect),t.config.chart.selection.type===`x`?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:t.layout.gridWidth,maxY:t.layout.gridHeight}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):t.config.chart.selection.type===`y`?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:t.layout.gridWidth}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):this.slDraggableRect=this.selectionRect.draggable().on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)),this.preselectedSelection(),this.hoverArea=t.dom.baseEl.querySelector(`${t.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add(`apexcharts-zoomable`),this.eventList.forEach(t=>{var r;(r=this.hoverArea)==null||r.addEventListener(t,n.svgMouseEvents.bind(n,e),{capture:!1,passive:!0})}),this._wheelZoomEnabled()&&this.hoverArea.addEventListener(`wheel`,n.mouseWheelEvent.bind(n),{capture:!1,passive:!1}),this._momentumEnabled()&&[`touchstart`,`touchmove`,`touchend`,`touchcancel`].forEach(e=>{var t;(t=this.hoverArea)==null||t.addEventListener(e,n.momentumTouch.bind(n),{capture:!1,passive:!1})}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null}svgMouseEvents(e,t){let n=this.w,r=this.ctx.toolbar;if(n.interact.momentum&&n.interact.momentum.busy||this._momentumEnabled()&&t.touches&&t.touches.length>1)return;let i=n.interact.zoomEnabled?n.config.chart.zoom.type:n.config.chart.selection.type,a=n.config.chart.toolbar.autoSelected;if(a!==`measure`&&(t.shiftKey?(n.interact.shiftWasPressed=!0,r.enableZoomPanFromToolbar(a===`pan`?`zoom`:`pan`)):n.interact.shiftWasPressed&&(r.enableZoomPanFromToolbar(a),n.interact.shiftWasPressed=!1)),!t.target)return;let o=t.target.classList,s;if(t.target.parentNode&&t.target.parentNode!==null&&(s=t.target.parentNode.classList),!(o.contains(`apexcharts-legend-marker`)||o.contains(`apexcharts-legend-text`)||s&&s.contains(`apexcharts-toolbar`))){if(this.clientX=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientX:t.type===`touchend`?t.changedTouches[0].clientX:t.clientX,this.clientY=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientY:t.type===`touchend`?t.changedTouches[0].clientY:t.clientY,t.type===`mousedown`&&t.which===1||t.type===`touchstart`){let e=this._gridRect();if(!e)return;this.startX=this._screenXToPlotPx(this.clientX),this.startY=this.clientY-e.top,this.dragged=!1,this.w.interact.mousedown=!0}(t.type===`mousemove`&&t.which===1||t.type===`touchmove`)&&(this.dragged=!0,n.interact.panEnabled?(n.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:i,xyRatios:this.xyRatios})):(this.w.interact.mousedown&&n.interact.zoomEnabled||this.w.interact.mousedown&&n.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:i}))),(t.type===`mouseup`||t.type===`touchend`||t.type===`mouseleave`)&&this.handleMouseUp({zoomtype:i}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:e,isResized:t}){let n=this.w,r=this._gridRect();r&&(this.w.interact.mousedown||t)&&(this.endX=this._screenXToPlotPx(this.clientX),this.endY=this.clientY-r.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(n.interact.zoomEnabled||n.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:e})),n.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}_incidentalZoomEnabled(e){let t=this.w.config.chart;return!t.zoom||!t.zoom.enabled?!1:e===`auto`?!!(t.toolbar?.show&&t.toolbar?.tools?.reset):!!e}_wheelZoomEnabled(){let{zoom:e}=this.w.config.chart;return this._incidentalZoomEnabled(e&&e.allowMouseWheelZoom)}_wheel(){let e=this.w.interact;return e.wheel||={factor:1,clientX:0,rafId:null,endTimer:null},e.wheel}mouseWheelEvent(e){e.preventDefault();let t=this._wheel(),n=e.deltaY;e.deltaMode===1?n*=33:e.deltaMode===2&&(n*=330),t.factor*=2**(n/U_),t.clientX=e.clientX,t.rafId??=requestAnimationFrame(()=>this._applyWheelZoom()),t.endTimer&&clearTimeout(t.endTimer),t.endTimer=setTimeout(()=>this._endWheelZoom(),150)}_applyWheelZoom(){let e=this.w,t=this._wheel();t.rafId=null;let n=t.factor;if(t.factor=1,n===1||e.globals.isDestroyed)return;let r=this._gridRect();if(!r||!r.width)return;let{min:i,max:a}=this._currentXWindow(),o=a-i,s=Math.min(Math.max((t.clientX-r.left)/r.width,0),1),c=o*n,l=this._clampBounds();if(l){let t=e.globals.minXDiff>0&&isFinite(e.globals.minXDiff)?e.globals.minXDiff:0,n=Math.max(t*2,(l.max-l.min)*1e-6);c<n&&(c=n),c>l.max-l.min&&(c=l.max-l.min)}let u=i+s*o-s*c,d=u+c,f=o*1e-9;if(Math.abs(u-i)<f&&Math.abs(d-a)<f||isNaN(u)||isNaN(d))return;let p=this.getBeforeZoomRange({min:u,max:d},void 0);p&&p.xaxis&&(u=p.xaxis.min,d=p.xaxis.max),this._applyXRange(u,d,!0)}_endWheelZoom(){let e=this.w,t=this._wheel();if(t.endTimer=null,e.globals.isDestroyed||!e.interact.zoomed)return;let{min:n,max:r}=this._currentXWindow(),i=e.globals.initialConfig?$.clone(e.globals.initialConfig.yaxis):[],a=this.ctx.toolbar;a&&a.zoomCallback({min:n,max:r},i)}makeSelectionRectDraggable(){let e=this.w;if(!this.selectionRect)return;let t=this.selectionRect.node.getBoundingClientRect();t.width>0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(e,t,n,r,i)=>i===`l`||i===`r`?e.circle(8).css({"stroke-width":1,stroke:`#333`,fill:`#fff`}):e.circle(0),updateHandle:(e,t)=>e.center(t[0],t[1])}).resize().on(`resize`,()=>{if(this._clampSelectionRectToPlot(),e.interact.selectionEnabled)e.interact.selection={x:parseFloat(this.selectionRect.node.getAttribute(`x`)),y:parseFloat(this.selectionRect.node.getAttribute(`y`)),width:parseFloat(this.selectionRect.node.getAttribute(`width`)),height:parseFloat(this.selectionRect.node.getAttribute(`height`))},clearTimeout(this.w.globals.selectionResizeTimer??void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},30);else{let t=e.interact.zoomEnabled?e.config.chart.zoom.type:e.config.chart.selection.type;this.handleMouseUp({zoomtype:t,isResized:!0})}}))}preselectedSelection(){let e=this.w,t=this.xyRatios;if(!e.interact.zoomEnabled){if(e.interact.selection!==void 0&&e.interact.selection!==null)this.drawSelectionRect(X(Y({},e.interact.selection),{translateX:e.layout.translateX,translateY:e.layout.translateY}));else if(e.config.chart.selection.xaxis.min!==void 0&&e.config.chart.selection.xaxis.max!==void 0){let n=H_.dataXToPx(e,e.config.chart.selection.xaxis.min),r=H_.dataXToPx(e,e.config.chart.selection.xaxis.max)-n;e.axisFlags.isRangeBar&&(n=(e.config.chart.selection.xaxis.min-e.globals.yAxisScale[0].niceMin)/t.invertedYRatio,r=(e.config.chart.selection.xaxis.max-e.config.chart.selection.xaxis.min)/t.invertedYRatio);let i={x:n,y:0,width:r,height:e.layout.gridHeight,translateX:e.layout.translateX,translateY:e.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(i),this.makeSelectionRectDraggable(),typeof e.config.chart.events.selection==`function`&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:e,y:t,width:n,height:r,translateX:i=0,translateY:a=0}){let o=this.w,s=this.zoomRect,c=this.selectionRect;if(this.dragged||o.interact.selection!==null){let l={transform:`translate(`+i+`, `+a+`)`};o.interact.zoomEnabled&&this.dragged&&(n<0&&(n=1),s.attr({x:e,y:t,width:n,height:r,fill:o.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":o.config.chart.zoom.zoomedArea.fill.opacity,stroke:o.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":o.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":o.config.chart.zoom.zoomedArea.stroke.opacity}),Z.setAttrs(s.node,l)),o.interact.selectionEnabled&&(c.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,fill:o.config.chart.selection.fill.color,"fill-opacity":o.config.chart.selection.fill.opacity,stroke:o.config.chart.selection.stroke.color,"stroke-width":o.config.chart.selection.stroke.width,"stroke-dasharray":o.config.chart.selection.stroke.dashArray,"stroke-opacity":o.config.chart.selection.stroke.opacity}),Z.setAttrs(c.node,l))}}_clampSelectionRectToPlot(){let e=this.selectionRect;if(!e||!e.node)return;let t=this.w.layout.gridWidth;if(!(t>Y_))return;let n=parseFloat(e.node.getAttribute(`x`))||0,r=parseFloat(e.node.getAttribute(`width`))||0,i=e=>Math.min(Math.max(e,Y_),t),a=i(n),o=i(n+r);a===n&&o===n+r||(e.attr({x:a,width:o-a}),e._updateSelectPositions&&e._updateSelectPositions())}hideSelectionRect(e){e&&e.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:e,zoomtype:t}){let n=this.w,r=e,i=this._gridRect();if(!i)return;let a=r.startX-1,o=r.startY,s=!1,c=!1,l=this._screenXToPlotPx(r.clientX),u=r.clientY-i.top,d=l-a,f=u-o,p={translateX:n.layout.translateX,translateY:n.layout.translateY};return Math.abs(d+a)>n.layout.gridWidth?d=n.layout.gridWidth-a:l<0&&(d=a),a>l&&(s=!0,d=Math.abs(d)),o>u&&(c=!0,f=Math.abs(f)),p=t===`x`?{x:s?a-d:a,y:0,width:d,height:n.layout.gridHeight}:t===`y`?{x:0,y:c?o-f:o,width:n.layout.gridWidth,height:f}:{x:s?a-d:a,y:c?o-f:o,width:d,height:f},p=X(Y({},p),{translateX:n.layout.translateX,translateY:n.layout.translateY}),r.drawSelectionRect(p),r.selectionDragging(`resizing`),p}selectionDragging(e,t){let n=this.w;if(!t)return;t.preventDefault();let{handler:r,box:i}=t.detail,a=this.constraints,{x:o,y:s}=i;o<a.x&&(o=a.x),s<a.y&&(s=a.y),i.x2>a.x2&&(o=a.x2-i.w),i.y2>a.y2&&(s=a.y2-i.h),r.move(o,s);let c=this.selectionRect,l=0;e===`resizing`&&(l=30);let u=e=>parseFloat(c.node.getAttribute(e)),d={x:u(`x`),y:u(`y`),width:u(`width`),height:u(`height`)};n.interact.selection=d;let f=n.config.chart.link,p=!!(f&&(f.enabled||typeof f.dimension==`function`));(typeof n.config.chart.events.selection==`function`||p)&&n.interact.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer??void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},l))}_emitSelectionFromRect(){var e;let t=this.w;if(!t.interact.selectionEnabled)return;let n=t.config.chart.link,r=!!(n&&(n.enabled||typeof n.dimension==`function`));if(typeof t.config.chart.events.selection!=`function`&&!r)return;let i=this._gridRect();if(!i)return;let a=this.selectionRect.node.getBoundingClientRect(),o=this.xyRatios,s,c,l,u,d=this._screenXToPlotPx(a.left),f=this._screenXToPlotPx(a.right);if(t.axisFlags.isRangeBar)s=t.globals.yAxisScale[0].niceMin+d*o.invertedYRatio,c=t.globals.yAxisScale[0].niceMin+f*o.invertedYRatio,l=0,u=1;else{if(!t.globals.xAxisScale)return;s=H_.pxToDataX(t,d),c=H_.pxToDataX(t,f),l=t.globals.yAxisScale[0].niceMin+(i.bottom-a.bottom)*o.yRatio[0],u=t.globals.yAxisScale[0].niceMax-(a.top-i.top)*o.yRatio[0]}let p={xaxis:{min:s,max:c},yaxis:{min:l,max:u}};typeof t.config.chart.events.selection==`function`&&t.config.chart.events.selection(this.ctx,p),t.config.chart.brush.enabled&&t.config.chart.events.brushScrolled!==void 0&&t.config.chart.events.brushScrolled(this.ctx,p),(e=this.ctx.linkedViews)==null||e.onSourceSelection(p.xaxis)}selectionDrawn({context:e,zoomtype:t}){var n;let r=this.w,i=e,a=this.xyRatios,o=this.ctx.toolbar,s=r.interact.zoomEnabled?i.zoomRect.node.getBoundingClientRect():i.selectionRect.node.getBoundingClientRect(),c=i._gridRect();if(!c)return;let l=this._screenXToPlotPx(s.left),u=this._screenXToPlotPx(s.right),d=s.top-c.top,f=s.bottom-c.top,p,m;r.axisFlags.isRangeBar?(p=r.globals.yAxisScale[0].niceMin+l*a.invertedYRatio,m=r.globals.yAxisScale[0].niceMin+u*a.invertedYRatio):(p=H_.pxToDataX(r,l),m=H_.pxToDataX(r,u));let h=[],g=[];if(r.config.yaxis.forEach((e,t)=>{let n=r.globals.seriesYAxisMap[t][0],i=r.globals.yAxisScale[t].niceMax-a.yRatio[n]*d,o=r.globals.yAxisScale[t].niceMax-a.yRatio[n]*f;h.push(i),g.push(o)}),i.dragged&&(i.dragX>10||i.dragY>10)&&p!==m){if(r.interact.zoomEnabled){if(!r.globals.initialConfig)return;let e=$.clone(r.globals.initialConfig.yaxis),n=$.clone(r.globals.initialConfig.xaxis);if(r.interact.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(p=Math.floor(p),m=Math.floor(m),p<1&&(p=1,m=r.globals.dataPoints),m-p<2&&(m=p+1)),(t===`xy`||t===`x`)&&(n={min:p,max:m}),(t===`xy`||t===`y`)&&e.forEach((t,n)=>{e[n].min=g[n],e[n].max=h[n]}),o){let t=o.getBeforeZoomRange(n,e);t&&(n=t.xaxis?t.xaxis:n,e=t.yaxis?t.yaxis:e)}let a={xaxis:n};r.config.chart.group||(a.yaxis=e),i.ctx.updateHelpers._updateOptions(a,!1,i.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed==`function`&&o.zoomCallback(n,e)}else if(r.interact.selectionEnabled){let e=null,a=null;if(a={min:p,max:m},t===`xy`||t===`y`){let t=$.clone(r.config.yaxis);e=t,t.forEach((e,n)=>{t[n].min=g[n],t[n].max=h[n]})}r.interact.selection=i.selection,typeof r.config.chart.events.selection==`function`&&r.config.chart.events.selection(i.ctx,{xaxis:a,yaxis:e}),(n=i.ctx.linkedViews)==null||n.onSourceSelection(a)}}}panDragging({context:e}){let t=this.w,n=e;if(t.interact.lastClientPosition.x!==void 0){let e=t.interact.lastClientPosition.x-n.clientX,r=(t.interact.lastClientPosition.y??0)-n.clientY;Math.abs(e)>Math.abs(r)&&e>0?this.moveDirection=`left`:Math.abs(e)>Math.abs(r)&&e<0?this.moveDirection=`right`:Math.abs(r)>Math.abs(e)&&r>0?this.moveDirection=`up`:Math.abs(r)>Math.abs(e)&&r<0&&(this.moveDirection=`down`)}t.interact.lastClientPosition={x:n.clientX,y:n.clientY};let r=t.axisFlags.isRangeBar?t.globals.minY:t.globals.minX,i=t.axisFlags.isRangeBar?t.globals.maxY:t.globals.maxX;n.panScrolled(r,i)}panScrolled(e,t){let n=this.w,r=this.xyRatios;if(!n.globals.initialConfig)return;let i=$.clone(n.globals.initialConfig.yaxis),a=r.xRatio,o=n.globals.minX,s=n.globals.maxX;if(n.axisFlags.isRangeBar&&(a=r.invertedYRatio,o=n.globals.minY,s=n.globals.maxY),this.moveDirection===`left`?(e=o+n.layout.gridWidth/J_*a,t=s+n.layout.gridWidth/J_*a):this.moveDirection===`right`&&(e=o-n.layout.gridWidth/J_*a,t=s-n.layout.gridWidth/J_*a),!n.axisFlags.isRangeBar){let r=n.globals.dataReducerRawMinX??n.globals.initialMinX,i=n.globals.dataReducerRawMaxX??n.globals.initialMaxX;(e<r||t>i)&&(e=o,t=s)}let c={xaxis:{min:e,max:t}};n.config.chart.group||(c.yaxis=i),this.updateScrolledChart(c,e,t)}updateScrolledChart(e,t,n){let r=this.w;if(this.ctx.updateHelpers._updateOptions(e,!1,!1),typeof r.config.chart.events.scrolled==`function`){let e={xaxis:{min:t,max:n}};r.config.chart.events.scrolled(this.ctx,e),this.ctx.events.fireEvent(`scrolled`,e)}}_momentumEnabled(){return this._pinchEnabled()||this._panInertiaEnabled()}_pinchEnabled(){return this._incidentalZoomEnabled(this.w.config.chart.zoom.pinch)}_panInertiaEnabled(){let e=this.w.config.chart;return!!(e.pan&&e.pan.inertia)}_m(){let e=this.w.interact;return e.momentum||={busy:!1,pinch:null,panState:null,samples:[],inertiaRAF:null},e.momentum}_currentXWindow(){let e=this.w;return e.axisFlags.isRangeBar?{min:e.globals.minY,max:e.globals.maxY}:{min:e.globals.minX,max:e.globals.maxX}}_gridRect(){let e=this.w.dom.baseEl,t=e&&e.querySelector(`.apexcharts-grid`);return t?t.getBoundingClientRect():null}_screenXToPlotPx(e){return H_.screenXToPlotPx(this.w,e)}_clampBounds(){let e=this.w;return e.axisFlags.isRangeBar?null:{min:e.globals.dataReducerRawMinX??e.globals.initialMinX,max:e.globals.dataReducerRawMaxX??e.globals.initialMaxX}}_applyXRange(e,t,n){let r=this.w;if(!r.globals.initialConfig)return!1;let i=this._currentXWindow(),a=n&&t-e>i.max-i.min,o=this._clampBounds();if(o){let n=t-e;e<o.min&&(e=o.min,t=e+n),t>o.max&&(t=o.max,e=t-n),e<o.min&&(e=o.min)}if(r.config.xaxis.convertedCatToNumeric&&(e=Math.floor(e),t=a?Math.ceil(t):Math.floor(t),e<1&&(e=1),o&&t>o.max&&(t=Math.floor(o.max)),t-e<2)||!(t>e))return!1;let s={xaxis:{min:e,max:t}};return r.config.chart.group||(s.yaxis=$.clone(r.globals.initialConfig.yaxis)),n&&(r.interact.zoomed=!0),this.ctx.updateHelpers._updateOptions(s,!1,!1),{minX:e,maxX:t}}_cancelInertia(){let e=this._m();e.inertiaRAF!=null&&(cancelAnimationFrame(e.inertiaRAF),e.inertiaRAF=null)}_fireScrolled(){let e=this.w;if(typeof e.config.chart.events.scrolled!=`function`)return;let{min:t,max:n}=this._currentXWindow(),r={xaxis:{min:t,max:n}};e.config.chart.events.scrolled(this.ctx,r),this.ctx.events.fireEvent(`scrolled`,r)}_pushSample(e,t){let n=this._m().samples;for(n.push({x:e,t});n.length>6;)n.shift()}momentumTouch(e){let t=this.w,n=this._m(),r=e.type;if(r===`touchstart`){this._cancelInertia();let r=this._gridRect();if(!r)return;if(e.touches.length>=2&&this._pinchEnabled())e.preventDefault(),n.busy=!0,n.panState=null,this._beginPinch(e,r);else if(e.touches.length===1&&this._panInertiaEnabled()&&t.interact.panEnabled){n.busy=!0,n.pinch=null;let r=e.touches[0],i=this._currentXWindow(),a=t.layout.gridWidth||1;n.panState={startX:r.clientX,startY:r.clientY,axis:null,minX0:i.min,maxX0:i.max,ratio0:(i.max-i.min)/a},n.samples=[{x:r.clientX,t:e.timeStamp}]}return}if(r===`touchmove`){n.pinch&&e.touches.length>=2?(e.preventDefault(),this._movePinch(e)):n.panState&&e.touches.length===1&&this._movePan(e);return}n.pinch?e.touches.length<2&&this._endPinch():n.panState&&e.touches.length===0&&this._endPan(),e.touches.length===0&&(t.interact.mousedown=!1,this.dragged=!1,n.inertiaRAF==null&&!n.pinch&&!n.panState&&(n.busy=!1))}_beginPinch(e,t){let n=this.w,r=e.touches[0],i=e.touches[1],a=Math.hypot(i.clientX-r.clientX,i.clientY-r.clientY)||1,o=(r.clientX+i.clientX)/2-t.left-n.globals.barPadForNumericAxis,{min:s,max:c}=this._currentXWindow();this._m().pinch={d0:a,cx0:o,minX0:s,maxX0:c,gridWidth:n.layout.gridWidth||1}}_movePinch(e){let t=this.w,n=this._m().pinch;if(!n)return;let r=this._gridRect();if(!r)return;let i=e.touches[0],a=e.touches[1],o=Math.hypot(a.clientX-i.clientX,a.clientY-i.clientY)||1,s=(i.clientX+a.clientX)/2-r.left-t.globals.barPadForNumericAxis,c=n.maxX0-n.minX0,l=c*(n.d0/o),u=n.minX0+n.cx0/n.gridWidth*c-s/n.gridWidth*l,d=u+l,f=this._clampBounds();if(f){let e=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,n=Math.max(e*2,(f.max-f.min)*1e-6);if(d-u<n){let e=(u+d)/2;u=e-n/2,d=e+n/2}}this._applyXRange(u,d,!0)}_endPinch(){let e=this.w,t=this._m();t.pinch=null;let{min:n,max:r}=this._currentXWindow(),i={min:n,max:r},a=e.globals.initialConfig?$.clone(e.globals.initialConfig.yaxis):[],o=this.ctx.toolbar;o&&o.zoomCallback(i,a)}_movePan(e){let t=this._m(),n=t.panState,r=e.touches[0];if(!n.axis){let i=Math.abs(r.clientX-n.startX),a=Math.abs(r.clientY-n.startY);if(i<6&&a<6){this._pushSample(r.clientX,e.timeStamp);return}if(a>i){t.busy=!1,t.panState=null;return}n.axis=`x`}if(n.axis!==`x`)return;e.preventDefault();let i=(r.clientX-n.startX)*n.ratio0;this._pushSample(r.clientX,e.timeStamp),this._applyXRange(n.minX0-i,n.maxX0-i,!1)}_endPan(){let e=this._m(),t=e.panState;e.panState=null;let n=0,r=e.samples;if(r.length>=2){let e=r[0],t=r[r.length-1],i=t.t-e.t;i>0&&(n=(t.x-e.x)/i)}e.samples=[],t&&t.axis===`x`&&this._panInertiaEnabled()&&Math.abs(n)>W_?this._startInertia(n):(e.busy=!1,this._fireScrolled())}_startInertia(e){let t=this.w,n=this._m(),r=t.config.chart.pan&&t.config.chart.pan.friction,i=typeof r==`number`?Math.min(Math.max(r,.5),.999):G_,a=e,o=null;n.busy=!0;let s=e=>{if(t.globals.isDestroyed){n.inertiaRAF=null,n.busy=!1;return}if(o==null){o=e,n.inertiaRAF=requestAnimationFrame(s);return}let r=e-o;if(o=e,a*=i**+(r/q_),Math.abs(a)<K_){n.inertiaRAF=null,n.busy=!1,this._fireScrolled();return}let c=this._currentXWindow(),l=t.layout.gridWidth||1,u=(c.max-c.min)/l,d=a*r*u,f=this._applyXRange(c.min-d,c.max-d,!1),p=this._clampBounds();if(!f||p&&(d>0&&f.minX<=p.min+(p.max-p.min)*1e-6||d<0&&f.maxX>=p.max-(p.max-p.min)*1e-6)){n.inertiaRAF=null,n.busy=!1,this._fireScrolled();return}n.inertiaRAF=requestAnimationFrame(s)};n.inertiaRAF=requestAnimationFrame(s)}};kh.registerFeatures({toolbar:V_,zoomPanSelection:X_});var Z_=class{constructor(e){this.w=e.w,this.annoCtx=e}setOrientations(e,t=null){let n=this.w;if(e.label.orientation===`vertical`){let r=t===null?0:t,i=n.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${r}']`);if(i!==null){let t=i.getBBox();i.setAttribute(`x`,String(parseFloat(i.getAttribute(`x`)??`0`)-t.height+4));let n=e.label.position===`top`?t.width:-t.width;i.setAttribute(`y`,String(parseFloat(i.getAttribute(`y`)??`0`)+n));let{x:r,y:a}=this.annoCtx.graphics.rotateAroundCenter(i);i.setAttribute(`transform`,`rotate(-90 ${r} ${a})`)}}}addBackgroundToAnno(e,t){let n=this.w;if(!e||!t.label.text||!String(t.label.text).trim())return null;let r=n.dom.baseEl.querySelector(`.apexcharts-grid`);if(!r)return null;let i=r.getBoundingClientRect(),a=r.getBBox(),o=i.width/a.width||1,s=e.getBoundingClientRect(),{left:c,right:l,top:u,bottom:d}=t.label.style.padding;t.label.orientation===`vertical`&&([u,d,c,l]=[c,l,u,d]);let f=i.left-a.x*o,p=i.top-a.y*o,m=(s.left-f)/o-c,h=(s.top-p)/o-u,g=this.annoCtx.graphics.drawRect(m,h,s.width/o+c+l,s.height/o+u+d,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&g.node.classList.add(t.id),g}annotationsBackground(){let e=this.w,t=(t,n,r)=>{let i=e.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${n}']`);if(i){let n=i.parentNode,r=this.addBackgroundToAnno(i,t);if(r){n?.insertBefore(r.node,i);let a=i.getAttribute(`x`);a!==null&&Wh(r,parseFloat(a),e),t.label.mouseEnter&&r.node.addEventListener(`mouseenter`,t.label.mouseEnter.bind(this,t)),t.label.mouseLeave&&r.node.addEventListener(`mouseleave`,t.label.mouseLeave.bind(this,t)),t.label.click&&r.node.addEventListener(`click`,t.label.click.bind(this,t))}}};e.config.annotations.xaxis.forEach((e,n)=>t(e,n,`xaxis`)),e.config.annotations.yaxis.forEach((e,n)=>t(e,n,`yaxis`)),e.config.annotations.points.forEach((e,n)=>t(e,n,`point`))}usesCategoryX(){let e=this.w;return(e.config.xaxis.type===`category`||e.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!e.axisFlags.dataFormatXNumeric&&!e.config.chart.sparkline.enabled}hasXDomain(){let e=this.w;return this.annoCtx.invertAxis?$.isNumber(e.globals.minY)&&$.isNumber(e.globals.yRange[0]):this.usesCategoryX()?e.labelData.labels.length>0||e.labelData.categoryLabels.length>0:$.isNumber(e.globals.minX)&&$.isNumber(e.globals.xRange)}getY1Y2(e,t){let n=this.w,r=e===`y1`?t.y:t.y2,i=typeof r==`string`&&r.includes(`px`),a,o=!1;if(this.annoCtx.invertAxis){let e=n.config.xaxis.convertedCatToNumeric?n.labelData.categoryLabels:n.labelData.labels,o=e.indexOf(r);if(!i&&o===-1)return{yP:0,clipped:!0};let s=n.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${o+1})`);a=s?parseFloat(s.getAttribute(`y`)??`0`):(n.layout.gridHeight/e.length-1)*(o+1)-n.globals.barHeight,t.seriesIndex!==void 0&&n.globals.barHeight&&(a-=n.globals.barHeight/2*(n.seriesData.series.length-1)-n.globals.barHeight*t.seriesIndex)}else{if(!n.config.yaxis[t.yAxisIndex])return{yP:0,clipped:!0};let e=n.globals.seriesYAxisMap[t.yAxisIndex]?.[0]??null;if(e===null&&n.seriesData.series.length)return{yP:0,clipped:!0};let i=e===null?n.globals.minY:n.globals.minYArr[e],s=e===null?n.globals.maxY-n.globals.minY:n.globals.yRange[e],c=n.config.yaxis[t.yAxisIndex].logarithmic&&e!==null?new Xh(this.w).getLogVal(n.config.yaxis[t.yAxisIndex].logBase,r,e)/n.globals.yLogRatio[e]:(r-i)/(s/n.layout.gridHeight);a=n.layout.gridHeight-Math.min(Math.max(c,0),n.layout.gridHeight),o=c>n.layout.gridHeight||c<0,t.marker&&(t.y===void 0||t.y===null)&&(a=0),n.config.yaxis[t.yAxisIndex]?.reversed&&(a=c)}return i&&(a=parseFloat(r)),{yP:a,clipped:o}}getX1X2(e,t){let n=this.w,r=e===`x1`?t.x:t.x2,i=this.annoCtx.invertAxis?n.globals.minY:n.globals.minX,a=this.annoCtx.invertAxis?n.globals.maxY:n.globals.maxX,o=this.annoCtx.invertAxis?n.globals.yRange[0]:n.globals.xRange,s=!1,c=typeof r==`string`&&r.includes(`px`),l=r==null&&t.marker;if(!c&&!l&&!this.hasXDomain())return{x:0,clipped:!0};let u=this.annoCtx.inversedReversedAxis?(a-r)/(o/n.layout.gridWidth):(r-i)/(o/n.layout.gridWidth);return(n.config.xaxis.type===`category`||n.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!n.axisFlags.dataFormatXNumeric&&(n.config.chart.sparkline.enabled||(u=this.getStringX(r))),typeof r==`string`&&r.includes(`px`)&&(u=parseFloat(r)),r==null&&t.marker&&(u=n.layout.gridWidth),t.seriesIndex!==void 0&&n.globals.barWidth&&!this.annoCtx.invertAxis&&(u-=n.globals.barWidth/2*(n.seriesData.series.length-1)-n.globals.barWidth*t.seriesIndex),typeof u!=`number`&&(u=0,s=!0),parseFloat(u.toFixed(10))>parseFloat(n.layout.gridWidth.toFixed(10))?(u=n.layout.gridWidth,s=!0):u<0&&(u=0,s=!0),{x:u,clipped:s}}getStringX(e){let t=this.w,n=e;if(t.config.xaxis.convertedCatToNumeric&&t.labelData.categoryLabels.length){let n=String(e);e=t.labelData.categoryLabels.findIndex(e=>String(e)===n)+1}let r=t.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(e),i=t.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${r+1})`);return i&&(n=parseFloat(i.getAttribute(`x`)??`0`)),n}},Q_=class{constructor(e){this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Z_(this.annoCtx)}addXaxisAnnotation(e,t,n){let r=this.w,i=this.helpers.getX1X2(`x1`,e),a=i.x,o=i.clipped,s=!0,c,l=e.label.text,u=e.strokeDashArray;if($.isNumber(a)){if(e.x2===null||e.x2===void 0){if(!o){let n=this.annoCtx.graphics.drawLine(a+e.offsetX,0+e.offsetY,a+e.offsetX,r.layout.gridHeight+e.offsetY,e.borderColor,u,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id),Wh(n,a+e.offsetX,r)}}else{let n=this.helpers.getX1X2(`x2`,e);if(c=n.x,s=n.clipped,c<a){let e=a;a=c,c=e}let i=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,c-a,r.layout.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,u);i.node.classList.add(`apexcharts-annotation-rect`),i.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(i.node),e.id&&i.node.classList.add(e.id),Wh(i,a+e.offsetX,r)}if(!(o&&s)){let i=this.annoCtx.graphics.getTextRects(l,e.label.style.fontSize),o=e.label.position===`top`?4:e.label.position===`center`?r.layout.gridHeight/2+(e.label.orientation===`vertical`?i.width/2:0):r.layout.gridHeight,s=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:o+e.label.offsetY-(e.label.orientation===`vertical`?e.label.position===`top`?i.width/2-12:-i.width/2:0),text:l,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});s.attr({rel:n}),t.appendChild(s.node),Wh(s,a+e.label.offsetX,r),this.annoCtx.helpers.setOrientations(e,n)}}}drawXAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-xaxis-annotations`});return e.config.annotations.xaxis.map((e,n)=>{this.addXaxisAnnotation(e,t.node,n)}),t}},$_=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Z_(this.annoCtx),this.axesUtils=new pg(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(e,t,n){let r=this.w,i=e.strokeDashArray,a=this.helpers.getY1Y2(`y1`,e),o=a.yP,s=a.clipped,c,l=!0,u=!1,d=e.label.text;if(e.y2===null||e.y2===void 0){if(!s){u=!0;let n=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,i,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}else{if(a=this.helpers.getY1Y2(`y2`,e),c=a.yP,l=a.clipped,c>o){let e=o;o=c,c=e}if(!(s&&l)){u=!0;let n=this.annoCtx.graphics.drawRect(0+e.offsetX,c+e.offsetY,this._getYAxisAnnotationWidth(e),o-c,0,e.fillColor,e.opacity,1,e.borderColor,i);n.node.classList.add(`apexcharts-annotation-rect`),n.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}if(u){let i=e.label.position===`right`?r.layout.gridWidth:e.label.position===`center`?r.layout.gridWidth/2:0,a=this.annoCtx.graphics.drawText({x:i+e.label.offsetX,y:(c??o)+e.label.offsetY-3,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});a.attr({rel:n}),t.appendChild(a.node)}}_getYAxisAnnotationWidth(e){let t=this.w,n=t.layout.gridWidth;return n=e.width.indexOf(`%`)>-1?t.layout.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10),n+e.offsetX}drawYAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-yaxis-annotations`});return e.config.annotations.yaxis.forEach((e,n)=>{e.yAxisIndex=this.axesUtils.translateYAxisIndex(e.yAxisIndex),this.axesUtils.isYAxisHidden(e.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||this.addYaxisAnnotation(e,t.node,n)}),t}},ev=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Z_(this.annoCtx)}addPointAnnotation(e,t,n){let r=this.w;if(r.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)return;let i=this.helpers.getX1X2(`x1`,e),a=i.x,o=i.clipped,s=this.helpers.getY1Y2(`y1`,e),c=s.yP,l=s.clipped;if($.isNumber(a)&&!(l||o)){let i={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:`apexcharts-point-annotation-marker ${e.marker.cssClass} ${e.id?e.id:``}`},o=this.annoCtx.graphics.drawMarker(a+e.marker.offsetX,c+e.marker.offsetY,i);t.appendChild(o.node);let s=[o.node];Wh(o,a,r);let l=e.label.text?e.label.text:``,u=this.getConstrainedLabelX(l,a+e.label.offsetX,e.label),d=this.annoCtx.graphics.drawText({x:u,y:c+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:l,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-point-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});if(d.attr({rel:n}),t.appendChild(d.node),Wh(d,a,r),e.customSVG.SVG){let n=this.annoCtx.graphics.group({class:`apexcharts-point-annotations-custom-svg `+e.customSVG.cssClass});n.attr({transform:`translate(${a+e.customSVG.offsetX}, ${c+e.customSVG.offsetY})`}),n.node.innerHTML=e.customSVG.SVG,t.appendChild(n.node),s.push(n.node)}if(e.image.path){let t=e.image.width?e.image.width:20,n=e.image.height?e.image.height:20;o=this.annoCtx.addImage({x:a+e.image.offsetX-t/2,y:c+e.image.offsetY-n/2,width:t,height:n,path:e.image.path,appendTo:`.apexcharts-point-annotations`}),s.push(o.node)}e.tooltip&&e.tooltip.enabled&&s.forEach(t=>{t.addEventListener(`mouseenter`,()=>{this.showPointTooltip(e,t)}),t.addEventListener(`mouseleave`,()=>{this.hidePointTooltip()})}),e.mouseEnter&&o.node.addEventListener(`mouseenter`,e.mouseEnter.bind(this,e)),e.mouseLeave&&o.node.addEventListener(`mouseleave`,e.mouseLeave.bind(this,e)),e.click&&o.node.addEventListener(`click`,e.click.bind(this,e))}}getConstrainedLabelX(e,t,n){let r=this.w;if(!e)return t;let{width:i}=this.annoCtx.graphics.getTextRects(e,n.style.fontSize,n.style.fontFamily,void 0,!0,n.style.fontWeight),a,o;switch(n.textAnchor){case`start`:a=t,o=t+i;break;case`end`:a=t-i,o=t;break;default:a=t-i/2,o=t+i/2}let s=n.style.padding||{};return a-=s.left||0,o+=s.right||0,a<0?t-a:o>r.layout.gridWidth?t-(o-r.layout.gridWidth):t}getPointTooltipEl(){let e=this.w,t=e.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip`);return t||(t=Q.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.classList.add(`apexcharts-tooltip`,`apexcharts-annotation-tooltip`),e.dom.elWrap.appendChild(t)),t}getPointTooltipContent(e){let t=this.w,n=e.tooltip||{};if(typeof n.formatter==`function`)return n.formatter({annotation:e,seriesIndex:e.seriesIndex,id:e.id,w:t});let r=n.text==null?e.label&&e.label.text:n.text;return Array.isArray(r)&&(r=r.join(`<br/>`)),r==null?``:String(r)}showPointTooltip(e,t){let n=this.w,r=this.getPointTooltipContent(e);if(!r)return;let i=this.getPointTooltipEl();i.innerHTML=r;let a=e.tooltip.theme||n.config.tooltip.theme||`light`;i.classList.remove(`apexcharts-theme-light`,`apexcharts-theme-dark`),i.classList.add(`apexcharts-theme-${a}`),i.classList.add(`apexcharts-active`);let o=n.dom.elWrap.getBoundingClientRect(),s=t.getBoundingClientRect(),c=i.getBoundingClientRect(),l=e.tooltip.offsetX||0,u=e.tooltip.offsetY||0,d=s.left-o.left+s.width/2-c.width/2,f=s.top-o.top-c.height-10;d=Math.max(0,Math.min(d,o.width-c.width)),f<0&&(f=s.top-o.top+s.height+10),i.style.left=d+l+`px`,i.style.top=f+u+`px`}hidePointTooltip(){let e=this.w.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip`);e&&e.classList.remove(`apexcharts-active`)}drawPointAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-point-annotations`});return e.config.annotations.points.map((e,n)=>{this.addPointAnnotation(e,t.node,n)}),t}},tv=class{constructor(e,{theme:t=null,timeScale:n=null}={}){this.w=e,this.theme=t,this.timeScale=n,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new Z(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Z_(this),this.xAxisAnnotations=new Q_(this),this.yAxisAnnotations=new $_(this),this.pointsAnnotations=new ev(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){let e=this.w;if(e.globals.axisCharts){let t=this.yAxisAnnotations.drawYAxisAnnotations(),n=this.xAxisAnnotations.drawXAxisAnnotations(),r=this.pointsAnnotations.drawPointAnnotations(),i=e.config.chart.animations.enabled,a=[t,n,r],o=[n.node,t.node,r.node],s=e.config.chart.type===`line`||e.config.chart.type===`area`||e.config.chart.type===`rangeArea`,c=[s,!1,s];for(let t=0;t<3;t++)e.dom.elGraphical.add(a[t]),i&&!e.globals.resized&&!e.globals.dataChanged&&e.config.chart.type!==`scatter`&&e.config.chart.type!==`bubble`&&e.globals.dataPoints>1&&!c[t]&&o[t].classList.add(`apexcharts-element-hidden`),e.globals.delayedElements.push({el:o[t],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(e=>{this.addImage(e)})}drawTextAnnos(){this.w.config.annotations.texts.map(e=>{this.addText(e)})}addXaxisAnnotation(e,t,n){this.xAxisAnnotations.addXaxisAnnotation(e,t,n)}addYaxisAnnotation(e,t,n){this.yAxisAnnotations.addYaxisAnnotation(e,t,n)}addPointAnnotation(e,t,n){this.pointsAnnotations.addPointAnnotation(e,t,n)}addText(e){let{x:t,y:n,text:r,textAnchor:i,foreColor:a,fontSize:o,fontFamily:s,fontWeight:c,cssClass:l,backgroundColor:u,borderWidth:d,strokeDashArray:f,borderRadius:p,borderColor:m,appendTo:h=`.apexcharts-svg`,paddingLeft:g=4,paddingRight:_=4,paddingBottom:v=2,paddingTop:y=2}=e,b=this.w,x=this.graphics.drawText({x:t,y:n,text:r,textAnchor:i||`start`,fontSize:o||`12px`,fontWeight:c||`regular`,fontFamily:s||b.config.chart.fontFamily,foreColor:a||b.config.chart.foreColor,cssClass:`apexcharts-text `+l?l:``}),S=b.dom.baseEl.querySelector(h);S&&S.appendChild(x.node);let C=x.bbox();if(r){let e=this.graphics.drawRect(C.x-g,C.y-y,C.width+g+_,C.height+v+y,p,u||`transparent`,1,d,m,f);S.insertBefore(e.node,x.node)}}addImage(e){let t=this.w,{path:n,x:r=0,y:i=0,width:a=20,height:o=20,appendTo:s=`.apexcharts-svg`}=e,c=t.dom.Paper.image(n);c.size(a,o).move(r,i);let l=t.dom.baseEl.querySelector(s);return l&&l.appendChild(c.node),c}addXaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`xaxis`,contextMethod:n.addXaxisAnnotation}),n}addYaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`yaxis`,contextMethod:n.addYaxisAnnotation}),n}addPointAnnotationExternal(e,t,n){return this.invertAxis===void 0&&(this.invertAxis=n.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`point`,contextMethod:n.addPointAnnotation}),n}addAnnotationExternal({params:e,pushToMemory:t,context:n,type:r,contextMethod:i}){let a=n,o=a.w,s=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations`),c=s.childNodes.length+1,l=new kg,u=Object.assign({},r===`xaxis`?l.xAxisAnnotation:r===`yaxis`?l.yAxisAnnotation:l.pointAnnotation),d=$.extend(u,e);switch(r){case`xaxis`:this.addXaxisAnnotation(d,s,c);break;case`yaxis`:this.addYaxisAnnotation(d,s,c);break;case`point`:this.addPointAnnotation(d,s,c);break}let f=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${c}']`),p=this.helpers.addBackgroundToAnno(f,d);return p&&s.insertBefore(p.node,f),t&&o.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:$.randomId(),method:i,label:`addAnnotation`,params:e}),n}_removeAnnotationTooltip(e){let t=e.dom.elWrap&&e.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip`);t&&t.parentNode&&t.parentNode.removeChild(t)}clearAnnotations(e){let t=e.w;this._removeAnnotationTooltip(t);let n=t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations`);for(let e=t.globals.memory.methodsToExec.length-1;e>=0;e--)(t.globals.memory.methodsToExec[e].label===`addText`||t.globals.memory.methodsToExec[e].label===`addAnnotation`)&&t.globals.memory.methodsToExec.splice(e,1);Array.prototype.forEach.call(n,e=>{for(;e.firstChild;)e.removeChild(e.firstChild)})}removeAnnotation(e,t){let n=e.w;this._removeAnnotationTooltip(n);let r=n.dom.baseEl.querySelectorAll(`.${t}`);r&&(n.globals.memory.methodsToExec.map((e,r)=>{e.id===t&&n.globals.memory.methodsToExec.splice(r,1)}),Object.keys(n.config.annotations).forEach(e=>{let r=n.config.annotations[e];Array.isArray(r)&&(n.config.annotations[e]=r.filter(e=>e.id!==t))}),Array.prototype.forEach.call(r,e=>{e.parentElement.removeChild(e)}))}};kh.registerFeatures({annotations:tv});var nv=class{constructor(e,t){this.w=e,this.ctx=t,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._tooltipDismissed=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._lastPointerDownAt=0}init(){let e=this.w.dom.Paper.node;e&&(e.setAttribute(`tabindex`,`0`),e.addEventListener(`focus`,this._onFocus),e.addEventListener(`blur`,this._onBlur),e.addEventListener(`mousedown`,this._onPointerDown,{capture:!0}),e.addEventListener(`pointerdown`,this._onPointerDown,{capture:!0}),e.addEventListener(`touchstart`,this._onPointerDown,{capture:!0,passive:!0}),e.addEventListener(`keydown`,this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener(`legendClick`,this._onLegendClick))}destroy(){let e=this.w,t=e.dom.Paper&&e.dom.Paper.node;this.ctx.events.removeEventListener(`legendClick`,this._onLegendClick),t&&(t.removeEventListener(`focus`,this._onFocus),t.removeEventListener(`blur`,this._onBlur),t.removeEventListener(`keydown`,this._onKeyDown),t.removeEventListener(`mousedown`,this._onPointerDown,{capture:!0}),t.removeEventListener(`pointerdown`,this._onPointerDown,{capture:!0}),t.removeEventListener(`touchstart`,this._onPointerDown,{capture:!0}))}_onPointerDown(){this._lastPointerDownAt=Date.now()}handleKey(e){}_onFocus(){this._isNavEnabled()&&(Date.now()-this._lastPointerDownAt<100||(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint()))}_onBlur(){this.active=!1,this._tooltipDismissed=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(e){var t,n,r;if(!(!this._isNavEnabled()||!this.active)){if(e.shiftKey&&(e.key===`ArrowRight`||e.key===`ArrowLeft`)&&this._canPan()){e.preventDefault(),this._panBy(e.key===`ArrowRight`?1:-1);return}switch(e.key){case`ArrowRight`:e.preventDefault(),this._move(0,1);break;case`ArrowLeft`:e.preventDefault(),this._move(0,-1);break;case`ArrowUp`:e.preventDefault(),this._move(-1,0);break;case`ArrowDown`:e.preventDefault(),this._move(1,0);break;case`Home`:e.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case`End`:e.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case`Enter`:case` `:e.preventDefault(),this._fireClick();break;case`+`:case`=`:this._canZoom()&&(e.preventDefault(),(t=this.ctx.toolbar)==null||t.handleZoomIn(),this._announce(`Zoomed in`));break;case`-`:case`_`:this._canZoom()&&(e.preventDefault(),(n=this.ctx.toolbar)==null||n.handleZoomOut(),this._announce(`Zoomed out`));break;case`0`:this._canZoom()&&this.w.interact.zoomed&&(e.preventDefault(),(r=this.ctx.toolbar)==null||r.handleZoomReset(),this._announce(`Zoom reset`));break;case`Escape`:e.preventDefault(),this._tooltipDismissed?(this.active=!1,this._tooltipDismissed=!1,this._hideFocus()):(this._tooltipDismissed=!0,this._hideFocus());break}}}_canZoom(){let e=this.w;return!!(e.globals.axisCharts&&e.config.chart.zoom&&e.config.chart.zoom.enabled)}_canPan(){return this._canZoom()}_panBy(e){let t=this.w,n=this.ctx.toolbar;if(!n)return;let r=Number(t.globals.minX),i=Number(t.globals.maxX);if(!isFinite(r)||!isFinite(i)||r===i)return;let a=(i-r)*.1*e;n.zoomUpdateOptions(r+a,i+a),this._announce(e>0?`Panned right`:`Panned left`)}_move(e,t){let n=this.w,r=n.config.chart.accessibility.keyboard.navigation.wrapAround;if(e!==0){let t=this.w.globals.tooltip;if(t&&t.tConfig&&t.tConfig.shared){let e=this.dataPointIndex;if(t.tooltipUtil&&t.tooltipUtil.isXoverlap(e)&&t.tooltipUtil.isInitialSeriesSameLen())return}let i=this._getSeriesCount(),a=this.seriesIndex+e,o=0;for(;o<i&&(a<0&&(a=r?i-1:0),a>=i&&(a=r?0:i-1),n.globals.collapsedSeriesIndices.includes(a));)a+=e,o++;this.seriesIndex=a;let s=this._getDataPointCount(a);this.dataPointIndex>=s&&(this.dataPointIndex=s-1)}if(t!==0){let e=this._getDataPointCount(this.seriesIndex),n=this.dataPointIndex+t;n<0&&(n=r?e-1:0),n>=e&&(n=r?0:e-1),this.dataPointIndex=n,t>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(t)}this._showCurrentPoint()}_skipNullForward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r+1)%n,i++;this.dataPointIndex=r}}_skipNullBackward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r-1+n)%n,i++;this.dataPointIndex=r}}_showCurrentPoint(){let{seriesIndex:e,dataPointIndex:t}=this,n=this.w,r=n.globals.tooltip;!r||!r.ttItems||(n.interact.capturedSeriesIndex=e,n.interact.capturedDataPointIndex=t,this._applyFocusClass(e,t),this._showTooltip(e,t,r))}_hideFocus(){let e=this.w,t=e.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!t)return;t.marker&&t.marker.resetPointsSize(),this._enlargedScatterMarker=null;let n=t.getElTooltip();n&&(n.classList.remove(`apexcharts-active`),e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&n.setAttribute(`aria-hidden`,`true`)),e.dom.baseEl.classList.remove(`apexcharts-tooltip-active`);let r=t.getElXCrosshairs();r&&r.classList.remove(`apexcharts-active`)}_showTooltip(e,t,n){let r=this.w,i=r.config.chart.type,a=n.getElTooltip();if(!a)return;let o=n.getCachedDimensions();n.tooltipRect={x:0,y:0,ttWidth:o.ttWidth||0,ttHeight:o.ttHeight||0},this._setSyntheticEvent(e,t,n),r.dom.baseEl.classList.add(`apexcharts-tooltip-active`),a.classList.add(`apexcharts-active`),r.config.chart.accessibility.enabled&&r.config.chart.accessibility.announcements.enabled&&a.removeAttribute(`aria-hidden`),i===`pie`||i===`donut`||i===`polarArea`?this._showTooltipNonAxis(e,t,n,a):i===`radialBar`?this._showTooltipRadialBar(e,t,n,a):i===`heatmap`||i===`treemap`?this._showTooltipHeatTree(e,t,n,a,i):i===`bar`||i===`candlestick`||i===`boxPlot`||i===`violin`||i===`rangeBar`?this._showTooltipBar(e,t,n):this._showTooltipAxisLine(e,t,n)}_setSyntheticEvent(e,t,n){let r=this.w,i=r.config.chart.type,a=0,o=0,s=this._getFocusableElement(e,t);if(s){let e=s.getBoundingClientRect();a=e.left+e.width/2,o=e.top+e.height/2}else if(r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}else{let e=r.dom.Paper&&r.dom.Paper.node;if(e){let t=e.getBoundingClientRect();a=t.left+t.width/2,o=t.top+t.height/2}}if((i===`line`||i===`area`||i===`rangeArea`||i===`scatter`||i===`bubble`||i===`radar`)&&r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}n.e={type:`mousemove`,clientX:a,clientY:o}}_showTooltipBar(e,t,n){let r=this.w,i=n.tConfig.shared&&(n.tooltipUtil.isXoverlap(t)||r.globals.isBarHorizontal)&&n.tooltipUtil.isInitialSeriesSameLen(),a=r.rangeData.seriesRange?.[e]?.[t]?.y?.[0];n.tooltipLabels.drawSeriesTexts(X(Y(Y({ttItems:n.ttItems,i:e,j:t},a?.y1!==void 0&&{y1:a.y1}),a?.y2!==void 0&&{y2:a.y2}),{shared:i}));let o=`.apexcharts-series[data\\:realIndex='${e}']`,s=r.dom.Paper.findOne(`${o} path[j='${t}'], ${o} circle[j='${t}'], ${o} rect[j='${t}']`);if(s&&(this._leaveHoveredBar(),new Z(this.w,this.ctx).pathMouseEnter(s,null),this._hoveredBarEl=s),r.globals.isBarHorizontal){let e=s&&s.node;if(e){let t=r.dom.elWrap.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.left-t.left,o=i.top-t.top,s=i.height,c=i.width,l=n.tooltipRect.ttWidth||0,u=n.tooltipRect.ttHeight||0,d=o+s/2-u/2,f=a+c;a<(n.xyRatios&&n.xyRatios.baseLineInvertedY!=null?n.xyRatios.baseLineInvertedY:t.width/2)&&(f=a-l);let p=n.getElTooltip();p&&(p.style.left=f+`px`,p.style.top=d+`px`)}}else n.tooltipPosition.moveStickyTooltipOverBars(t,e)}_showTooltipAxisLine(e,t,n){let r=this.w,i=r.config.chart.type,a=n.tConfig.shared&&n.tooltipUtil.isXoverlap(t)&&n.tooltipUtil.isInitialSeriesSameLen();n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:a});let o=i===`scatter`||i===`bubble`,s=r.globals.markers.largestSize>0&&!r.globals.markers.batched;o?this._showScatterBubblePoint(e,t,n):s?a?n.marker.enlargePoints(t):n.tooltipPosition.moveDynamicPointOnHover(t,e):a?n.tooltipPosition.moveDynamicPointsOnHover(t):n.tooltipPosition.moveDynamicPointOnHover(t,e)}_showScatterBubblePoint(e,t,n){let r=this.w.dom.baseEl;this._enlargedScatterMarker&&=(n.marker.oldPointSize(this._enlargedScatterMarker),null);let i=r.querySelector(`.apexcharts-series[data\\:realIndex='${e}']`);if(!i)return;let a=i.querySelector(`.apexcharts-marker[rel='${t}']`);a&&(n.marker.enlargeCurrentPoint(t,a),this._enlargedScatterMarker=a)}_showTooltipNonAxis(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:t,shared:!1});let a=r.getBoundingClientRect(),o=a.width||n.tooltipRect.ttWidth||0,s=a.height||n.tooltipRect.ttHeight||0,c=i.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${t}']`),l=n.getSliceAnchor(c);l&&(r.style.left=l.x-o/2+`px`,r.style.top=l.y-s-10+`px`)}_showTooltipRadialBar(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,shared:!1});let{ttWidth:a=0,ttHeight:o=0}=n.getCachedDimensions(),s=i.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`);if(s){let t=parseFloat(s.getAttribute(`data:angle`)??``)||0,n=(i.config.plotOptions.radialBar.startAngle||0)+t/2,c=i.layout.gridWidth/2,l=i.layout.gridHeight/2,u=i.globals.radialSize||Math.min(i.layout.gridWidth,i.layout.gridHeight)/2,d=i.seriesData.series.length,f=u/Math.max(d,1),p=u-e*f,m=(p+(p-f))/2,h=$.polarToCartesian(c,l,m,n),g=h.x+(i.layout.translateX||0),_=h.y+(i.layout.translateY||0);r.style.left=g-a/2+`px`,r.style.top=_-o-10+`px`}}_showTooltipHeatTree(e,t,n,r,i){let a=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:!1});let o=r.getBoundingClientRect(),s=o.width||n.tooltipRect.ttWidth||0,c=o.height||n.tooltipRect.ttHeight||0,l=i===`heatmap`?`apexcharts-heatmap-rect`:`apexcharts-treemap-rect`,u=a.dom.baseEl.querySelector(`.${l}[i='${e}'][j='${t}']`);if(u){let e=a.dom.elWrap.getBoundingClientRect(),t=u.getBoundingClientRect(),i=t.left-e.left,o=t.top-e.top,l=t.width,d=t.height,f=parseFloat(u.getAttribute(`cx`)??``),p=parseFloat(u.getAttribute(`width`)??``);n.tooltipPosition.moveXCrosshairs(f+p/2);let m=i+l+s/2,h=o+d/2-c/2;i+l>a.layout.gridWidth/2&&(m=i-s/2),r.style.left=m+`px`,r.style.top=h+`px`}}_applyFocusClass(e,t){this._removeFocusClass();let n=this._getFocusableElement(e,t)||this._getBatchedFocusEl(e);if(n){n.classList.add(`apexcharts-keyboard-focused`),n.setAttribute(`role`,`img`);let r=this._buildPointLabel(e,t);r&&n.setAttribute(`aria-label`,r),this._focusedEl=n}}_getBatchedFocusEl(e){return this.w.globals.markers.batched?this.w.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`):null}_removeFocusClass(){this._focusedEl&&=(this._focusedEl.classList.remove(`apexcharts-keyboard-focused`),this._focusedEl.removeAttribute(`role`),this._focusedEl.removeAttribute(`aria-label`),null)}_buildPointLabel(e,t){let n=this.w,r=n.config.chart.type,i=n.seriesData.seriesNames||[],a=n.seriesData.series||[];if(r===`pie`||r===`donut`||r===`polarArea`){let e=(n.labelData?.labels&&n.labelData.labels[t])??``,r=Array.isArray(a)?a[t]:``;return e?`${e}: ${r}`:`${r}`}if(r===`radialBar`)return`${i[e]||`Series ${e+1}`}: ${Array.isArray(a)?a[e]:``}`;let o=i[e]||`Series ${e+1}`,s=(Array.isArray(a[e])?a[e]:[])[t],c=s==null?``:String(s),l=n.formatters?.yLabelFormatters?.[e];if(typeof l==`function`)try{c=l(s,{seriesIndex:e,dataPointIndex:t,w:n})}catch{}let u=``,d=n.labelData?.categoryLabels,f=n.seriesData?.seriesX?.[e];if(Array.isArray(d)&&d[t]!=null)u=String(d[t]);else if(Array.isArray(f)&&f[t]!=null){let r=n.formatters?.xLabelFormatter;if(typeof r==`function`)try{u=String(r(f[t],{seriesIndex:e,dataPointIndex:t,w:n}))}catch{u=String(f[t])}else u=String(f[t])}return u?`${o}: ${c}, ${u}`:`${o}: ${c}`}_leaveHoveredBar(){this._hoveredBarEl&&=(new Z(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),null)}_getFocusableElement(e,t){let n=this.w,r=n.config.chart.type,i=n.dom.baseEl;return r===`pie`||r===`donut`||r===`polarArea`?i.querySelector(`.apexcharts-pie-area[j='${t}']`):r===`heatmap`?i.querySelector(`.apexcharts-heatmap-rect[i='${e}'][j='${t}']`):r===`treemap`?i.querySelector(`.apexcharts-treemap-rect[i='${e}'][j='${t}']`):r===`radialBar`?i.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`):r===`bar`||r===`candlestick`||r===`boxPlot`||r===`violin`||r===`rangeBar`?i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`):i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker[rel='${t}']`)||null}_fireClick(){let e=this.w.globals.tooltip;e&&e.markerClick({type:`mouseup`,clientX:0,clientY:0},this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){let e=this.w.config.chart.accessibility;return e.enabled&&e.keyboard.enabled&&e.keyboard.navigation.enabled}_getSeriesCount(){let e=this.w,t=e.config.chart.type;return t===`pie`||t===`donut`||t===`polarArea`?1:e.seriesData.series.length}_getDataPointCount(e){let t=this.w,n=t.config.chart.type;if(n===`pie`||n===`donut`||n===`polarArea`)return t.seriesData.series.length;let r=t.seriesData.series;return r[e]&&Array.isArray(r[e])?r[e].length:0}_clampCursor(){let e=this._getSeriesCount();this.seriesIndex>=e&&(this.seriesIndex=e-1),this.seriesIndex<0&&(this.seriesIndex=0);let t=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=t&&(this.dataPointIndex=t-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){let e=this.w,t=e.globals,n=this.seriesIndex;if(!e.interact.zoomed)return;let r=e.seriesData.seriesX&&e.seriesData.seriesX[n];if(!r||!r.length)return;let i=t.minX,a=t.maxX;if(i===void 0||a===void 0)return;let o=r[this.dataPointIndex];if(o>=i&&o<=a)return;let s=r.length;for(let e=0;e<s;e++)if(r[e]>=i&&r[e]<=a){this.dataPointIndex=e;return}}_snapToVisibleRangeInDirection(e){let t=this.w,n=t.globals,r=this.seriesIndex,i=t.seriesData.seriesX&&t.seriesData.seriesX[r];if(!i||!i.length)return;let a=n.minX,o=n.maxX;if(a===void 0||o===void 0)return;let s=i.length;if(e>=0){for(let e=0;e<s;e++)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}else for(let e=s-1;e>=0;e--)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}_isDataPointVisible(e,t){let n=this.w,r=n.globals;if(!n.interact.zoomed)return!0;let i=n.seriesData.seriesX&&n.seriesData.seriesX[e];if(!i)return!0;let a=i[t];return a===void 0?!0:a>=r.minX&&a<=r.maxX}_announce(e){let t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;let n=t.dom.baseEl;if(!n)return;let r=n.querySelector(`.apexcharts-sr-status`);r&&(r.textContent=``,setTimeout(()=>{r.textContent=e},0))}};kh.registerFeatures({keyboardNavigation:nv});function rv(e,t){if(!(t>0))return[];if(t===1)return[Y({},e)];let n=e.width>=e.height,r=n?e.width:e.height,i=n?e.height:e.width,a=i>0?r/i:t,o=Math.max(1,Math.ceil(Math.sqrt(a*t)));o>t&&(o=t);let s=Math.floor(t/o),c=t-s*o,l=[],u=r/o,d=0;for(let t=0;t<o;t++){let t=s+(c>0?1:0);c>0&&c--;let r=t>0?i/t:0;for(let i=0;i<t;i++)l.push(n?{x:e.x+d,y:e.y+i*r,width:u,height:r}:{x:e.x+i*r,y:e.y+d,width:r,height:u});d+=u}return l}function iv(e,t,n){if(!(t>0))return[];let r=e.width>=e.height,i=r?e.width:e.height,a=r?e.height:e.width,o=r?e.y:e.x,s=o+a,c=a>0?i/a:t,l=Math.max(Math.ceil(Math.sqrt(c*t)),Math.ceil(i/16));l>=1||(l=1),l>t&&(l=t);let u=Math.floor(t/l),d=t-u*l,f=[],p=i/l,m=r?e.x:e.y;for(let e=0;e<l;e++){let e=u+(d>0?1:0);d>0&&d--;let t=[],i=n(m,m+p,r);if(Array.isArray(i))for(let e=0;e<i.length;e++){let n=i[e];if(!n)continue;let r=Math.max(o,Math.min(n[0],n[1])),a=Math.min(s,Math.max(n[0],n[1]));a>r&&t.push([r,a])}t.length||t.push([o,s]);let a=t.reduce((e,t)=>e+(t[1]-t[0]),0),c=t.map(n=>a>0?(n[1]-n[0])/a*e:e/t.length),l=c.map(e=>Math.floor(e)),h=l.reduce((e,t)=>e+t,0),g=c.map((e,t)=>({i:t,frac:e-Math.floor(e)})).sort((e,t)=>t.frac-e.frac);for(let t=0;h<e;t++,h++)l[g[t%g.length].i]++;for(let e=0;e<t.length;e++){let n=l[e];if(n<=0)continue;let i=t[e][0],a=(t[e][1]-i)/n;for(let e=0;e<n;e++)f.push(r?{x:m,y:i+e*a,width:p,height:a}:{x:i+e*a,y:m,width:a,height:p})}m+=p}return f}function av(e,t,n,r,i,a){let o=i===n?0:Math.round(32767*((e-n)/(i-n))),s=a===r?0:Math.round(32767*((t-r)/(a-r))),c=0;for(let e=32768;e>=1;e/=2){let t=(o&e)>0?1:0,n=(s&e)>0?1:0;if(c+=e*e*(3*t^n),n===0){t===1&&(o=e-1-o,s=e-1-s);let n=o;o=s,s=n}}return c}function ov(e,t){let n=1/0,r=1/0,i=-1/0,a=-1/0,o=e.map(e=>{let[o,s]=t(e);return o<n&&(n=o),o>i&&(i=o),s<r&&(r=s),s>a&&(a=s),[o,s]});return e.map((e,t)=>({item:e,d:av(o[t][0],o[t][1],n,r,i,a)})).sort((e,t)=>e.d-t.d).map(e=>e.item)}function sv(e){if(!e||typeof e!=`string`)return null;let t=e.trim();if(t[0]===`#`){let e=t.slice(1);return e.length===3?[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),1]:e.length===6||e.length===8?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),e.length===8?parseInt(e.slice(6,8),16)/255:1]:null}let n=t.match(/^rgba?\(([^)]+)\)$/i);if(n){let e=n[1].split(`,`).map(e=>parseFloat(e));return e.length<3||e.some(e=>!isFinite(e))?null:[e[0],e[1],e[2],e.length>3?e[3]:1]}return null}function cv(e,t){let n=sv(e),r=sv(t);return!n||!r?null:e=>{let t=Math.round(n[0]+(r[0]-n[0])*e),i=Math.round(n[1]+(r[1]-n[1])*e),a=Math.round(n[2]+(r[2]-n[2])*e),o=n[3]+(r[3]-n[3])*e;return o>=1?`rgb(${t},${i},${a})`:`rgba(${t},${i},${a},${o})`}}function lv(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}function uv({pieces:e,duration:t,onPieceDone:n,onAllDone:r}){let i=!1,a=Date.now(),o=Math.max(1,t),s=(e,t)=>{let n=e.from,r=e.to,i=e.el;i.setAttribute(`x`,String(n.x+(r.x-n.x)*t)),i.setAttribute(`y`,String(n.y+(r.y-n.y)*t)),i.setAttribute(`width`,String(Math.max(0,n.width+(r.width-n.width)*t))),i.setAttribute(`height`,String(Math.max(0,n.height+(r.height-n.height)*t))),i.setAttribute(`rx`,String(Math.max(0,n.rx+(r.rx-n.rx)*t))),e.fill?i.setAttribute(`fill`,e.fill(t)):t>=1&&e.fillEnd&&i.setAttribute(`fill`,e.fillEnd)},c=()=>{if(i)return;let t=Date.now()-a,l=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i._done)continue;let a=(t-i.delay)/o;if(a<1&&(l=!0),a<=0)continue;let c=Math.min(1,a);s(i,lv(c)),c>=1&&(i._done=!0,n&&n(i))}l?Q.requestAnimationFrame(c):r&&r()};return Q.requestAnimationFrame(c),()=>{i=!0}}var dv=new Set([`bar`,`funnel`,`pyramid`,`histogram`]),fv=new Set([`pie`,`donut`,`polarArea`,`radialBar`,`gauge`]),pv=new Set([`unit`,`waffle`]),mv=new Set([`treemap`,`sunburst`]),hv=new Set([`boxPlot`,`violin`]),gv=.55,_v=1500,vv=300;function yv(e){return dv.has(e)?`bar`:fv.has(e)?`radial`:pv.has(e)?`unit`:mv.has(e)?`partition`:hv.has(e)?`summary`:null}var bv=class{constructor(e,t){this.w=e,this.ctx=t,this._snapshot=null,this._ghost=null,this._pieceLayer=null,this._pieceCancel=null}canMorphTypes(e,t){if(e===t)return!1;let n=yv(e),r=yv(t);return!n||!r?!1:n===`partition`==(r===`partition`)?!0:n!==`unit`&&r!==`unit`}isCompatibleSeriesShape(e,t,n){if(!Array.isArray(n)||n.length===0)return!1;let r=yv(e),i=yv(t);return i===`unit`?n.every(e=>typeof e==`number`)?!0:n.every(e=>e&&typeof e==`object`&&Array.isArray(e.data)):i===`partition`?!0:i===`radial`?n.every(e=>typeof e==`number`)?!0:n.length===1&&n[0]&&typeof n[0]==`object`&&Array.isArray(n[0].data):i===`bar`||i===`summary`?n.every(e=>e&&typeof e==`object`&&Array.isArray(e.data)):r!==null&&i!==null}captureBeforeDestroy({fromType:e,toType:t,newSeries:n}){if(this._snapshot=null,this._removeGhost(),this._cancelPieces(),!d_.isBrowser())return!1;let r=this.w.config.chart.animations;if(!r||r.enabled===!1||r.chartTypeMorph&&r.chartTypeMorph.enabled===!1||r.respectReducedMotion&&Uh()||!this.canMorphTypes(e,t)||!this.isCompatibleSeriesShape(e,t,n))return!1;let{marks:i,branches:a,unitDots:o}=this._captureFromDOM(e);if(!i.length)return!1;let s=this._buildMapping(i,e,t,n,a);if(s.size===0)return!1;this._snapshot={fromType:e,toType:t,mapping:s,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}};let c=yv(e),l=yv(t),u=this._canProbePaths();if(l===`unit`&&(c===`bar`||c===`summary`||c===`radial`&&u)){let e=this._countUnitSeries(n);this._snapshot.pieceOut=e>0&&e<=_v}else if(c===`unit`&&(l===`bar`||l===`summary`||l===`radial`&&u)){let e=0;if(o.forEach(t=>{e+=t.length}),e>0&&e<=_v){this._snapshot.pieceIn=!0,this._snapshot.sourceDots=o;let e=[];l===`radial`?(Array.isArray(n)?n:[]).forEach((t,n)=>{e.push(`${n}:0`)}):(Array.isArray(n)?n:[]).forEach((t,n)=>{let r=t&&Array.isArray(t.data)?t.data:[];for(let t=0;t<r.length;t++)e.push(`${n}:${t}`)}),this._snapshot.keyOrder=e}}return this._needsGhost(e,t)&&!this._snapshot.pieceOut&&!this._snapshot.pieceIn&&this._captureGhost(),this.w.globals.previousPaths=[],!0}_needsGhost(e,t){return yv(e)===`unit`||yv(t)===`unit`}_captureGhost(){var e;let t=this.w.dom?.Paper,n=t&&t.node;if(!n||typeof n.cloneNode!=`function`)return;let r=n.cloneNode(!0);typeof r.querySelectorAll==`function`&&[`.apexcharts-xaxis`,`.apexcharts-yaxis`,`.apexcharts-grid`,`.apexcharts-gridlines-horizontal`,`.apexcharts-gridlines-vertical`,`.apexcharts-legend`,`.apexcharts-title-text`,`.apexcharts-subtitle-text`,`.apexcharts-annotations`,`.apexcharts-zoom-rect`,`.apexcharts-selection-rect`,`.apexcharts-xcrosshairs`,`.apexcharts-ycrosshairs`].forEach(e=>{r.querySelectorAll(e).forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)})}),typeof r.querySelectorAll==`function`&&r.querySelectorAll(`[id]`).forEach(e=>{e.removeAttribute(`id`)}),(e=r.removeAttribute)==null||e.call(r,`id`),this._ghost=r}_mountGhost(){var e,t;let n=this._ghost;if(!n||!d_.isBrowser())return;let r=this.w.dom?.elWrap;if(!r||typeof r.appendChild!=`function`){this._ghost=null;return}let i=n.style;i&&(i.position=`absolute`,i.left=`0`,i.top=`0`,i.background=`transparent`,i.pointerEvents=`none`,i.opacity=`1`),(e=n.setAttribute)==null||e.call(n,`aria-hidden`,`true`),(t=n.setAttribute)==null||t.call(n,`class`,`apexcharts-morph-ghost`),r.appendChild(n);let a=this.getSpeed(),o=Math.max(120,Math.round(a*gv));Q.requestAnimationFrame(()=>{i&&(i.transition=`opacity ${o}ms ease-in`,i.opacity=`0`)}),setTimeout(()=>this._removeGhost(),o+60)}_removeGhost(){let e=this._ghost;this._ghost=null,e&&e.parentNode&&e.parentNode.removeChild(e)}_countUnitSeries(e){if(!Array.isArray(e))return 0;let t=0;for(let n of e){if(!n||typeof n!=`object`||!Array.isArray(n.data))return 0;t+=n.data.length}return t}usesPieceTakeover(){return!!(this._snapshot&&this._snapshot.pieceOut)}claimsTargetMark(e,t){return!!(this._snapshot&&this._snapshot.pieceIn&&this._snapshot.mapping.has(`${e}:${t}`))}_makePieceLayer(){let e=this.w.dom?.elGraphical,t=e&&e.node;if(!t||typeof t.appendChild!=`function`)return null;let n=Q.createElementNS(`http://www.w3.org/2000/svg`,`g`);if(!n)return null;n.setAttribute(`class`,`apexcharts-morph-pieces`),n.setAttribute(`pointer-events`,`none`);let r=this.w.globals?.cuid;return r&&n.setAttribute(`clip-path`,`url(#gridRectBarMask${r})`),t.appendChild(n),this._pieceLayer=n,n}_revealPieceHidden(){let e=this.w.globals.dom?.baseEl;!e||typeof e.querySelectorAll!=`function`||e.querySelectorAll(`[data-piece-hidden]`).forEach(e=>{e.removeAttribute(`opacity`),e.removeAttribute(`data-piece-hidden`)})}_cancelPieces(){this._pieceCancel&&=(this._pieceCancel(),null);let e=this._pieceLayer;this._pieceLayer=null,e&&e.parentNode&&e.parentNode.removeChild(e),this._revealPieceHidden()}_canProbePaths(){if(!d_.isBrowser())return!1;let e=Q.createElementNS(`http://www.w3.org/2000/svg`,`path`);return!!e&&typeof e.isPointInFill==`function`}_makeExtentProber(e,t,n){let r=n.ownerDocument.createElementNS(`http://www.w3.org/2000/svg`,`path`);r.setAttribute(`d`,e),r.setAttribute(`fill`,`#000`),r.setAttribute(`stroke`,`#000`),r.setAttribute(`stroke-width`,`3`),r.setAttribute(`visibility`,`hidden`),n.appendChild(r);let i=r.ownerSVGElement;if(typeof r.isPointInFill!=`function`||!i||typeof i.createSVGPoint!=`function`)return n.removeChild(r),null;let a=i.createSVGPoint(),o=(e,t)=>{a.x=e,a.y=t;let n=r;return n.isPointInFill(a)||typeof n.isPointInStroke==`function`&&n.isPointInStroke(a)};return{intervalsAt:(e,n,r)=>{let i=r?t.y:t.x,a=i+(r?t.height:t.width);if(!(a>i))return null;let s=(e,t)=>r?o(t,e):o(e,t),c=[e+(n-e)*.1,(e+n)/2,n-(n-e)*.1],l=(e,t,n)=>{let r=t,i=e;for(let e=0;e<6;e++){let e=(r+i)/2;s(e,n)?i=e:r=e}return(r+i)/2},u=(a-i)/48,d=Array(49).fill(null),f=!1;for(let e of c)for(let t=0;t<=48;t++)d[t]===null&&s(i+t*u,e)&&(d[t]=e,f=!0);if(!f)return null;let p=[],m=-1;for(let e=0;e<=49;e++){let t=e<=48&&d[e]!==null;if(t&&m<0&&(m=e),!t&&m>=0){let t=e-1,n=d[m],r=m===0?i:l(i+m*u,i+(m-1)*u,n),o=t===48?a:l(i+t*u,i+(t+1)*u,d[t]);o>r&&p.push([r,o]),m=-1}}return p.length?p:null},dispose:()=>{r.parentNode&&r.parentNode.removeChild(r)}}}_separatePieces(){let e=this._snapshot,t=this.w.globals.dom?.baseEl;if(!e||!t)return this._revealPieceHidden();let n=new Map,r=0;if(t.querySelectorAll(`.apexcharts-unit-area`).forEach(e=>{let t=parseInt(e.getAttribute(`i`)??``,10);if(isNaN(t))return;let i=e.getAttribute(`cx`),a,o,s=3;if(i!=null)a=parseFloat(i),o=parseFloat(e.getAttribute(`cy`)??``),s=parseFloat(e.getAttribute(`r`)??`3`)||3;else{let t=parseFloat(e.getAttribute(`width`)??`0`)||0,n=parseFloat(e.getAttribute(`height`)??`0`)||0;a=parseFloat(e.getAttribute(`x`)??``)+t/2,o=parseFloat(e.getAttribute(`y`)??``)+n/2,s=Math.max(t,n)/2||3}if(!isFinite(a)||!isFinite(o))return;let c=n.get(t);c||(c=[],n.set(t,c)),c.push({el:e,x:a,y:o,r:s,fill:e.getAttribute(`fill`)}),r++}),r===0||r>_v)return this._revealPieceHidden();let i=this._makePieceLayer();if(!i)return this._revealPieceHidden();let a=[],o=i.ownerDocument,s=yv(e.fromType),c=s===`summary`||s===`radial`;if(Array.from(n.keys()).sort((e,t)=>e-t).forEach(t=>{let r=n.get(t),s=this.getInitialBBoxFor(t),l=e.mapping.get(`${t}:0`);if(!s||!l){r.forEach(e=>{e.el.removeAttribute(`opacity`),e.el.removeAttribute(`data-piece-hidden`)});return}let u=l.fill&&l.fill.indexOf(`url(`)!==0?l.fill:this.w.globals.colors?.[t]||r[0].fill,d=null;if(c){let e=this.getInitialPathFor(t,0);e&&(d=this._makeExtentProber(e,s,i))}let f=d?iv(s,r.length,d.intervalsAt):rv(s,r.length);d&&d.dispose();let p=ov(f,e=>[e.x+e.width/2,e.y+e.height/2]),m=ov(r,e=>[e.x,e.y]);for(let e=0;e<m.length;e++){let n=p[e],r=m[e],s=o.createElementNS(`http://www.w3.org/2000/svg`,`rect`);s.setAttribute(`data-i`,String(t)),s.setAttribute(`x`,String(n.x)),s.setAttribute(`y`,String(n.y)),s.setAttribute(`width`,String(n.width)),s.setAttribute(`height`,String(n.height)),s.setAttribute(`rx`,`0`),s.setAttribute(`fill`,String(u)),i.appendChild(s),a.push({el:s,from:{x:n.x,y:n.y,width:n.width,height:n.height,rx:0},to:{x:r.x-r.r,y:r.y-r.r,width:r.r*2,height:r.r*2,rx:r.r},fill:cv(u,r.fill),fillEnd:r.fill,delay:0,meta:{dotEl:r.el}})}}),!a.length)return this._cancelPieces();this._runPieces(a,e=>{let t=e.meta.dotEl;t.removeAttribute(`opacity`),t.removeAttribute(`data-piece-hidden`),e.el.parentNode&&e.el.parentNode.removeChild(e.el)})}_combinePieces(){let e=this._snapshot,t=this.w.globals.dom?.baseEl;if(!e||!e.sourceDots||!e.keyOrder||!t)return this._revealPieceHidden();let n=this._collectTargetMarks(e.toType);if(!n.size)return this._revealPieceHidden();let r=e.oldLayout.translateX-(this.w.layout.translateX||0),i=e.oldLayout.translateY-(this.w.layout.translateY||0),a=Array.from(e.sourceDots.keys()).sort((e,t)=>e-t),o=this._makePieceLayer();if(!o)return this._revealPieceHidden();let s=o.ownerDocument,c=[],l=yv(e.toType),u=l===`summary`||l===`radial`;for(let t=0;t<a.length;t++){let l=e.sourceDots.get(a[t]),d=e.keyOrder[t],f=d?n.get(d):null;if(!f||!l||!l.length){f&&f.els.forEach(e=>{e.removeAttribute(`opacity`),e.removeAttribute(`data-piece-hidden`)});continue}let p=f.fill&&f.fill.indexOf(`url(`)!==0?f.fill:this.w.globals.colors?.[f.realIndex]||l[0].fill,m=null;if(u){let e=f.d||f.els.map(e=>e.getAttribute(`pathTo`)||e.getAttribute(`d`)).filter(Boolean).join(` `);e&&(m=this._makeExtentProber(e,f.bbox,o))}let h=m?iv(f.bbox,l.length,m.intervalsAt):rv(f.bbox,l.length);m&&m.dispose();let g=ov(h,e=>[e.x+e.width/2,e.y+e.height/2]),_=ov(l,e=>[e.x,e.y]),v={remaining:_.length,els:f.els,tiles:[]};for(let e=0;e<_.length;e++){let t=_[e],n=g[e],a=s.createElementNS(`http://www.w3.org/2000/svg`,`rect`),l=t.x+r-t.r,u=t.y+i-t.r;a.setAttribute(`data-key`,d),a.setAttribute(`x`,String(l)),a.setAttribute(`y`,String(u)),a.setAttribute(`width`,String(t.r*2)),a.setAttribute(`height`,String(t.r*2)),a.setAttribute(`rx`,String(t.r)),a.setAttribute(`fill`,String(t.fill||p)),o.appendChild(a),v.tiles.push(a),c.push({el:a,from:{x:l,y:u,width:t.r*2,height:t.r*2,rx:t.r},to:{x:n.x,y:n.y,width:n.width,height:n.height,rx:0},fill:cv(t.fill,p),fillEnd:String(p),delay:0,meta:{markState:v}})}}if(!c.length)return this._cancelPieces();this._runPieces(c,e=>{let t=e.meta.markState;t.remaining--,t.remaining===0&&(t.els.forEach(e=>{e.removeAttribute(`opacity`),e.removeAttribute(`data-piece-hidden`)}),t.tiles.forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)}))})}_runPieces(e,t){let n=this.getSpeed(),r=Math.min(vv,n*.35),i=Math.max(180,n-r);for(let t=0;t<e.length;t++)e[t].delay=e.length>1?t/(e.length-1)*r:0;this._pieceCancel=uv({pieces:e,duration:i,onPieceDone:t,onAllDone:()=>{this._pieceCancel=null,this._cancelPieces()}})}_collectTargetMarks(e){let t=this.w.globals.dom?.baseEl,n=new Map;if(!t)return n;let r=yv(e);if(r===`radial`)return t.querySelectorAll(`.apexcharts-pie-series .apexcharts-pie-area`).forEach((e,t)=>{let r=e.getAttribute(`data:pathFinal`)||e.getAttribute(`d`);if(!r||!r.trim())return;let i=this._pathBBox(r);i&&n.set(`${t}:0`,{realIndex:t,j:0,d:r,bbox:{x:i.minX,y:i.minY,width:i.maxX-i.minX,height:i.maxY-i.minY},fill:e.getAttribute(`fill`),els:[e]})}),n;let i=r===`summary`?`.apexcharts-${e}-series`:`.apexcharts-bar-series`;return t.querySelectorAll(`${i} .apexcharts-series`).forEach(e=>{let t=parseInt(e.getAttribute(`data:realIndex`)??`0`,10)||0,r=0;e.querySelectorAll(`path[pathTo]`).forEach(e=>{let i=e.getAttribute(`pathTo`)||e.getAttribute(`d`);if(!i||!i.trim())return;let a=parseInt(e.getAttribute(`j`)??``,10),o=isNaN(a)?r++:a,s=this._pathBBox(i);if(!s)return;let c=`${t}:${o}`,l=n.get(c);l?(l.els.push(e),l.bbox={x:Math.min(l.bbox.x,s.minX),y:Math.min(l.bbox.y,s.minY),width:Math.max(l.bbox.x+l.bbox.width,s.maxX)-Math.min(l.bbox.x,s.minX),height:Math.max(l.bbox.y+l.bbox.height,s.maxY)-Math.min(l.bbox.y,s.minY)}):n.set(c,{realIndex:t,j:o,bbox:{x:s.minX,y:s.minY,width:s.maxX-s.minX,height:s.maxY-s.minY},fill:e.getAttribute(`fill`),els:[e]})})}),n}_captureFromDOM(e){let t=this.w.globals.dom?.baseEl;if(!t)return{marks:[],branches:[],unitDots:new Map};let n=[],r=[],i=new Map,a=yv(e);if(a===`bar`)t.querySelectorAll(`.apexcharts-bar-series .apexcharts-series`).forEach(e=>{let t=parseInt(e.getAttribute(`data:realIndex`)??`0`,10);e.querySelectorAll(`path[pathTo]`).forEach((e,r)=>{let i=e.getAttribute(`pathTo`)||e.getAttribute(`d`);i&&n.push({realIndex:t,j:r,d:i,fill:e.getAttribute(`fill`)})})});else if(a===`summary`){let r=new Map;t.querySelectorAll(`.apexcharts-${e}-area`).forEach(e=>{let t=parseInt(e.getAttribute(`j`)??``,10);if(isNaN(t))return;let n=e.getAttribute(`pathTo`)||e.getAttribute(`d`);if(!n||!n.trim())return;let i=typeof e.closest==`function`?e.closest(`.apexcharts-series`):null,a=parseInt(i?.getAttribute(`data:realIndex`)??`0`,10)||0,o=`${a}:${t}`,s=r.get(o);s?s.d+=` ${n}`:r.set(o,{realIndex:a,j:t,d:n,fill:e.getAttribute(`fill`)})}),Array.from(r.values()).sort((e,t)=>e.realIndex-t.realIndex||e.j-t.j).forEach(e=>n.push(e))}else if(a===`partition`)if(e===`treemap`){let e=e=>{let t=parseFloat(e.getAttribute(`x`)??``),n=parseFloat(e.getAttribute(`y`)??``),r=parseFloat(e.getAttribute(`width`)??``),i=parseFloat(e.getAttribute(`height`)??``);return[t,n,r,i].every(e=>isFinite(e))?`M ${t} ${n} L ${t+r} ${n} L ${t+r} ${n+i} L ${t} ${n+i} Z`:null};t.querySelectorAll(`.apexcharts-treemap-rect`).forEach(t=>{let r=e(t);r&&n.push({realIndex:parseInt(t.getAttribute(`i`)??`0`,10)||0,j:parseInt(t.getAttribute(`j`)??`0`,10)||0,d:r,fill:t.getAttribute(`fill`),key:t.getAttribute(`data:key`)||null})}),t.querySelectorAll(`.apexcharts-treemap-parent-rect`).forEach(t=>{let n=e(t),i=t.getAttribute(`data:key`);!n||!i||r.push({key:i,d:n,fill:t.getAttribute(`fill`)})})}else{let e=t.querySelectorAll(`.apexcharts-sunburst-arc`),i=[];e.forEach(e=>{e.getAttribute(`data:leaf`)===`true`&&i.push(e)}),(i.length?i:Array.from(e)).forEach((e,t)=>{let r=e.getAttribute(`d`);!r||!r.trim()||n.push({realIndex:t,j:0,d:r,fill:e.getAttribute(`fill`),key:e.getAttribute(`data:key`)||null})}),e.forEach(e=>{if(e.getAttribute(`data:leaf`)===`true`)return;let t=e.getAttribute(`d`),n=e.getAttribute(`data:key`);!t||!t.trim()||!n||r.push({key:n,d:t,fill:e.getAttribute(`fill`)})})}else if(a===`unit`){let e=t.querySelectorAll(`.apexcharts-unit-area`),r=new Map;e.forEach(e=>{let t=parseInt(e.getAttribute(`i`)??``,10);if(isNaN(t))return;let n=e.getAttribute(`cx`),a,o,s=3;if(n!=null)a=parseFloat(n),o=parseFloat(e.getAttribute(`cy`)??``),s=parseFloat(e.getAttribute(`r`)??`3`)||3;else{let t=parseFloat(e.getAttribute(`width`)??`0`)||0,n=parseFloat(e.getAttribute(`height`)??`0`)||0;a=parseFloat(e.getAttribute(`x`)??``)+t/2,o=parseFloat(e.getAttribute(`y`)??``)+n/2,s=Math.max(t,n)/2||3}if(!isFinite(a)||!isFinite(o))return;let c=i.get(t);c||(c=[],i.set(t,c)),c.push({x:a,y:o,r:s,fill:e.getAttribute(`fill`)});let l=r.get(t);if(!l){r.set(t,{minX:a,minY:o,maxX:a,maxY:o,fill:e.getAttribute(`fill`)});return}a<l.minX&&(l.minX=a),a>l.maxX&&(l.maxX=a),o<l.minY&&(l.minY=o),o>l.maxY&&(l.maxY=o)}),Array.from(r.keys()).sort((e,t)=>e-t).forEach(e=>{let t=r.get(e),i=t.minX-2,a=t.minY-2,o=t.maxX+2,s=t.maxY+2;n.push({realIndex:e,j:0,d:`M ${i} ${a} L ${o} ${a} L ${o} ${s} L ${i} ${s} Z`,fill:t.fill})})}else if(a===`radial`)if(e===`radialBar`||e===`gauge`){let e=this.w.layout.gridWidth/2,r=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;t.querySelectorAll(`.apexcharts-radial-series .apexcharts-radialbar-area`).forEach(t=>{let i=t.parentElement,a=parseInt(i?.getAttribute(`data:realIndex`)??`0`,10),o=t.getAttribute(`d`);if(!o)return;let s=parseFloat(t.getAttribute(`stroke-width`)||`0`),c=s>1&&this._radialArcToFilledSegment(o,s,e,r)||o;n.push({realIndex:a,j:0,d:c,fill:t.getAttribute(`stroke`)})})}else t.querySelectorAll(`.apexcharts-pie-series .apexcharts-pie-area`).forEach((e,t)=>{let r=e.getAttribute(`d`);r&&n.push({realIndex:t,j:0,d:r,fill:e.getAttribute(`fill`)})});return{marks:n,branches:r,unitDots:i}}_radialArcToFilledSegment(e,t,n,r){let i=e.match(/M\s*(-?[\d.]+)\s+(-?[\d.]+)\s+A\s*(-?[\d.]+)\s+(?:-?[\d.]+)\s+(?:-?[\d.]+)\s+(\d)\s+(\d)\s+(-?[\d.]+)\s+(-?[\d.]+)/);if(!i)return null;let a=parseFloat(i[1]),o=parseFloat(i[2]),s=parseFloat(i[3]),c=parseInt(i[4],10),l=parseInt(i[5],10),u=parseFloat(i[6]),d=parseFloat(i[7]);if(!isFinite(s)||s<=0)return null;let f=t/2,p=s+f,m=Math.max(0,s-f),h=(e,t,i)=>{let a=e-n,o=t-r,s=Math.sqrt(a*a+o*o);if(s===0)return{x:n,y:r};let c=i/s;return{x:n+a*c,y:r+o*c}},g=h(a,o,p),_=h(u,d,p),v=h(a,o,m),y=h(u,d,m),b=l?0:1;return`M ${g.x} ${g.y} A ${p} ${p} 0 ${c} ${l} ${_.x} ${_.y} L ${y.x} ${y.y} A ${m} ${m} 0 ${c} ${b} ${v.x} ${v.y} Z`}buildRingSegmentPath(e,t,n,r,i,a){let o=r/2,s=n+o,c=Math.max(0,n-o),l=(i-90)*Math.PI/180,u=(a-90)*Math.PI/180,d={x:e+s*Math.cos(l),y:t+s*Math.sin(l)},f={x:e+s*Math.cos(u),y:t+s*Math.sin(u)},p={x:e+c*Math.cos(l),y:t+c*Math.sin(l)},m={x:e+c*Math.cos(u),y:t+c*Math.sin(u)},h=a>i?1:0,g=Math.abs(a-i)>180?1:0;return`M ${d.x} ${d.y} A ${s} ${s} 0 ${g} ${h} ${f.x} ${f.y} L ${m.x} ${m.y} A ${c} ${c} 0 ${g} ${1-h} ${p.x} ${p.y} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(e,t,n,r,i){let a=new Map,o=yv(n),s=e.slice().sort((e,t)=>e.realIndex-t.realIndex||e.j-t.j);if(o===`partition`&&i&&i.length){let e=s.filter(e=>e.key);e.length===s.length&&(e.forEach(e=>{a.set(`key:${e.key}`,{d:e.d,fill:e.fill})}),i.forEach(e=>{a.set(`key:${e.key}`,{d:e.d,fill:e.fill})}))}if(o===`radial`||o===`unit`||o===`partition`)return s.forEach((e,t)=>{a.set(`${t}:0`,{d:e.d,fill:e.fill})}),a;if(o===`bar`||o===`summary`){let e=[];return(Array.isArray(r)?r:[]).forEach((t,n)=>{let r=t&&Array.isArray(t.data)?t.data:[];for(let t=0;t<r.length;t++)e.push({realIndex:n,j:t})}),s.forEach((t,n)=>{let r=e[n];r&&a.set(`${r.realIndex}:${r.j}`,{d:t.d,fill:t.fill})}),a}return a}isActive(){return this._snapshot!==null}getInitialPathFor(e,t){if(!this._snapshot)return null;let n=this._snapshot.mapping.get(`${e}:${t}`);if(!n)return null;let r=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),i=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return r===0&&i===0?n.d:this._translatePathD(n.d,r,i)}_translatePathD(e,t,n){return t===0&&n===0?e:Bg(e).map(e=>{let r=e[0];return r===`Z`?`Z`:r===`M`||r===`L`||r===`T`?`${r} ${e[1]+t} ${e[2]+n}`:r===`H`?`${r} ${e[1]+t}`:r===`V`?`${r} ${e[1]+n}`:r===`C`?`${r} ${e[1]+t} ${e[2]+n} ${e[3]+t} ${e[4]+n} ${e[5]+t} ${e[6]+n}`:r===`S`||r===`Q`?`${r} ${e[1]+t} ${e[2]+n} ${e[3]+t} ${e[4]+n}`:r===`A`?`${r} ${e[1]} ${e[2]} ${e[3]} ${e[4]} ${e[5]} ${e[6]+t} ${e[7]+n}`:e.join(` `)}).join(` `)}getInitialCenterFor(e){let t=this.getInitialBBoxFor(e);return t?{x:t.x+t.width/2,y:t.y+t.height/2}:null}getInitialPathAt(e){return this.getInitialPathFor(e,0)}getInitialPathForKey(e){return!this._snapshot||!e?null:this.getInitialPathFor(`key`,e)}hasKeyedMarks(){if(!this._snapshot)return!1;for(let e of this._snapshot.mapping.keys())if(typeof e==`string`&&e.startsWith(`key:`))return!0;return!1}getInitialSlotFor(e,t,n){let r=this.getInitialBBoxFor(e);if(!r)return null;let i=r.x+r.width/2,a=r.y+r.height/2;if(!(n>1)||!(t>=0))return{x:i,y:a};let o=(Math.min(t,n-1)+.5)/n;return r.height>=r.width?{x:i,y:r.y+r.height*(1-o)}:{x:r.x+r.width*o,y:a}}getInitialBBoxFor(e){if(!this._snapshot)return null;let t=this._snapshot.mapping.get(`${e}:0`);if(!t)return null;let n=this._pathBBox(t.d);if(!n)return null;let r=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),i=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return{x:n.minX+r,y:n.minY+i,width:n.maxX-n.minX,height:n.maxY-n.minY}}_pathBBox(e){let t=Bg(e),n=1/0,r=1/0,i=-1/0,a=-1/0,o=!1;return t.forEach(e=>{let t=e[0];if(t===`Z`)return;let s=[];if(t===`H`)s=[[e[1],(r+a)/2||e[1]]];else if(t===`V`)s=[[(n+i)/2||e[1],e[1]]];else if(t===`A`)s=[[e[6],e[7]]];else for(let t=1;t+1<e.length;t+=2)s.push([e[t],e[t+1]]);s.forEach(([e,t])=>{!isFinite(e)||!isFinite(t)||(o=!0,e<n&&(n=e),e>i&&(i=e),t<r&&(r=t),t>a&&(a=t))})}),o?{minX:n,minY:r,maxX:i,maxY:a}:null}getInitialFillFor(e,t){if(!this._snapshot)return null;let n=this._snapshot.mapping.get(`${e}:${t}`);return n?n.fill:null}getSpeed(){let e=this.w.config.chart.animations;return e.chartTypeMorph&&e.chartTypeMorph.speed||e.speed||600}applyChromeFade(){if(!this._snapshot||!d_.isBrowser())return;let e=this.w.globals.dom?.baseEl;if(!e)return;this._snapshot.pieceOut?this._separatePieces():this._snapshot.pieceIn?this._combinePieces():this._mountGhost();let t=this.getSpeed();[`.apexcharts-xaxis`,`.apexcharts-yaxis`,`.apexcharts-grid`,`.apexcharts-gridlines-horizontal`,`.apexcharts-gridlines-vertical`,`.apexcharts-legend`,`.apexcharts-title-text`,`.apexcharts-subtitle-text`].forEach(n=>{e.querySelectorAll(n).forEach(e=>{e.style&&(e.style.opacity=`0`,e.style.transition=`opacity ${t}ms ease-out`,Q.requestAnimationFrame(()=>{e.style.opacity=`1`}),setTimeout(()=>{e.style.transition=``,e.style.opacity=``},t+80))})}),setTimeout(()=>this.cleanup(),t+100)}cleanup(){this._snapshot=null,this._removeGhost(),this._cancelPieces()}};kh.registerFeatures({morphTypeChange:bv});var xv=`http://www.w3.org/1999/xhtml`,Sv=18;function Cv(e,t){return Y(Y({show:!0,position:`top-left`,separator:` / `,rootLabel:`All`,offsetX:0,offsetY:0,formatter:void 0},e.config.drilldown&&e.config.drilldown.breadcrumb||{}),t||{})}function wv(e,t){let n=[`.apexcharts-title-text`,`.apexcharts-subtitle-text`].map(t=>e.dom.baseEl.querySelector(t)).filter(e=>e!==null);if(!n.length)return;let r=e.dom.elWrap.getBoundingClientRect().top;for(let e=0;e<n.length+1;e++){let e=t.getBoundingClientRect(),i=n.find(t=>{let n=t.getBoundingClientRect();return e.left<n.right&&e.right>n.left&&e.top<n.bottom&&e.bottom>n.top});if(!i)break;t.style.top=`${i.getBoundingClientRect().bottom-r+4}px`}}function Tv(e,t){let n=e.layout.translateY||0,r=e.dom.elWrap;if(!r)return n;let i=e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-label`);if(!i.length)return n;let a=r.getBoundingClientRect().top,o=t.getBoundingClientRect(),s=n;for(let e=0;e<i.length;e++){let t=i[e].getBoundingClientRect();t.height&&(t.left>=o.right||t.right<=o.left||(s=Math.min(s,t.top-a)))}return s}function Ev(e,t,n,r){let i=t?.dimensions?.dimHelpers,a=i?i.getTitleSubtitleCoords(`title`).height+i.getTitleSubtitleCoords(`subtitle`).height:0,o=n.getBoundingClientRect().height||Sv,s=r&&r.offsetY||0,c=Tv(e,n);if(c-a>=o+1)return n.style.top=`${c-o-1+s}px`,!0;n.style.top=`${a+s}px`;let l=e.config.theme.mode===`dark`;return n.style.background=l?`rgba(20,24,30,0.82)`:`rgba(255,255,255,0.86)`,n.style.borderRadius=`4px`,!1}function Dv(e){let t=e.dom.elWrap;if(!t)return;let n=t.querySelector(`.apexcharts-breadcrumb`);n&&n.parentNode&&n.parentNode.removeChild(n)}function Ov(e,t){if(!d_.isBrowser())return null;let n=e.dom.elWrap;if(!n)return null;Dv(e);let r=t.config||Cv(e);if(r.show===!1)return null;let i=t.crumbs||[];if(i.length<2)return null;let a=Q.createElementNS(xv,`nav`);a.setAttribute(`class`,`apexcharts-breadcrumb`),a.setAttribute(`aria-label`,t.ariaLabel||`Breadcrumb`),kv(a,r),t.compact&&(a.style.fontSize=`11px`,a.style.padding=`0 2px`);let o=r.separator==null?` / `:r.separator;return i.forEach((e,n)=>{if(n>0){let e=Q.createElementNS(xv,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.setAttribute(`aria-hidden`,`true`),e.textContent=o,a.appendChild(e)}let s=n===0?r.rootLabel??`All`:e.label;if(typeof r.formatter==`function`&&(s=r.formatter(s,{index:n,depth:i.length-1,data:e.data})),n===i.length-1){let e=Q.createElementNS(xv,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),e.setAttribute(`aria-current`,`page`),e.textContent=String(s),a.appendChild(e);return}let c=Q.createElementNS(xv,`button`);if(c.setAttribute(`type`,`button`),c.setAttribute(`class`,`apexcharts-breadcrumb-item`),n===0){let e=Q.createElementNS(xv,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),e.setAttribute(`aria-hidden`,`true`),e.textContent=`←`,c.appendChild(e)}let l=Q.createElementNS(xv,`span`);l.setAttribute(`class`,`apexcharts-breadcrumb-label`),l.textContent=String(s),c.appendChild(l),c.addEventListener(`click`,()=>t.onNavigate(n,e)),a.appendChild(c)}),n.appendChild(a),a}function kv(e,t){let n=t.offsetX||0,r=t.offsetY||0;e.style.position=`absolute`,e.style.top=r+`px`,t.position===`top-right`?e.style.right=-n+3+`px`:e.style.left=n+`px`}var Av=`http://www.w3.org/1999/xhtml`,jv=class{constructor(e,t,n){this.w=e,this.ctx=t,this.drilldown=n}render(e){if(!d_.isBrowser())return;let t=this.w,n=t.dom.elWrap;if(!n)return;let r=n.querySelector(`.apexcharts-breadcrumb`);r&&r.parentNode&&r.parentNode.removeChild(r);let i=t.config.drilldown&&t.config.drilldown.breadcrumb;if(!i||i.show===!1||this.drilldown.depth===0)return;let a=Q.createElementNS(Av,`nav`);a.setAttribute(`class`,`apexcharts-breadcrumb`),a.setAttribute(`aria-label`,`Drilldown breadcrumb`),this._position(a,i);let o=i.separator==null?` / `:i.separator;e.forEach((t,n)=>{if(n>0){let e=Q.createElementNS(Av,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.setAttribute(`aria-hidden`,`true`),e.textContent=o,a.appendChild(e)}let r=this._label(t,n);if(n===e.length-1){let e=Q.createElementNS(Av,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),e.setAttribute(`aria-current`,`page`),e.textContent=r,a.appendChild(e)}else{let e=Q.createElementNS(Av,`button`);if(e.setAttribute(`type`,`button`),e.setAttribute(`class`,`apexcharts-breadcrumb-item`),n===0){let t=Q.createElementNS(Av,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),t.setAttribute(`aria-hidden`,`true`),t.textContent=`←`,e.appendChild(t)}let t=Q.createElementNS(Av,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-label`),t.textContent=r,e.appendChild(t),e.addEventListener(`click`,()=>this.drilldown.drillToLevel(n)),a.appendChild(e)}}),n.appendChild(a),this.w.globals.axisCharts&&Ev(this.w,this.ctx,a,i),this._avoidChromeOverlap(a)}_avoidChromeOverlap(e){let t=this.w,n=[`.apexcharts-title-text`,`.apexcharts-subtitle-text`].map(e=>t.dom.baseEl.querySelector(e)).filter(e=>e!==null);if(!n.length)return;let r=t.dom.elWrap.getBoundingClientRect().top;for(let t=0;t<n.length+1;t++){let t=e.getBoundingClientRect(),i=n.find(e=>{let n=e.getBoundingClientRect();return t.left<n.right&&t.right>n.left&&t.top<n.bottom&&t.bottom>n.top});if(!i)break;e.style.top=`${i.getBoundingClientRect().bottom-r+4}px`}}_label(e,t){let n=this.w.config.drilldown.breadcrumb,r;if(t===0)r=n.rootLabel==null?`All`:n.rootLabel;else{let t=(this.w.config.drilldown.series||[]).find(t=>t&&t.id===e);r=t&&t.name||String(e)}return typeof n.formatter==`function`?n.formatter(r,{index:t,depth:this.drilldown.depth}):r}_position(e,t){let n=t.offsetX||0,r=t.offsetY||0;e.style.position=`absolute`,e.style.top=r+`px`,t.position===`top-right`?e.style.right=-n+3+`px`:e.style.left=n+`px`}},Mv=`http://www.w3.org/1999/xhtml`,Nv=`apexcharts-drilldown-loading`,Pv=class{constructor(e){this.w=e,this.el=null}_cfg(){let e=this.w.config.drilldown,t=e&&e.loading;return t===!1?{show:!1}:t||{}}show(){if(!d_.isBrowser())return;let e=this._cfg();if(e.show===!1)return;let t=this.w.dom.elWrap;if(!t)return;this.hide();let n=Q.createElementNS(Mv,`div`);n.setAttribute(`class`,Nv),n.setAttribute(`role`,`status`),n.setAttribute(`aria-live`,`polite`),n.setAttribute(`aria-label`,e.text||`Loading`);let r=Q.createElementNS(Mv,`div`);if(r.setAttribute(`class`,`${Nv}-spinner`),r.setAttribute(`aria-hidden`,`true`),n.appendChild(r),e.text){let t=Q.createElementNS(Mv,`span`);t.setAttribute(`class`,`${Nv}-text`),t.textContent=e.text,n.appendChild(t)}t.appendChild(n),this.el=n}hide(){let e=this.w.dom.elWrap;if(e){let t=e.querySelectorAll(`.${Nv}`);for(let e=0;e<t.length;e++){let n=t[e];n.parentNode&&n.parentNode.removeChild(n)}}else this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);this.el=null}},Fv=32,Iv=`__apexDrilldownMarker`,Lv=class{constructor(e,t){this.w=e,this.ctx=t,this.stack=[],this.rootSnapshot=null,this._wired=!1,this._asyncCache=new Map,this._pending=null,this._warnedUnreachable=!1,this._warnedNoSliceOffset=!1,this.breadcrumb=new jv(e,t,this),this.loading=new Pv(e),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onPlotDown=this._onPlotDown.bind(this),this._onPlotClick=this._onPlotClick.bind(this),this._downAt=null,this._plotClickWired=null,this.init()}init(){let e=this.w;!e.config.drilldown||!e.config.drilldown.enabled||this._wired||(this._wired=!0,this.ctx.addEventListener(`dataPointSelection`,this._onPointSelect),this.ctx.addEventListener(`mounted`,this._afterRender),this.ctx.addEventListener(`updated`,this._afterRender),e.config.markers&&(e.config.markers.discrete=this._drillMarkers(e.config.series)))}get path(){return[`root`,...this.stack.map(e=>e.id)]}get depth(){return this.stack.length}drillDown(e,t,n){let r=this._resolveChild(e);return r?this._drillInto(r,t,n):typeof this.w.config.drilldown.onDrillDown==`function`?this._drillDownAsync(e,t,n):(console.warn(`ApexCharts: drilldown id "${e}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(e){let t=this.stack.length;if(e<0||e>=t)return Promise.resolve(this.ctx);let n=this.path[this.path.length-1],r=e===0?this.rootSnapshot:this.stack[e].restore;this.stack=this.stack.slice(0,e);let i=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(r),`up`,{from:n,to:i})}_resolveChild(e){let t=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(t)&&t.find(t=>t&&t.id===e)||null}_drillInto(e,t,n){if(this.stack.length>=Fv)return console.warn(`ApexCharts: drilldown max depth (${Fv}) reached.`),Promise.resolve(this.ctx);this.rootSnapshot||=this._snapshot();let r=this.path[this.path.length-1];return this.stack.push({id:e.id,name:e.name,restore:this._snapshot()}),this._apply(this._viewFromChild(e),`down`,{from:r,to:e.id,point:t,seriesIndex:n&&n.seriesIndex,dataPointIndex:n&&n.dataPointIndex})}_drillDownAsync(e,t,n){let r=this.w.config.drilldown.onDrillDown,i=this._cacheGet(e);if(i)return this._drillInto(i,t,n);if(this._pending)return this._pending;let a;this.loading.show();try{a=r({id:e,point:t,seriesIndex:n&&n.seriesIndex,dataPointIndex:n&&n.dataPointIndex})}catch(t){return this.loading.hide(),this._fire(`drillDownError`,{id:e,error:t}),Promise.resolve(this.ctx)}let o=()=>{this._pending=null,this.loading.hide()},s=Promise.resolve(a).then(r=>{if(o(),this._isDead())return this.ctx;if(!r||!r.data)return this._fire(`drillDownError`,{id:e,error:Error(`drilldown: onDrillDown resolved without a drillable level for id "${e}" (expected an object with a \`data\` array).`)}),this.ctx;let i=r.id==null?X(Y({},r),{id:e}):r;return this._cacheSet(e,i),this._drillInto(i,t,n)},t=>(o(),this._isDead()||this._fire(`drillDownError`,{id:e,error:t}),this.ctx));return this._pending=s,s}_isDead(){let e=this.w;return!e||!e.globals||e.globals.isDestroyed===!0}_cacheEnabled(){let e=this.w.config.drilldown;return!!(e&&e.cache!==!1)}_cacheGet(e){return!this._cacheEnabled()||e==null?null:this._asyncCache.get(e)||null}_cacheSet(e,t){!this._cacheEnabled()||e==null||this._asyncCache.set(e,t)}clearCache(e){return e==null?this._asyncCache.clear():this._asyncCache.delete(e),this.ctx}_snapshot(){let e=this.w.config,t=this._overrideFields(),n={series:this._uncollapseSeries($.clone(e.series))};return Array.isArray(e.labels)&&e.labels.length&&(n.labels=$.clone(e.labels)),n.chart={type:e.chart.type,stacked:e.chart.stacked},t.has(`xaxis`)&&(n.xaxis=$.clone(e.xaxis)),t.has(`yaxis`)&&(n.yaxis=$.clone(e.yaxis)),t.has(`colors`)&&(n.colors=e.colors?$.clone(e.colors):void 0),t.has(`plotOptions`)&&(n.plotOptions=$.clone(e.plotOptions)),t.has(`fill`)&&(n.fill=$.clone(e.fill)),t.has(`legend`)&&(n.legend=$.clone(e.legend)),n}_uncollapseSeries(e){let t=this.w,n=t.globals,r=[...n.collapsedSeries||[],...n.ancillaryCollapsedSeries||[]];if(!r.length)return e;let i=t.config.chart.type,a=(i===`pie`||i===`donut`||i===`polarArea`)&&e.length===1&&e[0]&&typeof e[0]==`object`&&Array.isArray(e[0].data)?e[0].data:e;for(let t of r){let r=t.index;n.axisCharts?e[r]&&(e[r].data=Array.isArray(t.data)?t.data.slice():t.data):a[r]&&typeof a[r]==`object`?a[r].y=t.data:a[r]!==void 0&&(a[r]=t.data)}return e}_overrideFields(){let e=new Set,t=this.w.config.drilldown&&this.w.config.drilldown.series||[];for(let n of t)n&&(n.xaxis&&e.add(`xaxis`),n.yaxis&&e.add(`yaxis`),n.colors&&e.add(`colors`),n.plotOptions&&e.add(`plotOptions`),n.fill&&e.add(`fill`),n.legend&&e.add(`legend`));return e}_copyOptionalViewFields(e,t){t.xaxis&&(e.xaxis=t.xaxis),t.yaxis&&(e.yaxis=t.yaxis),t.colors&&(e.colors=t.colors),t.plotOptions&&(e.plotOptions=t.plotOptions),t.fill&&(e.fill=t.fill),t.legend&&(e.legend=t.legend)}_viewFromChild(e){let t={};Array.isArray(e.series)?t.series=e.series:t.series=[{name:e.name||``,data:e.data}];let n={};return e.chart&&e.chart.type&&(n.type=e.chart.type),e.chart&&e.chart.stacked!=null&&(n.stacked=e.chart.stacked),Object.keys(n).length&&(t.chart=n),this._copyOptionalViewFields(t,e),t}_viewFromSnapshot(e){let t={series:e.series,chart:e.chart};return e.labels&&e.labels.length&&(t.labels=e.labels),this._copyOptionalViewFields(t,e),t}_apply(e,t,n){let r=this.w;r.interact.selectedDataPoints=[],r.globals.collapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeries=[],r.globals.ancillaryCollapsedSeriesIndices=[],r.globals.allSeriesCollapsed=!1,r.globals.risingSeries=[],e.markers=X(Y({},e.markers||{}),{discrete:this._drillMarkers(e.series)});let i=(!r.config.drilldown.animation||r.config.drilldown.animation.enabled!==!1)&&r.config.chart.animations.enabled!==!1;t===`down`&&this._fire(`drillDownStart`,n);let a=t=>this.ctx.updateOptions(e,!1,t,!1,!1),o=()=>(this._fire(t===`down`?`drillDownEnd`:`drillUp`,n),this.ctx);if(i&&this._zoomEnabled()){let e=this._triggerOrigin(n);if(e)return this._zoomDrill(e,t,()=>a(!1)).then(o)}return a(i).then(o)}_zoomEnabled(){let e=this.w.config.drilldown&&this.w.config.drilldown.animation;return!!(e&&e.zoomFromPoint)}_svgNode(){let e=this.w.dom&&this.w.dom.Paper;return e&&e.node?e.node:null}_markGroup(){let e=this._svgNode();return!e||typeof e.querySelector!=`function`?null:e.querySelector(`.apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap`)}_triggerOrigin(e){if(!d_.isBrowser())return null;let t=this._svgNode(),n=this._markGroup();if(!t||!n||typeof n.animate!=`function`||typeof t.getBoundingClientRect!=`function`)return null;let r=t.getBoundingClientRect(),i=null;if(e&&e.seriesIndex!=null&&e.dataPointIndex!=null&&this.w.dom.baseEl&&(i=this.w.dom.baseEl.querySelector(`[index="${e.seriesIndex}"][j="${e.dataPointIndex}"]`)),i&&typeof i.getBoundingClientRect==`function`){let e=i.getBoundingClientRect();return{x:e.left+e.width/2-r.left,y:e.top+e.height/2-r.top}}let a=n.getBoundingClientRect();return{x:a.left+a.width/2-r.left,y:a.top+a.height/2-r.top}}_zoomDrill(e,t,n){return Rh(this,null,function*(){let r=this._zoomDuration(),i=t===`down`,a=Math.round(r*.55),o=i?`scale(1.03)`:`scale(0.97)`,s=i?`scaleX(0.55) scaleY(0.85)`:`scale(1.04)`,c=t=>{t.style.transformBox=`view-box`,t.style.transformOrigin=`${e.x}px ${e.y}px`},l=e=>{e.style.transform=``,e.style.opacity=``,e.style.transformOrigin=``,e.style.transformBox=``},u=this._markGroup(),d=null;if(u){c(u),d=u.animate([{transform:`scale(1)`,opacity:1},{transform:o,opacity:0}],{duration:a,easing:`ease-in`,fill:`forwards`});try{yield d.finished}catch{}}yield n();let f=this._markGroup();if(f){c(f),f.style.opacity=`0`,f.style.transform=s,d&&u===f&&d.cancel();let e=f.animate([{transform:s,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:r,easing:`cubic-bezier(0.16, 1, 0.3, 1)`,fill:`forwards`});try{yield e.finished}catch{}l(f),e.cancel()}})}_zoomDuration(){let e=this.w.config.drilldown&&this.w.config.drilldown.animation,t=e&&typeof e.speed==`number`?e.speed:260;return Math.max(80,t)}_fire(e,t){let n=this.w.config.chart.events&&this.w.config.chart.events[e];typeof n==`function`&&n(t,this.ctx,this.w),this.ctx.events.fireEvent(e,[t,this.ctx,this.w])}_onPointSelect(e,t,n){if(!n)return;let r=this._pointAt(n.seriesIndex,n.dataPointIndex);if(r&&typeof r==`object`&&r.drilldown!=null)return this.drillDown(r.drilldown,r,n);if(typeof this.w.config.drilldown.onDrillDown==`function`)return this._drillDownAsync(null,r,n)}_pointAt(e,t){let n=this.w.config.series;if(!Array.isArray(n)||e==null||t==null)return null;let r=n[e];return!r||!Array.isArray(r.data)||r.data[t]==null?null:r.data[t]}_afterRender(){let e=this.w;!e.config.drilldown||!e.config.drilldown.enabled||(this._markDrillableTargets(),this._wirePlotClick(),this.breadcrumb.render(this.path),e.config.markers&&(e.config.markers.discrete=this._drillMarkers(e.config.series)))}_markDrillableTargets(){if(!d_.isBrowser())return;let e=this.w,t=e.dom.baseEl,n=e.config.series;if(!t||!Array.isArray(n))return;let r=0;n.forEach((e,n)=>{let i=e&&Array.isArray(e.data)?e.data:null;i&&i.forEach((e,i)=>{if(!e||typeof e!=`object`||e.drilldown==null)return;let a=t.querySelectorAll(`[index="${n}"][j="${i}"]`);a.length||r++,a.forEach(e=>{this._isClickThroughMark(e)&&e.classList.remove(`no-pointer-events`),e.classList.add(`apexcharts-drilldown-target`)})})}),r&&!this._warnedUnreachable&&(this._warnedUnreachable=!0,console.warn(`ApexCharts: ${r} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \`drilldown.marker\` on, or give the series markers of its own (\`markers.size > 0\`).`))}warnSliceOffsetDisabled(){this._warnedNoSliceOffset||(this._warnedNoSliceOffset=!0,console.warn("ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered."))}_wirePlotClick(){if(!d_.isBrowser())return;let e=this.w.dom.baseEl;!e||this._plotClickWired===e||(this._plotClickWired&&(this._plotClickWired.removeEventListener(`mousedown`,this._onPlotDown),this._plotClickWired.removeEventListener(`click`,this._onPlotClick)),e.addEventListener(`mousedown`,this._onPlotDown),e.addEventListener(`click`,this._onPlotClick),this._plotClickWired=e)}_onPlotDown(e){this._downAt={x:e.clientX,y:e.clientY}}_onPlotClick(e){let t=this.w;if(!t.config.drilldown||!t.config.drilldown.enabled)return;let n=this._downAt;if(this._downAt=null,n&&Math.hypot(e.clientX-n.x,e.clientY-n.y)>4)return;let r=e.target;if(!r||typeof r.closest!=`function`||r.closest(`.apexcharts-drilldown-target`)||r.closest(`.apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip`))return;let i=t.interact.capturedSeriesIndex,a=t.interact.capturedDataPointIndex;if(i==null||a==null||i<0||a<0||!this._isPointBasedSeries(t.config.series[i]))return;let o=this._pointAt(i,a);if(!(!o||typeof o!=`object`||o.drilldown==null))return this.drillDown(o.drilldown,o,{seriesIndex:i,dataPointIndex:a})}_isClickThroughMark(e){return!e.classList||!e.classList.contains(`no-pointer-events`)||!e.classList.contains(`apexcharts-marker`)?!1:!(typeof e.closest==`function`&&e.closest(`.apexcharts-tooltip`))}_drillMarkers(e){let t=this.w,n=t.config.drilldown,r=Array.isArray(t.config.markers&&t.config.markers.discrete)?t.config.markers.discrete.filter(e=>!e||!e[Iv]):[],i=n&&n.marker||{};if(i.show===!1||!Array.isArray(e))return r;let a=[];return e.forEach((e,t)=>{if(!this._seriesNeedsDrillMarker(t,e))return;let n=e&&Array.isArray(e.data)?e.data:null;n&&n.forEach((e,n)=>{if(!e||typeof e!=`object`||e.drilldown==null)return;let r={seriesIndex:t,dataPointIndex:n,[Iv]:!0};i.size!==void 0&&(r.size=i.size),i.shape!==void 0&&(r.shape=i.shape),i.fillColor!==void 0&&(r.fillColor=i.fillColor),i.strokeColor!==void 0&&(r.strokeColor=i.strokeColor),a.push(r)})}),r.concat(a)}_seriesNeedsDrillMarker(e,t){if(!this._isPointBasedSeries(t))return!1;let n=this.w.config.markers&&this.w.config.markers.size,r=Array.isArray(n)?n[e]:n;return!(Number(r)>0)}_isPointBasedSeries(e){let t=e&&e.type||this.w.config.chart.type;return t===`line`||t===`area`}};kh.registerFeatures({drilldown:Lv});var Rv=`__apexcharts_plugins__`;function zv(){let e=globalThis;return e[Rv]||(e[Rv]={}),e[Rv]}function Bv(e){return zv()[e]||null}var Vv=4,Hv=[`updateOptions`,`updateSeries`,`appendData`,`appendSeries`,`toggleSeries`,`showSeries`,`hideSeries`,`highlightSeries`,`isSeriesHidden`,`zoomX`,`addXaxisAnnotation`,`addYaxisAnnotation`,`addPointAnnotation`,`clearAnnotations`,`removeAnnotation`,`dataURI`,`exportToCSV`];function Uv(e){let t={};return Hv.forEach(n=>{typeof e[n]==`function`&&(t[n]=e[n].bind(e))}),Object.freeze(t)}function Wv(e,t){let n=t=>(t&&e.add(t),t),r={get node(){return e.node},path(e={}){let{d:r=``,stroke:i=`#000`,width:a=1,fill:o=`none`,opacity:s=1,dash:c=0,className:l=``}=e;return n(t.drawPath({d:r,stroke:i,strokeWidth:a,fill:o,fillOpacity:o===`none`?0:s,strokeOpacity:s,strokeDashArray:c,classes:l}))},line(e={}){let{x1:r,y1:i,x2:a,y2:o,stroke:s=`#000`,width:c=1,dash:l=0}=e;return n(t.drawLine(r,i,a,o,s,l,c))},rect(e={}){let{x:r=0,y:i=0,w:a=0,h:o=0,r:s=0,fill:c=`#000`,stroke:l=null,opacity:u=1}=e;return n(t.drawRect(r,i,a,o,s,c,u,l==null?null:1,l))},circle(e={}){let{cx:r=0,cy:i=0,r:a=0,fill:o=`#000`,stroke:s=null}=e;return n(t.drawCircle(a,{cx:r,cy:i,fill:o,stroke:s||`none`}))},text(e={}){let{x:r=0,y:i=0,text:a=``,color:o,size:s,anchor:c=`start`,weight:l}=e;return n(t.drawText({x:r,y:i,text:a,textAnchor:c,fontSize:s,foreColor:o,fontWeight:l}))},clear(){let t=e.node;for(;t.firstChild;)t.removeChild(t.firstChild);return r}};return r}function Gv(e,t){let n=e.ctx,r=e.w,i={name:t.def.name,version:Vv,get options(){return t.options},on(e,n){let r=t.handlers;return r.has(e)||r.set(e,[]),r.get(e).push(n),i},off(e,n){let r=t.handlers.get(e);if(r){let e=r.indexOf(n);e>-1&&r.splice(e,1)}return i},store:{},layer(n){return e._layer(t.def.name,n||{})},get scales(){return e._currentScales},get data(){return e._lastData||=e._dataSnapshot()},theme:Object.freeze({get mode(){return r.config.theme.mode},get foreColor(){return r.config.chart.foreColor},seriesColor(e){return r.globals.colors[e]},token(t){return e._token(t)}}),chart:Uv(n),get info(){return Object.freeze({type:String(r.config.chart&&(r.config.chart.requestedType||r.config.chart.type)||`line`),axisChart:r.globals.axisCharts===!0,datetimeX:!!(r.config.xaxis&&r.config.xaxis.type===`datetime`),horizontalBars:!!(r.config.plotOptions&&r.config.plotOptions.bar&&r.config.plotOptions.bar.horizontal),dataLabels:Object.freeze({enabled:!!(r.config.dataLabels&&r.config.dataLabels.enabled),enabledOnSeries:Array.isArray(r.config.dataLabels&&r.config.dataLabels.enabledOnSeries)?r.config.dataLabels.enabledOnSeries.slice():null})})},get categories(){return e._categories()},markDerived(n){return e._markDerived(t.def.name,n),i},reserve(n){return e._reserve(t.def.name,n),i},pointer(n){return e._onPointer(t.def.name,n)},emit(e,r){n.events.fireEvent(`plugin:${t.def.name}:${e}`,[n,r])},get el(){return r.dom.baseEl}};return Object.freeze(i)}var Kv=class e{constructor(e,t){this.w=e,this.ctx=t,this.active=[],this._layers=new Map,this._currentScales=null,this._lastPluginsRef=null,this._lastData=null,this._updatedWired=!1,this._derived=null,this._reserved=null,this._reserveTimer=null,this._pointerSubs=null,this._pointerWired=null,this._onUpdated=this._onUpdated.bind(this),this._init()}_init(){(this.w.config.plugins||[]).map((e,t)=>({entry:e,order:e.order==null?t:e.order})).sort((e,t)=>e.order-t.order).forEach(e=>this._activate(e.entry)),this._lastPluginsRef=this.w.config.plugins,this._wireUpdated()}_wireUpdated(){this._updatedWired||=(this.ctx.addEventListener(`updated`,this._onUpdated),!0)}_onUpdated(){this._repairInitialSeries(),this.dispatch(`afterUpdate`,{pass:`update`})}_activate(e){let t=Bv(e.name);if(!t){console.error(`[apexcharts] plugin "${e.name}" is not registered.`);return}let n=t.apiVersion==null?1:Math.trunc(t.apiVersion);if(!(n>=1)||n>Vv){console.error(`[apexcharts] plugin "${t.name}" targets Weave API v${t.apiVersion}, host is v${Vv}; skipped.`);return}let r={def:t,options:Object.freeze(Y({},e.options||{})),handlers:new Map,disabled:!1,failures:0,api:null};r.api=Gv(this,r),this.active.push(r),this._guard(r,`setup`,()=>t.setup(r.api))}dispatch(e,t){if(e===`draw`&&(this._reconcile(),this._resetLayers()),this._lastData=null,!this.active.length)return;e===`afterParse`?this._currentScales=null:t&&`xyRatios`in t&&this._setScales(t.xyRatios);let n=t&&t.pass||`full`,r=null;for(let t of this.active){if(t.disabled)continue;let i=t.handlers.get(e);if(!i||!i.length)continue;r===null&&(r=this._dataSnapshot(),this._lastData=r);let a={api:t.api,scales:this._currentScales,data:r,pass:n,hook:e};for(let n of i.slice())this._guard(t,e,()=>n(a))}}_guard(e,t,n){if(!e.disabled)try{n()}catch(n){console.error(`[apexcharts] plugin "${e.def.name}" threw in "${t}":`,n),e.failures=(e.failures||0)+1,e.failures>=3&&(e.disabled=!0,console.error(`[apexcharts] plugin "${e.def.name}" disabled after repeated errors.`))}}_setScales(e){let t=this.w,n=t.globals,r=t.layout;if(!e||!n.axisCharts){this._currentScales=null;return}let i=e.xRatio,a=e.yRatio||[],o=e=>a[e]==null?a[0]:a[e],s=e=>n.maxYArr[e]==null?n.maxY:n.maxYArr[e],c=e=>n.minYArr[e]==null?n.minY:n.minYArr[e],l=!t.axisFlags.isXNumeric&&!n.isBarHorizontal&&n.dataPoints>0,u=l?r.gridWidth/n.dataPoints:0;this._currentScales={x:l?e=>u*(e+.5):e=>(e-n.minX)/i,y:(e,t=0)=>(s(t)-e)/o(t),domainX:l?[-.5,n.dataPoints-.5]:[n.minX,n.maxX],domainY:(e=0)=>[c(e),s(e)],gridWidth:r.gridWidth,gridHeight:r.gridHeight,ratios:e}}_dataSnapshot(){let e=this.w,t=e.globals,n=e.seriesData.series||[],r=e.seriesData.seriesX||[],i=Array.isArray(e.config.series)?e.config.series:[];return n.map((e,n)=>{let a=Array.isArray(e)?e:[e],o=r[n]||[],s=a.map((e,t)=>({x:o[t]==null?t:o[t],y:e})),c=i[n],l=c&&typeof c==`object`&&Array.isArray(c.data)?c.data:[];return{name:t.seriesNames?t.seriesNames[n]:void 0,hidden:(t.collapsedSeriesIndices||[]).includes(n),color:t.colors?t.colors[n]:void 0,points:s,raw:l}})}_categories(){let e=this.w,t=e.globals,n=e.config.xaxis&&Array.isArray(e.config.xaxis.categories)?e.config.xaxis.categories:[],r=Array.isArray(t.categoryLabels)?t.categoryLabels:[],i=Array.isArray(t.labels)?t.labels:[],a=n.length?n:r.length?r:i,o=e.seriesData.series||[],s=0;for(let e=0;e<o.length;e++){let t=o[e];Array.isArray(t)&&t.length>s&&(s=t.length)}s||=a.length;let c=[];for(let e=0;e<s;e++){let t=a[e];c.push(t==null?String(e+1):String(t))}return c}_markDerived(e,t){this._derived||=new Map;let n=Array.isArray(t)?t.map(e=>String(e)):[];n.length?this._derived.set(e,n):this._derived.delete(e),this._repairInitialSeries()}_onPointer(e,t){if(typeof t!=`function`)return()=>{};this._pointerSubs||=new Map;let n=this._pointerSubs.get(e)||[];return n.push(t),this._pointerSubs.set(e,n),this._wirePointer(),()=>{let n=this._pointerSubs&&this._pointerSubs.get(e);if(!n)return;let r=n.indexOf(t);r>-1&&n.splice(r,1)}}_wirePointer(){if(this._pointerWired||!this.ctx||typeof this.ctx.addEventListener!=`function`)return;let e=[[`enter`,`dataPointMouseEnter`],[`leave`,`dataPointMouseLeave`],[`select`,`dataPointSelection`]];this._pointerWired=[];for(let[t,n]of e){let e=(e,n,r)=>{this._emitPointer(t,r)};this.ctx.addEventListener(n,e),this._pointerWired.push([n,e])}}_emitPointer(t,n){if(!this._pointerSubs||!this._pointerSubs.size)return;let r=n&&typeof n.seriesIndex==`number`?n.seriesIndex:-1,i=n&&typeof n.dataPointIndex==`number`?n.dataPointIndex:-1,a=this._categories()||[],o=this.w,s=o&&o.config&&o.config.series||[],c={type:t,seriesIndex:r,dataPointIndex:i,category:i>-1?a[i]:void 0,seriesName:e._seriesName(s,r),selected:t===`select`?e._isSelected(n,r,i):void 0};for(let[e,t]of this._pointerSubs)for(let n of t.slice())try{n(c)}catch(t){console.warn(`[apexcharts] plugin "`+e+`" threw in a pointer handler`,t)}}static _seriesName(e,t){if(t<0)return;let n=e[t];if(!(!n||typeof n!=`object`))return typeof n.name==`string`?n.name:void 0}static _isSelected(e,t,n){let r=e&&e.selectedDataPoints;if(!Array.isArray(r)||t<0)return;let i=r[t];return Array.isArray(i)?i.indexOf(n)>-1:!1}_reserve(t,n){let r=e._normaliseBox(n),i=this._reserved?this._reserved.get(t):void 0;if(r){if(i&&i.left===r.left&&i.right===r.right&&i.top===r.top&&i.bottom===r.bottom)return;this._reserved||=new Map,this._reserved.set(t,r)}else{if(!i||!this._reserved)return;this._reserved.delete(t)}this._resizeForReservation()}static _normaliseBox(e){if(!e||typeof e!=`object`)return null;let t=e=>Number.isFinite(e)&&e>0?Math.round(e):0,n={left:t(e.left),right:t(e.right),top:t(e.top),bottom:t(e.bottom)};return n.left||n.right||n.top||n.bottom?n:null}reservedBox(){if(!this._reserved||this._reserved.size===0)return e.NO_RESERVATION;let t={left:0,right:0,top:0,bottom:0};for(let e of this._reserved.values())t.left+=e.left,t.right+=e.right,t.top+=e.top,t.bottom+=e.bottom;return t}_resizeForReservation(){this._reserveTimer??=setTimeout(()=>{this._reserveTimer=null;let e=this.w.globals;if(!e.isDestroyed){e.resized=!0,e.dataChanged=!1;try{this.ctx.update()}catch{}}},0)}_derivedNames(){let e=new Set;if(!this._derived)return e;for(let t of this._derived.values())for(let n of t)e.add(n);return e}_repairInitialSeries(){let e=this._derivedNames();if(!e.size)return;let t=this.w,n=(Array.isArray(t.config.series)?t.config.series:[]).filter(t=>!e.has(String(t&&t.name)));if(n.length)try{t.globals.initialSeries=n,t.globals.initialConfig&&Array.isArray(t.globals.initialConfig.series)&&(t.globals.initialConfig.series=n)}catch{}}_token(e){let t=this.w,n=t.globals;switch(e){case`foreColor`:return t.config.chart.foreColor;case`background`:return t.config.chart.background;case`accent`:case`primary`:return n.colors?n.colors[0]:void 0;default:return/^series-\d+$/.test(e)&&n.colors?n.colors[Number(e.split(`-`)[1])]:void 0}}_layer(e,{z:t=`front`,className:n=``}={}){let r=this._layers.get(e);if(!r){r=this.ctx.graphics.group({class:`apexcharts-plugin-${e} ${n}`.trim()});let i=this.w.dom.elGraphical.node;t===`behind`?i.insertBefore(r.node,i.firstChild):i.appendChild(r.node),r.node.setAttribute(`aria-hidden`,`true`),this._layers.set(e,r)}return Wv(r,this.ctx.graphics)}_resetLayers(){let e=this.w.dom.elGraphical,t=e&&e.node;if(t){let e=t.querySelectorAll(`g[class*="apexcharts-plugin-"]`);Array.prototype.forEach.call(e,e=>e.remove())}this._layers.clear()}_reconcile(){let e=this.w.config.plugins||[];if(e===this._lastPluginsRef)return;this._lastPluginsRef=e;let t=new Map(e.map((e,t)=>[e.name,{entry:e,order:e.order==null?t:e.order}]));for(let e=this.active.length-1;e>=0;e--){let n=this.active[e],r=t.get(n.def.name);r?n.options=Object.freeze(Y({},r.entry.options||{})):(this._guard(n,`destroy`,()=>n.def.destroy&&n.def.destroy(n.api)),this.active.splice(e,1),this._reserve(n.def.name,null))}let n=new Set(this.active.map(e=>e.def.name)),r=[];t.forEach((e,t)=>{n.has(t)||r.push(e)}),r.sort((e,t)=>e.order-t.order).forEach(e=>this._activate(e.entry))}teardown(e){if(!e){this.dispatch(`destroy`);for(let e of this.active)this._guard(e,`destroy`,()=>e.def.destroy&&e.def.destroy(e.api));if(this.active=[],this._derived=null,this._reserved=null,this._pointerSubs=null,this._pointerWired){for(let[e,t]of this._pointerWired)this.ctx.removeEventListener&&this.ctx.removeEventListener(e,t);this._pointerWired=null}this._reserveTimer!=null&&(clearTimeout(this._reserveTimer),this._reserveTimer=null),this._updatedWired&&=(this.ctx.removeEventListener&&this.ctx.removeEventListener(`updated`,this._onUpdated),!1)}this._layers.clear()}};Lh(Kv,`NO_RESERVATION`,Object.freeze({left:0,right:0,top:0,bottom:0}));var qv=Kv;kh.registerFeatures({weave:qv});function Jv(e,t){let n=e&&e.renderer;return n&&n.kind&&n.kind!==`svg`?n:t}function Yv(e,t){let n=class{constructor(e,t,n){this.w=e,this.ctx=t,this.xyRatios=n,this._warned=!1}draw(n,r,i){var a,o;let s=this.w,c=new Z(s,this.ctx),l=Jv(this.ctx,c),u=c.group({class:`apexcharts-marks-series`});return n.forEach((n,r)=>{let a=Array.isArray(i)?i[r]:r,o=c.group({class:`apexcharts-series`,rel:a+1,seriesName:$.escapeString(s.seriesData.seriesNames[a]),"data:realIndex":a}),d=this._scales(a,(s.seriesData.series[a]||[]).length),f=s.globals.colors[a],p=s.config.series[a]?.data||[],m=s.seriesData.seriesX[a]||[],h=s.seriesData.series[a]||[];s.globals.seriesXvalues[a]=[],s.globals.seriesYvalues[a]=[],s.globals.pointsArray[a]===void 0&&(s.globals.pointsArray[a]=[]);for(let n=0;n<h.length;n++){let r=h[n];if(r==null)continue;let i=m[n],c=d.xAt(n,i),u=d.y(r),g=this._api(l,o,a,n);try{t.renderItem({datum:p[n],x:c,y:u,scales:d,api:g,seriesIndex:a,dataPointIndex:n,color:f})}catch(t){this._warned||=(console.warn(`[apexcharts] renderItem for series type "${e}" threw; skipping datum:`,t),!0)}s.globals.seriesXvalues[a][n]=c,s.globals.seriesYvalues[a][n]=u,s.globals.pointsArray[a][n]=[c,u]}c.setupEventDelegation(o,`.apexcharts-marks-mark`),u.add(o)}),(o=(a=this.ctx.animations)?.animationCompleted)==null||o.call(a,u),u}_scales(e,t){let n=this.w.globals,r=this.w.config,i=this.xyRatios.xRatio,a=this.xyRatios.yRatio,o=n.seriesYAxisReverseMap?.[e]??0,s=Array.isArray(a)?a[o]??a[0]:a,c=n.maxYArr,l=Array.isArray(c)&&c.length?c[o]??n.maxY:n.maxY,u=n.gridWidth,d=n.gridHeight,f=!n.isXNumeric,p=t||n.dataPoints||1,m=p>0?u/p:u,h=r.xaxis.tickPlacement===`on`,g=e=>i?(e-n.minX)/i:u/2,_=e=>(l-e)/s,v=(e,t)=>f?h&&p>1?e/(p-1)*u:(e+.5)*m:g(t),y=n.minXDiff||1;return{x:g,xAt:v,y:_,gridWidth:u,gridHeight:d,band:f?m:i?y/i:u}}_api(e,t,n,r){let i=e=>{if(e){try{e.node.setAttribute(`index`,String(n)),e.node.setAttribute(`j`,String(r)),e.node.classList.add(`apexcharts-marks-mark`)}catch{}t.add(e)}return e};return{path:(t={})=>i(e.drawPath({d:t.d||``,stroke:t.stroke??`#000`,strokeWidth:t.width??t.strokeWidth??1,fill:t.fill??`none`,fillOpacity:t.fillOpacity??(t.fill&&t.fill!==`none`?t.opacity??1:0),strokeOpacity:t.strokeOpacity??t.opacity??1,strokeDashArray:t.dash??0,strokeLinecap:t.lineCap})),line:(t={})=>i(e.drawLine(t.x1,t.y1,t.x2,t.y2,t.stroke??`#000`,t.dash??0,t.width??t.strokeWidth??1)),rect:(t={})=>i(e.drawRect(t.x??0,t.y??0,t.w??0,t.h??0,t.r??0,t.fill??`#000`,t.opacity??1,t.stroke==null?null:t.strokeWidth??1,t.stroke)),circle:(t={})=>i(e.drawCircle(t.r??0,{cx:t.cx??0,cy:t.cy??0,fill:t.fill??`#000`,stroke:t.stroke||`none`,"stroke-width":t.strokeWidth??(t.stroke?1:0)})),text:(t={})=>i(e.drawText({x:t.x??0,y:t.y??0,text:t.text??``,textAnchor:t.anchor??`start`,fontSize:t.size,foreColor:t.color,fontWeight:t.weight}))}}};return n.dataType=t.dataType||`xy`,n.yExtent=typeof t.yExtent==`function`?t.yExtent:null,n}kh._customSeriesFactory=Yv;var Xv=`(prefers-color-scheme: dark)`,Zv=`(prefers-contrast: more)`,Qv=class e{constructor(e,t){if(this.w=e,this.ctx=t,e.config.theme.follow!==`os`||!d_.isBrowser())return;let n=this._ensureMedia();n&&(this._applyToConfig(n),this._ensureListeners(n))}_ensureMedia(){if(!this.ctx._osThemeMedia){let e=Q.matchMedia(Xv),t=Q.matchMedia(Zv);if(!e&&!t)return null;this.ctx._osThemeMedia={dark:e,contrast:t,handler:null}}return this.ctx._osThemeMedia}_applyToConfig(e){let t=this.w.config.theme;e.dark&&(t.mode=e.dark.matches?`dark`:`light`),e.contrast&&e.contrast.matches&&(t.accessibility=t.accessibility||{},t.accessibility.colorBlindMode=`highContrast`)}_ensureListeners(t){if(t.handler)return;let n=this.ctx,r=()=>{let e=n._osThemeMedia;if(!e)return;let t={mode:e.dark&&e.dark.matches?`dark`:`light`};e.contrast&&e.contrast.matches?t.accessibility={colorBlindMode:`highContrast`}:t.accessibility={colorBlindMode:``},n.updateOptions({theme:t},!1,!0,!1)};e._add(t.dark,r),e._add(t.contrast,r),t.handler=r}teardown(){let t=this.ctx._osThemeMedia;t&&(t.handler&&(e._remove(t.dark,t.handler),e._remove(t.contrast,t.handler)),this.ctx._osThemeMedia=null)}static _add(e,t){e&&(typeof e.addEventListener==`function`?e.addEventListener(`change`,t):typeof e.addListener==`function`&&e.addListener(t))}static _remove(e,t){e&&(typeof e.removeEventListener==`function`?e.removeEventListener(`change`,t):typeof e.removeListener==`function`&&e.removeListener(t))}};kh.registerFeatures({osThemeWatcher:Qv});var $v=`__apexcharts_series_transforms__`;globalThis[$v]||(globalThis[$v]={});function ey(){return globalThis[$v]}function ty(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerSeriesTransform requires a non-empty name.`);return}if(typeof t!=`function`){console.warn(`ApexCharts: registerSeriesTransform("${e}") expects a function (series, w) => series.`);return}ey()[e]=t}var ny=`__apexcharts_row_sources__`;globalThis[ny]||(globalThis[ny]={});function ry(){return globalThis[ny]}function iy(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerRowSource requires a non-empty name.`);return}if(typeof t!=`function`){console.warn(`ApexCharts: registerRowSource("${e}") expects a function (w, opts) => series.`);return}ry()[e]=t}var ay=1e3;function oy(e,t){let n=e.length;if(n===0)return NaN;if(n===1)return e[0];let r=(n-1)*t,i=Math.floor(r),a=Math.ceil(r);return i===a?e[i]:e[i]+(e[a]-e[i])*(r-i)}function sy(e){let t=e.length;if(t<2)return 0;let n=0;for(let r=0;r<t;r++)n+=e[r];let r=n/t,i=0;for(let n=0;n<t;n++){let t=e[n]-r;i+=t*t}return Math.sqrt(i/t)}function cy(e,t,n){let r=e.length,i=e=>t/Math.max(1,Math.ceil(e));switch(n){case`sqrt`:return{width:i(Math.sqrt(r)),rule:`sqrt`};case`rice`:return{width:i(2*Math.cbrt(r)),rule:`rice`};case`scott`:{let t=sy(e);return t>0?{width:3.49*t*r**(-1/3),rule:`scott`}:{width:i(Math.log2(r)+1),rule:`sturges`}}case`fd`:{let t=oy(e,.75)-oy(e,.25);return t>0?{width:2*t*r**(-1/3),rule:`fd`}:{width:i(Math.log2(r)+1),rule:`sturges`}}case`auto`:{let t=i(Math.log2(r)+1),n=oy(e,.75)-oy(e,.25);if(n<=0)return{width:t,rule:`sturges`};let a=2*n*r**(-1/3);return a<t?{width:a,rule:`fd`}:{width:t,rule:`sturges`}}case`sturges`:default:return{width:i(Math.log2(r)+1),rule:`sturges`}}}function ly(e,t={}){if(!Array.isArray(e)||e.length===0)return null;let n=e.slice().sort((e,t)=>e-t),r=n[0],i=n[n.length-1],a=t.range;if(Array.isArray(a)&&a.length===2){let e=Number(a[0]),t=Number(a[1]);isFinite(e)&&isFinite(t)&&t>e&&(r=e,i=t)}if(!(i>r)){let e=Math.abs(r)>0?Math.abs(r)*.05:.5;return{edges:[r-e,r+e],binWidth:e*2,rule:`single`,capped:!1}}let o=i-r,s,c;if(typeof t.binWidth==`number`&&t.binWidth>0)s=t.binWidth,c=`binWidth`;else if(typeof t.bins==`number`&&t.bins>=1)s=o/Math.floor(t.bins),c=`count`;else{let e=cy(n,o,typeof t.bins==`string`?t.bins:`auto`);s=e.width,c=e.rule}(!isFinite(s)||s<=0)&&(s=o);let l=Math.ceil(o/s);(!isFinite(l)||l<1)&&(l=1);let u=!1;l>ay&&(l=ay,s=o/l,u=!0),s=o/l;let d=Array(l+1);for(let e=0;e<=l;e++)d[e]=r+e*s;return d[l]=Math.max(d[l],i),{edges:d,binWidth:s,rule:c,capped:u}}function uy(e,t){let n=t.length-1;if(!(e>=t[0])||e>t[n])return-1;if(e===t[n])return n-1;let r=(t[n]-t[0])/n;if(r>0){let i=Math.floor((e-t[0])/r);return i<0&&(i=0),i>n-1&&(i=n-1),e<t[i]?i--:e>=t[i+1]&&i++,i<0||i>n-1?-1:i}let i=0,a=n-1;for(;i<=a;){let n=i+a>>1;if(e<t[n])a=n-1;else if(e>=t[n+1])i=n+1;else return n}return-1}function dy(e,t){let n=Array(Math.max(0,t.length-1)).fill(0);for(let r=0;r<e.length;r++){let i=uy(e[r],t);i>=0&&n[i]++}return n}function fy(e,t){let n=Math.max(0,t.length-1),r=Array(n);for(let e=0;e<n;e++)r[e]=[];for(let n=0;n<e.length;n++){let i=uy(e[n],t);i>=0&&r[i].push(e[n])}return r}function py(e,t={}){if(!Array.isArray(e)||e.length===0)return null;let n=e.slice().sort((e,t)=>e-t),r=oy(n,.25),i=oy(n,.5),a=oy(n,.75),o=a-r,s=n[0],c=n[n.length-1],l=[];if(t.whiskers===`tukey`&&o>0){let e=r-1.5*o,t=a+1.5*o,i=0;for(;i<n.length&&n[i]<e;)i++;let u=n.length-1;for(;u>=0&&n[u]>t;)u--;i<=u&&(s=n[i],c=n[u],l=n.slice(0,i).concat(n.slice(u+1)))}return{summary:[s,r,i,a,c],outliers:l,iqr:o}}function my(e,t={}){if(!Array.isArray(e)||e.length===0)return null;let n=e.slice().sort((e,t)=>e-t),r=n.length,i=t.bandwidth;if(!(typeof i==`number`&&i>0)){let e=sy(n),t=oy(n,.75)-oy(n,.25);i=.9*(t>0?Math.min(e,t/1.349):e)*r**(-1/5)}if(!isFinite(i)||i<=0){let e=n[0],t=Math.abs(e)>0?Math.abs(e)*.001:.001;return{density:[[e-t,0],[e,1],[e+t,0]],bandwidth:t}}let a=Math.max(8,Math.floor(t.resolution||64)),o=n[0]-2*i,s=(n[r-1]+2*i-o)/(a-1),c=1/(r*i*Math.sqrt(2*Math.PI)),l=[];for(let e=0;e<a;e++){let t=o+e*s,a=0;for(let e=0;e<r;e++){let r=(t-n[e])/i;a+=Math.exp(-.5*r*r)}l.push([t,a*c])}return{density:l,bandwidth:i}}function hy(e,t={}){let n=e.slice();if(t.cumulative){let e=0;n=n.map(t=>e+=t)}let r=e.reduce((e,t)=>e+t,0);if(r<=0)return n;if(t.normalize===`relative`)return n.map(e=>e/r*100);if(t.normalize===`density`){let e=t.binWidth;if(typeof e==`number`&&e>0)return n.map(t=>t/(r*e))}return n}function gy(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return null;let n=null;if(Array.isArray(e.points)?n=e.points:Array.isArray(e.y?.points)?n=e.y.points:t&&Array.isArray(e.y)&&typeof e.y[0]==`number`&&(n=e.y),!n)return null;let r=[];for(let e=0;e<n.length;e++){let t=$.parseNumber(n[e]);t!==null&&isFinite(t)&&r.push(t)}return r.length?r:null}function _y(e){let t=[];if(!Array.isArray(e))return t;for(let n=0;n<e.length;n++){let r=e[n],i=r;Array.isArray(r)?i=r.length===1?r[0]:r[1]:r&&typeof r==`object`&&(i=r.y===void 0?r.x:r.y);let a=$.parseNumber(i);a!==null&&isFinite(a)&&t.push(a)}return t}function vy(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.histogramRawSeries||=e.map(e=>X(Y({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.histogramRawSeries,a=n.plotOptions?.histogram||{},o=i.map(e=>_y(e?.data)),s=[];if(o.length===1)s=o[0];else for(let e of o)s=s.concat(e);let c=ly(s,{bins:a.bins,binWidth:a.binWidth,range:a.range});if(!c)return t.histogramData={edges:[],binWidth:0,counts:[],rule:``,capped:!1},i;let{edges:l,binWidth:u}=c,d=o.map(e=>dy(e,l));t.histogramData={edges:l,binWidth:u,counts:d,rule:c.rule,capped:c.capped};let f=r.collapsedSeriesIndices||[];return i.map((e,t)=>{if(f.indexOf(t)!==-1)return X(Y({},e),{data:[]});let n=hy(d[t],{normalize:a.normalize,cumulative:a.cumulative,binWidth:u}),r=[];for(let e=0;e<n.length;e++)r.push({x:(l[e]+l[e+1])/2,y:n[e]});return X(Y({},e),{data:r})})}var yy=new WeakSet;function by(e,t){if(!Array.isArray(e))return e;let n=t.config.plotOptions?.boxPlot?.whiskers||`minmax`;return e.map(e=>{if(!Array.isArray(e?.data))return e;let t=!1,r=e.data.map(e=>{if(Array.isArray(e?.y)&&e.y.length===5&&!yy.has(e))return e;let r=gy(e,!1);if(!r)return e;let i=py(r,{whiskers:n});if(!i)return e;t=!0;let a=X(Y({},e),{y:i.summary,points:r});return yy.add(a),a});return t?X(Y({},e),{data:r}):e})}function xy(e,t){if(!Array.isArray(e))return e;let n=t.config.plotOptions?.violin?.kde||{};return e.map(e=>{if(!Array.isArray(e?.data))return e;let t=!1,r=e.data.map(e=>{if(Array.isArray(e?.y?.density)&&e.y.density.length&&!yy.has(e))return e;let r=gy(e,!0);if(!r)return e;let i=my(r,{bandwidth:n.bandwidth,resolution:n.resolution});if(!i)return e;t=!0;let a=X(Y({},e),{y:{density:i.density,points:r}});return yy.add(a),a});return t?X(Y({},e),{data:r}):e})}var Sy=3e3;function Cy(e,t){let n=0,r=0;for(let t of e)n+=t.length,t.length>r&&(r=t.length);if(n<=t)return{clusters:e,stride:1,total:n,kept:n};let i=t=>{let n=0;for(let r of e)n+=Math.ceil(r.length/t);return n},a=Math.max(2,Math.ceil(n/t));for(;a<r&&i(a)>t;)a++;let o=0;return{clusters:e.map(e=>{let t=[];for(let n=0;n<e.length;n+=a)t.push(e[n]);return o+=t.length,t}),stride:a,total:n,kept:o}}function wy(e,t,n){let r=n&&n.maxRows!=null?n.maxRows:Sy,i=Cy(t.map(e=>e.rows),r);i.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${i.total} rows to ${i.kept} (every ${i.stride}${i.stride===2?`nd`:i.stride===3?`rd`:`th`} row) to stay under maxRows=${r}. Raise maxRows to draw more.`);let a=e.globals&&e.globals.colors||[];return t.map((e,t)=>{let n=a[e.realIndex]||a[0];return{name:e.name,data:i.clusters[t].map((r,i)=>Y({id:`${e.realIndex}:${t}:${i}`,x:e.name,y:r},n?{fillColor:n}:{}))}})}function Ty(e,t){let n=e.globals,r=e.histogramData,i=n&&n.histogramRawSeries;if(!r||!Array.isArray(r.edges)||r.edges.length<2||!Array.isArray(i)||!i.length)return null;let a=n&&n.collapsedSeriesIndices||[],o=r.edges,s=[];return i.forEach((t,n)=>{if(a.indexOf(n)!==-1)return;let r=fy(_y(t&&t.data),o),c=e.seriesData&&e.seriesData.seriesNames?.[n]||t?.name;r.forEach((e,t)=>{let r=`${Ey(o[t])}-${Ey(o[t+1])}`;s.push({name:i.length>1&&c?`${c} ${r}`:r,realIndex:n,rows:e})})}),s.length?wy(e,s,t):null}function Ey(e){if(!isFinite(e))return String(e);let t=Math.round(e);return Math.abs(e-t)<1e-6?String(t):String(Number(e.toFixed(2)))}function Dy(e){return(t,n)=>{let r=e(t);if(!Array.isArray(r)||!r.length)return null;let i=t.globals&&t.globals.collapsedSeriesIndices||[],a=t.globals&&(t.globals.categoryLabels?.length?t.globals.categoryLabels:t.globals.labels)||[],o=[];return r.forEach((e,n)=>{if(i.indexOf(n)!==-1||!Array.isArray(e))return;let s=t.seriesData&&t.seriesData.seriesNames?.[n];e.forEach((e,t)=>{let i=a[t]==null?`#${t+1}`:String(a[t]);o.push({name:r.length>1&&s?`${s} ${i}`:i,realIndex:n,rows:Array.isArray(e)?e.slice():[]})})}),o.length?wy(t,o,n):null}}var Oy=Dy(e=>e.candleData?.seriesBoxPoints),ky=Dy(e=>e.violinData?.seriesViolinPoints);ty(`histogram`,vy),ty(`boxPlot`,by),ty(`violin`,xy),iy(`histogram`,Ty),iy(`boxPlot`,Oy),iy(`violin`,ky);var Ay=class{constructor(e,t){this.w=e,this.ctx=t}isActive(){return this.w.config.chart.requestedType===`waterfall`}drawConnectors(){let e=this.w;if(!this.isActive())return;let t=e.config.plotOptions?.waterfall?.connectors;if(!t||t.show===!1)return;let n=e.dom.elGraphical,r=e.waterfallData&&e.waterfallData.geometry;if(!n||!r)return;this.removeConnectors();let i=new Z(e,this.ctx),a=i.group({class:`apexcharts-waterfall-connectors`}),o=t.color||e.config.grid.borderColor,s=t.strokeWidth==null?1:t.strokeWidth,c=t.strokeDashArray==null?3:t.strokeDashArray,l=0;for(let e=0;e<r.length;e++){let t=r[e];if(Array.isArray(t))for(let e=0;e<t.length-1;e++){let n=t[e],r=t[e+1];if(!n||!r||!(r.slotStart-n.slotEnd>.5))continue;let u=n.horizontal?i.drawLine(n.levelEnd,n.slotEnd,n.levelEnd,r.slotStart,o,c,s):i.drawLine(n.slotEnd,n.levelEnd,r.slotStart,n.levelEnd,o,c,s);u.node.classList.add(`apexcharts-waterfall-connector`),a.add(u),l++}}if(!l)return;a.attr(`clip-path`,`url(#gridRectBarMask${e.globals.cuid})`);let u=n.node.querySelector(`.apexcharts-xaxis`);u?n.node.insertBefore(a.node,u):n.add(a),this.holdUntilBarsLand(a)}removeConnectors(){let e=this.w.dom.elGraphical,t=e&&e.node.querySelector(`.apexcharts-waterfall-connectors`);t&&t.parentNode&&t.parentNode.removeChild(t)}holdUntilBarsLand(e){let t=this.w;d_.isBrowser()&&t.globals.shouldAnimate&&!t.globals.animationEnded&&(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node,holdUntilComplete:!0}))}};function jy(e,t,n){let r=n&&n[t]!==void 0?n[t]:t+1;return e==null?{x:r,y:null,isSubtotal:!1,isTotal:!1,rest:{}}:Array.isArray(e)?{x:e[0]===void 0?r:e[0],y:e[1],isSubtotal:!1,isTotal:!1,rest:{}}:typeof e==`object`?{x:e.x===void 0?r:e.x,y:e.y,isSubtotal:e.isSubtotal===!0,isTotal:e.isTotal===!0,rest:e}:{x:r,y:e,isSubtotal:!1,isTotal:!1,rest:{}}}function My(e){for(let t=0;t<e.length;t++){let n=e[t],r=Array.isArray(n)?n[1]:n&&typeof n==`object`?n.y:n;if(Array.isArray(r)&&r.length===2)return!0}return!1}function Ny(e,t,n){if(e&&e.fillColor)return e.fillColor;let r=n[t];return typeof r==`string`&&r?r:void 0}function Py(e,t,n){let r=[],i=[],a=[],o=[],s=0,c=0;for(let l=0;l<e.length;l++){let{x:u,y:d,isSubtotal:f,isTotal:p,rest:m}=jy(e[l],l,t),h,g,_;if(p||f)h=p?0:c,g=s,_=p?`total`:`subtotal`,c=s;else{let e=$.parseNumber(d);if(e===null||!isFinite(e)){r.push(X(Y({},m),{x:u,y:null})),i.push(null),a.push(s),o.push(null);continue}h=s,g=s+e,s=g,_=e<0?`negative`:`positive`}let v=Ny(m,_,n);r.push(Y(X(Y({},m),{x:u,y:[h,g]}),v?{fillColor:v}:{})),i.push(g-h),a.push(s),o.push(_)}return{data:r,values:i,cumulative:a,kinds:o}}function Fy(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.waterfallRawSeries||=e.map(e=>X(Y({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.waterfallRawSeries,a=n.plotOptions?.waterfall?.colors||{},o=n.xaxis?.categories,s=r.collapsedSeriesIndices||[],c=[],l=[],u=[],d=i.map((e,t)=>{let n=Array.isArray(e?.data)?e.data:[];if(s.indexOf(t)!==-1)return c[t]=[],l[t]=[],u[t]=[],X(Y({},e),{data:[]});if(My(n))return c[t]=n.map(e=>{let t=Array.isArray(e)?e[1]:e&&typeof e==`object`?e.y:e;if(!Array.isArray(t))return null;let n=$.parseNumber(t[0]),r=$.parseNumber(t[1]);return n===null||r===null?null:r-n}),l[t]=n.map(e=>{let t=Array.isArray(e)?e[1]:e&&typeof e==`object`?e.y:e,n=Array.isArray(t)?$.parseNumber(t[1]):null;return n===null?0:n}),u[t]=n.map(()=>null),e;let r=Py(n,o,a);return c[t]=r.values,l[t]=r.cumulative,u[t]=r.kinds,X(Y({},e),{data:r.data})});return t.waterfallData={values:c,cumulative:l,kinds:u,geometry:[]},d}ty(`waterfall`,Fy),kh.registerFeatures({waterfall:Ay});function Iy(e,t,n){let r=n&&n[t]!==void 0?n[t]:t+1;return e==null?{x:r,y:null,rest:{}}:Array.isArray(e)?{x:e[0]===void 0?r:e[0],y:e[1],rest:{}}:typeof e==`object`?{x:e.x===void 0?r:e.x,y:e.y,rest:e}:{x:r,y:e,rest:{}}}function Ly(e){for(let t=0;t<e.length;t++){let n=e[t],r=Array.isArray(n)?n[1]:n&&typeof n==`object`?n.y:n;if(Array.isArray(r)&&r.length===2)return!0}return!1}function Ry(e,t){let n=[],r=[],i=new Map,a=[];for(let o=0;o<e.length;o++){let s=Array.isArray(e[o]?.data)?e[o].data:[],c=new Map;for(let e=0;e<s.length;e++){let{x:a,y:o,rest:l}=Iy(s[e],e,t),u=a instanceof Date?a.getTime():a;i.has(u)||(i.set(u,n.length),n.push(a),r.push(Y({},l)));let d=i.get(u);c.set(d,$.parseNumber(o))}a.push(c)}return{xs:n,rows:r,byX:a}}function zy(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.dumbbellRawSeries||=e.map(e=>X(Y({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.dumbbellRawSeries;if(i.some(e=>Ly(Array.isArray(e?.data)?e.data:[])))return t.dumbbellData={form:`pairs`,names:[],values:[],order:[],carrier:0,hidden:[]},e;let a=n.xaxis?.categories,o=r.collapsedSeriesIndices||[],{xs:s,rows:c,byX:l}=Ry(i,a),u=[],d=[],f=[];for(let e=0;e<i.length;e++)o.indexOf(e)===-1&&f.push(e);let p=[];for(let e=0;e<s.length;e++){let t=[];for(let n=0;n<i.length;n++){let r=l[n].has(e)?l[n].get(e):null;t.push(r==null||!isFinite(r)?null:r)}u.push(t);let n=null,r=null,a=-1,o=-1;for(let e=0;e<f.length;e++){let i=f[e],s=t[i];s!==null&&((n===null||s<n)&&(n=s,a=i),(r===null||s>r)&&(r=s,o=i))}if(n===null||r===null){d.push(null),p.push(X(Y({},c[e]),{x:s[e],y:null}));continue}d.push([a,o]),p.push(X(Y({},c[e]),{x:s[e],y:[n,r]}))}t.dumbbellData={form:`series`,names:i.map((e,t)=>e?.name??`Series ${t+1}`),values:u,order:d,carrier:f.length?f[0]:0,hidden:i.map((e,t)=>t).filter(e=>o.indexOf(e)!==-1)};let m=t.dumbbellData.carrier;return i.map((e,t)=>X(Y({},e),{data:t===m&&f.length?p:[]}))}ty(`dumbbell`,zy);var By=3,Vy=class{constructor(e,t){this.w=e,this.ctx=t,this._hovered=-1}isActive(){return this.w.config.chart.requestedType===`streamgraph`}_yPx(e){let t=this.w,n=t.globals,r=t.layout.gridHeight,i=n.maxY-n.minY;if(!i||!isFinite(i))return r/2;let a=(e-n.minY)/i;return t.config.yaxis[0]?.reversed?a*r:r-a*r}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){let e=this.w;if(!this.isActive())return;let t=e.config.plotOptions?.streamgraph?.labels;if(!t||t.show===!1)return;let n=e.dom.elGraphical,r=e.streamgraphData;if(!n||!r)return;this.removeLabels();let i=new Z(e,this.ctx),a=i.group({class:`apexcharts-streamgraph-labels`}),o=t.style?.fontSize||`auto`,s=t.style?.fontFamily||e.config.chart.fontFamily,c=t.style?.fontWeight||600,l=t.minWidth==null?24:t.minWidth,u=[];for(let e=0;e<r.order.length;e++){let t=r.order[e],n=this._placeLabel(t,{fontSize:o,fontFamily:s,fontWeight:c,minWidth:l,graphics:i});n&&u.push(n)}let d=0;for(let e of this._deconflict(u)){let n=e.k,r=i.drawText({x:e.x,y:e.y,text:e.text,textAnchor:`middle`,dominantBaseline:`middle`,fontSize:e.fontSize,fontFamily:s,fontWeight:c,foreColor:t.style?.colors?.[n]||e.color,cssClass:`apexcharts-streamgraph-label`});r.node.setAttribute(`data:realIndex`,String(n)),a.add(r),d++}if(!d)return;let f=n.node.querySelector(`.apexcharts-xaxis`);f?n.node.insertBefore(a.node,f):n.add(a),this.holdUntilBandsLand(a)}_placeLabel(e,{fontSize:t,fontFamily:n,fontWeight:r,minWidth:i,graphics:a}){let o=this.w,s=o.streamgraphData,c=s.lows[e],l=s.highs[e];if(!c||!l)return null;let u=o.globals.seriesXvalues[e],d=c.length;if(!Array.isArray(u)||u.length<d||d===0)return null;let f=Array(d),p=0;for(let e=0;e<d;e++){let t=Math.abs(this._yPx(l[e])-this._yPx(c[e]));f[e]=t,t>p&&(p=t)}if(p<=0)return null;let m=this._resolveFontSize(t,p),h=String(s.names[e]),g=m,_=a.getTextRects(h,`${g}px`,n,``,!0,r);if(p<_.height+By*2)return null;let v=this._widestRun(f,u,_.height+By*2,d);if(!v)return null;if(_.width>v.width&&t===`auto`){let e=Math.floor(g*(v.width/_.width));if(e<this._autoBounds().min||(g=e,_=a.getTextRects(h,`${g}px`,n,``,!0,r),p<_.height+By*2))return null}let y=_.height+By*2,b=[];for(let t of this._runs(f,y,d)){let r=Number(u[t.l]),o=Number(u[t.r]);if(!isFinite(r)||!isFinite(o))continue;let s=o-r;if(s<=0&&d>1){let e=Math.abs(Number(u[Math.min(t.r+1,d-1)])-Number(u[Math.max(t.l-1,0)]));s=isFinite(e)?e:0}if(s<i||s<_.width*.35)continue;let f=_.width<=s?h:a.getTextBasedOnMaxWidth({text:h,maxWidth:s,fontSize:`${g}px`,fontFamily:n});if(!f||f===`...`)continue;let p=f===h?_.width:_.width*(f.length/h.length),m=[r+s/2];s>p*2.2&&m.push(r+p/2+2,o-p/2-2);for(let n of m){let r=t.l,i=1/0;for(let e=t.l;e<=t.r;e++){let t=Math.abs(Number(u[e])-n);t<i&&(i=t,r=e)}b.push({x:n,y:(this._yPx(c[r])+this._yPx(l[r]))/2,text:f,color:this._contrastOn(e),fontSize:`${g}px`,width:p,height:_.height})}if(b.length>=6)break}return b.length?{k:e,weight:p,candidates:b}:null}_runs(e,t,n){let r=[],i=0;for(;i<n;){if(e[i]<t){i++;continue}let a=i,o=e[i];for(;a+1<n&&e[a+1]>=t;)a++,e[a]>o&&(o=e[a]);r.push({l:i,r:a,maxT:o}),i=a+1}return r.sort((e,t)=>t.maxT-e.maxT)}_widestRun(e,t,n,r){let i=-1;for(let a of this._runs(e,n,r)){let e=Number(t[a.r])-Number(t[a.l]);isFinite(e)&&e>i&&(i=e)}return i>=0?{width:i}:null}_deconflict(e){let t=e.slice().sort((e,t)=>t.weight-e.weight),n=[],r=e=>!n.some(t=>e.left<t.box.right&&e.right>t.box.left&&e.top<t.box.bottom&&e.bottom>t.box.top);for(let e of t)for(let t of e.candidates){let i={left:t.x-t.width/2,right:t.x+t.width/2,top:t.y-t.height/2,bottom:t.y+t.height/2};if(r(i)){n.push(X(Y({k:e.k},t),{box:i}));break}}return n}_autoBounds(){let e=this.w.config.plotOptions?.streamgraph?.labels||{};return{min:e.minFontSize==null?9:e.minFontSize,max:e.maxFontSize==null?30:e.maxFontSize}}_resolveFontSize(e,t){if(e!==`auto`){let t=parseFloat(e);return isFinite(t)&&t>0?t:12}let{min:n,max:r}=this._autoBounds();return Math.max(n,Math.min(r,Math.round(t*.36)))}_contrastOn(e){let t=this.w,n=t.globals.colors?.[e],r=typeof n==`string`?$.parseHex(n):null;return r?$.relativeLuminance(r)>.45?`#000000`:`#ffffff`:t.config.chart.foreColor}removeLabels(){let e=this.w.dom.elGraphical,t=e&&e.node.querySelector(`.apexcharts-streamgraph-labels`);t&&t.parentNode&&t.parentNode.removeChild(t)}bindHover(){let e=this.w;if(!d_.isBrowser()||this._hoverCfg().show===!1)return;let t=e.dom.baseEl&&e.dom.baseEl.querySelector(`.apexcharts-svg`);!t||t.__apexStreamHover||(t.__apexStreamHover=!0,t.addEventListener(`mousemove`,e=>{!this.isActive()||!this.w.streamgraphData||this._dim(this._bandAt(e))}),t.addEventListener(`mouseleave`,()=>{this._dim(-1)}))}_hoverCfg(){return this.w.config.plotOptions?.streamgraph?.hover||{}}_bandAt(e){let t=this.w,n=t.streamgraphData;if(!n||!n.order.length)return-1;let r=t.dom.baseEl&&t.dom.baseEl.querySelector(`.apexcharts-svg`);if(!r)return-1;let i=r.getBoundingClientRect(),a=t.globals.svgWidth?i.width/t.globals.svgWidth:1,o=H_.screenXToPlotPx(t,e.clientX),s=(e.clientY-i.top)/(a||1)-t.layout.translateY;if(o<0||o>t.layout.gridWidth||s<0||s>t.layout.gridHeight)return-1;let c=t.globals.seriesXvalues[n.order[0]];if(!Array.isArray(c)||!c.length)return-1;let l=t.interact?t.interact.capturedDataPointIndex:-1,u=-1;if(l>=0&&l<c.length)u=l;else{let e=1/0;for(let t=0;t<c.length;t++){let n=Math.abs(Number(c[t])-o);n<e&&(e=n,u=t)}}if(u<0)return-1;let d=-1,f=1/0;for(let e=0;e<n.order.length;e++){let t=n.order[e],r=this._yPx(n.highs[t][u]),i=this._yPx(n.lows[t][u]),a=Math.min(r,i),o=Math.max(r,i);if(s>=a&&s<=o)return t;let c=s<a?a-s:s-o;c<f&&(f=c,d=t)}return d}_dim(e){let t=this.w;if(e===this._hovered)return;this._hovered=e;let n=this._hoverCfg(),r=n.opacity==null?.35:n.opacity,i=t.dom.baseEl.querySelectorAll(`.apexcharts-series`),a=t.dom.baseEl.querySelectorAll(`.apexcharts-streamgraph-label`),o=(t,n)=>e<0||n===e;for(let e=0;e<i.length;e++){let t=i[e];t.style.transition=`opacity .15s ease`,t.style.opacity=o(t,Number(t.getAttribute(`data:realIndex`)))?``:String(r)}for(let e=0;e<a.length;e++){let n=a[e];n.style.transition=`opacity .15s ease, fill .15s ease`,o(n,Number(n.getAttribute(`data:realIndex`)))?this._restoreLabel(n):(n.getAttribute(`data:fill`)||n.setAttribute(`data:fill`,n.getAttribute(`fill`)||``),n.setAttribute(`fill`,t.config.chart.foreColor),n.style.opacity=`0.65`)}}_restoreLabel(e){let t=e.getAttribute(`data:fill`);t&&e.setAttribute(`fill`,t),e.style.opacity=``}clearDim(){this._hovered=-1;let e=this.w;if(!e.dom.baseEl)return;let t=e.dom.baseEl.querySelectorAll(`.apexcharts-series`);for(let e=0;e<t.length;e++){let n=t[e];n.style.opacity=``}let n=e.dom.baseEl.querySelectorAll(`.apexcharts-streamgraph-label`);for(let e=0;e<n.length;e++)this._restoreLabel(n[e])}holdUntilBandsLand(e){let t=this.w;d_.isBrowser()&&t.globals.shouldAnimate&&!t.globals.animationEnded&&(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node,holdUntilComplete:!0}))}},Hy=[`wiggle`,`silhouette`,`zero`,`expand`],Uy=[`inside-out`,`inverse`,`none`];function Wy(e,t,n){let r=n&&n[t]!==void 0?n[t]:t+1;return e==null?{x:r,y:null,rest:{}}:Array.isArray(e)?{x:e[0]===void 0?r:e[0],y:e[1],rest:{}}:typeof e==`object`?{x:e.x===void 0?r:e.x,y:e.y,rest:e}:{x:r,y:e,rest:{}}}function Gy(e){for(let t=0;t<e.length;t++){let n=e[t],r=Array.isArray(n)?n[1]:n&&typeof n==`object`?n.y:n;if(Array.isArray(r)&&r.length===2)return!0}return!1}function Ky(e,t){let n=[],r=[],i=new Map,a=[];for(let o=0;o<e.length;o++){let s=Array.isArray(e[o]?.data)?e[o].data:[],c=new Map;for(let e=0;e<s.length;e++){let{x:a,y:o,rest:l}=Wy(s[e],e,t),u=a instanceof Date?a.getTime():a;i.has(u)||(i.set(u,n.length),n.push(a),r.push(Y({},l))),c.set(i.get(u),$.parseNumber(o))}a.push(c)}return{xs:n,rows:r,grids:a}}function qy(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n]instanceof Date?e[n].getTime():e[n];if(typeof r!=`number`||!isFinite(r))return null;t.push(n)}let n=t.map(t=>({j:t,v:e[t]instanceof Date?e[t].getTime():e[t]}));n.sort((e,t)=>e.v-t.v);let r=n.map(e=>e.j);for(let e=0;e<r.length;e++)if(r[e]!==e)return r;return null}function Jy(e,t,n){if(e===`none`)return t.slice();if(e===`inverse`)return t.slice().reverse();let r={},i={};for(let e=0;e<t.length;e++){let a=t[e],o=n[a],s=0,c=-1/0,l=0;for(let e=0;e<o.length;e++)s+=o[e],o[e]>c&&(c=o[e],l=e);r[a]=s,i[a]=l}let a=t.slice().sort((e,t)=>i[e]-i[t]||e-t),o=0,s=0,c=[],l=[];for(let e=0;e<a.length;e++){let t=a[e];o<s?(o+=r[t],c.push(t)):(s+=r[t],l.push(t))}return l.reverse().concat(c)}function Yy(e,t,n,r){let i=Array(r).fill(0);if(r===0||t.length===0||e===`zero`||e===`expand`)return i;if(e===`silhouette`){for(let e=0;e<r;e++){let r=0;for(let i=0;i<t.length;i++)r+=n[t[i]][e];i[e]=-r/2}return i}let a=0;for(let e=1;e<r;e++){let r=0,o=0;for(let i=0;i<t.length;i++){let a=n[t[i]],s=a[e],c=(s-a[e-1])/2;for(let r=0;r<i;r++){let i=n[t[r]];c+=i[e]-i[e-1]}r+=s,o+=c*s}r&&(a-=o/r),i[e]=a}return i}function Xy(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.streamgraphRawSeries||=e.map(e=>X(Y({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.streamgraphRawSeries;if(i.some(e=>Gy(Array.isArray(e?.data)?e.data:[])))return t.streamgraphData=null,e;let a=n.plotOptions?.streamgraph||{},o=Hy.indexOf(a.offset)===-1?`wiggle`:a.offset,s=Uy.indexOf(a.order)===-1?`inside-out`:a.order,c=n.xaxis?.categories,l=r.collapsedSeriesIndices||[],{xs:u,rows:d,grids:f}=Ky(i,c),p=qy(u),m=p?p.map(e=>u[e]):u,h=p?p.map(e=>d[e]):d,g=m.length,_=!1,v=[];for(let e=0;e<i.length;e++){let t=Array(g);for(let n=0;n<g;n++){let r=f[e].get(p?p[n]:n),i=r==null?0:Number(r);isFinite(i)||(i=0),i<0&&(_=!0,i=0),t[n]=i}v.push(t)}_&&!r.streamgraphWarnedNegative&&(r.streamgraphWarnedNegative=!0,console.warn(`ApexCharts: a streamgraph stacks parts of a whole, so negative values have no band to draw and were treated as 0. Use a stacked area (chart.type: "area", chart.stacked: true) for data that goes below zero.`));let y=[];for(let e=0;e<i.length;e++)l.indexOf(e)===-1&&y.push(e);let b=v;if(o===`expand`){b=v.map(e=>e.slice());for(let e=0;e<g;e++){let t=0;for(let n=0;n<y.length;n++)t+=b[y[n]][e];if(t)for(let n=0;n<y.length;n++)b[y[n]][e]/=t}}let x=Jy(s,y,b),S=Yy(o,x,b,g),C=i.map(()=>null),w=i.map(()=>null);for(let e=0;e<x.length;e++)C[x[e]]=Array(g),w[x[e]]=Array(g);for(let e=0;e<g;e++){let t=S[e];for(let n=0;n<x.length;n++){let r=x[n],i=C[r],a=w[r];i[e]=t,t+=b[r][e],a[e]=t}}return t.streamgraphData={names:i.map((e,t)=>e?.name??`Series ${t+1}`),xs:m,values:v,lows:C,highs:w,order:x,offset:o,hidden:i.map((e,t)=>t).filter(e=>l.indexOf(e)!==-1)},i.map((e,t)=>{let n=C[t],r=w[t];if(!n||!r)return X(Y({},e),{data:[]});let i=Array(g);for(let e=0;e<g;e++)i[e]=X(Y({},h[e]),{x:m[e],y:[n[e],r[e]]});return X(Y({},e),{data:i})})}ty(`streamgraph`,Xy),kh.registerFeatures({streamgraph:Vy});var Zy=(e,t,n,r)=>{if(typeof e!=`function`)return e;let i=e({series:t.seriesData.series,seriesIndex:n,dataPointIndex:r,w:t});return Number.isFinite(i)?i:0};function Qy(e){return-Math.cos(e*Math.PI)/2+.5}function $y(e,t,n,r){e=Math.min(Math.max(e,0),1),n=Math.min(Math.max(n,0),1);let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c,u=e=>((o*e+a)*e+i)*e,d=e=>((l*e+c)*e+s)*e,f=e=>{let t=0,n=1,r=e;if(r<t)return t;if(r>n)return n;for(;t<n;){let i=u(r);if(Math.abs(i-e)<1e-4)return r;e>i?t=r:n=r,r=(t+n)/2}return r};return e=>e<=0?0:e>=1?1:d(f(e))}var eb=new Map;eb.set(`linear`,e=>e),eb.set(`easeInOutSine`,Qy),eb.set(`easeInSine`,e=>1-Math.cos(e*Math.PI/2)),eb.set(`easeOutSine`,e=>Math.sin(e*Math.PI/2)),eb.set(`easeInQuad`,e=>e*e),eb.set(`easeOutQuad`,e=>1-(1-e)*(1-e)),eb.set(`easeInOutQuad`,e=>e<.5?2*e*e:1-(-2*e+2)**2/2),eb.set(`easeInCubic`,e=>e*e*e),eb.set(`easeOutCubic`,e=>1-(1-e)**3),eb.set(`easeInOutCubic`,e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2),eb.set(`easeOutBack`,e=>{let t=1.70158;return 1+(t+1)*(e-1)**3+t*(e-1)**2}),eb.set(`easeInOutBack`,e=>{let t=1.70158*1.525;return e<.5?(2*e)**2*((t+1)*2*e-t)/2:((2*e-2)**2*((t+1)*(e*2-2)+t)+2)/2});function tb(e){return Array.isArray(e)&&e.length===4&&e.every(e=>typeof e==`number`)}function nb(e){return typeof e==`function`?rb(e):tb(e)?$y(e[0],e[1],e[2],e[3]):typeof e==`string`&&eb.has(e)?rb(eb.get(e)):Qy}function rb(e){return t=>{let n=e(t);return typeof n==`number`&&isFinite(n)?n:t}}function ib(e,t){let n=new Set(e.exits),r=[],i=0;for(let t=0;t<e.toOld.length;t++){let a=e.toOld[t];if(a!==-1){for(;i<a;)n.has(i)&&r.push({oldJ:i,newJ:-1}),i++;r.push({oldJ:a,newJ:t}),i=a+1}else r.push({oldJ:-1,newJ:t})}for(;i<t;)n.has(i)&&r.push({oldJ:i,newJ:-1}),i++;return r}function ab(e,t,n){if(!e||typeof e!=`string`)return null;let r=Bg(e);if(!r.length||r[0][0]!==`M`)return null;for(let e=1;e<r.length;e++)if(r[e][0]===`M`)return null;let i=r,a=null;if(n){if(r.length<5||(a=r.slice(-3),i=r.slice(0,-3),a[2][0]!==`Z`)||a[1][0]!==`L`||a[0][0]!==`L`&&a[0][0]!==`C`)return null}else if(r[r.length-1][0]===`Z`)return null;if(i.length!==t||i.length<2)return null;let o=i[1][0];if(o!==`L`&&o!==`C`)return null;for(let e=2;e<i.length;e++)if(i[e][0]!==o)return null;let s=i.map(e=>e[0]===`C`?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(let e of s)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:i,closing:a,segType:o,anchors:s}}function ob(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function sb(e,t,n){let r=e,i=[t[1],t[2]],a=[t[3],t[4]],o=[t[5],t[6]],s=ob(r,i,n),c=ob(i,a,n),l=ob(a,o,n),u=ob(s,c,n),d=ob(c,l,n),f=ob(u,d,n);return{first:[`C`,s[0],s[1],u[0],u[1],f[0],f[1]],second:[`C`,d[0],d[1],l[0],l[1],o[0],o[1]],mid:f}}function cb(e,t,n){let r=[t[1],t[2]],i=ob(e,r,n);return{first:[`L`,i[0],i[1]],second:[`L`,r[0],r[1]],mid:i}}function lb(e,t){let{body:n,closing:r,segType:i,anchors:a}=e,o=a.length,s=t.length,c=e=>i===`C`?[`C`,e[0],e[1],e[0],e[1],e[0],e[1]]:[`L`,e[0],e[1]],l=[[`M`,a[0][0],a[0][1]]],u=0;for(;u<s&&t[u]!==0;)u++;for(let e=1;e<=u;e++)l.push(c(a[0]));let d=u+1;for(let e=0;e<o-1;e++){let r=0;for(;d+r<s&&t[d+r]===-1;)r++;let o=n[e+1];if(!r)l.push(o.slice());else{let t=r+1,n=a[e],s=o;for(let e=0;e<r;e++){let r=1/(t-e),a=i===`C`?sb(n,s,r):cb(n,s,r);l.push(a.first),n=a.mid,s=a.second}l.push(s)}d+=r+1}for(;d<s;)l.push(c(a[o-1])),d++;return r&&r.forEach(e=>l.push(e.slice())),l}function ub(e,t,n,r,i,a){let o=ab(e,r,a);if(!o)return null;let s=ab(t,i,a);if(!s||o.segType!==s.segType||(o.closing||s.closing)&&(!o.closing||!s.closing||o.closing[0][0]!==s.closing[0][0]))return null;let c=n.map(e=>e.oldJ),l=n.map(e=>e.newJ);return{from:Ug(lb(o,c)),toInterp:Ug(lb(s,l))}}function db(e){let t=e.config.chart.animations;if(!t||t.enabled===!1||!t.dynamicAnimation||t.dynamicAnimation.enabled===!1)return!1;let n=t.largeDatasetThreshold??0;return n>0&&e.globals.dataPoints>n?!1:!!(d_.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate)}function fb(e,t,n){if(e.axisFlags?.isXNumeric){let r=e.seriesData?.seriesX?.[t];if(r&&r.length&&r[n]!=null)return`x:`+r[n]}let r=e.globals.labels?.[n];return r!=null&&String(r)!==``?`c:`+(Array.isArray(r)?r.join(` `):String(r)):`j:`+n}function pb(e,t,n){if(e.isXNumeric){let r=e.seriesX?.[t];if(r&&r.length&&r[n]!=null)return`x:`+r[n]}let r=e.labels?.[n];return r!=null&&String(r)!==``?`c:`+(Array.isArray(r)?r.join(` `):String(r)):`j:`+n}function mb(e,t){let n=new Map;e.forEach((e,t)=>{n.has(e)||n.set(e,t)});let r=Array(t.length),i=new Set,a=-1,o=!0,s=e.length===t.length;t.forEach((e,t)=>{let c=n.has(e)&&!i.has(n.get(e))?n.get(e):-1;r[t]=c,c!==-1&&(i.add(c),c<a&&(o=!1),a=c),c!==t&&(s=!1)});let c=[];for(let t=0;t<e.length;t++)i.has(t)||c.push(t);return{toOld:r,exits:c,ordered:o,changed:!s}}function hb(e){let t=new Map;return e.map(e=>{let n=t.get(e)||0;return t.set(e,n+1),n===0?e:`${e}#${n}`})}function gb(e,t,n=!1,r=!1){if(!db(e))return null;let i=e.globals.prevStreamFrame;if(!i)return null;let a=i.seriesY?.[t],o=e.seriesData.series?.[t];if(!Array.isArray(a)||!Array.isArray(o)||!a.length||!o.length)return null;let s=hb(a.map((e,n)=>pb(i,t,n))),c=hb(o.map((n,r)=>fb(e,t,r))),l=mb(s,c);return!l.ordered&&!r||!l.changed&&!n?null:{join:l,oldKeys:s,newKeys:c}}function _b(e){let t=e.config.chart.animations;return nb(t.dynamicAnimation?.easing??t.easing)}function vb(e,t,n,r,i){let a=performance.now(),o=s=>{if(e.globals.isDestroyed)return;let c=Math.max(0,Math.min(1,(s-a)/t));r(n(c),c),c<1?Q.requestAnimationFrame(o):i&&i()};Q.requestAnimationFrame(o)}function yb(e,{elPointsMain:t,realIndex:n,speed:r}){if(!t?.node)return!1;let i=gb(e,n,!0);if(!i)return!1;let a=e.globals.prevStreamFrame;if(!a)return!1;let o=a.xPixels?.[n],s=a.yPixels?.[n];if(!o||!s)return!1;let c=t.node.querySelectorAll(`.apexcharts-marker`);if(!c.length)return!1;let l=e.globals.seriesXvalues?.[n]||[],u=e.globals.seriesYvalues?.[n]||[],d=_b(e),f=Math.max(1,r||1);return t.node.classList.remove(`apexcharts-element-hidden`),c.forEach(t=>{let r=parseInt(t.getAttribute(`j`)??t.getAttribute(`rel`)??``,10);if(!isFinite(r)||r<0||r>=i.join.toOld.length)return;let c=i.join.toOld[r],p=l[r]!=null&&u[r]!=null?[l[r],u[r]]:null;if(c===-1||!p){let n=t.style;n.opacity=`0`,vb(e,f,d,e=>{n.opacity=String(e)},()=>{n.opacity=``});return}let m=(o[c]??NaN)-p[0],h=(s[c]??NaN)-p[1];if(!isFinite(m)||!isFinite(h))return;let g=a.rPixels?.[n]?.[c]??NaN,_=parseFloat(t.getAttribute(`r`)??t.getAttribute(`default-marker-size`)??``),v=isFinite(g)&&isFinite(_)&&_>0&&Math.abs(g-_)>.25;if(!(Math.abs(m)>=.5||Math.abs(h)>=.5)&&!v)return;let y=e=>{let n=m*(1-e),r=h*(1-e);if(v){let i=(g+(_-g)*e)/_;t.setAttribute(`transform`,`translate(${n+p[0]*(1-i)}, ${r+p[1]*(1-i)}) scale(${i})`)}else t.setAttribute(`transform`,`translate(${n}, ${r})`)};y(0),vb(e,f,d,y,()=>{t.removeAttribute(`transform`)})}),!0}function bb(e,{type:t,realIndex:n,pathFromLine:r,pathFromArea:i,linePaths:a,areaPaths:o}){let s=gb(e,n);if(!s)return null;let{join:c,oldKeys:l,newKeys:u}=s,d=e.globals.prevStreamFrame;if(!d)return null;let f=d.seriesY?.[n],p=e.seriesData.series?.[n];if(f.length<2||p.length<2||f.some(e=>e===null)||p.some(e=>e===null))return null;let m=ib(c,l.length),h={};return Array.isArray(a)&&a.length===1&&r&&(h.line=ub(r,a[0],m,l.length,u.length,!1)),t===`area`&&Array.isArray(o)&&o.length===1&&i&&(h.area=ub(i,o[0],m,l.length,u.length,!0)),!h.line&&!h.area?null:h}function xb(e){let t=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(e||``);if(!t)return null;let n=parseFloat(t[1]),r=parseFloat(t[2]);return isFinite(n)&&isFinite(r)?{x:n,y:r}:null}function Sb({w:e,elSeries:t,record:n,newKeys:r,isHorizontal:i,speed:a}){if(!db(e)||!n||!Array.isArray(n.paths)||!t?.node)return;let o=new Set(r),s=n.paths.filter(e=>e&&e.d&&e.key!=null&&!o.has(e.key));if(!s.length)return;let c=new Z(e),l=e.globals.colors?.[parseInt(String(n.realIndex),10)];s.forEach(n=>{let r=n.fill||l||`#c8c8c8`;String(r).indexOf(`url(`)===0&&(r=l||`#c8c8c8`);let o=c.drawPath({d:n.d,stroke:`none`,strokeWidth:0,fill:r,fillOpacity:1,classes:`apexcharts-bar-ghost`}),s=o.node;s.setAttribute(`pointer-events`,`none`),o.attr(`clip-path`,`url(#gridRectBarMask${e.globals.cuid})`),t.node.insertBefore(s,t.node.firstChild);let u=xb(n.d),d=i?`left center`:`center bottom`;try{let e=s.getBBox();u&&e&&(d=i?Math.abs(u.x-e.x)<=Math.abs(u.x-(e.x+e.width))?`left center`:`right center`:Math.abs(u.y-(e.y+e.height))<=Math.abs(u.y-e.y)?`center bottom`:`center top`)}catch{}let f=s.style;f.transformBox=`fill-box`,f.transformOrigin=d;let p=Math.max(1,a||1),m=performance.now(),h=t=>{if(e.globals.isDestroyed||!s.parentNode)return;let n=Math.max(0,Math.min(1,(t-m)/p)),r=1-(1-n)**3,a=1-r;f.transform=i?`scaleX(${a})`:`scaleY(${a})`,f.opacity=String(1-r),n<1?Q.requestAnimationFrame(h):s.parentNode.removeChild(s)};Q.requestAnimationFrame(h)})}var Cb=class{constructor(e){this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||=this.w.config.dataLabels.formatter}handleBarDataLabels(e){let{x:t,y:n,y1:r,y2:i,i:a,j:o,realIndex:s,columnGroupIndex:c,barHeight:l,barWidth:u,barXPosition:d,barYPosition:f,visibleSeries:p}=e,m=this.w,h=new Z(this.barCtx.w),g=m.waterfallData&&m.waterfallData.values,_=g&&g[s]&&g[s][o]!=null?g[s][o]:null,v=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth,y,b;m.axisFlags.isXNumeric&&!m.globals.isBarHorizontal?(y=t+u*(p+1),b=n+l*(p+1)-v):(y=t+u*p,b=n+l*p);let x=null,S=null,C=t,w=n,T={},E=m.config.dataLabels,D=this.barCtx.barOptions.dataLabels,O=this.barCtx.barOptions.dataLabels.total;f!==void 0&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(b=f,w=f),d!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(y=d,C=d);let k=Zy(E.offsetX,m,s,o),A=Zy(E.offsetY,m,s,o),j={width:0,height:0};if(m.config.dataLabels.enabled){let e=_===null?m.seriesData.series[s][o]:_;j=h.getTextRects(m.config.dataLabels.formatter?m.config.dataLabels.formatter(e,X(Y({},m),{seriesIndex:s,dataPointIndex:o,w:m})):m.formatters.yLabelFormatters[0](e),parseFloat(E.style.fontSize).toString(),E.style.fontFamily,void 0,!0,E.style.fontWeight)}let ee={x:t,y:n,i:a,j:o,realIndex:s,columnGroupIndex:c,bcx:y,bcy:b,barHeight:l,barWidth:u,textRects:j,strokeWidth:v,dataLabelsX:C,dataLabelsY:w,dataLabelsConfig:E,barDataLabelsConfig:D,barTotalDataLabelsConfig:O,offX:k,offY:A};if(T=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(ee):this.calculateColumnsDataLabelsPosition(ee),_!==null&&this.barCtx.isHorizontal&&D.position===`center`){let e=m.waterfallData.geometry?.[s]?.[o];e&&e.horizontal&&(T.dataLabelsX=(e.levelStart+e.levelEnd)/2+k)}return x=this.drawCalculatedDataLabels({x:T.dataLabelsX,y:T.dataLabelsY,val:_===null?this.barCtx.isRangeBar?[r,i]:m.config.chart.stackType===`100%`?m.globals.seriesPercent[s][o]:m.seriesData.series[s][o]:_,i:s,j:o,barWidth:u,barHeight:l,textRects:j,dataLabelsConfig:E}),m.config.chart.stacked&&O.enabled&&(S=this.drawTotalDataLabels({x:T.totalDataLabelsX,y:T.totalDataLabelsY,barWidth:u,barHeight:l,realIndex:s,j:o,textAnchor:T.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:s,j:o}),rawVal:this.getStackedTotalValue({realIndex:s,j:o}),dataLabelsConfig:E,barTotalDataLabelsConfig:O})),{dataLabelsPos:T,dataLabels:x,totalDataLabels:S}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(e){if(!this.hasMultipleSeriesGroups())return null;let t=this.barCtx.barHelpers.getSeriesGroupIndex(e);return t<0?null:{groupIndex:t,group:this.w.labelData.seriesGroups[t]}}drawsStackedTotal(e){let t=this.barCtx.lastActiveBarSerieIndexByGroup,n=this.getTotalGroupContext(e);return n&&t&&t.length>n.groupIndex?t[n.groupIndex]===e:this.barCtx.lastActiveBarSerieIndex===e}getStackedTotalValue({realIndex:e,j:t}){let n=this.w,r=this.getTotalGroupContext(e),i=n.seriesData.stackedSeriesTotalsByGroups;return r&&i&&i[r.groupIndex]?i[r.groupIndex][t]:this.barCtx.stackedSeriesTotals[t]}getStackedTotalDataLabel({realIndex:e,j:t}){let n=this.w,r=this.getStackedTotalValue({realIndex:e,j:t});return this.totalFormatter&&(r=this.totalFormatter(r,X(Y({},n),{seriesIndex:e,dataPointIndex:t,w:n}))),r}calculateColumnsDataLabelsPosition(e){let t=this.w,{i:n,j:r,realIndex:i,y:a,bcx:o,barWidth:s,barHeight:c,textRects:l,dataLabelsX:u,dataLabelsY:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,strokeWidth:h,offX:g,offY:_}=e,v,y,b=o;c=Math.abs(c);let x=t.config.plotOptions.bar.dataLabels.orientation===`vertical`,{zeroEncounters:S}=this.barCtx.barHelpers.getZeroValueEncounters({i:n,j:r});o-=h/2;let C=t.layout.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?u+=s/2:(u=t.axisFlags.isXNumeric?o-s/2+g:o-C+s/2+g,!t.config.chart.stacked&&S>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=s*S)),x&&(u=u+l.height/2-h/2-2);let w=t.seriesData.series[n][r]<0,T=a;switch(this.barCtx.isReversed&&(T=a+(w?c:-c)),p.position){case`center`:d=x?w?T-c/2+_:T+c/2-_:w?T-c/2+l.height/2+_:T+c/2+l.height/2-_;break;case`bottom`:d=x?w?T-c+_:T+c-_:w?T-c+l.height+h+_:T+c-l.height/2+h-_;break;case`top`:d=x?w?T+_:T-_:w?T-l.height/2-_:T+l.height+_;break}let E=T,D=this.getTotalGroupContext(i);if((D?[D.group]:t.labelData.seriesGroups).forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevY.forEach(e=>{E=w?Math.max(e[r],E):Math.min(e[r],E)})}),this.drawsStackedTotal(i)&&m.enabled){let e=new Z(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:i,j:r}),f.fontSize);v=w?E-e.height/2-_-m.offsetY+18:E+e.height+_+m.offsetY-18;let n=C;y=b+(t.axisFlags.isXNumeric?-s/2:s/2-n)+m.offsetX}return t.config.chart.stacked||(d<0?d=0+h:d+l.height/3>t.layout.gridHeight&&(d=t.layout.gridHeight-h)),{bcx:o,bcy:a,dataLabelsX:u,dataLabelsY:d,totalDataLabelsX:y,totalDataLabelsY:v,totalDataLabelsAnchor:`middle`}}calculateBarsDataLabelsPosition(e){let t=this.w,{x:n,i:r,j:i,realIndex:a,bcy:o,barHeight:s,barWidth:c,textRects:l,dataLabelsX:u,strokeWidth:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,offX:h,offY:g}=e,_=t.layout.gridHeight/t.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});c=Math.abs(c);let y;if(this.barCtx.isPyramid){let e=l.centerOffset??0;y=o+s/2+g-e}else y=o-(this.barCtx.isRangeBar?0:_)+s/2+l.height/2+g-3;!t.config.chart.stacked&&v>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=s*v);let b,x,S=`start`,C=t.seriesData.series[r][i]<0,w=n;if(this.barCtx.isReversed&&(w=n+(C?-c:c),S=C?`start`:`end`),this.barCtx.isPyramid)u=t.layout.gridWidth/2+h;else switch(p.position){case`center`:u=C?w+c/2-h:Math.max(l.width/2,w-c/2)+h;break;case`bottom`:u=C?w+c-d-h:w-c+d+h;break;case`top`:u=C?w-d-h:w-d+h;break}let T=w,E=this.getTotalGroupContext(a);if((E?[E.group]:t.labelData.seriesGroups).forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevX.forEach(e=>{T=C?Math.min(e[i],T):Math.max(e[i],T)})}),this.drawsStackedTotal(a)&&m.enabled){let e=new Z(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),f.fontSize);C?(b=T-d-h-m.offsetX,S=`end`):b=T+h+m.offsetX+(this.barCtx.isReversed?-(c+d):d),x=y-l.height/2+e.height/2+m.offsetY+d,t.globals.barGroups.length>1&&!E&&(x-=t.globals.barGroups.length/2*(s/2))}if(!t.config.chart.stacked){let e=C&&f.textAnchor!==`middle`?f.textAnchor===`start`?`end`:`start`:f.textAnchor,n;n=p.orientation===`vertical`?l.height/2:e===`end`?l.width:e===`middle`?l.width/2:0;let r=(p.orientation===`vertical`?l.height:l.width)-n;u+r>t.layout.gridWidth-d&&(u=t.layout.gridWidth-r-d),u-n<d&&(u=n+d)}return{bcx:n,bcy:o,dataLabelsX:u,dataLabelsY:y,totalDataLabelsX:b,totalDataLabelsY:x,totalDataLabelsAnchor:S}}drawCalculatedDataLabels({x:e,y:t,val:n,i:r,j:i,textRects:a,barHeight:o,barWidth:s,dataLabelsConfig:c}){let l=this.w,u=`rotate(0)`;l.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(u=`rotate(-90, ${e}, ${t})`);let d=new $h(this.barCtx.w,this.barCtx.ctx),f=new Z(this.barCtx.w),p=c.formatter,m=null,h=l.globals.collapsedSeriesIndices.indexOf(r)>-1,g=(l.globals.collapsingSeriesIndices||[]).indexOf(r)>-1;if(g){let e=l.globals.prevDataLabels?.get(`${r}::${fb(l,r,i)}`);e&&isFinite(e.val)&&(n=e.val)}if(c.enabled&&(!h||g)){m=f.group({class:`apexcharts-data-labels`,transform:u});let h=l.config.dataLabels;(h.animate?.enabled||h.countUp?.enabled)&&(m.node.setAttribute(`data:dlKey`,`${r}::${fb(l,r,i)}`),m.node.setAttribute(`data:dlJ`,String(i)),typeof n==`number`&&isFinite(n)&&m.node.setAttribute(`data:dlVal`,String(n)));let _=``;n!==void 0&&(_=p(n,X(Y({},l),{seriesIndex:r,dataPointIndex:i,w:l}))),!n&&l.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(_=``);let v=l.seriesData.series[r][i]<0,y=l.config.plotOptions.bar.dataLabels.position;l.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(y===`top`&&(v?c.textAnchor=`end`:c.textAnchor=`start`),y===`center`&&(c.textAnchor=`middle`),y===`bottom`&&(v?c.textAnchor=`end`:c.textAnchor=`start`)),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&s<f.getTextRects(_,parseFloat(c.style.fontSize).toString()).width&&(_=``),l.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!g&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(s)&&(_=``):a.height/1.6>Math.abs(o)&&(_=``));let b=Y({},c);this.barCtx.isHorizontal&&n<0&&(c.textAnchor===`start`?b.textAnchor=`end`:c.textAnchor===`end`&&(b.textAnchor=`start`)),d.plotDataLabelsText({x:e,y:t,text:_,i:r,j:i,parent:m,dataLabelsConfig:b,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}drawTotalDataLabels({x:e,y:t,val:n,rawVal:r,realIndex:i,j:a,textAnchor:o,barTotalDataLabelsConfig:s}){let c=new Z(this.barCtx.w),l;if(s.enabled&&e!==void 0&&t!==void 0&&this.drawsStackedTotal(i)){l=c.drawText({x:e,y:t,foreColor:s.style.color,text:n,textAnchor:o,fontFamily:s.style.fontFamily,fontSize:s.style.fontSize,fontWeight:s.style.fontWeight}),l.attr({class:`apexcharts-datalabel-total`,cx:e,cy:t});let u=this.w.config.dataLabels;if(u.animate?.enabled||u.countUp?.enabled){let{groupIndex:e}=this.barCtx.barHelpers.getGroupIndex(i);l.node.setAttribute(`data:dlTotalKey`,`${e}::${fb(this.w,i,a)}`),l.node.setAttribute(`data:dlTotalSeries`,String(i)),typeof r==`number`&&isFinite(r)&&l.node.setAttribute(`data:dlTotalVal`,String(r))}}return l}};function wb(e){return e?.config?.chart?.requestedType!==`histogram`||e.config.plotOptions?.histogram?.overlap===!1?!1:(e.seriesData?.series?.length??0)>1}var Tb=class{constructor(e){this.w=e.w,this.barCtx=e}initVariables(e){let t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let n=0;n<e.length;n++)if(e[n].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[n].length),t.axisFlags.isXNumeric)for(let r=0;r<e[n].length;r++)t.seriesData.seriesX[n][r]>t.globals.minX&&t.seriesData.seriesX[n][r]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(t.seriesData.series),$.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(e=>e.map(e=>`none`))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1)}barSlotXSpan(){let e=this.w;if(this._slotXSpan!==void 0)return this._slotXSpan;let t=0;if(e.globals.dataPoints<=1){let n=e.globals.maxX-e.globals.minX;t=n>0?n/4:0}else if(t=this._unionMinXGap(),!(t>0)||!isFinite(t)){let n=e.globals.minXDiff;t=n>0&&isFinite(n)&&n!==.5?n:0}return this._slotXSpan=t,t}_unionMinXGap(){let e=this.w.seriesData.seriesX||[],t=[];for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)&&r.length>0&&t.push(r)}if(!t.length)return 0;let n=Array(t.length).fill(0),r=NaN,i=1/0;for(;;){let e=1/0,a=-1;for(let r=0;r<t.length;r++){let i=t[r];for(;n[r]<i.length&&typeof i[n[r]]!=`number`;)n[r]++;if(n[r]>=i.length)continue;let o=i[n[r]];if(o!==o){n[r]++,r--;continue}o<e&&(e=o,a=r)}if(a===-1)break;if(n[a]++,r===r){let t=e-r;t>0&&t<i&&(i=t)}r=e}return isFinite(i)?i:0}initialPositions(e){let t=this.w,n,r,i,a,o,s,c,l,u=t.globals.dataPoints;this.barCtx.isRangeBar&&(u=t.labelData.labels.length);let d=this.barCtx.seriesLen;if((t.config.plotOptions.bar.rangeBarGroupRows||wb(t))&&(d=1),this.barCtx.isHorizontal)i=t.layout.gridHeight/u,o=i/d,t.axisFlags.isXNumeric&&(i=t.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf(`%`)===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+t.globals.padHorizontal+(this.barCtx.isReversed?t.layout.gridWidth:0)-(this.barCtx.isReversed?this.barCtx.baseLineInvertedY*2:0),this.barCtx.isFunnel&&(l=t.layout.gridWidth/2),r=(i-o*this.barCtx.seriesLen)/2;else{if(a=t.layout.gridWidth/this.barCtx.visibleItems,t.config.xaxis.convertedCatToNumeric&&(a=t.layout.gridWidth/t.globals.dataPoints),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,t.axisFlags.isXNumeric){let e=this.barCtx.xRatio,t=this.barSlotXSpan();t>0&&t/e>0&&(a=t/e),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,s<1&&(s=1)}String(this.barCtx.barOptions.columnWidth).indexOf(`%`)===-1&&(s=parseInt(this.barCtx.barOptions.columnWidth,10)),c=t.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?t.layout.gridHeight:0)+(this.barCtx.isReversed?this.barCtx.baseLineY[this.barCtx.translationsIndex]*2:0),n=t.axisFlags.isXNumeric?this.barCtx.getBarXForNumericXAxis({x:n,j:0,realIndex:e,barWidth:s}).x:t.globals.padHorizontal+$.noExponents(a-s*this.barCtx.seriesLen)/2}return t.globals.barHeight=o,t.globals.barWidth=s,{x:n,y:r,yDivision:i,xDivision:a,barHeight:o,barWidth:s,zeroH:c,zeroW:l}}initializeStackedPrevVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].prevY=[],e[t].prevX=[],e[t].prevYF=[],e[t].prevXF=[],e[t].prevYVal=[],e[t].prevXVal=[]})}initializeStackedXYVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].xArrj=[],e[t].xArrjF=[],e[t].xArrjVal=[],e[t].yArrj=[],e[t].yArrjF=[],e[t].yArrjVal=[]})}getPathFillColor(e,t,n,r){let i=this.w,a=new tg(this.barCtx.w),o=null,s=this.barCtx.barOptions.distributed?n:t,c=!1;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(r=>{e[t][n]>=r.from&&e[t][n]<=r.to&&(o=r.color,c=!0)});let l=this.getDumbbellConnectorFill(t,n)||i.config.series[t].data[n]?.fill,u=this.barCtx.barOptions.isDumbbell?i.config.plotOptions.bar.dumbbell.connector:null,d;return u&&u.color&&(o=u.color,d=u.opacity),{color:a.fillPath({seriesNumber:this.barCtx.barOptions.distributed?s:r,dataPointIndex:n,color:o,opacity:d,value:e[t][n],fillConfig:l,fillType:l?.type?l.type:Array.isArray(i.config.fill.type)?i.config.fill.type[r]:i.config.fill.type}),useRangeColor:c}}getDumbbellConnectorFill(e,t){let n=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;let r=n.dumbbellData;if(!r||r.form!==`series`)return null;let i=n.config.plotOptions.bar.dumbbell.connector;if(i.color)return null;let a=r.order[t];if(!a)return null;let o=n.globals.colors[a[0]],s=n.globals.colors[a[1]];return!o||!s?null:{type:`gradient`,gradient:{type:this.barCtx.isHorizontal?`horizontal`:`vertical`,gradientFrom:o,gradientTo:s,opacityFrom:i.opacity,opacityTo:i.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}}getStrokeWidth(e,t,n){let r=0,i=this.w;return this.barCtx.series[e][t]===void 0||this.barCtx.series[e][t]===null||i.config.chart.type===`bar`&&!this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(r=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth)),r}getStackedSeriesIndices(e){let t=this.w,n=t.labelData.seriesGroups,r=t.globals.columnSeries?new Set(t.globals.columnSeries.i):null,i=e=>!r||r.has(e);if(!n||n.length<2){let t=Array.from({length:e},(e,t)=>t).filter(i);return t.length?[t]:[]}let a=Array.from({length:n.length},()=>[]),o=[];for(let t=0;t<e;t++){if(!i(t))continue;let e=this.getSeriesGroupIndex(t);e>-1?a[e].push(t):o.push(t)}return o.length&&a.push(o),a.filter(e=>e.length>0)}createBorderRadiusArr(e){let t=this.w,n=!this.w.config.chart.stacked||t.config.plotOptions.bar.borderRadius<=0,r=e.length,i=e[0]?.length|0,a=Array.from({length:r},()=>Array(i).fill(n?`top`:`none`));if(n)return a;let o=this.w.config.chart.type===`bar`&&i===1,s=o?`top`:`both`,c=o?`top`:`bottom`;for(let t of this.getStackedSeriesIndices(r))for(let n=0;n<i;n++){let r=[],i=[];for(let a of t){let t=e[a][n];t>0?r.push(a):t<0&&i.push(a)}if(r.length>0&&i.length===0)if(r.length===1)a[r[0]][n]=s;else{let e=r[0],t=r[r.length-1];for(let i of r)a[i][n]=i===e?c:i===t?`top`:`none`}else if(i.length>0&&r.length===0)if(i.length===1)a[i[0]][n]=`both`;else{let e=Math.max(...i),t=Math.min(...i);for(let r of i)a[r][n]=r===e?`bottom`:r===t?`top`:`none`}else if(r.length>0&&i.length>0){let e=r[r.length-1];for(let t of r)a[t][n]=t===e?`top`:`none`;let t=Math.max(...i);for(let e of i)a[e][n]=e===t?`bottom`:`none`}}return a}barBackground({j:e,i:t,x1:n,x2:r,y1:i,y2:a,elSeries:o}){let s=this.w,c=new Z(this.barCtx.w),l=new cg(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&l===t){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);let t=this.barCtx.barOptions.colors.backgroundBarColors[e],l=c.drawRect(n===void 0?0:n,i===void 0?0:i,r===void 0?s.layout.gridWidth:r,a===void 0?s.layout.gridHeight:a,this.barCtx.barOptions.colors.backgroundBarRadius,t,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(l),l.node.classList.add(`apexcharts-backgroundBar`)}}getColumnPaths({barWidth:e,barXPosition:t,y1:n,y2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){let f=new Z(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let p=e,m=t;d.config.series[c].data[u]?.columnWidthOffset&&(m=t-d.config.series[c].data[u].columnWidthOffset/2,p=e+d.config.series[c].data[u].columnWidthOffset);let h=i/2,g=m+h,_=m+p-h,v=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001-h*v,r+=.001+h*v;let y=f.line(_,n),b=d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`,x=f.move(g,n)+f.line(g,r)+f.line(_,r)+y+b,S=x;this.arrBorderRadius[c][u]!==`none`&&(S=f.roundPathCorners(S,d.config.plotOptions.bar.borderRadius));let C=null,w=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(c,u);if(w?C=w:d.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(c,u,S,x)),C??=f.move(g,n)+f.line(g,n)+y+y+y+y+y+f.line(g,n)+b,d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.yArrj.push(r-h*v),e.yArrjF.push(Math.abs(n-r+i*v)),e.yArrjVal.push(this.barCtx.series[l][u])}return{pathTo:S,pathFrom:C,drawnBox:{x1:g,x2:_,y1:n,y2:r}}}getFunnelTrapezoidPaths({barYPosition:e,barHeight:t,series:n,i:r,j:i,realIndex:a,strokeWidth:o,w:s}){let c=new Z(this.barCtx.w),l=s.layout.gridWidth/2,u=e=>Math.abs(e/this.barCtx.invertedYRatio)/2,d=u(n[r][i]),f=i===n[r].length-1,p=s.config.plotOptions.funnel.lastShape===`taper`?`taper`:`flat`,m;m=f?p===`taper`?0:d:u(n[r][i+1]);let h=o/2,g=e+h,_=e+t-h,v=l-d,y=l+d,b=l-m,x=l+m,S=c.move(v,g)+c.line(y,g)+c.line(x,_)+c.line(b,_)+` Z`,C=null,w=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(a,i);return w?C=w:s.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(a,i,S)),C??=c.move(l,g)+c.line(l,g)+c.line(l,_)+c.line(l,_)+` Z`,{pathTo:S,pathFrom:C,x:y,x1:v,barXPosition:l}}computePyramidLayout(e){let t=this.w,n=t.layout.gridHeight,r=t.layout.gridWidth,i=e.map(e=>Math.abs(Number(e)||0)),a=i.reduce((e,t)=>e+t,0);if(a===0||n<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));let o=r/2,s=0,c=[];for(let e=0;e<i.length;e++){let t=s/a;s+=i[e];let r=s/a,l=t*n,u=r*n;c.push({y:l,height:u-l,topHalf:t*o,bottomHalf:r*o})}return c}getPyramidPaths({barYPosition:e,barHeight:t,topHalf:n,bottomHalf:r,realIndex:i,j:a,strokeWidth:o,w:s}){let c=new Z(this.barCtx.w),l=s.layout.gridWidth/2,u=o/2,d=e+u,f=e+t-u,p=l-n,m=l+n,h=l-r,g=l+r,_=c.move(p,d)+c.line(m,d)+c.line(g,f)+c.line(h,f)+` Z`,v=null,y=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(i,a);return y?v=y:s.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(i,a,_)),v??=c.move(l,d)+c.line(l,d)+c.line(l,f)+c.line(l,f)+` Z`,{pathTo:_,pathFrom:v,x:m,x1:p,barXPosition:l}}getBarpaths({barYPosition:e,barHeight:t,x1:n,x2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){let f=new Z(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let p=e,m=t;d.config.series[c].data[u]?.barHeightOffset&&(p=e-d.config.series[c].data[u].barHeightOffset/2,m=t+d.config.series[c].data[u].barHeightOffset);let h=i/2,g=p+h,_=p+m-h,v=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001+h*v,r+=.001-h*v;let y=this.barCtx.isFunnel,b=y?(n+r)/2:n,x=f.line(n,_),S=d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`,C=f.move(n,g)+f.line(r,g)+f.line(r,_)+x+S,w=C;this.arrBorderRadius[c][u]!==`none`&&(w=f.roundPathCorners(w,d.config.plotOptions.bar.borderRadius));let T=null,E=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(c,u);if(E?T=E:d.globals.previousPaths.length>0&&(T=this.barCtx.getPreviousPath(c,u,w,C)),T==null){let e=y?f.line(b,_):x;T=f.move(b,g)+f.line(b,g)+e+e+e+e+e+f.line(b,g)+S}if(d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.xArrj.push(r+h*v),e.xArrjF.push(Math.abs(n-r-i*v)),e.xArrjVal.push(this.barCtx.series[l][u])}return{pathTo:w,pathFrom:T,drawnBox:{x1:n,x2:r,y1:g,y2:_}}}getXForValue(e,t,n=!0){let r=n?t:null;return e!=null&&(r=t+e/this.barCtx.invertedYRatio-(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)*2),r}getYForValue(e,t,n,r=!0){let i=r?t:null;return e!=null&&(i=t-e/this.barCtx.yRatio[n]+(this.barCtx.isReversed?e/this.barCtx.yRatio[n]:0)*2),i}getGoalValues(e,t,n,r,i,a){let o=this.w,s=[],c=(r,i)=>{s.push({[e]:e===`x`?this.getXForValue(r,t,!1):this.getYForValue(r,n,a,!1),attrs:i})};if(o.seriesData.seriesGoals[r]&&o.seriesData.seriesGoals[r][i]&&Array.isArray(o.seriesData.seriesGoals[r][i])&&o.seriesData.seriesGoals[r][i].forEach(e=>{c(e.value,e)}),this.barCtx.barOptions.isDumbbell){let t=this.getDumbbellEnds(r,i);if(t.length){let n={strokeHeight:e===`x`?0:o.globals.markers.size[r],strokeWidth:e===`x`?o.globals.markers.size[r]:0,strokeDashArray:0,strokeLineCap:`round`},a=0,s=0;for(let e=1;e<t.length;e++)t[e].value<t[a].value&&(a=e),t[e].value>t[s].value&&(s=e);let l=o.config.plotOptions.bar.dumbbell.dataLabels;t.forEach((e,t)=>{let o=X(Y({},n),{strokeColor:e.color});l.enabled&&(t===a||t===s)&&(o.label={text:this.getDumbbellLabelText(e.value,r,i,e.index),color:l.colorFromMarker?e.color:Array.isArray(l.style.colors)?l.style.colors[e.index]||l.style.colors[0]:l.style.colors,outward:t===a&&a!==s?-1:1}),c(e.value,o)})}}return s}getDumbbellEnds(e,t){let n=this.w,r=[],i=n.dumbbellData;if(i&&i.form===`series`){let e=i.values[t]||[];for(let t=0;t<e.length;t++){let a=e[t];a===null||i.hidden.indexOf(t)!==-1||r.push({value:a,color:n.globals.colors[t],index:t})}return r}if(!n.rangeData.seriesRange.length)return r;let a=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:n.globals.colors,o=t=>Array.isArray(a[e])?a[e][t]:a[e];return[{value:n.rangeData.seriesRangeStart[e][t],color:o(0),index:0},{value:n.rangeData.seriesRangeEnd[e][t],color:o(1),index:1}]}getDumbbellLabelText(e,t,n,r){let i=this.w,a=i.config.plotOptions.bar.dumbbell.dataLabels;if(typeof a.formatter==`function`)return a.formatter(e,{seriesIndex:t,dataPointIndex:n,endpointIndex:r,w:i});let o=this.barCtx.isHorizontal?i.formatters.xLabelFormatter:i.formatters.yLabelFormatters[0];return typeof o==`function`?o(e,n,i):String(e)}drawGoalLine({barXPosition:e,barYPosition:t,goalX:n,goalY:r,barWidth:i,barHeight:a}){if(!(Array.isArray(n)&&n.length>0||Array.isArray(r)&&r.length>0))return null;let o=new Z(this.barCtx.w),s=o.group({class:`apexcharts-bar-goals-groups`});s.node.classList.add(`apexcharts-element-hidden`),this.barCtx.w.globals.delayedElements.push({el:s.node}),s.attr(`clip-path`,`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let c=null;return this.barCtx.isHorizontal?Array.isArray(n)&&n.forEach(e=>{if(e.x>=-1&&e.x<=o.w.layout.gridWidth+1){let n=e.attrs.strokeHeight===void 0?a/2:e.attrs.strokeHeight,r=t+n+a/2;c=o.drawLine(e.x,r-n*2,e.x,r,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeWidth?e.attrs.strokeWidth:2,e.attrs.strokeLineCap),s.add(c),e.attrs.label&&s.add(this.drawDumbbellLabel(e.attrs,{x:e.x,y:r-n,horizontal:!0,markerSize:e.attrs.strokeWidth||0}))}}):Array.isArray(r)&&r.forEach(t=>{if(t.y>=-1&&t.y<=o.w.layout.gridHeight+1){let n=t.attrs.strokeWidth===void 0?i/2:t.attrs.strokeWidth,r=e+n+i/2;c=o.drawLine(r-n*2,t.y,r,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),s.add(c),t.attrs.label&&s.add(this.drawDumbbellLabel(t.attrs,{x:r-n,y:t.y,horizontal:!1,markerSize:t.attrs.strokeHeight||0}))}}),s}drawDumbbellLabel(e,t){let n=this.w,r=new Z(n),i=n.config.plotOptions.bar.dumbbell.dataLabels,a=t.markerSize/2+i.offset,o=e.label.outward;return r.drawText({x:t.x+(t.horizontal?a*o:0),y:t.y-(t.horizontal?0:a*o),text:e.label.text,textAnchor:t.horizontal?o<0?`end`:`start`:`middle`,dominantBaseline:t.horizontal?`central`:o<0?`hanging`:`auto`,foreColor:e.label.color,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,cssClass:`apexcharts-dumbbell-label`})}drawBarShadow({prevPaths:e,currPaths:t,color:n,realIndex:r,j:i}){let a=this.w,{x:o,x1:s,barYPosition:c}=e,{x:l,x1:u,barYPosition:d}=t,f=c+t.barHeight,p=new Z(this.barCtx.w),m=new $,h=p.move(s,f)+p.line(o,f)+p.line(l,d)+p.line(u,d)+p.line(s,f)+(a.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[r][i]===`both`?` Z`:` z`);return p.drawPath({d:h,fill:m.shadeColor(.5,$.rgb2hex(n)),stroke:`none`,strokeWidth:0,fillOpacity:1,classes:`apexcharts-bar-shadow apexcharts-decoration-element`})}getZeroValueEncounters({i:e,j:t}){let n=this.w,r=0,i=0;return(n.config.plotOptions.bar.horizontal?n.seriesData.series.map((e,t)=>t):n.globals.columnSeries?.i.map(e=>e)||[]).forEach(a=>{let o=n.globals.seriesPercent[a][t];o&&r++,a<e&&o===0&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getSeriesGroupIndex(e){let t=this.w;return t.labelData.seriesGroups.findIndex(n=>n.indexOf(t.seriesData.seriesNames[e])>-1)}getGroupIndex(e){let t=this.w,n=t.labelData.seriesGroups.findIndex(n=>n.indexOf(t.seriesData.seriesNames[e])>-1),r=this.barCtx.columnGroupIndices,i=r.indexOf(n);return i<0&&(r.push(n),i=r.length-1),{groupIndex:n,columnGroupIndex:i}}},Eb=class e{constructor(e,t,n){this.ctx=t,this.w=e,this.barOptions=e.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=e.config.stroke.width,this.isNullValue=!1,this.isRangeBar=e.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.rangeData.seriesRange.length&&e.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=n,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,this.xyRatios!==null&&(this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;let r=new cg(this.w);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex(`desc`,[`bar`,`column`]),this.lastActiveBarSerieIndexByGroup=r.getActiveConfigSeriesIndexByGroup([`bar`,`column`]),this.columnGroupIndices=[];let i=r.getBarSeriesIndices();this.stackedSeriesTotals=new Xh(this.w).getStackedSeriesTotals(this.w.config.series.map((e,t)=>i.indexOf(t)===-1?t:-1).filter(e=>e!==-1)),this.barHelpers=new Tb(this)}draw(e,t){let n=this.w,r=new Z(this.w),i=new Xh(this.w);e=i.getLogSeries(e),this.series=e,this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let a=r.group({class:`apexcharts-bar-series apexcharts-plot-series`});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn(`WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts`);for(let i=0,o=0;i<e.length;i++,o++){let s,c,l=[],u=[],d=n.globals.comboCharts?t[i]:i,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=r.group({class:`apexcharts-series`,rel:i+1,seriesName:$.escapeString(n.seriesData.seriesNames[d]),"data:realIndex":d});cg.addCollapsedClassToSeries(this.w,p,d),e[i].length>0&&(this.visibleI+=1),this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[d],this.translationsIndex=d);let m=this.translationsIndex;this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(e[i]));let h=this.barHelpers.initialPositions(d),{y:g,yDivision:_,zeroW:v,x:y,xDivision:b,zeroH:x}=h,S=h.barHeight,C=h.barWidth;c=g,s=y,this.isHorizontal||u.push(s+(C??0)/2);let w=r.group({class:`apexcharts-datalabels`,"data:realIndex":d});n.globals.delayedElements.push({el:w.node,holdUntilComplete:!n.config.dataLabels.animate?.enabled&&this.isLengthTransition(d)}),w.node.classList.add(`apexcharts-element-hidden`);let T=r.group({class:`apexcharts-bar-goals-markers`}),E=r.group({class:`apexcharts-bar-shadows`});n.globals.delayedElements.push({el:E.node}),E.node.classList.add(`apexcharts-element-hidden`);for(let t=0;t<e[i].length;t++){let r=this.barHelpers.getStrokeWidth(i,t,d),a=null,h={indexes:{i,j:t,realIndex:d,translationsIndex:m,bc:o},x:s,y:c,strokeWidth:r,elSeries:p};this.isHorizontal?(a=this.drawBarPaths(X(Y({},h),{barHeight:S,zeroW:v,yDivision:_})),C=this.series[i][t]/this.invertedYRatio):(a=this.drawColumnPaths(X(Y({},h),{xDivision:b,barWidth:C,zeroH:x})),S=this.series[i][t]/this.yRatio[m]);let g=this.barHelpers.getPathFillColor(e,i,t,d);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&n.config.plotOptions.funnel?.shape!==`trapezoid`&&this.pathArr.length&&t>0){let e=this.barHelpers.drawBarShadow({color:typeof g.color==`string`&&g.color?.indexOf(`url`)===-1?g.color:$.hexToRgba(n.globals.colors[i]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:a,realIndex:d,j:t});E.add(e),n.config.chart.dropShadow.enabled&&new ng(this.w).dropShadow(e,n.config.chart.dropShadow,d)}this.pathArr.push(a);let y=this.barHelpers.drawGoalLine({barXPosition:a.barXPosition,barYPosition:a.barYPosition,goalX:a.goalX,goalY:a.goalY,barHeight:S,barWidth:C});y&&T.add(y),c=a.y,s=a.x,t>0&&u.push(s+(C??0)/2),l.push(c),this.renderSeries(X(Y({realIndex:d,pathFill:g.color},g.useRangeColor?{lineFill:g.color}:{}),{j:t,i,columnGroupIndex:f,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:r,elSeries:p,x:s,y:c,series:e,barHeight:Math.abs(a.barHeight?a.barHeight:S),barWidth:Math.abs(a.barWidth?a.barWidth:C),elDataLabelsWrap:w,elGoalsMarkers:T,elBarShadows:E,visibleSeries:this.visibleI,type:`bar`}))}if(n.globals.seriesXvalues[d]=u,n.globals.seriesYvalues[d]=l,n.globals.previousPaths.length>0){let t=[];for(let r=0;r<e[i].length;r++)t.push(fb(n,d,r));Sb({w:n,elSeries:p,record:this._prevRecord(d),newKeys:t,isHorizontal:this.isHorizontal,speed:n.config.chart.animations.dynamicAnimation.speed})}a.add(p)}return a}renderSeries({realIndex:e,pathFill:t,lineFill:n,j:r,i,columnGroupIndex:a,pathFrom:o,pathTo:s,strokeWidth:c,elSeries:l,x:u,y:d,y1:f,y2:p,series:m,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,elDataLabelsWrap:y,elGoalsMarkers:b,elBarShadows:x,visibleSeries:S,type:C,classes:w}){var T,E;let D=this.w,O=new Z(this.w,this.ctx),k=Jv(this.ctx,O),A=!1,j=this._pathToInterp;if(this._pathToInterp=null,l._bindingsDelegated||(l._bindingsDelegated=!0,O.setupEventDelegation(l,`.apexcharts-${C}-area`)),!n){let t=typeof D.globals.stroke.colors[e]==`function`?function(e){let t=D.config.stroke.colors,n;return Array.isArray(t)&&t.length>0&&(n=t[e],n||=``,typeof n==`function`)?n({value:D.seriesData.series[e][r],dataPointIndex:r,w:D}):n}(e):D.globals.stroke.colors[e];n=this.barOptions.distributed?D.globals.stroke.colors[r]:t}let ee=D.config.chart.animations,te=ee.animateGradually,ne=te&&te.enabled!==!1&&!(D.globals.dataChanged&&this.isLayoutShift(e)),M=0,re=0;if(ne){let e=D.globals.dataPoints||1,t=te.delay||0,n=Math.min(t,ee.speed*.5/Math.max(1,e));re=Vh({style:`sequential`,index:r,baseDelay:n}),D.config.chart.stacked&&!D.globals.dataChanged&&(re+=i*n*.5),M=re/(t||1)}let ie=new Cb(this).handleBarDataLabels({x:u,y:d,y1:f,y2:p,i,j:r,series:m,realIndex:e,columnGroupIndex:a,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,visibleSeries:S});if(re>0){let e=D.config.dataLabels;if(e.animate?.enabled||e.countUp?.enabled){let e=String(Math.round(re));(T=ie.dataLabels?.node)==null||T.setAttribute(`data:dlDelay`,e),(E=ie.totalDataLabels?.node)==null||E.setAttribute(`data:dlDelay`,e)}}if(D.globals.isBarHorizontal||(ie.dataLabelsPos.dataLabelsX+Math.max(g,D.globals.barPadForNumericAxis)<0||ie.dataLabelsPos.dataLabelsX-Math.max(g,D.globals.barPadForNumericAxis)>D.layout.gridWidth)&&(A=!0),D.config.series[i].data[r]&&D.config.series[i].data[r].strokeColor&&(n=D.config.series[i].data[r].strokeColor),this.isNullValue&&D.globals.collapsingSeriesIndices.indexOf(e)===-1&&(t=`none`),!A){let a=this.ctx.morphTypeChange?.isActive()===!0,u=a?this.ctx.morphTypeChange.getSpeed():D.config.chart.animations.dynamicAnimation.speed,d=a&&this.ctx.morphTypeChange.claimsTargetMark(e,r);d&&(o=s,M=0);let m=k.renderPaths({i,j:r,realIndex:e,pathFrom:o,pathTo:s,stroke:n,strokeWidth:c,strokeLineCap:D.config.stroke.lineCap,fill:t,pathToInterp:j,animationDelay:M,initialSpeed:D.config.chart.animations.speed,dataChangeSpeed:u,className:`apexcharts-${C}-area${w?` ${w}`:``}`,chartType:C,bindEventsOnPaths:!1});m.attr(`clip-path`,`url(#gridRectBarMask${D.globals.cuid})`),d&&(m.node.setAttribute(`opacity`,`0`),m.node.setAttribute(`data-piece-hidden`,`1`));let _=D.config.forecastDataPoints;_.count>0&&r>=D.globals.dataPoints-_.count&&(m.node.setAttribute(`stroke-dasharray`,_.dashArray),m.node.setAttribute(`stroke-width`,_.strokeWidth),m.node.setAttribute(`fill-opacity`,_.fillOpacity)),f!==void 0&&p!==void 0&&(m.attr(`data-range-y1`,f),m.attr(`data-range-y2`,p)),new ng(this.w).setSelectionFilter(m,e,r),l.add(m),m.attr({cy:ie.dataLabelsPos.bcy,cx:ie.dataLabelsPos.bcx,j:r,val:D.seriesData.series[i][r],barHeight:h,barWidth:g,"data:pathKey":fb(D,e,r)}),k.kind===`canvas`&&(D.globals.barCanvasCoords||(D.globals.barCanvasCoords={}),D.globals.barCanvasCoords[e]||(D.globals.barCanvasCoords[e]={}),D.globals.barCanvasCoords[e][r]={cx:ie.dataLabelsPos.bcx,cy:ie.dataLabelsPos.bcy,barWidth:g}),ie.dataLabels!==null&&y.add(ie.dataLabels),ie.totalDataLabels&&y.add(ie.totalDataLabels),l.add(y),b&&l.add(b),x&&l.add(x)}return l}drawBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,yDivision:o,elSeries:s}){let c=this.w,l=e.i,u=e.j,d;if(c.axisFlags.isXNumeric)a=(c.seriesData.seriesX[l][u]-c.globals.minX)/this.invertedXRatio-t,d=a+t*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:l,j:u});e>0&&(t=this.seriesLen*t/e),d=a+t*this.visibleI,d-=t*n}else d=a+t*this.visibleI;let f=this.isFunnel&&c.config.plotOptions.funnel.shape===`trapezoid`,p=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[u]:null,m=!!p;if(p)d=p.y,t=p.height;else if(this.isFunnel&&!f){let e=r??0;r=e-(this.barHelpers.getXForValue(this.series[l][u],e)-e)/2}i=this.barHelpers.getXForValue(this.series[l][u],r??0);let h;return h=p?this.barHelpers.getPyramidPaths({barYPosition:d,barHeight:t,topHalf:p.topHalf,bottomHalf:p.bottomHalf,realIndex:e.realIndex,j:u,strokeWidth:n,w:c}):f?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:d,barHeight:t,series:this.series,i:l,j:u,realIndex:e.realIndex,strokeWidth:n,w:c}):this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:r,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,i:l,j:u,w:c}),(f||m)&&(r=h.x1,i=h.x),!c.axisFlags.isXNumeric&&!m&&(a+=o),m&&(a=d),this.barHelpers.barBackground({j:u,i:l,y1:d-t*this.visibleI,y2:t*this.seriesLen,elSeries:s}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x1:r,x:i,y:a,goalX:this.barHelpers.getGoalValues(`x`,r,null,e.realIndex,u,0),barYPosition:d,barHeight:t}}drawColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,strokeWidth:o,elSeries:s}){let c=this.w,l=e.realIndex,u=e.translationsIndex,d=e.i,f=e.j,p=e.bc,m;if(c.axisFlags.isXNumeric){let e=this.getBarXForNumericXAxis({x:t,j:f,realIndex:l,barWidth:i});t=e.x,m=e.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:d,j:f});e>0&&(i=this.seriesLen*i/e),m=t+i*this.visibleI,m-=i*n}else m=t+i*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][f],a,u);let h=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:i,y1:a,y2:n,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:l,i:d,j:f,w:c});return c.axisFlags.isXNumeric||(t+=r),this.barHelpers.barBackground({bc:p,j:f,i:d,x1:m-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:s}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x:t,y:n,goalY:this.barHelpers.getGoalValues(`y`,null,a,l,f,u),barXPosition:m,barWidth:i}}getBarXForNumericXAxis({x:e,barWidth:t,realIndex:n,j:r}){let i=this.w,a=n;return i.seriesData.seriesX[n].length||(a=i.globals.maxValsInArrayIndex),$.isNumber(i.seriesData.seriesX[a][r])&&(e=H_.dataXToPx(i,i.seriesData.seriesX[a][r])-t*this.seriesLen/2),{barXPosition:e+(wb(i)?0:t*this.visibleI),x:e}}_prevRecord(e){let t=this.w,n=null;for(let r=0;r<t.globals.previousPaths.length;r++){let i=t.globals.previousPaths[r];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(e),10)&&(n=i)}return n}_prevKeyedPaths(e){if(this._prevKeyed||={},this._prevKeyed[e]!==void 0)return this._prevKeyed[e];let t=this._prevRecord(e),n=null;if(t&&t.paths.every(e=>e.key!=null)){let e=new Map;t.paths.forEach(t=>{e.set(t.key,t)}),n=e}return this._prevKeyed[e]=n,n}isLengthTransition(e){if(this._ltCache||={},this._ltCache[e]!==void 0)return this._ltCache[e];let t=this.w,n=!1;if(db(t)&&t.globals.previousPaths.length>0){let r=this._prevRecord(e),i=t.seriesData.series[e]?.length??0;if(!r)n=i>0;else if(r.paths.length!==i)n=!0;else{let r=this._prevKeyedPaths(e);if(r){for(let a=0;a<i;a++)if(!r.has(fb(t,e,a))){n=!0;break}}}}return this._ltCache[e]=n,n}isLayoutShift(e){if(this.isLengthTransition(e))return!0;if(this._layoutShiftCache||={},this._layoutShiftCache[e]!==void 0)return this._layoutShiftCache[e];let t=gb(this.w,e,!0,!0),n=!!(t&&t.join.changed);return this._layoutShiftCache[e]=n,n}getPreviousPath(t,n,r,i){let a=this.w;this._pathToInterp=null;let o=this._prevRecord(t);if(!o)return db(a)?null:r;let s=null,c=!1,l=this._prevKeyedPaths(t);if(l){let e=l.get(fb(a,t,n));e?s=e.d:c=!0}else o.paths[n]===void 0?c=!0:s=o.paths[n].d;if(s){let t=e.pathCommandCount(s),n=e.pathCommandCount(r);if(t===n)return s;let o=new Z(a),c=t=>{let n=e.pathBox(t);return n?Math.min(n.maxX-n.minX,n.maxY-n.minY):0},l=t<n?c(s)>1:c(r)>1;if(t<n){let t=o.roundPathCorners(s,0);if(e.pathCommandCount(t)===n){if(l&&i){let t=o.roundPathCorners(i,0);e.pathCommandCount(t)===n&&(this._pathToInterp=t)}return t}}else{let n=o.roundPathCorners(r,0);if(e.pathCommandCount(n)===t){if(this._pathToInterp=n,l){let n=e.squareLike(s),r=n?o.roundPathCorners(n,0):null;if(r&&e.pathCommandCount(r)===t)return r}return s}}}return c&&db(a)?null:r}static pathBox(e){if(!e)return null;let t=[],n=/([MLC])([^MLCZz]*)/g,r;for(;(r=n.exec(e))!==null;){let e=r[2].trim().split(/[\s,]+/).map(Number);e.length<2||e.some(isNaN)||t.push([e[e.length-2],e[e.length-1]])}if(t.length<3)return null;let i=t.map(e=>e[0]),a=t.map(e=>e[1]);return{minX:Math.min(...i),maxX:Math.max(...i),minY:Math.min(...a),maxY:Math.max(...a),start:t[0],vertical:Math.abs(t[1][0]-t[0][0])<Math.abs(t[1][1]-t[0][1])}}static squareLike(t){let n=e.pathBox(t);if(!n)return null;let{minX:r,maxX:i,minY:a,maxY:o,start:s,vertical:c}=n,l=(e,t,n)=>Math.abs(e-t)<=Math.abs(e-n)?[t,n]:[n,t],u,d,f,p;c?(u=Math.abs(s[0]-r)<=Math.abs(s[0]-i)?r:i,d=u===r?i:r,[f,p]=l(s[1],a,o)):(f=Math.abs(s[1]-a)<=Math.abs(s[1]-o)?a:o,p=f===a?o:a,[u,d]=l(s[0],r,i));let m=t.trim().endsWith(`Z`)?` Z`:` z`;return c?`M ${u} ${f} L ${u} ${p} L ${d} ${p} L ${d} ${f}${m}`:`M ${u} ${f} L ${d} ${f} L ${d} ${p} L ${u} ${p}${m}`}getPreviousFlip(e,t){let n=this.w,r=this._prevRecord(e);if(!r)return null;let i=this._prevKeyedPaths(e),a=i?i.get(fb(n,e,t)):r.paths[t];return a?!!a.flip:null}static pathCommandCount(e){if(!e)return 0;let t=e.match(/[A-Za-z]/g);return t?t.length:0}},Db=class extends Eb{draw(e,t){let n=this.w;this.graphics=new Z(this.w),this.bar=new Eb(this.w,this.ctx,this.xyRatios);let r=new Xh(this.w);e=r.getLogSeries(e),this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e),n.config.chart.stackType===`100%`&&(e=n.globals.comboCharts?t.map(e=>n.globals.seriesPercent[e]):n.globals.seriesPercent.slice()),this.series=e,this.barHelpers.initializeStackedPrevVars(this);let i=this.graphics.group({class:`apexcharts-bar-series apexcharts-plot-series`}),a=0,o=0,s=n.config.chart.animations,c=s.enabled&&s.dynamicAnimation.enabled&&n.globals.previousPaths.length>0,l=!1;for(let r=0,s=0;r<e.length;r++,s++){let u=n.globals.comboCharts?t[r]:r,{groupIndex:d,columnGroupIndex:f}=this.barHelpers.getGroupIndex(u);this.groupCtx=this[n.labelData.seriesGroups[d]];let p=[],m=[],h=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[u][0],h=u),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;let g=this.graphics.group({class:`apexcharts-series`,seriesName:$.escapeString(n.seriesData.seriesNames[u]),rel:r+1,"data:realIndex":u});cg.addCollapsedClassToSeries(this.w,g,u);let _=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":u});cg.addCollapsedClassToSeries(this.w,_,u),(n.globals.collapsingSeriesIndices||[]).indexOf(u)>-1&&_.node.style.setProperty(`--apexcharts-dl-exit`,`${n.config.chart.animations.dynamicAnimation.speed}ms`);let v=this.graphics.group({class:`apexcharts-bar-goals-markers`}),y=this.initialPositions(a,o,void 0,void 0,void 0,void 0,h),{xDivision:b,yDivision:x,zeroH:S,zeroW:C}=y,w=y.barHeight,T=y.barWidth;o=y.y,a=y.x,n.globals.barHeight=w,n.globals.barWidth=T,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(e=>isNaN(e))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>S),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let t=0;t<n.globals.dataPoints;t++){let i=this.barHelpers.getStrokeWidth(r,t,u),y={indexes:{i:r,j:t,realIndex:u,translationsIndex:h,bc:s},strokeWidth:i,x:a,y:o,elSeries:g,columnGroupIndex:f,seriesGroup:n.labelData.seriesGroups[d]},E=null;this.isHorizontal?(E=this.drawStackedBarPaths(X(Y({},y),{zeroW:C,barHeight:w,yDivision:x})),T=this.series[r][t]/this.invertedYRatio):(E=this.drawStackedColumnPaths(X(Y({},y),{xDivision:b,barWidth:T,zeroH:S})),w=this.series[r][t]/this.yRatio[h]);let D=this.barHelpers.drawGoalLine({barXPosition:E.barXPosition,barYPosition:E.barYPosition,goalX:E.goalX,goalY:E.goalY,barHeight:w,barWidth:T});D&&v.add(D),o=E.y,a=E.x,p.push(a),m.push(o);let O=this.barHelpers.getPathFillColor(e,r,t,u),k=``,A=n.globals.isBarHorizontal?`apexcharts-flip-x`:`apexcharts-flip-y`,j=this.barHelpers.arrBorderRadius[u][t]===`bottom`&&n.seriesData.series[u][t]>0||this.barHelpers.arrBorderRadius[u][t]===`top`&&n.seriesData.series[u][t]<0,ee=c&&!j&&this.getPreviousFlip(u,t);(j||ee)&&(k=A),ee&&(k+=` apexcharts-flip-held`,l=!0),g=this.renderSeries(X(Y({realIndex:u,pathFill:O.color},O.useRangeColor?{lineFill:O.color}:{}),{j:t,i:r,columnGroupIndex:f,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:i,elSeries:g,x:a,y:o,series:e,barHeight:w,barWidth:T,elDataLabelsWrap:_,elGoalsMarkers:v,type:`bar`,visibleSeries:f,classes:k}))}n.globals.seriesXvalues[u]=p,n.globals.seriesYvalues[u]=m,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),i.add(g)}return l&&this.settleHeldMirrors(),i}settleHeldMirrors(){let e=this.w;if(!d_.isBrowser())return;let t=e.config.chart.animations,n=(t.dynamicAnimation.speed||0)+(t.speed||0)+100;setTimeout(()=>{e.globals.isDestroyed||!$.elementExists(e.dom.baseEl)||e.dom.baseEl.querySelectorAll(`.apexcharts-flip-held`).forEach(e=>{e.classList.remove(`apexcharts-flip-held`,`apexcharts-flip-y`,`apexcharts-flip-x`)})},n)}initialPositions(e,t,n,r,i,a,o){let s=this.w,c,l;if(this.isHorizontal){r=s.layout.gridHeight/s.globals.dataPoints;let e=s.config.plotOptions.bar.barHeight;c=String(e).indexOf(`%`)===-1?parseInt(e,10):r*parseInt(e,10)/100,a=s.globals.padHorizontal+(this.isReversed?s.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),t=(r-c)/2}else{n=s.layout.gridWidth/s.globals.dataPoints,l=n;let t=s.config.plotOptions.bar.columnWidth,r=s.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;r>0?(n=r/this.xRatio,l=n*parseInt(this.barOptions.columnWidth,10)/100):l*=parseInt(t,10)/100,String(t).indexOf(`%`)===-1&&(l=parseInt(t,10)),i=this.isReversed?this.baseLineY[o]:s.layout.gridHeight-this.baseLineY[o],e=s.globals.padHorizontal+(n-l)/2}let u=s.globals.barGroups.length||1;return{x:e,y:t,yDivision:r,xDivision:n,barHeight:(c??0)/u,barWidth:(l??0)/u,zeroH:i,zeroW:a}}drawStackedBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,columnGroupIndex:o,seriesGroup:s,yDivision:c,elSeries:l}){let u=this.w,d=a+o*t,f,p=e.i,m=e.j,h=e.realIndex,g=e.translationsIndex,_=0;for(let e=0;e<this.groupCtx.prevXF.length;e++)_+=this.groupCtx.prevXF[e][m];let v=this.groupCtx.prevX.length;if(v>0){let e=r;this.groupCtx.prevXVal[v-1][m]<0?e=this.series[p]?.[m]>=0?this.groupCtx.prevX[v-1][m]+_-(this.isReversed?_:0)*2:this.groupCtx.prevX[v-1][m]:this.groupCtx.prevXVal[v-1][m]>=0&&(e=this.series[p]?.[m]>=0?this.groupCtx.prevX[v-1][m]:this.groupCtx.prevX[v-1][m]-_+(this.isReversed?_:0)*2),f=e}else f=r;i=this.series[p]?.[m]===null?f:f+this.series[p]?.[m]/this.invertedYRatio-(this.isReversed?this.series[p]?.[m]/this.invertedYRatio:0)*2;let y=this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:f,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,seriesGroup:s,i:p,j:m,w:u});return this.barHelpers.barBackground({j:m,i:p,y1:d,y2:t,elSeries:l}),a+=c,{pathTo:y.pathTo,pathFrom:y.pathFrom,goalX:this.barHelpers.getGoalValues(`x`,r,null,h,m,g),barXPosition:f,barYPosition:d,x:i,y:a}}drawStackedColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,columnGroupIndex:o,seriesGroup:s,elSeries:c}){let l=this.w,u=e.i,d=e.j,f=e.bc,p=e.realIndex,m=e.translationsIndex;if(l.axisFlags.isXNumeric){let e=l.seriesData.seriesX[p][d];e||=0,t=(e-l.globals.minX)/this.xRatio-i/2*l.globals.barGroups.length}let h=t+o*i,g,_=0;for(let e=0;e<this.groupCtx.prevYF.length;e++)_+=isNaN(this.groupCtx.prevYF[e][d])?0:this.groupCtx.prevYF[e][d];let v=this.groupCtx.prevY.length;if(v>0&&!l.axisFlags.isXNumeric||v>0&&l.axisFlags.isXNumeric&&l.seriesData.seriesX[p-1][d]===l.seriesData.seriesX[p][d]){let e,t,n=Math.min(this.yRatio.length+1,p+1);if(this.groupCtx.prevY[v-1]!==void 0&&this.groupCtx.prevY[v-1].length){for(let e=1;e<n;e++)if(!isNaN(this.groupCtx.prevY[v-e]?.[d])){t=this.groupCtx.prevY[v-e][d];break}}for(let r=1;r<n;r++)if(this.groupCtx.prevYVal[v-r]?.[d]<0){e=this.series[u]?.[d]>=0?t-_+(this.isReversed?_:0)*2:t;break}else if(this.groupCtx.prevYVal[v-r]?.[d]>=0){e=this.series[u]?.[d]>=0?t:t+_-(this.isReversed?_:0)*2;break}e===void 0&&(e=l.layout.gridHeight),g=this.groupCtx.prevYF[0]?.every(e=>e===0)&&this.groupCtx.prevYF.slice(1,v).every(e=>e.every(e=>isNaN(e)))?a:e}else g=a;n=this.series[u]?.[d]?g-this.series[u]?.[d]/this.yRatio[m]+(this.isReversed?this.series[u]?.[d]/this.yRatio[m]:0)*2:g;let y=this.barHelpers.getColumnPaths({barXPosition:h,barWidth:i,y1:g,y2:n,yRatio:this.yRatio[m],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:s,realIndex:e.realIndex,i:u,j:d,w:l});return this.barHelpers.barBackground({bc:f,j:d,i:u,x1:h,x2:i,elSeries:c}),{pathTo:y.pathTo,pathFrom:y.pathFrom,goalY:this.barHelpers.getGoalValues(`y`,null,a,p,d,0),barXPosition:h,x:l.axisFlags.isXNumeric?t:t+r,y:n}}};function Ob({w:e,points:t,seedA:n,seedB:r,center:i,halfExtent:a,alongFn:o,isHorizontal:s,options:c,clampAt:l,sideSign:u}){let d=c;if(!d||d.show===!1||!t||!t.length)return[];let f=d.maxPoints||3e3,p=t.length>f?Math.ceil(t.length/f):1,m=d.size==null?2.5:d.size,h=a*(d.jitter==null?.5:d.jitter),g=d.constrainToViolin!==!1&&typeof l==`function`,_=d.shape===`square`,v=d.colorScale,y=v&&Array.isArray(v.colors)&&v.colors.length>0,b=y?Math.max(2,v.steps||24):1,x=y&&v.min!=null?v.min:e.globals.minY,S=(y&&v.max!=null?v.max:e.globals.maxY)-x||1,C=y?Array(b).fill(``):[``];for(let e=0;e<t.length;e+=p){let a=t[e],c=o(a),d=(Mb(n*7919+r*100003+e)-.5)*2*h;if(g){let e=l(a);d>e&&(d=e),d<-e&&(d=-e)}u&&(d=Math.abs(d)*u);let f=s?c:i+d,p=s?i+d:c,v=_?Pb(f,p,m):Nb(f,p,m);if(y){let e=(a-x)/S;e<0&&(e=0),e>1&&(e=1),C[Math.round(e*(b-1))]+=v}else C[0]+=v}if(!y)return C[0]?[{fill:null,d:C[0]}]:[];let w=[];for(let e=0;e<b;e++)C[e]&&w.push({fill:jb(v.colors,e/(b-1)),d:C[e]});return w}function kb({graphics:e,w:t,elSeries:n,pointsByCat:r,options:i,distributed:a,realIndex:o,wrapClass:s,pointClass:c}){if(!i||i.show===!1||!r.length)return;let l=i.opacity==null?.9:i.opacity,u=i.strokeColor==null?`#fff`:i.strokeColor,d=i.strokeWidth==null?1:i.strokeWidth,f=t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged,p=e.group({class:f?`${s} apexcharts-element-hidden`:s});f&&t.globals.delayedElements.push({el:p.node}),r.forEach(({groups:n,j:r})=>{let s=a?t.globals.colors[r]:t.globals.colors[o],f=i.fillColor,m=f===`series`?s:f===`series-dark`?Ab(s,.45):f||Ab(s,.45);n.forEach(n=>{let i=e.drawPath({d:n.d,fill:n.fill==null?m:n.fill,stroke:d>0?u:`none`,strokeWidth:d,fillOpacity:l,classes:c});i.attr(`data:realIndex`,o),i.attr(`j`,r),i.attr(`clip-path`,`url(#gridRectBarMask${t.globals.cuid})`),i.node.style.pointerEvents=`none`,p.add(i)})}),n.add(p)}function Ab(e,t){let n=$.parseHex(e);if(!n)return e;let r=Math.max(0,1-t);return`rgb(${Math.round(n[0]*r)},${Math.round(n[1]*r)},${Math.round(n[2]*r)})`}function jb(e,t){if(!e.length)return`#000`;if(e.length===1)return e[0];let n=Math.max(0,Math.min(1,t))*(e.length-1),r=Math.floor(n),i=n-r,a=$.parseHex(e[r])||[0,0,0],o=$.parseHex(e[Math.min(r+1,e.length-1)])||a,s=(e,t)=>Math.round(e+(t-e)*i);return`rgb(${s(a[0],o[0])},${s(a[1],o[1])},${s(a[2],o[2])})`}function Mb(e){let t=(e^2654435769)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}function Nb(e,t,n){return`M ${e-n} ${t} a ${n} ${n} 0 1 0 ${2*n} 0 a ${n} ${n} 0 1 0 ${-2*n} 0 `}function Pb(e,t,n){return`M ${e-n} ${t-n} h ${2*n} v ${2*n} h ${-2*n} z `}var Fb=class extends Eb{draw(e,t,n){let r=this.w,i=new Z(this.w),a=r.globals.comboCharts?t:r.config.chart.type,o=new tg(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type===`ohlc`,this.coreUtils=new Xh(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let s=i.group({class:`apexcharts-${a}-series apexcharts-plot-series`});for(let t=0;t<e.length;t++){this.isBoxPlot=r.config.chart.type===`boxPlot`||r.config.series[t].type===`boxPlot`;let a,c,l=[],u=[],d=r.globals.comboCharts?n[t]:t,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=i.group({class:`apexcharts-series`,seriesName:$.escapeString(r.seriesData.seriesNames[d]),rel:t+1,"data:realIndex":d});cg.addCollapsedClassToSeries(this.w,p,d),e[t].length>0&&(this.visibleI+=1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],m=d);let{y:h,barHeight:g,yDivision:_,zeroW:v,x:y,barWidth:b,xDivision:x,zeroH:S}=this.barHelpers.initialPositions(d);c=h,a=y,u.push(a+(b??0)/2);let C=i.group({class:`apexcharts-datalabels`,"data:realIndex":d}),w=i.group({class:`apexcharts-bar-goals-markers`}),T=this.isBoxPlot?this.boxOptions.points:null,E=[],D=r.layout.gridWidth,O=b??0;for(let n=0;n<r.globals.dataPoints;n++){let i=this.barHelpers.getStrokeWidth(t,n,d),s=null,h={indexes:{i:t,j:n,realIndex:d,translationsIndex:m},x:a,y:c,strokeWidth:i,elSeries:p};if(s=this.isHorizontal?this.drawHorizontalBoxPaths(X(Y({},h),{yDivision:_,barHeight:g,zeroW:v})):this.drawVerticalBoxPaths(X(Y({},h),{xDivision:x,barWidth:b,zeroH:S,cullBounds:{lo:-O,hi:D+O}})),c=s.y,a=s.x,n>0&&u.push(a+(b??0)/2),l.push(c),s.culled)continue;let y=this.barHelpers.drawGoalLine({barXPosition:s.barXPosition,barYPosition:s.barYPosition,goalX:s.goalX,goalY:s.goalY,barHeight:g,barWidth:b});if(y&&w.add(y),s.pathTo.forEach((l,u)=>{let m=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?s.color[u]:r.globals.stroke.colors[t],h=o.fillPath({seriesNumber:d,dataPointIndex:n,color:s.color[u],value:e[t][n]});this.renderSeries({realIndex:d,pathFill:h,lineFill:m,j:n,i:t,pathFrom:s.pathFrom,pathTo:l,strokeWidth:i,elSeries:p,x:a,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,elGoalsMarkers:w,visibleSeries:this.visibleI,type:r.config.chart.type})}),T&&T.show!==!1){let e=r.candleData.seriesBoxPoints[d]?.[n];if(e&&e.length){let t=e=>this.coreUtils.getLogValAtSeriesIndex(e,d),i,a,o;if(this.isHorizontal){let e=this.invertedYRatio,n=g??0,r=v??0;i=s.barYPosition+n/2,a=n/2,o=n=>r+t(n)/e}else{let e=this.yRatio[m],n=b??0,r=S??0;i=s.barXPosition+n/2,a=n/2,o=n=>r-t(n)/e}let c=Ob({w:r,points:e,seedA:d,seedB:n,center:i,halfExtent:a,alongFn:o,isHorizontal:this.isHorizontal,options:T});c.length&&E.push({groups:c,j:n})}}}T&&kb({graphics:i,w:r,elSeries:p,pointsByCat:E,options:T,distributed:r.config.plotOptions.bar.distributed,realIndex:d,wrapClass:`apexcharts-boxPlot-points-wrap`,pointClass:`apexcharts-boxPlot-points`}),r.globals.seriesXvalues[d]=u,r.globals.seriesYvalues[d]=l,s.add(p)}return s}drawVerticalBoxPaths({indexes:e,x:t,xDivision:n,barWidth:r,zeroH:i,strokeWidth:a,cullBounds:o=null}){let s=this.w,c=new Z(this.w),l=e.i,u=e.j,{colors:d}=s.config.plotOptions.candlestick,{colors:f}=this.boxOptions,p=e.realIndex,m=e=>Array.isArray(e)?e[p]:e,h=m(d.upward),g=m(d.downward),_=this.yRatio[e.translationsIndex],v=this.getOHLCValue(p,u),y=i,b=i,x=v.o<v.c?[h]:[g];this.isBoxPlot&&(x=[m(f.lower),m(f.upper)]);let S=Math.min(v.o,v.c),C=Math.max(v.o,v.c),w=v.m;s.axisFlags.isXNumeric&&(t=(s.seriesData.seriesX[p][u]-s.globals.minX)/this.xRatio-r/2);let T=t+r*this.visibleI;if(this.series[l]?.[u]===void 0||this.series[l]?.[u]===null?(S=i,C=i):(S=i-S/_,C=i-C/_,y=i-v.h/_,b=i-v.l/_,w=i-v.m/_),o&&(T+r<o.lo||T>o.hi))return{pathTo:null,pathFrom:null,x:s.axisFlags.isXNumeric?t:t+n,y:C,barXPosition:T,color:x,culled:!0};let E;if(this.isOHLC){let e=T+r/2,t=i-v.o/_,n=i-v.c/_;E=[c.move(e,y)+c.line(e,b)+c.move(e,t)+c.line(T,t)+c.move(e,n)+c.line(T+r,n)]}else E=this.isBoxPlot?[c.move(T,S)+c.line(T+r/2,S)+c.line(T+r/2,y)+c.line(T+r/4,y)+c.line(T+r-r/4,y)+c.line(T+r/2,y)+c.line(T+r/2,S)+c.line(T+r,S)+c.line(T+r,w)+c.line(T,w)+c.line(T,S+a/2),c.move(T,w)+c.line(T+r,w)+c.line(T+r,C)+c.line(T+r/2,C)+c.line(T+r/2,b)+c.line(T+r-r/4,b)+c.line(T+r/4,b)+c.line(T+r/2,b)+c.line(T+r/2,C)+c.line(T,C)+c.line(T,w)+`z`]:[c.move(T,C)+c.line(T+r/2,C)+c.line(T+r/2,y)+c.line(T+r/2,C)+c.line(T+r,C)+c.line(T+r,S)+c.line(T+r/2,S)+c.line(T+r/2,b)+c.line(T+r/2,S)+c.line(T,S)+c.line(T,C-a/2)];let D=null,O=(this.ctx?.morphTypeChange)?.getInitialPathFor(p,u);return O?D=O:s.globals.previousPaths.length>0&&(D=this.getPreviousPath(p,u,E[0])),D??=c.move(T+r/2,S)+c.move(T,S),s.axisFlags.isXNumeric||(t+=n),{pathTo:E,pathFrom:D,x:t,y:C,goalY:this.barHelpers.getGoalValues(`y`,null,i,p,u,e.translationsIndex),barXPosition:T,color:x}}drawHorizontalBoxPaths({indexes:e,y:t,yDivision:n,barHeight:r,zeroW:i,strokeWidth:a}){let o=this.w,s=new Z(this.w),c=e.i,l=e.j,u=e.realIndex,{colors:d}=o.config.plotOptions.candlestick,{colors:f}=this.boxOptions,p=e=>Array.isArray(e)?e[u]:e,m=this.invertedYRatio,h=this.getOHLCValue(u,l),g=h.o<h.c?[p(d.upward)]:[p(d.downward)];this.isBoxPlot&&(g=[p(f.lower),p(f.upper)]);let _=i,v=i,y=Math.min(h.o,h.c),b=Math.max(h.o,h.c),x=h.m;o.axisFlags.isXNumeric&&(t=(o.seriesData.seriesX[u][l]-o.globals.minX)/this.invertedXRatio-r/2);let S=t+r*this.visibleI;this.series[c]?.[l]===void 0||this.series[c]?.[l]===null?(y=i,b=i):(y=i+y/m,b=i+b/m,_=i+h.h/m,v=i+h.l/m,x=i+h.m/m);let C=[s.move(y,S)+s.line(y,S+r/2)+s.line(_,S+r/2)+s.line(_,S+r/2-r/4)+s.line(_,S+r/2+r/4)+s.line(_,S+r/2)+s.line(y,S+r/2)+s.line(y,S+r)+s.line(x,S+r)+s.line(x,S)+s.line(y+a/2,S),s.move(x,S)+s.line(x,S+r)+s.line(b,S+r)+s.line(b,S+r/2)+s.line(v,S+r/2)+s.line(v,S+r-r/4)+s.line(v,S+r/4)+s.line(v,S+r/2)+s.line(b,S+r/2)+s.line(b,S)+s.line(x,S)+`z`],w=null,T=(this.ctx?.morphTypeChange)?.getInitialPathFor(u,l);return T?w=T:o.globals.previousPaths.length>0&&(w=this.getPreviousPath(u,l,C[0])),w??=s.move(y,S+r/2)+s.move(y,S),o.axisFlags.isXNumeric||(t+=n),{pathTo:C,pathFrom:w,x:b,y:t,goalX:this.barHelpers.getGoalValues(`x`,i,null,u,l,0),barYPosition:S,color:g}}getOHLCValue(e,t){let n=this.w,r=this.coreUtils,i=n=>n[e]&&n[e][t]!=null?r.getLogValAtSeriesIndex(n[e][t],e):0,a=i(n.candleData.seriesCandleH),o=i(n.candleData.seriesCandleO),s=i(n.candleData.seriesCandleM),c=i(n.candleData.seriesCandleC),l=i(n.candleData.seriesCandleL);return{o:this.isBoxPlot?a:o,h:this.isBoxPlot?o:a,m:s,l:this.isBoxPlot?c:l,c:this.isBoxPlot?l:c}}},Ib=e=>{let t=Bb(e),n=e.length-1,r=[],i,a,o,s;for(let r=0;r<n;r++)o=zb(e[r],e[r+1]),Math.abs(o)<1e-6?t[r]=t[r+1]=0:(i=t[r]/o,a=t[r+1]/o,s=i*i+a*a,s>9&&(s=o*3/Math.sqrt(s),t[r]=s*i,t[r+1]=s*a));for(let i=0;i<=n;i++)s=(e[Math.min(n,i+1)][0]-e[Math.max(0,i-1)][0])/(6*(1+t[i]*t[i])),r.push([s||0,t[i]*s||0]);return r},Lb=e=>{let t=``;for(let n=0;n<e.length;n++){let r=e[n],i=r.length;i>4?(t+=`C${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`,t+=`, ${r[4]}, ${r[5]}`):i>2&&(t+=`S${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`)}return t},Rb={points(e){let t=Ib(e),n=e[1],r=e[0],i=[],a=t[1],o=t[0];i.push(r,[r[0]+o[0],r[1]+o[1],n[0]-a[0],n[1]-a[1],n[0],n[1]]);for(let n=2,r=t.length;n<r;n++){let r=e[n],a=t[n];i.push([r[0]-a[0],r[1]-a[1],r[0],r[1]])}return i},slice(e,t,n){let r=e.slice(t,n);if(t){if(n-t>1&&r[1].length<6){let e=r[0].length;r[1]=[r[0][e-2]*2-r[0][e-4],r[0][e-1]*2-r[0][e-3]].concat(r[1])}r[0]=r[0].slice(-2)}return r}};function zb(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Bb(e){let t=[],n=e[0],r=e[1],i=t[0]=zb(n,r),a=1;for(let o=e.length-1;a<o;a++)n=r,r=e[a+1],t[a]=(i+(i=zb(n,r)))*.5;return t[a]=i,t}var Vb=class extends Eb{draw(e,t,n){let r=this.w,i=new Z(this.w),a=new tg(this.w);this.violinOptions=r.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.boxOptions=this.violinOptions.box||{},this.cloudSign=Ub(this.violinOptions.side),this.rainSign=this.pointsOptions.show===!1?0:Ub(this.pointsOptions.position),this.boxShown=this.boxOptions.show===!0,this.boxFrac=this.boxShown?Wb(this.boxOptions.width,.15):0,this.rainFrac=Wb(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||`individual`,this.distributed=r.config.plotOptions.bar.distributed,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.coreUtils=new Xh(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let o=i.group({class:`apexcharts-violin-series apexcharts-plot-series`});for(let t=0;t<e.length;t++){let s,c,l=[],u=[],d=r.globals.comboCharts?n[t]:t,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=i.group({class:`apexcharts-series`,seriesName:$.escapeString(r.seriesData.seriesNames[d]),rel:t+1,"data:realIndex":d});cg.addCollapsedClassToSeries(this.w,p,d),e[t].length>0&&(this.visibleI+=1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],m=d);let{y:h,barHeight:g,yDivision:_,zeroW:v,x:y,barWidth:b,xDivision:x,zeroH:S}=this.barHelpers.initialPositions(d);c=h,s=y,u.push(s+(b??0)/2);let C=i.group({class:`apexcharts-datalabels`,"data:realIndex":d});this.seriesMaxWeight=0,this.normalize===`group`&&(r.violinData.seriesViolinDensity[d]||[]).forEach(e=>{e&&e.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=e.maxWeight)});let w=[];for(let n=0;n<r.globals.dataPoints;n++){let i=this.barHelpers.getStrokeWidth(t,n,d),o=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:t,j:n,realIndex:d,translationsIndex:m},y:c,yDivision:_,barHeight:g,zeroW:v}):this.drawVerticalViolin({indexes:{i:t,j:n,realIndex:d,translationsIndex:m},x:s,xDivision:x,barWidth:b,zeroH:S});s=o.x,c=o.y,n>0&&u.push(o.center),l.push(o.alongRepresentative);let h=this.buildPointsSubPath({realIndex:d,j:n,center:o.center,halfExtent:o.halfExtent,alongFn:o.alongFn,density:o.density,maxWeight:o.maxWeight,cloudBase:o.cloudBase,cloudMaxPx:o.cloudMaxPx,rainCenter:o.rainCenter,rainHalfPx:o.rainHalfPx});h.length&&w.push({groups:h,j:n});let y=a.fillPath({seriesNumber:this.distributed?n:d,dataPointIndex:n,color:this.distributed?r.globals.colors[n]:void 0,value:e[t][n]});this.renderSeries({realIndex:d,pathFill:y,lineFill:r.globals.stroke.colors[d],j:n,i:t,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:i,elSeries:p,x:s,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:`violin`});let T=p.node.querySelector(`path.apexcharts-violin-area[j='${n}']`);if(T&&isFinite(o.alongRepresentative)&&T.setAttribute(this.isHorizontal?`cx`:`cy`,`${o.alongRepresentative}`),o.boxPaths){let i=this.boxOptions.strokeWidth??1;o.boxPaths.forEach(a=>{this.renderSeries({realIndex:d,pathFill:a.filled?this.boxOptions.fillColor||y:`none`,lineFill:r.globals.stroke.colors[d],j:n,i:t,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:i,elSeries:p,x:s,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:`violin`,classes:`apexcharts-raincloud-box`})})}}kb({graphics:i,w:r,elSeries:p,pointsByCat:w,options:this.pointsOptions,distributed:this.distributed,realIndex:d,wrapClass:`apexcharts-violin-points-wrap`,pointClass:`apexcharts-violin-points`}),r.globals.seriesXvalues[d]=u,r.globals.seriesYvalues[d]=l,o.add(p)}return o}drawVerticalViolin({indexes:e,x:t,xDivision:n,barWidth:r,zeroH:i}){let a=this.w,{realIndex:o,j:s,translationsIndex:c}=e,l=this.yRatio[c];a.axisFlags.isXNumeric&&(t=(a.seriesData.seriesX[o][s]-a.globals.minX)/this.xRatio-r/2);let u=t+r*this.visibleI+r/2,d=r/2,f=this.getDensity(o,s),p=this.effectiveMaxWeight(f),m=e=>i-this.logVal(e,o)/l,h=Gb({halfExtent:d,cloudSign:this.cloudSign??0,rainSign:this.rainSign??0,boxFrac:this.boxFrac??0,rainFrac:this.rainFrac??0}),g=u+h.cloudBaseOff,_=this.buildBodyPath({nodes:f.nodes,center:g,halfExtent:h.cloudMaxPx,maxWeight:p,vertical:!0,alongFn:m,collapsed:!1,sideSign:this.cloudSign}),v=null,y=(this.ctx?.morphTypeChange)?.getInitialPathFor(o,s);return y?v=y:a.globals.previousPaths.length>0&&(v=this.getPreviousPath(o,s,_)),v??=this.buildBodyPath({nodes:f.nodes,center:g,halfExtent:h.cloudMaxPx,maxWeight:p,vertical:!0,alongFn:m,collapsed:!0,sideSign:this.cloudSign}),a.axisFlags.isXNumeric||(t+=n),{pathTo:_,pathFrom:v,x:t,y:i,center:u,halfExtent:d,alongFn:m,density:f,maxWeight:p,cloudBase:g,cloudMaxPx:h.cloudMaxPx,rainCenter:u+h.rainCenterOff,rainHalfPx:h.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:o,j:s,boxCenter:u+h.boxCenterOff,boxHalfPx:h.boxHalfPx,alongFn:m,vertical:!0}),alongRepresentative:m(this.series[e.i][s]??0)}}drawHorizontalViolin({indexes:e,y:t,yDivision:n,barHeight:r,zeroW:i}){let a=this.w,{realIndex:o,j:s}=e,c=this.invertedYRatio;a.axisFlags.isXNumeric&&(t=(a.seriesData.seriesX[o][s]-a.globals.minX)/this.invertedXRatio-r/2);let l=t+r*this.visibleI+r/2,u=r/2,d=this.getDensity(o,s),f=this.effectiveMaxWeight(d),p=e=>i+this.logVal(e,o)/c,m=Gb({halfExtent:u,cloudSign:this.cloudSign??0,rainSign:this.rainSign??0,boxFrac:this.boxFrac??0,rainFrac:this.rainFrac??0}),h=l+m.cloudBaseOff,g=this.buildBodyPath({nodes:d.nodes,center:h,halfExtent:m.cloudMaxPx,maxWeight:f,vertical:!1,alongFn:p,collapsed:!1,sideSign:this.cloudSign}),_=null,v=(this.ctx?.morphTypeChange)?.getInitialPathFor(o,s);return v?_=v:a.globals.previousPaths.length>0&&(_=this.getPreviousPath(o,s,g)),_??=this.buildBodyPath({nodes:d.nodes,center:h,halfExtent:m.cloudMaxPx,maxWeight:f,vertical:!1,alongFn:p,collapsed:!0,sideSign:this.cloudSign}),a.axisFlags.isXNumeric||(t+=n),{pathTo:g,pathFrom:_,x:i,y:t,center:l,halfExtent:u,alongFn:p,maxWeight:f,density:d,cloudBase:h,cloudMaxPx:m.cloudMaxPx,rainCenter:l+m.rainCenterOff,rainHalfPx:m.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:o,j:s,boxCenter:l+m.boxCenterOff,boxHalfPx:m.boxHalfPx,alongFn:p,vertical:!1}),alongRepresentative:p(this.series[e.i][s]??0)}}getDensity(e,t){let n=this.w.violinData.seriesViolinDensity[e]?.[t];if(!n||!n.values.length)return{nodes:[],maxWeight:0};let r=n.values.map((e,t)=>t);r.sort((e,t)=>n.values[e]-n.values[t]);let i=[],a=null;for(let e of r){let t=n.values[e];a!==null&&t===a||(i.push({v:t,w:n.weights[e]}),a=t)}return{nodes:i,maxWeight:n.maxWeight}}effectiveMaxWeight(e){return this.normalize===`group`&&this.seriesMaxWeight>0?this.seriesMaxWeight:e.maxWeight}buildBodyPath({nodes:e,center:t,halfExtent:n,maxWeight:r,vertical:i,alongFn:a,collapsed:o,sideSign:s=0}){let c=new Z(this.w);if(e.length===0){let e=a(0);return i?c.move(t,e)+c.line(t,e):c.move(e,t)+c.line(e,t)}let l=e=>{if(o||r<=0)return 0;let t=e/r*n*this.bandwidthScale;return Math.min(n,Math.max(0,t))},u=[],d=[];for(let n=0;n<e.length;n++){let r=a(e[n].v),o=l(e[n].w),c=s===0?t+o:t+s*o,f=s===0?t-o:t;i?(u.push([c,r]),d.push([f,r])):(u.push([r,c]),d.push([r,f]))}return d.reverse(),this.smoothSegment(u,i,!1)+this.smoothSegment(d,i,!0)+`z`}buildBoxSubPaths({realIndex:e,j:t,boxCenter:n,boxHalfPx:r,alongFn:i,vertical:a}){let o=this.w;if(!this.boxShown||r<=0)return null;let s=o.violinData.seriesViolinSummary[e]?.[t];if(!s)return null;let c=r*Math.min(1,Math.max(0,this.boxOptions.capWidth??.5)),[l,u,d,f,p]=s.map(e=>i(e)),m=(e,t)=>{let r=new Z(this.w),i=(e,t)=>a?[e,t]:[t,e],o=e=>e.map(([e,t],n)=>n===0?r.move(e,t):r.line(e,t)).join(``),s=n;return{whiskers:o([i(s,l),i(s,u)])+o([i(s,f),i(s,p)])+o([i(s-e,l),i(s+e,l)])+o([i(s-e,p),i(s+e,p)]),box:o([i(s-t,u),i(s+t,u),i(s+t,f),i(s-t,f)])+`z`+o([i(s-t,d),i(s+t,d)])}},h=m(c,r),g=m(0,0),_=(n,r)=>{let i=null;return o.globals.previousPaths.length>0&&(i=this.getPreviousPath(e,t,n)),i??r};return[{pathTo:h.whiskers,pathFrom:_(h.whiskers,g.whiskers),filled:!1},{pathTo:h.box,pathFrom:_(h.box,g.box),filled:!0}]}smoothSegment(e,t,n){let r=new Z(this.w),i=e[0],a=n?r.line(i[0],i[1]):r.move(i[0],i[1]);if(e.length<3||!this.strictlyMonotonic(e,t)){for(let t=1;t<e.length;t++)a+=r.line(e[t][0],e[t][1]);return a}let o=e.map(([e,n])=>t?[n,e]:[e,n]),s=Rb.points(o),c=t?s.map(Hb):s;return a+=Lb(c),a}strictlyMonotonic(e,t){let n=t?1:0;for(let t=1;t<e.length;t++)if(e[t][n]===e[t-1][n])return!1;return!0}buildPointsSubPath({realIndex:e,j:t,center:n,halfExtent:r,alongFn:i,density:a,maxWeight:o,cloudBase:s,cloudMaxPx:c,rainCenter:l,rainHalfPx:u}){let d=this.rainSign!==0,f=d?l:this.cloudSign===0?n:s,p=d?u:this.cloudSign===0?r:c;return Ob({w:this.w,points:this.w.violinData.seriesViolinPoints[e]?.[t],seedA:e,seedB:t,center:f,halfExtent:p,alongFn:i,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:d?null:e=>this.halfWidthAtValue(e,a,p,o),sideSign:d?0:this.cloudSign})}halfWidthAtValue(e,t,n,r){let{nodes:i}=t,a=r??t.maxWeight;if(!i.length||a<=0)return 0;let o=e=>Math.min(n,e/a*n*this.bandwidthScale);if(e<=i[0].v)return o(i[0].w);if(e>=i[i.length-1].v)return o(i[i.length-1].w);for(let t=1;t<i.length;t++)if(e<=i[t].v){let n=i[t-1],r=i[t],a=r.v===n.v?0:(e-n.v)/(r.v-n.v);return o(n.w+(r.w-n.w)*a)}return 0}logVal(e,t){return this.coreUtils.getLogValAtSeriesIndex(e,t)}};function Hb(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(e[n+1],e[n]);return t}function Ub(e){return e===`right`||e===`bottom`?1:e===`left`||e===`top`?-1:0}function Wb(e,t){let n=t;if(typeof e==`string`&&e.trim().endsWith(`%`)){let t=parseFloat(e);isFinite(t)&&(n=t/100)}else typeof e==`number`&&isFinite(e)&&(n=e);return Math.min(.5,Math.max(0,n))}function Gb({halfExtent:e,cloudSign:t,rainSign:n,boxFrac:r,rainFrac:i}){let a=r*e,o=n===0?e:i*e,s=n===0?0:n*(e-o);if(t===0)return{cloudBaseOff:0,cloudMaxPx:e,boxCenterOff:0,boxHalfPx:a,rainCenterOff:s,rainHalfPx:o};let c=n===0?0:i,l=2*Math.max(0,1-c-r)*e,u=t*(e-l);return{cloudBaseOff:u,cloudMaxPx:l,boxCenterOff:u-t*a,boxHalfPx:a,rainCenterOff:s,rainHalfPx:o}}var Kb=class{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){let e=this.w,t=!1,n=e.config.plotOptions[e.config.chart.type];return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,n,r){let i=this.w,a=1,o=i.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,n);i.globals.hasNegs||r?a=i.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(o*1.25):(1-s.percent/100)*(o*1.25):s.percent<=0?1-(1+s.percent/100)*o:(1-s.percent/100)*o:(a=1-s.percent/100,e===`treemap`&&(a=(1-s.percent/100)*(o*1.25)));let c=s.color,l=new $;if(i.config.plotOptions[e].enableShades)if(this.w.config.theme.mode===`dark`){let e=l.shadeColor(a*-1,s.color);c=$.hexToRgba($.isColorHex(e)?e:$.rgb2hex(e),i.config.fill.opacity)}else{let e=l.shadeColor(a,s.color);c=$.hexToRgba($.isColorHex(e)?e:$.rgb2hex(e),i.config.fill.opacity)}return{color:c,colorProps:s}}determineColor(e,t,n){let r=this.w,i=r.seriesData.series[t][n],a=r.config.plotOptions[e],o=a.colorScale.inverse?n:t;a.distributed&&r.config.chart.type===`treemap`&&(o=n);let s=r.globals.colors[o],c=null,l,u;if(!a.distributed&&e===`heatmap`)l=r.globals.minY,u=r.globals.maxY;else{let e=r.seriesData.series[t];l=e.length?e[0]:0,u=l;for(let t=1;t<e.length;t++)e[t]<l&&(l=e[t]),e[t]>u&&(u=e[t])}let d=a.colorScale.min,f=a.colorScale.max;d!==void 0&&f!==void 0&&f>d?(l=d,u=f):d!==void 0&&(l=d<r.globals.minY?d:r.globals.minY,u=f>r.globals.maxY?f:r.globals.maxY);let p=Math.abs(u)+Math.abs(l),m=p===0?0:100*Math.min(Math.max(i,l),u)/p;return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(e=>{if(i>=e.from&&i<=e.to){s=e.color,c=e.foreColor?e.foreColor:null,l=e.from,u=e.to;let t=Math.abs(u)+Math.abs(l);m=t===0?0:100*i/t}}),{color:s,foreColor:c,percent:m}}calculateDataLabels({text:e,x:t,y:n,i:r,j:i,colorProps:a,fontSize:o}){let s=this.w,c=s.config.dataLabels,l=new Z(this.w),u=new $h(this.w,this.ctx),d=null;if(c.enabled){d=l.group({class:`apexcharts-data-labels`});let f=Zy(c.offsetX,s,r,i),p=Zy(c.offsetY,s,r,i),m=t+f,h=n+parseFloat(c.style.fontSize)/3+p;u.plotDataLabelsText({x:m,y:h,text:e,i:r,j:i,color:a.foreColor,parent:d,fontSize:o,dataLabelsConfig:c})}return d}},qb=class{constructor(e,t,n){this.ctx=t,this.w=e,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Kb(e,t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.shape=this.w.config.plotOptions.heatmap.shape||`rect`,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(e){let t=this.w,n=new Z(this.w,this.ctx),r=n.group({class:`apexcharts-heatmap`}),i=t.layout.gridWidth/t.globals.dataPoints,a=t.layout.gridHeight/t.seriesData.series.length,o=(t.config.xaxis.type===`numeric`||t.config.xaxis.type===`datetime`)&&t.axisFlags.isXNumeric&&this.xRatio>0,s=i;if(o){let e=t.globals.minXDiff;s=Number.isFinite(e)&&e>0?e/this.xRatio:i}let c=this.shape;o&&c===`hexagon`&&(c=`rect`);let l=Jv(this.ctx,n),u=c===`rect`&&l!==n&&typeof l.drawRectCell==`function`;c===`hexagon`?this.applyHexagonClipPath(r,n,i,a):r.attr(`clip-path`,`url(#gridRectMask${t.globals.cuid})`);let d=Array.isArray(t.config.fill.opacity)?t.config.fill.opacity[0]??1:t.config.fill.opacity??1,f=0,p=!1;this.negRange=this.helpers.checkColorRange();let m=e.slice();t.config.yaxis[0].reversed&&(p=!0,m.reverse());for(let h=p?0:m.length-1;p?h<m.length:h>=0;p?h++:h--){let p=n.group({class:`apexcharts-series apexcharts-heatmap-series`,seriesName:$.escapeString(t.seriesData.seriesNames[h]),rel:h+1,"data:realIndex":h});if(cg.addCollapsedClassToSeries(this.w,p,h),u||n.setupEventDelegation(p,`.apexcharts-heatmap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new ng(this.w).dropShadow(p,e,h)}let g=0,_=t.config.plotOptions.heatmap.shadeIntensity,v=Math.round(f/a),y=c===`hexagon`?(v%2==0?-1:1)*i/4:0,b=0;for(let r=0;r<t.globals.dataPoints;r++){if(!o&&t.seriesData.seriesX.length&&!t.globals.allSeriesHasEqualX&&t.globals.minX+t.globals.minXDiff*r<t.seriesData.seriesX[h][b]){g+=i;continue}if(b>=m[h].length)break;let v=o?s:i;if(o){let e=t.seriesData.seriesX[h]?t.seriesData.seriesX[h][b]:null;if(e==null||e!==e){b++;continue}g=(e-t.globals.minX)/this.xRatio-s/2}let x=this.helpers.getShadeColor(t.config.chart.type,h,b,this.negRange),S=x.color,C=x.colorProps;t.config.fill.type===`image`&&(S=new tg(this.w).fillPath({seriesNumber:h,dataPointIndex:b,opacity:t.globals.hasNegs?C.percent<0?1-(1+C.percent/100):_+C.percent/100:C.percent/100,patternID:$.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:v,height:t.config.fill.image.height?t.config.fill.image.height:a}));let w=this.rectRadius,T=t.config.plotOptions.heatmap.useFillColorAsStroke?S:t.globals.stroke.colors[0];if(u)l.drawRectCell(g,f,v,a,{fill:S,fillOpacity:d,stroke:T,strokeWidth:this.strokeWidth,radius:w,seriesIndex:h,dataPointIndex:b});else{let r=c===`rect`,i=r?n.drawRect(g,f,v,a,w):n.drawPath({d:this.cellShapePath(c,g+y,f,v,a),stroke:T,strokeWidth:this.strokeWidth,fill:S,fillOpacity:1});if(i.attr({cx:g+y,cy:f}),i.node.classList.add(`apexcharts-heatmap-rect`),p.add(i),i.attr({fill:S,i:h,index:h,j:b,val:e[h][b],"stroke-width":this.strokeWidth,stroke:T,color:S}),r||i.attr({width:v,height:a}),t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;if(t.globals.resized||(e=t.config.chart.animations.speed),r)this.animateHeatMap(i,g,f,v,a,e,h,b);else{let t=new Bh(this.w);t.animatePop(i,{speed:e,delay:this.enterStaggerDelay(e,h,b),onComplete:()=>{t.animationCompleted(i)}})}}if(t.globals.dataChanged){let e=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){e=this.dynamicAnim.speed;let n=t.globals.previousPaths[h]&&t.globals.previousPaths[h][b]&&t.globals.previousPaths[h][b].color;n||=`rgba(255, 255, 255, 0)`,this.animateHeatColor(i,$.isColorHex(n)?n:$.rgb2hex(n),$.isColorHex(S)?S:$.rgb2hex(S),e)}}}let E=t.config.dataLabels.formatter,D=E(t.seriesData.series[h][b],{value:t.seriesData.series[h][b],seriesIndex:h,dataPointIndex:b,w:t}),O=this.helpers.calculateDataLabels({text:D,x:g+y+v/2,y:f+a/2,i:h,j:b,colorProps:C,series:m});O!==null&&p.add(O),o||(g+=i),b++}f+=a,r.add(p)}let h=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?h.unshift(``):h.push(``),t.globals.yAxisScale[0].result=h,r}animateHeatMap(e,t,n,r,i,a,o=0,s=0){let c=new Bh(this.w),l=this.enterStaggerDelay(a,o,s);c.animateRect(e,{x:t+r/2,y:n+i/2,width:0,height:0},{x:t,y:n,width:r,height:i},a,()=>{c.animationCompleted(e)},l)}enterStaggerDelay(e,t,n){let r=this.w,i=r.config.chart.animations.animateGradually;if(!i||i.enabled===!1)return 0;let a=((r.seriesData.series||[]).length||1)+(r.globals.dataPoints||1)-2;return Vh({style:`diagonal`,index:n,row:t,col:n,baseDelay:Math.min(i.delay||0,e*.5/Math.max(1,a))})}cellShapePath(e,t,n,r,i){let a=t+r/2,o=n+i/2;if(e===`circle`){let e=Math.min(r,i)/2;return`M ${a-e} ${o} a ${e} ${e} 0 1 0 ${e*2} 0 a ${e} ${e} 0 1 0 ${-e*2} 0 Z`}if(e===`diamond`)return`M ${a} ${n} L ${t+r} ${o} L ${a} ${n+i} L ${t} ${o} Z`;let s=t+r;return`M ${a} ${n-i/6} L ${s} ${n+i/6} L ${s} ${n+i*5/6} L ${a} ${n+i*7/6} L ${t} ${n+i*5/6} L ${t} ${n+i/6} Z`}applyHexagonClipPath(e,t,n,r){let i=this.w,a=this.strokeWidth/2+2,o=`heatmapHexMask${i.globals.cuid}`,s=i.dom.elDefs.node,c=s.querySelector(`clipPath[id="${o}"]`);c&&c.parentNode&&c.parentNode.removeChild(c);let l=Q.createElementNS(r_,`clipPath`);l.setAttribute(`id`,o),l.appendChild(t.drawRect(-n/4-a,-r/6-a,i.layout.gridWidth+n/2+a*2,i.layout.gridHeight+r/3+a*2,0,`#fff`).node),s.appendChild(l),e.attr(`clip-path`,`url(#${o})`)}animateHeatColor(e,t,n,r){e.attr({fill:t}).animate(r).attr({fill:n})}},Jb=class{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){let n=this.w;if((n.config.fill.type===`gradient`||n.config.fill.type[e]===`gradient`)&&new Xh(this.lineCtx.w).seriesHaveSameValues(e)){let n=t[e].slice();n[n.length-1]=n[n.length-1]+1e-6,t[e]=n}return t}calculatePoints({series:e,realIndex:t,x:n,y:r,i,j:a,prevY:o}){let s=this.w,c=[],l=[],u=this.lineCtx.categoryAxisCorrection+s.config.markers.offsetX;return s.axisFlags.isXNumeric&&(u=(s.seriesData.seriesX[t][0]-s.globals.minX)/this.lineCtx.xRatio+s.config.markers.offsetX),a===0&&(c.push(u),l.push($.isNumber(e[i][0])?o+s.config.markers.offsetY:null)),c.push(n+s.config.markers.offsetX),l.push($.isNumber(e[i][a+1])?r+s.config.markers.offsetY:null),{x:c,y:l}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:n}){let r=this.w;for(let i=0;i<r.globals.previousPaths.length;i++){let a=r.globals.previousPaths[i];(a.type===`line`||a.type===`area`)&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(n,10)&&(a.type===`line`?(this.lineCtx.appendPathFrom=!1,e=r.globals.previousPaths[i].paths[0].d):a.type===`area`&&(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[i].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[i].paths[1]&&(e=r.globals.previousPaths[i].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:n,prevY:r,lineYPosition:i,translationsIndex:a}){let o=this.w,s=o.config.chart.stacked&&!o.globals.comboCharts||o.config.chart.stacked&&o.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[t]?.type===`bar`||this.w.config.series[t]?.type===`column`);if(n[e]?.[0]!==void 0){if(s)if(e>0){let e=this.lineCtx.stackTopAt(t,0);i=e===void 0?this.lineCtx.zeroY:e}else i=this.lineCtx.zeroY;else i=this.lineCtx.zeroY;r=i-n[e][0]/this.lineCtx.yRatio[a]+(this.lineCtx.isReversed?n[e][0]/this.lineCtx.yRatio[a]:0)*2}else if(s&&e>0&&n[e][0]===void 0){for(let t=e-1;t>=0;t--)if(n[t][0]!==null&&n[t][0]!==void 0){i=this.lineCtx.prevSeriesY[t][0],r=i;break}}return{prevY:r,lineYPosition:i}}};function Yb(e,t,n,r){let i=e.globals,a=i.prevStreamFrame;if(!a||!i.dataChanged||!e.axisFlags?.isXNumeric)return null;let o=a.seriesX[t],s=a.seriesY[t],c=e.seriesData.seriesX[t],l=e.seriesData.series[t];if(!o||!s||!c||!l||o.length<3||c.length<3)return null;let u=-1;for(let e=0;e<o.length;e++)if(o[e]===c[0]){u=e;break}if(u===-1)return null;let d=Math.min(o.length-u,c.length);if(d<2)return null;let f=c.length-d;if(u===0&&f===0)return null;for(let e=0;e<d;e++){if(o[u+e]!==c[e])return null;let t=s[u+e],n=l[e];if(t!==n&&!(t==null&&n==null))return null}let p=a.xPixels[t],m=a.yPixels[t];if(!p||!m)return null;let h=-1,g=-1;for(let e=0;e<d;e++)p[u+e]==null||m[u+e]==null||n[e]==null||r[e]==null||(h===-1&&(h=e),g=e);if(h===-1||g<=h)return null;let _=n[h],v=n[g],y=p[u+h],b=p[u+g];if(Math.abs(v-_)<1e-6)return null;let x=(b-y)/(v-_),S=y-x*_;if(!isFinite(x)||!isFinite(S)||Math.abs(x-1)>.02||Math.abs(S)<.5)return null;let C=h,w=h;for(let e=h;e<=g;e++){let t=r[e];t==null||m[u+e]==null||(t<r[C]&&(C=e),t>r[w]&&(w=e))}let T=1,E=0,D=r[C],O=r[w];if(Math.abs(O-D)>1e-6?(T=(m[u+w]-m[u+C])/(O-D),E=m[u+C]-T*D):E=m[u+C]-D,!isFinite(T)||!isFinite(E)||T<.2||T>5)return null;let k=Math.floor((h+g)/2);if(k!==h&&k!==g&&n[k]!=null&&p[u+k]!=null){let e=x*n[k]+S;if(Math.abs(e-p[u+k])>1.5)return null;if(r[k]!=null&&m[u+k]!=null){let e=T*r[k]+E;if(Math.abs(e-m[u+k])>1.5)return null}}return i.streamScrolled=!0,{ax:x,bx:S,ay:T,by:E}}var Xb=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function Zb(e,t){let{ax:n,bx:r,ay:i,by:a}=t,o=[],s=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g,c;for(;(c=s.exec(e))!==null;){let e=c[1].toUpperCase(),t=(c[2].match(Xb)||[]).map(parseFloat);if(e===`Z`){o.push(`z`);continue}if(e===`H`){for(let e of t)o.push(`H ${n*e+r}`);continue}if(e===`V`){for(let e of t)o.push(`V ${i*e+a}`);continue}if(e===`A`){for(let e=0;e+6<t.length;e+=7)o.push(`A ${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${n*t[e+5]+r} ${i*t[e+6]+a}`);continue}let s=[];for(let e=0;e+1<t.length;e+=2)s.push(`${n*t[e]+r} ${i*t[e+1]+a}`);s.length&&o.push(`${e} ${s.join(` `)}`)}return o.join(` `)}var Qb=class{constructor(e,t,n,r){this.ctx=t,this.w=e,this.xyRatios=n,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!(this.w.config.chart.type!==`bubble`&&this.w.config.chart.type!==`scatter`)||r,this.scatter=new zh(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Jb(this),this.markers=new ig(this.w,this.ctx),this.prevSeriesY=[],this.prevSeriesYByX=new Map,this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null,this._elLastPointsWrap=null}draw(e,t,n,r){let i=this.w,a=new Z(this.w),o=i.globals.comboCharts?t:i.config.chart.type,s=a.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),c=new Xh(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;let l=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);let a=i.globals.comboCharts?n[t]:t,s=this.yRatio.length>1?a:0;this._initSerieVariables(e,t,a);let c=[],u=[],d=[],f=i.globals.padHorizontal+this.categoryAxisCorrection,p=[],m=[];cg.addCollapsedClassToSeries(this.w,this.elSeries,a),i.axisFlags.isXNumeric&&i.seriesData.seriesX.length>0&&(f=(i.seriesData.seriesX[a][0]-i.globals.minX)/this.xRatio),d.push(f);let h=f,g,_=h,v=this.zeroY,y=this.zeroY;v=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:e,prevY:v,lineYPosition:0,translationsIndex:s}).prevY,i.config.stroke.curve===`monotoneCubic`&&e[t][0]===null?c.push(null):c.push(v);let b=v,x;o===`rangeArea`&&(x=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:r,prevY:y,lineYPosition:0,translationsIndex:s}),y=x.prevY,g=y,u.push(c[0]===null?null:y));let S=this._calculatePathsFrom({type:o,series:e,i:t,realIndex:a,translationsIndex:s,prevX:_,prevY:v,prevY2:y}),C=[c[0]],w=[u[0]],T={type:o,series:e,realIndex:a,translationsIndex:s,i:t,x:f,y:1,pX:h,pY:b,pathsFrom:S,linePaths:p,areaPaths:m,seriesIndex:n,lineYPosition:0,xArrj:d,yArrj:c,y2Arrj:u,seriesRangeEnd:r},E=this._iterateOverDataPoints(X(Y({},T),{iterations:o===`rangeArea`?e[t].length-1:void 0,isRangeStart:!0}));if(o===`rangeArea`){let e=this._calculatePathsFrom({series:r,i:t,realIndex:a,prevX:_,prevY:y}),n=this._iterateOverDataPoints(X(Y({},T),{series:r,xArrj:[f],yArrj:C,y2Arrj:w,pY:g,areaPaths:E.areaPaths,pathsFrom:e,iterations:r[t].length-1,isRangeStart:!1})),i=E.linePaths.length/2;for(let e=0;e<i;e++)E.linePaths[e]=n.linePaths[e+i]+E.linePaths[e];E.linePaths.splice(i),E.pathFromLine=n.pathFromLine+E.pathFromLine}else /z\s*$/i.test(E.pathFromArea)||(E.pathFromArea+=`z`);this._handlePaths({type:o,realIndex:a,i:t,paths:E}),this.markers.flushBatch(this.elPointsMain,a),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(i.config.series[0]?.zIndex!==void 0&&l.sort((e,t)=>Number(e.node.getAttribute(`zIndex`))-Number(t.node.getAttribute(`zIndex`))),i.config.chart.stacked)for(let e=l.length-1;e>=0;e--)s.add(l[e]);else for(let e=0;e<l.length;e++)s.add(l[e]);return s}_initSerieVariables(e,t,n){let r=this.w,i=new Z(this.w);this.xDivision=r.layout.gridWidth/(r.globals.dataPoints-(r.config.xaxis.tickPlacement===`on`?1:0)),this.strokeWidth=Array.isArray(r.config.stroke.width)?r.config.stroke.width[n]:r.config.stroke.width;let a=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[n],a=n),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.layout.gridHeight-this.baseLineY[a]-(this.isReversed?r.layout.gridHeight:0)+(this.isReversed?this.baseLineY[a]*2:0),this.areaBottomY=this.zeroY,(this.zeroY>r.layout.gridHeight||r.config.plotOptions.area.fillTo===`end`)&&(this.areaBottomY=r.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;let o=r.config.series[n];if(this.elSeries=i.group({class:`apexcharts-series`,zIndex:o.zIndex===void 0?n:o.zIndex,seriesName:$.escapeString(r.seriesData.seriesNames[n])}),this.elPointsMain=i.group({class:`apexcharts-series-markers-wrap`,"data:realIndex":n}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,r.globals.hasNullValues){let e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[r.layout.gridHeight+r.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});e!==null&&this.elPointsMain.add(e)}this.elDataLabelsWrap=i.group({class:`apexcharts-datalabels`,"data:realIndex":n});let s=e[t].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":s,rel:t+1,"data:realIndex":n}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:n,realIndex:r,translationsIndex:i,prevX:a,prevY:o,prevY2:s}){let c=this.w,l=new Z(this.w),u,d,f,p;if(t[n][0]===null){for(let e=0;e<t[n].length;e++)if(t[n][e]!==null){a=this.xDivision*e,o=this.zeroY-t[n][e]/this.yRatio[i],u=l.move(a,o),d=l.move(a,this.areaBottomY);break}}else u=l.move(a,o),e===`rangeArea`&&(u=l.move(a,s)+l.line(a,o)),d=l.move(a,this.areaBottomY)+l.line(a,o);if(f=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),p=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),c.globals.previousPaths.length>0){let e=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:p,realIndex:r});f=e.pathFromLine,p=e.pathFromArea}return{prevX:a,prevY:o,linePath:u,areaPath:d,pathFromLine:f,pathFromArea:p}}_stackKey(e,t){if(!this.w.axisFlags.isXNumeric)return t;let n=this.w.seriesData.seriesX[e];return n?n[t]:void 0}stackTopAt(e,t){let n=this._stackKey(e,t);if(n!=null)return this.prevSeriesYByX.get(n)}_recordStackTops(e,t){let n=this.w;if(Array.isArray(t)&&!(n.globals.collapsedSeriesIndices.indexOf(e)!==-1||n.globals.ancillaryCollapsedSeriesIndices.indexOf(e)!==-1))for(let n=0;n<t.length;n++){let r=this._stackKey(e,n);if(r==null)continue;let i=t[n];$.isNumber(i)&&this.prevSeriesYByX.set(r,i)}}_handlePaths({type:e,realIndex:t,i:n,paths:r}){let i=this.w,a=new Z(this.w),o=Jv(this.ctx,a),s=new tg(this.w);this.prevSeriesY.push(r.yArrj),this._recordStackTops(t,r.yArrj);let c=null;(e===`line`||e===`area`)&&i.globals.dataChanged&&(c=Yb(i,t,r.xArrj,r.yArrj));let l=null;!c&&(e===`line`||e===`area`)&&(l=bb(i,{type:e,realIndex:t,pathFromLine:r.pathFromLine,pathFromArea:r.pathFromArea,linePaths:r.linePaths,areaPaths:r.areaPaths})),i.globals.seriesXvalues[t]=r.xArrj,i.globals.seriesYvalues[t]=r.yArrj;let u=i.config.forecastDataPoints;if(u.count>0&&e!==`rangeArea`){let e=i.globals.seriesXvalues[t][i.globals.seriesXvalues[t].length-u.count-1],n=a.drawRect(e,0,i.layout.gridWidth,i.layout.gridHeight,0);i.dom.elForecastMask.appendChild(n.node);let r=a.drawRect(0,0,e,i.layout.gridHeight,0);i.dom.elNonForecastMask.appendChild(r.node)}this.pointsChart?yb(i,{elPointsMain:this.elPointsMain,realIndex:t,speed:i.config.chart.animations.dynamicAnimation.speed}):(i.globals.delayedElements.push({el:this.elPointsMain.node,index:t}),yb(i,{elPointsMain:this.elPointsMain,realIndex:t,speed:i.config.chart.animations.dynamicAnimation.speed}),gb(i,t)&&this.elDataLabelsWrap?.node&&(this.elDataLabelsWrap.node.classList.add(`apexcharts-element-hidden`),i.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));let d={i:n,realIndex:t,animationDelay:n,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`},f=r.numericXY,p=e===`line`||e===`area`,m=p&&r.linePaths.length>1?[r.linePaths.join(` `)]:r.linePaths,h=p&&r.areaPaths.length>1?[r.areaPaths.join(` `)]:r.areaPaths;if(e===`area`){let e=s.fillPath({seriesNumber:t});for(let t=0;t<h.length;t++){let n=o.renderPaths(X(Y({},d),{pathFrom:c?Zb(r.areaPaths[t],c):l?.area?.from??r.pathFromArea,pathTo:h[t],pathToNumeric:f?{xs:f.xs,ys:f.ys,closeY:f.areaCloseY}:void 0,pathToInterp:l?.area?.toInterp,scrollMorph:!!c,stroke:`none`,strokeWidth:0,strokeLineCap:null,fill:e}));this.elSeries.add(n)}}if(i.config.stroke.show&&!this.pointsChart){let a=null;if(e===`line`)a=s.fillPath({seriesNumber:t,i:n});else if(i.config.stroke.fill.type===`solid`)a=i.globals.stroke.colors[t];else{let e=i.config.fill;i.config.fill=i.config.stroke.fill,a=s.fillPath({seriesNumber:t,i:n}),i.config.fill=e}for(let n=0;n<m.length;n++){let p=a;e===`rangeArea`&&(p=s.fillPath({seriesNumber:t}));let h=X(Y({},d),{pathFrom:c?Zb(r.linePaths[n],c):l?.line?.from??r.pathFromLine,pathTo:m[n],pathToNumeric:f?{xs:f.xs,ys:f.ys}:void 0,pathToInterp:l?.line?.toInterp,scrollMorph:!!c,stroke:a,strokeWidth:this.strokeWidth,strokeLineCap:i.config.stroke.lineCap,fill:e===`rangeArea`?p:`none`}),g=o.renderPaths(h);if(this.elSeries.add(g),g.attr(`fill-rule`,`evenodd`),u.count>0&&e!==`rangeArea`){let e=o.renderPaths(h);e.node.setAttribute(`stroke-dasharray`,u.dashArray),u.strokeWidth&&e.node.setAttribute(`stroke-width`,u.strokeWidth),this.elSeries.add(e),e.attr(`clip-path`,`url(#forecastMask${i.globals.cuid})`),g.attr(`clip-path`,`url(#nonForecastMask${i.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:n,realIndex:r,translationsIndex:i,i:a,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,seriesIndex:p,lineYPosition:m,xArrj:h,yArrj:g,y2Arrj:_,isRangeStart:v,seriesRangeEnd:y}){let b=this.w,x=new Z(this.w),S=this.yRatio,{prevY:C,linePath:w,areaPath:T,pathFromLine:E,pathFromArea:D}=u,O=$.isNumber(b.globals.minYArr[r])?b.globals.minYArr[r]:b.globals.minY;n||=b.globals.dataPoints>1?b.globals.dataPoints-1:b.globals.dataPoints;let k=(e,t)=>t-e/S[i]+(this.isReversed?e/S[i]:0)*2,A=s,j=b.config.chart.stacked&&!b.globals.comboCharts||b.config.chart.stacked&&b.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[r]?.type===`bar`||this.w.config.series[r]?.type===`column`),ee=b.config.stroke.curve;Array.isArray(ee)&&(ee=Array.isArray(p)?ee[p[a]]:ee[a]);let te=0,ne,M=this.pointsChart?this._scatterJitterPx(r):null;if(ee===`straight`&&!this.pointsChart){let p=this._fastStraightPath({type:e,series:t,i:a,realIndex:r,translationsIndex:i,iterations:n,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,xArrj:h,yArrj:g,y2Arrj:_,stackSeries:j});if(p)return p}for(let i=0;i<n&&t[a].length!==0;i++){let u=t[a][i+1]===void 0||t[a][i+1]===null;if(b.axisFlags.isXNumeric){let e=b.seriesData.seriesX[r][i+1];b.seriesData.seriesX[r][i+1]===void 0&&(e=b.seriesData.seriesX[r][n-1]),o=(e-b.globals.minX)/this.xRatio}else o+=this.xDivision;if(j)if(a>0&&b.globals.collapsedSeries.length<b.config.series.length-1)if((e=>{for(let t=e;t>=0;t--){let e=p?.[t]??t;if(b.globals.collapsedSeriesIndices.indexOf(e)===-1&&b.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1)return t}return-1})(a-1)<0)m=this.zeroY;else{let e=this.stackTopAt(r,i+1);m=e===void 0?this.zeroY:e}else m=this.zeroY;else m=this.zeroY;u?s=k(O,m):(s=k(t[a][i+1],m),e===`rangeArea`&&(A=k(y[a][i+1],m)));let S=o,re=s;if(M){let e=r*100003+(i+1);M.x&&(S=o+(Mb(e*7919+13)-.5)*2*M.x),M.y&&(re=s+(Mb(e*6271+97)-.5)*2*M.y)}h.push(t[a][i+1]===null?null:S),u&&(b.config.stroke.curve===`smooth`||b.config.stroke.curve===`monotoneCubic`)?(g.push(null),_.push(null)):(g.push(re),_.push(A));let ie=this.lineHelpers.calculatePoints({series:t,x:S,y:re,realIndex:r,i:a,j:i,prevY:C}),ae=this._createPaths({type:e,series:t,i:a,j:i,x:o,y:s,y2:A,xArrj:h,yArrj:g,y2Arrj:_,pX:c,pY:l,pathState:te,segmentStartX:ne,linePath:w,areaPath:T,linePaths:d,areaPaths:f,curve:ee,isRangeStart:v});f=ae.areaPaths,d=ae.linePaths,c=ae.pX,l=ae.pY,te=ae.pathState,ne=ae.segmentStartX,T=ae.areaPath,w=ae.linePath,this.appendPathFrom&&!b.globals.hasNullValues&&!(ee===`monotoneCubic`&&e===`rangeArea`)&&(E+=x.line(o,this.areaBottomY),D+=x.line(o,this.areaBottomY)),this.handleNullDataPoints(t,ie,a,i,r),this._handleMarkersAndLabels({type:e,pointsPos:ie,i:a,j:i,realIndex:r,isRangeStart:v})}return{yArrj:g,xArrj:h,pathFromArea:D,areaPaths:f,pathFromLine:E,linePaths:d,linePath:w,areaPath:T}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:n,i:r,j:i,realIndex:a}){let o=this.w,s=new $h(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,i,{realIndex:a,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!o.globals.dataChanged&&!o.globals.resized&&!o.globals.markers.batched)&&o.seriesData.series[r].length>1&&this.elPointsMain.node.classList.add(`apexcharts-element-hidden`);let e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:a,j:i+1});e!==null&&e!==this._elLastPointsWrap&&(this.elPointsMain.add(e),this._elLastPointsWrap=e)}let c=s.drawDataLabel({type:e,isRangeStart:n,pos:t,i:a,j:i+1});c!==null&&this.elDataLabelsWrap.add(c)}_scatterJitterPx(e){let t=this.w,n=t.config.plotOptions.scatter?.jitter;if(!n||!n.enabled||!n.x&&!n.y)return null;let r=t.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,i=this.yRatio.length>1?e:0,a=this.yRatio[i]?1/this.yRatio[i]:0;return{x:(n.x||0)*r,y:(n.y||0)*a}}_fastStraightPath({type:e,series:t,i:n,realIndex:r,translationsIndex:i,iterations:a,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,xArrj:p,yArrj:m,y2Arrj:h,stackSeries:g}){let _=this.w;if(e!==`line`&&e!==`area`||_.globals.comboCharts||g||_.config.dataLabels.enabled||_.config.markers.discrete.length||_.globals.markers.size[r]>0)return null;let v=t[n],y=v.length;if(!a||y<2||y-1!==a)return null;for(let e=0;e<=a;e++)if(v[e]==null)return null;let b=_.axisFlags.isXNumeric,x=b?_.seriesData.seriesX[r]:null;if(b&&(!x||x.length<y))return null;let S=this.yRatio[i],C=this.isReversed,w=this.zeroY,T=this.areaBottomY,E=this.xRatio,D=_.globals.minX,O=this.xDivision,k=_.config.markers.offsetX,A=_.config.markers.offsetY,j=this.appendPathFrom&&!_.globals.hasNullValues,{pathFromLine:ee,pathFromArea:te}=u,ne=this.ctx&&this.ctx.renderer,M=!!(ne&&ne.kind&&ne.kind!==`svg`),re=!M||_.globals.dataChanged&&!!_.globals.prevStreamFrame,ie=M?new Float64Array(y):null,ae=M?new Float64Array(y):null;ie&&ae&&(ie[0]=c,ae[0]=l),_.globals.pointsArray[r]===void 0&&(_.globals.pointsArray[r]=[]);let oe=_.globals.pointsArray[r],se=x?(x[0]-D)/E+k:this.categoryAxisCorrection+k;oe.push([se,u.prevY+A]);let N=re?Array(a+1):[];re&&(N[0]=`M `+c+` `+l);let ce=re&&j?Array(a):null,le=o,ue=c,de=l;for(let e=0;e<a;e++){x?ue=(x[e+1]-D)/E:(le+=O,ue=le);let t=v[e+1];de=w-t/S+(C?t/S:0)*2,p.push(ue),m.push(de),h.push(s),oe.push([ue+k,de+A]),re&&(N[e+1]=` L `+ue+` `+de,ce&&(ce[e]=` L `+ue+` `+T)),ie&&ae&&(ie[e+1]=ue,ae[e+1]=de)}let fe=``,pe=``;if(re&&(fe=N.join(``),pe=fe+` L `+ue+` `+T+` L `+c+` `+T+`z`),ce){let e=ce.join(``);ee+=e,te+=e}else !re&&j&&(ee+=` L `+ue+` `+T,te+=` L `+ue+` `+T);return d.push(fe),f.push(pe),{yArrj:m,xArrj:p,pathFromArea:te,areaPaths:f,pathFromLine:ee,linePaths:d,linePath:fe,areaPath:pe,numericXY:ie?{xs:ie,ys:ae,areaCloseY:T}:void 0}}_createPaths({type:e,series:t,i:n,j:r,x:i,y:a,xArrj:o,yArrj:s,y2:c,y2Arrj:l,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h,linePaths:g,areaPaths:_,curve:v,isRangeStart:y}){let b=new Z(this.w),x=this.areaBottomY,S=e===`rangeArea`,C=e===`rangeArea`&&y;switch(v){case`monotoneCubic`:{let e=y?s:l,i=(e,t)=>e.map((e,n)=>[e,t[n]]).filter(e=>e[1]!==null),a=e=>{let t=[],n=0;return e.forEach(e=>{e===null?n>0&&(t.push(n),n=0):n++}),n>0&&t.push(n),t},c=(e,t)=>{let n=a(e),r=[];for(let e=0,i=0;e<n.length;i+=n[e++])r[e]=Rb.slice(t,i,i+n[e]);return r};switch(f){case 0:if(e[r+1]===null)break;f=1;case 1:if(!(S?o.length===t[n].length:r===t[n].length-2))break;case 2:{let t=y?o:o.slice().reverse(),n=y?e:e.slice().reverse(),r=i(t,n),a=r.length>1?Rb.points(r):r,s=[];S&&(C?_=r:s=_.reverse());let l=0,u=0;if(c(n,a).forEach(e=>{l++;let t=Lb(e),n=u;u+=e.length;let i=u-1;C?m=b.move(r[n][0],r[n][1])+t:S?m=b.move(s[n][0],s[n][1])+b.line(r[n][0],r[n][1])+t+b.line(s[i][0],s[i][1]):(m=b.move(r[n][0],r[n][1])+t,h=m+b.line(r[i][0],x)+b.line(r[n][0],x)+`z`,_.push(h)),g.push(m)}),S&&l>1&&!C){let e=g.slice(l).reverse();g.splice(l),e.forEach(e=>g.push(e))}f=0;break}}break}case`smooth`:{let e=(i-u)*.35;if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||t[n][r+1]===void 0){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=b.curve(u+e,d,i-e,a,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)C?m+=b.line(u,c):m+=b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=b.curve(u+e,d,i-e,a,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.curve(i,a,i,a,i,c)+b.move(i,c)),h+=b.curve(i,a,i,a,i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}break}u=i,d=a;break}default:{let e=(e,t,n)=>{let r=``;switch(e){case`stepline`:r=b.line(t,null,`H`)+b.line(null,n,`V`);break;case`linestep`:r=b.line(null,n,`V`)+b.line(t,null,`H`);break;case`straight`:r=b.line(t,n);break}return r};if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||t[n][r+1]===void 0){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=e(v,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)C?m+=b.line(u,c):m+=b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=e(v,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.line(i,c)),h+=b.line(i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}break}u=i,d=a;break}}return{linePaths:g,areaPaths:_,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h}}handleNullDataPoints(e,t,n,r,i){let a=this.w;if(e[n][r]===null&&a.config.markers.showNullDataPoints||e[n].length===1){let e=this.strokeWidth-a.config.markers.strokeWidth/2;e>0||(e=0);let n=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:i,j:r+1,pSize:e,alwaysDrawMarker:!0});n!==null&&this.elPointsMain.add(n)}}};function $b(e,t){let{lines:n,lineHeight:r,anchor:i,elbow:a,labelX:o,labelY:s,side:c,connector:l,style:u,foreColor:d}=t,f=new Z(e),p=f.group({class:t.groupClass||`apexcharts-outer-label-group`});if(l.show){let e=`M ${i.x} ${i.y} L ${a.x} ${a.y} L ${o} ${s}`,n=f.drawPath({d:e,stroke:l.color,strokeWidth:l.width,fill:`none`,strokeLinecap:`round`});n.node.classList.add(t.connectorClass||`apexcharts-outer-label-connector`),p.add(n)}let m=c===`right`?o+4:o-4,h=n.length,g=s-(h-1)*r/2,_=f.drawText({x:m,y:g,text:h===1?n[0]:n,textAnchor:c===`right`?`start`:`end`,fontSize:u.fontSize,fontFamily:u.fontFamily,fontWeight:u.fontWeight,foreColor:d,dominantBaseline:`central`,cssClass:t.textClass||`apexcharts-outer-label`});if(h>1){let e=_.node.getElementsByTagName(`tspan`);for(let t=0;t<e.length;t++)e[t].setAttribute(`x`,`${m}`),e[t].setAttribute(`dy`,t===0?`0`:`${r}`)}return p.add(_),p}function ex(e,t,n={}){let r=new Z(e),i=n.fontSize||`12px`,a=parseFloat(i)||12,o=0;return t.forEach(e=>{if(e==null||e===``)return;let t=`${e}`,s=r.getTextRects(t,i,n.fontFamily,``).width;o=Math.max(o,s>0?s:t.length*a*.58)}),o}function tx(e,t,n,r){let i=e.slice().sort((e,t)=>e.idealY-t.idealY);i.forEach(e=>{e.labelY=e.idealY});for(let e=1;e<i.length;e++)i[e].labelY-i[e-1].labelY<t&&(i[e].labelY=i[e-1].labelY+t);let a=i[i.length-1],o=a?a.labelY-n:0;if(o>0)for(let e=i.length-1;e>=0;e--)i[e].labelY-=o,e<i.length-1&&i[e+1].labelY-i[e].labelY<t&&(i[e].labelY=i[e+1].labelY-t);if(r!=null&&i.length&&i[0].labelY<r){let e=r-i[0].labelY;for(let t=0;t<i.length;t++)i[t].labelY+=e}}var nx=class{constructor(e){this.w=e}drawYAxisTexts(e,t,n,r){let i=this.w,a=i.config.yaxis[0],o=i.formatters.yLabelFormatters[0];return new Z(this.w).drawText({x:e+a.labels.offsetX,y:t+a.labels.offsetY,text:o(r,n),textAnchor:`middle`,fontSize:a.labels.style.fontSize,fontFamily:a.labels.style.fontFamily,foreColor:Array.isArray(a.labels.style.colors)?a.labels.style.colors[n]:a.labels.style.colors})}getMaxLabelWidth(e,{fontSize:t,fontFamily:n}={}){let r=new Z(this.w),i=0;return e.forEach(e=>{if(e==null||e===``)return;let a=r.getTextRects(`${e}`,t||`12px`,n,``);i=Math.max(i,a.width)}),i}drawExternalLabel(e){return $b(this.w,X(Y({},e),{groupClass:`apexcharts-pie-name-label-group`,textClass:`apexcharts-pie-name-label`,connectorClass:`apexcharts-pie-label-connector`}))}},rx=Math.PI/180,ix=180/Math.PI;function ax(e,t,n,r){return{x:e+n*Math.cos((r-90)*rx),y:t+n*Math.sin((r-90)*rx)}}var ox=e=>`${e.x} ${e.y}`;function sx({cx:e,cy:t,rIn:n,rOut:r,a0:i,a1:a,r:o,spanDeg:s}){let c=(n,r)=>ax(e,t,n,r),l=o/r*ix,u=o/n*ix,d=c(r,i+l),f=c(r,a-l),p=s-2*l>180?1:0,m=c(r,a),h=c(r-o,a),g=c(r,i),_=c(r-o,i),v=c(n,a-u),y=c(n,i+u),b=s-2*u>180?1:0,x=c(n,a),S=c(n+o,a),C=c(n,i),w=c(n+o,i);return[`M`,ox(d),`A`,r,r,0,p,1,ox(f),`Q`,ox(m),ox(h),`L`,ox(S),`Q`,ox(x),ox(v),`A`,n,n,0,b,0,ox(y),`Q`,ox(C),ox(w),`L`,ox(_),`Q`,ox(g),ox(d),`Z`].join(` `)}function cx({cx:e,cy:t,rOut:n,a0:r,a1:i,r:a,spanDeg:o}){let s=(n,r)=>ax(e,t,n,r),c=a/n*ix,l=s(n,r+c),u=s(n,i-c),d=o-2*c>180?1:0,f=s(n,i),p=s(n-a,i),m=s(n,r),h=s(n-a,r);return[`M`,ox(l),`A`,n,n,0,d,1,ox(u),`Q`,ox(f),ox(p),`L`,`${e} ${t}`,`L`,ox(h),`Q`,ox(m),ox(l),`Z`].join(` `)}function lx({cx:e,cy:t,rIn:n,rOut:r,a0:i,a1:a,spanDeg:o}){let s=(n,r)=>ax(e,t,n,r),c=o>180?1:0,l=s(r,i),u=s(r,a),d=s(n,a),f=s(n,i);return[`M`,ox(l),`A`,r,r,0,c,1,ox(u),`L`,ox(d),`A`,n,n,0,c,0,ox(f),`Z`].join(` `)}var ux=`transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)`,dx=`opacity 180ms ease-out`,fx=class{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=Math.min(e.layout.gridWidth,e.layout.gridHeight),this.centerY=e.layout.gridHeight/2,this.centerX=e.layout.gridWidth/2,e.config.chart.type===`radialBar`?this.fullAngle=360:this.fullAngle=Math.abs(e.config.plotOptions.pie.endAngle-e.config.plotOptions.pie.startAngle),this.initialAngle=e.config.plotOptions.pie.startAngle%this.fullAngle,e.globals.radialSize=this.defaultSize/2.05-e.config.stroke.width-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.externalCfg=e.config.plotOptions.pie.dataLabels.external;let n=e.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||n.fontSize,fontFamily:this.externalCfg.fontFamily||n.fontFamily,fontWeight:this.externalCfg.fontWeight||n.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,e.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&this.chartType!==`polarArea`,this.showExternalLabels&&!e.globals.noData&&this.reserveExternalLabelSpace(),this.donutSize=e.globals.radialSize*parseInt(e.config.plotOptions.pie.donut.size,10)/100;let r=e.config.plotOptions.pie.customScale,i=e.layout.gridWidth/2,a=e.layout.gridHeight/2;this.translateX=i-i*r,this.translateY=a-a*r,this.dataLabelsGroup=new Z(this.w).group({class:`apexcharts-datalabels-group`,transform:`translate(${this.translateX}, ${this.translateY}) scale(${r})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSliceSizes=[],this.sliceLabelGroups={},this.externalLabelGroups={},this.elHoverOutline=null,this.elHoverOutlinePath=null,this.hoverOutlineIndex=-1,this.prevSectorAngleArr=[]}getExternalLabelText(e){let t=this.w,n=t.seriesData.seriesNames[e],r=this.externalCfg.formatter;return typeof r==`function`?r(n,{seriesIndex:e,percent:t.globals.seriesPercent?.[e]?.[0],value:t.globals.seriesTotals?.[e],w:t}):n==null?``:`${n}`}getExternalLabelLines(e){let t=this.getExternalLabelText(e);return(Array.isArray(t)?t:`${t??``}`.split(`
|
|
2525
|
+
`)).map(e=>e==null?``:`${e}`)}reserveExternalLabelSpace(){let e=this.w,t=new nx(e),n=(e.seriesData.seriesNames||[]).map((e,t)=>this.getExternalLabelLines(t)),r=t.getMaxLabelWidth(n.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=n.reduce((e,t)=>Math.max(e,t.length),1),this.externalLabelLineH=Math.round((parseFloat(this.externalLabelStyle.fontSize)||12)*1.35);let i=this.externalCfg.connector,a=this.externalLabelMaxLines*this.externalLabelLineH,o=r+(i.length||0)+(i.gap||0)+12,s=a/2+(i.gap||0)+6,c=Math.min(e.globals.radialSize,e.layout.gridWidth/2-o,e.layout.gridHeight/2-s);e.globals.radialSize=Math.max(c,this.defaultSize*.15),e.globals.pieExternalLabelMarginY=s;let l=e.config.chart.height?String(e.config.chart.height):``;this.centerY=l!==``&&l!==`auto`?e.layout.gridHeight/2:e.globals.radialSize+s}draw(e){let t=this,n=this.w,r=new Z(this.w),i=r.group({class:`apexcharts-pie`});if(n.globals.noData)return i;let a=0;for(let t=0;t<e.length;t++)a+=$.negToZero(e[t]);let o=[],s=r.group();a===0&&(a=1e-5),e.forEach(e=>{this.maxY=Math.max(this.maxY,e)}),n.config.yaxis[0].max&&(this.maxY=n.config.yaxis[0].max),n.config.grid.position===`back`&&this.chartType===`polarArea`&&this.drawPolarElements(i);let c=n.globals.collapsedSeriesIndices||[],l=1;if(this.chartType===`polarArea`){let t=0;for(let n=0;n<e.length;n++)c.indexOf(n)===-1&&t++;l=Math.max(1,t)}for(let t=0;t<e.length;t++){let r=this.fullAngle*$.negToZero(e[t])/a;o.push(r),this.chartType===`polarArea`?(o[t]=c.indexOf(t)>-1?0:this.fullAngle/l,this.sliceSizes.push(n.globals.radialSize*e[t]/(this.maxY||1))):this.sliceSizes.push(n.globals.radialSize)}let u=this.ctx.morphTypeChange?.isActive()===!0;if(n.globals.dataChanged&&!u)if(this.chartType===`polarArea`){let e=n.globals.previousPaths,t=n.globals.prevPolarAngles;if(Array.isArray(t)&&t.length===e.length)this.prevSectorAngleArr=t.slice();else for(let t=0;t<e.length;t++)this.prevSectorAngleArr.push(this.fullAngle/Math.max(1,e.length));let r=0;for(let t=0;t<e.length;t++)r=Math.max(r,$.negToZero(e[t]));n.config.yaxis[0].max&&(r=n.config.yaxis[0].max),this.prevSliceSizes=e.map(e=>n.globals.radialSize*$.negToZero(e)/(r||1))}else{let e=0;for(let t=0;t<n.globals.previousPaths.length;t++)e+=$.negToZero(n.globals.previousPaths[t]);let t;for(let r=0;r<n.globals.previousPaths.length;r++)t=this.fullAngle*$.negToZero(n.globals.previousPaths[r])/e,this.prevSectorAngleArr.push(t)}if(this.chartType===`polarArea`&&(n.globals.prevPolarAngles=o.slice()),this.donutSize<0&&(this.donutSize=0),this.chartType===`donut`){let e=r.drawCircle(this.donutSize);e.attr({cx:this.centerX,cy:this.centerY,fill:n.config.plotOptions.pie.donut.background?n.config.plotOptions.pie.donut.background:`transparent`}),s.add(e)}let d=t.drawArcs(o,e);if(this.sliceLabels.forEach(e=>{d.add(e)}),s.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${n.config.plotOptions.pie.customScale})`}),s.add(d),i.add(s),this.donutDataLabels.show){let e=this.initialAnim&&!n.globals.resized&&!n.globals.dataChanged&&this.animDur>0,t=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:e?0:this.donutDataLabels.show});if(e){let e=this.dataLabelsGroup.node;e.style.transition=`opacity 280ms ease-out`,setTimeout(()=>{e.style.opacity=`1`},this.animDur)}i.add(t)}return n.config.grid.position===`front`&&this.chartType===`polarArea`&&this.drawPolarElements(i),i}drawArcs(e,t){var n,r;let i=this.w,a=new ng(this.w),o=new Z(this.w),s=new tg(this.w),c=o.group({class:`apexcharts-slices`});this.elHoverOutline=o.group({class:`apexcharts-pie-hover-outline`}),this.elHoverOutline.node.style.pointerEvents=`none`,this.elHoverOutline.node.style.opacity=`0`,i.config.chart.animations.enabled&&(this.elHoverOutline.node.style.transition=dx),c.add(this.elHoverOutline);let l=this.initialAngle,u=this.initialAngle,d=this.initialAngle,f=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;let p=this.ctx.morphTypeChange?.isActive()===!0;for(let m=0;m<e.length;m++){let h=o.group({class:`apexcharts-series apexcharts-pie-series`,seriesName:$.escapeString(i.seriesData.seriesNames[m]),rel:m+1,"data:realIndex":m});c.add(h),l=d,u=f,d=l+e[m],f=u+this.prevSectorAngleArr[m];let g=d<l?this.fullAngle+d-l:d-l,_=s.fillPath({seriesNumber:m,size:this.sliceSizes[m],value:t[m]}),v=p?this.ctx.morphTypeChange.getInitialPathFor(m,0):null,y=this.chartType===`polarArea`&&i.globals.dataChanged&&!p?this.prevSliceSizes[m]||0:void 0,b=v||this.getChangedPath(u,f,y),x=o.drawPath({d:b,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[m]??this.lineColorArr[m%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:_,fillOpacity:i.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${m}`});if(x.attr({index:0,j:m}),a.setSelectionFilter(x,0,m),i.config.chart.dropShadow.enabled){let e=i.config.chart.dropShadow;a.dropShadow(x,e,m)}this.addListeners(x,this.donutDataLabels,m);let S={x:0,y:0},C=(l+g/2)%this.fullAngle,w={x:this.centerX,y:this.centerY};this.chartType===`pie`||this.chartType===`polarArea`?(S=$.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,C),w=$.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/2,C)):this.chartType===`donut`&&(S=$.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,C),w=$.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2,C)),Z.setAttrs(x.node,{"data:angle":g,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":t[m],"data:cx":w.x,"data:cy":w.y}),h.add(x);let T=!1;if(p){let e=this.getPiePath({me:this,startAngle:l,angle:g,size:this.sliceSizes[m]});x.node.setAttribute(`data:pathFinal`,e),T=(n=this.ctx.morphTypeChange).claimsTargetMark?.call(n,m,0)===!0,T&&(x.attr({d:e}),x.node.setAttribute(`data:pathOrig`,e),x.node.setAttribute(`opacity`,`0`),x.node.setAttribute(`data-piece-hidden`,`1`))}let E=0;if(this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged?(E=g/this.fullAngle*i.config.chart.animations.speed,E===0&&(E=1),this.animDur=E+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),!T)if(p&&v){let e=this.getPiePath({me:this,startAngle:l,angle:g,size:this.sliceSizes[m]}),t=this.ctx.morphTypeChange.getSpeed(),n=this.ctx.animations;x.node.setAttribute(`data:pathOrig`,e);let r=x.animate(t).plot(e,`polygons`).attr({"stroke-width":this.strokeWidth});r&&typeof r.after==`function`?r.after(()=>n.animationCompleted(x)):n.animationCompleted(x)}else this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(x,{size:this.sliceSizes[m],prevSize:y,endAngle:d,startAngle:l,prevStartAngle:u,prevEndAngle:f,animateStartingPos:!0,i:m,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(x,{size:this.sliceSizes[m],endAngle:d,startAngle:l,i:m,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:E});if(this.getExpandOffset()>0?x.node.addEventListener(`mouseup`,this.pieClicked.bind(this,m)):m===0&&ng.drilldownBlocksSliceOffset(i)&&((r=this.ctx.drilldown)==null||r.warnSliceOffsetDisabled()),i.interact.selectedDataPoints[0]!==void 0&&i.interact.selectedDataPoints[0].indexOf(m)>-1)if(this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged&&this.animDur>0){let e=this,t=m;setTimeout(()=>e.pieClicked(t,{animate:!1}),this.animDur)}else this.pieClicked(m,{animate:!1});if(i.config.dataLabels.enabled){let t=S.x,n=S.y,r=100*g/this.fullAngle+`%`;if(g!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[m]){let e=i.config.dataLabels.formatter;e!==void 0&&(r=e(i.globals.seriesPercent[m][0],{seriesIndex:m,w:i}));let s=i.globals.dataLabels.style.colors[m],c=o.group({class:`apexcharts-datalabels`}),l=o.drawText({x:t,y:n,text:r,textAnchor:`middle`,fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:s});if(c.add(l),i.config.dataLabels.dropShadow.enabled){let e=i.config.dataLabels.dropShadow;a.dropShadow(l,e)}l.node.classList.add(`apexcharts-pie-label`),i.config.chart.animations.animate&&i.globals.resized===!1&&(l.node.classList.add(`apexcharts-pie-label-delay`),l.node.style.animationDelay=i.config.chart.animations.speed/940+`s`),this.sliceLabels.push(c),this.sliceLabelGroups[m]=c.node}}if(this.showExternalLabels&&g!==0){let e=this.getExternalLabelLines(m);if(e.some(e=>e!==``)){let t=$.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,C),n=$.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize+(this.externalCfg.connector.gap||0),C),r=n.x>=this.centerX,a=r?n.x+(this.externalCfg.connector.length||0):n.x-(this.externalCfg.connector.length||0);this.externalLabels.push({i:m,lines:e,anchor:t,elbow:n,side:r?`right`:`left`,labelX:a+parseFloat(this.externalCfg.offsetX||0),idealY:n.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||i.globals.colors[m],foreColor:this.externalCfg.color||i.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();let e=d_.isBrowser()&&(p||this.dynamicAnim&&i.globals.dataChanged||this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged);this.externalLabels.forEach(t=>{let n=new nx(i).drawExternalLabel({lines:t.lines,lineHeight:this.externalLabelLineH,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:t.connectorColor},style:this.externalLabelStyle,foreColor:t.foreColor});e&&(n.node.classList.add(`apexcharts-element-hidden`),i.globals.delayedElements.push({el:n.node})),this.externalLabelGroups[t.i]=n.node,c.add(n)})}return c}placeExternalLabels(){let e=this.w,t=this.externalLabelMaxLines*this.externalLabelLineH+2,n=this.centerY+e.globals.radialSize+e.globals.pieExternalLabelMarginY;[`left`,`right`].forEach(e=>{tx(this.externalLabels.filter(t=>t.side===e),t,n)})}addListeners(e,t,n){let r=new Z(this.w,this.ctx);e.node.addEventListener(`mouseenter`,r.pathMouseEnter.bind(r,e)),e.node.addEventListener(`mouseleave`,r.pathMouseLeave.bind(r,e)),e.node.addEventListener(`mouseleave`,this.revertDataLabelsInner.bind(this)),typeof n==`number`&&(e.node.addEventListener(`mouseenter`,this.showHoverOutline.bind(this,n)),e.node.addEventListener(`mouseleave`,this.hideHoverOutline.bind(this))),e.node.addEventListener(`mousedown`,r.pathMouseDown.bind(r,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener(`mouseenter`,this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener(`mousedown`,this.printDataLabelsInner.bind(this,e.node,t)))}animatePaths(e,t){let n=this.w,r=this,i=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,a=i,o=t.startAngle,s=t.startAngle;t.prevStartAngle!==void 0&&t.prevEndAngle!==void 0&&(o=t.prevEndAngle,a=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===n.config.series.length-1&&(i+s>this.fullAngle?t.endAngle-=i+s:i+s<this.fullAngle&&(t.endAngle+=this.fullAngle-(i+s))),i===this.fullAngle&&(i=this.fullAngle-.01),r.animateArc(e,o,s,i,a,t)}animateArc(e,t,n,r,i,a){let o=this,s=this.w,c=new Bh(this.w),l=a.size,u;(isNaN(t)||isNaN(i))&&(t=n,i=r,a.dur=0);let d=r,f=n,p=t<n?this.fullAngle+t-n:t-n,m=typeof a.prevSize==`number`;s.globals.dataChanged&&a.shouldSetPrevPaths&&a.prevEndAngle&&(u=o.getPiePath({me:o,startAngle:a.prevStartAngle,angle:a.prevEndAngle<a.prevStartAngle?this.fullAngle+a.prevEndAngle-a.prevStartAngle:a.prevEndAngle-a.prevStartAngle,size:m?a.prevSize:l}),e.attr({d:u})),a.dur===0?(u=o.getPiePath({me:o,startAngle:f,angle:r,size:l}),a.isTrack||(s.globals.animationEnded=!0),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u,"stroke-width":o.strokeWidth})):e.animate(a.dur,a.animBeginArr[a.i]).after(function(){(o.chartType===`pie`||o.chartType===`donut`||o.chartType===`polarArea`)&&this.animate(s.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),a.i===s.config.series.length-1&&c.animationCompleted(e)}).during(s=>{d=p+(r-p)*s,a.animateStartingPos&&(d=i+(r-i)*s,f=t-i+(n-(t-i))*s),u=o.getPiePath({me:o,startAngle:f,angle:d,size:m?a.prevSize+(l-a.prevSize)*s:l}),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u})})}pieClicked(e,t){let n=this.w,r=this,i=!(t&&t.animate===!1),a=n.dom.Paper.findOne(`.apexcharts-${r.chartType.toLowerCase()}-slice-${e}`);if(!a)return;if(a.attr(`data:pieClicked`)===`true`){a.attr({"data:pieClicked":`false`}),this.revertDataLabelsInner(),this.offsetSlice(e,0,i);return}let o=n.dom.baseEl.getElementsByClassName(`apexcharts-pie-area`);Array.prototype.forEach.call(o,e=>{let t=e.getAttribute(`data:pieClicked`)===`true`;e.setAttribute(`data:pieClicked`,`false`),t&&this.offsetSlice(parseInt(e.getAttribute(`j`),10),0,i)}),n.interact.capturedDataPointIndex=e,a.attr(`data:pieClicked`,`true`),this.offsetSlice(e,this.getExpandOffset(),i)}getExpandOffset(){let e=this.w.config.plotOptions.pie;if(!e.expandOnClick||this.chartType===`polarArea`||ng.drilldownBlocksSliceOffset(this.w))return 0;let t=Number(e.expandOffset);return Number.isFinite(t)&&t>0?t:0}getSliceMovers(e){let t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return[t?t.node:null,this.sliceLabelGroups[e],this.externalLabelGroups[e],this.hoverOutlineIndex===e&&this.elHoverOutlinePath?this.elHoverOutlinePath.node:null].filter(Boolean)}offsetSlice(e,t,n=!0){let r=this.w;if(!r.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`))return;let{dx:i,dy:a}=this.getSliceOffsetVector(e,t),o=`translate(${i} ${a})`,s=n&&r.config.chart.animations.enabled?ux:``;this.getSliceMovers(e).forEach(e=>{e.style.transition=s,e.setAttribute(`transform`,o)})}getSliceOffsetVector(e,t){let n=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`),r=n?parseFloat(n.attr(`data:angle`)):NaN;if(!t||!Number.isFinite(r)||r>=this.fullAngle)return{dx:0,dy:0};let i=parseFloat(n.attr(`data:startAngle`)),a=Math.PI*(i+r/2-90)/180;return{dx:t*Math.cos(a),dy:t*Math.sin(a)}}showHoverOutline(e){let t=this.w;if(!ng.hoverOutlineOwnsHoverState(t)||!this.elHoverOutline)return;let n=this.getHoverOutlinePath(e);if(!n)return;let r=t.config.plotOptions.pie.hoverOutline,i=r.color||t.globals.colors[e];this.elHoverOutlinePath||(this.elHoverOutlinePath=new Z(t).drawPath({d:n,fill:i,strokeWidth:0,classes:`apexcharts-pie-hover-outline-band`}),this.elHoverOutline.add(this.elHoverOutlinePath)),this.elHoverOutlinePath.attr({d:n,fill:i,"fill-opacity":r.opacity});let{dx:a,dy:o}=this.getSliceOffsetVector(e,this.isSliceOut(e)?this.getExpandOffset():0);this.elHoverOutlinePath.node.style.transition=``,this.elHoverOutlinePath.node.setAttribute(`transform`,`translate(${a} ${o})`),this.hoverOutlineIndex=e,this.elHoverOutline.node.style.opacity=`1`}hideHoverOutline(){this.elHoverOutline&&(this.elHoverOutline.node.style.opacity=`0`)}isSliceOut(e){let t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return!!t&&t.attr(`data:pieClicked`)===`true`}getHoverOutlinePath(e){let t=this.w,n=t.config.plotOptions.pie.hoverOutline,r=t.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);if(!r)return null;let i=parseFloat(r.attr(`data:angle`));if(!Number.isFinite(i)||i<=0)return null;let a=this.sliceSizes[e],o=Number(n.size);if(!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return null;let{startDeg:s,spanDeg:c}=this.getSliceExtent({me:this,startAngle:parseFloat(r.attr(`data:startAngle`)),angle:i,size:a});if(!(c>0))return null;let l=a+(this.strokeWidth||0)/2+(Number(n.gap)||0),u=l+o,d={cx:this.centerX,cy:this.centerY,rIn:l,rOut:u,a0:s,a1:s+c,spanDeg:c},f=Math.min(o/2,c*Math.PI/180/2*l);return f>.5?sx(X(Y({},d),{r:f})):lx(d)}getChangedPath(e,t,n){let r=``;return this.dynamicAnim&&this.w.globals.dataChanged&&(r=this.getPiePath({me:this,startAngle:e,angle:t-e,size:typeof n==`number`?n:this.size})),r}getSliceExtent({me:e,startAngle:t,angle:n,size:r}){let i=this.w,a=t,o=n+t;Math.ceil(o)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(o=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01);let s=o-a,c=e.chartType===`pie`||e.chartType===`donut`||e.chartType===`polarArea`,l=i.config.plotOptions.pie.spacing;if(c&&l>0&&s>0){let t=e.chartType===`donut`?(r+e.donutSize)/2:r,n=t>0?l/t*(180/Math.PI):0,i=Math.min(n/2,Math.max(0,s/2-.5));a+=i,s-=2*i}return o=a+s,Math.ceil(o)>this.fullAngle&&(o-=this.fullAngle),{startDeg:a,spanDeg:s,endDeg:o}}getPiePath({me:e,startAngle:t,angle:n,size:r}){let i,a=this.w,o=new Z(this.w),{startDeg:s,spanDeg:c,endDeg:l}=this.getSliceExtent({me:e,startAngle:t,angle:n,size:r}),u=e.chartType===`pie`||e.chartType===`donut`||e.chartType===`polarArea`,d=Math.PI*(s-90)/180,f=a.config.plotOptions.pie.borderRadius;if(f>0&&u){let t=this.getRoundedSlicePath({me:e,startDeg:s,spanDeg:c,size:r,borderRadius:f});if(t)return t}let p=Math.PI*(l-90)/180,m=e.centerX+r*Math.cos(d),h=e.centerY+r*Math.sin(d),g=e.centerX+r*Math.cos(p),_=e.centerY+r*Math.sin(p),v=$.polarToCartesian(e.centerX,e.centerY,e.donutSize,l),y=$.polarToCartesian(e.centerX,e.centerY,e.donutSize,s),b=c>180?1:0,x=[`M`,m,h,`A`,r,r,0,b,1,g,_];return i=e.chartType===`donut`?[...x,`L`,v.x,v.y,`A`,e.donutSize,e.donutSize,0,b,0,y.x,y.y,`L`,m,h,`z`].join(` `):e.chartType===`pie`||e.chartType===`polarArea`?[...x,`L`,e.centerX,e.centerY,`L`,m,h].join(` `):[...x].join(` `),o.roundPathCorners(i,this.strokeWidth*2)}getRoundedSlicePath({me:e,startDeg:t,spanDeg:n,size:r,borderRadius:i}){if(!(n>0))return null;let a=Math.PI/180,o=e.centerX,s=e.centerY,c=e.chartType===`donut`,l=r,u=c?e.donutSize:0,d=n*a,f=i;if(f=Math.min(f,d*l/2),c?(f=Math.min(f,d*u/2),f=Math.min(f,(l-u)/2)):f=Math.min(f,l/2),!(f>.5))return null;let p=t,m=t+n;return c?sx({cx:o,cy:s,rIn:u,rOut:l,a0:p,a1:m,r:f,spanDeg:n}):cx({cx:o,cy:s,rOut:l,a0:p,a1:m,r:f,spanDeg:n})}drawPolarElements(e){let t=this.w,n=new sg(this.w),r=new Z(this.w),i=new nx(this.w),a=r.group(),o=r.group(),s=n.niceScale(0,Math.ceil(this.maxY),0),c=s.result.reverse(),l=s.result.length;this.maxY=s.niceMax;let u=t.globals.radialSize,d=u/(l-1);for(let e=0;e<l-1;e++){let n=r.drawCircle(u);if(n.attr({cx:this.centerX,cy:this.centerY,fill:`none`,"stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){let n=i.drawYAxisTexts(this.centerX,this.centerY-u+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,e,c[e]);o.add(n)}a.add(n),u-=d}this.drawSpokes(e),e.add(a),e.add(o)}renderInnerDataLabels(e,t,n){let r=this.w,i=new Z(this.w),a=t.total.show;e.node.innerHTML=``,e.node.style.opacity=n.opacity;let o=n.centerX,s=this.donutDataLabels.total.label?n.centerY:n.centerY-n.centerY/6,c,l;c=t.name.color===void 0?r.globals.colors[0]:t.name.color;let u=t.name.fontSize,d=t.name.fontFamily,f=t.name.fontWeight;l=t.value.color===void 0?r.config.chart.foreColor:t.value.color;let p=t.value.formatter,m=``,h=``;if(a?(c=t.total.color,u=t.total.fontSize,d=t.total.fontFamily,f=t.total.fontWeight,h=this.donutDataLabels.total.label?t.total.label:``,m=t.total.formatter(r)):r.seriesData.series.length===1&&(m=p(r.seriesData.series[0],r),h=r.seriesData.seriesNames[0]),h&&=t.name.formatter(h,t.total.show,r),t.name.show){let n=i.drawText({x:o,y:s+parseFloat(t.name.offsetY),text:h,textAnchor:`middle`,foreColor:c,fontSize:u,fontWeight:f,fontFamily:d});n.node.classList.add(`apexcharts-datalabel-label`),e.add(n)}if(t.value.show){let n=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,r=i.drawText({x:o,y:s+n,text:m,textAnchor:`middle`,foreColor:l,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});r.node.classList.add(`apexcharts-datalabel-value`),e.add(r)}return e}printInnerLabels(e,t,n,r){let i=this.w,a;r?a=e.name.color===void 0?i.globals.colors[parseInt(r.parentNode.getAttribute(`rel`),10)-1]:e.name.color:i.seriesData.series.length>1&&e.total.show&&(a=e.total.color);let o=i.dom.baseEl.querySelector(`.apexcharts-datalabel-label`),s=i.dom.baseEl.querySelector(`.apexcharts-datalabel-value`),c=e.value.formatter;n=c(n,i),!r&&typeof e.total.formatter==`function`&&(n=e.total.formatter(i));let l=t===e.total.label;if(t=this.donutDataLabels.total.label?e.name.formatter(t,l,i):``,o!==null&&(o.textContent=t),s!==null&&(s.textContent=n),o!==null){let e=o;e.style.fill=a}}printDataLabelsInner(e,t){let n=this.w,r=e.getAttribute(`data:value`),i=n.seriesData.seriesNames[parseInt(e.parentNode.getAttribute(`rel`),10)-1];n.seriesData.series.length>1&&this.printInnerLabels(t,i,r,e);let a=n.dom.baseEl.querySelector(`.apexcharts-datalabels-group`);if(a!==null){let e=a;e.style.opacity=`1`}}drawSpokes(e){let t=this.w,n=new Z(this.w),r=t.config.plotOptions.polarArea.spokes;if(r.strokeWidth===0)return;let i=[],a=360/t.seriesData.series.length;for(let e=0;e<t.seriesData.series.length;e++)i.push($.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+a*e));i.forEach((t,i)=>{let a=n.drawLine(t.x,t.y,this.centerX,this.centerY,Array.isArray(r.connectorColors)?r.connectorColors[i]:r.connectorColors);e.add(a)})}revertDataLabelsInner(){let e=this.w;if(this.donutDataLabels.show){let t=e.dom.Paper.findOne(`.apexcharts-datalabels-group`),n=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.dom.Paper.findOne(`.apexcharts-radialbar, .apexcharts-pie`).add(n)}}},px=5,mx=class{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new Z(this.w),this.lineColorArr=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=e.globals.svgHeight<e.globals.svgWidth?e.layout.gridHeight:e.layout.gridWidth,this.isLog=e.config.yaxis[0].logarithmic,this.logBase=e.config.yaxis[0].logBase,this.coreUtils=new Xh(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,e.globals.maxY,0):e.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):e.globals.minY,this.polygons=e.config.plotOptions.radar.polygons,this.strokeWidth=e.config.stroke.show?e.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-e.config.chart.dropShadow.blur,e.config.xaxis.labels.show&&(this.size-=e.layout.xAxisLabelsWidth/1.75),e.config.plotOptions.radar.size!==void 0&&(this.size=e.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(e){let t=this.w,n=new tg(this.w),r=[],i=new $h(this.w,this.ctx);e.length&&(this.dataPointsLen=e[t.globals.maxValsInArrayIndex].length),this.disAngle=Math.PI*2/this.dataPointsLen;let a=t.layout.gridWidth/2,o=t.layout.gridHeight/2,s=a+t.config.plotOptions.radar.offsetX,c=o+t.config.plotOptions.radar.offsetY,l=this.graphics.group({class:`apexcharts-radar-series apexcharts-plot-series`,transform:`translate(${s||0}, ${c||0})`}),u=[],d=null,f=null;if(this.yaxisLabels=this.graphics.group({class:`apexcharts-yaxis`}),e.forEach((e,a)=>{let o=e.length===t.globals.dataPoints,s=this.graphics.group().attr({class:`apexcharts-series`,"data:longestSeries":o,seriesName:$.escapeString(t.seriesData.seriesNames[a]),rel:a+1,"data:realIndex":a});this.dataRadiusOfPercent[a]=[],this.dataRadius[a]=[],this.angleArr[a]=[],e.forEach((e,t)=>{let n=Math.abs(this.maxValue-this.minValue);e-=this.minValue,this.isLog&&(e=this.coreUtils.getLogVal(this.logBase,e,0)),this.dataRadiusOfPercent[a][t]=e/n,this.dataRadius[a][t]=this.dataRadiusOfPercent[a][t]*this.size,this.angleArr[a][t]=t*this.disAngle}),u=this.getDataPointsPos(this.dataRadius[a],this.angleArr[a]);let c=this.createPaths(u,{x:0,y:0});d=this.graphics.group({class:`apexcharts-series-markers-wrap apexcharts-element-hidden`}),f=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":a}),t.globals.delayedElements.push({el:d.node,index:a});let l={i:a,realIndex:a,animationDelay:a,initialSpeed:t.config.chart.animations.speed,dataChangeSpeed:t.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-radar`,shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:t.globals.stroke.colors[a],strokeLineCap:t.config.stroke.lineCap},p=null;t.globals.previousPaths.length>0&&(p=this.getPreviousPath(a));for(let e=0;e<c.linePathsTo.length;e++){let r=this.graphics.renderPaths(X(Y({},l),{pathFrom:p===null?c.linePathsFrom[e]:p,pathTo:c.linePathsTo[e],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[a]:this.strokeWidth,fill:`none`,drawShadow:!1}));s.add(r);let i=n.fillPath({seriesNumber:a}),o=this.graphics.renderPaths(X(Y({},l),{pathFrom:p===null?c.areaPathsFrom[e]:p,pathTo:c.areaPathsTo[e],strokeWidth:0,fill:i,drawShadow:!1,drawMask:{type:`radial`,cx:0,cy:0,r:this.size}}));if(t.config.chart.dropShadow.enabled){let e=new ng(this.w),n=t.config.chart.dropShadow;e.dropShadow(o,Object.assign({},n,{noUserSpaceOnUse:!0}),a)}s.add(o)}e.forEach((e,n)=>{let r=new ig(this.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-marker`,seriesIndex:a,dataPointIndex:n});r.pSize||(r.pSize=px,r.pointFillColor=`transparent`,r.pointStrokeColor=`transparent`,r.pointStrokeWidth=0);let o=this.graphics.drawMarker(u[n].x,u[n].y,r);o.attr(`rel`,n),o.attr(`j`,n),o.attr(`index`,a),o.node.setAttribute(`default-marker-size`,r.pSize);let c=this.graphics.group({class:`apexcharts-series-markers`});c&&c.add(o),d.add(c),s.add(d);let l=t.config.dataLabels;if(l.enabled){let e=l.formatter(t.seriesData.series[a][n],{seriesIndex:a,dataPointIndex:n,w:t});i.plotDataLabelsText({x:u[n].x,y:u[n].y,text:e,textAnchor:`middle`,i:a,j:a,seriesIndex:a,dataPointIndex:n,parent:f,offsetCorrection:!1,dataLabelsConfig:Y({},l)})}s.add(f)}),r.push(s)}),this.drawPolygons({parent:l}),t.config.xaxis.labels.show){let e=this.drawXAxisTexts();l.add(e)}return r.forEach(e=>{l.add(e)}),l.add(this.yaxisLabels),l}drawPolygons(e){let t=this.w,{parent:n}=e,r=new nx(this.w),i=t.globals.yAxisScale[0].result.reverse(),a=i.length,o=[],s=this.size/(a-1);for(let e=0;e<a;e++)o[e]=s*e;o.reverse();let c=[],l=[];o.forEach((e,t)=>{let n=$.getPolygonPos(e,this.dataPointsLen),r=``;n.forEach((e,n)=>{if(t===0){let t=this.graphics.drawLine(e.x,e.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[n]:this.polygons.connectorColors);l.push(t)}n===0&&this.yaxisLabelsTextsPos.push({x:e.x,y:e.y}),r+=e.x+`,`+e.y+` `}),c.push(r)}),c.forEach((e,r)=>{let i=this.polygons.strokeColors,a=this.polygons.strokeWidth,o=this.graphics.drawPolygon(e,Array.isArray(i)?i[r]:i,Array.isArray(a)?a[r]:a,t.globals.radarPolygons.fill.colors[r]);n.add(o)}),l.forEach(e=>{n.add(e)}),t.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((e,t)=>{let n=r.drawYAxisTexts(e.x,e.y,t,i[t]);this.yaxisLabels.add(n)})}drawXAxisTexts(){let e=this.w,t=e.config.xaxis.labels,n=this.graphics.group({class:`apexcharts-xaxis`}),r=$.getPolygonPos(this.size,this.dataPointsLen);return e.labelData.labels.forEach((i,a)=>{let o=e.config.xaxis.labels.formatter,s=new $h(this.w,this.ctx);if(r[a]){let c=this.getTextPos(r[a],this.size),l=o(i,{seriesIndex:-1,dataPointIndex:a,w:e});s.plotDataLabelsText({x:c.newX,y:c.newY,text:l,textAnchor:c.textAnchor,i:a,j:a,parent:n,className:`apexcharts-xaxis-label`,color:Array.isArray(t.style.colors)&&t.style.colors[a]?t.style.colors[a]:`#a8a8a8`,dataLabelsConfig:Y({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},t),offsetCorrection:!1}).on(`click`,t=>{if(typeof e.config.chart.events.xAxisLabelClick==`function`){let n=Object.assign({},e,{labelIndex:a});e.config.chart.events.xAxisLabelClick(t,this.ctx,n)}})}}),n}createPaths(e,t){let n=[],r=[],i=[],a=[];if(e.length){r=[this.graphics.move(t.x,t.y)],a=[this.graphics.move(t.x,t.y)];let o=this.graphics.move(e[0].x,e[0].y),s=this.graphics.move(e[0].x,e[0].y);e.forEach((t,n)=>{o+=this.graphics.line(t.x,t.y),s+=this.graphics.line(t.x,t.y),n===e.length-1&&(o+=`Z`,s+=`Z`)}),n.push(o),i.push(s)}return{linePathsFrom:r,linePathsTo:n,areaPathsFrom:a,areaPathsTo:i}}getTextPos(e,t){let n=`middle`,r=e.x,i=e.y;return Math.abs(e.x)>=10?e.x>0?(n=`start`,r+=10):e.x<0&&(n=`end`,r-=10):n=`middle`,Math.abs(e.y)>=t-10&&(e.y<0?i-=10:e.y>0&&(i+=10)),{textAnchor:n,newX:r,newY:i}}getPreviousPath(e){let t=this.w,n=null;for(let r=0;r<t.globals.previousPaths.length;r++){let i=t.globals.previousPaths[r];i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(e),10)&&t.globals.previousPaths[r].paths[0]!==void 0&&(n=t.globals.previousPaths[r].paths[0].d)}return n}getDataPointsPos(e,t,n=this.dataPointsLen){e||=[],t||=[];let r=[];for(let i=0;i<n;i++){let n={};n.x=e[i]*Math.sin(t[i]),n.y=-e[i]*Math.cos(t[i]),r.push(n)}return r}},hx=class extends fx{constructor(e,t){super(e,t),this.ctx=t,this.w=e,this.animBeginArr=[0],this.animDur=0,this.startAngle=e.config.plotOptions.radialBar.startAngle,this.endAngle=e.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(e.config.plotOptions.radialBar.endAngle-e.config.plotOptions.radialBar.startAngle),this.trackStartAngle=e.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=e.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||=this.startAngle,this.trackEndAngle||=this.endAngle,this.endAngle===360&&(this.endAngle=359.99),this.margin=parseInt(e.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(e){let t=this.w,n=new Z(this.w),r=n.group({class:`apexcharts-radialbar`});if(t.globals.noData)return r;let i=n.group(),a=t.layout.gridHeight/2,o=t.layout.gridWidth/2,s=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(s=s-t.config.stroke.width-t.config.chart.dropShadow.blur);let c=t.globals.fill.colors,l=t.config.plotOptions.radialBar,u=Array.isArray(l.bands)&&l.bands.length>0,d=u&&l.bandsStyle&&l.bandsStyle.hideTrackWhenPresent,f=l.shape===`needle`;if(l.track.show&&!d){let t=this.drawTracks({size:s,centerX:o,centerY:a,colorArr:c,series:e});i.add(t)}if(u){let t=this.drawBands({size:s,centerX:o,centerY:a,series:e});i.add(t)}let p=this.drawArcs({size:s,centerX:o,centerY:a,colorArr:c,series:e,skipValueArc:f&&!l.needle?.showValueArc});if(l.ticks&&l.ticks.show){let n=this.drawTicks({size:s,centerX:o,centerY:a,series:e});if(this.initialAnim&&!t.globals.dataChanged&&!t.globals.resized&&d_.isBrowser()&&t.globals.shouldAnimate){let e=n.node;e.style.opacity=`0`,e.style.transition=`opacity 280ms ease-out`;let r=t.config.chart.animations.speed||800;setTimeout(()=>{e.style.opacity=`1`},r)}i.add(n)}if(f){let t=this.drawNeedle({size:s,centerX:o,centerY:a,series:e});i.add(t)}let m=360;t.config.plotOptions.radialBar.startAngle<0&&(m=this.totalAngle);let h=(360-m)/360;if(t.globals.radialSize=s-s*h,this.radialDataLabels.value.show){let e=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=e*h}return i.add(p.g),t.config.plotOptions.radialBar.hollow.position===`front`&&(p.g.add(p.elHollow),p.dataLabels&&p.g.add(p.dataLabels)),r.add(i),r}drawTracks(e){let t=this.w,n=new Z(this.w),r=n.group({class:`apexcharts-tracks`}),i=new ng(this.w),a=new tg(this.w),o=this.getStrokeWidth(e);e.size-=o/2;for(let s=0;s<e.series.length;s++){let c=n.group({class:`apexcharts-radialbar-track apexcharts-track`});r.add(c),c.attr({rel:s+1}),e.size=e.size-o-this.margin;let l=t.config.plotOptions.radialBar.track,u=a.fillPath({seriesNumber:0,size:e.size,fillColors:Array.isArray(l.background)?l.background[s]:l.background,solid:!0}),d=this.trackStartAngle,f=this.trackEndAngle;Math.abs(f)+Math.abs(d)>=360&&(f=360-Math.abs(this.startAngle)-.1);let p=n.drawPath({d:``,stroke:u,strokeWidth:o*parseInt(l.strokeWidth,10)/100,fill:`none`,strokeOpacity:l.opacity,classes:`apexcharts-radialbar-area`});if(l.dropShadow.enabled){let e=l.dropShadow;i.dropShadow(p,e)}c.add(p),p.attr(`id`,`apexcharts-radialbarTrack-`+s),this.animatePaths(p,{centerX:e.centerX,centerY:e.centerY,endAngle:f,startAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}drawArcs(e){let t=this.w,n=new Z(this.w),r=new tg(this.w),i=new ng(this.w),a=n.group(),o=this.getStrokeWidth(e);e.size-=o/2;let s=t.config.plotOptions.radialBar.hollow.background,c=e.size-o*e.series.length-this.margin*e.series.length-o*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,l=c-t.config.plotOptions.radialBar.hollow.margin;t.config.plotOptions.radialBar.hollow.image!==void 0&&(s=this.drawHollowImage(e,a,c,s));let u=this.drawHollow({size:l,centerX:e.centerX,centerY:e.centerY,fill:s||`transparent`});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){let e=t.config.plotOptions.radialBar.hollow.dropShadow;i.dropShadow(u,e)}let d=1;!this.radialDataLabels.total.show&&t.seriesData.series.length>1&&(d=0);let f=null;if(this.radialDataLabels.show){let n=t.dom.Paper.findOne(`.apexcharts-datalabels-group`);f=this.renderInnerDataLabels(n,this.radialDataLabels,{hollowSize:c,centerX:e.centerX,centerY:e.centerY,opacity:d})}t.config.plotOptions.radialBar.hollow.position===`back`&&(a.add(u),f&&a.add(f));let p=!1;t.config.plotOptions.radialBar.inverseOrder&&(p=!0);let m=this.ctx.morphTypeChange?.isActive()===!0;for(let s=p?e.series.length-1:0;p?s>=0:s<e.series.length;p?s--:s++){let c=n.group({class:`apexcharts-series apexcharts-radial-series`,seriesName:$.escapeString(t.seriesData.seriesNames[s])});a.add(c),c.attr({rel:s+1,"data:realIndex":s}),cg.addCollapsedClassToSeries(this.w,c,s),e.size=e.size-o-this.margin;let l=r.fillPath({seriesNumber:s,size:e.size,value:e.series[s]}),u=this.startAngle,d,f=t.config.plotOptions.radialBar,p=typeof f.min==`number`?f.min:0,h=typeof f.max==`number`?f.max:100,g=h===p?1:h-p,_=e=>{let t=Math.min(Math.max(e,p),h);return Math.max(0,(t-p)/g)},v=_($.negToZero(e.series[s])),y=Math.round(this.totalAngle*v)+this.startAngle,b;t.globals.dataChanged&&(d=this.startAngle,b=Math.round(this.totalAngle*_($.negToZero(t.globals.previousPaths[s])))+d),Math.abs(y)+Math.abs(u)>360&&(y-=.01),Math.abs(b)+Math.abs(d)>360&&(b-=.01);let x=y-u,S=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[s]:t.config.stroke.dashArray,C=m?this.ctx.morphTypeChange.getInitialPathFor(s,0):null,w=m?this.ctx.morphTypeChange.getFromType():null,T=!!C&&(w===`bar`||w===`funnel`||w===`pyramid`||w===`pie`||w===`donut`||w===`polarArea`),E=n.drawPath({d:C||``,stroke:T||e.skipValueArc?`transparent`:l,strokeWidth:T||e.skipValueArc?0:o,fill:T?l:`none`,fillOpacity:t.config.fill.opacity,classes:`apexcharts-radialbar-area apexcharts-radialbar-slice-`+s,strokeDashArray:S}),D=u+x/2,O=$.polarToCartesian(e.centerX,e.centerY,e.size,D);if(Z.setAttrs(E.node,{"data:angle":x,"data:value":e.series[s],"data:cx":O.x,"data:cy":O.y}),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;i.dropShadow(E,e,s)}if(i.setSelectionFilter(E,0,s),this.addListeners(E,this.radialDataLabels),c.add(E),E.attr({index:0,j:s}),this.barLabels.enabled){let r=$.polarToCartesian(e.centerX,e.centerY,e.size,u),i=this.barLabels.formatter(t.seriesData.seriesNames[s],{seriesIndex:s,w:t}),a=[`apexcharts-radialbar-label`];this.barLabels.onClick||a.push(`apexcharts-no-click`);let o=this.barLabels.useSeriesColors?t.globals.colors[s]:t.config.chart.foreColor;o||=t.config.chart.foreColor;let l=r.x+this.barLabels.offsetX,d=r.y+this.barLabels.offsetY,f=n.drawText({x:l,y:d,text:i,textAnchor:`end`,dominantBaseline:`middle`,fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:o,cssClass:a.join(` `)});f.on(`click`,this.onBarLabelClick),f.attr({rel:s+1}),u!==0&&f.attr({"transform-origin":`${l} ${d}`,transform:`rotate(${u} 0 0)`}),c.add(f)}let k=0;if(this.initialAnim&&!t.globals.resized&&!t.globals.dataChanged&&(k=t.config.chart.animations.speed),t.globals.dataChanged&&(k=t.config.chart.animations.dynamicAnimation.speed),this.animDur=k/(e.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),m&&C){let t=this.ctx.morphTypeChange.getSpeed(),n=this.getPiePath({me:this,startAngle:u,angle:x,size:e.size});if(T){let r=this.ctx.morphTypeChange.buildRingSegmentPath(e.centerX,e.centerY,e.size,o,u,u+x);E.animate(t).plot(r,`polygons`).after(function(){this.attr({d:n,fill:`none`,stroke:e.skipValueArc?`transparent`:l,"stroke-width":e.skipValueArc?0:o})})}else E.animate(t).plot(n,`polygons`).attr({"stroke-width":o})}else this.animatePaths(E,{centerX:e.centerX,centerY:e.centerY,endAngle:y,startAngle:u,prevEndAngle:b,prevStartAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:this.animBeginArr,dur:k,shouldSetPrevPaths:!0})}return{g:a,elHollow:u,dataLabels:f}}_angleAtValue(e){let t=this.w.config.plotOptions.radialBar,n=typeof t.min==`number`?t.min:0,r=typeof t.max==`number`?t.max:100,i=r===n?n+1:r,a=(Math.max(n,Math.min(i,Number(e)))-n)/(i-n);return this.startAngle+a*(this.endAngle-this.startAngle)}_describeArc(e,t,n,r,i){let a=$.polarToCartesian(e,t,n,i),o=$.polarToCartesian(e,t,n,r),s=i-r,c=Math.abs(s)>180?1:0;return`M ${a.x} ${a.y} A ${n} ${n} 0 ${c} 0 ${o.x} ${o.y}`}drawBands(e){let t=this.w,n=new Z(this.w),r=t.config.plotOptions.radialBar,i=r.bands||[],a=n.group({class:`apexcharts-gauge-bands`}),o=this.getStrokeWidth(e),s=e.size-o/2-o-this.margin,c=o*parseInt(r.bandsStyle.strokeWidth,10)/100,l=typeof r.min==`number`?r.min:0,u=typeof r.max==`number`?r.max:100,d=u===l?0:(r.bandsStyle.gap||0)*((this.endAngle-this.startAngle)/(u-l));for(let t=0;t<i.length;t++){let o=i[t];if(o.from===void 0||o.to===void 0)continue;let l=this._angleAtValue(o.from),u=this._angleAtValue(o.to),f=Math.min(l,u)+d/2,p=Math.max(l,u)-d/2;if(p-f<=0)continue;let m=n.drawPath({d:this._describeArc(e.centerX,e.centerY,s,f,p),stroke:o.color||`#ccc`,strokeWidth:c,fill:`none`,strokeLinecap:r.bandsStyle.linecap||`butt`,classes:`apexcharts-gauge-band`});m.node.setAttribute(`data-band-index`,String(t)),a.add(m)}return a}drawTicks(e){let t=this.w,n=new Z(this.w),r=t.config.plotOptions.radialBar,i=r.ticks,a=n.group({class:`apexcharts-gauge-ticks`}),o=this.getStrokeWidth(e),s=e.size-o/2-o-this.margin,c=typeof r.min==`number`?r.min:0,l=typeof r.max==`number`?r.max:100,u=Math.max(2,i.major?.count??11),d=Math.max(0,i.minor?.count??0),f=(t,r,o)=>{let c=this._angleAtValue(t),l=r.length??8,u=r.placement===`inside`?s-l:s,d=r.placement===`inside`?s:s+l,f=$.polarToCartesian(e.centerX,e.centerY,u,c),p=$.polarToCartesian(e.centerX,e.centerY,d,c),m=n.drawLine(f.x,f.y,p.x,p.y,r.color||(o?`#666`:`#999`),0,r.width||(o?2:1));if(a.add(m),o&&i.labels?.show){let o=(r.placement===`inside`?u:d)+(r.placement===`inside`?-1:1)*(i.labels.offset??6),s=$.polarToCartesian(e.centerX,e.centerY,o,c),l=typeof i.labels.formatter==`function`?i.labels.formatter(t):String(t),f=n.drawText({x:s.x,y:s.y,text:l,textAnchor:`middle`,dominantBaseline:`middle`,fontFamily:i.labels.fontFamily,fontSize:i.labels.fontSize,fontWeight:i.labels.fontWeight,foreColor:i.labels.color,cssClass:`apexcharts-gauge-tick-label`});a.add(f)}};for(let e=0;e<u;e++)if(f(c+e/(u-1)*(l-c),i.major||{},!0),e<u-1&&d>0)for(let t=1;t<=d;t++)f(c+(e+t/(d+1))/(u-1)*(l-c),i.minor||{},!1);return a}drawNeedle(e){let t=this.w,n=new Z(this.w),r=t.config.plotOptions.radialBar.needle||{},i=n.group({class:`apexcharts-gauge-needle`});if(!e.series||e.series.length===0)return i;let a=this.getStrokeWidth(e),o=e.size-a/2-a-this.margin,s=typeof r.length==`string`&&r.length.endsWith(`%`)?o*parseInt(r.length,10)/100:Number(r.length||o*.85),c=r.baseWidth??4,l=r.tipWidth??1,u=r.color||`#333`,d=e.centerX,f=Number(r.offsetY??0),p=e.centerY+f,m=`M ${d+c/2} ${p} A ${c/2} ${c/2} 0 0 1 ${d-c/2} ${p} L ${d-l/2} ${p-s} L ${d+l/2} ${p-s} Z`,h=n.drawPath({d:m,stroke:u,strokeWidth:0,fill:u,classes:`apexcharts-gauge-needle-shape`});i.add(h);let g=Number(e.series[0]),_=this._angleAtValue(g),v=this.initialAnim&&!t.globals.dataChanged&&!t.globals.resized,y=this.ctx,b=typeof y._lastNeedleAngle==`number`?y._lastNeedleAngle:this.startAngle;if(y._lastNeedleAngle=_,d_.isBrowser()&&t.globals.shouldAnimate&&(v||t.globals.dataChanged)&&b!==_){let e=i.node;e.setAttribute(`transform-origin`,`${d} ${p}`),e.setAttribute(`transform`,`rotate(${b})`);let n=r.animation?.duration&&Number(r.animation.duration)||r.animationSpeed&&Number(r.animationSpeed)||t.config.chart.animations.dynamicAnimation?.speed||t.config.chart.animations.speed||800,a=1.70158;a+1;let o=v?e=>1+2.70158*(e-1)**3+a*(e-1)**2:e=>1-(1-e)**3;t.globals.radialNeedleRAF!=null&&(Q.cancelAnimationFrame(t.globals.radialNeedleRAF),t.globals.radialNeedleRAF=null);let s=performance.now(),c=r=>{if(this.w.globals.isDestroyed){t.globals.radialNeedleRAF=null;return}let i=Math.max(0,Math.min(1,(r-s)/n)),a=b+(_-b)*o(i);e.setAttribute(`transform`,`rotate(${a})`),i<1?t.globals.radialNeedleRAF=Q.requestAnimationFrame(c):t.globals.radialNeedleRAF=null};t.globals.radialNeedleRAF=Q.requestAnimationFrame(c)}else i.attr({"transform-origin":`${d} ${p}`,transform:`rotate(${_})`});return i}drawHollow(e){let t=new Z(this.w),n=this.w.config.plotOptions.radialBar.hollow,r=t.drawCircle(e.size*2),i={class:`apexcharts-radialbar-hollow`,cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill};return(n.stroke||n.strokeDasharray)&&(i.stroke=n.stroke||`transparent`,i[`stroke-width`]=n.strokeWidth??1,n.strokeDasharray&&(i[`stroke-dasharray`]=n.strokeDasharray)),r.attr(i),r}drawHollowImage(e,t,n,r){let i=this.w,a=new tg(this.w),o=$.randomId(),s=i.config.plotOptions.radialBar.hollow.image;if(i.config.plotOptions.radialBar.hollow.imageClipped)a.clippedImgArea({width:n,height:n,image:s,patternID:`pattern${i.globals.cuid}${o}`}),r=`url(#pattern${i.globals.cuid}${o})`;else{let n=i.config.plotOptions.radialBar.hollow.imageWidth,r=i.config.plotOptions.radialBar.hollow.imageHeight;if(n===void 0&&r===void 0){let n=i.dom.Paper.image(s,function(t){this.move(e.centerX-t.width/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-t.height/2+i.config.plotOptions.radialBar.hollow.imageOffsetY)});t.add(n)}else{let a=i.dom.Paper.image(s,function(){this.move(e.centerX-n/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-r/2+i.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(n,r)});t.add(a)}}return r}getStrokeWidth(e){let t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}onBarLabelClick(e){let t=e.target,n=parseInt(t.getAttribute(`rel`)??``,10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.seriesData.seriesNames[n],{w:i,seriesIndex:n})}},gx=class extends Eb{draw(e,t){let n=this.w,r=new Z(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=n.rangeData.seriesRangeStart,this.seriesRangeEnd=n.rangeData.seriesRangeEnd,this.barHelpers.initVariables(e);let i=r.group({class:`apexcharts-rangebar-series apexcharts-plot-series`});for(let a=0;a<e.length;a++){let o,s,c=n.globals.comboCharts?t[a]:a,{columnGroupIndex:l}=this.barHelpers.getGroupIndex(c),u=r.group({class:`apexcharts-series`,seriesName:$.escapeString(n.seriesData.seriesNames[c]),rel:a+1,"data:realIndex":c});cg.addCollapsedClassToSeries(this.w,u,c),e[a].length>0&&(this.visibleI+=1);let d=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[c][0],d=c);let f=this.barHelpers.initialPositions(c),{y:p,zeroW:m,x:h,zeroH:g}=f,_=f.barWidth??0,v=f.barHeight??0,y=f.yDivision??0,b=f.xDivision??0;s=p,o=h;let x=r.group({class:`apexcharts-datalabels`,"data:realIndex":c}),S=r.group({class:`apexcharts-rangebar-goals-markers`});for(let t=0;t<n.globals.dataPoints;t++){let r=this.barHelpers.getStrokeWidth(a,t,c),i=this.seriesRangeStart[a][t],p=this.seriesRangeEnd[a][t],h=null,C=null,w=null,T={x:o,y:s,strokeWidth:r,elSeries:u},E=this.seriesLen;if(n.config.plotOptions.bar.rangeBarGroupRows&&(E=1),n.config.series[a].data?.[t]===void 0)break;if(this.isHorizontal){w=s+v*this.visibleI;let e=(y-v*E)/2;if(n.config.series[a].data?.[t]?.x){let n=this.detectOverlappingBars({i:a,j:t,barYPosition:w,srty:e,barHeight:v,yDivision:y,initPositions:f});v=n.barHeight,w=n.barYPosition}h=this.drawRangeBarPaths(Y({indexes:{i:a,j:t,realIndex:c},barHeight:v,barYPosition:w,zeroW:m,yDivision:y,y1:i,y2:p},T)),_=h.barWidth}else{n.axisFlags.isXNumeric&&(o=(n.seriesData.seriesX[a][t]-n.globals.minX)/this.xRatio-_/2),C=o+_*this.visibleI;let e=(b-_*E)/2;if(n.config.series[a].data?.[t]?.x){let n=this.detectOverlappingBars({i:a,j:t,barXPosition:C,srtx:e,barWidth:_,xDivision:b,initPositions:f});_=n.barWidth,C=n.barXPosition}h=this.drawRangeColumnPaths(Y({indexes:{i:a,j:t,realIndex:c,translationsIndex:d},barWidth:_,barXPosition:C,zeroH:g,xDivision:b},T)),v=h.barHeight}let D=this.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:w,goalX:h.goalX,goalY:h.goalY,barHeight:v,barWidth:_});D&&S.add(D),s=h.y,o=h.x;let O=this.barHelpers.getPathFillColor(e,a,t,c);this.renderSeries({realIndex:c,pathFill:O.color,lineFill:O.useRangeColor?O.color:n.globals.stroke.colors[c],j:t,i:a,x:o,y:s,y1:i,y2:p,pathFrom:h.pathFrom,pathTo:h.pathTo,strokeWidth:r,elSeries:u,series:e,barHeight:v,barWidth:_,barXPosition:C,barYPosition:w,columnGroupIndex:l,elDataLabelsWrap:x,elGoalsMarkers:S,visibleSeries:this.visibleI,type:`rangebar`})}i.add(u)}return i}detectOverlappingBars({i:e,j:t,barYPosition:n,barXPosition:r,srty:i,srtx:a,barHeight:o,barWidth:s,yDivision:c,xDivision:l,initPositions:u}){let d=this.w,f=[],p=d.globals.seriesRangeName?.[e]?.[t],m=d.config.series[e].data?.[t]?.x,h=Array.isArray(m)?m.join(` `):m,g=d.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(h),_=d.rangeData.seriesRange[e].findIndex(e=>e.x===h&&e.overlaps?.size>0);return this.isHorizontal?(n=d.config.plotOptions.bar.rangeBarGroupRows?i+c*g:i+o*this.visibleI+c*g,_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(d.rangeData.seriesRange[e][_].overlaps),f.indexOf(p)>-1&&(o=u.barHeight/f.length,n=o*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+f.indexOf(p))+c*g))):(g>-1&&!d.labelData.timescaleLabels.length&&(r=d.config.plotOptions.bar.rangeBarGroupRows?a+l*g:a+s*this.visibleI+l*g),_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(d.rangeData.seriesRange[e][_].overlaps),f.indexOf(p)>-1&&(s=u.barWidth/f.length,r=s*this.visibleI+l*(100-parseInt(this.barOptions.barWidth,10))/100/2+s*(this.visibleI+f.indexOf(p))+l*g))),{barYPosition:n,barXPosition:r,barHeight:o,barWidth:s}}drawRangeColumnPaths({indexes:e,x:t,xDivision:n,barWidth:r,barXPosition:i,zeroH:a}){let o=this.w,{i:s,j:c,realIndex:l,translationsIndex:u}=e,d=this.yRatio[u],f=this.getRangeValue(l,c),p=Math.min(f.start,f.end),m=Math.max(f.start,f.end),h=!(this.series[s]?.[c]===void 0||this.series[s]?.[c]===null);h?(p=a-p/d,m=a-m/d):p=a;let g=Math.abs(m-p),_=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:r,y1:p,y2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l,i:l,j:c,w:o});if(h){let e=_.drawnBox,t=f.end>=f.start;this.recordColumnGeometry(l,c,{slotStart:e.x1,slotEnd:e.x2,levelStart:t?e.y1:e.y2,levelEnd:t?e.y2:e.y1,horizontal:!1})}if(!o.axisFlags.isXNumeric)t+=n;else{let e=this.getBarXForNumericXAxis({x:t,j:c,realIndex:l,barWidth:r});t=e.x,i=e.barXPosition}return{pathTo:_.pathTo,pathFrom:_.pathFrom,barHeight:g,x:t,y:f.start<0&&f.end<0?p:m,goalY:this.barHelpers.getGoalValues(`y`,null,a,l,c,u),barXPosition:i}}preventBarOverflow(e){let t=this.w;return e<0&&(e=0),e>t.layout.gridWidth&&(e=t.layout.gridWidth),e}drawRangeBarPaths({indexes:e,y:t,y1:n,y2:r,yDivision:i,barHeight:a,barYPosition:o,zeroW:s}){let c=this.w,{realIndex:l,j:u}=e,d=this.preventBarOverflow(s+n/this.invertedYRatio),f=this.preventBarOverflow(s+r/this.invertedYRatio),p=this.getRangeValue(l,u),m=Math.abs(f-d),h=this.barHelpers.getBarpaths({barYPosition:o,barHeight:a,x1:d,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l,realIndex:l,j:u,w:c});if(p.start!=null&&p.end!=null){let e=h.drawnBox;this.recordColumnGeometry(l,u,{slotStart:e.y1,slotEnd:e.y2,levelStart:e.x1,levelEnd:e.x2,horizontal:!0})}return c.axisFlags.isXNumeric||(t+=i),{pathTo:h.pathTo,pathFrom:h.pathFrom,barWidth:m,x:p.start<0&&p.end<0?d:f,goalX:this.barHelpers.getGoalValues(`x`,s,null,l,u,0),y:t}}recordColumnGeometry(e,t,n){let r=this.w.waterfallData&&this.w.waterfallData.geometry;r&&(!isFinite(n.slotStart)||!isFinite(n.levelEnd)||(r[e]||(r[e]=[]),r[e][t]=n))}getRangeValue(e,t){let n=this.w;return{start:n.rangeData.seriesRangeStart[e][t],end:n.rangeData.seriesRangeEnd[e][t]}}};function _x(e,t){let n=0;for(let t=0;t<e.length;t++)n+=e[t];let r=t/n,i=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]*r;return i}function vx(e,t,n,r){let i=r*r,a=n*n;return Math.max(i*t/a,a/(i*e))}function yx(e,t,n,r,i,a){return e===0?!0:vx(t,n,r,a)>=vx(Math.min(t,i),Math.max(n,i),r+i,a)}function bx(e,t,n,r,i,a,o,s){if(o>=s){let o=r/s,c=a;for(let r=0;r<n;r++){let n=t[r]/o;e.push([i,c,i+o,c+n]),c+=n}}else{let s=r/o,c=i;for(let r=0;r<n;r++){let n=t[r]/s;e.push([c,a,c+n,a+s]),c+=n}}}function xx(e,t,n,r,i){let a=[],o=e.length;if(o===0)return a;let s=Array(o),c=0,l=0,u=1/0,d=-1/0,f=0;for(;f<o;){let o=Math.min(r,i),p=e[f];if(yx(c,u,d,l,p,o))s[c]=p,c++,l+=p,p<u&&(u=p),p>d&&(d=p),f++;else{if(bx(a,s,c,l,t,n,r,i),r>=i){let e=l/i;t+=e,r-=e}else{let e=l/r;n+=e,i-=e}c=0,l=0,u=1/0,d=-1/0}}return c>0&&bx(a,s,c,l,t,n,r,i),a}function Sx(e,t,n){let r=e.length,i=Array(r);for(let t=0;t<r;t++){let n=0,r=e[t];for(let e=0;e<r.length;e++)n+=r[e];i[t]=n}let a=xx(_x(i,t*n),0,0,t,n),o=Array(r);for(let t=0;t<r;t++){let n=a[t],r=n[0],i=n[1],s=n[2]-r,c=n[3]-i;o[t]=xx(_x(e[t],s*c),r,i,s,c)}return o}function Cx(e){let t=e.children;if(t&&t.length){let n=0;for(let e=0;e<t.length;e++)n+=Cx(t[e]);return e._area=n,n}let n=Number(e.value),r=isNaN(n)?0:Math.abs(n);return e._area=r,r}function wx(e,t,n,r,i,a,o,s){let c=e.length;if(c===0||r<=0||i<=0)return;let l=Array(c),u=0;for(let t=0;t<c;t++)l[t]=e[t]._area,u+=l[t];if(u<=0)return;let d=xx(_x(l,r*i),t,n,r,i);for(let t=0;t<c;t++){let n=e[t],r=d[t];if(!r)continue;n.rect=r,n.depth=a;let i=n.children;if(!i||!i.length)continue;let c=r[2]-r[0],l=r[3]-r[1],u=Math.max(0,o(n,a,c,l)||0);(u*2>=c||u*2>=l)&&(u=0);let f=Math.max(0,s(n,a,c,l)||0);f>0&&l-u*2-f<f&&(f=0),n.headerHeight=f,wx(i,r[0]+u,r[1]+f+u,c-u*2,l-f-u*2,a+1,o,s)}}function Tx(e,t,n,r={}){if(!Array.isArray(e)||e.length===0)return e||[];let i=r.padding||(()=>0),a=r.header||(()=>0);for(let t=0;t<e.length;t++)Cx(e[t]);return wx(e,0,0,t,n,0,i,a),e}var Ex={generate:Sx,generateNested:Tx};function Dx(e,t){let n=e.config.drilldown;return(n&&Array.isArray(n.series)?n.series:[]).find(e=>e&&e.id===t)}function Ox(e,t,n,r,i,a=null,o={}){let s=t&&typeof t==`object`,c=s?t.x??t.name??``:``,l=s?Number(t.y??t.value):Number(t),u={name:String(c),value:isNaN(l)?null:l,color:s&&t.color?t.color:void 0,_key:`${i}/${n}:${c}`};if(r&&!u.color&&(u.color=r[n%r.length]),o.keepDatum&&(u._datum=t),s&&Array.isArray(t.children)&&t.children.length)u.children=t.children.map((t,n)=>Ox(e,t,n,null,u._key,a,o));else if(s&&t.drilldown!=null&&o.expandDrilldown!==!1){let n=a||new Set;if(!n.has(t.drilldown)){let r=Dx(e,t.drilldown);if(r&&Array.isArray(r.data)&&r.data.length){let i=new Set(n);i.add(t.drilldown);let a=Array.isArray(r.colors)?r.colors:null;u.children=r.data.map((t,n)=>Ox(e,t,n,a,u._key,i,o))}}}return u}function kx(e,t={}){let n=e.config.series,r=n&&n[0],i=r&&Array.isArray(r.data)?r.data:n;return Array.isArray(i)?i.map((n,r)=>Ox(e,n,r,null,``,null,t)):[]}function Ax(e,t,n={}){let r=t||e.config.series;return Array.isArray(r)?r.map((t,r)=>{let i=t&&Array.isArray(t.data)?t.data:[],a=`${r}:${t?.name??``}`;return{name:String(t?.name??``),value:null,color:t?.color||void 0,_key:a,_seriesIndex:r,children:i.map((t,r)=>Ox(e,t,r,null,a,null,n))}}):[]}function jx(e){e.children&&e.children.length&&(e.children.forEach(e=>jx(e)),(e.value==null||isNaN(e.value))&&(e.value=e.children.reduce((e,t)=>e+Math.max(0,t.value||0),0))),(e.value==null||isNaN(e.value))&&(e.value=0)}function Mx(e){if(typeof e!=`string`)return``;let t=e.indexOf(`/`);return t===-1?``:e.slice(t)}function Nx(e){let t=[],n=0;return e.forEach((e,r)=>{let i=[],a=(e,t,o)=>{e._parent=o,e._depth=t,e._si=r,e._leaf=!(e.children&&e.children.length),t>n&&(n=t),e._leaf?(e._di=i.length,i.push(e)):(e._di=-1,e.children.forEach(n=>a(n,t+1,e)))};a(e,0,null),t.push(i)}),{leaves:t,maxDepth:n}}function Px(e){let t=e.globals.treemapRoots;if(t&&t.length)return{roots:t,maxDepth:e.globals.treemapMaxDepth||1,nested:!0};let n=Ax(e,e.config.series,{keepDatum:!0,expandDrilldown:!1});n.forEach(jx);let{maxDepth:r}=Nx(n);return{roots:n,maxDepth:r,nested:!1}}var Fx=e=>(e[2]-e[0])*(e[3]-e[1]),Ix=class{constructor(e,t){this.ctx=t,this.w=e,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Kb(e,t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[],this.roots=[],this.drawn=[],this.nested=!1,this.showParents=!1,this.scale=null,this._levelCache=null,this._total=null,this._avgLabelSize=null,this._tooltipEl=null,this._tipOwned=!1,this._morphLeafIndex=0}draw(e){let t=this.w,n=new Z(this.w,this.ctx),r=new tg(this.w),i=n.group({class:`apexcharts-treemap`});if(t.globals.noData)return i;e.forEach(e=>{e.map(e=>Math.abs(e))}),this.negRange=this.helpers.checkColorRange(),t.config.series.forEach((e,t)=>{e.data.forEach(e=>{Array.isArray(this.labels[t])||(this.labels[t]=[]),this.labels[t].push(e.x)})});let a=Px(t);this.nested=a.nested,this.roots=a.roots,this.scale=O_(t);let o=a.roots.length===1?a.roots[0].children||[]:a.roots;this.drawn=o;let s=t.config.plotOptions.treemap.parents;this.showParents=s.show===!0||s.show!==!1&&this.nested;let c=this._resolveFocus(o),l=c?[c]:o;Ex.generateNested(l,t.layout.gridWidth,t.layout.gridHeight,{padding:(e,t,n,r)=>this.showParents?this._levelPadding(t,n,r):0,header:(e,t,n,r)=>this.showParents?this._levelHeader(e,t,n,r):0});let u=this.ctx?.morphTypeChange,d=!!u&&typeof u.isActive==`function`&&u.isActive()&&typeof u.getInitialPathAt==`function`;this._morphLeafIndex=0;let f=this._leavesBySeries(l,t.config.series.length),p=this.showParents?this._parentsBySeries(l,t.config.series.length):[];return f.forEach((a,o)=>{let s=n.group({class:`apexcharts-series apexcharts-treemap-series`,seriesName:$.escapeString(t.seriesData.seriesNames[o]),rel:o+1,"data:realIndex":o});if(n.setupEventDelegation(s,`.apexcharts-treemap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new ng(this.w).dropShadow(i,e,o)}let c=n.group({class:`apexcharts-data-labels`}),l={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};this.showParents&&(p[o]||[]).forEach(e=>{this._drawParent(s,e,o)});let u=t.config.chart.animations,f=u.animateGradually,m=f&&f.enabled!==!1,h=Array(a.length).fill(0);if(m){let e=a.length||1,t=Math.min(f.delay||0,u.speed*.5/e);a.map((e,t)=>({j:t,area:e.rect?Fx(e.rect):0})).sort((e,t)=>t.area-e.area).forEach((e,n)=>{h[e.j]=n*t})}a.forEach((i,a)=>{let c=i.rect;if(!c)return;let u=i._di,f=c[0],p=c[1],m=c[2],g=c[3];l.xMin=Math.min(l.xMin,f),l.yMin=Math.min(l.yMin,p),l.xMax=Math.max(l.xMax,m),l.yMax=Math.max(l.yMax,g);let _=this._leafColor(o,u),v=_.color,y=r.fillPath({color:v,seriesNumber:o,dataPointIndex:u}),b=d?this._morphSourceForLeaf(i):null,x=b?n.drawPath({d:this._tilePath(f,p,m,g),fill:`#fff`,stroke:t.config.plotOptions.treemap.useFillColorAsStroke?v:t.globals.stroke.colors[o],strokeWidth:this.strokeWidth,fillOpacity:1}):n.drawRect(f,p,m-f,g-p,t.config.plotOptions.treemap.borderRadius,`#fff`,1,this.strokeWidth,t.config.plotOptions.treemap.useFillColorAsStroke?v:t.globals.stroke.colors[o]);x.attr({cx:f,cy:p,index:o,i:o,j:u,width:m-f,height:g-p,fill:y}),x.node.classList.add(`apexcharts-treemap-rect`),x.node.setAttribute(`data:key`,Mx(i._key));let S={x:f+(m-f)/2,y:p+(g-p)/2,width:0,height:0},C={x:f,y:p,width:m-f,height:g-p};if(b)this._morphTile(x,b,this._tilePath(f,p,m,g),this.ctx.morphTypeChange.getSpeed(),o,u);else if(t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;t.globals.resized||(e=t.config.chart.animations.speed),this.animateTreemap(x,S,C,e,h[a]||0)}if(t.globals.dataChanged){let e=1;this.dynamicAnim.enabled&&t.globals.shouldAnimate&&(e=this.dynamicAnim.speed,t.globals.previousPaths[o]&&t.globals.previousPaths[o][u]&&t.globals.previousPaths[o][u].rect&&(S=t.globals.previousPaths[o][u].rect),this.animateTreemap(x,S,C,e))}let w=this.getFontSize(c);t.config.plotOptions.treemap.dataLabels.format===`truncate`&&(w=parseInt(String(t.config.dataLabels.style.fontSize),10));let T=null;if(t.config.dataLabels.enabled&&this._labelCanShow(w,m-f,g-p)){let n=t.config.dataLabels.formatter(this.labels[o][u],{value:t.seriesData.series[o][u],seriesIndex:o,dataPointIndex:u,w:t});t.config.plotOptions.treemap.dataLabels.format===`truncate`&&(n=this.truncateLabels(String(n),w,f,p,m,g)),t.seriesData.series[o][u]&&(T=this.helpers.calculateDataLabels({text:n,x:(f+m)/2,y:(p+g)/2+this.strokeWidth/2+w/3,i:o,j:u,colorProps:_,fontSize:w,series:e})),t.config.dataLabels.enabled&&T&&this.rotateToFitLabel(T,w,n,f,p,m,g)}s.add(x),T!==null&&s.add(T)});let g=t.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&t.config.series.length>1&&g&&g.show){let e=t.config.series[o].name||``;if(e&&l.xMin<1/0&&l.yMin<1/0){let{offsetX:r,offsetY:i,borderColor:a,borderWidth:o,borderRadius:c,style:u}=g,d=u.color||t.config.chart.foreColor,f={left:u.padding.left,right:u.padding.right,top:u.padding.top,bottom:u.padding.bottom},p=n.getTextRects(e,u.fontSize,u.fontFamily),m=p.width+f.left+f.right,h=p.height+f.top+f.bottom,_=l.xMin+(r||0),v=l.yMin+(i||0),y=n.drawRect(_,v,m,h,c,u.background,1,o,a),b=n.drawText({x:_+f.left,y:v+f.top+(p?.height??0)*.75,text:e,fontSize:u.fontSize,fontFamily:u.fontFamily,fontWeight:u.fontWeight,foreColor:d,cssClass:u.cssClass||``});s.add(y),s.add(b)}}s.add(c),i.add(s)}),this._renderBreadcrumb(),i}_levelCfg(e){if(this._levelCache||=[],this._levelCache[e])return this._levelCache[e];let t=this.w.config.plotOptions.treemap,n=t.parents||{},r=(t.levels||[])[e]||{},i=X(Y(Y({},n),r),{header:X(Y(Y({},n.header||{}),r.header||{}),{style:Y(Y({},(n.header||{}).style||{}),(r.header||{}).style||{})}),hover:Y(Y({},n.hover||{}),r.hover||{})});return this._levelCache[e]=i,i}_levelPadding(e,t,n){let r=this._levelCfg(e);return Number(r.padding)||0}_levelHeader(e,t,n,r){let i=this._levelCfg(t).header||{};if(i.show===!1)return 0;let a=Number(i.height);return!Number.isFinite(a)||a<=0||n<(Number(i.minWidth)||40)||r<a*2?0:a}_leavesBySeries(e,t){let n=Array(Math.max(1,t));for(let e=0;e<n.length;e++)n[e]=[];let r=e=>{if(e.children&&e.children.length)e.children.forEach(r);else{let t=e._si||0;n[t]&&n[t].push(e)}};return e.forEach(r),n}_parentsBySeries(e,t){let n=Array(Math.max(1,t));for(let e=0;e<n.length;e++)n[e]=[];let r=e=>{if(!e.children||!e.children.length)return;let t=e._si||0;n[t]&&n[t].push(e),e.children.forEach(r)};return e.forEach(r),n.forEach(e=>e.sort((e,t)=>(e.depth||0)-(t.depth||0))),n}_leafColor(e,t){let n=this.w;if(this.scale){let r=T_(n,e,t);if(r!=null){let e=this.scale.at(r);return{color:e,foreColor:k_(e),colorProps:{color:e,foreColor:k_(e),percent:0}}}}return this.helpers.getShadeColor(n.config.chart.type,e,t,this.negRange)}_parentChrome(e){let t=this.w,n=this._levelCfg(e),r=t.config.theme.mode===`dark`,i=(n.header||{}).style||{},a=Math.min(e,3),o=r?255:0,s=`${o},${o},${o}`;return{fill:n.fill||`rgba(${s},${(r?.04:.03)+a*.02})`,fillOpacity:n.fillOpacity==null?1:n.fillOpacity,borderColor:n.borderColor||`rgba(${s},${r?.18:.14})`,borderWidth:n.borderWidth==null?1:n.borderWidth,borderRadius:n.borderRadius==null?t.config.plotOptions.treemap.borderRadius:n.borderRadius,headerBg:i.background||`rgba(${s},${r?.1:.07})`,headerColor:i.color||(r?`#e8e8e8`:t.config.chart.foreColor),headerFontSize:i.fontSize||`12px`,headerFontFamily:i.fontFamily||t.config.chart.fontFamily,headerFontWeight:i.fontWeight==null?600:i.fontWeight,hoverColor:n.hover&&n.hover.color||(r?`rgba(255,255,255,0.85)`:`rgba(0,0,0,0.7)`),hoverWidth:n.hover&&n.hover.width||2,hoverShow:!(n.hover&&n.hover.show===!1)}}_drawParent(e,t,n){let r=t.rect;if(!r)return;let i=this.w,a=new Z(this.w,this.ctx),o=t.depth||0,s=this._levelCfg(o),c=this._parentChrome(o),l=r[0],u=r[1],d=r[2]-r[0],f=r[3]-r[1];if(d<=0||f<=0)return;let p=a.group({class:`apexcharts-treemap-parent`,"data:depth":o,"data:name":$.escapeString(t.name)}),m=Mx(t._key),h=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(m):null,g=h?a.drawPath({d:this._tilePath(l,u,l+d,u+f),fill:c.fill,stroke:c.borderColor,strokeWidth:c.borderWidth,fillOpacity:c.fillOpacity}):a.drawRect(l,u,d,f,c.borderRadius,c.fill,c.fillOpacity,c.borderWidth,c.borderColor);g.node.classList.add(`apexcharts-treemap-parent-rect`),g.node.setAttribute(`data:key`,m),g.node.setAttribute(`data:depth`,String(o)),h&&this._morphTile(g,h,this._tilePath(l,u,l+d,u+f),this.ctx.morphTypeChange.getSpeed(),n,o),p.add(g);let _=t.headerHeight||0,v=``;if(_>0){let e=s.header||{},r=a.drawRect(l,u,d,_,0,c.headerBg,1,0,`transparent`);r.node.classList.add(`apexcharts-treemap-parent-header`),p.add(r);let f=String(t.name??``);typeof e.formatter==`function`?f=String(e.formatter(t.name,{value:t.value,depth:o,seriesIndex:n,node:t,w:i})):e.showValue&&(f=`${f} ${this._formatValue(t.value)}`),v=f;let m=Number(e.offsetX)||0,h=e.align||`left`,y=Math.max(0,d-12-Math.abs(m)),b=parseFloat(String(c.headerFontSize))||12,x=a.getTextBasedOnMaxWidth({text:f,maxWidth:y,fontSize:b});if(x){let t=l+6+m,n=`start`;h===`center`?(t=l+d/2+m,n=`middle`):h===`right`&&(t=l+d-6+m,n=`end`);let r=a.drawText({x:t,y:u+_/2+b/3+(Number(e.offsetY)||0),text:x,textAnchor:n,fontSize:c.headerFontSize,fontFamily:c.headerFontFamily,fontWeight:c.headerFontWeight,foreColor:c.headerColor,cssClass:`apexcharts-treemap-parent-label ${e.style&&e.style.cssClass||``}`});r.node.setAttribute(`pointer-events`,`none`),p.add(r)}this._attachParentEvents(r.node,t,c,g),this._makeParentAccessible(r.node,t,c,g,v)}this._attachParentEvents(g.node,t,c,g),p.node.setAttribute(`role`,`group`),p.node.setAttribute(`aria-label`,this._parentLabel(t,v)),e.add(p)}_parentLabel(e,t){let n=this._drawnTotal(),r=n>0?(e._area/n*100).toFixed(1):`0`,i=this._countLeaves(e);return`${t&&String(t).trim()?String(t).replace(/\s+/g,` `).trim():`${e.name}, ${this._formatValue(e._area)}`}, ${i} ${i===1?`item`:`items`}, ${r}% of total`}_makeParentAccessible(e,t,n,r,i){!e||!e.setAttribute||this._zoomEnabled()&&(e.setAttribute(`role`,`button`),e.setAttribute(`tabindex`,`0`),e.setAttribute(`aria-label`,`${this._parentLabel(t,i)}. Zoom in`),e.setAttribute(`aria-expanded`,`false`),!(!d_.isBrowser()||!e.addEventListener)&&(e.addEventListener(`focus`,()=>{r.node.setAttribute(`stroke`,n.hoverColor),r.node.setAttribute(`stroke-width`,String(n.hoverWidth+1))}),e.addEventListener(`blur`,()=>{r.node.setAttribute(`stroke`,n.borderColor),r.node.setAttribute(`stroke-width`,String(n.borderWidth))}),e.addEventListener(`keydown`,e=>{e.key!==`Enter`&&e.key!==` `&&e.key!==`Spacebar`||(e.preventDefault(),this._zoomTo(t,!0))})))}_attachParentEvents(e,t,n,r){if(!d_.isBrowser()||!e||!e.addEventListener)return;let i=this.w;n.hoverShow&&(e.addEventListener(`mouseenter`,()=>{r.node.setAttribute(`stroke`,n.hoverColor),r.node.setAttribute(`stroke-width`,String(n.hoverWidth))}),e.addEventListener(`mouseleave`,()=>{r.node.setAttribute(`stroke`,n.borderColor),r.node.setAttribute(`stroke-width`,String(n.borderWidth))})),i.config.tooltip.enabled&&(e.addEventListener(`mouseenter`,e=>this._showParentTooltip(e,t)),e.addEventListener(`mousemove`,e=>this._positionTooltip(e)),e.addEventListener(`mouseleave`,()=>this._hideParentTooltip())),this._zoomEnabled()&&(e.style.cursor=`pointer`,e.addEventListener(`click`,()=>this._zoomTo(t)))}_zoomEnabled(){let e=this.w,t=e.config.plotOptions.treemap.zoom;if(!t||!t.enabled||!this.showParents)return!1;let n=e.config.drilldown;return n&&n.enabled&&Array.isArray(n.series)&&n.series.length?(this._warnedZoomConflict||(this._warnedZoomConflict=!0,console.warn("ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead.")),!1):!0}_resolveFocus(e){let t=this.w.globals.treemapFocusKey;if(!t||!this._zoomEnabled())return null;let n=null,r=e=>{if(!n){if(e._key===t){n=e;return}e.children&&e.children.forEach(r)}};return e.forEach(r),n&&n.children&&n.children.length?n:null}_zoomTo(e,t=!1){let n=this.w;if(!e||!e.children||!e.children.length)return;let r=n.globals.treemapFocusKey===e._key?null:e._key;n.globals.treemapFocusKey=r,this._hideParentTooltip();let i=this.ctx.update();!t||!i||typeof i.then!=`function`||i.then(()=>{if(!d_.isBrowser())return;let e=n.dom.baseEl.querySelector(`.apexcharts-breadcrumb .apexcharts-breadcrumb-item`);if(e&&e.focus){e.focus();return}let t=n.dom.baseEl.querySelector(`.apexcharts-treemap-parent-header[tabindex]`);t&&t.focus&&t.focus()})}_focusChain(){let e=[],t=new Set(this.drawn||[]),n=this._resolveFocus(this.drawn||[]);for(;n&&(e.unshift(n),!t.has(n));)n=n._parent;return e}_breadcrumbCfg(){let e=this.w.config.plotOptions.treemap.zoom;return Cv(this.w,e&&e.breadcrumb)}_renderBreadcrumb(){if(!d_.isBrowser())return;let e=this.w;if(!e.dom.elWrap||(Dv(e),!this._zoomEnabled()))return;let t=this._focusChain();if(!t.length)return;let n=Ov(e,{ariaLabel:`Treemap breadcrumb`,config:this._breadcrumbCfg(),compact:!0,crumbs:[{label:`All`,data:null}].concat(t.map(e=>({label:e.name,data:e}))),onNavigate:(t,n)=>{e.globals.treemapFocusKey=n.data?n.data._key:null,this._hideParentTooltip(),this.ctx.update()}});n&&(this._placeBreadcrumb(n),wv(e,n))}_placeBreadcrumb(e){let t=this.w,n=t.layout.translateY||0,r=this.ctx?.dimensions?.dimHelpers,i=r?r.getTitleSubtitleCoords(`title`).height+r.getTitleSubtitleCoords(`subtitle`).height:0,a=e.getBoundingClientRect().height||Sv;if(n-i>=a+1){e.style.top=`${n-a-1}px`;return}e.style.top=`${i}px`;let o=t.config.theme.mode===`dark`;e.style.background=o?`rgba(20,24,30,0.82)`:`rgba(255,255,255,0.86)`,e.style.borderRadius=`4px`}_showParentTooltip(e,t){let n=this.w,r=this._tip();if(!r)return;let i=this._drawnTotal(),a=t._parent?t._parent._area:i,o=i>0?(t._area/i*100).toFixed(1):`0.0`,s=a>0?(t._area/a*100).toFixed(1):o,c=this.w.config.plotOptions.treemap.parents,l=c&&c.tooltip&&c.tooltip.formatter,u=this._countLeaves(t),d;if(typeof l==`function`)d=l({name:t.name,value:t._area,depth:t.depth||0,leafCount:u,percentOfParent:Number(s),percentOfTotal:Number(o),node:t,w:n});else{let e=this._parentChrome(t.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${n.config.tooltip.fillSeriesColor?`background-color:${e};`:``}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${$.escapeString(t.name)}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(t._area)}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${u} items, </span><span class="apexcharts-tooltip-text-y-value">${s}% of parent, ${o}% of total</span></div></div></div>`}r.innerHTML=d,r.classList.add(`apexcharts-active`),r.style.opacity=`1`,this._tipOwned=!0,this._positionTooltip(e)}_tip(){return this._tooltipEl||=this.w.dom.baseEl.querySelector(`.apexcharts-tooltip`),this._tooltipEl}_positionTooltip(e){let t=this._tip();if(!t||!this._tipOwned)return;let n=this.w.dom.elWrap.getBoundingClientRect(),r=t.offsetWidth,i=t.offsetHeight,a=e.clientX-n.left+12;a+r>n.width&&(a=e.clientX-n.left-r-12),a=Math.max(0,Math.min(a,n.width-r));let o=e.clientY-n.top+12;o+i>n.height&&(o=e.clientY-n.top-i-12),o=Math.max(0,Math.min(o,n.height-i)),t.style.left=a+`px`,t.style.top=o+`px`}_hideParentTooltip(){let e=this._tip();!e||!this._tipOwned||(this._tipOwned=!1,e.classList.remove(`apexcharts-active`),e.style.opacity=`0`)}_drawnTotal(){return this._total??=(this.drawn||[]).reduce((e,t)=>e+this._subtreeArea(t),0),this._total||0}_subtreeArea(e){if(e._area!=null)return e._area;let t=e.children;if(t&&t.length){let e=0;for(let n=0;n<t.length;n++)e+=this._subtreeArea(t[n]);return e}let n=Number(e.value);return isNaN(n)?0:Math.abs(n)}_countLeaves(e){return!e.children||!e.children.length?1:e.children.reduce((e,t)=>e+this._countLeaves(t),0)}_formatValue(e){let t=this.w,n=t.config.tooltip?.y?.formatter||t.config.yaxis?.[0]?.labels?.formatter;if(typeof n==`function`)try{return String(n(e,{seriesIndex:0,dataPointIndex:0,w:t}))}catch{}return String(e)}_labelCanShow(e,t,n){if(!Number.isFinite(e)||e<=0)return!1;let r=this.w.config.plotOptions.treemap.dataLabels;return e<(r&&r.minFontSize!=null?Number(r.minFontSize):0)?!1:Math.max(t,n)>=e}_averageLabelSize(){if(this._avgLabelSize!=null)return this._avgLabelSize;function e(t){let n,r=0;if(Array.isArray(t[0]))for(n=0;n<t.length;n++)r+=e(t[n]);else for(n=0;n<t.length;n++)r+=t[n].length;return r}function t(e){let n,r=0;if(Array.isArray(e[0]))for(n=0;n<e.length;n++)r+=t(e[n]);else for(n=0;n<e.length;n++)r+=1;return r}return this._avgLabelSize=e(this.labels)/t(this.labels),this._avgLabelSize}getFontSize(e){let t=this.w,n=this._averageLabelSize();function r(e,r){let i=(e*r)**.5;return Math.min(i/n,parseInt(t.config.dataLabels.style.fontSize,10))}return r(e[2]-e[0],e[3]-e[1])}rotateToFitLabel(e,t,n,r,i,a,o){let s=new Z(this.w),c=s.getTextRects(n,String(t));if(c.width+this.w.config.stroke.width+5>a-r&&c.width<=o-i){let t=s.rotateAroundCenter(e.node);e.node.setAttribute(`transform`,`rotate(-90 ${t.x} ${t.y}) translate(${c.height/3})`)}}truncateLabels(e,t,n,r,i,a){let o=new Z(this.w),s=o.getTextRects(e,String(t)).width+this.w.config.stroke.width+5>i-n&&a-r>i-n?a-r:i-n,c=o.getTextBasedOnMaxWidth({text:e,maxWidth:s,fontSize:t});return e.length!==c.length&&s/t<5?``:c}_morphKeyed(){let e=this.ctx?.morphTypeChange;return!!(e&&typeof e.hasKeyedMarks==`function`&&e.hasKeyedMarks()&&typeof e.getInitialPathForKey==`function`)}_morphSourceForLeaf(e){let t=this.ctx?.morphTypeChange;if(!t||typeof t.getInitialPathAt!=`function`)return null;if(this._morphKeyed()){let n=t.getInitialPathForKey(Mx(e._key));if(n)return n}return t.getInitialPathAt(this._morphLeafIndex++)}_tilePath(e,t,n,r){return`M ${e} ${t} L ${n} ${t} L ${n} ${r} L ${e} ${r} Z`}_morphTile(e,t,n,r,i,a){new Bh(this.w,this.ctx).morphSVG(e,i,a,`none`,t,n,r,0)}animateTreemap(e,t,n,r,i=0){let a=new Bh(this.w);a.animateRect(e,t,n,r,()=>{a.animationCompleted(e)},i)}},Lx=.05,Rx=.05,zx=1/45;function Bx(e,t,n,r){return{value:e,velocity:0,target:e,stiffness:t,damping:n}}function Vx(e,t){if(t<=0)return Ux(e);let n=t;for(;n>0;){let t=Math.min(n,zx),r=-e.stiffness*(e.value-e.target)-e.damping*e.velocity;e.velocity+=r*t,e.value+=e.velocity*t,n-=t}return!!Ux(e)&&(e.value=e.target,e.velocity=0,!0)}function Hx(e,t){e.target=t}function Ux(e){let t=e.restVelocity??Lx,n=e.restDisplacement??Rx;return Math.abs(e.velocity)<t&&Math.abs(e.value-e.target)<n}var Wx={crisp:[210,26],gentle:[120,20],snappy:[320,30]};function Gx(e){return Wx[e??`crisp`]??Wx.crisp}var Kx=`__apexcharts_unit_layouts__`;globalThis[Kx]||(globalThis[Kx]={});function qx(){return globalThis[Kx]}function Jx(e){return e&&qx()[e]||null}var Yx=`__apexcharts_unit_marks__`;globalThis[Yx]||(globalThis[Yx]={});function Xx(){return globalThis[Yx]}function Zx(e,t){if(typeof e==`string`){let t=e.trim();return t?Object.freeze({name:`anonymous`,path:t,viewBox:[0,0,100,100]}):null}if(!e||typeof e!=`object`||typeof e.path!=`string`||!e.path.trim())return null;let n=Array.isArray(e.viewBox)&&e.viewBox.length===4?e.viewBox.map(Number):[0,0,100,100];return!n.every(e=>isFinite(e))||n[2]<=0||n[3]<=0?null:Object.freeze(X(Y({},e),{name:e.name||`anonymous`,path:e.path.trim(),viewBox:n,fillRule:e.fillRule===`evenodd`?`evenodd`:void 0}))}function Qx(e){return e&&Xx()[e]||null}var $x=Math.PI*(3-Math.sqrt(5));function eS(e){return 1-(1-e)**3}function tS(e){return t=>1+(e+1)*(t-1)**3+e*(t-1)**2}function nS(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}var rS=800,iS=.25,aS=0,oS=1,sS=2;function cS(e,t){let[n,r]=Gx(e),i=rS/Math.max(1,t);return[n*i*i,r*i]}var lS=class{constructor(e,t){this.ctx=t,this.w=e,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(e){let t=this.w,n=new Z(t,this.ctx),r=n.group({class:`apexcharts-unit`});if(t.globals.noData||!Array.isArray(e)||e.length===0)return r;let i=t.config.plotOptions.unit,a=i.layout===`packed`?`packed`:i.layout===`columns`?`columns`:i.layout===`grid`?`grid`:i.layout===`scatter`?`scatter`:i.layout===`arc`?`arc`:i.layout===`custom`?`custom`:`grouped`,o=i.transition,s=o===`flow`,c=o===`identity`,l=i.unitValue>0?i.unitValue:1,u=e.map(e=>{let t=Math.abs($.parseNumber(e))/l;return t>0?Math.max(1,Math.round(t)):0});u=this._applyMaxUnits(u,i.maxUnits);let d=u.reduce((e,t)=>e+t,0),f=a===`packed`?this._layoutPacked(u,i):a===`columns`?this._layoutColumns(u,i):a===`grid`?this._layoutGrid(u,i):a===`scatter`?this._layoutScatter(i):a===`arc`?this._layoutArc(u,i):a===`custom`?this._layoutCustom(u,i):this._layoutGrouped(u,i),p=a===`grid`&&!!(i.grid&&i.grid.split);p&&this._drawGridTrack(r,n,i),a===`scatter`&&this._drawScatterAxes(r,n);let m=this._lastDotR,h=this._shouldAnimate(),g=this.ctx&&this.ctx.morphTypeChange,_=h&&!!g&&typeof g.isActive==`function`&&g.isActive()&&typeof g.getInitialCenterFor==`function`,v=_&&typeof g.getInitialSlotFor==`function`,y=_&&typeof g.usesPieceTakeover==`function`&&g.usesPieceTakeover(),b=h&&!_&&this.ctx?this.ctx._unitPrevDots:null,x=new Map,S=[],C=t.seriesData.unitData||[],w=this._bubbleStats(C,i,m),T=0;if(f.forEach(e=>{let o=t.globals.colors[e.i]||t.globals.colors[0]||`#008FFB`,l=n.group({class:`apexcharts-series`,seriesName:$.escapeString(t.seriesData.seriesNames[e.i]||`series-${e.i+1}`),rel:e.i+1,"data:realIndex":e.i}),f=_&&!v?g.getInitialCenterFor(e.i):null,E=e.dots.length,D=C[e.i];if(e.dots.forEach((t,r)=>{let a=t.j==null?r:t.j,u=D?D[a]:void 0,d=u&&typeof u==`object`&&u.fillColor?u.fillColor:o,_=t.r==null?w?this._radiusForValue(this._unitValueOf(u),w):m:t.r,C=this._markSpecFor(i,u,e.i,_),O=this._drawDot(n,i,_,d,e.i,a,C);l.add(O);let k;if(c){let e=u&&typeof u==`object`?u.id==null?u.name:u.id:void 0;k=e==null?`g:${T}`:`id:${e}`}else k=s?String(T):t.slot==null?`${e.i}:${a}`:`slot:${t.slot}`;if(T++,x.set(k,{x:t.x,y:t.y,fill:d,r:_,spec:C}),y)this._place(O.node,C,t.x,t.y),O.node.setAttribute(`opacity`,`0`),O.node.setAttribute(`data-piece-hidden`,`1`);else if(h){let n=b&&b.get(k),r=n||(v?g.getInitialSlotFor(e.i,a,E):f),o=i.gather&&i.gather.enter||`burst`,s=p||o===`fade`||o===`rise`,c=r?r.x:s?t.x:e.cx,l=r?r.y:o===`rise`&&!p?t.y+14:s?t.y:e.cy;O.node.style.opacity=r?`1`:`0`,this._place(O.node,C,c,l),S.push({node:O.node,spec:C,x:t.x,y:t.y,cx0:c,cy0:l,key:k,r0:n&&n.r!=null?n.r:_,r1:_,fill0:n?n.fill:d,fill1:d,delay:0,isEnter:!r})}else this._place(O.node,C,t.x,t.y)}),(a===`grouped`||a===`columns`||p)&&i.clusterLabels&&i.clusterLabels.show&&u[e.i]>0){let t=p?this._gridDenom:d;this._drawClusterLabel(l,e,u[e.i],t,i,o)}r.add(l)}),this._outerLabelsOn(i)&&this._drawOuterLabels(r,f,u,d,i,h&&!b),b){let e=this._collectExits(b,x,i);if(e.length){let t=n.group({class:`apexcharts-unit-exits`});r.add(t),this._runExits(t,e,i)}}return this.ctx&&(this.ctx._unitPrevDots=x),this.ctx&&(!h||_)&&(this.ctx._unitSprings=null),h&&S.length?this._runGather(S):t.globals.animationEnded=!0,r}_applyMaxUnits(e,t){let n=e.reduce((e,t)=>e+t,0);if(!t||t<=0||n<=t)return e;let r=t/n;return console.warn(`[ApexCharts] unit chart: ${n} dots exceeds maxUnits (${t}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`),e.map(e=>e>0?Math.max(1,Math.round(e*r)):0)}_layoutCustom(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=e.reduce((e,t)=>e+t,0),o=this._resolveLayoutProvider(t);if(!o)return console.warn(`[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'.`),this._layoutGrouped(e,t);let s=this._outerLabelsOn(t)?this._outerLabelGutter(e,t):0;this._lastOuterGutter=s;let c={x:s,y:0,width:Math.max(1,r-s*2),height:i},l=Math.sqrt(c.width*c.height/Math.PI),u=this._resolveStep(t,l,a);this._lastDotR=this._dotRadiusFromStep(u,t);let d=this._lastDotR,f=this._layoutObjects(e,d),p;try{p=o(f,c)}catch(n){return console.warn(`[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.`,n),this._layoutGrouped(e,t)}if(!Array.isArray(p))return console.warn(`[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'.`),this._layoutGrouped(e,t);let m=new Map;p.forEach(e=>{!e||!isFinite(e.x)||!isFinite(e.y)||m.set(String(e.id),{x:e.x,y:e.y,r:typeof e.r==`number`&&e.r>0?e.r:void 0})});let h=e.map((e,t)=>({i:t,cx:r/2,cy:i/2,outerR:d,dots:[]}));return f.forEach(e=>{let t=m.get(e.id);t&&h[e.seriesIndex].dots.push({x:t.x,y:t.y,r:t.r,j:e.dataPointIndex})}),h.forEach(e=>{if(!e.dots.length)return;let t=0,n=0;e.dots.forEach(e=>{t+=e.x,n+=e.y}),e.cx=t/e.dots.length,e.cy=n/e.dots.length;let r=0;e.dots.forEach(t=>{r=Math.max(r,Math.hypot(t.x-e.cx,t.y-e.cy))}),e.outerR=r+d}),h}_layoutObjects(e,t){let n=this.w,r=n.seriesData.unitData||[],i=n.seriesData.seriesNames||[],a=[],o=0;return e.forEach((e,n)=>{let s=r[n];for(let r=0;r<e;r++){let e=s?s[r]:void 0,c=e&&typeof e==`object`&&(e.id!=null||e.name!=null)?String(e.id==null?e.name:e.id):`${n}:${r}`;a.push({id:c,index:o,seriesIndex:n,dataPointIndex:r,label:i[n],value:this._unitValueOf(e)??void 0,datum:e,r:t}),o++}}),a}_resolveLayoutProvider(e){let t=e.positions;if(typeof t==`function`)return t;if(typeof t==`string`&&t){let e=Jx(t);if(e)return e;console.warn(`[ApexCharts] unit chart: no layout named "${t}" is registered. Register one with ApexCharts.registerUnitLayout("${t}", fn).`)}return null}_layoutGrouped(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=t.clusterLabels&&t.clusterLabels.show?30:6,o=e.map((e,t)=>t).filter(t=>e[t]>0),s=Math.max(1,o.length),c=Array(e.length).fill(-1);o.forEach((e,t)=>c[e]=t);let l=r/s,u=i-a,d=Math.max(1,...e),f=Math.min(l,u)*.08,p=Math.max(4,Math.min(l,u)/2-f),m=this._resolveStep(t,p,d);this._lastDotR=this._dotRadiusFromStep(m,t);let h=this._lastDotR,g=a+u/2,_=e.map(e=>m*Math.sqrt(Math.max(1,e))+h),v=e=>c[e]>=0?l*(c[e]+.5):r/2,y=e.map((e,t)=>v(t)),b=o.map(e=>_[e]),x=!1;for(let e=1;e<s;e++)if(y[o[e]]-y[o[e-1]]<b[e]+b[e-1]){x=!0;break}if(x){let t=Math.max(2*h,8),n=b.reduce((e,t)=>e+2*t,0)+t*(s-1),i;if(n<=r){let e=(r-n)/2;i=b.map(n=>{let r=e+n;return e+=2*n+t,r})}else if(s===1)i=[r/2];else{let e=b[0],t=r-b[s-1];i=b.map((n,r)=>e+(t-e)*r/(s-1))}y=e.map((e,t)=>c[t]>=0?i[c[t]]:r/2)}return e.map((e,t)=>({i:t,cx:y[t],cy:g,outerR:_[t],dots:this._spiral(y[t],g,e,m,0)}))}_layoutPacked(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=Math.max(1,e.reduce((e,t)=>e+t,0)),o=Math.max(4,Math.min(r,i-6)/2-Math.min(r,i)*.06),s=this._resolveStep(t,o,a);this._lastDotR=this._dotRadiusFromStep(s,t);let c=r/2,l=6+(i-6)/2,u=e.map((e,t)=>t);t.sortByGroup!==!1&&u.sort((t,n)=>e[t]-e[n]);let d=e.map((e,t)=>({i:t,cx:c,cy:l,outerR:s*Math.sqrt(a)+this._lastDotR,dots:[]})),f=0;return u.forEach(t=>{for(let n=0;n<e[t];n++){let e=s*Math.sqrt(f+.5),n=f*$x;d[t].dots.push({x:c+e*Math.cos(n),y:l+e*Math.sin(n),slot:f}),f++}}),d}_layoutArc(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=Math.max(1,e.reduce((e,t)=>e+t,0)),o=t.arc||{},s=typeof o.startAngle==`number`?o.startAngle:-90,c=typeof o.endAngle==`number`?o.endAngle:90,l=s*Math.PI/180,u=c*Math.PI/180,d=u-l||Math.PI,f=Math.max(0,Math.min(.95,typeof o.innerRadiusRatio==`number`?o.innerRadiusRatio:.4)),p=e=>Math.sin(e),m=e=>-Math.cos(e),h=this._arcBounds(l,u),g=Math.min(r,i)*.04,_=Math.max(1e-6,h.maxX-h.minX),v=Math.max(1e-6,h.maxY-h.minY),y=Math.max(4,Math.min((r-2*g)/_,(i-2*g)/v)),b=y*f,x=r/2-(h.minX+h.maxX)/2*y,S=i/2-(h.minY+h.maxY)/2*y,C=this._arcAllocate(a,b,y,d,t);this._lastDotR=C.dotR;let w=[];for(let e=0;e<C.R;e++){let t=C.radii[e],n=C.seatsPerRow[e];for(let e=0;e<n;e++){let r=n===1?(l+u)/2:l+d*(e+.5)/n;w.push({a:r,x:x+t*p(r),y:S+t*m(r)})}}w.sort((e,t)=>e.a-t.a);let T=e.map((e,t)=>({i:t,cx:x,cy:S,outerR:y,dots:[]})),E=0,D=0;return w.forEach((t,n)=>{for(;E<e.length&&D>=e[E];)E++,D=0;E>=e.length||(T[E].dots.push({x:t.x,y:t.y,slot:n}),D++)}),T}_arcBounds(e,t){let n=e=>Math.sin(e),r=e=>-Math.cos(e),i=Math.min(e,t),a=Math.max(e,t),o=[0,n(e),n(t)],s=[0,r(e),r(t)],c=Math.PI/2;for(let e=Math.ceil(i/c);e*c<=a;e++)o.push(n(e*c)),s.push(r(e*c));return{minX:Math.min(...o),maxX:Math.max(...o),minY:Math.min(...s),maxY:Math.max(...s)}}_arcAllocate(e,t,n,r,i){let a=i.spacing>0?i.spacing:1.05,o=Math.abs(r)||Math.PI,s=this._fixedRadius(i),c=r=>{r=Math.max(1,Math.round(r));let i=[];for(let e=0;e<r;e++)i.push(r===1?(t+n)/2:t+(n-t)*(e/(r-1)));let s=i.reduce((e,t)=>e+t,0)||1,c=i.map(t=>e*t/s),l=c.map(e=>Math.floor(e)),u=e-l.reduce((e,t)=>e+t,0);for(c.map((e,t)=>({idx:t,frac:e-Math.floor(e)})).sort((e,t)=>t.frac-e.frac).forEach(e=>{u>0&&(l[e.idx]++,u--)});u>0;)l[r-1]++,u--;let d=r===1?n-t||n:(n-t)/(r-1),f=1/0;for(let e=0;e<r;e++){let t=l[e];if(t<=0)continue;let n=i[e]*o/t;n<f&&(f=n)}let p=Math.min(d,f);return{R:r,radii:i,seatsPerRow:l,dotR:Math.max(1,p/(2*a))}},l=i.arc&&i.arc.rows,u;if(typeof l==`number`&&l>=1)u=c(l);else if(s){let e=2*s*a;u=c((n-t)/e+1)}else{let t=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(e))+6));u=c(1);for(let e=2;e<=t;e++){let t=c(e);t.dotR>u.dotR&&(u=t)}}return s&&(u.dotR=s),u}_layoutColumns(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=!!(t.clusterLabels&&t.clusterLabels.show),o=a&&t.clusterLabels.position===`bottom`,s=a&&!o?30:6,c=e.map((e,t)=>t).filter(t=>e[t]>0),l=Math.max(1,c.length),u=Array(e.length).fill(-1);c.forEach((e,t)=>u[e]=t);let d=r/l,f=d*.62,p=Math.max(8,i*.04)+(o?30:0),m=Math.max(4,i-s-p),h=Math.max(1,...e),g=t.spacing>0?t.spacing:1,_=t.columns?t.columns.size:void 0,v;v=t.shape!==`image`&&_===`auto`?null:t.shape!==`image`&&typeof _==`number`&&_>0?_:this._fixedRadius(t);let y=1,b=0;if(v){b=2*v*g,this._lastDotR=v;let e=Math.max(1,Math.floor(m/b)),t=Math.max(1,Math.floor(f/b));y=Math.max(1,Math.min(t,Math.ceil(h/e)))}else{let e=0,t=Math.max(1,Math.min(40,Math.round(f/4)));for(let n=1;n<=t;n++){let t=Math.ceil(h/n),r=Math.min(f/n,m/t);r>e&&(e=r,y=n)}b=e,this._lastDotR=Math.max(1,b/(2*g))}let x=this._lastDotR,S=Math.ceil(h/y),C=s+(m+Math.min(m,S*b))/2;return e.map((e,t)=>{let n=u[t]>=0?d*(u[t]+.5):r/2,i=Math.ceil(Math.max(1,e)/y)*b,a=n-y*b/2+b/2,o=[];for(let t=0;t<e;t++){let e=Math.floor(t/y),n=t%y;o.push({x:a+n*b,y:C-x-e*b})}return{i:t,cx:n,cy:C-i/2,outerR:i/2,flat:!0,dots:o}})}_layoutGrid(e,t){if(t.grid&&t.grid.split)return this._layoutGridSplit(e,t);this._gridTrack=null;let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=t.grid||{},o=Math.max(1,Math.round(a.columns>0?a.columns:10)),s=a.fillFrom===`top`?`top`:`bottom`,c=a.total>0?this._largestRemainder(e,Math.round(a.total)):e.slice(),l=c.reduce((e,t)=>e+t,0),u=Math.max(1,Math.ceil(Math.max(1,l)/o)),d=t.spacing>0?t.spacing:1,f=Math.max(4,r),p=Math.max(4,i-6),m=this._fixedRadius(t),h=0;m?(h=2*m*d,this._lastDotR=m):(h=Math.min(f/o,p/u),this._lastDotR=Math.max(1,h/(2*d)));let g=o*h,_=u*h,v=(r-g)/2+h/2,y=6+(p-_)/2,b=e=>s===`bottom`?y+_-h/2-e*h:y+h/2+e*h,x=e.map((e,t)=>({i:t,cx:r/2,cy:6+p/2,outerR:Math.max(g,_)/2,dots:[]})),S=0;for(let e=0;e<c.length;e++)for(let t=0;t<c[e];t++){let t=S%o,n=Math.floor(S/o);x[e].dots.push({x:v+t*h,y:b(n),slot:S}),S++}return x}_layoutGridSplit(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=t.grid||{},o=Math.max(1,Math.round(a.columns>0?a.columns:10)),s=a.fillFrom===`top`?`top`:`bottom`,c=Math.max(1,Math.round(a.total>0?a.total:100)),l=Math.max(1,Math.ceil(c/o)),u=e.map((e,t)=>t).filter(t=>e[t]>0),d=Math.max(1,u.length),f=a.max>0?a.max:Math.max(1,...e),p=Math.max(1,Math.round(a.tileColumns>0?a.tileColumns:Math.ceil(Math.sqrt(d)))),m=Math.max(1,Math.ceil(d/p)),h=!(t.clusterLabels&&t.clusterLabels.show===!1),g=h&&t.clusterLabels&&t.clusterLabels.position===`bottom`,_=h&&!g?22:4,v=h&&g?22:4,y=r/p,b=i/m,x=Math.max(4,y*.86),S=Math.max(4,b-_-v),C=t.spacing>0?t.spacing:1,w=this._fixedRadius(t),T=0;w?(T=2*w*C,this._lastDotR=w):(T=Math.min(x/o,S/l),this._lastDotR=Math.max(1,T/(2*C)));let E=o*T,D=l*T,O=(e,t)=>s===`bottom`?e+D-T/2-t*T:e+T/2+t*T,k=[],A=[];return u.forEach((t,n)=>{let r=n%p,i=Math.floor(n/p),a=r*y,s=i*b,l=a+(y-E)/2+T/2,u=s+_+(S-D)/2,d=e=>({x:l+e%o*T,y:O(u,Math.floor(e/o))});for(let e=0;e<c;e++)k.push(d(e));let m=Math.max(0,Math.min(c,Math.round(e[t]/f*c))),h=[];for(let e=0;e<m;e++){let t=d(e);h.push({x:t.x,y:t.y,slot:n*c+e})}A.push({i:t,cx:a+y/2,cy:u+D/2,outerR:D/2,flat:!0,split:!0,dots:h})}),this._gridDenom=f,this._gridTrack={cells:k},A}_drawGridTrack(e,t,n){let r=this._gridTrack;if(!r||!r.cells||!r.cells.length)return;let i=this._lastDotR,a=(n.grid||{}).trackColor||`rgba(128,128,128,0.14)`,o=t.group({class:`apexcharts-unit-track`});r.cells.forEach(e=>{let r;if(n.shape===`square`){let o=i*2;r=t.drawRect(0,0,o,o,n.borderRadius||0,a,1,0,`none`),r.node.setAttribute(`fill`,a),r.node.setAttribute(`x`,String(e.x-i)),r.node.setAttribute(`y`,String(e.y-i))}else r=t.drawCircle(i,{fill:a,"stroke-width":0,stroke:`none`}),r.node.setAttribute(`fill`,a),r.node.setAttribute(`cx`,String(e.x)),r.node.setAttribute(`cy`,String(e.y));r.node.classList.add(`apexcharts-unit-track-cell`),o.add(r)}),e.add(o)}_layoutScatter(e){let t=this.w,n=e.scatter||{};if(n.y===`value`)return this._layoutScatter2D(e);if(n.orientation===`vertical`)return this._layoutScatterVertical(e);let r=t.layout.gridWidth,i=t.layout.gridHeight,a=t.seriesData.unitData||[],o=t.seriesData.seriesNames||[],s=e=>this._unitValueOf(e),c=this._scatterSizeStats(n,a),l=a.map(e=>Array.isArray(e)?e.map(s):[]),u=e=>e!=null&&isFinite(e),d=l.map((e,t)=>t).filter(e=>l[e].some(u)),f=Math.max(1,d.length),p=1/0,m=-1/0;l.forEach(e=>e.forEach(e=>{e!=null&&isFinite(e)&&(e<p&&(p=e),e>m&&(m=e))})),p===1/0&&(p=0,m=1);let h=Math.max(2,Math.round(n.tickAmount>0?n.tickAmount:5)),g=this._scatterValueDomain(n,p,m,h),_=g.min,v=g.max,y=v-_||1,b=n.laneLabelWidth==null?f>1?92:8:Math.max(0,n.laneLabelWidth),x=30+(n.xTitle?20:0),S=b,C=r-8,w=i-x,T=Math.max(4,C-S),E=Math.max(4,w-10),D=e=>S+(e-_)/y*T,O=E/f,k=e=>10+O*(e+.5),A=0,j=this._fixedRadius(e);if(j)A=j;else{let e=Math.max(1,...d.map(e=>l[e].filter(u).length));A=Math.max(2,Math.min(6,O*.12,T/(2.5*Math.sqrt(e))))}this._lastDotR=A;let ee=e.spacing>0?e.spacing:1,te=Math.max(.5,A*ee),ne=n.spread===`jitter`,M=[],re=[],ie=c?c.rMax:A;return d.forEach((e,t)=>{let n=k(t);re.push({i:e,cy:n,name:o[e]||`series-${e+1}`});let r=(a[e]||[]).map((e,t)=>{let r=s(e),i={j:t,px:D(u(r)?r:_),y:n};return c&&(i.r=this._scatterRadius(e,c,A)),i});if(ne){let e=Math.max(ie,O/2-ie);r.forEach((t,r)=>{t.y=n+((r*9301+49297)%233280/233280*2-1)*e})}else this._beeswarm(r,n,A,te,ie);M.push({i:e,cx:(S+C)/2,cy:n,outerR:O/2,dots:r.map(e=>({x:e.px,y:e.y,r:e.r}))})}),this._scatterAxis={mode:`1d`,plotL:S,plotR:C,plotT:10,plotB:w,xMin:_,xMax:v,plotX:D,ticks:g.ticks,lanes:re,xTitle:n.xTitle,formatter:typeof n.xFormatter==`function`?n.xFormatter:null,gridlines:n.gridlines!==!1},M}_layoutScatterVertical(e){let t=this.w,n=e.scatter||{},r=t.layout.gridWidth,i=t.layout.gridHeight,a=t.seriesData.unitData||[],o=t.seriesData.seriesNames||[],s=e=>this._unitValueOf(e),c=this._scatterSizeStats(n,a),l=a.map(e=>Array.isArray(e)?e.map(s):[]),u=e=>e!=null&&isFinite(e),d=l.map((e,t)=>t).filter(e=>l[e].some(u)),f=Math.max(1,d.length),p=1/0,m=-1/0;l.forEach(e=>e.forEach(e=>{e!=null&&isFinite(e)&&(e<p&&(p=e),e>m&&(m=e))})),p===1/0&&(p=0,m=1);let h=Math.max(2,Math.round(n.tickAmount>0?n.tickAmount:5)),g=this._scatterValueDomain(n,p,m,h),_=g.min,v=g.max,y=v-_||1,b=46+(n.xTitle?18:0),x=f>1?26:10,S=b,C=r-10,w=i-x,T=Math.max(4,C-S),E=Math.max(4,w-10),D=e=>w-(e-_)/y*E,O=T/f,k=e=>S+O*(e+.5),A=0,j=this._fixedRadius(e);if(j)A=j;else{let e=Math.max(1,...d.map(e=>l[e].filter(u).length));A=Math.max(2,Math.min(6,O*.12,E/(2.5*Math.sqrt(e))))}this._lastDotR=A;let ee=e.spacing>0?e.spacing:1,te=Math.max(.5,A*ee),ne=n.spread===`jitter`,M=[],re=[],ie=c?c.rMax:A;return d.forEach((e,t)=>{let n=k(t);re.push({i:e,cx:n,name:o[e]||`series-${e+1}`});let r=(a[e]||[]).map((e,t)=>{let r=s(e),i={j:t,py:D(u(r)?r:_),x:n};return c&&(i.r=this._scatterRadius(e,c,A)),i});if(ne){let e=Math.max(ie,O/2-ie);r.forEach((t,r)=>{t.x=n+((r*9301+49297)%233280/233280*2-1)*e})}else this._beeswarm(r,n,A,te,ie,!0);M.push({i:e,cx:n,cy:(10+w)/2,outerR:O/2,dots:r.map(e=>({x:e.x,y:e.py,r:e.r}))})}),this._scatterAxis={mode:`1d`,orientation:`vertical`,plotL:S,plotR:C,plotT:10,plotB:w,vMin:_,vMax:v,plotY:D,ticks:g.ticks,lanes:re,valueTitle:n.xTitle,formatter:typeof n.xFormatter==`function`?n.xFormatter:null,gridlines:n.gridlines!==!1},M}_layoutScatter2D(e){let t=this.w,n=t.layout.gridWidth,r=t.layout.gridHeight,i=e.scatter||{},a=t.seriesData.unitData||[],o=e=>typeof e==`number`&&isFinite(e),s=e=>e&&typeof e==`object`?e.x:null,c=e=>e&&typeof e==`object`?e.y==null?e.value:e.y:null,l=a.map((e,t)=>t).filter(e=>(a[e]||[]).some(e=>o(s(e))&&o(c(e)))),u=1/0,d=-1/0,f=1/0,p=-1/0;a.forEach(e=>(e||[]).forEach(e=>{let t=s(e),n=c(e);o(t)&&o(n)&&(t<u&&(u=t),t>d&&(d=t),n<f&&(f=n),n>p&&(p=n))})),u===1/0&&(u=0,d=1,f=0,p=1);let m=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),h=Math.max(2,Math.round(i.yTickAmount>0?i.yTickAmount:5)),g=this._niceScale(i.xMin==null?u:i.xMin,i.xMax==null?d:i.xMax,m),_=this._niceScale(i.yMin==null?f:i.yMin,i.yMax==null?p:i.yMax,h),v=i.xMin==null?g.min:i.xMin,y=i.xMax==null?g.max:i.xMax,b=i.yMin==null?_.min:i.yMin,x=i.yMax==null?_.max:i.yMax,S=y-v||1,C=x-b||1,w=46+(i.yTitle?18:0),T=30+(i.xTitle?20:0),E=w,D=n-12,O=r-T,k=Math.max(4,D-E),A=Math.max(4,O-10),j=e=>E+(e-v)/S*k,ee=e=>O-(e-b)/C*A,te=this._scatterSizeStats(i,a),ne=this._fixedRadius(e)||5;this._lastDotR=ne;let M=[];l.forEach(e=>{let t=(a[e]||[]).map(e=>{let t=s(e),n=c(e);return{x:j(o(t)?t:v),y:ee(o(n)?n:b),r:te?this._scatterRadius(e,te,ne):void 0}});M.push({i:e,cx:(E+D)/2,cy:(10+O)/2,outerR:A/2,dots:t})});let re=(e,t,n,r,i,a)=>{let o=[];if(i)for(let t=0;t<a;t++)o.push(e+n*t/(a-1));else{let i=r||n/Math.max(1,a-1);for(let n=e;n<=t+i*.5;n+=i)o.push(Math.abs(n)<i*1e-9?0:n)}return o};return this._scatterAxis={mode:`2d`,plotL:E,plotR:D,plotT:10,plotB:O,plotX:j,plotY:ee,xTicks:re(v,y,S,g.spacing,i.xMin!=null||i.xMax!=null,m),yTicks:re(b,x,C,_.spacing,i.yMin!=null||i.yMax!=null,h),xTitle:i.xTitle,yTitle:i.yTitle,xFormatter:typeof i.xFormatter==`function`?i.xFormatter:null,yFormatter:typeof i.yFormatter==`function`?i.yFormatter:null,gridlines:i.gridlines!==!1},M}_scatterSizeStats(e,t){let n=e&&e.sizeRange;if(!Array.isArray(n)||n.length<2)return null;let r=Math.max(.5,+n[0]),i=Math.max(r,+n[1]),a=e.sizeField||`z`,o=1/0,s=-1/0;return t.forEach(e=>(e||[]).forEach(e=>{let t=e&&typeof e==`object`?e[a]:null;typeof t==`number`&&isFinite(t)&&(t<o&&(o=t),t>s&&(s=t))})),o===1/0?null:{zmin:o,zmax:s,rMin:r,rMax:i,field:a}}_scatterRadius(e,t,n){if(!t)return n;let r=e&&typeof e==`object`?e[t.field]:null;if(typeof r!=`number`||!isFinite(r))return t.rMin;let i=t.zmax>t.zmin?(r-t.zmin)/(t.zmax-t.zmin):1,a=Math.max(0,Math.min(1,i)),o=t.rMin*t.rMin,s=t.rMax*t.rMax;return Math.sqrt(o+a*(s-o))}_beeswarm(e,t,n,r,i,a=!1){let o=a?`py`:`px`,s=a?`x`:`y`,c=e.slice().sort((e,t)=>e[o]-t[o]),l=[],u=i??n;c.forEach(e=>{let i=e.r==null?n:e.r,a=0;for(let n=0;n<2e3;n++){let s=n===0?0:Math.ceil(n/2)*r*(n%2?1:-1),c=t+s,d=!0;for(let t=l.length-1;t>=0;t--){let n=l[t],r=e[o]-n.f;if(r>i+u)break;let a=i+n.r,s=c-n.s;if(r*r+s*s<a*a){d=!1;break}}if(d){a=s;break}}e[s]=t+a,l.push({f:e[o],s:e[s],r:i})})}_scatterValueDomain(e,t,n,r){let i=(e,t,n)=>{let r=[];for(let i=e;i<=t+n*.5;i+=n)r.push(Math.abs(i)<n*1e-9?0:i);return r};if(e.xMin!=null||e.xMax!=null){let a=e.xMin==null?t:e.xMin,o=e.xMax==null?n:e.xMax;o>a||(o=a+1);let s=(o-a)/Math.max(1,r-1);return t<a&&(a-=Math.ceil((a-t)/s)*s),n>o&&(o+=Math.ceil((n-o)/s)*s),{min:a,max:o,ticks:i(a,o,s)}}let a=this._niceScale(t,n,r),o=a.spacing||(a.max-a.min)/Math.max(1,r-1);return{min:a.min,max:a.max,ticks:i(a.min,a.max,o)}}_niceScale(e,t,n){let r=e,i=t;i>r||(i=r+1);let a=this._niceNum(i-r,!1),o=this._niceNum(a/Math.max(1,n-1),!0);return{min:Math.floor(r/o)*o,max:Math.ceil(i/o)*o,spacing:o}}_niceNum(e,t){let n=e>0?e:1,r=Math.floor(Math.log(n)/Math.LN10),i=n/10**r,a;return a=t?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10,a*10**r}_drawScatterAxes(e,t){let n=this.w;if(!d_.isBrowser())return;let r=this._scatterAxis;if(!r)return;let i=`http://www.w3.org/2000/svg`,a=t.group({class:`apexcharts-unit-axis`}),o=n.config.grid&&n.config.grid.borderColor||`rgba(128,128,128,0.18)`,s=`rgba(128,128,128,0.5)`,c=n.config.xaxis&&n.config.xaxis.labels&&n.config.xaxis.labels.style&&n.config.xaxis.labels.style.colors,l=Array.isArray(c)?c[0]:c,u=l||`rgba(120,130,140,0.9)`,d=(e,t,n,r,o)=>{let s=Q.createElementNS(i,`line`);s.setAttribute(`x1`,String(e)),s.setAttribute(`y1`,String(t)),s.setAttribute(`x2`,String(n)),s.setAttribute(`y2`,String(r)),s.setAttribute(`stroke`,o),s.setAttribute(`shape-rendering`,`crispEdges`),a.node.appendChild(s)},f=(e,t,r,o,s,c,l,u)=>{let d=Q.createElementNS(i,`text`);d.setAttribute(`class`,u),d.setAttribute(`x`,String(t)),d.setAttribute(`y`,String(r)),d.setAttribute(`text-anchor`,o),d.setAttribute(`dominant-baseline`,`middle`),d.setAttribute(`font-size`,`${c}px`),d.setAttribute(`font-family`,n.config.chart.fontFamily||`inherit`),d.setAttribute(`font-weight`,String(l)),d.setAttribute(`fill`,s),d.textContent=e,a.node.appendChild(d)};if(r.mode===`2d`){if(r.yTicks.forEach(e=>{let t=r.plotY(e);r.gridlines&&d(r.plotL,t,r.plotR,t,o),f(r.yFormatter?String(r.yFormatter(e)):this._formatTick(e),r.plotL-8,t,`end`,u,11,400,`apexcharts-unit-tick`)}),r.xTicks.forEach(e=>{let t=r.plotX(e);r.gridlines&&d(t,r.plotT,t,r.plotB,o),f(r.xFormatter?String(r.xFormatter(e)):this._formatTick(e),t,r.plotB+14,`middle`,u,11,400,`apexcharts-unit-tick`)}),d(r.plotL,r.plotB,r.plotR,r.plotB,s),d(r.plotL,r.plotT,r.plotL,r.plotB,s),r.xTitle&&f(String(r.xTitle),(r.plotL+r.plotR)/2,r.plotB+32,`middle`,u,12,600,`apexcharts-unit-axis-title`),r.yTitle){let e=Q.createElementNS(i,`text`);e.setAttribute(`class`,`apexcharts-unit-axis-title`);let t=(r.plotT+r.plotB)/2;e.setAttribute(`x`,`14`),e.setAttribute(`y`,String(t)),e.setAttribute(`text-anchor`,`middle`),e.setAttribute(`font-size`,`12px`),e.setAttribute(`font-family`,n.config.chart.fontFamily||`inherit`),e.setAttribute(`font-weight`,`600`),e.setAttribute(`fill`,u),e.setAttribute(`transform`,`rotate(-90 14 ${t})`),e.textContent=String(r.yTitle),a.node.appendChild(e)}e.add(a);return}if(r.orientation===`vertical`){if(r.ticks.forEach(e=>{let t=r.plotY(e);r.gridlines&&d(r.plotL,t,r.plotR,t,o),f(r.formatter?String(r.formatter(e)):this._formatTick(e),r.plotL-8,t,`end`,u,11,400,`apexcharts-unit-tick`)}),d(r.plotL,r.plotT,r.plotL,r.plotB,s),r.valueTitle){let e=Q.createElementNS(i,`text`);e.setAttribute(`class`,`apexcharts-unit-axis-title`);let t=(r.plotT+r.plotB)/2;e.setAttribute(`x`,`14`),e.setAttribute(`y`,String(t)),e.setAttribute(`text-anchor`,`middle`),e.setAttribute(`font-size`,`12px`),e.setAttribute(`font-family`,n.config.chart.fontFamily||`inherit`),e.setAttribute(`font-weight`,`600`),e.setAttribute(`fill`,u),e.setAttribute(`transform`,`rotate(-90 14 ${t})`),e.textContent=String(r.valueTitle),a.node.appendChild(e)}r.lanes.forEach(e=>{let t=l||n.globals.colors[e.i]||n.globals.colors[0]||`#008FFB`;f(e.name,e.cx,r.plotB+16,`middle`,t,12,600,`apexcharts-unit-lane-label`)}),e.add(a);return}r.ticks.forEach((e,t)=>{let n=r.plotX(e);r.gridlines&&d(n,r.plotT,n,r.plotB,o);let i=r.formatter?String(r.formatter(e)):this._formatTick(e),a=t===0?`start`:t===r.ticks.length-1?`end`:`middle`;f(i,n,r.plotB+14,a,u,11,400,`apexcharts-unit-tick`)}),d(r.plotL,r.plotB,r.plotR,r.plotB,s),r.xTitle&&f(String(r.xTitle),(r.plotL+r.plotR)/2,r.plotB+32,`middle`,u,12,600,`apexcharts-unit-axis-title`),r.plotL>12&&r.lanes.forEach(e=>{let t=l||n.globals.colors[e.i]||n.globals.colors[0]||`#008FFB`;f(e.name,r.plotL-8,e.cy,`end`,t,12,600,`apexcharts-unit-lane-label`)}),e.add(a)}_formatTick(e){if(!isFinite(e))return``;let t=Math.abs(e);return t>=1e6?`${+(e/1e6).toFixed(1)}M`:t>=1e4?`${+(e/1e3).toFixed(1)}k`:Number.isInteger(e)?String(e):String(+e.toFixed(2))}_largestRemainder(e,t){let n=e.reduce((e,t)=>e+t,0);if(n<=0||t<=0)return e.map(()=>0);let r=e.map(e=>e/n*t),i=r.map(e=>Math.floor(e)),a=i.reduce((e,t)=>e+t,0),o=Math.max(0,t-a),s=r.map((e,t)=>({i:t,frac:e-Math.floor(e)})).sort((e,t)=>t.frac-e.frac),c=i.slice();for(let e=0;e<o&&e<s.length;e++)c[s[e].i]++;return c}_spiral(e,t,n,r,i){let a=[];for(let o=0;o<n;o++){let n=i+o,s=r*Math.sqrt(n+.5),c=n*$x;a.push({x:e+s*Math.cos(c),y:t+s*Math.sin(c)})}return a}_fixedRadius(e){return e.shape===`image`&&e.image?Math.max(e.image.width||20,e.image.height||20)/2:this._bubbleActive(e)&&typeof e.sizeByValue.maxRadius==`number`?e.sizeByValue.maxRadius>0?e.sizeByValue.maxRadius:null:typeof e.size==`number`&&e.size>0?e.size:null}_bubbleActive(e){let t=e.sizeByValue;return!!(t&&t.enabled&&e.shape!==`image`&&e.shape!==`square`)}_unitValueOf(e){if(typeof e==`number`)return e;if(e&&typeof e==`object`){let t=e.value==null?e.y:e.value;return typeof t==`number`?t:null}return null}_radiusForValue(e,t){if(e==null||!isFinite(e))return t.minR;let n=t.max>t.min?(e-t.min)/(t.max-t.min):1,r=Math.max(0,Math.min(1,n));if(t.scale===`linear`)return t.minR+r*(t.maxR-t.minR);let i=t.minR*t.minR,a=t.maxR*t.maxR;return Math.sqrt(i+r*(a-i))}_bubbleStats(e,t,n){if(!this._bubbleActive(t))return null;let r=1/0,i=-1/0;if(e.forEach(e=>{e&&e.forEach(e=>{let t=this._unitValueOf(e);t!=null&&isFinite(t)&&(t<r&&(r=t),t>i&&(i=t))})}),r===1/0||i<r)return null;let a=t.sizeByValue,o=n,s=Math.max(1,Math.min(o,typeof a.minRadius==`number`?a.minRadius:o*.35));return{min:r,max:i,minR:s,maxR:o,scale:a.scale===`linear`?`linear`:`area`}}_resolveStep(e,t,n){let r=e.spacing>0?e.spacing:1,i=this._fixedRadius(e);return i?2*i*r:t/(Math.sqrt(Math.max(1,n))+.5)}_dotRadiusFromStep(e,t){let n=t.spacing>0?t.spacing:1;return this._fixedRadius(t)||Math.max(1,e/(2*n))}_isCorner(e){return e.shape===`square`||e.shape===`image`}_halfExtent(e,t){if(e.shape===`image`&&e.image)return{hx:(e.image.width||20)/2,hy:(e.image.height||20)/2};let n=t??this._lastDotR;return{hx:n,hy:n}}_place(e,t,n,r){let i=t;i.pk===sS?e.setAttribute(`transform`,`translate(`+(n-i.ox)+`,`+(r-i.oy)+i.tail):i.pk===oS?(e.setAttribute(`x`,String(n-i.hx)),e.setAttribute(`y`,String(r-i.hy))):(e.setAttribute(`cx`,String(n)),e.setAttribute(`cy`,String(r)))}_baseSpec(e,t){let n=t??this._lastDotR;if(!this._isCorner(e))return{pk:aS,r:n};let{hx:r,hy:i}=this._halfExtent(e,n);return{pk:oS,hx:r,hy:i,r:n}}_resolveMark(e){if(e==null)return null;if(typeof e==`object`)return Zx(e);if(typeof e!=`string`||!e)return null;let t=e.trim();return t[0]===`M`||t[0]===`m`?Zx(t):Qx(t)||(this._markWarned||=new Set,this._markWarned.has(t)||(this._markWarned.add(t),console.warn(`[ApexCharts] unit chart: no mark named "${t}" is registered. Register one with ApexCharts.registerUnitMark("${t}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(e,t,n){let r=Math.round(t*10)/10,i=e.name+`|`+e.path.length+`|`+r,a=this._specCache.get(i);if(a)return a;let o=e.viewBox||[0,0,100,100],s=Math.max(0,Math.min(.9,n.padding||0)),c=typeof n.scale==`number`&&n.scale>0?n.scale:1,l=2*r*(1-s)*c,u=n.fit===`width`?l/o[2]:n.fit===`height`?l/o[3]:l/Math.max(o[2],o[3]),d=Object.freeze({pk:sS,mark:e,d:e.path,fillRule:e.fillRule,s:u,ox:(o[0]+o[2]/2)*u,oy:(o[1]+o[3]/2)*u,tail:`) scale(`+u+`)`,r});return this._specCache.set(i,d),d}_markSpecFor(e,t,n,r){if(e.shape!==`pictogram`)return this._baseSpec(e,r);let i=e.pictogram||{},a=t&&typeof t==`object`?t.mark:void 0,o=Array.isArray(i.mark)?i.mark[n%i.mark.length]:i.mark,s=this._resolveMark(a??o);return s?this._glyphSpec(s,r,i):this._baseSpec(X(Y({},e),{shape:i.fallback===`square`?`square`:`circle`}),r)}_drawDot(e,t,n,r,i,a,o){let s=this.w,c=s.config.stroke.show?s.config.stroke.width:0,l=Array.isArray(s.globals.stroke.colors)&&s.globals.stroke.colors[i]||`none`,u=typeof s.config.fill.opacity==`number`?s.config.fill.opacity:1,d;if(o&&o.pk===sS)d=s.dom.Paper.path(o.d),d.node.setAttribute(`fill`,r),o.fillRule===`evenodd`&&d.node.setAttribute(`fill-rule`,`evenodd`),u<1&&d.node.setAttribute(`fill-opacity`,String(u)),d.node.setAttribute(`data:r`,String(o.r));else if(t.shape===`image`&&t.image&&t.image.src){let e=t.image.width||20,n=t.image.height||20;d=s.dom.Paper.image(t.image.src),d.node.setAttribute(`width`,String(e)),d.node.setAttribute(`height`,String(n)),d.node.setAttribute(`preserveAspectRatio`,`xMidYMid meet`),t.image.tint&&d.node.setAttribute(`filter`,`url(#${this._tintFilter(r)})`)}else if(t.shape===`square`){let i=n*2;d=e.drawRect(0,0,i,i,t.borderRadius||0,r,1,c,l),d.node.setAttribute(`fill`,r),u<1&&d.node.setAttribute(`fill-opacity`,String(u))}else d=e.drawCircle(n,{fill:r,"stroke-width":c,stroke:l}),d.node.setAttribute(`fill`,r),u<1&&d.node.setAttribute(`fill-opacity`,String(u));return d.node.classList.add(`apexcharts-unit-area`),d.node.setAttribute(`i`,String(i)),d.node.setAttribute(`j`,String(a)),d}_tintFilter(e){let t=this.w,n=`http://www.w3.org/2000/svg`,r=String(e).replace(/[^a-zA-Z0-9]/g,``),i=`apexcharts-unit-tint-${t.globals.chartID}-${r}`,a=t.dom.Paper.node;if(a.querySelector(`#${i}`))return i;let o=a.querySelector(`defs`);o||(o=Q.createElementNS(n,`defs`),a.insertBefore(o,a.firstChild));let s=Q.createElementNS(n,`filter`);s.setAttribute(`id`,i),s.setAttribute(`x`,`0%`),s.setAttribute(`y`,`0%`),s.setAttribute(`width`,`100%`),s.setAttribute(`height`,`100%`);let c=Q.createElementNS(n,`feFlood`);c.setAttribute(`flood-color`,e),c.setAttribute(`result`,`flood`);let l=Q.createElementNS(n,`feComposite`);return l.setAttribute(`in`,`flood`),l.setAttribute(`in2`,`SourceAlpha`),l.setAttribute(`operator`,`in`),s.appendChild(c),s.appendChild(l),o.appendChild(s),i}_placeDot(e,t,n,r,i){this._place(e,i||this._baseSpec(t),n,r)}_rgb(e){if(typeof e!=`string`)return null;let t=e.trim();if(t[0]===`#`){t.length===4&&(t=`#`+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);let e=parseInt(t.slice(1,7),16);return isNaN(e)?null:[e>>16&255,e>>8&255,e&255]}let n=t.match(/rgba?\(([^)]+)\)/);if(n){let e=n[1].split(`,`).map(e=>parseFloat(e));if(e.length>=3&&e.every(e=>!isNaN(e)))return[e[0],e[1],e[2]]}return null}_shouldAnimate(){let e=this.w,t=e.config.chart.animations;return!(!d_.isBrowser()||!t||t.enabled===!1||e.globals.shouldAnimate===!1||e.globals.resized&&!e.globals.dataChanged||t.respectReducedMotion&&Uh())}_seedSprings(e,t,n){let[r,i]=cS(t.spring,n),a=this.ctx?this.ctx._unitSprings:null,o=new Map;for(let t=0;t<e.length;t++){let n=e[t],s=a&&!n.isEnter&&n.key!=null?a.get(n.key):null,c=s?s.x:Bx(n.cx0,r,i),l=s?s.y:Bx(n.cy0,r,i);s&&(c.stiffness=r,l.stiffness=r,c.damping=i,l.damping=i,n.cx0=c.value,n.cy0=l.value,this._place(n.node,n.spec,n.cx0,n.cy0),(c.velocity!==0||l.velocity!==0)&&(n.delay=0)),n.sx=c,n.sy=l,n.key!=null&&o.set(n.key,{x:c,y:l})}this.ctx&&(this.ctx._unitSprings=o)}_runGather(e){let t=this.w,n=t.config.plotOptions.unit,r=Math.max(1,t.config.chart.animations.speed||800),i=Math.min(r*.6,450),a=e.length;for(let t=0;t<a;t++)e[t].delay=a>1?t/(a-1)*i:0;let o=n.gather||{},s=o.motion||`auto`;s===`spring`||s===`auto`&&(!o.easing||o.easing===`outCubic`)?this._seedSprings(e,o,r):this.ctx&&(this.ctx._unitSprings=null);for(let t=0;t<a;t++){let n=e[t];n.spec.pk===aS&&n.r0!=null&&n.r1!=null&&n.r0!==n.r1&&n.node.setAttribute(`r`,String(n.r0))}for(let t=0;t<a;t++){let n=e[t];n.fill0&&n.fill1&&n.fill0!==n.fill1&&(n._c0=this._rgb(n.fill0),n._c1=this._rgb(n.fill1))}let c=o.easing===`outBack`?tS(typeof o.overshoot==`number`?o.overshoot:1.70158):o.easing===`inOutCubic`?nS:eS;this.w.globals.unitGatherRAF!=null&&(Q.cancelAnimationFrame(this.w.globals.unitGatherRAF),this.w.globals.unitGatherRAF=null);let l=performance.now(),u=l,d=t=>{if(this.w.globals.isDestroyed){this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0;return}let n=Math.min(iS,Math.max(0,(t-u)/1e3));u=t;let i=!0;for(let o=0;o<a;o++){let a=e[o],s=t-l-a.delay,u=Math.max(0,Math.min(1,s/r)),d=eS(u),f,p;if(a.sx&&a.sy){s>=0&&!a.released&&(Hx(a.sx,a.x),Hx(a.sy,a.y),a.released=!0);let e=Vx(a.sx,n),t=Vx(a.sy,n);(!a.released||!e||!t)&&(i=!1),f=a.sx.value,p=a.sy.value}else{let e=c(u);f=a.cx0+(a.x-a.cx0)*e,p=a.cy0+(a.y-a.cy0)*e}if(this._place(a.node,a.spec,f,p),a.isEnter&&(a.node.style.opacity=String(Math.min(1,u*2.5))),a._c0&&a._c1){let e=Math.round(a._c0[0]+(a._c1[0]-a._c0[0])*d),t=Math.round(a._c0[1]+(a._c1[1]-a._c0[1])*d),n=Math.round(a._c0[2]+(a._c1[2]-a._c0[2])*d);a.node.setAttribute(`fill`,`rgb(${e},${t},${n})`)}a.spec.pk===aS&&a.r0!=null&&a.r1!=null&&a.r0!==a.r1&&a.node.setAttribute(`r`,String(a.r0+(a.r1-a.r0)*d)),u<1&&(i=!1)}if(i){for(let t=0;t<a;t++){let n=e[t];n.node.style.opacity=``,n._c1&&n.fill1&&n.node.setAttribute(`fill`,n.fill1),n.spec.pk===aS&&n.r0!=null&&n.r1!=null&&n.r0!==n.r1&&n.node.setAttribute(`r`,String(n.r1))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=Q.requestAnimationFrame(d)};this.w.globals.unitGatherRAF=Q.requestAnimationFrame(d)}_collectExits(e,t,n){let r=Math.max(0,n.maxUnits||5e3),i=[];for(let[n,a]of e)if(!t.has(n)&&(i.push(a),i.length>=r))break;return i}_runExits(e,t,n){let r=this.w,i=new Z(r,this.ctx),a=this._lastDotR,o=r.layout.gridWidth/2,s=r.layout.gridHeight/2,c=n.layout===`grid`||n.layout===`scatter`||n.layout===`arc`||n.layout===`custom`?0:.35,l=[];if(t.forEach(t=>{let r=t.r==null?a:t.r,o=t.spec||this._baseSpec(n,r),s=this._drawDot(i,n,r,t.fill,0,0,o);s.node.classList.add(`apexcharts-unit-exit`),this._place(s.node,o,t.x,t.y),e.add(s),l.push({node:s.node,x0:t.x,y0:t.y,spec:o})}),!this._shouldAnimate()){l.forEach(e=>e.node.remove());return}let u=Math.max(1,r.config.chart.animations.speed||800);this.w.globals.unitExitRAF!=null&&(Q.cancelAnimationFrame(this.w.globals.unitExitRAF),this.w.globals.unitExitRAF=null);let d=performance.now(),f=t=>{if(this.w.globals.isDestroyed){this.w.globals.unitExitRAF=null;return}let n=Math.max(0,Math.min(1,(t-d)/u)),r=eS(n);for(let e=0;e<l.length;e++){let t=l[e];if(c){let e=t.x0+(o-t.x0)*r*c,n=t.y0+(s-t.y0)*r*c;this._place(t.node,t.spec,e,n)}t.node.style.opacity=String(1-r)}n<1?this.w.globals.unitExitRAF=Q.requestAnimationFrame(f):(this.w.globals.unitExitRAF=null,e.node&&e.node.remove())};this.w.globals.unitExitRAF=Q.requestAnimationFrame(f)}_outerLabelsOn(e){let t=e.clusterLabels;return!!(e.layout===`custom`&&t&&t.show!==!1&&t.external&&t.external.show)}_outerLabelLines(e,t,n,r){let i=this.w,a=i.seriesData.seriesNames[e]||`series-${e+1}`,o=n>0?t/n*100:0,s=r.clusterLabels,c=typeof s.formatter==`function`?s.formatter(a,{seriesIndex:e,value:t,percent:o,w:i}):`${a}
|
|
2526
2526
|
${o.toFixed(1)}%`;return String(c).split(`
|
|
2527
|
-
`)}_outerLabelGutter(e,t){let n=this.w,r=t.clusterLabels,i=r.external.connector||{},a=e.reduce((e,t)=>e+t,0),o=[];if(e.forEach((e,n)=>{e>0&&o.push(...this._outerLabelLines(n,e,a,t))}),!o.length)return 0;let s=ex(n,o,{fontSize:r.fontSize,fontFamily:r.fontFamily||n.config.chart.fontFamily}),c=i.gap==null?8:i.gap,l=i.length==null?22:i.length,u=s+c+l+8+Math.abs(parseFloat(r.external.offsetX)||0);return Math.min(u,n.layout.gridWidth*.25)}_drawOuterLabels(e,t,n,r,i,a){let o=this.w;if(!d_.isBrowser())return;let s=i.clusterLabels,c=s.external,l=c.connector||{},u=l.gap==null?8:l.gap,d=l.length==null?22:l.length,f=parseFloat(c.offsetX)||0,p=parseFloat(c.offsetY)||0,m=o.layout.gridWidth,h=o.layout.gridHeight,g=this._lastDotR,_=t.filter(e=>e.dots.length>0);if(!_.length)return;let v=0,y=0;if(_.length>1){let e=_.map(e=>e.cx),t=_.map(e=>e.cy);v=Math.max(...e)-Math.min(...e),y=Math.max(...t)-Math.min(...t)}let b=v>y,x=parseFloat(s.fontSize)||13,S=Math.round(x*1.35),C=[];if(_.slice().sort((e,t)=>e.cy-t.cy).forEach((e,t)=>{let a=this._outerLabelLines(e.i,n[e.i],r,i);if(!a.some(e=>e!==``))return;let o=b?e.cx>=m/2?`right`:`left`:t%2==0?`right`:`left`,s=o===`right`?1:-1,c=e.dots[0],l=-1/0;e.dots.forEach(t=>{let n=s*t.x-.75*Math.abs(t.y-e.cy);n>l&&(l=n,c=t)});let h={x:c.x+s*(c.r||g),y:c.y},_={x:h.x+s*u,y:h.y};C.push({i:e.i,lines:a,anchor:h,elbow:_,labelX:_.x+s*d+f,idealY:h.y+p,labelY:h.y+p,side:o})}),!C.length)return;let w=C.reduce((e,t)=>Math.max(e,t.lines.length),1)*S,T=w/2;[`left`,`right`].forEach(e=>{tx(C.filter(t=>t.side===e),w+2,h-T,T)});let E=new Z(o,this.ctx).group({class:`apexcharts-unit-outer-labels`});if(a){let e=Math.max(1,o.config.chart.animations.speed||800);E.node.classList.add(`apexcharts-unit-label-delay`),E.node.style.animationDelay=`${Math.min(e*.45,600)/1e3}s`}C.forEach(e=>{let t=o.globals.colors[e.i]||o.globals.colors[0]||`#008FFB`;E.add($b(o,{lines:e.lines,lineHeight:S,anchor:e.anchor,elbow:e.elbow,labelX:e.labelX,labelY:e.labelY,side:e.side,connector:{show:l.show!==!1,width:l.width==null?1.5:l.width,color:l.color||t},style:{fontSize:s.fontSize,fontFamily:s.fontFamily||o.config.chart.fontFamily,fontWeight:s.fontWeight},foreColor:s.color||o.config.chart.foreColor,groupClass:`apexcharts-unit-outer-label-group`,textClass:`apexcharts-unit-outer-label`,connectorClass:`apexcharts-unit-label-connector`}))}),e.add(E)}_drawClusterLabel(e,t,n,r,i,a){let o=this.w;if(!d_.isBrowser())return;let s=`http://www.w3.org/2000/svg`,c=o.seriesData.seriesNames[t.i]||`series-${t.i+1}`,l=r>0?n/r*100:0,u=i.clusterLabels,d=parseFloat(u.fontSize)||13,f;f=typeof u.formatter==`function`?u.formatter(c,{seriesIndex:t.i,value:n,percent:l,w:o}):`${c} (${l.toFixed(1)}%)`;let p=typeof f==`string`?f:String(f),m=Q.createElementNS(s,`text`);m.setAttribute(`class`,`apexcharts-unit-label`),m.setAttribute(`text-anchor`,`middle`),m.setAttribute(`font-size`,`${d}px`),m.setAttribute(`font-family`,u.fontFamily||o.config.chart.fontFamily||`inherit`),m.setAttribute(`font-weight`,String(u.fontWeight||600)),m.setAttribute(`fill`,u.color||a);let h=u.position===`bottom`,g=t.outerR+d*.6+3+(u.offsetY||0),_=p.length*d*.55;if(!h&&!t.flat&&u.curved!==!1&&_<=Math.PI*g*.95){let n=t.cy,r=`M ${t.cx-g} ${n} A ${g} ${g} 0 0 1 ${t.cx+g} ${n}`,i=`apexcharts-unit-label-${o.globals.chartID}-${t.i}`,a=Q.createElementNS(s,`path`);a.setAttribute(`id`,i),a.setAttribute(`d`,r),a.setAttribute(`fill`,`none`),a.setAttribute(`stroke`,`none`);let c=Q.createElementNS(s,`textPath`);c.setAttribute(`href`,`#${i}`),c.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,`#${i}`),c.setAttribute(`startOffset`,`50%`),c.textContent=p,m.appendChild(c),e.node.appendChild(a)}else{m.setAttribute(`x`,String(t.cx));let e=h?t.cy+t.outerR+d+6+(u.offsetY||0):t.cy-t.outerR-6-(u.offsetY||0);m.setAttribute(`y`,String(e)),m.textContent=p}e.node.appendChild(m)}},uS=Math.PI/180,dS=180/Math.PI,fS=`http://www.w3.org/2000/svg`,pS=`http://www.w3.org/1999/xhtml`,mS=(e,t,n)=>e+(t-e)*n,hS=class{constructor(e,t){this.ctx=t,this.w=e;let n=e.config;this.cfg=n.plotOptions.sunburst,this.strokeWidth=n.stroke.show?n.stroke.width:0,this.strokeColor=Array.isArray(n.stroke.colors)?n.stroke.colors[0]:n.stroke.colors||`#fff`,this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltipEl=null,this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(e){let t=this.w,n=new Z(this.w);this._graphics=n;let r=n.group({class:`apexcharts-sunburst`});if(t.globals.noData||!e||!e.length)return r;let i=t.layout.gridWidth,a=t.layout.gridHeight;if(this.centerX=i/2+(this.cfg.offsetX||0),this.centerY=a/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(i,a)/2.05-this.strokeWidth-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.maxRadius<5||(this._roots=this._buildHierarchy(),!this._roots.length))return r;this._roots.forEach(e=>this._fillValues(e)),this._validateStrict(),this._nodesAll=[];let o=t.globals.colors||[];this._roots.forEach((e,t)=>{this._colorPass(e,e.color||o[t%o.length]||`#008FFB`)}),this.total=this._roots.reduce((e,t)=>e+Math.max(0,t.value),0)||1,this._ringsG=n.group({class:`apexcharts-sunburst-rings`}),this._labelsG=n.group({class:`apexcharts-sunburst-labels`}),r.add(this._ringsG),r.add(this._labelsG),this._focus=null,this._relayout(this._focus);let s=t.config.chart.animations,c=`none`;return s.enabled&&(t.globals.dataChanged?s.dynamicAnimation.enabled&&(c=`update`):t.globals.resized||(c=`intro`)),this._applyLayout(c),this._renderBreadcrumb(),r}_buildHierarchy(){return kx(this.w)}_fillValues(e){jx(e)}_validateStrict(){if(this.cfg.partition!==`strict`)return;let e=!1,t=n=>{if(n.children&&n.children.length){let r=n.children.reduce((e,t)=>e+Math.max(0,t.value||0),0);!e&&n.value!=null&&Math.abs(r-n.value)>.5&&(console.warn(`ApexCharts sunburst: partition 'strict' but "${n.name}" (${n.value}) != sum of its children (${r}). Angles are normalized to fill the wedge.`),e=!0),n.children.forEach(t)}};this._roots.forEach(t)}_colorPass(e,t){e._color=e.color||t,this._nodesAll.push(e),e.children&&e.children.forEach(t=>this._colorPass(t,t.color||this._lighten(e._color,this.cfg.tint)))}_relayout(e){if(this._nodesAll.forEach(e=>{e._show=!1}),this._focusMaxDepth=0,e)this._placeVis(e,0,this.startAngle,this.endAngle,e._parent);else{let e=this._roots.reduce((e,t)=>e+Math.max(0,t.value),0)||1,t=this.startAngle;this._roots.forEach(n=>{let r=(this.endAngle-this.startAngle)*Math.max(0,n.value)/e;this._placeVis(n,0,t,t+r,null),t+=r})}let t=this._parseSize(this.cfg.innerSize,this.maxRadius),n=this._focusMaxDepth+1,r=(this.maxRadius-t)/n,i=n>1?1:0;this._innerR=e=>t+e*r+(e>0?i/2:0),this._outerR=e=>t+(e+1)*r-i/2,this._nodesAll.forEach(e=>{e._show&&(e._iR=this._innerR(e._vDepth),e._oR=e._leaf&&this.cfg.leaf===`extend`&&e._vDepth<this._focusMaxDepth?this.maxRadius:this._outerR(e._vDepth))})}_placeVis(e,t,n,r,i){if(e._show=!0,e._vDepth=t,e._a0=n,e._a1=r,e._parent=i,e._leaf=!(e.children&&e.children.length),t>this._focusMaxDepth&&(this._focusMaxDepth=t),!e._leaf){let i=e.children.reduce((e,t)=>e+Math.max(0,t.value),0)||1,a=n;e.children.forEach(o=>{let s=(r-n)*Math.max(0,o.value)/i;this._placeVis(o,t+1,a,a+s,e),a+=s})}}_applyLayout(e){let t=this.w.config.chart.animations,n=t.enabled?e===`none`?0:e===`update`?t.dynamicAnimation.speed||350:t.speed||500:0,r=++this._zoomGen,i=this.ctx?.morphTypeChange,a=!!i&&typeof i.isActive==`function`&&i.isActive()&&typeof i.getInitialPathAt==`function`,o=a?i.getSpeed():0;this._morphLeafIndex=0;let s=e===`update`?this.ctx._sunburstPrevGeoms:null;this._nodesAll.forEach(t=>{if(t._show){let i={a0:t._a0,a1:t._a1,iR:t._iR,oR:t._oR};t._el||=this._createArcEl(t);let c=a?this._morphSourceFor(t):null;if(c&&o>0)this._morphArcFrom(t,c,i,o,r);else if((e===`intro`||a)&&n>0)this._sweepArc(t,i,a?o:n,r);else{let e,a=!1;if(t._cur)e=t._cur;else if(s&&s.get(t._key))e=s.get(t._key);else{let t=(i.a0+i.a1)/2;e={a0:t,a1:t,iR:i.iR,oR:i.iR},a=!0}this._animateArc(t,e,i,n,!1,a,r)}}else if(t._el&&t._cur){let e=(t._cur.a0+t._cur.a1)/2,i={a0:e,a1:e,iR:t._cur.iR,oR:t._cur.iR};this._animateArc(t,t._cur,i,n,!0,!1,r)}});let c=new Map;this._nodesAll.forEach(e=>{e._show&&c.set(e._key,{a0:e._a0,a1:e._a1,iR:e._iR,oR:e._oR})}),this.ctx._sunburstPrevGeoms=c,this._renderLabels(n)}_morphSourceFor(e){let t=this.ctx,n=t&&t.morphTypeChange;return n?typeof n.hasKeyedMarks==`function`&&n.hasKeyedMarks()&&typeof n.getInitialPathForKey==`function`?n.getInitialPathForKey(Mx(e._key)):e.children&&e.children.length?null:n.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(e,t,n,r,i){let a=e._el,o=this._arcPath(n.iR,n.oR,n.a0,n.a1,this.cfg.borderRadius);a.node.style.display=``,a.attr({d:t,opacity:1}),e._cur=n,this._zoomGen===i&&new Bh(this.w,this.ctx).morphSVG(a,0,null,e._color,t,o,r,0)}_sweepArc(e,t,n,r){let i=e._el,a=this.cfg.borderRadius,o=this.startAngle,s=this.endAngle;i.node.style.display=``,i.attr({d:``,opacity:1}),i.animate(n).during(n=>{if(this._zoomGen!==r)return;let c=o+(s-o)*n;if(c<=t.a0+.01){i.attr({d:``});return}let l=Math.min(t.a1,c);i.attr({d:this._arcPath(t.iR,t.oR,t.a0,l,a)}),e._cur={a0:t.a0,a1:l,iR:t.iR,oR:t.oR}}).after(()=>{this._zoomGen===r&&(e._cur=t)})}_createArcEl(e){let t=this._graphics.drawPath({d:``,fill:e._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,fillOpacity:1,classes:`apexcharts-sunburst-arc`}),n=t.node;return n.setAttribute(`data:name`,e.name),n.setAttribute(`data:value`,String(e.value)),n.setAttribute(`data:key`,Mx(e._key)),n.setAttribute(`data:leaf`,String(!(e.children&&e.children.length))),this._attachTooltip(n,e),d_.isBrowser()&&(n.addEventListener(`click`,()=>this._zoomTo(e)),n.style.cursor=`pointer`),this._ringsG.add(t),t}_animateArc(e,t,n,r,i,a,o){let s=e._el,c=this.cfg.borderRadius;if(s.attr({fill:e._color}),r===0){s.attr({d:this._arcPath(n.iR,n.oR,n.a0,n.a1,c),opacity:i?0:1}),s.node.style.display=i?`none`:``,e._cur=i?null:n;return}s.node.style.display=``;let l=i?Number(s.attr(`opacity`))||1:a?0:1,u=i?0:1;s.attr({opacity:l}),s.animate(r).during(r=>{if(this._zoomGen!==o)return;let i=mS(t.a0,n.a0,r),a=mS(t.a1,n.a1,r),d=mS(t.iR,n.iR,r),f=mS(t.oR,n.oR,r);s.attr({d:this._arcPath(d,f,i,a,c),opacity:mS(l,u,r)}),e._cur={a0:i,a1:a,iR:d,oR:f}}).after(()=>{this._zoomGen===o&&(i?(s.node.style.display=`none`,e._cur=null):e._cur=n)})}_renderLabels(e){let t=this._labelsG;for(;t.node.firstChild;)t.node.removeChild(t.node.firstChild);this.cfg.dataLabels.show&&(this._nodesAll.forEach(e=>{e._show&&(e._a1-e._a0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(e))}),e>0?(t.attr({opacity:0}),t.animate(250,e).attr({opacity:1})):t.attr({opacity:1}))}_renderCurvedLabel(e){if(!d_.isBrowser())return;let t=this.cfg.dataLabels.style,n=this.w,r=(e._iR+e._oR)/2,i=(e._a0+e._a1)/2,a=i>90&&i<270,o=Math.min(r>0?4/r*dS:0,(e._a1-e._a0)/2),s=a?e._a1-o:e._a0+o,c=a?e._a0+o:e._a1-o,l=this._ptAt(r,s),u=this._ptAt(r,c),d=Math.abs(c-s)>180?1:0,f=a?0:1,p=`apx-sb-lbl-${n.globals.cuid}-${this._lblSeq++}`,m=Q.createElementNS(fS,`path`);m.setAttribute(`id`,p),m.setAttribute(`d`,`M ${l.x} ${l.y} A ${r} ${r} 0 ${d} ${f} ${u.x} ${u.y}`),m.setAttribute(`fill`,`none`),m.setAttribute(`stroke`,`none`);let h=t.colors,g=(Array.isArray(h)?h[0]:h)||`#fff`,_=Q.createElementNS(fS,`text`);_.setAttribute(`font-size`,t.fontSize||`12px`),t.fontFamily&&_.setAttribute(`font-family`,t.fontFamily),_.setAttribute(`font-weight`,String(t.fontWeight||400)),_.setAttribute(`fill`,g),_.setAttribute(`dominant-baseline`,`central`),_.style.pointerEvents=`none`;let v=Q.createElementNS(fS,`textPath`);v.setAttribute(`href`,`#`+p),v.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,`#`+p),v.setAttribute(`startOffset`,`50%`),v.setAttribute(`text-anchor`,`middle`),v.textContent=this._truncate(e.name,r,e._a1-e._a0,t.fontSize),_.appendChild(v),this._labelsG.node.appendChild(m),this._labelsG.node.appendChild(_)}_truncate(e,t,n,r){let i=t*n*uS-8,a=(parseFloat(r)||12)*.58,o=Math.floor(i/a);return o>=e.length?e:o<=1?``:e.slice(0,Math.max(1,o-1))+`…`}_zoomTo(e){if(this.cfg.zoomOnClick===!1)return;let t=e===this._focus?e._parent||null:e;t!==this._focus&&(this._focus=t&&!(t.children&&t.children.length)?t._parent||null:t,this._relayout(this._focus),this._applyLayout(`zoom`),this._renderBreadcrumb())}_focusChain(){let e=[],t=this._focus;for(;t;)e.unshift(t),t=t._parent;return e}_renderBreadcrumb(){if(!d_.isBrowser())return;let e=this.w.dom.elWrap;if(!e)return;let t=e.querySelector(`.apexcharts-breadcrumb`);if(t&&t.parentNode&&t.parentNode.removeChild(t),!this._focus)return;let n=Q.createElementNS(pS,`nav`);n.setAttribute(`class`,`apexcharts-breadcrumb`),n.setAttribute(`aria-label`,`Sunburst breadcrumb`),n.style.position=`absolute`,n.style.top=`0px`,n.style.left=`0px`;let r=[{name:`All`,node:null}].concat(this._focusChain().map(e=>({name:e.name,node:e})));r.forEach((e,t)=>{if(t>0){let e=Q.createElementNS(pS,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.textContent=` / `,n.appendChild(e)}if(t===r.length-1){let t=Q.createElementNS(pS,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),t.textContent=e.name,n.appendChild(t)}else{let r=Q.createElementNS(pS,`button`);if(r.setAttribute(`type`,`button`),r.setAttribute(`class`,`apexcharts-breadcrumb-item`),t===0){let e=Q.createElementNS(pS,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),e.textContent=`←`,r.appendChild(e)}let i=Q.createElementNS(pS,`span`);i.setAttribute(`class`,`apexcharts-breadcrumb-label`),i.textContent=e.name,r.appendChild(i),r.addEventListener(`click`,()=>{this._focus=e.node,this._relayout(this._focus),this._applyLayout(`zoom`),this._renderBreadcrumb()}),n.appendChild(r)}}),e.appendChild(n),this._avoidChromeOverlap(n)}_avoidChromeOverlap(e){wv(this.w,e)}_ptAt(e,t){return{x:this.centerX+e*Math.cos((t-90)*uS),y:this.centerY+e*Math.sin((t-90)*uS)}}_arcPath(e,t,n,r,i){if(t<=e+.01)return``;let a=r-n,o=this.cfg.spacing;if(o>0&&a>0&&t>0){let e=o/t*dS,i=Math.min(e/2,Math.max(0,a/2-.25));n+=i,r-=i,a=r-n}if(a<=0)return``;let s=a*uS,c=this.centerX,l=this.centerY,u=i;return u=Math.min(u,s*e/2,s*t/2,(t-e)/2),u>.5?sx({cx:c,cy:l,rIn:e,rOut:t,a0:n,a1:r,r:u,spanDeg:a}):lx({cx:c,cy:l,rIn:e,rOut:t,a0:n,a1:r,spanDeg:a})}_tip(){return this._tooltipEl||=this.w.dom.baseEl.querySelector(`.apexcharts-tooltip`),this._tooltipEl}_attachTooltip(e,t){!this.w.config.tooltip.enabled||!d_.isBrowser()||(e.addEventListener(`mouseenter`,e=>this._showTooltip(e,t)),e.addEventListener(`mousemove`,e=>this._positionTooltip(e)),e.addEventListener(`mouseleave`,()=>this._hideTooltip()))}_showTooltip(e,t){let n=this._tip();if(!n)return;let r=this.w,i=(t.value/this.total*100).toFixed(1),a=t._parent?t._parent.value:this.total,o=a>0?(t.value/a*100).toFixed(1):i;n.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${r.config.tooltip.fillSeriesColor?`background-color:${t._color};`:``}"><span class="apexcharts-tooltip-marker" style="background-color:${t._color}"></span><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${t.name}: </span><span class="apexcharts-tooltip-text-y-value">${t.value} (${o}% of parent, ${i}% of total)</span></div></div></div>`,n.classList.add(`apexcharts-active`),n.style.opacity=`1`,this._positionTooltip(e)}_positionTooltip(e){let t=this._tip();if(!t)return;let n=this.w.dom.elWrap.getBoundingClientRect(),r=t.offsetWidth,i=t.offsetHeight,a=e.clientX-n.left+12;a+r>n.width&&(a=e.clientX-n.left-r-12),a=Math.max(0,Math.min(a,n.width-r));let o=e.clientY-n.top+12;o+i>n.height&&(o=e.clientY-n.top-i-12),o=Math.max(0,Math.min(o,n.height-i)),t.style.left=a+`px`,t.style.top=o+`px`}_hideTooltip(){let e=this._tip();e&&(e.classList.remove(`apexcharts-active`),e.style.opacity=`0`)}_parseSize(e,t){if(typeof e==`number`)return e;let n=String(e).trim();if(n.endsWith(`%`))return parseFloat(n)/100*t;let r=parseFloat(n);return isNaN(r)?.15*t:r}_lighten(e,t){if(typeof e!=`string`||e[0]!==`#`)return e;let n=e.slice(1);if(n.length===3&&(n=n.split(``).map(e=>e+e).join(``)),n.length!==6)return e;let r=parseInt(n,16);if(isNaN(r))return e;let i=r>>16&255,a=r>>8&255,o=r&255;return i=Math.round(i+(255-i)*t),a=Math.round(a+(255-a)*t),o=Math.round(o+(255-o)*t),`#`+((1<<24)+(i<<16)+(a<<8)+o).toString(16).slice(1)}};kh.use({line:Qb,area:Qb,scatter:Qb,bubble:Qb,rangeArea:Qb,bar:Eb,column:Eb,barStacked:Db,rangeBar:gx,candlestick:Fb,boxPlot:Fb,violin:Vb,pie:fx,donut:fx,polarArea:fx,radialBar:hx,radar:mx,heatmap:qb,treemap:Ix,unit:lS,sunburst:hS}),Object.defineProperty(kh,`__internals`,{value:g_,enumerable:!1,writable:!1,configurable:!1});const gS=[`day`,`week`,`month`,`year`];var _S={day:30,week:12,month:12,year:5};function vS(e,t){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate());return e===`week`&&n.setDate(n.getDate()-(n.getDay()+6)%7),e===`month`&&n.setDate(1),e===`year`&&n.setMonth(0,1),n}function yS(e,t,n){let r=new Date(t);return e===`day`?r.setDate(r.getDate()+n):e===`week`?r.setDate(r.getDate()+7*n):e===`month`?r.setMonth(r.getMonth()+n):r.setFullYear(r.getFullYear()+n),r}function bS(e,t=new Date){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()+1);return{from:yS(e,vS(e,t),1-_S[e]),to:n}}function xS(e,t,n,r,i){let a=[];for(let r=vS(e,t);r<n;r=yS(e,r,1))a.push({start:r,entries:0,exits:0});let o=(e,t)=>{let n=new Date(e).getTime(),r=0,i=a.length-1;for(;r<i;){let e=r+i+1>>1;a[e].start.getTime()<=n?r=e:i=e-1}a[r]&&a[r].start.getTime()<=n&&(a[r][t]+=1)};for(let e of r)o(e,`entries`);for(let e of i)o(e,`exits`);return a}var SS={class:`flow-filters`},CS={class:`flow-hint`},wS={class:`flow-totals`},TS={class:`flow-totals__in`},ES={class:`flow-totals__out`},DS=[`aria-label`],OS={key:0,class:`flow-error`},kS=u(M({__name:`KanbanFlowDialog`,props:{board:{},load:{type:Function},t:{type:Function}},emits:[`close`],setup(e,{emit:n}){let r=e,i=n,a=r.t,o=j(`day`),s=j(null),c=j([]),l=j(!1),u=j(!1),d=j(null),f=null,p=0,m=t(()=>gS.map(e=>({value:e,label:a(`flow.granularity.${e}`)})));function h(){let{from:e,to:t}=bS(o.value);s.value=[e,new Date(t.getFullYear(),t.getMonth(),t.getDate()-1)]}let y=t(()=>{let[e,t]=s.value??[];return!e||!t?null:{from:e,to:new Date(t.getFullYear(),t.getMonth(),t.getDate()+1)}}),b=t(()=>c.value.reduce((e,t)=>({entries:e.entries+t.entries,exits:e.exits+t.exits}),{entries:0,exits:0}));async function C(){let e=r.board,t=y.value;if(!e||!t)return;let n=++p;l.value=!0,u.value=!1;let i=await r.load(e.id,t.from,t.to);n===p&&(l.value=!1,i?c.value=xS(o.value,t.from,t.to,i.entries,i.exits):(u.value=!0,c.value=[]),await oe(),A())}function T(){return typeof document<`u`&&document.documentElement.lang||void 0}function E(e){let t=T();switch(o.value){case`day`:case`week`:return e.toLocaleDateString(t,{day:`numeric`,month:`short`});case`month`:return e.toLocaleDateString(t,{month:`short`,year:`2-digit`});default:return String(e.getFullYear())}}function D(e){let t=T();return o.value===`week`?a(`flow.weekOf`,{date:e.toLocaleDateString(t,{day:`numeric`,month:`long`})}):o.value===`month`?e.toLocaleDateString(t,{month:`long`,year:`numeric`}):o.value===`day`?e.toLocaleDateString(t,{weekday:`short`,day:`numeric`,month:`long`,year:`numeric`}):String(e.getFullYear())}function k(e,t){return typeof document>`u`?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}function A(){if(!d.value)return;let e={chart:{type:`line`,height:320,toolbar:{show:!1},zoom:{enabled:!1},animations:{enabled:!1},fontFamily:`inherit`,foreColor:k(`--p-text-muted-color`,`#64748b`)},series:[{name:a(`flow.entries`),data:c.value.map(e=>e.entries)},{name:a(`flow.exits`),data:c.value.map(e=>e.exits)}],colors:[k(`--p-primary-color`,`#6366f1`),k(`--p-green-500`,`#22c55e`)],stroke:{curve:`smooth`,width:2},markers:{size:c.value.length>60?0:3},xaxis:{categories:c.value.map(e=>E(e.start)),labels:{rotate:-45,hideOverlappingLabels:!0,trim:!1}},yaxis:{min:0,forceNiceScale:!0,labels:{formatter:e=>String(Math.round(e))}},grid:{borderColor:k(`--p-content-border-color`,`#e2e8f0`)},legend:{position:`top`,horizontalAlign:`left`},tooltip:{shared:!0,intersect:!1,theme:`dark`,x:{formatter:(e,t)=>{let n=c.value[t?.dataPointIndex??-1];return n?D(n.start):``}}},noData:{text:a(`flow.empty`)}};f?f.updateOptions(e,!0,!1):(f=new kh(d.value,e),f.render())}function ee(){f?.destroy(),f=null}return Ie(o,()=>h()),Ie(y,()=>void C()),Ie(()=>r.board?.id,e=>{ee(),c.value=[],e&&(o.value=`day`,h())},{immediate:!0}),pe(ee),(t,n)=>(F(),_(S(ne),{visible:!!e.board,header:e.board?S(a)(`flow.title`,{name:e.board.name}):``,modal:!0,style:{width:`760px`,maxWidth:`calc(100vw - 2rem)`},"onUpdate:visible":n[2]||=e=>{e||i(`close`)},onShow:A,onAfterHide:ee},{default:O(()=>[L(`div`,SS,[B(S(Ve),{modelValue:o.value,"onUpdate:modelValue":n[0]||=e=>o.value=e,options:m.value,"option-label":`label`,"option-value":`value`,"allow-empty":!1,"aria-label":S(a)(`flow.granularityLabel`)},null,8,[`modelValue`,`options`,`aria-label`]),B(S(Ft),{modelValue:s.value,"onUpdate:modelValue":n[1]||=e=>s.value=e,"selection-mode":`range`,"manual-input":!1,"date-format":`dd/mm/yy`,"show-icon":``,"icon-display":`input`,"max-date":new Date,"aria-label":S(a)(`flow.periodLabel`),class:`flow-filters__period`},null,8,[`modelValue`,`max-date`,`aria-label`])]),L(`p`,CS,g(S(a)(`flow.hint`)),1),L(`div`,wS,[L(`span`,TS,[n[3]||=L(`i`,{class:`pi pi-arrow-down-left`,"aria-hidden":`true`},null,-1),w(g(S(a)(`flow.totalEntries`,{count:b.value.entries})),1)]),L(`span`,ES,[n[4]||=L(`i`,{class:`pi pi-check-circle`,"aria-hidden":`true`},null,-1),w(g(S(a)(`flow.totalExits`,{count:b.value.exits})),1)]),l.value?(F(),x(`i`,{key:0,class:`pi pi-spin pi-spinner`,"aria-label":S(a)(`flow.loading`)},null,8,DS)):v(``,!0)]),u.value?(F(),x(`p`,OS,g(S(a)(`flow.error`)),1)):v(``,!0),L(`div`,{ref_key:`chartEl`,ref:d,class:`flow-chart`},null,512)]),_:1},8,[`visible`,`header`]))}}),[[`__scopeId`,`data-v-c2f185b6`]]),AS={class:`board-tile__head`},jS={class:`board-tile__heading`},MS=[`title`],NS={class:`board-tile__stats`},PS={class:`board-tile__cards`},FS=[`title`],IS={class:`board-tile__week-in`},LS={class:`board-tile__week-out`},RS={class:`board-tile__week-label`},zS={key:0,class:`board-tile__desc`},BS={key:1,class:`board-tile__projects`},VS=[`aria-label`],HS=[`title`],US={key:3,class:`board-tile__foot`},WS={key:0,class:`board-tile__people`},GS=[`title`],KS=[`src`,`onError`],qS=[`title`],JS=[`datetime`,`title`],YS=u(M({__name:`KanbanListTile`,props:{board:{},projectNames:{},cardsLabel:{},menuLabel:{},avatarUrl:{type:[Function,null]},t:{type:Function}},emits:[`open`,`menu`],setup(e,{emit:n}){let r=e,i=n,o=t(()=>[...r.board.name.trim()][0]?.toLocaleUpperCase()??`#`);function s(e){let t=e.trim().split(/\s+/).filter(Boolean);return((t[0]?.[0]??``)+(t.length>1?t[t.length-1][0]:``)).toLocaleUpperCase()||`?`}let c=t(()=>{let e=r.board.columnStats??[];if(!e.reduce((e,t)=>e+t.cardCount,0))return[];let t=Math.max(1,e.length-1);return e.map((e,n)=>({...e,strength:Math.round(25+75*n/t)})).filter(e=>e.cardCount>0)}),l=t(()=>r.t(`activity.distribution`,{detail:(r.board.columnStats??[]).map(e=>`${e.title} ${e.cardCount}`).join(`, `)})),u=t(()=>{let e=r.board.lastActivityAt;if(!e)return null;let t=typeof document<`u`&&document.documentElement.lang||void 0,n=_i(e,t);return n?{label:n,title:new Date(e).toLocaleString(t)}:null}),d=t(()=>{let e=r.board.week;if(!e)return null;let t=e.finalized??e.archived;return e.created||t?{created:e.created,finalized:t,reopened:e.reopened??0}:null}),f=te(new Set),m=t(()=>r.board.assignees??[]),h=t(()=>Math.max(0,(r.board.assigneeCount??m.value.length)-m.value.length));return(t,n)=>(F(),x(`article`,{class:R([`board-tile`,{"board-tile--archived":e.board.archived}]),tabindex:`0`,onClick:n[2]||=e=>i(`open`),onKeydown:n[3]||=Fe(k(e=>i(`open`),[`self`]),[`enter`])},[L(`div`,AS,[L(`span`,{class:`board-tile__mark`,style:ye(S(rn)(e.board.id)),"aria-hidden":`true`},g(o.value),5),L(`div`,jS,[L(`h3`,{class:`board-tile__name`,title:e.board.name},g(e.board.name),9,MS),L(`span`,NS,[L(`span`,PS,[n[4]||=L(`i`,{class:`pi pi-clone`,"aria-hidden":`true`},null,-1),w(g(e.cardsLabel),1)]),d.value?(F(),x(`span`,{key:0,class:`board-tile__week`,title:e.t(`activity.weekTitle`,{created:d.value.created,finalized:d.value.finalized})+(d.value.reopened?` ${e.t(`activity.weekReopened`,{count:d.value.reopened})}`:``)},[L(`span`,IS,[n[5]||=L(`i`,{class:`pi pi-arrow-down-left`,"aria-hidden":`true`},null,-1),w(g(d.value.created),1)]),L(`span`,LS,[n[6]||=L(`i`,{class:`pi pi-check-circle`,"aria-hidden":`true`},null,-1),w(g(d.value.finalized),1)]),L(`span`,RS,g(e.t(`activity.weekShort`)),1)],8,FS)):v(``,!0)])]),e.menuLabel?(F(),_(S(p),{key:0,icon:`pi pi-ellipsis-v`,text:``,rounded:``,severity:`secondary`,size:`small`,class:`board-tile__menu`,title:e.menuLabel,"aria-label":e.menuLabel,"aria-haspopup":`true`,onClick:n[0]||=k(e=>i(`menu`,e),[`stop`]),onKeydown:n[1]||=Fe(k(()=>{},[`stop`]),[`enter`])},null,8,[`title`,`aria-label`])):v(``,!0)]),e.board.description?(F(),x(`p`,zS,g(e.board.description),1)):v(``,!0),e.projectNames.length?(F(),x(`span`,BS,[(F(!0),x(a,null,z(e.projectNames,e=>(F(),x(`span`,{key:e,class:`board-tile__project`},[n[7]||=L(`i`,{class:`pi pi-box`,"aria-hidden":`true`},null,-1),w(g(e),1)]))),128))])):v(``,!0),c.value.length?(F(),x(`div`,{key:2,class:`board-tile__bar`,role:`img`,"aria-label":l.value},[(F(!0),x(a,null,z(c.value,e=>(F(),x(`span`,{key:e.id,class:R([`board-tile__segment`,{"board-tile__segment--done":e.done}]),style:ye({flexGrow:e.cardCount,"--strength":`${e.strength}%`}),title:`${e.title} : ${e.cardCount}`},null,14,HS))),128))],8,VS)):v(``,!0),m.value.length||u.value?(F(),x(`div`,US,[m.value.length?(F(),x(`span`,WS,[(F(!0),x(a,null,z(m.value,t=>(F(),x(`span`,{key:t.id,class:`board-tile__person`,style:ye(S(rn)(t.id)),title:t.name},[e.avatarUrl&&!f.has(t.id)?(F(),x(`img`,{key:0,src:e.avatarUrl(t.id),alt:``,onError:e=>f.add(t.id)},null,40,KS)):(F(),x(a,{key:1},[w(g(s(t.name)),1)],64))],12,GS))),128)),h.value?(F(),x(`span`,{key:0,class:`board-tile__person board-tile__person--more`,title:e.t(`activity.morePeople`,{count:h.value})},`+`+g(h.value),9,qS)):v(``,!0)])):v(``,!0),u.value?(F(),x(`time`,{key:1,class:`board-tile__when`,datetime:e.board.lastActivityAt??void 0,title:u.value.title},[n[8]||=L(`i`,{class:`pi pi-clock`,"aria-hidden":`true`},null,-1),w(g(u.value.label),1)],8,JS)):v(``,!0)])):v(``,!0)],34))}}),[[`__scopeId`,`data-v-ebb3cbec`]]);function XS(e){return`p:${e}`}function ZS(e,t){if(t===`all`)return!0;let n=e.projectIds??[];return t===`none`?n.length===0:n.includes(t.slice(2))}function QS(e,t){let n=[],r=[];for(let i of e){let e=i.projectIds??[];e.includes(t)?n.push(i):e.length===0&&r.push(i)}return{current:n,unassigned:r}}function $S(e,t){let n=t??[];return(e.projectIds??[]).map(e=>n.find(t=>t.id===e)?.name).filter(e=>!!e)}var eC={class:`kanban-list-page`},tC={key:0},nC={class:`page-header__right`},rC={class:`list-menu`},iC={class:`tabs-bar`},aC={key:0,class:`empty-state`},oC={key:0,class:`board-section__header`},sC={class:`board-section__count`},cC={class:`board-section__title`},lC={key:1,class:`section-empty`},uC={key:2,class:`board-grid`},dC={key:0,class:`empty-state`},fC={class:`board-grid`},pC={key:0,class:`list-menu`},mC={key:0,class:`dialog-field`},hC={for:`kanlist-new-template`},gC={key:0,class:`field-hint`},_C={class:`dialog-field`},vC={for:`kanlist-new-name`},yC={class:`dialog-field`},bC={for:`kanlist-new-desc`},xC={key:1,class:`dialog-field`},SC={for:`kanlist-new-projects`},CC={class:`field-hint`},wC={class:`dialog-field`},TC={for:`kanlist-new-instructions`},EC={class:`field-hint`},DC={class:`dialog-field`},OC={for:`kanlist-edit-name`},kC={class:`dialog-field`},AC={for:`kanlist-edit-desc`},jC={key:0,class:`dialog-field`},MC={for:`kanlist-edit-projects`},NC={class:`field-hint`},PC={class:`dialog-field`},FC={for:`kanlist-edit-instructions`},IC={class:`field-hint`},LC={class:`templates-intro`},RC={key:0,class:`empty-state`},zC={key:1,class:`template-list`},BC={class:`template-row__name`},VC={class:`hint`},HC={key:0,class:`template-row__actions`},UC={class:`dialog-field`},WC={for:`kanlist-tpl-name`},GC={class:`dialog-field`},KC={for:`kanlist-tpl-content`},qC={class:`hint`},JC={class:`templates-intro`},YC={key:0,class:`empty-state`},XC={key:1,class:`template-list`},ZC={class:`template-row__name`},QC={key:0,class:`template-row__actions`},$C=u(M({__name:`KanbanList`,props:{boards:{},readOnly:{type:Boolean,default:!1},boardsLimit:{default:null},templates:{default:null},boardTemplates:{default:null},projects:{default:null},currentProjectId:{default:null},loadFlow:{type:[Function,null],default:null},avatarUrl:{type:[Function,null],default:null},showTitle:{type:Boolean,default:!0},actionsTarget:{default:null},t:{}},emits:[`open`,`create`,`update`,`archive`,`delete`,`template-create`,`template-update`,`template-delete`,`board-template-delete`,`templates-needed`],setup(e,{emit:n}){let r=e,i=n,o=xe(),s=r.t;function c(e){i(`templates-needed`),e()}let l=j(!1),u=j(null),d=j(``),f=j(``),m=j(``),h=j(null),y=j(null),C=j(``),T=j(`all`),E=t(()=>[{value:`all`,label:s(`projects.filterAll`)},...(r.projects??[]).map(e=>({value:XS(e.id),label:e.name})),{value:`none`,label:s(`projects.filterNone`)}]);Ie(E,e=>{e.some(e=>e.value===T.value)||(T.value=`all`)});function D(e){let t=(e.projectIds??[]).filter(e=>e!==r.currentProjectId);return $S({...e,projectIds:t},r.projects)}let k=j([]);function A(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase()}let ee=t(()=>{let e;if(r.currentProjectId){let{current:t,unassigned:n}=QS(r.boards,r.currentProjectId);e=[...t,...n]}else e=r.boards.filter(e=>ZS(e,T.value));let t=A(C.value.trim());return t?e.filter(e=>A(e.name).includes(t)||A(e.description??``).includes(t)):e}),te=t(()=>ee.value.filter(e=>!e.archived)),M=t(()=>ee.value.filter(e=>e.archived)),N=t(()=>C.value.trim().length>0),re=t(()=>{if(!r.currentProjectId)return[{key:`all`,title:null,boards:te.value}];let{current:e,unassigned:t}=QS(te.value,r.currentProjectId);return[{key:`current`,title:s(`projects.sectionCurrent`),boards:e},{key:`unassigned`,title:s(`projects.sectionUnassigned`),boards:t}].filter(e=>e.boards.length>0||e.key===`current`&&!N.value)}),P=t(()=>te.value.length===0&&(N.value||!r.currentProjectId));function ie(){let e=r.currentProjectId;e&&r.projects?.some(t=>t.id===e)&&(k.value=[e]),c(()=>l.value=!0)}let ae=t(()=>r.boardsLimit!==null&&r.boards.length>=r.boardsLimit),oe=t(()=>!r.readOnly&&!ae.value);function se(e){let t=(r.boardTemplates??[]).find(t=>t.id===e);t&&(d.value.trim()||(d.value=t.name),m.value=t.instructions)}let ce=t(()=>(r.boardTemplates??[]).find(e=>e.id===y.value)??null);function ue(){!oe.value||!d.value.trim()||(i(`create`,{name:d.value.trim(),description:f.value.trim(),instructions:m.value.trim(),...ce.value?.columns.length?{columns:ce.value.columns}:{},...ce.value?.columnGroups?.length?{columnGroups:ce.value.columnGroups}:{},...k.value.length?{projectIds:[...k.value]}:{}}),l.value=!1,d.value=``,f.value=``,m.value=``,y.value=null,k.value=[])}function de(){if(!h.value)return;let{projectIds:e,...t}=h.value;i(`update`,r.projects?.length?{...t,projectIds:e}:t),h.value=null}let fe=j(!1),pe=j(null);function me(){pe.value={id:null,name:``,content:``}}function he(e){pe.value={id:e.id,name:e.name,content:e.content}}function _e(){let e=pe.value;if(!e||!e.name.trim())return;let t={name:e.name.trim(),content:e.content};e.id?i(`template-update`,{id:e.id,...t}):i(`template-create`,t),pe.value=null}function ve(e){o.require({message:s(`templates.confirmDeleteMessage`,{name:e.name}),header:s(`templates.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>i(`template-delete`,e.id)})}let ye=j(!1);function Se(e){o.require({message:s(`boardTemplates.confirmDeleteMessage`,{name:e.name}),header:s(`boardTemplates.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>i(`board-template-delete`,e.id)})}let Ce=j(null);function Te(e){Ce.value?.hide(),e()}let Ee=j(null),De=j(null);function Oe(e,t){De.value=e,Ee.value?.toggle(t)}function Ae(e){let t=De.value;Ee.value?.hide(),t&&e(t)}function je(e){h.value={id:e.id,name:e.name,description:e.description,instructions:e.instructions??``,projectIds:[...e.projectIds??[]]}}function Me(e,t){o.require({message:s(`dialogs.confirmDeleteMessage`,{name:t}),header:s(`dialogs.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>i(`delete`,e)})}return(t,n)=>(F(),x(`div`,eC,[L(`div`,{class:R([`page-header`,{"page-header--empty":!e.showTitle&&e.actionsTarget}])},[e.showTitle?(F(),x(`h1`,tC,g(S(s)(`title`)),1)):v(``,!0),(F(),_(b,{to:e.actionsTarget??`body`,disabled:!e.actionsTarget,defer:``},[L(`span`,nC,[e.projects?.length&&!e.currentProjectId?(F(),_(S(ke),{key:0,modelValue:T.value,"onUpdate:modelValue":n[0]||=e=>T.value=e,options:E.value,optionLabel:`label`,optionValue:`value`,class:`project-filter`,"aria-label":S(s)(`projects.filterLabel`)},null,8,[`modelValue`,`options`,`aria-label`])):v(``,!0),B(S(we),null,{default:O(()=>[B(S(le),{class:`pi pi-search`}),B(S(Le),{modelValue:C.value,"onUpdate:modelValue":n[1]||=e=>C.value=e,placeholder:S(s)(`searchPlaceholder`),class:`search-input`},null,8,[`modelValue`,`placeholder`])]),_:1}),e.readOnly?v(``,!0):(F(),_(S(p),{key:1,label:S(s)(`dialogs.newBoard`),icon:`pi pi-plus`,disabled:ae.value,onClick:n[2]||=e=>c(()=>l.value=!0)},null,8,[`label`,`disabled`])),e.templates||e.boardTemplates?(F(),x(a,{key:2},[B(S(p),{icon:`pi pi-ellipsis-v`,severity:`secondary`,outlined:``,title:S(s)(`menu`),"aria-label":S(s)(`menu`),onClick:n[3]||=e=>Ce.value?.toggle(e)},null,8,[`title`,`aria-label`]),B(S(Pe),{ref_key:`listMenu`,ref:Ce},{default:O(()=>[L(`div`,rC,[e.templates?(F(),x(`button`,{key:0,class:`list-menu__item`,onClick:n[4]||=e=>Te(()=>c(()=>fe.value=!0))},[n[34]||=L(`i`,{class:`pi pi-file-edit`},null,-1),L(`span`,null,g(S(s)(`templates.manage`)),1)])):v(``,!0),e.boardTemplates?(F(),x(`button`,{key:1,class:`list-menu__item`,onClick:n[5]||=e=>Te(()=>ye.value=!0)},[n[35]||=L(`i`,{class:`pi pi-bookmark`},null,-1),L(`span`,null,g(S(s)(`boardTemplates.manage`)),1)])):v(``,!0)])]),_:1},512)],64)):v(``,!0)])],8,[`to`,`disabled`]))],2),I(t.$slots,`banner`,{},void 0,!0),B(S(Ke),{value:`active`},{default:O(()=>[L(`div`,iC,[B(S(We),null,{default:O(()=>[B(S(qe),{value:`active`},{default:O(()=>[w(g(S(s)(`tabs.active`)),1)]),_:1}),B(S(qe),{value:`archived`},{default:O(()=>[w(g(S(s)(`tabs.archived`,{count:M.value.length})),1)]),_:1})]),_:1}),e.boardsLimit===null?v(``,!0):(F(),x(`span`,{key:0,class:R([`quota tabs-bar__quota`,{"quota--full":ae.value}])},g(S(s)(`quota`,{used:e.boards.length,limit:e.boardsLimit})),3))]),B(S(Ge),null,{default:O(()=>[B(S(Je),{value:`active`},{default:O(()=>[P.value?(F(),x(`div`,aC,g(N.value?S(s)(`noResults`,{query:C.value.trim()}):S(s)(`empty`)),1)):v(``,!0),(F(!0),x(a,null,z(re.value,t=>(F(),x(`section`,{key:t.key,class:`board-section`},[t.title?(F(),x(`header`,oC,[L(`span`,sC,g(t.boards.length),1),L(`h2`,cC,g(t.title),1)])):v(``,!0),t.boards.length===0?(F(),x(`div`,lC,[L(`span`,null,g(S(s)(`projects.sectionCurrentEmpty`)),1),oe.value?(F(),_(S(p),{key:0,label:S(s)(`dialogs.newBoard`),icon:`pi pi-plus`,size:`small`,outlined:``,onClick:ie},null,8,[`label`])):v(``,!0)])):(F(),x(`div`,uC,[(F(!0),x(a,null,z(t.boards,t=>(F(),_(YS,{key:t.id,board:t,"project-names":D(t),"cards-label":S(s)(`cards`,{count:t.cardCount}),"menu-label":e.readOnly?null:S(s)(`boardMenu`),t:S(s),"avatar-url":e.avatarUrl,onOpen:e=>i(`open`,t.id),onMenu:e=>Oe(t,e)},null,8,[`board`,`project-names`,`cards-label`,`menu-label`,`t`,`avatar-url`,`onOpen`,`onMenu`]))),128))]))]))),128))]),_:1}),B(S(Je),{value:`archived`},{default:O(()=>[M.value.length===0?(F(),x(`div`,dC,g(N.value?S(s)(`noResults`,{query:C.value.trim()}):S(s)(`archivedEmpty`)),1)):v(``,!0),L(`div`,fC,[(F(!0),x(a,null,z(M.value,t=>(F(),_(YS,{key:t.id,board:t,"project-names":D(t),"cards-label":S(s)(`cards`,{count:t.cardCount}),"menu-label":e.readOnly?null:S(s)(`boardMenu`),t:S(s),"avatar-url":e.avatarUrl,onOpen:e=>i(`open`,t.id),onMenu:e=>Oe(t,e)},null,8,[`board`,`project-names`,`cards-label`,`menu-label`,`t`,`avatar-url`,`onOpen`,`onMenu`]))),128))])]),_:1})]),_:1})]),_:1}),B(S(Pe),{ref_key:`boardMenu`,ref:Ee},{default:O(()=>[De.value?(F(),x(`div`,pC,[e.loadFlow?(F(),x(`button`,{key:0,class:`list-menu__item`,onClick:n[6]||=e=>Ae(e=>u.value=e)},[n[36]||=L(`i`,{class:`pi pi-chart-line`},null,-1),L(`span`,null,g(S(s)(`flow.open`)),1)])):v(``,!0),De.value.archived?(F(),x(`button`,{key:2,class:`list-menu__item`,onClick:n[9]||=e=>Ae(e=>i(`archive`,{id:e.id,archived:!1}))},[n[39]||=L(`i`,{class:`pi pi-replay`},null,-1),L(`span`,null,g(S(s)(`restore`)),1)])):(F(),x(a,{key:1},[L(`button`,{class:`list-menu__item`,onClick:n[7]||=e=>Ae(je)},[n[37]||=L(`i`,{class:`pi pi-pencil`},null,-1),L(`span`,null,g(S(s)(`edit`)),1)]),L(`button`,{class:`list-menu__item`,onClick:n[8]||=e=>Ae(e=>i(`archive`,{id:e.id,archived:!0}))},[n[38]||=L(`i`,{class:`pi pi-inbox`},null,-1),L(`span`,null,g(S(s)(`archive`)),1)])],64)),L(`button`,{class:`list-menu__item list-menu__item--danger`,onClick:n[10]||=e=>Ae(e=>Me(e.id,e.name))},[n[40]||=L(`i`,{class:`pi pi-trash`},null,-1),L(`span`,null,g(S(s)(`delete`)),1)])])):v(``,!0)]),_:1},512),e.loadFlow?(F(),_(kS,{key:0,board:u.value,load:e.loadFlow,t:S(s),onClose:n[11]||=e=>u.value=null},null,8,[`board`,`load`,`t`])):v(``,!0),B(S(ne),{visible:l.value,"onUpdate:visible":n[19]||=e=>l.value=e,header:S(s)(`dialogs.newBoard`),modal:!0,style:{width:`450px`}},{footer:O(()=>[B(S(p),{label:S(s)(`cancel`),text:``,onClick:n[18]||=e=>l.value=!1},null,8,[`label`]),B(S(p),{label:S(s)(`create`),icon:`pi pi-check`,disabled:!d.value.trim(),onClick:ue},null,8,[`label`,`disabled`])]),default:O(()=>[e.boardTemplates?.length?(F(),x(`div`,mC,[L(`label`,hC,g(S(s)(`boardTemplates.pickLabel`)),1),B(S(ke),{id:`kanlist-new-template`,modelValue:y.value,"onUpdate:modelValue":n[12]||=e=>y.value=e,options:e.boardTemplates,optionLabel:`name`,optionValue:`id`,"show-clear":``,class:`w-full`,placeholder:S(s)(`boardTemplates.pickPlaceholder`),onChange:n[13]||=e=>se(y.value)},null,8,[`modelValue`,`options`,`placeholder`]),ce.value?(F(),x(`small`,gC,g(S(s)(`boardTemplates.pickHint`,{columns:ce.value.columns.map(e=>e.title).join(`, `)||S(s)(`boardTemplates.noColumns`)})),1)):v(``,!0)])):v(``,!0),L(`div`,_C,[L(`label`,vC,g(S(s)(`nameLabel`)),1),B(S(Le),{id:`kanlist-new-name`,modelValue:d.value,"onUpdate:modelValue":n[14]||=e=>d.value=e,autofocus:``,class:`w-full`,onKeyup:Fe(ue,[`enter`])},null,8,[`modelValue`])]),L(`div`,yC,[L(`label`,bC,g(S(s)(`descriptionLabel`)),1),B(S(be),{id:`kanlist-new-desc`,modelValue:f.value,"onUpdate:modelValue":n[15]||=e=>f.value=e,rows:`3`,class:`w-full`},null,8,[`modelValue`])]),e.projects?.length?(F(),x(`div`,xC,[L(`label`,SC,g(S(s)(`projects.label`)),1),B(S(He),{id:`kanlist-new-projects`,modelValue:k.value,"onUpdate:modelValue":n[16]||=e=>k.value=e,options:e.projects,optionLabel:`name`,optionValue:`id`,display:`chip`,class:`w-full`,placeholder:S(s)(`projects.placeholder`)},null,8,[`modelValue`,`options`,`placeholder`]),L(`small`,CC,g(S(s)(`projects.hint`)),1)])):v(``,!0),L(`div`,wC,[L(`label`,TC,g(S(s)(`instructionsLabel`)),1),B(S(be),{id:`kanlist-new-instructions`,modelValue:m.value,"onUpdate:modelValue":n[17]||=e=>m.value=e,rows:`6`,class:`w-full`,placeholder:S(s)(`instructionsPlaceholder`)},null,8,[`modelValue`,`placeholder`]),L(`small`,EC,g(S(s)(`instructionsHint`)),1)])]),_:1},8,[`visible`,`header`]),B(S(ne),{visible:!!h.value,header:S(s)(`dialogs.editBoard`),modal:!0,style:{width:`450px`},"onUpdate:visible":n[25]||=e=>{e||(h.value=null)}},{footer:O(()=>[B(S(p),{label:S(s)(`cancel`),text:``,onClick:n[24]||=e=>h.value=null},null,8,[`label`]),B(S(p),{label:S(s)(`save`),icon:`pi pi-check`,onClick:de},null,8,[`label`])]),default:O(()=>[h.value?(F(),x(a,{key:0},[L(`div`,DC,[L(`label`,OC,g(S(s)(`nameLabel`)),1),B(S(Le),{id:`kanlist-edit-name`,modelValue:h.value.name,"onUpdate:modelValue":n[20]||=e=>h.value.name=e,class:`w-full`,onKeyup:Fe(de,[`enter`])},null,8,[`modelValue`])]),L(`div`,kC,[L(`label`,AC,g(S(s)(`descriptionLabel`)),1),B(S(be),{id:`kanlist-edit-desc`,modelValue:h.value.description,"onUpdate:modelValue":n[21]||=e=>h.value.description=e,rows:`3`,class:`w-full`},null,8,[`modelValue`])]),e.projects?.length?(F(),x(`div`,jC,[L(`label`,MC,g(S(s)(`projects.label`)),1),B(S(He),{id:`kanlist-edit-projects`,modelValue:h.value.projectIds,"onUpdate:modelValue":n[22]||=e=>h.value.projectIds=e,options:e.projects,optionLabel:`name`,optionValue:`id`,display:`chip`,class:`w-full`,placeholder:S(s)(`projects.placeholder`)},null,8,[`modelValue`,`options`,`placeholder`]),L(`small`,NC,g(S(s)(`projects.hint`)),1)])):v(``,!0),L(`div`,PC,[L(`label`,FC,g(S(s)(`instructionsLabel`)),1),B(S(be),{id:`kanlist-edit-instructions`,modelValue:h.value.instructions,"onUpdate:modelValue":n[23]||=e=>h.value.instructions=e,rows:`8`,class:`w-full`,placeholder:S(s)(`instructionsPlaceholder`)},null,8,[`modelValue`,`placeholder`]),L(`small`,IC,g(S(s)(`instructionsHint`)),1)])],64)):v(``,!0)]),_:1},8,[`visible`,`header`]),B(S(ne),{visible:ye.value,"onUpdate:visible":n[27]||=e=>ye.value=e,header:S(s)(`boardTemplates.manage`),modal:!0,style:{width:`min(640px, 92vw)`}},{footer:O(()=>[B(S(p),{label:S(s)(`close`),text:``,onClick:n[26]||=e=>ye.value=!1},null,8,[`label`])]),default:O(()=>[L(`p`,LC,g(S(s)(`boardTemplates.intro`)),1),!e.boardTemplates||e.boardTemplates.length===0?(F(),x(`div`,RC,g(S(s)(`boardTemplates.empty`)),1)):(F(),x(`ul`,zC,[(F(!0),x(a,null,z(e.boardTemplates,t=>(F(),x(`li`,{key:t.id,class:`template-row`},[L(`span`,BC,[w(g(t.name)+` `,1),L(`small`,VC,g(t.columns.map(e=>e.title).join(` · `)||S(s)(`boardTemplates.noColumns`)),1)]),e.readOnly?v(``,!0):(F(),x(`span`,HC,[B(S(p),{icon:`pi pi-trash`,text:``,size:`small`,severity:`danger`,onClick:e=>Se(t)},null,8,[`onClick`])]))]))),128))]))]),_:1},8,[`visible`,`header`]),B(S(ne),{visible:fe.value,"onUpdate:visible":[n[32]||=e=>fe.value=e,n[33]||=e=>{e||(pe.value=null)}],header:S(s)(`templates.manage`),modal:!0,class:`template-dialog`,style:{width:`min(1100px, 92vw)`,height:`90vh`}},{footer:O(()=>[pe.value?(F(),x(a,{key:0},[B(S(p),{label:S(s)(`cancel`),text:``,onClick:n[30]||=e=>pe.value=null},null,8,[`label`]),B(S(p),{label:S(s)(`save`),icon:`pi pi-check`,disabled:!pe.value.name.trim(),onClick:_e},null,8,[`label`,`disabled`])],64)):(F(),x(a,{key:1},[e.readOnly?v(``,!0):(F(),_(S(p),{key:0,label:S(s)(`templates.new`),icon:`pi pi-plus`,onClick:me},null,8,[`label`])),B(S(p),{label:S(s)(`close`),text:``,onClick:n[31]||=e=>fe.value=!1},null,8,[`label`])],64))]),default:O(()=>[pe.value?(F(),x(a,{key:0},[L(`div`,UC,[L(`label`,WC,g(S(s)(`templates.nameLabel`)),1),B(S(Le),{id:`kanlist-tpl-name`,modelValue:pe.value.name,"onUpdate:modelValue":n[28]||=e=>pe.value.name=e,autofocus:``,class:`w-full`},null,8,[`modelValue`])]),L(`div`,GC,[L(`label`,KC,g(S(s)(`templates.contentLabel`)),1),B(S(ge),{id:`kanlist-tpl-content`,modelValue:pe.value.content,"onUpdate:modelValue":n[29]||=e=>pe.value.content=e,markdown:``,"min-height":`18rem`,"max-height":`60vh`,placeholder:S(s)(`templates.contentPlaceholder`)},null,8,[`modelValue`,`placeholder`]),L(`small`,qC,g(S(s)(`templates.contentHint`)),1)])],64)):(F(),x(a,{key:1},[L(`p`,JC,g(S(s)(`templates.intro`)),1),!e.templates||e.templates.length===0?(F(),x(`div`,YC,g(S(s)(`templates.empty`)),1)):(F(),x(`ul`,XC,[(F(!0),x(a,null,z(e.templates,t=>(F(),x(`li`,{key:t.id,class:`template-row`},[L(`span`,ZC,g(t.name),1),e.readOnly?v(``,!0):(F(),x(`span`,QC,[B(S(p),{icon:`pi pi-pencil`,text:``,size:`small`,onClick:e=>he(t)},null,8,[`onClick`]),B(S(p),{icon:`pi pi-trash`,text:``,size:`small`,severity:`danger`,onClick:e=>ve(t)},null,8,[`onClick`])]))]))),128))]))],64))]),_:1},8,[`visible`,`header`])]))}}),[[`__scopeId`,`data-v-ec49cf26`]]);export{kS as n,cu as r,$C as t};
|
|
2527
|
+
`)}_outerLabelGutter(e,t){let n=this.w,r=t.clusterLabels,i=r.external.connector||{},a=e.reduce((e,t)=>e+t,0),o=[];if(e.forEach((e,n)=>{e>0&&o.push(...this._outerLabelLines(n,e,a,t))}),!o.length)return 0;let s=ex(n,o,{fontSize:r.fontSize,fontFamily:r.fontFamily||n.config.chart.fontFamily}),c=i.gap==null?8:i.gap,l=i.length==null?22:i.length,u=s+c+l+8+Math.abs(parseFloat(r.external.offsetX)||0);return Math.min(u,n.layout.gridWidth*.25)}_drawOuterLabels(e,t,n,r,i,a){let o=this.w;if(!d_.isBrowser())return;let s=i.clusterLabels,c=s.external,l=c.connector||{},u=l.gap==null?8:l.gap,d=l.length==null?22:l.length,f=parseFloat(c.offsetX)||0,p=parseFloat(c.offsetY)||0,m=o.layout.gridWidth,h=o.layout.gridHeight,g=this._lastDotR,_=t.filter(e=>e.dots.length>0);if(!_.length)return;let v=0,y=0;if(_.length>1){let e=_.map(e=>e.cx),t=_.map(e=>e.cy);v=Math.max(...e)-Math.min(...e),y=Math.max(...t)-Math.min(...t)}let b=v>y,x=parseFloat(s.fontSize)||13,S=Math.round(x*1.35),C=[];if(_.slice().sort((e,t)=>e.cy-t.cy).forEach((e,t)=>{let a=this._outerLabelLines(e.i,n[e.i],r,i);if(!a.some(e=>e!==``))return;let o=b?e.cx>=m/2?`right`:`left`:t%2==0?`right`:`left`,s=o===`right`?1:-1,c=e.dots[0],l=-1/0;e.dots.forEach(t=>{let n=s*t.x-.75*Math.abs(t.y-e.cy);n>l&&(l=n,c=t)});let h={x:c.x+s*(c.r||g),y:c.y},_={x:h.x+s*u,y:h.y};C.push({i:e.i,lines:a,anchor:h,elbow:_,labelX:_.x+s*d+f,idealY:h.y+p,labelY:h.y+p,side:o})}),!C.length)return;let w=C.reduce((e,t)=>Math.max(e,t.lines.length),1)*S,T=w/2;[`left`,`right`].forEach(e=>{tx(C.filter(t=>t.side===e),w+2,h-T,T)});let E=new Z(o,this.ctx).group({class:`apexcharts-unit-outer-labels`});if(a){let e=Math.max(1,o.config.chart.animations.speed||800);E.node.classList.add(`apexcharts-unit-label-delay`),E.node.style.animationDelay=`${Math.min(e*.45,600)/1e3}s`}C.forEach(e=>{let t=o.globals.colors[e.i]||o.globals.colors[0]||`#008FFB`;E.add($b(o,{lines:e.lines,lineHeight:S,anchor:e.anchor,elbow:e.elbow,labelX:e.labelX,labelY:e.labelY,side:e.side,connector:{show:l.show!==!1,width:l.width==null?1.5:l.width,color:l.color||t},style:{fontSize:s.fontSize,fontFamily:s.fontFamily||o.config.chart.fontFamily,fontWeight:s.fontWeight},foreColor:s.color||o.config.chart.foreColor,groupClass:`apexcharts-unit-outer-label-group`,textClass:`apexcharts-unit-outer-label`,connectorClass:`apexcharts-unit-label-connector`}))}),e.add(E)}_drawClusterLabel(e,t,n,r,i,a){let o=this.w;if(!d_.isBrowser())return;let s=`http://www.w3.org/2000/svg`,c=o.seriesData.seriesNames[t.i]||`series-${t.i+1}`,l=r>0?n/r*100:0,u=i.clusterLabels,d=parseFloat(u.fontSize)||13,f;f=typeof u.formatter==`function`?u.formatter(c,{seriesIndex:t.i,value:n,percent:l,w:o}):`${c} (${l.toFixed(1)}%)`;let p=typeof f==`string`?f:String(f),m=Q.createElementNS(s,`text`);m.setAttribute(`class`,`apexcharts-unit-label`),m.setAttribute(`text-anchor`,`middle`),m.setAttribute(`font-size`,`${d}px`),m.setAttribute(`font-family`,u.fontFamily||o.config.chart.fontFamily||`inherit`),m.setAttribute(`font-weight`,String(u.fontWeight||600)),m.setAttribute(`fill`,u.color||a);let h=u.position===`bottom`,g=t.outerR+d*.6+3+(u.offsetY||0),_=p.length*d*.55;if(!h&&!t.flat&&u.curved!==!1&&_<=Math.PI*g*.95){let n=t.cy,r=`M ${t.cx-g} ${n} A ${g} ${g} 0 0 1 ${t.cx+g} ${n}`,i=`apexcharts-unit-label-${o.globals.chartID}-${t.i}`,a=Q.createElementNS(s,`path`);a.setAttribute(`id`,i),a.setAttribute(`d`,r),a.setAttribute(`fill`,`none`),a.setAttribute(`stroke`,`none`);let c=Q.createElementNS(s,`textPath`);c.setAttribute(`href`,`#${i}`),c.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,`#${i}`),c.setAttribute(`startOffset`,`50%`),c.textContent=p,m.appendChild(c),e.node.appendChild(a)}else{m.setAttribute(`x`,String(t.cx));let e=h?t.cy+t.outerR+d+6+(u.offsetY||0):t.cy-t.outerR-6-(u.offsetY||0);m.setAttribute(`y`,String(e)),m.textContent=p}e.node.appendChild(m)}},uS=Math.PI/180,dS=180/Math.PI,fS=`http://www.w3.org/2000/svg`,pS=`http://www.w3.org/1999/xhtml`,mS=(e,t,n)=>e+(t-e)*n,hS=class{constructor(e,t){this.ctx=t,this.w=e;let n=e.config;this.cfg=n.plotOptions.sunburst,this.strokeWidth=n.stroke.show?n.stroke.width:0,this.strokeColor=Array.isArray(n.stroke.colors)?n.stroke.colors[0]:n.stroke.colors||`#fff`,this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltipEl=null,this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(e){let t=this.w,n=new Z(this.w);this._graphics=n;let r=n.group({class:`apexcharts-sunburst`});if(t.globals.noData||!e||!e.length)return r;let i=t.layout.gridWidth,a=t.layout.gridHeight;if(this.centerX=i/2+(this.cfg.offsetX||0),this.centerY=a/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(i,a)/2.05-this.strokeWidth-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.maxRadius<5||(this._roots=this._buildHierarchy(),!this._roots.length))return r;this._roots.forEach(e=>this._fillValues(e)),this._validateStrict(),this._nodesAll=[];let o=t.globals.colors||[];this._roots.forEach((e,t)=>{this._colorPass(e,e.color||o[t%o.length]||`#008FFB`)}),this.total=this._roots.reduce((e,t)=>e+Math.max(0,t.value),0)||1,this._ringsG=n.group({class:`apexcharts-sunburst-rings`}),this._labelsG=n.group({class:`apexcharts-sunburst-labels`}),r.add(this._ringsG),r.add(this._labelsG),this._focus=null,this._relayout(this._focus);let s=t.config.chart.animations,c=`none`;return s.enabled&&(t.globals.dataChanged?s.dynamicAnimation.enabled&&(c=`update`):t.globals.resized||(c=`intro`)),this._applyLayout(c),this._renderBreadcrumb(),r}_buildHierarchy(){return kx(this.w)}_fillValues(e){jx(e)}_validateStrict(){if(this.cfg.partition!==`strict`)return;let e=!1,t=n=>{if(n.children&&n.children.length){let r=n.children.reduce((e,t)=>e+Math.max(0,t.value||0),0);!e&&n.value!=null&&Math.abs(r-n.value)>.5&&(console.warn(`ApexCharts sunburst: partition 'strict' but "${n.name}" (${n.value}) != sum of its children (${r}). Angles are normalized to fill the wedge.`),e=!0),n.children.forEach(t)}};this._roots.forEach(t)}_colorPass(e,t){e._color=e.color||t,this._nodesAll.push(e),e.children&&e.children.forEach(t=>this._colorPass(t,t.color||this._lighten(e._color,this.cfg.tint)))}_relayout(e){if(this._nodesAll.forEach(e=>{e._show=!1}),this._focusMaxDepth=0,e)this._placeVis(e,0,this.startAngle,this.endAngle,e._parent);else{let e=this._roots.reduce((e,t)=>e+Math.max(0,t.value),0)||1,t=this.startAngle;this._roots.forEach(n=>{let r=(this.endAngle-this.startAngle)*Math.max(0,n.value)/e;this._placeVis(n,0,t,t+r,null),t+=r})}let t=this._parseSize(this.cfg.innerSize,this.maxRadius),n=this._focusMaxDepth+1,r=(this.maxRadius-t)/n,i=n>1?1:0;this._innerR=e=>t+e*r+(e>0?i/2:0),this._outerR=e=>t+(e+1)*r-i/2,this._nodesAll.forEach(e=>{e._show&&(e._iR=this._innerR(e._vDepth),e._oR=e._leaf&&this.cfg.leaf===`extend`&&e._vDepth<this._focusMaxDepth?this.maxRadius:this._outerR(e._vDepth))})}_placeVis(e,t,n,r,i){if(e._show=!0,e._vDepth=t,e._a0=n,e._a1=r,e._parent=i,e._leaf=!(e.children&&e.children.length),t>this._focusMaxDepth&&(this._focusMaxDepth=t),!e._leaf){let i=e.children.reduce((e,t)=>e+Math.max(0,t.value),0)||1,a=n;e.children.forEach(o=>{let s=(r-n)*Math.max(0,o.value)/i;this._placeVis(o,t+1,a,a+s,e),a+=s})}}_applyLayout(e){let t=this.w.config.chart.animations,n=t.enabled?e===`none`?0:e===`update`?t.dynamicAnimation.speed||350:t.speed||500:0,r=++this._zoomGen,i=this.ctx?.morphTypeChange,a=!!i&&typeof i.isActive==`function`&&i.isActive()&&typeof i.getInitialPathAt==`function`,o=a?i.getSpeed():0;this._morphLeafIndex=0;let s=e===`update`?this.ctx._sunburstPrevGeoms:null;this._nodesAll.forEach(t=>{if(t._show){let i={a0:t._a0,a1:t._a1,iR:t._iR,oR:t._oR};t._el||=this._createArcEl(t);let c=a?this._morphSourceFor(t):null;if(c&&o>0)this._morphArcFrom(t,c,i,o,r);else if((e===`intro`||a)&&n>0)this._sweepArc(t,i,a?o:n,r);else{let e,a=!1;if(t._cur)e=t._cur;else if(s&&s.get(t._key))e=s.get(t._key);else{let t=(i.a0+i.a1)/2;e={a0:t,a1:t,iR:i.iR,oR:i.iR},a=!0}this._animateArc(t,e,i,n,!1,a,r)}}else if(t._el&&t._cur){let e=(t._cur.a0+t._cur.a1)/2,i={a0:e,a1:e,iR:t._cur.iR,oR:t._cur.iR};this._animateArc(t,t._cur,i,n,!0,!1,r)}});let c=new Map;this._nodesAll.forEach(e=>{e._show&&c.set(e._key,{a0:e._a0,a1:e._a1,iR:e._iR,oR:e._oR})}),this.ctx._sunburstPrevGeoms=c,this._renderLabels(n)}_morphSourceFor(e){let t=this.ctx,n=t&&t.morphTypeChange;return n?typeof n.hasKeyedMarks==`function`&&n.hasKeyedMarks()&&typeof n.getInitialPathForKey==`function`?n.getInitialPathForKey(Mx(e._key)):e.children&&e.children.length?null:n.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(e,t,n,r,i){let a=e._el,o=this._arcPath(n.iR,n.oR,n.a0,n.a1,this.cfg.borderRadius);a.node.style.display=``,a.attr({d:t,opacity:1}),e._cur=n,this._zoomGen===i&&new Bh(this.w,this.ctx).morphSVG(a,0,null,e._color,t,o,r,0)}_sweepArc(e,t,n,r){let i=e._el,a=this.cfg.borderRadius,o=this.startAngle,s=this.endAngle;i.node.style.display=``,i.attr({d:``,opacity:1}),i.animate(n).during(n=>{if(this._zoomGen!==r)return;let c=o+(s-o)*n;if(c<=t.a0+.01){i.attr({d:``});return}let l=Math.min(t.a1,c);i.attr({d:this._arcPath(t.iR,t.oR,t.a0,l,a)}),e._cur={a0:t.a0,a1:l,iR:t.iR,oR:t.oR}}).after(()=>{this._zoomGen===r&&(e._cur=t)})}_createArcEl(e){let t=this._graphics.drawPath({d:``,fill:e._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,fillOpacity:1,classes:`apexcharts-sunburst-arc`}),n=t.node;return n.setAttribute(`data:name`,e.name),n.setAttribute(`data:value`,String(e.value)),n.setAttribute(`data:key`,Mx(e._key)),n.setAttribute(`data:leaf`,String(!(e.children&&e.children.length))),this._attachTooltip(n,e),d_.isBrowser()&&(n.addEventListener(`click`,()=>this._zoomTo(e)),n.style.cursor=`pointer`),this._ringsG.add(t),t}_animateArc(e,t,n,r,i,a,o){let s=e._el,c=this.cfg.borderRadius;if(s.attr({fill:e._color}),r===0){s.attr({d:this._arcPath(n.iR,n.oR,n.a0,n.a1,c),opacity:i?0:1}),s.node.style.display=i?`none`:``,e._cur=i?null:n;return}s.node.style.display=``;let l=i?Number(s.attr(`opacity`))||1:a?0:1,u=i?0:1;s.attr({opacity:l}),s.animate(r).during(r=>{if(this._zoomGen!==o)return;let i=mS(t.a0,n.a0,r),a=mS(t.a1,n.a1,r),d=mS(t.iR,n.iR,r),f=mS(t.oR,n.oR,r);s.attr({d:this._arcPath(d,f,i,a,c),opacity:mS(l,u,r)}),e._cur={a0:i,a1:a,iR:d,oR:f}}).after(()=>{this._zoomGen===o&&(i?(s.node.style.display=`none`,e._cur=null):e._cur=n)})}_renderLabels(e){let t=this._labelsG;for(;t.node.firstChild;)t.node.removeChild(t.node.firstChild);this.cfg.dataLabels.show&&(this._nodesAll.forEach(e=>{e._show&&(e._a1-e._a0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(e))}),e>0?(t.attr({opacity:0}),t.animate(250,e).attr({opacity:1})):t.attr({opacity:1}))}_renderCurvedLabel(e){if(!d_.isBrowser())return;let t=this.cfg.dataLabels.style,n=this.w,r=(e._iR+e._oR)/2,i=(e._a0+e._a1)/2,a=i>90&&i<270,o=Math.min(r>0?4/r*dS:0,(e._a1-e._a0)/2),s=a?e._a1-o:e._a0+o,c=a?e._a0+o:e._a1-o,l=this._ptAt(r,s),u=this._ptAt(r,c),d=Math.abs(c-s)>180?1:0,f=a?0:1,p=`apx-sb-lbl-${n.globals.cuid}-${this._lblSeq++}`,m=Q.createElementNS(fS,`path`);m.setAttribute(`id`,p),m.setAttribute(`d`,`M ${l.x} ${l.y} A ${r} ${r} 0 ${d} ${f} ${u.x} ${u.y}`),m.setAttribute(`fill`,`none`),m.setAttribute(`stroke`,`none`);let h=t.colors,g=(Array.isArray(h)?h[0]:h)||`#fff`,_=Q.createElementNS(fS,`text`);_.setAttribute(`font-size`,t.fontSize||`12px`),t.fontFamily&&_.setAttribute(`font-family`,t.fontFamily),_.setAttribute(`font-weight`,String(t.fontWeight||400)),_.setAttribute(`fill`,g),_.setAttribute(`dominant-baseline`,`central`),_.style.pointerEvents=`none`;let v=Q.createElementNS(fS,`textPath`);v.setAttribute(`href`,`#`+p),v.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,`#`+p),v.setAttribute(`startOffset`,`50%`),v.setAttribute(`text-anchor`,`middle`),v.textContent=this._truncate(e.name,r,e._a1-e._a0,t.fontSize),_.appendChild(v),this._labelsG.node.appendChild(m),this._labelsG.node.appendChild(_)}_truncate(e,t,n,r){let i=t*n*uS-8,a=(parseFloat(r)||12)*.58,o=Math.floor(i/a);return o>=e.length?e:o<=1?``:e.slice(0,Math.max(1,o-1))+`…`}_zoomTo(e){if(this.cfg.zoomOnClick===!1)return;let t=e===this._focus?e._parent||null:e;t!==this._focus&&(this._focus=t&&!(t.children&&t.children.length)?t._parent||null:t,this._relayout(this._focus),this._applyLayout(`zoom`),this._renderBreadcrumb())}_focusChain(){let e=[],t=this._focus;for(;t;)e.unshift(t),t=t._parent;return e}_renderBreadcrumb(){if(!d_.isBrowser())return;let e=this.w.dom.elWrap;if(!e)return;let t=e.querySelector(`.apexcharts-breadcrumb`);if(t&&t.parentNode&&t.parentNode.removeChild(t),!this._focus)return;let n=Q.createElementNS(pS,`nav`);n.setAttribute(`class`,`apexcharts-breadcrumb`),n.setAttribute(`aria-label`,`Sunburst breadcrumb`),n.style.position=`absolute`,n.style.top=`0px`,n.style.left=`0px`;let r=[{name:`All`,node:null}].concat(this._focusChain().map(e=>({name:e.name,node:e})));r.forEach((e,t)=>{if(t>0){let e=Q.createElementNS(pS,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.textContent=` / `,n.appendChild(e)}if(t===r.length-1){let t=Q.createElementNS(pS,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),t.textContent=e.name,n.appendChild(t)}else{let r=Q.createElementNS(pS,`button`);if(r.setAttribute(`type`,`button`),r.setAttribute(`class`,`apexcharts-breadcrumb-item`),t===0){let e=Q.createElementNS(pS,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),e.textContent=`←`,r.appendChild(e)}let i=Q.createElementNS(pS,`span`);i.setAttribute(`class`,`apexcharts-breadcrumb-label`),i.textContent=e.name,r.appendChild(i),r.addEventListener(`click`,()=>{this._focus=e.node,this._relayout(this._focus),this._applyLayout(`zoom`),this._renderBreadcrumb()}),n.appendChild(r)}}),e.appendChild(n),this._avoidChromeOverlap(n)}_avoidChromeOverlap(e){wv(this.w,e)}_ptAt(e,t){return{x:this.centerX+e*Math.cos((t-90)*uS),y:this.centerY+e*Math.sin((t-90)*uS)}}_arcPath(e,t,n,r,i){if(t<=e+.01)return``;let a=r-n,o=this.cfg.spacing;if(o>0&&a>0&&t>0){let e=o/t*dS,i=Math.min(e/2,Math.max(0,a/2-.25));n+=i,r-=i,a=r-n}if(a<=0)return``;let s=a*uS,c=this.centerX,l=this.centerY,u=i;return u=Math.min(u,s*e/2,s*t/2,(t-e)/2),u>.5?sx({cx:c,cy:l,rIn:e,rOut:t,a0:n,a1:r,r:u,spanDeg:a}):lx({cx:c,cy:l,rIn:e,rOut:t,a0:n,a1:r,spanDeg:a})}_tip(){return this._tooltipEl||=this.w.dom.baseEl.querySelector(`.apexcharts-tooltip`),this._tooltipEl}_attachTooltip(e,t){!this.w.config.tooltip.enabled||!d_.isBrowser()||(e.addEventListener(`mouseenter`,e=>this._showTooltip(e,t)),e.addEventListener(`mousemove`,e=>this._positionTooltip(e)),e.addEventListener(`mouseleave`,()=>this._hideTooltip()))}_showTooltip(e,t){let n=this._tip();if(!n)return;let r=this.w,i=(t.value/this.total*100).toFixed(1),a=t._parent?t._parent.value:this.total,o=a>0?(t.value/a*100).toFixed(1):i;n.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${r.config.tooltip.fillSeriesColor?`background-color:${t._color};`:``}"><span class="apexcharts-tooltip-marker" style="background-color:${t._color}"></span><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${t.name}: </span><span class="apexcharts-tooltip-text-y-value">${t.value} (${o}% of parent, ${i}% of total)</span></div></div></div>`,n.classList.add(`apexcharts-active`),n.style.opacity=`1`,this._positionTooltip(e)}_positionTooltip(e){let t=this._tip();if(!t)return;let n=this.w.dom.elWrap.getBoundingClientRect(),r=t.offsetWidth,i=t.offsetHeight,a=e.clientX-n.left+12;a+r>n.width&&(a=e.clientX-n.left-r-12),a=Math.max(0,Math.min(a,n.width-r));let o=e.clientY-n.top+12;o+i>n.height&&(o=e.clientY-n.top-i-12),o=Math.max(0,Math.min(o,n.height-i)),t.style.left=a+`px`,t.style.top=o+`px`}_hideTooltip(){let e=this._tip();e&&(e.classList.remove(`apexcharts-active`),e.style.opacity=`0`)}_parseSize(e,t){if(typeof e==`number`)return e;let n=String(e).trim();if(n.endsWith(`%`))return parseFloat(n)/100*t;let r=parseFloat(n);return isNaN(r)?.15*t:r}_lighten(e,t){if(typeof e!=`string`||e[0]!==`#`)return e;let n=e.slice(1);if(n.length===3&&(n=n.split(``).map(e=>e+e).join(``)),n.length!==6)return e;let r=parseInt(n,16);if(isNaN(r))return e;let i=r>>16&255,a=r>>8&255,o=r&255;return i=Math.round(i+(255-i)*t),a=Math.round(a+(255-a)*t),o=Math.round(o+(255-o)*t),`#`+((1<<24)+(i<<16)+(a<<8)+o).toString(16).slice(1)}};kh.use({line:Qb,area:Qb,scatter:Qb,bubble:Qb,rangeArea:Qb,bar:Eb,column:Eb,barStacked:Db,rangeBar:gx,candlestick:Fb,boxPlot:Fb,violin:Vb,pie:fx,donut:fx,polarArea:fx,radialBar:hx,radar:mx,heatmap:qb,treemap:Ix,unit:lS,sunburst:hS}),Object.defineProperty(kh,`__internals`,{value:g_,enumerable:!1,writable:!1,configurable:!1});const gS=[`day`,`week`,`month`,`year`];var _S={day:30,week:12,month:12,year:5};function vS(e,t){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate());return e===`week`&&n.setDate(n.getDate()-(n.getDay()+6)%7),e===`month`&&n.setDate(1),e===`year`&&n.setMonth(0,1),n}function yS(e,t,n){let r=new Date(t);return e===`day`?r.setDate(r.getDate()+n):e===`week`?r.setDate(r.getDate()+7*n):e===`month`?r.setMonth(r.getMonth()+n):r.setFullYear(r.getFullYear()+n),r}function bS(e,t=new Date){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()+1);return{from:yS(e,vS(e,t),1-_S[e]),to:n}}function xS(e,t,n,r,i){let a=[];for(let r=vS(e,t);r<n;r=yS(e,r,1))a.push({start:r,entries:0,exits:0});let o=(e,t)=>{let n=new Date(e).getTime(),r=0,i=a.length-1;for(;r<i;){let e=r+i+1>>1;a[e].start.getTime()<=n?r=e:i=e-1}a[r]&&a[r].start.getTime()<=n&&(a[r][t]+=1)};for(let e of r)o(e,`entries`);for(let e of i)o(e,`exits`);return a}var SS={class:`flow-filters`},CS={class:`flow-hint`},wS={class:`flow-totals`},TS={class:`flow-totals__in`},ES={class:`flow-totals__out`},DS=[`aria-label`],OS={key:0,class:`flow-error`},kS=s(T({__name:`KanbanFlowDialog`,props:{board:{},load:{type:Function},t:{type:Function}},emits:[`close`],setup(e,{emit:t}){let n=e,o=t,s=n.t,c=m(`day`),l=m(null),d=m([]),f=m(!1),p=m(!1),h=m(null),g=null,_=0,v=r(()=>gS.map(e=>({value:e,label:s(`flow.granularity.${e}`)})));function b(){let{from:e,to:t}=bS(c.value);l.value=[e,new Date(t.getFullYear(),t.getMonth(),t.getDate()-1)]}let S=r(()=>{let[e,t]=l.value??[];return!e||!t?null:{from:e,to:new Date(t.getFullYear(),t.getMonth(),t.getDate()+1)}}),C=r(()=>d.value.reduce((e,t)=>({entries:e.entries+t.entries,exits:e.exits+t.exits}),{entries:0,exits:0}));async function w(){let e=n.board,t=S.value;if(!e||!t)return;let r=++_;f.value=!0,p.value=!1;let i=await n.load(e.id,t.from,t.to);r===_&&(f.value=!1,i?d.value=xS(c.value,t.from,t.to,i.entries,i.exits):(p.value=!0,d.value=[]),await ee(),j())}function T(){return typeof document<`u`&&document.documentElement.lang||void 0}function E(e){let t=T();switch(c.value){case`day`:case`week`:return e.toLocaleDateString(t,{day:`numeric`,month:`short`});case`month`:return e.toLocaleDateString(t,{month:`short`,year:`2-digit`});default:return String(e.getFullYear())}}function D(e){let t=T();return c.value===`week`?s(`flow.weekOf`,{date:e.toLocaleDateString(t,{day:`numeric`,month:`long`})}):c.value===`month`?e.toLocaleDateString(t,{month:`long`,year:`numeric`}):c.value===`day`?e.toLocaleDateString(t,{weekday:`short`,day:`numeric`,month:`long`,year:`numeric`}):String(e.getFullYear())}function O(e,t){return typeof document>`u`?t:getComputedStyle(document.documentElement).getPropertyValue(e).trim()||t}function j(){if(!h.value)return;let e={chart:{type:`line`,height:320,toolbar:{show:!1},zoom:{enabled:!1},animations:{enabled:!1},fontFamily:`inherit`,foreColor:O(`--p-text-muted-color`,`#64748b`)},series:[{name:s(`flow.entries`),data:d.value.map(e=>e.entries)},{name:s(`flow.exits`),data:d.value.map(e=>e.exits)}],colors:[O(`--p-primary-color`,`#6366f1`),O(`--p-green-500`,`#22c55e`)],stroke:{curve:`smooth`,width:2},markers:{size:d.value.length>60?0:3},xaxis:{categories:d.value.map(e=>E(e.start)),labels:{rotate:-45,hideOverlappingLabels:!0,trim:!1}},yaxis:{min:0,forceNiceScale:!0,labels:{formatter:e=>String(Math.round(e))}},grid:{borderColor:O(`--p-content-border-color`,`#e2e8f0`)},legend:{position:`top`,horizontalAlign:`left`},tooltip:{shared:!0,intersect:!1,theme:`dark`,x:{formatter:(e,t)=>{let n=d.value[t?.dataPointIndex??-1];return n?D(n.start):``}}},noData:{text:s(`flow.empty`)}};g?g.updateOptions(e,!0,!1):(g=new kh(h.value,e),g.render())}function te(){g?.destroy(),g=null}return ye(c,()=>b()),ye(S,()=>void w()),ye(()=>n.board?.id,e=>{te(),d.value=[],e&&(c.value=`day`,b())},{immediate:!0}),Ee(te),(t,n)=>(I(),A(u(y),{visible:!!e.board,header:e.board?u(s)(`flow.title`,{name:e.board.name}):``,modal:!0,"dismissable-mask":``,style:{width:`760px`,maxWidth:`calc(100vw - 2rem)`},"onUpdate:visible":n[2]||=e=>{e||o(`close`)},onShow:j,onAfterHide:te},{default:L(()=>[R(`div`,SS,[x(u(Be),{modelValue:c.value,"onUpdate:modelValue":n[0]||=e=>c.value=e,options:v.value,"option-label":`label`,"option-value":`value`,"allow-empty":!1,"aria-label":u(s)(`flow.granularityLabel`)},null,8,[`modelValue`,`options`,`aria-label`]),x(u(Ft),{modelValue:l.value,"onUpdate:modelValue":n[1]||=e=>l.value=e,"selection-mode":`range`,"manual-input":!1,"date-format":`dd/mm/yy`,"show-icon":``,"icon-display":`input`,"max-date":new Date,"aria-label":u(s)(`flow.periodLabel`),class:`flow-filters__period`},null,8,[`modelValue`,`max-date`,`aria-label`])]),R(`p`,CS,k(u(s)(`flow.hint`)),1),R(`div`,wS,[R(`span`,TS,[n[3]||=R(`i`,{class:`pi pi-arrow-down-left`,"aria-hidden":`true`},null,-1),P(k(u(s)(`flow.totalEntries`,{count:C.value.entries})),1)]),R(`span`,ES,[n[4]||=R(`i`,{class:`pi pi-check-circle`,"aria-hidden":`true`},null,-1),P(k(u(s)(`flow.totalExits`,{count:C.value.exits})),1)]),f.value?(I(),i(`i`,{key:0,class:`pi pi-spin pi-spinner`,"aria-label":u(s)(`flow.loading`)},null,8,DS)):a(``,!0)]),p.value?(I(),i(`p`,OS,k(u(s)(`flow.error`)),1)):a(``,!0),R(`div`,{ref_key:`chartEl`,ref:h,class:`flow-chart`},null,512)]),_:1},8,[`visible`,`header`]))}}),[[`__scopeId`,`data-v-7d979f2c`]]),AS={class:`board-tile__head`},jS={class:`board-tile__heading`},MS=[`title`],NS={class:`board-tile__stats`},PS={class:`board-tile__cards`},FS=[`title`],IS={class:`board-tile__week-in`},LS={class:`board-tile__week-out`},RS={class:`board-tile__week-label`},zS={key:0,class:`board-tile__desc`},BS={key:1,class:`board-tile__projects`},VS=[`aria-label`],HS=[`title`],US={key:3,class:`board-tile__foot`},WS={key:0,class:`board-tile__people`},GS=[`title`],KS=[`src`,`onError`],qS=[`title`],JS=[`datetime`,`title`],YS=s(T({__name:`KanbanListTile`,props:{board:{},projectNames:{},cardsLabel:{},menuLabel:{},avatarUrl:{type:[Function,null]},t:{type:Function}},emits:[`open`,`menu`],setup(e,{emit:t}){let n=e,o=t,s=r(()=>[...n.board.name.trim()][0]?.toLocaleUpperCase()??`#`);function c(e){let t=e.trim().split(/\s+/).filter(Boolean);return((t[0]?.[0]??``)+(t.length>1?t[t.length-1][0]:``)).toLocaleUpperCase()||`?`}let l=r(()=>{let e=n.board.columnStats??[];if(!e.reduce((e,t)=>e+t.cardCount,0))return[];let t=Math.max(1,e.length-1);return e.map((e,n)=>({...e,strength:Math.round(25+75*n/t)})).filter(e=>e.cardCount>0)}),d=r(()=>n.t(`activity.distribution`,{detail:(n.board.columnStats??[]).map(e=>`${e.title} ${e.cardCount}`).join(`, `)})),f=r(()=>{let e=n.board.lastActivityAt;if(!e)return null;let t=typeof document<`u`&&document.documentElement.lang||void 0,r=_i(e,t);return r?{label:r,title:new Date(e).toLocaleString(t)}:null}),p=r(()=>{let e=n.board.week;if(!e)return null;let t=e.finalized??e.archived;return e.created||t?{created:e.created,finalized:t,reopened:e.reopened??0}:null}),m=w(new Set),h=r(()=>n.board.assignees??[]),g=r(()=>Math.max(0,(n.board.assigneeCount??h.value.length)-h.value.length));return(t,n)=>(I(),i(`article`,{class:O([`board-tile`,{"board-tile--archived":e.board.archived}]),tabindex:`0`,onClick:n[2]||=e=>o(`open`),onKeydown:n[3]||=oe(je(e=>o(`open`),[`self`]),[`enter`])},[R(`div`,AS,[R(`span`,{class:`board-tile__mark`,style:Ne(u(rn)(e.board.id)),"aria-hidden":`true`},k(s.value),5),R(`div`,jS,[R(`h3`,{class:`board-tile__name`,title:e.board.name},k(e.board.name),9,MS),R(`span`,NS,[R(`span`,PS,[n[4]||=R(`i`,{class:`pi pi-clone`,"aria-hidden":`true`},null,-1),P(k(e.cardsLabel),1)]),p.value?(I(),i(`span`,{key:0,class:`board-tile__week`,title:e.t(`activity.weekTitle`,{created:p.value.created,finalized:p.value.finalized})+(p.value.reopened?` ${e.t(`activity.weekReopened`,{count:p.value.reopened})}`:``)},[R(`span`,IS,[n[5]||=R(`i`,{class:`pi pi-arrow-down-left`,"aria-hidden":`true`},null,-1),P(k(p.value.created),1)]),R(`span`,LS,[n[6]||=R(`i`,{class:`pi pi-check-circle`,"aria-hidden":`true`},null,-1),P(k(p.value.finalized),1)]),R(`span`,RS,k(e.t(`activity.weekShort`)),1)],8,FS)):a(``,!0)])]),e.menuLabel?(I(),A(u(B),{key:0,icon:`pi pi-ellipsis-v`,text:``,rounded:``,severity:`secondary`,size:`small`,class:`board-tile__menu`,title:e.menuLabel,"aria-label":e.menuLabel,"aria-haspopup":`true`,onClick:n[0]||=je(e=>o(`menu`,e),[`stop`]),onKeydown:n[1]||=oe(je(()=>{},[`stop`]),[`enter`])},null,8,[`title`,`aria-label`])):a(``,!0)]),e.board.description?(I(),i(`p`,zS,k(e.board.description),1)):a(``,!0),e.projectNames.length?(I(),i(`span`,BS,[(I(!0),i(N,null,F(e.projectNames,e=>(I(),i(`span`,{key:e,class:`board-tile__project`},[n[7]||=R(`i`,{class:`pi pi-box`,"aria-hidden":`true`},null,-1),P(k(e),1)]))),128))])):a(``,!0),l.value.length?(I(),i(`div`,{key:2,class:`board-tile__bar`,role:`img`,"aria-label":d.value},[(I(!0),i(N,null,F(l.value,e=>(I(),i(`span`,{key:e.id,class:O([`board-tile__segment`,{"board-tile__segment--done":e.done}]),style:Ne({flexGrow:e.cardCount,"--strength":`${e.strength}%`}),title:`${e.title} : ${e.cardCount}`},null,14,HS))),128))],8,VS)):a(``,!0),h.value.length||f.value?(I(),i(`div`,US,[h.value.length?(I(),i(`span`,WS,[(I(!0),i(N,null,F(h.value,t=>(I(),i(`span`,{key:t.id,class:`board-tile__person`,style:Ne(u(rn)(t.id)),title:t.name},[e.avatarUrl&&!m.has(t.id)?(I(),i(`img`,{key:0,src:e.avatarUrl(t.id),alt:``,onError:e=>m.add(t.id)},null,40,KS)):(I(),i(N,{key:1},[P(k(c(t.name)),1)],64))],12,GS))),128)),g.value?(I(),i(`span`,{key:0,class:`board-tile__person board-tile__person--more`,title:e.t(`activity.morePeople`,{count:g.value})},`+`+k(g.value),9,qS)):a(``,!0)])):a(``,!0),f.value?(I(),i(`time`,{key:1,class:`board-tile__when`,datetime:e.board.lastActivityAt??void 0,title:f.value.title},[n[8]||=R(`i`,{class:`pi pi-clock`,"aria-hidden":`true`},null,-1),P(k(f.value.label),1)],8,JS)):a(``,!0)])):a(``,!0)],34))}}),[[`__scopeId`,`data-v-ebb3cbec`]]);function XS(e){return`p:${e}`}function ZS(e,t){if(t===`all`)return!0;let n=e.projectIds??[];return t===`none`?n.length===0:n.includes(t.slice(2))}function QS(e,t){let n=[],r=[];for(let i of e){let e=i.projectIds??[];e.includes(t)?n.push(i):e.length===0&&r.push(i)}return{current:n,unassigned:r}}function $S(e,t){let n=t??[];return(e.projectIds??[]).map(e=>n.find(t=>t.id===e)?.name).filter(e=>!!e)}var eC={class:`kanban-list-page`},tC={key:0},nC={class:`page-header__right`},rC={class:`list-menu`},iC={class:`tabs-bar`},aC={key:0,class:`empty-state`},oC={key:0,class:`board-section__header`},sC={class:`board-section__count`},cC={class:`board-section__title`},lC={key:1,class:`section-empty`},uC={key:2,class:`board-grid`},dC={key:0,class:`empty-state`},fC={class:`board-grid`},pC={key:0,class:`list-menu`},mC={key:0,class:`dialog-field`},hC={for:`kanlist-new-template`},gC={key:0,class:`field-hint`},_C={class:`dialog-field`},vC={for:`kanlist-new-name`},yC={class:`dialog-field`},bC={for:`kanlist-new-desc`},xC={key:1,class:`dialog-field`},SC={for:`kanlist-new-projects`},CC={class:`field-hint`},wC={class:`dialog-field`},TC={for:`kanlist-new-instructions`},EC={class:`field-hint`},DC={class:`dialog-field`},OC={for:`kanlist-edit-name`},kC={class:`dialog-field`},AC={for:`kanlist-edit-desc`},jC={key:0,class:`dialog-field`},MC={for:`kanlist-edit-projects`},NC={class:`field-hint`},PC={class:`dialog-field`},FC={for:`kanlist-edit-instructions`},IC={class:`field-hint`},LC={class:`templates-intro`},RC={key:0,class:`empty-state`},zC={key:1,class:`template-list`},BC={class:`template-row__name`},VC={class:`hint`},HC={key:0,class:`template-row__actions`},UC={class:`dialog-field`},WC={for:`kanlist-tpl-name`},GC={class:`dialog-field`},KC={for:`kanlist-tpl-content`},qC={class:`hint`},JC={class:`templates-intro`},YC={key:0,class:`empty-state`},XC={key:1,class:`template-list`},ZC={class:`template-row__name`},QC={key:0,class:`template-row__actions`},$C=s(T({__name:`KanbanList`,props:{boards:{},readOnly:{type:Boolean,default:!1},boardsLimit:{default:null},templates:{default:null},boardTemplates:{default:null},projects:{default:null},currentProjectId:{default:null},loadFlow:{type:[Function,null],default:null},avatarUrl:{type:[Function,null],default:null},showTitle:{type:Boolean,default:!0},actionsTarget:{default:null},t:{}},emits:[`open`,`create`,`update`,`archive`,`delete`,`template-create`,`template-update`,`template-delete`,`board-template-delete`,`templates-needed`],setup(e,{emit:n}){let o=e,s=n,c=Se(),l=o.t;function d(e){s(`templates-needed`),e()}let f=m(!1),p=m(null),h=m(``),g=m(``),_=m(``),v=m(null),b=m(null),S=m(``),C=m(`all`),w=r(()=>[{value:`all`,label:l(`projects.filterAll`)},...(o.projects??[]).map(e=>({value:XS(e.id),label:e.name})),{value:`none`,label:l(`projects.filterNone`)}]);ye(w,e=>{e.some(e=>e.value===C.value)||(C.value=`all`)});function T(e){let t=(e.projectIds??[]).filter(e=>e!==o.currentProjectId);return $S({...e,projectIds:t},o.projects)}let E=m([]);function j(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase()}let ee=r(()=>{let e;if(o.currentProjectId){let{current:t,unassigned:n}=QS(o.boards,o.currentProjectId);e=[...t,...n]}else e=o.boards.filter(e=>ZS(e,C.value));let t=j(S.value.trim());return t?e.filter(e=>j(e.name).includes(t)||j(e.description??``).includes(t)):e}),te=r(()=>ee.value.filter(e=>!e.archived)),ne=r(()=>ee.value.filter(e=>e.archived)),M=r(()=>S.value.trim().length>0),ie=r(()=>{if(!o.currentProjectId)return[{key:`all`,title:null,boards:te.value}];let{current:e,unassigned:t}=QS(te.value,o.currentProjectId);return[{key:`current`,title:l(`projects.sectionCurrent`),boards:e},{key:`unassigned`,title:l(`projects.sectionUnassigned`),boards:t}].filter(e=>e.boards.length>0||e.key===`current`&&!M.value)}),ae=r(()=>te.value.length===0&&(M.value||!o.currentProjectId));function se(){let e=o.currentProjectId;e&&o.projects?.some(t=>t.id===e)&&(E.value=[e]),d(()=>f.value=!0)}let ce=r(()=>o.boardsLimit!==null&&o.boards.length>=o.boardsLimit),le=r(()=>!o.readOnly&&!ce.value);function ue(e){let t=(o.boardTemplates??[]).find(t=>t.id===e);t&&(h.value.trim()||(h.value=t.name),_.value=t.instructions)}let de=r(()=>(o.boardTemplates??[]).find(e=>e.id===b.value)??null);function fe(){!le.value||!h.value.trim()||(s(`create`,{name:h.value.trim(),description:g.value.trim(),instructions:_.value.trim(),...de.value?.columns.length?{columns:de.value.columns}:{},...de.value?.columnGroups?.length?{columnGroups:de.value.columnGroups}:{},...E.value.length?{projectIds:[...E.value]}:{}}),f.value=!1,h.value=``,g.value=``,_.value=``,b.value=null,E.value=[])}function pe(){if(!v.value)return;let{projectIds:e,...t}=v.value;s(`update`,o.projects?.length?{...t,projectIds:e}:t),v.value=null}let me=m(!1),ge=m(null);function _e(){ge.value={id:null,name:``,content:``}}function Ce(e){ge.value={id:e.id,name:e.name,content:e.content}}function we(){let e=ge.value;if(!e||!e.name.trim())return;let t={name:e.name.trim(),content:e.content};e.id?s(`template-update`,{id:e.id,...t}):s(`template-create`,t),ge.value=null}function Te(e){c.require({message:l(`templates.confirmDeleteMessage`,{name:e.name}),header:l(`templates.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>s(`template-delete`,e.id)})}let Ee=m(!1);function De(e){c.require({message:l(`boardTemplates.confirmDeleteMessage`,{name:e.name}),header:l(`boardTemplates.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>s(`board-template-delete`,e.id)})}let ke=m(null);function Ae(e){ke.value?.hide(),e()}let je=m(null),Me=m(null);function Ne(e,t){Me.value=e,je.value?.toggle(t)}function z(e){let t=Me.value;je.value?.hide(),t&&e(t)}function Fe(e){v.value={id:e.id,name:e.name,description:e.description,instructions:e.instructions??``,projectIds:[...e.projectIds??[]]}}function Ie(e,t){c.require({message:l(`dialogs.confirmDeleteMessage`,{name:t}),header:l(`dialogs.confirmDeleteHeader`),icon:`pi pi-trash`,acceptClass:`p-button-danger`,accept:()=>s(`delete`,e)})}return(n,r)=>(I(),i(`div`,eC,[R(`div`,{class:O([`page-header`,{"page-header--empty":!e.showTitle&&e.actionsTarget}])},[e.showTitle?(I(),i(`h1`,tC,k(u(l)(`title`)),1)):a(``,!0),(I(),A(Pe,{to:e.actionsTarget??`body`,disabled:!e.actionsTarget,defer:``},[R(`span`,nC,[e.projects?.length&&!e.currentProjectId?(I(),A(u(re),{key:0,modelValue:C.value,"onUpdate:modelValue":r[0]||=e=>C.value=e,options:w.value,optionLabel:`label`,optionValue:`value`,class:`project-filter`,"aria-label":u(l)(`projects.filterLabel`)},null,8,[`modelValue`,`options`,`aria-label`])):a(``,!0),x(u(t),null,{default:L(()=>[x(u(D),{class:`pi pi-search`}),x(u(be),{modelValue:S.value,"onUpdate:modelValue":r[1]||=e=>S.value=e,placeholder:u(l)(`searchPlaceholder`),class:`search-input`},null,8,[`modelValue`,`placeholder`])]),_:1}),e.readOnly?a(``,!0):(I(),A(u(B),{key:1,label:u(l)(`dialogs.newBoard`),icon:`pi pi-plus`,disabled:ce.value,onClick:r[2]||=e=>d(()=>f.value=!0)},null,8,[`label`,`disabled`])),e.templates||e.boardTemplates?(I(),i(N,{key:2},[x(u(B),{icon:`pi pi-ellipsis-v`,severity:`secondary`,outlined:``,title:u(l)(`menu`),"aria-label":u(l)(`menu`),onClick:r[3]||=e=>ke.value?.toggle(e)},null,8,[`title`,`aria-label`]),x(u(Oe),{ref_key:`listMenu`,ref:ke},{default:L(()=>[R(`div`,rC,[e.templates?(I(),i(`button`,{key:0,class:`list-menu__item`,onClick:r[4]||=e=>Ae(()=>d(()=>me.value=!0))},[r[34]||=R(`i`,{class:`pi pi-file-edit`},null,-1),R(`span`,null,k(u(l)(`templates.manage`)),1)])):a(``,!0),e.boardTemplates?(I(),i(`button`,{key:1,class:`list-menu__item`,onClick:r[5]||=e=>Ae(()=>Ee.value=!0)},[r[35]||=R(`i`,{class:`pi pi-bookmark`},null,-1),R(`span`,null,k(u(l)(`boardTemplates.manage`)),1)])):a(``,!0)])]),_:1},512)],64)):a(``,!0)])],8,[`to`,`disabled`]))],2),he(n.$slots,`banner`,{},void 0,!0),x(u(qe),{value:`active`},{default:L(()=>[R(`div`,iC,[x(u(He),null,{default:L(()=>[x(u(Ue),{value:`active`},{default:L(()=>[P(k(u(l)(`tabs.active`)),1)]),_:1}),x(u(Ue),{value:`archived`},{default:L(()=>[P(k(u(l)(`tabs.archived`,{count:ne.value.length})),1)]),_:1})]),_:1}),e.boardsLimit===null?a(``,!0):(I(),i(`span`,{key:0,class:O([`quota tabs-bar__quota`,{"quota--full":ce.value}])},k(u(l)(`quota`,{used:e.boards.length,limit:e.boardsLimit})),3))]),x(u(Ke),null,{default:L(()=>[x(u(We),{value:`active`},{default:L(()=>[ae.value?(I(),i(`div`,aC,k(M.value?u(l)(`noResults`,{query:S.value.trim()}):u(l)(`empty`)),1)):a(``,!0),(I(!0),i(N,null,F(ie.value,t=>(I(),i(`section`,{key:t.key,class:`board-section`},[t.title?(I(),i(`header`,oC,[R(`span`,sC,k(t.boards.length),1),R(`h2`,cC,k(t.title),1)])):a(``,!0),t.boards.length===0?(I(),i(`div`,lC,[R(`span`,null,k(u(l)(`projects.sectionCurrentEmpty`)),1),le.value?(I(),A(u(B),{key:0,label:u(l)(`dialogs.newBoard`),icon:`pi pi-plus`,size:`small`,outlined:``,onClick:se},null,8,[`label`])):a(``,!0)])):(I(),i(`div`,uC,[(I(!0),i(N,null,F(t.boards,t=>(I(),A(YS,{key:t.id,board:t,"project-names":T(t),"cards-label":u(l)(`cards`,{count:t.cardCount}),"menu-label":e.readOnly?null:u(l)(`boardMenu`),t:u(l),"avatar-url":e.avatarUrl,onOpen:e=>s(`open`,t.id),onMenu:e=>Ne(t,e)},null,8,[`board`,`project-names`,`cards-label`,`menu-label`,`t`,`avatar-url`,`onOpen`,`onMenu`]))),128))]))]))),128))]),_:1}),x(u(We),{value:`archived`},{default:L(()=>[ne.value.length===0?(I(),i(`div`,dC,k(M.value?u(l)(`noResults`,{query:S.value.trim()}):u(l)(`archivedEmpty`)),1)):a(``,!0),R(`div`,fC,[(I(!0),i(N,null,F(ne.value,t=>(I(),A(YS,{key:t.id,board:t,"project-names":T(t),"cards-label":u(l)(`cards`,{count:t.cardCount}),"menu-label":e.readOnly?null:u(l)(`boardMenu`),t:u(l),"avatar-url":e.avatarUrl,onOpen:e=>s(`open`,t.id),onMenu:e=>Ne(t,e)},null,8,[`board`,`project-names`,`cards-label`,`menu-label`,`t`,`avatar-url`,`onOpen`,`onMenu`]))),128))])]),_:1})]),_:1})]),_:1}),x(u(Oe),{ref_key:`boardMenu`,ref:je},{default:L(()=>[Me.value?(I(),i(`div`,pC,[e.loadFlow?(I(),i(`button`,{key:0,class:`list-menu__item`,onClick:r[6]||=e=>z(e=>p.value=e)},[r[36]||=R(`i`,{class:`pi pi-chart-line`},null,-1),R(`span`,null,k(u(l)(`flow.open`)),1)])):a(``,!0),Me.value.archived?(I(),i(`button`,{key:2,class:`list-menu__item`,onClick:r[9]||=e=>z(e=>s(`archive`,{id:e.id,archived:!1}))},[r[39]||=R(`i`,{class:`pi pi-replay`},null,-1),R(`span`,null,k(u(l)(`restore`)),1)])):(I(),i(N,{key:1},[R(`button`,{class:`list-menu__item`,onClick:r[7]||=e=>z(Fe)},[r[37]||=R(`i`,{class:`pi pi-pencil`},null,-1),R(`span`,null,k(u(l)(`edit`)),1)]),R(`button`,{class:`list-menu__item`,onClick:r[8]||=e=>z(e=>s(`archive`,{id:e.id,archived:!0}))},[r[38]||=R(`i`,{class:`pi pi-inbox`},null,-1),R(`span`,null,k(u(l)(`archive`)),1)])],64)),R(`button`,{class:`list-menu__item list-menu__item--danger`,onClick:r[10]||=e=>z(e=>Ie(e.id,e.name))},[r[40]||=R(`i`,{class:`pi pi-trash`},null,-1),R(`span`,null,k(u(l)(`delete`)),1)])])):a(``,!0)]),_:1},512),e.loadFlow?(I(),A(kS,{key:0,board:p.value,load:e.loadFlow,t:u(l),onClose:r[11]||=e=>p.value=null},null,8,[`board`,`load`,`t`])):a(``,!0),x(u(y),{visible:f.value,"onUpdate:visible":r[19]||=e=>f.value=e,header:u(l)(`dialogs.newBoard`),modal:!0,style:{width:`450px`}},{footer:L(()=>[x(u(B),{label:u(l)(`cancel`),text:``,onClick:r[18]||=e=>f.value=!1},null,8,[`label`]),x(u(B),{label:u(l)(`create`),icon:`pi pi-check`,disabled:!h.value.trim(),onClick:fe},null,8,[`label`,`disabled`])]),default:L(()=>[e.boardTemplates?.length?(I(),i(`div`,mC,[R(`label`,hC,k(u(l)(`boardTemplates.pickLabel`)),1),x(u(re),{id:`kanlist-new-template`,modelValue:b.value,"onUpdate:modelValue":r[12]||=e=>b.value=e,options:e.boardTemplates,optionLabel:`name`,optionValue:`id`,"show-clear":``,class:`w-full`,placeholder:u(l)(`boardTemplates.pickPlaceholder`),onChange:r[13]||=e=>ue(b.value)},null,8,[`modelValue`,`options`,`placeholder`]),de.value?(I(),i(`small`,gC,k(u(l)(`boardTemplates.pickHint`,{columns:de.value.columns.map(e=>e.title).join(`, `)||u(l)(`boardTemplates.noColumns`)})),1)):a(``,!0)])):a(``,!0),R(`div`,_C,[R(`label`,vC,k(u(l)(`nameLabel`)),1),x(u(be),{id:`kanlist-new-name`,modelValue:h.value,"onUpdate:modelValue":r[14]||=e=>h.value=e,autofocus:``,class:`w-full`,onKeyup:oe(fe,[`enter`])},null,8,[`modelValue`])]),R(`div`,yC,[R(`label`,bC,k(u(l)(`descriptionLabel`)),1),x(u(xe),{id:`kanlist-new-desc`,modelValue:g.value,"onUpdate:modelValue":r[15]||=e=>g.value=e,rows:`3`,class:`w-full`},null,8,[`modelValue`])]),e.projects?.length?(I(),i(`div`,xC,[R(`label`,SC,k(u(l)(`projects.label`)),1),x(u(Ve),{id:`kanlist-new-projects`,modelValue:E.value,"onUpdate:modelValue":r[16]||=e=>E.value=e,options:e.projects,optionLabel:`name`,optionValue:`id`,display:`chip`,class:`w-full`,placeholder:u(l)(`projects.placeholder`)},null,8,[`modelValue`,`options`,`placeholder`]),R(`small`,CC,k(u(l)(`projects.hint`)),1)])):a(``,!0),R(`div`,wC,[R(`label`,TC,k(u(l)(`instructionsLabel`)),1),x(u(xe),{id:`kanlist-new-instructions`,modelValue:_.value,"onUpdate:modelValue":r[17]||=e=>_.value=e,rows:`6`,class:`w-full`,placeholder:u(l)(`instructionsPlaceholder`)},null,8,[`modelValue`,`placeholder`]),R(`small`,EC,k(u(l)(`instructionsHint`)),1)])]),_:1},8,[`visible`,`header`]),x(u(y),{visible:!!v.value,header:u(l)(`dialogs.editBoard`),modal:!0,style:{width:`450px`},"onUpdate:visible":r[25]||=e=>{e||(v.value=null)}},{footer:L(()=>[x(u(B),{label:u(l)(`cancel`),text:``,onClick:r[24]||=e=>v.value=null},null,8,[`label`]),x(u(B),{label:u(l)(`save`),icon:`pi pi-check`,onClick:pe},null,8,[`label`])]),default:L(()=>[v.value?(I(),i(N,{key:0},[R(`div`,DC,[R(`label`,OC,k(u(l)(`nameLabel`)),1),x(u(be),{id:`kanlist-edit-name`,modelValue:v.value.name,"onUpdate:modelValue":r[20]||=e=>v.value.name=e,class:`w-full`,onKeyup:oe(pe,[`enter`])},null,8,[`modelValue`])]),R(`div`,kC,[R(`label`,AC,k(u(l)(`descriptionLabel`)),1),x(u(xe),{id:`kanlist-edit-desc`,modelValue:v.value.description,"onUpdate:modelValue":r[21]||=e=>v.value.description=e,rows:`3`,class:`w-full`},null,8,[`modelValue`])]),e.projects?.length?(I(),i(`div`,jC,[R(`label`,MC,k(u(l)(`projects.label`)),1),x(u(Ve),{id:`kanlist-edit-projects`,modelValue:v.value.projectIds,"onUpdate:modelValue":r[22]||=e=>v.value.projectIds=e,options:e.projects,optionLabel:`name`,optionValue:`id`,display:`chip`,class:`w-full`,placeholder:u(l)(`projects.placeholder`)},null,8,[`modelValue`,`options`,`placeholder`]),R(`small`,NC,k(u(l)(`projects.hint`)),1)])):a(``,!0),R(`div`,PC,[R(`label`,FC,k(u(l)(`instructionsLabel`)),1),x(u(xe),{id:`kanlist-edit-instructions`,modelValue:v.value.instructions,"onUpdate:modelValue":r[23]||=e=>v.value.instructions=e,rows:`8`,class:`w-full`,placeholder:u(l)(`instructionsPlaceholder`)},null,8,[`modelValue`,`placeholder`]),R(`small`,IC,k(u(l)(`instructionsHint`)),1)])],64)):a(``,!0)]),_:1},8,[`visible`,`header`]),x(u(y),{visible:Ee.value,"onUpdate:visible":r[27]||=e=>Ee.value=e,header:u(l)(`boardTemplates.manage`),modal:!0,style:{width:`min(640px, 92vw)`}},{footer:L(()=>[x(u(B),{label:u(l)(`close`),text:``,onClick:r[26]||=e=>Ee.value=!1},null,8,[`label`])]),default:L(()=>[R(`p`,LC,k(u(l)(`boardTemplates.intro`)),1),!e.boardTemplates||e.boardTemplates.length===0?(I(),i(`div`,RC,k(u(l)(`boardTemplates.empty`)),1)):(I(),i(`ul`,zC,[(I(!0),i(N,null,F(e.boardTemplates,t=>(I(),i(`li`,{key:t.id,class:`template-row`},[R(`span`,BC,[P(k(t.name)+` `,1),R(`small`,VC,k(t.columns.map(e=>e.title).join(` · `)||u(l)(`boardTemplates.noColumns`)),1)]),e.readOnly?a(``,!0):(I(),i(`span`,HC,[x(u(B),{icon:`pi pi-trash`,text:``,size:`small`,severity:`danger`,onClick:e=>De(t)},null,8,[`onClick`])]))]))),128))]))]),_:1},8,[`visible`,`header`]),x(u(y),{visible:me.value,"onUpdate:visible":[r[32]||=e=>me.value=e,r[33]||=e=>{e||(ge.value=null)}],header:u(l)(`templates.manage`),modal:!0,class:`template-dialog`,style:{width:`min(1100px, 92vw)`,height:`90vh`}},{footer:L(()=>[ge.value?(I(),i(N,{key:0},[x(u(B),{label:u(l)(`cancel`),text:``,onClick:r[30]||=e=>ge.value=null},null,8,[`label`]),x(u(B),{label:u(l)(`save`),icon:`pi pi-check`,disabled:!ge.value.name.trim(),onClick:we},null,8,[`label`,`disabled`])],64)):(I(),i(N,{key:1},[e.readOnly?a(``,!0):(I(),A(u(B),{key:0,label:u(l)(`templates.new`),icon:`pi pi-plus`,onClick:_e},null,8,[`label`])),x(u(B),{label:u(l)(`close`),text:``,onClick:r[31]||=e=>me.value=!1},null,8,[`label`])],64))]),default:L(()=>[ge.value?(I(),i(N,{key:0},[R(`div`,UC,[R(`label`,WC,k(u(l)(`templates.nameLabel`)),1),x(u(be),{id:`kanlist-tpl-name`,modelValue:ge.value.name,"onUpdate:modelValue":r[28]||=e=>ge.value.name=e,autofocus:``,class:`w-full`},null,8,[`modelValue`])]),R(`div`,GC,[R(`label`,KC,k(u(l)(`templates.contentLabel`)),1),x(u(ve),{id:`kanlist-tpl-content`,modelValue:ge.value.content,"onUpdate:modelValue":r[29]||=e=>ge.value.content=e,markdown:``,"min-height":`18rem`,"max-height":`60vh`,placeholder:u(l)(`templates.contentPlaceholder`)},null,8,[`modelValue`,`placeholder`]),R(`small`,qC,k(u(l)(`templates.contentHint`)),1)])],64)):(I(),i(N,{key:1},[R(`p`,JC,k(u(l)(`templates.intro`)),1),!e.templates||e.templates.length===0?(I(),i(`div`,YC,k(u(l)(`templates.empty`)),1)):(I(),i(`ul`,XC,[(I(!0),i(N,null,F(e.templates,t=>(I(),i(`li`,{key:t.id,class:`template-row`},[R(`span`,ZC,k(t.name),1),e.readOnly?a(``,!0):(I(),i(`span`,QC,[x(u(B),{icon:`pi pi-pencil`,text:``,size:`small`,onClick:e=>Ce(t)},null,8,[`onClick`]),x(u(B),{icon:`pi pi-trash`,text:``,size:`small`,severity:`danger`,onClick:e=>Te(t)},null,8,[`onClick`])]))]))),128))]))],64))]),_:1},8,[`visible`,`header`])]))}}),[[`__scopeId`,`data-v-ec49cf26`]]);export{kS as n,cu as r,$C as t};
|