@abtnode/webapp 1.16.47-beta-20250729-045152-0bde0f98 → 1.16.47-beta-20250730-070104-87a128a5

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.
Files changed (206) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CEjxwZll.js → AdapterDayjs-BtMrgFCS.js} +1 -1
  4. package/dist/assets/{Add-B4W-iEoO.js → Add-D_yVrBZ2.js} +1 -1
  5. package/dist/assets/ArrowDropDown-xY2s7Ihq.js +1 -0
  6. package/dist/assets/{Autocomplete-D6EV43yc.js → Autocomplete-DFB-zfAj.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BMNJDdOd.js → Breadcrumbs-Bn8z2ZUX.js} +1 -1
  8. package/dist/assets/{ButtonGroup-C3DVQsJ4.js → ButtonGroup-DEvYFpA9.js} +1 -1
  9. package/dist/assets/{CSSTransition-0okAQ4-i.js → CSSTransition-sQz5ESLI.js} +1 -1
  10. package/dist/assets/{CallMerge-Y9ESlJrV.js → CallMerge-nqJcCofk.js} +1 -1
  11. package/dist/assets/{CardContent-LH-sz4ID.js → CardContent-DBRqZcUi.js} +1 -1
  12. package/dist/assets/{ChevronLeft-ZsWvBZGV.js → ChevronLeft-4c5hb-O9.js} +1 -1
  13. package/dist/assets/{ChevronRight-e6z3jqtZ.js → ChevronRight-gJV_CVk6.js} +1 -1
  14. package/dist/assets/{Clear-DO-BZiBw.js → Clear-CseZqtJJ.js} +1 -1
  15. package/dist/assets/{DeleteOutline-CgF-mC4F.js → DeleteOutline-Ce83cykk.js} +1 -1
  16. package/dist/assets/{Done-BaETaqzN.js → Done-TWYMo-78.js} +1 -1
  17. package/dist/assets/{Edit-DBECMp3d.js → Edit-SaGMHxTB.js} +1 -1
  18. package/dist/assets/{ErrorOutline-DdxCw5kU.js → ErrorOutline-Cpk6THeg.js} +1 -1
  19. package/dist/assets/{FilterList-DxYiq461.js → FilterList-BAa4N29F.js} +1 -1
  20. package/dist/assets/{Google-dfADpm7G.js → Google-oyxfoTny.js} +1 -1
  21. package/dist/assets/{HelpOutline-BFVo9F_0.js → HelpOutline-CwK6RnYZ.js} +1 -1
  22. package/dist/assets/{Launch-CDXFQEzY.js → Launch-BGA2e5Nh.js} +1 -1
  23. package/dist/assets/{Link-DWL-0KlH.js → Link-BuDft3kj.js} +1 -1
  24. package/dist/assets/{ListItemButton-DXCHoUka.js → ListItemButton-Bc8Ct64X.js} +1 -1
  25. package/dist/assets/{ListSubheader-C2Lfgb2C.js → ListSubheader-Dx1TAi_z.js} +1 -1
  26. package/dist/assets/{LoadingButton-DNcH1Mnj.js → LoadingButton-_O3gAanO.js} +1 -1
  27. package/dist/assets/{MoreVert-du8qSjLI.js → MoreVert-CPqEfvtL.js} +1 -1
  28. package/dist/assets/{OpenInNew-C1RIGPhL.js → OpenInNew-B8F3vFrA.js} +1 -1
  29. package/dist/assets/{Refresh-CeoaeAiU.js → Refresh-BGBC8bFM.js} +1 -1
  30. package/dist/assets/{Search-D0Q9IhU-.js → Search-B-mOt1mV.js} +1 -1
  31. package/dist/assets/{Slider-CncJ0z2P.js → Slider-DtMbThDZ.js} +1 -1
  32. package/dist/assets/{Stepper-CH2xJUkD.js → Stepper-D3IZ8VnG.js} +1 -1
  33. package/dist/assets/{Switch-zaJICCNm.js → Switch-BXS-cMbK.js} +1 -1
  34. package/dist/assets/{TableSearch-BYDZqatT.js → TableSearch-Ba0268Ym.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-dc3_-ieI.js → ToggleButtonGroup-wz_HOnUh.js} +1 -1
  36. package/dist/assets/{Verified-ChT0-JL-.js → Verified-BZYKWFMj.js} +1 -1
  37. package/dist/assets/{VerifiedUser-DZ7YfB3p.js → VerifiedUser-C7uawhTO.js} +1 -1
  38. package/dist/assets/{ViewList-CogiTXgV.js → ViewList-Dnwh79y2.js} +1 -1
  39. package/dist/assets/{_createAggregator-BKu9eN8J.js → _createAggregator-C-igeddN.js} +1 -1
  40. package/dist/assets/{actions-BTyC0TSI.js → actions-BasLLFLB.js} +1 -1
  41. package/dist/assets/{actions-fMk9zw8l.js → actions-DCyuilI2.js} +1 -1
  42. package/dist/assets/{agreement-BOz8JEx1.js → agreement-DZDzRKHa.js} +1 -1
  43. package/dist/assets/api-Clj72YcZ.js +1 -0
  44. package/dist/assets/{appearance-fhzaEvVX.js → appearance-B9fu42ad.js} +1 -1
  45. package/dist/assets/{ar-C6feXgCU.js → ar-7eC8LKj2.js} +2 -2
  46. package/dist/assets/{audit-logs-BSRiCO71.js → audit-logs-D8ZHDIr5.js} +1 -1
  47. package/dist/assets/{base-chart-BZ7sb1nU.js → base-chart-CZ5IfPx1.js} +1 -1
  48. package/dist/assets/{blocklet-B1321OUz.js → blocklet-DTKRGXY2.js} +1 -1
  49. package/dist/assets/{chain-BZJUN7yk.js → chain-D_LNFrKA.js} +1 -1
  50. package/dist/assets/{click-to-copy-Cdg_JVR5.js → click-to-copy-B9VHrkLa.js} +1 -1
  51. package/dist/assets/client-CKiDm4Sh.js +1 -0
  52. package/dist/assets/cloneDeep-ChKH-mUk.js +1 -0
  53. package/dist/assets/{collapse-Ck_S5OLV.js → collapse-D8BjMRV-.js} +1 -1
  54. package/dist/assets/{config-navigation-B5cm3gUs.js → config-navigation-HsCZP_KM.js} +3 -3
  55. package/dist/assets/{connect-to-BPhhhVkt.js → connect-to-B93KdpBp.js} +1 -1
  56. package/dist/assets/{cssMode-fGdrF1uU.js → cssMode-BLx8QOT-.js} +1 -1
  57. package/dist/assets/{de-Bac37XGJ.js → de-DgwOa_mf.js} +2 -2
  58. package/dist/assets/{delete-confirm-0RCoBsah.js → delete-confirm-DOAuBeZW.js} +1 -1
  59. package/dist/assets/{depsEqual-CcFU10J4.js → depsEqual-KodVUXvV.js} +1 -1
  60. package/dist/assets/{detail-CcCbLUqI.js → detail-DNxn6vzE.js} +3 -3
  61. package/dist/assets/{domains-B4PJARjZ.js → domains-Ba91DmOX.js} +1 -1
  62. package/dist/assets/{download-D3nqyWk1.js → download-BADzbUsd.js} +1 -1
  63. package/dist/assets/emotion-cache.browser.esm-LZWLgccN.js +1 -0
  64. package/dist/assets/engine-CnD_uEkh.js +1 -0
  65. package/dist/assets/{es-yR0ybdzc.js → es-B_gBSKp3.js} +2 -2
  66. package/dist/assets/{fr-Ck_83QEV.js → fr-Bm0AhLrO.js} +2 -2
  67. package/dist/assets/{freemarker2-FnvYyCj_.js → freemarker2-BTTF114U.js} +1 -1
  68. package/dist/assets/{get-safe-url-BxT47XWF.js → get-safe-url-Ye2EWwkH.js} +1 -1
  69. package/dist/assets/getValidReactChildren-CcAo1bEa.js +1 -0
  70. package/dist/assets/{graphqlMode-Brs7LEj_.js → graphqlMode-CLyuuGgs.js} +2 -2
  71. package/dist/assets/{handlebars-Do4N_VYG.js → handlebars-D1wnOJww.js} +1 -1
  72. package/dist/assets/hi-DO31L4at.js +5 -0
  73. package/dist/assets/{html-BunbKNRt.js → html-CAWHXH95.js} +1 -1
  74. package/dist/assets/{htmlMode-DNjIoEE-.js → htmlMode-BHaJrt3h.js} +1 -1
  75. package/dist/assets/{id-vCjhjvq0.js → id-BYCjnoK8.js} +2 -2
  76. package/dist/assets/{iframe-yPw36Vvr.js → iframe-CUpb7ICB.js} +1 -1
  77. package/dist/assets/{index-Dq_3uc-a.js → index-BAmzwezR.js} +1 -1
  78. package/dist/assets/{index-C1KK6sdP.js → index-BApymdtV.js} +1 -1
  79. package/dist/assets/{index-BjLwHzUM.js → index-BJi0KLKD.js} +1 -1
  80. package/dist/assets/{index-B61Goj7F.js → index-BLpgHHR-.js} +3 -3
  81. package/dist/assets/{index-BbavzhrM.js → index-BPfwFPum.js} +1 -1
  82. package/dist/assets/{index-CL8f3rkD.js → index-BRb176tk.js} +1 -1
  83. package/dist/assets/{index-BWweyWjB.js → index-BUVEfL-H.js} +1 -1
  84. package/dist/assets/{index-BEYVuIbp.js → index-BXRotQM-.js} +1 -1
  85. package/dist/assets/{index-DxyN6eUS.js → index-BdnfHuZv.js} +1 -1
  86. package/dist/assets/{index-LgQMv1eL.js → index-BfXbyXkW.js} +1 -1
  87. package/dist/assets/{index-C6S1lmbR.js → index-Bmy8KBkN.js} +1 -1
  88. package/dist/assets/{index-CpFJsv3y.js → index-Bn2tsvZc.js} +5 -5
  89. package/dist/assets/{index-DiaxqU_E.js → index-Bo_5PZBY.js} +1 -1
  90. package/dist/assets/{index-CUDIh0uV.js → index-BqithI6e.js} +1 -1
  91. package/dist/assets/{index-Ldj9W1ob.js → index-CFpyMQ_d.js} +9 -9
  92. package/dist/assets/{index-DoTRQ5K9.js → index-CJc0rh4y.js} +1 -1
  93. package/dist/assets/{index-zBAZ8Pfo.js → index-CU1U0Fbj.js} +1 -1
  94. package/dist/assets/{index-BT9CstZ7.js → index-CUJnu-Cz.js} +1 -1
  95. package/dist/assets/{index-RAk0OjLs.js → index-CUwyrdOY.js} +1 -1
  96. package/dist/assets/{index-BLBQA08i.js → index-CX6gDshF.js} +62 -62
  97. package/dist/assets/{index-Cr06Xokx.js → index-Cft3_tM7.js} +1 -1
  98. package/dist/assets/{index-Bn1CyFQX.js → index-CgI1wgSP.js} +1 -1
  99. package/dist/assets/{index-DtIiLQBS.js → index-Ch95NoWO.js} +1 -1
  100. package/dist/assets/{index-BDATzkvu.js → index-CkqfZU31.js} +1 -1
  101. package/dist/assets/{index-BGnYu4vr.js → index-CkvSX6B-.js} +3 -3
  102. package/dist/assets/{index-CnPpAPx2.js → index-D18Kk1fT.js} +1 -1
  103. package/dist/assets/{index-CUlbHn8y.js → index-D8Whs-QW.js} +1 -1
  104. package/dist/assets/{index-Bm11IJIp.js → index-DMhD7EeU.js} +1 -1
  105. package/dist/assets/index-DNy1-otX.js +163 -0
  106. package/dist/assets/{index-DHzjfb-a.js → index-DiZ8ImCf.js} +1 -1
  107. package/dist/assets/{index-Dg3hrnff.js → index-Dl_Ia9GM.js} +1 -1
  108. package/dist/assets/{index-BprH-L4r.js → index-Dm9SjbUQ.js} +1 -1
  109. package/dist/assets/{index-BBNUsRUo.js → index-DmpIRzjQ.js} +1 -1
  110. package/dist/assets/{index-CnQbPEXm.js → index-DtIGnfqA.js} +1 -1
  111. package/dist/assets/{index-qcIt4XvK.js → index-Dv62Si5m.js} +1 -1
  112. package/dist/assets/{index-ClP985y0.js → index-Dvrc3qEy.js} +1 -1
  113. package/dist/assets/{index-D_DF1_DB.js → index-Dz2nYC7g.js} +3 -3
  114. package/dist/assets/{index-Brgrr6Q9.js → index-NS5A6eLA.js} +2 -2
  115. package/dist/assets/{index-DsSKZqCF.js → index-Nhy6IaeB.js} +1 -1
  116. package/dist/assets/index-SNFmscVU.js +1 -0
  117. package/dist/assets/{index-K39wiT1-.js → index-YPVihXU7.js} +1 -1
  118. package/dist/assets/{index-bLvTd_T5.js → index-a7RH9Stt.js} +2 -2
  119. package/dist/assets/{index-DIh2KDDs.js → index-ijZD2Gee.js} +1 -1
  120. package/dist/assets/{index-BusruGb0.js → index-jJRuEvFt.js} +1 -1
  121. package/dist/assets/{index-GFkVv46g.js → index-rqx96NXG.js} +1 -1
  122. package/dist/assets/{index-DFf-lwMn.js → index-vaPTgN2r.js} +1 -1
  123. package/dist/assets/{index-tb_Djs4a.js → index-zs5l3prb.js} +1 -1
  124. package/dist/assets/{index.esm-DN-mQNS8.js → index.esm-CSlUhA6z.js} +1 -1
  125. package/dist/assets/{install-from-url-C014g4XR.js → install-from-url-DZxo6ZYF.js} +1 -1
  126. package/dist/assets/{invitation-C1ziMP_G.js → invitation-DuMro-DT.js} +1 -1
  127. package/dist/assets/{is-path-prefix-equal-CPQ8lTRd.js → is-path-prefix-equal-BbciGE2u.js} +1 -1
  128. package/dist/assets/{item-DxlIQnli.js → item-Bh3b7oE0.js} +1 -1
  129. package/dist/assets/{ja-BpmpH32u.js → ja-Ck2EVKeO.js} +2 -2
  130. package/dist/assets/{javascript-BbPPrhsx.js → javascript-Bfi1s6Y8.js} +1 -1
  131. package/dist/assets/{jsonMode-y5NE_Bno.js → jsonMode-lekI5_I4.js} +1 -1
  132. package/dist/assets/{ko-KPtXpJmI.js → ko-Nk_6p6Jl.js} +2 -2
  133. package/dist/assets/{liquid-nFLGUjny.js → liquid-DZv4bT5H.js} +1 -1
  134. package/dist/assets/{list-header-q1G-LUFP.js → list-header-B5ciTDV9.js} +1 -1
  135. package/dist/assets/{log-V35ZTKrR.js → log-H6ZEmpY1.js} +1 -1
  136. package/dist/assets/{lottie-react.esm-Dn5knUQA.js → lottie-react.esm-TmjsMLZQ.js} +1 -1
  137. package/dist/assets/{mdx-TuayTz60.js → mdx-D7KGnBOI.js} +1 -1
  138. package/dist/assets/{memory-DpQeoWg0.js → memory-BJvUF24N.js} +1 -1
  139. package/dist/assets/{metric-DQoJZxmd.js → metric-DqHLPUdD.js} +1 -1
  140. package/dist/assets/omit-A7YJlIhK.js +1 -0
  141. package/dist/assets/{overview-BeHGgqJf.js → overview-N_ciTHKs.js} +1 -1
  142. package/dist/assets/{permission-IeHsBf0l.js → permission-xI7TPD_-.js} +1 -1
  143. package/dist/assets/{preference-CSQ8ObSk.js → preference-COzP_QI_.js} +3 -3
  144. package/dist/assets/pt-C-JzkWqR.js +5 -0
  145. package/dist/assets/{python-BGIFZQMn.js → python-CJm_dsIE.js} +1 -1
  146. package/dist/assets/{raf-schd.esm-BBq9qjE0.js → raf-schd.esm-s2KsxjyR.js} +1 -1
  147. package/dist/assets/{razor-lelxAbyu.js → razor-BWHFGLFh.js} +1 -1
  148. package/dist/assets/{rotate-session-key-CnRsm_3S.js → rotate-session-key-CowHvrJJ.js} +1 -1
  149. package/dist/assets/ru-DR6is0tr.js +5 -0
  150. package/dist/assets/{runtime-DRjygKnw.js → runtime-DgZNKPs1.js} +1 -1
  151. package/dist/assets/schema-BCRuQHJw.js +1 -0
  152. package/dist/assets/sdk-Bv8uTx0n.js +1 -0
  153. package/dist/assets/{service-D-j26vB1.js → service-C3ESAoY1.js} +1 -1
  154. package/dist/assets/{shorten-label-wJG0ne3q.js → shorten-label-NmOkB2cg.js} +1 -1
  155. package/dist/assets/{simple-select-YguUqEhC.js → simple-select-DVpAUW9K.js} +1 -1
  156. package/dist/assets/{spaces-CaHDDkWW.js → spaces-CZFNtfbq.js} +1 -1
  157. package/dist/assets/{status-CBImjOCI.js → status-B-Brq_RM.js} +1 -1
  158. package/dist/assets/{status-9E07kMdu.js → status-CFt9_6p0.js} +1 -1
  159. package/dist/assets/{switch-control-B6AhPjuZ.js → switch-control-B8ORvjoD.js} +1 -1
  160. package/dist/assets/{table-icons-Biwjtr2C.js → table-icons-BKf29GdU.js} +1 -1
  161. package/dist/assets/{team-BnWzMroh.js → team-Dk-2oEpZ.js} +1 -1
  162. package/dist/assets/th-Cn3755Vi.js +5 -0
  163. package/dist/assets/{toLower-DiK7v-eW.js → toLower-CD8Z1e9D.js} +1 -1
  164. package/dist/assets/toUpper-B-KX3CuD.js +1 -0
  165. package/dist/assets/{traffic-CLo2BS-d.js → traffic-DR9L6nFW.js} +1 -1
  166. package/dist/assets/{tsMode-C7lVoKlD.js → tsMode-OD8H16VT.js} +1 -1
  167. package/dist/assets/{typescript-BhYNoF25.js → typescript-CPkFJ71d.js} +1 -1
  168. package/dist/assets/{url-evaluation-Bx2lemBY.js → url-evaluation-c4Fe77Jg.js} +1 -1
  169. package/dist/assets/{url-join-C19XFplp.js → url-join-DA4AkRL3.js} +1 -1
  170. package/dist/assets/{use-mobile-DnfKx5X_.js → use-mobile-MMitRVbD.js} +1 -1
  171. package/dist/assets/{use-mobile-DFGDMKoD.js → use-mobile-s6Z2HXGw.js} +1 -1
  172. package/dist/assets/{useAsync-fePVmY8z.js → useAsync-BLbCNK6N.js} +1 -1
  173. package/dist/assets/{useAsyncRetry-Dc8bNyTk.js → useAsyncRetry-DruySzFm.js} +1 -1
  174. package/dist/assets/{useLocalStorage-D2WACsdm.js → useLocalStorage-DBFHYH4w.js} +1 -1
  175. package/dist/assets/{useThemeProps-Dkx2GjJe.js → useThemeProps-CHzERYQJ.js} +1 -1
  176. package/dist/assets/{util-BKoWgC1o.js → util-DcV9UPg-.js} +1 -1
  177. package/dist/assets/vi-7MIaoDt9.js +5 -0
  178. package/dist/assets/{wait-container-CHgnafyf.js → wait-container-C3t0_9pD.js} +1 -1
  179. package/dist/assets/{without-wallet-BCcWe4oj.js → without-wallet-C-NBCmOm.js} +1 -1
  180. package/dist/assets/wrap-locale-DH63zt6h.js +1 -0
  181. package/dist/assets/{xml-DaC9CGt9.js → xml-ZnZT4dmm.js} +1 -1
  182. package/dist/assets/{yaml-226tNFKv.js → yaml-COdysg5-.js} +1 -1
  183. package/dist/assets/{zh-Dz39CLak.js → zh-DswrR4Lx.js} +1 -1
  184. package/dist/assets/{zh-tw-CCltfULq.js → zh-tw-De_IfliP.js} +1 -1
  185. package/dist/index.html +1 -1
  186. package/dist/service-worker.js +1 -1
  187. package/package.json +1 -1
  188. package/dist/assets/ArrowDropDown-BWorUt9B.js +0 -1
  189. package/dist/assets/api-I_GdlLwK.js +0 -1
  190. package/dist/assets/client-VIiKhTp9.js +0 -1
  191. package/dist/assets/cloneDeep-BoYBT801.js +0 -1
  192. package/dist/assets/emotion-cache.browser.esm-DHnIFbw_.js +0 -1
  193. package/dist/assets/engine-c7SAjZHT.js +0 -1
  194. package/dist/assets/getValidReactChildren-D20LiSDt.js +0 -1
  195. package/dist/assets/hi-uFi-fD-h.js +0 -5
  196. package/dist/assets/index-DBEPKome.js +0 -1
  197. package/dist/assets/index-JWCUU7af.js +0 -163
  198. package/dist/assets/omit-BLeFLTtJ.js +0 -1
  199. package/dist/assets/pt-DMhdW8tM.js +0 -5
  200. package/dist/assets/ru-iMSChq7P.js +0 -5
  201. package/dist/assets/schema-CFo5FH5Q.js +0 -1
  202. package/dist/assets/sdk-CaJDy-ZO.js +0 -1
  203. package/dist/assets/th-DbMd7IRR.js +0 -5
  204. package/dist/assets/toUpper-BCGSFHcE.js +0 -1
  205. package/dist/assets/vi-CmYRzn_U.js +0 -5
  206. package/dist/assets/wrap-locale-CaTK_CBd.js +0 -1
@@ -0,0 +1,163 @@
1
+ import{aG as ue,j as e,hb as Hs,hc as Bs,bL as Fs,be as St,a4 as re,dE as G,dH as Ft,dF as Ns,bu as Zs,dG as Vs,U as Nt,o as T,r as L,g as ce,t as V,N as A,C as Ce,f1 as at,bi as ft,hd as Us,s as xe,eK as mt,he as Ws,b2 as Zt,cw as Js,cP as Ks,dk as Gs,T as J,dC as it,bn as ne,bz as pt,hf as Ys,bA as gt,b as se,bg as ee,H as Z,aV as ie,m as ae,n as Vt,q as Xs,w as Ut,ad as Qs,J as Wt,g4 as er,hg as tr,au as sr,aU as K,V as Te,$ as ke,D as rr,X as nr,v as te,Y as ot,hh as ar,hi as ir,ew as or,ey as lr,I as je,E as W,hj as cr,cW as Ct,W as dr,fm as Jt,az as X,aR as Rt,hk as ur,f9 as Re,cr as E,by as ge,aE as Q,Q as Y,aP as ye,hl as qe,a2 as hr,hm as Je,c2 as Ie,ez as fr,hn as mr,dD as de,f as $e,y as Kt,bv as lt,O as pr,cD as Gt,g3 as gr,fI as Ze,ho as yr,b9 as xr,L as vr,cq as ze,aK as Be,hp as br,ag as $t,a3 as Yt,bj as Fe,hq as Xt,b6 as jr,gt as we,fa as Qt,cU as es,B as _r,b5 as At,fb as wr,fg as kr,G as Ke,M as Sr,bt as Cr}from"./index-CX6gDshF.js";import{F as ts,s as Rr,L as _e,S as $r,B as Ar}from"./preference-COzP_QI_.js";import{N as Ot}from"./ChevronRight-gJV_CVk6.js";import{T as Ne}from"./index-rqx96NXG.js";import{w as Ee,P as Or}from"./permission-xI7TPD_-.js";import{u as yt}from"./index-SNFmscVU.js";import{D as ss}from"./Done-TWYMo-78.js";import{R as rs}from"./collapse-D8BjMRV-.js";import{e as Pr,g as Tr}from"./chain-D_LNFrKA.js";import{A as Ir}from"./ArrowDropDown-xY2s7Ihq.js";import{B as Er}from"./ButtonGroup-DEvYFpA9.js";import{A as Dr,a as Pt}from"./Autocomplete-DFB-zfAj.js";import{S as z,B as Lr}from"./index-Bo_5PZBY.js";import{C as qr,R as Mr,P as zr}from"./rotate-session-key-CowHvrJJ.js";import{u as oe}from"./blocklet-DTKRGXY2.js";import{C as Hr}from"./click-to-copy-B9VHrkLa.js";import{u as Ve}from"./team-Dk-2oEpZ.js";import{v as ns}from"./index-DmpIRzjQ.js";import{V as Br,d as Fr}from"./status-CFt9_6p0.js";import{S as pe}from"./Switch-BXS-cMbK.js";import{y as Nr}from"./index-D18Kk1fT.js";import{I as Zr,J as Vr,K as Ur,L as Wr}from"./index-Nhy6IaeB.js";import{u as ve,C as B,b as Tt}from"./index.esm-CSlUhA6z.js";import{S as He,u as Jr}from"./switch-control-B8ORvjoD.js";import{D as It,R as as,a as is}from"./url-evaluation-c4Fe77Jg.js";import{A as Et}from"./Add-D_yVrBZ2.js";import{S as Kr}from"./Slider-DtMbThDZ.js";import{H as Ue}from"./index-DMhD7EeU.js";import"./index-CkqfZU31.js";import{l as Gr}from"./index-BPfwFPum.js";import{u as os}from"./use-mobile-MMitRVbD.js";import{S as Ge}from"./simple-select-DVpAUW9K.js";import{G as Yr}from"./actions-BasLLFLB.js";import{C as Xr}from"./CardContent-DBRqZcUi.js";import"./omit-A7YJlIhK.js";import"./index-Bmy8KBkN.js";import"./index-zs5l3prb.js";import"./iframe-CUpb7ICB.js";import"./getValidReactChildren-CcAo1bEa.js";import"./ListSubheader-Dx1TAi_z.js";import"./ErrorOutline-Cpk6THeg.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./visuallyHidden-Dan1xhjv.js";import"./FilterList-BAa4N29F.js";import"./CSSTransition-sQz5ESLI.js";import"./emotion-cache.browser.esm-LZWLgccN.js";import"./depsEqual-KodVUXvV.js";import"./TableSearch-Ba0268Ym.js";import"./Search-B-mOt1mV.js";import"./Clear-CseZqtJJ.js";import"./MoreVert-CPqEfvtL.js";import"./useLocalStorage-DBFHYH4w.js";import"./get-safe-url-Ye2EWwkH.js";const ls=ue([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")]),Qr=ue([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")]),en=ue(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"})),tn=ue(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"})),sn=ue(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"})),rn=ue(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"})),ct=ue(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"})),nn=ue([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")]),an=ue(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"})),on=ue(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"})),cs=ue(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"})),ln=ue(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"})),cn=ue(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 dn=Array.prototype,Dt=dn.splice;function un(v,C,$,R){var _=Bs,b=-1,p=C.length,r=v;for(v===C&&(C=Hs(C));++b<p;)for(var m=0,f=C[b],h=f;(m=_(r,h,m))>-1;)r!==v&&Dt.call(r,m,1),Dt.call(v,m,1);return v}function hn(v,C){return v&&v.length&&C&&C.length?un(v,C):v}var fn=Fs(hn);const mn={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 ds({triggers:v=[],onEnterEdit:C,disabled:$}){const R=St.useRef(null),[_,b]=St.useState(!1),p=f=>{b(!1),f()},r=()=>{b(f=>!f)},m=f=>{R.current&&R.current.contains(f.target)||b(!1)};return v.length===0?e.jsx(re,{"data-cy":"schema-form-item-edit",onClick:C,disabled:$,size:"large",children:e.jsx(Pr,{})}):e.jsxs(e.Fragment,{children:[e.jsx(Er,{variant:"outlined",ref:R,"aria-label":"split button",children:e.jsx(G,{size:"large","aria-controls":_?"split-button-menu":void 0,"aria-expanded":_?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:r,children:e.jsx(Ir,{})})}),e.jsx(Ft,{sx:{zIndex:9999},open:_,anchorEl:R.current,role:void 0,placement:"bottom-end",children:e.jsx(Ns,{children:e.jsx(Zs,{onClickAway:m,children:e.jsx(Vs,{id:"split-button-menu",autoFocusItem:!0,children:v.map(f=>e.jsx(Nt,{onClick:()=>p(f.handler),children:f.title},f.key))})})})})]})}ds.propTypes={triggers:T.arrayOf(T.shape({key:T.string.isRequired,title:T.string.isRequired,handler:T.func.isRequired})),onEnterEdit:T.func.isRequired,disabled:T.bool.isRequired};const Lt=(v,C,$)=>v===null&&C&&$?"******":v?C?"******":v:"",pn=Us`
2
+ 0%, 100% {
3
+ transform: scale(1) translateX(0);
4
+ }
5
+ 50% {
6
+ transform: scale(1.05) translateX(-3px);
7
+ }
8
+ 25%, 75% {
9
+ transform: scale(1.1) translateX(3px);
10
+ }
11
+ `;function us({label:v="",disabled:C=!1,required:$=!1,initialValue:R="",onChange:_=()=>{},placeholder:b="",style:p={},onSubmit:r=()=>{},secure:m=!1,type:f="",triggers:h=[],formatterBeforeSubmit:t=null,directEditing:l=!1,autoFocus:o=!0,errorTips:n="",...s}){const[c,a]=L.useState(l),[i,u]=L.useState(!1),{t:g}=L.useContext(ce),[y,k]=L.useState(m&&R==="__encrypted__"?null:R),[w,d]=L.useState(y),[x,j]=L.useState(!1),[S,O]=L.useState(!1),P=async()=>{u(!0);try{if(await r(w)===!1)d(y);else{let F=w;typeof t=="function"&&(F=t(w)),d(F),k(F),j(!1)}}catch{d(y)}finally{u(!1),a(!1)}};L.useEffect(()=>{const q=m&&R==="__encrypted__"?null:R;q!==y&&(k(q),d(q),j(!1))},[R,m,y]);const D=q=>{j(q!==w),d(q),_(q)},I=q=>{q.key==="Enter"&&P()},H=L.useCallback(()=>{O(!0),setTimeout(()=>{O(!1)},500)},[]),N=()=>{if(l&&!C&&!i){P();return}x&&H(),!x&&!C&&!i&&(a(!1),j(!1))},M=c||l?e.jsx(V,{style:{flex:1},fullWidth:!0,value:w,onChange:q=>{D(q.target.value)},autoFocus:o,size:"small",variant:"outlined",placeholder:b,onKeyDown:I,onBlur:N,disabled:C,error:!!n,type:m?"password":f||"text",...s}):e.jsx(A,{"data-cy":"schema-form-item-edit",className:"form-item-input slot",style:{whiteSpace:"pre-wrap",cursor:"text"},onClick:()=>{C||a(!0)},sx:{px:1},children:Lt(w,m,R)?Lt(w,m,R):e.jsx("span",{className:"placeholder",children:g("common.requiredInputPlaceholder",{name:b||v})})});return e.jsx(ts,{className:"form",style:p,children:e.jsxs(A,{children:[e.jsxs(A,{className:"form-item-label",children:[v,$&&e.jsx(rs,{})]}),e.jsxs(A,{className:"form-item-body",style:{alignItems:"flex-start"},children:[e.jsx(A,{className:"form-item-input",children:M}),e.jsx(A,{className:"form-item-action",style:{marginLeft:!h.length||l?0:12},children:c&&!l?e.jsxs(e.Fragment,{children:[x?e.jsx(re,{"data-cy":"schema-form-item-confirm",onClick:P,disabled:C||i||!x,sx:{animation:S?`${pn} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:i?e.jsx(Ce,{size:24}):e.jsx(ss,{})}):null,e.jsx(re,{"data-cy":"schema-form-item-cancel",onClick:()=>{d(y),a(!1),j(!1)},style:{paddingLeft:x?4:8},disabled:C||i,size:"large",children:e.jsx(at,{})})]}):e.jsx(A,{children:h.length?e.jsx(ds,{triggers:h,disabled:C}):null})})]}),n&&e.jsx(ft,{error:!0,children:n})]})})}us.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,placeholder:T.string,required:T.bool,disabled:T.bool,secure:T.bool,triggers:T.array,formatterBeforeSubmit:T.func,directEditing:T.bool,type:T.string,autoFocus:T.bool,errorTips:T.string};function hs({label:v="",disabled:C=!1,required:$=!1,initialValue:R="",onChange:_=()=>{},style:b={},onSubmit:p=()=>{},triggers:r=[],options:m=[],formatterBeforeSubmit:f=a=>a.join(","),helperText:h="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:n=["name"],noEmpty:s=!1,...c}){const[a,i]=L.useState(!1),[u,g]=L.useState(!1),[y,k]=L.useState(""),w=L.useRef(null),[d,x]=L.useState(R),[j,S]=L.useState(d),O=L.useMemo(()=>{if(!m)return{};const M={};return m.forEach(q=>{M[q.code]=q}),M},[m]),P=()=>{if(!m)return[];if(!y)return m.map(q=>q.code);const M=new RegExp(y.toLowerCase());return m.filter(q=>{for(let F=0;F<n.length;F++){const U=n[F];if(M.test(q[U]?.toLowerCase()))return!0}return!1}).map(q=>q.code)},D=async()=>{g(!0);try{await p(typeof f=="function"?f(j):j)===!1?S(d):s&&!j.length?(S(R),x(R)):(S(j),x(j))}catch{S(d)}finally{g(!1),i(!1)}},I=(M,q)=>{if(!Array.isArray(q)){S([]),_([]);return}const F=q.filter(U=>O[U]);if(!F.length){S([]),_([]);return}S(F),_(F)},H=M=>{M.stopPropagation(),i(!0),setTimeout(()=>{if(w.current){const q=w.current.querySelector("input");q&&q.focus()}},500)},N=a?e.jsx(Dr,{ref:w,options:m,value:j,onChange:I,inputValue:y,onInputChange:(M,q)=>{k(q)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:M=>O[M]?.name,renderInput:M=>e.jsx(V,{...M,label:"",placeholder:t}),renderOption:(M,q)=>{const F=j.indexOf(q)!==-1;return L.createElement(gn,{component:"li",...M,key:q},l(O[q]||{}),e.jsx(A,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:F?"700":"normal"},children:o(q,O[q])||O[q]?.name}),e.jsx(A,{component:at,sx:{opacity:.5,width:18,height:18},style:{visibility:F?"visible":"hidden"}}))},...c,slots:{popper:yn}}):e.jsx(A,{className:"form-item-input slot",onClick:H,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:j.filter(M=>m.some(q=>q.code===M)).map(M=>e.jsx(mt,{label:m.find(q=>q.code===M).name,style:{marginRight:8},size:"small"},M))});return e.jsx(ts,{className:"form",style:b,children:e.jsxs(A,{className:"form-item",children:[e.jsxs(A,{className:"form-item-label",children:[v,$&&e.jsx(rs,{})]}),e.jsxs(A,{className:"form-item-body",children:[e.jsx(A,{className:"form-item-input",children:N}),a?e.jsx(A,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(re,{"data-cy":"schema-form-item-confirm",onClick:D,disabled:C||u,size:"large",children:u?e.jsx(Ce,{size:24}):e.jsx(ss,{})}),e.jsx(re,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),i(!1)},disabled:C||u,size:"large",children:e.jsx(at,{})})]})}):null]}),a&&h&&e.jsx(ft,{children:h})]})})}hs.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 gn=xe.div`
12
+ display: flex;
13
+ justify-content: space-between;
14
+ align-items: center;
15
+ height: 48px;
16
+ border-bottom: 1px solid rgba(0, 0, 0, 0.08);
17
+ font-size: 1.1em;
18
+ `,yn=xe(Ft)(()=>({[`& .${Pt.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},[`& .${Pt.listbox}`]:{padding:0}}));function dt({name:v,icon:C,did:$,dark:R=!1}){return e.jsx(Ws,{prefer:R?"dark":"light",children:e.jsx(A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",bgcolor:R?"common.black":"info.main",pl:4,borderRadius:1,overflow:"hidden",height:1},children:e.jsxs(Zt,{sx:{display:"flex",alignItems:"center",p:1.5,width:1,borderRadius:"8px 0 0 8px"},children:[e.jsx(Js,{sx:{bgcolor:"transparent",width:48,height:48,borderRadius:1},children:C?e.jsx(Ks,{src:C,alt:"icon",style:{width:48,height:48,borderRadius:"8px"}}):e.jsx(Gs,{variant:"rectangular",width:48,height:48,sx:{borderRadius:1}})}),e.jsxs(A,{sx:{ml:1,flex:1,width:0,overflow:"hidden"},children:[e.jsx(J,{sx:{fontSize:20,fontWeight:500,color:"text.primary",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v}),e.jsx(it,{did:$,inline:!0,size:13})]})]})})})}dt.propTypes={name:T.string.isRequired,icon:T.string.isRequired,did:T.string.isRequired,dark:T.bool};var fs=function(C){return e.jsxs("svg",{...C,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"})]})]})]})};fs.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var ms=function(C){return e.jsxs("svg",{...C,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"})]})]})]})};ms.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var ps=function(C){return e.jsxs("svg",{...C,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"})]})]})]})};ps.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var gs=function(C){return e.jsxs("svg",{...C,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"})]})]})]})};gs.defaultProps={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 384 216"};var ys=function(C){return e.jsxs("svg",{...C,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"})]})]})]})};ys.defaultProps={width:"384",height:"216",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const xn=Object.keys(se.SUPPORTED_LANGUAGES).map(v=>({code:v,name:se.SUPPORTED_LANGUAGES[v].nativeName,enName:se.SUPPORTED_LANGUAGES[v].name})),vn=["name","enName","code"];function xt({blocklet:v,onUpdate:C=()=>{},hasPermission:$=!1,...R}){const{api:_,prefix:b,getSessionInHeader:p}=ne(),{t:r}=L.useContext(ce),[m,f]=yt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),h=m.loading||!$,{logoUrl:t,logoDarkUrl:l,rectLogoUrl:o,rectLogoDarkUrl:n,faviconUrl:s,splashPortraitUrl:c,splashLandscapeUrl:a,ogImageUrl:i}=Ys({blocklet:v});if(gt(v.status))return null;const u=v.environments.find(x=>x.key===se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES),g=v.environments.find(x=>x.key===se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),y=v.environments.find(x=>x.key===se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER),k=v.environments.find(x=>x.key===se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR),w=[{key:se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,title:r("blocklet.config.name"),description:r("blocklet.config.nameDesc"),value:v.environments.find(x=>x.key==="BLOCKLET_APP_NAME").value},{key:se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,title:r("blocklet.config.description"),description:r("blocklet.config.descriptionDesc"),value:v.environments.find(x=>x.key==="BLOCKLET_APP_DESCRIPTION").value},{key:se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,title:r("blocklet.config.appUrl"),description:r("blocklet.config.appUrlDesc"),value:g?g.value:""},{key:se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,title:r("blocklet.config.copyrightOwner"),description:r("blocklet.config.copyrightDesc"),value:y?y.value:""},{key:se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,title:r("blocklet.config.copyrightYear"),description:r("blocklet.config.copyrightDesc"),value:k?k.value:""}],d=async(x,j)=>{const S=[{key:x,value:j}];try{f({loading:!0});const{blocklet:O}=await _.configBlocklet({input:{did:v.meta.did,configs:S}});C(O)}catch(O){Z.error(O.message)}finally{f({loading:!1})}};return e.jsxs(wn,{...R,children:[e.jsxs(A,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:r("blocklet.config.baseInfo")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:r("blocklet.config.baseInfoDesc")})]}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),w.map(x=>e.jsxs(e.Fragment,{children:[e.jsx(z,{title:x.title,desc:x.description,children:e.jsx(us,{style:{marginTop:0},disabled:h,loading:m.loading,initialValue:Rr.escapeTag(x.value),placeholder:x.title,onSubmit:j=>d(x.key,j)})},x.key),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}})]})),e.jsx(z,{title:r("blocklet.config.languages"),desc:r("blocklet.config.languagesDesc"),children:e.jsx(hs,{style:{marginTop:0},disabled:h,loading:m.loading,options:xn,noEmpty:!0,initialValue:u?u.value.split(","):["en","zh"],onSubmit:x=>d("BLOCKLET_APP_LANGUAGES",x),helperText:r("blocklet.config.selectLanguagesTip"),placeholder:r("blocklet.config.languagesSearch"),filterKeys:vn,renderLabel:(x,j)=>j.name===j.enName?`${j.name} (${x.toUpperCase()})`:`${j.name}, ${j.enName} (${x.toUpperCase()})`})}),e.jsxs(A,{sx:{mt:6},children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:r("blocklet.config.logoSettings")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:r("blocklet.config.logoSettingsDesc")}),e.jsx(J,{variant:"body2",sx:{color:"warning.main"},children:r("blocklet.config.changeImageTip")})]}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsxs(kn,{children:[e.jsx(z,{title:r("blocklet.config.logoSquare"),desc:`${r("blocklet.config.logoSquareDesc")}
19
+ ${r("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,link:"https://www.didwallet.io/",children:e.jsxs(A,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:r("common.lightMode")}),e.jsx(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(dt,{name:v.environments.find(x=>x.key==="BLOCKLET_APP_NAME").value,icon:t,did:v.meta.did})}),e.jsx(_e,{did:v.meta.did,width:80,type:"square",prefix:b,url:t,enabled:$,headers:p,aspectRatio:1,children:e.jsx(G,{variant:"outlined",color:"primary",children:r("common.upload")})})]}),e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:r("common.darkMode")}),e.jsx(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:e.jsx(dt,{dark:!0,name:v.environments.find(x=>x.key==="BLOCKLET_APP_NAME").value,icon:l,did:v.meta.did})}),e.jsx(_e,{did:v.meta.did,width:80,type:"square-dark",prefix:b,url:l,enabled:$,headers:p,aspectRatio:1,children:e.jsx(G,{variant:"outlined",color:"primary",children:r("common.upload")})})]})]})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(z,{title:r("blocklet.config.logoRect"),desc:`${r("blocklet.config.logoRectDesc")}`,children:e.jsxs(A,{sx:{display:"flex",gap:3,flexWrap:"wrap"},children:[e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:r("common.lightMode")}),e.jsxs(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[o?e.jsx(fs,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(ps,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),o&&e.jsx(A,{component:"img",src:o,alt:"app-logo",sx:{position:"absolute",top:112,left:64,maxHeight:40,maxWidth:120}})]}),e.jsx(_e,{did:v.meta.did,width:80,height:"auto",type:"rect",prefix:b,url:o,enabled:$,headers:p,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(G,{variant:"outlined",children:r("common.upload")})})]}),e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsx(J,{variant:"body2",children:r("common.darkMode")}),e.jsxs(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[n?e.jsx(ms,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}):e.jsx(gs,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),n&&e.jsx(A,{component:"img",src:n,alt:"app-logo",sx:{position:"absolute",top:112,left:64,maxHeight:40,maxWidth:120}})]}),e.jsx(_e,{did:v.meta.did,width:80,height:"auto",type:"rect-dark",prefix:b,url:n,enabled:$,headers:p,aspectRatio:NaN,minWidth:80,minHeight:120,children:e.jsx(G,{variant:"outlined",children:r("common.upload")})})]})]})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(z,{title:r("blocklet.config.logoFavicon"),desc:`${r("blocklet.config.logoFaviconDesc")}
20
+ ${r("blocklet.config.logoDesc",{width:512,height:512,maxSize:5})}`,children:e.jsxs(A,{sx:{alignSelf:"flex-start",display:"flex",flexDirection:"column",gap:3},children:[e.jsxs(A,{sx:{width:307,height:173,position:"relative",borderRadius:"4px",overflow:"hidden"},children:[e.jsx(ys,{viewBox:"0 0 384 216",sx:{width:"100%",height:"100%"}}),s&&e.jsx(A,{component:"img",src:s,alt:"app-logo",sx:{position:"absolute",top:62,left:146,width:44,height:44,borderRadius:"12px"}})]}),e.jsx(_e,{did:v.meta.did,width:80,type:"favicon",prefix:b,url:s,enabled:$,headers:p,aspectRatio:1,children:e.jsx(G,{variant:"outlined",children:r("common.upload")})})]})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(z,{title:r("blocklet.config.splashPortrait"),desc:r("blocklet.config.splashDesc"),link:"https://www.arcsphere.io/",children:e.jsxs(A,{sx:{display:"flex",gap:3,alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0},flexWrap:"wrap"},children:[e.jsx(_e,{did:v.meta.did,height:400,width:225,type:"splash-portrait",prefix:b,url:c,enabled:$,headers:p,aspectRatio:9/16,minWidth:900,minHeight:1e3,allowSVG:!1}),e.jsx(A,{sx:{width:"100%",maxWidth:400,aspectRatio:"16 / 9",position:"relative"},children:e.jsx(_e,{did:v.meta.did,height:"100%",width:"100%",type:"splash-landscape",prefix:b,url:a,enabled:$,headers:p,aspectRatio:16/9,minWidth:1600,minHeight:900,allowSVG:!1})})]})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(z,{title:r("blocklet.config.ogImage"),desc:r("blocklet.config.ogImageDesc"),children:e.jsx(A,{sx:{width:"100%",maxWidth:400,aspectRatio:"40 / 21",position:"relative",alignSelf:"flex-start",".uploader-wrapper":{borderRadius:0}},children:e.jsx(_e,{did:v.meta.did,height:"100%",width:"100%",type:"og-image",prefix:b,url:i,enabled:$,headers:p,aspectRatio:40/21,minWidth:1200,minHeight:630,allowSVG:!1})})})]})]})}const bn=Ee(xt,"mutate_blocklets"),jn=Ee(xt,"",pt);function _n(v){const{inService:C}=ne();return C?e.jsx(jn,{...v}):e.jsx(bn,{...v})}xt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};const wn=xe(A)`
21
+ max-width: 1536px;
22
+
23
+ .config-form {
24
+ flex-grow: 1;
25
+ overflow-y: auto;
26
+
27
+ ${v=>v.theme.breakpoints.down("md")} {
28
+ width: 100%;
29
+ flex-shrink: 0;
30
+ transform: translate(0, 0);
31
+ }
32
+ }
33
+
34
+ .config-item {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: space-between;
38
+ margin: 16px 0;
39
+ }
40
+
41
+ .config-label {
42
+ font-weight: bold;
43
+ }
44
+
45
+ .config-desc {
46
+ font-weight: normal;
47
+ font-size: 12px;
48
+ color: #666;
49
+ }
50
+
51
+ .form-item {
52
+ margin-top: 0;
53
+ }
54
+ `,kn=xe(ie)``,Sn=localStorage.getItem("enableDebug")==="true";function xs({onChange:v=()=>{},disabled:C=!1,loading:$=!1,inService:R=!1}){const{t:_}=ae(),{api:b,session:p}=Vt(),{blocklet:r}=oe(),[m,f]=Xs({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),h=()=>f({isConnectOpen:!1}),t=()=>{if(Wt.isInProgress(r.status)){Z.error(_("blocklet.error.isInProgress"));return}f({confirmDialogOpen:!0})};return e.jsxs(e.Fragment,{children:[e.jsx(z,{title:_("blocklet.config.migrate.button"),desc:_("blocklet.config.migrate.description"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(G,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:C||$,onClick:t,children:[e.jsx(rn,{style:{fontSize:"1.3em",marginRight:4}}),_("blocklet.config.migrate.button")]})})}),e.jsxs(e.Fragment,{children:[m.isConnectOpen&&e.jsx(Ut,{popup:!0,open:m.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:b.get,checkTimeout:5*60*1e3,onSuccess:()=>{v(),R&&p.logout(),h()},extraParams:{appDid:r.appDid},messages:{title:_("setup.keyPair.title"),scan:_("setup.keyPair.scan"),confirm:_("setup.keyPair.confirm"),success:_("setup.keyPair.success")},onClose:h}),m.confirmDialogOpen&&e.jsx(Qs,{title:e.jsx(J,{sx:{fontSize:"20px",fontWeight:"500"},children:_("blocklet.config.migrate.title")}),description:e.jsx(J,{sx:{fontSize:"14px",color:"#9397A1"},children:_("blocklet.config.migrate.confirm")}),confirm:_("common.confirm"),cancel:_("common.cancel"),onConfirm:()=>f({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>f({confirmDialogOpen:!1})})]})]})}xs.propTypes={onChange:T.func,disabled:T.bool,loading:T.bool,inService:T.bool};function vs({onCancel:v,onSuccess:C,onError:$=()=>{}}){const{api:R}=L.useContext(er),[_,b]=L.useState(!1),{t:p,locale:r}=ae(),[m,f]=L.useState(""),[h,t]=L.useState(!1),[l,o]=L.useState(0),[n,s]=L.useState(""),{endpoint:c}=Ve(),[a,i]=L.useState(!1),u=d=>{f(null),b(!0);try{s(d.result),o(k.length-1)}catch(x){const j=ot(x);f(j),$(x)}finally{b(!1)}},g=()=>{t(!0),o(1)},y=()=>{t(!1),o(0)},k=[{body:e.jsxs(A,{children:[e.jsx(J,{children:p("team.transferApp.transferDialog.tips.progress")}),e.jsx(J,{sx:{mt:3,mb:2},children:p("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:p("common.cancel"),confirm:p("team.transferApp.transferDialog.createTransferLink"),onCancel:v,onConfirm:g},{cancel:p("common.cancel"),confirm:p("team.transferApp.transferDialog.createTransferLink"),body:()=>e.jsx(Ut,{action:"transfer-app-owner",open:h,locale:r,checkFn:R.get,onClose:y,onSuccess:u,checkTimeout:5*60*1e3,extraParams:{},messages:{title:p("team.transferApp.connectDialog.title"),scan:p("team.transferApp.connectDialog.scan"),confirm:p("team.transferApp.connectDialog.confirm"),success:p("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const d=tr({transferId:n.transferId,endpoint:c});return e.jsxs(e.Fragment,{children:[e.jsx(A,{component:Ae,dangerouslySetInnerHTML:{__html:p("team.transferApp.transferDialog.createSuccessTip1")}}),e.jsx(A,{component:Ae,sx:{mt:2},children:e.jsx(Ae,{children:p("team.transferApp.transferDialog.createSuccessTip3")})}),e.jsxs(A,{children:[e.jsx(A,{component:Ae,sx:{mt:2},children:e.jsx(Ae,{children:p("team.transferApp.transferDialog.createSuccessTip2",{expireDate:sr(n.expireDate,r)})})}),e.jsx(A,{sx:{my:1},children:e.jsx(Hr,{children:d})})]}),e.jsx("div",{children:e.jsx(K,{value:"end",control:e.jsx(Te,{checked:a,onChange:x=>i(x.target.checked)}),label:p("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:p("common.confirm"),onConfirm:C}],w=k[l];return e.jsxs(ke,{title:e.jsx(Ae,{className:"title",children:p("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[w.cancel&&e.jsx(te,{onClick:w.onCancel,color:"inherit",children:w.cancel}),e.jsxs(te,{onClick:w.onConfirm,color:"error",disabled:_||l===k.length-1&&!a,variant:"contained",autoFocus:!0,children:[_&&e.jsx(Ce,{size:16}),w.confirm]})]}),children:[e.jsx(rr,{component:"div",children:typeof w.body=="function"?w.body():w.body}),!!m&&e.jsx(nr,{severity:"error",variant:"icon",children:m})]})}vs.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,onError:T.func};const Ae=xe.div`
55
+ font-size: 16px;
56
+ font-weight: bold;
57
+ &.title {
58
+ font-size: 20px;
59
+ }
60
+ `;var Me={},Ye={exports:{}},qt;function Cn(){return qt||(qt=1,function(v,C){(function($,R){v.exports=R()})(self,()=>{return $={7629:(_,b,p)=>{const r=p(375),m=p(8571),f=p(9474),h=p(1687),t=p(8652),l=p(8160),o=p(3292),n=p(6354),s=p(8901),c=p(9708),a=p(6914),i=p(2294),u=p(6133),g=p(1152),y=p(8863),k=p(2036),w={Base:class{constructor(d){this.type=d,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new i.Ids,this._preferences=null,this._refs=new u.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return r(typeof c.describe=="function","Manifest functionality disabled"),c.describe(this)}allow(...d){return l.verifyFlat(d,"allow"),this._values(d,"_valids")}alter(d){r(d&&typeof d=="object"&&!Array.isArray(d),"Invalid targets argument"),r(!this._inRuleset(),"Cannot set alterations inside a ruleset");const x=this.clone();x.$_terms.alterations=x.$_terms.alterations||[];for(const j in d){const S=d[j];r(typeof S=="function","Alteration adjuster for",j,"must be a function"),x.$_terms.alterations.push({target:j,adjuster:S})}return x.$_temp.ruleset=!1,x}artifact(d){return r(d!==void 0,"Artifact cannot be undefined"),r(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",d)}cast(d){return r(d===!1||typeof d=="string","Invalid to value"),r(d===!1||this._definition.cast[d],"Type",this.type,"does not support casting to",d),this.$_setFlag("cast",d===!1?void 0:d)}default(d,x){return this._default("default",d,x)}description(d){return r(d&&typeof d=="string","Description must be a non-empty string"),this.$_setFlag("description",d)}empty(d){const x=this.clone();return d!==void 0&&(d=x.$_compile(d,{override:!1})),x.$_setFlag("empty",d,{clone:!1})}error(d){return r(d,"Missing error"),r(d instanceof Error||typeof d=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",d)}example(d,x={}){return r(d!==void 0,"Missing example"),l.assertOptions(x,["override"]),this._inner("examples",d,{single:!0,override:x.override})}external(d,x){return typeof d=="object"&&(r(!x,"Cannot combine options with description"),x=d.description,d=d.method),r(typeof d=="function","Method must be a function"),r(x===void 0||x&&typeof x=="string","Description must be a non-empty string"),this._inner("externals",{method:d,description:x},{single:!0})}failover(d,x){return this._default("failover",d,x)}forbidden(){return this.presence("forbidden")}id(d){return d?(r(typeof d=="string","id must be a non-empty string"),r(/^[^\.]+$/.test(d),"id cannot contain period character"),this.$_setFlag("id",d)):this.$_setFlag("id",void 0)}invalid(...d){return this._values(d,"_invalids")}label(d){return r(d&&typeof d=="string","Label name must be a non-empty string"),this.$_setFlag("label",d)}meta(d){return r(d!==void 0,"Meta cannot be undefined"),this._inner("metas",d,{single:!0})}note(...d){r(d.length,"Missing notes");for(const x of d)r(x&&typeof x=="string","Notes must be non-empty strings");return this._inner("notes",d)}only(d=!0){return r(typeof d=="boolean","Invalid mode:",d),this.$_setFlag("only",d)}optional(){return this.presence("optional")}prefs(d){r(d,"Missing preferences"),r(d.context===void 0,"Cannot override context"),r(d.externals===void 0,"Cannot override externals"),r(d.warnings===void 0,"Cannot override warnings"),r(d.debug===void 0,"Cannot override debug"),l.checkPreferences(d);const x=this.clone();return x._preferences=l.preferences(x._preferences,d),x}presence(d){return r(["optional","required","forbidden"].includes(d),"Unknown presence mode",d),this.$_setFlag("presence",d)}raw(d=!0){return this.$_setFlag("result",d?"raw":void 0)}result(d){return r(["raw","strip"].includes(d),"Unknown result mode",d),this.$_setFlag("result",d)}required(){return this.presence("required")}strict(d){const x=this.clone(),j=d!==void 0&&!d;return x._preferences=l.preferences(x._preferences,{convert:j}),x}strip(d=!0){return this.$_setFlag("result",d?"strip":void 0)}tag(...d){r(d.length,"Missing tags");for(const x of d)r(x&&typeof x=="string","Tags must be non-empty strings");return this._inner("tags",d)}unit(d){return r(d&&typeof d=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",d)}valid(...d){l.verifyFlat(d,"valid");const x=this.allow(...d);return x.$_setFlag("only",!!x._valids,{clone:!1}),x}when(d,x){const j=this.clone();j.$_terms.whens||(j.$_terms.whens=[]);const S=o.when(j,d,x);if(!["any","link"].includes(j.type)){const O=S.is?[S]:S.switch;for(const P of O)r(!P.then||P.then.type==="any"||P.then.type===j.type,"Cannot combine",j.type,"with",P.then&&P.then.type),r(!P.otherwise||P.otherwise.type==="any"||P.otherwise.type===j.type,"Cannot combine",j.type,"with",P.otherwise&&P.otherwise.type)}return j.$_terms.whens.push(S),j.$_mutateRebuild()}cache(d){r(!this._inRuleset(),"Cannot set caching inside a ruleset"),r(!this._cache,"Cannot override schema cache"),r(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const x=this.clone();return x._cache=d||t.provider.provision(),x.$_temp.ruleset=!1,x}clone(){const d=Object.create(Object.getPrototypeOf(this));return this._assign(d)}concat(d){r(l.isSchema(d),"Invalid schema object"),r(this.type==="any"||d.type==="any"||d.type===this.type,"Cannot merge type",this.type,"with another type:",d.type),r(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),r(!d._inRuleset(),"Cannot concatenate a schema with open ruleset");let x=this.clone();if(this.type==="any"&&d.type!=="any"){const j=d.clone();for(const S of Object.keys(x))S!=="type"&&(j[S]=x[S]);x=j}x._ids.concat(d._ids),x._refs.register(d,u.toSibling),x._preferences=x._preferences?l.preferences(x._preferences,d._preferences):d._preferences,x._valids=k.merge(x._valids,d._valids,d._invalids),x._invalids=k.merge(x._invalids,d._invalids,d._valids);for(const j of d._singleRules.keys())x._singleRules.has(j)&&(x._rules=x._rules.filter(S=>S.keep||S.name!==j),x._singleRules.delete(j));for(const j of d._rules)d._definition.rules[j.method].multi||x._singleRules.set(j.name,j),x._rules.push(j);if(x._flags.empty&&d._flags.empty){x._flags.empty=x._flags.empty.concat(d._flags.empty);const j=Object.assign({},d._flags);delete j.empty,h(x._flags,j)}else if(d._flags.empty){x._flags.empty=d._flags.empty;const j=Object.assign({},d._flags);delete j.empty,h(x._flags,j)}else h(x._flags,d._flags);for(const j in d.$_terms){const S=d.$_terms[j];S?x.$_terms[j]?x.$_terms[j]=x.$_terms[j].concat(S):x.$_terms[j]=S.slice():x.$_terms[j]||(x.$_terms[j]=S)}return this.$_root._tracer&&this.$_root._tracer._combine(x,[this,d]),x.$_mutateRebuild()}extend(d){return r(!d.base,"Cannot extend type with another base"),s.type(this,d)}extract(d){return d=Array.isArray(d)?d:d.split("."),this._ids.reach(d)}fork(d,x){r(!this._inRuleset(),"Cannot fork inside a ruleset");let j=this;for(let S of[].concat(d))S=Array.isArray(S)?S:S.split("."),j=j._ids.fork(S,x,j);return j.$_temp.ruleset=!1,j}rule(d){const x=this._definition;l.assertOptions(d,Object.keys(x.modifiers)),r(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const j=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;r(j>=0&&j<this._rules.length,"Cannot apply rules to empty ruleset");const S=this.clone();for(let O=j;O<S._rules.length;++O){const P=S._rules[O],D=m(P);for(const I in d)x.modifiers[I](D,d[I]),r(D.name===P.name,"Cannot change rule name");S._rules[O]=D,S._singleRules.get(D.name)===P&&S._singleRules.set(D.name,D)}return S.$_temp.ruleset=!1,S.$_mutateRebuild()}get ruleset(){r(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const d=this.clone();return d.$_temp.ruleset=d._rules.length,d}get $(){return this.ruleset}tailor(d){d=[].concat(d),r(!this._inRuleset(),"Cannot tailor inside a ruleset");let x=this;if(this.$_terms.alterations)for(const{target:j,adjuster:S}of this.$_terms.alterations)d.includes(j)&&(x=S(x),r(l.isSchema(x),"Alteration adjuster for",j,"failed to return a schema object"));return x=x.$_modify({each:j=>j.tailor(d),ref:!1}),x.$_temp.ruleset=!1,x.$_mutateRebuild()}tracer(){return g.location?g.location(this):this}validate(d,x){return y.entry(d,this,x)}validateAsync(d,x){return y.entryAsync(d,this,x)}$_addRule(d){typeof d=="string"&&(d={name:d}),r(d&&typeof d=="object","Invalid options"),r(d.name&&typeof d.name=="string","Invalid rule name");for(const P in d)r(P[0]!=="_","Cannot set private rule properties");const x=Object.assign({},d);x._resolve=[],x.method=x.method||x.name;const j=this._definition.rules[x.method],S=x.args;r(j,"Unknown rule",x.method);const O=this.clone();if(S){r(Object.keys(S).length===1||Object.keys(S).length===this._definition.rules[x.name].args.length,"Invalid rule definition for",this.type,x.name);for(const P in S){let D=S[P];if(j.argsByName){const I=j.argsByName.get(P);if(I.ref&&l.isResolvable(D))x._resolve.push(P),O.$_mutateRegister(D);else if(I.normalize&&(D=I.normalize(D),S[P]=D),I.assert){const H=l.validateArg(D,P,I);r(!H,H,"or reference")}}D!==void 0?S[P]=D:delete S[P]}}return j.multi||(O._ruleRemove(x.name,{clone:!1}),O._singleRules.set(x.name,x)),O.$_temp.ruleset===!1&&(O.$_temp.ruleset=null),j.priority?O._rules.unshift(x):O._rules.push(x),O}$_compile(d,x){return o.schema(this.$_root,d,x)}$_createError(d,x,j,S,O,P={}){const D=P.flags!==!1?this._flags:{},I=P.messages?a.merge(this._definition.messages,P.messages):this._definition.messages;return new n.Report(d,x,j,D,I,S,O)}$_getFlag(d){return this._flags[d]}$_getRule(d){return this._singleRules.get(d)}$_mapLabels(d){return d=Array.isArray(d)?d:d.split("."),this._ids.labels(d)}$_match(d,x,j,S){(j=Object.assign({},j)).abortEarly=!0,j._externals=!1,x.snapshot();const O=!y.validate(d,this,x,j,S).errors;return x.restore(),O}$_modify(d){return l.assertOptions(d,["each","once","ref","schema"]),i.schema(this,d)||this}$_mutateRebuild(){return r(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(d,{source:x,name:j,path:S,key:O})=>{const P=this._definition[x][j]&&this._definition[x][j].register;P!==!1&&this.$_mutateRegister(d,{family:P,key:O})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(d,{family:x,key:j}={}){this._refs.register(d,x),this._ids.register(d,{key:j})}$_property(d){return this._definition.properties[d]}$_reach(d){return this._ids.reach(d)}$_rootReferences(){return this._refs.roots()}$_setFlag(d,x,j={}){r(d[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const S=this._definition.flags[d]||{};if(f(x,S.default)&&(x=void 0),f(x,this._flags[d]))return this;const O=j.clone!==!1?this.clone():this;return x!==void 0?(O._flags[d]=x,O.$_mutateRegister(x)):delete O._flags[d],d[0]!=="_"&&(O.$_temp.ruleset=!1),O}$_parent(d,...x){return this[d][l.symbols.parent].call(this,...x)}$_validate(d,x,j){return y.validate(d,this,x,j)}_assign(d){d.type=this.type,d.$_root=this.$_root,d.$_temp=Object.assign({},this.$_temp),d.$_temp.whens={},d._ids=this._ids.clone(),d._preferences=this._preferences,d._valids=this._valids&&this._valids.clone(),d._invalids=this._invalids&&this._invalids.clone(),d._rules=this._rules.slice(),d._singleRules=m(this._singleRules,{shallow:!0}),d._refs=this._refs.clone(),d._flags=Object.assign({},this._flags),d._cache=null,d.$_terms={};for(const x in this.$_terms)d.$_terms[x]=this.$_terms[x]?this.$_terms[x].slice():null;d.$_super={};for(const x in this.$_super)d.$_super[x]=this._super[x].bind(d);return d}_bare(){const d=this.clone();d._reset();const x=d._definition.terms;for(const j in x){const S=x[j];d.$_terms[j]=S.init}return d.$_mutateRebuild()}_default(d,x,j={}){return l.assertOptions(j,"literal"),r(x!==void 0,"Missing",d,"value"),r(typeof x=="function"||!j.literal,"Only function value supports literal option"),typeof x=="function"&&j.literal&&(x={[l.symbols.literal]:!0,literal:x}),this.$_setFlag(d,x)}_generate(d,x,j){if(!this.$_terms.whens)return{schema:this};const S=[],O=[];for(let I=0;I<this.$_terms.whens.length;++I){const H=this.$_terms.whens[I];if(H.concat){S.push(H.concat),O.push(`${I}.concat`);continue}const N=H.ref?H.ref.resolve(d,x,j):d,M=H.is?[H]:H.switch,q=O.length;for(let F=0;F<M.length;++F){const{is:U,then:le,otherwise:me}=M[F],be=`${I}${H.switch?"."+F:""}`;if(U.$_match(N,x.nest(U,`${be}.is`),j)){if(le){const De=x.localize([...x.path,`${be}.then`],x.ancestors,x.schemas),{schema:We,id:Le}=le._generate(d,De,j);S.push(We),O.push(`${be}.then${Le?`(${Le})`:""}`);break}}else if(me){const De=x.localize([...x.path,`${be}.otherwise`],x.ancestors,x.schemas),{schema:We,id:Le}=me._generate(d,De,j);S.push(We),O.push(`${be}.otherwise${Le?`(${Le})`:""}`);break}}if(H.break&&O.length>q)break}const P=O.join(", ");if(x.mainstay.tracer.debug(x,"rule","when",P),!P)return{schema:this};if(!x.mainstay.tracer.active&&this.$_temp.whens[P])return{schema:this.$_temp.whens[P],id:P};let D=this;this._definition.generate&&(D=this._definition.generate(this,d,x,j));for(const I of S)D=D.concat(I);return this.$_root._tracer&&this.$_root._tracer._combine(D,[this,...S]),this.$_temp.whens[P]=D,{schema:D,id:P}}_inner(d,x,j={}){r(!this._inRuleset(),`Cannot set ${d} inside a ruleset`);const S=this.clone();return S.$_terms[d]&&!j.override||(S.$_terms[d]=[]),j.single?S.$_terms[d].push(x):S.$_terms[d].push(...x),S.$_temp.ruleset=!1,S}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(d,x={}){if(!this._singleRules.has(d))return this;const j=x.clone!==!1?this.clone():this;j._singleRules.delete(d);const S=[];for(let O=0;O<j._rules.length;++O){const P=j._rules[O];P.name!==d||P.keep?S.push(P):j._inRuleset()&&O<j.$_temp.ruleset&&--j.$_temp.ruleset}return j._rules=S,j}_values(d,x){l.verifyFlat(d,x.slice(1,-1));const j=this.clone(),S=d[0]===l.symbols.override;if(S&&(d=d.slice(1)),!j[x]&&d.length?j[x]=new k:S&&(j[x]=d.length?new k:null,j.$_mutateRebuild()),!j[x])return j;S&&j[x].override();for(const O of d){r(O!==void 0,"Cannot call allow/valid/invalid with undefined"),r(O!==l.symbols.override,"Override must be the first value");const P=x==="_invalids"?"_valids":"_invalids";j[P]&&(j[P].remove(O),j[P].length||(r(x==="_valids"||!j._flags.only,"Setting invalid value",O,"leaves schema rejecting all values due to previous valid rule"),j[P]=null)),j[x].add(O,j._refs)}return j}}};w.Base.prototype[l.symbols.any]={version:l.version,compile:o.compile,root:"$_root"},w.Base.prototype.isImmutable=!0,w.Base.prototype.deny=w.Base.prototype.invalid,w.Base.prototype.disallow=w.Base.prototype.invalid,w.Base.prototype.equal=w.Base.prototype.valid,w.Base.prototype.exist=w.Base.prototype.required,w.Base.prototype.not=w.Base.prototype.invalid,w.Base.prototype.options=w.Base.prototype.prefs,w.Base.prototype.preferences=w.Base.prototype.prefs,_.exports=new w.Base},8652:(_,b,p)=>{const r=p(375),m=p(8571),f=p(8160),h={max:1e3,supported:new Set(["undefined","boolean","number","string"])};b.provider={provision:t=>new h.Cache(t)},h.Cache=class{constructor(t={}){f.assertOptions(t,["max"]),r(t.max===void 0||t.max&&t.max>0&&isFinite(t.max),"Invalid max cache size"),this._max=t.max||h.max,this._map=new Map,this._list=new h.List}get length(){return this._map.size}set(t,l){if(t!==null&&!h.supported.has(typeof t))return;let o=this._map.get(t);if(o)return o.value=l,void this._list.first(o);o=this._list.unshift({key:t,value:l}),this._map.set(t,o),this._compact()}get(t){const l=this._map.get(t);if(l)return this._list.first(l),m(l.value)}_compact(){if(this._map.size>this._max){const t=this._list.pop();this._map.delete(t.key)}}},h.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:l,prev:o}=t;return l.prev=o,o&&(o.next=l),t===this.tail&&(this.tail=l),t.prev=null,t.next=null,t}}},8160:(_,b,p)=>{const r=p(375),m=p(7916),f=p(5934);let h,t;const l={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)?)?)?)?$/};b.version=f.version,b.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},b.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")},b.assertOptions=function(o,n,s="Options"){r(o&&typeof o=="object"&&!Array.isArray(o),"Options must be of type object");const c=Object.keys(o).filter(a=>!n.includes(a));r(c.length===0,`${s} contain unknown keys: ${c}`)},b.checkPreferences=function(o){t=t||p(3378);const n=t.preferences.validate(o);if(n.error)throw new m([n.error.details[0].message])},b.compare=function(o,n,s){switch(s){case"=":return o===n;case">":return o>n;case"<":return o<n;case">=":return o>=n;case"<=":return o<=n}},b.default=function(o,n){return o===void 0?n:o},b.isIsoDate=function(o){return l.isoDate.test(o)},b.isNumber=function(o){return typeof o=="number"&&!isNaN(o)},b.isResolvable=function(o){return!!o&&(o[b.symbols.ref]||o[b.symbols.template])},b.isSchema=function(o,n={}){const s=o&&o[b.symbols.any];return!!s&&(r(n.legacy||s.version===b.version,"Cannot mix different versions of joi schemas"),!0)},b.isValues=function(o){return o[b.symbols.values]},b.limit=function(o){return Number.isSafeInteger(o)&&o>=0},b.preferences=function(o,n){h=h||p(6914),o=o||{},n=n||{};const s=Object.assign({},o,n);return n.errors&&o.errors&&(s.errors=Object.assign({},o.errors,n.errors),s.errors.wrap=Object.assign({},o.errors.wrap,n.errors.wrap)),n.messages&&(s.messages=h.compile(n.messages,o.messages)),delete s[b.symbols.prefs],s},b.tryWithPath=function(o,n,s={}){try{return o()}catch(c){throw c.path!==void 0?c.path=n+"."+c.path:c.path=n,s.append&&(c.message=`${c.message} (${c.path})`),c}},b.validateArg=function(o,n,{assert:s,message:c}){if(b.isSchema(s)){const a=s.validate(o);return a.error?a.error.message:void 0}if(!s(o))return n?`${n} ${c}`:c},b.verifyFlat=function(o,n){for(const s of o)r(!Array.isArray(s),"Method no longer accepts array arguments:",n)}},3292:(_,b,p)=>{const r=p(375),m=p(8160),f=p(6133),h={};b.schema=function(t,l,o={}){m.assertOptions(o,["appendPath","override"]);try{return h.schema(t,l,o)}catch(n){throw o.appendPath&&n.path!==void 0&&(n.message=`${n.message} (${n.path})`),n}},h.schema=function(t,l,o){r(l!==void 0,"Invalid undefined schema"),Array.isArray(l)&&(r(l.length,"Invalid empty array schema"),l.length===1&&(l=l[0]));const n=(s,...c)=>o.override!==!1?s.valid(t.override,...c):s.valid(...c);if(h.simple(l))return n(t,l);if(typeof l=="function")return t.custom(l);if(r(typeof l=="object","Invalid schema content:",typeof l),m.isResolvable(l))return n(t,l);if(m.isSchema(l))return l;if(Array.isArray(l)){for(const s of l)if(!h.simple(s))return t.alternatives().try(...l);return n(t,...l)}return l instanceof RegExp?t.string().regex(l):l instanceof Date?n(t.date(),l):(r(Object.getPrototypeOf(l)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),t.object().keys(l))},b.ref=function(t,l){return f.isRef(t)?t:f.create(t,l)},b.compile=function(t,l,o={}){m.assertOptions(o,["legacy"]);const n=l&&l[m.symbols.any];if(n)return r(o.legacy||n.version===m.version,"Cannot mix different versions of joi schemas:",n.version,m.version),l;if(typeof l!="object"||!o.legacy)return b.schema(t,l,{appendPath:!0});const s=h.walk(l);return s?s.compile(s.root,l):b.schema(t,l,{appendPath:!0})},h.walk=function(t){if(typeof t!="object")return null;if(Array.isArray(t)){for(const o of t){const n=h.walk(o);if(n)return n}return null}const l=t[m.symbols.any];if(l)return{root:t[l.root],compile:l.compile};r(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const o in t){const n=h.walk(t[o]);if(n)return n}return null},h.simple=function(t){return t===null||["boolean","string","number"].includes(typeof t)},b.when=function(t,l,o){if(o===void 0&&(r(l&&typeof l=="object","Missing options"),o=l,l=f.create(".")),Array.isArray(o)&&(o={switch:o}),m.assertOptions(o,["is","not","then","otherwise","switch","break"]),m.isSchema(l))return r(o.is===void 0,'"is" can not be used with a schema condition'),r(o.not===void 0,'"not" can not be used with a schema condition'),r(o.switch===void 0,'"switch" can not be used with a schema condition'),h.condition(t,{is:l,then:o.then,otherwise:o.otherwise,break:o.break});if(r(f.isRef(l)||typeof l=="string","Invalid condition:",l),r(o.not===void 0||o.is===void 0,'Cannot combine "is" with "not"'),o.switch===void 0){let s=o;o.not!==void 0&&(s={is:o.not,then:o.otherwise,otherwise:o.then,break:o.break});let c=s.is!==void 0?t.$_compile(s.is):t.$_root.invalid(null,!1,0,"").required();return r(s.then!==void 0||s.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),r(s.break===void 0||s.then===void 0||s.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),o.is===void 0||f.isRef(o.is)||m.isSchema(o.is)||(c=c.required()),h.condition(t,{ref:b.ref(l),is:c,then:s.then,otherwise:s.otherwise,break:s.break})}r(Array.isArray(o.switch),'"switch" must be an array'),r(o.is===void 0,'Cannot combine "switch" with "is"'),r(o.not===void 0,'Cannot combine "switch" with "not"'),r(o.then===void 0,'Cannot combine "switch" with "then"');const n={ref:b.ref(l),switch:[],break:o.break};for(let s=0;s<o.switch.length;++s){const c=o.switch[s],a=s===o.switch.length-1;m.assertOptions(c,a?["is","then","otherwise"]:["is","then"]),r(c.is!==void 0,'Switch statement missing "is"'),r(c.then!==void 0,'Switch statement missing "then"');const i={is:t.$_compile(c.is),then:t.$_compile(c.then)};if(f.isRef(c.is)||m.isSchema(c.is)||(i.is=i.is.required()),a){r(o.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const u=o.otherwise!==void 0?o.otherwise:c.otherwise;u!==void 0&&(r(n.break===void 0,"Cannot specify both otherwise and break"),i.otherwise=t.$_compile(u))}n.switch.push(i)}return n},h.condition=function(t,l){for(const o of["then","otherwise"])l[o]===void 0?delete l[o]:l[o]=t.$_compile(l[o]);return l}},6354:(_,b,p)=>{const r=p(5688),m=p(8160),f=p(3328);b.Report=class{constructor(h,t,l,o,n,s,c){if(this.code=h,this.flags=o,this.messages=n,this.path=s.path,this.prefs=c,this.state=s,this.value=t,this.message=null,this.template=null,this.local=l||{},this.local.label=b.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 a=this.path[this.path.length-1];typeof a!="object"&&(this.local.key=a)}}_setTemplate(h){if(this.template=h,!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 h=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 "${h}" 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(h,t){return b.template(this.value,h,t||this.code,this.state,this.prefs)}},b.path=function(h){let t="";for(const l of h)typeof l!="object"&&(typeof l=="string"?(t&&(t+="."),t+=l):t+=`[${l}]`);return t},b.template=function(h,t,l,o,n){if(!t)return;if(f.isTemplate(t))return l!=="root"?t:null;let s=n.errors.language;if(m.isResolvable(s)&&(s=s.resolve(h,o,n)),s&&t[s]){if(t[s][l]!==void 0)return t[s][l];if(t[s]["*"]!==void 0)return t[s]["*"]}return t[l]?t[l]:t["*"]},b.label=function(h,t,l,o){if(!l.errors.label)return"";if(h.label)return h.label;let n=t.path;return l.errors.label==="key"&&t.path.length>1&&(n=t.path.slice(-1)),b.path(n)||b.template(null,l.messages,"root",t,l)||o&&b.template(null,o,"root",t,l)||"value"},b.process=function(h,t,l){if(!h)return null;const{override:o,message:n,details:s}=b.details(h);if(o)return o;if(l.errors.stack)return new b.ValidationError(n,s,t);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const a=new b.ValidationError(n,s,t);return Error.stackTraceLimit=c,a},b.details=function(h,t={}){let l=[];const o=[];for(const n of h){if(n instanceof Error){if(t.override!==!1)return{override:n};const c=n.toString();l.push(c),o.push({message:c,type:"override",context:{error:n}});continue}const s=n.toString();l.push(s),o.push({message:s,path:n.path.filter(c=>typeof c!="object"),type:n.code,context:n.local})}return l.length>1&&(l=[...new Set(l)]),{message:l.join(". "),details:o}},b.ValidationError=class extends Error{constructor(h,t,l){super(h),this._original=l,this.details=t}static isError(h){return h instanceof b.ValidationError}},b.ValidationError.prototype.isJoi=!0,b.ValidationError.prototype.name="ValidationError",b.ValidationError.prototype.annotate=r.error},8901:(_,b,p)=>{const r=p(375),m=p(8571),f=p(8160),h=p(6914),t={};b.type=function(l,o){const n=Object.getPrototypeOf(l),s=m(n),c=l._assign(Object.create(s)),a=Object.assign({},o);delete a.base,s._definition=a;const i=n._definition||{};a.messages=h.merge(i.messages,a.messages),a.properties=Object.assign({},i.properties,a.properties),c.type=a.type,a.flags=Object.assign({},i.flags,a.flags);const u=Object.assign({},i.terms);if(a.terms)for(const w in a.terms){const d=a.terms[w];r(c.$_terms[w]===void 0,"Invalid term override for",a.type,w),c.$_terms[w]=d.init,u[w]=d}a.terms=u,a.args||(a.args=i.args),a.prepare=t.prepare(a.prepare,i.prepare),a.coerce&&(typeof a.coerce=="function"&&(a.coerce={method:a.coerce}),a.coerce.from&&!Array.isArray(a.coerce.from)&&(a.coerce={method:a.coerce.method,from:[].concat(a.coerce.from)})),a.coerce=t.coerce(a.coerce,i.coerce),a.validate=t.validate(a.validate,i.validate);const g=Object.assign({},i.rules);if(a.rules)for(const w in a.rules){const d=a.rules[w];r(typeof d=="object","Invalid rule definition for",a.type,w);let x=d.method;if(x===void 0&&(x=function(){return this.$_addRule(w)}),x&&(r(!s[w],"Rule conflict in",a.type,w),s[w]=x),r(!g[w],"Rule conflict in",a.type,w),g[w]=d,d.alias){const j=[].concat(d.alias);for(const S of j)s[S]=d.method}d.args&&(d.argsByName=new Map,d.args=d.args.map(j=>(typeof j=="string"&&(j={name:j}),r(!d.argsByName.has(j.name),"Duplicated argument name",j.name),f.isSchema(j.assert)&&(j.assert=j.assert.strict().label(j.name)),d.argsByName.set(j.name,j),j)))}a.rules=g;const y=Object.assign({},i.modifiers);if(a.modifiers)for(const w in a.modifiers){r(!s[w],"Rule conflict in",a.type,w);const d=a.modifiers[w];r(typeof d=="function","Invalid modifier definition for",a.type,w);const x=function(j){return this.rule({[w]:j})};s[w]=x,y[w]=d}if(a.modifiers=y,a.overrides){s._super=n,c.$_super={};for(const w in a.overrides)r(n[w],"Cannot override missing",w),a.overrides[w][f.symbols.parent]=n[w],c.$_super[w]=n[w].bind(c);Object.assign(s,a.overrides)}a.cast=Object.assign({},i.cast,a.cast);const k=Object.assign({},i.manifest,a.manifest);return k.build=t.build(a.manifest&&a.manifest.build,i.manifest&&i.manifest.build),a.manifest=k,a.rebuild=t.rebuild(a.rebuild,i.rebuild),c},t.build=function(l,o){return l&&o?function(n,s){return o(l(n,s),s)}:l||o},t.coerce=function(l,o){return l&&o?{from:l.from&&o.from?[...new Set([...l.from,...o.from])]:null,method(n,s){let c;if((!o.from||o.from.includes(typeof n))&&(c=o.method(n,s),c)){if(c.errors||c.value===void 0)return c;n=c.value}if(!l.from||l.from.includes(typeof n)){const a=l.method(n,s);if(a)return a}return c}}:l||o},t.prepare=function(l,o){return l&&o?function(n,s){const c=l(n,s);if(c){if(c.errors||c.value===void 0)return c;n=c.value}return o(n,s)||c}:l||o},t.rebuild=function(l,o){return l&&o?function(n){o(n),l(n)}:l||o},t.validate=function(l,o){return l&&o?function(n,s){const c=o(n,s);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;n=c.value}return l(n,s)||c}:l||o}},5107:(_,b,p)=>{const r=p(375),m=p(8571),f=p(8652),h=p(8160),t=p(3292),l=p(6354),o=p(8901),n=p(9708),s=p(6133),c=p(3328),a=p(1152);let i;const u={types:{alternatives:p(4946),any:p(8068),array:p(546),boolean:p(4937),date:p(7500),function:p(390),link:p(8785),number:p(3832),object:p(8966),string:p(7417),symbol:p(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const g={_types:new Set(Object.keys(u.types))};for(const y of g._types)g[y]=function(...k){return r(!k.length||["alternatives","link","object"].includes(y),"The",y,"type does not allow arguments"),u.generate(this,u.types[y],k)};for(const y of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])g[y]=function(...k){return this.any()[y](...k)};Object.assign(g,u.methods);for(const y in u.aliases){const k=u.aliases[y];g[y]=g[k]}return g.x=g.expression,a.setup&&a.setup(g),g}};u.methods={ValidationError:l.ValidationError,version:h.version,cache:f.provider,assert(g,y,...k){u.assert(g,y,!0,k)},attempt:(g,y,...k)=>u.assert(g,y,!1,k),build(g){return r(typeof n.build=="function","Manifest functionality disabled"),n.build(this,g)},checkPreferences(g){h.checkPreferences(g)},compile(g,y){return t.compile(this,g,y)},defaults(g){r(typeof g=="function","modifier must be a function");const y=Object.assign({},this);for(const k of y._types){const w=g(y[k]());r(h.isSchema(w),"modifier must return a valid schema object"),y[k]=function(...d){return u.generate(this,w,d)}}return y},expression:(...g)=>new c(...g),extend(...g){h.verifyFlat(g,"extend"),i=i||p(3378),r(g.length,"You need to provide at least one extension"),this.assert(g,i.extensions);const y=Object.assign({},this);y._types=new Set(y._types);for(let k of g){typeof k=="function"&&(k=k(y)),this.assert(k,i.extension);const w=u.expandExtension(k,y);for(const d of w){r(y[d.type]===void 0||y._types.has(d.type),"Cannot override name",d.type);const x=d.base||this.any(),j=o.type(x,d);y._types.add(d.type),y[d.type]=function(...S){return u.generate(this,j,S)}}}return y},isError:l.ValidationError.isError,isExpression:c.isTemplate,isRef:s.isRef,isSchema:h.isSchema,in:(...g)=>s.in(...g),override:h.symbols.override,ref:(...g)=>s.create(...g),types(){const g={};for(const y of this._types)g[y]=this[y]();for(const y in u.aliases)g[y]=this[y]();return g}},u.assert=function(g,y,k,w){const d=w[0]instanceof Error||typeof w[0]=="string"?w[0]:null,x=d!==null?w[1]:w[0],j=y.validate(g,h.preferences({errors:{stack:!0}},x||{}));let S=j.error;if(!S)return j.value;if(d instanceof Error)throw d;const O=k&&typeof S.annotate=="function"?S.annotate():S.message;throw S instanceof l.ValidationError==0&&(S=m(S)),S.message=d?`${d} ${O}`:O,S},u.generate=function(g,y,k){return r(g,"Must be invoked on a Joi instance."),y.$_root=g,y._definition.args&&k.length?y._definition.args(y,...k):y},u.expandExtension=function(g,y){if(typeof g.type=="string")return[g];const k=[];for(const w of y._types)if(g.type.test(w)){const d=Object.assign({},g);d.type=w,d.base=y[w](),k.push(d)}return k},_.exports=u.root()},6914:(_,b,p)=>{const r=p(375),m=p(8571),f=p(3328);b.compile=function(h,t){if(typeof h=="string")return r(!t,"Cannot set single message string"),new f(h);if(f.isTemplate(h))return r(!t,"Cannot set single message template"),h;r(typeof h=="object"&&!Array.isArray(h),"Invalid message options"),t=t?m(t):{};for(let l in h){const o=h[l];if(l==="root"||f.isTemplate(o)){t[l]=o;continue}if(typeof o=="string"){t[l]=new f(o);continue}r(typeof o=="object"&&!Array.isArray(o),"Invalid message for",l);const n=l;for(l in t[n]=t[n]||{},o){const s=o[l];l==="root"||f.isTemplate(s)?t[n][l]=s:(r(typeof s=="string","Invalid message for",l,"in",n),t[n][l]=new f(s))}}return t},b.decompile=function(h){const t={};for(let l in h){const o=h[l];if(l==="root"){t.root=o;continue}if(f.isTemplate(o)){t[l]=o.describe({compact:!0});continue}const n=l;for(l in t[n]={},o){const s=o[l];l!=="root"?t[n][l]=s.describe({compact:!0}):t[n].root=s}}return t},b.merge=function(h,t){if(!h)return b.compile(t);if(!t)return h;if(typeof t=="string")return new f(t);if(f.isTemplate(t))return t;const l=m(h);for(let o in t){const n=t[o];if(o==="root"||f.isTemplate(n)){l[o]=n;continue}if(typeof n=="string"){l[o]=new f(n);continue}r(typeof n=="object"&&!Array.isArray(n),"Invalid message for",o);const s=o;for(o in l[s]=l[s]||{},n){const c=n[o];o==="root"||f.isTemplate(c)?l[s][o]=c:(r(typeof c=="string","Invalid message for",o,"in",s),l[s][o]=new f(c))}}return l}},2294:(_,b,p)=>{const r=p(375),m=p(8160),f=p(6133),h={};b.Ids=h.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const t=new h.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[l,o]of t._byId.entries())r(!this._byKey.has(l),"Schema id conflicts with existing key:",l),this._byId.set(l,o);for(const[l,o]of t._byKey.entries())r(!this._byId.has(l),"Schema key conflicts with existing id:",l),this._byKey.set(l,o)}fork(t,l,o){const n=this._collect(t);n.push({schema:o});const s=n.shift();let c={id:s.id,schema:l(s.schema)};r(m.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const a of n)c={id:a.id,schema:h.fork(a.schema,c.id,c.schema)};return c.schema}labels(t,l=[]){const o=t[0],n=this._get(o);if(!n)return[...l,...t].join(".");const s=t.slice(1);return l=[...l,n.schema._flags.label||o],s.length?n.schema._ids.labels(s,l):l.join(".")}reach(t,l=[]){const o=t[0],n=this._get(o);r(n,"Schema does not contain path",[...l,...t].join("."));const s=t.slice(1);return s.length?n.schema._ids.reach(s,[...l,o]):n.schema}register(t,{key:l}={}){if(!t||!m.isSchema(t))return;(t.$_property("schemaChain")||t._ids._schemaChain)&&(this._schemaChain=!0);const o=t._flags.id;if(o){const n=this._byId.get(o);r(!n||n.schema===t,"Cannot add different schemas with the same id:",o),r(!this._byKey.has(o),"Schema id conflicts with existing key:",o),this._byId.set(o,{schema:t,id:o})}l&&(r(!this._byKey.has(l),"Schema already contains key:",l),r(!this._byId.has(l),"Schema key conflicts with existing id:",l),this._byKey.set(l,{schema:t,id:l}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(t,l=[],o=[]){const n=t[0],s=this._get(n);r(s,"Schema does not contain path",[...l,...t].join(".")),o=[s,...o];const c=t.slice(1);return c.length?s.schema._ids._collect(c,[...l,n],o):o}_get(t){return this._byId.get(t)||this._byKey.get(t)}},h.fork=function(t,l,o){const n=b.schema(t,{each:(s,{key:c})=>{if(l===(s._flags.id||c))return o},ref:!1});return n?n.$_mutateRebuild():t},b.schema=function(t,l){let o;for(const n in t._flags){if(n[0]==="_")continue;const s=h.scan(t._flags[n],{source:"flags",name:n},l);s!==void 0&&(o=o||t.clone(),o._flags[n]=s)}for(let n=0;n<t._rules.length;++n){const s=t._rules[n],c=h.scan(s.args,{source:"rules",name:s.name},l);if(c!==void 0){o=o||t.clone();const a=Object.assign({},s);a.args=c,o._rules[n]=a,o._singleRules.get(s.name)===s&&o._singleRules.set(s.name,a)}}for(const n in t.$_terms){if(n[0]==="_")continue;const s=h.scan(t.$_terms[n],{source:"terms",name:n},l);s!==void 0&&(o=o||t.clone(),o.$_terms[n]=s)}return o},h.scan=function(t,l,o,n,s){const c=n||[];if(t===null||typeof t!="object")return;let a;if(Array.isArray(t)){for(let i=0;i<t.length;++i){const u=l.source==="terms"&&l.name==="keys"&&t[i].key,g=h.scan(t[i],l,o,[i,...c],u);g!==void 0&&(a=a||t.slice(),a[i]=g)}return a}if(o.schema!==!1&&m.isSchema(t)||o.ref!==!1&&f.isRef(t)){const i=o.each(t,{...l,path:c,key:s});return i===t?void 0:i}for(const i in t){if(i[0]==="_")continue;const u=h.scan(t[i],l,o,[i,...c],s);u!==void 0&&(a=a||Object.assign({},t),a[i]=u)}return a}},6133:(_,b,p)=>{const r=p(375),m=p(8571),f=p(9621),h=p(8160);let t;const l={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};b.create=function(o,n={}){r(typeof o=="string","Invalid reference key:",o),h.assertOptions(n,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),r(!n.prefix||typeof n.prefix=="object","options.prefix must be of type object");const s=Object.assign({},l.defaults,n);delete s.prefix;const c=s.separator,a=l.context(o,c,n.prefix);if(s.type=a.type,o=a.key,s.type==="value")if(a.root&&(r(!c||o[0]!==c,"Cannot specify relative path with root prefix"),s.ancestor="root",o||(o=null)),c&&c===o)o=null,s.ancestor=0;else if(s.ancestor!==void 0)r(!c||!o||o[0]!==c,"Cannot combine prefix with ancestor option");else{const[i,u]=l.ancestor(o,c);u&&(o=o.slice(u))===""&&(o=null),s.ancestor=i}return s.path=c?o===null?[]:o.split(c):[o],new l.Ref(s)},b.in=function(o,n={}){return b.create(o,{...n,in:!0})},b.isRef=function(o){return!!o&&!!o[h.symbols.ref]},l.Ref=class{constructor(o){r(typeof o=="object","Invalid reference construction"),h.assertOptions(o,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),r([!1,void 0].includes(o.separator)||typeof o.separator=="string"&&o.separator.length===1,"Invalid separator"),r(!o.adjust||typeof o.adjust=="function","options.adjust must be a function"),r(!o.map||Array.isArray(o.map),"options.map must be an array"),r(!o.map||!o.adjust,"Cannot set both map and adjust options"),Object.assign(this,l.defaults,o),r(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(o,n,s,c,a={}){return r(!this.in||a.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(s.context,n,a):this.type==="local"?this._resolve(c,n,a):this.ancestor?this.ancestor==="root"?this._resolve(n.ancestors[n.ancestors.length-1],n,a):(r(this.ancestor<=n.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(n.ancestors[this.ancestor-1],n,a)):this._resolve(o,n,a)}_resolve(o,n,s){let c;if(this.type==="value"&&n.mainstay.shadow&&s.shadow!==!1&&(c=n.mainstay.shadow.get(this.absolute(n))),c===void 0&&(c=f(o,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const a=this.map.get(c);a!==void 0&&(c=a)}return n.mainstay&&n.mainstay.tracer.resolve(n,this,c),c}toString(){return this.display}absolute(o){return[...o.path.slice(0,-this.ancestor),...this.path]}clone(){return new l.Ref(this)}describe(){const o={path:this.path};this.type!=="value"&&(o.type=this.type),this.separator!=="."&&(o.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(o.ancestor=this.ancestor),this.map&&(o.map=[...this.map]);for(const n of["adjust","iterables","render"])this[n]!==null&&this[n]!==void 0&&(o[n]=this[n]);return this.in!==!1&&(o.in=!0),{ref:o}}updateDisplay(){const o=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${o}`);if(!this.separator)return void(this.display=`ref:${o}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${o}`);if(this.ancestor==="root")return void(this.display=`ref:root:${o}`);if(this.ancestor===1)return void(this.display=`ref:${o||".."}`);const n=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${n}${o||""}`}},l.Ref.prototype[h.symbols.ref]=!0,b.build=function(o){return(o=Object.assign({},l.defaults,o)).type==="value"&&o.ancestor===void 0&&(o.ancestor=1),new l.Ref(o)},l.context=function(o,n,s={}){if(o=o.trim(),s){const c=s.global===void 0?"$":s.global;if(c!==n&&o.startsWith(c))return{key:o.slice(c.length),type:"global"};const a=s.local===void 0?"#":s.local;if(a!==n&&o.startsWith(a))return{key:o.slice(a.length),type:"local"};const i=s.root===void 0?"/":s.root;if(i!==n&&o.startsWith(i))return{key:o.slice(i.length),type:"value",root:!0}}return{key:o,type:"value"}},l.ancestor=function(o,n){if(!n)return[1,0];if(o[0]!==n)return[1,0];if(o[1]!==n)return[0,1];let s=2;for(;o[s]===n;)++s;return[s-1,s]},b.toSibling=0,b.toParent=1,b.Manager=class{constructor(){this.refs=[]}register(o,n){if(o)if(n=n===void 0?b.toParent:n,Array.isArray(o))for(const s of o)this.register(s,n);else if(h.isSchema(o))for(const s of o._refs.refs)s.ancestor-n>=0&&this.refs.push({ancestor:s.ancestor-n,root:s.root});else b.isRef(o)&&o.type==="value"&&o.ancestor-n>=0&&this.refs.push({ancestor:o.ancestor-n,root:o.root}),t=t||p(3328),t.isTemplate(o)&&this.register(o.refs(),n)}get length(){return this.refs.length}clone(){const o=new b.Manager;return o.refs=m(this.refs),o}reset(){this.refs=[]}roots(){return this.refs.filter(o=>!o.ancestor).map(o=>o.root)}}},3378:(_,b,p)=>{const r=p(5107),m={};m.wrap=r.string().min(1).max(2).allow(!1),b.preferences=r.object({allowUnknown:r.boolean(),abortEarly:r.boolean(),artifacts:r.boolean(),cache:r.boolean(),context:r.object(),convert:r.boolean(),dateFormat:r.valid("date","iso","string","time","utc"),debug:r.boolean(),errors:{escapeHtml:r.boolean(),label:r.valid("path","key",!1),language:[r.string(),r.object().ref()],render:r.boolean(),stack:r.boolean(),wrap:{label:m.wrap,array:m.wrap,string:m.wrap}},externals:r.boolean(),messages:r.object(),noDefaults:r.boolean(),nonEnumerables:r.boolean(),presence:r.valid("required","optional","forbidden"),skipFunctions:r.boolean(),stripUnknown:r.object({arrays:r.boolean(),objects:r.boolean()}).or("arrays","objects").allow(!0,!1),warnings:r.boolean()}).strict(),m.nameRx=/^[a-zA-Z0-9]\w*$/,m.rule=r.object({alias:r.array().items(r.string().pattern(m.nameRx)).single(),args:r.array().items(r.string(),r.object({name:r.string().pattern(m.nameRx).required(),ref:r.boolean(),assert:r.alternatives([r.function(),r.object().schema()]).conditional("ref",{is:!0,then:r.required()}),normalize:r.function(),message:r.string().when("assert",{is:r.function(),then:r.required()})})),convert:r.boolean(),manifest:r.boolean(),method:r.function().allow(!1),multi:r.boolean(),validate:r.function()}),b.extension=r.object({type:r.alternatives([r.string(),r.object().regex()]).required(),args:r.function(),cast:r.object().pattern(m.nameRx,r.object({from:r.function().maxArity(1).required(),to:r.function().minArity(1).maxArity(2).required()})),base:r.object().schema().when("type",{is:r.object().regex(),then:r.forbidden()}),coerce:[r.function().maxArity(3),r.object({method:r.function().maxArity(3).required(),from:r.array().items(r.string()).single()})],flags:r.object().pattern(m.nameRx,r.object({setter:r.string(),default:r.any()})),manifest:{build:r.function().arity(2)},messages:[r.object(),r.string()],modifiers:r.object().pattern(m.nameRx,r.function().minArity(1).maxArity(2)),overrides:r.object().pattern(m.nameRx,r.function()),prepare:r.function().maxArity(3),rebuild:r.function().arity(1),rules:r.object().pattern(m.nameRx,m.rule),terms:r.object().pattern(m.nameRx,r.object({init:r.array().allow(null).required(),manifest:r.object().pattern(/.+/,[r.valid("schema","single"),r.object({mapped:r.object({from:r.string().required(),to:r.string().required()}).required()})])})),validate:r.function().maxArity(3)}).strict(),b.extensions=r.array().items(r.object(),r.function().arity(1)).strict(),m.desc={buffer:r.object({buffer:r.string()}),func:r.object({function:r.function().required(),options:{literal:!0}}),override:r.object({override:!0}),ref:r.object({ref:r.object({type:r.valid("value","global","local"),path:r.array().required(),separator:r.string().length(1).allow(!1),ancestor:r.number().min(0).integer().allow("root"),map:r.array().items(r.array().length(2)).min(1),adjust:r.function(),iterables:r.boolean(),in:r.boolean(),render:r.boolean()}).required()}),regex:r.object({regex:r.string().min(3)}),special:r.object({special:r.valid("deep").required()}),template:r.object({template:r.string().required(),options:r.object()}),value:r.object({value:r.alternatives([r.object(),r.array()]).required()})},m.desc.entity=r.alternatives([r.array().items(r.link("...")),r.boolean(),r.function(),r.number(),r.string(),m.desc.buffer,m.desc.func,m.desc.ref,m.desc.regex,m.desc.special,m.desc.template,m.desc.value,r.link("/")]),m.desc.values=r.array().items(null,r.boolean(),r.function(),r.number().allow(1/0,-1/0),r.string().allow(""),r.symbol(),m.desc.buffer,m.desc.func,m.desc.override,m.desc.ref,m.desc.regex,m.desc.template,m.desc.value),m.desc.messages=r.object().pattern(/.+/,[r.string(),m.desc.template,r.object().pattern(/.+/,[r.string(),m.desc.template])]),b.description=r.object({type:r.string().required(),flags:r.object({cast:r.string(),default:r.any(),description:r.string(),empty:r.link("/"),failover:m.desc.entity,id:r.string(),label:r.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:r.boolean(),unit:r.string()}).unknown(),preferences:{allowUnknown:r.boolean(),abortEarly:r.boolean(),artifacts:r.boolean(),cache:r.boolean(),convert:r.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:r.boolean(),label:["path","key"],language:[r.string(),m.desc.ref],wrap:{label:m.wrap,array:m.wrap}},externals:r.boolean(),messages:m.desc.messages,noDefaults:r.boolean(),nonEnumerables:r.boolean(),presence:["required","optional","forbidden"],skipFunctions:r.boolean(),stripUnknown:r.object({arrays:r.boolean(),objects:r.boolean()}).or("arrays","objects").allow(!0,!1),warnings:r.boolean()},allow:m.desc.values,invalid:m.desc.values,rules:r.array().min(1).items({name:r.string().required(),args:r.object().min(1),keep:r.boolean(),message:[r.string(),m.desc.messages],warn:r.boolean()}),keys:r.object().pattern(/.*/,r.link("/")),link:m.desc.ref}).pattern(/^[a-z]\w*$/,r.any())},493:(_,b,p)=>{const r=p(8571),m=p(9621),f=p(8160),h={value:Symbol("value")};_.exports=h.State=class{constructor(t,l,o){this.path=t,this.ancestors=l,this.mainstay=o.mainstay,this.schemas=o.schemas,this.debug=null}localize(t,l=null,o=null){const n=new h.State(t,l,this);return o&&n.schemas&&(n.schemas=[h.schemas(o),...n.schemas]),n}nest(t,l){const o=new h.State(this.path,this.ancestors,this);return o.schemas=o.schemas&&[h.schemas(t),...o.schemas],o.debug=l,o}shadow(t,l){this.mainstay.shadow=this.mainstay.shadow||new h.Shadow,this.mainstay.shadow.set(this.path,t,l)}snapshot(){this.mainstay.shadow&&(this._snapshot=r(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()}},h.schemas=function(t){return f.isSchema(t)?{schema:t}:t},h.Shadow=class{constructor(){this._values=null}set(t,l,o){if(!t.length||o==="strip"&&typeof t[t.length-1]=="number")return;this._values=this._values||new Map;let n=this._values;for(let s=0;s<t.length;++s){const c=t[s];let a=n.get(c);a||(a=new Map,n.set(c,a)),n=a}n[h.value]=l}get(t){const l=this.node(t);if(l)return l[h.value]}node(t){if(this._values)return m(this._values,t,{iterables:!0})}override(t,l){if(!this._values)return;const o=t.slice(0,-1),n=t[t.length-1],s=m(this._values,o,{iterables:!0});l?s.set(n,l):s&&s.delete(n)}}},3328:(_,b,p)=>{const r=p(375),m=p(8571),f=p(5277),h=p(1447),t=p(8160),l=p(6354),o=p(6133),n={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};_.exports=n.Template=class{constructor(s,c){if(r(typeof s=="string","Template source must be a string"),r(!s.includes("\0")&&!s.includes(""),"Template source cannot contain reserved control characters"),this.source=s,this.rendered=s,this._template=null,c){const{functions:a,...i}=c;this._settings=Object.keys(i).length?m(i):void 0,this._functions=a,this._functions&&(r(Object.keys(this._functions).every(u=>typeof u=="string"),"Functions keys must be strings"),r(Object.values(this._functions).every(u=>typeof u=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const s=n.encode(this.source),c=n.split(s);let a=!1;const i=[],u=c.shift();u&&i.push(u);for(const g of c){const y=g[0]!=="{",k=y?"}":"}}",w=g.indexOf(k);if(w===-1||g[1]==="{"){i.push(`{${n.decode(g)}`);continue}let d=g.slice(y?0:1,w);const x=d[0]===":";x&&(d=d.slice(1));const j=this._ref(n.decode(d),{raw:y,wrapped:x});i.push(j),typeof j!="string"&&(a=!0);const S=g.slice(w+k.length);S&&i.push(n.decode(S))}a?this._template=i:this.rendered=i.join("")}static date(s,c){return n.dateFormat[c.dateFormat].call(s)}describe(s={}){if(!this._settings&&s.compact)return this.source;const c={template:this.source};return this._settings&&(c.options=this._settings),this._functions&&(c.functions=this._functions),c}static build(s){return new n.Template(s.template,s.options||s.functions?{...s.options,functions:s.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(s){return!!s&&!!s[t.symbols.template]}refs(){if(!this._template)return;const s=[];for(const c of this._template)typeof c!="string"&&s.push(...c.refs);return s}resolve(s,c,a,i){return this._template&&this._template.length===1?this._part(this._template[0],s,c,a,i,{}):this.render(s,c,a,i)}_part(s,...c){return s.ref?s.ref.resolve(...c):s.formula.evaluate(c)}render(s,c,a,i,u={}){if(!this.isDynamic())return this.rendered;const g=[];for(const y of this._template)if(typeof y=="string")g.push(y);else{const k=this._part(y,s,c,a,i,u),w=n.stringify(k,s,c,a,i,u);if(w!==void 0){const d=y.raw||(u.errors&&u.errors.escapeHtml)===!1?w:f(w);g.push(n.wrap(d,y.wrapped&&a.errors.wrap.label))}}return g.join("")}_ref(s,{raw:c,wrapped:a}){const i=[],u=y=>{const k=o.create(y,this._settings);return i.push(k),w=>{const d=k.resolve(...w);return d!==void 0?d:null}};try{const y=this._functions?{...n.functions,...this._functions}:n.functions;var g=new h.Parser(s,{reference:u,functions:y,constants:n.constants})}catch(y){throw y.message=`Invalid template variable "${s}" fails due to: ${y.message}`,y}if(g.single){if(g.single.type==="reference"){const y=i[0];return{ref:y,raw:c,refs:i,wrapped:a||y.type==="local"&&y.key==="label"}}return n.stringify(g.single.value)}return{formula:g,raw:c,refs:i}}toString(){return this.source}},n.Template.prototype[t.symbols.template]=!0,n.Template.prototype.isImmutable=!0,n.encode=function(s){return s.replace(/\\(\{+)/g,(c,a)=>n.opens.slice(0,a.length)).replace(/\\(\}+)/g,(c,a)=>n.closes.slice(0,a.length))},n.decode=function(s){return s.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},n.split=function(s){const c=[];let a="";for(let i=0;i<s.length;++i){const u=s[i];if(u==="{"){let g="";for(;i+1<s.length&&s[i+1]==="{";)g+="{",++i;c.push(a),a=g}else a+=u}return c.push(a),c},n.wrap=function(s,c){return c?c.length===1?`${c}${s}${c}`:`${c[0]}${s}${c[1]}`:s},n.stringify=function(s,c,a,i,u,g={}){const y=typeof s,k=i&&i.errors&&i.errors.wrap||{};let w=!1;if(o.isRef(s)&&s.render&&(w=s.in,s=s.resolve(c,a,i,u,{in:s.in,...g})),s===null)return"null";if(y==="string")return n.wrap(s,g.arrayItems&&k.string);if(y==="number"||y==="function"||y==="symbol")return s.toString();if(y!=="object")return JSON.stringify(s);if(s instanceof Date)return n.Template.date(s,i);if(s instanceof Map){const x=[];for(const[j,S]of s.entries())x.push(`${j.toString()} -> ${S.toString()}`);s=x}if(!Array.isArray(s))return s.toString();const d=[];for(const x of s)d.push(n.stringify(x,c,a,i,u,{arrayItems:!0,...g}));return n.wrap(d.join(", "),!w&&k.array)},n.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},n.functions={if:(s,c,a)=>s?c:a,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,a,i,u,g]=this,y=g.messages;if(!y)return"";const k=l.template(c,y[0],s,a,i)||l.template(c,y[1],s,a,i);return k?k.render(c,a,i,u,g):""},number:s=>typeof s=="number"?s:typeof s=="string"?parseFloat(s):typeof s=="boolean"?s?1:0:s instanceof Date?s.getTime():null}},4946:(_,b,p)=>{const r=p(375),m=p(1687),f=p(8068),h=p(8160),t=p(3292),l=p(6354),o=p(6133),n={};_.exports=f.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:o.toSibling}},args:(s,...c)=>c.length===1&&Array.isArray(c[0])?s.try(...c[0]):s.try(...c),validate(s,c){const{schema:a,error:i,state:u,prefs:g}=c;if(a._flags.match){const k=[],w=[];for(let x=0;x<a.$_terms.matches.length;++x){const j=a.$_terms.matches[x],S=u.nest(j.schema,`match.${x}`);S.snapshot();const O=j.schema.$_validate(s,S,g);O.errors?(w.push(O.errors),S.restore()):(k.push(O.value),S.commit())}if(k.length===0)return{errors:i("alternatives.any",{details:w.map(x=>l.details(x,{override:!1}))})};if(a._flags.match==="one")return k.length===1?{value:k[0]}:{errors:i("alternatives.one")};if(k.length!==a.$_terms.matches.length)return{errors:i("alternatives.all",{details:w.map(x=>l.details(x,{override:!1}))})};const d=x=>x.$_terms.matches.some(j=>j.schema.type==="object"||j.schema.type==="alternatives"&&d(j.schema));return d(a)?{value:k.reduce((x,j)=>m(x,j,{mergeArrays:!1}))}:{value:k[k.length-1]}}const y=[];for(let k=0;k<a.$_terms.matches.length;++k){const w=a.$_terms.matches[k];if(w.schema){const j=u.nest(w.schema,`match.${k}`);j.snapshot();const S=w.schema.$_validate(s,j,g);if(!S.errors)return j.commit(),S;j.restore(),y.push({schema:w.schema,reports:S.errors});continue}const d=w.ref?w.ref.resolve(s,u,g):s,x=w.is?[w]:w.switch;for(let j=0;j<x.length;++j){const S=x[j],{is:O,then:P,otherwise:D}=S,I=`match.${k}${w.switch?"."+j:""}`;if(O.$_match(d,u.nest(O,`${I}.is`),g)){if(P)return P.$_validate(s,u.nest(P,`${I}.then`),g)}else if(D)return D.$_validate(s,u.nest(D,`${I}.otherwise`),g)}}return n.errors(y,c)},rules:{conditional:{method(s,c){r(!this._flags._endedSwitch,"Unreachable condition"),r(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),r(c.break===void 0,"Cannot use break option with alternatives conditional");const a=this.clone(),i=t.when(a,s,c),u=i.is?[i]:i.switch;for(const g of u)if(g.then&&g.otherwise){a.$_setFlag("_endedSwitch",!0,{clone:!1});break}return a.$_terms.matches.push(i),a.$_mutateRebuild()}},match:{method(s){if(r(["any","one","all"].includes(s),"Invalid alternatives match mode",s),s!=="any")for(const c of this.$_terms.matches)r(c.schema,"Cannot combine match mode",s,"with conditional rules");return this.$_setFlag("match",s)}},try:{method(...s){r(s.length,"Missing alternative schemas"),h.verifyFlat(s,"try"),r(!this._flags._endedSwitch,"Unreachable condition");const c=this.clone();for(const a of s)c.$_terms.matches.push({schema:c.$_compile(a)});return c.$_mutateRebuild()}}},overrides:{label(s){return this.$_parent("label",s).$_modify({each:(c,a)=>a.path[0]!=="is"&&typeof c._flags.label!="string"?c.label(s):void 0,ref:!1})}},rebuild(s){s.$_modify({each:c=>{h.isSchema(c)&&c.type==="array"&&s.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(s,c){if(c.matches)for(const a of c.matches){const{schema:i,ref:u,is:g,not:y,then:k,otherwise:w}=a;s=i?s.try(i):u?s.conditional(u,{is:g,then:k,not:y,otherwise:w,switch:a.switch}):s.conditional(g,{then:k,otherwise:w})}return s}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),n.errors=function(s,{error:c,state:a}){if(!s.length)return{errors:c("alternatives.any")};if(s.length===1)return{errors:s[0].reports};const i=new Set,u=[];for(const{reports:g,schema:y}of s){if(g.length>1)return n.unmatched(s,c);const k=g[0];if(k instanceof l.Report==0)return n.unmatched(s,c);if(k.state.path.length!==a.path.length){u.push({type:y.type,report:k});continue}if(k.code==="any.only"){for(const x of k.local.valids)i.add(x);continue}const[w,d]=k.code.split(".");d!=="base"?u.push({type:y.type,report:k}):k.code==="object.base"?i.add(k.local.type):i.add(w)}return u.length?u.length===1?{errors:u[0].report}:n.unmatched(s,c):{errors:c("alternatives.types",{types:[...i]})}},n.unmatched=function(s,c){const a=[];for(const i of s)a.push(...i.reports);return{errors:c("alternatives.match",l.details(a,{override:!1}))}}},8068:(_,b,p)=>{const r=p(375),m=p(7629),f=p(8160),h=p(6914);_.exports=m.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,l){return r(typeof t=="function","Method must be a function"),r(l===void 0||l&&typeof l=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:t,description:l}})},validate(t,l,{method:o}){try{return o(t,l)}catch(n){return l.error("any.custom",{error:n})}},args:["method","description"],multi:!0},messages:{method(t){return this.prefs({messages:t})}},shared:{method(t){r(f.isSchema(t)&&t._flags.id,"Schema must be a schema with an id");const l=this.clone();return l.$_terms.shared=l.$_terms.shared||[],l.$_terms.shared.push(t),l.$_mutateRegister(t),l}},warning:{method(t,l){return r(t&&typeof t=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:t,local:l},warn:!0})},validate:(t,l,{code:o,local:n})=>l.error(o,n),args:["code","local"],multi:!0}},modifiers:{keep(t,l=!0){t.keep=l},message(t,l){t.message=h.compile(l)},warn(t,l=!0){t.warn=l}},manifest:{build(t,l){for(const o in l){const n=l[o];if(["examples","externals","metas","notes","tags"].includes(o))for(const s of n)t=t[o.slice(0,-1)](s);else if(o!=="alterations")if(o!=="whens"){if(o==="shared")for(const s of n)t=t.shared(s)}else for(const s of n){const{ref:c,is:a,not:i,then:u,otherwise:g,concat:y}=s;t=y?t.concat(y):c?t.when(c,{is:a,not:i,then:u,otherwise:g,switch:s.switch,break:s.break}):t.when(a,{then:u,otherwise:g,break:s.break})}else{const s={};for(const{target:c,adjuster:a}of n)s[c]=a;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:(_,b,p)=>{const r=p(375),m=p(9474),f=p(9621),h=p(8068),t=p(8160),l=p(3292),o={};_.exports=h.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(n,{schema:s,state:c,prefs:a}){if(!Array.isArray(n))return;const i=s.$_getRule("sort");return i?o.sort(s,n,i.args.options,c,a):void 0}},validate(n,{schema:s,error:c}){if(!Array.isArray(n)){if(s._flags.single){const a=[n];return a[t.symbols.arraySingle]=!0,{value:a}}return{errors:c("array.base")}}if(s.$_getRule("items")||s.$_terms.externals)return{value:n.slice()}},rules:{has:{method(n){n=this.$_compile(n,{appendPath:!0});const s=this.$_addRule({name:"has",args:{schema:n}});return s.$_mutateRegister(n),s},validate(n,{state:s,prefs:c,error:a},{schema:i}){const u=[n,...s.ancestors];for(let y=0;y<n.length;++y){const k=s.localize([...s.path,y],u,i);if(i.$_match(n[y],k,c))return n}const g=i._flags.label;return g?a("array.hasKnown",{patternLabel:g}):a("array.hasUnknown",null)},multi:!0},items:{method(...n){t.verifyFlat(n,"items");const s=this.$_addRule("items");for(let c=0;c<n.length;++c){const a=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});s.$_terms.items.push(a)}return s.$_mutateRebuild()},validate(n,{schema:s,error:c,state:a,prefs:i,errorsArray:u}){const g=s.$_terms._requireds.slice(),y=s.$_terms.ordered.slice(),k=[...s.$_terms._inclusions,...g],w=!n[t.symbols.arraySingle];delete n[t.symbols.arraySingle];const d=u();let x=n.length;for(let j=0;j<x;++j){const S=n[j];let O=!1,P=!1;const D=w?j:new Number(j),I=[...a.path,D];if(!s._flags.sparse&&S===void 0){if(d.push(c("array.sparse",{key:D,path:I,pos:j,value:void 0},a.localize(I))),i.abortEarly)return d;y.shift();continue}const H=[n,...a.ancestors];for(const F of s.$_terms._exclusions)if(F.$_match(S,a.localize(I,H,F),i,{presence:"ignore"})){if(d.push(c("array.excludes",{pos:j,value:S},a.localize(I))),i.abortEarly)return d;O=!0,y.shift();break}if(O)continue;if(s.$_terms.ordered.length){if(y.length){const F=y.shift(),U=F.$_validate(S,a.localize(I,H,F),i);if(U.errors){if(d.push(...U.errors),i.abortEarly)return d}else if(F._flags.result==="strip")o.fastSplice(n,j),--j,--x;else{if(!s._flags.sparse&&U.value===void 0){if(d.push(c("array.sparse",{key:D,path:I,pos:j,value:void 0},a.localize(I))),i.abortEarly)return d;continue}n[j]=U.value}continue}if(!s.$_terms.items.length){if(d.push(c("array.orderedLength",{pos:j,limit:s.$_terms.ordered.length})),i.abortEarly)return d;break}}const N=[];let M=g.length;for(let F=0;F<M;++F){const U=a.localize(I,H,g[F]);U.snapshot();const le=g[F].$_validate(S,U,i);if(N[F]=le,!le.errors){if(U.commit(),n[j]=le.value,P=!0,o.fastSplice(g,F),--F,--M,!s._flags.sparse&&le.value===void 0&&(d.push(c("array.sparse",{key:D,path:I,pos:j,value:void 0},a.localize(I))),i.abortEarly))return d;break}U.restore()}if(P)continue;const q=i.stripUnknown&&!!i.stripUnknown.arrays||!1;M=k.length;for(const F of k){let U;const le=g.indexOf(F);if(le!==-1)U=N[le];else{const me=a.localize(I,H,F);if(me.snapshot(),U=F.$_validate(S,me,i),!U.errors){me.commit(),F._flags.result==="strip"?(o.fastSplice(n,j),--j,--x):s._flags.sparse||U.value!==void 0?n[j]=U.value:(d.push(c("array.sparse",{key:D,path:I,pos:j,value:void 0},a.localize(I))),O=!0),P=!0;break}me.restore()}if(M===1){if(q){o.fastSplice(n,j),--j,--x,P=!0;break}if(d.push(...U.errors),i.abortEarly)return d;O=!0;break}}if(!O&&(s.$_terms._inclusions.length||s.$_terms._requireds.length)&&!P){if(q){o.fastSplice(n,j),--j,--x;continue}if(d.push(c("array.includes",{pos:j,value:S},a.localize(I))),i.abortEarly)return d}}return g.length&&o.fillMissedErrors(s,d,g,n,a,i),y.length&&(o.fillOrderedErrors(s,d,y,n,a,i),d.length||o.fillDefault(y,n,a,i)),d.length?d:n},priority:!0,manifest:!1},length:{method(n){return this.$_addRule({name:"length",args:{limit:n},operator:"="})},validate:(n,s,{limit:c},{name:a,operator:i,args:u})=>t.compare(n.length,c,i)?n:s.error("array."+a,{limit:u.limit,value:n}),args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"}]},max:{method(n){return this.$_addRule({name:"max",method:"length",args:{limit:n},operator:"<="})}},min:{method(n){return this.$_addRule({name:"min",method:"length",args:{limit:n},operator:">="})}},ordered:{method(...n){t.verifyFlat(n,"ordered");const s=this.$_addRule("items");for(let c=0;c<n.length;++c){const a=t.tryWithPath(()=>this.$_compile(n[c]),c,{append:!0});o.validateSingle(a,s),s.$_mutateRegister(a),s.$_terms.ordered.push(a)}return s.$_mutateRebuild()}},single:{method(n){const s=n===void 0||!!n;return r(!s||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",s)}},sort:{method(n={}){t.assertOptions(n,["by","order"]);const s={order:n.order||"ascending"};return n.by&&(s.by=l.ref(n.by,{ancestor:0}),r(!s.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:s}})},validate(n,{error:s,state:c,prefs:a,schema:i},{options:u}){const{value:g,errors:y}=o.sort(i,n,u,c,a);if(y)return y;for(let k=0;k<n.length;++k)if(n[k]!==g[k])return s("array.sort",{order:u.order,by:u.by?u.by.key:"value"});return n},convert:!0},sparse:{method(n){const s=n===void 0||!!n;return this._flags.sparse===s?this:(s?this.clone():this.$_addRule("items")).$_setFlag("sparse",s,{clone:!1})}},unique:{method(n,s={}){r(!n||typeof n=="function"||typeof n=="string","comparator must be a function or a string"),t.assertOptions(s,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:s,comparator:n}};if(n)if(typeof n=="string"){const a=t.default(s.separator,".");c.path=a?n.split(a):[n]}else c.comparator=n;return this.$_addRule(c)},validate(n,{state:s,error:c,schema:a},{comparator:i,options:u},{comparator:g,path:y}){const k={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),bigint:Object.create(null),object:new Map,function:new Map,custom:new Map},w=g||m,d=u.ignoreUndefined;for(let x=0;x<n.length;++x){const j=y?f(n[x],y):n[x],S=g?k.custom:k[typeof j];if(r(S,"Failed to find unique map container for type",typeof j),S instanceof Map){const O=S.entries();let P;for(;!(P=O.next()).done;)if(w(P.value[0],j)){const D=s.localize([...s.path,x],[n,...s.ancestors]),I={pos:x,value:n[x],dupePos:P.value[1],dupeValue:n[P.value[1]]};return y&&(I.path=i),c("array.unique",I,D)}S.set(j,x)}else{if((!d||j!==void 0)&&S[j]!==void 0){const O={pos:x,value:n[x],dupePos:S[j],dupeValue:n[S[j]]};return y&&(O.path=i),c("array.unique",O,s.localize([...s.path,x],[n,...s.ancestors]))}S[j]=x}}return n},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(n,s)=>new Set(n)}},rebuild(n){n.$_terms._inclusions=[],n.$_terms._exclusions=[],n.$_terms._requireds=[];for(const s of n.$_terms.items)o.validateSingle(s,n),s._flags.presence==="required"?n.$_terms._requireds.push(s):s._flags.presence==="forbidden"?n.$_terms._exclusions.push(s):n.$_terms._inclusions.push(s);for(const s of n.$_terms.ordered)o.validateSingle(s,n)},manifest:{build:(n,s)=>(s.items&&(n=n.items(...s.items)),s.ordered&&(n=n.ordered(...s.ordered)),n)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),o.fillMissedErrors=function(n,s,c,a,i,u){const g=[];let y=0;for(const k of c){const w=k._flags.label;w?g.push(w):++y}g.length?y?s.push(n.$_createError("array.includesRequiredBoth",a,{knownMisses:g,unknownMisses:y},i,u)):s.push(n.$_createError("array.includesRequiredKnowns",a,{knownMisses:g},i,u)):s.push(n.$_createError("array.includesRequiredUnknowns",a,{unknownMisses:y},i,u))},o.fillOrderedErrors=function(n,s,c,a,i,u){const g=[];for(const y of c)y._flags.presence==="required"&&g.push(y);g.length&&o.fillMissedErrors(n,s,g,a,i,u)},o.fillDefault=function(n,s,c,a){const i=[];let u=!0;for(let g=n.length-1;g>=0;--g){const y=n[g],k=[s,...c.ancestors],w=y.$_validate(void 0,c.localize(c.path,k,y),a).value;if(u){if(w===void 0)continue;u=!1}i.unshift(w)}i.length&&s.push(...i)},o.fastSplice=function(n,s){let c=s;for(;c<n.length;)n[c++]=n[c];--n.length},o.validateSingle=function(n,s){(n.type==="array"||n._flags._arrayItems)&&(r(!s._flags.single,"Cannot specify array item with single rule enabled"),s.$_setFlag("_arrayItems",!0,{clone:!1}))},o.sort=function(n,s,c,a,i){const u=c.order==="ascending"?1:-1,g=-1*u,y=u,k=(w,d)=>{let x=o.compare(w,d,g,y);if(x!==null||(c.by&&(w=c.by.resolve(w,a,i),d=c.by.resolve(d,a,i)),x=o.compare(w,d,g,y),x!==null))return x;const j=typeof w;if(j!==typeof d)throw n.$_createError("array.sort.mismatching",s,null,a,i);if(j!=="number"&&j!=="string")throw n.$_createError("array.sort.unsupported",s,{type:j},a,i);return j==="number"?(w-d)*u:w<d?g:y};try{return{value:s.slice().sort(k)}}catch(w){return{errors:w}}},o.compare=function(n,s,c,a){return n===s?0:n===void 0?1:s===void 0?-1:n===null?a:s===null?c:null}},4937:(_,b,p)=>{const r=p(375),m=p(8068),f=p(8160),h=p(2036),t={isBool:function(l){return typeof l=="boolean"}};_.exports=m.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(l,{schema:o}){if(typeof l!="boolean"){if(typeof l=="string"){const n=o._flags.sensitive?l:l.toLowerCase();l=n==="true"||n!=="false"&&l}return typeof l!="boolean"&&(l=o.$_terms.truthy&&o.$_terms.truthy.has(l,null,null,!o._flags.sensitive)||(!o.$_terms.falsy||!o.$_terms.falsy.has(l,null,null,!o._flags.sensitive))&&l),{value:l}}},validate(l,{error:o}){if(typeof l!="boolean")return{value:l,errors:o("boolean.base")}},rules:{truthy:{method(...l){f.verifyFlat(l,"truthy");const o=this.clone();o.$_terms.truthy=o.$_terms.truthy||new h;for(let n=0;n<l.length;++n){const s=l[n];r(s!==void 0,"Cannot call truthy with undefined"),o.$_terms.truthy.add(s)}return o}},falsy:{method(...l){f.verifyFlat(l,"falsy");const o=this.clone();o.$_terms.falsy=o.$_terms.falsy||new h;for(let n=0;n<l.length;++n){const s=l[n];r(s!==void 0,"Cannot call falsy with undefined"),o.$_terms.falsy.add(s)}return o}},sensitive:{method(l=!0){return this.$_setFlag("sensitive",l)}}},cast:{number:{from:t.isBool,to:(l,o)=>l?1:0},string:{from:t.isBool,to:(l,o)=>l?"true":"false"}},manifest:{build:(l,o)=>(o.truthy&&(l=l.truthy(...o.truthy)),o.falsy&&(l=l.falsy(...o.falsy)),l)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(_,b,p)=>{const r=p(375),m=p(8068),f=p(8160),h=p(3328),t={isDate:function(l){return l instanceof Date}};_.exports=m.extend({type:"date",coerce:{from:["number","string"],method:(l,{schema:o})=>({value:t.parse(l,o._flags.format)||l})},validate(l,{schema:o,error:n,prefs:s}){if(l instanceof Date&&!isNaN(l.getTime()))return;const c=o._flags.format;return s.convert&&c&&typeof l=="string"?{value:l,errors:n("date.format",{format:c})}:{value:l,errors:n("date.base")}},rules:{compare:{method:!1,validate(l,o,{date:n},{name:s,operator:c,args:a}){const i=n==="now"?Date.now():n.getTime();return f.compare(l.getTime(),i,c)?l:o.error("date."+s,{limit:a.date,value:l})},args:[{name:"date",ref:!0,normalize:l=>l==="now"?l:t.parse(l),assert:l=>l!==null,message:"must have a valid date format"}]},format:{method(l){return r(["iso","javascript","unix"].includes(l),"Unknown date format",l),this.$_setFlag("format",l)}},greater:{method(l){return this.$_addRule({name:"greater",method:"compare",args:{date:l},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(l){return this.$_addRule({name:"less",method:"compare",args:{date:l},operator:"<"})}},max:{method(l){return this.$_addRule({name:"max",method:"compare",args:{date:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"compare",args:{date:l},operator:">="})}},timestamp:{method(l="javascript"){return r(["javascript","unix"].includes(l),'"type" must be one of "javascript, unix"'),this.format(l)}}},cast:{number:{from:t.isDate,to:(l,o)=>l.getTime()},string:{from:t.isDate,to:(l,{prefs:o})=>h.date(l,o)}},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(l,o){if(l instanceof Date)return l;if(typeof l!="string"&&(isNaN(l)||!isFinite(l))||/^\s*$/.test(l))return null;if(o==="iso")return f.isIsoDate(l)?t.date(l.toString()):null;const n=l;if(typeof l=="string"&&/^[+-]?\d+(\.\d+)?$/.test(l)&&(l=parseFloat(l)),o){if(o==="javascript")return t.date(1*l);if(o==="unix")return t.date(1e3*l);if(typeof n=="string")return null}return t.date(l)},t.date=function(l){const o=new Date(l);return isNaN(o.getTime())?null:o}},390:(_,b,p)=>{const r=p(375),m=p(7824);_.exports=m.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(f){return r(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:f}})},validate:(f,h,{n:t})=>f.length===t?f:h.error("function.arity",{n:t})},class:{method(){return this.$_addRule("class")},validate:(f,h)=>/^\s*class\s/.test(f.toString())?f:h.error("function.class",{value:f})},minArity:{method(f){return r(Number.isSafeInteger(f)&&f>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:f}})},validate:(f,h,{n:t})=>f.length>=t?f:h.error("function.minArity",{n:t})},maxArity:{method(f){return r(Number.isSafeInteger(f)&&f>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:f}})},validate:(f,h,{n:t})=>f.length<=t?f:h.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:(_,b,p)=>{const r=p(978),m=p(375),f=p(8571),h=p(3652),t=p(8068),l=p(8160),o=p(3292),n=p(6354),s=p(6133),c=p(3328),a={renameDefaults:{alias:!1,multiple:!1,override:!1}};_.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:(i,u)=>i.keys(u),validate(i,{schema:u,error:g,state:y,prefs:k}){if(!i||typeof i!==u.$_property("typeof")||Array.isArray(i))return{value:i,errors:g("object.base",{type:u.$_property("typeof")})};if(!(u.$_terms.renames||u.$_terms.dependencies||u.$_terms.keys||u.$_terms.patterns||u.$_terms.externals))return;i=a.clone(i,k);const w=[];if(u.$_terms.renames&&!a.rename(u,i,y,k,w))return{value:i,errors:w};if(!u.$_terms.keys&&!u.$_terms.patterns&&!u.$_terms.dependencies)return{value:i,errors:w};const d=new Set(Object.keys(i));if(u.$_terms.keys){const x=[i,...y.ancestors];for(const j of u.$_terms.keys){const S=j.key,O=i[S];d.delete(S);const P=y.localize([...y.path,S],x,j),D=j.schema.$_validate(O,P,k);if(D.errors){if(k.abortEarly)return{value:i,errors:D.errors};D.value!==void 0&&(i[S]=D.value),w.push(...D.errors)}else j.schema._flags.result==="strip"||D.value===void 0&&O!==void 0?delete i[S]:D.value!==void 0&&(i[S]=D.value)}}if(d.size||u._flags._hasPatternMatch){const x=a.unknown(u,i,d,w,y,k);if(x)return x}if(u.$_terms.dependencies)for(const x of u.$_terms.dependencies){if(x.key!==null&&a.isPresent(x.options)(x.key.resolve(i,y,k,null,{shadow:!1}))===!1)continue;const j=a.dependencies[x.rel](u,x,i,y,k);if(j){const S=u.$_createError(j.code,i,j.context,y,k);if(k.abortEarly)return{value:i,errors:S};w.push(S)}}return{value:i,errors:w}},rules:{and:{method(...i){return l.verifyFlat(i,"and"),a.dependency(this,"and",null,i)}},append:{method(i){return i==null||Object.keys(i).length===0?this:this.keys(i)}},assert:{method(i,u,g){c.isTemplate(i)||(i=o.ref(i)),m(g===void 0||typeof g=="string","Message must be a string"),u=this.$_compile(u,{appendPath:!0});const y=this.$_addRule({name:"assert",args:{subject:i,schema:u,message:g}});return y.$_mutateRegister(i),y.$_mutateRegister(u),y},validate(i,{error:u,prefs:g,state:y},{subject:k,schema:w,message:d}){const x=k.resolve(i,y,g),j=s.isRef(k)?k.absolute(y):[];return w.$_match(x,y.localize(j,[i,...y.ancestors],w),g)?i:u("object.assert",{subject:k,message:d})},args:["subject","schema","message"],multi:!0},instance:{method(i,u){return m(typeof i=="function","constructor must be a function"),u=u||i.name,this.$_addRule({name:"instance",args:{constructor:i,name:u}})},validate:(i,u,{constructor:g,name:y})=>i instanceof g?i:u.error("object.instance",{type:y,value:i}),args:["constructor","name"]},keys:{method(i){m(i===void 0||typeof i=="object","Object schema must be a valid object"),m(!l.isSchema(i),"Object schema cannot be a joi schema");const u=this.clone();if(i)if(Object.keys(i).length){u.$_terms.keys=u.$_terms.keys?u.$_terms.keys.filter(g=>!i.hasOwnProperty(g.key)):new a.Keys;for(const g in i)l.tryWithPath(()=>u.$_terms.keys.push({key:g,schema:this.$_compile(i[g])}),g)}else u.$_terms.keys=new a.Keys;else u.$_terms.keys=null;return u.$_mutateRebuild()}},length:{method(i){return this.$_addRule({name:"length",args:{limit:i},operator:"="})},validate:(i,u,{limit:g},{name:y,operator:k,args:w})=>l.compare(Object.keys(i).length,g,k)?i:u.error("object."+y,{limit:w.limit,value:i}),args:[{name:"limit",ref:!0,assert:l.limit,message:"must be a positive integer"}]},max:{method(i){return this.$_addRule({name:"max",method:"length",args:{limit:i},operator:"<="})}},min:{method(i){return this.$_addRule({name:"min",method:"length",args:{limit:i},operator:">="})}},nand:{method(...i){return l.verifyFlat(i,"nand"),a.dependency(this,"nand",null,i)}},or:{method(...i){return l.verifyFlat(i,"or"),a.dependency(this,"or",null,i)}},oxor:{method(...i){return a.dependency(this,"oxor",null,i)}},pattern:{method(i,u,g={}){const y=i instanceof RegExp;y||(i=this.$_compile(i,{appendPath:!0})),m(u!==void 0,"Invalid rule"),l.assertOptions(g,["fallthrough","matches"]),y&&m(!i.flags.includes("g")&&!i.flags.includes("y"),"pattern should not use global or sticky mode"),u=this.$_compile(u,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const w={[y?"regex":"schema"]:i,rule:u};return g.matches&&(w.matches=this.$_compile(g.matches),w.matches.type!=="array"&&(w.matches=w.matches.$_root.array().items(w.matches)),k.$_mutateRegister(w.matches),k.$_setFlag("_hasPatternMatch",!0,{clone:!1})),g.fallthrough&&(w.fallthrough=!0),k.$_terms.patterns.push(w),k.$_mutateRegister(u),k}},ref:{method(){return this.$_addRule("ref")},validate:(i,u)=>s.isRef(i)?i:u.error("object.refType",{value:i})},regex:{method(){return this.$_addRule("regex")},validate:(i,u)=>i instanceof RegExp?i:u.error("object.regex",{value:i})},rename:{method(i,u,g={}){m(typeof i=="string"||i instanceof RegExp,"Rename missing the from argument"),m(typeof u=="string"||u instanceof c,"Invalid rename to argument"),m(u!==i,"Cannot rename key to same name:",i),l.assertOptions(g,["alias","ignoreUndefined","override","multiple"]);const y=this.clone();y.$_terms.renames=y.$_terms.renames||[];for(const k of y.$_terms.renames)m(k.from!==i,"Cannot rename the same key multiple times");return u instanceof c&&y.$_mutateRegister(u),y.$_terms.renames.push({from:i,to:u,options:r(a.renameDefaults,g)}),y}},schema:{method(i="any"){return this.$_addRule({name:"schema",args:{type:i}})},validate:(i,u,{type:g})=>!l.isSchema(i)||g!=="any"&&i.type!==g?u.error("object.schema",{type:g}):i},unknown:{method(i){return this.$_setFlag("unknown",i!==!1)}},with:{method(i,u,g={}){return a.dependency(this,"with",i,u,g)}},without:{method(i,u,g={}){return a.dependency(this,"without",i,u,g)}},xor:{method(...i){return l.verifyFlat(i,"xor"),a.dependency(this,"xor",null,i)}}},overrides:{default(i,u){return i===void 0&&(i=l.symbols.deepDefault),this.$_parent("default",i,u)}},rebuild(i){if(i.$_terms.keys){const u=new h.Sorter;for(const g of i.$_terms.keys)l.tryWithPath(()=>u.add(g,{after:g.schema.$_rootReferences(),group:g.key}),g.key);i.$_terms.keys=new a.Keys(...u.nodes)}},manifest:{build(i,u){if(u.keys&&(i=i.keys(u.keys)),u.dependencies)for(const{rel:g,key:y=null,peers:k,options:w}of u.dependencies)i=a.dependency(i,g,y,k,w);if(u.patterns)for(const{regex:g,schema:y,rule:k,fallthrough:w,matches:d}of u.patterns)i=i.pattern(g||y,k,{fallthrough:w,matches:d});if(u.renames)for(const{from:g,to:y,options:k}of u.renames)i=i.rename(g,y,k);return i}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),a.clone=function(i,u){if(typeof i=="object"){if(u.nonEnumerables)return f(i,{shallow:!0});const y=Object.create(Object.getPrototypeOf(i));return Object.assign(y,i),y}const g=function(...y){return i.apply(this,y)};return g.prototype=f(i.prototype),Object.defineProperty(g,"name",{value:i.name,writable:!1}),Object.defineProperty(g,"length",{value:i.length,writable:!1}),Object.assign(g,i),g},a.dependency=function(i,u,g,y,k){m(g===null||typeof g=="string",u,"key must be a strings"),k||(k=y.length>1&&typeof y[y.length-1]=="object"?y.pop():{}),l.assertOptions(k,["separator","isPresent"]),y=[].concat(y);const w=l.default(k.separator,"."),d=[];for(const j of y)m(typeof j=="string",u,"peers must be strings"),d.push(o.ref(j,{separator:w,ancestor:0,prefix:!1}));g!==null&&(g=o.ref(g,{separator:w,ancestor:0,prefix:!1}));const x=i.clone();return x.$_terms.dependencies=x.$_terms.dependencies||[],x.$_terms.dependencies.push(new a.Dependency(u,g,d,y,k)),x},a.dependencies={and(i,u,g,y,k){const w=[],d=[],x=u.peers.length,j=a.isPresent(u.options);for(const S of u.peers)j(S.resolve(g,y,k,null,{shadow:!1}))===!1?w.push(S.key):d.push(S.key);if(w.length!==x&&d.length!==x)return{code:"object.and",context:{present:d,presentWithLabels:a.keysToLabels(i,d),missing:w,missingWithLabels:a.keysToLabels(i,w)}}},nand(i,u,g,y,k){const w=[],d=a.isPresent(u.options);for(const S of u.peers)d(S.resolve(g,y,k,null,{shadow:!1}))&&w.push(S.key);if(w.length!==u.peers.length)return;const x=u.paths[0],j=u.paths.slice(1);return{code:"object.nand",context:{main:x,mainWithLabel:a.keysToLabels(i,x),peers:j,peersWithLabels:a.keysToLabels(i,j)}}},or(i,u,g,y,k){const w=a.isPresent(u.options);for(const d of u.peers)if(w(d.resolve(g,y,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:u.paths,peersWithLabels:a.keysToLabels(i,u.paths)}}},oxor(i,u,g,y,k){const w=[],d=a.isPresent(u.options);for(const j of u.peers)d(j.resolve(g,y,k,null,{shadow:!1}))&&w.push(j.key);if(!w.length||w.length===1)return;const x={peers:u.paths,peersWithLabels:a.keysToLabels(i,u.paths)};return x.present=w,x.presentWithLabels=a.keysToLabels(i,w),{code:"object.oxor",context:x}},with(i,u,g,y,k){const w=a.isPresent(u.options);for(const d of u.peers)if(w(d.resolve(g,y,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:u.key.key,mainWithLabel:a.keysToLabels(i,u.key.key),peer:d.key,peerWithLabel:a.keysToLabels(i,d.key)}}},without(i,u,g,y,k){const w=a.isPresent(u.options);for(const d of u.peers)if(w(d.resolve(g,y,k,null,{shadow:!1})))return{code:"object.without",context:{main:u.key.key,mainWithLabel:a.keysToLabels(i,u.key.key),peer:d.key,peerWithLabel:a.keysToLabels(i,d.key)}}},xor(i,u,g,y,k){const w=[],d=a.isPresent(u.options);for(const j of u.peers)d(j.resolve(g,y,k,null,{shadow:!1}))&&w.push(j.key);if(w.length===1)return;const x={peers:u.paths,peersWithLabels:a.keysToLabels(i,u.paths)};return w.length===0?{code:"object.missing",context:x}:(x.present=w,x.presentWithLabels=a.keysToLabels(i,w),{code:"object.xor",context:x})}},a.keysToLabels=function(i,u){return Array.isArray(u)?u.map(g=>i.$_mapLabels(g)):i.$_mapLabels(u)},a.isPresent=function(i){return typeof i.isPresent=="function"?i.isPresent:u=>u!==void 0},a.rename=function(i,u,g,y,k){const w={};for(const d of i.$_terms.renames){const x=[],j=typeof d.from!="string";if(j)for(const S in u){if(u[S]===void 0&&d.options.ignoreUndefined||S===d.to)continue;const O=d.from.exec(S);O&&x.push({from:S,to:d.to,match:O})}else!Object.prototype.hasOwnProperty.call(u,d.from)||u[d.from]===void 0&&d.options.ignoreUndefined||x.push(d);for(const S of x){const O=S.from;let P=S.to;if(P instanceof c&&(P=P.render(u,g,y,S.match)),O!==P){if(!d.options.multiple&&w[P]&&(k.push(i.$_createError("object.rename.multiple",u,{from:O,to:P,pattern:j},g,y)),y.abortEarly)||Object.prototype.hasOwnProperty.call(u,P)&&!d.options.override&&!w[P]&&(k.push(i.$_createError("object.rename.override",u,{from:O,to:P,pattern:j},g,y)),y.abortEarly))return!1;u[O]===void 0?delete u[P]:u[P]=u[O],w[P]=!0,d.options.alias||delete u[O]}}}return!0},a.unknown=function(i,u,g,y,k,w){if(i.$_terms.patterns){let d=!1;const x=i.$_terms.patterns.map(S=>{if(S.matches)return d=!0,[]}),j=[u,...k.ancestors];for(const S of g){const O=u[S],P=[...k.path,S];for(let D=0;D<i.$_terms.patterns.length;++D){const I=i.$_terms.patterns[D];if(I.regex){const M=I.regex.test(S);if(k.mainstay.tracer.debug(k,"rule",`pattern.${D}`,M?"pass":"error"),!M)continue}else if(!I.schema.$_match(S,k.nest(I.schema,`pattern.${D}`),w))continue;g.delete(S);const H=k.localize(P,j,{schema:I.rule,key:S}),N=I.rule.$_validate(O,H,w);if(N.errors){if(w.abortEarly)return{value:u,errors:N.errors};y.push(...N.errors)}if(I.matches&&x[D].push(S),u[S]=N.value,!I.fallthrough)break}}if(d)for(let S=0;S<x.length;++S){const O=x[S];if(!O)continue;const P=i.$_terms.patterns[S].matches,D=k.localize(k.path,j,P),I=P.$_validate(O,D,w);if(I.errors){const H=n.details(I.errors,{override:!1});H.matches=O;const N=i.$_createError("object.pattern.match",u,H,k,w);if(w.abortEarly)return{value:u,errors:N};y.push(N)}}}if(g.size&&(i.$_terms.keys||i.$_terms.patterns)){if(w.stripUnknown&&i._flags.unknown===void 0||w.skipFunctions){const d=!(!w.stripUnknown||w.stripUnknown!==!0&&!w.stripUnknown.objects);for(const x of g)d?(delete u[x],g.delete(x)):typeof u[x]=="function"&&g.delete(x)}if(!l.default(i._flags.unknown,w.allowUnknown))for(const d of g){const x=k.localize([...k.path,d],[]),j=i.$_createError("object.unknown",u[d],{child:d},x,w,{flags:!1});if(w.abortEarly)return{value:u,errors:j};y.push(j)}}},a.Dependency=class{constructor(i,u,g,y,k){this.rel=i,this.key=u,this.peers=g,this.paths=y,this.options=k}describe(){const i={rel:this.rel,peers:this.paths};return this.key!==null&&(i.key=this.key.key),this.peers[0].separator!=="."&&(i.options={...i.options,separator:this.peers[0].separator}),this.options.isPresent&&(i.options={...i.options,isPresent:this.options.isPresent}),i}},a.Keys=class extends Array{concat(i){const u=this.slice(),g=new Map;for(let y=0;y<u.length;++y)g.set(u[y].key,y);for(const y of i){const k=y.key,w=g.get(k);w!==void 0?u[w]={key:k,schema:u[w].schema.concat(y.schema)}:u.push(y)}return u}}},8785:(_,b,p)=>{const r=p(375),m=p(8068),f=p(8160),h=p(3292),t=p(6354),l={};_.exports=m.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(o,n)=>o.ref(n),validate(o,{schema:n,state:s,prefs:c}){r(n.$_terms.link,"Uninitialized link schema");const a=l.generate(n,o,s,c),i=n.$_terms.link[0].ref;return a.$_validate(o,s.nest(a,`link:${i.display}:${a.type}`),c)},generate:(o,n,s,c)=>l.generate(o,n,s,c),rules:{ref:{method(o){r(!this.$_terms.link,"Cannot reinitialize schema"),o=h.ref(o),r(o.type==="value"||o.type==="local","Invalid reference type:",o.type),r(o.type==="local"||o.ancestor==="root"||o.ancestor>0,"Link cannot reference itself");const n=this.clone();return n.$_terms.link=[{ref:o}],n}},relative:{method(o=!0){return this.$_setFlag("relative",o)}}},overrides:{concat(o){r(this.$_terms.link,"Uninitialized link schema"),r(f.isSchema(o),"Invalid schema object"),r(o.type!=="link","Cannot merge type link with another link");const n=this.clone();return n.$_terms.whens||(n.$_terms.whens=[]),n.$_terms.whens.push({concat:o}),n.$_mutateRebuild()}},manifest:{build:(o,n)=>(r(n.link,"Invalid link description missing link"),o.ref(n.link))}}),l.generate=function(o,n,s,c){let a=s.mainstay.links.get(o);if(a)return a._generate(n,s,c).schema;const i=o.$_terms.link[0].ref,{perspective:u,path:g}=l.perspective(i,s);l.assert(u,"which is outside of schema boundaries",i,o,s,c);try{a=g.length?u.$_reach(g):u}catch{l.assert(!1,"to non-existing schema",i,o,s,c)}return l.assert(a.type!=="link","which is another link",i,o,s,c),o._flags.relative||s.mainstay.links.set(o,a),a._generate(n,s,c).schema},l.perspective=function(o,n){if(o.type==="local"){for(const{schema:s,key:c}of n.schemas){if((s._flags.id||c)===o.path[0])return{perspective:s,path:o.path.slice(1)};if(s.$_terms.shared){for(const a of s.$_terms.shared)if(a._flags.id===o.path[0])return{perspective:a,path:o.path.slice(1)}}}return{perspective:null,path:null}}return o.ancestor==="root"?{perspective:n.schemas[n.schemas.length-1].schema,path:o.path}:{perspective:n.schemas[o.ancestor]&&n.schemas[o.ancestor].schema,path:o.path}},l.assert=function(o,n,s,c,a,i){o||r(!1,`"${t.label(c._flags,a,i)}" contains link reference "${s.display}" ${n}`)}},3832:(_,b,p)=>{const r=p(375),m=p(8068),f=p(8160),h={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(t){const l=t.toString(),o=l.indexOf("."),n=l.indexOf("e");return(o<0?0:(n<0?l.length:n)-o-1)+(n<0?0:Math.max(0,-parseInt(l.slice(n+1))))}};_.exports=m.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(t,{schema:l,error:o}){if(!t.match(h.numberRx))return;t=t.trim();const n={value:parseFloat(t)};if(n.value===0&&(n.value=0),!l._flags.unsafe)if(t.match(/e/i)){if(h.extractSignificantDigits(t)!==h.extractSignificantDigits(String(n.value)))return n.errors=o("number.unsafe"),n}else{const s=n.value.toString();if(s.match(/e/i))return n;if(s!==h.normalizeDecimal(t))return n.errors=o("number.unsafe"),n}return n}},validate(t,{schema:l,error:o,prefs:n}){if(t===1/0||t===-1/0)return{value:t,errors:o("number.infinity")};if(!f.isNumber(t))return{value:t,errors:o("number.base")};const s={value:t};if(n.convert){const c=l.$_getRule("precision");if(c){const a=Math.pow(10,c.args.limit);s.value=Math.round(s.value*a)/a}}return s.value===0&&(s.value=0),!l._flags.unsafe&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER)&&(s.errors=o("number.unsafe")),s},rules:{compare:{method:!1,validate:(t,l,{limit:o},{name:n,operator:s,args:c})=>f.compare(t,o,s)?t:l.error("number."+n,{limit:c.limit,value:t}),args:[{name:"limit",ref:!0,assert:f.isNumber,message:"must be a number"}]},greater:{method(t){return this.$_addRule({name:"greater",method:"compare",args:{limit:t},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(t,l)=>Math.trunc(t)-t==0?t:l.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 l=typeof t=="number"?h.decimalPlaces(t):null,o=Math.pow(10,l);return this.$_addRule({name:"multiple",args:{base:t,baseDecimalPlace:l,pfactor:o}})},validate:(t,l,{base:o,baseDecimalPlace:n,pfactor:s},c)=>h.decimalPlaces(t)>n?l.error("number.multiple",{multiple:c.args.base,value:t}):Math.round(s*t)%Math.round(s*o)==0?t:l.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,l)=>Number.isSafeInteger(t)&&t>=0&&t<=65535?t:l.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(t){return r(Number.isSafeInteger(t),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:t}})},validate(t,l,{limit:o}){const n=t.toString().match(h.precisionRx);return Math.max((n[1]?n[1].length:0)-(n[2]?parseInt(n[2],10):0),0)<=o?t:l.error("number.precision",{limit:o,value:t})},convert:!0},sign:{method(t){return r(["negative","positive"].includes(t),"Invalid sign",t),this.$_addRule({name:"sign",args:{sign:t}})},validate:(t,l,{sign:o})=>o==="negative"&&t<0||o==="positive"&&t>0?t:l.error(`number.${o}`)},unsafe:{method(t=!0){return r(typeof t=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",t)}}},cast:{string:{from:t=>typeof t=="number",to:(t,l)=>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"}}),h.extractSignificantDigits=function(t){return t.replace(h.exponentialPartRegex,"").replace(h.dotRegex,"").replace(h.trailingZerosRegex,"").replace(h.leadingSignAndZerosRegex,"")},h.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:(_,b,p)=>{const r=p(7824);_.exports=r.extend({type:"object",cast:{map:{from:m=>m&&typeof m=="object",to:(m,f)=>new Map(Object.entries(m))}}})},7417:(_,b,p)=>{const r=p(375),m=p(5380),f=p(1745),h=p(9959),t=p(6064),l=p(9926),o=p(5752),n=p(8068),s=p(8160),c={tlds:l instanceof Set&&{tlds:{allow:l,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:h.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"]};_.exports=n.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(a,{schema:i,state:u,prefs:g}){const y=i.$_getRule("normalize");y&&(a=a.normalize(y.args.form));const k=i.$_getRule("case");k&&(a=k.args.direction==="upper"?a.toLocaleUpperCase():a.toLocaleLowerCase());const w=i.$_getRule("trim");if(w&&w.args.enabled&&(a=a.trim()),i.$_terms.replacements)for(const x of i.$_terms.replacements)a=a.replace(x.pattern,x.replacement);const d=i.$_getRule("hex");if(d&&d.args.options.byteAligned&&a.length%2!=0&&(a=`0${a}`),i.$_getRule("isoDate")){const x=c.isoDate(a);x&&(a=x)}if(i._flags.truncate){const x=i.$_getRule("max");if(x){let j=x.args.limit;if(s.isResolvable(j)&&(j=j.resolve(a,u,g),!s.limit(j)))return{value:a,errors:i.$_createError("any.ref",j,{ref:x.args.limit,arg:"limit",reason:"must be a positive integer"},u,g)};a=a.slice(0,j)}}return{value:a}}},validate(a,{schema:i,error:u}){if(typeof a!="string")return{value:a,errors:u("string.base")};if(a===""){const g=i.$_getRule("min");return g&&g.args.limit===0?void 0:{value:a,errors:u("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(a,i)=>/^[a-zA-Z0-9]+$/.test(a)?a:i.error("string.alphanum")},base64:{method(a={}){return s.assertOptions(a,["paddingRequired","urlSafe"]),a={urlSafe:!1,paddingRequired:!0,...a},r(typeof a.paddingRequired=="boolean","paddingRequired must be boolean"),r(typeof a.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:a}})},validate:(a,i,{options:u})=>c.base64Regex[u.paddingRequired][u.urlSafe].test(a)?a:i.error("string.base64")},case:{method(a){return r(["lower","upper"].includes(a),"Invalid case:",a),this.$_addRule({name:"case",args:{direction:a}})},validate:(a,i,{direction:u})=>u==="lower"&&a===a.toLocaleLowerCase()||u==="upper"&&a===a.toLocaleUpperCase()?a:i.error(`string.${u}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(a,i){let u=a.length,g=0,y=1;for(;u--;){const k=a.charAt(u)*y;g+=k-9*(k>9),y^=3}return g>0&&g%10==0?a:i.error("string.creditCard")}},dataUri:{method(a={}){return s.assertOptions(a,["paddingRequired"]),a={paddingRequired:!0,...a},r(typeof a.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:a}})},validate(a,i,{options:u}){const g=a.match(c.dataUriRegex);return g&&(!g[2]||g[2]!=="base64"||c.base64Regex[u.paddingRequired].false.test(g[3]))?a:i.error("string.dataUri")}},domain:{method(a){a&&s.assertOptions(a,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const i=c.addressOptions(a);return this.$_addRule({name:"domain",args:{options:a},address:i})},validate:(a,i,u,{address:g})=>m.isValid(a,g)?a:i.error("string.domain")},email:{method(a={}){s.assertOptions(a,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),r(a.multiple===void 0||typeof a.multiple=="boolean","multiple option must be an boolean");const i=c.addressOptions(a),u=new RegExp(`\\s*[${a.separator?t(a.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:a},regex:u,address:i})},validate(a,i,{options:u},{regex:g,address:y}){const k=u.multiple?a.split(g):[a],w=[];for(const d of k)f.isValid(d,y)||w.push(d);return w.length?i.error("string.email",{value:a,invalids:w}):a}},guid:{alias:"uuid",method(a={}){s.assertOptions(a,["version","separator"]);let i="";if(a.version){const y=[].concat(a.version);r(y.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let w=0;w<y.length;++w){const d=y[w];r(typeof d=="string","version at position "+w+" must be a string");const x=c.guidVersions[d.toLowerCase()];r(x,"version at position "+w+" must be one of "+Object.keys(c.guidVersions).join(", ")),r(!k.has(x),"version at position "+w+" must not be a duplicate"),i+=x,k.add(x)}}r(c.guidSeparators.has(a.separator),'separator must be one of true, false, "-", or ":"');const u=a.separator===void 0?"[:-]?":a.separator===!0?"[:-]":a.separator===!1?"[]?":`\\${a.separator}`,g=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${u})[0-9A-F]{4}\\2?[${i||"0-9A-F"}][0-9A-F]{3}\\2?[${i?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:a},regex:g})},validate(a,i,u,{regex:g}){const y=g.exec(a);return y?c.guidBrackets[y[1]]!==y[y.length-1]?i.error("string.guid"):a:i.error("string.guid")}},hex:{method(a={}){return s.assertOptions(a,["byteAligned","prefix"]),a={byteAligned:!1,prefix:!1,...a},r(typeof a.byteAligned=="boolean","byteAligned must be boolean"),r(typeof a.prefix=="boolean"||a.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:a}})},validate:(a,i,{options:u})=>(u.prefix==="optional"?c.hexRegex.withOptionalPrefix:u.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(a)?u.byteAligned&&a.length%2!=0?i.error("string.hexAlign"):a:i.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(a,i)=>m.isValid(a,{minDomainSegments:1})||c.ipRegex.test(a)?a:i.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(a={}){s.assertOptions(a,["cidr","version"]);const{cidr:i,versions:u,regex:g}=h.regex(a),y=a.version?u:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:i,version:y}},regex:g})},validate:(a,i,{options:u},{regex:g})=>g.test(a)?a:u.version?i.error("string.ipVersion",{value:a,cidr:u.cidr,version:u.version}):i.error("string.ip",{value:a,cidr:u.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(a,{error:i})=>c.isoDate(a)?a:i("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(a,i)=>c.isoDurationRegex.test(a)?a:i.error("string.isoDuration")},length:{method(a,i){return c.length(this,"length",a,"=",i)},validate(a,i,{limit:u,encoding:g},{name:y,operator:k,args:w}){const d=!g&&a.length;return s.compare(d,u,k)?a:i.error("string."+y,{limit:w.limit,value:a,encoding:g})},args:[{name:"limit",ref:!0,assert:s.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(a,i){return c.length(this,"max",a,"<=",i)},args:["limit","encoding"]},min:{method(a,i){return c.length(this,"min",a,">=",i)},args:["limit","encoding"]},normalize:{method(a="NFC"){return r(c.normalizationForms.includes(a),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:a}})},validate:(a,{error:i},{form:u})=>a===a.normalize(u)?a:i("string.normalize",{value:a,form:u}),convert:!0},pattern:{alias:"regex",method(a,i={}){r(a instanceof RegExp,"regex must be a RegExp"),r(!a.flags.includes("g")&&!a.flags.includes("y"),"regex should not use global or sticky mode"),typeof i=="string"&&(i={name:i}),s.assertOptions(i,["invert","name"]);const u=["string.pattern",i.invert?".invert":"",i.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:a,options:i},errorCode:u})},validate:(a,i,{regex:u,options:g},{errorCode:y})=>u.test(a)^g.invert?a:i.error(y,{name:g.name,regex:u,value:a}),args:["regex","options"],multi:!0},replace:{method(a,i){typeof a=="string"&&(a=new RegExp(t(a),"g")),r(a instanceof RegExp,"pattern must be a RegExp"),r(typeof i=="string","replacement must be a String");const u=this.clone();return u.$_terms.replacements||(u.$_terms.replacements=[]),u.$_terms.replacements.push({pattern:a,replacement:i}),u}},token:{method(){return this.$_addRule("token")},validate:(a,i)=>/^\w+$/.test(a)?a:i.error("string.token")},trim:{method(a=!0){return r(typeof a=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:a}})},validate:(a,i,{enabled:u})=>u&&a!==a.trim()?i.error("string.trim"):a,convert:!0},truncate:{method(a=!0){return r(typeof a=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",a)}},uppercase:{method(){return this.case("upper")}},uri:{method(a={}){s.assertOptions(a,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme","encodeUri"]),a.domain&&s.assertOptions(a.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:i,scheme:u}=o.regex(a),g=a.domain?c.addressOptions(a.domain):null;return this.$_addRule({name:"uri",args:{options:a},regex:i,domain:g,scheme:u})},validate(a,i,{options:u},{regex:g,domain:y,scheme:k}){if(["http:/","https:/"].includes(a))return i.error("string.uri");let w=g.exec(a);if(!w&&i.prefs.convert&&u.encodeUri){const d=encodeURI(a);w=g.exec(d),w&&(a=d)}if(w){const d=w[1]||w[2];return!y||u.allowRelative&&!d||m.isValid(d,y)?a:i.error("string.domain",{value:d})}return u.relativeOnly?i.error("string.uriRelativeOnly"):u.scheme?i.error("string.uriCustomScheme",{scheme:k,value:a}):i.error("string.uri")}}},manifest:{build(a,i){if(i.replacements)for(const{pattern:u,replacement:g}of i.replacements)a=a.replace(u,g);return a}},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(a){if(!a)return c.tlds||a;if(r(a.minDomainSegments===void 0||Number.isSafeInteger(a.minDomainSegments)&&a.minDomainSegments>0,"minDomainSegments must be a positive integer"),r(a.maxDomainSegments===void 0||Number.isSafeInteger(a.maxDomainSegments)&&a.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),a.tlds===!1)return a;if(a.tlds===!0||a.tlds===void 0)return r(c.tlds,"Built-in TLD list disabled"),Object.assign({},a,c.tlds);r(typeof a.tlds=="object","tlds must be true, false, or an object");const i=a.tlds.deny;if(i)return Array.isArray(i)&&(a=Object.assign({},a,{tlds:{deny:new Set(i)}})),r(a.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),r(!a.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(a.tlds.deny,"tlds.deny"),a;const u=a.tlds.allow;return u?u===!0?(r(c.tlds,"Built-in TLD list disabled"),Object.assign({},a,c.tlds)):(Array.isArray(u)&&(a=Object.assign({},a,{tlds:{allow:new Set(u)}})),r(a.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(a.tlds.allow,"tlds.allow"),a):a},c.validateTlds=function(a,i){for(const u of a)r(m.isValid(u,{minDomainSegments:1,maxDomainSegments:1}),`${i} must contain valid top level domain names`)},c.isoDate=function(a){if(!s.isIsoDate(a))return null;/.*T.*[+-]\d\d$/.test(a)&&(a+="00");const i=new Date(a);return isNaN(i.getTime())?null:i.toISOString()},c.length=function(a,i,u,g,y){return r(!y||!1,"Invalid encoding:",y),a.$_addRule({name:i,method:"length",args:{limit:u,encoding:y},operator:g})}},8826:(_,b,p)=>{const r=p(375),m=p(8068),f={};f.Map=class extends Map{slice(){return new f.Map(this)}},_.exports=m.extend({type:"symbol",terms:{map:{init:new f.Map}},coerce:{method(h,{schema:t,error:l}){const o=t.$_terms.map.get(h);return o&&(h=o),t._flags.only&&typeof h!="symbol"?{value:h,errors:l("symbol.map",{map:t.$_terms.map})}:{value:h}}},validate(h,{error:t}){if(typeof h!="symbol")return{value:h,errors:t("symbol.base")}},rules:{map:{method(h){h&&!h[Symbol.iterator]&&typeof h=="object"&&(h=Object.entries(h)),r(h&&h[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),l=[];for(const o of h){r(o&&o[Symbol.iterator],"Entry must be an iterable");const[n,s]=o;r(typeof n!="object"&&typeof n!="function"&&typeof n!="symbol","Key must not be of type object, function, or Symbol"),r(typeof s=="symbol","Value must be a Symbol"),t.$_terms.map.set(n,s),l.push(s)}return t.valid(...l)}}},manifest:{build:(h,t)=>(t.map&&(h=h.map(t.map)),h)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(_,b,p)=>{const r=p(375),m=p(8571),f=p(738),h=p(9621),t=p(8160),l=p(6354),o=p(493),n={result:Symbol("result")};b.entry=function(s,c,a){let i=t.defaults;a&&(r(a.warnings===void 0,"Cannot override warnings preference in synchronous validation"),r(a.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),i=t.preferences(t.defaults,a));const u=n.entry(s,c,i);r(!u.mainstay.externals.length,"Schema with external rules must use validateAsync()");const g={value:u.value};return u.error&&(g.error=u.error),u.mainstay.warnings.length&&(g.warning=l.details(u.mainstay.warnings)),u.mainstay.debug&&(g.debug=u.mainstay.debug),u.mainstay.artifacts&&(g.artifacts=u.mainstay.artifacts),g},b.entryAsync=async function(s,c,a){let i=t.defaults;a&&(i=t.preferences(t.defaults,a));const u=n.entry(s,c,i),g=u.mainstay;if(u.error)throw g.debug&&(u.error.debug=g.debug),u.error;if(g.externals.length){let k=u.value;const w=[];for(const d of g.externals){const x=d.state.path,j=d.schema.type==="link"?g.links.get(d.schema):null;let S,O,P=k;const D=x.length?[k]:[],I=x.length?h(s,x):s;if(x.length){S=x[x.length-1];let H=k;for(const N of x.slice(0,-1))H=H[N],D.unshift(H);O=D[0],P=O[S]}try{const H=(M,q)=>(j||d.schema).$_createError(M,P,q,d.state,i),N=await d.method(P,{schema:d.schema,linked:j,state:d.state,prefs:a,original:I,error:H,errorsArray:n.errorsArray,warn:(M,q)=>g.warnings.push((j||d.schema).$_createError(M,P,q,d.state,i)),message:(M,q)=>(j||d.schema).$_createError("external",P,q,d.state,i,{messages:M})});if(N===void 0||N===P)continue;if(N instanceof l.Report){if(g.tracer.log(d.schema,d.state,"rule","external","error"),w.push(N),i.abortEarly)break;continue}if(Array.isArray(N)&&N[t.symbols.errors]){if(g.tracer.log(d.schema,d.state,"rule","external","error"),w.push(...N),i.abortEarly)break;continue}O?(g.tracer.value(d.state,"rule",P,N,"external"),O[S]=N):(g.tracer.value(d.state,"rule",k,N,"external"),k=N)}catch(H){throw i.errors.label&&(H.message+=` (${d.label})`),H}}if(u.value=k,w.length)throw u.error=l.process(w,s,i),g.debug&&(u.error.debug=g.debug),u.error}if(!i.warnings&&!i.debug&&!i.artifacts)return u.value;const y={value:u.value};return g.warnings.length&&(y.warning=l.details(g.warnings)),g.debug&&(y.debug=g.debug),g.artifacts&&(y.artifacts=g.artifacts),y},n.Mainstay=class{constructor(s,c,a){this.externals=[],this.warnings=[],this.tracer=s,this.debug=c,this.links=a,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const s=this._snapshots.pop();this.externals=s.externals,this.warnings=s.warnings}commit(){this._snapshots.pop()}},n.entry=function(s,c,a){const{tracer:i,cleanup:u}=n.tracer(c,a),g=a.debug?[]:null,y=c._ids._schemaChain?new Map:null,k=new n.Mainstay(i,g,y),w=c._ids._schemaChain?[{schema:c}]:null,d=new o([],[],{mainstay:k,schemas:w}),x=b.validate(s,c,d,a);u&&c.$_root.untrace();const j=l.process(x.errors,s,a);return{value:x.value,error:j,mainstay:k}},n.tracer=function(s,c){return s.$_root._tracer?{tracer:s.$_root._tracer._register(s)}:c.debug?(r(s.$_root.trace,"Debug mode not supported"),{tracer:s.$_root.trace()._register(s),cleanup:!0}):{tracer:n.ignore}},b.validate=function(s,c,a,i,u={}){if(c.$_terms.whens&&(c=c._generate(s,a,i).schema),c._preferences&&(i=n.prefs(c,i)),c._cache&&i.cache){const j=c._cache.get(s);if(a.mainstay.tracer.debug(a,"validate","cached",!!j),j)return j}const g=(j,S,O)=>c.$_createError(j,s,S,O||a,i),y={original:s,prefs:i,schema:c,state:a,error:g,errorsArray:n.errorsArray,warn:(j,S,O)=>a.mainstay.warnings.push(g(j,S,O)),message:(j,S)=>c.$_createError("custom",s,S,a,i,{messages:j})};a.mainstay.tracer.entry(c,a);const k=c._definition;if(k.prepare&&s!==void 0&&i.convert){const j=k.prepare(s,y);if(j){if(a.mainstay.tracer.value(a,"prepare",s,j.value),j.errors)return n.finalize(j.value,[].concat(j.errors),y);s=j.value}}if(k.coerce&&s!==void 0&&i.convert&&(!k.coerce.from||k.coerce.from.includes(typeof s))){const j=k.coerce.method(s,y);if(j){if(a.mainstay.tracer.value(a,"coerced",s,j.value),j.errors)return n.finalize(j.value,[].concat(j.errors),y);s=j.value}}const w=c._flags.empty;w&&w.$_match(n.trim(s,c),a.nest(w),t.defaults)&&(a.mainstay.tracer.value(a,"empty",s,void 0),s=void 0);const d=u.presence||c._flags.presence||(c._flags._endedSwitch?null:i.presence);if(s===void 0){if(d==="forbidden")return n.finalize(s,null,y);if(d==="required")return n.finalize(s,[c.$_createError("any.required",s,null,a,i)],y);if(d==="optional"){if(c._flags.default!==t.symbols.deepDefault)return n.finalize(s,null,y);a.mainstay.tracer.value(a,"default",s,{}),s={}}}else if(d==="forbidden")return n.finalize(s,[c.$_createError("any.unknown",s,null,a,i)],y);const x=[];if(c._valids){const j=c._valids.get(s,a,i,c._flags.insensitive);if(j)return i.convert&&(a.mainstay.tracer.value(a,"valids",s,j.value),s=j.value),a.mainstay.tracer.filter(c,a,"valid",j),n.finalize(s,null,y);if(c._flags.only){const S=c.$_createError("any.only",s,{valids:c._valids.values({display:!0})},a,i);if(i.abortEarly)return n.finalize(s,[S],y);x.push(S)}}if(c._invalids){const j=c._invalids.get(s,a,i,c._flags.insensitive);if(j){a.mainstay.tracer.filter(c,a,"invalid",j);const S=c.$_createError("any.invalid",s,{invalids:c._invalids.values({display:!0})},a,i);if(i.abortEarly)return n.finalize(s,[S],y);x.push(S)}}if(k.validate){const j=k.validate(s,y);if(j&&(a.mainstay.tracer.value(a,"base",s,j.value),s=j.value,j.errors)){if(!Array.isArray(j.errors))return x.push(j.errors),n.finalize(s,x,y);if(j.errors.length)return x.push(...j.errors),n.finalize(s,x,y)}}return c._rules.length?n.rules(s,x,y):n.finalize(s,x,y)},n.rules=function(s,c,a){const{schema:i,state:u,prefs:g}=a;for(const y of i._rules){const k=i._definition.rules[y.method];if(k.convert&&g.convert){u.mainstay.tracer.log(i,u,"rule",y.name,"full");continue}let w,d=y.args;if(y._resolve.length){d=Object.assign({},d);for(const j of y._resolve){const S=k.argsByName.get(j),O=d[j].resolve(s,u,g),P=S.normalize?S.normalize(O):O,D=t.validateArg(P,null,S);if(D){w=i.$_createError("any.ref",O,{arg:j,ref:d[j],reason:D},u,g);break}d[j]=P}}w=w||k.validate(s,a,d,y);const x=n.rule(w,y);if(x.errors){if(u.mainstay.tracer.log(i,u,"rule",y.name,"error"),y.warn){u.mainstay.warnings.push(...x.errors);continue}if(g.abortEarly)return n.finalize(s,x.errors,a);c.push(...x.errors)}else u.mainstay.tracer.log(i,u,"rule",y.name,"pass"),u.mainstay.tracer.value(u,"rule",s,x.value,y.name),s=x.value}return n.finalize(s,c,a)},n.rule=function(s,c){return s instanceof l.Report?(n.error(s,c),{errors:[s],value:null}):Array.isArray(s)&&s[t.symbols.errors]?(s.forEach(a=>n.error(a,c)),{errors:s,value:null}):{errors:null,value:s}},n.error=function(s,c){return c.message&&s._setTemplate(c.message),s},n.finalize=function(s,c,a){c=c||[];const{schema:i,state:u,prefs:g}=a;if(c.length){const k=n.default("failover",void 0,c,a);k!==void 0&&(u.mainstay.tracer.value(u,"failover",s,k),s=k,c=[])}if(c.length&&i._flags.error)if(typeof i._flags.error=="function"){c=i._flags.error(c),Array.isArray(c)||(c=[c]);for(const k of c)r(k instanceof Error||k instanceof l.Report,"error() must return an Error object")}else c=[i._flags.error];if(s===void 0){const k=n.default("default",s,c,a);u.mainstay.tracer.value(u,"default",s,k),s=k}if(i._flags.cast&&s!==void 0){const k=i._definition.cast[i._flags.cast];if(k.from(s)){const w=k.to(s,a);u.mainstay.tracer.value(u,"cast",s,w,i._flags.cast),s=w}}if(i.$_terms.externals&&g.externals&&g._externals!==!1)for(const{method:k}of i.$_terms.externals)u.mainstay.externals.push({method:k,schema:i,state:u,label:l.label(i._flags,u,g)});const y={value:s,errors:c.length?c:null};return i._flags.result&&(y.value=i._flags.result==="strip"?void 0:a.original,u.mainstay.tracer.value(u,i._flags.result,s,y.value),u.shadow(s,i._flags.result)),i._cache&&g.cache!==!1&&!i._refs.length&&i._cache.set(a.original,y),s===void 0||y.errors||i._flags.artifact===void 0||(u.mainstay.artifacts=u.mainstay.artifacts||new Map,u.mainstay.artifacts.has(i._flags.artifact)||u.mainstay.artifacts.set(i._flags.artifact,[]),u.mainstay.artifacts.get(i._flags.artifact).push(u.path)),y},n.prefs=function(s,c){const a=c===t.defaults;return a&&s._preferences[t.symbols.prefs]?s._preferences[t.symbols.prefs]:(c=t.preferences(c,s._preferences),a&&(s._preferences[t.symbols.prefs]=c),c)},n.default=function(s,c,a,i){const{schema:u,state:g,prefs:y}=i,k=u._flags[s];if(y.noDefaults||k===void 0)return c;if(g.mainstay.tracer.log(u,g,"rule",s,"full"),!k)return k;if(typeof k=="function"){const w=k.length?[m(g.ancestors[0]),i]:[];try{return k(...w)}catch(d){return void a.push(u.$_createError(`any.${s}`,null,{error:d},g,y))}}return typeof k!="object"?k:k[t.symbols.literal]?k.literal:t.isResolvable(k)?k.resolve(c,g,y):m(k)},n.trim=function(s,c){if(typeof s!="string")return s;const a=c.$_getRule("trim");return a&&a.args.enabled?s.trim():s},n.ignore={active:!1,debug:f,entry:f,filter:f,log:f,resolve:f,value:f},n.errorsArray=function(){const s=[];return s[t.symbols.errors]=!0,s}},2036:(_,b,p)=>{const r=p(375),m=p(9474),f=p(8160),h={};_.exports=h.Values=class{constructor(t,l){this._values=new Set(t),this._refs=new Set(l),this._lowercase=h.lowercases(t),this._override=!1}get length(){return this._values.size+this._refs.size}add(t,l){f.isResolvable(t)?this._refs.has(t)||(this._refs.add(t),l&&l.register(t)):this.has(t,null,null,!1)||(this._values.add(t),typeof t=="string"&&this._lowercase.set(t.toLowerCase(),t))}static merge(t,l,o){if(t=t||new h.Values,l){if(l._override)return l.clone();for(const n of[...l._values,...l._refs])t.add(n)}if(o)for(const n of[...o._values,...o._refs])t.remove(n);return t.length?t:null}remove(t){f.isResolvable(t)?this._refs.delete(t):(this._values.delete(t),typeof t=="string"&&this._lowercase.delete(t.toLowerCase()))}has(t,l,o,n){return!!this.get(t,l,o,n)}get(t,l,o,n){if(!this.length)return!1;if(this._values.has(t))return{value:t};if(typeof t=="string"&&t&&n){const s=this._lowercase.get(t.toLowerCase());if(s)return{value:s}}if(!this._refs.size&&typeof t!="object")return!1;if(typeof t=="object"){for(const s of this._values)if(m(s,t))return{value:s}}if(l)for(const s of this._refs){const c=s.resolve(t,l,o,null,{in:!0});if(c===void 0)continue;const a=s.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const i of a)if(typeof i==typeof t){if(n&&t&&typeof t=="string"){if(i.toLowerCase()===t.toLowerCase())return{value:i,ref:s}}else if(m(i,t))return{value:i,ref:s}}}return!1}override(){this._override=!0}values(t){if(t&&t.display){const l=[];for(const o of[...this._values,...this._refs])o!==void 0&&l.push(o);return l}return Array.from([...this._values,...this._refs])}clone(){const t=new h.Values(this._values,this._refs);return t._override=this._override,t}concat(t){r(!t._override,"Cannot concat override set of values");const l=new h.Values([...this._values,...t._values],[...this._refs,...t._refs]);return l._override=this._override,l}describe(){const t=[];this._override&&t.push({override:!0});for(const l of this._values.values())t.push(l&&typeof l=="object"?{value:l}:l);for(const l of this._refs.values())t.push(l.describe());return t}},h.Values.prototype[f.symbols.values]=!0,h.Values.prototype.slice=h.Values.prototype.clone,h.lowercases=function(t){const l=new Map;if(t)for(const o of t)typeof o=="string"&&l.set(o.toLowerCase(),o);return l}},978:(_,b,p)=>{const r=p(375),m=p(8571),f=p(1687),h=p(9621),t={};_.exports=function(l,o,n={}){if(r(l&&typeof l=="object","Invalid defaults value: must be an object"),r(!o||o===!0||typeof o=="object","Invalid source value: must be true, falsy or an object"),r(typeof n=="object","Invalid options: must be an object"),!o)return null;if(n.shallow)return t.applyToDefaultsWithShallow(l,o,n);const s=m(l);if(o===!0)return s;const c=n.nullOverride!==void 0&&n.nullOverride;return f(s,o,{nullOverride:c,mergeArrays:!1})},t.applyToDefaultsWithShallow=function(l,o,n){const s=n.shallow;r(Array.isArray(s),"Invalid keys");const c=new Map,a=o===!0?null:new Set;for(let g of s){g=Array.isArray(g)?g:g.split(".");const y=h(l,g);y&&typeof y=="object"?c.set(y,a&&h(o,g)||y):a&&a.add(g)}const i=m(l,{},c);if(!a)return i;for(const g of a)t.reachCopy(i,o,g);const u=n.nullOverride!==void 0&&n.nullOverride;return f(i,o,{nullOverride:u,mergeArrays:!1})},t.reachCopy=function(l,o,n){for(const a of n){if(!(a in o))return;const i=o[a];if(typeof i!="object"||i===null)return;o=i}const s=o;let c=l;for(let a=0;a<n.length-1;++a){const i=n[a];typeof c[i]!="object"&&(c[i]={}),c=c[i]}c[n[n.length-1]]=s}},375:(_,b,p)=>{const r=p(7916);_.exports=function(m,...f){if(!m)throw f.length===1&&f[0]instanceof Error?f[0]:new r(f)}},8571:(_,b,p)=>{const r=p(9621),m=p(4277),f=p(7043),h={needsProtoHack:new Set([m.set,m.map,m.weakSet,m.weakMap])};_.exports=h.clone=function(t,l={},o=null){if(typeof t!="object"||t===null)return t;let n=h.clone,s=o;if(l.shallow){if(l.shallow!==!0)return h.cloneWithShallow(t,l);n=u=>u}else if(s){const u=s.get(t);if(u)return u}else s=new Map;const c=m.getInternalProto(t);if(c===m.buffer)return!1;if(c===m.date)return new Date(t.getTime());if(c===m.regex)return new RegExp(t);const a=h.base(t,c,l);if(a===t)return t;if(s&&s.set(t,a),c===m.set)for(const u of t)a.add(n(u,l,s));else if(c===m.map)for(const[u,g]of t)a.set(u,n(g,l,s));const i=f.keys(t,l);for(const u of i){if(u==="__proto__")continue;if(c===m.array&&u==="length"){a.length=t.length;continue}const g=Object.getOwnPropertyDescriptor(t,u);g?g.get||g.set?Object.defineProperty(a,u,g):g.enumerable?a[u]=n(t[u],l,s):Object.defineProperty(a,u,{enumerable:!1,writable:!0,configurable:!0,value:n(t[u],l,s)}):Object.defineProperty(a,u,{enumerable:!0,writable:!0,configurable:!0,value:n(t[u],l,s)})}return a},h.cloneWithShallow=function(t,l){const o=l.shallow;(l=Object.assign({},l)).shallow=!1;const n=new Map;for(const s of o){const c=r(t,s);typeof c!="object"&&typeof c!="function"||n.set(c,c)}return h.clone(t,l,n)},h.base=function(t,l,o){if(o.prototype===!1)return h.needsProtoHack.has(l)?new l.constructor:l===m.array?[]:{};const n=Object.getPrototypeOf(t);if(n&&n.isImmutable)return t;if(l===m.array){const s=[];return n!==l&&Object.setPrototypeOf(s,n),s}if(h.needsProtoHack.has(l)){const s=new n.constructor;return n!==l&&Object.setPrototypeOf(s,n),s}return Object.create(n)}},9474:(_,b,p)=>{const r=p(4277),m={mismatched:null};_.exports=function(f,h,t){return t=Object.assign({prototype:!0},t),!!m.isDeepEqual(f,h,t,[])},m.isDeepEqual=function(f,h,t,l){if(f===h)return f!==0||1/f==1/h;const o=typeof f;if(o!==typeof h||f===null||h===null)return!1;if(o==="function"){if(!t.deepFunction||f.toString()!==h.toString())return!1}else if(o!=="object")return f!=f&&h!=h;const n=m.getSharedType(f,h,!!t.prototype);switch(n){case r.buffer:return!1;case r.promise:return f===h;case r.regex:return f.toString()===h.toString();case m.mismatched:return!1}for(let s=l.length-1;s>=0;--s)if(l[s].isSame(f,h))return!0;l.push(new m.SeenEntry(f,h));try{return!!m.isDeepEqualObj(n,f,h,t,l)}finally{l.pop()}},m.getSharedType=function(f,h,t){if(t)return Object.getPrototypeOf(f)!==Object.getPrototypeOf(h)?m.mismatched:r.getInternalProto(f);const l=r.getInternalProto(f);return l!==r.getInternalProto(h)?m.mismatched:l},m.valueOf=function(f){const h=f.valueOf;if(h===void 0)return f;try{return h.call(f)}catch(t){return t}},m.hasOwnEnumerableProperty=function(f,h){return Object.prototype.propertyIsEnumerable.call(f,h)},m.isSetSimpleEqual=function(f,h){for(const t of Set.prototype.values.call(f))if(!Set.prototype.has.call(h,t))return!1;return!0},m.isDeepEqualObj=function(f,h,t,l,o){const{isDeepEqual:n,valueOf:s,hasOwnEnumerableProperty:c}=m,{keys:a,getOwnPropertySymbols:i}=Object;if(f===r.array){if(!l.part){if(h.length!==t.length)return!1;for(let w=0;w<h.length;++w)if(!n(h[w],t[w],l,o))return!1;return!0}for(const w of h)for(const d of t)if(n(w,d,l,o))return!0}else if(f===r.set){if(h.size!==t.size)return!1;if(!m.isSetSimpleEqual(h,t)){const w=new Set(Set.prototype.values.call(t));for(const d of Set.prototype.values.call(h)){if(w.delete(d))continue;let x=!1;for(const j of w)if(n(d,j,l,o)){w.delete(j),x=!0;break}if(!x)return!1}}}else if(f===r.map){if(h.size!==t.size)return!1;for(const[w,d]of Map.prototype.entries.call(h))if(d===void 0&&!Map.prototype.has.call(t,w)||!n(d,Map.prototype.get.call(t,w),l,o))return!1}else if(f===r.error&&(h.name!==t.name||h.message!==t.message))return!1;const u=s(h),g=s(t);if((h!==u||t!==g)&&!n(u,g,l,o))return!1;const y=a(h);if(!l.part&&y.length!==a(t).length&&!l.skip)return!1;let k=0;for(const w of y)if(l.skip&&l.skip.includes(w))t[w]===void 0&&++k;else if(!c(t,w)||!n(h[w],t[w],l,o))return!1;if(!l.part&&y.length-k!==a(t).length)return!1;if(l.symbols!==!1){const w=i(h),d=new Set(i(t));for(const x of w){if(!l.skip||!l.skip.includes(x)){if(c(h,x)){if(!c(t,x)||!n(h[x],t[x],l,o))return!1}else if(c(t,x))return!1}d.delete(x)}for(const x of d)if(c(t,x))return!1}return!0},m.SeenEntry=class{constructor(f,h){this.obj=f,this.ref=h}isSame(f,h){return this.obj===f&&this.ref===h}}},7916:(_,b,p)=>{const r=p(8761);_.exports=class extends Error{constructor(m){super(m.filter(f=>f!=="").map(f=>typeof f=="string"?f:f instanceof Error?f.message:r(f)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,b.assert)}}},5277:_=>{const b={};_.exports=function(p){if(!p)return"";let r="";for(let m=0;m<p.length;++m){const f=p.charCodeAt(m);b.isSafe(f)?r+=p[m]:r+=b.escapeHtmlChar(f)}return r},b.escapeHtmlChar=function(p){return b.namedHtml.get(p)||(p>=256?"&#"+p+";":`&#x${p.toString(16).padStart(2,"0")};`)},b.isSafe=function(p){return b.safeCharCodes.has(p)},b.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]),b.safeCharCodes=function(){const p=new Set;for(let r=32;r<123;++r)(r>=97||r>=65&&r<=90||r>=48&&r<=57||r===32||r===46||r===44||r===45||r===58||r===95)&&p.add(r);return p}()},6064:_=>{_.exports=function(b){return b.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:_=>{_.exports=function(){}},1687:(_,b,p)=>{const r=p(375),m=p(8571),f=p(7043),h={};_.exports=h.merge=function(t,l,o){if(r(t&&typeof t=="object","Invalid target value: must be an object"),r(l==null||typeof l=="object","Invalid source value: must be null, undefined, or an object"),!l)return t;if(o=Object.assign({nullOverride:!0,mergeArrays:!0},o),Array.isArray(l)){r(Array.isArray(t),"Cannot merge array onto an object"),o.mergeArrays||(t.length=0);for(let s=0;s<l.length;++s)t.push(m(l[s],{symbols:o.symbols}));return t}const n=f.keys(l,o);for(let s=0;s<n.length;++s){const c=n[s];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(l,c))continue;const a=l[c];if(a&&typeof a=="object"){if(t[c]===a)continue;!t[c]||typeof t[c]!="object"||Array.isArray(t[c])!==Array.isArray(a)||a instanceof Date||a instanceof RegExp?t[c]=m(a,{symbols:o.symbols}):h.merge(t[c],a,o)}else(a!=null||o.nullOverride)&&(t[c]=a)}return t}},9621:(_,b,p)=>{const r=p(375),m={};_.exports=function(f,h,t){if(h===!1||h==null)return f;typeof(t=t||{})=="string"&&(t={separator:t});const l=Array.isArray(h);r(!l||!t.separator,"Separator option is not valid for array-based chain");const o=l?h:h.split(t.separator||".");let n=f;for(let s=0;s<o.length;++s){let c=o[s];const a=t.iterables&&m.iterables(n);if(Array.isArray(n)||a==="set"){const i=Number(c);Number.isInteger(i)&&(c=i<0?n.length+i:i)}if(!n||typeof n=="function"&&t.functions===!1||!a&&n[c]===void 0){r(!t.strict||s+1===o.length,"Missing segment",c,"in reach path ",h),r(typeof n=="object"||t.functions===!0||typeof n!="function","Invalid segment",c,"in reach path ",h),n=t.default;break}n=a?a==="set"?[...n][c]:n.get(c):n[c]}return n},m.iterables=function(f){return f instanceof Set?"set":f instanceof Map?"map":void 0}},8761:_=>{_.exports=function(...b){try{return JSON.stringify(...b)}catch(p){return"[Cannot display object: "+p.message+"]"}}},4277:(_,b)=>{const p={};b=_.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},p.typeMap=new Map([["[object Error]",b.error],["[object Map]",b.map],["[object Promise]",b.promise],["[object Set]",b.set],["[object WeakMap]",b.weakMap],["[object WeakSet]",b.weakSet]]),b.getInternalProto=function(r){if(Array.isArray(r))return b.array;if(r instanceof Date)return b.date;if(r instanceof RegExp)return b.regex;if(r instanceof Error)return b.error;const m=Object.prototype.toString.call(r);return p.typeMap.get(m)||b.generic}},7043:(_,b)=>{b.keys=function(p,r={}){return r.symbols!==!1?Reflect.ownKeys(p):Object.getOwnPropertyNames(p)}},3652:(_,b,p)=>{const r=p(375),m={};b.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(f,h){const t=[].concat((h=h||{}).before||[]),l=[].concat(h.after||[]),o=h.group||"?",n=h.sort||0;r(!t.includes(o),`Item cannot come before itself: ${o}`),r(!t.includes("?"),"Item cannot come before unassociated items"),r(!l.includes(o),`Item cannot come after itself: ${o}`),r(!l.includes("?"),"Item cannot come after unassociated items"),Array.isArray(f)||(f=[f]);for(const s of f){const c={seq:this._items.length,sort:n,before:t,after:l,group:o,node:s};this._items.push(c)}if(!h.manual){const s=this._sort();r(s,"item",o!=="?"?`added into group ${o}`:"","created a dependencies error")}return this.nodes}merge(f){Array.isArray(f)||(f=[f]);for(const t of f)if(t)for(const l of t._items)this._items.push(Object.assign({},l));this._items.sort(m.mergeSort);for(let t=0;t<this._items.length;++t)this._items[t].seq=t;const h=this._sort();return r(h,"merge created a dependencies error"),this.nodes}sort(){const f=this._sort();return r(f,"sort created a dependencies error"),this.nodes}_sort(){const f={},h=Object.create(null),t=Object.create(null);for(const c of this._items){const a=c.seq,i=c.group;t[i]=t[i]||[],t[i].push(a),f[a]=c.before;for(const u of c.after)h[u]=h[u]||[],h[u].push(a)}for(const c in f){const a=[];for(const i in f[c]){const u=f[c][i];t[u]=t[u]||[],a.push(...t[u])}f[c]=a}for(const c in h)if(t[c])for(const a of t[c])f[a].push(...h[c]);const l={};for(const c in f){const a=f[c];for(const i of a)l[i]=l[i]||[],l[i].push(c)}const o={},n=[];for(let c=0;c<this._items.length;++c){let a=c;if(l[c]){a=null;for(let i=0;i<this._items.length;++i){if(o[i]===!0)continue;l[i]||(l[i]=[]);const u=l[i].length;let g=0;for(let y=0;y<u;++y)o[l[i][y]]&&++g;if(g===u){a=i;break}}}a!==null&&(o[a]=!0,n.push(a))}if(n.length!==this._items.length)return!1;const s={};for(const c of this._items)s[c.seq]=c;this._items=[],this.nodes=[];for(const c of n){const a=s[c];this.nodes.push(a.node),this._items.push(a)}return!0}},m.mergeSort=(f,h)=>f.sort===h.sort?0:f.sort<h.sort?-1:1},5380:(_,b,p)=>{const r=p(443),m=p(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:r.URL||URL};b.analyze=function(h,t={}){if(!h)return m.code("DOMAIN_NON_EMPTY_STRING");if(typeof h!="string")throw new Error("Invalid input: domain must be a string");if(h.length>256)return m.code("DOMAIN_TOO_LONG");if(f.nonAsciiRx.test(h)){if(t.allowUnicode===!1)return m.code("DOMAIN_INVALID_UNICODE_CHARS");h=h.normalize("NFC")}if(f.domainControlRx.test(h))return m.code("DOMAIN_INVALID_CHARS");h=f.punycode(h),t.allowFullyQualified&&h[h.length-1]==="."&&(h=h.slice(0,-1));const l=t.minDomainSegments||f.minDomainSegments,o=h.split(".");if(o.length<l)return m.code("DOMAIN_SEGMENTS_COUNT");if(t.maxDomainSegments&&o.length>t.maxDomainSegments)return m.code("DOMAIN_SEGMENTS_COUNT_MAX");const n=t.tlds;if(n){const s=o[o.length-1].toLowerCase();if(n.deny&&n.deny.has(s)||n.allow&&!n.allow.has(s))return m.code("DOMAIN_FORBIDDEN_TLDS")}for(let s=0;s<o.length;++s){const c=o[s];if(!c.length)return m.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return m.code("DOMAIN_LONG_SEGMENT");if(s<o.length-1){if(!f.domainSegmentRx.test(c))return m.code("DOMAIN_INVALID_CHARS")}else if(!f.tldSegmentRx.test(c))return m.code("DOMAIN_INVALID_TLDS_CHARS")}return null},b.isValid=function(h,t){return!b.analyze(h,t)},f.punycode=function(h){h.includes("%")&&(h=h.replace(/%/g,"%25"));try{return new f.URL(`http://${h}`).host}catch{return h}}},1745:(_,b,p)=>{const r=p(9848),m=p(5380),f=p(2178),h={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(r.TextEncoder||TextEncoder)};b.analyze=function(t,l){return h.email(t,l)},b.isValid=function(t,l){return!h.email(t,l)},h.email=function(t,l={}){if(typeof t!="string")throw new Error("Invalid input: email must be a string");if(!t)return f.code("EMPTY_STRING");const o=!h.nonAsciiRx.test(t);if(!o){if(l.allowUnicode===!1)return f.code("FORBIDDEN_UNICODE");t=t.normalize("NFC")}const n=t.split("@");if(n.length!==2)return n.length>2?f.code("MULTIPLE_AT_CHAR"):f.code("MISSING_AT_CHAR");const[s,c]=n;if(!s)return f.code("EMPTY_LOCAL");if(!l.ignoreLength){if(t.length>254)return f.code("ADDRESS_TOO_LONG");if(h.encoder.encode(s).length>64)return f.code("LOCAL_TOO_LONG")}return h.local(s,o)||m.analyze(c,l)},h.local=function(t,l){const o=t.split(".");for(const n of o){if(!n.length)return f.code("EMPTY_LOCAL_SEGMENT");if(l){if(!h.atextRx.test(n))return f.code("INVALID_LOCAL_CHARS")}else for(const s of n){if(h.atextRx.test(s))continue;const c=h.binary(s);if(!h.atomRx.test(c))return f.code("INVALID_LOCAL_CHARS")}}},h.binary=function(t){return Array.from(h.encoder.encode(t)).map(l=>String.fromCharCode(l)).join("")},h.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,h.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:(_,b)=>{b.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"},b.code=function(p){return{code:p,error:b.codes[p]}}},9959:(_,b,p)=>{const r=p(375),m=p(5752);b.regex=function(f={}){r(f.cidr===void 0||typeof f.cidr=="string","options.cidr must be a string");const h=f.cidr?f.cidr.toLowerCase():"optional";r(["required","optional","forbidden"].includes(h),"options.cidr must be one of required, optional, forbidden"),r(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]),r(t.length>=1,"options.version must have at least 1 version specified");for(let n=0;n<t.length;++n)r(typeof t[n]=="string","options.version must only contain strings"),t[n]=t[n].toLowerCase(),r(["ipv4","ipv6","ipvfuture"].includes(t[n]),"options.version contains unknown version "+t[n]+" - must be one of ipv4, ipv6, ipvfuture");t=Array.from(new Set(t));const l=`(?:${t.map(n=>{if(h==="forbidden")return m.ip[n];const s=`\\/${n==="ipv4"?m.ip.v4Cidr:m.ip.v6Cidr}`;return h==="required"?`${m.ip[n]}${s}`:`${m.ip[n]}(?:${s})?`}).join("|")})`,o=new RegExp(`^${l}$`);return{cidr:h,versions:t,regex:o,raw:l}}},5752:(_,b,p)=>{const r=p(375),m=p(6064),f={generate:function(){const h={},t="\\dA-Fa-f",l="["+t+"]",o="\\w-\\.~",n="!\\$&'\\(\\)\\*\\+,;=",s="%"+t,c=o+s+n+":@",a="["+c+"]",i="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";h.ipv4address="(?:"+i+"\\.){3}"+i;const u=l+"{1,4}",g="(?:"+u+":"+u+"|"+h.ipv4address+")",y="(?:"+u+":){6}"+g,k="::(?:"+u+":){5}"+g,w="(?:"+u+")?::(?:"+u+":){4}"+g,d="(?:(?:"+u+":){0,1}"+u+")?::(?:"+u+":){3}"+g,x="(?:(?:"+u+":){0,2}"+u+")?::(?:"+u+":){2}"+g,j="(?:(?:"+u+":){0,3}"+u+")?::"+u+":"+g,S="(?:(?:"+u+":){0,4}"+u+")?::"+g,O="(?:(?:"+u+":){0,5}"+u+")?::"+u,P="(?:(?:"+u+":){0,6}"+u+")?::";h.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",h.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",h.ipv6address="(?:"+y+"|"+k+"|"+w+"|"+d+"|"+x+"|"+j+"|"+S+"|"+O+"|"+P+")",h.ipvFuture="v"+l+"+\\.["+o+n+":]+",h.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",h.schemeRegex=new RegExp(h.scheme);const D="["+o+s+n+":]*",I="["+o+s+n+"]{1,255}",H="(?:\\[(?:"+h.ipv6address+"|"+h.ipvFuture+")\\]|"+h.ipv4address+"|"+I+")",N="(?:"+D+"@)?"+H+"(?::\\d*)?",M="(?:"+D+"@)?("+H+")(?::\\d*)?",q=a+"*",F=a+"+",U="(?:\\/"+q+")*",le="\\/(?:"+F+U+")?",me=F+U,be="["+o+s+n+"@]+"+U,De="(?:\\/\\/\\/"+q+U+")";return h.hierPart="(?:(?:\\/\\/"+N+U+")|"+le+"|"+me+"|"+De+")",h.hierPartCapture="(?:(?:\\/\\/"+M+U+")|"+le+"|"+me+")",h.relativeRef="(?:(?:\\/\\/"+N+U+")|"+le+"|"+be+"|)",h.relativeRefCapture="(?:(?:\\/\\/"+M+U+")|"+le+"|"+be+"|)",h.query="["+c+"\\/\\?]*(?=#|$)",h.queryWithSquareBrackets="["+c+"\\[\\]\\/\\?]*(?=#|$)",h.fragment="["+c+"\\/\\?]*",h}};f.rfc3986=f.generate(),b.ip={v4Cidr:f.rfc3986.ipv4Cidr,v6Cidr:f.rfc3986.ipv6Cidr,ipv4:f.rfc3986.ipv4address,ipv6:f.rfc3986.ipv6address,ipvfuture:f.rfc3986.ipvFuture},f.createRegex=function(h){const t=f.rfc3986,l="(?:\\?"+(h.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",o=h.domain?t.relativeRefCapture:t.relativeRef;if(h.relativeOnly)return f.wrap(o+l);let n="";if(h.scheme){r(h.scheme instanceof RegExp||typeof h.scheme=="string"||Array.isArray(h.scheme),"scheme must be a RegExp, String, or Array");const a=[].concat(h.scheme);r(a.length>=1,"scheme must have at least 1 scheme specified");const i=[];for(let u=0;u<a.length;++u){const g=a[u];r(g instanceof RegExp||typeof g=="string","scheme at position "+u+" must be a RegExp or String"),g instanceof RegExp?i.push(g.source.toString()):(r(t.schemeRegex.test(g),"scheme at position "+u+" must be a valid scheme"),i.push(m(g)))}n=i.join("|")}const s="(?:"+(n?"(?:"+n+")":t.scheme)+":"+(h.domain?t.hierPartCapture:t.hierPart)+")",c=h.allowRelative?"(?:"+s+"|"+o+")":s;return f.wrap(c+l,n)},f.wrap=function(h,t){return{raw:h=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${h}`,regex:new RegExp(`^${h}$`),scheme:t}},f.uriRegex=f.createRegex({}),b.regex=function(h={}){return h.scheme||h.allowRelative||h.relativeOnly||h.allowQuerySquareBrackets||h.domain?f.createRegex(h):f.uriRegex}},1447:(_,b)=>{const p={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};b.Parser=class{constructor(r,m={}){if(!m[p.settings]&&m.constants)for(const f in m.constants){const h=m.constants[f];if(h!==null&&!["boolean","number","string"].includes(typeof h))throw new Error(`Formula constant ${f} contains invalid ${typeof h} value type`)}this.settings=m[p.settings]?m:Object.assign({[p.settings]:!0,constants:{},functions:{}},m),this.single=null,this._parts=null,this._parse(r)}_parse(r){let m=[],f="",h=0,t=!1;const l=n=>{if(h)throw new Error("Formula missing closing parenthesis");const s=m.length?m[m.length-1]:null;if(t||f||n){if(s&&s.type==="reference"&&n===")")return s.type="function",s.value=this._subFormula(f,s.value),void(f="");if(n===")"){const c=new b.Parser(f,this.settings);m.push({type:"segment",value:c})}else if(t){if(t==="]")return m.push({type:"reference",value:f}),void(f="");m.push({type:"literal",value:f})}else if(p.operatorCharacters.includes(f))s&&s.type==="operator"&&p.operators.includes(s.value+f)?s.value+=f:m.push({type:"operator",value:f});else if(f.match(p.numberRx))m.push({type:"constant",value:parseFloat(f)});else if(this.settings.constants[f]!==void 0)m.push({type:"constant",value:this.settings.constants[f]});else{if(!f.match(p.tokenRx))throw new Error(`Formula contains invalid token: ${f}`);m.push({type:"reference",value:f})}f=""}};for(const n of r)t?n===t?(l(),t=!1):f+=n:h?n==="("?(f+=n,++h):n===")"?(--h,h?f+=n:l(n)):f+=n:n in p.literals?t=p.literals[n]:n==="("?(l(),++h):p.operatorCharacters.includes(n)?(l(),f=n,l()):n!==" "?f+=n:l();l(),m=m.map((n,s)=>n.type!=="operator"||n.value!=="-"||s&&m[s-1].type!=="operator"?n:{type:"operator",value:"n"});let o=!1;for(const n of m){if(n.type==="operator"){if(p.operatorsPrefix.includes(n.value))continue;if(!o)throw new Error("Formula contains an operator in invalid position");if(!p.operators.includes(n.value))throw new Error(`Formula contains an unknown operator ${n.value}`)}else if(o)throw new Error("Formula missing expected operator");o=!o}if(!o)throw new Error("Formula contains invalid trailing operator");m.length===1&&["reference","literal","constant"].includes(m[0].type)&&(this.single={type:m[0].type==="reference"?"reference":"value",value:m[0].value}),this._parts=m.map(n=>{if(n.type==="operator")return p.operatorsPrefix.includes(n.value)?n:n.value;if(n.type!=="reference")return n.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(n.value))throw new Error(`Formula contains invalid reference ${n.value}`);return this.settings.reference?this.settings.reference(n.value):p.reference(n.value)})}_subFormula(r,m){const f=this.settings.functions[m];if(typeof f!="function")throw new Error(`Formula contains unknown function ${m}`);let h=[];if(r){let t="",l=0,o=!1;const n=()=>{if(!t)throw new Error(`Formula contains function ${m} with invalid arguments ${r}`);h.push(t),t=""};for(let s=0;s<r.length;++s){const c=r[s];o?(t+=c,c===o&&(o=!1)):c in p.literals&&!l?(t+=c,o=p.literals[c]):c!==","||l?(t+=c,c==="("?++l:c===")"&&--l):n()}n()}return h=h.map(t=>new b.Parser(t,this.settings)),function(t){const l=[];for(const o of h)l.push(o.evaluate(t));return f.call(t,...l)}}evaluate(r){const m=this._parts.slice();for(let f=m.length-2;f>=0;--f){const h=m[f];if(h&&h.type==="operator"){const t=m[f+1];m.splice(f+1,1);const l=p.evaluate(t,r);m[f]=p.single(h.value,l)}}return p.operatorsOrder.forEach(f=>{for(let h=1;h<m.length-1;)if(f.includes(m[h])){const t=m[h],l=p.evaluate(m[h-1],r),o=p.evaluate(m[h+1],r);m.splice(h,2);const n=p.calculate(t,l,o);m[h-1]=n===0?0:n}else h+=2}),p.evaluate(m[0],r)}},b.Parser.prototype[p.symbol]=!0,p.reference=function(r){return function(m){return m&&m[r]!==void 0?m[r]:null}},p.evaluate=function(r,m){return r===null?null:typeof r=="function"?r(m):r[p.symbol]?r.evaluate(m):r},p.single=function(r,m){if(r==="!")return!m;const f=-m;return f===0?0:f},p.calculate=function(r,m,f){if(r==="??")return p.exists(m)?m:f;if(typeof m=="string"||typeof f=="string"){if(r==="+")return(m=p.exists(m)?m:"")+(p.exists(f)?f:"")}else switch(r){case"^":return Math.pow(m,f);case"*":return m*f;case"/":return m/f;case"%":return m%f;case"+":return m+f;case"-":return m-f}switch(r){case"<":return m<f;case"<=":return m<=f;case">":return m>f;case">=":return m>=f;case"==":return m===f;case"!=":return m!==f;case"&&":return m&&f;case"||":return m||f}return null},p.exists=function(r){return r!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:_=>{_.exports=JSON.parse('{"version":"17.13.3"}')}},R={},function _(b){var p=R[b];if(p!==void 0)return p.exports;var r=R[b]={exports:{}};return $[b](r,r.exports,_),r.exports}(5107);var $,R})}(Ye)),Ye.exports}var Oe={},Mt;function Rn(){if(Mt)return Oe;Mt=1;var v=Oe&&Oe.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.BNExtension=$;const C=v(ar());function $(R){return{type:"BN",base:R.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(_,b){try{return{value:new C.default(_)}}catch{return{errors:b.error("bn.nan")}}},coerce(_){return{value:_.toString(10)}},validate(_){return{value:_}},rules:{gt:{args:[{name:"threshold",ref:!0,assert:_=>C.default.isBN(_),message:"must be a big number",normalize:_=>new C.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,b,p){const r=new C.default(_);return p.equal&&r.lt(p.threshold)?b.error("bn.min",p):!p.equal&&r.lte(p.threshold)?b.error("bn.greater",p):_}},lt:{args:[{name:"threshold",ref:!0,assert:_=>C.default.isBN(_),message:"must be a big number",normalize:_=>new C.default(_)},{name:"equal",assert:_=>typeof _=="boolean",message:"must be a boolean"}],validate(_,b,p){const r=new C.default(_);return p.equal&&r.gt(p.threshold)?b.error("bn.max",p):!p.equal&&r.gte(p.threshold)?b.error("bn.less",p):_}},min:{alias:"gte",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!0}})}},max:{alias:"lte",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!0}})}},greater:{alias:"gt",method(_){return this.$_addRule({name:"gt",args:{threshold:_,equal:!1}})}},less:{alias:"lt",method(_){return this.$_addRule({name:"lt",args:{threshold:_,equal:!1}})}},positive:{method(){return this.$_addRule({name:"gt",args:{threshold:0,equal:!1}})}},negative:{method(){return this.$_addRule({name:"lt",args:{threshold:0,equal:!1}})}}}}}return Oe}var Pe={},zt;function $n(){if(zt)return Pe;zt=1;var v=Pe&&Pe.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.DIDExtension=b;const C=v(ir),$=or(),R=lr(),_={pk:Object.keys($.types.KeyType),hash:Object.keys($.types.HashType),role:Object.keys($.types.RoleType)};function b(p){return{type:"DID",base:p.string().trim(),messages:{"did.empty":'Expect {{#label}} to be non-empty string, got "{{#value}}"',"did.invalid":'Expect {{#label}} to be valid did, got "{{#value}}"',"did.wallet":'Expect wallet type of {{#label}} to be "{{#expected}}" wallet, got "{{#actual}}"',"did.pk":'Expect pk type of {{#label}} to be "{{#expected}}", got "{{#actual}}"',"did.hash":'Expect hash type of {{#label}} to be "{{#expected}}", got "{{#actual}}"',"did.role":'Expect role type of {{#label}} to be "{{#expected}}", got "{{#actual}}"',"did.prefix":'Expect prefix of {{#label}} to be "{{#expected}}"'},validate(r,m){return!r||typeof r!="string"?{errors:m.error("did.empty",{value:r})}:(0,R.isValid)(r)===!1?{errors:m.error("did.invalid",{value:r})}:{value:r}},rules:{type:{args:[{name:"key",ref:!0,assert:r=>Object.keys(_).includes(r),message:`must be one of ${Object.keys(_).join(", ")}`},{name:"expected",assert:r=>Object.keys(_).some(m=>_[m].includes(r)),message:"must be valid type"}],validate(r,m,f){const h=(0,R.toTypeInfoStr)(r);return f.key==="pk"&&h.pk!==f.expected?m.error("did.pk",{...f,actual:h.pk}):f.key==="hash"&&h.hash!==f.expected?m.error("did.hash",{...f,actual:h.hash}):f.key==="role"&&h.role!==f.expected?m.error("did.role",{...f,actual:h.role}):r}},pk:{method(r){return this.$_addRule({name:"type",args:{key:"pk",expected:r}})}},hash:{method(r){return this.$_addRule({name:"type",args:{key:"hash",expected:r}})}},role:{method(r){return this.$_addRule({name:"type",args:{key:"role",expected:r}})}},wallet:{method(r){return this.$_addRule({name:"wallet",args:{type:r}})},args:[{name:"type",ref:!0,assert:r=>["arcblock","ethereum","default","eth","passkey"].includes(r),message:"must be a string",normalize:r=>r.trim()}],validate(r,m,f={}){const h=(0,R.toTypeInfo)(r),t=(0,R.toTypeInfoStr)(r);return["ethereum","eth"].includes(f.type)&&(0,C.default)(h,R.DID_TYPE_ETHEREUM)===!1?m.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):["arcblock","default"].includes(f.type)&&(0,C.default)(h,R.DID_TYPE_ARCBLOCK)===!1?m.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):["passkey"].includes(f.type)&&(0,C.default)(h,R.DID_TYPE_PASSKEY)===!1?m.error("did.wallet",{expected:f.type,actual:JSON.stringify(t)}):r}},prefix:{method(r=""){return this.$_addRule({name:"prefix",args:{str:r}})},args:[{name:"str",ref:!0,assert:r=>["",R.DID_PREFIX].includes(r),message:"must be a string",normalize:r=>r.trim()}],validate(r,m,f={}){return f.str&&r.startsWith(f.str)===!1?m.error("did.prefix",{expected:f.str}):!f.str&&(0,R.toAddress)(r)!==r?m.error("did.prefix",{expected:f.str}):r}}}}}return Pe}var Ht;function An(){return Ht||(Ht=1,function(v){var C=Me&&Me.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(v,"__esModule",{value:!0}),v.patterns=v.schemas=v.Joi=void 0;const $=C(Cn()),R=Rn(),_=$n();v.Joi=$.default.extend(_.DIDExtension).extend(R.BNExtension);const b=/^(0x)?([A-Fa-f0-9]{64})$/,p=v.Joi.object({genesisTime:v.Joi.date().iso().required().raw(),genesisTx:v.Joi.string().regex(b).required().allow(""),renaissanceTime:v.Joi.date().iso().required().raw(),renaissanceTx:v.Joi.string().regex(b).required().allow("")}),r=v.Joi.object({address:v.Joi.DID().prefix().role("ROLE_TOKEN").required(),value:v.Joi.BN().positive().required()}),m=v.Joi.object({name:v.Joi.string().min(1).max(256).required(),value:v.Joi.string().min(1).max(1024).required(),description:v.Joi.string().min(1).max(256).optional().allow(""),required:v.Joi.boolean().optional().default(!1)}),f=v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ACCOUNT"),v.Joi.DID().prefix().role("ROLE_APPLICATION"),v.Joi.DID().prefix().role("ROLE_BLOCKLET"),v.Joi.DID().prefix().wallet("ethereum"),v.Joi.DID().prefix().wallet("passkey")),h=v.Joi.array().items(v.Joi.object({owner:f.required(),tokensList:v.Joi.array().items(r).default([]),assetsList:v.Joi.array().items(v.Joi.DID().prefix().role("ROLE_ASSET")).default([])})),t=v.Joi.array().items({signer:v.Joi.DID().prefix().required(),pk:v.Joi.any().required(),signature:v.Joi.any().required(),delegator:v.Joi.DID().prefix().valid("").optional(),data:v.Joi.any().optional()}),l=v.Joi.object({type:v.Joi.string().min(1).max(32).required(),contractAddress:v.Joi.DID().prefix().wallet("ethereum").required(),chainType:v.Joi.string().min(1).max(32).required(),chainName:v.Joi.string().min(1).max(32).required(),chainId:v.Joi.number().positive().required()}),o=v.Joi.object({type:v.Joi.string().valid("svg","url","uri").required(),content:v.Joi.string().when("type",{is:"uri",then:v.Joi.string().max(20480).dataUri().required()}).when("type",{is:"url",then:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required()})}),n=v.Joi.object({id:v.Joi.string().max(2048).uri({scheme:["http","https"]}).required(),scope:v.Joi.string().valid("public","private").default("public")}),s=v.Joi.object({id:v.Joi.DID().prefix().required(),pk:v.Joi.string().required(),name:v.Joi.string().min(1).max(256).required()}),c={address:v.Joi.DID().prefix().role("ROLE_ASSET").required(),moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.DID().prefix().optional().allow(""),issuer:v.Joi.DID().prefix().optional().allow(""),endpoint:n.optional().allow(null).default(null),display:o.optional().allow(null).default(null),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()},a={address:v.Joi.DID().prefix().role("ROLE_FACTORY").required(),name:v.Joi.string().min(2).max(255).required(),description:v.Joi.string().min(2).max(255).required(),settlement:v.Joi.string().valid("instant","periodic").default("instant"),limit:v.Joi.number().integer().min(0).default(0),trustedIssuers:v.Joi.array().items(v.Joi.DID().prefix()).max(8).optional(),data:v.Joi.any().optional().allow(null).default(null),display:o.optional().allow(null).default(null),input:v.Joi.object({value:v.Joi.BN().positive().min("0").default("0"),tokens:v.Joi.array().items(r).max(8).optional(),assets:v.Joi.array().items(v.Joi.alternatives().try(v.Joi.DID().prefix().role("ROLE_ASSET"),v.Joi.DID().prefix().role("ROLE_FACTORY"))).max(8).optional(),variables:v.Joi.array().items(v.Joi.object({name:v.Joi.string().min(1).max(255).required(),description:v.Joi.string().max(255).optional().allow(""),required:v.Joi.boolean().required()})).optional()}),output:v.Joi.object({moniker:v.Joi.string().min(2).max(255).required(),data:v.Joi.any().required(),readonly:v.Joi.boolean().default(!1),transferrable:v.Joi.boolean().default(!1),ttl:v.Joi.number().min(0).default(0),parent:v.Joi.string().max(255).required(),issuer:v.Joi.string().max(255).required(),endpoint:n.optional(),display:o.optional(),tags:v.Joi.array().items(v.Joi.string().min(1).max(64)).max(4).optional()}),hooks:v.Joi.array().items(v.Joi.object({name:v.Joi.string().valid("mint","postMint","preMint").required(),type:v.Joi.string().valid("url","contract").required(),hook:v.Joi.string().min(1).max(4096).required(),compiled:v.Joi.array().items(v.Joi.object()).optional()})).optional()};v.schemas={context:p,tokenInput:r,multiInput:h,multiSig:t,foreignToken:l,variableInput:m,nftDisplay:o,nftEndpoint:n,nftIssuer:s,tokenHolder:f,assetProps:c,assetSchema:v.Joi.object(c).options({stripUnknown:!0,noDefaults:!1}),factoryProps:a,factorySchema:v.Joi.object(a).options({stripUnknown:!0,noDefaults:!1})},v.patterns={txHash:b}}(Me)),Me}var On=An();function bs({onCancel:v,onSuccess:C,blocklet:$}){const{vaults:R=[],appPid:_}=$,{t:b,locale:p}=ae(),{connectApi:r}=Vt(),{api:m}=ne(),{teamDid:f}=Ve(),[h,t]=yt({loading:!1,fetching:!1,error:"",address:"",fetched:[],errored:[]});L.useEffect(()=>{if(!je.isValid(h.address))return;const c=je.toAddress(h.address),a=h.fetched.find(u=>u.address===c),i=h.errored.find(u=>u.address===c);!h.fetching&&!a&&!i&&(t({fetching:!0}),Tr(W.MAIN_CHAIN_ENDPOINT).getAccountState({address:c}).then(g=>{g.state?t({fetching:!1,fetched:[...h.fetched.filter(y=>y.address!==c),g.state]}):t({fetching:!1,errored:[...h.errored.filter(y=>y.address!==c),{address:c}]})}).catch(g=>{console.error(g),t({fetching:!1,error:ot(g)})}))},[h.address,h.fetching]),L.useEffect(()=>{if(h.address){const c=je.toAddress(h.address);if(!je.isValid(c)){t({error:b("blocklet.config.vault.error.invalid")});return}if(On.schemas.tokenHolder.validate(c).error){t({error:b("blocklet.config.vault.error.holder")});return}if(R.find(i=>i.did===c)){t({error:b("blocklet.config.vault.error.duplicate")});return}if(cr([$.appDid,$.appPid,...$.migratedFrom.map(i=>i.appDid)].filter(Boolean)).includes(c)){t({error:b("blocklet.config.vault.error.appDid")});return}}t({error:""})},[h.address]);const l=async()=>{t({loading:!0});try{const c=await m.configVault({input:{teamDid:f,vaultDid:je.toAddress(h.address)}});r.open({locale:p,action:"approve-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:b("blocklet.config.vault.approve.title"),scan:b(`blocklet.config.vault.approve.${R.length>0?"byLast":"byOwner"}`),confirm:b("blocklet.config.vault.approve.confirm"),success:b("blocklet.config.vault.approve.success")},onSuccess:()=>{r.open({locale:p,action:"config-vault",forceConnected:!1,saveConnect:!1,autoConnect:!1,className:"connect",checkTimeout:10*60*1e3,passkeyBehavior:"none",extraParams:{sessionId:c.sessionId},messages:{title:b("blocklet.config.vault.commit.title"),scan:b("blocklet.config.vault.commit.scan"),confirm:b("blocklet.config.vault.commit.confirm"),success:b("blocklet.config.vault.commit.success")},onSuccess:()=>{t({loading:!1}),C()},onClose:()=>{t({loading:!1}),r.close()}})},onClose:()=>{t({loading:!1}),r.close()}})}catch(c){t({loading:!1,error:ot(c)})}},o=je.toAddress(h.address),n=[];je.isValid(o)&&n.push({key:b("blocklet.config.vault.role"),value:e.jsx(mt,{color:"primary",variant:"outlined",size:"small",label:je.toTypeInfoStr(o).role||"-"})});const s=h.fetched.find(c=>c.address===o);return s&&n.push({key:b("blocklet.config.vault.firstSeen"),value:Ct(s.context?.genesisTime,"-")},{key:b("blocklet.config.vault.lastSeen"),value:Ct(s.context?.renaissanceTime,"-")},{key:b("blocklet.config.vault.migratedFrom"),value:s.migratedFrom.length?s.migratedFrom.map(c=>e.jsx(it,{did:c,showQrcode:!0,compact:!0,size:14,locale:p},c)):"-"},{key:b("blocklet.config.vault.migratedTo"),value:s.migratedTo.length?s.migratedTo.map(c=>e.jsx(it,{did:c,showQrcode:!0,compact:!0,size:14,locale:p},c)):"-"}),e.jsx(ke,{open:!0,fullWidth:!0,showCloseButton:!1,onClose:v,title:e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(ls,{}),b("blocklet.config.vault.title")]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(te,{onClick:v,children:b("common.cancel")}),e.jsx(te,{onClick:l,variant:"contained",disabled:!!h.error||h.loading,children:b("common.confirm")})]}),children:e.jsxs(ie,{direction:"column",spacing:3,children:[e.jsxs(J,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[b("blocklet.config.vault.desc")," ",b("blocklet.config.vault.tip")]}),R.length>0&&e.jsxs(A,{children:[e.jsxs(J,{variant:"body1",gutterBottom:!0,sx:{color:"text.secondary"},children:[b("blocklet.config.vault.current"),":"]}),e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(dr,{did:R[R.length-1].did,showQrcode:!0,style:{width:"auto"}}),e.jsx(Br,{vaults:R,appPid:_})]})]}),e.jsx(V,{fullWidth:!0,"data-cy":"input-factory-address",label:b("blocklet.config.vault.address"),error:!!h.error,helperText:h.error,value:h.address,onChange:c=>{t({address:c.target.value,error:""})},slotProps:{input:{endAdornment:h.fetching?e.jsx(Jt,{position:"end",children:e.jsx(Ce,{size:16})}):null}}}),e.jsx(A,{sx:{"& .info-row__name":{fontSize:"14px"},"& .info-row__value":{fontSize:"14px"}},children:n.map(c=>e.jsx(ns,{valueComponent:"div",nameWidth:120,name:c.key,children:c.value},c.key))})]})})}bs.propTypes={onCancel:T.func.isRequired,onSuccess:T.func.isRequired,blocklet:T.object.isRequired};function vt({blocklet:v,onUpdate:C=()=>{},hasPermission:$=!1}){const{info:R,api:_,inService:b}=ne(),{t:p,locale:r}=L.useContext(ce),[m,f]=yt({loading:!1,showTransferOwner:!1,showConfigVault:!1}),[h,t]=L.useState(()=>v?.settings?.gateway?.wafPolicy?.enabled??!0),[l,o]=L.useState(()=>!!v?.settings?.enableSessionHardening),[n,s]=L.useState(()=>!!v?.settings?.invite?.enabled),c=m.loading||!$,{did:a}=v.meta,i=b?window.env?.gateway?.wafPolicy?.enabled:R?.routing.wafPolicy?.enabled;if(gt(v.status))return null;const u=v.environments.find(I=>I.key===se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE),g=!u||u.value==="yes",k=v.environments.find(I=>I.key===se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_TENANT_MODE)?.value||se.BLOCKLET_TENANT_MODES.SINGLE,w=(I,H)=>async N=>{if(!m.loading){f({loading:!0});try{const{checked:M}=N.target,{blocklet:q}=await _.configBlocklet({input:{did:v.meta.did,configs:[{key:se.BLOCKLET_CONFIGURABLE_KEY[I],value:H(M)}]}});C(q)}catch(M){Z.error(M.message)}finally{f({loading:!1})}}},d=w("BLOCKLET_DELETABLE",I=>I?"no":"yes"),x=w("BLOCKLET_APP_TENANT_MODE",I=>I?se.BLOCKLET_TENANT_MODES.MULTIPLE:se.BLOCKLET_TENANT_MODES.SINGLE),j=(I,H)=>async N=>{if(!m.loading){f({loading:!0});try{const M=N.target.checked;await _.updateBlockletSettings({input:I(M)}),H&&H(M)}catch(M){Z.error(M.message)}finally{f({loading:!1})}}},S=j(I=>({did:v.meta.did,invite:{enabled:I}}),s),O=j(I=>({did:v.meta.did,gateway:{wafPolicy:{enabled:I}}}),t),P=j(I=>({did:v.meta.did,enableSessionHardening:I}),I=>{o(I),ur()}),D=async()=>{if(!m.loading){f({loading:!0});try{const{blocklet:I}=await _.getBlocklet({input:{did:v.meta.did}});C(I)}catch(I){Z.error(I.message)}finally{f({loading:!1})}}};return e.jsxs(ie,{p:3,sx:{border:"1px solid red",borderRadius:2,p:3},className:"advanced-config",children:[!b&&e.jsxs(e.Fragment,{children:[e.jsx(z,{title:p("blocklet.config.deletable.name"),desc:p(g?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:!g,defaultChecked:!0,onChange:d})})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}})]}),e.jsx(xs,{inService:b,disabled:c,loading:m.loading,onChange:D}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),b&&e.jsx(Or,{role:"owner",children:I=>(I||Sn)&&e.jsxs(e.Fragment,{children:[e.jsx(z,{title:p("blocklet.config.vault.title"),desc:p("blocklet.config.vault.desc"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(te,{variant:"contained",color:"primary",size:"small","data-cy":"config-vault",onClick:()=>f({showConfigVault:!0}),children:[e.jsx(ls,{style:{fontSize:"1.3em",marginRight:4}}),p("blocklet.config.vault.title")]})})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),m.showConfigVault&&e.jsx(bs,{blocklet:v,onCancel:()=>f({showConfigVault:!1}),onSuccess:()=>f({showConfigVault:!1})}),e.jsx(z,{title:p("team.transferApp.name"),desc:p("team.transferApp.description"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsxs(te,{variant:"contained",edge:"end",color:"primary",size:"small","data-cy":"transfer-app",onClick:()=>f({showTransferOwner:!0}),children:[e.jsx(cn,{style:{fontSize:"1.3em",marginRight:4}}),p("team.transferApp.name")]})})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),m.showTransferOwner&&e.jsx(vs,{onCancel:()=>f({showTransferOwner:!1}),onSuccess:()=>f({showTransferOwner:!1})})]})}),e.jsx(z,{title:p("blocklet.config.clearCache.name"),desc:p("blocklet.config.clearCache.purpose"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(qr,{teamDid:a})})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(z,{title:p("blocklet.config.rotateSessionKey.name"),desc:p("blocklet.config.rotateSessionKey.purpose"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(Mr,{style:{whiteSpace:"nowrap"},teamDid:a})})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(z,{title:p("blocklet.config.tenantMode.name"),desc:p(`blocklet.config.tenantMode.${k}`),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:k===se.BLOCKLET_TENANT_MODES.MULTIPLE,onChange:x})})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(z,{title:p("team.invite.setting"),desc:p(`team.invite.${n?"enabled":"disabled"}`),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:n,onChange:S})})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(z,{title:e.jsxs(ie,{direction:"row",sx:{alignItems:"center",gap:1},children:[p("setting.form.enableSessionHardening.switchLabel"),e.jsx(X,{title:p("setting.form.enableSessionHardening.switchTips"),children:e.jsx(Rt,{sx:{ml:.5,fontSize:"20px"},color:"primary"})})]}),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:l,onChange:P})})}),i&&e.jsxs(e.Fragment,{children:[e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(z,{title:e.jsxs(ie,{direction:"row",sx:{alignItems:"center",gap:1},children:[p("router.gateway.wafPolicy.title"),e.jsx(X,{title:e.jsx(A,{sx:{fontSize:"14px",lineHeight:1.5},children:e.jsx(A,{sx:{color:"common.white",ml:.5},component:"a",href:`https://www.arcblock.io/docs/blocklet-developer/${r}/enable-web-application-firewall`,target:"_blank",rel:"noopener noreferrer",children:p("dashboard.document")})}),children:e.jsx(Rt,{fontSize:"small",color:"action",sx:{fontSize:16,cursor:"pointer"}})})]}),desc:p("router.gateway.wafPolicy.switchLabel"),children:e.jsx(A,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:e.jsx(pe,{disabled:c,checked:h,onChange:O})})})]})]})}const Pn=Ee(vt,"mutate_blocklets"),Tn=Ee(vt,"",pt);function In(v){const{inService:C}=ne();return C?e.jsx(Tn,{...v}):e.jsx(Pn,{...v})}vt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};function bt({blocklet:v,onUpdate:C=()=>{},hasPermission:$=!1,...R}){const{t:_}=L.useContext(ce);return gt(v.status)?null:e.jsxs(qn,{...R,children:[e.jsx(_n,{blocklet:v,onUpdate:C,hasPermission:$}),e.jsx(A,{sx:{mt:6},children:e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:_("blocklet.config.dangerZone")})}),e.jsx(A,{className:"config-form",component:ee,sx:{my:3}}),e.jsx(A,{sx:{maxWidth:1536},children:e.jsx(In,{blocklet:v,onUpdate:C,hasPermission:$})})]})}const En=Ee(bt,"mutate_blocklets"),Dn=Ee(bt,"",pt);function Ln(v){const{inService:C}=ne();return C?e.jsx(Dn,{...v}):e.jsx(En,{...v})}bt.propTypes={blocklet:T.object.isRequired,onUpdate:T.func,hasPermission:T.bool};const qn=xe(A)`
61
+ .config-form {
62
+ flex-grow: 1;
63
+ overflow-y: auto;
64
+ ${v=>v.theme.breakpoints.down("md")} {
65
+ width: 100%;
66
+ flex-shrink: 0;
67
+ padding: 0 24px;
68
+ transform: translate(0, 0);
69
+ }
70
+ }
71
+
72
+ .config-item {
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: space-between;
76
+ margin: 16px 0;
77
+ }
78
+
79
+ .config-label {
80
+ font-weight: bold;
81
+ }
82
+
83
+ .config-desc {
84
+ font-weight: normal;
85
+ font-size: 12px;
86
+ color: #666;
87
+ }
88
+
89
+ .form-item {
90
+ margin-top: 0;
91
+ }
92
+ `,jt={width:24,height:24,body:'<path fill="currentColor" d="M5 4v16V4v5v-5Zm3 10h2.675q.275-.575.638-1.075t.812-.925H8q-.425 0-.713.288T7 13q0 .425.288.713T8 14Zm0 4h2.075Q10 17.5 10 17t.075-1H8q-.425 0-.713.288T7 17q0 .425.288.713T8 18Zm-3 4q-.825 0-1.413-.588T3 20V4q0-.825.588-1.413T5 2h7.175q.4 0 .763.15t.637.425l4.85 4.85q.275.275.425.638t.15.762V10.3q-.475-.15-.975-.225T17 10V9h-4q-.425 0-.713-.288T12 8V4H5v16h5.675q.275.575.638 1.075t.812.925H5Zm12-10q2.075 0 3.538 1.463T22 17q0 2.075-1.463 3.538T17 22q-2.075 0-3.538-1.463T12 17q0-2.075 1.463-3.538T17 12Zm0 8q.275 0 .463-.188t.187-.462q0-.275-.187-.463T17 18.7q-.275 0-.463.188t-.187.462q0 .275.188.463T17 20Zm0-6q-.475 0-.875.238t-.65.637q-.1.15-.025.313t.25.237q.15.075.3 0t.275-.2q.125-.175.313-.275t.412-.1q.325 0 .563.213t.237.537q0 .275-.15.463t-.35.387q-.15.15-.313.3t-.287.35q-.075.15-.113.313t-.037.337q0 .225.125.413t.325.187q.2 0 .325-.15t.125-.35q0-.275.15-.488t.35-.412q.3-.275.525-.613t.225-.737q0-.675-.5-1.138T17 14Z"/>'},Xe={enabled:!1,domain:"",clientId:"",clientSecret:""};function Mn(){const{api:v}=ne(),{blocklet:C}=oe(),{t:$,locale:R}=ae(),_=C?.meta?.did,b=Object.assign({...Xe},C?.settings?.oauth?.auth0||{}),{handleSubmit:p,control:r,formState:m,watch:f,reset:h}=ve({defaultValues:Re(b,Object.keys(Xe))}),t=f("enabled"),l=E(async i=>{try{const{blocklet:u}=await v.configOAuth({input:{did:_,oauth:JSON.stringify({auth0:i})}}),g=Object.assign({...Xe},u?.settings?.oauth?.auth0||{});h(g),Z.success($("oauth.saveSuccess"))}catch(u){Z.error(u.message||$("oauth.saveFailed"))}}),o=E(i=>i?.trim()?!0:$("oauth.auth0.domainDescription")),n=E(i=>i?.trim()?!0:$("oauth.auth0.clientIdDescription")),s=E(i=>i?.trim()?!0:$("oauth.auth0.clientSecretDescription")),c=E(()=>!0),a=ge(()=>R==="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",[R]);return e.jsx(A,{children:e.jsxs("form",{onSubmit:p(l),disabled:!0,children:[e.jsx(z,{title:e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:$("oauth.auth0.enable")}),e.jsx(X,{title:$("oauth.viewDocument"),children:e.jsx(A,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:a,target:"_blank",rel:"noreferrer",children:e.jsx(Q,{icon:jt,fontSize:20})})})]}),mb:2.5,children:e.jsx(B,{name:"enabled",control:r,render:({field:i})=>e.jsx(K,{control:e.jsx(He,{sx:{ml:1},checked:i.value,...i})})})}),e.jsx(z,{title:$("oauth.auth0.domain"),children:e.jsx(B,{name:"domain",control:r,rules:{validate:t?o:c},render:({field:i})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...i,size:"small",label:$("oauth.auth0.domain"),error:!!m.errors[i.name],helperText:m.errors[i.name]?.message||" ",disabled:!t})})})}),e.jsx(z,{title:$("oauth.auth0.clientId"),children:e.jsx(B,{name:"clientId",control:r,rules:{validate:t?n:c},render:({field:i})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...i,size:"small",label:$("oauth.auth0.clientId"),error:!!m.errors[i.name],helperText:m.errors[i.name]?.message||" ",disabled:!t})})})}),e.jsx(z,{title:$("oauth.auth0.clientSecret"),children:e.jsx(B,{name:"clientSecret",control:r,rules:{validate:t?s:c},render:({field:i})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...i,size:"small",type:"password",label:$("oauth.auth0.clientSecret"),error:!!m.errors[i.name],helperText:m.errors[i.name]?.message||" ",disabled:!t})})})}),e.jsx(G,{type:"submit",variant:"contained",onSubmit:p(l),disabled:!m.isDirty,children:$("oauth.save")})]})})}const Qe={enabled:!1,clientId:"",clientSecret:""};function zn(){const{api:v}=ne(),{blocklet:C}=oe(),{t:$,locale:R}=ae(),_=C?.meta?.did,b=Object.assign({...Qe},C?.settings?.oauth?.github||{}),{handleSubmit:p,control:r,formState:m,watch:f,reset:h}=ve({defaultValues:Re(b,Object.keys(Qe))}),t=f("enabled"),l=E(async a=>{try{const{blocklet:i}=await v.configOAuth({input:{did:_,oauth:JSON.stringify({github:a})}}),u=Object.assign({...Qe},i?.settings?.oauth?.github||{});h(u),Z.success($("oauth.saveSuccess"))}catch(i){Z.error(i.message||$("oauth.saveFailed"))}}),o=E(a=>a?.trim()?!0:$("oauth.github.clientIdDescription")),n=E(a=>a?.trim()?!0:$("oauth.github.clientSecretDescription")),s=E(()=>!0),c=ge(()=>R==="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",[R]);return e.jsx(A,{children:e.jsxs("form",{onSubmit:p(l),disabled:!0,children:[e.jsx(z,{title:e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:$("oauth.github.enable")}),e.jsx(X,{title:$("oauth.viewDocument"),children:e.jsx(A,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:c,target:"_blank",rel:"noreferrer",children:e.jsx(Q,{icon:jt,fontSize:20})})})]}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(B,{name:"enabled",control:r,sx:{alignItems:"center"},render:({field:a})=>e.jsx(K,{control:e.jsx(He,{sx:{ml:1},size:"small",checked:a.value,...a})})})}),e.jsx(z,{title:$("oauth.github.clientId"),children:e.jsx(B,{name:"clientId",control:r,rules:{validate:t?o:s},render:({field:a})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...a,size:"small",label:$("oauth.github.clientId"),error:!!m.errors[a.name],helperText:m.errors[a.name]?.message||" ",disabled:!t})})})}),e.jsx(z,{title:$("oauth.github.clientSecret"),children:e.jsx(B,{name:"clientSecret",control:r,rules:{validate:t?n:s},render:({field:a})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...a,size:"small",type:"password",label:$("oauth.github.clientSecret"),error:!!m.errors[a.name],helperText:m.errors[a.name]?.message||" ",disabled:!t})})})}),e.jsx(G,{type:"submit",variant:"contained",onSubmit:p(l),disabled:!m.isDirty,children:$("oauth.save")})]})})}const et={enabled:!1,clientId:"",clientSecret:""};function Hn(){const{api:v}=ne(),{blocklet:C}=oe(),{t:$,locale:R}=ae(),_=C?.meta?.did,b=Object.assign({...et},C?.settings?.oauth?.google||{}),{handleSubmit:p,control:r,formState:m,watch:f,reset:h}=ve({defaultValues:Re(b,Object.keys(et))}),t=f("enabled"),l=E(async a=>{try{const{blocklet:i}=await v.configOAuth({input:{did:_,oauth:JSON.stringify({google:a})}}),u=Object.assign({...et},i?.settings?.oauth?.google||{});h(u),Z.success($("oauth.saveSuccess"))}catch(i){Z.error(i.message||$("oauth.saveFailed"))}}),o=E(a=>a?.trim()?!0:$("oauth.google.clientIdDescription")),n=E(a=>a?.trim()?!0:$("oauth.google.clientSecretDescription")),s=E(()=>!0),c=ge(()=>R==="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",[R]);return e.jsx(A,{children:e.jsxs("form",{onSubmit:p(l),disabled:!0,children:[e.jsx(z,{title:e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx("span",{children:$("oauth.google.enable")}),e.jsx(X,{title:$("oauth.viewDocument"),children:e.jsx(A,{component:"a",sx:{display:"inline-block",color:"inherit",fontSize:0,lineHeight:1},href:c,target:"_blank",rel:"noreferrer",children:e.jsx(Q,{icon:jt,fontSize:20})})})]}),mb:2.5,children:e.jsx(B,{name:"enabled",control:r,render:({field:a})=>e.jsx(K,{control:e.jsx(He,{sx:{ml:1},checked:a.value,...a})})})}),e.jsx(z,{title:$("oauth.google.clientId"),children:e.jsx(B,{name:"clientId",control:r,rules:{validate:t?o:s},render:({field:a})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...a,size:"small",label:$("oauth.google.clientId"),error:!!m.errors[a.name],helperText:m.errors[a.name]?.message||" ",disabled:!t})})})}),e.jsx(z,{title:$("oauth.google.clientSecret"),children:e.jsx(B,{name:"clientSecret",control:r,rules:{validate:t?n:s},render:({field:a})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...a,size:"small",type:"password",label:$("oauth.google.clientSecret"),error:!!m.errors[a.name],helperText:m.errors[a.name]?.message||" ",disabled:!t})})})}),e.jsx(G,{type:"submit",variant:"contained",onSubmit:p(l),disabled:!m.isDirty,children:$("oauth.save")})]})})}const tt={enabled:!1,teamId:"",serviceId:"",keyId:"",authKey:"",bundleId:""};function Bn(){const{api:v}=ne(),{blocklet:C}=oe(),{t:$}=ae(),R=C?.meta?.did,_=Object.assign({...tt},C?.settings?.oauth?.apple||{}),{handleSubmit:b,control:p,formState:r,watch:m,reset:f}=ve({defaultValues:Re(_,Object.keys(tt))}),h=m("enabled"),t=E(async i=>{try{const{blocklet:u}=await v.configOAuth({input:{did:R,oauth:JSON.stringify({apple:i})}}),g=Object.assign({...tt},u?.settings?.oauth?.apple||{});f(g),Z.success($("oauth.saveSuccess"))}catch(u){Z.error(u.message||$("oauth.saveFailed"))}}),l=E(i=>i?.trim()?!0:$("oauth.apple.teamIdDescription")),o=E(i=>i?.trim()?!0:$("oauth.apple.serviceIdDescription")),n=E(i=>i?.trim()?!0:$("oauth.apple.keyIdDescription")),s=E(i=>i?.trim()?!0:$("oauth.apple.authKeyDescription")),c=E(i=>i?.trim()?!0:$("oauth.apple.bundleIdDescription")),a=E(()=>!0);return e.jsx(A,{children:e.jsxs("form",{onSubmit:b(t),disabled:!0,children:[e.jsx(z,{title:$("oauth.apple.enable"),mb:2.5,children:e.jsx(B,{name:"enabled",control:p,render:({field:i})=>e.jsx(K,{control:e.jsx(He,{sx:{ml:1},checked:i.value,...i})})})}),e.jsx(z,{title:$("oauth.apple.teamId"),children:e.jsx(B,{name:"teamId",control:p,rules:{validate:h?l:a},render:({field:i})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...i,size:"small",label:$("oauth.apple.teamId"),error:!!r.errors[i.name],helperText:r.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(z,{title:$("oauth.apple.bundleId"),children:e.jsx(B,{name:"bundleId",control:p,rules:{validate:h?c:a},render:({field:i})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...i,size:"small",label:$("oauth.apple.bundleId"),error:!!r.errors[i.name],helperText:r.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(z,{title:$("oauth.apple.serviceId"),children:e.jsx(B,{name:"serviceId",control:p,rules:{validate:h?o:a},render:({field:i})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...i,size:"small",label:$("oauth.apple.serviceId"),error:!!r.errors[i.name],helperText:r.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(z,{title:$("oauth.apple.keyId"),children:e.jsx(B,{name:"keyId",control:p,rules:{validate:h?n:a},render:({field:i})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...i,size:"small",label:$("oauth.apple.keyId"),error:!!r.errors[i.name],helperText:r.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(z,{title:$("oauth.apple.authKey"),children:e.jsx(B,{name:"authKey",control:p,rules:{validate:h?s:a},render:({field:i})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...i,size:"small",type:"password",label:$("oauth.apple.authKey"),multiline:!0,rows:4,error:!!r.errors[i.name],helperText:r.errors[i.name]?.message||" ",disabled:!h})})})}),e.jsx(G,{type:"submit",variant:"contained",onSubmit:b(t),disabled:!r.isDirty,children:$("oauth.save")})]})})}const st={enabled:!1,clientId:"",clientSecret:""};function Fn(){const{api:v}=ne(),{blocklet:C}=oe(),{t:$}=ae(),R=C?.meta?.did,_=Object.assign({...st},C?.settings?.oauth?.twitter||{}),{handleSubmit:b,control:p,formState:r,watch:m,reset:f}=ve({defaultValues:Re(_,Object.keys(st))}),h=m("enabled"),t=E(async s=>{try{const{blocklet:c}=await v.configOAuth({input:{did:R,oauth:JSON.stringify({twitter:s})}}),a=Object.assign({...st},c?.settings?.oauth?.twitter||{});f(a),Z.success($("oauth.saveSuccess"))}catch(c){Z.error(c.message||$("oauth.saveFailed"))}}),l=E(s=>s?.trim()?!0:$("oauth.twitter.clientIdDescription")),o=E(s=>s?.trim()?!0:$("oauth.twitter.clientSecretDescription")),n=E(()=>!0);return e.jsx(A,{children:e.jsxs("form",{onSubmit:b(t),disabled:!0,children:[e.jsx(z,{title:e.jsx(A,{sx:{display:"flex",alignItems:"center",gap:1},children:e.jsx("span",{children:$("oauth.twitter.enable")})}),mb:2.5,sx:{"& .section-content":{alignItems:"center"}},children:e.jsx(B,{name:"enabled",control:p,sx:{alignItems:"center"},render:({field:s})=>e.jsx(K,{control:e.jsx(He,{sx:{ml:1},size:"small",checked:s.value,...s})})})}),e.jsx(z,{title:$("oauth.twitter.clientId"),children:e.jsx(B,{name:"clientId",control:p,rules:{validate:h?l:n},render:({field:s})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...s,size:"small",label:$("oauth.twitter.clientId"),error:!!r.errors[s.name],helperText:r.errors[s.name]?.message||" ",disabled:!h})})})}),e.jsx(z,{title:$("oauth.twitter.clientSecret"),children:e.jsx(B,{name:"clientSecret",control:p,rules:{validate:h?o:n},render:({field:s})=>e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{...s,size:"small",type:"password",label:$("oauth.twitter.clientSecret"),error:!!r.errors[s.name],helperText:r.errors[s.name]?.message||" ",disabled:!h})})})}),e.jsx(G,{type:"submit",variant:"contained",onSubmit:b(t),disabled:!r.isDirty,children:$("oauth.save")})]})})}const Nn={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"/>'};function js({id:v,title:C,children:$,index:R,onMove:_,defaultExpand:b=!1,onEnd:p,icon:r=null}){const[m,f]=L.useState(b),h=L.useRef(null),t=L.useRef(null),[{handlerId:l},o]=Zr({accept:"dragItem",collect(i){return{handlerId:i.getHandlerId()}},hover(i,u){if(!h.current)return;const g=i.index,y=R;if(g===y)return;const k=h.current?.getBoundingClientRect(),w=t.current?.getBoundingClientRect(),d=(w.bottom-w.top)/2,j=u.getClientOffset().y-k.top;g<y&&j<d||g>y&&j>d||(_(g,y),i.index=y)}}),[{isDragging:n},s]=Vr({item:{index:R,type:"dragItem"},collect:i=>({isDragging:i.isDragging()}),end:p});s(t),o(h);const c=n?.5:1,a=E(i=>{i.preventDefault(),i.stopPropagation(),f(!m)});return e.jsxs(A,{ref:h,children:[e.jsxs(A,{sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.100"}},ref:t,"data-handler-id":l,children:[e.jsxs(A,{sx:{py:2,px:1,opacity:c,display:"flex",alignItems:"center",gap:.5},draggable:!1,onClick:a,children:[e.jsx(A,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:"text.hint","&:hover":{color:"text.secondary"}},children:e.jsx(Q,{fontSize:20,icon:Nn})}),e.jsx(A,{sx:{display:"flex",alignItems:"center",flexShrink:0,mr:.5,transform:"translateY(-1px)"},children:r}),e.jsx(J,{sx:{flex:1},children:C}),e.jsx(re,{size:"small",sx:{pointerEvents:"auto",transform:m?"":"rotate(180deg)",transition:"transform 0.3s ease"},children:e.jsx(Q,{icon:Fr,style:{transform:"scale(1.5)"}})})]}),e.jsx(ee,{})]}),e.jsx(A,{sx:{pl:4,py:2.5,display:m?"block":"none"},children:$})]})}js.propTypes={title:T.string.isRequired,id:T.string.isRequired,children:T.node.isRequired,index:T.number.isRequired,onMove:T.func.isRequired,onEnd:T.func.isRequired,defaultExpand:T.bool,icon:T.any};const Zn=[{name:"github",title:"GitHub",icon:e.jsx(qe,{provider:"github",sx:{width:20,height:20}}),component:e.jsx(zn,{})},{name:"google",title:"Google",icon:e.jsx(qe,{provider:"google",sx:{width:20,height:20}}),component:e.jsx(Hn,{})},{name:"apple",title:"Apple",icon:e.jsx(qe,{provider:"apple",sx:{width:20,height:20}}),component:e.jsx(Bn,{})},{name:"twitter",title:"Twitter",icon:e.jsx(qe,{provider:"twitter",sx:{width:20,height:20}}),component:e.jsx(Fn,{})},{name:"auth0",title:"Auth0",icon:e.jsx(qe,{provider:"auth0",sx:{width:20,height:20}}),component:e.jsx(Mn,{})}],Vn=["github","google","apple","twitter","auth0"];function Un(){const{api:v}=ne(),{blocklet:C}=oe(),$=C?.meta?.did,R=C?.settings?.oauth||{},_=Object.keys(R).sort((t,l)=>R[t]?.order!==void 0&&R[l]?.order!==void 0?R[t].order-R[l].order:R[t]?.order!==void 0?-1:1);for(const t of Vn)_.includes(t)||_.push(t);const b=ye(_.reduce((t,l,o)=>Object.assign(t,{[l]:o}),{})),p=ge(()=>{const t=[...Zn];return t.sort((l,o)=>b[l.name]-b[o.name]),t.map(l=>({...l,enabled:R[l.name]?.enabled??!1}))},[b.auth0,b.github,b.google]),r={};typeof window<"u"&&(r.context=window);const m=E(async t=>{const l={};Object.keys(t).forEach(o=>{l[o]={order:t[o]}}),await v.configOAuth({input:{did:$,oauth:JSON.stringify(l)}})}),f=E((t,l)=>{const o=p[t],n=p[l];b[o.name]=l,b[n.name]=t}),h=E(async()=>{await m(b)});return e.jsx(A,{sx:{".section-left":{width:"180px"}},children:e.jsx(Ur,{backend:Wr,...r,children:p.map((t,l)=>e.jsx(js,{index:l,id:t.name,title:t.title,icon:t.icon,onMove:f,onEnd:h,defaultExpand:t.enabled,children:t.component},t.name))})})}const Se={ttl:W.SESSION_TTL,cacheTtl:W.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 he(v){return e.jsx(Jr,{...v,sx:{transform:"scale(0.75)"}})}function rt(v,C=!1){const $=C?v.ttl*86400:v.ttl/86400;return{...v,ttl:$}}function Wn(){const{api:v}=ne(),{blocklet:C}=oe(),$=C?.meta?.did,R=hr({},Se,C?.settings?.session||{});Je(R.ttl)&&(R.ttl=Se.ttl),Je(R.cacheTtl)&&(R.cacheTtl=Se.cacheTtl),R.phone||(R.phone=Se.phone),R.email||(R.email=Se.email),Je(R.enableBlacklist)&&(R.enableBlacklist=Se.enableBlacklist);const{handleSubmit:_,control:b,formState:p,reset:r,watch:m}=ve({defaultValues:Re(rt(R),["ttl","cacheTtl","email","phone","enableBlacklist"])}),{t:f}=ae(),h=m("email.enabled"),t=m("phone.enabled"),l=m("email.enableDomainBlackList"),o=m("email.enableDomainWhiteList"),{fields:n,append:s,remove:c}=Tt({control:b,name:"email.domainBlackList"}),{fields:a,append:i,remove:u}=Tt({control:b,name:"email.domainWhiteList"}),g=E(async y=>{try{const{blocklet:k}=await v.updateAppSessionConfig({input:{did:$,config:Ie(rt(y,!0),["phone"])}}),w=Object.assign({},Se,Re(k?.settings?.session||{},["ttl","cacheTtl","email","phone","enableBlacklist"]));r(rt(w)),Z.success(f("common.configSuccess"))}catch(k){Z.error(k.message)}});return e.jsx(Jn,{onSubmit:_(g),children:e.jsxs(ie,{direction:"column",sx:{gap:6},children:[e.jsxs(A,{children:[e.jsxs(A,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.profile")}),e.jsx(A,{component:ee,sx:{my:3}})]}),e.jsxs(ie,{sx:{gap:2},children:[e.jsx(z,{title:f("blocklet.config.session.fullNameEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(he,{disabled:!0,checked:!0})})}),e.jsx(z,{title:f("blocklet.config.session.avatarEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(he,{disabled:!0,checked:!0})})}),e.jsx(z,{title:f("blocklet.config.session.emailEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.enabled",control:b,render:({field:y})=>e.jsx(he,{...y,checked:y.value})})})}),h&&e.jsxs(ie,{direction:"column",sx:{ml:2},children:[e.jsx(z,{title:f("blocklet.config.session.emailRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.requireVerified",control:b,render:({field:y})=>e.jsx(K,{sx:{mt:1},control:e.jsx(he,{...y,checked:y.value})})})})}),e.jsx(z,{title:f("blocklet.config.session.emailRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.requireUnique",control:b,render:({field:y})=>e.jsx(K,{sx:{mt:1},control:e.jsx(he,{...y,checked:y.value})})})})}),e.jsx(z,{title:f("blocklet.config.session.emailTrustOauthProviders"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.trustOauthProviders",control:b,render:({field:y})=>e.jsx(K,{sx:{mt:1},control:e.jsx(he,{...y,checked:y.value})})})})}),e.jsx(z,{title:f("blocklet.config.session.enableDomainBlackList"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.enableDomainBlackList",control:b,render:({field:y})=>e.jsx(K,{sx:{mt:1},control:e.jsx(he,{...y,checked:y.value})})})})}),l&&e.jsxs(A,{children:[n.map((y,k)=>e.jsxs(ie,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(B,{name:`email.domainBlackList.${k}`,control:b,render:w=>e.jsx(V,{...w.field,size:"small",fullWidth:!0})}),e.jsx(re,{onClick:()=>c(k),children:e.jsx(It,{})})]},y.id)),e.jsx(G,{startIcon:e.jsx(Et,{}),onClick:()=>s(""),children:f("blocklet.config.session.addDomain")})]}),e.jsx(z,{title:f("blocklet.config.session.enableDomainWhiteList"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"email.enableDomainWhiteList",control:b,render:({field:y})=>e.jsx(K,{sx:{mt:1},control:e.jsx(he,{...y,checked:y.value})})})})}),o&&e.jsxs(A,{children:[a.map((y,k)=>e.jsxs(ie,{direction:"row",sx:{alignItems:"center",my:1,maxWidth:"720px"},children:[e.jsx(B,{name:`email.domainWhiteList.${k}`,control:b,render:w=>e.jsx(V,{...w.field,size:"small",fullWidth:!0})}),e.jsx(re,{onClick:()=>u(k),children:e.jsx(It,{})})]},y.id)),e.jsx(G,{startIcon:e.jsx(Et,{}),onClick:()=>i(""),children:f("blocklet.config.session.addDomain")})]})]}),e.jsxs(A,{sx:{display:"none"},children:[e.jsx(z,{title:f("blocklet.config.session.phoneEnabled"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"phone.enabled",control:b,disabled:!0,render:({field:y})=>e.jsx(K,{sx:{mt:1},control:e.jsx(he,{...y,checked:y.value})})})})}),t&&e.jsxs(ie,{direction:"column",sx:{ml:2,mt:1},children:[e.jsx(z,{title:f("blocklet.config.session.phoneRequireVerified"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"phone.requireVerified",control:b,render:({field:y})=>e.jsx(K,{control:e.jsx(he,{...y,checked:y.value})})})})}),e.jsx(z,{title:f("blocklet.config.session.phoneRequireUnique"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"phone.requireUnique",control:b,render:({field:y})=>e.jsx(K,{control:e.jsx(he,{...y,checked:y.value})})})})})]})]})]})]}),e.jsxs(A,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.period")}),e.jsx(A,{component:ee,sx:{my:3}}),e.jsx(ie,{direction:"column",spacing:2,children:e.jsx(B,{name:"ttl",control:b,rules:{min:1,max:30},render:({field:y})=>e.jsx(Y,{fullWidth:!0,sx:{mb:2},children:e.jsx(z,{title:f("blocklet.config.session.ttl",{day:y.value}),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{width:"100%",maxWidth:500,px:1.5},children:e.jsx(Kr,{...y,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(A,{children:[e.jsx(J,{variant:"h6",sx:{fontWeight:600},children:f("blocklet.config.session.experimentalSettings")}),e.jsx(A,{component:ee,sx:{my:3}}),e.jsx(ie,{direction:"column",spacing:2,children:e.jsx(z,{title:f("blocklet.config.session.enableBlacklist"),sectionLeftSx:{width:"600px"},children:e.jsx(A,{sx:{alignSelf:"flex-start"},children:e.jsx(B,{name:"enableBlacklist",control:b,render:({field:y})=>e.jsx(K,{sx:{mt:1},control:e.jsx(he,{...y,checked:y.value})})})})})})]}),e.jsx(A,{children:e.jsx(G,{type:"submit",variant:"contained",disabled:!p.isDirty,children:f("oauth.save")})})]})})}const Jn=xe.form`
93
+ max-width: 1536px;
94
+
95
+ .advanced-config {
96
+ border: 0;
97
+ padding: 0;
98
+ }
99
+
100
+ .config-form {
101
+ flex-grow: 1;
102
+ overflow-y: auto;
103
+ will-change: transform;
104
+
105
+ &:first-child {
106
+ margin: 0;
107
+ }
108
+
109
+ ${v=>v.theme.breakpoints.down("md")} {
110
+ width: 100%;
111
+ flex-shrink: 0;
112
+ padding: 0 24px;
113
+ transform: translate(0, 0);
114
+ }
115
+ }
116
+
117
+ .config-item {
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: space-between;
121
+ }
122
+
123
+ .config-desc {
124
+ font-weight: normal;
125
+ font-size: 12px;
126
+ color: #666;
127
+ }
128
+
129
+ .form-item {
130
+ margin-top: 0;
131
+ }
132
+ `,Kn={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 nt,Bt;function Gn(){if(Bt)return nt;Bt=1;const{DEFAULT_IP_DOMAIN_SUFFIX:v,SLOT_FOR_IP_DNS_SITE:C,DEFAULT_DID_DOMAIN:$}=fr(),{encode:R}=mr();return nt={getIpDnsDomainForBlocklet:p=>`${R(p.meta.did)}-${C}.${v}`,getDidDomainForBlocklet:({did:p,didDomain:r=$})=>`${R(p)}.${r}`},nt}var Yn=Gn();function _s({ref:v=null}){const{t:C}=L.useContext(ce),{blocklet:$}=oe(),{api:R}=ne(),_=ye({loadingReject:!1,loadingApprove:!1,mode:"view",show:!1,data:{},callback:de}),p=$e()?.transitions?.duration?.leavingScreen||300,r=E(()=>{_.mode="view",_.data={},_.callback=de}),m=E(()=>{_.show=!1,setTimeout(()=>{r()},p)}),f=E(s=>{_.mode="view",_.show=!0,_.data=s}),h=E((s,c=de)=>{_.mode="approve",_.show=!0,_.data=s,_.callback=c});L.useImperativeHandle(v,()=>({open:f,close:m,approve:h}),[f,m,h]);const t=ge(()=>{if(!_.show)return[];_.data.migratedFrom=[_.data.appId,_.data.appPid];const s=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return _.data.isMaster!==!1&&fn(s,"appliedAt","status"),s.map(c=>{const a=C(`federated.info.${c}`);let i=_.data[c];if(c==="appName"&&_.data.isMaster&&(i=e.jsxs(A,{children:[e.jsx(Gt,{component:cs}),i]})),["appId","appPid","serverId"].includes(c)&&(i=e.jsx(lt,{children:i})),["appUrl"].includes(c)&&(i=e.jsx(A,{component:"a",href:i,target:"_blank",children:i})),["appLogo"].includes(c)){const u=Kt(`https://${Yn.getDidDomainForBlocklet({did:_.data.appPid})}`,W.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo");try{const g=new URL(u);g.searchParams.set("imageFilter","resize"),g.searchParams.set("w","80"),g.searchParams.set("h","80"),i=e.jsx("img",{src:g.href,width:"60",height:"60",alt:_.data.appName})}catch{i=e.jsx("img",{src:u,width:"60",height:"60",alt:_.data.appName})}}return c==="status"&&(i=i&&C(`federated.status.${i}`)),c==="migratedFrom"&&(i=(_.data.migratedFrom||[]).filter(y=>![_.data.appId,_.data.appPid].includes(y)).map(y=>e.jsx(lt,{children:y}))),pr(i)&&(i="-"),{name:a,value:i}})},[_.data]),l=_.mode==="approve",o=E(async()=>{try{_.loadingReject=!0,await R.auditFederatedLogin({input:{memberPid:_.data.appPid,did:$.appPid,status:"rejected"}}),m(),_?.callback(!1)}finally{_.loadingReject=!1}}),n=E(async()=>{try{_.loadingApprove=!0,await R.auditFederatedLogin({input:{memberPid:_.data.appPid,did:$.appPid,status:"approved"}}),m(),_?.callback(!0)}finally{_.loadingApprove=!1}});return e.jsx(ke,{open:_.show,title:C(l?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:m,actions:l?e.jsxs(e.Fragment,{children:[e.jsxs(G,{color:"error",variant:"contained",onClick:o,disabled:_.loadingReject,children:[_.loadingReject?e.jsx(Ce,{size:16,color:"grey"}):null,C("common.reject")]}),e.jsxs(G,{variant:"contained",onClick:n,disabled:_.loadingApprove,children:[_.loadingApprove?e.jsx(Ce,{size:16,color:"grey"}):null,C("common.approve")]})]}):e.jsx(G,{variant:"outlined",onClick:m,children:C("common.close")}),children:t.map(s=>e.jsx(ns,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:s.name,children:s.value},s.name))})}_s.propTypes={ref:T.any};function _t({ref:v=null}){const $=$e()?.transitions?.duration?.leavingScreen||300,{t:R}=L.useContext(ce),_=ye({show:!1,data:{link:""}}),b=E(()=>{_.data.link=""}),p=E(()=>{_.show=!1,setTimeout(()=>{b()},$)}),r=E(({link:f})=>{_.show=!0,_.data.link=f});L.useImperativeHandle(v,()=>({open:r,close:p}),[r,p]);const m=E(()=>{gr(_.data.link),p()});return e.jsxs(ke,{open:_.show,title:R("federated.joinFederatedLogin"),onClose:p,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(te,{color:"primary",autoFocus:!0,variant:"contained",onClick:m,children:R("common.copyAndClose")}),children:[e.jsx(A,{sx:{mb:1},children:R("federated.inviteJoinFederatedLoginDescription")}),e.jsx(A,{sx:{"& .copy-button":{display:"none !important"}},children:e.jsx(Gr,{language:"shell",style:{marginBottom:0},children:_.data.link})})]})}_t.propTypes={ref:T.any};function ws({mode:v="member"}){const C=L.useRef(null),$=L.useRef(null),{t:R,locale:_}=L.useContext(ce),{blocklet:b,actions:{refreshBlocklet:p}}=oe(),{confirmApi:r,confirmHolder:m}=Ze(),{api:f}=ne(),h=b.settings.federated?.sites||[],t=b.settings.federated?.config||{},l=t.isMaster!==!1,o=h.find(S=>S.appPid===b.appPid),n=ye({loadingSync:!1}),s=E(S=>{$.current?.open(S)}),c=E(S=>{$.current?.approve(S,p)}),a=E(S=>{r.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:b.appPid,targetDid:S.appPid}}),O()}})}),i=E(S=>{r.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:S.appPid,did:b.appPid,status:"revoked"}}),O()}})}),u=E(S=>{r.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:S.appPid,did:b.appPid,status:"approved"}}),O()}})}),g=ge(()=>{const S=[{label:R("common.name"),name:"appName",options:{customBodyRenderLite:O=>{const P=h[O],D=P.isMaster!==!1;return e.jsx(A,{sx:{display:"inline-block"},children:e.jsxs(A,{component:"a",href:P.appUrl,target:"_blank",onClick:I=>{I.stopPropagation()},sx:{display:"flex",alignItems:"center"},children:[D&&e.jsx(Gt,{component:cs,style:{marginRight:"4px"}}),P.appName]})})}}},{label:R("common.did"),name:"appId",options:{customBodyRenderLite:O=>{const P=h[O];return e.jsx(lt,{children:P.appId})}}},{label:R("common.status"),name:"status",options:{customBodyRenderLite:O=>{const P=h[O],D=P.isMaster!==!1;return e.jsx(A,{children:D?"-":R(`federated.status.${P.status}`)})}}}];return l&&S.push({label:R("common.actions"),name:"actions",options:{customBodyRenderLite:O=>{const P=h[O],D=P.isMaster!==!1;return e.jsx(A,{sx:{display:"flex",gap:1},children:D?e.jsxs(e.Fragment,{children:[P.status==="rejected"&&e.jsx(te,{variant:"contained",color:"error",size:"small",onClick:I=>{I.stopPropagation()},children:R("federated.status.rejected")}),P.status==="revoked"&&e.jsx(te,{variant:"contained",color:"secondary",size:"small",onClick:I=>{I.stopPropagation()},children:R("federated.status.revoked")})]}):e.jsxs(e.Fragment,{children:[e.jsx(te,{variant:"contained",color:"error",size:"small",onClick:I=>{I.stopPropagation(),a(P)},children:R("federated.quitMember")},"quiteSite"),P.status==="pending"&&e.jsx(te,{variant:"contained",color:"primary",size:"small",onClick:I=>{I.stopPropagation(),c(P)},children:R("federated.status.pending")},"auditSite"),P.status==="approved"&&e.jsx(te,{variant:"contained",color:"error",size:"small",onClick:I=>{I.stopPropagation(),i(P)},style:{whiteSpace:"nowrap"},children:R("federated.revoke")},"revokeSite"),P.status==="revoked"&&e.jsx(te,{variant:"contained",color:"warning",size:"small",onClick:I=>{I.stopPropagation(),u(P)},style:{whiteSpace:"nowrap"},children:R("federated.approve")},"approveSite")]})})}}}),S},[t.appId,h,l,R]),y=ge(()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(S,{dataIndex:O}){const P=h[O];s(P)}}),[]),k=E(()=>{const S=b.environments.find(O=>O.key===se.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL);S?.value?C.current?.open({link:S.value}):Z.error(R("federated.failedToGetFederatedLoginLink"))},[b.site?.domainAliases?.[0]?.href]),w=E(()=>{r.open({title:R("federated.quitFederatedLogin"),content:R("federated.quitFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(S){await f.quitFederatedLogin({input:{did:b.appPid}}),S()}})}),d=E(()=>{r.open({title:R("federated.disbandFederatedLogin"),content:R("federated.disbandFederatedLoginDescription"),confirmButtonText:R("common.confirm"),cancelButtonText:R("common.cancel"),confirmButtonProps:{color:"error"},async onConfirm(S){await f.disbandFederatedLogin({input:{did:b.appPid}}),S()}})}),x=E(async()=>{try{n.loadingSync=!0,await Promise.all([await f.syncFederatedConfig({input:{did:b.appPid}}),yr(500)]),Z.success(R("common.succeeded"))}finally{n.loadingSync=!1}}),j=[];return o.status!=="pending"&&j.push(e.jsx(X,{title:R("federated.syncConfig"),children:e.jsx(re,{size:"small",onClick:x,disabled:n.loadingSync,sx:[{"@keyframes spin":{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}},n.loadingSync?{animation:"spin 1s linear infinite"}:{}],children:e.jsx(Q,{icon:Kn,style:{fontSize:24}})},"syncConfig")})),v==="master"?(j.push(e.jsx(te,{size:"small",variant:"contained",onClick:k,sx:{ml:1},children:R("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),j.push(e.jsx(te,{color:"error",size:"small",variant:"contained",onClick:d,sx:{ml:1},children:R("federated.disbandFederatedLogin")},"disbandFederatedLogin"))):j.push(e.jsx(te,{size:"small",variant:"contained",color:"error",onClick:w,sx:{ml:1},children:R("federated.quitFederatedLogin")},"quitFederatedLogin")),e.jsxs(e.Fragment,{children:[e.jsx(Ue,{className:"main-table",locale:_,data:h,columns:g,customButtons:j,title:e.jsx(A,{className:"table-toolbar-left",children:R("oauth.federated")}),options:y}),m,e.jsx(_t,{ref:C}),e.jsx(_s,{ref:$})]})}ws.propTypes={mode:T.oneOf(["member","master"])};function ks({ref:v=null}){const{t:C}=L.useContext(ce),{api:$}=ne(),{blocklet:R}=oe(),_=R?.appPid,p=$e()?.transitions?.duration?.leavingScreen||300,r=ye({loading:!1,show:!1,appUrl:"",appUrlError:"",callback:de}),m=E(()=>{r.appUrl="",r.appUrlError="",r.callback=de}),f=E(()=>{r.show=!1,setTimeout(()=>{m()},p)}),h=E((o=de)=>{r.show=!0,r.callback=o});L.useImperativeHandle(v,()=>({open:h,close:f}),[h,f]);const t=E(o=>{if(!o)throw new Error(C("federated.federatedJoinAppUrlRequired"));if(!xr(o))throw new Error(C("federated.federatedJoinAppUrlInvalid"))}),l=E(async()=>{try{t(r.appUrl),r.loading=!0;const o=await $.joinFederatedLogin({input:{did:_,appUrl:r.appUrl}});r.show=!1,f(),r?.callback(o)}catch(o){r.appUrlError=o.message}finally{r.loading=!1}});return e.jsxs(ke,{open:r.show,title:C("federated.joinFederatedLogin"),onClose:f,PaperProps:{style:{minHeight:"unset"}},actions:e.jsxs(te,{color:"primary",autoFocus:!0,variant:"contained",onClick:l,disabled:r.loading,children:[r.loading?e.jsx(Ce,{size:16,sx:{mr:1},color:"grey"}):null,C("common.confirm")]}),children:[e.jsx(A,{sx:{mb:1},children:C("federated.joinFederatedLoginDescription")}),e.jsx(V,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:C("federated.federatedJoinAppUrl"),label:C("federated.federatedJoinAppUrl"),value:r.appUrl,error:!!r.appUrlError,helperText:r.appUrlError||"eg: https://www.arcblock.io",onChange:o=>{r.appUrl=o.target.value}})]})}ks.propTypes={ref:T.any};function Xn(){const{t:v}=L.useContext(ce);return e.jsxs(ie,{direction:"row",spacing:2,sx:{alignItems:"flex-start",p:2},children:[e.jsx(Qr,{fontSize:"large",color:"primary"}),e.jsxs(A,{children:[e.jsx(J,{variant:"h6",gutterBottom:!0,children:v("federated.title")}),e.jsx(J,{variant:"body2",sx:{color:"text.secondary"},children:v("federated.description")}),e.jsx(vr,{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:v("federated.link")})]})]})}function Qn(){const v=L.useRef(null),C=L.useRef(null),{t:$}=L.useContext(ce),{blocklet:R,actions:{refreshBlocklet:_}}=oe(),b=E(()=>{const r=R.site?.domainAliases?.[0]?.href;if(r)try{const m=new URL(r);v.current?.open({link:m.origin})}catch{Z.error($("federated.failedToGetFederatedLoginLink"))}},[R.site?.domainAliases?.[0]?.href]),p=E(()=>{C.current?.open(()=>{_()})});if(R.settings.federated?.sites.length>0){const r=R.settings.federated?.config.isMaster!==!1;return e.jsx(ws,{mode:r?"master":"member"})}return e.jsxs(e.Fragment,{children:[e.jsx(A,{sx:{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px"},children:e.jsxs(A,{sx:{maxWidth:400,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(Xn,{}),e.jsx(ee,{sx:{width:1}}),e.jsxs(ie,{sx:{width:1,p:2,gap:1.5},children:[e.jsx(te,{variant:"contained",onClick:b,sx:{width:1},children:$("federated.inviteJoinFederatedLogin")}),e.jsx(te,{variant:"outlined",onClick:p,sx:{width:1},children:$("federated.joinFederatedLogin")})]})]})}),e.jsx(_t,{ref:v}),e.jsx(ks,{ref:C})]})}function Ss({orientation:v="horizontal"}){const{t:C}=L.useContext(ce),$=os({key:"lg"}),R=[{label:e.jsx(A,{sx:{textAlign:"center",width:"100%"},children:C("oauth.commonSettings")}),value:"settings"},{label:e.jsx(A,{sx:{textAlign:"center",width:"100%"},children:C("oauth.federated")}),value:"federated"},{label:e.jsx(A,{sx:{textAlign:"center",width:"100%"},children:C("oauth.oauth")}),value:"oauth"},{label:e.jsx(A,{sx:{textAlign:"center",width:"100%"},children:C("oauth.moreLogin")}),value:"more"}],[_,b]=L.useState(R[0].value),p=ge(()=>({oauth:e.jsx(Un,{}),federated:e.jsx(Qn,{}),more:e.jsx(Nr,{children:C("oauth.comingSoon")}),settings:e.jsx(Wn,{})}),[C]);return v==="vertical"?e.jsx(ea,{children:e.jsxs(ie,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(A,{sx:{minWidth:"240px",flexShrink:0},children:e.jsx(Ne,{tabs:R,current:_,orientation:$?"horizontal":"vertical",onChange:b,sx:{borderRight:$?0:1,height:"100%",borderColor:"divider"}})}),e.jsx(A,{sx:{flexGrow:1,minWidth:0},children:e.jsx(A,{sx:{maxWidth:"1200px"},children:p[_]})})]})}):e.jsxs(A,{children:[e.jsx(Ne,{tabs:R,current:_,onChange:b}),e.jsx(A,{sx:{marginTop:"10px"},children:p[_]})]})}Ss.propTypes={orientation:T.oneOf(["horizontal","vertical"])};const ea=xe.div`
133
+ .MuiTab-root {
134
+ text-align: left;
135
+ align-items: flex-start;
136
+ font-weight: normal;
137
+
138
+ div {
139
+ text-align: left;
140
+ }
141
+ }
142
+
143
+ .Mui-selected {
144
+ font-weight: bold;
145
+ }
146
+ `,ta={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"/>'},sa={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"/>'},wt={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"/>'},kt={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 Cs({enabled:v,showUp:C=!0,showDown:$=!0,showSwitch:R=!0,showDelete:_=!0,showEdit:b=!0,disableEdit:p=!1,disableSwitch:r=!1,onClickUp:m=()=>{},onClickDown:f=()=>{},onClickSwitch:h=()=>{},onClickDelete:t=()=>{},onClickEdit:l=()=>{}}){const{t:o}=ae();return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:0},onClick:n=>n.stopPropagation(),children:[b?e.jsx(X,{title:o("common.edit"),children:e.jsx(re,{size:"small",onClick:l,color:"success",disabled:p,children:e.jsx(Q,{icon:kt,fontSize:18})})}):null,_?e.jsx(X,{title:o("common.delete"),children:e.jsx(re,{size:"small",onClick:t,color:"error",children:e.jsx(Q,{icon:wt,fontSize:18})})}):null,R?e.jsx(X,{title:o(v?"common.enabled":"common.disabled"),children:e.jsx(pe,{size:"small",checked:v,onClick:h,disabled:r})}):null,C?e.jsx(X,{title:o("common.moveUp"),children:e.jsx(re,{size:"small",onClick:m,disabled:p,children:e.jsx(Q,{icon:sa,fontSize:20})})}):null,$?e.jsx(X,{title:o("common.moveDown"),children:e.jsx(re,{size:"small",onClick:f,disabled:p,children:e.jsx(Q,{icon:ta,fontSize:20})})}):null]})}Cs.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 Rs({ref:v=null}){const{t:C}=L.useContext(ce),{blocklet:$}=oe(),{api:R}=ne(),_=$?.meta?.did,p=$e()?.transitions?.duration?.leavingScreen||300,r=ye({mode:"add",show:!1,isDefaultRule:!1,callback:de,get dialogTitle(){return this.mode==="edit"?C("securityRule.edit"):this.mode==="view"?C("securityRule.view"):C("securityRule.add")}}),m=ze(async()=>{const{accessPolicies:S}=await R.getBlockletAccessPolicies({input:{did:_}});return Be(S,O=>O.isProtected?1:0)},{manual:!0}),f=ze(async()=>{const{responseHeaderPolicies:S}=await R.getBlockletResponseHeaderPolicies({input:{did:_}});return Be(S,O=>O.isProtected?1:0)},{manual:!0}),{handleSubmit:h,control:t,watch:l,setValue:o,getValues:n,reset:s,formState:{errors:c}}=ve({mode:"onChange",defaultValues:{componentDid:"",pathPattern:"",responseHeaderPolicyId:"",accessPolicyId:"",remark:""}}),a=E(()=>{s(),r.mode="add"}),i=E(()=>{r.show=!1,setTimeout(()=>{a()},p)}),u=E((S,O=null)=>{r.show=!0,O&&(r.isDefaultRule=O.id===W.SECURITY_RULE_DEFAULT_ID,r.mode="edit",o("componentDid",O.componentDid),o("pathPattern",O.pathPattern),o("responseHeaderPolicyId",O.responseHeaderPolicyId),o("accessPolicyId",O.accessPolicyId),o("remark",O.remark||"")),S?r.callback=S:r.mode="view",m.run(),f.run()});L.useImperativeHandle(v,()=>({open:u,close:i}),[u,i]);const g=E(()=>{const[S,O]=n(["accessPolicyId","responseHeaderPolicyId"]);return!S&&!O?C("securityRule.form.accessPolicyOrResponseHeaderPolicyRequired"):!0}),y=E(S=>{const O=g();O===!0?r.callback(S,i):Z.error(O)}),k=l("componentDid"),w=E(S=>{const O=S?.trim();if(!O)return C("common.requiredErrorText",{name:C("securityRule.form.pathPattern")});if(k){if(O.startsWith("/"))return C("securityRule.form.pathPatternErrorText")}else if(!O.startsWith("/")&&O!=="*")return C("securityRule.form.pathPatternErrorText");return!0}),d=E(S=>S?.trim()?!0:C("common.requiredErrorText",{name:C("securityRule.form.accessPolicy")})),x=E(S=>S?.trim()?!0:C("common.requiredErrorText",{name:C("securityRule.form.responseHeaderPolicy")})),j=ge(()=>{const O=($?.children||[]).find(P=>P.meta.did===k);return O?.mountPoint?br(O.mountPoint):null},[$,k]);return e.jsx(ke,{open:r.show,title:r.dialogTitle,onClose:i,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(te,{color:"primary",autoFocus:!0,variant:"contained",onClick:h(y),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r.isDefaultRule?null:e.jsx(B,{name:"componentDid",control:t,render:({field:S})=>e.jsx(Ge,{fullWidth:!0,margin:"dense",size:"small",label:C("securityRule.form.component"),placeholer:C("securityRule.form.componentPlaceholder"),options:$.children.map(O=>({title:O.meta.title,value:O.meta.did,description:O.mountPoint})),error:!!c?.componentDid?.message,helperText:c?.componentDid?.message||"Choose belong to component",...Ie(S,"ref"),readOnly:r.mode==="view"})}),e.jsx(B,{name:"pathPattern",control:t,rules:{validate:w},render:({field:S})=>e.jsx(V,{fullWidth:!0,required:!0,margin:"dense",size:"small",placeholder:C("securityRule.form.pathPatternPlaceholder"),label:C("securityRule.form.pathPattern"),error:!!c?.pathPattern?.message,helperText:c?.pathPattern?.message||"/abc/bcd or /abc or /abc/*",...S,disabled:r.isDefaultRule||r.mode==="view",slotProps:{input:{startAdornment:j?e.jsx(Jt,{position:"start",children:j}):null}}})}),e.jsx(B,{name:"accessPolicyId",control:t,rules:{validate:r.isDefaultRule?d:de},render:({field:S})=>e.jsx(Ge,{fullWidth:!0,required:r.isDefaultRule,margin:"dense",size:"small",label:C("securityRule.form.accessPolicy"),placeholer:C("securityRule.form.accessPolicyPlaceholder"),options:(m.data||[]).map(O=>({value:O.id,title:O.name,description:O.description})),error:!!c?.accessPolicyId?.message,helperText:c?.accessPolicyId?.message||C("securityRule.form.accessPolicyHelperText"),...Ie(S,"ref"),disabled:r.mode==="view"})}),e.jsx(B,{name:"responseHeaderPolicyId",control:t,rules:{validate:r.isDefaultRule?x:de},render:({field:S})=>e.jsx(Ge,{fullWidth:!0,required:r.isDefaultRule,margin:"dense",size:"small",label:C("securityRule.form.responseHeaderPolicy"),placeholer:C("securityRule.form.responseHeaderPolicyPlaceholder"),options:(f.data||[]).map(O=>({title:O.name,value:O.id,description:O.description})),error:!!c?.responseHeaderPolicyId?.message,helperText:c?.responseHeaderPolicyId?.message||C("securityRule.form.responseHeaderPolicyHelperText"),...Ie(S,"ref"),disabled:r.mode==="view"})}),e.jsx(B,{name:"remark",control:t,render:({field:S})=>e.jsx(V,{fullWidth:!0,multiline:!0,minRows:3,maxRows:7,size:"small",margin:"dense",placeholder:C("securityRule.form.remarkPlaceholder"),label:C("securityRule.form.remark"),helperText:c?.message,...S,disabled:r.mode==="view"})})]})})}Rs.propTypes={ref:T.any};const fe=async(v,C="Failed to saved")=>{try{await v()}catch($){Z.error($?.message||C)}};function ra(){const{t:v,locale:C}=ae(),{blocklet:$}=oe(),{api:R}=ne(),_=$?.meta?.did,b=$e(),p=L.useRef(null),r=L.useRef(null),{confirmApi:m,confirmHolder:f}=Ze(),h=ze(async()=>{const{securityRules:d}=await R.getBlockletSecurityRules({input:{did:_,includeDisabled:!0}});return d}),t=d=>d.id===W.SECURITY_RULE_DEFAULT_ID,l=E(d=>($?.children||[]).find(j=>j.meta.did===d)?.mountPoint),o=(h.data||[]).map(d=>{if(d.componentDid){const x=l(d.componentDid);d._disabled=x===void 0}return d}),n=o.filter(d=>!t(d)),s=(d,x)=>{fe(async()=>{const j=d.target.checked;await R.updateBlockletSecurityRule({input:{did:_,data:{id:x.id,enabled:j}}}),Z.success(v("common.succeeded")),h.run()})},c=(d,x,j)=>{fe(async()=>{const S=j-1,O=o[S];await Promise.all([R.updateBlockletSecurityRule({input:{did:_,data:{id:x.id,priority:O.priority}}}),R.updateBlockletSecurityRule({input:{did:_,data:{id:O.id,priority:x.priority}}})]),Z.success(v("common.succeeded")),h.run()})},a=(d,x,j)=>{fe(async()=>{const S=j+1,O=o[S];await Promise.all([R.updateBlockletSecurityRule({input:{did:_,data:{id:x.id,priority:O.priority}}}),R.updateBlockletSecurityRule({input:{did:_,data:{id:O.id,priority:x.priority}}})]),Z.success(v("common.succeeded")),h.run()})},i=()=>{p.current.open((d,x)=>{fe(async()=>{await R.addBlockletSecurityRule({input:{did:_,data:d}}),Z.success(v("common.succeeded")),h.run(),x()})})},u=(d,x)=>{p.current.open((j,S)=>{fe(async()=>{await R.updateBlockletSecurityRule({input:{did:_,data:{...j,id:x.id}}}),Z.success(v("common.succeeded")),h.run(),S()})},x)},g=(d,x)=>{m.open({title:v("securityRule.delete.title"),content:v("securityRule.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(j){fe(async()=>{await R.deleteBlockletSecurityRule({input:{did:_,id:x.id}}),Z.success(v("common.succeeded")),h.run(),j()})}})},y={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(d,{dataIndex:x},j){if(r.current?.contains(j.target)){const S=o[x];p.current.open(void 0,S)}},setRowProps:(d,x)=>o[x]._disabled?{title:v("securityRule.useless"),style:{backgroundColor:b.palette.action.disabledBackground,cursor:"default"}}:{}},k=[e.jsx(G,{size:"small",variant:"outlined",onClick:()=>{h.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(G,{size:"small",variant:"contained",onClick:i,children:v("common.add")})],w=[{label:v("securityRule.form.pathPattern"),name:"pathPattern",options:{customBodyRenderLite(d){const x=o[d];return e.jsx(A,{sx:{whiteSpace:"nowrap"},children:x.id===W.SECURITY_RULE_DEFAULT_ID?"Default":Kt(l(x.componentDid),x.pathPattern)})}}},{label:v("responseHeaderPolicy.title"),name:"responseHeaderPolicy",options:{customBodyRenderLite(d){return o[d].responseHeaderPolicy?.name}}},{label:v("accessPolicy.title"),name:"accessPolicyId",options:{customBodyRenderLite(d){return o[d].accessPolicy?.name}}},{label:v("securityRule.form.remark"),name:"remark"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(d){const x=o[d],j=t(x);return e.jsx(Cs,{disableEdit:x._disabled,disableSwitch:x._disabled,enabled:x.enabled,showSwitch:!j,showDelete:!j,showUp:d>0&&!j,showDown:d<n.length-1&&!j,onClickSwitch:S=>{s(S,x)},onClickUp:S=>{c(S,x,d)},onClickDown:S=>{a(S,x,d)},onClickEdit:S=>{u(S,x)},onClickDelete:S=>{g(S,x)}})}}}].filter(Boolean);return e.jsxs(A,{sx:{display:"flex",flexDirection:"column",gap:2},ref:r,children:[e.jsx(Ue,{verticalKeyWidth:100,locale:C,title:e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:1},children:[v("securityRule.title")," ",e.jsx(J,{variant:"body2",children:v("securityRule.sortByDescription")})]}),data:o,columns:w,customButtons:k,options:y,loading:h.loading}),e.jsx(Rs,{ref:p}),f]})}const $s={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"/>'},As=[{value:W.WHO_CAN_ACCESS.ALL,icon:zr,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:W.WHO_CAN_ACCESS.INVITED,icon:en,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:W.WHO_CAN_ACCESS.ADMIN,icon:nn,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:W.WHO_CAN_ACCESS.OWNER,icon:ct,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];function Os({value:v,onChange:C,...$}){const R="roles",_="roles_reverse",{t:b,locale:p}=ae(),r=[...As,{value:R,icon:Yr,title:{zh:"指定通行证可访问",en:"Accessible to selected passports"},description:{zh:"只有指定的通行证可以访问",en:"Only specified passports can access"}},{value:_,icon:tn,title:{zh:"指定通行证不可以访问",en:"Accessible to not selected passports"},description:{zh:"只有指定的通行证不可以访问",en:"Only specified passports can't access"}}];return e.jsx(V,{...$,label:b("blocklet.config.access.description"),select:!0,fullWidth:!0,value:v,onChange:C,slotProps:{select:{renderValue:m=>{const f=r.find(h=>h.value===m);return f?e.jsxs(A,{children:[e.jsx(A,{component:f.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),f.title[p]||f.title.en]}):null}}},children:r.map(m=>e.jsxs(Nt,{value:m.value,sx:{display:"block","& .tip":{fontSize:"12px",color:`${({theme:f})=>f.palette.text.secondary}`}},children:[e.jsxs(A,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(A,{component:m.icon,sx:{mr:1,fontSize:18,verticalAlign:"text-bottom",color:"text.secondary"}}),e.jsx(A,{children:m.title[p]||m.title.en})]}),e.jsx(A,{className:"tip",children:m.description[p]||m.description.en})]}))})}Os.propTypes={value:T.string,onChange:T.func};const Ps=v=>{const C={name:v.name,description:v.description},{roles:$=null,reverse:R}=v;return $===null?R===!1&&(C.whoCanAccess=W.WHO_CAN_ACCESS.ALL,C.roles=null):$.length===0&&R===!0?(C.whoCanAccess=W.WHO_CAN_ACCESS.INVITED,C.roles=[]):$t($,[W.WHO_CAN_ACCESS.OWNER])&&R===!1?(C.whoCanAccess=W.WHO_CAN_ACCESS.OWNER,C.roles=[W.WHO_CAN_ACCESS.OWNER]):$t($,[W.WHO_CAN_ACCESS.OWNER,W.WHO_CAN_ACCESS.ADMIN])&&R===!1?(C.whoCanAccess=W.WHO_CAN_ACCESS.ADMIN,C.roles=[W.WHO_CAN_ACCESS.OWNER,W.WHO_CAN_ACCESS.ADMIN]):(C.whoCanAccess=R?"roles_reverse":"roles",C.roles=$),C},na=v=>{const C={name:v.name,description:v.description},{roles:$=null,whoCanAccess:R}=v;return R==="roles"?(C.roles=$,C.reverse=!1):R==="roles_reverse"?(C.roles=$,C.reverse=!0):R===W.WHO_CAN_ACCESS.ALL?(C.roles=null,C.reverse=!1):R===W.WHO_CAN_ACCESS.INVITED?(C.roles=[],C.reverse=!0):R===W.WHO_CAN_ACCESS.OWNER?(C.roles=[W.WHO_CAN_ACCESS.OWNER],C.reverse=!1):R===W.WHO_CAN_ACCESS.ADMIN&&(C.roles=[W.WHO_CAN_ACCESS.OWNER,W.WHO_CAN_ACCESS.ADMIN],C.reverse=!1),C},aa=v=>v instanceof Object?{origin:v.origin?{override:v.origin?.override??!0,value:v.origin?.value?.join(`
147
+ `),smart:v.origin?.smart??!0}:void 0,methods:v.methods,allowedHeaders:v.allowedHeaders?{override:v.allowedHeaders?.override??!0,value:v.allowedHeaders?.value?.join(`
148
+ `)}:void 0,exposedHeaders:v.exposedHeaders?{override:v.exposedHeaders?.override??!0,value:v.exposedHeaders?.value?.join(`
149
+ `)}:void 0,maxAge:v.maxAge,optionsSuccessStatus:v.optionsSuccessStatus,preflightContinue:v.preflightContinue,credentials:v.credentials}:void 0,ia=v=>v instanceof Object?{origin:{override:v.origin?.override,value:v.origin?.value?.split(`
150
+ `).filter($=>$),smart:v.origin?.smart},methods:v.methods,allowedHeaders:{override:v.allowedHeaders?.override,value:v.allowedHeaders?.value?.split(`
151
+ `).filter($=>$)},exposedHeaders:{override:v.exposedHeaders?.override,value:v.exposedHeaders?.value?.split(`
152
+ `).filter($=>$)},maxAge:v.maxAge,optionsSuccessStatus:v.optionsSuccessStatus,preflightContinue:v.preflightContinue,credentials:v.credentials}:void 0,oa=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,la=v=>v instanceof Object?{contentSecurityPolicy:v.contentSecurityPolicy,referrerPolicy:v.referrerPolicy,xFrameOptions:v.xFrameOptions,xPoweredBy:v.xPoweredBy,xXssProtection:v.xXssProtection}:void 0,ca=v=>{const C=Yt(v);if(v.securityHeader)try{C.securityHeader=JSON.parse(v.securityHeader)}catch{C.securityHeader=null}if(v.cors)try{C.cors=JSON.parse(v.cors)}catch{C.cors=null}return C};function Ts({ref:v=null}){const{t:C}=L.useContext(ce),{roles:$}=Ve(),_=$e()?.transitions?.duration?.leavingScreen||300,b=ye({mode:"add",show:!1,callback:de,get dialogTitle(){return this.mode==="edit"?C("accessPolicy.edit"):this.mode==="view"?C("accessPolicy.view"):C("accessPolicy.add")}}),{handleSubmit:p,control:r,watch:m,setValue:f,reset:h,formState:{errors:t}}=ve({mode:"onChange",defaultValues:{name:"",description:"",roles:null,whoCanAccess:"all"}}),l=E(()=>{h(),b.mode="add"}),o=E(()=>{b.show=!1,setTimeout(()=>{l()},_)}),n=E((y=de,k=null)=>{if(b.callback=y,b.show=!0,k){k.id?b.mode="edit":b.mode="view";const w=Ps(k);f("name",w.name),f("description",w.description),f("roles",w.roles),f("whoCanAccess",w.whoCanAccess)}});L.useImperativeHandle(v,()=>({open:n,close:o}),[n,o]);const s=E(y=>{b.callback(na(y),o)}),c=E(y=>y?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.name")})),a=m("whoCanAccess"),i=b.mode==="view",u=E(y=>["roles","roles_reverse"].includes(a)&&(!y||y?.length===0)?C("common.requiredErrorText",{name:C("accessPolicy.form.roles")}):!0),g=E(y=>y?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.accessType")}));return e.jsx(ke,{open:b.show,title:b.dialogTitle,onClose:o,PaperProps:{style:{minHeight:"unset"}},actions:e.jsx(te,{color:"primary",autoFocus:!0,variant:"contained",onClick:p(s),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(B,{name:"name",control:r,rules:{validate:c},render:({field:y})=>e.jsx(V,{fullWidth:!0,required:!0,margin:"dense",size:"small",disabled:i,placeholder:C("accessPolicy.form.namePlaceholder"),label:C("accessPolicy.form.name"),error:!!t?.name?.message,helperText:t?.name?.message||" ",...y})}),e.jsx(B,{name:"whoCanAccess",control:r,rules:{validate:g},render:({field:y})=>e.jsx(Os,{required:!0,size:"small",margin:"dense",disabled:i,error:!!t?.whoCanAccess?.message,helperText:t?.whoCanAccess?.message||" ",...y})}),["roles","roles_reverse"].includes(a)?e.jsx(B,{name:"roles",rules:{validate:u},control:r,render:({field:y})=>e.jsxs(Y,{variant:"standard",error:!!t?.roles?.message,children:[e.jsx(Fe,{sx:{display:"flex",flexDirection:"row",mt:-3},children:$.map(k=>e.jsx(K,{control:e.jsx(Te,{disabled:i,size:"small",checked:y.value?.includes(k.name),sx:{p:.75},onChange:(w,d)=>{const x=y.value||[];d?y.onChange([...x,k.name]):y.onChange(x.filter(j=>j!==k.name))}}),label:k.title},k.name))}),e.jsx(ft,{sx:{transform:"translateY(-8px)"},children:t?.roles?.message||" "})]})}):null,e.jsx(B,{name:"description",control:r,render:({field:y})=>e.jsx(V,{fullWidth:!0,multiline:!0,disabled:i,minRows:3,maxRows:7,margin:"dense",size:"small",placeholder:C("accessPolicy.form.descriptionPlaceholder"),label:C("accessPolicy.form.description"),helperText:t?.message,...y})})]})})}Ts.propTypes={ref:T.any};function da(){const{t:v,locale:C}=ae(),{blocklet:$}=oe(),{api:R}=ne(),{roles:_}=Ve(),b=$?.meta?.did,p=L.useRef(null),r=L.useRef(null),{confirmApi:m,confirmHolder:f}=Ze(),h=()=>{},t=ze(async()=>{const{accessPolicies:g}=await R.getBlockletAccessPolicies({input:{did:b}});return Be(g,y=>y.isProtected?1:0)}),l=t.data||[],o=E(()=>{r.current.open((g,y)=>{fe(async()=>{await R.addBlockletAccessPolicy({input:{did:b,data:g}}),Z.success(v("common.succeeded")),t.run(),y()})})}),n=E(g=>{r.current.open((y,k)=>{fe(async()=>{await R.updateBlockletAccessPolicy({input:{did:b,data:{...y,id:g.id}}}),Z.success(v("common.succeeded")),t.run(),k()})},g)}),s=E(g=>{r.current.open((y,k)=>{k()},Ie(g,["id"]))}),c=E(g=>{m.open({title:v("accessPolicy.delete.title"),content:v("accessPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(y){fe(async()=>{await R.deleteBlockletAccessPolicy({input:{did:b,id:g.id}}),Z.success(v("common.succeeded")),t.run(),y()})}})}),a={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(g,{dataIndex:y},k){if(p.current?.contains(k.target)){const w=l[y];s(w)}}},i=[e.jsx(G,{size:"small",variant:"outlined",onClick:()=>{t.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(G,{size:"small",variant:"contained",onClick:o,children:v("common.add")})],u=[{label:v("accessPolicy.form.name"),name:"name",options:{customBodyRenderLite(g){const y=l[g],k=y.isProtected?e.jsx(X,{title:"Built-in policy, can't edit",children:e.jsx(A,{component:Q,icon:Xt,sx:{fontSize:16}})}):null;return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:.5},children:[k," ",y.name]})}}},{label:v("accessPolicy.form.roles"),name:"roles",options:{customBodyRenderLite(g){const y=l[g],k=Ps(y);if([W.WHO_CAN_ACCESS.ALL,W.WHO_CAN_ACCESS.INVITED].includes(k.whoCanAccess)){const d=As.find(x=>x.value===k.whoCanAccess);return d.title?.[C]||d.title?.en}const w=_.filter(d=>y.reverse?!k.roles?.includes(d.name):k.roles?.includes(d.name));return e.jsx(A,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:w.map(d=>e.jsx(X,{title:d.description,children:e.jsx(mt,{size:"small",label:d.title},d.name)}))})}}},{label:v("accessPolicy.form.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(g){const y=l[g];return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:0},onClick:k=>k.stopPropagation(),children:[y.isProtected?e.jsx(X,{title:v("common.view"),children:e.jsx(re,{size:"small",onClick:()=>{s(y,g)},children:e.jsx(Q,{icon:$s,fontSize:18})})}):null,y.isProtected?null:e.jsx(X,{title:v("common.edit"),children:e.jsx(re,{size:"small",onClick:()=>{n(y,g)},color:"success",children:e.jsx(Q,{icon:kt,fontSize:18})})}),y.isProtected?null:e.jsx(X,{title:v("common.delete"),children:e.jsx(re,{size:"small",onClick:()=>{c(y,g)},color:"error",children:e.jsx(Q,{icon:wt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(A,{sx:{display:"flex",flexDirection:"column",gap:2},ref:p,children:[e.jsx(Ue,{verticalKeyWidth:100,locale:C,title:v("accessPolicy.title"),data:l,columns:u,customButtons:i,options:a,loading:t.loading,onChange:h}),e.jsx(Ts,{ref:r}),f]})}const ua={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 ut({title:v,actions:C,children:$=null,defaultValue:R=!0,value:_,onChange:b,showExpand:p=!0}){const r=!we(_),m=ye({open:R}),f=ge(()=>r?_:m.open,[_,r,m.open]),h=E(()=>{r?b(!f):m.open=!m.open});return e.jsxs(Zt,{variant:"outlined",children:[e.jsxs(A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",px:2,py:1,backgroundColor:"grey.50"},onClick:h,children:[e.jsx(A,{sx:{fontWeight:"bold"},children:v}),e.jsxs(A,{sx:{display:"flex",alignItems:"center"},children:[C,p?e.jsx(A,{component:Q,icon:ua,sx:{transform:f?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",fontSize:"2rem"}}):null]})]}),e.jsx(jr,{in:f,children:e.jsx(Xr,{children:$})})]})}ut.propTypes={title:T.string.isRequired,defaultValue:T.bool,value:T.bool,actions:T.node,children:T.node,onChange:T.func,showExpand:T.bool};const ht={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 Is({config:v={},onChange:C=()=>{},disabled:$=!1}){const R=["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],_={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},...Qt(v,we)},{t:b}=ae(),p=(f,{override:h,value:t,smart:l})=>{const o={..._?.[f]};!we(l)&&f==="origin"&&(o.smart=l),we(h)||(o.override=h),we(t)||(o.value=t),C({..._,[f]:o})},r=[{title:b("responseHeaderPolicy.form.cors.origin"),override:_.origin.override,smart:_.origin.smart,name:"origin",required:!0,value:_.origin.value,content:e.jsx(Y,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{multiline:!0,minRows:4,maxRows:10,disabled:$,variant:"outlined",size:"small",placeholder:b("responseHeaderPolicy.form.cors.originPlaceholder"),helperText:b("responseHeaderPolicy.form.cors.originHelperText"),value:_.origin.value,onChange:f=>{p("origin",{value:f.target.value})}})})},{title:b("responseHeaderPolicy.form.cors.methods"),name:"methods",override:_.methods.override,required:!0,value:_.methods.value,content:e.jsx(Fe,{sx:{flexDirection:"row"},children:R.map(f=>e.jsx(K,{control:e.jsx(Te,{size:"small",disabled:$,checked:_.methods.value.includes(f),onChange:(h,t)=>{p("methods",{value:t?[..._.methods.value,f]:_.methods.value.filter(l=>l!==f)})}}),label:f},f))})},{title:b("responseHeaderPolicy.form.cors.allowedHeaders"),override:_.allowedHeaders.override,name:"allowedHeaders",value:_.allowedHeaders.value,content:e.jsx(Y,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{multiline:!0,minRows:3,maxRows:7,disabled:$,variant:"outlined",size:"small",placeholder:b("responseHeaderPolicy.form.cors.allowedHeadersPlaceholder"),helperText:b("responseHeaderPolicy.form.cors.allowedHeadersHelperText"),value:_.allowedHeaders.value,onChange:f=>{p("allowedHeaders",{value:f.target.value})}})})},{title:b("responseHeaderPolicy.form.cors.exposedHeaders"),override:_.exposedHeaders.override,name:"exposedHeaders",value:_.exposedHeaders.value,content:e.jsx(Y,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{multiline:!0,minRows:3,maxRows:7,disabled:$,variant:"outlined",size:"small",placeholder:b("responseHeaderPolicy.form.cors.exposedHeadersPlaceholder"),helperText:b("responseHeaderPolicy.form.cors.exposedHeadersHelperText"),value:_.exposedHeaders.value,onChange:f=>{p("exposedHeaders",{value:f.target.value})}})})},{title:b("responseHeaderPolicy.form.cors.maxAge"),override:_.maxAge.override,name:"maxAge",value:_.maxAge.value,content:e.jsx(Y,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{type:"number",variant:"outlined",size:"small",disabled:$,value:_.maxAge.value,onChange:f=>{p("maxAge",{value:f.target.value})},helperText:b("responseHeaderPolicy.form.cors.maxAgeHelperText")})})},{title:b("responseHeaderPolicy.form.cors.optionsSuccessStatus"),override:_.optionsSuccessStatus.override,name:"optionsSuccessStatus",value:_.optionsSuccessStatus.value,content:e.jsx(Y,{fullWidth:!0,sx:{mt:.75,"& .MuiFormHelperText-root":{mx:0}},children:e.jsx(V,{type:"number",variant:"outlined",size:"small",disabled:$,value:_.optionsSuccessStatus.value,onChange:f=>{p("optionsSuccessStatus",{value:f.target.value})}})})},{title:b("responseHeaderPolicy.form.cors.preflightContinue"),override:_.preflightContinue.override,name:"preflightContinue",value:_.preflightContinue.value,control:e.jsx(pe,{size:"small",disabled:$,checked:_.preflightContinue.value,onChange:(f,h)=>{p("preflightContinue",{value:h})}})},{title:b("responseHeaderPolicy.form.cors.credentials"),override:_.credentials.override,name:"credentials",value:_.credentials.value,control:e.jsx(pe,{size:"small",disabled:$,checked:_.credentials.value,onChange:(f,h)=>{p("credentials",{value:h})}})}];es(()=>{C(_)});const m={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Fe,{children:r.map((f,h)=>e.jsxs(L.Fragment,{children:[e.jsxs(A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(K,{sx:{mt:h===0?0:1},control:f.control||e.jsx(A,{sx:{pl:1.35}}),label:f.title,required:f.required},`${f.name}_form`),e.jsxs(A,{children:[f.name==="origin"?e.jsx(K,{control:e.jsx(Te,{size:"small",checked:f.smart,color:"primary",disabled:$,onChange:()=>{p(f.name,{smart:!f.smart})}}),label:e.jsxs(e.Fragment,{children:[b("responseHeaderPolicy.form.cors.smartMode"),e.jsx(X,{title:b("responseHeaderPolicy.form.cors.smartModeHelperText"),children:e.jsx(A,{component:Q,icon:ht,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:m},`${f.name}_smart`):null,e.jsx(K,{control:e.jsx(Te,{size:"small",checked:f.override,color:"warning",disabled:$,onChange:()=>{p(f.name,{override:!f.override})}}),label:e.jsxs(e.Fragment,{children:[b("responseHeaderPolicy.form.originOverride"),e.jsx(X,{title:b("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(A,{component:Q,icon:ht,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...m,mr:0}},`${f.name}_override`)]})]}),f.content?e.jsx(A,{sx:{ml:3.5},children:f.content},`${f.name}_content`):null]},f.name))})}Is.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function Es({value:v,onChange:C=()=>{},disabled:$=!1}){const R="sameorigin",_=[{label:"DENY",value:"deny"},{label:"SAMEORIGIN (default)",value:"sameorigin"}],b=p=>{C({action:p.target.value})};return L.useEffect(()=>{v===!0&&C({action:R})},[v]),e.jsx(A,{children:e.jsx(Y,{children:e.jsx(as,{row:!0,children:_.map(p=>e.jsx(K,{value:p.value,control:e.jsx(is,{size:"small",disabled:$,checked:p.value===v?.action,onChange:b,sx:{p:.75}}),label:p.label},p.value))})})})}Es.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function Ds({value:v,onChange:C=()=>{},disabled:$=!1}){const R="strict-origin-when-cross-origin",_=[{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"}],b=p=>{C({policy:p.target.value})};return L.useEffect(()=>{v===!0&&C({policy:R})},[v]),e.jsx(A,{children:e.jsx(Y,{children:e.jsx(as,{children:_.map(p=>e.jsx(K,{value:p.value,control:e.jsx(is,{size:"small",disabled:$,checked:p.value===v?.policy,onChange:b,sx:{p:.75}}),label:p.label},p.value))})})})}Ds.propTypes={value:T.oneOfType([T.string,T.bool]).isRequired,onChange:T.func,disabled:T.func};function Ls({value:v,onChange:C=()=>{},disabled:$=!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 _(f){return Object.keys(f).map(h=>[h,f[h].filter(Boolean).join(" ")].filter(Boolean).join(" ")).filter(Boolean).join(`
153
+ `)}const b=_(v?.directives||R),[p,r]=L.useState(b),m=f=>{r(f.target.value);const h=f.target.value.split(`
154
+ `).reduce((t,l)=>{const[o,...n]=l.split(" ");return t[o]=n.filter(s=>s!==""),t},{});C({useDefaults:!1,directives:h})};return L.useEffect(()=>{v===!0&&(C({useDefaults:!1,directives:R}),r(_(R)))},[v]),e.jsx(A,{sx:{mt:1},children:e.jsx(Y,{fullWidth:!0,children:e.jsx(V,{fullWidth:!0,multiline:!0,disabled:$,rows:12,size:"small",value:p,onChange:m})})})}Ls.propTypes={value:T.oneOfType([T.object,T.bool]).isRequired,onChange:T.func,disabled:T.bool};function qs({config:v={},onChange:C=()=>{},disabled:$=!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},...Qt(v,we)},{t:_}=ae(),b=(m,{override:f,value:h})=>{const t={...R?.[m]};we(f)||(t.override=f),we(h)||(t.value=h),C({...R,[m]:t})},p=[{title:"Content-Security-Policy",name:"contentSecurityPolicy",override:R.contentSecurityPolicy.override,value:!!R.contentSecurityPolicy.value,content:e.jsx(Ls,{disabled:$,value:R.contentSecurityPolicy.value,onChange:m=>{b("contentSecurityPolicy",{value:m})}}),onChange(m){b("contentSecurityPolicy",{value:m})}},{title:"Referrer-Policy",name:"referrerPolicy",override:R.referrerPolicy.override,value:!!R.referrerPolicy.value,content:e.jsx(Ds,{disabled:$,value:R.referrerPolicy.value,onChange:m=>{b("referrerPolicy",{value:m})}}),onChange(m){b("referrerPolicy",{value:m})}},{title:"X-Frame-Options",name:"xFrameOptions",override:R.xFrameOptions.override,value:!!R.xFrameOptions.value,content:e.jsx(Es,{disabled:$,value:R.xFrameOptions.value,onChange:m=>{b("xFrameOptions",{value:m})}}),onChange(m){b("xFrameOptions",{value:m})}},{title:"Disable X-Powered-By",name:"xPoweredBy",override:R.xPoweredBy.override,value:R.xPoweredBy.value,content:null,onChange(m){b("xPoweredBy",{value:m})}},{title:"X-XSS-Protection",name:"xXssProtection",override:R.xXssProtection.override,value:R.xXssProtection.value,content:null,onChange(m){b("xXssProtection",{value:m})}}];es(()=>{C(R)});const r={".PrivateSwitchBase-input+svg":{fontSize:"1rem"},".MuiCheckbox-sizeSmall":{p:.75},".MuiFormControlLabel-label":{fontSize:"0.8rem"}};return e.jsx(Fe,{children:p.map((m,f)=>e.jsxs(L.Fragment,{children:[e.jsxs(A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(K,{sx:{mt:f===0?0:1},control:e.jsx(pe,{size:"small",disabled:$,checked:m.value,onChange:()=>{m.onChange(!m.value)}},`${m.name}_switch`),label:m.title},`${m.name}_form`),m.value?e.jsx(K,{control:e.jsx(Te,{size:"small",checked:m.override,color:"warning",disabled:$,onChange:()=>{b(m.name,{override:!m.override})}}),label:e.jsxs(e.Fragment,{children:[_("responseHeaderPolicy.form.originOverride"),e.jsx(X,{title:_("responseHeaderPolicy.form.originOverrideHelperText"),children:e.jsx(A,{component:Q,icon:ht,sx:{cursor:"pointer",color:"grey",ml:.5,fontSize:"1.1em"}})})]}),sx:{...r,mr:0}}):null]}),m.value&&m.content?e.jsx(A,{sx:{ml:3.7},children:m.content},`${m.name}_content`):null]},m.name))})}qs.propTypes={config:T.object,onChange:T.func,disabled:T.bool};function Ms({ref:v=null}){const{t:C}=L.useContext(ce),R=$e()?.transitions?.duration?.leavingScreen||300,_=ye({mode:"add",show:!1,callback:de,get dialogTitle(){return this.mode==="edit"?C("responseHeaderPolicy.edit"):this.mode==="view"?C("responseHeaderPolicy.view"):C("responseHeaderPolicy.add")},cors:null,securityHeader:null,enableCORS:!1}),{handleSubmit:b,control:p,setValue:r,reset:m,formState:{errors:f}}=ve({mode:"onChange",defaultValues:{name:"",description:""}}),h=E(()=>{m(),_.mode="add",_.enableCORS=!1,_.cors=null,_.securityHeader=null}),t=E(()=>{_.show=!1,setTimeout(()=>{h()},R)}),l=E((i=de,u=null)=>{_.callback=i,_.show=!0,u&&(u.id?_.mode="edit":_.mode="view",r("name",u.name),r("description",u.description),_.cors=aa(u.cors),_.securityHeader=oa(u.securityHeader),_.enableCORS=!!u.cors)});L.useImperativeHandle(v,()=>({open:l,close:t}),[l,t]);const o=_.mode==="view",n=E(i=>{const u=ia(_.cors),g=la(_.securityHeader),y=Yt({...i,cors:_.enableCORS?JSON.stringify(u):null,securityHeader:JSON.stringify(g)});_.callback(y,t)}),s=E(i=>i?.trim()?!0:C("common.requiredErrorText",{name:C("accessPolicy.form.name")})),c=i=>{_.securityHeader=i},a=i=>{_.cors=i};return e.jsx(ke,{open:_.show,title:_.dialogTitle,onClose:t,PaperProps:{style:{minHeight:"unset",width:900,maxWidth:"100%"}},actions:e.jsx(te,{color:"primary",autoFocus:!0,variant:"contained",onClick:b(n),children:C("common.confirm")}),children:e.jsxs("form",{noValidate:!0,autoComplete:"off",children:[e.jsx(B,{name:"name",control:p,rules:{validate:s},render:({field:i})=>e.jsx(V,{fullWidth:!0,required:!0,size:"small",margin:"dense",disabled:o,placeholder:C("accessPolicy.form.namePlaceholder"),label:C("accessPolicy.form.name"),error:!!f?.name?.message,helperText:f?.name?.message||" ",...i})}),e.jsx(B,{name:"description",control:p,render:({field:i})=>e.jsx(V,{fullWidth:!0,multiline:!0,size:"small",margin:"dense",disabled:o,minRows:3,maxRows:7,placeholder:"Description",label:"Description",helperText:f?.description?.message||" ",...i})}),e.jsx(ut,{title:"Cross-origin resource sharing (CORS)",value:_.enableCORS,onChange:i=>{o||(_.enableCORS=i)},showExpand:!1,actions:e.jsx(pe,{size:"small",disabled:o,checked:_.enableCORS}),children:e.jsx(Is,{config:_.cors,onChange:a,disabled:o})}),e.jsx("br",{}),e.jsx(ut,{title:"Security Headers",children:e.jsx(qs,{config:_.securityHeader,onChange:c,disabled:o})})]})})}Ms.propTypes={ref:T.any};function ha(){const{t:v,locale:C}=ae(),{blocklet:$}=oe(),{api:R}=ne(),_=$?.meta?.did,b=L.useRef(null),p=L.useRef(null),{confirmApi:r,confirmHolder:m}=Ze(),f=()=>{},h=ze(async()=>{const{responseHeaderPolicies:u}=await R.getBlockletResponseHeaderPolicies({input:{did:_}});return Be(u.map(g=>ca(g)),g=>g.isProtected?1:0)}),t=h.data||[],l=E(()=>{b.current.open((u,g)=>{fe(async()=>{await R.addBlockletResponseHeaderPolicy({input:{did:_,data:u}}),Z.success(v("common.succeeded")),h.run(),g()})})}),o=E(u=>{b.current.open((g,y)=>{y()},Ie(u,["id"]))}),n=E(u=>{b.current.open((g,y)=>{fe(async()=>{await R.updateBlockletResponseHeaderPolicy({input:{did:_,data:{...g,id:u.id}}}),Z.success(v("common.succeeded")),h.run(),y()})},u)}),s=E(u=>{r.open({title:v("responseHeaderPolicy.delete.title"),content:v("responseHeaderPolicy.delete.description"),confirmButtonText:v("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:v("common.cancel"),onConfirm(g){fe(async()=>{await R.deleteBlockletResponseHeaderPolicy({input:{did:_,id:u.id}}),Z.success(v("common.succeeded")),h.run(),g()})}})}),c={sort:!1,download:!1,filter:!1,print:!1,search:!1,viewColumns:!1,expandableRowsOnClick:!0,searchDebounceTime:600,onRowClick(u,{dataIndex:g},y){if(p.current?.contains(y.target)){const k=t[g];o(k)}}},a=[e.jsx(G,{size:"small",variant:"outlined",onClick:()=>{h.run()},sx:{mr:1},children:v("common.refresh")},"refresh"),e.jsx(G,{size:"small",variant:"contained",onClick:l,children:v("common.add")},"add")],i=[{label:v("common.name"),name:"name",options:{customBodyRenderLite(u){const g=t[u],y=g.isProtected?e.jsx(X,{title:"Built-in policy, can't edit",children:e.jsx(A,{component:Q,icon:Xt,sx:{fontSize:16}})}):null;return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:.5},children:[y," ",g.name]})}}},{label:v("common.description"),name:"description"},{label:v("common.actions"),name:"",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRenderLite(u){const g=t[u];return e.jsxs(A,{sx:{display:"flex",alignItems:"center",gap:0},onClick:y=>y.stopPropagation(),children:[g.isProtected?e.jsx(X,{title:v("common.view"),children:e.jsx(re,{size:"small",onClick:()=>{o(g,u)},children:e.jsx(Q,{icon:$s,fontSize:18})})}):null,g.isProtected?null:e.jsx(X,{title:v("common.edit"),children:e.jsx(re,{size:"small",onClick:()=>{n(g,u)},color:"success",children:e.jsx(Q,{icon:kt,fontSize:18})})}),g.isProtected?null:e.jsx(X,{title:v("common.delete"),children:e.jsx(re,{size:"small",onClick:()=>{s(g,u)},color:"error",children:e.jsx(Q,{icon:wt,fontSize:18})})})]})}}}].filter(Boolean);return e.jsxs(A,{sx:{display:"flex",flexDirection:"column",gap:2},ref:p,children:[e.jsx(Ue,{verticalKeyWidth:100,locale:C,title:v("responseHeaderPolicy.title"),data:t,columns:i,customButtons:a,options:c,loading:h.loading,onChange:f}),e.jsx(Ms,{ref:b}),m]})}const zs=({tabs:v,blocklet:C,ancestors:$=[],depth:R=1,t:_})=>{const b=[...$.map(r=>r.meta.did),C.meta.did].join("/"),p=!$?.length;v.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:Math.max(1,R-1)*2},children:[p?e.jsx(Sr,{size:24,blocklet:C,style:{borderRadius:0}}):e.jsx(Cr,{size:24,blocklet:C,ancestors:$,style:{borderRadius:0}}),e.jsx(A,{sx:{ml:2},children:e.jsx(A,{sx:{color:"text.primary"},children:p?_("blocklet.component.container"):Wt.getDisplayName(C,!0)})})]},b),value:b}),C.children.length>0&&C.children.forEach(r=>{zs({tabs:v,blocklet:r,ancestors:[...$,C],depth:R+1,t:_})})};function fa({blocklet:v,onUpdate:C=()=>{},...$}){const{t:R}=ae(),_=ye({expandPref:!0,expandSecurity:!0}),[b,p]=_r(),r=b.get("tab")||"general",m=os(),[f,h]=L.useState(!1),t=[];t.push({label:e.jsxs(A,{"data-cy":"configuration-tab-general",sx:{display:"flex",alignItems:"center"},children:[e.jsx(ln,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.general")})]},"general"),value:"general"}),t.push({label:e.jsxs(A,{"data-cy":"configuration-tab-security-group",sx:{display:"flex",alignItems:"center"},children:[e.jsx(A,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandSecurity?e.jsx(At,{fontSize:"inherit"}):e.jsx(Ot,{fontSize:"inherit"})}),e.jsx(ct,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.security")})]},"securityGroup"),value:"securityGroup"}),_.expandSecurity&&(t.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(ct,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("securityRule.title")})]},"security"),value:"security"}),t.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(sn,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("accessPolicy.title")})]},"accessPolicy"),value:"accessPolicy"}),t.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",pl:2},children:[e.jsx(Q,{fontSize:24,style:{flexShrink:0},icon:mn}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("responseHeaderPolicy.title")})]},"responseHeaderPolicy"),value:"responseHeaderPolicy"})),t.push({label:e.jsxs(A,{sx:{display:"flex",alignItems:"center"},"data-cy":"configuration-tab-authentication",children:[e.jsx(an,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.login")})]},"authentication"),value:"authentication"}),t.push({label:e.jsxs(A,{"data-cy":"configuration-tab-notification",sx:{display:"flex",alignItems:"center"},children:[e.jsx(on,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.notification")})]},"notification"),value:"notification"}),t.push({label:e.jsxs(A,{"data-cy":"configuration-tab-preference",sx:{display:"flex",alignItems:"center"},children:[e.jsx(A,{sx:{ml:-2,transform:"translateY(2px)"},children:_.expandPref?e.jsx(At,{fontSize:"inherit"}):e.jsx(Ot,{fontSize:"inherit"})}),e.jsx($r,{sx:{fontSize:24}}),e.jsx(A,{sx:{ml:2,color:"text.primary"},children:R("common.preferences")})]},"preference"),value:"preference"});const l=t.find(c=>c.value===r);_.expandPref&&zs({tabs:t,blocklet:v,t:R});const o=c=>{c==="preference"?_.expandPref=!_.expandPref:c==="securityGroup"?_.expandSecurity=!_.expandSecurity:p(a=>(c==="general"?a.delete("tab"):a.set("tab",c),a)),h(!1)};let n=null;r==="general"?n=e.jsx(Ln,{blocklet:v,onUpdate:C}):r==="security"?n=e.jsx(ra,{}):r==="accessPolicy"?n=e.jsx(da,{}):r==="responseHeaderPolicy"?n=e.jsx(ha,{}):r==="authentication"?n=e.jsx(Ss,{}):r==="notification"?n=e.jsx(Lr,{}):n=e.jsx(Ar,{id:r});const s=L.useMemo(()=>({position:"relative",minHeight:"66vh",height:"100%",overflow:"hidden"}),[]);return e.jsxs(ma,{...$,children:[m&&e.jsxs(e.Fragment,{children:[e.jsxs(A,{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(re,{onClick:()=>h(!0),sx:{mr:1},children:e.jsx(wr,{})}),e.jsx(A,{children:l?.label})]}),e.jsx(kr,{anchor:"left",open:f,onClose:()=>h(!1),slotProps:{paper:{sx:{width:260,".MuiTab-root":{textAlign:"left",alignItems:"flex-start",fontWeight:"normal"}}}},children:e.jsx(Ne,{tabs:t,current:r,orientation:"vertical",onChange:o,sx:{borderRight:1,height:"100%",borderColor:"divider"}})})]}),e.jsxs(Ke,{container:!0,spacing:4,columns:24,children:[!m&&e.jsx(Ke,{size:{xs:24,sm:7,md:5},children:e.jsx(Ne,{tabs:t,current:r,orientation:"vertical",onChange:o,sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),e.jsx(Ke,{size:{xs:24,sm:17,md:19},children:e.jsx(A,{style:s,children:n})})]})]})}fa.propTypes={blocklet:T.object.isRequired,onUpdate:T.func};const ma=xe.div`
155
+ .MuiTab-root {
156
+ text-align: left;
157
+ align-items: flex-start;
158
+ font-weight: normal;
159
+ }
160
+ .Mui-selected {
161
+ font-weight: bold;
162
+ }
163
+ `;export{fa as default};