@abtnode/webapp 1.17.8-beta-20260106-113136-b3c09e14 → 1.17.8-beta-20260108-021819-e099f0ca
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-DWVMAxzn.js → AdapterDayjs-Chnfr9fe.js} +1 -1
- package/dist/assets/{Add-DSHUmuh2.js → Add-b-MNk7UB.js} +1 -1
- package/dist/assets/ArrowDropDown-lsZjWbH5.js +1 -0
- package/dist/assets/{Autocomplete-CafCM_25.js → Autocomplete-79tADtg2.js} +1 -1
- package/dist/assets/{Breadcrumbs-DwWBB4-B.js → Breadcrumbs-Cqjt-kp8.js} +1 -1
- package/dist/assets/{ButtonGroup-C1HewoiR.js → ButtonGroup-C_JbniJW.js} +1 -1
- package/dist/assets/{CSSTransition-1BwLUUYd.js → CSSTransition-DinXVMZy.js} +1 -1
- package/dist/assets/{CallMerge-BQb_v7zQ.js → CallMerge-CF5jo3Pw.js} +1 -1
- package/dist/assets/{CardContent-B53G0-HU.js → CardContent-CYNmFsYJ.js} +1 -1
- package/dist/assets/{ChevronLeft-CaPH--HT.js → ChevronLeft-Byy2_Dj8.js} +1 -1
- package/dist/assets/{ChevronRight-CtPp_MpO.js → ChevronRight-BKFXnJ7g.js} +1 -1
- package/dist/assets/{Clear-BBluvTPc.js → Clear-Chg9fOPG.js} +1 -1
- package/dist/assets/{Delete-9ESwe_tH.js → Delete-B306vkSB.js} +1 -1
- package/dist/assets/{DeleteOutline-CK2Vy8gP.js → DeleteOutline-BjSm7PCr.js} +1 -1
- package/dist/assets/{Done-Cc0u-Lkn.js → Done-Bh0vP7e6.js} +1 -1
- package/dist/assets/{Edit-D1Klg2r6.js → Edit-DFmlgA7E.js} +1 -1
- package/dist/assets/EditOutlined-Qskj3-tY.js +1 -0
- package/dist/assets/{ErrorOutline-BoB93pXx.js → ErrorOutline-CjKNiJFO.js} +1 -1
- package/dist/assets/{FilterList-DjsH6fTI.js → FilterList-Dphn1UXx.js} +1 -1
- package/dist/assets/{Google-wvuc_gx7.js → Google-C0G3l0jL.js} +1 -1
- package/dist/assets/{HelpOutline-CM_Ykzlc.js → HelpOutline--A0maMxb.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-xhzKRGfY.js → KeyboardArrowDown-CD6n37Y9.js} +1 -1
- package/dist/assets/{Launch-DlhEZ9Bw.js → Launch-Cor8d4pT.js} +1 -1
- package/dist/assets/{Link-DfMegObq.js → Link-Mg5UlAaZ.js} +1 -1
- package/dist/assets/{ListItemButton-DmY4JAPa.js → ListItemButton-C8XIzvy_.js} +1 -1
- package/dist/assets/{ListSubheader-B41Y1ZMB.js → ListSubheader-CHT01bOG.js} +1 -1
- package/dist/assets/{LoadingButton-Cj4ijk42.js → LoadingButton-DtnAWL1w.js} +1 -1
- package/dist/assets/{MoreVert-BQdkfudm.js → MoreVert-KNjOpSoE.js} +1 -1
- package/dist/assets/{OpenInNew-GavEOug8.js → OpenInNew-DGDd5qxt.js} +1 -1
- package/dist/assets/{Refresh-C5IecY_i.js → Refresh-B0_3c6OW.js} +1 -1
- package/dist/assets/{Replay-BLAjtrmV.js → Replay-BzP784vV.js} +1 -1
- package/dist/assets/{Search-DsDROQ8Z.js → Search-CUoYhy1v.js} +1 -1
- package/dist/assets/{Stepper-DpZ7eOjv.js → Stepper-DfUO9buC.js} +1 -1
- package/dist/assets/{TableSearch-B9TJh3X_.js → TableSearch-DxZYknBa.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CJ8NJ0D1.js → ToggleButtonGroup-BwLu2zCu.js} +1 -1
- package/dist/assets/{UnfoldMore-wahbC_eH.js → UnfoldMore-DvSw9pGy.js} +1 -1
- package/dist/assets/{Verified-CR7dtVpN.js → Verified-CfonAx-G.js} +1 -1
- package/dist/assets/{VerifiedUser-CJqNBrd2.js → VerifiedUser-wCwGdsz1.js} +1 -1
- package/dist/assets/{ViewList-CmgkgU2_.js → ViewList-DhdvL6AT.js} +1 -1
- package/dist/assets/_createAggregator-BLxu5C4t.js +1 -0
- package/dist/assets/{actions-DFw06nT4.js → actions-D1YtdqKL.js} +1 -1
- package/dist/assets/{actions-BGmJ3r4b.js → actions-Wo9kGXdj.js} +1 -1
- package/dist/assets/{agreement-nsoxnYhM.js → agreement-07HiBYSX.js} +3 -3
- package/dist/assets/api-eF9wxSJp.js +1 -0
- package/dist/assets/{appearance-DPQCzdhZ.js → appearance-CKF7Bo6h.js} +1 -1
- package/dist/assets/{ar-BukCw0OI.js → ar-BHqjWgUQ.js} +2 -2
- package/dist/assets/{audit-logs-C1Fzb4ps.js → audit-logs-CLt2l7-q.js} +2 -2
- package/dist/assets/{base-chart-CEDitl1S.js → base-chart-_0APPWGp.js} +1 -1
- package/dist/assets/{blocklet-CQ-S_G-T.js → blocklet-ClPWX-SV.js} +1 -1
- package/dist/assets/{chain-T1WmG8fp.js → chain-Bg9mny_E.js} +1 -1
- package/dist/assets/{click-to-copy-BtM6Ocbq.js → click-to-copy-BbJJzGI1.js} +1 -1
- package/dist/assets/cloneDeep-DNOsGRuG.js +1 -0
- package/dist/assets/{config-navigation-nzNCj2pe.js → config-navigation-B-CtKO70.js} +3 -3
- package/dist/assets/connect-2JDWTFDP.js +5 -0
- package/dist/assets/{connect-to-YFMYu-C6.js → connect-to-CBEHT895.js} +1 -1
- package/dist/assets/{cssMode-CorZ9Trm.js → cssMode-U7KzpQEJ.js} +1 -1
- package/dist/assets/{de-Br0tDZam.js → de-QUGQFv2K.js} +1 -1
- package/dist/assets/{delete-confirm-DkYJPW8j.js → delete-confirm-Cx4JPY2I.js} +1 -1
- package/dist/assets/depsEqual-Cvglsxh5.js +1 -0
- package/dist/assets/{detail-B2tLxU0Q.js → detail-Cgws9Fjd.js} +3 -3
- package/dist/assets/{domains-D6W5MF-p.js → domains-BJzrDugH.js} +2 -2
- package/dist/assets/{download-CMbpTIK1.js → download-Df1TrhTI.js} +1 -1
- package/dist/assets/{edit.svg-DA3pWWpd.js → edit.svg-833vjqGH.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-Epiq9rij.js +1 -0
- package/dist/assets/engine-a9f8P0CB.js +1 -0
- package/dist/assets/{es-D_e0gGgp.js → es-C4w6cL07.js} +2 -2
- package/dist/assets/{fr-DXizOT4b.js → fr-Bq3UipEu.js} +2 -2
- package/dist/assets/{freemarker2-B35GIWEl.js → freemarker2-J5nZkQuM.js} +1 -1
- package/dist/assets/{get-safe-url-BtHUKeta.js → get-safe-url-QppwE77w.js} +1 -1
- package/dist/assets/getValidReactChildren-Cjo-LFyx.js +1 -0
- package/dist/assets/{graphqlMode-BhjTwCqd.js → graphqlMode-5yY_akok.js} +2 -2
- package/dist/assets/{handlebars-DGxR4b_w.js → handlebars-DfBT6Rl2.js} +1 -1
- package/dist/assets/{hi-D2FEb_Tx.js → hi-DGZy0DLh.js} +2 -2
- package/dist/assets/{html-Dl26d1wf.js → html-BBpT31Z8.js} +1 -1
- package/dist/assets/{html-title-DdUp_-5h.js → html-title-BpNgi7iw.js} +1 -1
- package/dist/assets/{htmlMode-zyg79iHD.js → htmlMode-CDF4YwlA.js} +1 -1
- package/dist/assets/{id-Dw9URVwP.js → id-DOzDilAf.js} +2 -2
- package/dist/assets/{iframe-naOtT0ea.js → iframe-CH8rbppJ.js} +1 -1
- package/dist/assets/{index-B5a5GywJ.js → index-0NOALS_P.js} +1 -1
- package/dist/assets/{index-9I_iGd-v.js → index-3MwDYHdN.js} +9 -9
- package/dist/assets/index-B31H3tAk.js +1 -0
- package/dist/assets/index-B3tcK3_z.js +179 -0
- package/dist/assets/{index-B5Gr8NCp.js → index-B4fcaU-r.js} +2 -2
- package/dist/assets/{index--8pMPQd4.js → index-B6x6Mq9n.js} +1 -1
- package/dist/assets/{index-MY2K6w0a.js → index-B8qqbKQt.js} +1 -1
- package/dist/assets/{index-B32KxiCS.js → index-BBe9oV9e.js} +1 -1
- package/dist/assets/{index-CH66h8Bz.js → index-BHQcEGDq.js} +1 -1
- package/dist/assets/{index-BjFIjVRr.js → index-BJVvRV0h.js} +1 -1
- package/dist/assets/{index-D_9cPML4.js → index-BRSm_uSW.js} +3 -3
- package/dist/assets/{index-CajyH0Pt.js → index-BSBkhGl0.js} +1 -1
- package/dist/assets/{index-BWhjxKXQ.js → index-BVJB29cJ.js} +1 -1
- package/dist/assets/{index-BRe92Q_R.js → index-BbND9whL.js} +1 -1
- package/dist/assets/{index-Brq4w3lW.js → index-BdVOugOI.js} +1 -1
- package/dist/assets/index-Bek3Nxot.js +2900 -0
- package/dist/assets/{index-CUMme3nC.js → index-BfTQCMKf.js} +1 -1
- package/dist/assets/{index-DJvzDb5Q.js → index-BfnrUUfH.js} +1 -1
- package/dist/assets/{index-BwNCJNhy.js → index-BikUP_wv.js} +1 -1
- package/dist/assets/{index-BWGe4dJb.js → index-BqrWLXQw.js} +3 -3
- package/dist/assets/{index-BUZBDqqG.js → index-CBHMH4Z7.js} +1 -1
- package/dist/assets/{index-DgL9xnFX.js → index-CDd3s2GI.js} +1 -1
- package/dist/assets/{index-BYUmgdKD.js → index-CHgpIuFF.js} +3 -3
- package/dist/assets/{index-Bn367fJd.js → index-CKWS_NIP.js} +33 -33
- package/dist/assets/{index-C2cbrgVU.js → index-CZX-K9Eg.js} +1 -1
- package/dist/assets/{index-CqYZvIgm.js → index-CaxsY_au.js} +3 -3
- package/dist/assets/{index-8NfiZJjD.js → index-CbK68mel.js} +1 -1
- package/dist/assets/{index-BZiL2FK1.js → index-CbnvHmOA.js} +1 -1
- package/dist/assets/{index-D6evhDRM.js → index-Crqqt-AN.js} +1 -1
- package/dist/assets/{index-0xQC_RX5.js → index-CsTd8Q4H.js} +1 -1
- package/dist/assets/{index-CYUImSxu.js → index-DCHzmqFc.js} +1 -1
- package/dist/assets/{index-CgaVkwyv.js → index-DJfXtT-f.js} +1 -1
- package/dist/assets/index-DSjaZAu3.js +1 -0
- package/dist/assets/{index-CRl4QsFf.js → index-DXfP6ckA.js} +2 -2
- package/dist/assets/{index-Beuvm8_y.js → index-D_L4A5jU.js} +1 -1
- package/dist/assets/{index-BGxDum8X.js → index-DqkfLKvE.js} +1 -1
- package/dist/assets/{index-B_lfyJAT.js → index-Dr7VuVvC.js} +1 -1
- package/dist/assets/{index-CNgBOpOW.js → index-DrsAyGr6.js} +1 -1
- package/dist/assets/{index-CaBQPbJb.js → index-FdUIQyuT.js} +1 -1
- package/dist/assets/{index-DDM20tun.js → index-HqyXcG7M.js} +3 -3
- package/dist/assets/{index-CNsTH-sC.js → index-WHQs_PkC.js} +1 -1
- package/dist/assets/{index-C_yKF6eG.js → index-cZdqepfp.js} +1 -1
- package/dist/assets/{index-C_xCzC4h.js → index-iqFfmV_z.js} +1 -1
- package/dist/assets/{index-BVBi2pvN.js → index-jHF3D4cy.js} +1 -1
- package/dist/assets/{index-CzlMX9ae.js → index-m8sITmne.js} +1 -1
- package/dist/assets/{index-BTQvwhJ3.js → index-tNmk7CjJ.js} +1 -1
- package/dist/assets/{index.esm-Bhe9PyJD.js → index.esm-WZ7Avw4n.js} +1 -1
- package/dist/assets/{install-from-url-BSRJz2Np.js → install-from-url-PuHPLadE.js} +1 -1
- package/dist/assets/{invitation-C2EDl-5j.js → invitation-Bi2QgUpB.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-DRlBVNUG.js → is-path-prefix-equal-BAfeJQQq.js} +1 -1
- package/dist/assets/{item-BBL8EstT.js → item-hbtsGcq0.js} +1 -1
- package/dist/assets/{ja-DBxpsmGJ.js → ja-DMq-YXDX.js} +2 -2
- package/dist/assets/{javascript-Bw5GnACP.js → javascript-CH6uPFyX.js} +1 -1
- package/dist/assets/{jsonMode-CYcndJYD.js → jsonMode-B3mvgwT0.js} +1 -1
- package/dist/assets/{ko-CCAdSyce.js → ko-BrYbXurh.js} +2 -2
- package/dist/assets/{liquid-ClyO3pFK.js → liquid-BoDus-ho.js} +1 -1
- package/dist/assets/{list-header-CQdhtCZz.js → list-header-C3SJDsfy.js} +1 -1
- package/dist/assets/{lock.svg-B7I2PtUy.js → lock.svg-CGmlgpmU.js} +1 -1
- package/dist/assets/{log-BztLHiQf.js → log-D4BWVj7G.js} +1 -1
- package/dist/assets/{lottie-react.esm-Cq3-epqH.js → lottie-react.esm-ayFZjR4e.js} +1 -1
- package/dist/assets/{mdx-DkYVlLke.js → mdx-C33wkq6H.js} +1 -1
- package/dist/assets/{memory-DV8JsQtx.js → memory-lh5QZ4zg.js} +1 -1
- package/dist/assets/{metric-EPbdPW3c.js → metric-chc-qmc8.js} +1 -1
- package/dist/assets/omit-C11lcOpj.js +1 -0
- package/dist/assets/{overview-dKd5GT8L.js → overview-DL-GP40o.js} +1 -1
- package/dist/assets/{permission-CM6DkVuZ.js → permission-D09K4EY6.js} +1 -1
- package/dist/assets/{preference-BM-UTdmc.js → preference-iiwdIYk6.js} +5 -5
- package/dist/assets/{provider-icon-Cktbn65r.js → provider-icon-Dm9XYo2I.js} +1 -1
- package/dist/assets/{pt-CrMGrBZ6.js → pt-Dl6732JN.js} +2 -2
- package/dist/assets/{python-Du7VaLuo.js → python-D_lYYAX1.js} +1 -1
- package/dist/assets/{raf-schd.esm-BNw9NITo.js → raf-schd.esm-Bo9SYHL8.js} +1 -1
- package/dist/assets/{razor-BVnET0nC.js → razor-dpsmZHh4.js} +1 -1
- package/dist/assets/{rotate-session-key-CFNbgP5f.js → rotate-session-key-Bfdv46s3.js} +1 -1
- package/dist/assets/{ru-up3R57Pv.js → ru-CVUeN9AX.js} +2 -2
- package/dist/assets/{runtime-Dk9rcZxS.js → runtime-BUcScDcM.js} +1 -1
- package/dist/assets/schema-DidDB4o0.js +1 -0
- package/dist/assets/sdk-l1r4MOQ_.js +1 -0
- package/dist/assets/{service-CqUPpwp0.js → service-DCzLPjA3.js} +1 -1
- package/dist/assets/{shorten-label-3s6gLF6k.js → shorten-label-CN9pEyom.js} +1 -1
- package/dist/assets/{simple-select-Wx3iUaBi.js → simple-select-DxwJpURO.js} +1 -1
- package/dist/assets/{spaces-Am_oeFAi.js → spaces-BrB8zqzV.js} +1 -1
- package/dist/assets/{status-CNrrWhOD.js → status-B-GGRrEB.js} +1 -1
- package/dist/assets/{status-C7WonqAX.js → status-BZx_J-ps.js} +1 -1
- package/dist/assets/{switch-control-5rdk6r2s.js → switch-control-X9WA2UjB.js} +1 -1
- package/dist/assets/{table-icons-BYFzOJU6.js → table-icons-Xs4hP9Pw.js} +1 -1
- package/dist/assets/{team-DIUm8el2.js → team-B9jB42uy.js} +1 -1
- package/dist/assets/{th-DdNj2Ao6.js → th-32eBNQes.js} +2 -2
- package/dist/assets/{toLower-4lrgdc-N.js → toLower-DwWNsNMJ.js} +1 -1
- package/dist/assets/toUpper-DXK6zXOf.js +1 -0
- package/dist/assets/{traffic-Dk6Khjvb.js → traffic-C_4zWOQM.js} +1 -1
- package/dist/assets/{tsMode-Dsc9rLfX.js → tsMode-57DuREfP.js} +1 -1
- package/dist/assets/{typescript-DpjdjVZw.js → typescript-BJp2b_J1.js} +1 -1
- package/dist/assets/{url-evaluation-C14MBkPs.js → url-evaluation-DetQFE_e.js} +1 -1
- package/dist/assets/{url-join-CdWz3bWK.js → url-join-rRKl4Ear.js} +1 -1
- package/dist/assets/{use-mobile-DyfoHLG-.js → use-mobile-BDRFDg8j.js} +1 -1
- package/dist/assets/{use-mobile-CDGtPjEm.js → use-mobile-DOhPXmq7.js} +1 -1
- package/dist/assets/{useAsync-CxBbRyfH.js → useAsync-B59MJoKM.js} +1 -1
- package/dist/assets/{useAsyncRetry-Bocgt3FN.js → useAsyncRetry-CGp0YSlH.js} +1 -1
- package/dist/assets/{useLocalStorage-DCDZL7eY.js → useLocalStorage-Dpl2DibN.js} +1 -1
- package/dist/assets/{useThemeProps-BgZ7aDx7.js → useThemeProps-BS48y1B2.js} +1 -1
- package/dist/assets/{util-Be7ZYLl2.js → util-DgOs7OwT.js} +1 -1
- package/dist/assets/{vi-HNh41Xxk.js → vi-DF8IinAc.js} +2 -2
- package/dist/assets/{wait-container-DxcDiGL9.js → wait-container-CxHAyAQN.js} +1 -1
- package/dist/assets/{without-wallet-B0F51hFz.js → without-wallet-qfmn1VhQ.js} +1 -1
- package/dist/assets/wrap-locale-D8IL6u8L.js +1 -0
- package/dist/assets/{xml-B7OEZnDx.js → xml-BZRt8HAs.js} +1 -1
- package/dist/assets/{yaml-CKPSOCPR.js → yaml-0X7rH3i7.js} +1 -1
- package/dist/assets/{zh-MM5bvwO_.js → zh-ByJkLAV1.js} +2 -2
- package/dist/assets/{zh-tw-Dr5DyPwA.js → zh-tw-34G9tsUP.js} +2 -2
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-X9T3XBZa.js +0 -1
- package/dist/assets/_createAggregator-DnJlZ903.js +0 -1
- package/dist/assets/api-D8UyBv4i.js +0 -1
- package/dist/assets/cloneDeep-CJSiQzIj.js +0 -1
- package/dist/assets/connect-DEbeKuNy.js +0 -5
- package/dist/assets/depsEqual-C5Zw7_49.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-4wp097w6.js +0 -1
- package/dist/assets/engine-DDhO6kSm.js +0 -1
- package/dist/assets/getValidReactChildren-DsFc6cpz.js +0 -1
- package/dist/assets/index-7mVca6L9.js +0 -1
- package/dist/assets/index-BAMKzu46.js +0 -2900
- package/dist/assets/index-Bv7eZ7mu.js +0 -179
- package/dist/assets/index-CJNCkrWH.js +0 -1
- package/dist/assets/omit-DisUFHh2.js +0 -1
- package/dist/assets/schema-DV0hUaoz.js +0 -1
- package/dist/assets/sdk-4bF4Obyz.js +0 -1
- package/dist/assets/toUpper-DJkJXqdQ.js +0 -1
- package/dist/assets/wrap-locale-DCD2RpMr.js +0 -1
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import{aF as me,j as e,i8 as hs,i9 as fs,bQ as ps,r as q,s as be,J as P,g3 as Ht,t as F,fM as Tt,a4 as de,C as Be,bi as ar,eK as gs,o as T,ia as xs,b2 as or,cA as ys,cU as vs,ej as bs,T as Q,eH as jt,bn as ee,bE as Et,p as he,ib as js,bF as It,b as X,bg as re,bA as ce,H,aV as oe,V as ne,n as lr,q as _s,w as cr,ad as ws,i as dr,dn as ks,ic as Ss,au as Cs,aU as ie,X as De,$ as ke,D as Rs,Y as As,v as Y,Z as _t,id as Te,ie as Ps,hf as Ne,ig as Os,ih as wt,ag as Ze,ii as $s,ij as Ts,ik as Es,hh as Xe,il as ot,bd as ur,aH as V,gY as Is,d0 as Nt,W as Ls,gj as mr,P as le,aR as Ft,im as Ds,io as qs,ha as Ie,g7 as _e,aP as ge,F as E,ip as lt,iq as kt,Q as K,z as Bs,y as Se,bD as we,du as J,ir as Lt,aD as se,gC as Ve,M as Ms,f as $e,cx as zs,cO as ue,c7 as Pe,dL as je,d_ as qe,a2 as hr,fC as Hs,is as Ns,bz as St,N as Fs,cH as fr,bs as Zs,it as Ws,b9 as Us,L as Vs,cv as We,aJ as et,iu as Ks,U as Gs,bp as Ys,a3 as pr,bj as tt,iv as gr,b6 as Js,dp as Oe,dZ as xr,c_ as yr,B as Xs,b5 as Zt,g9 as Qs,gd as en,G as ct,K as tn,bx as rn}from"./index-BAMKzu46.js";import{S as sn}from"./actions-BGmJ3r4b.js";import{N as Wt}from"./ChevronRight-CtPp_MpO.js";import{T as Ue}from"./html-title-DdUp_-5h.js";import{w as Me,P as nn}from"./permission-CM6DkVuZ.js";import{u as Dt}from"./index-7mVca6L9.js";import{F as an,R as on,S as M,a as Ct,s as ln,L as Re,A as cn,b as dn,c as un,d as mn,B as hn}from"./preference-BM-UTdmc.js";import{D as fn}from"./Done-Cc0u-Lkn.js";import{A as pn,a as Ut}from"./Autocomplete-CafCM_25.js";import{C as gn,R as xn,S as yn,P as vn}from"./rotate-session-key-CFNbgP5f.js";import{u as ae}from"./blocklet-CQ-S_G-T.js";import{C as vr}from"./click-to-copy-BtM6Ocbq.js";import{u as rt}from"./team-DIUm8el2.js";import{v as br}from"./index-MY2K6w0a.js";import{g as bn}from"./chain-T1WmG8fp.js";import{V as jn}from"./status-C7WonqAX.js";import{a as fe,S as _n,u as jr}from"./switch-control-5rdk6r2s.js";import{u as pe,C as z,b as Vt}from"./index.esm-Bhe9PyJD.js";import{I as wn,J as kn,K as Sn,L as Cn}from"./index-0xQC_RX5.js";import{M as Ae}from"./provider-icon-Cktbn65r.js";import{S as Qe}from"./simple-select-Wx3iUaBi.js";import{D as Kt}from"./Delete-9ESwe_tH.js";import{A as Gt}from"./Add-DSHUmuh2.js";import{H as st}from"./index-CH66h8Bz.js";import{u as _r}from"./use-mobile-CDGtPjEm.js";import{C as Rn}from"./CardContent-B53G0-HU.js";import{R as wr,a as kr}from"./url-evaluation-C14MBkPs.js";import"./useLocalStorage-DCDZL7eY.js";import"./MoreVert-BQdkfudm.js";import"./DeleteOutline-CK2Vy8gP.js";import"./get-safe-url-BtHUKeta.js";import"./ButtonGroup-C1HewoiR.js";import"./getValidReactChildren-DsFc6cpz.js";import"./omit-DisUFHh2.js";import"./index-Brq4w3lW.js";import"./edit.svg-DA3pWWpd.js";import"./ArrowDropDown-X9T3XBZa.js";import"./index-C_yKF6eG.js";import"./iframe-naOtT0ea.js";import"./ListSubheader-B41Y1ZMB.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-BoB93pXx.js";import"./index-Beuvm8_y.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-DjsH6fTI.js";import"./CSSTransition-1BwLUUYd.js";import"./emotion-cache.browser.esm-4wp097w6.js";import"./depsEqual-C5Zw7_49.js";import"./index-DgL9xnFX.js";import"./TableSearch-B9TJh3X_.js";import"./Search-DsDROQ8Z.js";import"./Clear-BBluvTPc.js";const Sr=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")]),An=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")]),Pn=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"})),On=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"})),$n=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"})),Tn=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"})),En=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"})),In=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"})),Rt=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"})),Ln=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")]),Dn=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"})),qn=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"})),Cr=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"})),Bn=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"})),Mn=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 zn=Array.prototype,Yt=zn.splice;function Hn(S,w,A,R){var j=fs,y=-1,x=w.length,o=S;for(S===w&&(w=hs(w));++y<x;)for(var g=0,f=w[y],u=f;(g=j(o,u,g))>-1;)o!==S&&Yt.call(o,g,1),Yt.call(S,g,1);return S}function Nn(S,w){return S&&S.length&&w&&w.length?Hn(S,w):S}var Fn=ps(Nn);const Zn={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 Rr({label:S="",disabled:w=!1,required:A=!1,initialValue:R="",onChange:j=()=>{},style:y={},onSubmit:x=()=>{},triggers:o=[],options:g=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:u="",placeholder:t="",renderImage:a=()=>null,renderLabel:i=()=>"",filterKeys:r=["name"],noEmpty:s=!1,...c}){const[n,l]=q.useState(!1),[d,m]=q.useState(!1),[p,_]=q.useState(""),k=q.useRef(null),[h,v]=q.useState(R),[b,C]=q.useState(h),O=q.useMemo(()=>{if(!g)return{};const Z={};return g.forEach(D=>{Z[D.code]=D}),Z},[g]),$=()=>{if(!g)return[];if(!p)return g.map(D=>D.code);const Z=new RegExp(p.toLowerCase());return g.filter(D=>{for(let N=0;N<r.length;N++){const U=r[N];if(Z.test(D[U]?.toLowerCase()))return!0}return!1}).map(D=>D.code)},L=async()=>{m(!0);try{await x(typeof f=="function"?f(b):b)===!1?C(h):s&&!b.length?(C(R),v(R)):(C(b),v(b))}catch{C(h)}finally{m(!1),l(!1)}},B=(Z,D)=>{if(!Array.isArray(D)){C([]),j([]);return}const N=D.filter(U=>O[U]);if(!N.length){C([]),j([]);return}C(N),j(N)},W=Z=>{Z.stopPropagation(),l(!0),setTimeout(()=>{if(k.current){const D=k.current.querySelector("input");D&&D.focus()}},500)},G=n?e.jsx(pn,{ref:k,options:g,value:b,onChange:B,inputValue:p,onInputChange:(Z,D)=>{_(D)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:$,getOptionLabel:Z=>O[Z]?.name,renderInput:Z=>e.jsx(F,{...Z,label:"",placeholder:t}),renderOption:(Z,D)=>{const N=b.indexOf(D)!==-1;return q.createElement(Wn,{component:"li",...Z,key:D},a(O[D]||{}),e.jsx(P,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:N?"700":"normal"},children:i(D,O[D])||O[D]?.name}),e.jsx(P,{component:Ht,sx:{opacity:.5,width:18,height:18},style:{visibility:N?"visible":"hidden"}}))},...c,slots:{popper:Un}}):e.jsx(P,{className:"form-item-input slot",onClick:W,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(Z=>g.some(D=>D.code===Z)).map(Z=>e.jsx(Tt,{label:g.find(D=>D.code===Z).name,style:{marginRight:8},size:"small"},Z))});return e.jsx(an,{className:"form",style:y,children:e.jsxs(P,{className:"form-item",children:[e.jsxs(P,{className:"form-item-label",children:[S,A&&e.jsx(on,{})]}),e.jsxs(P,{className:"form-item-body",children:[e.jsx(P,{className:"form-item-input",children:G}),n?e.jsx(P,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(de,{"data-cy":"schema-form-item-confirm",onClick:L,disabled:w||d,size:"large",children:d?e.jsx(Be,{size:24}):e.jsx(fn,{})}),e.jsx(de,{"data-cy":"schema-form-item-cancel",onClick:()=>{C(h),l(!1)},disabled:w||d,size:"large",children:e.jsx(Ht,{})})]})}):null]}),n&&u&&e.jsx(ar,{children:u})]})})}Rr.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const Wn=be.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
justify-content: space-between;
|
|
4
|
-
align-items: center;
|
|
5
|
-
height: 48px;
|
|
6
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
7
|
-
font-size: 1.1em;
|
|
8
|
-
`,Un=be(gs)(()=>({[`& .${Ut.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},[`& .${Ut.listbox}`]:{padding:0}}));function At({name:S,icon:w,did:A,dark:R=!1}){return e.jsx(xs,{prefer:R?"dark":"light",children:e.jsx(P,{sx:{display:"flex",justifyContent:"center",alignItems:"center",bgcolor:R?"common.black":"info.main",pl:4,borderRadius:1,overflow:"hidden",height:1},children:e.jsxs(or,{sx:{display:"flex",alignItems:"center",p:1.5,width:1,borderRadius:"8px 0 0 8px"},children:[e.jsx(ys,{sx:{bgcolor:"transparent",width:48,height:48,borderRadius:1},children:w?e.jsx(vs,{src:w,alt:"icon",style:{width:48,height:48,borderRadius:"8px"}}):e.jsx(bs,{variant:"rectangular",width:48,height:48,sx:{borderRadius:1}})}),e.jsxs(P,{sx:{ml:1,flex:1,width:0,overflow:"hidden"},children:[e.jsx(Q,{sx:{fontSize:20,fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S}),e.jsx(jt,{did:A,inline:!0,size:13})]})]})})})}At.propTypes={name:T.string.isRequired,icon:T.string.isRequired,did:T.string.isRequired,dark:T.bool};var Ar=function(w){return e.jsxs("svg",{...w,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"})]})]})]})};Ar.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Pr=function(w){return e.jsxs("svg",{...w,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"})]})]})]})};Pr.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Or=function(w){return e.jsxs("svg",{...w,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"})]})]})]})};Or.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var $r=function(w){return e.jsxs("svg",{...w,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"})]})]})]})};$r.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var Tr=function(w){return e.jsxs("svg",{...w,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"})]})]})]})};Tr.defaultProps={width:"384",height:"216",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Vn=Object.keys(X.SUPPORTED_LANGUAGES).map(S=>({code:S,name:X.SUPPORTED_LANGUAGES[S].nativeName,enName:X.SUPPORTED_LANGUAGES[S].name})),Kn=["name","enName","code"];function qt({blocklet:S,onUpdate:w=()=>{},hasPermission:A=!1,showFields:R=[],...j}){const{api:y,prefix:x,getSessionInHeader:o}=ee(),{t:g}=q.useContext(he),[f,u]=Dt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),t=f.loading||!A,{logoUrl:a,logoDarkUrl:i,rectLogoUrl:r,rectLogoDarkUrl:s,faviconUrl:c,splashPortraitUrl:n,splashLandscapeUrl:l,ogImageUrl:d}=js({blocklet:S});if(It(S.status))return null;const m=S.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES),p=S.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),_=S.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER),k=S.environments.find(b=>b.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR),h=[{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,title:g("blocklet.config.name"),description:g("blocklet.config.nameDesc"),value:S.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,title:g("blocklet.config.description"),description:g("blocklet.config.descriptionDesc"),value:S.environments.find(b=>b.key==="BLOCKLET_APP_DESCRIPTION").value},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,title:g("blocklet.config.appUrl"),description:g("blocklet.config.appUrlDesc"),value:p?p.value:""},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,title:g("blocklet.config.copyrightOwner"),description:g("blocklet.config.copyrightDesc"),value:_?_.value:""},{key:X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,title:g("blocklet.config.copyrightYear"),description:g("blocklet.config.copyrightDesc"),value:k?k.value:""}],v=async(b,C)=>{const O=[{key:b,value:C}];try{u({loading:!0});const{blocklet:$}=await y.configBlocklet({input:{did:S.meta.did,configs:O}});w($)}catch($){H.error($.message)}finally{u({loading:!1})}};return e.jsxs(Xn,{...j,children:[(!R.length||R.includes("base-info-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(P,{children:[e.jsx(Q,{variant:"h6",sx:{fontWeight:600},children:g("blocklet.config.baseInfo")}),e.jsx(Q,{variant:"body2",sx:{color:"text.secondary"},children:g("blocklet.config.baseInfoDesc")})]}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}})]}),(R.length?h.filter(b=>R.includes(b.key)):h).map(b=>e.jsxs(e.Fragment,{children:[e.jsx(M,{title:b.title,desc:b.description,children:e.jsx(Ct,{style:{marginTop:0},disabled:t,loading:f.loading,initialValue:ln.escapeTag(b.value),placeholder:b.title,onSubmit:C=>v(b.key,C),validate:b.validate})},b.key),e.jsx(P,{className:"config-form",component:re,sx:{my:3}})]})),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.languages"),desc:g("blocklet.config.languagesDesc"),children:e.jsx(Rr,{style:{marginTop:0},disabled:t,loading:f.loading,options:Vn,noEmpty:!0,initialValue:m?m.value.split(","):["en","zh"],onSubmit:b=>v("BLOCKLET_APP_LANGUAGES",b),helperText:g("blocklet.config.selectLanguagesTip"),placeholder:g("blocklet.config.languagesSearch"),filterKeys:Kn,renderLabel:(b,C)=>C.name===C.enName?`${C.name} (${b.toUpperCase()})`:`${C.name}, ${C.enName} (${b.toUpperCase()})`})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}})]}),(!R.length||R.includes("logo-settings-title"))&&e.jsxs(e.Fragment,{children:[e.jsxs(P,{sx:{mt:6},children:[e.jsx(Q,{variant:"h6",sx:{fontWeight:600},children:g("blocklet.config.logoSettings")}),e.jsx(Q,{variant:"body2",sx:{color:"text.secondary"},children:g("blocklet.config.logoSettingsDesc")}),e.jsx(Q,{variant:"body2",sx:{color:"warning.main"},children:g("blocklet.config.changeImageTip")})]}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}})]}),e.jsxs(Qn,{children:[(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.logoSquare"),desc:`${g("blocklet.config.logoSquareDesc")}
|
|
9
|
-
${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,link:"https://www.didwallet.io/",children:e.jsxs(P,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Q,{variant:"body2",children:g("common.lightMode")}),e.jsx(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(At,{name:S.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value,icon:a,did:S.meta.did})}),e.jsx(Re,{did:S.meta.did,width:80,type:"square",prefix:x,url:a,enabled:A,headers:o,aspectRatio:1,children:e.jsx(ce,{variant:"outlined",color:"primary",children:g("common.upload")})})]}),e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Q,{variant:"body2",children:g("common.darkMode")}),e.jsx(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(At,{dark:!0,name:S.environments.find(b=>b.key==="BLOCKLET_APP_NAME").value,icon:i,did:S.meta.did})}),e.jsx(Re,{did:S.meta.did,width:80,type:"square-dark",prefix:x,url:i,enabled:A,headers:o,aspectRatio:1,children:e.jsx(ce,{variant:"outlined",color:"primary",children:g("common.upload")})})]})]})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}})]}),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.logoRect"),desc:`${g("blocklet.config.logoRectDesc")}`,children:e.jsxs(P,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Q,{variant:"body2",children:g("common.lightMode")}),e.jsxs(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[r?e.jsx(Ar,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(Or,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),r&&e.jsx(P,{component:"img",src:r,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(Re,{did:S.meta.did,width:80,height:"auto",type:"rect",prefix:x,url:r,enabled:A,headers:o,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(ce,{variant:"outlined",children:g("common.upload")})})]}),e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(Q,{variant:"body2",children:g("common.darkMode")}),e.jsxs(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[s?e.jsx(Pr,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx($r,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),s&&e.jsx(P,{component:"img",src:s,alt:"app-logo",sx:{position:"absolute",top:112,left:64,height:40,objectFit:"contain",maxWidth:120}})]}),e.jsx(Re,{did:S.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(ce,{variant:"outlined",children:g("common.upload")})})]})]})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}})]}),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.logoFavicon"),desc:`${g("blocklet.config.logoFaviconDesc")}
|
|
10
|
-
${g("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.jsxs(P,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsxs(P,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[e.jsx(Tr,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),c&&e.jsx(P,{component:"img",src:c,alt:"app-logo",sx:{position:"absolute",top:45,left:115,width:44,height:44,borderRadius:"12px"}})]}),e.jsx(Re,{did:S.meta.did,width:80,type:"favicon",prefix:x,url:c,enabled:A,headers:o,aspectRatio:1,children:e.jsx(ce,{variant:"outlined",children:g("common.upload")})})]})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}})]}),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_PORTRAIT))&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:g("blocklet.config.splashPortrait"),desc:g("blocklet.config.splashDesc"),link:"https://www.arcsphere.io/",children:e.jsxs(P,{sx:{display:"flex",gap:3,alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0},flexWrap:"wrap"},children:[e.jsx(Re,{did:S.meta.did,height:400,width:225,type:"splash-portrait",prefix:x,url:n,enabled:A,headers:o,aspectRatio:9/16,minWidth:900,minHeight:1e3,allowSVG:!1}),e.jsx(P,{sx:{width:"100%",maxWidth:400,aspectRatio:"16 / 9",position:"relative"},children:e.jsx(Re,{did:S.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(P,{className:"config-form",component:re,sx:{my:3}})]}),(!R.length||R.includes(X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPLASH_LANDSCAPE))&&e.jsx(M,{title:g("blocklet.config.ogImage"),desc:g("blocklet.config.ogImageDesc"),children:e.jsx(P,{sx:{width:"100%",maxWidth:400,aspectRatio:"40 / 21",position:"relative",alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0}},children:e.jsx(Re,{did:S.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 Gn=Me(qt,"mutate_blocklets"),Yn=Me(qt,"",Et);function Jn(S){const{inService:w}=ee();return w?e.jsx(Yn,{...S}):e.jsx(Gn,{...S})}qt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool,showFields:T.array};const Xn=be(P)`
|
|
11
|
-
max-width: 1536px;
|
|
12
|
-
|
|
13
|
-
.config-form {
|
|
14
|
-
flex-grow: 1;
|
|
15
|
-
overflow-y: auto;
|
|
16
|
-
|
|
17
|
-
${S=>S.theme.breakpoints.down("md")} {
|
|
18
|
-
width: 100%;
|
|
19
|
-
flex-shrink: 0;
|
|
20
|
-
transform: translate(0, 0);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.config-item {
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
justify-content: space-between;
|
|
28
|
-
margin: 16px 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.config-label {
|
|
32
|
-
font-weight: bold;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.config-desc {
|
|
36
|
-
font-weight: normal;
|
|
37
|
-
font-size: 12px;
|
|
38
|
-
color: #666;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.form-item {
|
|
42
|
-
margin-top: 0;
|
|
43
|
-
}
|
|
44
|
-
`,Qn=be(oe)``,ei=localStorage.getItem("enableDebug")==="true";function Er({onChange:S=()=>{},disabled:w=!1,loading:A=!1,inService:R=!1}){const{t:j}=ne(),{api:y,session:x}=lr(),{blocklet:o}=ae(),[g,f]=_s({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),u=()=>f({isConnectOpen:!1}),t=()=>{if(dr.isInProgress(o.status)){H.error(j("blocklet.error.isInProgress"));return}f({confirmDialogOpen:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(M,{title:j("blocklet.config.migrate.button"),desc:j("blocklet.config.migrate.description"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(ce,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:w||A,onClick:t,children:[e.jsx(In,{style:{fontSize:"1.3em",marginRight:4}}),j("blocklet.config.migrate.button")]})})}),e.jsxs(e.Fragment,{children:[g.isConnectOpen&&e.jsx(cr,{popup:!0,open:g.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:y.get,checkTimeout:5*60*1e3,onSuccess:()=>{S(),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}),g.confirmDialogOpen&&e.jsx(ws,{title:e.jsx(Q,{sx:{fontSize:"20px",fontWeight:"500"},children:j("blocklet.config.migrate.title")}),description:e.jsx(Q,{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})})]})]})}Er.propTypes={onChange:T.func,disabled:T.bool,loading:T.bool,inService:T.bool};function Ir({onCancel:S,onSuccess:w,onError:A=()=>{}}){const{api:R}=q.useContext(ks),[j,y]=q.useState(!1),{t:x,locale:o}=ne(),[g,f]=q.useState(""),[u,t]=q.useState(!1),[a,i]=q.useState(0),[r,s]=q.useState(""),{endpoint:c}=rt(),[n,l]=q.useState(!1),d=h=>{f(null),y(!0);try{s(h.result),i(_.length-1)}catch(v){const b=_t(v);f(b),A(v)}finally{y(!1)}},m=()=>{t(!0),i(1)},p=()=>{t(!1),i(0)},_=[{body:e.jsxs(P,{children:[e.jsx(Q,{children:x("team.transferApp.transferDialog.tips.progress")}),e.jsx(Q,{sx:{mt:3,mb:2},children:x("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:x("common.cancel"),confirm:x("team.transferApp.transferDialog.createTransferLink"),onCancel:S,onConfirm:m},{cancel:x("common.cancel"),confirm:x("team.transferApp.transferDialog.createTransferLink"),body:()=>e.jsx(cr,{action:"transfer-app-owner",open:u,locale:o,checkFn:R.get,onClose:p,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 h=Ss({transferId:r.transferId,endpoint:c});return e.jsxs(e.Fragment,{children:[e.jsx(P,{component:Le,dangerouslySetInnerHTML:{__html:x("team.transferApp.transferDialog.createSuccessTip1")}}),e.jsx(P,{component:Le,sx:{mt:2},children:e.jsx(Le,{children:x("team.transferApp.transferDialog.createSuccessTip3")})}),e.jsxs(P,{children:[e.jsx(P,{component:Le,sx:{mt:2},children:e.jsx(Le,{children:x("team.transferApp.transferDialog.createSuccessTip2",{expireDate:Cs(r.expireDate,o)})})}),e.jsx(P,{sx:{my:1},children:e.jsx(vr,{children:h})})]}),e.jsx("div",{children:e.jsx(ie,{value:"end",control:e.jsx(De,{checked:n,onChange:v=>l(v.target.checked)}),label:x("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:x("common.confirm"),onConfirm:w}],k=_[a];return e.jsxs(ke,{title:e.jsx(Le,{className:"title",children:x("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[k.cancel&&e.jsx(Y,{onClick:k.onCancel,color:"inherit",children:k.cancel}),e.jsxs(Y,{onClick:k.onConfirm,color:"error",disabled:j||a===_.length-1&&!n,variant:"contained",autoFocus:!0,children:[j&&e.jsx(Be,{size:16}),k.confirm]})]}),children:[e.jsx(Rs,{component:"div",children:typeof k.body=="function"?k.body():k.body}),!!g&&e.jsx(As,{severity:"error",variant:"icon",children:g})]})}Ir.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,onError:T.func};const Le=be.div`
|
|
45
|
-
font-size: 16px;
|
|
46
|
-
font-weight: bold;
|
|
47
|
-
&.title {
|
|
48
|
-
font-size: 20px;
|
|
49
|
-
}
|
|
50
|
-
`;function ti(S){return{type:"BN",base:S.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(w,A){try{return{value:new Te(w)}}catch{return{errors:A.error("bn.nan")}}},coerce(w){return{value:w.toString(10)}},validate(w){return{value:w}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:w=>Te.isBN(w),message:"must be a big number",normalize:w=>new Te(w)},{name:"equal",assert:w=>typeof w=="boolean",message:"must be a boolean"}],validate(w,A,R){const j=new Te(w);return R.equal&&j.lt(R.threshold)?A.error("bn.min",R):!R.equal&&j.lte(R.threshold)?A.error("bn.greater",R):w}},lt:{args:[{name:"threshold",ref:!0,assert:w=>Te.isBN(w),message:"must be a big number",normalize:w=>new Te(w)},{name:"equal",assert:w=>typeof w=="boolean",message:"must be a boolean"}],validate(w,A,R){const j=new Te(w);return R.equal&&j.gt(R.threshold)?A.error("bn.max",R):!R.equal&&j.gte(R.threshold)?A.error("bn.less",R):w}},min:{alias:"gte",method(w){return this.$_addRule({name:"gt",args:{threshold:w,equal:!0}})}},max:{alias:"lte",method(w){return this.$_addRule({name:"lt",args:{threshold:w,equal:!0}})}},greater:{alias:"gt",method(w){return this.$_addRule({name:"gt",args:{threshold:w,equal:!1}})}},less:{alias:"lt",method(w){return this.$_addRule({name:"lt",args:{threshold:w,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 Ke={pk:Object.keys(ot.KeyType),hash:Object.keys(ot.HashType),role:Object.keys(ot.RoleType)};function ri(S){return{type:"DID",base:S.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(w,A){return!w||typeof w!="string"?{errors:A.error("did.empty",{value:w})}:Xe(w)===!1?{errors:A.error("did.invalid",{value:w})}:{value:w}},rules:{type:{args:[{name:"key",ref:!0,assert:w=>Object.keys(Ke).includes(w),message:`must be one of ${Object.keys(Ke).join(", ")}`},{name:"expected",assert:w=>Object.keys(Ke).some(A=>Ke[A].includes(w)),message:"must be valid type"}],validate(w,A,R){const j=wt(w);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}):w}},pk:{method(w){return this.$_addRule({name:"type",args:{key:"pk",expected:w}})}},hash:{method(w){return this.$_addRule({name:"type",args:{key:"hash",expected:w}})}},role:{method(w){return this.$_addRule({name:"type",args:{key:"role",expected:w}})}},wallet:{method(w){return this.$_addRule({name:"wallet",args:{type:w}})},args:[{name:"type",ref:!0,assert:w=>["arcblock","ethereum","default","eth","passkey"].includes(w),message:"must be a string",normalize:w=>w.trim()}],validate(w,A,R={}){const j=Os(w),y=wt(w);return["ethereum","eth"].includes(R.type)&&Ze(j,$s)===!1?A.error("did.wallet",{expected:R.type,actual:JSON.stringify(y)}):["arcblock","default"].includes(R.type)&&Ze(j,Ts)===!1?A.error("did.wallet",{expected:R.type,actual:JSON.stringify(y)}):["passkey"].includes(R.type)&&Ze(j,Es)===!1?A.error("did.wallet",{expected:R.type,actual:JSON.stringify(y)}):w}},prefix:{method(w=""){return this.$_addRule({name:"prefix",args:{str:w}})},args:[{name:"str",ref:!0,assert:w=>["",Ps].includes(w),message:"must be a string",normalize:w=>w.trim()}],validate(w,A,R={}){return R.str&&w.startsWith(R.str)===!1?A.error("did.prefix",{expected:R.str}):!R.str&&Ne(w)!==w?A.error("did.prefix",{expected:R.str}):w}}}}}var dt={exports:{}},Jt;function si(){return Jt||(Jt=1,function(S,w){(function(A,R){S.exports=R()})(self,()=>{return A={7629:(j,y,x)=>{const o=x(375),g=x(8571),f=x(9474),u=x(1687),t=x(8652),a=x(8160),i=x(3292),r=x(6354),s=x(8901),c=x(9708),n=x(6914),l=x(2294),d=x(6133),m=x(1152),p=x(8863),_=x(2036),k={Base:class{constructor(h){this.type=h,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(...h){return a.verifyFlat(h,"allow"),this._values(h,"_valids")}alter(h){o(h&&typeof h=="object"&&!Array.isArray(h),"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 h){const C=h[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(h){return o(h!==void 0,"Artifact cannot be undefined"),o(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",h)}cast(h){return o(h===!1||typeof h=="string","Invalid to value"),o(h===!1||this._definition.cast[h],"Type",this.type,"does not support casting to",h),this.$_setFlag("cast",h===!1?void 0:h)}default(h,v){return this._default("default",h,v)}description(h){return o(h&&typeof h=="string","Description must be a non-empty string"),this.$_setFlag("description",h)}empty(h){const v=this.clone();return h!==void 0&&(h=v.$_compile(h,{override:!1})),v.$_setFlag("empty",h,{clone:!1})}error(h){return o(h,"Missing error"),o(h instanceof Error||typeof h=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",h)}example(h,v={}){return o(h!==void 0,"Missing example"),a.assertOptions(v,["override"]),this._inner("examples",h,{single:!0,override:v.override})}external(h,v){return typeof h=="object"&&(o(!v,"Cannot combine options with description"),v=h.description,h=h.method),o(typeof h=="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:h,description:v},{single:!0})}failover(h,v){return this._default("failover",h,v)}forbidden(){return this.presence("forbidden")}id(h){return h?(o(typeof h=="string","id must be a non-empty string"),o(/^[^\.]+$/.test(h),"id cannot contain period character"),this.$_setFlag("id",h)):this.$_setFlag("id",void 0)}invalid(...h){return this._values(h,"_invalids")}label(h){return o(h&&typeof h=="string","Label name must be a non-empty string"),this.$_setFlag("label",h)}meta(h){return o(h!==void 0,"Meta cannot be undefined"),this._inner("metas",h,{single:!0})}note(...h){o(h.length,"Missing notes");for(const v of h)o(v&&typeof v=="string","Notes must be non-empty strings");return this._inner("notes",h)}only(h=!0){return o(typeof h=="boolean","Invalid mode:",h),this.$_setFlag("only",h)}optional(){return this.presence("optional")}prefs(h){o(h,"Missing preferences"),o(h.context===void 0,"Cannot override context"),o(h.externals===void 0,"Cannot override externals"),o(h.warnings===void 0,"Cannot override warnings"),o(h.debug===void 0,"Cannot override debug"),a.checkPreferences(h);const v=this.clone();return v._preferences=a.preferences(v._preferences,h),v}presence(h){return o(["optional","required","forbidden"].includes(h),"Unknown presence mode",h),this.$_setFlag("presence",h)}raw(h=!0){return this.$_setFlag("result",h?"raw":void 0)}result(h){return o(["raw","strip"].includes(h),"Unknown result mode",h),this.$_setFlag("result",h)}required(){return this.presence("required")}strict(h){const v=this.clone(),b=h!==void 0&&!h;return v._preferences=a.preferences(v._preferences,{convert:b}),v}strip(h=!0){return this.$_setFlag("result",h?"strip":void 0)}tag(...h){o(h.length,"Missing tags");for(const v of h)o(v&&typeof v=="string","Tags must be non-empty strings");return this._inner("tags",h)}unit(h){return o(h&&typeof h=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",h)}valid(...h){a.verifyFlat(h,"valid");const v=this.allow(...h);return v.$_setFlag("only",!!v._valids,{clone:!1}),v}when(h,v){const b=this.clone();b.$_terms.whens||(b.$_terms.whens=[]);const C=i.when(b,h,v);if(!["any","link"].includes(b.type)){const O=C.is?[C]:C.switch;for(const $ of O)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(h){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=h||t.provider.provision(),v.$_temp.ruleset=!1,v}clone(){const h=Object.create(Object.getPrototypeOf(this));return this._assign(h)}concat(h){o(a.isSchema(h),"Invalid schema object"),o(this.type==="any"||h.type==="any"||h.type===this.type,"Cannot merge type",this.type,"with another type:",h.type),o(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),o(!h._inRuleset(),"Cannot concatenate a schema with open ruleset");let v=this.clone();if(this.type==="any"&&h.type!=="any"){const b=h.clone();for(const C of Object.keys(v))C!=="type"&&(b[C]=v[C]);v=b}v._ids.concat(h._ids),v._refs.register(h,d.toSibling),v._preferences=v._preferences?a.preferences(v._preferences,h._preferences):h._preferences,v._valids=_.merge(v._valids,h._valids,h._invalids),v._invalids=_.merge(v._invalids,h._invalids,h._valids);for(const b of h._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 h._rules)h._definition.rules[b.method].multi||v._singleRules.set(b.name,b),v._rules.push(b);if(v._flags.empty&&h._flags.empty){v._flags.empty=v._flags.empty.concat(h._flags.empty);const b=Object.assign({},h._flags);delete b.empty,u(v._flags,b)}else if(h._flags.empty){v._flags.empty=h._flags.empty;const b=Object.assign({},h._flags);delete b.empty,u(v._flags,b)}else u(v._flags,h._flags);for(const b in h.$_terms){const C=h.$_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,h]),v.$_mutateRebuild()}extend(h){return o(!h.base,"Cannot extend type with another base"),s.type(this,h)}extract(h){return h=Array.isArray(h)?h:h.split("."),this._ids.reach(h)}fork(h,v){o(!this._inRuleset(),"Cannot fork inside a ruleset");let b=this;for(let C of[].concat(h))C=Array.isArray(C)?C:C.split("."),b=b._ids.fork(C,v,b);return b.$_temp.ruleset=!1,b}rule(h){const v=this._definition;a.assertOptions(h,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 O=b;O<C._rules.length;++O){const $=C._rules[O],L=g($);for(const B in h)v.modifiers[B](L,h[B]),o(L.name===$.name,"Cannot change rule name");C._rules[O]=L,C._singleRules.get(L.name)===$&&C._singleRules.set(L.name,L)}return C.$_temp.ruleset=!1,C.$_mutateRebuild()}get ruleset(){o(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const h=this.clone();return h.$_temp.ruleset=h._rules.length,h}get $(){return this.ruleset}tailor(h){h=[].concat(h),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)h.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(h),ref:!1}),v.$_temp.ruleset=!1,v.$_mutateRebuild()}tracer(){return m.location?m.location(this):this}validate(h,v){return p.entry(h,this,v)}validateAsync(h,v){return p.entryAsync(h,this,v)}$_addRule(h){typeof h=="string"&&(h={name:h}),o(h&&typeof h=="object","Invalid options"),o(h.name&&typeof h.name=="string","Invalid rule name");for(const $ in h)o($[0]!=="_","Cannot set private rule properties");const v=Object.assign({},h);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 O=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 L=C[$];if(b.argsByName){const B=b.argsByName.get($);if(B.ref&&a.isResolvable(L))v._resolve.push($),O.$_mutateRegister(L);else if(B.normalize&&(L=B.normalize(L),C[$]=L),B.assert){const W=a.validateArg(L,$,B);o(!W,W,"or reference")}}L!==void 0?C[$]=L:delete C[$]}}return b.multi||(O._ruleRemove(v.name,{clone:!1}),O._singleRules.set(v.name,v)),O.$_temp.ruleset===!1&&(O.$_temp.ruleset=null),b.priority?O._rules.unshift(v):O._rules.push(v),O}$_compile(h,v){return i.schema(this.$_root,h,v)}$_createError(h,v,b,C,O,$={}){const L=$.flags!==!1?this._flags:{},B=$.messages?n.merge(this._definition.messages,$.messages):this._definition.messages;return new r.Report(h,v,b,L,B,C,O)}$_getFlag(h){return this._flags[h]}$_getRule(h){return this._singleRules.get(h)}$_mapLabels(h){return h=Array.isArray(h)?h:h.split("."),this._ids.labels(h)}$_match(h,v,b,C){(b=Object.assign({},b)).abortEarly=!0,b._externals=!1,v.snapshot();const O=!p.validate(h,this,v,b,C).errors;return v.restore(),O}$_modify(h){return a.assertOptions(h,["each","once","ref","schema"]),l.schema(this,h)||this}$_mutateRebuild(){return o(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(h,{source:v,name:b,path:C,key:O})=>{const $=this._definition[v][b]&&this._definition[v][b].register;$!==!1&&this.$_mutateRegister(h,{family:$,key:O})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(h,{family:v,key:b}={}){this._refs.register(h,v),this._ids.register(h,{key:b})}$_property(h){return this._definition.properties[h]}$_reach(h){return this._ids.reach(h)}$_rootReferences(){return this._refs.roots()}$_setFlag(h,v,b={}){o(h[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const C=this._definition.flags[h]||{};if(f(v,C.default)&&(v=void 0),f(v,this._flags[h]))return this;const O=b.clone!==!1?this.clone():this;return v!==void 0?(O._flags[h]=v,O.$_mutateRegister(v)):delete O._flags[h],h[0]!=="_"&&(O.$_temp.ruleset=!1),O}$_parent(h,...v){return this[h][a.symbols.parent].call(this,...v)}$_validate(h,v,b){return p.validate(h,this,v,b)}_assign(h){h.type=this.type,h.$_root=this.$_root,h.$_temp=Object.assign({},this.$_temp),h.$_temp.whens={},h._ids=this._ids.clone(),h._preferences=this._preferences,h._valids=this._valids&&this._valids.clone(),h._invalids=this._invalids&&this._invalids.clone(),h._rules=this._rules.slice(),h._singleRules=g(this._singleRules,{shallow:!0}),h._refs=this._refs.clone(),h._flags=Object.assign({},this._flags),h._cache=null,h.$_terms={};for(const v in this.$_terms)h.$_terms[v]=this.$_terms[v]?this.$_terms[v].slice():null;h.$_super={};for(const v in this.$_super)h.$_super[v]=this._super[v].bind(h);return h}_bare(){const h=this.clone();h._reset();const v=h._definition.terms;for(const b in v){const C=v[b];h.$_terms[b]=C.init}return h.$_mutateRebuild()}_default(h,v,b={}){return a.assertOptions(b,"literal"),o(v!==void 0,"Missing",h,"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(h,v)}_generate(h,v,b){if(!this.$_terms.whens)return{schema:this};const C=[],O=[];for(let B=0;B<this.$_terms.whens.length;++B){const W=this.$_terms.whens[B];if(W.concat){C.push(W.concat),O.push(`${B}.concat`);continue}const G=W.ref?W.ref.resolve(h,v,b):h,Z=W.is?[W]:W.switch,D=O.length;for(let N=0;N<Z.length;++N){const{is:U,then:te,otherwise:xe}=Z[N],Ce=`${B}${W.switch?"."+N:""}`;if(U.$_match(G,v.nest(U,`${Ce}.is`),b)){if(te){const ze=v.localize([...v.path,`${Ce}.then`],v.ancestors,v.schemas),{schema:at,id:He}=te._generate(h,ze,b);C.push(at),O.push(`${Ce}.then${He?`(${He})`:""}`);break}}else if(xe){const ze=v.localize([...v.path,`${Ce}.otherwise`],v.ancestors,v.schemas),{schema:at,id:He}=xe._generate(h,ze,b);C.push(at),O.push(`${Ce}.otherwise${He?`(${He})`:""}`);break}}if(W.break&&O.length>D)break}const $=O.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 L=this;this._definition.generate&&(L=this._definition.generate(this,h,v,b));for(const B of C)L=L.concat(B);return this.$_root._tracer&&this.$_root._tracer._combine(L,[this,...C]),this.$_temp.whens[$]=L,{schema:L,id:$}}_inner(h,v,b={}){o(!this._inRuleset(),`Cannot set ${h} inside a ruleset`);const C=this.clone();return C.$_terms[h]&&!b.override||(C.$_terms[h]=[]),b.single?C.$_terms[h].push(v):C.$_terms[h].push(...v),C.$_temp.ruleset=!1,C}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(h,v={}){if(!this._singleRules.has(h))return this;const b=v.clone!==!1?this.clone():this;b._singleRules.delete(h);const C=[];for(let O=0;O<b._rules.length;++O){const $=b._rules[O];$.name!==h||$.keep?C.push($):b._inRuleset()&&O<b.$_temp.ruleset&&--b.$_temp.ruleset}return b._rules=C,b}_values(h,v){a.verifyFlat(h,v.slice(1,-1));const b=this.clone(),C=h[0]===a.symbols.override;if(C&&(h=h.slice(1)),!b[v]&&h.length?b[v]=new _:C&&(b[v]=h.length?new _:null,b.$_mutateRebuild()),!b[v])return b;C&&b[v].override();for(const O of h){o(O!==void 0,"Cannot call allow/valid/invalid with undefined"),o(O!==a.symbols.override,"Override must be the first value");const $=v==="_invalids"?"_valids":"_invalids";b[$]&&(b[$].remove(O),b[$].length||(o(v==="_valids"||!b._flags.only,"Setting invalid value",O,"leaves schema rejecting all values due to previous valid rule"),b[$]=null)),b[v].add(O,b._refs)}return b}}};k.Base.prototype[a.symbols.any]={version:a.version,compile:i.compile,root:"$_root"},k.Base.prototype.isImmutable=!0,k.Base.prototype.deny=k.Base.prototype.invalid,k.Base.prototype.disallow=k.Base.prototype.invalid,k.Base.prototype.equal=k.Base.prototype.valid,k.Base.prototype.exist=k.Base.prototype.required,k.Base.prototype.not=k.Base.prototype.invalid,k.Base.prototype.options=k.Base.prototype.prefs,k.Base.prototype.preferences=k.Base.prototype.prefs,j.exports=new k.Base},8652:(j,y,x)=>{const o=x(375),g=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 i=this._map.get(t);if(i)return i.value=a,void this._list.first(i);i=this._list.unshift({key:t,value:a}),this._map.set(t,i),this._compact()}get(t){const a=this._map.get(t);if(a)return this._list.first(a),g(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:i}=t;return a.prev=i,i&&(i.next=a),t===this.tail&&(this.tail=a),t.prev=null,t.next=null,t}}},8160:(j,y,x)=>{const o=x(375),g=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(i,r,s="Options"){o(i&&typeof i=="object"&&!Array.isArray(i),"Options must be of type object");const c=Object.keys(i).filter(n=>!r.includes(n));o(c.length===0,`${s} contain unknown keys: ${c}`)},y.checkPreferences=function(i){t=t||x(3378);const r=t.preferences.validate(i);if(r.error)throw new g([r.error.details[0].message])},y.compare=function(i,r,s){switch(s){case"=":return i===r;case">":return i>r;case"<":return i<r;case">=":return i>=r;case"<=":return i<=r}},y.default=function(i,r){return i===void 0?r:i},y.isIsoDate=function(i){return a.isoDate.test(i)},y.isNumber=function(i){return typeof i=="number"&&!isNaN(i)},y.isResolvable=function(i){return!!i&&(i[y.symbols.ref]||i[y.symbols.template])},y.isSchema=function(i,r={}){const s=i&&i[y.symbols.any];return!!s&&(o(r.legacy||s.version===y.version,"Cannot mix different versions of joi schemas"),!0)},y.isValues=function(i){return i[y.symbols.values]},y.limit=function(i){return Number.isSafeInteger(i)&&i>=0},y.preferences=function(i,r){u=u||x(6914),i=i||{},r=r||{};const s=Object.assign({},i,r);return r.errors&&i.errors&&(s.errors=Object.assign({},i.errors,r.errors),s.errors.wrap=Object.assign({},i.errors.wrap,r.errors.wrap)),r.messages&&(s.messages=u.compile(r.messages,i.messages)),delete s[y.symbols.prefs],s},y.tryWithPath=function(i,r,s={}){try{return i()}catch(c){throw c.path!==void 0?c.path=r+"."+c.path:c.path=r,s.append&&(c.message=`${c.message} (${c.path})`),c}},y.validateArg=function(i,r,{assert:s,message:c}){if(y.isSchema(s)){const n=s.validate(i);return n.error?n.error.message:void 0}if(!s(i))return r?`${r} ${c}`:c},y.verifyFlat=function(i,r){for(const s of i)o(!Array.isArray(s),"Method no longer accepts array arguments:",r)}},3292:(j,y,x)=>{const o=x(375),g=x(8160),f=x(6133),u={};y.schema=function(t,a,i={}){g.assertOptions(i,["appendPath","override"]);try{return u.schema(t,a,i)}catch(r){throw i.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},u.schema=function(t,a,i){o(a!==void 0,"Invalid undefined schema"),Array.isArray(a)&&(o(a.length,"Invalid empty array schema"),a.length===1&&(a=a[0]));const r=(s,...c)=>i.override!==!1?s.valid(t.override,...c):s.valid(...c);if(u.simple(a))return r(t,a);if(typeof a=="function")return t.custom(a);if(o(typeof a=="object","Invalid schema content:",typeof a),g.isResolvable(a))return r(t,a);if(g.isSchema(a))return a;if(Array.isArray(a)){for(const s of a)if(!u.simple(s))return t.alternatives().try(...a);return r(t,...a)}return a instanceof RegExp?t.string().regex(a):a instanceof Date?r(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,i={}){g.assertOptions(i,["legacy"]);const r=a&&a[g.symbols.any];if(r)return o(i.legacy||r.version===g.version,"Cannot mix different versions of joi schemas:",r.version,g.version),a;if(typeof a!="object"||!i.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 i of t){const r=u.walk(i);if(r)return r}return null}const a=t[g.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 i in t){const r=u.walk(t[i]);if(r)return r}return null},u.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},y.when=function(t,a,i){if(i===void 0&&(o(a&&typeof a=="object","Missing options"),i=a,a=f.create(".")),Array.isArray(i)&&(i={switch:i}),g.assertOptions(i,["is","not","then","otherwise","switch","break"]),g.isSchema(a))return o(i.is===void 0,'"is" can not be used with a schema condition'),o(i.not===void 0,'"not" can not be used with a schema condition'),o(i.switch===void 0,'"switch" can not be used with a schema condition'),u.condition(t,{is:a,then:i.then,otherwise:i.otherwise,break:i.break});if(o(f.isRef(a)||typeof a=="string","Invalid condition:",a),o(i.not===void 0||i.is===void 0,'Cannot combine "is" with "not"'),i.switch===void 0){let s=i;i.not!==void 0&&(s={is:i.not,then:i.otherwise,otherwise:i.then,break:i.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"),i.is===void 0||f.isRef(i.is)||g.isSchema(i.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(i.switch),'"switch" must be an array'),o(i.is===void 0,'Cannot combine "switch" with "is"'),o(i.not===void 0,'Cannot combine "switch" with "not"'),o(i.then===void 0,'Cannot combine "switch" with "then"');const r={ref:y.ref(a),switch:[],break:i.break};for(let s=0;s<i.switch.length;++s){const c=i.switch[s],n=s===i.switch.length-1;g.assertOptions(c,n?["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)||g.isSchema(c.is)||(l.is=l.is.required()),n){o(i.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const d=i.otherwise!==void 0?i.otherwise:c.otherwise;d!==void 0&&(o(r.break===void 0,"Cannot specify both otherwise and break"),l.otherwise=t.$_compile(d))}r.switch.push(l)}return r},u.condition=function(t,a){for(const i of["then","otherwise"])a[i]===void 0?delete a[i]:a[i]=t.$_compile(a[i]);return a}},6354:(j,y,x)=>{const o=x(5688),g=x(8160),f=x(3328);y.Report=class{constructor(u,t,a,i,r,s,c){if(this.code=u,this.flags=i,this.messages=r,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 n=this.path[this.path.length-1];typeof n!="object"&&(this.local.key=n)}}_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,i,r){if(!t)return;if(f.isTemplate(t))return a!=="root"?t:null;let s=r.errors.language;if(g.isResolvable(s)&&(s=s.resolve(u,i,r)),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,i){if(!a.errors.label)return"";if(u.label)return u.label;let r=t.path;return a.errors.label==="key"&&t.path.length>1&&(r=t.path.slice(-1)),y.path(r)||y.template(null,a.messages,"root",t,a)||i&&y.template(null,i,"root",t,a)||"value"},y.process=function(u,t,a){if(!u)return null;const{override:i,message:r,details:s}=y.details(u);if(i)return i;if(a.errors.stack)return new y.ValidationError(r,s,t);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new y.ValidationError(r,s,t);return Error.stackTraceLimit=c,n},y.details=function(u,t={}){let a=[];const i=[];for(const r of u){if(r instanceof Error){if(t.override!==!1)return{override:r};const c=r.toString();a.push(c),i.push({message:c,type:"override",context:{error:r}});continue}const s=r.toString();a.push(s),i.push({message:s,path:r.path.filter(c=>typeof c!="object"),type:r.code,context:r.local})}return a.length>1&&(a=[...new Set(a)]),{message:a.join(". "),details:i}},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),g=x(8571),f=x(8160),u=x(6914),t={};y.type=function(a,i){const r=Object.getPrototypeOf(a),s=g(r),c=a._assign(Object.create(s)),n=Object.assign({},i);delete n.base,s._definition=n;const l=r._definition||{};n.messages=u.merge(l.messages,n.messages),n.properties=Object.assign({},l.properties,n.properties),c.type=n.type,n.flags=Object.assign({},l.flags,n.flags);const d=Object.assign({},l.terms);if(n.terms)for(const k in n.terms){const h=n.terms[k];o(c.$_terms[k]===void 0,"Invalid term override for",n.type,k),c.$_terms[k]=h.init,d[k]=h}n.terms=d,n.args||(n.args=l.args),n.prepare=t.prepare(n.prepare,l.prepare),n.coerce&&(typeof n.coerce=="function"&&(n.coerce={method:n.coerce}),n.coerce.from&&!Array.isArray(n.coerce.from)&&(n.coerce={method:n.coerce.method,from:[].concat(n.coerce.from)})),n.coerce=t.coerce(n.coerce,l.coerce),n.validate=t.validate(n.validate,l.validate);const m=Object.assign({},l.rules);if(n.rules)for(const k in n.rules){const h=n.rules[k];o(typeof h=="object","Invalid rule definition for",n.type,k);let v=h.method;if(v===void 0&&(v=function(){return this.$_addRule(k)}),v&&(o(!s[k],"Rule conflict in",n.type,k),s[k]=v),o(!m[k],"Rule conflict in",n.type,k),m[k]=h,h.alias){const b=[].concat(h.alias);for(const C of b)s[C]=h.method}h.args&&(h.argsByName=new Map,h.args=h.args.map(b=>(typeof b=="string"&&(b={name:b}),o(!h.argsByName.has(b.name),"Duplicated argument name",b.name),f.isSchema(b.assert)&&(b.assert=b.assert.strict().label(b.name)),h.argsByName.set(b.name,b),b)))}n.rules=m;const p=Object.assign({},l.modifiers);if(n.modifiers)for(const k in n.modifiers){o(!s[k],"Rule conflict in",n.type,k);const h=n.modifiers[k];o(typeof h=="function","Invalid modifier definition for",n.type,k);const v=function(b){return this.rule({[k]:b})};s[k]=v,p[k]=h}if(n.modifiers=p,n.overrides){s._super=r,c.$_super={};for(const k in n.overrides)o(r[k],"Cannot override missing",k),n.overrides[k][f.symbols.parent]=r[k],c.$_super[k]=r[k].bind(c);Object.assign(s,n.overrides)}n.cast=Object.assign({},l.cast,n.cast);const _=Object.assign({},l.manifest,n.manifest);return _.build=t.build(n.manifest&&n.manifest.build,l.manifest&&l.manifest.build),n.manifest=_,n.rebuild=t.rebuild(n.rebuild,l.rebuild),c},t.build=function(a,i){return a&&i?function(r,s){return i(a(r,s),s)}:a||i},t.coerce=function(a,i){return a&&i?{from:a.from&&i.from?[...new Set([...a.from,...i.from])]:null,method(r,s){let c;if((!i.from||i.from.includes(typeof r))&&(c=i.method(r,s),c)){if(c.errors||c.value===void 0)return c;r=c.value}if(!a.from||a.from.includes(typeof r)){const n=a.method(r,s);if(n)return n}return c}}:a||i},t.prepare=function(a,i){return a&&i?function(r,s){const c=a(r,s);if(c){if(c.errors||c.value===void 0)return c;r=c.value}return i(r,s)||c}:a||i},t.rebuild=function(a,i){return a&&i?function(r){i(r),a(r)}:a||i},t.validate=function(a,i){return a&&i?function(r,s){const c=i(r,s);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;r=c.value}return a(r,s)||c}:a||i}},5107:(j,y,x)=>{const o=x(375),g=x(8571),f=x(8652),u=x(8160),t=x(3292),a=x(6354),i=x(8901),r=x(9708),s=x(6133),c=x(3328),n=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 m={_types:new Set(Object.keys(d.types))};for(const p of m._types)m[p]=function(..._){return o(!_.length||["alternatives","link","object"].includes(p),"The",p,"type does not allow arguments"),d.generate(this,d.types[p],_)};for(const p of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])m[p]=function(..._){return this.any()[p](..._)};Object.assign(m,d.methods);for(const p in d.aliases){const _=d.aliases[p];m[p]=m[_]}return m.x=m.expression,n.setup&&n.setup(m),m}};d.methods={ValidationError:a.ValidationError,version:u.version,cache:f.provider,assert(m,p,..._){d.assert(m,p,!0,_)},attempt:(m,p,..._)=>d.assert(m,p,!1,_),build(m){return o(typeof r.build=="function","Manifest functionality disabled"),r.build(this,m)},checkPreferences(m){u.checkPreferences(m)},compile(m,p){return t.compile(this,m,p)},defaults(m){o(typeof m=="function","modifier must be a function");const p=Object.assign({},this);for(const _ of p._types){const k=m(p[_]());o(u.isSchema(k),"modifier must return a valid schema object"),p[_]=function(...h){return d.generate(this,k,h)}}return p},expression:(...m)=>new c(...m),extend(...m){u.verifyFlat(m,"extend"),l=l||x(3378),o(m.length,"You need to provide at least one extension"),this.assert(m,l.extensions);const p=Object.assign({},this);p._types=new Set(p._types);for(let _ of m){typeof _=="function"&&(_=_(p)),this.assert(_,l.extension);const k=d.expandExtension(_,p);for(const h of k){o(p[h.type]===void 0||p._types.has(h.type),"Cannot override name",h.type);const v=h.base||this.any(),b=i.type(v,h);p._types.add(h.type),p[h.type]=function(...C){return d.generate(this,b,C)}}}return p},isError:a.ValidationError.isError,isExpression:c.isTemplate,isRef:s.isRef,isSchema:u.isSchema,in:(...m)=>s.in(...m),override:u.symbols.override,ref:(...m)=>s.create(...m),types(){const m={};for(const p of this._types)m[p]=this[p]();for(const p in d.aliases)m[p]=this[p]();return m}},d.assert=function(m,p,_,k){const h=k[0]instanceof Error||typeof k[0]=="string"?k[0]:null,v=h!==null?k[1]:k[0],b=p.validate(m,u.preferences({errors:{stack:!0}},v||{}));let C=b.error;if(!C)return b.value;if(h instanceof Error)throw h;const O=_&&typeof C.annotate=="function"?C.annotate():C.message;throw C instanceof a.ValidationError==0&&(C=g(C)),C.message=h?`${h} ${O}`:O,C},d.generate=function(m,p,_){return o(m,"Must be invoked on a Joi instance."),p.$_root=m,p._definition.args&&_.length?p._definition.args(p,..._):p},d.expandExtension=function(m,p){if(typeof m.type=="string")return[m];const _=[];for(const k of p._types)if(m.type.test(k)){const h=Object.assign({},m);h.type=k,h.base=p[k](),_.push(h)}return _},j.exports=d.root()},6914:(j,y,x)=>{const o=x(375),g=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?g(t):{};for(let a in u){const i=u[a];if(a==="root"||f.isTemplate(i)){t[a]=i;continue}if(typeof i=="string"){t[a]=new f(i);continue}o(typeof i=="object"&&!Array.isArray(i),"Invalid message for",a);const r=a;for(a in t[r]=t[r]||{},i){const s=i[a];a==="root"||f.isTemplate(s)?t[r][a]=s:(o(typeof s=="string","Invalid message for",a,"in",r),t[r][a]=new f(s))}}return t},y.decompile=function(u){const t={};for(let a in u){const i=u[a];if(a==="root"){t.root=i;continue}if(f.isTemplate(i)){t[a]=i.describe({compact:!0});continue}const r=a;for(a in t[r]={},i){const s=i[a];a!=="root"?t[r][a]=s.describe({compact:!0}):t[r].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=g(u);for(let i in t){const r=t[i];if(i==="root"||f.isTemplate(r)){a[i]=r;continue}if(typeof r=="string"){a[i]=new f(r);continue}o(typeof r=="object"&&!Array.isArray(r),"Invalid message for",i);const s=i;for(i in a[s]=a[s]||{},r){const c=r[i];i==="root"||f.isTemplate(c)?a[s][i]=c:(o(typeof c=="string","Invalid message for",i,"in",s),a[s][i]=new f(c))}}return a}},2294:(j,y,x)=>{const o=x(375),g=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,i]of t._byId.entries())o(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,i);for(const[a,i]of t._byKey.entries())o(!this._byId.has(a),"Schema key conflicts with existing id:",a),this._byKey.set(a,i)}fork(t,a,i){const r=this._collect(t);r.push({schema:i});const s=r.shift();let c={id:s.id,schema:a(s.schema)};o(g.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const n of r)c={id:n.id,schema:u.fork(n.schema,c.id,c.schema)};return c.schema}labels(t,a=[]){const i=t[0],r=this._get(i);if(!r)return[...a,...t].join(".");const s=t.slice(1);return a=[...a,r.schema._flags.label||i],s.length?r.schema._ids.labels(s,a):a.join(".")}reach(t,a=[]){const i=t[0],r=this._get(i);o(r,"Schema does not contain path",[...a,...t].join("."));const s=t.slice(1);return s.length?r.schema._ids.reach(s,[...a,i]):r.schema}register(t,{key:a}={}){if(!t||!g.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const i=t._flags.id;if(i){const r=this._byId.get(i);o(!r||r.schema===t,"Cannot add different schemas with the same id:",i),o(!this._byKey.has(i),"Schema id conflicts with existing key:",i),this._byId.set(i,{schema:t,id:i})}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=[],i=[]){const r=t[0],s=this._get(r);o(s,"Schema does not contain path",[...a,...t].join(".")),i=[s,...i];const c=t.slice(1);return c.length?s.schema._ids._collect(c,[...a,r],i):i}_get(t){return this._byId.get(t)||this._byKey.get(t)}},u.fork=function(t,a,i){const r=y.schema(t,{each:(s,{key:c})=>{if(a===(s._flags.id||c))return i},ref:!1});return r?r.$_mutateRebuild():t},y.schema=function(t,a){let i;for(const r in t._flags){if(r[0]==="_")continue;const s=u.scan(t._flags[r],{source:"flags",name:r},a);s!==void 0&&(i=i||t.clone(),i._flags[r]=s)}for(let r=0;r<t._rules.length;++r){const s=t._rules[r],c=u.scan(s.args,{source:"rules",name:s.name},a);if(c!==void 0){i=i||t.clone();const n=Object.assign({},s);n.args=c,i._rules[r]=n,i._singleRules.get(s.name)===s&&i._singleRules.set(s.name,n)}}for(const r in t.$_terms){if(r[0]==="_")continue;const s=u.scan(t.$_terms[r],{source:"terms",name:r},a);s!==void 0&&(i=i||t.clone(),i.$_terms[r]=s)}return i},u.scan=function(t,a,i,r,s){const c=r||[];if(t===null||typeof t!="object")return;let n;if(Array.isArray(t)){for(let l=0;l<t.length;++l){const d=a.source==="terms"&&a.name==="keys"&&t[l].key,m=u.scan(t[l],a,i,[l,...c],d);m!==void 0&&(n=n||t.slice(),n[l]=m)}return n}if(i.schema!==!1&&g.isSchema(t)||i.ref!==!1&&f.isRef(t)){const l=i.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,i,[l,...c],s);d!==void 0&&(n=n||Object.assign({},t),n[l]=d)}return n}},6133:(j,y,x)=>{const o=x(375),g=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(i,r={}){o(typeof i=="string","Invalid reference key:",i),u.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),o(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const s=Object.assign({},a.defaults,r);delete s.prefix;const c=s.separator,n=a.context(i,c,r.prefix);if(s.type=n.type,i=n.key,s.type==="value")if(n.root&&(o(!c||i[0]!==c,"Cannot specify relative path with root prefix"),s.ancestor="root",i||(i=null)),c&&c===i)i=null,s.ancestor=0;else if(s.ancestor!==void 0)o(!c||!i||i[0]!==c,"Cannot combine prefix with ancestor option");else{const[l,d]=a.ancestor(i,c);d&&(i=i.slice(d))===""&&(i=null),s.ancestor=l}return s.path=c?i===null?[]:i.split(c):[i],new a.Ref(s)},y.in=function(i,r={}){return y.create(i,{...r,in:!0})},y.isRef=function(i){return!!i&&!!i[u.symbols.ref]},a.Ref=class{constructor(i){o(typeof i=="object","Invalid reference construction"),u.assertOptions(i,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),o([!1,void 0].includes(i.separator)||typeof i.separator=="string"&&i.separator.length===1,"Invalid separator"),o(!i.adjust||typeof i.adjust=="function","options.adjust must be a function"),o(!i.map||Array.isArray(i.map),"options.map must be an array"),o(!i.map||!i.adjust,"Cannot set both map and adjust options"),Object.assign(this,a.defaults,i),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(i,r,s,c,n={}){return o(!this.in||n.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(s.context,r,n):this.type==="local"?this._resolve(c,r,n):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,n):(o(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,n)):this._resolve(i,r,n)}_resolve(i,r,s){let c;if(this.type==="value"&&r.mainstay.shadow&&s.shadow!==!1&&(c=r.mainstay.shadow.get(this.absolute(r))),c===void 0&&(c=f(i,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const n=this.map.get(c);n!==void 0&&(c=n)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,c),c}toString(){return this.display}absolute(i){return[...i.path.slice(0,-this.ancestor),...this.path]}clone(){return new a.Ref(this)}describe(){const i={path:this.path};this.type!=="value"&&(i.type=this.type),this.separator!=="."&&(i.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(i.ancestor=this.ancestor),this.map&&(i.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(i[r]=this[r]);return this.in!==!1&&(i.in=!0),{ref:i}}updateDisplay(){const i=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${i}`);if(!this.separator)return void(this.display=`ref:${i}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${i}`);if(this.ancestor==="root")return void(this.display=`ref:root:${i}`);if(this.ancestor===1)return void(this.display=`ref:${i||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${i||""}`}},a.Ref.prototype[u.symbols.ref]=!0,y.build=function(i){return(i=Object.assign({},a.defaults,i)).type==="value"&&i.ancestor===void 0&&(i.ancestor=1),new a.Ref(i)},a.context=function(i,r,s={}){if(i=i.trim(),s){const c=s.global===void 0?"$":s.global;if(c!==r&&i.startsWith(c))return{key:i.slice(c.length),type:"global"};const n=s.local===void 0?"#":s.local;if(n!==r&&i.startsWith(n))return{key:i.slice(n.length),type:"local"};const l=s.root===void 0?"/":s.root;if(l!==r&&i.startsWith(l))return{key:i.slice(l.length),type:"value",root:!0}}return{key:i,type:"value"}},a.ancestor=function(i,r){if(!r)return[1,0];if(i[0]!==r)return[1,0];if(i[1]!==r)return[0,1];let s=2;for(;i[s]===r;)++s;return[s-1,s]},y.toSibling=0,y.toParent=1,y.Manager=class{constructor(){this.refs=[]}register(i,r){if(i)if(r=r===void 0?y.toParent:r,Array.isArray(i))for(const s of i)this.register(s,r);else if(u.isSchema(i))for(const s of i._refs.refs)s.ancestor-r>=0&&this.refs.push({ancestor:s.ancestor-r,root:s.root});else y.isRef(i)&&i.type==="value"&&i.ancestor-r>=0&&this.refs.push({ancestor:i.ancestor-r,root:i.root}),t=t||x(3328),t.isTemplate(i)&&this.register(i.refs(),r)}get length(){return this.refs.length}clone(){const i=new y.Manager;return i.refs=g(this.refs),i}reset(){this.refs=[]}roots(){return this.refs.filter(i=>!i.ancestor).map(i=>i.root)}}},3378:(j,y,x)=>{const o=x(5107),g={};g.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:g.wrap,array:g.wrap,string:g.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(),g.nameRx=/^[a-zA-Z0-9]\w*$/,g.rule=o.object({alias:o.array().items(o.string().pattern(g.nameRx)).single(),args:o.array().items(o.string(),o.object({name:o.string().pattern(g.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(g.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(g.nameRx,o.object({setter:o.string(),default:o.any()})),manifest:{build:o.function().arity(2)},messages:[o.object(),o.string()],modifiers:o.object().pattern(g.nameRx,o.function().minArity(1).maxArity(2)),overrides:o.object().pattern(g.nameRx,o.function()),prepare:o.function().maxArity(3),rebuild:o.function().arity(1),rules:o.object().pattern(g.nameRx,g.rule),terms:o.object().pattern(g.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(),g.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()})},g.desc.entity=o.alternatives([o.array().items(o.link("...")),o.boolean(),o.function(),o.number(),o.string(),g.desc.buffer,g.desc.func,g.desc.ref,g.desc.regex,g.desc.special,g.desc.template,g.desc.value,o.link("/")]),g.desc.values=o.array().items(null,o.boolean(),o.function(),o.number().allow(1/0,-1/0),o.string().allow(""),o.symbol(),g.desc.buffer,g.desc.func,g.desc.override,g.desc.ref,g.desc.regex,g.desc.template,g.desc.value),g.desc.messages=o.object().pattern(/.+/,[o.string(),g.desc.template,o.object().pattern(/.+/,[o.string(),g.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:g.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(),g.desc.ref],wrap:{label:g.wrap,array:g.wrap}},externals:o.boolean(),messages:g.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:g.desc.values,invalid:g.desc.values,rules:o.array().min(1).items({name:o.string().required(),args:o.object().min(1),keep:o.boolean(),message:[o.string(),g.desc.messages],warn:o.boolean()}),keys:o.object().pattern(/.*/,o.link("/")),link:g.desc.ref}).pattern(/^[a-z]\w*$/,o.any())},493:(j,y,x)=>{const o=x(8571),g=x(9621),f=x(8160),u={value:Symbol("value")};j.exports=u.State=class{constructor(t,a,i){this.path=t,this.ancestors=a,this.mainstay=i.mainstay,this.schemas=i.schemas,this.debug=null}localize(t,a=null,i=null){const r=new u.State(t,a,this);return i&&r.schemas&&(r.schemas=[u.schemas(i),...r.schemas]),r}nest(t,a){const i=new u.State(this.path,this.ancestors,this);return i.schemas=i.schemas&&[u.schemas(t),...i.schemas],i.debug=a,i}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,i){if(!t.length||i==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let r=this._values;for(let s=0;s<t.length;++s){const c=t[s];let n=r.get(c);n||(n=new Map,r.set(c,n)),r=n}r[u.value]=a}get(t){const a=this.node(t);if(a)return a[u.value]}node(t){if(this._values)return g(this._values,t,{iterables:!0})}override(t,a){if(!this._values)return;const i=t.slice(0,-1),r=t[t.length-1],s=g(this._values,i,{iterables:!0});a?s.set(r,a):s&&s.delete(r)}}},3328:(j,y,x)=>{const o=x(375),g=x(8571),f=x(5277),u=x(1447),t=x(8160),a=x(6354),i=x(6133),r={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};j.exports=r.Template=class{constructor(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:n,...l}=c;this._settings=Object.keys(l).length?g(l):void 0,this._functions=n,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=r.encode(this.source),c=r.split(s);let n=!1;const l=[],d=c.shift();d&&l.push(d);for(const m of c){const p=m[0]!=="{",_=p?"}":"}}",k=m.indexOf(_);if(k===-1||m[1]==="{"){l.push(`{${r.decode(m)}`);continue}let h=m.slice(p?0:1,k);const v=h[0]===":";v&&(h=h.slice(1));const b=this._ref(r.decode(h),{raw:p,wrapped:v});l.push(b),typeof b!="string"&&(n=!0);const C=m.slice(k+_.length);C&&l.push(r.decode(C))}n?this._template=l:this.rendered=l.join("")}static date(s,c){return r.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 r.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,n,l){return this._template&&this._template.length===1?this._part(this._template[0],s,c,n,l,{}):this.render(s,c,n,l)}_part(s,...c){return s.ref?s.ref.resolve(...c):s.formula.evaluate(c)}render(s,c,n,l,d={}){if(!this.isDynamic())return this.rendered;const m=[];for(const p of this._template)if(typeof p=="string")m.push(p);else{const _=this._part(p,s,c,n,l,d),k=r.stringify(_,s,c,n,l,d);if(k!==void 0){const h=p.raw||(d.errors&&d.errors.escapeHtml)===!1?k:f(k);m.push(r.wrap(h,p.wrapped&&n.errors.wrap.label))}}return m.join("")}_ref(s,{raw:c,wrapped:n}){const l=[],d=p=>{const _=i.create(p,this._settings);return l.push(_),k=>{const h=_.resolve(...k);return h!==void 0?h:null}};try{const p=this._functions?{...r.functions,...this._functions}:r.functions;var m=new u.Parser(s,{reference:d,functions:p,constants:r.constants})}catch(p){throw p.message=`Invalid template variable "${s}" fails due to: ${p.message}`,p}if(m.single){if(m.single.type==="reference"){const p=l[0];return{ref:p,raw:c,refs:l,wrapped:n||p.type==="local"&&p.key==="label"}}return r.stringify(m.single.value)}return{formula:m,raw:c,refs:l}}toString(){return this.source}},r.Template.prototype[t.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(s){return s.replace(/\\(\{+)/g,(c,n)=>r.opens.slice(0,n.length)).replace(/\\(\}+)/g,(c,n)=>r.closes.slice(0,n.length))},r.decode=function(s){return s.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(s){const c=[];let n="";for(let l=0;l<s.length;++l){const d=s[l];if(d==="{"){let m="";for(;l+1<s.length&&s[l+1]==="{";)m+="{",++l;c.push(n),n=m}else n+=d}return c.push(n),c},r.wrap=function(s,c){return c?c.length===1?`${c}${s}${c}`:`${c[0]}${s}${c[1]}`:s},r.stringify=function(s,c,n,l,d,m={}){const p=typeof s,_=l&&l.errors&&l.errors.wrap||{};let k=!1;if(i.isRef(s)&&s.render&&(k=s.in,s=s.resolve(c,n,l,d,{in:s.in,...m})),s===null)return"null";if(p==="string")return r.wrap(s,m.arrayItems&&_.string);if(p==="number"||p==="function"||p==="symbol")return s.toString();if(p!=="object")return JSON.stringify(s);if(s instanceof Date)return r.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 h=[];for(const v of s)h.push(r.stringify(v,c,n,l,d,{arrayItems:!0,...m}));return r.wrap(h.join(", "),!k&&_.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(s,c,n)=>s?c:n,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,n,l,d,m]=this,p=m.messages;if(!p)return"";const _=a.template(c,p[0],s,n,l)||a.template(c,p[1],s,n,l);return _?_.render(c,n,l,d,m):""},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),g=x(1687),f=x(8068),u=x(8160),t=x(3292),a=x(6354),i=x(6133),r={};j.exports=f.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:i.toSibling}},args:(s,...c)=>c.length===1&&Array.isArray(c[0])?s.try(...c[0]):s.try(...c),validate(s,c){const{schema:n,error:l,state:d,prefs:m}=c;if(n._flags.match){const _=[],k=[];for(let v=0;v<n.$_terms.matches.length;++v){const b=n.$_terms.matches[v],C=d.nest(b.schema,`match.${v}`);C.snapshot();const O=b.schema.$_validate(s,C,m);O.errors?(k.push(O.errors),C.restore()):(_.push(O.value),C.commit())}if(_.length===0)return{errors:l("alternatives.any",{details:k.map(v=>a.details(v,{override:!1}))})};if(n._flags.match==="one")return _.length===1?{value:_[0]}:{errors:l("alternatives.one")};if(_.length!==n.$_terms.matches.length)return{errors:l("alternatives.all",{details:k.map(v=>a.details(v,{override:!1}))})};const h=v=>v.$_terms.matches.some(b=>b.schema.type==="object"||b.schema.type==="alternatives"&&h(b.schema));return h(n)?{value:_.reduce((v,b)=>g(v,b,{mergeArrays:!1}))}:{value:_[_.length-1]}}const p=[];for(let _=0;_<n.$_terms.matches.length;++_){const k=n.$_terms.matches[_];if(k.schema){const b=d.nest(k.schema,`match.${_}`);b.snapshot();const C=k.schema.$_validate(s,b,m);if(!C.errors)return b.commit(),C;b.restore(),p.push({schema:k.schema,reports:C.errors});continue}const h=k.ref?k.ref.resolve(s,d,m):s,v=k.is?[k]:k.switch;for(let b=0;b<v.length;++b){const C=v[b],{is:O,then:$,otherwise:L}=C,B=`match.${_}${k.switch?"."+b:""}`;if(O.$_match(h,d.nest(O,`${B}.is`),m)){if($)return $.$_validate(s,d.nest($,`${B}.then`),m)}else if(L)return L.$_validate(s,d.nest(L,`${B}.otherwise`),m)}}return r.errors(p,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 n=this.clone(),l=t.when(n,s,c),d=l.is?[l]:l.switch;for(const m of d)if(m.then&&m.otherwise){n.$_setFlag("_endedSwitch",!0,{clone:!1});break}return n.$_terms.matches.push(l),n.$_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 n of s)c.$_terms.matches.push({schema:c.$_compile(n)});return c.$_mutateRebuild()}}},overrides:{label(s){return this.$_parent("label",s).$_modify({each:(c,n)=>n.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 n of c.matches){const{schema:l,ref:d,is:m,not:p,then:_,otherwise:k}=n;s=l?s.try(l):d?s.conditional(d,{is:m,then:_,not:p,otherwise:k,switch:n.switch}):s.conditional(m,{then:_,otherwise:k})}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}}"}}),r.errors=function(s,{error:c,state:n}){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:m,schema:p}of s){if(m.length>1)return r.unmatched(s,c);const _=m[0];if(_ instanceof a.Report==0)return r.unmatched(s,c);if(_.state.path.length!==n.path.length){d.push({type:p.type,report:_});continue}if(_.code==="any.only"){for(const v of _.local.valids)l.add(v);continue}const[k,h]=_.code.split(".");h!=="base"?d.push({type:p.type,report:_}):_.code==="object.base"?l.add(_.local.type):l.add(k)}return d.length?d.length===1?{errors:d[0].report}:r.unmatched(s,c):{errors:c("alternatives.types",{types:[...l]})}},r.unmatched=function(s,c){const n=[];for(const l of s)n.push(...l.reports);return{errors:c("alternatives.match",a.details(n,{override:!1}))}}},8068:(j,y,x)=>{const o=x(375),g=x(7629),f=x(8160),u=x(6914);j.exports=g.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:i}){try{return i(t,a)}catch(r){return a.error("any.custom",{error:r})}},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:i,local:r})=>a.error(i,r),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 i in a){const r=a[i];if(["examples","externals","metas","notes","tags"].includes(i))for(const s of r)t=t[i.slice(0,-1)](s);else if(i!=="alterations")if(i!=="whens"){if(i==="shared")for(const s of r)t=t.shared(s)}else for(const s of r){const{ref:c,is:n,not:l,then:d,otherwise:m,concat:p}=s;t=p?t.concat(p):c?t.when(c,{is:n,not:l,then:d,otherwise:m,switch:s.switch,break:s.break}):t.when(n,{then:d,otherwise:m,break:s.break})}else{const s={};for(const{target:c,adjuster:n}of r)s[c]=n;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),g=x(9474),f=x(9621),u=x(8068),t=x(8160),a=x(3292),i={};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(r,{schema:s,state:c,prefs:n}){if(!Array.isArray(r))return;const l=s.$_getRule("sort");return l?i.sort(s,r,l.args.options,c,n):void 0}},validate(r,{schema:s,error:c}){if(!Array.isArray(r)){if(s._flags.single){const n=[r];return n[t.symbols.arraySingle]=!0,{value:n}}return{errors:c("array.base")}}if(s.$_getRule("items")||s.$_terms.externals)return{value:r.slice()}},rules:{has:{method(r){r=this.$_compile(r,{appendPath:!0});const s=this.$_addRule({name:"has",args:{schema:r}});return s.$_mutateRegister(r),s},validate(r,{state:s,prefs:c,error:n},{schema:l}){const d=[r,...s.ancestors];for(let p=0;p<r.length;++p){const _=s.localize([...s.path,p],d,l);if(l.$_match(r[p],_,c))return r}const m=l._flags.label;return m?n("array.hasKnown",{patternLabel:m}):n("array.hasUnknown",null)},multi:!0},items:{method(...r){t.verifyFlat(r,"items");const s=this.$_addRule("items");for(let c=0;c<r.length;++c){const n=t.tryWithPath(()=>this.$_compile(r[c]),c,{append:!0});s.$_terms.items.push(n)}return s.$_mutateRebuild()},validate(r,{schema:s,error:c,state:n,prefs:l,errorsArray:d}){const m=s.$_terms._requireds.slice(),p=s.$_terms.ordered.slice(),_=[...s.$_terms._inclusions,...m],k=!r[t.symbols.arraySingle];delete r[t.symbols.arraySingle];const h=d();let v=r.length;for(let b=0;b<v;++b){const C=r[b];let O=!1,$=!1;const L=k?b:new Number(b),B=[...n.path,L];if(!s._flags.sparse&&C===void 0){if(h.push(c("array.sparse",{key:L,path:B,pos:b,value:void 0},n.localize(B))),l.abortEarly)return h;p.shift();continue}const W=[r,...n.ancestors];for(const N of s.$_terms._exclusions)if(N.$_match(C,n.localize(B,W,N),l,{presence:"ignore"})){if(h.push(c("array.excludes",{pos:b,value:C},n.localize(B))),l.abortEarly)return h;O=!0,p.shift();break}if(O)continue;if(s.$_terms.ordered.length){if(p.length){const N=p.shift(),U=N.$_validate(C,n.localize(B,W,N),l);if(U.errors){if(h.push(...U.errors),l.abortEarly)return h}else if(N._flags.result==="strip")i.fastSplice(r,b),--b,--v;else{if(!s._flags.sparse&&U.value===void 0){if(h.push(c("array.sparse",{key:L,path:B,pos:b,value:void 0},n.localize(B))),l.abortEarly)return h;continue}r[b]=U.value}continue}if(!s.$_terms.items.length){if(h.push(c("array.orderedLength",{pos:b,limit:s.$_terms.ordered.length})),l.abortEarly)return h;break}}const G=[];let Z=m.length;for(let N=0;N<Z;++N){const U=n.localize(B,W,m[N]);U.snapshot();const te=m[N].$_validate(C,U,l);if(G[N]=te,!te.errors){if(U.commit(),r[b]=te.value,$=!0,i.fastSplice(m,N),--N,--Z,!s._flags.sparse&&te.value===void 0&&(h.push(c("array.sparse",{key:L,path:B,pos:b,value:void 0},n.localize(B))),l.abortEarly))return h;break}U.restore()}if($)continue;const D=l.stripUnknown&&!!l.stripUnknown.arrays||!1;Z=_.length;for(const N of _){let U;const te=m.indexOf(N);if(te!==-1)U=G[te];else{const xe=n.localize(B,W,N);if(xe.snapshot(),U=N.$_validate(C,xe,l),!U.errors){xe.commit(),N._flags.result==="strip"?(i.fastSplice(r,b),--b,--v):s._flags.sparse||U.value!==void 0?r[b]=U.value:(h.push(c("array.sparse",{key:L,path:B,pos:b,value:void 0},n.localize(B))),O=!0),$=!0;break}xe.restore()}if(Z===1){if(D){i.fastSplice(r,b),--b,--v,$=!0;break}if(h.push(...U.errors),l.abortEarly)return h;O=!0;break}}if(!O&&(s.$_terms._inclusions.length||s.$_terms._requireds.length)&&!$){if(D){i.fastSplice(r,b),--b,--v;continue}if(h.push(c("array.includes",{pos:b,value:C},n.localize(B))),l.abortEarly)return h}}return m.length&&i.fillMissedErrors(s,h,m,r,n,l),p.length&&(i.fillOrderedErrors(s,h,p,r,n,l),h.length||i.fillDefault(p,r,n,l)),h.length?h:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,s,{limit:c},{name:n,operator:l,args:d})=>t.compare(r.length,c,l)?r:s.error("array."+n,{limit:d.limit,value:r}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(r){return this.$_addRule({name:"max",method:"length",args:{limit:r},operator:"<="})}},min:{method(r){return this.$_addRule({name:"min",method:"length",args:{limit:r},operator:">="})}},ordered:{method(...r){t.verifyFlat(r,"ordered");const s=this.$_addRule("items");for(let c=0;c<r.length;++c){const n=t.tryWithPath(()=>this.$_compile(r[c]),c,{append:!0});i.validateSingle(n,s),s.$_mutateRegister(n),s.$_terms.ordered.push(n)}return s.$_mutateRebuild()}},single:{method(r){const s=r===void 0||!!r;return o(!s||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",s)}},sort:{method(r={}){t.assertOptions(r,["by","order"]);const s={order:r.order||"ascending"};return r.by&&(s.by=a.ref(r.by,{ancestor:0}),o(!s.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:s}})},validate(r,{error:s,state:c,prefs:n,schema:l},{options:d}){const{value:m,errors:p}=i.sort(l,r,d,c,n);if(p)return p;for(let _=0;_<r.length;++_)if(r[_]!==m[_])return s("array.sort",{order:d.order,by:d.by?d.by.key:"value"});return r},convert:!0},sparse:{method(r){const s=r===void 0||!!r;return this._flags.sparse===s?this:(s?this.clone():this.$_addRule("items")).$_setFlag("sparse",s,{clone:!1})}},unique:{method(r,s={}){o(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),t.assertOptions(s,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:s,comparator:r}};if(r)if(typeof r=="string"){const n=t.default(s.separator,".");c.path=n?r.split(n):[r]}else c.comparator=r;return this.$_addRule(c)},validate(r,{state:s,error:c,schema:n},{comparator:l,options:d},{comparator:m,path:p}){const _={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),bigint:Object.create(null),object:new Map,function:new Map,custom:new Map},k=m||g,h=d.ignoreUndefined;for(let v=0;v<r.length;++v){const b=p?f(r[v],p):r[v],C=m?_.custom:_[typeof b];if(o(C,"Failed to find unique map container for type",typeof b),C instanceof Map){const O=C.entries();let $;for(;!($=O.next()).done;)if(k($.value[0],b)){const L=s.localize([...s.path,v],[r,...s.ancestors]),B={pos:v,value:r[v],dupePos:$.value[1],dupeValue:r[$.value[1]]};return p&&(B.path=l),c("array.unique",B,L)}C.set(b,v)}else{if((!h||b!==void 0)&&C[b]!==void 0){const O={pos:v,value:r[v],dupePos:C[b],dupeValue:r[C[b]]};return p&&(O.path=l),c("array.unique",O,s.localize([...s.path,v],[r,...s.ancestors]))}C[b]=v}}return r},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(r,s)=>new Set(r)}},rebuild(r){r.$_terms._inclusions=[],r.$_terms._exclusions=[],r.$_terms._requireds=[];for(const s of r.$_terms.items)i.validateSingle(s,r),s._flags.presence==="required"?r.$_terms._requireds.push(s):s._flags.presence==="forbidden"?r.$_terms._exclusions.push(s):r.$_terms._inclusions.push(s);for(const s of r.$_terms.ordered)i.validateSingle(s,r)},manifest:{build:(r,s)=>(s.items&&(r=r.items(...s.items)),s.ordered&&(r=r.ordered(...s.ordered)),r)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),i.fillMissedErrors=function(r,s,c,n,l,d){const m=[];let p=0;for(const _ of c){const k=_._flags.label;k?m.push(k):++p}m.length?p?s.push(r.$_createError("array.includesRequiredBoth",n,{knownMisses:m,unknownMisses:p},l,d)):s.push(r.$_createError("array.includesRequiredKnowns",n,{knownMisses:m},l,d)):s.push(r.$_createError("array.includesRequiredUnknowns",n,{unknownMisses:p},l,d))},i.fillOrderedErrors=function(r,s,c,n,l,d){const m=[];for(const p of c)p._flags.presence==="required"&&m.push(p);m.length&&i.fillMissedErrors(r,s,m,n,l,d)},i.fillDefault=function(r,s,c,n){const l=[];let d=!0;for(let m=r.length-1;m>=0;--m){const p=r[m],_=[s,...c.ancestors],k=p.$_validate(void 0,c.localize(c.path,_,p),n).value;if(d){if(k===void 0)continue;d=!1}l.unshift(k)}l.length&&s.push(...l)},i.fastSplice=function(r,s){let c=s;for(;c<r.length;)r[c++]=r[c];--r.length},i.validateSingle=function(r,s){(r.type==="array"||r._flags._arrayItems)&&(o(!s._flags.single,"Cannot specify array item with single rule enabled"),s.$_setFlag("_arrayItems",!0,{clone:!1}))},i.sort=function(r,s,c,n,l){const d=c.order==="ascending"?1:-1,m=-1*d,p=d,_=(k,h)=>{let v=i.compare(k,h,m,p);if(v!==null||(c.by&&(k=c.by.resolve(k,n,l),h=c.by.resolve(h,n,l)),v=i.compare(k,h,m,p),v!==null))return v;const b=typeof k;if(b!==typeof h)throw r.$_createError("array.sort.mismatching",s,null,n,l);if(b!=="number"&&b!=="string")throw r.$_createError("array.sort.unsupported",s,{type:b},n,l);return b==="number"?(k-h)*d:k<h?m:p};try{return{value:s.slice().sort(_)}}catch(k){return{errors:k}}},i.compare=function(r,s,c,n){return r===s?0:r===void 0?1:s===void 0?-1:r===null?n:s===null?c:null}},4937:(j,y,x)=>{const o=x(375),g=x(8068),f=x(8160),u=x(2036),t={isBool:function(a){return typeof a=="boolean"}};j.exports=g.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(a,{schema:i}){if(typeof a!="boolean"){if(typeof a=="string"){const r=i._flags.sensitive?a:a.toLowerCase();a=r==="true"||r!=="false"&&a}return typeof a!="boolean"&&(a=i.$_terms.truthy&&i.$_terms.truthy.has(a,null,null,!i._flags.sensitive)||(!i.$_terms.falsy||!i.$_terms.falsy.has(a,null,null,!i._flags.sensitive))&&a),{value:a}}},validate(a,{error:i}){if(typeof a!="boolean")return{value:a,errors:i("boolean.base")}},rules:{truthy:{method(...a){f.verifyFlat(a,"truthy");const i=this.clone();i.$_terms.truthy=i.$_terms.truthy||new u;for(let r=0;r<a.length;++r){const s=a[r];o(s!==void 0,"Cannot call truthy with undefined"),i.$_terms.truthy.add(s)}return i}},falsy:{method(...a){f.verifyFlat(a,"falsy");const i=this.clone();i.$_terms.falsy=i.$_terms.falsy||new u;for(let r=0;r<a.length;++r){const s=a[r];o(s!==void 0,"Cannot call falsy with undefined"),i.$_terms.falsy.add(s)}return i}},sensitive:{method(a=!0){return this.$_setFlag("sensitive",a)}}},cast:{number:{from:t.isBool,to:(a,i)=>a?1:0},string:{from:t.isBool,to:(a,i)=>a?"true":"false"}},manifest:{build:(a,i)=>(i.truthy&&(a=a.truthy(...i.truthy)),i.falsy&&(a=a.falsy(...i.falsy)),a)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(j,y,x)=>{const o=x(375),g=x(8068),f=x(8160),u=x(3328),t={isDate:function(a){return a instanceof Date}};j.exports=g.extend({type:"date",coerce:{from:["number","string"],method:(a,{schema:i})=>({value:t.parse(a,i._flags.format)||a})},validate(a,{schema:i,error:r,prefs:s}){if(a instanceof Date&&!isNaN(a.getTime()))return;const c=i._flags.format;return s.convert&&c&&typeof a=="string"?{value:a,errors:r("date.format",{format:c})}:{value:a,errors:r("date.base")}},rules:{compare:{method:!1,validate(a,i,{date:r},{name:s,operator:c,args:n}){const l=r==="now"?Date.now():r.getTime();return f.compare(a.getTime(),l,c)?a:i.error("date."+s,{limit:n.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,i)=>a.getTime()},string:{from:t.isDate,to:(a,{prefs:i})=>u.date(a,i)}},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,i){if(a instanceof Date)return a;if(typeof a!="string"&&(isNaN(a)||!isFinite(a))||/^\s*$/.test(a))return null;if(i==="iso")return f.isIsoDate(a)?t.date(a.toString()):null;const r=a;if(typeof a=="string"&&/^[+-]?\d+(\.\d+)?$/.test(a)&&(a=parseFloat(a)),i){if(i==="javascript")return t.date(1*a);if(i==="unix")return t.date(1e3*a);if(typeof r=="string")return null}return t.date(a)},t.date=function(a){const i=new Date(a);return isNaN(i.getTime())?null:i}},390:(j,y,x)=>{const o=x(375),g=x(7824);j.exports=g.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),g=x(375),f=x(8571),u=x(3652),t=x(8068),a=x(8160),i=x(3292),r=x(6354),s=x(6133),c=x(3328),n={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:m,state:p,prefs:_}){if(!l||typeof l!==d.$_property("typeof")||Array.isArray(l))return{value:l,errors:m("object.base",{type:d.$_property("typeof")})};if(!(d.$_terms.renames||d.$_terms.dependencies||d.$_terms.keys||d.$_terms.patterns||d.$_terms.externals))return;l=n.clone(l,_);const k=[];if(d.$_terms.renames&&!n.rename(d,l,p,_,k))return{value:l,errors:k};if(!d.$_terms.keys&&!d.$_terms.patterns&&!d.$_terms.dependencies)return{value:l,errors:k};const h=new Set(Object.keys(l));if(d.$_terms.keys){const v=[l,...p.ancestors];for(const b of d.$_terms.keys){const C=b.key,O=l[C];h.delete(C);const $=p.localize([...p.path,C],v,b),L=b.schema.$_validate(O,$,_);if(L.errors){if(_.abortEarly)return{value:l,errors:L.errors};L.value!==void 0&&(l[C]=L.value),k.push(...L.errors)}else b.schema._flags.result==="strip"||L.value===void 0&&O!==void 0?delete l[C]:L.value!==void 0&&(l[C]=L.value)}}if(h.size||d._flags._hasPatternMatch){const v=n.unknown(d,l,h,k,p,_);if(v)return v}if(d.$_terms.dependencies)for(const v of d.$_terms.dependencies){if(v.key!==null&&n.isPresent(v.options)(v.key.resolve(l,p,_,null,{shadow:!1}))===!1)continue;const b=n.dependencies[v.rel](d,v,l,p,_);if(b){const C=d.$_createError(b.code,l,b.context,p,_);if(_.abortEarly)return{value:l,errors:C};k.push(C)}}return{value:l,errors:k}},rules:{and:{method(...l){return a.verifyFlat(l,"and"),n.dependency(this,"and",null,l)}},append:{method(l){return l==null||Object.keys(l).length===0?this:this.keys(l)}},assert:{method(l,d,m){c.isTemplate(l)||(l=i.ref(l)),g(m===void 0||typeof m=="string","Message must be a string"),d=this.$_compile(d,{appendPath:!0});const p=this.$_addRule({name:"assert",args:{subject:l,schema:d,message:m}});return p.$_mutateRegister(l),p.$_mutateRegister(d),p},validate(l,{error:d,prefs:m,state:p},{subject:_,schema:k,message:h}){const v=_.resolve(l,p,m),b=s.isRef(_)?_.absolute(p):[];return k.$_match(v,p.localize(b,[l,...p.ancestors],k),m)?l:d("object.assert",{subject:_,message:h})},args:["subject","schema","message"],multi:!0},instance:{method(l,d){return g(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:m,name:p})=>l instanceof m?l:d.error("object.instance",{type:p,value:l}),args:["constructor","name"]},keys:{method(l){g(l===void 0||typeof l=="object","Object schema must be a valid object"),g(!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(m=>!l.hasOwnProperty(m.key)):new n.Keys;for(const m in l)a.tryWithPath(()=>d.$_terms.keys.push({key:m,schema:this.$_compile(l[m])}),m)}else d.$_terms.keys=new n.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:m},{name:p,operator:_,args:k})=>a.compare(Object.keys(l).length,m,_)?l:d.error("object."+p,{limit:k.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"),n.dependency(this,"nand",null,l)}},or:{method(...l){return a.verifyFlat(l,"or"),n.dependency(this,"or",null,l)}},oxor:{method(...l){return n.dependency(this,"oxor",null,l)}},pattern:{method(l,d,m={}){const p=l instanceof RegExp;p||(l=this.$_compile(l,{appendPath:!0})),g(d!==void 0,"Invalid rule"),a.assertOptions(m,["fallthrough","matches"]),p&&g(!l.flags.includes("g")&&!l.flags.includes("y"),"pattern should not use global or sticky mode"),d=this.$_compile(d,{appendPath:!0});const _=this.clone();_.$_terms.patterns=_.$_terms.patterns||[];const k={[p?"regex":"schema"]:l,rule:d};return m.matches&&(k.matches=this.$_compile(m.matches),k.matches.type!=="array"&&(k.matches=k.matches.$_root.array().items(k.matches)),_.$_mutateRegister(k.matches),_.$_setFlag("_hasPatternMatch",!0,{clone:!1})),m.fallthrough&&(k.fallthrough=!0),_.$_terms.patterns.push(k),_.$_mutateRegister(d),_}},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,m={}){g(typeof l=="string"||l instanceof RegExp,"Rename missing the from argument"),g(typeof d=="string"||d instanceof c,"Invalid rename to argument"),g(d!==l,"Cannot rename key to same name:",l),a.assertOptions(m,["alias","ignoreUndefined","override","multiple"]);const p=this.clone();p.$_terms.renames=p.$_terms.renames||[];for(const _ of p.$_terms.renames)g(_.from!==l,"Cannot rename the same key multiple times");return d instanceof c&&p.$_mutateRegister(d),p.$_terms.renames.push({from:l,to:d,options:o(n.renameDefaults,m)}),p}},schema:{method(l="any"){return this.$_addRule({name:"schema",args:{type:l}})},validate:(l,d,{type:m})=>!a.isSchema(l)||m!=="any"&&l.type!==m?d.error("object.schema",{type:m}):l},unknown:{method(l){return this.$_setFlag("unknown",l!==!1)}},with:{method(l,d,m={}){return n.dependency(this,"with",l,d,m)}},without:{method(l,d,m={}){return n.dependency(this,"without",l,d,m)}},xor:{method(...l){return a.verifyFlat(l,"xor"),n.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 m of l.$_terms.keys)a.tryWithPath(()=>d.add(m,{after:m.schema.$_rootReferences(),group:m.key}),m.key);l.$_terms.keys=new n.Keys(...d.nodes)}},manifest:{build(l,d){if(d.keys&&(l=l.keys(d.keys)),d.dependencies)for(const{rel:m,key:p=null,peers:_,options:k}of d.dependencies)l=n.dependency(l,m,p,_,k);if(d.patterns)for(const{regex:m,schema:p,rule:_,fallthrough:k,matches:h}of d.patterns)l=l.pattern(m||p,_,{fallthrough:k,matches:h});if(d.renames)for(const{from:m,to:p,options:_}of d.renames)l=l.rename(m,p,_);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}}"}}),n.clone=function(l,d){if(typeof l=="object"){if(d.nonEnumerables)return f(l,{shallow:!0});const p=Object.create(Object.getPrototypeOf(l));return Object.assign(p,l),p}const m=function(...p){return l.apply(this,p)};return m.prototype=f(l.prototype),Object.defineProperty(m,"name",{value:l.name,writable:!1}),Object.defineProperty(m,"length",{value:l.length,writable:!1}),Object.assign(m,l),m},n.dependency=function(l,d,m,p,_){g(m===null||typeof m=="string",d,"key must be a strings"),_||(_=p.length>1&&typeof p[p.length-1]=="object"?p.pop():{}),a.assertOptions(_,["separator","isPresent"]),p=[].concat(p);const k=a.default(_.separator,"."),h=[];for(const b of p)g(typeof b=="string",d,"peers must be strings"),h.push(i.ref(b,{separator:k,ancestor:0,prefix:!1}));m!==null&&(m=i.ref(m,{separator:k,ancestor:0,prefix:!1}));const v=l.clone();return v.$_terms.dependencies=v.$_terms.dependencies||[],v.$_terms.dependencies.push(new n.Dependency(d,m,h,p,_)),v},n.dependencies={and(l,d,m,p,_){const k=[],h=[],v=d.peers.length,b=n.isPresent(d.options);for(const C of d.peers)b(C.resolve(m,p,_,null,{shadow:!1}))===!1?k.push(C.key):h.push(C.key);if(k.length!==v&&h.length!==v)return{code:"object.and",context:{present:h,presentWithLabels:n.keysToLabels(l,h),missing:k,missingWithLabels:n.keysToLabels(l,k)}}},nand(l,d,m,p,_){const k=[],h=n.isPresent(d.options);for(const C of d.peers)h(C.resolve(m,p,_,null,{shadow:!1}))&&k.push(C.key);if(k.length!==d.peers.length)return;const v=d.paths[0],b=d.paths.slice(1);return{code:"object.nand",context:{main:v,mainWithLabel:n.keysToLabels(l,v),peers:b,peersWithLabels:n.keysToLabels(l,b)}}},or(l,d,m,p,_){const k=n.isPresent(d.options);for(const h of d.peers)if(k(h.resolve(m,p,_,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:d.paths,peersWithLabels:n.keysToLabels(l,d.paths)}}},oxor(l,d,m,p,_){const k=[],h=n.isPresent(d.options);for(const b of d.peers)h(b.resolve(m,p,_,null,{shadow:!1}))&&k.push(b.key);if(!k.length||k.length===1)return;const v={peers:d.paths,peersWithLabels:n.keysToLabels(l,d.paths)};return v.present=k,v.presentWithLabels=n.keysToLabels(l,k),{code:"object.oxor",context:v}},with(l,d,m,p,_){const k=n.isPresent(d.options);for(const h of d.peers)if(k(h.resolve(m,p,_,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:d.key.key,mainWithLabel:n.keysToLabels(l,d.key.key),peer:h.key,peerWithLabel:n.keysToLabels(l,h.key)}}},without(l,d,m,p,_){const k=n.isPresent(d.options);for(const h of d.peers)if(k(h.resolve(m,p,_,null,{shadow:!1})))return{code:"object.without",context:{main:d.key.key,mainWithLabel:n.keysToLabels(l,d.key.key),peer:h.key,peerWithLabel:n.keysToLabels(l,h.key)}}},xor(l,d,m,p,_){const k=[],h=n.isPresent(d.options);for(const b of d.peers)h(b.resolve(m,p,_,null,{shadow:!1}))&&k.push(b.key);if(k.length===1)return;const v={peers:d.paths,peersWithLabels:n.keysToLabels(l,d.paths)};return k.length===0?{code:"object.missing",context:v}:(v.present=k,v.presentWithLabels=n.keysToLabels(l,k),{code:"object.xor",context:v})}},n.keysToLabels=function(l,d){return Array.isArray(d)?d.map(m=>l.$_mapLabels(m)):l.$_mapLabels(d)},n.isPresent=function(l){return typeof l.isPresent=="function"?l.isPresent:d=>d!==void 0},n.rename=function(l,d,m,p,_){const k={};for(const h of l.$_terms.renames){const v=[],b=typeof h.from!="string";if(b)for(const C in d){if(d[C]===void 0&&h.options.ignoreUndefined||C===h.to)continue;const O=h.from.exec(C);O&&v.push({from:C,to:h.to,match:O})}else!Object.prototype.hasOwnProperty.call(d,h.from)||d[h.from]===void 0&&h.options.ignoreUndefined||v.push(h);for(const C of v){const O=C.from;let $=C.to;if($ instanceof c&&($=$.render(d,m,p,C.match)),O!==$){if(!h.options.multiple&&k[$]&&(_.push(l.$_createError("object.rename.multiple",d,{from:O,to:$,pattern:b},m,p)),p.abortEarly)||Object.prototype.hasOwnProperty.call(d,$)&&!h.options.override&&!k[$]&&(_.push(l.$_createError("object.rename.override",d,{from:O,to:$,pattern:b},m,p)),p.abortEarly))return!1;d[O]===void 0?delete d[$]:d[$]=d[O],k[$]=!0,h.options.alias||delete d[O]}}}return!0},n.unknown=function(l,d,m,p,_,k){if(l.$_terms.patterns){let h=!1;const v=l.$_terms.patterns.map(C=>{if(C.matches)return h=!0,[]}),b=[d,..._.ancestors];for(const C of m){const O=d[C],$=[..._.path,C];for(let L=0;L<l.$_terms.patterns.length;++L){const B=l.$_terms.patterns[L];if(B.regex){const Z=B.regex.test(C);if(_.mainstay.tracer.debug(_,"rule",`pattern.${L}`,Z?"pass":"error"),!Z)continue}else if(!B.schema.$_match(C,_.nest(B.schema,`pattern.${L}`),k))continue;m.delete(C);const W=_.localize($,b,{schema:B.rule,key:C}),G=B.rule.$_validate(O,W,k);if(G.errors){if(k.abortEarly)return{value:d,errors:G.errors};p.push(...G.errors)}if(B.matches&&v[L].push(C),d[C]=G.value,!B.fallthrough)break}}if(h)for(let C=0;C<v.length;++C){const O=v[C];if(!O)continue;const $=l.$_terms.patterns[C].matches,L=_.localize(_.path,b,$),B=$.$_validate(O,L,k);if(B.errors){const W=r.details(B.errors,{override:!1});W.matches=O;const G=l.$_createError("object.pattern.match",d,W,_,k);if(k.abortEarly)return{value:d,errors:G};p.push(G)}}}if(m.size&&(l.$_terms.keys||l.$_terms.patterns)){if(k.stripUnknown&&l._flags.unknown===void 0||k.skipFunctions){const h=!(!k.stripUnknown||k.stripUnknown!==!0&&!k.stripUnknown.objects);for(const v of m)h?(delete d[v],m.delete(v)):typeof d[v]=="function"&&m.delete(v)}if(!a.default(l._flags.unknown,k.allowUnknown))for(const h of m){const v=_.localize([..._.path,h],[]),b=l.$_createError("object.unknown",d[h],{child:h},v,k,{flags:!1});if(k.abortEarly)return{value:d,errors:b};p.push(b)}}},n.Dependency=class{constructor(l,d,m,p,_){this.rel=l,this.key=d,this.peers=m,this.paths=p,this.options=_}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}},n.Keys=class extends Array{concat(l){const d=this.slice(),m=new Map;for(let p=0;p<d.length;++p)m.set(d[p].key,p);for(const p of l){const _=p.key,k=m.get(_);k!==void 0?d[k]={key:_,schema:d[k].schema.concat(p.schema)}:d.push(p)}return d}}},8785:(j,y,x)=>{const o=x(375),g=x(8068),f=x(8160),u=x(3292),t=x(6354),a={};j.exports=g.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(i,r)=>i.ref(r),validate(i,{schema:r,state:s,prefs:c}){o(r.$_terms.link,"Uninitialized link schema");const n=a.generate(r,i,s,c),l=r.$_terms.link[0].ref;return n.$_validate(i,s.nest(n,`link:${l.display}:${n.type}`),c)},generate:(i,r,s,c)=>a.generate(i,r,s,c),rules:{ref:{method(i){o(!this.$_terms.link,"Cannot reinitialize schema"),i=u.ref(i),o(i.type==="value"||i.type==="local","Invalid reference type:",i.type),o(i.type==="local"||i.ancestor==="root"||i.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:i}],r}},relative:{method(i=!0){return this.$_setFlag("relative",i)}}},overrides:{concat(i){o(this.$_terms.link,"Uninitialized link schema"),o(f.isSchema(i),"Invalid schema object"),o(i.type!=="link","Cannot merge type link with another link");const r=this.clone();return r.$_terms.whens||(r.$_terms.whens=[]),r.$_terms.whens.push({concat:i}),r.$_mutateRebuild()}},manifest:{build:(i,r)=>(o(r.link,"Invalid link description missing link"),i.ref(r.link))}}),a.generate=function(i,r,s,c){let n=s.mainstay.links.get(i);if(n)return n._generate(r,s,c).schema;const l=i.$_terms.link[0].ref,{perspective:d,path:m}=a.perspective(l,s);a.assert(d,"which is outside of schema boundaries",l,i,s,c);try{n=m.length?d.$_reach(m):d}catch{a.assert(!1,"to non-existing schema",l,i,s,c)}return a.assert(n.type!=="link","which is another link",l,i,s,c),i._flags.relative||s.mainstay.links.set(i,n),n._generate(r,s,c).schema},a.perspective=function(i,r){if(i.type==="local"){for(const{schema:s,key:c}of r.schemas){if((s._flags.id||c)===i.path[0])return{perspective:s,path:i.path.slice(1)};if(s.$_terms.shared){for(const n of s.$_terms.shared)if(n._flags.id===i.path[0])return{perspective:n,path:i.path.slice(1)}}}return{perspective:null,path:null}}return i.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:i.path}:{perspective:r.schemas[i.ancestor]&&r.schemas[i.ancestor].schema,path:i.path}},a.assert=function(i,r,s,c,n,l){i||o(!1,`"${t.label(c._flags,n,l)}" contains link reference "${s.display}" ${r}`)}},3832:(j,y,x)=>{const o=x(375),g=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(),i=a.indexOf("."),r=a.indexOf("e");return(i<0?0:(r<0?a.length:r)-i-1)+(r<0?0:Math.max(0,-parseInt(a.slice(r+1))))}};j.exports=g.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:a,error:i}){if(!t.match(u.numberRx))return;t=t.trim();const r={value:parseFloat(t)};if(r.value===0&&(r.value=0),!a._flags.unsafe)if(t.match(/e/i)){if(u.extractSignificantDigits(t)!==u.extractSignificantDigits(String(r.value)))return r.errors=i("number.unsafe"),r}else{const s=r.value.toString();if(s.match(/e/i))return r;if(s!==u.normalizeDecimal(t))return r.errors=i("number.unsafe"),r}return r}},validate(t,{schema:a,error:i,prefs:r}){if(t===1/0||t===-1/0)return{value:t,errors:i("number.infinity")};if(!f.isNumber(t))return{value:t,errors:i("number.base")};const s={value:t};if(r.convert){const c=a.$_getRule("precision");if(c){const n=Math.pow(10,c.args.limit);s.value=Math.round(s.value*n)/n}}return s.value===0&&(s.value=0),!a._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(s.errors=i("number.unsafe")),s},rules:{compare:{method:!1,validate:(t,a,{limit:i},{name:r,operator:s,args:c})=>f.compare(t,i,s)?t:a.error("number."+r,{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,i=Math.pow(10,a);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:a,pfactor:i}})},validate:(t,a,{base:i,baseDecimalPlace:r,pfactor:s},c)=>u.decimalPlaces(t)>r?a.error("number.multiple",{multiple:c.args.base,value:t}):Math.round(s*t)%Math.round(s*i)==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:i}){const r=t.toString().match(u.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=i?t:a.error("number.precision",{limit:i,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:i})=>i==="negative"&&t<0||i==="positive"&&t>0?t:a.error(`number.${i}`)},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:g=>g&&typeof g=="object",to:(g,f)=>new Map(Object.entries(g))}}})},7417:(j,y,x)=>{const o=x(375),g=x(5380),f=x(1745),u=x(9959),t=x(6064),a=x(9926),i=x(5752),r=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=r.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(n,{schema:l,state:d,prefs:m}){const p=l.$_getRule("normalize");p&&(n=n.normalize(p.args.form));const _=l.$_getRule("case");_&&(n=_.args.direction==="upper"?n.toLocaleUpperCase():n.toLocaleLowerCase());const k=l.$_getRule("trim");if(k&&k.args.enabled&&(n=n.trim()),l.$_terms.replacements)for(const v of l.$_terms.replacements)n=n.replace(v.pattern,v.replacement);const h=l.$_getRule("hex");if(h&&h.args.options.byteAligned&&n.length%2!=0&&(n=`0${n}`),l.$_getRule("isoDate")){const v=c.isoDate(n);v&&(n=v)}if(l._flags.truncate){const v=l.$_getRule("max");if(v){let b=v.args.limit;if(s.isResolvable(b)&&(b=b.resolve(n,d,m),!s.limit(b)))return{value:n,errors:l.$_createError("any.ref",b,{ref:v.args.limit,arg:"limit",reason:"must be a positive integer"},d,m)};n=n.slice(0,b)}}return{value:n}}},validate(n,{schema:l,error:d}){if(typeof n!="string")return{value:n,errors:d("string.base")};if(n===""){const m=l.$_getRule("min");return m&&m.args.limit===0?void 0:{value:n,errors:d("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(n,l)=>/^[a-zA-Z0-9]+$/.test(n)?n:l.error("string.alphanum")},base64:{method(n={}){return s.assertOptions(n,["paddingRequired","urlSafe"]),n={urlSafe:!1,paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),o(typeof n.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:n}})},validate:(n,l,{options:d})=>c.base64Regex[d.paddingRequired][d.urlSafe].test(n)?n:l.error("string.base64")},case:{method(n){return o(["lower","upper"].includes(n),"Invalid case:",n),this.$_addRule({name:"case",args:{direction:n}})},validate:(n,l,{direction:d})=>d==="lower"&&n===n.toLocaleLowerCase()||d==="upper"&&n===n.toLocaleUpperCase()?n:l.error(`string.${d}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(n,l){let d=n.length,m=0,p=1;for(;d--;){const _=n.charAt(d)*p;m+=_-9*(_>9),p^=3}return m>0&&m%10==0?n:l.error("string.creditCard")}},dataUri:{method(n={}){return s.assertOptions(n,["paddingRequired"]),n={paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:n}})},validate(n,l,{options:d}){const m=n.match(c.dataUriRegex);return m&&(!m[2]||m[2]!=="base64"||c.base64Regex[d.paddingRequired].false.test(m[3]))?n:l.error("string.dataUri")}},domain:{method(n){n&&s.assertOptions(n,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const l=c.addressOptions(n);return this.$_addRule({name:"domain",args:{options:n},address:l})},validate:(n,l,d,{address:m})=>g.isValid(n,m)?n:l.error("string.domain")},email:{method(n={}){s.assertOptions(n,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),o(n.multiple===void 0||typeof n.multiple=="boolean","multiple option must be an boolean");const l=c.addressOptions(n),d=new RegExp(`\\s*[${n.separator?t(n.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:n},regex:d,address:l})},validate(n,l,{options:d},{regex:m,address:p}){const _=d.multiple?n.split(m):[n],k=[];for(const h of _)f.isValid(h,p)||k.push(h);return k.length?l.error("string.email",{value:n,invalids:k}):n}},guid:{alias:"uuid",method(n={}){s.assertOptions(n,["version","separator"]);let l="";if(n.version){const p=[].concat(n.version);o(p.length>=1,"version must have at least 1 valid version specified");const _=new Set;for(let k=0;k<p.length;++k){const h=p[k];o(typeof h=="string","version at position "+k+" must be a string");const v=c.guidVersions[h.toLowerCase()];o(v,"version at position "+k+" must be one of "+Object.keys(c.guidVersions).join(", ")),o(!_.has(v),"version at position "+k+" must not be a duplicate"),l+=v,_.add(v)}}o(c.guidSeparators.has(n.separator),'separator must be one of true, false, "-", or ":"');const d=n.separator===void 0?"[:-]?":n.separator===!0?"[:-]":n.separator===!1?"[]?":`\\${n.separator}`,m=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:n},regex:m})},validate(n,l,d,{regex:m}){const p=m.exec(n);return p?c.guidBrackets[p[1]]!==p[p.length-1]?l.error("string.guid"):n:l.error("string.guid")}},hex:{method(n={}){return s.assertOptions(n,["byteAligned","prefix"]),n={byteAligned:!1,prefix:!1,...n},o(typeof n.byteAligned=="boolean","byteAligned must be boolean"),o(typeof n.prefix=="boolean"||n.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:n}})},validate:(n,l,{options:d})=>(d.prefix==="optional"?c.hexRegex.withOptionalPrefix:d.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(n)?d.byteAligned&&n.length%2!=0?l.error("string.hexAlign"):n:l.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(n,l)=>g.isValid(n,{minDomainSegments:1})||c.ipRegex.test(n)?n:l.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(n={}){s.assertOptions(n,["cidr","version"]);const{cidr:l,versions:d,regex:m}=u.regex(n),p=n.version?d:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:l,version:p}},regex:m})},validate:(n,l,{options:d},{regex:m})=>m.test(n)?n:d.version?l.error("string.ipVersion",{value:n,cidr:d.cidr,version:d.version}):l.error("string.ip",{value:n,cidr:d.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(n,{error:l})=>c.isoDate(n)?n:l("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(n,l)=>c.isoDurationRegex.test(n)?n:l.error("string.isoDuration")},length:{method(n,l){return c.length(this,"length",n,"=",l)},validate(n,l,{limit:d,encoding:m},{name:p,operator:_,args:k}){const h=!m&&n.length;return s.compare(h,d,_)?n:l.error("string."+p,{limit:k.limit,value:n,encoding:m})},args:[{name:"limit",ref:!0,assert:s.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(n,l){return c.length(this,"max",n,"<=",l)},args:["limit","encoding"]},min:{method(n,l){return c.length(this,"min",n,">=",l)},args:["limit","encoding"]},normalize:{method(n="NFC"){return o(c.normalizationForms.includes(n),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:n}})},validate:(n,{error:l},{form:d})=>n===n.normalize(d)?n:l("string.normalize",{value:n,form:d}),convert:!0},pattern:{alias:"regex",method(n,l={}){o(n instanceof RegExp,"regex must be a RegExp"),o(!n.flags.includes("g")&&!n.flags.includes("y"),"regex should not use global or sticky mode"),typeof 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:n,options:l},errorCode:d})},validate:(n,l,{regex:d,options:m},{errorCode:p})=>d.test(n)^m.invert?n:l.error(p,{name:m.name,regex:d,value:n}),args:["regex","options"],multi:!0},replace:{method(n,l){typeof n=="string"&&(n=new RegExp(t(n),"g")),o(n 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:n,replacement:l}),d}},token:{method(){return this.$_addRule("token")},validate:(n,l)=>/^\w+$/.test(n)?n:l.error("string.token")},trim:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:n}})},validate:(n,l,{enabled:d})=>d&&n!==n.trim()?l.error("string.trim"):n,convert:!0},truncate:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",n)}},uppercase:{method(){return this.case("upper")}},uri:{method(n={}){s.assertOptions(n,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),n.domain&&s.assertOptions(n.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:l,scheme:d}=i.regex(n),m=n.domain?c.addressOptions(n.domain):null;return this.$_addRule({name:"uri",args:{options:n},regex:l,domain:m,scheme:d})},validate(n,l,{options:d},{regex:m,domain:p,scheme:_}){if(["http:/","https:/"].includes(n))return l.error("string.uri");let k=m.exec(n);if(!k&&l.prefs.convert&&d.encodeUri){const h=encodeURI(n);k=m.exec(h),k&&(n=h)}if(k){const h=k[1]||k[2];return!p||d.allowRelative&&!h||g.isValid(h,p)?n:l.error("string.domain",{value:h})}return d.relativeOnly?l.error("string.uriRelativeOnly"):d.scheme?l.error("string.uriCustomScheme",{scheme:_,value:n}):l.error("string.uri")}}},manifest:{build(n,l){if(l.replacements)for(const{pattern:d,replacement:m}of l.replacements)n=n.replace(d,m);return n}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),c.addressOptions=function(n){if(!n)return c.tlds||n;if(o(n.minDomainSegments===void 0||Number.isSafeInteger(n.minDomainSegments)&&n.minDomainSegments>0,"minDomainSegments must be a positive integer"),o(n.maxDomainSegments===void 0||Number.isSafeInteger(n.maxDomainSegments)&&n.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),n.tlds===!1)return n;if(n.tlds===!0||n.tlds===void 0)return o(c.tlds,"Built-in TLD list disabled"),Object.assign({},n,c.tlds);o(typeof n.tlds=="object","tlds must be true, false, or an object");const l=n.tlds.deny;if(l)return Array.isArray(l)&&(n=Object.assign({},n,{tlds:{deny:new Set(l)}})),o(n.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),o(!n.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(n.tlds.deny,"tlds.deny"),n;const d=n.tlds.allow;return d?d===!0?(o(c.tlds,"Built-in TLD list disabled"),Object.assign({},n,c.tlds)):(Array.isArray(d)&&(n=Object.assign({},n,{tlds:{allow:new Set(d)}})),o(n.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(n.tlds.allow,"tlds.allow"),n):n},c.validateTlds=function(n,l){for(const d of n)o(g.isValid(d,{minDomainSegments:1,maxDomainSegments:1}),`${l} must contain valid top level domain names`)},c.isoDate=function(n){if(!s.isIsoDate(n))return null;/.*T.*[+-]\d\d$/.test(n)&&(n+="00");const l=new Date(n);return isNaN(l.getTime())?null:l.toISOString()},c.length=function(n,l,d,m,p){return o(!p||!1,"Invalid encoding:",p),n.$_addRule({name:l,method:"length",args:{limit:d,encoding:p},operator:m})}},8826:(j,y,x)=>{const o=x(375),g=x(8068),f={};f.Map=class extends Map{slice(){return new f.Map(this)}},j.exports=g.extend({type:"symbol",terms:{map:{init:new f.Map}},coerce:{method(u,{schema:t,error:a}){const i=t.$_terms.map.get(u);return i&&(u=i),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 i of u){o(i&&i[Symbol.iterator],"Entry must be an iterable");const[r,s]=i;o(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),o(typeof s=="symbol","Value must be a Symbol"),t.$_terms.map.set(r,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),g=x(8571),f=x(738),u=x(9621),t=x(8160),a=x(6354),i=x(493),r={result:Symbol("result")};y.entry=function(s,c,n){let l=t.defaults;n&&(o(n.warnings===void 0,"Cannot override warnings preference in synchronous validation"),o(n.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),l=t.preferences(t.defaults,n));const d=r.entry(s,c,l);o(!d.mainstay.externals.length,"Schema with external rules must use validateAsync()");const m={value:d.value};return d.error&&(m.error=d.error),d.mainstay.warnings.length&&(m.warning=a.details(d.mainstay.warnings)),d.mainstay.debug&&(m.debug=d.mainstay.debug),d.mainstay.artifacts&&(m.artifacts=d.mainstay.artifacts),m},y.entryAsync=async function(s,c,n){let l=t.defaults;n&&(l=t.preferences(t.defaults,n));const d=r.entry(s,c,l),m=d.mainstay;if(d.error)throw m.debug&&(d.error.debug=m.debug),d.error;if(m.externals.length){let _=d.value;const k=[];for(const h of m.externals){const v=h.state.path,b=h.schema.type==="link"?m.links.get(h.schema):null;let C,O,$=_;const L=v.length?[_]:[],B=v.length?u(s,v):s;if(v.length){C=v[v.length-1];let W=_;for(const G of v.slice(0,-1))W=W[G],L.unshift(W);O=L[0],$=O[C]}try{const W=(Z,D)=>(b||h.schema).$_createError(Z,$,D,h.state,l),G=await h.method($,{schema:h.schema,linked:b,state:h.state,prefs:n,original:B,error:W,errorsArray:r.errorsArray,warn:(Z,D)=>m.warnings.push((b||h.schema).$_createError(Z,$,D,h.state,l)),message:(Z,D)=>(b||h.schema).$_createError("external",$,D,h.state,l,{messages:Z})});if(G===void 0||G===$)continue;if(G instanceof a.Report){if(m.tracer.log(h.schema,h.state,"rule","external","error"),k.push(G),l.abortEarly)break;continue}if(Array.isArray(G)&&G[t.symbols.errors]){if(m.tracer.log(h.schema,h.state,"rule","external","error"),k.push(...G),l.abortEarly)break;continue}O?(m.tracer.value(h.state,"rule",$,G,"external"),O[C]=G):(m.tracer.value(h.state,"rule",_,G,"external"),_=G)}catch(W){throw l.errors.label&&(W.message+=` (${h.label})`),W}}if(d.value=_,k.length)throw d.error=a.process(k,s,l),m.debug&&(d.error.debug=m.debug),d.error}if(!l.warnings&&!l.debug&&!l.artifacts)return d.value;const p={value:d.value};return m.warnings.length&&(p.warning=a.details(m.warnings)),m.debug&&(p.debug=m.debug),m.artifacts&&(p.artifacts=m.artifacts),p},r.Mainstay=class{constructor(s,c,n){this.externals=[],this.warnings=[],this.tracer=s,this.debug=c,this.links=n,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const s=this._snapshots.pop();this.externals=s.externals,this.warnings=s.warnings}commit(){this._snapshots.pop()}},r.entry=function(s,c,n){const{tracer:l,cleanup:d}=r.tracer(c,n),m=n.debug?[]:null,p=c._ids._schemaChain?new Map:null,_=new r.Mainstay(l,m,p),k=c._ids._schemaChain?[{schema:c}]:null,h=new i([],[],{mainstay:_,schemas:k}),v=y.validate(s,c,h,n);d&&c.$_root.untrace();const b=a.process(v.errors,s,n);return{value:v.value,error:b,mainstay:_}},r.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:r.ignore}},y.validate=function(s,c,n,l,d={}){if(c.$_terms.whens&&(c=c._generate(s,n,l).schema),c._preferences&&(l=r.prefs(c,l)),c._cache&&l.cache){const b=c._cache.get(s);if(n.mainstay.tracer.debug(n,"validate","cached",!!b),b)return b}const m=(b,C,O)=>c.$_createError(b,s,C,O||n,l),p={original:s,prefs:l,schema:c,state:n,error:m,errorsArray:r.errorsArray,warn:(b,C,O)=>n.mainstay.warnings.push(m(b,C,O)),message:(b,C)=>c.$_createError("custom",s,C,n,l,{messages:b})};n.mainstay.tracer.entry(c,n);const _=c._definition;if(_.prepare&&s!==void 0&&l.convert){const b=_.prepare(s,p);if(b){if(n.mainstay.tracer.value(n,"prepare",s,b.value),b.errors)return r.finalize(b.value,[].concat(b.errors),p);s=b.value}}if(_.coerce&&s!==void 0&&l.convert&&(!_.coerce.from||_.coerce.from.includes(typeof s))){const b=_.coerce.method(s,p);if(b){if(n.mainstay.tracer.value(n,"coerced",s,b.value),b.errors)return r.finalize(b.value,[].concat(b.errors),p);s=b.value}}const k=c._flags.empty;k&&k.$_match(r.trim(s,c),n.nest(k),t.defaults)&&(n.mainstay.tracer.value(n,"empty",s,void 0),s=void 0);const h=d.presence||c._flags.presence||(c._flags._endedSwitch?null:l.presence);if(s===void 0){if(h==="forbidden")return r.finalize(s,null,p);if(h==="required")return r.finalize(s,[c.$_createError("any.required",s,null,n,l)],p);if(h==="optional"){if(c._flags.default!==t.symbols.deepDefault)return r.finalize(s,null,p);n.mainstay.tracer.value(n,"default",s,{}),s={}}}else if(h==="forbidden")return r.finalize(s,[c.$_createError("any.unknown",s,null,n,l)],p);const v=[];if(c._valids){const b=c._valids.get(s,n,l,c._flags.insensitive);if(b)return l.convert&&(n.mainstay.tracer.value(n,"valids",s,b.value),s=b.value),n.mainstay.tracer.filter(c,n,"valid",b),r.finalize(s,null,p);if(c._flags.only){const C=c.$_createError("any.only",s,{valids:c._valids.values({display:!0})},n,l);if(l.abortEarly)return r.finalize(s,[C],p);v.push(C)}}if(c._invalids){const b=c._invalids.get(s,n,l,c._flags.insensitive);if(b){n.mainstay.tracer.filter(c,n,"invalid",b);const C=c.$_createError("any.invalid",s,{invalids:c._invalids.values({display:!0})},n,l);if(l.abortEarly)return r.finalize(s,[C],p);v.push(C)}}if(_.validate){const b=_.validate(s,p);if(b&&(n.mainstay.tracer.value(n,"base",s,b.value),s=b.value,b.errors)){if(!Array.isArray(b.errors))return v.push(b.errors),r.finalize(s,v,p);if(b.errors.length)return v.push(...b.errors),r.finalize(s,v,p)}}return c._rules.length?r.rules(s,v,p):r.finalize(s,v,p)},r.rules=function(s,c,n){const{schema:l,state:d,prefs:m}=n;for(const p of l._rules){const _=l._definition.rules[p.method];if(_.convert&&m.convert){d.mainstay.tracer.log(l,d,"rule",p.name,"full");continue}let k,h=p.args;if(p._resolve.length){h=Object.assign({},h);for(const b of p._resolve){const C=_.argsByName.get(b),O=h[b].resolve(s,d,m),$=C.normalize?C.normalize(O):O,L=t.validateArg($,null,C);if(L){k=l.$_createError("any.ref",O,{arg:b,ref:h[b],reason:L},d,m);break}h[b]=$}}k=k||_.validate(s,n,h,p);const v=r.rule(k,p);if(v.errors){if(d.mainstay.tracer.log(l,d,"rule",p.name,"error"),p.warn){d.mainstay.warnings.push(...v.errors);continue}if(m.abortEarly)return r.finalize(s,v.errors,n);c.push(...v.errors)}else d.mainstay.tracer.log(l,d,"rule",p.name,"pass"),d.mainstay.tracer.value(d,"rule",s,v.value,p.name),s=v.value}return r.finalize(s,c,n)},r.rule=function(s,c){return s instanceof a.Report?(r.error(s,c),{errors:[s],value:null}):Array.isArray(s)&&s[t.symbols.errors]?(s.forEach(n=>r.error(n,c)),{errors:s,value:null}):{errors:null,value:s}},r.error=function(s,c){return c.message&&s._setTemplate(c.message),s},r.finalize=function(s,c,n){c=c||[];const{schema:l,state:d,prefs:m}=n;if(c.length){const _=r.default("failover",void 0,c,n);_!==void 0&&(d.mainstay.tracer.value(d,"failover",s,_),s=_,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 _ of c)o(_ instanceof Error||_ instanceof a.Report,"error() must return an Error object")}else c=[l._flags.error];if(s===void 0){const _=r.default("default",s,c,n);d.mainstay.tracer.value(d,"default",s,_),s=_}if(l._flags.cast&&s!==void 0){const _=l._definition.cast[l._flags.cast];if(_.from(s)){const k=_.to(s,n);d.mainstay.tracer.value(d,"cast",s,k,l._flags.cast),s=k}}if(l.$_terms.externals&&m.externals&&m._externals!==!1)for(const{method:_}of l.$_terms.externals)d.mainstay.externals.push({method:_,schema:l,state:d,label:a.label(l._flags,d,m)});const p={value:s,errors:c.length?c:null};return l._flags.result&&(p.value=l._flags.result==="strip"?void 0:n.original,d.mainstay.tracer.value(d,l._flags.result,s,p.value),d.shadow(s,l._flags.result)),l._cache&&m.cache!==!1&&!l._refs.length&&l._cache.set(n.original,p),s===void 0||p.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)),p},r.prefs=function(s,c){const n=c===t.defaults;return n&&s._preferences[t.symbols.prefs]?s._preferences[t.symbols.prefs]:(c=t.preferences(c,s._preferences),n&&(s._preferences[t.symbols.prefs]=c),c)},r.default=function(s,c,n,l){const{schema:d,state:m,prefs:p}=l,_=d._flags[s];if(p.noDefaults||_===void 0)return c;if(m.mainstay.tracer.log(d,m,"rule",s,"full"),!_)return _;if(typeof _=="function"){const k=_.length?[g(m.ancestors[0]),l]:[];try{return _(...k)}catch(h){return void n.push(d.$_createError(`any.${s}`,null,{error:h},m,p))}}return typeof _!="object"?_:_[t.symbols.literal]?_.literal:t.isResolvable(_)?_.resolve(c,m,p):g(_)},r.trim=function(s,c){if(typeof s!="string")return s;const n=c.$_getRule("trim");return n&&n.args.enabled?s.trim():s},r.ignore={active:!1,debug:f,entry:f,filter:f,log:f,resolve:f,value:f},r.errorsArray=function(){const s=[];return s[t.symbols.errors]=!0,s}},2036:(j,y,x)=>{const o=x(375),g=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,i){if(t=t||new u.Values,a){if(a._override)return a.clone();for(const r of[...a._values,...a._refs])t.add(r)}if(i)for(const r of[...i._values,...i._refs])t.remove(r);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,i,r){return!!this.get(t,a,i,r)}get(t,a,i,r){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&r){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(g(s,t))return{value:s}}if(a)for(const s of this._refs){const c=s.resolve(t,a,i,null,{in:!0});if(c===void 0)continue;const n=s.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const l of n)if(typeof l==typeof t){if(r&&t&&typeof t=="string"){if(l.toLowerCase()===t.toLowerCase())return{value:l,ref:s}}else if(g(l,t))return{value:l,ref:s}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const a=[];for(const i of[...this._values,...this._refs])i!==void 0&&a.push(i);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 i of t)typeof i=="string"&&a.set(i.toLowerCase(),i);return a}},978:(j,y,x)=>{const o=x(375),g=x(8571),f=x(1687),u=x(9621),t={};j.exports=function(a,i,r={}){if(o(a&&typeof a=="object","Invalid defaults value: must be an object"),o(!i||i===!0||typeof i=="object","Invalid source value: must be true, falsy or an object"),o(typeof r=="object","Invalid options: must be an object"),!i)return null;if(r.shallow)return t.applyToDefaultsWithShallow(a,i,r);const s=g(a);if(i===!0)return s;const c=r.nullOverride!==void 0&&r.nullOverride;return f(s,i,{nullOverride:c,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(a,i,r){const s=r.shallow;o(Array.isArray(s),"Invalid keys");const c=new Map,n=i===!0?null:new Set;for(let m of s){m=Array.isArray(m)?m:m.split(".");const p=u(a,m);p&&typeof p=="object"?c.set(p,n&&u(i,m)||p):n&&n.add(m)}const l=g(a,{},c);if(!n)return l;for(const m of n)t.reachCopy(l,i,m);const d=r.nullOverride!==void 0&&r.nullOverride;return f(l,i,{nullOverride:d,mergeArrays:!1})},t.reachCopy=function(a,i,r){for(const n of r){if(!(n in i))return;const l=i[n];if(typeof l!="object"||l===null)return;i=l}const s=i;let c=a;for(let n=0;n<r.length-1;++n){const l=r[n];typeof c[l]!="object"&&(c[l]={}),c=c[l]}c[r[r.length-1]]=s}},375:(j,y,x)=>{const o=x(7916);j.exports=function(g,...f){if(!g)throw f.length===1&&f[0]instanceof Error?f[0]:new o(f)}},8571:(j,y,x)=>{const o=x(9621),g=x(4277),f=x(7043),u={needsProtoHack:new Set([g.set,g.map,g.weakSet,g.weakMap])};j.exports=u.clone=function(t,a={},i=null){if(typeof t!="object"||t===null)return t;let r=u.clone,s=i;if(a.shallow){if(a.shallow!==!0)return u.cloneWithShallow(t,a);r=d=>d}else if(s){const d=s.get(t);if(d)return d}else s=new Map;const c=g.getInternalProto(t);if(c===g.buffer)return!1;if(c===g.date)return new Date(t.getTime());if(c===g.regex)return new RegExp(t);const n=u.base(t,c,a);if(n===t)return t;if(s&&s.set(t,n),c===g.set)for(const d of t)n.add(r(d,a,s));else if(c===g.map)for(const[d,m]of t)n.set(d,r(m,a,s));const l=f.keys(t,a);for(const d of l){if(d==="__proto__")continue;if(c===g.array&&d==="length"){n.length=t.length;continue}const m=Object.getOwnPropertyDescriptor(t,d);m?m.get||m.set?Object.defineProperty(n,d,m):m.enumerable?n[d]=r(t[d],a,s):Object.defineProperty(n,d,{enumerable:!1,writable:!0,configurable:!0,value:r(t[d],a,s)}):Object.defineProperty(n,d,{enumerable:!0,writable:!0,configurable:!0,value:r(t[d],a,s)})}return n},u.cloneWithShallow=function(t,a){const i=a.shallow;(a=Object.assign({},a)).shallow=!1;const r=new Map;for(const s of i){const c=o(t,s);typeof c!="object"&&typeof c!="function"||r.set(c,c)}return u.clone(t,a,r)},u.base=function(t,a,i){if(i.prototype===!1)return u.needsProtoHack.has(a)?new a.constructor:a===g.array?[]:{};const r=Object.getPrototypeOf(t);if(r&&r.isImmutable)return t;if(a===g.array){const s=[];return r!==a&&Object.setPrototypeOf(s,r),s}if(u.needsProtoHack.has(a)){const s=new r.constructor;return r!==a&&Object.setPrototypeOf(s,r),s}return Object.create(r)}},9474:(j,y,x)=>{const o=x(4277),g={mismatched:null};j.exports=function(f,u,t){return t=Object.assign({prototype:!0},t),!!g.isDeepEqual(f,u,t,[])},g.isDeepEqual=function(f,u,t,a){if(f===u)return f!==0||1/f==1/u;const i=typeof f;if(i!==typeof u||f===null||u===null)return!1;if(i==="function"){if(!t.deepFunction||f.toString()!==u.toString())return!1}else if(i!=="object")return f!=f&&u!=u;const r=g.getSharedType(f,u,!!t.prototype);switch(r){case o.buffer:return!1;case o.promise:return f===u;case o.regex:return f.toString()===u.toString();case g.mismatched:return!1}for(let s=a.length-1;s>=0;--s)if(a[s].isSame(f,u))return!0;a.push(new g.SeenEntry(f,u));try{return!!g.isDeepEqualObj(r,f,u,t,a)}finally{a.pop()}},g.getSharedType=function(f,u,t){if(t)return Object.getPrototypeOf(f)!==Object.getPrototypeOf(u)?g.mismatched:o.getInternalProto(f);const a=o.getInternalProto(f);return a!==o.getInternalProto(u)?g.mismatched:a},g.valueOf=function(f){const u=f.valueOf;if(u===void 0)return f;try{return u.call(f)}catch(t){return t}},g.hasOwnEnumerableProperty=function(f,u){return Object.prototype.propertyIsEnumerable.call(f,u)},g.isSetSimpleEqual=function(f,u){for(const t of Set.prototype.values.call(f))if(!Set.prototype.has.call(u,t))return!1;return!0},g.isDeepEqualObj=function(f,u,t,a,i){const{isDeepEqual:r,valueOf:s,hasOwnEnumerableProperty:c}=g,{keys:n,getOwnPropertySymbols:l}=Object;if(f===o.array){if(!a.part){if(u.length!==t.length)return!1;for(let k=0;k<u.length;++k)if(!r(u[k],t[k],a,i))return!1;return!0}for(const k of u)for(const h of t)if(r(k,h,a,i))return!0}else if(f===o.set){if(u.size!==t.size)return!1;if(!g.isSetSimpleEqual(u,t)){const k=new Set(Set.prototype.values.call(t));for(const h of Set.prototype.values.call(u)){if(k.delete(h))continue;let v=!1;for(const b of k)if(r(h,b,a,i)){k.delete(b),v=!0;break}if(!v)return!1}}}else if(f===o.map){if(u.size!==t.size)return!1;for(const[k,h]of Map.prototype.entries.call(u))if(h===void 0&&!Map.prototype.has.call(t,k)||!r(h,Map.prototype.get.call(t,k),a,i))return!1}else if(f===o.error&&(u.name!==t.name||u.message!==t.message))return!1;const d=s(u),m=s(t);if((u!==d||t!==m)&&!r(d,m,a,i))return!1;const p=n(u);if(!a.part&&p.length!==n(t).length&&!a.skip)return!1;let _=0;for(const k of p)if(a.skip&&a.skip.includes(k))t[k]===void 0&&++_;else if(!c(t,k)||!r(u[k],t[k],a,i))return!1;if(!a.part&&p.length-_!==n(t).length)return!1;if(a.symbols!==!1){const k=l(u),h=new Set(l(t));for(const v of k){if(!a.skip||!a.skip.includes(v)){if(c(u,v)){if(!c(t,v)||!r(u[v],t[v],a,i))return!1}else if(c(t,v))return!1}h.delete(v)}for(const v of h)if(c(t,v))return!1}return!0},g.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(g){super(g.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 g=0;g<x.length;++g){const f=x.charCodeAt(g);y.isSafe(f)?o+=x[g]: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),g=x(8571),f=x(7043),u={};j.exports=u.merge=function(t,a,i){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(i=Object.assign({nullOverride:!0,mergeArrays:!0},i),Array.isArray(a)){o(Array.isArray(t),"Cannot merge array onto an object"),i.mergeArrays||(t.length=0);for(let s=0;s<a.length;++s)t.push(g(a[s],{symbols:i.symbols}));return t}const r=f.keys(a,i);for(let s=0;s<r.length;++s){const c=r[s];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(a,c))continue;const n=a[c];if(n&&typeof n=="object"){if(t[c]===n)continue;!t[c]||typeof t[c]!="object"||Array.isArray(t[c])!==Array.isArray(n)||n instanceof Date||n instanceof RegExp?t[c]=g(n,{symbols:i.symbols}):u.merge(t[c],n,i)}else(n!=null||i.nullOverride)&&(t[c]=n)}return t}},9621:(j,y,x)=>{const o=x(375),g={};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 i=a?u:u.split(t.separator||".");let r=f;for(let s=0;s<i.length;++s){let c=i[s];const n=t.iterables&&g.iterables(r);if(Array.isArray(r)||n==="set"){const l=Number(c);Number.isInteger(l)&&(c=l<0?r.length+l:l)}if(!r||typeof r=="function"&&t.functions===!1||!n&&r[c]===void 0){o(!t.strict||s+1===i.length,"Missing segment",c,"in reach path ",u),o(typeof r=="object"||t.functions===!0||typeof r!="function","Invalid segment",c,"in reach path ",u),r=t.default;break}r=n?n==="set"?[...r][c]:r.get(c):r[c]}return r},g.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 g=Object.prototype.toString.call(o);return x.typeMap.get(g)||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),g={};y.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(f,u){const t=[].concat((u=u||{}).before||[]),a=[].concat(u.after||[]),i=u.group||"?",r=u.sort||0;o(!t.includes(i),`Item cannot come before itself: ${i}`),o(!t.includes("?"),"Item cannot come before unassociated items"),o(!a.includes(i),`Item cannot come after itself: ${i}`),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:r,before:t,after:a,group:i,node:s};this._items.push(c)}if(!u.manual){const s=this._sort();o(s,"item",i!=="?"?`added into group ${i}`:"","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(g.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 n=c.seq,l=c.group;t[l]=t[l]||[],t[l].push(n),f[n]=c.before;for(const d of c.after)u[d]=u[d]||[],u[d].push(n)}for(const c in f){const n=[];for(const l in f[c]){const d=f[c][l];t[d]=t[d]||[],n.push(...t[d])}f[c]=n}for(const c in u)if(t[c])for(const n of t[c])f[n].push(...u[c]);const a={};for(const c in f){const n=f[c];for(const l of n)a[l]=a[l]||[],a[l].push(c)}const i={},r=[];for(let c=0;c<this._items.length;++c){let n=c;if(a[c]){n=null;for(let l=0;l<this._items.length;++l){if(i[l]===!0)continue;a[l]||(a[l]=[]);const d=a[l].length;let m=0;for(let p=0;p<d;++p)i[a[l][p]]&&++m;if(m===d){n=l;break}}}n!==null&&(i[n]=!0,r.push(n))}if(r.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 r){const n=s[c];this.nodes.push(n.node),this._items.push(n)}return!0}},g.mergeSort=(f,u)=>f.sort===u.sort?0:f.sort<u.sort?-1:1},5380:(j,y,x)=>{const o=x(443),g=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 g.code("DOMAIN_NON_EMPTY_STRING");if(typeof u!="string")throw new Error("Invalid input: domain must be a string");if(u.length>256)return g.code("DOMAIN_TOO_LONG");if(f.nonAsciiRx.test(u)){if(t.allowUnicode===!1)return g.code("DOMAIN_INVALID_UNICODE_CHARS");u=u.normalize("NFC")}if(f.domainControlRx.test(u))return g.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,i=u.split(".");if(i.length<a)return g.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&i.length>t.maxDomainSegments)return g.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=t.tlds;if(r){const s=i[i.length-1].toLowerCase();if(r.deny&&r.deny.has(s)||r.allow&&!r.allow.has(s))return g.code("DOMAIN_FORBIDDEN_TLDS")}for(let s=0;s<i.length;++s){const c=i[s];if(!c.length)return g.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return g.code("DOMAIN_LONG_SEGMENT");if(s<i.length-1){if(!f.domainSegmentRx.test(c))return g.code("DOMAIN_INVALID_CHARS")}else if(!f.tldSegmentRx.test(c))return g.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),g=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 i=!u.nonAsciiRx.test(t);if(!i){if(a.allowUnicode===!1)return f.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const r=t.split("@");if(r.length!==2)return r.length>2?f.code("MULTIPLE_AT_CHAR"):f.code("MISSING_AT_CHAR");const[s,c]=r;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,i)||g.analyze(c,a)},u.local=function(t,a){const i=t.split(".");for(const r of i){if(!r.length)return f.code("EMPTY_LOCAL_SEGMENT");if(a){if(!u.atextRx.test(r))return f.code("INVALID_LOCAL_CHARS")}else for(const s of r){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),g=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 r=0;r<t.length;++r)o(typeof t[r]=="string","options.version must only contain strings"),t[r]=t[r].toLowerCase(),o(["ipv4","ipv6","ipvfuture"].includes(t[r]),"options.version contains unknown version "+t[r]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const a=`(?:${t.map(r=>{if(u==="forbidden")return g.ip[r];const s=`\\/${r==="ipv4"?g.ip.v4Cidr:g.ip.v6Cidr}`;return u==="required"?`${g.ip[r]}${s}`:`${g.ip[r]}(?:${s})?`}).join("|")})`,i=new RegExp(`^${a}$`);return{cidr:u,versions:t,regex:i,raw:a}}},5752:(j,y,x)=>{const o=x(375),g=x(6064),f={generate:function(){const u={},t="\\dA-Fa-f",a="["+t+"]",i="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",s="%"+t,c=i+s+r+":@",n="["+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}",m="(?:"+d+":"+d+"|"+u.ipv4address+")",p="(?:"+d+":){6}"+m,_="::(?:"+d+":){5}"+m,k="(?:"+d+")?::(?:"+d+":){4}"+m,h="(?:(?:"+d+":){0,1}"+d+")?::(?:"+d+":){3}"+m,v="(?:(?:"+d+":){0,2}"+d+")?::(?:"+d+":){2}"+m,b="(?:(?:"+d+":){0,3}"+d+")?::"+d+":"+m,C="(?:(?:"+d+":){0,4}"+d+")?::"+m,O="(?:(?:"+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="(?:"+p+"|"+_+"|"+k+"|"+h+"|"+v+"|"+b+"|"+C+"|"+O+"|"+$+")",u.ipvFuture="v"+a+"+\\.["+i+r+":]+",u.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",u.schemeRegex=new RegExp(u.scheme);const L="["+i+s+r+":]*",B="["+i+s+r+"]{1,255}",W="(?:\\[(?:"+u.ipv6address+"|"+u.ipvFuture+")\\]|"+u.ipv4address+"|"+B+")",G="(?:"+L+"@)?"+W+"(?::\\d*)?",Z="(?:"+L+"@)?("+W+")(?::\\d*)?",D=n+"*",N=n+"+",U="(?:\\/"+D+")*",te="\\/(?:"+N+U+")?",xe=N+U,Ce="["+i+s+r+"@]+"+U,ze="(?:\\/\\/\\/"+D+U+")";return u.hierPart="(?:(?:\\/\\/"+G+U+")|"+te+"|"+xe+"|"+ze+")",u.hierPartCapture="(?:(?:\\/\\/"+Z+U+")|"+te+"|"+xe+")",u.relativeRef="(?:(?:\\/\\/"+G+U+")|"+te+"|"+Ce+"|)",u.relativeRefCapture="(?:(?:\\/\\/"+Z+U+")|"+te+"|"+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+")?",i=u.domain?t.relativeRefCapture:t.relativeRef;if(u.relativeOnly)return f.wrap(i+a);let r="";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 n=[].concat(u.scheme);o(n.length>=1,"scheme must have at least 1 scheme specified");const l=[];for(let d=0;d<n.length;++d){const m=n[d];o(m instanceof RegExp||typeof m=="string","scheme at position "+d+" must be a RegExp or String"),m instanceof RegExp?l.push(m.source.toString()):(o(t.schemeRegex.test(m),"scheme at position "+d+" must be a valid scheme"),l.push(g(m)))}r=l.join("|")}const s="(?:"+(r?"(?:"+r+")":t.scheme)+":"+(u.domain?t.hierPartCapture:t.hierPart)+")",c=u.allowRelative?"(?:"+s+"|"+i+")":s;return f.wrap(c+a,r)},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,g={}){if(!g[x.settings]&&g.constants)for(const f in g.constants){const u=g.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=g[x.settings]?g:Object.assign({[x.settings]:!0,constants:{},functions:{}},g),this.single=null,this._parts=null,this._parse(o)}_parse(o){let g=[],f="",u=0,t=!1;const a=r=>{if(u)throw new Error("Formula missing closing parenthesis");const s=g.length?g[g.length-1]:null;if(t||f||r){if(s&&s.type==="reference"&&r===")")return s.type="function",s.value=this._subFormula(f,s.value),void(f="");if(r===")"){const c=new y.Parser(f,this.settings);g.push({type:"segment",value:c})}else if(t){if(t==="]")return g.push({type:"reference",value:f}),void(f="");g.push({type:"literal",value:f})}else if(x.operatorCharacters.includes(f))s&&s.type==="operator"&&x.operators.includes(s.value+f)?s.value+=f:g.push({type:"operator",value:f});else if(f.match(x.numberRx))g.push({type:"constant",value:parseFloat(f)});else if(this.settings.constants[f]!==void 0)g.push({type:"constant",value:this.settings.constants[f]});else{if(!f.match(x.tokenRx))throw new Error(`Formula contains invalid token: ${f}`);g.push({type:"reference",value:f})}f=""}};for(const r of o)t?r===t?(a(),t=!1):f+=r:u?r==="("?(f+=r,++u):r===")"?(--u,u?f+=r:a(r)):f+=r:r in x.literals?t=x.literals[r]:r==="("?(a(),++u):x.operatorCharacters.includes(r)?(a(),f=r,a()):r!==" "?f+=r:a();a(),g=g.map((r,s)=>r.type!=="operator"||r.value!=="-"||s&&g[s-1].type!=="operator"?r:{type:"operator",value:"n"});let i=!1;for(const r of g){if(r.type==="operator"){if(x.operatorsPrefix.includes(r.value))continue;if(!i)throw new Error("Formula contains an operator in invalid position");if(!x.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(i)throw new Error("Formula missing expected operator");i=!i}if(!i)throw new Error("Formula contains invalid trailing operator");g.length===1&&["reference","literal","constant"].includes(g[0].type)&&(this.single={type:g[0].type==="reference"?"reference":"value",value:g[0].value}),this._parts=g.map(r=>{if(r.type==="operator")return x.operatorsPrefix.includes(r.value)?r:r.value;if(r.type!=="reference")return r.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(r.value))throw new Error(`Formula contains invalid reference ${r.value}`);return this.settings.reference?this.settings.reference(r.value):x.reference(r.value)})}_subFormula(o,g){const f=this.settings.functions[g];if(typeof f!="function")throw new Error(`Formula contains unknown function ${g}`);let u=[];if(o){let t="",a=0,i=!1;const r=()=>{if(!t)throw new Error(`Formula contains function ${g} with invalid arguments ${o}`);u.push(t),t=""};for(let s=0;s<o.length;++s){const c=o[s];i?(t+=c,c===i&&(i=!1)):c in x.literals&&!a?(t+=c,i=x.literals[c]):c!==","||a?(t+=c,c==="("?++a:c===")"&&--a):r()}r()}return u=u.map(t=>new y.Parser(t,this.settings)),function(t){const a=[];for(const i of u)a.push(i.evaluate(t));return f.call(t,...a)}}evaluate(o){const g=this._parts.slice();for(let f=g.length-2;f>=0;--f){const u=g[f];if(u&&u.type==="operator"){const t=g[f+1];g.splice(f+1,1);const a=x.evaluate(t,o);g[f]=x.single(u.value,a)}}return x.operatorsOrder.forEach(f=>{for(let u=1;u<g.length-1;)if(f.includes(g[u])){const t=g[u],a=x.evaluate(g[u-1],o),i=x.evaluate(g[u+1],o);g.splice(u,2);const r=x.calculate(t,a,i);g[u-1]=r===0?0:r}else u+=2}),x.evaluate(g[0],o)}},y.Parser.prototype[x.symbol]=!0,x.reference=function(o){return function(g){return g&&g[o]!==void 0?g[o]:null}},x.evaluate=function(o,g){return o===null?null:typeof o=="function"?o(g):o[x.symbol]?o.evaluate(g):o},x.single=function(o,g){if(o==="!")return!g;const f=-g;return f===0?0:f},x.calculate=function(o,g,f){if(o==="??")return x.exists(g)?g:f;if(typeof g=="string"||typeof f=="string"){if(o==="+")return(g=x.exists(g)?g:"")+(x.exists(f)?f:"")}else switch(o){case"^":return Math.pow(g,f);case"*":return g*f;case"/":return g/f;case"%":return g%f;case"+":return g+f;case"-":return g-f}switch(o){case"<":return g<f;case"<=":return g<=f;case">":return g>f;case">=":return g>=f;case"==":return g===f;case"!=":return g!==f;case"&&":return g&&f;case"||":return g||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})}(dt)),dt.exports}var ni=si();const ii=ur(ni),I=ii.extend(ri).extend(ti),Xt=/^(0x)?([A-Fa-f0-9]{64})$/;I.object({genesisTime:I.date().iso().required().raw(),genesisTx:I.string().regex(Xt).required().allow(""),renaissanceTime:I.date().iso().required().raw(),renaissanceTx:I.string().regex(Xt).required().allow("")});const Lr=I.object({address:I.DID().prefix().role("ROLE_TOKEN").required(),value:I.BN().min(0).required()});I.object({name:I.string().min(1).max(256).required(),value:I.string().min(1).max(1024).required(),description:I.string().min(1).max(256).optional().allow(""),required:I.boolean().optional().default(!1)});const Dr=I.alternatives().try(I.DID().prefix().role("ROLE_ACCOUNT"),I.DID().prefix().role("ROLE_APPLICATION"),I.DID().prefix().role("ROLE_BLOCKLET"),I.DID().prefix().wallet("ethereum"),I.DID().prefix().wallet("passkey"));I.array().items(I.object({owner:Dr.required(),tokensList:I.array().items(Lr).default([]),assetsList:I.array().items(I.DID().prefix().role("ROLE_ASSET")).default([])}));I.array().items({signer:I.DID().prefix().required(),pk:I.any().required(),signature:I.any().required(),delegator:I.DID().prefix().valid("").optional(),data:I.any().optional()});I.object({type:I.string().min(1).max(32).required(),contractAddress:I.DID().prefix().wallet("ethereum").required(),chainType:I.string().min(1).max(32).required(),chainName:I.string().min(1).max(32).required(),chainId:I.number().positive().required()});const Pt=I.object({type:I.string().valid("svg","url","uri").required(),content:I.string().when("type",{is:"uri",then:I.string().max(20480).dataUri().required()}).when("type",{is:"url",then:I.string().max(2048).uri({scheme:["http","https"]}).required()})}),qr=I.object({id:I.string().max(2048).uri({scheme:["http","https"]}).required(),scope:I.string().valid("public","private").default("public")});I.object({id:I.DID().prefix().required(),pk:I.string().required(),name:I.string().min(1).max(256).required()});const ai={address:I.DID().prefix().role("ROLE_ASSET").required(),moniker:I.string().min(2).max(255).required(),data:I.any().required(),readonly:I.boolean().default(!1),transferrable:I.boolean().default(!1),ttl:I.number().min(0).default(0),parent:I.DID().prefix().optional().allow(""),issuer:I.DID().prefix().optional().allow(""),endpoint:qr.optional().allow(null).default(null),display:Pt.optional().allow(null).default(null),tags:I.array().items(I.string().min(1).max(64)).max(4).optional()},oi={address:I.DID().prefix().role("ROLE_FACTORY").required(),name:I.string().min(2).max(255).required(),description:I.string().min(2).max(255).required(),settlement:I.string().valid("instant","periodic").default("instant"),limit:I.number().integer().min(0).default(0),trustedIssuers:I.array().items(I.DID().prefix()).max(8).optional(),data:I.any().optional().allow(null).default(null),display:Pt.optional().allow(null).default(null),input:I.object({value:I.BN().positive().min("0").default("0"),tokens:I.array().items(Lr).max(8).optional(),assets:I.array().items(I.alternatives().try(I.DID().prefix().role("ROLE_ASSET"),I.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:I.array().items(I.object({name:I.string().min(1).max(255).required(),description:I.string().max(255).optional().allow(""),required:I.boolean().required()})).optional()}),output:I.object({moniker:I.string().min(2).max(255).required(),data:I.any().required(),readonly:I.boolean().default(!1),transferrable:I.boolean().default(!1),ttl:I.number().min(0).default(0),parent:I.string().max(255).required(),issuer:I.string().max(255).required(),endpoint:qr.optional(),display:Pt.optional(),tags:I.array().items(I.string().min(1).max(64)).max(4).optional()}),hooks:I.array().items(I.object({name:I.string().valid("mint","postMint","preMint").required(),type:I.string().valid("url","contract").required(),hook:I.string().min(1).max(4096).required(),compiled:I.array().items(I.object()).optional()})).optional()},li={tokenHolder:Dr,assetSchema:I.object(ai).options({stripUnknown:!0,noDefaults:!1}),factorySchema:I.object(oi).options({stripUnknown:!0,noDefaults:!1})};function Br({onCancel:S,onSuccess:w,blocklet:A}){const{vaults:R=[],appPid:j}=A,{t:y,locale:x}=ne(),{connectApi:o}=lr(),{api:g}=ee(),{teamDid:f}=rt(),[u,t]=Dt({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});q.useEffect(()=>{if(!Xe(u.address))return;const c=Ne(u.address),n=u.fetched.find(d=>d.address===c),l=u.errored.find(d=>d.address===c);!u.fetching&&!n&&!l&&(t({fetching:!0}),bn(V.MAIN_CHAIN_ENDPOINT).getAccountState({address:c}).then(m=>{m.state?t({fetching:!1,fetched:[...u.fetched.filter(p=>p.address!==c),m.state]}):t({fetching:!1,errored:[...u.errored.filter(p=>p.address!==c),{address:c}]})}).catch(m=>{console.error(m),t({fetching:!1,error:_t(m)})}))},[u.address,u.fetching]),q.useEffect(()=>{if(u.address){const c=Ne(u.address);if(!Xe(c)){t({error:y("blocklet.config.vault.error.invalid")});return}if(li.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(Is([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 g.configVault({input:{teamDid:f,vaultDid:Ne(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}),w()},onClose:()=>{t({loading:!1}),o.close()}})},onClose:()=>{t({loading:!1}),o.close()}})}catch(c){t({loading:!1,error:_t(c)})}},i=Ne(u.address),r=[];Xe(i)&&r.push({key:y("blocklet.config.vault.role"),value:e.jsx(Tt,{color:"primary",variant:"outlined",size:"small",label:wt(i).role||"-"})});const s=u.fetched.find(c=>c.address===i);return s&&r.push({key:y("blocklet.config.vault.firstSeen"),value:Nt(s.context?.genesisTime,"-")},{key:y("blocklet.config.vault.lastSeen"),value:Nt(s.context?.renaissanceTime,"-")},{key:y("blocklet.config.vault.migratedFrom"),value:s.migratedFrom.length?s.migratedFrom.map(c=>e.jsx(jt,{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(jt,{did:c,showQrcode:!0,compact:!0,size:14,locale:x},c)):"-"}),e.jsx(ke,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:S,title:e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Sr,{}),y("blocklet.config.vault.title")]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(Y,{onClick:S,children:y("common.cancel")}),e.jsx(Y,{onClick:a,variant:"contained",disabled:!!u.error||u.loading,children:y("common.confirm")})]}),children:e.jsxs(oe,{direction:"column",spacing:3,children:[e.jsxs(Q,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[y("blocklet.config.vault.desc")," ",y("blocklet.config.vault.tip")]}),R.length>0&&e.jsxs(P,{children:[e.jsxs(Q,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[y("blocklet.config.vault.current"),":"]}),e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(Ls,{did:R[R.length-1].did,showQrcode:!0,style:{width:"auto"}}),e.jsx(jn,{vaults:R,appPid:j})]})]}),e.jsx(F,{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(mr,{position:"end",children:e.jsx(Be,{size:16})}):null}}}),e.jsx(P,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:r.map(c=>e.jsx(br,{valueComponent:"div",nameWidth:120,name:c.key,children:c.value},c.key))})]})})}Br.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,blocklet:T.object.isRequired};function Bt({blocklet:S,onUpdate:w=()=>{},hasPermission:A=!1}){const{info:R,api:j,inService:y}=ee(),{t:x,locale:o}=q.useContext(he),[g,f]=Dt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[u,t]=q.useState(()=>S?.settings?.gateway?.wafPolicy?.enabled??!0),[a,i]=q.useState(()=>!!S?.settings?.enableSessionHardening),[r,s]=q.useState(()=>!!S?.settings?.invite?.enabled),[c,n]=q.useState(()=>{const D=S?.settings?.org||{};return{enabled:D.enabled||!1,maxMemberPerOrg:D.maxMemberPerOrg||100,maxOrgPerUser:D.maxOrgPerUser||10}}),l=g.loading||!A,{did:d}=S.meta,m=y?window.env?.gateway?.wafPolicy?.enabled:R?.routing.wafPolicy?.enabled;if(It(S.status))return null;const p=S.environments.find(D=>D.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),_=!p||p.value==="yes",h=S.environments.find(D=>D.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||X.BLOCKLET_TENANT_MODES.SINGLE,v=(D,N)=>async U=>{if(!g.loading){f({loading:!0});try{const{checked:te}=U.target,{blocklet:xe}=await j.configBlocklet({input:{did:S.meta.did,configs:[{key:X.BLOCKLET_CONFIGURABLE_KEY[D],value:N(te)}]}});w(xe)}catch(te){H.error(te.message)}finally{f({loading:!1})}}},b=v("BLOCKLET_DELETABLE",D=>D?"no":"yes"),C=v("BLOCKLET_APP_TENANT_MODE",D=>D?X.BLOCKLET_TENANT_MODES.MULTIPLE:X.BLOCKLET_TENANT_MODES.SINGLE),O=(D,N)=>async U=>{if(!g.loading){f({loading:!0});try{const te=U.target.checked;await j.updateBlockletSettings({input:D(te)}),N&&N(te)}catch(te){H.error(te.message)}finally{f({loading:!1})}}},$=O(D=>({did:S.meta.did,invite:{enabled:D}}),s),L=O(D=>({did:S.meta.did,org:{enabled:D,maxMemberPerOrg:100,maxOrgPerUser:10}}),D=>{n({...c,enabled:D})}),B=async(D,N)=>{if(!g.loading){f({loading:!0});try{await j.updateBlockletSettings({input:{did:S.meta.did,org:{...c,[D]:N}}}),n({...c,[D]:N})}catch(U){H.error(U.message)}finally{f({loading:!1})}}},W=O(D=>({did:S.meta.did,gateway:{wafPolicy:{enabled:D}}}),t),G=O(D=>({did:S.meta.did,enableSessionHardening:D}),D=>{i(D),Ds()}),Z=async()=>{if(!g.loading){f({loading:!0});try{const{blocklet:D}=await j.getBlocklet({input:{did:S.meta.did}});w(D)}catch(D){H.error(D.message)}finally{f({loading:!1})}}};return e.jsxs(oe,{p:3,sx:{border:"1px solid red",borderRadius:2,p:3},className:"advanced-config",children:[!y&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:x("blocklet.config.deletable.name"),desc:x(_?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(fe,{disabled:l,checked:!_,defaultChecked:!0,onChange:b})})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}})]}),e.jsx(Er,{inService:y,disabled:l,loading:g.loading,onChange:Z}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),y&&e.jsx(nn,{role:"owner",children:D=>(D||ei)&&e.jsxs(e.Fragment,{children:[e.jsx(M,{title:x("blocklet.config.vault.title"),desc:x("blocklet.config.vault.desc"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(Y,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>f({showConfigVault:!0}),children:[e.jsx(Sr,{style:{fontSize:"1.3em",marginRight:4}}),x("blocklet.config.vault.title")]})})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),g.showConfigVault&&e.jsx(Br,{blocklet:S,onCancel:()=>f({showConfigVault:!1}),onSuccess:()=>f({showConfigVault:!1})}),e.jsx(M,{title:x("team.transferApp.name"),desc:x("team.transferApp.description"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(Y,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>f({showTransferOwner:!0}),children:[e.jsx(Mn,{style:{fontSize:"1.3em",marginRight:4}}),x("team.transferApp.name")]})})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),g.showTransferOwner&&e.jsx(Ir,{onCancel:()=>f({showTransferOwner:!1}),onSuccess:()=>f({showTransferOwner:!1})})]})}),e.jsx(M,{title:x("blocklet.config.clearCache.name"),desc:x("blocklet.config.clearCache.purpose"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(gn,{teamDid:d})})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),e.jsx(M,{title:x("blocklet.config.rotateSessionKey.name"),desc:x("blocklet.config.rotateSessionKey.purpose"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(xn,{style:{whiteSpace:"nowrap"},teamDid:d})})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),e.jsx(M,{title:x("blocklet.config.tenantMode.name"),desc:x(`blocklet.config.tenantMode.${h}`),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(fe,{disabled:l,checked:h===X.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:C})})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),e.jsx(M,{title:x("team.invite.setting"),desc:x(`team.invite.${r?"enabled":"disabled"}`),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(fe,{disabled:l,checked:r,onChange:$})})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),e.jsx(M,{title:e.jsxs(oe,{direction:"row",sx:{alignItems:"center",gap:1},children:[x("setting.form.enableSessionHardening.switchLabel"),e.jsx(le,{title:x("setting.form.enableSessionHardening.switchTips"),children:e.jsx(Ft,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(fe,{disabled:l,checked:a,onChange:G})})}),m&&e.jsxs(e.Fragment,{children:[e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),e.jsx(M,{title:e.jsxs(oe,{direction:"row",sx:{alignItems:"center",gap:1},children:[x("router.gateway.wafPolicy.title"),e.jsx(le,{title:e.jsx(P,{sx:{fontSize:"14px",lineHeight:1.5},children:e.jsx(P,{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(Ft,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:x("router.gateway.wafPolicy.switchLabel"),children:e.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(fe,{disabled:l,checked:u,onChange:W})})})]}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),e.jsx(M,{title:e.jsx(oe,{direction:"row",sx:{alignItems:"center",gap:1},children:x("common.orgs")}),desc:x("team.orgs.explain"),children:e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2,width:"100%",alignSelf:{xs:"flex-start",md:"flex-end"}},children:[e.jsx(fe,{disabled:l,checked:c.enabled,onChange:L}),c.enabled&&e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:400,mt:1},children:[e.jsx(Ct,{style:{marginTop:0},disabled:l,loading:g.loading,type:"number",min:2,initialValue:c.maxOrgPerUser,label:x("team.orgs.invite.maxOrgs"),placeholder:x("team.orgs.invite.maxOrgs"),onSubmit:D=>B("maxOrgPerUser",D)}),e.jsx(Ct,{style:{marginTop:0},disabled:l,loading:g.loading,type:"number",min:2,initialValue:c.maxMemberPerOrg,label:x("team.orgs.invite.maxMembers"),placeholder:x("team.orgs.invite.maxMembers"),onSubmit:D=>B("maxMemberPerOrg",D)})]})]})})]})}const ci=Me(Bt,"mutate_blocklets"),di=Me(Bt,"",Et);function ui(S){const{inService:w}=ee();return w?e.jsx(di,{...S}):e.jsx(ci,{...S})}Bt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};function Mt({blocklet:S,onUpdate:w=()=>{},hasPermission:A=!1,...R}){const{t:j}=q.useContext(he);return It(S.status)?null:e.jsxs(pi,{...R,children:[e.jsx(Jn,{blocklet:S,onUpdate:w,hasPermission:A}),e.jsx(P,{sx:{mt:6},children:e.jsx(Q,{variant:"h6",sx:{fontWeight:600},children:j("blocklet.config.dangerZone")})}),e.jsx(P,{className:"config-form",component:re,sx:{my:3}}),e.jsx(P,{sx:{maxWidth:1536},children:e.jsx(ui,{blocklet:S,onUpdate:w,hasPermission:A})})]})}const mi=Me(Mt,"mutate_blocklets"),hi=Me(Mt,"",Et);function fi(S){const{inService:w}=ee();return w?e.jsx(hi,{...S}):e.jsx(mi,{...S})}Mt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};const pi=be(P)`
|
|
51
|
-
.config-form {
|
|
52
|
-
flex-grow: 1;
|
|
53
|
-
overflow-y: auto;
|
|
54
|
-
${S=>S.theme.breakpoints.down("md")} {
|
|
55
|
-
width: 100%;
|
|
56
|
-
flex-shrink: 0;
|
|
57
|
-
padding: 0 24px;
|
|
58
|
-
transform: translate(0, 0);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.config-item {
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
justify-content: space-between;
|
|
66
|
-
margin: 16px 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.config-label {
|
|
70
|
-
font-weight: bold;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.config-desc {
|
|
74
|
-
font-weight: normal;
|
|
75
|
-
font-size: 12px;
|
|
76
|
-
color: #666;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.form-item {
|
|
80
|
-
margin-top: 0;
|
|
81
|
-
}
|
|
82
|
-
`;var Ge={exports:{}},Ye={exports:{}},Je={exports:{}},Qt;function gi(){return Qt||(Qt=1,function(S,w){Object.defineProperty(w,"__esModule",{value:!0}),w.default=A;function A(R){return R==null}S.exports=w.default,S.exports.default=w.default}(Je,Je.exports)),Je.exports}var er;function xi(){return er||(er=1,function(S,w){Object.defineProperty(w,"__esModule",{value:!0}),w.default=o;var A=j(qs()),R=j(gi());function j(g){return g&&g.__esModule?g:{default:g}}var y=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,x=/^[-+]?[0-9]+$/;function o(g,f){(0,A.default)(g),f=f||{};var u=f.allow_leading_zeroes===!1?y:x,t=!f.hasOwnProperty("min")||(0,R.default)(f.min)||g>=f.min,a=!f.hasOwnProperty("max")||(0,R.default)(f.max)||g<=f.max,i=!f.hasOwnProperty("lt")||(0,R.default)(f.lt)||g<f.lt,r=!f.hasOwnProperty("gt")||(0,R.default)(f.gt)||g>f.gt;return u.test(g)&&t&&a&&i&&r}S.exports=w.default,S.exports.default=w.default}(Ye,Ye.exports)),Ye.exports}var tr;function yi(){return tr||(tr=1,function(S,w){Object.defineProperty(w,"__esModule",{value:!0}),w.default=j;var A=R(xi());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})}S.exports=w.default,S.exports.default=w.default}(Ge,Ge.exports)),Ge.exports}var vi=yi();const bi=ur(vi),ut={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function ji(){const{api:S}=ee(),{blocklet:w}=ae(),{t:A}=ne(),{confirmApi:R,confirmHolder:j}=Ie(),[y,x]=q.useState(!1),o=w?.meta?.did,g=Object.assign({...ut},w?.settings?.notification?.email||{}),{handleSubmit:f,control:u,formState:t,watch:a,reset:i}=pe({defaultValues:_e(g,Object.keys(ut))}),r=ge({testReceiver:"",testReceiverError:""}),s=a("enabled"),c=E(async(C,O,$=!0)=>{try{x(!0);const{blocklet:L}=await S.configNotification({input:{did:o,notification:JSON.stringify({email:C})}}),B=Object.assign({...ut},L?.settings?.notification?.email||{});i(B),$&&H.success(A("common.saveSuccess"))}catch(L){if($)H.error(L.message||A("common.saveFailed"));else throw L}finally{x(!1)}}),n=E(async(C,O,$)=>{try{x(!0),t.isDirty&&await c(C,O,!1),await S.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"}})}}),H.success(A("notification.email.testSuccess"))}catch(L){H.error(L.message||A("notification.email.testfailed"))}finally{x(!1)}}),l=E((C,O)=>{r.testReceiver=localStorage.getItem("test-receiver")||"",r.testReceiverError="",R.open({title:A("notification.email.testSendEmail"),content:()=>e.jsx(P,{sx:{width:"300px"},children:e.jsx(F,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.email.inputTestReceiver"),value:r.testReceiver,onChange:$=>{r.testReceiver=$.target.value},error:!!r.testReceiverError,helperText:r.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm($){const L=r.testReceiver?.trim();if(!L){r.testReceiverError=A("notification.email.receiverRequired");return}if(!lt(L)){r.testReceiverError=A("notification.email.receiverInvalid");return}r.testReceiverError="",await n(C,O,L),$()},onCancel:()=>{x(!1)}})}),d=E(C=>{const O=C?.trim();return O?lt(O)?!0:A("notification.email.fromInvalid"):A("notification.email.fromRequired")}),m=E(C=>{const O=C?.trim();return O?kt(O,{require_host:!1,protocols:[]})?!0:A("notification.email.hostInvalid"):A("notification.email.hostRequired")}),p=E(C=>C?bi(C)?!0:A("notification.email.portInvalid"):A("notification.email.portRequired")),_=E(C=>C?.trim()?!0:A("notification.email.userRequired")),k=E(C=>C?.trim()?!0:A("notification.email.passwordRequired")),h=E(C=>C?.trim()&&!kt(C,{protocols:["http","https"],require_protocol:!0})?A("notification.email.linkInvalid"):!0),v=E(C=>C?.trim()&&!lt(C)?A("notification.email.emailInvalid"):!0),b=E(()=>!0);return e.jsxs(P,{children:[e.jsxs(_i,{component:"form",onSubmit:f(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(M,{title:A("notification.email.enable"),my:2.5,children:e.jsx(z,{name:"enabled",control:u,render:({field:C})=>e.jsx(ie,{control:e.jsx(fe,{checked:C.value,...C})})})}),e.jsx(M,{title:A("notification.email.from"),children:e.jsx(z,{name:"from",control:u,rules:{validate:s?d:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...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(M,{title:A("notification.email.host"),children:e.jsx(z,{name:"host",control:u,rules:{validate:s?m:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...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(M,{title:A("notification.email.port"),children:e.jsx(z,{name:"port",control:u,rules:{validate:s?p:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...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(M,{title:A("notification.email.user"),children:e.jsx(z,{name:"user",control:u,rules:{validate:s?_:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...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(M,{title:A("notification.email.password"),children:e.jsx(z,{name:"password",control:u,rules:{validate:s?k:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...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(M,{title:A("notification.email.secure"),children:e.jsx(z,{name:"secure",control:u,rules:{validate:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(ie,{control:e.jsx(fe,{checked:C.value,...C,disabled:!s})})})})}),e.jsxs(cn,{children:[e.jsxs(dn,{expandIcon:e.jsx(un,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[A("notification.email.signature"),e.jsx(le,{title:A("notification.email.signatureTooltip"),children:e.jsx(Tn,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(mn,{children:[e.jsx(M,{title:A("notification.email.companyName"),children:e.jsx(z,{name:"companyName",control:u,rules:{validate:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...C,size:"small",error:!!t.errors[C.name],label:A("notification.email.companyName"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(M,{title:A("notification.email.companyLink"),children:e.jsx(z,{name:"companyLink",control:u,rules:{validate:s?h:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...C,size:"small",error:!!t.errors[C.name],label:A("notification.email.companyLink"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(M,{title:A("notification.email.companyAddress"),children:e.jsx(z,{name:"companyAddress",control:u,rules:{validate:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...C,size:"small",error:!!t.errors[C.name],label:A("notification.email.companyAddress"),helperText:t.errors[C.name]?.message||" ",disabled:!s})})})}),e.jsx(M,{title:A("notification.email.supportEmail"),children:e.jsx(z,{name:"supportEmail",control:u,rules:{validate:s?v:b},render:({field:C})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...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(P,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(Y,{variant:"outlined",loading:y,color:"warning",onClick:f(l),disabled:!s||y,children:A("common.runTest")}),e.jsx(Y,{type:"submit",variant:"contained",loading:y,disabled:!t.isDirty||y,children:A("common.save")})]})]}),j]})}const _i=be(oe)``,mt={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function wi(){const{api:S}=ee(),{blocklet:w}=ae(),{t:A}=ne(),{confirmApi:R,confirmHolder:j}=Ie(),[y,x]=q.useState(!1),o=w?.meta?.did,g=Object.assign({...mt},w?.settings?.notification?.pushKit||{}),{handleSubmit:f,control:u,formState:t,watch:a,reset:i}=pe({defaultValues:_e(g,Object.keys(mt))}),r=ge({testReceiver:"",testReceiverError:""}),s=a("enabled"),c=E(async(p,_,k=!0)=>{try{x(!0);const{blocklet:h}=await S.configNotification({input:{did:o,notification:JSON.stringify({pushKit:p})}}),v=Object.assign({...mt},h?.settings?.notification?.pushKit||{});i(v),k&&H.success(A("common.saveSuccess"))}catch(h){if(k)H.error(h.message||A("common.saveFailed"));else throw h}finally{x(!1)}}),n=E(async(p,_)=>{try{x(!0),t.isDirty&&await c(p,_,!1);const k=(w?.configs||[]).find(b=>b.key==="BLOCKLET_APP_URL")?.value,h=Bs(Se(k,V.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:w?.meta?.version,t:new Date(w?.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:w?.appDid,fullName:w?.meta?.title,avatar:h}}}};await S.sendPush({input:{did:o,receiver:r.testReceiver,notification:JSON.stringify(v)}}),H.success(A("notification.pushKit.testSuccess"))}catch(k){H.error(k.message||A("notification.pushKit.testfailed"))}finally{x(!1)}}),l=E((p,_)=>{r.testReceiverError="",R.open({title:A("notification.pushKit.testSend"),content:()=>e.jsx(P,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(F,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:A("notification.pushKit.inputTestReceiver"),value:r.testReceiver,onChange:k=>{r.testReceiver=k.target.value},error:!!r.testReceiverError,helperText:r.testReceiverError||" "})}),confirmButtonText:A("common.confirm"),cancelButtonText:A("common.cancel"),async onConfirm(k){if(!r.testReceiver?.trim()){r.testReceiverError=A("notification.pushKit.receiverRequired");return}r.testReceiverError="",await n(p,_),k()},onCancel:()=>{x(!1)}})}),d=E(p=>{const _=p?.trim();return _?kt(_)?!0:A("notification.pushKit.endpointInvalid"):A("notification.pushKit.endpointRequired")}),m=E(()=>!0);return e.jsxs(P,{children:[e.jsxs(ki,{component:"form",onSubmit:f(c),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(M,{title:A("notification.pushKit.enable"),my:2.5,children:e.jsx(z,{name:"enabled",control:u,render:({field:p})=>e.jsx(ie,{control:e.jsx(fe,{checked:p.value,...p})})})}),e.jsx(M,{title:A("notification.pushKit.endpoint"),children:e.jsx(z,{name:"endpoint",control:u,rules:{validate:s?d:m},render:({field:p})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...p,size:"small",required:!0,label:A("notification.pushKit.endpoint"),error:!!t.errors[p.name],helperText:t.errors[p.name]?.message||" ",disabled:!s})})})}),e.jsxs(M,{title:A("notification.pushKit.customOptions"),children:[e.jsx(z,{name:"did",control:u,render:({field:p})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...p,size:"small",label:A("notification.pushKit.did"),error:!!t.errors[p.name],helperText:t.errors[p.name]?.message||" ",disabled:!s})})}),e.jsx(z,{name:"pushPath",control:u,render:({field:p})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...p,size:"small",label:A("notification.pushKit.pushPath"),error:!!t.errors[p.name],helperText:t.errors[p.name]?.message||" ",disabled:!s})})})]}),e.jsxs(P,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(Y,{variant:"outlined",loading:y,color:"warning",onClick:f(l),disabled:!s||y,children:A("common.runTest")}),e.jsx(Y,{type:"submit",variant:"contained",loading:y,disabled:!t.isDirty||y,children:A("common.save")})]})]}),j]})}const ki=be(oe)``,rr=[{label:e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"},{label:e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:"Wallet"}),value:"wallet"},{label:e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:"Webhooks"}),value:"webhooks"}];function Si(){const[S,w]=q.useState(rr[0].value),{t:A}=q.useContext(he),R=we(()=>({email:e.jsx(ji,{}),pushKit:e.jsx(wi,{}),wallet:e.jsx(Q,{variant:"body1",children:A("notification.wallet.description")}),webhooks:e.jsx(Q,{variant:"body1",children:A("notification.webhooks.description")})}),[A]),j=q.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(P,{children:[e.jsx(Ue,{variant:"card",tabs:rr,current:S,onChange:w}),e.jsx(P,{style:j,children:R[S]})]})}const ht={domain:"",clientId:"",clientSecret:""};function Mr({ref:S=null,onSuccess:w=J,sortMaps:A={}}){const{api:R}=ee(),{blocklet:j}=ae(),{t:y,locale:x}=ne(),o=j?.meta?.did,g=Object.assign({...ht},j?.settings?.authentication?.auth0||{}),f=(j.environments||[]).find(m=>m.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:i}=pe({defaultValues:_e(g,Object.keys(ht))}),r=E(async m=>{try{const{blocklet:p}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,auth0:{...m,order:A.auth0?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),_=Object.assign({...ht},p?.settings?.authentication?.auth0||{});i(_),H.success(y("common.saveSuccess")),w()}catch(p){H.error(p.message||y("common.saveFailed"))}}),s=E(m=>m?.trim()?!0:y("authentication.auth0.domainDescription")),c=E(m=>m?.trim()?!0:y("authentication.auth0.clientIdDescription")),n=E(m=>m?.trim()?!0:y("authentication.auth0.clientSecretDescription")),l=we(()=>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,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/auth0");return q.useImperativeHandle(S,()=>({submit:u(r)}),[u,r]),e.jsx(P,{children:e.jsxs("form",{onSubmit:u(r),disabled:!0,children:[e.jsx(M,{title:y("authentication.viewDocument"),children:e.jsxs(P,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[l,e.jsx(P,{component:se,icon:Lt,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(M,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[d,e.jsx(Ve,{locale:x,content:d,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:y("authentication.auth0.domain"),children:e.jsx(z,{name:"domain",control:t,rules:{validate:s},render:({field:m})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...m,size:"small",label:y("authentication.auth0.domain"),error:!!a.errors[m.name],helperText:a.errors[m.name]?.message||" "})})})}),e.jsx(M,{title:y("authentication.auth0.clientId"),children:e.jsx(z,{name:"clientId",control:t,rules:{validate:c},render:({field:m})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...m,size:"small",label:y("authentication.auth0.clientId"),error:!!a.errors[m.name],helperText:a.errors[m.name]?.message||" "})})})}),e.jsx(M,{title:y("authentication.auth0.clientSecret"),children:e.jsx(z,{name:"clientSecret",control:t,rules:{validate:n},render:({field:m})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...m,size:"small",type:"password",label:y("authentication.auth0.clientSecret"),error:!!a.errors[m.name],helperText:a.errors[m.name]?.message||" "})})})})]})})}Mr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const ft={clientId:"",clientSecret:""};function zr({ref:S=null,onSuccess:w=J,sortMaps:A={}}){const{api:R}=ee(),{blocklet:j}=ae(),{t:y,locale:x}=ne(),o=j?.meta?.did,g=Object.assign({...ft},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:i}=pe({defaultValues:_e(g,Object.keys(ft))}),r=E(async d=>{try{const{blocklet:m}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,github:{...d,order:A.github?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),p=Object.assign({...ft},m?.settings?.authentication?.github||{});i(p),H.success(y("common.saveSuccess")),w()}catch(m){H.error(m.message||y("common.saveFailed"))}}),s=E(d=>d?.trim()?!0:y("authentication.github.clientIdDescription")),c=E(d=>d?.trim()?!0:y("authentication.github.clientSecretDescription")),n=we(()=>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,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/github");return q.useImperativeHandle(S,()=>({submit:u(r)}),[u,r]),e.jsx(P,{children:e.jsxs("form",{disabled:!0,children:[e.jsx(M,{title:y("authentication.viewDocument"),children:e.jsxs(P,{component:"a",href:n,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[n,e.jsx(P,{component:se,icon:Lt,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(M,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ve,{locale:x,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:y("authentication.github.clientId"),children:e.jsx(z,{name:"clientId",control:t,rules:{validate:s},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...d,size:"small",label:y("authentication.github.clientId"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})}),e.jsx(M,{title:y("authentication.github.clientSecret"),children:e.jsx(z,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...d,size:"small",type:"password",label:y("authentication.github.clientSecret"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})})]})})}zr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const pt={showQrcode:!0};function Hr({ref:S=null,onSuccess:w=J,sortMaps:A={}}){const{api:R}=ee(),{blocklet:j}=ae(),{t:y}=ne(),x=j?.meta?.did,o=Object.assign({...pt},j?.settings?.authentication?.wallet||{}),{handleSubmit:g,control:f,reset:u}=pe({defaultValues:_e(o,Object.keys(pt))}),t=E(async a=>{try{const{blocklet:i}=await R.configAuthentication({input:{did:x,authentication:JSON.stringify({...A,wallet:{...a,order:A.wallet?.order??Object.keys(A).length,enabled:!0,type:"builtin"}})}}),r=Object.assign({...pt},i?.settings?.authentication?.wallet||{});u(r),H.success(y("common.saveSuccess")),w()}catch(i){H.error(i.message||y("common.saveFailed"))}});return q.useImperativeHandle(S,()=>({submit:g(t)}),[g,t]),e.jsx(P,{children:e.jsx("form",{children:e.jsx(M,{title:y("authentication.wallet.showQrcode"),children:e.jsx(z,{name:"showQrcode",control:f,render:({field:a})=>e.jsx(ie,{control:e.jsx(_n,{sx:{ml:1},checked:a.value,...a})})})})})})}Hr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};function Nr({ref:S=null,onSuccess:w=J,sortMaps:A={}}){const{api:R}=ee(),{blocklet:j}=ae(),{t:y}=ne(),x=j?.meta?.did,o=E(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"}})}}),H.success(y("common.saveSuccess")),w()}catch(g){H.error(g.message||y("common.saveFailed"))}});return q.useImperativeHandle(S,()=>({submit:o}),[o]),e.jsxs(P,{children:[y("authentication.emailLoginDescription"),e.jsx("br",{}),y("authentication.emailNotificationRequired"),e.jsx("br",{}),e.jsx(P,{component:Ms,to:Se(V.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/notification/settings"),sx:{mt:1,display:"inline-block"},children:e.jsx(ce,{size:"small",variant:"outlined",children:y("authentication.gotoEmailNotification")})})]})}Nr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};function Fr({ref:S=null,onSuccess:w=J,sortMaps:A={}}){const{api:R}=ee(),{blocklet:j}=ae(),{t:y}=ne(),x=j?.meta?.did,o=E(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"}})}}),H.success(y("common.saveSuccess")),w()}catch(g){H.error(g.message||y("common.saveFailed"))}});return q.useImperativeHandle(S,()=>({submit:o}),[o]),null}Fr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const gt={clientId:"",clientSecret:""};function Zr({ref:S=null,onSuccess:w=J,sortMaps:A={}}){const{api:R}=ee(),{blocklet:j}=ae(),{t:y,locale:x}=ne(),o=j?.meta?.did,g=Object.assign({...gt},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:i}=pe({defaultValues:_e(g,Object.keys(gt))}),r=E(async d=>{try{const{blocklet:m}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,google:{...d,order:A.google?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),p=Object.assign({...gt},m?.settings?.authentication?.google||{});i(p),H.success(y("common.saveSuccess")),w()}catch(m){H.error(m.message||y("common.saveFailed"))}}),s=E(d=>d?.trim()?!0:y("authentication.google.clientIdDescription")),c=E(d=>d?.trim()?!0:y("authentication.google.clientSecretDescription")),n=we(()=>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,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/google");return q.useImperativeHandle(S,()=>({submit:u(r)}),[u,r]),e.jsx(P,{children:e.jsxs("form",{onSubmit:u(r),disabled:!0,children:[e.jsx(M,{title:y("authentication.viewDocument"),children:e.jsxs(P,{component:"a",href:n,target:"_blank",rel:"noopener noreferrer",sx:{verticalAlign:"middle",color:"inherit",fontSize:"14px","&:hover":{textDecoration:"underline"}},children:[n,e.jsx(P,{component:se,icon:Lt,sx:{marginLeft:"6px",verticalAlign:"middle",lineHeight:1,scale:1.1}})]})}),e.jsx(M,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[l,e.jsx(Ve,{locale:x,content:l,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:y("authentication.google.clientId"),children:e.jsx(z,{name:"clientId",control:t,rules:{validate:s},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...d,size:"small",label:y("authentication.google.clientId"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})}),e.jsx(M,{title:y("authentication.google.clientSecret"),children:e.jsx(z,{name:"clientSecret",control:t,rules:{validate:c},render:({field:d})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...d,size:"small",type:"password",label:y("authentication.google.clientSecret"),error:!!a.errors[d.name],helperText:a.errors[d.name]?.message||" "})})})})]})})}Zr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const xt={teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function Wr({ref:S=null,onSuccess:w=J,sortMaps:A={}}){const{api:R}=ee(),{blocklet:j}=ae(),{t:y,locale:x}=ne(),o=j?.meta?.did,g=Object.assign({...xt},j?.settings?.authentication?.apple||{}),f=(j.environments||[]).find(p=>p.key==="BLOCKLET_APP_URL")?.value||window.location.origin,{handleSubmit:u,control:t,formState:a,reset:i}=pe({defaultValues:_e(g,Object.keys(xt))}),r=E(async p=>{try{const{blocklet:_}=await R.configAuthentication({input:{did:o,authentication:JSON.stringify({...A,apple:{...p,order:A.apple?.order??Object.keys(A).length,enabled:!0,type:"oauth"}})}}),k=Object.assign({...xt},_?.settings?.authentication?.apple||{});i(k),H.success(y("common.saveSuccess")),w()}catch(_){H.error(_.message||y("common.saveFailed"))}}),s=E(p=>p?.trim()?!0:y("authentication.apple.teamIdDescription")),c=E(p=>p?.trim()?!0:y("authentication.apple.serviceIdDescription")),n=E(p=>p?.trim()?!0:y("authentication.apple.keyIdDescription")),l=E(p=>p?.trim()?!0:y("authentication.apple.authKeyDescription")),d=E(p=>p?.trim()?!0:y("authentication.apple.bundleIdDescription")),m=Se(f,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/apple");return q.useImperativeHandle(S,()=>({submit:u(r)}),[u,r]),e.jsx(P,{children:e.jsxs("form",{children:[e.jsx(M,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[m,e.jsx(Ve,{locale:x,content:m,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:y("authentication.apple.teamId"),children:e.jsx(z,{name:"teamId",control:t,rules:{validate:s},render:({field:p})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...p,size:"small",label:y("authentication.apple.teamId"),error:!!a.errors[p.name],helperText:a.errors[p.name]?.message||" "})})})}),e.jsx(M,{title:y("authentication.apple.bundleId"),children:e.jsx(z,{name:"bundleId",control:t,rules:{validate:d},render:({field:p})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...p,size:"small",label:y("authentication.apple.bundleId"),error:!!a.errors[p.name],helperText:a.errors[p.name]?.message||" "})})})}),e.jsx(M,{title:y("authentication.apple.serviceId"),children:e.jsx(z,{name:"serviceId",control:t,rules:{validate:c},render:({field:p})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...p,size:"small",label:y("authentication.apple.serviceId"),error:!!a.errors[p.name],helperText:a.errors[p.name]?.message||" "})})})}),e.jsx(M,{title:y("authentication.apple.keyId"),children:e.jsx(z,{name:"keyId",control:t,rules:{validate:n},render:({field:p})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...p,size:"small",label:y("authentication.apple.keyId"),error:!!a.errors[p.name],helperText:a.errors[p.name]?.message||" "})})})}),e.jsx(M,{title:y("authentication.apple.authKey"),children:e.jsx(z,{name:"authKey",control:t,rules:{validate:l},render:({field:p})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...p,size:"small",type:"password",label:y("authentication.apple.authKey"),multiline:!0,rows:4,error:!!a.errors[p.name],helperText:a.errors[p.name]?.message||" ",slotProps:{input:{sx:{WebkitTextSecurity:"disc",fontFamily:"text-security-disc, monospace"}}}})})})})]})})}Wr.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const yt={clientId:"",clientSecret:""};function Ur({ref:S=null,onSuccess:w=J,sortMaps:A={}}){const{api:R}=ee(),{blocklet:j}=ae(),{t:y,locale:x}=ne(),o=j?.meta?.did,g=Object.assign({...yt},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:i}=pe({defaultValues:_e(g,Object.keys(yt))}),r=E(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"}})}}),m=Object.assign({...yt},d?.settings?.authentication?.twitter||{});i(m),H.success(y("common.saveSuccess")),w()}catch(d){H.error(d.message||y("common.saveFailed"))}}),s=E(l=>l?.trim()?!0:y("authentication.twitter.clientIdDescription")),c=E(l=>l?.trim()?!0:y("authentication.twitter.clientSecretDescription")),n=Se(f,V.WELLKNOWN_SERVICE_PATH_PREFIX,"oauth/callback/twitter");return q.useImperativeHandle(S,()=>({submit:u(r)}),[u,r]),e.jsx(P,{children:e.jsxs("form",{onSubmit:u(r),disabled:!0,children:[e.jsx(M,{title:y("authentication.oauthCallbackUrl"),children:e.jsxs(P,{sx:{mb:1,verticalAlign:"middle",fontSize:"14px",wordBreak:"break-all"},children:[n,e.jsx(Ve,{locale:x,content:n,style:{marginLeft:"6px",verticalAlign:"middle",scale:.8,lineHeight:1}})]})}),e.jsx(M,{title:y("authentication.twitter.clientId"),children:e.jsx(z,{name:"clientId",control:t,rules:{validate:s},render:({field:l})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...l,size:"small",label:y("authentication.twitter.clientId"),error:!!a.errors[l.name],helperText:a.errors[l.name]?.message||" "})})})}),e.jsx(M,{title:y("authentication.twitter.clientSecret"),children:e.jsx(z,{name:"clientSecret",control:t,rules:{validate:c},render:({field:l})=>e.jsx(K,{fullWidth:!0,children:e.jsx(F,{...l,size:"small",type:"password",label:y("authentication.twitter.clientSecret"),error:!!a.errors[l.name],helperText:a.errors[l.name]?.message||" "})})})})]})})}Ur.propTypes={ref:T.any,onSuccess:T.func,sortMaps:T.object};const Ci={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"/>'},nt={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"/>'},it={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 Vr({id:S,title:w,index:A,onBegin:R=J,onMove:j,onEnd:y,onEditItem:x=J,onDeleteItem:o=J,disableDelete:g=!1,icon:f=null}){const u=q.useRef(null),t=q.useRef(null),[{handlerId:a},i]=wn({accept:"dragItem",collect(n){return{handlerId:n.getHandlerId()}},hover(n,l){if(!u.current)return;const d=n.index,m=A;if(d===m)return;const p=u.current?.getBoundingClientRect(),_=t.current?.getBoundingClientRect(),k=(_.bottom-_.top)/2,v=l.getClientOffset().y-p.top;d<m&&v<k||d>m&&v>k||(j(d,m),n.index=m)}}),[{isDragging:r},s]=kn({item:{index:A,type:"dragItem"},collect:n=>({isDragging:n.isDragging()}),begin:R,end:y});s(t),i(u);const c=r?.3:1;return e.jsx(P,{ref:u,children:e.jsxs(P,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:t,"data-handler-id":a,children:[e.jsxs(P,{sx:{py:2,px:1,opacity:c,display:"flex",alignItems:"center",gap:.5},draggable:!1,children:[e.jsx(P,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(se,{fontSize:20,icon:Ci})}),e.jsx(P,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:f}),e.jsx(Q,{sx:{flex:1},children:w}),e.jsx(de,{size:"small",color:"primary",onClick:()=>{x(S)},children:e.jsx(se,{icon:it})}),e.jsx(de,{size:"small",color:"error",onClick:()=>{o(S)},disabled:g,children:e.jsx(se,{icon:nt})})]}),e.jsx(re,{})]})})}Vr.propTypes={title:T.string.isRequired,id:T.string.isRequired,index:T.number.isRequired,onBegin:T.func,onMove:T.func.isRequired,onEnd:T.func.isRequired,onEditItem:T.func,onDeleteItem:T.func,disableDelete:T.bool,icon:T.any};function Kr({ref:S=null,providers:w=[],sortMaps:A={}}){const R=q.useRef(null),{t:j}=q.useContext(he),y=$e(),{control:x,watch:o,setValue:g,reset:f}=pe({mode:"onChange",defaultValues:{provider:""}}),u=o("provider"),t=w.find(m=>m.name===u),a=zs(t),i=y?.transitions?.duration?.leavingScreen||300,r=ge({initMode:"add",mode:"add",show:!1,callback:J,get dialogTitle(){return this.mode==="edit"?j("authentication.updateLoginProvider",{provider:a.current?.title}):j("authentication.addLoginProvider")}}),s=E(()=>{f(),r.mode="add",r.initMode="add"}),c=E(()=>{r.show=!1,setTimeout(()=>{s()},i)}),n=E((m,p=null)=>{if(r.show=!0,p)r.initMode="edit",r.mode="edit",g("provider",p.provider);else{const _=w.find(k=>k.enabled===!1)?.name||w[0]?.name||ue.WALLET;g("provider",_)}m?r.callback=m:r.callback=J});q.useImperativeHandle(S,()=>({open:n,close:c}),[n,c]);const l=E(()=>{R.current.submit()}),d=w.map(m=>({value:m.name,title:m.title,description:m.enabled?j("common.enabled"):""}));return q.useEffect(()=>{t?.enabled?r.mode="edit":r.mode="add"},[t?.enabled]),e.jsxs(ke,{open:r.show,title:r.dialogTitle,onClose:c,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Y,{color:"primary",autoFocus:!0,variant:"contained",onClick:l,disabled:!u,children:r.mode==="add"?j("common.confirm"):j("common.update")}),children:[r.initMode==="edit"?null:e.jsx(z,{name:"provider",control:x,render:({field:m})=>e.jsx(Qe,{required:!0,fullWidth:!0,margin:"dense",size:"small",label:j("authentication.chooseProvider"),placeholder:j("authentication.chooseProviderPlaceholder"),options:d,...Pe(m,"ref"),slotProps:{optionItem:{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"}}}})}),e.jsx(P,{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})})]})}Kr.propTypes={ref:T.any,providers:T.array,sortMaps:T.object};function Ri(){const{confirmApi:S,confirmHolder:w}=Ie(),A=q.useRef(),{t:R}=ne(),{api:j}=ee(),{blocklet:y}=ae(),x=y?.meta?.did,o=y?.settings?.authentication||{},g=[{name:ue.WALLET,title:je[ue.WALLET],icon:e.jsx(Ae,{provider:"wallet",sx:{width:20,height:20,scale:.9}}),component:Hr},{name:ue.EMAIL,title:je[ue.EMAIL],icon:e.jsx(Ae,{provider:"email",sx:{width:20,height:20,scale:.9}}),component:Nr},{name:ue.PASSKEY,title:je[ue.PASSKEY],icon:e.jsx(Ae,{provider:"passkey",sx:{width:20,height:20,scale:.9}}),component:Fr},{name:ue.GOOGLE,title:je[ue.GOOGLE],icon:e.jsx(Ae,{provider:"google",sx:{width:20,height:20}}),component:Zr},{name:ue.APPLE,title:je[ue.APPLE],icon:e.jsx(Ae,{provider:"apple",sx:{width:20,height:20}}),component:Wr},{name:ue.GITHUB,title:je[ue.GITHUB],icon:e.jsx(Ae,{provider:"github",sx:{width:20,height:20}}),component:zr},{name:ue.TWITTER,title:je[ue.TWITTER],icon:e.jsx(Ae,{provider:"twitter",sx:{width:20,height:20}}),component:Ur},{name:ue.AUTH0,title:je[ue.AUTH0],icon:e.jsx(Ae,{provider:"auth0",sx:{width:20,height:20}}),component:Mr,hidden:!0}].map(m=>({...m,enabled:o[m.name]?.enabled??!1,order:o[m.name]?.order??null})),f=g.filter(m=>m.enabled),u=f.sort((m,p)=>!qe(m?.order)&&!qe(p?.order)?m.order-p.order:qe(m?.order)?1:-1),t=u.reduce((m,p,_)=>Object.assign(m,{[p.name]:{order:_}}),{}),a=ge(u.reduce((m,p,_)=>Object.assign(m,{[p.name]:_}),{})),i=[...f].sort((m,p)=>a[m.name]-a[p.name]),r={};typeof window<"u"&&(r.context=window);const s=E((m,p)=>{const _=i[m],k=i[p];a[_.name]=p,a[k.name]=m}),c=E(async()=>{const m=Object.keys(a).reduce((p,_)=>(p[_]={order:a[_]},p),{});await j.configAuthentication({input:{did:x,authentication:JSON.stringify(m)}})}),n=()=>{A.current.open(()=>{A.current.close()})},l=E(m=>{A.current.open(J,{provider:m})}),d=E(m=>{S.open({title:R("authentication.deleteLoginProvider",{provider:je[m]}),content:R("authentication.deleteLoginProviderDescription",{provider:je[m]}),confirmButtonText:R("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:R("common.cancel"),async onConfirm(p){try{await j.configAuthentication({input:{did:x,authentication:JSON.stringify({[m]:{enabled:!1,order:null}})}}),delete a[m],H.success(R("common.deleteSuccess")),p()}catch(_){H.error(_.message||R("common.deleteFailed"))}}})});return e.jsxs(P,{children:[e.jsx(Y,{variant:"contained",onClick:n,sx:{mb:1},children:R("authentication.addLoginProvider")}),e.jsx(Sn,{backend:Cn,...r,children:i.map((m,p)=>e.jsx(Vr,{index:p,id:m.name,title:m.title,icon:m.icon,onMove:s,onEnd:c,onEditItem:l,onDeleteItem:d,disableDelete:u.length<=1,children:m.component},m.name))}),e.jsx(Kr,{ref:A,providers:g,sortMaps:t}),w]})}const Ee={ttl:V.SESSION_TTL,cacheTtl:V.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(S){return e.jsx(jr,{...S,sx:{transform:"scale(0.75)"}})}function vt(S,w=!1){const A=w?S.ttl*86400:S.ttl/86400;return{...S,ttl:A}}function Ai(){const{api:S}=ee(),{blocklet:w}=ae(),A=w?.meta?.did,R=hr({},Ee,w?.settings?.session||{});qe(R.ttl)&&(R.ttl=Ee.ttl),qe(R.cacheTtl)&&(R.cacheTtl=Ee.cacheTtl),R.phone||(R.phone=Ee.phone),R.email||(R.email=Ee.email),qe(R.enableBlacklist)&&(R.enableBlacklist=Ee.enableBlacklist);const{handleSubmit:j,control:y,formState:x,reset:o,watch:g}=pe({defaultValues:_e(vt(R),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:f}=ne(),u=g("email.enabled"),t=g("phone.enabled"),a=g("email.enableDomainBlackList"),i=g("email.enableDomainWhiteList"),{fields:r,append:s,remove:c}=Vt({control:y,name:"email.domainBlackList"}),{fields:n,append:l,remove:d}=Vt({control:y,name:"email.domainWhiteList"}),m=E(async p=>{try{const{blocklet:_}=await S.updateAppSessionConfig({input:{did:A,config:Pe(vt(p,!0),["phone"])}}),k=Object.assign({},Ee,_e(_?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));o(vt(k)),H.success(f("common.configSuccess"))}catch(_){H.error(_.message)}});return e.jsx(Pi,{onSubmit:j(m),children:e.jsxs(oe,{direction:"column",sx:{gap:6},children:[e.jsxs(P,{children:[e.jsxs(P,{children:[e.jsx(Q,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.profile")}),e.jsx(P,{component:re,sx:{my:3}})]}),e.jsxs(oe,{sx:{gap:2},children:[e.jsx(M,{title:f("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(M,{title:f("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(ye,{disabled:!0,checked:!0})})}),e.jsx(M,{title:f("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.enabled",control:y,render:({field:p})=>e.jsx(ye,{...p,checked:p.value})})})}),u&&e.jsxs(oe,{direction:"column",sx:{ml:2,gap:.5},children:[e.jsx(M,{title:f("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.requireVerified",control:y,render:({field:p})=>e.jsx(ie,{sx:{ml:0},control:e.jsx(ye,{...p,checked:p.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.requireUnique",control:y,render:({field:p})=>e.jsx(ie,{sx:{ml:0},control:e.jsx(ye,{...p,checked:p.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.trustOauthProviders",control:y,render:({field:p})=>e.jsx(ie,{sx:{ml:0},control:e.jsx(ye,{...p,checked:p.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.enableDomainBlackList",control:y,render:({field:p})=>e.jsx(ie,{sx:{ml:0},control:e.jsx(ye,{...p,checked:p.value})})})})}),a&&e.jsxs(P,{children:[r.map((p,_)=>e.jsxs(oe,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(z,{name:`email.domainBlackList.${_}`,control:y,render:k=>e.jsx(F,{...k.field,size:"small",fullWidth:!0})}),e.jsx(de,{onClick:()=>c(_),children:e.jsx(Kt,{})})]},p.id)),e.jsx(ce,{startIcon:e.jsx(Gt,{}),onClick:()=>s(""),children:f("blocklet.config.session.addDomain")})]}),e.jsx(M,{title:f("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"email.enableDomainWhiteList",control:y,render:({field:p})=>e.jsx(ie,{sx:{ml:0},control:e.jsx(ye,{...p,checked:p.value})})})})}),i&&e.jsxs(P,{children:[n.map((p,_)=>e.jsxs(oe,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(z,{name:`email.domainWhiteList.${_}`,control:y,render:k=>e.jsx(F,{...k.field,size:"small",fullWidth:!0})}),e.jsx(de,{onClick:()=>d(_),children:e.jsx(Kt,{})})]},p.id)),e.jsx(ce,{startIcon:e.jsx(Gt,{}),onClick:()=>l(""),children:f("blocklet.config.session.addDomain")})]})]}),e.jsxs(P,{sx:{display:"none"},children:[e.jsx(M,{title:f("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"phone.enabled",control:y,disabled:!0,render:({field:p})=>e.jsx(ie,{sx:{ml:0},control:e.jsx(ye,{...p,checked:p.value})})})})}),t&&e.jsxs(oe,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(M,{title:f("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"phone.requireVerified",control:y,render:({field:p})=>e.jsx(ie,{sx:{ml:0},control:e.jsx(ye,{...p,checked:p.value})})})})}),e.jsx(M,{title:f("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"phone.requireUnique",control:y,render:({field:p})=>e.jsx(ie,{sx:{ml:0},control:e.jsx(ye,{...p,checked:p.value})})})})})]})]})]})]}),e.jsxs(P,{children:[e.jsx(Q,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.period")}),e.jsx(P,{component:re,sx:{my:3}}),e.jsx(oe,{direction:"column",spacing:2,children:e.jsx(z,{name:"ttl",control:y,rules:{min:1,max:30},render:({field:p})=>e.jsx(K,{fullWidth:!0,sx:{mb:2},children:e.jsx(M,{title:f("blocklet.config.session.ttl",{day:p.value}),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{width:"100%",maxWidth:500,px:2},children:e.jsx(yn,{...p,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(P,{children:[e.jsx(Q,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.experimentalSettings")}),e.jsx(P,{component:re,sx:{my:3}}),e.jsx(oe,{direction:"column",spacing:2,children:e.jsx(M,{title:f("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"enableBlacklist",control:y,render:({field:p})=>e.jsx(ie,{sx:{ml:0},control:e.jsx(ye,{...p,checked:p.value})})})})})})]}),e.jsx(P,{children:e.jsx(ce,{type:"submit",variant:"contained",disabled:!x.isDirty,children:f("common.save")})})]})})}const Pi=be.form`
|
|
83
|
-
max-width: 1536px;
|
|
84
|
-
|
|
85
|
-
.advanced-config {
|
|
86
|
-
border: 0;
|
|
87
|
-
padding: 0;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.config-form {
|
|
91
|
-
flex-grow: 1;
|
|
92
|
-
overflow-y: auto;
|
|
93
|
-
will-change: transform;
|
|
94
|
-
|
|
95
|
-
&:first-child {
|
|
96
|
-
margin: 0;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
${S=>S.theme.breakpoints.down("md")} {
|
|
100
|
-
width: 100%;
|
|
101
|
-
flex-shrink: 0;
|
|
102
|
-
padding: 0 24px;
|
|
103
|
-
transform: translate(0, 0);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.config-item {
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
justify-content: space-between;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.config-desc {
|
|
114
|
-
font-weight: normal;
|
|
115
|
-
font-size: 12px;
|
|
116
|
-
color: #666;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.form-item {
|
|
120
|
-
margin-top: 0;
|
|
121
|
-
}
|
|
122
|
-
`,Oi={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 bt,sr;function $i(){if(sr)return bt;sr=1;const{DEFAULT_IP_DOMAIN_SUFFIX:S,SLOT_FOR_IP_DNS_SITE:w,DEFAULT_DID_DOMAIN:A}=Hs(),{encode:R}=Ns();return bt={getIpDnsDomainForBlocklet:x=>`${R(x.meta.did)}-${w}.${S}`,getDidDomainForBlocklet:({did:x,didDomain:o=A})=>`${R(x)}.${o}`},bt}var Ti=$i();function Gr({ref:S=null}){const{t:w}=q.useContext(he),{blocklet:A}=ae(),{api:R}=ee(),j=ge({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:J}),x=$e()?.transitions?.duration?.leavingScreen||300,o=E(()=>{j.mode="view",j.data={},j.callback=J}),g=E(()=>{j.show=!1,setTimeout(()=>{o()},x)}),f=E(s=>{j.mode="view",j.show=!0,j.data=s}),u=E((s,c=J)=>{j.mode="approve",j.show=!0,j.data=s,j.callback=c});q.useImperativeHandle(S,()=>({open:f,close:g,approve:u}),[f,g,u]);const t=we(()=>{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&&Fn(s,"appliedAt","status"),s.map(c=>{const n=w(`federated.info.${c}`);let l=j.data[c];if(c==="appName"&&j.data.isMaster&&(l=e.jsxs(P,{children:[e.jsx(fr,{component:Cr}),l]})),["appId","appPid","serverId"].includes(c)&&(l=e.jsx(St,{children:l})),["appUrl"].includes(c)&&(l=e.jsx(P,{component:"a",href:l,target:"_blank",children:l})),["appLogo"].includes(c)){const d=Se(`https://${Ti.getDidDomainForBlocklet({did:j.data.appPid})}`,V.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const m=new URL(d);m.searchParams.set("imageFilter","resize"),m.searchParams.set("w","80"),m.searchParams.set("h","80"),l=e.jsx("img",{src:m.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&&w(`federated.status.${l}`)),c==="migratedFrom"&&(l=(j.data.migratedFrom||[]).filter(p=>![j.data.appId,j.data.appPid].includes(p)).map(p=>e.jsx(St,{children:p}))),Fs(l)&&(l="-"),{name:n,value:l}})},[j.data]),a=j.mode==="approve",i=E(async()=>{try{j.loadingReject=!0,await R.auditFederatedLogin({input:{memberPid:j.data.appPid,did:A.appPid,status:"rejected"}}),g(),j?.callback(!1)}finally{j.loadingReject=!1}}),r=E(async()=>{try{j.loadingApprove=!0,await R.auditFederatedLogin({input:{memberPid:j.data.appPid,did:A.appPid,status:"approved"}}),g(),j?.callback(!0)}finally{j.loadingApprove=!1}});return e.jsx(ke,{open:j.show,title:w(a?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:g,actions:a?e.jsxs(e.Fragment,{children:[e.jsxs(ce,{color:"error",variant:"contained",onClick:i,disabled:j.loadingReject,children:[j.loadingReject?e.jsx(Be,{size:16,color:"grey"}):null,w("common.reject")]}),e.jsxs(ce,{variant:"contained",onClick:r,disabled:j.loadingApprove,children:[j.loadingApprove?e.jsx(Be,{size:16,color:"grey"}):null,w("common.approve")]})]}):e.jsx(ce,{variant:"outlined",onClick:g,children:w("common.close")}),children:t.map(s=>e.jsx(br,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:s.name,children:s.value},s.name))})}Gr.propTypes={ref:T.any};function zt({ref:S=null}){const A=$e()?.transitions?.duration?.leavingScreen||300,{t:R}=q.useContext(he),j=ge({show:!1,data:{link:""}}),y=E(()=>{j.data.link=""}),x=E(()=>{j.show=!1,setTimeout(()=>{y()},A)}),o=E(({link:f})=>{j.show=!0,j.data.link=f});q.useImperativeHandle(S,()=>({open:o,close:x}),[o,x]);const g=E(()=>{Zs(j.data.link),x()});return e.jsxs(ke,{open:j.show,title:R("federated.joinFederatedLogin"),onClose:x,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Y,{color:"primary",autoFocus:!0,variant:"contained",onClick:g,children:R("common.copyAndClose")}),children:[e.jsx(P,{sx:{mb:2},children:R("federated.inviteJoinFederatedLoginDescription")}),e.jsx(P,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(vr,{children:j.data.link})})]})}zt.propTypes={ref:T.any};function Yr({mode:S="member"}){const w=q.useRef(null),A=q.useRef(null),{t:R,locale:j}=q.useContext(he),{blocklet:y,actions:{refreshBlocklet:x}}=ae(),{confirmApi:o,confirmHolder:g}=Ie(),{api:f}=ee(),u=y.settings.federated?.sites||[],t=y.settings.federated?.config||{},a=t.isMaster!==!1,i=u.find(C=>C.appPid===y.appPid),r=ge({loadingSync:!1}),s=E(C=>{A.current?.open(C)}),c=E(C=>{A.current?.approve(C,x)}),n=E(C=>{o.open({title:R("federated.removeFederatedLogin"),content:R("federated.removeFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(O){await f.quitFederatedLogin({input:{did:y.appPid,targetDid:C.appPid}}),O()}})}),l=E(C=>{o.open({title:R("federated.disableFederatedLogin"),content:R("federated.disableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(O){await f.auditFederatedLogin({input:{memberPid:C.appPid,did:y.appPid,status:"revoked"}}),O()}})}),d=E(C=>{o.open({title:R("federated.enableFederatedLogin"),content:R("federated.enableFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),async onConfirm(O){await f.auditFederatedLogin({input:{memberPid:C.appPid,did:y.appPid,status:"approved"}}),O()}})}),m=we(()=>{const C=[{label:R("common.name"),name:"appName",options:{customBodyRenderLite:O=>{const $=u[O],L=$.isMaster!==!1;return e.jsx(P,{sx:{display:"inline-block"},children:e.jsxs(P,{component:"a",href:$.appUrl,target:"_blank",onClick:B=>{B.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[L&&e.jsx(fr,{component:Cr,style:{marginRight:"4px"}}),$.appName]})})}}},{label:R("common.did"),name:"appId",options:{customBodyRenderLite:O=>{const $=u[O];return e.jsx(St,{children:$.appId})}}},{label:R("common.status"),name:"status",options:{customBodyRenderLite:O=>{const $=u[O],L=$.isMaster!==!1;return e.jsx(P,{children:L?"-":R(`federated.status.${$.status}`)})}}}];return a&&C.push({label:R("common.actions"),name:"actions",options:{customBodyRenderLite:O=>{const $=u[O],L=$.isMaster!==!1;return e.jsx(P,{sx:{display:"flex",gap:1},children:L?e.jsxs(e.Fragment,{children:[$.status==="rejected"&&e.jsx(Y,{variant:"contained",color:"error",size:"small",onClick:B=>{B.stopPropagation()},children:R("federated.status.rejected")}),$.status==="revoked"&&e.jsx(Y,{variant:"contained",color:"secondary",size:"small",onClick:B=>{B.stopPropagation()},children:R("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(Y,{variant:"contained",color:"error",size:"small",onClick:B=>{B.stopPropagation(),n($)},children:R("federated.quitMember")},"quiteSite"),$.status==="pending"&&e.jsx(Y,{variant:"contained",color:"primary",size:"small",onClick:B=>{B.stopPropagation(),c($)},children:R("federated.status.pending")},"auditSite"),$.status==="approved"&&e.jsx(Y,{variant:"contained",color:"error",size:"small",onClick:B=>{B.stopPropagation(),l($)},style:{whiteSpace:"nowrap"},children:R("federated.revoke")},"revokeSite"),$.status==="revoked"&&e.jsx(Y,{variant:"contained",color:"warning",size:"small",onClick:B=>{B.stopPropagation(),d($)},style:{whiteSpace:"nowrap"},children:R("federated.approve")},"approveSite")]})})}}}),C},[t.appId,u,a,R]),p=we(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(C,{dataIndex:O}){const $=u[O];s($)}}),[]),_=E(()=>{const C=y.environments.find(O=>O.key===X.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);C?.value?w.current?.open({link:C.value}):H.error(R("federated.failedToGetFederatedLoginLink"))},[y.site?.domainAliases?.[0]?.href]),k=E(()=>{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()}})}),h=E(()=>{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=E(async()=>{try{r.loadingSync=!0,await Promise.all([await f.syncFederatedConfig({input:{did:y.appPid}}),Ws(500)]),H.success(R("common.succeeded"))}finally{r.loadingSync=!1}}),b=[];return i.status!=="pending"&&b.push(e.jsx(le,{title:R("federated.syncConfig"),children:e.jsx(de,{size:"small",onClick:v,disabled:r.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},r.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(se,{icon:Oi,style:{fontSize:24}})},"syncConfig")})),S==="master"?(b.push(e.jsx(Y,{size:"small",variant:"contained",onClick:_,sx:{ml:1},children:R("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),b.push(e.jsx(Y,{color:"error",size:"small",variant:"contained",onClick:h,sx:{ml:1},children:R("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):b.push(e.jsx(Y,{size:"small",variant:"contained",color:"error",onClick:k,sx:{ml:1},children:R("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(st,{className:"main-table",locale:j,data:u,columns:m,customButtons:b,title:e.jsx(P,{className:"table-toolbar-left",children:R("authentication.federated")}),options:p}),g,e.jsx(zt,{ref:w}),e.jsx(Gr,{ref:A})]})}Yr.propTypes={mode:T.oneOf(["member","master"])};function Jr({ref:S=null}){const{t:w}=q.useContext(he),{api:A}=ee(),{blocklet:R}=ae(),j=R?.appPid,x=$e()?.transitions?.duration?.leavingScreen||300,o=ge({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:J}),g=E(()=>{o.appUrl="",o.appUrlError="",o.callback=J}),f=E(()=>{o.show=!1,setTimeout(()=>{g()},x)}),u=E((i=J)=>{o.show=!0,o.callback=i});q.useImperativeHandle(S,()=>({open:u,close:f}),[u,f]);const t=E(i=>{if(!i)throw new Error(w("federated.federatedJoinAppUrlRequired"));if(!Us(i))throw new Error(w("federated.federatedJoinAppUrlInvalid"))}),a=E(async()=>{try{t(o.appUrl),o.loading=!0;const i=await A.joinFederatedLogin({input:{did:j,appUrl:o.appUrl}});o.show=!1,f(),o?.callback(i)}catch(i){o.appUrlError=i.message}finally{o.loading=!1}});return e.jsxs(ke,{open:o.show,title:w("federated.joinFederatedLogin"),onClose:f,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(Y,{color:"primary",autoFocus:!0,variant:"contained",onClick:a,disabled:o.loading,children:[o.loading?e.jsx(Be,{size:16,sx:{mr:1},color:"grey"}):null,w("common.confirm")]}),children:[e.jsx(P,{sx:{mb:1},children:w("federated.joinFederatedLoginDescription")}),e.jsx(F,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:w("federated.federatedJoinAppUrl"),label:w("federated.federatedJoinAppUrl"),value:o.appUrl,error:!!o.appUrlError,helperText:o.appUrlError||"eg: https://www.arcblock.io",onChange:i=>{o.appUrl=i.target.value}})]})}Jr.propTypes={ref:T.any};function Ei(){const{t:S}=q.useContext(he);return e.jsxs(oe,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(An,{fontSize:"large",color:"primary"}),e.jsxs(P,{children:[e.jsx(Q,{variant:"h6",gutterBottom:!0,children:S("federated.title")}),e.jsx(Q,{variant:"body2",sx:{color:"text.secondary"},children:S("federated.description")}),e.jsx(Vs,{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:S("federated.link")})]})]})}function Ii(){const S=q.useRef(null),w=q.useRef(null),{t:A}=q.useContext(he),{blocklet:R,actions:{refreshBlocklet:j}}=ae(),y=E(()=>{const o=R.site?.domainAliases?.[0]?.href;if(o)try{const g=new URL(o);S.current?.open({link:g.origin})}catch{H.error(A("federated.failedToGetFederatedLoginLink"))}},[R.site?.domainAliases?.[0]?.href]),x=E(()=>{w.current?.open(()=>{j()})});if(R.settings.federated?.sites.length>0){const o=R.settings.federated?.config.isMaster!==!1;return e.jsx(Yr,{mode:o?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx(P,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs(P,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(Ei,{}),e.jsx(re,{sx:{width:1}}),e.jsxs(oe,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(Y,{variant:"contained",onClick:y,sx:{width:1},children:A("federated.inviteJoinFederatedLogin")}),e.jsx(Y,{variant:"outlined",onClick:x,sx:{width:1},children:A("federated.joinFederatedLogin")})]})]})}),e.jsx(zt,{ref:S}),e.jsx(Jr,{ref:w})]})}const nr={showDidColor:!0,showAppInfo:!0};function ir(S){return e.jsx(jr,{...S,sx:{transform:"scale(0.75)"}})}function Li(){const{api:S}=ee(),{blocklet:w}=ae(),A=w?.meta?.did,{handleSubmit:R,control:j,formState:y,reset:x}=pe({defaultValues:hr({},nr,w?.settings?.didConnect||{})}),{t:o}=ne(),g=E(async f=>{try{const{blocklet:u}=await S.configDidConnect({input:{did:A,didConnect:JSON.stringify(f)}}),t=Object.assign({},nr,u?.settings?.didConnect||{});x(t),H.success(o("common.configSuccess"))}catch(u){H.error(u.message)}});return e.jsx(Di,{onSubmit:R(g),children:e.jsxs(oe,{direction:"column",sx:{gap:4},children:[e.jsx(P,{children:e.jsxs(oe,{sx:{gap:2},children:[e.jsx(M,{title:o("authentication.didConnect.showDidColor"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"showDidColor",control:j,render:({field:f})=>e.jsx(ir,{...f,checked:f.value})})})}),e.jsx(M,{title:o("authentication.didConnect.showAppInfo"),sectionLeftSx:{width:"600px"},children:e.jsx(P,{sx:{alignSelf:"flex-start"},children:e.jsx(z,{name:"showAppInfo",control:j,render:({field:f})=>e.jsx(ir,{...f,checked:f.value})})})})]})}),e.jsx(P,{children:e.jsx(ce,{type:"submit",variant:"contained",disabled:!y.isDirty,children:o("common.save")})})]})})}const Di=be.form`
|
|
123
|
-
max-width: 1536px;
|
|
124
|
-
|
|
125
|
-
.advanced-config {
|
|
126
|
-
border: 0;
|
|
127
|
-
padding: 0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.config-form {
|
|
131
|
-
flex-grow: 1;
|
|
132
|
-
overflow-y: auto;
|
|
133
|
-
will-change: transform;
|
|
134
|
-
|
|
135
|
-
&:first-child {
|
|
136
|
-
margin: 0;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
${S=>S.theme.breakpoints.down("md")} {
|
|
140
|
-
width: 100%;
|
|
141
|
-
flex-shrink: 0;
|
|
142
|
-
padding: 0 24px;
|
|
143
|
-
transform: translate(0, 0);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.config-item {
|
|
148
|
-
display: flex;
|
|
149
|
-
align-items: center;
|
|
150
|
-
justify-content: space-between;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.config-desc {
|
|
154
|
-
font-weight: normal;
|
|
155
|
-
font-size: 12px;
|
|
156
|
-
color: #666;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.form-item {
|
|
160
|
-
margin-top: 0;
|
|
161
|
-
}
|
|
162
|
-
`;function Fe({label:S}){return e.jsx(P,{sx:{textAlign:"center",width:"100%"},children:S})}Fe.propTypes={label:T.any.isRequired};function Xr({orientation:S="horizontal"}){const{t:w}=q.useContext(he),A=_r({key:"lg"}),R=[{label:e.jsx(Fe,{label:w("authentication.didConnectSettings")}),value:"didConnect"},{label:e.jsx(Fe,{label:w("authentication.loginProviders")}),value:"loginProviders"},{label:e.jsx(Fe,{label:w("authentication.federated")}),value:"federated"},{label:e.jsx(Fe,{label:w("authentication.sessionSettings")}),value:"session"}],[j,y]=q.useState(R[0].value),x=we(()=>({didConnect:e.jsx(Li,{}),loginProviders:e.jsx(Ri,{}),federated:e.jsx(Ii,{}),session:e.jsx(Ai,{})}),[w]);return S==="vertical"?e.jsx(P,{sx:{".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal",div:{textAlign:"left"}},".Mui-selected":{fontWeight:"bold"}},children:e.jsxs(oe,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(P,{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(P,{sx:{flexGrow:1,minWidth:0},children:e.jsx(P,{sx:{maxWidth:"1200px"},children:x[j]})})]})}):e.jsxs(P,{children:[e.jsx(Ue,{tabs:R,current:j,onChange:y}),e.jsx(P,{sx:{marginTop:"10px"},children:x[j]})]})}Xr.propTypes={orientation:T.oneOf(["horizontal","vertical"])};const qi={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"/>'},Bi={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 Qr({enabled:S,showUp:w=!0,showDown:A=!0,showSwitch:R=!0,showDelete:j=!0,showEdit:y=!0,disableEdit:x=!1,disableSwitch:o=!1,onClickUp:g=()=>{},onClickDown:f=()=>{},onClickSwitch:u=()=>{},onClickDelete:t=()=>{},onClickEdit:a=()=>{}}){const{t:i}=ne();return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:r=>r.stopPropagation(),children:[y?e.jsx(le,{title:i("common.edit"),children:e.jsx(de,{size:"small",onClick:a,color:"success",disabled:x,children:e.jsx(se,{icon:it,fontSize:18})})}):null,j?e.jsx(le,{title:i("common.delete"),children:e.jsx(de,{size:"small",onClick:t,color:"error",children:e.jsx(se,{icon:nt,fontSize:18})})}):null,R?e.jsx(le,{title:i(S?"common.enabled":"common.disabled"),children:e.jsx(fe,{size:"small",checked:S,onClick:u,disabled:o})}):null,w?e.jsx(le,{title:i("common.moveUp"),children:e.jsx(de,{size:"small",onClick:g,disabled:x,children:e.jsx(se,{icon:Bi,fontSize:20})})}):null,A?e.jsx(le,{title:i("common.moveDown"),children:e.jsx(de,{size:"small",onClick:f,disabled:x,children:e.jsx(se,{icon:qi,fontSize:20})})}):null]})}Qr.propTypes={enabled:T.bool.isRequired,showUp:T.bool,showDown:T.bool,showSwitch:T.bool,showDelete:T.bool,showEdit:T.bool,disableEdit:T.bool,disableSwitch:T.bool,onClickUp:T.func,onClickDown:T.func,onClickSwitch:T.func,onClickDelete:T.func,onClickEdit:T.func};function es({ref:S=null}){const{t:w}=q.useContext(he),{blocklet:A}=ae(),{api:R}=ee(),j=A?.meta?.did,x=$e()?.transitions?.duration?.leavingScreen||300,o=ge({mode:"add",show:!1,isDefaultRule:!1,callback:J,loadingButton:!1,get dialogTitle(){return this.mode==="edit"?w("securityRule.edit"):this.mode==="view"?w("securityRule.view"):w("securityRule.add")}}),g=We(async()=>{const{accessPolicies:O}=await R.getBlockletAccessPolicies({input:{did:j}});return et(O,$=>$.isProtected?1:0)},{manual:!0}),f=We(async()=>{const{responseHeaderPolicies:O}=await R.getBlockletResponseHeaderPolicies({input:{did:j}});return et(O,$=>$.isProtected?1:0)},{manual:!0}),{handleSubmit:u,control:t,watch:a,setValue:i,getValues:r,reset:s,formState:{errors:c}}=pe({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),n=E(()=>{s(),o.mode="add"}),l=E(()=>{o.show=!1,setTimeout(()=>{n()},x)}),d=E((O,$=null)=>{o.loadingButton=!1,o.show=!0,$&&(o.isDefaultRule=$.id===V.SECURITY_RULE_DEFAULT_ID,o.mode="edit",i("componentDid",$.componentDid),i("pathPattern",$.pathPattern),i("responseHeaderPolicyId",$.responseHeaderPolicyId),i("accessPolicyId",$.accessPolicyId),i("remark",$.remark||"")),O?o.callback=O:o.mode="view",g.run(),f.run()});q.useImperativeHandle(S,()=>({open:d,close:l}),[d,l]);const m=E(()=>{const[O,$]=r(["accessPolicyId","responseHeaderPolicyId"]);return!O&&!$?w("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),p=E(()=>{o.loadingButton=!1}),_=E(O=>{const $=m();if($===!0){const L=o.isDefaultRule?Pe(O,"componentDid"):O;o.loadingButton=!0,o.callback(L,{close:l,done:p})}else H.error($)}),k=a("componentDid"),h=E(O=>{const $=O?.trim();if(!$)return w("common.requiredErrorText",{name:w("securityRule.form.pathPattern")});if(k){if($.startsWith("/"))return w("securityRule.form.pathPatternErrorText")}else if(!$.startsWith("/")&&$!=="*")return w("securityRule.form.pathPatternErrorText");return!0}),v=E(O=>O?.trim()?!0:w("common.requiredErrorText",{name:w("securityRule.form.accessPolicy")})),b=E(O=>O?.trim()?!0:w("common.requiredErrorText",{name:w("securityRule.form.responseHeaderPolicy")})),C=we(()=>{const $=(A?.children||[]).find(L=>L.meta.did===k);return $?.mountPoint?Ks($.mountPoint):null},[A,k]);return e.jsx(ke,{open:o.show,title:o.dialogTitle,onClose:l,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Y,{color:"primary",autoFocus:!0,variant:"contained",loading:o.loadingButton,loadingPosition:"start",onClick:u(_),children:w("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[o.isDefaultRule?null:e.jsx(z,{name:"componentDid",control:t,render:({field:O})=>e.jsx(Qe,{fullWidth:!0,margin:"dense",size:"small",label:w("securityRule.form.component"),placeholder:w("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",...Pe(O,"ref"),readOnly:o.mode==="view"})}),e.jsx(z,{name:"pathPattern",control:t,rules:{validate:h},render:({field:O})=>e.jsx(F,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:w("securityRule.form.pathPatternPlaceholder"),label:w("securityRule.form.pathPattern"),error:!!c?.pathPattern?.message,helperText:c?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...O,disabled:o.isDefaultRule||o.mode==="view",slotProps:{input:{startAdornment:C?e.jsx(mr,{position:"start",children:C}):null}}})}),e.jsx(z,{name:"accessPolicyId",control:t,rules:{validate:o.isDefaultRule?v:J},render:({field:O})=>e.jsx(Qe,{fullWidth:!0,required:o.isDefaultRule,margin:"dense",size:"small",label:w("securityRule.form.accessPolicy"),placeholder:w("securityRule.form.accessPolicyPlaceholder"),options:(g.data||[]).map($=>({value:$.id,title:$.name,description:$.description})),error:!!c?.accessPolicyId?.message,helperText:c?.accessPolicyId?.message||w("securityRule.form.accessPolicyHelperText"),...Pe(O,"ref"),disabled:o.mode==="view"})}),e.jsx(z,{name:"responseHeaderPolicyId",control:t,rules:{validate:o.isDefaultRule?b:J},render:({field:O})=>e.jsx(Qe,{fullWidth:!0,required:o.isDefaultRule,margin:"dense",size:"small",label:w("securityRule.form.responseHeaderPolicy"),placeholder:w("securityRule.form.responseHeaderPolicyPlaceholder"),options:(f.data||[]).map($=>({title:$.name,value:$.id,description:$.description})),error:!!c?.responseHeaderPolicyId?.message,helperText:c?.responseHeaderPolicyId?.message||w("securityRule.form.responseHeaderPolicyHelperText"),...Pe(O,"ref"),disabled:o.mode==="view"})}),e.jsx(z,{name:"remark",control:t,render:({field:O})=>e.jsx(F,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:w("securityRule.form.remarkPlaceholder"),label:w("securityRule.form.remark"),helperText:c?.message,...O,disabled:o.mode==="view"})})]})})}es.propTypes={ref:T.any};const ve=async(S,w="Failed to saved")=>{try{await S()}catch(A){H.error(A?.message||w)}};function Mi(){const{t:S,locale:w}=ne(),{blocklet:A}=ae(),{api:R}=ee(),j=A?.meta?.did,y=$e(),x=q.useRef(null),o=q.useRef(null),{confirmApi:g,confirmHolder:f}=Ie(),u=We(async()=>{const{securityRules:v}=await R.getBlockletSecurityRules({input:{did:j,includeDisabled:!0}});return v}),t=v=>v.id===V.SECURITY_RULE_DEFAULT_ID,a=E(v=>(A?.children||[]).find(C=>C.meta.did===v)?.mountPoint),i=(u.data||[]).map(v=>{if(v.componentDid){const b=a(v.componentDid);v._disabled=b===void 0}return v}),r=i.filter(v=>!t(v)),s=E((v,b)=>{ve(async()=>{const C=v.target.checked;await R.updateBlockletSecurityRule({input:{did:j,data:{id:b.id,enabled:C}}}),H.success(S("common.succeeded")),u.run()})}),c=E((v,b,C)=>{ve(async()=>{const O=C-1,$=i[O];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}}})]),H.success(S("common.succeeded")),u.run()})}),n=E((v,b,C)=>{ve(async()=>{const O=C+1,$=i[O];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}}})]),H.success(S("common.succeeded")),u.run()})}),l=E(()=>{x.current.open(async(v,{close:b,done:C})=>{await ve(async()=>{await R.addBlockletSecurityRule({input:{did:j,data:v}}),H.success(S("common.succeeded")),u.run(),b()}),C()})}),d=E((v,b)=>{x.current.open(async(C,{close:O,done:$})=>{await ve(async()=>{await R.updateBlockletSecurityRule({input:{did:j,data:{...C,id:b.id}}}),H.success(S("common.succeeded")),u.run(),O()}),$()},b)}),m=E((v,b)=>{g.open({title:S("securityRule.delete.title"),content:S("securityRule.delete.description"),confirmButtonText:S("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:S("common.cancel"),onConfirm(C){ve(async()=>{await R.deleteBlockletSecurityRule({input:{did:j,id:b.id}}),H.success(S("common.succeeded")),u.run(),C()})}})}),p=E(v=>{x.current.open((b,{close:C,done:O})=>{O(),C()},v)}),_={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 O=i[b];p(O)}},setRowProps:(v,b)=>i[b]._disabled?{title:S("securityRule.useless"),style:{backgroundColor:y.palette.action.disabledBackground,cursor:"default"}}:{}},k=[e.jsx(ce,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:S("common.refresh")},"refresh"),e.jsx(ce,{size:"small",variant:"contained",onClick:l,children:S("common.add")})],h=[{label:S("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(v){const b=i[v];return e.jsx(P,{sx:{whiteSpace:"nowrap"},children:b.id===V.SECURITY_RULE_DEFAULT_ID?"Default":Se(a(b.componentDid),b.pathPattern)})}}},{label:S("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(v){return i[v].responseHeaderPolicy?.name}}},{label:S("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(v){return i[v].accessPolicy?.name}}},{label:S("securityRule.form.remark"),name:"remark"},{label:S("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(v){const b=i[v],C=t(b);return e.jsx(Qr,{disableEdit:b._disabled,disableSwitch:b._disabled,enabled:b.enabled,showSwitch:!C,showDelete:!C,showUp:v>0&&!C,showDown:v<r.length-1&&!C,onClickSwitch:O=>{s(O,b,v)},onClickUp:O=>{c(O,b,v)},onClickDown:O=>{n(O,b,v)},onClickEdit:O=>{d(O,b,v)},onClickDelete:O=>{m(O,b,v)}})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:o,children:[e.jsx(st,{verticalKeyWidth:100,locale:w,title:e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:1},children:[S("securityRule.title")," ",e.jsx(Q,{variant:"body2",children:S("securityRule.sortByDescription")})]}),data:i,columns:h,customButtons:k,options:_,loading:u.loading}),e.jsx(es,{ref:x}),f]})}const ts={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"/>'},rs=[{value:V.WHO_CAN_ACCESS.ALL,icon:vn,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:V.WHO_CAN_ACCESS.INVITED,icon:Pn,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:V.WHO_CAN_ACCESS.ADMIN,icon:Ln,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:V.WHO_CAN_ACCESS.OWNER,icon:Rt,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];function ss({value:S,onChange:w,...A}){const R="roles",j="roles_reverse",{t:y,locale:x}=ne(),o=[...rs,{value:R,icon:On,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:j,icon:$n,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(F,{...A,label:y("blocklet.config.access.description"),select:!0,fullWidth:!0,value:S,onChange:w,sx:{"& .MuiInputBase-input":{width:"calc(100% - 46px)","& > .MuiBox-root:first-of-type":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},slotProps:{select:{renderValue:g=>{const f=o.find(u=>u.value===g);return f?e.jsxs(P,{children:[e.jsx(P,{component:f.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),f.title[x]||f.title.en]}):null},IconComponent:g=>e.jsx(Ys,{...g,width:20,height:20})}},children:o.map(g=>e.jsxs(Gs,{value:g.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:f})=>f.palette.text.secondary}`}},children:[e.jsxs(P,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{component:g.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(P,{children:g.title[x]||g.title.en})]}),e.jsx(P,{className:"tip",children:g.description[x]||g.description.en})]}))})}ss.propTypes={value:T.string,onChange:T.func};const ns=S=>{const w={name:S.name,description:S.description},{roles:A=null,reverse:R}=S;return A===null?R===!1&&(w.whoCanAccess=V.WHO_CAN_ACCESS.ALL,w.roles=null):A.length===0&&R===!0?(w.whoCanAccess=V.WHO_CAN_ACCESS.INVITED,w.roles=[]):Ze(A,[V.WHO_CAN_ACCESS.OWNER])&&R===!1?(w.whoCanAccess=V.WHO_CAN_ACCESS.OWNER,w.roles=[V.WHO_CAN_ACCESS.OWNER]):Ze(A,[V.WHO_CAN_ACCESS.OWNER,V.WHO_CAN_ACCESS.ADMIN])&&R===!1?(w.whoCanAccess=V.WHO_CAN_ACCESS.ADMIN,w.roles=[V.WHO_CAN_ACCESS.OWNER,V.WHO_CAN_ACCESS.ADMIN]):(w.whoCanAccess=R?"roles_reverse":"roles",w.roles=A),w},zi=S=>{const w={name:S.name,description:S.description},{roles:A=null,whoCanAccess:R}=S;return R==="roles"?(w.roles=A,w.reverse=!1):R==="roles_reverse"?(w.roles=A,w.reverse=!0):R===V.WHO_CAN_ACCESS.ALL?(w.roles=null,w.reverse=!1):R===V.WHO_CAN_ACCESS.INVITED?(w.roles=[],w.reverse=!0):R===V.WHO_CAN_ACCESS.OWNER?(w.roles=[V.WHO_CAN_ACCESS.OWNER],w.reverse=!1):R===V.WHO_CAN_ACCESS.ADMIN&&(w.roles=[V.WHO_CAN_ACCESS.OWNER,V.WHO_CAN_ACCESS.ADMIN],w.reverse=!1),w},Hi=S=>S instanceof Object?{origin:S.origin?{override:S.origin?.override??!0,value:S.origin?.value?.join(`
|
|
163
|
-
`),smart:S.origin?.smart??!0}:void 0,methods:S.methods,allowedHeaders:S.allowedHeaders?{override:S.allowedHeaders?.override??!0,value:S.allowedHeaders?.value?.join(`
|
|
164
|
-
`)}:void 0,exposedHeaders:S.exposedHeaders?{override:S.exposedHeaders?.override??!0,value:S.exposedHeaders?.value?.join(`
|
|
165
|
-
`)}:void 0,maxAge:S.maxAge,optionsSuccessStatus:S.optionsSuccessStatus,preflightContinue:S.preflightContinue,credentials:S.credentials}:void 0,Ni=S=>S instanceof Object?{origin:{override:S.origin?.override,value:S.origin?.value?.split(`
|
|
166
|
-
`).filter(A=>A),smart:S.origin?.smart},methods:S.methods,allowedHeaders:{override:S.allowedHeaders?.override,value:S.allowedHeaders?.value?.split(`
|
|
167
|
-
`).filter(A=>A)},exposedHeaders:{override:S.exposedHeaders?.override,value:S.exposedHeaders?.value?.split(`
|
|
168
|
-
`).filter(A=>A)},maxAge:S.maxAge,optionsSuccessStatus:S.optionsSuccessStatus,preflightContinue:S.preflightContinue,credentials:S.credentials}:void 0,Fi=S=>S instanceof Object?{contentSecurityPolicy:S.contentSecurityPolicy,referrerPolicy:S.referrerPolicy,xFrameOptions:S.xFrameOptions,xPoweredBy:S.xPoweredBy,xXssProtection:S.xXssProtection}:void 0,Zi=S=>S instanceof Object?{contentSecurityPolicy:S.contentSecurityPolicy,referrerPolicy:S.referrerPolicy,xFrameOptions:S.xFrameOptions,xPoweredBy:S.xPoweredBy,xXssProtection:S.xXssProtection}:void 0,Wi=S=>{const w=pr(S);if(S.securityHeader)try{w.securityHeader=JSON.parse(S.securityHeader)}catch{w.securityHeader=null}if(S.cors)try{w.cors=JSON.parse(S.cors)}catch{w.cors=null}return w};function is({ref:S=null}){const{t:w}=q.useContext(he),{roles:A}=rt(),j=$e()?.transitions?.duration?.leavingScreen||300,y=ge({mode:"add",show:!1,loadingButton:!1,callback:J,get dialogTitle(){return this.mode==="edit"?w("accessPolicy.edit"):this.mode==="view"?w("accessPolicy.view"):w("accessPolicy.add")}}),{handleSubmit:x,control:o,watch:g,setValue:f,reset:u,formState:{errors:t}}=pe({mode:"onChange",defaultValues:{name:"",description:"",roles:null,whoCanAccess:"all"}}),a=E(()=>{u(),y.mode="add"}),i=E(()=>{y.show=!1,setTimeout(()=>{a()},j)}),r=E((_=J,k=null)=>{if(y.callback=_,y.loadingButton=!1,y.show=!0,k){k.id?y.mode="edit":y.mode="view";const h=ns(k);f("name",h.name),f("description",h.description),f("roles",h.roles),f("whoCanAccess",h.whoCanAccess)}});q.useImperativeHandle(S,()=>({open:r,close:i}),[r,i]);const s=E(()=>{y.loadingButton=!1}),c=E(_=>{y.loadingButton=!0,y.callback(zi(_),{close:i,done:s})}),n=E(_=>_?.trim()?!0:w("common.requiredErrorText",{name:w("accessPolicy.form.name")})),l=g("whoCanAccess"),d=y.mode==="view",m=E(_=>["roles","roles_reverse"].includes(l)&&(!_||_?.length===0)?w("common.requiredErrorText",{name:w("accessPolicy.form.roles")}):!0),p=E(_=>_?.trim()?!0:w("common.requiredErrorText",{name:w("accessPolicy.form.accessType")}));return e.jsx(ke,{open:y.show,title:y.dialogTitle,onClose:i,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(Y,{color:"primary",autoFocus:!0,variant:"contained",onClick:x(c),loading:y.loadingButton,loadingPosition:"start",children:w("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(z,{name:"name",control:o,rules:{validate:n},render:({field:_})=>e.jsx(F,{fullWidth:!0,required:!0,margin:"dense",size:"small",disabled:d,placeholder:w("accessPolicy.form.namePlaceholder"),label:w("accessPolicy.form.name"),error:!!t?.name?.message,helperText:t?.name?.message||" ",..._})}),e.jsx(z,{name:"whoCanAccess",control:o,rules:{validate:p},render:({field:_})=>e.jsx(ss,{required:!0,size:"small",margin:"dense",disabled:d,error:!!t?.whoCanAccess?.message,helperText:t?.whoCanAccess?.message||" ",..._})}),["roles","roles_reverse"].includes(l)?e.jsx(z,{name:"roles",rules:{validate:m},control:o,render:({field:_})=>e.jsxs(K,{variant:"standard",error:!!t?.roles?.message,children:[e.jsx(tt,{sx:{display:"flex",flexDirection:"row",mt:-3},children:A.map(k=>e.jsx(ie,{control:e.jsx(De,{disabled:d,size:"small",checked:_.value?.includes(k.name),sx:{p:.75},onChange:(h,v)=>{const b=_.value||[];v?_.onChange([...b,k.name]):_.onChange(b.filter(C=>C!==k.name))}}),label:k.title},k.name))}),e.jsx(ar,{sx:{transform:"translateY(-8px)"},children:t?.roles?.message||" "})]})}):null,e.jsx(z,{name:"description",control:o,render:({field:_})=>e.jsx(F,{fullWidth:!0,multiline:!0,disabled:d,minRows:3,maxRows:7,margin:"dense",size:"small",placeholder:w("accessPolicy.form.descriptionPlaceholder"),label:w("accessPolicy.form.description"),helperText:t?.message,..._})})]})})}is.propTypes={ref:T.any};function Ui(){const{t:S,locale:w}=ne(),{blocklet:A}=ae(),{api:R}=ee(),{roles:j}=rt(),y=A?.meta?.did,x=q.useRef(null),o=q.useRef(null),{confirmApi:g,confirmHolder:f}=Ie(),u=()=>{},t=We(async()=>{const{accessPolicies:m}=await R.getBlockletAccessPolicies({input:{did:y}});return et(m,p=>p.isProtected?1:0)}),a=t.data||[],i=E(()=>{o.current.open(async(m,{close:p,done:_})=>{await ve(async()=>{await R.addBlockletAccessPolicy({input:{did:y,data:m}}),H.success(S("common.succeeded")),t.run(),p()}),_()})}),r=E(m=>{o.current.open(async(p,{close:_,done:k})=>{await ve(async()=>{await R.updateBlockletAccessPolicy({input:{did:y,data:{...p,id:m.id}}}),H.success(S("common.succeeded")),t.run(),_()}),k()},m)}),s=E(m=>{o.current.open((p,{close:_,done:k})=>{k(),_()},Pe(m,["id"]))}),c=E(m=>{g.open({title:S("accessPolicy.delete.title"),content:S("accessPolicy.delete.description"),confirmButtonText:S("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:S("common.cancel"),onConfirm(p){ve(async()=>{await R.deleteBlockletAccessPolicy({input:{did:y,id:m.id}}),H.success(S("common.succeeded")),t.run(),p()})}})}),n={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(m,{dataIndex:p},_){if(x.current?.contains(_.target)){const k=a[p];s(k)}}},l=[e.jsx(ce,{size:"small",variant:"outlined",onClick:()=>{t.run()},sx:{mr:1},children:S("common.refresh")},"refresh"),e.jsx(ce,{size:"small",variant:"contained",onClick:i,children:S("common.add")})],d=[{label:S("accessPolicy.form.name"),name:"name",options:{customBodyRenderLite(m){const p=a[m],_=p.isProtected?e.jsx(le,{title:"Built-in policy, can't edit",children:e.jsx(P,{component:se,icon:gr,sx:{fontSize:16}})}):null;return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:.5},children:[_," ",p.name]})}}},{label:S("accessPolicy.form.roles"),name:"roles",options:{customBodyRenderLite(m){const p=a[m],_=ns(p);if([V.WHO_CAN_ACCESS.ALL,V.WHO_CAN_ACCESS.INVITED].includes(_.whoCanAccess)){const h=rs.find(v=>v.value===_.whoCanAccess);return h.title?.[w]||h.title?.en}const k=j.filter(h=>p.reverse?!_.roles?.includes(h.name):_.roles?.includes(h.name));return e.jsx(P,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:k.map(h=>e.jsx(le,{title:h.description,children:e.jsx(Tt,{size:"small",label:h.title},h.name)}))})}}},{label:S("accessPolicy.form.description"),name:"description"},{label:S("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(m){const p=a[m];return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:_=>_.stopPropagation(),children:[p.isProtected?e.jsx(le,{title:S("common.view"),children:e.jsx(de,{size:"small",onClick:()=>{s(p,m)},children:e.jsx(se,{icon:ts,fontSize:18})})}):null,p.isProtected?null:e.jsx(le,{title:S("common.edit"),children:e.jsx(de,{size:"small",onClick:()=>{r(p,m)},color:"success",children:e.jsx(se,{icon:it,fontSize:18})})}),p.isProtected?null:e.jsx(le,{title:S("common.delete"),children:e.jsx(de,{size:"small",onClick:()=>{c(p,m)},color:"error",children:e.jsx(se,{icon:nt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:x,children:[e.jsx(st,{verticalKeyWidth:100,locale:w,title:S("accessPolicy.title"),data:a,columns:d,customButtons:l,options:n,loading:t.loading,onChange:u}),e.jsx(is,{ref:o}),f]})}const Vi={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 Ot({title:S,actions:w,children:A=null,defaultValue:R=!0,value:j,onChange:y,showExpand:x=!0}){const o=!Oe(j),g=ge({open:R}),f=we(()=>o?j:g.open,[j,o,g.open]),u=E(()=>{o?y(!f):g.open=!g.open});return e.jsxs(or,{variant:"outlined",children:[e.jsxs(P,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",px:2,py:1,backgroundColor:"grey.50"},onClick:u,children:[e.jsx(P,{sx:{fontWeight:"bold"},children:S}),e.jsxs(P,{sx:{display:"flex",alignItems:"center"},children:[w,x?e.jsx(P,{component:se,icon:Vi,sx:{transform:f?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",fontSize:"2rem"}}):null]})]}),e.jsx(Js,{in:f,children:e.jsx(Rn,{children:A})})]})}Ot.propTypes={title:T.string.isRequired,defaultValue:T.bool,value:T.bool,actions:T.node,children:T.node,onChange:T.func,showExpand:T.bool};const $t={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 as({config:S={},onChange:w=()=>{},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},...xr(S,Oe)},{t:y}=ne(),x=(f,{override:u,value:t,smart:a})=>{const i={...j?.[f]};!Oe(a)&&f==="origin"&&(i.smart=a),Oe(u)||(i.override=u),Oe(t)||(i.value=t),w({...j,[f]:i})},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(F,{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(tt,{sx:{flexDirection:"row"},children:R.map(f=>e.jsx(ie,{control:e.jsx(De,{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(F,{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(F,{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(F,{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(F,{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(fe,{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(fe,{size:"small",disabled:A,checked:j.credentials.value,onChange:(f,u)=>{x("credentials",{value:u})}})}];yr(()=>{w(j)});const g={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(tt,{children:o.map((f,u)=>e.jsxs(q.Fragment,{children:[e.jsxs(P,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(ie,{sx:{mt:u===0?0:1},control:f.control||e.jsx(P,{sx:{pl:1.35}}),label:f.title,required:f.required},`${f.name}_form`),e.jsxs(P,{children:[f.name==="origin"?e.jsx(ie,{control:e.jsx(De,{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(le,{title:y("responseHeaderPolicy.form.cors.smartModeHelperText"),children:e.jsx(P,{component:se,icon:$t,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:g},`${f.name}_smart`):null,e.jsx(ie,{control:e.jsx(De,{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(le,{title:y("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(P,{component:se,icon:$t,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...g,mr:0}},`${f.name}_override`)]})]}),f.content?e.jsx(P,{sx:{ml:3.5},children:f.content},`${f.name}_content`):null]},f.name))})}as.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function os({value:S,onChange:w=()=>{},disabled:A=!1}){const R="sameorigin",j=[{label:"DENY",value:"deny"},{label:"SAMEORIGIN (default)",value:"sameorigin"}],y=x=>{w({action:x.target.value})};return q.useEffect(()=>{S===!0&&w({action:R})},[S]),e.jsx(P,{children:e.jsx(K,{children:e.jsx(wr,{row:!0,children:j.map(x=>e.jsx(ie,{value:x.value,control:e.jsx(kr,{size:"small",disabled:A,checked:x.value===S?.action,onChange:y,sx:{p:.75}}),label:x.label},x.value))})})})}os.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function ls({value:S,onChange:w=()=>{},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=>{w({policy:x.target.value})};return q.useEffect(()=>{S===!0&&w({policy:R})},[S]),e.jsx(P,{children:e.jsx(K,{children:e.jsx(wr,{children:j.map(x=>e.jsx(ie,{value:x.value,control:e.jsx(kr,{size:"small",disabled:A,checked:x.value===S?.policy,onChange:y,sx:{p:.75}}),label:x.label},x.value))})})})}ls.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.func};function cs({value:S,onChange:w=()=>{},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(S?.directives||R),[x,o]=q.useState(y),g=f=>{o(f.target.value);const u=f.target.value.split(`
|
|
170
|
-
`).reduce((t,a)=>{const[i,...r]=a.split(" ");return t[i]=r.filter(s=>s!==""),t},{});w({useDefaults:!1,directives:u})};return q.useEffect(()=>{S===!0&&(w({useDefaults:!1,directives:R}),o(j(R)))},[S]),e.jsx(P,{sx:{mt:1},children:e.jsx(K,{fullWidth:!0,children:e.jsx(F,{fullWidth:!0,multiline:!0,disabled:A,rows:12,size:"small",value:x,onChange:g})})})}cs.propTypes={value:T.oneOfType([T.object,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function ds({config:S={},onChange:w=()=>{},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},...xr(S,Oe)},{t:j}=ne(),y=(g,{override:f,value:u})=>{const t={...R?.[g]};Oe(f)||(t.override=f),Oe(u)||(t.value=u),w({...R,[g]:t})},x=[{title:"Content-Security-Policy",name:"contentSecurityPolicy",override:R.contentSecurityPolicy.override,value:!!R.contentSecurityPolicy.value,content:e.jsx(cs,{disabled:A,value:R.contentSecurityPolicy.value,onChange:g=>{y("contentSecurityPolicy",{value:g})}}),onChange(g){y("contentSecurityPolicy",{value:g})}},{title:"Referrer-Policy",name:"referrerPolicy",override:R.referrerPolicy.override,value:!!R.referrerPolicy.value,content:e.jsx(ls,{disabled:A,value:R.referrerPolicy.value,onChange:g=>{y("referrerPolicy",{value:g})}}),onChange(g){y("referrerPolicy",{value:g})}},{title:"X-Frame-Options",name:"xFrameOptions",override:R.xFrameOptions.override,value:!!R.xFrameOptions.value,content:e.jsx(os,{disabled:A,value:R.xFrameOptions.value,onChange:g=>{y("xFrameOptions",{value:g})}}),onChange(g){y("xFrameOptions",{value:g})}},{title:"Disable X-Powered-By",name:"xPoweredBy",override:R.xPoweredBy.override,value:R.xPoweredBy.value,content:null,onChange(g){y("xPoweredBy",{value:g})}},{title:"X-XSS-Protection",name:"xXssProtection",override:R.xXssProtection.override,value:R.xXssProtection.value,content:null,onChange(g){y("xXssProtection",{value:g})}}];yr(()=>{w(R)});const o={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(tt,{children:x.map((g,f)=>e.jsxs(q.Fragment,{children:[e.jsxs(P,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(ie,{sx:{mt:f===0?0:1},control:e.jsx(fe,{size:"small",disabled:A,checked:g.value,onChange:()=>{g.onChange(!g.value)}},`${g.name}_switch`),label:g.title},`${g.name}_form`),g.value?e.jsx(ie,{control:e.jsx(De,{size:"small",checked:g.override,color:"warning",disabled:A,onChange:()=>{y(g.name,{override:!g.override})}}),label:e.jsxs(e.Fragment,{children:[j("responseHeaderPolicy.form.originOverride"),e.jsx(le,{title:j("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(P,{component:se,icon:$t,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...o,mr:0}}):null]}),g.value&&g.content?e.jsx(P,{sx:{ml:3.7},children:g.content},`${g.name}_content`):null]},g.name))})}ds.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function us({ref:S=null}){const{t:w}=q.useContext(he),R=$e()?.transitions?.duration?.leavingScreen||300,j=ge({mode:"add",show:!1,loadingButton:!1,callback:J,get dialogTitle(){return this.mode==="edit"?w("responseHeaderPolicy.edit"):this.mode==="view"?w("responseHeaderPolicy.view"):w("responseHeaderPolicy.add")},cors:null,securityHeader:null,enableCORS:!1}),{handleSubmit:y,control:x,setValue:o,reset:g,formState:{errors:f}}=pe({mode:"onChange",defaultValues:{name:"",description:""}}),u=E(()=>{g(),j.mode="add",j.enableCORS=!1,j.cors=null,j.securityHeader=null}),t=E(()=>{j.show=!1,setTimeout(()=>{u()},R)}),a=E((d=J,m=null)=>{j.callback=d,j.loadingButton=!1,j.show=!0,m&&(m.id?j.mode="edit":j.mode="view",o("name",m.name),o("description",m.description),j.cors=Hi(m.cors),j.securityHeader=Fi(m.securityHeader),j.enableCORS=!!m.cors)});q.useImperativeHandle(S,()=>({open:a,close:t}),[a,t]);const i=E(()=>{j.loadingButton=!1}),r=j.mode==="view",s=E(d=>{const m=Ni(j.cors),p=Zi(j.securityHeader),_=pr({...d,cors:j.enableCORS?JSON.stringify(m):null,securityHeader:JSON.stringify(p)});j.loadingButton=!0,j.callback(_,{close:t,done:i})}),c=E(d=>d?.trim()?!0:w("common.requiredErrorText",{name:w("accessPolicy.form.name")})),n=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(Y,{color:"primary",autoFocus:!0,variant:"contained",onClick:y(s),loading:j.loadingButton,loadingPosition:"start",children:w("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(z,{name:"name",control:x,rules:{validate:c},render:({field:d})=>e.jsx(F,{fullWidth:!0,required:!0,size:"small",margin:"dense",disabled:r,placeholder:w("accessPolicy.form.namePlaceholder"),label:w("accessPolicy.form.name"),error:!!f?.name?.message,helperText:f?.name?.message||" ",...d})}),e.jsx(z,{name:"description",control:x,render:({field:d})=>e.jsx(F,{fullWidth:!0,multiline:!0,size:"small",margin:"dense",disabled:r,minRows:3,maxRows:7,placeholder:"Description",label:"Description",helperText:f?.description?.message||" ",...d})}),e.jsx(Ot,{title:"Cross-origin resource sharing (CORS)",value:j.enableCORS,onChange:d=>{r||(j.enableCORS=d)},showExpand:!1,actions:e.jsx(fe,{size:"small",disabled:r,checked:j.enableCORS}),children:e.jsx(as,{config:j.cors,onChange:l,disabled:r})}),e.jsx("br",{}),e.jsx(Ot,{title:"Security Headers",children:e.jsx(ds,{config:j.securityHeader,onChange:n,disabled:r})})]})})}us.propTypes={ref:T.any};function Ki(){const{t:S,locale:w}=ne(),{blocklet:A}=ae(),{api:R}=ee(),j=A?.meta?.did,y=q.useRef(null),x=q.useRef(null),{confirmApi:o,confirmHolder:g}=Ie(),f=()=>{},u=We(async()=>{const{responseHeaderPolicies:d}=await R.getBlockletResponseHeaderPolicies({input:{did:j}});return et(d.map(m=>Wi(m)),m=>m.isProtected?1:0)}),t=u.data||[],a=E(()=>{y.current.open(async(d,{close:m,done:p})=>{await ve(async()=>{await R.addBlockletResponseHeaderPolicy({input:{did:j,data:d}}),H.success(S("common.succeeded")),u.run(),m()}),p()})}),i=E(d=>{y.current.open((m,{close:p,done:_})=>{_(),p()},Pe(d,["id"]))}),r=E(d=>{y.current.open(async(m,{close:p,done:_})=>{await ve(async()=>{await R.updateBlockletResponseHeaderPolicy({input:{did:j,data:{...m,id:d.id}}}),H.success(S("common.succeeded")),u.run(),p()}),_()},d)}),s=E(d=>{o.open({title:S("responseHeaderPolicy.delete.title"),content:S("responseHeaderPolicy.delete.description"),confirmButtonText:S("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:S("common.cancel"),onConfirm(m){ve(async()=>{await R.deleteBlockletResponseHeaderPolicy({input:{did:j,id:d.id}}),H.success(S("common.succeeded")),u.run(),m()})}})}),c={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(d,{dataIndex:m},p){if(x.current?.contains(p.target)){const _=t[m];i(_)}}},n=[e.jsx(ce,{size:"small",variant:"outlined",onClick:()=>{u.run()},sx:{mr:1},children:S("common.refresh")},"refresh"),e.jsx(ce,{size:"small",variant:"contained",onClick:a,children:S("common.add")},"add")],l=[{label:S("common.name"),name:"name",options:{customBodyRenderLite(d){const m=t[d],p=m.isProtected?e.jsx(le,{title:"Built-in policy, can't edit",children:e.jsx(P,{component:se,icon:gr,sx:{fontSize:16}})}):null;return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:.5},children:[p," ",m.name]})}}},{label:S("common.description"),name:"description"},{label:S("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(d){const m=t[d];return e.jsxs(P,{sx:{display:"flex",alignItems:"center",gap:0},onClick:p=>p.stopPropagation(),children:[m.isProtected?e.jsx(le,{title:S("common.view"),children:e.jsx(de,{size:"small",onClick:()=>{i(m,d)},children:e.jsx(se,{icon:ts,fontSize:18})})}):null,m.isProtected?null:e.jsx(le,{title:S("common.edit"),children:e.jsx(de,{size:"small",onClick:()=>{r(m,d)},color:"success",children:e.jsx(se,{icon:it,fontSize:18})})}),m.isProtected?null:e.jsx(le,{title:S("common.delete"),children:e.jsx(de,{size:"small",onClick:()=>{s(m,d)},color:"error",children:e.jsx(se,{icon:nt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(P,{sx:{display:"flex",flexDirection:"column",gap:2},ref:x,children:[e.jsx(st,{verticalKeyWidth:100,locale:w,title:S("responseHeaderPolicy.title"),data:t,columns:l,customButtons:n,options:c,loading:u.loading,onChange:f}),e.jsx(us,{ref:y}),g]})}const ms=({tabs:S,blocklet:w,ancestors:A=[],depth:R=1,t:j})=>{const y=[...A.map(o=>o.meta.did),w.meta.did].join("/"),x=!A?.length;S.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:Math.max(1,R-1)*2},children:[x?e.jsx(tn,{size:24,blocklet:w,style:{borderRadius:0}}):e.jsx(rn,{size:24,blocklet:w,ancestors:A,style:{borderRadius:0}}),e.jsx(P,{sx:{ml:2},children:e.jsx(P,{sx:{color:"text.primary"},children:x?j("blocklet.component.container"):dr.getDisplayName(w,!0)})})]},y),value:y}),w.children.length>0&&w.children.forEach(o=>{ms({tabs:S,blocklet:o,ancestors:[...A,w],depth:R+1,t:j})})};function Gi({blocklet:S,onUpdate:w=()=>{},...A}){const{t:R}=ne(),j=ge({expandPref:!0,expandSecurity:!0}),[y,x]=Xs(),o=y.get("tab")||"general",g=_r(),[f,u]=q.useState(!1),t=[];t.push({label:e.jsxs(P,{"data-cy":"configuration-tab-general",sx:{display:"flex",alignItems:"center"},children:[e.jsx(Bn,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.general")})]},"general"),value:"general"}),t.push({label:e.jsxs(P,{"data-cy":"configuration-tab-security-group",sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{sx:{ml:-2,transform:"translateY(2px)"},children:j.expandSecurity?e.jsx(Zt,{fontSize:"inherit"}):e.jsx(Wt,{fontSize:"inherit"})}),e.jsx(Rt,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.security")})]},"securityGroup"),value:"securityGroup"}),j.expandSecurity&&(t.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(Rt,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("securityRule.title")})]},"security"),value:"security"}),t.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(En,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("accessPolicy.title")})]},"accessPolicy"),value:"accessPolicy"}),t.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(se,{fontSize:24,style:{flexShrink:0},icon:Zn}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("responseHeaderPolicy.title")})]},"responseHeaderPolicy"),value:"responseHeaderPolicy"})),t.push({label:e.jsxs(P,{sx:{display:"flex",alignItems:"center"},"data-cy":"configuration-tab-authentication",children:[e.jsx(Dn,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.login")})]},"authentication"),value:"authentication"}),t.push({label:e.jsxs(P,{"data-cy":"configuration-tab-notification",sx:{display:"flex",alignItems:"center"},children:[e.jsx(qn,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.notification")})]},"notification"),value:"notification"}),t.push({label:e.jsxs(P,{"data-cy":"configuration-tab-preference",sx:{display:"flex",alignItems:"center"},children:[e.jsx(P,{sx:{ml:-2,transform:"translateY(2px)"},children:j.expandPref?e.jsx(Zt,{fontSize:"inherit"}):e.jsx(Wt,{fontSize:"inherit"})}),e.jsx(sn,{sx:{fontSize:24}}),e.jsx(P,{sx:{ml:2,color:"text.primary"},children:R("common.preferences")})]},"preference"),value:"preference"});const a=t.find(c=>c.value===o);j.expandPref&&ms({tabs:t,blocklet:S,t:R});const i=c=>{c==="preference"?j.expandPref=!j.expandPref:c==="securityGroup"?j.expandSecurity=!j.expandSecurity:x(n=>(c==="general"?n.delete("tab"):n.set("tab",c),n)),u(!1)};let r=null;o==="general"?r=e.jsx(fi,{blocklet:S,onUpdate:w}):o==="security"?r=e.jsx(Mi,{}):o==="accessPolicy"?r=e.jsx(Ui,{}):o==="responseHeaderPolicy"?r=e.jsx(Ki,{}):o==="authentication"?r=e.jsx(Xr,{}):o==="notification"?r=e.jsx(Si,{}):r=e.jsx(hn,{id:o});const s=q.useMemo(()=>({position:"relative",minHeight:"66vh",height:"100%",overflow:"hidden"}),[]);return e.jsxs(Yi,{...A,children:[g&&e.jsxs(e.Fragment,{children:[e.jsxs(P,{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(de,{onClick:()=>u(!0),sx:{mr:1},children:e.jsx(Qs,{})}),e.jsx(P,{children:a?.label})]}),e.jsx(en,{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:i,sx:{borderRight:1,height:"100%",borderColor:"divider"}})})]}),e.jsxs(ct,{container:!0,spacing:4,columns:24,children:[!g&&e.jsx(ct,{size:{xs:24,sm:7,md:5},children:e.jsx(Ue,{tabs:t,current:o,orientation:"vertical",onChange:i,sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),e.jsx(ct,{size:{xs:24,sm:17,md:19},children:e.jsx(P,{style:s,children:r})})]})]})}Gi.propTypes={blocklet:T.object.isRequired,onUpdate:T.func};const Yi=be.div`
|
|
171
|
-
.MuiTab-root {
|
|
172
|
-
text-align: left;
|
|
173
|
-
align-items: flex-start;
|
|
174
|
-
font-weight: normal;
|
|
175
|
-
}
|
|
176
|
-
.Mui-selected {
|
|
177
|
-
font-weight: bold;
|
|
178
|
-
}
|
|
179
|
-
`;export{Gi as default};
|