@abtnode/blocklet-services 1.17.8-beta-20260104-120132-cb5b1914 → 1.17.8-beta-20260106-113136-b3c09e14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AdapterDayjs-DyRP0A_7.js → AdapterDayjs-DafRMFLg.js} +1 -1
- package/dist/assets/Community-3AO97CCq.js +1 -0
- package/dist/assets/{Google-Bjq5o7qL.js → Google-DRu937I3.js} +1 -1
- package/dist/assets/Holiday-CqSw2e8m.js +1 -0
- package/dist/assets/Meeting-DKbNRI16.js +1 -0
- package/dist/assets/OffSick-BvEREz3_.js +1 -0
- package/dist/assets/WorkingRemotely-DNtYHcSB.js +1 -0
- package/dist/assets/{access-control-Cv1j0YWJ.js → access-control-cgo5Z15_.js} +1 -1
- package/dist/assets/{add-component-core-8nx00xJP.js → add-component-core-BfzNEcS5.js} +7 -7
- package/dist/assets/{add-resource-B3-VwSQg.js → add-resource-CYRgZ1ps.js} +1 -1
- package/dist/assets/addon-qN24wAb4.js +14 -0
- package/dist/assets/advanced-1Vu6rcXU.js +14 -0
- package/dist/assets/{aigne-Dehkd-7B.js → aigne-D6MrXXCU.js} +1 -1
- package/dist/assets/api-DwxIBXZs.js +1 -0
- package/dist/assets/{appearance-CkrEEbhp.js → appearance-DOQHBg9p.js} +1 -1
- package/dist/assets/arrow-down.svg-7ME6T1BL.js +1 -0
- package/dist/assets/{audit-logs-XPxQHo2y.js → audit-logs-ISyoqJFp.js} +2 -2
- package/dist/assets/{authorize-ByHCjaXS.js → authorize-B9RLEFal.js} +1 -1
- package/dist/assets/{base-chart-ChBZtUEG.js → base-chart-DhxjAyBU.js} +1 -1
- package/dist/assets/base32-_D4eWUeh.js +1 -0
- package/dist/assets/bind-account-CLIjYy96.js +1 -0
- package/dist/assets/{branding-CBzX3Xum.js → branding-C81Kt22j.js} +1 -1
- package/dist/assets/{branding-khY0G2TO.js → branding-iwUveEf5.js} +2 -2
- package/dist/assets/branding-myiZl37D.js +1 -0
- package/dist/assets/{bundle-avatar-Dtpi1uSw.js → bundle-avatar-Cc_6nw01.js} +1 -1
- package/dist/assets/button-D-lyR9BW.js +1 -0
- package/dist/assets/{click-to-copy-BEM1P78p.js → click-to-copy-CMo42VnK.js} +1 -1
- package/dist/assets/cloneDeep-BY8zW7hH.js +1 -0
- package/dist/assets/{complete-CuyAiV3B.js → complete-CJ_buCAS.js} +4 -4
- package/dist/assets/{component-nxxcEAFR.js → component-Dip3v1Iq.js} +3 -3
- package/dist/assets/config-44sI5I0w.js +53 -0
- package/dist/assets/{config-DOcJbRFr.js → config-D5KnWqfn.js} +1 -1
- package/dist/assets/{config-DweHAJPq.js → config-D8XZj8JI.js} +2 -2
- package/dist/assets/{config-navigation-BG6durqz.js → config-navigation-Ni0iczgA.js} +8 -8
- package/dist/assets/config-space-B6_f52sE.js +1 -0
- package/dist/assets/{confirm-BRnYfcDD.js → confirm-Lb1MrAdS.js} +1 -1
- package/dist/assets/connect-0OZVqJvc.js +1 -0
- package/dist/assets/connect-B9GQZEi7.js +5 -0
- package/dist/assets/connect-BV6BUhDJ.css +1 -0
- package/dist/assets/connect-JAX_oP3o.js +5 -0
- package/dist/assets/{connect-to-BEfFI4oa.js → connect-to-Djgj6TLg.js} +1 -1
- package/dist/assets/{create-passport-svg-BKhJ2ufW.js → create-passport-svg-5AYzBKFb.js} +1 -1
- package/dist/assets/createClass-DXYd7BIe.js +1 -0
- package/dist/assets/{dashboard-CDOqgUmx.js → dashboard-C0l2IWWH.js} +7 -7
- package/dist/assets/{delete-confirm-1vzcMsM2.js → delete-confirm-tbfLqDBI.js} +1 -1
- package/dist/assets/did-address-CsOJBoiY.js +1 -0
- package/dist/assets/{domain-D75xKDoP.js → domain-CnhOsdmM.js} +1 -1
- package/dist/assets/{domain-action-card-BgDPfYMr.js → domain-action-card-BsdHbhEi.js} +2 -2
- package/dist/assets/domains-DRP2VSvO.js +1 -0
- package/dist/assets/edit.svg-CTE5eATX.js +1 -0
- package/dist/assets/email-Dt_DGuhf.js +17 -0
- package/dist/assets/engine-BXGX_w-S.js +1 -0
- package/dist/assets/exchange-passport-DztKvBat.js +1 -0
- package/dist/assets/{form-BblKAylu.js → form-DoC8uBcB.js} +3 -3
- package/dist/assets/{form-text-input-C-JBHNfU.js → form-text-input-XjloVwBd.js} +2 -2
- package/dist/assets/{fuel-BPg61IpB.js → fuel-IaJHNPPW.js} +1 -1
- package/dist/assets/{gen-access-key-B-PvqBv6.js → gen-access-key-BJlDqEhI.js} +1 -1
- package/dist/assets/gen-simple-access-key-lyiUw0C-.js +1 -0
- package/dist/assets/get-safe-url-BiNPujaX.js +1 -0
- package/dist/assets/google-icon-vNOJy67F.js +1 -0
- package/dist/assets/{home-CT38dHBL.js → home-Bs_5YPbK.js} +1 -1
- package/dist/assets/{iframe-D119MMHU.js → iframe-Dqu4MSyW.js} +1 -1
- package/dist/assets/{index-BpWFE-ry.js → index-1HKgA-fz.js} +1 -1
- package/dist/assets/{index-CSCCjNba.js → index-B10SG1vs.js} +1 -1
- package/dist/assets/{index-sBtfsjBo.js → index-B4KKUWng.js} +2 -2
- package/dist/assets/{index-bCC4mzZc.js → index-B4YCnemd.js} +1 -1
- package/dist/assets/index-B6DWjLJS.js +281 -0
- package/dist/assets/{index-DSVwCr5p.js → index-B7_VUEoc.js} +2 -2
- package/dist/assets/index-B9LF8Bep.js +1 -0
- package/dist/assets/index-BDH_LtJL.js +1 -0
- package/dist/assets/{index-CGrk0HiP.js → index-BGhqVqit.js} +1 -1
- package/dist/assets/{index-DdojJXSn.js → index-BNhv-9xy.js} +3 -3
- package/dist/assets/{index-BNAs76qj.js → index-BSZtxRM0.js} +2 -2
- package/dist/assets/{index-BWCHnVga.js → index-BWDWEkUF.js} +1 -1
- package/dist/assets/{index-TzwTiNQ7.js → index-BWL6HE0j.js} +1 -1
- package/dist/assets/{index-E4Hos_Sx.js → index-B_SjLIbT.js} +7 -7
- package/dist/assets/{index-D1f4dwYF.js → index-BhhZ8IDZ.js} +13 -13
- package/dist/assets/{index-arhRQhsc.js → index-BkePHcyK.js} +9 -9
- package/dist/assets/{index-CfA9D2iF.js → index-BmXPp3DU.js} +1 -1
- package/dist/assets/{index-D1SIrheh.js → index-BsohFwTm.js} +1 -1
- package/dist/assets/index-CI_uwh_J.js +81 -0
- package/dist/assets/index-CQgzjKgB.js +1039 -0
- package/dist/assets/{index-8bzrOXqv.js → index-CRZM3CKo.js} +2 -2
- package/dist/assets/index-CbiyJRV7.js +1 -0
- package/dist/assets/{index-VaUGnCuU.js → index-Cp0b8q3A.js} +1 -1
- package/dist/assets/{index-BcIeEF3v.js → index-Cq6z7yeF.js} +4 -4
- package/dist/assets/index-DT5AXPVB.js +200 -0
- package/dist/assets/{index-DGbr3NAq.js → index-DctZHPFL.js} +1 -1
- package/dist/assets/{index-uODjznr3.js → index-Dfx19arA.js} +6 -6
- package/dist/assets/index-DhHvANH8.js +93 -0
- package/dist/assets/index-DrCTi6nm.css +1 -0
- package/dist/assets/{index-DoDx-vpV.js → index-G6Vk78zE.js} +3 -3
- package/dist/assets/{index-OTENuoZ0.js → index-TYwJnR0n.js} +23 -23
- package/dist/assets/{index-CIC0R_Qc.js → index-dbYkWwF4.js} +1 -1
- package/dist/assets/index-vP1T6V7V.js +120 -0
- package/dist/assets/info-outline-rounded-BIwvgXCK.js +1 -0
- package/dist/assets/invitation-CYFN9u5t.js +177 -0
- package/dist/assets/invitations-jY13RXbI.js +3 -0
- package/dist/assets/{invite-uHE_P5fP.js → invite-D72FvaiG.js} +1 -1
- package/dist/assets/{isURL-CRZ7iI7F.js → isURL-CJRImg0N.js} +2 -2
- package/dist/assets/issue-passport-BfqkJF3W.js +1 -0
- package/dist/assets/{item-BJSHAMwK.js → item-5ZWPft2s.js} +1 -1
- package/dist/assets/landing-page-DRtId3hN.js +1 -0
- package/dist/assets/{layout-D9M0eiNw.js → layout-Be1KH57_.js} +1 -1
- package/dist/assets/{list-DVUI92a2.js → list-CHI1rCEg.js} +3 -3
- package/dist/assets/list-CQtiNSih.js +2 -0
- package/dist/assets/localization-CKE-bHgd.js +1 -0
- package/dist/assets/lock.svg-CiT4rEpi.js +1 -0
- package/dist/assets/{log-DbdNMVuv.js → log-BfCFT05M.js} +1 -1
- package/dist/assets/logger-DU7baop2.js +1 -0
- package/dist/assets/login-BtsH3IvI.js +1 -0
- package/dist/assets/{login-oauth-callback-RLp-7ubu.js → login-oauth-callback-Ds4uYiRr.js} +1 -1
- package/dist/assets/{logo-uploader-BFMnNkRn.js → logo-uploader-lepUW_D7.js} +3 -3
- package/dist/assets/{lost-passport-CB5SFq30.js → lost-passport-BtN3h1ya.js} +2 -2
- package/dist/assets/omit-CCIQ0Qdi.js +1 -0
- package/dist/assets/{open-window-xMdq1GjU.js → open-window-CNt8gsrN.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-DvKFY6t9.js → over-due-invoice-payment-7TbnqqKX.js} +1 -1
- package/dist/assets/{overview-DNVfcZQO.js → overview-Be3tncsL.js} +3 -3
- package/dist/assets/passport-CkJ4B4CG.js +1 -0
- package/dist/assets/passport-item-Bhbm8_m6.js +1 -0
- package/dist/assets/{permission-C0rLyhnq.js → permission-BHvrn0M5.js} +1 -1
- package/dist/assets/preferences-TFWtUYLy.js +1 -0
- package/dist/assets/profile-embed-B9f9hlSS.js +1 -0
- package/dist/assets/provider-icon-DQY2_LaP.js +1 -0
- package/dist/assets/publish-resource-CyvkVMG_.js +1 -0
- package/dist/assets/question-mark-circle.svg-GhTaklFN.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-BZjy3RlT.js → react-beautiful-dnd.esm-D0JKrMDl.js} +4 -4
- package/dist/assets/revoke.svg-DUoaRyPZ.js +1 -0
- package/dist/assets/runtime-npJC4gp_.js +1 -0
- package/dist/assets/{sanitize-yVk8VEIO.js → sanitize-C-shWbtD.js} +1 -1
- package/dist/assets/sdk-CoWDgSLO.js +1 -0
- package/dist/assets/security-nSKpCl8B.js +22 -0
- package/dist/assets/server-logo-notext.svg-BLAdvsmP.js +1 -0
- package/dist/assets/{session-5s-U-ruq.js → session-C2ZBRIpv.js} +1 -1
- package/dist/assets/{setup-DgF_JFoX.js → setup-krkSJpAg.js} +1 -1
- package/dist/assets/simple-select-i16Vwzvl.js +1 -0
- package/dist/assets/{spaces-BE9CZzeJ.js → spaces-BdZ_Rv3s.js} +1 -1
- package/dist/assets/start-y3zrboBQ.js +187 -0
- package/dist/assets/{starting-progress-MyalFKYG.js → starting-progress-DI-J-VlX.js} +2 -2
- package/dist/assets/status-B8pB_mTB.js +1 -0
- package/dist/assets/{step-actions-X2c_czAD.js → step-actions-B1ufIDaK.js} +1 -1
- package/dist/assets/{studio-BcQoXvqZ.js → studio-1jwq0HOw.js} +1 -1
- package/dist/assets/{switch-BjA8SIAh.js → switch-CetbUrYR.js} +1 -1
- package/dist/assets/{switch-control-D2RiXLWV.js → switch-control-_85hc9FG.js} +1 -1
- package/dist/assets/{table-tips-Dgzi4H1y.js → table-tips-CMt22HEy.js} +1 -1
- package/dist/assets/team-DDjNXwXE.js +146 -0
- package/dist/assets/{traffic-CvgJe_3z.js → traffic-mcbpWOFq.js} +1 -1
- package/dist/assets/transfer-C66c3bWd.js +16 -0
- package/dist/assets/unsubscribe-Cvz0OKhq.js +1 -0
- package/dist/assets/{use-app-logo-Cfo-T8ZY.js → use-app-logo-BuyF983S.js} +1 -1
- package/dist/assets/use-server-logo-Pbr_UuiI.js +1 -0
- package/dist/assets/{use-window-close-4WCUBrSc.js → use-window-close-B16QghYq.js} +1 -1
- package/dist/assets/{useAsync-DVl73fmG.js → useAsync-BVTh1KYj.js} +1 -1
- package/dist/assets/{useAsync-Dotoxibi.js → useAsync-ZGLJQow7.js} +1 -1
- package/dist/assets/{useAsyncRetry-r8dEPb-x.js → useAsyncRetry-BMmRgSGm.js} +1 -1
- package/dist/assets/{useLocalStorage-Cl1rEjxs.js → useLocalStorage-De-EuH_M.js} +1 -1
- package/dist/assets/user-center-DQSoqc_z.js +125 -0
- package/dist/assets/user-follower-TTyja_sV.js +32 -0
- package/dist/assets/{util-CDBgZOAd.js → util-DuMKfKo8.js} +1 -1
- package/dist/assets/{util-BNGEGQGN.js → util-Ff3hwYmy.js} +1 -1
- package/dist/assets/{vendor-arcblock-B1iA4v4a.js → vendor-arcblock-Cnwtqa7s.js} +19 -19
- package/dist/assets/{vendor-hooks-qxhUUbW5.js → vendor-hooks-BQWlJm53.js} +2 -2
- package/dist/assets/{vendor-utils-CxWN1dT3.js → vendor-utils-DCMKu06e.js} +3 -3
- package/dist/assets/{vendor-ux-jvAfFAl1.js → vendor-ux-B0gV9NvH.js} +92 -95
- package/dist/assets/{wait-connect-VFnD4S6k.js → wait-connect-CRZmfXOA.js} +1 -1
- package/dist/assets/{wizard-D6nEp8xR.js → wizard-B41kI39b.js} +1 -1
- package/dist/assets/{wizard-components-CQAhuCn-.js → wizard-components-Bn72hVOe.js} +2 -2
- package/dist/assets/wrap-locale-CF46rj6q.js +1 -0
- package/dist/assets/{zh-LGxmNDus.js → zh-BmX_fuoi.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +46 -46
- package/dist/assets/Community-CELsDteM.js +0 -1
- package/dist/assets/Holiday-DOCjSYjH.js +0 -1
- package/dist/assets/Meeting-BAXt_LiK.js +0 -1
- package/dist/assets/OffSick-BGEr8Nkc.js +0 -1
- package/dist/assets/WorkingRemotely-BcneAIXG.js +0 -1
- package/dist/assets/addon-DckWyYy3.js +0 -14
- package/dist/assets/advanced-BcLdGbJh.js +0 -14
- package/dist/assets/api-FQQlzPOP.js +0 -1
- package/dist/assets/arrow-down.svg-C4FUKwt4.js +0 -1
- package/dist/assets/base32-BPZDlXZz.js +0 -1
- package/dist/assets/bind-account-DtN3r3bu.js +0 -1
- package/dist/assets/branding-Aq4o2tjp.js +0 -1
- package/dist/assets/button-D6aVYj2n.js +0 -1
- package/dist/assets/cloneDeep-C2rlAYcK.js +0 -1
- package/dist/assets/config-n9Go4CIg.js +0 -53
- package/dist/assets/config-space-DNGDnW7P.js +0 -1
- package/dist/assets/connect-B84DSta0.js +0 -1
- package/dist/assets/connect-CmaOf6IU.js +0 -5
- package/dist/assets/createClass-DXSToV70.js +0 -1
- package/dist/assets/did-address-B3eXeL7H.js +0 -1
- package/dist/assets/domains-BmgTqdar.js +0 -1
- package/dist/assets/edit.svg-RRSklUg-.js +0 -1
- package/dist/assets/email-0rfuUid8.js +0 -17
- package/dist/assets/engine-D-_cbl3F.js +0 -1
- package/dist/assets/exchange-passport-DtpDKfXH.js +0 -1
- package/dist/assets/gen-simple-access-key-BRpJnjDR.js +0 -1
- package/dist/assets/get-safe-url-xl2OarvZ.js +0 -1
- package/dist/assets/index-BMtr5-CV.js +0 -1
- package/dist/assets/index-BODmBNkm.js +0 -200
- package/dist/assets/index-C6oxUE_X.js +0 -281
- package/dist/assets/index-DUo9jXH_.js +0 -81
- package/dist/assets/index-DcjD74XY.js +0 -1
- package/dist/assets/index-DrVXX4fX.css +0 -1
- package/dist/assets/index-NWCpUGtr.js +0 -1039
- package/dist/assets/index-TG3kf9io.js +0 -120
- package/dist/assets/index-tfYDa2i6.js +0 -93
- package/dist/assets/invitation-CVulfNR5.js +0 -177
- package/dist/assets/invitations-CuhR5Qhr.js +0 -3
- package/dist/assets/issue-passport-CgdZdVEa.js +0 -1
- package/dist/assets/landing-page-Bu1ZaLGu.js +0 -1
- package/dist/assets/list-BYNjj68R.js +0 -2
- package/dist/assets/localization-CZX-M3IK.js +0 -1
- package/dist/assets/lock.svg-BgybwZNe.js +0 -1
- package/dist/assets/logger-Biwe4SzB.js +0 -1
- package/dist/assets/login-DUYsZ42N.js +0 -1
- package/dist/assets/omit-spWLSLbo.js +0 -1
- package/dist/assets/passport-BNRZfcVH.js +0 -1
- package/dist/assets/passport-item-Bf_kXmId.js +0 -1
- package/dist/assets/preferences-XGJx_7ht.js +0 -1
- package/dist/assets/profile-embed-DROgyynT.js +0 -1
- package/dist/assets/publish-resource-C3tnQoPG.js +0 -1
- package/dist/assets/question-mark-circle.svg-CByEVDhb.js +0 -1
- package/dist/assets/revoke.svg-CNl4LAbv.js +0 -1
- package/dist/assets/runtime-DiEn6rZ9.js +0 -1
- package/dist/assets/sdk-C45BrgFy.js +0 -1
- package/dist/assets/security-Ch3TxRbd.js +0 -22
- package/dist/assets/server-logo-notext.svg-xZ-i1SpD.js +0 -1
- package/dist/assets/simple-select-EppOca29.js +0 -1
- package/dist/assets/start-D6EkscL8.js +0 -187
- package/dist/assets/status-vSa6pwrP.js +0 -1
- package/dist/assets/team-D9lFN8Pe.js +0 -146
- package/dist/assets/transfer-IRaap94c.js +0 -16
- package/dist/assets/unsubscribe-7WUPZn-b.js +0 -1
- package/dist/assets/use-server-logo-Cv1kAPgB.js +0 -1
- package/dist/assets/user-center-BoGQKLvn.js +0 -125
- package/dist/assets/user-follower-D8NzTP2C.js +0 -32
- package/dist/assets/wrap-locale-qgV7mOv6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as v,j as l}from"./vendor-mui-core-DnR6WYuU.js";import{m as B,r}from"./vendor-react-CTtPmzVP.js";import{
|
|
1
|
+
import{J as v,j as l}from"./vendor-mui-core-DnR6WYuU.js";import{m as B,r}from"./vendor-react-CTtPmzVP.js";import{y as W,z as L}from"./vendor-utils-DCMKu06e.js";import{V as O,aZ as A}from"./vendor-ux-B0gV9NvH.js";import{h as d,b as T,r as _}from"./vendor-hooks-BQWlJm53.js";import{A as $,S as F}from"./add-component-core-BfzNEcS5.js";import{y as K,an as z}from"./index-CQgzjKgB.js";import"./lottie-web-4koyQiv_.js";import"./item-5ZWPft2s.js";import"./index-DBs9Ljax.js";import"./delete-confirm-tbfLqDBI.js";import"./click-to-copy-CMo42VnK.js";import"./confirm-Lb1MrAdS.js";import"./session-C2ZBRIpv.js";import"./get-safe-url-BiNPujaX.js";import"./did-address-CsOJBoiY.js";import"./wait-connect-CRZmfXOA.js";import"./vendor-arcblock-Cnwtqa7s.js";import"./launch-result-message-MNpx7ysR.js";import"./page-header-CHAwrgX-.js";import"./engine-BXGX_w-S.js";import"./config-space-B6_f52sE.js";import"./spaces-BdZ_Rv3s.js";import"./api-DwxIBXZs.js";import"./required-BQln5OcV.js";import"./index-B7_VUEoc.js";import"./Google-DRu937I3.js";import"./cloneDeep-BY8zW7hH.js";import"./create-passport-svg-5AYzBKFb.js";import"./form-wrapper-PT5ZzMQy.js";import"./logo-uploader-lepUW_D7.js";import"./collapse-B7gUzFaX.js";import"./index-B0Q9wWG1.js";import"./config-44sI5I0w.js";import"./isURL-CJRImg0N.js";import"./section-jXB9AxBb.js";import"./form-text-input-XjloVwBd.js";import"./edit.svg-CTE5eATX.js";import"./index-_tncRnTu.js";import"./useLocalStorage-De-EuH_M.js";import"./index-BWDWEkUF.js";import"./util-Ff3hwYmy.js";import"./use-mobile-BINJTzMb.js";import"./content-layout-DmSBGGVm.js";import"./connect-to-Djgj6TLg.js";import"./index-BNhv-9xy.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-1HKgA-fz.js";import"./search-4YYphs0l.js";function $t(){const{t:u}=O(),{blocklet:h}=K(),{componentDid:s}=B(),w=v(t=>t.breakpoints.down("md")),e=new URL(window.location.href),f=e.searchParams.get("mode")==="dialog",n=e.searchParams.get("resourceType")||"",m=e.searchParams.get("resourceDid")||s,g=e.searchParams.get("store")||"",y=e.searchParams.get("showFromUrl")!=="false",R=e.searchParams.get("showResourcesSwitch")!=="false",C=e.searchParams.get("enableRunBackground")!=="false",S=e.searchParams.get("showCategory")!=="false",a=h?.meta?.did,i=g.split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[b,E]=r.useState(i.map(t=>({url:t,name:t.replace("https://","")}))),[P,D]=r.useState(null),[U,j]=r.useState("");r.useEffect(()=>{(async()=>{try{const t=await Promise.all(i.map(async o=>{const x=W(o,"/api/store.json"),{data:M}=await L.get(x);return{url:o,name:M.name}}));E(t||[])}catch(t){console.error(t)}})()},[i.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const t=z();return a&&t.connect(),()=>{a&&t.isConnected()&&t.disconnect()}},[a]),d(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const c=T(t=>{t.data?.event==="resourceDialog.select"&&t.data?.componentDid===s&&(D(t.data.data),j(t.data.storeUrl))});d(()=>{window.addEventListener("message",c)}),_(()=>{window.removeEventListener("message",c)});const p=({inDialog:t=!0}={})=>l.jsx($,{stores:b,selectedMeta:P,storeUrl:U,resourceType:n,resourceDid:m,mode:"embed",inDialog:t,storageKey:F(`${n}+${m}`),showResourcesSwitch:R,showFromUrl:y,enableRunBackground:C,showCategory:S});return f?l.jsx(A,{className:"resource-dialog",title:u("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:w?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:p()}):p({inDialog:!1})}export{$t as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{r as a,i as u}from"./vendor-react-CTtPmzVP.js";import{j as e,I as z,at as n,W as o}from"./vendor-mui-core-DnR6WYuU.js";import{b8 as b,a_ as f,a$ as g}from"./vendor-ux-B0gV9NvH.js";import{X as j}from"./index-CQgzjKgB.js";import{t as k}from"./question-mark-circle.svg-GhTaklFN.js";const v=t=>a.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg",...t},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.606 17.32a7.933 7.933 0 0 1-.581-1.18c-.165-.411-.312-.86-.44-1.339a7.639 7.639 0 0 0-1.586 1.054 7.69 7.69 0 0 0 2.607 1.465zm.657-1.675c-.16-.4-.305-.848-.429-1.335A7.643 7.643 0 0 1 10 14h.002c.734 0 1.463.104 2.165.31-.124.487-.268.935-.428 1.335-.283.707-.604 1.235-.925 1.575-.32.339-.595.447-.813.447-.218 0-.493-.108-.813-.447-.322-.34-.642-.867-.925-1.575zM10 12.667a8.976 8.976 0 0 1 2.436.334c.116-.727.193-1.511.22-2.334H7.344c.027.823.103 1.607.22 2.334A8.972 8.972 0 0 1 10 12.667zM7.345 9.333c.027-.823.103-1.607.22-2.334.791.223 1.61.335 2.436.334A8.974 8.974 0 0 0 12.437 7c.116.727.193 1.511.22 2.334H7.344zm6.646 1.334c-.03.982-.127 1.925-.28 2.797a8.98 8.98 0 0 1 2.227 1.439 7.666 7.666 0 0 0 1.734-4.236h-3.681zm3.681-1.334H13.99a19.718 19.718 0 0 0-.28-2.798 8.975 8.975 0 0 0 2.228-1.438 7.665 7.665 0 0 1 1.734 4.236zm1.329.669A9 9 0 0 1 1 10a9 9 0 0 1 18 0v.002zM2.329 9.333a7.665 7.665 0 0 1 1.734-4.236A8.974 8.974 0 0 0 6.29 6.535a19.74 19.74 0 0 0-.28 2.798H2.329zm0 1.334h3.682c.03.983.126 1.925.28 2.797a8.974 8.974 0 0 0-2.228 1.439 7.665 7.665 0 0 1-1.734-4.236zm10.648 5.473c.164-.411.312-.86.44-1.34.57.285 1.103.639 1.585 1.055a7.687 7.687 0 0 1-2.606 1.465c.216-.354.41-.751.58-1.18zm-.581-13.46c.967.316 1.85.819 2.606 1.465A7.64 7.64 0 0 1 13.417 5.2c-.128-.48-.276-.928-.44-1.34a7.925 7.925 0 0 0-.581-1.18zm-.657 1.675c.16.4.304.848.428 1.335a7.64 7.64 0 0 1-2.165.31H10a7.64 7.64 0 0 1-2.166-.31c.124-.487.268-.935.429-1.335.283-.708.603-1.235.925-1.575.32-.339.595-.447.813-.447.218 0 .492.108.813.447.321.34.642.867.925 1.575zM7.025 3.86a11.7 11.7 0 0 0-.44 1.34 7.64 7.64 0 0 1-1.586-1.055A7.688 7.688 0 0 1 7.606 2.68c-.216.354-.41.751-.581 1.18z",fill:"currentColor"}));function H({SessionContext:t,extraItems:c=[],showLocale:r=!0,showHelper:l=!0,showSessionManager:i=!0,sessionManagerProps:d={}}){const{session:m}=a.useContext(t),{locale:p}=a.useContext(b),h=u(),w=()=>{if(h.pathname.indexOf("/store")>-1){window.open("https://www.arcblock.io/content/docs/createblocklet","_blank");return}window.open("https://www.arcblock.io/content/docs/blocklet-developer","_blank")};return e.jsxs(e.Fragment,{children:[c.map((s,x)=>a.cloneElement(s,{key:x})),r&&e.jsx(A,{"data-cy":"locale-addon",icon:v,size:23,showText:!1,className:"locale-addon"}),e.jsx(j,{}),l&&e.jsx(z,{onClick:w,children:e.jsx(k,{})}),i&&e.jsx(M,{locale:p,session:m,size:24,showRole:!0,...d,showManageBlocklet:!1})]})}H.propTypes={SessionContext:o.object.isRequired,extraItems:o.array,showLocale:o.bool,showSessionManager:o.bool,showHelper:o.bool,sessionManagerProps:o.object};const M=n(g)`
|
|
2
|
+
.user-addon {
|
|
3
|
+
.user-avatar {
|
|
4
|
+
width: 28px;
|
|
5
|
+
border-radius: 14px;
|
|
6
|
+
height: auto;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
`,A=n(f)`
|
|
10
|
+
&.locale-addon .locales {
|
|
11
|
+
max-height: 400px;
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
}
|
|
14
|
+
`;export{H};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{r as B,g as Ue}from"./vendor-react-CTtPmzVP.js";import{j as $,a6 as ue,ak as P,Q as We,dK as Ve,T as ee,W as U,bX as Ke,a5 as He,bf as Ge,aZ as Ze,at as Oe,U as Ye,b6 as ne,z as Je,A as Qe,dL as Ae,bn as Q,a3 as K,dM as Xe,am as xe,bl as we}from"./vendor-mui-core-DnR6WYuU.js";import{Z as te,Y as et,w as Ce,q as tt,a3 as rt,cC as st,C as nt,cD as at,c as it,T as $e,G as Ee,ak as De,J as Y,cE as ot}from"./index-CQgzjKgB.js";import{w as fe,P as lt}from"./permission-BHvrn0M5.js";import{V as oe,F as Z,W as H,aZ as Ie,cT as J,cU as ct,bK as ae,n as ut,cV as ge,cW as ft,cX as dt,cY as mt,j as ce,o as me,a1 as je,b8 as pt}from"./vendor-ux-B0gV9NvH.js";import{v as Te}from"./vendor-hooks-BQWlJm53.js";import{C as be}from"./confirm-Lb1MrAdS.js";import{f as ie}from"./index-DBs9Ljax.js";import{u as ht}from"./useSetState-L-f8mSga.js";import{u as Le}from"./session-C2ZBRIpv.js";import{S as V}from"./section-jXB9AxBb.js";import{C as gt}from"./click-to-copy-CMo42VnK.js";import{b as qe}from"./team-DDjNXwXE.js";import{v as pe,ae as yt}from"./vendor-utils-DCMKu06e.js";import{v as bt}from"./index-BWDWEkUF.js";import{W as vt}from"./did-address-CsOJBoiY.js";import{V as _t}from"./status-B8pB_mTB.js";import{F as ke}from"./form-text-input-XjloVwBd.js";import"./vendor-arcblock-Cnwtqa7s.js";import"./lottie-web-4koyQiv_.js";import"./required-BQln5OcV.js";import"./isURL-CJRImg0N.js";import"./use-app-logo-BuyF983S.js";import"./omit-CCIQ0Qdi.js";import"./index-BDH_LtJL.js";import"./form-wrapper-PT5ZzMQy.js";import"./edit.svg-CTE5eATX.js";const xt=localStorage.getItem("enableDebug")==="true";function wt({teamDid:T,size:O="small",...I}){const{t:A}=oe(),{api:j}=te(),[x,h]=B.useState(!1),[l,y]=B.useState(null),p=()=>{h(!1),y(null)},f=async()=>{try{h(!0);const n=await j.clearCache({input:{teamDid:T}});H.success(A("blocklet.config.clearCache.success",{count:n.removed?.length||0}))}catch(n){H.error(ie(n))}finally{h(!1),y(null)}},e={title:A("blocklet.config.clearCache.title"),description:A("blocklet.config.clearCache.description"),confirm:A("common.confirm"),cancel:A("common.cancel"),onConfirm:f,onCancel:p};return $.jsxs("div",{...I,children:[$.jsxs(Z,{onClick:()=>y(e),color:"error",variant:"outlined",size:O,children:[x?$.jsx(ue,{size:16,style:{marginRight:5}}):null,A("blocklet.config.clearCache.action")]}),l&&$.jsx(be,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}function Pe({onChange:T=()=>{},disabled:O=!1,loading:I=!1,inService:A=!1}){const{t:j}=oe(),{api:x,session:h}=Le(),{blocklet:l}=et(),[y,p]=ht({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),f=()=>p({isConnectOpen:!1}),e=()=>{if(tt.isInProgress(l.status)){H.error(j("blocklet.error.isInProgress"));return}p({confirmDialogOpen:!0})};return $.jsxs($.Fragment,{children:[$.jsx(V,{title:j("blocklet.config.migrate.button"),desc:j("blocklet.config.migrate.description"),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsxs(We,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:O||I,onClick:e,children:[$.jsx(Ve,{style:{fontSize:"1.3em",marginRight:4}}),j("blocklet.config.migrate.button")]})})}),$.jsxs($.Fragment,{children:[y.isConnectOpen&&$.jsx(Ce,{popup:!0,open:y.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:x.get,checkTimeout:5*60*1e3,onSuccess:()=>{T(),A&&h.logout(),f()},extraParams:{appDid:l.appDid},messages:{title:j("setup.keyPair.title"),scan:j("setup.keyPair.scan"),confirm:j("setup.keyPair.confirm"),success:j("setup.keyPair.success")},onClose:f}),y.confirmDialogOpen&&$.jsx(be,{title:$.jsx(ee,{sx:{fontSize:"20px",fontWeight:"500"},children:j("blocklet.config.migrate.title")}),description:$.jsx(ee,{sx:{fontSize:"14px",color:"#9397A1"},children:j("blocklet.config.migrate.confirm")}),confirm:j("common.confirm"),cancel:j("common.cancel"),onConfirm:()=>p({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>p({confirmDialogOpen:!1})})]})]})}Pe.propTypes={onChange:U.func,disabled:U.bool,loading:U.bool,inService:U.bool};function Me({onCancel:T,onSuccess:O,onError:I=()=>{}}){const{api:A}=B.useContext(rt),[j,x]=B.useState(!1),{t:h,locale:l}=oe(),[y,p]=B.useState(""),[f,e]=B.useState(!1),[n,a]=B.useState(0),[r,t]=B.useState(""),{endpoint:o}=qe(),[s,i]=B.useState(!1),u=c=>{p(null),x(!0);try{t(c.result),a(_.length-1)}catch(m){const b=ie(m);p(b),I(m)}finally{x(!1)}},d=()=>{e(!0),a(1)},g=()=>{e(!1),a(0)},_=[{body:$.jsxs(P,{children:[$.jsx(ee,{children:h("team.transferApp.transferDialog.tips.progress")}),$.jsx(ee,{sx:{mt:3,mb:2},children:h("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:h("common.cancel"),confirm:h("team.transferApp.transferDialog.createTransferLink"),onCancel:T,onConfirm:d},{cancel:h("common.cancel"),confirm:h("team.transferApp.transferDialog.createTransferLink"),body:()=>$.jsx(Ce,{action:"transfer-app-owner",open:f,locale:l,checkFn:A.get,onClose:g,onSuccess:u,checkTimeout:5*60*1e3,extraParams:{},messages:{title:h("team.transferApp.connectDialog.title"),scan:h("team.transferApp.connectDialog.scan"),confirm:h("team.transferApp.connectDialog.confirm"),success:h("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const c=st({transferId:r.transferId,endpoint:o});return $.jsxs($.Fragment,{children:[$.jsx(P,{component:X,dangerouslySetInnerHTML:{__html:h("team.transferApp.transferDialog.createSuccessTip1")}}),$.jsx(P,{component:X,sx:{mt:2},children:$.jsx(X,{children:h("team.transferApp.transferDialog.createSuccessTip3")})}),$.jsxs(P,{children:[$.jsx(P,{component:X,sx:{mt:2},children:$.jsx(X,{children:h("team.transferApp.transferDialog.createSuccessTip2",{expireDate:nt(r.expireDate,l)})})}),$.jsx(P,{sx:{my:1},children:$.jsx(gt,{children:c})})]}),$.jsx("div",{children:$.jsx(Ke,{value:"end",control:$.jsx(He,{checked:s,onChange:m=>i(m.target.checked)}),label:h("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:h("common.confirm"),onConfirm:O}],v=_[n];return $.jsxs(Ie,{title:$.jsx(X,{className:"title",children:h("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:$.jsxs($.Fragment,{children:[v.cancel&&$.jsx(Z,{onClick:v.onCancel,color:"inherit",children:v.cancel}),$.jsxs(Z,{onClick:v.onConfirm,color:"error",disabled:j||n===_.length-1&&!s,variant:"contained",autoFocus:!0,children:[j&&$.jsx(ue,{size:16}),v.confirm]})]}),children:[$.jsx(Ge,{component:"div",children:typeof v.body=="function"?v.body():v.body}),!!y&&$.jsx(Ze,{severity:"error",variant:"icon",children:y})]})}Me.propTypes={onCancel:U.func.isRequired,onSuccess:U.func.isRequired,onError:U.func};const X=Oe.div`
|
|
2
|
+
font-size: 16px;
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
&.title {
|
|
5
|
+
font-size: 20px;
|
|
6
|
+
}
|
|
7
|
+
`;function $t(T){return{type:"BN",base:T.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(O,I){try{return{value:new J(O)}}catch{return{errors:I.error("bn.nan")}}},coerce(O){return{value:O.toString(10)}},validate(O){return{value:O}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:O=>J.isBN(O),message:"must be a big number",normalize:O=>new J(O)},{name:"equal",assert:O=>typeof O=="boolean",message:"must be a boolean"}],validate(O,I,A){const j=new J(O);return A.equal&&j.lt(A.threshold)?I.error("bn.min",A):!A.equal&&j.lte(A.threshold)?I.error("bn.greater",A):O}},lt:{args:[{name:"threshold",ref:!0,assert:O=>J.isBN(O),message:"must be a big number",normalize:O=>new J(O)},{name:"equal",assert:O=>typeof O=="boolean",message:"must be a boolean"}],validate(O,I,A){const j=new J(O);return A.equal&&j.gt(A.threshold)?I.error("bn.max",A):!A.equal&&j.gte(A.threshold)?I.error("bn.less",A):O}},min:{alias:"gte",method(O){return this.$_addRule({name:"gt",args:{threshold:O,equal:!0}})}},max:{alias:"lte",method(O){return this.$_addRule({name:"lt",args:{threshold:O,equal:!0}})}},greater:{alias:"gt",method(O){return this.$_addRule({name:"gt",args:{threshold:O,equal:!1}})}},less:{alias:"lt",method(O){return this.$_addRule({name:"lt",args:{threshold:O,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}})}}}}}const le={pk:Object.keys(me.KeyType),hash:Object.keys(me.HashType),role:Object.keys(me.RoleType)};function jt(T){return{type:"DID",base:T.string().trim(),messages:{"did.empty":"Expect {{#label}} to be non-empty string","did.invalid":"Expect {{#label}} to be valid did","did.wallet":'Expect wallet type of {{#label}} to be "{{#expected}}" wallet',"did.pk":'Expect pk type of {{#label}} to be "{{#expected}}"',"did.hash":'Expect hash type of {{#label}} to be "{{#expected}}"',"did.role":'Expect role type of {{#label}} to be "{{#expected}}"',"did.prefix":'Expect prefix of {{#label}} to be "{{#expected}}"'},validate(O,I){return!O||typeof O!="string"?{errors:I.error("did.empty",{value:O})}:ce(O)===!1?{errors:I.error("did.invalid",{value:O})}:{value:O}},rules:{type:{args:[{name:"key",ref:!0,assert:O=>Object.keys(le).includes(O),message:`must be one of ${Object.keys(le).join(", ")}`},{name:"expected",assert:O=>Object.keys(le).some(I=>le[I].includes(O)),message:"must be valid type"}],validate(O,I,A){const j=ge(O);return A.key==="pk"&&j.pk!==A.expected?I.error("did.pk",{...A,actual:j.pk}):A.key==="hash"&&j.hash!==A.expected?I.error("did.hash",{...A,actual:j.hash}):A.key==="role"&&j.role!==A.expected?I.error("did.role",{...A,actual:j.role}):O}},pk:{method(O){return this.$_addRule({name:"type",args:{key:"pk",expected:O}})}},hash:{method(O){return this.$_addRule({name:"type",args:{key:"hash",expected:O}})}},role:{method(O){return this.$_addRule({name:"type",args:{key:"role",expected:O}})}},wallet:{method(O){return this.$_addRule({name:"wallet",args:{type:O}})},args:[{name:"type",ref:!0,assert:O=>["arcblock","ethereum","default","eth","passkey"].includes(O),message:"must be a string",normalize:O=>O.trim()}],validate(O,I,A={}){const j=ut(O),x=ge(O);return["ethereum","eth"].includes(A.type)&&pe(j,ft)===!1?I.error("did.wallet",{expected:A.type,actual:JSON.stringify(x)}):["arcblock","default"].includes(A.type)&&pe(j,dt)===!1?I.error("did.wallet",{expected:A.type,actual:JSON.stringify(x)}):["passkey"].includes(A.type)&&pe(j,mt)===!1?I.error("did.wallet",{expected:A.type,actual:JSON.stringify(x)}):O}},prefix:{method(O=""){return this.$_addRule({name:"prefix",args:{str:O}})},args:[{name:"str",ref:!0,assert:O=>["",ct].includes(O),message:"must be a string",normalize:O=>O.trim()}],validate(O,I,A={}){return A.str&&O.startsWith(A.str)===!1?I.error("did.prefix",{expected:A.str}):!A.str&&ae(O)!==O?I.error("did.prefix",{expected:A.str}):O}}}}}var he={exports:{}},Se;function kt(){return Se||(Se=1,function(T,O){(function(I,A){T.exports=A()})(self,()=>{return I={7629:(j,x,h)=>{const l=h(375),y=h(8571),p=h(9474),f=h(1687),e=h(8652),n=h(8160),a=h(3292),r=h(6354),t=h(8901),o=h(9708),s=h(6914),i=h(2294),u=h(6133),d=h(1152),g=h(8863),_=h(2036),v={Base:class{constructor(c){this.type=c,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new i.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 l(typeof o.describe=="function","Manifest functionality disabled"),o.describe(this)}allow(...c){return n.verifyFlat(c,"allow"),this._values(c,"_valids")}alter(c){l(c&&typeof c=="object"&&!Array.isArray(c),"Invalid targets argument"),l(!this._inRuleset(),"Cannot set alterations inside a ruleset");const m=this.clone();m.$_terms.alterations=m.$_terms.alterations||[];for(const b in c){const w=c[b];l(typeof w=="function","Alteration adjuster for",b,"must be a function"),m.$_terms.alterations.push({target:b,adjuster:w})}return m.$_temp.ruleset=!1,m}artifact(c){return l(c!==void 0,"Artifact cannot be undefined"),l(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",c)}cast(c){return l(c===!1||typeof c=="string","Invalid to value"),l(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,m){return this._default("default",c,m)}description(c){return l(c&&typeof c=="string","Description must be a non-empty string"),this.$_setFlag("description",c)}empty(c){const m=this.clone();return c!==void 0&&(c=m.$_compile(c,{override:!1})),m.$_setFlag("empty",c,{clone:!1})}error(c){return l(c,"Missing error"),l(c instanceof Error||typeof c=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",c)}example(c,m={}){return l(c!==void 0,"Missing example"),n.assertOptions(m,["override"]),this._inner("examples",c,{single:!0,override:m.override})}external(c,m){return typeof c=="object"&&(l(!m,"Cannot combine options with description"),m=c.description,c=c.method),l(typeof c=="function","Method must be a function"),l(m===void 0||m&&typeof m=="string","Description must be a non-empty string"),this._inner("externals",{method:c,description:m},{single:!0})}failover(c,m){return this._default("failover",c,m)}forbidden(){return this.presence("forbidden")}id(c){return c?(l(typeof c=="string","id must be a non-empty string"),l(/^[^\.]+$/.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 l(c&&typeof c=="string","Label name must be a non-empty string"),this.$_setFlag("label",c)}meta(c){return l(c!==void 0,"Meta cannot be undefined"),this._inner("metas",c,{single:!0})}note(...c){l(c.length,"Missing notes");for(const m of c)l(m&&typeof m=="string","Notes must be non-empty strings");return this._inner("notes",c)}only(c=!0){return l(typeof c=="boolean","Invalid mode:",c),this.$_setFlag("only",c)}optional(){return this.presence("optional")}prefs(c){l(c,"Missing preferences"),l(c.context===void 0,"Cannot override context"),l(c.externals===void 0,"Cannot override externals"),l(c.warnings===void 0,"Cannot override warnings"),l(c.debug===void 0,"Cannot override debug"),n.checkPreferences(c);const m=this.clone();return m._preferences=n.preferences(m._preferences,c),m}presence(c){return l(["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 l(["raw","strip"].includes(c),"Unknown result mode",c),this.$_setFlag("result",c)}required(){return this.presence("required")}strict(c){const m=this.clone(),b=c!==void 0&&!c;return m._preferences=n.preferences(m._preferences,{convert:b}),m}strip(c=!0){return this.$_setFlag("result",c?"strip":void 0)}tag(...c){l(c.length,"Missing tags");for(const m of c)l(m&&typeof m=="string","Tags must be non-empty strings");return this._inner("tags",c)}unit(c){return l(c&&typeof c=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",c)}valid(...c){n.verifyFlat(c,"valid");const m=this.allow(...c);return m.$_setFlag("only",!!m._valids,{clone:!1}),m}when(c,m){const b=this.clone();b.$_terms.whens||(b.$_terms.whens=[]);const w=a.when(b,c,m);if(!["any","link"].includes(b.type)){const k=w.is?[w]:w.switch;for(const S of k)l(!S.then||S.then.type==="any"||S.then.type===b.type,"Cannot combine",b.type,"with",S.then&&S.then.type),l(!S.otherwise||S.otherwise.type==="any"||S.otherwise.type===b.type,"Cannot combine",b.type,"with",S.otherwise&&S.otherwise.type)}return b.$_terms.whens.push(w),b.$_mutateRebuild()}cache(c){l(!this._inRuleset(),"Cannot set caching inside a ruleset"),l(!this._cache,"Cannot override schema cache"),l(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const m=this.clone();return m._cache=c||e.provider.provision(),m.$_temp.ruleset=!1,m}clone(){const c=Object.create(Object.getPrototypeOf(this));return this._assign(c)}concat(c){l(n.isSchema(c),"Invalid schema object"),l(this.type==="any"||c.type==="any"||c.type===this.type,"Cannot merge type",this.type,"with another type:",c.type),l(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),l(!c._inRuleset(),"Cannot concatenate a schema with open ruleset");let m=this.clone();if(this.type==="any"&&c.type!=="any"){const b=c.clone();for(const w of Object.keys(m))w!=="type"&&(b[w]=m[w]);m=b}m._ids.concat(c._ids),m._refs.register(c,u.toSibling),m._preferences=m._preferences?n.preferences(m._preferences,c._preferences):c._preferences,m._valids=_.merge(m._valids,c._valids,c._invalids),m._invalids=_.merge(m._invalids,c._invalids,c._valids);for(const b of c._singleRules.keys())m._singleRules.has(b)&&(m._rules=m._rules.filter(w=>w.keep||w.name!==b),m._singleRules.delete(b));for(const b of c._rules)c._definition.rules[b.method].multi||m._singleRules.set(b.name,b),m._rules.push(b);if(m._flags.empty&&c._flags.empty){m._flags.empty=m._flags.empty.concat(c._flags.empty);const b=Object.assign({},c._flags);delete b.empty,f(m._flags,b)}else if(c._flags.empty){m._flags.empty=c._flags.empty;const b=Object.assign({},c._flags);delete b.empty,f(m._flags,b)}else f(m._flags,c._flags);for(const b in c.$_terms){const w=c.$_terms[b];w?m.$_terms[b]?m.$_terms[b]=m.$_terms[b].concat(w):m.$_terms[b]=w.slice():m.$_terms[b]||(m.$_terms[b]=w)}return this.$_root._tracer&&this.$_root._tracer._combine(m,[this,c]),m.$_mutateRebuild()}extend(c){return l(!c.base,"Cannot extend type with another base"),t.type(this,c)}extract(c){return c=Array.isArray(c)?c:c.split("."),this._ids.reach(c)}fork(c,m){l(!this._inRuleset(),"Cannot fork inside a ruleset");let b=this;for(let w of[].concat(c))w=Array.isArray(w)?w:w.split("."),b=b._ids.fork(w,m,b);return b.$_temp.ruleset=!1,b}rule(c){const m=this._definition;n.assertOptions(c,Object.keys(m.modifiers)),l(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const b=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;l(b>=0&&b<this._rules.length,"Cannot apply rules to empty ruleset");const w=this.clone();for(let k=b;k<w._rules.length;++k){const S=w._rules[k],C=y(S);for(const E in c)m.modifiers[E](C,c[E]),l(C.name===S.name,"Cannot change rule name");w._rules[k]=C,w._singleRules.get(C.name)===S&&w._singleRules.set(C.name,C)}return w.$_temp.ruleset=!1,w.$_mutateRebuild()}get ruleset(){l(!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),l(!this._inRuleset(),"Cannot tailor inside a ruleset");let m=this;if(this.$_terms.alterations)for(const{target:b,adjuster:w}of this.$_terms.alterations)c.includes(b)&&(m=w(m),l(n.isSchema(m),"Alteration adjuster for",b,"failed to return a schema object"));return m=m.$_modify({each:b=>b.tailor(c),ref:!1}),m.$_temp.ruleset=!1,m.$_mutateRebuild()}tracer(){return d.location?d.location(this):this}validate(c,m){return g.entry(c,this,m)}validateAsync(c,m){return g.entryAsync(c,this,m)}$_addRule(c){typeof c=="string"&&(c={name:c}),l(c&&typeof c=="object","Invalid options"),l(c.name&&typeof c.name=="string","Invalid rule name");for(const S in c)l(S[0]!=="_","Cannot set private rule properties");const m=Object.assign({},c);m._resolve=[],m.method=m.method||m.name;const b=this._definition.rules[m.method],w=m.args;l(b,"Unknown rule",m.method);const k=this.clone();if(w){l(Object.keys(w).length===1||Object.keys(w).length===this._definition.rules[m.name].args.length,"Invalid rule definition for",this.type,m.name);for(const S in w){let C=w[S];if(b.argsByName){const E=b.argsByName.get(S);if(E.ref&&n.isResolvable(C))m._resolve.push(S),k.$_mutateRegister(C);else if(E.normalize&&(C=E.normalize(C),w[S]=C),E.assert){const L=n.validateArg(C,S,E);l(!L,L,"or reference")}}C!==void 0?w[S]=C:delete w[S]}}return b.multi||(k._ruleRemove(m.name,{clone:!1}),k._singleRules.set(m.name,m)),k.$_temp.ruleset===!1&&(k.$_temp.ruleset=null),b.priority?k._rules.unshift(m):k._rules.push(m),k}$_compile(c,m){return a.schema(this.$_root,c,m)}$_createError(c,m,b,w,k,S={}){const C=S.flags!==!1?this._flags:{},E=S.messages?s.merge(this._definition.messages,S.messages):this._definition.messages;return new r.Report(c,m,b,C,E,w,k)}$_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,m,b,w){(b=Object.assign({},b)).abortEarly=!0,b._externals=!1,m.snapshot();const k=!g.validate(c,this,m,b,w).errors;return m.restore(),k}$_modify(c){return n.assertOptions(c,["each","once","ref","schema"]),i.schema(this,c)||this}$_mutateRebuild(){return l(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(c,{source:m,name:b,path:w,key:k})=>{const S=this._definition[m][b]&&this._definition[m][b].register;S!==!1&&this.$_mutateRegister(c,{family:S,key:k})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(c,{family:m,key:b}={}){this._refs.register(c,m),this._ids.register(c,{key:b})}$_property(c){return this._definition.properties[c]}$_reach(c){return this._ids.reach(c)}$_rootReferences(){return this._refs.roots()}$_setFlag(c,m,b={}){l(c[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const w=this._definition.flags[c]||{};if(p(m,w.default)&&(m=void 0),p(m,this._flags[c]))return this;const k=b.clone!==!1?this.clone():this;return m!==void 0?(k._flags[c]=m,k.$_mutateRegister(m)):delete k._flags[c],c[0]!=="_"&&(k.$_temp.ruleset=!1),k}$_parent(c,...m){return this[c][n.symbols.parent].call(this,...m)}$_validate(c,m,b){return g.validate(c,this,m,b)}_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=y(this._singleRules,{shallow:!0}),c._refs=this._refs.clone(),c._flags=Object.assign({},this._flags),c._cache=null,c.$_terms={};for(const m in this.$_terms)c.$_terms[m]=this.$_terms[m]?this.$_terms[m].slice():null;c.$_super={};for(const m in this.$_super)c.$_super[m]=this._super[m].bind(c);return c}_bare(){const c=this.clone();c._reset();const m=c._definition.terms;for(const b in m){const w=m[b];c.$_terms[b]=w.init}return c.$_mutateRebuild()}_default(c,m,b={}){return n.assertOptions(b,"literal"),l(m!==void 0,"Missing",c,"value"),l(typeof m=="function"||!b.literal,"Only function value supports literal option"),typeof m=="function"&&b.literal&&(m={[n.symbols.literal]:!0,literal:m}),this.$_setFlag(c,m)}_generate(c,m,b){if(!this.$_terms.whens)return{schema:this};const w=[],k=[];for(let E=0;E<this.$_terms.whens.length;++E){const L=this.$_terms.whens[E];if(L.concat){w.push(L.concat),k.push(`${E}.concat`);continue}const N=L.ref?L.ref.resolve(c,m,b):c,z=L.is?[L]:L.switch,D=k.length;for(let q=0;q<z.length;++q){const{is:M,then:F,otherwise:W}=z[q],G=`${E}${L.switch?"."+q:""}`;if(M.$_match(N,m.nest(M,`${G}.is`),b)){if(F){const re=m.localize([...m.path,`${G}.then`],m.ancestors,m.schemas),{schema:de,id:se}=F._generate(c,re,b);w.push(de),k.push(`${G}.then${se?`(${se})`:""}`);break}}else if(W){const re=m.localize([...m.path,`${G}.otherwise`],m.ancestors,m.schemas),{schema:de,id:se}=W._generate(c,re,b);w.push(de),k.push(`${G}.otherwise${se?`(${se})`:""}`);break}}if(L.break&&k.length>D)break}const S=k.join(", ");if(m.mainstay.tracer.debug(m,"rule","when",S),!S)return{schema:this};if(!m.mainstay.tracer.active&&this.$_temp.whens[S])return{schema:this.$_temp.whens[S],id:S};let C=this;this._definition.generate&&(C=this._definition.generate(this,c,m,b));for(const E of w)C=C.concat(E);return this.$_root._tracer&&this.$_root._tracer._combine(C,[this,...w]),this.$_temp.whens[S]=C,{schema:C,id:S}}_inner(c,m,b={}){l(!this._inRuleset(),`Cannot set ${c} inside a ruleset`);const w=this.clone();return w.$_terms[c]&&!b.override||(w.$_terms[c]=[]),b.single?w.$_terms[c].push(m):w.$_terms[c].push(...m),w.$_temp.ruleset=!1,w}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(c,m={}){if(!this._singleRules.has(c))return this;const b=m.clone!==!1?this.clone():this;b._singleRules.delete(c);const w=[];for(let k=0;k<b._rules.length;++k){const S=b._rules[k];S.name!==c||S.keep?w.push(S):b._inRuleset()&&k<b.$_temp.ruleset&&--b.$_temp.ruleset}return b._rules=w,b}_values(c,m){n.verifyFlat(c,m.slice(1,-1));const b=this.clone(),w=c[0]===n.symbols.override;if(w&&(c=c.slice(1)),!b[m]&&c.length?b[m]=new _:w&&(b[m]=c.length?new _:null,b.$_mutateRebuild()),!b[m])return b;w&&b[m].override();for(const k of c){l(k!==void 0,"Cannot call allow/valid/invalid with undefined"),l(k!==n.symbols.override,"Override must be the first value");const S=m==="_invalids"?"_valids":"_invalids";b[S]&&(b[S].remove(k),b[S].length||(l(m==="_valids"||!b._flags.only,"Setting invalid value",k,"leaves schema rejecting all values due to previous valid rule"),b[S]=null)),b[m].add(k,b._refs)}return b}}};v.Base.prototype[n.symbols.any]={version:n.version,compile:a.compile,root:"$_root"},v.Base.prototype.isImmutable=!0,v.Base.prototype.deny=v.Base.prototype.invalid,v.Base.prototype.disallow=v.Base.prototype.invalid,v.Base.prototype.equal=v.Base.prototype.valid,v.Base.prototype.exist=v.Base.prototype.required,v.Base.prototype.not=v.Base.prototype.invalid,v.Base.prototype.options=v.Base.prototype.prefs,v.Base.prototype.preferences=v.Base.prototype.prefs,j.exports=new v.Base},8652:(j,x,h)=>{const l=h(375),y=h(8571),p=h(8160),f={max:1e3,supported:new Set(["undefined","boolean","number","string"])};x.provider={provision:e=>new f.Cache(e)},f.Cache=class{constructor(e={}){p.assertOptions(e,["max"]),l(e.max===void 0||e.max&&e.max>0&&isFinite(e.max),"Invalid max cache size"),this._max=e.max||f.max,this._map=new Map,this._list=new f.List}get length(){return this._map.size}set(e,n){if(e!==null&&!f.supported.has(typeof e))return;let a=this._map.get(e);if(a)return a.value=n,void this._list.first(a);a=this._list.unshift({key:e,value:n}),this._map.set(e,a),this._compact()}get(e){const n=this._map.get(e);if(n)return this._list.first(n),y(n.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},f.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:n,prev:a}=e;return n.prev=a,a&&(a.next=n),e===this.tail&&(this.tail=n),e.prev=null,e.next=null,e}}},8160:(j,x,h)=>{const l=h(375),y=h(7916),p=h(5934);let f,e;const n={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)?)?)?)?$/};x.version=p.version,x.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},x.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")},x.assertOptions=function(a,r,t="Options"){l(a&&typeof a=="object"&&!Array.isArray(a),"Options must be of type object");const o=Object.keys(a).filter(s=>!r.includes(s));l(o.length===0,`${t} contain unknown keys: ${o}`)},x.checkPreferences=function(a){e=e||h(3378);const r=e.preferences.validate(a);if(r.error)throw new y([r.error.details[0].message])},x.compare=function(a,r,t){switch(t){case"=":return a===r;case">":return a>r;case"<":return a<r;case">=":return a>=r;case"<=":return a<=r}},x.default=function(a,r){return a===void 0?r:a},x.isIsoDate=function(a){return n.isoDate.test(a)},x.isNumber=function(a){return typeof a=="number"&&!isNaN(a)},x.isResolvable=function(a){return!!a&&(a[x.symbols.ref]||a[x.symbols.template])},x.isSchema=function(a,r={}){const t=a&&a[x.symbols.any];return!!t&&(l(r.legacy||t.version===x.version,"Cannot mix different versions of joi schemas"),!0)},x.isValues=function(a){return a[x.symbols.values]},x.limit=function(a){return Number.isSafeInteger(a)&&a>=0},x.preferences=function(a,r){f=f||h(6914),a=a||{},r=r||{};const t=Object.assign({},a,r);return r.errors&&a.errors&&(t.errors=Object.assign({},a.errors,r.errors),t.errors.wrap=Object.assign({},a.errors.wrap,r.errors.wrap)),r.messages&&(t.messages=f.compile(r.messages,a.messages)),delete t[x.symbols.prefs],t},x.tryWithPath=function(a,r,t={}){try{return a()}catch(o){throw o.path!==void 0?o.path=r+"."+o.path:o.path=r,t.append&&(o.message=`${o.message} (${o.path})`),o}},x.validateArg=function(a,r,{assert:t,message:o}){if(x.isSchema(t)){const s=t.validate(a);return s.error?s.error.message:void 0}if(!t(a))return r?`${r} ${o}`:o},x.verifyFlat=function(a,r){for(const t of a)l(!Array.isArray(t),"Method no longer accepts array arguments:",r)}},3292:(j,x,h)=>{const l=h(375),y=h(8160),p=h(6133),f={};x.schema=function(e,n,a={}){y.assertOptions(a,["appendPath","override"]);try{return f.schema(e,n,a)}catch(r){throw a.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},f.schema=function(e,n,a){l(n!==void 0,"Invalid undefined schema"),Array.isArray(n)&&(l(n.length,"Invalid empty array schema"),n.length===1&&(n=n[0]));const r=(t,...o)=>a.override!==!1?t.valid(e.override,...o):t.valid(...o);if(f.simple(n))return r(e,n);if(typeof n=="function")return e.custom(n);if(l(typeof n=="object","Invalid schema content:",typeof n),y.isResolvable(n))return r(e,n);if(y.isSchema(n))return n;if(Array.isArray(n)){for(const t of n)if(!f.simple(t))return e.alternatives().try(...n);return r(e,...n)}return n instanceof RegExp?e.string().regex(n):n instanceof Date?r(e.date(),n):(l(Object.getPrototypeOf(n)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),e.object().keys(n))},x.ref=function(e,n){return p.isRef(e)?e:p.create(e,n)},x.compile=function(e,n,a={}){y.assertOptions(a,["legacy"]);const r=n&&n[y.symbols.any];if(r)return l(a.legacy||r.version===y.version,"Cannot mix different versions of joi schemas:",r.version,y.version),n;if(typeof n!="object"||!a.legacy)return x.schema(e,n,{appendPath:!0});const t=f.walk(n);return t?t.compile(t.root,n):x.schema(e,n,{appendPath:!0})},f.walk=function(e){if(typeof e!="object")return null;if(Array.isArray(e)){for(const a of e){const r=f.walk(a);if(r)return r}return null}const n=e[y.symbols.any];if(n)return{root:e[n.root],compile:n.compile};l(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const a in e){const r=f.walk(e[a]);if(r)return r}return null},f.simple=function(e){return e===null||["boolean","string","number"].includes(typeof e)},x.when=function(e,n,a){if(a===void 0&&(l(n&&typeof n=="object","Missing options"),a=n,n=p.create(".")),Array.isArray(a)&&(a={switch:a}),y.assertOptions(a,["is","not","then","otherwise","switch","break"]),y.isSchema(n))return l(a.is===void 0,'"is" can not be used with a schema condition'),l(a.not===void 0,'"not" can not be used with a schema condition'),l(a.switch===void 0,'"switch" can not be used with a schema condition'),f.condition(e,{is:n,then:a.then,otherwise:a.otherwise,break:a.break});if(l(p.isRef(n)||typeof n=="string","Invalid condition:",n),l(a.not===void 0||a.is===void 0,'Cannot combine "is" with "not"'),a.switch===void 0){let t=a;a.not!==void 0&&(t={is:a.not,then:a.otherwise,otherwise:a.then,break:a.break});let o=t.is!==void 0?e.$_compile(t.is):e.$_root.invalid(null,!1,0,"").required();return l(t.then!==void 0||t.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),l(t.break===void 0||t.then===void 0||t.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),a.is===void 0||p.isRef(a.is)||y.isSchema(a.is)||(o=o.required()),f.condition(e,{ref:x.ref(n),is:o,then:t.then,otherwise:t.otherwise,break:t.break})}l(Array.isArray(a.switch),'"switch" must be an array'),l(a.is===void 0,'Cannot combine "switch" with "is"'),l(a.not===void 0,'Cannot combine "switch" with "not"'),l(a.then===void 0,'Cannot combine "switch" with "then"');const r={ref:x.ref(n),switch:[],break:a.break};for(let t=0;t<a.switch.length;++t){const o=a.switch[t],s=t===a.switch.length-1;y.assertOptions(o,s?["is","then","otherwise"]:["is","then"]),l(o.is!==void 0,'Switch statement missing "is"'),l(o.then!==void 0,'Switch statement missing "then"');const i={is:e.$_compile(o.is),then:e.$_compile(o.then)};if(p.isRef(o.is)||y.isSchema(o.is)||(i.is=i.is.required()),s){l(a.otherwise===void 0||o.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const u=a.otherwise!==void 0?a.otherwise:o.otherwise;u!==void 0&&(l(r.break===void 0,"Cannot specify both otherwise and break"),i.otherwise=e.$_compile(u))}r.switch.push(i)}return r},f.condition=function(e,n){for(const a of["then","otherwise"])n[a]===void 0?delete n[a]:n[a]=e.$_compile(n[a]);return n}},6354:(j,x,h)=>{const l=h(5688),y=h(8160),p=h(3328);x.Report=class{constructor(f,e,n,a,r,t,o){if(this.code=f,this.flags=a,this.messages=r,this.path=t.path,this.prefs=o,this.state=t,this.value=e,this.message=null,this.template=null,this.local=n||{},this.local.label=x.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 s=this.path[this.path.length-1];typeof s!="object"&&(this.local.key=s)}}_setTemplate(f){if(this.template=f,!this.flags.label&&this.path.length===0){const e=this._template(this.template,"root");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const f=this.code;if(!this.prefs.errors.render)return this.code;const e=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return e===void 0?`Error code "${f}" is not defined, your custom type is missing the correct messages definition`:(this.message=e.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,e){return x.template(this.value,f,e||this.code,this.state,this.prefs)}},x.path=function(f){let e="";for(const n of f)typeof n!="object"&&(typeof n=="string"?(e&&(e+="."),e+=n):e+=`[${n}]`);return e},x.template=function(f,e,n,a,r){if(!e)return;if(p.isTemplate(e))return n!=="root"?e:null;let t=r.errors.language;if(y.isResolvable(t)&&(t=t.resolve(f,a,r)),t&&e[t]){if(e[t][n]!==void 0)return e[t][n];if(e[t]["*"]!==void 0)return e[t]["*"]}return e[n]?e[n]:e["*"]},x.label=function(f,e,n,a){if(!n.errors.label)return"";if(f.label)return f.label;let r=e.path;return n.errors.label==="key"&&e.path.length>1&&(r=e.path.slice(-1)),x.path(r)||x.template(null,n.messages,"root",e,n)||a&&x.template(null,a,"root",e,n)||"value"},x.process=function(f,e,n){if(!f)return null;const{override:a,message:r,details:t}=x.details(f);if(a)return a;if(n.errors.stack)return new x.ValidationError(r,t,e);const o=Error.stackTraceLimit;Error.stackTraceLimit=0;const s=new x.ValidationError(r,t,e);return Error.stackTraceLimit=o,s},x.details=function(f,e={}){let n=[];const a=[];for(const r of f){if(r instanceof Error){if(e.override!==!1)return{override:r};const o=r.toString();n.push(o),a.push({message:o,type:"override",context:{error:r}});continue}const t=r.toString();n.push(t),a.push({message:t,path:r.path.filter(o=>typeof o!="object"),type:r.code,context:r.local})}return n.length>1&&(n=[...new Set(n)]),{message:n.join(". "),details:a}},x.ValidationError=class extends Error{constructor(f,e,n){super(f),this._original=n,this.details=e}static isError(f){return f instanceof x.ValidationError}},x.ValidationError.prototype.isJoi=!0,x.ValidationError.prototype.name="ValidationError",x.ValidationError.prototype.annotate=l.error},8901:(j,x,h)=>{const l=h(375),y=h(8571),p=h(8160),f=h(6914),e={};x.type=function(n,a){const r=Object.getPrototypeOf(n),t=y(r),o=n._assign(Object.create(t)),s=Object.assign({},a);delete s.base,t._definition=s;const i=r._definition||{};s.messages=f.merge(i.messages,s.messages),s.properties=Object.assign({},i.properties,s.properties),o.type=s.type,s.flags=Object.assign({},i.flags,s.flags);const u=Object.assign({},i.terms);if(s.terms)for(const v in s.terms){const c=s.terms[v];l(o.$_terms[v]===void 0,"Invalid term override for",s.type,v),o.$_terms[v]=c.init,u[v]=c}s.terms=u,s.args||(s.args=i.args),s.prepare=e.prepare(s.prepare,i.prepare),s.coerce&&(typeof s.coerce=="function"&&(s.coerce={method:s.coerce}),s.coerce.from&&!Array.isArray(s.coerce.from)&&(s.coerce={method:s.coerce.method,from:[].concat(s.coerce.from)})),s.coerce=e.coerce(s.coerce,i.coerce),s.validate=e.validate(s.validate,i.validate);const d=Object.assign({},i.rules);if(s.rules)for(const v in s.rules){const c=s.rules[v];l(typeof c=="object","Invalid rule definition for",s.type,v);let m=c.method;if(m===void 0&&(m=function(){return this.$_addRule(v)}),m&&(l(!t[v],"Rule conflict in",s.type,v),t[v]=m),l(!d[v],"Rule conflict in",s.type,v),d[v]=c,c.alias){const b=[].concat(c.alias);for(const w of b)t[w]=c.method}c.args&&(c.argsByName=new Map,c.args=c.args.map(b=>(typeof b=="string"&&(b={name:b}),l(!c.argsByName.has(b.name),"Duplicated argument name",b.name),p.isSchema(b.assert)&&(b.assert=b.assert.strict().label(b.name)),c.argsByName.set(b.name,b),b)))}s.rules=d;const g=Object.assign({},i.modifiers);if(s.modifiers)for(const v in s.modifiers){l(!t[v],"Rule conflict in",s.type,v);const c=s.modifiers[v];l(typeof c=="function","Invalid modifier definition for",s.type,v);const m=function(b){return this.rule({[v]:b})};t[v]=m,g[v]=c}if(s.modifiers=g,s.overrides){t._super=r,o.$_super={};for(const v in s.overrides)l(r[v],"Cannot override missing",v),s.overrides[v][p.symbols.parent]=r[v],o.$_super[v]=r[v].bind(o);Object.assign(t,s.overrides)}s.cast=Object.assign({},i.cast,s.cast);const _=Object.assign({},i.manifest,s.manifest);return _.build=e.build(s.manifest&&s.manifest.build,i.manifest&&i.manifest.build),s.manifest=_,s.rebuild=e.rebuild(s.rebuild,i.rebuild),o},e.build=function(n,a){return n&&a?function(r,t){return a(n(r,t),t)}:n||a},e.coerce=function(n,a){return n&&a?{from:n.from&&a.from?[...new Set([...n.from,...a.from])]:null,method(r,t){let o;if((!a.from||a.from.includes(typeof r))&&(o=a.method(r,t),o)){if(o.errors||o.value===void 0)return o;r=o.value}if(!n.from||n.from.includes(typeof r)){const s=n.method(r,t);if(s)return s}return o}}:n||a},e.prepare=function(n,a){return n&&a?function(r,t){const o=n(r,t);if(o){if(o.errors||o.value===void 0)return o;r=o.value}return a(r,t)||o}:n||a},e.rebuild=function(n,a){return n&&a?function(r){a(r),n(r)}:n||a},e.validate=function(n,a){return n&&a?function(r,t){const o=a(r,t);if(o){if(o.errors&&(!Array.isArray(o.errors)||o.errors.length))return o;r=o.value}return n(r,t)||o}:n||a}},5107:(j,x,h)=>{const l=h(375),y=h(8571),p=h(8652),f=h(8160),e=h(3292),n=h(6354),a=h(8901),r=h(9708),t=h(6133),o=h(3328),s=h(1152);let i;const u={types:{alternatives:h(4946),any:h(8068),array:h(546),boolean:h(4937),date:h(7500),function:h(390),link:h(8785),number:h(3832),object:h(8966),string:h(7417),symbol:h(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const d={_types:new Set(Object.keys(u.types))};for(const g of d._types)d[g]=function(..._){return l(!_.length||["alternatives","link","object"].includes(g),"The",g,"type does not allow arguments"),u.generate(this,u.types[g],_)};for(const g of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])d[g]=function(..._){return this.any()[g](..._)};Object.assign(d,u.methods);for(const g in u.aliases){const _=u.aliases[g];d[g]=d[_]}return d.x=d.expression,s.setup&&s.setup(d),d}};u.methods={ValidationError:n.ValidationError,version:f.version,cache:p.provider,assert(d,g,..._){u.assert(d,g,!0,_)},attempt:(d,g,..._)=>u.assert(d,g,!1,_),build(d){return l(typeof r.build=="function","Manifest functionality disabled"),r.build(this,d)},checkPreferences(d){f.checkPreferences(d)},compile(d,g){return e.compile(this,d,g)},defaults(d){l(typeof d=="function","modifier must be a function");const g=Object.assign({},this);for(const _ of g._types){const v=d(g[_]());l(f.isSchema(v),"modifier must return a valid schema object"),g[_]=function(...c){return u.generate(this,v,c)}}return g},expression:(...d)=>new o(...d),extend(...d){f.verifyFlat(d,"extend"),i=i||h(3378),l(d.length,"You need to provide at least one extension"),this.assert(d,i.extensions);const g=Object.assign({},this);g._types=new Set(g._types);for(let _ of d){typeof _=="function"&&(_=_(g)),this.assert(_,i.extension);const v=u.expandExtension(_,g);for(const c of v){l(g[c.type]===void 0||g._types.has(c.type),"Cannot override name",c.type);const m=c.base||this.any(),b=a.type(m,c);g._types.add(c.type),g[c.type]=function(...w){return u.generate(this,b,w)}}}return g},isError:n.ValidationError.isError,isExpression:o.isTemplate,isRef:t.isRef,isSchema:f.isSchema,in:(...d)=>t.in(...d),override:f.symbols.override,ref:(...d)=>t.create(...d),types(){const d={};for(const g of this._types)d[g]=this[g]();for(const g in u.aliases)d[g]=this[g]();return d}},u.assert=function(d,g,_,v){const c=v[0]instanceof Error||typeof v[0]=="string"?v[0]:null,m=c!==null?v[1]:v[0],b=g.validate(d,f.preferences({errors:{stack:!0}},m||{}));let w=b.error;if(!w)return b.value;if(c instanceof Error)throw c;const k=_&&typeof w.annotate=="function"?w.annotate():w.message;throw w instanceof n.ValidationError==0&&(w=y(w)),w.message=c?`${c} ${k}`:k,w},u.generate=function(d,g,_){return l(d,"Must be invoked on a Joi instance."),g.$_root=d,g._definition.args&&_.length?g._definition.args(g,..._):g},u.expandExtension=function(d,g){if(typeof d.type=="string")return[d];const _=[];for(const v of g._types)if(d.type.test(v)){const c=Object.assign({},d);c.type=v,c.base=g[v](),_.push(c)}return _},j.exports=u.root()},6914:(j,x,h)=>{const l=h(375),y=h(8571),p=h(3328);x.compile=function(f,e){if(typeof f=="string")return l(!e,"Cannot set single message string"),new p(f);if(p.isTemplate(f))return l(!e,"Cannot set single message template"),f;l(typeof f=="object"&&!Array.isArray(f),"Invalid message options"),e=e?y(e):{};for(let n in f){const a=f[n];if(n==="root"||p.isTemplate(a)){e[n]=a;continue}if(typeof a=="string"){e[n]=new p(a);continue}l(typeof a=="object"&&!Array.isArray(a),"Invalid message for",n);const r=n;for(n in e[r]=e[r]||{},a){const t=a[n];n==="root"||p.isTemplate(t)?e[r][n]=t:(l(typeof t=="string","Invalid message for",n,"in",r),e[r][n]=new p(t))}}return e},x.decompile=function(f){const e={};for(let n in f){const a=f[n];if(n==="root"){e.root=a;continue}if(p.isTemplate(a)){e[n]=a.describe({compact:!0});continue}const r=n;for(n in e[r]={},a){const t=a[n];n!=="root"?e[r][n]=t.describe({compact:!0}):e[r].root=t}}return e},x.merge=function(f,e){if(!f)return x.compile(e);if(!e)return f;if(typeof e=="string")return new p(e);if(p.isTemplate(e))return e;const n=y(f);for(let a in e){const r=e[a];if(a==="root"||p.isTemplate(r)){n[a]=r;continue}if(typeof r=="string"){n[a]=new p(r);continue}l(typeof r=="object"&&!Array.isArray(r),"Invalid message for",a);const t=a;for(a in n[t]=n[t]||{},r){const o=r[a];a==="root"||p.isTemplate(o)?n[t][a]=o:(l(typeof o=="string","Invalid message for",a,"in",t),n[t][a]=new p(o))}}return n}},2294:(j,x,h)=>{const l=h(375),y=h(8160),p=h(6133),f={};x.Ids=f.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new f.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(const[n,a]of e._byId.entries())l(!this._byKey.has(n),"Schema id conflicts with existing key:",n),this._byId.set(n,a);for(const[n,a]of e._byKey.entries())l(!this._byId.has(n),"Schema key conflicts with existing id:",n),this._byKey.set(n,a)}fork(e,n,a){const r=this._collect(e);r.push({schema:a});const t=r.shift();let o={id:t.id,schema:n(t.schema)};l(y.isSchema(o.schema),"adjuster function failed to return a joi schema type");for(const s of r)o={id:s.id,schema:f.fork(s.schema,o.id,o.schema)};return o.schema}labels(e,n=[]){const a=e[0],r=this._get(a);if(!r)return[...n,...e].join(".");const t=e.slice(1);return n=[...n,r.schema._flags.label||a],t.length?r.schema._ids.labels(t,n):n.join(".")}reach(e,n=[]){const a=e[0],r=this._get(a);l(r,"Schema does not contain path",[...n,...e].join("."));const t=e.slice(1);return t.length?r.schema._ids.reach(t,[...n,a]):r.schema}register(e,{key:n}={}){if(!e||!y.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const a=e._flags.id;if(a){const r=this._byId.get(a);l(!r||r.schema===e,"Cannot add different schemas with the same id:",a),l(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,{schema:e,id:a})}n&&(l(!this._byKey.has(n),"Schema already contains key:",n),l(!this._byId.has(n),"Schema key conflicts with existing id:",n),this._byKey.set(n,{schema:e,id:n}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,n=[],a=[]){const r=e[0],t=this._get(r);l(t,"Schema does not contain path",[...n,...e].join(".")),a=[t,...a];const o=e.slice(1);return o.length?t.schema._ids._collect(o,[...n,r],a):a}_get(e){return this._byId.get(e)||this._byKey.get(e)}},f.fork=function(e,n,a){const r=x.schema(e,{each:(t,{key:o})=>{if(n===(t._flags.id||o))return a},ref:!1});return r?r.$_mutateRebuild():e},x.schema=function(e,n){let a;for(const r in e._flags){if(r[0]==="_")continue;const t=f.scan(e._flags[r],{source:"flags",name:r},n);t!==void 0&&(a=a||e.clone(),a._flags[r]=t)}for(let r=0;r<e._rules.length;++r){const t=e._rules[r],o=f.scan(t.args,{source:"rules",name:t.name},n);if(o!==void 0){a=a||e.clone();const s=Object.assign({},t);s.args=o,a._rules[r]=s,a._singleRules.get(t.name)===t&&a._singleRules.set(t.name,s)}}for(const r in e.$_terms){if(r[0]==="_")continue;const t=f.scan(e.$_terms[r],{source:"terms",name:r},n);t!==void 0&&(a=a||e.clone(),a.$_terms[r]=t)}return a},f.scan=function(e,n,a,r,t){const o=r||[];if(e===null||typeof e!="object")return;let s;if(Array.isArray(e)){for(let i=0;i<e.length;++i){const u=n.source==="terms"&&n.name==="keys"&&e[i].key,d=f.scan(e[i],n,a,[i,...o],u);d!==void 0&&(s=s||e.slice(),s[i]=d)}return s}if(a.schema!==!1&&y.isSchema(e)||a.ref!==!1&&p.isRef(e)){const i=a.each(e,{...n,path:o,key:t});return i===e?void 0:i}for(const i in e){if(i[0]==="_")continue;const u=f.scan(e[i],n,a,[i,...o],t);u!==void 0&&(s=s||Object.assign({},e),s[i]=u)}return s}},6133:(j,x,h)=>{const l=h(375),y=h(8571),p=h(9621),f=h(8160);let e;const n={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};x.create=function(a,r={}){l(typeof a=="string","Invalid reference key:",a),f.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),l(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const t=Object.assign({},n.defaults,r);delete t.prefix;const o=t.separator,s=n.context(a,o,r.prefix);if(t.type=s.type,a=s.key,t.type==="value")if(s.root&&(l(!o||a[0]!==o,"Cannot specify relative path with root prefix"),t.ancestor="root",a||(a=null)),o&&o===a)a=null,t.ancestor=0;else if(t.ancestor!==void 0)l(!o||!a||a[0]!==o,"Cannot combine prefix with ancestor option");else{const[i,u]=n.ancestor(a,o);u&&(a=a.slice(u))===""&&(a=null),t.ancestor=i}return t.path=o?a===null?[]:a.split(o):[a],new n.Ref(t)},x.in=function(a,r={}){return x.create(a,{...r,in:!0})},x.isRef=function(a){return!!a&&!!a[f.symbols.ref]},n.Ref=class{constructor(a){l(typeof a=="object","Invalid reference construction"),f.assertOptions(a,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),l([!1,void 0].includes(a.separator)||typeof a.separator=="string"&&a.separator.length===1,"Invalid separator"),l(!a.adjust||typeof a.adjust=="function","options.adjust must be a function"),l(!a.map||Array.isArray(a.map),"options.map must be an array"),l(!a.map||!a.adjust,"Cannot set both map and adjust options"),Object.assign(this,n.defaults,a),l(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(a,r,t,o,s={}){return l(!this.in||s.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(t.context,r,s):this.type==="local"?this._resolve(o,r,s):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,s):(l(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,s)):this._resolve(a,r,s)}_resolve(a,r,t){let o;if(this.type==="value"&&r.mainstay.shadow&&t.shadow!==!1&&(o=r.mainstay.shadow.get(this.absolute(r))),o===void 0&&(o=p(a,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(o=this.adjust(o)),this.map){const s=this.map.get(o);s!==void 0&&(o=s)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,o),o}toString(){return this.display}absolute(a){return[...a.path.slice(0,-this.ancestor),...this.path]}clone(){return new n.Ref(this)}describe(){const a={path:this.path};this.type!=="value"&&(a.type=this.type),this.separator!=="."&&(a.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(a.ancestor=this.ancestor),this.map&&(a.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(a[r]=this[r]);return this.in!==!1&&(a.in=!0),{ref:a}}updateDisplay(){const a=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${a}`);if(!this.separator)return void(this.display=`ref:${a}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${a}`);if(this.ancestor==="root")return void(this.display=`ref:root:${a}`);if(this.ancestor===1)return void(this.display=`ref:${a||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${a||""}`}},n.Ref.prototype[f.symbols.ref]=!0,x.build=function(a){return(a=Object.assign({},n.defaults,a)).type==="value"&&a.ancestor===void 0&&(a.ancestor=1),new n.Ref(a)},n.context=function(a,r,t={}){if(a=a.trim(),t){const o=t.global===void 0?"$":t.global;if(o!==r&&a.startsWith(o))return{key:a.slice(o.length),type:"global"};const s=t.local===void 0?"#":t.local;if(s!==r&&a.startsWith(s))return{key:a.slice(s.length),type:"local"};const i=t.root===void 0?"/":t.root;if(i!==r&&a.startsWith(i))return{key:a.slice(i.length),type:"value",root:!0}}return{key:a,type:"value"}},n.ancestor=function(a,r){if(!r)return[1,0];if(a[0]!==r)return[1,0];if(a[1]!==r)return[0,1];let t=2;for(;a[t]===r;)++t;return[t-1,t]},x.toSibling=0,x.toParent=1,x.Manager=class{constructor(){this.refs=[]}register(a,r){if(a)if(r=r===void 0?x.toParent:r,Array.isArray(a))for(const t of a)this.register(t,r);else if(f.isSchema(a))for(const t of a._refs.refs)t.ancestor-r>=0&&this.refs.push({ancestor:t.ancestor-r,root:t.root});else x.isRef(a)&&a.type==="value"&&a.ancestor-r>=0&&this.refs.push({ancestor:a.ancestor-r,root:a.root}),e=e||h(3328),e.isTemplate(a)&&this.register(a.refs(),r)}get length(){return this.refs.length}clone(){const a=new x.Manager;return a.refs=y(this.refs),a}reset(){this.refs=[]}roots(){return this.refs.filter(a=>!a.ancestor).map(a=>a.root)}}},3378:(j,x,h)=>{const l=h(5107),y={};y.wrap=l.string().min(1).max(2).allow(!1),x.preferences=l.object({allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),context:l.object(),convert:l.boolean(),dateFormat:l.valid("date","iso","string","time","utc"),debug:l.boolean(),errors:{escapeHtml:l.boolean(),label:l.valid("path","key",!1),language:[l.string(),l.object().ref()],render:l.boolean(),stack:l.boolean(),wrap:{label:y.wrap,array:y.wrap,string:y.wrap}},externals:l.boolean(),messages:l.object(),noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:l.valid("required","optional","forbidden"),skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()}).strict(),y.nameRx=/^[a-zA-Z0-9]\w*$/,y.rule=l.object({alias:l.array().items(l.string().pattern(y.nameRx)).single(),args:l.array().items(l.string(),l.object({name:l.string().pattern(y.nameRx).required(),ref:l.boolean(),assert:l.alternatives([l.function(),l.object().schema()]).conditional("ref",{is:!0,then:l.required()}),normalize:l.function(),message:l.string().when("assert",{is:l.function(),then:l.required()})})),convert:l.boolean(),manifest:l.boolean(),method:l.function().allow(!1),multi:l.boolean(),validate:l.function()}),x.extension=l.object({type:l.alternatives([l.string(),l.object().regex()]).required(),args:l.function(),cast:l.object().pattern(y.nameRx,l.object({from:l.function().maxArity(1).required(),to:l.function().minArity(1).maxArity(2).required()})),base:l.object().schema().when("type",{is:l.object().regex(),then:l.forbidden()}),coerce:[l.function().maxArity(3),l.object({method:l.function().maxArity(3).required(),from:l.array().items(l.string()).single()})],flags:l.object().pattern(y.nameRx,l.object({setter:l.string(),default:l.any()})),manifest:{build:l.function().arity(2)},messages:[l.object(),l.string()],modifiers:l.object().pattern(y.nameRx,l.function().minArity(1).maxArity(2)),overrides:l.object().pattern(y.nameRx,l.function()),prepare:l.function().maxArity(3),rebuild:l.function().arity(1),rules:l.object().pattern(y.nameRx,y.rule),terms:l.object().pattern(y.nameRx,l.object({init:l.array().allow(null).required(),manifest:l.object().pattern(/.+/,[l.valid("schema","single"),l.object({mapped:l.object({from:l.string().required(),to:l.string().required()}).required()})])})),validate:l.function().maxArity(3)}).strict(),x.extensions=l.array().items(l.object(),l.function().arity(1)).strict(),y.desc={buffer:l.object({buffer:l.string()}),func:l.object({function:l.function().required(),options:{literal:!0}}),override:l.object({override:!0}),ref:l.object({ref:l.object({type:l.valid("value","global","local"),path:l.array().required(),separator:l.string().length(1).allow(!1),ancestor:l.number().min(0).integer().allow("root"),map:l.array().items(l.array().length(2)).min(1),adjust:l.function(),iterables:l.boolean(),in:l.boolean(),render:l.boolean()}).required()}),regex:l.object({regex:l.string().min(3)}),special:l.object({special:l.valid("deep").required()}),template:l.object({template:l.string().required(),options:l.object()}),value:l.object({value:l.alternatives([l.object(),l.array()]).required()})},y.desc.entity=l.alternatives([l.array().items(l.link("...")),l.boolean(),l.function(),l.number(),l.string(),y.desc.buffer,y.desc.func,y.desc.ref,y.desc.regex,y.desc.special,y.desc.template,y.desc.value,l.link("/")]),y.desc.values=l.array().items(null,l.boolean(),l.function(),l.number().allow(1/0,-1/0),l.string().allow(""),l.symbol(),y.desc.buffer,y.desc.func,y.desc.override,y.desc.ref,y.desc.regex,y.desc.template,y.desc.value),y.desc.messages=l.object().pattern(/.+/,[l.string(),y.desc.template,l.object().pattern(/.+/,[l.string(),y.desc.template])]),x.description=l.object({type:l.string().required(),flags:l.object({cast:l.string(),default:l.any(),description:l.string(),empty:l.link("/"),failover:y.desc.entity,id:l.string(),label:l.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:l.boolean(),unit:l.string()}).unknown(),preferences:{allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),convert:l.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:l.boolean(),label:["path","key"],language:[l.string(),y.desc.ref],wrap:{label:y.wrap,array:y.wrap}},externals:l.boolean(),messages:y.desc.messages,noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:["required","optional","forbidden"],skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()},allow:y.desc.values,invalid:y.desc.values,rules:l.array().min(1).items({name:l.string().required(),args:l.object().min(1),keep:l.boolean(),message:[l.string(),y.desc.messages],warn:l.boolean()}),keys:l.object().pattern(/.*/,l.link("/")),link:y.desc.ref}).pattern(/^[a-z]\w*$/,l.any())},493:(j,x,h)=>{const l=h(8571),y=h(9621),p=h(8160),f={value:Symbol("value")};j.exports=f.State=class{constructor(e,n,a){this.path=e,this.ancestors=n,this.mainstay=a.mainstay,this.schemas=a.schemas,this.debug=null}localize(e,n=null,a=null){const r=new f.State(e,n,this);return a&&r.schemas&&(r.schemas=[f.schemas(a),...r.schemas]),r}nest(e,n){const a=new f.State(this.path,this.ancestors,this);return a.schemas=a.schemas&&[f.schemas(e),...a.schemas],a.debug=n,a}shadow(e,n){this.mainstay.shadow=this.mainstay.shadow||new f.Shadow,this.mainstay.shadow.set(this.path,e,n)}snapshot(){this.mainstay.shadow&&(this._snapshot=l(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(e){return p.isSchema(e)?{schema:e}:e},f.Shadow=class{constructor(){this._values=null}set(e,n,a){if(!e.length||a==="strip"&&typeof e[e.length-1]=="number")return;this._values=this._values||new Map;let r=this._values;for(let t=0;t<e.length;++t){const o=e[t];let s=r.get(o);s||(s=new Map,r.set(o,s)),r=s}r[f.value]=n}get(e){const n=this.node(e);if(n)return n[f.value]}node(e){if(this._values)return y(this._values,e,{iterables:!0})}override(e,n){if(!this._values)return;const a=e.slice(0,-1),r=e[e.length-1],t=y(this._values,a,{iterables:!0});n?t.set(r,n):t&&t.delete(r)}}},3328:(j,x,h)=>{const l=h(375),y=h(8571),p=h(5277),f=h(1447),e=h(8160),n=h(6354),a=h(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}};j.exports=r.Template=class{constructor(t,o){if(l(typeof t=="string","Template source must be a string"),l(!t.includes("\0")&&!t.includes(""),"Template source cannot contain reserved control characters"),this.source=t,this.rendered=t,this._template=null,o){const{functions:s,...i}=o;this._settings=Object.keys(i).length?y(i):void 0,this._functions=s,this._functions&&(l(Object.keys(this._functions).every(u=>typeof u=="string"),"Functions keys must be strings"),l(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 t=r.encode(this.source),o=r.split(t);let s=!1;const i=[],u=o.shift();u&&i.push(u);for(const d of o){const g=d[0]!=="{",_=g?"}":"}}",v=d.indexOf(_);if(v===-1||d[1]==="{"){i.push(`{${r.decode(d)}`);continue}let c=d.slice(g?0:1,v);const m=c[0]===":";m&&(c=c.slice(1));const b=this._ref(r.decode(c),{raw:g,wrapped:m});i.push(b),typeof b!="string"&&(s=!0);const w=d.slice(v+_.length);w&&i.push(r.decode(w))}s?this._template=i:this.rendered=i.join("")}static date(t,o){return r.dateFormat[o.dateFormat].call(t)}describe(t={}){if(!this._settings&&t.compact)return this.source;const o={template:this.source};return this._settings&&(o.options=this._settings),this._functions&&(o.functions=this._functions),o}static build(t){return new r.Template(t.template,t.options||t.functions?{...t.options,functions:t.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(t){return!!t&&!!t[e.symbols.template]}refs(){if(!this._template)return;const t=[];for(const o of this._template)typeof o!="string"&&t.push(...o.refs);return t}resolve(t,o,s,i){return this._template&&this._template.length===1?this._part(this._template[0],t,o,s,i,{}):this.render(t,o,s,i)}_part(t,...o){return t.ref?t.ref.resolve(...o):t.formula.evaluate(o)}render(t,o,s,i,u={}){if(!this.isDynamic())return this.rendered;const d=[];for(const g of this._template)if(typeof g=="string")d.push(g);else{const _=this._part(g,t,o,s,i,u),v=r.stringify(_,t,o,s,i,u);if(v!==void 0){const c=g.raw||(u.errors&&u.errors.escapeHtml)===!1?v:p(v);d.push(r.wrap(c,g.wrapped&&s.errors.wrap.label))}}return d.join("")}_ref(t,{raw:o,wrapped:s}){const i=[],u=g=>{const _=a.create(g,this._settings);return i.push(_),v=>{const c=_.resolve(...v);return c!==void 0?c:null}};try{const g=this._functions?{...r.functions,...this._functions}:r.functions;var d=new f.Parser(t,{reference:u,functions:g,constants:r.constants})}catch(g){throw g.message=`Invalid template variable "${t}" fails due to: ${g.message}`,g}if(d.single){if(d.single.type==="reference"){const g=i[0];return{ref:g,raw:o,refs:i,wrapped:s||g.type==="local"&&g.key==="label"}}return r.stringify(d.single.value)}return{formula:d,raw:o,refs:i}}toString(){return this.source}},r.Template.prototype[e.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(t){return t.replace(/\\(\{+)/g,(o,s)=>r.opens.slice(0,s.length)).replace(/\\(\}+)/g,(o,s)=>r.closes.slice(0,s.length))},r.decode=function(t){return t.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(t){const o=[];let s="";for(let i=0;i<t.length;++i){const u=t[i];if(u==="{"){let d="";for(;i+1<t.length&&t[i+1]==="{";)d+="{",++i;o.push(s),s=d}else s+=u}return o.push(s),o},r.wrap=function(t,o){return o?o.length===1?`${o}${t}${o}`:`${o[0]}${t}${o[1]}`:t},r.stringify=function(t,o,s,i,u,d={}){const g=typeof t,_=i&&i.errors&&i.errors.wrap||{};let v=!1;if(a.isRef(t)&&t.render&&(v=t.in,t=t.resolve(o,s,i,u,{in:t.in,...d})),t===null)return"null";if(g==="string")return r.wrap(t,d.arrayItems&&_.string);if(g==="number"||g==="function"||g==="symbol")return t.toString();if(g!=="object")return JSON.stringify(t);if(t instanceof Date)return r.Template.date(t,i);if(t instanceof Map){const m=[];for(const[b,w]of t.entries())m.push(`${b.toString()} -> ${w.toString()}`);t=m}if(!Array.isArray(t))return t.toString();const c=[];for(const m of t)c.push(r.stringify(m,o,s,i,u,{arrayItems:!0,...d}));return r.wrap(c.join(", "),!v&&_.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(t,o,s)=>t?o:s,length:t=>typeof t=="string"?t.length:t&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:null,msg(t){const[o,s,i,u,d]=this,g=d.messages;if(!g)return"";const _=n.template(o,g[0],t,s,i)||n.template(o,g[1],t,s,i);return _?_.render(o,s,i,u,d):""},number:t=>typeof t=="number"?t:typeof t=="string"?parseFloat(t):typeof t=="boolean"?t?1:0:t instanceof Date?t.getTime():null}},4946:(j,x,h)=>{const l=h(375),y=h(1687),p=h(8068),f=h(8160),e=h(3292),n=h(6354),a=h(6133),r={};j.exports=p.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:a.toSibling}},args:(t,...o)=>o.length===1&&Array.isArray(o[0])?t.try(...o[0]):t.try(...o),validate(t,o){const{schema:s,error:i,state:u,prefs:d}=o;if(s._flags.match){const _=[],v=[];for(let m=0;m<s.$_terms.matches.length;++m){const b=s.$_terms.matches[m],w=u.nest(b.schema,`match.${m}`);w.snapshot();const k=b.schema.$_validate(t,w,d);k.errors?(v.push(k.errors),w.restore()):(_.push(k.value),w.commit())}if(_.length===0)return{errors:i("alternatives.any",{details:v.map(m=>n.details(m,{override:!1}))})};if(s._flags.match==="one")return _.length===1?{value:_[0]}:{errors:i("alternatives.one")};if(_.length!==s.$_terms.matches.length)return{errors:i("alternatives.all",{details:v.map(m=>n.details(m,{override:!1}))})};const c=m=>m.$_terms.matches.some(b=>b.schema.type==="object"||b.schema.type==="alternatives"&&c(b.schema));return c(s)?{value:_.reduce((m,b)=>y(m,b,{mergeArrays:!1}))}:{value:_[_.length-1]}}const g=[];for(let _=0;_<s.$_terms.matches.length;++_){const v=s.$_terms.matches[_];if(v.schema){const b=u.nest(v.schema,`match.${_}`);b.snapshot();const w=v.schema.$_validate(t,b,d);if(!w.errors)return b.commit(),w;b.restore(),g.push({schema:v.schema,reports:w.errors});continue}const c=v.ref?v.ref.resolve(t,u,d):t,m=v.is?[v]:v.switch;for(let b=0;b<m.length;++b){const w=m[b],{is:k,then:S,otherwise:C}=w,E=`match.${_}${v.switch?"."+b:""}`;if(k.$_match(c,u.nest(k,`${E}.is`),d)){if(S)return S.$_validate(t,u.nest(S,`${E}.then`),d)}else if(C)return C.$_validate(t,u.nest(C,`${E}.otherwise`),d)}}return r.errors(g,o)},rules:{conditional:{method(t,o){l(!this._flags._endedSwitch,"Unreachable condition"),l(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),l(o.break===void 0,"Cannot use break option with alternatives conditional");const s=this.clone(),i=e.when(s,t,o),u=i.is?[i]:i.switch;for(const d of u)if(d.then&&d.otherwise){s.$_setFlag("_endedSwitch",!0,{clone:!1});break}return s.$_terms.matches.push(i),s.$_mutateRebuild()}},match:{method(t){if(l(["any","one","all"].includes(t),"Invalid alternatives match mode",t),t!=="any")for(const o of this.$_terms.matches)l(o.schema,"Cannot combine match mode",t,"with conditional rules");return this.$_setFlag("match",t)}},try:{method(...t){l(t.length,"Missing alternative schemas"),f.verifyFlat(t,"try"),l(!this._flags._endedSwitch,"Unreachable condition");const o=this.clone();for(const s of t)o.$_terms.matches.push({schema:o.$_compile(s)});return o.$_mutateRebuild()}}},overrides:{label(t){return this.$_parent("label",t).$_modify({each:(o,s)=>s.path[0]!=="is"&&typeof o._flags.label!="string"?o.label(t):void 0,ref:!1})}},rebuild(t){t.$_modify({each:o=>{f.isSchema(o)&&o.type==="array"&&t.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(t,o){if(o.matches)for(const s of o.matches){const{schema:i,ref:u,is:d,not:g,then:_,otherwise:v}=s;t=i?t.try(i):u?t.conditional(u,{is:d,then:_,not:g,otherwise:v,switch:s.switch}):t.conditional(d,{then:_,otherwise:v})}return t}},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(t,{error:o,state:s}){if(!t.length)return{errors:o("alternatives.any")};if(t.length===1)return{errors:t[0].reports};const i=new Set,u=[];for(const{reports:d,schema:g}of t){if(d.length>1)return r.unmatched(t,o);const _=d[0];if(_ instanceof n.Report==0)return r.unmatched(t,o);if(_.state.path.length!==s.path.length){u.push({type:g.type,report:_});continue}if(_.code==="any.only"){for(const m of _.local.valids)i.add(m);continue}const[v,c]=_.code.split(".");c!=="base"?u.push({type:g.type,report:_}):_.code==="object.base"?i.add(_.local.type):i.add(v)}return u.length?u.length===1?{errors:u[0].report}:r.unmatched(t,o):{errors:o("alternatives.types",{types:[...i]})}},r.unmatched=function(t,o){const s=[];for(const i of t)s.push(...i.reports);return{errors:o("alternatives.match",n.details(s,{override:!1}))}}},8068:(j,x,h)=>{const l=h(375),y=h(7629),p=h(8160),f=h(6914);j.exports=y.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(e,n){return l(typeof e=="function","Method must be a function"),l(n===void 0||n&&typeof n=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:n}})},validate(e,n,{method:a}){try{return a(e,n)}catch(r){return n.error("any.custom",{error:r})}},args:["method","description"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){l(p.isSchema(e)&&e._flags.id,"Schema must be a schema with an id");const n=this.clone();return n.$_terms.shared=n.$_terms.shared||[],n.$_terms.shared.push(e),n.$_mutateRegister(e),n}},warning:{method(e,n){return l(e&&typeof e=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:n},warn:!0})},validate:(e,n,{code:a,local:r})=>n.error(a,r),args:["code","local"],multi:!0}},modifiers:{keep(e,n=!0){e.keep=n},message(e,n){e.message=f.compile(n)},warn(e,n=!0){e.warn=n}},manifest:{build(e,n){for(const a in n){const r=n[a];if(["examples","externals","metas","notes","tags"].includes(a))for(const t of r)e=e[a.slice(0,-1)](t);else if(a!=="alterations")if(a!=="whens"){if(a==="shared")for(const t of r)e=e.shared(t)}else for(const t of r){const{ref:o,is:s,not:i,then:u,otherwise:d,concat:g}=t;e=g?e.concat(g):o?e.when(o,{is:s,not:i,then:u,otherwise:d,switch:t.switch,break:t.break}):e.when(s,{then:u,otherwise:d,break:t.break})}else{const t={};for(const{target:o,adjuster:s}of r)t[o]=s;e=e.alter(t)}}return e}},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:(j,x,h)=>{const l=h(375),y=h(9474),p=h(9621),f=h(8068),e=h(8160),n=h(3292),a={};j.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:t,state:o,prefs:s}){if(!Array.isArray(r))return;const i=t.$_getRule("sort");return i?a.sort(t,r,i.args.options,o,s):void 0}},validate(r,{schema:t,error:o}){if(!Array.isArray(r)){if(t._flags.single){const s=[r];return s[e.symbols.arraySingle]=!0,{value:s}}return{errors:o("array.base")}}if(t.$_getRule("items")||t.$_terms.externals)return{value:r.slice()}},rules:{has:{method(r){r=this.$_compile(r,{appendPath:!0});const t=this.$_addRule({name:"has",args:{schema:r}});return t.$_mutateRegister(r),t},validate(r,{state:t,prefs:o,error:s},{schema:i}){const u=[r,...t.ancestors];for(let g=0;g<r.length;++g){const _=t.localize([...t.path,g],u,i);if(i.$_match(r[g],_,o))return r}const d=i._flags.label;return d?s("array.hasKnown",{patternLabel:d}):s("array.hasUnknown",null)},multi:!0},items:{method(...r){e.verifyFlat(r,"items");const t=this.$_addRule("items");for(let o=0;o<r.length;++o){const s=e.tryWithPath(()=>this.$_compile(r[o]),o,{append:!0});t.$_terms.items.push(s)}return t.$_mutateRebuild()},validate(r,{schema:t,error:o,state:s,prefs:i,errorsArray:u}){const d=t.$_terms._requireds.slice(),g=t.$_terms.ordered.slice(),_=[...t.$_terms._inclusions,...d],v=!r[e.symbols.arraySingle];delete r[e.symbols.arraySingle];const c=u();let m=r.length;for(let b=0;b<m;++b){const w=r[b];let k=!1,S=!1;const C=v?b:new Number(b),E=[...s.path,C];if(!t._flags.sparse&&w===void 0){if(c.push(o("array.sparse",{key:C,path:E,pos:b,value:void 0},s.localize(E))),i.abortEarly)return c;g.shift();continue}const L=[r,...s.ancestors];for(const q of t.$_terms._exclusions)if(q.$_match(w,s.localize(E,L,q),i,{presence:"ignore"})){if(c.push(o("array.excludes",{pos:b,value:w},s.localize(E))),i.abortEarly)return c;k=!0,g.shift();break}if(k)continue;if(t.$_terms.ordered.length){if(g.length){const q=g.shift(),M=q.$_validate(w,s.localize(E,L,q),i);if(M.errors){if(c.push(...M.errors),i.abortEarly)return c}else if(q._flags.result==="strip")a.fastSplice(r,b),--b,--m;else{if(!t._flags.sparse&&M.value===void 0){if(c.push(o("array.sparse",{key:C,path:E,pos:b,value:void 0},s.localize(E))),i.abortEarly)return c;continue}r[b]=M.value}continue}if(!t.$_terms.items.length){if(c.push(o("array.orderedLength",{pos:b,limit:t.$_terms.ordered.length})),i.abortEarly)return c;break}}const N=[];let z=d.length;for(let q=0;q<z;++q){const M=s.localize(E,L,d[q]);M.snapshot();const F=d[q].$_validate(w,M,i);if(N[q]=F,!F.errors){if(M.commit(),r[b]=F.value,S=!0,a.fastSplice(d,q),--q,--z,!t._flags.sparse&&F.value===void 0&&(c.push(o("array.sparse",{key:C,path:E,pos:b,value:void 0},s.localize(E))),i.abortEarly))return c;break}M.restore()}if(S)continue;const D=i.stripUnknown&&!!i.stripUnknown.arrays||!1;z=_.length;for(const q of _){let M;const F=d.indexOf(q);if(F!==-1)M=N[F];else{const W=s.localize(E,L,q);if(W.snapshot(),M=q.$_validate(w,W,i),!M.errors){W.commit(),q._flags.result==="strip"?(a.fastSplice(r,b),--b,--m):t._flags.sparse||M.value!==void 0?r[b]=M.value:(c.push(o("array.sparse",{key:C,path:E,pos:b,value:void 0},s.localize(E))),k=!0),S=!0;break}W.restore()}if(z===1){if(D){a.fastSplice(r,b),--b,--m,S=!0;break}if(c.push(...M.errors),i.abortEarly)return c;k=!0;break}}if(!k&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!S){if(D){a.fastSplice(r,b),--b,--m;continue}if(c.push(o("array.includes",{pos:b,value:w},s.localize(E))),i.abortEarly)return c}}return d.length&&a.fillMissedErrors(t,c,d,r,s,i),g.length&&(a.fillOrderedErrors(t,c,g,r,s,i),c.length||a.fillDefault(g,r,s,i)),c.length?c:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,t,{limit:o},{name:s,operator:i,args:u})=>e.compare(r.length,o,i)?r:t.error("array."+s,{limit:u.limit,value:r}),args:[{name:"limit",ref:!0,assert:e.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){e.verifyFlat(r,"ordered");const t=this.$_addRule("items");for(let o=0;o<r.length;++o){const s=e.tryWithPath(()=>this.$_compile(r[o]),o,{append:!0});a.validateSingle(s,t),t.$_mutateRegister(s),t.$_terms.ordered.push(s)}return t.$_mutateRebuild()}},single:{method(r){const t=r===void 0||!!r;return l(!t||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",t)}},sort:{method(r={}){e.assertOptions(r,["by","order"]);const t={order:r.order||"ascending"};return r.by&&(t.by=n.ref(r.by,{ancestor:0}),l(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(r,{error:t,state:o,prefs:s,schema:i},{options:u}){const{value:d,errors:g}=a.sort(i,r,u,o,s);if(g)return g;for(let _=0;_<r.length;++_)if(r[_]!==d[_])return t("array.sort",{order:u.order,by:u.by?u.by.key:"value"});return r},convert:!0},sparse:{method(r){const t=r===void 0||!!r;return this._flags.sparse===t?this:(t?this.clone():this.$_addRule("items")).$_setFlag("sparse",t,{clone:!1})}},unique:{method(r,t={}){l(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),e.assertOptions(t,["ignoreUndefined","separator"]);const o={name:"unique",args:{options:t,comparator:r}};if(r)if(typeof r=="string"){const s=e.default(t.separator,".");o.path=s?r.split(s):[r]}else o.comparator=r;return this.$_addRule(o)},validate(r,{state:t,error:o,schema:s},{comparator:i,options:u},{comparator:d,path:g}){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},v=d||y,c=u.ignoreUndefined;for(let m=0;m<r.length;++m){const b=g?p(r[m],g):r[m],w=d?_.custom:_[typeof b];if(l(w,"Failed to find unique map container for type",typeof b),w instanceof Map){const k=w.entries();let S;for(;!(S=k.next()).done;)if(v(S.value[0],b)){const C=t.localize([...t.path,m],[r,...t.ancestors]),E={pos:m,value:r[m],dupePos:S.value[1],dupeValue:r[S.value[1]]};return g&&(E.path=i),o("array.unique",E,C)}w.set(b,m)}else{if((!c||b!==void 0)&&w[b]!==void 0){const k={pos:m,value:r[m],dupePos:w[b],dupeValue:r[w[b]]};return g&&(k.path=i),o("array.unique",k,t.localize([...t.path,m],[r,...t.ancestors]))}w[b]=m}}return r},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(r,t)=>new Set(r)}},rebuild(r){r.$_terms._inclusions=[],r.$_terms._exclusions=[],r.$_terms._requireds=[];for(const t of r.$_terms.items)a.validateSingle(t,r),t._flags.presence==="required"?r.$_terms._requireds.push(t):t._flags.presence==="forbidden"?r.$_terms._exclusions.push(t):r.$_terms._inclusions.push(t);for(const t of r.$_terms.ordered)a.validateSingle(t,r)},manifest:{build:(r,t)=>(t.items&&(r=r.items(...t.items)),t.ordered&&(r=r.ordered(...t.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"}}),a.fillMissedErrors=function(r,t,o,s,i,u){const d=[];let g=0;for(const _ of o){const v=_._flags.label;v?d.push(v):++g}d.length?g?t.push(r.$_createError("array.includesRequiredBoth",s,{knownMisses:d,unknownMisses:g},i,u)):t.push(r.$_createError("array.includesRequiredKnowns",s,{knownMisses:d},i,u)):t.push(r.$_createError("array.includesRequiredUnknowns",s,{unknownMisses:g},i,u))},a.fillOrderedErrors=function(r,t,o,s,i,u){const d=[];for(const g of o)g._flags.presence==="required"&&d.push(g);d.length&&a.fillMissedErrors(r,t,d,s,i,u)},a.fillDefault=function(r,t,o,s){const i=[];let u=!0;for(let d=r.length-1;d>=0;--d){const g=r[d],_=[t,...o.ancestors],v=g.$_validate(void 0,o.localize(o.path,_,g),s).value;if(u){if(v===void 0)continue;u=!1}i.unshift(v)}i.length&&t.push(...i)},a.fastSplice=function(r,t){let o=t;for(;o<r.length;)r[o++]=r[o];--r.length},a.validateSingle=function(r,t){(r.type==="array"||r._flags._arrayItems)&&(l(!t._flags.single,"Cannot specify array item with single rule enabled"),t.$_setFlag("_arrayItems",!0,{clone:!1}))},a.sort=function(r,t,o,s,i){const u=o.order==="ascending"?1:-1,d=-1*u,g=u,_=(v,c)=>{let m=a.compare(v,c,d,g);if(m!==null||(o.by&&(v=o.by.resolve(v,s,i),c=o.by.resolve(c,s,i)),m=a.compare(v,c,d,g),m!==null))return m;const b=typeof v;if(b!==typeof c)throw r.$_createError("array.sort.mismatching",t,null,s,i);if(b!=="number"&&b!=="string")throw r.$_createError("array.sort.unsupported",t,{type:b},s,i);return b==="number"?(v-c)*u:v<c?d:g};try{return{value:t.slice().sort(_)}}catch(v){return{errors:v}}},a.compare=function(r,t,o,s){return r===t?0:r===void 0?1:t===void 0?-1:r===null?s:t===null?o:null}},4937:(j,x,h)=>{const l=h(375),y=h(8068),p=h(8160),f=h(2036),e={isBool:function(n){return typeof n=="boolean"}};j.exports=y.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(n,{schema:a}){if(typeof n!="boolean"){if(typeof n=="string"){const r=a._flags.sensitive?n:n.toLowerCase();n=r==="true"||r!=="false"&&n}return typeof n!="boolean"&&(n=a.$_terms.truthy&&a.$_terms.truthy.has(n,null,null,!a._flags.sensitive)||(!a.$_terms.falsy||!a.$_terms.falsy.has(n,null,null,!a._flags.sensitive))&&n),{value:n}}},validate(n,{error:a}){if(typeof n!="boolean")return{value:n,errors:a("boolean.base")}},rules:{truthy:{method(...n){p.verifyFlat(n,"truthy");const a=this.clone();a.$_terms.truthy=a.$_terms.truthy||new f;for(let r=0;r<n.length;++r){const t=n[r];l(t!==void 0,"Cannot call truthy with undefined"),a.$_terms.truthy.add(t)}return a}},falsy:{method(...n){p.verifyFlat(n,"falsy");const a=this.clone();a.$_terms.falsy=a.$_terms.falsy||new f;for(let r=0;r<n.length;++r){const t=n[r];l(t!==void 0,"Cannot call falsy with undefined"),a.$_terms.falsy.add(t)}return a}},sensitive:{method(n=!0){return this.$_setFlag("sensitive",n)}}},cast:{number:{from:e.isBool,to:(n,a)=>n?1:0},string:{from:e.isBool,to:(n,a)=>n?"true":"false"}},manifest:{build:(n,a)=>(a.truthy&&(n=n.truthy(...a.truthy)),a.falsy&&(n=n.falsy(...a.falsy)),n)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(j,x,h)=>{const l=h(375),y=h(8068),p=h(8160),f=h(3328),e={isDate:function(n){return n instanceof Date}};j.exports=y.extend({type:"date",coerce:{from:["number","string"],method:(n,{schema:a})=>({value:e.parse(n,a._flags.format)||n})},validate(n,{schema:a,error:r,prefs:t}){if(n instanceof Date&&!isNaN(n.getTime()))return;const o=a._flags.format;return t.convert&&o&&typeof n=="string"?{value:n,errors:r("date.format",{format:o})}:{value:n,errors:r("date.base")}},rules:{compare:{method:!1,validate(n,a,{date:r},{name:t,operator:o,args:s}){const i=r==="now"?Date.now():r.getTime();return p.compare(n.getTime(),i,o)?n:a.error("date."+t,{limit:s.date,value:n})},args:[{name:"date",ref:!0,normalize:n=>n==="now"?n:e.parse(n),assert:n=>n!==null,message:"must have a valid date format"}]},format:{method(n){return l(["iso","javascript","unix"].includes(n),"Unknown date format",n),this.$_setFlag("format",n)}},greater:{method(n){return this.$_addRule({name:"greater",method:"compare",args:{date:n},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(n){return this.$_addRule({name:"less",method:"compare",args:{date:n},operator:"<"})}},max:{method(n){return this.$_addRule({name:"max",method:"compare",args:{date:n},operator:"<="})}},min:{method(n){return this.$_addRule({name:"min",method:"compare",args:{date:n},operator:">="})}},timestamp:{method(n="javascript"){return l(["javascript","unix"].includes(n),'"type" must be one of "javascript, unix"'),this.format(n)}}},cast:{number:{from:e.isDate,to:(n,a)=>n.getTime()},string:{from:e.isDate,to:(n,{prefs:a})=>f.date(n,a)}},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"}}),e.parse=function(n,a){if(n instanceof Date)return n;if(typeof n!="string"&&(isNaN(n)||!isFinite(n))||/^\s*$/.test(n))return null;if(a==="iso")return p.isIsoDate(n)?e.date(n.toString()):null;const r=n;if(typeof n=="string"&&/^[+-]?\d+(\.\d+)?$/.test(n)&&(n=parseFloat(n)),a){if(a==="javascript")return e.date(1*n);if(a==="unix")return e.date(1e3*n);if(typeof r=="string")return null}return e.date(n)},e.date=function(n){const a=new Date(n);return isNaN(a.getTime())?null:a}},390:(j,x,h)=>{const l=h(375),y=h(7824);j.exports=y.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(p){return l(Number.isSafeInteger(p)&&p>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:p}})},validate:(p,f,{n:e})=>p.length===e?p:f.error("function.arity",{n:e})},class:{method(){return this.$_addRule("class")},validate:(p,f)=>/^\s*class\s/.test(p.toString())?p:f.error("function.class",{value:p})},minArity:{method(p){return l(Number.isSafeInteger(p)&&p>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:p}})},validate:(p,f,{n:e})=>p.length>=e?p:f.error("function.minArity",{n:e})},maxArity:{method(p){return l(Number.isSafeInteger(p)&&p>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:p}})},validate:(p,f,{n:e})=>p.length<=e?p:f.error("function.maxArity",{n:e})}},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:(j,x,h)=>{const l=h(978),y=h(375),p=h(8571),f=h(3652),e=h(8068),n=h(8160),a=h(3292),r=h(6354),t=h(6133),o=h(3328),s={renameDefaults:{alias:!1,multiple:!1,override:!1}};j.exports=e.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:(i,u)=>i.keys(u),validate(i,{schema:u,error:d,state:g,prefs:_}){if(!i||typeof i!==u.$_property("typeof")||Array.isArray(i))return{value:i,errors:d("object.base",{type:u.$_property("typeof")})};if(!(u.$_terms.renames||u.$_terms.dependencies||u.$_terms.keys||u.$_terms.patterns||u.$_terms.externals))return;i=s.clone(i,_);const v=[];if(u.$_terms.renames&&!s.rename(u,i,g,_,v))return{value:i,errors:v};if(!u.$_terms.keys&&!u.$_terms.patterns&&!u.$_terms.dependencies)return{value:i,errors:v};const c=new Set(Object.keys(i));if(u.$_terms.keys){const m=[i,...g.ancestors];for(const b of u.$_terms.keys){const w=b.key,k=i[w];c.delete(w);const S=g.localize([...g.path,w],m,b),C=b.schema.$_validate(k,S,_);if(C.errors){if(_.abortEarly)return{value:i,errors:C.errors};C.value!==void 0&&(i[w]=C.value),v.push(...C.errors)}else b.schema._flags.result==="strip"||C.value===void 0&&k!==void 0?delete i[w]:C.value!==void 0&&(i[w]=C.value)}}if(c.size||u._flags._hasPatternMatch){const m=s.unknown(u,i,c,v,g,_);if(m)return m}if(u.$_terms.dependencies)for(const m of u.$_terms.dependencies){if(m.key!==null&&s.isPresent(m.options)(m.key.resolve(i,g,_,null,{shadow:!1}))===!1)continue;const b=s.dependencies[m.rel](u,m,i,g,_);if(b){const w=u.$_createError(b.code,i,b.context,g,_);if(_.abortEarly)return{value:i,errors:w};v.push(w)}}return{value:i,errors:v}},rules:{and:{method(...i){return n.verifyFlat(i,"and"),s.dependency(this,"and",null,i)}},append:{method(i){return i==null||Object.keys(i).length===0?this:this.keys(i)}},assert:{method(i,u,d){o.isTemplate(i)||(i=a.ref(i)),y(d===void 0||typeof d=="string","Message must be a string"),u=this.$_compile(u,{appendPath:!0});const g=this.$_addRule({name:"assert",args:{subject:i,schema:u,message:d}});return g.$_mutateRegister(i),g.$_mutateRegister(u),g},validate(i,{error:u,prefs:d,state:g},{subject:_,schema:v,message:c}){const m=_.resolve(i,g,d),b=t.isRef(_)?_.absolute(g):[];return v.$_match(m,g.localize(b,[i,...g.ancestors],v),d)?i:u("object.assert",{subject:_,message:c})},args:["subject","schema","message"],multi:!0},instance:{method(i,u){return y(typeof i=="function","constructor must be a function"),u=u||i.name,this.$_addRule({name:"instance",args:{constructor:i,name:u}})},validate:(i,u,{constructor:d,name:g})=>i instanceof d?i:u.error("object.instance",{type:g,value:i}),args:["constructor","name"]},keys:{method(i){y(i===void 0||typeof i=="object","Object schema must be a valid object"),y(!n.isSchema(i),"Object schema cannot be a joi schema");const u=this.clone();if(i)if(Object.keys(i).length){u.$_terms.keys=u.$_terms.keys?u.$_terms.keys.filter(d=>!i.hasOwnProperty(d.key)):new s.Keys;for(const d in i)n.tryWithPath(()=>u.$_terms.keys.push({key:d,schema:this.$_compile(i[d])}),d)}else u.$_terms.keys=new s.Keys;else u.$_terms.keys=null;return u.$_mutateRebuild()}},length:{method(i){return this.$_addRule({name:"length",args:{limit:i},operator:"="})},validate:(i,u,{limit:d},{name:g,operator:_,args:v})=>n.compare(Object.keys(i).length,d,_)?i:u.error("object."+g,{limit:v.limit,value:i}),args:[{name:"limit",ref:!0,assert:n.limit,message:"must be a positive integer"}]},max:{method(i){return this.$_addRule({name:"max",method:"length",args:{limit:i},operator:"<="})}},min:{method(i){return this.$_addRule({name:"min",method:"length",args:{limit:i},operator:">="})}},nand:{method(...i){return n.verifyFlat(i,"nand"),s.dependency(this,"nand",null,i)}},or:{method(...i){return n.verifyFlat(i,"or"),s.dependency(this,"or",null,i)}},oxor:{method(...i){return s.dependency(this,"oxor",null,i)}},pattern:{method(i,u,d={}){const g=i instanceof RegExp;g||(i=this.$_compile(i,{appendPath:!0})),y(u!==void 0,"Invalid rule"),n.assertOptions(d,["fallthrough","matches"]),g&&y(!i.flags.includes("g")&&!i.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 v={[g?"regex":"schema"]:i,rule:u};return d.matches&&(v.matches=this.$_compile(d.matches),v.matches.type!=="array"&&(v.matches=v.matches.$_root.array().items(v.matches)),_.$_mutateRegister(v.matches),_.$_setFlag("_hasPatternMatch",!0,{clone:!1})),d.fallthrough&&(v.fallthrough=!0),_.$_terms.patterns.push(v),_.$_mutateRegister(u),_}},ref:{method(){return this.$_addRule("ref")},validate:(i,u)=>t.isRef(i)?i:u.error("object.refType",{value:i})},regex:{method(){return this.$_addRule("regex")},validate:(i,u)=>i instanceof RegExp?i:u.error("object.regex",{value:i})},rename:{method(i,u,d={}){y(typeof i=="string"||i instanceof RegExp,"Rename missing the from argument"),y(typeof u=="string"||u instanceof o,"Invalid rename to argument"),y(u!==i,"Cannot rename key to same name:",i),n.assertOptions(d,["alias","ignoreUndefined","override","multiple"]);const g=this.clone();g.$_terms.renames=g.$_terms.renames||[];for(const _ of g.$_terms.renames)y(_.from!==i,"Cannot rename the same key multiple times");return u instanceof o&&g.$_mutateRegister(u),g.$_terms.renames.push({from:i,to:u,options:l(s.renameDefaults,d)}),g}},schema:{method(i="any"){return this.$_addRule({name:"schema",args:{type:i}})},validate:(i,u,{type:d})=>!n.isSchema(i)||d!=="any"&&i.type!==d?u.error("object.schema",{type:d}):i},unknown:{method(i){return this.$_setFlag("unknown",i!==!1)}},with:{method(i,u,d={}){return s.dependency(this,"with",i,u,d)}},without:{method(i,u,d={}){return s.dependency(this,"without",i,u,d)}},xor:{method(...i){return n.verifyFlat(i,"xor"),s.dependency(this,"xor",null,i)}}},overrides:{default(i,u){return i===void 0&&(i=n.symbols.deepDefault),this.$_parent("default",i,u)}},rebuild(i){if(i.$_terms.keys){const u=new f.Sorter;for(const d of i.$_terms.keys)n.tryWithPath(()=>u.add(d,{after:d.schema.$_rootReferences(),group:d.key}),d.key);i.$_terms.keys=new s.Keys(...u.nodes)}},manifest:{build(i,u){if(u.keys&&(i=i.keys(u.keys)),u.dependencies)for(const{rel:d,key:g=null,peers:_,options:v}of u.dependencies)i=s.dependency(i,d,g,_,v);if(u.patterns)for(const{regex:d,schema:g,rule:_,fallthrough:v,matches:c}of u.patterns)i=i.pattern(d||g,_,{fallthrough:v,matches:c});if(u.renames)for(const{from:d,to:g,options:_}of u.renames)i=i.rename(d,g,_);return i}},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}}"}}),s.clone=function(i,u){if(typeof i=="object"){if(u.nonEnumerables)return p(i,{shallow:!0});const g=Object.create(Object.getPrototypeOf(i));return Object.assign(g,i),g}const d=function(...g){return i.apply(this,g)};return d.prototype=p(i.prototype),Object.defineProperty(d,"name",{value:i.name,writable:!1}),Object.defineProperty(d,"length",{value:i.length,writable:!1}),Object.assign(d,i),d},s.dependency=function(i,u,d,g,_){y(d===null||typeof d=="string",u,"key must be a strings"),_||(_=g.length>1&&typeof g[g.length-1]=="object"?g.pop():{}),n.assertOptions(_,["separator","isPresent"]),g=[].concat(g);const v=n.default(_.separator,"."),c=[];for(const b of g)y(typeof b=="string",u,"peers must be strings"),c.push(a.ref(b,{separator:v,ancestor:0,prefix:!1}));d!==null&&(d=a.ref(d,{separator:v,ancestor:0,prefix:!1}));const m=i.clone();return m.$_terms.dependencies=m.$_terms.dependencies||[],m.$_terms.dependencies.push(new s.Dependency(u,d,c,g,_)),m},s.dependencies={and(i,u,d,g,_){const v=[],c=[],m=u.peers.length,b=s.isPresent(u.options);for(const w of u.peers)b(w.resolve(d,g,_,null,{shadow:!1}))===!1?v.push(w.key):c.push(w.key);if(v.length!==m&&c.length!==m)return{code:"object.and",context:{present:c,presentWithLabels:s.keysToLabels(i,c),missing:v,missingWithLabels:s.keysToLabels(i,v)}}},nand(i,u,d,g,_){const v=[],c=s.isPresent(u.options);for(const w of u.peers)c(w.resolve(d,g,_,null,{shadow:!1}))&&v.push(w.key);if(v.length!==u.peers.length)return;const m=u.paths[0],b=u.paths.slice(1);return{code:"object.nand",context:{main:m,mainWithLabel:s.keysToLabels(i,m),peers:b,peersWithLabels:s.keysToLabels(i,b)}}},or(i,u,d,g,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,g,_,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)}}},oxor(i,u,d,g,_){const v=[],c=s.isPresent(u.options);for(const b of u.peers)c(b.resolve(d,g,_,null,{shadow:!1}))&&v.push(b.key);if(!v.length||v.length===1)return;const m={peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)};return m.present=v,m.presentWithLabels=s.keysToLabels(i,v),{code:"object.oxor",context:m}},with(i,u,d,g,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,g,_,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:u.key.key,mainWithLabel:s.keysToLabels(i,u.key.key),peer:c.key,peerWithLabel:s.keysToLabels(i,c.key)}}},without(i,u,d,g,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,g,_,null,{shadow:!1})))return{code:"object.without",context:{main:u.key.key,mainWithLabel:s.keysToLabels(i,u.key.key),peer:c.key,peerWithLabel:s.keysToLabels(i,c.key)}}},xor(i,u,d,g,_){const v=[],c=s.isPresent(u.options);for(const b of u.peers)c(b.resolve(d,g,_,null,{shadow:!1}))&&v.push(b.key);if(v.length===1)return;const m={peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)};return v.length===0?{code:"object.missing",context:m}:(m.present=v,m.presentWithLabels=s.keysToLabels(i,v),{code:"object.xor",context:m})}},s.keysToLabels=function(i,u){return Array.isArray(u)?u.map(d=>i.$_mapLabels(d)):i.$_mapLabels(u)},s.isPresent=function(i){return typeof i.isPresent=="function"?i.isPresent:u=>u!==void 0},s.rename=function(i,u,d,g,_){const v={};for(const c of i.$_terms.renames){const m=[],b=typeof c.from!="string";if(b)for(const w in u){if(u[w]===void 0&&c.options.ignoreUndefined||w===c.to)continue;const k=c.from.exec(w);k&&m.push({from:w,to:c.to,match:k})}else!Object.prototype.hasOwnProperty.call(u,c.from)||u[c.from]===void 0&&c.options.ignoreUndefined||m.push(c);for(const w of m){const k=w.from;let S=w.to;if(S instanceof o&&(S=S.render(u,d,g,w.match)),k!==S){if(!c.options.multiple&&v[S]&&(_.push(i.$_createError("object.rename.multiple",u,{from:k,to:S,pattern:b},d,g)),g.abortEarly)||Object.prototype.hasOwnProperty.call(u,S)&&!c.options.override&&!v[S]&&(_.push(i.$_createError("object.rename.override",u,{from:k,to:S,pattern:b},d,g)),g.abortEarly))return!1;u[k]===void 0?delete u[S]:u[S]=u[k],v[S]=!0,c.options.alias||delete u[k]}}}return!0},s.unknown=function(i,u,d,g,_,v){if(i.$_terms.patterns){let c=!1;const m=i.$_terms.patterns.map(w=>{if(w.matches)return c=!0,[]}),b=[u,..._.ancestors];for(const w of d){const k=u[w],S=[..._.path,w];for(let C=0;C<i.$_terms.patterns.length;++C){const E=i.$_terms.patterns[C];if(E.regex){const z=E.regex.test(w);if(_.mainstay.tracer.debug(_,"rule",`pattern.${C}`,z?"pass":"error"),!z)continue}else if(!E.schema.$_match(w,_.nest(E.schema,`pattern.${C}`),v))continue;d.delete(w);const L=_.localize(S,b,{schema:E.rule,key:w}),N=E.rule.$_validate(k,L,v);if(N.errors){if(v.abortEarly)return{value:u,errors:N.errors};g.push(...N.errors)}if(E.matches&&m[C].push(w),u[w]=N.value,!E.fallthrough)break}}if(c)for(let w=0;w<m.length;++w){const k=m[w];if(!k)continue;const S=i.$_terms.patterns[w].matches,C=_.localize(_.path,b,S),E=S.$_validate(k,C,v);if(E.errors){const L=r.details(E.errors,{override:!1});L.matches=k;const N=i.$_createError("object.pattern.match",u,L,_,v);if(v.abortEarly)return{value:u,errors:N};g.push(N)}}}if(d.size&&(i.$_terms.keys||i.$_terms.patterns)){if(v.stripUnknown&&i._flags.unknown===void 0||v.skipFunctions){const c=!(!v.stripUnknown||v.stripUnknown!==!0&&!v.stripUnknown.objects);for(const m of d)c?(delete u[m],d.delete(m)):typeof u[m]=="function"&&d.delete(m)}if(!n.default(i._flags.unknown,v.allowUnknown))for(const c of d){const m=_.localize([..._.path,c],[]),b=i.$_createError("object.unknown",u[c],{child:c},m,v,{flags:!1});if(v.abortEarly)return{value:u,errors:b};g.push(b)}}},s.Dependency=class{constructor(i,u,d,g,_){this.rel=i,this.key=u,this.peers=d,this.paths=g,this.options=_}describe(){const i={rel:this.rel,peers:this.paths};return this.key!==null&&(i.key=this.key.key),this.peers[0].separator!=="."&&(i.options={...i.options,separator:this.peers[0].separator}),this.options.isPresent&&(i.options={...i.options,isPresent:this.options.isPresent}),i}},s.Keys=class extends Array{concat(i){const u=this.slice(),d=new Map;for(let g=0;g<u.length;++g)d.set(u[g].key,g);for(const g of i){const _=g.key,v=d.get(_);v!==void 0?u[v]={key:_,schema:u[v].schema.concat(g.schema)}:u.push(g)}return u}}},8785:(j,x,h)=>{const l=h(375),y=h(8068),p=h(8160),f=h(3292),e=h(6354),n={};j.exports=y.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(a,r)=>a.ref(r),validate(a,{schema:r,state:t,prefs:o}){l(r.$_terms.link,"Uninitialized link schema");const s=n.generate(r,a,t,o),i=r.$_terms.link[0].ref;return s.$_validate(a,t.nest(s,`link:${i.display}:${s.type}`),o)},generate:(a,r,t,o)=>n.generate(a,r,t,o),rules:{ref:{method(a){l(!this.$_terms.link,"Cannot reinitialize schema"),a=f.ref(a),l(a.type==="value"||a.type==="local","Invalid reference type:",a.type),l(a.type==="local"||a.ancestor==="root"||a.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:a}],r}},relative:{method(a=!0){return this.$_setFlag("relative",a)}}},overrides:{concat(a){l(this.$_terms.link,"Uninitialized link schema"),l(p.isSchema(a),"Invalid schema object"),l(a.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:a}),r.$_mutateRebuild()}},manifest:{build:(a,r)=>(l(r.link,"Invalid link description missing link"),a.ref(r.link))}}),n.generate=function(a,r,t,o){let s=t.mainstay.links.get(a);if(s)return s._generate(r,t,o).schema;const i=a.$_terms.link[0].ref,{perspective:u,path:d}=n.perspective(i,t);n.assert(u,"which is outside of schema boundaries",i,a,t,o);try{s=d.length?u.$_reach(d):u}catch{n.assert(!1,"to non-existing schema",i,a,t,o)}return n.assert(s.type!=="link","which is another link",i,a,t,o),a._flags.relative||t.mainstay.links.set(a,s),s._generate(r,t,o).schema},n.perspective=function(a,r){if(a.type==="local"){for(const{schema:t,key:o}of r.schemas){if((t._flags.id||o)===a.path[0])return{perspective:t,path:a.path.slice(1)};if(t.$_terms.shared){for(const s of t.$_terms.shared)if(s._flags.id===a.path[0])return{perspective:s,path:a.path.slice(1)}}}return{perspective:null,path:null}}return a.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:a.path}:{perspective:r.schemas[a.ancestor]&&r.schemas[a.ancestor].schema,path:a.path}},n.assert=function(a,r,t,o,s,i){a||l(!1,`"${e.label(o._flags,s,i)}" contains link reference "${t.display}" ${r}`)}},3832:(j,x,h)=>{const l=h(375),y=h(8068),p=h(8160),f={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(e){const n=e.toString(),a=n.indexOf("."),r=n.indexOf("e");return(a<0?0:(r<0?n.length:r)-a-1)+(r<0?0:Math.max(0,-parseInt(n.slice(r+1))))}};j.exports=y.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,{schema:n,error:a}){if(!e.match(f.numberRx))return;e=e.trim();const r={value:parseFloat(e)};if(r.value===0&&(r.value=0),!n._flags.unsafe)if(e.match(/e/i)){if(f.extractSignificantDigits(e)!==f.extractSignificantDigits(String(r.value)))return r.errors=a("number.unsafe"),r}else{const t=r.value.toString();if(t.match(/e/i))return r;if(t!==f.normalizeDecimal(e))return r.errors=a("number.unsafe"),r}return r}},validate(e,{schema:n,error:a,prefs:r}){if(e===1/0||e===-1/0)return{value:e,errors:a("number.infinity")};if(!p.isNumber(e))return{value:e,errors:a("number.base")};const t={value:e};if(r.convert){const o=n.$_getRule("precision");if(o){const s=Math.pow(10,o.args.limit);t.value=Math.round(t.value*s)/s}}return t.value===0&&(t.value=0),!n._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.errors=a("number.unsafe")),t},rules:{compare:{method:!1,validate:(e,n,{limit:a},{name:r,operator:t,args:o})=>p.compare(e,a,t)?e:n.error("number."+r,{limit:o.limit,value:e}),args:[{name:"limit",ref:!0,assert:p.isNumber,message:"must be a number"}]},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{limit:e},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(e,n)=>Math.trunc(e)-e==0?e:n.error("number.integer")},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{limit:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{limit:e},operator:">="})}},multiple:{method(e){const n=typeof e=="number"?f.decimalPlaces(e):null,a=Math.pow(10,n);return this.$_addRule({name:"multiple",args:{base:e,baseDecimalPlace:n,pfactor:a}})},validate:(e,n,{base:a,baseDecimalPlace:r,pfactor:t},o)=>f.decimalPlaces(e)>r?n.error("number.multiple",{multiple:o.args.base,value:e}):Math.round(t*e)%Math.round(t*a)==0?e:n.error("number.multiple",{multiple:o.args.base,value:e}),args:[{name:"base",ref:!0,assert:e=>typeof e=="number"&&isFinite(e)&&e>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(e,n)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:n.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(e){return l(Number.isSafeInteger(e),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:e}})},validate(e,n,{limit:a}){const r=e.toString().match(f.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=a?e:n.error("number.precision",{limit:a,value:e})},convert:!0},sign:{method(e){return l(["negative","positive"].includes(e),"Invalid sign",e),this.$_addRule({name:"sign",args:{sign:e}})},validate:(e,n,{sign:a})=>a==="negative"&&e<0||a==="positive"&&e>0?e:n.error(`number.${a}`)},unsafe:{method(e=!0){return l(typeof e=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",e)}}},cast:{string:{from:e=>typeof e=="number",to:(e,n)=>e.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(e){return e.replace(f.exponentialPartRegex,"").replace(f.dotRegex,"").replace(f.trailingZerosRegex,"").replace(f.leadingSignAndZerosRegex,"")},f.normalizeDecimal=function(e){return(e=e.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&e.endsWith("0")&&(e=e.replace(/0+$/,"")),e==="-0"?"0":e}},8966:(j,x,h)=>{const l=h(7824);j.exports=l.extend({type:"object",cast:{map:{from:y=>y&&typeof y=="object",to:(y,p)=>new Map(Object.entries(y))}}})},7417:(j,x,h)=>{const l=h(375),y=h(5380),p=h(1745),f=h(9959),e=h(6064),n=h(9926),a=h(5752),r=h(8068),t=h(8160),o={tlds:n instanceof Set&&{tlds:{allow:n,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"]};j.exports=r.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(s,{schema:i,state:u,prefs:d}){const g=i.$_getRule("normalize");g&&(s=s.normalize(g.args.form));const _=i.$_getRule("case");_&&(s=_.args.direction==="upper"?s.toLocaleUpperCase():s.toLocaleLowerCase());const v=i.$_getRule("trim");if(v&&v.args.enabled&&(s=s.trim()),i.$_terms.replacements)for(const m of i.$_terms.replacements)s=s.replace(m.pattern,m.replacement);const c=i.$_getRule("hex");if(c&&c.args.options.byteAligned&&s.length%2!=0&&(s=`0${s}`),i.$_getRule("isoDate")){const m=o.isoDate(s);m&&(s=m)}if(i._flags.truncate){const m=i.$_getRule("max");if(m){let b=m.args.limit;if(t.isResolvable(b)&&(b=b.resolve(s,u,d),!t.limit(b)))return{value:s,errors:i.$_createError("any.ref",b,{ref:m.args.limit,arg:"limit",reason:"must be a positive integer"},u,d)};s=s.slice(0,b)}}return{value:s}}},validate(s,{schema:i,error:u}){if(typeof s!="string")return{value:s,errors:u("string.base")};if(s===""){const d=i.$_getRule("min");return d&&d.args.limit===0?void 0:{value:s,errors:u("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(s,i)=>/^[a-zA-Z0-9]+$/.test(s)?s:i.error("string.alphanum")},base64:{method(s={}){return t.assertOptions(s,["paddingRequired","urlSafe"]),s={urlSafe:!1,paddingRequired:!0,...s},l(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),l(typeof s.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:s}})},validate:(s,i,{options:u})=>o.base64Regex[u.paddingRequired][u.urlSafe].test(s)?s:i.error("string.base64")},case:{method(s){return l(["lower","upper"].includes(s),"Invalid case:",s),this.$_addRule({name:"case",args:{direction:s}})},validate:(s,i,{direction:u})=>u==="lower"&&s===s.toLocaleLowerCase()||u==="upper"&&s===s.toLocaleUpperCase()?s:i.error(`string.${u}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(s,i){let u=s.length,d=0,g=1;for(;u--;){const _=s.charAt(u)*g;d+=_-9*(_>9),g^=3}return d>0&&d%10==0?s:i.error("string.creditCard")}},dataUri:{method(s={}){return t.assertOptions(s,["paddingRequired"]),s={paddingRequired:!0,...s},l(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:s}})},validate(s,i,{options:u}){const d=s.match(o.dataUriRegex);return d&&(!d[2]||d[2]!=="base64"||o.base64Regex[u.paddingRequired].false.test(d[3]))?s:i.error("string.dataUri")}},domain:{method(s){s&&t.assertOptions(s,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const i=o.addressOptions(s);return this.$_addRule({name:"domain",args:{options:s},address:i})},validate:(s,i,u,{address:d})=>y.isValid(s,d)?s:i.error("string.domain")},email:{method(s={}){t.assertOptions(s,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),l(s.multiple===void 0||typeof s.multiple=="boolean","multiple option must be an boolean");const i=o.addressOptions(s),u=new RegExp(`\\s*[${s.separator?e(s.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:s},regex:u,address:i})},validate(s,i,{options:u},{regex:d,address:g}){const _=u.multiple?s.split(d):[s],v=[];for(const c of _)p.isValid(c,g)||v.push(c);return v.length?i.error("string.email",{value:s,invalids:v}):s}},guid:{alias:"uuid",method(s={}){t.assertOptions(s,["version","separator"]);let i="";if(s.version){const g=[].concat(s.version);l(g.length>=1,"version must have at least 1 valid version specified");const _=new Set;for(let v=0;v<g.length;++v){const c=g[v];l(typeof c=="string","version at position "+v+" must be a string");const m=o.guidVersions[c.toLowerCase()];l(m,"version at position "+v+" must be one of "+Object.keys(o.guidVersions).join(", ")),l(!_.has(m),"version at position "+v+" must not be a duplicate"),i+=m,_.add(m)}}l(o.guidSeparators.has(s.separator),'separator must be one of true, false, "-", or ":"');const u=s.separator===void 0?"[:-]?":s.separator===!0?"[:-]":s.separator===!1?"[]?":`\\${s.separator}`,d=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${u})[0-9A-F]{4}\\2?[${i||"0-9A-F"}][0-9A-F]{3}\\2?[${i?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:s},regex:d})},validate(s,i,u,{regex:d}){const g=d.exec(s);return g?o.guidBrackets[g[1]]!==g[g.length-1]?i.error("string.guid"):s:i.error("string.guid")}},hex:{method(s={}){return t.assertOptions(s,["byteAligned","prefix"]),s={byteAligned:!1,prefix:!1,...s},l(typeof s.byteAligned=="boolean","byteAligned must be boolean"),l(typeof s.prefix=="boolean"||s.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:s}})},validate:(s,i,{options:u})=>(u.prefix==="optional"?o.hexRegex.withOptionalPrefix:u.prefix===!0?o.hexRegex.withPrefix:o.hexRegex.withoutPrefix).test(s)?u.byteAligned&&s.length%2!=0?i.error("string.hexAlign"):s:i.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(s,i)=>y.isValid(s,{minDomainSegments:1})||o.ipRegex.test(s)?s:i.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(s={}){t.assertOptions(s,["cidr","version"]);const{cidr:i,versions:u,regex:d}=f.regex(s),g=s.version?u:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:i,version:g}},regex:d})},validate:(s,i,{options:u},{regex:d})=>d.test(s)?s:u.version?i.error("string.ipVersion",{value:s,cidr:u.cidr,version:u.version}):i.error("string.ip",{value:s,cidr:u.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(s,{error:i})=>o.isoDate(s)?s:i("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(s,i)=>o.isoDurationRegex.test(s)?s:i.error("string.isoDuration")},length:{method(s,i){return o.length(this,"length",s,"=",i)},validate(s,i,{limit:u,encoding:d},{name:g,operator:_,args:v}){const c=!d&&s.length;return t.compare(c,u,_)?s:i.error("string."+g,{limit:v.limit,value:s,encoding:d})},args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(s,i){return o.length(this,"max",s,"<=",i)},args:["limit","encoding"]},min:{method(s,i){return o.length(this,"min",s,">=",i)},args:["limit","encoding"]},normalize:{method(s="NFC"){return l(o.normalizationForms.includes(s),"normalization form must be one of "+o.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:s}})},validate:(s,{error:i},{form:u})=>s===s.normalize(u)?s:i("string.normalize",{value:s,form:u}),convert:!0},pattern:{alias:"regex",method(s,i={}){l(s instanceof RegExp,"regex must be a RegExp"),l(!s.flags.includes("g")&&!s.flags.includes("y"),"regex should not use global or sticky mode"),typeof i=="string"&&(i={name:i}),t.assertOptions(i,["invert","name"]);const u=["string.pattern",i.invert?".invert":"",i.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:s,options:i},errorCode:u})},validate:(s,i,{regex:u,options:d},{errorCode:g})=>u.test(s)^d.invert?s:i.error(g,{name:d.name,regex:u,value:s}),args:["regex","options"],multi:!0},replace:{method(s,i){typeof s=="string"&&(s=new RegExp(e(s),"g")),l(s instanceof RegExp,"pattern must be a RegExp"),l(typeof i=="string","replacement must be a String");const u=this.clone();return u.$_terms.replacements||(u.$_terms.replacements=[]),u.$_terms.replacements.push({pattern:s,replacement:i}),u}},token:{method(){return this.$_addRule("token")},validate:(s,i)=>/^\w+$/.test(s)?s:i.error("string.token")},trim:{method(s=!0){return l(typeof s=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:s}})},validate:(s,i,{enabled:u})=>u&&s!==s.trim()?i.error("string.trim"):s,convert:!0},truncate:{method(s=!0){return l(typeof s=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",s)}},uppercase:{method(){return this.case("upper")}},uri:{method(s={}){t.assertOptions(s,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),s.domain&&t.assertOptions(s.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:i,scheme:u}=a.regex(s),d=s.domain?o.addressOptions(s.domain):null;return this.$_addRule({name:"uri",args:{options:s},regex:i,domain:d,scheme:u})},validate(s,i,{options:u},{regex:d,domain:g,scheme:_}){if(["http:/","https:/"].includes(s))return i.error("string.uri");let v=d.exec(s);if(!v&&i.prefs.convert&&u.encodeUri){const c=encodeURI(s);v=d.exec(c),v&&(s=c)}if(v){const c=v[1]||v[2];return!g||u.allowRelative&&!c||y.isValid(c,g)?s:i.error("string.domain",{value:c})}return u.relativeOnly?i.error("string.uriRelativeOnly"):u.scheme?i.error("string.uriCustomScheme",{scheme:_,value:s}):i.error("string.uri")}}},manifest:{build(s,i){if(i.replacements)for(const{pattern:u,replacement:d}of i.replacements)s=s.replace(u,d);return s}},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"}}),o.addressOptions=function(s){if(!s)return o.tlds||s;if(l(s.minDomainSegments===void 0||Number.isSafeInteger(s.minDomainSegments)&&s.minDomainSegments>0,"minDomainSegments must be a positive integer"),l(s.maxDomainSegments===void 0||Number.isSafeInteger(s.maxDomainSegments)&&s.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),s.tlds===!1)return s;if(s.tlds===!0||s.tlds===void 0)return l(o.tlds,"Built-in TLD list disabled"),Object.assign({},s,o.tlds);l(typeof s.tlds=="object","tlds must be true, false, or an object");const i=s.tlds.deny;if(i)return Array.isArray(i)&&(s=Object.assign({},s,{tlds:{deny:new Set(i)}})),l(s.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),l(!s.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),o.validateTlds(s.tlds.deny,"tlds.deny"),s;const u=s.tlds.allow;return u?u===!0?(l(o.tlds,"Built-in TLD list disabled"),Object.assign({},s,o.tlds)):(Array.isArray(u)&&(s=Object.assign({},s,{tlds:{allow:new Set(u)}})),l(s.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),o.validateTlds(s.tlds.allow,"tlds.allow"),s):s},o.validateTlds=function(s,i){for(const u of s)l(y.isValid(u,{minDomainSegments:1,maxDomainSegments:1}),`${i} must contain valid top level domain names`)},o.isoDate=function(s){if(!t.isIsoDate(s))return null;/.*T.*[+-]\d\d$/.test(s)&&(s+="00");const i=new Date(s);return isNaN(i.getTime())?null:i.toISOString()},o.length=function(s,i,u,d,g){return l(!g||!1,"Invalid encoding:",g),s.$_addRule({name:i,method:"length",args:{limit:u,encoding:g},operator:d})}},8826:(j,x,h)=>{const l=h(375),y=h(8068),p={};p.Map=class extends Map{slice(){return new p.Map(this)}},j.exports=y.extend({type:"symbol",terms:{map:{init:new p.Map}},coerce:{method(f,{schema:e,error:n}){const a=e.$_terms.map.get(f);return a&&(f=a),e._flags.only&&typeof f!="symbol"?{value:f,errors:n("symbol.map",{map:e.$_terms.map})}:{value:f}}},validate(f,{error:e}){if(typeof f!="symbol")return{value:f,errors:e("symbol.base")}},rules:{map:{method(f){f&&!f[Symbol.iterator]&&typeof f=="object"&&(f=Object.entries(f)),l(f&&f[Symbol.iterator],"Iterable must be an iterable or object");const e=this.clone(),n=[];for(const a of f){l(a&&a[Symbol.iterator],"Entry must be an iterable");const[r,t]=a;l(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),l(typeof t=="symbol","Value must be a Symbol"),e.$_terms.map.set(r,t),n.push(t)}return e.valid(...n)}}},manifest:{build:(f,e)=>(e.map&&(f=f.map(e.map)),f)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(j,x,h)=>{const l=h(375),y=h(8571),p=h(738),f=h(9621),e=h(8160),n=h(6354),a=h(493),r={result:Symbol("result")};x.entry=function(t,o,s){let i=e.defaults;s&&(l(s.warnings===void 0,"Cannot override warnings preference in synchronous validation"),l(s.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),i=e.preferences(e.defaults,s));const u=r.entry(t,o,i);l(!u.mainstay.externals.length,"Schema with external rules must use validateAsync()");const d={value:u.value};return u.error&&(d.error=u.error),u.mainstay.warnings.length&&(d.warning=n.details(u.mainstay.warnings)),u.mainstay.debug&&(d.debug=u.mainstay.debug),u.mainstay.artifacts&&(d.artifacts=u.mainstay.artifacts),d},x.entryAsync=async function(t,o,s){let i=e.defaults;s&&(i=e.preferences(e.defaults,s));const u=r.entry(t,o,i),d=u.mainstay;if(u.error)throw d.debug&&(u.error.debug=d.debug),u.error;if(d.externals.length){let _=u.value;const v=[];for(const c of d.externals){const m=c.state.path,b=c.schema.type==="link"?d.links.get(c.schema):null;let w,k,S=_;const C=m.length?[_]:[],E=m.length?f(t,m):t;if(m.length){w=m[m.length-1];let L=_;for(const N of m.slice(0,-1))L=L[N],C.unshift(L);k=C[0],S=k[w]}try{const L=(z,D)=>(b||c.schema).$_createError(z,S,D,c.state,i),N=await c.method(S,{schema:c.schema,linked:b,state:c.state,prefs:s,original:E,error:L,errorsArray:r.errorsArray,warn:(z,D)=>d.warnings.push((b||c.schema).$_createError(z,S,D,c.state,i)),message:(z,D)=>(b||c.schema).$_createError("external",S,D,c.state,i,{messages:z})});if(N===void 0||N===S)continue;if(N instanceof n.Report){if(d.tracer.log(c.schema,c.state,"rule","external","error"),v.push(N),i.abortEarly)break;continue}if(Array.isArray(N)&&N[e.symbols.errors]){if(d.tracer.log(c.schema,c.state,"rule","external","error"),v.push(...N),i.abortEarly)break;continue}k?(d.tracer.value(c.state,"rule",S,N,"external"),k[w]=N):(d.tracer.value(c.state,"rule",_,N,"external"),_=N)}catch(L){throw i.errors.label&&(L.message+=` (${c.label})`),L}}if(u.value=_,v.length)throw u.error=n.process(v,t,i),d.debug&&(u.error.debug=d.debug),u.error}if(!i.warnings&&!i.debug&&!i.artifacts)return u.value;const g={value:u.value};return d.warnings.length&&(g.warning=n.details(d.warnings)),d.debug&&(g.debug=d.debug),d.artifacts&&(g.artifacts=d.artifacts),g},r.Mainstay=class{constructor(t,o,s){this.externals=[],this.warnings=[],this.tracer=t,this.debug=o,this.links=s,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const t=this._snapshots.pop();this.externals=t.externals,this.warnings=t.warnings}commit(){this._snapshots.pop()}},r.entry=function(t,o,s){const{tracer:i,cleanup:u}=r.tracer(o,s),d=s.debug?[]:null,g=o._ids._schemaChain?new Map:null,_=new r.Mainstay(i,d,g),v=o._ids._schemaChain?[{schema:o}]:null,c=new a([],[],{mainstay:_,schemas:v}),m=x.validate(t,o,c,s);u&&o.$_root.untrace();const b=n.process(m.errors,t,s);return{value:m.value,error:b,mainstay:_}},r.tracer=function(t,o){return t.$_root._tracer?{tracer:t.$_root._tracer._register(t)}:o.debug?(l(t.$_root.trace,"Debug mode not supported"),{tracer:t.$_root.trace()._register(t),cleanup:!0}):{tracer:r.ignore}},x.validate=function(t,o,s,i,u={}){if(o.$_terms.whens&&(o=o._generate(t,s,i).schema),o._preferences&&(i=r.prefs(o,i)),o._cache&&i.cache){const b=o._cache.get(t);if(s.mainstay.tracer.debug(s,"validate","cached",!!b),b)return b}const d=(b,w,k)=>o.$_createError(b,t,w,k||s,i),g={original:t,prefs:i,schema:o,state:s,error:d,errorsArray:r.errorsArray,warn:(b,w,k)=>s.mainstay.warnings.push(d(b,w,k)),message:(b,w)=>o.$_createError("custom",t,w,s,i,{messages:b})};s.mainstay.tracer.entry(o,s);const _=o._definition;if(_.prepare&&t!==void 0&&i.convert){const b=_.prepare(t,g);if(b){if(s.mainstay.tracer.value(s,"prepare",t,b.value),b.errors)return r.finalize(b.value,[].concat(b.errors),g);t=b.value}}if(_.coerce&&t!==void 0&&i.convert&&(!_.coerce.from||_.coerce.from.includes(typeof t))){const b=_.coerce.method(t,g);if(b){if(s.mainstay.tracer.value(s,"coerced",t,b.value),b.errors)return r.finalize(b.value,[].concat(b.errors),g);t=b.value}}const v=o._flags.empty;v&&v.$_match(r.trim(t,o),s.nest(v),e.defaults)&&(s.mainstay.tracer.value(s,"empty",t,void 0),t=void 0);const c=u.presence||o._flags.presence||(o._flags._endedSwitch?null:i.presence);if(t===void 0){if(c==="forbidden")return r.finalize(t,null,g);if(c==="required")return r.finalize(t,[o.$_createError("any.required",t,null,s,i)],g);if(c==="optional"){if(o._flags.default!==e.symbols.deepDefault)return r.finalize(t,null,g);s.mainstay.tracer.value(s,"default",t,{}),t={}}}else if(c==="forbidden")return r.finalize(t,[o.$_createError("any.unknown",t,null,s,i)],g);const m=[];if(o._valids){const b=o._valids.get(t,s,i,o._flags.insensitive);if(b)return i.convert&&(s.mainstay.tracer.value(s,"valids",t,b.value),t=b.value),s.mainstay.tracer.filter(o,s,"valid",b),r.finalize(t,null,g);if(o._flags.only){const w=o.$_createError("any.only",t,{valids:o._valids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],g);m.push(w)}}if(o._invalids){const b=o._invalids.get(t,s,i,o._flags.insensitive);if(b){s.mainstay.tracer.filter(o,s,"invalid",b);const w=o.$_createError("any.invalid",t,{invalids:o._invalids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],g);m.push(w)}}if(_.validate){const b=_.validate(t,g);if(b&&(s.mainstay.tracer.value(s,"base",t,b.value),t=b.value,b.errors)){if(!Array.isArray(b.errors))return m.push(b.errors),r.finalize(t,m,g);if(b.errors.length)return m.push(...b.errors),r.finalize(t,m,g)}}return o._rules.length?r.rules(t,m,g):r.finalize(t,m,g)},r.rules=function(t,o,s){const{schema:i,state:u,prefs:d}=s;for(const g of i._rules){const _=i._definition.rules[g.method];if(_.convert&&d.convert){u.mainstay.tracer.log(i,u,"rule",g.name,"full");continue}let v,c=g.args;if(g._resolve.length){c=Object.assign({},c);for(const b of g._resolve){const w=_.argsByName.get(b),k=c[b].resolve(t,u,d),S=w.normalize?w.normalize(k):k,C=e.validateArg(S,null,w);if(C){v=i.$_createError("any.ref",k,{arg:b,ref:c[b],reason:C},u,d);break}c[b]=S}}v=v||_.validate(t,s,c,g);const m=r.rule(v,g);if(m.errors){if(u.mainstay.tracer.log(i,u,"rule",g.name,"error"),g.warn){u.mainstay.warnings.push(...m.errors);continue}if(d.abortEarly)return r.finalize(t,m.errors,s);o.push(...m.errors)}else u.mainstay.tracer.log(i,u,"rule",g.name,"pass"),u.mainstay.tracer.value(u,"rule",t,m.value,g.name),t=m.value}return r.finalize(t,o,s)},r.rule=function(t,o){return t instanceof n.Report?(r.error(t,o),{errors:[t],value:null}):Array.isArray(t)&&t[e.symbols.errors]?(t.forEach(s=>r.error(s,o)),{errors:t,value:null}):{errors:null,value:t}},r.error=function(t,o){return o.message&&t._setTemplate(o.message),t},r.finalize=function(t,o,s){o=o||[];const{schema:i,state:u,prefs:d}=s;if(o.length){const _=r.default("failover",void 0,o,s);_!==void 0&&(u.mainstay.tracer.value(u,"failover",t,_),t=_,o=[])}if(o.length&&i._flags.error)if(typeof i._flags.error=="function"){o=i._flags.error(o),Array.isArray(o)||(o=[o]);for(const _ of o)l(_ instanceof Error||_ instanceof n.Report,"error() must return an Error object")}else o=[i._flags.error];if(t===void 0){const _=r.default("default",t,o,s);u.mainstay.tracer.value(u,"default",t,_),t=_}if(i._flags.cast&&t!==void 0){const _=i._definition.cast[i._flags.cast];if(_.from(t)){const v=_.to(t,s);u.mainstay.tracer.value(u,"cast",t,v,i._flags.cast),t=v}}if(i.$_terms.externals&&d.externals&&d._externals!==!1)for(const{method:_}of i.$_terms.externals)u.mainstay.externals.push({method:_,schema:i,state:u,label:n.label(i._flags,u,d)});const g={value:t,errors:o.length?o:null};return i._flags.result&&(g.value=i._flags.result==="strip"?void 0:s.original,u.mainstay.tracer.value(u,i._flags.result,t,g.value),u.shadow(t,i._flags.result)),i._cache&&d.cache!==!1&&!i._refs.length&&i._cache.set(s.original,g),t===void 0||g.errors||i._flags.artifact===void 0||(u.mainstay.artifacts=u.mainstay.artifacts||new Map,u.mainstay.artifacts.has(i._flags.artifact)||u.mainstay.artifacts.set(i._flags.artifact,[]),u.mainstay.artifacts.get(i._flags.artifact).push(u.path)),g},r.prefs=function(t,o){const s=o===e.defaults;return s&&t._preferences[e.symbols.prefs]?t._preferences[e.symbols.prefs]:(o=e.preferences(o,t._preferences),s&&(t._preferences[e.symbols.prefs]=o),o)},r.default=function(t,o,s,i){const{schema:u,state:d,prefs:g}=i,_=u._flags[t];if(g.noDefaults||_===void 0)return o;if(d.mainstay.tracer.log(u,d,"rule",t,"full"),!_)return _;if(typeof _=="function"){const v=_.length?[y(d.ancestors[0]),i]:[];try{return _(...v)}catch(c){return void s.push(u.$_createError(`any.${t}`,null,{error:c},d,g))}}return typeof _!="object"?_:_[e.symbols.literal]?_.literal:e.isResolvable(_)?_.resolve(o,d,g):y(_)},r.trim=function(t,o){if(typeof t!="string")return t;const s=o.$_getRule("trim");return s&&s.args.enabled?t.trim():t},r.ignore={active:!1,debug:p,entry:p,filter:p,log:p,resolve:p,value:p},r.errorsArray=function(){const t=[];return t[e.symbols.errors]=!0,t}},2036:(j,x,h)=>{const l=h(375),y=h(9474),p=h(8160),f={};j.exports=f.Values=class{constructor(e,n){this._values=new Set(e),this._refs=new Set(n),this._lowercase=f.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,n){p.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),n&&n.register(e)):this.has(e,null,null,!1)||(this._values.add(e),typeof e=="string"&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,n,a){if(e=e||new f.Values,n){if(n._override)return n.clone();for(const r of[...n._values,...n._refs])e.add(r)}if(a)for(const r of[...a._values,...a._refs])e.remove(r);return e.length?e:null}remove(e){p.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),typeof e=="string"&&this._lowercase.delete(e.toLowerCase()))}has(e,n,a,r){return!!this.get(e,n,a,r)}get(e,n,a,r){if(!this.length)return!1;if(this._values.has(e))return{value:e};if(typeof e=="string"&&e&&r){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&typeof e!="object")return!1;if(typeof e=="object"){for(const t of this._values)if(y(t,e))return{value:t}}if(n)for(const t of this._refs){const o=t.resolve(e,n,a,null,{in:!0});if(o===void 0)continue;const s=t.in&&typeof o=="object"?Array.isArray(o)?o:Object.keys(o):[o];for(const i of s)if(typeof i==typeof e){if(r&&e&&typeof e=="string"){if(i.toLowerCase()===e.toLowerCase())return{value:i,ref:t}}else if(y(i,e))return{value:i,ref:t}}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const n=[];for(const a of[...this._values,...this._refs])a!==void 0&&n.push(a);return n}return Array.from([...this._values,...this._refs])}clone(){const e=new f.Values(this._values,this._refs);return e._override=this._override,e}concat(e){l(!e._override,"Cannot concat override set of values");const n=new f.Values([...this._values,...e._values],[...this._refs,...e._refs]);return n._override=this._override,n}describe(){const e=[];this._override&&e.push({override:!0});for(const n of this._values.values())e.push(n&&typeof n=="object"?{value:n}:n);for(const n of this._refs.values())e.push(n.describe());return e}},f.Values.prototype[p.symbols.values]=!0,f.Values.prototype.slice=f.Values.prototype.clone,f.lowercases=function(e){const n=new Map;if(e)for(const a of e)typeof a=="string"&&n.set(a.toLowerCase(),a);return n}},978:(j,x,h)=>{const l=h(375),y=h(8571),p=h(1687),f=h(9621),e={};j.exports=function(n,a,r={}){if(l(n&&typeof n=="object","Invalid defaults value: must be an object"),l(!a||a===!0||typeof a=="object","Invalid source value: must be true, falsy or an object"),l(typeof r=="object","Invalid options: must be an object"),!a)return null;if(r.shallow)return e.applyToDefaultsWithShallow(n,a,r);const t=y(n);if(a===!0)return t;const o=r.nullOverride!==void 0&&r.nullOverride;return p(t,a,{nullOverride:o,mergeArrays:!1})},e.applyToDefaultsWithShallow=function(n,a,r){const t=r.shallow;l(Array.isArray(t),"Invalid keys");const o=new Map,s=a===!0?null:new Set;for(let d of t){d=Array.isArray(d)?d:d.split(".");const g=f(n,d);g&&typeof g=="object"?o.set(g,s&&f(a,d)||g):s&&s.add(d)}const i=y(n,{},o);if(!s)return i;for(const d of s)e.reachCopy(i,a,d);const u=r.nullOverride!==void 0&&r.nullOverride;return p(i,a,{nullOverride:u,mergeArrays:!1})},e.reachCopy=function(n,a,r){for(const s of r){if(!(s in a))return;const i=a[s];if(typeof i!="object"||i===null)return;a=i}const t=a;let o=n;for(let s=0;s<r.length-1;++s){const i=r[s];typeof o[i]!="object"&&(o[i]={}),o=o[i]}o[r[r.length-1]]=t}},375:(j,x,h)=>{const l=h(7916);j.exports=function(y,...p){if(!y)throw p.length===1&&p[0]instanceof Error?p[0]:new l(p)}},8571:(j,x,h)=>{const l=h(9621),y=h(4277),p=h(7043),f={needsProtoHack:new Set([y.set,y.map,y.weakSet,y.weakMap])};j.exports=f.clone=function(e,n={},a=null){if(typeof e!="object"||e===null)return e;let r=f.clone,t=a;if(n.shallow){if(n.shallow!==!0)return f.cloneWithShallow(e,n);r=u=>u}else if(t){const u=t.get(e);if(u)return u}else t=new Map;const o=y.getInternalProto(e);if(o===y.buffer)return!1;if(o===y.date)return new Date(e.getTime());if(o===y.regex)return new RegExp(e);const s=f.base(e,o,n);if(s===e)return e;if(t&&t.set(e,s),o===y.set)for(const u of e)s.add(r(u,n,t));else if(o===y.map)for(const[u,d]of e)s.set(u,r(d,n,t));const i=p.keys(e,n);for(const u of i){if(u==="__proto__")continue;if(o===y.array&&u==="length"){s.length=e.length;continue}const d=Object.getOwnPropertyDescriptor(e,u);d?d.get||d.set?Object.defineProperty(s,u,d):d.enumerable?s[u]=r(e[u],n,t):Object.defineProperty(s,u,{enumerable:!1,writable:!0,configurable:!0,value:r(e[u],n,t)}):Object.defineProperty(s,u,{enumerable:!0,writable:!0,configurable:!0,value:r(e[u],n,t)})}return s},f.cloneWithShallow=function(e,n){const a=n.shallow;(n=Object.assign({},n)).shallow=!1;const r=new Map;for(const t of a){const o=l(e,t);typeof o!="object"&&typeof o!="function"||r.set(o,o)}return f.clone(e,n,r)},f.base=function(e,n,a){if(a.prototype===!1)return f.needsProtoHack.has(n)?new n.constructor:n===y.array?[]:{};const r=Object.getPrototypeOf(e);if(r&&r.isImmutable)return e;if(n===y.array){const t=[];return r!==n&&Object.setPrototypeOf(t,r),t}if(f.needsProtoHack.has(n)){const t=new r.constructor;return r!==n&&Object.setPrototypeOf(t,r),t}return Object.create(r)}},9474:(j,x,h)=>{const l=h(4277),y={mismatched:null};j.exports=function(p,f,e){return e=Object.assign({prototype:!0},e),!!y.isDeepEqual(p,f,e,[])},y.isDeepEqual=function(p,f,e,n){if(p===f)return p!==0||1/p==1/f;const a=typeof p;if(a!==typeof f||p===null||f===null)return!1;if(a==="function"){if(!e.deepFunction||p.toString()!==f.toString())return!1}else if(a!=="object")return p!=p&&f!=f;const r=y.getSharedType(p,f,!!e.prototype);switch(r){case l.buffer:return!1;case l.promise:return p===f;case l.regex:return p.toString()===f.toString();case y.mismatched:return!1}for(let t=n.length-1;t>=0;--t)if(n[t].isSame(p,f))return!0;n.push(new y.SeenEntry(p,f));try{return!!y.isDeepEqualObj(r,p,f,e,n)}finally{n.pop()}},y.getSharedType=function(p,f,e){if(e)return Object.getPrototypeOf(p)!==Object.getPrototypeOf(f)?y.mismatched:l.getInternalProto(p);const n=l.getInternalProto(p);return n!==l.getInternalProto(f)?y.mismatched:n},y.valueOf=function(p){const f=p.valueOf;if(f===void 0)return p;try{return f.call(p)}catch(e){return e}},y.hasOwnEnumerableProperty=function(p,f){return Object.prototype.propertyIsEnumerable.call(p,f)},y.isSetSimpleEqual=function(p,f){for(const e of Set.prototype.values.call(p))if(!Set.prototype.has.call(f,e))return!1;return!0},y.isDeepEqualObj=function(p,f,e,n,a){const{isDeepEqual:r,valueOf:t,hasOwnEnumerableProperty:o}=y,{keys:s,getOwnPropertySymbols:i}=Object;if(p===l.array){if(!n.part){if(f.length!==e.length)return!1;for(let v=0;v<f.length;++v)if(!r(f[v],e[v],n,a))return!1;return!0}for(const v of f)for(const c of e)if(r(v,c,n,a))return!0}else if(p===l.set){if(f.size!==e.size)return!1;if(!y.isSetSimpleEqual(f,e)){const v=new Set(Set.prototype.values.call(e));for(const c of Set.prototype.values.call(f)){if(v.delete(c))continue;let m=!1;for(const b of v)if(r(c,b,n,a)){v.delete(b),m=!0;break}if(!m)return!1}}}else if(p===l.map){if(f.size!==e.size)return!1;for(const[v,c]of Map.prototype.entries.call(f))if(c===void 0&&!Map.prototype.has.call(e,v)||!r(c,Map.prototype.get.call(e,v),n,a))return!1}else if(p===l.error&&(f.name!==e.name||f.message!==e.message))return!1;const u=t(f),d=t(e);if((f!==u||e!==d)&&!r(u,d,n,a))return!1;const g=s(f);if(!n.part&&g.length!==s(e).length&&!n.skip)return!1;let _=0;for(const v of g)if(n.skip&&n.skip.includes(v))e[v]===void 0&&++_;else if(!o(e,v)||!r(f[v],e[v],n,a))return!1;if(!n.part&&g.length-_!==s(e).length)return!1;if(n.symbols!==!1){const v=i(f),c=new Set(i(e));for(const m of v){if(!n.skip||!n.skip.includes(m)){if(o(f,m)){if(!o(e,m)||!r(f[m],e[m],n,a))return!1}else if(o(e,m))return!1}c.delete(m)}for(const m of c)if(o(e,m))return!1}return!0},y.SeenEntry=class{constructor(p,f){this.obj=p,this.ref=f}isSame(p,f){return this.obj===p&&this.ref===f}}},7916:(j,x,h)=>{const l=h(8761);j.exports=class extends Error{constructor(y){super(y.filter(p=>p!=="").map(p=>typeof p=="string"?p:p instanceof Error?p.message:l(p)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,x.assert)}}},5277:j=>{const x={};j.exports=function(h){if(!h)return"";let l="";for(let y=0;y<h.length;++y){const p=h.charCodeAt(y);x.isSafe(p)?l+=h[y]:l+=x.escapeHtmlChar(p)}return l},x.escapeHtmlChar=function(h){return x.namedHtml.get(h)||(h>=256?"&#"+h+";":`&#x${h.toString(16).padStart(2,"0")};`)},x.isSafe=function(h){return x.safeCharCodes.has(h)},x.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),x.safeCharCodes=function(){const h=new Set;for(let l=32;l<123;++l)(l>=97||l>=65&&l<=90||l>=48&&l<=57||l===32||l===46||l===44||l===45||l===58||l===95)&&h.add(l);return h}()},6064:j=>{j.exports=function(x){return x.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:j=>{j.exports=function(){}},1687:(j,x,h)=>{const l=h(375),y=h(8571),p=h(7043),f={};j.exports=f.merge=function(e,n,a){if(l(e&&typeof e=="object","Invalid target value: must be an object"),l(n==null||typeof n=="object","Invalid source value: must be null, undefined, or an object"),!n)return e;if(a=Object.assign({nullOverride:!0,mergeArrays:!0},a),Array.isArray(n)){l(Array.isArray(e),"Cannot merge array onto an object"),a.mergeArrays||(e.length=0);for(let t=0;t<n.length;++t)e.push(y(n[t],{symbols:a.symbols}));return e}const r=p.keys(n,a);for(let t=0;t<r.length;++t){const o=r[t];if(o==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,o))continue;const s=n[o];if(s&&typeof s=="object"){if(e[o]===s)continue;!e[o]||typeof e[o]!="object"||Array.isArray(e[o])!==Array.isArray(s)||s instanceof Date||s instanceof RegExp?e[o]=y(s,{symbols:a.symbols}):f.merge(e[o],s,a)}else(s!=null||a.nullOverride)&&(e[o]=s)}return e}},9621:(j,x,h)=>{const l=h(375),y={};j.exports=function(p,f,e){if(f===!1||f==null)return p;typeof(e=e||{})=="string"&&(e={separator:e});const n=Array.isArray(f);l(!n||!e.separator,"Separator option is not valid for array-based chain");const a=n?f:f.split(e.separator||".");let r=p;for(let t=0;t<a.length;++t){let o=a[t];const s=e.iterables&&y.iterables(r);if(Array.isArray(r)||s==="set"){const i=Number(o);Number.isInteger(i)&&(o=i<0?r.length+i:i)}if(!r||typeof r=="function"&&e.functions===!1||!s&&r[o]===void 0){l(!e.strict||t+1===a.length,"Missing segment",o,"in reach path ",f),l(typeof r=="object"||e.functions===!0||typeof r!="function","Invalid segment",o,"in reach path ",f),r=e.default;break}r=s?s==="set"?[...r][o]:r.get(o):r[o]}return r},y.iterables=function(p){return p instanceof Set?"set":p instanceof Map?"map":void 0}},8761:j=>{j.exports=function(...x){try{return JSON.stringify(...x)}catch(h){return"[Cannot display object: "+h.message+"]"}}},4277:(j,x)=>{const h={};x=j.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},h.typeMap=new Map([["[object Error]",x.error],["[object Map]",x.map],["[object Promise]",x.promise],["[object Set]",x.set],["[object WeakMap]",x.weakMap],["[object WeakSet]",x.weakSet]]),x.getInternalProto=function(l){if(Array.isArray(l))return x.array;if(l instanceof Date)return x.date;if(l instanceof RegExp)return x.regex;if(l instanceof Error)return x.error;const y=Object.prototype.toString.call(l);return h.typeMap.get(y)||x.generic}},7043:(j,x)=>{x.keys=function(h,l={}){return l.symbols!==!1?Reflect.ownKeys(h):Object.getOwnPropertyNames(h)}},3652:(j,x,h)=>{const l=h(375),y={};x.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(p,f){const e=[].concat((f=f||{}).before||[]),n=[].concat(f.after||[]),a=f.group||"?",r=f.sort||0;l(!e.includes(a),`Item cannot come before itself: ${a}`),l(!e.includes("?"),"Item cannot come before unassociated items"),l(!n.includes(a),`Item cannot come after itself: ${a}`),l(!n.includes("?"),"Item cannot come after unassociated items"),Array.isArray(p)||(p=[p]);for(const t of p){const o={seq:this._items.length,sort:r,before:e,after:n,group:a,node:t};this._items.push(o)}if(!f.manual){const t=this._sort();l(t,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(p){Array.isArray(p)||(p=[p]);for(const e of p)if(e)for(const n of e._items)this._items.push(Object.assign({},n));this._items.sort(y.mergeSort);for(let e=0;e<this._items.length;++e)this._items[e].seq=e;const f=this._sort();return l(f,"merge created a dependencies error"),this.nodes}sort(){const p=this._sort();return l(p,"sort created a dependencies error"),this.nodes}_sort(){const p={},f=Object.create(null),e=Object.create(null);for(const o of this._items){const s=o.seq,i=o.group;e[i]=e[i]||[],e[i].push(s),p[s]=o.before;for(const u of o.after)f[u]=f[u]||[],f[u].push(s)}for(const o in p){const s=[];for(const i in p[o]){const u=p[o][i];e[u]=e[u]||[],s.push(...e[u])}p[o]=s}for(const o in f)if(e[o])for(const s of e[o])p[s].push(...f[o]);const n={};for(const o in p){const s=p[o];for(const i of s)n[i]=n[i]||[],n[i].push(o)}const a={},r=[];for(let o=0;o<this._items.length;++o){let s=o;if(n[o]){s=null;for(let i=0;i<this._items.length;++i){if(a[i]===!0)continue;n[i]||(n[i]=[]);const u=n[i].length;let d=0;for(let g=0;g<u;++g)a[n[i][g]]&&++d;if(d===u){s=i;break}}}s!==null&&(a[s]=!0,r.push(s))}if(r.length!==this._items.length)return!1;const t={};for(const o of this._items)t[o.seq]=o;this._items=[],this.nodes=[];for(const o of r){const s=t[o];this.nodes.push(s.node),this._items.push(s)}return!0}},y.mergeSort=(p,f)=>p.sort===f.sort?0:p.sort<f.sort?-1:1},5380:(j,x,h)=>{const l=h(443),y=h(2178),p={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:l.URL||URL};x.analyze=function(f,e={}){if(!f)return y.code("DOMAIN_NON_EMPTY_STRING");if(typeof f!="string")throw new Error("Invalid input: domain must be a string");if(f.length>256)return y.code("DOMAIN_TOO_LONG");if(p.nonAsciiRx.test(f)){if(e.allowUnicode===!1)return y.code("DOMAIN_INVALID_UNICODE_CHARS");f=f.normalize("NFC")}if(p.domainControlRx.test(f))return y.code("DOMAIN_INVALID_CHARS");f=p.punycode(f),e.allowFullyQualified&&f[f.length-1]==="."&&(f=f.slice(0,-1));const n=e.minDomainSegments||p.minDomainSegments,a=f.split(".");if(a.length<n)return y.code("DOMAIN_SEGMENTS_COUNT");if(e.maxDomainSegments&&a.length>e.maxDomainSegments)return y.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=e.tlds;if(r){const t=a[a.length-1].toLowerCase();if(r.deny&&r.deny.has(t)||r.allow&&!r.allow.has(t))return y.code("DOMAIN_FORBIDDEN_TLDS")}for(let t=0;t<a.length;++t){const o=a[t];if(!o.length)return y.code("DOMAIN_EMPTY_SEGMENT");if(o.length>63)return y.code("DOMAIN_LONG_SEGMENT");if(t<a.length-1){if(!p.domainSegmentRx.test(o))return y.code("DOMAIN_INVALID_CHARS")}else if(!p.tldSegmentRx.test(o))return y.code("DOMAIN_INVALID_TLDS_CHARS")}return null},x.isValid=function(f,e){return!x.analyze(f,e)},p.punycode=function(f){f.includes("%")&&(f=f.replace(/%/g,"%25"));try{return new p.URL(`http://${f}`).host}catch{return f}}},1745:(j,x,h)=>{const l=h(9848),y=h(5380),p=h(2178),f={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(l.TextEncoder||TextEncoder)};x.analyze=function(e,n){return f.email(e,n)},x.isValid=function(e,n){return!f.email(e,n)},f.email=function(e,n={}){if(typeof e!="string")throw new Error("Invalid input: email must be a string");if(!e)return p.code("EMPTY_STRING");const a=!f.nonAsciiRx.test(e);if(!a){if(n.allowUnicode===!1)return p.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const r=e.split("@");if(r.length!==2)return r.length>2?p.code("MULTIPLE_AT_CHAR"):p.code("MISSING_AT_CHAR");const[t,o]=r;if(!t)return p.code("EMPTY_LOCAL");if(!n.ignoreLength){if(e.length>254)return p.code("ADDRESS_TOO_LONG");if(f.encoder.encode(t).length>64)return p.code("LOCAL_TOO_LONG")}return f.local(t,a)||y.analyze(o,n)},f.local=function(e,n){const a=e.split(".");for(const r of a){if(!r.length)return p.code("EMPTY_LOCAL_SEGMENT");if(n){if(!f.atextRx.test(r))return p.code("INVALID_LOCAL_CHARS")}else for(const t of r){if(f.atextRx.test(t))continue;const o=f.binary(t);if(!f.atomRx.test(o))return p.code("INVALID_LOCAL_CHARS")}}},f.binary=function(e){return Array.from(f.encoder.encode(e)).map(n=>String.fromCharCode(n)).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:(j,x)=>{x.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"},x.code=function(h){return{code:h,error:x.codes[h]}}},9959:(j,x,h)=>{const l=h(375),y=h(5752);x.regex=function(p={}){l(p.cidr===void 0||typeof p.cidr=="string","options.cidr must be a string");const f=p.cidr?p.cidr.toLowerCase():"optional";l(["required","optional","forbidden"].includes(f),"options.cidr must be one of required, optional, forbidden"),l(p.version===void 0||typeof p.version=="string"||Array.isArray(p.version),"options.version must be a string or an array of string");let e=p.version||["ipv4","ipv6","ipvfuture"];Array.isArray(e)||(e=[e]),l(e.length>=1,"options.version must have at least 1 version specified");for(let r=0;r<e.length;++r)l(typeof e[r]=="string","options.version must only contain strings"),e[r]=e[r].toLowerCase(),l(["ipv4","ipv6","ipvfuture"].includes(e[r]),"options.version contains unknown version "+e[r]+" - must be one of ipv4, ipv6, ipvfuture");e=Array.from(new Set(e));const n=`(?:${e.map(r=>{if(f==="forbidden")return y.ip[r];const t=`\\/${r==="ipv4"?y.ip.v4Cidr:y.ip.v6Cidr}`;return f==="required"?`${y.ip[r]}${t}`:`${y.ip[r]}(?:${t})?`}).join("|")})`,a=new RegExp(`^${n}$`);return{cidr:f,versions:e,regex:a,raw:n}}},5752:(j,x,h)=>{const l=h(375),y=h(6064),p={generate:function(){const f={},e="\\dA-Fa-f",n="["+e+"]",a="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",t="%"+e,o=a+t+r+":@",s="["+o+"]",i="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";f.ipv4address="(?:"+i+"\\.){3}"+i;const u=n+"{1,4}",d="(?:"+u+":"+u+"|"+f.ipv4address+")",g="(?:"+u+":){6}"+d,_="::(?:"+u+":){5}"+d,v="(?:"+u+")?::(?:"+u+":){4}"+d,c="(?:(?:"+u+":){0,1}"+u+")?::(?:"+u+":){3}"+d,m="(?:(?:"+u+":){0,2}"+u+")?::(?:"+u+":){2}"+d,b="(?:(?:"+u+":){0,3}"+u+")?::"+u+":"+d,w="(?:(?:"+u+":){0,4}"+u+")?::"+d,k="(?:(?:"+u+":){0,5}"+u+")?::"+u,S="(?:(?:"+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="(?:"+g+"|"+_+"|"+v+"|"+c+"|"+m+"|"+b+"|"+w+"|"+k+"|"+S+")",f.ipvFuture="v"+n+"+\\.["+a+r+":]+",f.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",f.schemeRegex=new RegExp(f.scheme);const C="["+a+t+r+":]*",E="["+a+t+r+"]{1,255}",L="(?:\\[(?:"+f.ipv6address+"|"+f.ipvFuture+")\\]|"+f.ipv4address+"|"+E+")",N="(?:"+C+"@)?"+L+"(?::\\d*)?",z="(?:"+C+"@)?("+L+")(?::\\d*)?",D=s+"*",q=s+"+",M="(?:\\/"+D+")*",F="\\/(?:"+q+M+")?",W=q+M,G="["+a+t+r+"@]+"+M,re="(?:\\/\\/\\/"+D+M+")";return f.hierPart="(?:(?:\\/\\/"+N+M+")|"+F+"|"+W+"|"+re+")",f.hierPartCapture="(?:(?:\\/\\/"+z+M+")|"+F+"|"+W+")",f.relativeRef="(?:(?:\\/\\/"+N+M+")|"+F+"|"+G+"|)",f.relativeRefCapture="(?:(?:\\/\\/"+z+M+")|"+F+"|"+G+"|)",f.query="["+o+"\\/\\?]*(?=#|$)",f.queryWithSquareBrackets="["+o+"\\[\\]\\/\\?]*(?=#|$)",f.fragment="["+o+"\\/\\?]*",f}};p.rfc3986=p.generate(),x.ip={v4Cidr:p.rfc3986.ipv4Cidr,v6Cidr:p.rfc3986.ipv6Cidr,ipv4:p.rfc3986.ipv4address,ipv6:p.rfc3986.ipv6address,ipvfuture:p.rfc3986.ipvFuture},p.createRegex=function(f){const e=p.rfc3986,n="(?:\\?"+(f.allowQuerySquareBrackets?e.queryWithSquareBrackets:e.query)+")?(?:#"+e.fragment+")?",a=f.domain?e.relativeRefCapture:e.relativeRef;if(f.relativeOnly)return p.wrap(a+n);let r="";if(f.scheme){l(f.scheme instanceof RegExp||typeof f.scheme=="string"||Array.isArray(f.scheme),"scheme must be a RegExp, String, or Array");const s=[].concat(f.scheme);l(s.length>=1,"scheme must have at least 1 scheme specified");const i=[];for(let u=0;u<s.length;++u){const d=s[u];l(d instanceof RegExp||typeof d=="string","scheme at position "+u+" must be a RegExp or String"),d instanceof RegExp?i.push(d.source.toString()):(l(e.schemeRegex.test(d),"scheme at position "+u+" must be a valid scheme"),i.push(y(d)))}r=i.join("|")}const t="(?:"+(r?"(?:"+r+")":e.scheme)+":"+(f.domain?e.hierPartCapture:e.hierPart)+")",o=f.allowRelative?"(?:"+t+"|"+a+")":t;return p.wrap(o+n,r)},p.wrap=function(f,e){return{raw:f=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${f}`,regex:new RegExp(`^${f}$`),scheme:e}},p.uriRegex=p.createRegex({}),x.regex=function(f={}){return f.scheme||f.allowRelative||f.relativeOnly||f.allowQuerySquareBrackets||f.domain?p.createRegex(f):p.uriRegex}},1447:(j,x)=>{const h={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};x.Parser=class{constructor(l,y={}){if(!y[h.settings]&&y.constants)for(const p in y.constants){const f=y.constants[p];if(f!==null&&!["boolean","number","string"].includes(typeof f))throw new Error(`Formula constant ${p} contains invalid ${typeof f} value type`)}this.settings=y[h.settings]?y:Object.assign({[h.settings]:!0,constants:{},functions:{}},y),this.single=null,this._parts=null,this._parse(l)}_parse(l){let y=[],p="",f=0,e=!1;const n=r=>{if(f)throw new Error("Formula missing closing parenthesis");const t=y.length?y[y.length-1]:null;if(e||p||r){if(t&&t.type==="reference"&&r===")")return t.type="function",t.value=this._subFormula(p,t.value),void(p="");if(r===")"){const o=new x.Parser(p,this.settings);y.push({type:"segment",value:o})}else if(e){if(e==="]")return y.push({type:"reference",value:p}),void(p="");y.push({type:"literal",value:p})}else if(h.operatorCharacters.includes(p))t&&t.type==="operator"&&h.operators.includes(t.value+p)?t.value+=p:y.push({type:"operator",value:p});else if(p.match(h.numberRx))y.push({type:"constant",value:parseFloat(p)});else if(this.settings.constants[p]!==void 0)y.push({type:"constant",value:this.settings.constants[p]});else{if(!p.match(h.tokenRx))throw new Error(`Formula contains invalid token: ${p}`);y.push({type:"reference",value:p})}p=""}};for(const r of l)e?r===e?(n(),e=!1):p+=r:f?r==="("?(p+=r,++f):r===")"?(--f,f?p+=r:n(r)):p+=r:r in h.literals?e=h.literals[r]:r==="("?(n(),++f):h.operatorCharacters.includes(r)?(n(),p=r,n()):r!==" "?p+=r:n();n(),y=y.map((r,t)=>r.type!=="operator"||r.value!=="-"||t&&y[t-1].type!=="operator"?r:{type:"operator",value:"n"});let a=!1;for(const r of y){if(r.type==="operator"){if(h.operatorsPrefix.includes(r.value))continue;if(!a)throw new Error("Formula contains an operator in invalid position");if(!h.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(a)throw new Error("Formula missing expected operator");a=!a}if(!a)throw new Error("Formula contains invalid trailing operator");y.length===1&&["reference","literal","constant"].includes(y[0].type)&&(this.single={type:y[0].type==="reference"?"reference":"value",value:y[0].value}),this._parts=y.map(r=>{if(r.type==="operator")return h.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):h.reference(r.value)})}_subFormula(l,y){const p=this.settings.functions[y];if(typeof p!="function")throw new Error(`Formula contains unknown function ${y}`);let f=[];if(l){let e="",n=0,a=!1;const r=()=>{if(!e)throw new Error(`Formula contains function ${y} with invalid arguments ${l}`);f.push(e),e=""};for(let t=0;t<l.length;++t){const o=l[t];a?(e+=o,o===a&&(a=!1)):o in h.literals&&!n?(e+=o,a=h.literals[o]):o!==","||n?(e+=o,o==="("?++n:o===")"&&--n):r()}r()}return f=f.map(e=>new x.Parser(e,this.settings)),function(e){const n=[];for(const a of f)n.push(a.evaluate(e));return p.call(e,...n)}}evaluate(l){const y=this._parts.slice();for(let p=y.length-2;p>=0;--p){const f=y[p];if(f&&f.type==="operator"){const e=y[p+1];y.splice(p+1,1);const n=h.evaluate(e,l);y[p]=h.single(f.value,n)}}return h.operatorsOrder.forEach(p=>{for(let f=1;f<y.length-1;)if(p.includes(y[f])){const e=y[f],n=h.evaluate(y[f-1],l),a=h.evaluate(y[f+1],l);y.splice(f,2);const r=h.calculate(e,n,a);y[f-1]=r===0?0:r}else f+=2}),h.evaluate(y[0],l)}},x.Parser.prototype[h.symbol]=!0,h.reference=function(l){return function(y){return y&&y[l]!==void 0?y[l]:null}},h.evaluate=function(l,y){return l===null?null:typeof l=="function"?l(y):l[h.symbol]?l.evaluate(y):l},h.single=function(l,y){if(l==="!")return!y;const p=-y;return p===0?0:p},h.calculate=function(l,y,p){if(l==="??")return h.exists(y)?y:p;if(typeof y=="string"||typeof p=="string"){if(l==="+")return(y=h.exists(y)?y:"")+(h.exists(p)?p:"")}else switch(l){case"^":return Math.pow(y,p);case"*":return y*p;case"/":return y/p;case"%":return y%p;case"+":return y+p;case"-":return y-p}switch(l){case"<":return y<p;case"<=":return y<=p;case">":return y>p;case">=":return y>=p;case"==":return y===p;case"!=":return y!==p;case"&&":return y&&p;case"||":return y||p}return null},h.exists=function(l){return l!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:j=>{j.exports=JSON.parse('{"version":"17.13.3"}')}},A={},function j(x){var h=A[x];if(h!==void 0)return h.exports;var l=A[x]={exports:{}};return I[x](l,l.exports,j),l.exports}(5107);var I,A})}(he)),he.exports}var St=kt();const Rt=Ue(St),R=Rt.extend(jt).extend($t),Re=/^(0x)?([A-Fa-f0-9]{64})$/;R.object({genesisTime:R.date().iso().required().raw(),genesisTx:R.string().regex(Re).required().allow(""),renaissanceTime:R.date().iso().required().raw(),renaissanceTx:R.string().regex(Re).required().allow("")});const Ne=R.object({address:R.DID().prefix().role("ROLE_TOKEN").required(),value:R.BN().min(0).required()});R.object({name:R.string().min(1).max(256).required(),value:R.string().min(1).max(1024).required(),description:R.string().min(1).max(256).optional().allow(""),required:R.boolean().optional().default(!1)});const Fe=R.alternatives().try(R.DID().prefix().role("ROLE_ACCOUNT"),R.DID().prefix().role("ROLE_APPLICATION"),R.DID().prefix().role("ROLE_BLOCKLET"),R.DID().prefix().wallet("ethereum"),R.DID().prefix().wallet("passkey"));R.array().items(R.object({owner:Fe.required(),tokensList:R.array().items(Ne).default([]),assetsList:R.array().items(R.DID().prefix().role("ROLE_ASSET")).default([])}));R.array().items({signer:R.DID().prefix().required(),pk:R.any().required(),signature:R.any().required(),delegator:R.DID().prefix().valid("").optional(),data:R.any().optional()});R.object({type:R.string().min(1).max(32).required(),contractAddress:R.DID().prefix().wallet("ethereum").required(),chainType:R.string().min(1).max(32).required(),chainName:R.string().min(1).max(32).required(),chainId:R.number().positive().required()});const ye=R.object({type:R.string().valid("svg","url","uri").required(),content:R.string().when("type",{is:"uri",then:R.string().max(20480).dataUri().required()}).when("type",{is:"url",then:R.string().max(2048).uri({scheme:["http","https"]}).required()})}),ze=R.object({id:R.string().max(2048).uri({scheme:["http","https"]}).required(),scope:R.string().valid("public","private").default("public")});R.object({id:R.DID().prefix().required(),pk:R.string().required(),name:R.string().min(1).max(256).required()});const Ot={address:R.DID().prefix().role("ROLE_ASSET").required(),moniker:R.string().min(2).max(255).required(),data:R.any().required(),readonly:R.boolean().default(!1),transferrable:R.boolean().default(!1),ttl:R.number().min(0).default(0),parent:R.DID().prefix().optional().allow(""),issuer:R.DID().prefix().optional().allow(""),endpoint:ze.optional().allow(null).default(null),display:ye.optional().allow(null).default(null),tags:R.array().items(R.string().min(1).max(64)).max(4).optional()},At={address:R.DID().prefix().role("ROLE_FACTORY").required(),name:R.string().min(2).max(255).required(),description:R.string().min(2).max(255).required(),settlement:R.string().valid("instant","periodic").default("instant"),limit:R.number().integer().min(0).default(0),trustedIssuers:R.array().items(R.DID().prefix()).max(8).optional(),data:R.any().optional().allow(null).default(null),display:ye.optional().allow(null).default(null),input:R.object({value:R.BN().positive().min("0").default("0"),tokens:R.array().items(Ne).max(8).optional(),assets:R.array().items(R.alternatives().try(R.DID().prefix().role("ROLE_ASSET"),R.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:R.array().items(R.object({name:R.string().min(1).max(255).required(),description:R.string().max(255).optional().allow(""),required:R.boolean().required()})).optional()}),output:R.object({moniker:R.string().min(2).max(255).required(),data:R.any().required(),readonly:R.boolean().default(!1),transferrable:R.boolean().default(!1),ttl:R.number().min(0).default(0),parent:R.string().max(255).required(),issuer:R.string().max(255).required(),endpoint:ze.optional(),display:ye.optional(),tags:R.array().items(R.string().min(1).max(64)).max(4).optional()}),hooks:R.array().items(R.object({name:R.string().valid("mint","postMint","preMint").required(),type:R.string().valid("url","contract").required(),hook:R.string().min(1).max(4096).required(),compiled:R.array().items(R.object()).optional()})).optional()},Ct={tokenHolder:Fe,assetSchema:R.object(Ot).options({stripUnknown:!0,noDefaults:!1}),factorySchema:R.object(At).options({stripUnknown:!0,noDefaults:!1})};function Be({onCancel:T,onSuccess:O,blocklet:I}){const{vaults:A=[],appPid:j}=I,{t:x,locale:h}=oe(),{connectApi:l}=Le(),{api:y}=te(),{teamDid:p}=qe(),[f,e]=Te({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});B.useEffect(()=>{if(!ce(f.address))return;const o=ae(f.address),s=f.fetched.find(u=>u.address===o),i=f.errored.find(u=>u.address===o);!f.fetching&&!s&&!i&&(e({fetching:!0}),at(it.MAIN_CHAIN_ENDPOINT).getAccountState({address:o}).then(d=>{d.state?e({fetching:!1,fetched:[...f.fetched.filter(g=>g.address!==o),d.state]}):e({fetching:!1,errored:[...f.errored.filter(g=>g.address!==o),{address:o}]})}).catch(d=>{console.error(d),e({fetching:!1,error:ie(d)})}))},[f.address,f.fetching]),B.useEffect(()=>{if(f.address){const o=ae(f.address);if(!ce(o)){e({error:x("blocklet.config.vault.error.invalid")});return}if(Ct.tokenHolder.validate(o).error){e({error:x("blocklet.config.vault.error.holder")});return}if(A.find(i=>i.did===o)){e({error:x("blocklet.config.vault.error.duplicate")});return}if(yt([I.appDid,I.appPid,...I.migratedFrom.map(i=>i.appDid)].filter(Boolean)).includes(o)){e({error:x("blocklet.config.vault.error.appDid")});return}}e({error:""})},[f.address]);const n=async()=>{e({loading:!0});try{const o=await y.configVault({input:{teamDid:p,vaultDid:ae(f.address)}});l.open({locale:h,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:o.sessionId},messages:{title:x("blocklet.config.vault.approve.title"),scan:x(`blocklet.config.vault.approve.${A.length>0?"byLast":"byOwner"}`),confirm:x("blocklet.config.vault.approve.confirm"),success:x("blocklet.config.vault.approve.success")},onSuccess:()=>{l.open({locale:h,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:o.sessionId},messages:{title:x("blocklet.config.vault.commit.title"),scan:x("blocklet.config.vault.commit.scan"),confirm:x("blocklet.config.vault.commit.confirm"),success:x("blocklet.config.vault.commit.success")},onSuccess:()=>{e({loading:!1}),O()},onClose:()=>{e({loading:!1}),l.close()}})},onClose:()=>{e({loading:!1}),l.close()}})}catch(o){e({loading:!1,error:ie(o)})}},a=ae(f.address),r=[];ce(a)&&r.push({key:x("blocklet.config.vault.role"),value:$.jsx(Ye,{color:"primary",variant:"outlined",size:"small",label:ge(a).role||"-"})});const t=f.fetched.find(o=>o.address===a);return t&&r.push({key:x("blocklet.config.vault.firstSeen"),value:$e(t.context?.genesisTime,"-")},{key:x("blocklet.config.vault.lastSeen"),value:$e(t.context?.renaissanceTime,"-")},{key:x("blocklet.config.vault.migratedFrom"),value:t.migratedFrom.length?t.migratedFrom.map(o=>$.jsx(je,{did:o,showQrcode:!0,compact:!0,size:14,locale:h},o)):"-"},{key:x("blocklet.config.vault.migratedTo"),value:t.migratedTo.length?t.migratedTo.map(o=>$.jsx(je,{did:o,showQrcode:!0,compact:!0,size:14,locale:h},o)):"-"}),$.jsx(Ie,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:T,title:$.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:1},children:[$.jsx(Ae,{}),x("blocklet.config.vault.title")]}),actions:$.jsxs($.Fragment,{children:[$.jsx(Z,{onClick:T,children:x("common.cancel")}),$.jsx(Z,{onClick:n,variant:"contained",disabled:!!f.error||f.loading,children:x("common.confirm")})]}),children:$.jsxs(ne,{direction:"column",spacing:3,children:[$.jsxs(ee,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[x("blocklet.config.vault.desc")," ",x("blocklet.config.vault.tip")]}),A.length>0&&$.jsxs(P,{children:[$.jsxs(ee,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[x("blocklet.config.vault.current"),":"]}),$.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:.5},children:[$.jsx(vt,{did:A[A.length-1].did,showQrcode:!0,style:{width:"auto"}}),$.jsx(_t,{vaults:A,appPid:j})]})]}),$.jsx(Je,{fullWidth:!0,"data-cy":"input-factory-address",label:x("blocklet.config.vault.address"),error:!!f.error,helperText:f.error,value:f.address,onChange:o=>{e({address:o.target.value,error:""})},slotProps:{input:{endAdornment:f.fetching?$.jsx(Qe,{position:"end",children:$.jsx(ue,{size:16})}):null}}}),$.jsx(P,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:r.map(o=>$.jsx(bt,{valueComponent:"div",nameWidth:120,name:o.key,children:o.value},o.key))})]})})}Be.propTypes={onCancel:U.func.isRequired,onSuccess:U.func.isRequired,blocklet:U.object.isRequired};function Et({teamDid:T,size:O="small",...I}){const{t:A}=oe(),{api:j}=te(),[x,h]=B.useState(!1),[l,y]=B.useState(null),p=()=>{h(!1),y(null)},f=async()=>{try{h(!0);const n=await j.rotateSessionKey({input:{teamDid:T}});H.success(A("blocklet.config.rotateSessionKey.success",{count:n.removed?.length||0})),setTimeout(()=>{window.location.reload()},1e3)}catch(n){H.error(ie(n))}finally{h(!1),y(null)}},e={title:A("blocklet.config.rotateSessionKey.title"),description:A("blocklet.config.rotateSessionKey.description"),confirm:A("common.confirm"),cancel:A("common.cancel"),onConfirm:f,onCancel:p};return $.jsxs("div",{...I,children:[$.jsxs(Z,{onClick:()=>y(e),color:"error",variant:"outlined",size:O,children:[x?$.jsx(ue,{size:16,style:{marginRight:5}}):null,A("blocklet.config.rotateSessionKey.action")]}),l&&$.jsx(be,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}function ve({blocklet:T,onUpdate:O=()=>{},hasPermission:I=!1}){const{info:A,api:j,inService:x}=te(),{t:h,locale:l}=B.useContext(pt),[y,p]=Te({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[f,e]=B.useState(()=>T?.settings?.gateway?.wafPolicy?.enabled??!0),[n,a]=B.useState(()=>!!T?.settings?.enableSessionHardening),[r,t]=B.useState(()=>!!T?.settings?.invite?.enabled),[o,s]=B.useState(()=>{const D=T?.settings?.org||{};return{enabled:D.enabled||!1,maxMemberPerOrg:D.maxMemberPerOrg||100,maxOrgPerUser:D.maxOrgPerUser||10}}),i=y.loading||!I,{did:u}=T.meta,d=x?window.env?.gateway?.wafPolicy?.enabled:A?.routing.wafPolicy?.enabled;if(De(T.status))return null;const g=T.environments.find(D=>D.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),_=!g||g.value==="yes",c=T.environments.find(D=>D.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||Y.BLOCKLET_TENANT_MODES.SINGLE,m=(D,q)=>async M=>{if(!y.loading){p({loading:!0});try{const{checked:F}=M.target,{blocklet:W}=await j.configBlocklet({input:{did:T.meta.did,configs:[{key:Y.BLOCKLET_CONFIGURABLE_KEY[D],value:q(F)}]}});O(W)}catch(F){H.error(F.message)}finally{p({loading:!1})}}},b=m("BLOCKLET_DELETABLE",D=>D?"no":"yes"),w=m("BLOCKLET_APP_TENANT_MODE",D=>D?Y.BLOCKLET_TENANT_MODES.MULTIPLE:Y.BLOCKLET_TENANT_MODES.SINGLE),k=(D,q)=>async M=>{if(!y.loading){p({loading:!0});try{const F=M.target.checked;await j.updateBlockletSettings({input:D(F)}),q&&q(F)}catch(F){H.error(F.message)}finally{p({loading:!1})}}},S=k(D=>({did:T.meta.did,invite:{enabled:D}}),t),C=k(D=>({did:T.meta.did,org:{enabled:D,maxMemberPerOrg:100,maxOrgPerUser:10}}),D=>{s({...o,enabled:D})}),E=async(D,q)=>{if(!y.loading){p({loading:!0});try{await j.updateBlockletSettings({input:{did:T.meta.did,org:{...o,[D]:q}}}),s({...o,[D]:q})}catch(M){H.error(M.message)}finally{p({loading:!1})}}},L=k(D=>({did:T.meta.did,gateway:{wafPolicy:{enabled:D}}}),e),N=k(D=>({did:T.meta.did,enableSessionHardening:D}),D=>{a(D),ot()}),z=async()=>{if(!y.loading){p({loading:!0});try{const{blocklet:D}=await j.getBlocklet({input:{did:T.meta.did}});O(D)}catch(D){H.error(D.message)}finally{p({loading:!1})}}};return $.jsxs(ne,{p:3,sx:{border:"1px solid red",borderRadius:2,p:3},className:"advanced-config",children:[!x&&$.jsxs($.Fragment,{children:[$.jsx(V,{title:h("blocklet.config.deletable.name"),desc:h(_?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsx(Q,{disabled:i,checked:!_,defaultChecked:!0,onChange:b})})}),$.jsx(P,{className:"config-form",component:K,sx:{my:3}})]}),$.jsx(Pe,{inService:x,disabled:i,loading:y.loading,onChange:z}),$.jsx(P,{className:"config-form",component:K,sx:{my:3}}),x&&$.jsx(lt,{role:"owner",children:D=>(D||xt)&&$.jsxs($.Fragment,{children:[$.jsx(V,{title:h("blocklet.config.vault.title"),desc:h("blocklet.config.vault.desc"),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsxs(Z,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>p({showConfigVault:!0}),children:[$.jsx(Ae,{style:{fontSize:"1.3em",marginRight:4}}),h("blocklet.config.vault.title")]})})}),$.jsx(P,{className:"config-form",component:K,sx:{my:3}}),y.showConfigVault&&$.jsx(Be,{blocklet:T,onCancel:()=>p({showConfigVault:!1}),onSuccess:()=>p({showConfigVault:!1})}),$.jsx(V,{title:h("team.transferApp.name"),desc:h("team.transferApp.description"),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsxs(Z,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>p({showTransferOwner:!0}),children:[$.jsx(Xe,{style:{fontSize:"1.3em",marginRight:4}}),h("team.transferApp.name")]})})}),$.jsx(P,{className:"config-form",component:K,sx:{my:3}}),y.showTransferOwner&&$.jsx(Me,{onCancel:()=>p({showTransferOwner:!1}),onSuccess:()=>p({showTransferOwner:!1})})]})}),$.jsx(V,{title:h("blocklet.config.clearCache.name"),desc:h("blocklet.config.clearCache.purpose"),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsx(wt,{teamDid:u})})}),$.jsx(P,{className:"config-form",component:K,sx:{my:3}}),$.jsx(V,{title:h("blocklet.config.rotateSessionKey.name"),desc:h("blocklet.config.rotateSessionKey.purpose"),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsx(Et,{style:{whiteSpace:"nowrap"},teamDid:u})})}),$.jsx(P,{className:"config-form",component:K,sx:{my:3}}),$.jsx(V,{title:h("blocklet.config.tenantMode.name"),desc:h(`blocklet.config.tenantMode.${c}`),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsx(Q,{disabled:i,checked:c===Y.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:w})})}),$.jsx(P,{className:"config-form",component:K,sx:{my:3}}),$.jsx(V,{title:h("team.invite.setting"),desc:h(`team.invite.${r?"enabled":"disabled"}`),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsx(Q,{disabled:i,checked:r,onChange:S})})}),$.jsx(P,{className:"config-form",component:K,sx:{my:3}}),$.jsx(V,{title:$.jsxs(ne,{direction:"row",sx:{alignItems:"center",gap:1},children:[h("setting.form.enableSessionHardening.switchLabel"),$.jsx(xe,{title:h("setting.form.enableSessionHardening.switchTips"),children:$.jsx(we,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsx(Q,{disabled:i,checked:n,onChange:N})})}),d&&$.jsxs($.Fragment,{children:[$.jsx(P,{className:"config-form",component:K,sx:{my:3}}),$.jsx(V,{title:$.jsxs(ne,{direction:"row",sx:{alignItems:"center",gap:1},children:[h("router.gateway.wafPolicy.title"),$.jsx(xe,{title:$.jsx(P,{sx:{fontSize:"14px",lineHeight:1.5},children:$.jsx(P,{sx:{color:"common.white",ml:.5},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${l}/enable-web-application-firewall`,target:"_blank",rel:"noopener noreferrer",children:h("dashboard.document")})}),children:$.jsx(we,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:h("router.gateway.wafPolicy.switchLabel"),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsx(Q,{disabled:i,checked:f,onChange:L})})})]}),$.jsx(P,{className:"config-form",component:K,sx:{my:3}}),$.jsx(V,{title:$.jsx(ne,{direction:"row",sx:{alignItems:"center",gap:1},children:h("common.orgs")}),desc:h("team.orgs.explain"),children:$.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%",alignSelf:{xs:"flex-start",md:"flex-end"}},children:[$.jsx(Q,{disabled:i,checked:o.enabled,onChange:C}),o.enabled&&$.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:400,mt:1},children:[$.jsx(ke,{style:{marginTop:0},disabled:i,loading:y.loading,type:"number",min:2,initialValue:o.maxOrgPerUser,label:h("team.orgs.invite.maxOrgs"),placeholder:h("team.orgs.invite.maxOrgs"),onSubmit:D=>E("maxOrgPerUser",D)}),$.jsx(ke,{style:{marginTop:0},disabled:i,loading:y.loading,type:"number",min:2,initialValue:o.maxMemberPerOrg,label:h("team.orgs.invite.maxMembers"),placeholder:h("team.orgs.invite.maxMembers"),onSubmit:D=>E("maxMemberPerOrg",D)})]})]})})]})}const Dt=fe(ve,"mutate_blocklets"),It=fe(ve,"",Ee);function Tt(T){const{inService:O}=te();return O?$.jsx(It,{...T}):$.jsx(Dt,{...T})}ve.propTypes={blocklet:U.object.isRequired,onUpdate:U.func,hasPermission:U.bool};function _e({blocklet:T,onUpdate:O=()=>{},hasPermission:I=!1}){return De(T.status)?null:$.jsx(Pt,{children:$.jsx(Tt,{blocklet:T,onUpdate:O,hasPermission:I})})}const Lt=fe(_e,"mutate_blocklets"),qt=fe(_e,"",Ee);function fr(T){const{inService:O}=te();return O?$.jsx(qt,{...T}):$.jsx(Lt,{...T})}_e.propTypes={blocklet:U.object.isRequired,onUpdate:U.func,hasPermission:U.bool};const Pt=Oe(P)`
|
|
8
|
+
max-width: 1536px;
|
|
9
|
+
|
|
10
|
+
.advanced-config {
|
|
11
|
+
border: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
}
|
|
14
|
+
`;export{fr as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,ak as d,Q as p,at as x,W as u}from"./vendor-mui-core-DnR6WYuU.js";import{r as o}from"./vendor-react-CTtPmzVP.js";import{
|
|
1
|
+
import{j as t,ak as d,Q as p,at as x,W as u}from"./vendor-mui-core-DnR6WYuU.js";import{r as o}from"./vendor-react-CTtPmzVP.js";import{b8 as g}from"./vendor-ux-B0gV9NvH.js";import{a as h}from"./page-header-CHAwrgX-.js";import{Y as b}from"./index-CQgzjKgB.js";import{A as j}from"./config-44sI5I0w.js";import{S as k}from"./step-actions-B1ufIDaK.js";import{S}from"./layout-Be1KH57_.js";import"./vendor-utils-DCMKu06e.js";import"./vendor-hooks-BQWlJm53.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-Cnwtqa7s.js";import"./isURL-CJRImg0N.js";import"./section-jXB9AxBb.js";import"./required-BQln5OcV.js";import"./form-wrapper-PT5ZzMQy.js";import"./form-text-input-XjloVwBd.js";import"./edit.svg-CTE5eATX.js";import"./wait-connect-CRZmfXOA.js";import"./get-safe-url-BiNPujaX.js";import"./index-_tncRnTu.js";import"./index-DBs9Ljax.js";import"./use-mobile-D5clNlrm.js";import"./content-layout-DmSBGGVm.js";function y({onNext:s=()=>{},onPrevious:l=()=>{}}){const{t:r}=o.useContext(g),{blocklet:e}=b(),i=o.useMemo(()=>e?.meta?.requirements,[e]),n=o.useRef(null),[a,m]=o.useState(!1),f=async()=>{try{m(!0),(await n.current.onSubmit()||!i?.aigne)&&s()}catch(c){console.error("error",c)}finally{m(!1)}};return t.jsxs(C,{children:[t.jsx("div",{className:"header",children:t.jsx(h,{title:r("setting.aigne.config"),onClickBack:l})}),t.jsx(d,{className:"form-container",children:t.jsx(j,{orientation:"vertical",hideSubmitButton:!0,hideDivider:!0,ref:n,source:"setup",forceValidate:i?.aigne})}),t.jsxs(k,{blocklet:e,children:[!i?.aigne&&t.jsx(p,{className:"bottom-button-skip",sx:{mr:1},onClick:()=>s(),children:r("setup.skip")}),t.jsx(p,{className:"start-now bottom-button",loading:a,variant:"contained",disabled:a,onClick:f,children:r("setup.continue")})]})]})}y.propTypes={onNext:u.func,onPrevious:u.func};const C=x(S)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as a}from"./vendor-utils-DCMKu06e.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{y as E,w as k}from"./vendor-utils-DCMKu06e.js";import{Z as T,Y as j,c as M}from"./index-CQgzjKgB.js";import{r as e}from"./vendor-react-CTtPmzVP.js";import{V as B}from"./vendor-ux-B0gV9NvH.js";import{u as D}from"./use-mobile-BINJTzMb.js";import{D as H,j as o,ak as w,a6 as I}from"./vendor-mui-core-DnR6WYuU.js";import"./vendor-arcblock-Cnwtqa7s.js";import"./vendor-hooks-BQWlJm53.js";import"./lottie-web-4koyQiv_.js";function K(){const{info:x,inService:g}=T(),{blocklet:y}=j(),{locale:u}=B(),f=e.useRef(null),r=H(),[L,R]=e.useState(0),m=D(),[t,S]=e.useState(!0),s=e.useRef(null);let a="";g?a=M.WELLKNOWN_SERVICE_PATH_PREFIX:a=x.routing.adminPath;const c=new URLSearchParams;g?c.set("appUrl",window.location.origin):c.set("authKey","__sst"),c.set("schemaKey",E(window.location.origin,a,`/api/theme?id=${encodeURIComponent(y.meta.did)}`));const l=e.useCallback(()=>{if(s.current){const n=k(JSON.parse(JSON.stringify(r)),["palette","typography","shape","direction","breakpoints","mixins","shadows","transitions","zIndex"]);s.current.contentWindow.postMessage({type:"SEND_THEME",payload:n},window.location.origin)}},[r]),d=e.useCallback(()=>{s.current&&s.current.contentWindow.postMessage({type:"SEND_LOCALE",payload:u},window.location.origin)},[u]);return e.useEffect(()=>{const n=i=>{i.origin===window.location.origin&&(i.data.type==="REQUEST_THEME"&&l(),i.data.type==="THEME_BUILDER_LOADED"&&(d(),S(!1)))};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[l,d]),e.useEffect(()=>{t===!1&&l()},[r,t,l]),e.useEffect(()=>{t===!1&&d()},[u,t,d]),e.useEffect(()=>{const n=document.querySelector("#arc__dashboard-main"),i=document.querySelector(".dashboard-content"),p=()=>{if(f.current){const{height:b}=n.getBoundingClientRect(),{top:C}=i.getBoundingClientRect(),{top:_}=f.current.getBoundingClientRect();let h=b-_+C-(m?108:164);m&&(h=Math.min(h,600)),R(h)}};return p(),window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[m,r]),o.jsxs(o.Fragment,{children:[o.jsx(w,{ref:f}),t&&o.jsx(w,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px"},children:o.jsx(I,{})}),o.jsx("iframe",{title:"Theme Builder",ref:s,src:`${E(window.location.origin,a,"/hosted/theme-builder/")}?${c.toString()}`,style:{border:0,width:"100%",height:`${L}px`,display:t?"none":"block"}})]})}export{K as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./vendor-react-CTtPmzVP.js";const o=l=>e.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.06 6.75-.53.53-2.823 2.824a1 1 0 0 1-1.414 0L4.47 7.28l-.53-.53L5 5.69l.53.53L8 8.69l2.47-2.47.53-.53 1.06 1.06z",fill:"currentColor"}));export{o as t};
|