@abtnode/blocklet-services 1.16.34-beta-20241212-094401-992d20c3 → 1.16.34-beta-20241212-152152-0b8d4bb3
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/assets/{Add-C1nQeShb.js → Add-C-MUV7pC.js} +1 -1
- package/dist/assets/{Alert-iJ5LuaCk.js → Alert-DbN0O0aN.js} +1 -1
- package/dist/assets/{ArrowDropDown-CQXEFQxo.js → ArrowDropDown-BD-n5g-y.js} +1 -1
- package/dist/assets/{Autocomplete-pIKk2eVs.js → Autocomplete-xp0cyiCL.js} +1 -1
- package/dist/assets/{Avatar-CK2uhq36.js → Avatar-BbstlMJY.js} +1 -1
- package/dist/assets/{ButtonGroup-Bp8K8t99.js → ButtonGroup-YqMGRNaj.js} +1 -1
- package/dist/assets/{CSSTransition-BiLOHiFG.js → CSSTransition-CXxbf41Q.js} +1 -1
- package/dist/assets/{CheckCircle-Co6tqk2_.js → CheckCircle-C-J8R9KR.js} +1 -1
- package/dist/assets/{ChevronLeft-BxrUDpg9.js → ChevronLeft-dqkQph81.js} +1 -1
- package/dist/assets/{ChevronRight-LRF29STG.js → ChevronRight-B2k9Gvlw.js} +1 -1
- package/dist/assets/{Delete-DSU3unjA.js → Delete-DOl4nPF3.js} +1 -1
- package/dist/assets/{DeleteOutline-BgE0Ic8-.js → DeleteOutline-DYH6KsRs.js} +1 -1
- package/dist/assets/{DialogContentText-D0NNwkeT.js → DialogContentText-COq3rw-i.js} +1 -1
- package/dist/assets/{Done-Be2SmAlg.js → Done-DEI256sV.js} +1 -1
- package/dist/assets/{Download-pIHrX3vZ.js → Download-B7Y03H7t.js} +1 -1
- package/dist/assets/{EditIcon-Cbohlczs.js → EditIcon-WRiAz_Ii.js} +1 -1
- package/dist/assets/{Error-BUT7fzHG.js → Error-BqDO0zZY.js} +1 -1
- package/dist/assets/{ExpandMore-KqCHJkjd.js → ExpandMore-BO8jF1bn.js} +1 -1
- package/dist/assets/{FormControl-CaNHX_WE.js → FormControl-BsxgOlTX.js} +1 -1
- package/dist/assets/{FormControlLabel-CM40R8io.js → FormControlLabel-Dgpj-XRb.js} +1 -1
- package/dist/assets/{FormGroup-qJm7wRKa.js → FormGroup-b58twP-q.js} +1 -1
- package/dist/assets/{Google-Cr3iapZS.js → Google-D_mc2y32.js} +1 -1
- package/dist/assets/{Grid-Db2Mop7W.js → Grid-tsC4khHx.js} +1 -1
- package/dist/assets/{HelpOutline-B9qgy25t.js → HelpOutline-BoXfs1w7.js} +1 -1
- package/dist/assets/{Hidden-DLBuIv7F.js → Hidden-ipoc6BxF.js} +1 -1
- package/dist/assets/{InfoOutlined-CGSgEl4M.js → InfoOutlined-BxU1CEPg.js} +1 -1
- package/dist/assets/{InputAdornment-DzD0sRkN.js → InputAdornment-BiYr4cW6.js} +1 -1
- package/dist/assets/{LastPage-BOr2ND8w.js → LastPage--sm4pHpX.js} +1 -1
- package/dist/assets/{Launch-BcNkkajr.js → Launch-6LXlwp2H.js} +1 -1
- package/dist/assets/{LaunchOutlined-Dp0PUpjm.js → LaunchOutlined-B6l7-o_Y.js} +1 -1
- package/dist/assets/{Link-2fGujOUt.js → Link-fX4KUiej.js} +1 -1
- package/dist/assets/{ListItemButton-nzpC-0O3.js → ListItemButton-YchFGwTe.js} +1 -1
- package/dist/assets/{ListSubheader-Co5IKWNV.js → ListSubheader-CKfDOFlq.js} +1 -1
- package/dist/assets/{LoadingButton-BLLNBTpp.js → LoadingButton-C4TIaNaq.js} +1 -1
- package/dist/assets/{LockIcon-Co2nc3R-.js → LockIcon-DtPBoSNv.js} +1 -1
- package/dist/assets/{Loop-eDzuS5A8.js → Loop-BmB9k803.js} +1 -1
- package/dist/assets/{MarkEmailRead-Bz78hW-g.js → MarkEmailRead-D59Dom04.js} +1 -1
- package/dist/assets/{Menu-DhTcPFFg.js → Menu-CasLu-ky.js} +1 -1
- package/dist/assets/{MoreHoriz-CiFfgU7T.js → MoreHoriz-B5aoiijW.js} +1 -1
- package/dist/assets/{MoreVert-CnP4tlfW.js → MoreVert-C9UJnjfF.js} +1 -1
- package/dist/assets/{OpenInNew-wRBFPxYN.js → OpenInNew-YMhtYwHE.js} +1 -1
- package/dist/assets/{Pagination-d74fT1aA.js → Pagination-Df9SRmt8.js} +1 -1
- package/dist/assets/{PlayArrow-BP9c_PbO.js → PlayArrow-BEtJ369o.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-CnYDphAK.js → QuestionMarkCircle-CuvZsXbn.js} +1 -1
- package/dist/assets/{RadioGroup-DqJy976P.js → RadioGroup-CGMGVlf2.js} +1 -1
- package/dist/assets/{Search-BUQwWdGK.js → Search-CKwfa740.js} +1 -1
- package/dist/assets/{Select-DfXeNuuX.js → Select-B3cdfIzb.js} +1 -1
- package/dist/assets/{ServerLogo-D2TthD_2.js → ServerLogo-BAQKQJ7V.js} +1 -1
- package/dist/assets/{Skeleton-CtJF2jxE.js → Skeleton-D0-q_hvU.js} +1 -1
- package/dist/assets/{Stack-Cbz2Ba80.js → Stack-BO9M0PIW.js} +1 -1
- package/dist/assets/{Stepper-D69UTbN9.js → Stepper-RItm9i-D.js} +1 -1
- package/dist/assets/{TextField-DOQ6HCtN.js → TextField-BWghiml0.js} +1 -1
- package/dist/assets/{Toolbar-BSr5R_Vy.js → Toolbar-DYiylaGG.js} +1 -1
- package/dist/assets/{ViewColumn-jwNpytDn.js → ViewColumn-Bz1lupxM.js} +1 -1
- package/dist/assets/{ViewList-CYzAj7Hx.js → ViewList-BaL8evRq.js} +1 -1
- package/dist/assets/{_createAggregator-pBBTWykm.js → _createAggregator-aO50YhXH.js} +1 -1
- package/dist/assets/{access-control-C_cAhlF9.js → access-control-DplRO33H.js} +1 -1
- package/dist/assets/{actions-PA9gofB9.js → actions-CchlEsiO.js} +1 -1
- package/dist/assets/{add-component-core-Dcn6LJQK.js → add-component-core-oabwwAHL.js} +1 -1
- package/dist/assets/add-resource-Pr1QILYG.js +1 -0
- package/dist/assets/{addon-r7kUiMP-.js → addon-k5gcfsfJ.js} +1 -1
- package/dist/assets/{analytics-rsi5FKLm.js → analytics-9EII-v2b.js} +1 -1
- package/dist/assets/api-BKvFaP38.js +1 -0
- package/dist/assets/{audit-logs-CH6T6B2J.js → audit-logs-BRW30t3L.js} +1 -1
- package/dist/assets/{base32-ZtLFNpcN.js → base32-Cog_VZ0k.js} +1 -1
- package/dist/assets/{branding-C8ml5kNH.js → branding-CJWvfGxB.js} +2 -2
- package/dist/assets/{bundle-avatar-DyTM8WQd.js → bundle-avatar-C-1ahBAR.js} +1 -1
- package/dist/assets/{button-BFSFvR_A.js → button-CSzyfzmK.js} +1 -1
- package/dist/assets/{click-to-copy-w7Ji7CaD.js → click-to-copy-BBLmW78J.js} +1 -1
- package/dist/assets/{complete-Cb3ZKLDp.js → complete-BRGGVyCs.js} +1 -1
- package/dist/assets/{component-BttQYlKQ.js → component-BOFPPqD8.js} +1 -1
- package/dist/assets/{config-71HZv7Uy.js → config-BuQgZfpX.js} +1 -1
- package/dist/assets/{config-BQoh6z2Q.js → config-iLqs6SqP.js} +1 -1
- package/dist/assets/{config-navigation-4DAa-_Fk.js → config-navigation-C5_bJU0f.js} +3 -3
- package/dist/assets/{config-space-Bb5itYIJ.js → config-space-C56d0lRU.js} +1 -1
- package/dist/assets/{confirm-DX7EKcPZ.js → confirm-DGKnhqaC.js} +1 -1
- package/dist/assets/{connect-BPiDmbal.js → connect-DOaWC9ft.js} +1 -1
- package/dist/assets/connect-o-hOItU0.js +1 -0
- package/dist/assets/{connect-to-Rg6wA-5G.js → connect-to-CUmo43dQ.js} +1 -1
- package/dist/assets/{content-layout-iqKCql_J.js → content-layout-Coi8AV4p.js} +1 -1
- package/dist/assets/{dashboard-Cs4FXzC7.js → dashboard-CazjqRmG.js} +3 -3
- package/dist/assets/{deprecate-CKppWMXG.js → deprecate-B2OaYvW_.js} +1 -1
- package/dist/assets/{did-address-CB4lfH0r.js → did-address-CqYEOOvT.js} +1 -1
- package/dist/assets/{domain-Cb0Uau0F.js → domain-BjG22k3m.js} +1 -1
- package/dist/assets/{domain-list-DulZfn13.js → domain-list-IwhSKnxn.js} +1 -1
- package/dist/assets/{email-3ECA5w-_.js → email-DD_llVWt.js} +3 -3
- package/dist/assets/emotion-cache.browser.esm-CuIm0Hab.js +1 -0
- package/dist/assets/{exchange-passport-CA8TDWKw.js → exchange-passport-Bj5rusMj.js} +1 -1
- package/dist/assets/{fallback-BZhTu5Oh.js → fallback-CVomANXA.js} +1 -1
- package/dist/assets/{form-text-input-DLNaWTPW.js → form-text-input-dBeTAT7j.js} +1 -1
- package/dist/assets/{format-error-1Lis-uF_.js → format-error-CXOPpcrE.js} +1 -1
- package/dist/assets/{fuel-BOQHr8eq.js → fuel-CDp9ZffP.js} +1 -1
- package/dist/assets/{fullpage-DnVixzGx.js → fullpage-CWXnpLtu.js} +1 -1
- package/dist/assets/{get-safe-url-Dt7ijVSo.js → get-safe-url-B3_JzMvg.js} +1 -1
- package/dist/assets/{get-safe-url-lUdeRv8D.js → get-safe-url-DLq03enx.js} +1 -1
- package/dist/assets/{home-DYGt1YMw.js → home-CSMD2Z1d.js} +1 -1
- package/dist/assets/{iframe-C4u7rkcg.js → iframe-DCD_qn_b.js} +1 -1
- package/dist/assets/{index-DOFqZN5d.js → index-2Q0z0xFE.js} +1 -1
- package/dist/assets/{index-BBE5mldg.js → index-B-5mC5YF.js} +1 -1
- package/dist/assets/{index-BmEVYZ0B.js → index-B2QN3yxT.js} +1 -1
- package/dist/assets/{index-B7gN4NXk.js → index-BAC0visH.js} +1 -1
- package/dist/assets/{index-Cy4Hlro0.js → index-BJPpUK5T.js} +4 -4
- package/dist/assets/{index-DjU0qBQi.js → index-BLKPMstc.js} +3 -3
- package/dist/assets/{index-DI6q0QP0.js → index-BWCk5LbW.js} +1 -1
- package/dist/assets/{index-EX_MbQwv.js → index-BbwkcNKT.js} +1 -1
- package/dist/assets/{index-CNhsewzY.js → index-BkwS3xmJ.js} +1 -1
- package/dist/assets/{index-CoVJWI5f.js → index-Bw4jUIg2.js} +1 -1
- package/dist/assets/{index-BmtYu7Fn.js → index-C03QRPVb.js} +1 -1
- package/dist/assets/{index-CVgj8Cb_.js → index-C2TlC4O6.js} +1 -1
- package/dist/assets/{index-CmV5Mq7z.js → index-C2ynZPOY.js} +1 -1
- package/dist/assets/{index-DGzsRulL.js → index-C7otKf8F.js} +18 -18
- package/dist/assets/{index-ePiUjwpi.js → index-CGNW_HS5.js} +1 -1
- package/dist/assets/{index-DNY7qrU0.js → index-CMGrAADS.js} +1 -1
- package/dist/assets/{index-u7oF74QX.js → index-CS43LeKQ.js} +1 -1
- package/dist/assets/{index-mCLLq5m9.js → index-CgETkxdp.js} +1 -1
- package/dist/assets/{index-NbkqJrp9.js → index-Ci5RfQ59.js} +1 -1
- package/dist/assets/{index-Drig7Te_.js → index-ClKfKXJz.js} +1 -1
- package/dist/assets/{index-B60U9n9s.js → index-CxwdZ5FQ.js} +1 -1
- package/dist/assets/{index-DkHox4xj.js → index-D7VlJHOF.js} +1 -1
- package/dist/assets/{index-CMjubw1F.js → index-DEcPGLHC.js} +1 -1
- package/dist/assets/{index-CBB-5-Fg.js → index-DIA9qwvc.js} +3 -3
- package/dist/assets/{index-BcOmNdAe.js → index-DOuTbUzq.js} +1 -1
- package/dist/assets/{index-BnD07vEe.js → index-DQSbUwd9.js} +1 -1
- package/dist/assets/{index-_bdUNXFU.js → index-DbAVBGvq.js} +1 -1
- package/dist/assets/{index-C96-iRDl.js → index-DnlBG2uS.js} +1 -1
- package/dist/assets/{index-C6zAp9ae.js → index-DsAOaF68.js} +1 -1
- package/dist/assets/{index-Di1V9YVU.js → index-DvbaB47F.js} +1 -1
- package/dist/assets/{index-C5MG9U8U.js → index-MlLLj7ox.js} +1 -1
- package/dist/assets/{index-DxbuhOiB.js → index-UA6q4JVO.js} +1 -1
- package/dist/assets/{index-CHwiUR6k.js → index-unKKAfCB.js} +1 -1
- package/dist/assets/{invitation-PiXM67Sk.js → invitation-8Vja2ez-.js} +1 -1
- package/dist/assets/{invite-C9Yw2pAn.js → invite-CagtO6bL.js} +1 -1
- package/dist/assets/{isEmail-Coj5s-39.js → isEmail-B6BHZ8TX.js} +1 -1
- package/dist/assets/{issue-passport-Cjf_Mocz.js → issue-passport-D8pAGg2V.js} +1 -1
- package/dist/assets/{item-B8m0suj0.js → item-rGVvbhmE.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-DKWAdmjE.js → jss-plugin-props-sort.esm-BqC3mtsa.js} +1 -1
- package/dist/assets/{launch-result-message-B9M4sRIa.js → launch-result-message-fLJdiQ4t.js} +1 -1
- package/dist/assets/{layout-B5m9mlM0.js → layout-Df9B9CD5.js} +1 -1
- package/dist/assets/{list-header-0KT6y_BM.js → list-header-8wYyLFjq.js} +1 -1
- package/dist/assets/localization-BSqs41PK.js +1 -0
- package/dist/assets/{log-CglUtkzm.js → log-CXrE-Pqc.js} +1 -1
- package/dist/assets/{login-oauth-callback-DpyoNyTz.js → login-oauth-callback-CgPqb7Lq.js} +1 -1
- package/dist/assets/login-wunPRpnb.js +1 -0
- package/dist/assets/{logo-uploader-CyBBRQZr.js → logo-uploader-DESUa9bt.js} +3 -3
- package/dist/assets/{lost-passport-Dmte0raX.js → lost-passport-Bh8A1qX6.js} +3 -3
- package/dist/assets/{lottie-react.esm-CuKD06jE.js → lottie-react.esm-BSqfmkGG.js} +1 -1
- package/dist/assets/{notifications-DNMNfjky.js → notifications-0BDelSaD.js} +1 -1
- package/dist/assets/{open-window-BtScmt0K.js → open-window-ByvPY_IP.js} +1 -1
- package/dist/assets/{overview-BMro87hQ.js → overview-NyLZyTzQ.js} +1 -1
- package/dist/assets/{page-header-BUEIkLm3.js → page-header-9hNVxRoa.js} +1 -1
- package/dist/assets/{permission-o3vQjnQO.js → permission-CaRXgle6.js} +1 -1
- package/dist/assets/{preferences-ByuGQFwv.js → preferences-CUsklTmz.js} +1 -1
- package/dist/assets/publish-resource-7Yi_94S6.js +1 -0
- package/dist/assets/{raf-schd.esm-ix5J9j_j.js → raf-schd.esm-Bnef47nT.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-DepcixRR.js → react-beautiful-dnd.esm-CpS0-Aqe.js} +1 -1
- package/dist/assets/refType-BNRJ1Xey.js +1 -0
- package/dist/assets/{resource-dialog-yPaVsPdv.js → resource-dialog-CWTUaf-O.js} +1 -1
- package/dist/assets/sdk-DNBFu3Vd.js +1 -0
- package/dist/assets/{selector-DcNyUtxe.js → selector-Bgtpcya_.js} +1 -1
- package/dist/assets/session-SThzCGTr.js +1 -0
- package/dist/assets/{setup-CE6OnSLJ.js → setup-CWvIujH2.js} +3 -3
- package/dist/assets/{shorten-label-Bmnm91oD.js → shorten-label-DtvVN3_a.js} +1 -1
- package/dist/assets/{simple-select-CAkcIkbq.js → simple-select-DE145g5Z.js} +1 -1
- package/dist/assets/{slicedToArray-CF1w2CUM.js → slicedToArray-gtBWtJl8.js} +1 -1
- package/dist/assets/{start-DdyyfGdM.js → start-C4tmiEBt.js} +1 -1
- package/dist/assets/{step-actions-1sdy5Gfy.js → step-actions-Bbj9n3cG.js} +1 -1
- package/dist/assets/{studio-K3uTI8bF.js → studio-GA30qFJk.js} +1 -1
- package/dist/assets/{switch-control-NOe0-RU_.js → switch-control-86ykn9ge.js} +1 -1
- package/dist/assets/{toUpper-DyYOebau.js → toUpper--yB2KjPh.js} +1 -1
- package/dist/assets/{transfer-Bg1lqc0D.js → transfer-BqyfwC5R.js} +1 -1
- package/dist/assets/{trim-BPnZElfT.js → trim-08Op5xjY.js} +1 -1
- package/dist/assets/{uniqBy-vxxYJI7E.js → uniqBy-DFF7Lt_J.js} +1 -1
- package/dist/assets/{unsubscribe-aF2VZOBu.js → unsubscribe-Dy2MxVJy.js} +1 -1
- package/dist/assets/{url-join-DqZ85jnv.js → url-join-fD9yT9x3.js} +1 -1
- package/dist/assets/{use-mobile-BRb29OgG.js → use-mobile-Bdr2kObC.js} +1 -1
- package/dist/assets/{use-mobile-JJgEbZjW.js → use-mobile-BjsDuAgv.js} +1 -1
- package/dist/assets/{useAsync-DOt5IhGm.js → useAsync-Co-ihL9T.js} +1 -1
- package/dist/assets/{useFormControl-Dzn6kw8p.js → useFormControl-Ef5WMbDC.js} +1 -1
- package/dist/assets/{useLocalStorage-vvm6X67T.js → useLocalStorage-DElqf361.js} +1 -1
- package/dist/assets/{useSetState-Ck4WIGAD.js → useSetState-CuEGVXqh.js} +1 -1
- package/dist/assets/{useSlot-Dp6uU_kv.js → useSlot-C9LBI1FF.js} +1 -1
- package/dist/assets/{useSlotProps-CDbmJPTL.js → useSlotProps-CP7QQ02c.js} +1 -1
- package/dist/assets/{useThemeProps-BEgps8co.js → useThemeProps-55Y0sL0H.js} +1 -1
- package/dist/assets/{user-center-CuV05zdf.js → user-center-PWXrG48O.js} +1 -1
- package/dist/assets/{user-sessions-DBqL7D9B.js → user-sessions-CbhSRGeB.js} +1 -1
- package/dist/assets/{util-DV2X-o-n.js → util-D3UE9Z7D.js} +1 -1
- package/dist/assets/{wrap-locale-B9zuIW6Z.js → wrap-locale-CuTZ5aof.js} +1 -1
- package/dist/index.html +3 -1
- package/dist/service-worker.js +1 -1
- package/package.json +37 -37
- package/dist/assets/add-resource-Blu4gXgW.js +0 -1
- package/dist/assets/api-BoPFHIT2.js +0 -1
- package/dist/assets/connect-BC9XxmfK.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-CGUrlGyF.js +0 -1
- package/dist/assets/localization-kfO2QUx2.js +0 -1
- package/dist/assets/login-CHeDj655.js +0 -1
- package/dist/assets/publish-resource-B0OoBj2x.js +0 -1
- package/dist/assets/refType-PUbxxJqu.js +0 -1
- package/dist/assets/sdk-DWAzU184.js +0 -1
- package/dist/assets/session-Ch-RBLnQ.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{a3 as s,B as d,P as o,u as q,r as u,j as i,c as z,a8 as S,bE as j}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DIA9qwvc.js","assets/index-C7otKf8F.js","assets/index-B4oT57Ax.css","assets/url-join-fD9yT9x3.js","assets/index-DvbaB47F.js","assets/_createAggregator-aO50YhXH.js","assets/index-DnlBG2uS.js","assets/index-CgETkxdp.js","assets/resource-dialog-CWTUaf-O.js","assets/fallback-CVomANXA.js","assets/index-BkwS3xmJ.js","assets/Menu-CasLu-ky.js","assets/Toolbar-DYiylaGG.js","assets/Hidden-ipoc6BxF.js","assets/index-BWCk5LbW.js","assets/MoreVert-C9UJnjfF.js","assets/FormControlLabel-Dgpj-XRb.js","assets/useFormControl-Ef5WMbDC.js","assets/Stack-BO9M0PIW.js","assets/ListItemButton-YchFGwTe.js","assets/selector-Bgtpcya_.js","assets/ExpandMore-BO8jF1bn.js","assets/Avatar-BbstlMJY.js","assets/useSlot-C9LBI1FF.js","assets/index-CMGrAADS.js","assets/OpenInNew-YMhtYwHE.js","assets/index-CxwdZ5FQ.js","assets/Link-fX4KUiej.js","assets/Skeleton-D0-q_hvU.js","assets/HelpOutline-BoXfs1w7.js","assets/index-DEcPGLHC.js","assets/ButtonGroup-YqMGRNaj.js","assets/DialogContentText-COq3rw-i.js","assets/TextField-BWghiml0.js","assets/FormControl-BsxgOlTX.js","assets/Select-B3cdfIzb.js","assets/use-mobile-Bdr2kObC.js","assets/index-B-5mC5YF.js","assets/index-Ci5RfQ59.js","assets/index-C2ynZPOY.js","assets/emotion-cache.browser.esm-CuIm0Hab.js","assets/purify.es-DutPtr9A.js","assets/index-DOuTbUzq.js","assets/index-C03QRPVb.js","assets/useThemeProps-55Y0sL0H.js","assets/toPropertyKey-PLuKRk1e.js","assets/ViewColumn-Bz1lupxM.js","assets/FormGroup-b58twP-q.js","assets/Grid-tsC4khHx.js","assets/Delete-DOl4nPF3.js","assets/LastPage--sm4pHpX.js","assets/redux-CluOqhW1.js","assets/Search-CKwfa740.js","assets/deprecate-B2OaYvW_.js","assets/uniqBy-DFF7Lt_J.js","assets/toUpper--yB2KjPh.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a3 as s,B as d,P as o,u as q,r as u,j as i,c as z,a8 as S,bE as j}from"./index-C7otKf8F.js";import{c as E}from"./index-CgETkxdp.js";const O=s.span`
|
|
3
3
|
color: ${e=>e.theme.palette.error.main};
|
|
4
4
|
&::before {
|
|
5
5
|
content: '*';
|
|
@@ -100,7 +100,7 @@ import{a3 as s,B as d,P as o,u as q,r as u,j as i,c as z,a8 as S,bE as j}from"./
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
`,F=u.lazy(()=>S(()=>import("./index-
|
|
103
|
+
`,F=u.lazy(()=>S(()=>import("./index-DIA9qwvc.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56])).then(e=>({default:e.Uploader}))),U="/blocklet/logo/upload";function c({url:e,height:f,width:m,enabled:l,allowSVG:h,type:t,did:a,prefix:x,headers:g,aspectRatio:p,minWidth:b,minHeight:w,onUploaded:v}){const{t:y}=q(),n=u.useRef(null),R=()=>{var r;(r=n.current)==null||r.open()},P=()=>{var r;v(),(r=n.current)==null||r.close()},k={cursor:l?"pointer":"default","&::after":{content:`"${y("common.switch")}"`}},$=["square","favicon"].includes(t);return i.jsxs(_,{id:`uploader-${a}-${t}`,children:[i.jsx(F,{ref:n,popup:!0,onUploadFinish:P,plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:z(x,U,t,a),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:h?["image/*","application/svg+xml"]:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:p,initialAspectRatio:p,croppedCanvasOptions:{minWidth:b,minHeight:w}}},tusProps:{headers:g}}),i.jsx(d,{className:E("uploader-wrapper",l&&"enabled"),sx:k,onClick:R,children:i.jsx("img",{alt:t,src:e,style:{width:$?m:"auto",height:f}})})]},`uploader-${a}-${t}`)}c.propTypes={url:o.string.isRequired,type:o.oneOf(["square","rect","favicon","splash-portrait","splash-landscape"]).isRequired,did:o.string.isRequired,prefix:o.string.isRequired,headers:o.func,onUploaded:o.func,height:o.number,width:o.any,enabled:o.bool,allowSVG:o.bool,aspectRatio:o.number,minWidth:o.number,minHeight:o.number};c.defaultProps={height:80,width:"auto",enabled:!0,allowSVG:!0,headers:()=>({}),onUploaded:j,aspectRatio:1,minWidth:120,minHeight:120};const _=s.div`
|
|
104
104
|
.uploader-wrapper {
|
|
105
105
|
display: inline-flex;
|
|
106
106
|
position: relative;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{r as d,Z as B,_ as H,$ as X,a0 as O,a1 as q,a2 as G,j as t,a3 as E,P as y,a4 as V,I as J,a5 as Q,f as Y,U as I,B as g,a6 as M,T as D,a7 as $,O as Z,L as K,a8 as ee,a9 as te,V as se,u as ae,H as oe,W as ne,Y as re,x as ie,y as ce}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D7VlJHOF.js","assets/index-C7otKf8F.js","assets/index-B4oT57Ax.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as d,Z as B,_ as H,$ as X,a0 as O,a1 as q,a2 as G,j as t,a3 as E,P as y,a4 as V,I as J,a5 as Q,f as Y,U as I,B as g,a6 as M,T as D,a7 as $,O as Z,L as K,a8 as ee,a9 as te,V as se,u as ae,H as oe,W as ne,Y as re,x as ie,y as ce}from"./index-C7otKf8F.js";import{d as le}from"./CheckCircle-C-J8R9KR.js";import{d as pe}from"./ViewList-BaL8evRq.js";import{d as de}from"./Done-DEI256sV.js";import{N as ue}from"./index-C2ynZPOY.js";import{W as me}from"./did-address-CqYEOOvT.js";import{w as fe}from"./wrap-locale-CuTZ5aof.js";import{u as he}from"./use-passport-id-B-b-_oYF.js";import{g as xe}from"./get-safe-url-B3_JzMvg.js";import{A as ge}from"./Avatar-BbstlMJY.js";import{S as ve,a as we,b as be}from"./Stepper-RItm9i-D.js";import"./emotion-cache.browser.esm-CuIm0Hab.js";import"./purify.es-DutPtr9A.js";import"./Link-fX4KUiej.js";import"./useSlot-C9LBI1FF.js";var P=function(s){if(!s)return 0;var r=O(s).valueOf()-Date.now();return r<0?0:r},je=function(s){return{days:Math.floor(s/864e5),hours:Math.floor(s/36e5)%24,minutes:Math.floor(s/6e4)%60,seconds:Math.floor(s/1e3)%60,milliseconds:Math.floor(s)%1e3}},ye=function(s){s===void 0&&(s={});var r=s||{},l=r.leftTime,p=r.targetDate,i=r.interval,u=i===void 0?1e3:i,w=r.onEnd,v=d.useMemo(function(){return B(l)&&l>0?Date.now()+l:void 0},[l]),a="leftTime"in s?v:p,h=H(d.useState(function(){return P(a)}),2),x=h[0],m=h[1],o=X(w);d.useEffect(function(){if(!a){m(0);return}m(P(a));var b=setInterval(function(){var n,c=P(a);m(c),c===0&&(clearInterval(b),(n=o.current)===null||n===void 0||n.call(o))},u);return function(){return clearInterval(b)}},[a,u]);var j=d.useMemo(function(){return je(x)},[x]);return[x,j]},k={},Se=G;Object.defineProperty(k,"__esModule",{value:!0});var R=k.default=void 0,Pe=Se(q()),ke=t;R=k.default=(0,Pe.default)((0,ke.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");function T({list:s,width:r,height:l,cardSpace:p,onSelect:i,defaultIndex:u}){const[w,v]=d.useState(0),[a,h]=d.useState(0),x=d.useRef(null),m=n=>{if(n<0||n>s.length-1)return;v(n);const c=x.current.clientWidth;h(n*(r+p)-(c-r)/2+p*.5),i(n)};d.useEffect(()=>{m(u);const n=c=>c.preventDefault();x.current.addEventListener("touchmove",n,{passive:!1})},[]);let o;const j=n=>{o=n.touches[0].clientX},b=n=>{const c=n.changedTouches[0],S=o-c.clientX;Math.abs(S)>60&&(S>0?m(w+1):m(w-1))};return t.jsx(Te,{ref:x,onTouchStart:j,onTouchEnd:b,children:t.jsx("div",{className:"card-container",style:{transform:`translate(${-a}px, 0)`},children:s.map((n,c)=>t.jsx("div",{className:`card-item ${c===w?"selected":""}`,style:{width:r,height:l,margin:p/2},onClick:()=>m(c),children:n.display?t.jsx("div",{className:"card-content",children:t.jsx(ue,{data:n.display,style:{width:"100%",height:"100%"}})}):t.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const Te=E.div`
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
|
|
5
5
|
overflow: hidden;
|
|
@@ -33,7 +33,7 @@ import{r as d,Z as B,_ as H,$ as X,a0 as O,a1 as q,a2 as G,j as t,a3 as E,P as y
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`;T.propTypes={list:y.array,width:y.number,height:y.number,cardSpace:y.number,onSelect:y.func,defaultIndex:y.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};function Ce({icon:s,active:r,completed:l}){const p={1:t.jsx(pe,{className:"step-icon"}),2:t.jsx(R,{className:"step-icon"}),3:t.jsx(de,{className:"step-icon"})},i=["step-icon-w"];return r&&i.push("step-icon-w--active"),l&&i.push("step-icon-w--completed"),t.jsx("div",{className:i.join(" "),children:p[String(s)]})}function Le({SessionContext:s,webWalletUrl:r,createPassportSvg:l,passportColor:p,onLogin:i}){const{api:u,session:w}=d.useContext(s),v=V(e=>e.breakpoints.down("sm")),a=J({user:null,passport:null,success:!1,activeStep:0}),h=d.useRef({sessionToken:"",refreshToken:""}),{setPassportId:x,clearPassportId:m}=he(),{t:o,locale:j}=d.useContext(Q),{wallet:b}=Y(),[n,c]=d.useState(0),{searchParams:S}=new URL(window.location.href),C=()=>{a.activeStep++},W=e=>{a.user=e.user},A=()=>{C()},U=(e,f)=>{e!=null&&e.passportId&&x(e.passportId),e!=null&&e.sessionToken&&(h.current.sessionToken=f(e.sessionToken)),e!=null&&e.refreshToken&&(h.current.refreshToken=f(e.refreshToken)),a.success=!0,C()},z=()=>new Promise(e=>{try{w.logout(()=>{e()})}catch{e()}}),L=async()=>{if(b&&$()){ee(()=>import("./index-
|
|
36
|
+
`;T.propTypes={list:y.array,width:y.number,height:y.number,cardSpace:y.number,onSelect:y.func,defaultIndex:y.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};function Ce({icon:s,active:r,completed:l}){const p={1:t.jsx(pe,{className:"step-icon"}),2:t.jsx(R,{className:"step-icon"}),3:t.jsx(de,{className:"step-icon"})},i=["step-icon-w"];return r&&i.push("step-icon-w--active"),l&&i.push("step-icon-w--completed"),t.jsx("div",{className:i.join(" "),children:p[String(s)]})}function Le({SessionContext:s,webWalletUrl:r,createPassportSvg:l,passportColor:p,onLogin:i}){const{api:u,session:w}=d.useContext(s),v=V(e=>e.breakpoints.down("sm")),a=J({user:null,passport:null,success:!1,activeStep:0}),h=d.useRef({sessionToken:"",refreshToken:""}),{setPassportId:x,clearPassportId:m}=he(),{t:o,locale:j}=d.useContext(Q),{wallet:b}=Y(),[n,c]=d.useState(0),{searchParams:S}=new URL(window.location.href),C=()=>{a.activeStep++},W=e=>{a.user=e.user},A=()=>{C()},U=(e,f)=>{e!=null&&e.passportId&&x(e.passportId),e!=null&&e.sessionToken&&(h.current.sessionToken=f(e.sessionToken)),e!=null&&e.refreshToken&&(h.current.refreshToken=f(e.refreshToken)),a.success=!0,C()},z=()=>new Promise(e=>{try{w.logout(()=>{e()})}catch{e()}}),L=async()=>{if(b&&$()){ee(()=>import("./index-D7VlJHOF.js").then(f=>f.i),__vite__mapDeps([0,1,2])).then(f=>{f.call("arcClosePage")});return}await z(),te(i)&&i({sessionToken:h.current.sessionToken,refreshToken:h.current.refreshToken});const e=S.get("redirect");if(e){window.location.replace(xe(e));return}m(),window.location.replace("/")},F=e=>{a.passport=e.target.value},[N]=ye({leftTime:n,onEnd:()=>{L()}}),_=[{label:o("lostPassport.selectPassport"),content:()=>a.user?t.jsxs(g,{className:"select-passport",children:[t.jsxs(g,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[t.jsx(ge,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),t.jsxs(g,{children:[t.jsx(g,{className:"name",children:a.user.fullName}),t.jsx(g,{className:"did",mt:1,children:t.jsx(me,{responsive:!v,compact:v,did:a.user.did})})]})]}),t.jsx("div",{children:t.jsx(T,{width:v?180:230,height:v?240:306,cardSpace:24,list:a.user.passportTypes.map(e=>({src:l({scope:e.scope,role:e.role,title:e.scope==="kyc"?e.name:e.title,issuer:e.issuer.name,issuerDid:e.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:p||"auto",extra:e.scope==="kyc"?{key:"Email",value:e.name}:void 0}),name:e.title,id:e.id,display:e.display})),onSelect:e=>F({target:{value:a.user.passportTypes[e].id}}),defaultIndex:0})}),t.jsx(g,{textAlign:"center",children:t.jsx(M,{variant:"contained",color:"primary",onClick:()=>A(),disabled:!a.passport,children:o("common.next")})})]}):t.jsx(I,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:u.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:W,locale:j,messages:{title:o("lostPassport.dialog.title"),scan:o("lostPassport.dialog.scan"),confirm:o("lostPassport.dialog.confirm"),success:o("lostPassport.dialog.success")}})},{label:o("lostPassport.receivePassport"),content:()=>{var f;const e={receiverDid:a.user.did,passportId:a.passport,teamDid:((f=window==null?void 0:window.blocklet)==null?void 0:f.did)||""};return t.jsx(I,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:u.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:U,locale:j,messages:{title:`${o("lostPassport.dialog.title")}`,scan:o("lostPassport.dialog.scan"),confirm:o("lostPassport.dialog.confirm"),success:o("lostPassport.dialog.success")},extraParams:e})}},{label:o("common.complete"),content:()=>(n===0&&c(3e3),t.jsxs(g,{textAlign:"center",children:[t.jsx(g,{mb:3,color:"success.main",children:t.jsx(le,{style:{fontSize:60}})}),t.jsx(D,{component:"p",variant:"body1",className:"subheader",children:o("issuePassport.dialog.success")}),t.jsx(D,{component:"p",variant:"body2",color:"gray",children:b&&$()?o("issuePassport.dialog.autoClose",{seconds:Math.round(N/1e3)}):o("issuePassport.dialog.autoJump",{seconds:Math.round(N/1e3)})}),t.jsx(M,{style:{marginTop:40},variant:"contained",color:"primary",onClick:L,children:o("issuePassport.dialog.loginWithPassport")})]}))}];return t.jsx(Ne,{children:t.jsxs("div",{className:"stepper",children:[t.jsx(ve,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:_.map(({label:e})=>t.jsx(we,{children:t.jsx(be,{StepIconComponent:Ce,children:e})},e))}),t.jsx("div",{className:"stepper-content",children:_[a.activeStep].content()}),!a.success&&t.jsx(g,{textAlign:"center",fontSize:12,children:t.jsx(Z,{to:"/",style:{color:"#4598FA"},children:o("lostPassport.return")})})]})})}const Ne=E(K)`
|
|
37
37
|
padding-top: 46px;
|
|
38
38
|
padding-bottom: 46px;
|
|
39
39
|
height: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as reactExports}from"./index-
|
|
1
|
+
import{r as reactExports}from"./index-C7otKf8F.js";/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aU as E,r as g,a5 as F,e as O,j as e,T as u,bq as H,a6 as Z,n as R,aX as X,bp as Y,O as G,a as h,aH as x,B as J,ak as K,a3 as U,P as s,iS as Q,bt as V}from"./index-
|
|
1
|
+
import{aU as E,r as g,a5 as F,e as O,j as e,T as u,bq as H,a6 as Z,n as R,aX as X,bp as Y,O as G,a as h,aH as x,B as J,ak as K,a3 as U,P as s,iS as Q,bt as V}from"./index-C7otKf8F.js";import{d as W}from"./Launch-6LXlwp2H.js";import{d as A}from"./MarkEmailRead-D59Dom04.js";import{c as D}from"./index-CgETkxdp.js";import{L,N as S}from"./dashboard-CazjqRmG.js";import{P as tt}from"./permission-CaRXgle6.js";import{F as et}from"./FormControlLabel-Dgpj-XRb.js";import{C as at,L as T,b as I}from"./MoreVert-C9UJnjfF.js";import{A as P}from"./Avatar-BbstlMJY.js";import{a as _}from"./Delete-DOl4nPF3.js";import{P as it}from"./Pagination-Df9SRmt8.js";import"./index-B-5mC5YF.js";import"./useLocalStorage-DElqf361.js";import"./index-CxwdZ5FQ.js";import"./confirm-DGKnhqaC.js";import"./DialogContentText-COq3rw-i.js";import"./Alert-DbN0O0aN.js";import"./useSlot-C9LBI1FF.js";import"./format-error-CXOPpcrE.js";import"./PlayArrow-BEtJ369o.js";import"./get-safe-url-B3_JzMvg.js";import"./ButtonGroup-YqMGRNaj.js";import"./RadioGroup-CGMGVlf2.js";import"./FormGroup-b58twP-q.js";import"./useFormControl-Ef5WMbDC.js";import"./session-SThzCGTr.js";import"./index-2Q0z0xFE.js";import"./Link-fX4KUiej.js";import"./useSetState-CuEGVXqh.js";import"./fallback-CVomANXA.js";import"./index-BkwS3xmJ.js";import"./Menu-CasLu-ky.js";import"./Toolbar-DYiylaGG.js";import"./Hidden-ipoc6BxF.js";import"./index-BWCk5LbW.js";import"./ListItemButton-YchFGwTe.js";import"./selector-Bgtpcya_.js";import"./deprecate-B2OaYvW_.js";import"./index-C2TlC4O6.js";import"./useAsync-Co-ihL9T.js";import"./Stack-BO9M0PIW.js";import"./LastPage--sm4pHpX.js";var rt=["second","minute","hour","day","week","month","year"];function st(t,i){if(i===0)return["just now","right now"];var r=rt[Math.floor(i/2)];return t>1&&(r+="s"),[t+" "+r+" ago","in "+t+" "+r]}var ot=["秒","分钟","小时","天","周","个月","年"];function nt(t,i){if(i===0)return["刚刚","片刻后"];var r=ot[~~(i/2)];return[t+" "+r+"前",t+" "+r+"后"]}var j={},z=function(t,i){j[t]=i},lt=function(t){return j[t]||j.en_US},y=[60,60,24,7,365/7/12,12];function ct(t){return t instanceof Date?t:!isNaN(t)||/^\d+$/.test(t)?new Date(parseInt(t)):(t=(t||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(t))}function dt(t,i){var r=t<0?1:0;t=Math.abs(t);for(var n=t,o=0;t>=y[o]&&o<y.length;o++)t/=y[o];return t=Math.floor(t),o*=2,t>(o===0?9:1)&&(o+=1),i(t,o,n)[r].replace("%s",t.toString())}function mt(t,i){var r=new Date;return(+r-+ct(t))/1e3}var pt=function(t,i,r){var n=mt(t);return dt(n,lt(i))};z("en_US",st);z("zh_CN",nt);function v({api:t,paging:i,loading:r,notifications:n,updateNotifications:o,teamDid:d}){const{inService:m}=E(),[f,M]=g.useState(!0),[N,b]=g.useState(!1),{t:c,locale:w}=g.useContext(F),$=O(),B=async()=>{b(!0);const a=n.filter(l=>l.read===!1).map(l=>l.id).join(",");m?await t.readBlockletNotifications({input:{id:a,teamDid:d}}):await t.readNotifications({input:{id:a}}),o(),b(!1)},k=async a=>{m?await t.readBlockletNotifications({input:{id:a,teamDid:d}}):await t.readNotifications({input:{id:a}}),o()},p=f?n:n.filter(a=>a.read===!1),q=n.filter(a=>a.read===!1).length>0,C=a=>e.jsxs("div",{className:"title",children:[a.title," ",e.jsx("span",{className:"time-ago",title:K(a.createdAt,w),children:pt(new Date(a.createdAt),Q(w))})]});return e.jsxs(ft,{children:[e.jsxs(u,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[c("notification.title"),e.jsxs(u,{component:"span",className:"notification-actions",children:[e.jsx(et,{control:e.jsx(at,{checked:f,onChange:()=>M(!f),name:"showRead",color:"primary"}),label:c("notification.showRead")}),e.jsx(tt,{permission:m?"":"mutate_notification",role:m?H:[],children:q&&e.jsxs(Z,{disabled:N,onClick:B,className:"",children:[N&&e.jsx(R,{size:16,style:{marginRight:"1em"}}),c("notification.markAllAsRead")]})})]})]}),e.jsx(X,{}),e.jsxs(Y,{className:"notification-list",children:[r&&e.jsx(R,{size:[32,20],style:{opacity:"0.8",zIndex:1e4,position:"fixed",top:30,left:"50%",marginLeft:-16}}),p.length===0&&e.jsx(u,{component:"p",variant:"body1",className:"notification-tip",children:c("notification.empty")}),p.length>0&&p.map(a=>a.action?e.jsxs(T,{...a.read?{}:{component:G,to:a.action},alignItems:"flex-start",className:D({read:a.read}),style:{paddingLeft:0,paddingRight:0},children:[e.jsx(L,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(P,{children:a.entityType.substr(0,1).toUpperCase()}),e.jsx(S,{className:"notification-tag",status:a.severity})]})}),e.jsx(_,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:C(a),secondary:a.description}),a.read===!1?e.jsxs(I,{sx:{width:80},children:[e.jsx(h,{title:c("notification.proceed"),children:e.jsx(x,{edge:"end",color:"primary","aria-label":"proceed",onClick:l=>{l.preventDefault(),l.stopPropagation(),$(a.action)},size:"large",children:e.jsx(W,{})})}),e.jsx(h,{title:c("notification.markAsRead"),children:e.jsx(x,{color:"primary",edge:"end","aria-label":"delete",onClick:()=>k(a.id),size:"large",children:e.jsx(A,{})})})]}):null]},a.id):e.jsxs(T,{className:D({read:a.read}),alignItems:"flex-start",style:{paddingLeft:0,paddingRight:0},children:[e.jsx(L,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(P,{children:a.entityType.substr(0,1).toUpperCase()}),e.jsx(S,{className:"notification-tag",status:a.severity})]})}),e.jsx(_,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:C(a),secondary:a.description}),e.jsx(I,{sx:{width:80},children:a.read===!1?e.jsx(h,{title:c("notification.markAsRead"),children:e.jsx(x,{color:"primary",edge:"end","aria-label":"delete",onClick:()=>k(a.id),size:"large",children:e.jsx(A,{})})}):null})]},a.id))]}),!!p.length&&i.pageCount>1&&e.jsx(J,{mt:2,display:"flex",justifyContent:"flex-end",children:e.jsx(it,{disabled:r,count:i.pageCount,page:i.page,onChange:(a,l)=>{o({page:l})}})})]})}const ft=U.div`
|
|
2
2
|
min-height: 60vh;
|
|
3
3
|
|
|
4
4
|
.page-header {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as c}from"./index-
|
|
1
|
+
import{r,j as c}from"./index-C7otKf8F.js";import{g as l}from"./get-safe-url-DLq03enx.js";function f(){const e=r.useRef(null),n=r.useRef(Date.now());return r.useEffect(()=>{const t=`open-window-url-${new URLSearchParams(window.location.search).get("key")}`;return e.current=setInterval(()=>{if(Date.now()-n.current>10*1e3){localStorage.removeItem(t),clearInterval(e.current);return}const a=localStorage.getItem(t);if(a)try{const{url:o,time:s}=JSON.parse(a);localStorage.removeItem(t),Date.now()-s<10*1e3&&(window.location.href=l(o,{allowDomains:null}))}catch{}},200),()=>clearInterval(e.current)},[]),c.jsx("div",{})}export{f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as k,aU as b,r as D,b1 as A,j as e,B as T,a as S,a6 as B,bG as j,ad as C,bw as L,aB as N,ak as P,a3 as E,T as Q}from"./index-
|
|
1
|
+
import{u as k,aU as b,r as D,b1 as A,j as e,B as T,a as S,a6 as B,bG as j,ad as C,bw as L,aB as N,ak as P,a3 as E,T as Q}from"./index-C7otKf8F.js";import{d as R}from"./HelpOutline-BoXfs1w7.js";import{K as q}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{I as K}from"./index-CS43LeKQ.js";import{T as W}from"./index-2Q0z0xFE.js";import{W as i}from"./did-address-CqYEOOvT.js";import{B as _}from"./dashboard-CazjqRmG.js";import{a as z}from"./domain-list-IwhSKnxn.js";import"./Link-fX4KUiej.js";import"./index-B-5mC5YF.js";import"./useLocalStorage-DElqf361.js";import"./MoreVert-C9UJnjfF.js";import"./FormControlLabel-Dgpj-XRb.js";import"./useFormControl-Ef5WMbDC.js";import"./Stack-BO9M0PIW.js";import"./index-CxwdZ5FQ.js";import"./confirm-DGKnhqaC.js";import"./DialogContentText-COq3rw-i.js";import"./Alert-DbN0O0aN.js";import"./useSlot-C9LBI1FF.js";import"./format-error-CXOPpcrE.js";import"./Delete-DOl4nPF3.js";import"./PlayArrow-BEtJ369o.js";import"./get-safe-url-B3_JzMvg.js";import"./ButtonGroup-YqMGRNaj.js";import"./RadioGroup-CGMGVlf2.js";import"./FormGroup-b58twP-q.js";import"./Avatar-BbstlMJY.js";import"./session-SThzCGTr.js";import"./permission-CaRXgle6.js";import"./useAsync-Co-ihL9T.js";import"./useSetState-CuEGVXqh.js";import"./fallback-CVomANXA.js";import"./index-BkwS3xmJ.js";import"./Menu-CasLu-ky.js";import"./Toolbar-DYiylaGG.js";import"./Hidden-ipoc6BxF.js";import"./index-BWCk5LbW.js";import"./ListItemButton-YchFGwTe.js";import"./selector-Bgtpcya_.js";import"./deprecate-B2OaYvW_.js";import"./index-C2TlC4O6.js";import"./trim-08Op5xjY.js";import"./Add-C-MUV7pC.js";import"./ExpandMore-BO8jF1bn.js";import"./base32-Cog_VZ0k.js";import"./LockIcon-DtPBoSNv.js";import"./index-Ci5RfQ59.js";import"./CheckCircle-C-J8R9KR.js";import"./util-D3UE9Z7D.js";import"./use-mobile-Bdr2kObC.js";import"./InfoOutlined-BxU1CEPg.js";import"./index-DnlBG2uS.js";import"./api-BKvFaP38.js";import"./TextField-BWghiml0.js";import"./FormControl-BsxgOlTX.js";import"./Select-B3cdfIzb.js";import"./LoadingButton-C4TIaNaq.js";import"./useThemeProps-55Y0sL0H.js";import"./actions-CchlEsiO.js";import"./MoreHoriz-B5aoiijW.js";const H={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},O=H,U={arcblock:"ArcBlock",ethereum:"Ethereum"};function $(){var u,h,x,f,v;const{t,locale:w}=k(),{info:p,inService:g}=b(),[n,y]=D.useState(!1),{blocklet:o}=A(),{appDid:m,appPid:l,migratedFrom:r=[]}=o,c=(u=o.environments.find(s=>s.key==="BLOCKLET_APP_CHAIN_TYPE"))==null?void 0:u.value,d=[m?{name:t("blocklet.appId"),value:e.jsx(i,{did:m,showQrcode:!0})}:null,l&&m!==l?{name:e.jsxs(T,{sx:{display:"flex",alignItems:"center",gap:1},children:[t("blocklet.appPid"),e.jsx(S,{title:t("blocklet.whyNeedAppPid"),style:{cursor:"help",fontSize:16},children:e.jsx(R,{})})]}),value:e.jsx(i,{did:l,showQrcode:!0})}:null,(r==null?void 0:r.length)>1?{name:t("blocklet.alsoKnownAs"),value:e.jsxs("div",{children:[(n?r.slice(1):r.slice(1,2)).map(s=>e.jsx(i,{did:s.appDid,showQrcode:!0})),r.length>2&&e.jsx(B,{style:{marginLeft:"18px"},endIcon:n?e.jsx(j,{icon:O}):e.jsx(j,{icon:q}),onClick:()=>y(!n),children:t(n?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,{name:t("common.name"),value:C.getDisplayName(o,!0)},{name:t("common.status"),value:e.jsx(_,{status:o.status,source:o.source,progress:o.progress})},L(o)?{name:"NFT",value:e.jsx(i,{external:!0,href:N((h=o==null?void 0:o.controller)==null?void 0:h.chainHost,(x=o==null?void 0:o.controller)==null?void 0:x.nftId,"asset"),did:(f=o==null?void 0:o.controller)==null?void 0:f.nftId,showQrcode:!0})}:null,{name:t("blocklet.installedAt"),value:P(o.installedAt,w)},{name:t("common.owner"),value:(v=o.settings)!=null&&v.owner?e.jsx(i,{did:o.settings.owner.did,showQrcode:!0}):"-"},{name:t("blocklet.config.walletType.name"),value:U[c||"arcblock"]||c},o.externalSkSource?{name:t("blocklet.skSource"),value:o.externalSkSource}:null].filter(Boolean);g&&d.push({name:t("common.serverDid"),value:e.jsx(i,{did:p.did,showQrcode:!0})},{name:t("common.serverVersion"),value:e.jsx(W,{children:p.version})});const I=s=>s.map(a=>e.jsx(K,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:a.name,nameFormatter:()=>a.name,children:a.value},a.name));return e.jsxs(F,{component:"div",children:[e.jsx(z,{}),e.jsx("div",{className:"title",children:e.jsx("span",{children:t("common.basicInfo")})}),e.jsx("div",{className:"basicInfo",children:I(d)})]})}$.propTypes={};const F=E(Q)`
|
|
2
2
|
.title {
|
|
3
3
|
font-size: 1.2rem;
|
|
4
4
|
font-weight: bold;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a1 as p,a2 as c,j as o,a3 as u,P as t}from"./index-
|
|
1
|
+
import{a1 as p,a2 as c,j as o,a3 as u,P as t}from"./index-C7otKf8F.js";var a={},d=c;Object.defineProperty(a,"__esModule",{value:!0});var i=a.default=void 0,f=d(p()),x=o;i=a.default=(0,f.default)((0,x.jsx)("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");function s({title:e,subTitle:n,onClickBack:r,...l}){return o.jsxs(m,{...l,children:[r&&o.jsx(i,{className:"back-btn",onClick:r}),o.jsx("div",{className:"title",children:e}),o.jsx("div",{className:"sub-title",children:n})]})}const m=u.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
4
|
text-align: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a3 as g,r as P,P as e,j as p}from"./index-
|
|
1
|
+
import{a3 as g,r as P,P as e,j as p}from"./index-C7otKf8F.js";import{u as h,r as x}from"./useAsync-Co-ihL9T.js";import{u as b}from"./session-SThzCGTr.js";const m={success:"#3ab39d",error:"#D0021B"},d="10px",w=g.div`
|
|
2
2
|
display: inline-block;
|
|
3
3
|
min-width: ${r=>r.size||d};
|
|
4
4
|
min-height: ${r=>r.size||d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,j as e,K as t}from"./index-
|
|
1
|
+
import{c as o,j as e,K as t}from"./index-C7otKf8F.js";import{I as s}from"./iframe-DCD_qn_b.js";import{S as n}from"./studio-GA30qFJk.js";import"./index-BkwS3xmJ.js";import"./Menu-CasLu-ky.js";import"./Toolbar-DYiylaGG.js";import"./Hidden-ipoc6BxF.js";import"./fallback-CVomANXA.js";function E(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",o(window.location.origin,t.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const i=`${o(window.location.origin,t.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return e.jsx(n,{children:e.jsx(s,{url:i,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as n,bC as l,a4 as d,r as c,j as i,az as u,B as h}from"./index-C7otKf8F.js";import g from"./index-BJPpUK5T.js";import"./Add-C-MUV7pC.js";import"./Delete-DOl4nPF3.js";import"./Error-BqDO0zZY.js";import"./index-C03QRPVb.js";import"./useThemeProps-55Y0sL0H.js";import"./toPropertyKey-PLuKRk1e.js";import"./emotion-cache.browser.esm-CuIm0Hab.js";import"./MoreVert-C9UJnjfF.js";import"./FormControlLabel-Dgpj-XRb.js";import"./useFormControl-Ef5WMbDC.js";import"./Stack-BO9M0PIW.js";import"./ViewColumn-Bz1lupxM.js";import"./FormControl-BsxgOlTX.js";import"./FormGroup-b58twP-q.js";import"./Grid-tsC4khHx.js";import"./Select-B3cdfIzb.js";import"./TextField-BWghiml0.js";import"./index-B-5mC5YF.js";import"./LastPage--sm4pHpX.js";import"./Toolbar-DYiylaGG.js";import"./redux-CluOqhW1.js";import"./Search-CKwfa740.js";import"./index-Ci5RfQ59.js";import"./index-2Q0z0xFE.js";import"./confirm-DGKnhqaC.js";import"./DialogContentText-COq3rw-i.js";import"./Alert-DbN0O0aN.js";import"./useSlot-C9LBI1FF.js";import"./format-error-CXOPpcrE.js";import"./session-SThzCGTr.js";import"./did-address-CqYEOOvT.js";import"./Link-fX4KUiej.js";import"./react-beautiful-dnd.esm-CpS0-Aqe.js";import"./raf-schd.esm-Bnef47nT.js";import"./bundle-avatar-C-1ahBAR.js";import"./Avatar-BbstlMJY.js";import"./shorten-label-DtvVN3_a.js";import"./Download-B7Y03H7t.js";import"./QuestionMarkCircle-CuvZsXbn.js";import"./useSetState-CuEGVXqh.js";import"./index-CgETkxdp.js";import"./index-DQSbUwd9.js";import"./api-BKvFaP38.js";import"./index-CxwdZ5FQ.js";import"./ExpandMore-BO8jF1bn.js";import"./ChevronRight-B2k9Gvlw.js";import"./OpenInNew-YMhtYwHE.js";import"./useSlotProps-CP7QQ02c.js";import"./DeleteOutline-DYH6KsRs.js";import"./item-rGVvbhmE.js";import"./Launch-6LXlwp2H.js";import"./Done-DEI256sV.js";import"./click-to-copy-BBLmW78J.js";import"./get-safe-url-B3_JzMvg.js";import"./ButtonGroup-YqMGRNaj.js";import"./jss-plugin-props-sort.esm-BqC3mtsa.js";import"./ArrowDropDown-BD-n5g-y.js";import"./InputAdornment-BiYr4cW6.js";import"./index-DOuTbUzq.js";import"./index-ClKfKXJz.js";import"./purify.es-DutPtr9A.js";import"./index-BbwkcNKT.js";import"./Stepper-RItm9i-D.js";import"./RadioGroup-CGMGVlf2.js";const r=new URL(window.location.href),m=r.searchParams.get("mode")==="dialog",w=m?"":r.searchParams.get("padding")||"";function yo(){const{t:e}=n(),{componentDid:o}=l(),s=d(t=>t.breakpoints.down("md")),a=t=>{t.stopPropagation(),window.parent.postMessage({event:"resourceDialog.close",componentDid:o},"*")};c.useEffect(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:o},"*")},[o]);const p=i.jsx(g,{padding:w,initUrl:r});return m?i.jsx(u,{className:"studio-dialog",title:e("blocklet.publish.blockletStudio"),maxWidth:!1,fullWidth:!1,PaperProps:{style:s?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:a,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:i.jsx(h,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:p})}):p}export{yo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c}from"./index-
|
|
1
|
+
import{r as c}from"./index-C7otKf8F.js";function s(n,t){if(n.length!==t.length)return!1;for(var r=0;r<n.length;r++)if(n[r]!==t[r])return!1;return!0}function l(n,t){var r=c.useState(function(){return{inputs:t,result:n()}})[0],o=c.useRef(!0),e=c.useRef(r),a=o.current||!!(t&&e.current.inputs&&s(t,e.current.inputs)),i=a?e.current:{inputs:t,result:n()};return c.useEffect(function(){o.current=!1,e.current=i},[i]),i.result}function w(n,t){return l(function(){return n},t)}var O=l,L=w,B="Invariant failed";function S(n,t){throw new Error(B)}var v=function(t){var r=t.top,o=t.right,e=t.bottom,a=t.left,i=o-a,f=e-r,d={top:r,right:o,bottom:e,left:a,width:i,height:f,x:a,y:r,center:{x:(o+a)/2,y:(e+r)/2}};return d},R=function(t,r){return{top:t.top-r.top,left:t.left-r.left,bottom:t.bottom+r.bottom,right:t.right+r.right}},p=function(t,r){return{top:t.top+r.top,left:t.left+r.left,bottom:t.bottom-r.bottom,right:t.right-r.right}},W=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},g={top:0,right:0,bottom:0,left:0},b=function(t){var r=t.borderBox,o=t.margin,e=o===void 0?g:o,a=t.border,i=a===void 0?g:a,f=t.padding,d=f===void 0?g:f,h=v(R(r,e)),m=v(p(r,i)),x=v(p(m,d));return{marginBox:h,borderBox:v(r),paddingBox:m,contentBox:x,margin:e,border:i,padding:d}},u=function(t){var r=t.slice(0,-2),o=t.slice(-2);if(o!=="px")return 0;var e=Number(r);return isNaN(e)&&S(),e},C=function(){return{x:window.pageXOffset,y:window.pageYOffset}},F=function(t,r){var o=t.borderBox,e=t.border,a=t.margin,i=t.padding,f=W(o,r);return b({borderBox:f,border:e,margin:a,padding:i})},N=function(t,r){return r===void 0&&(r=C()),F(t,r)},A=function(t,r){var o={top:u(r.marginTop),right:u(r.marginRight),bottom:u(r.marginBottom),left:u(r.marginLeft)},e={top:u(r.paddingTop),right:u(r.paddingRight),bottom:u(r.paddingBottom),left:u(r.paddingLeft)},a={top:u(r.borderTopWidth),right:u(r.borderRightWidth),bottom:u(r.borderBottomWidth),left:u(r.borderLeftWidth)};return b({borderBox:t,margin:o,padding:e,border:a})},T=function(t){var r=t.getBoundingClientRect(),o=window.getComputedStyle(t);return A(r,o)},$=function(t){var r=[],o=null,e=function(){for(var i=arguments.length,f=new Array(i),d=0;d<i;d++)f[d]=arguments[d];r=f,!o&&(o=requestAnimationFrame(function(){o=null,t.apply(void 0,r)}))};return e.cancel=function(){o&&(cancelAnimationFrame(o),o=null)},e};export{O as a,A as b,b as c,v as d,R as e,T as g,F as o,$ as r,L as u,N as w};
|
package/dist/assets/{react-beautiful-dnd.esm-DepcixRR.js → react-beautiful-dnd.esm-CpS0-Aqe.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as ct,B as na,n as aa,P as ia,eR as N,r as S,aO as er,aP as w,eA as dt,cr as oa,eS as $t,eT as la}from"./index-
|
|
1
|
+
import{j as ct,B as na,n as aa,P as ia,eR as N,r as S,aO as er,aP as w,eA as dt,cr as oa,eS as $t,eT as la}from"./index-C7otKf8F.js";import{b as pt,c as ua,a as sa,d as ca}from"./redux-CluOqhW1.js";import{u as x,a as A,w as rr,g as zt,r as Ae,e as jt,c as da,b as pa,d as ce,o as Tr}from"./raf-schd.esm-Bnef47nT.js";function Yt({size:e,...r}){return ct.jsx(na,{display:"flex",mt:4,...r,children:ct.jsx(aa,{size:e})})}Yt.propTypes={size:ia.number};Yt.defaultProps={size:24};var Kt=N.createContext(null);function va(e){e()}var Jt=va,fa=function(r){return Jt=r},ga=function(){return Jt};function ma(){var e=ga(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e(function(){for(var i=r;i;)i.callback(),i=i.next})},get:function(){for(var i=[],a=r;a;)i.push(a),a=a.next;return i},subscribe:function(i){var a=!0,o=t={callback:i,next:null,prev:t};return o.prev?o.prev.next=o:r=o,function(){!a||r===null||(a=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:r=o.next)}}}}var vt={notify:function(){},get:function(){return[]}};function Xt(e,r){var t,n=vt;function i(u){return c(),n.subscribe(u)}function a(){n.notify()}function o(){p.onStateChange&&p.onStateChange()}function l(){return!!t}function c(){t||(t=r?r.addNestedSub(o):e.subscribe(o),n=ma())}function d(){t&&(t(),t=void 0,n.clear(),n=vt)}var p={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:o,isSubscribed:l,trySubscribe:c,tryUnsubscribe:d,getListeners:function(){return n}};return p}var Qt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?S.useLayoutEffect:S.useEffect;function ba(e){var r=e.store,t=e.context,n=e.children,i=S.useMemo(function(){var l=Xt(r);return{store:r,subscription:l}},[r]),a=S.useMemo(function(){return r.getState()},[r]);Qt(function(){var l=i.subscription;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==r.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[i,a]);var o=t||Kt;return N.createElement(o.Provider,{value:i},n)}var Zt={exports:{}},O={};/** @license React v17.0.2
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as e}from"./index-C7otKf8F.js";const p=e.oneOfType([e.func,e.object]);export{p as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,J as gt,dC as mt,j as t,bG as N,dD as ze,P as c,dE as Ct,dF as _e,bx as I,bF as A,u as O,dG as $e,B as S,aR as Ve,ao as Vt,L as et,b as ge,c as M,p as Ft,l as tt,bJ as bt,bD as ot,dp as xt,bs as St,dl as yt,an as Lt,aH as Fe,di as He,dH as P,dm as Pe,cw as qt,v as Et,T as it,C as vt,n as Kt,aF as Rt,a3 as Yt,cp as Bt,bc as kt,m as Dt,c6 as At}from"./index-
|
|
1
|
+
import{r as d,J as gt,dC as mt,j as t,bG as N,dD as ze,P as c,dE as Ct,dF as _e,bx as I,bF as A,u as O,dG as $e,B as S,aR as Ve,ao as Vt,L as et,b as ge,c as M,p as Ft,l as tt,bJ as bt,bD as ot,dp as xt,bs as St,dl as yt,an as Lt,aH as Fe,di as He,dH as P,dm as Pe,cw as qt,v as Et,T as it,C as vt,n as Kt,aF as Rt,a3 as Yt,cp as Bt,bc as kt,m as Dt,c6 as At}from"./index-C7otKf8F.js";import{E as rt}from"./fallback-CVomANXA.js";import{R as Ut,N as Zt}from"./index-BkwS3xmJ.js";import{i as It,u as Gt,f as at,g as ae,p as Tt,m as nt,a as Nt,b as jt,H as Xt,B as Jt}from"./index-BWCk5LbW.js";import{d as Ht}from"./ExpandMore-BO8jF1bn.js";import{A as me}from"./Avatar-BbstlMJY.js";import{S as Pt,R as Mt,a as be,b as Ot}from"./index-CMGrAADS.js";import"./index-DEcPGLHC.js";import{d as Qt}from"./OpenInNew-YMhtYwHE.js";import{S as zt}from"./Stack-BO9M0PIW.js";import{L as _t}from"./Link-fX4KUiej.js";import{u as $t}from"./use-mobile-Bdr2kObC.js";function Se({icon:e,size:r,sx:l,...a}){const p=[...Array.isArray(l)?l:[l]];r&&p.push({width:r,height:r});const[V,w]=d.useState(!1),[g,W]=d.useState(!0);if(gt(async()=>{W(!0);try{await mt(e),w(!0)}catch{w(!1)}W(!1)},[e]),a.variant||p.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),It(e))return t.jsx(me,{component:"span",...a,src:e,sx:p});const m=r?.6*r+4:0;return g?t.jsx(N,{icon:"codicon:blank",height:m||void 0}):V?t.jsx(me,{component:"span",...a,sx:p,children:t.jsx(N,{icon:e,height:m||void 0})}):e&&typeof e=="string"?(p.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),t.jsx(me,{component:"span",...a,sx:p,children:Array.from(e)[0]})):null}const e1=ze();function se({theme:e,children:r}){const l=e?ze(e):e1;return t.jsx(Ct,{theme:l,children:r})}se.propTypes={children:c.any.isRequired,theme:c.object};se.defaultProps={theme:null};const t1=e=>{if(!(e!=null&&e.length))return{navItems:[],activeId:null};let r=1;const a=nt(e,w=>{var m,x;const g=w.icon?t.jsx(Se,{icon:w.icon}):null;if(w.items)return{id:`${r++}`,label:w.title,icon:g,children:w.items};let W={};return((m=w.link)!=null&&m.startsWith("http://")||(x=w.link)!=null&&x.startsWith("https://"))&&(W={target:"_blank",rel:"noreferrer"}),{id:`${r++}`,label:t.jsx("a",{href:w.link,...W,children:w.title}),icon:g,link:w.link}},"items"),p=Nt(a),V=jt(p.map(w=>w.link));return{navItems:a,activeId:V>=0?p[V].id:null}};function o1({meta:e={},addons:r,sessionManagerProps:l={showRole:!0},homeLink:a=Tt,theme:p,hideNavMenu:V=!1,...w}){var v,C;Gt();const{locale:g}=O()||{},W=d.useMemo(()=>{const h=Object.assign({},window.blocklet,e);try{return at(h)}catch(R){return console.error("Failed to format blocklet info",R,h),h}},[e]);if(!W.appName)return null;const{appLogo:m,appLogoRect:x,theme:f}=W,o=ae((v=W==null?void 0:W.navigation)==null?void 0:v.header,g),s=t1(o),{navItems:i,activeId:n}=s,u=typeof r=="function"?h=>r(h,{navigation:s}):r,E=t.jsx(Xt,{formattedBlocklet:W,addons:u,sessionManagerProps:l});return t.jsx(se,{theme:p,children:t.jsx(i1,{homeLink:a,logo:t.jsx("img",{src:x||m,alt:"logo"}),addons:E,...$e(w,["bordered"]),$bordered:w==null?void 0:w.bordered,$bgcolor:(C=f==null?void 0:f.background)==null?void 0:C.header,children:V||!(i!=null&&i.length)?null:({isMobile:h})=>t.jsx(Zt,{mode:h?"inline":"horizontal",activeId:n,items:i,className:"header-nav",bgColor:"transparent",textColor:"#777"})})})}const i1=I(Ut)`
|
|
2
2
|
${({$bgcolor:e})=>`background-color: ${e||"#fff"};`}
|
|
3
3
|
font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
|
|
4
4
|
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cw as o}from"./index-C7otKf8F.js";const c=new o;export{c as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,a5 as w,ao as z,j as t,bG as m,B as H,T as M,bs as P,cD as B,aY as N,bP as S,bE as F,b as A,aH as D,bx as q,cE as f,cF as R,bF as T,br as G}from"./index-
|
|
1
|
+
import{r,a5 as w,ao as z,j as t,bG as m,B as H,T as M,bs as P,cD as B,aY as N,bP as S,bE as F,b as A,aH as D,bx as q,cE as f,cF as R,bF as T,br as G}from"./index-C7otKf8F.js";const O={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M480-80q-84 0-157-31.5T196-197t-85-127.5T80-482t31-156.5T196-765t127-84.5T480-880t157 30.5T764-765t85 126.5T880-482t-31 157.5T764-197t-127 85.5T480-80m0-58q35-36 58.5-82.5T577-331H384q14 60 37.5 108t58.5 85m-85-12q-25-38-43-82t-30-99H172q38 71 88 111.5T395-150m171-1q72-23 129.5-69T788-331H639q-13 54-30.5 98T566-151M152-391h159q-3-27-3.5-48.5T307-482q0-25 1-44.5t4-43.5H152q-7 24-9.5 43t-2.5 45t2.5 46.5T152-391m221 0h215q4-31 5-50.5t1-40.5q0-20-1-38.5t-5-49.5H373q-4 31-5 49.5t-1 38.5q0 21 1 40.5t5 50.5m275 0h160q7-24 9.5-44.5T820-482t-2.5-45t-9.5-43H649q3 35 4 53.5t1 34.5q0 22-1.5 41.5T648-391m-10-239h150q-33-69-90.5-115T565-810q25 37 42.5 80T638-630m-254 0h194q-11-53-37-102.5T480-820q-32 27-54 71t-42 119m-212 0h151q11-54 28-96.5t43-82.5q-75 19-131 64t-91 115"/>'},Y=O;function V(e){var u,g;const{showText:l=!0,popperProps:b={},popperType:y="click",icon:c,size:p=24,onChange:Q=F,...k}=e,{locale:x,changeLocale:j,languages:d}=r.useContext(w),i=r.useRef(null),[h,o]=r.useState(!1),s=z(),C=((u=s==null?void 0:s.palette)==null?void 0:u.mode)==="dark",v=n=>{j(n),o(!1),typeof e.onChange=="function"&&e.onChange(n)},E=n=>{var a;(a=i.current)!=null&&a.contains(n.target)||o(!1)},I=l?A:D,L=y==="hover"?{onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)}}:{onClick:()=>{o(!h)}},$=r.useMemo(()=>c?t.jsx(c,{}):t.jsx(m,{icon:Y,fontSize:p,style:{transform:"scale(1.10)"}}),[c,p]);return t.jsxs(J,{dark:C,theme:s,...k,...L,children:[t.jsx(I,{ref:i,className:"trigger",role:"button","aria-label":"Locale selector button",children:t.jsxs(H,{display:"flex",alignItems:"center",children:[$,l?t.jsx(M,{component:"strong",className:"trigger-text",children:(g=d.find(n=>n.code===x))==null?void 0:g.name}):""]})}),t.jsx(K,{open:h,anchorEl:i.current,...b,disablePortal:!0,children:t.jsx("div",{className:"locales",children:t.jsx(P,{onClickAway:E,children:t.jsx(B,{children:d.map(({code:n,name:a})=>t.jsxs(N,{className:"locale-item",onClick:()=>v(n),children:[t.jsx(m,{icon:S,className:n===x?"check-icon check-icon-visible":"check-icon"}),a]},n))})})})})]})}const J=q("div",{shouldForwardProp:e=>e!=="dark"})`
|
|
2
2
|
display: inline-block;
|
|
3
3
|
|
|
4
4
|
.trigger {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,bD as t}from"./index-C7otKf8F.js";function e(){return o.useContext(t)}export{e as u};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/connect-
|
|
2
|
-
import{r as u,j as e,a3 as M,a4 as X,ao as J,u as Y,G as ee,e as te,ap as se,d as oe,aq as A,z as re,ar as ne,c as a,as as ae,at as D,K as T,au as ie,ae as le,ad as ce,W as pe,av as ue,aw as m,ax as de,a8 as f,af as g,B as me,n as fe,am as Le}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/connect-DOaWC9ft.js","assets/index-C7otKf8F.js","assets/index-B4oT57Ax.css","assets/useAsync-Co-ihL9T.js","assets/config-BuQgZfpX.js","assets/uniqBy-DFF7Lt_J.js","assets/index-DbAVBGvq.js","assets/Done-DEI256sV.js","assets/Google-D_mc2y32.js","assets/TextField-BWghiml0.js","assets/FormControl-BsxgOlTX.js","assets/useFormControl-Ef5WMbDC.js","assets/Select-B3cdfIzb.js","assets/logo-uploader-DESUa9bt.js","assets/index-CgETkxdp.js","assets/page-header-9hNVxRoa.js","assets/layout-Df9B9CD5.js","assets/content-layout-Coi8AV4p.js","assets/step-actions-Bbj9n3cG.js","assets/button-CSzyfzmK.js","assets/index-Bw4jUIg2.js","assets/config-space-C56d0lRU.js","assets/index-CxwdZ5FQ.js","assets/api-BKvFaP38.js","assets/connect-to-CUmo43dQ.js","assets/index-CMGrAADS.js","assets/OpenInNew-YMhtYwHE.js","assets/Stack-BO9M0PIW.js","assets/Link-fX4KUiej.js","assets/Skeleton-D0-q_hvU.js","assets/HelpOutline-BoXfs1w7.js","assets/index-DEcPGLHC.js","assets/ExpandMore-BO8jF1bn.js","assets/ButtonGroup-YqMGRNaj.js","assets/DialogContentText-COq3rw-i.js","assets/DeleteOutline-DYH6KsRs.js","assets/format-error-CXOPpcrE.js","assets/domain-BjG22k3m.js","assets/domain-list-IwhSKnxn.js","assets/trim-08Op5xjY.js","assets/Add-C-MUV7pC.js","assets/base32-Cog_VZ0k.js","assets/LockIcon-DtPBoSNv.js","assets/index-Ci5RfQ59.js","assets/index-C2TlC4O6.js","assets/CheckCircle-C-J8R9KR.js","assets/util-D3UE9Z7D.js","assets/Alert-DbN0O0aN.js","assets/useSlot-C9LBI1FF.js","assets/useSetState-CuEGVXqh.js","assets/permission-CaRXgle6.js","assets/session-SThzCGTr.js","assets/confirm-DGKnhqaC.js","assets/use-mobile-Bdr2kObC.js","assets/InfoOutlined-BxU1CEPg.js","assets/index-DnlBG2uS.js","assets/index-CS43LeKQ.js","assets/LoadingButton-C4TIaNaq.js","assets/useThemeProps-55Y0sL0H.js","assets/Delete-DOl4nPF3.js","assets/actions-CchlEsiO.js","assets/MoreHoriz-B5aoiijW.js","assets/access-control-DplRO33H.js","assets/config-iLqs6SqP.js","assets/RadioGroup-CGMGVlf2.js","assets/FormControlLabel-Dgpj-XRb.js","assets/FormGroup-b58twP-q.js","assets/fuel-CDp9ZffP.js","assets/Launch-6LXlwp2H.js","assets/did-address-CqYEOOvT.js","assets/complete-BRGGVyCs.js","assets/launch-result-message-fLJdiQ4t.js","assets/get-safe-url-DLq03enx.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as u,j as e,a3 as M,a4 as X,ao as J,u as Y,G as ee,e as te,ap as se,d as oe,aq as A,z as re,ar as ne,c as a,as as ae,at as D,K as T,au as ie,ae as le,ad as ce,W as pe,av as ue,aw as m,ax as de,a8 as f,af as g,B as me,n as fe,am as Le}from"./index-C7otKf8F.js";import{C as he}from"./config-space-C56d0lRU.js";import{H as _e}from"./addon-k5gcfsfJ.js";import{d as xe}from"./ServerLogo-BAQKQJ7V.js";import{S as ye,L as Ce}from"./index-CGNW_HS5.js";import{g as ge}from"./get-safe-url-DLq03enx.js";import"./index-CxwdZ5FQ.js";import"./api-BKvFaP38.js";import"./selector-Bgtpcya_.js";import"./QuestionMarkCircle-CuvZsXbn.js";import"./url-join-fD9yT9x3.js";import"./Skeleton-D0-q_hvU.js";import"./Hidden-ipoc6BxF.js";var v={};Object.defineProperty(v,"__esModule",{value:!0});var N=v.default=void 0;je(u);var c=e;function je(t){return t&&t.__esModule?t:{default:t}}function $(t,o){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter(function(C){return Object.getOwnPropertyDescriptor(t,C).enumerable})),s.push.apply(s,r)}return s}function B(t){for(var o=1;o<arguments.length;o++){var s=arguments[o]!=null?arguments[o]:{};o%2?$(Object(s),!0).forEach(function(r){ve(t,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):$(Object(s)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(s,r))})}return t}function ve(t,o,s){return(o=Ee(o))in t?Object.defineProperty(t,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[o]=s,t}function Ee(t){var o=Pe(t,"string");return typeof o=="symbol"?o:o+""}function Pe(t,o){if(typeof t!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var r=s.call(t,o||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}var E=function(o){return(0,c.jsxs)("svg",B(B({},o),{},{children:[(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z",fill:"url(#paint0_linear_615_426)"}),(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z",fill:"url(#paint1_linear_615_426)"}),(0,c.jsxs)("defs",{children:[(0,c.jsxs)("linearGradient",{id:"paint0_linear_615_426",x1:"31.72",y1:"95.7208",x2:"95.488",y2:"34.3249",gradientUnits:"userSpaceOnUse",children:[(0,c.jsx)("stop",{stopColor:"#0FA4B7"}),(0,c.jsx)("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),(0,c.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,c.jsxs)("linearGradient",{id:"paint1_linear_615_426",x1:"28.4374",y1:"99.2464",x2:"98.7613",y2:"44.9372",gradientUnits:"userSpaceOnUse",children:[(0,c.jsx)("stop",{stopColor:"#0FA4B7"}),(0,c.jsx)("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),(0,c.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};E.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};E.displayName="server-logo-notext";N=v.default=E;const we=M.span`
|
|
3
3
|
color: ${t=>t.theme.palette.error.main};
|
|
4
4
|
&::before {
|
|
5
5
|
content: '*';
|
|
6
6
|
}
|
|
7
|
-
`,j=we,Se=u.lazy(()=>f(()=>import("./connect-
|
|
7
|
+
`,j=we,Se=u.lazy(()=>f(()=>import("./connect-DOaWC9ft.js"),__vite__mapDeps([0,1,2,3]))),Oe=u.lazy(()=>f(()=>import("./config-BuQgZfpX.js"),__vite__mapDeps([4,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),Re=u.lazy(()=>f(()=>import("./index-Bw4jUIg2.js"),__vite__mapDeps([20,1,2,15,21,22,23,24,25,26,27,28,29,30,31,32,33,34,9,10,11,12,35,36,18,16,17]))),be=u.lazy(()=>f(()=>import("./domain-BjG22k3m.js"),__vite__mapDeps([37,1,2,38,39,40,32,41,42,43,44,45,46,47,48,49,50,3,51,52,34,36,53,54,55,23,56,9,10,11,12,57,58,59,60,61,15,19,16,17,18]))),Ie=u.lazy(()=>f(()=>import("./access-control-DplRO33H.js"),__vite__mapDeps([62,1,2,63,15,16,17,18,19,10,11,64,65,27,66]))),Ve=u.lazy(()=>f(()=>import("./fuel-CDp9ZffP.js"),__vite__mapDeps([67,1,2,68,69,28,15,16,17,18,19]))),ke=u.lazy(()=>f(()=>import("./complete-BRGGVyCs.js"),__vite__mapDeps([70,1,2,22,71,72,19,16,17])));function qe(){var I,V,k;const t=X(i=>i.breakpoints.down("md")),o=J(),{t:s,locale:r}=Y(),[C,U]=ee(),x=te(),{meta:L,blocklet:p,actions:d,loading:F}=se(),z=localStorage.getItem("blocklet-server-url"),{session:P}=oe(),H=A("fromLauncher"),w=A("visitorId");w&&(re(w),C.delete("visitorId"),U(C)),u.useEffect(()=>{ne(),P.user&&(d==null||d.refreshMeta(),d==null||d.refreshBlocklet({showError:!1}))},[P.user]),u.useEffect(()=>{d.refreshFuel({showError:!1})},[(I=p==null?void 0:p.meta)==null?void 0:I.did]);const n=`${T.WELLKNOWN_SERVICE_PATH_PREFIX}/setup`,K=i=>{var y;const l=(y=i==null?void 0:i.capabilities)==null?void 0:y.didSpace;return l?l===g.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||l===g.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP?{key:"did-space",name:e.jsxs(e.Fragment,{children:[s("setup.steps.didSpace")," ",e.jsx(j,{})]}),path:a(n,"did-space")}:l===g.BLOCKLET_APP_SPACE_REQUIREMENT.OPTIONAL?{key:"did-space",name:e.jsx(e.Fragment,{children:s("setup.steps.didSpace")}),path:a(n,"did-space")}:(console.warn(`capabilities.didSpace cannot take the value ${l}`),null):null},h=[{key:"access",name:s("setup.steps.access"),path:a(n,"access")},{key:"domain",name:s("setup.steps.domain"),path:a(n,"domain")},K(p),{key:"config",name:e.jsxs(e.Fragment,{children:[s("setup.steps.config")," ",ae(L)&&e.jsx(j,{})]}),path:a(n,"config")},(k=(V=L==null?void 0:L.requirements)==null?void 0:V.fuels)!=null&&k.length?{key:"fuel",name:e.jsxs(e.Fragment,{children:[s("setup.steps.fuel")," ",e.jsx(j,{})]}),path:a(n,"fuel")}:null].filter(Boolean),S=h.findIndex(i=>`${D.replace(/\/$/,"")}${n}/${i.key}`===window.location.pathname),Z=a(D,T.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${p==null?void 0:p.updatedAt}`),Q=async i=>{const{search:l}=new URL(window.location.href);if(!i)h[S+1]?x(`${a(n,h[S+1].key)}${l}`):x(`${a(n,"complete")}${l}`);else{const y=h.findIndex(G=>G.key===i);y>-1?x(`${a(n,h[y].key)}${l}`):x(`${a(n,"complete")}${l}`)}await d.refreshBlocklet()},W=()=>{x(-1)};function _(i,l){return e.jsxs(Se,{children:[!p&&e.jsx(me,{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:e.jsx(fe,{})}),p&&e.jsx(i,{blocklet:p,...l,onNext:Q,onPrevious:W})]})}const O=()=>{window.open(ge(z,{allowDomains:null}))},q=t?e.jsx(N,{onClick:O,width:"32",height:"32",style:{cursor:"pointer"}}):e.jsx(xe,{onClick:O,width:"128",height:"48",style:{marginTop:-1,cursor:"pointer"}}),R=[{key:"install",name:s("launchBlocklet.steps.installApp"),path:a(n,"install")},{key:"setup",name:s("setup.steps.launchApp"),children:h}];let b=[{key:"agreement",name:s("launchBlocklet.introduction"),path:a(n,"agreement")},...R];return H&&(b=[{key:"purchase-space",name:s("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:s("launchBlocklet.steps.prepareSpace")},...R]),e.jsx(ye,{steps:b,children:e.jsx(ie,{children:e.jsxs(he,{children:[e.jsx(le,{styles:Ae}),e.jsx(De,{locale:r,loading:F,blockletMeta:{...L,title:ce.getDisplayName({...p,meta:L})},navLogo:q,pcWidth:"80%",style:{height:"100%"},logoUrl:Z,useOfSkeleton:!1,headerEndAddons:e.jsx(_e,{SessionContext:pe,sessionManagerProps:{disableLogout:!0}}),theme:o,launchingText:s("setup.title"),children:e.jsxs(ue,{children:[e.jsx(m,{path:"access",element:_(Ie)}),e.jsx(m,{path:"domain",element:_(be)}),e.jsx(m,{path:"did-space",element:_(Re)}),e.jsx(m,{path:"config",element:_(Oe)}),e.jsx(m,{path:"fuel",element:_(Ve)}),e.jsx(m,{path:"complete",element:_(ke)}),e.jsx(m,{path:"*",element:e.jsx(de,{to:`access${window.location.search}`,replace:!0})})]})})]})})})}const Ae=Le`
|
|
8
8
|
html,
|
|
9
9
|
body,
|
|
10
10
|
#app,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n,T as t,a,P as i}from"./index-
|
|
1
|
+
import{j as n,T as t,a,P as i}from"./index-C7otKf8F.js";function s(e,o=10){return typeof e=="string"&&(e==null?void 0:e.length)>o?`${e.slice(0,o-1)}...${e.slice(-2)}`:e}function r({children:e,maxLength:o,sx:p,hiddenTip:u}){return(e==null?void 0:e.length)<=o?n.jsx(t,{sx:p,children:e}):u?n.jsx(t,{sx:p,children:s(e,o)}):n.jsx(a,{title:e,placement:"top",children:n.jsx(t,{sx:p,children:s(e,o)})})}r.propTypes={children:i.string.isRequired,maxLength:i.number,sx:i.object,hiddenTip:i.bool};r.defaultProps={maxLength:10,sx:null,hiddenTip:!1};export{r as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eR as F,P as re,j as P,B as lr,bk as Mr,T as Le,aY as Re}from"./index-DGzsRulL.js";import{F as Br}from"./FormControl-CaNHX_WE.js";import{d as Nr,S as Pr,O as Wr}from"./Select-DfXeNuuX.js";import{a as qr}from"./Delete-DSU3unjA.js";import{F as Hr}from"./TextField-DOQ6HCtN.js";var ve=e=>e.type==="checkbox",ce=e=>e instanceof Date,H=e=>e==null;const hr=e=>typeof e=="object";var R=e=>!H(e)&&!Array.isArray(e)&&hr(e)&&!ce(e),vr=e=>R(e)&&e.target?ve(e.target)?e.target.checked:e.target.value:e,$r=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,mr=(e,s)=>e.has($r(s)),zr=e=>{const s=e.constructor&&e.constructor.prototype;return R(s)&&s.hasOwnProperty("isPrototypeOf")},Ye=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function j(e){let s;const r=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(Ye&&(e instanceof Blob||e instanceof FileList))&&(r||R(e)))if(s=r?[]:{},!r&&!zr(e))s=e;else for(const i in e)e.hasOwnProperty(i)&&(s[i]=j(e[i]));else return e;return s}var me=e=>Array.isArray(e)?e.filter(Boolean):[],C=e=>e===void 0,c=(e,s,r)=>{if(!s||!R(e))return r;const i=me(s.split(/[,[\].]+?/)).reduce((n,u)=>H(n)?n:n[u],e);return C(i)||i===e?C(e[s])?r:e[s]:i},J=e=>typeof e=="boolean",Ge=e=>/^\w*$/.test(e),br=e=>me(e.replace(/["|']|\]/g,"").split(/\.|\[/)),E=(e,s,r)=>{let i=-1;const n=Ge(s)?[s]:br(s),u=n.length,y=u-1;for(;++i<u;){const g=n[i];let x=r;if(i!==y){const O=e[g];x=R(O)||Array.isArray(O)?O:isNaN(+n[i+1])?{}:[]}if(g==="__proto__")return;e[g]=x,e=e[g]}return e};const Ae={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Q={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ie={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Kr=F.createContext(null),De=()=>F.useContext(Kr);var xr=(e,s,r,i=!0)=>{const n={defaultValues:s._defaultValues};for(const u in e)Object.defineProperty(n,u,{get:()=>{const y=u;return s._proxyFormState[y]!==Q.all&&(s._proxyFormState[y]=!i||Q.all),r&&(r[y]=!0),e[y]}});return n},q=e=>R(e)&&!Object.keys(e).length,Fr=(e,s,r,i)=>{r(e);const{name:n,...u}=e;return q(u)||Object.keys(u).length>=Object.keys(s).length||Object.keys(u).find(y=>s[y]===(!i||Q.all))},K=e=>Array.isArray(e)?e:[e],Ar=(e,s,r)=>!e||!s||e===s||K(e).some(i=>i&&(r?i===s:i.startsWith(s)||s.startsWith(i)));function ke(e){const s=F.useRef(e);s.current=e,F.useEffect(()=>{const r=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function Yr(e){const s=De(),{control:r=s.control,disabled:i,name:n,exact:u}=e||{},[y,g]=F.useState(r._formState),x=F.useRef(!0),O=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),b=F.useRef(n);return b.current=n,ke({disabled:i,next:v=>x.current&&Ar(b.current,v.name,u)&&Fr(v,O.current,r._updateFormState)&&g({...r._formState,...v}),subject:r._subjects.state}),F.useEffect(()=>(x.current=!0,O.current.isValid&&r._updateValid(!0),()=>{x.current=!1}),[r]),xr(y,r,O.current,!1)}var se=e=>typeof e=="string",Vr=(e,s,r,i,n)=>se(e)?(i&&s.watch.add(e),c(r,e,n)):Array.isArray(e)?e.map(u=>(i&&s.watch.add(u),c(r,u))):(i&&(s.watchAll=!0),r);function Gr(e){const s=De(),{control:r=s.control,name:i,defaultValue:n,disabled:u,exact:y}=e||{},g=F.useRef(i);g.current=i,ke({disabled:u,subject:r._subjects.values,next:b=>{Ar(g.current,b.name,y)&&O(j(Vr(g.current,r._names,b.values||r._formValues,!1,n)))}});const[x,O]=F.useState(r._getWatch(i,n));return F.useEffect(()=>r._removeUnmounted()),x}function Jr(e){const s=De(),{name:r,disabled:i,control:n=s.control,shouldUnregister:u}=e,y=mr(n._names.array,r),g=Gr({control:n,name:r,defaultValue:c(n._formValues,r,c(n._defaultValues,r,e.defaultValue)),exact:!0}),x=Yr({control:n,name:r,exact:!0}),O=F.useRef(n.register(r,{...e.rules,value:g,...J(e.disabled)?{disabled:e.disabled}:{}}));return F.useEffect(()=>{const b=n._options.shouldUnregister||u,v=(S,$)=>{const w=c(n._fields,S);w&&w._f&&(w._f.mount=$)};if(v(r,!0),b){const S=j(c(n._options.defaultValues,r));E(n._defaultValues,r,S),C(c(n._formValues,r))&&E(n._formValues,r,S)}return()=>{(y?b&&!n._state.action:b)?n.unregister(r):v(r,!1)}},[r,n,y,u]),F.useEffect(()=>{c(n._fields,r)&&n._updateDisabledField({disabled:i,fields:n._fields,name:r,value:c(n._fields,r)._f.value})},[i,r,n]),{field:{name:r,value:g,...J(i)||x.disabled?{disabled:x.disabled||i}:{},onChange:F.useCallback(b=>O.current.onChange({target:{value:vr(b),name:r},type:Ae.CHANGE}),[r]),onBlur:F.useCallback(()=>O.current.onBlur({target:{value:c(n._formValues,r),name:r},type:Ae.BLUR}),[r,n]),ref:F.useCallback(b=>{const v=c(n._fields,r);v&&b&&(v._f.ref={focus:()=>b.focus(),select:()=>b.select(),setCustomValidity:S=>b.setCustomValidity(S),reportValidity:()=>b.reportValidity()})},[n._fields,r])},formState:x,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!c(x.errors,r)},isDirty:{enumerable:!0,get:()=>!!c(x.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!c(x.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!c(x.validatingFields,r)},error:{enumerable:!0,get:()=>c(x.errors,r)}})}}const mt=e=>e.render(Jr(e));var Qr=(e,s,r,i,n)=>s?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:n||!0}}:{},ue=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{const r=(Math.random()*16+e)%16|0;return(s=="x"?r:r&3|8).toString(16)})},Ue=(e,s,r={})=>r.shouldFocus||C(r.shouldFocus)?r.focusName||`${e}.${C(r.focusIndex)?s:r.focusIndex}.`:"",he=e=>({isOnSubmit:!e||e===Q.onSubmit,isOnBlur:e===Q.onBlur,isOnChange:e===Q.onChange,isOnAll:e===Q.all,isOnTouch:e===Q.onTouched}),ze=(e,s,r)=>!r&&(s.watchAll||s.watch.has(e)||[...s.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const fe=(e,s,r,i)=>{for(const n of r||Object.keys(e)){const u=c(e,n);if(u){const{_f:y,...g}=u;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],n)&&!i)return!0;if(y.ref&&s(y.ref,y.name)&&!i)return!0;if(fe(g,s))break}else if(R(g)&&fe(g,s))break}}};var pr=(e,s,r)=>{const i=K(c(e,r));return E(i,"root",s[r]),E(e,r,i),e},Je=e=>e.type==="file",ae=e=>typeof e=="function",Ve=e=>{if(!Ye)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},Fe=e=>se(e),Qe=e=>e.type==="radio",pe=e=>e instanceof RegExp;const or={value:!1,isValid:!1},cr={value:!0,isValid:!0};var Sr=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!C(e[0].attributes.value)?C(e[0].value)||e[0].value===""?cr:{value:e[0].value,isValid:!0}:cr:or}return or};const fr={isValid:!1,value:null};var wr=e=>Array.isArray(e)?e.reduce((s,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:s,fr):fr;function dr(e,s,r="validate"){if(Fe(e)||Array.isArray(e)&&e.every(Fe)||J(e)&&!e)return{type:r,message:Fe(e)?e:"",ref:s}}var oe=e=>R(e)&&!pe(e)?e:{value:e,message:""},Ke=async(e,s,r,i,n)=>{const{ref:u,refs:y,required:g,maxLength:x,minLength:O,min:b,max:v,pattern:S,validate:$,name:w,valueAsNumber:te,mount:B,disabled:z}=e._f,p=c(s,w);if(!B||z)return{};const X=y?y[0]:u,Z=V=>{i&&X.reportValidity&&(X.setCustomValidity(J(V)?"":V||""),X.reportValidity())},_={},m=Qe(u),A=ve(u),T=m||A,Y=(te||Je(u))&&C(u.value)&&C(p)||Ve(u)&&u.value===""||p===""||Array.isArray(p)&&!p.length,W=Qr.bind(null,w,r,_),be=(V,D,U,N=ie.maxLength,ee=ie.minLength)=>{const G=V?D:U;_[w]={type:V?N:ee,message:G,ref:u,...W(V?N:ee,G)}};if(n?!Array.isArray(p)||!p.length:g&&(!T&&(Y||H(p))||J(p)&&!p||A&&!Sr(y).isValid||m&&!wr(y).isValid)){const{value:V,message:D}=Fe(g)?{value:!!g,message:g}:oe(g);if(V&&(_[w]={type:ie.required,message:D,ref:X,...W(ie.required,D)},!r))return Z(D),_}if(!Y&&(!H(b)||!H(v))){let V,D;const U=oe(v),N=oe(b);if(!H(p)&&!isNaN(p)){const ee=u.valueAsNumber||p&&+p;H(U.value)||(V=ee>U.value),H(N.value)||(D=ee<N.value)}else{const ee=u.valueAsDate||new Date(p),G=ge=>new Date(new Date().toDateString()+" "+ge),de=u.type=="time",ye=u.type=="week";se(U.value)&&p&&(V=de?G(p)>G(U.value):ye?p>U.value:ee>new Date(U.value)),se(N.value)&&p&&(D=de?G(p)<G(N.value):ye?p<N.value:ee<new Date(N.value))}if((V||D)&&(be(!!V,U.message,N.message,ie.max,ie.min),!r))return Z(_[w].message),_}if((x||O)&&!Y&&(se(p)||n&&Array.isArray(p))){const V=oe(x),D=oe(O),U=!H(V.value)&&p.length>+V.value,N=!H(D.value)&&p.length<+D.value;if((U||N)&&(be(U,V.message,D.message),!r))return Z(_[w].message),_}if(S&&!Y&&se(p)){const{value:V,message:D}=oe(S);if(pe(V)&&!p.match(V)&&(_[w]={type:ie.pattern,message:D,ref:u,...W(ie.pattern,D)},!r))return Z(D),_}if($){if(ae($)){const V=await $(p,s),D=dr(V,X);if(D&&(_[w]={...D,...W(ie.validate,D.message)},!r))return Z(D.message),_}else if(R($)){let V={};for(const D in $){if(!q(V)&&!r)break;const U=dr(await $[D](p,s),X,D);U&&(V={...U,...W(D,U.message)},Z(U.message),r&&(_[w]=V))}if(!q(V)&&(_[w]={ref:X,...V},!r))return _}}return Z(!0),_},je=(e,s)=>[...e,...K(s)],Ie=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Me(e,s,r){return[...e.slice(0,s),...K(r),...e.slice(s)]}var Be=(e,s,r)=>Array.isArray(e)?(C(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(s,1)[0]),e):[],Ne=(e,s)=>[...K(s),...K(e)];function Xr(e,s){let r=0;const i=[...e];for(const n of s)i.splice(n-r,1),r++;return me(i).length?i:[]}var Pe=(e,s)=>C(s)?[]:Xr(e,K(s).sort((r,i)=>r-i)),We=(e,s,r)=>{[e[s],e[r]]=[e[r],e[s]]};function Zr(e,s){const r=s.slice(0,-1).length;let i=0;for(;i<r;)e=C(e)?i++:e[s[i++]];return e}function et(e){for(const s in e)if(e.hasOwnProperty(s)&&!C(e[s]))return!1;return!0}function L(e,s){const r=Array.isArray(s)?s:Ge(s)?[s]:br(s),i=r.length===1?e:Zr(e,r),n=r.length-1,u=r[n];return i&&delete i[u],n!==0&&(R(i)&&q(i)||Array.isArray(i)&&et(i))&&L(e,r.slice(0,-1)),e}var yr=(e,s,r)=>(e[s]=r,e);function bt(e){const s=De(),{control:r=s.control,name:i,keyName:n="id",shouldUnregister:u}=e,[y,g]=F.useState(r._getFieldArray(i)),x=F.useRef(r._getFieldArray(i).map(ue)),O=F.useRef(y),b=F.useRef(i),v=F.useRef(!1);b.current=i,O.current=y,r._names.array.add(i),e.rules&&r.register(i,e.rules),ke({next:({values:_,name:m})=>{if(m===b.current||!m){const A=c(_,b.current);Array.isArray(A)&&(g(A),x.current=A.map(ue))}},subject:r._subjects.array});const S=F.useCallback(_=>{v.current=!0,r._updateFieldArray(i,_)},[r,i]),$=(_,m)=>{const A=K(j(_)),T=je(r._getFieldArray(i),A);r._names.focus=Ue(i,T.length-1,m),x.current=je(x.current,A.map(ue)),S(T),g(T),r._updateFieldArray(i,T,je,{argA:Ie(_)})},w=(_,m)=>{const A=K(j(_)),T=Ne(r._getFieldArray(i),A);r._names.focus=Ue(i,0,m),x.current=Ne(x.current,A.map(ue)),S(T),g(T),r._updateFieldArray(i,T,Ne,{argA:Ie(_)})},te=_=>{const m=Pe(r._getFieldArray(i),_);x.current=Pe(x.current,_),S(m),g(m),r._updateFieldArray(i,m,Pe,{argA:_})},B=(_,m,A)=>{const T=K(j(m)),Y=Me(r._getFieldArray(i),_,T);r._names.focus=Ue(i,_,A),x.current=Me(x.current,_,T.map(ue)),S(Y),g(Y),r._updateFieldArray(i,Y,Me,{argA:_,argB:Ie(m)})},z=(_,m)=>{const A=r._getFieldArray(i);We(A,_,m),We(x.current,_,m),S(A),g(A),r._updateFieldArray(i,A,We,{argA:_,argB:m},!1)},p=(_,m)=>{const A=r._getFieldArray(i);Be(A,_,m),Be(x.current,_,m),S(A),g(A),r._updateFieldArray(i,A,Be,{argA:_,argB:m},!1)},X=(_,m)=>{const A=j(m),T=yr(r._getFieldArray(i),_,A);x.current=[...T].map((Y,W)=>!Y||W===_?ue():x.current[W]),S(T),g([...T]),r._updateFieldArray(i,T,yr,{argA:_,argB:A},!0,!1)},Z=_=>{const m=K(j(_));x.current=m.map(ue),S([...m]),g([...m]),r._updateFieldArray(i,[...m],A=>A,{},!0,!1)};return F.useEffect(()=>{if(r._state.action=!1,ze(i,r._names)&&r._subjects.state.next({...r._formState}),v.current&&(!he(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([i]).then(_=>{const m=c(_.errors,i),A=c(r._formState.errors,i);(A?!m&&A.type||m&&(A.type!==m.type||A.message!==m.message):m&&m.type)&&(m?E(r._formState.errors,i,m):L(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))});else{const _=c(r._fields,i);_&&_._f&&!(he(r._options.reValidateMode).isOnSubmit&&he(r._options.mode).isOnSubmit)&&Ke(_,r._formValues,r._options.criteriaMode===Q.all,r._options.shouldUseNativeValidation,!0).then(m=>!q(m)&&r._subjects.state.next({errors:pr(r._formState.errors,m,i)}))}r._subjects.values.next({name:i,values:{...r._formValues}}),r._names.focus&&fe(r._fields,(_,m)=>{if(r._names.focus&&m.startsWith(r._names.focus)&&_.focus)return _.focus(),1}),r._names.focus="",r._updateValid(),v.current=!1},[y,i,r]),F.useEffect(()=>(!c(r._formValues,i)&&r._updateFieldArray(i),()=>{(r._options.shouldUnregister||u)&&r.unregister(i)}),[i,r,n,u]),{swap:F.useCallback(z,[S,i,r]),move:F.useCallback(p,[S,i,r]),prepend:F.useCallback(w,[S,i,r]),append:F.useCallback($,[S,i,r]),remove:F.useCallback(te,[S,i,r]),insert:F.useCallback(B,[S,i,r]),update:F.useCallback(X,[S,i,r]),replace:F.useCallback(Z,[S,i,r]),fields:F.useMemo(()=>y.map((_,m)=>({..._,[n]:x.current[m]||ue()})),[y,n])}}var qe=()=>{let e=[];return{get observers(){return e},next:n=>{for(const u of e)u.next&&u.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(u=>u!==n)}}),unsubscribe:()=>{e=[]}}},Se=e=>H(e)||!hr(e);function ne(e,s){if(Se(e)||Se(s))return e===s;if(ce(e)&&ce(s))return e.getTime()===s.getTime();const r=Object.keys(e),i=Object.keys(s);if(r.length!==i.length)return!1;for(const n of r){const u=e[n];if(!i.includes(n))return!1;if(n!=="ref"){const y=s[n];if(ce(u)&&ce(y)||R(u)&&R(y)||Array.isArray(u)&&Array.isArray(y)?!ne(u,y):u!==y)return!1}}return!0}var Dr=e=>e.type==="select-multiple",rt=e=>Qe(e)||ve(e),He=e=>Ve(e)&&e.isConnected,kr=e=>{for(const s in e)if(ae(e[s]))return!0;return!1};function we(e,s={}){const r=Array.isArray(e);if(R(e)||r)for(const i in e)Array.isArray(e[i])||R(e[i])&&!kr(e[i])?(s[i]=Array.isArray(e[i])?[]:{},we(e[i],s[i])):H(e[i])||(s[i]=!0);return s}function Er(e,s,r){const i=Array.isArray(e);if(R(e)||i)for(const n in e)Array.isArray(e[n])||R(e[n])&&!kr(e[n])?C(s)||Se(r[n])?r[n]=Array.isArray(e[n])?we(e[n],[]):{...we(e[n])}:Er(e[n],H(s)?{}:s[n],r[n]):r[n]=!ne(e[n],s[n]);return r}var xe=(e,s)=>Er(e,s,we(s)),Cr=(e,{valueAsNumber:s,valueAsDate:r,setValueAs:i})=>C(e)?e:s?e===""?NaN:e&&+e:r&&se(e)?new Date(e):i?i(e):e;function $e(e){const s=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):s.disabled))return Je(s)?s.files:Qe(s)?wr(e.refs).value:Dr(s)?[...s.selectedOptions].map(({value:r})=>r):ve(s)?Sr(e.refs).value:Cr(C(s.value)?e.ref.value:s.value,e)}var tt=(e,s,r,i)=>{const n={};for(const u of e){const y=c(s,u);y&&E(n,u,y._f)}return{criteriaMode:r,names:[...e],fields:n,shouldUseNativeValidation:i}},_e=e=>C(e)?e:pe(e)?e.source:R(e)?pe(e.value)?e.value.source:e.value:e;const gr="AsyncFunction";var st=e=>(!e||!e.validate)&&!!(ae(e.validate)&&e.validate.constructor.name===gr||R(e.validate)&&Object.values(e.validate).find(s=>s.constructor.name===gr)),it=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function _r(e,s,r){const i=c(e,r);if(i||Ge(r))return{error:i,name:r};const n=r.split(".");for(;n.length;){const u=n.join("."),y=c(s,u),g=c(e,u);if(y&&!Array.isArray(y)&&r!==u)return{name:r};if(g&&g.type)return{name:u,error:g};n.pop()}return{name:r}}var at=(e,s,r,i,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(s||e):(r?i.isOnBlur:n.isOnBlur)?!e:(r?i.isOnChange:n.isOnChange)?e:!0,ut=(e,s)=>!me(c(e,s)).length&&L(e,s);const nt={mode:Q.onSubmit,reValidateMode:Q.onChange,shouldFocusError:!0};function lt(e={}){let s={...nt,...e},r={submitCount:0,isDirty:!1,isLoading:ae(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},i={},n=R(s.defaultValues)||R(s.values)?j(s.defaultValues||s.values)||{}:{},u=s.shouldUnregister?{}:j(n),y={action:!1,mount:!1,watch:!1},g={mount:new Set,unMount:new Set,array:new Set,watch:new Set},x,O=0;const b={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:qe(),array:qe(),state:qe()},S=he(s.mode),$=he(s.reValidateMode),w=s.criteriaMode===Q.all,te=t=>a=>{clearTimeout(O),O=setTimeout(t,a)},B=async t=>{if(b.isValid||t){const a=s.resolver?q((await T()).errors):await W(i,!0);a!==r.isValid&&v.state.next({isValid:a})}},z=(t,a)=>{(b.isValidating||b.validatingFields)&&((t||Array.from(g.mount)).forEach(l=>{l&&(a?E(r.validatingFields,l,a):L(r.validatingFields,l))}),v.state.next({validatingFields:r.validatingFields,isValidating:!q(r.validatingFields)}))},p=(t,a=[],l,d,f=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(c(i,t))){const h=l(c(i,t),d.argA,d.argB);f&&E(i,t,h)}if(o&&Array.isArray(c(r.errors,t))){const h=l(c(r.errors,t),d.argA,d.argB);f&&E(r.errors,t,h),ut(r.errors,t)}if(b.touchedFields&&o&&Array.isArray(c(r.touchedFields,t))){const h=l(c(r.touchedFields,t),d.argA,d.argB);f&&E(r.touchedFields,t,h)}b.dirtyFields&&(r.dirtyFields=xe(n,u)),v.state.next({name:t,isDirty:V(t,a),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else E(u,t,a)},X=(t,a)=>{E(r.errors,t,a),v.state.next({errors:r.errors})},Z=t=>{r.errors=t,v.state.next({errors:r.errors,isValid:!1})},_=(t,a,l,d)=>{const f=c(i,t);if(f){const o=c(u,t,C(l)?c(n,t):l);C(o)||d&&d.defaultChecked||a?E(u,t,a?o:$e(f._f)):N(t,o),y.mount&&B()}},m=(t,a,l,d,f)=>{let o=!1,h=!1;const k={name:t},I=!!(c(i,t)&&c(i,t)._f&&c(i,t)._f.disabled);if(!l||d){b.isDirty&&(h=r.isDirty,r.isDirty=k.isDirty=V(),o=h!==k.isDirty);const M=I||ne(c(n,t),a);h=!!(!I&&c(r.dirtyFields,t)),M||I?L(r.dirtyFields,t):E(r.dirtyFields,t,!0),k.dirtyFields=r.dirtyFields,o=o||b.dirtyFields&&h!==!M}if(l){const M=c(r.touchedFields,t);M||(E(r.touchedFields,t,l),k.touchedFields=r.touchedFields,o=o||b.touchedFields&&M!==l)}return o&&f&&v.state.next(k),o?k:{}},A=(t,a,l,d)=>{const f=c(r.errors,t),o=b.isValid&&J(a)&&r.isValid!==a;if(e.delayError&&l?(x=te(()=>X(t,l)),x(e.delayError)):(clearTimeout(O),x=null,l?E(r.errors,t,l):L(r.errors,t)),(l?!ne(f,l):f)||!q(d)||o){const h={...d,...o&&J(a)?{isValid:a}:{},errors:r.errors,name:t};r={...r,...h},v.state.next(h)}},T=async t=>{z(t,!0);const a=await s.resolver(u,s.context,tt(t||g.mount,i,s.criteriaMode,s.shouldUseNativeValidation));return z(t),a},Y=async t=>{const{errors:a}=await T(t);if(t)for(const l of t){const d=c(a,l);d?E(r.errors,l,d):L(r.errors,l)}else r.errors=a;return a},W=async(t,a,l={valid:!0})=>{for(const d in t){const f=t[d];if(f){const{_f:o,...h}=f;if(o){const k=g.array.has(o.name),I=f._f&&st(f._f);I&&b.validatingFields&&z([d],!0);const M=await Ke(f,u,w,s.shouldUseNativeValidation&&!a,k);if(I&&b.validatingFields&&z([d]),M[o.name]&&(l.valid=!1,a))break;!a&&(c(M,o.name)?k?pr(r.errors,M,o.name):E(r.errors,o.name,M[o.name]):L(r.errors,o.name))}!q(h)&&await W(h,a,l)}}return l.valid},be=()=>{for(const t of g.unMount){const a=c(i,t);a&&(a._f.refs?a._f.refs.every(l=>!He(l)):!He(a._f.ref))&&Ee(t)}g.unMount=new Set},V=(t,a)=>(t&&a&&E(u,t,a),!ne(Xe(),n)),D=(t,a,l)=>Vr(t,g,{...y.mount?u:C(a)?n:se(t)?{[t]:a}:a},l,a),U=t=>me(c(y.mount?u:n,t,e.shouldUnregister?c(n,t,[]):[])),N=(t,a,l={})=>{const d=c(i,t);let f=a;if(d){const o=d._f;o&&(!o.disabled&&E(u,t,Cr(a,o)),f=Ve(o.ref)&&H(a)?"":a,Dr(o.ref)?[...o.ref.options].forEach(h=>h.selected=f.includes(h.value)):o.refs?ve(o.ref)?o.refs.length>1?o.refs.forEach(h=>(!h.defaultChecked||!h.disabled)&&(h.checked=Array.isArray(f)?!!f.find(k=>k===h.value):f===h.value)):o.refs[0]&&(o.refs[0].checked=!!f):o.refs.forEach(h=>h.checked=h.value===f):Je(o.ref)?o.ref.value="":(o.ref.value=f,o.ref.type||v.values.next({name:t,values:{...u}})))}(l.shouldDirty||l.shouldTouch)&&m(t,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ge(t)},ee=(t,a,l)=>{for(const d in a){const f=a[d],o=`${t}.${d}`,h=c(i,o);(g.array.has(t)||!Se(f)||h&&!h._f)&&!ce(f)?ee(o,f,l):N(o,f,l)}},G=(t,a,l={})=>{const d=c(i,t),f=g.array.has(t),o=j(a);E(u,t,o),f?(v.array.next({name:t,values:{...u}}),(b.isDirty||b.dirtyFields)&&l.shouldDirty&&v.state.next({name:t,dirtyFields:xe(n,u),isDirty:V(t,o)})):d&&!d._f&&!H(o)?ee(t,o,l):N(t,o,l),ze(t,g)&&v.state.next({...r}),v.values.next({name:y.mount?t:void 0,values:{...u}})},de=async t=>{y.mount=!0;const a=t.target;let l=a.name,d=!0;const f=c(i,l),o=()=>a.type?$e(f._f):vr(t),h=k=>{d=Number.isNaN(k)||ne(k,c(u,l,k))};if(f){let k,I;const M=o(),le=t.type===Ae.BLUR||t.type===Ae.FOCUS_OUT,Ur=!it(f._f)&&!s.resolver&&!c(r.errors,l)&&!f._f.deps||at(le,c(r.touchedFields,l),r.isSubmitted,$,S),Te=ze(l,g,le);E(u,l,M),le?(f._f.onBlur&&f._f.onBlur(t),x&&x(0)):f._f.onChange&&f._f.onChange(t);const Oe=m(l,M,le,!1),jr=!q(Oe)||Te;if(!le&&v.values.next({name:l,type:t.type,values:{...u}}),Ur)return b.isValid&&(e.mode==="onBlur"?le&&B():B()),jr&&v.state.next({name:l,...Te?{}:Oe});if(!le&&Te&&v.state.next({...r}),s.resolver){const{errors:ur}=await T([l]);if(h(M),d){const Ir=_r(r.errors,i,l),nr=_r(ur,i,Ir.name||l);k=nr.error,l=nr.name,I=q(ur)}}else z([l],!0),k=(await Ke(f,u,w,s.shouldUseNativeValidation))[l],z([l]),h(M),d&&(k?I=!1:b.isValid&&(I=await W(i,!0)));d&&(f._f.deps&&ge(f._f.deps),A(l,I,k,Oe))}},ye=(t,a)=>{if(c(r.errors,a)&&t.focus)return t.focus(),1},ge=async(t,a={})=>{let l,d;const f=K(t);if(s.resolver){const o=await Y(C(t)?t:f);l=q(o),d=t?!f.some(h=>c(o,h)):l}else t?(d=(await Promise.all(f.map(async o=>{const h=c(i,o);return await W(h&&h._f?{[o]:h}:h)}))).every(Boolean),!(!d&&!r.isValid)&&B()):d=l=await W(i);return v.state.next({...!se(t)||b.isValid&&l!==r.isValid?{}:{name:t},...s.resolver||!t?{isValid:l}:{},errors:r.errors}),a.shouldFocus&&!d&&fe(i,ye,t?f:g.mount),d},Xe=t=>{const a={...y.mount?u:n};return C(t)?a:se(t)?c(a,t):t.map(l=>c(a,l))},Ze=(t,a)=>({invalid:!!c((a||r).errors,t),isDirty:!!c((a||r).dirtyFields,t),error:c((a||r).errors,t),isValidating:!!c(r.validatingFields,t),isTouched:!!c((a||r).touchedFields,t)}),Tr=t=>{t&&K(t).forEach(a=>L(r.errors,a)),v.state.next({errors:t?r.errors:{}})},er=(t,a,l)=>{const d=(c(i,t,{_f:{}})._f||{}).ref,f=c(r.errors,t)||{},{ref:o,message:h,type:k,...I}=f;E(r.errors,t,{...I,...a,ref:d}),v.state.next({name:t,errors:r.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},Or=(t,a)=>ae(t)?v.values.subscribe({next:l=>t(D(void 0,a),l)}):D(t,a,!0),Ee=(t,a={})=>{for(const l of t?K(t):g.mount)g.mount.delete(l),g.array.delete(l),a.keepValue||(L(i,l),L(u,l)),!a.keepError&&L(r.errors,l),!a.keepDirty&&L(r.dirtyFields,l),!a.keepTouched&&L(r.touchedFields,l),!a.keepIsValidating&&L(r.validatingFields,l),!s.shouldUnregister&&!a.keepDefaultValue&&L(n,l);v.values.next({values:{...u}}),v.state.next({...r,...a.keepDirty?{isDirty:V()}:{}}),!a.keepIsValid&&B()},rr=({disabled:t,name:a,field:l,fields:d,value:f})=>{if(J(t)&&y.mount||t){const o=t?void 0:C(f)?$e(l?l._f:c(d,a)._f):f;E(u,a,o),m(a,o,!1,!1,!0)}},Ce=(t,a={})=>{let l=c(i,t);const d=J(a.disabled)||J(e.disabled);return E(i,t,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:t}},name:t,mount:!0,...a}}),g.mount.add(t),l?rr({field:l,disabled:J(a.disabled)?a.disabled:e.disabled,name:t,value:a.value}):_(t,!0,a.value),{...d?{disabled:a.disabled||e.disabled}:{},...s.progressive?{required:!!a.required,min:_e(a.min),max:_e(a.max),minLength:_e(a.minLength),maxLength:_e(a.maxLength),pattern:_e(a.pattern)}:{},name:t,onChange:de,onBlur:de,ref:f=>{if(f){Ce(t,a),l=c(i,t);const o=C(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,h=rt(o),k=l._f.refs||[];if(h?k.find(I=>I===o):o===l._f.ref)return;E(i,t,{_f:{...l._f,...h?{refs:[...k.filter(He),o,...Array.isArray(c(n,t))?[{}]:[]],ref:{type:o.type,name:t}}:{ref:o}}}),_(t,!1,void 0,o)}else l=c(i,t,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||a.shouldUnregister)&&!(mr(g.array,t)&&y.action)&&g.unMount.add(t)}}},tr=()=>s.shouldFocusError&&fe(i,ye,g.mount),Lr=t=>{J(t)&&(v.state.next({disabled:t}),fe(i,(a,l)=>{const d=c(i,l);d&&(a.disabled=d._f.disabled||t,Array.isArray(d._f.refs)&&d._f.refs.forEach(f=>{f.disabled=d._f.disabled||t}))},0,!1))},sr=(t,a)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let f=j(u);if(v.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:h}=await T();r.errors=o,f=h}else await W(i);if(L(r.errors,"root"),q(r.errors)){v.state.next({errors:{}});try{await t(f,l)}catch(o){d=o}}else a&&await a({...r.errors},l),tr(),setTimeout(tr);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:q(r.errors)&&!d,submitCount:r.submitCount+1,errors:r.errors}),d)throw d},Rr=(t,a={})=>{c(i,t)&&(C(a.defaultValue)?G(t,j(c(n,t))):(G(t,a.defaultValue),E(n,t,j(a.defaultValue))),a.keepTouched||L(r.touchedFields,t),a.keepDirty||(L(r.dirtyFields,t),r.isDirty=a.defaultValue?V(t,j(c(n,t))):V()),a.keepError||(L(r.errors,t),b.isValid&&B()),v.state.next({...r}))},ir=(t,a={})=>{const l=t?j(t):n,d=j(l),f=q(t),o=f?n:d;if(a.keepDefaultValues||(n=l),!a.keepValues){if(a.keepDirtyValues)for(const h of g.mount)c(r.dirtyFields,h)?E(o,h,c(u,h)):G(h,c(o,h));else{if(Ye&&C(t))for(const h of g.mount){const k=c(i,h);if(k&&k._f){const I=Array.isArray(k._f.refs)?k._f.refs[0]:k._f.ref;if(Ve(I)){const M=I.closest("form");if(M){M.reset();break}}}}i={}}u=e.shouldUnregister?a.keepDefaultValues?j(n):{}:j(o),v.array.next({values:{...o}}),v.values.next({values:{...o}})}g={mount:a.keepDirtyValues?g.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!b.isValid||!!a.keepIsValid||!!a.keepDirtyValues,y.watch=!!e.shouldUnregister,v.state.next({submitCount:a.keepSubmitCount?r.submitCount:0,isDirty:f?!1:a.keepDirty?r.isDirty:!!(a.keepDefaultValues&&!ne(t,n)),isSubmitted:a.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:f?{}:a.keepDirtyValues?a.keepDefaultValues&&u?xe(n,u):r.dirtyFields:a.keepDefaultValues&&t?xe(n,t):a.keepDirty?r.dirtyFields:{},touchedFields:a.keepTouched?r.touchedFields:{},errors:a.keepErrors?r.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ar=(t,a)=>ir(ae(t)?t(u):t,a);return{control:{register:Ce,unregister:Ee,getFieldState:Ze,handleSubmit:sr,setError:er,_executeSchema:T,_getWatch:D,_getDirty:V,_updateValid:B,_removeUnmounted:be,_updateFieldArray:p,_updateDisabledField:rr,_getFieldArray:U,_reset:ir,_resetDefaultValues:()=>ae(s.defaultValues)&&s.defaultValues().then(t=>{ar(t,s.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:t=>{r={...r,...t}},_disableForm:Lr,_subjects:v,_proxyFormState:b,_setErrors:Z,get _fields(){return i},get _formValues(){return u},get _state(){return y},set _state(t){y=t},get _defaultValues(){return n},get _names(){return g},set _names(t){g=t},get _formState(){return r},set _formState(t){r=t},get _options(){return s},set _options(t){s={...s,...t}}},trigger:ge,register:Ce,handleSubmit:sr,watch:Or,setValue:G,getValues:Xe,reset:ar,resetField:Rr,clearErrors:Tr,unregister:Ee,setError:er,setFocus:(t,a={})=>{const l=c(i,t),d=l&&l._f;if(d){const f=d.refs?d.refs[0]:d.ref;f.focus&&(f.focus(),a.shouldSelect&&f.select())}},getFieldState:Ze}}function xt(e={}){const s=F.useRef(),r=F.useRef(),[i,n]=F.useState({isDirty:!1,isValidating:!1,isLoading:ae(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ae(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...lt(e),formState:i});const u=s.current.control;return u._options=e,ke({subject:u._subjects.state,next:y=>{Fr(y,u._proxyFormState,u._updateFormState,!0)&&n({...u._formState})}}),F.useEffect(()=>u._disableForm(e.disabled),[u,e.disabled]),F.useEffect(()=>{if(u._proxyFormState.isDirty){const y=u._getDirty();y!==i.isDirty&&u._subjects.state.next({isDirty:y})}},[u,i.isDirty]),F.useEffect(()=>{e.values&&!ne(e.values,r.current)?(u._reset(e.values,u._options.resetOptions),r.current=e.values,n(y=>({...y}))):u._resetDefaultValues()},[e.values,u]),F.useEffect(()=>{e.errors&&u._setErrors(e.errors)},[e.errors,u]),F.useEffect(()=>{u._state.mount||(u._updateValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),F.useEffect(()=>{e.shouldUnregister&&u._subjects.values.next({values:u._getWatch()})},[e.shouldUnregister,u]),s.current.formState=xr(i,u),s.current}function ot({fullWidth:e=!1,multiple:s=!1,required:r=!1,label:i="",placeholer:n="",options:u=[],helperText:y="",error:g=!1,margin:x="",textDirection:O="row",size:b,...v}){const S=u.find(w=>w.value===v.value),$=S==null?void 0:S.title;return P.jsxs(Br,{margin:x,fullWidth:e,error:g,children:[P.jsx(Nr,{size:b,children:`${i}${r?"*":""}`}),P.jsxs(Pr,{multiple:s,input:P.jsx(Wr,{defaultValue:$,sx:{flex:1},required:r,label:i,inputProps:{margin:x},size:b}),renderValue:w=>{if(s)return P.jsx(lr,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:w.map(B=>{const z=u.find(p=>p.value===B);return z&&z.title&&P.jsx(Mr,{size:"small",label:z.title},B)})});const te=u.find(B=>B.value===w);return te&&te.title&&P.jsxs(lr,{children:[P.jsx(Le,{component:"span",children:te.title}),P.jsx(Le,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:te.description})]})},...v,children:[P.jsx(Re,{disabled:!0,children:P.jsx("em",{children:n})}),!r&&!s&&P.jsx(Re,{value:"",children:"None"}),u.map(w=>w&&w.value&&P.jsxs(Re,{sx:[{justifyContent:"center"},O==="column"?{flexDirection:"column",alignItems:"flex-start"}:{}],value:w.value,children:[P.jsx(qr,{children:w.title}),w.description&&P.jsx(Le,{variant:"body2",color:"text.secondary",sx:{maxWidth:"100%",whiteSpace:"normal"},children:w.description})]},w.value))]}),P.jsx(Hr,{children:y})]})}ot.propTypes={error:re.bool,required:re.bool,multiple:re.bool,fullWidth:re.bool,label:re.string,placeholer:re.string,options:re.array,helperText:re.string,margin:re.string,size:re.string,textDirection:re.oneOf("row","column")};export{mt as C,ot as S,bt as a,xt as u};
|
|
1
|
+
import{eR as F,P as re,j as P,B as lr,bk as Mr,T as Le,aY as Re}from"./index-C7otKf8F.js";import{F as Br}from"./FormControl-BsxgOlTX.js";import{d as Nr,S as Pr,O as Wr}from"./Select-B3cdfIzb.js";import{a as qr}from"./Delete-DOl4nPF3.js";import{F as Hr}from"./TextField-BWghiml0.js";var ve=e=>e.type==="checkbox",ce=e=>e instanceof Date,H=e=>e==null;const hr=e=>typeof e=="object";var R=e=>!H(e)&&!Array.isArray(e)&&hr(e)&&!ce(e),vr=e=>R(e)&&e.target?ve(e.target)?e.target.checked:e.target.value:e,$r=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,mr=(e,s)=>e.has($r(s)),zr=e=>{const s=e.constructor&&e.constructor.prototype;return R(s)&&s.hasOwnProperty("isPrototypeOf")},Ye=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function j(e){let s;const r=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(Ye&&(e instanceof Blob||e instanceof FileList))&&(r||R(e)))if(s=r?[]:{},!r&&!zr(e))s=e;else for(const i in e)e.hasOwnProperty(i)&&(s[i]=j(e[i]));else return e;return s}var me=e=>Array.isArray(e)?e.filter(Boolean):[],C=e=>e===void 0,c=(e,s,r)=>{if(!s||!R(e))return r;const i=me(s.split(/[,[\].]+?/)).reduce((n,u)=>H(n)?n:n[u],e);return C(i)||i===e?C(e[s])?r:e[s]:i},J=e=>typeof e=="boolean",Ge=e=>/^\w*$/.test(e),br=e=>me(e.replace(/["|']|\]/g,"").split(/\.|\[/)),E=(e,s,r)=>{let i=-1;const n=Ge(s)?[s]:br(s),u=n.length,y=u-1;for(;++i<u;){const g=n[i];let x=r;if(i!==y){const O=e[g];x=R(O)||Array.isArray(O)?O:isNaN(+n[i+1])?{}:[]}if(g==="__proto__")return;e[g]=x,e=e[g]}return e};const Ae={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Q={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ie={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Kr=F.createContext(null),De=()=>F.useContext(Kr);var xr=(e,s,r,i=!0)=>{const n={defaultValues:s._defaultValues};for(const u in e)Object.defineProperty(n,u,{get:()=>{const y=u;return s._proxyFormState[y]!==Q.all&&(s._proxyFormState[y]=!i||Q.all),r&&(r[y]=!0),e[y]}});return n},q=e=>R(e)&&!Object.keys(e).length,Fr=(e,s,r,i)=>{r(e);const{name:n,...u}=e;return q(u)||Object.keys(u).length>=Object.keys(s).length||Object.keys(u).find(y=>s[y]===(!i||Q.all))},K=e=>Array.isArray(e)?e:[e],Ar=(e,s,r)=>!e||!s||e===s||K(e).some(i=>i&&(r?i===s:i.startsWith(s)||s.startsWith(i)));function ke(e){const s=F.useRef(e);s.current=e,F.useEffect(()=>{const r=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function Yr(e){const s=De(),{control:r=s.control,disabled:i,name:n,exact:u}=e||{},[y,g]=F.useState(r._formState),x=F.useRef(!0),O=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),b=F.useRef(n);return b.current=n,ke({disabled:i,next:v=>x.current&&Ar(b.current,v.name,u)&&Fr(v,O.current,r._updateFormState)&&g({...r._formState,...v}),subject:r._subjects.state}),F.useEffect(()=>(x.current=!0,O.current.isValid&&r._updateValid(!0),()=>{x.current=!1}),[r]),xr(y,r,O.current,!1)}var se=e=>typeof e=="string",Vr=(e,s,r,i,n)=>se(e)?(i&&s.watch.add(e),c(r,e,n)):Array.isArray(e)?e.map(u=>(i&&s.watch.add(u),c(r,u))):(i&&(s.watchAll=!0),r);function Gr(e){const s=De(),{control:r=s.control,name:i,defaultValue:n,disabled:u,exact:y}=e||{},g=F.useRef(i);g.current=i,ke({disabled:u,subject:r._subjects.values,next:b=>{Ar(g.current,b.name,y)&&O(j(Vr(g.current,r._names,b.values||r._formValues,!1,n)))}});const[x,O]=F.useState(r._getWatch(i,n));return F.useEffect(()=>r._removeUnmounted()),x}function Jr(e){const s=De(),{name:r,disabled:i,control:n=s.control,shouldUnregister:u}=e,y=mr(n._names.array,r),g=Gr({control:n,name:r,defaultValue:c(n._formValues,r,c(n._defaultValues,r,e.defaultValue)),exact:!0}),x=Yr({control:n,name:r,exact:!0}),O=F.useRef(n.register(r,{...e.rules,value:g,...J(e.disabled)?{disabled:e.disabled}:{}}));return F.useEffect(()=>{const b=n._options.shouldUnregister||u,v=(S,$)=>{const w=c(n._fields,S);w&&w._f&&(w._f.mount=$)};if(v(r,!0),b){const S=j(c(n._options.defaultValues,r));E(n._defaultValues,r,S),C(c(n._formValues,r))&&E(n._formValues,r,S)}return()=>{(y?b&&!n._state.action:b)?n.unregister(r):v(r,!1)}},[r,n,y,u]),F.useEffect(()=>{c(n._fields,r)&&n._updateDisabledField({disabled:i,fields:n._fields,name:r,value:c(n._fields,r)._f.value})},[i,r,n]),{field:{name:r,value:g,...J(i)||x.disabled?{disabled:x.disabled||i}:{},onChange:F.useCallback(b=>O.current.onChange({target:{value:vr(b),name:r},type:Ae.CHANGE}),[r]),onBlur:F.useCallback(()=>O.current.onBlur({target:{value:c(n._formValues,r),name:r},type:Ae.BLUR}),[r,n]),ref:F.useCallback(b=>{const v=c(n._fields,r);v&&b&&(v._f.ref={focus:()=>b.focus(),select:()=>b.select(),setCustomValidity:S=>b.setCustomValidity(S),reportValidity:()=>b.reportValidity()})},[n._fields,r])},formState:x,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!c(x.errors,r)},isDirty:{enumerable:!0,get:()=>!!c(x.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!c(x.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!c(x.validatingFields,r)},error:{enumerable:!0,get:()=>c(x.errors,r)}})}}const mt=e=>e.render(Jr(e));var Qr=(e,s,r,i,n)=>s?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:n||!0}}:{},ue=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{const r=(Math.random()*16+e)%16|0;return(s=="x"?r:r&3|8).toString(16)})},Ue=(e,s,r={})=>r.shouldFocus||C(r.shouldFocus)?r.focusName||`${e}.${C(r.focusIndex)?s:r.focusIndex}.`:"",he=e=>({isOnSubmit:!e||e===Q.onSubmit,isOnBlur:e===Q.onBlur,isOnChange:e===Q.onChange,isOnAll:e===Q.all,isOnTouch:e===Q.onTouched}),ze=(e,s,r)=>!r&&(s.watchAll||s.watch.has(e)||[...s.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const fe=(e,s,r,i)=>{for(const n of r||Object.keys(e)){const u=c(e,n);if(u){const{_f:y,...g}=u;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],n)&&!i)return!0;if(y.ref&&s(y.ref,y.name)&&!i)return!0;if(fe(g,s))break}else if(R(g)&&fe(g,s))break}}};var pr=(e,s,r)=>{const i=K(c(e,r));return E(i,"root",s[r]),E(e,r,i),e},Je=e=>e.type==="file",ae=e=>typeof e=="function",Ve=e=>{if(!Ye)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},Fe=e=>se(e),Qe=e=>e.type==="radio",pe=e=>e instanceof RegExp;const or={value:!1,isValid:!1},cr={value:!0,isValid:!0};var Sr=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!C(e[0].attributes.value)?C(e[0].value)||e[0].value===""?cr:{value:e[0].value,isValid:!0}:cr:or}return or};const fr={isValid:!1,value:null};var wr=e=>Array.isArray(e)?e.reduce((s,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:s,fr):fr;function dr(e,s,r="validate"){if(Fe(e)||Array.isArray(e)&&e.every(Fe)||J(e)&&!e)return{type:r,message:Fe(e)?e:"",ref:s}}var oe=e=>R(e)&&!pe(e)?e:{value:e,message:""},Ke=async(e,s,r,i,n)=>{const{ref:u,refs:y,required:g,maxLength:x,minLength:O,min:b,max:v,pattern:S,validate:$,name:w,valueAsNumber:te,mount:B,disabled:z}=e._f,p=c(s,w);if(!B||z)return{};const X=y?y[0]:u,Z=V=>{i&&X.reportValidity&&(X.setCustomValidity(J(V)?"":V||""),X.reportValidity())},_={},m=Qe(u),A=ve(u),T=m||A,Y=(te||Je(u))&&C(u.value)&&C(p)||Ve(u)&&u.value===""||p===""||Array.isArray(p)&&!p.length,W=Qr.bind(null,w,r,_),be=(V,D,U,N=ie.maxLength,ee=ie.minLength)=>{const G=V?D:U;_[w]={type:V?N:ee,message:G,ref:u,...W(V?N:ee,G)}};if(n?!Array.isArray(p)||!p.length:g&&(!T&&(Y||H(p))||J(p)&&!p||A&&!Sr(y).isValid||m&&!wr(y).isValid)){const{value:V,message:D}=Fe(g)?{value:!!g,message:g}:oe(g);if(V&&(_[w]={type:ie.required,message:D,ref:X,...W(ie.required,D)},!r))return Z(D),_}if(!Y&&(!H(b)||!H(v))){let V,D;const U=oe(v),N=oe(b);if(!H(p)&&!isNaN(p)){const ee=u.valueAsNumber||p&&+p;H(U.value)||(V=ee>U.value),H(N.value)||(D=ee<N.value)}else{const ee=u.valueAsDate||new Date(p),G=ge=>new Date(new Date().toDateString()+" "+ge),de=u.type=="time",ye=u.type=="week";se(U.value)&&p&&(V=de?G(p)>G(U.value):ye?p>U.value:ee>new Date(U.value)),se(N.value)&&p&&(D=de?G(p)<G(N.value):ye?p<N.value:ee<new Date(N.value))}if((V||D)&&(be(!!V,U.message,N.message,ie.max,ie.min),!r))return Z(_[w].message),_}if((x||O)&&!Y&&(se(p)||n&&Array.isArray(p))){const V=oe(x),D=oe(O),U=!H(V.value)&&p.length>+V.value,N=!H(D.value)&&p.length<+D.value;if((U||N)&&(be(U,V.message,D.message),!r))return Z(_[w].message),_}if(S&&!Y&&se(p)){const{value:V,message:D}=oe(S);if(pe(V)&&!p.match(V)&&(_[w]={type:ie.pattern,message:D,ref:u,...W(ie.pattern,D)},!r))return Z(D),_}if($){if(ae($)){const V=await $(p,s),D=dr(V,X);if(D&&(_[w]={...D,...W(ie.validate,D.message)},!r))return Z(D.message),_}else if(R($)){let V={};for(const D in $){if(!q(V)&&!r)break;const U=dr(await $[D](p,s),X,D);U&&(V={...U,...W(D,U.message)},Z(U.message),r&&(_[w]=V))}if(!q(V)&&(_[w]={ref:X,...V},!r))return _}}return Z(!0),_},je=(e,s)=>[...e,...K(s)],Ie=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Me(e,s,r){return[...e.slice(0,s),...K(r),...e.slice(s)]}var Be=(e,s,r)=>Array.isArray(e)?(C(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(s,1)[0]),e):[],Ne=(e,s)=>[...K(s),...K(e)];function Xr(e,s){let r=0;const i=[...e];for(const n of s)i.splice(n-r,1),r++;return me(i).length?i:[]}var Pe=(e,s)=>C(s)?[]:Xr(e,K(s).sort((r,i)=>r-i)),We=(e,s,r)=>{[e[s],e[r]]=[e[r],e[s]]};function Zr(e,s){const r=s.slice(0,-1).length;let i=0;for(;i<r;)e=C(e)?i++:e[s[i++]];return e}function et(e){for(const s in e)if(e.hasOwnProperty(s)&&!C(e[s]))return!1;return!0}function L(e,s){const r=Array.isArray(s)?s:Ge(s)?[s]:br(s),i=r.length===1?e:Zr(e,r),n=r.length-1,u=r[n];return i&&delete i[u],n!==0&&(R(i)&&q(i)||Array.isArray(i)&&et(i))&&L(e,r.slice(0,-1)),e}var yr=(e,s,r)=>(e[s]=r,e);function bt(e){const s=De(),{control:r=s.control,name:i,keyName:n="id",shouldUnregister:u}=e,[y,g]=F.useState(r._getFieldArray(i)),x=F.useRef(r._getFieldArray(i).map(ue)),O=F.useRef(y),b=F.useRef(i),v=F.useRef(!1);b.current=i,O.current=y,r._names.array.add(i),e.rules&&r.register(i,e.rules),ke({next:({values:_,name:m})=>{if(m===b.current||!m){const A=c(_,b.current);Array.isArray(A)&&(g(A),x.current=A.map(ue))}},subject:r._subjects.array});const S=F.useCallback(_=>{v.current=!0,r._updateFieldArray(i,_)},[r,i]),$=(_,m)=>{const A=K(j(_)),T=je(r._getFieldArray(i),A);r._names.focus=Ue(i,T.length-1,m),x.current=je(x.current,A.map(ue)),S(T),g(T),r._updateFieldArray(i,T,je,{argA:Ie(_)})},w=(_,m)=>{const A=K(j(_)),T=Ne(r._getFieldArray(i),A);r._names.focus=Ue(i,0,m),x.current=Ne(x.current,A.map(ue)),S(T),g(T),r._updateFieldArray(i,T,Ne,{argA:Ie(_)})},te=_=>{const m=Pe(r._getFieldArray(i),_);x.current=Pe(x.current,_),S(m),g(m),r._updateFieldArray(i,m,Pe,{argA:_})},B=(_,m,A)=>{const T=K(j(m)),Y=Me(r._getFieldArray(i),_,T);r._names.focus=Ue(i,_,A),x.current=Me(x.current,_,T.map(ue)),S(Y),g(Y),r._updateFieldArray(i,Y,Me,{argA:_,argB:Ie(m)})},z=(_,m)=>{const A=r._getFieldArray(i);We(A,_,m),We(x.current,_,m),S(A),g(A),r._updateFieldArray(i,A,We,{argA:_,argB:m},!1)},p=(_,m)=>{const A=r._getFieldArray(i);Be(A,_,m),Be(x.current,_,m),S(A),g(A),r._updateFieldArray(i,A,Be,{argA:_,argB:m},!1)},X=(_,m)=>{const A=j(m),T=yr(r._getFieldArray(i),_,A);x.current=[...T].map((Y,W)=>!Y||W===_?ue():x.current[W]),S(T),g([...T]),r._updateFieldArray(i,T,yr,{argA:_,argB:A},!0,!1)},Z=_=>{const m=K(j(_));x.current=m.map(ue),S([...m]),g([...m]),r._updateFieldArray(i,[...m],A=>A,{},!0,!1)};return F.useEffect(()=>{if(r._state.action=!1,ze(i,r._names)&&r._subjects.state.next({...r._formState}),v.current&&(!he(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([i]).then(_=>{const m=c(_.errors,i),A=c(r._formState.errors,i);(A?!m&&A.type||m&&(A.type!==m.type||A.message!==m.message):m&&m.type)&&(m?E(r._formState.errors,i,m):L(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))});else{const _=c(r._fields,i);_&&_._f&&!(he(r._options.reValidateMode).isOnSubmit&&he(r._options.mode).isOnSubmit)&&Ke(_,r._formValues,r._options.criteriaMode===Q.all,r._options.shouldUseNativeValidation,!0).then(m=>!q(m)&&r._subjects.state.next({errors:pr(r._formState.errors,m,i)}))}r._subjects.values.next({name:i,values:{...r._formValues}}),r._names.focus&&fe(r._fields,(_,m)=>{if(r._names.focus&&m.startsWith(r._names.focus)&&_.focus)return _.focus(),1}),r._names.focus="",r._updateValid(),v.current=!1},[y,i,r]),F.useEffect(()=>(!c(r._formValues,i)&&r._updateFieldArray(i),()=>{(r._options.shouldUnregister||u)&&r.unregister(i)}),[i,r,n,u]),{swap:F.useCallback(z,[S,i,r]),move:F.useCallback(p,[S,i,r]),prepend:F.useCallback(w,[S,i,r]),append:F.useCallback($,[S,i,r]),remove:F.useCallback(te,[S,i,r]),insert:F.useCallback(B,[S,i,r]),update:F.useCallback(X,[S,i,r]),replace:F.useCallback(Z,[S,i,r]),fields:F.useMemo(()=>y.map((_,m)=>({..._,[n]:x.current[m]||ue()})),[y,n])}}var qe=()=>{let e=[];return{get observers(){return e},next:n=>{for(const u of e)u.next&&u.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(u=>u!==n)}}),unsubscribe:()=>{e=[]}}},Se=e=>H(e)||!hr(e);function ne(e,s){if(Se(e)||Se(s))return e===s;if(ce(e)&&ce(s))return e.getTime()===s.getTime();const r=Object.keys(e),i=Object.keys(s);if(r.length!==i.length)return!1;for(const n of r){const u=e[n];if(!i.includes(n))return!1;if(n!=="ref"){const y=s[n];if(ce(u)&&ce(y)||R(u)&&R(y)||Array.isArray(u)&&Array.isArray(y)?!ne(u,y):u!==y)return!1}}return!0}var Dr=e=>e.type==="select-multiple",rt=e=>Qe(e)||ve(e),He=e=>Ve(e)&&e.isConnected,kr=e=>{for(const s in e)if(ae(e[s]))return!0;return!1};function we(e,s={}){const r=Array.isArray(e);if(R(e)||r)for(const i in e)Array.isArray(e[i])||R(e[i])&&!kr(e[i])?(s[i]=Array.isArray(e[i])?[]:{},we(e[i],s[i])):H(e[i])||(s[i]=!0);return s}function Er(e,s,r){const i=Array.isArray(e);if(R(e)||i)for(const n in e)Array.isArray(e[n])||R(e[n])&&!kr(e[n])?C(s)||Se(r[n])?r[n]=Array.isArray(e[n])?we(e[n],[]):{...we(e[n])}:Er(e[n],H(s)?{}:s[n],r[n]):r[n]=!ne(e[n],s[n]);return r}var xe=(e,s)=>Er(e,s,we(s)),Cr=(e,{valueAsNumber:s,valueAsDate:r,setValueAs:i})=>C(e)?e:s?e===""?NaN:e&&+e:r&&se(e)?new Date(e):i?i(e):e;function $e(e){const s=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):s.disabled))return Je(s)?s.files:Qe(s)?wr(e.refs).value:Dr(s)?[...s.selectedOptions].map(({value:r})=>r):ve(s)?Sr(e.refs).value:Cr(C(s.value)?e.ref.value:s.value,e)}var tt=(e,s,r,i)=>{const n={};for(const u of e){const y=c(s,u);y&&E(n,u,y._f)}return{criteriaMode:r,names:[...e],fields:n,shouldUseNativeValidation:i}},_e=e=>C(e)?e:pe(e)?e.source:R(e)?pe(e.value)?e.value.source:e.value:e;const gr="AsyncFunction";var st=e=>(!e||!e.validate)&&!!(ae(e.validate)&&e.validate.constructor.name===gr||R(e.validate)&&Object.values(e.validate).find(s=>s.constructor.name===gr)),it=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function _r(e,s,r){const i=c(e,r);if(i||Ge(r))return{error:i,name:r};const n=r.split(".");for(;n.length;){const u=n.join("."),y=c(s,u),g=c(e,u);if(y&&!Array.isArray(y)&&r!==u)return{name:r};if(g&&g.type)return{name:u,error:g};n.pop()}return{name:r}}var at=(e,s,r,i,n)=>n.isOnAll?!1:!r&&n.isOnTouch?!(s||e):(r?i.isOnBlur:n.isOnBlur)?!e:(r?i.isOnChange:n.isOnChange)?e:!0,ut=(e,s)=>!me(c(e,s)).length&&L(e,s);const nt={mode:Q.onSubmit,reValidateMode:Q.onChange,shouldFocusError:!0};function lt(e={}){let s={...nt,...e},r={submitCount:0,isDirty:!1,isLoading:ae(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},i={},n=R(s.defaultValues)||R(s.values)?j(s.defaultValues||s.values)||{}:{},u=s.shouldUnregister?{}:j(n),y={action:!1,mount:!1,watch:!1},g={mount:new Set,unMount:new Set,array:new Set,watch:new Set},x,O=0;const b={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:qe(),array:qe(),state:qe()},S=he(s.mode),$=he(s.reValidateMode),w=s.criteriaMode===Q.all,te=t=>a=>{clearTimeout(O),O=setTimeout(t,a)},B=async t=>{if(b.isValid||t){const a=s.resolver?q((await T()).errors):await W(i,!0);a!==r.isValid&&v.state.next({isValid:a})}},z=(t,a)=>{(b.isValidating||b.validatingFields)&&((t||Array.from(g.mount)).forEach(l=>{l&&(a?E(r.validatingFields,l,a):L(r.validatingFields,l))}),v.state.next({validatingFields:r.validatingFields,isValidating:!q(r.validatingFields)}))},p=(t,a=[],l,d,f=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(c(i,t))){const h=l(c(i,t),d.argA,d.argB);f&&E(i,t,h)}if(o&&Array.isArray(c(r.errors,t))){const h=l(c(r.errors,t),d.argA,d.argB);f&&E(r.errors,t,h),ut(r.errors,t)}if(b.touchedFields&&o&&Array.isArray(c(r.touchedFields,t))){const h=l(c(r.touchedFields,t),d.argA,d.argB);f&&E(r.touchedFields,t,h)}b.dirtyFields&&(r.dirtyFields=xe(n,u)),v.state.next({name:t,isDirty:V(t,a),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else E(u,t,a)},X=(t,a)=>{E(r.errors,t,a),v.state.next({errors:r.errors})},Z=t=>{r.errors=t,v.state.next({errors:r.errors,isValid:!1})},_=(t,a,l,d)=>{const f=c(i,t);if(f){const o=c(u,t,C(l)?c(n,t):l);C(o)||d&&d.defaultChecked||a?E(u,t,a?o:$e(f._f)):N(t,o),y.mount&&B()}},m=(t,a,l,d,f)=>{let o=!1,h=!1;const k={name:t},I=!!(c(i,t)&&c(i,t)._f&&c(i,t)._f.disabled);if(!l||d){b.isDirty&&(h=r.isDirty,r.isDirty=k.isDirty=V(),o=h!==k.isDirty);const M=I||ne(c(n,t),a);h=!!(!I&&c(r.dirtyFields,t)),M||I?L(r.dirtyFields,t):E(r.dirtyFields,t,!0),k.dirtyFields=r.dirtyFields,o=o||b.dirtyFields&&h!==!M}if(l){const M=c(r.touchedFields,t);M||(E(r.touchedFields,t,l),k.touchedFields=r.touchedFields,o=o||b.touchedFields&&M!==l)}return o&&f&&v.state.next(k),o?k:{}},A=(t,a,l,d)=>{const f=c(r.errors,t),o=b.isValid&&J(a)&&r.isValid!==a;if(e.delayError&&l?(x=te(()=>X(t,l)),x(e.delayError)):(clearTimeout(O),x=null,l?E(r.errors,t,l):L(r.errors,t)),(l?!ne(f,l):f)||!q(d)||o){const h={...d,...o&&J(a)?{isValid:a}:{},errors:r.errors,name:t};r={...r,...h},v.state.next(h)}},T=async t=>{z(t,!0);const a=await s.resolver(u,s.context,tt(t||g.mount,i,s.criteriaMode,s.shouldUseNativeValidation));return z(t),a},Y=async t=>{const{errors:a}=await T(t);if(t)for(const l of t){const d=c(a,l);d?E(r.errors,l,d):L(r.errors,l)}else r.errors=a;return a},W=async(t,a,l={valid:!0})=>{for(const d in t){const f=t[d];if(f){const{_f:o,...h}=f;if(o){const k=g.array.has(o.name),I=f._f&&st(f._f);I&&b.validatingFields&&z([d],!0);const M=await Ke(f,u,w,s.shouldUseNativeValidation&&!a,k);if(I&&b.validatingFields&&z([d]),M[o.name]&&(l.valid=!1,a))break;!a&&(c(M,o.name)?k?pr(r.errors,M,o.name):E(r.errors,o.name,M[o.name]):L(r.errors,o.name))}!q(h)&&await W(h,a,l)}}return l.valid},be=()=>{for(const t of g.unMount){const a=c(i,t);a&&(a._f.refs?a._f.refs.every(l=>!He(l)):!He(a._f.ref))&&Ee(t)}g.unMount=new Set},V=(t,a)=>(t&&a&&E(u,t,a),!ne(Xe(),n)),D=(t,a,l)=>Vr(t,g,{...y.mount?u:C(a)?n:se(t)?{[t]:a}:a},l,a),U=t=>me(c(y.mount?u:n,t,e.shouldUnregister?c(n,t,[]):[])),N=(t,a,l={})=>{const d=c(i,t);let f=a;if(d){const o=d._f;o&&(!o.disabled&&E(u,t,Cr(a,o)),f=Ve(o.ref)&&H(a)?"":a,Dr(o.ref)?[...o.ref.options].forEach(h=>h.selected=f.includes(h.value)):o.refs?ve(o.ref)?o.refs.length>1?o.refs.forEach(h=>(!h.defaultChecked||!h.disabled)&&(h.checked=Array.isArray(f)?!!f.find(k=>k===h.value):f===h.value)):o.refs[0]&&(o.refs[0].checked=!!f):o.refs.forEach(h=>h.checked=h.value===f):Je(o.ref)?o.ref.value="":(o.ref.value=f,o.ref.type||v.values.next({name:t,values:{...u}})))}(l.shouldDirty||l.shouldTouch)&&m(t,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ge(t)},ee=(t,a,l)=>{for(const d in a){const f=a[d],o=`${t}.${d}`,h=c(i,o);(g.array.has(t)||!Se(f)||h&&!h._f)&&!ce(f)?ee(o,f,l):N(o,f,l)}},G=(t,a,l={})=>{const d=c(i,t),f=g.array.has(t),o=j(a);E(u,t,o),f?(v.array.next({name:t,values:{...u}}),(b.isDirty||b.dirtyFields)&&l.shouldDirty&&v.state.next({name:t,dirtyFields:xe(n,u),isDirty:V(t,o)})):d&&!d._f&&!H(o)?ee(t,o,l):N(t,o,l),ze(t,g)&&v.state.next({...r}),v.values.next({name:y.mount?t:void 0,values:{...u}})},de=async t=>{y.mount=!0;const a=t.target;let l=a.name,d=!0;const f=c(i,l),o=()=>a.type?$e(f._f):vr(t),h=k=>{d=Number.isNaN(k)||ne(k,c(u,l,k))};if(f){let k,I;const M=o(),le=t.type===Ae.BLUR||t.type===Ae.FOCUS_OUT,Ur=!it(f._f)&&!s.resolver&&!c(r.errors,l)&&!f._f.deps||at(le,c(r.touchedFields,l),r.isSubmitted,$,S),Te=ze(l,g,le);E(u,l,M),le?(f._f.onBlur&&f._f.onBlur(t),x&&x(0)):f._f.onChange&&f._f.onChange(t);const Oe=m(l,M,le,!1),jr=!q(Oe)||Te;if(!le&&v.values.next({name:l,type:t.type,values:{...u}}),Ur)return b.isValid&&(e.mode==="onBlur"?le&&B():B()),jr&&v.state.next({name:l,...Te?{}:Oe});if(!le&&Te&&v.state.next({...r}),s.resolver){const{errors:ur}=await T([l]);if(h(M),d){const Ir=_r(r.errors,i,l),nr=_r(ur,i,Ir.name||l);k=nr.error,l=nr.name,I=q(ur)}}else z([l],!0),k=(await Ke(f,u,w,s.shouldUseNativeValidation))[l],z([l]),h(M),d&&(k?I=!1:b.isValid&&(I=await W(i,!0)));d&&(f._f.deps&&ge(f._f.deps),A(l,I,k,Oe))}},ye=(t,a)=>{if(c(r.errors,a)&&t.focus)return t.focus(),1},ge=async(t,a={})=>{let l,d;const f=K(t);if(s.resolver){const o=await Y(C(t)?t:f);l=q(o),d=t?!f.some(h=>c(o,h)):l}else t?(d=(await Promise.all(f.map(async o=>{const h=c(i,o);return await W(h&&h._f?{[o]:h}:h)}))).every(Boolean),!(!d&&!r.isValid)&&B()):d=l=await W(i);return v.state.next({...!se(t)||b.isValid&&l!==r.isValid?{}:{name:t},...s.resolver||!t?{isValid:l}:{},errors:r.errors}),a.shouldFocus&&!d&&fe(i,ye,t?f:g.mount),d},Xe=t=>{const a={...y.mount?u:n};return C(t)?a:se(t)?c(a,t):t.map(l=>c(a,l))},Ze=(t,a)=>({invalid:!!c((a||r).errors,t),isDirty:!!c((a||r).dirtyFields,t),error:c((a||r).errors,t),isValidating:!!c(r.validatingFields,t),isTouched:!!c((a||r).touchedFields,t)}),Tr=t=>{t&&K(t).forEach(a=>L(r.errors,a)),v.state.next({errors:t?r.errors:{}})},er=(t,a,l)=>{const d=(c(i,t,{_f:{}})._f||{}).ref,f=c(r.errors,t)||{},{ref:o,message:h,type:k,...I}=f;E(r.errors,t,{...I,...a,ref:d}),v.state.next({name:t,errors:r.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},Or=(t,a)=>ae(t)?v.values.subscribe({next:l=>t(D(void 0,a),l)}):D(t,a,!0),Ee=(t,a={})=>{for(const l of t?K(t):g.mount)g.mount.delete(l),g.array.delete(l),a.keepValue||(L(i,l),L(u,l)),!a.keepError&&L(r.errors,l),!a.keepDirty&&L(r.dirtyFields,l),!a.keepTouched&&L(r.touchedFields,l),!a.keepIsValidating&&L(r.validatingFields,l),!s.shouldUnregister&&!a.keepDefaultValue&&L(n,l);v.values.next({values:{...u}}),v.state.next({...r,...a.keepDirty?{isDirty:V()}:{}}),!a.keepIsValid&&B()},rr=({disabled:t,name:a,field:l,fields:d,value:f})=>{if(J(t)&&y.mount||t){const o=t?void 0:C(f)?$e(l?l._f:c(d,a)._f):f;E(u,a,o),m(a,o,!1,!1,!0)}},Ce=(t,a={})=>{let l=c(i,t);const d=J(a.disabled)||J(e.disabled);return E(i,t,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:t}},name:t,mount:!0,...a}}),g.mount.add(t),l?rr({field:l,disabled:J(a.disabled)?a.disabled:e.disabled,name:t,value:a.value}):_(t,!0,a.value),{...d?{disabled:a.disabled||e.disabled}:{},...s.progressive?{required:!!a.required,min:_e(a.min),max:_e(a.max),minLength:_e(a.minLength),maxLength:_e(a.maxLength),pattern:_e(a.pattern)}:{},name:t,onChange:de,onBlur:de,ref:f=>{if(f){Ce(t,a),l=c(i,t);const o=C(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,h=rt(o),k=l._f.refs||[];if(h?k.find(I=>I===o):o===l._f.ref)return;E(i,t,{_f:{...l._f,...h?{refs:[...k.filter(He),o,...Array.isArray(c(n,t))?[{}]:[]],ref:{type:o.type,name:t}}:{ref:o}}}),_(t,!1,void 0,o)}else l=c(i,t,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||a.shouldUnregister)&&!(mr(g.array,t)&&y.action)&&g.unMount.add(t)}}},tr=()=>s.shouldFocusError&&fe(i,ye,g.mount),Lr=t=>{J(t)&&(v.state.next({disabled:t}),fe(i,(a,l)=>{const d=c(i,l);d&&(a.disabled=d._f.disabled||t,Array.isArray(d._f.refs)&&d._f.refs.forEach(f=>{f.disabled=d._f.disabled||t}))},0,!1))},sr=(t,a)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let f=j(u);if(v.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:h}=await T();r.errors=o,f=h}else await W(i);if(L(r.errors,"root"),q(r.errors)){v.state.next({errors:{}});try{await t(f,l)}catch(o){d=o}}else a&&await a({...r.errors},l),tr(),setTimeout(tr);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:q(r.errors)&&!d,submitCount:r.submitCount+1,errors:r.errors}),d)throw d},Rr=(t,a={})=>{c(i,t)&&(C(a.defaultValue)?G(t,j(c(n,t))):(G(t,a.defaultValue),E(n,t,j(a.defaultValue))),a.keepTouched||L(r.touchedFields,t),a.keepDirty||(L(r.dirtyFields,t),r.isDirty=a.defaultValue?V(t,j(c(n,t))):V()),a.keepError||(L(r.errors,t),b.isValid&&B()),v.state.next({...r}))},ir=(t,a={})=>{const l=t?j(t):n,d=j(l),f=q(t),o=f?n:d;if(a.keepDefaultValues||(n=l),!a.keepValues){if(a.keepDirtyValues)for(const h of g.mount)c(r.dirtyFields,h)?E(o,h,c(u,h)):G(h,c(o,h));else{if(Ye&&C(t))for(const h of g.mount){const k=c(i,h);if(k&&k._f){const I=Array.isArray(k._f.refs)?k._f.refs[0]:k._f.ref;if(Ve(I)){const M=I.closest("form");if(M){M.reset();break}}}}i={}}u=e.shouldUnregister?a.keepDefaultValues?j(n):{}:j(o),v.array.next({values:{...o}}),v.values.next({values:{...o}})}g={mount:a.keepDirtyValues?g.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!b.isValid||!!a.keepIsValid||!!a.keepDirtyValues,y.watch=!!e.shouldUnregister,v.state.next({submitCount:a.keepSubmitCount?r.submitCount:0,isDirty:f?!1:a.keepDirty?r.isDirty:!!(a.keepDefaultValues&&!ne(t,n)),isSubmitted:a.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:f?{}:a.keepDirtyValues?a.keepDefaultValues&&u?xe(n,u):r.dirtyFields:a.keepDefaultValues&&t?xe(n,t):a.keepDirty?r.dirtyFields:{},touchedFields:a.keepTouched?r.touchedFields:{},errors:a.keepErrors?r.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ar=(t,a)=>ir(ae(t)?t(u):t,a);return{control:{register:Ce,unregister:Ee,getFieldState:Ze,handleSubmit:sr,setError:er,_executeSchema:T,_getWatch:D,_getDirty:V,_updateValid:B,_removeUnmounted:be,_updateFieldArray:p,_updateDisabledField:rr,_getFieldArray:U,_reset:ir,_resetDefaultValues:()=>ae(s.defaultValues)&&s.defaultValues().then(t=>{ar(t,s.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:t=>{r={...r,...t}},_disableForm:Lr,_subjects:v,_proxyFormState:b,_setErrors:Z,get _fields(){return i},get _formValues(){return u},get _state(){return y},set _state(t){y=t},get _defaultValues(){return n},get _names(){return g},set _names(t){g=t},get _formState(){return r},set _formState(t){r=t},get _options(){return s},set _options(t){s={...s,...t}}},trigger:ge,register:Ce,handleSubmit:sr,watch:Or,setValue:G,getValues:Xe,reset:ar,resetField:Rr,clearErrors:Tr,unregister:Ee,setError:er,setFocus:(t,a={})=>{const l=c(i,t),d=l&&l._f;if(d){const f=d.refs?d.refs[0]:d.ref;f.focus&&(f.focus(),a.shouldSelect&&f.select())}},getFieldState:Ze}}function xt(e={}){const s=F.useRef(),r=F.useRef(),[i,n]=F.useState({isDirty:!1,isValidating:!1,isLoading:ae(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ae(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...lt(e),formState:i});const u=s.current.control;return u._options=e,ke({subject:u._subjects.state,next:y=>{Fr(y,u._proxyFormState,u._updateFormState,!0)&&n({...u._formState})}}),F.useEffect(()=>u._disableForm(e.disabled),[u,e.disabled]),F.useEffect(()=>{if(u._proxyFormState.isDirty){const y=u._getDirty();y!==i.isDirty&&u._subjects.state.next({isDirty:y})}},[u,i.isDirty]),F.useEffect(()=>{e.values&&!ne(e.values,r.current)?(u._reset(e.values,u._options.resetOptions),r.current=e.values,n(y=>({...y}))):u._resetDefaultValues()},[e.values,u]),F.useEffect(()=>{e.errors&&u._setErrors(e.errors)},[e.errors,u]),F.useEffect(()=>{u._state.mount||(u._updateValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),F.useEffect(()=>{e.shouldUnregister&&u._subjects.values.next({values:u._getWatch()})},[e.shouldUnregister,u]),s.current.formState=xr(i,u),s.current}function ot({fullWidth:e=!1,multiple:s=!1,required:r=!1,label:i="",placeholer:n="",options:u=[],helperText:y="",error:g=!1,margin:x="",textDirection:O="row",size:b,...v}){const S=u.find(w=>w.value===v.value),$=S==null?void 0:S.title;return P.jsxs(Br,{margin:x,fullWidth:e,error:g,children:[P.jsx(Nr,{size:b,children:`${i}${r?"*":""}`}),P.jsxs(Pr,{multiple:s,input:P.jsx(Wr,{defaultValue:$,sx:{flex:1},required:r,label:i,inputProps:{margin:x},size:b}),renderValue:w=>{if(s)return P.jsx(lr,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:w.map(B=>{const z=u.find(p=>p.value===B);return z&&z.title&&P.jsx(Mr,{size:"small",label:z.title},B)})});const te=u.find(B=>B.value===w);return te&&te.title&&P.jsxs(lr,{children:[P.jsx(Le,{component:"span",children:te.title}),P.jsx(Le,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:te.description})]})},...v,children:[P.jsx(Re,{disabled:!0,children:P.jsx("em",{children:n})}),!r&&!s&&P.jsx(Re,{value:"",children:"None"}),u.map(w=>w&&w.value&&P.jsxs(Re,{sx:[{justifyContent:"center"},O==="column"?{flexDirection:"column",alignItems:"flex-start"}:{}],value:w.value,children:[P.jsx(qr,{children:w.title}),w.description&&P.jsx(Le,{variant:"body2",color:"text.secondary",sx:{maxWidth:"100%",whiteSpace:"normal"},children:w.description})]},w.value))]}),P.jsx(Hr,{children:y})]})}ot.propTypes={error:re.bool,required:re.bool,multiple:re.bool,fullWidth:re.bool,label:re.string,placeholer:re.string,options:re.array,helperText:re.string,margin:re.string,size:re.string,textDirection:re.oneOf("row","column")};export{mt as C,ot as S,bt as a,xt as u};
|