@abtnode/blocklet-services 1.16.41 → 1.16.42-beta-20250403-230303-c167c6a1
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/api/emails/_templates/verify-code-body.js +4 -4
- package/api/index.js +4 -1
- package/api/libs/connect/session.js +4 -6
- package/api/libs/jwt.js +3 -3
- package/api/libs/push-kit/index.js +5 -2
- package/api/routes/blocklet.js +1 -1
- package/api/routes/federated.js +12 -2
- package/api/routes/oauth.js +56 -270
- package/api/routes/user-session.js +40 -19
- package/api/routes/user.js +254 -266
- package/api/services/auth/connect/invite.js +4 -6
- package/api/services/auth/connect/issue-passport.js +4 -6
- package/api/services/auth/session.js +5 -6
- package/api/services/notification/index.js +20 -16
- package/api/services/notification/queue.js +9 -1
- package/api/socket/channel/did.js +8 -8
- package/api/socket/util.js +1 -4
- package/api/state/message.js +59 -0
- package/api/util/attach-shared-utils.js +1 -0
- package/api/util/federated.js +1 -1
- package/api/util/user-util.js +296 -0
- package/dist/assets/{ArrowDropDown-odHjNJIs.js → ArrowDropDown-ptWD82T6.js} +1 -1
- package/dist/assets/{CheckCircle-BqOSvJMp.js → CheckCircle-Btm_ouu-.js} +1 -1
- package/dist/assets/{ChevronLeft-Dv7rlUf5.js → ChevronLeft-Dlcukg5b.js} +1 -1
- package/dist/assets/{ChevronRight-CWeJn1iz.js → ChevronRight-Dum8C8k7.js} +1 -1
- package/dist/assets/{Community-CMFBTMi_.js → Community-BuDGbplJ.js} +1 -1
- package/dist/assets/{DeleteOutline-Cr-TyrUV.js → DeleteOutline-qIhkqz9A.js} +1 -1
- package/dist/assets/{Done-C1TA1wbA.js → Done-CxsGHhW2.js} +1 -1
- package/dist/assets/{Download-DxhnUTM_.js → Download-DtSKdPMo.js} +1 -1
- package/dist/assets/{EditIcon-Bgmg6UE0.js → EditIcon-BOKrjkh4.js} +1 -1
- package/dist/assets/{Email-BphlAPta.js → Email-D1oAzxhZ.js} +1 -1
- package/dist/assets/{Error-pXXvJFxN.js → Error-yZoplO-q.js} +1 -1
- package/dist/assets/{ExpandLess-Dc_dI20M.js → ExpandLess-DN5VsSyP.js} +1 -1
- package/dist/assets/{Google-DNUuYFIA.js → Google-Drf-_CBl.js} +1 -1
- package/dist/assets/{Holiday-DKefG3Bb.js → Holiday-CGw5hZXz.js} +1 -1
- package/dist/assets/{InfoOutlined-CEUhR4DY.js → InfoOutlined-CLOzYFOV.js} +1 -1
- package/dist/assets/{Launch-BUTOr3cR.js → Launch-BtdPv0ms.js} +1 -1
- package/dist/assets/{LaunchOutlined-QHq-RUJt.js → LaunchOutlined-Bxfn3D1k.js} +1 -1
- package/dist/assets/{Location-BuaxMxu4.js → Location-BNMzVuhr.js} +1 -1
- package/dist/assets/{LockIcon-CQ1tExIY.js → LockIcon-D-N7I3eV.js} +1 -1
- package/dist/assets/{Meeting-Cs60QtvP.js → Meeting-CHDEMp94.js} +1 -1
- package/dist/assets/{MoreHoriz-D1SOL47a.js → MoreHoriz-Ecf_Y2c5.js} +1 -1
- package/dist/assets/{OffSick-DinPaelp.js → OffSick-s49E5S0C.js} +1 -1
- package/dist/assets/{Phone-BmouKMyi.js → Phone-B7KVJqdR.js} +1 -1
- package/dist/assets/{PlayArrow-D7cGSxeN.js → PlayArrow-C5Hul3eK.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-Dt9XJWEe.js → QuestionMarkCircle-D9Nr1DvN.js} +1 -1
- package/dist/assets/{ServerLogo-B33ZRE5q.js → ServerLogo-CJ7KvDlS.js} +1 -1
- package/dist/assets/{Timezone-CyMhRxlx.js → Timezone-fKWN5g03.js} +1 -1
- package/dist/assets/TuneOutlined-CIVU5KTm.js +1 -0
- package/dist/assets/{ViewList-vu1qOJ6P.js → ViewList-DQNBBLS5.js} +1 -1
- package/dist/assets/{WorkingRemotely-BP_VIHeM.js → WorkingRemotely-8AJSfiNI.js} +1 -1
- package/dist/assets/access-control-5GyLuYd7.js +14 -0
- package/dist/assets/{actions-4oGfCMlR.js → actions-BK1Ssw2h.js} +1 -1
- package/dist/assets/{add-component-core-CE0nArG4.js → add-component-core-Bm9enQVM.js} +31 -31
- package/dist/assets/{add-resource-BYM4JwzE.js → add-resource-Cqmj5BBD.js} +1 -1
- package/dist/assets/{addon-B9bb2bvM.js → addon-Dfs1zul7.js} +1 -1
- package/dist/assets/advanced-MSBu-f81.js +49 -0
- package/dist/assets/api-DeTTY4rz.js +1 -0
- package/dist/assets/appearance-_saX27MM.js +1 -0
- package/dist/assets/ar-Bd3GUoqC.js +3 -0
- package/dist/assets/{ar-CVzKLI4f.js → ar-DrRqcx2b.js} +1 -1
- package/dist/assets/{audit-logs-D8H5E0fC.js → audit-logs-C8OHcyQY.js} +3 -3
- package/dist/assets/base32-DY8fPTYx.js +1 -0
- package/dist/assets/branding-CanOP0qb.js +40 -0
- package/dist/assets/branding-DelDZvig.js +50 -0
- package/dist/assets/{bundle-avatar-DHwmIozH.js → bundle-avatar-CxGKqpL1.js} +1 -1
- package/dist/assets/button-GsH-bz74.js +1 -0
- package/dist/assets/{click-to-copy-B0HMuCN_.js → click-to-copy-BuZpdwN0.js} +1 -1
- package/dist/assets/{complete-BNf0-iqY.js → complete-CIxsaCVT.js} +1 -1
- package/dist/assets/{component-1r0VSsqq.js → component-vibwLNji.js} +102 -87
- package/dist/assets/{config-BeD5_8kr.js → config-BbT0ik5t.js} +1 -1
- package/dist/assets/{config-CqHmZdZv.js → config-Bl-eQAj5.js} +1 -1
- package/dist/assets/{config-navigation-DtN0_qFZ.js → config-navigation-Dw7tct52.js} +7 -7
- package/dist/assets/{config-space-DlwZewcm.js → config-space-D3pvjnQx.js} +1 -1
- package/dist/assets/{confirm-DmMN-34s.js → confirm-BzL9LNyf.js} +1 -1
- package/dist/assets/{connect-CC9dcVMV.js → connect-CzcOswsI.js} +1 -1
- package/dist/assets/connect-Czr8O47H.js +1 -0
- package/dist/assets/{connect-to-CzffwD9G.js → connect-to-LVtY3yeI.js} +1 -1
- package/dist/assets/{content-layout-7vu3yv_f.js → content-layout-CcLv-R_J.js} +1 -1
- package/dist/assets/dashboard-BuFzcMGR.js +213 -0
- package/dist/assets/de-4RuZHBym.js +3 -0
- package/dist/assets/{de-DIJPqt1Y.js → de-BRPos3d1.js} +1 -1
- package/dist/assets/{delete-confirm-BTaU_6Kx.js → delete-confirm-Bg3_0xz8.js} +1 -1
- package/dist/assets/{did-address-BC-0j4Pt.js → did-address-Dn6n8fAo.js} +1 -1
- package/dist/assets/doc-board-bg-DWZHV9Ng.png +0 -0
- package/dist/assets/domain-C_0cRyXj.js +9 -0
- package/dist/assets/{domain-action-card-DwQ7Q8wY.js → domain-action-card-B6WSK3W9.js} +2 -2
- package/dist/assets/domains-BQtz7ONz.js +1 -0
- package/dist/assets/{email-mj0bVFDS.js → email-qq2sglAS.js} +2 -2
- package/dist/assets/{es-C5RqG0zA.js → es-D2rCdMgt.js} +1 -1
- package/dist/assets/es-DPG1emNh.js +3 -0
- package/dist/assets/exchange-passport-CfAHAVKI.js +1 -0
- package/dist/assets/{fr-BHsPT43-.js → fr-DAFx50ef.js} +1 -1
- package/dist/assets/fr-u7MDLCDo.js +3 -0
- package/dist/assets/fuel-DVzKzmYw.js +32 -0
- package/dist/assets/{get-safe-url-BKl2A9x2.js → get-safe-url-CA3J0_99.js} +1 -1
- package/dist/assets/{get-safe-url-QFq5JNoE.js → get-safe-url-DnmtzIqo.js} +1 -1
- package/dist/assets/{hi-Bie09Alk.js → hi-CkD7b6N9.js} +1 -1
- package/dist/assets/hi-DS9ZR9W2.js +1 -0
- package/dist/assets/home--ykFBnb1.js +1 -0
- package/dist/assets/{id-IlcS05qm.js → id-BMWKdVei.js} +1 -1
- package/dist/assets/id-C459Zhwd.js +3 -0
- package/dist/assets/{iframe-B9mCpo4I.js → iframe-B5D34SYo.js} +1 -1
- package/dist/assets/{index-Ct7s2LPI.js → index-B1UWfhev.js} +3 -3
- package/dist/assets/{index-CJCg9yIK.js → index-B8T_6tqA.js} +1 -1
- package/dist/assets/{index-D_wVtHmh.js → index-BByO9801.js} +1 -1
- package/dist/assets/{index-DQ_RzIwU.js → index-BDliasS9.js} +1 -1
- package/dist/assets/index-BPS0iHSZ.js +4 -0
- package/dist/assets/index-BQLZ0lsX.js +1 -0
- package/dist/assets/index-BWpwjp4L.js +104 -0
- package/dist/assets/index-BqIq9Uma.js +138 -0
- package/dist/assets/{index-B4Q2DAdn.js → index-C6eHDaxg.js} +11 -11
- package/dist/assets/{index-BMSA5TdD.js → index-CBhHQMgh.js} +1 -1
- package/dist/assets/index-CClhZ8rs.js +1 -0
- package/dist/assets/index-CytYWl7a.js +113 -0
- package/dist/assets/index-D8CNdALX.js +2 -0
- package/dist/assets/index-DOdTZRA4.js +11 -0
- package/dist/assets/{index-79U1RPaq.js → index-Da6LyIoG.js} +2 -2
- package/dist/assets/{index-BJ2lJo7L.js → index-Dy3LPNyS.js} +42 -42
- package/dist/assets/index-ItdGu4Wh.js +2 -0
- package/dist/assets/{index-m8CaSxXx.js → index-J5kmwEca.js} +1 -1
- package/dist/assets/{index-fWGZM-oP.js → index-L3MBVAcg.js} +1 -1
- package/dist/assets/{index-BZvVDfZ4.js → index-VUi6PKrJ.js} +1 -1
- package/dist/assets/{index-u-lA6P_E.js → index-dCzPMsw6.js} +1 -1
- package/dist/assets/index-ndYC_y0r.js +15 -0
- package/dist/assets/{index-CGK3FEjY.js → index-vxB3STPb.js} +1 -1
- package/dist/assets/index-y6Dw39ly.js +290 -0
- package/dist/assets/{invitation-B8Qx_pFq.js → invitation-Cp6DuOW5.js} +8 -7
- package/dist/assets/invite-DjADjbzm.js +1 -0
- package/dist/assets/issue-passport-Bu5NvC_2.js +1 -0
- package/dist/assets/{item-BSGXym2I.js → item-ClBhYYKW.js} +1 -1
- package/dist/assets/ja-B5tIV7r-.js +3 -0
- package/dist/assets/{ja-C2daM668.js → ja-D2jInSAT.js} +1 -1
- package/dist/assets/keyboard-arrow-down-rounded-DadBVmpO.js +1 -0
- package/dist/assets/{ko-Lni8u0p_.js → ko-BGB5KJZq.js} +1 -1
- package/dist/assets/ko-CL3JJCJN.js +3 -0
- package/dist/assets/landing-page-BfVl47YO.js +1 -0
- package/dist/assets/{launch-result-message-ByEG8r_7.js → launch-result-message-BP5yMmIB.js} +1 -1
- package/dist/assets/{layout-BqhTD729.js → layout-D5G7Z8Ws.js} +1 -1
- package/dist/assets/list-CjtRvxdF.js +211 -0
- package/dist/assets/{list-header-BmTDmRY0.js → list-header-Cip98Afo.js} +1 -1
- package/dist/assets/localization-Tn68766t.js +1 -0
- package/dist/assets/{log-o_Cadt8j.js → log-_cZt5s1j.js} +1 -1
- package/dist/assets/{login-BQozrLDm.js → login-Bd9eibzl.js} +1 -1
- package/dist/assets/{login-oauth-callback-D7lIww1c.js → login-oauth-callback-Buv0sriC.js} +1 -1
- package/dist/assets/{logo-uploader-CUQ3aWZJ.js → logo-uploader-DGn3pkYl.js} +5 -4
- package/dist/assets/{lost-passport-DkETH2Lu.js → lost-passport-BplwQoPb.js} +3 -3
- package/dist/assets/omit-DYK_TtPQ.js +1 -0
- package/dist/assets/{open-window-BOl-kTC2.js → open-window-3TWqcI62.js} +1 -1
- package/dist/assets/overview-CJ3muOc6.js +84 -0
- package/dist/assets/{page-header-Dm1v9v5q.js → page-header-FKKsPnE9.js} +1 -1
- package/dist/assets/{permission-B5jnw9r2.js → permission-Dd3ufGD-.js} +1 -1
- package/dist/assets/preferences-D4OSAVTW.js +1 -0
- package/dist/assets/profile-embed--1Je95gw.js +1 -0
- package/dist/assets/pt-CYRkKZmh.js +1 -0
- package/dist/assets/{pt-D6N4RLzf.js → pt-DY0Ku5W5.js} +1 -1
- package/dist/assets/publish-resource-B4kuEUIu.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-B9MfX9Xl.js → react-beautiful-dnd.esm-DxmtDCVc.js} +4 -4
- package/dist/assets/{relative-time-RQnsWZQc.js → relative-time-Bp0EO1aU.js} +1 -1
- package/dist/assets/roboto-cyrillic-400-normal-DAIM1_dR.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-400-normal-Dry59Hjn.woff +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-CsCirF4J.woff +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-hCeO1jFL.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-CB1Rmiii.woff +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-CzEIZVQR.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-BxX1-eA_.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-DzMWdK87.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-B7rQpwPu.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-ElvJfk8V.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-CIu0AXX2.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-D_fA0fHY.woff2 +0 -0
- package/dist/assets/roboto-greek-400-normal-CAI06USH.woff +0 -0
- package/dist/assets/roboto-greek-400-normal-jFM2czAU.woff2 +0 -0
- package/dist/assets/roboto-greek-500-normal-BJMS0heP.woff2 +0 -0
- package/dist/assets/roboto-greek-500-normal-D8eQD5zT.woff +0 -0
- package/dist/assets/roboto-greek-700-normal-DCrt6r9F.woff +0 -0
- package/dist/assets/roboto-greek-700-normal-DpKAje7q.woff2 +0 -0
- package/dist/assets/roboto-latin-400-normal-551zQQ7R.woff +0 -0
- package/dist/assets/roboto-latin-400-normal-CNwBRw8h.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-CkrA1NAy.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-_8jDuD7w.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-CTLkNcF_.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-DZr4b_KL.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-ZYmyxeOy.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-uRIBRJt5.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-C_ARlJGk.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-eJ10kk0m.woff +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-BNPgmEQS.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-Cnx4FGpK.woff +0 -0
- package/dist/assets/roboto-math-400-normal-B3wgz80t.woff2 +0 -0
- package/dist/assets/roboto-math-400-normal-DHrwdhE6.woff +0 -0
- package/dist/assets/roboto-math-500-normal-CFNaIMFC.woff2 +0 -0
- package/dist/assets/roboto-math-500-normal-CetgDdIa.woff +0 -0
- package/dist/assets/roboto-math-700-normal-CpTCM92H.woff +0 -0
- package/dist/assets/roboto-math-700-normal-xbpggnJp.woff2 +0 -0
- package/dist/assets/roboto-symbols-400-normal-bG5rsNFs.woff +0 -0
- package/dist/assets/roboto-symbols-400-normal-fF1SLJBj.woff2 +0 -0
- package/dist/assets/roboto-symbols-500-normal-BXFTxrNR.woff2 +0 -0
- package/dist/assets/roboto-symbols-500-normal-toKUCDph.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-B2QKVW64.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-DKkQdRpM.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-CDDxGrUb.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-DgufTq8s.woff +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-Dw5heWgq.woff +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-HYpufUYk.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-BFWtvCOj.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-ChAl_rRV.woff +0 -0
- package/dist/assets/{ru-D-xvMzxI.js → ru-Cv5vRo7s.js} +1 -1
- package/dist/assets/ru-Dzg-gLvu.js +1 -0
- package/dist/assets/runtime-DCHSigWq.js +1 -0
- package/dist/assets/sdk-B4tneH2b.js +1 -0
- package/dist/assets/security-Ba0U57n2.js +95 -0
- package/dist/assets/session-BXc0WNE7.js +1 -0
- package/dist/assets/setup-bc5fgvzY.js +19 -0
- package/dist/assets/{shorten-label-DkFTGSoy.js → shorten-label-BcXnCxH2.js} +1 -1
- package/dist/assets/{simple-select-CqakAZFe.js → simple-select-D7qC2duk.js} +1 -1
- package/dist/assets/{slicedToArray-BuQur6Mi.js → slicedToArray-CG0jVe85.js} +2 -2
- package/dist/assets/{start-BSUY3DBl.js → start-kkjng8Di.js} +1 -1
- package/dist/assets/status-Bcehte3I.js +1 -0
- package/dist/assets/step-actions-CAn2VbnK.js +31 -0
- package/dist/assets/studio-Dnzc2A5y.js +6 -0
- package/dist/assets/{switch-control-BBlLGjaH.js → switch-control-DZceCxwF.js} +1 -1
- package/dist/assets/th-CevmRMq6.js +1 -0
- package/dist/assets/{th-CycIQ910.js → th-D6oDBVGi.js} +1 -1
- package/dist/assets/{traffic-CJDIGmp5.js → traffic-BbJxF2T-.js} +4 -4
- package/dist/assets/transfer-j5hCBx8d.js +16 -0
- package/dist/assets/{unsubscribe-afXXIHEf.js → unsubscribe-DJgSmFME.js} +1 -1
- package/dist/assets/{use-mobile-CUT5hy9q.js → use-mobile-DNsgYi-4.js} +1 -1
- package/dist/assets/use-mobile-DVecy9Ks.js +1 -0
- package/dist/assets/{useAsync-DM8qaMe4.js → useAsync-Bia14KO2.js} +1 -1
- package/dist/assets/{useAsyncRetry-B7SbzXVI.js → useAsyncRetry-C-QH3IsB.js} +1 -1
- package/dist/assets/{useLocalStorage-Dd4pybDP.js → useLocalStorage-BQFZ73WZ.js} +1 -1
- package/dist/assets/user-center-BZ0ZkNAA.js +67 -0
- package/dist/assets/{util-C_BCTHfw.js → util-C9Xcu_Dq.js} +1 -1
- package/dist/assets/{util-YyWTpLT7.js → util-WwcocPP-.js} +1 -1
- package/dist/assets/vendor-arcblock-B7hyNlnQ.js +1598 -0
- package/dist/assets/{vendor-hooks-sw5wvnca.js → vendor-hooks-DnflU2EL.js} +1 -1
- package/dist/assets/{vendor-mui-core-DxqV1NVn.js → vendor-mui-core-BL-xsBvI.js} +1 -1
- package/dist/assets/{vendor-mui-x-BjL1xCkk.js → vendor-mui-x-BmOE-0pQ.js} +1 -1
- package/dist/assets/vendor-utils-Cs6ARqvU.js +11 -0
- package/dist/assets/vendor-ux-did-connect-BDmhBveY.css +1 -0
- package/dist/assets/vendor-ux-did-connect-CWUKGZcn.js +1843 -0
- package/dist/assets/{vi-BqnfnvFP.js → vi-BKKJMbW2.js} +1 -1
- package/dist/assets/vi-PQuaKyKY.js +1 -0
- package/dist/assets/wrap-locale-DyRnlWyZ.js +1 -0
- package/dist/assets/zh-BBkG8qYp.js +4 -0
- package/dist/assets/{zh-CHmwTyCg.js → zh-D4Lak9gZ.js} +1 -1
- package/dist/assets/{zh-tw-D6K-qXNE.js → zh-tw-B08rjgK3.js} +1 -1
- package/dist/assets/zh-tw-BHJNqYL0.js +3 -0
- package/dist/images/all-done.png +0 -0
- package/dist/index.html +7 -7
- package/dist/service-worker.js +1 -1
- package/package.json +39 -40
- package/dist/assets/access-control-CpxcJItK.js +0 -14
- package/dist/assets/analytics-BXLe73MI.js +0 -11
- package/dist/assets/api-D9Yi7Zdr.js +0 -1
- package/dist/assets/appearance-DX7SoW1u.js +0 -1
- package/dist/assets/ar-2k9jaPIk.js +0 -3
- package/dist/assets/base32-BNpDT-6Q.js +0 -1
- package/dist/assets/branding-BW1rhy8d.js +0 -40
- package/dist/assets/button-CNnuiac8.js +0 -1
- package/dist/assets/connect-BfSOEYV-.js +0 -1
- package/dist/assets/dashboard-C_Q4TjPa.js +0 -216
- package/dist/assets/de-B9cLhykn.js +0 -3
- package/dist/assets/domain-CLMRXecU.js +0 -9
- package/dist/assets/domains-DF7TtN5q.js +0 -1
- package/dist/assets/es-BoQohonz.js +0 -3
- package/dist/assets/exchange-passport--DeUPzbW.js +0 -1
- package/dist/assets/form-text-input-BYF6lVnE.js +0 -11
- package/dist/assets/fr-doSYAOrt.js +0 -3
- package/dist/assets/fuel-D-kOZuF6.js +0 -32
- package/dist/assets/fullpage-DO8Hcbkl.js +0 -1
- package/dist/assets/hi-B_BwhpD8.js +0 -1
- package/dist/assets/home-CpnMpXiw.js +0 -1
- package/dist/assets/id-BgYIZCvk.js +0 -3
- package/dist/assets/index-BVOYP6aR.js +0 -11
- package/dist/assets/index-BsUr7wGb.js +0 -104
- package/dist/assets/index-C44fECmB.js +0 -138
- package/dist/assets/index-CmKAznDh.js +0 -109
- package/dist/assets/index-DqC2o5PB.js +0 -4
- package/dist/assets/index-DyTFEgKr.js +0 -1
- package/dist/assets/index-eCY24sH9.js +0 -137
- package/dist/assets/index-gTQQ3SoE.js +0 -290
- package/dist/assets/index-gcSQTx25.js +0 -1
- package/dist/assets/index.esm-CWepf7I_.js +0 -1
- package/dist/assets/inter-latin-300-normal-CvRFFuZy.woff2 +0 -0
- package/dist/assets/inter-latin-300-normal-ORCTF8i-.woff +0 -0
- package/dist/assets/inter-latin-400-normal-BOOGhInR.woff2 +0 -0
- package/dist/assets/inter-latin-400-normal-gitzw0hO.woff +0 -0
- package/dist/assets/inter-latin-500-normal-D2bGa7uu.woff2 +0 -0
- package/dist/assets/inter-latin-500-normal-deR1Tlfd.woff +0 -0
- package/dist/assets/inter-latin-700-normal-B8MtJ_2k.woff +0 -0
- package/dist/assets/inter-latin-700-normal-Sckx8rpT.woff2 +0 -0
- package/dist/assets/inter-latin-ext-300-normal-C2kLfG2J.woff2 +0 -0
- package/dist/assets/inter-latin-ext-300-normal-n8Ps4oXY.woff +0 -0
- package/dist/assets/inter-latin-ext-400-normal-C1t-h-pH.woff +0 -0
- package/dist/assets/inter-latin-ext-400-normal-hnt3BR84.woff2 +0 -0
- package/dist/assets/inter-latin-ext-500-normal-CIS2RHJS.woff2 +0 -0
- package/dist/assets/inter-latin-ext-500-normal-UMdmhHu2.woff +0 -0
- package/dist/assets/inter-latin-ext-700-normal-6V9MnIL5.woff +0 -0
- package/dist/assets/inter-latin-ext-700-normal-CzikT_rs.woff2 +0 -0
- package/dist/assets/invite-BBaF_vyc.js +0 -1
- package/dist/assets/issue-passport-DC-ly7xg.js +0 -1
- package/dist/assets/ja-FMMLI8YD.js +0 -3
- package/dist/assets/ko-C0kmRXYE.js +0 -3
- package/dist/assets/list-BHs8uNT5.js +0 -200
- package/dist/assets/localization-daPAWMzR.js +0 -1
- package/dist/assets/login-bg-Cbfh9Uc2.png +0 -0
- package/dist/assets/omit-DZNQhOf-.js +0 -1
- package/dist/assets/overview-Bxm05EH6.js +0 -12
- package/dist/assets/preferences-uri2RXdB.js +0 -1
- package/dist/assets/profile-embed-DnIQcD-H.js +0 -1
- package/dist/assets/pt-C2UJZK-O.js +0 -1
- package/dist/assets/publish-resource-V53U1NNv.js +0 -1
- package/dist/assets/ru-DDA5s4-r.js +0 -1
- package/dist/assets/sdk-BKSsfgrc.js +0 -1
- package/dist/assets/session-6ZeN-aF2.js +0 -1
- package/dist/assets/setup-7Gq9K_8k.js +0 -19
- package/dist/assets/status-C52-BFuY.js +0 -1
- package/dist/assets/step-actions-CA74dwgt.js +0 -31
- package/dist/assets/studio-CAnZfyBM.js +0 -6
- package/dist/assets/th-DmqOUn4C.js +0 -1
- package/dist/assets/transfer-cG2e24sz.js +0 -16
- package/dist/assets/user-center-T8Xw464s.js +0 -67
- package/dist/assets/vendor-arcblock-DvaaLvvM.js +0 -2361
- package/dist/assets/vendor-utils-DR57WNxP.js +0 -11
- package/dist/assets/vendor-ux-did-connect-Bciw9Ypu.js +0 -1077
- package/dist/assets/vendor-ux-did-connect-DhgPdlEj.css +0 -1
- package/dist/assets/vi-Cf__CtPD.js +0 -1
- package/dist/assets/wrap-locale-CX50Vz0w.js +0 -1
- package/dist/assets/zh-NXspK2yu.js +0 -4
- package/dist/assets/zh-tw-DYYDVX5I.js +0 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import{r as X,e as M}from"./vendor-react-DoD83n6N.js";import{a2 as ot,j as A,a3 as Ve,E as G,a4 as N,x as hr,T as we,aa as At,bp as pr,bM as gr,bs as yr,ad as br,A as _r,ae as vr,M as wr,K as $r,bq as rt}from"./vendor-mui-core-BL-xsBvI.js";import{A as $e,D as xr,f as kr,aB as Sr,m as jr,au as Er,w as kt,Q as Rt,h as me,O as Dt}from"./index-BWpwjp4L.js";import{P as Or,w as We}from"./permission-Dd3ufGD-.js";import{r as lt,u as Oe,B as ce,W as le,aI as Tt,l as Ar,aG as Ct,aj as Rr,ak as Dr,al as Tr,am as Cr,an as It,ao as Ir,ap as Pr,aq as Nr,ar as Pt,as as Lr,at as Br,au as Mr,av as Nt,aw as Hr,ax as qr,ay as Fr,az as ct,aA as Ur,aB as Kr,aC as zr,aD as Jr,aE as Lt,aF as Vr,m as Wr,Q as St,bj as Yr}from"./vendor-ux-did-connect-CWUKGZcn.js";import{v as Bt}from"./vendor-hooks-DnflU2EL.js";import{C as ut}from"./confirm-BzL9LNyf.js";import{f as Ee}from"./format-error-LAoTjvJe.js";import{_ as Gr}from"./useSetState-BL3ktMon.js";import{u as Mt}from"./session-BXc0WNE7.js";import{C as Zr}from"./click-to-copy-BuZpdwN0.js";import{u as Ht}from"./dashboard-BuFzcMGR.js";import{s as qt,B as W,aF as Xr}from"./vendor-utils-Cs6ARqvU.js";import{I as Qr}from"./index-VUi6PKrJ.js";import{l as oe}from"./index-D8CNdALX.js";import{W as en}from"./did-address-Dn6n8fAo.js";import{V as tn}from"./status-Bcehte3I.js";import"./vendor-arcblock-B7hyNlnQ.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-BQFZ73WZ.js";import"./PlayArrow-C5Hul3eK.js";import"./get-safe-url-CA3J0_99.js";import"./index-ItdGu4Wh.js";import"./useAsyncRetry-C-QH3IsB.js";import"./useAsync-Bia14KO2.js";import"./InfoOutlined-CLOzYFOV.js";import"./use-mobile-DNsgYi-4.js";import"./omit-DYK_TtPQ.js";var ft={},rn=ot;Object.defineProperty(ft,"__esModule",{value:!0});var Ft=ft.default=void 0,nn=rn(lt()),sn=A;Ft=ft.default=(0,nn.default)((0,sn.jsx)("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}),"VolunteerActivismOutlined");var dt={},an=ot;Object.defineProperty(dt,"__esModule",{value:!0});var mt=dt.default=void 0,on=an(lt()),jt=A;mt=dt.default=(0,on.default)([(0,jt.jsx)("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),(0,jt.jsx)("circle",{cx:"16",cy:"12",r:"1.5"},"1")],"AccountBalanceWalletOutlined");const ln=localStorage.getItem("enableDebug")==="true";function cn({teamDid:d,size:x="small",...O}){const{t:E}=Oe(),{api:S}=$e(),[v,p]=X.useState(!1),[o,b]=X.useState(null),g=()=>{p(!1),b(null)},f=async()=>{var i;try{p(!0);const s=await S.clearCache({input:{teamDid:d}});le.success(E("blocklet.config.clearCache.success",{count:((i=s.removed)==null?void 0:i.length)||0}))}catch(s){le.error(Ee(s))}finally{p(!1),b(null)}},t={title:E("blocklet.config.clearCache.title"),description:E("blocklet.config.clearCache.description"),confirm:E("common.confirm"),cancel:E("common.cancel"),onConfirm:f,onCancel:g};return A.jsxs("div",{...O,children:[A.jsxs(ce,{onClick:()=>b(t),color:"error",variant:"outlined",size:x,children:[v?A.jsx(Ve,{size:16,style:{marginRight:5}}):null,E("blocklet.config.clearCache.action")]}),o&&A.jsx(ut,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,onConfirm:o.onConfirm,onCancel:o.onCancel})]})}var ht={},un=ot;Object.defineProperty(ht,"__esModule",{value:!0});var Ut=ht.default=void 0,fn=un(lt()),dn=A;Ut=ht.default=(0,fn.default)((0,dn.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"KeyOutlined");function pt({onChange:d,disabled:x,loading:O,inService:E}){const{t:S}=Oe(),{api:v,session:p}=Mt(),{blocklet:o}=xr(),[b,g]=Gr({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),f=()=>g({isConnectOpen:!1}),t=()=>{if(kr.isInProgress(o.status)){le.error(S("blocklet.error.isInProgress"));return}g({confirmDialogOpen:!0})};return A.jsxs(N,{className:"config-form",mt:2,children:[A.jsxs(N,{className:"config-item",children:[A.jsxs(N,{className:"config-label",mb:0,children:[S("blocklet.config.migrate.button"),A.jsx(N,{className:"config-desc",children:S("blocklet.config.migrate.description")})]}),A.jsxs(hr,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:x||O,onClick:t,children:[A.jsx(Ut,{style:{fontSize:"1.3em",marginRight:4}}),S("blocklet.config.migrate.button")]})]}),b.isConnectOpen&&A.jsx(Tt,{popup:!0,open:b.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:v.get,checkTimeout:5*60*1e3,onSuccess:()=>{d(),E&&p.logout(),f()},extraParams:{appDid:o.appDid},messages:{title:S("setup.keyPair.title"),scan:S("setup.keyPair.scan"),confirm:S("setup.keyPair.confirm"),success:S("setup.keyPair.success")},onClose:f}),b.confirmDialogOpen&&A.jsx(ut,{title:A.jsx(we,{sx:{fontSize:"20px",fontWeight:"500"},children:S("blocklet.config.migrate.title")}),description:A.jsx(we,{sx:{fontSize:"14px",color:"#9397A1"},children:S("blocklet.config.migrate.confirm")}),confirm:S("common.confirm"),cancel:S("common.cancel"),onConfirm:()=>g({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>g({confirmDialogOpen:!1})})]})}pt.propTypes={onChange:G.func,disabled:G.bool,loading:G.bool,inService:G.bool};pt.defaultProps={onChange:()=>{},disabled:!1,loading:!1,inService:!1};function gt({onCancel:d,onSuccess:x,onError:O}){const{api:E}=X.useContext(Ar),[S,v]=X.useState(!1),{t:p,locale:o}=Oe(),[b,g]=X.useState(""),[f,t]=X.useState(!1),[i,s]=X.useState(0),[r,e]=X.useState(""),{endpoint:l}=Ht(),[n,a]=X.useState(!1),u=c=>{g(null),v(!0);try{e(c.result),s($.length-1)}catch(h){const _=Ee(h);g(_),O(h)}finally{v(!1)}},m=()=>{t(!0),s(1)},y=()=>{t(!1),s(0)},$=[{body:A.jsxs(N,{children:[A.jsx(we,{children:p("team.transferApp.transferDialog.tips.progress")}),A.jsx(we,{mt:3,mb:2,children:p("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:p("common.cancel"),confirm:p("team.transferApp.transferDialog.createTransferLink"),onCancel:d,onConfirm:m},{cancel:p("common.cancel"),confirm:p("team.transferApp.transferDialog.createTransferLink"),body:()=>A.jsx(Tt,{action:"transfer-app-owner",open:f,locale:o,checkFn:E.get,onClose:y,onSuccess:u,checkTimeout:5*60*1e3,extraParams:{},messages:{title:p("team.transferApp.connectDialog.title"),scan:p("team.transferApp.connectDialog.scan"),confirm:p("team.transferApp.connectDialog.confirm"),success:p("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const c=Sr({transferId:r.transferId,endpoint:l});return A.jsxs(A.Fragment,{children:[A.jsx(N,{component:be,dangerouslySetInnerHTML:{__html:p("team.transferApp.transferDialog.createSuccessTip1")}}),A.jsx(N,{component:be,mt:2,children:A.jsx(be,{children:p("team.transferApp.transferDialog.createSuccessTip3")})}),A.jsxs(N,{children:[A.jsx(N,{component:be,mt:2,children:A.jsx(be,{children:p("team.transferApp.transferDialog.createSuccessTip2",{expireDate:jr(r.expireDate,o)})})}),A.jsx(N,{my:1,children:A.jsx(Zr,{children:c})})]}),A.jsx("div",{children:A.jsx(pr,{value:"end",control:A.jsx(gr,{checked:n,onChange:h=>a(h.target.checked)}),label:p("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:p("common.confirm"),onConfirm:x}],w=$[i];return A.jsxs(Ct,{title:A.jsx(be,{className:"title",children:p("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:A.jsxs(A.Fragment,{children:[w.cancel&&A.jsx(ce,{onClick:w.onCancel,color:"inherit",children:w.cancel}),A.jsxs(ce,{onClick:w.onConfirm,color:"error",disabled:S||i===$.length-1&&!n,variant:"contained",autoFocus:!0,children:[S&&A.jsx(Ve,{size:16}),w.confirm]})]}),children:[A.jsx(yr,{component:"div",children:typeof w.body=="function"?w.body():w.body}),!!b&&A.jsx(br,{severity:"error",variant:"icon",children:b})]})}gt.propTypes={onCancel:G.func.isRequired,onSuccess:G.func.isRequired,onError:G.func};gt.defaultProps={onError:()=>{}};const be=At.div`
|
|
2
|
+
font-size: 16px;
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
&.title {
|
|
5
|
+
font-size: 20px;
|
|
6
|
+
}
|
|
7
|
+
`;var Kt={},zt={exports:{}};(function(d,x){(function(O,E){d.exports=E()})(self,()=>{return O={7629:(S,v,p)=>{const o=p(375),b=p(8571),g=p(9474),f=p(1687),t=p(8652),i=p(8160),s=p(3292),r=p(6354),e=p(8901),l=p(9708),n=p(6914),a=p(2294),u=p(6133),m=p(1152),y=p(8863),$=p(2036),w={Base:class{constructor(c){this.type=c,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new a.Ids,this._preferences=null,this._refs=new u.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return o(typeof l.describe=="function","Manifest functionality disabled"),l.describe(this)}allow(...c){return i.verifyFlat(c,"allow"),this._values(c,"_valids")}alter(c){o(c&&typeof c=="object"&&!Array.isArray(c),"Invalid targets argument"),o(!this._inRuleset(),"Cannot set alterations inside a ruleset");const h=this.clone();h.$_terms.alterations=h.$_terms.alterations||[];for(const _ in c){const j=c[_];o(typeof j=="function","Alteration adjuster for",_,"must be a function"),h.$_terms.alterations.push({target:_,adjuster:j})}return h.$_temp.ruleset=!1,h}artifact(c){return o(c!==void 0,"Artifact cannot be undefined"),o(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",c)}cast(c){return o(c===!1||typeof c=="string","Invalid to value"),o(c===!1||this._definition.cast[c],"Type",this.type,"does not support casting to",c),this.$_setFlag("cast",c===!1?void 0:c)}default(c,h){return this._default("default",c,h)}description(c){return o(c&&typeof c=="string","Description must be a non-empty string"),this.$_setFlag("description",c)}empty(c){const h=this.clone();return c!==void 0&&(c=h.$_compile(c,{override:!1})),h.$_setFlag("empty",c,{clone:!1})}error(c){return o(c,"Missing error"),o(c instanceof Error||typeof c=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",c)}example(c,h={}){return o(c!==void 0,"Missing example"),i.assertOptions(h,["override"]),this._inner("examples",c,{single:!0,override:h.override})}external(c,h){return typeof c=="object"&&(o(!h,"Cannot combine options with description"),h=c.description,c=c.method),o(typeof c=="function","Method must be a function"),o(h===void 0||h&&typeof h=="string","Description must be a non-empty string"),this._inner("externals",{method:c,description:h},{single:!0})}failover(c,h){return this._default("failover",c,h)}forbidden(){return this.presence("forbidden")}id(c){return c?(o(typeof c=="string","id must be a non-empty string"),o(/^[^\.]+$/.test(c),"id cannot contain period character"),this.$_setFlag("id",c)):this.$_setFlag("id",void 0)}invalid(...c){return this._values(c,"_invalids")}label(c){return o(c&&typeof c=="string","Label name must be a non-empty string"),this.$_setFlag("label",c)}meta(c){return o(c!==void 0,"Meta cannot be undefined"),this._inner("metas",c,{single:!0})}note(...c){o(c.length,"Missing notes");for(const h of c)o(h&&typeof h=="string","Notes must be non-empty strings");return this._inner("notes",c)}only(c=!0){return o(typeof c=="boolean","Invalid mode:",c),this.$_setFlag("only",c)}optional(){return this.presence("optional")}prefs(c){o(c,"Missing preferences"),o(c.context===void 0,"Cannot override context"),o(c.externals===void 0,"Cannot override externals"),o(c.warnings===void 0,"Cannot override warnings"),o(c.debug===void 0,"Cannot override debug"),i.checkPreferences(c);const h=this.clone();return h._preferences=i.preferences(h._preferences,c),h}presence(c){return o(["optional","required","forbidden"].includes(c),"Unknown presence mode",c),this.$_setFlag("presence",c)}raw(c=!0){return this.$_setFlag("result",c?"raw":void 0)}result(c){return o(["raw","strip"].includes(c),"Unknown result mode",c),this.$_setFlag("result",c)}required(){return this.presence("required")}strict(c){const h=this.clone(),_=c!==void 0&&!c;return h._preferences=i.preferences(h._preferences,{convert:_}),h}strip(c=!0){return this.$_setFlag("result",c?"strip":void 0)}tag(...c){o(c.length,"Missing tags");for(const h of c)o(h&&typeof h=="string","Tags must be non-empty strings");return this._inner("tags",c)}unit(c){return o(c&&typeof c=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",c)}valid(...c){i.verifyFlat(c,"valid");const h=this.allow(...c);return h.$_setFlag("only",!!h._valids,{clone:!1}),h}when(c,h){const _=this.clone();_.$_terms.whens||(_.$_terms.whens=[]);const j=s.when(_,c,h);if(!["any","link"].includes(_.type)){const R=j.is?[j]:j.switch;for(const D of R)o(!D.then||D.then.type==="any"||D.then.type===_.type,"Cannot combine",_.type,"with",D.then&&D.then.type),o(!D.otherwise||D.otherwise.type==="any"||D.otherwise.type===_.type,"Cannot combine",_.type,"with",D.otherwise&&D.otherwise.type)}return _.$_terms.whens.push(j),_.$_mutateRebuild()}cache(c){o(!this._inRuleset(),"Cannot set caching inside a ruleset"),o(!this._cache,"Cannot override schema cache"),o(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const h=this.clone();return h._cache=c||t.provider.provision(),h.$_temp.ruleset=!1,h}clone(){const c=Object.create(Object.getPrototypeOf(this));return this._assign(c)}concat(c){o(i.isSchema(c),"Invalid schema object"),o(this.type==="any"||c.type==="any"||c.type===this.type,"Cannot merge type",this.type,"with another type:",c.type),o(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),o(!c._inRuleset(),"Cannot concatenate a schema with open ruleset");let h=this.clone();if(this.type==="any"&&c.type!=="any"){const _=c.clone();for(const j of Object.keys(h))j!=="type"&&(_[j]=h[j]);h=_}h._ids.concat(c._ids),h._refs.register(c,u.toSibling),h._preferences=h._preferences?i.preferences(h._preferences,c._preferences):c._preferences,h._valids=$.merge(h._valids,c._valids,c._invalids),h._invalids=$.merge(h._invalids,c._invalids,c._valids);for(const _ of c._singleRules.keys())h._singleRules.has(_)&&(h._rules=h._rules.filter(j=>j.keep||j.name!==_),h._singleRules.delete(_));for(const _ of c._rules)c._definition.rules[_.method].multi||h._singleRules.set(_.name,_),h._rules.push(_);if(h._flags.empty&&c._flags.empty){h._flags.empty=h._flags.empty.concat(c._flags.empty);const _=Object.assign({},c._flags);delete _.empty,f(h._flags,_)}else if(c._flags.empty){h._flags.empty=c._flags.empty;const _=Object.assign({},c._flags);delete _.empty,f(h._flags,_)}else f(h._flags,c._flags);for(const _ in c.$_terms){const j=c.$_terms[_];j?h.$_terms[_]?h.$_terms[_]=h.$_terms[_].concat(j):h.$_terms[_]=j.slice():h.$_terms[_]||(h.$_terms[_]=j)}return this.$_root._tracer&&this.$_root._tracer._combine(h,[this,c]),h.$_mutateRebuild()}extend(c){return o(!c.base,"Cannot extend type with another base"),e.type(this,c)}extract(c){return c=Array.isArray(c)?c:c.split("."),this._ids.reach(c)}fork(c,h){o(!this._inRuleset(),"Cannot fork inside a ruleset");let _=this;for(let j of[].concat(c))j=Array.isArray(j)?j:j.split("."),_=_._ids.fork(j,h,_);return _.$_temp.ruleset=!1,_}rule(c){const h=this._definition;i.assertOptions(c,Object.keys(h.modifiers)),o(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const _=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;o(_>=0&&_<this._rules.length,"Cannot apply rules to empty ruleset");const j=this.clone();for(let R=_;R<j._rules.length;++R){const D=j._rules[R],C=b(D);for(const I in c)h.modifiers[I](C,c[I]),o(C.name===D.name,"Cannot change rule name");j._rules[R]=C,j._singleRules.get(C.name)===D&&j._singleRules.set(C.name,C)}return j.$_temp.ruleset=!1,j.$_mutateRebuild()}get ruleset(){o(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const c=this.clone();return c.$_temp.ruleset=c._rules.length,c}get $(){return this.ruleset}tailor(c){c=[].concat(c),o(!this._inRuleset(),"Cannot tailor inside a ruleset");let h=this;if(this.$_terms.alterations)for(const{target:_,adjuster:j}of this.$_terms.alterations)c.includes(_)&&(h=j(h),o(i.isSchema(h),"Alteration adjuster for",_,"failed to return a schema object"));return h=h.$_modify({each:_=>_.tailor(c),ref:!1}),h.$_temp.ruleset=!1,h.$_mutateRebuild()}tracer(){return m.location?m.location(this):this}validate(c,h){return y.entry(c,this,h)}validateAsync(c,h){return y.entryAsync(c,this,h)}$_addRule(c){typeof c=="string"&&(c={name:c}),o(c&&typeof c=="object","Invalid options"),o(c.name&&typeof c.name=="string","Invalid rule name");for(const D in c)o(D[0]!=="_","Cannot set private rule properties");const h=Object.assign({},c);h._resolve=[],h.method=h.method||h.name;const _=this._definition.rules[h.method],j=h.args;o(_,"Unknown rule",h.method);const R=this.clone();if(j){o(Object.keys(j).length===1||Object.keys(j).length===this._definition.rules[h.name].args.length,"Invalid rule definition for",this.type,h.name);for(const D in j){let C=j[D];if(_.argsByName){const I=_.argsByName.get(D);if(I.ref&&i.isResolvable(C))h._resolve.push(D),R.$_mutateRegister(C);else if(I.normalize&&(C=I.normalize(C),j[D]=C),I.assert){const L=i.validateArg(C,D,I);o(!L,L,"or reference")}}C!==void 0?j[D]=C:delete j[D]}}return _.multi||(R._ruleRemove(h.name,{clone:!1}),R._singleRules.set(h.name,h)),R.$_temp.ruleset===!1&&(R.$_temp.ruleset=null),_.priority?R._rules.unshift(h):R._rules.push(h),R}$_compile(c,h){return s.schema(this.$_root,c,h)}$_createError(c,h,_,j,R,D={}){const C=D.flags!==!1?this._flags:{},I=D.messages?n.merge(this._definition.messages,D.messages):this._definition.messages;return new r.Report(c,h,_,C,I,j,R)}$_getFlag(c){return this._flags[c]}$_getRule(c){return this._singleRules.get(c)}$_mapLabels(c){return c=Array.isArray(c)?c:c.split("."),this._ids.labels(c)}$_match(c,h,_,j){(_=Object.assign({},_)).abortEarly=!0,_._externals=!1,h.snapshot();const R=!y.validate(c,this,h,_,j).errors;return h.restore(),R}$_modify(c){return i.assertOptions(c,["each","once","ref","schema"]),a.schema(this,c)||this}$_mutateRebuild(){return o(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(c,{source:h,name:_,path:j,key:R})=>{const D=this._definition[h][_]&&this._definition[h][_].register;D!==!1&&this.$_mutateRegister(c,{family:D,key:R})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(c,{family:h,key:_}={}){this._refs.register(c,h),this._ids.register(c,{key:_})}$_property(c){return this._definition.properties[c]}$_reach(c){return this._ids.reach(c)}$_rootReferences(){return this._refs.roots()}$_setFlag(c,h,_={}){o(c[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const j=this._definition.flags[c]||{};if(g(h,j.default)&&(h=void 0),g(h,this._flags[c]))return this;const R=_.clone!==!1?this.clone():this;return h!==void 0?(R._flags[c]=h,R.$_mutateRegister(h)):delete R._flags[c],c[0]!=="_"&&(R.$_temp.ruleset=!1),R}$_parent(c,...h){return this[c][i.symbols.parent].call(this,...h)}$_validate(c,h,_){return y.validate(c,this,h,_)}_assign(c){c.type=this.type,c.$_root=this.$_root,c.$_temp=Object.assign({},this.$_temp),c.$_temp.whens={},c._ids=this._ids.clone(),c._preferences=this._preferences,c._valids=this._valids&&this._valids.clone(),c._invalids=this._invalids&&this._invalids.clone(),c._rules=this._rules.slice(),c._singleRules=b(this._singleRules,{shallow:!0}),c._refs=this._refs.clone(),c._flags=Object.assign({},this._flags),c._cache=null,c.$_terms={};for(const h in this.$_terms)c.$_terms[h]=this.$_terms[h]?this.$_terms[h].slice():null;c.$_super={};for(const h in this.$_super)c.$_super[h]=this._super[h].bind(c);return c}_bare(){const c=this.clone();c._reset();const h=c._definition.terms;for(const _ in h){const j=h[_];c.$_terms[_]=j.init}return c.$_mutateRebuild()}_default(c,h,_={}){return i.assertOptions(_,"literal"),o(h!==void 0,"Missing",c,"value"),o(typeof h=="function"||!_.literal,"Only function value supports literal option"),typeof h=="function"&&_.literal&&(h={[i.symbols.literal]:!0,literal:h}),this.$_setFlag(c,h)}_generate(c,h,_){if(!this.$_terms.whens)return{schema:this};const j=[],R=[];for(let I=0;I<this.$_terms.whens.length;++I){const L=this.$_terms.whens[I];if(L.concat){j.push(L.concat),R.push(`${I}.concat`);continue}const H=L.ref?L.ref.resolve(c,h,_):c,z=L.is?[L]:L.switch,Z=R.length;for(let F=0;F<z.length;++F){const{is:q,then:V,otherwise:Q}=z[F],ne=`${I}${L.switch?"."+F:""}`;if(q.$_match(H,h.nest(q,`${ne}.is`),_)){if(V){const se=h.localize([...h.path,`${ne}.then`],h.ancestors,h.schemas),{schema:ke,id:fe}=V._generate(c,se,_);j.push(ke),R.push(`${ne}.then${fe?`(${fe})`:""}`);break}}else if(Q){const se=h.localize([...h.path,`${ne}.otherwise`],h.ancestors,h.schemas),{schema:ke,id:fe}=Q._generate(c,se,_);j.push(ke),R.push(`${ne}.otherwise${fe?`(${fe})`:""}`);break}}if(L.break&&R.length>Z)break}const D=R.join(", ");if(h.mainstay.tracer.debug(h,"rule","when",D),!D)return{schema:this};if(!h.mainstay.tracer.active&&this.$_temp.whens[D])return{schema:this.$_temp.whens[D],id:D};let C=this;this._definition.generate&&(C=this._definition.generate(this,c,h,_));for(const I of j)C=C.concat(I);return this.$_root._tracer&&this.$_root._tracer._combine(C,[this,...j]),this.$_temp.whens[D]=C,{schema:C,id:D}}_inner(c,h,_={}){o(!this._inRuleset(),`Cannot set ${c} inside a ruleset`);const j=this.clone();return j.$_terms[c]&&!_.override||(j.$_terms[c]=[]),_.single?j.$_terms[c].push(h):j.$_terms[c].push(...h),j.$_temp.ruleset=!1,j}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(c,h={}){if(!this._singleRules.has(c))return this;const _=h.clone!==!1?this.clone():this;_._singleRules.delete(c);const j=[];for(let R=0;R<_._rules.length;++R){const D=_._rules[R];D.name!==c||D.keep?j.push(D):_._inRuleset()&&R<_.$_temp.ruleset&&--_.$_temp.ruleset}return _._rules=j,_}_values(c,h){i.verifyFlat(c,h.slice(1,-1));const _=this.clone(),j=c[0]===i.symbols.override;if(j&&(c=c.slice(1)),!_[h]&&c.length?_[h]=new $:j&&(_[h]=c.length?new $:null,_.$_mutateRebuild()),!_[h])return _;j&&_[h].override();for(const R of c){o(R!==void 0,"Cannot call allow/valid/invalid with undefined"),o(R!==i.symbols.override,"Override must be the first value");const D=h==="_invalids"?"_valids":"_invalids";_[D]&&(_[D].remove(R),_[D].length||(o(h==="_valids"||!_._flags.only,"Setting invalid value",R,"leaves schema rejecting all values due to previous valid rule"),_[D]=null)),_[h].add(R,_._refs)}return _}}};w.Base.prototype[i.symbols.any]={version:i.version,compile:s.compile,root:"$_root"},w.Base.prototype.isImmutable=!0,w.Base.prototype.deny=w.Base.prototype.invalid,w.Base.prototype.disallow=w.Base.prototype.invalid,w.Base.prototype.equal=w.Base.prototype.valid,w.Base.prototype.exist=w.Base.prototype.required,w.Base.prototype.not=w.Base.prototype.invalid,w.Base.prototype.options=w.Base.prototype.prefs,w.Base.prototype.preferences=w.Base.prototype.prefs,S.exports=new w.Base},8652:(S,v,p)=>{const o=p(375),b=p(8571),g=p(8160),f={max:1e3,supported:new Set(["undefined","boolean","number","string"])};v.provider={provision:t=>new f.Cache(t)},f.Cache=class{constructor(t={}){g.assertOptions(t,["max"]),o(t.max===void 0||t.max&&t.max>0&&isFinite(t.max),"Invalid max cache size"),this._max=t.max||f.max,this._map=new Map,this._list=new f.List}get length(){return this._map.size}set(t,i){if(t!==null&&!f.supported.has(typeof t))return;let s=this._map.get(t);if(s)return s.value=i,void this._list.first(s);s=this._list.unshift({key:t,value:i}),this._map.set(t,s),this._compact()}get(t){const i=this._map.get(t);if(i)return this._list.first(i),b(i.value)}_compact(){if(this._map.size>this._max){const t=this._list.pop();this._map.delete(t.key)}}},f.List=class{constructor(){this.tail=null,this.head=null}unshift(t){return t.next=null,t.prev=this.head,this.head&&(this.head.next=t),this.head=t,this.tail||(this.tail=t),t}first(t){t!==this.head&&(this._remove(t),this.unshift(t))}pop(){return this._remove(this.tail)}_remove(t){const{next:i,prev:s}=t;return i.prev=s,s&&(s.next=i),t===this.tail&&(this.tail=i),t.prev=null,t.next=null,t}}},8160:(S,v,p)=>{const o=p(375),b=p(7916),g=p(5934);let f,t;const i={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};v.version=g.version,v.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},v.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},v.assertOptions=function(s,r,e="Options"){o(s&&typeof s=="object"&&!Array.isArray(s),"Options must be of type object");const l=Object.keys(s).filter(n=>!r.includes(n));o(l.length===0,`${e} contain unknown keys: ${l}`)},v.checkPreferences=function(s){t=t||p(3378);const r=t.preferences.validate(s);if(r.error)throw new b([r.error.details[0].message])},v.compare=function(s,r,e){switch(e){case"=":return s===r;case">":return s>r;case"<":return s<r;case">=":return s>=r;case"<=":return s<=r}},v.default=function(s,r){return s===void 0?r:s},v.isIsoDate=function(s){return i.isoDate.test(s)},v.isNumber=function(s){return typeof s=="number"&&!isNaN(s)},v.isResolvable=function(s){return!!s&&(s[v.symbols.ref]||s[v.symbols.template])},v.isSchema=function(s,r={}){const e=s&&s[v.symbols.any];return!!e&&(o(r.legacy||e.version===v.version,"Cannot mix different versions of joi schemas"),!0)},v.isValues=function(s){return s[v.symbols.values]},v.limit=function(s){return Number.isSafeInteger(s)&&s>=0},v.preferences=function(s,r){f=f||p(6914),s=s||{},r=r||{};const e=Object.assign({},s,r);return r.errors&&s.errors&&(e.errors=Object.assign({},s.errors,r.errors),e.errors.wrap=Object.assign({},s.errors.wrap,r.errors.wrap)),r.messages&&(e.messages=f.compile(r.messages,s.messages)),delete e[v.symbols.prefs],e},v.tryWithPath=function(s,r,e={}){try{return s()}catch(l){throw l.path!==void 0?l.path=r+"."+l.path:l.path=r,e.append&&(l.message=`${l.message} (${l.path})`),l}},v.validateArg=function(s,r,{assert:e,message:l}){if(v.isSchema(e)){const n=e.validate(s);return n.error?n.error.message:void 0}if(!e(s))return r?`${r} ${l}`:l},v.verifyFlat=function(s,r){for(const e of s)o(!Array.isArray(e),"Method no longer accepts array arguments:",r)}},3292:(S,v,p)=>{const o=p(375),b=p(8160),g=p(6133),f={};v.schema=function(t,i,s={}){b.assertOptions(s,["appendPath","override"]);try{return f.schema(t,i,s)}catch(r){throw s.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},f.schema=function(t,i,s){o(i!==void 0,"Invalid undefined schema"),Array.isArray(i)&&(o(i.length,"Invalid empty array schema"),i.length===1&&(i=i[0]));const r=(e,...l)=>s.override!==!1?e.valid(t.override,...l):e.valid(...l);if(f.simple(i))return r(t,i);if(typeof i=="function")return t.custom(i);if(o(typeof i=="object","Invalid schema content:",typeof i),b.isResolvable(i))return r(t,i);if(b.isSchema(i))return i;if(Array.isArray(i)){for(const e of i)if(!f.simple(e))return t.alternatives().try(...i);return r(t,...i)}return i instanceof RegExp?t.string().regex(i):i instanceof Date?r(t.date(),i):(o(Object.getPrototypeOf(i)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),t.object().keys(i))},v.ref=function(t,i){return g.isRef(t)?t:g.create(t,i)},v.compile=function(t,i,s={}){b.assertOptions(s,["legacy"]);const r=i&&i[b.symbols.any];if(r)return o(s.legacy||r.version===b.version,"Cannot mix different versions of joi schemas:",r.version,b.version),i;if(typeof i!="object"||!s.legacy)return v.schema(t,i,{appendPath:!0});const e=f.walk(i);return e?e.compile(e.root,i):v.schema(t,i,{appendPath:!0})},f.walk=function(t){if(typeof t!="object")return null;if(Array.isArray(t)){for(const s of t){const r=f.walk(s);if(r)return r}return null}const i=t[b.symbols.any];if(i)return{root:t[i.root],compile:i.compile};o(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const s in t){const r=f.walk(t[s]);if(r)return r}return null},f.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},v.when=function(t,i,s){if(s===void 0&&(o(i&&typeof i=="object","Missing options"),s=i,i=g.create(".")),Array.isArray(s)&&(s={switch:s}),b.assertOptions(s,["is","not","then","otherwise","switch","break"]),b.isSchema(i))return o(s.is===void 0,'"is" can not be used with a schema condition'),o(s.not===void 0,'"not" can not be used with a schema condition'),o(s.switch===void 0,'"switch" can not be used with a schema condition'),f.condition(t,{is:i,then:s.then,otherwise:s.otherwise,break:s.break});if(o(g.isRef(i)||typeof i=="string","Invalid condition:",i),o(s.not===void 0||s.is===void 0,'Cannot combine "is" with "not"'),s.switch===void 0){let e=s;s.not!==void 0&&(e={is:s.not,then:s.otherwise,otherwise:s.then,break:s.break});let l=e.is!==void 0?t.$_compile(e.is):t.$_root.invalid(null,!1,0,"").required();return o(e.then!==void 0||e.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),o(e.break===void 0||e.then===void 0||e.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),s.is===void 0||g.isRef(s.is)||b.isSchema(s.is)||(l=l.required()),f.condition(t,{ref:v.ref(i),is:l,then:e.then,otherwise:e.otherwise,break:e.break})}o(Array.isArray(s.switch),'"switch" must be an array'),o(s.is===void 0,'Cannot combine "switch" with "is"'),o(s.not===void 0,'Cannot combine "switch" with "not"'),o(s.then===void 0,'Cannot combine "switch" with "then"');const r={ref:v.ref(i),switch:[],break:s.break};for(let e=0;e<s.switch.length;++e){const l=s.switch[e],n=e===s.switch.length-1;b.assertOptions(l,n?["is","then","otherwise"]:["is","then"]),o(l.is!==void 0,'Switch statement missing "is"'),o(l.then!==void 0,'Switch statement missing "then"');const a={is:t.$_compile(l.is),then:t.$_compile(l.then)};if(g.isRef(l.is)||b.isSchema(l.is)||(a.is=a.is.required()),n){o(s.otherwise===void 0||l.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const u=s.otherwise!==void 0?s.otherwise:l.otherwise;u!==void 0&&(o(r.break===void 0,"Cannot specify both otherwise and break"),a.otherwise=t.$_compile(u))}r.switch.push(a)}return r},f.condition=function(t,i){for(const s of["then","otherwise"])i[s]===void 0?delete i[s]:i[s]=t.$_compile(i[s]);return i}},6354:(S,v,p)=>{const o=p(5688),b=p(8160),g=p(3328);v.Report=class{constructor(f,t,i,s,r,e,l){if(this.code=f,this.flags=s,this.messages=r,this.path=e.path,this.prefs=l,this.state=e,this.value=t,this.message=null,this.template=null,this.local=i||{},this.local.label=v.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const n=this.path[this.path.length-1];typeof n!="object"&&(this.local.key=n)}}_setTemplate(f){if(this.template=f,!this.flags.label&&this.path.length===0){const t=this._template(this.template,"root");t&&(this.local.label=t)}}toString(){if(this.message)return this.message;const f=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return t===void 0?`Error code "${f}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(f,t){return v.template(this.value,f,t||this.code,this.state,this.prefs)}},v.path=function(f){let t="";for(const i of f)typeof i!="object"&&(typeof i=="string"?(t&&(t+="."),t+=i):t+=`[${i}]`);return t},v.template=function(f,t,i,s,r){if(!t)return;if(g.isTemplate(t))return i!=="root"?t:null;let e=r.errors.language;if(b.isResolvable(e)&&(e=e.resolve(f,s,r)),e&&t[e]){if(t[e][i]!==void 0)return t[e][i];if(t[e]["*"]!==void 0)return t[e]["*"]}return t[i]?t[i]:t["*"]},v.label=function(f,t,i,s){if(!i.errors.label)return"";if(f.label)return f.label;let r=t.path;return i.errors.label==="key"&&t.path.length>1&&(r=t.path.slice(-1)),v.path(r)||v.template(null,i.messages,"root",t,i)||s&&v.template(null,s,"root",t,i)||"value"},v.process=function(f,t,i){if(!f)return null;const{override:s,message:r,details:e}=v.details(f);if(s)return s;if(i.errors.stack)return new v.ValidationError(r,e,t);const l=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new v.ValidationError(r,e,t);return Error.stackTraceLimit=l,n},v.details=function(f,t={}){let i=[];const s=[];for(const r of f){if(r instanceof Error){if(t.override!==!1)return{override:r};const l=r.toString();i.push(l),s.push({message:l,type:"override",context:{error:r}});continue}const e=r.toString();i.push(e),s.push({message:e,path:r.path.filter(l=>typeof l!="object"),type:r.code,context:r.local})}return i.length>1&&(i=[...new Set(i)]),{message:i.join(". "),details:s}},v.ValidationError=class extends Error{constructor(f,t,i){super(f),this._original=i,this.details=t}static isError(f){return f instanceof v.ValidationError}},v.ValidationError.prototype.isJoi=!0,v.ValidationError.prototype.name="ValidationError",v.ValidationError.prototype.annotate=o.error},8901:(S,v,p)=>{const o=p(375),b=p(8571),g=p(8160),f=p(6914),t={};v.type=function(i,s){const r=Object.getPrototypeOf(i),e=b(r),l=i._assign(Object.create(e)),n=Object.assign({},s);delete n.base,e._definition=n;const a=r._definition||{};n.messages=f.merge(a.messages,n.messages),n.properties=Object.assign({},a.properties,n.properties),l.type=n.type,n.flags=Object.assign({},a.flags,n.flags);const u=Object.assign({},a.terms);if(n.terms)for(const w in n.terms){const c=n.terms[w];o(l.$_terms[w]===void 0,"Invalid term override for",n.type,w),l.$_terms[w]=c.init,u[w]=c}n.terms=u,n.args||(n.args=a.args),n.prepare=t.prepare(n.prepare,a.prepare),n.coerce&&(typeof n.coerce=="function"&&(n.coerce={method:n.coerce}),n.coerce.from&&!Array.isArray(n.coerce.from)&&(n.coerce={method:n.coerce.method,from:[].concat(n.coerce.from)})),n.coerce=t.coerce(n.coerce,a.coerce),n.validate=t.validate(n.validate,a.validate);const m=Object.assign({},a.rules);if(n.rules)for(const w in n.rules){const c=n.rules[w];o(typeof c=="object","Invalid rule definition for",n.type,w);let h=c.method;if(h===void 0&&(h=function(){return this.$_addRule(w)}),h&&(o(!e[w],"Rule conflict in",n.type,w),e[w]=h),o(!m[w],"Rule conflict in",n.type,w),m[w]=c,c.alias){const _=[].concat(c.alias);for(const j of _)e[j]=c.method}c.args&&(c.argsByName=new Map,c.args=c.args.map(_=>(typeof _=="string"&&(_={name:_}),o(!c.argsByName.has(_.name),"Duplicated argument name",_.name),g.isSchema(_.assert)&&(_.assert=_.assert.strict().label(_.name)),c.argsByName.set(_.name,_),_)))}n.rules=m;const y=Object.assign({},a.modifiers);if(n.modifiers)for(const w in n.modifiers){o(!e[w],"Rule conflict in",n.type,w);const c=n.modifiers[w];o(typeof c=="function","Invalid modifier definition for",n.type,w);const h=function(_){return this.rule({[w]:_})};e[w]=h,y[w]=c}if(n.modifiers=y,n.overrides){e._super=r,l.$_super={};for(const w in n.overrides)o(r[w],"Cannot override missing",w),n.overrides[w][g.symbols.parent]=r[w],l.$_super[w]=r[w].bind(l);Object.assign(e,n.overrides)}n.cast=Object.assign({},a.cast,n.cast);const $=Object.assign({},a.manifest,n.manifest);return $.build=t.build(n.manifest&&n.manifest.build,a.manifest&&a.manifest.build),n.manifest=$,n.rebuild=t.rebuild(n.rebuild,a.rebuild),l},t.build=function(i,s){return i&&s?function(r,e){return s(i(r,e),e)}:i||s},t.coerce=function(i,s){return i&&s?{from:i.from&&s.from?[...new Set([...i.from,...s.from])]:null,method(r,e){let l;if((!s.from||s.from.includes(typeof r))&&(l=s.method(r,e),l)){if(l.errors||l.value===void 0)return l;r=l.value}if(!i.from||i.from.includes(typeof r)){const n=i.method(r,e);if(n)return n}return l}}:i||s},t.prepare=function(i,s){return i&&s?function(r,e){const l=i(r,e);if(l){if(l.errors||l.value===void 0)return l;r=l.value}return s(r,e)||l}:i||s},t.rebuild=function(i,s){return i&&s?function(r){s(r),i(r)}:i||s},t.validate=function(i,s){return i&&s?function(r,e){const l=s(r,e);if(l){if(l.errors&&(!Array.isArray(l.errors)||l.errors.length))return l;r=l.value}return i(r,e)||l}:i||s}},5107:(S,v,p)=>{const o=p(375),b=p(8571),g=p(8652),f=p(8160),t=p(3292),i=p(6354),s=p(8901),r=p(9708),e=p(6133),l=p(3328),n=p(1152);let a;const u={types:{alternatives:p(4946),any:p(8068),array:p(546),boolean:p(4937),date:p(7500),function:p(390),link:p(8785),number:p(3832),object:p(8966),string:p(7417),symbol:p(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const m={_types:new Set(Object.keys(u.types))};for(const y of m._types)m[y]=function(...$){return o(!$.length||["alternatives","link","object"].includes(y),"The",y,"type does not allow arguments"),u.generate(this,u.types[y],$)};for(const y of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])m[y]=function(...$){return this.any()[y](...$)};Object.assign(m,u.methods);for(const y in u.aliases){const $=u.aliases[y];m[y]=m[$]}return m.x=m.expression,n.setup&&n.setup(m),m}};u.methods={ValidationError:i.ValidationError,version:f.version,cache:g.provider,assert(m,y,...$){u.assert(m,y,!0,$)},attempt:(m,y,...$)=>u.assert(m,y,!1,$),build(m){return o(typeof r.build=="function","Manifest functionality disabled"),r.build(this,m)},checkPreferences(m){f.checkPreferences(m)},compile(m,y){return t.compile(this,m,y)},defaults(m){o(typeof m=="function","modifier must be a function");const y=Object.assign({},this);for(const $ of y._types){const w=m(y[$]());o(f.isSchema(w),"modifier must return a valid schema object"),y[$]=function(...c){return u.generate(this,w,c)}}return y},expression:(...m)=>new l(...m),extend(...m){f.verifyFlat(m,"extend"),a=a||p(3378),o(m.length,"You need to provide at least one extension"),this.assert(m,a.extensions);const y=Object.assign({},this);y._types=new Set(y._types);for(let $ of m){typeof $=="function"&&($=$(y)),this.assert($,a.extension);const w=u.expandExtension($,y);for(const c of w){o(y[c.type]===void 0||y._types.has(c.type),"Cannot override name",c.type);const h=c.base||this.any(),_=s.type(h,c);y._types.add(c.type),y[c.type]=function(...j){return u.generate(this,_,j)}}}return y},isError:i.ValidationError.isError,isExpression:l.isTemplate,isRef:e.isRef,isSchema:f.isSchema,in:(...m)=>e.in(...m),override:f.symbols.override,ref:(...m)=>e.create(...m),types(){const m={};for(const y of this._types)m[y]=this[y]();for(const y in u.aliases)m[y]=this[y]();return m}},u.assert=function(m,y,$,w){const c=w[0]instanceof Error||typeof w[0]=="string"?w[0]:null,h=c!==null?w[1]:w[0],_=y.validate(m,f.preferences({errors:{stack:!0}},h||{}));let j=_.error;if(!j)return _.value;if(c instanceof Error)throw c;const R=$&&typeof j.annotate=="function"?j.annotate():j.message;throw j instanceof i.ValidationError==0&&(j=b(j)),j.message=c?`${c} ${R}`:R,j},u.generate=function(m,y,$){return o(m,"Must be invoked on a Joi instance."),y.$_root=m,y._definition.args&&$.length?y._definition.args(y,...$):y},u.expandExtension=function(m,y){if(typeof m.type=="string")return[m];const $=[];for(const w of y._types)if(m.type.test(w)){const c=Object.assign({},m);c.type=w,c.base=y[w](),$.push(c)}return $},S.exports=u.root()},6914:(S,v,p)=>{const o=p(375),b=p(8571),g=p(3328);v.compile=function(f,t){if(typeof f=="string")return o(!t,"Cannot set single message string"),new g(f);if(g.isTemplate(f))return o(!t,"Cannot set single message template"),f;o(typeof f=="object"&&!Array.isArray(f),"Invalid message options"),t=t?b(t):{};for(let i in f){const s=f[i];if(i==="root"||g.isTemplate(s)){t[i]=s;continue}if(typeof s=="string"){t[i]=new g(s);continue}o(typeof s=="object"&&!Array.isArray(s),"Invalid message for",i);const r=i;for(i in t[r]=t[r]||{},s){const e=s[i];i==="root"||g.isTemplate(e)?t[r][i]=e:(o(typeof e=="string","Invalid message for",i,"in",r),t[r][i]=new g(e))}}return t},v.decompile=function(f){const t={};for(let i in f){const s=f[i];if(i==="root"){t.root=s;continue}if(g.isTemplate(s)){t[i]=s.describe({compact:!0});continue}const r=i;for(i in t[r]={},s){const e=s[i];i!=="root"?t[r][i]=e.describe({compact:!0}):t[r].root=e}}return t},v.merge=function(f,t){if(!f)return v.compile(t);if(!t)return f;if(typeof t=="string")return new g(t);if(g.isTemplate(t))return t;const i=b(f);for(let s in t){const r=t[s];if(s==="root"||g.isTemplate(r)){i[s]=r;continue}if(typeof r=="string"){i[s]=new g(r);continue}o(typeof r=="object"&&!Array.isArray(r),"Invalid message for",s);const e=s;for(s in i[e]=i[e]||{},r){const l=r[s];s==="root"||g.isTemplate(l)?i[e][s]=l:(o(typeof l=="string","Invalid message for",s,"in",e),i[e][s]=new g(l))}}return i}},2294:(S,v,p)=>{const o=p(375),b=p(8160),g=p(6133),f={};v.Ids=f.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const t=new f.Ids;return t._byId=new Map(this._byId),t._byKey=new Map(this._byKey),t._schemaChain=this._schemaChain,t}concat(t){t._schemaChain&&(this._schemaChain=!0);for(const[i,s]of t._byId.entries())o(!this._byKey.has(i),"Schema id conflicts with existing key:",i),this._byId.set(i,s);for(const[i,s]of t._byKey.entries())o(!this._byId.has(i),"Schema key conflicts with existing id:",i),this._byKey.set(i,s)}fork(t,i,s){const r=this._collect(t);r.push({schema:s});const e=r.shift();let l={id:e.id,schema:i(e.schema)};o(b.isSchema(l.schema),"adjuster function failed to return a joi schema type");for(const n of r)l={id:n.id,schema:f.fork(n.schema,l.id,l.schema)};return l.schema}labels(t,i=[]){const s=t[0],r=this._get(s);if(!r)return[...i,...t].join(".");const e=t.slice(1);return i=[...i,r.schema._flags.label||s],e.length?r.schema._ids.labels(e,i):i.join(".")}reach(t,i=[]){const s=t[0],r=this._get(s);o(r,"Schema does not contain path",[...i,...t].join("."));const e=t.slice(1);return e.length?r.schema._ids.reach(e,[...i,s]):r.schema}register(t,{key:i}={}){if(!t||!b.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const s=t._flags.id;if(s){const r=this._byId.get(s);o(!r||r.schema===t,"Cannot add different schemas with the same id:",s),o(!this._byKey.has(s),"Schema id conflicts with existing key:",s),this._byId.set(s,{schema:t,id:s})}i&&(o(!this._byKey.has(i),"Schema already contains key:",i),o(!this._byId.has(i),"Schema key conflicts with existing id:",i),this._byKey.set(i,{schema:t,id:i}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(t,i=[],s=[]){const r=t[0],e=this._get(r);o(e,"Schema does not contain path",[...i,...t].join(".")),s=[e,...s];const l=t.slice(1);return l.length?e.schema._ids._collect(l,[...i,r],s):s}_get(t){return this._byId.get(t)||this._byKey.get(t)}},f.fork=function(t,i,s){const r=v.schema(t,{each:(e,{key:l})=>{if(i===(e._flags.id||l))return s},ref:!1});return r?r.$_mutateRebuild():t},v.schema=function(t,i){let s;for(const r in t._flags){if(r[0]==="_")continue;const e=f.scan(t._flags[r],{source:"flags",name:r},i);e!==void 0&&(s=s||t.clone(),s._flags[r]=e)}for(let r=0;r<t._rules.length;++r){const e=t._rules[r],l=f.scan(e.args,{source:"rules",name:e.name},i);if(l!==void 0){s=s||t.clone();const n=Object.assign({},e);n.args=l,s._rules[r]=n,s._singleRules.get(e.name)===e&&s._singleRules.set(e.name,n)}}for(const r in t.$_terms){if(r[0]==="_")continue;const e=f.scan(t.$_terms[r],{source:"terms",name:r},i);e!==void 0&&(s=s||t.clone(),s.$_terms[r]=e)}return s},f.scan=function(t,i,s,r,e){const l=r||[];if(t===null||typeof t!="object")return;let n;if(Array.isArray(t)){for(let a=0;a<t.length;++a){const u=i.source==="terms"&&i.name==="keys"&&t[a].key,m=f.scan(t[a],i,s,[a,...l],u);m!==void 0&&(n=n||t.slice(),n[a]=m)}return n}if(s.schema!==!1&&b.isSchema(t)||s.ref!==!1&&g.isRef(t)){const a=s.each(t,{...i,path:l,key:e});return a===t?void 0:a}for(const a in t){if(a[0]==="_")continue;const u=f.scan(t[a],i,s,[a,...l],e);u!==void 0&&(n=n||Object.assign({},t),n[a]=u)}return n}},6133:(S,v,p)=>{const o=p(375),b=p(8571),g=p(9621),f=p(8160);let t;const i={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};v.create=function(s,r={}){o(typeof s=="string","Invalid reference key:",s),f.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),o(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const e=Object.assign({},i.defaults,r);delete e.prefix;const l=e.separator,n=i.context(s,l,r.prefix);if(e.type=n.type,s=n.key,e.type==="value")if(n.root&&(o(!l||s[0]!==l,"Cannot specify relative path with root prefix"),e.ancestor="root",s||(s=null)),l&&l===s)s=null,e.ancestor=0;else if(e.ancestor!==void 0)o(!l||!s||s[0]!==l,"Cannot combine prefix with ancestor option");else{const[a,u]=i.ancestor(s,l);u&&(s=s.slice(u))===""&&(s=null),e.ancestor=a}return e.path=l?s===null?[]:s.split(l):[s],new i.Ref(e)},v.in=function(s,r={}){return v.create(s,{...r,in:!0})},v.isRef=function(s){return!!s&&!!s[f.symbols.ref]},i.Ref=class{constructor(s){o(typeof s=="object","Invalid reference construction"),f.assertOptions(s,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),o([!1,void 0].includes(s.separator)||typeof s.separator=="string"&&s.separator.length===1,"Invalid separator"),o(!s.adjust||typeof s.adjust=="function","options.adjust must be a function"),o(!s.map||Array.isArray(s.map),"options.map must be an array"),o(!s.map||!s.adjust,"Cannot set both map and adjust options"),Object.assign(this,i.defaults,s),o(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(s,r,e,l,n={}){return o(!this.in||n.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(e.context,r,n):this.type==="local"?this._resolve(l,r,n):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,n):(o(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,n)):this._resolve(s,r,n)}_resolve(s,r,e){let l;if(this.type==="value"&&r.mainstay.shadow&&e.shadow!==!1&&(l=r.mainstay.shadow.get(this.absolute(r))),l===void 0&&(l=g(s,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(l=this.adjust(l)),this.map){const n=this.map.get(l);n!==void 0&&(l=n)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,l),l}toString(){return this.display}absolute(s){return[...s.path.slice(0,-this.ancestor),...this.path]}clone(){return new i.Ref(this)}describe(){const s={path:this.path};this.type!=="value"&&(s.type=this.type),this.separator!=="."&&(s.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(s.ancestor=this.ancestor),this.map&&(s.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(s[r]=this[r]);return this.in!==!1&&(s.in=!0),{ref:s}}updateDisplay(){const s=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${s}`);if(!this.separator)return void(this.display=`ref:${s}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${s}`);if(this.ancestor==="root")return void(this.display=`ref:root:${s}`);if(this.ancestor===1)return void(this.display=`ref:${s||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${s||""}`}},i.Ref.prototype[f.symbols.ref]=!0,v.build=function(s){return(s=Object.assign({},i.defaults,s)).type==="value"&&s.ancestor===void 0&&(s.ancestor=1),new i.Ref(s)},i.context=function(s,r,e={}){if(s=s.trim(),e){const l=e.global===void 0?"$":e.global;if(l!==r&&s.startsWith(l))return{key:s.slice(l.length),type:"global"};const n=e.local===void 0?"#":e.local;if(n!==r&&s.startsWith(n))return{key:s.slice(n.length),type:"local"};const a=e.root===void 0?"/":e.root;if(a!==r&&s.startsWith(a))return{key:s.slice(a.length),type:"value",root:!0}}return{key:s,type:"value"}},i.ancestor=function(s,r){if(!r)return[1,0];if(s[0]!==r)return[1,0];if(s[1]!==r)return[0,1];let e=2;for(;s[e]===r;)++e;return[e-1,e]},v.toSibling=0,v.toParent=1,v.Manager=class{constructor(){this.refs=[]}register(s,r){if(s)if(r=r===void 0?v.toParent:r,Array.isArray(s))for(const e of s)this.register(e,r);else if(f.isSchema(s))for(const e of s._refs.refs)e.ancestor-r>=0&&this.refs.push({ancestor:e.ancestor-r,root:e.root});else v.isRef(s)&&s.type==="value"&&s.ancestor-r>=0&&this.refs.push({ancestor:s.ancestor-r,root:s.root}),t=t||p(3328),t.isTemplate(s)&&this.register(s.refs(),r)}get length(){return this.refs.length}clone(){const s=new v.Manager;return s.refs=b(this.refs),s}reset(){this.refs=[]}roots(){return this.refs.filter(s=>!s.ancestor).map(s=>s.root)}}},3378:(S,v,p)=>{const o=p(5107),b={};b.wrap=o.string().min(1).max(2).allow(!1),v.preferences=o.object({allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),context:o.object(),convert:o.boolean(),dateFormat:o.valid("date","iso","string","time","utc"),debug:o.boolean(),errors:{escapeHtml:o.boolean(),label:o.valid("path","key",!1),language:[o.string(),o.object().ref()],render:o.boolean(),stack:o.boolean(),wrap:{label:b.wrap,array:b.wrap,string:b.wrap}},externals:o.boolean(),messages:o.object(),noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:o.valid("required","optional","forbidden"),skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()}).strict(),b.nameRx=/^[a-zA-Z0-9]\w*$/,b.rule=o.object({alias:o.array().items(o.string().pattern(b.nameRx)).single(),args:o.array().items(o.string(),o.object({name:o.string().pattern(b.nameRx).required(),ref:o.boolean(),assert:o.alternatives([o.function(),o.object().schema()]).conditional("ref",{is:!0,then:o.required()}),normalize:o.function(),message:o.string().when("assert",{is:o.function(),then:o.required()})})),convert:o.boolean(),manifest:o.boolean(),method:o.function().allow(!1),multi:o.boolean(),validate:o.function()}),v.extension=o.object({type:o.alternatives([o.string(),o.object().regex()]).required(),args:o.function(),cast:o.object().pattern(b.nameRx,o.object({from:o.function().maxArity(1).required(),to:o.function().minArity(1).maxArity(2).required()})),base:o.object().schema().when("type",{is:o.object().regex(),then:o.forbidden()}),coerce:[o.function().maxArity(3),o.object({method:o.function().maxArity(3).required(),from:o.array().items(o.string()).single()})],flags:o.object().pattern(b.nameRx,o.object({setter:o.string(),default:o.any()})),manifest:{build:o.function().arity(2)},messages:[o.object(),o.string()],modifiers:o.object().pattern(b.nameRx,o.function().minArity(1).maxArity(2)),overrides:o.object().pattern(b.nameRx,o.function()),prepare:o.function().maxArity(3),rebuild:o.function().arity(1),rules:o.object().pattern(b.nameRx,b.rule),terms:o.object().pattern(b.nameRx,o.object({init:o.array().allow(null).required(),manifest:o.object().pattern(/.+/,[o.valid("schema","single"),o.object({mapped:o.object({from:o.string().required(),to:o.string().required()}).required()})])})),validate:o.function().maxArity(3)}).strict(),v.extensions=o.array().items(o.object(),o.function().arity(1)).strict(),b.desc={buffer:o.object({buffer:o.string()}),func:o.object({function:o.function().required(),options:{literal:!0}}),override:o.object({override:!0}),ref:o.object({ref:o.object({type:o.valid("value","global","local"),path:o.array().required(),separator:o.string().length(1).allow(!1),ancestor:o.number().min(0).integer().allow("root"),map:o.array().items(o.array().length(2)).min(1),adjust:o.function(),iterables:o.boolean(),in:o.boolean(),render:o.boolean()}).required()}),regex:o.object({regex:o.string().min(3)}),special:o.object({special:o.valid("deep").required()}),template:o.object({template:o.string().required(),options:o.object()}),value:o.object({value:o.alternatives([o.object(),o.array()]).required()})},b.desc.entity=o.alternatives([o.array().items(o.link("...")),o.boolean(),o.function(),o.number(),o.string(),b.desc.buffer,b.desc.func,b.desc.ref,b.desc.regex,b.desc.special,b.desc.template,b.desc.value,o.link("/")]),b.desc.values=o.array().items(null,o.boolean(),o.function(),o.number().allow(1/0,-1/0),o.string().allow(""),o.symbol(),b.desc.buffer,b.desc.func,b.desc.override,b.desc.ref,b.desc.regex,b.desc.template,b.desc.value),b.desc.messages=o.object().pattern(/.+/,[o.string(),b.desc.template,o.object().pattern(/.+/,[o.string(),b.desc.template])]),v.description=o.object({type:o.string().required(),flags:o.object({cast:o.string(),default:o.any(),description:o.string(),empty:o.link("/"),failover:b.desc.entity,id:o.string(),label:o.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:o.boolean(),unit:o.string()}).unknown(),preferences:{allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),convert:o.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:o.boolean(),label:["path","key"],language:[o.string(),b.desc.ref],wrap:{label:b.wrap,array:b.wrap}},externals:o.boolean(),messages:b.desc.messages,noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:["required","optional","forbidden"],skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()},allow:b.desc.values,invalid:b.desc.values,rules:o.array().min(1).items({name:o.string().required(),args:o.object().min(1),keep:o.boolean(),message:[o.string(),b.desc.messages],warn:o.boolean()}),keys:o.object().pattern(/.*/,o.link("/")),link:b.desc.ref}).pattern(/^[a-z]\w*$/,o.any())},493:(S,v,p)=>{const o=p(8571),b=p(9621),g=p(8160),f={value:Symbol("value")};S.exports=f.State=class{constructor(t,i,s){this.path=t,this.ancestors=i,this.mainstay=s.mainstay,this.schemas=s.schemas,this.debug=null}localize(t,i=null,s=null){const r=new f.State(t,i,this);return s&&r.schemas&&(r.schemas=[f.schemas(s),...r.schemas]),r}nest(t,i){const s=new f.State(this.path,this.ancestors,this);return s.schemas=s.schemas&&[f.schemas(t),...s.schemas],s.debug=i,s}shadow(t,i){this.mainstay.shadow=this.mainstay.shadow||new f.Shadow,this.mainstay.shadow.set(this.path,t,i)}snapshot(){this.mainstay.shadow&&(this._snapshot=o(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},f.schemas=function(t){return g.isSchema(t)?{schema:t}:t},f.Shadow=class{constructor(){this._values=null}set(t,i,s){if(!t.length||s==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let r=this._values;for(let e=0;e<t.length;++e){const l=t[e];let n=r.get(l);n||(n=new Map,r.set(l,n)),r=n}r[f.value]=i}get(t){const i=this.node(t);if(i)return i[f.value]}node(t){if(this._values)return b(this._values,t,{iterables:!0})}override(t,i){if(!this._values)return;const s=t.slice(0,-1),r=t[t.length-1],e=b(this._values,s,{iterables:!0});i?e.set(r,i):e&&e.delete(r)}}},3328:(S,v,p)=>{const o=p(375),b=p(8571),g=p(5277),f=p(1447),t=p(8160),i=p(6354),s=p(6133),r={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};S.exports=r.Template=class{constructor(e,l){if(o(typeof e=="string","Template source must be a string"),o(!e.includes("\0")&&!e.includes(""),"Template source cannot contain reserved control characters"),this.source=e,this.rendered=e,this._template=null,l){const{functions:n,...a}=l;this._settings=Object.keys(a).length?b(a):void 0,this._functions=n,this._functions&&(o(Object.keys(this._functions).every(u=>typeof u=="string"),"Functions keys must be strings"),o(Object.values(this._functions).every(u=>typeof u=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const e=r.encode(this.source),l=r.split(e);let n=!1;const a=[],u=l.shift();u&&a.push(u);for(const m of l){const y=m[0]!=="{",$=y?"}":"}}",w=m.indexOf($);if(w===-1||m[1]==="{"){a.push(`{${r.decode(m)}`);continue}let c=m.slice(y?0:1,w);const h=c[0]===":";h&&(c=c.slice(1));const _=this._ref(r.decode(c),{raw:y,wrapped:h});a.push(_),typeof _!="string"&&(n=!0);const j=m.slice(w+$.length);j&&a.push(r.decode(j))}n?this._template=a:this.rendered=a.join("")}static date(e,l){return r.dateFormat[l.dateFormat].call(e)}describe(e={}){if(!this._settings&&e.compact)return this.source;const l={template:this.source};return this._settings&&(l.options=this._settings),this._functions&&(l.functions=this._functions),l}static build(e){return new r.Template(e.template,e.options||e.functions?{...e.options,functions:e.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(e){return!!e&&!!e[t.symbols.template]}refs(){if(!this._template)return;const e=[];for(const l of this._template)typeof l!="string"&&e.push(...l.refs);return e}resolve(e,l,n,a){return this._template&&this._template.length===1?this._part(this._template[0],e,l,n,a,{}):this.render(e,l,n,a)}_part(e,...l){return e.ref?e.ref.resolve(...l):e.formula.evaluate(l)}render(e,l,n,a,u={}){if(!this.isDynamic())return this.rendered;const m=[];for(const y of this._template)if(typeof y=="string")m.push(y);else{const $=this._part(y,e,l,n,a,u),w=r.stringify($,e,l,n,a,u);if(w!==void 0){const c=y.raw||(u.errors&&u.errors.escapeHtml)===!1?w:g(w);m.push(r.wrap(c,y.wrapped&&n.errors.wrap.label))}}return m.join("")}_ref(e,{raw:l,wrapped:n}){const a=[],u=y=>{const $=s.create(y,this._settings);return a.push($),w=>{const c=$.resolve(...w);return c!==void 0?c:null}};try{const y=this._functions?{...r.functions,...this._functions}:r.functions;var m=new f.Parser(e,{reference:u,functions:y,constants:r.constants})}catch(y){throw y.message=`Invalid template variable "${e}" fails due to: ${y.message}`,y}if(m.single){if(m.single.type==="reference"){const y=a[0];return{ref:y,raw:l,refs:a,wrapped:n||y.type==="local"&&y.key==="label"}}return r.stringify(m.single.value)}return{formula:m,raw:l,refs:a}}toString(){return this.source}},r.Template.prototype[t.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(e){return e.replace(/\\(\{+)/g,(l,n)=>r.opens.slice(0,n.length)).replace(/\\(\}+)/g,(l,n)=>r.closes.slice(0,n.length))},r.decode=function(e){return e.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(e){const l=[];let n="";for(let a=0;a<e.length;++a){const u=e[a];if(u==="{"){let m="";for(;a+1<e.length&&e[a+1]==="{";)m+="{",++a;l.push(n),n=m}else n+=u}return l.push(n),l},r.wrap=function(e,l){return l?l.length===1?`${l}${e}${l}`:`${l[0]}${e}${l[1]}`:e},r.stringify=function(e,l,n,a,u,m={}){const y=typeof e,$=a&&a.errors&&a.errors.wrap||{};let w=!1;if(s.isRef(e)&&e.render&&(w=e.in,e=e.resolve(l,n,a,u,{in:e.in,...m})),e===null)return"null";if(y==="string")return r.wrap(e,m.arrayItems&&$.string);if(y==="number"||y==="function"||y==="symbol")return e.toString();if(y!=="object")return JSON.stringify(e);if(e instanceof Date)return r.Template.date(e,a);if(e instanceof Map){const h=[];for(const[_,j]of e.entries())h.push(`${_.toString()} -> ${j.toString()}`);e=h}if(!Array.isArray(e))return e.toString();const c=[];for(const h of e)c.push(r.stringify(h,l,n,a,u,{arrayItems:!0,...m}));return r.wrap(c.join(", "),!w&&$.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(e,l,n)=>e?l:n,length:e=>typeof e=="string"?e.length:e&&typeof e=="object"?Array.isArray(e)?e.length:Object.keys(e).length:null,msg(e){const[l,n,a,u,m]=this,y=m.messages;if(!y)return"";const $=i.template(l,y[0],e,n,a)||i.template(l,y[1],e,n,a);return $?$.render(l,n,a,u,m):""},number:e=>typeof e=="number"?e:typeof e=="string"?parseFloat(e):typeof e=="boolean"?e?1:0:e instanceof Date?e.getTime():null}},4946:(S,v,p)=>{const o=p(375),b=p(1687),g=p(8068),f=p(8160),t=p(3292),i=p(6354),s=p(6133),r={};S.exports=g.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:s.toSibling}},args:(e,...l)=>l.length===1&&Array.isArray(l[0])?e.try(...l[0]):e.try(...l),validate(e,l){const{schema:n,error:a,state:u,prefs:m}=l;if(n._flags.match){const $=[],w=[];for(let h=0;h<n.$_terms.matches.length;++h){const _=n.$_terms.matches[h],j=u.nest(_.schema,`match.${h}`);j.snapshot();const R=_.schema.$_validate(e,j,m);R.errors?(w.push(R.errors),j.restore()):($.push(R.value),j.commit())}if($.length===0)return{errors:a("alternatives.any",{details:w.map(h=>i.details(h,{override:!1}))})};if(n._flags.match==="one")return $.length===1?{value:$[0]}:{errors:a("alternatives.one")};if($.length!==n.$_terms.matches.length)return{errors:a("alternatives.all",{details:w.map(h=>i.details(h,{override:!1}))})};const c=h=>h.$_terms.matches.some(_=>_.schema.type==="object"||_.schema.type==="alternatives"&&c(_.schema));return c(n)?{value:$.reduce((h,_)=>b(h,_,{mergeArrays:!1}))}:{value:$[$.length-1]}}const y=[];for(let $=0;$<n.$_terms.matches.length;++$){const w=n.$_terms.matches[$];if(w.schema){const _=u.nest(w.schema,`match.${$}`);_.snapshot();const j=w.schema.$_validate(e,_,m);if(!j.errors)return _.commit(),j;_.restore(),y.push({schema:w.schema,reports:j.errors});continue}const c=w.ref?w.ref.resolve(e,u,m):e,h=w.is?[w]:w.switch;for(let _=0;_<h.length;++_){const j=h[_],{is:R,then:D,otherwise:C}=j,I=`match.${$}${w.switch?"."+_:""}`;if(R.$_match(c,u.nest(R,`${I}.is`),m)){if(D)return D.$_validate(e,u.nest(D,`${I}.then`),m)}else if(C)return C.$_validate(e,u.nest(C,`${I}.otherwise`),m)}}return r.errors(y,l)},rules:{conditional:{method(e,l){o(!this._flags._endedSwitch,"Unreachable condition"),o(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),o(l.break===void 0,"Cannot use break option with alternatives conditional");const n=this.clone(),a=t.when(n,e,l),u=a.is?[a]:a.switch;for(const m of u)if(m.then&&m.otherwise){n.$_setFlag("_endedSwitch",!0,{clone:!1});break}return n.$_terms.matches.push(a),n.$_mutateRebuild()}},match:{method(e){if(o(["any","one","all"].includes(e),"Invalid alternatives match mode",e),e!=="any")for(const l of this.$_terms.matches)o(l.schema,"Cannot combine match mode",e,"with conditional rules");return this.$_setFlag("match",e)}},try:{method(...e){o(e.length,"Missing alternative schemas"),f.verifyFlat(e,"try"),o(!this._flags._endedSwitch,"Unreachable condition");const l=this.clone();for(const n of e)l.$_terms.matches.push({schema:l.$_compile(n)});return l.$_mutateRebuild()}}},overrides:{label(e){return this.$_parent("label",e).$_modify({each:(l,n)=>n.path[0]!=="is"&&typeof l._flags.label!="string"?l.label(e):void 0,ref:!1})}},rebuild(e){e.$_modify({each:l=>{f.isSchema(l)&&l.type==="array"&&e.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(e,l){if(l.matches)for(const n of l.matches){const{schema:a,ref:u,is:m,not:y,then:$,otherwise:w}=n;e=a?e.try(a):u?e.conditional(u,{is:m,then:$,not:y,otherwise:w,switch:n.switch}):e.conditional(m,{then:$,otherwise:w})}return e}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),r.errors=function(e,{error:l,state:n}){if(!e.length)return{errors:l("alternatives.any")};if(e.length===1)return{errors:e[0].reports};const a=new Set,u=[];for(const{reports:m,schema:y}of e){if(m.length>1)return r.unmatched(e,l);const $=m[0];if($ instanceof i.Report==0)return r.unmatched(e,l);if($.state.path.length!==n.path.length){u.push({type:y.type,report:$});continue}if($.code==="any.only"){for(const h of $.local.valids)a.add(h);continue}const[w,c]=$.code.split(".");c!=="base"?u.push({type:y.type,report:$}):$.code==="object.base"?a.add($.local.type):a.add(w)}return u.length?u.length===1?{errors:u[0].report}:r.unmatched(e,l):{errors:l("alternatives.types",{types:[...a]})}},r.unmatched=function(e,l){const n=[];for(const a of e)n.push(...a.reports);return{errors:l("alternatives.match",i.details(n,{override:!1}))}}},8068:(S,v,p)=>{const o=p(375),b=p(7629),g=p(8160),f=p(6914);S.exports=b.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(t,i){return o(typeof t=="function","Method must be a function"),o(i===void 0||i&&typeof i=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:t,description:i}})},validate(t,i,{method:s}){try{return s(t,i)}catch(r){return i.error("any.custom",{error:r})}},args:["method","description"],multi:!0},messages:{method(t){return this.prefs({messages:t})}},shared:{method(t){o(g.isSchema(t)&&t._flags.id,"Schema must be a schema with an id");const i=this.clone();return i.$_terms.shared=i.$_terms.shared||[],i.$_terms.shared.push(t),i.$_mutateRegister(t),i}},warning:{method(t,i){return o(t&&typeof t=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:t,local:i},warn:!0})},validate:(t,i,{code:s,local:r})=>i.error(s,r),args:["code","local"],multi:!0}},modifiers:{keep(t,i=!0){t.keep=i},message(t,i){t.message=f.compile(i)},warn(t,i=!0){t.warn=i}},manifest:{build(t,i){for(const s in i){const r=i[s];if(["examples","externals","metas","notes","tags"].includes(s))for(const e of r)t=t[s.slice(0,-1)](e);else if(s!=="alterations")if(s!=="whens"){if(s==="shared")for(const e of r)t=t.shared(e)}else for(const e of r){const{ref:l,is:n,not:a,then:u,otherwise:m,concat:y}=e;t=y?t.concat(y):l?t.when(l,{is:n,not:a,then:u,otherwise:m,switch:e.switch,break:e.break}):t.when(n,{then:u,otherwise:m,break:e.break})}else{const e={};for(const{target:l,adjuster:n}of r)e[l]=n;t=t.alter(e)}}return t}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(S,v,p)=>{const o=p(375),b=p(9474),g=p(9621),f=p(8068),t=p(8160),i=p(3292),s={};S.exports=f.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(r,{schema:e,state:l,prefs:n}){if(!Array.isArray(r))return;const a=e.$_getRule("sort");return a?s.sort(e,r,a.args.options,l,n):void 0}},validate(r,{schema:e,error:l}){if(!Array.isArray(r)){if(e._flags.single){const n=[r];return n[t.symbols.arraySingle]=!0,{value:n}}return{errors:l("array.base")}}if(e.$_getRule("items")||e.$_terms.externals)return{value:r.slice()}},rules:{has:{method(r){r=this.$_compile(r,{appendPath:!0});const e=this.$_addRule({name:"has",args:{schema:r}});return e.$_mutateRegister(r),e},validate(r,{state:e,prefs:l,error:n},{schema:a}){const u=[r,...e.ancestors];for(let y=0;y<r.length;++y){const $=e.localize([...e.path,y],u,a);if(a.$_match(r[y],$,l))return r}const m=a._flags.label;return m?n("array.hasKnown",{patternLabel:m}):n("array.hasUnknown",null)},multi:!0},items:{method(...r){t.verifyFlat(r,"items");const e=this.$_addRule("items");for(let l=0;l<r.length;++l){const n=t.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});e.$_terms.items.push(n)}return e.$_mutateRebuild()},validate(r,{schema:e,error:l,state:n,prefs:a,errorsArray:u}){const m=e.$_terms._requireds.slice(),y=e.$_terms.ordered.slice(),$=[...e.$_terms._inclusions,...m],w=!r[t.symbols.arraySingle];delete r[t.symbols.arraySingle];const c=u();let h=r.length;for(let _=0;_<h;++_){const j=r[_];let R=!1,D=!1;const C=w?_:new Number(_),I=[...n.path,C];if(!e._flags.sparse&&j===void 0){if(c.push(l("array.sparse",{key:C,path:I,pos:_,value:void 0},n.localize(I))),a.abortEarly)return c;y.shift();continue}const L=[r,...n.ancestors];for(const F of e.$_terms._exclusions)if(F.$_match(j,n.localize(I,L,F),a,{presence:"ignore"})){if(c.push(l("array.excludes",{pos:_,value:j},n.localize(I))),a.abortEarly)return c;R=!0,y.shift();break}if(R)continue;if(e.$_terms.ordered.length){if(y.length){const F=y.shift(),q=F.$_validate(j,n.localize(I,L,F),a);if(q.errors){if(c.push(...q.errors),a.abortEarly)return c}else if(F._flags.result==="strip")s.fastSplice(r,_),--_,--h;else{if(!e._flags.sparse&&q.value===void 0){if(c.push(l("array.sparse",{key:C,path:I,pos:_,value:void 0},n.localize(I))),a.abortEarly)return c;continue}r[_]=q.value}continue}if(!e.$_terms.items.length){if(c.push(l("array.orderedLength",{pos:_,limit:e.$_terms.ordered.length})),a.abortEarly)return c;break}}const H=[];let z=m.length;for(let F=0;F<z;++F){const q=n.localize(I,L,m[F]);q.snapshot();const V=m[F].$_validate(j,q,a);if(H[F]=V,!V.errors){if(q.commit(),r[_]=V.value,D=!0,s.fastSplice(m,F),--F,--z,!e._flags.sparse&&V.value===void 0&&(c.push(l("array.sparse",{key:C,path:I,pos:_,value:void 0},n.localize(I))),a.abortEarly))return c;break}q.restore()}if(D)continue;const Z=a.stripUnknown&&!!a.stripUnknown.arrays||!1;z=$.length;for(const F of $){let q;const V=m.indexOf(F);if(V!==-1)q=H[V];else{const Q=n.localize(I,L,F);if(Q.snapshot(),q=F.$_validate(j,Q,a),!q.errors){Q.commit(),F._flags.result==="strip"?(s.fastSplice(r,_),--_,--h):e._flags.sparse||q.value!==void 0?r[_]=q.value:(c.push(l("array.sparse",{key:C,path:I,pos:_,value:void 0},n.localize(I))),R=!0),D=!0;break}Q.restore()}if(z===1){if(Z){s.fastSplice(r,_),--_,--h,D=!0;break}if(c.push(...q.errors),a.abortEarly)return c;R=!0;break}}if(!R&&(e.$_terms._inclusions.length||e.$_terms._requireds.length)&&!D){if(Z){s.fastSplice(r,_),--_,--h;continue}if(c.push(l("array.includes",{pos:_,value:j},n.localize(I))),a.abortEarly)return c}}return m.length&&s.fillMissedErrors(e,c,m,r,n,a),y.length&&(s.fillOrderedErrors(e,c,y,r,n,a),c.length||s.fillDefault(y,r,n,a)),c.length?c:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,e,{limit:l},{name:n,operator:a,args:u})=>t.compare(r.length,l,a)?r:e.error("array."+n,{limit:u.limit,value:r}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(r){return this.$_addRule({name:"max",method:"length",args:{limit:r},operator:"<="})}},min:{method(r){return this.$_addRule({name:"min",method:"length",args:{limit:r},operator:">="})}},ordered:{method(...r){t.verifyFlat(r,"ordered");const e=this.$_addRule("items");for(let l=0;l<r.length;++l){const n=t.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});s.validateSingle(n,e),e.$_mutateRegister(n),e.$_terms.ordered.push(n)}return e.$_mutateRebuild()}},single:{method(r){const e=r===void 0||!!r;return o(!e||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",e)}},sort:{method(r={}){t.assertOptions(r,["by","order"]);const e={order:r.order||"ascending"};return r.by&&(e.by=i.ref(r.by,{ancestor:0}),o(!e.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:e}})},validate(r,{error:e,state:l,prefs:n,schema:a},{options:u}){const{value:m,errors:y}=s.sort(a,r,u,l,n);if(y)return y;for(let $=0;$<r.length;++$)if(r[$]!==m[$])return e("array.sort",{order:u.order,by:u.by?u.by.key:"value"});return r},convert:!0},sparse:{method(r){const e=r===void 0||!!r;return this._flags.sparse===e?this:(e?this.clone():this.$_addRule("items")).$_setFlag("sparse",e,{clone:!1})}},unique:{method(r,e={}){o(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),t.assertOptions(e,["ignoreUndefined","separator"]);const l={name:"unique",args:{options:e,comparator:r}};if(r)if(typeof r=="string"){const n=t.default(e.separator,".");l.path=n?r.split(n):[r]}else l.comparator=r;return this.$_addRule(l)},validate(r,{state:e,error:l,schema:n},{comparator:a,options:u},{comparator:m,path:y}){const $={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),bigint:Object.create(null),object:new Map,function:new Map,custom:new Map},w=m||b,c=u.ignoreUndefined;for(let h=0;h<r.length;++h){const _=y?g(r[h],y):r[h],j=m?$.custom:$[typeof _];if(o(j,"Failed to find unique map container for type",typeof _),j instanceof Map){const R=j.entries();let D;for(;!(D=R.next()).done;)if(w(D.value[0],_)){const C=e.localize([...e.path,h],[r,...e.ancestors]),I={pos:h,value:r[h],dupePos:D.value[1],dupeValue:r[D.value[1]]};return y&&(I.path=a),l("array.unique",I,C)}j.set(_,h)}else{if((!c||_!==void 0)&&j[_]!==void 0){const R={pos:h,value:r[h],dupePos:j[_],dupeValue:r[j[_]]};return y&&(R.path=a),l("array.unique",R,e.localize([...e.path,h],[r,...e.ancestors]))}j[_]=h}}return r},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(r,e)=>new Set(r)}},rebuild(r){r.$_terms._inclusions=[],r.$_terms._exclusions=[],r.$_terms._requireds=[];for(const e of r.$_terms.items)s.validateSingle(e,r),e._flags.presence==="required"?r.$_terms._requireds.push(e):e._flags.presence==="forbidden"?r.$_terms._exclusions.push(e):r.$_terms._inclusions.push(e);for(const e of r.$_terms.ordered)s.validateSingle(e,r)},manifest:{build:(r,e)=>(e.items&&(r=r.items(...e.items)),e.ordered&&(r=r.ordered(...e.ordered)),r)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),s.fillMissedErrors=function(r,e,l,n,a,u){const m=[];let y=0;for(const $ of l){const w=$._flags.label;w?m.push(w):++y}m.length?y?e.push(r.$_createError("array.includesRequiredBoth",n,{knownMisses:m,unknownMisses:y},a,u)):e.push(r.$_createError("array.includesRequiredKnowns",n,{knownMisses:m},a,u)):e.push(r.$_createError("array.includesRequiredUnknowns",n,{unknownMisses:y},a,u))},s.fillOrderedErrors=function(r,e,l,n,a,u){const m=[];for(const y of l)y._flags.presence==="required"&&m.push(y);m.length&&s.fillMissedErrors(r,e,m,n,a,u)},s.fillDefault=function(r,e,l,n){const a=[];let u=!0;for(let m=r.length-1;m>=0;--m){const y=r[m],$=[e,...l.ancestors],w=y.$_validate(void 0,l.localize(l.path,$,y),n).value;if(u){if(w===void 0)continue;u=!1}a.unshift(w)}a.length&&e.push(...a)},s.fastSplice=function(r,e){let l=e;for(;l<r.length;)r[l++]=r[l];--r.length},s.validateSingle=function(r,e){(r.type==="array"||r._flags._arrayItems)&&(o(!e._flags.single,"Cannot specify array item with single rule enabled"),e.$_setFlag("_arrayItems",!0,{clone:!1}))},s.sort=function(r,e,l,n,a){const u=l.order==="ascending"?1:-1,m=-1*u,y=u,$=(w,c)=>{let h=s.compare(w,c,m,y);if(h!==null||(l.by&&(w=l.by.resolve(w,n,a),c=l.by.resolve(c,n,a)),h=s.compare(w,c,m,y),h!==null))return h;const _=typeof w;if(_!==typeof c)throw r.$_createError("array.sort.mismatching",e,null,n,a);if(_!=="number"&&_!=="string")throw r.$_createError("array.sort.unsupported",e,{type:_},n,a);return _==="number"?(w-c)*u:w<c?m:y};try{return{value:e.slice().sort($)}}catch(w){return{errors:w}}},s.compare=function(r,e,l,n){return r===e?0:r===void 0?1:e===void 0?-1:r===null?n:e===null?l:null}},4937:(S,v,p)=>{const o=p(375),b=p(8068),g=p(8160),f=p(2036),t={isBool:function(i){return typeof i=="boolean"}};S.exports=b.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(i,{schema:s}){if(typeof i!="boolean"){if(typeof i=="string"){const r=s._flags.sensitive?i:i.toLowerCase();i=r==="true"||r!=="false"&&i}return typeof i!="boolean"&&(i=s.$_terms.truthy&&s.$_terms.truthy.has(i,null,null,!s._flags.sensitive)||(!s.$_terms.falsy||!s.$_terms.falsy.has(i,null,null,!s._flags.sensitive))&&i),{value:i}}},validate(i,{error:s}){if(typeof i!="boolean")return{value:i,errors:s("boolean.base")}},rules:{truthy:{method(...i){g.verifyFlat(i,"truthy");const s=this.clone();s.$_terms.truthy=s.$_terms.truthy||new f;for(let r=0;r<i.length;++r){const e=i[r];o(e!==void 0,"Cannot call truthy with undefined"),s.$_terms.truthy.add(e)}return s}},falsy:{method(...i){g.verifyFlat(i,"falsy");const s=this.clone();s.$_terms.falsy=s.$_terms.falsy||new f;for(let r=0;r<i.length;++r){const e=i[r];o(e!==void 0,"Cannot call falsy with undefined"),s.$_terms.falsy.add(e)}return s}},sensitive:{method(i=!0){return this.$_setFlag("sensitive",i)}}},cast:{number:{from:t.isBool,to:(i,s)=>i?1:0},string:{from:t.isBool,to:(i,s)=>i?"true":"false"}},manifest:{build:(i,s)=>(s.truthy&&(i=i.truthy(...s.truthy)),s.falsy&&(i=i.falsy(...s.falsy)),i)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(S,v,p)=>{const o=p(375),b=p(8068),g=p(8160),f=p(3328),t={isDate:function(i){return i instanceof Date}};S.exports=b.extend({type:"date",coerce:{from:["number","string"],method:(i,{schema:s})=>({value:t.parse(i,s._flags.format)||i})},validate(i,{schema:s,error:r,prefs:e}){if(i instanceof Date&&!isNaN(i.getTime()))return;const l=s._flags.format;return e.convert&&l&&typeof i=="string"?{value:i,errors:r("date.format",{format:l})}:{value:i,errors:r("date.base")}},rules:{compare:{method:!1,validate(i,s,{date:r},{name:e,operator:l,args:n}){const a=r==="now"?Date.now():r.getTime();return g.compare(i.getTime(),a,l)?i:s.error("date."+e,{limit:n.date,value:i})},args:[{name:"date",ref:!0,normalize:i=>i==="now"?i:t.parse(i),assert:i=>i!==null,message:"must have a valid date format"}]},format:{method(i){return o(["iso","javascript","unix"].includes(i),"Unknown date format",i),this.$_setFlag("format",i)}},greater:{method(i){return this.$_addRule({name:"greater",method:"compare",args:{date:i},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(i){return this.$_addRule({name:"less",method:"compare",args:{date:i},operator:"<"})}},max:{method(i){return this.$_addRule({name:"max",method:"compare",args:{date:i},operator:"<="})}},min:{method(i){return this.$_addRule({name:"min",method:"compare",args:{date:i},operator:">="})}},timestamp:{method(i="javascript"){return o(["javascript","unix"].includes(i),'"type" must be one of "javascript, unix"'),this.format(i)}}},cast:{number:{from:t.isDate,to:(i,s)=>i.getTime()},string:{from:t.isDate,to:(i,{prefs:s})=>f.date(i,s)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),t.parse=function(i,s){if(i instanceof Date)return i;if(typeof i!="string"&&(isNaN(i)||!isFinite(i))||/^\s*$/.test(i))return null;if(s==="iso")return g.isIsoDate(i)?t.date(i.toString()):null;const r=i;if(typeof i=="string"&&/^[+-]?\d+(\.\d+)?$/.test(i)&&(i=parseFloat(i)),s){if(s==="javascript")return t.date(1*i);if(s==="unix")return t.date(1e3*i);if(typeof r=="string")return null}return t.date(i)},t.date=function(i){const s=new Date(i);return isNaN(s.getTime())?null:s}},390:(S,v,p)=>{const o=p(375),b=p(7824);S.exports=b.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(g){return o(Number.isSafeInteger(g)&&g>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:g}})},validate:(g,f,{n:t})=>g.length===t?g:f.error("function.arity",{n:t})},class:{method(){return this.$_addRule("class")},validate:(g,f)=>/^\s*class\s/.test(g.toString())?g:f.error("function.class",{value:g})},minArity:{method(g){return o(Number.isSafeInteger(g)&&g>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:g}})},validate:(g,f,{n:t})=>g.length>=t?g:f.error("function.minArity",{n:t})},maxArity:{method(g){return o(Number.isSafeInteger(g)&&g>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:g}})},validate:(g,f,{n:t})=>g.length<=t?g:f.error("function.maxArity",{n:t})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(S,v,p)=>{const o=p(978),b=p(375),g=p(8571),f=p(3652),t=p(8068),i=p(8160),s=p(3292),r=p(6354),e=p(6133),l=p(3328),n={renameDefaults:{alias:!1,multiple:!1,override:!1}};S.exports=t.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:void 0}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(a,u)=>a.keys(u),validate(a,{schema:u,error:m,state:y,prefs:$}){if(!a||typeof a!==u.$_property("typeof")||Array.isArray(a))return{value:a,errors:m("object.base",{type:u.$_property("typeof")})};if(!(u.$_terms.renames||u.$_terms.dependencies||u.$_terms.keys||u.$_terms.patterns||u.$_terms.externals))return;a=n.clone(a,$);const w=[];if(u.$_terms.renames&&!n.rename(u,a,y,$,w))return{value:a,errors:w};if(!u.$_terms.keys&&!u.$_terms.patterns&&!u.$_terms.dependencies)return{value:a,errors:w};const c=new Set(Object.keys(a));if(u.$_terms.keys){const h=[a,...y.ancestors];for(const _ of u.$_terms.keys){const j=_.key,R=a[j];c.delete(j);const D=y.localize([...y.path,j],h,_),C=_.schema.$_validate(R,D,$);if(C.errors){if($.abortEarly)return{value:a,errors:C.errors};C.value!==void 0&&(a[j]=C.value),w.push(...C.errors)}else _.schema._flags.result==="strip"||C.value===void 0&&R!==void 0?delete a[j]:C.value!==void 0&&(a[j]=C.value)}}if(c.size||u._flags._hasPatternMatch){const h=n.unknown(u,a,c,w,y,$);if(h)return h}if(u.$_terms.dependencies)for(const h of u.$_terms.dependencies){if(h.key!==null&&n.isPresent(h.options)(h.key.resolve(a,y,$,null,{shadow:!1}))===!1)continue;const _=n.dependencies[h.rel](u,h,a,y,$);if(_){const j=u.$_createError(_.code,a,_.context,y,$);if($.abortEarly)return{value:a,errors:j};w.push(j)}}return{value:a,errors:w}},rules:{and:{method(...a){return i.verifyFlat(a,"and"),n.dependency(this,"and",null,a)}},append:{method(a){return a==null||Object.keys(a).length===0?this:this.keys(a)}},assert:{method(a,u,m){l.isTemplate(a)||(a=s.ref(a)),b(m===void 0||typeof m=="string","Message must be a string"),u=this.$_compile(u,{appendPath:!0});const y=this.$_addRule({name:"assert",args:{subject:a,schema:u,message:m}});return y.$_mutateRegister(a),y.$_mutateRegister(u),y},validate(a,{error:u,prefs:m,state:y},{subject:$,schema:w,message:c}){const h=$.resolve(a,y,m),_=e.isRef($)?$.absolute(y):[];return w.$_match(h,y.localize(_,[a,...y.ancestors],w),m)?a:u("object.assert",{subject:$,message:c})},args:["subject","schema","message"],multi:!0},instance:{method(a,u){return b(typeof a=="function","constructor must be a function"),u=u||a.name,this.$_addRule({name:"instance",args:{constructor:a,name:u}})},validate:(a,u,{constructor:m,name:y})=>a instanceof m?a:u.error("object.instance",{type:y,value:a}),args:["constructor","name"]},keys:{method(a){b(a===void 0||typeof a=="object","Object schema must be a valid object"),b(!i.isSchema(a),"Object schema cannot be a joi schema");const u=this.clone();if(a)if(Object.keys(a).length){u.$_terms.keys=u.$_terms.keys?u.$_terms.keys.filter(m=>!a.hasOwnProperty(m.key)):new n.Keys;for(const m in a)i.tryWithPath(()=>u.$_terms.keys.push({key:m,schema:this.$_compile(a[m])}),m)}else u.$_terms.keys=new n.Keys;else u.$_terms.keys=null;return u.$_mutateRebuild()}},length:{method(a){return this.$_addRule({name:"length",args:{limit:a},operator:"="})},validate:(a,u,{limit:m},{name:y,operator:$,args:w})=>i.compare(Object.keys(a).length,m,$)?a:u.error("object."+y,{limit:w.limit,value:a}),args:[{name:"limit",ref:!0,assert:i.limit,message:"must be a positive integer"}]},max:{method(a){return this.$_addRule({name:"max",method:"length",args:{limit:a},operator:"<="})}},min:{method(a){return this.$_addRule({name:"min",method:"length",args:{limit:a},operator:">="})}},nand:{method(...a){return i.verifyFlat(a,"nand"),n.dependency(this,"nand",null,a)}},or:{method(...a){return i.verifyFlat(a,"or"),n.dependency(this,"or",null,a)}},oxor:{method(...a){return n.dependency(this,"oxor",null,a)}},pattern:{method(a,u,m={}){const y=a instanceof RegExp;y||(a=this.$_compile(a,{appendPath:!0})),b(u!==void 0,"Invalid rule"),i.assertOptions(m,["fallthrough","matches"]),y&&b(!a.flags.includes("g")&&!a.flags.includes("y"),"pattern should not use global or sticky mode"),u=this.$_compile(u,{appendPath:!0});const $=this.clone();$.$_terms.patterns=$.$_terms.patterns||[];const w={[y?"regex":"schema"]:a,rule:u};return m.matches&&(w.matches=this.$_compile(m.matches),w.matches.type!=="array"&&(w.matches=w.matches.$_root.array().items(w.matches)),$.$_mutateRegister(w.matches),$.$_setFlag("_hasPatternMatch",!0,{clone:!1})),m.fallthrough&&(w.fallthrough=!0),$.$_terms.patterns.push(w),$.$_mutateRegister(u),$}},ref:{method(){return this.$_addRule("ref")},validate:(a,u)=>e.isRef(a)?a:u.error("object.refType",{value:a})},regex:{method(){return this.$_addRule("regex")},validate:(a,u)=>a instanceof RegExp?a:u.error("object.regex",{value:a})},rename:{method(a,u,m={}){b(typeof a=="string"||a instanceof RegExp,"Rename missing the from argument"),b(typeof u=="string"||u instanceof l,"Invalid rename to argument"),b(u!==a,"Cannot rename key to same name:",a),i.assertOptions(m,["alias","ignoreUndefined","override","multiple"]);const y=this.clone();y.$_terms.renames=y.$_terms.renames||[];for(const $ of y.$_terms.renames)b($.from!==a,"Cannot rename the same key multiple times");return u instanceof l&&y.$_mutateRegister(u),y.$_terms.renames.push({from:a,to:u,options:o(n.renameDefaults,m)}),y}},schema:{method(a="any"){return this.$_addRule({name:"schema",args:{type:a}})},validate:(a,u,{type:m})=>!i.isSchema(a)||m!=="any"&&a.type!==m?u.error("object.schema",{type:m}):a},unknown:{method(a){return this.$_setFlag("unknown",a!==!1)}},with:{method(a,u,m={}){return n.dependency(this,"with",a,u,m)}},without:{method(a,u,m={}){return n.dependency(this,"without",a,u,m)}},xor:{method(...a){return i.verifyFlat(a,"xor"),n.dependency(this,"xor",null,a)}}},overrides:{default(a,u){return a===void 0&&(a=i.symbols.deepDefault),this.$_parent("default",a,u)}},rebuild(a){if(a.$_terms.keys){const u=new f.Sorter;for(const m of a.$_terms.keys)i.tryWithPath(()=>u.add(m,{after:m.schema.$_rootReferences(),group:m.key}),m.key);a.$_terms.keys=new n.Keys(...u.nodes)}},manifest:{build(a,u){if(u.keys&&(a=a.keys(u.keys)),u.dependencies)for(const{rel:m,key:y=null,peers:$,options:w}of u.dependencies)a=n.dependency(a,m,y,$,w);if(u.patterns)for(const{regex:m,schema:y,rule:$,fallthrough:w,matches:c}of u.patterns)a=a.pattern(m||y,$,{fallthrough:w,matches:c});if(u.renames)for(const{from:m,to:y,options:$}of u.renames)a=a.rename(m,y,$);return a}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),n.clone=function(a,u){if(typeof a=="object"){if(u.nonEnumerables)return g(a,{shallow:!0});const y=Object.create(Object.getPrototypeOf(a));return Object.assign(y,a),y}const m=function(...y){return a.apply(this,y)};return m.prototype=g(a.prototype),Object.defineProperty(m,"name",{value:a.name,writable:!1}),Object.defineProperty(m,"length",{value:a.length,writable:!1}),Object.assign(m,a),m},n.dependency=function(a,u,m,y,$){b(m===null||typeof m=="string",u,"key must be a strings"),$||($=y.length>1&&typeof y[y.length-1]=="object"?y.pop():{}),i.assertOptions($,["separator","isPresent"]),y=[].concat(y);const w=i.default($.separator,"."),c=[];for(const _ of y)b(typeof _=="string",u,"peers must be strings"),c.push(s.ref(_,{separator:w,ancestor:0,prefix:!1}));m!==null&&(m=s.ref(m,{separator:w,ancestor:0,prefix:!1}));const h=a.clone();return h.$_terms.dependencies=h.$_terms.dependencies||[],h.$_terms.dependencies.push(new n.Dependency(u,m,c,y,$)),h},n.dependencies={and(a,u,m,y,$){const w=[],c=[],h=u.peers.length,_=n.isPresent(u.options);for(const j of u.peers)_(j.resolve(m,y,$,null,{shadow:!1}))===!1?w.push(j.key):c.push(j.key);if(w.length!==h&&c.length!==h)return{code:"object.and",context:{present:c,presentWithLabels:n.keysToLabels(a,c),missing:w,missingWithLabels:n.keysToLabels(a,w)}}},nand(a,u,m,y,$){const w=[],c=n.isPresent(u.options);for(const j of u.peers)c(j.resolve(m,y,$,null,{shadow:!1}))&&w.push(j.key);if(w.length!==u.peers.length)return;const h=u.paths[0],_=u.paths.slice(1);return{code:"object.nand",context:{main:h,mainWithLabel:n.keysToLabels(a,h),peers:_,peersWithLabels:n.keysToLabels(a,_)}}},or(a,u,m,y,$){const w=n.isPresent(u.options);for(const c of u.peers)if(w(c.resolve(m,y,$,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:u.paths,peersWithLabels:n.keysToLabels(a,u.paths)}}},oxor(a,u,m,y,$){const w=[],c=n.isPresent(u.options);for(const _ of u.peers)c(_.resolve(m,y,$,null,{shadow:!1}))&&w.push(_.key);if(!w.length||w.length===1)return;const h={peers:u.paths,peersWithLabels:n.keysToLabels(a,u.paths)};return h.present=w,h.presentWithLabels=n.keysToLabels(a,w),{code:"object.oxor",context:h}},with(a,u,m,y,$){const w=n.isPresent(u.options);for(const c of u.peers)if(w(c.resolve(m,y,$,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:u.key.key,mainWithLabel:n.keysToLabels(a,u.key.key),peer:c.key,peerWithLabel:n.keysToLabels(a,c.key)}}},without(a,u,m,y,$){const w=n.isPresent(u.options);for(const c of u.peers)if(w(c.resolve(m,y,$,null,{shadow:!1})))return{code:"object.without",context:{main:u.key.key,mainWithLabel:n.keysToLabels(a,u.key.key),peer:c.key,peerWithLabel:n.keysToLabels(a,c.key)}}},xor(a,u,m,y,$){const w=[],c=n.isPresent(u.options);for(const _ of u.peers)c(_.resolve(m,y,$,null,{shadow:!1}))&&w.push(_.key);if(w.length===1)return;const h={peers:u.paths,peersWithLabels:n.keysToLabels(a,u.paths)};return w.length===0?{code:"object.missing",context:h}:(h.present=w,h.presentWithLabels=n.keysToLabels(a,w),{code:"object.xor",context:h})}},n.keysToLabels=function(a,u){return Array.isArray(u)?u.map(m=>a.$_mapLabels(m)):a.$_mapLabels(u)},n.isPresent=function(a){return typeof a.isPresent=="function"?a.isPresent:u=>u!==void 0},n.rename=function(a,u,m,y,$){const w={};for(const c of a.$_terms.renames){const h=[],_=typeof c.from!="string";if(_)for(const j in u){if(u[j]===void 0&&c.options.ignoreUndefined||j===c.to)continue;const R=c.from.exec(j);R&&h.push({from:j,to:c.to,match:R})}else!Object.prototype.hasOwnProperty.call(u,c.from)||u[c.from]===void 0&&c.options.ignoreUndefined||h.push(c);for(const j of h){const R=j.from;let D=j.to;if(D instanceof l&&(D=D.render(u,m,y,j.match)),R!==D){if(!c.options.multiple&&w[D]&&($.push(a.$_createError("object.rename.multiple",u,{from:R,to:D,pattern:_},m,y)),y.abortEarly)||Object.prototype.hasOwnProperty.call(u,D)&&!c.options.override&&!w[D]&&($.push(a.$_createError("object.rename.override",u,{from:R,to:D,pattern:_},m,y)),y.abortEarly))return!1;u[R]===void 0?delete u[D]:u[D]=u[R],w[D]=!0,c.options.alias||delete u[R]}}}return!0},n.unknown=function(a,u,m,y,$,w){if(a.$_terms.patterns){let c=!1;const h=a.$_terms.patterns.map(j=>{if(j.matches)return c=!0,[]}),_=[u,...$.ancestors];for(const j of m){const R=u[j],D=[...$.path,j];for(let C=0;C<a.$_terms.patterns.length;++C){const I=a.$_terms.patterns[C];if(I.regex){const z=I.regex.test(j);if($.mainstay.tracer.debug($,"rule",`pattern.${C}`,z?"pass":"error"),!z)continue}else if(!I.schema.$_match(j,$.nest(I.schema,`pattern.${C}`),w))continue;m.delete(j);const L=$.localize(D,_,{schema:I.rule,key:j}),H=I.rule.$_validate(R,L,w);if(H.errors){if(w.abortEarly)return{value:u,errors:H.errors};y.push(...H.errors)}if(I.matches&&h[C].push(j),u[j]=H.value,!I.fallthrough)break}}if(c)for(let j=0;j<h.length;++j){const R=h[j];if(!R)continue;const D=a.$_terms.patterns[j].matches,C=$.localize($.path,_,D),I=D.$_validate(R,C,w);if(I.errors){const L=r.details(I.errors,{override:!1});L.matches=R;const H=a.$_createError("object.pattern.match",u,L,$,w);if(w.abortEarly)return{value:u,errors:H};y.push(H)}}}if(m.size&&(a.$_terms.keys||a.$_terms.patterns)){if(w.stripUnknown&&a._flags.unknown===void 0||w.skipFunctions){const c=!(!w.stripUnknown||w.stripUnknown!==!0&&!w.stripUnknown.objects);for(const h of m)c?(delete u[h],m.delete(h)):typeof u[h]=="function"&&m.delete(h)}if(!i.default(a._flags.unknown,w.allowUnknown))for(const c of m){const h=$.localize([...$.path,c],[]),_=a.$_createError("object.unknown",u[c],{child:c},h,w,{flags:!1});if(w.abortEarly)return{value:u,errors:_};y.push(_)}}},n.Dependency=class{constructor(a,u,m,y,$){this.rel=a,this.key=u,this.peers=m,this.paths=y,this.options=$}describe(){const a={rel:this.rel,peers:this.paths};return this.key!==null&&(a.key=this.key.key),this.peers[0].separator!=="."&&(a.options={...a.options,separator:this.peers[0].separator}),this.options.isPresent&&(a.options={...a.options,isPresent:this.options.isPresent}),a}},n.Keys=class extends Array{concat(a){const u=this.slice(),m=new Map;for(let y=0;y<u.length;++y)m.set(u[y].key,y);for(const y of a){const $=y.key,w=m.get($);w!==void 0?u[w]={key:$,schema:u[w].schema.concat(y.schema)}:u.push(y)}return u}}},8785:(S,v,p)=>{const o=p(375),b=p(8068),g=p(8160),f=p(3292),t=p(6354),i={};S.exports=b.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(s,r)=>s.ref(r),validate(s,{schema:r,state:e,prefs:l}){o(r.$_terms.link,"Uninitialized link schema");const n=i.generate(r,s,e,l),a=r.$_terms.link[0].ref;return n.$_validate(s,e.nest(n,`link:${a.display}:${n.type}`),l)},generate:(s,r,e,l)=>i.generate(s,r,e,l),rules:{ref:{method(s){o(!this.$_terms.link,"Cannot reinitialize schema"),s=f.ref(s),o(s.type==="value"||s.type==="local","Invalid reference type:",s.type),o(s.type==="local"||s.ancestor==="root"||s.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:s}],r}},relative:{method(s=!0){return this.$_setFlag("relative",s)}}},overrides:{concat(s){o(this.$_terms.link,"Uninitialized link schema"),o(g.isSchema(s),"Invalid schema object"),o(s.type!=="link","Cannot merge type link with another link");const r=this.clone();return r.$_terms.whens||(r.$_terms.whens=[]),r.$_terms.whens.push({concat:s}),r.$_mutateRebuild()}},manifest:{build:(s,r)=>(o(r.link,"Invalid link description missing link"),s.ref(r.link))}}),i.generate=function(s,r,e,l){let n=e.mainstay.links.get(s);if(n)return n._generate(r,e,l).schema;const a=s.$_terms.link[0].ref,{perspective:u,path:m}=i.perspective(a,e);i.assert(u,"which is outside of schema boundaries",a,s,e,l);try{n=m.length?u.$_reach(m):u}catch{i.assert(!1,"to non-existing schema",a,s,e,l)}return i.assert(n.type!=="link","which is another link",a,s,e,l),s._flags.relative||e.mainstay.links.set(s,n),n._generate(r,e,l).schema},i.perspective=function(s,r){if(s.type==="local"){for(const{schema:e,key:l}of r.schemas){if((e._flags.id||l)===s.path[0])return{perspective:e,path:s.path.slice(1)};if(e.$_terms.shared){for(const n of e.$_terms.shared)if(n._flags.id===s.path[0])return{perspective:n,path:s.path.slice(1)}}}return{perspective:null,path:null}}return s.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:s.path}:{perspective:r.schemas[s.ancestor]&&r.schemas[s.ancestor].schema,path:s.path}},i.assert=function(s,r,e,l,n,a){s||o(!1,`"${t.label(l._flags,n,a)}" contains link reference "${e.display}" ${r}`)}},3832:(S,v,p)=>{const o=p(375),b=p(8068),g=p(8160),f={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(t){const i=t.toString(),s=i.indexOf("."),r=i.indexOf("e");return(s<0?0:(r<0?i.length:r)-s-1)+(r<0?0:Math.max(0,-parseInt(i.slice(r+1))))}};S.exports=b.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:i,error:s}){if(!t.match(f.numberRx))return;t=t.trim();const r={value:parseFloat(t)};if(r.value===0&&(r.value=0),!i._flags.unsafe)if(t.match(/e/i)){if(f.extractSignificantDigits(t)!==f.extractSignificantDigits(String(r.value)))return r.errors=s("number.unsafe"),r}else{const e=r.value.toString();if(e.match(/e/i))return r;if(e!==f.normalizeDecimal(t))return r.errors=s("number.unsafe"),r}return r}},validate(t,{schema:i,error:s,prefs:r}){if(t===1/0||t===-1/0)return{value:t,errors:s("number.infinity")};if(!g.isNumber(t))return{value:t,errors:s("number.base")};const e={value:t};if(r.convert){const l=i.$_getRule("precision");if(l){const n=Math.pow(10,l.args.limit);e.value=Math.round(e.value*n)/n}}return e.value===0&&(e.value=0),!i._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(e.errors=s("number.unsafe")),e},rules:{compare:{method:!1,validate:(t,i,{limit:s},{name:r,operator:e,args:l})=>g.compare(t,s,e)?t:i.error("number."+r,{limit:l.limit,value:t}),args:[{name:"limit",ref:!0,assert:g.isNumber,message:"must be a number"}]},greater:{method(t){return this.$_addRule({name:"greater",method:"compare",args:{limit:t},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(t,i)=>Math.trunc(t)-t==0?t:i.error("number.integer")},less:{method(t){return this.$_addRule({name:"less",method:"compare",args:{limit:t},operator:"<"})}},max:{method(t){return this.$_addRule({name:"max",method:"compare",args:{limit:t},operator:"<="})}},min:{method(t){return this.$_addRule({name:"min",method:"compare",args:{limit:t},operator:">="})}},multiple:{method(t){const i=typeof t=="number"?f.decimalPlaces(t):null,s=Math.pow(10,i);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:i,pfactor:s}})},validate:(t,i,{base:s,baseDecimalPlace:r,pfactor:e},l)=>f.decimalPlaces(t)>r?i.error("number.multiple",{multiple:l.args.base,value:t}):Math.round(e*t)%Math.round(e*s)==0?t:i.error("number.multiple",{multiple:l.args.base,value:t}),args:[{name:"base",ref:!0,assert:t=>typeof t=="number"&&isFinite(t)&&t>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(t,i)=>Number.isSafeInteger(t)&&t>=0&&t<=65535?t:i.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(t){return o(Number.isSafeInteger(t),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:t}})},validate(t,i,{limit:s}){const r=t.toString().match(f.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=s?t:i.error("number.precision",{limit:s,value:t})},convert:!0},sign:{method(t){return o(["negative","positive"].includes(t),"Invalid sign",t),this.$_addRule({name:"sign",args:{sign:t}})},validate:(t,i,{sign:s})=>s==="negative"&&t<0||s==="positive"&&t>0?t:i.error(`number.${s}`)},unsafe:{method(t=!0){return o(typeof t=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",t)}}},cast:{string:{from:t=>typeof t=="number",to:(t,i)=>t.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),f.extractSignificantDigits=function(t){return t.replace(f.exponentialPartRegex,"").replace(f.dotRegex,"").replace(f.trailingZerosRegex,"").replace(f.leadingSignAndZerosRegex,"")},f.normalizeDecimal=function(t){return(t=t.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&t.endsWith("0")&&(t=t.replace(/0+$/,"")),t==="-0"?"0":t}},8966:(S,v,p)=>{const o=p(7824);S.exports=o.extend({type:"object",cast:{map:{from:b=>b&&typeof b=="object",to:(b,g)=>new Map(Object.entries(b))}}})},7417:(S,v,p)=>{const o=p(375),b=p(5380),g=p(1745),f=p(9959),t=p(6064),i=p(9926),s=p(5752),r=p(8068),e=p(8160),l={tlds:i instanceof Set&&{tlds:{allow:i,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:f.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};S.exports=r.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(n,{schema:a,state:u,prefs:m}){const y=a.$_getRule("normalize");y&&(n=n.normalize(y.args.form));const $=a.$_getRule("case");$&&(n=$.args.direction==="upper"?n.toLocaleUpperCase():n.toLocaleLowerCase());const w=a.$_getRule("trim");if(w&&w.args.enabled&&(n=n.trim()),a.$_terms.replacements)for(const h of a.$_terms.replacements)n=n.replace(h.pattern,h.replacement);const c=a.$_getRule("hex");if(c&&c.args.options.byteAligned&&n.length%2!=0&&(n=`0${n}`),a.$_getRule("isoDate")){const h=l.isoDate(n);h&&(n=h)}if(a._flags.truncate){const h=a.$_getRule("max");if(h){let _=h.args.limit;if(e.isResolvable(_)&&(_=_.resolve(n,u,m),!e.limit(_)))return{value:n,errors:a.$_createError("any.ref",_,{ref:h.args.limit,arg:"limit",reason:"must be a positive integer"},u,m)};n=n.slice(0,_)}}return{value:n}}},validate(n,{schema:a,error:u}){if(typeof n!="string")return{value:n,errors:u("string.base")};if(n===""){const m=a.$_getRule("min");return m&&m.args.limit===0?void 0:{value:n,errors:u("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(n,a)=>/^[a-zA-Z0-9]+$/.test(n)?n:a.error("string.alphanum")},base64:{method(n={}){return e.assertOptions(n,["paddingRequired","urlSafe"]),n={urlSafe:!1,paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),o(typeof n.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:n}})},validate:(n,a,{options:u})=>l.base64Regex[u.paddingRequired][u.urlSafe].test(n)?n:a.error("string.base64")},case:{method(n){return o(["lower","upper"].includes(n),"Invalid case:",n),this.$_addRule({name:"case",args:{direction:n}})},validate:(n,a,{direction:u})=>u==="lower"&&n===n.toLocaleLowerCase()||u==="upper"&&n===n.toLocaleUpperCase()?n:a.error(`string.${u}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(n,a){let u=n.length,m=0,y=1;for(;u--;){const $=n.charAt(u)*y;m+=$-9*($>9),y^=3}return m>0&&m%10==0?n:a.error("string.creditCard")}},dataUri:{method(n={}){return e.assertOptions(n,["paddingRequired"]),n={paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:n}})},validate(n,a,{options:u}){const m=n.match(l.dataUriRegex);return m&&(!m[2]||m[2]!=="base64"||l.base64Regex[u.paddingRequired].false.test(m[3]))?n:a.error("string.dataUri")}},domain:{method(n){n&&e.assertOptions(n,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const a=l.addressOptions(n);return this.$_addRule({name:"domain",args:{options:n},address:a})},validate:(n,a,u,{address:m})=>b.isValid(n,m)?n:a.error("string.domain")},email:{method(n={}){e.assertOptions(n,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),o(n.multiple===void 0||typeof n.multiple=="boolean","multiple option must be an boolean");const a=l.addressOptions(n),u=new RegExp(`\\s*[${n.separator?t(n.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:n},regex:u,address:a})},validate(n,a,{options:u},{regex:m,address:y}){const $=u.multiple?n.split(m):[n],w=[];for(const c of $)g.isValid(c,y)||w.push(c);return w.length?a.error("string.email",{value:n,invalids:w}):n}},guid:{alias:"uuid",method(n={}){e.assertOptions(n,["version","separator"]);let a="";if(n.version){const y=[].concat(n.version);o(y.length>=1,"version must have at least 1 valid version specified");const $=new Set;for(let w=0;w<y.length;++w){const c=y[w];o(typeof c=="string","version at position "+w+" must be a string");const h=l.guidVersions[c.toLowerCase()];o(h,"version at position "+w+" must be one of "+Object.keys(l.guidVersions).join(", ")),o(!$.has(h),"version at position "+w+" must not be a duplicate"),a+=h,$.add(h)}}o(l.guidSeparators.has(n.separator),'separator must be one of true, false, "-", or ":"');const u=n.separator===void 0?"[:-]?":n.separator===!0?"[:-]":n.separator===!1?"[]?":`\\${n.separator}`,m=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${u})[0-9A-F]{4}\\2?[${a||"0-9A-F"}][0-9A-F]{3}\\2?[${a?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:n},regex:m})},validate(n,a,u,{regex:m}){const y=m.exec(n);return y?l.guidBrackets[y[1]]!==y[y.length-1]?a.error("string.guid"):n:a.error("string.guid")}},hex:{method(n={}){return e.assertOptions(n,["byteAligned","prefix"]),n={byteAligned:!1,prefix:!1,...n},o(typeof n.byteAligned=="boolean","byteAligned must be boolean"),o(typeof n.prefix=="boolean"||n.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:n}})},validate:(n,a,{options:u})=>(u.prefix==="optional"?l.hexRegex.withOptionalPrefix:u.prefix===!0?l.hexRegex.withPrefix:l.hexRegex.withoutPrefix).test(n)?u.byteAligned&&n.length%2!=0?a.error("string.hexAlign"):n:a.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(n,a)=>b.isValid(n,{minDomainSegments:1})||l.ipRegex.test(n)?n:a.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(n={}){e.assertOptions(n,["cidr","version"]);const{cidr:a,versions:u,regex:m}=f.regex(n),y=n.version?u:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:a,version:y}},regex:m})},validate:(n,a,{options:u},{regex:m})=>m.test(n)?n:u.version?a.error("string.ipVersion",{value:n,cidr:u.cidr,version:u.version}):a.error("string.ip",{value:n,cidr:u.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(n,{error:a})=>l.isoDate(n)?n:a("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(n,a)=>l.isoDurationRegex.test(n)?n:a.error("string.isoDuration")},length:{method(n,a){return l.length(this,"length",n,"=",a)},validate(n,a,{limit:u,encoding:m},{name:y,operator:$,args:w}){const c=!m&&n.length;return e.compare(c,u,$)?n:a.error("string."+y,{limit:w.limit,value:n,encoding:m})},args:[{name:"limit",ref:!0,assert:e.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(n,a){return l.length(this,"max",n,"<=",a)},args:["limit","encoding"]},min:{method(n,a){return l.length(this,"min",n,">=",a)},args:["limit","encoding"]},normalize:{method(n="NFC"){return o(l.normalizationForms.includes(n),"normalization form must be one of "+l.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:n}})},validate:(n,{error:a},{form:u})=>n===n.normalize(u)?n:a("string.normalize",{value:n,form:u}),convert:!0},pattern:{alias:"regex",method(n,a={}){o(n instanceof RegExp,"regex must be a RegExp"),o(!n.flags.includes("g")&&!n.flags.includes("y"),"regex should not use global or sticky mode"),typeof a=="string"&&(a={name:a}),e.assertOptions(a,["invert","name"]);const u=["string.pattern",a.invert?".invert":"",a.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:n,options:a},errorCode:u})},validate:(n,a,{regex:u,options:m},{errorCode:y})=>u.test(n)^m.invert?n:a.error(y,{name:m.name,regex:u,value:n}),args:["regex","options"],multi:!0},replace:{method(n,a){typeof n=="string"&&(n=new RegExp(t(n),"g")),o(n instanceof RegExp,"pattern must be a RegExp"),o(typeof a=="string","replacement must be a String");const u=this.clone();return u.$_terms.replacements||(u.$_terms.replacements=[]),u.$_terms.replacements.push({pattern:n,replacement:a}),u}},token:{method(){return this.$_addRule("token")},validate:(n,a)=>/^\w+$/.test(n)?n:a.error("string.token")},trim:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:n}})},validate:(n,a,{enabled:u})=>u&&n!==n.trim()?a.error("string.trim"):n,convert:!0},truncate:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",n)}},uppercase:{method(){return this.case("upper")}},uri:{method(n={}){e.assertOptions(n,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),n.domain&&e.assertOptions(n.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:a,scheme:u}=s.regex(n),m=n.domain?l.addressOptions(n.domain):null;return this.$_addRule({name:"uri",args:{options:n},regex:a,domain:m,scheme:u})},validate(n,a,{options:u},{regex:m,domain:y,scheme:$}){if(["http:/","https:/"].includes(n))return a.error("string.uri");let w=m.exec(n);if(!w&&a.prefs.convert&&u.encodeUri){const c=encodeURI(n);w=m.exec(c),w&&(n=c)}if(w){const c=w[1]||w[2];return!y||u.allowRelative&&!c||b.isValid(c,y)?n:a.error("string.domain",{value:c})}return u.relativeOnly?a.error("string.uriRelativeOnly"):u.scheme?a.error("string.uriCustomScheme",{scheme:$,value:n}):a.error("string.uri")}}},manifest:{build(n,a){if(a.replacements)for(const{pattern:u,replacement:m}of a.replacements)n=n.replace(u,m);return n}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),l.addressOptions=function(n){if(!n)return l.tlds||n;if(o(n.minDomainSegments===void 0||Number.isSafeInteger(n.minDomainSegments)&&n.minDomainSegments>0,"minDomainSegments must be a positive integer"),o(n.maxDomainSegments===void 0||Number.isSafeInteger(n.maxDomainSegments)&&n.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),n.tlds===!1)return n;if(n.tlds===!0||n.tlds===void 0)return o(l.tlds,"Built-in TLD list disabled"),Object.assign({},n,l.tlds);o(typeof n.tlds=="object","tlds must be true, false, or an object");const a=n.tlds.deny;if(a)return Array.isArray(a)&&(n=Object.assign({},n,{tlds:{deny:new Set(a)}})),o(n.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),o(!n.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),l.validateTlds(n.tlds.deny,"tlds.deny"),n;const u=n.tlds.allow;return u?u===!0?(o(l.tlds,"Built-in TLD list disabled"),Object.assign({},n,l.tlds)):(Array.isArray(u)&&(n=Object.assign({},n,{tlds:{allow:new Set(u)}})),o(n.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),l.validateTlds(n.tlds.allow,"tlds.allow"),n):n},l.validateTlds=function(n,a){for(const u of n)o(b.isValid(u,{minDomainSegments:1,maxDomainSegments:1}),`${a} must contain valid top level domain names`)},l.isoDate=function(n){if(!e.isIsoDate(n))return null;/.*T.*[+-]\d\d$/.test(n)&&(n+="00");const a=new Date(n);return isNaN(a.getTime())?null:a.toISOString()},l.length=function(n,a,u,m,y){return o(!y||!1,"Invalid encoding:",y),n.$_addRule({name:a,method:"length",args:{limit:u,encoding:y},operator:m})}},8826:(S,v,p)=>{const o=p(375),b=p(8068),g={};g.Map=class extends Map{slice(){return new g.Map(this)}},S.exports=b.extend({type:"symbol",terms:{map:{init:new g.Map}},coerce:{method(f,{schema:t,error:i}){const s=t.$_terms.map.get(f);return s&&(f=s),t._flags.only&&typeof f!="symbol"?{value:f,errors:i("symbol.map",{map:t.$_terms.map})}:{value:f}}},validate(f,{error:t}){if(typeof f!="symbol")return{value:f,errors:t("symbol.base")}},rules:{map:{method(f){f&&!f[Symbol.iterator]&&typeof f=="object"&&(f=Object.entries(f)),o(f&&f[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),i=[];for(const s of f){o(s&&s[Symbol.iterator],"Entry must be an iterable");const[r,e]=s;o(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),o(typeof e=="symbol","Value must be a Symbol"),t.$_terms.map.set(r,e),i.push(e)}return t.valid(...i)}}},manifest:{build:(f,t)=>(t.map&&(f=f.map(t.map)),f)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(S,v,p)=>{const o=p(375),b=p(8571),g=p(738),f=p(9621),t=p(8160),i=p(6354),s=p(493),r={result:Symbol("result")};v.entry=function(e,l,n){let a=t.defaults;n&&(o(n.warnings===void 0,"Cannot override warnings preference in synchronous validation"),o(n.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),a=t.preferences(t.defaults,n));const u=r.entry(e,l,a);o(!u.mainstay.externals.length,"Schema with external rules must use validateAsync()");const m={value:u.value};return u.error&&(m.error=u.error),u.mainstay.warnings.length&&(m.warning=i.details(u.mainstay.warnings)),u.mainstay.debug&&(m.debug=u.mainstay.debug),u.mainstay.artifacts&&(m.artifacts=u.mainstay.artifacts),m},v.entryAsync=async function(e,l,n){let a=t.defaults;n&&(a=t.preferences(t.defaults,n));const u=r.entry(e,l,a),m=u.mainstay;if(u.error)throw m.debug&&(u.error.debug=m.debug),u.error;if(m.externals.length){let $=u.value;const w=[];for(const c of m.externals){const h=c.state.path,_=c.schema.type==="link"?m.links.get(c.schema):null;let j,R,D=$;const C=h.length?[$]:[],I=h.length?f(e,h):e;if(h.length){j=h[h.length-1];let L=$;for(const H of h.slice(0,-1))L=L[H],C.unshift(L);R=C[0],D=R[j]}try{const L=(z,Z)=>(_||c.schema).$_createError(z,D,Z,c.state,a),H=await c.method(D,{schema:c.schema,linked:_,state:c.state,prefs:n,original:I,error:L,errorsArray:r.errorsArray,warn:(z,Z)=>m.warnings.push((_||c.schema).$_createError(z,D,Z,c.state,a)),message:(z,Z)=>(_||c.schema).$_createError("external",D,Z,c.state,a,{messages:z})});if(H===void 0||H===D)continue;if(H instanceof i.Report){if(m.tracer.log(c.schema,c.state,"rule","external","error"),w.push(H),a.abortEarly)break;continue}if(Array.isArray(H)&&H[t.symbols.errors]){if(m.tracer.log(c.schema,c.state,"rule","external","error"),w.push(...H),a.abortEarly)break;continue}R?(m.tracer.value(c.state,"rule",D,H,"external"),R[j]=H):(m.tracer.value(c.state,"rule",$,H,"external"),$=H)}catch(L){throw a.errors.label&&(L.message+=` (${c.label})`),L}}if(u.value=$,w.length)throw u.error=i.process(w,e,a),m.debug&&(u.error.debug=m.debug),u.error}if(!a.warnings&&!a.debug&&!a.artifacts)return u.value;const y={value:u.value};return m.warnings.length&&(y.warning=i.details(m.warnings)),m.debug&&(y.debug=m.debug),m.artifacts&&(y.artifacts=m.artifacts),y},r.Mainstay=class{constructor(e,l,n){this.externals=[],this.warnings=[],this.tracer=e,this.debug=l,this.links=n,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const e=this._snapshots.pop();this.externals=e.externals,this.warnings=e.warnings}commit(){this._snapshots.pop()}},r.entry=function(e,l,n){const{tracer:a,cleanup:u}=r.tracer(l,n),m=n.debug?[]:null,y=l._ids._schemaChain?new Map:null,$=new r.Mainstay(a,m,y),w=l._ids._schemaChain?[{schema:l}]:null,c=new s([],[],{mainstay:$,schemas:w}),h=v.validate(e,l,c,n);u&&l.$_root.untrace();const _=i.process(h.errors,e,n);return{value:h.value,error:_,mainstay:$}},r.tracer=function(e,l){return e.$_root._tracer?{tracer:e.$_root._tracer._register(e)}:l.debug?(o(e.$_root.trace,"Debug mode not supported"),{tracer:e.$_root.trace()._register(e),cleanup:!0}):{tracer:r.ignore}},v.validate=function(e,l,n,a,u={}){if(l.$_terms.whens&&(l=l._generate(e,n,a).schema),l._preferences&&(a=r.prefs(l,a)),l._cache&&a.cache){const _=l._cache.get(e);if(n.mainstay.tracer.debug(n,"validate","cached",!!_),_)return _}const m=(_,j,R)=>l.$_createError(_,e,j,R||n,a),y={original:e,prefs:a,schema:l,state:n,error:m,errorsArray:r.errorsArray,warn:(_,j,R)=>n.mainstay.warnings.push(m(_,j,R)),message:(_,j)=>l.$_createError("custom",e,j,n,a,{messages:_})};n.mainstay.tracer.entry(l,n);const $=l._definition;if($.prepare&&e!==void 0&&a.convert){const _=$.prepare(e,y);if(_){if(n.mainstay.tracer.value(n,"prepare",e,_.value),_.errors)return r.finalize(_.value,[].concat(_.errors),y);e=_.value}}if($.coerce&&e!==void 0&&a.convert&&(!$.coerce.from||$.coerce.from.includes(typeof e))){const _=$.coerce.method(e,y);if(_){if(n.mainstay.tracer.value(n,"coerced",e,_.value),_.errors)return r.finalize(_.value,[].concat(_.errors),y);e=_.value}}const w=l._flags.empty;w&&w.$_match(r.trim(e,l),n.nest(w),t.defaults)&&(n.mainstay.tracer.value(n,"empty",e,void 0),e=void 0);const c=u.presence||l._flags.presence||(l._flags._endedSwitch?null:a.presence);if(e===void 0){if(c==="forbidden")return r.finalize(e,null,y);if(c==="required")return r.finalize(e,[l.$_createError("any.required",e,null,n,a)],y);if(c==="optional"){if(l._flags.default!==t.symbols.deepDefault)return r.finalize(e,null,y);n.mainstay.tracer.value(n,"default",e,{}),e={}}}else if(c==="forbidden")return r.finalize(e,[l.$_createError("any.unknown",e,null,n,a)],y);const h=[];if(l._valids){const _=l._valids.get(e,n,a,l._flags.insensitive);if(_)return a.convert&&(n.mainstay.tracer.value(n,"valids",e,_.value),e=_.value),n.mainstay.tracer.filter(l,n,"valid",_),r.finalize(e,null,y);if(l._flags.only){const j=l.$_createError("any.only",e,{valids:l._valids.values({display:!0})},n,a);if(a.abortEarly)return r.finalize(e,[j],y);h.push(j)}}if(l._invalids){const _=l._invalids.get(e,n,a,l._flags.insensitive);if(_){n.mainstay.tracer.filter(l,n,"invalid",_);const j=l.$_createError("any.invalid",e,{invalids:l._invalids.values({display:!0})},n,a);if(a.abortEarly)return r.finalize(e,[j],y);h.push(j)}}if($.validate){const _=$.validate(e,y);if(_&&(n.mainstay.tracer.value(n,"base",e,_.value),e=_.value,_.errors)){if(!Array.isArray(_.errors))return h.push(_.errors),r.finalize(e,h,y);if(_.errors.length)return h.push(..._.errors),r.finalize(e,h,y)}}return l._rules.length?r.rules(e,h,y):r.finalize(e,h,y)},r.rules=function(e,l,n){const{schema:a,state:u,prefs:m}=n;for(const y of a._rules){const $=a._definition.rules[y.method];if($.convert&&m.convert){u.mainstay.tracer.log(a,u,"rule",y.name,"full");continue}let w,c=y.args;if(y._resolve.length){c=Object.assign({},c);for(const _ of y._resolve){const j=$.argsByName.get(_),R=c[_].resolve(e,u,m),D=j.normalize?j.normalize(R):R,C=t.validateArg(D,null,j);if(C){w=a.$_createError("any.ref",R,{arg:_,ref:c[_],reason:C},u,m);break}c[_]=D}}w=w||$.validate(e,n,c,y);const h=r.rule(w,y);if(h.errors){if(u.mainstay.tracer.log(a,u,"rule",y.name,"error"),y.warn){u.mainstay.warnings.push(...h.errors);continue}if(m.abortEarly)return r.finalize(e,h.errors,n);l.push(...h.errors)}else u.mainstay.tracer.log(a,u,"rule",y.name,"pass"),u.mainstay.tracer.value(u,"rule",e,h.value,y.name),e=h.value}return r.finalize(e,l,n)},r.rule=function(e,l){return e instanceof i.Report?(r.error(e,l),{errors:[e],value:null}):Array.isArray(e)&&e[t.symbols.errors]?(e.forEach(n=>r.error(n,l)),{errors:e,value:null}):{errors:null,value:e}},r.error=function(e,l){return l.message&&e._setTemplate(l.message),e},r.finalize=function(e,l,n){l=l||[];const{schema:a,state:u,prefs:m}=n;if(l.length){const $=r.default("failover",void 0,l,n);$!==void 0&&(u.mainstay.tracer.value(u,"failover",e,$),e=$,l=[])}if(l.length&&a._flags.error)if(typeof a._flags.error=="function"){l=a._flags.error(l),Array.isArray(l)||(l=[l]);for(const $ of l)o($ instanceof Error||$ instanceof i.Report,"error() must return an Error object")}else l=[a._flags.error];if(e===void 0){const $=r.default("default",e,l,n);u.mainstay.tracer.value(u,"default",e,$),e=$}if(a._flags.cast&&e!==void 0){const $=a._definition.cast[a._flags.cast];if($.from(e)){const w=$.to(e,n);u.mainstay.tracer.value(u,"cast",e,w,a._flags.cast),e=w}}if(a.$_terms.externals&&m.externals&&m._externals!==!1)for(const{method:$}of a.$_terms.externals)u.mainstay.externals.push({method:$,schema:a,state:u,label:i.label(a._flags,u,m)});const y={value:e,errors:l.length?l:null};return a._flags.result&&(y.value=a._flags.result==="strip"?void 0:n.original,u.mainstay.tracer.value(u,a._flags.result,e,y.value),u.shadow(e,a._flags.result)),a._cache&&m.cache!==!1&&!a._refs.length&&a._cache.set(n.original,y),e===void 0||y.errors||a._flags.artifact===void 0||(u.mainstay.artifacts=u.mainstay.artifacts||new Map,u.mainstay.artifacts.has(a._flags.artifact)||u.mainstay.artifacts.set(a._flags.artifact,[]),u.mainstay.artifacts.get(a._flags.artifact).push(u.path)),y},r.prefs=function(e,l){const n=l===t.defaults;return n&&e._preferences[t.symbols.prefs]?e._preferences[t.symbols.prefs]:(l=t.preferences(l,e._preferences),n&&(e._preferences[t.symbols.prefs]=l),l)},r.default=function(e,l,n,a){const{schema:u,state:m,prefs:y}=a,$=u._flags[e];if(y.noDefaults||$===void 0)return l;if(m.mainstay.tracer.log(u,m,"rule",e,"full"),!$)return $;if(typeof $=="function"){const w=$.length?[b(m.ancestors[0]),a]:[];try{return $(...w)}catch(c){return void n.push(u.$_createError(`any.${e}`,null,{error:c},m,y))}}return typeof $!="object"?$:$[t.symbols.literal]?$.literal:t.isResolvable($)?$.resolve(l,m,y):b($)},r.trim=function(e,l){if(typeof e!="string")return e;const n=l.$_getRule("trim");return n&&n.args.enabled?e.trim():e},r.ignore={active:!1,debug:g,entry:g,filter:g,log:g,resolve:g,value:g},r.errorsArray=function(){const e=[];return e[t.symbols.errors]=!0,e}},2036:(S,v,p)=>{const o=p(375),b=p(9474),g=p(8160),f={};S.exports=f.Values=class{constructor(t,i){this._values=new Set(t),this._refs=new Set(i),this._lowercase=f.lowercases(t),this._override=!1}get length(){return this._values.size+this._refs.size}add(t,i){g.isResolvable(t)?this._refs.has(t)||(this._refs.add(t),i&&i.register(t)):this.has(t,null,null,!1)||(this._values.add(t),typeof t=="string"&&this._lowercase.set(t.toLowerCase(),t))}static merge(t,i,s){if(t=t||new f.Values,i){if(i._override)return i.clone();for(const r of[...i._values,...i._refs])t.add(r)}if(s)for(const r of[...s._values,...s._refs])t.remove(r);return t.length?t:null}remove(t){g.isResolvable(t)?this._refs.delete(t):(this._values.delete(t),typeof t=="string"&&this._lowercase.delete(t.toLowerCase()))}has(t,i,s,r){return!!this.get(t,i,s,r)}get(t,i,s,r){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&r){const e=this._lowercase.get(t.toLowerCase());if(e)return{value:e}}if(!this._refs.size&&typeof t!="object")return!1;if(typeof t=="object"){for(const e of this._values)if(b(e,t))return{value:e}}if(i)for(const e of this._refs){const l=e.resolve(t,i,s,null,{in:!0});if(l===void 0)continue;const n=e.in&&typeof l=="object"?Array.isArray(l)?l:Object.keys(l):[l];for(const a of n)if(typeof a==typeof t){if(r&&t&&typeof t=="string"){if(a.toLowerCase()===t.toLowerCase())return{value:a,ref:e}}else if(b(a,t))return{value:a,ref:e}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const i=[];for(const s of[...this._values,...this._refs])s!==void 0&&i.push(s);return i}return Array.from([...this._values,...this._refs])}clone(){const t=new f.Values(this._values,this._refs);return t._override=this._override,t}concat(t){o(!t._override,"Cannot concat override set of values");const i=new f.Values([...this._values,...t._values],[...this._refs,...t._refs]);return i._override=this._override,i}describe(){const t=[];this._override&&t.push({override:!0});for(const i of this._values.values())t.push(i&&typeof i=="object"?{value:i}:i);for(const i of this._refs.values())t.push(i.describe());return t}},f.Values.prototype[g.symbols.values]=!0,f.Values.prototype.slice=f.Values.prototype.clone,f.lowercases=function(t){const i=new Map;if(t)for(const s of t)typeof s=="string"&&i.set(s.toLowerCase(),s);return i}},978:(S,v,p)=>{const o=p(375),b=p(8571),g=p(1687),f=p(9621),t={};S.exports=function(i,s,r={}){if(o(i&&typeof i=="object","Invalid defaults value: must be an object"),o(!s||s===!0||typeof s=="object","Invalid source value: must be true, falsy or an object"),o(typeof r=="object","Invalid options: must be an object"),!s)return null;if(r.shallow)return t.applyToDefaultsWithShallow(i,s,r);const e=b(i);if(s===!0)return e;const l=r.nullOverride!==void 0&&r.nullOverride;return g(e,s,{nullOverride:l,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(i,s,r){const e=r.shallow;o(Array.isArray(e),"Invalid keys");const l=new Map,n=s===!0?null:new Set;for(let m of e){m=Array.isArray(m)?m:m.split(".");const y=f(i,m);y&&typeof y=="object"?l.set(y,n&&f(s,m)||y):n&&n.add(m)}const a=b(i,{},l);if(!n)return a;for(const m of n)t.reachCopy(a,s,m);const u=r.nullOverride!==void 0&&r.nullOverride;return g(a,s,{nullOverride:u,mergeArrays:!1})},t.reachCopy=function(i,s,r){for(const n of r){if(!(n in s))return;const a=s[n];if(typeof a!="object"||a===null)return;s=a}const e=s;let l=i;for(let n=0;n<r.length-1;++n){const a=r[n];typeof l[a]!="object"&&(l[a]={}),l=l[a]}l[r[r.length-1]]=e}},375:(S,v,p)=>{const o=p(7916);S.exports=function(b,...g){if(!b)throw g.length===1&&g[0]instanceof Error?g[0]:new o(g)}},8571:(S,v,p)=>{const o=p(9621),b=p(4277),g=p(7043),f={needsProtoHack:new Set([b.set,b.map,b.weakSet,b.weakMap])};S.exports=f.clone=function(t,i={},s=null){if(typeof t!="object"||t===null)return t;let r=f.clone,e=s;if(i.shallow){if(i.shallow!==!0)return f.cloneWithShallow(t,i);r=u=>u}else if(e){const u=e.get(t);if(u)return u}else e=new Map;const l=b.getInternalProto(t);if(l===b.buffer)return!1;if(l===b.date)return new Date(t.getTime());if(l===b.regex)return new RegExp(t);const n=f.base(t,l,i);if(n===t)return t;if(e&&e.set(t,n),l===b.set)for(const u of t)n.add(r(u,i,e));else if(l===b.map)for(const[u,m]of t)n.set(u,r(m,i,e));const a=g.keys(t,i);for(const u of a){if(u==="__proto__")continue;if(l===b.array&&u==="length"){n.length=t.length;continue}const m=Object.getOwnPropertyDescriptor(t,u);m?m.get||m.set?Object.defineProperty(n,u,m):m.enumerable?n[u]=r(t[u],i,e):Object.defineProperty(n,u,{enumerable:!1,writable:!0,configurable:!0,value:r(t[u],i,e)}):Object.defineProperty(n,u,{enumerable:!0,writable:!0,configurable:!0,value:r(t[u],i,e)})}return n},f.cloneWithShallow=function(t,i){const s=i.shallow;(i=Object.assign({},i)).shallow=!1;const r=new Map;for(const e of s){const l=o(t,e);typeof l!="object"&&typeof l!="function"||r.set(l,l)}return f.clone(t,i,r)},f.base=function(t,i,s){if(s.prototype===!1)return f.needsProtoHack.has(i)?new i.constructor:i===b.array?[]:{};const r=Object.getPrototypeOf(t);if(r&&r.isImmutable)return t;if(i===b.array){const e=[];return r!==i&&Object.setPrototypeOf(e,r),e}if(f.needsProtoHack.has(i)){const e=new r.constructor;return r!==i&&Object.setPrototypeOf(e,r),e}return Object.create(r)}},9474:(S,v,p)=>{const o=p(4277),b={mismatched:null};S.exports=function(g,f,t){return t=Object.assign({prototype:!0},t),!!b.isDeepEqual(g,f,t,[])},b.isDeepEqual=function(g,f,t,i){if(g===f)return g!==0||1/g==1/f;const s=typeof g;if(s!==typeof f||g===null||f===null)return!1;if(s==="function"){if(!t.deepFunction||g.toString()!==f.toString())return!1}else if(s!=="object")return g!=g&&f!=f;const r=b.getSharedType(g,f,!!t.prototype);switch(r){case o.buffer:return!1;case o.promise:return g===f;case o.regex:return g.toString()===f.toString();case b.mismatched:return!1}for(let e=i.length-1;e>=0;--e)if(i[e].isSame(g,f))return!0;i.push(new b.SeenEntry(g,f));try{return!!b.isDeepEqualObj(r,g,f,t,i)}finally{i.pop()}},b.getSharedType=function(g,f,t){if(t)return Object.getPrototypeOf(g)!==Object.getPrototypeOf(f)?b.mismatched:o.getInternalProto(g);const i=o.getInternalProto(g);return i!==o.getInternalProto(f)?b.mismatched:i},b.valueOf=function(g){const f=g.valueOf;if(f===void 0)return g;try{return f.call(g)}catch(t){return t}},b.hasOwnEnumerableProperty=function(g,f){return Object.prototype.propertyIsEnumerable.call(g,f)},b.isSetSimpleEqual=function(g,f){for(const t of Set.prototype.values.call(g))if(!Set.prototype.has.call(f,t))return!1;return!0},b.isDeepEqualObj=function(g,f,t,i,s){const{isDeepEqual:r,valueOf:e,hasOwnEnumerableProperty:l}=b,{keys:n,getOwnPropertySymbols:a}=Object;if(g===o.array){if(!i.part){if(f.length!==t.length)return!1;for(let w=0;w<f.length;++w)if(!r(f[w],t[w],i,s))return!1;return!0}for(const w of f)for(const c of t)if(r(w,c,i,s))return!0}else if(g===o.set){if(f.size!==t.size)return!1;if(!b.isSetSimpleEqual(f,t)){const w=new Set(Set.prototype.values.call(t));for(const c of Set.prototype.values.call(f)){if(w.delete(c))continue;let h=!1;for(const _ of w)if(r(c,_,i,s)){w.delete(_),h=!0;break}if(!h)return!1}}}else if(g===o.map){if(f.size!==t.size)return!1;for(const[w,c]of Map.prototype.entries.call(f))if(c===void 0&&!Map.prototype.has.call(t,w)||!r(c,Map.prototype.get.call(t,w),i,s))return!1}else if(g===o.error&&(f.name!==t.name||f.message!==t.message))return!1;const u=e(f),m=e(t);if((f!==u||t!==m)&&!r(u,m,i,s))return!1;const y=n(f);if(!i.part&&y.length!==n(t).length&&!i.skip)return!1;let $=0;for(const w of y)if(i.skip&&i.skip.includes(w))t[w]===void 0&&++$;else if(!l(t,w)||!r(f[w],t[w],i,s))return!1;if(!i.part&&y.length-$!==n(t).length)return!1;if(i.symbols!==!1){const w=a(f),c=new Set(a(t));for(const h of w){if(!i.skip||!i.skip.includes(h)){if(l(f,h)){if(!l(t,h)||!r(f[h],t[h],i,s))return!1}else if(l(t,h))return!1}c.delete(h)}for(const h of c)if(l(t,h))return!1}return!0},b.SeenEntry=class{constructor(g,f){this.obj=g,this.ref=f}isSame(g,f){return this.obj===g&&this.ref===f}}},7916:(S,v,p)=>{const o=p(8761);S.exports=class extends Error{constructor(b){super(b.filter(g=>g!=="").map(g=>typeof g=="string"?g:g instanceof Error?g.message:o(g)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,v.assert)}}},5277:S=>{const v={};S.exports=function(p){if(!p)return"";let o="";for(let b=0;b<p.length;++b){const g=p.charCodeAt(b);v.isSafe(g)?o+=p[b]:o+=v.escapeHtmlChar(g)}return o},v.escapeHtmlChar=function(p){return v.namedHtml.get(p)||(p>=256?"&#"+p+";":`&#x${p.toString(16).padStart(2,"0")};`)},v.isSafe=function(p){return v.safeCharCodes.has(p)},v.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),v.safeCharCodes=function(){const p=new Set;for(let o=32;o<123;++o)(o>=97||o>=65&&o<=90||o>=48&&o<=57||o===32||o===46||o===44||o===45||o===58||o===95)&&p.add(o);return p}()},6064:S=>{S.exports=function(v){return v.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:S=>{S.exports=function(){}},1687:(S,v,p)=>{const o=p(375),b=p(8571),g=p(7043),f={};S.exports=f.merge=function(t,i,s){if(o(t&&typeof t=="object","Invalid target value: must be an object"),o(i==null||typeof i=="object","Invalid source value: must be null, undefined, or an object"),!i)return t;if(s=Object.assign({nullOverride:!0,mergeArrays:!0},s),Array.isArray(i)){o(Array.isArray(t),"Cannot merge array onto an object"),s.mergeArrays||(t.length=0);for(let e=0;e<i.length;++e)t.push(b(i[e],{symbols:s.symbols}));return t}const r=g.keys(i,s);for(let e=0;e<r.length;++e){const l=r[e];if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,l))continue;const n=i[l];if(n&&typeof n=="object"){if(t[l]===n)continue;!t[l]||typeof t[l]!="object"||Array.isArray(t[l])!==Array.isArray(n)||n instanceof Date||n instanceof RegExp?t[l]=b(n,{symbols:s.symbols}):f.merge(t[l],n,s)}else(n!=null||s.nullOverride)&&(t[l]=n)}return t}},9621:(S,v,p)=>{const o=p(375),b={};S.exports=function(g,f,t){if(f===!1||f==null)return g;typeof(t=t||{})=="string"&&(t={separator:t});const i=Array.isArray(f);o(!i||!t.separator,"Separator option is not valid for array-based chain");const s=i?f:f.split(t.separator||".");let r=g;for(let e=0;e<s.length;++e){let l=s[e];const n=t.iterables&&b.iterables(r);if(Array.isArray(r)||n==="set"){const a=Number(l);Number.isInteger(a)&&(l=a<0?r.length+a:a)}if(!r||typeof r=="function"&&t.functions===!1||!n&&r[l]===void 0){o(!t.strict||e+1===s.length,"Missing segment",l,"in reach path ",f),o(typeof r=="object"||t.functions===!0||typeof r!="function","Invalid segment",l,"in reach path ",f),r=t.default;break}r=n?n==="set"?[...r][l]:r.get(l):r[l]}return r},b.iterables=function(g){return g instanceof Set?"set":g instanceof Map?"map":void 0}},8761:S=>{S.exports=function(...v){try{return JSON.stringify(...v)}catch(p){return"[Cannot display object: "+p.message+"]"}}},4277:(S,v)=>{const p={};v=S.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},p.typeMap=new Map([["[object Error]",v.error],["[object Map]",v.map],["[object Promise]",v.promise],["[object Set]",v.set],["[object WeakMap]",v.weakMap],["[object WeakSet]",v.weakSet]]),v.getInternalProto=function(o){if(Array.isArray(o))return v.array;if(o instanceof Date)return v.date;if(o instanceof RegExp)return v.regex;if(o instanceof Error)return v.error;const b=Object.prototype.toString.call(o);return p.typeMap.get(b)||v.generic}},7043:(S,v)=>{v.keys=function(p,o={}){return o.symbols!==!1?Reflect.ownKeys(p):Object.getOwnPropertyNames(p)}},3652:(S,v,p)=>{const o=p(375),b={};v.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(g,f){const t=[].concat((f=f||{}).before||[]),i=[].concat(f.after||[]),s=f.group||"?",r=f.sort||0;o(!t.includes(s),`Item cannot come before itself: ${s}`),o(!t.includes("?"),"Item cannot come before unassociated items"),o(!i.includes(s),`Item cannot come after itself: ${s}`),o(!i.includes("?"),"Item cannot come after unassociated items"),Array.isArray(g)||(g=[g]);for(const e of g){const l={seq:this._items.length,sort:r,before:t,after:i,group:s,node:e};this._items.push(l)}if(!f.manual){const e=this._sort();o(e,"item",s!=="?"?`added into group ${s}`:"","created a dependencies error")}return this.nodes}merge(g){Array.isArray(g)||(g=[g]);for(const t of g)if(t)for(const i of t._items)this._items.push(Object.assign({},i));this._items.sort(b.mergeSort);for(let t=0;t<this._items.length;++t)this._items[t].seq=t;const f=this._sort();return o(f,"merge created a dependencies error"),this.nodes}sort(){const g=this._sort();return o(g,"sort created a dependencies error"),this.nodes}_sort(){const g={},f=Object.create(null),t=Object.create(null);for(const l of this._items){const n=l.seq,a=l.group;t[a]=t[a]||[],t[a].push(n),g[n]=l.before;for(const u of l.after)f[u]=f[u]||[],f[u].push(n)}for(const l in g){const n=[];for(const a in g[l]){const u=g[l][a];t[u]=t[u]||[],n.push(...t[u])}g[l]=n}for(const l in f)if(t[l])for(const n of t[l])g[n].push(...f[l]);const i={};for(const l in g){const n=g[l];for(const a of n)i[a]=i[a]||[],i[a].push(l)}const s={},r=[];for(let l=0;l<this._items.length;++l){let n=l;if(i[l]){n=null;for(let a=0;a<this._items.length;++a){if(s[a]===!0)continue;i[a]||(i[a]=[]);const u=i[a].length;let m=0;for(let y=0;y<u;++y)s[i[a][y]]&&++m;if(m===u){n=a;break}}}n!==null&&(s[n]=!0,r.push(n))}if(r.length!==this._items.length)return!1;const e={};for(const l of this._items)e[l.seq]=l;this._items=[],this.nodes=[];for(const l of r){const n=e[l];this.nodes.push(n.node),this._items.push(n)}return!0}},b.mergeSort=(g,f)=>g.sort===f.sort?0:g.sort<f.sort?-1:1},5380:(S,v,p)=>{const o=p(443),b=p(2178),g={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:o.URL||URL};v.analyze=function(f,t={}){if(!f)return b.code("DOMAIN_NON_EMPTY_STRING");if(typeof f!="string")throw new Error("Invalid input: domain must be a string");if(f.length>256)return b.code("DOMAIN_TOO_LONG");if(g.nonAsciiRx.test(f)){if(t.allowUnicode===!1)return b.code("DOMAIN_INVALID_UNICODE_CHARS");f=f.normalize("NFC")}if(g.domainControlRx.test(f))return b.code("DOMAIN_INVALID_CHARS");f=g.punycode(f),t.allowFullyQualified&&f[f.length-1]==="."&&(f=f.slice(0,-1));const i=t.minDomainSegments||g.minDomainSegments,s=f.split(".");if(s.length<i)return b.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&s.length>t.maxDomainSegments)return b.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=t.tlds;if(r){const e=s[s.length-1].toLowerCase();if(r.deny&&r.deny.has(e)||r.allow&&!r.allow.has(e))return b.code("DOMAIN_FORBIDDEN_TLDS")}for(let e=0;e<s.length;++e){const l=s[e];if(!l.length)return b.code("DOMAIN_EMPTY_SEGMENT");if(l.length>63)return b.code("DOMAIN_LONG_SEGMENT");if(e<s.length-1){if(!g.domainSegmentRx.test(l))return b.code("DOMAIN_INVALID_CHARS")}else if(!g.tldSegmentRx.test(l))return b.code("DOMAIN_INVALID_TLDS_CHARS")}return null},v.isValid=function(f,t){return!v.analyze(f,t)},g.punycode=function(f){f.includes("%")&&(f=f.replace(/%/g,"%25"));try{return new g.URL(`http://${f}`).host}catch{return f}}},1745:(S,v,p)=>{const o=p(9848),b=p(5380),g=p(2178),f={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(o.TextEncoder||TextEncoder)};v.analyze=function(t,i){return f.email(t,i)},v.isValid=function(t,i){return!f.email(t,i)},f.email=function(t,i={}){if(typeof t!="string")throw new Error("Invalid input: email must be a string");if(!t)return g.code("EMPTY_STRING");const s=!f.nonAsciiRx.test(t);if(!s){if(i.allowUnicode===!1)return g.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const r=t.split("@");if(r.length!==2)return r.length>2?g.code("MULTIPLE_AT_CHAR"):g.code("MISSING_AT_CHAR");const[e,l]=r;if(!e)return g.code("EMPTY_LOCAL");if(!i.ignoreLength){if(t.length>254)return g.code("ADDRESS_TOO_LONG");if(f.encoder.encode(e).length>64)return g.code("LOCAL_TOO_LONG")}return f.local(e,s)||b.analyze(l,i)},f.local=function(t,i){const s=t.split(".");for(const r of s){if(!r.length)return g.code("EMPTY_LOCAL_SEGMENT");if(i){if(!f.atextRx.test(r))return g.code("INVALID_LOCAL_CHARS")}else for(const e of r){if(f.atextRx.test(e))continue;const l=f.binary(e);if(!f.atomRx.test(l))return g.code("INVALID_LOCAL_CHARS")}}},f.binary=function(t){return Array.from(f.encoder.encode(t)).map(i=>String.fromCharCode(i)).join("")},f.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,f.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(S,v)=>{v.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},v.code=function(p){return{code:p,error:v.codes[p]}}},9959:(S,v,p)=>{const o=p(375),b=p(5752);v.regex=function(g={}){o(g.cidr===void 0||typeof g.cidr=="string","options.cidr must be a string");const f=g.cidr?g.cidr.toLowerCase():"optional";o(["required","optional","forbidden"].includes(f),"options.cidr must be one of required, optional, forbidden"),o(g.version===void 0||typeof g.version=="string"||Array.isArray(g.version),"options.version must be a string or an array of string");let t=g.version||["ipv4","ipv6","ipvfuture"];Array.isArray(t)||(t=[t]),o(t.length>=1,"options.version must have at least 1 version specified");for(let r=0;r<t.length;++r)o(typeof t[r]=="string","options.version must only contain strings"),t[r]=t[r].toLowerCase(),o(["ipv4","ipv6","ipvfuture"].includes(t[r]),"options.version contains unknown version "+t[r]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const i=`(?:${t.map(r=>{if(f==="forbidden")return b.ip[r];const e=`\\/${r==="ipv4"?b.ip.v4Cidr:b.ip.v6Cidr}`;return f==="required"?`${b.ip[r]}${e}`:`${b.ip[r]}(?:${e})?`}).join("|")})`,s=new RegExp(`^${i}$`);return{cidr:f,versions:t,regex:s,raw:i}}},5752:(S,v,p)=>{const o=p(375),b=p(6064),g={generate:function(){const f={},t="\\dA-Fa-f",i="["+t+"]",s="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",e="%"+t,l=s+e+r+":@",n="["+l+"]",a="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";f.ipv4address="(?:"+a+"\\.){3}"+a;const u=i+"{1,4}",m="(?:"+u+":"+u+"|"+f.ipv4address+")",y="(?:"+u+":){6}"+m,$="::(?:"+u+":){5}"+m,w="(?:"+u+")?::(?:"+u+":){4}"+m,c="(?:(?:"+u+":){0,1}"+u+")?::(?:"+u+":){3}"+m,h="(?:(?:"+u+":){0,2}"+u+")?::(?:"+u+":){2}"+m,_="(?:(?:"+u+":){0,3}"+u+")?::"+u+":"+m,j="(?:(?:"+u+":){0,4}"+u+")?::"+m,R="(?:(?:"+u+":){0,5}"+u+")?::"+u,D="(?:(?:"+u+":){0,6}"+u+")?::";f.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",f.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",f.ipv6address="(?:"+y+"|"+$+"|"+w+"|"+c+"|"+h+"|"+_+"|"+j+"|"+R+"|"+D+")",f.ipvFuture="v"+i+"+\\.["+s+r+":]+",f.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",f.schemeRegex=new RegExp(f.scheme);const C="["+s+e+r+":]*",I="["+s+e+r+"]{1,255}",L="(?:\\[(?:"+f.ipv6address+"|"+f.ipvFuture+")\\]|"+f.ipv4address+"|"+I+")",H="(?:"+C+"@)?"+L+"(?::\\d*)?",z="(?:"+C+"@)?("+L+")(?::\\d*)?",Z=n+"*",F=n+"+",q="(?:\\/"+Z+")*",V="\\/(?:"+F+q+")?",Q=F+q,ne="["+s+e+r+"@]+"+q,se="(?:\\/\\/\\/"+Z+q+")";return f.hierPart="(?:(?:\\/\\/"+H+q+")|"+V+"|"+Q+"|"+se+")",f.hierPartCapture="(?:(?:\\/\\/"+z+q+")|"+V+"|"+Q+")",f.relativeRef="(?:(?:\\/\\/"+H+q+")|"+V+"|"+ne+"|)",f.relativeRefCapture="(?:(?:\\/\\/"+z+q+")|"+V+"|"+ne+"|)",f.query="["+l+"\\/\\?]*(?=#|$)",f.queryWithSquareBrackets="["+l+"\\[\\]\\/\\?]*(?=#|$)",f.fragment="["+l+"\\/\\?]*",f}};g.rfc3986=g.generate(),v.ip={v4Cidr:g.rfc3986.ipv4Cidr,v6Cidr:g.rfc3986.ipv6Cidr,ipv4:g.rfc3986.ipv4address,ipv6:g.rfc3986.ipv6address,ipvfuture:g.rfc3986.ipvFuture},g.createRegex=function(f){const t=g.rfc3986,i="(?:\\?"+(f.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",s=f.domain?t.relativeRefCapture:t.relativeRef;if(f.relativeOnly)return g.wrap(s+i);let r="";if(f.scheme){o(f.scheme instanceof RegExp||typeof f.scheme=="string"||Array.isArray(f.scheme),"scheme must be a RegExp, String, or Array");const n=[].concat(f.scheme);o(n.length>=1,"scheme must have at least 1 scheme specified");const a=[];for(let u=0;u<n.length;++u){const m=n[u];o(m instanceof RegExp||typeof m=="string","scheme at position "+u+" must be a RegExp or String"),m instanceof RegExp?a.push(m.source.toString()):(o(t.schemeRegex.test(m),"scheme at position "+u+" must be a valid scheme"),a.push(b(m)))}r=a.join("|")}const e="(?:"+(r?"(?:"+r+")":t.scheme)+":"+(f.domain?t.hierPartCapture:t.hierPart)+")",l=f.allowRelative?"(?:"+e+"|"+s+")":e;return g.wrap(l+i,r)},g.wrap=function(f,t){return{raw:f=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${f}`,regex:new RegExp(`^${f}$`),scheme:t}},g.uriRegex=g.createRegex({}),v.regex=function(f={}){return f.scheme||f.allowRelative||f.relativeOnly||f.allowQuerySquareBrackets||f.domain?g.createRegex(f):g.uriRegex}},1447:(S,v)=>{const p={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};v.Parser=class{constructor(o,b={}){if(!b[p.settings]&&b.constants)for(const g in b.constants){const f=b.constants[g];if(f!==null&&!["boolean","number","string"].includes(typeof f))throw new Error(`Formula constant ${g} contains invalid ${typeof f} value type`)}this.settings=b[p.settings]?b:Object.assign({[p.settings]:!0,constants:{},functions:{}},b),this.single=null,this._parts=null,this._parse(o)}_parse(o){let b=[],g="",f=0,t=!1;const i=r=>{if(f)throw new Error("Formula missing closing parenthesis");const e=b.length?b[b.length-1]:null;if(t||g||r){if(e&&e.type==="reference"&&r===")")return e.type="function",e.value=this._subFormula(g,e.value),void(g="");if(r===")"){const l=new v.Parser(g,this.settings);b.push({type:"segment",value:l})}else if(t){if(t==="]")return b.push({type:"reference",value:g}),void(g="");b.push({type:"literal",value:g})}else if(p.operatorCharacters.includes(g))e&&e.type==="operator"&&p.operators.includes(e.value+g)?e.value+=g:b.push({type:"operator",value:g});else if(g.match(p.numberRx))b.push({type:"constant",value:parseFloat(g)});else if(this.settings.constants[g]!==void 0)b.push({type:"constant",value:this.settings.constants[g]});else{if(!g.match(p.tokenRx))throw new Error(`Formula contains invalid token: ${g}`);b.push({type:"reference",value:g})}g=""}};for(const r of o)t?r===t?(i(),t=!1):g+=r:f?r==="("?(g+=r,++f):r===")"?(--f,f?g+=r:i(r)):g+=r:r in p.literals?t=p.literals[r]:r==="("?(i(),++f):p.operatorCharacters.includes(r)?(i(),g=r,i()):r!==" "?g+=r:i();i(),b=b.map((r,e)=>r.type!=="operator"||r.value!=="-"||e&&b[e-1].type!=="operator"?r:{type:"operator",value:"n"});let s=!1;for(const r of b){if(r.type==="operator"){if(p.operatorsPrefix.includes(r.value))continue;if(!s)throw new Error("Formula contains an operator in invalid position");if(!p.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(s)throw new Error("Formula missing expected operator");s=!s}if(!s)throw new Error("Formula contains invalid trailing operator");b.length===1&&["reference","literal","constant"].includes(b[0].type)&&(this.single={type:b[0].type==="reference"?"reference":"value",value:b[0].value}),this._parts=b.map(r=>{if(r.type==="operator")return p.operatorsPrefix.includes(r.value)?r:r.value;if(r.type!=="reference")return r.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(r.value))throw new Error(`Formula contains invalid reference ${r.value}`);return this.settings.reference?this.settings.reference(r.value):p.reference(r.value)})}_subFormula(o,b){const g=this.settings.functions[b];if(typeof g!="function")throw new Error(`Formula contains unknown function ${b}`);let f=[];if(o){let t="",i=0,s=!1;const r=()=>{if(!t)throw new Error(`Formula contains function ${b} with invalid arguments ${o}`);f.push(t),t=""};for(let e=0;e<o.length;++e){const l=o[e];s?(t+=l,l===s&&(s=!1)):l in p.literals&&!i?(t+=l,s=p.literals[l]):l!==","||i?(t+=l,l==="("?++i:l===")"&&--i):r()}r()}return f=f.map(t=>new v.Parser(t,this.settings)),function(t){const i=[];for(const s of f)i.push(s.evaluate(t));return g.call(t,...i)}}evaluate(o){const b=this._parts.slice();for(let g=b.length-2;g>=0;--g){const f=b[g];if(f&&f.type==="operator"){const t=b[g+1];b.splice(g+1,1);const i=p.evaluate(t,o);b[g]=p.single(f.value,i)}}return p.operatorsOrder.forEach(g=>{for(let f=1;f<b.length-1;)if(g.includes(b[f])){const t=b[f],i=p.evaluate(b[f-1],o),s=p.evaluate(b[f+1],o);b.splice(f,2);const r=p.calculate(t,i,s);b[f-1]=r===0?0:r}else f+=2}),p.evaluate(b[0],o)}},v.Parser.prototype[p.symbol]=!0,p.reference=function(o){return function(b){return b&&b[o]!==void 0?b[o]:null}},p.evaluate=function(o,b){return o===null?null:typeof o=="function"?o(b):o[p.symbol]?o.evaluate(b):o},p.single=function(o,b){if(o==="!")return!b;const g=-b;return g===0?0:g},p.calculate=function(o,b,g){if(o==="??")return p.exists(b)?b:g;if(typeof b=="string"||typeof g=="string"){if(o==="+")return(b=p.exists(b)?b:"")+(p.exists(g)?g:"")}else switch(o){case"^":return Math.pow(b,g);case"*":return b*g;case"/":return b/g;case"%":return b%g;case"+":return b+g;case"-":return b-g}switch(o){case"<":return b<g;case"<=":return b<=g;case">":return b>g;case">=":return b>=g;case"==":return b===g;case"!=":return b!==g;case"&&":return b&&g;case"||":return b||g}return null},p.exists=function(o){return o!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:S=>{S.exports=JSON.parse('{"version":"17.13.3"}')}},E={},function S(v){var p=E[v];if(p!==void 0)return p.exports;var o=E[v]={exports:{}};return O[v](o,o.exports,S),o.exports}(5107);var O,E})})(zt);var mn=zt.exports,yt={},hn=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(yt,"__esModule",{value:!0});yt.BNExtension=pn;const he=hn(qt);function pn(d){return{type:"BN",base:d.any(),messages:{"bn.nan":"{{#label}} is not a big number","bn.max":'{{#label}} needs to be less than or equal to "{{#threshold}}"',"bn.min":'{{#label}} needs to be greater than or equal to "{{#threshold}}"',"bn.less":'{{#label}} needs to be less than "{{#threshold}}"',"bn.greater":'{{#label}} needs to be greater than "{{#threshold}}"',"bn.positive":"{{#label}} needs to be positive","bn.negative":"{{#label}} needs to be negative"},prepare(x,O){try{return{value:new he.default(x)}}catch{return{errors:O.error("bn.nan")}}},coerce(x){return{value:x.toString(10)}},validate(x){return{value:x}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:x=>he.default.isBN(x),message:"must be a big number",normalize:x=>new he.default(x)},{name:"equal",assert:x=>typeof x=="boolean",message:"must be a boolean"}],validate(x,O,E){const S=new he.default(x);return E.equal&&S.lt(E.threshold)?O.error("bn.min",E):!E.equal&&S.lte(E.threshold)?O.error("bn.greater",E):x}},lt:{args:[{name:"threshold",ref:!0,assert:x=>he.default.isBN(x),message:"must be a big number",normalize:x=>new he.default(x)},{name:"equal",assert:x=>typeof x=="boolean",message:"must be a boolean"}],validate(x,O,E){const S=new he.default(x);return E.equal&&S.gt(E.threshold)?O.error("bn.max",E):!E.equal&&S.gte(E.threshold)?O.error("bn.less",E):x}},min:{alias:"gte",method(x){return this.$_addRule({name:"gt",args:{threshold:x,equal:!0}})}},max:{alias:"lte",method(x){return this.$_addRule({name:"lt",args:{threshold:x,equal:!0}})}},greater:{alias:"gt",method(x){return this.$_addRule({name:"gt",args:{threshold:x,equal:!1}})}},less:{alias:"lt",method(x){return this.$_addRule({name:"lt",args:{threshold:x,equal:!1}})}},positive:{method(){return this.$_addRule({name:"gt",args:{threshold:0,equal:!1}})}},negative:{method(){return this.$_addRule({name:"lt",args:{threshold:0,equal:!1}})}}}}}var bt={},Ye={},ue={},te={};(function(d){var x=M&&M.__createBinding||(Object.create?function(k,T,P,K){K===void 0&&(K=P);var B=Object.getOwnPropertyDescriptor(T,P);(!B||("get"in B?!T.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return T[P]}}),Object.defineProperty(k,K,B)}:function(k,T,P,K){K===void 0&&(K=P),k[K]=T[P]}),O=M&&M.__setModuleDefault||(Object.create?function(k,T){Object.defineProperty(k,"default",{enumerable:!0,value:T})}:function(k,T){k.default=T}),E=M&&M.__importStar||function(k){if(k&&k.__esModule)return k;var T={};if(k!=null)for(var P in k)P!=="default"&&Object.prototype.hasOwnProperty.call(k,P)&&x(T,k,P);return O(T,k),T},S=M&&M.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(d,"__esModule",{value:!0}),d.fromTokenToUnit=d.fromUnitToToken=d.numberToString=d.toHex=d.hexToBytes=d.bytesToHex=d.numberToHex=d.hexToNumber=d.hexToUtf8=d.utf8ToHex=d.toBN=d.isHex=d.isHexStrict=d.isBigNumber=d.isBN=d.stripHexPrefix=d.isHexPrefixed=d.numberToBN=d.rightPad=d.leftPad=d.BN=d.isBase58btc=void 0,d.isUint8Array=se,d.UUID=ke,d.isUUID=fe,d.toUint8Array=et,d.toBuffer=xt,d.toBase58=or,d.fromBase58=lr,d.toBase64=cr,d.fromBase64=ur,d.toAddress=Be,d.toDid=fr,d.isSameDid=dr,d.formatTxType=mr;const v=S(Rr),p=S(Dr),o=S(Tr),b=S(Cr),g=S(It),f=S(Ir),t=S(Pr),i=S(Nr);d.rightPad=i.default;const s=S(Pt);d.leftPad=s.default;const r=S(Lr),e=S(Br),l=S(qt);d.BN=l.default;const n=E(Mr),a="did:abt:",u=new l.default(0),m=new l.default(-1),y={encode:k=>`z${r.default.encode(k)}`,decode:k=>r.default.decode(k.slice(1))},$=k=>{if(typeof k!="string")return!1;if(k[0]==="z")try{return y.decode(k),!0}catch{return!1}return!1};d.isBase58btc=$;const w=k=>{if(typeof k=="string"||typeof k=="number"){let T=new l.default(1);const P=String(k).toLowerCase().trim(),K=P.substr(0,2)==="0x"||P.substr(0,3)==="-0x";let B=(0,d.stripHexPrefix)(P);if(B.substr(0,1)==="-"&&(B=(0,d.stripHexPrefix)(B.slice(1)),T=new l.default(-1,10)),B=B===""?"0":B,!B.match(/^-?[0-9]+$/)&&B.match(/^[0-9A-Fa-f]+$/)||B.match(/^[a-fA-F]+$/)||K===!0&&B.match(/^[0-9A-Fa-f]+$/))return new l.default(B,16).mul(T);if((B.match(/^-?[0-9]+$/)||B==="")&&K===!1)return new l.default(B,10).mul(T)}if((0,d.isBN)(k))return new l.default(k.toString(10),10);throw new Error(`[number-to-bn] while converting number ${JSON.stringify(k)} to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.`)};d.numberToBN=w;const c=k=>{if(typeof k!="string")throw new Error("[is-hex-prefixed] value must be type string");return k.slice(0,2).toLowerCase()==="0x"};d.isHexPrefixed=c;const h=k=>typeof k=="string"&&(0,d.isHexPrefixed)(k)?k.slice(2):k;d.stripHexPrefix=h;const _=k=>k instanceof l.default||k&&k.constructor&&k.constructor.name==="BN";d.isBN=_;const j=k=>k&&k.constructor&&k.constructor.name==="BigNumber";d.isBigNumber=j;const R=k=>((0,p.default)(k)||(0,o.default)(k))&&/^(-)?0x[0-9a-f]*$/i.test(k);d.isHexStrict=R;const D=k=>((0,p.default)(k)||(0,o.default)(k))&&/^(-0x|0x|0X|-0X)?[0-9a-f]*$/i.test(k);d.isHex=D;const C=(k,T=10)=>{try{if(typeof k=="number"&&k>0){const P=Number(k).toLocaleString("fullwide",{useGrouping:!1});return new l.default(P,T)}return(0,d.numberToBN)(k)}catch(P){throw new Error(`${P} Given value: "${k}"`)}};d.toBN=C;const I=k=>{k=n.encode(k);let T="";k=k.replace(/^(?:\u0000)*/,""),k=k.split("").reverse().join(""),k=k.replace(/^(?:\u0000)*/,""),k=k.split("").reverse().join("");for(let P=0;P<k.length;P++){const B=k.charCodeAt(P).toString(16);T+=B.length<2?`0${B}`:B}return`0x${T}`};d.utf8ToHex=I;const L=k=>{if(!(0,d.isHexStrict)(k))throw new Error(`The parameter "${k}" must be a valid HEX string.`);let T="",P=0;k=k.replace(/^0x/i,""),k=k.replace(/^(?:00)*/,""),k=k.split("").reverse().join(""),k=k.replace(/^(?:00)*/,""),k=k.split("").reverse().join("");const K=k.length;for(let B=0;B<K;B+=2)P=parseInt(k.substr(B,2),16),T+=String.fromCharCode(P);return n.decode(T)};d.hexToUtf8=L;const H=k=>k?(0,d.toBN)(k).toNumber():0;d.hexToNumber=H;const z=k=>{if((0,t.default)(k)||typeof k>"u")return k;if(!isFinite(k)&&!(0,d.isHex)(k))throw new Error(`Given input "${k}" is not a number.`);const T=(0,d.toBN)(k),P=T.toString(16);return T.lt(new l.default(0))?`-0x${P.substr(1)}`:`0x${P}`};d.numberToHex=z;const Z=k=>{const T=[];for(let P=0;P<k.length;P++)T.push((k[P]>>>4).toString(16)),T.push((k[P]&15).toString(16));return`0x${T.join("")}`};d.bytesToHex=Z;const F=k=>{if(k=k.toString(16),!(0,d.isHex)(k))throw new Error(`Given value "${k}" is not a valid hex string.`);k=k.replace(/^0x/i,""),k=k.length%2?`0${k}`:k;const T=[];for(let P=0;P<k.length;P+=2)T.push(parseInt(k.substr(P,2),16));return T};d.hexToBytes=F;const q=(k,T=!1)=>se(k)||W.isBuffer(k)?T?"bytes":(0,d.bytesToHex)(k):(0,d.isBase58btc)(k)?T?"bytes":(0,d.bytesToHex)(y.decode(k)):(0,v.default)(k)?T?"bool":k?"0x01":"0x00":(0,b.default)(k)&&!(0,d.isBigNumber)(k)&&!(0,d.isBN)(k)?T?"string":(0,d.utf8ToHex)(JSON.stringify(k)):typeof k=="string"?k.indexOf("-0x")===0||k.indexOf("-0X")===0?T?"int256":(0,d.numberToHex)(k):k.indexOf("0x")===0||k.indexOf("0X")===0?T?"bytes":k:T?"string":(0,d.utf8ToHex)(k):T?+k<0?"int256":"uint256":(0,d.numberToHex)(k);d.toHex=q;const V=k=>{if(typeof k=="string"){if(!k.match(/^-?[0-9.]+$/))throw new Error(`Invalid value '${k}' while converting to string, should be a number matching (^-?[0-9.]+).`);return k}if(typeof k=="number")return Number.isInteger(k)&&k>0?Number(k).toLocaleString("fullwide",{useGrouping:!1}):String(k);if(typeof k=="object"&&k.toString&&(k.toTwos||k.dividedToIntegerBy))return k.toPrecision?String(k.toPrecision()):k.toString(10);throw new Error(`while converting number to string, invalid number value '${k}' type ${typeof k}.`)};d.numberToString=V;const Q=(k,T=18,P={})=>{let K=(0,d.toBN)(k);const B=K.lt(u),ye=(0,d.toBN)(`1${"0".repeat(T)}`,10),Se=ye.toString(10).length-1||1,ae=P||{};B&&(K=K.mul(m));let Y=K.mod(ye).toString(10);for(;Y.length<Se;)Y=`0${Y}`;ae.pad||(Y=Y.match(/^([0-9]*[1-9]|0)(0*)/)[1]);let de=K.div(ye).toString(10);ae.commify&&(de=de.replace(/\B(?=(\d{3})+(?!\d))/g,","));let tt=`${de}${Y==="0"?"":`.${Y}`}`;return B&&(tt=`-${tt}`),tt};d.fromUnitToToken=Q;const ne=(k,T=18)=>{let P=(0,d.numberToString)(k);const K=(0,d.toBN)(`1${"0".repeat(T)}`,10),B=K.toString(10).length-1||1,ye=P.substring(0,1)==="-";if(ye&&(P=P.substring(1)),P===".")throw new Error(`error converting token ${k} to unit, invalid value`);const Se=P.split(".");if(Se.length>2)throw new Error(`error converting token ${k} to unit, too many decimal points`);let ae=Se[0],Y=Se[1];if(ae||(ae="0"),Y||(Y="0"),Y.length>B)throw new Error(`error converting token ${k} to unit, too many decimal places`);for(;Y.length<B;)Y+="0";ae=new l.default(ae),Y=new l.default(Y);let de=ae.mul(K).add(Y);return ye&&(de=de.mul(m)),new l.default(de.toString(10),10)};d.fromTokenToUnit=ne;function se(k){return Object.prototype.toString.call(k)==="[object Uint8Array]"}function ke(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,k=>{const T=Math.random()*16|0;return(k==="x"?T:T&3|8).toString(16)})}function fe(k){return/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(k)}function et(k){let T=null;if([null,void 0,""].includes(k))T=new Uint8Array;else if(W.isBuffer(k))T=new Uint8Array(k);else if((0,d.isHexStrict)(k))T=new Uint8Array((0,d.hexToBytes)(k));else if(se(k))T=new Uint8Array(k);else if((0,d.isBase58btc)(k))T=new Uint8Array(y.decode(k));else if(typeof k=="string")T=new Uint8Array((0,d.hexToBytes)((0,d.toHex)(k)));else throw new Error(`Unsupported input type ${typeof k} detected for toBuffer, only Uint8Array/Buffer/Hex/Base58 are supported`);return T}function xt(k){return W.from(et(k))}function or(k){const T=y.encode(et(k));return W.from(T).toString("utf-8")}function lr(k){if((0,d.isBase58btc)(k)===!1)throw new Error("fromBase58 expect strict base58 encoded string as input");return W.from(y.decode(k))}function cr(k,T=!0){const P=e.default.encode(xt(k));return T?e.default.escape(P):P}function ur(k){if(typeof k!="string")throw new Error("fromBase64 requires input to be a string");return W.from(e.default.unescape(k),"base64")}function Be(k){return k.replace(a,"")}function fr(k){return`${a}${Be(k)}`}function dr(k,T){return Be(k).toLowerCase()===Be(T).toLowerCase()}function mr(k){return(0,g.default)((0,f.default)(k))}})(te);Object.defineProperty(ue,"__esModule",{value:!0});ue.encode=gn;const je=te;function gn(d,x="hex"){return["hex","base16"].includes(x)?(0,je.toHex)(d):x==="base58"?(0,je.toBase58)(d):x==="base64"?(0,je.toBase64)(d):x==="Uint8Array"?(0,je.toUint8Array)(d):x==="buffer"?(0,je.toBuffer)(d):d}var Ae={},yn=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.KeccakHasher=void 0;const bn=yn(Nt),_n=te,vn=ue;class Jt{constructor(){[224,256,384,512].forEach(x=>{const O=`hash${x}`,E=v=>bn.default[`keccak${x}`](v),S=(v,p)=>p===1?E(v):S(E(v),p-1);this[O]=(v,p=1,o="hex")=>{let b=v;try{b=(0,_n.toUint8Array)(v)}catch{}const g=S(b,p);return(0,vn.encode)(`0x${g}`,o)}})}}Ae.KeccakHasher=Jt;Ae.default=new Jt;var Re={};Object.defineProperty(Re,"__esModule",{value:!0});Re.Sha2Hasher=void 0;const wn=te,Me=Hr,$n=ue,xn={sha224:Me.sha224,sha256:Me.sha256,sha384:Me.sha384,sha512:Me.sha512};class Vt{constructor(){[224,256,384,512].forEach(x=>{const O=`hash${x}`,E=xn[`sha${x}`],S=(v,p)=>{let o=v;try{o=(0,wn.toUint8Array)(v)}catch{}return p===1?`0x${E().update(o).digest("hex")}`:S(S(o,1),p-1)};this[O]=(v,p=2,o="hex")=>{const b=S(v,p);return(0,$n.encode)(b,o)}})}}Re.Sha2Hasher=Vt;Re.default=new Vt;var De={},kn=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(De,"__esModule",{value:!0});De.Sha3Hasher=void 0;const Sn=kn(Nt),jn=te,En=ue;class Wt{constructor(){[224,256,384,512].forEach(x=>{const O=`hash${x}`,E=Sn.default[`sha3_${x}`],S=(v,p)=>p===1?E(v):S(E(v),p-1);this[O]=(v,p=1,o="hex")=>{let b=v;try{b=(0,jn.toUint8Array)(v)}catch{}const g=S(b,p);return(0,En.encode)(`0x${g}`,o)}})}}De.Sha3Hasher=Wt;De.default=new Wt;var Te={},Ce={},On=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ce,"__esModule",{value:!0});const An=On(qr);Ce.default=An.default.create("genKeyPair","getPublicKey","sign","verify");var _t=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Te,"__esModule",{value:!0});Te.Ed25519Signer=void 0;const Rn=_t(Fr),Dn=_t(ct),pe=te,Tn=_t(Ce),He=ue,qe=Rn.default.sign;class Yt extends Tn.default{constructor(){super()}genKeyPair(x="hex",O){const E=O?(0,pe.toUint8Array)(O):new Uint8Array((0,Dn.default)(32));if(E.byteLength!==32)throw new Error("Invalid seed to generate key pair");const S=qe.keyPair.fromSeed(E);return S.publicKey=(0,He.encode)(S.publicKey,x),S.secretKey=(0,He.encode)(S.secretKey,x),S}getPublicKey(x,O="hex"){const E=(0,pe.toUint8Array)(x),S=qe.keyPair.fromSecretKey(E).publicKey;return(0,He.encode)(S,O)}sign(x,O,E="hex"){const S=(0,pe.toUint8Array)(O),v=(0,pe.toUint8Array)(x),p=qe.detached(v,S);return(0,He.encode)(p,E)}verify(x,O,E){const S=(0,pe.toUint8Array)(E),v=(0,pe.toUint8Array)(x),p=(0,pe.toUint8Array)(O);return qe.detached.verify(v,p,S)}}Te.Ed25519Signer=Yt;Te.default=new Yt;var Ie={},xe={},vt=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(xe,"__esModule",{value:!0});xe.Secp256k1Signer=void 0;const Cn=vt(Ur()),ee=te,In=vt(ct),Pn=vt(Ce),Fe=ue,Nn=Cn.default.ec,Ue=new Nn("secp256k1");class Gt extends Pn.default{constructor(){super(),this.pkHasFormatPrefix=!0,this.pkCompressed=!1}isValidSK(x){if(x.byteLength!==32)return!1;const O=new ee.BN(x);return O.cmp(Ue.curve.n)<0&&!O.isZero()}genKeyPair(x="hex"){let O=null;do O=new Uint8Array((0,In.default)(32));while(!this.isValidSK(O));const E=this.getPublicKey((0,ee.toHex)(O));return{secretKey:(0,Fe.encode)(O,x),publicKey:(0,Fe.encode)(E,x)}}getPublicKey(x,O="hex"){if(!this.isValidSK((0,ee.toUint8Array)(x)))throw new Error("Invalid secret key");let E=Ue.keyFromPrivate((0,ee.toBuffer)(x)).getPublic(this.pkCompressed,"hex");return this.pkHasFormatPrefix===!1&&(E=E.slice(2)),(0,Fe.encode)(`0x${E}`,O)}sign(x,O,E="hex"){let S=x;try{S=(0,ee.toUint8Array)(x)}catch{}const v=Ue.keyFromPrivate((0,ee.toBuffer)(O)).sign((0,ee.stripHexPrefix)(S),{canonical:!0}).toDER("hex");return(0,Fe.encode)(`0x${v}`,E)}verify(x,O,E){let S=x;try{S=(0,ee.toUint8Array)(x)}catch{}let v=(0,ee.toBuffer)(E);return this.pkHasFormatPrefix===!1&&v[0]!==4&&v.byteLength===64&&(v=W.concat([W.from([4]),v])),Ue.keyFromPublic(v).verify((0,ee.stripHexPrefix)(S),(0,ee.stripHexPrefix)((0,ee.toHex)(O)))}}xe.Secp256k1Signer=Gt;xe.default=new Gt;var Zt=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.EthereumSigner=void 0;const Et=Zt(Kr),Ln=Zt(zr),nt=te,Bn=xe;class Xt extends Bn.Secp256k1Signer{constructor(){super(),this.pkHasFormatPrefix=!1}ethHash(x){const O=(0,nt.isHexStrict)(x)?x:(0,nt.utf8ToHex)(x),E=(0,nt.hexToBytes)(O),S=W.from(E),v=`Ethereum Signed Message:
|
|
8
|
+
${E.length}`,p=W.from(v),o=W.concat([p,S]);return Ln.default.keccak256s(o)}ethSign(x,O){return Et.default.sign(x,O)}ethRecover(x,O){return Et.default.recover(x,O)}}Ie.EthereumSigner=Xt;Ie.default=new Xt;var Pe={},Mn=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.PasskeySigner=void 0;const Ke=te,_e=Jr(),Hn=Mn(Ce);class Qt extends Hn.default{constructor(){super()}genKeyPair(x="hex",O){throw new Error("Not supported")}getPublicKey(x,O="hex"){throw new Error("Not supported")}sign(x,O,E="hex"){throw new Error("Not supported")}async verify(x,O,E,S){const v=JSON.parse(S);if(!v.authenticatorData||!v.clientDataJSON)throw new Error("extra.authenticatorData or extra.clientDataJSON is required for passkey signature verification");const p=(0,Ke.toBuffer)((0,Ke.fromBase64)(v.authenticatorData)),o=await(0,_e.toHash)(_e.isoBase64URL.toBuffer(v.clientDataJSON));if((0,_e.decodeClientDataJSON)(v.clientDataJSON).challenge!==(0,Ke.toBase64)(x))throw new Error("challenge mismatch for passkey signature");return(0,_e.verifySignature)({signature:_e.isoBase64URL.toBuffer(typeof O=="string"?O:(0,Ke.toBase64)(O)),data:_e.isoUint8Array.concat([p,o]),credentialPublicKey:E})}}Pe.PasskeySigner=Qt;Pe.default=new Qt;(function(d){var x=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0}),d.toTxHash=d.Hashers=d.Signers=d.types=d.Hasher=d.Signer=void 0,d.getSigner=t,d.getHasher=i,d.getRandomBytes=s;const O=x(ct),E=ue,S=x(Ae),v=x(Re),p=x(De),o=x(Te),b=x(Ie),g=x(xe),f=x(Pe);d.Signer={Ed25519:o.default,Secp256k1:g.default,Ethereum:b.default,Passkey:f.default},d.Hasher={SHA2:v.default,SHA3:p.default,Keccak:S.default},d.types={KeyType:{ED25519:0,SECP256K1:1,ETHEREUM:2,PASSKEY:3},HashType:{KECCAK:0,SHA3:1,KECCAK_384:2,SHA3_384:3,KECCAK_512:4,SHA3_512:5,SHA2:6},RoleType:{ROLE_ACCOUNT:0,ROLE_NODE:1,ROLE_DEVICE:2,ROLE_APPLICATION:3,ROLE_SMART_CONTRACT:4,ROLE_BOT:5,ROLE_ASSET:6,ROLE_STAKE:7,ROLE_VALIDATOR:8,ROLE_GROUP:9,ROLE_TX:10,ROLE_TETHER:11,ROLE_SWAP:12,ROLE_DELEGATION:13,ROLE_VC:14,ROLE_BLOCKLET:15,ROLE_STORE:16,ROLE_TOKEN:17,ROLE_FACTORY:18,ROLE_ROLLUP:19,ROLE_STORAGE:20,ROLE_PROFILE:21,ROLE_PASSKEY:22,ROLE_ANY:63},EncodingType:{BASE16:0,BASE58:1}};function t(e){if(typeof d.Signers[e]>"u")throw new Error(`Unsupported signer type: ${e}`);return d.Signers[e]}function i(e){if(typeof d.Hashers[e]>"u")throw new Error(`Unsupported hash type: ${e}`);return d.Hashers[e]}function s(e=32,l="hex"){return(0,E.encode)((0,O.default)(e),l)}d.Signers=Object.freeze({[d.types.KeyType.ED25519]:d.Signer.Ed25519,[d.types.KeyType.SECP256K1]:d.Signer.Secp256k1,[d.types.KeyType.ETHEREUM]:d.Signer.Ethereum,[d.types.KeyType.PASSKEY]:d.Signer.Passkey}),d.Hashers=Object.freeze({[d.types.HashType.KECCAK]:d.Hasher.Keccak.hash256,[d.types.HashType.KECCAK_384]:d.Hasher.Keccak.hash384,[d.types.HashType.KECCAK_512]:d.Hasher.Keccak.hash512,[d.types.HashType.SHA3]:d.Hasher.SHA3.hash256,[d.types.HashType.SHA3_384]:d.Hasher.SHA3.hash384,[d.types.HashType.SHA3_512]:d.Hasher.SHA3.hash512,[d.types.HashType.SHA2]:d.Hasher.SHA2.hash256});const r=e=>d.Hasher.SHA2.hash256(e,1,"hex").replace(/^0x/,"").toUpperCase();d.toTxHash=r})(Ye);var er={},J={},re={},qn=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(re,"__esModule",{value:!0});re.toStrictHex=re.toBytes=re.toBits=re.DID_PREFIX=void 0;const tr=qn(Pt),Je=te,rr="did:abt:";re.DID_PREFIX=rr;const Fn=d=>{try{if((0,Je.isHexStrict)(d))return W.from((0,Je.stripHexPrefix)(d),"hex");let x=(0,Je.fromBase58)(d.replace(rr,""));for(;x.length<26;)x=W.concat([W.from([0]),x]);return x}catch(x){throw new Error(`Cannot convert DID string to byte array: ${x.message}`)}};re.toBytes=Fn;const Un=(d,x)=>(0,tr.default)((0,Je.toBN)(d).toString(2),x,"0");re.toBits=Un;const Kn=(d,x)=>{const O=d.replace(/^0x/i,"");return typeof x=="number"&&x%2===0?(0,tr.default)(d,x,"0"):O.length%2===0?O:`0${O}`};re.toStrictHex=Kn;var wt=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(J,"__esModule",{value:!0});J.toChecksumAddress=J.isEthereumDid=J.isEthereumType=J.toTypeInfoStr=J.toTypeInfo=J.fromTypeInfo=J.DID_TYPE_PASSKEY=J.DID_TYPE_ETHEREUM=J.DID_TYPE_ARCBLOCK=void 0;J.DidType=Ze;const ve=te,Ne=wt(It),zn=wt(Lt),Ot=wt(Vr),U=Ye,ge=re,Le={pk:"key",address:"encoding"},at={role:U.types.RoleType.ROLE_ACCOUNT,pk:U.types.KeyType.ED25519,hash:U.types.HashType.SHA3,address:U.types.EncodingType.BASE58};J.DID_TYPE_ARCBLOCK=at;const nr={role:U.types.RoleType.ROLE_PASSKEY,pk:U.types.KeyType.PASSKEY,hash:U.types.HashType.SHA2,address:U.types.EncodingType.BASE58};J.DID_TYPE_PASSKEY=nr;const Ge={role:U.types.RoleType.ROLE_ACCOUNT,pk:U.types.KeyType.ETHEREUM,hash:U.types.HashType.KECCAK,address:U.types.EncodingType.BASE16};J.DID_TYPE_ETHEREUM=Ge;const sr=d=>{const x=["pk","hash","address"];return(0,zn.default)((0,Ot.default)(d,x),(0,Ot.default)(Ge,x))};J.isEthereumType=sr;const ir=d=>{const x=(0,ve.toAddress)(d);return/^(0x)?[0-9a-f]{40}$/i.test(x)?/^(0x|0X)?[0-9a-f]{40}$/.test(x)||/^(0x|0X)?[0-9A-F]{40}$/.test(x)?!0:Jn(x):!1};J.isEthereumDid=ir;const Jn=d=>{const x=d.replace(/^0x/i,""),O=U.Hasher.Keccak.hash256(x.toLowerCase()).replace(/^0x/i,"");for(let E=0;E<40;E++)if(parseInt(O[E],16)>7&&x[E].toUpperCase()!==x[E]||parseInt(O[E],16)<=7&&x[E].toLowerCase()!==x[E])return!1;return!0},Vn=d=>{if(typeof d>"u")return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(d))throw new Error(`Given address "${d}" is not a valid Ethereum address.`);const x=d.toLowerCase().replace(/^0x/i,""),O=U.Hasher.Keccak.hash256(x).replace(/^0x/i,"");let E="0x";for(let S=0;S<x.length;S++)parseInt(O[S],16)>7?E+=x[S].toUpperCase():E+=x[S];return E};J.toChecksumAddress=Vn;function Ze(d={}){let x={};["default","arcblock"].includes(d)?x=at:["eth","ethereum"].includes(d)?x=Ge:["passkey"].includes(d)?x=nr:x={...at,...d};const{role:O,pk:E,hash:S,address:v}=x;Object.keys(x).forEach(o=>{const b=(0,Ne.default)(`${Le[o]||o}Type`);if(Object.values(U.types[b]).includes(x[o])===!1)throw new Error(`Unsupported ${o} type: ${x[o]}`)});const p={role:O,pk:E,hash:S,address:v};return sr(p)===!1&&[U.types.RoleType.ROLE_NODE,U.types.RoleType.ROLE_VALIDATOR,U.types.RoleType.ROLE_TETHER,U.types.RoleType.ROLE_SWAP].includes(p.role)&&(p.hash=U.types.HashType.SHA2),p}Ze.toJSON=d=>Object.keys(d).reduce((x,O)=>{const E=(0,Ne.default)(`${Le[O]||O}Type`),S=Object.keys(U.types[E]),v=Object.values(U.types[E]);return x[O]=S[v.indexOf(d[O])],x},{});Ze.fromJSON=d=>Object.keys(d).reduce((x,O)=>{const E=(0,Ne.default)(`${Le[O]||O}Type`),S=Object.keys(U.types[E]),v=Object.values(U.types[E]);return x[O]=v[S.indexOf(d[O])],x},{});const Wn=d=>{const x=Ze(d),O=(0,ge.toBits)(x.role,6),E=(0,ge.toBits)(x.pk,5),S=(0,ge.toBits)(x.hash,5),v=`${O}${E}${S}`,p=(0,ve.stripHexPrefix)((0,ve.numberToHex)(parseInt(v,2)));return(0,ge.toStrictHex)(p,4)};J.fromTypeInfo=Wn;const ar=d=>{let x={};try{if(ir(d))x=Ge;else{const E=(0,ge.toBytes)(d).slice(0,2),S=(0,ge.toStrictHex)(W.from(E).toString("hex")),v=(0,ge.toBits)(new ve.BN(S,16),16),p=v.slice(0,6),o=v.slice(6,11),b=v.slice(11,16);x={role:parseInt(p,2),pk:parseInt(o,2),hash:parseInt(b,2),address:(0,ve.isHex)((0,ve.toAddress)(d))?U.types.EncodingType.BASE16:U.types.EncodingType.BASE58}}return Object.keys(x).forEach(O=>{Object.values(U.types[`${(0,Ne.default)(Le[O]||O)}Type`]).includes(x[O])===!1&&delete x[O]}),x}catch{return x}};J.toTypeInfo=ar;const Yn=d=>{const x=ar(d);return Object.keys(x).reduce((O,E)=>{const S=U.types[`${(0,Ne.default)(Le[E]||E)}Type`];return O[E]=Object.keys(S).find(v=>S[v]===x[E]),O},{})};J.toTypeInfoStr=Yn;(function(d){Object.defineProperty(d,"__esModule",{value:!0}),d.DID_TYPE_PASSKEY=d.DID_TYPE_ETHEREUM=d.DID_TYPE_ARCBLOCK=d.DID_PREFIX=d.DidType=d.fromTypeInfo=d.toTypeInfoStr=d.toTypeInfo=d.isEthereumType=d.isEthereumDid=d.isValid=d.isFromPublicKey=d.toDid=d.toAddress=d.fromHash=d.fromPublicKeyHash=d.fromPublicKey=d.fromSecretKey=d.toStrictHex=d.types=void 0;const x=Ye;Object.defineProperty(d,"types",{enumerable:!0,get:function(){return x.types}});const O=te;Object.defineProperty(d,"toAddress",{enumerable:!0,get:function(){return O.toAddress}}),Object.defineProperty(d,"toDid",{enumerable:!0,get:function(){return O.toDid}});const E=J;Object.defineProperty(d,"DidType",{enumerable:!0,get:function(){return E.DidType}}),Object.defineProperty(d,"DID_TYPE_ARCBLOCK",{enumerable:!0,get:function(){return E.DID_TYPE_ARCBLOCK}}),Object.defineProperty(d,"DID_TYPE_ETHEREUM",{enumerable:!0,get:function(){return E.DID_TYPE_ETHEREUM}}),Object.defineProperty(d,"DID_TYPE_PASSKEY",{enumerable:!0,get:function(){return E.DID_TYPE_PASSKEY}}),Object.defineProperty(d,"fromTypeInfo",{enumerable:!0,get:function(){return E.fromTypeInfo}}),Object.defineProperty(d,"isEthereumDid",{enumerable:!0,get:function(){return E.isEthereumDid}}),Object.defineProperty(d,"isEthereumType",{enumerable:!0,get:function(){return E.isEthereumType}}),Object.defineProperty(d,"toTypeInfo",{enumerable:!0,get:function(){return E.toTypeInfo}}),Object.defineProperty(d,"toTypeInfoStr",{enumerable:!0,get:function(){return E.toTypeInfoStr}});const S=re;Object.defineProperty(d,"DID_PREFIX",{enumerable:!0,get:function(){return S.DID_PREFIX}}),Object.defineProperty(d,"toStrictHex",{enumerable:!0,get:function(){return S.toStrictHex}});const v=(t,i)=>{const s=(0,E.DidType)(i),r=(0,x.getSigner)(s.pk).getPublicKey(t);return p(r.indexOf("0x")===0?r:`0x${r}`,s)};d.fromSecretKey=v;const p=(t,i)=>{const s=(0,E.DidType)(i),e=(0,x.getHasher)(s.hash)(t,1);return o(e,s)};d.fromPublicKey=p;const o=(t,i)=>{const s=(0,E.DidType)(i),r=(0,O.stripHexPrefix)(t).slice(0,40),e=(0,x.getHasher)(s.hash),l=(0,E.fromTypeInfo)(s),n=(0,O.stripHexPrefix)(e(`0x${l}${r}`,1)).slice(0,8),a=`0x${l}${r}${n}`;return(0,E.isEthereumType)(s)?(0,E.toChecksumAddress)(`0x${t.slice(-40)}`):s.address===x.types.EncodingType.BASE58?(0,O.toBase58)(a):a};d.fromPublicKeyHash=o;const b=(t,i=x.types.RoleType.ROLE_ACCOUNT)=>{const s=Object.keys(x.types.RoleType),r=Object.values(x.types.RoleType);if(r.indexOf(i)===-1)throw new Error(`Unsupported role type ${i} when gen ddi from hash`);const e=(0,E.DidType)({role:x.types.RoleType[s[r.indexOf(i)]]});return o(t,e)};d.fromHash=b;const g=(t,i)=>{if(f(t)===!1)return!1;const s=(0,E.toTypeInfo)(t),r=p(i,s),e=t.replace(S.DID_PREFIX,"");return r===e};d.isFromPublicKey=g;const f=t=>{if(!t)return!1;const i=(0,O.toAddress)(String(t)),{hash:s}=(0,E.toTypeInfo)(i);if(typeof s>"u")return!1;if((0,E.isEthereumDid)(i))return!0;const r=(0,x.getHasher)(s),e=(0,S.toBytes)(i),l=(0,S.toStrictHex)(W.from(e.slice(0,22)).toString("hex")),n=(0,S.toStrictHex)(W.from(e.slice(22,26)).toString("hex")),a=(0,O.stripHexPrefix)(r(`0x${l}`,1)).slice(0,8);return n===a};d.isValid=f})(er);var Gn=M&&M.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(bt,"__esModule",{value:!0});bt.DIDExtension=Zn;const st=Gn(Lt),it=Ye,ie=er,ze={pk:Object.keys(it.types.KeyType),hash:Object.keys(it.types.HashType),role:Object.keys(it.types.RoleType)};function Zn(d){return{type:"DID",base:d.string().trim(),messages:{"did.empty":'Expect {{#label}} to be non-empty string, got "{{#value}}"',"did.invalid":'Expect {{#label}} to be valid did, got "{{#value}}"',"did.wallet":'Expect wallet type of {{#label}} to be "{{#expected}}" wallet, got "{{#actual}}"',"did.pk":'Expect pk type of {{#label}} to be "{{#expected}}", got "{{#actual}}"',"did.hash":'Expect hash type of {{#label}} to be "{{#expected}}", got "{{#actual}}"',"did.role":'Expect role type of {{#label}} to be "{{#expected}}", got "{{#actual}}"',"did.prefix":'Expect prefix of {{#label}} to be "{{#expected}}"'},validate(x,O){return!x||typeof x!="string"?{errors:O.error("did.empty",{value:x})}:(0,ie.isValid)(x)===!1?{errors:O.error("did.invalid",{value:x})}:{value:x}},rules:{type:{args:[{name:"key",ref:!0,assert:x=>Object.keys(ze).includes(x),message:`must be one of ${Object.keys(ze).join(", ")}`},{name:"expected",assert:x=>Object.keys(ze).some(O=>ze[O].includes(x)),message:"must be valid type"}],validate(x,O,E){const S=(0,ie.toTypeInfoStr)(x);return E.key==="pk"&&S.pk!==E.expected?O.error("did.pk",{...E,actual:S.pk}):E.key==="hash"&&S.hash!==E.expected?O.error("did.hash",{...E,actual:S.hash}):E.key==="role"&&S.role!==E.expected?O.error("did.role",{...E,actual:S.role}):x}},pk:{method(x){return this.$_addRule({name:"type",args:{key:"pk",expected:x}})}},hash:{method(x){return this.$_addRule({name:"type",args:{key:"hash",expected:x}})}},role:{method(x){return this.$_addRule({name:"type",args:{key:"role",expected:x}})}},wallet:{method(x){return this.$_addRule({name:"wallet",args:{type:x}})},args:[{name:"type",ref:!0,assert:x=>["arcblock","ethereum","default","eth","passkey"].includes(x),message:"must be a string",normalize:x=>x.trim()}],validate(x,O,E={}){const S=(0,ie.toTypeInfo)(x),v=(0,ie.toTypeInfoStr)(x);return["ethereum","eth"].includes(E.type)&&(0,st.default)(S,ie.DID_TYPE_ETHEREUM)===!1?O.error("did.wallet",{expected:E.type,actual:JSON.stringify(v)}):["arcblock","default"].includes(E.type)&&(0,st.default)(S,ie.DID_TYPE_ARCBLOCK)===!1?O.error("did.wallet",{expected:E.type,actual:JSON.stringify(v)}):["passkey"].includes(E.type)&&(0,st.default)(S,ie.DID_TYPE_PASSKEY)===!1?O.error("did.wallet",{expected:E.type,actual:JSON.stringify(v)}):x}},prefix:{method(x=""){return this.$_addRule({name:"prefix",args:{str:x}})},args:[{name:"str",ref:!0,assert:x=>["",ie.DID_PREFIX].includes(x),message:"must be a string",normalize:x=>x.trim()}],validate(x,O,E={}){return E.str&&x.startsWith(E.str)===!1?O.error("did.prefix",{expected:E.str}):!E.str&&(0,ie.toAddress)(x)!==x?O.error("did.prefix",{expected:E.str}):x}}}}}(function(d){var x=M&&M.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(d,"__esModule",{value:!0}),d.patterns=d.schemas=d.Joi=void 0;const O=x(mn),E=yt,S=bt;d.Joi=O.default.extend(S.DIDExtension).extend(E.BNExtension);const v=/^(0x)?([A-Fa-f0-9]{64})$/,p=d.Joi.object({genesisTime:d.Joi.date().iso().required().raw(),genesisTx:d.Joi.string().regex(v).required().allow(""),renaissanceTime:d.Joi.date().iso().required().raw(),renaissanceTx:d.Joi.string().regex(v).required().allow("")}),o=d.Joi.object({address:d.Joi.DID().prefix().role("ROLE_TOKEN").required(),value:d.Joi.BN().positive().required()}),b=d.Joi.object({name:d.Joi.string().min(1).max(256).required(),value:d.Joi.string().min(1).max(1024).required(),description:d.Joi.string().min(1).max(256).optional().allow(""),required:d.Joi.boolean().optional().default(!1)}),g=d.Joi.alternatives().try(d.Joi.DID().prefix().role("ROLE_ACCOUNT"),d.Joi.DID().prefix().role("ROLE_APPLICATION"),d.Joi.DID().prefix().role("ROLE_BLOCKLET"),d.Joi.DID().prefix().wallet("ethereum"),d.Joi.DID().prefix().wallet("passkey")),f=d.Joi.array().items(d.Joi.object({owner:g.required(),tokensList:d.Joi.array().items(o).default([]),assetsList:d.Joi.array().items(d.Joi.DID().prefix().role("ROLE_ASSET")).default([])})),t=d.Joi.array().items({signer:d.Joi.DID().prefix().required(),pk:d.Joi.any().required(),signature:d.Joi.any().required(),delegator:d.Joi.DID().prefix().valid("").optional(),data:d.Joi.any().optional()}),i=d.Joi.object({type:d.Joi.string().min(1).max(32).required(),contractAddress:d.Joi.DID().prefix().wallet("ethereum").required(),chainType:d.Joi.string().min(1).max(32).required(),chainName:d.Joi.string().min(1).max(32).required(),chainId:d.Joi.number().positive().required()}),s=d.Joi.object({type:d.Joi.string().valid("svg","url","uri").required(),content:d.Joi.string().when("type",{is:"uri",then:d.Joi.string().max(20480).dataUri().required()}).when("type",{is:"url",then:d.Joi.string().max(2048).uri({scheme:["http","https"]}).required()})}),r=d.Joi.object({id:d.Joi.string().max(2048).uri({scheme:["http","https"]}).required(),scope:d.Joi.string().valid("public","private").default("public")}),e=d.Joi.object({id:d.Joi.DID().prefix().required(),pk:d.Joi.string().required(),name:d.Joi.string().min(1).max(256).required()}),l={address:d.Joi.DID().prefix().role("ROLE_ASSET").required(),moniker:d.Joi.string().min(2).max(255).required(),data:d.Joi.any().required(),readonly:d.Joi.boolean().default(!1),transferrable:d.Joi.boolean().default(!1),ttl:d.Joi.number().min(0).default(0),parent:d.Joi.DID().prefix().optional().allow(""),issuer:d.Joi.DID().prefix().optional().allow(""),endpoint:r.optional().allow(null).default(null),display:s.optional().allow(null).default(null),tags:d.Joi.array().items(d.Joi.string().min(1).max(64)).max(4).optional()},n={address:d.Joi.DID().prefix().role("ROLE_FACTORY").required(),name:d.Joi.string().min(2).max(255).required(),description:d.Joi.string().min(2).max(255).required(),settlement:d.Joi.string().valid("instant","periodic").default("instant"),limit:d.Joi.number().integer().min(0).default(0),trustedIssuers:d.Joi.array().items(d.Joi.DID().prefix()).max(8).optional(),data:d.Joi.any().optional().allow(null).default(null),display:s.optional().allow(null).default(null),input:d.Joi.object({value:d.Joi.BN().positive().min("0").default("0"),tokens:d.Joi.array().items(o).max(8).optional(),assets:d.Joi.array().items(d.Joi.alternatives().try(d.Joi.DID().prefix().role("ROLE_ASSET"),d.Joi.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:d.Joi.array().items(d.Joi.object({name:d.Joi.string().min(1).max(255).required(),description:d.Joi.string().max(255).optional().allow(""),required:d.Joi.boolean().required()})).optional()}),output:d.Joi.object({moniker:d.Joi.string().min(2).max(255).required(),data:d.Joi.any().required(),readonly:d.Joi.boolean().default(!1),transferrable:d.Joi.boolean().default(!1),ttl:d.Joi.number().min(0).default(0),parent:d.Joi.string().max(255).required(),issuer:d.Joi.string().max(255).required(),endpoint:r.optional(),display:s.optional(),tags:d.Joi.array().items(d.Joi.string().min(1).max(64)).max(4).optional()}),hooks:d.Joi.array().items(d.Joi.object({name:d.Joi.string().valid("mint","postMint","preMint").required(),type:d.Joi.string().valid("url","contract").required(),hook:d.Joi.string().min(1).max(4096).required(),compiled:d.Joi.array().items(d.Joi.object()).optional()})).optional()};d.schemas={context:p,tokenInput:o,multiInput:f,multiSig:t,foreignToken:i,variableInput:b,nftDisplay:s,nftEndpoint:r,nftIssuer:e,tokenHolder:g,assetProps:l,assetSchema:d.Joi.object(l).options({stripUnknown:!0,noDefaults:!1}),factoryProps:n,factorySchema:d.Joi.object(n).options({stripUnknown:!0,noDefaults:!1})},d.patterns={txHash:v}})(Kt);function $t({onCancel:d,onSuccess:x,blocklet:O}){var l,n;const{vaults:E=[],appPid:S}=O,{t:v,locale:p}=Oe(),{connectApi:o}=Mt(),{api:b}=$e(),{teamDid:g}=Ht(),[f,t]=Bt({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});X.useEffect(()=>{if(!oe.isValid(f.address))return;const a=oe.toAddress(f.address),u=f.fetched.find(y=>y.address===a),m=f.errored.find(y=>y.address===a);!f.fetching&&!u&&!m&&(t({fetching:!0}),Er(Wr.MAIN_CHAIN_ENDPOINT).getAccountState({address:a}).then($=>{$.state?t({fetching:!1,fetched:[...f.fetched.filter(w=>w.address!==a),$.state]}):t({fetching:!1,errored:[...f.errored.filter(w=>w.address!==a),{address:a}]})}).catch($=>{console.error($),t({fetching:!1,error:Ee($)})}))},[f.address,f.fetching]),X.useEffect(()=>{if(f.address){const a=oe.toAddress(f.address);if(!oe.isValid(a)){t({error:v("blocklet.config.vault.error.invalid")});return}if(Kt.schemas.tokenHolder.validate(a).error){t({error:v("blocklet.config.vault.error.holder")});return}if(E.find(m=>m.did===a)){t({error:v("blocklet.config.vault.error.duplicate")});return}if(Xr([O.appDid,O.appPid,...O.migratedFrom.map(m=>m.appDid)].filter(Boolean)).includes(a)){t({error:v("blocklet.config.vault.error.appDid")});return}}t({error:""})},[f.address]);const i=async()=>{t({loading:!0});try{const a=await b.configVault({input:{teamDid:g,vaultDid:oe.toAddress(f.address)}});o.open({locale:p,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:a.sessionId},messages:{title:v("blocklet.config.vault.approve.title"),scan:v(`blocklet.config.vault.approve.${E.length>0?"byLast":"byOwner"}`),confirm:v("blocklet.config.vault.approve.confirm"),success:v("blocklet.config.vault.approve.success")},onSuccess:()=>{o.open({locale:p,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:a.sessionId},messages:{title:v("blocklet.config.vault.commit.title"),scan:v("blocklet.config.vault.commit.scan"),confirm:v("blocklet.config.vault.commit.confirm"),success:v("blocklet.config.vault.commit.success")},onSuccess:()=>{t({loading:!1}),x()},onClose:()=>{t({loading:!1}),o.close()}})},onClose:()=>{t({loading:!1}),o.close()}})}catch(a){t({loading:!1,error:Ee(a)})}},s=oe.toAddress(f.address),r=[];oe.isValid(s)&&r.push({key:v("blocklet.config.vault.role"),value:A.jsx(_r,{color:"primary",variant:"outlined",size:"small",label:oe.toTypeInfoStr(s).role||"-"})});const e=f.fetched.find(a=>a.address===s);return e&&r.push({key:v("blocklet.config.vault.firstSeen"),value:kt((l=e.context)==null?void 0:l.genesisTime,"-")},{key:v("blocklet.config.vault.lastSeen"),value:kt((n=e.context)==null?void 0:n.renaissanceTime,"-")},{key:v("blocklet.config.vault.migratedFrom"),value:e.migratedFrom.length?e.migratedFrom.map(a=>A.jsx(St,{did:a,showQrcode:!0,compact:!0,size:14,locale:p},a)):"-"},{key:v("blocklet.config.vault.migratedTo"),value:e.migratedTo.length?e.migratedTo.map(a=>A.jsx(St,{did:a,showQrcode:!0,compact:!0,size:14,locale:p},a)):"-"}),A.jsx(Ct,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:d,title:A.jsxs(N,{sx:{display:"flex",alignItems:"center",gap:1},children:[A.jsx(mt,{}),v("blocklet.config.vault.title")]}),actions:A.jsxs(A.Fragment,{children:[A.jsx(ce,{onClick:d,children:v("common.cancel")}),A.jsx(ce,{onClick:i,variant:"contained",disabled:!!f.error||f.loading,children:v("common.confirm")})]}),children:A.jsxs(vr,{direction:"column",spacing:3,children:[A.jsxs(we,{variant:"body1",color:"text.secondary",gutterBottom:!0,children:[v("blocklet.config.vault.desc")," ",v("blocklet.config.vault.tip")]}),E.length>0&&A.jsxs(N,{children:[A.jsxs(we,{variant:"body1",color:"text.secondary",gutterBottom:!0,children:[v("blocklet.config.vault.current"),":"]}),A.jsxs(N,{sx:{display:"flex",alignItems:"center",gap:.5},children:[A.jsx(en,{did:E[E.length-1].did,showQrcode:!0,style:{width:"auto"}}),A.jsx(tn,{vaults:E,appPid:S})]})]}),A.jsx(wr,{fullWidth:!0,"data-cy":"input-factory-address",label:v("blocklet.config.vault.address"),error:!!f.error,helperText:f.error,value:f.address,InputProps:{endAdornment:f.fetching?A.jsx($r,{position:"end",children:A.jsx(Ve,{size:16})}):null},onChange:a=>{t({address:a.target.value,error:""})}}),A.jsx(N,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:r.map(a=>A.jsx(Qr,{valueComponent:"div",nameWidth:120,name:a.key,children:a.value},a.key))})]})})}$t.propTypes={onCancel:G.func.isRequired,onSuccess:G.func.isRequired,blocklet:G.object.isRequired};$t.defaultProps={};function Xn({teamDid:d,size:x="small",...O}){const{t:E}=Oe(),{api:S}=$e(),[v,p]=X.useState(!1),[o,b]=X.useState(null),g=()=>{p(!1),b(null)},f=async()=>{var i;try{p(!0);const s=await S.rotateSessionKey({input:{teamDid:d}});le.success(E("blocklet.config.rotateSessionKey.success",{count:((i=s.removed)==null?void 0:i.length)||0})),setTimeout(()=>{window.location.reload()},1e3)}catch(s){le.error(Ee(s))}finally{p(!1),b(null)}},t={title:E("blocklet.config.rotateSessionKey.title"),description:E("blocklet.config.rotateSessionKey.description"),confirm:E("common.confirm"),cancel:E("common.cancel"),onConfirm:f,onCancel:g};return A.jsxs("div",{...O,children:[A.jsxs(ce,{onClick:()=>b(t),color:"error",variant:"outlined",size:x,children:[v?A.jsx(Ve,{size:16,style:{marginRight:5}}):null,E("blocklet.config.rotateSessionKey.action")]}),o&&A.jsx(ut,{title:o.title,description:o.description,confirm:o.confirm,cancel:o.cancel,onConfirm:o.onConfirm,onCancel:o.onCancel})]})}function Xe({blocklet:d,onUpdate:x,hasPermission:O}){var m,y;const{api:E,inService:S}=$e(),{t:v}=X.useContext(Yr),[p,o]=Bt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),b=!!((y=(m=d==null?void 0:d.settings)==null?void 0:m.invite)!=null&&y.enabled),g=p.loading||!O,{did:f}=d.meta;if(Rt(d.status))return null;const t=d.environments.find($=>$.key===me.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),i=!t||t.value==="yes",s=d.environments.find($=>$.key===me.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE),r=(s==null?void 0:s.value)||me.BLOCKLET_TENANT_MODES.SINGLE,e=($,w)=>async c=>{if(!p.loading){o({loading:!0});try{const{checked:h}=c.target,{blocklet:_}=await E.configBlocklet({input:{did:d.meta.did,configs:[{key:me.BLOCKLET_CONFIGURABLE_KEY[$],value:w(h)}]}});x(_)}catch(h){le.error(h.message)}finally{o({loading:!1})}}},l=e("BLOCKLET_DELETABLE",$=>$?"no":"yes"),n=e("BLOCKLET_APP_TENANT_MODE",$=>$?me.BLOCKLET_TENANT_MODES.MULTIPLE:me.BLOCKLET_TENANT_MODES.SINGLE),a=async $=>{if(!p.loading){o({loading:!0});try{await E.updateInviteSettings({input:{did:d.meta.did,invite:{enabled:$.target.checked}}})}catch(w){le.error(w.message)}finally{o({loading:!1})}}},u=async()=>{if(!p.loading){o({loading:!0});try{const{blocklet:$}=await E.getBlocklet({input:{did:d.meta.did}});x($)}catch($){le.error($.message)}finally{o({loading:!1})}}};return A.jsxs(N,{px:2,py:1,sx:{border:"1px solid red",borderRadius:2},className:"advanced-config",children:[!S&&A.jsx(N,{className:"config-form",children:!S&&A.jsxs(N,{className:"config-item",children:[A.jsxs(N,{className:"config-label",children:[v("blocklet.config.deletable.name"),A.jsx(N,{className:"config-desc",children:v(i?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable")})]}),A.jsx(rt,{disabled:g,checked:!i,defaultChecked:!0,onChange:l})]})}),A.jsx(pt,{inService:S,disabled:g,loading:p.loading,onChange:u}),S&&A.jsx(Or,{role:"owner",children:$=>($||ln)&&A.jsxs(A.Fragment,{children:[A.jsxs(N,{className:"config-form",mt:2,children:[A.jsxs(N,{className:"config-item",children:[A.jsxs(N,{className:"config-label",mb:0,children:[v("blocklet.config.vault.title"),A.jsx(N,{className:"config-desc",children:v("blocklet.config.vault.desc")})]}),A.jsxs(ce,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>o({showConfigVault:!0}),children:[A.jsx(mt,{style:{fontSize:"1.3em",marginRight:4}}),v("blocklet.config.vault.title")]})]}),p.showConfigVault&&A.jsx($t,{blocklet:d,onCancel:()=>o({showConfigVault:!1}),onSuccess:()=>o({showConfigVault:!1})})]}),A.jsxs(N,{className:"config-form",mt:2,children:[A.jsxs(N,{className:"config-item",children:[A.jsxs(N,{className:"config-label",mb:0,children:[v("team.transferApp.name"),A.jsx(N,{className:"config-desc",children:v("team.transferApp.description")})]}),A.jsxs(ce,{style:{flexShrink:0},variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>o({showTransferOwner:!0}),children:[A.jsx(Ft,{style:{fontSize:"1.3em",marginRight:4}}),v("team.transferApp.name")]})]}),p.showTransferOwner&&A.jsx(gt,{onCancel:()=>o({showTransferOwner:!1}),onSuccess:()=>o({showTransferOwner:!1})})]})]})}),A.jsx(N,{className:"config-form",mt:2,children:A.jsxs(N,{className:"config-item",children:[A.jsxs(N,{className:"config-label",children:[v("blocklet.config.clearCache.name"),A.jsx(N,{className:"config-desc",children:v("blocklet.config.clearCache.purpose")})]}),A.jsx(cn,{teamDid:f})]})}),A.jsx(N,{className:"config-form",mt:2,children:A.jsxs(N,{className:"config-item",children:[A.jsxs(N,{className:"config-label",children:[v("blocklet.config.rotateSessionKey.name"),A.jsx(N,{className:"config-desc",children:v("blocklet.config.rotateSessionKey.purpose")})]}),A.jsx(Xn,{style:{marginLeft:"16px",whiteSpace:"nowrap"},teamDid:f})]})}),A.jsx(N,{className:"config-form",mt:2,children:A.jsxs(N,{className:"config-item",children:[A.jsxs(N,{className:"config-label",children:[v("blocklet.config.tenantMode.name"),A.jsx(N,{className:"config-desc",children:v(`blocklet.config.tenantMode.${r}`)})]}),A.jsx(rt,{disabled:g,checked:r===me.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:n})]})}),A.jsx(N,{className:"config-form",mt:2,children:A.jsxs(N,{className:"config-item",children:[A.jsxs(N,{className:"config-label",children:[v("team.invite.setting"),A.jsx(N,{className:"config-desc",children:v(`team.invite.${b?"enabled":"disabled"}`)})]}),A.jsx(rt,{disabled:g,checked:b,onChange:a})]})})]})}const Qn=We(Xe,"mutate_blocklets"),es=We(Xe,"",Dt);function ts(d){const{inService:x}=$e();return x?A.jsx(es,{...d}):A.jsx(Qn,{...d})}Xe.propTypes={blocklet:G.object.isRequired,onUpdate:G.func,hasPermission:G.bool};Xe.defaultProps={onUpdate:()=>{},hasPermission:!1};function Qe({blocklet:d,onUpdate:x,hasPermission:O}){return Rt(d.status)?null:A.jsx(ss,{children:A.jsx(ts,{blocklet:d,onUpdate:x,hasPermission:O})})}const rs=We(Qe,"mutate_blocklets"),ns=We(Qe,"",Dt);function Cs(d){const{inService:x}=$e();return x?A.jsx(ns,{...d}):A.jsx(rs,{...d})}Qe.propTypes={blocklet:G.object.isRequired,onUpdate:G.func,hasPermission:G.bool};Qe.defaultProps={onUpdate:()=>{},hasPermission:!1};const ss=At(N)`
|
|
9
|
+
max-width: 900px;
|
|
10
|
+
|
|
11
|
+
.advanced-config {
|
|
12
|
+
border: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.config-form {
|
|
17
|
+
flex-grow: 1;
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
will-change: transform;
|
|
20
|
+
|
|
21
|
+
&:first-child {
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
${d=>d.theme.breakpoints.down("md")} {
|
|
26
|
+
width: 100%;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
padding: 0 24px;
|
|
29
|
+
transform: translate(0, 0);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.config-item {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: space-between;
|
|
37
|
+
margin: 4px 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.config-desc {
|
|
41
|
+
font-weight: normal;
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
color: #666;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.form-item {
|
|
47
|
+
margin-top: 0;
|
|
48
|
+
}
|
|
49
|
+
`;export{Cs as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as a}from"./vendor-utils-Cs6ARqvU.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as l}from"./iframe-B5D34SYo.js";import{y as i}from"./vendor-utils-Cs6ARqvU.js";import{m as p}from"./vendor-ux-did-connect-CWUKGZcn.js";import{r as d}from"./vendor-react-DoD83n6N.js";import{A as f,D as h}from"./index-BWpwjp4L.js";import{j as e,a4 as u,a3 as x}from"./vendor-mui-core-BL-xsBvI.js";import"./vendor-arcblock-B7hyNlnQ.js";import"./vendor-hooks-DnflU2EL.js";import"./lottie-web-B6s7dDoL.js";function R(){const{info:n,inService:r}=f(),{blocklet:m}=h(),s="calc(100vh - 430px)",[a,c]=d.useState(!0);let t="";r?t=p.WELLKNOWN_SERVICE_PATH_PREFIX:t=n.routing.adminPath;const o=new URLSearchParams;return r||o.set("authKey","__sst"),o.set("schemaKey",i(window.location.origin,t,`/api/theme?id=${encodeURIComponent(m.appDid)}`)),e.jsxs(e.Fragment,{children:[a&&e.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:s},children:e.jsx(x,{})}),e.jsx(l,{url:`${i(window.location.origin,t,"/hosted/theme-builder/")}?${o.toString()}`,frameBorder:0,styles:{border:0,width:"100%",height:s,display:a?"none":"block"},onLoad:()=>{c(!1)}})]})}export{R as default};
|