@pubinfo/module-rbac 2.0.0-rc.2 → 2.0.0-rc.4
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/dist/{ComponentSelect-Dyqb3Uh3.js → ComponentSelect-B1ZyenXP.js} +897 -945
- package/dist/ComponentSelect-DlVJI5an.js +2 -0
- package/dist/DynamicRoutesForm-Cu3WhRpA.js +4 -0
- package/dist/{DynamicRoutesForm-D3nGj7oA.js → DynamicRoutesForm-qjbrykW4.js} +95 -95
- package/dist/HCheckList-Cze_TkQp.js +2 -0
- package/dist/HoverCard-B79q5sly.js +43 -0
- package/dist/HoverCard-U5WTpvFy.js +2 -0
- package/dist/{ImportExport-Yt6dABIv.js → ImportExport-Clbc8xaw.js} +65 -65
- package/dist/ImportExport-CtEZTU87.js +4 -0
- package/dist/MetaForm-BWy4Lpr8.js +5 -0
- package/dist/MetaForm-DpH9an5A.js +300 -0
- package/dist/MetaForm.css +1 -0
- package/dist/OrgAndPosition-3lCm4Fyb.js +2 -0
- package/dist/ResourceEdit-0_cYB0iu.js +338 -0
- package/dist/ResourceEdit-CYPzEbqn.js +10 -0
- package/dist/{ResourceRelation-BihfkBCe.js → ResourceRelation-CZ8hGgOm.js} +6 -6
- package/dist/ResourceRelation-DMWa09ae.js +3 -0
- package/dist/{ResourceRelation-CBPrqf2V.js → ResourceRelation-DkKdZ3TD.js} +2 -2
- package/dist/ResourceRelation.css +1 -1
- package/dist/ResourceRelation2.css +1 -1
- package/dist/{ResourceSelector-CxZ1ae30.js → ResourceSelector-ConJ30Jd.js} +48 -48
- package/dist/ResourceSelector.css +1 -1
- package/dist/{RoleRelation-BlWDNAM1.js → RoleRelation-B1D1NM_L.js} +1 -1
- package/dist/RoleRelation-DySyilcs.js +2 -0
- package/dist/RoleSelector-DOt30OLy.js +279 -0
- package/dist/TenantEdit-D8-Pt7sf.js +6 -0
- package/dist/{TenantEdit-Bt31IV9W.js → TenantEdit-DNJzo8SS.js} +19 -19
- package/dist/{UserAuthorization-Dhp0ZamX.js → UserAuthorization-DPHUk69M.js} +6 -6
- package/dist/UserAuthorization-DuioGghR.js +4 -0
- package/dist/UserAuthorization.css +1 -1
- package/dist/UserEdit-6HYbgtOh.js +4 -0
- package/dist/{UserEdit-CqH6hxTZ.js → UserEdit-C6eNXSCu.js} +24 -24
- package/dist/animation_item-C3pkH-cB.js +2 -0
- package/dist/api/modules/assist/gonggaofuwu.d.ts +6 -6
- package/dist/api/modules/assist/qunzujiekou.d.ts +6 -6
- package/dist/api/modules/assist/quyujiekou.d.ts +5 -5
- package/dist/api/modules/configData/heibaimingdanfuwu.d.ts +5 -5
- package/dist/api/modules/configData/xitongpeizhifuwu.d.ts +14 -14
- package/dist/api/modules/configData/zidifuwu.d.ts +10 -10
- package/dist/api/modules/log/caozuorizhifuwu.d.ts +2 -2
- package/dist/api/modules/log/denglurizhifuwu.d.ts +2 -2
- package/dist/api/modules/rbac/gangweijiekou.d.ts +6 -6
- package/dist/api/modules/rbac/jiaosejiekou.d.ts +7 -7
- package/dist/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +7 -7
- package/dist/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.d.ts +9 -9
- package/dist/api/modules/rbac/yonghujiekou.d.ts +15 -15
- package/dist/api/modules/rbac/yonghushoucangbiaojiekou.d.ts +5 -5
- package/dist/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.d.ts +4 -4
- package/dist/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.d.ts +6 -6
- package/dist/api/modules/rbac/ziyuanjiekou.d.ts +13 -13
- package/dist/api/modules/rbac/zuhuguanlijiekou.d.ts +5 -5
- package/dist/api/modules/rbac/zuzhijiaosebiaokongzhiqi.d.ts +4 -4
- package/dist/api/modules/rbac/zuzhijiekou.d.ts +9 -9
- package/dist/{blackWhiteList-B7tUj2Rx.js → blackWhiteList-DQALdBZf.js} +10 -10
- package/dist/blackWhiteList.css +1 -1
- package/dist/{breadcrumb_setting-CIm-6QHw.js → breadcrumb_setting-D3UjJYhA.js} +32 -32
- package/dist/breadcrumb_setting.css +1 -1
- package/dist/browserType-BGl2j5RW.js +2 -0
- package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +1 -1
- package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +1 -1
- package/dist/components/ResourceSelector/index.vue.d.ts +1 -1
- package/dist/composables/useWebSocketManager.d.ts +8 -0
- package/dist/createAndEditDataPermission-CAaxueTy.js +8 -0
- package/dist/{createAndEditDataPermission-Bd3tlIEE.js → createAndEditDataPermission-DnAcKvaE.js} +55 -55
- package/dist/createAndEditDataPermission.css +1 -1
- package/dist/{data-permission-Db1Lu9KO.js → data-permission-CLnnLoPt.js} +8 -8
- package/dist/data-permission.css +1 -1
- package/dist/{dictionary-XMJprxvM.js → dictionary-BFM0Mx0P.js} +3 -3
- package/dist/{drawerBlackWhiteList-D-Sq4mul.js → drawerBlackWhiteList-BYACpO3D.js} +9 -9
- package/dist/drawerBlackWhiteList-C3xS7Kxx.js +3 -0
- package/dist/{drawerDictionary-Bw3w5PTm.js → drawerDictionary-BUBLrbTi.js} +13 -13
- package/dist/drawerDictionary-Bk0BgL7i.js +4 -0
- package/dist/{drawerDictionaryItem-4WIgL3No.js → drawerDictionaryItem-CfOPleN6.js} +14 -14
- package/dist/drawerDictionaryItem-Dy2T56AH.js +4 -0
- package/dist/{drawerGroup-932n7Ywc.js → drawerGroup-Bly3CWfM.js} +10 -10
- package/dist/drawerGroup-ZyzAWXOl.js +3 -0
- package/dist/{drawerOrganization-IwZZkHWM.js → drawerOrganization-BhO5-PP5.js} +27 -27
- package/dist/drawerOrganization-HSVB8JzO.js +3 -0
- package/dist/{drawerPosition-BiO92_At.js → drawerPosition-CM0NBfoR.js} +15 -15
- package/dist/drawerPosition-vsuG4JYe.js +3 -0
- package/dist/drawerRegion-BXZ751ge.js +3 -0
- package/dist/{drawerRegion-CNOK55im.js → drawerRegion-CGySAL6D.js} +17 -17
- package/dist/{drawerRole-IIsKhycU.js → drawerRole-BE0utb7R.js} +9 -9
- package/dist/drawerRole-BVeaz3Yb.js +5 -0
- package/dist/drawerRole-BdoMYLYW.js +215 -0
- package/dist/drawerRole-BeUNs7cF.js +6 -0
- package/dist/drawerRole-DNsK5a6O.js +3 -0
- package/dist/{drawerRole-PnDochPg.js → drawerRole-DS7fbx1h.js} +10 -10
- package/dist/{group-BzuuCGyR.js → group-B1gGoTD5.js} +10 -10
- package/dist/group.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2065 -1875
- package/dist/{itemlist-KOYuEUk4.js → itemlist-uCHnA_We.js} +3 -3
- package/dist/{layout_setting-DQgWzV7M.js → layout_setting-DMvxwL31.js} +20 -20
- package/dist/layout_setting.css +1 -1
- package/dist/{loginHistoryDetail-DgHx6n66.js → loginHistoryDetail-BAYuSqvw.js} +2 -2
- package/dist/loginHistoryDetail-DiuNa6Sv.js +4 -0
- package/dist/{login_history-Co6JLGsd.js → login_history-BexfCN-1.js} +7 -7
- package/dist/login_history.css +1 -1
- package/dist/{menu_setting-B0QIQ1um.js → menu_setting-BXR3EAXD.js} +43 -43
- package/dist/menu_setting.css +1 -1
- package/dist/not-data-OpiacaSk.js +2 -0
- package/dist/{operateHistoryDetail-BrdNmYD0.js → operateHistoryDetail-DiuqMTkN.js} +2 -2
- package/dist/operateHistoryDetail-r30ZBNqw.js +4 -0
- package/dist/{operate_history-CVeIorOr.js → operate_history-hXxS3atI.js} +7 -7
- package/dist/operate_history.css +1 -1
- package/dist/{organization-CXMk4mRo.js → organization-cvYm9P9w.js} +2647 -2647
- package/dist/organization.css +1 -1
- package/dist/{other_setting-DK9MHysY.js → other_setting-DjVQevBW.js} +69 -69
- package/dist/other_setting.css +1 -1
- package/dist/{page_animation_setting-tSYfjx-m.js → page_animation_setting-DgHHmFEc.js} +52 -52
- package/dist/page_animation_setting.css +1 -1
- package/dist/{page_w_setting-BDI5KsA-.js → page_w_setting-B_im6vBo.js} +20 -20
- package/dist/page_w_setting.css +1 -1
- package/dist/{position-BjUZQQUz.js → position-BkpbHXYP.js} +2 -2
- package/dist/{region-BsX0gK_y.js → region-DVkbjI9t.js} +6 -6
- package/dist/{resource-DKhlH74I.js → resource-CrhX7VRK.js} +13 -11
- package/dist/{role-ffXddsAo.js → role-PjmrOdFd.js} +6 -6
- package/dist/{role_group-BBH28A40.js → role_group-Dlx-6BZF.js} +2 -2
- package/dist/routeSystem-Dg0b6mAl.js +2 -0
- package/dist/{safe_setting-Dis73Gsw.js → safe_setting-DpWUCv2p.js} +1 -1
- package/dist/setItem-9ZBl0BlF.js +5 -0
- package/dist/setItem-BenNySNl.js +77 -0
- package/dist/setItem.css +1 -1
- package/dist/stores/view.d.ts +56 -0
- package/dist/{tabbar_setting-DGwk_Oec.js → tabbar_setting-9UKDc1Ev.js} +38 -38
- package/dist/tabbar_setting.css +1 -1
- package/dist/{tenant-BhA6R8aJ.js → tenant-BGtOP_wo.js} +5 -5
- package/dist/{theme_setting-Ca1YGTdZ.js → theme_setting-BBLaZ4NS.js} +8 -8
- package/dist/theme_setting.css +1 -1
- package/dist/{toolbar_setting-Cmrpyxgs.js → toolbar_setting-OemNp6pO.js} +37 -37
- package/dist/toolbar_setting.css +1 -1
- package/dist/{useAppAndResource-BgnrL15l.js → useAppAndResource-CeMCjg2v.js} +1 -1
- package/dist/{user-Bnb1cvVD.js → user-JCiGXodF.js} +11 -11
- package/dist/user.css +1 -1
- package/dist/utils/routeSystem.d.ts +55 -0
- package/dist/views/blackWhiteList/index.vue.d.ts +2 -2
- package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +5 -5
- package/dist/views/data-permission/index.vue.d.ts +7 -7
- package/dist/views/dictionary/index.vue.d.ts +2 -2
- package/dist/views/dictionary/itemlist.vue.d.ts +2 -2
- package/dist/views/group/index.vue.d.ts +2 -2
- package/dist/views/log_center/login_history.vue.d.ts +2 -2
- package/dist/views/log_center/operate_history.vue.d.ts +2 -2
- package/dist/views/position/index.vue.d.ts +2 -2
- package/dist/views/region/index.vue.d.ts +2 -2
- package/dist/views/resource/components/HoverCard.vue.d.ts +21 -0
- package/dist/views/resource/index.vue.d.ts +2 -2
- package/dist/views/resource/model.d.ts +3 -1
- package/dist/views/role/components/ResourceRelation.vue.d.ts +2 -2
- package/dist/views/role/components/drawerRole.vue.d.ts +2 -2
- package/dist/views/role/index.vue.d.ts +6 -6
- package/dist/views/role_group/index.vue.d.ts +2 -2
- package/dist/views/tenant/components/TenantEdit.vue.d.ts +2 -2
- package/dist/views/tenant/index.vue.d.ts +4 -4
- package/dist/views/user/index.vue.d.ts +2 -2
- package/dist/{watermark_setting-BnBt5gdM.js → watermark_setting-C1VFRfbW.js} +111 -111
- package/dist/watermark_setting.css +1 -1
- package/package.json +7 -7
- package/src/composables/useWebSocketManager.ts +104 -0
- package/src/index.ts +22 -0
- package/src/stores/view.ts +292 -0
- package/src/utils/routeSystem.ts +53 -0
- package/src/views/region/index.vue +1 -1
- package/src/views/resource/components/ComponentSelect.vue +12 -119
- package/src/views/resource/components/HoverCard.vue +62 -0
- package/src/views/resource/components/MetaForm.vue +129 -67
- package/src/views/resource/components/ResourceEdit.vue +33 -4
- package/src/views/resource/hooks/useMetaForm.ts +23 -0
- package/src/views/resource/model.ts +5 -1
- package/src/views/watermark_setting/index.vue +2 -2
- package/dist/ComponentSelect-Din5Vses.js +0 -2
- package/dist/DynamicRoutesForm-CkmCaHum.js +0 -4
- package/dist/HCheckList-Dd2Tx0jW.js +0 -2
- package/dist/ImportExport-BbZkZEW_.js +0 -4
- package/dist/MetaForm-CI-T2qEE.js +0 -284
- package/dist/MetaForm-CrsQmdOg.js +0 -4
- package/dist/OrgAndPosition-CDCim7yM.js +0 -2
- package/dist/ResourceEdit-BFXA953U.js +0 -309
- package/dist/ResourceEdit-V6gt22gW.js +0 -8
- package/dist/ResourceRelation-BnLQZey7.js +0 -3
- package/dist/RoleRelation-CAMzPMFz.js +0 -2
- package/dist/RoleSelector-DTnDRRTQ.js +0 -279
- package/dist/TenantEdit-DYHJehf0.js +0 -6
- package/dist/UserAuthorization-BdHxAQlK.js +0 -4
- package/dist/UserEdit-CqrRx717.js +0 -4
- package/dist/animation_item-COb6VI4T.js +0 -2
- package/dist/browserType-D2cPQa0k.js +0 -2
- package/dist/createAndEditDataPermission-6pvYsJo9.js +0 -8
- package/dist/drawerBlackWhiteList-DK4g_CpC.js +0 -3
- package/dist/drawerDictionary-DHIcxPrY.js +0 -4
- package/dist/drawerDictionaryItem-dg1sIDYE.js +0 -4
- package/dist/drawerGroup-CrF2c8UJ.js +0 -3
- package/dist/drawerOrganization-b39q3V33.js +0 -3
- package/dist/drawerPosition-BjoDy0cQ.js +0 -3
- package/dist/drawerRegion-omVT_dpq.js +0 -3
- package/dist/drawerRole-BaQBb2-J.js +0 -215
- package/dist/drawerRole-BqMh5l11.js +0 -5
- package/dist/drawerRole-D7VJRLmp.js +0 -6
- package/dist/drawerRole-dJ3m0_K2.js +0 -3
- package/dist/loginHistoryDetail-BNGtarOv.js +0 -4
- package/dist/not-data-uXybSS43.js +0 -2
- package/dist/operateHistoryDetail-DsM4L8Nz.js +0 -4
- package/dist/setItem-CjNn98dC.js +0 -77
- package/dist/setItem-H6NRNSt7.js +0 -5
- /package/dist/{HCheckList-3zLNVNr0.js → HCheckList-CmS0Zgjk.js} +0 -0
- /package/dist/{OrgAndPosition-BK5MTlOO.js → OrgAndPosition-DYxNkasL.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-Bvl99pNT.js → _plugin-vue_export-helper-DziIhCOI.js} +0 -0
- /package/dist/{add-child-sIXCU5sL.js → add-child-BqjLtFNF.js} +0 -0
- /package/dist/{animation_item-D78koyTo.js → animation_item-Cg-CB3zX.js} +0 -0
- /package/dist/{authority-DQ4-SayE.js → authority-BCFCPQkb.js} +0 -0
- /package/dist/{authorize-CR54jxEa.js → authorize-BykMzt1r.js} +0 -0
- /package/dist/{blacklist-disable-ypFSVSX1.js → blacklist-disable-COoLZMSA.js} +0 -0
- /package/dist/{blacklist-enable-DlkD_15-.js → blacklist-enable-LZep1trj.js} +0 -0
- /package/dist/{browser-chrome-DNH4U6iO.js → browser-chrome-D0rex7Ir.js} +0 -0
- /package/dist/{browser-edge-4sSjlzO1.js → browser-edge-KCb_AIL5.js} +0 -0
- /package/dist/{browser-ie-yTwVV0GC.js → browser-ie-C1znjJM-.js} +0 -0
- /package/dist/{browser-other-Jax-vzDs.js → browser-other-C4er8PkV.js} +0 -0
- /package/dist/{browser-safari-B7PIezpj.js → browser-safari-BPRC1TV-.js} +0 -0
- /package/dist/{browserType-DZrDbVVY.js → browserType-E4RCiZfN.js} +0 -0
- /package/dist/{configData-CONUFxaH.js → configData-DQOHeFW2.js} +0 -0
- /package/dist/{dayjs.min-KffHrkDe.js → dayjs.min-DcxwBe2I.js} +0 -0
- /package/dist/{edit-CCL7qbDV.js → edit-C9HH0bNg.js} +0 -0
- /package/dist/{enum-DUjQrWbG.js → enum-B1DCzyaW.js} +0 -0
- /package/dist/{enum-CUMv4gQ2.js → enum-BWzxzuim.js} +0 -0
- /package/dist/{enum-B-lkiBy0.js → enum-CYW8g64p.js} +0 -0
- /package/dist/{enum-BMY6bmPA.js → enum-D0U38jb6.js} +0 -0
- /package/dist/{enum-Bg70i-vM.js → enum-VH4_jOj5.js} +0 -0
- /package/dist/{icard-BUuV9yW4.js → icard-FW0Ro50-.js} +0 -0
- /package/dist/{icon_animation-rPC0qi0K.js → icon_animation-DuNUKCIP.js} +0 -0
- /package/dist/{icon_breadcrumb-BOiEdwRY.js → icon_breadcrumb-DrPNYW5B.js} +0 -0
- /package/dist/{icon_copyright-zk1pF8Jj.js → icon_copyright-Di3Yr0PZ.js} +0 -0
- /package/dist/{icon_jt-BMoQoZvf.js → icon_jt-C4rQLl9Y.js} +0 -0
- /package/dist/{icon_layout-KBHA8xU_.js → icon_layout-5L9E7uN2.js} +0 -0
- /package/dist/{icon_mainpage-BTdCCyi2.js → icon_mainpage-DMKqRgmE.js} +0 -0
- /package/dist/{icon_menu-5k8XiWt5.js → icon_menu-Cp7-Zght.js} +0 -0
- /package/dist/{icon_page_size-DUMZ6xhJ.js → icon_page_size-Dc0zqT2W.js} +0 -0
- /package/dist/{icon_position_type-Cnkn2IzO.js → icon_position_type-DH2qxQQE.js} +0 -0
- /package/dist/{icon_safe_manage-B0PtL90p.js → icon_safe_manage-DXYWl1y-.js} +0 -0
- /package/dist/{icon_screen_scale-CwVhfflc.js → icon_screen_scale-DwC6qqx2.js} +0 -0
- /package/dist/{icon_system_manage-vM71UmjM.js → icon_system_manage-BYTldLly.js} +0 -0
- /package/dist/{icon_tabbar-CuMnIey0.js → icon_tabbar-CxffARwI.js} +0 -0
- /package/dist/{icon_toolbar-BoCbAU3P.js → icon_toolbar-CsxnTrNJ.js} +0 -0
- /package/dist/{icon_topbar-DGIDBcE6.js → icon_topbar-DS-oEZFA.js} +0 -0
- /package/dist/{icon_watermark-BBU-lOdN.js → icon_watermark-DDXsHlfQ.js} +0 -0
- /package/dist/{log-center-Z3WDfhg1.js → log-center-BFjZ4IE1.js} +0 -0
- /package/dist/{log-BgIwPjNu.js → log-hgUXTuhy.js} +0 -0
- /package/dist/{not-data-DejN9beo.js → not-data-Bw8FlpyB.js} +0 -0
- /package/dist/{org-main-C2g7AMMY.js → org-main-D5Isevbc.js} +0 -0
- /package/dist/{org-unmain-CjGtvuIa.js → org-unmain-BHBqSuCz.js} +0 -0
- /package/dist/{remove-BroXCqy9.js → remove-DKMMsJNq.js} +0 -0
- /package/dist/{resource-app-DV2RZiRk.js → resource-app-DZwdNG6F.js} +0 -0
- /package/dist/{resource-btn-Dw9-L0P5.js → resource-btn-DPX0oM2L.js} +0 -0
- /package/dist/{resource-dynamic-Cmk2ihZb.js → resource-dynamic-Cb_vjMjt.js} +0 -0
- /package/dist/{resource-index-D9J-wVCc.js → resource-index-ah4NpEob.js} +0 -0
- /package/dist/{resource-menu-XnlgciPe.js → resource-menu-CzWI03EU.js} +0 -0
- /package/dist/{resource-micro-DzYCcl5c.js → resource-micro-Ca0NS7j_.js} +0 -0
- /package/dist/{resource-nonmenu-8bXZBBWf.js → resource-nonmenu-Deitjo_5.js} +0 -0
- /package/dist/{setting-manage-BPwzU94V.js → setting-manage-B3vaM0w1.js} +0 -0
- /package/dist/{stores-Di6SQ3pp.js → stores-D6JJmBEU.js} +0 -0
- /package/dist/{theme-check-mark-Dz4lGIXE.js → theme-check-mark-BK7E8lqd.js} +0 -0
- /package/dist/{theme-title-CPXdAbpI.js → theme-title-aqbHq846.js} +0 -0
- /package/dist/{view-D4SR4EYn.js → view-C6Eo1zRL.js} +0 -0
- /package/dist/{zddata-Cdy8vScr.js → zddata-fjEtQ3lZ.js} +0 -0
- /package/dist/{zy_checked-xjGWlIXf.js → zy_checked-DTsDCC94.js} +0 -0
- /package/dist/{zy_default-kwFuicHB.js → zy_default-BaIuMKw-.js} +0 -0
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import { CaretDownOutlined as
|
|
4
|
-
import { Empty as
|
|
5
|
-
import { DirectoryTree as
|
|
6
|
-
import './ComponentSelect.css';const
|
|
1
|
+
import { useViewStore as e } from "./index.js";
|
|
2
|
+
import { Fragment as t, Teleport as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, onBeforeUnmount as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, resolveComponent as y, shallowRef as b, unref as x, useId as ee, useModel as S, useTemplateRef as C, watch as w, watchEffect as T, withCtx as te } from "vue";
|
|
3
|
+
import { CaretDownOutlined as ne } from "@ant-design/icons-vue";
|
|
4
|
+
import { Empty as re } from "ant-design-vue";
|
|
5
|
+
import { DirectoryTree as ie, Empty as ae, FormItemRest as oe, Input as se } from "ant-design-vue/es";
|
|
6
|
+
import './ComponentSelect.css';const ce = [
|
|
7
7
|
"top",
|
|
8
8
|
"right",
|
|
9
9
|
"bottom",
|
|
10
10
|
"left"
|
|
11
|
-
],
|
|
11
|
+
], E = Math.min, D = Math.max, O = Math.round, le = Math.floor, k = (e) => ({
|
|
12
12
|
x: e,
|
|
13
13
|
y: e
|
|
14
|
-
}),
|
|
14
|
+
}), ue = {
|
|
15
15
|
left: "right",
|
|
16
16
|
right: "left",
|
|
17
17
|
bottom: "top",
|
|
18
18
|
top: "bottom"
|
|
19
|
-
},
|
|
19
|
+
}, de = {
|
|
20
20
|
start: "end",
|
|
21
21
|
end: "start"
|
|
22
22
|
};
|
|
23
|
-
function
|
|
24
|
-
return
|
|
23
|
+
function fe(e, t, n) {
|
|
24
|
+
return D(e, E(t, n));
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function A(e, t) {
|
|
27
27
|
return typeof e == "function" ? e(t) : e;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function j(e) {
|
|
30
30
|
return e.split("-")[0];
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function M(e) {
|
|
33
33
|
return e.split("-")[1];
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function pe(e) {
|
|
36
36
|
return e === "x" ? "y" : "x";
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function me(e) {
|
|
39
39
|
return e === "y" ? "height" : "width";
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const he = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
42
42
|
function N(e) {
|
|
43
|
-
return
|
|
43
|
+
return he.has(j(e)) ? "y" : "x";
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
45
|
+
function ge(e) {
|
|
46
|
+
return pe(N(e));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function _e(e, t, n) {
|
|
49
49
|
n === void 0 && (n = !1);
|
|
50
|
-
let r =
|
|
51
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
50
|
+
let r = M(e), i = ge(e), a = me(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
51
|
+
return t.reference[a] > t.floating[a] && (o = Ee(o)), [o, Ee(o)];
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
let t =
|
|
53
|
+
function ve(e) {
|
|
54
|
+
let t = Ee(e);
|
|
55
55
|
return [
|
|
56
|
-
|
|
56
|
+
ye(e),
|
|
57
57
|
t,
|
|
58
|
-
|
|
58
|
+
ye(t)
|
|
59
59
|
];
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return e.replace(/start|end/g, (e) =>
|
|
61
|
+
function ye(e) {
|
|
62
|
+
return e.replace(/start|end/g, (e) => de[e]);
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
function
|
|
64
|
+
const be = ["left", "right"], xe = ["right", "left"], Se = ["top", "bottom"], Ce = ["bottom", "top"];
|
|
65
|
+
function we(e, t, n) {
|
|
66
66
|
switch (e) {
|
|
67
67
|
case "top":
|
|
68
|
-
case "bottom": return n ? t ?
|
|
68
|
+
case "bottom": return n ? t ? xe : be : t ? be : xe;
|
|
69
69
|
case "left":
|
|
70
|
-
case "right": return t ?
|
|
70
|
+
case "right": return t ? Se : Ce;
|
|
71
71
|
default: return [];
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
let i =
|
|
76
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(
|
|
74
|
+
function Te(e, t, n, r) {
|
|
75
|
+
let i = M(e), a = we(j(e), n === "start", r);
|
|
76
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(ye)))), a;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return e.replace(/left|right|bottom|top/g, (e) =>
|
|
78
|
+
function Ee(e) {
|
|
79
|
+
return e.replace(/left|right|bottom|top/g, (e) => ue[e]);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function De(e) {
|
|
82
82
|
return {
|
|
83
83
|
top: 0,
|
|
84
84
|
right: 0,
|
|
@@ -87,15 +87,15 @@ function ke(e) {
|
|
|
87
87
|
...e
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Oe(e) {
|
|
91
91
|
return typeof e == "number" ? {
|
|
92
92
|
top: e,
|
|
93
93
|
right: e,
|
|
94
94
|
bottom: e,
|
|
95
95
|
left: e
|
|
96
|
-
} :
|
|
96
|
+
} : De(e);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function ke(e) {
|
|
99
99
|
let { x: t, y: n, width: r, height: i } = e;
|
|
100
100
|
return {
|
|
101
101
|
width: r,
|
|
@@ -108,8 +108,8 @@ function je(e) {
|
|
|
108
108
|
y: n
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
let { reference: r, floating: i } = e, a = N(t), o =
|
|
111
|
+
function Ae(e, t, n) {
|
|
112
|
+
let { reference: r, floating: i } = e, a = N(t), o = ge(t), s = me(o), c = j(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
113
113
|
switch (c) {
|
|
114
114
|
case "top":
|
|
115
115
|
p = {
|
|
@@ -140,7 +140,7 @@ function Me(e, t, n) {
|
|
|
140
140
|
y: r.y
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
switch (
|
|
143
|
+
switch (M(t)) {
|
|
144
144
|
case "start":
|
|
145
145
|
p[o] -= f * (n && l ? -1 : 1);
|
|
146
146
|
break;
|
|
@@ -150,12 +150,12 @@ function Me(e, t, n) {
|
|
|
150
150
|
}
|
|
151
151
|
return p;
|
|
152
152
|
}
|
|
153
|
-
const
|
|
153
|
+
const je = async (e, t, n) => {
|
|
154
154
|
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = a.filter(Boolean), c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
155
155
|
reference: e,
|
|
156
156
|
floating: t,
|
|
157
157
|
strategy: i
|
|
158
|
-
}), { x: u, y: d } =
|
|
158
|
+
}), { x: u, y: d } = Ae(l, r, c), f = r, p = {}, m = 0;
|
|
159
159
|
for (let n = 0; n < s.length; n++) {
|
|
160
160
|
let { name: a, fn: h } = s[n], { x: g, y: _, data: v, reset: y } = await h({
|
|
161
161
|
x: u,
|
|
@@ -181,7 +181,7 @@ const Ne = async (e, t, n) => {
|
|
|
181
181
|
reference: e,
|
|
182
182
|
floating: t,
|
|
183
183
|
strategy: i
|
|
184
|
-
}) : y.rects), {x: u, y: d} =
|
|
184
|
+
}) : y.rects), {x: u, y: d} = Ae(l, f, c)), n = -1);
|
|
185
185
|
}
|
|
186
186
|
return {
|
|
187
187
|
x: u,
|
|
@@ -191,10 +191,10 @@ const Ne = async (e, t, n) => {
|
|
|
191
191
|
middlewareData: p
|
|
192
192
|
};
|
|
193
193
|
};
|
|
194
|
-
async function
|
|
194
|
+
async function Me(e, t) {
|
|
195
195
|
var n;
|
|
196
196
|
t === void 0 && (t = {});
|
|
197
|
-
let { x: r, y: i, platform: a, rects: o, elements: s, strategy: c } = e, { boundary: l = "clippingAncestors", rootBoundary: u = "viewport", elementContext: d = "floating", altBoundary: f = !1, padding: p = 0 } =
|
|
197
|
+
let { x: r, y: i, platform: a, rects: o, elements: s, strategy: c } = e, { boundary: l = "clippingAncestors", rootBoundary: u = "viewport", elementContext: d = "floating", altBoundary: f = !1, padding: p = 0 } = A(t, e), m = Oe(p), h = d === "floating" ? "reference" : "floating", g = s[f ? h : d], _ = ke(await a.getClippingRect({
|
|
198
198
|
element: (n = await (a.isElement == null ? void 0 : a.isElement(g))) ?? !0 ? g : g.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
|
|
199
199
|
boundary: l,
|
|
200
200
|
rootBoundary: u,
|
|
@@ -207,7 +207,7 @@ async function Pe(e, t) {
|
|
|
207
207
|
} : o.reference, y = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), b = await (a.isElement == null ? void 0 : a.isElement(y)) && await (a.getScale == null ? void 0 : a.getScale(y)) || {
|
|
208
208
|
x: 1,
|
|
209
209
|
y: 1
|
|
210
|
-
}, x =
|
|
210
|
+
}, x = ke(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
211
211
|
elements: s,
|
|
212
212
|
rect: v,
|
|
213
213
|
offsetParent: y,
|
|
@@ -220,65 +220,65 @@ async function Pe(e, t) {
|
|
|
220
220
|
right: (x.right - _.right + m.right) / b.x
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
const
|
|
223
|
+
const Ne = (e) => ({
|
|
224
224
|
name: "arrow",
|
|
225
225
|
options: e,
|
|
226
226
|
async fn(t) {
|
|
227
|
-
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } =
|
|
227
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = A(e, t) || {};
|
|
228
228
|
if (l == null) return {};
|
|
229
|
-
let d =
|
|
229
|
+
let d = Oe(u), f = {
|
|
230
230
|
x: n,
|
|
231
231
|
y: r
|
|
232
|
-
}, p =
|
|
233
|
-
(!
|
|
234
|
-
let
|
|
232
|
+
}, p = ge(i), m = me(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], ee = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), S = ee ? ee[y] : 0;
|
|
233
|
+
(!S || !await (o.isElement == null ? void 0 : o.isElement(ee))) && (S = s.floating[y] || a.floating[m]);
|
|
234
|
+
let C = b / 2 - x / 2, w = S / 2 - h[m] / 2 - 1, T = E(d[_], w), te = E(d[v], w), ne = T, re = S - h[m] - te, ie = S / 2 - h[m] / 2 + C, ae = fe(ne, ie, re), oe = !c.arrow && M(i) != null && ie !== ae && a.reference[m] / 2 - (ie < ne ? T : te) - h[m] / 2 < 0, se = oe ? ie < ne ? ie - ne : ie - re : 0;
|
|
235
235
|
return {
|
|
236
|
-
[p]: f[p] +
|
|
236
|
+
[p]: f[p] + se,
|
|
237
237
|
data: {
|
|
238
|
-
[p]:
|
|
239
|
-
centerOffset:
|
|
240
|
-
...
|
|
238
|
+
[p]: ae,
|
|
239
|
+
centerOffset: ie - ae - se,
|
|
240
|
+
...oe && { alignmentOffset: se }
|
|
241
241
|
},
|
|
242
|
-
reset:
|
|
242
|
+
reset: oe
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
}),
|
|
245
|
+
}), Pe = function(e) {
|
|
246
246
|
return e === void 0 && (e = {}), {
|
|
247
247
|
name: "flip",
|
|
248
248
|
options: e,
|
|
249
249
|
async fn(t) {
|
|
250
250
|
var n, r;
|
|
251
|
-
let { placement: i, middlewareData: a, rects: o, initialPlacement: s, platform: c, elements: l } = t, { mainAxis: u = !0, crossAxis: d = !0, fallbackPlacements: f, fallbackStrategy: p = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: h = !0,...g } =
|
|
251
|
+
let { placement: i, middlewareData: a, rects: o, initialPlacement: s, platform: c, elements: l } = t, { mainAxis: u = !0, crossAxis: d = !0, fallbackPlacements: f, fallbackStrategy: p = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: h = !0,...g } = A(e, t);
|
|
252
252
|
if ((n = a.arrow) != null && n.alignmentOffset) return {};
|
|
253
|
-
let _ =
|
|
254
|
-
!f &&
|
|
255
|
-
let
|
|
256
|
-
if (u &&
|
|
257
|
-
let e =
|
|
258
|
-
|
|
253
|
+
let _ = j(i), v = N(s), y = j(s) === s, b = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), x = f || (y || !h ? [Ee(s)] : ve(s)), ee = m !== "none";
|
|
254
|
+
!f && ee && x.push(...Te(s, h, m, b));
|
|
255
|
+
let S = [s, ...x], C = await Me(t, g), w = [], T = (r = a.flip)?.overflows || [];
|
|
256
|
+
if (u && w.push(C[_]), d) {
|
|
257
|
+
let e = _e(i, o, b);
|
|
258
|
+
w.push(C[e[0]], C[e[1]]);
|
|
259
259
|
}
|
|
260
|
-
if (
|
|
260
|
+
if (T = [...T, {
|
|
261
261
|
placement: i,
|
|
262
|
-
overflows:
|
|
263
|
-
}], !
|
|
264
|
-
var
|
|
265
|
-
let e = ((
|
|
262
|
+
overflows: w
|
|
263
|
+
}], !w.every((e) => e <= 0)) {
|
|
264
|
+
var te, ne;
|
|
265
|
+
let e = ((te = a.flip)?.index || 0) + 1, t = S[e];
|
|
266
266
|
if (t) {
|
|
267
267
|
let n = d === "alignment" ? v !== N(t) : !1;
|
|
268
|
-
if (!n ||
|
|
268
|
+
if (!n || T.every((e) => e.overflows[0] > 0 && N(e.placement) === v)) return {
|
|
269
269
|
data: {
|
|
270
270
|
index: e,
|
|
271
|
-
overflows:
|
|
271
|
+
overflows: T
|
|
272
272
|
},
|
|
273
273
|
reset: { placement: t }
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
let n = (
|
|
276
|
+
let n = (ne = T.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0])?.placement;
|
|
277
277
|
if (!n) switch (p) {
|
|
278
278
|
case "bestFit": {
|
|
279
|
-
var
|
|
280
|
-
let e = (
|
|
281
|
-
if (
|
|
279
|
+
var re;
|
|
280
|
+
let e = (re = T.filter((e) => {
|
|
281
|
+
if (ee) {
|
|
282
282
|
let t = N(e.placement);
|
|
283
283
|
return t === v || t === "y";
|
|
284
284
|
}
|
|
@@ -297,7 +297,7 @@ const Fe = (e) => ({
|
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
299
|
};
|
|
300
|
-
function
|
|
300
|
+
function Fe(e, t) {
|
|
301
301
|
return {
|
|
302
302
|
top: e.top - t.height,
|
|
303
303
|
right: e.right - t.width,
|
|
@@ -305,43 +305,43 @@ function Le(e, t) {
|
|
|
305
305
|
left: e.left - t.width
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
return
|
|
308
|
+
function Ie(e) {
|
|
309
|
+
return ce.some((t) => e[t] >= 0);
|
|
310
310
|
}
|
|
311
|
-
const
|
|
311
|
+
const Le = function(e) {
|
|
312
312
|
return e === void 0 && (e = {}), {
|
|
313
313
|
name: "hide",
|
|
314
314
|
options: e,
|
|
315
315
|
async fn(t) {
|
|
316
|
-
let { rects: n } = t, { strategy: r = "referenceHidden",...i } =
|
|
316
|
+
let { rects: n } = t, { strategy: r = "referenceHidden",...i } = A(e, t);
|
|
317
317
|
switch (r) {
|
|
318
318
|
case "referenceHidden": {
|
|
319
|
-
let e = await
|
|
319
|
+
let e = await Me(t, {
|
|
320
320
|
...i,
|
|
321
321
|
elementContext: "reference"
|
|
322
|
-
}), r =
|
|
322
|
+
}), r = Fe(e, n.reference);
|
|
323
323
|
return { data: {
|
|
324
324
|
referenceHiddenOffsets: r,
|
|
325
|
-
referenceHidden:
|
|
325
|
+
referenceHidden: Ie(r)
|
|
326
326
|
} };
|
|
327
327
|
}
|
|
328
328
|
case "escaped": {
|
|
329
|
-
let e = await
|
|
329
|
+
let e = await Me(t, {
|
|
330
330
|
...i,
|
|
331
331
|
altBoundary: !0
|
|
332
|
-
}), r =
|
|
332
|
+
}), r = Fe(e, n.floating);
|
|
333
333
|
return { data: {
|
|
334
334
|
escapedOffsets: r,
|
|
335
|
-
escaped:
|
|
335
|
+
escaped: Ie(r)
|
|
336
336
|
} };
|
|
337
337
|
}
|
|
338
338
|
default: return {};
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
|
-
},
|
|
343
|
-
async function
|
|
344
|
-
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o =
|
|
342
|
+
}, Re = /* @__PURE__ */ new Set(["left", "top"]);
|
|
343
|
+
async function ze(e, t) {
|
|
344
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = j(n), s = M(n), c = N(n) === "y", l = Re.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = A(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
345
345
|
mainAxis: d,
|
|
346
346
|
crossAxis: 0,
|
|
347
347
|
alignmentAxis: null
|
|
@@ -358,13 +358,13 @@ async function Ve(e, t) {
|
|
|
358
358
|
y: p * u
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
const
|
|
361
|
+
const Be = function(e) {
|
|
362
362
|
return e === void 0 && (e = 0), {
|
|
363
363
|
name: "offset",
|
|
364
364
|
options: e,
|
|
365
365
|
async fn(t) {
|
|
366
366
|
var n, r;
|
|
367
|
-
let { x: i, y: a, placement: o, middlewareData: s } = t, c = await
|
|
367
|
+
let { x: i, y: a, placement: o, middlewareData: s } = t, c = await ze(t, e);
|
|
368
368
|
return o === (n = s.offset)?.placement && (r = s.arrow) != null && r.alignmentOffset ? {} : {
|
|
369
369
|
x: i + c.x,
|
|
370
370
|
y: a + c.y,
|
|
@@ -375,7 +375,7 @@ const He = function(e) {
|
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
377
|
};
|
|
378
|
-
},
|
|
378
|
+
}, Ve = function(e) {
|
|
379
379
|
return e === void 0 && (e = {}), {
|
|
380
380
|
name: "shift",
|
|
381
381
|
options: e,
|
|
@@ -386,17 +386,17 @@ const He = function(e) {
|
|
|
386
386
|
x: t,
|
|
387
387
|
y: n
|
|
388
388
|
};
|
|
389
|
-
} },...c } =
|
|
389
|
+
} },...c } = A(e, t), l = {
|
|
390
390
|
x: n,
|
|
391
391
|
y: r
|
|
392
|
-
}, u = await
|
|
392
|
+
}, u = await Me(t, c), d = N(j(i)), f = pe(d), p = l[f], m = l[d];
|
|
393
393
|
if (a) {
|
|
394
394
|
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = p + u[e], r = p - u[t];
|
|
395
|
-
p =
|
|
395
|
+
p = fe(n, p, r);
|
|
396
396
|
}
|
|
397
397
|
if (o) {
|
|
398
398
|
let e = d === "y" ? "top" : "left", t = d === "y" ? "bottom" : "right", n = m + u[e], r = m - u[t];
|
|
399
|
-
m =
|
|
399
|
+
m = fe(n, m, r);
|
|
400
400
|
}
|
|
401
401
|
let h = s.fn({
|
|
402
402
|
...t,
|
|
@@ -416,14 +416,14 @@ const He = function(e) {
|
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
};
|
|
419
|
-
},
|
|
419
|
+
}, He = function(e) {
|
|
420
420
|
return e === void 0 && (e = {}), {
|
|
421
421
|
options: e,
|
|
422
422
|
fn(t) {
|
|
423
|
-
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } =
|
|
423
|
+
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = A(e, t), u = {
|
|
424
424
|
x: n,
|
|
425
425
|
y: r
|
|
426
|
-
}, d = N(i), f =
|
|
426
|
+
}, d = N(i), f = pe(d), p = u[f], m = u[d], h = A(s, t), g = typeof h == "number" ? {
|
|
427
427
|
mainAxis: h,
|
|
428
428
|
crossAxis: 0
|
|
429
429
|
} : {
|
|
@@ -437,7 +437,7 @@ const He = function(e) {
|
|
|
437
437
|
}
|
|
438
438
|
if (l) {
|
|
439
439
|
var _, v;
|
|
440
|
-
let e = f === "y" ? "width" : "height", t =
|
|
440
|
+
let e = f === "y" ? "width" : "height", t = Re.has(j(i)), n = a.reference[d] - a.floating[e] + (t && (_ = o.offset)?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : (v = o.offset)?.[d] || 0) - (t ? g.crossAxis : 0);
|
|
441
441
|
m < n ? m = n : m > r && (m = r);
|
|
442
442
|
}
|
|
443
443
|
return {
|
|
@@ -446,34 +446,34 @@ const He = function(e) {
|
|
|
446
446
|
};
|
|
447
447
|
}
|
|
448
448
|
};
|
|
449
|
-
},
|
|
449
|
+
}, Ue = function(e) {
|
|
450
450
|
return e === void 0 && (e = {}), {
|
|
451
451
|
name: "size",
|
|
452
452
|
options: e,
|
|
453
453
|
async fn(t) {
|
|
454
454
|
var n, r;
|
|
455
|
-
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {},...l } =
|
|
455
|
+
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {},...l } = A(e, t), u = await Me(t, l), d = j(i), f = M(i), p = N(i) === "y", { width: m, height: h } = a.floating, g, _;
|
|
456
456
|
d === "top" || d === "bottom" ? (g = d, _ = f === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (_ = d, g = f === "end" ? "top" : "bottom");
|
|
457
|
-
let v = h - u.top - u.bottom, y = m - u.left - u.right, b =
|
|
458
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
459
|
-
let e =
|
|
460
|
-
p ?
|
|
457
|
+
let v = h - u.top - u.bottom, y = m - u.left - u.right, b = E(h - u[g], v), x = E(m - u[_], y), ee = !t.middlewareData.shift, S = b, C = x;
|
|
458
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (C = y), (r = t.middlewareData.shift) != null && r.enabled.y && (S = v), ee && !f) {
|
|
459
|
+
let e = D(u.left, 0), t = D(u.right, 0), n = D(u.top, 0), r = D(u.bottom, 0);
|
|
460
|
+
p ? C = m - 2 * (e !== 0 || t !== 0 ? e + t : D(u.left, u.right)) : S = h - 2 * (n !== 0 || r !== 0 ? n + r : D(u.top, u.bottom));
|
|
461
461
|
}
|
|
462
462
|
await c({
|
|
463
463
|
...t,
|
|
464
|
-
availableWidth:
|
|
465
|
-
availableHeight:
|
|
464
|
+
availableWidth: C,
|
|
465
|
+
availableHeight: S
|
|
466
466
|
});
|
|
467
|
-
let
|
|
468
|
-
return m !==
|
|
467
|
+
let w = await o.getDimensions(s.floating);
|
|
468
|
+
return m !== w.width || h !== w.height ? { reset: { rects: !0 } } : {};
|
|
469
469
|
}
|
|
470
470
|
};
|
|
471
471
|
};
|
|
472
|
-
function
|
|
472
|
+
function We() {
|
|
473
473
|
return typeof window < "u";
|
|
474
474
|
}
|
|
475
|
-
function
|
|
476
|
-
return
|
|
475
|
+
function Ge(e) {
|
|
476
|
+
return Ke(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
477
477
|
}
|
|
478
478
|
function P(e) {
|
|
479
479
|
var t;
|
|
@@ -481,36 +481,36 @@ function P(e) {
|
|
|
481
481
|
}
|
|
482
482
|
function F(e) {
|
|
483
483
|
var t;
|
|
484
|
-
return (t = (
|
|
484
|
+
return (t = (Ke(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
return
|
|
486
|
+
function Ke(e) {
|
|
487
|
+
return We() ? e instanceof Node || e instanceof P(e).Node : !1;
|
|
488
488
|
}
|
|
489
489
|
function I(e) {
|
|
490
|
-
return
|
|
490
|
+
return We() ? e instanceof Element || e instanceof P(e).Element : !1;
|
|
491
491
|
}
|
|
492
492
|
function L(e) {
|
|
493
|
-
return
|
|
493
|
+
return We() ? e instanceof HTMLElement || e instanceof P(e).HTMLElement : !1;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
return !
|
|
495
|
+
function qe(e) {
|
|
496
|
+
return !We() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof P(e).ShadowRoot;
|
|
497
497
|
}
|
|
498
|
-
const
|
|
499
|
-
function
|
|
498
|
+
const Je = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
499
|
+
function Ye(e) {
|
|
500
500
|
let { overflow: t, overflowX: n, overflowY: r, display: i } = R(e);
|
|
501
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !
|
|
501
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !Je.has(i);
|
|
502
502
|
}
|
|
503
|
-
const
|
|
503
|
+
const Xe = /* @__PURE__ */ new Set([
|
|
504
504
|
"table",
|
|
505
505
|
"td",
|
|
506
506
|
"th"
|
|
507
507
|
]);
|
|
508
|
-
function
|
|
509
|
-
return
|
|
508
|
+
function Ze(e) {
|
|
509
|
+
return Xe.has(Ge(e));
|
|
510
510
|
}
|
|
511
|
-
const
|
|
512
|
-
function
|
|
513
|
-
return
|
|
511
|
+
const Qe = [":popover-open", ":modal"];
|
|
512
|
+
function $e(e) {
|
|
513
|
+
return Qe.some((t) => {
|
|
514
514
|
try {
|
|
515
515
|
return e.matches(t);
|
|
516
516
|
} catch {
|
|
@@ -518,53 +518,53 @@ function tt(e) {
|
|
|
518
518
|
}
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
|
-
const
|
|
521
|
+
const et = [
|
|
522
522
|
"transform",
|
|
523
523
|
"translate",
|
|
524
524
|
"scale",
|
|
525
525
|
"rotate",
|
|
526
526
|
"perspective"
|
|
527
|
-
],
|
|
527
|
+
], tt = [
|
|
528
528
|
"transform",
|
|
529
529
|
"translate",
|
|
530
530
|
"scale",
|
|
531
531
|
"rotate",
|
|
532
532
|
"perspective",
|
|
533
533
|
"filter"
|
|
534
|
-
],
|
|
534
|
+
], nt = [
|
|
535
535
|
"paint",
|
|
536
536
|
"layout",
|
|
537
537
|
"strict",
|
|
538
538
|
"content"
|
|
539
539
|
];
|
|
540
|
-
function
|
|
541
|
-
let t =
|
|
542
|
-
return
|
|
540
|
+
function rt(e) {
|
|
541
|
+
let t = at(), n = I(e) ? R(e) : e;
|
|
542
|
+
return et.some((e) => n[e] ? n[e] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || tt.some((e) => (n.willChange || "").includes(e)) || nt.some((e) => (n.contain || "").includes(e));
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function it(e) {
|
|
545
545
|
let t = z(e);
|
|
546
|
-
for (; L(t) && !
|
|
547
|
-
if (
|
|
548
|
-
if (
|
|
546
|
+
for (; L(t) && !st(t);) {
|
|
547
|
+
if (rt(t)) return t;
|
|
548
|
+
if ($e(t)) return null;
|
|
549
549
|
t = z(t);
|
|
550
550
|
}
|
|
551
551
|
return null;
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function at() {
|
|
554
554
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
555
555
|
}
|
|
556
|
-
const
|
|
556
|
+
const ot = /* @__PURE__ */ new Set([
|
|
557
557
|
"html",
|
|
558
558
|
"body",
|
|
559
559
|
"#document"
|
|
560
560
|
]);
|
|
561
|
-
function
|
|
562
|
-
return
|
|
561
|
+
function st(e) {
|
|
562
|
+
return ot.has(Ge(e));
|
|
563
563
|
}
|
|
564
564
|
function R(e) {
|
|
565
565
|
return P(e).getComputedStyle(e);
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function ct(e) {
|
|
568
568
|
return I(e) ? {
|
|
569
569
|
scrollLeft: e.scrollLeft,
|
|
570
570
|
scrollTop: e.scrollTop
|
|
@@ -574,86 +574,86 @@ function ut(e) {
|
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
576
|
function z(e) {
|
|
577
|
-
if (
|
|
578
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
579
|
-
return
|
|
577
|
+
if (Ge(e) === "html") return e;
|
|
578
|
+
let t = e.assignedSlot || e.parentNode || qe(e) && e.host || F(e);
|
|
579
|
+
return qe(t) ? t.host : t;
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function lt(e) {
|
|
582
582
|
let t = z(e);
|
|
583
|
-
return
|
|
583
|
+
return st(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : L(t) && Ye(t) ? t : lt(t);
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function ut(e, t, n) {
|
|
586
586
|
var r;
|
|
587
587
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
588
|
-
let i =
|
|
588
|
+
let i = lt(e), a = i === (r = e.ownerDocument)?.body, o = P(i);
|
|
589
589
|
if (a) {
|
|
590
|
-
let e =
|
|
591
|
-
return t.concat(o, o.visualViewport || [],
|
|
590
|
+
let e = dt(o);
|
|
591
|
+
return t.concat(o, o.visualViewport || [], Ye(i) ? i : [], e && n ? ut(e) : []);
|
|
592
592
|
}
|
|
593
|
-
return t.concat(i,
|
|
593
|
+
return t.concat(i, ut(i, [], n));
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function dt(e) {
|
|
596
596
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
597
597
|
}
|
|
598
|
-
const
|
|
599
|
-
function
|
|
598
|
+
const ft = (e) => e.length === 0;
|
|
599
|
+
function pt(e) {
|
|
600
600
|
return e.replace(/([a-z\d])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function mt(e, t = []) {
|
|
603
603
|
return {
|
|
604
604
|
parts: (...n) => {
|
|
605
|
-
if (
|
|
605
|
+
if (ft(t)) return mt(e, n);
|
|
606
606
|
throw Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?");
|
|
607
607
|
},
|
|
608
|
-
extendWith: (...n) =>
|
|
609
|
-
rename: (e) =>
|
|
608
|
+
extendWith: (...n) => mt(e, [...t, ...n]),
|
|
609
|
+
rename: (e) => mt(e, t),
|
|
610
610
|
keys: () => t,
|
|
611
611
|
build: () => [...new Set(t)].reduce((t, n) => Object.assign(t, { [n]: {
|
|
612
|
-
selector: [`&[data-scope="${
|
|
612
|
+
selector: [`&[data-scope="${pt(e)}"][data-part="${pt(n)}"]`, `& [data-scope="${pt(e)}"][data-part="${pt(n)}"]`].join(", "),
|
|
613
613
|
attrs: {
|
|
614
|
-
"data-scope":
|
|
615
|
-
"data-part":
|
|
614
|
+
"data-scope": pt(e),
|
|
615
|
+
"data-part": pt(n)
|
|
616
616
|
}
|
|
617
617
|
} }), {})
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
|
-
const
|
|
620
|
+
const ht = (e) => typeof e == "object" && !!e, gt = (e) => e ? "" : void 0;
|
|
621
621
|
function B(e) {
|
|
622
|
-
return
|
|
622
|
+
return ht(e) && e.nodeType === 1 && typeof e.nodeName == "string";
|
|
623
623
|
}
|
|
624
|
-
const
|
|
625
|
-
function
|
|
624
|
+
const _t = (e) => ht(e) && e.nodeType === 9, vt = (e) => ht(e) && e === e.window;
|
|
625
|
+
function yt(e) {
|
|
626
626
|
return B(e) ? e.localName || "" : "#document";
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function bt(e) {
|
|
629
629
|
return [
|
|
630
630
|
"html",
|
|
631
631
|
"body",
|
|
632
632
|
"#document"
|
|
633
|
-
].includes(
|
|
633
|
+
].includes(yt(e));
|
|
634
634
|
}
|
|
635
|
-
const
|
|
636
|
-
function
|
|
637
|
-
return
|
|
635
|
+
const xt = (e) => ht(e) && e.nodeType !== void 0;
|
|
636
|
+
function St(e) {
|
|
637
|
+
return xt(e) && e.nodeType === 11 && "host" in e;
|
|
638
638
|
}
|
|
639
|
-
const
|
|
640
|
-
function
|
|
639
|
+
const Ct = (e) => B(e) && e.localName === "input";
|
|
640
|
+
function wt(e) {
|
|
641
641
|
return B(e) ? e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0 : !1;
|
|
642
642
|
}
|
|
643
|
-
const
|
|
644
|
-
function
|
|
643
|
+
const Tt = /(textarea|select)/;
|
|
644
|
+
function Et(e) {
|
|
645
645
|
if (e == null || !B(e)) return !1;
|
|
646
646
|
try {
|
|
647
|
-
return
|
|
647
|
+
return Ct(e) && e.selectionStart != null || Tt.test(e.localName) || e.isContentEditable || e.getAttribute("contenteditable") === "true" || e.getAttribute("contenteditable") === "";
|
|
648
648
|
} catch {
|
|
649
649
|
return !1;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function Dt(e, t) {
|
|
653
653
|
if (!e || !t || !B(e) || !B(t)) return !1;
|
|
654
654
|
let n = t.getRootNode?.();
|
|
655
655
|
if (e === t || e.contains(t)) return !0;
|
|
656
|
-
if (n &&
|
|
656
|
+
if (n && St(n)) {
|
|
657
657
|
let n = t;
|
|
658
658
|
for (; n;) {
|
|
659
659
|
if (e === n) return !0;
|
|
@@ -663,15 +663,15 @@ function kt(e, t) {
|
|
|
663
663
|
return !1;
|
|
664
664
|
}
|
|
665
665
|
function V(e) {
|
|
666
|
-
return
|
|
666
|
+
return _t(e) ? e : vt(e) ? e.document : e?.ownerDocument ?? document;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function Ot(e) {
|
|
669
669
|
return V(e).documentElement;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
672
|
-
return
|
|
671
|
+
function kt(e) {
|
|
672
|
+
return St(e) ? kt(e.host) : _t(e) ? e.defaultView ?? window : B(e) ? e.ownerDocument?.defaultView ?? window : window;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function At(e) {
|
|
675
675
|
let t = e.activeElement;
|
|
676
676
|
for (; t?.shadowRoot;) {
|
|
677
677
|
let e = t.shadowRoot.activeElement;
|
|
@@ -680,50 +680,50 @@ function Mt(e) {
|
|
|
680
680
|
}
|
|
681
681
|
return t;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
if (
|
|
685
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
686
|
-
return
|
|
683
|
+
function jt(e) {
|
|
684
|
+
if (yt(e) === "html") return e;
|
|
685
|
+
let t = e.assignedSlot || e.parentNode || St(e) && e.host || Ot(e);
|
|
686
|
+
return St(t) ? t.host : t;
|
|
687
687
|
}
|
|
688
|
-
const
|
|
689
|
-
function
|
|
690
|
-
return
|
|
688
|
+
const Mt = /* @__PURE__ */ new WeakMap();
|
|
689
|
+
function Nt(e) {
|
|
690
|
+
return Mt.has(e) || Mt.set(e, kt(e).getComputedStyle(e)), Mt.get(e);
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
function
|
|
692
|
+
const Pt = () => typeof document < "u";
|
|
693
|
+
function Ft() {
|
|
694
694
|
let e = navigator.userAgentData;
|
|
695
695
|
return e?.platform ?? navigator.platform;
|
|
696
696
|
}
|
|
697
|
-
const
|
|
698
|
-
function
|
|
697
|
+
const It = (e) => Pt() && e.test(Ft()), Lt = (e) => Pt() && e.test(navigator.vendor), Rt = () => It(/^Mac/), zt = () => It(/mac|iphone|ipad|ipod/i), Bt = () => zt() && Lt(/apple/i), Vt = () => It(/iP(hone|ad|od)|iOS/);
|
|
698
|
+
function Ht(e) {
|
|
699
699
|
return e.composedPath?.() ?? e.nativeEvent?.composedPath?.();
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
let t =
|
|
701
|
+
function H(e) {
|
|
702
|
+
let t = Ht(e);
|
|
703
703
|
return t?.[0] ?? e.target;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
return e.button === 2 ||
|
|
705
|
+
function Ut(e) {
|
|
706
|
+
return e.button === 2 || Rt() && e.ctrlKey && e.button === 0;
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function U(e, t, n, r) {
|
|
709
709
|
let i = typeof e == "function" ? e() : e;
|
|
710
710
|
return i?.addEventListener(t, n, r), () => {
|
|
711
711
|
i?.removeEventListener(t, n, r);
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
let { type: n = "HTMLInputElement", property: r = "value" } = t, i =
|
|
714
|
+
function Wt(e, t) {
|
|
715
|
+
let { type: n = "HTMLInputElement", property: r = "value" } = t, i = kt(e)[n].prototype;
|
|
716
716
|
return Object.getOwnPropertyDescriptor(i, r) ?? {};
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function Gt(e) {
|
|
719
719
|
if (e.localName === "input") return "HTMLInputElement";
|
|
720
720
|
if (e.localName === "textarea") return "HTMLTextAreaElement";
|
|
721
721
|
if (e.localName === "select") return "HTMLSelectElement";
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
let r =
|
|
723
|
+
function Kt(e, t, n = "value") {
|
|
724
|
+
let r = Gt(e);
|
|
725
725
|
if (r) {
|
|
726
|
-
let i =
|
|
726
|
+
let i = Wt(e, {
|
|
727
727
|
type: r,
|
|
728
728
|
property: n
|
|
729
729
|
});
|
|
@@ -731,87 +731,87 @@ function Yt(e, t, n = "value") {
|
|
|
731
731
|
}
|
|
732
732
|
e.setAttribute(n, t);
|
|
733
733
|
}
|
|
734
|
-
const
|
|
735
|
-
function
|
|
734
|
+
const qt = (e) => B(e) && e.tagName === "IFRAME", Jt = (e) => !Number.isNaN(Number.parseInt(e.getAttribute("tabindex") || "0", 10)), Yt = (e) => Number.parseInt(e.getAttribute("tabindex") || "0", 10) < 0, Xt = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";
|
|
735
|
+
function Zt(e, t = !1) {
|
|
736
736
|
if (!e) return [];
|
|
737
|
-
let n = Array.from(e.querySelectorAll(
|
|
738
|
-
r && B(e) &&
|
|
739
|
-
let i = n.filter(
|
|
737
|
+
let n = Array.from(e.querySelectorAll(Xt)), r = t === !0 || t === "if-empty" && n.length === 0;
|
|
738
|
+
r && B(e) && W(e) && n.unshift(e);
|
|
739
|
+
let i = n.filter(W);
|
|
740
740
|
return i.forEach((e, t) => {
|
|
741
|
-
if (
|
|
741
|
+
if (qt(e) && e.contentDocument) {
|
|
742
742
|
let n = e.contentDocument.body;
|
|
743
|
-
i.splice(t, 1, ...
|
|
743
|
+
i.splice(t, 1, ...Zt(n));
|
|
744
744
|
}
|
|
745
745
|
}), i;
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
return !e || e.closest("[inert]") ? !1 : e.matches(
|
|
747
|
+
function W(e) {
|
|
748
|
+
return !e || e.closest("[inert]") ? !1 : e.matches(Xt) && wt(e);
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function Qt(e, t) {
|
|
751
751
|
if (!e) return [];
|
|
752
|
-
let n = Array.from(e.querySelectorAll(
|
|
753
|
-
return t &&
|
|
754
|
-
if (
|
|
755
|
-
let n = e.contentDocument.body, i =
|
|
752
|
+
let n = Array.from(e.querySelectorAll(Xt)), r = n.filter($t);
|
|
753
|
+
return t && $t(e) && r.unshift(e), r.forEach((e, t) => {
|
|
754
|
+
if (qt(e) && e.contentDocument) {
|
|
755
|
+
let n = e.contentDocument.body, i = Qt(n);
|
|
756
756
|
r.splice(t, 1, ...i);
|
|
757
757
|
}
|
|
758
758
|
}), !r.length && t ? n : r;
|
|
759
759
|
}
|
|
760
|
-
function
|
|
761
|
-
return e != null && e.tabIndex > 0 ? !0 :
|
|
760
|
+
function $t(e) {
|
|
761
|
+
return e != null && e.tabIndex > 0 ? !0 : W(e) && !Yt(e);
|
|
762
762
|
}
|
|
763
|
-
function
|
|
764
|
-
let n =
|
|
763
|
+
function en(e, t) {
|
|
764
|
+
let n = Qt(e, t), r = n[0] || null, i = n[n.length - 1] || null;
|
|
765
765
|
return [r, i];
|
|
766
766
|
}
|
|
767
|
-
function
|
|
768
|
-
let n =
|
|
767
|
+
function tn(e, t) {
|
|
768
|
+
let n = Qt(e), r = e?.ownerDocument || document, i = t ?? r.activeElement;
|
|
769
769
|
if (!i) return null;
|
|
770
770
|
let a = n.indexOf(i);
|
|
771
771
|
return n[a + 1] || null;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
774
|
-
return e.tabIndex < 0 && (/^(audio|video|details)$/.test(e.localName) ||
|
|
773
|
+
function nn(e) {
|
|
774
|
+
return e.tabIndex < 0 && (/^(audio|video|details)$/.test(e.localName) || Et(e)) && !Jt(e) ? 0 : e.tabIndex;
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function rn(e) {
|
|
777
777
|
let { root: t, getInitialEl: n, filter: r, enabled: i = !0 } = e;
|
|
778
778
|
if (!i) return;
|
|
779
779
|
let a = null;
|
|
780
780
|
if (a ||= typeof n == "function" ? n() : n, a ||= t?.querySelector("[data-autofocus],[autofocus]"), !a) {
|
|
781
|
-
let e =
|
|
781
|
+
let e = Qt(t);
|
|
782
782
|
a = r ? e.filter(r)[0] : e[0];
|
|
783
783
|
}
|
|
784
784
|
return a || t || void 0;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function G(e) {
|
|
787
787
|
let t = globalThis.requestAnimationFrame(e);
|
|
788
788
|
return () => {
|
|
789
789
|
globalThis.cancelAnimationFrame(t);
|
|
790
790
|
};
|
|
791
791
|
}
|
|
792
|
-
function
|
|
793
|
-
let t =
|
|
794
|
-
return
|
|
792
|
+
function an(e) {
|
|
793
|
+
let t = jt(e);
|
|
794
|
+
return bt(t) ? V(t).body : B(t) && sn(t) ? t : an(t);
|
|
795
795
|
}
|
|
796
|
-
const
|
|
797
|
-
function
|
|
798
|
-
let t =
|
|
799
|
-
return
|
|
796
|
+
const on = /auto|scroll|overlay|hidden|clip/;
|
|
797
|
+
function sn(e) {
|
|
798
|
+
let t = kt(e), { overflow: n, overflowX: r, overflowY: i, display: a } = t.getComputedStyle(e);
|
|
799
|
+
return on.test(n + i + r) && !["inline", "contents"].includes(a);
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function cn(e, t = {}) {
|
|
802
802
|
let { triggerElement: n, onFocus: r } = t, i = e?.ownerDocument || document, a = i.body;
|
|
803
803
|
function o(t) {
|
|
804
804
|
if (t.key !== "Tab") return;
|
|
805
|
-
let o = null, [s, c] =
|
|
806
|
-
t.shiftKey && (i.activeElement === s || l) ? o = n : !t.shiftKey && i.activeElement === n ? o = s : !t.shiftKey && (i.activeElement === c || l) && (o =
|
|
805
|
+
let o = null, [s, c] = en(e, !0), l = !s && !c;
|
|
806
|
+
t.shiftKey && (i.activeElement === s || l) ? o = n : !t.shiftKey && i.activeElement === n ? o = s : !t.shiftKey && (i.activeElement === c || l) && (o = tn(a, n)), o && (t.preventDefault(), typeof r == "function" ? r(o) : o.focus());
|
|
807
807
|
}
|
|
808
|
-
return
|
|
808
|
+
return U(i, "keydown", o, !0);
|
|
809
809
|
}
|
|
810
|
-
function
|
|
811
|
-
let { defer: n, triggerElement: r,...i } = t, a = n ?
|
|
810
|
+
function ln(e, t) {
|
|
811
|
+
let { defer: n, triggerElement: r,...i } = t, a = n ? G : (e) => e(), o = [];
|
|
812
812
|
return o.push(a(() => {
|
|
813
813
|
let t = typeof e == "function" ? e() : e, n = typeof r == "function" ? r() : r;
|
|
814
|
-
o.push(
|
|
814
|
+
o.push(cn(t, {
|
|
815
815
|
triggerElement: n,
|
|
816
816
|
...i
|
|
817
817
|
}));
|
|
@@ -819,16 +819,16 @@ function pn(e, t) {
|
|
|
819
819
|
o.forEach((e) => e?.());
|
|
820
820
|
};
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function un(e) {
|
|
823
823
|
let t = {
|
|
824
824
|
getRootNode: (e) => e.getRootNode?.() ?? document,
|
|
825
825
|
getDoc: (e) => V(t.getRootNode(e)),
|
|
826
826
|
getWin: (e) => t.getDoc(e).defaultView ?? window,
|
|
827
|
-
getActiveElement: (e) =>
|
|
827
|
+
getActiveElement: (e) => At(t.getRootNode(e)),
|
|
828
828
|
isActiveElement: (e, n) => n === t.getActiveElement(e),
|
|
829
829
|
getById: (e, n) => t.getRootNode(e).getElementById(n),
|
|
830
830
|
setValue: (e, t) => {
|
|
831
|
-
e == null || t == null ||
|
|
831
|
+
e == null || t == null || Kt(e, t.toString());
|
|
832
832
|
}
|
|
833
833
|
};
|
|
834
834
|
return {
|
|
@@ -836,10 +836,10 @@ function mn(e) {
|
|
|
836
836
|
...e
|
|
837
837
|
};
|
|
838
838
|
}
|
|
839
|
-
const
|
|
840
|
-
function
|
|
841
|
-
|
|
842
|
-
let r =
|
|
839
|
+
const dn = /* @__PURE__ */ new WeakMap();
|
|
840
|
+
function fn(e, t, n) {
|
|
841
|
+
dn.has(e) || dn.set(e, /* @__PURE__ */ new Map());
|
|
842
|
+
let r = dn.get(e), i = r.get(t);
|
|
843
843
|
if (!i) return r.set(t, n()), () => {
|
|
844
844
|
r.get(t)?.(), r.delete(t);
|
|
845
845
|
};
|
|
@@ -851,7 +851,7 @@ function gn(e, t, n) {
|
|
|
851
851
|
e && (a(), r.set(t, i));
|
|
852
852
|
};
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function pn(e, t) {
|
|
855
855
|
if (!e) return () => {};
|
|
856
856
|
let n = () => {
|
|
857
857
|
let n = e.style.cssText;
|
|
@@ -859,9 +859,9 @@ function _n(e, t) {
|
|
|
859
859
|
e.style.cssText = n;
|
|
860
860
|
};
|
|
861
861
|
};
|
|
862
|
-
return
|
|
862
|
+
return fn(e, "style", n);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function mn(e, t) {
|
|
865
865
|
let n = e();
|
|
866
866
|
if (B(n) && n.isConnected) return t(n), () => void 0;
|
|
867
867
|
{
|
|
@@ -872,144 +872,144 @@ function vn(e, t) {
|
|
|
872
872
|
return () => clearInterval(n);
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function hn(e, t) {
|
|
876
876
|
let n = [];
|
|
877
877
|
return e?.forEach((e) => {
|
|
878
|
-
let r =
|
|
878
|
+
let r = mn(e, t);
|
|
879
879
|
n.push(r);
|
|
880
880
|
}), () => {
|
|
881
881
|
n.forEach((e) => e());
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function gn(e) {
|
|
885
885
|
for (; e.length > 0;) e.pop();
|
|
886
886
|
return e;
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function _n(e, ...t) {
|
|
889
889
|
let n = typeof e == "function" ? e(...t) : e;
|
|
890
890
|
return n ?? void 0;
|
|
891
891
|
}
|
|
892
|
-
const
|
|
893
|
-
function
|
|
894
|
-
function
|
|
892
|
+
const K = (e) => e;
|
|
893
|
+
function vn() {}
|
|
894
|
+
function yn(...e) {
|
|
895
895
|
return (...t) => {
|
|
896
896
|
e.forEach((e) => {
|
|
897
897
|
e?.(...t);
|
|
898
898
|
});
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
const
|
|
901
|
+
const bn = /* @__PURE__ */ (() => {
|
|
902
902
|
let e = 0;
|
|
903
903
|
return () => (e++, e.toString(36));
|
|
904
|
-
})(),
|
|
905
|
-
function
|
|
904
|
+
})(), xn = (e) => Array.isArray(e), Sn = (e) => typeof e == "object" && !!e, Cn = (e) => Sn(e) && !xn(e), wn = (e) => typeof e == "number" && !Number.isNaN(e), q = (e) => typeof e == "string", Tn = (e) => typeof e == "function", En = (e) => e == null;
|
|
905
|
+
function Dn(e, t) {
|
|
906
906
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
907
907
|
}
|
|
908
|
-
const
|
|
909
|
-
function
|
|
910
|
-
if (!
|
|
908
|
+
const On = (e) => Object.prototype.toString.call(e), kn = Function.prototype.toString, An = kn.call(Object);
|
|
909
|
+
function jn(e) {
|
|
910
|
+
if (!Sn(e) || On(e) !== "[object Object]") return !1;
|
|
911
911
|
let t = Object.getPrototypeOf(e);
|
|
912
912
|
if (t === null) return !0;
|
|
913
|
-
let n =
|
|
914
|
-
return typeof n == "function" && n instanceof n &&
|
|
913
|
+
let n = Dn(t, "constructor") && t.constructor;
|
|
914
|
+
return typeof n == "function" && n instanceof n && kn.call(n) === An;
|
|
915
915
|
}
|
|
916
|
-
const { floor:
|
|
917
|
-
function
|
|
918
|
-
if (!
|
|
916
|
+
const { floor: Mn, abs: Nn, round: Pn, min: Fn, max: In, sign: Ln } = Math;
|
|
917
|
+
function Rn(e) {
|
|
918
|
+
if (!zn(e) || e === void 0) return e;
|
|
919
919
|
let t = Reflect.ownKeys(e).filter((e) => typeof e == "string"), n = {};
|
|
920
920
|
for (let r of t) {
|
|
921
921
|
let t = e[r];
|
|
922
|
-
t !== void 0 && (n[r] =
|
|
922
|
+
t !== void 0 && (n[r] = Rn(t));
|
|
923
923
|
}
|
|
924
924
|
return n;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function zn(e) {
|
|
927
927
|
return e && typeof e == "object" && e.constructor === Object;
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Bn(e, t) {
|
|
930
930
|
let n = {}, r = {}, i = new Set(t);
|
|
931
931
|
for (let t in e) i.has(t) ? r[t] = e[t] : n[t] = e[t];
|
|
932
932
|
return [r, n];
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Vn(e) {
|
|
935
935
|
return function(t) {
|
|
936
|
-
return
|
|
936
|
+
return Bn(t, e);
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
let t = R(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = L(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s =
|
|
939
|
+
function Hn(e) {
|
|
940
|
+
let t = R(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = L(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = O(n) !== a || O(r) !== o;
|
|
941
941
|
return s && (n = a, r = o), {
|
|
942
942
|
width: n,
|
|
943
943
|
height: r,
|
|
944
944
|
$: s
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function Un(e) {
|
|
948
948
|
return I(e) ? e : e.contextElement;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
let t =
|
|
952
|
-
if (!L(t)) return
|
|
953
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } =
|
|
950
|
+
function Wn(e) {
|
|
951
|
+
let t = Un(e);
|
|
952
|
+
if (!L(t)) return k(1);
|
|
953
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Hn(t), o = (a ? O(n.width) : n.width) / r, s = (a ? O(n.height) : n.height) / i;
|
|
954
954
|
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
955
955
|
x: o,
|
|
956
956
|
y: s
|
|
957
957
|
};
|
|
958
958
|
}
|
|
959
|
-
const
|
|
960
|
-
function
|
|
959
|
+
const Gn = /* @__PURE__ */ k(0);
|
|
960
|
+
function Kn(e) {
|
|
961
961
|
let t = P(e);
|
|
962
|
-
return !
|
|
962
|
+
return !at() || !t.visualViewport ? Gn : {
|
|
963
963
|
x: t.visualViewport.offsetLeft,
|
|
964
964
|
y: t.visualViewport.offsetTop
|
|
965
965
|
};
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function qn(e, t, n) {
|
|
968
968
|
return t === void 0 && (t = !1), !n || t && n !== P(e) ? !1 : t;
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function Jn(e, t, n, r) {
|
|
971
971
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
972
|
-
let i = e.getBoundingClientRect(), a =
|
|
973
|
-
t && (r ? I(r) && (o =
|
|
974
|
-
let s =
|
|
972
|
+
let i = e.getBoundingClientRect(), a = Un(e), o = k(1);
|
|
973
|
+
t && (r ? I(r) && (o = Wn(r)) : o = Wn(e));
|
|
974
|
+
let s = qn(a, n, r) ? Kn(a) : k(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
975
975
|
if (a) {
|
|
976
|
-
let e = P(a), t = r && I(r) ? P(r) : r, n = e, i =
|
|
976
|
+
let e = P(a), t = r && I(r) ? P(r) : r, n = e, i = dt(n);
|
|
977
977
|
for (; i && r && t !== n;) {
|
|
978
|
-
let e =
|
|
979
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = P(i), i =
|
|
978
|
+
let e = Wn(i), t = i.getBoundingClientRect(), r = R(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
979
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = P(i), i = dt(n);
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
|
-
return
|
|
982
|
+
return ke({
|
|
983
983
|
width: u,
|
|
984
984
|
height: d,
|
|
985
985
|
x: c,
|
|
986
986
|
y: l
|
|
987
987
|
});
|
|
988
988
|
}
|
|
989
|
-
function
|
|
990
|
-
let n =
|
|
991
|
-
return t ? t.left + n :
|
|
989
|
+
function Yn(e, t) {
|
|
990
|
+
let n = ct(e).scrollLeft;
|
|
991
|
+
return t ? t.left + n : Jn(F(e)).left + n;
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function Xn(e, t, n) {
|
|
994
994
|
n === void 0 && (n = !1);
|
|
995
|
-
let r = e.getBoundingClientRect(), i = r.left + t.scrollLeft - (n ? 0 :
|
|
995
|
+
let r = e.getBoundingClientRect(), i = r.left + t.scrollLeft - (n ? 0 : Yn(e, r)), a = r.top + t.scrollTop;
|
|
996
996
|
return {
|
|
997
997
|
x: i,
|
|
998
998
|
y: a
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1002
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = F(r), s = t ?
|
|
1001
|
+
function Zn(e) {
|
|
1002
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = F(r), s = t ? $e(t.floating) : !1;
|
|
1003
1003
|
if (r === o || s && a) return n;
|
|
1004
1004
|
let c = {
|
|
1005
1005
|
scrollLeft: 0,
|
|
1006
1006
|
scrollTop: 0
|
|
1007
|
-
}, l =
|
|
1008
|
-
if ((d || !d && !a) && ((
|
|
1009
|
-
let e =
|
|
1010
|
-
l =
|
|
1007
|
+
}, l = k(1), u = k(0), d = L(r);
|
|
1008
|
+
if ((d || !d && !a) && ((Ge(r) !== "body" || Ye(o)) && (c = ct(r)), L(r))) {
|
|
1009
|
+
let e = Jn(r);
|
|
1010
|
+
l = Wn(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
1011
1011
|
}
|
|
1012
|
-
let f = o && !d && !a ?
|
|
1012
|
+
let f = o && !d && !a ? Xn(o, c, !0) : k(0);
|
|
1013
1013
|
return {
|
|
1014
1014
|
width: n.width * l.x,
|
|
1015
1015
|
height: n.height * l.y,
|
|
@@ -1017,23 +1017,23 @@ function tr(e) {
|
|
|
1017
1017
|
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function Qn(e) {
|
|
1021
1021
|
return Array.from(e.getClientRects());
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1024
|
-
let t = F(e), n =
|
|
1025
|
-
return R(r).direction === "rtl" && (o +=
|
|
1023
|
+
function $n(e) {
|
|
1024
|
+
let t = F(e), n = ct(e), r = e.ownerDocument.body, i = D(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = D(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Yn(e), s = -n.scrollTop;
|
|
1025
|
+
return R(r).direction === "rtl" && (o += D(t.clientWidth, r.clientWidth) - i), {
|
|
1026
1026
|
width: i,
|
|
1027
1027
|
height: a,
|
|
1028
1028
|
x: o,
|
|
1029
1029
|
y: s
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function er(e, t) {
|
|
1033
1033
|
let n = P(e), r = F(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
1034
1034
|
if (i) {
|
|
1035
1035
|
a = i.width, o = i.height;
|
|
1036
|
-
let e =
|
|
1036
|
+
let e = at();
|
|
1037
1037
|
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
1038
1038
|
}
|
|
1039
1039
|
return {
|
|
@@ -1043,8 +1043,8 @@ function ir(e, t) {
|
|
|
1043
1043
|
y: c
|
|
1044
1044
|
};
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
let n =
|
|
1046
|
+
function tr(e, t) {
|
|
1047
|
+
let n = Jn(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = L(e) ? Wn(e) : k(1), o = e.clientWidth * a.x, s = e.clientHeight * a.y, c = i * a.x, l = r * a.y;
|
|
1048
1048
|
return {
|
|
1049
1049
|
width: o,
|
|
1050
1050
|
height: s,
|
|
@@ -1052,13 +1052,13 @@ function ar(e, t) {
|
|
|
1052
1052
|
y: l
|
|
1053
1053
|
};
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function nr(e, t, n) {
|
|
1056
1056
|
let r;
|
|
1057
|
-
if (t === "viewport") r =
|
|
1058
|
-
else if (t === "document") r =
|
|
1059
|
-
else if (I(t)) r =
|
|
1057
|
+
if (t === "viewport") r = er(e, n);
|
|
1058
|
+
else if (t === "document") r = $n(F(e));
|
|
1059
|
+
else if (I(t)) r = tr(t, n);
|
|
1060
1060
|
else {
|
|
1061
|
-
let n =
|
|
1061
|
+
let n = Kn(e);
|
|
1062
1062
|
r = {
|
|
1063
1063
|
x: t.x - n.x,
|
|
1064
1064
|
y: t.y - n.y,
|
|
@@ -1066,29 +1066,29 @@ function or(e, t, n) {
|
|
|
1066
1066
|
height: t.height
|
|
1067
1067
|
};
|
|
1068
1068
|
}
|
|
1069
|
-
return
|
|
1069
|
+
return ke(r);
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function rr(e, t) {
|
|
1072
1072
|
let n = z(e);
|
|
1073
|
-
return n === t || !I(n) ||
|
|
1073
|
+
return n === t || !I(n) || st(n) ? !1 : R(n).position === "fixed" || rr(n, t);
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function ir(e, t) {
|
|
1076
1076
|
let n = t.get(e);
|
|
1077
1077
|
if (n) return n;
|
|
1078
|
-
let r =
|
|
1079
|
-
for (; I(o) && !
|
|
1080
|
-
let t = R(o), n =
|
|
1078
|
+
let r = ut(e, [], !1).filter((e) => I(e) && Ge(e) !== "body"), i = null, a = R(e).position === "fixed", o = a ? z(e) : e;
|
|
1079
|
+
for (; I(o) && !st(o);) {
|
|
1080
|
+
let t = R(o), n = rt(o);
|
|
1081
1081
|
!n && t.position === "fixed" && (i = null);
|
|
1082
|
-
let s = a ? !n && !i : !n && t.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) ||
|
|
1082
|
+
let s = a ? !n && !i : !n && t.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ye(o) && !n && rr(e, o);
|
|
1083
1083
|
s ? r = r.filter((e) => e !== o) : i = t, o = z(o);
|
|
1084
1084
|
}
|
|
1085
1085
|
return t.set(e, r), r;
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1088
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = n === "clippingAncestors" ?
|
|
1089
|
-
let r =
|
|
1090
|
-
return e.top =
|
|
1091
|
-
},
|
|
1087
|
+
function ar(e) {
|
|
1088
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = n === "clippingAncestors" ? $e(t) ? [] : ir(t, this._c) : [].concat(n), o = [...a, r], s = o[0], c = o.reduce((e, n) => {
|
|
1089
|
+
let r = nr(t, n, i);
|
|
1090
|
+
return e.top = D(r.top, e.top), e.right = E(r.right, e.right), e.bottom = E(r.bottom, e.bottom), e.left = D(r.left, e.left), e;
|
|
1091
|
+
}, nr(t, s, i));
|
|
1092
1092
|
return {
|
|
1093
1093
|
width: c.right - c.left,
|
|
1094
1094
|
height: c.bottom - c.top,
|
|
@@ -1096,27 +1096,27 @@ function lr(e) {
|
|
|
1096
1096
|
y: c.top
|
|
1097
1097
|
};
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1100
|
-
let { width: t, height: n } =
|
|
1099
|
+
function or(e) {
|
|
1100
|
+
let { width: t, height: n } = Hn(e);
|
|
1101
1101
|
return {
|
|
1102
1102
|
width: t,
|
|
1103
1103
|
height: n
|
|
1104
1104
|
};
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1107
|
-
let r = L(t), i = F(t), a = n === "fixed", o =
|
|
1106
|
+
function sr(e, t, n) {
|
|
1107
|
+
let r = L(t), i = F(t), a = n === "fixed", o = Jn(e, !0, a, t), s = {
|
|
1108
1108
|
scrollLeft: 0,
|
|
1109
1109
|
scrollTop: 0
|
|
1110
|
-
}, c =
|
|
1110
|
+
}, c = k(0);
|
|
1111
1111
|
function l() {
|
|
1112
|
-
c.x =
|
|
1112
|
+
c.x = Yn(i);
|
|
1113
1113
|
}
|
|
1114
|
-
if (r || !r && !a) if ((
|
|
1115
|
-
let e =
|
|
1114
|
+
if (r || !r && !a) if ((Ge(t) !== "body" || Ye(i)) && (s = ct(t)), r) {
|
|
1115
|
+
let e = Jn(t, !0, a, t);
|
|
1116
1116
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
1117
1117
|
} else i && l();
|
|
1118
1118
|
a && !r && i && l();
|
|
1119
|
-
let u = i && !r && !a ?
|
|
1119
|
+
let u = i && !r && !a ? Xn(i, s) : k(0), d = o.left + s.scrollLeft - c.x - u.x, f = o.top + s.scrollTop - c.y - u.y;
|
|
1120
1120
|
return {
|
|
1121
1121
|
x: d,
|
|
1122
1122
|
y: f,
|
|
@@ -1124,34 +1124,34 @@ function dr(e, t, n) {
|
|
|
1124
1124
|
height: o.height
|
|
1125
1125
|
};
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function cr(e) {
|
|
1128
1128
|
return R(e).position === "static";
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function lr(e, t) {
|
|
1131
1131
|
if (!L(e) || R(e).position === "fixed") return null;
|
|
1132
1132
|
if (t) return t(e);
|
|
1133
1133
|
let n = e.offsetParent;
|
|
1134
1134
|
return F(e) === n && (n = n.ownerDocument.body), n;
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function ur(e, t) {
|
|
1137
1137
|
let n = P(e);
|
|
1138
|
-
if (
|
|
1138
|
+
if ($e(e)) return n;
|
|
1139
1139
|
if (!L(e)) {
|
|
1140
1140
|
let t = z(e);
|
|
1141
|
-
for (; t && !
|
|
1142
|
-
if (I(t) && !
|
|
1141
|
+
for (; t && !st(t);) {
|
|
1142
|
+
if (I(t) && !cr(t)) return t;
|
|
1143
1143
|
t = z(t);
|
|
1144
1144
|
}
|
|
1145
1145
|
return n;
|
|
1146
1146
|
}
|
|
1147
|
-
let r =
|
|
1148
|
-
for (; r &&
|
|
1149
|
-
return r &&
|
|
1147
|
+
let r = lr(e, t);
|
|
1148
|
+
for (; r && Ze(r) && cr(r);) r = lr(r, t);
|
|
1149
|
+
return r && st(r) && cr(r) && !rt(r) ? n : r || it(e) || n;
|
|
1150
1150
|
}
|
|
1151
|
-
const
|
|
1152
|
-
let t = this.getOffsetParent ||
|
|
1151
|
+
const dr = async function(e) {
|
|
1152
|
+
let t = this.getOffsetParent || ur, n = this.getDimensions, r = await n(e.floating);
|
|
1153
1153
|
return {
|
|
1154
|
-
reference:
|
|
1154
|
+
reference: sr(e.reference, await t(e.floating), e.strategy),
|
|
1155
1155
|
floating: {
|
|
1156
1156
|
x: 0,
|
|
1157
1157
|
y: 0,
|
|
@@ -1160,25 +1160,25 @@ const hr = async function(e) {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
};
|
|
1162
1162
|
};
|
|
1163
|
-
function
|
|
1163
|
+
function fr(e) {
|
|
1164
1164
|
return R(e).direction === "rtl";
|
|
1165
1165
|
}
|
|
1166
|
-
const
|
|
1167
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1166
|
+
const pr = {
|
|
1167
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Zn,
|
|
1168
1168
|
getDocumentElement: F,
|
|
1169
|
-
getClippingRect:
|
|
1170
|
-
getOffsetParent:
|
|
1171
|
-
getElementRects:
|
|
1172
|
-
getClientRects:
|
|
1173
|
-
getDimensions:
|
|
1174
|
-
getScale:
|
|
1169
|
+
getClippingRect: ar,
|
|
1170
|
+
getOffsetParent: ur,
|
|
1171
|
+
getElementRects: dr,
|
|
1172
|
+
getClientRects: Qn,
|
|
1173
|
+
getDimensions: or,
|
|
1174
|
+
getScale: Wn,
|
|
1175
1175
|
isElement: I,
|
|
1176
|
-
isRTL:
|
|
1176
|
+
isRTL: fr
|
|
1177
1177
|
};
|
|
1178
|
-
function
|
|
1178
|
+
function mr(e, t) {
|
|
1179
1179
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function hr(e, t) {
|
|
1182
1182
|
let n = null, r, i = F(e);
|
|
1183
1183
|
function a() {
|
|
1184
1184
|
var e;
|
|
@@ -1188,9 +1188,9 @@ function yr(e, t) {
|
|
|
1188
1188
|
s === void 0 && (s = !1), c === void 0 && (c = 1), a();
|
|
1189
1189
|
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
1190
1190
|
if (s || t(), !f || !p) return;
|
|
1191
|
-
let m =
|
|
1191
|
+
let m = le(d), h = le(i.clientWidth - (u + f)), g = le(i.clientHeight - (d + p)), _ = le(u), v = -m + "px " + -h + "px " + -g + "px " + -_ + "px", y = {
|
|
1192
1192
|
rootMargin: v,
|
|
1193
|
-
threshold:
|
|
1193
|
+
threshold: D(0, E(1, c)) || 1
|
|
1194
1194
|
}, b = !0;
|
|
1195
1195
|
function x(t) {
|
|
1196
1196
|
let n = t[0].intersectionRatio;
|
|
@@ -1200,7 +1200,7 @@ function yr(e, t) {
|
|
|
1200
1200
|
o(!1, 1e-7);
|
|
1201
1201
|
}, 1e3);
|
|
1202
1202
|
}
|
|
1203
|
-
n === 1 && !
|
|
1203
|
+
n === 1 && !mr(l, e.getBoundingClientRect()) && o(), b = !1;
|
|
1204
1204
|
}
|
|
1205
1205
|
try {
|
|
1206
1206
|
n = new IntersectionObserver(x, {
|
|
@@ -1214,13 +1214,13 @@ function yr(e, t) {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
return o(!0), a;
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function gr(e, t, n, r) {
|
|
1218
1218
|
r === void 0 && (r = {});
|
|
1219
|
-
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l =
|
|
1219
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Un(e), u = i || a ? [...l ? ut(l) : [], ...ut(t)] : [];
|
|
1220
1220
|
u.forEach((e) => {
|
|
1221
1221
|
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
1222
1222
|
});
|
|
1223
|
-
let d = l && s ?
|
|
1223
|
+
let d = l && s ? hr(l, n) : null, f = -1, p = null;
|
|
1224
1224
|
o && (p = new ResizeObserver((e) => {
|
|
1225
1225
|
let [r] = e;
|
|
1226
1226
|
r && r.target === l && p && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
@@ -1228,11 +1228,11 @@ function br(e, t, n, r) {
|
|
|
1228
1228
|
(e = p) == null || e.observe(t);
|
|
1229
1229
|
})), n();
|
|
1230
1230
|
}), l && !c && p.observe(l), p.observe(t));
|
|
1231
|
-
let m, h = c ?
|
|
1231
|
+
let m, h = c ? Jn(e) : null;
|
|
1232
1232
|
c && g();
|
|
1233
1233
|
function g() {
|
|
1234
|
-
let t =
|
|
1235
|
-
h && !
|
|
1234
|
+
let t = Jn(e);
|
|
1235
|
+
h && !mr(h, t) && n(), h = t, m = requestAnimationFrame(g);
|
|
1236
1236
|
}
|
|
1237
1237
|
return n(), () => {
|
|
1238
1238
|
var e;
|
|
@@ -1241,20 +1241,20 @@ function br(e, t, n, r) {
|
|
|
1241
1241
|
}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
1242
1242
|
};
|
|
1243
1243
|
}
|
|
1244
|
-
const
|
|
1244
|
+
const _r = Be, vr = Ve, yr = Pe, br = Ue, xr = Le, Sr = Ne, Cr = He, wr = (e, t, n) => {
|
|
1245
1245
|
let r = /* @__PURE__ */ new Map(), i = {
|
|
1246
|
-
platform:
|
|
1246
|
+
platform: pr,
|
|
1247
1247
|
...n
|
|
1248
1248
|
}, a = {
|
|
1249
1249
|
...i.platform,
|
|
1250
1250
|
_c: r
|
|
1251
1251
|
};
|
|
1252
|
-
return
|
|
1252
|
+
return je(e, t, {
|
|
1253
1253
|
...i,
|
|
1254
1254
|
platform: a
|
|
1255
1255
|
});
|
|
1256
1256
|
};
|
|
1257
|
-
function
|
|
1257
|
+
function Tr(e = 0, t = 0, n = 0, r = 0) {
|
|
1258
1258
|
if (typeof DOMRect == "function") return new DOMRect(e, t, n, r);
|
|
1259
1259
|
let i = {
|
|
1260
1260
|
x: e,
|
|
@@ -1271,31 +1271,31 @@ function kr(e = 0, t = 0, n = 0, r = 0) {
|
|
|
1271
1271
|
toJSON: () => i
|
|
1272
1272
|
};
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1275
|
-
if (!e) return
|
|
1274
|
+
function Er(e) {
|
|
1275
|
+
if (!e) return Tr();
|
|
1276
1276
|
let { x: t, y: n, width: r, height: i } = e;
|
|
1277
|
-
return
|
|
1277
|
+
return Tr(t, n, r, i);
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function Dr(e, t) {
|
|
1280
1280
|
return {
|
|
1281
1281
|
contextElement: B(e) ? e : void 0,
|
|
1282
1282
|
getBoundingClientRect: () => {
|
|
1283
1283
|
let n = e, r = t?.(n);
|
|
1284
|
-
return r || !n ?
|
|
1284
|
+
return r || !n ? Er(r) : n.getBoundingClientRect();
|
|
1285
1285
|
}
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
|
-
const
|
|
1288
|
+
const Or = (e) => ({
|
|
1289
1289
|
variable: e,
|
|
1290
1290
|
reference: `var(${e})`
|
|
1291
|
-
}),
|
|
1292
|
-
arrowSize:
|
|
1293
|
-
arrowSizeHalf:
|
|
1294
|
-
arrowBg:
|
|
1295
|
-
transformOrigin:
|
|
1296
|
-
arrowOffset:
|
|
1291
|
+
}), J = {
|
|
1292
|
+
arrowSize: Or("--arrow-size"),
|
|
1293
|
+
arrowSizeHalf: Or("--arrow-size-half"),
|
|
1294
|
+
arrowBg: Or("--arrow-background"),
|
|
1295
|
+
transformOrigin: Or("--transform-origin"),
|
|
1296
|
+
arrowOffset: Or("--arrow-offset")
|
|
1297
1297
|
};
|
|
1298
|
-
function
|
|
1298
|
+
function kr(e) {
|
|
1299
1299
|
return {
|
|
1300
1300
|
top: "bottom center",
|
|
1301
1301
|
"top-start": e ? `${e.x}px bottom` : "left bottom",
|
|
@@ -1311,19 +1311,19 @@ function Nr(e) {
|
|
|
1311
1311
|
"right-end": e ? `left ${e.y}px` : "left bottom"
|
|
1312
1312
|
};
|
|
1313
1313
|
}
|
|
1314
|
-
const
|
|
1314
|
+
const Ar = {
|
|
1315
1315
|
name: "transformOrigin",
|
|
1316
1316
|
fn({ placement: e, elements: t, middlewareData: n }) {
|
|
1317
|
-
let { arrow: r } = n, i =
|
|
1318
|
-
return a.style.setProperty(
|
|
1317
|
+
let { arrow: r } = n, i = kr(r)[e], { floating: a } = t;
|
|
1318
|
+
return a.style.setProperty(J.transformOrigin.variable, i), { data: { transformOrigin: i } };
|
|
1319
1319
|
}
|
|
1320
|
-
},
|
|
1320
|
+
}, jr = {
|
|
1321
1321
|
name: "rects",
|
|
1322
1322
|
fn({ rects: e }) {
|
|
1323
1323
|
return { data: e };
|
|
1324
1324
|
}
|
|
1325
1325
|
};
|
|
1326
|
-
function
|
|
1326
|
+
function Mr(e) {
|
|
1327
1327
|
if (e) return {
|
|
1328
1328
|
name: "shiftArrow",
|
|
1329
1329
|
fn({ placement: t, middlewareData: n }) {
|
|
@@ -1332,12 +1332,12 @@ function Ir(e) {
|
|
|
1332
1332
|
return Object.assign(e.style, {
|
|
1333
1333
|
left: r == null ? "" : `${r}px`,
|
|
1334
1334
|
top: i == null ? "" : `${i}px`,
|
|
1335
|
-
[a]: `calc(100% + ${
|
|
1335
|
+
[a]: `calc(100% + ${J.arrowOffset.reference})`
|
|
1336
1336
|
}), {};
|
|
1337
1337
|
}
|
|
1338
1338
|
};
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function Nr(e) {
|
|
1341
1341
|
let [t, n] = e.split("-");
|
|
1342
1342
|
return {
|
|
1343
1343
|
side: t,
|
|
@@ -1345,7 +1345,7 @@ function Lr(e) {
|
|
|
1345
1345
|
hasAlign: n != null
|
|
1346
1346
|
};
|
|
1347
1347
|
}
|
|
1348
|
-
const
|
|
1348
|
+
const Pr = {
|
|
1349
1349
|
strategy: "absolute",
|
|
1350
1350
|
placement: "bottom",
|
|
1351
1351
|
listeners: !0,
|
|
@@ -1358,47 +1358,47 @@ const Rr = {
|
|
|
1358
1358
|
overflowPadding: 8,
|
|
1359
1359
|
arrowPadding: 4
|
|
1360
1360
|
};
|
|
1361
|
-
function
|
|
1361
|
+
function Fr(e, t) {
|
|
1362
1362
|
let n = e.devicePixelRatio || 1;
|
|
1363
1363
|
return Math.round(t * n) / n;
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1366
|
-
return
|
|
1365
|
+
function Ir(e) {
|
|
1366
|
+
return _n(e.boundary);
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1369
|
-
if (e) return
|
|
1368
|
+
function Lr(e, t) {
|
|
1369
|
+
if (e) return Sr({
|
|
1370
1370
|
element: e,
|
|
1371
1371
|
padding: t.arrowPadding
|
|
1372
1372
|
});
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1375
|
-
if (!
|
|
1376
|
-
let r = (e?.clientHeight || 0) / 2, i = t.offset?.mainAxis ?? t.gutter, a = typeof i == "number" ? i + r : i ?? r, { hasAlign: o } =
|
|
1377
|
-
return
|
|
1374
|
+
function Rr(e, t) {
|
|
1375
|
+
if (!En(t.offset ?? t.gutter)) return _r(({ placement: n }) => {
|
|
1376
|
+
let r = (e?.clientHeight || 0) / 2, i = t.offset?.mainAxis ?? t.gutter, a = typeof i == "number" ? i + r : i ?? r, { hasAlign: o } = Nr(n), s = o ? void 0 : t.shift, c = t.offset?.crossAxis ?? s;
|
|
1377
|
+
return Rn({
|
|
1378
1378
|
crossAxis: c,
|
|
1379
1379
|
mainAxis: a,
|
|
1380
1380
|
alignmentAxis: t.shift
|
|
1381
1381
|
});
|
|
1382
1382
|
});
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
if (e.flip) return
|
|
1386
|
-
boundary:
|
|
1384
|
+
function zr(e) {
|
|
1385
|
+
if (e.flip) return yr({
|
|
1386
|
+
boundary: Ir(e),
|
|
1387
1387
|
padding: e.overflowPadding,
|
|
1388
1388
|
fallbackPlacements: e.flip === !0 ? void 0 : e.flip
|
|
1389
1389
|
});
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1392
|
-
if (!(!e.slide && !e.overlap)) return
|
|
1393
|
-
boundary:
|
|
1391
|
+
function Br(e) {
|
|
1392
|
+
if (!(!e.slide && !e.overlap)) return vr({
|
|
1393
|
+
boundary: Ir(e),
|
|
1394
1394
|
mainAxis: e.slide,
|
|
1395
1395
|
crossAxis: e.overlap,
|
|
1396
1396
|
padding: e.overflowPadding,
|
|
1397
|
-
limiter:
|
|
1397
|
+
limiter: Cr()
|
|
1398
1398
|
});
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1401
|
-
return
|
|
1400
|
+
function Vr(e) {
|
|
1401
|
+
return br({
|
|
1402
1402
|
padding: e.overflowPadding,
|
|
1403
1403
|
apply({ elements: e, rects: t, availableHeight: n, availableWidth: r }) {
|
|
1404
1404
|
let i = e.floating, a = Math.round(t.reference.width);
|
|
@@ -1406,13 +1406,13 @@ function Gr(e) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
});
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1410
|
-
if (e.hideWhenDetached) return
|
|
1409
|
+
function Hr(e) {
|
|
1410
|
+
if (e.hideWhenDetached) return xr({
|
|
1411
1411
|
strategy: "referenceHidden",
|
|
1412
1412
|
boundary: e.boundary?.() ?? "clippingAncestors"
|
|
1413
1413
|
});
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function Ur(e) {
|
|
1416
1416
|
return e ? e === !0 ? {
|
|
1417
1417
|
ancestorResize: !0,
|
|
1418
1418
|
ancestorScroll: !0,
|
|
@@ -1420,72 +1420,72 @@ function qr(e) {
|
|
|
1420
1420
|
layoutShift: !0
|
|
1421
1421
|
} : e : {};
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1424
|
-
let r =
|
|
1423
|
+
function Wr(e, t, n = {}) {
|
|
1424
|
+
let r = Dr(e, n.getAnchorRect);
|
|
1425
1425
|
if (!t || !r) return;
|
|
1426
|
-
let i = Object.assign({},
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1426
|
+
let i = Object.assign({}, Pr, n), a = t.querySelector("[data-part=arrow]"), o = [
|
|
1427
|
+
Rr(a, i),
|
|
1428
|
+
zr(i),
|
|
1429
|
+
Br(i),
|
|
1430
|
+
Lr(a, i),
|
|
1431
|
+
Mr(a),
|
|
1432
|
+
Ar,
|
|
1433
|
+
Vr(i),
|
|
1434
|
+
Hr(i),
|
|
1435
|
+
jr
|
|
1436
1436
|
], { placement: s, strategy: c, onComplete: l, onPositioned: u } = i, d = async () => {
|
|
1437
1437
|
if (!r || !t) return;
|
|
1438
|
-
let e = await
|
|
1438
|
+
let e = await wr(r, t, {
|
|
1439
1439
|
placement: s,
|
|
1440
1440
|
middleware: o,
|
|
1441
1441
|
strategy: c
|
|
1442
1442
|
});
|
|
1443
1443
|
l?.(e), u?.({ placed: !0 });
|
|
1444
|
-
let n =
|
|
1444
|
+
let n = kt(t), a = Fr(n, e.x), d = Fr(n, e.y);
|
|
1445
1445
|
if (t.style.setProperty("--x", `${a}px`), t.style.setProperty("--y", `${d}px`), i.hideWhenDetached) {
|
|
1446
1446
|
let n = e.middlewareData.hide?.referenceHidden;
|
|
1447
1447
|
n ? (t.style.setProperty("visibility", "hidden"), t.style.setProperty("pointer-events", "none")) : (t.style.removeProperty("visibility"), t.style.removeProperty("pointer-events"));
|
|
1448
1448
|
}
|
|
1449
1449
|
let f = t.firstElementChild;
|
|
1450
1450
|
if (f) {
|
|
1451
|
-
let e =
|
|
1451
|
+
let e = Nt(f);
|
|
1452
1452
|
t.style.setProperty("--z-index", e.zIndex);
|
|
1453
1453
|
}
|
|
1454
1454
|
}, f = async () => {
|
|
1455
1455
|
n.updatePosition ? (await n.updatePosition({ updatePosition: d }), u?.({ placed: !0 })) : await d();
|
|
1456
|
-
}, p =
|
|
1456
|
+
}, p = Ur(i.listeners), m = i.listeners ? gr(r, t, f, p) : vn;
|
|
1457
1457
|
return f(), () => {
|
|
1458
1458
|
m?.(), u?.({ placed: !1 });
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1462
|
-
let { defer: r,...i } = n, a = r ?
|
|
1461
|
+
function Gr(e, t, n = {}) {
|
|
1462
|
+
let { defer: r,...i } = n, a = r ? G : (e) => e(), o = [];
|
|
1463
1463
|
return o.push(a(() => {
|
|
1464
1464
|
let n = typeof e == "function" ? e() : e, r = typeof t == "function" ? t() : t;
|
|
1465
|
-
o.push(
|
|
1465
|
+
o.push(Wr(n, r, i));
|
|
1466
1466
|
})), () => {
|
|
1467
1467
|
o.forEach((e) => e?.());
|
|
1468
1468
|
};
|
|
1469
1469
|
}
|
|
1470
|
-
const
|
|
1470
|
+
const Kr = {
|
|
1471
1471
|
bottom: "rotate(45deg)",
|
|
1472
1472
|
left: "rotate(135deg)",
|
|
1473
1473
|
top: "rotate(225deg)",
|
|
1474
1474
|
right: "rotate(315deg)"
|
|
1475
1475
|
};
|
|
1476
|
-
function
|
|
1476
|
+
function qr(e = {}) {
|
|
1477
1477
|
let { placement: t, sameWidth: n, fitViewport: r, strategy: i = "absolute" } = e;
|
|
1478
1478
|
return {
|
|
1479
1479
|
arrow: {
|
|
1480
1480
|
position: "absolute",
|
|
1481
|
-
width:
|
|
1482
|
-
height:
|
|
1483
|
-
[
|
|
1484
|
-
[
|
|
1481
|
+
width: J.arrowSize.reference,
|
|
1482
|
+
height: J.arrowSize.reference,
|
|
1483
|
+
[J.arrowSizeHalf.variable]: `calc(${J.arrowSize.reference} / 2)`,
|
|
1484
|
+
[J.arrowOffset.variable]: `calc(${J.arrowSizeHalf.reference} * -1)`
|
|
1485
1485
|
},
|
|
1486
1486
|
arrowTip: {
|
|
1487
|
-
transform: t ?
|
|
1488
|
-
background:
|
|
1487
|
+
transform: t ? Kr[t.split("-")[0]] : void 0,
|
|
1488
|
+
background: J.arrowBg.reference,
|
|
1489
1489
|
top: "0",
|
|
1490
1490
|
left: "0",
|
|
1491
1491
|
width: "100%",
|
|
@@ -1507,24 +1507,24 @@ function Zr(e = {}) {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
};
|
|
1509
1509
|
}
|
|
1510
|
-
let
|
|
1511
|
-
function
|
|
1512
|
-
return e && (e.host ||
|
|
1510
|
+
let Jr = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Xr = {}, Zr = 0;
|
|
1511
|
+
function Qr(e) {
|
|
1512
|
+
return e && (e.host || Qr(e.parentNode));
|
|
1513
1513
|
}
|
|
1514
|
-
function
|
|
1514
|
+
function $r(e, t) {
|
|
1515
1515
|
return t.map((t) => {
|
|
1516
1516
|
if (e.contains(t)) return t;
|
|
1517
|
-
let n =
|
|
1517
|
+
let n = Qr(t);
|
|
1518
1518
|
return n && e.contains(n) ? n : (console.error("[@destyler/aria-hidden] target", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
1519
1519
|
}).filter((e) => !!e);
|
|
1520
1520
|
}
|
|
1521
|
-
function
|
|
1521
|
+
function ei(e) {
|
|
1522
1522
|
return e.localName === "next-route-announcer" || e.localName === "script" || e.hasAttribute("aria-live") ? !0 : e.matches("[data-live-announcer]");
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1525
|
-
let { parentNode: n, markerName: r, controlAttribute: i, explicitBooleanValue: a } = t, o =
|
|
1526
|
-
|
|
1527
|
-
let s =
|
|
1524
|
+
function ti(e, t) {
|
|
1525
|
+
let { parentNode: n, markerName: r, controlAttribute: i, explicitBooleanValue: a } = t, o = $r(n, Array.isArray(e) ? e : [e]);
|
|
1526
|
+
Xr[r] ||= /* @__PURE__ */ new WeakMap();
|
|
1527
|
+
let s = Xr[r], c = [], l = /* @__PURE__ */ new Set(), u = new Set(o), d = (e) => {
|
|
1528
1528
|
!e || l.has(e) || (l.add(e), d(e.parentNode));
|
|
1529
1529
|
};
|
|
1530
1530
|
o.forEach(d);
|
|
@@ -1532,47 +1532,47 @@ function ai(e, t) {
|
|
|
1532
1532
|
!e || u.has(e) || Array.prototype.forEach.call(e.children, (e) => {
|
|
1533
1533
|
if (l.has(e)) f(e);
|
|
1534
1534
|
else try {
|
|
1535
|
-
if (
|
|
1536
|
-
let t = e.getAttribute(i), n = a ? t === "true" : t !== null && t !== "false", o = (
|
|
1537
|
-
|
|
1535
|
+
if (ei(e)) return;
|
|
1536
|
+
let t = e.getAttribute(i), n = a ? t === "true" : t !== null && t !== "false", o = (Jr.get(e) || 0) + 1, l = (s.get(e) || 0) + 1;
|
|
1537
|
+
Jr.set(e, o), s.set(e, l), c.push(e), o === 1 && n && Yr.set(e, !0), l === 1 && e.setAttribute(r, ""), n || e.setAttribute(i, a ? "true" : "");
|
|
1538
1538
|
} catch (t) {
|
|
1539
1539
|
console.error("[@destyler/aria-hidden] cannot operate on ", e, t);
|
|
1540
1540
|
}
|
|
1541
1541
|
});
|
|
1542
1542
|
};
|
|
1543
|
-
return f(n), l.clear(),
|
|
1543
|
+
return f(n), l.clear(), Zr++, () => {
|
|
1544
1544
|
c.forEach((e) => {
|
|
1545
|
-
let t =
|
|
1546
|
-
|
|
1547
|
-
}),
|
|
1545
|
+
let t = Jr.get(e) - 1, n = s.get(e) - 1;
|
|
1546
|
+
Jr.set(e, t), s.set(e, n), t || (Yr.has(e) || e.removeAttribute(i), Yr.delete(e)), n || e.removeAttribute(r);
|
|
1547
|
+
}), Zr--, Zr || (Jr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Xr = {});
|
|
1548
1548
|
};
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function ni(e) {
|
|
1551
1551
|
let t = Array.isArray(e) ? e[0] : e;
|
|
1552
1552
|
return t.ownerDocument.body;
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1555
|
-
if (t) return
|
|
1554
|
+
function ri(e, t = ni(e), n = "data-aria-hidden") {
|
|
1555
|
+
if (t) return ti(e, {
|
|
1556
1556
|
parentNode: t,
|
|
1557
1557
|
markerName: n,
|
|
1558
1558
|
controlAttribute: "aria-hidden",
|
|
1559
1559
|
explicitBooleanValue: !0
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function ii(e) {
|
|
1563
1563
|
let t = requestAnimationFrame(() => e());
|
|
1564
1564
|
return () => cancelAnimationFrame(t);
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1567
|
-
let { defer: n = !0 } = t, r = n ?
|
|
1566
|
+
function ai(e, t = {}) {
|
|
1567
|
+
let { defer: n = !0 } = t, r = n ? ii : (e) => e(), i = [];
|
|
1568
1568
|
return i.push(r(() => {
|
|
1569
1569
|
let t = typeof e == "function" ? e() : e, n = t.filter(Boolean);
|
|
1570
|
-
n.length !== 0 && i.push(
|
|
1570
|
+
n.length !== 0 && i.push(ri(n));
|
|
1571
1571
|
})), () => {
|
|
1572
1572
|
i.forEach((e) => e?.());
|
|
1573
1573
|
};
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function oi(e) {
|
|
1576
1576
|
let t = {
|
|
1577
1577
|
each(t) {
|
|
1578
1578
|
for (let n = 0; n < e.frames?.length; n += 1) {
|
|
@@ -1601,7 +1601,7 @@ function ui(e) {
|
|
|
1601
1601
|
};
|
|
1602
1602
|
return t;
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function si(e) {
|
|
1605
1605
|
let t = e.frameElement == null ? null : e.parent;
|
|
1606
1606
|
return {
|
|
1607
1607
|
addEventListener: (e, n, r) => {
|
|
@@ -1621,22 +1621,22 @@ function di(e) {
|
|
|
1621
1621
|
}
|
|
1622
1622
|
};
|
|
1623
1623
|
}
|
|
1624
|
-
const
|
|
1625
|
-
function
|
|
1626
|
-
for (let t of e) if (B(t) &&
|
|
1624
|
+
const ci = "pointerdown.outside", li = "focus.outside";
|
|
1625
|
+
function ui(e) {
|
|
1626
|
+
for (let t of e) if (B(t) && W(t)) return !0;
|
|
1627
1627
|
return !1;
|
|
1628
1628
|
}
|
|
1629
|
-
const
|
|
1630
|
-
function
|
|
1631
|
-
if (!
|
|
1629
|
+
const di = (e) => "clientY" in e;
|
|
1630
|
+
function fi(e, t) {
|
|
1631
|
+
if (!di(t) || !e) return !1;
|
|
1632
1632
|
let n = e.getBoundingClientRect();
|
|
1633
1633
|
return n.width === 0 || n.height === 0 ? !1 : n.top <= t.clientY && t.clientY <= n.top + n.height && n.left <= t.clientX && t.clientX <= n.left + n.width;
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function pi(e, t) {
|
|
1636
1636
|
return e.y <= t.y && t.y <= e.y + e.height && e.x <= t.x && t.x <= e.x + e.width;
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1639
|
-
if (!t || !
|
|
1638
|
+
function mi(e, t) {
|
|
1639
|
+
if (!t || !di(e)) return !1;
|
|
1640
1640
|
let n = t.scrollHeight > t.clientHeight, r = n && e.clientX > t.offsetLeft + t.clientWidth, i = t.scrollWidth > t.clientWidth, a = i && e.clientY > t.offsetTop + t.clientHeight, o = {
|
|
1641
1641
|
x: t.offsetLeft,
|
|
1642
1642
|
y: t.offsetTop,
|
|
@@ -1646,94 +1646,94 @@ function vi(e, t) {
|
|
|
1646
1646
|
x: e.clientX,
|
|
1647
1647
|
y: e.clientY
|
|
1648
1648
|
};
|
|
1649
|
-
return
|
|
1649
|
+
return pi(o, s) ? r || a : !1;
|
|
1650
1650
|
}
|
|
1651
|
-
function
|
|
1651
|
+
function hi(e, t) {
|
|
1652
1652
|
let { exclude: n, onFocusOutside: r, onPointerDownOutside: i, onInteractOutside: a, defer: o } = t;
|
|
1653
1653
|
if (!e) return;
|
|
1654
|
-
let s = V(e), c =
|
|
1654
|
+
let s = V(e), c = kt(e), l = oi(c), u = si(c);
|
|
1655
1655
|
function d(t) {
|
|
1656
|
-
let r =
|
|
1657
|
-
if (!B(r) || !r.isConnected ||
|
|
1656
|
+
let r = H(t);
|
|
1657
|
+
if (!B(r) || !r.isConnected || Dt(e, r) || fi(e, t)) return !1;
|
|
1658
1658
|
let i = s.querySelector(`[aria-controls="${e.id}"]`);
|
|
1659
1659
|
if (i) {
|
|
1660
|
-
let e =
|
|
1661
|
-
if (
|
|
1660
|
+
let e = an(i);
|
|
1661
|
+
if (mi(t, e)) return !1;
|
|
1662
1662
|
}
|
|
1663
|
-
let a =
|
|
1664
|
-
return
|
|
1663
|
+
let a = an(e);
|
|
1664
|
+
return mi(t, a) ? !1 : !n?.(r);
|
|
1665
1665
|
}
|
|
1666
1666
|
let f = /* @__PURE__ */ new Set();
|
|
1667
1667
|
function p(t) {
|
|
1668
1668
|
function n() {
|
|
1669
|
-
let n = o ?
|
|
1669
|
+
let n = o ? G : (e) => e(), r = t.composedPath?.() ?? [t.target];
|
|
1670
1670
|
n(() => {
|
|
1671
1671
|
if (!(!e || !d(t))) {
|
|
1672
1672
|
if (i || a) {
|
|
1673
|
-
let t =
|
|
1674
|
-
e.addEventListener(
|
|
1673
|
+
let t = yn(i, a);
|
|
1674
|
+
e.addEventListener(ci, t, { once: !0 });
|
|
1675
1675
|
}
|
|
1676
|
-
|
|
1676
|
+
_i(e, ci, {
|
|
1677
1677
|
bubbles: !1,
|
|
1678
1678
|
cancelable: !0,
|
|
1679
1679
|
detail: {
|
|
1680
1680
|
originalEvent: t,
|
|
1681
|
-
contextmenu:
|
|
1682
|
-
focusable:
|
|
1681
|
+
contextmenu: Ut(t),
|
|
1682
|
+
focusable: ui(r)
|
|
1683
1683
|
}
|
|
1684
1684
|
});
|
|
1685
1685
|
}
|
|
1686
1686
|
});
|
|
1687
1687
|
}
|
|
1688
|
-
t.pointerType === "touch" ? (f.forEach((e) => e()), f.add(
|
|
1688
|
+
t.pointerType === "touch" ? (f.forEach((e) => e()), f.add(U(s, "click", n, { once: !0 })), f.add(u.addEventListener("click", n, { once: !0 })), f.add(l.addEventListener("click", n, { once: !0 }))) : n();
|
|
1689
1689
|
}
|
|
1690
1690
|
let m = /* @__PURE__ */ new Set(), h = setTimeout(() => {
|
|
1691
|
-
m.add(
|
|
1691
|
+
m.add(U(s, "pointerdown", p, !0)), m.add(u.addEventListener("pointerdown", p, !0)), m.add(l.addEventListener("pointerdown", p, !0));
|
|
1692
1692
|
}, 0);
|
|
1693
1693
|
function g(t) {
|
|
1694
|
-
let n = o ?
|
|
1694
|
+
let n = o ? G : (e) => e();
|
|
1695
1695
|
n(() => {
|
|
1696
1696
|
if (!(!e || !d(t))) {
|
|
1697
1697
|
if (r || a) {
|
|
1698
|
-
let t =
|
|
1699
|
-
e.addEventListener(
|
|
1698
|
+
let t = yn(r, a);
|
|
1699
|
+
e.addEventListener(li, t, { once: !0 });
|
|
1700
1700
|
}
|
|
1701
|
-
|
|
1701
|
+
_i(e, li, {
|
|
1702
1702
|
bubbles: !1,
|
|
1703
1703
|
cancelable: !0,
|
|
1704
1704
|
detail: {
|
|
1705
1705
|
originalEvent: t,
|
|
1706
1706
|
contextmenu: !1,
|
|
1707
|
-
focusable:
|
|
1707
|
+
focusable: W(H(t))
|
|
1708
1708
|
}
|
|
1709
1709
|
});
|
|
1710
1710
|
}
|
|
1711
1711
|
});
|
|
1712
1712
|
}
|
|
1713
|
-
return m.add(
|
|
1713
|
+
return m.add(U(s, "focusin", g, !0)), m.add(u.addEventListener("focusin", g, !0)), m.add(l.addEventListener("focusin", g, !0)), () => {
|
|
1714
1714
|
clearTimeout(h), f.forEach((e) => e()), m.forEach((e) => e());
|
|
1715
1715
|
};
|
|
1716
1716
|
}
|
|
1717
|
-
function
|
|
1718
|
-
let { defer: n } = t, r = n ?
|
|
1717
|
+
function gi(e, t) {
|
|
1718
|
+
let { defer: n } = t, r = n ? G : (e) => e(), i = [];
|
|
1719
1719
|
return i.push(r(() => {
|
|
1720
1720
|
let n = typeof e == "function" ? e() : e;
|
|
1721
|
-
i.push(
|
|
1721
|
+
i.push(hi(n, t));
|
|
1722
1722
|
})), () => {
|
|
1723
1723
|
i.forEach((e) => e?.());
|
|
1724
1724
|
};
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function _i(e, t, n) {
|
|
1727
1727
|
let r = e.ownerDocument.defaultView || window, i = new r.CustomEvent(t, n);
|
|
1728
1728
|
return e.dispatchEvent(i);
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1730
|
+
function vi(e, t) {
|
|
1731
1731
|
let n = (e) => {
|
|
1732
1732
|
e.key === "Escape" && (e.isComposing || t?.(e));
|
|
1733
1733
|
};
|
|
1734
|
-
return
|
|
1734
|
+
return U(V(e), "keydown", n, { capture: !0 });
|
|
1735
1735
|
}
|
|
1736
|
-
const
|
|
1736
|
+
const Y = {
|
|
1737
1737
|
layers: [],
|
|
1738
1738
|
branches: [],
|
|
1739
1739
|
count() {
|
|
@@ -1760,10 +1760,10 @@ const q = {
|
|
|
1760
1760
|
return Array.from(this.layers).slice(this.indexOf(e) + 1);
|
|
1761
1761
|
},
|
|
1762
1762
|
isInNestedLayer(e, t) {
|
|
1763
|
-
return this.getNestedLayers(e).some((e) =>
|
|
1763
|
+
return this.getNestedLayers(e).some((e) => Dt(e.node, t));
|
|
1764
1764
|
},
|
|
1765
1765
|
isInBranch(e) {
|
|
1766
|
-
return Array.from(this.branches).some((t) =>
|
|
1766
|
+
return Array.from(this.branches).some((t) => Dt(t, e));
|
|
1767
1767
|
},
|
|
1768
1768
|
add(e) {
|
|
1769
1769
|
let t = this.layers.push(e);
|
|
@@ -1796,59 +1796,59 @@ const q = {
|
|
|
1796
1796
|
this.remove(this.layers[0].node);
|
|
1797
1797
|
}
|
|
1798
1798
|
};
|
|
1799
|
-
let
|
|
1800
|
-
function
|
|
1801
|
-
|
|
1802
|
-
e.style.pointerEvents =
|
|
1799
|
+
let yi;
|
|
1800
|
+
function bi() {
|
|
1801
|
+
Y.layers.forEach(({ node: e }) => {
|
|
1802
|
+
e.style.pointerEvents = Y.isBelowPointerBlockingLayer(e) ? "none" : "auto";
|
|
1803
1803
|
});
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1805
|
+
function xi(e) {
|
|
1806
1806
|
e.style.pointerEvents = "";
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function Si(e, t) {
|
|
1809
1809
|
let n = V(e), r = [];
|
|
1810
|
-
if (
|
|
1810
|
+
if (Y.hasPointerBlockingLayer() && !n.body.hasAttribute("data-inert") && (yi = document.body.style.pointerEvents, queueMicrotask(() => {
|
|
1811
1811
|
n.body.style.pointerEvents = "none", n.body.setAttribute("data-inert", "");
|
|
1812
1812
|
})), t) {
|
|
1813
|
-
let e =
|
|
1814
|
-
r.push(
|
|
1813
|
+
let e = hn(t, (e) => {
|
|
1814
|
+
r.push(pn(e, { pointerEvents: "auto" }));
|
|
1815
1815
|
});
|
|
1816
1816
|
r.push(e);
|
|
1817
1817
|
}
|
|
1818
1818
|
return () => {
|
|
1819
|
-
|
|
1820
|
-
n.body.style.pointerEvents =
|
|
1819
|
+
Y.hasPointerBlockingLayer() || (queueMicrotask(() => {
|
|
1820
|
+
n.body.style.pointerEvents = yi, n.body.removeAttribute("data-inert"), n.body.style.length === 0 && n.body.removeAttribute("style");
|
|
1821
1821
|
}), r.forEach((e) => e()));
|
|
1822
1822
|
};
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1824
|
+
function Ci(e, t) {
|
|
1825
1825
|
if (!e) throw Error("[@destyler/dismissable] node is `null` or `undefined`");
|
|
1826
1826
|
let { onDismiss: n, pointerBlocking: r, exclude: i, debug: a } = t, o = {
|
|
1827
1827
|
dismiss: n,
|
|
1828
1828
|
node: e,
|
|
1829
1829
|
pointerBlocking: r
|
|
1830
1830
|
};
|
|
1831
|
-
|
|
1831
|
+
Y.add(o), bi();
|
|
1832
1832
|
function s(r) {
|
|
1833
|
-
let i =
|
|
1834
|
-
|
|
1833
|
+
let i = H(r.detail.originalEvent);
|
|
1834
|
+
Y.isBelowPointerBlockingLayer(e) || Y.isInBranch(i) || (t.onPointerDownOutside?.(r), t.onInteractOutside?.(r), !r.defaultPrevented && (a && console.log("onPointerDownOutside:", r.detail.originalEvent), n?.()));
|
|
1835
1835
|
}
|
|
1836
1836
|
function c(e) {
|
|
1837
|
-
let r =
|
|
1838
|
-
|
|
1837
|
+
let r = H(e.detail.originalEvent);
|
|
1838
|
+
Y.isInBranch(r) || (t.onFocusOutside?.(e), t.onInteractOutside?.(e), !e.defaultPrevented && (a && console.log("onFocusOutside:", e.detail.originalEvent), n?.()));
|
|
1839
1839
|
}
|
|
1840
1840
|
function l(r) {
|
|
1841
|
-
|
|
1841
|
+
Y.isTopMost(e) && (t.onEscapeKeyDown?.(r), !r.defaultPrevented && n && (r.preventDefault(), n()));
|
|
1842
1842
|
}
|
|
1843
1843
|
function u(n) {
|
|
1844
1844
|
if (!e) return !1;
|
|
1845
1845
|
let r = typeof i == "function" ? i() : i, a = Array.isArray(r) ? r : [r], o = t.persistentElements?.map((e) => e()).filter(B);
|
|
1846
|
-
return o && a.push(...o), a.some((e) =>
|
|
1846
|
+
return o && a.push(...o), a.some((e) => Dt(e, n)) || Y.isInNestedLayer(e, n);
|
|
1847
1847
|
}
|
|
1848
1848
|
let d = [
|
|
1849
|
-
r ?
|
|
1850
|
-
|
|
1851
|
-
|
|
1849
|
+
r ? Si(e, t.persistentElements) : void 0,
|
|
1850
|
+
vi(e, l),
|
|
1851
|
+
gi(e, {
|
|
1852
1852
|
exclude: u,
|
|
1853
1853
|
onFocusOutside: c,
|
|
1854
1854
|
onPointerDownOutside: s,
|
|
@@ -1856,23 +1856,23 @@ function Di(e, t) {
|
|
|
1856
1856
|
})
|
|
1857
1857
|
];
|
|
1858
1858
|
return () => {
|
|
1859
|
-
|
|
1859
|
+
Y.remove(e), bi(), xi(e), d.forEach((e) => e?.());
|
|
1860
1860
|
};
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1863
|
-
let { defer: n } = t, r = n ?
|
|
1862
|
+
function wi(e, t) {
|
|
1863
|
+
let { defer: n } = t, r = n ? G : (e) => e(), i = [];
|
|
1864
1864
|
return i.push(r(() => {
|
|
1865
|
-
let n =
|
|
1866
|
-
i.push(
|
|
1865
|
+
let n = Tn(e) ? e() : e;
|
|
1866
|
+
i.push(Ci(n, t));
|
|
1867
1867
|
})), () => {
|
|
1868
1868
|
i.forEach((e) => e?.());
|
|
1869
1869
|
};
|
|
1870
1870
|
}
|
|
1871
|
-
const
|
|
1872
|
-
function
|
|
1871
|
+
const Ti = (e) => e.key === "Tab", Ei = (e, ...t) => typeof e == "function" ? e(...t) : e, Di = (e) => !e.isComposing && e.key === "Escape", Oi = (e) => setTimeout(e, 0);
|
|
1872
|
+
function ki(e) {
|
|
1873
1873
|
return e.localName === "input" && "select" in e && typeof e.select == "function";
|
|
1874
1874
|
}
|
|
1875
|
-
const
|
|
1875
|
+
const Ai = {
|
|
1876
1876
|
activateTrap(e, t) {
|
|
1877
1877
|
if (e.length > 0) {
|
|
1878
1878
|
let n = e[e.length - 1];
|
|
@@ -1885,8 +1885,8 @@ const Pi = {
|
|
|
1885
1885
|
let n = e.indexOf(t);
|
|
1886
1886
|
n !== -1 && e.splice(n, 1), e.length > 0 && e[e.length - 1].unpause();
|
|
1887
1887
|
}
|
|
1888
|
-
},
|
|
1889
|
-
var
|
|
1888
|
+
}, ji = [];
|
|
1889
|
+
var Mi = class {
|
|
1890
1890
|
trapStack;
|
|
1891
1891
|
config;
|
|
1892
1892
|
doc;
|
|
@@ -1908,16 +1908,16 @@ var Ii = class {
|
|
|
1908
1908
|
return this.state.paused;
|
|
1909
1909
|
}
|
|
1910
1910
|
constructor(e, t) {
|
|
1911
|
-
this.trapStack = t.trapStack ||
|
|
1911
|
+
this.trapStack = t.trapStack || ji;
|
|
1912
1912
|
let n = {
|
|
1913
1913
|
returnFocusOnDeactivate: !0,
|
|
1914
1914
|
escapeDeactivates: !0,
|
|
1915
1915
|
delayInitialFocus: !0,
|
|
1916
1916
|
isKeyForward(e) {
|
|
1917
|
-
return
|
|
1917
|
+
return Ti(e) && !e.shiftKey;
|
|
1918
1918
|
},
|
|
1919
1919
|
isKeyBackward(e) {
|
|
1920
|
-
return
|
|
1920
|
+
return Ti(e) && e.shiftKey;
|
|
1921
1921
|
},
|
|
1922
1922
|
...t
|
|
1923
1923
|
};
|
|
@@ -1929,10 +1929,10 @@ var Ii = class {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
updateTabbableNodes() {
|
|
1931
1931
|
if (this.state.containerGroups = this.state.containers.map((e) => {
|
|
1932
|
-
let t =
|
|
1932
|
+
let t = Qt(e), n = Zt(e), r = t.length > 0 ? t[0] : void 0, i = t.length > 0 ? t[t.length - 1] : void 0, a = n.find((e) => $t(e)), o = n.slice().reverse().find((e) => $t(e)), s = !!t.find((e) => nn(e) > 0);
|
|
1933
1933
|
function c(e, r = !0) {
|
|
1934
1934
|
let i = t.indexOf(e);
|
|
1935
|
-
return i < 0 ? r ? n.slice(n.indexOf(e) + 1).find((e) =>
|
|
1935
|
+
return i < 0 ? r ? n.slice(n.indexOf(e) + 1).find((e) => $t(e)) : n.slice(0, n.indexOf(e)).reverse().find((e) => $t(e)) : t[i + (r ? 1 : -1)];
|
|
1936
1936
|
}
|
|
1937
1937
|
return {
|
|
1938
1938
|
container: e,
|
|
@@ -1950,38 +1950,38 @@ var Ii = class {
|
|
|
1950
1950
|
}
|
|
1951
1951
|
listenerCleanups = [];
|
|
1952
1952
|
addListeners() {
|
|
1953
|
-
if (this.state.active) return
|
|
1953
|
+
if (this.state.active) return Ai.activateTrap(this.trapStack, this), this.state.delayInitialFocusTimer = this.config.delayInitialFocus ? Oi(() => {
|
|
1954
1954
|
this.tryFocus(this.getInitialFocusNode());
|
|
1955
|
-
}) : this.tryFocus(this.getInitialFocusNode()), this.listenerCleanups.push(
|
|
1955
|
+
}) : this.tryFocus(this.getInitialFocusNode()), this.listenerCleanups.push(U(this.doc, "focusin", this.handleFocus, !0), U(this.doc, "mousedown", this.handlePointerDown, {
|
|
1956
1956
|
capture: !0,
|
|
1957
1957
|
passive: !1
|
|
1958
|
-
}),
|
|
1958
|
+
}), U(this.doc, "touchstart", this.handlePointerDown, {
|
|
1959
1959
|
capture: !0,
|
|
1960
1960
|
passive: !1
|
|
1961
|
-
}),
|
|
1961
|
+
}), U(this.doc, "click", this.handleClick, {
|
|
1962
1962
|
capture: !0,
|
|
1963
1963
|
passive: !1
|
|
1964
|
-
}),
|
|
1964
|
+
}), U(this.doc, "keydown", this.handleTabKey, {
|
|
1965
1965
|
capture: !0,
|
|
1966
1966
|
passive: !1
|
|
1967
|
-
}),
|
|
1967
|
+
}), U(this.doc, "keydown", this.handleEscapeKey)), this;
|
|
1968
1968
|
}
|
|
1969
1969
|
removeListeners() {
|
|
1970
1970
|
if (this.state.active) return this.listenerCleanups.forEach((e) => e()), this.listenerCleanups = [], this;
|
|
1971
1971
|
}
|
|
1972
1972
|
handleFocus = (e) => {
|
|
1973
|
-
let t =
|
|
1974
|
-
if (n ||
|
|
1973
|
+
let t = H(e), n = this.findContainerIndex(t, e) >= 0;
|
|
1974
|
+
if (n || _t(t)) n && (this.state.mostRecentlyFocusedNode = t);
|
|
1975
1975
|
else {
|
|
1976
1976
|
e.stopImmediatePropagation();
|
|
1977
1977
|
let t, n = !0;
|
|
1978
|
-
if (this.state.mostRecentlyFocusedNode) if (
|
|
1978
|
+
if (this.state.mostRecentlyFocusedNode) if (nn(this.state.mostRecentlyFocusedNode) > 0) {
|
|
1979
1979
|
let e = this.findContainerIndex(this.state.mostRecentlyFocusedNode), { tabbableNodes: r } = this.state.containerGroups[e];
|
|
1980
1980
|
if (r.length > 0) {
|
|
1981
1981
|
let e = r.findIndex((e) => e === this.state.mostRecentlyFocusedNode);
|
|
1982
1982
|
e >= 0 && (this.config.isKeyForward(this.state.recentNavEvent) ? e + 1 < r.length && (t = r[e + 1], n = !1) : e - 1 >= 0 && (t = r[e - 1], n = !1));
|
|
1983
1983
|
}
|
|
1984
|
-
} else this.state.containerGroups.some((e) => e.tabbableNodes.some((e) =>
|
|
1984
|
+
} else this.state.containerGroups.some((e) => e.tabbableNodes.some((e) => nn(e) > 0)) || (n = !1);
|
|
1985
1985
|
else n = !1;
|
|
1986
1986
|
n && (t = this.findNextNavNode({
|
|
1987
1987
|
target: this.state.mostRecentlyFocusedNode,
|
|
@@ -1991,18 +1991,18 @@ var Ii = class {
|
|
|
1991
1991
|
this.state.recentNavEvent = void 0;
|
|
1992
1992
|
};
|
|
1993
1993
|
handlePointerDown = (e) => {
|
|
1994
|
-
let t =
|
|
1994
|
+
let t = H(e);
|
|
1995
1995
|
if (!(this.findContainerIndex(t, e) >= 0)) {
|
|
1996
|
-
if (
|
|
1996
|
+
if (Ei(this.config.clickOutsideDeactivates, e)) {
|
|
1997
1997
|
this.deactivate({ returnFocus: this.config.returnFocusOnDeactivate });
|
|
1998
1998
|
return;
|
|
1999
1999
|
}
|
|
2000
|
-
|
|
2000
|
+
Ei(this.config.allowOutsideClick, e) || e.preventDefault();
|
|
2001
2001
|
}
|
|
2002
2002
|
};
|
|
2003
2003
|
handleClick = (e) => {
|
|
2004
|
-
let t =
|
|
2005
|
-
this.findContainerIndex(t, e) >= 0 ||
|
|
2004
|
+
let t = H(e);
|
|
2005
|
+
this.findContainerIndex(t, e) >= 0 || Ei(this.config.clickOutsideDeactivates, e) || Ei(this.config.allowOutsideClick, e) || (e.preventDefault(), e.stopImmediatePropagation());
|
|
2006
2006
|
};
|
|
2007
2007
|
handleTabKey = (e) => {
|
|
2008
2008
|
if (this.config.isKeyForward(e) || this.config.isKeyBackward(e)) {
|
|
@@ -2012,11 +2012,11 @@ var Ii = class {
|
|
|
2012
2012
|
isBackward: t
|
|
2013
2013
|
});
|
|
2014
2014
|
if (!n) return;
|
|
2015
|
-
|
|
2015
|
+
Ti(e) && e.preventDefault(), this.tryFocus(n);
|
|
2016
2016
|
}
|
|
2017
2017
|
};
|
|
2018
2018
|
handleEscapeKey = (e) => {
|
|
2019
|
-
|
|
2019
|
+
Di(e) && Ei(this.config.escapeDeactivates, e) !== !1 && (e.preventDefault(), this.deactivate());
|
|
2020
2020
|
};
|
|
2021
2021
|
_mutationObserver;
|
|
2022
2022
|
setupMutationObserver = () => {
|
|
@@ -2040,7 +2040,7 @@ var Ii = class {
|
|
|
2040
2040
|
getInitialFocusNode = () => {
|
|
2041
2041
|
let e = this.getNodeForOption("initialFocus", { hasFallback: !0 });
|
|
2042
2042
|
if (e === !1) return !1;
|
|
2043
|
-
if (e === void 0 || e && !
|
|
2043
|
+
if (e === void 0 || e && !W(e)) if (this.findContainerIndex(this.doc.activeElement) >= 0) e = this.doc.activeElement;
|
|
2044
2044
|
else {
|
|
2045
2045
|
let t = this.state.tabbableGroups[0], n = t && t.firstTabbableNode;
|
|
2046
2046
|
e = n || this.getNodeForOption("fallbackFocus");
|
|
@@ -2050,12 +2050,12 @@ var Ii = class {
|
|
|
2050
2050
|
return e.isConnected || (e = this.getNodeForOption("fallbackFocus")), e;
|
|
2051
2051
|
};
|
|
2052
2052
|
tryFocus = (e) => {
|
|
2053
|
-
if (e !== !1 && e !==
|
|
2053
|
+
if (e !== !1 && e !== At(this.doc)) {
|
|
2054
2054
|
if (!e || !e.focus) {
|
|
2055
2055
|
this.tryFocus(this.getInitialFocusNode());
|
|
2056
2056
|
return;
|
|
2057
2057
|
}
|
|
2058
|
-
e.focus({ preventScroll: !!this.config.preventScroll }), this.state.mostRecentlyFocusedNode = e,
|
|
2058
|
+
e.focus({ preventScroll: !!this.config.preventScroll }), this.state.mostRecentlyFocusedNode = e, ki(e) && e.select();
|
|
2059
2059
|
}
|
|
2060
2060
|
};
|
|
2061
2061
|
activate(e) {
|
|
@@ -2075,11 +2075,11 @@ var Ii = class {
|
|
|
2075
2075
|
checkCanReturnFocus: this.config.checkCanReturnFocus,
|
|
2076
2076
|
...e
|
|
2077
2077
|
};
|
|
2078
|
-
clearTimeout(this.state.delayInitialFocusTimer), this.state.delayInitialFocusTimer = void 0, this.removeListeners(), this.state.active = !1, this.state.paused = !1, this.updateObservedNodes(),
|
|
2078
|
+
clearTimeout(this.state.delayInitialFocusTimer), this.state.delayInitialFocusTimer = void 0, this.removeListeners(), this.state.active = !1, this.state.paused = !1, this.updateObservedNodes(), Ai.deactivateTrap(this.trapStack, this);
|
|
2079
2079
|
let n = this.getOption(t, "onDeactivate"), r = this.getOption(t, "onPostDeactivate"), i = this.getOption(t, "checkCanReturnFocus"), a = this.getOption(t, "returnFocus", "returnFocusOnDeactivate");
|
|
2080
2080
|
n?.();
|
|
2081
2081
|
let o = () => {
|
|
2082
|
-
|
|
2082
|
+
Oi(() => {
|
|
2083
2083
|
if (a) {
|
|
2084
2084
|
let e = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
|
|
2085
2085
|
this.tryFocus(e);
|
|
@@ -2127,7 +2127,7 @@ var Ii = class {
|
|
|
2127
2127
|
return i;
|
|
2128
2128
|
};
|
|
2129
2129
|
findNextNavNode = (e) => {
|
|
2130
|
-
let { event: t, isBackward: n = !1 } = e, r = e.target ||
|
|
2130
|
+
let { event: t, isBackward: n = !1 } = e, r = e.target || H(t);
|
|
2131
2131
|
this.updateTabbableNodes();
|
|
2132
2132
|
let i = null;
|
|
2133
2133
|
if (this.state.tabbableGroups.length > 0) {
|
|
@@ -2135,26 +2135,26 @@ var Ii = class {
|
|
|
2135
2135
|
if (e < 0) i = n ? this.state.tabbableGroups[this.state.tabbableGroups.length - 1].lastTabbableNode : this.state.tabbableGroups[0].firstTabbableNode;
|
|
2136
2136
|
else if (n) {
|
|
2137
2137
|
let n = this.state.tabbableGroups.findIndex(({ firstTabbableNode: e }) => r === e);
|
|
2138
|
-
if (n < 0 && (a?.container === r ||
|
|
2138
|
+
if (n < 0 && (a?.container === r || W(r) && !$t(r) && !a?.nextTabbableNode(r, !1)) && (n = e), n >= 0) {
|
|
2139
2139
|
let e = n === 0 ? this.state.tabbableGroups.length - 1 : n - 1, t = this.state.tabbableGroups[e];
|
|
2140
|
-
i =
|
|
2141
|
-
} else
|
|
2140
|
+
i = nn(r) >= 0 ? t.lastTabbableNode : t.lastDomTabbableNode;
|
|
2141
|
+
} else Ti(t) || (i = a?.nextTabbableNode(r, !1));
|
|
2142
2142
|
} else {
|
|
2143
2143
|
let n = this.state.tabbableGroups.findIndex(({ lastTabbableNode: e }) => r === e);
|
|
2144
|
-
if (n < 0 && (a?.container === r ||
|
|
2144
|
+
if (n < 0 && (a?.container === r || W(r) && !$t(r) && !a?.nextTabbableNode(r)) && (n = e), n >= 0) {
|
|
2145
2145
|
let e = n === this.state.tabbableGroups.length - 1 ? 0 : n + 1, t = this.state.tabbableGroups[e];
|
|
2146
|
-
i =
|
|
2147
|
-
} else
|
|
2146
|
+
i = nn(r) >= 0 ? t.firstTabbableNode : t.firstDomTabbableNode;
|
|
2147
|
+
} else Ti(t) || (i = a?.nextTabbableNode(r));
|
|
2148
2148
|
}
|
|
2149
2149
|
} else i = this.getNodeForOption("fallbackFocus");
|
|
2150
2150
|
return i;
|
|
2151
2151
|
};
|
|
2152
2152
|
};
|
|
2153
|
-
function
|
|
2154
|
-
let n, r =
|
|
2153
|
+
function Ni(e, t = {}) {
|
|
2154
|
+
let n, r = G(() => {
|
|
2155
2155
|
let r = typeof e == "function" ? e() : e;
|
|
2156
2156
|
if (r) {
|
|
2157
|
-
n = new
|
|
2157
|
+
n = new Mi(r, {
|
|
2158
2158
|
escapeDeactivates: !1,
|
|
2159
2159
|
allowOutsideClick: !0,
|
|
2160
2160
|
preventScroll: !0,
|
|
@@ -2173,34 +2173,34 @@ function Li(e, t = {}) {
|
|
|
2173
2173
|
n?.deactivate(), r();
|
|
2174
2174
|
};
|
|
2175
2175
|
}
|
|
2176
|
-
const
|
|
2177
|
-
function
|
|
2176
|
+
const Pi = "data-scroll-lock";
|
|
2177
|
+
function Fi(e, t) {
|
|
2178
2178
|
if (!e) return;
|
|
2179
2179
|
let n = Object.keys(t).reduce((t, n) => (t[n] = e.style.getPropertyValue(n), t), {});
|
|
2180
2180
|
return Object.assign(e.style, t), () => {
|
|
2181
2181
|
Object.assign(e.style, n);
|
|
2182
2182
|
};
|
|
2183
2183
|
}
|
|
2184
|
-
function
|
|
2184
|
+
function Ii(e, t, n) {
|
|
2185
2185
|
if (!e) return;
|
|
2186
2186
|
let r = e.style.getPropertyValue(t);
|
|
2187
2187
|
return e.style.setProperty(t, n), () => {
|
|
2188
2188
|
r ? e.style.setProperty(t, r) : e.style.removeProperty(t);
|
|
2189
2189
|
};
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2191
|
+
function Li(e) {
|
|
2192
2192
|
let t = e.getBoundingClientRect().left, n = Math.round(t) + e.scrollLeft;
|
|
2193
2193
|
return n ? "paddingLeft" : "paddingRight";
|
|
2194
2194
|
}
|
|
2195
|
-
function
|
|
2196
|
-
let t = e ?? document, n = t.defaultView ?? window, { documentElement: r, body: i } = t, a = i.hasAttribute(
|
|
2195
|
+
function Ri(e) {
|
|
2196
|
+
let t = e ?? document, n = t.defaultView ?? window, { documentElement: r, body: i } = t, a = i.hasAttribute(Pi);
|
|
2197
2197
|
if (a) return;
|
|
2198
|
-
i.setAttribute(
|
|
2199
|
-
let o = n.innerWidth - r.clientWidth, s = () =>
|
|
2198
|
+
i.setAttribute(Pi, "");
|
|
2199
|
+
let o = n.innerWidth - r.clientWidth, s = () => Ii(r, "--scrollbar-width", `${o}px`), c = Li(r), l = () => Fi(i, {
|
|
2200
2200
|
overflow: "hidden",
|
|
2201
2201
|
[c]: `${o}px`
|
|
2202
2202
|
}), u = () => {
|
|
2203
|
-
let { scrollX: e, scrollY: t, visualViewport: r } = n, a = r?.offsetLeft ?? 0, s = r?.offsetTop ?? 0, l =
|
|
2203
|
+
let { scrollX: e, scrollY: t, visualViewport: r } = n, a = r?.offsetLeft ?? 0, s = r?.offsetTop ?? 0, l = Fi(i, {
|
|
2204
2204
|
position: "fixed",
|
|
2205
2205
|
overflow: "hidden",
|
|
2206
2206
|
top: `${-(t - Math.floor(s))}px`,
|
|
@@ -2215,58 +2215,58 @@ function Hi(e) {
|
|
|
2215
2215
|
behavior: "instant"
|
|
2216
2216
|
});
|
|
2217
2217
|
};
|
|
2218
|
-
}, d = [s(),
|
|
2218
|
+
}, d = [s(), Vt() ? u() : l()];
|
|
2219
2219
|
return () => {
|
|
2220
|
-
d.forEach((e) => e?.()), i.removeAttribute(
|
|
2220
|
+
d.forEach((e) => e?.()), i.removeAttribute(Pi);
|
|
2221
2221
|
};
|
|
2222
2222
|
}
|
|
2223
2223
|
Symbol();
|
|
2224
|
-
const
|
|
2225
|
-
|
|
2224
|
+
const zi = Symbol(), Bi = Object.getPrototypeOf, Vi = /* @__PURE__ */ new WeakMap(), Hi = (e) => e && (Vi.has(e) ? Vi.get(e) : Bi(e) === Object.prototype || Bi(e) === Array.prototype), Ui = (e) => Hi(e) && e[zi] || null, Wi = (e, t = !0) => {
|
|
2225
|
+
Vi.set(e, t);
|
|
2226
2226
|
};
|
|
2227
|
-
function
|
|
2227
|
+
function Gi() {
|
|
2228
2228
|
if (typeof globalThis < "u" || typeof globalThis < "u") return globalThis;
|
|
2229
2229
|
if (typeof window < "u") return window;
|
|
2230
2230
|
}
|
|
2231
|
-
function
|
|
2232
|
-
let n =
|
|
2231
|
+
function Ki(e, t) {
|
|
2232
|
+
let n = Gi();
|
|
2233
2233
|
return n ? (n[e] ||= t(), n[e]) : t();
|
|
2234
2234
|
}
|
|
2235
|
-
const
|
|
2236
|
-
function
|
|
2235
|
+
const qi = Ki("__destyler__refSet", () => /* @__PURE__ */ new WeakSet()), Ji = (e) => typeof e == "object" && !!e && "$$typeof" in e && "props" in e, Yi = (e) => typeof e == "object" && !!e && "__v_isVNode" in e;
|
|
2236
|
+
function Xi(e) {
|
|
2237
2237
|
return typeof e == "object" && !!e && "nodeType" in e && typeof e.nodeName == "string";
|
|
2238
2238
|
}
|
|
2239
|
-
const
|
|
2240
|
-
function
|
|
2241
|
-
return
|
|
2239
|
+
const Zi = (e) => Ji(e) || Yi(e) || Xi(e), Qi = (e) => typeof e == "object" && !!e;
|
|
2240
|
+
function $i(e) {
|
|
2241
|
+
return Qi(e) && !qi.has(e) && (Array.isArray(e) || !(Symbol.iterator in e)) && !Zi(e) && !(e instanceof WeakMap) && !(e instanceof WeakSet) && !(e instanceof Error) && typeof e != "number" && !(e instanceof Date) && typeof e != "string" && !(e instanceof RegExp) && !(e instanceof ArrayBuffer) && !(e instanceof Promise);
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2244
|
-
typeof n.value == "object" &&
|
|
2243
|
+
function ea(e, t, n) {
|
|
2244
|
+
typeof n.value == "object" && !$i(n.value) && (n.value = ta(n.value)), !n.enumerable || n.get || n.set || !n.configurable || !n.writable || t === "__proto__" ? Object.defineProperty(e, t, n) : e[t] = n.value;
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2246
|
+
function ta(e) {
|
|
2247
2247
|
if (typeof e != "object") return e;
|
|
2248
2248
|
let t = 0, n, r, i, a = Object.prototype.toString.call(e);
|
|
2249
2249
|
if (a === "[object Object]" ? i = Object.create(Object.getPrototypeOf(e) || null) : a === "[object Array]" ? i = Array.from({ length: e.length }) : a === "[object Set]" ? (i = /* @__PURE__ */ new Set(), e.forEach((e) => {
|
|
2250
|
-
i.add(
|
|
2250
|
+
i.add(ta(e));
|
|
2251
2251
|
})) : a === "[object Map]" ? (i = /* @__PURE__ */ new Map(), e.forEach((e, t) => {
|
|
2252
|
-
i.set(
|
|
2253
|
-
})) : a === "[object Date]" ? i = /* @__PURE__ */ new Date(+e) : a === "[object RegExp]" ? i = new RegExp(e.source, e.flags) : a === "[object DataView]" ? i = new e.constructor(
|
|
2254
|
-
for (r = Object.getOwnPropertySymbols(e); t < r.length; t++)
|
|
2255
|
-
for (t = 0, r = Object.getOwnPropertyNames(e); t < r.length; t++) Object.hasOwnProperty.call(i, n = r[t]) && i[n] === e[n] ||
|
|
2252
|
+
i.set(ta(t), ta(e));
|
|
2253
|
+
})) : a === "[object Date]" ? i = /* @__PURE__ */ new Date(+e) : a === "[object RegExp]" ? i = new RegExp(e.source, e.flags) : a === "[object DataView]" ? i = new e.constructor(ta(e.buffer)) : a === "[object ArrayBuffer]" ? i = e.slice(0) : a === "[object Blob]" ? i = e.slice() : a.slice(-6) === "Array]" && (i = new e.constructor(e)), i) {
|
|
2254
|
+
for (r = Object.getOwnPropertySymbols(e); t < r.length; t++) ea(i, r[t], Object.getOwnPropertyDescriptor(e, r[t]));
|
|
2255
|
+
for (t = 0, r = Object.getOwnPropertyNames(e); t < r.length; t++) Object.hasOwnProperty.call(i, n = r[t]) && i[n] === e[n] || ea(i, n, Object.getOwnPropertyDescriptor(e, n));
|
|
2256
2256
|
}
|
|
2257
2257
|
return i || e;
|
|
2258
2258
|
}
|
|
2259
|
-
const
|
|
2260
|
-
function
|
|
2259
|
+
const na = Ki("__destyler__proxyStateMap", () => /* @__PURE__ */ new WeakMap());
|
|
2260
|
+
function ra(e = Object.is, t = (e, t) => new Proxy(e, t), n = /* @__PURE__ */ new WeakMap(), r = (e, t) => {
|
|
2261
2261
|
let r = n.get(e);
|
|
2262
2262
|
if (r?.[0] === t) return r[1];
|
|
2263
2263
|
let i = Array.isArray(e) ? [] : Object.create(Object.getPrototypeOf(e));
|
|
2264
|
-
return
|
|
2264
|
+
return Wi(i, !0), n.set(e, [t, i]), Reflect.ownKeys(e).forEach((t) => {
|
|
2265
2265
|
let n = Reflect.get(e, t);
|
|
2266
|
-
|
|
2266
|
+
qi.has(n) ? (Wi(n, !1), i[t] = n) : na.has(n) ? i[t] = sa(n) : i[t] = n;
|
|
2267
2267
|
}), Object.freeze(i);
|
|
2268
2268
|
}, i = /* @__PURE__ */ new WeakMap(), a = [1, 1], o = (n) => {
|
|
2269
|
-
if (!
|
|
2269
|
+
if (!Qi(n)) throw Error("object required");
|
|
2270
2270
|
let o = i.get(n);
|
|
2271
2271
|
if (o) return o;
|
|
2272
2272
|
let s = a[0], c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), u = (e, t = ++a[0]) => {
|
|
@@ -2310,11 +2310,11 @@ function sa(e = Object.is, t = (e, t) => new Proxy(e, t), n = /* @__PURE__ */ ne
|
|
|
2310
2310
|
set(t, n, r, a) {
|
|
2311
2311
|
let o = Reflect.has(t, n), s = Reflect.get(t, n, a);
|
|
2312
2312
|
if (o && (e(s, r) || i.has(r) && e(s, i.get(r)))) return !0;
|
|
2313
|
-
h(n),
|
|
2313
|
+
h(n), Qi(r) && (r = Ui(r) || r);
|
|
2314
2314
|
let c = r;
|
|
2315
2315
|
if (!Object.getOwnPropertyDescriptor(t, n)?.set) {
|
|
2316
|
-
!
|
|
2317
|
-
let e = !
|
|
2316
|
+
!na.has(r) && $i(r) && (c = aa(r));
|
|
2317
|
+
let e = !qi.has(c) && na.get(c);
|
|
2318
2318
|
e && m(n, e);
|
|
2319
2319
|
}
|
|
2320
2320
|
return Reflect.set(t, n, c, a), u([
|
|
@@ -2332,30 +2332,30 @@ function sa(e = Object.is, t = (e, t) => new Proxy(e, t), n = /* @__PURE__ */ ne
|
|
|
2332
2332
|
r,
|
|
2333
2333
|
g
|
|
2334
2334
|
];
|
|
2335
|
-
return
|
|
2335
|
+
return na.set(y, b), Reflect.ownKeys(n).forEach((e) => {
|
|
2336
2336
|
let t = Object.getOwnPropertyDescriptor(n, e);
|
|
2337
2337
|
t.get || t.set ? Object.defineProperty(_, e, t) : y[e] = n[e];
|
|
2338
2338
|
}), y;
|
|
2339
2339
|
}) {
|
|
2340
2340
|
return [
|
|
2341
2341
|
o,
|
|
2342
|
-
|
|
2343
|
-
|
|
2342
|
+
na,
|
|
2343
|
+
qi,
|
|
2344
2344
|
e,
|
|
2345
2345
|
t,
|
|
2346
|
-
|
|
2346
|
+
$i,
|
|
2347
2347
|
n,
|
|
2348
2348
|
r,
|
|
2349
2349
|
i,
|
|
2350
2350
|
a
|
|
2351
2351
|
];
|
|
2352
2352
|
}
|
|
2353
|
-
const [
|
|
2354
|
-
function
|
|
2355
|
-
return
|
|
2353
|
+
const [ia] = ra();
|
|
2354
|
+
function aa(e = {}) {
|
|
2355
|
+
return ia(e);
|
|
2356
2356
|
}
|
|
2357
|
-
function
|
|
2358
|
-
let r =
|
|
2357
|
+
function oa(e, t, n) {
|
|
2358
|
+
let r = na.get(e), i = [], a = r[3], o = !1, s = (e) => {
|
|
2359
2359
|
if (i.push(e), n) {
|
|
2360
2360
|
t(i.splice(0));
|
|
2361
2361
|
return;
|
|
@@ -2368,75 +2368,75 @@ function ua(e, t, n) {
|
|
|
2368
2368
|
o = !1, c();
|
|
2369
2369
|
};
|
|
2370
2370
|
}
|
|
2371
|
-
function
|
|
2372
|
-
let t =
|
|
2371
|
+
function sa(e) {
|
|
2372
|
+
let t = na.get(e), [n, r, i] = t;
|
|
2373
2373
|
return i(n, r());
|
|
2374
2374
|
}
|
|
2375
|
-
function
|
|
2376
|
-
return
|
|
2375
|
+
function ca(e) {
|
|
2376
|
+
return qi.add(e), e;
|
|
2377
2377
|
}
|
|
2378
|
-
function
|
|
2378
|
+
function la(e, t) {
|
|
2379
2379
|
let n = Object.keys(t);
|
|
2380
2380
|
n.forEach((t) => {
|
|
2381
2381
|
if (Object.getOwnPropertyDescriptor(e, t)) throw Error("object property already defined");
|
|
2382
2382
|
});
|
|
2383
|
-
let r =
|
|
2383
|
+
let r = aa(e);
|
|
2384
2384
|
return n.forEach((e) => {
|
|
2385
2385
|
let n = t[e], { get: i, set: a } = typeof n == "function" ? { get: n } : n, o = {};
|
|
2386
|
-
o.get = () => i(
|
|
2386
|
+
o.get = () => i(sa(r)), a && (o.set = (e) => a(r, e)), Object.defineProperty(r, e, o);
|
|
2387
2387
|
}), r;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2390
|
-
if (!
|
|
2389
|
+
function ua(e, ...t) {
|
|
2390
|
+
if (!jn(e)) throw TypeError("Source argument must be a plain object");
|
|
2391
2391
|
let n = e;
|
|
2392
2392
|
for (let e of t) {
|
|
2393
|
-
if (!
|
|
2394
|
-
let t =
|
|
2393
|
+
if (!jn(e)) continue;
|
|
2394
|
+
let t = Rn(e);
|
|
2395
2395
|
for (let r in t) {
|
|
2396
2396
|
if (!Object.prototype.hasOwnProperty.call(t, r) || r === "__proto__" || r === "constructor" || r === "prototype") continue;
|
|
2397
2397
|
let i = n[r], a = e[r];
|
|
2398
|
-
|
|
2398
|
+
jn(a) ? n[r] = jn(i) ? ua(i, a) : { ...a } : n[r] = a;
|
|
2399
2399
|
}
|
|
2400
2400
|
}
|
|
2401
2401
|
return n;
|
|
2402
2402
|
}
|
|
2403
|
-
function
|
|
2404
|
-
let t =
|
|
2403
|
+
function X(e) {
|
|
2404
|
+
let t = q(e) ? { type: e } : e;
|
|
2405
2405
|
return t;
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2408
|
-
return e ?
|
|
2407
|
+
function da(e) {
|
|
2408
|
+
return e ? xn(e) ? e.slice() : [e] : [];
|
|
2409
2409
|
}
|
|
2410
|
-
function
|
|
2411
|
-
return
|
|
2410
|
+
function fa(e) {
|
|
2411
|
+
return Cn(e) && e.predicate != null;
|
|
2412
2412
|
}
|
|
2413
|
-
const
|
|
2414
|
-
function
|
|
2415
|
-
return e ??=
|
|
2416
|
-
if (
|
|
2413
|
+
const pa = () => !0;
|
|
2414
|
+
function ma(e, t) {
|
|
2415
|
+
return e ??= pa, (n, r, i) => {
|
|
2416
|
+
if (q(e)) {
|
|
2417
2417
|
let a = t[e];
|
|
2418
|
-
return
|
|
2418
|
+
return Tn(a) ? a(n, r, i) : a;
|
|
2419
2419
|
}
|
|
2420
|
-
return
|
|
2420
|
+
return fa(e) ? e.predicate(t)(n, r, i) : e?.(n, r, i);
|
|
2421
2421
|
};
|
|
2422
2422
|
}
|
|
2423
|
-
function
|
|
2424
|
-
return (n, r, i) =>
|
|
2423
|
+
function ha(e, t) {
|
|
2424
|
+
return (n, r, i) => fa(e) ? e.predicate(t)(n, r, i) : e;
|
|
2425
2425
|
}
|
|
2426
|
-
let
|
|
2426
|
+
let ga = /* @__PURE__ */ function(e) {
|
|
2427
2427
|
return e.NotStarted = "Not Started", e.Running = "Running", e.Stopped = "Stopped", e;
|
|
2428
2428
|
}({}), Z = /* @__PURE__ */ function(e) {
|
|
2429
2429
|
return e.Start = "machine.start", e.Stop = "machine.stop", e.Created = "machine.created", e.Init = "machine.init", e;
|
|
2430
|
-
}({}),
|
|
2430
|
+
}({}), _a = /* @__PURE__ */ function(e) {
|
|
2431
2431
|
return e.Machine = "machine", e.Actor = "machine.actor", e;
|
|
2432
2432
|
}({});
|
|
2433
|
-
function
|
|
2434
|
-
let t = e.computed ??
|
|
2433
|
+
function va(e) {
|
|
2434
|
+
let t = e.computed ?? K({}), n = e.context ?? K({}), r = e.initial ? e.states?.[e.initial]?.tags : [], i = aa({
|
|
2435
2435
|
value: e.initial ?? "",
|
|
2436
2436
|
previousValue: "",
|
|
2437
|
-
event:
|
|
2438
|
-
previousEvent:
|
|
2439
|
-
context:
|
|
2437
|
+
event: K({}),
|
|
2438
|
+
previousEvent: K({}),
|
|
2439
|
+
context: la(n, t),
|
|
2440
2440
|
done: !1,
|
|
2441
2441
|
tags: r ?? [],
|
|
2442
2442
|
hasTag(e) {
|
|
@@ -2446,7 +2446,7 @@ function ba(e) {
|
|
|
2446
2446
|
return e.includes(this.value);
|
|
2447
2447
|
},
|
|
2448
2448
|
can(e) {
|
|
2449
|
-
return
|
|
2449
|
+
return K(this).nextEvents.includes(e);
|
|
2450
2450
|
},
|
|
2451
2451
|
get nextEvents() {
|
|
2452
2452
|
let t = e.states?.[this.value]?.on ?? {}, n = e?.on ?? {};
|
|
@@ -2459,45 +2459,45 @@ function ba(e) {
|
|
|
2459
2459
|
return this.event.value === Z.Init || !this.previousValue ? !1 : this.value !== this.previousValue;
|
|
2460
2460
|
}
|
|
2461
2461
|
});
|
|
2462
|
-
return
|
|
2462
|
+
return K(i);
|
|
2463
2463
|
}
|
|
2464
|
-
function
|
|
2464
|
+
function ya(e, t) {
|
|
2465
2465
|
return (n, r) => {
|
|
2466
|
-
if (
|
|
2467
|
-
if (
|
|
2468
|
-
if (
|
|
2466
|
+
if (wn(e)) return e;
|
|
2467
|
+
if (Tn(e)) return e(n, r);
|
|
2468
|
+
if (q(e)) {
|
|
2469
2469
|
let i = Number.parseFloat(e);
|
|
2470
2470
|
if (!Number.isNaN(i)) return i;
|
|
2471
2471
|
if (t) {
|
|
2472
2472
|
let i = t?.[e];
|
|
2473
2473
|
if (i === null) throw Error(`[@destyler/xstate > determine-delay] Cannot determine delay for \`${e}\`. It is set to null in \`options.delays\``);
|
|
2474
|
-
return
|
|
2474
|
+
return Tn(i) ? i(n, r) : i;
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
2477
|
};
|
|
2478
2478
|
}
|
|
2479
|
-
function
|
|
2480
|
-
return
|
|
2479
|
+
function ba(e) {
|
|
2480
|
+
return q(e) ? { target: e } : e;
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2483
|
-
return (n, r, i) =>
|
|
2484
|
-
let a =
|
|
2482
|
+
function xa(e, t) {
|
|
2483
|
+
return (n, r, i) => da(e).map(ba).find((e) => {
|
|
2484
|
+
let a = ma(e.guard, t), o = a(n, r, i);
|
|
2485
2485
|
return o ?? e.target ?? e.actions;
|
|
2486
2486
|
});
|
|
2487
2487
|
}
|
|
2488
|
-
var
|
|
2489
|
-
status =
|
|
2488
|
+
var Sa = class {
|
|
2489
|
+
status = ga.NotStarted;
|
|
2490
2490
|
state;
|
|
2491
2491
|
initialState;
|
|
2492
2492
|
initialContext;
|
|
2493
2493
|
id;
|
|
2494
|
-
type =
|
|
2494
|
+
type = _a.Machine;
|
|
2495
2495
|
activityEvents = /* @__PURE__ */ new Map();
|
|
2496
2496
|
delayedEvents = /* @__PURE__ */ new Map();
|
|
2497
2497
|
stateListeners = /* @__PURE__ */ new Set();
|
|
2498
2498
|
doneListeners = /* @__PURE__ */ new Set();
|
|
2499
2499
|
contextWatchers = /* @__PURE__ */ new Set();
|
|
2500
|
-
removeStateListener =
|
|
2500
|
+
removeStateListener = vn;
|
|
2501
2501
|
parent;
|
|
2502
2502
|
children = /* @__PURE__ */ new Map();
|
|
2503
2503
|
guardMap;
|
|
@@ -2508,10 +2508,10 @@ var wa = class {
|
|
|
2508
2508
|
options;
|
|
2509
2509
|
config;
|
|
2510
2510
|
constructor(e, t) {
|
|
2511
|
-
this.config =
|
|
2511
|
+
this.config = ta(e), this.options = ta(t ?? {}), this.id = this.config.id ?? `machine-${bn()}`, this.guardMap = this.options?.guards ?? {}, this.actionMap = this.options?.actions ?? {}, this.delayMap = this.options?.delays ?? {}, this.activityMap = this.options?.activities ?? {}, this.sync = this.options?.sync ?? !1, this.state = va(this.config), this.initialContext = sa(this.state.context);
|
|
2512
2512
|
}
|
|
2513
2513
|
get stateSnapshot() {
|
|
2514
|
-
return
|
|
2514
|
+
return K(sa(this.state));
|
|
2515
2515
|
}
|
|
2516
2516
|
getState() {
|
|
2517
2517
|
return this.stateSnapshot;
|
|
@@ -2521,17 +2521,17 @@ var wa = class {
|
|
|
2521
2521
|
}
|
|
2522
2522
|
_created = () => {
|
|
2523
2523
|
if (!this.config.created) return;
|
|
2524
|
-
let e =
|
|
2524
|
+
let e = X(Z.Created);
|
|
2525
2525
|
this.executeActions(this.config.created, e);
|
|
2526
2526
|
};
|
|
2527
2527
|
start = (e) => {
|
|
2528
|
-
if (this.state.value = "", this.state.tags = [], this.status ===
|
|
2529
|
-
this.status =
|
|
2528
|
+
if (this.state.value = "", this.state.tags = [], this.status === ga.Running) return this;
|
|
2529
|
+
this.status = ga.Running, this.removeStateListener = oa(this.state, () => {
|
|
2530
2530
|
this.stateListeners.forEach((e) => {
|
|
2531
2531
|
e(this.stateSnapshot);
|
|
2532
2532
|
});
|
|
2533
|
-
}, this.sync), this.setupContextWatchers(), this.executeActivities(
|
|
2534
|
-
let t =
|
|
2533
|
+
}, this.sync), this.setupContextWatchers(), this.executeActivities(X(Z.Start), da(this.config.activities), Z.Start), this.executeActions(this.config.entry, X(Z.Start));
|
|
2534
|
+
let t = X(Z.Init), n = Cn(e) ? e.value : e, r = Cn(e) ? e.context : void 0;
|
|
2535
2535
|
r && this.setContext(r);
|
|
2536
2536
|
let i = { target: n ?? this.config.initial }, a = this.getNextStateInfo(i, t);
|
|
2537
2537
|
return this.initialState = a, this.performStateChangeEffects(this.state.value, a, t), this;
|
|
@@ -2539,8 +2539,8 @@ var wa = class {
|
|
|
2539
2539
|
setupContextWatchers = () => {
|
|
2540
2540
|
let { watch: e } = this.config;
|
|
2541
2541
|
if (!e) return;
|
|
2542
|
-
let t =
|
|
2543
|
-
let n =
|
|
2542
|
+
let t = sa(this.state.context), n = oa(this.state.context, () => {
|
|
2543
|
+
let n = sa(this.state.context);
|
|
2544
2544
|
for (let [r, i] of Object.entries(e)) {
|
|
2545
2545
|
let e = this.options.compareFns?.[r] ?? Object.is;
|
|
2546
2546
|
if (e(t[r], n[r])) continue;
|
|
@@ -2551,7 +2551,7 @@ var wa = class {
|
|
|
2551
2551
|
this.contextWatchers.add(n);
|
|
2552
2552
|
};
|
|
2553
2553
|
stop = () => {
|
|
2554
|
-
if (this.status !==
|
|
2554
|
+
if (this.status !== ga.Stopped) return this.performExitEffects(this.state.value, X(Z.Stop)), this.executeActions(this.config.exit, X(Z.Stop)), this.setState(""), this.setEvent(Z.Stop), this.stopStateListeners(), this.stopChildren(), this.stopActivities(), this.stopDelayedEvents(), this.stopContextWatchers(), this.status = ga.Stopped, this;
|
|
2555
2555
|
};
|
|
2556
2556
|
stopStateListeners = () => {
|
|
2557
2557
|
this.removeStateListener(), this.stateListeners.clear();
|
|
@@ -2570,7 +2570,7 @@ var wa = class {
|
|
|
2570
2570
|
}), this.activityEvents.clear());
|
|
2571
2571
|
};
|
|
2572
2572
|
sendChild = (e, t) => {
|
|
2573
|
-
let n =
|
|
2573
|
+
let n = X(e), r = _n(t, this.contextSnapshot), i = this.children.get(r);
|
|
2574
2574
|
if (!i) throw Error(`[@destyler/xstate] Cannot send '${n.type}' event to unknown child`);
|
|
2575
2575
|
i.send(n);
|
|
2576
2576
|
};
|
|
@@ -2588,10 +2588,10 @@ var wa = class {
|
|
|
2588
2588
|
this.parent = e;
|
|
2589
2589
|
};
|
|
2590
2590
|
spawn = (e, t) => {
|
|
2591
|
-
let n =
|
|
2592
|
-
return t && (n.id = t), n.type =
|
|
2591
|
+
let n = _n(e);
|
|
2592
|
+
return t && (n.id = t), n.type = _a.Actor, n.setParent(this), this.children.set(n.id, K(n)), n.onDone(() => {
|
|
2593
2593
|
this.removeChild(n.id);
|
|
2594
|
-
}).start(),
|
|
2594
|
+
}).start(), K(ca(n));
|
|
2595
2595
|
};
|
|
2596
2596
|
stopActivity = (e) => {
|
|
2597
2597
|
if (!this.state.value) return;
|
|
@@ -2604,13 +2604,13 @@ var wa = class {
|
|
|
2604
2604
|
setState = (e) => {
|
|
2605
2605
|
this.state.previousValue = this.state.value, this.state.value = e;
|
|
2606
2606
|
let t = this.getStateNode(e);
|
|
2607
|
-
e == null ?
|
|
2607
|
+
e == null ? gn(this.state.tags) : this.state.tags = da(t?.tags);
|
|
2608
2608
|
};
|
|
2609
2609
|
setContext = (e) => {
|
|
2610
|
-
e &&
|
|
2610
|
+
e && ua(this.state.context, e);
|
|
2611
2611
|
};
|
|
2612
2612
|
setOptions = (e) => {
|
|
2613
|
-
let t =
|
|
2613
|
+
let t = Rn(e);
|
|
2614
2614
|
this.actionMap = {
|
|
2615
2615
|
...this.actionMap,
|
|
2616
2616
|
...t.actions
|
|
@@ -2656,18 +2656,18 @@ var wa = class {
|
|
|
2656
2656
|
let t = this.getStateNode(e), n = this.state.event;
|
|
2657
2657
|
if (!t || !t.after) return;
|
|
2658
2658
|
let r = [], i = [];
|
|
2659
|
-
if (
|
|
2659
|
+
if (xn(t.after)) {
|
|
2660
2660
|
let e = this.determineTransition(t.after, n);
|
|
2661
2661
|
if (!e) return;
|
|
2662
|
-
if (!
|
|
2663
|
-
let a =
|
|
2662
|
+
if (!Dn(e, "delay")) throw Error(`[@destyler/xstate > after] Delay is required for after transition: ${JSON.stringify(e)}`);
|
|
2663
|
+
let a = ya(e.delay, this.delayMap), o = a(this.contextSnapshot, n), s = this.getAfterActions(e, o);
|
|
2664
2664
|
return r.push(s.entry), i.push(s.exit), {
|
|
2665
2665
|
entries: r,
|
|
2666
2666
|
exits: i
|
|
2667
2667
|
};
|
|
2668
2668
|
}
|
|
2669
|
-
if (
|
|
2670
|
-
let a = t.after[e], o =
|
|
2669
|
+
if (Cn(t.after)) for (let e in t.after) {
|
|
2670
|
+
let a = t.after[e], o = ya(e, this.delayMap), s = o(this.contextSnapshot, n), c = this.getAfterActions(a, s);
|
|
2671
2671
|
r.push(c.entry), i.push(c.exit);
|
|
2672
2672
|
}
|
|
2673
2673
|
return {
|
|
@@ -2714,34 +2714,34 @@ var wa = class {
|
|
|
2714
2714
|
return { state: this.stateSnapshot };
|
|
2715
2715
|
}
|
|
2716
2716
|
executeActions = (e, t) => {
|
|
2717
|
-
let n =
|
|
2718
|
-
for (let e of
|
|
2719
|
-
let n =
|
|
2720
|
-
|
|
2717
|
+
let n = ha(e, this.guardMap)(this.contextSnapshot, t, this.guardMeta);
|
|
2718
|
+
for (let e of da(n)) {
|
|
2719
|
+
let n = q(e) ? this.actionMap?.[e] : e;
|
|
2720
|
+
q(e) && !n && console.warn(`[@destyler/xstate > execute-actions] No implementation found for action: \`${e}\``), n?.(this.state.context, t, this.meta);
|
|
2721
2721
|
}
|
|
2722
2722
|
};
|
|
2723
2723
|
executeActivities = (e, t, n) => {
|
|
2724
2724
|
for (let r of t) {
|
|
2725
|
-
let t =
|
|
2725
|
+
let t = q(r) ? this.activityMap?.[r] : r;
|
|
2726
2726
|
if (!t) {
|
|
2727
2727
|
console.warn(`[@destyler/xstate > execute-activity] No implementation found for activity: \`${r}\``);
|
|
2728
2728
|
continue;
|
|
2729
2729
|
}
|
|
2730
2730
|
let i = t(this.state.context, e, this.meta);
|
|
2731
2731
|
if (i) {
|
|
2732
|
-
let e =
|
|
2732
|
+
let e = q(r) ? r : r.name || bn();
|
|
2733
2733
|
this.addActivityCleanup(n ?? this.state.value, e, i);
|
|
2734
2734
|
}
|
|
2735
2735
|
}
|
|
2736
2736
|
};
|
|
2737
2737
|
createEveryActivities = (e, t) => {
|
|
2738
|
-
if (e) if (
|
|
2739
|
-
let n =
|
|
2740
|
-
let t = e.delay, n =
|
|
2738
|
+
if (e) if (xn(e)) {
|
|
2739
|
+
let n = da(e).find((e) => {
|
|
2740
|
+
let t = e.delay, n = ya(t, this.delayMap), r = n(this.contextSnapshot, this.state.event), i = ma(e.guard, this.guardMap), a = i(this.contextSnapshot, this.state.event, this.guardMeta);
|
|
2741
2741
|
return a ?? r != null;
|
|
2742
2742
|
});
|
|
2743
2743
|
if (!n) return;
|
|
2744
|
-
let r =
|
|
2744
|
+
let r = ya(n.delay, this.delayMap), i = r(this.contextSnapshot, this.state.event), a = () => {
|
|
2745
2745
|
let e = globalThis.setInterval(() => {
|
|
2746
2746
|
this.executeActions(n.actions, this.state.event);
|
|
2747
2747
|
}, i);
|
|
@@ -2751,7 +2751,7 @@ var wa = class {
|
|
|
2751
2751
|
};
|
|
2752
2752
|
t(a);
|
|
2753
2753
|
} else for (let n in e) {
|
|
2754
|
-
let r = e?.[n], i =
|
|
2754
|
+
let r = e?.[n], i = ya(n, this.delayMap), a = i(this.contextSnapshot, this.state.event), o = () => {
|
|
2755
2755
|
let e = globalThis.setInterval(() => {
|
|
2756
2756
|
this.executeActions(r, this.state.event);
|
|
2757
2757
|
}, a);
|
|
@@ -2763,22 +2763,22 @@ var wa = class {
|
|
|
2763
2763
|
}
|
|
2764
2764
|
};
|
|
2765
2765
|
setEvent = (e) => {
|
|
2766
|
-
this.state.previousEvent = this.state.event, this.state.event =
|
|
2766
|
+
this.state.previousEvent = this.state.event, this.state.event = ca(X(e));
|
|
2767
2767
|
};
|
|
2768
2768
|
performExitEffects = (e, t) => {
|
|
2769
2769
|
let n = this.state.value;
|
|
2770
2770
|
if (n === "") return;
|
|
2771
2771
|
let r = e ? this.getStateNode(e) : void 0;
|
|
2772
2772
|
this.stopActivities(n);
|
|
2773
|
-
let i =
|
|
2773
|
+
let i = ha(r?.exit, this.guardMap)(this.contextSnapshot, t, this.guardMeta), a = da(i), o = this.delayedEvents.get(n);
|
|
2774
2774
|
o && a.push(...o), this.executeActions(a, t), this.delayedEvents.delete(n);
|
|
2775
2775
|
};
|
|
2776
2776
|
performEntryEffects = (e, t) => {
|
|
2777
|
-
let n = this.getStateNode(e), r =
|
|
2777
|
+
let n = this.getStateNode(e), r = da(n?.activities);
|
|
2778
2778
|
this.createEveryActivities(n?.every, (e) => {
|
|
2779
2779
|
r.unshift(e);
|
|
2780
2780
|
}), r.length > 0 && this.executeActivities(t, r);
|
|
2781
|
-
let i =
|
|
2781
|
+
let i = ha(n?.entry, this.guardMap)(this.contextSnapshot, t, this.guardMeta), a = da(i), o = this.getDelayedEventActions(e);
|
|
2782
2782
|
n?.after && o && (this.delayedEvents.set(e, o?.exits), a.push(...o.entries)), this.executeActions(a, t), n?.type === "final" && (this.state.done = !0, this.doneListeners.forEach((e) => {
|
|
2783
2783
|
e(this.stateSnapshot);
|
|
2784
2784
|
}), this.stop());
|
|
@@ -2793,36 +2793,36 @@ var wa = class {
|
|
|
2793
2793
|
r && this.performExitEffects(e, n), this.performTransitionEffects(t.transition, n), this.setState(t.target), r && this.performEntryEffects(t.target, n);
|
|
2794
2794
|
};
|
|
2795
2795
|
determineTransition = (e, t) => {
|
|
2796
|
-
let n =
|
|
2796
|
+
let n = xa(e, this.guardMap);
|
|
2797
2797
|
return n?.(this.contextSnapshot, t, this.guardMeta);
|
|
2798
2798
|
};
|
|
2799
2799
|
sendParent = (e) => {
|
|
2800
2800
|
if (!this.parent) throw Error("[@destyler/xstate > send-parent] Cannot send event to parent machine, no parent is set. Use `machine.spawn()` to spawn a child machine.");
|
|
2801
|
-
let t =
|
|
2801
|
+
let t = X(e);
|
|
2802
2802
|
this.parent?.send(t);
|
|
2803
2803
|
};
|
|
2804
2804
|
log = (...e) => {
|
|
2805
2805
|
this.options.debug && console.log(...e);
|
|
2806
2806
|
};
|
|
2807
2807
|
send = (e) => {
|
|
2808
|
-
let t =
|
|
2808
|
+
let t = X(e);
|
|
2809
2809
|
this.transition(this.state.value, t);
|
|
2810
2810
|
};
|
|
2811
2811
|
transition = (e, t) => {
|
|
2812
|
-
let n =
|
|
2812
|
+
let n = q(e) ? this.getStateNode(e) : e?.stateNode, r = X(t);
|
|
2813
2813
|
if (!n && !this.config.on) {
|
|
2814
|
-
let t = this.status ===
|
|
2814
|
+
let t = this.status === ga.Stopped ? "[@destyler/xstate > transition] Cannot transition a stopped machine" : `[destyler/xstate > transition] State does not have a definition for \`state\`: ${e}, \`event\`: ${r.type}`;
|
|
2815
2815
|
console.warn(t);
|
|
2816
2816
|
return;
|
|
2817
2817
|
}
|
|
2818
2818
|
let i = n?.on?.[r.type] ?? this.config.on?.[r.type], a = this.getNextStateInfo(i, r);
|
|
2819
2819
|
return this.performStateChangeEffects(this.state.value, a, r), a.stateNode;
|
|
2820
2820
|
};
|
|
2821
|
-
subscribe = (e) => (this.stateListeners.add(e), this.status ===
|
|
2821
|
+
subscribe = (e) => (this.stateListeners.add(e), this.status === ga.Running && e(this.stateSnapshot), () => {
|
|
2822
2822
|
this.stateListeners.delete(e);
|
|
2823
2823
|
});
|
|
2824
2824
|
onDone = (e) => (this.doneListeners.add(e), this);
|
|
2825
|
-
onTransition = (e) => (this.stateListeners.add(e), this.status ===
|
|
2825
|
+
onTransition = (e) => (this.stateListeners.add(e), this.status === ga.Running && e(this.stateSnapshot), this);
|
|
2826
2826
|
get [Symbol.toStringTag]() {
|
|
2827
2827
|
return "Machine";
|
|
2828
2828
|
}
|
|
@@ -2834,18 +2834,18 @@ var wa = class {
|
|
|
2834
2834
|
};
|
|
2835
2835
|
}
|
|
2836
2836
|
};
|
|
2837
|
-
function
|
|
2838
|
-
return new
|
|
2837
|
+
function Ca(e, t) {
|
|
2838
|
+
return new Sa(e, t);
|
|
2839
2839
|
}
|
|
2840
|
-
function
|
|
2840
|
+
function wa() {
|
|
2841
2841
|
return (e) => Array.from(new Set(e));
|
|
2842
2842
|
}
|
|
2843
|
-
function
|
|
2843
|
+
function Ta(e) {
|
|
2844
2844
|
return new Proxy({}, { get() {
|
|
2845
2845
|
return e;
|
|
2846
2846
|
} });
|
|
2847
2847
|
}
|
|
2848
|
-
const
|
|
2848
|
+
const Ea = mt("popover").parts("arrow", "arrowTip", "anchor", "trigger", "indicator", "positioner", "content", "title", "description", "closeTrigger"), Q = Ea.build(), $ = un({
|
|
2849
2849
|
getAnchorId: (e) => e.ids?.anchor ?? `popover:${e.id}:anchor`,
|
|
2850
2850
|
getTriggerId: (e) => e.ids?.trigger ?? `popover:${e.id}:trigger`,
|
|
2851
2851
|
getContentId: (e) => e.ids?.content ?? `popover:${e.id}:content`,
|
|
@@ -2860,11 +2860,11 @@ const Oa = gt("popover").parts("arrow", "arrowTip", "anchor", "trigger", "indica
|
|
|
2860
2860
|
getPositionerEl: (e) => $.getById(e, $.getPositionerId(e)),
|
|
2861
2861
|
getTitleEl: (e) => $.getById(e, $.getTitleId(e)),
|
|
2862
2862
|
getDescriptionEl: (e) => $.getById(e, $.getDescriptionId(e)),
|
|
2863
|
-
getFocusableEls: (e) =>
|
|
2863
|
+
getFocusableEls: (e) => Zt($.getContentEl(e)),
|
|
2864
2864
|
getFirstFocusableEl: (e) => $.getFocusableEls(e)[0]
|
|
2865
2865
|
});
|
|
2866
|
-
function
|
|
2867
|
-
let r = e.matches("open"), i = e.context.currentPlacement, a = e.context.currentPortalled, o = e.context.renderedElements, s =
|
|
2866
|
+
function Da(e, t, n) {
|
|
2867
|
+
let r = e.matches("open"), i = e.context.currentPlacement, a = e.context.currentPortalled, o = e.context.renderedElements, s = qr({
|
|
2868
2868
|
...e.context.positioning,
|
|
2869
2869
|
placement: i
|
|
2870
2870
|
});
|
|
@@ -2914,7 +2914,7 @@ function ka(e, t, n) {
|
|
|
2914
2914
|
"data-state": r ? "open" : "closed",
|
|
2915
2915
|
"aria-controls": $.getContentId(e.context),
|
|
2916
2916
|
onPointerDown(e) {
|
|
2917
|
-
|
|
2917
|
+
Bt() && e.currentTarget.focus();
|
|
2918
2918
|
},
|
|
2919
2919
|
onClick(e) {
|
|
2920
2920
|
e.defaultPrevented || t("TOGGLE");
|
|
@@ -2951,7 +2951,7 @@ function ka(e, t, n) {
|
|
|
2951
2951
|
role: "dialog",
|
|
2952
2952
|
hidden: !r,
|
|
2953
2953
|
"data-state": r ? "open" : "closed",
|
|
2954
|
-
"data-expanded":
|
|
2954
|
+
"data-expanded": gt(r),
|
|
2955
2955
|
"aria-labelledby": o.title ? $.getTitleId(e.context) : void 0,
|
|
2956
2956
|
"aria-describedby": o.description ? $.getDescriptionId(e.context) : void 0,
|
|
2957
2957
|
"data-placement": i
|
|
@@ -2985,9 +2985,9 @@ function ka(e, t, n) {
|
|
|
2985
2985
|
}
|
|
2986
2986
|
};
|
|
2987
2987
|
}
|
|
2988
|
-
function
|
|
2989
|
-
let t =
|
|
2990
|
-
return
|
|
2988
|
+
function Oa(e) {
|
|
2989
|
+
let t = Rn(e);
|
|
2990
|
+
return Ca({
|
|
2991
2991
|
id: "popover",
|
|
2992
2992
|
initial: t.open ? "open" : "closed",
|
|
2993
2993
|
context: {
|
|
@@ -3069,7 +3069,7 @@ function Aa(e) {
|
|
|
3069
3069
|
trackPositioning(e) {
|
|
3070
3070
|
e.currentPlacement = e.positioning.placement;
|
|
3071
3071
|
let t = $.getAnchorEl(e) ?? $.getTriggerEl(e), n = () => $.getPositionerEl(e);
|
|
3072
|
-
return
|
|
3072
|
+
return Gr(t, n, {
|
|
3073
3073
|
...e.positioning,
|
|
3074
3074
|
defer: !0,
|
|
3075
3075
|
onComplete(t) {
|
|
@@ -3079,7 +3079,7 @@ function Aa(e) {
|
|
|
3079
3079
|
},
|
|
3080
3080
|
trackDismissableElement(e, t, { send: n }) {
|
|
3081
3081
|
let r = () => $.getContentEl(e), i = !0;
|
|
3082
|
-
return
|
|
3082
|
+
return wi(r, {
|
|
3083
3083
|
pointerBlocking: e.modal,
|
|
3084
3084
|
exclude: $.getTriggerEl(e),
|
|
3085
3085
|
defer: !0,
|
|
@@ -3104,7 +3104,7 @@ function Aa(e) {
|
|
|
3104
3104
|
proxyTabFocus(e) {
|
|
3105
3105
|
if (e.modal || !e.portalled) return;
|
|
3106
3106
|
let t = () => $.getContentEl(e);
|
|
3107
|
-
return
|
|
3107
|
+
return ln(t, {
|
|
3108
3108
|
triggerElement: $.getTriggerEl(e),
|
|
3109
3109
|
defer: !0,
|
|
3110
3110
|
onFocus(e) {
|
|
@@ -3115,15 +3115,15 @@ function Aa(e) {
|
|
|
3115
3115
|
hideContentBelow(e) {
|
|
3116
3116
|
if (!e.modal) return;
|
|
3117
3117
|
let t = () => [$.getContentEl(e), $.getTriggerEl(e)];
|
|
3118
|
-
return
|
|
3118
|
+
return ai(t, { defer: !0 });
|
|
3119
3119
|
},
|
|
3120
3120
|
preventScroll(e) {
|
|
3121
|
-
if (e.modal) return
|
|
3121
|
+
if (e.modal) return Ri($.getDoc(e));
|
|
3122
3122
|
},
|
|
3123
3123
|
trapFocus(e) {
|
|
3124
3124
|
if (!e.modal) return;
|
|
3125
3125
|
let t = () => $.getContentEl(e);
|
|
3126
|
-
return
|
|
3126
|
+
return Ni(t, { initialFocus: () => rn({
|
|
3127
3127
|
root: $.getContentEl(e),
|
|
3128
3128
|
getInitialEl: e.initialFocusEl,
|
|
3129
3129
|
enabled: e.autoFocus
|
|
@@ -3133,7 +3133,7 @@ function Aa(e) {
|
|
|
3133
3133
|
actions: {
|
|
3134
3134
|
reposition(e, t) {
|
|
3135
3135
|
let n = $.getAnchorEl(e) ?? $.getTriggerEl(e), r = () => $.getPositionerEl(e);
|
|
3136
|
-
|
|
3136
|
+
Gr(n, r, {
|
|
3137
3137
|
...e.positioning,
|
|
3138
3138
|
...t.options,
|
|
3139
3139
|
defer: !0,
|
|
@@ -3144,7 +3144,7 @@ function Aa(e) {
|
|
|
3144
3144
|
});
|
|
3145
3145
|
},
|
|
3146
3146
|
checkRenderedElements(e) {
|
|
3147
|
-
|
|
3147
|
+
G(() => {
|
|
3148
3148
|
Object.assign(e.renderedElements, {
|
|
3149
3149
|
title: !!$.getTitleEl(e),
|
|
3150
3150
|
description: !!$.getDescriptionEl(e)
|
|
@@ -3152,8 +3152,8 @@ function Aa(e) {
|
|
|
3152
3152
|
});
|
|
3153
3153
|
},
|
|
3154
3154
|
setInitialFocus(e) {
|
|
3155
|
-
e.modal ||
|
|
3156
|
-
let t =
|
|
3155
|
+
e.modal || G(() => {
|
|
3156
|
+
let t = rn({
|
|
3157
3157
|
root: $.getContentEl(e),
|
|
3158
3158
|
getInitialEl: e.initialFocusEl,
|
|
3159
3159
|
enabled: e.autoFocus
|
|
@@ -3163,7 +3163,7 @@ function Aa(e) {
|
|
|
3163
3163
|
},
|
|
3164
3164
|
setFinalFocus(e, t) {
|
|
3165
3165
|
let n = t.restoreFocus ?? t.previousEvent?.restoreFocus;
|
|
3166
|
-
n != null && !n ||
|
|
3166
|
+
n != null && !n || G(() => {
|
|
3167
3167
|
let t = $.getTriggerEl(e);
|
|
3168
3168
|
t?.focus({ preventScroll: !0 });
|
|
3169
3169
|
});
|
|
@@ -3183,7 +3183,7 @@ function Aa(e) {
|
|
|
3183
3183
|
}
|
|
3184
3184
|
});
|
|
3185
3185
|
}
|
|
3186
|
-
const
|
|
3186
|
+
const ka = wa()([
|
|
3187
3187
|
"autoFocus",
|
|
3188
3188
|
"closeOnEscape",
|
|
3189
3189
|
"closeOnInteractOutside",
|
|
@@ -3204,39 +3204,39 @@ const ja = Ea()([
|
|
|
3204
3204
|
"portalled",
|
|
3205
3205
|
"positioning"
|
|
3206
3206
|
]);
|
|
3207
|
-
|
|
3208
|
-
function
|
|
3209
|
-
let { actions: n, context: r } = t ?? {}, i =
|
|
3210
|
-
i.value =
|
|
3207
|
+
Vn(ka);
|
|
3208
|
+
function Aa(e, t) {
|
|
3209
|
+
let { actions: n, context: r } = t ?? {}, i = b(e.state), a = oa(e.state, () => {
|
|
3210
|
+
i.value = sa(e.state);
|
|
3211
3211
|
});
|
|
3212
|
-
return
|
|
3212
|
+
return g(() => {
|
|
3213
3213
|
a?.();
|
|
3214
|
-
}),
|
|
3214
|
+
}), T(() => {
|
|
3215
3215
|
e.setOptions({ actions: n });
|
|
3216
|
-
}), r &&
|
|
3217
|
-
e.setContext(
|
|
3216
|
+
}), r && w(r, (t) => {
|
|
3217
|
+
e.setContext(x(t));
|
|
3218
3218
|
}, { deep: !0 }), i;
|
|
3219
3219
|
}
|
|
3220
|
-
function
|
|
3220
|
+
function ja(e, t) {
|
|
3221
3221
|
let { state: n, context: r } = t ?? {}, i = typeof e == "function" ? e() : e;
|
|
3222
|
-
return r && i.setContext(
|
|
3223
|
-
i.start(n),
|
|
3222
|
+
return r && i.setContext(x(r)), i._created(), h(() => {
|
|
3223
|
+
i.start(n), m(() => {
|
|
3224
3224
|
i.stop();
|
|
3225
3225
|
});
|
|
3226
3226
|
}), i;
|
|
3227
3227
|
}
|
|
3228
|
-
function
|
|
3229
|
-
let n =
|
|
3228
|
+
function Ma(e, t) {
|
|
3229
|
+
let n = ja(e, t), r = Aa(n, t);
|
|
3230
3230
|
return [
|
|
3231
3231
|
r,
|
|
3232
3232
|
n.send,
|
|
3233
3233
|
n
|
|
3234
3234
|
];
|
|
3235
3235
|
}
|
|
3236
|
-
function
|
|
3236
|
+
function Na(e) {
|
|
3237
3237
|
return e.charAt(0).toUpperCase() + e.substr(1).toLowerCase();
|
|
3238
3238
|
}
|
|
3239
|
-
const
|
|
3239
|
+
const Pa = {
|
|
3240
3240
|
htmlFor: "for",
|
|
3241
3241
|
className: "class",
|
|
3242
3242
|
onDoubleClick: "onDblclick",
|
|
@@ -3246,30 +3246,30 @@ const Ia = {
|
|
|
3246
3246
|
defaultValue: "value",
|
|
3247
3247
|
defaultChecked: "checked"
|
|
3248
3248
|
};
|
|
3249
|
-
function
|
|
3250
|
-
return e in
|
|
3249
|
+
function Fa(e) {
|
|
3250
|
+
return e in Pa ? Pa[e] : e.startsWith("on") ? `on${Na(e.substr(2))}` : e.toLowerCase();
|
|
3251
3251
|
}
|
|
3252
|
-
const
|
|
3252
|
+
const Ia = Ta((e) => {
|
|
3253
3253
|
let t = {};
|
|
3254
3254
|
for (let n in e) {
|
|
3255
3255
|
let r = e[n];
|
|
3256
|
-
n === "children" ? typeof r == "string" && (t.innerHTML = r) : t[
|
|
3256
|
+
n === "children" ? typeof r == "string" && (t.innerHTML = r) : t[Fa(n)] = e[n];
|
|
3257
3257
|
}
|
|
3258
3258
|
return t;
|
|
3259
|
-
}),
|
|
3259
|
+
}), La = {
|
|
3260
3260
|
key: 0,
|
|
3261
3261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3262
3262
|
width: "1em",
|
|
3263
3263
|
height: "1em",
|
|
3264
3264
|
viewBox: "0 0 16 16"
|
|
3265
|
-
},
|
|
3265
|
+
}, Ra = {
|
|
3266
3266
|
key: 1,
|
|
3267
3267
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3268
3268
|
width: "1em",
|
|
3269
3269
|
height: "1em",
|
|
3270
3270
|
viewBox: "0 0 16 16"
|
|
3271
3271
|
};
|
|
3272
|
-
var
|
|
3272
|
+
var za = /* @__PURE__ */ l({
|
|
3273
3273
|
name: "ComponentIcones",
|
|
3274
3274
|
__name: "ComponentsIcones",
|
|
3275
3275
|
props: { expanded: {
|
|
@@ -3278,43 +3278,43 @@ var Va = /* @__PURE__ */ u({
|
|
|
3278
3278
|
} },
|
|
3279
3279
|
setup(e) {
|
|
3280
3280
|
let t = e;
|
|
3281
|
-
return (e, n) => t.expanded ? (
|
|
3281
|
+
return (e, n) => t.expanded ? (_(), o("svg", La, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
|
|
3282
3282
|
fill: "none",
|
|
3283
3283
|
"stroke-linecap": "round",
|
|
3284
3284
|
"stroke-linejoin": "round"
|
|
3285
|
-
}, [
|
|
3285
|
+
}, [s("path", {
|
|
3286
3286
|
stroke: "#000",
|
|
3287
3287
|
d: "m1.87 8l.7-2.74a1 1 0 0 1 .96-.76h10.94a1 1 0 0 1 .97 1.24l-.219.875M6 13.5H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3288
|
-
}),
|
|
3288
|
+
}), s("path", {
|
|
3289
3289
|
stroke: "#67B686",
|
|
3290
3290
|
d: "m9.485 9.516l3.968 3.968m-3.968 0l3.968-3.968m-1.634-1.874l3.507 3.507a.496.496 0 0 1 0 .702l-3.507 3.507a.496.496 0 0 1-.701 0L7.61 11.85a.496.496 0 0 1 0-.702l3.507-3.507a.496.496 0 0 1 .701 0z"
|
|
3291
|
-
})], -1)])) : (
|
|
3291
|
+
})], -1)])) : (_(), o("svg", Ra, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
|
|
3292
3292
|
fill: "none",
|
|
3293
3293
|
"stroke-linecap": "round",
|
|
3294
3294
|
"stroke-linejoin": "round"
|
|
3295
|
-
}, [
|
|
3295
|
+
}, [s("path", {
|
|
3296
3296
|
stroke: "#000",
|
|
3297
3297
|
d: "M4.5 4.5H12c.83 0 1.5.67 1.5 1.5v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3298
|
-
}),
|
|
3298
|
+
}), s("path", {
|
|
3299
3299
|
stroke: "#67B686",
|
|
3300
3300
|
d: "m9.485 9.516l3.968 3.968m-3.968 0l3.968-3.968m-1.634-1.874l3.507 3.507a.496.496 0 0 1 0 .702l-3.507 3.507a.496.496 0 0 1-.701 0L7.61 11.85a.496.496 0 0 1 0-.702l3.507-3.507a.496.496 0 0 1 .701 0z"
|
|
3301
3301
|
})], -1)]));
|
|
3302
3302
|
}
|
|
3303
|
-
}),
|
|
3304
|
-
const
|
|
3303
|
+
}), Ba = za;
|
|
3304
|
+
const Va = {
|
|
3305
3305
|
key: 0,
|
|
3306
3306
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3307
3307
|
width: "1em",
|
|
3308
3308
|
height: "1em",
|
|
3309
3309
|
viewBox: "0 0 16 16"
|
|
3310
|
-
},
|
|
3310
|
+
}, Ha = {
|
|
3311
3311
|
key: 1,
|
|
3312
3312
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3313
3313
|
width: "1em",
|
|
3314
3314
|
height: "1em",
|
|
3315
3315
|
viewBox: "0 0 16 16"
|
|
3316
3316
|
};
|
|
3317
|
-
var
|
|
3317
|
+
var Ua = /* @__PURE__ */ l({
|
|
3318
3318
|
name: "FolderIcones",
|
|
3319
3319
|
__name: "FolderIcones",
|
|
3320
3320
|
props: { expanded: {
|
|
@@ -3323,13 +3323,13 @@ var Ga = /* @__PURE__ */ u({
|
|
|
3323
3323
|
} },
|
|
3324
3324
|
setup(e) {
|
|
3325
3325
|
let t = e;
|
|
3326
|
-
return (e, n) => t.expanded ? (
|
|
3326
|
+
return (e, n) => t.expanded ? (_(), o("svg", Va, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("path", {
|
|
3327
3327
|
fill: "none",
|
|
3328
3328
|
stroke: "#000",
|
|
3329
3329
|
"stroke-linecap": "round",
|
|
3330
3330
|
"stroke-linejoin": "round",
|
|
3331
3331
|
d: "m1.87 8l.7-2.74a1 1 0 0 1 .96-.76h10.94a1 1 0 0 1 .97 1.24l-1.75 7a1 1 0 0 1-.97.76H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3332
|
-
}, null, -1)])) : (
|
|
3332
|
+
}, null, -1)])) : (_(), o("svg", Ha, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("path", {
|
|
3333
3333
|
fill: "none",
|
|
3334
3334
|
stroke: "#000",
|
|
3335
3335
|
"stroke-linecap": "round",
|
|
@@ -3337,21 +3337,21 @@ var Ga = /* @__PURE__ */ u({
|
|
|
3337
3337
|
d: "M4.5 4.5H12c.83 0 1.5.67 1.5 1.5v6c0 .83-.67 1.5-1.5 1.5H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3338
3338
|
}, null, -1)]));
|
|
3339
3339
|
}
|
|
3340
|
-
}),
|
|
3341
|
-
const
|
|
3340
|
+
}), Wa = Ua;
|
|
3341
|
+
const Ga = {
|
|
3342
3342
|
key: 0,
|
|
3343
3343
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3344
3344
|
width: "1em",
|
|
3345
3345
|
height: "1em",
|
|
3346
3346
|
viewBox: "0 0 16 16"
|
|
3347
|
-
},
|
|
3347
|
+
}, Ka = {
|
|
3348
3348
|
key: 1,
|
|
3349
3349
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3350
3350
|
width: "1em",
|
|
3351
3351
|
height: "1em",
|
|
3352
3352
|
viewBox: "0 0 16 16"
|
|
3353
3353
|
};
|
|
3354
|
-
var
|
|
3354
|
+
var qa = /* @__PURE__ */ l({
|
|
3355
3355
|
name: "ModleIcones",
|
|
3356
3356
|
__name: "ModuleIcones",
|
|
3357
3357
|
props: { expanded: {
|
|
@@ -3360,43 +3360,43 @@ var Ya = /* @__PURE__ */ u({
|
|
|
3360
3360
|
} },
|
|
3361
3361
|
setup(e) {
|
|
3362
3362
|
let t = e;
|
|
3363
|
-
return (e, n) => t.expanded ? (
|
|
3363
|
+
return (e, n) => t.expanded ? (_(), o("svg", Ga, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
|
|
3364
3364
|
fill: "none",
|
|
3365
3365
|
"stroke-linecap": "round",
|
|
3366
3366
|
"stroke-linejoin": "round"
|
|
3367
|
-
}, [
|
|
3367
|
+
}, [s("path", {
|
|
3368
3368
|
stroke: "#000",
|
|
3369
3369
|
d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3370
|
-
}),
|
|
3370
|
+
}), s("path", {
|
|
3371
3371
|
stroke: "#65bb87",
|
|
3372
3372
|
d: "M15.5 13.5v1.2a.8.8 0 0 1-.8.8h-4.4a.8.8 0 0 1-.8-.8v-1.2H9a1 1 0 0 1 0-2h.5v-1.2a.8.8 0 0 1 .8-.8h1.2V9a1 1 0 0 1 2 0v.5h1.2a.8.8 0 0 1 .8.8v1.2H15a1 1 0 0 0 0 2z"
|
|
3373
|
-
})], -1)])) : (
|
|
3373
|
+
})], -1)])) : (_(), o("svg", Ka, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
|
|
3374
3374
|
fill: "none",
|
|
3375
3375
|
"stroke-linecap": "round",
|
|
3376
3376
|
"stroke-linejoin": "round"
|
|
3377
|
-
}, [
|
|
3377
|
+
}, [s("path", {
|
|
3378
3378
|
stroke: "#000",
|
|
3379
3379
|
d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3380
|
-
}),
|
|
3380
|
+
}), s("path", {
|
|
3381
3381
|
stroke: "#65bb87",
|
|
3382
3382
|
d: "M15.5 13.5v1.2a.8.8 0 0 1-.8.8h-4.4a.8.8 0 0 1-.8-.8v-1.2H9a1 1 0 0 1 0-2h.5v-1.2a.8.8 0 0 1 .8-.8h1.2V9a1 1 0 0 1 2 0v.5h1.2a.8.8 0 0 1 .8.8v1.2H15a1 1 0 0 0 0 2z"
|
|
3383
3383
|
})], -1)]));
|
|
3384
3384
|
}
|
|
3385
|
-
}),
|
|
3386
|
-
const
|
|
3385
|
+
}), Ja = qa;
|
|
3386
|
+
const Ya = {
|
|
3387
3387
|
key: 0,
|
|
3388
3388
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3389
3389
|
width: "1em",
|
|
3390
3390
|
height: "1em",
|
|
3391
3391
|
viewBox: "0 0 16 16"
|
|
3392
|
-
},
|
|
3392
|
+
}, Xa = {
|
|
3393
3393
|
key: 1,
|
|
3394
3394
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3395
3395
|
width: "1em",
|
|
3396
3396
|
height: "1em",
|
|
3397
3397
|
viewBox: "0 0 16 16"
|
|
3398
3398
|
};
|
|
3399
|
-
var
|
|
3399
|
+
var Za = /* @__PURE__ */ l({
|
|
3400
3400
|
name: "PackagesIcones",
|
|
3401
3401
|
__name: "PackagesIcones",
|
|
3402
3402
|
props: { expanded: {
|
|
@@ -3405,43 +3405,43 @@ var $a = /* @__PURE__ */ u({
|
|
|
3405
3405
|
} },
|
|
3406
3406
|
setup(e) {
|
|
3407
3407
|
let t = e;
|
|
3408
|
-
return (e, n) => t.expanded ? (
|
|
3408
|
+
return (e, n) => t.expanded ? (_(), o("svg", Ya, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
|
|
3409
3409
|
fill: "none",
|
|
3410
3410
|
"stroke-linecap": "round",
|
|
3411
3411
|
"stroke-linejoin": "round"
|
|
3412
|
-
}, [
|
|
3412
|
+
}, [s("path", {
|
|
3413
3413
|
stroke: "#000",
|
|
3414
3414
|
d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3415
|
-
}),
|
|
3415
|
+
}), s("path", {
|
|
3416
3416
|
stroke: "#E23730",
|
|
3417
3417
|
d: "M12 15.337v-3.919L8.5 9.214m3.5 2.204l3.5-2.204M12 7.5l3.5 1.714v4.408L12 15.5l-3.5-1.878V9.214Z"
|
|
3418
|
-
})], -1)])) : (
|
|
3418
|
+
})], -1)])) : (_(), o("svg", Xa, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
|
|
3419
3419
|
fill: "none",
|
|
3420
3420
|
"stroke-linecap": "round",
|
|
3421
3421
|
"stroke-linejoin": "round"
|
|
3422
|
-
}, [
|
|
3422
|
+
}, [s("path", {
|
|
3423
3423
|
stroke: "#000",
|
|
3424
3424
|
d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3425
|
-
}),
|
|
3425
|
+
}), s("path", {
|
|
3426
3426
|
stroke: "#E23730",
|
|
3427
3427
|
d: "M12 15.337v-3.919L8.5 9.214m3.5 2.204l3.5-2.204M12 7.5l3.5 1.714v4.408L12 15.5l-3.5-1.878V9.214Z"
|
|
3428
3428
|
})], -1)]));
|
|
3429
3429
|
}
|
|
3430
|
-
}),
|
|
3431
|
-
const
|
|
3430
|
+
}), Qa = Za;
|
|
3431
|
+
const $a = {
|
|
3432
3432
|
key: 0,
|
|
3433
3433
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3434
3434
|
width: "1em",
|
|
3435
3435
|
height: "1em",
|
|
3436
3436
|
viewBox: "0 0 16 16"
|
|
3437
|
-
},
|
|
3437
|
+
}, eo = {
|
|
3438
3438
|
key: 1,
|
|
3439
3439
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3440
3440
|
width: "1em",
|
|
3441
3441
|
height: "1em",
|
|
3442
3442
|
viewBox: "0 0 16 16"
|
|
3443
3443
|
};
|
|
3444
|
-
var
|
|
3444
|
+
var to = /* @__PURE__ */ l({
|
|
3445
3445
|
name: "SrcIcones",
|
|
3446
3446
|
__name: "SrcIcones",
|
|
3447
3447
|
props: { expanded: {
|
|
@@ -3450,43 +3450,43 @@ var ro = /* @__PURE__ */ u({
|
|
|
3450
3450
|
} },
|
|
3451
3451
|
setup(e) {
|
|
3452
3452
|
let t = e;
|
|
3453
|
-
return (e, n) => t.expanded ? (
|
|
3453
|
+
return (e, n) => t.expanded ? (_(), o("svg", $a, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
|
|
3454
3454
|
fill: "none",
|
|
3455
3455
|
"stroke-linecap": "round",
|
|
3456
3456
|
"stroke-linejoin": "round"
|
|
3457
|
-
}, [
|
|
3457
|
+
}, [s("path", {
|
|
3458
3458
|
stroke: "#000",
|
|
3459
3459
|
d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3460
|
-
}),
|
|
3460
|
+
}), s("path", {
|
|
3461
3461
|
stroke: "#65bb87",
|
|
3462
3462
|
d: "m10.5 8.5l-3 3.5l3 3.5m2-7l3 3.5l-3 3.5"
|
|
3463
|
-
})], -1)])) : (
|
|
3463
|
+
})], -1)])) : (_(), o("svg", eo, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
|
|
3464
3464
|
fill: "none",
|
|
3465
3465
|
"stroke-linecap": "round",
|
|
3466
3466
|
"stroke-linejoin": "round"
|
|
3467
|
-
}, [
|
|
3467
|
+
}, [s("path", {
|
|
3468
3468
|
stroke: "#000",
|
|
3469
3469
|
d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3470
|
-
}),
|
|
3470
|
+
}), s("path", {
|
|
3471
3471
|
stroke: "#65bb87",
|
|
3472
3472
|
d: "m10.5 8.5l-3 3.5l3 3.5m2-7l3 3.5l-3 3.5"
|
|
3473
3473
|
})], -1)]));
|
|
3474
3474
|
}
|
|
3475
|
-
}),
|
|
3476
|
-
const
|
|
3475
|
+
}), no = to;
|
|
3476
|
+
const ro = {
|
|
3477
3477
|
key: 0,
|
|
3478
3478
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3479
3479
|
width: "1em",
|
|
3480
3480
|
height: "1em",
|
|
3481
3481
|
viewBox: "0 0 16 16"
|
|
3482
|
-
},
|
|
3482
|
+
}, io = {
|
|
3483
3483
|
key: 1,
|
|
3484
3484
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3485
3485
|
width: "1em",
|
|
3486
3486
|
height: "1em",
|
|
3487
3487
|
viewBox: "0 0 16 16"
|
|
3488
3488
|
};
|
|
3489
|
-
var
|
|
3489
|
+
var ao = /* @__PURE__ */ l({
|
|
3490
3490
|
name: "ViewIcones",
|
|
3491
3491
|
__name: "ViewIcones",
|
|
3492
3492
|
props: { expanded: {
|
|
@@ -3495,52 +3495,52 @@ var so = /* @__PURE__ */ u({
|
|
|
3495
3495
|
} },
|
|
3496
3496
|
setup(e) {
|
|
3497
3497
|
let t = e;
|
|
3498
|
-
return (e, n) => t.expanded ? (
|
|
3498
|
+
return (e, n) => t.expanded ? (_(), o("svg", ro, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[0] ||= s("g", {
|
|
3499
3499
|
fill: "none",
|
|
3500
3500
|
"stroke-linecap": "round",
|
|
3501
3501
|
"stroke-linejoin": "round"
|
|
3502
|
-
}, [
|
|
3502
|
+
}, [s("path", {
|
|
3503
3503
|
stroke: "#000",
|
|
3504
3504
|
d: "m1.875 8l.686-2.743a1 1 0 0 1 .97-.757h10.938a1 1 0 0 1 .97 1.243l-.315 1.26M6 13.5H2.004A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3505
|
-
}),
|
|
3505
|
+
}), s("path", {
|
|
3506
3506
|
stroke: "#E23730",
|
|
3507
3507
|
d: "M14.692 8.5H9.308a.31.31 0 0 0-.307.336l.47 5.241c.01.128.1.235.223.27l2.303 1.153l2.308-1.153a.31.31 0 0 0 .225-.27L15 8.836a.31.31 0 0 0-.307-.336"
|
|
3508
|
-
})], -1)])) : (
|
|
3508
|
+
})], -1)])) : (_(), o("svg", io, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), n[1] ||= s("g", {
|
|
3509
3509
|
fill: "none",
|
|
3510
3510
|
"stroke-linecap": "round",
|
|
3511
3511
|
"stroke-linejoin": "round"
|
|
3512
|
-
}, [
|
|
3512
|
+
}, [s("path", {
|
|
3513
3513
|
stroke: "#000",
|
|
3514
3514
|
d: "M4.5 4.5H12A1.5 1.5 0 0 1 13.5 6v.5m-7.5 7H2A1.5 1.5 0 0 1 .5 12V3.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v1"
|
|
3515
|
-
}),
|
|
3515
|
+
}), s("path", {
|
|
3516
3516
|
stroke: "#E23730",
|
|
3517
3517
|
d: "M14.692 8.5H9.308a.31.31 0 0 0-.307.336l.47 5.241c.01.128.1.235.223.27l2.303 1.153l2.308-1.153a.31.31 0 0 0 .225-.27L15 8.836a.31.31 0 0 0-.307-.336"
|
|
3518
3518
|
})], -1)]));
|
|
3519
3519
|
}
|
|
3520
|
-
}),
|
|
3521
|
-
const
|
|
3520
|
+
}), oo = ao;
|
|
3521
|
+
const so = {
|
|
3522
3522
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3523
3523
|
width: "1em",
|
|
3524
3524
|
height: "1em",
|
|
3525
3525
|
viewBox: "0 0 16 16"
|
|
3526
3526
|
};
|
|
3527
|
-
var
|
|
3527
|
+
var co = /* @__PURE__ */ l({
|
|
3528
3528
|
name: "VueIcones",
|
|
3529
3529
|
__name: "VueIcones",
|
|
3530
3530
|
setup(e) {
|
|
3531
|
-
return (e, t) => (
|
|
3531
|
+
return (e, t) => (_(), o("svg", so, [a(" Icon from Catppuccin Icons by Catppuccin - https://github.com/catppuccin/vscode-icons/blob/main/LICENSE "), t[0] ||= s("g", {
|
|
3532
3532
|
fill: "none",
|
|
3533
3533
|
stroke: "#65bb87",
|
|
3534
3534
|
"stroke-linecap": "round",
|
|
3535
3535
|
"stroke-linejoin": "round"
|
|
3536
|
-
}, [
|
|
3536
|
+
}, [s("path", { d: "M1 1.5h5.44L8 4.56L9.56 1.5H15l-6.99 13z" }), s("path", { d: "M12.05 1.73L8 9.28L3.95 1.73" })], -1)]));
|
|
3537
3537
|
}
|
|
3538
|
-
}),
|
|
3539
|
-
const
|
|
3538
|
+
}), lo = co;
|
|
3539
|
+
const uo = { class: "mt-0" }, fo = { class: "w-152 mb-2" }, po = { class: "inline-flex items-center text-inherit not-italic leading-[0] text-center normal-case [vertical-align:-0.125em] [text-rendering:optimizeLegibility] svg:size-4" }, mo = {
|
|
3540
3540
|
key: 1,
|
|
3541
3541
|
class: "flex items-center justify-center h-[220px]"
|
|
3542
3542
|
};
|
|
3543
|
-
var
|
|
3543
|
+
var ho = /* @__PURE__ */ l({
|
|
3544
3544
|
name: "ComponentSelect",
|
|
3545
3545
|
__name: "ComponentSelect",
|
|
3546
3546
|
props: {
|
|
@@ -3550,16 +3550,16 @@ var _o = /* @__PURE__ */ u({
|
|
|
3550
3550
|
scopeModifiers: {}
|
|
3551
3551
|
},
|
|
3552
3552
|
emits: ["update:modelValue", "update:scope"],
|
|
3553
|
-
setup(
|
|
3554
|
-
let
|
|
3555
|
-
id:
|
|
3556
|
-
initialFocusEl: () =>
|
|
3557
|
-
})),
|
|
3558
|
-
if (!
|
|
3559
|
-
let e =
|
|
3560
|
-
return [`${e}/${
|
|
3561
|
-
}), k =
|
|
3562
|
-
function
|
|
3553
|
+
setup(l) {
|
|
3554
|
+
let m = re.PRESENTED_IMAGE_SIMPLE, h = e(), g = S(l, "modelValue"), y = S(l, "scope"), b = C("searchInputRef"), [T, ce] = Ma(Oa({
|
|
3555
|
+
id: ee(),
|
|
3556
|
+
initialFocusEl: () => b.value
|
|
3557
|
+
})), E = r(() => Da(T.value, ce, Ia)), D = v(!1), O = v(""), le = r(() => {
|
|
3558
|
+
if (!g.value) return [];
|
|
3559
|
+
let e = y.value ? `module:${y.value}` : "local";
|
|
3560
|
+
return [`${e}/${g.value}`];
|
|
3561
|
+
}), k = v([]);
|
|
3562
|
+
function ue(e) {
|
|
3563
3563
|
return !e.includes("/");
|
|
3564
3564
|
}
|
|
3565
3565
|
function de(e) {
|
|
@@ -3574,78 +3574,30 @@ var _o = /* @__PURE__ */ u({
|
|
|
3574
3574
|
}
|
|
3575
3575
|
return n;
|
|
3576
3576
|
}
|
|
3577
|
-
function
|
|
3577
|
+
function A(e, t) {
|
|
3578
3578
|
let n = e || [], r = t?.node?.key, i = !!t?.expanded, a;
|
|
3579
|
-
a = r &&
|
|
3580
|
-
let o = n.filter((e) => !
|
|
3579
|
+
a = r && ue(r) ? i ? r : void 0 : r ? de(r) : n.find(ue);
|
|
3580
|
+
let o = n.filter((e) => !ue(String(e)) || String(e) === a);
|
|
3581
3581
|
k.value = o;
|
|
3582
3582
|
}
|
|
3583
3583
|
function j() {
|
|
3584
|
-
let e =
|
|
3584
|
+
let e = le.value[0];
|
|
3585
3585
|
if (!e) return;
|
|
3586
3586
|
let t = fe(e);
|
|
3587
3587
|
k.value = t;
|
|
3588
3588
|
}
|
|
3589
|
-
|
|
3589
|
+
w(le, () => {
|
|
3590
3590
|
j();
|
|
3591
|
-
}, { immediate: !0 }),
|
|
3591
|
+
}, { immediate: !0 }), w(D, (e) => {
|
|
3592
|
+
e && j();
|
|
3593
|
+
}), w(D, (e) => {
|
|
3592
3594
|
e && j();
|
|
3593
3595
|
});
|
|
3594
|
-
|
|
3595
|
-
let
|
|
3596
|
-
|
|
3597
|
-
key: t,
|
|
3598
|
-
root: !0,
|
|
3599
|
-
module: t !== "local",
|
|
3600
|
-
children: []
|
|
3601
|
-
}, a = (e, t, n) => {
|
|
3602
|
-
e.children ||= [];
|
|
3603
|
-
let r = e.children.find((e) => e.title === t && !e.isLeaf);
|
|
3604
|
-
return r || (r = {
|
|
3605
|
-
title: t,
|
|
3606
|
-
key: n,
|
|
3607
|
-
children: []
|
|
3608
|
-
}, e.children.push(r)), r;
|
|
3609
|
-
};
|
|
3610
|
-
for (let e of n) {
|
|
3611
|
-
let n = e.split("/").filter(Boolean), o = i, s = t;
|
|
3612
|
-
for (let t = 0; t < n.length; t++) {
|
|
3613
|
-
let i = n[t];
|
|
3614
|
-
s = s ? `${s}/${i}` : i;
|
|
3615
|
-
let c = t === n.length - 1;
|
|
3616
|
-
c ? (o.children = o.children || [], o.children.push({
|
|
3617
|
-
title: i,
|
|
3618
|
-
key: s,
|
|
3619
|
-
isLeaf: !0,
|
|
3620
|
-
value: e,
|
|
3621
|
-
scope: r
|
|
3622
|
-
})) : o = a(o, i, s);
|
|
3623
|
-
}
|
|
3624
|
-
}
|
|
3625
|
-
return i;
|
|
3626
|
-
}
|
|
3627
|
-
let me = i(() => {
|
|
3628
|
-
let n = t(), r = n?.pages || {}, i = e(), a = [];
|
|
3629
|
-
a.push(M("本地", "local", Object.keys(r)));
|
|
3630
|
-
for (let [e, t] of i) a.push(M(e, `module:${e}`, Object.keys(t), e));
|
|
3631
|
-
return a;
|
|
3632
|
-
}), he = i(() => {
|
|
3633
|
-
let e = O.value.trim().toLowerCase(), t = me.value;
|
|
3634
|
-
if (!e) return t;
|
|
3635
|
-
let n = (t) => {
|
|
3636
|
-
let r = [];
|
|
3637
|
-
for (let i of t || []) {
|
|
3638
|
-
let t = String(i?.title ?? "").toLowerCase(), a = String(i?.value ?? "").toLowerCase(), o = String(i?.key ?? "").toLowerCase(), s = t.includes(e) || a.includes(e) || o.includes(e), c;
|
|
3639
|
-
if (Array.isArray(i?.children) && i.children.length && (c = n(i.children)), s || c && c.length) {
|
|
3640
|
-
let e = { ...i };
|
|
3641
|
-
c ? e.children = c : e.children && delete e.children, r.push(e);
|
|
3642
|
-
}
|
|
3643
|
-
}
|
|
3644
|
-
return r;
|
|
3645
|
-
};
|
|
3646
|
-
return n(t);
|
|
3596
|
+
let M = r(() => {
|
|
3597
|
+
let e = O.value.trim();
|
|
3598
|
+
return e ? h.filterRouteTree(e) : h.getRouteTreeData();
|
|
3647
3599
|
});
|
|
3648
|
-
function
|
|
3600
|
+
function pe(e) {
|
|
3649
3601
|
let t = [], n = (e) => {
|
|
3650
3602
|
for (let r of e || []) {
|
|
3651
3603
|
let e = Array.isArray(r?.children) && r.children.length > 0;
|
|
@@ -3654,81 +3606,81 @@ var _o = /* @__PURE__ */ u({
|
|
|
3654
3606
|
};
|
|
3655
3607
|
return n(e), t;
|
|
3656
3608
|
}
|
|
3657
|
-
|
|
3609
|
+
w(O, (e) => {
|
|
3658
3610
|
let t = String(e || "").trim().length > 0;
|
|
3659
3611
|
if (t) {
|
|
3660
|
-
let e =
|
|
3661
|
-
k.value =
|
|
3612
|
+
let e = M.value;
|
|
3613
|
+
k.value = pe(e);
|
|
3662
3614
|
} else j();
|
|
3663
3615
|
});
|
|
3664
|
-
function
|
|
3616
|
+
function me(e, t) {
|
|
3665
3617
|
let n = t?.node, r = n?.dataRef ?? n;
|
|
3666
|
-
r?.isLeaf && (
|
|
3618
|
+
r?.isLeaf && (g.value = r.value || "", y.value = r.scope || "", O.value = "", D.value = !1);
|
|
3667
3619
|
}
|
|
3668
|
-
return (e,
|
|
3669
|
-
let
|
|
3670
|
-
return
|
|
3671
|
-
|
|
3672
|
-
value:
|
|
3673
|
-
"onUpdate:value":
|
|
3674
|
-
"addon-before":
|
|
3620
|
+
return (e, r) => {
|
|
3621
|
+
let l = se, h = oe, v = ie, b = ae;
|
|
3622
|
+
return _(), o("div", uo, [
|
|
3623
|
+
s("div", p(u(E.value.getTriggerProps())), [c(l, {
|
|
3624
|
+
value: g.value,
|
|
3625
|
+
"onUpdate:value": r[0] ||= (e) => g.value = e,
|
|
3626
|
+
"addon-before": y.value || "本地",
|
|
3675
3627
|
placeholder: "请输入或选择组件路径(views下的路径)"
|
|
3676
3628
|
}, null, 8, ["value", "addon-before"])], 16),
|
|
3677
|
-
|
|
3678
|
-
(
|
|
3679
|
-
default:
|
|
3629
|
+
a(" 始终挂载 Teleport,内部用 Transition 控制出现/消失动画 "),
|
|
3630
|
+
(_(), i(n, { to: "body" }, [E.value.open ? (_(), o("div", d({ key: 0 }, E.value.getPositionerProps(), { class: "z-1050" }), [s("div", d(E.value.getContentProps(), { class: "z-1050 w-162 rounded-md border border-solid p-4 border-[--g-border-color] shadow-md outline-none bg-#ffffff dark:bg-#141414 text-dark dark:text-light data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95" }), [s("div", fo, [c(h, null, {
|
|
3631
|
+
default: te(() => [c(l, {
|
|
3680
3632
|
ref: "searchInputRef",
|
|
3681
|
-
value:
|
|
3682
|
-
"onUpdate:value":
|
|
3633
|
+
value: O.value,
|
|
3634
|
+
"onUpdate:value": r[1] ||= (e) => O.value = e,
|
|
3683
3635
|
"allow-clear": "",
|
|
3684
3636
|
size: "small",
|
|
3685
3637
|
placeholder: "搜索组件或路径"
|
|
3686
3638
|
}, null, 8, ["value"])]),
|
|
3687
3639
|
_: 1
|
|
3688
|
-
})]),
|
|
3640
|
+
})]), M.value && M.value.length ? (_(), i(v, {
|
|
3689
3641
|
key: 0,
|
|
3690
|
-
"expanded-keys":
|
|
3691
|
-
"onUpdate:expandedKeys":
|
|
3642
|
+
"expanded-keys": k.value,
|
|
3643
|
+
"onUpdate:expandedKeys": r[2] ||= (e) => k.value = e,
|
|
3692
3644
|
class: "w-152 h-100 overflow-y-auto directory-tree-root",
|
|
3693
|
-
"selected-keys":
|
|
3694
|
-
"tree-data":
|
|
3645
|
+
"selected-keys": le.value,
|
|
3646
|
+
"tree-data": M.value,
|
|
3695
3647
|
"show-icon": !0,
|
|
3696
3648
|
"show-line": !0,
|
|
3697
3649
|
virtual: !0,
|
|
3698
3650
|
"expand-action": "click",
|
|
3699
|
-
onExpand:
|
|
3700
|
-
onSelect:
|
|
3651
|
+
onExpand: A,
|
|
3652
|
+
onSelect: me
|
|
3701
3653
|
}, {
|
|
3702
|
-
switcherIcon:
|
|
3703
|
-
icon:
|
|
3654
|
+
switcherIcon: te(({ switcherCls: e }) => [c(x(ne), { class: f(e) }, null, 8, ["class"])]),
|
|
3655
|
+
icon: te(({ expanded: e, dataRef: n }) => [s("span", po, [a(" 根:无 '/' 的 key 表示 "), n?.root && !n?.module ? (_(), i(Qa, {
|
|
3704
3656
|
key: 0,
|
|
3705
3657
|
expanded: e
|
|
3706
|
-
}, null, 8, ["expanded"])) :
|
|
3658
|
+
}, null, 8, ["expanded"])) : n?.root && n?.module ? (_(), i(Ja, {
|
|
3707
3659
|
key: 1,
|
|
3708
3660
|
expanded: e
|
|
3709
|
-
}, null, 8, ["expanded"])) :
|
|
3661
|
+
}, null, 8, ["expanded"])) : n?.isLeaf ? (_(), o(t, { key: 2 }, [a(" 叶子:Vue 文件图标 "), c(lo)], 2112)) : ["components", "component"].includes(String(n?.title).toLowerCase()) ? (_(), o(t, { key: 3 }, [a(" 特殊目录 "), c(Ba, { expanded: e }, null, 8, ["expanded"])], 2112)) : [
|
|
3710
3662
|
"views",
|
|
3711
3663
|
"view",
|
|
3712
3664
|
"pages",
|
|
3713
3665
|
"page"
|
|
3714
|
-
].includes(String(
|
|
3666
|
+
].includes(String(n?.title).toLowerCase()) ? (_(), i(oo, {
|
|
3715
3667
|
key: 4,
|
|
3716
3668
|
expanded: e
|
|
3717
|
-
}, null, 8, ["expanded"])) : ["src"].includes(String(
|
|
3669
|
+
}, null, 8, ["expanded"])) : ["src"].includes(String(n?.title).toLowerCase()) ? (_(), i(no, {
|
|
3718
3670
|
key: 5,
|
|
3719
3671
|
expanded: e
|
|
3720
|
-
}, null, 8, ["expanded"])) : (
|
|
3672
|
+
}, null, 8, ["expanded"])) : (_(), o(t, { key: 6 }, [a(" 其他目录 "), c(Wa, { expanded: e }, null, 8, ["expanded"])], 2112))])]),
|
|
3721
3673
|
_: 1
|
|
3722
3674
|
}, 8, [
|
|
3723
3675
|
"expanded-keys",
|
|
3724
3676
|
"selected-keys",
|
|
3725
3677
|
"tree-data"
|
|
3726
|
-
])) : (
|
|
3727
|
-
image:
|
|
3678
|
+
])) : (_(), o("div", mo, [c(b, {
|
|
3679
|
+
image: x(m),
|
|
3728
3680
|
description: "没有找到匹配的组件"
|
|
3729
|
-
}, null, 8, ["image"])]))], 16)], 16)) :
|
|
3681
|
+
}, null, 8, ["image"])]))], 16)], 16)) : a("v-if", !0)]))
|
|
3730
3682
|
]);
|
|
3731
3683
|
};
|
|
3732
3684
|
}
|
|
3733
|
-
}),
|
|
3734
|
-
export {
|
|
3685
|
+
}), go = ho;
|
|
3686
|
+
export { go as b };
|