@abtnode/webapp 1.17.8-beta-20260108-021819-e099f0ca → 1.17.8-beta-20260108-224855-28496abb
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-Chnfr9fe.js → AdapterDayjs-CtD5my-S.js} +1 -1
- package/dist/assets/{Add-b-MNk7UB.js → Add-CVe35B9U.js} +1 -1
- package/dist/assets/ArrowDropDown-59b471Ns.js +1 -0
- package/dist/assets/{Autocomplete-79tADtg2.js → Autocomplete-CZdtlRmS.js} +1 -1
- package/dist/assets/{Breadcrumbs-Cqjt-kp8.js → Breadcrumbs-DOWk4s-Q.js} +1 -1
- package/dist/assets/{ButtonGroup-C_JbniJW.js → ButtonGroup-83J5hh2q.js} +1 -1
- package/dist/assets/{CSSTransition-DinXVMZy.js → CSSTransition-Dmpq-B51.js} +1 -1
- package/dist/assets/{CallMerge-CF5jo3Pw.js → CallMerge-CZNqia3S.js} +1 -1
- package/dist/assets/{CardContent-CYNmFsYJ.js → CardContent-DXDn75TD.js} +1 -1
- package/dist/assets/{ChevronLeft-Byy2_Dj8.js → ChevronLeft-B8v-crqw.js} +1 -1
- package/dist/assets/{ChevronRight-BKFXnJ7g.js → ChevronRight-DIxNh4jH.js} +1 -1
- package/dist/assets/{Clear-Chg9fOPG.js → Clear-kzRbvP4u.js} +1 -1
- package/dist/assets/{Delete-B306vkSB.js → Delete-Cw_Z_UMc.js} +1 -1
- package/dist/assets/{DeleteOutline-BjSm7PCr.js → DeleteOutline-D2i9YJBS.js} +1 -1
- package/dist/assets/{Done-Bh0vP7e6.js → Done-CmV6TZSG.js} +1 -1
- package/dist/assets/{Edit-DFmlgA7E.js → Edit-DDUKSYdb.js} +1 -1
- package/dist/assets/{EditOutlined-Qskj3-tY.js → EditOutlined-MUSbzQj_.js} +1 -1
- package/dist/assets/{ErrorOutline-CjKNiJFO.js → ErrorOutline-jxA-S5AH.js} +1 -1
- package/dist/assets/{FilterList-Dphn1UXx.js → FilterList-B8T7rkYs.js} +1 -1
- package/dist/assets/{Google-C0G3l0jL.js → Google-Bg8SlDZS.js} +1 -1
- package/dist/assets/{HelpOutline--A0maMxb.js → HelpOutline-BOrIHXkQ.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-CD6n37Y9.js → KeyboardArrowDown-CE7zJDcv.js} +1 -1
- package/dist/assets/{Launch-Cor8d4pT.js → Launch-BHeCrhBj.js} +1 -1
- package/dist/assets/{Link-Mg5UlAaZ.js → Link-C39j8j-1.js} +1 -1
- package/dist/assets/{ListItemButton-C8XIzvy_.js → ListItemButton-DLzzgnWj.js} +1 -1
- package/dist/assets/{ListSubheader-CHT01bOG.js → ListSubheader-BgTycqrg.js} +1 -1
- package/dist/assets/{LoadingButton-DtnAWL1w.js → LoadingButton-OiBPqmL8.js} +1 -1
- package/dist/assets/{MoreVert-KNjOpSoE.js → MoreVert-DJQ3tC1s.js} +1 -1
- package/dist/assets/{OpenInNew-DGDd5qxt.js → OpenInNew-awII5Ys1.js} +1 -1
- package/dist/assets/{Refresh-B0_3c6OW.js → Refresh-BpllOjUS.js} +1 -1
- package/dist/assets/{Replay-BzP784vV.js → Replay-CMmg_T4k.js} +1 -1
- package/dist/assets/{Search-CUoYhy1v.js → Search-DobdZczv.js} +1 -1
- package/dist/assets/{Stepper-DfUO9buC.js → Stepper-DJ4LlLol.js} +1 -1
- package/dist/assets/{TableSearch-DxZYknBa.js → TableSearch-NL7mGzF6.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BwLu2zCu.js → ToggleButtonGroup-1ZqP29sD.js} +1 -1
- package/dist/assets/{UnfoldMore-DvSw9pGy.js → UnfoldMore-BNE7Q7I9.js} +1 -1
- package/dist/assets/{Verified-CfonAx-G.js → Verified-pVnWh8ct.js} +1 -1
- package/dist/assets/{VerifiedUser-wCwGdsz1.js → VerifiedUser-Bq5EjyL0.js} +1 -1
- package/dist/assets/{ViewList-DhdvL6AT.js → ViewList-DikGBOob.js} +1 -1
- package/dist/assets/{_createAggregator-BLxu5C4t.js → _createAggregator-xAuoCETp.js} +1 -1
- package/dist/assets/{actions-Wo9kGXdj.js → actions-BHqqnvHK.js} +1 -1
- package/dist/assets/{actions-D1YtdqKL.js → actions-QNxlOGpH.js} +1 -1
- package/dist/assets/{agreement-07HiBYSX.js → agreement-D-rCiZRR.js} +1 -1
- package/dist/assets/api-ZR56mSDv.js +1 -0
- package/dist/assets/{appearance-CKF7Bo6h.js → appearance-CL4dIHJL.js} +1 -1
- package/dist/assets/{audit-logs-CLt2l7-q.js → audit-logs-BHIFDkts.js} +1 -1
- package/dist/assets/{base-chart-_0APPWGp.js → base-chart-CbniXo_r.js} +1 -1
- package/dist/assets/{blocklet-ClPWX-SV.js → blocklet-e4asDkfP.js} +1 -1
- package/dist/assets/{chain-Bg9mny_E.js → chain-CADjEEjt.js} +1 -1
- package/dist/assets/{click-to-copy-BbJJzGI1.js → click-to-copy-D5SbepAS.js} +1 -1
- package/dist/assets/cloneDeep-ChH4oif_.js +1 -0
- package/dist/assets/{config-navigation-B-CtKO70.js → config-navigation-ySXIDWww.js} +3 -3
- package/dist/assets/{connect-2JDWTFDP.js → connect-CdvuGCCf.js} +1 -1
- package/dist/assets/{connect-to-CBEHT895.js → connect-to-98MGJ7Yl.js} +1 -1
- package/dist/assets/{cssMode-U7KzpQEJ.js → cssMode-C_dsdlzf.js} +1 -1
- package/dist/assets/{delete-confirm-Cx4JPY2I.js → delete-confirm-Dk2gUSc_.js} +1 -1
- package/dist/assets/depsEqual-D1oKMHHx.js +1 -0
- package/dist/assets/{detail-Cgws9Fjd.js → detail-BSLJegmW.js} +3 -3
- package/dist/assets/{domains-BJzrDugH.js → domains-DgPIevHh.js} +1 -1
- package/dist/assets/{download-Df1TrhTI.js → download-DjUrRSaE.js} +1 -1
- package/dist/assets/{edit.svg-833vjqGH.js → edit.svg-BGFHNdYl.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-CO4m2LjK.js +1 -0
- package/dist/assets/engine-AOyfq5pg.js +1 -0
- package/dist/assets/{freemarker2-J5nZkQuM.js → freemarker2-Ynl3hbRt.js} +1 -1
- package/dist/assets/{get-safe-url-QppwE77w.js → get-safe-url-D0pcxgUJ.js} +1 -1
- package/dist/assets/getValidReactChildren-BrnINUbd.js +1 -0
- package/dist/assets/{graphqlMode-5yY_akok.js → graphqlMode-D3ZzOvwh.js} +2 -2
- package/dist/assets/{handlebars-DfBT6Rl2.js → handlebars-BXtXOFnU.js} +1 -1
- package/dist/assets/{html-BBpT31Z8.js → html-68WkZj1H.js} +1 -1
- package/dist/assets/{html-title-BpNgi7iw.js → html-title-CT8s_pnR.js} +1 -1
- package/dist/assets/{htmlMode-CDF4YwlA.js → htmlMode-D6dQwFeL.js} +1 -1
- package/dist/assets/{iframe-CH8rbppJ.js → iframe-BzTEh7qO.js} +1 -1
- package/dist/assets/{index-jHF3D4cy.js → index-AoP-pJu3.js} +1 -1
- package/dist/assets/{index-B8qqbKQt.js → index-B-25u8Uu.js} +1 -1
- package/dist/assets/index-B1_4iuGC.js +782 -0
- package/dist/assets/{index-tNmk7CjJ.js → index-BAYzgNzt.js} +1 -1
- package/dist/assets/{index-BdVOugOI.js → index-BFzkIx2h.js} +1 -1
- package/dist/assets/index-BQ9Dluv4.js +1 -0
- package/dist/assets/{index-B3tcK3_z.js → index-BTw_aopw.js} +14 -14
- package/dist/assets/{index-Dr7VuVvC.js → index-BV0mjh6r.js} +1 -1
- package/dist/assets/{index-DSjaZAu3.js → index-BaJk36L1.js} +1 -1
- package/dist/assets/{index-BJVvRV0h.js → index-BazbEWXv.js} +1 -1
- package/dist/assets/{index-CsTd8Q4H.js → index-Bd2vWvMu.js} +1 -1
- package/dist/assets/{index-CbnvHmOA.js → index-Bmj3JRL8.js} +1 -1
- package/dist/assets/{index-DCHzmqFc.js → index-BspQeR3D.js} +1 -1
- package/dist/assets/{index-CKWS_NIP.js → index-Bwnzqjf1.js} +1 -1
- package/dist/assets/{index-B4fcaU-r.js → index-CB1i_uf2.js} +1 -1
- package/dist/assets/{index-DqkfLKvE.js → index-CIjzdo65.js} +1 -1
- package/dist/assets/{index-CDd3s2GI.js → index-CVfXb0nN.js} +1 -1
- package/dist/assets/{index-CaxsY_au.js → index-CmbSgUyL.js} +3 -3
- package/dist/assets/{index-BikUP_wv.js → index-Cmvy-qPR.js} +1 -1
- package/dist/assets/{index-BVJB29cJ.js → index-Cp8XtCdH.js} +1 -1
- package/dist/assets/{index-BSBkhGl0.js → index-Cq78KErH.js} +1 -1
- package/dist/assets/{index-WHQs_PkC.js → index-Cy488fNr.js} +1 -1
- package/dist/assets/{index-B6x6Mq9n.js → index-D2bmvDtL.js} +1 -1
- package/dist/assets/{index-Crqqt-AN.js → index-D33KlJUT.js} +1 -1
- package/dist/assets/{index-3MwDYHdN.js → index-DA7EVQ4v.js} +9 -9
- package/dist/assets/{index-DXfP6ckA.js → index-DDI8UY6T.js} +2 -2
- package/dist/assets/{index-BBe9oV9e.js → index-DLJTQrAL.js} +1 -1
- package/dist/assets/{index-Bek3Nxot.js → index-DQhyMeoV.js} +3 -3
- package/dist/assets/{index-D_L4A5jU.js → index-DVXDeiLF.js} +1 -1
- package/dist/assets/{index-m8sITmne.js → index-DXHVn7yq.js} +1 -1
- package/dist/assets/{index-BbND9whL.js → index-Da8PZ-lu.js} +1 -1
- package/dist/assets/{index-iqFfmV_z.js → index-DfDHgwS-.js} +1 -1
- package/dist/assets/{index-BqrWLXQw.js → index-Dpw7fQUd.js} +3 -3
- package/dist/assets/{index-DrsAyGr6.js → index-DuNah4NO.js} +1 -1
- package/dist/assets/{index-BHQcEGDq.js → index-DvMdH51T.js} +1 -1
- package/dist/assets/{index-CBHMH4Z7.js → index-DxFY8dMO.js} +1 -1
- package/dist/assets/{index-cZdqepfp.js → index-Dz1ZwZ8x.js} +1 -1
- package/dist/assets/{index-0NOALS_P.js → index-Fir5RRo8.js} +1 -1
- package/dist/assets/{index-FdUIQyuT.js → index-Fr0im6-l.js} +1 -1
- package/dist/assets/{index-DJfXtT-f.js → index-Jt9YjCeK.js} +1 -1
- package/dist/assets/{index-CHgpIuFF.js → index-Ltxc7YUP.js} +1 -1
- package/dist/assets/{index-BfTQCMKf.js → index-LvA6paIR.js} +1 -1
- package/dist/assets/{index-CbK68mel.js → index-ZuJcpT1T.js} +1 -1
- package/dist/assets/{index-BfnrUUfH.js → index-bAcW8HYF.js} +1 -1
- package/dist/assets/{index-BRSm_uSW.js → index-teas2Eib.js} +3 -3
- package/dist/assets/{index-CZX-K9Eg.js → index-yR3ovHMI.js} +1 -1
- package/dist/assets/{index.esm-WZ7Avw4n.js → index.esm-CL88L2RD.js} +1 -1
- package/dist/assets/{install-from-url-PuHPLadE.js → install-from-url-C9wGB_q1.js} +1 -1
- package/dist/assets/{invitation-Bi2QgUpB.js → invitation-DBHFAKTZ.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-BAfeJQQq.js → is-path-prefix-equal-Df12gAPj.js} +1 -1
- package/dist/assets/{item-hbtsGcq0.js → item-D4OgvExU.js} +1 -1
- package/dist/assets/{javascript-CH6uPFyX.js → javascript-CY8tPfqG.js} +1 -1
- package/dist/assets/{jsonMode-B3mvgwT0.js → jsonMode-B1lllzUE.js} +1 -1
- package/dist/assets/{liquid-BoDus-ho.js → liquid-gpD4GU-k.js} +1 -1
- package/dist/assets/{list-header-C3SJDsfy.js → list-header-CjwjgfKp.js} +1 -1
- package/dist/assets/{lock.svg-CGmlgpmU.js → lock.svg-BmAm_LJl.js} +1 -1
- package/dist/assets/{log-D4BWVj7G.js → log-9z7r8Lwt.js} +1 -1
- package/dist/assets/{lottie-react.esm-ayFZjR4e.js → lottie-react.esm-C8kqAAU9.js} +1 -1
- package/dist/assets/{mdx-C33wkq6H.js → mdx-BwNO0Air.js} +1 -1
- package/dist/assets/{memory-lh5QZ4zg.js → memory-DO3ZqhrY.js} +1 -1
- package/dist/assets/{metric-chc-qmc8.js → metric-BcTiOrOk.js} +1 -1
- package/dist/assets/omit-jBEByUQC.js +1 -0
- package/dist/assets/{overview-DL-GP40o.js → overview-CikmJX9H.js} +1 -1
- package/dist/assets/{permission-D09K4EY6.js → permission-D1opDJhT.js} +1 -1
- package/dist/assets/{preference-iiwdIYk6.js → preference-Cs7lm-MF.js} +3 -3
- package/dist/assets/{provider-icon-Dm9XYo2I.js → provider-icon-CFKcu3V6.js} +1 -1
- package/dist/assets/{python-D_lYYAX1.js → python-CNXRlmYQ.js} +1 -1
- package/dist/assets/{raf-schd.esm-Bo9SYHL8.js → raf-schd.esm-D0EagQlv.js} +1 -1
- package/dist/assets/{razor-dpsmZHh4.js → razor-eMpDpC4X.js} +1 -1
- package/dist/assets/{rotate-session-key-Bfdv46s3.js → rotate-session-key-BiL0Bo_O.js} +1 -1
- package/dist/assets/{runtime-BUcScDcM.js → runtime-DUYT_SiT.js} +1 -1
- package/dist/assets/schema-iTOku2t8.js +1 -0
- package/dist/assets/sdk-B0lvz_Iz.js +1 -0
- package/dist/assets/{service-DCzLPjA3.js → service-BTdtH483.js} +1 -1
- package/dist/assets/{shorten-label-CN9pEyom.js → shorten-label-BNzeaF4J.js} +1 -1
- package/dist/assets/{simple-select-DxwJpURO.js → simple-select-BhAfKrhv.js} +1 -1
- package/dist/assets/{spaces-BrB8zqzV.js → spaces-OwZlXUZ4.js} +1 -1
- package/dist/assets/{status-BZx_J-ps.js → status-D6WlCP08.js} +1 -1
- package/dist/assets/{status-B-GGRrEB.js → status-cEVhL_8t.js} +1 -1
- package/dist/assets/{switch-control-X9WA2UjB.js → switch-control-DfH5Tjol.js} +1 -1
- package/dist/assets/{table-icons-Xs4hP9Pw.js → table-icons-CDTf0wL3.js} +1 -1
- package/dist/assets/{team-B9jB42uy.js → team-BGXKsY22.js} +1 -1
- package/dist/assets/{toLower-DwWNsNMJ.js → toLower-CSOmIMZJ.js} +1 -1
- package/dist/assets/toUpper-DnO1VFxi.js +1 -0
- package/dist/assets/{traffic-C_4zWOQM.js → traffic-DvCEQ5xd.js} +1 -1
- package/dist/assets/{tsMode-57DuREfP.js → tsMode-Let-Q8zu.js} +1 -1
- package/dist/assets/{typescript-BJp2b_J1.js → typescript-DyjM7FW9.js} +1 -1
- package/dist/assets/{url-evaluation-DetQFE_e.js → url-evaluation-Bukt7_Lj.js} +1 -1
- package/dist/assets/{url-join-rRKl4Ear.js → url-join-xsOaQKQ2.js} +1 -1
- package/dist/assets/{use-mobile-DOhPXmq7.js → use-mobile-BIQUR7Fz.js} +1 -1
- package/dist/assets/{use-mobile-BDRFDg8j.js → use-mobile-CFNU7YUg.js} +1 -1
- package/dist/assets/{useAsync-B59MJoKM.js → useAsync-tWL_hrVo.js} +1 -1
- package/dist/assets/{useAsyncRetry-CGp0YSlH.js → useAsyncRetry-CUFV5zTA.js} +1 -1
- package/dist/assets/{useLocalStorage-Dpl2DibN.js → useLocalStorage-MLO2O-Eu.js} +1 -1
- package/dist/assets/{useThemeProps-BS48y1B2.js → useThemeProps-C4X8Xuf-.js} +1 -1
- package/dist/assets/{util-DgOs7OwT.js → util-Byl4XHzq.js} +1 -1
- package/dist/assets/{wait-container-CxHAyAQN.js → wait-container-80uXorh3.js} +1 -1
- package/dist/assets/{without-wallet-qfmn1VhQ.js → without-wallet-U6nu7HMX.js} +1 -1
- package/dist/assets/wrap-locale-pkCcV7CX.js +1 -0
- package/dist/assets/{xml-BZRt8HAs.js → xml-CtKLgaY7.js} +1 -1
- package/dist/assets/{yaml-0X7rH3i7.js → yaml-CMyMNgnc.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-lsZjWbH5.js +0 -1
- package/dist/assets/api-eF9wxSJp.js +0 -1
- package/dist/assets/cloneDeep-DNOsGRuG.js +0 -1
- package/dist/assets/depsEqual-Cvglsxh5.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-Epiq9rij.js +0 -1
- package/dist/assets/engine-a9f8P0CB.js +0 -1
- package/dist/assets/getValidReactChildren-Cjo-LFyx.js +0 -1
- package/dist/assets/index-B31H3tAk.js +0 -1
- package/dist/assets/index-HqyXcG7M.js +0 -602
- package/dist/assets/omit-C11lcOpj.js +0 -1
- package/dist/assets/schema-DidDB4o0.js +0 -1
- package/dist/assets/sdk-l1r4MOQ_.js +0 -1
- package/dist/assets/toUpper-DXK6zXOf.js +0 -1
- package/dist/assets/wrap-locale-D8IL6u8L.js +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{aF as me,j as e,i9 as Rs,ia as As,bQ as Os,r as q,s as je,J as O,g4 as Vt,t as V,fN as Ke,a4 as ue,C as Me,bi as cn,eL as Ps,o as E,ib as $s,b2 as dn,cA as Es,cU as Ts,ek as Is,T as J,eI as kt,bn as se,bE as qt,p as fe,ic as Ls,bF as zt,b as X,bg as ne,bA as ie,H as Z,aV as re,V as ee,n as un,q as Ds,w as hn,ad as qs,i as mn,dn as zs,id as Ms,au as Bs,aU as oe,X as qe,$ as ke,D as Hs,Y as Ns,v as Q,Z as St,ie as Ee,ig as Fs,hg as Fe,ih as Ws,ii as Ct,ag as Ze,ij as Zs,ik as Vs,il as Us,hi as tt,im as dt,bd as fn,aH as G,gZ as Ks,d0 as Ut,W as Gs,gk as pn,P as ce,aR as Kt,io as Ys,ip as Js,hb as Ie,g8 as we,aP as xe,F as T,iq as ut,ir as Rt,Q as K,z as Xs,y as Se,bD as be,dv as te,is as Mt,aD as ae,gD as Ge,M as Qs,f as $e,cx as er,cO as he,c7 as Oe,dM as _e,d$ as ze,a2 as gn,fD as tr,it as nr,bz as At,N as xn,cH as yn,bs as sr,iu as rr,b9 as ir,L as ar,b5 as Ot,gb as or,h0 as lr,h1 as cr,S as dr,U as vn,h2 as ur,cv as Ve,aJ as st,iv as hr,bp as mr,a3 as bn,bj as rt,iw as jn,b6 as fr,dp as Pe,d_ as _n,c_ as wn,B as pr,ga as gr,ge as xr,G as ht,K as yr,bx as vr}from"./index-Bek3Nxot.js";import{S as br}from"./actions-Wo9kGXdj.js";import{N as Gt}from"./ChevronRight-BKFXnJ7g.js";import{T as Ue}from"./html-title-BpNgi7iw.js";import{w as Be,P as jr}from"./permission-D09K4EY6.js";import{u as Bt}from"./index-B31H3tAk.js";import{F as _r,R as wr,S as B,a as Pt,s as kr,L as Re,A as Sr,b as Cr,c as Rr,d as Ar,e as Or,f as Pr,g as $r,B as Er}from"./preference-iiwdIYk6.js";import{D as Tr}from"./Done-Bh0vP7e6.js";import{A as Ir,a as Yt}from"./Autocomplete-79tADtg2.js";import{C as Lr,R as Dr,S as qr,P as zr}from"./rotate-session-key-Bfdv46s3.js";import{u as le}from"./blocklet-ClPWX-SV.js";import{C as kn}from"./click-to-copy-BbJJzGI1.js";import{u as it}from"./team-B9jB42uy.js";import{v as Sn}from"./index-B8qqbKQt.js";import{g as Mr}from"./chain-Bg9mny_E.js";import{V as Br}from"./status-BZx_J-ps.js";import{a as pe,S as Hr,u as Cn}from"./switch-control-X9WA2UjB.js";import{u as ge,C as F,b as Jt}from"./index.esm-WZ7Avw4n.js";import{I as Nr,J as Fr,K as Wr,L as Zr}from"./index-CsTd8Q4H.js";import{M as Ae}from"./provider-icon-Dm9XYo2I.js";import{S as nt}from"./simple-select-DxwJpURO.js";import{D as Xt}from"./Delete-B306vkSB.js";import{A as $t}from"./Add-b-MNk7UB.js";import{H as at}from"./index-BHQcEGDq.js";import{u as Rn}from"./use-mobile-DOhPXmq7.js";import{D as Vr}from"./DeleteOutline-BjSm7PCr.js";import{E as Ur}from"./EditOutlined-Qskj3-tY.js";import{C as Kr}from"./CardContent-CYNmFsYJ.js";import{R as An,a as On}from"./url-evaluation-DetQFE_e.js";import"./useLocalStorage-Dpl2DibN.js";import"./MoreVert-KNjOpSoE.js";import"./get-safe-url-QppwE77w.js";import"./ButtonGroup-C_JbniJW.js";import"./getValidReactChildren-Cjo-LFyx.js";import"./omit-C11lcOpj.js";import"./index-BdVOugOI.js";import"./edit.svg-833vjqGH.js";import"./ArrowDropDown-lsZjWbH5.js";import"./index-cZdqepfp.js";import"./iframe-CH8rbppJ.js";import"./ListSubheader-CHT01bOG.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-CjKNiJFO.js";import"./index-D_L4A5jU.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-Dphn1UXx.js";import"./CSSTransition-DinXVMZy.js";import"./emotion-cache.browser.esm-Epiq9rij.js";import"./depsEqual-Cvglsxh5.js";import"./index-CDd3s2GI.js";import"./TableSearch-DxZYknBa.js";import"./Search-CUoYhy1v.js";import"./Clear-Chg9fOPG.js";const Pn=me([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),Gr=me([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Yr=me(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),Jr=me(e.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"})),Xr=me(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Qr=me(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"})),ei=me(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),ti=me(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),Et=me(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),ni=me([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),si=me(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),ri=me(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),ii=me(e.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"})),$n=me(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),ai=me(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),oi=me(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var li=Array.prototype,Qt=li.splice;function ci(k,_,A,R){var j=As,y=-1,x=_.length,o=k;for(k===_&&(_=Rs(_));++y<x;)for(var p=0,f=_[y],u=f;(p=j(o,u,p))>-1;)o!==k&&Qt.call(o,p,1),Qt.call(k,p,1);return k}function di(k,_){return k&&k.length&&_&&_.length?ci(k,_):k}var ui=Os(di);const hi={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function En({label:k="",disabled:_=!1,required:A=!1,initialValue:R="",onChange:j=()=>{},style:y={},onSubmit:x=()=>{},triggers:o=[],options:p=[],formatterBeforeSubmit:f=i=>i.join(","),helperText:u="",placeholder:t="",renderImage:a=()=>null,renderLabel:r=()=>"",filterKeys:n=["name"],noEmpty:s=!1,...c}){const[i,l]=q.useState(!1),[d,h]=q.useState(!1),[g,w]=q.useState(""),S=q.useRef(null),[m,v]=q.useState(R),[b,C]=q.useState(m),P=q.useMemo(()=>{if(!p)return{};const H={};return p.forEach(I=>{H[I.code]=I}),H},[p]),$=()=>{if(!p)return[];if(!g)return p.map(I=>I.code);const H=new RegExp(g.toLowerCase());return p.filter(I=>{for(let N=0;N<n.length;N++){const W=n[N];if(H.test(I[W]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},D=async()=>{h(!0);try{await x(typeof f=="function"?f(b):b)===!1?C(m):s&&!b.length?(C(R),v(R)):(C(b),v(b))}catch{C(m)}finally{h(!1),l(!1)}},M=(H,I)=>{if(!Array.isArray(I)){C([]),j([]);return}const N=I.filter(W=>P[W]);if(!N.length){C([]),j([]);return}C(N),j(N)},U=H=>{H.stopPropagation(),l(!0),setTimeout(()=>{if(S.current){const I=S.current.querySelector("input");I&&I.focus()}},500)},z=i?e.jsx(Ir,{ref:S,options:p,value:b,onChange:M,inputValue:g,onInputChange:(H,I)=>{w(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:$,getOptionLabel:H=>P[H]?.name,renderInput:H=>e.jsx(V,{...H,label:"",placeholder:t}),renderOption:(H,I)=>{const N=b.indexOf(I)!==-1;return q.createElement(mi,{component:"li",...H,key:I},a(P[I]||{}),e.jsx(O,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:N?"700":"normal"},children:r(I,P[I])||P[I]?.name}),e.jsx(O,{component:Vt,sx:{opacity:.5,width:18,height:18},style:{visibility:N?"visible":"hidden"}}))},...c,slots:{popper:fi}}):e.jsx(O,{className:"form-item-input slot",onClick:U,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(H=>p.some(I=>I.code===H)).map(H=>e.jsx(Ke,{label:p.find(I=>I.code===H).name,style:{marginRight:8},size:"small"},H))});return e.jsx(_r,{className:"form",style:y,children:e.jsxs(O,{className:"form-item",children:[e.jsxs(O,{className:"form-item-label",children:[k,A&&e.jsx(wr,{})]}),e.jsxs(O,{className:"form-item-body",children:[e.jsx(O,{className:"form-item-input",children:z}),i?e.jsx(O,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ue,{"data-cy":"schema-form-item-confirm",onClick:D,disabled:_||d,size:"large",children:d?e.jsx(Me,{size:24}):e.jsx(Tr,{})}),e.jsx(ue,{"data-cy":"schema-form-item-cancel",onClick:()=>{C(m),l(!1)},disabled:_||d,size:"large",children:e.jsx(Vt,{})})]})}):null]}),i&&u&&e.jsx(cn,{children:u})]})})}En.propTypes={style:E.object,onSubmit:E.func,onChange:E.func,label:E.string,initialValue:E.string,required:E.bool,disabled:E.bool,triggers:E.array,options:E.array,helperText:E.string,formatterBeforeSubmit:E.func,placeholder:E.string,renderImage:E.func,filterKeys:E.arrayOf(E.string),noEmpty:E.bool,renderLabel:E.func};const mi=je.div`
|
|
1
|
+
import{aF as me,j as e,i9 as Os,ia as Ps,bQ as $s,r as z,s as je,J as O,g4 as Kt,t as V,fN as Ke,a4 as ue,C as Me,bi as dn,eL as Es,o as E,ib as Ts,b2 as un,cA as Is,cU as Ls,ek as Ds,T as J,eI as kt,bn as se,bE as Mt,p as fe,ic as qs,bF as Bt,b as X,bg as ne,bA as ie,H as Z,aV as re,V as ee,n as hn,q as zs,w as mn,ad as Ms,i as fn,dn as Bs,id as Hs,au as Ns,aU as oe,X as qe,$ as Se,D as Fs,Y as Ws,v as Q,Z as St,ie as Ee,ig as Zs,hg as Fe,ih as Vs,ii as Ct,ag as Ze,ij as Us,ik as Ks,il as Gs,hi as tt,im as dt,bd as pn,aH as G,gZ as Ys,d0 as Gt,W as Js,gk as gn,P as ce,aR as Yt,io as Xs,ip as Qs,hb as Ie,g8 as we,aP as xe,F as T,iq as ut,ir as Rt,Q as K,z as At,y as ke,B as xn,bD as be,dv as te,is as Ht,aD as ae,gD as Ge,M as er,f as $e,cx as tr,cO as he,c7 as Oe,dM as _e,d$ as ze,a2 as yn,fD as nr,it as sr,bz as Ot,N as vn,cH as bn,bs as rr,iu as ir,b9 as ar,L as or,b5 as Pt,gb as lr,h0 as cr,h1 as dr,S as ur,U as jn,h2 as hr,cv as Ve,aJ as st,iv as mr,bp as fr,a3 as _n,bj as rt,iw as wn,b6 as pr,dp as Pe,d_ as kn,c_ as Sn,ga as gr,ge as xr,G as ht,K as yr,bx as vr}from"./index-DQhyMeoV.js";import{S as br}from"./actions-BHqqnvHK.js";import{N as Jt}from"./ChevronRight-DIxNh4jH.js";import{T as Ue}from"./html-title-CT8s_pnR.js";import{w as Be,P as jr}from"./permission-D1opDJhT.js";import{u as Nt}from"./index-BQ9Dluv4.js";import{F as _r,R as wr,S as B,a as $t,s as kr,L as Re,A as Sr,b as Cr,c as Rr,d as Ar,e as Or,f as Pr,g as $r,B as Er}from"./preference-Cs7lm-MF.js";import{D as Tr}from"./Done-CmV6TZSG.js";import{A as Ir,a as Xt}from"./Autocomplete-CZdtlRmS.js";import{C as Lr,R as Dr,S as qr,P as zr}from"./rotate-session-key-BiL0Bo_O.js";import{u as le}from"./blocklet-e4asDkfP.js";import{C as Cn}from"./click-to-copy-D5SbepAS.js";import{u as it}from"./team-BGXKsY22.js";import{v as Rn}from"./index-B-25u8Uu.js";import{g as Mr}from"./chain-CADjEEjt.js";import{V as Br}from"./status-D6WlCP08.js";import{a as pe,S as Hr,u as An}from"./switch-control-DfH5Tjol.js";import{u as ge,C as F,b as Qt}from"./index.esm-CL88L2RD.js";import{I as Nr,J as Fr,K as Wr,L as Zr}from"./index-Bd2vWvMu.js";import{M as Ae}from"./provider-icon-CFKcu3V6.js";import{S as nt}from"./simple-select-BhAfKrhv.js";import{D as en}from"./Delete-Cw_Z_UMc.js";import{A as Et}from"./Add-CVe35B9U.js";import{H as at}from"./index-DvMdH51T.js";import{u as On}from"./use-mobile-BIQUR7Fz.js";import{D as Vr}from"./DeleteOutline-D2i9YJBS.js";import{E as Ur}from"./EditOutlined-MUSbzQj_.js";import{C as Kr}from"./CardContent-DXDn75TD.js";import{R as Pn,a as $n}from"./url-evaluation-Bukt7_Lj.js";import"./useLocalStorage-MLO2O-Eu.js";import"./MoreVert-DJQ3tC1s.js";import"./get-safe-url-D0pcxgUJ.js";import"./ButtonGroup-83J5hh2q.js";import"./getValidReactChildren-BrnINUbd.js";import"./omit-jBEByUQC.js";import"./index-BFzkIx2h.js";import"./edit.svg-BGFHNdYl.js";import"./ArrowDropDown-59b471Ns.js";import"./index-Dz1ZwZ8x.js";import"./iframe-BzTEh7qO.js";import"./ListSubheader-BgTycqrg.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-jxA-S5AH.js";import"./index-DVXDeiLF.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-B8T7rkYs.js";import"./CSSTransition-Dmpq-B51.js";import"./emotion-cache.browser.esm-CO4m2LjK.js";import"./depsEqual-D1oKMHHx.js";import"./index-CVfXb0nN.js";import"./TableSearch-NL7mGzF6.js";import"./Search-DobdZczv.js";import"./Clear-kzRbvP4u.js";const En=me([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),Gr=me([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Yr=me(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),Jr=me(e.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"})),Xr=me(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Qr=me(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"})),ei=me(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),ti=me(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),Tt=me(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),ni=me([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),si=me(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),ri=me(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),ii=me(e.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"})),Tn=me(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),ai=me(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),oi=me(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var li=Array.prototype,tn=li.splice;function ci(k,_,A,R){var j=Ps,y=-1,x=_.length,o=k;for(k===_&&(_=Os(_));++y<x;)for(var p=0,f=_[y],u=f;(p=j(o,u,p))>-1;)o!==k&&tn.call(o,p,1),tn.call(k,p,1);return k}function di(k,_){return k&&k.length&&_&&_.length?ci(k,_):k}var ui=$s(di);const hi={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function In({label:k="",disabled:_=!1,required:A=!1,initialValue:R="",onChange:j=()=>{},style:y={},onSubmit:x=()=>{},triggers:o=[],options:p=[],formatterBeforeSubmit:f=i=>i.join(","),helperText:u="",placeholder:t="",renderImage:a=()=>null,renderLabel:r=()=>"",filterKeys:n=["name"],noEmpty:s=!1,...c}){const[i,l]=z.useState(!1),[d,h]=z.useState(!1),[g,w]=z.useState(""),S=z.useRef(null),[m,v]=z.useState(R),[b,C]=z.useState(m),P=z.useMemo(()=>{if(!p)return{};const H={};return p.forEach(I=>{H[I.code]=I}),H},[p]),$=()=>{if(!p)return[];if(!g)return p.map(I=>I.code);const H=new RegExp(g.toLowerCase());return p.filter(I=>{for(let N=0;N<n.length;N++){const W=n[N];if(H.test(I[W]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},D=async()=>{h(!0);try{await x(typeof f=="function"?f(b):b)===!1?C(m):s&&!b.length?(C(R),v(R)):(C(b),v(b))}catch{C(m)}finally{h(!1),l(!1)}},M=(H,I)=>{if(!Array.isArray(I)){C([]),j([]);return}const N=I.filter(W=>P[W]);if(!N.length){C([]),j([]);return}C(N),j(N)},U=H=>{H.stopPropagation(),l(!0),setTimeout(()=>{if(S.current){const I=S.current.querySelector("input");I&&I.focus()}},500)},q=i?e.jsx(Ir,{ref:S,options:p,value:b,onChange:M,inputValue:g,onInputChange:(H,I)=>{w(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:$,getOptionLabel:H=>P[H]?.name,renderInput:H=>e.jsx(V,{...H,label:"",placeholder:t}),renderOption:(H,I)=>{const N=b.indexOf(I)!==-1;return z.createElement(mi,{component:"li",...H,key:I},a(P[I]||{}),e.jsx(O,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:N?"700":"normal"},children:r(I,P[I])||P[I]?.name}),e.jsx(O,{component:Kt,sx:{opacity:.5,width:18,height:18},style:{visibility:N?"visible":"hidden"}}))},...c,slots:{popper:fi}}):e.jsx(O,{className:"form-item-input slot",onClick:U,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(H=>p.some(I=>I.code===H)).map(H=>e.jsx(Ke,{label:p.find(I=>I.code===H).name,style:{marginRight:8},size:"small"},H))});return e.jsx(_r,{className:"form",style:y,children:e.jsxs(O,{className:"form-item",children:[e.jsxs(O,{className:"form-item-label",children:[k,A&&e.jsx(wr,{})]}),e.jsxs(O,{className:"form-item-body",children:[e.jsx(O,{className:"form-item-input",children:q}),i?e.jsx(O,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ue,{"data-cy":"schema-form-item-confirm",onClick:D,disabled:_||d,size:"large",children:d?e.jsx(Me,{size:24}):e.jsx(Tr,{})}),e.jsx(ue,{"data-cy":"schema-form-item-cancel",onClick:()=>{C(m),l(!1)},disabled:_||d,size:"large",children:e.jsx(Kt,{})})]})}):null]}),i&&u&&e.jsx(dn,{children:u})]})})}In.propTypes={style:E.object,onSubmit:E.func,onChange:E.func,label:E.string,initialValue:E.string,required:E.bool,disabled:E.bool,triggers:E.array,options:E.array,helperText:E.string,formatterBeforeSubmit:E.func,placeholder:E.string,renderImage:E.func,filterKeys:E.arrayOf(E.string),noEmpty:E.bool,renderLabel:E.func};const mi=je.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
5
5
|
height: 48px;
|
|
6
6
|
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
7
7
|
font-size: 1.1em;
|
|
8
|
-
`,fi=je(Ps)(()=>({[`& .${Yt.paper}`]:{boxShadow:"0px 8px 12px rgba(92, 92, 92, 0.04), 0px -10px 12px rgba(92, 92, 92, 0.04)",borderRadius:"6px",width:"100%",border:"1px solid rgba(0, 0, 0, 0.12)",color:"inherit",fontSize:13,position:"absolute",left:0,top:0},[`& .${Yt.listbox}`]:{padding:0}}));function Tt({name:k,icon:_,did:A,dark:R=!1}){return e.jsx($s,{prefer:R?"dark":"light",children:e.jsx(O,{sx:{display:"flex",justifyContent:"center",alignItems:"center",bgcolor:R?"common.black":"info.main",pl:4,borderRadius:1,overflow:"hidden",height:1},children:e.jsxs(dn,{sx:{display:"flex",alignItems:"center",p:1.5,width:1,borderRadius:"8px 0 0 8px"},children:[e.jsx(Es,{sx:{bgcolor:"transparent",width:48,height:48,borderRadius:1},children:_?e.jsx(Ts,{src:_,alt:"icon",style:{width:48,height:48,borderRadius:"8px"}}):e.jsx(Is,{variant:"rectangular",width:48,height:48,sx:{borderRadius:1}})}),e.jsxs(O,{sx:{ml:1,flex:1,width:0,overflow:"hidden"},children:[e.jsx(J,{sx:{fontSize:20,fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k}),e.jsx(kt,{did:A,inline:!0,size:13})]})]})})})}Tt.propTypes={name:E.string.isRequired,icon:E.string.isRequired,did:E.string.isRequired,dark:E.bool};var Tn=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Tn.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var In=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};In.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Ln=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .7569 .7608 .7647)",fillOpacity:"1"}}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Ln.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Dn=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .3 .3 .3)",fillOpacity:"1"}}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Dn.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var qn=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"#1E4DCF",style:{fill:"color(display-p3 .1176 .302 .8118)",fillOpacity:"1"},d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("path",{d:"M32 44c0-6.627 5.373-12 12-12h760v184H32V44Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},shapeRendering:"crispEdges"}),e.jsx("path",{d:"M76.565 126H32v90h772V43H159.565c-11.017 0-16.525 0-20.822 1.928a22 22 0 0 0-11.065 11.065c-1.928 4.297-1.928 9.806-1.928 20.822 0 16.024 0 24.035-2.805 30.286a31.997 31.997 0 0 1-16.094 16.094C100.6 126 92.589 126 76.565 126Z",fill:"#F1F3F4",style:{fill:"color(display-p3 .9451 .9529 .9569)",fillOpacity:"1"}}),e.jsx("path",{d:"M206.571 72.046h2.991l4.56 7.934h.188l4.559-7.934h2.992l-6.333 10.602V89.5h-2.625v-6.852l-6.332-10.602Zm20.93 17.718c-1.228 0-2.299-.281-3.213-.843-.915-.563-1.625-1.35-2.131-2.361-.506-1.012-.759-2.194-.759-3.546 0-1.358.253-2.545.759-3.562s1.216-1.807 2.131-2.37c.914-.562 1.985-.843 3.213-.843 1.227 0 2.298.28 3.213.843s1.625 1.353 2.13 2.37c.506 1.017.759 2.204.759 3.562 0 1.353-.253 2.534-.759 3.546-.505 1.011-1.215 1.798-2.13 2.36-.915.563-1.986.844-3.213.844Zm.008-2.139c.796 0 1.455-.21 1.978-.63.522-.421.909-.98 1.159-1.68.255-.698.383-1.468.383-2.31 0-.834-.128-1.602-.383-2.3-.25-.705-.637-1.27-1.159-1.697-.523-.426-1.182-.639-1.978-.639-.801 0-1.466.213-1.994.64-.523.426-.912.991-1.168 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.256.698.645 1.258 1.168 1.678.528.42 1.193.631 1.994.631Zm17.231-3.554v-7.662h2.557V89.5h-2.506v-2.267h-.136c-.301.699-.784 1.281-1.449 1.747-.659.46-1.48.69-2.463.69-.841 0-1.585-.184-2.233-.553-.642-.376-1.148-.93-1.517-1.663-.364-.732-.546-1.639-.546-2.718v-8.327h2.549v8.02c0 .892.247 1.602.741 2.13.495.53 1.137.793 1.926.793.478 0 .952-.119 1.424-.358.477-.238.872-.6 1.184-1.082.318-.483.475-1.097.469-1.841Zm5.981 5.429V76.41h2.463v2.079h.136a3.164 3.164 0 0 1 1.262-1.662 3.608 3.608 0 0 1 2.062-.614 10.87 10.87 0 0 1 1.083.06v2.437a4.633 4.633 0 0 0-.546-.093 5.2 5.2 0 0 0-.784-.06c-.602 0-1.139.128-1.611.383a2.851 2.851 0 0 0-1.517 2.566V89.5h-2.548Zm25.287-12.87c-.091-.806-.466-1.431-1.125-1.874-.659-.45-1.489-.674-2.489-.674-.716 0-1.335.114-1.858.341-.523.222-.929.529-1.219.92a2.173 2.173 0 0 0-.426 1.322c0 .414.097.772.29 1.074.199.3.457.554.776.758.324.199.67.367 1.039.503.37.13.725.239 1.066.324l1.704.443c.557.136 1.128.321 1.713.554.586.233 1.128.54 1.628.92.5.381.904.853 1.21 1.415.313.563.469 1.236.469 2.02 0 .989-.255 1.867-.767 2.634-.506.767-1.241 1.372-2.207 1.815-.96.443-2.122.665-3.486.665-1.307 0-2.438-.208-3.392-.622-.955-.415-1.702-1.003-2.242-1.765-.539-.767-.838-1.676-.894-2.727h2.642c.051.63.255 1.156.613 1.577a3.32 3.32 0 0 0 1.389.929 5.622 5.622 0 0 0 1.867.298c.744 0 1.406-.116 1.986-.35.585-.238 1.045-.567 1.38-.988.336-.426.503-.923.503-1.491 0-.517-.147-.94-.443-1.27-.29-.33-.685-.603-1.185-.819a11.558 11.558 0 0 0-1.679-.57l-2.062-.563c-1.398-.38-2.506-.94-3.324-1.679-.812-.739-1.219-1.716-1.219-2.932 0-1.005.273-1.883.819-2.633.545-.75 1.284-1.333 2.215-1.748.932-.42 1.983-.63 3.154-.63 1.182 0 2.224.207 3.128.622.909.415 1.625.986 2.147 1.713.523.722.796 1.551.819 2.489h-2.54Zm5.721 12.87V76.41h2.548V89.5h-2.548Zm1.287-15.11c-.444 0-.824-.148-1.142-.444a1.44 1.44 0 0 1-.469-1.074c0-.42.156-.778.469-1.074a1.602 1.602 0 0 1 1.142-.451c.443 0 .821.15 1.133.451.318.296.477.654.477 1.074 0 .415-.159.773-.477 1.074-.312.296-.69.443-1.133.443Zm10.8 2.02v2.044h-7.151V76.41h7.151Zm-5.233-3.137h2.548v12.383c0 .495.074.867.222 1.117.148.244.338.412.571.503.239.085.497.127.776.127.204 0 .383-.014.537-.042l.357-.068.461 2.105a4.29 4.29 0 0 1-.631.17 4.998 4.998 0 0 1-1.023.103 4.49 4.49 0 0 1-1.875-.359 3.22 3.22 0 0 1-1.406-1.159c-.358-.522-.537-1.179-.537-1.968V73.273Zm13.553 16.491c-1.289 0-2.4-.275-3.332-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.21-1.82 2.114-2.395.909-.573 1.971-.86 3.187-.86.739 0 1.455.122 2.148.366a5.213 5.213 0 0 1 1.867 1.15c.551.523.985 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.137-1.264-.409-1.78a3.098 3.098 0 0 0-1.151-1.236c-.489-.302-1.062-.452-1.722-.452-.715 0-1.34.176-1.875.528a3.55 3.55 0 0 0-1.227 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.153 1.619.46 2.233.313.613.747 1.082 1.304 1.406.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.85 2.85 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.745.29-1.594.434-2.549.434Zm29.088-17.718V89.5h-2.42l-8.872-12.801h-.162V89.5h-2.634V72.046h2.438l8.881 12.818h.161V72.045h2.608Zm7.447 17.744c-.829 0-1.579-.154-2.25-.46a3.793 3.793 0 0 1-1.594-1.356c-.386-.59-.579-1.315-.579-2.173 0-.739.142-1.347.426-1.824a3.145 3.145 0 0 1 1.151-1.133 5.998 5.998 0 0 1 1.619-.63c.596-.143 1.204-.25 1.824-.325l1.909-.221c.488-.063.844-.162 1.065-.299.222-.136.333-.358.333-.665v-.06c0-.743-.211-1.32-.631-1.73-.415-.408-1.034-.613-1.858-.613-.858 0-1.534.19-2.028.571-.489.375-.827.793-1.015 1.253l-2.395-.546c.285-.795.699-1.437 1.245-1.926a5.043 5.043 0 0 1 1.9-1.074 7.424 7.424 0 0 1 2.259-.34c.523 0 1.077.062 1.662.187a4.86 4.86 0 0 1 1.653.665c.517.324.941.787 1.27 1.39.33.596.494 1.371.494 2.326V89.5h-2.488v-1.79h-.103c-.164.33-.411.654-.741.972-.33.318-.753.582-1.27.792-.517.21-1.136.316-1.858.316Zm.554-2.046c.705 0 1.307-.139 1.807-.417.506-.279.889-.642 1.151-1.091.267-.455.4-.94.4-1.458v-1.687c-.091.09-.267.176-.528.256-.256.074-.549.139-.878.196-.33.05-.651.099-.963.144-.313.04-.574.074-.784.103a6.307 6.307 0 0 0-1.355.315c-.404.148-.728.36-.972.64-.239.272-.358.636-.358 1.09 0 .63.233 1.108.699 1.432.466.318 1.06.477 1.781.477Zm9.301 1.756V76.41h2.446v2.13h.162a3.374 3.374 0 0 1 1.338-1.688c.619-.409 1.36-.613 2.224-.613.875 0 1.608.204 2.199.613.596.41 1.037.972 1.321 1.688h.136a3.687 3.687 0 0 1 1.492-1.67c.682-.421 1.494-.631 2.437-.631 1.188 0 2.157.372 2.907 1.116.755.744 1.133 1.867 1.133 3.367V89.5h-2.548v-8.54c0-.886-.242-1.528-.725-1.926-.483-.398-1.059-.597-1.73-.597-.829 0-1.474.256-1.934.767-.461.506-.691 1.157-.691 1.952V89.5h-2.54v-8.702c0-.71-.221-1.281-.664-1.713-.444-.432-1.02-.647-1.73-.647-.483 0-.929.127-1.339.383-.403.25-.73.6-.98 1.048-.244.45-.366.97-.366 1.56V89.5h-2.548Zm26.853.264c-1.29 0-2.401-.275-3.333-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.211-1.82 2.114-2.395.909-.573 1.972-.86 3.188-.86.738 0 1.454.122 2.147.366a5.205 5.205 0 0 1 1.867 1.15c.551.523.986 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.136-1.264-.409-1.78a3.091 3.091 0 0 0-1.151-1.236c-.488-.302-1.062-.452-1.721-.452-.716 0-1.341.176-1.875.528a3.545 3.545 0 0 0-1.228 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.154 1.619.46 2.233a3.336 3.336 0 0 0 1.304 1.406c.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.842 2.842 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.744.29-1.594.434-2.548.434ZM85 161.333H62.477l7.574-7.46-2.393-2.366L56 163.007l11.658 11.5 2.393-2.367-7.575-7.459H85v-3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{opacity:".4",d:"M106 164.681h22.524l-7.575 7.46 2.393 2.366 11.658-11.5-11.658-11.5-2.393 2.366 7.575 7.46H106v3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"m181.89 164.538-3.225-.385a9.734 9.734 0 0 1-8.859 8.543 9.74 9.74 0 0 1-5.382-18.303 9.738 9.738 0 0 1 12.074 2.387h-4.055v3.25h9.664v-9.664h-3.249v4.187a12.842 12.842 0 0 0-6.064-3.985 12.995 12.995 0 0 0-13.833 4.172 12.994 12.994 0 0 0-1.431 14.376 13.2 13.2 0 0 0 2.286 3.106 12.987 12.987 0 0 0 13.436 3.071 12.992 12.992 0 0 0 8.638-10.74v-.015Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"M208 161.7c0-12.321 0-18.482 2.398-23.188a22.002 22.002 0 0 1 9.614-9.614c4.706-2.398 10.867-2.398 23.188-2.398H804v73H243.2c-12.321 0-18.482 0-23.188-2.398a22.002 22.002 0 0 1-9.614-9.614C208 182.782 208 176.621 208 164.3v-2.6Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"}})]}),e.jsx("rect",{x:"229",y:"145",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}}),e.jsx("rect",{x:"203",y:"66",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},d:"M0 0h384v216H0z"})}),e.jsxs("filter",{id:"b",x:"-21.333",y:"-3.556",width:"878.667",height:"290.667",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_13_53"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_13_53",result:"shape"})]})]})]})};qn.defaultProps={width:"384",height:"216",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const pi=Object.keys(X.SUPPORTED_LANGUAGES).map(k=>({code:k,name:X.SUPPORTED_LANGUAGES[k].nativeName,enName:X.SUPPORTED_LANGUAGES[k].name})),gi=["name","enName","code"];function Ht({blocklet:k,onUpdate:_=()=>{},hasPermission:A=!1,showFields:R=[],...j}){const{api:y,prefix:x,getSessionInHeader:o}=se(),{t:p}=q.useContext(fe),[f,u]=Bt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),t=f.loading||!A,{logoUrl:a,logoDarkUrl:r,rectLogoUrl:n,rectLogoDarkUrl:s,faviconUrl:c,splashPortraitUrl:i,splashLandscapeUrl:l,ogImageUrl:d}=Ls({blocklet:k});if(zt(k.status))return null;const h=k.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES),g=k.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),w=k.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER),S=k.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR),m=[{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,title:p("blocklet.config.name"),description:p("blocklet.config.nameDesc"),value:k.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,title:p("blocklet.config.description"),description:p("blocklet.config.descriptionDesc"),value:k.environments.find(b=>b.key==="BLOCKLET_APP_DESCRIPTION").value},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,title:p("blocklet.config.appUrl"),description:p("blocklet.config.appUrlDesc"),value:g?g.value:""},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,title:p("blocklet.config.copyrightOwner"),description:p("blocklet.config.copyrightDesc"),value:w?w.value:""},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,title:p("blocklet.config.copyrightYear"),description:p("blocklet.config.copyrightDesc"),value:S?S.value:""}],v=async(b,C)=>{const P=[{key:b,value:C}];try{u({loading:!0});const{blocklet:$}=await y.configBlocklet({input:{did:k.meta.did,configs:P}});_($)}catch($){Z.error($.message)}finally{u({loading:!1})}};return e.jsxs(bi,{...j,children:[(!R.length||R.includes("base-info-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(O,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:p("blocklet.config.baseInfo")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:p("blocklet.config.baseInfoDesc")})]}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),(R.length?m.filter(b=>R.includes(b.key)):m).map(b=>e.jsxs(e.Fragment,{children:[e.jsx(B,{title:b.title,desc:b.description,children:e.jsx(Pt,{style:{marginTop:0},disabled:t,loading:f.loading,initialValue:kr.escapeTag(b.value),placeholder:b.title,onSubmit:C=>v(b.key,C),validate:b.validate})},b.key),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]})),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES))&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:p("blocklet.config.languages"),desc:p("blocklet.config.languagesDesc"),children:e.jsx(En,{style:{marginTop:0},disabled:t,loading:f.loading,options:pi,noEmpty:!0,initialValue:h?h.value.split(","):["en","zh"],onSubmit:b=>v("BLOCKLET_APP_LANGUAGES",b),helperText:p("blocklet.config.selectLanguagesTip"),placeholder:p("blocklet.config.languagesSearch"),filterKeys:gi,renderLabel:(b,C)=>C.name===C.enName?`${C.name} (${b.toUpperCase()})`:`${C.name}, ${C.enName} (${b.toUpperCase()})`})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),(!R.length||R.includes("logo-settings-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(O,{sx:{mt:6},children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:p("blocklet.config.logoSettings")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:p("blocklet.config.logoSettingsDesc")}),e.jsx(J,{variant:"body2",sx:{color:"warning.main"},children:p("blocklet.config.changeImageTip")})]}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),e.jsxs(ji,{children:[(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO))&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:p("blocklet.config.logoSquare"),desc:`${p("blocklet.config.logoSquareDesc")}
|
|
9
|
-
${p("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,link:"https://www.didwallet.io/",children:e.jsxs(O,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(O,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:p("common.lightMode")}),e.jsx(O,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(
|
|
10
|
-
${p("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.jsxs(O,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsxs(O,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[e.jsx(
|
|
8
|
+
`,fi=je(Es)(()=>({[`& .${Xt.paper}`]:{boxShadow:"0px 8px 12px rgba(92, 92, 92, 0.04), 0px -10px 12px rgba(92, 92, 92, 0.04)",borderRadius:"6px",width:"100%",border:"1px solid rgba(0, 0, 0, 0.12)",color:"inherit",fontSize:13,position:"absolute",left:0,top:0},[`& .${Xt.listbox}`]:{padding:0}}));function It({name:k,icon:_,did:A,dark:R=!1}){return e.jsx(Ts,{prefer:R?"dark":"light",children:e.jsx(O,{sx:{display:"flex",justifyContent:"center",alignItems:"center",bgcolor:R?"common.black":"info.main",pl:4,borderRadius:1,overflow:"hidden",height:1},children:e.jsxs(un,{sx:{display:"flex",alignItems:"center",p:1.5,width:1,borderRadius:"8px 0 0 8px"},children:[e.jsx(Is,{sx:{bgcolor:"transparent",width:48,height:48,borderRadius:1},children:_?e.jsx(Ls,{src:_,alt:"icon",style:{width:48,height:48,borderRadius:"8px"}}):e.jsx(Ds,{variant:"rectangular",width:48,height:48,sx:{borderRadius:1}})}),e.jsxs(O,{sx:{ml:1,flex:1,width:0,overflow:"hidden"},children:[e.jsx(J,{sx:{fontSize:20,fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k}),e.jsx(kt,{did:A,inline:!0,size:13})]})]})})})}It.propTypes={name:E.string.isRequired,icon:E.string.isRequired,did:E.string.isRequired,dark:E.bool};var Ln=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Ln.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Dn=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};Dn.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var qn=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#fff",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .8745 .8824 .898)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#fff",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .2392 .251 .2627)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"})]})]}),e.jsx("path",{fill:"#fff",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .3765 .3882 .4039)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .9451 .9529 .9569)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .3765 .3882 .4039)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.026.235.384 0 .721-.078 1.01-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.017.243a2.189 2.189 0 0 0-.73.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm11.127 3.19c.335 0 .644-.068.927-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.617 0-1.157-.109-1.617-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.617-.326.644 0 1.206.131 1.687.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.093.25Zm6.267-10.664v11.667h-1.413V92.111h1.413Zm5.02 3.448-3.585 3.836-2.005 2.081-.114-1.496 1.436-1.717 2.552-2.704h1.716Zm-1.283 8.219-2.932-3.92.729-1.253 3.859 5.173h-1.656Zm2.757-.745a.86.86 0 0 1 .22-.6c.152-.167.37-.25.653-.25.284 0 .499.083.646.25a.844.844 0 0 1 .228.6.835.835 0 0 1-.228.593c-.147.162-.362.243-.646.243-.283 0-.501-.081-.653-.243a.85.85 0 0 1-.22-.593Zm7.368-.258c.334 0 .643-.068.926-.205.284-.137.517-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.363 3.363 0 0 1-1.177 1.01c-.486.253-1.02.38-1.602.38-.618 0-1.158-.109-1.618-.327a3.208 3.208 0 0 1-1.14-.896 4.017 4.017 0 0 1-.676-1.307 5.54 5.54 0 0 1-.22-1.572v-.319c0-.552.074-1.073.22-1.564.152-.497.378-.935.676-1.314a3.21 3.21 0 0 1 1.14-.897c.46-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395a2.89 2.89 0 0 1 1.131 1.063c.279.445.431.952.456 1.519h-1.337a2.02 2.02 0 0 0-.288-.919 1.797 1.797 0 0 0-.669-.653 1.866 1.866 0 0 0-.979-.25c-.431 0-.793.085-1.087.257a1.906 1.906 0 0 0-.691.684c-.167.283-.288.6-.364.95a5.214 5.214 0 0 0-.107 1.055v.32c0 .359.036.713.107 1.063.07.349.189.665.357.949.172.284.402.511.691.684.293.167.658.25 1.094.25Zm4.481-3.015v-.175c0-.592.086-1.142.258-1.648.172-.511.42-.955.744-1.33a3.33 3.33 0 0 1 1.178-.88 3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.55.312a3.745 3.745 0 0 1-1.557-.312 3.527 3.527 0 0 1-1.185-.881 4.017 4.017 0 0 1-.744-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.385 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .8745 .8824 .898)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .8588 .8627 .8667)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .9608 .9608 .9608)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#fff",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .7569 .7608 .7647)",fillOpacity:"1"}}),e.jsx("path",{fill:"#000",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .4196 .4471 .502)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};qn.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var zn=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"color(display-p3 .1255 .3333 .898)",d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("rect",{width:"1600",height:"887.778",x:"32",y:"32",fill:"#1a1a1a",rx:"12",shapeRendering:"crispEdges"}),e.jsxs("g",{clipPath:"url(#c)",children:[e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"55.333",y:"49.778",fill:"color(display-p3 .9255 .4196 .3686)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"77.556",y:"49.778",fill:"color(display-p3 .9569 .749 .3098)",rx:"6.667"}),e.jsx("rect",{width:"13.333",height:"13.333",x:"99.778",y:"49.778",fill:"color(display-p3 .3804 .7686 .3255)",rx:"6.667"}),e.jsxs("g",{clipPath:"url(#d)",children:[e.jsx("path",{fill:"#2a2a2a",d:"M128.667 49.778a8.888 8.888 0 0 1 8.889-8.89h248.888c4.91 0 8.889 3.98 8.889 8.89v28.889H128.667v-28.89Z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"m374.222 56.444 3.334 3.334m0 0 3.333-3.334m-3.333 3.334-3.334 3.333m3.334-3.333 3.333 3.333"}),e.jsx("rect",{width:"180",height:"18",x:"140",y:"51",fill:"color(display-p3 .3 .3 .3)",rx:"4"})]})]}),e.jsx("path",{fill:"#1a1a1a",d:"M32 78.667h1600v40H32z"}),e.jsx("path",{stroke:"color(display-p3 .8 .8 .8)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M63.111 98.667H49.778m0 0L56.444 92m-6.666 6.667 6.666 6.666m28.889-6.666h13.334m0 0L92 92m6.667 6.667L92 105.333"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M122.278 98.667a5.278 5.278 0 0 1 9.524-3.136l-2.024 2.024h5.555V92l-2.343 2.343a6.944 6.944 0 1 0 .752 7.48.834.834 0 0 0-1.484-.758 5.278 5.278 0 0 1-9.98-2.398Z",clipRule:"evenodd"}),e.jsx("rect",{width:"1360",height:"31.111",x:"152",y:"83.111",fill:"color(display-p3 .2 .2 .2)",rx:"15.556"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",fillRule:"evenodd",d:"M172 93.111a2.778 2.778 0 0 0-2.778 2.778V97h-.555a1.11 1.11 0 0 0-1.111 1.111v5.556c0 .613.497 1.111 1.111 1.111h6.666c.614 0 1.111-.498 1.111-1.111v-5.556A1.11 1.11 0 0 0 175.333 97h-.555v-1.111A2.778 2.778 0 0 0 172 93.11ZM173.667 97v-1.111a1.667 1.667 0 0 0-3.334 0V97h3.334Z",clipRule:"evenodd"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M195.695 102.373v-4.231c0-.324-.066-.605-.198-.843a1.29 1.29 0 0 0-.577-.562c-.258-.132-.577-.198-.957-.198-.355 0-.666.061-.934.183a1.624 1.624 0 0 0-.623.478 1.05 1.05 0 0 0-.221.638h-1.405c0-.293.076-.585.228-.873.152-.289.37-.55.653-.783a3.271 3.271 0 0 1 1.033-.562 4.072 4.072 0 0 1 1.352-.212c.598 0 1.125.1 1.58.303.461.203.821.51 1.079.92.263.405.395.913.395 1.526v3.828c0 .274.023.565.068.874.051.309.124.575.22.797v.122h-1.466a2.684 2.684 0 0 1-.167-.646 5.26 5.26 0 0 1-.06-.759Zm.243-3.578.015.988h-1.421c-.4 0-.757.032-1.07.098a2.463 2.463 0 0 0-.79.281 1.34 1.34 0 0 0-.487.479 1.273 1.273 0 0 0-.167.661c0 .258.059.493.175.706.117.213.291.382.524.509.238.122.529.182.874.182a2.357 2.357 0 0 0 1.921-.942c.198-.263.304-.519.319-.767l.6.676a2.034 2.034 0 0 1-.288.707 3.402 3.402 0 0 1-1.557 1.329 3.02 3.02 0 0 1-1.2.228c-.557 0-1.046-.109-1.466-.327a2.51 2.51 0 0 1-.973-.873 2.322 2.322 0 0 1-.341-1.238c0-.441.086-.828.258-1.163.172-.339.42-.62.744-.843.324-.228.714-.4 1.17-.516a6.173 6.173 0 0 1 1.527-.175h1.633Zm4.777-1.944v6.927h-1.405v-8.219h1.367l.038 1.292Zm2.567-1.337-.007 1.306a2.035 2.035 0 0 0-.334-.045 3.579 3.579 0 0 0-.35-.015c-.324 0-.61.05-.858.151a1.777 1.777 0 0 0-.63.426c-.173.182-.309.4-.411.653a3.132 3.132 0 0 0-.189.82l-.395.228c0-.496.048-.962.144-1.397.101-.436.256-.82.463-1.155.208-.34.471-.602.79-.79.324-.192.709-.288 1.155-.288.101 0 .217.012.349.038.132.02.223.043.273.068Zm4.436 7.261c.334 0 .643-.068.927-.205.283-.137.516-.324.699-.562.182-.243.286-.519.311-.828h1.337c-.025.486-.19.939-.494 1.36a3.372 3.372 0 0 1-1.177 1.01c-.486.253-1.02.38-1.603.38-.618 0-1.157-.109-1.618-.327a3.213 3.213 0 0 1-1.139-.896 3.998 3.998 0 0 1-.676-1.307 5.504 5.504 0 0 1-.22-1.572v-.319c0-.552.073-1.073.22-1.564a3.99 3.99 0 0 1 .676-1.314c.304-.38.684-.679 1.139-.897.461-.218 1-.326 1.618-.326.643 0 1.205.131 1.686.395.481.258.859.612 1.132 1.063.279.445.431.952.456 1.519h-1.337a2.01 2.01 0 0 0-.289-.919 1.794 1.794 0 0 0-.668-.653 1.867 1.867 0 0 0-.98-.25c-.43 0-.792.085-1.086.257a1.898 1.898 0 0 0-.691.684c-.167.283-.289.6-.365.95a5.214 5.214 0 0 0-.106 1.055v.32c0 .359.035.713.106 1.063.071.349.19.665.357.949.172.284.403.511.691.684.294.167.659.25 1.094.25Zm4.846-10.664h1.413v10.072l-.122 1.595h-1.291V92.111Zm6.965 7.49v.159c0 .597-.071 1.152-.212 1.663-.142.507-.35.947-.623 1.322a2.897 2.897 0 0 1-1.003.873c-.395.208-.848.312-1.359.312-.522 0-.98-.089-1.375-.266a2.707 2.707 0 0 1-.988-.782 4.064 4.064 0 0 1-.645-1.231 7.769 7.769 0 0 1-.327-1.625v-.7c.061-.607.17-1.151.327-1.632a4.05 4.05 0 0 1 .645-1.23 2.6 2.6 0 0 1 .988-.783c.39-.182.843-.273 1.359-.273.517 0 .975.1 1.375.303.4.198.734.481 1.003.851a4 4 0 0 1 .623 1.33c.141.51.212 1.08.212 1.708Zm-1.413.159v-.16c0-.41-.038-.795-.113-1.154a2.993 2.993 0 0 0-.365-.957 1.81 1.81 0 0 0-.661-.653c-.273-.162-.61-.243-1.01-.243-.355 0-.663.06-.927.182a2.014 2.014 0 0 0-.661.493 2.64 2.64 0 0 0-.448.7 3.993 3.993 0 0 0-.25.804v1.831c.081.354.212.696.395 1.025.187.324.435.59.744.798.314.207.701.311 1.162.311.38 0 .704-.076.972-.228.274-.157.494-.372.661-.645.172-.274.299-.59.38-.95.081-.359.121-.744.121-1.154Zm4.717-7.649v11.667h-1.412V92.111h1.412Zm1.884 7.649v-.175c0-.592.086-1.142.258-1.648a3.9 3.9 0 0 1 .745-1.33c.324-.38.716-.673 1.177-.88a3.653 3.653 0 0 1 1.549-.32c.578 0 1.097.107 1.557.32.466.207.861.5 1.185.88.329.375.58.819.752 1.33.172.506.258 1.056.258 1.648v.175c0 .592-.086 1.142-.258 1.648a3.948 3.948 0 0 1-.752 1.329 3.429 3.429 0 0 1-1.177.881c-.456.208-.972.312-1.549.312a3.747 3.747 0 0 1-1.558-.312 3.513 3.513 0 0 1-1.184-.881 4.002 4.002 0 0 1-.745-1.329 5.093 5.093 0 0 1-.258-1.648Zm1.405-.175v.175c0 .41.048.797.144 1.162.097.359.241.678.433.957a2.2 2.2 0 0 0 .737.661c.294.157.636.235 1.025.235.384 0 .722-.078 1.011-.235.293-.162.536-.383.729-.661.192-.279.337-.598.433-.957.101-.365.152-.752.152-1.162v-.175c0-.405-.051-.787-.152-1.147a2.939 2.939 0 0 0-.441-.964 2.086 2.086 0 0 0-.729-.669 2.046 2.046 0 0 0-1.018-.243c-.385 0-.724.081-1.018.243a2.195 2.195 0 0 0-.729.669c-.192.278-.336.6-.433.964a4.43 4.43 0 0 0-.144 1.147Zm9.236-2.392v6.585h-1.413v-8.219h1.337l.076 1.633Zm-.288 2.164-.654-.022a5.603 5.603 0 0 1 .221-1.558c.141-.48.351-.898.63-1.253a2.793 2.793 0 0 1 1.041-.82c.415-.198.896-.296 1.443-.296.385 0 .739.055 1.063.167.324.106.605.276.843.509.238.233.423.531.555.896.131.364.197.805.197 1.322v5.476h-1.405V98.37c0-.43-.073-.775-.22-1.033a1.262 1.262 0 0 0-.608-.562 2.192 2.192 0 0 0-.927-.183c-.415 0-.762.074-1.04.22-.279.148-.501.35-.669.608a2.74 2.74 0 0 0-.364.89 4.948 4.948 0 0 0-.106 1.047Zm5.324-.775-.942.29c.005-.451.079-.885.22-1.3a3.52 3.52 0 0 1 .631-1.109 2.98 2.98 0 0 1 1.025-.767c.405-.192.869-.288 1.39-.288.441 0 .831.058 1.17.174.344.117.633.297.866.54.238.238.418.544.539.919.122.374.182.82.182 1.336v5.401h-1.412v-5.416c0-.46-.074-.817-.221-1.07a1.145 1.145 0 0 0-.607-.54 2.432 2.432 0 0 0-.927-.16c-.309 0-.582.054-.82.16a1.695 1.695 0 0 0-.6.44 1.943 1.943 0 0 0-.373.631 2.341 2.341 0 0 0-.121.76Z"}),e.jsx("rect",{width:"99",height:"18",x:"187",y:"90",fill:"color(display-p3 .3 .3 .3)",rx:"4"}),e.jsx("path",{fill:"color(display-p3 .2 .2 .2)",d:"M32 118.667h1600v1.111H32z"}),e.jsxs("g",{clipPath:"url(#e)",children:[e.jsx("path",{fill:"color(display-p3 .1 .1 .1)",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1600v800H32z"}),e.jsx("path",{fill:"#1a1a1a",d:"M32 119.778h1531.11v91.417H32z"}),e.jsx("rect",{x:"79.723",y:"145.457",width:"119.774",height:"40.059",rx:"8",style:{fill:"color(display-p3 .3 .3 .3)",fillOpacity:"1"}}),e.jsx("path",{fill:"#fff",d:"M248.364 170.986v-11.599h2.101v4.91h5.375v-4.91h2.107v11.599h-2.107v-4.927h-5.375v4.927h-2.101Zm15.891.17c-.849 0-1.586-.187-2.209-.56a3.813 3.813 0 0 1-1.45-1.569c-.339-.672-.509-1.458-.509-2.356 0-.899.17-1.686.509-2.362a3.804 3.804 0 0 1 1.45-1.575c.623-.374 1.36-.56 2.209-.56.85 0 1.586.186 2.209.56a3.758 3.758 0 0 1 1.444 1.575c.344.676.516 1.463.516 2.362 0 .898-.172 1.684-.516 2.356a3.766 3.766 0 0 1-1.444 1.569c-.623.373-1.359.56-2.209.56Zm.012-1.642c.46 0 .845-.127 1.155-.38.31-.256.54-.6.691-1.031.155-.43.232-.909.232-1.438 0-.532-.077-1.014-.232-1.444-.151-.435-.381-.78-.691-1.037-.31-.257-.695-.385-1.155-.385-.472 0-.865.128-1.179.385-.309.257-.541.602-.696 1.037a4.34 4.34 0 0 0-.227 1.444c0 .529.076 1.008.227 1.438.155.431.387.775.696 1.031.314.253.707.38 1.179.38Zm6.216 1.472v-8.699h1.96v1.478h.101c.182-.498.482-.887.901-1.167.419-.283.919-.424 1.501-.424.589 0 1.085.143 1.489.43.408.283.695.67.861 1.161h.091a2.38 2.38 0 0 1 .974-1.155c.461-.291 1.006-.436 1.637-.436.8 0 1.454.253 1.96.758.506.506.759 1.245.759 2.215v5.839h-2.056v-5.522c0-.54-.144-.934-.431-1.184-.287-.253-.638-.379-1.053-.379-.495 0-.882.155-1.161.464-.276.306-.414.705-.414 1.195v5.426h-2.01v-5.607c0-.449-.136-.808-.408-1.076-.268-.268-.619-.402-1.054-.402-.294 0-.562.076-.804.227a1.578 1.578 0 0 0-.578.628 1.97 1.97 0 0 0-.215.94v5.29h-2.05Zm18.484.17c-.872 0-1.626-.181-2.26-.543a3.688 3.688 0 0 1-1.456-1.552c-.339-.672-.509-1.463-.509-2.373 0-.895.17-1.681.509-2.357a3.86 3.86 0 0 1 1.439-1.585c.616-.382 1.339-.572 2.169-.572.536 0 1.042.086 1.518.26.48.17.903.434 1.269.793.37.359.661.816.872 1.371.211.551.317 1.208.317 1.971v.628h-7.13v-1.382h5.165a2.206 2.206 0 0 0-.255-1.047 1.844 1.844 0 0 0-.697-.731 1.95 1.95 0 0 0-1.03-.266c-.42 0-.788.102-1.105.306-.317.2-.564.464-.742.792a2.295 2.295 0 0 0-.266 1.071v1.206c0 .506.093.94.278 1.303.185.359.443.634.775.827.333.189.722.283 1.167.283.298 0 .568-.041.81-.125.242-.086.451-.213.629-.379a1.59 1.59 0 0 0 .402-.617l1.914.215a2.98 2.98 0 0 1-.691 1.325 3.356 3.356 0 0 1-1.291.872c-.525.204-1.125.306-1.801.306Z"}),e.jsx("path",{fill:"color(display-p3 .8 .8 .8)",d:"M342.036 170.986h-1.472l4.259-11.599h1.45l4.259 11.599h-1.472l-3.467-9.764h-.09l-3.467 9.764Zm.544-4.531h5.936v1.246h-5.936v-1.246Zm10.078 4.531v-11.599h1.336v4.282h.114c.098-.151.234-.344.408-.578.177-.238.43-.449.758-.634.333-.189.782-.283 1.348-.283.733 0 1.379.183 1.937.549.559.366.995.885 1.309 1.557.313.673.47 1.465.47 2.379 0 .922-.157 1.72-.47 2.396-.314.672-.748 1.193-1.303 1.563-.555.366-1.195.55-1.92.55-.559 0-1.006-.093-1.342-.278-.336-.189-.595-.402-.776-.64a8.822 8.822 0 0 1-.419-.6h-.159v1.336h-1.291Zm1.314-4.349c0 .657.096 1.236.289 1.738.192.499.474.89.844 1.173.37.279.823.419 1.359.419.559 0 1.025-.147 1.399-.442.377-.298.661-.698.849-1.201a4.7 4.7 0 0 0 .289-1.687c0-.612-.094-1.163-.283-1.654-.185-.495-.466-.886-.844-1.173-.374-.29-.844-.436-1.41-.436-.544 0-1.001.138-1.371.414-.37.272-.649.653-.838 1.144-.189.487-.283 1.055-.283 1.705Zm12.264 4.531c-.786 0-1.475-.187-2.068-.561-.589-.374-1.049-.897-1.382-1.569-.328-.672-.492-1.457-.492-2.356 0-.906.164-1.697.492-2.373.333-.676.793-1.201 1.382-1.575.593-.374 1.282-.56 2.068-.56.785 0 1.472.186 2.061.56.593.374 1.054.899 1.382 1.575.332.676.499 1.467.499 2.373 0 .899-.167 1.684-.499 2.356a3.755 3.755 0 0 1-1.382 1.569c-.589.374-1.276.561-2.061.561Zm0-1.201c.596 0 1.087-.153 1.472-.459.385-.306.67-.708.855-1.206a4.624 4.624 0 0 0 .278-1.62 4.67 4.67 0 0 0-.278-1.626 2.736 2.736 0 0 0-.855-1.217c-.385-.31-.876-.465-1.472-.465-.597 0-1.088.155-1.473.465-.385.309-.67.715-.855 1.217a4.67 4.67 0 0 0-.278 1.626c0 .581.093 1.121.278 1.62.185.498.47.9.855 1.206.385.306.876.459 1.473.459Zm11.783-2.537v-5.143h1.337v8.699h-1.337v-1.472h-.09a2.853 2.853 0 0 1-.952 1.127c-.43.306-.974.459-1.631.459-.544 0-1.027-.119-1.45-.357-.423-.242-.755-.604-.997-1.088-.241-.487-.362-1.1-.362-1.84v-5.528h1.337v5.437c0 .634.177 1.14.532 1.518.359.377.815.566 1.371.566.332 0 .67-.085 1.013-.255.348-.17.638-.43.873-.781.237-.351.356-.799.356-1.342Zm7.888-5.143v1.133h-4.509v-1.133h4.509Zm-3.195-2.084h1.337v8.291c0 .378.055.661.164.85a.854.854 0 0 0 .431.374c.177.06.364.09.56.09.147 0 .268-.007.363-.022l.226-.046.272 1.201a2.739 2.739 0 0 1-.379.102 2.788 2.788 0 0 1-.618.057 2.7 2.7 0 0 1-1.11-.244 2.204 2.204 0 0 1-.895-.742c-.234-.332-.351-.751-.351-1.257v-8.654Zm18.122-.816h1.405v7.68c0 .793-.187 1.501-.561 2.124a3.93 3.93 0 0 1-1.569 1.467c-.676.355-1.469.532-2.379.532-.91 0-1.703-.177-2.378-.532a3.972 3.972 0 0 1-1.575-1.467c-.37-.623-.555-1.331-.555-2.124v-7.68h1.405v7.567c0 .566.124 1.07.373 1.512.25.438.605.783 1.065 1.036.465.25 1.02.374 1.665.374.646 0 1.201-.124 1.665-.374.465-.253.82-.598 1.065-1.036.249-.442.374-.946.374-1.512v-7.567Zm10.51 4.848-1.201.34a2.238 2.238 0 0 0-.334-.583 1.618 1.618 0 0 0-.589-.476c-.25-.125-.569-.187-.958-.187-.532 0-.976.123-1.331.368-.351.242-.526.549-.526.923 0 .333.121.595.362.788.242.192.619.353 1.133.481l1.291.317c.778.189 1.358.478 1.739.867.381.385.572.881.572 1.489 0 .499-.143.944-.43 1.337-.284.393-.68.702-1.19.929-.509.226-1.102.34-1.778.34-.887 0-1.622-.193-2.203-.578-.582-.385-.95-.948-1.105-1.688l1.269-.317c.121.468.349.819.685 1.053.34.234.784.352 1.331.352.623 0 1.118-.133 1.484-.397.37-.268.555-.589.555-.963 0-.302-.106-.555-.317-.759-.211-.207-.536-.362-.974-.464l-1.45-.34c-.797-.189-1.382-.481-1.756-.878-.37-.4-.555-.9-.555-1.501 0-.491.138-.925.414-1.302a2.812 2.812 0 0 1 1.138-.89c.483-.215 1.031-.322 1.642-.322.861 0 1.537.188 2.028.566.495.378.846.876 1.054 1.495Z"})]})]})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",d:"M0 0h384v216H0z"})}),e.jsx("clipPath",{id:"c",children:e.jsx("path",{fill:"#fff",d:"M32 44c0-6.627 5.373-12 12-12h1588v46.667H32V44Z"})}),e.jsx("clipPath",{id:"d",children:e.jsx("path",{fill:"#fff",d:"M128.667 40.889h280v37.778h-280z"})}),e.jsx("clipPath",{id:"e",children:e.jsx("path",{fill:"#fff",d:"M32 119.778h1600v800H32z"})}),e.jsxs("filter",{id:"b",width:"1706.67",height:"994.444",x:"-21.333",y:"-3.556",colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_53_37"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_53_37",result:"shape"})]})]})]})};zn.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Mn=function(_){return e.jsxs("svg",{..._,children:[e.jsxs("g",{clipPath:"url(#a)",children:[e.jsx("path",{fill:"#1E4DCF",style:{fill:"color(display-p3 .1176 .302 .8118)",fillOpacity:"1"},d:"M0 0h384v216H0z"}),e.jsxs("g",{filter:"url(#b)",children:[e.jsx("path",{d:"M32 44c0-6.627 5.373-12 12-12h760v184H32V44Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},shapeRendering:"crispEdges"}),e.jsx("path",{d:"M76.565 126H32v90h772V43H159.565c-11.017 0-16.525 0-20.822 1.928a22 22 0 0 0-11.065 11.065c-1.928 4.297-1.928 9.806-1.928 20.822 0 16.024 0 24.035-2.805 30.286a31.997 31.997 0 0 1-16.094 16.094C100.6 126 92.589 126 76.565 126Z",fill:"#F1F3F4",style:{fill:"color(display-p3 .9451 .9529 .9569)",fillOpacity:"1"}}),e.jsx("path",{d:"M206.571 72.046h2.991l4.56 7.934h.188l4.559-7.934h2.992l-6.333 10.602V89.5h-2.625v-6.852l-6.332-10.602Zm20.93 17.718c-1.228 0-2.299-.281-3.213-.843-.915-.563-1.625-1.35-2.131-2.361-.506-1.012-.759-2.194-.759-3.546 0-1.358.253-2.545.759-3.562s1.216-1.807 2.131-2.37c.914-.562 1.985-.843 3.213-.843 1.227 0 2.298.28 3.213.843s1.625 1.353 2.13 2.37c.506 1.017.759 2.204.759 3.562 0 1.353-.253 2.534-.759 3.546-.505 1.011-1.215 1.798-2.13 2.36-.915.563-1.986.844-3.213.844Zm.008-2.139c.796 0 1.455-.21 1.978-.63.522-.421.909-.98 1.159-1.68.255-.698.383-1.468.383-2.31 0-.834-.128-1.602-.383-2.3-.25-.705-.637-1.27-1.159-1.697-.523-.426-1.182-.639-1.978-.639-.801 0-1.466.213-1.994.64-.523.426-.912.991-1.168 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.256.698.645 1.258 1.168 1.678.528.42 1.193.631 1.994.631Zm17.231-3.554v-7.662h2.557V89.5h-2.506v-2.267h-.136c-.301.699-.784 1.281-1.449 1.747-.659.46-1.48.69-2.463.69-.841 0-1.585-.184-2.233-.553-.642-.376-1.148-.93-1.517-1.663-.364-.732-.546-1.639-.546-2.718v-8.327h2.549v8.02c0 .892.247 1.602.741 2.13.495.53 1.137.793 1.926.793.478 0 .952-.119 1.424-.358.477-.238.872-.6 1.184-1.082.318-.483.475-1.097.469-1.841Zm5.981 5.429V76.41h2.463v2.079h.136a3.164 3.164 0 0 1 1.262-1.662 3.608 3.608 0 0 1 2.062-.614 10.87 10.87 0 0 1 1.083.06v2.437a4.633 4.633 0 0 0-.546-.093 5.2 5.2 0 0 0-.784-.06c-.602 0-1.139.128-1.611.383a2.851 2.851 0 0 0-1.517 2.566V89.5h-2.548Zm25.287-12.87c-.091-.806-.466-1.431-1.125-1.874-.659-.45-1.489-.674-2.489-.674-.716 0-1.335.114-1.858.341-.523.222-.929.529-1.219.92a2.173 2.173 0 0 0-.426 1.322c0 .414.097.772.29 1.074.199.3.457.554.776.758.324.199.67.367 1.039.503.37.13.725.239 1.066.324l1.704.443c.557.136 1.128.321 1.713.554.586.233 1.128.54 1.628.92.5.381.904.853 1.21 1.415.313.563.469 1.236.469 2.02 0 .989-.255 1.867-.767 2.634-.506.767-1.241 1.372-2.207 1.815-.96.443-2.122.665-3.486.665-1.307 0-2.438-.208-3.392-.622-.955-.415-1.702-1.003-2.242-1.765-.539-.767-.838-1.676-.894-2.727h2.642c.051.63.255 1.156.613 1.577a3.32 3.32 0 0 0 1.389.929 5.622 5.622 0 0 0 1.867.298c.744 0 1.406-.116 1.986-.35.585-.238 1.045-.567 1.38-.988.336-.426.503-.923.503-1.491 0-.517-.147-.94-.443-1.27-.29-.33-.685-.603-1.185-.819a11.558 11.558 0 0 0-1.679-.57l-2.062-.563c-1.398-.38-2.506-.94-3.324-1.679-.812-.739-1.219-1.716-1.219-2.932 0-1.005.273-1.883.819-2.633.545-.75 1.284-1.333 2.215-1.748.932-.42 1.983-.63 3.154-.63 1.182 0 2.224.207 3.128.622.909.415 1.625.986 2.147 1.713.523.722.796 1.551.819 2.489h-2.54Zm5.721 12.87V76.41h2.548V89.5h-2.548Zm1.287-15.11c-.444 0-.824-.148-1.142-.444a1.44 1.44 0 0 1-.469-1.074c0-.42.156-.778.469-1.074a1.602 1.602 0 0 1 1.142-.451c.443 0 .821.15 1.133.451.318.296.477.654.477 1.074 0 .415-.159.773-.477 1.074-.312.296-.69.443-1.133.443Zm10.8 2.02v2.044h-7.151V76.41h7.151Zm-5.233-3.137h2.548v12.383c0 .495.074.867.222 1.117.148.244.338.412.571.503.239.085.497.127.776.127.204 0 .383-.014.537-.042l.357-.068.461 2.105a4.29 4.29 0 0 1-.631.17 4.998 4.998 0 0 1-1.023.103 4.49 4.49 0 0 1-1.875-.359 3.22 3.22 0 0 1-1.406-1.159c-.358-.522-.537-1.179-.537-1.968V73.273Zm13.553 16.491c-1.289 0-2.4-.275-3.332-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.21-1.82 2.114-2.395.909-.573 1.971-.86 3.187-.86.739 0 1.455.122 2.148.366a5.213 5.213 0 0 1 1.867 1.15c.551.523.985 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.137-1.264-.409-1.78a3.098 3.098 0 0 0-1.151-1.236c-.489-.302-1.062-.452-1.722-.452-.715 0-1.34.176-1.875.528a3.55 3.55 0 0 0-1.227 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.153 1.619.46 2.233.313.613.747 1.082 1.304 1.406.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.85 2.85 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.745.29-1.594.434-2.549.434Zm29.088-17.718V89.5h-2.42l-8.872-12.801h-.162V89.5h-2.634V72.046h2.438l8.881 12.818h.161V72.045h2.608Zm7.447 17.744c-.829 0-1.579-.154-2.25-.46a3.793 3.793 0 0 1-1.594-1.356c-.386-.59-.579-1.315-.579-2.173 0-.739.142-1.347.426-1.824a3.145 3.145 0 0 1 1.151-1.133 5.998 5.998 0 0 1 1.619-.63c.596-.143 1.204-.25 1.824-.325l1.909-.221c.488-.063.844-.162 1.065-.299.222-.136.333-.358.333-.665v-.06c0-.743-.211-1.32-.631-1.73-.415-.408-1.034-.613-1.858-.613-.858 0-1.534.19-2.028.571-.489.375-.827.793-1.015 1.253l-2.395-.546c.285-.795.699-1.437 1.245-1.926a5.043 5.043 0 0 1 1.9-1.074 7.424 7.424 0 0 1 2.259-.34c.523 0 1.077.062 1.662.187a4.86 4.86 0 0 1 1.653.665c.517.324.941.787 1.27 1.39.33.596.494 1.371.494 2.326V89.5h-2.488v-1.79h-.103c-.164.33-.411.654-.741.972-.33.318-.753.582-1.27.792-.517.21-1.136.316-1.858.316Zm.554-2.046c.705 0 1.307-.139 1.807-.417.506-.279.889-.642 1.151-1.091.267-.455.4-.94.4-1.458v-1.687c-.091.09-.267.176-.528.256-.256.074-.549.139-.878.196-.33.05-.651.099-.963.144-.313.04-.574.074-.784.103a6.307 6.307 0 0 0-1.355.315c-.404.148-.728.36-.972.64-.239.272-.358.636-.358 1.09 0 .63.233 1.108.699 1.432.466.318 1.06.477 1.781.477Zm9.301 1.756V76.41h2.446v2.13h.162a3.374 3.374 0 0 1 1.338-1.688c.619-.409 1.36-.613 2.224-.613.875 0 1.608.204 2.199.613.596.41 1.037.972 1.321 1.688h.136a3.687 3.687 0 0 1 1.492-1.67c.682-.421 1.494-.631 2.437-.631 1.188 0 2.157.372 2.907 1.116.755.744 1.133 1.867 1.133 3.367V89.5h-2.548v-8.54c0-.886-.242-1.528-.725-1.926-.483-.398-1.059-.597-1.73-.597-.829 0-1.474.256-1.934.767-.461.506-.691 1.157-.691 1.952V89.5h-2.54v-8.702c0-.71-.221-1.281-.664-1.713-.444-.432-1.02-.647-1.73-.647-.483 0-.929.127-1.339.383-.403.25-.73.6-.98 1.048-.244.45-.366.97-.366 1.56V89.5h-2.548Zm26.853.264c-1.29 0-2.401-.275-3.333-.826-.926-.557-1.642-1.339-2.148-2.344-.5-1.012-.75-2.196-.75-3.554 0-1.341.25-2.523.75-3.546.506-1.022 1.211-1.82 2.114-2.395.909-.573 1.972-.86 3.188-.86.738 0 1.454.122 2.147.366a5.205 5.205 0 0 1 1.867 1.15c.551.523.986 1.202 1.304 2.038.318.83.477 1.838.477 3.025v.904h-10.406v-1.91h7.909c0-.67-.136-1.264-.409-1.78a3.091 3.091 0 0 0-1.151-1.236c-.488-.302-1.062-.452-1.721-.452-.716 0-1.341.176-1.875.528a3.545 3.545 0 0 0-1.228 1.364 3.937 3.937 0 0 0-.426 1.815v1.492c0 .875.154 1.619.46 2.233a3.336 3.336 0 0 0 1.304 1.406c.557.318 1.208.477 1.952.477.483 0 .923-.068 1.321-.205a2.842 2.842 0 0 0 1.031-.63c.29-.278.512-.622.665-1.031l2.412.434a4.367 4.367 0 0 1-1.04 1.867c-.494.528-1.116.94-1.866 1.236-.744.29-1.594.434-2.548.434ZM85 161.333H62.477l7.574-7.46-2.393-2.366L56 163.007l11.658 11.5 2.393-2.367-7.575-7.459H85v-3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{opacity:".4",d:"M106 164.681h22.524l-7.575 7.46 2.393 2.366 11.658-11.5-11.658-11.5-2.393 2.366 7.575 7.46H106v3.348Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"m181.89 164.538-3.225-.385a9.734 9.734 0 0 1-8.859 8.543 9.74 9.74 0 0 1-5.382-18.303 9.738 9.738 0 0 1 12.074 2.387h-4.055v3.25h9.664v-9.664h-3.249v4.187a12.842 12.842 0 0 0-6.064-3.985 12.995 12.995 0 0 0-13.833 4.172 12.994 12.994 0 0 0-1.431 14.376 13.2 13.2 0 0 0 2.286 3.106 12.987 12.987 0 0 0 13.436 3.071 12.992 12.992 0 0 0 8.638-10.74v-.015Z",fill:"#242527",style:{fill:"color(display-p3 .1412 .1451 .1529)",fillOpacity:"1"}}),e.jsx("path",{d:"M208 161.7c0-12.321 0-18.482 2.398-23.188a22.002 22.002 0 0 1 9.614-9.614c4.706-2.398 10.867-2.398 23.188-2.398H804v73H243.2c-12.321 0-18.482 0-23.188-2.398a22.002 22.002 0 0 1-9.614-9.614C208 182.782 208 176.621 208 164.3v-2.6Z",fill:"#fff",style:{fill:"#fff",fillOpacity:"1"}})]}),e.jsx("rect",{x:"229",y:"145",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}}),e.jsx("rect",{x:"203",y:"66",width:"180",height:"36",rx:"8",fill:"#DFE1E5",style:{fill:"color(display-p3 .8745 .8824 .898)",fillOpacity:"1"}})]}),e.jsxs("defs",{children:[e.jsx("clipPath",{id:"a",children:e.jsx("path",{fill:"#fff",style:{fill:"#fff",fillOpacity:"1"},d:"M0 0h384v216H0z"})}),e.jsxs("filter",{id:"b",x:"-21.333",y:"-3.556",width:"878.667",height:"290.667",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"17.778"}),e.jsx("feGaussianBlur",{stdDeviation:"26.667"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_13_53"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_13_53",result:"shape"})]})]})]})};Mn.defaultProps={width:"384",height:"216",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const pi=Object.keys(X.SUPPORTED_LANGUAGES).map(k=>({code:k,name:X.SUPPORTED_LANGUAGES[k].nativeName,enName:X.SUPPORTED_LANGUAGES[k].name})),gi=["name","enName","code"];function Ft({blocklet:k,onUpdate:_=()=>{},hasPermission:A=!1,showFields:R=[],...j}){const{api:y,prefix:x,getSessionInHeader:o}=se(),{t:p}=z.useContext(fe),[f,u]=Nt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),t=f.loading||!A,{logoUrl:a,logoDarkUrl:r,rectLogoUrl:n,rectLogoDarkUrl:s,faviconUrl:c,splashPortraitUrl:i,splashLandscapeUrl:l,ogImageUrl:d}=qs({blocklet:k});if(Bt(k.status))return null;const h=k.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES),g=k.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),w=k.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER),S=k.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR),m=[{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,title:p("blocklet.config.name"),description:p("blocklet.config.nameDesc"),value:k.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,title:p("blocklet.config.description"),description:p("blocklet.config.descriptionDesc"),value:k.environments.find(b=>b.key==="BLOCKLET_APP_DESCRIPTION").value},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,title:p("blocklet.config.appUrl"),description:p("blocklet.config.appUrlDesc"),value:g?g.value:""},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,title:p("blocklet.config.copyrightOwner"),description:p("blocklet.config.copyrightDesc"),value:w?w.value:""},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,title:p("blocklet.config.copyrightYear"),description:p("blocklet.config.copyrightDesc"),value:S?S.value:""}],v=async(b,C)=>{const P=[{key:b,value:C}];try{u({loading:!0});const{blocklet:$}=await y.configBlocklet({input:{did:k.meta.did,configs:P}});_($)}catch($){Z.error($.message)}finally{u({loading:!1})}};return e.jsxs(bi,{...j,children:[(!R.length||R.includes("base-info-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(O,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:p("blocklet.config.baseInfo")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:p("blocklet.config.baseInfoDesc")})]}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),(R.length?m.filter(b=>R.includes(b.key)):m).map(b=>e.jsxs(e.Fragment,{children:[e.jsx(B,{title:b.title,desc:b.description,children:e.jsx($t,{style:{marginTop:0},disabled:t,loading:f.loading,initialValue:kr.escapeTag(b.value),placeholder:b.title,onSubmit:C=>v(b.key,C),validate:b.validate})},b.key),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]})),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES))&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:p("blocklet.config.languages"),desc:p("blocklet.config.languagesDesc"),children:e.jsx(In,{style:{marginTop:0},disabled:t,loading:f.loading,options:pi,noEmpty:!0,initialValue:h?h.value.split(","):["en","zh"],onSubmit:b=>v("BLOCKLET_APP_LANGUAGES",b),helperText:p("blocklet.config.selectLanguagesTip"),placeholder:p("blocklet.config.languagesSearch"),filterKeys:gi,renderLabel:(b,C)=>C.name===C.enName?`${C.name} (${b.toUpperCase()})`:`${C.name}, ${C.enName} (${b.toUpperCase()})`})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),(!R.length||R.includes("logo-settings-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(O,{sx:{mt:6},children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:p("blocklet.config.logoSettings")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:p("blocklet.config.logoSettingsDesc")}),e.jsx(J,{variant:"body2",sx:{color:"warning.main"},children:p("blocklet.config.changeImageTip")})]}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),e.jsxs(ji,{children:[(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO))&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:p("blocklet.config.logoSquare"),desc:`${p("blocklet.config.logoSquareDesc")}
|
|
9
|
+
${p("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,link:"https://www.didwallet.io/",children:e.jsxs(O,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(O,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:p("common.lightMode")}),e.jsx(O,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(It,{name:k.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value,icon:a,did:k.meta.did})}),e.jsx(Re,{did:k.meta.did,width:80,type:"square",prefix:x,url:a,enabled:A,headers:o,aspectRatio:1,children:e.jsx(ie,{variant:"outlined",color:"primary",children:p("common.upload")})})]}),e.jsxs(O,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:p("common.darkMode")}),e.jsx(O,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(It,{dark:!0,name:k.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value,icon:r,did:k.meta.did})}),e.jsx(Re,{did:k.meta.did,width:80,type:"square-dark",prefix:x,url:r,enabled:A,headers:o,aspectRatio:1,children:e.jsx(ie,{variant:"outlined",color:"primary",children:p("common.upload")})})]})]})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:p("blocklet.config.logoRect"),desc:`${p("blocklet.config.logoRectDesc")}`,children:e.jsxs(O,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(O,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:p("common.lightMode")}),e.jsxs(O,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[n?e.jsx(Ln,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(qn,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),n&&e.jsx(O,{component:"img",src:n,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(Re,{did:k.meta.did,width:80,height:"auto",type:"rect",prefix:x,url:n,enabled:A,headers:o,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(ie,{variant:"outlined",children:p("common.upload")})})]}),e.jsxs(O,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:p("common.darkMode")}),e.jsxs(O,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[s?e.jsx(Dn,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(zn,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),s&&e.jsx(O,{component:"img",src:s,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(Re,{did:k.meta.did,width:80,height:"auto",type:"rect-dark",prefix:x,url:s,enabled:A,headers:o,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(ie,{variant:"outlined",children:p("common.upload")})})]})]})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:p("blocklet.config.logoFavicon"),desc:`${p("blocklet.config.logoFaviconDesc")}
|
|
10
|
+
${p("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.jsxs(O,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsxs(O,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[e.jsx(Mn,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),c&&e.jsx(O,{component:"img",src:c,alt:"app-logo",sx:{position:"absolute",top:45,left:115,width:44,height:44,borderRadius:"12px"}})]}),e.jsx(Re,{did:k.meta.did,width:80,type:"favicon",prefix:x,url:c,enabled:A,headers:o,aspectRatio:1,children:e.jsx(ie,{variant:"outlined",children:p("common.upload")})})]})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:p("blocklet.config.splashPortrait"),desc:p("blocklet.config.splashDesc"),link:"https://www.arcsphere.io/",children:e.jsxs(O,{sx:{display:"flex",gap:3,alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0},flexWrap:"wrap"},children:[e.jsx(Re,{did:k.meta.did,height:400,width:225,type:"splash-portrait",prefix:x,url:i,enabled:A,headers:o,aspectRatio:9/16,minWidth:900,minHeight:1e3,allowSVG:!1}),e.jsx(O,{sx:{width:"100%",maxWidth:400,aspectRatio:"16 / 9",position:"relative"},children:e.jsx(Re,{did:k.meta.did,height:"100%",width:"100%",type:"splash-landscape",prefix:x,url:l,enabled:A,headers:o,aspectRatio:16/9,minWidth:1600,minHeight:900,allowSVG:!1})})]})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))&&e.jsx(B,{title:p("blocklet.config.ogImage"),desc:p("blocklet.config.ogImageDesc"),children:e.jsx(O,{sx:{width:"100%",maxWidth:400,aspectRatio:"40 / 21",position:"relative",alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0}},children:e.jsx(Re,{did:k.meta.did,height:"100%",width:"100%",type:"og-image",prefix:x,url:d,enabled:A,headers:o,aspectRatio:40/21,minWidth:1200,minHeight:630,allowSVG:!1})})})]})]})}const xi=Be(Ft,"mutate_blocklets"),yi=Be(Ft,"",Mt);function vi(k){const{inService:_}=se();return _?e.jsx(yi,{...k}):e.jsx(xi,{...k})}Ft.propTypes={blocklet:E.object.isRequired,onUpdate:E.func,hasPermission:E.bool,showFields:E.array};const bi=je(O)`
|
|
11
11
|
max-width: 1536px;
|
|
12
12
|
|
|
13
13
|
.config-form {
|
|
@@ -41,13 +41,13 @@ ${p("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
41
41
|
.form-item {
|
|
42
42
|
margin-top: 0;
|
|
43
43
|
}
|
|
44
|
-
`,ji=je(re)``,_i=localStorage.getItem("enableDebug")==="true";function
|
|
44
|
+
`,ji=je(re)``,_i=localStorage.getItem("enableDebug")==="true";function Bn({onChange:k=()=>{},disabled:_=!1,loading:A=!1,inService:R=!1}){const{t:j}=ee(),{api:y,session:x}=hn(),{blocklet:o}=le(),[p,f]=zs({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),u=()=>f({isConnectOpen:!1}),t=()=>{if(fn.isInProgress(o.status)){Z.error(j("blocklet.error.isInProgress"));return}f({confirmDialogOpen:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(B,{title:j("blocklet.config.migrate.button"),desc:j("blocklet.config.migrate.description"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(ie,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:_||A,onClick:t,children:[e.jsx(ti,{style:{fontSize:"1.3em",marginRight:4}}),j("blocklet.config.migrate.button")]})})}),e.jsxs(e.Fragment,{children:[p.isConnectOpen&&e.jsx(mn,{popup:!0,open:p.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:y.get,checkTimeout:5*60*1e3,onSuccess:()=>{k(),R&&x.logout(),u()},extraParams:{appDid:o.appDid},messages:{title:j("setup.keyPair.title"),scan:j("setup.keyPair.scan"),confirm:j("setup.keyPair.confirm"),success:j("setup.keyPair.success")},onClose:u}),p.confirmDialogOpen&&e.jsx(Ms,{title:e.jsx(J,{sx:{fontSize:"20px",fontWeight:"500"},children:j("blocklet.config.migrate.title")}),description:e.jsx(J,{sx:{fontSize:"14px",color:"#9397A1"},children:j("blocklet.config.migrate.confirm")}),confirm:j("common.confirm"),cancel:j("common.cancel"),onConfirm:()=>f({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>f({confirmDialogOpen:!1})})]})]})}Bn.propTypes={onChange:E.func,disabled:E.bool,loading:E.bool,inService:E.bool};function Hn({onCancel:k,onSuccess:_,onError:A=()=>{}}){const{api:R}=z.useContext(Bs),[j,y]=z.useState(!1),{t:x,locale:o}=ee(),[p,f]=z.useState(""),[u,t]=z.useState(!1),[a,r]=z.useState(0),[n,s]=z.useState(""),{endpoint:c}=it(),[i,l]=z.useState(!1),d=m=>{f(null),y(!0);try{s(m.result),r(w.length-1)}catch(v){const b=St(v);f(b),A(v)}finally{y(!1)}},h=()=>{t(!0),r(1)},g=()=>{t(!1),r(0)},w=[{body:e.jsxs(O,{children:[e.jsx(J,{children:x("team.transferApp.transferDialog.tips.progress")}),e.jsx(J,{sx:{mt:3,mb:2},children:x("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:x("common.cancel"),confirm:x("team.transferApp.transferDialog.createTransferLink"),onCancel:k,onConfirm:h},{cancel:x("common.cancel"),confirm:x("team.transferApp.transferDialog.createTransferLink"),body:()=>e.jsx(mn,{action:"transfer-app-owner",open:u,locale:o,checkFn:R.get,onClose:g,onSuccess:d,checkTimeout:5*60*1e3,extraParams:{},messages:{title:x("team.transferApp.connectDialog.title"),scan:x("team.transferApp.connectDialog.scan"),confirm:x("team.transferApp.connectDialog.confirm"),success:x("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const m=Hs({transferId:n.transferId,endpoint:c});return e.jsxs(e.Fragment,{children:[e.jsx(O,{component:Le,dangerouslySetInnerHTML:{__html:x("team.transferApp.transferDialog.createSuccessTip1")}}),e.jsx(O,{component:Le,sx:{mt:2},children:e.jsx(Le,{children:x("team.transferApp.transferDialog.createSuccessTip3")})}),e.jsxs(O,{children:[e.jsx(O,{component:Le,sx:{mt:2},children:e.jsx(Le,{children:x("team.transferApp.transferDialog.createSuccessTip2",{expireDate:Ns(n.expireDate,o)})})}),e.jsx(O,{sx:{my:1},children:e.jsx(Cn,{children:m})})]}),e.jsx("div",{children:e.jsx(oe,{value:"end",control:e.jsx(qe,{checked:i,onChange:v=>l(v.target.checked)}),label:x("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:x("common.confirm"),onConfirm:_}],S=w[a];return e.jsxs(Se,{title:e.jsx(Le,{className:"title",children:x("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[S.cancel&&e.jsx(Q,{onClick:S.onCancel,color:"inherit",children:S.cancel}),e.jsxs(Q,{onClick:S.onConfirm,color:"error",disabled:j||a===w.length-1&&!i,variant:"contained",autoFocus:!0,children:[j&&e.jsx(Me,{size:16}),S.confirm]})]}),children:[e.jsx(Fs,{component:"div",children:typeof S.body=="function"?S.body():S.body}),!!p&&e.jsx(Ws,{severity:"error",variant:"icon",children:p})]})}Hn.propTypes={onCancel:E.func.isRequired,onSuccess:E.func.isRequired,onError:E.func};const Le=je.div`
|
|
45
45
|
font-size: 16px;
|
|
46
46
|
font-weight: bold;
|
|
47
47
|
&.title {
|
|
48
48
|
font-size: 20px;
|
|
49
49
|
}
|
|
50
|
-
`;function wi(k){return{type:"BN",base:k.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(_,A){try{return{value:new Ee(_)}}catch{return{errors:A.error("bn.nan")}}},coerce(_){return{value:_.toString(10)}},validate(_){return{value:_}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:_=>Ee.isBN(_),message:"must be a big number",normalize:_=>new Ee(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,A,R){const j=new Ee(_);return R.equal&&j.lt(R.threshold)?A.error("bn.min",R):!R.equal&&j.lte(R.threshold)?A.error("bn.greater",R):_}},lt:{args:[{name:"threshold",ref:!0,assert:_=>Ee.isBN(_),message:"must be a big number",normalize:_=>new Ee(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,A,R){const j=new Ee(_);return R.equal&&j.gt(R.threshold)?A.error("bn.max",R):!R.equal&&j.gte(R.threshold)?A.error("bn.less",R):_}},min:{alias:"gte",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!0}})}},max:{alias:"lte",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!0}})}},greater:{alias:"gt",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!1}})}},less:{alias:"lt",method(_){return this.$_addRule({name:"lt",args:{threshold:_,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 Ye={pk:Object.keys(dt.KeyType),hash:Object.keys(dt.HashType),role:Object.keys(dt.RoleType)};function ki(k){return{type:"DID",base:k.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(_,A){return!_||typeof _!="string"?{errors:A.error("did.empty",{value:_})}:tt(_)===!1?{errors:A.error("did.invalid",{value:_})}:{value:_}},rules:{type:{args:[{name:"key",ref:!0,assert:_=>Object.keys(Ye).includes(_),message:`must be one of ${Object.keys(Ye).join(", ")}`},{name:"expected",assert:_=>Object.keys(Ye).some(A=>Ye[A].includes(_)),message:"must be valid type"}],validate(_,A,R){const j=Ct(_);return R.key==="pk"&&j.pk!==R.expected?A.error("did.pk",{...R,actual:j.pk}):R.key==="hash"&&j.hash!==R.expected?A.error("did.hash",{...R,actual:j.hash}):R.key==="role"&&j.role!==R.expected?A.error("did.role",{...R,actual:j.role}):_}},pk:{method(_){return this.$_addRule({name:"type",args:{key:"pk",expected:_}})}},hash:{method(_){return this.$_addRule({name:"type",args:{key:"hash",expected:_}})}},role:{method(_){return this.$_addRule({name:"type",args:{key:"role",expected:_}})}},wallet:{method(_){return this.$_addRule({name:"wallet",args:{type:_}})},args:[{name:"type",ref:!0,assert:_=>["arcblock","ethereum","default","eth","passkey"].includes(_),message:"must be a string",normalize:_=>_.trim()}],validate(_,A,R={}){const j=Ws(_),y=Ct(_);return["ethereum","eth"].includes(R.type)&&Ze(j,Zs)===!1?A.error("did.wallet",{expected:R.type,actual:JSON.stringify(y)}):["arcblock","default"].includes(R.type)&&Ze(j,Vs)===!1?A.error("did.wallet",{expected:R.type,actual:JSON.stringify(y)}):["passkey"].includes(R.type)&&Ze(j,Us)===!1?A.error("did.wallet",{expected:R.type,actual:JSON.stringify(y)}):_}},prefix:{method(_=""){return this.$_addRule({name:"prefix",args:{str:_}})},args:[{name:"str",ref:!0,assert:_=>["",Fs].includes(_),message:"must be a string",normalize:_=>_.trim()}],validate(_,A,R={}){return R.str&&_.startsWith(R.str)===!1?A.error("did.prefix",{expected:R.str}):!R.str&&Fe(_)!==_?A.error("did.prefix",{expected:R.str}):_}}}}}var mt={exports:{}},en;function Si(){return en||(en=1,function(k,_){(function(A,R){k.exports=R()})(self,()=>{return A={7629:(j,y,x)=>{const o=x(375),p=x(8571),f=x(9474),u=x(1687),t=x(8652),a=x(8160),r=x(3292),n=x(6354),s=x(8901),c=x(9708),i=x(6914),l=x(2294),d=x(6133),h=x(1152),g=x(8863),w=x(2036),S={Base:class{constructor(m){this.type=m,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new l.Ids,this._preferences=null,this._refs=new d.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return o(typeof c.describe=="function","Manifest functionality disabled"),c.describe(this)}allow(...m){return a.verifyFlat(m,"allow"),this._values(m,"_valids")}alter(m){o(m&&typeof m=="object"&&!Array.isArray(m),"Invalid targets argument"),o(!this._inRuleset(),"Cannot set alterations inside a ruleset");const v=this.clone();v.$_terms.alterations=v.$_terms.alterations||[];for(const b in m){const C=m[b];o(typeof C=="function","Alteration adjuster for",b,"must be a function"),v.$_terms.alterations.push({target:b,adjuster:C})}return v.$_temp.ruleset=!1,v}artifact(m){return o(m!==void 0,"Artifact cannot be undefined"),o(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",m)}cast(m){return o(m===!1||typeof m=="string","Invalid to value"),o(m===!1||this._definition.cast[m],"Type",this.type,"does not support casting to",m),this.$_setFlag("cast",m===!1?void 0:m)}default(m,v){return this._default("default",m,v)}description(m){return o(m&&typeof m=="string","Description must be a non-empty string"),this.$_setFlag("description",m)}empty(m){const v=this.clone();return m!==void 0&&(m=v.$_compile(m,{override:!1})),v.$_setFlag("empty",m,{clone:!1})}error(m){return o(m,"Missing error"),o(m instanceof Error||typeof m=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",m)}example(m,v={}){return o(m!==void 0,"Missing example"),a.assertOptions(v,["override"]),this._inner("examples",m,{single:!0,override:v.override})}external(m,v){return typeof m=="object"&&(o(!v,"Cannot combine options with description"),v=m.description,m=m.method),o(typeof m=="function","Method must be a function"),o(v===void 0||v&&typeof v=="string","Description must be a non-empty string"),this._inner("externals",{method:m,description:v},{single:!0})}failover(m,v){return this._default("failover",m,v)}forbidden(){return this.presence("forbidden")}id(m){return m?(o(typeof m=="string","id must be a non-empty string"),o(/^[^\.]+$/.test(m),"id cannot contain period character"),this.$_setFlag("id",m)):this.$_setFlag("id",void 0)}invalid(...m){return this._values(m,"_invalids")}label(m){return o(m&&typeof m=="string","Label name must be a non-empty string"),this.$_setFlag("label",m)}meta(m){return o(m!==void 0,"Meta cannot be undefined"),this._inner("metas",m,{single:!0})}note(...m){o(m.length,"Missing notes");for(const v of m)o(v&&typeof v=="string","Notes must be non-empty strings");return this._inner("notes",m)}only(m=!0){return o(typeof m=="boolean","Invalid mode:",m),this.$_setFlag("only",m)}optional(){return this.presence("optional")}prefs(m){o(m,"Missing preferences"),o(m.context===void 0,"Cannot override context"),o(m.externals===void 0,"Cannot override externals"),o(m.warnings===void 0,"Cannot override warnings"),o(m.debug===void 0,"Cannot override debug"),a.checkPreferences(m);const v=this.clone();return v._preferences=a.preferences(v._preferences,m),v}presence(m){return o(["optional","required","forbidden"].includes(m),"Unknown presence mode",m),this.$_setFlag("presence",m)}raw(m=!0){return this.$_setFlag("result",m?"raw":void 0)}result(m){return o(["raw","strip"].includes(m),"Unknown result mode",m),this.$_setFlag("result",m)}required(){return this.presence("required")}strict(m){const v=this.clone(),b=m!==void 0&&!m;return v._preferences=a.preferences(v._preferences,{convert:b}),v}strip(m=!0){return this.$_setFlag("result",m?"strip":void 0)}tag(...m){o(m.length,"Missing tags");for(const v of m)o(v&&typeof v=="string","Tags must be non-empty strings");return this._inner("tags",m)}unit(m){return o(m&&typeof m=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",m)}valid(...m){a.verifyFlat(m,"valid");const v=this.allow(...m);return v.$_setFlag("only",!!v._valids,{clone:!1}),v}when(m,v){const b=this.clone();b.$_terms.whens||(b.$_terms.whens=[]);const C=r.when(b,m,v);if(!["any","link"].includes(b.type)){const P=C.is?[C]:C.switch;for(const $ of P)o(!$.then||$.then.type==="any"||$.then.type===b.type,"Cannot combine",b.type,"with",$.then&&$.then.type),o(!$.otherwise||$.otherwise.type==="any"||$.otherwise.type===b.type,"Cannot combine",b.type,"with",$.otherwise&&$.otherwise.type)}return b.$_terms.whens.push(C),b.$_mutateRebuild()}cache(m){o(!this._inRuleset(),"Cannot set caching inside a ruleset"),o(!this._cache,"Cannot override schema cache"),o(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const v=this.clone();return v._cache=m||t.provider.provision(),v.$_temp.ruleset=!1,v}clone(){const m=Object.create(Object.getPrototypeOf(this));return this._assign(m)}concat(m){o(a.isSchema(m),"Invalid schema object"),o(this.type==="any"||m.type==="any"||m.type===this.type,"Cannot merge type",this.type,"with another type:",m.type),o(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),o(!m._inRuleset(),"Cannot concatenate a schema with open ruleset");let v=this.clone();if(this.type==="any"&&m.type!=="any"){const b=m.clone();for(const C of Object.keys(v))C!=="type"&&(b[C]=v[C]);v=b}v._ids.concat(m._ids),v._refs.register(m,d.toSibling),v._preferences=v._preferences?a.preferences(v._preferences,m._preferences):m._preferences,v._valids=w.merge(v._valids,m._valids,m._invalids),v._invalids=w.merge(v._invalids,m._invalids,m._valids);for(const b of m._singleRules.keys())v._singleRules.has(b)&&(v._rules=v._rules.filter(C=>C.keep||C.name!==b),v._singleRules.delete(b));for(const b of m._rules)m._definition.rules[b.method].multi||v._singleRules.set(b.name,b),v._rules.push(b);if(v._flags.empty&&m._flags.empty){v._flags.empty=v._flags.empty.concat(m._flags.empty);const b=Object.assign({},m._flags);delete b.empty,u(v._flags,b)}else if(m._flags.empty){v._flags.empty=m._flags.empty;const b=Object.assign({},m._flags);delete b.empty,u(v._flags,b)}else u(v._flags,m._flags);for(const b in m.$_terms){const C=m.$_terms[b];C?v.$_terms[b]?v.$_terms[b]=v.$_terms[b].concat(C):v.$_terms[b]=C.slice():v.$_terms[b]||(v.$_terms[b]=C)}return this.$_root._tracer&&this.$_root._tracer._combine(v,[this,m]),v.$_mutateRebuild()}extend(m){return o(!m.base,"Cannot extend type with another base"),s.type(this,m)}extract(m){return m=Array.isArray(m)?m:m.split("."),this._ids.reach(m)}fork(m,v){o(!this._inRuleset(),"Cannot fork inside a ruleset");let b=this;for(let C of[].concat(m))C=Array.isArray(C)?C:C.split("."),b=b._ids.fork(C,v,b);return b.$_temp.ruleset=!1,b}rule(m){const v=this._definition;a.assertOptions(m,Object.keys(v.modifiers)),o(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;o(b>=0&&b<this._rules.length,"Cannot apply rules to empty ruleset");const C=this.clone();for(let P=b;P<C._rules.length;++P){const $=C._rules[P],D=p($);for(const M in m)v.modifiers[M](D,m[M]),o(D.name===$.name,"Cannot change rule name");C._rules[P]=D,C._singleRules.get(D.name)===$&&C._singleRules.set(D.name,D)}return C.$_temp.ruleset=!1,C.$_mutateRebuild()}get ruleset(){o(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const m=this.clone();return m.$_temp.ruleset=m._rules.length,m}get $(){return this.ruleset}tailor(m){m=[].concat(m),o(!this._inRuleset(),"Cannot tailor inside a ruleset");let v=this;if(this.$_terms.alterations)for(const{target:b,adjuster:C}of this.$_terms.alterations)m.includes(b)&&(v=C(v),o(a.isSchema(v),"Alteration adjuster for",b,"failed to return a schema object"));return v=v.$_modify({each:b=>b.tailor(m),ref:!1}),v.$_temp.ruleset=!1,v.$_mutateRebuild()}tracer(){return h.location?h.location(this):this}validate(m,v){return g.entry(m,this,v)}validateAsync(m,v){return g.entryAsync(m,this,v)}$_addRule(m){typeof m=="string"&&(m={name:m}),o(m&&typeof m=="object","Invalid options"),o(m.name&&typeof m.name=="string","Invalid rule name");for(const $ in m)o($[0]!=="_","Cannot set private rule properties");const v=Object.assign({},m);v._resolve=[],v.method=v.method||v.name;const b=this._definition.rules[v.method],C=v.args;o(b,"Unknown rule",v.method);const P=this.clone();if(C){o(Object.keys(C).length===1||Object.keys(C).length===this._definition.rules[v.name].args.length,"Invalid rule definition for",this.type,v.name);for(const $ in C){let D=C[$];if(b.argsByName){const M=b.argsByName.get($);if(M.ref&&a.isResolvable(D))v._resolve.push($),P.$_mutateRegister(D);else if(M.normalize&&(D=M.normalize(D),C[$]=D),M.assert){const U=a.validateArg(D,$,M);o(!U,U,"or reference")}}D!==void 0?C[$]=D:delete C[$]}}return b.multi||(P._ruleRemove(v.name,{clone:!1}),P._singleRules.set(v.name,v)),P.$_temp.ruleset===!1&&(P.$_temp.ruleset=null),b.priority?P._rules.unshift(v):P._rules.push(v),P}$_compile(m,v){return r.schema(this.$_root,m,v)}$_createError(m,v,b,C,P,$={}){const D=$.flags!==!1?this._flags:{},M=$.messages?i.merge(this._definition.messages,$.messages):this._definition.messages;return new n.Report(m,v,b,D,M,C,P)}$_getFlag(m){return this._flags[m]}$_getRule(m){return this._singleRules.get(m)}$_mapLabels(m){return m=Array.isArray(m)?m:m.split("."),this._ids.labels(m)}$_match(m,v,b,C){(b=Object.assign({},b)).abortEarly=!0,b._externals=!1,v.snapshot();const P=!g.validate(m,this,v,b,C).errors;return v.restore(),P}$_modify(m){return a.assertOptions(m,["each","once","ref","schema"]),l.schema(this,m)||this}$_mutateRebuild(){return o(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(m,{source:v,name:b,path:C,key:P})=>{const $=this._definition[v][b]&&this._definition[v][b].register;$!==!1&&this.$_mutateRegister(m,{family:$,key:P})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(m,{family:v,key:b}={}){this._refs.register(m,v),this._ids.register(m,{key:b})}$_property(m){return this._definition.properties[m]}$_reach(m){return this._ids.reach(m)}$_rootReferences(){return this._refs.roots()}$_setFlag(m,v,b={}){o(m[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const C=this._definition.flags[m]||{};if(f(v,C.default)&&(v=void 0),f(v,this._flags[m]))return this;const P=b.clone!==!1?this.clone():this;return v!==void 0?(P._flags[m]=v,P.$_mutateRegister(v)):delete P._flags[m],m[0]!=="_"&&(P.$_temp.ruleset=!1),P}$_parent(m,...v){return this[m][a.symbols.parent].call(this,...v)}$_validate(m,v,b){return g.validate(m,this,v,b)}_assign(m){m.type=this.type,m.$_root=this.$_root,m.$_temp=Object.assign({},this.$_temp),m.$_temp.whens={},m._ids=this._ids.clone(),m._preferences=this._preferences,m._valids=this._valids&&this._valids.clone(),m._invalids=this._invalids&&this._invalids.clone(),m._rules=this._rules.slice(),m._singleRules=p(this._singleRules,{shallow:!0}),m._refs=this._refs.clone(),m._flags=Object.assign({},this._flags),m._cache=null,m.$_terms={};for(const v in this.$_terms)m.$_terms[v]=this.$_terms[v]?this.$_terms[v].slice():null;m.$_super={};for(const v in this.$_super)m.$_super[v]=this._super[v].bind(m);return m}_bare(){const m=this.clone();m._reset();const v=m._definition.terms;for(const b in v){const C=v[b];m.$_terms[b]=C.init}return m.$_mutateRebuild()}_default(m,v,b={}){return a.assertOptions(b,"literal"),o(v!==void 0,"Missing",m,"value"),o(typeof v=="function"||!b.literal,"Only function value supports literal option"),typeof v=="function"&&b.literal&&(v={[a.symbols.literal]:!0,literal:v}),this.$_setFlag(m,v)}_generate(m,v,b){if(!this.$_terms.whens)return{schema:this};const C=[],P=[];for(let M=0;M<this.$_terms.whens.length;++M){const U=this.$_terms.whens[M];if(U.concat){C.push(U.concat),P.push(`${M}.concat`);continue}const z=U.ref?U.ref.resolve(m,v,b):m,H=U.is?[U]:U.switch,I=P.length;for(let N=0;N<H.length;++N){const{is:W,then:Y,otherwise:de}=H[N],Ce=`${M}${U.switch?"."+N:""}`;if(W.$_match(z,v.nest(W,`${Ce}.is`),b)){if(Y){const He=v.localize([...v.path,`${Ce}.then`],v.ancestors,v.schemas),{schema:ct,id:Ne}=Y._generate(m,He,b);C.push(ct),P.push(`${Ce}.then${Ne?`(${Ne})`:""}`);break}}else if(de){const He=v.localize([...v.path,`${Ce}.otherwise`],v.ancestors,v.schemas),{schema:ct,id:Ne}=de._generate(m,He,b);C.push(ct),P.push(`${Ce}.otherwise${Ne?`(${Ne})`:""}`);break}}if(U.break&&P.length>I)break}const $=P.join(", ");if(v.mainstay.tracer.debug(v,"rule","when",$),!$)return{schema:this};if(!v.mainstay.tracer.active&&this.$_temp.whens[$])return{schema:this.$_temp.whens[$],id:$};let D=this;this._definition.generate&&(D=this._definition.generate(this,m,v,b));for(const M of C)D=D.concat(M);return this.$_root._tracer&&this.$_root._tracer._combine(D,[this,...C]),this.$_temp.whens[$]=D,{schema:D,id:$}}_inner(m,v,b={}){o(!this._inRuleset(),`Cannot set ${m} inside a ruleset`);const C=this.clone();return C.$_terms[m]&&!b.override||(C.$_terms[m]=[]),b.single?C.$_terms[m].push(v):C.$_terms[m].push(...v),C.$_temp.ruleset=!1,C}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(m,v={}){if(!this._singleRules.has(m))return this;const b=v.clone!==!1?this.clone():this;b._singleRules.delete(m);const C=[];for(let P=0;P<b._rules.length;++P){const $=b._rules[P];$.name!==m||$.keep?C.push($):b._inRuleset()&&P<b.$_temp.ruleset&&--b.$_temp.ruleset}return b._rules=C,b}_values(m,v){a.verifyFlat(m,v.slice(1,-1));const b=this.clone(),C=m[0]===a.symbols.override;if(C&&(m=m.slice(1)),!b[v]&&m.length?b[v]=new w:C&&(b[v]=m.length?new w:null,b.$_mutateRebuild()),!b[v])return b;C&&b[v].override();for(const P of m){o(P!==void 0,"Cannot call allow/valid/invalid with undefined"),o(P!==a.symbols.override,"Override must be the first value");const $=v==="_invalids"?"_valids":"_invalids";b[$]&&(b[$].remove(P),b[$].length||(o(v==="_valids"||!b._flags.only,"Setting invalid value",P,"leaves schema rejecting all values due to previous valid rule"),b[$]=null)),b[v].add(P,b._refs)}return b}}};S.Base.prototype[a.symbols.any]={version:a.version,compile:r.compile,root:"$_root"},S.Base.prototype.isImmutable=!0,S.Base.prototype.deny=S.Base.prototype.invalid,S.Base.prototype.disallow=S.Base.prototype.invalid,S.Base.prototype.equal=S.Base.prototype.valid,S.Base.prototype.exist=S.Base.prototype.required,S.Base.prototype.not=S.Base.prototype.invalid,S.Base.prototype.options=S.Base.prototype.prefs,S.Base.prototype.preferences=S.Base.prototype.prefs,j.exports=new S.Base},8652:(j,y,x)=>{const o=x(375),p=x(8571),f=x(8160),u={max:1e3,supported:new Set(["undefined","boolean","number","string"])};y.provider={provision:t=>new u.Cache(t)},u.Cache=class{constructor(t={}){f.assertOptions(t,["max"]),o(t.max===void 0||t.max&&t.max>0&&isFinite(t.max),"Invalid max cache size"),this._max=t.max||u.max,this._map=new Map,this._list=new u.List}get length(){return this._map.size}set(t,a){if(t!==null&&!u.supported.has(typeof t))return;let r=this._map.get(t);if(r)return r.value=a,void this._list.first(r);r=this._list.unshift({key:t,value:a}),this._map.set(t,r),this._compact()}get(t){const a=this._map.get(t);if(a)return this._list.first(a),p(a.value)}_compact(){if(this._map.size>this._max){const t=this._list.pop();this._map.delete(t.key)}}},u.List=class{constructor(){this.tail=null,this.head=null}unshift(t){return t.next=null,t.prev=this.head,this.head&&(this.head.next=t),this.head=t,this.tail||(this.tail=t),t}first(t){t!==this.head&&(this._remove(t),this.unshift(t))}pop(){return this._remove(this.tail)}_remove(t){const{next:a,prev:r}=t;return a.prev=r,r&&(r.next=a),t===this.tail&&(this.tail=a),t.prev=null,t.next=null,t}}},8160:(j,y,x)=>{const o=x(375),p=x(7916),f=x(5934);let u,t;const a={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)?)?)?)?$/};y.version=f.version,y.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},y.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")},y.assertOptions=function(r,n,s="Options"){o(r&&typeof r=="object"&&!Array.isArray(r),"Options must be of type object");const c=Object.keys(r).filter(i=>!n.includes(i));o(c.length===0,`${s} contain unknown keys: ${c}`)},y.checkPreferences=function(r){t=t||x(3378);const n=t.preferences.validate(r);if(n.error)throw new p([n.error.details[0].message])},y.compare=function(r,n,s){switch(s){case"=":return r===n;case">":return r>n;case"<":return r<n;case">=":return r>=n;case"<=":return r<=n}},y.default=function(r,n){return r===void 0?n:r},y.isIsoDate=function(r){return a.isoDate.test(r)},y.isNumber=function(r){return typeof r=="number"&&!isNaN(r)},y.isResolvable=function(r){return!!r&&(r[y.symbols.ref]||r[y.symbols.template])},y.isSchema=function(r,n={}){const s=r&&r[y.symbols.any];return!!s&&(o(n.legacy||s.version===y.version,"Cannot mix different versions of joi schemas"),!0)},y.isValues=function(r){return r[y.symbols.values]},y.limit=function(r){return Number.isSafeInteger(r)&&r>=0},y.preferences=function(r,n){u=u||x(6914),r=r||{},n=n||{};const s=Object.assign({},r,n);return n.errors&&r.errors&&(s.errors=Object.assign({},r.errors,n.errors),s.errors.wrap=Object.assign({},r.errors.wrap,n.errors.wrap)),n.messages&&(s.messages=u.compile(n.messages,r.messages)),delete s[y.symbols.prefs],s},y.tryWithPath=function(r,n,s={}){try{return r()}catch(c){throw c.path!==void 0?c.path=n+"."+c.path:c.path=n,s.append&&(c.message=`${c.message} (${c.path})`),c}},y.validateArg=function(r,n,{assert:s,message:c}){if(y.isSchema(s)){const i=s.validate(r);return i.error?i.error.message:void 0}if(!s(r))return n?`${n} ${c}`:c},y.verifyFlat=function(r,n){for(const s of r)o(!Array.isArray(s),"Method no longer accepts array arguments:",n)}},3292:(j,y,x)=>{const o=x(375),p=x(8160),f=x(6133),u={};y.schema=function(t,a,r={}){p.assertOptions(r,["appendPath","override"]);try{return u.schema(t,a,r)}catch(n){throw r.appendPath&&n.path!==void 0&&(n.message=`${n.message} (${n.path})`),n}},u.schema=function(t,a,r){o(a!==void 0,"Invalid undefined schema"),Array.isArray(a)&&(o(a.length,"Invalid empty array schema"),a.length===1&&(a=a[0]));const n=(s,...c)=>r.override!==!1?s.valid(t.override,...c):s.valid(...c);if(u.simple(a))return n(t,a);if(typeof a=="function")return t.custom(a);if(o(typeof a=="object","Invalid schema content:",typeof a),p.isResolvable(a))return n(t,a);if(p.isSchema(a))return a;if(Array.isArray(a)){for(const s of a)if(!u.simple(s))return t.alternatives().try(...a);return n(t,...a)}return a instanceof RegExp?t.string().regex(a):a instanceof Date?n(t.date(),a):(o(Object.getPrototypeOf(a)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),t.object().keys(a))},y.ref=function(t,a){return f.isRef(t)?t:f.create(t,a)},y.compile=function(t,a,r={}){p.assertOptions(r,["legacy"]);const n=a&&a[p.symbols.any];if(n)return o(r.legacy||n.version===p.version,"Cannot mix different versions of joi schemas:",n.version,p.version),a;if(typeof a!="object"||!r.legacy)return y.schema(t,a,{appendPath:!0});const s=u.walk(a);return s?s.compile(s.root,a):y.schema(t,a,{appendPath:!0})},u.walk=function(t){if(typeof t!="object")return null;if(Array.isArray(t)){for(const r of t){const n=u.walk(r);if(n)return n}return null}const a=t[p.symbols.any];if(a)return{root:t[a.root],compile:a.compile};o(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const r in t){const n=u.walk(t[r]);if(n)return n}return null},u.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},y.when=function(t,a,r){if(r===void 0&&(o(a&&typeof a=="object","Missing options"),r=a,a=f.create(".")),Array.isArray(r)&&(r={switch:r}),p.assertOptions(r,["is","not","then","otherwise","switch","break"]),p.isSchema(a))return o(r.is===void 0,'"is" can not be used with a schema condition'),o(r.not===void 0,'"not" can not be used with a schema condition'),o(r.switch===void 0,'"switch" can not be used with a schema condition'),u.condition(t,{is:a,then:r.then,otherwise:r.otherwise,break:r.break});if(o(f.isRef(a)||typeof a=="string","Invalid condition:",a),o(r.not===void 0||r.is===void 0,'Cannot combine "is" with "not"'),r.switch===void 0){let s=r;r.not!==void 0&&(s={is:r.not,then:r.otherwise,otherwise:r.then,break:r.break});let c=s.is!==void 0?t.$_compile(s.is):t.$_root.invalid(null,!1,0,"").required();return o(s.then!==void 0||s.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),o(s.break===void 0||s.then===void 0||s.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),r.is===void 0||f.isRef(r.is)||p.isSchema(r.is)||(c=c.required()),u.condition(t,{ref:y.ref(a),is:c,then:s.then,otherwise:s.otherwise,break:s.break})}o(Array.isArray(r.switch),'"switch" must be an array'),o(r.is===void 0,'Cannot combine "switch" with "is"'),o(r.not===void 0,'Cannot combine "switch" with "not"'),o(r.then===void 0,'Cannot combine "switch" with "then"');const n={ref:y.ref(a),switch:[],break:r.break};for(let s=0;s<r.switch.length;++s){const c=r.switch[s],i=s===r.switch.length-1;p.assertOptions(c,i?["is","then","otherwise"]:["is","then"]),o(c.is!==void 0,'Switch statement missing "is"'),o(c.then!==void 0,'Switch statement missing "then"');const l={is:t.$_compile(c.is),then:t.$_compile(c.then)};if(f.isRef(c.is)||p.isSchema(c.is)||(l.is=l.is.required()),i){o(r.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const d=r.otherwise!==void 0?r.otherwise:c.otherwise;d!==void 0&&(o(n.break===void 0,"Cannot specify both otherwise and break"),l.otherwise=t.$_compile(d))}n.switch.push(l)}return n},u.condition=function(t,a){for(const r of["then","otherwise"])a[r]===void 0?delete a[r]:a[r]=t.$_compile(a[r]);return a}},6354:(j,y,x)=>{const o=x(5688),p=x(8160),f=x(3328);y.Report=class{constructor(u,t,a,r,n,s,c){if(this.code=u,this.flags=r,this.messages=n,this.path=s.path,this.prefs=c,this.state=s,this.value=t,this.message=null,this.template=null,this.local=a||{},this.local.label=y.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 i=this.path[this.path.length-1];typeof i!="object"&&(this.local.key=i)}}_setTemplate(u){if(this.template=u,!this.flags.label&&this.path.length===0){const t=this._template(this.template,"root");t&&(this.local.label=t)}}toString(){if(this.message)return this.message;const u=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return t===void 0?`Error code "${u}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(u,t){return y.template(this.value,u,t||this.code,this.state,this.prefs)}},y.path=function(u){let t="";for(const a of u)typeof a!="object"&&(typeof a=="string"?(t&&(t+="."),t+=a):t+=`[${a}]`);return t},y.template=function(u,t,a,r,n){if(!t)return;if(f.isTemplate(t))return a!=="root"?t:null;let s=n.errors.language;if(p.isResolvable(s)&&(s=s.resolve(u,r,n)),s&&t[s]){if(t[s][a]!==void 0)return t[s][a];if(t[s]["*"]!==void 0)return t[s]["*"]}return t[a]?t[a]:t["*"]},y.label=function(u,t,a,r){if(!a.errors.label)return"";if(u.label)return u.label;let n=t.path;return a.errors.label==="key"&&t.path.length>1&&(n=t.path.slice(-1)),y.path(n)||y.template(null,a.messages,"root",t,a)||r&&y.template(null,r,"root",t,a)||"value"},y.process=function(u,t,a){if(!u)return null;const{override:r,message:n,details:s}=y.details(u);if(r)return r;if(a.errors.stack)return new y.ValidationError(n,s,t);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const i=new y.ValidationError(n,s,t);return Error.stackTraceLimit=c,i},y.details=function(u,t={}){let a=[];const r=[];for(const n of u){if(n instanceof Error){if(t.override!==!1)return{override:n};const c=n.toString();a.push(c),r.push({message:c,type:"override",context:{error:n}});continue}const s=n.toString();a.push(s),r.push({message:s,path:n.path.filter(c=>typeof c!="object"),type:n.code,context:n.local})}return a.length>1&&(a=[...new Set(a)]),{message:a.join(". "),details:r}},y.ValidationError=class extends Error{constructor(u,t,a){super(u),this._original=a,this.details=t}static isError(u){return u instanceof y.ValidationError}},y.ValidationError.prototype.isJoi=!0,y.ValidationError.prototype.name="ValidationError",y.ValidationError.prototype.annotate=o.error},8901:(j,y,x)=>{const o=x(375),p=x(8571),f=x(8160),u=x(6914),t={};y.type=function(a,r){const n=Object.getPrototypeOf(a),s=p(n),c=a._assign(Object.create(s)),i=Object.assign({},r);delete i.base,s._definition=i;const l=n._definition||{};i.messages=u.merge(l.messages,i.messages),i.properties=Object.assign({},l.properties,i.properties),c.type=i.type,i.flags=Object.assign({},l.flags,i.flags);const d=Object.assign({},l.terms);if(i.terms)for(const S in i.terms){const m=i.terms[S];o(c.$_terms[S]===void 0,"Invalid term override for",i.type,S),c.$_terms[S]=m.init,d[S]=m}i.terms=d,i.args||(i.args=l.args),i.prepare=t.prepare(i.prepare,l.prepare),i.coerce&&(typeof i.coerce=="function"&&(i.coerce={method:i.coerce}),i.coerce.from&&!Array.isArray(i.coerce.from)&&(i.coerce={method:i.coerce.method,from:[].concat(i.coerce.from)})),i.coerce=t.coerce(i.coerce,l.coerce),i.validate=t.validate(i.validate,l.validate);const h=Object.assign({},l.rules);if(i.rules)for(const S in i.rules){const m=i.rules[S];o(typeof m=="object","Invalid rule definition for",i.type,S);let v=m.method;if(v===void 0&&(v=function(){return this.$_addRule(S)}),v&&(o(!s[S],"Rule conflict in",i.type,S),s[S]=v),o(!h[S],"Rule conflict in",i.type,S),h[S]=m,m.alias){const b=[].concat(m.alias);for(const C of b)s[C]=m.method}m.args&&(m.argsByName=new Map,m.args=m.args.map(b=>(typeof b=="string"&&(b={name:b}),o(!m.argsByName.has(b.name),"Duplicated argument name",b.name),f.isSchema(b.assert)&&(b.assert=b.assert.strict().label(b.name)),m.argsByName.set(b.name,b),b)))}i.rules=h;const g=Object.assign({},l.modifiers);if(i.modifiers)for(const S in i.modifiers){o(!s[S],"Rule conflict in",i.type,S);const m=i.modifiers[S];o(typeof m=="function","Invalid modifier definition for",i.type,S);const v=function(b){return this.rule({[S]:b})};s[S]=v,g[S]=m}if(i.modifiers=g,i.overrides){s._super=n,c.$_super={};for(const S in i.overrides)o(n[S],"Cannot override missing",S),i.overrides[S][f.symbols.parent]=n[S],c.$_super[S]=n[S].bind(c);Object.assign(s,i.overrides)}i.cast=Object.assign({},l.cast,i.cast);const w=Object.assign({},l.manifest,i.manifest);return w.build=t.build(i.manifest&&i.manifest.build,l.manifest&&l.manifest.build),i.manifest=w,i.rebuild=t.rebuild(i.rebuild,l.rebuild),c},t.build=function(a,r){return a&&r?function(n,s){return r(a(n,s),s)}:a||r},t.coerce=function(a,r){return a&&r?{from:a.from&&r.from?[...new Set([...a.from,...r.from])]:null,method(n,s){let c;if((!r.from||r.from.includes(typeof n))&&(c=r.method(n,s),c)){if(c.errors||c.value===void 0)return c;n=c.value}if(!a.from||a.from.includes(typeof n)){const i=a.method(n,s);if(i)return i}return c}}:a||r},t.prepare=function(a,r){return a&&r?function(n,s){const c=a(n,s);if(c){if(c.errors||c.value===void 0)return c;n=c.value}return r(n,s)||c}:a||r},t.rebuild=function(a,r){return a&&r?function(n){r(n),a(n)}:a||r},t.validate=function(a,r){return a&&r?function(n,s){const c=r(n,s);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;n=c.value}return a(n,s)||c}:a||r}},5107:(j,y,x)=>{const o=x(375),p=x(8571),f=x(8652),u=x(8160),t=x(3292),a=x(6354),r=x(8901),n=x(9708),s=x(6133),c=x(3328),i=x(1152);let l;const d={types:{alternatives:x(4946),any:x(8068),array:x(546),boolean:x(4937),date:x(7500),function:x(390),link:x(8785),number:x(3832),object:x(8966),string:x(7417),symbol:x(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const h={_types:new Set(Object.keys(d.types))};for(const g of h._types)h[g]=function(...w){return o(!w.length||["alternatives","link","object"].includes(g),"The",g,"type does not allow arguments"),d.generate(this,d.types[g],w)};for(const g of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])h[g]=function(...w){return this.any()[g](...w)};Object.assign(h,d.methods);for(const g in d.aliases){const w=d.aliases[g];h[g]=h[w]}return h.x=h.expression,i.setup&&i.setup(h),h}};d.methods={ValidationError:a.ValidationError,version:u.version,cache:f.provider,assert(h,g,...w){d.assert(h,g,!0,w)},attempt:(h,g,...w)=>d.assert(h,g,!1,w),build(h){return o(typeof n.build=="function","Manifest functionality disabled"),n.build(this,h)},checkPreferences(h){u.checkPreferences(h)},compile(h,g){return t.compile(this,h,g)},defaults(h){o(typeof h=="function","modifier must be a function");const g=Object.assign({},this);for(const w of g._types){const S=h(g[w]());o(u.isSchema(S),"modifier must return a valid schema object"),g[w]=function(...m){return d.generate(this,S,m)}}return g},expression:(...h)=>new c(...h),extend(...h){u.verifyFlat(h,"extend"),l=l||x(3378),o(h.length,"You need to provide at least one extension"),this.assert(h,l.extensions);const g=Object.assign({},this);g._types=new Set(g._types);for(let w of h){typeof w=="function"&&(w=w(g)),this.assert(w,l.extension);const S=d.expandExtension(w,g);for(const m of S){o(g[m.type]===void 0||g._types.has(m.type),"Cannot override name",m.type);const v=m.base||this.any(),b=r.type(v,m);g._types.add(m.type),g[m.type]=function(...C){return d.generate(this,b,C)}}}return g},isError:a.ValidationError.isError,isExpression:c.isTemplate,isRef:s.isRef,isSchema:u.isSchema,in:(...h)=>s.in(...h),override:u.symbols.override,ref:(...h)=>s.create(...h),types(){const h={};for(const g of this._types)h[g]=this[g]();for(const g in d.aliases)h[g]=this[g]();return h}},d.assert=function(h,g,w,S){const m=S[0]instanceof Error||typeof S[0]=="string"?S[0]:null,v=m!==null?S[1]:S[0],b=g.validate(h,u.preferences({errors:{stack:!0}},v||{}));let C=b.error;if(!C)return b.value;if(m instanceof Error)throw m;const P=w&&typeof C.annotate=="function"?C.annotate():C.message;throw C instanceof a.ValidationError==0&&(C=p(C)),C.message=m?`${m} ${P}`:P,C},d.generate=function(h,g,w){return o(h,"Must be invoked on a Joi instance."),g.$_root=h,g._definition.args&&w.length?g._definition.args(g,...w):g},d.expandExtension=function(h,g){if(typeof h.type=="string")return[h];const w=[];for(const S of g._types)if(h.type.test(S)){const m=Object.assign({},h);m.type=S,m.base=g[S](),w.push(m)}return w},j.exports=d.root()},6914:(j,y,x)=>{const o=x(375),p=x(8571),f=x(3328);y.compile=function(u,t){if(typeof u=="string")return o(!t,"Cannot set single message string"),new f(u);if(f.isTemplate(u))return o(!t,"Cannot set single message template"),u;o(typeof u=="object"&&!Array.isArray(u),"Invalid message options"),t=t?p(t):{};for(let a in u){const r=u[a];if(a==="root"||f.isTemplate(r)){t[a]=r;continue}if(typeof r=="string"){t[a]=new f(r);continue}o(typeof r=="object"&&!Array.isArray(r),"Invalid message for",a);const n=a;for(a in t[n]=t[n]||{},r){const s=r[a];a==="root"||f.isTemplate(s)?t[n][a]=s:(o(typeof s=="string","Invalid message for",a,"in",n),t[n][a]=new f(s))}}return t},y.decompile=function(u){const t={};for(let a in u){const r=u[a];if(a==="root"){t.root=r;continue}if(f.isTemplate(r)){t[a]=r.describe({compact:!0});continue}const n=a;for(a in t[n]={},r){const s=r[a];a!=="root"?t[n][a]=s.describe({compact:!0}):t[n].root=s}}return t},y.merge=function(u,t){if(!u)return y.compile(t);if(!t)return u;if(typeof t=="string")return new f(t);if(f.isTemplate(t))return t;const a=p(u);for(let r in t){const n=t[r];if(r==="root"||f.isTemplate(n)){a[r]=n;continue}if(typeof n=="string"){a[r]=new f(n);continue}o(typeof n=="object"&&!Array.isArray(n),"Invalid message for",r);const s=r;for(r in a[s]=a[s]||{},n){const c=n[r];r==="root"||f.isTemplate(c)?a[s][r]=c:(o(typeof c=="string","Invalid message for",r,"in",s),a[s][r]=new f(c))}}return a}},2294:(j,y,x)=>{const o=x(375),p=x(8160),f=x(6133),u={};y.Ids=u.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const t=new u.Ids;return t._byId=new Map(this._byId),t._byKey=new Map(this._byKey),t._schemaChain=this._schemaChain,t}concat(t){t._schemaChain&&(this._schemaChain=!0);for(const[a,r]of t._byId.entries())o(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,r);for(const[a,r]of t._byKey.entries())o(!this._byId.has(a),"Schema key conflicts with existing id:",a),this._byKey.set(a,r)}fork(t,a,r){const n=this._collect(t);n.push({schema:r});const s=n.shift();let c={id:s.id,schema:a(s.schema)};o(p.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const i of n)c={id:i.id,schema:u.fork(i.schema,c.id,c.schema)};return c.schema}labels(t,a=[]){const r=t[0],n=this._get(r);if(!n)return[...a,...t].join(".");const s=t.slice(1);return a=[...a,n.schema._flags.label||r],s.length?n.schema._ids.labels(s,a):a.join(".")}reach(t,a=[]){const r=t[0],n=this._get(r);o(n,"Schema does not contain path",[...a,...t].join("."));const s=t.slice(1);return s.length?n.schema._ids.reach(s,[...a,r]):n.schema}register(t,{key:a}={}){if(!t||!p.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const r=t._flags.id;if(r){const n=this._byId.get(r);o(!n||n.schema===t,"Cannot add different schemas with the same id:",r),o(!this._byKey.has(r),"Schema id conflicts with existing key:",r),this._byId.set(r,{schema:t,id:r})}a&&(o(!this._byKey.has(a),"Schema already contains key:",a),o(!this._byId.has(a),"Schema key conflicts with existing id:",a),this._byKey.set(a,{schema:t,id:a}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(t,a=[],r=[]){const n=t[0],s=this._get(n);o(s,"Schema does not contain path",[...a,...t].join(".")),r=[s,...r];const c=t.slice(1);return c.length?s.schema._ids._collect(c,[...a,n],r):r}_get(t){return this._byId.get(t)||this._byKey.get(t)}},u.fork=function(t,a,r){const n=y.schema(t,{each:(s,{key:c})=>{if(a===(s._flags.id||c))return r},ref:!1});return n?n.$_mutateRebuild():t},y.schema=function(t,a){let r;for(const n in t._flags){if(n[0]==="_")continue;const s=u.scan(t._flags[n],{source:"flags",name:n},a);s!==void 0&&(r=r||t.clone(),r._flags[n]=s)}for(let n=0;n<t._rules.length;++n){const s=t._rules[n],c=u.scan(s.args,{source:"rules",name:s.name},a);if(c!==void 0){r=r||t.clone();const i=Object.assign({},s);i.args=c,r._rules[n]=i,r._singleRules.get(s.name)===s&&r._singleRules.set(s.name,i)}}for(const n in t.$_terms){if(n[0]==="_")continue;const s=u.scan(t.$_terms[n],{source:"terms",name:n},a);s!==void 0&&(r=r||t.clone(),r.$_terms[n]=s)}return r},u.scan=function(t,a,r,n,s){const c=n||[];if(t===null||typeof t!="object")return;let i;if(Array.isArray(t)){for(let l=0;l<t.length;++l){const d=a.source==="terms"&&a.name==="keys"&&t[l].key,h=u.scan(t[l],a,r,[l,...c],d);h!==void 0&&(i=i||t.slice(),i[l]=h)}return i}if(r.schema!==!1&&p.isSchema(t)||r.ref!==!1&&f.isRef(t)){const l=r.each(t,{...a,path:c,key:s});return l===t?void 0:l}for(const l in t){if(l[0]==="_")continue;const d=u.scan(t[l],a,r,[l,...c],s);d!==void 0&&(i=i||Object.assign({},t),i[l]=d)}return i}},6133:(j,y,x)=>{const o=x(375),p=x(8571),f=x(9621),u=x(8160);let t;const a={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};y.create=function(r,n={}){o(typeof r=="string","Invalid reference key:",r),u.assertOptions(n,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),o(!n.prefix||typeof n.prefix=="object","options.prefix must be of type object");const s=Object.assign({},a.defaults,n);delete s.prefix;const c=s.separator,i=a.context(r,c,n.prefix);if(s.type=i.type,r=i.key,s.type==="value")if(i.root&&(o(!c||r[0]!==c,"Cannot specify relative path with root prefix"),s.ancestor="root",r||(r=null)),c&&c===r)r=null,s.ancestor=0;else if(s.ancestor!==void 0)o(!c||!r||r[0]!==c,"Cannot combine prefix with ancestor option");else{const[l,d]=a.ancestor(r,c);d&&(r=r.slice(d))===""&&(r=null),s.ancestor=l}return s.path=c?r===null?[]:r.split(c):[r],new a.Ref(s)},y.in=function(r,n={}){return y.create(r,{...n,in:!0})},y.isRef=function(r){return!!r&&!!r[u.symbols.ref]},a.Ref=class{constructor(r){o(typeof r=="object","Invalid reference construction"),u.assertOptions(r,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),o([!1,void 0].includes(r.separator)||typeof r.separator=="string"&&r.separator.length===1,"Invalid separator"),o(!r.adjust||typeof r.adjust=="function","options.adjust must be a function"),o(!r.map||Array.isArray(r.map),"options.map must be an array"),o(!r.map||!r.adjust,"Cannot set both map and adjust options"),Object.assign(this,a.defaults,r),o(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(r,n,s,c,i={}){return o(!this.in||i.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(s.context,n,i):this.type==="local"?this._resolve(c,n,i):this.ancestor?this.ancestor==="root"?this._resolve(n.ancestors[n.ancestors.length-1],n,i):(o(this.ancestor<=n.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(n.ancestors[this.ancestor-1],n,i)):this._resolve(r,n,i)}_resolve(r,n,s){let c;if(this.type==="value"&&n.mainstay.shadow&&s.shadow!==!1&&(c=n.mainstay.shadow.get(this.absolute(n))),c===void 0&&(c=f(r,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const i=this.map.get(c);i!==void 0&&(c=i)}return n.mainstay&&n.mainstay.tracer.resolve(n,this,c),c}toString(){return this.display}absolute(r){return[...r.path.slice(0,-this.ancestor),...this.path]}clone(){return new a.Ref(this)}describe(){const r={path:this.path};this.type!=="value"&&(r.type=this.type),this.separator!=="."&&(r.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(r.ancestor=this.ancestor),this.map&&(r.map=[...this.map]);for(const n of["adjust","iterables","render"])this[n]!==null&&this[n]!==void 0&&(r[n]=this[n]);return this.in!==!1&&(r.in=!0),{ref:r}}updateDisplay(){const r=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${r}`);if(!this.separator)return void(this.display=`ref:${r}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${r}`);if(this.ancestor==="root")return void(this.display=`ref:root:${r}`);if(this.ancestor===1)return void(this.display=`ref:${r||".."}`);const n=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${n}${r||""}`}},a.Ref.prototype[u.symbols.ref]=!0,y.build=function(r){return(r=Object.assign({},a.defaults,r)).type==="value"&&r.ancestor===void 0&&(r.ancestor=1),new a.Ref(r)},a.context=function(r,n,s={}){if(r=r.trim(),s){const c=s.global===void 0?"$":s.global;if(c!==n&&r.startsWith(c))return{key:r.slice(c.length),type:"global"};const i=s.local===void 0?"#":s.local;if(i!==n&&r.startsWith(i))return{key:r.slice(i.length),type:"local"};const l=s.root===void 0?"/":s.root;if(l!==n&&r.startsWith(l))return{key:r.slice(l.length),type:"value",root:!0}}return{key:r,type:"value"}},a.ancestor=function(r,n){if(!n)return[1,0];if(r[0]!==n)return[1,0];if(r[1]!==n)return[0,1];let s=2;for(;r[s]===n;)++s;return[s-1,s]},y.toSibling=0,y.toParent=1,y.Manager=class{constructor(){this.refs=[]}register(r,n){if(r)if(n=n===void 0?y.toParent:n,Array.isArray(r))for(const s of r)this.register(s,n);else if(u.isSchema(r))for(const s of r._refs.refs)s.ancestor-n>=0&&this.refs.push({ancestor:s.ancestor-n,root:s.root});else y.isRef(r)&&r.type==="value"&&r.ancestor-n>=0&&this.refs.push({ancestor:r.ancestor-n,root:r.root}),t=t||x(3328),t.isTemplate(r)&&this.register(r.refs(),n)}get length(){return this.refs.length}clone(){const r=new y.Manager;return r.refs=p(this.refs),r}reset(){this.refs=[]}roots(){return this.refs.filter(r=>!r.ancestor).map(r=>r.root)}}},3378:(j,y,x)=>{const o=x(5107),p={};p.wrap=o.string().min(1).max(2).allow(!1),y.preferences=o.object({allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),context:o.object(),convert:o.boolean(),dateFormat:o.valid("date","iso","string","time","utc"),debug:o.boolean(),errors:{escapeHtml:o.boolean(),label:o.valid("path","key",!1),language:[o.string(),o.object().ref()],render:o.boolean(),stack:o.boolean(),wrap:{label:p.wrap,array:p.wrap,string:p.wrap}},externals:o.boolean(),messages:o.object(),noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:o.valid("required","optional","forbidden"),skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()}).strict(),p.nameRx=/^[a-zA-Z0-9]\w*$/,p.rule=o.object({alias:o.array().items(o.string().pattern(p.nameRx)).single(),args:o.array().items(o.string(),o.object({name:o.string().pattern(p.nameRx).required(),ref:o.boolean(),assert:o.alternatives([o.function(),o.object().schema()]).conditional("ref",{is:!0,then:o.required()}),normalize:o.function(),message:o.string().when("assert",{is:o.function(),then:o.required()})})),convert:o.boolean(),manifest:o.boolean(),method:o.function().allow(!1),multi:o.boolean(),validate:o.function()}),y.extension=o.object({type:o.alternatives([o.string(),o.object().regex()]).required(),args:o.function(),cast:o.object().pattern(p.nameRx,o.object({from:o.function().maxArity(1).required(),to:o.function().minArity(1).maxArity(2).required()})),base:o.object().schema().when("type",{is:o.object().regex(),then:o.forbidden()}),coerce:[o.function().maxArity(3),o.object({method:o.function().maxArity(3).required(),from:o.array().items(o.string()).single()})],flags:o.object().pattern(p.nameRx,o.object({setter:o.string(),default:o.any()})),manifest:{build:o.function().arity(2)},messages:[o.object(),o.string()],modifiers:o.object().pattern(p.nameRx,o.function().minArity(1).maxArity(2)),overrides:o.object().pattern(p.nameRx,o.function()),prepare:o.function().maxArity(3),rebuild:o.function().arity(1),rules:o.object().pattern(p.nameRx,p.rule),terms:o.object().pattern(p.nameRx,o.object({init:o.array().allow(null).required(),manifest:o.object().pattern(/.+/,[o.valid("schema","single"),o.object({mapped:o.object({from:o.string().required(),to:o.string().required()}).required()})])})),validate:o.function().maxArity(3)}).strict(),y.extensions=o.array().items(o.object(),o.function().arity(1)).strict(),p.desc={buffer:o.object({buffer:o.string()}),func:o.object({function:o.function().required(),options:{literal:!0}}),override:o.object({override:!0}),ref:o.object({ref:o.object({type:o.valid("value","global","local"),path:o.array().required(),separator:o.string().length(1).allow(!1),ancestor:o.number().min(0).integer().allow("root"),map:o.array().items(o.array().length(2)).min(1),adjust:o.function(),iterables:o.boolean(),in:o.boolean(),render:o.boolean()}).required()}),regex:o.object({regex:o.string().min(3)}),special:o.object({special:o.valid("deep").required()}),template:o.object({template:o.string().required(),options:o.object()}),value:o.object({value:o.alternatives([o.object(),o.array()]).required()})},p.desc.entity=o.alternatives([o.array().items(o.link("...")),o.boolean(),o.function(),o.number(),o.string(),p.desc.buffer,p.desc.func,p.desc.ref,p.desc.regex,p.desc.special,p.desc.template,p.desc.value,o.link("/")]),p.desc.values=o.array().items(null,o.boolean(),o.function(),o.number().allow(1/0,-1/0),o.string().allow(""),o.symbol(),p.desc.buffer,p.desc.func,p.desc.override,p.desc.ref,p.desc.regex,p.desc.template,p.desc.value),p.desc.messages=o.object().pattern(/.+/,[o.string(),p.desc.template,o.object().pattern(/.+/,[o.string(),p.desc.template])]),y.description=o.object({type:o.string().required(),flags:o.object({cast:o.string(),default:o.any(),description:o.string(),empty:o.link("/"),failover:p.desc.entity,id:o.string(),label:o.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:o.boolean(),unit:o.string()}).unknown(),preferences:{allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),convert:o.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:o.boolean(),label:["path","key"],language:[o.string(),p.desc.ref],wrap:{label:p.wrap,array:p.wrap}},externals:o.boolean(),messages:p.desc.messages,noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:["required","optional","forbidden"],skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()},allow:p.desc.values,invalid:p.desc.values,rules:o.array().min(1).items({name:o.string().required(),args:o.object().min(1),keep:o.boolean(),message:[o.string(),p.desc.messages],warn:o.boolean()}),keys:o.object().pattern(/.*/,o.link("/")),link:p.desc.ref}).pattern(/^[a-z]\w*$/,o.any())},493:(j,y,x)=>{const o=x(8571),p=x(9621),f=x(8160),u={value:Symbol("value")};j.exports=u.State=class{constructor(t,a,r){this.path=t,this.ancestors=a,this.mainstay=r.mainstay,this.schemas=r.schemas,this.debug=null}localize(t,a=null,r=null){const n=new u.State(t,a,this);return r&&n.schemas&&(n.schemas=[u.schemas(r),...n.schemas]),n}nest(t,a){const r=new u.State(this.path,this.ancestors,this);return r.schemas=r.schemas&&[u.schemas(t),...r.schemas],r.debug=a,r}shadow(t,a){this.mainstay.shadow=this.mainstay.shadow||new u.Shadow,this.mainstay.shadow.set(this.path,t,a)}snapshot(){this.mainstay.shadow&&(this._snapshot=o(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},u.schemas=function(t){return f.isSchema(t)?{schema:t}:t},u.Shadow=class{constructor(){this._values=null}set(t,a,r){if(!t.length||r==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let n=this._values;for(let s=0;s<t.length;++s){const c=t[s];let i=n.get(c);i||(i=new Map,n.set(c,i)),n=i}n[u.value]=a}get(t){const a=this.node(t);if(a)return a[u.value]}node(t){if(this._values)return p(this._values,t,{iterables:!0})}override(t,a){if(!this._values)return;const r=t.slice(0,-1),n=t[t.length-1],s=p(this._values,r,{iterables:!0});a?s.set(n,a):s&&s.delete(n)}}},3328:(j,y,x)=>{const o=x(375),p=x(8571),f=x(5277),u=x(1447),t=x(8160),a=x(6354),r=x(6133),n={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=n.Template=class{constructor(s,c){if(o(typeof s=="string","Template source must be a string"),o(!s.includes("\0")&&!s.includes(""),"Template source cannot contain reserved control characters"),this.source=s,this.rendered=s,this._template=null,c){const{functions:i,...l}=c;this._settings=Object.keys(l).length?p(l):void 0,this._functions=i,this._functions&&(o(Object.keys(this._functions).every(d=>typeof d=="string"),"Functions keys must be strings"),o(Object.values(this._functions).every(d=>typeof d=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const s=n.encode(this.source),c=n.split(s);let i=!1;const l=[],d=c.shift();d&&l.push(d);for(const h of c){const g=h[0]!=="{",w=g?"}":"}}",S=h.indexOf(w);if(S===-1||h[1]==="{"){l.push(`{${n.decode(h)}`);continue}let m=h.slice(g?0:1,S);const v=m[0]===":";v&&(m=m.slice(1));const b=this._ref(n.decode(m),{raw:g,wrapped:v});l.push(b),typeof b!="string"&&(i=!0);const C=h.slice(S+w.length);C&&l.push(n.decode(C))}i?this._template=l:this.rendered=l.join("")}static date(s,c){return n.dateFormat[c.dateFormat].call(s)}describe(s={}){if(!this._settings&&s.compact)return this.source;const c={template:this.source};return this._settings&&(c.options=this._settings),this._functions&&(c.functions=this._functions),c}static build(s){return new n.Template(s.template,s.options||s.functions?{...s.options,functions:s.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(s){return!!s&&!!s[t.symbols.template]}refs(){if(!this._template)return;const s=[];for(const c of this._template)typeof c!="string"&&s.push(...c.refs);return s}resolve(s,c,i,l){return this._template&&this._template.length===1?this._part(this._template[0],s,c,i,l,{}):this.render(s,c,i,l)}_part(s,...c){return s.ref?s.ref.resolve(...c):s.formula.evaluate(c)}render(s,c,i,l,d={}){if(!this.isDynamic())return this.rendered;const h=[];for(const g of this._template)if(typeof g=="string")h.push(g);else{const w=this._part(g,s,c,i,l,d),S=n.stringify(w,s,c,i,l,d);if(S!==void 0){const m=g.raw||(d.errors&&d.errors.escapeHtml)===!1?S:f(S);h.push(n.wrap(m,g.wrapped&&i.errors.wrap.label))}}return h.join("")}_ref(s,{raw:c,wrapped:i}){const l=[],d=g=>{const w=r.create(g,this._settings);return l.push(w),S=>{const m=w.resolve(...S);return m!==void 0?m:null}};try{const g=this._functions?{...n.functions,...this._functions}:n.functions;var h=new u.Parser(s,{reference:d,functions:g,constants:n.constants})}catch(g){throw g.message=`Invalid template variable "${s}" fails due to: ${g.message}`,g}if(h.single){if(h.single.type==="reference"){const g=l[0];return{ref:g,raw:c,refs:l,wrapped:i||g.type==="local"&&g.key==="label"}}return n.stringify(h.single.value)}return{formula:h,raw:c,refs:l}}toString(){return this.source}},n.Template.prototype[t.symbols.template]=!0,n.Template.prototype.isImmutable=!0,n.encode=function(s){return s.replace(/\\(\{+)/g,(c,i)=>n.opens.slice(0,i.length)).replace(/\\(\}+)/g,(c,i)=>n.closes.slice(0,i.length))},n.decode=function(s){return s.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},n.split=function(s){const c=[];let i="";for(let l=0;l<s.length;++l){const d=s[l];if(d==="{"){let h="";for(;l+1<s.length&&s[l+1]==="{";)h+="{",++l;c.push(i),i=h}else i+=d}return c.push(i),c},n.wrap=function(s,c){return c?c.length===1?`${c}${s}${c}`:`${c[0]}${s}${c[1]}`:s},n.stringify=function(s,c,i,l,d,h={}){const g=typeof s,w=l&&l.errors&&l.errors.wrap||{};let S=!1;if(r.isRef(s)&&s.render&&(S=s.in,s=s.resolve(c,i,l,d,{in:s.in,...h})),s===null)return"null";if(g==="string")return n.wrap(s,h.arrayItems&&w.string);if(g==="number"||g==="function"||g==="symbol")return s.toString();if(g!=="object")return JSON.stringify(s);if(s instanceof Date)return n.Template.date(s,l);if(s instanceof Map){const v=[];for(const[b,C]of s.entries())v.push(`${b.toString()} -> ${C.toString()}`);s=v}if(!Array.isArray(s))return s.toString();const m=[];for(const v of s)m.push(n.stringify(v,c,i,l,d,{arrayItems:!0,...h}));return n.wrap(m.join(", "),!S&&w.array)},n.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},n.functions={if:(s,c,i)=>s?c:i,length:s=>typeof s=="string"?s.length:s&&typeof s=="object"?Array.isArray(s)?s.length:Object.keys(s).length:null,msg(s){const[c,i,l,d,h]=this,g=h.messages;if(!g)return"";const w=a.template(c,g[0],s,i,l)||a.template(c,g[1],s,i,l);return w?w.render(c,i,l,d,h):""},number:s=>typeof s=="number"?s:typeof s=="string"?parseFloat(s):typeof s=="boolean"?s?1:0:s instanceof Date?s.getTime():null}},4946:(j,y,x)=>{const o=x(375),p=x(1687),f=x(8068),u=x(8160),t=x(3292),a=x(6354),r=x(6133),n={};j.exports=f.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:r.toSibling}},args:(s,...c)=>c.length===1&&Array.isArray(c[0])?s.try(...c[0]):s.try(...c),validate(s,c){const{schema:i,error:l,state:d,prefs:h}=c;if(i._flags.match){const w=[],S=[];for(let v=0;v<i.$_terms.matches.length;++v){const b=i.$_terms.matches[v],C=d.nest(b.schema,`match.${v}`);C.snapshot();const P=b.schema.$_validate(s,C,h);P.errors?(S.push(P.errors),C.restore()):(w.push(P.value),C.commit())}if(w.length===0)return{errors:l("alternatives.any",{details:S.map(v=>a.details(v,{override:!1}))})};if(i._flags.match==="one")return w.length===1?{value:w[0]}:{errors:l("alternatives.one")};if(w.length!==i.$_terms.matches.length)return{errors:l("alternatives.all",{details:S.map(v=>a.details(v,{override:!1}))})};const m=v=>v.$_terms.matches.some(b=>b.schema.type==="object"||b.schema.type==="alternatives"&&m(b.schema));return m(i)?{value:w.reduce((v,b)=>p(v,b,{mergeArrays:!1}))}:{value:w[w.length-1]}}const g=[];for(let w=0;w<i.$_terms.matches.length;++w){const S=i.$_terms.matches[w];if(S.schema){const b=d.nest(S.schema,`match.${w}`);b.snapshot();const C=S.schema.$_validate(s,b,h);if(!C.errors)return b.commit(),C;b.restore(),g.push({schema:S.schema,reports:C.errors});continue}const m=S.ref?S.ref.resolve(s,d,h):s,v=S.is?[S]:S.switch;for(let b=0;b<v.length;++b){const C=v[b],{is:P,then:$,otherwise:D}=C,M=`match.${w}${S.switch?"."+b:""}`;if(P.$_match(m,d.nest(P,`${M}.is`),h)){if($)return $.$_validate(s,d.nest($,`${M}.then`),h)}else if(D)return D.$_validate(s,d.nest(D,`${M}.otherwise`),h)}}return n.errors(g,c)},rules:{conditional:{method(s,c){o(!this._flags._endedSwitch,"Unreachable condition"),o(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),o(c.break===void 0,"Cannot use break option with alternatives conditional");const i=this.clone(),l=t.when(i,s,c),d=l.is?[l]:l.switch;for(const h of d)if(h.then&&h.otherwise){i.$_setFlag("_endedSwitch",!0,{clone:!1});break}return i.$_terms.matches.push(l),i.$_mutateRebuild()}},match:{method(s){if(o(["any","one","all"].includes(s),"Invalid alternatives match mode",s),s!=="any")for(const c of this.$_terms.matches)o(c.schema,"Cannot combine match mode",s,"with conditional rules");return this.$_setFlag("match",s)}},try:{method(...s){o(s.length,"Missing alternative schemas"),u.verifyFlat(s,"try"),o(!this._flags._endedSwitch,"Unreachable condition");const c=this.clone();for(const i of s)c.$_terms.matches.push({schema:c.$_compile(i)});return c.$_mutateRebuild()}}},overrides:{label(s){return this.$_parent("label",s).$_modify({each:(c,i)=>i.path[0]!=="is"&&typeof c._flags.label!="string"?c.label(s):void 0,ref:!1})}},rebuild(s){s.$_modify({each:c=>{u.isSchema(c)&&c.type==="array"&&s.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(s,c){if(c.matches)for(const i of c.matches){const{schema:l,ref:d,is:h,not:g,then:w,otherwise:S}=i;s=l?s.try(l):d?s.conditional(d,{is:h,then:w,not:g,otherwise:S,switch:i.switch}):s.conditional(h,{then:w,otherwise:S})}return s}},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}}"}}),n.errors=function(s,{error:c,state:i}){if(!s.length)return{errors:c("alternatives.any")};if(s.length===1)return{errors:s[0].reports};const l=new Set,d=[];for(const{reports:h,schema:g}of s){if(h.length>1)return n.unmatched(s,c);const w=h[0];if(w instanceof a.Report==0)return n.unmatched(s,c);if(w.state.path.length!==i.path.length){d.push({type:g.type,report:w});continue}if(w.code==="any.only"){for(const v of w.local.valids)l.add(v);continue}const[S,m]=w.code.split(".");m!=="base"?d.push({type:g.type,report:w}):w.code==="object.base"?l.add(w.local.type):l.add(S)}return d.length?d.length===1?{errors:d[0].report}:n.unmatched(s,c):{errors:c("alternatives.types",{types:[...l]})}},n.unmatched=function(s,c){const i=[];for(const l of s)i.push(...l.reports);return{errors:c("alternatives.match",a.details(i,{override:!1}))}}},8068:(j,y,x)=>{const o=x(375),p=x(7629),f=x(8160),u=x(6914);j.exports=p.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(t,a){return o(typeof t=="function","Method must be a function"),o(a===void 0||a&&typeof a=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:t,description:a}})},validate(t,a,{method:r}){try{return r(t,a)}catch(n){return a.error("any.custom",{error:n})}},args:["method","description"],multi:!0},messages:{method(t){return this.prefs({messages:t})}},shared:{method(t){o(f.isSchema(t)&&t._flags.id,"Schema must be a schema with an id");const a=this.clone();return a.$_terms.shared=a.$_terms.shared||[],a.$_terms.shared.push(t),a.$_mutateRegister(t),a}},warning:{method(t,a){return o(t&&typeof t=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:t,local:a},warn:!0})},validate:(t,a,{code:r,local:n})=>a.error(r,n),args:["code","local"],multi:!0}},modifiers:{keep(t,a=!0){t.keep=a},message(t,a){t.message=u.compile(a)},warn(t,a=!0){t.warn=a}},manifest:{build(t,a){for(const r in a){const n=a[r];if(["examples","externals","metas","notes","tags"].includes(r))for(const s of n)t=t[r.slice(0,-1)](s);else if(r!=="alterations")if(r!=="whens"){if(r==="shared")for(const s of n)t=t.shared(s)}else for(const s of n){const{ref:c,is:i,not:l,then:d,otherwise:h,concat:g}=s;t=g?t.concat(g):c?t.when(c,{is:i,not:l,then:d,otherwise:h,switch:s.switch,break:s.break}):t.when(i,{then:d,otherwise:h,break:s.break})}else{const s={};for(const{target:c,adjuster:i}of n)s[c]=i;t=t.alter(s)}}return t}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(j,y,x)=>{const o=x(375),p=x(9474),f=x(9621),u=x(8068),t=x(8160),a=x(3292),r={};j.exports=u.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(n,{schema:s,state:c,prefs:i}){if(!Array.isArray(n))return;const l=s.$_getRule("sort");return l?r.sort(s,n,l.args.options,c,i):void 0}},validate(n,{schema:s,error:c}){if(!Array.isArray(n)){if(s._flags.single){const i=[n];return i[t.symbols.arraySingle]=!0,{value:i}}return{errors:c("array.base")}}if(s.$_getRule("items")||s.$_terms.externals)return{value:n.slice()}},rules:{has:{method(n){n=this.$_compile(n,{appendPath:!0});const s=this.$_addRule({name:"has",args:{schema:n}});return s.$_mutateRegister(n),s},validate(n,{state:s,prefs:c,error:i},{schema:l}){const d=[n,...s.ancestors];for(let g=0;g<n.length;++g){const w=s.localize([...s.path,g],d,l);if(l.$_match(n[g],w,c))return n}const h=l._flags.label;return h?i("array.hasKnown",{patternLabel:h}):i("array.hasUnknown",null)},multi:!0},items:{method(...n){t.verifyFlat(n,"items");const s=this.$_addRule("items");for(let c=0;c<n.length;++c){const i=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});s.$_terms.items.push(i)}return s.$_mutateRebuild()},validate(n,{schema:s,error:c,state:i,prefs:l,errorsArray:d}){const h=s.$_terms._requireds.slice(),g=s.$_terms.ordered.slice(),w=[...s.$_terms._inclusions,...h],S=!n[t.symbols.arraySingle];delete n[t.symbols.arraySingle];const m=d();let v=n.length;for(let b=0;b<v;++b){const C=n[b];let P=!1,$=!1;const D=S?b:new Number(b),M=[...i.path,D];if(!s._flags.sparse&&C===void 0){if(m.push(c("array.sparse",{key:D,path:M,pos:b,value:void 0},i.localize(M))),l.abortEarly)return m;g.shift();continue}const U=[n,...i.ancestors];for(const N of s.$_terms._exclusions)if(N.$_match(C,i.localize(M,U,N),l,{presence:"ignore"})){if(m.push(c("array.excludes",{pos:b,value:C},i.localize(M))),l.abortEarly)return m;P=!0,g.shift();break}if(P)continue;if(s.$_terms.ordered.length){if(g.length){const N=g.shift(),W=N.$_validate(C,i.localize(M,U,N),l);if(W.errors){if(m.push(...W.errors),l.abortEarly)return m}else if(N._flags.result==="strip")r.fastSplice(n,b),--b,--v;else{if(!s._flags.sparse&&W.value===void 0){if(m.push(c("array.sparse",{key:D,path:M,pos:b,value:void 0},i.localize(M))),l.abortEarly)return m;continue}n[b]=W.value}continue}if(!s.$_terms.items.length){if(m.push(c("array.orderedLength",{pos:b,limit:s.$_terms.ordered.length})),l.abortEarly)return m;break}}const z=[];let H=h.length;for(let N=0;N<H;++N){const W=i.localize(M,U,h[N]);W.snapshot();const Y=h[N].$_validate(C,W,l);if(z[N]=Y,!Y.errors){if(W.commit(),n[b]=Y.value,$=!0,r.fastSplice(h,N),--N,--H,!s._flags.sparse&&Y.value===void 0&&(m.push(c("array.sparse",{key:D,path:M,pos:b,value:void 0},i.localize(M))),l.abortEarly))return m;break}W.restore()}if($)continue;const I=l.stripUnknown&&!!l.stripUnknown.arrays||!1;H=w.length;for(const N of w){let W;const Y=h.indexOf(N);if(Y!==-1)W=z[Y];else{const de=i.localize(M,U,N);if(de.snapshot(),W=N.$_validate(C,de,l),!W.errors){de.commit(),N._flags.result==="strip"?(r.fastSplice(n,b),--b,--v):s._flags.sparse||W.value!==void 0?n[b]=W.value:(m.push(c("array.sparse",{key:D,path:M,pos:b,value:void 0},i.localize(M))),P=!0),$=!0;break}de.restore()}if(H===1){if(I){r.fastSplice(n,b),--b,--v,$=!0;break}if(m.push(...W.errors),l.abortEarly)return m;P=!0;break}}if(!P&&(s.$_terms._inclusions.length||s.$_terms._requireds.length)&&!$){if(I){r.fastSplice(n,b),--b,--v;continue}if(m.push(c("array.includes",{pos:b,value:C},i.localize(M))),l.abortEarly)return m}}return h.length&&r.fillMissedErrors(s,m,h,n,i,l),g.length&&(r.fillOrderedErrors(s,m,g,n,i,l),m.length||r.fillDefault(g,n,i,l)),m.length?m:n},priority:!0,manifest:!1},length:{method(n){return this.$_addRule({name:"length",args:{limit:n},operator:"="})},validate:(n,s,{limit:c},{name:i,operator:l,args:d})=>t.compare(n.length,c,l)?n:s.error("array."+i,{limit:d.limit,value:n}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(n){return this.$_addRule({name:"max",method:"length",args:{limit:n},operator:"<="})}},min:{method(n){return this.$_addRule({name:"min",method:"length",args:{limit:n},operator:">="})}},ordered:{method(...n){t.verifyFlat(n,"ordered");const s=this.$_addRule("items");for(let c=0;c<n.length;++c){const i=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});r.validateSingle(i,s),s.$_mutateRegister(i),s.$_terms.ordered.push(i)}return s.$_mutateRebuild()}},single:{method(n){const s=n===void 0||!!n;return o(!s||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",s)}},sort:{method(n={}){t.assertOptions(n,["by","order"]);const s={order:n.order||"ascending"};return n.by&&(s.by=a.ref(n.by,{ancestor:0}),o(!s.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:s}})},validate(n,{error:s,state:c,prefs:i,schema:l},{options:d}){const{value:h,errors:g}=r.sort(l,n,d,c,i);if(g)return g;for(let w=0;w<n.length;++w)if(n[w]!==h[w])return s("array.sort",{order:d.order,by:d.by?d.by.key:"value"});return n},convert:!0},sparse:{method(n){const s=n===void 0||!!n;return this._flags.sparse===s?this:(s?this.clone():this.$_addRule("items")).$_setFlag("sparse",s,{clone:!1})}},unique:{method(n,s={}){o(!n||typeof n=="function"||typeof n=="string","comparator must be a function or a string"),t.assertOptions(s,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:s,comparator:n}};if(n)if(typeof n=="string"){const i=t.default(s.separator,".");c.path=i?n.split(i):[n]}else c.comparator=n;return this.$_addRule(c)},validate(n,{state:s,error:c,schema:i},{comparator:l,options:d},{comparator:h,path:g}){const w={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},S=h||p,m=d.ignoreUndefined;for(let v=0;v<n.length;++v){const b=g?f(n[v],g):n[v],C=h?w.custom:w[typeof b];if(o(C,"Failed to find unique map container for type",typeof b),C instanceof Map){const P=C.entries();let $;for(;!($=P.next()).done;)if(S($.value[0],b)){const D=s.localize([...s.path,v],[n,...s.ancestors]),M={pos:v,value:n[v],dupePos:$.value[1],dupeValue:n[$.value[1]]};return g&&(M.path=l),c("array.unique",M,D)}C.set(b,v)}else{if((!m||b!==void 0)&&C[b]!==void 0){const P={pos:v,value:n[v],dupePos:C[b],dupeValue:n[C[b]]};return g&&(P.path=l),c("array.unique",P,s.localize([...s.path,v],[n,...s.ancestors]))}C[b]=v}}return n},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(n,s)=>new Set(n)}},rebuild(n){n.$_terms._inclusions=[],n.$_terms._exclusions=[],n.$_terms._requireds=[];for(const s of n.$_terms.items)r.validateSingle(s,n),s._flags.presence==="required"?n.$_terms._requireds.push(s):s._flags.presence==="forbidden"?n.$_terms._exclusions.push(s):n.$_terms._inclusions.push(s);for(const s of n.$_terms.ordered)r.validateSingle(s,n)},manifest:{build:(n,s)=>(s.items&&(n=n.items(...s.items)),s.ordered&&(n=n.ordered(...s.ordered)),n)},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"}}),r.fillMissedErrors=function(n,s,c,i,l,d){const h=[];let g=0;for(const w of c){const S=w._flags.label;S?h.push(S):++g}h.length?g?s.push(n.$_createError("array.includesRequiredBoth",i,{knownMisses:h,unknownMisses:g},l,d)):s.push(n.$_createError("array.includesRequiredKnowns",i,{knownMisses:h},l,d)):s.push(n.$_createError("array.includesRequiredUnknowns",i,{unknownMisses:g},l,d))},r.fillOrderedErrors=function(n,s,c,i,l,d){const h=[];for(const g of c)g._flags.presence==="required"&&h.push(g);h.length&&r.fillMissedErrors(n,s,h,i,l,d)},r.fillDefault=function(n,s,c,i){const l=[];let d=!0;for(let h=n.length-1;h>=0;--h){const g=n[h],w=[s,...c.ancestors],S=g.$_validate(void 0,c.localize(c.path,w,g),i).value;if(d){if(S===void 0)continue;d=!1}l.unshift(S)}l.length&&s.push(...l)},r.fastSplice=function(n,s){let c=s;for(;c<n.length;)n[c++]=n[c];--n.length},r.validateSingle=function(n,s){(n.type==="array"||n._flags._arrayItems)&&(o(!s._flags.single,"Cannot specify array item with single rule enabled"),s.$_setFlag("_arrayItems",!0,{clone:!1}))},r.sort=function(n,s,c,i,l){const d=c.order==="ascending"?1:-1,h=-1*d,g=d,w=(S,m)=>{let v=r.compare(S,m,h,g);if(v!==null||(c.by&&(S=c.by.resolve(S,i,l),m=c.by.resolve(m,i,l)),v=r.compare(S,m,h,g),v!==null))return v;const b=typeof S;if(b!==typeof m)throw n.$_createError("array.sort.mismatching",s,null,i,l);if(b!=="number"&&b!=="string")throw n.$_createError("array.sort.unsupported",s,{type:b},i,l);return b==="number"?(S-m)*d:S<m?h:g};try{return{value:s.slice().sort(w)}}catch(S){return{errors:S}}},r.compare=function(n,s,c,i){return n===s?0:n===void 0?1:s===void 0?-1:n===null?i:s===null?c:null}},4937:(j,y,x)=>{const o=x(375),p=x(8068),f=x(8160),u=x(2036),t={isBool:function(a){return typeof a=="boolean"}};j.exports=p.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(a,{schema:r}){if(typeof a!="boolean"){if(typeof a=="string"){const n=r._flags.sensitive?a:a.toLowerCase();a=n==="true"||n!=="false"&&a}return typeof a!="boolean"&&(a=r.$_terms.truthy&&r.$_terms.truthy.has(a,null,null,!r._flags.sensitive)||(!r.$_terms.falsy||!r.$_terms.falsy.has(a,null,null,!r._flags.sensitive))&&a),{value:a}}},validate(a,{error:r}){if(typeof a!="boolean")return{value:a,errors:r("boolean.base")}},rules:{truthy:{method(...a){f.verifyFlat(a,"truthy");const r=this.clone();r.$_terms.truthy=r.$_terms.truthy||new u;for(let n=0;n<a.length;++n){const s=a[n];o(s!==void 0,"Cannot call truthy with undefined"),r.$_terms.truthy.add(s)}return r}},falsy:{method(...a){f.verifyFlat(a,"falsy");const r=this.clone();r.$_terms.falsy=r.$_terms.falsy||new u;for(let n=0;n<a.length;++n){const s=a[n];o(s!==void 0,"Cannot call falsy with undefined"),r.$_terms.falsy.add(s)}return r}},sensitive:{method(a=!0){return this.$_setFlag("sensitive",a)}}},cast:{number:{from:t.isBool,to:(a,r)=>a?1:0},string:{from:t.isBool,to:(a,r)=>a?"true":"false"}},manifest:{build:(a,r)=>(r.truthy&&(a=a.truthy(...r.truthy)),r.falsy&&(a=a.falsy(...r.falsy)),a)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(j,y,x)=>{const o=x(375),p=x(8068),f=x(8160),u=x(3328),t={isDate:function(a){return a instanceof Date}};j.exports=p.extend({type:"date",coerce:{from:["number","string"],method:(a,{schema:r})=>({value:t.parse(a,r._flags.format)||a})},validate(a,{schema:r,error:n,prefs:s}){if(a instanceof Date&&!isNaN(a.getTime()))return;const c=r._flags.format;return s.convert&&c&&typeof a=="string"?{value:a,errors:n("date.format",{format:c})}:{value:a,errors:n("date.base")}},rules:{compare:{method:!1,validate(a,r,{date:n},{name:s,operator:c,args:i}){const l=n==="now"?Date.now():n.getTime();return f.compare(a.getTime(),l,c)?a:r.error("date."+s,{limit:i.date,value:a})},args:[{name:"date",ref:!0,normalize:a=>a==="now"?a:t.parse(a),assert:a=>a!==null,message:"must have a valid date format"}]},format:{method(a){return o(["iso","javascript","unix"].includes(a),"Unknown date format",a),this.$_setFlag("format",a)}},greater:{method(a){return this.$_addRule({name:"greater",method:"compare",args:{date:a},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(a){return this.$_addRule({name:"less",method:"compare",args:{date:a},operator:"<"})}},max:{method(a){return this.$_addRule({name:"max",method:"compare",args:{date:a},operator:"<="})}},min:{method(a){return this.$_addRule({name:"min",method:"compare",args:{date:a},operator:">="})}},timestamp:{method(a="javascript"){return o(["javascript","unix"].includes(a),'"type" must be one of "javascript, unix"'),this.format(a)}}},cast:{number:{from:t.isDate,to:(a,r)=>a.getTime()},string:{from:t.isDate,to:(a,{prefs:r})=>u.date(a,r)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),t.parse=function(a,r){if(a instanceof Date)return a;if(typeof a!="string"&&(isNaN(a)||!isFinite(a))||/^\s*$/.test(a))return null;if(r==="iso")return f.isIsoDate(a)?t.date(a.toString()):null;const n=a;if(typeof a=="string"&&/^[+-]?\d+(\.\d+)?$/.test(a)&&(a=parseFloat(a)),r){if(r==="javascript")return t.date(1*a);if(r==="unix")return t.date(1e3*a);if(typeof n=="string")return null}return t.date(a)},t.date=function(a){const r=new Date(a);return isNaN(r.getTime())?null:r}},390:(j,y,x)=>{const o=x(375),p=x(7824);j.exports=p.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(f){return o(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:f}})},validate:(f,u,{n:t})=>f.length===t?f:u.error("function.arity",{n:t})},class:{method(){return this.$_addRule("class")},validate:(f,u)=>/^\s*class\s/.test(f.toString())?f:u.error("function.class",{value:f})},minArity:{method(f){return o(Number.isSafeInteger(f)&&f>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:f}})},validate:(f,u,{n:t})=>f.length>=t?f:u.error("function.minArity",{n:t})},maxArity:{method(f){return o(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:f}})},validate:(f,u,{n:t})=>f.length<=t?f:u.error("function.maxArity",{n:t})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(j,y,x)=>{const o=x(978),p=x(375),f=x(8571),u=x(3652),t=x(8068),a=x(8160),r=x(3292),n=x(6354),s=x(6133),c=x(3328),i={renameDefaults:{alias:!1,multiple:!1,override:!1}};j.exports=t.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:void 0}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(l,d)=>l.keys(d),validate(l,{schema:d,error:h,state:g,prefs:w}){if(!l||typeof l!==d.$_property("typeof")||Array.isArray(l))return{value:l,errors:h("object.base",{type:d.$_property("typeof")})};if(!(d.$_terms.renames||d.$_terms.dependencies||d.$_terms.keys||d.$_terms.patterns||d.$_terms.externals))return;l=i.clone(l,w);const S=[];if(d.$_terms.renames&&!i.rename(d,l,g,w,S))return{value:l,errors:S};if(!d.$_terms.keys&&!d.$_terms.patterns&&!d.$_terms.dependencies)return{value:l,errors:S};const m=new Set(Object.keys(l));if(d.$_terms.keys){const v=[l,...g.ancestors];for(const b of d.$_terms.keys){const C=b.key,P=l[C];m.delete(C);const $=g.localize([...g.path,C],v,b),D=b.schema.$_validate(P,$,w);if(D.errors){if(w.abortEarly)return{value:l,errors:D.errors};D.value!==void 0&&(l[C]=D.value),S.push(...D.errors)}else b.schema._flags.result==="strip"||D.value===void 0&&P!==void 0?delete l[C]:D.value!==void 0&&(l[C]=D.value)}}if(m.size||d._flags._hasPatternMatch){const v=i.unknown(d,l,m,S,g,w);if(v)return v}if(d.$_terms.dependencies)for(const v of d.$_terms.dependencies){if(v.key!==null&&i.isPresent(v.options)(v.key.resolve(l,g,w,null,{shadow:!1}))===!1)continue;const b=i.dependencies[v.rel](d,v,l,g,w);if(b){const C=d.$_createError(b.code,l,b.context,g,w);if(w.abortEarly)return{value:l,errors:C};S.push(C)}}return{value:l,errors:S}},rules:{and:{method(...l){return a.verifyFlat(l,"and"),i.dependency(this,"and",null,l)}},append:{method(l){return l==null||Object.keys(l).length===0?this:this.keys(l)}},assert:{method(l,d,h){c.isTemplate(l)||(l=r.ref(l)),p(h===void 0||typeof h=="string","Message must be a string"),d=this.$_compile(d,{appendPath:!0});const g=this.$_addRule({name:"assert",args:{subject:l,schema:d,message:h}});return g.$_mutateRegister(l),g.$_mutateRegister(d),g},validate(l,{error:d,prefs:h,state:g},{subject:w,schema:S,message:m}){const v=w.resolve(l,g,h),b=s.isRef(w)?w.absolute(g):[];return S.$_match(v,g.localize(b,[l,...g.ancestors],S),h)?l:d("object.assert",{subject:w,message:m})},args:["subject","schema","message"],multi:!0},instance:{method(l,d){return p(typeof l=="function","constructor must be a function"),d=d||l.name,this.$_addRule({name:"instance",args:{constructor:l,name:d}})},validate:(l,d,{constructor:h,name:g})=>l instanceof h?l:d.error("object.instance",{type:g,value:l}),args:["constructor","name"]},keys:{method(l){p(l===void 0||typeof l=="object","Object schema must be a valid object"),p(!a.isSchema(l),"Object schema cannot be a joi schema");const d=this.clone();if(l)if(Object.keys(l).length){d.$_terms.keys=d.$_terms.keys?d.$_terms.keys.filter(h=>!l.hasOwnProperty(h.key)):new i.Keys;for(const h in l)a.tryWithPath(()=>d.$_terms.keys.push({key:h,schema:this.$_compile(l[h])}),h)}else d.$_terms.keys=new i.Keys;else d.$_terms.keys=null;return d.$_mutateRebuild()}},length:{method(l){return this.$_addRule({name:"length",args:{limit:l},operator:"="})},validate:(l,d,{limit:h},{name:g,operator:w,args:S})=>a.compare(Object.keys(l).length,h,w)?l:d.error("object."+g,{limit:S.limit,value:l}),args:[{name:"limit",ref:!0,assert:a.limit,message:"must be a positive integer"}]},max:{method(l){return this.$_addRule({name:"max",method:"length",args:{limit:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"length",args:{limit:l},operator:">="})}},nand:{method(...l){return a.verifyFlat(l,"nand"),i.dependency(this,"nand",null,l)}},or:{method(...l){return a.verifyFlat(l,"or"),i.dependency(this,"or",null,l)}},oxor:{method(...l){return i.dependency(this,"oxor",null,l)}},pattern:{method(l,d,h={}){const g=l instanceof RegExp;g||(l=this.$_compile(l,{appendPath:!0})),p(d!==void 0,"Invalid rule"),a.assertOptions(h,["fallthrough","matches"]),g&&p(!l.flags.includes("g")&&!l.flags.includes("y"),"pattern should not use global or sticky mode"),d=this.$_compile(d,{appendPath:!0});const w=this.clone();w.$_terms.patterns=w.$_terms.patterns||[];const S={[g?"regex":"schema"]:l,rule:d};return h.matches&&(S.matches=this.$_compile(h.matches),S.matches.type!=="array"&&(S.matches=S.matches.$_root.array().items(S.matches)),w.$_mutateRegister(S.matches),w.$_setFlag("_hasPatternMatch",!0,{clone:!1})),h.fallthrough&&(S.fallthrough=!0),w.$_terms.patterns.push(S),w.$_mutateRegister(d),w}},ref:{method(){return this.$_addRule("ref")},validate:(l,d)=>s.isRef(l)?l:d.error("object.refType",{value:l})},regex:{method(){return this.$_addRule("regex")},validate:(l,d)=>l instanceof RegExp?l:d.error("object.regex",{value:l})},rename:{method(l,d,h={}){p(typeof l=="string"||l instanceof RegExp,"Rename missing the from argument"),p(typeof d=="string"||d instanceof c,"Invalid rename to argument"),p(d!==l,"Cannot rename key to same name:",l),a.assertOptions(h,["alias","ignoreUndefined","override","multiple"]);const g=this.clone();g.$_terms.renames=g.$_terms.renames||[];for(const w of g.$_terms.renames)p(w.from!==l,"Cannot rename the same key multiple times");return d instanceof c&&g.$_mutateRegister(d),g.$_terms.renames.push({from:l,to:d,options:o(i.renameDefaults,h)}),g}},schema:{method(l="any"){return this.$_addRule({name:"schema",args:{type:l}})},validate:(l,d,{type:h})=>!a.isSchema(l)||h!=="any"&&l.type!==h?d.error("object.schema",{type:h}):l},unknown:{method(l){return this.$_setFlag("unknown",l!==!1)}},with:{method(l,d,h={}){return i.dependency(this,"with",l,d,h)}},without:{method(l,d,h={}){return i.dependency(this,"without",l,d,h)}},xor:{method(...l){return a.verifyFlat(l,"xor"),i.dependency(this,"xor",null,l)}}},overrides:{default(l,d){return l===void 0&&(l=a.symbols.deepDefault),this.$_parent("default",l,d)}},rebuild(l){if(l.$_terms.keys){const d=new u.Sorter;for(const h of l.$_terms.keys)a.tryWithPath(()=>d.add(h,{after:h.schema.$_rootReferences(),group:h.key}),h.key);l.$_terms.keys=new i.Keys(...d.nodes)}},manifest:{build(l,d){if(d.keys&&(l=l.keys(d.keys)),d.dependencies)for(const{rel:h,key:g=null,peers:w,options:S}of d.dependencies)l=i.dependency(l,h,g,w,S);if(d.patterns)for(const{regex:h,schema:g,rule:w,fallthrough:S,matches:m}of d.patterns)l=l.pattern(h||g,w,{fallthrough:S,matches:m});if(d.renames)for(const{from:h,to:g,options:w}of d.renames)l=l.rename(h,g,w);return l}},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}}"}}),i.clone=function(l,d){if(typeof l=="object"){if(d.nonEnumerables)return f(l,{shallow:!0});const g=Object.create(Object.getPrototypeOf(l));return Object.assign(g,l),g}const h=function(...g){return l.apply(this,g)};return h.prototype=f(l.prototype),Object.defineProperty(h,"name",{value:l.name,writable:!1}),Object.defineProperty(h,"length",{value:l.length,writable:!1}),Object.assign(h,l),h},i.dependency=function(l,d,h,g,w){p(h===null||typeof h=="string",d,"key must be a strings"),w||(w=g.length>1&&typeof g[g.length-1]=="object"?g.pop():{}),a.assertOptions(w,["separator","isPresent"]),g=[].concat(g);const S=a.default(w.separator,"."),m=[];for(const b of g)p(typeof b=="string",d,"peers must be strings"),m.push(r.ref(b,{separator:S,ancestor:0,prefix:!1}));h!==null&&(h=r.ref(h,{separator:S,ancestor:0,prefix:!1}));const v=l.clone();return v.$_terms.dependencies=v.$_terms.dependencies||[],v.$_terms.dependencies.push(new i.Dependency(d,h,m,g,w)),v},i.dependencies={and(l,d,h,g,w){const S=[],m=[],v=d.peers.length,b=i.isPresent(d.options);for(const C of d.peers)b(C.resolve(h,g,w,null,{shadow:!1}))===!1?S.push(C.key):m.push(C.key);if(S.length!==v&&m.length!==v)return{code:"object.and",context:{present:m,presentWithLabels:i.keysToLabels(l,m),missing:S,missingWithLabels:i.keysToLabels(l,S)}}},nand(l,d,h,g,w){const S=[],m=i.isPresent(d.options);for(const C of d.peers)m(C.resolve(h,g,w,null,{shadow:!1}))&&S.push(C.key);if(S.length!==d.peers.length)return;const v=d.paths[0],b=d.paths.slice(1);return{code:"object.nand",context:{main:v,mainWithLabel:i.keysToLabels(l,v),peers:b,peersWithLabels:i.keysToLabels(l,b)}}},or(l,d,h,g,w){const S=i.isPresent(d.options);for(const m of d.peers)if(S(m.resolve(h,g,w,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)}}},oxor(l,d,h,g,w){const S=[],m=i.isPresent(d.options);for(const b of d.peers)m(b.resolve(h,g,w,null,{shadow:!1}))&&S.push(b.key);if(!S.length||S.length===1)return;const v={peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)};return v.present=S,v.presentWithLabels=i.keysToLabels(l,S),{code:"object.oxor",context:v}},with(l,d,h,g,w){const S=i.isPresent(d.options);for(const m of d.peers)if(S(m.resolve(h,g,w,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:d.key.key,mainWithLabel:i.keysToLabels(l,d.key.key),peer:m.key,peerWithLabel:i.keysToLabels(l,m.key)}}},without(l,d,h,g,w){const S=i.isPresent(d.options);for(const m of d.peers)if(S(m.resolve(h,g,w,null,{shadow:!1})))return{code:"object.without",context:{main:d.key.key,mainWithLabel:i.keysToLabels(l,d.key.key),peer:m.key,peerWithLabel:i.keysToLabels(l,m.key)}}},xor(l,d,h,g,w){const S=[],m=i.isPresent(d.options);for(const b of d.peers)m(b.resolve(h,g,w,null,{shadow:!1}))&&S.push(b.key);if(S.length===1)return;const v={peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)};return S.length===0?{code:"object.missing",context:v}:(v.present=S,v.presentWithLabels=i.keysToLabels(l,S),{code:"object.xor",context:v})}},i.keysToLabels=function(l,d){return Array.isArray(d)?d.map(h=>l.$_mapLabels(h)):l.$_mapLabels(d)},i.isPresent=function(l){return typeof l.isPresent=="function"?l.isPresent:d=>d!==void 0},i.rename=function(l,d,h,g,w){const S={};for(const m of l.$_terms.renames){const v=[],b=typeof m.from!="string";if(b)for(const C in d){if(d[C]===void 0&&m.options.ignoreUndefined||C===m.to)continue;const P=m.from.exec(C);P&&v.push({from:C,to:m.to,match:P})}else!Object.prototype.hasOwnProperty.call(d,m.from)||d[m.from]===void 0&&m.options.ignoreUndefined||v.push(m);for(const C of v){const P=C.from;let $=C.to;if($ instanceof c&&($=$.render(d,h,g,C.match)),P!==$){if(!m.options.multiple&&S[$]&&(w.push(l.$_createError("object.rename.multiple",d,{from:P,to:$,pattern:b},h,g)),g.abortEarly)||Object.prototype.hasOwnProperty.call(d,$)&&!m.options.override&&!S[$]&&(w.push(l.$_createError("object.rename.override",d,{from:P,to:$,pattern:b},h,g)),g.abortEarly))return!1;d[P]===void 0?delete d[$]:d[$]=d[P],S[$]=!0,m.options.alias||delete d[P]}}}return!0},i.unknown=function(l,d,h,g,w,S){if(l.$_terms.patterns){let m=!1;const v=l.$_terms.patterns.map(C=>{if(C.matches)return m=!0,[]}),b=[d,...w.ancestors];for(const C of h){const P=d[C],$=[...w.path,C];for(let D=0;D<l.$_terms.patterns.length;++D){const M=l.$_terms.patterns[D];if(M.regex){const H=M.regex.test(C);if(w.mainstay.tracer.debug(w,"rule",`pattern.${D}`,H?"pass":"error"),!H)continue}else if(!M.schema.$_match(C,w.nest(M.schema,`pattern.${D}`),S))continue;h.delete(C);const U=w.localize($,b,{schema:M.rule,key:C}),z=M.rule.$_validate(P,U,S);if(z.errors){if(S.abortEarly)return{value:d,errors:z.errors};g.push(...z.errors)}if(M.matches&&v[D].push(C),d[C]=z.value,!M.fallthrough)break}}if(m)for(let C=0;C<v.length;++C){const P=v[C];if(!P)continue;const $=l.$_terms.patterns[C].matches,D=w.localize(w.path,b,$),M=$.$_validate(P,D,S);if(M.errors){const U=n.details(M.errors,{override:!1});U.matches=P;const z=l.$_createError("object.pattern.match",d,U,w,S);if(S.abortEarly)return{value:d,errors:z};g.push(z)}}}if(h.size&&(l.$_terms.keys||l.$_terms.patterns)){if(S.stripUnknown&&l._flags.unknown===void 0||S.skipFunctions){const m=!(!S.stripUnknown||S.stripUnknown!==!0&&!S.stripUnknown.objects);for(const v of h)m?(delete d[v],h.delete(v)):typeof d[v]=="function"&&h.delete(v)}if(!a.default(l._flags.unknown,S.allowUnknown))for(const m of h){const v=w.localize([...w.path,m],[]),b=l.$_createError("object.unknown",d[m],{child:m},v,S,{flags:!1});if(S.abortEarly)return{value:d,errors:b};g.push(b)}}},i.Dependency=class{constructor(l,d,h,g,w){this.rel=l,this.key=d,this.peers=h,this.paths=g,this.options=w}describe(){const l={rel:this.rel,peers:this.paths};return this.key!==null&&(l.key=this.key.key),this.peers[0].separator!=="."&&(l.options={...l.options,separator:this.peers[0].separator}),this.options.isPresent&&(l.options={...l.options,isPresent:this.options.isPresent}),l}},i.Keys=class extends Array{concat(l){const d=this.slice(),h=new Map;for(let g=0;g<d.length;++g)h.set(d[g].key,g);for(const g of l){const w=g.key,S=h.get(w);S!==void 0?d[S]={key:w,schema:d[S].schema.concat(g.schema)}:d.push(g)}return d}}},8785:(j,y,x)=>{const o=x(375),p=x(8068),f=x(8160),u=x(3292),t=x(6354),a={};j.exports=p.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(r,n)=>r.ref(n),validate(r,{schema:n,state:s,prefs:c}){o(n.$_terms.link,"Uninitialized link schema");const i=a.generate(n,r,s,c),l=n.$_terms.link[0].ref;return i.$_validate(r,s.nest(i,`link:${l.display}:${i.type}`),c)},generate:(r,n,s,c)=>a.generate(r,n,s,c),rules:{ref:{method(r){o(!this.$_terms.link,"Cannot reinitialize schema"),r=u.ref(r),o(r.type==="value"||r.type==="local","Invalid reference type:",r.type),o(r.type==="local"||r.ancestor==="root"||r.ancestor>0,"Link cannot reference itself");const n=this.clone();return n.$_terms.link=[{ref:r}],n}},relative:{method(r=!0){return this.$_setFlag("relative",r)}}},overrides:{concat(r){o(this.$_terms.link,"Uninitialized link schema"),o(f.isSchema(r),"Invalid schema object"),o(r.type!=="link","Cannot merge type link with another link");const n=this.clone();return n.$_terms.whens||(n.$_terms.whens=[]),n.$_terms.whens.push({concat:r}),n.$_mutateRebuild()}},manifest:{build:(r,n)=>(o(n.link,"Invalid link description missing link"),r.ref(n.link))}}),a.generate=function(r,n,s,c){let i=s.mainstay.links.get(r);if(i)return i._generate(n,s,c).schema;const l=r.$_terms.link[0].ref,{perspective:d,path:h}=a.perspective(l,s);a.assert(d,"which is outside of schema boundaries",l,r,s,c);try{i=h.length?d.$_reach(h):d}catch{a.assert(!1,"to non-existing schema",l,r,s,c)}return a.assert(i.type!=="link","which is another link",l,r,s,c),r._flags.relative||s.mainstay.links.set(r,i),i._generate(n,s,c).schema},a.perspective=function(r,n){if(r.type==="local"){for(const{schema:s,key:c}of n.schemas){if((s._flags.id||c)===r.path[0])return{perspective:s,path:r.path.slice(1)};if(s.$_terms.shared){for(const i of s.$_terms.shared)if(i._flags.id===r.path[0])return{perspective:i,path:r.path.slice(1)}}}return{perspective:null,path:null}}return r.ancestor==="root"?{perspective:n.schemas[n.schemas.length-1].schema,path:r.path}:{perspective:n.schemas[r.ancestor]&&n.schemas[r.ancestor].schema,path:r.path}},a.assert=function(r,n,s,c,i,l){r||o(!1,`"${t.label(c._flags,i,l)}" contains link reference "${s.display}" ${n}`)}},3832:(j,y,x)=>{const o=x(375),p=x(8068),f=x(8160),u={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(t){const a=t.toString(),r=a.indexOf("."),n=a.indexOf("e");return(r<0?0:(n<0?a.length:n)-r-1)+(n<0?0:Math.max(0,-parseInt(a.slice(n+1))))}};j.exports=p.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:a,error:r}){if(!t.match(u.numberRx))return;t=t.trim();const n={value:parseFloat(t)};if(n.value===0&&(n.value=0),!a._flags.unsafe)if(t.match(/e/i)){if(u.extractSignificantDigits(t)!==u.extractSignificantDigits(String(n.value)))return n.errors=r("number.unsafe"),n}else{const s=n.value.toString();if(s.match(/e/i))return n;if(s!==u.normalizeDecimal(t))return n.errors=r("number.unsafe"),n}return n}},validate(t,{schema:a,error:r,prefs:n}){if(t===1/0||t===-1/0)return{value:t,errors:r("number.infinity")};if(!f.isNumber(t))return{value:t,errors:r("number.base")};const s={value:t};if(n.convert){const c=a.$_getRule("precision");if(c){const i=Math.pow(10,c.args.limit);s.value=Math.round(s.value*i)/i}}return s.value===0&&(s.value=0),!a._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(s.errors=r("number.unsafe")),s},rules:{compare:{method:!1,validate:(t,a,{limit:r},{name:n,operator:s,args:c})=>f.compare(t,r,s)?t:a.error("number."+n,{limit:c.limit,value:t}),args:[{name:"limit",ref:!0,assert:f.isNumber,message:"must be a number"}]},greater:{method(t){return this.$_addRule({name:"greater",method:"compare",args:{limit:t},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(t,a)=>Math.trunc(t)-t==0?t:a.error("number.integer")},less:{method(t){return this.$_addRule({name:"less",method:"compare",args:{limit:t},operator:"<"})}},max:{method(t){return this.$_addRule({name:"max",method:"compare",args:{limit:t},operator:"<="})}},min:{method(t){return this.$_addRule({name:"min",method:"compare",args:{limit:t},operator:">="})}},multiple:{method(t){const a=typeof t=="number"?u.decimalPlaces(t):null,r=Math.pow(10,a);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:a,pfactor:r}})},validate:(t,a,{base:r,baseDecimalPlace:n,pfactor:s},c)=>u.decimalPlaces(t)>n?a.error("number.multiple",{multiple:c.args.base,value:t}):Math.round(s*t)%Math.round(s*r)==0?t:a.error("number.multiple",{multiple:c.args.base,value:t}),args:[{name:"base",ref:!0,assert:t=>typeof t=="number"&&isFinite(t)&&t>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(t,a)=>Number.isSafeInteger(t)&&t>=0&&t<=65535?t:a.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(t){return o(Number.isSafeInteger(t),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:t}})},validate(t,a,{limit:r}){const n=t.toString().match(u.precisionRx);return Math.max((n[1]?n[1].length:0)-(n[2]?parseInt(n[2],10):0),0)<=r?t:a.error("number.precision",{limit:r,value:t})},convert:!0},sign:{method(t){return o(["negative","positive"].includes(t),"Invalid sign",t),this.$_addRule({name:"sign",args:{sign:t}})},validate:(t,a,{sign:r})=>r==="negative"&&t<0||r==="positive"&&t>0?t:a.error(`number.${r}`)},unsafe:{method(t=!0){return o(typeof t=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",t)}}},cast:{string:{from:t=>typeof t=="number",to:(t,a)=>t.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),u.extractSignificantDigits=function(t){return t.replace(u.exponentialPartRegex,"").replace(u.dotRegex,"").replace(u.trailingZerosRegex,"").replace(u.leadingSignAndZerosRegex,"")},u.normalizeDecimal=function(t){return(t=t.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&t.endsWith("0")&&(t=t.replace(/0+$/,"")),t==="-0"?"0":t}},8966:(j,y,x)=>{const o=x(7824);j.exports=o.extend({type:"object",cast:{map:{from:p=>p&&typeof p=="object",to:(p,f)=>new Map(Object.entries(p))}}})},7417:(j,y,x)=>{const o=x(375),p=x(5380),f=x(1745),u=x(9959),t=x(6064),a=x(9926),r=x(5752),n=x(8068),s=x(8160),c={tlds:a instanceof Set&&{tlds:{allow:a,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:u.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=n.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(i,{schema:l,state:d,prefs:h}){const g=l.$_getRule("normalize");g&&(i=i.normalize(g.args.form));const w=l.$_getRule("case");w&&(i=w.args.direction==="upper"?i.toLocaleUpperCase():i.toLocaleLowerCase());const S=l.$_getRule("trim");if(S&&S.args.enabled&&(i=i.trim()),l.$_terms.replacements)for(const v of l.$_terms.replacements)i=i.replace(v.pattern,v.replacement);const m=l.$_getRule("hex");if(m&&m.args.options.byteAligned&&i.length%2!=0&&(i=`0${i}`),l.$_getRule("isoDate")){const v=c.isoDate(i);v&&(i=v)}if(l._flags.truncate){const v=l.$_getRule("max");if(v){let b=v.args.limit;if(s.isResolvable(b)&&(b=b.resolve(i,d,h),!s.limit(b)))return{value:i,errors:l.$_createError("any.ref",b,{ref:v.args.limit,arg:"limit",reason:"must be a positive integer"},d,h)};i=i.slice(0,b)}}return{value:i}}},validate(i,{schema:l,error:d}){if(typeof i!="string")return{value:i,errors:d("string.base")};if(i===""){const h=l.$_getRule("min");return h&&h.args.limit===0?void 0:{value:i,errors:d("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(i,l)=>/^[a-zA-Z0-9]+$/.test(i)?i:l.error("string.alphanum")},base64:{method(i={}){return s.assertOptions(i,["paddingRequired","urlSafe"]),i={urlSafe:!1,paddingRequired:!0,...i},o(typeof i.paddingRequired=="boolean","paddingRequired must be boolean"),o(typeof i.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:i}})},validate:(i,l,{options:d})=>c.base64Regex[d.paddingRequired][d.urlSafe].test(i)?i:l.error("string.base64")},case:{method(i){return o(["lower","upper"].includes(i),"Invalid case:",i),this.$_addRule({name:"case",args:{direction:i}})},validate:(i,l,{direction:d})=>d==="lower"&&i===i.toLocaleLowerCase()||d==="upper"&&i===i.toLocaleUpperCase()?i:l.error(`string.${d}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(i,l){let d=i.length,h=0,g=1;for(;d--;){const w=i.charAt(d)*g;h+=w-9*(w>9),g^=3}return h>0&&h%10==0?i:l.error("string.creditCard")}},dataUri:{method(i={}){return s.assertOptions(i,["paddingRequired"]),i={paddingRequired:!0,...i},o(typeof i.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:i}})},validate(i,l,{options:d}){const h=i.match(c.dataUriRegex);return h&&(!h[2]||h[2]!=="base64"||c.base64Regex[d.paddingRequired].false.test(h[3]))?i:l.error("string.dataUri")}},domain:{method(i){i&&s.assertOptions(i,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const l=c.addressOptions(i);return this.$_addRule({name:"domain",args:{options:i},address:l})},validate:(i,l,d,{address:h})=>p.isValid(i,h)?i:l.error("string.domain")},email:{method(i={}){s.assertOptions(i,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),o(i.multiple===void 0||typeof i.multiple=="boolean","multiple option must be an boolean");const l=c.addressOptions(i),d=new RegExp(`\\s*[${i.separator?t(i.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:i},regex:d,address:l})},validate(i,l,{options:d},{regex:h,address:g}){const w=d.multiple?i.split(h):[i],S=[];for(const m of w)f.isValid(m,g)||S.push(m);return S.length?l.error("string.email",{value:i,invalids:S}):i}},guid:{alias:"uuid",method(i={}){s.assertOptions(i,["version","separator"]);let l="";if(i.version){const g=[].concat(i.version);o(g.length>=1,"version must have at least 1 valid version specified");const w=new Set;for(let S=0;S<g.length;++S){const m=g[S];o(typeof m=="string","version at position "+S+" must be a string");const v=c.guidVersions[m.toLowerCase()];o(v,"version at position "+S+" must be one of "+Object.keys(c.guidVersions).join(", ")),o(!w.has(v),"version at position "+S+" must not be a duplicate"),l+=v,w.add(v)}}o(c.guidSeparators.has(i.separator),'separator must be one of true, false, "-", or ":"');const d=i.separator===void 0?"[:-]?":i.separator===!0?"[:-]":i.separator===!1?"[]?":`\\${i.separator}`,h=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${d})[0-9A-F]{4}\\2?[${l||"0-9A-F"}][0-9A-F]{3}\\2?[${l?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:i},regex:h})},validate(i,l,d,{regex:h}){const g=h.exec(i);return g?c.guidBrackets[g[1]]!==g[g.length-1]?l.error("string.guid"):i:l.error("string.guid")}},hex:{method(i={}){return s.assertOptions(i,["byteAligned","prefix"]),i={byteAligned:!1,prefix:!1,...i},o(typeof i.byteAligned=="boolean","byteAligned must be boolean"),o(typeof i.prefix=="boolean"||i.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:i}})},validate:(i,l,{options:d})=>(d.prefix==="optional"?c.hexRegex.withOptionalPrefix:d.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(i)?d.byteAligned&&i.length%2!=0?l.error("string.hexAlign"):i:l.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(i,l)=>p.isValid(i,{minDomainSegments:1})||c.ipRegex.test(i)?i:l.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(i={}){s.assertOptions(i,["cidr","version"]);const{cidr:l,versions:d,regex:h}=u.regex(i),g=i.version?d:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:l,version:g}},regex:h})},validate:(i,l,{options:d},{regex:h})=>h.test(i)?i:d.version?l.error("string.ipVersion",{value:i,cidr:d.cidr,version:d.version}):l.error("string.ip",{value:i,cidr:d.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(i,{error:l})=>c.isoDate(i)?i:l("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(i,l)=>c.isoDurationRegex.test(i)?i:l.error("string.isoDuration")},length:{method(i,l){return c.length(this,"length",i,"=",l)},validate(i,l,{limit:d,encoding:h},{name:g,operator:w,args:S}){const m=!h&&i.length;return s.compare(m,d,w)?i:l.error("string."+g,{limit:S.limit,value:i,encoding:h})},args:[{name:"limit",ref:!0,assert:s.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(i,l){return c.length(this,"max",i,"<=",l)},args:["limit","encoding"]},min:{method(i,l){return c.length(this,"min",i,">=",l)},args:["limit","encoding"]},normalize:{method(i="NFC"){return o(c.normalizationForms.includes(i),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:i}})},validate:(i,{error:l},{form:d})=>i===i.normalize(d)?i:l("string.normalize",{value:i,form:d}),convert:!0},pattern:{alias:"regex",method(i,l={}){o(i instanceof RegExp,"regex must be a RegExp"),o(!i.flags.includes("g")&&!i.flags.includes("y"),"regex should not use global or sticky mode"),typeof l=="string"&&(l={name:l}),s.assertOptions(l,["invert","name"]);const d=["string.pattern",l.invert?".invert":"",l.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:i,options:l},errorCode:d})},validate:(i,l,{regex:d,options:h},{errorCode:g})=>d.test(i)^h.invert?i:l.error(g,{name:h.name,regex:d,value:i}),args:["regex","options"],multi:!0},replace:{method(i,l){typeof i=="string"&&(i=new RegExp(t(i),"g")),o(i instanceof RegExp,"pattern must be a RegExp"),o(typeof l=="string","replacement must be a String");const d=this.clone();return d.$_terms.replacements||(d.$_terms.replacements=[]),d.$_terms.replacements.push({pattern:i,replacement:l}),d}},token:{method(){return this.$_addRule("token")},validate:(i,l)=>/^\w+$/.test(i)?i:l.error("string.token")},trim:{method(i=!0){return o(typeof i=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:i}})},validate:(i,l,{enabled:d})=>d&&i!==i.trim()?l.error("string.trim"):i,convert:!0},truncate:{method(i=!0){return o(typeof i=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",i)}},uppercase:{method(){return this.case("upper")}},uri:{method(i={}){s.assertOptions(i,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),i.domain&&s.assertOptions(i.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:l,scheme:d}=r.regex(i),h=i.domain?c.addressOptions(i.domain):null;return this.$_addRule({name:"uri",args:{options:i},regex:l,domain:h,scheme:d})},validate(i,l,{options:d},{regex:h,domain:g,scheme:w}){if(["http:/","https:/"].includes(i))return l.error("string.uri");let S=h.exec(i);if(!S&&l.prefs.convert&&d.encodeUri){const m=encodeURI(i);S=h.exec(m),S&&(i=m)}if(S){const m=S[1]||S[2];return!g||d.allowRelative&&!m||p.isValid(m,g)?i:l.error("string.domain",{value:m})}return d.relativeOnly?l.error("string.uriRelativeOnly"):d.scheme?l.error("string.uriCustomScheme",{scheme:w,value:i}):l.error("string.uri")}}},manifest:{build(i,l){if(l.replacements)for(const{pattern:d,replacement:h}of l.replacements)i=i.replace(d,h);return i}},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"}}),c.addressOptions=function(i){if(!i)return c.tlds||i;if(o(i.minDomainSegments===void 0||Number.isSafeInteger(i.minDomainSegments)&&i.minDomainSegments>0,"minDomainSegments must be a positive integer"),o(i.maxDomainSegments===void 0||Number.isSafeInteger(i.maxDomainSegments)&&i.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),i.tlds===!1)return i;if(i.tlds===!0||i.tlds===void 0)return o(c.tlds,"Built-in TLD list disabled"),Object.assign({},i,c.tlds);o(typeof i.tlds=="object","tlds must be true, false, or an object");const l=i.tlds.deny;if(l)return Array.isArray(l)&&(i=Object.assign({},i,{tlds:{deny:new Set(l)}})),o(i.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),o(!i.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(i.tlds.deny,"tlds.deny"),i;const d=i.tlds.allow;return d?d===!0?(o(c.tlds,"Built-in TLD list disabled"),Object.assign({},i,c.tlds)):(Array.isArray(d)&&(i=Object.assign({},i,{tlds:{allow:new Set(d)}})),o(i.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(i.tlds.allow,"tlds.allow"),i):i},c.validateTlds=function(i,l){for(const d of i)o(p.isValid(d,{minDomainSegments:1,maxDomainSegments:1}),`${l} must contain valid top level domain names`)},c.isoDate=function(i){if(!s.isIsoDate(i))return null;/.*T.*[+-]\d\d$/.test(i)&&(i+="00");const l=new Date(i);return isNaN(l.getTime())?null:l.toISOString()},c.length=function(i,l,d,h,g){return o(!g||!1,"Invalid encoding:",g),i.$_addRule({name:l,method:"length",args:{limit:d,encoding:g},operator:h})}},8826:(j,y,x)=>{const o=x(375),p=x(8068),f={};f.Map=class extends Map{slice(){return new f.Map(this)}},j.exports=p.extend({type:"symbol",terms:{map:{init:new f.Map}},coerce:{method(u,{schema:t,error:a}){const r=t.$_terms.map.get(u);return r&&(u=r),t._flags.only&&typeof u!="symbol"?{value:u,errors:a("symbol.map",{map:t.$_terms.map})}:{value:u}}},validate(u,{error:t}){if(typeof u!="symbol")return{value:u,errors:t("symbol.base")}},rules:{map:{method(u){u&&!u[Symbol.iterator]&&typeof u=="object"&&(u=Object.entries(u)),o(u&&u[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),a=[];for(const r of u){o(r&&r[Symbol.iterator],"Entry must be an iterable");const[n,s]=r;o(typeof n!="object"&&typeof n!="function"&&typeof n!="symbol","Key must not be of type object, function, or Symbol"),o(typeof s=="symbol","Value must be a Symbol"),t.$_terms.map.set(n,s),a.push(s)}return t.valid(...a)}}},manifest:{build:(u,t)=>(t.map&&(u=u.map(t.map)),u)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(j,y,x)=>{const o=x(375),p=x(8571),f=x(738),u=x(9621),t=x(8160),a=x(6354),r=x(493),n={result:Symbol("result")};y.entry=function(s,c,i){let l=t.defaults;i&&(o(i.warnings===void 0,"Cannot override warnings preference in synchronous validation"),o(i.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),l=t.preferences(t.defaults,i));const d=n.entry(s,c,l);o(!d.mainstay.externals.length,"Schema with external rules must use validateAsync()");const h={value:d.value};return d.error&&(h.error=d.error),d.mainstay.warnings.length&&(h.warning=a.details(d.mainstay.warnings)),d.mainstay.debug&&(h.debug=d.mainstay.debug),d.mainstay.artifacts&&(h.artifacts=d.mainstay.artifacts),h},y.entryAsync=async function(s,c,i){let l=t.defaults;i&&(l=t.preferences(t.defaults,i));const d=n.entry(s,c,l),h=d.mainstay;if(d.error)throw h.debug&&(d.error.debug=h.debug),d.error;if(h.externals.length){let w=d.value;const S=[];for(const m of h.externals){const v=m.state.path,b=m.schema.type==="link"?h.links.get(m.schema):null;let C,P,$=w;const D=v.length?[w]:[],M=v.length?u(s,v):s;if(v.length){C=v[v.length-1];let U=w;for(const z of v.slice(0,-1))U=U[z],D.unshift(U);P=D[0],$=P[C]}try{const U=(H,I)=>(b||m.schema).$_createError(H,$,I,m.state,l),z=await m.method($,{schema:m.schema,linked:b,state:m.state,prefs:i,original:M,error:U,errorsArray:n.errorsArray,warn:(H,I)=>h.warnings.push((b||m.schema).$_createError(H,$,I,m.state,l)),message:(H,I)=>(b||m.schema).$_createError("external",$,I,m.state,l,{messages:H})});if(z===void 0||z===$)continue;if(z instanceof a.Report){if(h.tracer.log(m.schema,m.state,"rule","external","error"),S.push(z),l.abortEarly)break;continue}if(Array.isArray(z)&&z[t.symbols.errors]){if(h.tracer.log(m.schema,m.state,"rule","external","error"),S.push(...z),l.abortEarly)break;continue}P?(h.tracer.value(m.state,"rule",$,z,"external"),P[C]=z):(h.tracer.value(m.state,"rule",w,z,"external"),w=z)}catch(U){throw l.errors.label&&(U.message+=` (${m.label})`),U}}if(d.value=w,S.length)throw d.error=a.process(S,s,l),h.debug&&(d.error.debug=h.debug),d.error}if(!l.warnings&&!l.debug&&!l.artifacts)return d.value;const g={value:d.value};return h.warnings.length&&(g.warning=a.details(h.warnings)),h.debug&&(g.debug=h.debug),h.artifacts&&(g.artifacts=h.artifacts),g},n.Mainstay=class{constructor(s,c,i){this.externals=[],this.warnings=[],this.tracer=s,this.debug=c,this.links=i,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const s=this._snapshots.pop();this.externals=s.externals,this.warnings=s.warnings}commit(){this._snapshots.pop()}},n.entry=function(s,c,i){const{tracer:l,cleanup:d}=n.tracer(c,i),h=i.debug?[]:null,g=c._ids._schemaChain?new Map:null,w=new n.Mainstay(l,h,g),S=c._ids._schemaChain?[{schema:c}]:null,m=new r([],[],{mainstay:w,schemas:S}),v=y.validate(s,c,m,i);d&&c.$_root.untrace();const b=a.process(v.errors,s,i);return{value:v.value,error:b,mainstay:w}},n.tracer=function(s,c){return s.$_root._tracer?{tracer:s.$_root._tracer._register(s)}:c.debug?(o(s.$_root.trace,"Debug mode not supported"),{tracer:s.$_root.trace()._register(s),cleanup:!0}):{tracer:n.ignore}},y.validate=function(s,c,i,l,d={}){if(c.$_terms.whens&&(c=c._generate(s,i,l).schema),c._preferences&&(l=n.prefs(c,l)),c._cache&&l.cache){const b=c._cache.get(s);if(i.mainstay.tracer.debug(i,"validate","cached",!!b),b)return b}const h=(b,C,P)=>c.$_createError(b,s,C,P||i,l),g={original:s,prefs:l,schema:c,state:i,error:h,errorsArray:n.errorsArray,warn:(b,C,P)=>i.mainstay.warnings.push(h(b,C,P)),message:(b,C)=>c.$_createError("custom",s,C,i,l,{messages:b})};i.mainstay.tracer.entry(c,i);const w=c._definition;if(w.prepare&&s!==void 0&&l.convert){const b=w.prepare(s,g);if(b){if(i.mainstay.tracer.value(i,"prepare",s,b.value),b.errors)return n.finalize(b.value,[].concat(b.errors),g);s=b.value}}if(w.coerce&&s!==void 0&&l.convert&&(!w.coerce.from||w.coerce.from.includes(typeof s))){const b=w.coerce.method(s,g);if(b){if(i.mainstay.tracer.value(i,"coerced",s,b.value),b.errors)return n.finalize(b.value,[].concat(b.errors),g);s=b.value}}const S=c._flags.empty;S&&S.$_match(n.trim(s,c),i.nest(S),t.defaults)&&(i.mainstay.tracer.value(i,"empty",s,void 0),s=void 0);const m=d.presence||c._flags.presence||(c._flags._endedSwitch?null:l.presence);if(s===void 0){if(m==="forbidden")return n.finalize(s,null,g);if(m==="required")return n.finalize(s,[c.$_createError("any.required",s,null,i,l)],g);if(m==="optional"){if(c._flags.default!==t.symbols.deepDefault)return n.finalize(s,null,g);i.mainstay.tracer.value(i,"default",s,{}),s={}}}else if(m==="forbidden")return n.finalize(s,[c.$_createError("any.unknown",s,null,i,l)],g);const v=[];if(c._valids){const b=c._valids.get(s,i,l,c._flags.insensitive);if(b)return l.convert&&(i.mainstay.tracer.value(i,"valids",s,b.value),s=b.value),i.mainstay.tracer.filter(c,i,"valid",b),n.finalize(s,null,g);if(c._flags.only){const C=c.$_createError("any.only",s,{valids:c._valids.values({display:!0})},i,l);if(l.abortEarly)return n.finalize(s,[C],g);v.push(C)}}if(c._invalids){const b=c._invalids.get(s,i,l,c._flags.insensitive);if(b){i.mainstay.tracer.filter(c,i,"invalid",b);const C=c.$_createError("any.invalid",s,{invalids:c._invalids.values({display:!0})},i,l);if(l.abortEarly)return n.finalize(s,[C],g);v.push(C)}}if(w.validate){const b=w.validate(s,g);if(b&&(i.mainstay.tracer.value(i,"base",s,b.value),s=b.value,b.errors)){if(!Array.isArray(b.errors))return v.push(b.errors),n.finalize(s,v,g);if(b.errors.length)return v.push(...b.errors),n.finalize(s,v,g)}}return c._rules.length?n.rules(s,v,g):n.finalize(s,v,g)},n.rules=function(s,c,i){const{schema:l,state:d,prefs:h}=i;for(const g of l._rules){const w=l._definition.rules[g.method];if(w.convert&&h.convert){d.mainstay.tracer.log(l,d,"rule",g.name,"full");continue}let S,m=g.args;if(g._resolve.length){m=Object.assign({},m);for(const b of g._resolve){const C=w.argsByName.get(b),P=m[b].resolve(s,d,h),$=C.normalize?C.normalize(P):P,D=t.validateArg($,null,C);if(D){S=l.$_createError("any.ref",P,{arg:b,ref:m[b],reason:D},d,h);break}m[b]=$}}S=S||w.validate(s,i,m,g);const v=n.rule(S,g);if(v.errors){if(d.mainstay.tracer.log(l,d,"rule",g.name,"error"),g.warn){d.mainstay.warnings.push(...v.errors);continue}if(h.abortEarly)return n.finalize(s,v.errors,i);c.push(...v.errors)}else d.mainstay.tracer.log(l,d,"rule",g.name,"pass"),d.mainstay.tracer.value(d,"rule",s,v.value,g.name),s=v.value}return n.finalize(s,c,i)},n.rule=function(s,c){return s instanceof a.Report?(n.error(s,c),{errors:[s],value:null}):Array.isArray(s)&&s[t.symbols.errors]?(s.forEach(i=>n.error(i,c)),{errors:s,value:null}):{errors:null,value:s}},n.error=function(s,c){return c.message&&s._setTemplate(c.message),s},n.finalize=function(s,c,i){c=c||[];const{schema:l,state:d,prefs:h}=i;if(c.length){const w=n.default("failover",void 0,c,i);w!==void 0&&(d.mainstay.tracer.value(d,"failover",s,w),s=w,c=[])}if(c.length&&l._flags.error)if(typeof l._flags.error=="function"){c=l._flags.error(c),Array.isArray(c)||(c=[c]);for(const w of c)o(w instanceof Error||w instanceof a.Report,"error() must return an Error object")}else c=[l._flags.error];if(s===void 0){const w=n.default("default",s,c,i);d.mainstay.tracer.value(d,"default",s,w),s=w}if(l._flags.cast&&s!==void 0){const w=l._definition.cast[l._flags.cast];if(w.from(s)){const S=w.to(s,i);d.mainstay.tracer.value(d,"cast",s,S,l._flags.cast),s=S}}if(l.$_terms.externals&&h.externals&&h._externals!==!1)for(const{method:w}of l.$_terms.externals)d.mainstay.externals.push({method:w,schema:l,state:d,label:a.label(l._flags,d,h)});const g={value:s,errors:c.length?c:null};return l._flags.result&&(g.value=l._flags.result==="strip"?void 0:i.original,d.mainstay.tracer.value(d,l._flags.result,s,g.value),d.shadow(s,l._flags.result)),l._cache&&h.cache!==!1&&!l._refs.length&&l._cache.set(i.original,g),s===void 0||g.errors||l._flags.artifact===void 0||(d.mainstay.artifacts=d.mainstay.artifacts||new Map,d.mainstay.artifacts.has(l._flags.artifact)||d.mainstay.artifacts.set(l._flags.artifact,[]),d.mainstay.artifacts.get(l._flags.artifact).push(d.path)),g},n.prefs=function(s,c){const i=c===t.defaults;return i&&s._preferences[t.symbols.prefs]?s._preferences[t.symbols.prefs]:(c=t.preferences(c,s._preferences),i&&(s._preferences[t.symbols.prefs]=c),c)},n.default=function(s,c,i,l){const{schema:d,state:h,prefs:g}=l,w=d._flags[s];if(g.noDefaults||w===void 0)return c;if(h.mainstay.tracer.log(d,h,"rule",s,"full"),!w)return w;if(typeof w=="function"){const S=w.length?[p(h.ancestors[0]),l]:[];try{return w(...S)}catch(m){return void i.push(d.$_createError(`any.${s}`,null,{error:m},h,g))}}return typeof w!="object"?w:w[t.symbols.literal]?w.literal:t.isResolvable(w)?w.resolve(c,h,g):p(w)},n.trim=function(s,c){if(typeof s!="string")return s;const i=c.$_getRule("trim");return i&&i.args.enabled?s.trim():s},n.ignore={active:!1,debug:f,entry:f,filter:f,log:f,resolve:f,value:f},n.errorsArray=function(){const s=[];return s[t.symbols.errors]=!0,s}},2036:(j,y,x)=>{const o=x(375),p=x(9474),f=x(8160),u={};j.exports=u.Values=class{constructor(t,a){this._values=new Set(t),this._refs=new Set(a),this._lowercase=u.lowercases(t),this._override=!1}get length(){return this._values.size+this._refs.size}add(t,a){f.isResolvable(t)?this._refs.has(t)||(this._refs.add(t),a&&a.register(t)):this.has(t,null,null,!1)||(this._values.add(t),typeof t=="string"&&this._lowercase.set(t.toLowerCase(),t))}static merge(t,a,r){if(t=t||new u.Values,a){if(a._override)return a.clone();for(const n of[...a._values,...a._refs])t.add(n)}if(r)for(const n of[...r._values,...r._refs])t.remove(n);return t.length?t:null}remove(t){f.isResolvable(t)?this._refs.delete(t):(this._values.delete(t),typeof t=="string"&&this._lowercase.delete(t.toLowerCase()))}has(t,a,r,n){return!!this.get(t,a,r,n)}get(t,a,r,n){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&n){const s=this._lowercase.get(t.toLowerCase());if(s)return{value:s}}if(!this._refs.size&&typeof t!="object")return!1;if(typeof t=="object"){for(const s of this._values)if(p(s,t))return{value:s}}if(a)for(const s of this._refs){const c=s.resolve(t,a,r,null,{in:!0});if(c===void 0)continue;const i=s.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const l of i)if(typeof l==typeof t){if(n&&t&&typeof t=="string"){if(l.toLowerCase()===t.toLowerCase())return{value:l,ref:s}}else if(p(l,t))return{value:l,ref:s}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const a=[];for(const r of[...this._values,...this._refs])r!==void 0&&a.push(r);return a}return Array.from([...this._values,...this._refs])}clone(){const t=new u.Values(this._values,this._refs);return t._override=this._override,t}concat(t){o(!t._override,"Cannot concat override set of values");const a=new u.Values([...this._values,...t._values],[...this._refs,...t._refs]);return a._override=this._override,a}describe(){const t=[];this._override&&t.push({override:!0});for(const a of this._values.values())t.push(a&&typeof a=="object"?{value:a}:a);for(const a of this._refs.values())t.push(a.describe());return t}},u.Values.prototype[f.symbols.values]=!0,u.Values.prototype.slice=u.Values.prototype.clone,u.lowercases=function(t){const a=new Map;if(t)for(const r of t)typeof r=="string"&&a.set(r.toLowerCase(),r);return a}},978:(j,y,x)=>{const o=x(375),p=x(8571),f=x(1687),u=x(9621),t={};j.exports=function(a,r,n={}){if(o(a&&typeof a=="object","Invalid defaults value: must be an object"),o(!r||r===!0||typeof r=="object","Invalid source value: must be true, falsy or an object"),o(typeof n=="object","Invalid options: must be an object"),!r)return null;if(n.shallow)return t.applyToDefaultsWithShallow(a,r,n);const s=p(a);if(r===!0)return s;const c=n.nullOverride!==void 0&&n.nullOverride;return f(s,r,{nullOverride:c,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(a,r,n){const s=n.shallow;o(Array.isArray(s),"Invalid keys");const c=new Map,i=r===!0?null:new Set;for(let h of s){h=Array.isArray(h)?h:h.split(".");const g=u(a,h);g&&typeof g=="object"?c.set(g,i&&u(r,h)||g):i&&i.add(h)}const l=p(a,{},c);if(!i)return l;for(const h of i)t.reachCopy(l,r,h);const d=n.nullOverride!==void 0&&n.nullOverride;return f(l,r,{nullOverride:d,mergeArrays:!1})},t.reachCopy=function(a,r,n){for(const i of n){if(!(i in r))return;const l=r[i];if(typeof l!="object"||l===null)return;r=l}const s=r;let c=a;for(let i=0;i<n.length-1;++i){const l=n[i];typeof c[l]!="object"&&(c[l]={}),c=c[l]}c[n[n.length-1]]=s}},375:(j,y,x)=>{const o=x(7916);j.exports=function(p,...f){if(!p)throw f.length===1&&f[0]instanceof Error?f[0]:new o(f)}},8571:(j,y,x)=>{const o=x(9621),p=x(4277),f=x(7043),u={needsProtoHack:new Set([p.set,p.map,p.weakSet,p.weakMap])};j.exports=u.clone=function(t,a={},r=null){if(typeof t!="object"||t===null)return t;let n=u.clone,s=r;if(a.shallow){if(a.shallow!==!0)return u.cloneWithShallow(t,a);n=d=>d}else if(s){const d=s.get(t);if(d)return d}else s=new Map;const c=p.getInternalProto(t);if(c===p.buffer)return!1;if(c===p.date)return new Date(t.getTime());if(c===p.regex)return new RegExp(t);const i=u.base(t,c,a);if(i===t)return t;if(s&&s.set(t,i),c===p.set)for(const d of t)i.add(n(d,a,s));else if(c===p.map)for(const[d,h]of t)i.set(d,n(h,a,s));const l=f.keys(t,a);for(const d of l){if(d==="__proto__")continue;if(c===p.array&&d==="length"){i.length=t.length;continue}const h=Object.getOwnPropertyDescriptor(t,d);h?h.get||h.set?Object.defineProperty(i,d,h):h.enumerable?i[d]=n(t[d],a,s):Object.defineProperty(i,d,{enumerable:!1,writable:!0,configurable:!0,value:n(t[d],a,s)}):Object.defineProperty(i,d,{enumerable:!0,writable:!0,configurable:!0,value:n(t[d],a,s)})}return i},u.cloneWithShallow=function(t,a){const r=a.shallow;(a=Object.assign({},a)).shallow=!1;const n=new Map;for(const s of r){const c=o(t,s);typeof c!="object"&&typeof c!="function"||n.set(c,c)}return u.clone(t,a,n)},u.base=function(t,a,r){if(r.prototype===!1)return u.needsProtoHack.has(a)?new a.constructor:a===p.array?[]:{};const n=Object.getPrototypeOf(t);if(n&&n.isImmutable)return t;if(a===p.array){const s=[];return n!==a&&Object.setPrototypeOf(s,n),s}if(u.needsProtoHack.has(a)){const s=new n.constructor;return n!==a&&Object.setPrototypeOf(s,n),s}return Object.create(n)}},9474:(j,y,x)=>{const o=x(4277),p={mismatched:null};j.exports=function(f,u,t){return t=Object.assign({prototype:!0},t),!!p.isDeepEqual(f,u,t,[])},p.isDeepEqual=function(f,u,t,a){if(f===u)return f!==0||1/f==1/u;const r=typeof f;if(r!==typeof u||f===null||u===null)return!1;if(r==="function"){if(!t.deepFunction||f.toString()!==u.toString())return!1}else if(r!=="object")return f!=f&&u!=u;const n=p.getSharedType(f,u,!!t.prototype);switch(n){case o.buffer:return!1;case o.promise:return f===u;case o.regex:return f.toString()===u.toString();case p.mismatched:return!1}for(let s=a.length-1;s>=0;--s)if(a[s].isSame(f,u))return!0;a.push(new p.SeenEntry(f,u));try{return!!p.isDeepEqualObj(n,f,u,t,a)}finally{a.pop()}},p.getSharedType=function(f,u,t){if(t)return Object.getPrototypeOf(f)!==Object.getPrototypeOf(u)?p.mismatched:o.getInternalProto(f);const a=o.getInternalProto(f);return a!==o.getInternalProto(u)?p.mismatched:a},p.valueOf=function(f){const u=f.valueOf;if(u===void 0)return f;try{return u.call(f)}catch(t){return t}},p.hasOwnEnumerableProperty=function(f,u){return Object.prototype.propertyIsEnumerable.call(f,u)},p.isSetSimpleEqual=function(f,u){for(const t of Set.prototype.values.call(f))if(!Set.prototype.has.call(u,t))return!1;return!0},p.isDeepEqualObj=function(f,u,t,a,r){const{isDeepEqual:n,valueOf:s,hasOwnEnumerableProperty:c}=p,{keys:i,getOwnPropertySymbols:l}=Object;if(f===o.array){if(!a.part){if(u.length!==t.length)return!1;for(let S=0;S<u.length;++S)if(!n(u[S],t[S],a,r))return!1;return!0}for(const S of u)for(const m of t)if(n(S,m,a,r))return!0}else if(f===o.set){if(u.size!==t.size)return!1;if(!p.isSetSimpleEqual(u,t)){const S=new Set(Set.prototype.values.call(t));for(const m of Set.prototype.values.call(u)){if(S.delete(m))continue;let v=!1;for(const b of S)if(n(m,b,a,r)){S.delete(b),v=!0;break}if(!v)return!1}}}else if(f===o.map){if(u.size!==t.size)return!1;for(const[S,m]of Map.prototype.entries.call(u))if(m===void 0&&!Map.prototype.has.call(t,S)||!n(m,Map.prototype.get.call(t,S),a,r))return!1}else if(f===o.error&&(u.name!==t.name||u.message!==t.message))return!1;const d=s(u),h=s(t);if((u!==d||t!==h)&&!n(d,h,a,r))return!1;const g=i(u);if(!a.part&&g.length!==i(t).length&&!a.skip)return!1;let w=0;for(const S of g)if(a.skip&&a.skip.includes(S))t[S]===void 0&&++w;else if(!c(t,S)||!n(u[S],t[S],a,r))return!1;if(!a.part&&g.length-w!==i(t).length)return!1;if(a.symbols!==!1){const S=l(u),m=new Set(l(t));for(const v of S){if(!a.skip||!a.skip.includes(v)){if(c(u,v)){if(!c(t,v)||!n(u[v],t[v],a,r))return!1}else if(c(t,v))return!1}m.delete(v)}for(const v of m)if(c(t,v))return!1}return!0},p.SeenEntry=class{constructor(f,u){this.obj=f,this.ref=u}isSame(f,u){return this.obj===f&&this.ref===u}}},7916:(j,y,x)=>{const o=x(8761);j.exports=class extends Error{constructor(p){super(p.filter(f=>f!=="").map(f=>typeof f=="string"?f:f instanceof Error?f.message:o(f)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,y.assert)}}},5277:j=>{const y={};j.exports=function(x){if(!x)return"";let o="";for(let p=0;p<x.length;++p){const f=x.charCodeAt(p);y.isSafe(f)?o+=x[p]:o+=y.escapeHtmlChar(f)}return o},y.escapeHtmlChar=function(x){return y.namedHtml.get(x)||(x>=256?"&#"+x+";":`&#x${x.toString(16).padStart(2,"0")};`)},y.isSafe=function(x){return y.safeCharCodes.has(x)},y.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),y.safeCharCodes=function(){const x=new Set;for(let o=32;o<123;++o)(o>=97||o>=65&&o<=90||o>=48&&o<=57||o===32||o===46||o===44||o===45||o===58||o===95)&&x.add(o);return x}()},6064:j=>{j.exports=function(y){return y.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:j=>{j.exports=function(){}},1687:(j,y,x)=>{const o=x(375),p=x(8571),f=x(7043),u={};j.exports=u.merge=function(t,a,r){if(o(t&&typeof t=="object","Invalid target value: must be an object"),o(a==null||typeof a=="object","Invalid source value: must be null, undefined, or an object"),!a)return t;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(a)){o(Array.isArray(t),"Cannot merge array onto an object"),r.mergeArrays||(t.length=0);for(let s=0;s<a.length;++s)t.push(p(a[s],{symbols:r.symbols}));return t}const n=f.keys(a,r);for(let s=0;s<n.length;++s){const c=n[s];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(a,c))continue;const i=a[c];if(i&&typeof i=="object"){if(t[c]===i)continue;!t[c]||typeof t[c]!="object"||Array.isArray(t[c])!==Array.isArray(i)||i instanceof Date||i instanceof RegExp?t[c]=p(i,{symbols:r.symbols}):u.merge(t[c],i,r)}else(i!=null||r.nullOverride)&&(t[c]=i)}return t}},9621:(j,y,x)=>{const o=x(375),p={};j.exports=function(f,u,t){if(u===!1||u==null)return f;typeof(t=t||{})=="string"&&(t={separator:t});const a=Array.isArray(u);o(!a||!t.separator,"Separator option is not valid for array-based chain");const r=a?u:u.split(t.separator||".");let n=f;for(let s=0;s<r.length;++s){let c=r[s];const i=t.iterables&&p.iterables(n);if(Array.isArray(n)||i==="set"){const l=Number(c);Number.isInteger(l)&&(c=l<0?n.length+l:l)}if(!n||typeof n=="function"&&t.functions===!1||!i&&n[c]===void 0){o(!t.strict||s+1===r.length,"Missing segment",c,"in reach path ",u),o(typeof n=="object"||t.functions===!0||typeof n!="function","Invalid segment",c,"in reach path ",u),n=t.default;break}n=i?i==="set"?[...n][c]:n.get(c):n[c]}return n},p.iterables=function(f){return f instanceof Set?"set":f instanceof Map?"map":void 0}},8761:j=>{j.exports=function(...y){try{return JSON.stringify(...y)}catch(x){return"[Cannot display object: "+x.message+"]"}}},4277:(j,y)=>{const x={};y=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},x.typeMap=new Map([["[object Error]",y.error],["[object Map]",y.map],["[object Promise]",y.promise],["[object Set]",y.set],["[object WeakMap]",y.weakMap],["[object WeakSet]",y.weakSet]]),y.getInternalProto=function(o){if(Array.isArray(o))return y.array;if(o instanceof Date)return y.date;if(o instanceof RegExp)return y.regex;if(o instanceof Error)return y.error;const p=Object.prototype.toString.call(o);return x.typeMap.get(p)||y.generic}},7043:(j,y)=>{y.keys=function(x,o={}){return o.symbols!==!1?Reflect.ownKeys(x):Object.getOwnPropertyNames(x)}},3652:(j,y,x)=>{const o=x(375),p={};y.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(f,u){const t=[].concat((u=u||{}).before||[]),a=[].concat(u.after||[]),r=u.group||"?",n=u.sort||0;o(!t.includes(r),`Item cannot come before itself: ${r}`),o(!t.includes("?"),"Item cannot come before unassociated items"),o(!a.includes(r),`Item cannot come after itself: ${r}`),o(!a.includes("?"),"Item cannot come after unassociated items"),Array.isArray(f)||(f=[f]);for(const s of f){const c={seq:this._items.length,sort:n,before:t,after:a,group:r,node:s};this._items.push(c)}if(!u.manual){const s=this._sort();o(s,"item",r!=="?"?`added into group ${r}`:"","created a dependencies error")}return this.nodes}merge(f){Array.isArray(f)||(f=[f]);for(const t of f)if(t)for(const a of t._items)this._items.push(Object.assign({},a));this._items.sort(p.mergeSort);for(let t=0;t<this._items.length;++t)this._items[t].seq=t;const u=this._sort();return o(u,"merge created a dependencies error"),this.nodes}sort(){const f=this._sort();return o(f,"sort created a dependencies error"),this.nodes}_sort(){const f={},u=Object.create(null),t=Object.create(null);for(const c of this._items){const i=c.seq,l=c.group;t[l]=t[l]||[],t[l].push(i),f[i]=c.before;for(const d of c.after)u[d]=u[d]||[],u[d].push(i)}for(const c in f){const i=[];for(const l in f[c]){const d=f[c][l];t[d]=t[d]||[],i.push(...t[d])}f[c]=i}for(const c in u)if(t[c])for(const i of t[c])f[i].push(...u[c]);const a={};for(const c in f){const i=f[c];for(const l of i)a[l]=a[l]||[],a[l].push(c)}const r={},n=[];for(let c=0;c<this._items.length;++c){let i=c;if(a[c]){i=null;for(let l=0;l<this._items.length;++l){if(r[l]===!0)continue;a[l]||(a[l]=[]);const d=a[l].length;let h=0;for(let g=0;g<d;++g)r[a[l][g]]&&++h;if(h===d){i=l;break}}}i!==null&&(r[i]=!0,n.push(i))}if(n.length!==this._items.length)return!1;const s={};for(const c of this._items)s[c.seq]=c;this._items=[],this.nodes=[];for(const c of n){const i=s[c];this.nodes.push(i.node),this._items.push(i)}return!0}},p.mergeSort=(f,u)=>f.sort===u.sort?0:f.sort<u.sort?-1:1},5380:(j,y,x)=>{const o=x(443),p=x(2178),f={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:o.URL||URL};y.analyze=function(u,t={}){if(!u)return p.code("DOMAIN_NON_EMPTY_STRING");if(typeof u!="string")throw new Error("Invalid input: domain must be a string");if(u.length>256)return p.code("DOMAIN_TOO_LONG");if(f.nonAsciiRx.test(u)){if(t.allowUnicode===!1)return p.code("DOMAIN_INVALID_UNICODE_CHARS");u=u.normalize("NFC")}if(f.domainControlRx.test(u))return p.code("DOMAIN_INVALID_CHARS");u=f.punycode(u),t.allowFullyQualified&&u[u.length-1]==="."&&(u=u.slice(0,-1));const a=t.minDomainSegments||f.minDomainSegments,r=u.split(".");if(r.length<a)return p.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&r.length>t.maxDomainSegments)return p.code("DOMAIN_SEGMENTS_COUNT_MAX");const n=t.tlds;if(n){const s=r[r.length-1].toLowerCase();if(n.deny&&n.deny.has(s)||n.allow&&!n.allow.has(s))return p.code("DOMAIN_FORBIDDEN_TLDS")}for(let s=0;s<r.length;++s){const c=r[s];if(!c.length)return p.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return p.code("DOMAIN_LONG_SEGMENT");if(s<r.length-1){if(!f.domainSegmentRx.test(c))return p.code("DOMAIN_INVALID_CHARS")}else if(!f.tldSegmentRx.test(c))return p.code("DOMAIN_INVALID_TLDS_CHARS")}return null},y.isValid=function(u,t){return!y.analyze(u,t)},f.punycode=function(u){u.includes("%")&&(u=u.replace(/%/g,"%25"));try{return new f.URL(`http://${u}`).host}catch{return u}}},1745:(j,y,x)=>{const o=x(9848),p=x(5380),f=x(2178),u={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(o.TextEncoder||TextEncoder)};y.analyze=function(t,a){return u.email(t,a)},y.isValid=function(t,a){return!u.email(t,a)},u.email=function(t,a={}){if(typeof t!="string")throw new Error("Invalid input: email must be a string");if(!t)return f.code("EMPTY_STRING");const r=!u.nonAsciiRx.test(t);if(!r){if(a.allowUnicode===!1)return f.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const n=t.split("@");if(n.length!==2)return n.length>2?f.code("MULTIPLE_AT_CHAR"):f.code("MISSING_AT_CHAR");const[s,c]=n;if(!s)return f.code("EMPTY_LOCAL");if(!a.ignoreLength){if(t.length>254)return f.code("ADDRESS_TOO_LONG");if(u.encoder.encode(s).length>64)return f.code("LOCAL_TOO_LONG")}return u.local(s,r)||p.analyze(c,a)},u.local=function(t,a){const r=t.split(".");for(const n of r){if(!n.length)return f.code("EMPTY_LOCAL_SEGMENT");if(a){if(!u.atextRx.test(n))return f.code("INVALID_LOCAL_CHARS")}else for(const s of n){if(u.atextRx.test(s))continue;const c=u.binary(s);if(!u.atomRx.test(c))return f.code("INVALID_LOCAL_CHARS")}}},u.binary=function(t){return Array.from(u.encoder.encode(t)).map(a=>String.fromCharCode(a)).join("")},u.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,u.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,y)=>{y.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"},y.code=function(x){return{code:x,error:y.codes[x]}}},9959:(j,y,x)=>{const o=x(375),p=x(5752);y.regex=function(f={}){o(f.cidr===void 0||typeof f.cidr=="string","options.cidr must be a string");const u=f.cidr?f.cidr.toLowerCase():"optional";o(["required","optional","forbidden"].includes(u),"options.cidr must be one of required, optional, forbidden"),o(f.version===void 0||typeof f.version=="string"||Array.isArray(f.version),"options.version must be a string or an array of string");let t=f.version||["ipv4","ipv6","ipvfuture"];Array.isArray(t)||(t=[t]),o(t.length>=1,"options.version must have at least 1 version specified");for(let n=0;n<t.length;++n)o(typeof t[n]=="string","options.version must only contain strings"),t[n]=t[n].toLowerCase(),o(["ipv4","ipv6","ipvfuture"].includes(t[n]),"options.version contains unknown version "+t[n]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const a=`(?:${t.map(n=>{if(u==="forbidden")return p.ip[n];const s=`\\/${n==="ipv4"?p.ip.v4Cidr:p.ip.v6Cidr}`;return u==="required"?`${p.ip[n]}${s}`:`${p.ip[n]}(?:${s})?`}).join("|")})`,r=new RegExp(`^${a}$`);return{cidr:u,versions:t,regex:r,raw:a}}},5752:(j,y,x)=>{const o=x(375),p=x(6064),f={generate:function(){const u={},t="\\dA-Fa-f",a="["+t+"]",r="\\w-\\.~",n="!\\$&'\\(\\)\\*\\+,;=",s="%"+t,c=r+s+n+":@",i="["+c+"]",l="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";u.ipv4address="(?:"+l+"\\.){3}"+l;const d=a+"{1,4}",h="(?:"+d+":"+d+"|"+u.ipv4address+")",g="(?:"+d+":){6}"+h,w="::(?:"+d+":){5}"+h,S="(?:"+d+")?::(?:"+d+":){4}"+h,m="(?:(?:"+d+":){0,1}"+d+")?::(?:"+d+":){3}"+h,v="(?:(?:"+d+":){0,2}"+d+")?::(?:"+d+":){2}"+h,b="(?:(?:"+d+":){0,3}"+d+")?::"+d+":"+h,C="(?:(?:"+d+":){0,4}"+d+")?::"+h,P="(?:(?:"+d+":){0,5}"+d+")?::"+d,$="(?:(?:"+d+":){0,6}"+d+")?::";u.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",u.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",u.ipv6address="(?:"+g+"|"+w+"|"+S+"|"+m+"|"+v+"|"+b+"|"+C+"|"+P+"|"+$+")",u.ipvFuture="v"+a+"+\\.["+r+n+":]+",u.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",u.schemeRegex=new RegExp(u.scheme);const D="["+r+s+n+":]*",M="["+r+s+n+"]{1,255}",U="(?:\\[(?:"+u.ipv6address+"|"+u.ipvFuture+")\\]|"+u.ipv4address+"|"+M+")",z="(?:"+D+"@)?"+U+"(?::\\d*)?",H="(?:"+D+"@)?("+U+")(?::\\d*)?",I=i+"*",N=i+"+",W="(?:\\/"+I+")*",Y="\\/(?:"+N+W+")?",de=N+W,Ce="["+r+s+n+"@]+"+W,He="(?:\\/\\/\\/"+I+W+")";return u.hierPart="(?:(?:\\/\\/"+z+W+")|"+Y+"|"+de+"|"+He+")",u.hierPartCapture="(?:(?:\\/\\/"+H+W+")|"+Y+"|"+de+")",u.relativeRef="(?:(?:\\/\\/"+z+W+")|"+Y+"|"+Ce+"|)",u.relativeRefCapture="(?:(?:\\/\\/"+H+W+")|"+Y+"|"+Ce+"|)",u.query="["+c+"\\/\\?]*(?=#|$)",u.queryWithSquareBrackets="["+c+"\\[\\]\\/\\?]*(?=#|$)",u.fragment="["+c+"\\/\\?]*",u}};f.rfc3986=f.generate(),y.ip={v4Cidr:f.rfc3986.ipv4Cidr,v6Cidr:f.rfc3986.ipv6Cidr,ipv4:f.rfc3986.ipv4address,ipv6:f.rfc3986.ipv6address,ipvfuture:f.rfc3986.ipvFuture},f.createRegex=function(u){const t=f.rfc3986,a="(?:\\?"+(u.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",r=u.domain?t.relativeRefCapture:t.relativeRef;if(u.relativeOnly)return f.wrap(r+a);let n="";if(u.scheme){o(u.scheme instanceof RegExp||typeof u.scheme=="string"||Array.isArray(u.scheme),"scheme must be a RegExp, String, or Array");const i=[].concat(u.scheme);o(i.length>=1,"scheme must have at least 1 scheme specified");const l=[];for(let d=0;d<i.length;++d){const h=i[d];o(h instanceof RegExp||typeof h=="string","scheme at position "+d+" must be a RegExp or String"),h instanceof RegExp?l.push(h.source.toString()):(o(t.schemeRegex.test(h),"scheme at position "+d+" must be a valid scheme"),l.push(p(h)))}n=l.join("|")}const s="(?:"+(n?"(?:"+n+")":t.scheme)+":"+(u.domain?t.hierPartCapture:t.hierPart)+")",c=u.allowRelative?"(?:"+s+"|"+r+")":s;return f.wrap(c+a,n)},f.wrap=function(u,t){return{raw:u=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${u}`,regex:new RegExp(`^${u}$`),scheme:t}},f.uriRegex=f.createRegex({}),y.regex=function(u={}){return u.scheme||u.allowRelative||u.relativeOnly||u.allowQuerySquareBrackets||u.domain?f.createRegex(u):f.uriRegex}},1447:(j,y)=>{const x={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};y.Parser=class{constructor(o,p={}){if(!p[x.settings]&&p.constants)for(const f in p.constants){const u=p.constants[f];if(u!==null&&!["boolean","number","string"].includes(typeof u))throw new Error(`Formula constant ${f} contains invalid ${typeof u} value type`)}this.settings=p[x.settings]?p:Object.assign({[x.settings]:!0,constants:{},functions:{}},p),this.single=null,this._parts=null,this._parse(o)}_parse(o){let p=[],f="",u=0,t=!1;const a=n=>{if(u)throw new Error("Formula missing closing parenthesis");const s=p.length?p[p.length-1]:null;if(t||f||n){if(s&&s.type==="reference"&&n===")")return s.type="function",s.value=this._subFormula(f,s.value),void(f="");if(n===")"){const c=new y.Parser(f,this.settings);p.push({type:"segment",value:c})}else if(t){if(t==="]")return p.push({type:"reference",value:f}),void(f="");p.push({type:"literal",value:f})}else if(x.operatorCharacters.includes(f))s&&s.type==="operator"&&x.operators.includes(s.value+f)?s.value+=f:p.push({type:"operator",value:f});else if(f.match(x.numberRx))p.push({type:"constant",value:parseFloat(f)});else if(this.settings.constants[f]!==void 0)p.push({type:"constant",value:this.settings.constants[f]});else{if(!f.match(x.tokenRx))throw new Error(`Formula contains invalid token: ${f}`);p.push({type:"reference",value:f})}f=""}};for(const n of o)t?n===t?(a(),t=!1):f+=n:u?n==="("?(f+=n,++u):n===")"?(--u,u?f+=n:a(n)):f+=n:n in x.literals?t=x.literals[n]:n==="("?(a(),++u):x.operatorCharacters.includes(n)?(a(),f=n,a()):n!==" "?f+=n:a();a(),p=p.map((n,s)=>n.type!=="operator"||n.value!=="-"||s&&p[s-1].type!=="operator"?n:{type:"operator",value:"n"});let r=!1;for(const n of p){if(n.type==="operator"){if(x.operatorsPrefix.includes(n.value))continue;if(!r)throw new Error("Formula contains an operator in invalid position");if(!x.operators.includes(n.value))throw new Error(`Formula contains an unknown operator ${n.value}`)}else if(r)throw new Error("Formula missing expected operator");r=!r}if(!r)throw new Error("Formula contains invalid trailing operator");p.length===1&&["reference","literal","constant"].includes(p[0].type)&&(this.single={type:p[0].type==="reference"?"reference":"value",value:p[0].value}),this._parts=p.map(n=>{if(n.type==="operator")return x.operatorsPrefix.includes(n.value)?n:n.value;if(n.type!=="reference")return n.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(n.value))throw new Error(`Formula contains invalid reference ${n.value}`);return this.settings.reference?this.settings.reference(n.value):x.reference(n.value)})}_subFormula(o,p){const f=this.settings.functions[p];if(typeof f!="function")throw new Error(`Formula contains unknown function ${p}`);let u=[];if(o){let t="",a=0,r=!1;const n=()=>{if(!t)throw new Error(`Formula contains function ${p} with invalid arguments ${o}`);u.push(t),t=""};for(let s=0;s<o.length;++s){const c=o[s];r?(t+=c,c===r&&(r=!1)):c in x.literals&&!a?(t+=c,r=x.literals[c]):c!==","||a?(t+=c,c==="("?++a:c===")"&&--a):n()}n()}return u=u.map(t=>new y.Parser(t,this.settings)),function(t){const a=[];for(const r of u)a.push(r.evaluate(t));return f.call(t,...a)}}evaluate(o){const p=this._parts.slice();for(let f=p.length-2;f>=0;--f){const u=p[f];if(u&&u.type==="operator"){const t=p[f+1];p.splice(f+1,1);const a=x.evaluate(t,o);p[f]=x.single(u.value,a)}}return x.operatorsOrder.forEach(f=>{for(let u=1;u<p.length-1;)if(f.includes(p[u])){const t=p[u],a=x.evaluate(p[u-1],o),r=x.evaluate(p[u+1],o);p.splice(u,2);const n=x.calculate(t,a,r);p[u-1]=n===0?0:n}else u+=2}),x.evaluate(p[0],o)}},y.Parser.prototype[x.symbol]=!0,x.reference=function(o){return function(p){return p&&p[o]!==void 0?p[o]:null}},x.evaluate=function(o,p){return o===null?null:typeof o=="function"?o(p):o[x.symbol]?o.evaluate(p):o},x.single=function(o,p){if(o==="!")return!p;const f=-p;return f===0?0:f},x.calculate=function(o,p,f){if(o==="??")return x.exists(p)?p:f;if(typeof p=="string"||typeof f=="string"){if(o==="+")return(p=x.exists(p)?p:"")+(x.exists(f)?f:"")}else switch(o){case"^":return Math.pow(p,f);case"*":return p*f;case"/":return p/f;case"%":return p%f;case"+":return p+f;case"-":return p-f}switch(o){case"<":return p<f;case"<=":return p<=f;case">":return p>f;case">=":return p>=f;case"==":return p===f;case"!=":return p!==f;case"&&":return p&&f;case"||":return p||f}return null},x.exists=function(o){return o!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:j=>{j.exports=JSON.parse('{"version":"17.13.3"}')}},R={},function j(y){var x=R[y];if(x!==void 0)return x.exports;var o=R[y]={exports:{}};return A[y](o,o.exports,j),o.exports}(5107);var A,R})}(mt)),mt.exports}var Ci=Si();const Ri=fn(Ci),L=Ri.extend(ki).extend(wi),tn=/^(0x)?([A-Fa-f0-9]{64})$/;L.object({genesisTime:L.date().iso().required().raw(),genesisTx:L.string().regex(tn).required().allow(""),renaissanceTime:L.date().iso().required().raw(),renaissanceTx:L.string().regex(tn).required().allow("")});const Bn=L.object({address:L.DID().prefix().role("ROLE_TOKEN").required(),value:L.BN().min(0).required()});L.object({name:L.string().min(1).max(256).required(),value:L.string().min(1).max(1024).required(),description:L.string().min(1).max(256).optional().allow(""),required:L.boolean().optional().default(!1)});const Hn=L.alternatives().try(L.DID().prefix().role("ROLE_ACCOUNT"),L.DID().prefix().role("ROLE_APPLICATION"),L.DID().prefix().role("ROLE_BLOCKLET"),L.DID().prefix().wallet("ethereum"),L.DID().prefix().wallet("passkey"));L.array().items(L.object({owner:Hn.required(),tokensList:L.array().items(Bn).default([]),assetsList:L.array().items(L.DID().prefix().role("ROLE_ASSET")).default([])}));L.array().items({signer:L.DID().prefix().required(),pk:L.any().required(),signature:L.any().required(),delegator:L.DID().prefix().valid("").optional(),data:L.any().optional()});L.object({type:L.string().min(1).max(32).required(),contractAddress:L.DID().prefix().wallet("ethereum").required(),chainType:L.string().min(1).max(32).required(),chainName:L.string().min(1).max(32).required(),chainId:L.number().positive().required()});const It=L.object({type:L.string().valid("svg","url","uri").required(),content:L.string().when("type",{is:"uri",then:L.string().max(20480).dataUri().required()}).when("type",{is:"url",then:L.string().max(2048).uri({scheme:["http","https"]}).required()})}),Nn=L.object({id:L.string().max(2048).uri({scheme:["http","https"]}).required(),scope:L.string().valid("public","private").default("public")});L.object({id:L.DID().prefix().required(),pk:L.string().required(),name:L.string().min(1).max(256).required()});const Ai={address:L.DID().prefix().role("ROLE_ASSET").required(),moniker:L.string().min(2).max(255).required(),data:L.any().required(),readonly:L.boolean().default(!1),transferrable:L.boolean().default(!1),ttl:L.number().min(0).default(0),parent:L.DID().prefix().optional().allow(""),issuer:L.DID().prefix().optional().allow(""),endpoint:Nn.optional().allow(null).default(null),display:It.optional().allow(null).default(null),tags:L.array().items(L.string().min(1).max(64)).max(4).optional()},Oi={address:L.DID().prefix().role("ROLE_FACTORY").required(),name:L.string().min(2).max(255).required(),description:L.string().min(2).max(255).required(),settlement:L.string().valid("instant","periodic").default("instant"),limit:L.number().integer().min(0).default(0),trustedIssuers:L.array().items(L.DID().prefix()).max(8).optional(),data:L.any().optional().allow(null).default(null),display:It.optional().allow(null).default(null),input:L.object({value:L.BN().positive().min("0").default("0"),tokens:L.array().items(Bn).max(8).optional(),assets:L.array().items(L.alternatives().try(L.DID().prefix().role("ROLE_ASSET"),L.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:L.array().items(L.object({name:L.string().min(1).max(255).required(),description:L.string().max(255).optional().allow(""),required:L.boolean().required()})).optional()}),output:L.object({moniker:L.string().min(2).max(255).required(),data:L.any().required(),readonly:L.boolean().default(!1),transferrable:L.boolean().default(!1),ttl:L.number().min(0).default(0),parent:L.string().max(255).required(),issuer:L.string().max(255).required(),endpoint:Nn.optional(),display:It.optional(),tags:L.array().items(L.string().min(1).max(64)).max(4).optional()}),hooks:L.array().items(L.object({name:L.string().valid("mint","postMint","preMint").required(),type:L.string().valid("url","contract").required(),hook:L.string().min(1).max(4096).required(),compiled:L.array().items(L.object()).optional()})).optional()},Pi={tokenHolder:Hn,assetSchema:L.object(Ai).options({stripUnknown:!0,noDefaults:!1}),factorySchema:L.object(Oi).options({stripUnknown:!0,noDefaults:!1})};function Fn({onCancel:k,onSuccess:_,blocklet:A}){const{vaults:R=[],appPid:j}=A,{t:y,locale:x}=ee(),{connectApi:o}=un(),{api:p}=se(),{teamDid:f}=it(),[u,t]=Bt({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});q.useEffect(()=>{if(!tt(u.address))return;const c=Fe(u.address),i=u.fetched.find(d=>d.address===c),l=u.errored.find(d=>d.address===c);!u.fetching&&!i&&!l&&(t({fetching:!0}),Mr(G.MAIN_CHAIN_ENDPOINT).getAccountState({address:c}).then(h=>{h.state?t({fetching:!1,fetched:[...u.fetched.filter(g=>g.address!==c),h.state]}):t({fetching:!1,errored:[...u.errored.filter(g=>g.address!==c),{address:c}]})}).catch(h=>{console.error(h),t({fetching:!1,error:St(h)})}))},[u.address,u.fetching]),q.useEffect(()=>{if(u.address){const c=Fe(u.address);if(!tt(c)){t({error:y("blocklet.config.vault.error.invalid")});return}if(Pi.tokenHolder.validate(c).error){t({error:y("blocklet.config.vault.error.holder")});return}if(R.find(l=>l.did===c)){t({error:y("blocklet.config.vault.error.duplicate")});return}if(Ks([A.appDid,A.appPid,...A.migratedFrom.map(l=>l.appDid)].filter(Boolean)).includes(c)){t({error:y("blocklet.config.vault.error.appDid")});return}}t({error:""})},[u.address]);const a=async()=>{t({loading:!0});try{const c=await p.configVault({input:{teamDid:f,vaultDid:Fe(u.address)}});o.open({locale:x,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:y("blocklet.config.vault.approve.title"),scan:y(`blocklet.config.vault.approve.${R.length>0?"byLast":"byOwner"}`),confirm:y("blocklet.config.vault.approve.confirm"),success:y("blocklet.config.vault.approve.success")},onSuccess:()=>{o.open({locale:x,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:y("blocklet.config.vault.commit.title"),scan:y("blocklet.config.vault.commit.scan"),confirm:y("blocklet.config.vault.commit.confirm"),success:y("blocklet.config.vault.commit.success")},onSuccess:()=>{t({loading:!1}),_()},onClose:()=>{t({loading:!1}),o.close()}})},onClose:()=>{t({loading:!1}),o.close()}})}catch(c){t({loading:!1,error:St(c)})}},r=Fe(u.address),n=[];tt(r)&&n.push({key:y("blocklet.config.vault.role"),value:e.jsx(Ke,{color:"primary",variant:"outlined",size:"small",label:Ct(r).role||"-"})});const s=u.fetched.find(c=>c.address===r);return s&&n.push({key:y("blocklet.config.vault.firstSeen"),value:Ut(s.context?.genesisTime,"-")},{key:y("blocklet.config.vault.lastSeen"),value:Ut(s.context?.renaissanceTime,"-")},{key:y("blocklet.config.vault.migratedFrom"),value:s.migratedFrom.length?s.migratedFrom.map(c=>e.jsx(kt,{did:c,showQrcode:!0,compact:!0,size:14,locale:x},c)):"-"},{key:y("blocklet.config.vault.migratedTo"),value:s.migratedTo.length?s.migratedTo.map(c=>e.jsx(kt,{did:c,showQrcode:!0,compact:!0,size:14,locale:x},c)):"-"}),e.jsx(ke,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:k,title:e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Pn,{}),y("blocklet.config.vault.title")]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(Q,{onClick:k,children:y("common.cancel")}),e.jsx(Q,{onClick:a,variant:"contained",disabled:!!u.error||u.loading,children:y("common.confirm")})]}),children:e.jsxs(re,{direction:"column",spacing:3,children:[e.jsxs(J,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[y("blocklet.config.vault.desc")," ",y("blocklet.config.vault.tip")]}),R.length>0&&e.jsxs(O,{children:[e.jsxs(J,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[y("blocklet.config.vault.current"),":"]}),e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(Gs,{did:R[R.length-1].did,showQrcode:!0,style:{width:"auto"}}),e.jsx(Br,{vaults:R,appPid:j})]})]}),e.jsx(V,{fullWidth:!0,"data-cy":"input-factory-address",label:y("blocklet.config.vault.address"),error:!!u.error,helperText:u.error,value:u.address,onChange:c=>{t({address:c.target.value,error:""})},slotProps:{input:{endAdornment:u.fetching?e.jsx(pn,{position:"end",children:e.jsx(Me,{size:16})}):null}}}),e.jsx(O,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:n.map(c=>e.jsx(Sn,{valueComponent:"div",nameWidth:120,name:c.key,children:c.value},c.key))})]})})}Fn.propTypes={onCancel:E.func.isRequired,onSuccess:E.func.isRequired,blocklet:E.object.isRequired};function Nt({blocklet:k,onUpdate:_=()=>{},hasPermission:A=!1}){const{info:R,api:j,inService:y}=se(),{t:x,locale:o}=q.useContext(fe),[p,f]=Bt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[u,t]=q.useState(()=>k?.settings?.gateway?.wafPolicy?.enabled??!0),[a,r]=q.useState(()=>!!k?.settings?.enableSessionHardening),[n,s]=q.useState(()=>!!k?.settings?.invite?.enabled),[c,i]=q.useState(()=>{const I=k?.settings?.org||{};return{enabled:I.enabled||!1,maxMemberPerOrg:I.maxMemberPerOrg||100,maxOrgPerUser:I.maxOrgPerUser||10}}),l=p.loading||!A,{did:d}=k.meta,h=y?window.env?.gateway?.wafPolicy?.enabled:R?.routing.wafPolicy?.enabled;if(zt(k.status))return null;const g=k.environments.find(I=>I.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),w=!g||g.value==="yes",m=k.environments.find(I=>I.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||X.BLOCKLET_TENANT_MODES.SINGLE,v=(I,N)=>async W=>{if(!p.loading){f({loading:!0});try{const{checked:Y}=W.target,{blocklet:de}=await j.configBlocklet({input:{did:k.meta.did,configs:[{key:X.BLOCKLET_CONFIGURABLE_KEY[I],value:N(Y)}]}});_(de)}catch(Y){Z.error(Y.message)}finally{f({loading:!1})}}},b=v("BLOCKLET_DELETABLE",I=>I?"no":"yes"),C=v("BLOCKLET_APP_TENANT_MODE",I=>I?X.BLOCKLET_TENANT_MODES.MULTIPLE:X.BLOCKLET_TENANT_MODES.SINGLE),P=(I,N)=>async W=>{if(!p.loading){f({loading:!0});try{const Y=W.target.checked;await j.updateBlockletSettings({input:I(Y)}),N&&N(Y)}catch(Y){Z.error(Y.message)}finally{f({loading:!1})}}},$=P(I=>({did:k.meta.did,invite:{enabled:I}}),s),D=P(I=>({did:k.meta.did,org:{enabled:I,maxMemberPerOrg:100,maxOrgPerUser:10}}),I=>{i({...c,enabled:I})}),M=async(I,N)=>{if(!p.loading){f({loading:!0});try{await j.updateBlockletSettings({input:{did:k.meta.did,org:{...c,[I]:N}}}),i({...c,[I]:N})}catch(W){Z.error(W.message)}finally{f({loading:!1})}}},U=P(I=>({did:k.meta.did,gateway:{wafPolicy:{enabled:I}}}),t),z=P(I=>({did:k.meta.did,enableSessionHardening:I}),I=>{r(I),Ys()}),H=async()=>{if(!p.loading){f({loading:!0});try{const{blocklet:I}=await j.getBlocklet({input:{did:k.meta.did}});_(I)}catch(I){Z.error(I.message)}finally{f({loading:!1})}}};return e.jsxs(re,{p:3,sx:{border:"1px solid red",borderRadius:2,p:3},className:"advanced-config",children:[!y&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:x("blocklet.config.deletable.name"),desc:x(w?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:!w,defaultChecked:!0,onChange:b})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),e.jsx(zn,{inService:y,disabled:l,loading:p.loading,onChange:H}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),y&&e.jsx(jr,{role:"owner",children:I=>(I||_i)&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:x("blocklet.config.vault.title"),desc:x("blocklet.config.vault.desc"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(Q,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>f({showConfigVault:!0}),children:[e.jsx(Pn,{style:{fontSize:"1.3em",marginRight:4}}),x("blocklet.config.vault.title")]})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),p.showConfigVault&&e.jsx(Fn,{blocklet:k,onCancel:()=>f({showConfigVault:!1}),onSuccess:()=>f({showConfigVault:!1})}),e.jsx(B,{title:x("team.transferApp.name"),desc:x("team.transferApp.description"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(Q,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>f({showTransferOwner:!0}),children:[e.jsx(oi,{style:{fontSize:"1.3em",marginRight:4}}),x("team.transferApp.name")]})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),p.showTransferOwner&&e.jsx(Mn,{onCancel:()=>f({showTransferOwner:!1}),onSuccess:()=>f({showTransferOwner:!1})})]})}),e.jsx(B,{title:x("blocklet.config.clearCache.name"),desc:x("blocklet.config.clearCache.purpose"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Lr,{teamDid:d})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:x("blocklet.config.rotateSessionKey.name"),desc:x("blocklet.config.rotateSessionKey.purpose"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Dr,{style:{whiteSpace:"nowrap"},teamDid:d})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:x("blocklet.config.tenantMode.name"),desc:x(`blocklet.config.tenantMode.${m}`),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:m===X.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:C})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:x("team.invite.setting"),desc:x(`team.invite.${n?"enabled":"disabled"}`),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:n,onChange:$})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:e.jsxs(re,{direction:"row",sx:{alignItems:"center",gap:1},children:[x("setting.form.enableSessionHardening.switchLabel"),e.jsx(ce,{title:x("setting.form.enableSessionHardening.switchTips"),children:e.jsx(Kt,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:a,onChange:z})})}),h&&e.jsxs(e.Fragment,{children:[e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:e.jsxs(re,{direction:"row",sx:{alignItems:"center",gap:1},children:[x("router.gateway.wafPolicy.title"),e.jsx(ce,{title:e.jsx(O,{sx:{fontSize:"14px",lineHeight:1.5},children:e.jsx(O,{sx:{color:"common.white",ml:.5},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${o}/enable-web-application-firewall`,target:"_blank",rel:"noopener noreferrer",children:x("dashboard.document")})}),children:e.jsx(Kt,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:x("router.gateway.wafPolicy.switchLabel"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:u,onChange:U})})})]}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:e.jsx(re,{direction:"row",sx:{alignItems:"center",gap:1},children:x("common.orgs")}),desc:x("team.orgs.explain"),children:e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%",alignSelf:{xs:"flex-start",md:"flex-end"}},children:[e.jsx(pe,{disabled:l,checked:c.enabled,onChange:D}),c.enabled&&e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:400,mt:1},children:[e.jsx(Pt,{style:{marginTop:0},disabled:l,loading:p.loading,type:"number",min:2,initialValue:c.maxOrgPerUser,label:x("team.orgs.invite.maxOrgs"),placeholder:x("team.orgs.invite.maxOrgs"),onSubmit:I=>M("maxOrgPerUser",I)}),e.jsx(Pt,{style:{marginTop:0},disabled:l,loading:p.loading,type:"number",min:2,initialValue:c.maxMemberPerOrg,label:x("team.orgs.invite.maxMembers"),placeholder:x("team.orgs.invite.maxMembers"),onSubmit:I=>M("maxMemberPerOrg",I)})]})]})})]})}const $i=Be(Nt,"mutate_blocklets"),Ei=Be(Nt,"",qt);function Ti(k){const{inService:_}=se();return _?e.jsx(Ei,{...k}):e.jsx($i,{...k})}Nt.propTypes={blocklet:E.object.isRequired,onUpdate:E.func,hasPermission:E.bool};function Ft({blocklet:k,onUpdate:_=()=>{},hasPermission:A=!1,...R}){const{t:j}=q.useContext(fe);return zt(k.status)?null:e.jsxs(qi,{...R,children:[e.jsx(vi,{blocklet:k,onUpdate:_,hasPermission:A}),e.jsx(O,{sx:{mt:6},children:e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:j("blocklet.config.dangerZone")})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(O,{sx:{maxWidth:1536},children:e.jsx(Ti,{blocklet:k,onUpdate:_,hasPermission:A})})]})}const Ii=Be(Ft,"mutate_blocklets"),Li=Be(Ft,"",qt);function Di(k){const{inService:_}=se();return _?e.jsx(Li,{...k}):e.jsx(Ii,{...k})}Ft.propTypes={blocklet:E.object.isRequired,onUpdate:E.func,hasPermission:E.bool};const qi=je(O)`
|
|
50
|
+
`;function wi(k){return{type:"BN",base:k.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(_,A){try{return{value:new Ee(_)}}catch{return{errors:A.error("bn.nan")}}},coerce(_){return{value:_.toString(10)}},validate(_){return{value:_}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:_=>Ee.isBN(_),message:"must be a big number",normalize:_=>new Ee(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,A,R){const j=new Ee(_);return R.equal&&j.lt(R.threshold)?A.error("bn.min",R):!R.equal&&j.lte(R.threshold)?A.error("bn.greater",R):_}},lt:{args:[{name:"threshold",ref:!0,assert:_=>Ee.isBN(_),message:"must be a big number",normalize:_=>new Ee(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,A,R){const j=new Ee(_);return R.equal&&j.gt(R.threshold)?A.error("bn.max",R):!R.equal&&j.gte(R.threshold)?A.error("bn.less",R):_}},min:{alias:"gte",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!0}})}},max:{alias:"lte",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!0}})}},greater:{alias:"gt",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!1}})}},less:{alias:"lt",method(_){return this.$_addRule({name:"lt",args:{threshold:_,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 Ye={pk:Object.keys(dt.KeyType),hash:Object.keys(dt.HashType),role:Object.keys(dt.RoleType)};function ki(k){return{type:"DID",base:k.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(_,A){return!_||typeof _!="string"?{errors:A.error("did.empty",{value:_})}:tt(_)===!1?{errors:A.error("did.invalid",{value:_})}:{value:_}},rules:{type:{args:[{name:"key",ref:!0,assert:_=>Object.keys(Ye).includes(_),message:`must be one of ${Object.keys(Ye).join(", ")}`},{name:"expected",assert:_=>Object.keys(Ye).some(A=>Ye[A].includes(_)),message:"must be valid type"}],validate(_,A,R){const j=Ct(_);return R.key==="pk"&&j.pk!==R.expected?A.error("did.pk",{...R,actual:j.pk}):R.key==="hash"&&j.hash!==R.expected?A.error("did.hash",{...R,actual:j.hash}):R.key==="role"&&j.role!==R.expected?A.error("did.role",{...R,actual:j.role}):_}},pk:{method(_){return this.$_addRule({name:"type",args:{key:"pk",expected:_}})}},hash:{method(_){return this.$_addRule({name:"type",args:{key:"hash",expected:_}})}},role:{method(_){return this.$_addRule({name:"type",args:{key:"role",expected:_}})}},wallet:{method(_){return this.$_addRule({name:"wallet",args:{type:_}})},args:[{name:"type",ref:!0,assert:_=>["arcblock","ethereum","default","eth","passkey"].includes(_),message:"must be a string",normalize:_=>_.trim()}],validate(_,A,R={}){const j=Vs(_),y=Ct(_);return["ethereum","eth"].includes(R.type)&&Ze(j,Us)===!1?A.error("did.wallet",{expected:R.type,actual:JSON.stringify(y)}):["arcblock","default"].includes(R.type)&&Ze(j,Ks)===!1?A.error("did.wallet",{expected:R.type,actual:JSON.stringify(y)}):["passkey"].includes(R.type)&&Ze(j,Gs)===!1?A.error("did.wallet",{expected:R.type,actual:JSON.stringify(y)}):_}},prefix:{method(_=""){return this.$_addRule({name:"prefix",args:{str:_}})},args:[{name:"str",ref:!0,assert:_=>["",Zs].includes(_),message:"must be a string",normalize:_=>_.trim()}],validate(_,A,R={}){return R.str&&_.startsWith(R.str)===!1?A.error("did.prefix",{expected:R.str}):!R.str&&Fe(_)!==_?A.error("did.prefix",{expected:R.str}):_}}}}}var mt={exports:{}},nn;function Si(){return nn||(nn=1,function(k,_){(function(A,R){k.exports=R()})(self,()=>{return A={7629:(j,y,x)=>{const o=x(375),p=x(8571),f=x(9474),u=x(1687),t=x(8652),a=x(8160),r=x(3292),n=x(6354),s=x(8901),c=x(9708),i=x(6914),l=x(2294),d=x(6133),h=x(1152),g=x(8863),w=x(2036),S={Base:class{constructor(m){this.type=m,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new l.Ids,this._preferences=null,this._refs=new d.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return o(typeof c.describe=="function","Manifest functionality disabled"),c.describe(this)}allow(...m){return a.verifyFlat(m,"allow"),this._values(m,"_valids")}alter(m){o(m&&typeof m=="object"&&!Array.isArray(m),"Invalid targets argument"),o(!this._inRuleset(),"Cannot set alterations inside a ruleset");const v=this.clone();v.$_terms.alterations=v.$_terms.alterations||[];for(const b in m){const C=m[b];o(typeof C=="function","Alteration adjuster for",b,"must be a function"),v.$_terms.alterations.push({target:b,adjuster:C})}return v.$_temp.ruleset=!1,v}artifact(m){return o(m!==void 0,"Artifact cannot be undefined"),o(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",m)}cast(m){return o(m===!1||typeof m=="string","Invalid to value"),o(m===!1||this._definition.cast[m],"Type",this.type,"does not support casting to",m),this.$_setFlag("cast",m===!1?void 0:m)}default(m,v){return this._default("default",m,v)}description(m){return o(m&&typeof m=="string","Description must be a non-empty string"),this.$_setFlag("description",m)}empty(m){const v=this.clone();return m!==void 0&&(m=v.$_compile(m,{override:!1})),v.$_setFlag("empty",m,{clone:!1})}error(m){return o(m,"Missing error"),o(m instanceof Error||typeof m=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",m)}example(m,v={}){return o(m!==void 0,"Missing example"),a.assertOptions(v,["override"]),this._inner("examples",m,{single:!0,override:v.override})}external(m,v){return typeof m=="object"&&(o(!v,"Cannot combine options with description"),v=m.description,m=m.method),o(typeof m=="function","Method must be a function"),o(v===void 0||v&&typeof v=="string","Description must be a non-empty string"),this._inner("externals",{method:m,description:v},{single:!0})}failover(m,v){return this._default("failover",m,v)}forbidden(){return this.presence("forbidden")}id(m){return m?(o(typeof m=="string","id must be a non-empty string"),o(/^[^\.]+$/.test(m),"id cannot contain period character"),this.$_setFlag("id",m)):this.$_setFlag("id",void 0)}invalid(...m){return this._values(m,"_invalids")}label(m){return o(m&&typeof m=="string","Label name must be a non-empty string"),this.$_setFlag("label",m)}meta(m){return o(m!==void 0,"Meta cannot be undefined"),this._inner("metas",m,{single:!0})}note(...m){o(m.length,"Missing notes");for(const v of m)o(v&&typeof v=="string","Notes must be non-empty strings");return this._inner("notes",m)}only(m=!0){return o(typeof m=="boolean","Invalid mode:",m),this.$_setFlag("only",m)}optional(){return this.presence("optional")}prefs(m){o(m,"Missing preferences"),o(m.context===void 0,"Cannot override context"),o(m.externals===void 0,"Cannot override externals"),o(m.warnings===void 0,"Cannot override warnings"),o(m.debug===void 0,"Cannot override debug"),a.checkPreferences(m);const v=this.clone();return v._preferences=a.preferences(v._preferences,m),v}presence(m){return o(["optional","required","forbidden"].includes(m),"Unknown presence mode",m),this.$_setFlag("presence",m)}raw(m=!0){return this.$_setFlag("result",m?"raw":void 0)}result(m){return o(["raw","strip"].includes(m),"Unknown result mode",m),this.$_setFlag("result",m)}required(){return this.presence("required")}strict(m){const v=this.clone(),b=m!==void 0&&!m;return v._preferences=a.preferences(v._preferences,{convert:b}),v}strip(m=!0){return this.$_setFlag("result",m?"strip":void 0)}tag(...m){o(m.length,"Missing tags");for(const v of m)o(v&&typeof v=="string","Tags must be non-empty strings");return this._inner("tags",m)}unit(m){return o(m&&typeof m=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",m)}valid(...m){a.verifyFlat(m,"valid");const v=this.allow(...m);return v.$_setFlag("only",!!v._valids,{clone:!1}),v}when(m,v){const b=this.clone();b.$_terms.whens||(b.$_terms.whens=[]);const C=r.when(b,m,v);if(!["any","link"].includes(b.type)){const P=C.is?[C]:C.switch;for(const $ of P)o(!$.then||$.then.type==="any"||$.then.type===b.type,"Cannot combine",b.type,"with",$.then&&$.then.type),o(!$.otherwise||$.otherwise.type==="any"||$.otherwise.type===b.type,"Cannot combine",b.type,"with",$.otherwise&&$.otherwise.type)}return b.$_terms.whens.push(C),b.$_mutateRebuild()}cache(m){o(!this._inRuleset(),"Cannot set caching inside a ruleset"),o(!this._cache,"Cannot override schema cache"),o(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const v=this.clone();return v._cache=m||t.provider.provision(),v.$_temp.ruleset=!1,v}clone(){const m=Object.create(Object.getPrototypeOf(this));return this._assign(m)}concat(m){o(a.isSchema(m),"Invalid schema object"),o(this.type==="any"||m.type==="any"||m.type===this.type,"Cannot merge type",this.type,"with another type:",m.type),o(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),o(!m._inRuleset(),"Cannot concatenate a schema with open ruleset");let v=this.clone();if(this.type==="any"&&m.type!=="any"){const b=m.clone();for(const C of Object.keys(v))C!=="type"&&(b[C]=v[C]);v=b}v._ids.concat(m._ids),v._refs.register(m,d.toSibling),v._preferences=v._preferences?a.preferences(v._preferences,m._preferences):m._preferences,v._valids=w.merge(v._valids,m._valids,m._invalids),v._invalids=w.merge(v._invalids,m._invalids,m._valids);for(const b of m._singleRules.keys())v._singleRules.has(b)&&(v._rules=v._rules.filter(C=>C.keep||C.name!==b),v._singleRules.delete(b));for(const b of m._rules)m._definition.rules[b.method].multi||v._singleRules.set(b.name,b),v._rules.push(b);if(v._flags.empty&&m._flags.empty){v._flags.empty=v._flags.empty.concat(m._flags.empty);const b=Object.assign({},m._flags);delete b.empty,u(v._flags,b)}else if(m._flags.empty){v._flags.empty=m._flags.empty;const b=Object.assign({},m._flags);delete b.empty,u(v._flags,b)}else u(v._flags,m._flags);for(const b in m.$_terms){const C=m.$_terms[b];C?v.$_terms[b]?v.$_terms[b]=v.$_terms[b].concat(C):v.$_terms[b]=C.slice():v.$_terms[b]||(v.$_terms[b]=C)}return this.$_root._tracer&&this.$_root._tracer._combine(v,[this,m]),v.$_mutateRebuild()}extend(m){return o(!m.base,"Cannot extend type with another base"),s.type(this,m)}extract(m){return m=Array.isArray(m)?m:m.split("."),this._ids.reach(m)}fork(m,v){o(!this._inRuleset(),"Cannot fork inside a ruleset");let b=this;for(let C of[].concat(m))C=Array.isArray(C)?C:C.split("."),b=b._ids.fork(C,v,b);return b.$_temp.ruleset=!1,b}rule(m){const v=this._definition;a.assertOptions(m,Object.keys(v.modifiers)),o(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;o(b>=0&&b<this._rules.length,"Cannot apply rules to empty ruleset");const C=this.clone();for(let P=b;P<C._rules.length;++P){const $=C._rules[P],D=p($);for(const M in m)v.modifiers[M](D,m[M]),o(D.name===$.name,"Cannot change rule name");C._rules[P]=D,C._singleRules.get(D.name)===$&&C._singleRules.set(D.name,D)}return C.$_temp.ruleset=!1,C.$_mutateRebuild()}get ruleset(){o(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const m=this.clone();return m.$_temp.ruleset=m._rules.length,m}get $(){return this.ruleset}tailor(m){m=[].concat(m),o(!this._inRuleset(),"Cannot tailor inside a ruleset");let v=this;if(this.$_terms.alterations)for(const{target:b,adjuster:C}of this.$_terms.alterations)m.includes(b)&&(v=C(v),o(a.isSchema(v),"Alteration adjuster for",b,"failed to return a schema object"));return v=v.$_modify({each:b=>b.tailor(m),ref:!1}),v.$_temp.ruleset=!1,v.$_mutateRebuild()}tracer(){return h.location?h.location(this):this}validate(m,v){return g.entry(m,this,v)}validateAsync(m,v){return g.entryAsync(m,this,v)}$_addRule(m){typeof m=="string"&&(m={name:m}),o(m&&typeof m=="object","Invalid options"),o(m.name&&typeof m.name=="string","Invalid rule name");for(const $ in m)o($[0]!=="_","Cannot set private rule properties");const v=Object.assign({},m);v._resolve=[],v.method=v.method||v.name;const b=this._definition.rules[v.method],C=v.args;o(b,"Unknown rule",v.method);const P=this.clone();if(C){o(Object.keys(C).length===1||Object.keys(C).length===this._definition.rules[v.name].args.length,"Invalid rule definition for",this.type,v.name);for(const $ in C){let D=C[$];if(b.argsByName){const M=b.argsByName.get($);if(M.ref&&a.isResolvable(D))v._resolve.push($),P.$_mutateRegister(D);else if(M.normalize&&(D=M.normalize(D),C[$]=D),M.assert){const U=a.validateArg(D,$,M);o(!U,U,"or reference")}}D!==void 0?C[$]=D:delete C[$]}}return b.multi||(P._ruleRemove(v.name,{clone:!1}),P._singleRules.set(v.name,v)),P.$_temp.ruleset===!1&&(P.$_temp.ruleset=null),b.priority?P._rules.unshift(v):P._rules.push(v),P}$_compile(m,v){return r.schema(this.$_root,m,v)}$_createError(m,v,b,C,P,$={}){const D=$.flags!==!1?this._flags:{},M=$.messages?i.merge(this._definition.messages,$.messages):this._definition.messages;return new n.Report(m,v,b,D,M,C,P)}$_getFlag(m){return this._flags[m]}$_getRule(m){return this._singleRules.get(m)}$_mapLabels(m){return m=Array.isArray(m)?m:m.split("."),this._ids.labels(m)}$_match(m,v,b,C){(b=Object.assign({},b)).abortEarly=!0,b._externals=!1,v.snapshot();const P=!g.validate(m,this,v,b,C).errors;return v.restore(),P}$_modify(m){return a.assertOptions(m,["each","once","ref","schema"]),l.schema(this,m)||this}$_mutateRebuild(){return o(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(m,{source:v,name:b,path:C,key:P})=>{const $=this._definition[v][b]&&this._definition[v][b].register;$!==!1&&this.$_mutateRegister(m,{family:$,key:P})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(m,{family:v,key:b}={}){this._refs.register(m,v),this._ids.register(m,{key:b})}$_property(m){return this._definition.properties[m]}$_reach(m){return this._ids.reach(m)}$_rootReferences(){return this._refs.roots()}$_setFlag(m,v,b={}){o(m[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const C=this._definition.flags[m]||{};if(f(v,C.default)&&(v=void 0),f(v,this._flags[m]))return this;const P=b.clone!==!1?this.clone():this;return v!==void 0?(P._flags[m]=v,P.$_mutateRegister(v)):delete P._flags[m],m[0]!=="_"&&(P.$_temp.ruleset=!1),P}$_parent(m,...v){return this[m][a.symbols.parent].call(this,...v)}$_validate(m,v,b){return g.validate(m,this,v,b)}_assign(m){m.type=this.type,m.$_root=this.$_root,m.$_temp=Object.assign({},this.$_temp),m.$_temp.whens={},m._ids=this._ids.clone(),m._preferences=this._preferences,m._valids=this._valids&&this._valids.clone(),m._invalids=this._invalids&&this._invalids.clone(),m._rules=this._rules.slice(),m._singleRules=p(this._singleRules,{shallow:!0}),m._refs=this._refs.clone(),m._flags=Object.assign({},this._flags),m._cache=null,m.$_terms={};for(const v in this.$_terms)m.$_terms[v]=this.$_terms[v]?this.$_terms[v].slice():null;m.$_super={};for(const v in this.$_super)m.$_super[v]=this._super[v].bind(m);return m}_bare(){const m=this.clone();m._reset();const v=m._definition.terms;for(const b in v){const C=v[b];m.$_terms[b]=C.init}return m.$_mutateRebuild()}_default(m,v,b={}){return a.assertOptions(b,"literal"),o(v!==void 0,"Missing",m,"value"),o(typeof v=="function"||!b.literal,"Only function value supports literal option"),typeof v=="function"&&b.literal&&(v={[a.symbols.literal]:!0,literal:v}),this.$_setFlag(m,v)}_generate(m,v,b){if(!this.$_terms.whens)return{schema:this};const C=[],P=[];for(let M=0;M<this.$_terms.whens.length;++M){const U=this.$_terms.whens[M];if(U.concat){C.push(U.concat),P.push(`${M}.concat`);continue}const q=U.ref?U.ref.resolve(m,v,b):m,H=U.is?[U]:U.switch,I=P.length;for(let N=0;N<H.length;++N){const{is:W,then:Y,otherwise:de}=H[N],Ce=`${M}${U.switch?"."+N:""}`;if(W.$_match(q,v.nest(W,`${Ce}.is`),b)){if(Y){const He=v.localize([...v.path,`${Ce}.then`],v.ancestors,v.schemas),{schema:ct,id:Ne}=Y._generate(m,He,b);C.push(ct),P.push(`${Ce}.then${Ne?`(${Ne})`:""}`);break}}else if(de){const He=v.localize([...v.path,`${Ce}.otherwise`],v.ancestors,v.schemas),{schema:ct,id:Ne}=de._generate(m,He,b);C.push(ct),P.push(`${Ce}.otherwise${Ne?`(${Ne})`:""}`);break}}if(U.break&&P.length>I)break}const $=P.join(", ");if(v.mainstay.tracer.debug(v,"rule","when",$),!$)return{schema:this};if(!v.mainstay.tracer.active&&this.$_temp.whens[$])return{schema:this.$_temp.whens[$],id:$};let D=this;this._definition.generate&&(D=this._definition.generate(this,m,v,b));for(const M of C)D=D.concat(M);return this.$_root._tracer&&this.$_root._tracer._combine(D,[this,...C]),this.$_temp.whens[$]=D,{schema:D,id:$}}_inner(m,v,b={}){o(!this._inRuleset(),`Cannot set ${m} inside a ruleset`);const C=this.clone();return C.$_terms[m]&&!b.override||(C.$_terms[m]=[]),b.single?C.$_terms[m].push(v):C.$_terms[m].push(...v),C.$_temp.ruleset=!1,C}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(m,v={}){if(!this._singleRules.has(m))return this;const b=v.clone!==!1?this.clone():this;b._singleRules.delete(m);const C=[];for(let P=0;P<b._rules.length;++P){const $=b._rules[P];$.name!==m||$.keep?C.push($):b._inRuleset()&&P<b.$_temp.ruleset&&--b.$_temp.ruleset}return b._rules=C,b}_values(m,v){a.verifyFlat(m,v.slice(1,-1));const b=this.clone(),C=m[0]===a.symbols.override;if(C&&(m=m.slice(1)),!b[v]&&m.length?b[v]=new w:C&&(b[v]=m.length?new w:null,b.$_mutateRebuild()),!b[v])return b;C&&b[v].override();for(const P of m){o(P!==void 0,"Cannot call allow/valid/invalid with undefined"),o(P!==a.symbols.override,"Override must be the first value");const $=v==="_invalids"?"_valids":"_invalids";b[$]&&(b[$].remove(P),b[$].length||(o(v==="_valids"||!b._flags.only,"Setting invalid value",P,"leaves schema rejecting all values due to previous valid rule"),b[$]=null)),b[v].add(P,b._refs)}return b}}};S.Base.prototype[a.symbols.any]={version:a.version,compile:r.compile,root:"$_root"},S.Base.prototype.isImmutable=!0,S.Base.prototype.deny=S.Base.prototype.invalid,S.Base.prototype.disallow=S.Base.prototype.invalid,S.Base.prototype.equal=S.Base.prototype.valid,S.Base.prototype.exist=S.Base.prototype.required,S.Base.prototype.not=S.Base.prototype.invalid,S.Base.prototype.options=S.Base.prototype.prefs,S.Base.prototype.preferences=S.Base.prototype.prefs,j.exports=new S.Base},8652:(j,y,x)=>{const o=x(375),p=x(8571),f=x(8160),u={max:1e3,supported:new Set(["undefined","boolean","number","string"])};y.provider={provision:t=>new u.Cache(t)},u.Cache=class{constructor(t={}){f.assertOptions(t,["max"]),o(t.max===void 0||t.max&&t.max>0&&isFinite(t.max),"Invalid max cache size"),this._max=t.max||u.max,this._map=new Map,this._list=new u.List}get length(){return this._map.size}set(t,a){if(t!==null&&!u.supported.has(typeof t))return;let r=this._map.get(t);if(r)return r.value=a,void this._list.first(r);r=this._list.unshift({key:t,value:a}),this._map.set(t,r),this._compact()}get(t){const a=this._map.get(t);if(a)return this._list.first(a),p(a.value)}_compact(){if(this._map.size>this._max){const t=this._list.pop();this._map.delete(t.key)}}},u.List=class{constructor(){this.tail=null,this.head=null}unshift(t){return t.next=null,t.prev=this.head,this.head&&(this.head.next=t),this.head=t,this.tail||(this.tail=t),t}first(t){t!==this.head&&(this._remove(t),this.unshift(t))}pop(){return this._remove(this.tail)}_remove(t){const{next:a,prev:r}=t;return a.prev=r,r&&(r.next=a),t===this.tail&&(this.tail=a),t.prev=null,t.next=null,t}}},8160:(j,y,x)=>{const o=x(375),p=x(7916),f=x(5934);let u,t;const a={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)?)?)?)?$/};y.version=f.version,y.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},y.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")},y.assertOptions=function(r,n,s="Options"){o(r&&typeof r=="object"&&!Array.isArray(r),"Options must be of type object");const c=Object.keys(r).filter(i=>!n.includes(i));o(c.length===0,`${s} contain unknown keys: ${c}`)},y.checkPreferences=function(r){t=t||x(3378);const n=t.preferences.validate(r);if(n.error)throw new p([n.error.details[0].message])},y.compare=function(r,n,s){switch(s){case"=":return r===n;case">":return r>n;case"<":return r<n;case">=":return r>=n;case"<=":return r<=n}},y.default=function(r,n){return r===void 0?n:r},y.isIsoDate=function(r){return a.isoDate.test(r)},y.isNumber=function(r){return typeof r=="number"&&!isNaN(r)},y.isResolvable=function(r){return!!r&&(r[y.symbols.ref]||r[y.symbols.template])},y.isSchema=function(r,n={}){const s=r&&r[y.symbols.any];return!!s&&(o(n.legacy||s.version===y.version,"Cannot mix different versions of joi schemas"),!0)},y.isValues=function(r){return r[y.symbols.values]},y.limit=function(r){return Number.isSafeInteger(r)&&r>=0},y.preferences=function(r,n){u=u||x(6914),r=r||{},n=n||{};const s=Object.assign({},r,n);return n.errors&&r.errors&&(s.errors=Object.assign({},r.errors,n.errors),s.errors.wrap=Object.assign({},r.errors.wrap,n.errors.wrap)),n.messages&&(s.messages=u.compile(n.messages,r.messages)),delete s[y.symbols.prefs],s},y.tryWithPath=function(r,n,s={}){try{return r()}catch(c){throw c.path!==void 0?c.path=n+"."+c.path:c.path=n,s.append&&(c.message=`${c.message} (${c.path})`),c}},y.validateArg=function(r,n,{assert:s,message:c}){if(y.isSchema(s)){const i=s.validate(r);return i.error?i.error.message:void 0}if(!s(r))return n?`${n} ${c}`:c},y.verifyFlat=function(r,n){for(const s of r)o(!Array.isArray(s),"Method no longer accepts array arguments:",n)}},3292:(j,y,x)=>{const o=x(375),p=x(8160),f=x(6133),u={};y.schema=function(t,a,r={}){p.assertOptions(r,["appendPath","override"]);try{return u.schema(t,a,r)}catch(n){throw r.appendPath&&n.path!==void 0&&(n.message=`${n.message} (${n.path})`),n}},u.schema=function(t,a,r){o(a!==void 0,"Invalid undefined schema"),Array.isArray(a)&&(o(a.length,"Invalid empty array schema"),a.length===1&&(a=a[0]));const n=(s,...c)=>r.override!==!1?s.valid(t.override,...c):s.valid(...c);if(u.simple(a))return n(t,a);if(typeof a=="function")return t.custom(a);if(o(typeof a=="object","Invalid schema content:",typeof a),p.isResolvable(a))return n(t,a);if(p.isSchema(a))return a;if(Array.isArray(a)){for(const s of a)if(!u.simple(s))return t.alternatives().try(...a);return n(t,...a)}return a instanceof RegExp?t.string().regex(a):a instanceof Date?n(t.date(),a):(o(Object.getPrototypeOf(a)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),t.object().keys(a))},y.ref=function(t,a){return f.isRef(t)?t:f.create(t,a)},y.compile=function(t,a,r={}){p.assertOptions(r,["legacy"]);const n=a&&a[p.symbols.any];if(n)return o(r.legacy||n.version===p.version,"Cannot mix different versions of joi schemas:",n.version,p.version),a;if(typeof a!="object"||!r.legacy)return y.schema(t,a,{appendPath:!0});const s=u.walk(a);return s?s.compile(s.root,a):y.schema(t,a,{appendPath:!0})},u.walk=function(t){if(typeof t!="object")return null;if(Array.isArray(t)){for(const r of t){const n=u.walk(r);if(n)return n}return null}const a=t[p.symbols.any];if(a)return{root:t[a.root],compile:a.compile};o(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const r in t){const n=u.walk(t[r]);if(n)return n}return null},u.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},y.when=function(t,a,r){if(r===void 0&&(o(a&&typeof a=="object","Missing options"),r=a,a=f.create(".")),Array.isArray(r)&&(r={switch:r}),p.assertOptions(r,["is","not","then","otherwise","switch","break"]),p.isSchema(a))return o(r.is===void 0,'"is" can not be used with a schema condition'),o(r.not===void 0,'"not" can not be used with a schema condition'),o(r.switch===void 0,'"switch" can not be used with a schema condition'),u.condition(t,{is:a,then:r.then,otherwise:r.otherwise,break:r.break});if(o(f.isRef(a)||typeof a=="string","Invalid condition:",a),o(r.not===void 0||r.is===void 0,'Cannot combine "is" with "not"'),r.switch===void 0){let s=r;r.not!==void 0&&(s={is:r.not,then:r.otherwise,otherwise:r.then,break:r.break});let c=s.is!==void 0?t.$_compile(s.is):t.$_root.invalid(null,!1,0,"").required();return o(s.then!==void 0||s.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),o(s.break===void 0||s.then===void 0||s.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),r.is===void 0||f.isRef(r.is)||p.isSchema(r.is)||(c=c.required()),u.condition(t,{ref:y.ref(a),is:c,then:s.then,otherwise:s.otherwise,break:s.break})}o(Array.isArray(r.switch),'"switch" must be an array'),o(r.is===void 0,'Cannot combine "switch" with "is"'),o(r.not===void 0,'Cannot combine "switch" with "not"'),o(r.then===void 0,'Cannot combine "switch" with "then"');const n={ref:y.ref(a),switch:[],break:r.break};for(let s=0;s<r.switch.length;++s){const c=r.switch[s],i=s===r.switch.length-1;p.assertOptions(c,i?["is","then","otherwise"]:["is","then"]),o(c.is!==void 0,'Switch statement missing "is"'),o(c.then!==void 0,'Switch statement missing "then"');const l={is:t.$_compile(c.is),then:t.$_compile(c.then)};if(f.isRef(c.is)||p.isSchema(c.is)||(l.is=l.is.required()),i){o(r.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const d=r.otherwise!==void 0?r.otherwise:c.otherwise;d!==void 0&&(o(n.break===void 0,"Cannot specify both otherwise and break"),l.otherwise=t.$_compile(d))}n.switch.push(l)}return n},u.condition=function(t,a){for(const r of["then","otherwise"])a[r]===void 0?delete a[r]:a[r]=t.$_compile(a[r]);return a}},6354:(j,y,x)=>{const o=x(5688),p=x(8160),f=x(3328);y.Report=class{constructor(u,t,a,r,n,s,c){if(this.code=u,this.flags=r,this.messages=n,this.path=s.path,this.prefs=c,this.state=s,this.value=t,this.message=null,this.template=null,this.local=a||{},this.local.label=y.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 i=this.path[this.path.length-1];typeof i!="object"&&(this.local.key=i)}}_setTemplate(u){if(this.template=u,!this.flags.label&&this.path.length===0){const t=this._template(this.template,"root");t&&(this.local.label=t)}}toString(){if(this.message)return this.message;const u=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return t===void 0?`Error code "${u}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(u,t){return y.template(this.value,u,t||this.code,this.state,this.prefs)}},y.path=function(u){let t="";for(const a of u)typeof a!="object"&&(typeof a=="string"?(t&&(t+="."),t+=a):t+=`[${a}]`);return t},y.template=function(u,t,a,r,n){if(!t)return;if(f.isTemplate(t))return a!=="root"?t:null;let s=n.errors.language;if(p.isResolvable(s)&&(s=s.resolve(u,r,n)),s&&t[s]){if(t[s][a]!==void 0)return t[s][a];if(t[s]["*"]!==void 0)return t[s]["*"]}return t[a]?t[a]:t["*"]},y.label=function(u,t,a,r){if(!a.errors.label)return"";if(u.label)return u.label;let n=t.path;return a.errors.label==="key"&&t.path.length>1&&(n=t.path.slice(-1)),y.path(n)||y.template(null,a.messages,"root",t,a)||r&&y.template(null,r,"root",t,a)||"value"},y.process=function(u,t,a){if(!u)return null;const{override:r,message:n,details:s}=y.details(u);if(r)return r;if(a.errors.stack)return new y.ValidationError(n,s,t);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const i=new y.ValidationError(n,s,t);return Error.stackTraceLimit=c,i},y.details=function(u,t={}){let a=[];const r=[];for(const n of u){if(n instanceof Error){if(t.override!==!1)return{override:n};const c=n.toString();a.push(c),r.push({message:c,type:"override",context:{error:n}});continue}const s=n.toString();a.push(s),r.push({message:s,path:n.path.filter(c=>typeof c!="object"),type:n.code,context:n.local})}return a.length>1&&(a=[...new Set(a)]),{message:a.join(". "),details:r}},y.ValidationError=class extends Error{constructor(u,t,a){super(u),this._original=a,this.details=t}static isError(u){return u instanceof y.ValidationError}},y.ValidationError.prototype.isJoi=!0,y.ValidationError.prototype.name="ValidationError",y.ValidationError.prototype.annotate=o.error},8901:(j,y,x)=>{const o=x(375),p=x(8571),f=x(8160),u=x(6914),t={};y.type=function(a,r){const n=Object.getPrototypeOf(a),s=p(n),c=a._assign(Object.create(s)),i=Object.assign({},r);delete i.base,s._definition=i;const l=n._definition||{};i.messages=u.merge(l.messages,i.messages),i.properties=Object.assign({},l.properties,i.properties),c.type=i.type,i.flags=Object.assign({},l.flags,i.flags);const d=Object.assign({},l.terms);if(i.terms)for(const S in i.terms){const m=i.terms[S];o(c.$_terms[S]===void 0,"Invalid term override for",i.type,S),c.$_terms[S]=m.init,d[S]=m}i.terms=d,i.args||(i.args=l.args),i.prepare=t.prepare(i.prepare,l.prepare),i.coerce&&(typeof i.coerce=="function"&&(i.coerce={method:i.coerce}),i.coerce.from&&!Array.isArray(i.coerce.from)&&(i.coerce={method:i.coerce.method,from:[].concat(i.coerce.from)})),i.coerce=t.coerce(i.coerce,l.coerce),i.validate=t.validate(i.validate,l.validate);const h=Object.assign({},l.rules);if(i.rules)for(const S in i.rules){const m=i.rules[S];o(typeof m=="object","Invalid rule definition for",i.type,S);let v=m.method;if(v===void 0&&(v=function(){return this.$_addRule(S)}),v&&(o(!s[S],"Rule conflict in",i.type,S),s[S]=v),o(!h[S],"Rule conflict in",i.type,S),h[S]=m,m.alias){const b=[].concat(m.alias);for(const C of b)s[C]=m.method}m.args&&(m.argsByName=new Map,m.args=m.args.map(b=>(typeof b=="string"&&(b={name:b}),o(!m.argsByName.has(b.name),"Duplicated argument name",b.name),f.isSchema(b.assert)&&(b.assert=b.assert.strict().label(b.name)),m.argsByName.set(b.name,b),b)))}i.rules=h;const g=Object.assign({},l.modifiers);if(i.modifiers)for(const S in i.modifiers){o(!s[S],"Rule conflict in",i.type,S);const m=i.modifiers[S];o(typeof m=="function","Invalid modifier definition for",i.type,S);const v=function(b){return this.rule({[S]:b})};s[S]=v,g[S]=m}if(i.modifiers=g,i.overrides){s._super=n,c.$_super={};for(const S in i.overrides)o(n[S],"Cannot override missing",S),i.overrides[S][f.symbols.parent]=n[S],c.$_super[S]=n[S].bind(c);Object.assign(s,i.overrides)}i.cast=Object.assign({},l.cast,i.cast);const w=Object.assign({},l.manifest,i.manifest);return w.build=t.build(i.manifest&&i.manifest.build,l.manifest&&l.manifest.build),i.manifest=w,i.rebuild=t.rebuild(i.rebuild,l.rebuild),c},t.build=function(a,r){return a&&r?function(n,s){return r(a(n,s),s)}:a||r},t.coerce=function(a,r){return a&&r?{from:a.from&&r.from?[...new Set([...a.from,...r.from])]:null,method(n,s){let c;if((!r.from||r.from.includes(typeof n))&&(c=r.method(n,s),c)){if(c.errors||c.value===void 0)return c;n=c.value}if(!a.from||a.from.includes(typeof n)){const i=a.method(n,s);if(i)return i}return c}}:a||r},t.prepare=function(a,r){return a&&r?function(n,s){const c=a(n,s);if(c){if(c.errors||c.value===void 0)return c;n=c.value}return r(n,s)||c}:a||r},t.rebuild=function(a,r){return a&&r?function(n){r(n),a(n)}:a||r},t.validate=function(a,r){return a&&r?function(n,s){const c=r(n,s);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;n=c.value}return a(n,s)||c}:a||r}},5107:(j,y,x)=>{const o=x(375),p=x(8571),f=x(8652),u=x(8160),t=x(3292),a=x(6354),r=x(8901),n=x(9708),s=x(6133),c=x(3328),i=x(1152);let l;const d={types:{alternatives:x(4946),any:x(8068),array:x(546),boolean:x(4937),date:x(7500),function:x(390),link:x(8785),number:x(3832),object:x(8966),string:x(7417),symbol:x(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const h={_types:new Set(Object.keys(d.types))};for(const g of h._types)h[g]=function(...w){return o(!w.length||["alternatives","link","object"].includes(g),"The",g,"type does not allow arguments"),d.generate(this,d.types[g],w)};for(const g of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])h[g]=function(...w){return this.any()[g](...w)};Object.assign(h,d.methods);for(const g in d.aliases){const w=d.aliases[g];h[g]=h[w]}return h.x=h.expression,i.setup&&i.setup(h),h}};d.methods={ValidationError:a.ValidationError,version:u.version,cache:f.provider,assert(h,g,...w){d.assert(h,g,!0,w)},attempt:(h,g,...w)=>d.assert(h,g,!1,w),build(h){return o(typeof n.build=="function","Manifest functionality disabled"),n.build(this,h)},checkPreferences(h){u.checkPreferences(h)},compile(h,g){return t.compile(this,h,g)},defaults(h){o(typeof h=="function","modifier must be a function");const g=Object.assign({},this);for(const w of g._types){const S=h(g[w]());o(u.isSchema(S),"modifier must return a valid schema object"),g[w]=function(...m){return d.generate(this,S,m)}}return g},expression:(...h)=>new c(...h),extend(...h){u.verifyFlat(h,"extend"),l=l||x(3378),o(h.length,"You need to provide at least one extension"),this.assert(h,l.extensions);const g=Object.assign({},this);g._types=new Set(g._types);for(let w of h){typeof w=="function"&&(w=w(g)),this.assert(w,l.extension);const S=d.expandExtension(w,g);for(const m of S){o(g[m.type]===void 0||g._types.has(m.type),"Cannot override name",m.type);const v=m.base||this.any(),b=r.type(v,m);g._types.add(m.type),g[m.type]=function(...C){return d.generate(this,b,C)}}}return g},isError:a.ValidationError.isError,isExpression:c.isTemplate,isRef:s.isRef,isSchema:u.isSchema,in:(...h)=>s.in(...h),override:u.symbols.override,ref:(...h)=>s.create(...h),types(){const h={};for(const g of this._types)h[g]=this[g]();for(const g in d.aliases)h[g]=this[g]();return h}},d.assert=function(h,g,w,S){const m=S[0]instanceof Error||typeof S[0]=="string"?S[0]:null,v=m!==null?S[1]:S[0],b=g.validate(h,u.preferences({errors:{stack:!0}},v||{}));let C=b.error;if(!C)return b.value;if(m instanceof Error)throw m;const P=w&&typeof C.annotate=="function"?C.annotate():C.message;throw C instanceof a.ValidationError==0&&(C=p(C)),C.message=m?`${m} ${P}`:P,C},d.generate=function(h,g,w){return o(h,"Must be invoked on a Joi instance."),g.$_root=h,g._definition.args&&w.length?g._definition.args(g,...w):g},d.expandExtension=function(h,g){if(typeof h.type=="string")return[h];const w=[];for(const S of g._types)if(h.type.test(S)){const m=Object.assign({},h);m.type=S,m.base=g[S](),w.push(m)}return w},j.exports=d.root()},6914:(j,y,x)=>{const o=x(375),p=x(8571),f=x(3328);y.compile=function(u,t){if(typeof u=="string")return o(!t,"Cannot set single message string"),new f(u);if(f.isTemplate(u))return o(!t,"Cannot set single message template"),u;o(typeof u=="object"&&!Array.isArray(u),"Invalid message options"),t=t?p(t):{};for(let a in u){const r=u[a];if(a==="root"||f.isTemplate(r)){t[a]=r;continue}if(typeof r=="string"){t[a]=new f(r);continue}o(typeof r=="object"&&!Array.isArray(r),"Invalid message for",a);const n=a;for(a in t[n]=t[n]||{},r){const s=r[a];a==="root"||f.isTemplate(s)?t[n][a]=s:(o(typeof s=="string","Invalid message for",a,"in",n),t[n][a]=new f(s))}}return t},y.decompile=function(u){const t={};for(let a in u){const r=u[a];if(a==="root"){t.root=r;continue}if(f.isTemplate(r)){t[a]=r.describe({compact:!0});continue}const n=a;for(a in t[n]={},r){const s=r[a];a!=="root"?t[n][a]=s.describe({compact:!0}):t[n].root=s}}return t},y.merge=function(u,t){if(!u)return y.compile(t);if(!t)return u;if(typeof t=="string")return new f(t);if(f.isTemplate(t))return t;const a=p(u);for(let r in t){const n=t[r];if(r==="root"||f.isTemplate(n)){a[r]=n;continue}if(typeof n=="string"){a[r]=new f(n);continue}o(typeof n=="object"&&!Array.isArray(n),"Invalid message for",r);const s=r;for(r in a[s]=a[s]||{},n){const c=n[r];r==="root"||f.isTemplate(c)?a[s][r]=c:(o(typeof c=="string","Invalid message for",r,"in",s),a[s][r]=new f(c))}}return a}},2294:(j,y,x)=>{const o=x(375),p=x(8160),f=x(6133),u={};y.Ids=u.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const t=new u.Ids;return t._byId=new Map(this._byId),t._byKey=new Map(this._byKey),t._schemaChain=this._schemaChain,t}concat(t){t._schemaChain&&(this._schemaChain=!0);for(const[a,r]of t._byId.entries())o(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,r);for(const[a,r]of t._byKey.entries())o(!this._byId.has(a),"Schema key conflicts with existing id:",a),this._byKey.set(a,r)}fork(t,a,r){const n=this._collect(t);n.push({schema:r});const s=n.shift();let c={id:s.id,schema:a(s.schema)};o(p.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const i of n)c={id:i.id,schema:u.fork(i.schema,c.id,c.schema)};return c.schema}labels(t,a=[]){const r=t[0],n=this._get(r);if(!n)return[...a,...t].join(".");const s=t.slice(1);return a=[...a,n.schema._flags.label||r],s.length?n.schema._ids.labels(s,a):a.join(".")}reach(t,a=[]){const r=t[0],n=this._get(r);o(n,"Schema does not contain path",[...a,...t].join("."));const s=t.slice(1);return s.length?n.schema._ids.reach(s,[...a,r]):n.schema}register(t,{key:a}={}){if(!t||!p.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const r=t._flags.id;if(r){const n=this._byId.get(r);o(!n||n.schema===t,"Cannot add different schemas with the same id:",r),o(!this._byKey.has(r),"Schema id conflicts with existing key:",r),this._byId.set(r,{schema:t,id:r})}a&&(o(!this._byKey.has(a),"Schema already contains key:",a),o(!this._byId.has(a),"Schema key conflicts with existing id:",a),this._byKey.set(a,{schema:t,id:a}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(t,a=[],r=[]){const n=t[0],s=this._get(n);o(s,"Schema does not contain path",[...a,...t].join(".")),r=[s,...r];const c=t.slice(1);return c.length?s.schema._ids._collect(c,[...a,n],r):r}_get(t){return this._byId.get(t)||this._byKey.get(t)}},u.fork=function(t,a,r){const n=y.schema(t,{each:(s,{key:c})=>{if(a===(s._flags.id||c))return r},ref:!1});return n?n.$_mutateRebuild():t},y.schema=function(t,a){let r;for(const n in t._flags){if(n[0]==="_")continue;const s=u.scan(t._flags[n],{source:"flags",name:n},a);s!==void 0&&(r=r||t.clone(),r._flags[n]=s)}for(let n=0;n<t._rules.length;++n){const s=t._rules[n],c=u.scan(s.args,{source:"rules",name:s.name},a);if(c!==void 0){r=r||t.clone();const i=Object.assign({},s);i.args=c,r._rules[n]=i,r._singleRules.get(s.name)===s&&r._singleRules.set(s.name,i)}}for(const n in t.$_terms){if(n[0]==="_")continue;const s=u.scan(t.$_terms[n],{source:"terms",name:n},a);s!==void 0&&(r=r||t.clone(),r.$_terms[n]=s)}return r},u.scan=function(t,a,r,n,s){const c=n||[];if(t===null||typeof t!="object")return;let i;if(Array.isArray(t)){for(let l=0;l<t.length;++l){const d=a.source==="terms"&&a.name==="keys"&&t[l].key,h=u.scan(t[l],a,r,[l,...c],d);h!==void 0&&(i=i||t.slice(),i[l]=h)}return i}if(r.schema!==!1&&p.isSchema(t)||r.ref!==!1&&f.isRef(t)){const l=r.each(t,{...a,path:c,key:s});return l===t?void 0:l}for(const l in t){if(l[0]==="_")continue;const d=u.scan(t[l],a,r,[l,...c],s);d!==void 0&&(i=i||Object.assign({},t),i[l]=d)}return i}},6133:(j,y,x)=>{const o=x(375),p=x(8571),f=x(9621),u=x(8160);let t;const a={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};y.create=function(r,n={}){o(typeof r=="string","Invalid reference key:",r),u.assertOptions(n,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),o(!n.prefix||typeof n.prefix=="object","options.prefix must be of type object");const s=Object.assign({},a.defaults,n);delete s.prefix;const c=s.separator,i=a.context(r,c,n.prefix);if(s.type=i.type,r=i.key,s.type==="value")if(i.root&&(o(!c||r[0]!==c,"Cannot specify relative path with root prefix"),s.ancestor="root",r||(r=null)),c&&c===r)r=null,s.ancestor=0;else if(s.ancestor!==void 0)o(!c||!r||r[0]!==c,"Cannot combine prefix with ancestor option");else{const[l,d]=a.ancestor(r,c);d&&(r=r.slice(d))===""&&(r=null),s.ancestor=l}return s.path=c?r===null?[]:r.split(c):[r],new a.Ref(s)},y.in=function(r,n={}){return y.create(r,{...n,in:!0})},y.isRef=function(r){return!!r&&!!r[u.symbols.ref]},a.Ref=class{constructor(r){o(typeof r=="object","Invalid reference construction"),u.assertOptions(r,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),o([!1,void 0].includes(r.separator)||typeof r.separator=="string"&&r.separator.length===1,"Invalid separator"),o(!r.adjust||typeof r.adjust=="function","options.adjust must be a function"),o(!r.map||Array.isArray(r.map),"options.map must be an array"),o(!r.map||!r.adjust,"Cannot set both map and adjust options"),Object.assign(this,a.defaults,r),o(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(r,n,s,c,i={}){return o(!this.in||i.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(s.context,n,i):this.type==="local"?this._resolve(c,n,i):this.ancestor?this.ancestor==="root"?this._resolve(n.ancestors[n.ancestors.length-1],n,i):(o(this.ancestor<=n.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(n.ancestors[this.ancestor-1],n,i)):this._resolve(r,n,i)}_resolve(r,n,s){let c;if(this.type==="value"&&n.mainstay.shadow&&s.shadow!==!1&&(c=n.mainstay.shadow.get(this.absolute(n))),c===void 0&&(c=f(r,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const i=this.map.get(c);i!==void 0&&(c=i)}return n.mainstay&&n.mainstay.tracer.resolve(n,this,c),c}toString(){return this.display}absolute(r){return[...r.path.slice(0,-this.ancestor),...this.path]}clone(){return new a.Ref(this)}describe(){const r={path:this.path};this.type!=="value"&&(r.type=this.type),this.separator!=="."&&(r.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(r.ancestor=this.ancestor),this.map&&(r.map=[...this.map]);for(const n of["adjust","iterables","render"])this[n]!==null&&this[n]!==void 0&&(r[n]=this[n]);return this.in!==!1&&(r.in=!0),{ref:r}}updateDisplay(){const r=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${r}`);if(!this.separator)return void(this.display=`ref:${r}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${r}`);if(this.ancestor==="root")return void(this.display=`ref:root:${r}`);if(this.ancestor===1)return void(this.display=`ref:${r||".."}`);const n=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${n}${r||""}`}},a.Ref.prototype[u.symbols.ref]=!0,y.build=function(r){return(r=Object.assign({},a.defaults,r)).type==="value"&&r.ancestor===void 0&&(r.ancestor=1),new a.Ref(r)},a.context=function(r,n,s={}){if(r=r.trim(),s){const c=s.global===void 0?"$":s.global;if(c!==n&&r.startsWith(c))return{key:r.slice(c.length),type:"global"};const i=s.local===void 0?"#":s.local;if(i!==n&&r.startsWith(i))return{key:r.slice(i.length),type:"local"};const l=s.root===void 0?"/":s.root;if(l!==n&&r.startsWith(l))return{key:r.slice(l.length),type:"value",root:!0}}return{key:r,type:"value"}},a.ancestor=function(r,n){if(!n)return[1,0];if(r[0]!==n)return[1,0];if(r[1]!==n)return[0,1];let s=2;for(;r[s]===n;)++s;return[s-1,s]},y.toSibling=0,y.toParent=1,y.Manager=class{constructor(){this.refs=[]}register(r,n){if(r)if(n=n===void 0?y.toParent:n,Array.isArray(r))for(const s of r)this.register(s,n);else if(u.isSchema(r))for(const s of r._refs.refs)s.ancestor-n>=0&&this.refs.push({ancestor:s.ancestor-n,root:s.root});else y.isRef(r)&&r.type==="value"&&r.ancestor-n>=0&&this.refs.push({ancestor:r.ancestor-n,root:r.root}),t=t||x(3328),t.isTemplate(r)&&this.register(r.refs(),n)}get length(){return this.refs.length}clone(){const r=new y.Manager;return r.refs=p(this.refs),r}reset(){this.refs=[]}roots(){return this.refs.filter(r=>!r.ancestor).map(r=>r.root)}}},3378:(j,y,x)=>{const o=x(5107),p={};p.wrap=o.string().min(1).max(2).allow(!1),y.preferences=o.object({allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),context:o.object(),convert:o.boolean(),dateFormat:o.valid("date","iso","string","time","utc"),debug:o.boolean(),errors:{escapeHtml:o.boolean(),label:o.valid("path","key",!1),language:[o.string(),o.object().ref()],render:o.boolean(),stack:o.boolean(),wrap:{label:p.wrap,array:p.wrap,string:p.wrap}},externals:o.boolean(),messages:o.object(),noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:o.valid("required","optional","forbidden"),skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()}).strict(),p.nameRx=/^[a-zA-Z0-9]\w*$/,p.rule=o.object({alias:o.array().items(o.string().pattern(p.nameRx)).single(),args:o.array().items(o.string(),o.object({name:o.string().pattern(p.nameRx).required(),ref:o.boolean(),assert:o.alternatives([o.function(),o.object().schema()]).conditional("ref",{is:!0,then:o.required()}),normalize:o.function(),message:o.string().when("assert",{is:o.function(),then:o.required()})})),convert:o.boolean(),manifest:o.boolean(),method:o.function().allow(!1),multi:o.boolean(),validate:o.function()}),y.extension=o.object({type:o.alternatives([o.string(),o.object().regex()]).required(),args:o.function(),cast:o.object().pattern(p.nameRx,o.object({from:o.function().maxArity(1).required(),to:o.function().minArity(1).maxArity(2).required()})),base:o.object().schema().when("type",{is:o.object().regex(),then:o.forbidden()}),coerce:[o.function().maxArity(3),o.object({method:o.function().maxArity(3).required(),from:o.array().items(o.string()).single()})],flags:o.object().pattern(p.nameRx,o.object({setter:o.string(),default:o.any()})),manifest:{build:o.function().arity(2)},messages:[o.object(),o.string()],modifiers:o.object().pattern(p.nameRx,o.function().minArity(1).maxArity(2)),overrides:o.object().pattern(p.nameRx,o.function()),prepare:o.function().maxArity(3),rebuild:o.function().arity(1),rules:o.object().pattern(p.nameRx,p.rule),terms:o.object().pattern(p.nameRx,o.object({init:o.array().allow(null).required(),manifest:o.object().pattern(/.+/,[o.valid("schema","single"),o.object({mapped:o.object({from:o.string().required(),to:o.string().required()}).required()})])})),validate:o.function().maxArity(3)}).strict(),y.extensions=o.array().items(o.object(),o.function().arity(1)).strict(),p.desc={buffer:o.object({buffer:o.string()}),func:o.object({function:o.function().required(),options:{literal:!0}}),override:o.object({override:!0}),ref:o.object({ref:o.object({type:o.valid("value","global","local"),path:o.array().required(),separator:o.string().length(1).allow(!1),ancestor:o.number().min(0).integer().allow("root"),map:o.array().items(o.array().length(2)).min(1),adjust:o.function(),iterables:o.boolean(),in:o.boolean(),render:o.boolean()}).required()}),regex:o.object({regex:o.string().min(3)}),special:o.object({special:o.valid("deep").required()}),template:o.object({template:o.string().required(),options:o.object()}),value:o.object({value:o.alternatives([o.object(),o.array()]).required()})},p.desc.entity=o.alternatives([o.array().items(o.link("...")),o.boolean(),o.function(),o.number(),o.string(),p.desc.buffer,p.desc.func,p.desc.ref,p.desc.regex,p.desc.special,p.desc.template,p.desc.value,o.link("/")]),p.desc.values=o.array().items(null,o.boolean(),o.function(),o.number().allow(1/0,-1/0),o.string().allow(""),o.symbol(),p.desc.buffer,p.desc.func,p.desc.override,p.desc.ref,p.desc.regex,p.desc.template,p.desc.value),p.desc.messages=o.object().pattern(/.+/,[o.string(),p.desc.template,o.object().pattern(/.+/,[o.string(),p.desc.template])]),y.description=o.object({type:o.string().required(),flags:o.object({cast:o.string(),default:o.any(),description:o.string(),empty:o.link("/"),failover:p.desc.entity,id:o.string(),label:o.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:o.boolean(),unit:o.string()}).unknown(),preferences:{allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),convert:o.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:o.boolean(),label:["path","key"],language:[o.string(),p.desc.ref],wrap:{label:p.wrap,array:p.wrap}},externals:o.boolean(),messages:p.desc.messages,noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:["required","optional","forbidden"],skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()},allow:p.desc.values,invalid:p.desc.values,rules:o.array().min(1).items({name:o.string().required(),args:o.object().min(1),keep:o.boolean(),message:[o.string(),p.desc.messages],warn:o.boolean()}),keys:o.object().pattern(/.*/,o.link("/")),link:p.desc.ref}).pattern(/^[a-z]\w*$/,o.any())},493:(j,y,x)=>{const o=x(8571),p=x(9621),f=x(8160),u={value:Symbol("value")};j.exports=u.State=class{constructor(t,a,r){this.path=t,this.ancestors=a,this.mainstay=r.mainstay,this.schemas=r.schemas,this.debug=null}localize(t,a=null,r=null){const n=new u.State(t,a,this);return r&&n.schemas&&(n.schemas=[u.schemas(r),...n.schemas]),n}nest(t,a){const r=new u.State(this.path,this.ancestors,this);return r.schemas=r.schemas&&[u.schemas(t),...r.schemas],r.debug=a,r}shadow(t,a){this.mainstay.shadow=this.mainstay.shadow||new u.Shadow,this.mainstay.shadow.set(this.path,t,a)}snapshot(){this.mainstay.shadow&&(this._snapshot=o(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},u.schemas=function(t){return f.isSchema(t)?{schema:t}:t},u.Shadow=class{constructor(){this._values=null}set(t,a,r){if(!t.length||r==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let n=this._values;for(let s=0;s<t.length;++s){const c=t[s];let i=n.get(c);i||(i=new Map,n.set(c,i)),n=i}n[u.value]=a}get(t){const a=this.node(t);if(a)return a[u.value]}node(t){if(this._values)return p(this._values,t,{iterables:!0})}override(t,a){if(!this._values)return;const r=t.slice(0,-1),n=t[t.length-1],s=p(this._values,r,{iterables:!0});a?s.set(n,a):s&&s.delete(n)}}},3328:(j,y,x)=>{const o=x(375),p=x(8571),f=x(5277),u=x(1447),t=x(8160),a=x(6354),r=x(6133),n={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=n.Template=class{constructor(s,c){if(o(typeof s=="string","Template source must be a string"),o(!s.includes("\0")&&!s.includes(""),"Template source cannot contain reserved control characters"),this.source=s,this.rendered=s,this._template=null,c){const{functions:i,...l}=c;this._settings=Object.keys(l).length?p(l):void 0,this._functions=i,this._functions&&(o(Object.keys(this._functions).every(d=>typeof d=="string"),"Functions keys must be strings"),o(Object.values(this._functions).every(d=>typeof d=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const s=n.encode(this.source),c=n.split(s);let i=!1;const l=[],d=c.shift();d&&l.push(d);for(const h of c){const g=h[0]!=="{",w=g?"}":"}}",S=h.indexOf(w);if(S===-1||h[1]==="{"){l.push(`{${n.decode(h)}`);continue}let m=h.slice(g?0:1,S);const v=m[0]===":";v&&(m=m.slice(1));const b=this._ref(n.decode(m),{raw:g,wrapped:v});l.push(b),typeof b!="string"&&(i=!0);const C=h.slice(S+w.length);C&&l.push(n.decode(C))}i?this._template=l:this.rendered=l.join("")}static date(s,c){return n.dateFormat[c.dateFormat].call(s)}describe(s={}){if(!this._settings&&s.compact)return this.source;const c={template:this.source};return this._settings&&(c.options=this._settings),this._functions&&(c.functions=this._functions),c}static build(s){return new n.Template(s.template,s.options||s.functions?{...s.options,functions:s.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(s){return!!s&&!!s[t.symbols.template]}refs(){if(!this._template)return;const s=[];for(const c of this._template)typeof c!="string"&&s.push(...c.refs);return s}resolve(s,c,i,l){return this._template&&this._template.length===1?this._part(this._template[0],s,c,i,l,{}):this.render(s,c,i,l)}_part(s,...c){return s.ref?s.ref.resolve(...c):s.formula.evaluate(c)}render(s,c,i,l,d={}){if(!this.isDynamic())return this.rendered;const h=[];for(const g of this._template)if(typeof g=="string")h.push(g);else{const w=this._part(g,s,c,i,l,d),S=n.stringify(w,s,c,i,l,d);if(S!==void 0){const m=g.raw||(d.errors&&d.errors.escapeHtml)===!1?S:f(S);h.push(n.wrap(m,g.wrapped&&i.errors.wrap.label))}}return h.join("")}_ref(s,{raw:c,wrapped:i}){const l=[],d=g=>{const w=r.create(g,this._settings);return l.push(w),S=>{const m=w.resolve(...S);return m!==void 0?m:null}};try{const g=this._functions?{...n.functions,...this._functions}:n.functions;var h=new u.Parser(s,{reference:d,functions:g,constants:n.constants})}catch(g){throw g.message=`Invalid template variable "${s}" fails due to: ${g.message}`,g}if(h.single){if(h.single.type==="reference"){const g=l[0];return{ref:g,raw:c,refs:l,wrapped:i||g.type==="local"&&g.key==="label"}}return n.stringify(h.single.value)}return{formula:h,raw:c,refs:l}}toString(){return this.source}},n.Template.prototype[t.symbols.template]=!0,n.Template.prototype.isImmutable=!0,n.encode=function(s){return s.replace(/\\(\{+)/g,(c,i)=>n.opens.slice(0,i.length)).replace(/\\(\}+)/g,(c,i)=>n.closes.slice(0,i.length))},n.decode=function(s){return s.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},n.split=function(s){const c=[];let i="";for(let l=0;l<s.length;++l){const d=s[l];if(d==="{"){let h="";for(;l+1<s.length&&s[l+1]==="{";)h+="{",++l;c.push(i),i=h}else i+=d}return c.push(i),c},n.wrap=function(s,c){return c?c.length===1?`${c}${s}${c}`:`${c[0]}${s}${c[1]}`:s},n.stringify=function(s,c,i,l,d,h={}){const g=typeof s,w=l&&l.errors&&l.errors.wrap||{};let S=!1;if(r.isRef(s)&&s.render&&(S=s.in,s=s.resolve(c,i,l,d,{in:s.in,...h})),s===null)return"null";if(g==="string")return n.wrap(s,h.arrayItems&&w.string);if(g==="number"||g==="function"||g==="symbol")return s.toString();if(g!=="object")return JSON.stringify(s);if(s instanceof Date)return n.Template.date(s,l);if(s instanceof Map){const v=[];for(const[b,C]of s.entries())v.push(`${b.toString()} -> ${C.toString()}`);s=v}if(!Array.isArray(s))return s.toString();const m=[];for(const v of s)m.push(n.stringify(v,c,i,l,d,{arrayItems:!0,...h}));return n.wrap(m.join(", "),!S&&w.array)},n.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},n.functions={if:(s,c,i)=>s?c:i,length:s=>typeof s=="string"?s.length:s&&typeof s=="object"?Array.isArray(s)?s.length:Object.keys(s).length:null,msg(s){const[c,i,l,d,h]=this,g=h.messages;if(!g)return"";const w=a.template(c,g[0],s,i,l)||a.template(c,g[1],s,i,l);return w?w.render(c,i,l,d,h):""},number:s=>typeof s=="number"?s:typeof s=="string"?parseFloat(s):typeof s=="boolean"?s?1:0:s instanceof Date?s.getTime():null}},4946:(j,y,x)=>{const o=x(375),p=x(1687),f=x(8068),u=x(8160),t=x(3292),a=x(6354),r=x(6133),n={};j.exports=f.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:r.toSibling}},args:(s,...c)=>c.length===1&&Array.isArray(c[0])?s.try(...c[0]):s.try(...c),validate(s,c){const{schema:i,error:l,state:d,prefs:h}=c;if(i._flags.match){const w=[],S=[];for(let v=0;v<i.$_terms.matches.length;++v){const b=i.$_terms.matches[v],C=d.nest(b.schema,`match.${v}`);C.snapshot();const P=b.schema.$_validate(s,C,h);P.errors?(S.push(P.errors),C.restore()):(w.push(P.value),C.commit())}if(w.length===0)return{errors:l("alternatives.any",{details:S.map(v=>a.details(v,{override:!1}))})};if(i._flags.match==="one")return w.length===1?{value:w[0]}:{errors:l("alternatives.one")};if(w.length!==i.$_terms.matches.length)return{errors:l("alternatives.all",{details:S.map(v=>a.details(v,{override:!1}))})};const m=v=>v.$_terms.matches.some(b=>b.schema.type==="object"||b.schema.type==="alternatives"&&m(b.schema));return m(i)?{value:w.reduce((v,b)=>p(v,b,{mergeArrays:!1}))}:{value:w[w.length-1]}}const g=[];for(let w=0;w<i.$_terms.matches.length;++w){const S=i.$_terms.matches[w];if(S.schema){const b=d.nest(S.schema,`match.${w}`);b.snapshot();const C=S.schema.$_validate(s,b,h);if(!C.errors)return b.commit(),C;b.restore(),g.push({schema:S.schema,reports:C.errors});continue}const m=S.ref?S.ref.resolve(s,d,h):s,v=S.is?[S]:S.switch;for(let b=0;b<v.length;++b){const C=v[b],{is:P,then:$,otherwise:D}=C,M=`match.${w}${S.switch?"."+b:""}`;if(P.$_match(m,d.nest(P,`${M}.is`),h)){if($)return $.$_validate(s,d.nest($,`${M}.then`),h)}else if(D)return D.$_validate(s,d.nest(D,`${M}.otherwise`),h)}}return n.errors(g,c)},rules:{conditional:{method(s,c){o(!this._flags._endedSwitch,"Unreachable condition"),o(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),o(c.break===void 0,"Cannot use break option with alternatives conditional");const i=this.clone(),l=t.when(i,s,c),d=l.is?[l]:l.switch;for(const h of d)if(h.then&&h.otherwise){i.$_setFlag("_endedSwitch",!0,{clone:!1});break}return i.$_terms.matches.push(l),i.$_mutateRebuild()}},match:{method(s){if(o(["any","one","all"].includes(s),"Invalid alternatives match mode",s),s!=="any")for(const c of this.$_terms.matches)o(c.schema,"Cannot combine match mode",s,"with conditional rules");return this.$_setFlag("match",s)}},try:{method(...s){o(s.length,"Missing alternative schemas"),u.verifyFlat(s,"try"),o(!this._flags._endedSwitch,"Unreachable condition");const c=this.clone();for(const i of s)c.$_terms.matches.push({schema:c.$_compile(i)});return c.$_mutateRebuild()}}},overrides:{label(s){return this.$_parent("label",s).$_modify({each:(c,i)=>i.path[0]!=="is"&&typeof c._flags.label!="string"?c.label(s):void 0,ref:!1})}},rebuild(s){s.$_modify({each:c=>{u.isSchema(c)&&c.type==="array"&&s.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(s,c){if(c.matches)for(const i of c.matches){const{schema:l,ref:d,is:h,not:g,then:w,otherwise:S}=i;s=l?s.try(l):d?s.conditional(d,{is:h,then:w,not:g,otherwise:S,switch:i.switch}):s.conditional(h,{then:w,otherwise:S})}return s}},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}}"}}),n.errors=function(s,{error:c,state:i}){if(!s.length)return{errors:c("alternatives.any")};if(s.length===1)return{errors:s[0].reports};const l=new Set,d=[];for(const{reports:h,schema:g}of s){if(h.length>1)return n.unmatched(s,c);const w=h[0];if(w instanceof a.Report==0)return n.unmatched(s,c);if(w.state.path.length!==i.path.length){d.push({type:g.type,report:w});continue}if(w.code==="any.only"){for(const v of w.local.valids)l.add(v);continue}const[S,m]=w.code.split(".");m!=="base"?d.push({type:g.type,report:w}):w.code==="object.base"?l.add(w.local.type):l.add(S)}return d.length?d.length===1?{errors:d[0].report}:n.unmatched(s,c):{errors:c("alternatives.types",{types:[...l]})}},n.unmatched=function(s,c){const i=[];for(const l of s)i.push(...l.reports);return{errors:c("alternatives.match",a.details(i,{override:!1}))}}},8068:(j,y,x)=>{const o=x(375),p=x(7629),f=x(8160),u=x(6914);j.exports=p.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(t,a){return o(typeof t=="function","Method must be a function"),o(a===void 0||a&&typeof a=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:t,description:a}})},validate(t,a,{method:r}){try{return r(t,a)}catch(n){return a.error("any.custom",{error:n})}},args:["method","description"],multi:!0},messages:{method(t){return this.prefs({messages:t})}},shared:{method(t){o(f.isSchema(t)&&t._flags.id,"Schema must be a schema with an id");const a=this.clone();return a.$_terms.shared=a.$_terms.shared||[],a.$_terms.shared.push(t),a.$_mutateRegister(t),a}},warning:{method(t,a){return o(t&&typeof t=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:t,local:a},warn:!0})},validate:(t,a,{code:r,local:n})=>a.error(r,n),args:["code","local"],multi:!0}},modifiers:{keep(t,a=!0){t.keep=a},message(t,a){t.message=u.compile(a)},warn(t,a=!0){t.warn=a}},manifest:{build(t,a){for(const r in a){const n=a[r];if(["examples","externals","metas","notes","tags"].includes(r))for(const s of n)t=t[r.slice(0,-1)](s);else if(r!=="alterations")if(r!=="whens"){if(r==="shared")for(const s of n)t=t.shared(s)}else for(const s of n){const{ref:c,is:i,not:l,then:d,otherwise:h,concat:g}=s;t=g?t.concat(g):c?t.when(c,{is:i,not:l,then:d,otherwise:h,switch:s.switch,break:s.break}):t.when(i,{then:d,otherwise:h,break:s.break})}else{const s={};for(const{target:c,adjuster:i}of n)s[c]=i;t=t.alter(s)}}return t}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(j,y,x)=>{const o=x(375),p=x(9474),f=x(9621),u=x(8068),t=x(8160),a=x(3292),r={};j.exports=u.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(n,{schema:s,state:c,prefs:i}){if(!Array.isArray(n))return;const l=s.$_getRule("sort");return l?r.sort(s,n,l.args.options,c,i):void 0}},validate(n,{schema:s,error:c}){if(!Array.isArray(n)){if(s._flags.single){const i=[n];return i[t.symbols.arraySingle]=!0,{value:i}}return{errors:c("array.base")}}if(s.$_getRule("items")||s.$_terms.externals)return{value:n.slice()}},rules:{has:{method(n){n=this.$_compile(n,{appendPath:!0});const s=this.$_addRule({name:"has",args:{schema:n}});return s.$_mutateRegister(n),s},validate(n,{state:s,prefs:c,error:i},{schema:l}){const d=[n,...s.ancestors];for(let g=0;g<n.length;++g){const w=s.localize([...s.path,g],d,l);if(l.$_match(n[g],w,c))return n}const h=l._flags.label;return h?i("array.hasKnown",{patternLabel:h}):i("array.hasUnknown",null)},multi:!0},items:{method(...n){t.verifyFlat(n,"items");const s=this.$_addRule("items");for(let c=0;c<n.length;++c){const i=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});s.$_terms.items.push(i)}return s.$_mutateRebuild()},validate(n,{schema:s,error:c,state:i,prefs:l,errorsArray:d}){const h=s.$_terms._requireds.slice(),g=s.$_terms.ordered.slice(),w=[...s.$_terms._inclusions,...h],S=!n[t.symbols.arraySingle];delete n[t.symbols.arraySingle];const m=d();let v=n.length;for(let b=0;b<v;++b){const C=n[b];let P=!1,$=!1;const D=S?b:new Number(b),M=[...i.path,D];if(!s._flags.sparse&&C===void 0){if(m.push(c("array.sparse",{key:D,path:M,pos:b,value:void 0},i.localize(M))),l.abortEarly)return m;g.shift();continue}const U=[n,...i.ancestors];for(const N of s.$_terms._exclusions)if(N.$_match(C,i.localize(M,U,N),l,{presence:"ignore"})){if(m.push(c("array.excludes",{pos:b,value:C},i.localize(M))),l.abortEarly)return m;P=!0,g.shift();break}if(P)continue;if(s.$_terms.ordered.length){if(g.length){const N=g.shift(),W=N.$_validate(C,i.localize(M,U,N),l);if(W.errors){if(m.push(...W.errors),l.abortEarly)return m}else if(N._flags.result==="strip")r.fastSplice(n,b),--b,--v;else{if(!s._flags.sparse&&W.value===void 0){if(m.push(c("array.sparse",{key:D,path:M,pos:b,value:void 0},i.localize(M))),l.abortEarly)return m;continue}n[b]=W.value}continue}if(!s.$_terms.items.length){if(m.push(c("array.orderedLength",{pos:b,limit:s.$_terms.ordered.length})),l.abortEarly)return m;break}}const q=[];let H=h.length;for(let N=0;N<H;++N){const W=i.localize(M,U,h[N]);W.snapshot();const Y=h[N].$_validate(C,W,l);if(q[N]=Y,!Y.errors){if(W.commit(),n[b]=Y.value,$=!0,r.fastSplice(h,N),--N,--H,!s._flags.sparse&&Y.value===void 0&&(m.push(c("array.sparse",{key:D,path:M,pos:b,value:void 0},i.localize(M))),l.abortEarly))return m;break}W.restore()}if($)continue;const I=l.stripUnknown&&!!l.stripUnknown.arrays||!1;H=w.length;for(const N of w){let W;const Y=h.indexOf(N);if(Y!==-1)W=q[Y];else{const de=i.localize(M,U,N);if(de.snapshot(),W=N.$_validate(C,de,l),!W.errors){de.commit(),N._flags.result==="strip"?(r.fastSplice(n,b),--b,--v):s._flags.sparse||W.value!==void 0?n[b]=W.value:(m.push(c("array.sparse",{key:D,path:M,pos:b,value:void 0},i.localize(M))),P=!0),$=!0;break}de.restore()}if(H===1){if(I){r.fastSplice(n,b),--b,--v,$=!0;break}if(m.push(...W.errors),l.abortEarly)return m;P=!0;break}}if(!P&&(s.$_terms._inclusions.length||s.$_terms._requireds.length)&&!$){if(I){r.fastSplice(n,b),--b,--v;continue}if(m.push(c("array.includes",{pos:b,value:C},i.localize(M))),l.abortEarly)return m}}return h.length&&r.fillMissedErrors(s,m,h,n,i,l),g.length&&(r.fillOrderedErrors(s,m,g,n,i,l),m.length||r.fillDefault(g,n,i,l)),m.length?m:n},priority:!0,manifest:!1},length:{method(n){return this.$_addRule({name:"length",args:{limit:n},operator:"="})},validate:(n,s,{limit:c},{name:i,operator:l,args:d})=>t.compare(n.length,c,l)?n:s.error("array."+i,{limit:d.limit,value:n}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(n){return this.$_addRule({name:"max",method:"length",args:{limit:n},operator:"<="})}},min:{method(n){return this.$_addRule({name:"min",method:"length",args:{limit:n},operator:">="})}},ordered:{method(...n){t.verifyFlat(n,"ordered");const s=this.$_addRule("items");for(let c=0;c<n.length;++c){const i=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});r.validateSingle(i,s),s.$_mutateRegister(i),s.$_terms.ordered.push(i)}return s.$_mutateRebuild()}},single:{method(n){const s=n===void 0||!!n;return o(!s||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",s)}},sort:{method(n={}){t.assertOptions(n,["by","order"]);const s={order:n.order||"ascending"};return n.by&&(s.by=a.ref(n.by,{ancestor:0}),o(!s.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:s}})},validate(n,{error:s,state:c,prefs:i,schema:l},{options:d}){const{value:h,errors:g}=r.sort(l,n,d,c,i);if(g)return g;for(let w=0;w<n.length;++w)if(n[w]!==h[w])return s("array.sort",{order:d.order,by:d.by?d.by.key:"value"});return n},convert:!0},sparse:{method(n){const s=n===void 0||!!n;return this._flags.sparse===s?this:(s?this.clone():this.$_addRule("items")).$_setFlag("sparse",s,{clone:!1})}},unique:{method(n,s={}){o(!n||typeof n=="function"||typeof n=="string","comparator must be a function or a string"),t.assertOptions(s,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:s,comparator:n}};if(n)if(typeof n=="string"){const i=t.default(s.separator,".");c.path=i?n.split(i):[n]}else c.comparator=n;return this.$_addRule(c)},validate(n,{state:s,error:c,schema:i},{comparator:l,options:d},{comparator:h,path:g}){const w={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},S=h||p,m=d.ignoreUndefined;for(let v=0;v<n.length;++v){const b=g?f(n[v],g):n[v],C=h?w.custom:w[typeof b];if(o(C,"Failed to find unique map container for type",typeof b),C instanceof Map){const P=C.entries();let $;for(;!($=P.next()).done;)if(S($.value[0],b)){const D=s.localize([...s.path,v],[n,...s.ancestors]),M={pos:v,value:n[v],dupePos:$.value[1],dupeValue:n[$.value[1]]};return g&&(M.path=l),c("array.unique",M,D)}C.set(b,v)}else{if((!m||b!==void 0)&&C[b]!==void 0){const P={pos:v,value:n[v],dupePos:C[b],dupeValue:n[C[b]]};return g&&(P.path=l),c("array.unique",P,s.localize([...s.path,v],[n,...s.ancestors]))}C[b]=v}}return n},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(n,s)=>new Set(n)}},rebuild(n){n.$_terms._inclusions=[],n.$_terms._exclusions=[],n.$_terms._requireds=[];for(const s of n.$_terms.items)r.validateSingle(s,n),s._flags.presence==="required"?n.$_terms._requireds.push(s):s._flags.presence==="forbidden"?n.$_terms._exclusions.push(s):n.$_terms._inclusions.push(s);for(const s of n.$_terms.ordered)r.validateSingle(s,n)},manifest:{build:(n,s)=>(s.items&&(n=n.items(...s.items)),s.ordered&&(n=n.ordered(...s.ordered)),n)},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"}}),r.fillMissedErrors=function(n,s,c,i,l,d){const h=[];let g=0;for(const w of c){const S=w._flags.label;S?h.push(S):++g}h.length?g?s.push(n.$_createError("array.includesRequiredBoth",i,{knownMisses:h,unknownMisses:g},l,d)):s.push(n.$_createError("array.includesRequiredKnowns",i,{knownMisses:h},l,d)):s.push(n.$_createError("array.includesRequiredUnknowns",i,{unknownMisses:g},l,d))},r.fillOrderedErrors=function(n,s,c,i,l,d){const h=[];for(const g of c)g._flags.presence==="required"&&h.push(g);h.length&&r.fillMissedErrors(n,s,h,i,l,d)},r.fillDefault=function(n,s,c,i){const l=[];let d=!0;for(let h=n.length-1;h>=0;--h){const g=n[h],w=[s,...c.ancestors],S=g.$_validate(void 0,c.localize(c.path,w,g),i).value;if(d){if(S===void 0)continue;d=!1}l.unshift(S)}l.length&&s.push(...l)},r.fastSplice=function(n,s){let c=s;for(;c<n.length;)n[c++]=n[c];--n.length},r.validateSingle=function(n,s){(n.type==="array"||n._flags._arrayItems)&&(o(!s._flags.single,"Cannot specify array item with single rule enabled"),s.$_setFlag("_arrayItems",!0,{clone:!1}))},r.sort=function(n,s,c,i,l){const d=c.order==="ascending"?1:-1,h=-1*d,g=d,w=(S,m)=>{let v=r.compare(S,m,h,g);if(v!==null||(c.by&&(S=c.by.resolve(S,i,l),m=c.by.resolve(m,i,l)),v=r.compare(S,m,h,g),v!==null))return v;const b=typeof S;if(b!==typeof m)throw n.$_createError("array.sort.mismatching",s,null,i,l);if(b!=="number"&&b!=="string")throw n.$_createError("array.sort.unsupported",s,{type:b},i,l);return b==="number"?(S-m)*d:S<m?h:g};try{return{value:s.slice().sort(w)}}catch(S){return{errors:S}}},r.compare=function(n,s,c,i){return n===s?0:n===void 0?1:s===void 0?-1:n===null?i:s===null?c:null}},4937:(j,y,x)=>{const o=x(375),p=x(8068),f=x(8160),u=x(2036),t={isBool:function(a){return typeof a=="boolean"}};j.exports=p.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(a,{schema:r}){if(typeof a!="boolean"){if(typeof a=="string"){const n=r._flags.sensitive?a:a.toLowerCase();a=n==="true"||n!=="false"&&a}return typeof a!="boolean"&&(a=r.$_terms.truthy&&r.$_terms.truthy.has(a,null,null,!r._flags.sensitive)||(!r.$_terms.falsy||!r.$_terms.falsy.has(a,null,null,!r._flags.sensitive))&&a),{value:a}}},validate(a,{error:r}){if(typeof a!="boolean")return{value:a,errors:r("boolean.base")}},rules:{truthy:{method(...a){f.verifyFlat(a,"truthy");const r=this.clone();r.$_terms.truthy=r.$_terms.truthy||new u;for(let n=0;n<a.length;++n){const s=a[n];o(s!==void 0,"Cannot call truthy with undefined"),r.$_terms.truthy.add(s)}return r}},falsy:{method(...a){f.verifyFlat(a,"falsy");const r=this.clone();r.$_terms.falsy=r.$_terms.falsy||new u;for(let n=0;n<a.length;++n){const s=a[n];o(s!==void 0,"Cannot call falsy with undefined"),r.$_terms.falsy.add(s)}return r}},sensitive:{method(a=!0){return this.$_setFlag("sensitive",a)}}},cast:{number:{from:t.isBool,to:(a,r)=>a?1:0},string:{from:t.isBool,to:(a,r)=>a?"true":"false"}},manifest:{build:(a,r)=>(r.truthy&&(a=a.truthy(...r.truthy)),r.falsy&&(a=a.falsy(...r.falsy)),a)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(j,y,x)=>{const o=x(375),p=x(8068),f=x(8160),u=x(3328),t={isDate:function(a){return a instanceof Date}};j.exports=p.extend({type:"date",coerce:{from:["number","string"],method:(a,{schema:r})=>({value:t.parse(a,r._flags.format)||a})},validate(a,{schema:r,error:n,prefs:s}){if(a instanceof Date&&!isNaN(a.getTime()))return;const c=r._flags.format;return s.convert&&c&&typeof a=="string"?{value:a,errors:n("date.format",{format:c})}:{value:a,errors:n("date.base")}},rules:{compare:{method:!1,validate(a,r,{date:n},{name:s,operator:c,args:i}){const l=n==="now"?Date.now():n.getTime();return f.compare(a.getTime(),l,c)?a:r.error("date."+s,{limit:i.date,value:a})},args:[{name:"date",ref:!0,normalize:a=>a==="now"?a:t.parse(a),assert:a=>a!==null,message:"must have a valid date format"}]},format:{method(a){return o(["iso","javascript","unix"].includes(a),"Unknown date format",a),this.$_setFlag("format",a)}},greater:{method(a){return this.$_addRule({name:"greater",method:"compare",args:{date:a},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(a){return this.$_addRule({name:"less",method:"compare",args:{date:a},operator:"<"})}},max:{method(a){return this.$_addRule({name:"max",method:"compare",args:{date:a},operator:"<="})}},min:{method(a){return this.$_addRule({name:"min",method:"compare",args:{date:a},operator:">="})}},timestamp:{method(a="javascript"){return o(["javascript","unix"].includes(a),'"type" must be one of "javascript, unix"'),this.format(a)}}},cast:{number:{from:t.isDate,to:(a,r)=>a.getTime()},string:{from:t.isDate,to:(a,{prefs:r})=>u.date(a,r)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),t.parse=function(a,r){if(a instanceof Date)return a;if(typeof a!="string"&&(isNaN(a)||!isFinite(a))||/^\s*$/.test(a))return null;if(r==="iso")return f.isIsoDate(a)?t.date(a.toString()):null;const n=a;if(typeof a=="string"&&/^[+-]?\d+(\.\d+)?$/.test(a)&&(a=parseFloat(a)),r){if(r==="javascript")return t.date(1*a);if(r==="unix")return t.date(1e3*a);if(typeof n=="string")return null}return t.date(a)},t.date=function(a){const r=new Date(a);return isNaN(r.getTime())?null:r}},390:(j,y,x)=>{const o=x(375),p=x(7824);j.exports=p.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(f){return o(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:f}})},validate:(f,u,{n:t})=>f.length===t?f:u.error("function.arity",{n:t})},class:{method(){return this.$_addRule("class")},validate:(f,u)=>/^\s*class\s/.test(f.toString())?f:u.error("function.class",{value:f})},minArity:{method(f){return o(Number.isSafeInteger(f)&&f>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:f}})},validate:(f,u,{n:t})=>f.length>=t?f:u.error("function.minArity",{n:t})},maxArity:{method(f){return o(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:f}})},validate:(f,u,{n:t})=>f.length<=t?f:u.error("function.maxArity",{n:t})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(j,y,x)=>{const o=x(978),p=x(375),f=x(8571),u=x(3652),t=x(8068),a=x(8160),r=x(3292),n=x(6354),s=x(6133),c=x(3328),i={renameDefaults:{alias:!1,multiple:!1,override:!1}};j.exports=t.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:void 0}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(l,d)=>l.keys(d),validate(l,{schema:d,error:h,state:g,prefs:w}){if(!l||typeof l!==d.$_property("typeof")||Array.isArray(l))return{value:l,errors:h("object.base",{type:d.$_property("typeof")})};if(!(d.$_terms.renames||d.$_terms.dependencies||d.$_terms.keys||d.$_terms.patterns||d.$_terms.externals))return;l=i.clone(l,w);const S=[];if(d.$_terms.renames&&!i.rename(d,l,g,w,S))return{value:l,errors:S};if(!d.$_terms.keys&&!d.$_terms.patterns&&!d.$_terms.dependencies)return{value:l,errors:S};const m=new Set(Object.keys(l));if(d.$_terms.keys){const v=[l,...g.ancestors];for(const b of d.$_terms.keys){const C=b.key,P=l[C];m.delete(C);const $=g.localize([...g.path,C],v,b),D=b.schema.$_validate(P,$,w);if(D.errors){if(w.abortEarly)return{value:l,errors:D.errors};D.value!==void 0&&(l[C]=D.value),S.push(...D.errors)}else b.schema._flags.result==="strip"||D.value===void 0&&P!==void 0?delete l[C]:D.value!==void 0&&(l[C]=D.value)}}if(m.size||d._flags._hasPatternMatch){const v=i.unknown(d,l,m,S,g,w);if(v)return v}if(d.$_terms.dependencies)for(const v of d.$_terms.dependencies){if(v.key!==null&&i.isPresent(v.options)(v.key.resolve(l,g,w,null,{shadow:!1}))===!1)continue;const b=i.dependencies[v.rel](d,v,l,g,w);if(b){const C=d.$_createError(b.code,l,b.context,g,w);if(w.abortEarly)return{value:l,errors:C};S.push(C)}}return{value:l,errors:S}},rules:{and:{method(...l){return a.verifyFlat(l,"and"),i.dependency(this,"and",null,l)}},append:{method(l){return l==null||Object.keys(l).length===0?this:this.keys(l)}},assert:{method(l,d,h){c.isTemplate(l)||(l=r.ref(l)),p(h===void 0||typeof h=="string","Message must be a string"),d=this.$_compile(d,{appendPath:!0});const g=this.$_addRule({name:"assert",args:{subject:l,schema:d,message:h}});return g.$_mutateRegister(l),g.$_mutateRegister(d),g},validate(l,{error:d,prefs:h,state:g},{subject:w,schema:S,message:m}){const v=w.resolve(l,g,h),b=s.isRef(w)?w.absolute(g):[];return S.$_match(v,g.localize(b,[l,...g.ancestors],S),h)?l:d("object.assert",{subject:w,message:m})},args:["subject","schema","message"],multi:!0},instance:{method(l,d){return p(typeof l=="function","constructor must be a function"),d=d||l.name,this.$_addRule({name:"instance",args:{constructor:l,name:d}})},validate:(l,d,{constructor:h,name:g})=>l instanceof h?l:d.error("object.instance",{type:g,value:l}),args:["constructor","name"]},keys:{method(l){p(l===void 0||typeof l=="object","Object schema must be a valid object"),p(!a.isSchema(l),"Object schema cannot be a joi schema");const d=this.clone();if(l)if(Object.keys(l).length){d.$_terms.keys=d.$_terms.keys?d.$_terms.keys.filter(h=>!l.hasOwnProperty(h.key)):new i.Keys;for(const h in l)a.tryWithPath(()=>d.$_terms.keys.push({key:h,schema:this.$_compile(l[h])}),h)}else d.$_terms.keys=new i.Keys;else d.$_terms.keys=null;return d.$_mutateRebuild()}},length:{method(l){return this.$_addRule({name:"length",args:{limit:l},operator:"="})},validate:(l,d,{limit:h},{name:g,operator:w,args:S})=>a.compare(Object.keys(l).length,h,w)?l:d.error("object."+g,{limit:S.limit,value:l}),args:[{name:"limit",ref:!0,assert:a.limit,message:"must be a positive integer"}]},max:{method(l){return this.$_addRule({name:"max",method:"length",args:{limit:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"length",args:{limit:l},operator:">="})}},nand:{method(...l){return a.verifyFlat(l,"nand"),i.dependency(this,"nand",null,l)}},or:{method(...l){return a.verifyFlat(l,"or"),i.dependency(this,"or",null,l)}},oxor:{method(...l){return i.dependency(this,"oxor",null,l)}},pattern:{method(l,d,h={}){const g=l instanceof RegExp;g||(l=this.$_compile(l,{appendPath:!0})),p(d!==void 0,"Invalid rule"),a.assertOptions(h,["fallthrough","matches"]),g&&p(!l.flags.includes("g")&&!l.flags.includes("y"),"pattern should not use global or sticky mode"),d=this.$_compile(d,{appendPath:!0});const w=this.clone();w.$_terms.patterns=w.$_terms.patterns||[];const S={[g?"regex":"schema"]:l,rule:d};return h.matches&&(S.matches=this.$_compile(h.matches),S.matches.type!=="array"&&(S.matches=S.matches.$_root.array().items(S.matches)),w.$_mutateRegister(S.matches),w.$_setFlag("_hasPatternMatch",!0,{clone:!1})),h.fallthrough&&(S.fallthrough=!0),w.$_terms.patterns.push(S),w.$_mutateRegister(d),w}},ref:{method(){return this.$_addRule("ref")},validate:(l,d)=>s.isRef(l)?l:d.error("object.refType",{value:l})},regex:{method(){return this.$_addRule("regex")},validate:(l,d)=>l instanceof RegExp?l:d.error("object.regex",{value:l})},rename:{method(l,d,h={}){p(typeof l=="string"||l instanceof RegExp,"Rename missing the from argument"),p(typeof d=="string"||d instanceof c,"Invalid rename to argument"),p(d!==l,"Cannot rename key to same name:",l),a.assertOptions(h,["alias","ignoreUndefined","override","multiple"]);const g=this.clone();g.$_terms.renames=g.$_terms.renames||[];for(const w of g.$_terms.renames)p(w.from!==l,"Cannot rename the same key multiple times");return d instanceof c&&g.$_mutateRegister(d),g.$_terms.renames.push({from:l,to:d,options:o(i.renameDefaults,h)}),g}},schema:{method(l="any"){return this.$_addRule({name:"schema",args:{type:l}})},validate:(l,d,{type:h})=>!a.isSchema(l)||h!=="any"&&l.type!==h?d.error("object.schema",{type:h}):l},unknown:{method(l){return this.$_setFlag("unknown",l!==!1)}},with:{method(l,d,h={}){return i.dependency(this,"with",l,d,h)}},without:{method(l,d,h={}){return i.dependency(this,"without",l,d,h)}},xor:{method(...l){return a.verifyFlat(l,"xor"),i.dependency(this,"xor",null,l)}}},overrides:{default(l,d){return l===void 0&&(l=a.symbols.deepDefault),this.$_parent("default",l,d)}},rebuild(l){if(l.$_terms.keys){const d=new u.Sorter;for(const h of l.$_terms.keys)a.tryWithPath(()=>d.add(h,{after:h.schema.$_rootReferences(),group:h.key}),h.key);l.$_terms.keys=new i.Keys(...d.nodes)}},manifest:{build(l,d){if(d.keys&&(l=l.keys(d.keys)),d.dependencies)for(const{rel:h,key:g=null,peers:w,options:S}of d.dependencies)l=i.dependency(l,h,g,w,S);if(d.patterns)for(const{regex:h,schema:g,rule:w,fallthrough:S,matches:m}of d.patterns)l=l.pattern(h||g,w,{fallthrough:S,matches:m});if(d.renames)for(const{from:h,to:g,options:w}of d.renames)l=l.rename(h,g,w);return l}},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}}"}}),i.clone=function(l,d){if(typeof l=="object"){if(d.nonEnumerables)return f(l,{shallow:!0});const g=Object.create(Object.getPrototypeOf(l));return Object.assign(g,l),g}const h=function(...g){return l.apply(this,g)};return h.prototype=f(l.prototype),Object.defineProperty(h,"name",{value:l.name,writable:!1}),Object.defineProperty(h,"length",{value:l.length,writable:!1}),Object.assign(h,l),h},i.dependency=function(l,d,h,g,w){p(h===null||typeof h=="string",d,"key must be a strings"),w||(w=g.length>1&&typeof g[g.length-1]=="object"?g.pop():{}),a.assertOptions(w,["separator","isPresent"]),g=[].concat(g);const S=a.default(w.separator,"."),m=[];for(const b of g)p(typeof b=="string",d,"peers must be strings"),m.push(r.ref(b,{separator:S,ancestor:0,prefix:!1}));h!==null&&(h=r.ref(h,{separator:S,ancestor:0,prefix:!1}));const v=l.clone();return v.$_terms.dependencies=v.$_terms.dependencies||[],v.$_terms.dependencies.push(new i.Dependency(d,h,m,g,w)),v},i.dependencies={and(l,d,h,g,w){const S=[],m=[],v=d.peers.length,b=i.isPresent(d.options);for(const C of d.peers)b(C.resolve(h,g,w,null,{shadow:!1}))===!1?S.push(C.key):m.push(C.key);if(S.length!==v&&m.length!==v)return{code:"object.and",context:{present:m,presentWithLabels:i.keysToLabels(l,m),missing:S,missingWithLabels:i.keysToLabels(l,S)}}},nand(l,d,h,g,w){const S=[],m=i.isPresent(d.options);for(const C of d.peers)m(C.resolve(h,g,w,null,{shadow:!1}))&&S.push(C.key);if(S.length!==d.peers.length)return;const v=d.paths[0],b=d.paths.slice(1);return{code:"object.nand",context:{main:v,mainWithLabel:i.keysToLabels(l,v),peers:b,peersWithLabels:i.keysToLabels(l,b)}}},or(l,d,h,g,w){const S=i.isPresent(d.options);for(const m of d.peers)if(S(m.resolve(h,g,w,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)}}},oxor(l,d,h,g,w){const S=[],m=i.isPresent(d.options);for(const b of d.peers)m(b.resolve(h,g,w,null,{shadow:!1}))&&S.push(b.key);if(!S.length||S.length===1)return;const v={peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)};return v.present=S,v.presentWithLabels=i.keysToLabels(l,S),{code:"object.oxor",context:v}},with(l,d,h,g,w){const S=i.isPresent(d.options);for(const m of d.peers)if(S(m.resolve(h,g,w,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:d.key.key,mainWithLabel:i.keysToLabels(l,d.key.key),peer:m.key,peerWithLabel:i.keysToLabels(l,m.key)}}},without(l,d,h,g,w){const S=i.isPresent(d.options);for(const m of d.peers)if(S(m.resolve(h,g,w,null,{shadow:!1})))return{code:"object.without",context:{main:d.key.key,mainWithLabel:i.keysToLabels(l,d.key.key),peer:m.key,peerWithLabel:i.keysToLabels(l,m.key)}}},xor(l,d,h,g,w){const S=[],m=i.isPresent(d.options);for(const b of d.peers)m(b.resolve(h,g,w,null,{shadow:!1}))&&S.push(b.key);if(S.length===1)return;const v={peers:d.paths,peersWithLabels:i.keysToLabels(l,d.paths)};return S.length===0?{code:"object.missing",context:v}:(v.present=S,v.presentWithLabels=i.keysToLabels(l,S),{code:"object.xor",context:v})}},i.keysToLabels=function(l,d){return Array.isArray(d)?d.map(h=>l.$_mapLabels(h)):l.$_mapLabels(d)},i.isPresent=function(l){return typeof l.isPresent=="function"?l.isPresent:d=>d!==void 0},i.rename=function(l,d,h,g,w){const S={};for(const m of l.$_terms.renames){const v=[],b=typeof m.from!="string";if(b)for(const C in d){if(d[C]===void 0&&m.options.ignoreUndefined||C===m.to)continue;const P=m.from.exec(C);P&&v.push({from:C,to:m.to,match:P})}else!Object.prototype.hasOwnProperty.call(d,m.from)||d[m.from]===void 0&&m.options.ignoreUndefined||v.push(m);for(const C of v){const P=C.from;let $=C.to;if($ instanceof c&&($=$.render(d,h,g,C.match)),P!==$){if(!m.options.multiple&&S[$]&&(w.push(l.$_createError("object.rename.multiple",d,{from:P,to:$,pattern:b},h,g)),g.abortEarly)||Object.prototype.hasOwnProperty.call(d,$)&&!m.options.override&&!S[$]&&(w.push(l.$_createError("object.rename.override",d,{from:P,to:$,pattern:b},h,g)),g.abortEarly))return!1;d[P]===void 0?delete d[$]:d[$]=d[P],S[$]=!0,m.options.alias||delete d[P]}}}return!0},i.unknown=function(l,d,h,g,w,S){if(l.$_terms.patterns){let m=!1;const v=l.$_terms.patterns.map(C=>{if(C.matches)return m=!0,[]}),b=[d,...w.ancestors];for(const C of h){const P=d[C],$=[...w.path,C];for(let D=0;D<l.$_terms.patterns.length;++D){const M=l.$_terms.patterns[D];if(M.regex){const H=M.regex.test(C);if(w.mainstay.tracer.debug(w,"rule",`pattern.${D}`,H?"pass":"error"),!H)continue}else if(!M.schema.$_match(C,w.nest(M.schema,`pattern.${D}`),S))continue;h.delete(C);const U=w.localize($,b,{schema:M.rule,key:C}),q=M.rule.$_validate(P,U,S);if(q.errors){if(S.abortEarly)return{value:d,errors:q.errors};g.push(...q.errors)}if(M.matches&&v[D].push(C),d[C]=q.value,!M.fallthrough)break}}if(m)for(let C=0;C<v.length;++C){const P=v[C];if(!P)continue;const $=l.$_terms.patterns[C].matches,D=w.localize(w.path,b,$),M=$.$_validate(P,D,S);if(M.errors){const U=n.details(M.errors,{override:!1});U.matches=P;const q=l.$_createError("object.pattern.match",d,U,w,S);if(S.abortEarly)return{value:d,errors:q};g.push(q)}}}if(h.size&&(l.$_terms.keys||l.$_terms.patterns)){if(S.stripUnknown&&l._flags.unknown===void 0||S.skipFunctions){const m=!(!S.stripUnknown||S.stripUnknown!==!0&&!S.stripUnknown.objects);for(const v of h)m?(delete d[v],h.delete(v)):typeof d[v]=="function"&&h.delete(v)}if(!a.default(l._flags.unknown,S.allowUnknown))for(const m of h){const v=w.localize([...w.path,m],[]),b=l.$_createError("object.unknown",d[m],{child:m},v,S,{flags:!1});if(S.abortEarly)return{value:d,errors:b};g.push(b)}}},i.Dependency=class{constructor(l,d,h,g,w){this.rel=l,this.key=d,this.peers=h,this.paths=g,this.options=w}describe(){const l={rel:this.rel,peers:this.paths};return this.key!==null&&(l.key=this.key.key),this.peers[0].separator!=="."&&(l.options={...l.options,separator:this.peers[0].separator}),this.options.isPresent&&(l.options={...l.options,isPresent:this.options.isPresent}),l}},i.Keys=class extends Array{concat(l){const d=this.slice(),h=new Map;for(let g=0;g<d.length;++g)h.set(d[g].key,g);for(const g of l){const w=g.key,S=h.get(w);S!==void 0?d[S]={key:w,schema:d[S].schema.concat(g.schema)}:d.push(g)}return d}}},8785:(j,y,x)=>{const o=x(375),p=x(8068),f=x(8160),u=x(3292),t=x(6354),a={};j.exports=p.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(r,n)=>r.ref(n),validate(r,{schema:n,state:s,prefs:c}){o(n.$_terms.link,"Uninitialized link schema");const i=a.generate(n,r,s,c),l=n.$_terms.link[0].ref;return i.$_validate(r,s.nest(i,`link:${l.display}:${i.type}`),c)},generate:(r,n,s,c)=>a.generate(r,n,s,c),rules:{ref:{method(r){o(!this.$_terms.link,"Cannot reinitialize schema"),r=u.ref(r),o(r.type==="value"||r.type==="local","Invalid reference type:",r.type),o(r.type==="local"||r.ancestor==="root"||r.ancestor>0,"Link cannot reference itself");const n=this.clone();return n.$_terms.link=[{ref:r}],n}},relative:{method(r=!0){return this.$_setFlag("relative",r)}}},overrides:{concat(r){o(this.$_terms.link,"Uninitialized link schema"),o(f.isSchema(r),"Invalid schema object"),o(r.type!=="link","Cannot merge type link with another link");const n=this.clone();return n.$_terms.whens||(n.$_terms.whens=[]),n.$_terms.whens.push({concat:r}),n.$_mutateRebuild()}},manifest:{build:(r,n)=>(o(n.link,"Invalid link description missing link"),r.ref(n.link))}}),a.generate=function(r,n,s,c){let i=s.mainstay.links.get(r);if(i)return i._generate(n,s,c).schema;const l=r.$_terms.link[0].ref,{perspective:d,path:h}=a.perspective(l,s);a.assert(d,"which is outside of schema boundaries",l,r,s,c);try{i=h.length?d.$_reach(h):d}catch{a.assert(!1,"to non-existing schema",l,r,s,c)}return a.assert(i.type!=="link","which is another link",l,r,s,c),r._flags.relative||s.mainstay.links.set(r,i),i._generate(n,s,c).schema},a.perspective=function(r,n){if(r.type==="local"){for(const{schema:s,key:c}of n.schemas){if((s._flags.id||c)===r.path[0])return{perspective:s,path:r.path.slice(1)};if(s.$_terms.shared){for(const i of s.$_terms.shared)if(i._flags.id===r.path[0])return{perspective:i,path:r.path.slice(1)}}}return{perspective:null,path:null}}return r.ancestor==="root"?{perspective:n.schemas[n.schemas.length-1].schema,path:r.path}:{perspective:n.schemas[r.ancestor]&&n.schemas[r.ancestor].schema,path:r.path}},a.assert=function(r,n,s,c,i,l){r||o(!1,`"${t.label(c._flags,i,l)}" contains link reference "${s.display}" ${n}`)}},3832:(j,y,x)=>{const o=x(375),p=x(8068),f=x(8160),u={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(t){const a=t.toString(),r=a.indexOf("."),n=a.indexOf("e");return(r<0?0:(n<0?a.length:n)-r-1)+(n<0?0:Math.max(0,-parseInt(a.slice(n+1))))}};j.exports=p.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:a,error:r}){if(!t.match(u.numberRx))return;t=t.trim();const n={value:parseFloat(t)};if(n.value===0&&(n.value=0),!a._flags.unsafe)if(t.match(/e/i)){if(u.extractSignificantDigits(t)!==u.extractSignificantDigits(String(n.value)))return n.errors=r("number.unsafe"),n}else{const s=n.value.toString();if(s.match(/e/i))return n;if(s!==u.normalizeDecimal(t))return n.errors=r("number.unsafe"),n}return n}},validate(t,{schema:a,error:r,prefs:n}){if(t===1/0||t===-1/0)return{value:t,errors:r("number.infinity")};if(!f.isNumber(t))return{value:t,errors:r("number.base")};const s={value:t};if(n.convert){const c=a.$_getRule("precision");if(c){const i=Math.pow(10,c.args.limit);s.value=Math.round(s.value*i)/i}}return s.value===0&&(s.value=0),!a._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(s.errors=r("number.unsafe")),s},rules:{compare:{method:!1,validate:(t,a,{limit:r},{name:n,operator:s,args:c})=>f.compare(t,r,s)?t:a.error("number."+n,{limit:c.limit,value:t}),args:[{name:"limit",ref:!0,assert:f.isNumber,message:"must be a number"}]},greater:{method(t){return this.$_addRule({name:"greater",method:"compare",args:{limit:t},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(t,a)=>Math.trunc(t)-t==0?t:a.error("number.integer")},less:{method(t){return this.$_addRule({name:"less",method:"compare",args:{limit:t},operator:"<"})}},max:{method(t){return this.$_addRule({name:"max",method:"compare",args:{limit:t},operator:"<="})}},min:{method(t){return this.$_addRule({name:"min",method:"compare",args:{limit:t},operator:">="})}},multiple:{method(t){const a=typeof t=="number"?u.decimalPlaces(t):null,r=Math.pow(10,a);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:a,pfactor:r}})},validate:(t,a,{base:r,baseDecimalPlace:n,pfactor:s},c)=>u.decimalPlaces(t)>n?a.error("number.multiple",{multiple:c.args.base,value:t}):Math.round(s*t)%Math.round(s*r)==0?t:a.error("number.multiple",{multiple:c.args.base,value:t}),args:[{name:"base",ref:!0,assert:t=>typeof t=="number"&&isFinite(t)&&t>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(t,a)=>Number.isSafeInteger(t)&&t>=0&&t<=65535?t:a.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(t){return o(Number.isSafeInteger(t),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:t}})},validate(t,a,{limit:r}){const n=t.toString().match(u.precisionRx);return Math.max((n[1]?n[1].length:0)-(n[2]?parseInt(n[2],10):0),0)<=r?t:a.error("number.precision",{limit:r,value:t})},convert:!0},sign:{method(t){return o(["negative","positive"].includes(t),"Invalid sign",t),this.$_addRule({name:"sign",args:{sign:t}})},validate:(t,a,{sign:r})=>r==="negative"&&t<0||r==="positive"&&t>0?t:a.error(`number.${r}`)},unsafe:{method(t=!0){return o(typeof t=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",t)}}},cast:{string:{from:t=>typeof t=="number",to:(t,a)=>t.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),u.extractSignificantDigits=function(t){return t.replace(u.exponentialPartRegex,"").replace(u.dotRegex,"").replace(u.trailingZerosRegex,"").replace(u.leadingSignAndZerosRegex,"")},u.normalizeDecimal=function(t){return(t=t.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&t.endsWith("0")&&(t=t.replace(/0+$/,"")),t==="-0"?"0":t}},8966:(j,y,x)=>{const o=x(7824);j.exports=o.extend({type:"object",cast:{map:{from:p=>p&&typeof p=="object",to:(p,f)=>new Map(Object.entries(p))}}})},7417:(j,y,x)=>{const o=x(375),p=x(5380),f=x(1745),u=x(9959),t=x(6064),a=x(9926),r=x(5752),n=x(8068),s=x(8160),c={tlds:a instanceof Set&&{tlds:{allow:a,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:u.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=n.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(i,{schema:l,state:d,prefs:h}){const g=l.$_getRule("normalize");g&&(i=i.normalize(g.args.form));const w=l.$_getRule("case");w&&(i=w.args.direction==="upper"?i.toLocaleUpperCase():i.toLocaleLowerCase());const S=l.$_getRule("trim");if(S&&S.args.enabled&&(i=i.trim()),l.$_terms.replacements)for(const v of l.$_terms.replacements)i=i.replace(v.pattern,v.replacement);const m=l.$_getRule("hex");if(m&&m.args.options.byteAligned&&i.length%2!=0&&(i=`0${i}`),l.$_getRule("isoDate")){const v=c.isoDate(i);v&&(i=v)}if(l._flags.truncate){const v=l.$_getRule("max");if(v){let b=v.args.limit;if(s.isResolvable(b)&&(b=b.resolve(i,d,h),!s.limit(b)))return{value:i,errors:l.$_createError("any.ref",b,{ref:v.args.limit,arg:"limit",reason:"must be a positive integer"},d,h)};i=i.slice(0,b)}}return{value:i}}},validate(i,{schema:l,error:d}){if(typeof i!="string")return{value:i,errors:d("string.base")};if(i===""){const h=l.$_getRule("min");return h&&h.args.limit===0?void 0:{value:i,errors:d("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(i,l)=>/^[a-zA-Z0-9]+$/.test(i)?i:l.error("string.alphanum")},base64:{method(i={}){return s.assertOptions(i,["paddingRequired","urlSafe"]),i={urlSafe:!1,paddingRequired:!0,...i},o(typeof i.paddingRequired=="boolean","paddingRequired must be boolean"),o(typeof i.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:i}})},validate:(i,l,{options:d})=>c.base64Regex[d.paddingRequired][d.urlSafe].test(i)?i:l.error("string.base64")},case:{method(i){return o(["lower","upper"].includes(i),"Invalid case:",i),this.$_addRule({name:"case",args:{direction:i}})},validate:(i,l,{direction:d})=>d==="lower"&&i===i.toLocaleLowerCase()||d==="upper"&&i===i.toLocaleUpperCase()?i:l.error(`string.${d}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(i,l){let d=i.length,h=0,g=1;for(;d--;){const w=i.charAt(d)*g;h+=w-9*(w>9),g^=3}return h>0&&h%10==0?i:l.error("string.creditCard")}},dataUri:{method(i={}){return s.assertOptions(i,["paddingRequired"]),i={paddingRequired:!0,...i},o(typeof i.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:i}})},validate(i,l,{options:d}){const h=i.match(c.dataUriRegex);return h&&(!h[2]||h[2]!=="base64"||c.base64Regex[d.paddingRequired].false.test(h[3]))?i:l.error("string.dataUri")}},domain:{method(i){i&&s.assertOptions(i,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const l=c.addressOptions(i);return this.$_addRule({name:"domain",args:{options:i},address:l})},validate:(i,l,d,{address:h})=>p.isValid(i,h)?i:l.error("string.domain")},email:{method(i={}){s.assertOptions(i,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),o(i.multiple===void 0||typeof i.multiple=="boolean","multiple option must be an boolean");const l=c.addressOptions(i),d=new RegExp(`\\s*[${i.separator?t(i.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:i},regex:d,address:l})},validate(i,l,{options:d},{regex:h,address:g}){const w=d.multiple?i.split(h):[i],S=[];for(const m of w)f.isValid(m,g)||S.push(m);return S.length?l.error("string.email",{value:i,invalids:S}):i}},guid:{alias:"uuid",method(i={}){s.assertOptions(i,["version","separator"]);let l="";if(i.version){const g=[].concat(i.version);o(g.length>=1,"version must have at least 1 valid version specified");const w=new Set;for(let S=0;S<g.length;++S){const m=g[S];o(typeof m=="string","version at position "+S+" must be a string");const v=c.guidVersions[m.toLowerCase()];o(v,"version at position "+S+" must be one of "+Object.keys(c.guidVersions).join(", ")),o(!w.has(v),"version at position "+S+" must not be a duplicate"),l+=v,w.add(v)}}o(c.guidSeparators.has(i.separator),'separator must be one of true, false, "-", or ":"');const d=i.separator===void 0?"[:-]?":i.separator===!0?"[:-]":i.separator===!1?"[]?":`\\${i.separator}`,h=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${d})[0-9A-F]{4}\\2?[${l||"0-9A-F"}][0-9A-F]{3}\\2?[${l?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:i},regex:h})},validate(i,l,d,{regex:h}){const g=h.exec(i);return g?c.guidBrackets[g[1]]!==g[g.length-1]?l.error("string.guid"):i:l.error("string.guid")}},hex:{method(i={}){return s.assertOptions(i,["byteAligned","prefix"]),i={byteAligned:!1,prefix:!1,...i},o(typeof i.byteAligned=="boolean","byteAligned must be boolean"),o(typeof i.prefix=="boolean"||i.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:i}})},validate:(i,l,{options:d})=>(d.prefix==="optional"?c.hexRegex.withOptionalPrefix:d.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(i)?d.byteAligned&&i.length%2!=0?l.error("string.hexAlign"):i:l.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(i,l)=>p.isValid(i,{minDomainSegments:1})||c.ipRegex.test(i)?i:l.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(i={}){s.assertOptions(i,["cidr","version"]);const{cidr:l,versions:d,regex:h}=u.regex(i),g=i.version?d:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:l,version:g}},regex:h})},validate:(i,l,{options:d},{regex:h})=>h.test(i)?i:d.version?l.error("string.ipVersion",{value:i,cidr:d.cidr,version:d.version}):l.error("string.ip",{value:i,cidr:d.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(i,{error:l})=>c.isoDate(i)?i:l("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(i,l)=>c.isoDurationRegex.test(i)?i:l.error("string.isoDuration")},length:{method(i,l){return c.length(this,"length",i,"=",l)},validate(i,l,{limit:d,encoding:h},{name:g,operator:w,args:S}){const m=!h&&i.length;return s.compare(m,d,w)?i:l.error("string."+g,{limit:S.limit,value:i,encoding:h})},args:[{name:"limit",ref:!0,assert:s.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(i,l){return c.length(this,"max",i,"<=",l)},args:["limit","encoding"]},min:{method(i,l){return c.length(this,"min",i,">=",l)},args:["limit","encoding"]},normalize:{method(i="NFC"){return o(c.normalizationForms.includes(i),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:i}})},validate:(i,{error:l},{form:d})=>i===i.normalize(d)?i:l("string.normalize",{value:i,form:d}),convert:!0},pattern:{alias:"regex",method(i,l={}){o(i instanceof RegExp,"regex must be a RegExp"),o(!i.flags.includes("g")&&!i.flags.includes("y"),"regex should not use global or sticky mode"),typeof l=="string"&&(l={name:l}),s.assertOptions(l,["invert","name"]);const d=["string.pattern",l.invert?".invert":"",l.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:i,options:l},errorCode:d})},validate:(i,l,{regex:d,options:h},{errorCode:g})=>d.test(i)^h.invert?i:l.error(g,{name:h.name,regex:d,value:i}),args:["regex","options"],multi:!0},replace:{method(i,l){typeof i=="string"&&(i=new RegExp(t(i),"g")),o(i instanceof RegExp,"pattern must be a RegExp"),o(typeof l=="string","replacement must be a String");const d=this.clone();return d.$_terms.replacements||(d.$_terms.replacements=[]),d.$_terms.replacements.push({pattern:i,replacement:l}),d}},token:{method(){return this.$_addRule("token")},validate:(i,l)=>/^\w+$/.test(i)?i:l.error("string.token")},trim:{method(i=!0){return o(typeof i=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:i}})},validate:(i,l,{enabled:d})=>d&&i!==i.trim()?l.error("string.trim"):i,convert:!0},truncate:{method(i=!0){return o(typeof i=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",i)}},uppercase:{method(){return this.case("upper")}},uri:{method(i={}){s.assertOptions(i,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),i.domain&&s.assertOptions(i.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:l,scheme:d}=r.regex(i),h=i.domain?c.addressOptions(i.domain):null;return this.$_addRule({name:"uri",args:{options:i},regex:l,domain:h,scheme:d})},validate(i,l,{options:d},{regex:h,domain:g,scheme:w}){if(["http:/","https:/"].includes(i))return l.error("string.uri");let S=h.exec(i);if(!S&&l.prefs.convert&&d.encodeUri){const m=encodeURI(i);S=h.exec(m),S&&(i=m)}if(S){const m=S[1]||S[2];return!g||d.allowRelative&&!m||p.isValid(m,g)?i:l.error("string.domain",{value:m})}return d.relativeOnly?l.error("string.uriRelativeOnly"):d.scheme?l.error("string.uriCustomScheme",{scheme:w,value:i}):l.error("string.uri")}}},manifest:{build(i,l){if(l.replacements)for(const{pattern:d,replacement:h}of l.replacements)i=i.replace(d,h);return i}},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"}}),c.addressOptions=function(i){if(!i)return c.tlds||i;if(o(i.minDomainSegments===void 0||Number.isSafeInteger(i.minDomainSegments)&&i.minDomainSegments>0,"minDomainSegments must be a positive integer"),o(i.maxDomainSegments===void 0||Number.isSafeInteger(i.maxDomainSegments)&&i.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),i.tlds===!1)return i;if(i.tlds===!0||i.tlds===void 0)return o(c.tlds,"Built-in TLD list disabled"),Object.assign({},i,c.tlds);o(typeof i.tlds=="object","tlds must be true, false, or an object");const l=i.tlds.deny;if(l)return Array.isArray(l)&&(i=Object.assign({},i,{tlds:{deny:new Set(l)}})),o(i.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),o(!i.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(i.tlds.deny,"tlds.deny"),i;const d=i.tlds.allow;return d?d===!0?(o(c.tlds,"Built-in TLD list disabled"),Object.assign({},i,c.tlds)):(Array.isArray(d)&&(i=Object.assign({},i,{tlds:{allow:new Set(d)}})),o(i.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(i.tlds.allow,"tlds.allow"),i):i},c.validateTlds=function(i,l){for(const d of i)o(p.isValid(d,{minDomainSegments:1,maxDomainSegments:1}),`${l} must contain valid top level domain names`)},c.isoDate=function(i){if(!s.isIsoDate(i))return null;/.*T.*[+-]\d\d$/.test(i)&&(i+="00");const l=new Date(i);return isNaN(l.getTime())?null:l.toISOString()},c.length=function(i,l,d,h,g){return o(!g||!1,"Invalid encoding:",g),i.$_addRule({name:l,method:"length",args:{limit:d,encoding:g},operator:h})}},8826:(j,y,x)=>{const o=x(375),p=x(8068),f={};f.Map=class extends Map{slice(){return new f.Map(this)}},j.exports=p.extend({type:"symbol",terms:{map:{init:new f.Map}},coerce:{method(u,{schema:t,error:a}){const r=t.$_terms.map.get(u);return r&&(u=r),t._flags.only&&typeof u!="symbol"?{value:u,errors:a("symbol.map",{map:t.$_terms.map})}:{value:u}}},validate(u,{error:t}){if(typeof u!="symbol")return{value:u,errors:t("symbol.base")}},rules:{map:{method(u){u&&!u[Symbol.iterator]&&typeof u=="object"&&(u=Object.entries(u)),o(u&&u[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),a=[];for(const r of u){o(r&&r[Symbol.iterator],"Entry must be an iterable");const[n,s]=r;o(typeof n!="object"&&typeof n!="function"&&typeof n!="symbol","Key must not be of type object, function, or Symbol"),o(typeof s=="symbol","Value must be a Symbol"),t.$_terms.map.set(n,s),a.push(s)}return t.valid(...a)}}},manifest:{build:(u,t)=>(t.map&&(u=u.map(t.map)),u)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(j,y,x)=>{const o=x(375),p=x(8571),f=x(738),u=x(9621),t=x(8160),a=x(6354),r=x(493),n={result:Symbol("result")};y.entry=function(s,c,i){let l=t.defaults;i&&(o(i.warnings===void 0,"Cannot override warnings preference in synchronous validation"),o(i.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),l=t.preferences(t.defaults,i));const d=n.entry(s,c,l);o(!d.mainstay.externals.length,"Schema with external rules must use validateAsync()");const h={value:d.value};return d.error&&(h.error=d.error),d.mainstay.warnings.length&&(h.warning=a.details(d.mainstay.warnings)),d.mainstay.debug&&(h.debug=d.mainstay.debug),d.mainstay.artifacts&&(h.artifacts=d.mainstay.artifacts),h},y.entryAsync=async function(s,c,i){let l=t.defaults;i&&(l=t.preferences(t.defaults,i));const d=n.entry(s,c,l),h=d.mainstay;if(d.error)throw h.debug&&(d.error.debug=h.debug),d.error;if(h.externals.length){let w=d.value;const S=[];for(const m of h.externals){const v=m.state.path,b=m.schema.type==="link"?h.links.get(m.schema):null;let C,P,$=w;const D=v.length?[w]:[],M=v.length?u(s,v):s;if(v.length){C=v[v.length-1];let U=w;for(const q of v.slice(0,-1))U=U[q],D.unshift(U);P=D[0],$=P[C]}try{const U=(H,I)=>(b||m.schema).$_createError(H,$,I,m.state,l),q=await m.method($,{schema:m.schema,linked:b,state:m.state,prefs:i,original:M,error:U,errorsArray:n.errorsArray,warn:(H,I)=>h.warnings.push((b||m.schema).$_createError(H,$,I,m.state,l)),message:(H,I)=>(b||m.schema).$_createError("external",$,I,m.state,l,{messages:H})});if(q===void 0||q===$)continue;if(q instanceof a.Report){if(h.tracer.log(m.schema,m.state,"rule","external","error"),S.push(q),l.abortEarly)break;continue}if(Array.isArray(q)&&q[t.symbols.errors]){if(h.tracer.log(m.schema,m.state,"rule","external","error"),S.push(...q),l.abortEarly)break;continue}P?(h.tracer.value(m.state,"rule",$,q,"external"),P[C]=q):(h.tracer.value(m.state,"rule",w,q,"external"),w=q)}catch(U){throw l.errors.label&&(U.message+=` (${m.label})`),U}}if(d.value=w,S.length)throw d.error=a.process(S,s,l),h.debug&&(d.error.debug=h.debug),d.error}if(!l.warnings&&!l.debug&&!l.artifacts)return d.value;const g={value:d.value};return h.warnings.length&&(g.warning=a.details(h.warnings)),h.debug&&(g.debug=h.debug),h.artifacts&&(g.artifacts=h.artifacts),g},n.Mainstay=class{constructor(s,c,i){this.externals=[],this.warnings=[],this.tracer=s,this.debug=c,this.links=i,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const s=this._snapshots.pop();this.externals=s.externals,this.warnings=s.warnings}commit(){this._snapshots.pop()}},n.entry=function(s,c,i){const{tracer:l,cleanup:d}=n.tracer(c,i),h=i.debug?[]:null,g=c._ids._schemaChain?new Map:null,w=new n.Mainstay(l,h,g),S=c._ids._schemaChain?[{schema:c}]:null,m=new r([],[],{mainstay:w,schemas:S}),v=y.validate(s,c,m,i);d&&c.$_root.untrace();const b=a.process(v.errors,s,i);return{value:v.value,error:b,mainstay:w}},n.tracer=function(s,c){return s.$_root._tracer?{tracer:s.$_root._tracer._register(s)}:c.debug?(o(s.$_root.trace,"Debug mode not supported"),{tracer:s.$_root.trace()._register(s),cleanup:!0}):{tracer:n.ignore}},y.validate=function(s,c,i,l,d={}){if(c.$_terms.whens&&(c=c._generate(s,i,l).schema),c._preferences&&(l=n.prefs(c,l)),c._cache&&l.cache){const b=c._cache.get(s);if(i.mainstay.tracer.debug(i,"validate","cached",!!b),b)return b}const h=(b,C,P)=>c.$_createError(b,s,C,P||i,l),g={original:s,prefs:l,schema:c,state:i,error:h,errorsArray:n.errorsArray,warn:(b,C,P)=>i.mainstay.warnings.push(h(b,C,P)),message:(b,C)=>c.$_createError("custom",s,C,i,l,{messages:b})};i.mainstay.tracer.entry(c,i);const w=c._definition;if(w.prepare&&s!==void 0&&l.convert){const b=w.prepare(s,g);if(b){if(i.mainstay.tracer.value(i,"prepare",s,b.value),b.errors)return n.finalize(b.value,[].concat(b.errors),g);s=b.value}}if(w.coerce&&s!==void 0&&l.convert&&(!w.coerce.from||w.coerce.from.includes(typeof s))){const b=w.coerce.method(s,g);if(b){if(i.mainstay.tracer.value(i,"coerced",s,b.value),b.errors)return n.finalize(b.value,[].concat(b.errors),g);s=b.value}}const S=c._flags.empty;S&&S.$_match(n.trim(s,c),i.nest(S),t.defaults)&&(i.mainstay.tracer.value(i,"empty",s,void 0),s=void 0);const m=d.presence||c._flags.presence||(c._flags._endedSwitch?null:l.presence);if(s===void 0){if(m==="forbidden")return n.finalize(s,null,g);if(m==="required")return n.finalize(s,[c.$_createError("any.required",s,null,i,l)],g);if(m==="optional"){if(c._flags.default!==t.symbols.deepDefault)return n.finalize(s,null,g);i.mainstay.tracer.value(i,"default",s,{}),s={}}}else if(m==="forbidden")return n.finalize(s,[c.$_createError("any.unknown",s,null,i,l)],g);const v=[];if(c._valids){const b=c._valids.get(s,i,l,c._flags.insensitive);if(b)return l.convert&&(i.mainstay.tracer.value(i,"valids",s,b.value),s=b.value),i.mainstay.tracer.filter(c,i,"valid",b),n.finalize(s,null,g);if(c._flags.only){const C=c.$_createError("any.only",s,{valids:c._valids.values({display:!0})},i,l);if(l.abortEarly)return n.finalize(s,[C],g);v.push(C)}}if(c._invalids){const b=c._invalids.get(s,i,l,c._flags.insensitive);if(b){i.mainstay.tracer.filter(c,i,"invalid",b);const C=c.$_createError("any.invalid",s,{invalids:c._invalids.values({display:!0})},i,l);if(l.abortEarly)return n.finalize(s,[C],g);v.push(C)}}if(w.validate){const b=w.validate(s,g);if(b&&(i.mainstay.tracer.value(i,"base",s,b.value),s=b.value,b.errors)){if(!Array.isArray(b.errors))return v.push(b.errors),n.finalize(s,v,g);if(b.errors.length)return v.push(...b.errors),n.finalize(s,v,g)}}return c._rules.length?n.rules(s,v,g):n.finalize(s,v,g)},n.rules=function(s,c,i){const{schema:l,state:d,prefs:h}=i;for(const g of l._rules){const w=l._definition.rules[g.method];if(w.convert&&h.convert){d.mainstay.tracer.log(l,d,"rule",g.name,"full");continue}let S,m=g.args;if(g._resolve.length){m=Object.assign({},m);for(const b of g._resolve){const C=w.argsByName.get(b),P=m[b].resolve(s,d,h),$=C.normalize?C.normalize(P):P,D=t.validateArg($,null,C);if(D){S=l.$_createError("any.ref",P,{arg:b,ref:m[b],reason:D},d,h);break}m[b]=$}}S=S||w.validate(s,i,m,g);const v=n.rule(S,g);if(v.errors){if(d.mainstay.tracer.log(l,d,"rule",g.name,"error"),g.warn){d.mainstay.warnings.push(...v.errors);continue}if(h.abortEarly)return n.finalize(s,v.errors,i);c.push(...v.errors)}else d.mainstay.tracer.log(l,d,"rule",g.name,"pass"),d.mainstay.tracer.value(d,"rule",s,v.value,g.name),s=v.value}return n.finalize(s,c,i)},n.rule=function(s,c){return s instanceof a.Report?(n.error(s,c),{errors:[s],value:null}):Array.isArray(s)&&s[t.symbols.errors]?(s.forEach(i=>n.error(i,c)),{errors:s,value:null}):{errors:null,value:s}},n.error=function(s,c){return c.message&&s._setTemplate(c.message),s},n.finalize=function(s,c,i){c=c||[];const{schema:l,state:d,prefs:h}=i;if(c.length){const w=n.default("failover",void 0,c,i);w!==void 0&&(d.mainstay.tracer.value(d,"failover",s,w),s=w,c=[])}if(c.length&&l._flags.error)if(typeof l._flags.error=="function"){c=l._flags.error(c),Array.isArray(c)||(c=[c]);for(const w of c)o(w instanceof Error||w instanceof a.Report,"error() must return an Error object")}else c=[l._flags.error];if(s===void 0){const w=n.default("default",s,c,i);d.mainstay.tracer.value(d,"default",s,w),s=w}if(l._flags.cast&&s!==void 0){const w=l._definition.cast[l._flags.cast];if(w.from(s)){const S=w.to(s,i);d.mainstay.tracer.value(d,"cast",s,S,l._flags.cast),s=S}}if(l.$_terms.externals&&h.externals&&h._externals!==!1)for(const{method:w}of l.$_terms.externals)d.mainstay.externals.push({method:w,schema:l,state:d,label:a.label(l._flags,d,h)});const g={value:s,errors:c.length?c:null};return l._flags.result&&(g.value=l._flags.result==="strip"?void 0:i.original,d.mainstay.tracer.value(d,l._flags.result,s,g.value),d.shadow(s,l._flags.result)),l._cache&&h.cache!==!1&&!l._refs.length&&l._cache.set(i.original,g),s===void 0||g.errors||l._flags.artifact===void 0||(d.mainstay.artifacts=d.mainstay.artifacts||new Map,d.mainstay.artifacts.has(l._flags.artifact)||d.mainstay.artifacts.set(l._flags.artifact,[]),d.mainstay.artifacts.get(l._flags.artifact).push(d.path)),g},n.prefs=function(s,c){const i=c===t.defaults;return i&&s._preferences[t.symbols.prefs]?s._preferences[t.symbols.prefs]:(c=t.preferences(c,s._preferences),i&&(s._preferences[t.symbols.prefs]=c),c)},n.default=function(s,c,i,l){const{schema:d,state:h,prefs:g}=l,w=d._flags[s];if(g.noDefaults||w===void 0)return c;if(h.mainstay.tracer.log(d,h,"rule",s,"full"),!w)return w;if(typeof w=="function"){const S=w.length?[p(h.ancestors[0]),l]:[];try{return w(...S)}catch(m){return void i.push(d.$_createError(`any.${s}`,null,{error:m},h,g))}}return typeof w!="object"?w:w[t.symbols.literal]?w.literal:t.isResolvable(w)?w.resolve(c,h,g):p(w)},n.trim=function(s,c){if(typeof s!="string")return s;const i=c.$_getRule("trim");return i&&i.args.enabled?s.trim():s},n.ignore={active:!1,debug:f,entry:f,filter:f,log:f,resolve:f,value:f},n.errorsArray=function(){const s=[];return s[t.symbols.errors]=!0,s}},2036:(j,y,x)=>{const o=x(375),p=x(9474),f=x(8160),u={};j.exports=u.Values=class{constructor(t,a){this._values=new Set(t),this._refs=new Set(a),this._lowercase=u.lowercases(t),this._override=!1}get length(){return this._values.size+this._refs.size}add(t,a){f.isResolvable(t)?this._refs.has(t)||(this._refs.add(t),a&&a.register(t)):this.has(t,null,null,!1)||(this._values.add(t),typeof t=="string"&&this._lowercase.set(t.toLowerCase(),t))}static merge(t,a,r){if(t=t||new u.Values,a){if(a._override)return a.clone();for(const n of[...a._values,...a._refs])t.add(n)}if(r)for(const n of[...r._values,...r._refs])t.remove(n);return t.length?t:null}remove(t){f.isResolvable(t)?this._refs.delete(t):(this._values.delete(t),typeof t=="string"&&this._lowercase.delete(t.toLowerCase()))}has(t,a,r,n){return!!this.get(t,a,r,n)}get(t,a,r,n){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&n){const s=this._lowercase.get(t.toLowerCase());if(s)return{value:s}}if(!this._refs.size&&typeof t!="object")return!1;if(typeof t=="object"){for(const s of this._values)if(p(s,t))return{value:s}}if(a)for(const s of this._refs){const c=s.resolve(t,a,r,null,{in:!0});if(c===void 0)continue;const i=s.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const l of i)if(typeof l==typeof t){if(n&&t&&typeof t=="string"){if(l.toLowerCase()===t.toLowerCase())return{value:l,ref:s}}else if(p(l,t))return{value:l,ref:s}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const a=[];for(const r of[...this._values,...this._refs])r!==void 0&&a.push(r);return a}return Array.from([...this._values,...this._refs])}clone(){const t=new u.Values(this._values,this._refs);return t._override=this._override,t}concat(t){o(!t._override,"Cannot concat override set of values");const a=new u.Values([...this._values,...t._values],[...this._refs,...t._refs]);return a._override=this._override,a}describe(){const t=[];this._override&&t.push({override:!0});for(const a of this._values.values())t.push(a&&typeof a=="object"?{value:a}:a);for(const a of this._refs.values())t.push(a.describe());return t}},u.Values.prototype[f.symbols.values]=!0,u.Values.prototype.slice=u.Values.prototype.clone,u.lowercases=function(t){const a=new Map;if(t)for(const r of t)typeof r=="string"&&a.set(r.toLowerCase(),r);return a}},978:(j,y,x)=>{const o=x(375),p=x(8571),f=x(1687),u=x(9621),t={};j.exports=function(a,r,n={}){if(o(a&&typeof a=="object","Invalid defaults value: must be an object"),o(!r||r===!0||typeof r=="object","Invalid source value: must be true, falsy or an object"),o(typeof n=="object","Invalid options: must be an object"),!r)return null;if(n.shallow)return t.applyToDefaultsWithShallow(a,r,n);const s=p(a);if(r===!0)return s;const c=n.nullOverride!==void 0&&n.nullOverride;return f(s,r,{nullOverride:c,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(a,r,n){const s=n.shallow;o(Array.isArray(s),"Invalid keys");const c=new Map,i=r===!0?null:new Set;for(let h of s){h=Array.isArray(h)?h:h.split(".");const g=u(a,h);g&&typeof g=="object"?c.set(g,i&&u(r,h)||g):i&&i.add(h)}const l=p(a,{},c);if(!i)return l;for(const h of i)t.reachCopy(l,r,h);const d=n.nullOverride!==void 0&&n.nullOverride;return f(l,r,{nullOverride:d,mergeArrays:!1})},t.reachCopy=function(a,r,n){for(const i of n){if(!(i in r))return;const l=r[i];if(typeof l!="object"||l===null)return;r=l}const s=r;let c=a;for(let i=0;i<n.length-1;++i){const l=n[i];typeof c[l]!="object"&&(c[l]={}),c=c[l]}c[n[n.length-1]]=s}},375:(j,y,x)=>{const o=x(7916);j.exports=function(p,...f){if(!p)throw f.length===1&&f[0]instanceof Error?f[0]:new o(f)}},8571:(j,y,x)=>{const o=x(9621),p=x(4277),f=x(7043),u={needsProtoHack:new Set([p.set,p.map,p.weakSet,p.weakMap])};j.exports=u.clone=function(t,a={},r=null){if(typeof t!="object"||t===null)return t;let n=u.clone,s=r;if(a.shallow){if(a.shallow!==!0)return u.cloneWithShallow(t,a);n=d=>d}else if(s){const d=s.get(t);if(d)return d}else s=new Map;const c=p.getInternalProto(t);if(c===p.buffer)return!1;if(c===p.date)return new Date(t.getTime());if(c===p.regex)return new RegExp(t);const i=u.base(t,c,a);if(i===t)return t;if(s&&s.set(t,i),c===p.set)for(const d of t)i.add(n(d,a,s));else if(c===p.map)for(const[d,h]of t)i.set(d,n(h,a,s));const l=f.keys(t,a);for(const d of l){if(d==="__proto__")continue;if(c===p.array&&d==="length"){i.length=t.length;continue}const h=Object.getOwnPropertyDescriptor(t,d);h?h.get||h.set?Object.defineProperty(i,d,h):h.enumerable?i[d]=n(t[d],a,s):Object.defineProperty(i,d,{enumerable:!1,writable:!0,configurable:!0,value:n(t[d],a,s)}):Object.defineProperty(i,d,{enumerable:!0,writable:!0,configurable:!0,value:n(t[d],a,s)})}return i},u.cloneWithShallow=function(t,a){const r=a.shallow;(a=Object.assign({},a)).shallow=!1;const n=new Map;for(const s of r){const c=o(t,s);typeof c!="object"&&typeof c!="function"||n.set(c,c)}return u.clone(t,a,n)},u.base=function(t,a,r){if(r.prototype===!1)return u.needsProtoHack.has(a)?new a.constructor:a===p.array?[]:{};const n=Object.getPrototypeOf(t);if(n&&n.isImmutable)return t;if(a===p.array){const s=[];return n!==a&&Object.setPrototypeOf(s,n),s}if(u.needsProtoHack.has(a)){const s=new n.constructor;return n!==a&&Object.setPrototypeOf(s,n),s}return Object.create(n)}},9474:(j,y,x)=>{const o=x(4277),p={mismatched:null};j.exports=function(f,u,t){return t=Object.assign({prototype:!0},t),!!p.isDeepEqual(f,u,t,[])},p.isDeepEqual=function(f,u,t,a){if(f===u)return f!==0||1/f==1/u;const r=typeof f;if(r!==typeof u||f===null||u===null)return!1;if(r==="function"){if(!t.deepFunction||f.toString()!==u.toString())return!1}else if(r!=="object")return f!=f&&u!=u;const n=p.getSharedType(f,u,!!t.prototype);switch(n){case o.buffer:return!1;case o.promise:return f===u;case o.regex:return f.toString()===u.toString();case p.mismatched:return!1}for(let s=a.length-1;s>=0;--s)if(a[s].isSame(f,u))return!0;a.push(new p.SeenEntry(f,u));try{return!!p.isDeepEqualObj(n,f,u,t,a)}finally{a.pop()}},p.getSharedType=function(f,u,t){if(t)return Object.getPrototypeOf(f)!==Object.getPrototypeOf(u)?p.mismatched:o.getInternalProto(f);const a=o.getInternalProto(f);return a!==o.getInternalProto(u)?p.mismatched:a},p.valueOf=function(f){const u=f.valueOf;if(u===void 0)return f;try{return u.call(f)}catch(t){return t}},p.hasOwnEnumerableProperty=function(f,u){return Object.prototype.propertyIsEnumerable.call(f,u)},p.isSetSimpleEqual=function(f,u){for(const t of Set.prototype.values.call(f))if(!Set.prototype.has.call(u,t))return!1;return!0},p.isDeepEqualObj=function(f,u,t,a,r){const{isDeepEqual:n,valueOf:s,hasOwnEnumerableProperty:c}=p,{keys:i,getOwnPropertySymbols:l}=Object;if(f===o.array){if(!a.part){if(u.length!==t.length)return!1;for(let S=0;S<u.length;++S)if(!n(u[S],t[S],a,r))return!1;return!0}for(const S of u)for(const m of t)if(n(S,m,a,r))return!0}else if(f===o.set){if(u.size!==t.size)return!1;if(!p.isSetSimpleEqual(u,t)){const S=new Set(Set.prototype.values.call(t));for(const m of Set.prototype.values.call(u)){if(S.delete(m))continue;let v=!1;for(const b of S)if(n(m,b,a,r)){S.delete(b),v=!0;break}if(!v)return!1}}}else if(f===o.map){if(u.size!==t.size)return!1;for(const[S,m]of Map.prototype.entries.call(u))if(m===void 0&&!Map.prototype.has.call(t,S)||!n(m,Map.prototype.get.call(t,S),a,r))return!1}else if(f===o.error&&(u.name!==t.name||u.message!==t.message))return!1;const d=s(u),h=s(t);if((u!==d||t!==h)&&!n(d,h,a,r))return!1;const g=i(u);if(!a.part&&g.length!==i(t).length&&!a.skip)return!1;let w=0;for(const S of g)if(a.skip&&a.skip.includes(S))t[S]===void 0&&++w;else if(!c(t,S)||!n(u[S],t[S],a,r))return!1;if(!a.part&&g.length-w!==i(t).length)return!1;if(a.symbols!==!1){const S=l(u),m=new Set(l(t));for(const v of S){if(!a.skip||!a.skip.includes(v)){if(c(u,v)){if(!c(t,v)||!n(u[v],t[v],a,r))return!1}else if(c(t,v))return!1}m.delete(v)}for(const v of m)if(c(t,v))return!1}return!0},p.SeenEntry=class{constructor(f,u){this.obj=f,this.ref=u}isSame(f,u){return this.obj===f&&this.ref===u}}},7916:(j,y,x)=>{const o=x(8761);j.exports=class extends Error{constructor(p){super(p.filter(f=>f!=="").map(f=>typeof f=="string"?f:f instanceof Error?f.message:o(f)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,y.assert)}}},5277:j=>{const y={};j.exports=function(x){if(!x)return"";let o="";for(let p=0;p<x.length;++p){const f=x.charCodeAt(p);y.isSafe(f)?o+=x[p]:o+=y.escapeHtmlChar(f)}return o},y.escapeHtmlChar=function(x){return y.namedHtml.get(x)||(x>=256?"&#"+x+";":`&#x${x.toString(16).padStart(2,"0")};`)},y.isSafe=function(x){return y.safeCharCodes.has(x)},y.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),y.safeCharCodes=function(){const x=new Set;for(let o=32;o<123;++o)(o>=97||o>=65&&o<=90||o>=48&&o<=57||o===32||o===46||o===44||o===45||o===58||o===95)&&x.add(o);return x}()},6064:j=>{j.exports=function(y){return y.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:j=>{j.exports=function(){}},1687:(j,y,x)=>{const o=x(375),p=x(8571),f=x(7043),u={};j.exports=u.merge=function(t,a,r){if(o(t&&typeof t=="object","Invalid target value: must be an object"),o(a==null||typeof a=="object","Invalid source value: must be null, undefined, or an object"),!a)return t;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(a)){o(Array.isArray(t),"Cannot merge array onto an object"),r.mergeArrays||(t.length=0);for(let s=0;s<a.length;++s)t.push(p(a[s],{symbols:r.symbols}));return t}const n=f.keys(a,r);for(let s=0;s<n.length;++s){const c=n[s];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(a,c))continue;const i=a[c];if(i&&typeof i=="object"){if(t[c]===i)continue;!t[c]||typeof t[c]!="object"||Array.isArray(t[c])!==Array.isArray(i)||i instanceof Date||i instanceof RegExp?t[c]=p(i,{symbols:r.symbols}):u.merge(t[c],i,r)}else(i!=null||r.nullOverride)&&(t[c]=i)}return t}},9621:(j,y,x)=>{const o=x(375),p={};j.exports=function(f,u,t){if(u===!1||u==null)return f;typeof(t=t||{})=="string"&&(t={separator:t});const a=Array.isArray(u);o(!a||!t.separator,"Separator option is not valid for array-based chain");const r=a?u:u.split(t.separator||".");let n=f;for(let s=0;s<r.length;++s){let c=r[s];const i=t.iterables&&p.iterables(n);if(Array.isArray(n)||i==="set"){const l=Number(c);Number.isInteger(l)&&(c=l<0?n.length+l:l)}if(!n||typeof n=="function"&&t.functions===!1||!i&&n[c]===void 0){o(!t.strict||s+1===r.length,"Missing segment",c,"in reach path ",u),o(typeof n=="object"||t.functions===!0||typeof n!="function","Invalid segment",c,"in reach path ",u),n=t.default;break}n=i?i==="set"?[...n][c]:n.get(c):n[c]}return n},p.iterables=function(f){return f instanceof Set?"set":f instanceof Map?"map":void 0}},8761:j=>{j.exports=function(...y){try{return JSON.stringify(...y)}catch(x){return"[Cannot display object: "+x.message+"]"}}},4277:(j,y)=>{const x={};y=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},x.typeMap=new Map([["[object Error]",y.error],["[object Map]",y.map],["[object Promise]",y.promise],["[object Set]",y.set],["[object WeakMap]",y.weakMap],["[object WeakSet]",y.weakSet]]),y.getInternalProto=function(o){if(Array.isArray(o))return y.array;if(o instanceof Date)return y.date;if(o instanceof RegExp)return y.regex;if(o instanceof Error)return y.error;const p=Object.prototype.toString.call(o);return x.typeMap.get(p)||y.generic}},7043:(j,y)=>{y.keys=function(x,o={}){return o.symbols!==!1?Reflect.ownKeys(x):Object.getOwnPropertyNames(x)}},3652:(j,y,x)=>{const o=x(375),p={};y.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(f,u){const t=[].concat((u=u||{}).before||[]),a=[].concat(u.after||[]),r=u.group||"?",n=u.sort||0;o(!t.includes(r),`Item cannot come before itself: ${r}`),o(!t.includes("?"),"Item cannot come before unassociated items"),o(!a.includes(r),`Item cannot come after itself: ${r}`),o(!a.includes("?"),"Item cannot come after unassociated items"),Array.isArray(f)||(f=[f]);for(const s of f){const c={seq:this._items.length,sort:n,before:t,after:a,group:r,node:s};this._items.push(c)}if(!u.manual){const s=this._sort();o(s,"item",r!=="?"?`added into group ${r}`:"","created a dependencies error")}return this.nodes}merge(f){Array.isArray(f)||(f=[f]);for(const t of f)if(t)for(const a of t._items)this._items.push(Object.assign({},a));this._items.sort(p.mergeSort);for(let t=0;t<this._items.length;++t)this._items[t].seq=t;const u=this._sort();return o(u,"merge created a dependencies error"),this.nodes}sort(){const f=this._sort();return o(f,"sort created a dependencies error"),this.nodes}_sort(){const f={},u=Object.create(null),t=Object.create(null);for(const c of this._items){const i=c.seq,l=c.group;t[l]=t[l]||[],t[l].push(i),f[i]=c.before;for(const d of c.after)u[d]=u[d]||[],u[d].push(i)}for(const c in f){const i=[];for(const l in f[c]){const d=f[c][l];t[d]=t[d]||[],i.push(...t[d])}f[c]=i}for(const c in u)if(t[c])for(const i of t[c])f[i].push(...u[c]);const a={};for(const c in f){const i=f[c];for(const l of i)a[l]=a[l]||[],a[l].push(c)}const r={},n=[];for(let c=0;c<this._items.length;++c){let i=c;if(a[c]){i=null;for(let l=0;l<this._items.length;++l){if(r[l]===!0)continue;a[l]||(a[l]=[]);const d=a[l].length;let h=0;for(let g=0;g<d;++g)r[a[l][g]]&&++h;if(h===d){i=l;break}}}i!==null&&(r[i]=!0,n.push(i))}if(n.length!==this._items.length)return!1;const s={};for(const c of this._items)s[c.seq]=c;this._items=[],this.nodes=[];for(const c of n){const i=s[c];this.nodes.push(i.node),this._items.push(i)}return!0}},p.mergeSort=(f,u)=>f.sort===u.sort?0:f.sort<u.sort?-1:1},5380:(j,y,x)=>{const o=x(443),p=x(2178),f={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:o.URL||URL};y.analyze=function(u,t={}){if(!u)return p.code("DOMAIN_NON_EMPTY_STRING");if(typeof u!="string")throw new Error("Invalid input: domain must be a string");if(u.length>256)return p.code("DOMAIN_TOO_LONG");if(f.nonAsciiRx.test(u)){if(t.allowUnicode===!1)return p.code("DOMAIN_INVALID_UNICODE_CHARS");u=u.normalize("NFC")}if(f.domainControlRx.test(u))return p.code("DOMAIN_INVALID_CHARS");u=f.punycode(u),t.allowFullyQualified&&u[u.length-1]==="."&&(u=u.slice(0,-1));const a=t.minDomainSegments||f.minDomainSegments,r=u.split(".");if(r.length<a)return p.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&r.length>t.maxDomainSegments)return p.code("DOMAIN_SEGMENTS_COUNT_MAX");const n=t.tlds;if(n){const s=r[r.length-1].toLowerCase();if(n.deny&&n.deny.has(s)||n.allow&&!n.allow.has(s))return p.code("DOMAIN_FORBIDDEN_TLDS")}for(let s=0;s<r.length;++s){const c=r[s];if(!c.length)return p.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return p.code("DOMAIN_LONG_SEGMENT");if(s<r.length-1){if(!f.domainSegmentRx.test(c))return p.code("DOMAIN_INVALID_CHARS")}else if(!f.tldSegmentRx.test(c))return p.code("DOMAIN_INVALID_TLDS_CHARS")}return null},y.isValid=function(u,t){return!y.analyze(u,t)},f.punycode=function(u){u.includes("%")&&(u=u.replace(/%/g,"%25"));try{return new f.URL(`http://${u}`).host}catch{return u}}},1745:(j,y,x)=>{const o=x(9848),p=x(5380),f=x(2178),u={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(o.TextEncoder||TextEncoder)};y.analyze=function(t,a){return u.email(t,a)},y.isValid=function(t,a){return!u.email(t,a)},u.email=function(t,a={}){if(typeof t!="string")throw new Error("Invalid input: email must be a string");if(!t)return f.code("EMPTY_STRING");const r=!u.nonAsciiRx.test(t);if(!r){if(a.allowUnicode===!1)return f.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const n=t.split("@");if(n.length!==2)return n.length>2?f.code("MULTIPLE_AT_CHAR"):f.code("MISSING_AT_CHAR");const[s,c]=n;if(!s)return f.code("EMPTY_LOCAL");if(!a.ignoreLength){if(t.length>254)return f.code("ADDRESS_TOO_LONG");if(u.encoder.encode(s).length>64)return f.code("LOCAL_TOO_LONG")}return u.local(s,r)||p.analyze(c,a)},u.local=function(t,a){const r=t.split(".");for(const n of r){if(!n.length)return f.code("EMPTY_LOCAL_SEGMENT");if(a){if(!u.atextRx.test(n))return f.code("INVALID_LOCAL_CHARS")}else for(const s of n){if(u.atextRx.test(s))continue;const c=u.binary(s);if(!u.atomRx.test(c))return f.code("INVALID_LOCAL_CHARS")}}},u.binary=function(t){return Array.from(u.encoder.encode(t)).map(a=>String.fromCharCode(a)).join("")},u.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,u.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,y)=>{y.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"},y.code=function(x){return{code:x,error:y.codes[x]}}},9959:(j,y,x)=>{const o=x(375),p=x(5752);y.regex=function(f={}){o(f.cidr===void 0||typeof f.cidr=="string","options.cidr must be a string");const u=f.cidr?f.cidr.toLowerCase():"optional";o(["required","optional","forbidden"].includes(u),"options.cidr must be one of required, optional, forbidden"),o(f.version===void 0||typeof f.version=="string"||Array.isArray(f.version),"options.version must be a string or an array of string");let t=f.version||["ipv4","ipv6","ipvfuture"];Array.isArray(t)||(t=[t]),o(t.length>=1,"options.version must have at least 1 version specified");for(let n=0;n<t.length;++n)o(typeof t[n]=="string","options.version must only contain strings"),t[n]=t[n].toLowerCase(),o(["ipv4","ipv6","ipvfuture"].includes(t[n]),"options.version contains unknown version "+t[n]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const a=`(?:${t.map(n=>{if(u==="forbidden")return p.ip[n];const s=`\\/${n==="ipv4"?p.ip.v4Cidr:p.ip.v6Cidr}`;return u==="required"?`${p.ip[n]}${s}`:`${p.ip[n]}(?:${s})?`}).join("|")})`,r=new RegExp(`^${a}$`);return{cidr:u,versions:t,regex:r,raw:a}}},5752:(j,y,x)=>{const o=x(375),p=x(6064),f={generate:function(){const u={},t="\\dA-Fa-f",a="["+t+"]",r="\\w-\\.~",n="!\\$&'\\(\\)\\*\\+,;=",s="%"+t,c=r+s+n+":@",i="["+c+"]",l="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";u.ipv4address="(?:"+l+"\\.){3}"+l;const d=a+"{1,4}",h="(?:"+d+":"+d+"|"+u.ipv4address+")",g="(?:"+d+":){6}"+h,w="::(?:"+d+":){5}"+h,S="(?:"+d+")?::(?:"+d+":){4}"+h,m="(?:(?:"+d+":){0,1}"+d+")?::(?:"+d+":){3}"+h,v="(?:(?:"+d+":){0,2}"+d+")?::(?:"+d+":){2}"+h,b="(?:(?:"+d+":){0,3}"+d+")?::"+d+":"+h,C="(?:(?:"+d+":){0,4}"+d+")?::"+h,P="(?:(?:"+d+":){0,5}"+d+")?::"+d,$="(?:(?:"+d+":){0,6}"+d+")?::";u.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",u.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",u.ipv6address="(?:"+g+"|"+w+"|"+S+"|"+m+"|"+v+"|"+b+"|"+C+"|"+P+"|"+$+")",u.ipvFuture="v"+a+"+\\.["+r+n+":]+",u.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",u.schemeRegex=new RegExp(u.scheme);const D="["+r+s+n+":]*",M="["+r+s+n+"]{1,255}",U="(?:\\[(?:"+u.ipv6address+"|"+u.ipvFuture+")\\]|"+u.ipv4address+"|"+M+")",q="(?:"+D+"@)?"+U+"(?::\\d*)?",H="(?:"+D+"@)?("+U+")(?::\\d*)?",I=i+"*",N=i+"+",W="(?:\\/"+I+")*",Y="\\/(?:"+N+W+")?",de=N+W,Ce="["+r+s+n+"@]+"+W,He="(?:\\/\\/\\/"+I+W+")";return u.hierPart="(?:(?:\\/\\/"+q+W+")|"+Y+"|"+de+"|"+He+")",u.hierPartCapture="(?:(?:\\/\\/"+H+W+")|"+Y+"|"+de+")",u.relativeRef="(?:(?:\\/\\/"+q+W+")|"+Y+"|"+Ce+"|)",u.relativeRefCapture="(?:(?:\\/\\/"+H+W+")|"+Y+"|"+Ce+"|)",u.query="["+c+"\\/\\?]*(?=#|$)",u.queryWithSquareBrackets="["+c+"\\[\\]\\/\\?]*(?=#|$)",u.fragment="["+c+"\\/\\?]*",u}};f.rfc3986=f.generate(),y.ip={v4Cidr:f.rfc3986.ipv4Cidr,v6Cidr:f.rfc3986.ipv6Cidr,ipv4:f.rfc3986.ipv4address,ipv6:f.rfc3986.ipv6address,ipvfuture:f.rfc3986.ipvFuture},f.createRegex=function(u){const t=f.rfc3986,a="(?:\\?"+(u.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",r=u.domain?t.relativeRefCapture:t.relativeRef;if(u.relativeOnly)return f.wrap(r+a);let n="";if(u.scheme){o(u.scheme instanceof RegExp||typeof u.scheme=="string"||Array.isArray(u.scheme),"scheme must be a RegExp, String, or Array");const i=[].concat(u.scheme);o(i.length>=1,"scheme must have at least 1 scheme specified");const l=[];for(let d=0;d<i.length;++d){const h=i[d];o(h instanceof RegExp||typeof h=="string","scheme at position "+d+" must be a RegExp or String"),h instanceof RegExp?l.push(h.source.toString()):(o(t.schemeRegex.test(h),"scheme at position "+d+" must be a valid scheme"),l.push(p(h)))}n=l.join("|")}const s="(?:"+(n?"(?:"+n+")":t.scheme)+":"+(u.domain?t.hierPartCapture:t.hierPart)+")",c=u.allowRelative?"(?:"+s+"|"+r+")":s;return f.wrap(c+a,n)},f.wrap=function(u,t){return{raw:u=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${u}`,regex:new RegExp(`^${u}$`),scheme:t}},f.uriRegex=f.createRegex({}),y.regex=function(u={}){return u.scheme||u.allowRelative||u.relativeOnly||u.allowQuerySquareBrackets||u.domain?f.createRegex(u):f.uriRegex}},1447:(j,y)=>{const x={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};y.Parser=class{constructor(o,p={}){if(!p[x.settings]&&p.constants)for(const f in p.constants){const u=p.constants[f];if(u!==null&&!["boolean","number","string"].includes(typeof u))throw new Error(`Formula constant ${f} contains invalid ${typeof u} value type`)}this.settings=p[x.settings]?p:Object.assign({[x.settings]:!0,constants:{},functions:{}},p),this.single=null,this._parts=null,this._parse(o)}_parse(o){let p=[],f="",u=0,t=!1;const a=n=>{if(u)throw new Error("Formula missing closing parenthesis");const s=p.length?p[p.length-1]:null;if(t||f||n){if(s&&s.type==="reference"&&n===")")return s.type="function",s.value=this._subFormula(f,s.value),void(f="");if(n===")"){const c=new y.Parser(f,this.settings);p.push({type:"segment",value:c})}else if(t){if(t==="]")return p.push({type:"reference",value:f}),void(f="");p.push({type:"literal",value:f})}else if(x.operatorCharacters.includes(f))s&&s.type==="operator"&&x.operators.includes(s.value+f)?s.value+=f:p.push({type:"operator",value:f});else if(f.match(x.numberRx))p.push({type:"constant",value:parseFloat(f)});else if(this.settings.constants[f]!==void 0)p.push({type:"constant",value:this.settings.constants[f]});else{if(!f.match(x.tokenRx))throw new Error(`Formula contains invalid token: ${f}`);p.push({type:"reference",value:f})}f=""}};for(const n of o)t?n===t?(a(),t=!1):f+=n:u?n==="("?(f+=n,++u):n===")"?(--u,u?f+=n:a(n)):f+=n:n in x.literals?t=x.literals[n]:n==="("?(a(),++u):x.operatorCharacters.includes(n)?(a(),f=n,a()):n!==" "?f+=n:a();a(),p=p.map((n,s)=>n.type!=="operator"||n.value!=="-"||s&&p[s-1].type!=="operator"?n:{type:"operator",value:"n"});let r=!1;for(const n of p){if(n.type==="operator"){if(x.operatorsPrefix.includes(n.value))continue;if(!r)throw new Error("Formula contains an operator in invalid position");if(!x.operators.includes(n.value))throw new Error(`Formula contains an unknown operator ${n.value}`)}else if(r)throw new Error("Formula missing expected operator");r=!r}if(!r)throw new Error("Formula contains invalid trailing operator");p.length===1&&["reference","literal","constant"].includes(p[0].type)&&(this.single={type:p[0].type==="reference"?"reference":"value",value:p[0].value}),this._parts=p.map(n=>{if(n.type==="operator")return x.operatorsPrefix.includes(n.value)?n:n.value;if(n.type!=="reference")return n.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(n.value))throw new Error(`Formula contains invalid reference ${n.value}`);return this.settings.reference?this.settings.reference(n.value):x.reference(n.value)})}_subFormula(o,p){const f=this.settings.functions[p];if(typeof f!="function")throw new Error(`Formula contains unknown function ${p}`);let u=[];if(o){let t="",a=0,r=!1;const n=()=>{if(!t)throw new Error(`Formula contains function ${p} with invalid arguments ${o}`);u.push(t),t=""};for(let s=0;s<o.length;++s){const c=o[s];r?(t+=c,c===r&&(r=!1)):c in x.literals&&!a?(t+=c,r=x.literals[c]):c!==","||a?(t+=c,c==="("?++a:c===")"&&--a):n()}n()}return u=u.map(t=>new y.Parser(t,this.settings)),function(t){const a=[];for(const r of u)a.push(r.evaluate(t));return f.call(t,...a)}}evaluate(o){const p=this._parts.slice();for(let f=p.length-2;f>=0;--f){const u=p[f];if(u&&u.type==="operator"){const t=p[f+1];p.splice(f+1,1);const a=x.evaluate(t,o);p[f]=x.single(u.value,a)}}return x.operatorsOrder.forEach(f=>{for(let u=1;u<p.length-1;)if(f.includes(p[u])){const t=p[u],a=x.evaluate(p[u-1],o),r=x.evaluate(p[u+1],o);p.splice(u,2);const n=x.calculate(t,a,r);p[u-1]=n===0?0:n}else u+=2}),x.evaluate(p[0],o)}},y.Parser.prototype[x.symbol]=!0,x.reference=function(o){return function(p){return p&&p[o]!==void 0?p[o]:null}},x.evaluate=function(o,p){return o===null?null:typeof o=="function"?o(p):o[x.symbol]?o.evaluate(p):o},x.single=function(o,p){if(o==="!")return!p;const f=-p;return f===0?0:f},x.calculate=function(o,p,f){if(o==="??")return x.exists(p)?p:f;if(typeof p=="string"||typeof f=="string"){if(o==="+")return(p=x.exists(p)?p:"")+(x.exists(f)?f:"")}else switch(o){case"^":return Math.pow(p,f);case"*":return p*f;case"/":return p/f;case"%":return p%f;case"+":return p+f;case"-":return p-f}switch(o){case"<":return p<f;case"<=":return p<=f;case">":return p>f;case">=":return p>=f;case"==":return p===f;case"!=":return p!==f;case"&&":return p&&f;case"||":return p||f}return null},x.exists=function(o){return o!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:j=>{j.exports=JSON.parse('{"version":"17.13.3"}')}},R={},function j(y){var x=R[y];if(x!==void 0)return x.exports;var o=R[y]={exports:{}};return A[y](o,o.exports,j),o.exports}(5107);var A,R})}(mt)),mt.exports}var Ci=Si();const Ri=pn(Ci),L=Ri.extend(ki).extend(wi),sn=/^(0x)?([A-Fa-f0-9]{64})$/;L.object({genesisTime:L.date().iso().required().raw(),genesisTx:L.string().regex(sn).required().allow(""),renaissanceTime:L.date().iso().required().raw(),renaissanceTx:L.string().regex(sn).required().allow("")});const Nn=L.object({address:L.DID().prefix().role("ROLE_TOKEN").required(),value:L.BN().min(0).required()});L.object({name:L.string().min(1).max(256).required(),value:L.string().min(1).max(1024).required(),description:L.string().min(1).max(256).optional().allow(""),required:L.boolean().optional().default(!1)});const Fn=L.alternatives().try(L.DID().prefix().role("ROLE_ACCOUNT"),L.DID().prefix().role("ROLE_APPLICATION"),L.DID().prefix().role("ROLE_BLOCKLET"),L.DID().prefix().wallet("ethereum"),L.DID().prefix().wallet("passkey"));L.array().items(L.object({owner:Fn.required(),tokensList:L.array().items(Nn).default([]),assetsList:L.array().items(L.DID().prefix().role("ROLE_ASSET")).default([])}));L.array().items({signer:L.DID().prefix().required(),pk:L.any().required(),signature:L.any().required(),delegator:L.DID().prefix().valid("").optional(),data:L.any().optional()});L.object({type:L.string().min(1).max(32).required(),contractAddress:L.DID().prefix().wallet("ethereum").required(),chainType:L.string().min(1).max(32).required(),chainName:L.string().min(1).max(32).required(),chainId:L.number().positive().required()});const Lt=L.object({type:L.string().valid("svg","url","uri").required(),content:L.string().when("type",{is:"uri",then:L.string().max(20480).dataUri().required()}).when("type",{is:"url",then:L.string().max(2048).uri({scheme:["http","https"]}).required()})}),Wn=L.object({id:L.string().max(2048).uri({scheme:["http","https"]}).required(),scope:L.string().valid("public","private").default("public")});L.object({id:L.DID().prefix().required(),pk:L.string().required(),name:L.string().min(1).max(256).required()});const Ai={address:L.DID().prefix().role("ROLE_ASSET").required(),moniker:L.string().min(2).max(255).required(),data:L.any().required(),readonly:L.boolean().default(!1),transferrable:L.boolean().default(!1),ttl:L.number().min(0).default(0),parent:L.DID().prefix().optional().allow(""),issuer:L.DID().prefix().optional().allow(""),endpoint:Wn.optional().allow(null).default(null),display:Lt.optional().allow(null).default(null),tags:L.array().items(L.string().min(1).max(64)).max(4).optional()},Oi={address:L.DID().prefix().role("ROLE_FACTORY").required(),name:L.string().min(2).max(255).required(),description:L.string().min(2).max(255).required(),settlement:L.string().valid("instant","periodic").default("instant"),limit:L.number().integer().min(0).default(0),trustedIssuers:L.array().items(L.DID().prefix()).max(8).optional(),data:L.any().optional().allow(null).default(null),display:Lt.optional().allow(null).default(null),input:L.object({value:L.BN().positive().min("0").default("0"),tokens:L.array().items(Nn).max(8).optional(),assets:L.array().items(L.alternatives().try(L.DID().prefix().role("ROLE_ASSET"),L.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:L.array().items(L.object({name:L.string().min(1).max(255).required(),description:L.string().max(255).optional().allow(""),required:L.boolean().required()})).optional()}),output:L.object({moniker:L.string().min(2).max(255).required(),data:L.any().required(),readonly:L.boolean().default(!1),transferrable:L.boolean().default(!1),ttl:L.number().min(0).default(0),parent:L.string().max(255).required(),issuer:L.string().max(255).required(),endpoint:Wn.optional(),display:Lt.optional(),tags:L.array().items(L.string().min(1).max(64)).max(4).optional()}),hooks:L.array().items(L.object({name:L.string().valid("mint","postMint","preMint").required(),type:L.string().valid("url","contract").required(),hook:L.string().min(1).max(4096).required(),compiled:L.array().items(L.object()).optional()})).optional()},Pi={tokenHolder:Fn,assetSchema:L.object(Ai).options({stripUnknown:!0,noDefaults:!1}),factorySchema:L.object(Oi).options({stripUnknown:!0,noDefaults:!1})};function Zn({onCancel:k,onSuccess:_,blocklet:A}){const{vaults:R=[],appPid:j}=A,{t:y,locale:x}=ee(),{connectApi:o}=hn(),{api:p}=se(),{teamDid:f}=it(),[u,t]=Nt({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});z.useEffect(()=>{if(!tt(u.address))return;const c=Fe(u.address),i=u.fetched.find(d=>d.address===c),l=u.errored.find(d=>d.address===c);!u.fetching&&!i&&!l&&(t({fetching:!0}),Mr(G.MAIN_CHAIN_ENDPOINT).getAccountState({address:c}).then(h=>{h.state?t({fetching:!1,fetched:[...u.fetched.filter(g=>g.address!==c),h.state]}):t({fetching:!1,errored:[...u.errored.filter(g=>g.address!==c),{address:c}]})}).catch(h=>{console.error(h),t({fetching:!1,error:St(h)})}))},[u.address,u.fetching]),z.useEffect(()=>{if(u.address){const c=Fe(u.address);if(!tt(c)){t({error:y("blocklet.config.vault.error.invalid")});return}if(Pi.tokenHolder.validate(c).error){t({error:y("blocklet.config.vault.error.holder")});return}if(R.find(l=>l.did===c)){t({error:y("blocklet.config.vault.error.duplicate")});return}if(Ys([A.appDid,A.appPid,...A.migratedFrom.map(l=>l.appDid)].filter(Boolean)).includes(c)){t({error:y("blocklet.config.vault.error.appDid")});return}}t({error:""})},[u.address]);const a=async()=>{t({loading:!0});try{const c=await p.configVault({input:{teamDid:f,vaultDid:Fe(u.address)}});o.open({locale:x,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:y("blocklet.config.vault.approve.title"),scan:y(`blocklet.config.vault.approve.${R.length>0?"byLast":"byOwner"}`),confirm:y("blocklet.config.vault.approve.confirm"),success:y("blocklet.config.vault.approve.success")},onSuccess:()=>{o.open({locale:x,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:y("blocklet.config.vault.commit.title"),scan:y("blocklet.config.vault.commit.scan"),confirm:y("blocklet.config.vault.commit.confirm"),success:y("blocklet.config.vault.commit.success")},onSuccess:()=>{t({loading:!1}),_()},onClose:()=>{t({loading:!1}),o.close()}})},onClose:()=>{t({loading:!1}),o.close()}})}catch(c){t({loading:!1,error:St(c)})}},r=Fe(u.address),n=[];tt(r)&&n.push({key:y("blocklet.config.vault.role"),value:e.jsx(Ke,{color:"primary",variant:"outlined",size:"small",label:Ct(r).role||"-"})});const s=u.fetched.find(c=>c.address===r);return s&&n.push({key:y("blocklet.config.vault.firstSeen"),value:Gt(s.context?.genesisTime,"-")},{key:y("blocklet.config.vault.lastSeen"),value:Gt(s.context?.renaissanceTime,"-")},{key:y("blocklet.config.vault.migratedFrom"),value:s.migratedFrom.length?s.migratedFrom.map(c=>e.jsx(kt,{did:c,showQrcode:!0,compact:!0,size:14,locale:x},c)):"-"},{key:y("blocklet.config.vault.migratedTo"),value:s.migratedTo.length?s.migratedTo.map(c=>e.jsx(kt,{did:c,showQrcode:!0,compact:!0,size:14,locale:x},c)):"-"}),e.jsx(Se,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:k,title:e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(En,{}),y("blocklet.config.vault.title")]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(Q,{onClick:k,children:y("common.cancel")}),e.jsx(Q,{onClick:a,variant:"contained",disabled:!!u.error||u.loading,children:y("common.confirm")})]}),children:e.jsxs(re,{direction:"column",spacing:3,children:[e.jsxs(J,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[y("blocklet.config.vault.desc")," ",y("blocklet.config.vault.tip")]}),R.length>0&&e.jsxs(O,{children:[e.jsxs(J,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[y("blocklet.config.vault.current"),":"]}),e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(Js,{did:R[R.length-1].did,showQrcode:!0,style:{width:"auto"}}),e.jsx(Br,{vaults:R,appPid:j})]})]}),e.jsx(V,{fullWidth:!0,"data-cy":"input-factory-address",label:y("blocklet.config.vault.address"),error:!!u.error,helperText:u.error,value:u.address,onChange:c=>{t({address:c.target.value,error:""})},slotProps:{input:{endAdornment:u.fetching?e.jsx(gn,{position:"end",children:e.jsx(Me,{size:16})}):null}}}),e.jsx(O,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:n.map(c=>e.jsx(Rn,{valueComponent:"div",nameWidth:120,name:c.key,children:c.value},c.key))})]})})}Zn.propTypes={onCancel:E.func.isRequired,onSuccess:E.func.isRequired,blocklet:E.object.isRequired};function Wt({blocklet:k,onUpdate:_=()=>{},hasPermission:A=!1}){const{info:R,api:j,inService:y}=se(),{t:x,locale:o}=z.useContext(fe),[p,f]=Nt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[u,t]=z.useState(()=>k?.settings?.gateway?.wafPolicy?.enabled??!0),[a,r]=z.useState(()=>!!k?.settings?.enableSessionHardening),[n,s]=z.useState(()=>!!k?.settings?.invite?.enabled),[c,i]=z.useState(()=>{const I=k?.settings?.org||{};return{enabled:I.enabled||!1,maxMemberPerOrg:I.maxMemberPerOrg||100,maxOrgPerUser:I.maxOrgPerUser||10}}),l=p.loading||!A,{did:d}=k.meta,h=y?window.env?.gateway?.wafPolicy?.enabled:R?.routing.wafPolicy?.enabled;if(Bt(k.status))return null;const g=k.environments.find(I=>I.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),w=!g||g.value==="yes",m=k.environments.find(I=>I.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||X.BLOCKLET_TENANT_MODES.SINGLE,v=(I,N)=>async W=>{if(!p.loading){f({loading:!0});try{const{checked:Y}=W.target,{blocklet:de}=await j.configBlocklet({input:{did:k.meta.did,configs:[{key:X.BLOCKLET_CONFIGURABLE_KEY[I],value:N(Y)}]}});_(de)}catch(Y){Z.error(Y.message)}finally{f({loading:!1})}}},b=v("BLOCKLET_DELETABLE",I=>I?"no":"yes"),C=v("BLOCKLET_APP_TENANT_MODE",I=>I?X.BLOCKLET_TENANT_MODES.MULTIPLE:X.BLOCKLET_TENANT_MODES.SINGLE),P=(I,N)=>async W=>{if(!p.loading){f({loading:!0});try{const Y=W.target.checked;await j.updateBlockletSettings({input:I(Y)}),N&&N(Y)}catch(Y){Z.error(Y.message)}finally{f({loading:!1})}}},$=P(I=>({did:k.meta.did,invite:{enabled:I}}),s),D=P(I=>({did:k.meta.did,org:{enabled:I,maxMemberPerOrg:100,maxOrgPerUser:10}}),I=>{i({...c,enabled:I})}),M=async(I,N)=>{if(!p.loading){f({loading:!0});try{await j.updateBlockletSettings({input:{did:k.meta.did,org:{...c,[I]:N}}}),i({...c,[I]:N})}catch(W){Z.error(W.message)}finally{f({loading:!1})}}},U=P(I=>({did:k.meta.did,gateway:{wafPolicy:{enabled:I}}}),t),q=P(I=>({did:k.meta.did,enableSessionHardening:I}),I=>{r(I),Xs()}),H=async()=>{if(!p.loading){f({loading:!0});try{const{blocklet:I}=await j.getBlocklet({input:{did:k.meta.did}});_(I)}catch(I){Z.error(I.message)}finally{f({loading:!1})}}};return e.jsxs(re,{p:3,sx:{border:"1px solid red",borderRadius:2,p:3},className:"advanced-config",children:[!y&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:x("blocklet.config.deletable.name"),desc:x(w?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:!w,defaultChecked:!0,onChange:b})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}})]}),e.jsx(Bn,{inService:y,disabled:l,loading:p.loading,onChange:H}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),y&&e.jsx(jr,{role:"owner",children:I=>(I||_i)&&e.jsxs(e.Fragment,{children:[e.jsx(B,{title:x("blocklet.config.vault.title"),desc:x("blocklet.config.vault.desc"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(Q,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>f({showConfigVault:!0}),children:[e.jsx(En,{style:{fontSize:"1.3em",marginRight:4}}),x("blocklet.config.vault.title")]})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),p.showConfigVault&&e.jsx(Zn,{blocklet:k,onCancel:()=>f({showConfigVault:!1}),onSuccess:()=>f({showConfigVault:!1})}),e.jsx(B,{title:x("team.transferApp.name"),desc:x("team.transferApp.description"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(Q,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>f({showTransferOwner:!0}),children:[e.jsx(oi,{style:{fontSize:"1.3em",marginRight:4}}),x("team.transferApp.name")]})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),p.showTransferOwner&&e.jsx(Hn,{onCancel:()=>f({showTransferOwner:!1}),onSuccess:()=>f({showTransferOwner:!1})})]})}),e.jsx(B,{title:x("blocklet.config.clearCache.name"),desc:x("blocklet.config.clearCache.purpose"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Lr,{teamDid:d})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:x("blocklet.config.rotateSessionKey.name"),desc:x("blocklet.config.rotateSessionKey.purpose"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Dr,{style:{whiteSpace:"nowrap"},teamDid:d})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:x("blocklet.config.tenantMode.name"),desc:x(`blocklet.config.tenantMode.${m}`),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:m===X.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:C})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:x("team.invite.setting"),desc:x(`team.invite.${n?"enabled":"disabled"}`),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:n,onChange:$})})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:e.jsxs(re,{direction:"row",sx:{alignItems:"center",gap:1},children:[x("setting.form.enableSessionHardening.switchLabel"),e.jsx(ce,{title:x("setting.form.enableSessionHardening.switchTips"),children:e.jsx(Yt,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:a,onChange:q})})}),h&&e.jsxs(e.Fragment,{children:[e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:e.jsxs(re,{direction:"row",sx:{alignItems:"center",gap:1},children:[x("router.gateway.wafPolicy.title"),e.jsx(ce,{title:e.jsx(O,{sx:{fontSize:"14px",lineHeight:1.5},children:e.jsx(O,{sx:{color:"common.white",ml:.5},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${o}/enable-web-application-firewall`,target:"_blank",rel:"noopener noreferrer",children:x("dashboard.document")})}),children:e.jsx(Yt,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:x("router.gateway.wafPolicy.switchLabel"),children:e.jsx(O,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:l,checked:u,onChange:U})})})]}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(B,{title:e.jsx(re,{direction:"row",sx:{alignItems:"center",gap:1},children:x("common.orgs")}),desc:x("team.orgs.explain"),children:e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%",alignSelf:{xs:"flex-start",md:"flex-end"}},children:[e.jsx(pe,{disabled:l,checked:c.enabled,onChange:D}),c.enabled&&e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:400,mt:1},children:[e.jsx($t,{style:{marginTop:0},disabled:l,loading:p.loading,type:"number",min:2,initialValue:c.maxOrgPerUser,label:x("team.orgs.invite.maxOrgs"),placeholder:x("team.orgs.invite.maxOrgs"),onSubmit:I=>M("maxOrgPerUser",I)}),e.jsx($t,{style:{marginTop:0},disabled:l,loading:p.loading,type:"number",min:2,initialValue:c.maxMemberPerOrg,label:x("team.orgs.invite.maxMembers"),placeholder:x("team.orgs.invite.maxMembers"),onSubmit:I=>M("maxMemberPerOrg",I)})]})]})})]})}const $i=Be(Wt,"mutate_blocklets"),Ei=Be(Wt,"",Mt);function Ti(k){const{inService:_}=se();return _?e.jsx(Ei,{...k}):e.jsx($i,{...k})}Wt.propTypes={blocklet:E.object.isRequired,onUpdate:E.func,hasPermission:E.bool};function Zt({blocklet:k,onUpdate:_=()=>{},hasPermission:A=!1,...R}){const{t:j}=z.useContext(fe);return Bt(k.status)?null:e.jsxs(qi,{...R,children:[e.jsx(vi,{blocklet:k,onUpdate:_,hasPermission:A}),e.jsx(O,{sx:{mt:6},children:e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:j("blocklet.config.dangerZone")})}),e.jsx(O,{className:"config-form",component:ne,sx:{my:3}}),e.jsx(O,{sx:{maxWidth:1536},children:e.jsx(Ti,{blocklet:k,onUpdate:_,hasPermission:A})})]})}const Ii=Be(Zt,"mutate_blocklets"),Li=Be(Zt,"",Mt);function Di(k){const{inService:_}=se();return _?e.jsx(Li,{...k}):e.jsx(Ii,{...k})}Zt.propTypes={blocklet:E.object.isRequired,onUpdate:E.func,hasPermission:E.bool};const qi=je(O)`
|
|
51
51
|
.config-form {
|
|
52
52
|
flex-grow: 1;
|
|
53
53
|
overflow-y: auto;
|
|
@@ -79,7 +79,7 @@ ${p("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
79
79
|
.form-item {
|
|
80
80
|
margin-top: 0;
|
|
81
81
|
}
|
|
82
|
-
`;var Je={exports:{}},Xe={exports:{}},Qe={exports:{}},nn;function zi(){return nn||(nn=1,function(k,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=A;function A(R){return R==null}k.exports=_.default,k.exports.default=_.default}(Qe,Qe.exports)),Qe.exports}var sn;function Mi(){return sn||(sn=1,function(k,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=o;var A=j(Js()),R=j(zi());function j(p){return p&&p.__esModule?p:{default:p}}var y=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,x=/^[-+]?[0-9]+$/;function o(p,f){(0,A.default)(p),f=f||{};var u=f.allow_leading_zeroes===!1?y:x,t=!f.hasOwnProperty("min")||(0,R.default)(f.min)||p>=f.min,a=!f.hasOwnProperty("max")||(0,R.default)(f.max)||p<=f.max,r=!f.hasOwnProperty("lt")||(0,R.default)(f.lt)||p<f.lt,n=!f.hasOwnProperty("gt")||(0,R.default)(f.gt)||p>f.gt;return u.test(p)&&t&&a&&r&&n}k.exports=_.default,k.exports.default=_.default}(Xe,Xe.exports)),Xe.exports}var rn;function Bi(){return rn||(rn=1,function(k,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=j;var A=R(Mi());function R(y){return y&&y.__esModule?y:{default:y}}function j(y){return(0,A.default)(y,{allow_leading_zeroes:!1,min:0,max:65535})}k.exports=_.default,k.exports.default=_.default}(Je,Je.exports)),Je.exports}var Hi=Bi();const Ni=fn(Hi),ft={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Fi(){const{api:k}=se(),{blocklet:_}=le(),{t:A}=ee(),{confirmApi:R,confirmHolder:j}=Ie(),[y,x]=q.useState(!1),o=_?.meta?.did,p=Object.assign({...ft},_?.settings?.notification?.email||{}),{handleSubmit:f,control:u,formState:t,watch:a,reset:r}=ge({defaultValues:we(p,Object.keys(ft))}),n=xe({testReceiver:"",testReceiverError:""}),s=a("enabled"),c=T(async(C,P,$=!0)=>{try{x(!0);const{blocklet:D}=await k.configNotification({input:{did:o,notification:JSON.stringify({email:C})}}),M=Object.assign({...ft},D?.settings?.notification?.email||{});r(M),$&&Z.success(A("common.saveSuccess"))}catch(D){if($)Z.error(D.message||A("common.saveFailed"));else throw D}finally{x(!1)}}),i=T(async(C,P,$)=>{try{x(!0),t.isDirty&&await c(C,P,!1),await k.sendEmail({input:{did:o,receiver:$,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),Z.success(A("notification.email.testSuccess"))}catch(D){Z.error(D.message||A("notification.email.testfailed"))}finally{x(!1)}}),l=T((C,P)=>{n.testReceiver=localStorage.getItem("test-receiver")||"",n.testReceiverError="",R.open({title:A("notification.email.testSendEmail"),content:()=>e.jsx(O,{sx:{width:"300px"},children:e.jsx(V,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.email.inputTestReceiver"),value:n.testReceiver,onChange:$=>{n.testReceiver=$.target.value},error:!!n.testReceiverError,helperText:n.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm($){const D=n.testReceiver?.trim();if(!D){n.testReceiverError=A("notification.email.receiverRequired");return}if(!ut(D)){n.testReceiverError=A("notification.email.receiverInvalid");return}n.testReceiverError="",await i(C,P,D),$()},onCancel:()=>{x(!1)}})}),d=T(C=>{const P=C?.trim();return P?ut(P)?!0:A("notification.email.fromInvalid"):A("notification.email.fromRequired")}),h=T(C=>{const P=C?.trim();return P?Rt(P,{require_host:!1,protocols:[]})?!0:A("notification.email.hostInvalid"):A("notification.email.hostRequired")}),g=T(C=>C?Ni(C)?!0:A("notification.email.portInvalid"):A("notification.email.portRequired")),w=T(C=>C?.trim()?!0:A("notification.email.userRequired")),S=T(C=>C?.trim()?!0:A("notification.email.passwordRequired")),m=T(C=>C?.trim()&&!Rt(C,{protocols:["http","https"],require_protocol:!0})?A("notification.email.linkInvalid"):!0),v=T(C=>C?.trim()&&!ut(C)?A("notification.email.emailInvalid"):!0),b=T(()=>!0);return e.jsxs(O,{children:[e.jsxs(Wi,{component:"form",onSubmit:f(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(B,{title:A("notification.email.enable"),my:2.5,children:e.jsx(F,{name:"enabled",control:u,render:({field:C})=>e.jsx(oe,{control:e.jsx(pe,{checked:C.value,...C})})})}),e.jsx(B,{title:A("notification.email.from"),children:e.jsx(F,{name:"from",control:u,rules:{validate:s?d:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,label:A("notification.email.from"),error:!!t.errors[C.name],helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.host"),children:e.jsx(F,{name:"host",control:u,rules:{validate:s?h:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,error:!!t.errors[C.name],label:A("notification.email.host"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.port"),children:e.jsx(F,{name:"port",control:u,rules:{validate:s?g:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,type:"number",error:!!t.errors[C.name],label:A("notification.email.port"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.user"),children:e.jsx(F,{name:"user",control:u,rules:{validate:s?w:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,error:!!t.errors[C.name],label:A("notification.email.user"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.password"),children:e.jsx(F,{name:"password",control:u,rules:{validate:s?S:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,type:"password",error:!!t.errors[C.name],label:A("notification.email.password"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.secure"),children:e.jsx(F,{name:"secure",control:u,rules:{validate:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(oe,{control:e.jsx(pe,{checked:C.value,...C,disabled:!s})})})})}),e.jsxs(Sr,{children:[e.jsxs(Cr,{expandIcon:e.jsx(Rr,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[A("notification.email.signature"),e.jsx(ce,{title:A("notification.email.signatureTooltip"),children:e.jsx(Qr,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(Ar,{children:[e.jsx(B,{title:A("notification.email.companyName"),children:e.jsx(F,{name:"companyName",control:u,rules:{validate:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",error:!!t.errors[C.name],label:A("notification.email.companyName"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.companyLink"),children:e.jsx(F,{name:"companyLink",control:u,rules:{validate:s?m:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",error:!!t.errors[C.name],label:A("notification.email.companyLink"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.companyAddress"),children:e.jsx(F,{name:"companyAddress",control:u,rules:{validate:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",error:!!t.errors[C.name],label:A("notification.email.companyAddress"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.supportEmail"),children:e.jsx(F,{name:"supportEmail",control:u,rules:{validate:s?v:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",type:"email",error:!!t.errors[C.name],label:A("notification.email.supportEmail"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})})]})]}),e.jsxs(O,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(Q,{variant:"outlined",loading:y,color:"warning",onClick:f(l),disabled:!s||y,children:A("common.runTest")}),e.jsx(Q,{type:"submit",variant:"contained",loading:y,disabled:!t.isDirty||y,children:A("common.save")})]})]}),j]})}const Wi=je(re)``,pt={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function Zi(){const{api:k}=se(),{blocklet:_}=le(),{t:A}=ee(),{confirmApi:R,confirmHolder:j}=Ie(),[y,x]=q.useState(!1),o=_?.meta?.did,p=Object.assign({...pt},_?.settings?.notification?.pushKit||{}),{handleSubmit:f,control:u,formState:t,watch:a,reset:r}=ge({defaultValues:we(p,Object.keys(pt))}),n=xe({testReceiver:"",testReceiverError:""}),s=a("enabled"),c=T(async(g,w,S=!0)=>{try{x(!0);const{blocklet:m}=await k.configNotification({input:{did:o,notification:JSON.stringify({pushKit:g})}}),v=Object.assign({...pt},m?.settings?.notification?.pushKit||{});r(v),S&&Z.success(A("common.saveSuccess"))}catch(m){if(S)Z.error(m.message||A("common.saveFailed"));else throw m}finally{x(!1)}}),i=T(async(g,w)=>{try{x(!0),t.isDirty&&await c(g,w,!1);const S=(_?.configs||[]).find(b=>b.key==="BLOCKLET_APP_URL")?.value,m=Xs(Se(S,G.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:_?.meta?.version,t:new Date(_?.updatedAt||0).getTime()}),v={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:_?.appDid,fullName:_?.meta?.title,avatar:m}}}};await k.sendPush({input:{did:o,receiver:n.testReceiver,notification:JSON.stringify(v)}}),Z.success(A("notification.pushKit.testSuccess"))}catch(S){Z.error(S.message||A("notification.pushKit.testfailed"))}finally{x(!1)}}),l=T((g,w)=>{n.testReceiverError="",R.open({title:A("notification.pushKit.testSend"),content:()=>e.jsx(O,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(V,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.pushKit.inputTestReceiver"),value:n.testReceiver,onChange:S=>{n.testReceiver=S.target.value},error:!!n.testReceiverError,helperText:n.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm(S){if(!n.testReceiver?.trim()){n.testReceiverError=A("notification.pushKit.receiverRequired");return}n.testReceiverError="",await i(g,w),S()},onCancel:()=>{x(!1)}})}),d=T(g=>{const w=g?.trim();return w?Rt(w)?!0:A("notification.pushKit.endpointInvalid"):A("notification.pushKit.endpointRequired")}),h=T(()=>!0);return e.jsxs(O,{children:[e.jsxs(Vi,{component:"form",onSubmit:f(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(B,{title:A("notification.pushKit.enable"),my:2.5,children:e.jsx(F,{name:"enabled",control:u,render:({field:g})=>e.jsx(oe,{control:e.jsx(pe,{checked:g.value,...g})})})}),e.jsx(B,{title:A("notification.pushKit.endpoint"),children:e.jsx(F,{name:"endpoint",control:u,rules:{validate:s?d:h},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",required:!0,label:A("notification.pushKit.endpoint"),error:!!t.errors[g.name],helperText:t.errors[g.name]?.message||" ",disabled:!s})})})}),e.jsxs(B,{title:A("notification.pushKit.customOptions"),children:[e.jsx(F,{name:"did",control:u,render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:A("notification.pushKit.did"),error:!!t.errors[g.name],helperText:t.errors[g.name]?.message||" ",disabled:!s})})}),e.jsx(F,{name:"pushPath",control:u,render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:A("notification.pushKit.pushPath"),error:!!t.errors[g.name],helperText:t.errors[g.name]?.message||" ",disabled:!s})})})]}),e.jsxs(O,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(Q,{variant:"outlined",loading:y,color:"warning",onClick:f(l),disabled:!s||y,children:A("common.runTest")}),e.jsx(Q,{type:"submit",variant:"contained",loading:y,disabled:!t.isDirty||y,children:A("common.save")})]})]}),j]})}const Vi=je(re)``,an=[{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"},{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Wallet"}),value:"wallet"},{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Webhooks"}),value:"webhooks"}];function Ui(){const[k,_]=q.useState(an[0].value),{t:A}=q.useContext(fe),R=be(()=>({email:e.jsx(Fi,{}),pushKit:e.jsx(Zi,{}),wallet:e.jsx(J,{variant:"body1",children:A("notification.wallet.description")}),webhooks:e.jsx(J,{variant:"body1",children:A("notification.webhooks.description")})}),[A]),j=q.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(O,{children:[e.jsx(Ue,{variant:"card",tabs:an,current:k,onChange:_}),e.jsx(O,{style:j,children:R[k]})]})}const gt={domain:"",clientId:"",clientSecret:""};function Wn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...gt},j?.settings?.authentication?.auth0||{}),f=(j.environments||[]).find(h=>h.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(gt))}),n=T(async h=>{try{const{blocklet:g}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,auth0:{...h,order:A.auth0?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),w=Object.assign({...gt},g?.settings?.authentication?.auth0||{});r(w),Z.success(y("common.saveSuccess")),_()}catch(g){Z.error(g.message||y("common.saveFailed"))}}),s=T(h=>h?.trim()?!0:y("authentication.auth0.domainDescription")),c=T(h=>h?.trim()?!0:y("authentication.auth0.clientIdDescription")),i=T(h=>h?.trim()?!0:y("authentication.auth0.clientSecretDescription")),l=be(()=>x==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[x]),d=Se(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/auth0");return q.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(B,{title:y("authentication.viewDocument"),children:e.jsxs(O,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[l,e.jsx(O,{component:ae,icon:Mt,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[d,e.jsx(Ge,{locale:x,content:d,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.auth0.domain"),children:e.jsx(F,{name:"domain",control:t,rules:{validate:s},render:({field:h})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...h,size:"small",label:y("authentication.auth0.domain"),error:!!a.errors[h.name],helperText:a.errors[h.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.auth0.clientId"),children:e.jsx(F,{name:"clientId",control:t,rules:{validate:c},render:({field:h})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...h,size:"small",label:y("authentication.auth0.clientId"),error:!!a.errors[h.name],helperText:a.errors[h.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.auth0.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:t,rules:{validate:i},render:({field:h})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...h,size:"small",type:"password",label:y("authentication.auth0.clientSecret"),error:!!a.errors[h.name],helperText:a.errors[h.name]?.message||" "})})})})]})})}Wn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const xt={clientId:"",clientSecret:""};function Zn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...xt},j?.settings?.authentication?.github||{}),f=(j.environments||[]).find(d=>d.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(xt))}),n=T(async d=>{try{const{blocklet:h}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,github:{...d,order:A.github?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),g=Object.assign({...xt},h?.settings?.authentication?.github||{});r(g),Z.success(y("common.saveSuccess")),_()}catch(h){Z.error(h.message||y("common.saveFailed"))}}),s=T(d=>d?.trim()?!0:y("authentication.github.clientIdDescription")),c=T(d=>d?.trim()?!0:y("authentication.github.clientSecretDescription")),i=be(()=>x==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[x]),l=Se(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/github");return q.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{disabled:!0,children:[e.jsx(B,{title:y("authentication.viewDocument"),children:e.jsxs(O,{component:"a",href:i,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[i,e.jsx(O,{component:ae,icon:Mt,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ge,{locale:x,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.github.clientId"),children:e.jsx(F,{name:"clientId",control:t,rules:{validate:s},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...d,size:"small",label:y("authentication.github.clientId"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.github.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...d,size:"small",type:"password",label:y("authentication.github.clientSecret"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})})]})})}Zn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const yt={showQrcode:!0};function Vn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y}=ee(),x=j?.meta?.did,o=Object.assign({...yt},j?.settings?.authentication?.wallet||{}),{handleSubmit:p,control:f,reset:u}=ge({defaultValues:we(o,Object.keys(yt))}),t=T(async a=>{try{const{blocklet:r}=await R.configAuthentication({input:{did:x,authentication:JSON.stringify({...A,wallet:{...a,order:A.wallet?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),n=Object.assign({...yt},r?.settings?.authentication?.wallet||{});u(n),Z.success(y("common.saveSuccess")),_()}catch(r){Z.error(r.message||y("common.saveFailed"))}});return q.useImperativeHandle(k,()=>({submit:p(t)}),[p,t]),e.jsx(O,{children:e.jsx("form",{children:e.jsx(B,{title:y("authentication.wallet.showQrcode"),children:e.jsx(F,{name:"showQrcode",control:f,render:({field:a})=>e.jsx(oe,{control:e.jsx(Hr,{sx:{ml:1},checked:a.value,...a})})})})})})}Vn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};function Un({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y}=ee(),x=j?.meta?.did,o=T(async()=>{try{await R.configAuthentication({input:{did:x,authentication:JSON.stringify({...A,email:{order:A.email?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),Z.success(y("common.saveSuccess")),_()}catch(p){Z.error(p.message||y("common.saveFailed"))}});return q.useImperativeHandle(k,()=>({submit:o}),[o]),e.jsxs(O,{children:[y("authentication.emailLoginDescription"),e.jsx("br",{}),y("authentication.emailNotificationRequired"),e.jsx("br",{}),e.jsx(O,{component:Qs,to:Se(G.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/notification/settings"),sx:{mt:1,display:"inline-block"},children:e.jsx(ie,{size:"small",variant:"outlined",children:y("authentication.gotoEmailNotification")})})]})}Un.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};function Kn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y}=ee(),x=j?.meta?.did,o=T(async()=>{try{await R.configAuthentication({input:{did:x,authentication:JSON.stringify({...A,passkey:{order:A.passkey?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),Z.success(y("common.saveSuccess")),_()}catch(p){Z.error(p.message||y("common.saveFailed"))}});return q.useImperativeHandle(k,()=>({submit:o}),[o]),null}Kn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const vt={clientId:"",clientSecret:""};function Gn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...vt},j?.settings?.authentication?.google||{}),f=(j.environments||[]).find(d=>d.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(vt))}),n=T(async d=>{try{const{blocklet:h}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,google:{...d,order:A.google?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),g=Object.assign({...vt},h?.settings?.authentication?.google||{});r(g),Z.success(y("common.saveSuccess")),_()}catch(h){Z.error(h.message||y("common.saveFailed"))}}),s=T(d=>d?.trim()?!0:y("authentication.google.clientIdDescription")),c=T(d=>d?.trim()?!0:y("authentication.google.clientSecretDescription")),i=be(()=>x==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[x]),l=Se(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/google");return q.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(B,{title:y("authentication.viewDocument"),children:e.jsxs(O,{component:"a",href:i,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[i,e.jsx(O,{component:ae,icon:Mt,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ge,{locale:x,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.google.clientId"),children:e.jsx(F,{name:"clientId",control:t,rules:{validate:s},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...d,size:"small",label:y("authentication.google.clientId"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.google.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...d,size:"small",type:"password",label:y("authentication.google.clientSecret"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})})]})})}Gn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const bt={teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function Yn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...bt},j?.settings?.authentication?.apple||{}),f=(j.environments||[]).find(g=>g.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(bt))}),n=T(async g=>{try{const{blocklet:w}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,apple:{...g,order:A.apple?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),S=Object.assign({...bt},w?.settings?.authentication?.apple||{});r(S),Z.success(y("common.saveSuccess")),_()}catch(w){Z.error(w.message||y("common.saveFailed"))}}),s=T(g=>g?.trim()?!0:y("authentication.apple.teamIdDescription")),c=T(g=>g?.trim()?!0:y("authentication.apple.serviceIdDescription")),i=T(g=>g?.trim()?!0:y("authentication.apple.keyIdDescription")),l=T(g=>g?.trim()?!0:y("authentication.apple.authKeyDescription")),d=T(g=>g?.trim()?!0:y("authentication.apple.bundleIdDescription")),h=Se(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/apple");return q.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{children:[e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[h,e.jsx(Ge,{locale:x,content:h,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.apple.teamId"),children:e.jsx(F,{name:"teamId",control:t,rules:{validate:s},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:y("authentication.apple.teamId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.apple.bundleId"),children:e.jsx(F,{name:"bundleId",control:t,rules:{validate:d},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:y("authentication.apple.bundleId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.apple.serviceId"),children:e.jsx(F,{name:"serviceId",control:t,rules:{validate:c},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:y("authentication.apple.serviceId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.apple.keyId"),children:e.jsx(F,{name:"keyId",control:t,rules:{validate:i},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:y("authentication.apple.keyId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.apple.authKey"),children:e.jsx(F,{name:"authKey",control:t,rules:{validate:l},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",type:"password",label:y("authentication.apple.authKey"),multiline:!0,rows:4,error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" ",slotProps:{input:{sx:{WebkitTextSecurity:"disc",fontFamily:"text-security-disc, monospace"}}}})})})})]})})}Yn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const jt={clientId:"",clientSecret:""};function Jn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...jt},j?.settings?.authentication?.twitter||{}),f=(j.environments||[]).find(l=>l.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(jt))}),n=T(async l=>{try{const{blocklet:d}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,twitter:{...l,order:A.twitter?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),h=Object.assign({...jt},d?.settings?.authentication?.twitter||{});r(h),Z.success(y("common.saveSuccess")),_()}catch(d){Z.error(d.message||y("common.saveFailed"))}}),s=T(l=>l?.trim()?!0:y("authentication.twitter.clientIdDescription")),c=T(l=>l?.trim()?!0:y("authentication.twitter.clientSecretDescription")),i=Se(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/twitter");return q.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[i,e.jsx(Ge,{locale:x,content:i,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.twitter.clientId"),children:e.jsx(F,{name:"clientId",control:t,rules:{validate:s},render:({field:l})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...l,size:"small",label:y("authentication.twitter.clientId"),error:!!a.errors[l.name],helperText:a.errors[l.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.twitter.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:t,rules:{validate:c},render:({field:l})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...l,size:"small",type:"password",label:y("authentication.twitter.clientSecret"),error:!!a.errors[l.name],helperText:a.errors[l.name]?.message||" "})})})})]})})}Jn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const Ki={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'},ot={width:24,height:24,body:'<path fill="currentColor" d="M7 21q-.825 0-1.413-.588T5 19V6q-.425 0-.713-.288T4 5q0-.425.288-.713T5 4h4q0-.425.288-.713T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z"/>'},lt={width:24,height:24,body:'<path fill="currentColor" d="M4 21q-.425 0-.713-.288T3 20v-2.425q0-.4.15-.763t.425-.637L16.2 3.575q.3-.275.663-.425t.762-.15q.4 0 .775.15t.65.45L20.425 5q.3.275.437.65T21 6.4q0 .4-.138.763t-.437.662l-12.6 12.6q-.275.275-.638.425t-.762.15H4ZM17.6 7.8L19 6.4L17.6 5l-1.4 1.4l1.4 1.4Z"/>'};function Xn({id:k,title:_,index:A,onBegin:R=te,onMove:j,onEnd:y,onEditItem:x=te,onDeleteItem:o=te,disableDelete:p=!1,icon:f=null}){const u=q.useRef(null),t=q.useRef(null),[{handlerId:a},r]=Nr({accept:"dragItem",collect(i){return{handlerId:i.getHandlerId()}},hover(i,l){if(!u.current)return;const d=i.index,h=A;if(d===h)return;const g=u.current?.getBoundingClientRect(),w=t.current?.getBoundingClientRect(),S=(w.bottom-w.top)/2,v=l.getClientOffset().y-g.top;d<h&&v<S||d>h&&v>S||(j(d,h),i.index=h)}}),[{isDragging:n},s]=Fr({item:{index:A,type:"dragItem"},collect:i=>({isDragging:i.isDragging()}),begin:R,end:y});s(t),r(u);const c=n?.3:1;return e.jsx(O,{ref:u,children:e.jsxs(O,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:t,"data-handler-id":a,children:[e.jsxs(O,{sx:{py:2,px:1,opacity:c,display:"flex",alignItems:"center",gap:.5},draggable:!1,children:[e.jsx(O,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(ae,{fontSize:20,icon:Ki})}),e.jsx(O,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:f}),e.jsx(J,{sx:{flex:1},children:_}),e.jsx(ue,{size:"small",color:"primary",onClick:()=>{x(k)},children:e.jsx(ae,{icon:lt})}),e.jsx(ue,{size:"small",color:"error",onClick:()=>{o(k)},disabled:p,children:e.jsx(ae,{icon:ot})})]}),e.jsx(ne,{})]})})}Xn.propTypes={title:E.string.isRequired,id:E.string.isRequired,index:E.number.isRequired,onBegin:E.func,onMove:E.func.isRequired,onEnd:E.func.isRequired,onEditItem:E.func,onDeleteItem:E.func,disableDelete:E.bool,icon:E.any};function Qn({ref:k=null,providers:_=[],sortMaps:A={}}){const R=q.useRef(null),{t:j}=q.useContext(fe),y=$e(),{control:x,watch:o,setValue:p,reset:f}=ge({mode:"onChange",defaultValues:{provider:""}}),u=o("provider"),t=_.find(h=>h.name===u),a=er(t),r=y?.transitions?.duration?.leavingScreen||300,n=xe({initMode:"add",mode:"add",show:!1,callback:te,get dialogTitle(){return this.mode==="edit"?j("authentication.updateLoginProvider",{provider:a.current?.title}):j("authentication.addLoginProvider")}}),s=T(()=>{f(),n.mode="add",n.initMode="add"}),c=T(()=>{n.show=!1,setTimeout(()=>{s()},r)}),i=T((h,g=null)=>{if(n.show=!0,g)n.initMode="edit",n.mode="edit",p("provider",g.provider);else{const w=_.find(S=>S.enabled===!1)?.name||_[0]?.name||he.WALLET;p("provider",w)}h?n.callback=h:n.callback=te});q.useImperativeHandle(k,()=>({open:i,close:c}),[i,c]);const l=T(()=>{R.current.submit()}),d=_.map(h=>({value:h.name,title:h.title,description:h.enabled?j("common.enabled"):""}));return q.useEffect(()=>{t?.enabled?n.mode="edit":n.mode="add"},[t?.enabled]),e.jsxs(ke,{open:n.show,title:n.dialogTitle,onClose:c,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:l,disabled:!u,children:n.mode==="add"?j("common.confirm"):j("common.update")}),children:[n.initMode==="edit"?null:e.jsx(F,{name:"provider",control:x,render:({field:h})=>e.jsx(nt,{required:!0,fullWidth:!0,margin:"dense",size:"small",label:j("authentication.chooseProvider"),placeholder:j("authentication.chooseProviderPlaceholder"),options:d,...Oe(h,"ref"),slotProps:{optionItem:{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"}}}})}),e.jsx(O,{sx:{mt:2,".section":{mb:1,gap:4},".section-left":{width:150}},children:t?.component&&e.jsx(t.component,{ref:R,onSuccess:c,sortMaps:A})})]})}Qn.propTypes={ref:E.any,providers:E.array,sortMaps:E.object};function Gi(){const{confirmApi:k,confirmHolder:_}=Ie(),A=q.useRef(),{t:R}=ee(),{api:j}=se(),{blocklet:y}=le(),x=y?.meta?.did,o=y?.settings?.authentication||{},p=[{name:he.WALLET,title:_e[he.WALLET],icon:e.jsx(Ae,{provider:"wallet",sx:{width:20,height:20,scale:.9}}),component:Vn},{name:he.EMAIL,title:_e[he.EMAIL],icon:e.jsx(Ae,{provider:"email",sx:{width:20,height:20,scale:.9}}),component:Un},{name:he.PASSKEY,title:_e[he.PASSKEY],icon:e.jsx(Ae,{provider:"passkey",sx:{width:20,height:20,scale:.9}}),component:Kn},{name:he.GOOGLE,title:_e[he.GOOGLE],icon:e.jsx(Ae,{provider:"google",sx:{width:20,height:20}}),component:Gn},{name:he.APPLE,title:_e[he.APPLE],icon:e.jsx(Ae,{provider:"apple",sx:{width:20,height:20}}),component:Yn},{name:he.GITHUB,title:_e[he.GITHUB],icon:e.jsx(Ae,{provider:"github",sx:{width:20,height:20}}),component:Zn},{name:he.TWITTER,title:_e[he.TWITTER],icon:e.jsx(Ae,{provider:"twitter",sx:{width:20,height:20}}),component:Jn},{name:he.AUTH0,title:_e[he.AUTH0],icon:e.jsx(Ae,{provider:"auth0",sx:{width:20,height:20}}),component:Wn,hidden:!0}].map(h=>({...h,enabled:o[h.name]?.enabled??!1,order:o[h.name]?.order??null})),f=p.filter(h=>h.enabled),u=f.sort((h,g)=>!ze(h?.order)&&!ze(g?.order)?h.order-g.order:ze(h?.order)?1:-1),t=u.reduce((h,g,w)=>Object.assign(h,{[g.name]:{order:w}}),{}),a=xe(u.reduce((h,g,w)=>Object.assign(h,{[g.name]:w}),{})),r=[...f].sort((h,g)=>a[h.name]-a[g.name]),n={};typeof window<"u"&&(n.context=window);const s=T((h,g)=>{const w=r[h],S=r[g];a[w.name]=g,a[S.name]=h}),c=T(async()=>{const h=Object.keys(a).reduce((g,w)=>(g[w]={order:a[w]},g),{});await j.configAuthentication({input:{did:x,authentication:JSON.stringify(h)}})}),i=()=>{A.current.open(()=>{A.current.close()})},l=T(h=>{A.current.open(te,{provider:h})}),d=T(h=>{k.open({title:R("authentication.deleteLoginProvider",{provider:_e[h]}),content:R("authentication.deleteLoginProviderDescription",{provider:_e[h]}),confirmButtonText:R("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:R("common.cancel"),async onConfirm(g){try{await j.configAuthentication({input:{did:x,authentication:JSON.stringify({[h]:{enabled:!1,order:null}})}}),delete a[h],Z.success(R("common.deleteSuccess")),g()}catch(w){Z.error(w.message||R("common.deleteFailed"))}}})});return e.jsxs(O,{children:[e.jsx(Q,{variant:"contained",onClick:i,sx:{mb:1},children:R("authentication.addLoginProvider")}),e.jsx(Wr,{backend:Zr,...n,children:r.map((h,g)=>e.jsx(Xn,{index:g,id:h.name,title:h.title,icon:h.icon,onMove:s,onEnd:c,onEditItem:l,onDeleteItem:d,disableDelete:u.length<=1,children:h.component},h.name))}),e.jsx(Qn,{ref:A,providers:p,sortMaps:t}),_]})}const Te={ttl:G.SESSION_TTL,cacheTtl:G.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function ye(k){return e.jsx(Cn,{...k,sx:{transform:"scale(0.75)"}})}function _t(k,_=!1){const A=_?k.ttl*86400:k.ttl/86400;return{...k,ttl:A}}function Yi(){const{api:k}=se(),{blocklet:_}=le(),A=_?.meta?.did,R=gn({},Te,_?.settings?.session||{});ze(R.ttl)&&(R.ttl=Te.ttl),ze(R.cacheTtl)&&(R.cacheTtl=Te.cacheTtl),R.phone||(R.phone=Te.phone),R.email||(R.email=Te.email),ze(R.enableBlacklist)&&(R.enableBlacklist=Te.enableBlacklist);const{handleSubmit:j,control:y,formState:x,reset:o,watch:p}=ge({defaultValues:we(_t(R),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:f}=ee(),u=p("email.enabled"),t=p("phone.enabled"),a=p("email.enableDomainBlackList"),r=p("email.enableDomainWhiteList"),{fields:n,append:s,remove:c}=Jt({control:y,name:"email.domainBlackList"}),{fields:i,append:l,remove:d}=Jt({control:y,name:"email.domainWhiteList"}),h=T(async g=>{try{const{blocklet:w}=await k.updateAppSessionConfig({input:{did:A,config:Oe(_t(g,!0),["phone"])}}),S=Object.assign({},Te,we(w?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));o(_t(S)),Z.success(f("common.configSuccess"))}catch(w){Z.error(w.message)}});return e.jsx(Ji,{onSubmit:j(h),children:e.jsxs(re,{direction:"column",sx:{gap:6},children:[e.jsxs(O,{children:[e.jsxs(O,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.profile")}),e.jsx(O,{component:ne,sx:{my:3}})]}),e.jsxs(re,{sx:{gap:2},children:[e.jsx(B,{title:f("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(B,{title:f("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(B,{title:f("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.enabled",control:y,render:({field:g})=>e.jsx(ye,{...g,checked:g.value})})})}),u&&e.jsxs(re,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(B,{title:f("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.requireVerified",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),e.jsx(B,{title:f("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.requireUnique",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),e.jsx(B,{title:f("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.trustOauthProviders",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),e.jsx(B,{title:f("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.enableDomainBlackList",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),a&&e.jsxs(O,{children:[n.map((g,w)=>e.jsxs(re,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(F,{name:`email.domainBlackList.${w}`,control:y,render:S=>e.jsx(V,{...S.field,size:"small",fullWidth:!0})}),e.jsx(ue,{onClick:()=>c(w),children:e.jsx(Xt,{})})]},g.id)),e.jsx(ie,{startIcon:e.jsx($t,{}),onClick:()=>s(""),children:f("blocklet.config.session.addDomain")})]}),e.jsx(B,{title:f("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.enableDomainWhiteList",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),r&&e.jsxs(O,{children:[i.map((g,w)=>e.jsxs(re,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(F,{name:`email.domainWhiteList.${w}`,control:y,render:S=>e.jsx(V,{...S.field,size:"small",fullWidth:!0})}),e.jsx(ue,{onClick:()=>d(w),children:e.jsx(Xt,{})})]},g.id)),e.jsx(ie,{startIcon:e.jsx($t,{}),onClick:()=>l(""),children:f("blocklet.config.session.addDomain")})]})]}),e.jsxs(O,{sx:{display:"none"},children:[e.jsx(B,{title:f("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"phone.enabled",control:y,disabled:!0,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),t&&e.jsxs(re,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(B,{title:f("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"phone.requireVerified",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),e.jsx(B,{title:f("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"phone.requireUnique",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})})]})]})]})]}),e.jsxs(O,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.period")}),e.jsx(O,{component:ne,sx:{my:3}}),e.jsx(re,{direction:"column",spacing:2,children:e.jsx(F,{name:"ttl",control:y,rules:{min:1,max:30},render:({field:g})=>e.jsx(K,{fullWidth:!0,sx:{mb:2},children:e.jsx(B,{title:f("blocklet.config.session.ttl",{day:g.value}),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(qr,{...g,defaultValue:7,step:1,marks:[{value:1,label:f("blocklet.config.session.day",{day:1})},{value:7,label:f("blocklet.config.session.days",{day:7})},{value:14,label:f("blocklet.config.session.days",{day:14})},{value:21,label:f("blocklet.config.session.days",{day:21})},{value:30,label:f("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(O,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.experimentalSettings")}),e.jsx(O,{component:ne,sx:{my:3}}),e.jsx(re,{direction:"column",spacing:2,children:e.jsx(B,{title:f("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"enableBlacklist",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})})})]}),e.jsx(O,{children:e.jsx(ie,{type:"submit",variant:"contained",disabled:!x.isDirty,children:f("common.save")})})]})})}const Ji=je.form`
|
|
82
|
+
`;var Je={exports:{}},Xe={exports:{}},Qe={exports:{}},rn;function zi(){return rn||(rn=1,function(k,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=A;function A(R){return R==null}k.exports=_.default,k.exports.default=_.default}(Qe,Qe.exports)),Qe.exports}var an;function Mi(){return an||(an=1,function(k,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=o;var A=j(Qs()),R=j(zi());function j(p){return p&&p.__esModule?p:{default:p}}var y=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,x=/^[-+]?[0-9]+$/;function o(p,f){(0,A.default)(p),f=f||{};var u=f.allow_leading_zeroes===!1?y:x,t=!f.hasOwnProperty("min")||(0,R.default)(f.min)||p>=f.min,a=!f.hasOwnProperty("max")||(0,R.default)(f.max)||p<=f.max,r=!f.hasOwnProperty("lt")||(0,R.default)(f.lt)||p<f.lt,n=!f.hasOwnProperty("gt")||(0,R.default)(f.gt)||p>f.gt;return u.test(p)&&t&&a&&r&&n}k.exports=_.default,k.exports.default=_.default}(Xe,Xe.exports)),Xe.exports}var on;function Bi(){return on||(on=1,function(k,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=j;var A=R(Mi());function R(y){return y&&y.__esModule?y:{default:y}}function j(y){return(0,A.default)(y,{allow_leading_zeroes:!1,min:0,max:65535})}k.exports=_.default,k.exports.default=_.default}(Je,Je.exports)),Je.exports}var Hi=Bi();const Ni=pn(Hi),ft={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Fi(){const{api:k}=se(),{blocklet:_}=le(),{t:A}=ee(),{confirmApi:R,confirmHolder:j}=Ie(),[y,x]=z.useState(!1),o=_?.meta?.did,p=Object.assign({...ft},_?.settings?.notification?.email||{}),{handleSubmit:f,control:u,formState:t,watch:a,reset:r}=ge({defaultValues:we(p,Object.keys(ft))}),n=xe({testReceiver:"",testReceiverError:""}),s=a("enabled"),c=T(async(C,P,$=!0)=>{try{x(!0);const{blocklet:D}=await k.configNotification({input:{did:o,notification:JSON.stringify({email:C})}}),M=Object.assign({...ft},D?.settings?.notification?.email||{});r(M),$&&Z.success(A("common.saveSuccess"))}catch(D){if($)Z.error(D.message||A("common.saveFailed"));else throw D}finally{x(!1)}}),i=T(async(C,P,$)=>{try{x(!0),t.isDirty&&await c(C,P,!1),await k.sendEmail({input:{did:o,receiver:$,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),Z.success(A("notification.email.testSuccess"))}catch(D){Z.error(D.message||A("notification.email.testfailed"))}finally{x(!1)}}),l=T((C,P)=>{n.testReceiver=localStorage.getItem("test-receiver")||"",n.testReceiverError="",R.open({title:A("notification.email.testSendEmail"),content:()=>e.jsx(O,{sx:{width:"300px"},children:e.jsx(V,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.email.inputTestReceiver"),value:n.testReceiver,onChange:$=>{n.testReceiver=$.target.value},error:!!n.testReceiverError,helperText:n.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm($){const D=n.testReceiver?.trim();if(!D){n.testReceiverError=A("notification.email.receiverRequired");return}if(!ut(D)){n.testReceiverError=A("notification.email.receiverInvalid");return}n.testReceiverError="",await i(C,P,D),$()},onCancel:()=>{x(!1)}})}),d=T(C=>{const P=C?.trim();return P?ut(P)?!0:A("notification.email.fromInvalid"):A("notification.email.fromRequired")}),h=T(C=>{const P=C?.trim();return P?Rt(P,{require_host:!1,protocols:[]})?!0:A("notification.email.hostInvalid"):A("notification.email.hostRequired")}),g=T(C=>C?Ni(C)?!0:A("notification.email.portInvalid"):A("notification.email.portRequired")),w=T(C=>C?.trim()?!0:A("notification.email.userRequired")),S=T(C=>C?.trim()?!0:A("notification.email.passwordRequired")),m=T(C=>C?.trim()&&!Rt(C,{protocols:["http","https"],require_protocol:!0})?A("notification.email.linkInvalid"):!0),v=T(C=>C?.trim()&&!ut(C)?A("notification.email.emailInvalid"):!0),b=T(()=>!0);return e.jsxs(O,{children:[e.jsxs(Wi,{component:"form",onSubmit:f(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(B,{title:A("notification.email.enable"),my:2.5,children:e.jsx(F,{name:"enabled",control:u,render:({field:C})=>e.jsx(oe,{control:e.jsx(pe,{checked:C.value,...C})})})}),e.jsx(B,{title:A("notification.email.from"),children:e.jsx(F,{name:"from",control:u,rules:{validate:s?d:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,label:A("notification.email.from"),error:!!t.errors[C.name],helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.host"),children:e.jsx(F,{name:"host",control:u,rules:{validate:s?h:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,error:!!t.errors[C.name],label:A("notification.email.host"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.port"),children:e.jsx(F,{name:"port",control:u,rules:{validate:s?g:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,type:"number",error:!!t.errors[C.name],label:A("notification.email.port"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.user"),children:e.jsx(F,{name:"user",control:u,rules:{validate:s?w:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,error:!!t.errors[C.name],label:A("notification.email.user"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.password"),children:e.jsx(F,{name:"password",control:u,rules:{validate:s?S:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",required:!0,type:"password",error:!!t.errors[C.name],label:A("notification.email.password"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.secure"),children:e.jsx(F,{name:"secure",control:u,rules:{validate:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(oe,{control:e.jsx(pe,{checked:C.value,...C,disabled:!s})})})})}),e.jsxs(Sr,{children:[e.jsxs(Cr,{expandIcon:e.jsx(Rr,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[A("notification.email.signature"),e.jsx(ce,{title:A("notification.email.signatureTooltip"),children:e.jsx(Qr,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(Ar,{children:[e.jsx(B,{title:A("notification.email.companyName"),children:e.jsx(F,{name:"companyName",control:u,rules:{validate:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",error:!!t.errors[C.name],label:A("notification.email.companyName"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.companyLink"),children:e.jsx(F,{name:"companyLink",control:u,rules:{validate:s?m:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",error:!!t.errors[C.name],label:A("notification.email.companyLink"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.companyAddress"),children:e.jsx(F,{name:"companyAddress",control:u,rules:{validate:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",error:!!t.errors[C.name],label:A("notification.email.companyAddress"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(B,{title:A("notification.email.supportEmail"),children:e.jsx(F,{name:"supportEmail",control:u,rules:{validate:s?v:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...C,size:"small",type:"email",error:!!t.errors[C.name],label:A("notification.email.supportEmail"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})})]})]}),e.jsxs(O,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(Q,{variant:"outlined",loading:y,color:"warning",onClick:f(l),disabled:!s||y,children:A("common.runTest")}),e.jsx(Q,{type:"submit",variant:"contained",loading:y,disabled:!t.isDirty||y,children:A("common.save")})]})]}),j]})}const Wi=je(re)``,pt={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function Zi(){const{api:k}=se(),{blocklet:_}=le(),{t:A}=ee(),{confirmApi:R,confirmHolder:j}=Ie(),[y,x]=z.useState(!1),o=_?.meta?.did,p=Object.assign({...pt},_?.settings?.notification?.pushKit||{}),{handleSubmit:f,control:u,formState:t,watch:a,reset:r}=ge({defaultValues:we(p,Object.keys(pt))}),n=xe({testReceiver:"",testReceiverError:""}),s=a("enabled"),c=T(async(g,w,S=!0)=>{try{x(!0);const{blocklet:m}=await k.configNotification({input:{did:o,notification:JSON.stringify({pushKit:g})}}),v=Object.assign({...pt},m?.settings?.notification?.pushKit||{});r(v),S&&Z.success(A("common.saveSuccess"))}catch(m){if(S)Z.error(m.message||A("common.saveFailed"));else throw m}finally{x(!1)}}),i=T(async(g,w)=>{try{x(!0),t.isDirty&&await c(g,w,!1);const S=(_?.configs||[]).find(b=>b.key==="BLOCKLET_APP_URL")?.value,m=At(ke(S,G.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:_?.meta?.version,t:new Date(_?.updatedAt||0).getTime()}),v={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:_?.appDid,fullName:_?.meta?.title,avatar:m}}}};await k.sendPush({input:{did:o,receiver:n.testReceiver,notification:JSON.stringify(v)}}),Z.success(A("notification.pushKit.testSuccess"))}catch(S){Z.error(S.message||A("notification.pushKit.testfailed"))}finally{x(!1)}}),l=T((g,w)=>{n.testReceiverError="",R.open({title:A("notification.pushKit.testSend"),content:()=>e.jsx(O,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(V,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.pushKit.inputTestReceiver"),value:n.testReceiver,onChange:S=>{n.testReceiver=S.target.value},error:!!n.testReceiverError,helperText:n.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm(S){if(!n.testReceiver?.trim()){n.testReceiverError=A("notification.pushKit.receiverRequired");return}n.testReceiverError="",await i(g,w),S()},onCancel:()=>{x(!1)}})}),d=T(g=>{const w=g?.trim();return w?Rt(w)?!0:A("notification.pushKit.endpointInvalid"):A("notification.pushKit.endpointRequired")}),h=T(()=>!0);return e.jsxs(O,{children:[e.jsxs(Vi,{component:"form",onSubmit:f(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(B,{title:A("notification.pushKit.enable"),my:2.5,children:e.jsx(F,{name:"enabled",control:u,render:({field:g})=>e.jsx(oe,{control:e.jsx(pe,{checked:g.value,...g})})})}),e.jsx(B,{title:A("notification.pushKit.endpoint"),children:e.jsx(F,{name:"endpoint",control:u,rules:{validate:s?d:h},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",required:!0,label:A("notification.pushKit.endpoint"),error:!!t.errors[g.name],helperText:t.errors[g.name]?.message||" ",disabled:!s})})})}),e.jsxs(B,{title:A("notification.pushKit.customOptions"),children:[e.jsx(F,{name:"did",control:u,render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:A("notification.pushKit.did"),error:!!t.errors[g.name],helperText:t.errors[g.name]?.message||" ",disabled:!s})})}),e.jsx(F,{name:"pushPath",control:u,render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:A("notification.pushKit.pushPath"),error:!!t.errors[g.name],helperText:t.errors[g.name]?.message||" ",disabled:!s})})})]}),e.jsxs(O,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(Q,{variant:"outlined",loading:y,color:"warning",onClick:f(l),disabled:!s||y,children:A("common.runTest")}),e.jsx(Q,{type:"submit",variant:"contained",loading:y,disabled:!t.isDirty||y,children:A("common.save")})]})]}),j]})}const Vi=je(re)``,Dt=[{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"},{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Wallet"}),value:"wallet"},{label:e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:"Webhooks"}),value:"webhooks"}],Ui=Dt.map(k=>k.value);function Ki(){const{t:k}=z.useContext(fe),[_,A]=xn(),R=_.get("type"),j=Ui.includes(R)?R:Dt[0].value,y=be(()=>({email:e.jsx(Fi,{}),pushKit:e.jsx(Zi,{}),wallet:e.jsx(J,{variant:"body1",children:k("notification.wallet.description")}),webhooks:e.jsx(J,{variant:"body1",children:k("notification.webhooks.description")})}),[k]),x=T(p=>{_.set("type",p),A(_,{replace:!0})}),o=z.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(O,{children:[e.jsx(Ue,{variant:"card",tabs:Dt,current:j,onChange:x}),e.jsx(O,{style:o,children:y[j]})]})}const gt={domain:"",clientId:"",clientSecret:""};function Vn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...gt},j?.settings?.authentication?.auth0||{}),f=(j.environments||[]).find(h=>h.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(gt))}),n=T(async h=>{try{const{blocklet:g}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,auth0:{...h,order:A.auth0?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),w=Object.assign({...gt},g?.settings?.authentication?.auth0||{});r(w),Z.success(y("common.saveSuccess")),_()}catch(g){Z.error(g.message||y("common.saveFailed"))}}),s=T(h=>h?.trim()?!0:y("authentication.auth0.domainDescription")),c=T(h=>h?.trim()?!0:y("authentication.auth0.clientIdDescription")),i=T(h=>h?.trim()?!0:y("authentication.auth0.clientSecretDescription")),l=be(()=>x==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-auth0":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-auth0",[x]),d=ke(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/auth0");return z.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(B,{title:y("authentication.viewDocument"),children:e.jsxs(O,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[l,e.jsx(O,{component:ae,icon:Ht,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[d,e.jsx(Ge,{locale:x,content:d,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.auth0.domain"),children:e.jsx(F,{name:"domain",control:t,rules:{validate:s},render:({field:h})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...h,size:"small",label:y("authentication.auth0.domain"),error:!!a.errors[h.name],helperText:a.errors[h.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.auth0.clientId"),children:e.jsx(F,{name:"clientId",control:t,rules:{validate:c},render:({field:h})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...h,size:"small",label:y("authentication.auth0.clientId"),error:!!a.errors[h.name],helperText:a.errors[h.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.auth0.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:t,rules:{validate:i},render:({field:h})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...h,size:"small",type:"password",label:y("authentication.auth0.clientSecret"),error:!!a.errors[h.name],helperText:a.errors[h.name]?.message||" "})})})})]})})}Vn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const xt={clientId:"",clientSecret:""};function Un({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...xt},j?.settings?.authentication?.github||{}),f=(j.environments||[]).find(d=>d.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(xt))}),n=T(async d=>{try{const{blocklet:h}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,github:{...d,order:A.github?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),g=Object.assign({...xt},h?.settings?.authentication?.github||{});r(g),Z.success(y("common.saveSuccess")),_()}catch(h){Z.error(h.message||y("common.saveFailed"))}}),s=T(d=>d?.trim()?!0:y("authentication.github.clientIdDescription")),c=T(d=>d?.trim()?!0:y("authentication.github.clientSecretDescription")),i=be(()=>x==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-github":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-github",[x]),l=ke(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/github");return z.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{disabled:!0,children:[e.jsx(B,{title:y("authentication.viewDocument"),children:e.jsxs(O,{component:"a",href:i,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[i,e.jsx(O,{component:ae,icon:Ht,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ge,{locale:x,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.github.clientId"),children:e.jsx(F,{name:"clientId",control:t,rules:{validate:s},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...d,size:"small",label:y("authentication.github.clientId"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.github.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...d,size:"small",type:"password",label:y("authentication.github.clientSecret"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})})]})})}Un.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const yt={showQrcode:!0};function Kn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y}=ee(),x=j?.meta?.did,o=Object.assign({...yt},j?.settings?.authentication?.wallet||{}),{handleSubmit:p,control:f,reset:u}=ge({defaultValues:we(o,Object.keys(yt))}),t=T(async a=>{try{const{blocklet:r}=await R.configAuthentication({input:{did:x,authentication:JSON.stringify({...A,wallet:{...a,order:A.wallet?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),n=Object.assign({...yt},r?.settings?.authentication?.wallet||{});u(n),Z.success(y("common.saveSuccess")),_()}catch(r){Z.error(r.message||y("common.saveFailed"))}});return z.useImperativeHandle(k,()=>({submit:p(t)}),[p,t]),e.jsx(O,{children:e.jsx("form",{children:e.jsx(B,{title:y("authentication.wallet.showQrcode"),children:e.jsx(F,{name:"showQrcode",control:f,render:({field:a})=>e.jsx(oe,{control:e.jsx(Hr,{sx:{ml:1},checked:a.value,...a})})})})})})}Kn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};function Gn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R,inService:j}=se(),{blocklet:y}=le(),{t:x}=ee(),o=y?.meta?.did,p=T(async()=>{try{await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,email:{order:A.email?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),Z.success(x("common.saveSuccess")),_()}catch(u){Z.error(u.message||x("common.saveFailed"))}}),f=be(()=>j?At(ke(G.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/notification/settings"),{type:"email"}):At(ke("/blocklets",y.appPid,"/configuration"),{tab:"notification",type:"email"}),[j,y.appPid]);return z.useImperativeHandle(k,()=>({submit:p}),[p]),e.jsxs(O,{children:[x("authentication.emailLoginDescription"),e.jsx("br",{}),x("authentication.emailNotificationRequired"),e.jsx("br",{}),e.jsx(O,{component:er,to:f,sx:{mt:1,display:"inline-block"},children:e.jsx(ie,{size:"small",variant:"outlined",children:x("authentication.gotoEmailNotification")})})]})}Gn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};function Yn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y}=ee(),x=j?.meta?.did,o=T(async()=>{try{await R.configAuthentication({input:{did:x,authentication:JSON.stringify({...A,passkey:{order:A.passkey?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),Z.success(y("common.saveSuccess")),_()}catch(p){Z.error(p.message||y("common.saveFailed"))}});return z.useImperativeHandle(k,()=>({submit:o}),[o]),null}Yn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const vt={clientId:"",clientSecret:""};function Jn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...vt},j?.settings?.authentication?.google||{}),f=(j.environments||[]).find(d=>d.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(vt))}),n=T(async d=>{try{const{blocklet:h}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,google:{...d,order:A.google?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),g=Object.assign({...vt},h?.settings?.authentication?.google||{});r(g),Z.success(y("common.saveSuccess")),_()}catch(h){Z.error(h.message||y("common.saveFailed"))}}),s=T(d=>d?.trim()?!0:y("authentication.google.clientIdDescription")),c=T(d=>d?.trim()?!0:y("authentication.google.clientSecretDescription")),i=be(()=>x==="zh"?"https://www.arcblock.io/blog/docs/did-connect/zh/oauth-config-google":"https://www.arcblock.io/blog/docs/did-connect/en/oauth-config-google",[x]),l=ke(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/google");return z.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(B,{title:y("authentication.viewDocument"),children:e.jsxs(O,{component:"a",href:i,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[i,e.jsx(O,{component:ae,icon:Ht,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ge,{locale:x,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.google.clientId"),children:e.jsx(F,{name:"clientId",control:t,rules:{validate:s},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...d,size:"small",label:y("authentication.google.clientId"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.google.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...d,size:"small",type:"password",label:y("authentication.google.clientSecret"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})})]})})}Jn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const bt={teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function Xn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...bt},j?.settings?.authentication?.apple||{}),f=(j.environments||[]).find(g=>g.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(bt))}),n=T(async g=>{try{const{blocklet:w}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,apple:{...g,order:A.apple?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),S=Object.assign({...bt},w?.settings?.authentication?.apple||{});r(S),Z.success(y("common.saveSuccess")),_()}catch(w){Z.error(w.message||y("common.saveFailed"))}}),s=T(g=>g?.trim()?!0:y("authentication.apple.teamIdDescription")),c=T(g=>g?.trim()?!0:y("authentication.apple.serviceIdDescription")),i=T(g=>g?.trim()?!0:y("authentication.apple.keyIdDescription")),l=T(g=>g?.trim()?!0:y("authentication.apple.authKeyDescription")),d=T(g=>g?.trim()?!0:y("authentication.apple.bundleIdDescription")),h=ke(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/apple");return z.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{children:[e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[h,e.jsx(Ge,{locale:x,content:h,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.apple.teamId"),children:e.jsx(F,{name:"teamId",control:t,rules:{validate:s},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:y("authentication.apple.teamId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.apple.bundleId"),children:e.jsx(F,{name:"bundleId",control:t,rules:{validate:d},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:y("authentication.apple.bundleId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.apple.serviceId"),children:e.jsx(F,{name:"serviceId",control:t,rules:{validate:c},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:y("authentication.apple.serviceId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.apple.keyId"),children:e.jsx(F,{name:"keyId",control:t,rules:{validate:i},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",label:y("authentication.apple.keyId"),error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.apple.authKey"),children:e.jsx(F,{name:"authKey",control:t,rules:{validate:l},render:({field:g})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...g,size:"small",type:"password",label:y("authentication.apple.authKey"),multiline:!0,rows:4,error:!!a.errors[g.name],helperText:a.errors[g.name]?.message||" ",slotProps:{input:{sx:{WebkitTextSecurity:"disc",fontFamily:"text-security-disc, monospace"}}}})})})})]})})}Xn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const jt={clientId:"",clientSecret:""};function Qn({ref:k=null,onSuccess:_=te,sortMaps:A={}}){const{api:R}=se(),{blocklet:j}=le(),{t:y,locale:x}=ee(),o=j?.meta?.did,p=Object.assign({...jt},j?.settings?.authentication?.twitter||{}),f=(j.environments||[]).find(l=>l.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:r}=ge({defaultValues:we(p,Object.keys(jt))}),n=T(async l=>{try{const{blocklet:d}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,twitter:{...l,order:A.twitter?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),h=Object.assign({...jt},d?.settings?.authentication?.twitter||{});r(h),Z.success(y("common.saveSuccess")),_()}catch(d){Z.error(d.message||y("common.saveFailed"))}}),s=T(l=>l?.trim()?!0:y("authentication.twitter.clientIdDescription")),c=T(l=>l?.trim()?!0:y("authentication.twitter.clientSecretDescription")),i=ke(f,G.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/twitter");return z.useImperativeHandle(k,()=>({submit:u(n)}),[u,n]),e.jsx(O,{children:e.jsxs("form",{onSubmit:u(n),disabled:!0,children:[e.jsx(B,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(O,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[i,e.jsx(Ge,{locale:x,content:i,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(B,{title:y("authentication.twitter.clientId"),children:e.jsx(F,{name:"clientId",control:t,rules:{validate:s},render:({field:l})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...l,size:"small",label:y("authentication.twitter.clientId"),error:!!a.errors[l.name],helperText:a.errors[l.name]?.message||" "})})})}),e.jsx(B,{title:y("authentication.twitter.clientSecret"),children:e.jsx(F,{name:"clientSecret",control:t,rules:{validate:c},render:({field:l})=>e.jsx(K,{fullWidth:!0,children:e.jsx(V,{...l,size:"small",type:"password",label:y("authentication.twitter.clientSecret"),error:!!a.errors[l.name],helperText:a.errors[l.name]?.message||" "})})})})]})})}Qn.propTypes={ref:E.any,onSuccess:E.func,sortMaps:E.object};const Gi={width:24,height:24,body:'<path fill="currentColor" d="M9 20q-.825 0-1.413-.588T7 18q0-.825.588-1.413T9 16q.825 0 1.413.588T11 18q0 .825-.588 1.413T9 20Zm6 0q-.825 0-1.413-.588T13 18q0-.825.588-1.413T15 16q.825 0 1.413.588T17 18q0 .825-.588 1.413T15 20Zm-6-6q-.825 0-1.413-.588T7 12q0-.825.588-1.413T9 10q.825 0 1.413.588T11 12q0 .825-.588 1.413T9 14Zm6 0q-.825 0-1.413-.588T13 12q0-.825.588-1.413T15 10q.825 0 1.413.588T17 12q0 .825-.588 1.413T15 14ZM9 8q-.825 0-1.413-.588T7 6q0-.825.588-1.413T9 4q.825 0 1.413.588T11 6q0 .825-.588 1.413T9 8Zm6 0q-.825 0-1.413-.588T13 6q0-.825.588-1.413T15 4q.825 0 1.413.588T17 6q0 .825-.588 1.413T15 8Z"/>'},ot={width:24,height:24,body:'<path fill="currentColor" d="M7 21q-.825 0-1.413-.588T5 19V6q-.425 0-.713-.288T4 5q0-.425.288-.713T5 4h4q0-.425.288-.713T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z"/>'},lt={width:24,height:24,body:'<path fill="currentColor" d="M4 21q-.425 0-.713-.288T3 20v-2.425q0-.4.15-.763t.425-.637L16.2 3.575q.3-.275.663-.425t.762-.15q.4 0 .775.15t.65.45L20.425 5q.3.275.437.65T21 6.4q0 .4-.138.763t-.437.662l-12.6 12.6q-.275.275-.638.425t-.762.15H4ZM17.6 7.8L19 6.4L17.6 5l-1.4 1.4l1.4 1.4Z"/>'};function es({id:k,title:_,index:A,onBegin:R=te,onMove:j,onEnd:y,onEditItem:x=te,onDeleteItem:o=te,disableDelete:p=!1,icon:f=null}){const u=z.useRef(null),t=z.useRef(null),[{handlerId:a},r]=Nr({accept:"dragItem",collect(i){return{handlerId:i.getHandlerId()}},hover(i,l){if(!u.current)return;const d=i.index,h=A;if(d===h)return;const g=u.current?.getBoundingClientRect(),w=t.current?.getBoundingClientRect(),S=(w.bottom-w.top)/2,v=l.getClientOffset().y-g.top;d<h&&v<S||d>h&&v>S||(j(d,h),i.index=h)}}),[{isDragging:n},s]=Fr({item:{index:A,type:"dragItem"},collect:i=>({isDragging:i.isDragging()}),begin:R,end:y});s(t),r(u);const c=n?.3:1;return e.jsx(O,{ref:u,children:e.jsxs(O,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:t,"data-handler-id":a,children:[e.jsxs(O,{sx:{py:2,px:1,opacity:c,display:"flex",alignItems:"center",gap:.5},draggable:!1,children:[e.jsx(O,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(ae,{fontSize:20,icon:Gi})}),e.jsx(O,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:f}),e.jsx(J,{sx:{flex:1},children:_}),e.jsx(ue,{size:"small",color:"primary",onClick:()=>{x(k)},children:e.jsx(ae,{icon:lt})}),e.jsx(ue,{size:"small",color:"error",onClick:()=>{o(k)},disabled:p,children:e.jsx(ae,{icon:ot})})]}),e.jsx(ne,{})]})})}es.propTypes={title:E.string.isRequired,id:E.string.isRequired,index:E.number.isRequired,onBegin:E.func,onMove:E.func.isRequired,onEnd:E.func.isRequired,onEditItem:E.func,onDeleteItem:E.func,disableDelete:E.bool,icon:E.any};function ts({ref:k=null,providers:_=[],sortMaps:A={}}){const R=z.useRef(null),{t:j}=z.useContext(fe),y=$e(),{control:x,watch:o,setValue:p,reset:f}=ge({mode:"onChange",defaultValues:{provider:""}}),u=o("provider"),t=_.find(h=>h.name===u),a=tr(t),r=y?.transitions?.duration?.leavingScreen||300,n=xe({initMode:"add",mode:"add",show:!1,callback:te,get dialogTitle(){return this.mode==="edit"?j("authentication.updateLoginProvider",{provider:a.current?.title}):j("authentication.addLoginProvider")}}),s=T(()=>{f(),n.mode="add",n.initMode="add"}),c=T(()=>{n.show=!1,setTimeout(()=>{s()},r)}),i=T((h,g=null)=>{if(n.show=!0,g)n.initMode="edit",n.mode="edit",p("provider",g.provider);else{const w=_.find(S=>S.enabled===!1)?.name||_[0]?.name||he.WALLET;p("provider",w)}h?n.callback=h:n.callback=te});z.useImperativeHandle(k,()=>({open:i,close:c}),[i,c]);const l=T(()=>{R.current.submit()}),d=_.map(h=>({value:h.name,title:h.title,description:h.enabled?j("common.enabled"):""}));return z.useEffect(()=>{t?.enabled?n.mode="edit":n.mode="add"},[t?.enabled]),e.jsxs(Se,{open:n.show,title:n.dialogTitle,onClose:c,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:l,disabled:!u,children:n.mode==="add"?j("common.confirm"):j("common.update")}),children:[n.initMode==="edit"?null:e.jsx(F,{name:"provider",control:x,render:({field:h})=>e.jsx(nt,{required:!0,fullWidth:!0,margin:"dense",size:"small",label:j("authentication.chooseProvider"),placeholder:j("authentication.chooseProviderPlaceholder"),options:d,...Oe(h,"ref"),slotProps:{optionItem:{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"}}}})}),e.jsx(O,{sx:{mt:2,".section":{mb:1,gap:4},".section-left":{width:150}},children:t?.component&&e.jsx(t.component,{ref:R,onSuccess:c,sortMaps:A})})]})}ts.propTypes={ref:E.any,providers:E.array,sortMaps:E.object};function Yi(){const{confirmApi:k,confirmHolder:_}=Ie(),A=z.useRef(),{t:R}=ee(),{api:j}=se(),{blocklet:y}=le(),x=y?.meta?.did,o=y?.settings?.authentication||{},p=[{name:he.WALLET,title:_e[he.WALLET],icon:e.jsx(Ae,{provider:"wallet",sx:{width:20,height:20,scale:.9}}),component:Kn},{name:he.EMAIL,title:_e[he.EMAIL],icon:e.jsx(Ae,{provider:"email",sx:{width:20,height:20,scale:.9}}),component:Gn},{name:he.PASSKEY,title:_e[he.PASSKEY],icon:e.jsx(Ae,{provider:"passkey",sx:{width:20,height:20,scale:.9}}),component:Yn},{name:he.GOOGLE,title:_e[he.GOOGLE],icon:e.jsx(Ae,{provider:"google",sx:{width:20,height:20}}),component:Jn},{name:he.APPLE,title:_e[he.APPLE],icon:e.jsx(Ae,{provider:"apple",sx:{width:20,height:20}}),component:Xn},{name:he.GITHUB,title:_e[he.GITHUB],icon:e.jsx(Ae,{provider:"github",sx:{width:20,height:20}}),component:Un},{name:he.TWITTER,title:_e[he.TWITTER],icon:e.jsx(Ae,{provider:"twitter",sx:{width:20,height:20}}),component:Qn},{name:he.AUTH0,title:_e[he.AUTH0],icon:e.jsx(Ae,{provider:"auth0",sx:{width:20,height:20}}),component:Vn,hidden:!0}].map(h=>({...h,enabled:o[h.name]?.enabled??!1,order:o[h.name]?.order??null})),f=p.filter(h=>h.enabled),u=f.sort((h,g)=>!ze(h?.order)&&!ze(g?.order)?h.order-g.order:ze(h?.order)?1:-1),t=u.reduce((h,g,w)=>Object.assign(h,{[g.name]:{order:w}}),{}),a=xe(u.reduce((h,g,w)=>Object.assign(h,{[g.name]:w}),{})),r=[...f].sort((h,g)=>a[h.name]-a[g.name]),n={};typeof window<"u"&&(n.context=window);const s=T((h,g)=>{const w=r[h],S=r[g];a[w.name]=g,a[S.name]=h}),c=T(async()=>{const h=Object.keys(a).reduce((g,w)=>(g[w]={order:a[w]},g),{});await j.configAuthentication({input:{did:x,authentication:JSON.stringify(h)}})}),i=()=>{A.current.open(()=>{A.current.close()})},l=T(h=>{A.current.open(te,{provider:h})}),d=T(h=>{k.open({title:R("authentication.deleteLoginProvider",{provider:_e[h]}),content:R("authentication.deleteLoginProviderDescription",{provider:_e[h]}),confirmButtonText:R("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:R("common.cancel"),async onConfirm(g){try{await j.configAuthentication({input:{did:x,authentication:JSON.stringify({[h]:{enabled:!1,order:null}})}}),delete a[h],Z.success(R("common.removeSuccess")),g()}catch(w){Z.error(w.message||R("common.deleteFailed"))}}})});return e.jsxs(O,{children:[e.jsx(Q,{variant:"contained",onClick:i,sx:{mb:1},children:R("authentication.addLoginProvider")}),e.jsx(Wr,{backend:Zr,...n,children:r.map((h,g)=>e.jsx(es,{index:g,id:h.name,title:h.title,icon:h.icon,onMove:s,onEnd:c,onEditItem:l,onDeleteItem:d,disableDelete:u.length<=1,children:h.component},h.name))}),e.jsx(ts,{ref:A,providers:p,sortMaps:t}),_]})}const Te={ttl:G.SESSION_TTL,cacheTtl:G.SESSION_CACHE_TTL,email:{enabled:!1,requireVerified:!1,requireUnique:!1,trustOauthProviders:!1,trustedIssuers:[],enableDomainBlackList:!1,domainBlackList:[],enableDomainWhiteList:!1,domainWhiteList:[]},phone:{enabled:!1,requireVerified:!1,requireUnique:!1,regionBlackList:[],trustedIssuers:[]},enableBlacklist:!1};function ye(k){return e.jsx(An,{...k,sx:{transform:"scale(0.75)"}})}function _t(k,_=!1){const A=_?k.ttl*86400:k.ttl/86400;return{...k,ttl:A}}function Ji(){const{api:k}=se(),{blocklet:_}=le(),A=_?.meta?.did,R=yn({},Te,_?.settings?.session||{});ze(R.ttl)&&(R.ttl=Te.ttl),ze(R.cacheTtl)&&(R.cacheTtl=Te.cacheTtl),R.phone||(R.phone=Te.phone),R.email||(R.email=Te.email),ze(R.enableBlacklist)&&(R.enableBlacklist=Te.enableBlacklist);const{handleSubmit:j,control:y,formState:x,reset:o,watch:p}=ge({defaultValues:we(_t(R),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:f}=ee(),u=p("email.enabled"),t=p("phone.enabled"),a=p("email.enableDomainBlackList"),r=p("email.enableDomainWhiteList"),{fields:n,append:s,remove:c}=Qt({control:y,name:"email.domainBlackList"}),{fields:i,append:l,remove:d}=Qt({control:y,name:"email.domainWhiteList"}),h=T(async g=>{try{const{blocklet:w}=await k.updateAppSessionConfig({input:{did:A,config:Oe(_t(g,!0),["phone"])}}),S=Object.assign({},Te,we(w?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));o(_t(S)),Z.success(f("common.configSuccess"))}catch(w){Z.error(w.message)}});return e.jsx(Xi,{onSubmit:j(h),children:e.jsxs(re,{direction:"column",sx:{gap:6},children:[e.jsxs(O,{children:[e.jsxs(O,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.profile")}),e.jsx(O,{component:ne,sx:{my:3}})]}),e.jsxs(re,{sx:{gap:2},children:[e.jsx(B,{title:f("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(B,{title:f("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(B,{title:f("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.enabled",control:y,render:({field:g})=>e.jsx(ye,{...g,checked:g.value})})})}),u&&e.jsxs(re,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(B,{title:f("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.requireVerified",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),e.jsx(B,{title:f("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.requireUnique",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),e.jsx(B,{title:f("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.trustOauthProviders",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),e.jsx(B,{title:f("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.enableDomainBlackList",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),a&&e.jsxs(O,{children:[n.map((g,w)=>e.jsxs(re,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(F,{name:`email.domainBlackList.${w}`,control:y,render:S=>e.jsx(V,{...S.field,size:"small",fullWidth:!0})}),e.jsx(ue,{onClick:()=>c(w),children:e.jsx(en,{})})]},g.id)),e.jsx(ie,{startIcon:e.jsx(Et,{}),onClick:()=>s(""),children:f("blocklet.config.session.addDomain")})]}),e.jsx(B,{title:f("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"email.enableDomainWhiteList",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),r&&e.jsxs(O,{children:[i.map((g,w)=>e.jsxs(re,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(F,{name:`email.domainWhiteList.${w}`,control:y,render:S=>e.jsx(V,{...S.field,size:"small",fullWidth:!0})}),e.jsx(ue,{onClick:()=>d(w),children:e.jsx(en,{})})]},g.id)),e.jsx(ie,{startIcon:e.jsx(Et,{}),onClick:()=>l(""),children:f("blocklet.config.session.addDomain")})]})]}),e.jsxs(O,{sx:{display:"none"},children:[e.jsx(B,{title:f("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"phone.enabled",control:y,disabled:!0,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),t&&e.jsxs(re,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(B,{title:f("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"phone.requireVerified",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})}),e.jsx(B,{title:f("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"phone.requireUnique",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})})]})]})]})]}),e.jsxs(O,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.period")}),e.jsx(O,{component:ne,sx:{my:3}}),e.jsx(re,{direction:"column",spacing:2,children:e.jsx(F,{name:"ttl",control:y,rules:{min:1,max:30},render:({field:g})=>e.jsx(K,{fullWidth:!0,sx:{mb:2},children:e.jsx(B,{title:f("blocklet.config.session.ttl",{day:g.value}),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(qr,{...g,defaultValue:7,step:1,marks:[{value:1,label:f("blocklet.config.session.day",{day:1})},{value:7,label:f("blocklet.config.session.days",{day:7})},{value:14,label:f("blocklet.config.session.days",{day:14})},{value:21,label:f("blocklet.config.session.days",{day:21})},{value:30,label:f("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto"})})})})})})]}),e.jsxs(O,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.experimentalSettings")}),e.jsx(O,{component:ne,sx:{my:3}}),e.jsx(re,{direction:"column",spacing:2,children:e.jsx(B,{title:f("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"enableBlacklist",control:y,render:({field:g})=>e.jsx(oe,{sx:{ml:0},control:e.jsx(ye,{...g,checked:g.value})})})})})})]}),e.jsx(O,{children:e.jsx(ie,{type:"submit",variant:"contained",disabled:!x.isDirty,children:f("common.save")})})]})})}const Xi=je.form`
|
|
83
83
|
max-width: 1536px;
|
|
84
84
|
|
|
85
85
|
.advanced-config {
|
|
@@ -119,7 +119,7 @@ ${p("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
119
119
|
.form-item {
|
|
120
120
|
margin-top: 0;
|
|
121
121
|
}
|
|
122
|
-
`,Xi={width:24,height:24,body:'<path fill="currentColor" d="M6 12.05q0 1.125.425 2.188T7.75 16.2l.25.25V15q0-.425.288-.713T9 14q.425 0 .713.288T10 15v4q0 .425-.288.713T9 20H5q-.425 0-.713-.288T4 19q0-.425.288-.713T5 18h1.75l-.4-.35q-1.3-1.15-1.825-2.625T4 12.05Q4 9.7 5.2 7.787T8.425 4.85q.35-.2.738-.025t.512.575q.125.375-.013.75t-.487.575q-1.45.8-2.313 2.213T6 12.05Zm12-.1q0-1.125-.425-2.187T16.25 7.8L16 7.55V9q0 .425-.288.713T15 10q-.425 0-.713-.288T14 9V5q0-.425.288-.713T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6h-1.75l.4.35q1.225 1.225 1.788 2.663T20 11.95q0 2.35-1.2 4.263t-3.225 2.937q-.35.2-.737.025t-.513-.575q-.125-.375.013-.75t.487-.575q1.45-.8 2.313-2.212T18 11.95Z"/>'};var wt,on;function Qi(){if(on)return wt;on=1;const{DEFAULT_IP_DOMAIN_SUFFIX:k,SLOT_FOR_IP_DNS_SITE:_,DEFAULT_DID_DOMAIN:A}=tr(),{encode:R}=nr();return wt={getIpDnsDomainForBlocklet:x=>`${R(x.meta.did)}-${_}.${k}`,getDidDomainForBlocklet:({did:x,didDomain:o=A})=>`${R(x)}.${o}`},wt}var ea=Qi();function es({ref:k=null}){const{t:_}=q.useContext(fe),{blocklet:A}=le(),{api:R}=se(),j=xe({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:te}),x=$e()?.transitions?.duration?.leavingScreen||300,o=T(()=>{j.mode="view",j.data={},j.callback=te}),p=T(()=>{j.show=!1,setTimeout(()=>{o()},x)}),f=T(s=>{j.mode="view",j.show=!0,j.data=s}),u=T((s,c=te)=>{j.mode="approve",j.show=!0,j.data=s,j.callback=c});q.useImperativeHandle(k,()=>({open:f,close:p,approve:u}),[f,p,u]);const t=be(()=>{if(!j.show)return[];j.data.migratedFrom=[j.data.appId,j.data.appPid];const s=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return j.data.isMaster!==!1&&ui(s,"appliedAt","status"),s.map(c=>{const i=_(`federated.info.${c}`);let l=j.data[c];if(c==="appName"&&j.data.isMaster&&(l=e.jsxs(O,{children:[e.jsx(yn,{component:$n}),l]})),["appId","appPid","serverId"].includes(c)&&(l=e.jsx(At,{children:l})),["appUrl"].includes(c)&&(l=e.jsx(O,{component:"a",href:l,target:"_blank",children:l})),["appLogo"].includes(c)){const d=Se(`https://${ea.getDidDomainForBlocklet({did:j.data.appPid})}`,G.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const h=new URL(d);h.searchParams.set("imageFilter","resize"),h.searchParams.set("w","80"),h.searchParams.set("h","80"),l=e.jsx("img",{src:h.href,width:"60",height:"60",alt:j.data.appName})}catch{l=e.jsx("img",{src:d,width:"60",height:"60",alt:j.data.appName})}}return c==="status"&&(l=l&&_(`federated.status.${l}`)),c==="migratedFrom"&&(l=(j.data.migratedFrom||[]).filter(g=>![j.data.appId,j.data.appPid].includes(g)).map(g=>e.jsx(At,{children:g}))),xn(l)&&(l="-"),{name:i,value:l}})},[j.data]),a=j.mode==="approve",r=T(async()=>{try{j.loadingReject=!0,await R.auditFederatedLogin({input:{memberPid:j.data.appPid,did:A.appPid,status:"rejected"}}),p(),j?.callback(!1)}finally{j.loadingReject=!1}}),n=T(async()=>{try{j.loadingApprove=!0,await R.auditFederatedLogin({input:{memberPid:j.data.appPid,did:A.appPid,status:"approved"}}),p(),j?.callback(!0)}finally{j.loadingApprove=!1}});return e.jsx(ke,{open:j.show,title:_(a?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:p,actions:a?e.jsxs(e.Fragment,{children:[e.jsxs(ie,{color:"error",variant:"contained",onClick:r,disabled:j.loadingReject,children:[j.loadingReject?e.jsx(Me,{size:16,color:"grey"}):null,_("common.reject")]}),e.jsxs(ie,{variant:"contained",onClick:n,disabled:j.loadingApprove,children:[j.loadingApprove?e.jsx(Me,{size:16,color:"grey"}):null,_("common.approve")]})]}):e.jsx(ie,{variant:"outlined",onClick:p,children:_("common.close")}),children:t.map(s=>e.jsx(Sn,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:s.name,children:s.value},s.name))})}es.propTypes={ref:E.any};function Wt({ref:k=null}){const A=$e()?.transitions?.duration?.leavingScreen||300,{t:R}=q.useContext(fe),j=xe({show:!1,data:{link:""}}),y=T(()=>{j.data.link=""}),x=T(()=>{j.show=!1,setTimeout(()=>{y()},A)}),o=T(({link:f})=>{j.show=!0,j.data.link=f});q.useImperativeHandle(k,()=>({open:o,close:x}),[o,x]);const p=T(()=>{sr(j.data.link),x()});return e.jsxs(ke,{open:j.show,title:R("federated.joinFederatedLogin"),onClose:x,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:p,children:R("common.copyAndClose")}),children:[e.jsx(O,{sx:{mb:2},children:R("federated.inviteJoinFederatedLoginDescription")}),e.jsx(O,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(kn,{children:j.data.link})})]})}Wt.propTypes={ref:E.any};function ts({mode:k="member"}){const _=q.useRef(null),A=q.useRef(null),{t:R,locale:j}=q.useContext(fe),{blocklet:y,actions:{refreshBlocklet:x}}=le(),{confirmApi:o,confirmHolder:p}=Ie(),{api:f}=se(),u=y.settings.federated?.sites||[],t=y.settings.federated?.config||{},a=t.isMaster!==!1,r=u.find(C=>C.appPid===y.appPid),n=xe({loadingSync:!1}),s=T(C=>{A.current?.open(C)}),c=T(C=>{A.current?.approve(C,x)}),i=T(C=>{o.open({title:R("federated.removeFederatedLogin"),content:R("federated.removeFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(P){await f.quitFederatedLogin({input:{did:y.appPid,targetDid:C.appPid}}),P()}})}),l=T(C=>{o.open({title:R("federated.disableFederatedLogin"),content:R("federated.disableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(P){await f.auditFederatedLogin({input:{memberPid:C.appPid,did:y.appPid,status:"revoked"}}),P()}})}),d=T(C=>{o.open({title:R("federated.enableFederatedLogin"),content:R("federated.enableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),async onConfirm(P){await f.auditFederatedLogin({input:{memberPid:C.appPid,did:y.appPid,status:"approved"}}),P()}})}),h=be(()=>{const C=[{label:R("common.name"),name:"appName",options:{customBodyRenderLite:P=>{const $=u[P],D=$.isMaster!==!1;return e.jsx(O,{sx:{display:"inline-block"},children:e.jsxs(O,{component:"a",href:$.appUrl,target:"_blank",onClick:M=>{M.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[D&&e.jsx(yn,{component:$n,style:{marginRight:"4px"}}),$.appName]})})}}},{label:R("common.did"),name:"appId",options:{customBodyRenderLite:P=>{const $=u[P];return e.jsx(At,{children:$.appId})}}},{label:R("common.status"),name:"status",options:{customBodyRenderLite:P=>{const $=u[P],D=$.isMaster!==!1;return e.jsx(O,{children:D?"-":R(`federated.status.${$.status}`)})}}}];return a&&C.push({label:R("common.actions"),name:"actions",options:{customBodyRenderLite:P=>{const $=u[P],D=$.isMaster!==!1;return e.jsx(O,{sx:{display:"flex",gap:1},children:D?e.jsxs(e.Fragment,{children:[$.status==="rejected"&&e.jsx(Q,{variant:"contained",color:"error",size:"small",onClick:M=>{M.stopPropagation()},children:R("federated.status.rejected")}),$.status==="revoked"&&e.jsx(Q,{variant:"contained",color:"secondary",size:"small",onClick:M=>{M.stopPropagation()},children:R("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(Q,{variant:"contained",color:"error",size:"small",onClick:M=>{M.stopPropagation(),i($)},children:R("federated.quitMember")},"quiteSite"),$.status==="pending"&&e.jsx(Q,{variant:"contained",color:"primary",size:"small",onClick:M=>{M.stopPropagation(),c($)},children:R("federated.status.pending")},"auditSite"),$.status==="approved"&&e.jsx(Q,{variant:"contained",color:"error",size:"small",onClick:M=>{M.stopPropagation(),l($)},style:{whiteSpace:"nowrap"},children:R("federated.revoke")},"revokeSite"),$.status==="revoked"&&e.jsx(Q,{variant:"contained",color:"warning",size:"small",onClick:M=>{M.stopPropagation(),d($)},style:{whiteSpace:"nowrap"},children:R("federated.approve")},"approveSite")]})})}}}),C},[t.appId,u,a,R]),g=be(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(C,{dataIndex:P}){const $=u[P];s($)}}),[]),w=T(()=>{const C=y.environments.find(P=>P.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);C?.value?_.current?.open({link:C.value}):Z.error(R("federated.failedToGetFederatedLoginLink"))},[y.site?.domainAliases?.[0]?.href]),S=T(()=>{o.open({title:R("federated.quitFederatedLogin"),content:R("federated.quitFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(C){await f.quitFederatedLogin({input:{did:y.appPid}}),C()}})}),m=T(()=>{o.open({title:R("federated.disbandFederatedLogin"),content:R("federated.disbandFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(C){await f.disbandFederatedLogin({input:{did:y.appPid}}),C()}})}),v=T(async()=>{try{n.loadingSync=!0,await Promise.all([await f.syncFederatedConfig({input:{did:y.appPid}}),rr(500)]),Z.success(R("common.succeeded"))}finally{n.loadingSync=!1}}),b=[];return r.status!=="pending"&&b.push(e.jsx(ce,{title:R("federated.syncConfig"),children:e.jsx(ue,{size:"small",onClick:v,disabled:n.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},n.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(ae,{icon:Xi,style:{fontSize:24}})},"syncConfig")})),k==="master"?(b.push(e.jsx(Q,{size:"small",variant:"contained",onClick:w,sx:{ml:1},children:R("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),b.push(e.jsx(Q,{color:"error",size:"small",variant:"contained",onClick:m,sx:{ml:1},children:R("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):b.push(e.jsx(Q,{size:"small",variant:"contained",color:"error",onClick:S,sx:{ml:1},children:R("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(at,{className:"main-table",locale:j,data:u,columns:h,customButtons:b,title:e.jsx(O,{className:"table-toolbar-left",children:R("authentication.federated")}),options:g}),p,e.jsx(Wt,{ref:_}),e.jsx(es,{ref:A})]})}ts.propTypes={mode:E.oneOf(["member","master"])};function ns({ref:k=null}){const{t:_}=q.useContext(fe),{api:A}=se(),{blocklet:R}=le(),j=R?.appPid,x=$e()?.transitions?.duration?.leavingScreen||300,o=xe({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:te}),p=T(()=>{o.appUrl="",o.appUrlError="",o.callback=te}),f=T(()=>{o.show=!1,setTimeout(()=>{p()},x)}),u=T((r=te)=>{o.show=!0,o.callback=r});q.useImperativeHandle(k,()=>({open:u,close:f}),[u,f]);const t=T(r=>{if(!r)throw new Error(_("federated.federatedJoinAppUrlRequired"));if(!ir(r))throw new Error(_("federated.federatedJoinAppUrlInvalid"))}),a=T(async()=>{try{t(o.appUrl),o.loading=!0;const r=await A.joinFederatedLogin({input:{did:j,appUrl:o.appUrl}});o.show=!1,f(),o?.callback(r)}catch(r){o.appUrlError=r.message}finally{o.loading=!1}});return e.jsxs(ke,{open:o.show,title:_("federated.joinFederatedLogin"),onClose:f,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:a,disabled:o.loading,children:[o.loading?e.jsx(Me,{size:16,sx:{mr:1},color:"grey"}):null,_("common.confirm")]}),children:[e.jsx(O,{sx:{mb:1},children:_("federated.joinFederatedLoginDescription")}),e.jsx(V,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:_("federated.federatedJoinAppUrl"),label:_("federated.federatedJoinAppUrl"),value:o.appUrl,error:!!o.appUrlError,helperText:o.appUrlError||"eg: https://www.arcblock.io",onChange:r=>{o.appUrl=r.target.value}})]})}ns.propTypes={ref:E.any};function ta(){const{t:k}=q.useContext(fe);return e.jsxs(re,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(Gr,{fontSize:"large",color:"primary"}),e.jsxs(O,{children:[e.jsx(J,{variant:"h6",gutterBottom:!0,children:k("federated.title")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:k("federated.description")}),e.jsx(ar,{href:"https://www.arcblock.io/blog/zh/did-connect-federated-login-support",underline:"hover",variant:"body2",color:"primary",target:"_blank",sx:{display:"inline-flex",alignItems:"center",mt:1},children:k("federated.link")})]})]})}function na(){const k=q.useRef(null),_=q.useRef(null),{t:A}=q.useContext(fe),{blocklet:R,actions:{refreshBlocklet:j}}=le(),y=T(()=>{const o=R.site?.domainAliases?.[0]?.href;if(o)try{const p=new URL(o);k.current?.open({link:p.origin})}catch{Z.error(A("federated.failedToGetFederatedLoginLink"))}},[R.site?.domainAliases?.[0]?.href]),x=T(()=>{_.current?.open(()=>{j()})});if(R.settings.federated?.sites.length>0){const o=R.settings.federated?.config.isMaster!==!1;return e.jsx(ts,{mode:o?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx(O,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs(O,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(ta,{}),e.jsx(ne,{sx:{width:1}}),e.jsxs(re,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(Q,{variant:"contained",onClick:y,sx:{width:1},children:A("federated.inviteJoinFederatedLogin")}),e.jsx(Q,{variant:"outlined",onClick:x,sx:{width:1},children:A("federated.joinFederatedLogin")})]})]})}),e.jsx(Wt,{ref:k}),e.jsx(ns,{ref:_})]})}const Zt={login:{en:{title:"Login",scan:"Login with one of the following methods",confirm:"Confirm connection in your DID Wallet",success:"Successfully logged in"},zh:{title:"登录",scan:"请使用下面的方式完成登录",confirm:"在 DID Wallet 中确认连接",success:"登录成功"}},"switch-profile":{en:{title:"Switch Profile",scan:"Use DID Wallet to switch profile",confirm:"Select profile in your DID Wallet",success:"Profile updated"},zh:{title:"切换个人信息",scan:"请使用 DID Wallet 来切换个人信息",confirm:"在 DID Wallet 中选择个人信息",success:"个人信息已经更新"}},"switch-passport":{en:{title:"Switch Passport",scan:"Use DID Wallet to switch passport",confirm:"Select passport in your DID Wallet",success:"Passport and session updated"},zh:{title:"切换通行证",scan:"请使用 DID Wallet 来切换通行证",confirm:"在 DID Wallet 中选择通行证",success:"通行证和会话已经更新"}}},sa={en:{title:"",scan:"",confirm:"",success:""},zh:{title:"",scan:"",confirm:"",success:""}},De="new-action",ss=Object.keys(Zt),rs=["zh","en"],is=k=>/^[a-z][a-z-]*$/.test(k),ra=k=>{const _=[];return k.includes("zh")&&_.push("zh"),k.includes("en")&&_.push("en"),k.filter(A=>!rs.includes(A)).forEach(A=>_.push(A)),_},as=k=>{const _=X.baseLanguages.find(A=>A.code===k);return _?_.name:k};function os({value:k="",onChange:_=()=>{},onBlur:A=()=>{},onKeyDown:R=()=>{},isDuplicate:j=!1}){const{t:y}=ee(),x=k&&!is(k);let o="";return x?o=y("authentication.didConnect.actionNameError"):j&&(o=y("authentication.didConnect.actionNameDuplicate")),e.jsx(V,{value:k,onChange:_,onBlur:A,onKeyDown:R,onClick:p=>p.stopPropagation(),size:"small",variant:"standard",autoFocus:!0,placeholder:"action-name",helperText:o,error:x||j,sx:{"& .MuiInputBase-input":{py:0,fontSize:14,fontWeight:500}}})}os.propTypes={value:E.string,onChange:E.func,onBlur:E.func,onKeyDown:E.func,isDuplicate:E.bool};function ls({langCode:k,isSelected:_=!1,canDelete:A=!1,onSelect:R=()=>{},onDelete:j=()=>{}}){return e.jsx(Ke,{label:as(k),onClick:R,onDelete:A?j:void 0,size:"small",sx:{bgcolor:_?"primary.main":"grey.100",color:_?"primary.contrastText":"text.primary","&:hover":{bgcolor:_?"primary.dark":"grey.200"},"& .MuiChip-deleteIcon":{color:_?"primary.contrastText":"text.secondary","&:hover":{color:_?"primary.contrastText":"error.main"}}}})}ls.propTypes={langCode:E.string.isRequired,isSelected:E.bool,canDelete:E.bool,onSelect:E.func,onDelete:E.func};function cs({actionKey:k,actionData:_={},expanded:A=!1,selectedLang:R="",editing:j={},onChange:y={}}){const{t:x}=ee(),o=!ss.includes(k),p=ra(Object.keys(_)),f=_[R]||{},u=j?.actionKey===k,t=j?.name&&j.name!==k&&j.allActions?.[j.name];return e.jsxs(Or,{expanded:A,onChange:(a,r)=>y.accordion(r),elevation:0,sx:{border:"1px solid",borderColor:"grey.200",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{margin:0}},children:[e.jsxs(Pr,{expandIcon:e.jsx(Ot,{}),sx:{minHeight:48,"& .MuiAccordionSummary-content":{alignItems:"center",gap:1}},children:[u?e.jsx(os,{value:j.name,onChange:y.editingName,onBlur:y.finishEditing,onKeyDown:y.editingKeyDown,isDuplicate:t}):e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5,"&:hover .edit-icon":{opacity:1}},children:[e.jsx(J,{sx:{fontWeight:500},children:k}),o&&e.jsx(ue,{className:"edit-icon",size:"small",onClick:y.startEditing,sx:{p:.25,opacity:0,transition:"opacity 0.2s",color:"text.secondary","&:hover":{color:"primary.main",bgcolor:"transparent"}},children:e.jsx(Ur,{sx:{fontSize:16}})})]}),o&&e.jsx(ue,{size:"small",onClick:y.delete,sx:{ml:"auto",mr:1,p:.5,color:"error.main","&:hover":{bgcolor:"error.lighter"}},children:e.jsx(Vr,{sx:{fontSize:20}})})]}),e.jsxs($r,{sx:{pt:0},children:[e.jsxs(O,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1,mb:2},children:[e.jsx(J,{variant:"body2",color:"text.secondary",sx:{flexShrink:0},children:"Languages:"}),p.map(a=>e.jsx(ls,{langCode:a,isSelected:R===a,canDelete:!rs.includes(a),onSelect:()=>y.language(a),onDelete:r=>y.deleteLanguage(a,r)},a)),e.jsx(Ke,{label:`${x("common.add")}`,onClick:y.addLanguage,size:"small",variant:"outlined",icon:e.jsx($t,{sx:{fontSize:16}}),sx:{borderStyle:"dashed","&:hover":{bgcolor:"action.hover"}}})]}),e.jsxs(re,{spacing:2,children:[e.jsx(V,{label:"Title",value:f.title||"",onChange:a=>y.field("title",a.target.value),fullWidth:!0,size:"small"}),e.jsx(V,{label:"Scan",value:f.scan||"",onChange:a=>y.field("scan",a.target.value),fullWidth:!0,size:"small",multiline:!0,minRows:2})]})]})]})}cs.propTypes={actionKey:E.string.isRequired,actionData:E.object,expanded:E.bool,selectedLang:E.string,editing:E.shape({actionKey:E.string,name:E.string,allActions:E.object}),onChange:E.shape({accordion:E.func,language:E.func,field:E.func,startEditing:E.func,editingName:E.func,finishEditing:E.func,editingKeyDown:E.func,delete:E.func,addLanguage:E.func,deleteLanguage:E.func})};function ds({open:k,onClose:_,existingLanguages:A,selectedLanguage:R,onLanguageChange:j,onAdd:y}){const{t:x}=ee(),o=X.baseLanguages.filter(p=>!A.includes(p.code));return e.jsxs(or,{open:k,onClose:_,maxWidth:"xs",fullWidth:!0,children:[e.jsx(lr,{children:x("authentication.didConnect.addLanguage")}),e.jsx(cr,{children:e.jsx(K,{fullWidth:!0,sx:{mt:1},children:e.jsx(dr,{value:R,onChange:p=>j(p.target.value),displayEmpty:!0,size:"small",renderValue:p=>p?as(p):e.jsx(J,{color:"text.secondary",children:x("authentication.didConnect.selectLanguage")}),children:o.map(p=>e.jsx(vn,{value:p.code,children:p.name},p.code))})})}),e.jsxs(ur,{children:[e.jsx(ie,{onClick:_,children:x("common.cancel")}),e.jsx(ie,{onClick:y,variant:"contained",disabled:!R,children:x("common.add")})]})]})}ds.propTypes={open:E.bool.isRequired,onClose:E.func.isRequired,existingLanguages:E.array.isRequired,selectedLanguage:E.string.isRequired,onLanguageChange:E.func.isRequired,onAdd:E.func.isRequired};function us({open:k=!1,onClose:_=()=>{},onSave:A=()=>{},initialConfig:R=null}){const{t:j,locale:y}=ee(),[x,o]=q.useState({}),[p,f]=q.useState("login"),[u,t]=q.useState({}),[a,r]=q.useState(!1),[n,s]=q.useState(""),[c,i]=q.useState(""),[l,d]=q.useState(null),[h,g]=q.useState(""),w=y||"en";q.useEffect(()=>{if(!k)return;const z=R||Zt;o(z);const H=Object.keys(z);f(H[0]||"login");const I={};H.forEach(N=>{const W=Object.keys(z[N]||{});I[N]=W.includes(w)?w:W[0]||"en"}),t(I),d(null)},[k,R,w]);const S=T(z=>z?Object.values(z).every(H=>!H?.title?.trim()&&!H?.scan?.trim()):!0),m=T(()=>!Object.keys(x).some(H=>!ss.includes(H)&&S(x[H]))&&!x[De]);T(()=>{m()&&(o(z=>({...z,[De]:sa})),f(De),t(z=>({...z,[De]:w})),d(De),g(De))});const v=T(z=>{const{value:H}=z.target;(H===""||/^[a-z-]*$/.test(H))&&g(H)}),b=T(()=>{const z=h.trim();if(!z||!is(z)||z!==l&&x[z]){d(null);return}if(z!==l){const H={};Object.keys(x).forEach(I=>{H[I===l?z:I]=x[I]}),o(H),p===l&&f(z),u[l]&&t(I=>{const N={...I,[z]:I[l]};return delete N[l],N})}d(null)}),C=T(z=>{z.key==="Enter"?b():z.key==="Escape"&&d(null)}),P=T((z,H)=>{H.stopPropagation();const I={...x};delete I[z],o(I),p===z&&f(Object.keys(I)[0]||!1)}),$=T(()=>{!c||!n||(o(z=>({...z,[n]:{...z[n],[c]:{title:"",scan:"",confirm:"",success:""}}})),t(z=>({...z,[n]:c})),r(!1))}),D=T((z,H,I)=>{I.stopPropagation();const N=x[z];if(Object.keys(N||{}).length<=1)return;const Y={...N};delete Y[H],o(de=>({...de,[z]:Y})),u[z]===H&&t(de=>({...de,[z]:Object.keys(Y)[0]||"en"}))}),M=T(()=>{A(JSON.stringify(x)),_()});m();const U=e.jsxs(e.Fragment,{children:[e.jsx(ie,{onClick:_,variant:"outlined",children:j("common.cancel")}),e.jsx(ie,{onClick:M,variant:"contained",startIcon:e.jsx(ii,{}),children:j("common.confirm")})]});return e.jsxs(ke,{open:k,onClose:_,maxWidth:"md",fullWidth:!0,title:j("authentication.didConnect.configDialogTitle"),actions:U,children:[e.jsxs(re,{spacing:1.5,children:[Object.keys(x).map(z=>{const H=x[z]||{},I=Object.keys(H),N=u[z]||I[0]||"en";return e.jsx(cs,{actionKey:z,actionData:H,expanded:p===z,selectedLang:N,editing:{actionKey:l,name:h,allActions:x},onChange:{accordion:W=>f(W?z:!1),language:W=>t(Y=>({...Y,[z]:W})),field:(W,Y)=>o(de=>({...de,[z]:{...de[z],[N]:{...de[z]?.[N],[W]:Y}}})),startEditing:W=>{W.stopPropagation(),d(z),g(z)},editingName:v,finishEditing:b,editingKeyDown:C,delete:W=>P(z,W),addLanguage:W=>{W.stopPropagation(),s(z),i(""),r(!0)},deleteLanguage:(W,Y)=>D(z,W,Y)}},z)}),!1]}),e.jsx(ds,{open:a,onClose:()=>r(!1),existingLanguages:Object.keys(x[n]||{}),selectedLanguage:c,onLanguageChange:i,onAdd:$})]})}us.propTypes={open:E.bool,onClose:E.func,onSave:E.func,initialConfig:E.object};const et={showDidColor:!0,showAppInfo:!0};function ln(k){return e.jsx(Cn,{...k,sx:{transform:"scale(0.75)"}})}function ia(){const{api:k}=se(),{blocklet:_}=le(),A=_?.meta?.did,{control:R,reset:j}=ge({defaultValues:gn({},et,_?.settings?.didConnect||{})}),y=be(()=>{const r=_?.settings?.actionConfig;return r&&!xn(r)?r:Zt},[_?.settings?.actionConfig]),{t:x}=ee(),[o,p]=q.useState(!1),f=T(async(r,n)=>{try{const s={showDidColor:R._defaultValues?.showDidColor??et.showDidColor,showAppInfo:R._defaultValues?.showAppInfo??et.showAppInfo};s[r]=n;const{blocklet:c}=await k.configDidConnect({input:{did:A,didConnect:JSON.stringify(s)}}),i=Object.assign({},et,c?.settings?.didConnect||{});j(i),Z.success(x("common.configSuccess"))}catch(s){Z.error(s.message),j(R._defaultValues)}}),u=T(()=>{p(!1)}),t=T(()=>{p(!0)}),a=T(async r=>{try{await k.configDidConnectActions({input:{did:A,actionConfig:r}}),Z.success(x("common.configSuccess"))}catch(n){console.error(n),Z.error(n.message)}});return e.jsxs(aa,{children:[e.jsxs(re,{direction:"column",sx:{gap:4},children:[e.jsxs(O,{children:[e.jsx(O,{children:x("authentication.didConnect.basicSettings")}),e.jsx(ne,{sx:{my:2}}),e.jsxs(re,{sx:{gap:2},children:[e.jsx(B,{title:x("authentication.didConnect.showDidColor"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"showDidColor",control:R,render:({field:r})=>e.jsx(ln,{...r,checked:r.value,onChange:n=>{f("showDidColor",n.target.checked),r.onChange(n)}})})})}),e.jsx(B,{title:x("authentication.didConnect.showAppInfo"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"showAppInfo",control:R,render:({field:r})=>e.jsx(ln,{...r,checked:r.value,onChange:n=>{f("showAppInfo",n.target.checked),r.onChange(n)}})})})})]})]}),e.jsxs(O,{children:[e.jsx(O,{children:x("authentication.didConnect.customSettings")}),e.jsx(ne,{sx:{my:2}}),e.jsx(re,{direction:"row",sx:{gap:2},children:e.jsx(ie,{variant:"outlined",onClick:t,children:x("authentication.didConnect.configDialogTitle")})})]})]}),e.jsx(us,{open:o,onClose:u,onSave:a,initialConfig:y})]})}const aa=je.div`
|
|
122
|
+
`,Qi={width:24,height:24,body:'<path fill="currentColor" d="M6 12.05q0 1.125.425 2.188T7.75 16.2l.25.25V15q0-.425.288-.713T9 14q.425 0 .713.288T10 15v4q0 .425-.288.713T9 20H5q-.425 0-.713-.288T4 19q0-.425.288-.713T5 18h1.75l-.4-.35q-1.3-1.15-1.825-2.625T4 12.05Q4 9.7 5.2 7.787T8.425 4.85q.35-.2.738-.025t.512.575q.125.375-.013.75t-.487.575q-1.45.8-2.313 2.213T6 12.05Zm12-.1q0-1.125-.425-2.187T16.25 7.8L16 7.55V9q0 .425-.288.713T15 10q-.425 0-.713-.288T14 9V5q0-.425.288-.713T15 4h4q.425 0 .713.288T20 5q0 .425-.288.713T19 6h-1.75l.4.35q1.225 1.225 1.788 2.663T20 11.95q0 2.35-1.2 4.263t-3.225 2.937q-.35.2-.737.025t-.513-.575q-.125-.375.013-.75t.487-.575q1.45-.8 2.313-2.212T18 11.95Z"/>'};var wt,ln;function ea(){if(ln)return wt;ln=1;const{DEFAULT_IP_DOMAIN_SUFFIX:k,SLOT_FOR_IP_DNS_SITE:_,DEFAULT_DID_DOMAIN:A}=nr(),{encode:R}=sr();return wt={getIpDnsDomainForBlocklet:x=>`${R(x.meta.did)}-${_}.${k}`,getDidDomainForBlocklet:({did:x,didDomain:o=A})=>`${R(x)}.${o}`},wt}var ta=ea();function ns({ref:k=null}){const{t:_}=z.useContext(fe),{blocklet:A}=le(),{api:R}=se(),j=xe({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:te}),x=$e()?.transitions?.duration?.leavingScreen||300,o=T(()=>{j.mode="view",j.data={},j.callback=te}),p=T(()=>{j.show=!1,setTimeout(()=>{o()},x)}),f=T(s=>{j.mode="view",j.show=!0,j.data=s}),u=T((s,c=te)=>{j.mode="approve",j.show=!0,j.data=s,j.callback=c});z.useImperativeHandle(k,()=>({open:f,close:p,approve:u}),[f,p,u]);const t=be(()=>{if(!j.show)return[];j.data.migratedFrom=[j.data.appId,j.data.appPid];const s=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return j.data.isMaster!==!1&&ui(s,"appliedAt","status"),s.map(c=>{const i=_(`federated.info.${c}`);let l=j.data[c];if(c==="appName"&&j.data.isMaster&&(l=e.jsxs(O,{children:[e.jsx(bn,{component:Tn}),l]})),["appId","appPid","serverId"].includes(c)&&(l=e.jsx(Ot,{children:l})),["appUrl"].includes(c)&&(l=e.jsx(O,{component:"a",href:l,target:"_blank",children:l})),["appLogo"].includes(c)){const d=ke(`https://${ta.getDidDomainForBlocklet({did:j.data.appPid})}`,G.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const h=new URL(d);h.searchParams.set("imageFilter","resize"),h.searchParams.set("w","80"),h.searchParams.set("h","80"),l=e.jsx("img",{src:h.href,width:"60",height:"60",alt:j.data.appName})}catch{l=e.jsx("img",{src:d,width:"60",height:"60",alt:j.data.appName})}}return c==="status"&&(l=l&&_(`federated.status.${l}`)),c==="migratedFrom"&&(l=(j.data.migratedFrom||[]).filter(g=>![j.data.appId,j.data.appPid].includes(g)).map(g=>e.jsx(Ot,{children:g}))),vn(l)&&(l="-"),{name:i,value:l}})},[j.data]),a=j.mode==="approve",r=T(async()=>{try{j.loadingReject=!0,await R.auditFederatedLogin({input:{memberPid:j.data.appPid,did:A.appPid,status:"rejected"}}),p(),j?.callback(!1)}finally{j.loadingReject=!1}}),n=T(async()=>{try{j.loadingApprove=!0,await R.auditFederatedLogin({input:{memberPid:j.data.appPid,did:A.appPid,status:"approved"}}),p(),j?.callback(!0)}finally{j.loadingApprove=!1}});return e.jsx(Se,{open:j.show,title:_(a?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:p,actions:a?e.jsxs(e.Fragment,{children:[e.jsxs(ie,{color:"error",variant:"contained",onClick:r,disabled:j.loadingReject,children:[j.loadingReject?e.jsx(Me,{size:16,color:"grey"}):null,_("common.reject")]}),e.jsxs(ie,{variant:"contained",onClick:n,disabled:j.loadingApprove,children:[j.loadingApprove?e.jsx(Me,{size:16,color:"grey"}):null,_("common.approve")]})]}):e.jsx(ie,{variant:"outlined",onClick:p,children:_("common.close")}),children:t.map(s=>e.jsx(Rn,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:s.name,children:s.value},s.name))})}ns.propTypes={ref:E.any};function Vt({ref:k=null}){const A=$e()?.transitions?.duration?.leavingScreen||300,{t:R}=z.useContext(fe),j=xe({show:!1,data:{link:""}}),y=T(()=>{j.data.link=""}),x=T(()=>{j.show=!1,setTimeout(()=>{y()},A)}),o=T(({link:f})=>{j.show=!0,j.data.link=f});z.useImperativeHandle(k,()=>({open:o,close:x}),[o,x]);const p=T(()=>{rr(j.data.link),x()});return e.jsxs(Se,{open:j.show,title:R("federated.joinFederatedLogin"),onClose:x,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:p,children:R("common.copyAndClose")}),children:[e.jsx(O,{sx:{mb:2},children:R("federated.inviteJoinFederatedLoginDescription")}),e.jsx(O,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(Cn,{children:j.data.link})})]})}Vt.propTypes={ref:E.any};function ss({mode:k="member"}){const _=z.useRef(null),A=z.useRef(null),{t:R,locale:j}=z.useContext(fe),{blocklet:y,actions:{refreshBlocklet:x}}=le(),{confirmApi:o,confirmHolder:p}=Ie(),{api:f}=se(),u=y.settings.federated?.sites||[],t=y.settings.federated?.config||{},a=t.isMaster!==!1,r=u.find(C=>C.appPid===y.appPid),n=xe({loadingSync:!1}),s=T(C=>{A.current?.open(C)}),c=T(C=>{A.current?.approve(C,x)}),i=T(C=>{o.open({title:R("federated.removeFederatedLogin"),content:R("federated.removeFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(P){await f.quitFederatedLogin({input:{did:y.appPid,targetDid:C.appPid}}),P()}})}),l=T(C=>{o.open({title:R("federated.disableFederatedLogin"),content:R("federated.disableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(P){await f.auditFederatedLogin({input:{memberPid:C.appPid,did:y.appPid,status:"revoked"}}),P()}})}),d=T(C=>{o.open({title:R("federated.enableFederatedLogin"),content:R("federated.enableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),async onConfirm(P){await f.auditFederatedLogin({input:{memberPid:C.appPid,did:y.appPid,status:"approved"}}),P()}})}),h=be(()=>{const C=[{label:R("common.name"),name:"appName",options:{customBodyRenderLite:P=>{const $=u[P],D=$.isMaster!==!1;return e.jsx(O,{sx:{display:"inline-block"},children:e.jsxs(O,{component:"a",href:$.appUrl,target:"_blank",onClick:M=>{M.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[D&&e.jsx(bn,{component:Tn,style:{marginRight:"4px"}}),$.appName]})})}}},{label:R("common.did"),name:"appId",options:{customBodyRenderLite:P=>{const $=u[P];return e.jsx(Ot,{children:$.appId})}}},{label:R("common.status"),name:"status",options:{customBodyRenderLite:P=>{const $=u[P],D=$.isMaster!==!1;return e.jsx(O,{children:D?"-":R(`federated.status.${$.status}`)})}}}];return a&&C.push({label:R("common.actions"),name:"actions",options:{customBodyRenderLite:P=>{const $=u[P],D=$.isMaster!==!1;return e.jsx(O,{sx:{display:"flex",gap:1},children:D?e.jsxs(e.Fragment,{children:[$.status==="rejected"&&e.jsx(Q,{variant:"contained",color:"error",size:"small",onClick:M=>{M.stopPropagation()},children:R("federated.status.rejected")}),$.status==="revoked"&&e.jsx(Q,{variant:"contained",color:"secondary",size:"small",onClick:M=>{M.stopPropagation()},children:R("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(Q,{variant:"contained",color:"error",size:"small",onClick:M=>{M.stopPropagation(),i($)},children:R("federated.quitMember")},"quiteSite"),$.status==="pending"&&e.jsx(Q,{variant:"contained",color:"primary",size:"small",onClick:M=>{M.stopPropagation(),c($)},children:R("federated.status.pending")},"auditSite"),$.status==="approved"&&e.jsx(Q,{variant:"contained",color:"error",size:"small",onClick:M=>{M.stopPropagation(),l($)},style:{whiteSpace:"nowrap"},children:R("federated.revoke")},"revokeSite"),$.status==="revoked"&&e.jsx(Q,{variant:"contained",color:"warning",size:"small",onClick:M=>{M.stopPropagation(),d($)},style:{whiteSpace:"nowrap"},children:R("federated.approve")},"approveSite")]})})}}}),C},[t.appId,u,a,R]),g=be(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(C,{dataIndex:P}){const $=u[P];s($)}}),[]),w=T(()=>{const C=y.environments.find(P=>P.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);C?.value?_.current?.open({link:C.value}):Z.error(R("federated.failedToGetFederatedLoginLink"))},[y.site?.domainAliases?.[0]?.href]),S=T(()=>{o.open({title:R("federated.quitFederatedLogin"),content:R("federated.quitFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(C){await f.quitFederatedLogin({input:{did:y.appPid}}),C()}})}),m=T(()=>{o.open({title:R("federated.disbandFederatedLogin"),content:R("federated.disbandFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(C){await f.disbandFederatedLogin({input:{did:y.appPid}}),C()}})}),v=T(async()=>{try{n.loadingSync=!0,await Promise.all([await f.syncFederatedConfig({input:{did:y.appPid}}),ir(500)]),Z.success(R("common.succeeded"))}finally{n.loadingSync=!1}}),b=[];return r.status!=="pending"&&b.push(e.jsx(ce,{title:R("federated.syncConfig"),children:e.jsx(ue,{size:"small",onClick:v,disabled:n.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},n.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(ae,{icon:Qi,style:{fontSize:24}})},"syncConfig")})),k==="master"?(b.push(e.jsx(Q,{size:"small",variant:"contained",onClick:w,sx:{ml:1},children:R("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),b.push(e.jsx(Q,{color:"error",size:"small",variant:"contained",onClick:m,sx:{ml:1},children:R("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):b.push(e.jsx(Q,{size:"small",variant:"contained",color:"error",onClick:S,sx:{ml:1},children:R("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(at,{className:"main-table",locale:j,data:u,columns:h,customButtons:b,title:e.jsx(O,{className:"table-toolbar-left",children:R("authentication.federated")}),options:g}),p,e.jsx(Vt,{ref:_}),e.jsx(ns,{ref:A})]})}ss.propTypes={mode:E.oneOf(["member","master"])};function rs({ref:k=null}){const{t:_}=z.useContext(fe),{api:A}=se(),{blocklet:R}=le(),j=R?.appPid,x=$e()?.transitions?.duration?.leavingScreen||300,o=xe({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:te}),p=T(()=>{o.appUrl="",o.appUrlError="",o.callback=te}),f=T(()=>{o.show=!1,setTimeout(()=>{p()},x)}),u=T((r=te)=>{o.show=!0,o.callback=r});z.useImperativeHandle(k,()=>({open:u,close:f}),[u,f]);const t=T(r=>{if(!r)throw new Error(_("federated.federatedJoinAppUrlRequired"));if(!ar(r))throw new Error(_("federated.federatedJoinAppUrlInvalid"))}),a=T(async()=>{try{t(o.appUrl),o.loading=!0;const r=await A.joinFederatedLogin({input:{did:j,appUrl:o.appUrl}});o.show=!1,f(),o?.callback(r)}catch(r){o.appUrlError=r.message}finally{o.loading=!1}});return e.jsxs(Se,{open:o.show,title:_("federated.joinFederatedLogin"),onClose:f,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:a,disabled:o.loading,children:[o.loading?e.jsx(Me,{size:16,sx:{mr:1},color:"grey"}):null,_("common.confirm")]}),children:[e.jsx(O,{sx:{mb:1},children:_("federated.joinFederatedLoginDescription")}),e.jsx(V,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:_("federated.federatedJoinAppUrl"),label:_("federated.federatedJoinAppUrl"),value:o.appUrl,error:!!o.appUrlError,helperText:o.appUrlError||"eg: https://www.arcblock.io",onChange:r=>{o.appUrl=r.target.value}})]})}rs.propTypes={ref:E.any};function na(){const{t:k}=z.useContext(fe);return e.jsxs(re,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(Gr,{fontSize:"large",color:"primary"}),e.jsxs(O,{children:[e.jsx(J,{variant:"h6",gutterBottom:!0,children:k("federated.title")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:k("federated.description")}),e.jsx(or,{href:"https://www.arcblock.io/blog/zh/did-connect-federated-login-support",underline:"hover",variant:"body2",color:"primary",target:"_blank",sx:{display:"inline-flex",alignItems:"center",mt:1},children:k("federated.link")})]})]})}function sa(){const k=z.useRef(null),_=z.useRef(null),{t:A}=z.useContext(fe),{blocklet:R,actions:{refreshBlocklet:j}}=le(),y=T(()=>{const o=R.site?.domainAliases?.[0]?.href;if(o)try{const p=new URL(o);k.current?.open({link:p.origin})}catch{Z.error(A("federated.failedToGetFederatedLoginLink"))}},[R.site?.domainAliases?.[0]?.href]),x=T(()=>{_.current?.open(()=>{j()})});if(R.settings.federated?.sites.length>0){const o=R.settings.federated?.config.isMaster!==!1;return e.jsx(ss,{mode:o?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx(O,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs(O,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(na,{}),e.jsx(ne,{sx:{width:1}}),e.jsxs(re,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(Q,{variant:"contained",onClick:y,sx:{width:1},children:A("federated.inviteJoinFederatedLogin")}),e.jsx(Q,{variant:"outlined",onClick:x,sx:{width:1},children:A("federated.joinFederatedLogin")})]})]})}),e.jsx(Vt,{ref:k}),e.jsx(rs,{ref:_})]})}const Ut={login:{en:{title:"Login",scan:"Login with one of the following methods",confirm:"Confirm connection in your DID Wallet",success:"Successfully logged in"},zh:{title:"登录",scan:"请使用下面的方式完成登录",confirm:"在 DID Wallet 中确认连接",success:"登录成功"}},"switch-profile":{en:{title:"Switch Profile",scan:"Use DID Wallet to switch profile",confirm:"Select profile in your DID Wallet",success:"Profile updated"},zh:{title:"切换个人信息",scan:"请使用 DID Wallet 来切换个人信息",confirm:"在 DID Wallet 中选择个人信息",success:"个人信息已经更新"}},"switch-passport":{en:{title:"Switch Passport",scan:"Use DID Wallet to switch passport",confirm:"Select passport in your DID Wallet",success:"Passport and session updated"},zh:{title:"切换通行证",scan:"请使用 DID Wallet 来切换通行证",confirm:"在 DID Wallet 中选择通行证",success:"通行证和会话已经更新"}}},ra={en:{title:"",scan:"",confirm:"",success:""},zh:{title:"",scan:"",confirm:"",success:""}},De="new-action",is=Object.keys(Ut),as=["zh","en"],os=k=>/^[a-z][a-z-]*$/.test(k),ia=k=>{const _=[];return k.includes("zh")&&_.push("zh"),k.includes("en")&&_.push("en"),k.filter(A=>!as.includes(A)).forEach(A=>_.push(A)),_},ls=k=>{const _=X.baseLanguages.find(A=>A.code===k);return _?_.name:k};function cs({value:k="",onChange:_=()=>{},onBlur:A=()=>{},onKeyDown:R=()=>{},isDuplicate:j=!1}){const{t:y}=ee(),x=k&&!os(k);let o="";return x?o=y("authentication.didConnect.actionNameError"):j&&(o=y("authentication.didConnect.actionNameDuplicate")),e.jsx(V,{value:k,onChange:_,onBlur:A,onKeyDown:R,onClick:p=>p.stopPropagation(),size:"small",variant:"standard",autoFocus:!0,placeholder:"action-name",helperText:o,error:x||j,sx:{"& .MuiInputBase-input":{py:0,fontSize:14,fontWeight:500}}})}cs.propTypes={value:E.string,onChange:E.func,onBlur:E.func,onKeyDown:E.func,isDuplicate:E.bool};function ds({langCode:k,isSelected:_=!1,canDelete:A=!1,onSelect:R=()=>{},onDelete:j=()=>{}}){return e.jsx(Ke,{label:ls(k),onClick:R,onDelete:A?j:void 0,size:"small",sx:{bgcolor:_?"primary.main":"grey.100",color:_?"primary.contrastText":"text.primary","&:hover":{bgcolor:_?"primary.dark":"grey.200"},"& .MuiChip-deleteIcon":{color:_?"primary.contrastText":"text.secondary","&:hover":{color:_?"primary.contrastText":"error.main"}}}})}ds.propTypes={langCode:E.string.isRequired,isSelected:E.bool,canDelete:E.bool,onSelect:E.func,onDelete:E.func};function us({actionKey:k,actionData:_={},expanded:A=!1,selectedLang:R="",editing:j={},onChange:y={}}){const{t:x}=ee(),o=!is.includes(k),p=ia(Object.keys(_)),f=_[R]||{},u=j?.actionKey===k,t=j?.name&&j.name!==k&&j.allActions?.[j.name];return e.jsxs(Or,{expanded:A,onChange:(a,r)=>y.accordion(r),elevation:0,sx:{border:"1px solid",borderColor:"grey.200",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{margin:0}},children:[e.jsxs(Pr,{expandIcon:e.jsx(Pt,{}),sx:{minHeight:48,"& .MuiAccordionSummary-content":{alignItems:"center",gap:1}},children:[u?e.jsx(cs,{value:j.name,onChange:y.editingName,onBlur:y.finishEditing,onKeyDown:y.editingKeyDown,isDuplicate:t}):e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5,"&:hover .edit-icon":{opacity:1}},children:[e.jsx(J,{sx:{fontWeight:500},children:k}),o&&e.jsx(ue,{className:"edit-icon",size:"small",onClick:y.startEditing,sx:{p:.25,opacity:0,transition:"opacity 0.2s",color:"text.secondary","&:hover":{color:"primary.main",bgcolor:"transparent"}},children:e.jsx(Ur,{sx:{fontSize:16}})})]}),o&&e.jsx(ue,{size:"small",onClick:y.delete,sx:{ml:"auto",mr:1,p:.5,color:"error.main","&:hover":{bgcolor:"error.lighter"}},children:e.jsx(Vr,{sx:{fontSize:20}})})]}),e.jsxs($r,{sx:{pt:0},children:[e.jsxs(O,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1,mb:2},children:[e.jsx(J,{variant:"body2",color:"text.secondary",sx:{flexShrink:0},children:"Languages:"}),p.map(a=>e.jsx(ds,{langCode:a,isSelected:R===a,canDelete:!as.includes(a),onSelect:()=>y.language(a),onDelete:r=>y.deleteLanguage(a,r)},a)),e.jsx(Ke,{label:`${x("common.add")}`,onClick:y.addLanguage,size:"small",variant:"outlined",icon:e.jsx(Et,{sx:{fontSize:16}}),sx:{borderStyle:"dashed","&:hover":{bgcolor:"action.hover"}}})]}),e.jsxs(re,{spacing:2,children:[e.jsx(V,{label:"Title",value:f.title||"",onChange:a=>y.field("title",a.target.value),fullWidth:!0,size:"small"}),e.jsx(V,{label:"Scan",value:f.scan||"",onChange:a=>y.field("scan",a.target.value),fullWidth:!0,size:"small",multiline:!0,minRows:2})]})]})]})}us.propTypes={actionKey:E.string.isRequired,actionData:E.object,expanded:E.bool,selectedLang:E.string,editing:E.shape({actionKey:E.string,name:E.string,allActions:E.object}),onChange:E.shape({accordion:E.func,language:E.func,field:E.func,startEditing:E.func,editingName:E.func,finishEditing:E.func,editingKeyDown:E.func,delete:E.func,addLanguage:E.func,deleteLanguage:E.func})};function hs({open:k,onClose:_,existingLanguages:A,selectedLanguage:R,onLanguageChange:j,onAdd:y}){const{t:x}=ee(),o=X.baseLanguages.filter(p=>!A.includes(p.code));return e.jsxs(lr,{open:k,onClose:_,maxWidth:"xs",fullWidth:!0,children:[e.jsx(cr,{children:x("authentication.didConnect.addLanguage")}),e.jsx(dr,{children:e.jsx(K,{fullWidth:!0,sx:{mt:1},children:e.jsx(ur,{value:R,onChange:p=>j(p.target.value),displayEmpty:!0,size:"small",renderValue:p=>p?ls(p):e.jsx(J,{color:"text.secondary",children:x("authentication.didConnect.selectLanguage")}),children:o.map(p=>e.jsx(jn,{value:p.code,children:p.name},p.code))})})}),e.jsxs(hr,{children:[e.jsx(ie,{onClick:_,children:x("common.cancel")}),e.jsx(ie,{onClick:y,variant:"contained",disabled:!R,children:x("common.add")})]})]})}hs.propTypes={open:E.bool.isRequired,onClose:E.func.isRequired,existingLanguages:E.array.isRequired,selectedLanguage:E.string.isRequired,onLanguageChange:E.func.isRequired,onAdd:E.func.isRequired};function ms({open:k=!1,onClose:_=()=>{},onSave:A=()=>{},initialConfig:R=null}){const{t:j,locale:y}=ee(),[x,o]=z.useState({}),[p,f]=z.useState("login"),[u,t]=z.useState({}),[a,r]=z.useState(!1),[n,s]=z.useState(""),[c,i]=z.useState(""),[l,d]=z.useState(null),[h,g]=z.useState(""),w=y||"en";z.useEffect(()=>{if(!k)return;const q=R||Ut;o(q);const H=Object.keys(q);f(H[0]||"login");const I={};H.forEach(N=>{const W=Object.keys(q[N]||{});I[N]=W.includes(w)?w:W[0]||"en"}),t(I),d(null)},[k,R,w]);const S=T(q=>q?Object.values(q).every(H=>!H?.title?.trim()&&!H?.scan?.trim()):!0),m=T(()=>!Object.keys(x).some(H=>!is.includes(H)&&S(x[H]))&&!x[De]);T(()=>{m()&&(o(q=>({...q,[De]:ra})),f(De),t(q=>({...q,[De]:w})),d(De),g(De))});const v=T(q=>{const{value:H}=q.target;(H===""||/^[a-z-]*$/.test(H))&&g(H)}),b=T(()=>{const q=h.trim();if(!q||!os(q)||q!==l&&x[q]){d(null);return}if(q!==l){const H={};Object.keys(x).forEach(I=>{H[I===l?q:I]=x[I]}),o(H),p===l&&f(q),u[l]&&t(I=>{const N={...I,[q]:I[l]};return delete N[l],N})}d(null)}),C=T(q=>{q.key==="Enter"?b():q.key==="Escape"&&d(null)}),P=T((q,H)=>{H.stopPropagation();const I={...x};delete I[q],o(I),p===q&&f(Object.keys(I)[0]||!1)}),$=T(()=>{!c||!n||(o(q=>({...q,[n]:{...q[n],[c]:{title:"",scan:"",confirm:"",success:""}}})),t(q=>({...q,[n]:c})),r(!1))}),D=T((q,H,I)=>{I.stopPropagation();const N=x[q];if(Object.keys(N||{}).length<=1)return;const Y={...N};delete Y[H],o(de=>({...de,[q]:Y})),u[q]===H&&t(de=>({...de,[q]:Object.keys(Y)[0]||"en"}))}),M=T(()=>{A(JSON.stringify(x)),_()});m();const U=e.jsxs(e.Fragment,{children:[e.jsx(ie,{onClick:_,variant:"outlined",children:j("common.cancel")}),e.jsx(ie,{onClick:M,variant:"contained",startIcon:e.jsx(ii,{}),children:j("common.confirm")})]});return e.jsxs(Se,{open:k,onClose:_,maxWidth:"md",fullWidth:!0,title:j("authentication.didConnect.configDialogTitle"),actions:U,children:[e.jsxs(re,{spacing:1.5,children:[Object.keys(x).map(q=>{const H=x[q]||{},I=Object.keys(H),N=u[q]||I[0]||"en";return e.jsx(us,{actionKey:q,actionData:H,expanded:p===q,selectedLang:N,editing:{actionKey:l,name:h,allActions:x},onChange:{accordion:W=>f(W?q:!1),language:W=>t(Y=>({...Y,[q]:W})),field:(W,Y)=>o(de=>({...de,[q]:{...de[q],[N]:{...de[q]?.[N],[W]:Y}}})),startEditing:W=>{W.stopPropagation(),d(q),g(q)},editingName:v,finishEditing:b,editingKeyDown:C,delete:W=>P(q,W),addLanguage:W=>{W.stopPropagation(),s(q),i(""),r(!0)},deleteLanguage:(W,Y)=>D(q,W,Y)}},q)}),!1]}),e.jsx(hs,{open:a,onClose:()=>r(!1),existingLanguages:Object.keys(x[n]||{}),selectedLanguage:c,onLanguageChange:i,onAdd:$})]})}ms.propTypes={open:E.bool,onClose:E.func,onSave:E.func,initialConfig:E.object};const et={showDidColor:!0,showAppInfo:!0};function cn(k){return e.jsx(An,{...k,sx:{transform:"scale(0.75)"}})}function aa(){const{api:k}=se(),{blocklet:_}=le(),A=_?.meta?.did,{control:R,reset:j}=ge({defaultValues:yn({},et,_?.settings?.didConnect||{})}),y=be(()=>{const r=_?.settings?.actionConfig;return r&&!vn(r)?r:Ut},[_?.settings?.actionConfig]),{t:x}=ee(),[o,p]=z.useState(!1),f=T(async(r,n)=>{try{const s={showDidColor:R._defaultValues?.showDidColor??et.showDidColor,showAppInfo:R._defaultValues?.showAppInfo??et.showAppInfo};s[r]=n;const{blocklet:c}=await k.configDidConnect({input:{did:A,didConnect:JSON.stringify(s)}}),i=Object.assign({},et,c?.settings?.didConnect||{});j(i),Z.success(x("common.configSuccess"))}catch(s){Z.error(s.message),j(R._defaultValues)}}),u=T(()=>{p(!1)}),t=T(()=>{p(!0)}),a=T(async r=>{try{await k.configDidConnectActions({input:{did:A,actionConfig:r}}),Z.success(x("common.configSuccess"))}catch(n){console.error(n),Z.error(n.message)}});return e.jsxs(oa,{children:[e.jsxs(re,{direction:"column",sx:{gap:4},children:[e.jsxs(O,{children:[e.jsx(O,{children:x("authentication.didConnect.basicSettings")}),e.jsx(ne,{sx:{my:2}}),e.jsxs(re,{sx:{gap:2},children:[e.jsx(B,{title:x("authentication.didConnect.showDidColor"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"showDidColor",control:R,render:({field:r})=>e.jsx(cn,{...r,checked:r.value,onChange:n=>{f("showDidColor",n.target.checked),r.onChange(n)}})})})}),e.jsx(B,{title:x("authentication.didConnect.showAppInfo"),sectionLeftSx:{width:"600px"},children:e.jsx(O,{sx:{alignSelf:"flex-start"},children:e.jsx(F,{name:"showAppInfo",control:R,render:({field:r})=>e.jsx(cn,{...r,checked:r.value,onChange:n=>{f("showAppInfo",n.target.checked),r.onChange(n)}})})})})]})]}),e.jsxs(O,{children:[e.jsx(O,{children:x("authentication.didConnect.customSettings")}),e.jsx(ne,{sx:{my:2}}),e.jsx(re,{direction:"row",sx:{gap:2},children:e.jsx(ie,{variant:"outlined",onClick:t,children:x("authentication.didConnect.configDialogTitle")})})]})]}),e.jsx(ms,{open:o,onClose:u,onSave:a,initialConfig:y})]})}const oa=je.div`
|
|
123
123
|
max-width: 1536px;
|
|
124
124
|
|
|
125
125
|
.advanced-config {
|
|
@@ -159,15 +159,15 @@ ${p("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
159
159
|
.form-item {
|
|
160
160
|
margin-top: 0;
|
|
161
161
|
}
|
|
162
|
-
`;function We({label:k}){return e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:k})}We.propTypes={label:E.any.isRequired};function hs({orientation:k="horizontal"}){const{t:_}=q.useContext(fe),A=Rn({key:"lg"}),R=[{label:e.jsx(We,{label:_("authentication.didConnectSettings")}),value:"didConnect"},{label:e.jsx(We,{label:_("authentication.loginProviders")}),value:"loginProviders"},{label:e.jsx(We,{label:_("authentication.federated")}),value:"federated"},{label:e.jsx(We,{label:_("authentication.sessionSettings")}),value:"session"}],[j,y]=q.useState(R[0].value),x=be(()=>({didConnect:e.jsx(ia,{}),loginProviders:e.jsx(Gi,{}),federated:e.jsx(na,{}),session:e.jsx(Yi,{})}),[_]);return k==="vertical"?e.jsx(O,{sx:{".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal",div:{textAlign:"left"}},".Mui-selected":{fontWeight:"bold"}},children:e.jsxs(re,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(O,{sx:{minWidth:"240px",flexShrink:0},children:e.jsx(Ue,{tabs:R,current:j,orientation:A?"horizontal":"vertical",onChange:y,sx:{borderRight:A?0:1,height:"100%",borderColor:"divider"}})}),e.jsx(O,{sx:{flexGrow:1,minWidth:0},children:e.jsx(O,{sx:{maxWidth:"1200px"},children:x[j]})})]})}):e.jsxs(O,{children:[e.jsx(Ue,{tabs:R,current:j,onChange:y}),e.jsx(O,{sx:{marginTop:"10px"},children:x[j]})]})}hs.propTypes={orientation:E.oneOf(["horizontal","vertical"])};const oa={width:24,height:24,body:'<path fill="currentColor" d="M11 14.2V6q0-.425.288-.713T12 5q.425 0 .713.288T13 6v8.2l2.9-2.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.3.3-.7.3t-.7-.3l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l2.9 2.9Z"/>'},la={width:24,height:24,body:'<path fill="currentColor" d="m11 8.8l-2.9 2.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L13 8.8V17q0 .425-.288.713T12 18q-.425 0-.713-.288T11 17V8.8Z"/>'};function ms({enabled:k,showUp:_=!0,showDown:A=!0,showSwitch:R=!0,showDelete:j=!0,showEdit:y=!0,disableEdit:x=!1,disableSwitch:o=!1,onClickUp:p=()=>{},onClickDown:f=()=>{},onClickSwitch:u=()=>{},onClickDelete:t=()=>{},onClickEdit:a=()=>{}}){const{t:r}=ee();return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:0},onClick:n=>n.stopPropagation(),children:[y?e.jsx(ce,{title:r("common.edit"),children:e.jsx(ue,{size:"small",onClick:a,color:"success",disabled:x,children:e.jsx(ae,{icon:lt,fontSize:18})})}):null,j?e.jsx(ce,{title:r("common.delete"),children:e.jsx(ue,{size:"small",onClick:t,color:"error",children:e.jsx(ae,{icon:ot,fontSize:18})})}):null,R?e.jsx(ce,{title:r(k?"common.enabled":"common.disabled"),children:e.jsx(pe,{size:"small",checked:k,onClick:u,disabled:o})}):null,_?e.jsx(ce,{title:r("common.moveUp"),children:e.jsx(ue,{size:"small",onClick:p,disabled:x,children:e.jsx(ae,{icon:la,fontSize:20})})}):null,A?e.jsx(ce,{title:r("common.moveDown"),children:e.jsx(ue,{size:"small",onClick:f,disabled:x,children:e.jsx(ae,{icon:oa,fontSize:20})})}):null]})}ms.propTypes={enabled:E.bool.isRequired,showUp:E.bool,showDown:E.bool,showSwitch:E.bool,showDelete:E.bool,showEdit:E.bool,disableEdit:E.bool,disableSwitch:E.bool,onClickUp:E.func,onClickDown:E.func,onClickSwitch:E.func,onClickDelete:E.func,onClickEdit:E.func};function fs({ref:k=null}){const{t:_}=q.useContext(fe),{blocklet:A}=le(),{api:R}=se(),j=A?.meta?.did,x=$e()?.transitions?.duration?.leavingScreen||300,o=xe({mode:"add",show:!1,isDefaultRule:!1,callback:te,loadingButton:!1,get dialogTitle(){return this.mode==="edit"?_("securityRule.edit"):this.mode==="view"?_("securityRule.view"):_("securityRule.add")}}),p=Ve(async()=>{const{accessPolicies:P}=await R.getBlockletAccessPolicies({input:{did:j}});return st(P,$=>$.isProtected?1:0)},{manual:!0}),f=Ve(async()=>{const{responseHeaderPolicies:P}=await R.getBlockletResponseHeaderPolicies({input:{did:j}});return st(P,$=>$.isProtected?1:0)},{manual:!0}),{handleSubmit:u,control:t,watch:a,setValue:r,getValues:n,reset:s,formState:{errors:c}}=ge({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),i=T(()=>{s(),o.mode="add"}),l=T(()=>{o.show=!1,setTimeout(()=>{i()},x)}),d=T((P,$=null)=>{o.loadingButton=!1,o.show=!0,$&&(o.isDefaultRule=$.id===G.SECURITY_RULE_DEFAULT_ID,o.mode="edit",r("componentDid",$.componentDid),r("pathPattern",$.pathPattern),r("responseHeaderPolicyId",$.responseHeaderPolicyId),r("accessPolicyId",$.accessPolicyId),r("remark",$.remark||"")),P?o.callback=P:o.mode="view",p.run(),f.run()});q.useImperativeHandle(k,()=>({open:d,close:l}),[d,l]);const h=T(()=>{const[P,$]=n(["accessPolicyId","responseHeaderPolicyId"]);return!P&&!$?_("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),g=T(()=>{o.loadingButton=!1}),w=T(P=>{const $=h();if($===!0){const D=o.isDefaultRule?Oe(P,"componentDid"):P;o.loadingButton=!0,o.callback(D,{close:l,done:g})}else Z.error($)}),S=a("componentDid"),m=T(P=>{const $=P?.trim();if(!$)return _("common.requiredErrorText",{name:_("securityRule.form.pathPattern")});if(S){if($.startsWith("/"))return _("securityRule.form.pathPatternErrorText")}else if(!$.startsWith("/")&&$!=="*")return _("securityRule.form.pathPatternErrorText");return!0}),v=T(P=>P?.trim()?!0:_("common.requiredErrorText",{name:_("securityRule.form.accessPolicy")})),b=T(P=>P?.trim()?!0:_("common.requiredErrorText",{name:_("securityRule.form.responseHeaderPolicy")})),C=be(()=>{const $=(A?.children||[]).find(D=>D.meta.did===S);return $?.mountPoint?hr($.mountPoint):null},[A,S]);return e.jsx(ke,{open:o.show,title:o.dialogTitle,onClose:l,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",loading:o.loadingButton,loadingPosition:"start",onClick:u(w),children:_("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[o.isDefaultRule?null:e.jsx(F,{name:"componentDid",control:t,render:({field:P})=>e.jsx(nt,{fullWidth:!0,margin:"dense",size:"small",label:_("securityRule.form.component"),placeholder:_("securityRule.form.componentPlaceholder"),options:A.children.map($=>({title:$.meta.title,value:$.meta.did,description:$.mountPoint})),error:!!c?.componentDid?.message,helperText:c?.componentDid?.message||"Choose belong to component",...Oe(P,"ref"),readOnly:o.mode==="view"})}),e.jsx(F,{name:"pathPattern",control:t,rules:{validate:m},render:({field:P})=>e.jsx(V,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:_("securityRule.form.pathPatternPlaceholder"),label:_("securityRule.form.pathPattern"),error:!!c?.pathPattern?.message,helperText:c?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...P,disabled:o.isDefaultRule||o.mode==="view",slotProps:{input:{startAdornment:C?e.jsx(pn,{position:"start",children:C}):null}}})}),e.jsx(F,{name:"accessPolicyId",control:t,rules:{validate:o.isDefaultRule?v:te},render:({field:P})=>e.jsx(nt,{fullWidth:!0,required:o.isDefaultRule,margin:"dense",size:"small",label:_("securityRule.form.accessPolicy"),placeholder:_("securityRule.form.accessPolicyPlaceholder"),options:(p.data||[]).map($=>({value:$.id,title:$.name,description:$.description})),error:!!c?.accessPolicyId?.message,helperText:c?.accessPolicyId?.message||_("securityRule.form.accessPolicyHelperText"),...Oe(P,"ref"),disabled:o.mode==="view"})}),e.jsx(F,{name:"responseHeaderPolicyId",control:t,rules:{validate:o.isDefaultRule?b:te},render:({field:P})=>e.jsx(nt,{fullWidth:!0,required:o.isDefaultRule,margin:"dense",size:"small",label:_("securityRule.form.responseHeaderPolicy"),placeholder:_("securityRule.form.responseHeaderPolicyPlaceholder"),options:(f.data||[]).map($=>({title:$.name,value:$.id,description:$.description})),error:!!c?.responseHeaderPolicyId?.message,helperText:c?.responseHeaderPolicyId?.message||_("securityRule.form.responseHeaderPolicyHelperText"),...Oe(P,"ref"),disabled:o.mode==="view"})}),e.jsx(F,{name:"remark",control:t,render:({field:P})=>e.jsx(V,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:_("securityRule.form.remarkPlaceholder"),label:_("securityRule.form.remark"),helperText:c?.message,...P,disabled:o.mode==="view"})})]})})}fs.propTypes={ref:E.any};const ve=async(k,_="Failed to saved")=>{try{await k()}catch(A){Z.error(A?.message||_)}};function ca(){const{t:k,locale:_}=ee(),{blocklet:A}=le(),{api:R}=se(),j=A?.meta?.did,y=$e(),x=q.useRef(null),o=q.useRef(null),{confirmApi:p,confirmHolder:f}=Ie(),u=Ve(async()=>{const{securityRules:v}=await R.getBlockletSecurityRules({input:{did:j,includeDisabled:!0}});return v}),t=v=>v.id===G.SECURITY_RULE_DEFAULT_ID,a=T(v=>(A?.children||[]).find(C=>C.meta.did===v)?.mountPoint),r=(u.data||[]).map(v=>{if(v.componentDid){const b=a(v.componentDid);v._disabled=b===void 0}return v}),n=r.filter(v=>!t(v)),s=T((v,b)=>{ve(async()=>{const C=v.target.checked;await R.updateBlockletSecurityRule({input:{did:j,data:{id:b.id,enabled:C}}}),Z.success(k("common.succeeded")),u.run()})}),c=T((v,b,C)=>{ve(async()=>{const P=C-1,$=r[P];await Promise.all([R.updateBlockletSecurityRule({input:{did:j,data:{id:b.id,priority:$.priority}}}),R.updateBlockletSecurityRule({input:{did:j,data:{id:$.id,priority:b.priority}}})]),Z.success(k("common.succeeded")),u.run()})}),i=T((v,b,C)=>{ve(async()=>{const P=C+1,$=r[P];await Promise.all([R.updateBlockletSecurityRule({input:{did:j,data:{id:b.id,priority:$.priority}}}),R.updateBlockletSecurityRule({input:{did:j,data:{id:$.id,priority:b.priority}}})]),Z.success(k("common.succeeded")),u.run()})}),l=T(()=>{x.current.open(async(v,{close:b,done:C})=>{await ve(async()=>{await R.addBlockletSecurityRule({input:{did:j,data:v}}),Z.success(k("common.succeeded")),u.run(),b()}),C()})}),d=T((v,b)=>{x.current.open(async(C,{close:P,done:$})=>{await ve(async()=>{await R.updateBlockletSecurityRule({input:{did:j,data:{...C,id:b.id}}}),Z.success(k("common.succeeded")),u.run(),P()}),$()},b)}),h=T((v,b)=>{p.open({title:k("securityRule.delete.title"),content:k("securityRule.delete.description"),confirmButtonText:k("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:k("common.cancel"),onConfirm(C){ve(async()=>{await R.deleteBlockletSecurityRule({input:{did:j,id:b.id}}),Z.success(k("common.succeeded")),u.run(),C()})}})}),g=T(v=>{x.current.open((b,{close:C,done:P})=>{P(),C()},v)}),w={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(v,{dataIndex:b},C){if(o.current?.contains(C.target)){const P=r[b];g(P)}},setRowProps:(v,b)=>r[b]._disabled?{title:k("securityRule.useless"),style:{backgroundColor:y.palette.action.disabledBackground,cursor:"default"}}:{}},S=[e.jsx(ie,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:k("common.refresh")},"refresh"),e.jsx(ie,{size:"small",variant:"contained",onClick:l,children:k("common.add")})],m=[{label:k("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(v){const b=r[v];return e.jsx(O,{sx:{whiteSpace:"nowrap"},children:b.id===G.SECURITY_RULE_DEFAULT_ID?"Default":Se(a(b.componentDid),b.pathPattern)})}}},{label:k("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(v){return r[v].responseHeaderPolicy?.name}}},{label:k("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(v){return r[v].accessPolicy?.name}}},{label:k("securityRule.form.remark"),name:"remark"},{label:k("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(v){const b=r[v],C=t(b);return e.jsx(ms,{disableEdit:b._disabled,disableSwitch:b._disabled,enabled:b.enabled,showSwitch:!C,showDelete:!C,showUp:v>0&&!C,showDown:v<n.length-1&&!C,onClickSwitch:P=>{s(P,b,v)},onClickUp:P=>{c(P,b,v)},onClickDown:P=>{i(P,b,v)},onClickEdit:P=>{d(P,b,v)},onClickDelete:P=>{h(P,b,v)}})}}}].filter(Boolean);return e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2},ref:o,children:[e.jsx(at,{verticalKeyWidth:100,locale:_,title:e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[k("securityRule.title")," ",e.jsx(J,{variant:"body2",children:k("securityRule.sortByDescription")})]}),data:r,columns:m,customButtons:S,options:w,loading:u.loading}),e.jsx(fs,{ref:x}),f]})}const ps={width:24,height:24,body:'<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm0-2h14V7H5v12Zm7-2q-2.05 0-3.663-1.113T6 13q.725-1.775 2.337-2.888T12 9q2.05 0 3.663 1.113T18 13q-.725 1.775-2.337 2.888T12 17Zm0-2.5q-.625 0-1.063-.438T10.5 13q0-.625.438-1.063T12 11.5q.625 0 1.063.438T13.5 13q0 .625-.438 1.063T12 14.5Zm0 1q1.05 0 1.775-.725T14.5 13q0-1.05-.725-1.775T12 10.5q-1.05 0-1.775.725T9.5 13q0 1.05.725 1.775T12 15.5Z"/>'},gs=[{value:G.WHO_CAN_ACCESS.ALL,icon:zr,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:G.WHO_CAN_ACCESS.INVITED,icon:Yr,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:G.WHO_CAN_ACCESS.ADMIN,icon:ni,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:G.WHO_CAN_ACCESS.OWNER,icon:Et,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];function xs({value:k,onChange:_,...A}){const R="roles",j="roles_reverse",{t:y,locale:x}=ee(),o=[...gs,{value:R,icon:Jr,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:j,icon:Xr,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(V,{...A,label:y("blocklet.config.access.description"),select:!0,fullWidth:!0,value:k,onChange:_,sx:{"& .MuiInputBase-input":{width:"calc(100% - 46px)","& > .MuiBox-root:first-of-type":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},slotProps:{select:{renderValue:p=>{const f=o.find(u=>u.value===p);return f?e.jsxs(O,{children:[e.jsx(O,{component:f.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),f.title[x]||f.title.en]}):null},IconComponent:p=>e.jsx(mr,{...p,width:20,height:20})}},children:o.map(p=>e.jsxs(vn,{value:p.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:f})=>f.palette.text.secondary}`}},children:[e.jsxs(O,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(O,{component:p.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(O,{children:p.title[x]||p.title.en})]}),e.jsx(O,{className:"tip",children:p.description[x]||p.description.en})]}))})}xs.propTypes={value:E.string,onChange:E.func};const ys=k=>{const _={name:k.name,description:k.description},{roles:A=null,reverse:R}=k;return A===null?R===!1&&(_.whoCanAccess=G.WHO_CAN_ACCESS.ALL,_.roles=null):A.length===0&&R===!0?(_.whoCanAccess=G.WHO_CAN_ACCESS.INVITED,_.roles=[]):Ze(A,[G.WHO_CAN_ACCESS.OWNER])&&R===!1?(_.whoCanAccess=G.WHO_CAN_ACCESS.OWNER,_.roles=[G.WHO_CAN_ACCESS.OWNER]):Ze(A,[G.WHO_CAN_ACCESS.OWNER,G.WHO_CAN_ACCESS.ADMIN])&&R===!1?(_.whoCanAccess=G.WHO_CAN_ACCESS.ADMIN,_.roles=[G.WHO_CAN_ACCESS.OWNER,G.WHO_CAN_ACCESS.ADMIN]):(_.whoCanAccess=R?"roles_reverse":"roles",_.roles=A),_},da=k=>{const _={name:k.name,description:k.description},{roles:A=null,whoCanAccess:R}=k;return R==="roles"?(_.roles=A,_.reverse=!1):R==="roles_reverse"?(_.roles=A,_.reverse=!0):R===G.WHO_CAN_ACCESS.ALL?(_.roles=null,_.reverse=!1):R===G.WHO_CAN_ACCESS.INVITED?(_.roles=[],_.reverse=!0):R===G.WHO_CAN_ACCESS.OWNER?(_.roles=[G.WHO_CAN_ACCESS.OWNER],_.reverse=!1):R===G.WHO_CAN_ACCESS.ADMIN&&(_.roles=[G.WHO_CAN_ACCESS.OWNER,G.WHO_CAN_ACCESS.ADMIN],_.reverse=!1),_},ua=k=>k instanceof Object?{origin:k.origin?{override:k.origin?.override??!0,value:k.origin?.value?.join(`
|
|
162
|
+
`;function We({label:k}){return e.jsx(O,{sx:{textAlign:"center",width:"100%"},children:k})}We.propTypes={label:E.any.isRequired};function fs({orientation:k="horizontal"}){const{t:_}=z.useContext(fe),A=On({key:"lg"}),R=[{label:e.jsx(We,{label:_("authentication.didConnectSettings")}),value:"didConnect"},{label:e.jsx(We,{label:_("authentication.loginProviders")}),value:"loginProviders"},{label:e.jsx(We,{label:_("authentication.federated")}),value:"federated"},{label:e.jsx(We,{label:_("authentication.sessionSettings")}),value:"session"}],[j,y]=z.useState(R[0].value),x=be(()=>({didConnect:e.jsx(aa,{}),loginProviders:e.jsx(Yi,{}),federated:e.jsx(sa,{}),session:e.jsx(Ji,{})}),[_]);return k==="vertical"?e.jsx(O,{sx:{".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal",div:{textAlign:"left"}},".Mui-selected":{fontWeight:"bold"}},children:e.jsxs(re,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(O,{sx:{minWidth:"240px",flexShrink:0},children:e.jsx(Ue,{tabs:R,current:j,orientation:A?"horizontal":"vertical",onChange:y,sx:{borderRight:A?0:1,height:"100%",borderColor:"divider"}})}),e.jsx(O,{sx:{flexGrow:1,minWidth:0},children:e.jsx(O,{sx:{maxWidth:"1200px"},children:x[j]})})]})}):e.jsxs(O,{children:[e.jsx(Ue,{tabs:R,current:j,onChange:y}),e.jsx(O,{sx:{marginTop:"10px"},children:x[j]})]})}fs.propTypes={orientation:E.oneOf(["horizontal","vertical"])};const la={width:24,height:24,body:'<path fill="currentColor" d="M11 14.2V6q0-.425.288-.713T12 5q.425 0 .713.288T13 6v8.2l2.9-2.9q.275-.275.7-.275t.7.275q.275.275.275.7t-.275.7l-4.6 4.6q-.3.3-.7.3t-.7-.3l-4.6-4.6q-.275-.275-.275-.7t.275-.7q.275-.275.7-.275t.7.275l2.9 2.9Z"/>'},ca={width:24,height:24,body:'<path fill="currentColor" d="m11 8.8l-2.9 2.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L13 8.8V17q0 .425-.288.713T12 18q-.425 0-.713-.288T11 17V8.8Z"/>'};function ps({enabled:k,showUp:_=!0,showDown:A=!0,showSwitch:R=!0,showDelete:j=!0,showEdit:y=!0,disableEdit:x=!1,disableSwitch:o=!1,onClickUp:p=()=>{},onClickDown:f=()=>{},onClickSwitch:u=()=>{},onClickDelete:t=()=>{},onClickEdit:a=()=>{}}){const{t:r}=ee();return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:0},onClick:n=>n.stopPropagation(),children:[y?e.jsx(ce,{title:r("common.edit"),children:e.jsx(ue,{size:"small",onClick:a,color:"success",disabled:x,children:e.jsx(ae,{icon:lt,fontSize:18})})}):null,j?e.jsx(ce,{title:r("common.delete"),children:e.jsx(ue,{size:"small",onClick:t,color:"error",children:e.jsx(ae,{icon:ot,fontSize:18})})}):null,R?e.jsx(ce,{title:r(k?"common.enabled":"common.disabled"),children:e.jsx(pe,{size:"small",checked:k,onClick:u,disabled:o})}):null,_?e.jsx(ce,{title:r("common.moveUp"),children:e.jsx(ue,{size:"small",onClick:p,disabled:x,children:e.jsx(ae,{icon:ca,fontSize:20})})}):null,A?e.jsx(ce,{title:r("common.moveDown"),children:e.jsx(ue,{size:"small",onClick:f,disabled:x,children:e.jsx(ae,{icon:la,fontSize:20})})}):null]})}ps.propTypes={enabled:E.bool.isRequired,showUp:E.bool,showDown:E.bool,showSwitch:E.bool,showDelete:E.bool,showEdit:E.bool,disableEdit:E.bool,disableSwitch:E.bool,onClickUp:E.func,onClickDown:E.func,onClickSwitch:E.func,onClickDelete:E.func,onClickEdit:E.func};function gs({ref:k=null}){const{t:_}=z.useContext(fe),{blocklet:A}=le(),{api:R}=se(),j=A?.meta?.did,x=$e()?.transitions?.duration?.leavingScreen||300,o=xe({mode:"add",show:!1,isDefaultRule:!1,callback:te,loadingButton:!1,get dialogTitle(){return this.mode==="edit"?_("securityRule.edit"):this.mode==="view"?_("securityRule.view"):_("securityRule.add")}}),p=Ve(async()=>{const{accessPolicies:P}=await R.getBlockletAccessPolicies({input:{did:j}});return st(P,$=>$.isProtected?1:0)},{manual:!0}),f=Ve(async()=>{const{responseHeaderPolicies:P}=await R.getBlockletResponseHeaderPolicies({input:{did:j}});return st(P,$=>$.isProtected?1:0)},{manual:!0}),{handleSubmit:u,control:t,watch:a,setValue:r,getValues:n,reset:s,formState:{errors:c}}=ge({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),i=T(()=>{s(),o.mode="add"}),l=T(()=>{o.show=!1,setTimeout(()=>{i()},x)}),d=T((P,$=null)=>{o.loadingButton=!1,o.show=!0,$&&(o.isDefaultRule=$.id===G.SECURITY_RULE_DEFAULT_ID,o.mode="edit",r("componentDid",$.componentDid),r("pathPattern",$.pathPattern),r("responseHeaderPolicyId",$.responseHeaderPolicyId),r("accessPolicyId",$.accessPolicyId),r("remark",$.remark||"")),P?o.callback=P:o.mode="view",p.run(),f.run()});z.useImperativeHandle(k,()=>({open:d,close:l}),[d,l]);const h=T(()=>{const[P,$]=n(["accessPolicyId","responseHeaderPolicyId"]);return!P&&!$?_("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),g=T(()=>{o.loadingButton=!1}),w=T(P=>{const $=h();if($===!0){const D=o.isDefaultRule?Oe(P,"componentDid"):P;o.loadingButton=!0,o.callback(D,{close:l,done:g})}else Z.error($)}),S=a("componentDid"),m=T(P=>{const $=P?.trim();if(!$)return _("common.requiredErrorText",{name:_("securityRule.form.pathPattern")});if(S){if($.startsWith("/"))return _("securityRule.form.pathPatternErrorText")}else if(!$.startsWith("/")&&$!=="*")return _("securityRule.form.pathPatternErrorText");return!0}),v=T(P=>P?.trim()?!0:_("common.requiredErrorText",{name:_("securityRule.form.accessPolicy")})),b=T(P=>P?.trim()?!0:_("common.requiredErrorText",{name:_("securityRule.form.responseHeaderPolicy")})),C=be(()=>{const $=(A?.children||[]).find(D=>D.meta.did===S);return $?.mountPoint?mr($.mountPoint):null},[A,S]);return e.jsx(Se,{open:o.show,title:o.dialogTitle,onClose:l,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",loading:o.loadingButton,loadingPosition:"start",onClick:u(w),children:_("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[o.isDefaultRule?null:e.jsx(F,{name:"componentDid",control:t,render:({field:P})=>e.jsx(nt,{fullWidth:!0,margin:"dense",size:"small",label:_("securityRule.form.component"),placeholder:_("securityRule.form.componentPlaceholder"),options:A.children.map($=>({title:$.meta.title,value:$.meta.did,description:$.mountPoint})),error:!!c?.componentDid?.message,helperText:c?.componentDid?.message||"Choose belong to component",...Oe(P,"ref"),readOnly:o.mode==="view"})}),e.jsx(F,{name:"pathPattern",control:t,rules:{validate:m},render:({field:P})=>e.jsx(V,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:_("securityRule.form.pathPatternPlaceholder"),label:_("securityRule.form.pathPattern"),error:!!c?.pathPattern?.message,helperText:c?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...P,disabled:o.isDefaultRule||o.mode==="view",slotProps:{input:{startAdornment:C?e.jsx(gn,{position:"start",children:C}):null}}})}),e.jsx(F,{name:"accessPolicyId",control:t,rules:{validate:o.isDefaultRule?v:te},render:({field:P})=>e.jsx(nt,{fullWidth:!0,required:o.isDefaultRule,margin:"dense",size:"small",label:_("securityRule.form.accessPolicy"),placeholder:_("securityRule.form.accessPolicyPlaceholder"),options:(p.data||[]).map($=>({value:$.id,title:$.name,description:$.description})),error:!!c?.accessPolicyId?.message,helperText:c?.accessPolicyId?.message||_("securityRule.form.accessPolicyHelperText"),...Oe(P,"ref"),disabled:o.mode==="view"})}),e.jsx(F,{name:"responseHeaderPolicyId",control:t,rules:{validate:o.isDefaultRule?b:te},render:({field:P})=>e.jsx(nt,{fullWidth:!0,required:o.isDefaultRule,margin:"dense",size:"small",label:_("securityRule.form.responseHeaderPolicy"),placeholder:_("securityRule.form.responseHeaderPolicyPlaceholder"),options:(f.data||[]).map($=>({title:$.name,value:$.id,description:$.description})),error:!!c?.responseHeaderPolicyId?.message,helperText:c?.responseHeaderPolicyId?.message||_("securityRule.form.responseHeaderPolicyHelperText"),...Oe(P,"ref"),disabled:o.mode==="view"})}),e.jsx(F,{name:"remark",control:t,render:({field:P})=>e.jsx(V,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:_("securityRule.form.remarkPlaceholder"),label:_("securityRule.form.remark"),helperText:c?.message,...P,disabled:o.mode==="view"})})]})})}gs.propTypes={ref:E.any};const ve=async(k,_="Failed to saved")=>{try{await k()}catch(A){Z.error(A?.message||_)}};function da(){const{t:k,locale:_}=ee(),{blocklet:A}=le(),{api:R}=se(),j=A?.meta?.did,y=$e(),x=z.useRef(null),o=z.useRef(null),{confirmApi:p,confirmHolder:f}=Ie(),u=Ve(async()=>{const{securityRules:v}=await R.getBlockletSecurityRules({input:{did:j,includeDisabled:!0}});return v}),t=v=>v.id===G.SECURITY_RULE_DEFAULT_ID,a=T(v=>(A?.children||[]).find(C=>C.meta.did===v)?.mountPoint),r=(u.data||[]).map(v=>{if(v.componentDid){const b=a(v.componentDid);v._disabled=b===void 0}return v}),n=r.filter(v=>!t(v)),s=T((v,b)=>{ve(async()=>{const C=v.target.checked;await R.updateBlockletSecurityRule({input:{did:j,data:{id:b.id,enabled:C}}}),Z.success(k("common.succeeded")),u.run()})}),c=T((v,b,C)=>{ve(async()=>{const P=C-1,$=r[P];await Promise.all([R.updateBlockletSecurityRule({input:{did:j,data:{id:b.id,priority:$.priority}}}),R.updateBlockletSecurityRule({input:{did:j,data:{id:$.id,priority:b.priority}}})]),Z.success(k("common.succeeded")),u.run()})}),i=T((v,b,C)=>{ve(async()=>{const P=C+1,$=r[P];await Promise.all([R.updateBlockletSecurityRule({input:{did:j,data:{id:b.id,priority:$.priority}}}),R.updateBlockletSecurityRule({input:{did:j,data:{id:$.id,priority:b.priority}}})]),Z.success(k("common.succeeded")),u.run()})}),l=T(()=>{x.current.open(async(v,{close:b,done:C})=>{await ve(async()=>{await R.addBlockletSecurityRule({input:{did:j,data:v}}),Z.success(k("common.succeeded")),u.run(),b()}),C()})}),d=T((v,b)=>{x.current.open(async(C,{close:P,done:$})=>{await ve(async()=>{await R.updateBlockletSecurityRule({input:{did:j,data:{...C,id:b.id}}}),Z.success(k("common.succeeded")),u.run(),P()}),$()},b)}),h=T((v,b)=>{p.open({title:k("securityRule.delete.title"),content:k("securityRule.delete.description"),confirmButtonText:k("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:k("common.cancel"),onConfirm(C){ve(async()=>{await R.deleteBlockletSecurityRule({input:{did:j,id:b.id}}),Z.success(k("common.succeeded")),u.run(),C()})}})}),g=T(v=>{x.current.open((b,{close:C,done:P})=>{P(),C()},v)}),w={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(v,{dataIndex:b},C){if(o.current?.contains(C.target)){const P=r[b];g(P)}},setRowProps:(v,b)=>r[b]._disabled?{title:k("securityRule.useless"),style:{backgroundColor:y.palette.action.disabledBackground,cursor:"default"}}:{}},S=[e.jsx(ie,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:k("common.refresh")},"refresh"),e.jsx(ie,{size:"small",variant:"contained",onClick:l,children:k("common.add")})],m=[{label:k("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(v){const b=r[v];return e.jsx(O,{sx:{whiteSpace:"nowrap"},children:b.id===G.SECURITY_RULE_DEFAULT_ID?"Default":ke(a(b.componentDid),b.pathPattern)})}}},{label:k("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(v){return r[v].responseHeaderPolicy?.name}}},{label:k("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(v){return r[v].accessPolicy?.name}}},{label:k("securityRule.form.remark"),name:"remark"},{label:k("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(v){const b=r[v],C=t(b);return e.jsx(ps,{disableEdit:b._disabled,disableSwitch:b._disabled,enabled:b.enabled,showSwitch:!C,showDelete:!C,showUp:v>0&&!C,showDown:v<n.length-1&&!C,onClickSwitch:P=>{s(P,b,v)},onClickUp:P=>{c(P,b,v)},onClickDown:P=>{i(P,b,v)},onClickEdit:P=>{d(P,b,v)},onClickDelete:P=>{h(P,b,v)}})}}}].filter(Boolean);return e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2},ref:o,children:[e.jsx(at,{verticalKeyWidth:100,locale:_,title:e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[k("securityRule.title")," ",e.jsx(J,{variant:"body2",children:k("securityRule.sortByDescription")})]}),data:r,columns:m,customButtons:S,options:w,loading:u.loading}),e.jsx(gs,{ref:x}),f]})}const xs={width:24,height:24,body:'<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm0-2h14V7H5v12Zm7-2q-2.05 0-3.663-1.113T6 13q.725-1.775 2.337-2.888T12 9q2.05 0 3.663 1.113T18 13q-.725 1.775-2.337 2.888T12 17Zm0-2.5q-.625 0-1.063-.438T10.5 13q0-.625.438-1.063T12 11.5q.625 0 1.063.438T13.5 13q0 .625-.438 1.063T12 14.5Zm0 1q1.05 0 1.775-.725T14.5 13q0-1.05-.725-1.775T12 10.5q-1.05 0-1.775.725T9.5 13q0 1.05.725 1.775T12 15.5Z"/>'},ys=[{value:G.WHO_CAN_ACCESS.ALL,icon:zr,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:G.WHO_CAN_ACCESS.INVITED,icon:Yr,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:G.WHO_CAN_ACCESS.ADMIN,icon:ni,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:G.WHO_CAN_ACCESS.OWNER,icon:Tt,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];function vs({value:k,onChange:_,...A}){const R="roles",j="roles_reverse",{t:y,locale:x}=ee(),o=[...ys,{value:R,icon:Jr,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:j,icon:Xr,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(V,{...A,label:y("blocklet.config.access.description"),select:!0,fullWidth:!0,value:k,onChange:_,sx:{"& .MuiInputBase-input":{width:"calc(100% - 46px)","& > .MuiBox-root:first-of-type":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},slotProps:{select:{renderValue:p=>{const f=o.find(u=>u.value===p);return f?e.jsxs(O,{children:[e.jsx(O,{component:f.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),f.title[x]||f.title.en]}):null},IconComponent:p=>e.jsx(fr,{...p,width:20,height:20})}},children:o.map(p=>e.jsxs(jn,{value:p.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:f})=>f.palette.text.secondary}`}},children:[e.jsxs(O,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(O,{component:p.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(O,{children:p.title[x]||p.title.en})]}),e.jsx(O,{className:"tip",children:p.description[x]||p.description.en})]}))})}vs.propTypes={value:E.string,onChange:E.func};const bs=k=>{const _={name:k.name,description:k.description},{roles:A=null,reverse:R}=k;return A===null?R===!1&&(_.whoCanAccess=G.WHO_CAN_ACCESS.ALL,_.roles=null):A.length===0&&R===!0?(_.whoCanAccess=G.WHO_CAN_ACCESS.INVITED,_.roles=[]):Ze(A,[G.WHO_CAN_ACCESS.OWNER])&&R===!1?(_.whoCanAccess=G.WHO_CAN_ACCESS.OWNER,_.roles=[G.WHO_CAN_ACCESS.OWNER]):Ze(A,[G.WHO_CAN_ACCESS.OWNER,G.WHO_CAN_ACCESS.ADMIN])&&R===!1?(_.whoCanAccess=G.WHO_CAN_ACCESS.ADMIN,_.roles=[G.WHO_CAN_ACCESS.OWNER,G.WHO_CAN_ACCESS.ADMIN]):(_.whoCanAccess=R?"roles_reverse":"roles",_.roles=A),_},ua=k=>{const _={name:k.name,description:k.description},{roles:A=null,whoCanAccess:R}=k;return R==="roles"?(_.roles=A,_.reverse=!1):R==="roles_reverse"?(_.roles=A,_.reverse=!0):R===G.WHO_CAN_ACCESS.ALL?(_.roles=null,_.reverse=!1):R===G.WHO_CAN_ACCESS.INVITED?(_.roles=[],_.reverse=!0):R===G.WHO_CAN_ACCESS.OWNER?(_.roles=[G.WHO_CAN_ACCESS.OWNER],_.reverse=!1):R===G.WHO_CAN_ACCESS.ADMIN&&(_.roles=[G.WHO_CAN_ACCESS.OWNER,G.WHO_CAN_ACCESS.ADMIN],_.reverse=!1),_},ha=k=>k instanceof Object?{origin:k.origin?{override:k.origin?.override??!0,value:k.origin?.value?.join(`
|
|
163
163
|
`),smart:k.origin?.smart??!0}:void 0,methods:k.methods,allowedHeaders:k.allowedHeaders?{override:k.allowedHeaders?.override??!0,value:k.allowedHeaders?.value?.join(`
|
|
164
164
|
`)}:void 0,exposedHeaders:k.exposedHeaders?{override:k.exposedHeaders?.override??!0,value:k.exposedHeaders?.value?.join(`
|
|
165
|
-
`)}:void 0,maxAge:k.maxAge,optionsSuccessStatus:k.optionsSuccessStatus,preflightContinue:k.preflightContinue,credentials:k.credentials}:void 0,
|
|
165
|
+
`)}:void 0,maxAge:k.maxAge,optionsSuccessStatus:k.optionsSuccessStatus,preflightContinue:k.preflightContinue,credentials:k.credentials}:void 0,ma=k=>k instanceof Object?{origin:{override:k.origin?.override,value:k.origin?.value?.split(`
|
|
166
166
|
`).filter(A=>A),smart:k.origin?.smart},methods:k.methods,allowedHeaders:{override:k.allowedHeaders?.override,value:k.allowedHeaders?.value?.split(`
|
|
167
167
|
`).filter(A=>A)},exposedHeaders:{override:k.exposedHeaders?.override,value:k.exposedHeaders?.value?.split(`
|
|
168
|
-
`).filter(A=>A)},maxAge:k.maxAge,optionsSuccessStatus:k.optionsSuccessStatus,preflightContinue:k.preflightContinue,credentials:k.credentials}:void 0,ma=k=>k instanceof Object?{contentSecurityPolicy:k.contentSecurityPolicy,referrerPolicy:k.referrerPolicy,xFrameOptions:k.xFrameOptions,xPoweredBy:k.xPoweredBy,xXssProtection:k.xXssProtection}:void 0,fa=k=>k instanceof Object?{contentSecurityPolicy:k.contentSecurityPolicy,referrerPolicy:k.referrerPolicy,xFrameOptions:k.xFrameOptions,xPoweredBy:k.xPoweredBy,xXssProtection:k.xXssProtection}:void 0,pa=k=>{const _=bn(k);if(k.securityHeader)try{_.securityHeader=JSON.parse(k.securityHeader)}catch{_.securityHeader=null}if(k.cors)try{_.cors=JSON.parse(k.cors)}catch{_.cors=null}return _};function vs({ref:k=null}){const{t:_}=q.useContext(fe),{roles:A}=it(),j=$e()?.transitions?.duration?.leavingScreen||300,y=xe({mode:"add",show:!1,loadingButton:!1,callback:te,get dialogTitle(){return this.mode==="edit"?_("accessPolicy.edit"):this.mode==="view"?_("accessPolicy.view"):_("accessPolicy.add")}}),{handleSubmit:x,control:o,watch:p,setValue:f,reset:u,formState:{errors:t}}=ge({mode:"onChange",defaultValues:{name:"",description:"",roles:null,whoCanAccess:"all"}}),a=T(()=>{u(),y.mode="add"}),r=T(()=>{y.show=!1,setTimeout(()=>{a()},j)}),n=T((w=te,S=null)=>{if(y.callback=w,y.loadingButton=!1,y.show=!0,S){S.id?y.mode="edit":y.mode="view";const m=ys(S);f("name",m.name),f("description",m.description),f("roles",m.roles),f("whoCanAccess",m.whoCanAccess)}});q.useImperativeHandle(k,()=>({open:n,close:r}),[n,r]);const s=T(()=>{y.loadingButton=!1}),c=T(w=>{y.loadingButton=!0,y.callback(da(w),{close:r,done:s})}),i=T(w=>w?.trim()?!0:_("common.requiredErrorText",{name:_("accessPolicy.form.name")})),l=p("whoCanAccess"),d=y.mode==="view",h=T(w=>["roles","roles_reverse"].includes(l)&&(!w||w?.length===0)?_("common.requiredErrorText",{name:_("accessPolicy.form.roles")}):!0),g=T(w=>w?.trim()?!0:_("common.requiredErrorText",{name:_("accessPolicy.form.accessType")}));return e.jsx(ke,{open:y.show,title:y.dialogTitle,onClose:r,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:x(c),loading:y.loadingButton,loadingPosition:"start",children:_("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(F,{name:"name",control:o,rules:{validate:i},render:({field:w})=>e.jsx(V,{fullWidth:!0,required:!0,margin:"dense",size:"small",disabled:d,placeholder:_("accessPolicy.form.namePlaceholder"),label:_("accessPolicy.form.name"),error:!!t?.name?.message,helperText:t?.name?.message||" ",...w})}),e.jsx(F,{name:"whoCanAccess",control:o,rules:{validate:g},render:({field:w})=>e.jsx(xs,{required:!0,size:"small",margin:"dense",disabled:d,error:!!t?.whoCanAccess?.message,helperText:t?.whoCanAccess?.message||" ",...w})}),["roles","roles_reverse"].includes(l)?e.jsx(F,{name:"roles",rules:{validate:h},control:o,render:({field:w})=>e.jsxs(K,{variant:"standard",error:!!t?.roles?.message,children:[e.jsx(rt,{sx:{display:"flex",flexDirection:"row",mt:-3},children:A.map(S=>e.jsx(oe,{control:e.jsx(qe,{disabled:d,size:"small",checked:w.value?.includes(S.name),sx:{p:.75},onChange:(m,v)=>{const b=w.value||[];v?w.onChange([...b,S.name]):w.onChange(b.filter(C=>C!==S.name))}}),label:S.title},S.name))}),e.jsx(cn,{sx:{transform:"translateY(-8px)"},children:t?.roles?.message||" "})]})}):null,e.jsx(F,{name:"description",control:o,render:({field:w})=>e.jsx(V,{fullWidth:!0,multiline:!0,disabled:d,minRows:3,maxRows:7,margin:"dense",size:"small",placeholder:_("accessPolicy.form.descriptionPlaceholder"),label:_("accessPolicy.form.description"),helperText:t?.message,...w})})]})})}vs.propTypes={ref:E.any};function ga(){const{t:k,locale:_}=ee(),{blocklet:A}=le(),{api:R}=se(),{roles:j}=it(),y=A?.meta?.did,x=q.useRef(null),o=q.useRef(null),{confirmApi:p,confirmHolder:f}=Ie(),u=()=>{},t=Ve(async()=>{const{accessPolicies:h}=await R.getBlockletAccessPolicies({input:{did:y}});return st(h,g=>g.isProtected?1:0)}),a=t.data||[],r=T(()=>{o.current.open(async(h,{close:g,done:w})=>{await ve(async()=>{await R.addBlockletAccessPolicy({input:{did:y,data:h}}),Z.success(k("common.succeeded")),t.run(),g()}),w()})}),n=T(h=>{o.current.open(async(g,{close:w,done:S})=>{await ve(async()=>{await R.updateBlockletAccessPolicy({input:{did:y,data:{...g,id:h.id}}}),Z.success(k("common.succeeded")),t.run(),w()}),S()},h)}),s=T(h=>{o.current.open((g,{close:w,done:S})=>{S(),w()},Oe(h,["id"]))}),c=T(h=>{p.open({title:k("accessPolicy.delete.title"),content:k("accessPolicy.delete.description"),confirmButtonText:k("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:k("common.cancel"),onConfirm(g){ve(async()=>{await R.deleteBlockletAccessPolicy({input:{did:y,id:h.id}}),Z.success(k("common.succeeded")),t.run(),g()})}})}),i={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(h,{dataIndex:g},w){if(x.current?.contains(w.target)){const S=a[g];s(S)}}},l=[e.jsx(ie,{size:"small",variant:"outlined",onClick:()=>{t.run()},sx:{mr:1},children:k("common.refresh")},"refresh"),e.jsx(ie,{size:"small",variant:"contained",onClick:r,children:k("common.add")})],d=[{label:k("accessPolicy.form.name"),name:"name",options:{customBodyRenderLite(h){const g=a[h],w=g.isProtected?e.jsx(ce,{title:"Built-in policy, can't edit",children:e.jsx(O,{component:ae,icon:jn,sx:{fontSize:16}})}):null;return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5},children:[w," ",g.name]})}}},{label:k("accessPolicy.form.roles"),name:"roles",options:{customBodyRenderLite(h){const g=a[h],w=ys(g);if([G.WHO_CAN_ACCESS.ALL,G.WHO_CAN_ACCESS.INVITED].includes(w.whoCanAccess)){const m=gs.find(v=>v.value===w.whoCanAccess);return m.title?.[_]||m.title?.en}const S=j.filter(m=>g.reverse?!w.roles?.includes(m.name):w.roles?.includes(m.name));return e.jsx(O,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:S.map(m=>e.jsx(ce,{title:m.description,children:e.jsx(Ke,{size:"small",label:m.title},m.name)}))})}}},{label:k("accessPolicy.form.description"),name:"description"},{label:k("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(h){const g=a[h];return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:0},onClick:w=>w.stopPropagation(),children:[g.isProtected?e.jsx(ce,{title:k("common.view"),children:e.jsx(ue,{size:"small",onClick:()=>{s(g,h)},children:e.jsx(ae,{icon:ps,fontSize:18})})}):null,g.isProtected?null:e.jsx(ce,{title:k("common.edit"),children:e.jsx(ue,{size:"small",onClick:()=>{n(g,h)},color:"success",children:e.jsx(ae,{icon:lt,fontSize:18})})}),g.isProtected?null:e.jsx(ce,{title:k("common.delete"),children:e.jsx(ue,{size:"small",onClick:()=>{c(g,h)},color:"error",children:e.jsx(ae,{icon:ot,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2},ref:x,children:[e.jsx(at,{verticalKeyWidth:100,locale:_,title:k("accessPolicy.title"),data:a,columns:d,customButtons:l,options:i,loading:t.loading,onChange:u}),e.jsx(vs,{ref:o}),f]})}const xa={width:24,height:24,body:'<path fill="currentColor" d="m12 15.375l-6-6l1.4-1.4l4.6 4.6l4.6-4.6l1.4 1.4l-6 6Z"/>'};function Lt({title:k,actions:_,children:A=null,defaultValue:R=!0,value:j,onChange:y,showExpand:x=!0}){const o=!Pe(j),p=xe({open:R}),f=be(()=>o?j:p.open,[j,o,p.open]),u=T(()=>{o?y(!f):p.open=!p.open});return e.jsxs(dn,{variant:"outlined",children:[e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",px:2,py:1,backgroundColor:"grey.50"},onClick:u,children:[e.jsx(O,{sx:{fontWeight:"bold"},children:k}),e.jsxs(O,{sx:{display:"flex",alignItems:"center"},children:[_,x?e.jsx(O,{component:ae,icon:xa,sx:{transform:f?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",fontSize:"2rem"}}):null]})]}),e.jsx(fr,{in:f,children:e.jsx(Kr,{children:A})})]})}Lt.propTypes={title:E.string.isRequired,defaultValue:E.bool,value:E.bool,actions:E.node,children:E.node,onChange:E.func,showExpand:E.bool};const Dt={width:24,height:24,body:'<path fill="currentColor" d="M11.95 18q.525 0 .888-.363t.362-.887q0-.525-.362-.888t-.888-.362q-.525 0-.887.363t-.363.887q0 .525.363.888t.887.362Zm.05 4q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Zm0-2q3.35 0 5.675-2.325T20 12q0-3.35-2.325-5.675T12 4Q8.65 4 6.325 6.325T4 12q0 3.35 2.325 5.675T12 20Zm0-8Zm.1-4.3q.625 0 1.088.4t.462 1q0 .55-.337.975t-.763.8q-.575.5-1.012 1.1t-.438 1.35q0 .35.263.588t.612.237q.375 0 .638-.25t.337-.625q.1-.525.45-.938t.75-.787q.575-.55.988-1.2t.412-1.45q0-1.275-1.038-2.087T12.1 6q-.95 0-1.812.4T8.975 7.625q-.175.3-.113.638t.338.512q.35.2.725.125t.625-.425q.275-.375.688-.575t.862-.2Z"/>'};function bs({config:k={},onChange:_=()=>{},disabled:A=!1}){const R=["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],j={origin:{override:!1,value:"*",smart:!0},methods:{override:!1,value:[...R]},allowedHeaders:{override:!1,value:"*"},exposedHeaders:{override:!1,value:"*"},maxAge:{override:!1,value:void 0},optionsSuccessStatus:{override:!1,value:204},preflightContinue:{override:!1,value:!1},credentials:{override:!1,value:!1},..._n(k,Pe)},{t:y}=ee(),x=(f,{override:u,value:t,smart:a})=>{const r={...j?.[f]};!Pe(a)&&f==="origin"&&(r.smart=a),Pe(u)||(r.override=u),Pe(t)||(r.value=t),_({...j,[f]:r})},o=[{title:y("responseHeaderPolicy.form.cors.origin"),override:j.origin.override,smart:j.origin.smart,name:"origin",required:!0,value:j.origin.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{multiline:!0,minRows:4,maxRows:10,disabled:A,variant:"outlined",size:"small",placeholder:y("responseHeaderPolicy.form.cors.originPlaceholder"),helperText:y("responseHeaderPolicy.form.cors.originHelperText"),value:j.origin.value,onChange:f=>{x("origin",{value:f.target.value})}})})},{title:y("responseHeaderPolicy.form.cors.methods"),name:"methods",override:j.methods.override,required:!0,value:j.methods.value,content:e.jsx(rt,{sx:{flexDirection:"row"},children:R.map(f=>e.jsx(oe,{control:e.jsx(qe,{size:"small",disabled:A,checked:j.methods.value.includes(f),onChange:(u,t)=>{x("methods",{value:t?[...j.methods.value,f]:j.methods.value.filter(a=>a!==f)})}}),label:f},f))})},{title:y("responseHeaderPolicy.form.cors.allowedHeaders"),override:j.allowedHeaders.override,name:"allowedHeaders",value:j.allowedHeaders.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{multiline:!0,minRows:3,maxRows:7,disabled:A,variant:"outlined",size:"small",placeholder:y("responseHeaderPolicy.form.cors.allowedHeadersPlaceholder"),helperText:y("responseHeaderPolicy.form.cors.allowedHeadersHelperText"),value:j.allowedHeaders.value,onChange:f=>{x("allowedHeaders",{value:f.target.value})}})})},{title:y("responseHeaderPolicy.form.cors.exposedHeaders"),override:j.exposedHeaders.override,name:"exposedHeaders",value:j.exposedHeaders.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{multiline:!0,minRows:3,maxRows:7,disabled:A,variant:"outlined",size:"small",placeholder:y("responseHeaderPolicy.form.cors.exposedHeadersPlaceholder"),helperText:y("responseHeaderPolicy.form.cors.exposedHeadersHelperText"),value:j.exposedHeaders.value,onChange:f=>{x("exposedHeaders",{value:f.target.value})}})})},{title:y("responseHeaderPolicy.form.cors.maxAge"),override:j.maxAge.override,name:"maxAge",value:j.maxAge.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{type:"number",variant:"outlined",size:"small",disabled:A,value:j.maxAge.value,onChange:f=>{x("maxAge",{value:f.target.value})},helperText:y("responseHeaderPolicy.form.cors.maxAgeHelperText")})})},{title:y("responseHeaderPolicy.form.cors.optionsSuccessStatus"),override:j.optionsSuccessStatus.override,name:"optionsSuccessStatus",value:j.optionsSuccessStatus.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{type:"number",variant:"outlined",size:"small",disabled:A,value:j.optionsSuccessStatus.value,onChange:f=>{x("optionsSuccessStatus",{value:f.target.value})}})})},{title:y("responseHeaderPolicy.form.cors.preflightContinue"),override:j.preflightContinue.override,name:"preflightContinue",value:j.preflightContinue.value,control:e.jsx(pe,{size:"small",disabled:A,checked:j.preflightContinue.value,onChange:(f,u)=>{x("preflightContinue",{value:u})}})},{title:y("responseHeaderPolicy.form.cors.credentials"),override:j.credentials.override,name:"credentials",value:j.credentials.value,control:e.jsx(pe,{size:"small",disabled:A,checked:j.credentials.value,onChange:(f,u)=>{x("credentials",{value:u})}})}];wn(()=>{_(j)});const p={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(rt,{children:o.map((f,u)=>e.jsxs(q.Fragment,{children:[e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(oe,{sx:{mt:u===0?0:1},control:f.control||e.jsx(O,{sx:{pl:1.35}}),label:f.title,required:f.required},`${f.name}_form`),e.jsxs(O,{children:[f.name==="origin"?e.jsx(oe,{control:e.jsx(qe,{size:"small",checked:f.smart,color:"primary",disabled:A,onChange:()=>{x(f.name,{smart:!f.smart})}}),label:e.jsxs(e.Fragment,{children:[y("responseHeaderPolicy.form.cors.smartMode"),e.jsx(ce,{title:y("responseHeaderPolicy.form.cors.smartModeHelperText"),children:e.jsx(O,{component:ae,icon:Dt,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:p},`${f.name}_smart`):null,e.jsx(oe,{control:e.jsx(qe,{size:"small",checked:f.override,color:"warning",disabled:A,onChange:()=>{x(f.name,{override:!f.override})}}),label:e.jsxs(e.Fragment,{children:[y("responseHeaderPolicy.form.originOverride"),e.jsx(ce,{title:y("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(O,{component:ae,icon:Dt,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...p,mr:0}},`${f.name}_override`)]})]}),f.content?e.jsx(O,{sx:{ml:3.5},children:f.content},`${f.name}_content`):null]},f.name))})}bs.propTypes={config:E.object,onChange:E.func,disabled:E.bool};function js({value:k,onChange:_=()=>{},disabled:A=!1}){const R="sameorigin",j=[{label:"DENY",value:"deny"},{label:"SAMEORIGIN (default)",value:"sameorigin"}],y=x=>{_({action:x.target.value})};return q.useEffect(()=>{k===!0&&_({action:R})},[k]),e.jsx(O,{children:e.jsx(K,{children:e.jsx(An,{row:!0,children:j.map(x=>e.jsx(oe,{value:x.value,control:e.jsx(On,{size:"small",disabled:A,checked:x.value===k?.action,onChange:y,sx:{p:.75}}),label:x.label},x.value))})})})}js.propTypes={value:E.oneOfType([E.string,E.bool]).isRequired,onChange:E.func,disabled:E.bool};function _s({value:k,onChange:_=()=>{},disabled:A=!1}){const R="strict-origin-when-cross-origin",j=[{label:"no-referrer",value:"no-referrer"},{label:"no-referrer-when-downgrade",value:"no-referrer-when-downgrade"},{label:"origin",value:"origin"},{label:"origin-when-cross-origin",value:"origin-when-cross-origin"},{label:"same-origin",value:"same-origin"},{label:"strict-origin",value:"strict-origin"},{label:"strict-origin-when-cross-origin (default)",value:"strict-origin-when-cross-origin"},{label:"unsafe-url",value:"unsafe-url"}],y=x=>{_({policy:x.target.value})};return q.useEffect(()=>{k===!0&&_({policy:R})},[k]),e.jsx(O,{children:e.jsx(K,{children:e.jsx(An,{children:j.map(x=>e.jsx(oe,{value:x.value,control:e.jsx(On,{size:"small",disabled:A,checked:x.value===k?.policy,onChange:y,sx:{p:.75}}),label:x.label},x.value))})})})}_s.propTypes={value:E.oneOfType([E.string,E.bool]).isRequired,onChange:E.func,disabled:E.func};function ws({value:k,onChange:_=()=>{},disabled:A=!1}){const R={"default-src":["'self'"],"base-uri":["'self'"],"font-src":["'self'","https:","data:"],"form-action":["'self'"],"frame-ancestors":["'self'"],"img-src":["'self'","data:"],"object-src":["'none'"],"script-src":["'self'"],"script-src-attr":["'none'"],"style-src":["'self'","https:","'unsafe-inline'"],"upgrade-insecure-requests":[]};function j(f){return Object.keys(f).map(u=>[u,f[u].filter(Boolean).join(" ")].filter(Boolean).join(" ")).filter(Boolean).join(`
|
|
169
|
-
`)}const y=j(k?.directives||R),[x,o]=
|
|
170
|
-
`).reduce((t,a)=>{const[r,...n]=a.split(" ");return t[r]=n.filter(s=>s!==""),t},{});_({useDefaults:!1,directives:u})};return q.useEffect(()=>{k===!0&&(_({useDefaults:!1,directives:R}),o(j(R)))},[k]),e.jsx(O,{sx:{mt:1},children:e.jsx(K,{fullWidth:!0,children:e.jsx(V,{fullWidth:!0,multiline:!0,disabled:A,rows:12,size:"small",value:x,onChange:p})})})}ws.propTypes={value:E.oneOfType([E.object,E.bool]).isRequired,onChange:E.func,disabled:E.bool};function ks({config:k={},onChange:_=()=>{},disabled:A=!1}){const R={contentSecurityPolicy:{override:!1,value:!1},referrerPolicy:{override:!1,value:!1},xFrameOptions:{override:!1,value:!1},xPoweredBy:{override:!1,value:!0},xXssProtection:{override:!1,value:!1},..._n(k,Pe)},{t:j}=ee(),y=(p,{override:f,value:u})=>{const t={...R?.[p]};Pe(f)||(t.override=f),Pe(u)||(t.value=u),_({...R,[p]:t})},x=[{title:"Content-Security-Policy",name:"contentSecurityPolicy",override:R.contentSecurityPolicy.override,value:!!R.contentSecurityPolicy.value,content:e.jsx(ws,{disabled:A,value:R.contentSecurityPolicy.value,onChange:p=>{y("contentSecurityPolicy",{value:p})}}),onChange(p){y("contentSecurityPolicy",{value:p})}},{title:"Referrer-Policy",name:"referrerPolicy",override:R.referrerPolicy.override,value:!!R.referrerPolicy.value,content:e.jsx(_s,{disabled:A,value:R.referrerPolicy.value,onChange:p=>{y("referrerPolicy",{value:p})}}),onChange(p){y("referrerPolicy",{value:p})}},{title:"X-Frame-Options",name:"xFrameOptions",override:R.xFrameOptions.override,value:!!R.xFrameOptions.value,content:e.jsx(js,{disabled:A,value:R.xFrameOptions.value,onChange:p=>{y("xFrameOptions",{value:p})}}),onChange(p){y("xFrameOptions",{value:p})}},{title:"Disable X-Powered-By",name:"xPoweredBy",override:R.xPoweredBy.override,value:R.xPoweredBy.value,content:null,onChange(p){y("xPoweredBy",{value:p})}},{title:"X-XSS-Protection",name:"xXssProtection",override:R.xXssProtection.override,value:R.xXssProtection.value,content:null,onChange(p){y("xXssProtection",{value:p})}}];wn(()=>{_(R)});const o={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(rt,{children:x.map((p,f)=>e.jsxs(q.Fragment,{children:[e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(oe,{sx:{mt:f===0?0:1},control:e.jsx(pe,{size:"small",disabled:A,checked:p.value,onChange:()=>{p.onChange(!p.value)}},`${p.name}_switch`),label:p.title},`${p.name}_form`),p.value?e.jsx(oe,{control:e.jsx(qe,{size:"small",checked:p.override,color:"warning",disabled:A,onChange:()=>{y(p.name,{override:!p.override})}}),label:e.jsxs(e.Fragment,{children:[j("responseHeaderPolicy.form.originOverride"),e.jsx(ce,{title:j("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(O,{component:ae,icon:Dt,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...o,mr:0}}):null]}),p.value&&p.content?e.jsx(O,{sx:{ml:3.7},children:p.content},`${p.name}_content`):null]},p.name))})}ks.propTypes={config:E.object,onChange:E.func,disabled:E.bool};function Ss({ref:k=null}){const{t:_}=q.useContext(fe),R=$e()?.transitions?.duration?.leavingScreen||300,j=xe({mode:"add",show:!1,loadingButton:!1,callback:te,get dialogTitle(){return this.mode==="edit"?_("responseHeaderPolicy.edit"):this.mode==="view"?_("responseHeaderPolicy.view"):_("responseHeaderPolicy.add")},cors:null,securityHeader:null,enableCORS:!1}),{handleSubmit:y,control:x,setValue:o,reset:p,formState:{errors:f}}=ge({mode:"onChange",defaultValues:{name:"",description:""}}),u=T(()=>{p(),j.mode="add",j.enableCORS=!1,j.cors=null,j.securityHeader=null}),t=T(()=>{j.show=!1,setTimeout(()=>{u()},R)}),a=T((d=te,h=null)=>{j.callback=d,j.loadingButton=!1,j.show=!0,h&&(h.id?j.mode="edit":j.mode="view",o("name",h.name),o("description",h.description),j.cors=ua(h.cors),j.securityHeader=ma(h.securityHeader),j.enableCORS=!!h.cors)});q.useImperativeHandle(k,()=>({open:a,close:t}),[a,t]);const r=T(()=>{j.loadingButton=!1}),n=j.mode==="view",s=T(d=>{const h=ha(j.cors),g=fa(j.securityHeader),w=bn({...d,cors:j.enableCORS?JSON.stringify(h):null,securityHeader:JSON.stringify(g)});j.loadingButton=!0,j.callback(w,{close:t,done:r})}),c=T(d=>d?.trim()?!0:_("common.requiredErrorText",{name:_("accessPolicy.form.name")})),i=d=>{j.securityHeader=d},l=d=>{j.cors=d};return e.jsx(ke,{open:j.show,title:j.dialogTitle,onClose:t,PaperProps:{style:{minHeight:"unset",width:900,maxWidth:"100%"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:y(s),loading:j.loadingButton,loadingPosition:"start",children:_("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(F,{name:"name",control:x,rules:{validate:c},render:({field:d})=>e.jsx(V,{fullWidth:!0,required:!0,size:"small",margin:"dense",disabled:n,placeholder:_("accessPolicy.form.namePlaceholder"),label:_("accessPolicy.form.name"),error:!!f?.name?.message,helperText:f?.name?.message||" ",...d})}),e.jsx(F,{name:"description",control:x,render:({field:d})=>e.jsx(V,{fullWidth:!0,multiline:!0,size:"small",margin:"dense",disabled:n,minRows:3,maxRows:7,placeholder:"Description",label:"Description",helperText:f?.description?.message||" ",...d})}),e.jsx(Lt,{title:"Cross-origin resource sharing (CORS)",value:j.enableCORS,onChange:d=>{n||(j.enableCORS=d)},showExpand:!1,actions:e.jsx(pe,{size:"small",disabled:n,checked:j.enableCORS}),children:e.jsx(bs,{config:j.cors,onChange:l,disabled:n})}),e.jsx("br",{}),e.jsx(Lt,{title:"Security Headers",children:e.jsx(ks,{config:j.securityHeader,onChange:i,disabled:n})})]})})}Ss.propTypes={ref:E.any};function ya(){const{t:k,locale:_}=ee(),{blocklet:A}=le(),{api:R}=se(),j=A?.meta?.did,y=q.useRef(null),x=q.useRef(null),{confirmApi:o,confirmHolder:p}=Ie(),f=()=>{},u=Ve(async()=>{const{responseHeaderPolicies:d}=await R.getBlockletResponseHeaderPolicies({input:{did:j}});return st(d.map(h=>pa(h)),h=>h.isProtected?1:0)}),t=u.data||[],a=T(()=>{y.current.open(async(d,{close:h,done:g})=>{await ve(async()=>{await R.addBlockletResponseHeaderPolicy({input:{did:j,data:d}}),Z.success(k("common.succeeded")),u.run(),h()}),g()})}),r=T(d=>{y.current.open((h,{close:g,done:w})=>{w(),g()},Oe(d,["id"]))}),n=T(d=>{y.current.open(async(h,{close:g,done:w})=>{await ve(async()=>{await R.updateBlockletResponseHeaderPolicy({input:{did:j,data:{...h,id:d.id}}}),Z.success(k("common.succeeded")),u.run(),g()}),w()},d)}),s=T(d=>{o.open({title:k("responseHeaderPolicy.delete.title"),content:k("responseHeaderPolicy.delete.description"),confirmButtonText:k("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:k("common.cancel"),onConfirm(h){ve(async()=>{await R.deleteBlockletResponseHeaderPolicy({input:{did:j,id:d.id}}),Z.success(k("common.succeeded")),u.run(),h()})}})}),c={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(d,{dataIndex:h},g){if(x.current?.contains(g.target)){const w=t[h];r(w)}}},i=[e.jsx(ie,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:k("common.refresh")},"refresh"),e.jsx(ie,{size:"small",variant:"contained",onClick:a,children:k("common.add")},"add")],l=[{label:k("common.name"),name:"name",options:{customBodyRenderLite(d){const h=t[d],g=h.isProtected?e.jsx(ce,{title:"Built-in policy, can't edit",children:e.jsx(O,{component:ae,icon:jn,sx:{fontSize:16}})}):null;return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5},children:[g," ",h.name]})}}},{label:k("common.description"),name:"description"},{label:k("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(d){const h=t[d];return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:0},onClick:g=>g.stopPropagation(),children:[h.isProtected?e.jsx(ce,{title:k("common.view"),children:e.jsx(ue,{size:"small",onClick:()=>{r(h,d)},children:e.jsx(ae,{icon:ps,fontSize:18})})}):null,h.isProtected?null:e.jsx(ce,{title:k("common.edit"),children:e.jsx(ue,{size:"small",onClick:()=>{n(h,d)},color:"success",children:e.jsx(ae,{icon:lt,fontSize:18})})}),h.isProtected?null:e.jsx(ce,{title:k("common.delete"),children:e.jsx(ue,{size:"small",onClick:()=>{s(h,d)},color:"error",children:e.jsx(ae,{icon:ot,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2},ref:x,children:[e.jsx(at,{verticalKeyWidth:100,locale:_,title:k("responseHeaderPolicy.title"),data:t,columns:l,customButtons:i,options:c,loading:u.loading,onChange:f}),e.jsx(Ss,{ref:y}),p]})}const Cs=({tabs:k,blocklet:_,ancestors:A=[],depth:R=1,t:j})=>{const y=[...A.map(o=>o.meta.did),_.meta.did].join("/"),x=!A?.length;k.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:Math.max(1,R-1)*2},children:[x?e.jsx(yr,{size:24,blocklet:_,style:{borderRadius:0}}):e.jsx(vr,{size:24,blocklet:_,ancestors:A,style:{borderRadius:0}}),e.jsx(O,{sx:{ml:2},children:e.jsx(O,{sx:{color:"text.primary"},children:x?j("blocklet.component.container"):mn.getDisplayName(_,!0)})})]},y),value:y}),_.children.length>0&&_.children.forEach(o=>{Cs({tabs:k,blocklet:o,ancestors:[...A,_],depth:R+1,t:j})})};function va({blocklet:k,onUpdate:_=()=>{},...A}){const{t:R}=ee(),j=xe({expandPref:!0,expandSecurity:!0}),[y,x]=pr(),o=y.get("tab")||"general",p=Rn(),[f,u]=q.useState(!1),t=[];t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-general",sx:{display:"flex",alignItems:"center"},children:[e.jsx(ai,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.general")})]},"general"),value:"general"}),t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-security-group",sx:{display:"flex",alignItems:"center"},children:[e.jsx(O,{sx:{ml:-2,transform:"translateY(2px)"},children:j.expandSecurity?e.jsx(Ot,{fontSize:"inherit"}):e.jsx(Gt,{fontSize:"inherit"})}),e.jsx(Et,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.security")})]},"securityGroup"),value:"securityGroup"}),j.expandSecurity&&(t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(Et,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("securityRule.title")})]},"security"),value:"security"}),t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(ei,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("accessPolicy.title")})]},"accessPolicy"),value:"accessPolicy"}),t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(ae,{fontSize:24,style:{flexShrink:0},icon:hi}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("responseHeaderPolicy.title")})]},"responseHeaderPolicy"),value:"responseHeaderPolicy"})),t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center"},"data-cy":"configuration-tab-authentication",children:[e.jsx(si,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.login")})]},"authentication"),value:"authentication"}),t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-notification",sx:{display:"flex",alignItems:"center"},children:[e.jsx(ri,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.notification")})]},"notification"),value:"notification"}),t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-preference",sx:{display:"flex",alignItems:"center"},children:[e.jsx(O,{sx:{ml:-2,transform:"translateY(2px)"},children:j.expandPref?e.jsx(Ot,{fontSize:"inherit"}):e.jsx(Gt,{fontSize:"inherit"})}),e.jsx(br,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.preferences")})]},"preference"),value:"preference"});const a=t.find(c=>c.value===o);j.expandPref&&Cs({tabs:t,blocklet:k,t:R});const r=c=>{c==="preference"?j.expandPref=!j.expandPref:c==="securityGroup"?j.expandSecurity=!j.expandSecurity:x(i=>(c==="general"?i.delete("tab"):i.set("tab",c),i)),u(!1)};let n=null;o==="general"?n=e.jsx(Di,{blocklet:k,onUpdate:_}):o==="security"?n=e.jsx(ca,{}):o==="accessPolicy"?n=e.jsx(ga,{}):o==="responseHeaderPolicy"?n=e.jsx(ya,{}):o==="authentication"?n=e.jsx(hs,{}):o==="notification"?n=e.jsx(Ui,{}):n=e.jsx(Er,{id:o});const s=q.useMemo(()=>({position:"relative",minHeight:"66vh",height:"100%",overflow:"hidden"}),[]);return e.jsxs(ba,{...A,children:[p&&e.jsxs(e.Fragment,{children:[e.jsxs(O,{sx:{color:"primary.main",position:"sticky",top:0,zIndex:2,bgcolor:"background.default",display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[e.jsx(ue,{onClick:()=>u(!0),sx:{mr:1},children:e.jsx(gr,{})}),e.jsx(O,{children:a?.label})]}),e.jsx(xr,{anchor:"left",open:f,onClose:()=>u(!1),slotProps:{paper:{sx:{width:260,".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal"}}}},children:e.jsx(Ue,{tabs:t,current:o,orientation:"vertical",onChange:r,sx:{borderRight:1,height:"100%",borderColor:"divider"}})})]}),e.jsxs(ht,{container:!0,spacing:4,columns:24,children:[!p&&e.jsx(ht,{size:{xs:24,sm:7,md:5},children:e.jsx(Ue,{tabs:t,current:o,orientation:"vertical",onChange:r,sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),e.jsx(ht,{size:{xs:24,sm:17,md:19},children:e.jsx(O,{style:s,children:n})})]})]})}va.propTypes={blocklet:E.object.isRequired,onUpdate:E.func};const ba=je.div`
|
|
168
|
+
`).filter(A=>A)},maxAge:k.maxAge,optionsSuccessStatus:k.optionsSuccessStatus,preflightContinue:k.preflightContinue,credentials:k.credentials}:void 0,fa=k=>k instanceof Object?{contentSecurityPolicy:k.contentSecurityPolicy,referrerPolicy:k.referrerPolicy,xFrameOptions:k.xFrameOptions,xPoweredBy:k.xPoweredBy,xXssProtection:k.xXssProtection}:void 0,pa=k=>k instanceof Object?{contentSecurityPolicy:k.contentSecurityPolicy,referrerPolicy:k.referrerPolicy,xFrameOptions:k.xFrameOptions,xPoweredBy:k.xPoweredBy,xXssProtection:k.xXssProtection}:void 0,ga=k=>{const _=_n(k);if(k.securityHeader)try{_.securityHeader=JSON.parse(k.securityHeader)}catch{_.securityHeader=null}if(k.cors)try{_.cors=JSON.parse(k.cors)}catch{_.cors=null}return _};function js({ref:k=null}){const{t:_}=z.useContext(fe),{roles:A}=it(),j=$e()?.transitions?.duration?.leavingScreen||300,y=xe({mode:"add",show:!1,loadingButton:!1,callback:te,get dialogTitle(){return this.mode==="edit"?_("accessPolicy.edit"):this.mode==="view"?_("accessPolicy.view"):_("accessPolicy.add")}}),{handleSubmit:x,control:o,watch:p,setValue:f,reset:u,formState:{errors:t}}=ge({mode:"onChange",defaultValues:{name:"",description:"",roles:null,whoCanAccess:"all"}}),a=T(()=>{u(),y.mode="add"}),r=T(()=>{y.show=!1,setTimeout(()=>{a()},j)}),n=T((w=te,S=null)=>{if(y.callback=w,y.loadingButton=!1,y.show=!0,S){S.id?y.mode="edit":y.mode="view";const m=bs(S);f("name",m.name),f("description",m.description),f("roles",m.roles),f("whoCanAccess",m.whoCanAccess)}});z.useImperativeHandle(k,()=>({open:n,close:r}),[n,r]);const s=T(()=>{y.loadingButton=!1}),c=T(w=>{y.loadingButton=!0,y.callback(ua(w),{close:r,done:s})}),i=T(w=>w?.trim()?!0:_("common.requiredErrorText",{name:_("accessPolicy.form.name")})),l=p("whoCanAccess"),d=y.mode==="view",h=T(w=>["roles","roles_reverse"].includes(l)&&(!w||w?.length===0)?_("common.requiredErrorText",{name:_("accessPolicy.form.roles")}):!0),g=T(w=>w?.trim()?!0:_("common.requiredErrorText",{name:_("accessPolicy.form.accessType")}));return e.jsx(Se,{open:y.show,title:y.dialogTitle,onClose:r,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:x(c),loading:y.loadingButton,loadingPosition:"start",children:_("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(F,{name:"name",control:o,rules:{validate:i},render:({field:w})=>e.jsx(V,{fullWidth:!0,required:!0,margin:"dense",size:"small",disabled:d,placeholder:_("accessPolicy.form.namePlaceholder"),label:_("accessPolicy.form.name"),error:!!t?.name?.message,helperText:t?.name?.message||" ",...w})}),e.jsx(F,{name:"whoCanAccess",control:o,rules:{validate:g},render:({field:w})=>e.jsx(vs,{required:!0,size:"small",margin:"dense",disabled:d,error:!!t?.whoCanAccess?.message,helperText:t?.whoCanAccess?.message||" ",...w})}),["roles","roles_reverse"].includes(l)?e.jsx(F,{name:"roles",rules:{validate:h},control:o,render:({field:w})=>e.jsxs(K,{variant:"standard",error:!!t?.roles?.message,children:[e.jsx(rt,{sx:{display:"flex",flexDirection:"row",mt:-3},children:A.map(S=>e.jsx(oe,{control:e.jsx(qe,{disabled:d,size:"small",checked:w.value?.includes(S.name),sx:{p:.75},onChange:(m,v)=>{const b=w.value||[];v?w.onChange([...b,S.name]):w.onChange(b.filter(C=>C!==S.name))}}),label:S.title},S.name))}),e.jsx(dn,{sx:{transform:"translateY(-8px)"},children:t?.roles?.message||" "})]})}):null,e.jsx(F,{name:"description",control:o,render:({field:w})=>e.jsx(V,{fullWidth:!0,multiline:!0,disabled:d,minRows:3,maxRows:7,margin:"dense",size:"small",placeholder:_("accessPolicy.form.descriptionPlaceholder"),label:_("accessPolicy.form.description"),helperText:t?.message,...w})})]})})}js.propTypes={ref:E.any};function xa(){const{t:k,locale:_}=ee(),{blocklet:A}=le(),{api:R}=se(),{roles:j}=it(),y=A?.meta?.did,x=z.useRef(null),o=z.useRef(null),{confirmApi:p,confirmHolder:f}=Ie(),u=()=>{},t=Ve(async()=>{const{accessPolicies:h}=await R.getBlockletAccessPolicies({input:{did:y}});return st(h,g=>g.isProtected?1:0)}),a=t.data||[],r=T(()=>{o.current.open(async(h,{close:g,done:w})=>{await ve(async()=>{await R.addBlockletAccessPolicy({input:{did:y,data:h}}),Z.success(k("common.succeeded")),t.run(),g()}),w()})}),n=T(h=>{o.current.open(async(g,{close:w,done:S})=>{await ve(async()=>{await R.updateBlockletAccessPolicy({input:{did:y,data:{...g,id:h.id}}}),Z.success(k("common.succeeded")),t.run(),w()}),S()},h)}),s=T(h=>{o.current.open((g,{close:w,done:S})=>{S(),w()},Oe(h,["id"]))}),c=T(h=>{p.open({title:k("accessPolicy.delete.title"),content:k("accessPolicy.delete.description"),confirmButtonText:k("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:k("common.cancel"),onConfirm(g){ve(async()=>{await R.deleteBlockletAccessPolicy({input:{did:y,id:h.id}}),Z.success(k("common.succeeded")),t.run(),g()})}})}),i={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(h,{dataIndex:g},w){if(x.current?.contains(w.target)){const S=a[g];s(S)}}},l=[e.jsx(ie,{size:"small",variant:"outlined",onClick:()=>{t.run()},sx:{mr:1},children:k("common.refresh")},"refresh"),e.jsx(ie,{size:"small",variant:"contained",onClick:r,children:k("common.add")})],d=[{label:k("accessPolicy.form.name"),name:"name",options:{customBodyRenderLite(h){const g=a[h],w=g.isProtected?e.jsx(ce,{title:"Built-in policy, can't edit",children:e.jsx(O,{component:ae,icon:wn,sx:{fontSize:16}})}):null;return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5},children:[w," ",g.name]})}}},{label:k("accessPolicy.form.roles"),name:"roles",options:{customBodyRenderLite(h){const g=a[h],w=bs(g);if([G.WHO_CAN_ACCESS.ALL,G.WHO_CAN_ACCESS.INVITED].includes(w.whoCanAccess)){const m=ys.find(v=>v.value===w.whoCanAccess);return m.title?.[_]||m.title?.en}const S=j.filter(m=>g.reverse?!w.roles?.includes(m.name):w.roles?.includes(m.name));return e.jsx(O,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:S.map(m=>e.jsx(ce,{title:m.description,children:e.jsx(Ke,{size:"small",label:m.title},m.name)}))})}}},{label:k("accessPolicy.form.description"),name:"description"},{label:k("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(h){const g=a[h];return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:0},onClick:w=>w.stopPropagation(),children:[g.isProtected?e.jsx(ce,{title:k("common.view"),children:e.jsx(ue,{size:"small",onClick:()=>{s(g,h)},children:e.jsx(ae,{icon:xs,fontSize:18})})}):null,g.isProtected?null:e.jsx(ce,{title:k("common.edit"),children:e.jsx(ue,{size:"small",onClick:()=>{n(g,h)},color:"success",children:e.jsx(ae,{icon:lt,fontSize:18})})}),g.isProtected?null:e.jsx(ce,{title:k("common.delete"),children:e.jsx(ue,{size:"small",onClick:()=>{c(g,h)},color:"error",children:e.jsx(ae,{icon:ot,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2},ref:x,children:[e.jsx(at,{verticalKeyWidth:100,locale:_,title:k("accessPolicy.title"),data:a,columns:d,customButtons:l,options:i,loading:t.loading,onChange:u}),e.jsx(js,{ref:o}),f]})}const ya={width:24,height:24,body:'<path fill="currentColor" d="m12 15.375l-6-6l1.4-1.4l4.6 4.6l4.6-4.6l1.4 1.4l-6 6Z"/>'};function qt({title:k,actions:_,children:A=null,defaultValue:R=!0,value:j,onChange:y,showExpand:x=!0}){const o=!Pe(j),p=xe({open:R}),f=be(()=>o?j:p.open,[j,o,p.open]),u=T(()=>{o?y(!f):p.open=!p.open});return e.jsxs(un,{variant:"outlined",children:[e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",px:2,py:1,backgroundColor:"grey.50"},onClick:u,children:[e.jsx(O,{sx:{fontWeight:"bold"},children:k}),e.jsxs(O,{sx:{display:"flex",alignItems:"center"},children:[_,x?e.jsx(O,{component:ae,icon:ya,sx:{transform:f?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",fontSize:"2rem"}}):null]})]}),e.jsx(pr,{in:f,children:e.jsx(Kr,{children:A})})]})}qt.propTypes={title:E.string.isRequired,defaultValue:E.bool,value:E.bool,actions:E.node,children:E.node,onChange:E.func,showExpand:E.bool};const zt={width:24,height:24,body:'<path fill="currentColor" d="M11.95 18q.525 0 .888-.363t.362-.887q0-.525-.362-.888t-.888-.362q-.525 0-.887.363t-.363.887q0 .525.363.888t.887.362Zm.05 4q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Zm0-2q3.35 0 5.675-2.325T20 12q0-3.35-2.325-5.675T12 4Q8.65 4 6.325 6.325T4 12q0 3.35 2.325 5.675T12 20Zm0-8Zm.1-4.3q.625 0 1.088.4t.462 1q0 .55-.337.975t-.763.8q-.575.5-1.012 1.1t-.438 1.35q0 .35.263.588t.612.237q.375 0 .638-.25t.337-.625q.1-.525.45-.938t.75-.787q.575-.55.988-1.2t.412-1.45q0-1.275-1.038-2.087T12.1 6q-.95 0-1.812.4T8.975 7.625q-.175.3-.113.638t.338.512q.35.2.725.125t.625-.425q.275-.375.688-.575t.862-.2Z"/>'};function _s({config:k={},onChange:_=()=>{},disabled:A=!1}){const R=["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],j={origin:{override:!1,value:"*",smart:!0},methods:{override:!1,value:[...R]},allowedHeaders:{override:!1,value:"*"},exposedHeaders:{override:!1,value:"*"},maxAge:{override:!1,value:void 0},optionsSuccessStatus:{override:!1,value:204},preflightContinue:{override:!1,value:!1},credentials:{override:!1,value:!1},...kn(k,Pe)},{t:y}=ee(),x=(f,{override:u,value:t,smart:a})=>{const r={...j?.[f]};!Pe(a)&&f==="origin"&&(r.smart=a),Pe(u)||(r.override=u),Pe(t)||(r.value=t),_({...j,[f]:r})},o=[{title:y("responseHeaderPolicy.form.cors.origin"),override:j.origin.override,smart:j.origin.smart,name:"origin",required:!0,value:j.origin.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{multiline:!0,minRows:4,maxRows:10,disabled:A,variant:"outlined",size:"small",placeholder:y("responseHeaderPolicy.form.cors.originPlaceholder"),helperText:y("responseHeaderPolicy.form.cors.originHelperText"),value:j.origin.value,onChange:f=>{x("origin",{value:f.target.value})}})})},{title:y("responseHeaderPolicy.form.cors.methods"),name:"methods",override:j.methods.override,required:!0,value:j.methods.value,content:e.jsx(rt,{sx:{flexDirection:"row"},children:R.map(f=>e.jsx(oe,{control:e.jsx(qe,{size:"small",disabled:A,checked:j.methods.value.includes(f),onChange:(u,t)=>{x("methods",{value:t?[...j.methods.value,f]:j.methods.value.filter(a=>a!==f)})}}),label:f},f))})},{title:y("responseHeaderPolicy.form.cors.allowedHeaders"),override:j.allowedHeaders.override,name:"allowedHeaders",value:j.allowedHeaders.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{multiline:!0,minRows:3,maxRows:7,disabled:A,variant:"outlined",size:"small",placeholder:y("responseHeaderPolicy.form.cors.allowedHeadersPlaceholder"),helperText:y("responseHeaderPolicy.form.cors.allowedHeadersHelperText"),value:j.allowedHeaders.value,onChange:f=>{x("allowedHeaders",{value:f.target.value})}})})},{title:y("responseHeaderPolicy.form.cors.exposedHeaders"),override:j.exposedHeaders.override,name:"exposedHeaders",value:j.exposedHeaders.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{multiline:!0,minRows:3,maxRows:7,disabled:A,variant:"outlined",size:"small",placeholder:y("responseHeaderPolicy.form.cors.exposedHeadersPlaceholder"),helperText:y("responseHeaderPolicy.form.cors.exposedHeadersHelperText"),value:j.exposedHeaders.value,onChange:f=>{x("exposedHeaders",{value:f.target.value})}})})},{title:y("responseHeaderPolicy.form.cors.maxAge"),override:j.maxAge.override,name:"maxAge",value:j.maxAge.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{type:"number",variant:"outlined",size:"small",disabled:A,value:j.maxAge.value,onChange:f=>{x("maxAge",{value:f.target.value})},helperText:y("responseHeaderPolicy.form.cors.maxAgeHelperText")})})},{title:y("responseHeaderPolicy.form.cors.optionsSuccessStatus"),override:j.optionsSuccessStatus.override,name:"optionsSuccessStatus",value:j.optionsSuccessStatus.value,content:e.jsx(K,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{type:"number",variant:"outlined",size:"small",disabled:A,value:j.optionsSuccessStatus.value,onChange:f=>{x("optionsSuccessStatus",{value:f.target.value})}})})},{title:y("responseHeaderPolicy.form.cors.preflightContinue"),override:j.preflightContinue.override,name:"preflightContinue",value:j.preflightContinue.value,control:e.jsx(pe,{size:"small",disabled:A,checked:j.preflightContinue.value,onChange:(f,u)=>{x("preflightContinue",{value:u})}})},{title:y("responseHeaderPolicy.form.cors.credentials"),override:j.credentials.override,name:"credentials",value:j.credentials.value,control:e.jsx(pe,{size:"small",disabled:A,checked:j.credentials.value,onChange:(f,u)=>{x("credentials",{value:u})}})}];Sn(()=>{_(j)});const p={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(rt,{children:o.map((f,u)=>e.jsxs(z.Fragment,{children:[e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(oe,{sx:{mt:u===0?0:1},control:f.control||e.jsx(O,{sx:{pl:1.35}}),label:f.title,required:f.required},`${f.name}_form`),e.jsxs(O,{children:[f.name==="origin"?e.jsx(oe,{control:e.jsx(qe,{size:"small",checked:f.smart,color:"primary",disabled:A,onChange:()=>{x(f.name,{smart:!f.smart})}}),label:e.jsxs(e.Fragment,{children:[y("responseHeaderPolicy.form.cors.smartMode"),e.jsx(ce,{title:y("responseHeaderPolicy.form.cors.smartModeHelperText"),children:e.jsx(O,{component:ae,icon:zt,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:p},`${f.name}_smart`):null,e.jsx(oe,{control:e.jsx(qe,{size:"small",checked:f.override,color:"warning",disabled:A,onChange:()=>{x(f.name,{override:!f.override})}}),label:e.jsxs(e.Fragment,{children:[y("responseHeaderPolicy.form.originOverride"),e.jsx(ce,{title:y("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(O,{component:ae,icon:zt,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...p,mr:0}},`${f.name}_override`)]})]}),f.content?e.jsx(O,{sx:{ml:3.5},children:f.content},`${f.name}_content`):null]},f.name))})}_s.propTypes={config:E.object,onChange:E.func,disabled:E.bool};function ws({value:k,onChange:_=()=>{},disabled:A=!1}){const R="sameorigin",j=[{label:"DENY",value:"deny"},{label:"SAMEORIGIN (default)",value:"sameorigin"}],y=x=>{_({action:x.target.value})};return z.useEffect(()=>{k===!0&&_({action:R})},[k]),e.jsx(O,{children:e.jsx(K,{children:e.jsx(Pn,{row:!0,children:j.map(x=>e.jsx(oe,{value:x.value,control:e.jsx($n,{size:"small",disabled:A,checked:x.value===k?.action,onChange:y,sx:{p:.75}}),label:x.label},x.value))})})})}ws.propTypes={value:E.oneOfType([E.string,E.bool]).isRequired,onChange:E.func,disabled:E.bool};function ks({value:k,onChange:_=()=>{},disabled:A=!1}){const R="strict-origin-when-cross-origin",j=[{label:"no-referrer",value:"no-referrer"},{label:"no-referrer-when-downgrade",value:"no-referrer-when-downgrade"},{label:"origin",value:"origin"},{label:"origin-when-cross-origin",value:"origin-when-cross-origin"},{label:"same-origin",value:"same-origin"},{label:"strict-origin",value:"strict-origin"},{label:"strict-origin-when-cross-origin (default)",value:"strict-origin-when-cross-origin"},{label:"unsafe-url",value:"unsafe-url"}],y=x=>{_({policy:x.target.value})};return z.useEffect(()=>{k===!0&&_({policy:R})},[k]),e.jsx(O,{children:e.jsx(K,{children:e.jsx(Pn,{children:j.map(x=>e.jsx(oe,{value:x.value,control:e.jsx($n,{size:"small",disabled:A,checked:x.value===k?.policy,onChange:y,sx:{p:.75}}),label:x.label},x.value))})})})}ks.propTypes={value:E.oneOfType([E.string,E.bool]).isRequired,onChange:E.func,disabled:E.func};function Ss({value:k,onChange:_=()=>{},disabled:A=!1}){const R={"default-src":["'self'"],"base-uri":["'self'"],"font-src":["'self'","https:","data:"],"form-action":["'self'"],"frame-ancestors":["'self'"],"img-src":["'self'","data:"],"object-src":["'none'"],"script-src":["'self'"],"script-src-attr":["'none'"],"style-src":["'self'","https:","'unsafe-inline'"],"upgrade-insecure-requests":[]};function j(f){return Object.keys(f).map(u=>[u,f[u].filter(Boolean).join(" ")].filter(Boolean).join(" ")).filter(Boolean).join(`
|
|
169
|
+
`)}const y=j(k?.directives||R),[x,o]=z.useState(y),p=f=>{o(f.target.value);const u=f.target.value.split(`
|
|
170
|
+
`).reduce((t,a)=>{const[r,...n]=a.split(" ");return t[r]=n.filter(s=>s!==""),t},{});_({useDefaults:!1,directives:u})};return z.useEffect(()=>{k===!0&&(_({useDefaults:!1,directives:R}),o(j(R)))},[k]),e.jsx(O,{sx:{mt:1},children:e.jsx(K,{fullWidth:!0,children:e.jsx(V,{fullWidth:!0,multiline:!0,disabled:A,rows:12,size:"small",value:x,onChange:p})})})}Ss.propTypes={value:E.oneOfType([E.object,E.bool]).isRequired,onChange:E.func,disabled:E.bool};function Cs({config:k={},onChange:_=()=>{},disabled:A=!1}){const R={contentSecurityPolicy:{override:!1,value:!1},referrerPolicy:{override:!1,value:!1},xFrameOptions:{override:!1,value:!1},xPoweredBy:{override:!1,value:!0},xXssProtection:{override:!1,value:!1},...kn(k,Pe)},{t:j}=ee(),y=(p,{override:f,value:u})=>{const t={...R?.[p]};Pe(f)||(t.override=f),Pe(u)||(t.value=u),_({...R,[p]:t})},x=[{title:"Content-Security-Policy",name:"contentSecurityPolicy",override:R.contentSecurityPolicy.override,value:!!R.contentSecurityPolicy.value,content:e.jsx(Ss,{disabled:A,value:R.contentSecurityPolicy.value,onChange:p=>{y("contentSecurityPolicy",{value:p})}}),onChange(p){y("contentSecurityPolicy",{value:p})}},{title:"Referrer-Policy",name:"referrerPolicy",override:R.referrerPolicy.override,value:!!R.referrerPolicy.value,content:e.jsx(ks,{disabled:A,value:R.referrerPolicy.value,onChange:p=>{y("referrerPolicy",{value:p})}}),onChange(p){y("referrerPolicy",{value:p})}},{title:"X-Frame-Options",name:"xFrameOptions",override:R.xFrameOptions.override,value:!!R.xFrameOptions.value,content:e.jsx(ws,{disabled:A,value:R.xFrameOptions.value,onChange:p=>{y("xFrameOptions",{value:p})}}),onChange(p){y("xFrameOptions",{value:p})}},{title:"Disable X-Powered-By",name:"xPoweredBy",override:R.xPoweredBy.override,value:R.xPoweredBy.value,content:null,onChange(p){y("xPoweredBy",{value:p})}},{title:"X-XSS-Protection",name:"xXssProtection",override:R.xXssProtection.override,value:R.xXssProtection.value,content:null,onChange(p){y("xXssProtection",{value:p})}}];Sn(()=>{_(R)});const o={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(rt,{children:x.map((p,f)=>e.jsxs(z.Fragment,{children:[e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(oe,{sx:{mt:f===0?0:1},control:e.jsx(pe,{size:"small",disabled:A,checked:p.value,onChange:()=>{p.onChange(!p.value)}},`${p.name}_switch`),label:p.title},`${p.name}_form`),p.value?e.jsx(oe,{control:e.jsx(qe,{size:"small",checked:p.override,color:"warning",disabled:A,onChange:()=>{y(p.name,{override:!p.override})}}),label:e.jsxs(e.Fragment,{children:[j("responseHeaderPolicy.form.originOverride"),e.jsx(ce,{title:j("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(O,{component:ae,icon:zt,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...o,mr:0}}):null]}),p.value&&p.content?e.jsx(O,{sx:{ml:3.7},children:p.content},`${p.name}_content`):null]},p.name))})}Cs.propTypes={config:E.object,onChange:E.func,disabled:E.bool};function Rs({ref:k=null}){const{t:_}=z.useContext(fe),R=$e()?.transitions?.duration?.leavingScreen||300,j=xe({mode:"add",show:!1,loadingButton:!1,callback:te,get dialogTitle(){return this.mode==="edit"?_("responseHeaderPolicy.edit"):this.mode==="view"?_("responseHeaderPolicy.view"):_("responseHeaderPolicy.add")},cors:null,securityHeader:null,enableCORS:!1}),{handleSubmit:y,control:x,setValue:o,reset:p,formState:{errors:f}}=ge({mode:"onChange",defaultValues:{name:"",description:""}}),u=T(()=>{p(),j.mode="add",j.enableCORS=!1,j.cors=null,j.securityHeader=null}),t=T(()=>{j.show=!1,setTimeout(()=>{u()},R)}),a=T((d=te,h=null)=>{j.callback=d,j.loadingButton=!1,j.show=!0,h&&(h.id?j.mode="edit":j.mode="view",o("name",h.name),o("description",h.description),j.cors=ha(h.cors),j.securityHeader=fa(h.securityHeader),j.enableCORS=!!h.cors)});z.useImperativeHandle(k,()=>({open:a,close:t}),[a,t]);const r=T(()=>{j.loadingButton=!1}),n=j.mode==="view",s=T(d=>{const h=ma(j.cors),g=pa(j.securityHeader),w=_n({...d,cors:j.enableCORS?JSON.stringify(h):null,securityHeader:JSON.stringify(g)});j.loadingButton=!0,j.callback(w,{close:t,done:r})}),c=T(d=>d?.trim()?!0:_("common.requiredErrorText",{name:_("accessPolicy.form.name")})),i=d=>{j.securityHeader=d},l=d=>{j.cors=d};return e.jsx(Se,{open:j.show,title:j.dialogTitle,onClose:t,PaperProps:{style:{minHeight:"unset",width:900,maxWidth:"100%"}},actions:e.jsx(Q,{color:"primary",autoFocus:!0,variant:"contained",onClick:y(s),loading:j.loadingButton,loadingPosition:"start",children:_("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(F,{name:"name",control:x,rules:{validate:c},render:({field:d})=>e.jsx(V,{fullWidth:!0,required:!0,size:"small",margin:"dense",disabled:n,placeholder:_("accessPolicy.form.namePlaceholder"),label:_("accessPolicy.form.name"),error:!!f?.name?.message,helperText:f?.name?.message||" ",...d})}),e.jsx(F,{name:"description",control:x,render:({field:d})=>e.jsx(V,{fullWidth:!0,multiline:!0,size:"small",margin:"dense",disabled:n,minRows:3,maxRows:7,placeholder:"Description",label:"Description",helperText:f?.description?.message||" ",...d})}),e.jsx(qt,{title:"Cross-origin resource sharing (CORS)",value:j.enableCORS,onChange:d=>{n||(j.enableCORS=d)},showExpand:!1,actions:e.jsx(pe,{size:"small",disabled:n,checked:j.enableCORS}),children:e.jsx(_s,{config:j.cors,onChange:l,disabled:n})}),e.jsx("br",{}),e.jsx(qt,{title:"Security Headers",children:e.jsx(Cs,{config:j.securityHeader,onChange:i,disabled:n})})]})})}Rs.propTypes={ref:E.any};function va(){const{t:k,locale:_}=ee(),{blocklet:A}=le(),{api:R}=se(),j=A?.meta?.did,y=z.useRef(null),x=z.useRef(null),{confirmApi:o,confirmHolder:p}=Ie(),f=()=>{},u=Ve(async()=>{const{responseHeaderPolicies:d}=await R.getBlockletResponseHeaderPolicies({input:{did:j}});return st(d.map(h=>ga(h)),h=>h.isProtected?1:0)}),t=u.data||[],a=T(()=>{y.current.open(async(d,{close:h,done:g})=>{await ve(async()=>{await R.addBlockletResponseHeaderPolicy({input:{did:j,data:d}}),Z.success(k("common.succeeded")),u.run(),h()}),g()})}),r=T(d=>{y.current.open((h,{close:g,done:w})=>{w(),g()},Oe(d,["id"]))}),n=T(d=>{y.current.open(async(h,{close:g,done:w})=>{await ve(async()=>{await R.updateBlockletResponseHeaderPolicy({input:{did:j,data:{...h,id:d.id}}}),Z.success(k("common.succeeded")),u.run(),g()}),w()},d)}),s=T(d=>{o.open({title:k("responseHeaderPolicy.delete.title"),content:k("responseHeaderPolicy.delete.description"),confirmButtonText:k("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:k("common.cancel"),onConfirm(h){ve(async()=>{await R.deleteBlockletResponseHeaderPolicy({input:{did:j,id:d.id}}),Z.success(k("common.succeeded")),u.run(),h()})}})}),c={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(d,{dataIndex:h},g){if(x.current?.contains(g.target)){const w=t[h];r(w)}}},i=[e.jsx(ie,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:k("common.refresh")},"refresh"),e.jsx(ie,{size:"small",variant:"contained",onClick:a,children:k("common.add")},"add")],l=[{label:k("common.name"),name:"name",options:{customBodyRenderLite(d){const h=t[d],g=h.isProtected?e.jsx(ce,{title:"Built-in policy, can't edit",children:e.jsx(O,{component:ae,icon:wn,sx:{fontSize:16}})}):null;return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:.5},children:[g," ",h.name]})}}},{label:k("common.description"),name:"description"},{label:k("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(d){const h=t[d];return e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:0},onClick:g=>g.stopPropagation(),children:[h.isProtected?e.jsx(ce,{title:k("common.view"),children:e.jsx(ue,{size:"small",onClick:()=>{r(h,d)},children:e.jsx(ae,{icon:xs,fontSize:18})})}):null,h.isProtected?null:e.jsx(ce,{title:k("common.edit"),children:e.jsx(ue,{size:"small",onClick:()=>{n(h,d)},color:"success",children:e.jsx(ae,{icon:lt,fontSize:18})})}),h.isProtected?null:e.jsx(ce,{title:k("common.delete"),children:e.jsx(ue,{size:"small",onClick:()=>{s(h,d)},color:"error",children:e.jsx(ae,{icon:ot,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:2},ref:x,children:[e.jsx(at,{verticalKeyWidth:100,locale:_,title:k("responseHeaderPolicy.title"),data:t,columns:l,customButtons:i,options:c,loading:u.loading,onChange:f}),e.jsx(Rs,{ref:y}),p]})}const As=({tabs:k,blocklet:_,ancestors:A=[],depth:R=1,t:j})=>{const y=[...A.map(o=>o.meta.did),_.meta.did].join("/"),x=!A?.length;k.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:Math.max(1,R-1)*2},children:[x?e.jsx(yr,{size:24,blocklet:_,style:{borderRadius:0}}):e.jsx(vr,{size:24,blocklet:_,ancestors:A,style:{borderRadius:0}}),e.jsx(O,{sx:{ml:2},children:e.jsx(O,{sx:{color:"text.primary"},children:x?j("blocklet.component.container"):fn.getDisplayName(_,!0)})})]},y),value:y}),_.children.length>0&&_.children.forEach(o=>{As({tabs:k,blocklet:o,ancestors:[...A,_],depth:R+1,t:j})})};function ba({blocklet:k,onUpdate:_=()=>{},...A}){const{t:R}=ee(),j=xe({expandPref:!0,expandSecurity:!0}),[y,x]=xn(),o=y.get("tab")||"general",p=On(),[f,u]=z.useState(!1),t=[];t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-general",sx:{display:"flex",alignItems:"center"},children:[e.jsx(ai,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.general")})]},"general"),value:"general"}),t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-security-group",sx:{display:"flex",alignItems:"center"},children:[e.jsx(O,{sx:{ml:-2,transform:"translateY(2px)"},children:j.expandSecurity?e.jsx(Pt,{fontSize:"inherit"}):e.jsx(Jt,{fontSize:"inherit"})}),e.jsx(Tt,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.security")})]},"securityGroup"),value:"securityGroup"}),j.expandSecurity&&(t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(Tt,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("securityRule.title")})]},"security"),value:"security"}),t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(ei,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("accessPolicy.title")})]},"accessPolicy"),value:"accessPolicy"}),t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(ae,{fontSize:24,style:{flexShrink:0},icon:hi}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("responseHeaderPolicy.title")})]},"responseHeaderPolicy"),value:"responseHeaderPolicy"})),t.push({label:e.jsxs(O,{sx:{display:"flex",alignItems:"center"},"data-cy":"configuration-tab-authentication",children:[e.jsx(si,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.login")})]},"authentication"),value:"authentication"}),t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-notification",sx:{display:"flex",alignItems:"center"},children:[e.jsx(ri,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.notification")})]},"notification"),value:"notification"}),t.push({label:e.jsxs(O,{"data-cy":"configuration-tab-preference",sx:{display:"flex",alignItems:"center"},children:[e.jsx(O,{sx:{ml:-2,transform:"translateY(2px)"},children:j.expandPref?e.jsx(Pt,{fontSize:"inherit"}):e.jsx(Jt,{fontSize:"inherit"})}),e.jsx(br,{sx:{fontSize:24}}),e.jsx(O,{sx:{ml:2,color:"text.primary"},children:R("common.preferences")})]},"preference"),value:"preference"});const a=t.find(c=>c.value===o);j.expandPref&&As({tabs:t,blocklet:k,t:R});const r=c=>{c==="preference"?j.expandPref=!j.expandPref:c==="securityGroup"?j.expandSecurity=!j.expandSecurity:x(i=>(c==="general"?i.delete("tab"):i.set("tab",c),i)),u(!1)};let n=null;o==="general"?n=e.jsx(Di,{blocklet:k,onUpdate:_}):o==="security"?n=e.jsx(da,{}):o==="accessPolicy"?n=e.jsx(xa,{}):o==="responseHeaderPolicy"?n=e.jsx(va,{}):o==="authentication"?n=e.jsx(fs,{}):o==="notification"?n=e.jsx(Ki,{}):n=e.jsx(Er,{id:o});const s=z.useMemo(()=>({position:"relative",minHeight:"66vh",height:"100%",overflow:"hidden"}),[]);return e.jsxs(ja,{...A,children:[p&&e.jsxs(e.Fragment,{children:[e.jsxs(O,{sx:{color:"primary.main",position:"sticky",top:0,zIndex:2,bgcolor:"background.default",display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[e.jsx(ue,{onClick:()=>u(!0),sx:{mr:1},children:e.jsx(gr,{})}),e.jsx(O,{children:a?.label})]}),e.jsx(xr,{anchor:"left",open:f,onClose:()=>u(!1),slotProps:{paper:{sx:{width:260,".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal"}}}},children:e.jsx(Ue,{tabs:t,current:o,orientation:"vertical",onChange:r,sx:{borderRight:1,height:"100%",borderColor:"divider"}})})]}),e.jsxs(ht,{container:!0,spacing:4,columns:24,children:[!p&&e.jsx(ht,{size:{xs:24,sm:7,md:5},children:e.jsx(Ue,{tabs:t,current:o,orientation:"vertical",onChange:r,sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),e.jsx(ht,{size:{xs:24,sm:17,md:19},children:e.jsx(O,{style:s,children:n})})]})]})}ba.propTypes={blocklet:E.object.isRequired,onUpdate:E.func};const ja=je.div`
|
|
171
171
|
.MuiTab-root {
|
|
172
172
|
text-align: left;
|
|
173
173
|
align-items: flex-start;
|
|
@@ -176,4 +176,4 @@ ${p("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.js
|
|
|
176
176
|
.Mui-selected {
|
|
177
177
|
font-weight: bold;
|
|
178
178
|
}
|
|
179
|
-
`;export{
|
|
179
|
+
`;export{ba as default};
|