@abtnode/webapp 1.16.29 → 1.16.30-beta-958ae719

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 (201) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-BIVkDKiV.js → Add-CdB1GTw1.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-BSN8E-vL.js → ArrowDropDown-cQI9feYM.js} +1 -1
  5. package/dist/assets/{Autocomplete-3iEbBt3p.js → Autocomplete-Bhg6P1T-.js} +1 -1
  6. package/dist/assets/{Breadcrumbs-B1EjQ7_S.js → Breadcrumbs-zBxzGTSz.js} +1 -1
  7. package/dist/assets/{ButtonGroup-5q10mUxm.js → ButtonGroup-CEodIFRb.js} +1 -1
  8. package/dist/assets/{CheckCircle-SQxexLA6.js → CheckCircle-D2TmcEFh.js} +1 -1
  9. package/dist/assets/{ChevronLeft-DGO3AjSX.js → ChevronLeft-Eu14H7S5.js} +1 -1
  10. package/dist/assets/{ChevronRight-DcNBTOQr.js → ChevronRight-Ba-Rcz-i.js} +1 -1
  11. package/dist/assets/{Close-Dr9bVY_7.js → Close-Dq2gRzdt.js} +1 -1
  12. package/dist/assets/{Delete-BA9-i54s.js → Delete-Di-3Vxhz.js} +1 -1
  13. package/dist/assets/{DeleteOutline-BQLCdvYk.js → DeleteOutline-BQeXrAk8.js} +1 -1
  14. package/dist/assets/DeleteOutline-CaAz8YM2.js +1 -0
  15. package/dist/assets/{Done-CCcZllux.js → Done-BiwCZjD9.js} +1 -1
  16. package/dist/assets/{Edit-BFcAkLvC.js → Edit-CeoVDX9P.js} +1 -1
  17. package/dist/assets/{EditIcon-Bsk6W7fb.js → EditIcon-CIZQcG-N.js} +1 -1
  18. package/dist/assets/{ExpandMore-rt48LU-T.js → ExpandMore-Co2TCgMe.js} +1 -1
  19. package/dist/assets/{FilterList-qnkLmWiK.js → FilterList-CtKjjq1V.js} +5 -5
  20. package/dist/assets/{Google-ZwJqo6k4.js → Google-CB64yAYZ.js} +3 -3
  21. package/dist/assets/{Https-D5FI5kRj.js → Https-CZ8ckEIE.js} +1 -1
  22. package/dist/assets/{InputAdornment-O2bgTsbw.js → InputAdornment-DAdjrwZB.js} +1 -1
  23. package/dist/assets/{InputLabel-DKHlRadP.js → InputLabel-E2n2XENL.js} +1 -1
  24. package/dist/assets/{LastPage-DSz-M1aM.js → LastPage-Dk3Ng8r_.js} +1 -1
  25. package/dist/assets/{Launch-e9NpOcr5.js → Launch-DCauoB9i.js} +1 -1
  26. package/dist/assets/{Link-CWm9FEnI.js → Link-B5_3_F5M.js} +1 -1
  27. package/dist/assets/{LoadingButton-D7VQLypv.js → LoadingButton-CmY35jLm.js} +1 -1
  28. package/dist/assets/{LockIcon-BGABEZ6C.js → LockIcon-DLnWJnFU.js} +1 -1
  29. package/dist/assets/{Loop-v-roMehG.js → Loop-BK2g7AZi.js} +1 -1
  30. package/dist/assets/{MoreVert-CpEsw2Tj.js → MoreVert-CGx6Mqxv.js} +1 -1
  31. package/dist/assets/{Pagination-BPPkQTXZ.js → Pagination-B4jmH7k6.js} +1 -1
  32. package/dist/assets/{Public-s40J-s3W.js → Public-C0O-VR0x.js} +1 -1
  33. package/dist/assets/{SchemaReference.es-yLf24oFH.js → SchemaReference.es-CwVyx9KR.js} +1 -1
  34. package/dist/assets/{Search-BvtdswCD.js → Search-Drx5S2Fc.js} +1 -1
  35. package/dist/assets/{Select-6AAHiQjm.js → Select-BAE2ztrO.js} +2 -2
  36. package/dist/assets/{Skeleton-8M4ffKSP.js → Skeleton-Dg829dzN.js} +5 -5
  37. package/dist/assets/{Slider-dM16D4dK.js → Slider-DalB8Bfa.js} +1 -1
  38. package/dist/assets/{Stepper-qCoo64ls.js → Stepper-CyP9t2tf.js} +1 -1
  39. package/dist/assets/{TextField-D7-Vl4N2.js → TextField-UIj7bh4L.js} +1 -1
  40. package/dist/assets/{ToggleButtonGroup-C8YC_AbK.js → ToggleButtonGroup-BezYeHSt.js} +1 -1
  41. package/dist/assets/{ViewList-ww_Jy26j.js → ViewList-BdFK3ZRI.js} +1 -1
  42. package/dist/assets/{actions-DVIIvqI9.js → actions-ByIKLhO5.js} +1 -1
  43. package/dist/assets/{actions-CfLfEA5o.js → actions-DvMK194y.js} +1 -1
  44. package/dist/assets/{agreement-j9qZoXbi.js → agreement-CaStPJUg.js} +6 -6
  45. package/dist/assets/api-px2wpsj4.js +1 -0
  46. package/dist/assets/app-avatar-DMwKWgcU.js +1 -0
  47. package/dist/assets/{ar-D-8bmv2Q.js → ar-CYspPmSu.js} +1 -1
  48. package/dist/assets/{audit-logs-DtLwS7ge.js → audit-logs-t-VHu0Dr.js} +1 -1
  49. package/dist/assets/blocklet-BkUmmvf6.js +1 -0
  50. package/dist/assets/{brace-fold.es-MaAtm0YJ.js → brace-fold.es-CTXnLvpw.js} +1 -1
  51. package/dist/assets/{bundle-avatar-CzY4FWcT.js → bundle-avatar-FKqqno38.js} +1 -1
  52. package/dist/assets/{chart-CL8fHlYj.js → chart-CRT8ZY2D.js} +2 -2
  53. package/dist/assets/{click-to-copy-CRCcWlGf.js → click-to-copy-D6fJs3Fy.js} +1 -1
  54. package/dist/assets/{closebrackets.es-ClBbybwI.js → closebrackets.es-CeqttfBg.js} +1 -1
  55. package/dist/assets/{codemirror.es-CVvRjjht.js → codemirror.es-DLcwUx7p.js} +1 -1
  56. package/dist/assets/{comment.es-C82zWRz0.js → comment.es-Dwlg7zZ0.js} +1 -1
  57. package/dist/assets/{config-navigation-Ba5IHsVi.js → config-navigation-iOt18Gkq.js} +5 -5
  58. package/dist/assets/{de-BXUm1QYV.js → de-DIG5UukX.js} +1 -1
  59. package/dist/assets/{delete-confirm-BGrzi75s.js → delete-confirm-SB_AYHUI.js} +1 -1
  60. package/dist/assets/{detail-dhpUaLCM.js → detail-aujfRVSm.js} +3 -3
  61. package/dist/assets/{dialog.es-DqPlApF_.js → dialog.es-BoZ8Hndg.js} +1 -1
  62. package/dist/assets/{download-C05PPT48.js → download-DQwdlhb7.js} +1 -1
  63. package/dist/assets/{es-CH6tZGrR.js → es-iIE-oygq.js} +1 -1
  64. package/dist/assets/{foldgutter.es-CeF_j6cJ.js → foldgutter.es-C0B3TZBw.js} +1 -1
  65. package/dist/assets/{fr-roccVFT3.js → fr-D8XyKysR.js} +1 -1
  66. package/dist/assets/getValidReactChildren-COQgThjG.js +1 -0
  67. package/dist/assets/{hi-VN-lZj6f.js → hi-C12r029w.js} +1 -1
  68. package/dist/assets/{hint.es-DNAfoVMm.js → hint.es-8QwfI9G8.js} +1 -1
  69. package/dist/assets/{hint.es2-CU1qoYEt.js → hint.es2-CSc3mT9h.js} +1 -1
  70. package/dist/assets/{id-C-ovCb8b.js → id-BM1nX889.js} +1 -1
  71. package/dist/assets/{iframe-BvKPLFbb.js → iframe-BsBQ7ohV.js} +1 -1
  72. package/dist/assets/{index-CwFZQrLE.js → index-7Qh6jCeM.js} +1 -1
  73. package/dist/assets/{index-Ck3GPasE.js → index-AmOaldrX.js} +3 -3
  74. package/dist/assets/{index-B47niqg_.js → index-B-ybRhYS.js} +3 -3
  75. package/dist/assets/{index-CBdRhIVO.js → index-B4C9ArGO.js} +3 -3
  76. package/dist/assets/{index-DeHtrQ7P.js → index-B4uBhVoZ.js} +1 -1
  77. package/dist/assets/index-B6-dKqLH.js +11 -0
  78. package/dist/assets/index-BHylZj48.js +278 -0
  79. package/dist/assets/{index-xdp5_tXH.js → index-BNTzqgfC.js} +1 -1
  80. package/dist/assets/{index-BTXMR9xa.js → index-BTF_a0ok.js} +2 -2
  81. package/dist/assets/{index-DD86vUxF.js → index-BZBRVOaw.js} +1 -1
  82. package/dist/assets/{index-DbPVOvSO.js → index-B_W7z3II.js} +1 -1
  83. package/dist/assets/{index-47g0cU0E.js → index-BaJfxzLi.js} +1 -1
  84. package/dist/assets/{index-BwYDd0Tm.js → index-BaSZHjNU.js} +1 -1
  85. package/dist/assets/{index-DxfcfSRi.js → index-By1cj6yo.js} +1 -1
  86. package/dist/assets/index-C69Wt2SK.js +150 -0
  87. package/dist/assets/{index-BOqdAGub.js → index-CBMSKoCT.js} +1 -1
  88. package/dist/assets/{index-BmYxQtQ4.js → index-CEXcSiNy.js} +1 -1
  89. package/dist/assets/index-CKyWFL_5.js +54 -0
  90. package/dist/assets/index-Cp7_fpD3.js +1 -0
  91. package/dist/assets/{index-CP_gsEZk.js → index-CpTpPC7E.js} +1 -1
  92. package/dist/assets/{index-C5QsMFdj.js → index-CvB9dSIF.js} +1 -1
  93. package/dist/assets/index-DBXP37Lb.js +288 -0
  94. package/dist/assets/{index-nSc0VxEZ.js → index-DBmLMLK2.js} +1 -1
  95. package/dist/assets/{index-CPISMYm_.js → index-DWzRY4Xk.js} +1 -1
  96. package/dist/assets/{index-ZGnAW8k-.js → index-DhKEzK4G.js} +120 -120
  97. package/dist/assets/{index-CTuqdacw.js → index-DiVGhjwz.js} +1 -1
  98. package/dist/assets/{index-D-60mXOg.js → index-DpsnjJXZ.js} +1 -1
  99. package/dist/assets/{index-C0k3BC5k.js → index-Dr-mhUSe.js} +3 -3
  100. package/dist/assets/{index-DbXIo2GY.js → index-DzY48FPR.js} +9 -9
  101. package/dist/assets/index-FEwB9kgu.js +262 -0
  102. package/dist/assets/{index-Jx4Fqi_s.js → index-GRZ7T-Vj.js} +28 -28
  103. package/dist/assets/{index-Q8y1koUx.js → index-PM4c29FK.js} +1 -1
  104. package/dist/assets/{index-htQb1has.js → index-Q7qqT9VL.js} +1 -1
  105. package/dist/assets/{index-CcHjeoRT.js → index-UcfhuBCV.js} +1 -1
  106. package/dist/assets/{index-Dpm78Z5H.js → index-W1Roe0KR.js} +1 -1
  107. package/dist/assets/{index-CRpa8mt0.js → index-Z-ABz1jd.js} +5 -5
  108. package/dist/assets/{index-BzvNtIY8.js → index-_7deM5fB.js} +1 -1
  109. package/dist/assets/{index-2KEUrOnp.js → index-aGlAj0Zr.js} +1 -1
  110. package/dist/assets/index-hQaQ5PJ4.js +314 -0
  111. package/dist/assets/{index-C1yo1XnB.js → index-lU5qXZaf.js} +1 -1
  112. package/dist/assets/{index-CsDwstJh.js → index-lfnvzeT0.js} +1 -1
  113. package/dist/assets/{index-B2Ydaom7.js → index-uXUXUKt1.js} +7 -7
  114. package/dist/assets/{index-CmC3_Eds.js → index-vVyFVEQx.js} +1 -1
  115. package/dist/assets/{index-COUqkfTn.js → index-xq7hcpVR.js} +1 -1
  116. package/dist/assets/{index.es-hjsi54WY.js → index.es-BN3JAuK7.js} +1 -1
  117. package/dist/assets/{index.esm-w_WP2iFy.js → index.esm--UowQ839.js} +1 -1
  118. package/dist/assets/{info-addon.es-BwQtq18_.js → info-addon.es-CTOMNSVc.js} +1 -1
  119. package/dist/assets/{info.es-Bxzc18tW.js → info.es-BrcMiDXg.js} +1 -1
  120. package/dist/assets/{install-from-url-BpQI48sC.js → install-from-url-CWSHHc8X.js} +1 -1
  121. package/dist/assets/{invitation-DxXG7nra.js → invitation-VBkiv8Lw.js} +8 -8
  122. package/dist/assets/is-path-prefix-equal-BRfJaTzW.js +1 -0
  123. package/dist/assets/{isEqual-DkxHXXMW.js → isEqual-RXiETUsF.js} +1 -1
  124. package/dist/assets/{item-CZsxlZnz.js → item-BE4r4zK9.js} +1 -1
  125. package/dist/assets/{ja-D-sN9ij0.js → ja-D8yfIRFO.js} +1 -1
  126. package/dist/assets/{javascript.es-CGn-ScFl.js → javascript.es-oUt02u-R.js} +1 -1
  127. package/dist/assets/{jump-to-line.es-CWVtSCYy.js → jump-to-line.es-xeQdXXR7.js} +1 -1
  128. package/dist/assets/{jump.es-DxdpkWWi.js → jump.es-DoHQC_ja.js} +1 -1
  129. package/dist/assets/{ko-DFpbqZ_Q.js → ko-BYDKCXC0.js} +1 -1
  130. package/dist/assets/{line-DfRJLxHw.js → line-DmTazELP.js} +4 -4
  131. package/dist/assets/{lint.es-Cn-NE8s7.js → lint.es-CPYwltP7.js} +1 -1
  132. package/dist/assets/{lint.es2-DiLIozTW.js → lint.es2-6T7H8Exj.js} +1 -1
  133. package/dist/assets/{lint.es3-BKeD_KCD.js → lint.es3-Cz2FVjJI.js} +1 -1
  134. package/dist/assets/{list-header-Cn6ronu6.js → list-header-B6f1dZ3Q.js} +1 -1
  135. package/dist/assets/{log-CBd4yiLd.js → log-DfA15qoc.js} +1 -1
  136. package/dist/assets/{lottie-BhIusYBK.js → lottie-C-f15GXo.js} +1 -1
  137. package/dist/assets/{matchbrackets.es-C8Sy_DTp.js → matchbrackets.es-BOyxvkba.js} +1 -1
  138. package/dist/assets/{memory-CrREi08U.js → memory-BCv7wlIh.js} +1 -1
  139. package/dist/assets/{mode.es-CRX6d_8r.js → mode.es-DwFnPhPx.js} +1 -1
  140. package/dist/assets/{mode.es2-BYlzTYp8.js → mode.es2-BWVwRWIf.js} +1 -1
  141. package/dist/assets/{mode.es3-BlMpLqAY.js → mode.es3-BQDrBmo8.js} +1 -1
  142. package/dist/assets/{onlineParser.es-Buh5bsDU.js → onlineParser.es-B9niO3Rc.js} +1 -1
  143. package/dist/assets/{overview--S9u2G7d.js → overview-Cx_VZc65.js} +1 -1
  144. package/dist/assets/{pt-BXC7UTMq.js → pt-B9DRiZEN.js} +1 -1
  145. package/dist/assets/{react-C3TTI-Hf.js → react-DSqvcQYy.js} +3 -3
  146. package/dist/assets/{redux-D53RmvG3.js → redux-BsHcI3_9.js} +1 -1
  147. package/dist/assets/{resource-dialog-BqPaioMe.js → resource-dialog-DLQewgrN.js} +2 -2
  148. package/dist/assets/{ru-BbD1NNUC.js → ru-CUxGgO8D.js} +1 -1
  149. package/dist/assets/{runtime-8R1L5Qei.js → runtime-851oSSvI.js} +1 -1
  150. package/dist/assets/{schema-vba8ScMR.js → schema-CHbqUY8n.js} +1 -1
  151. package/dist/assets/sdk-BNPz4UBQ.js +1 -0
  152. package/dist/assets/{search.es-CUmn7XrO.js → search.es-BwvbmPsk.js} +1 -1
  153. package/dist/assets/{searchcursor.es-CnWycfn9.js → searchcursor.es-mmx6SXwj.js} +1 -1
  154. package/dist/assets/service-CeSZ159H.js +1 -0
  155. package/dist/assets/{shorten-label-BbyRZw10.js → shorten-label-Zm18p2j_.js} +1 -1
  156. package/dist/assets/{show-hint.es-yYddy2nN.js → show-hint.es-BWO21koW.js} +1 -1
  157. package/dist/assets/{slicedToArray-C-ReaQzH.js → slicedToArray-CSiWJNnp.js} +1 -1
  158. package/dist/assets/{spaces-CHvfSEjC.js → spaces-B_PEyuiK.js} +1 -1
  159. package/dist/assets/{sublime.es-C7Xwv4Fs.js → sublime.es-DbB59fDR.js} +1 -1
  160. package/dist/assets/{switch-control-YIGp_J-o.js → switch-control-CVljCfLQ.js} +1 -1
  161. package/dist/assets/{table-icons-Htpo0aNL.js → table-icons-DRSK9N17.js} +1 -1
  162. package/dist/assets/{tag-CxVWvL3v.js → tag-s8n8kLNC.js} +1 -1
  163. package/dist/assets/team-DcawcK1N.js +1 -0
  164. package/dist/assets/{th-VkDcmE_T.js → th-D6abaOt7.js} +1 -1
  165. package/dist/assets/toUpper-Caw7x1nX.js +1 -0
  166. package/dist/assets/{traffic-B7M7MwN4.js → traffic-Cp_OUEwu.js} +1 -1
  167. package/dist/assets/url-evaluation-85NTzVAr.js +7 -0
  168. package/dist/assets/{url-join-CZQCk0ge.js → url-join-BTiLIGs1.js} +1 -1
  169. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DePpDQKa.js → use-blocklet-info-for-connect-did-spaces-B_L8zOwH.js} +1 -1
  170. package/dist/assets/{useLocalStorage-Cpx0Qijo.js → useLocalStorage-Dkuy7Y9c.js} +1 -1
  171. package/dist/assets/{useThemeProps-DMpUSpUQ.js → useThemeProps-DY6u-Sl5.js} +1 -1
  172. package/dist/assets/{util-opsnBGhQ.js → util-CR7yn4Rx.js} +1 -1
  173. package/dist/assets/{vi-CanFbf1v.js → vi-BsX5AAJJ.js} +1 -1
  174. package/dist/assets/{wait-container-DP8Bb6X-.js → wait-container-D6A_wUSz.js} +1 -1
  175. package/dist/assets/withStyles-B8wbvHA2.js +1 -0
  176. package/dist/assets/wrap-locale-B0GJBc6u.js +1 -0
  177. package/dist/assets/{zh-BxXo7x1m.js → zh-BxFByN8K.js} +1 -1
  178. package/dist/assets/{zh-tw-Bvqjz2OU.js → zh-tw-D7VeUoit.js} +1 -1
  179. package/dist/index.html +1 -1
  180. package/dist/service-worker.js +1 -1
  181. package/package.json +1 -1
  182. package/dist/assets/DeleteOutline-BngWwPLv.js +0 -1
  183. package/dist/assets/api-1QhTD3Py.js +0 -1
  184. package/dist/assets/app-avatar-DX2Wz0PD.js +0 -1
  185. package/dist/assets/blocklet-F36VtnS3.js +0 -1
  186. package/dist/assets/getValidReactChildren-BulArIz5.js +0 -1
  187. package/dist/assets/index-ByhJ7PKw.js +0 -278
  188. package/dist/assets/index-ByoVNU5z.js +0 -1
  189. package/dist/assets/index-C5jvxTRJ.js +0 -309
  190. package/dist/assets/index-D-TSSwe_.js +0 -54
  191. package/dist/assets/index-DShKrg-W.js +0 -150
  192. package/dist/assets/index-N35a-P_5.js +0 -288
  193. package/dist/assets/index-W_RWClvn.js +0 -262
  194. package/dist/assets/index-ziy-s42n.js +0 -11
  195. package/dist/assets/is-path-prefix-equal-BiTDqCe2.js +0 -1
  196. package/dist/assets/service-C47VUoeK.js +0 -1
  197. package/dist/assets/team-CgUZDWzH.js +0 -1
  198. package/dist/assets/toUpper-CeMG-5le.js +0 -1
  199. package/dist/assets/url-evaluation-DCs4qJ1s.js +0 -7
  200. package/dist/assets/withStyles-CiarYOCJ.js +0 -1
  201. package/dist/assets/wrap-locale-BSVVLHW0.js +0 -1
@@ -1,4 +1,4 @@
1
- import{u as z,j as n,r as d,L as X,P as h,f as V,l as b,O as m,m as E,d as Y,V as Z,C as ee,q as te,M as v,a as f,F as T,b as j,cV as re,G as y,A as L,p as ne,o as oe,z as se,bh as ie,n as ae}from"./index-ZGnAW8k-.js";import{T as me}from"./index-CPISMYm_.js";import le from"./traffic-B7M7MwN4.js";import{D as ce}from"./index-DD86vUxF.js";import{B as ue}from"./app-avatar-DX2Wz0PD.js";import{B as de}from"./bundle-avatar-CzY4FWcT.js";import{C as pe,M as S}from"./memory-CrREi08U.js";import{I as fe}from"./chart-CL8fHlYj.js";import{w as he}from"./withStyles-CiarYOCJ.js";import{_ as ge}from"./useLocalStorage-Cpx0Qijo.js";import{T as ve,a as ye}from"./ToggleButtonGroup-C8YC_AbK.js";import"./Delete-BA9-i54s.js";import"./iframe-BvKPLFbb.js";import"./ChevronLeft-DGO3AjSX.js";import"./ChevronRight-DcNBTOQr.js";import"./Select-6AAHiQjm.js";import"./useThemeProps-DMpUSpUQ.js";import"./TextField-D7-Vl4N2.js";import"./InputLabel-DKHlRadP.js";import"./InputAdornment-O2bgTsbw.js";import"./FilterList-qnkLmWiK.js";import"./LastPage-DSz-M1aM.js";import"./index-DbXIo2GY.js";import"./redux-D53RmvG3.js";import"./Search-BvtdswCD.js";import"./index-Q8y1koUx.js";import"./MoreVert-CpEsw2Tj.js";import"./getValidReactChildren-BulArIz5.js";function xe(){const{api:e,info:t}=z();return n.jsx(le,{client:e,did:t.did})}var M={};Object.defineProperty(M,"__esModule",{value:!0});var A=M.default=void 0;je(d);var C=n;function je(e){return e&&e.__esModule?e:{default:e}}function k(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),i.push.apply(i,a)}return i}function _(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?k(Object(i),!0).forEach(function(a){be(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function be(e,t,i){return t=Ie(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ie(e){var t=Ne(e,"string");return typeof t=="symbol"?t:String(t)}function Ne(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O=function(t){return(0,C.jsxs)("svg",_(_({},t),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.083 3.2c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12v10.24a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V3.2zm2.24 1.12v8h23.36v-8H4.323zm-2.24 14.24c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12V28.8a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V18.56zm2.24 1.12v8h23.36v-8H4.323z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M8.963 7.04h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64zm5.12-15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64z",fill:"currentColor"})]}))};O.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};O.displayName="server";A=M.default=O;const Pe=he(e=>({root:{height:10},colorPrimary:{backgroundColor:e.palette.grey[e.palette.mode==="light"?200:700]},bar:{backgroundColor:e.palette.secondary.main}}))(X);function H(e){const{value:t}=e;return n.jsxs(m,{display:"flex",alignItems:"center",mt:2,children:[n.jsx(m,{width:"100%",style:{overflow:"hidden"},mr:1,children:n.jsx(Pe,{variant:"determinate",...e})}),n.jsx(m,{minWidth:35,children:n.jsx(E,{variant:"body2",color:"textSecondary",children:`${Math.round(t)}%`})})]})}H.propTypes={value:h.number.isRequired};function R({disk:e}){const{t}=d.useContext(V),i=[{id:1,className:"used",title:t("system.used"),metric:b(e.used)},{id:2,className:"free",title:t("system.free"),metric:b(e.free)},{id:3,className:"total",title:t("system.total"),metric:b(e.total)}];return n.jsx(fe,{title:`${t("common.disk")} (${e.device})`,value:b(e.used),graph:n.jsx(m,{mt:3,children:n.jsx(H,{value:e.used/e.total*100})}),description:i.map((a,u)=>n.jsxs(m,{sx:{marginLeft:u===0?0:2},children:[a.title,": ",a.metric]},a.title))})}R.propTypes={disk:h.shape({used:h.number,free:h.number,total:h.number,device:h.string})};R.defaultProps={disk:{used:0,free:0,total:1,device:""}};const D={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function $({initialBlocklets:e}){const{t,locale:i}=te(),{api:a}=z(),[u,I]=ge("runtime-view-interval",6),x=d.useMemo(()=>{const r=[];return r.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:D}),r.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:D}),e.forEach(o=>{v.forEachBlockletSync(o,(s,{id:l,ancestors:c})=>{s.runtimeInfo&&r.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:l,name:v.getDisplayName(s,!0),blocklet:o,component:s,runtimeInfo:s.runtimeInfo,ancestors:c})})}),r},[]),[p,N]=d.useState(x),[g,F]=d.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[P,q]=d.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});f(T.EVENTS.NODE_RUNTIME_INFO,r=>{r.mem.total=r.mem.total||0,r.mem.used=r.mem.total-(r.mem.available||0),F(r),N(o=>o.map(s=>s.id==="server:daemon"?{...s,runtimeInfo:{...s.runtimeInfo,...r.daemon}}:s.id==="server:service"?{...s,runtimeInfo:{...s.runtimeInfo,...r.service}}:s))}),f(T.EVENTS.BLOCKLETS_RUNTIME_INFO,r=>{if(!r||!r.length){console.error("incorrect blocklets runtime info format",r);return}N(o=>o.map(s=>{const l=r.find(c=>c.componentId===s.id);return l?{...s,runtimeInfo:{...s.runtimeInfo,...l.runtimeInfo}}:s}))});const w=r=>{N(o=>o.filter(s=>s.groupId!==r.meta.did))},B=async r=>{try{const{blocklet:o}=await a.getBlocklet({input:{did:r.meta.did,attachRuntimeInfo:!0}});o.status!=="running"&&w(o),N(s=>{const l=s.filter(c=>c.groupId!==o.meta.did);return v.forEachBlockletSync(o,(c,{id:J,ancestors:Q})=>{c.runtimeInfo&&l.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:J,name:v.getDisplayName(c,!0),blocklet:o,component:c,runtimeInfo:c.runtimeInfo,ancestors:Q})}),l})}catch(o){L.error(o.message)}};f(j.BlockletEvents.removed,w),f(j.BlockletEvents.startFailed,w),f(j.BlockletEvents.statusChange,r=>{if(r.status!=="running"){w(r);return}B(r)}),f(j.BlockletEvents.updated,B),f(j.BlockletEvents.started,B);const G=()=>{a.getNodeRuntimeHistory({input:{hours:u}}).then(r=>{const o=r.history||[];q({cpu:o.map(s=>({date:s.date,value:s.cpu})),mem:o.map(s=>({date:s.date,value:s.mem})),daemonMem:o.map(s=>({date:s.date,value:s.daemonMem})),serviceMem:o.map(s=>({date:s.date,value:s.serviceMem}))})}).catch(r=>{L.error(r.message)})};d.useEffect(()=>{G()},[u]);const W=r=>ne(Number(r||0),{locale:oe(i)}),K=[{label:t("common.group"),name:"groupName",options:{customBodyRenderLite(r){const{type:o,blocklet:s,groupName:l}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(re,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:l})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(ue,{size:14,blocklet:s}),n.jsx(m,{ml:1,children:l})]})}}},{label:t("common.name"),name:"name",options:{customBodyRenderLite(r){const{type:o,name:s,component:l,ancestors:c}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(A,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:s})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(de,{size:14,blocklet:l,ancestors:c}),n.jsx(m,{ml:1,children:s})]})}}},{label:t("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return W(o.uptime)}}},{label:t("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return b((o==null?void 0:o.memoryUsage)||0)},sortDirection:"asc"}},{label:t("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:t("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:t("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return n.jsxs("div",{children:[n.jsxs(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[n.jsx(E,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:t("analytics.trend")}),n.jsx(ve,{size:"small",exclusive:!0,value:u,onChange:(r,o)=>I(o),children:[1,3,6,12,24].map(r=>n.jsxs(ye,{value:r,children:[r,"H"]},r))})]}),n.jsxs(y,{mb:4,container:!0,spacing:4,children:[n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(pe,{...g.cpu,history:P.cpu})},"cpu"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{...g.mem,history:P.mem})},"memory"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Daemon)`,used:g.daemon.memoryUsage||0,history:P.daemonMem})},"memory-daemon"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Service)`,instanceCount:g.service.instanceCount||0,used:g.service.memoryUsage||0,history:P.serviceMem})},"memory-service"),g.disks.map(r=>n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(R,{disk:r})},"disk"))]}),n.jsx(ce,{className:"runtime-insight-list",title:t("analytics.detail"),locale:i,data:p,columns:K,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}$.propTypes={initialBlocklets:h.array.isRequired};function we(){const{data:e,externalData:t,initialized:i}=Y();if(!i)return n.jsx(Z,{relative:"parent",children:n.jsx(ee,{})});const a=[...e,...t];return n.jsx($,{initialBlocklets:a})}function tt(){const e=se(),{t}=d.useContext(V),{tab:i="traffic"}=ie(),a=p=>{e(`/analytics/${p}`)},u=[{label:t("common.traffic"),value:"traffic"},{label:t("common.runtime"),value:"runtime"}],I={traffic:xe,runtime:we},x=I[i]||I.traffic;return n.jsxs(Be,{children:[n.jsx(E,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:t("common.analytics")}),n.jsx(me,{tabs:u,current:i,onChange:a}),n.jsx("div",{className:"page-content",children:d.isValidElement(x)?x:n.jsx(x,{})})]})}const Be=ae.main`
1
+ import{u as z,j as n,r as d,L as X,P as g,f as V,l as b,O as m,m as E,d as Y,V as Z,C as ee,q as te,M as v,a as f,F as R,b as j,cT as re,G as y,A as L,p as ne,o as oe,z as se,bg as ie,n as ae}from"./index-DhKEzK4G.js";import{T as me}from"./index-DWzRY4Xk.js";import le from"./traffic-Cp_OUEwu.js";import{D as ce}from"./index-BZBRVOaw.js";import{B as ue}from"./app-avatar-DMwKWgcU.js";import{B as de}from"./bundle-avatar-FKqqno38.js";import{C as pe,M as S}from"./memory-BCv7wlIh.js";import{I as fe}from"./chart-CRT8ZY2D.js";import{w as ge}from"./withStyles-B8wbvHA2.js";import{_ as he}from"./useLocalStorage-Dkuy7Y9c.js";import{T as ve,a as ye}from"./ToggleButtonGroup-BezYeHSt.js";import"./Delete-Di-3Vxhz.js";import"./iframe-BsBQ7ohV.js";import"./ChevronLeft-Eu14H7S5.js";import"./ChevronRight-Ba-Rcz-i.js";import"./Select-BAE2ztrO.js";import"./useThemeProps-DY6u-Sl5.js";import"./TextField-UIj7bh4L.js";import"./InputLabel-E2n2XENL.js";import"./InputAdornment-DAdjrwZB.js";import"./FilterList-CtKjjq1V.js";import"./LastPage-Dk3Ng8r_.js";import"./index-DzY48FPR.js";import"./redux-BsHcI3_9.js";import"./Search-Drx5S2Fc.js";import"./index-PM4c29FK.js";import"./MoreVert-CGx6Mqxv.js";import"./getValidReactChildren-COQgThjG.js";function xe(){const{api:e,info:t}=z();return n.jsx(le,{client:e,did:t.did})}var M={};Object.defineProperty(M,"__esModule",{value:!0});var A=M.default=void 0;je(d);var C=n;function je(e){return e&&e.__esModule?e:{default:e}}function k(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),i.push.apply(i,a)}return i}function _(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?k(Object(i),!0).forEach(function(a){be(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function be(e,t,i){return t=Ie(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ie(e){var t=Ne(e,"string");return typeof t=="symbol"?t:String(t)}function Ne(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O=function(t){return(0,C.jsxs)("svg",_(_({},t),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.083 3.2c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12v10.24a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V3.2zm2.24 1.12v8h23.36v-8H4.323zm-2.24 14.24c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12V28.8a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V18.56zm2.24 1.12v8h23.36v-8H4.323z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M8.963 7.04h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64zm5.12-15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64z",fill:"currentColor"})]}))};O.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};O.displayName="server";A=M.default=O;const Pe=ge(e=>({root:{height:10},colorPrimary:{backgroundColor:e.palette.grey[e.palette.mode==="light"?200:700]},bar:{backgroundColor:e.palette.secondary.main}}))(X);function H(e){const{value:t}=e;return n.jsxs(m,{display:"flex",alignItems:"center",mt:2,children:[n.jsx(m,{width:"100%",style:{overflow:"hidden"},mr:1,children:n.jsx(Pe,{variant:"determinate",...e})}),n.jsx(m,{minWidth:35,children:n.jsx(E,{variant:"body2",color:"textSecondary",children:`${Math.round(t)}%`})})]})}H.propTypes={value:g.number.isRequired};function T({disk:e}){const{t}=d.useContext(V),i=[{id:1,className:"used",title:t("system.used"),metric:b(e.used)},{id:2,className:"free",title:t("system.free"),metric:b(e.free)},{id:3,className:"total",title:t("system.total"),metric:b(e.total)}];return n.jsx(fe,{title:`${t("common.disk")} (${e.device})`,value:b(e.used),graph:n.jsx(m,{mt:3,children:n.jsx(H,{value:e.used/e.total*100})}),description:i.map((a,u)=>n.jsxs(m,{sx:{marginLeft:u===0?0:2},children:[a.title,": ",a.metric]},a.title))})}T.propTypes={disk:g.shape({used:g.number,free:g.number,total:g.number,device:g.string})};T.defaultProps={disk:{used:0,free:0,total:1,device:""}};const D={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function $({initialBlocklets:e}){const{t,locale:i}=te(),{api:a}=z(),[u,I]=he("runtime-view-interval",6),x=d.useMemo(()=>{const r=[];return r.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:D}),r.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:D}),e.forEach(o=>{v.forEachBlockletSync(o,(s,{id:l,ancestors:c})=>{s.runtimeInfo&&r.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:l,name:v.getDisplayName(s,!0),blocklet:o,component:s,runtimeInfo:s.runtimeInfo,ancestors:c})})}),r},[]),[p,N]=d.useState(x),[h,F]=d.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[P,q]=d.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});f(R.EVENTS.NODE_RUNTIME_INFO,r=>{r.mem.total=r.mem.total||0,r.mem.used=r.mem.total-(r.mem.available||0),F(r),N(o=>o.map(s=>s.id==="server:daemon"?{...s,runtimeInfo:{...s.runtimeInfo,...r.daemon}}:s.id==="server:service"?{...s,runtimeInfo:{...s.runtimeInfo,...r.service}}:s))}),f(R.EVENTS.BLOCKLETS_RUNTIME_INFO,r=>{if(!r||!r.length){console.error("incorrect blocklets runtime info format",r);return}N(o=>o.map(s=>{const l=r.find(c=>c.componentId===s.id);return l?{...s,runtimeInfo:{...s.runtimeInfo,...l.runtimeInfo}}:s}))});const w=r=>{N(o=>o.filter(s=>s.groupId!==r.meta.did))},B=async r=>{try{const{blocklet:o}=await a.getBlocklet({input:{did:r.meta.did,attachRuntimeInfo:!0}});o.status!=="running"&&w(o),N(s=>{const l=s.filter(c=>c.groupId!==o.meta.did);return v.forEachBlockletSync(o,(c,{id:J,ancestors:Q})=>{c.runtimeInfo&&l.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:J,name:v.getDisplayName(c,!0),blocklet:o,component:c,runtimeInfo:c.runtimeInfo,ancestors:Q})}),l})}catch(o){L.error(o.message)}};f(j.BlockletEvents.removed,w),f(j.BlockletEvents.startFailed,w),f(j.BlockletEvents.statusChange,r=>{if(r.status!=="running"){w(r);return}B(r)}),f(j.BlockletEvents.updated,B),f(j.BlockletEvents.started,B);const G=()=>{a.getNodeRuntimeHistory({input:{hours:u}}).then(r=>{const o=r.history||[];q({cpu:o.map(s=>({date:s.date,value:s.cpu})),mem:o.map(s=>({date:s.date,value:s.mem})),daemonMem:o.map(s=>({date:s.date,value:s.daemonMem})),serviceMem:o.map(s=>({date:s.date,value:s.serviceMem}))})}).catch(r=>{L.error(r.message)})};d.useEffect(()=>{G()},[u]);const W=r=>ne(Number(r||0),{locale:oe(i)}),K=[{label:t("common.group"),name:"groupName",options:{customBodyRenderLite(r){const{type:o,blocklet:s,groupName:l}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(re,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:l})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(ue,{size:14,blocklet:s}),n.jsx(m,{ml:1,children:l})]})}}},{label:t("common.name"),name:"name",options:{customBodyRenderLite(r){const{type:o,name:s,component:l,ancestors:c}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(A,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:s})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(de,{size:14,blocklet:l,ancestors:c}),n.jsx(m,{ml:1,children:s})]})}}},{label:t("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return W(o.uptime)}}},{label:t("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return b((o==null?void 0:o.memoryUsage)||0)},sortDirection:"asc"}},{label:t("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:t("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:t("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return n.jsxs("div",{children:[n.jsxs(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[n.jsx(E,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:t("analytics.trend")}),n.jsx(ve,{size:"small",exclusive:!0,value:u,onChange:(r,o)=>I(o),children:[1,3,6,12,24].map(r=>n.jsxs(ye,{value:r,children:[r,"H"]},r))})]}),n.jsxs(y,{mb:4,container:!0,spacing:4,children:[n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(pe,{...h.cpu,history:P.cpu})},"cpu"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{...h.mem,history:P.mem})},"memory"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Daemon)`,used:h.daemon.memoryUsage||0,history:P.daemonMem})},"memory-daemon"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Service)`,instanceCount:h.service.instanceCount||0,used:h.service.memoryUsage||0,history:P.serviceMem})},"memory-service"),h.disks.map(r=>n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(T,{disk:r})},"disk"))]}),n.jsx(ce,{className:"runtime-insight-list",title:t("analytics.detail"),locale:i,data:p,columns:K,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}$.propTypes={initialBlocklets:g.array.isRequired};function we(){const{data:e,externalData:t,initialized:i}=Y();if(!i)return n.jsx(Z,{relative:"parent",children:n.jsx(ee,{})});const a=[...e,...t];return n.jsx($,{initialBlocklets:a})}function tt(){const e=se(),{t}=d.useContext(V),{tab:i="traffic"}=ie(),a=p=>{e(`/analytics/${p}`)},u=[{label:t("common.traffic"),value:"traffic"},{label:t("common.runtime"),value:"runtime"}],I={traffic:xe,runtime:we},x=I[i]||I.traffic;return n.jsxs(Be,{children:[n.jsx(E,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:t("common.analytics")}),n.jsx(me,{tabs:u,current:i,onChange:a}),n.jsx("div",{className:"page-content",children:d.isValidElement(x)?x:n.jsx(x,{})})]})}const Be=ae.main`
2
2
  .page-header {
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-ZGnAW8k-.js";import{f as oe}from"./index-D9k2I5J1.js";import{I as E}from"./index-DeHtrQ7P.js";import{C as I}from"./click-to-copy-CRCcWlGf.js";import{w as ie}from"./withStyles-CiarYOCJ.js";var le=F,ce=le(function(n,i,r){return n+(r?" ":"")+i.toLowerCase()}),me=ce;const de=O(me);function w({icon:n,value:i,name:r,url:x,animated:c,LinkComponent:l,prefix:d}){const s=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"metric__image",children:e.jsx(Y,{name:n,alt:typeof r=="string"?r:"",size:30,prefix:d,color:"#222222"})}),e.jsxs("div",{children:[e.jsx("div",{className:`metric__number ${c?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:i}}),e.jsx("div",{className:"metric__name",children:r})]})]});return e.jsx(ue,{children:x?e.jsx(l,{to:x,children:s}):s})}w.propTypes={icon:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,name:o.node.isRequired,animated:o.bool,url:o.string,LinkComponent:o.any,prefix:o.string};w.defaultProps={animated:!1,url:"",LinkComponent:null,prefix:"/images"};const ue=Q("div")`
1
+ import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-DhKEzK4G.js";import{f as oe}from"./index-D9k2I5J1.js";import{I as E}from"./index-B4uBhVoZ.js";import{C as I}from"./click-to-copy-D6fJs3Fy.js";import{w as ie}from"./withStyles-B8wbvHA2.js";var le=F,ce=le(function(n,i,r){return n+(r?" ":"")+i.toLowerCase()}),me=ce;const de=O(me);function w({icon:n,value:i,name:r,url:x,animated:c,LinkComponent:l,prefix:d}){const s=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"metric__image",children:e.jsx(Y,{name:n,alt:typeof r=="string"?r:"",size:30,prefix:d,color:"#222222"})}),e.jsxs("div",{children:[e.jsx("div",{className:`metric__number ${c?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:i}}),e.jsx("div",{className:"metric__name",children:r})]})]});return e.jsx(ue,{children:x?e.jsx(l,{to:x,children:s}):s})}w.propTypes={icon:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,name:o.node.isRequired,animated:o.bool,url:o.string,LinkComponent:o.any,prefix:o.string};w.defaultProps={animated:!1,url:"",LinkComponent:null,prefix:"/images"};const ue=Q("div")`
2
2
  border-left: 1px solid ${n=>n.theme.typography.color.main};
3
3
  padding: 10px 0 10px 16px;
4
4
  @media (max-width: ${n=>n.theme.breakpoints.values.sm}px) {
@@ -1,3 +1,3 @@
1
- import{l as q}from"./lottie-BhIusYBK.js";import{r as D,bb as z}from"./index-ZGnAW8k-.js";function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,u,c,o,b=[],s=!0,A=!1;try{if(c=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=c.call(r)).done)&&(b.push(n.value),b.length!==e);s=!0);}catch(g){A=!0,u=g}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(A)throw u}}return b}}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),r.push.apply(r,n)}return r}function T(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(n){J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J(t,e,r){return e=ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q(t,e){if(t==null)return{};var r={},n=Object.keys(t),u,c;for(c=0;c<n.length;c++)u=n[c],!(e.indexOf(u)>=0)&&(r[u]=t[u]);return r}function x(t,e){if(t==null)return{};var r=Q(t,e),n,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(u=0;u<c.length;u++)n=c[u],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Z(t,e){return ee(t)||G(t,e)||te(t,e)||ne()}function ee(t){if(Array.isArray(t))return t}function te(t,e){if(t){if(typeof t=="string")return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(t,e)}}function j(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{l as q}from"./lottie-C-f15GXo.js";import{r as D,bb as z}from"./index-DhKEzK4G.js";function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,u,c,o,b=[],s=!0,A=!1;try{if(c=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=c.call(r)).done)&&(b.push(n.value),b.length!==e);s=!0);}catch(g){A=!0,u=g}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(A)throw u}}return b}}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),r.push.apply(r,n)}return r}function T(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(n){J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J(t,e,r){return e=ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q(t,e){if(t==null)return{};var r={},n=Object.keys(t),u,c;for(c=0;c<n.length;c++)u=n[c],!(e.indexOf(u)>=0)&&(r[u]=t[u]);return r}function x(t,e){if(t==null)return{};var r=Q(t,e),n,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(u=0;u<c.length;u++)n=c[u],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Z(t,e){return ee(t)||G(t,e)||te(t,e)||ne()}function ee(t){if(Array.isArray(t))return t}function te(t,e){if(t){if(typeof t=="string")return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(t,e)}}function j(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ae(t){var e=re(t,"string");return typeof e=="symbol"?e:String(e)}var ie=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],oe=function(e,r){var n=e.animationData,u=e.loop,c=e.autoplay,o=e.initialSegment,b=e.onComplete,s=e.onLoopComplete,A=e.onEnterFrame,g=e.onSegmentStart,O=e.onConfigReady,w=e.onDataReady,h=e.onDataFailed,l=e.onLoadedImages,L=e.onDOMLoaded,S=e.onDestroy;e.lottieRef,e.renderer,e.name,e.assetsPath,e.rendererSettings;var p=x(e,ie),P=D.useState(!1),d=Z(P,2),C=d[0],I=d[1],i=D.useRef(),v=D.useRef(null),H=function(){var a;(a=i.current)===null||a===void 0||a.play()},M=function(){var a;(a=i.current)===null||a===void 0||a.stop()},F=function(){var a;(a=i.current)===null||a===void 0||a.pause()},V=function(a){var f;(f=i.current)===null||f===void 0||f.setSpeed(a)},N=function(a,f){var m;(m=i.current)===null||m===void 0||m.goToAndPlay(a,f)},B=function(a,f){var m;(m=i.current)===null||m===void 0||m.goToAndStop(a,f)},$=function(a){var f;(f=i.current)===null||f===void 0||f.setDirection(a)},k=function(a,f){var m;(m=i.current)===null||m===void 0||m.playSegments(a,f)},W=function(a){var f;(f=i.current)===null||f===void 0||f.setSubframe(a)},K=function(a){var f;return(f=i.current)===null||f===void 0?void 0:f.getDuration(a)},U=function(){var a;(a=i.current)===null||a===void 0||a.destroy(),i.current=void 0},X=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f;if(v.current){(f=i.current)===null||f===void 0||f.destroy();var m=T(T(T({},e),a),{},{container:v.current});return i.current=q.loadAnimation(m),I(!!i.current),function(){var R;(R=i.current)===null||R===void 0||R.destroy(),i.current=void 0}}};D.useEffect(function(){var y=X();return function(){return y==null?void 0:y()}},[n,u]),D.useEffect(function(){i.current&&(i.current.autoplay=!!c)},[c]),D.useEffect(function(){if(i.current){if(!o){i.current.resetSegments(!0);return}!Array.isArray(o)||!o.length||((i.current.currentRawFrame<o[0]||i.current.currentRawFrame>o[1])&&(i.current.currentRawFrame=o[0]),i.current.setSegment(o[0],o[1]))}},[o]),D.useEffect(function(){var y=[{name:"complete",handler:b},{name:"loopComplete",handler:s},{name:"enterFrame",handler:A},{name:"segmentStart",handler:g},{name:"config_ready",handler:O},{name:"data_ready",handler:w},{name:"data_failed",handler:h},{name:"loaded_images",handler:l},{name:"DOMLoaded",handler:L},{name:"destroy",handler:S}],a=y.filter(function(m){return m.handler!=null});if(a.length){var f=a.map(function(m){var R;return(R=i.current)===null||R===void 0||R.addEventListener(m.name,m.handler),function(){var _;(_=i.current)===null||_===void 0||_.removeEventListener(m.name,m.handler)}});return function(){f.forEach(function(m){return m()})}}},[b,s,A,g,O,w,h,l,L,S]);var Y=z.createElement("div",T({style:r,ref:v},p));return{View:Y,play:H,stop:M,pause:F,setSpeed:V,goToAndStop:B,goToAndPlay:N,setDirection:$,playSegments:k,setSubframe:W,getDuration:K,destroy:U,animationContainerRef:v,animationLoaded:C,animationItem:i.current}};function ue(t){var e=t.getBoundingClientRect(),r=e.top,n=e.height,u=window.innerHeight-r,c=window.innerHeight+n;return u/c}function le(t,e,r){var n=t.getBoundingClientRect(),u=n.top,c=n.left,o=n.width,b=n.height,s=(e-c)/o,A=(r-u)/b;return{x:s,y:A}}var se=function(e){var r=e.wrapperRef,n=e.animationItem,u=e.mode,c=e.actions;D.useEffect(function(){var o=r.current;if(!(!o||!n||!c.length)){n.stop();var b=function(){var g=null,O=function(){var h=ue(o),l=c.find(function(S){var p=S.visibility;return p&&h>=p[0]&&h<=p[1]});if(l){if(l.type==="seek"&&l.visibility&&l.frames.length===2){var L=l.frames[0]+Math.ceil((h-l.visibility[0])/(l.visibility[1]-l.visibility[0])*l.frames[1]);//! goToAndStop must be relative to the start of the current segment
3
3
  n.goToAndStop(L-n.firstFrame-1,!0)}l.type==="loop"&&(g===null||g!==l.frames||n.isPaused)&&(n.playSegments(l.frames,!0),g=l.frames),l.type==="play"&&n.isPaused&&(n.resetSegments(!0),n.play()),l.type==="stop"&&n.goToAndStop(l.frames[0]-n.firstFrame-1,!0)}};return document.addEventListener("scroll",O),function(){document.removeEventListener("scroll",O)}},s=function(){var g=function(l,L){var S=l,p=L;if(S!==-1&&p!==-1){var P=le(o,S,p);S=P.x,p=P.y}var d=c.find(function(i){var v=i.position;return v&&Array.isArray(v.x)&&Array.isArray(v.y)?S>=v.x[0]&&S<=v.x[1]&&p>=v.y[0]&&p<=v.y[1]:v&&!Number.isNaN(v.x)&&!Number.isNaN(v.y)?S===v.x&&p===v.y:!1});if(d){if(d.type==="seek"&&d.position&&Array.isArray(d.position.x)&&Array.isArray(d.position.y)&&d.frames.length===2){var C=(S-d.position.x[0])/(d.position.x[1]-d.position.x[0]),I=(p-d.position.y[0])/(d.position.y[1]-d.position.y[0]);n.playSegments(d.frames,!0),n.goToAndStop(Math.ceil((C+I)/2*(d.frames[1]-d.frames[0])),!0)}d.type==="loop"&&n.playSegments(d.frames,!0),d.type==="play"&&(n.isPaused&&n.resetSegments(!1),n.playSegments(d.frames)),d.type==="stop"&&n.goToAndStop(d.frames[0],!0)}},O=function(l){g(l.clientX,l.clientY)},w=function(){g(-1,-1)};return o.addEventListener("mousemove",O),o.addEventListener("mouseout",w),function(){o.removeEventListener("mousemove",O),o.removeEventListener("mouseout",w)}};switch(u){case"scroll":return b();case"cursor":return s()}}},[u,n])},de=function(e){var r=e.actions,n=e.mode,u=e.lottieObj,c=u.animationItem,o=u.View,b=u.animationContainerRef;return se({actions:r,animationItem:c,mode:n,wrapperRef:b}),o},fe=["style","interactivity"],ve=function(e){var r,n,u,c=e.style,o=e.interactivity,b=x(e,fe),s=oe(b,c),A=s.View,g=s.play,O=s.stop,w=s.pause,h=s.setSpeed,l=s.goToAndStop,L=s.goToAndPlay,S=s.setDirection,p=s.playSegments,P=s.setSubframe,d=s.getDuration,C=s.destroy,I=s.animationContainerRef,i=s.animationLoaded,v=s.animationItem;return D.useEffect(function(){e.lottieRef&&(e.lottieRef.current={play:g,stop:O,pause:w,setSpeed:h,goToAndPlay:L,goToAndStop:l,setDirection:S,playSegments:p,setSubframe:P,getDuration:d,destroy:C,animationContainerRef:I,animationLoaded:i,animationItem:v})},[(r=e.lottieRef)===null||r===void 0?void 0:r.current]),de({lottieObj:{View:A,play:g,stop:O,pause:w,setSpeed:h,goToAndStop:l,goToAndPlay:L,setDirection:S,playSegments:p,setSubframe:P,getDuration:d,destroy:C,animationContainerRef:I,animationLoaded:i,animationItem:v},actions:(n=o==null?void 0:o.actions)!==null&&n!==void 0?n:[],mode:(u=o==null?void 0:o.mode)!==null&&u!==void 0?u:"scroll"})};export{q as LottiePlayer,ve as default,oe as useLottie,de as useLottieInteractivity};
@@ -1 +1 @@
1
- import{bb as D}from"./index-ZGnAW8k-.js";var ce=e=>e.type==="checkbox",ie=e=>e instanceof Date,O=e=>e==null;const et=e=>typeof e=="object";var T=e=>!O(e)&&!Array.isArray(e)&&et(e)&&!ie(e),tt=e=>T(e)&&e.target?ce(e.target)?e.target.checked:e.target.value:e,At=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rt=(e,s)=>e.has(At(s)),xt=e=>{const s=e.constructor&&e.constructor.prototype;return T(s)&&s.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function p(e){let s;const t=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(t||T(e)))if(s=t?[]:{},!t&&!xt(e))s=e;else for(const u in e)e.hasOwnProperty(u)&&(s[u]=p(e[u]));else return e;return s}var Ae=e=>Array.isArray(e)?e.filter(Boolean):[],w=e=>e===void 0,f=(e,s,t)=>{if(!s||!T(e))return t;const u=Ae(s.split(/[,[\].]+?/)).reduce((n,a)=>O(n)?n:n[a],e);return w(u)||u===e?w(e[s])?t:e[s]:u},j=e=>typeof e=="boolean",Te=e=>/^\w*$/.test(e),st=e=>Ae(e.replace(/["|']|\]/g,"").split(/\.|\[/)),x=(e,s,t)=>{let u=-1;const n=Te(s)?[s]:st(s),a=n.length,y=a-1;for(;++u<a;){const h=n[u];let m=t;if(u!==y){const S=e[h];m=T(S)||Array.isArray(S)?S:isNaN(+n[u+1])?{}:[]}if(h==="__proto__")return;e[h]=m,e=e[h]}return e};const ve={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},W={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},mt=D.createContext(null),Le=()=>D.useContext(mt);var it=(e,s,t,u=!0)=>{const n={defaultValues:s._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const y=a;return s._proxyFormState[y]!==W.all&&(s._proxyFormState[y]=!u||W.all),t&&(t[y]=!0),e[y]}});return n},B=e=>T(e)&&!Object.keys(e).length,ut=(e,s,t,u)=>{t(e);const{name:n,...a}=e;return B(a)||Object.keys(a).length>=Object.keys(s).length||Object.keys(a).find(y=>s[y]===(!u||W.all))},oe=e=>Array.isArray(e)?e:[e],lt=(e,s,t)=>!e||!s||e===s||oe(e).some(u=>u&&(t?u===s:u.startsWith(s)||s.startsWith(u)));function Ue(e){const s=D.useRef(e);s.current=e,D.useEffect(()=>{const t=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function Dt(e){const s=Le(),{control:t=s.control,disabled:u,name:n,exact:a}=e||{},[y,h]=D.useState(t._formState),m=D.useRef(!0),S=D.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),_=D.useRef(n);return _.current=n,Ue({disabled:u,next:v=>m.current&&lt(_.current,v.name,a)&&ut(v,S.current,t._updateFormState)&&h({...t._formState,...v}),subject:t._subjects.state}),D.useEffect(()=>(m.current=!0,S.current.isValid&&t._updateValid(!0),()=>{m.current=!1}),[t]),it(y,t,S.current,!1)}var $=e=>typeof e=="string",at=(e,s,t,u,n)=>$(e)?(u&&s.watch.add(e),f(t,e,n)):Array.isArray(e)?e.map(a=>(u&&s.watch.add(a),f(t,a))):(u&&(s.watchAll=!0),t);function wt(e){const s=Le(),{control:t=s.control,name:u,defaultValue:n,disabled:a,exact:y}=e||{},h=D.useRef(u);h.current=u,Ue({disabled:a,subject:t._subjects.values,next:_=>{lt(h.current,_.name,y)&&S(p(at(h.current,t._names,_.values||t._formValues,!1,n)))}});const[m,S]=D.useState(t._getWatch(u,n));return D.useEffect(()=>t._removeUnmounted()),m}function Et(e){const s=Le(),{name:t,disabled:u,control:n=s.control,shouldUnregister:a}=e,y=rt(n._names.array,t),h=wt({control:n,name:t,defaultValue:f(n._formValues,t,f(n._defaultValues,t,e.defaultValue)),exact:!0}),m=Dt({control:n,name:t}),S=D.useRef(n.register(t,{...e.rules,value:h,...j(e.disabled)?{disabled:e.disabled}:{}}));return D.useEffect(()=>{const _=n._options.shouldUnregister||a,v=(N,H)=>{const L=f(n._fields,N);L&&L._f&&(L._f.mount=H)};if(v(t,!0),_){const N=p(f(n._options.defaultValues,t));x(n._defaultValues,t,N),w(f(n._formValues,t))&&x(n._formValues,t,N)}return()=>{(y?_&&!n._state.action:_)?n.unregister(t):v(t,!1)}},[t,n,y,a]),D.useEffect(()=>{f(n._fields,t)&&n._updateDisabledField({disabled:u,fields:n._fields,name:t,value:f(n._fields,t)._f.value})},[u,t,n]),{field:{name:t,value:h,...j(u)||m.disabled?{disabled:m.disabled||u}:{},onChange:D.useCallback(_=>S.current.onChange({target:{value:tt(_),name:t},type:ve.CHANGE}),[t]),onBlur:D.useCallback(()=>S.current.onBlur({target:{value:f(n._formValues,t),name:t},type:ve.BLUR}),[t,n]),ref:_=>{const v=f(n._fields,t);v&&_&&(v._f.ref={focus:()=>_.focus(),select:()=>_.select(),setCustomValidity:N=>_.setCustomValidity(N),reportValidity:()=>_.reportValidity()})}},formState:m,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!f(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!f(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!f(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!f(m.validatingFields,t)},error:{enumerable:!0,get:()=>f(m.errors,t)}})}}const Wt=e=>e.render(Et(e));var St=(e,s,t,u,n)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[u]:n||!0}}:{},Ke=e=>({isOnSubmit:!e||e===W.onSubmit,isOnBlur:e===W.onBlur,isOnChange:e===W.onChange,isOnAll:e===W.all,isOnTouch:e===W.onTouched}),Ge=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(u=>e.startsWith(u)&&/^\.\w+/.test(e.slice(u.length))));const fe=(e,s,t,u)=>{for(const n of t||Object.keys(e)){const a=f(e,n);if(a){const{_f:y,...h}=a;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],n)&&!u)break;if(y.ref&&s(y.ref,y.name)&&!u)break;fe(h,s)}else T(h)&&fe(h,s)}}};var kt=(e,s,t)=>{const u=oe(f(e,t));return x(u,"root",s[t]),x(e,t,u),e},Oe=e=>e.type==="file",X=e=>typeof e=="function",_e=e=>{if(!Re)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},he=e=>$(e),pe=e=>e.type==="radio",be=e=>e instanceof RegExp;const ze={value:!1,isValid:!1},Je={value:!0,isValid:!0};var nt=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!w(e[0].attributes.value)?w(e[0].value)||e[0].value===""?Je:{value:e[0].value,isValid:!0}:Je:ze}return ze};const Qe={isValid:!1,value:null};var ot=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,Qe):Qe;function Xe(e,s,t="validate"){if(he(e)||Array.isArray(e)&&e.every(he)||j(e)&&!e)return{type:t,message:he(e)?e:"",ref:s}}var se=e=>T(e)&&!be(e)?e:{value:e,message:""},Ye=async(e,s,t,u,n)=>{const{ref:a,refs:y,required:h,maxLength:m,minLength:S,min:_,max:v,pattern:N,validate:H,name:L,valueAsNumber:xe,mount:J,disabled:Q}=e._f,V=f(s,L);if(!J||Q)return{};const K=y?y[0]:a,G=b=>{u&&K.reportValidity&&(K.setCustomValidity(j(b)?"":b||""),K.reportValidity())},k={},ee=pe(a),de=ce(a),Y=ee||de,te=(xe||Oe(a))&&w(a.value)&&w(V)||_e(a)&&a.value===""||V===""||Array.isArray(V)&&!V.length,P=St.bind(null,L,t,k),ye=(b,F,C,U=z.maxLength,q=z.minLength)=>{const I=b?F:C;k[L]={type:b?U:q,message:I,ref:a,...P(b?U:q,I)}};if(n?!Array.isArray(V)||!V.length:h&&(!Y&&(te||O(V))||j(V)&&!V||de&&!nt(y).isValid||ee&&!ot(y).isValid)){const{value:b,message:F}=he(h)?{value:!!h,message:h}:se(h);if(b&&(k[L]={type:z.required,message:F,ref:K,...P(z.required,F)},!t))return G(F),k}if(!te&&(!O(_)||!O(v))){let b,F;const C=se(v),U=se(_);if(!O(V)&&!isNaN(V)){const q=a.valueAsNumber||V&&+V;O(C.value)||(b=q>C.value),O(U.value)||(F=q<U.value)}else{const q=a.valueAsDate||new Date(V),I=ae=>new Date(new Date().toDateString()+" "+ae),ue=a.type=="time",le=a.type=="week";$(C.value)&&V&&(b=ue?I(V)>I(C.value):le?V>C.value:q>new Date(C.value)),$(U.value)&&V&&(F=ue?I(V)<I(U.value):le?V<U.value:q<new Date(U.value))}if((b||F)&&(ye(!!b,C.message,U.message,z.max,z.min),!t))return G(k[L].message),k}if((m||S)&&!te&&($(V)||n&&Array.isArray(V))){const b=se(m),F=se(S),C=!O(b.value)&&V.length>+b.value,U=!O(F.value)&&V.length<+F.value;if((C||U)&&(ye(C,b.message,F.message),!t))return G(k[L].message),k}if(N&&!te&&$(V)){const{value:b,message:F}=se(N);if(be(b)&&!V.match(b)&&(k[L]={type:z.pattern,message:F,ref:a,...P(z.pattern,F)},!t))return G(F),k}if(H){if(X(H)){const b=await H(V,s),F=Xe(b,K);if(F&&(k[L]={...F,...P(z.validate,F.message)},!t))return G(F.message),k}else if(T(H)){let b={};for(const F in H){if(!B(b)&&!t)break;const C=Xe(await H[F](V,s),K,F);C&&(b={...C,...P(F,C.message)},G(C.message),t&&(k[L]=b))}if(!B(b)&&(k[L]={ref:K,...b},!t))return k}}return G(!0),k};function Ct(e,s){const t=s.slice(0,-1).length;let u=0;for(;u<t;)e=w(e)?u++:e[s[u++]];return e}function Rt(e){for(const s in e)if(e.hasOwnProperty(s)&&!w(e[s]))return!1;return!0}function R(e,s){const t=Array.isArray(s)?s:Te(s)?[s]:st(s),u=t.length===1?e:Ct(e,t),n=t.length-1,a=t[n];return u&&delete u[a],n!==0&&(T(u)&&B(u)||Array.isArray(u)&&Rt(u))&&R(e,t.slice(0,-1)),e}var Se=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}},Ve=e=>O(e)||!et(e);function Z(e,s){if(Ve(e)||Ve(s))return e===s;if(ie(e)&&ie(s))return e.getTime()===s.getTime();const t=Object.keys(e),u=Object.keys(s);if(t.length!==u.length)return!1;for(const n of t){const a=e[n];if(!u.includes(n))return!1;if(n!=="ref"){const y=s[n];if(ie(a)&&ie(y)||T(a)&&T(y)||Array.isArray(a)&&Array.isArray(y)?!Z(a,y):a!==y)return!1}}return!0}var ft=e=>e.type==="select-multiple",Tt=e=>pe(e)||ce(e),ke=e=>_e(e)&&e.isConnected,ct=e=>{for(const s in e)if(X(e[s]))return!0;return!1};function Fe(e,s={}){const t=Array.isArray(e);if(T(e)||t)for(const u in e)Array.isArray(e[u])||T(e[u])&&!ct(e[u])?(s[u]=Array.isArray(e[u])?[]:{},Fe(e[u],s[u])):O(e[u])||(s[u]=!0);return s}function dt(e,s,t){const u=Array.isArray(e);if(T(e)||u)for(const n in e)Array.isArray(e[n])||T(e[n])&&!ct(e[n])?w(s)||Ve(t[n])?t[n]=Array.isArray(e[n])?Fe(e[n],[]):{...Fe(e[n])}:dt(e[n],O(s)?{}:s[n],t[n]):t[n]=!Z(e[n],s[n]);return t}var ge=(e,s)=>dt(e,s,Fe(s)),yt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:u})=>w(e)?e:s?e===""?NaN:e&&+e:t&&$(e)?new Date(e):u?u(e):e;function Ce(e){const s=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):s.disabled))return Oe(s)?s.files:pe(s)?ot(e.refs).value:ft(s)?[...s.selectedOptions].map(({value:t})=>t):ce(s)?nt(e.refs).value:yt(w(s.value)?e.ref.value:s.value,e)}var Lt=(e,s,t,u)=>{const n={};for(const a of e){const y=f(s,a);y&&x(n,a,y._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:u}},ne=e=>w(e)?e:be(e)?e.source:T(e)?be(e.value)?e.value.source:e.value:e,Ut=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ze(e,s,t){const u=f(e,t);if(u||Te(t))return{error:u,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),y=f(s,a),h=f(e,a);if(y&&!Array.isArray(y)&&t!==a)return{name:t};if(h&&h.type)return{name:a,error:h};n.pop()}return{name:t}}var Ot=(e,s,t,u,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(s||e):(t?u.isOnBlur:n.isOnBlur)?!e:(t?u.isOnChange:n.isOnChange)?e:!0,pt=(e,s)=>!Ae(f(e,s)).length&&R(e,s);const Mt={mode:W.onSubmit,reValidateMode:W.onChange,shouldFocusError:!0};function Bt(e={}){let s={...Mt,...e},t={submitCount:0,isDirty:!1,isLoading:X(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},u={},n=T(s.defaultValues)||T(s.values)?p(s.defaultValues||s.values)||{}:{},a=s.shouldUnregister?{}:p(n),y={action:!1,mount:!1,watch:!1},h={mount:new Set,unMount:new Set,array:new Set,watch:new Set},m,S=0;const _={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:Se(),array:Se(),state:Se()},N=Ke(s.mode),H=Ke(s.reValidateMode),L=s.criteriaMode===W.all,xe=r=>i=>{clearTimeout(S),S=setTimeout(r,i)},J=async r=>{if(_.isValid||r){const i=s.resolver?B((await Y()).errors):await P(u,!0);i!==t.isValid&&v.state.next({isValid:i})}},Q=(r,i)=>{(_.isValidating||_.validatingFields)&&((r||Array.from(h.mount)).forEach(l=>{l&&(i?x(t.validatingFields,l,i):R(t.validatingFields,l))}),v.state.next({validatingFields:t.validatingFields,isValidating:!B(t.validatingFields)}))},V=(r,i=[],l,d,c=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(f(u,r))){const g=l(f(u,r),d.argA,d.argB);c&&x(u,r,g)}if(o&&Array.isArray(f(t.errors,r))){const g=l(f(t.errors,r),d.argA,d.argB);c&&x(t.errors,r,g),pt(t.errors,r)}if(_.touchedFields&&o&&Array.isArray(f(t.touchedFields,r))){const g=l(f(t.touchedFields,r),d.argA,d.argB);c&&x(t.touchedFields,r,g)}_.dirtyFields&&(t.dirtyFields=ge(n,a)),v.state.next({name:r,isDirty:b(r,i),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else x(a,r,i)},K=(r,i)=>{x(t.errors,r,i),v.state.next({errors:t.errors})},G=r=>{t.errors=r,v.state.next({errors:t.errors,isValid:!1})},k=(r,i,l,d)=>{const c=f(u,r);if(c){const o=f(a,r,w(l)?f(n,r):l);w(o)||d&&d.defaultChecked||i?x(a,r,i?o:Ce(c._f)):U(r,o),y.mount&&J()}},ee=(r,i,l,d,c)=>{let o=!1,g=!1;const A={name:r},E=!!(f(u,r)&&f(u,r)._f&&f(u,r)._f.disabled);if(!l||d){_.isDirty&&(g=t.isDirty,t.isDirty=A.isDirty=b(),o=g!==A.isDirty);const M=E||Z(f(n,r),i);g=!!(!E&&f(t.dirtyFields,r)),M||E?R(t.dirtyFields,r):x(t.dirtyFields,r,!0),A.dirtyFields=t.dirtyFields,o=o||_.dirtyFields&&g!==!M}if(l){const M=f(t.touchedFields,r);M||(x(t.touchedFields,r,l),A.touchedFields=t.touchedFields,o=o||_.touchedFields&&M!==l)}return o&&c&&v.state.next(A),o?A:{}},de=(r,i,l,d)=>{const c=f(t.errors,r),o=_.isValid&&j(i)&&t.isValid!==i;if(e.delayError&&l?(m=xe(()=>K(r,l)),m(e.delayError)):(clearTimeout(S),m=null,l?x(t.errors,r,l):R(t.errors,r)),(l?!Z(c,l):c)||!B(d)||o){const g={...d,...o&&j(i)?{isValid:i}:{},errors:t.errors,name:r};t={...t,...g},v.state.next(g)}},Y=async r=>{Q(r,!0);const i=await s.resolver(a,s.context,Lt(r||h.mount,u,s.criteriaMode,s.shouldUseNativeValidation));return Q(r),i},te=async r=>{const{errors:i}=await Y(r);if(r)for(const l of r){const d=f(i,l);d?x(t.errors,l,d):R(t.errors,l)}else t.errors=i;return i},P=async(r,i,l={valid:!0})=>{for(const d in r){const c=r[d];if(c){const{_f:o,...g}=c;if(o){const A=h.array.has(o.name);Q([d],!0);const E=await Ye(c,a,L,s.shouldUseNativeValidation&&!i,A);if(Q([d]),E[o.name]&&(l.valid=!1,i))break;!i&&(f(E,o.name)?A?kt(t.errors,E,o.name):x(t.errors,o.name,E[o.name]):R(t.errors,o.name))}g&&await P(g,i,l)}}return l.valid},ye=()=>{for(const r of h.unMount){const i=f(u,r);i&&(i._f.refs?i._f.refs.every(l=>!ke(l)):!ke(i._f.ref))&&me(r)}h.unMount=new Set},b=(r,i)=>(r&&i&&x(a,r,i),!Z(Me(),n)),F=(r,i,l)=>at(r,h,{...y.mount?a:w(i)?n:$(r)?{[r]:i}:i},l,i),C=r=>Ae(f(y.mount?a:n,r,e.shouldUnregister?f(n,r,[]):[])),U=(r,i,l={})=>{const d=f(u,r);let c=i;if(d){const o=d._f;o&&(!o.disabled&&x(a,r,yt(i,o)),c=_e(o.ref)&&O(i)?"":i,ft(o.ref)?[...o.ref.options].forEach(g=>g.selected=c.includes(g.value)):o.refs?ce(o.ref)?o.refs.length>1?o.refs.forEach(g=>(!g.defaultChecked||!g.disabled)&&(g.checked=Array.isArray(c)?!!c.find(A=>A===g.value):c===g.value)):o.refs[0]&&(o.refs[0].checked=!!c):o.refs.forEach(g=>g.checked=g.value===c):Oe(o.ref)?o.ref.value="":(o.ref.value=c,o.ref.type||v.values.next({name:r,values:{...a}})))}(l.shouldDirty||l.shouldTouch)&&ee(r,c,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ae(r)},q=(r,i,l)=>{for(const d in i){const c=i[d],o=`${r}.${d}`,g=f(u,o);(h.array.has(r)||!Ve(c)||g&&!g._f)&&!ie(c)?q(o,c,l):U(o,c,l)}},I=(r,i,l={})=>{const d=f(u,r),c=h.array.has(r),o=p(i);x(a,r,o),c?(v.array.next({name:r,values:{...a}}),(_.isDirty||_.dirtyFields)&&l.shouldDirty&&v.state.next({name:r,dirtyFields:ge(n,a),isDirty:b(r,o)})):d&&!d._f&&!O(o)?q(r,o,l):U(r,o,l),Ge(r,h)&&v.state.next({...t}),v.values.next({name:y.mount?r:void 0,values:{...a}})},ue=async r=>{y.mount=!0;const i=r.target;let l=i.name,d=!0;const c=f(u,l),o=()=>i.type?Ce(c._f):tt(r),g=A=>{d=Number.isNaN(A)||A===f(a,l,A)};if(c){let A,E;const M=o(),re=r.type===ve.BLUR||r.type===ve.FOCUS_OUT,bt=!Ut(c._f)&&!s.resolver&&!f(t.errors,l)&&!c._f.deps||Ot(re,f(t.touchedFields,l),t.isSubmitted,H,N),we=Ge(l,h,re);x(a,l,M),re?(c._f.onBlur&&c._f.onBlur(r),m&&m(0)):c._f.onChange&&c._f.onChange(r);const Ee=ee(l,M,re,!1),Vt=!B(Ee)||we;if(!re&&v.values.next({name:l,type:r.type,values:{...a}}),bt)return _.isValid&&J(),Vt&&v.state.next({name:l,...we?{}:Ee});if(!re&&we&&v.state.next({...t}),s.resolver){const{errors:je}=await Y([l]);if(g(M),d){const Ft=Ze(t.errors,u,l),$e=Ze(je,u,Ft.name||l);A=$e.error,l=$e.name,E=B(je)}}else Q([l],!0),A=(await Ye(c,a,L,s.shouldUseNativeValidation))[l],Q([l]),g(M),d&&(A?E=!1:_.isValid&&(E=await P(u,!0)));d&&(c._f.deps&&ae(c._f.deps),de(l,E,A,Ee))}},le=(r,i)=>{if(f(t.errors,i)&&r.focus)return r.focus(),1},ae=async(r,i={})=>{let l,d;const c=oe(r);if(s.resolver){const o=await te(w(r)?r:c);l=B(o),d=r?!c.some(g=>f(o,g)):l}else r?(d=(await Promise.all(c.map(async o=>{const g=f(u,o);return await P(g&&g._f?{[o]:g}:g)}))).every(Boolean),!(!d&&!t.isValid)&&J()):d=l=await P(u);return v.state.next({...!$(r)||_.isValid&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors}),i.shouldFocus&&!d&&fe(u,le,r?c:h.mount),d},Me=r=>{const i={...y.mount?a:n};return w(r)?i:$(r)?f(i,r):r.map(l=>f(i,l))},Be=(r,i)=>({invalid:!!f((i||t).errors,r),isDirty:!!f((i||t).dirtyFields,r),error:f((i||t).errors,r),isValidating:!!f(t.validatingFields,r),isTouched:!!f((i||t).touchedFields,r)}),gt=r=>{r&&oe(r).forEach(i=>R(t.errors,i)),v.state.next({errors:r?t.errors:{}})},Pe=(r,i,l)=>{const d=(f(u,r,{_f:{}})._f||{}).ref,c=f(t.errors,r)||{},{ref:o,message:g,type:A,...E}=c;x(t.errors,r,{...E,...i,ref:d}),v.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},ht=(r,i)=>X(r)?v.values.subscribe({next:l=>r(F(void 0,i),l)}):F(r,i,!0),me=(r,i={})=>{for(const l of r?oe(r):h.mount)h.mount.delete(l),h.array.delete(l),i.keepValue||(R(u,l),R(a,l)),!i.keepError&&R(t.errors,l),!i.keepDirty&&R(t.dirtyFields,l),!i.keepTouched&&R(t.touchedFields,l),!i.keepIsValidating&&R(t.validatingFields,l),!s.shouldUnregister&&!i.keepDefaultValue&&R(n,l);v.values.next({values:{...a}}),v.state.next({...t,...i.keepDirty?{isDirty:b()}:{}}),!i.keepIsValid&&J()},Ie=({disabled:r,name:i,field:l,fields:d,value:c})=>{if(j(r)&&y.mount||r){const o=r?void 0:w(c)?Ce(l?l._f:f(d,i)._f):c;x(a,i,o),ee(i,o,!1,!1,!0)}},De=(r,i={})=>{let l=f(u,r);const d=j(i.disabled);return x(u,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...i}}),h.mount.add(r),l?Ie({field:l,disabled:i.disabled,name:r,value:i.value}):k(r,!0,i.value),{...d?{disabled:i.disabled}:{},...s.progressive?{required:!!i.required,min:ne(i.min),max:ne(i.max),minLength:ne(i.minLength),maxLength:ne(i.maxLength),pattern:ne(i.pattern)}:{},name:r,onChange:ue,onBlur:ue,ref:c=>{if(c){De(r,i),l=f(u,r);const o=w(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,g=Tt(o),A=l._f.refs||[];if(g?A.find(E=>E===o):o===l._f.ref)return;x(u,r,{_f:{...l._f,...g?{refs:[...A.filter(ke),o,...Array.isArray(f(n,r))?[{}]:[]],ref:{type:o.type,name:r}}:{ref:o}}}),k(r,!1,void 0,o)}else l=f(u,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||i.shouldUnregister)&&!(rt(h.array,r)&&y.action)&&h.unMount.add(r)}}},Ne=()=>s.shouldFocusError&&fe(u,le,h.mount),vt=r=>{j(r)&&(v.state.next({disabled:r}),fe(u,(i,l)=>{const d=f(u,l);d&&(i.disabled=d._f.disabled||r,Array.isArray(d._f.refs)&&d._f.refs.forEach(c=>{c.disabled=d._f.disabled||r}))},0,!1))},qe=(r,i)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let c=p(a);if(v.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:g}=await Y();t.errors=o,c=g}else await P(u);if(R(t.errors,"root"),B(t.errors)){v.state.next({errors:{}});try{await r(c,l)}catch(o){d=o}}else i&&await i({...t.errors},l),Ne(),setTimeout(Ne);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(t.errors)&&!d,submitCount:t.submitCount+1,errors:t.errors}),d)throw d},_t=(r,i={})=>{f(u,r)&&(w(i.defaultValue)?I(r,p(f(n,r))):(I(r,i.defaultValue),x(n,r,p(i.defaultValue))),i.keepTouched||R(t.touchedFields,r),i.keepDirty||(R(t.dirtyFields,r),t.isDirty=i.defaultValue?b(r,p(f(n,r))):b()),i.keepError||(R(t.errors,r),_.isValid&&J()),v.state.next({...t}))},We=(r,i={})=>{const l=r?p(r):n,d=p(l),c=B(r),o=c?n:d;if(i.keepDefaultValues||(n=l),!i.keepValues){if(i.keepDirtyValues)for(const g of h.mount)f(t.dirtyFields,g)?x(o,g,f(a,g)):I(g,f(o,g));else{if(Re&&w(r))for(const g of h.mount){const A=f(u,g);if(A&&A._f){const E=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(_e(E)){const M=E.closest("form");if(M){M.reset();break}}}}u={}}a=e.shouldUnregister?i.keepDefaultValues?p(n):{}:p(o),v.array.next({values:{...o}}),v.values.next({values:{...o}})}h={mount:i.keepDirtyValues?h.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!_.isValid||!!i.keepIsValid||!!i.keepDirtyValues,y.watch=!!e.shouldUnregister,v.state.next({submitCount:i.keepSubmitCount?t.submitCount:0,isDirty:c?!1:i.keepDirty?t.isDirty:!!(i.keepDefaultValues&&!Z(r,n)),isSubmitted:i.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?{}:i.keepDirtyValues?i.keepDefaultValues&&a?ge(n,a):t.dirtyFields:i.keepDefaultValues&&r?ge(n,r):i.keepDirty?t.dirtyFields:{},touchedFields:i.keepTouched?t.touchedFields:{},errors:i.keepErrors?t.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},He=(r,i)=>We(X(r)?r(a):r,i);return{control:{register:De,unregister:me,getFieldState:Be,handleSubmit:qe,setError:Pe,_executeSchema:Y,_getWatch:F,_getDirty:b,_updateValid:J,_removeUnmounted:ye,_updateFieldArray:V,_updateDisabledField:Ie,_getFieldArray:C,_reset:We,_resetDefaultValues:()=>X(s.defaultValues)&&s.defaultValues().then(r=>{He(r,s.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:r=>{t={...t,...r}},_disableForm:vt,_subjects:v,_proxyFormState:_,_setErrors:G,get _fields(){return u},get _formValues(){return a},get _state(){return y},set _state(r){y=r},get _defaultValues(){return n},get _names(){return h},set _names(r){h=r},get _formState(){return t},set _formState(r){t=r},get _options(){return s},set _options(r){s={...s,...r}}},trigger:ae,register:De,handleSubmit:qe,watch:ht,setValue:I,getValues:Me,reset:He,resetField:_t,clearErrors:gt,unregister:me,setError:Pe,setFocus:(r,i={})=>{const l=f(u,r),d=l&&l._f;if(d){const c=d.refs?d.refs[0]:d.ref;c.focus&&(c.focus(),i.shouldSelect&&c.select())}},getFieldState:Be}}function Ht(e={}){const s=D.useRef(),t=D.useRef(),[u,n]=D.useState({isDirty:!1,isValidating:!1,isLoading:X(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:X(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...Bt(e),formState:u});const a=s.current.control;return a._options=e,Ue({subject:a._subjects.state,next:y=>{ut(y,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),D.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),D.useEffect(()=>{if(a._proxyFormState.isDirty){const y=a._getDirty();y!==u.isDirty&&a._subjects.state.next({isDirty:y})}},[a,u.isDirty]),D.useEffect(()=>{e.values&&!Z(e.values,t.current)?(a._reset(e.values,a._options.resetOptions),t.current=e.values,n(y=>({...y}))):a._resetDefaultValues()},[e.values,a]),D.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),D.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),D.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),s.current.formState=it(u,a),s.current}export{Wt as C,wt as a,Ht as u};
1
+ import{bb as D}from"./index-DhKEzK4G.js";var ce=e=>e.type==="checkbox",ie=e=>e instanceof Date,O=e=>e==null;const et=e=>typeof e=="object";var T=e=>!O(e)&&!Array.isArray(e)&&et(e)&&!ie(e),tt=e=>T(e)&&e.target?ce(e.target)?e.target.checked:e.target.value:e,At=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rt=(e,s)=>e.has(At(s)),xt=e=>{const s=e.constructor&&e.constructor.prototype;return T(s)&&s.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function p(e){let s;const t=Array.isArray(e);if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(t||T(e)))if(s=t?[]:{},!t&&!xt(e))s=e;else for(const u in e)e.hasOwnProperty(u)&&(s[u]=p(e[u]));else return e;return s}var Ae=e=>Array.isArray(e)?e.filter(Boolean):[],w=e=>e===void 0,f=(e,s,t)=>{if(!s||!T(e))return t;const u=Ae(s.split(/[,[\].]+?/)).reduce((n,a)=>O(n)?n:n[a],e);return w(u)||u===e?w(e[s])?t:e[s]:u},j=e=>typeof e=="boolean",Te=e=>/^\w*$/.test(e),st=e=>Ae(e.replace(/["|']|\]/g,"").split(/\.|\[/)),x=(e,s,t)=>{let u=-1;const n=Te(s)?[s]:st(s),a=n.length,y=a-1;for(;++u<a;){const h=n[u];let m=t;if(u!==y){const S=e[h];m=T(S)||Array.isArray(S)?S:isNaN(+n[u+1])?{}:[]}if(h==="__proto__")return;e[h]=m,e=e[h]}return e};const ve={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},W={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},mt=D.createContext(null),Le=()=>D.useContext(mt);var it=(e,s,t,u=!0)=>{const n={defaultValues:s._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const y=a;return s._proxyFormState[y]!==W.all&&(s._proxyFormState[y]=!u||W.all),t&&(t[y]=!0),e[y]}});return n},B=e=>T(e)&&!Object.keys(e).length,ut=(e,s,t,u)=>{t(e);const{name:n,...a}=e;return B(a)||Object.keys(a).length>=Object.keys(s).length||Object.keys(a).find(y=>s[y]===(!u||W.all))},oe=e=>Array.isArray(e)?e:[e],lt=(e,s,t)=>!e||!s||e===s||oe(e).some(u=>u&&(t?u===s:u.startsWith(s)||s.startsWith(u)));function Ue(e){const s=D.useRef(e);s.current=e,D.useEffect(()=>{const t=!e.disabled&&s.current.subject&&s.current.subject.subscribe({next:s.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function Dt(e){const s=Le(),{control:t=s.control,disabled:u,name:n,exact:a}=e||{},[y,h]=D.useState(t._formState),m=D.useRef(!0),S=D.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),_=D.useRef(n);return _.current=n,Ue({disabled:u,next:v=>m.current&&lt(_.current,v.name,a)&&ut(v,S.current,t._updateFormState)&&h({...t._formState,...v}),subject:t._subjects.state}),D.useEffect(()=>(m.current=!0,S.current.isValid&&t._updateValid(!0),()=>{m.current=!1}),[t]),it(y,t,S.current,!1)}var $=e=>typeof e=="string",at=(e,s,t,u,n)=>$(e)?(u&&s.watch.add(e),f(t,e,n)):Array.isArray(e)?e.map(a=>(u&&s.watch.add(a),f(t,a))):(u&&(s.watchAll=!0),t);function wt(e){const s=Le(),{control:t=s.control,name:u,defaultValue:n,disabled:a,exact:y}=e||{},h=D.useRef(u);h.current=u,Ue({disabled:a,subject:t._subjects.values,next:_=>{lt(h.current,_.name,y)&&S(p(at(h.current,t._names,_.values||t._formValues,!1,n)))}});const[m,S]=D.useState(t._getWatch(u,n));return D.useEffect(()=>t._removeUnmounted()),m}function Et(e){const s=Le(),{name:t,disabled:u,control:n=s.control,shouldUnregister:a}=e,y=rt(n._names.array,t),h=wt({control:n,name:t,defaultValue:f(n._formValues,t,f(n._defaultValues,t,e.defaultValue)),exact:!0}),m=Dt({control:n,name:t}),S=D.useRef(n.register(t,{...e.rules,value:h,...j(e.disabled)?{disabled:e.disabled}:{}}));return D.useEffect(()=>{const _=n._options.shouldUnregister||a,v=(N,H)=>{const L=f(n._fields,N);L&&L._f&&(L._f.mount=H)};if(v(t,!0),_){const N=p(f(n._options.defaultValues,t));x(n._defaultValues,t,N),w(f(n._formValues,t))&&x(n._formValues,t,N)}return()=>{(y?_&&!n._state.action:_)?n.unregister(t):v(t,!1)}},[t,n,y,a]),D.useEffect(()=>{f(n._fields,t)&&n._updateDisabledField({disabled:u,fields:n._fields,name:t,value:f(n._fields,t)._f.value})},[u,t,n]),{field:{name:t,value:h,...j(u)||m.disabled?{disabled:m.disabled||u}:{},onChange:D.useCallback(_=>S.current.onChange({target:{value:tt(_),name:t},type:ve.CHANGE}),[t]),onBlur:D.useCallback(()=>S.current.onBlur({target:{value:f(n._formValues,t),name:t},type:ve.BLUR}),[t,n]),ref:_=>{const v=f(n._fields,t);v&&_&&(v._f.ref={focus:()=>_.focus(),select:()=>_.select(),setCustomValidity:N=>_.setCustomValidity(N),reportValidity:()=>_.reportValidity()})}},formState:m,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!f(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!f(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!f(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!f(m.validatingFields,t)},error:{enumerable:!0,get:()=>f(m.errors,t)}})}}const Wt=e=>e.render(Et(e));var St=(e,s,t,u,n)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[u]:n||!0}}:{},Ke=e=>({isOnSubmit:!e||e===W.onSubmit,isOnBlur:e===W.onBlur,isOnChange:e===W.onChange,isOnAll:e===W.all,isOnTouch:e===W.onTouched}),Ge=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(u=>e.startsWith(u)&&/^\.\w+/.test(e.slice(u.length))));const fe=(e,s,t,u)=>{for(const n of t||Object.keys(e)){const a=f(e,n);if(a){const{_f:y,...h}=a;if(y){if(y.refs&&y.refs[0]&&s(y.refs[0],n)&&!u)break;if(y.ref&&s(y.ref,y.name)&&!u)break;fe(h,s)}else T(h)&&fe(h,s)}}};var kt=(e,s,t)=>{const u=oe(f(e,t));return x(u,"root",s[t]),x(e,t,u),e},Oe=e=>e.type==="file",X=e=>typeof e=="function",_e=e=>{if(!Re)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},he=e=>$(e),pe=e=>e.type==="radio",be=e=>e instanceof RegExp;const ze={value:!1,isValid:!1},Je={value:!0,isValid:!0};var nt=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!w(e[0].attributes.value)?w(e[0].value)||e[0].value===""?Je:{value:e[0].value,isValid:!0}:Je:ze}return ze};const Qe={isValid:!1,value:null};var ot=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,Qe):Qe;function Xe(e,s,t="validate"){if(he(e)||Array.isArray(e)&&e.every(he)||j(e)&&!e)return{type:t,message:he(e)?e:"",ref:s}}var se=e=>T(e)&&!be(e)?e:{value:e,message:""},Ye=async(e,s,t,u,n)=>{const{ref:a,refs:y,required:h,maxLength:m,minLength:S,min:_,max:v,pattern:N,validate:H,name:L,valueAsNumber:xe,mount:J,disabled:Q}=e._f,V=f(s,L);if(!J||Q)return{};const K=y?y[0]:a,G=b=>{u&&K.reportValidity&&(K.setCustomValidity(j(b)?"":b||""),K.reportValidity())},k={},ee=pe(a),de=ce(a),Y=ee||de,te=(xe||Oe(a))&&w(a.value)&&w(V)||_e(a)&&a.value===""||V===""||Array.isArray(V)&&!V.length,P=St.bind(null,L,t,k),ye=(b,F,C,U=z.maxLength,q=z.minLength)=>{const I=b?F:C;k[L]={type:b?U:q,message:I,ref:a,...P(b?U:q,I)}};if(n?!Array.isArray(V)||!V.length:h&&(!Y&&(te||O(V))||j(V)&&!V||de&&!nt(y).isValid||ee&&!ot(y).isValid)){const{value:b,message:F}=he(h)?{value:!!h,message:h}:se(h);if(b&&(k[L]={type:z.required,message:F,ref:K,...P(z.required,F)},!t))return G(F),k}if(!te&&(!O(_)||!O(v))){let b,F;const C=se(v),U=se(_);if(!O(V)&&!isNaN(V)){const q=a.valueAsNumber||V&&+V;O(C.value)||(b=q>C.value),O(U.value)||(F=q<U.value)}else{const q=a.valueAsDate||new Date(V),I=ae=>new Date(new Date().toDateString()+" "+ae),ue=a.type=="time",le=a.type=="week";$(C.value)&&V&&(b=ue?I(V)>I(C.value):le?V>C.value:q>new Date(C.value)),$(U.value)&&V&&(F=ue?I(V)<I(U.value):le?V<U.value:q<new Date(U.value))}if((b||F)&&(ye(!!b,C.message,U.message,z.max,z.min),!t))return G(k[L].message),k}if((m||S)&&!te&&($(V)||n&&Array.isArray(V))){const b=se(m),F=se(S),C=!O(b.value)&&V.length>+b.value,U=!O(F.value)&&V.length<+F.value;if((C||U)&&(ye(C,b.message,F.message),!t))return G(k[L].message),k}if(N&&!te&&$(V)){const{value:b,message:F}=se(N);if(be(b)&&!V.match(b)&&(k[L]={type:z.pattern,message:F,ref:a,...P(z.pattern,F)},!t))return G(F),k}if(H){if(X(H)){const b=await H(V,s),F=Xe(b,K);if(F&&(k[L]={...F,...P(z.validate,F.message)},!t))return G(F.message),k}else if(T(H)){let b={};for(const F in H){if(!B(b)&&!t)break;const C=Xe(await H[F](V,s),K,F);C&&(b={...C,...P(F,C.message)},G(C.message),t&&(k[L]=b))}if(!B(b)&&(k[L]={ref:K,...b},!t))return k}}return G(!0),k};function Ct(e,s){const t=s.slice(0,-1).length;let u=0;for(;u<t;)e=w(e)?u++:e[s[u++]];return e}function Rt(e){for(const s in e)if(e.hasOwnProperty(s)&&!w(e[s]))return!1;return!0}function R(e,s){const t=Array.isArray(s)?s:Te(s)?[s]:st(s),u=t.length===1?e:Ct(e,t),n=t.length-1,a=t[n];return u&&delete u[a],n!==0&&(T(u)&&B(u)||Array.isArray(u)&&Rt(u))&&R(e,t.slice(0,-1)),e}var Se=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}},Ve=e=>O(e)||!et(e);function Z(e,s){if(Ve(e)||Ve(s))return e===s;if(ie(e)&&ie(s))return e.getTime()===s.getTime();const t=Object.keys(e),u=Object.keys(s);if(t.length!==u.length)return!1;for(const n of t){const a=e[n];if(!u.includes(n))return!1;if(n!=="ref"){const y=s[n];if(ie(a)&&ie(y)||T(a)&&T(y)||Array.isArray(a)&&Array.isArray(y)?!Z(a,y):a!==y)return!1}}return!0}var ft=e=>e.type==="select-multiple",Tt=e=>pe(e)||ce(e),ke=e=>_e(e)&&e.isConnected,ct=e=>{for(const s in e)if(X(e[s]))return!0;return!1};function Fe(e,s={}){const t=Array.isArray(e);if(T(e)||t)for(const u in e)Array.isArray(e[u])||T(e[u])&&!ct(e[u])?(s[u]=Array.isArray(e[u])?[]:{},Fe(e[u],s[u])):O(e[u])||(s[u]=!0);return s}function dt(e,s,t){const u=Array.isArray(e);if(T(e)||u)for(const n in e)Array.isArray(e[n])||T(e[n])&&!ct(e[n])?w(s)||Ve(t[n])?t[n]=Array.isArray(e[n])?Fe(e[n],[]):{...Fe(e[n])}:dt(e[n],O(s)?{}:s[n],t[n]):t[n]=!Z(e[n],s[n]);return t}var ge=(e,s)=>dt(e,s,Fe(s)),yt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:u})=>w(e)?e:s?e===""?NaN:e&&+e:t&&$(e)?new Date(e):u?u(e):e;function Ce(e){const s=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):s.disabled))return Oe(s)?s.files:pe(s)?ot(e.refs).value:ft(s)?[...s.selectedOptions].map(({value:t})=>t):ce(s)?nt(e.refs).value:yt(w(s.value)?e.ref.value:s.value,e)}var Lt=(e,s,t,u)=>{const n={};for(const a of e){const y=f(s,a);y&&x(n,a,y._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:u}},ne=e=>w(e)?e:be(e)?e.source:T(e)?be(e.value)?e.value.source:e.value:e,Ut=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ze(e,s,t){const u=f(e,t);if(u||Te(t))return{error:u,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),y=f(s,a),h=f(e,a);if(y&&!Array.isArray(y)&&t!==a)return{name:t};if(h&&h.type)return{name:a,error:h};n.pop()}return{name:t}}var Ot=(e,s,t,u,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(s||e):(t?u.isOnBlur:n.isOnBlur)?!e:(t?u.isOnChange:n.isOnChange)?e:!0,pt=(e,s)=>!Ae(f(e,s)).length&&R(e,s);const Mt={mode:W.onSubmit,reValidateMode:W.onChange,shouldFocusError:!0};function Bt(e={}){let s={...Mt,...e},t={submitCount:0,isDirty:!1,isLoading:X(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1},u={},n=T(s.defaultValues)||T(s.values)?p(s.defaultValues||s.values)||{}:{},a=s.shouldUnregister?{}:p(n),y={action:!1,mount:!1,watch:!1},h={mount:new Set,unMount:new Set,array:new Set,watch:new Set},m,S=0;const _={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},v={values:Se(),array:Se(),state:Se()},N=Ke(s.mode),H=Ke(s.reValidateMode),L=s.criteriaMode===W.all,xe=r=>i=>{clearTimeout(S),S=setTimeout(r,i)},J=async r=>{if(_.isValid||r){const i=s.resolver?B((await Y()).errors):await P(u,!0);i!==t.isValid&&v.state.next({isValid:i})}},Q=(r,i)=>{(_.isValidating||_.validatingFields)&&((r||Array.from(h.mount)).forEach(l=>{l&&(i?x(t.validatingFields,l,i):R(t.validatingFields,l))}),v.state.next({validatingFields:t.validatingFields,isValidating:!B(t.validatingFields)}))},V=(r,i=[],l,d,c=!0,o=!0)=>{if(d&&l){if(y.action=!0,o&&Array.isArray(f(u,r))){const g=l(f(u,r),d.argA,d.argB);c&&x(u,r,g)}if(o&&Array.isArray(f(t.errors,r))){const g=l(f(t.errors,r),d.argA,d.argB);c&&x(t.errors,r,g),pt(t.errors,r)}if(_.touchedFields&&o&&Array.isArray(f(t.touchedFields,r))){const g=l(f(t.touchedFields,r),d.argA,d.argB);c&&x(t.touchedFields,r,g)}_.dirtyFields&&(t.dirtyFields=ge(n,a)),v.state.next({name:r,isDirty:b(r,i),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else x(a,r,i)},K=(r,i)=>{x(t.errors,r,i),v.state.next({errors:t.errors})},G=r=>{t.errors=r,v.state.next({errors:t.errors,isValid:!1})},k=(r,i,l,d)=>{const c=f(u,r);if(c){const o=f(a,r,w(l)?f(n,r):l);w(o)||d&&d.defaultChecked||i?x(a,r,i?o:Ce(c._f)):U(r,o),y.mount&&J()}},ee=(r,i,l,d,c)=>{let o=!1,g=!1;const A={name:r},E=!!(f(u,r)&&f(u,r)._f&&f(u,r)._f.disabled);if(!l||d){_.isDirty&&(g=t.isDirty,t.isDirty=A.isDirty=b(),o=g!==A.isDirty);const M=E||Z(f(n,r),i);g=!!(!E&&f(t.dirtyFields,r)),M||E?R(t.dirtyFields,r):x(t.dirtyFields,r,!0),A.dirtyFields=t.dirtyFields,o=o||_.dirtyFields&&g!==!M}if(l){const M=f(t.touchedFields,r);M||(x(t.touchedFields,r,l),A.touchedFields=t.touchedFields,o=o||_.touchedFields&&M!==l)}return o&&c&&v.state.next(A),o?A:{}},de=(r,i,l,d)=>{const c=f(t.errors,r),o=_.isValid&&j(i)&&t.isValid!==i;if(e.delayError&&l?(m=xe(()=>K(r,l)),m(e.delayError)):(clearTimeout(S),m=null,l?x(t.errors,r,l):R(t.errors,r)),(l?!Z(c,l):c)||!B(d)||o){const g={...d,...o&&j(i)?{isValid:i}:{},errors:t.errors,name:r};t={...t,...g},v.state.next(g)}},Y=async r=>{Q(r,!0);const i=await s.resolver(a,s.context,Lt(r||h.mount,u,s.criteriaMode,s.shouldUseNativeValidation));return Q(r),i},te=async r=>{const{errors:i}=await Y(r);if(r)for(const l of r){const d=f(i,l);d?x(t.errors,l,d):R(t.errors,l)}else t.errors=i;return i},P=async(r,i,l={valid:!0})=>{for(const d in r){const c=r[d];if(c){const{_f:o,...g}=c;if(o){const A=h.array.has(o.name);Q([d],!0);const E=await Ye(c,a,L,s.shouldUseNativeValidation&&!i,A);if(Q([d]),E[o.name]&&(l.valid=!1,i))break;!i&&(f(E,o.name)?A?kt(t.errors,E,o.name):x(t.errors,o.name,E[o.name]):R(t.errors,o.name))}g&&await P(g,i,l)}}return l.valid},ye=()=>{for(const r of h.unMount){const i=f(u,r);i&&(i._f.refs?i._f.refs.every(l=>!ke(l)):!ke(i._f.ref))&&me(r)}h.unMount=new Set},b=(r,i)=>(r&&i&&x(a,r,i),!Z(Me(),n)),F=(r,i,l)=>at(r,h,{...y.mount?a:w(i)?n:$(r)?{[r]:i}:i},l,i),C=r=>Ae(f(y.mount?a:n,r,e.shouldUnregister?f(n,r,[]):[])),U=(r,i,l={})=>{const d=f(u,r);let c=i;if(d){const o=d._f;o&&(!o.disabled&&x(a,r,yt(i,o)),c=_e(o.ref)&&O(i)?"":i,ft(o.ref)?[...o.ref.options].forEach(g=>g.selected=c.includes(g.value)):o.refs?ce(o.ref)?o.refs.length>1?o.refs.forEach(g=>(!g.defaultChecked||!g.disabled)&&(g.checked=Array.isArray(c)?!!c.find(A=>A===g.value):c===g.value)):o.refs[0]&&(o.refs[0].checked=!!c):o.refs.forEach(g=>g.checked=g.value===c):Oe(o.ref)?o.ref.value="":(o.ref.value=c,o.ref.type||v.values.next({name:r,values:{...a}})))}(l.shouldDirty||l.shouldTouch)&&ee(r,c,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&ae(r)},q=(r,i,l)=>{for(const d in i){const c=i[d],o=`${r}.${d}`,g=f(u,o);(h.array.has(r)||!Ve(c)||g&&!g._f)&&!ie(c)?q(o,c,l):U(o,c,l)}},I=(r,i,l={})=>{const d=f(u,r),c=h.array.has(r),o=p(i);x(a,r,o),c?(v.array.next({name:r,values:{...a}}),(_.isDirty||_.dirtyFields)&&l.shouldDirty&&v.state.next({name:r,dirtyFields:ge(n,a),isDirty:b(r,o)})):d&&!d._f&&!O(o)?q(r,o,l):U(r,o,l),Ge(r,h)&&v.state.next({...t}),v.values.next({name:y.mount?r:void 0,values:{...a}})},ue=async r=>{y.mount=!0;const i=r.target;let l=i.name,d=!0;const c=f(u,l),o=()=>i.type?Ce(c._f):tt(r),g=A=>{d=Number.isNaN(A)||A===f(a,l,A)};if(c){let A,E;const M=o(),re=r.type===ve.BLUR||r.type===ve.FOCUS_OUT,bt=!Ut(c._f)&&!s.resolver&&!f(t.errors,l)&&!c._f.deps||Ot(re,f(t.touchedFields,l),t.isSubmitted,H,N),we=Ge(l,h,re);x(a,l,M),re?(c._f.onBlur&&c._f.onBlur(r),m&&m(0)):c._f.onChange&&c._f.onChange(r);const Ee=ee(l,M,re,!1),Vt=!B(Ee)||we;if(!re&&v.values.next({name:l,type:r.type,values:{...a}}),bt)return _.isValid&&J(),Vt&&v.state.next({name:l,...we?{}:Ee});if(!re&&we&&v.state.next({...t}),s.resolver){const{errors:je}=await Y([l]);if(g(M),d){const Ft=Ze(t.errors,u,l),$e=Ze(je,u,Ft.name||l);A=$e.error,l=$e.name,E=B(je)}}else Q([l],!0),A=(await Ye(c,a,L,s.shouldUseNativeValidation))[l],Q([l]),g(M),d&&(A?E=!1:_.isValid&&(E=await P(u,!0)));d&&(c._f.deps&&ae(c._f.deps),de(l,E,A,Ee))}},le=(r,i)=>{if(f(t.errors,i)&&r.focus)return r.focus(),1},ae=async(r,i={})=>{let l,d;const c=oe(r);if(s.resolver){const o=await te(w(r)?r:c);l=B(o),d=r?!c.some(g=>f(o,g)):l}else r?(d=(await Promise.all(c.map(async o=>{const g=f(u,o);return await P(g&&g._f?{[o]:g}:g)}))).every(Boolean),!(!d&&!t.isValid)&&J()):d=l=await P(u);return v.state.next({...!$(r)||_.isValid&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors}),i.shouldFocus&&!d&&fe(u,le,r?c:h.mount),d},Me=r=>{const i={...y.mount?a:n};return w(r)?i:$(r)?f(i,r):r.map(l=>f(i,l))},Be=(r,i)=>({invalid:!!f((i||t).errors,r),isDirty:!!f((i||t).dirtyFields,r),error:f((i||t).errors,r),isValidating:!!f(t.validatingFields,r),isTouched:!!f((i||t).touchedFields,r)}),gt=r=>{r&&oe(r).forEach(i=>R(t.errors,i)),v.state.next({errors:r?t.errors:{}})},Pe=(r,i,l)=>{const d=(f(u,r,{_f:{}})._f||{}).ref,c=f(t.errors,r)||{},{ref:o,message:g,type:A,...E}=c;x(t.errors,r,{...E,...i,ref:d}),v.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&d&&d.focus&&d.focus()},ht=(r,i)=>X(r)?v.values.subscribe({next:l=>r(F(void 0,i),l)}):F(r,i,!0),me=(r,i={})=>{for(const l of r?oe(r):h.mount)h.mount.delete(l),h.array.delete(l),i.keepValue||(R(u,l),R(a,l)),!i.keepError&&R(t.errors,l),!i.keepDirty&&R(t.dirtyFields,l),!i.keepTouched&&R(t.touchedFields,l),!i.keepIsValidating&&R(t.validatingFields,l),!s.shouldUnregister&&!i.keepDefaultValue&&R(n,l);v.values.next({values:{...a}}),v.state.next({...t,...i.keepDirty?{isDirty:b()}:{}}),!i.keepIsValid&&J()},Ie=({disabled:r,name:i,field:l,fields:d,value:c})=>{if(j(r)&&y.mount||r){const o=r?void 0:w(c)?Ce(l?l._f:f(d,i)._f):c;x(a,i,o),ee(i,o,!1,!1,!0)}},De=(r,i={})=>{let l=f(u,r);const d=j(i.disabled);return x(u,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...i}}),h.mount.add(r),l?Ie({field:l,disabled:i.disabled,name:r,value:i.value}):k(r,!0,i.value),{...d?{disabled:i.disabled}:{},...s.progressive?{required:!!i.required,min:ne(i.min),max:ne(i.max),minLength:ne(i.minLength),maxLength:ne(i.maxLength),pattern:ne(i.pattern)}:{},name:r,onChange:ue,onBlur:ue,ref:c=>{if(c){De(r,i),l=f(u,r);const o=w(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,g=Tt(o),A=l._f.refs||[];if(g?A.find(E=>E===o):o===l._f.ref)return;x(u,r,{_f:{...l._f,...g?{refs:[...A.filter(ke),o,...Array.isArray(f(n,r))?[{}]:[]],ref:{type:o.type,name:r}}:{ref:o}}}),k(r,!1,void 0,o)}else l=f(u,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||i.shouldUnregister)&&!(rt(h.array,r)&&y.action)&&h.unMount.add(r)}}},Ne=()=>s.shouldFocusError&&fe(u,le,h.mount),vt=r=>{j(r)&&(v.state.next({disabled:r}),fe(u,(i,l)=>{const d=f(u,l);d&&(i.disabled=d._f.disabled||r,Array.isArray(d._f.refs)&&d._f.refs.forEach(c=>{c.disabled=d._f.disabled||r}))},0,!1))},qe=(r,i)=>async l=>{let d;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let c=p(a);if(v.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:g}=await Y();t.errors=o,c=g}else await P(u);if(R(t.errors,"root"),B(t.errors)){v.state.next({errors:{}});try{await r(c,l)}catch(o){d=o}}else i&&await i({...t.errors},l),Ne(),setTimeout(Ne);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(t.errors)&&!d,submitCount:t.submitCount+1,errors:t.errors}),d)throw d},_t=(r,i={})=>{f(u,r)&&(w(i.defaultValue)?I(r,p(f(n,r))):(I(r,i.defaultValue),x(n,r,p(i.defaultValue))),i.keepTouched||R(t.touchedFields,r),i.keepDirty||(R(t.dirtyFields,r),t.isDirty=i.defaultValue?b(r,p(f(n,r))):b()),i.keepError||(R(t.errors,r),_.isValid&&J()),v.state.next({...t}))},We=(r,i={})=>{const l=r?p(r):n,d=p(l),c=B(r),o=c?n:d;if(i.keepDefaultValues||(n=l),!i.keepValues){if(i.keepDirtyValues)for(const g of h.mount)f(t.dirtyFields,g)?x(o,g,f(a,g)):I(g,f(o,g));else{if(Re&&w(r))for(const g of h.mount){const A=f(u,g);if(A&&A._f){const E=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(_e(E)){const M=E.closest("form");if(M){M.reset();break}}}}u={}}a=e.shouldUnregister?i.keepDefaultValues?p(n):{}:p(o),v.array.next({values:{...o}}),v.values.next({values:{...o}})}h={mount:i.keepDirtyValues?h.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},y.mount=!_.isValid||!!i.keepIsValid||!!i.keepDirtyValues,y.watch=!!e.shouldUnregister,v.state.next({submitCount:i.keepSubmitCount?t.submitCount:0,isDirty:c?!1:i.keepDirty?t.isDirty:!!(i.keepDefaultValues&&!Z(r,n)),isSubmitted:i.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?{}:i.keepDirtyValues?i.keepDefaultValues&&a?ge(n,a):t.dirtyFields:i.keepDefaultValues&&r?ge(n,r):i.keepDirty?t.dirtyFields:{},touchedFields:i.keepTouched?t.touchedFields:{},errors:i.keepErrors?t.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},He=(r,i)=>We(X(r)?r(a):r,i);return{control:{register:De,unregister:me,getFieldState:Be,handleSubmit:qe,setError:Pe,_executeSchema:Y,_getWatch:F,_getDirty:b,_updateValid:J,_removeUnmounted:ye,_updateFieldArray:V,_updateDisabledField:Ie,_getFieldArray:C,_reset:We,_resetDefaultValues:()=>X(s.defaultValues)&&s.defaultValues().then(r=>{He(r,s.resetOptions),v.state.next({isLoading:!1})}),_updateFormState:r=>{t={...t,...r}},_disableForm:vt,_subjects:v,_proxyFormState:_,_setErrors:G,get _fields(){return u},get _formValues(){return a},get _state(){return y},set _state(r){y=r},get _defaultValues(){return n},get _names(){return h},set _names(r){h=r},get _formState(){return t},set _formState(r){t=r},get _options(){return s},set _options(r){s={...s,...r}}},trigger:ae,register:De,handleSubmit:qe,watch:ht,setValue:I,getValues:Me,reset:He,resetField:_t,clearErrors:gt,unregister:me,setError:Pe,setFocus:(r,i={})=>{const l=f(u,r),d=l&&l._f;if(d){const c=d.refs?d.refs[0]:d.ref;c.focus&&(c.focus(),i.shouldSelect&&c.select())}},getFieldState:Be}}function Ht(e={}){const s=D.useRef(),t=D.useRef(),[u,n]=D.useState({isDirty:!1,isValidating:!1,isLoading:X(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:X(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...Bt(e),formState:u});const a=s.current.control;return a._options=e,Ue({subject:a._subjects.state,next:y=>{ut(y,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),D.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),D.useEffect(()=>{if(a._proxyFormState.isDirty){const y=a._getDirty();y!==u.isDirty&&a._subjects.state.next({isDirty:y})}},[a,u.isDirty]),D.useEffect(()=>{e.values&&!Z(e.values,t.current)?(a._reset(e.values,a._options.resetOptions),t.current=e.values,n(y=>({...y}))):a._resetDefaultValues()},[e.values,a]),D.useEffect(()=>{e.errors&&a._setErrors(e.errors)},[e.errors,a]),D.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),D.useEffect(()=>{e.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[e.shouldUnregister,a]),s.current.formState=it(u,a),s.current}export{Wt as C,wt as a,Ht as u};
@@ -1 +1 @@
1
- import{C as i}from"./codemirror.es-CVvRjjht.js";import"./index-CRpa8mt0.js";import"./index-ZGnAW8k-.js";var y=Object.defineProperty,u=(e,t)=>y(e,"name",{value:t,configurable:!0});i.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.Init){const o=e.state.info.onMouseOver;i.off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const o=e.state.info=v(t);o.onMouseOver=h.bind(null,e),i.on(e.getWrapperElement(),"mouseover",o.onMouseOver)}});function v(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}u(v,"createState");function g(e){const t=e.state.info.options;return(t==null?void 0:t.hoverTime)||500}u(g,"getHoverTime");function h(e,t){const n=e.state.info,o=t.target||t.srcElement;if(!(o instanceof HTMLElement)||o.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const s=o.getBoundingClientRect(),r=u(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(f,a)},"onMouseMove"),p=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),f=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),n.hoverTimeout=void 0,T(e,s)},"onHover"),a=g(e);n.hoverTimeout=setTimeout(f,a),i.on(document,"mousemove",r),i.on(e.getWrapperElement(),"mouseout",p)}u(h,"onMouseOver");function T(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),s=e.state.info.options,r=s.render||e.getHelper(n,"info");if(r){const p=e.getTokenAt(n,!0);if(p){const f=r(p,s,e,n);f&&M(e,t,f)}}}u(T,"onMouseHover");function M(e,t,n){const o=document.createElement("div");o.className="CodeMirror-info",o.appendChild(n),document.body.appendChild(o);const s=o.getBoundingClientRect(),r=window.getComputedStyle(o),p=s.right-s.left+parseFloat(r.marginLeft)+parseFloat(r.marginRight),f=s.bottom-s.top+parseFloat(r.marginTop)+parseFloat(r.marginBottom);let a=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(a=t.top-f),a<0&&(a=t.bottom);let l=Math.max(0,window.innerWidth-p-15);l>t.left&&(l=t.left),o.style.opacity="1",o.style.top=a+"px",o.style.left=l+"px";let d;const c=u(function(){clearTimeout(d)},"onMouseOverPopup"),m=u(function(){clearTimeout(d),d=setTimeout(O,200)},"onMouseOut"),O=u(function(){i.off(o,"mouseover",c),i.off(o,"mouseout",m),i.off(e.getWrapperElement(),"mouseout",m),o.style.opacity?(o.style.opacity="0",setTimeout(()=>{o.parentNode&&o.parentNode.removeChild(o)},600)):o.parentNode&&o.parentNode.removeChild(o)},"hidePopup");i.on(o,"mouseover",c),i.on(o,"mouseout",m),i.on(e.getWrapperElement(),"mouseout",m)}u(M,"showPopup");
1
+ import{C as i}from"./codemirror.es-DLcwUx7p.js";import"./index-Z-ABz1jd.js";import"./index-DhKEzK4G.js";var y=Object.defineProperty,u=(e,t)=>y(e,"name",{value:t,configurable:!0});i.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.Init){const o=e.state.info.onMouseOver;i.off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const o=e.state.info=v(t);o.onMouseOver=h.bind(null,e),i.on(e.getWrapperElement(),"mouseover",o.onMouseOver)}});function v(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}u(v,"createState");function g(e){const t=e.state.info.options;return(t==null?void 0:t.hoverTime)||500}u(g,"getHoverTime");function h(e,t){const n=e.state.info,o=t.target||t.srcElement;if(!(o instanceof HTMLElement)||o.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const s=o.getBoundingClientRect(),r=u(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(f,a)},"onMouseMove"),p=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),f=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),n.hoverTimeout=void 0,T(e,s)},"onHover"),a=g(e);n.hoverTimeout=setTimeout(f,a),i.on(document,"mousemove",r),i.on(e.getWrapperElement(),"mouseout",p)}u(h,"onMouseOver");function T(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),s=e.state.info.options,r=s.render||e.getHelper(n,"info");if(r){const p=e.getTokenAt(n,!0);if(p){const f=r(p,s,e,n);f&&M(e,t,f)}}}u(T,"onMouseHover");function M(e,t,n){const o=document.createElement("div");o.className="CodeMirror-info",o.appendChild(n),document.body.appendChild(o);const s=o.getBoundingClientRect(),r=window.getComputedStyle(o),p=s.right-s.left+parseFloat(r.marginLeft)+parseFloat(r.marginRight),f=s.bottom-s.top+parseFloat(r.marginTop)+parseFloat(r.marginBottom);let a=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(a=t.top-f),a<0&&(a=t.bottom);let l=Math.max(0,window.innerWidth-p-15);l>t.left&&(l=t.left),o.style.opacity="1",o.style.top=a+"px",o.style.left=l+"px";let d;const c=u(function(){clearTimeout(d)},"onMouseOverPopup"),m=u(function(){clearTimeout(d),d=setTimeout(O,200)},"onMouseOut"),O=u(function(){i.off(o,"mouseover",c),i.off(o,"mouseout",m),i.off(e.getWrapperElement(),"mouseout",m),o.style.opacity?(o.style.opacity="0",setTimeout(()=>{o.parentNode&&o.parentNode.removeChild(o)},600)):o.parentNode&&o.parentNode.removeChild(o)},"hidePopup");i.on(o,"mouseover",c),i.on(o,"mouseout",m),i.on(e.getWrapperElement(),"mouseout",m)}u(M,"showPopup");
@@ -1 +1 @@
1
- import{C as h}from"./codemirror.es-CVvRjjht.js";import{g as E,a as C,b as N,c as _,d as V,e as x}from"./SchemaReference.es-yLf24oFH.js";import"./info-addon.es-BwQtq18_.js";import{Y as A,r as F}from"./index-CRpa8mt0.js";import"./index-ZGnAW8k-.js";import"./introspection.es-CPJcz6nz.js";import"./forEachState.es-D8bf0zSr.js";var L=Object.defineProperty,l=(r,e)=>L(r,"name",{value:e,configurable:!0});h.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const i=r.state,n=i.kind,d=i.step,c=E(e.schema,r.state);if(n==="Field"&&d===0&&c.fieldDef||n==="AliasedField"&&d===2&&c.fieldDef){const a=document.createElement("div");return o(a,c,e),u(a,e,c.fieldDef),a}else if(n==="Directive"&&d===1&&c.directiveDef){const a=document.createElement("div");return f(a,c,e),u(a,e,c.directiveDef),a}else if(n==="Argument"&&d===0&&c.argDef){const a=document.createElement("div");return p(a,c,e),u(a,e,c.argDef),a}else if(n==="EnumValue"&&c.enumValue&&c.enumValue.description){const a=document.createElement("div");return D(a,c,e),u(a,e,c.enumValue),a}else if(n==="NamedType"&&c.type&&c.type.description){const a=document.createElement("div");return m(a,c,e,c.type),u(a,e,c.type),a}});function o(r,e,i){s(r,e,i),v(r,e,i,e.type)}l(o,"renderField");function s(r,e,i){var n;const d=((n=e.fieldDef)===null||n===void 0?void 0:n.name)||"";d.slice(0,2)!=="__"&&(m(r,e,i,e.parentType),t(r,".")),t(r,d,"field-name",i,C(e))}l(s,"renderQualifiedField");function f(r,e,i){var n;const d="@"+(((n=e.directiveDef)===null||n===void 0?void 0:n.name)||"");t(r,d,"directive-name",i,N(e))}l(f,"renderDirective");function p(r,e,i){var n;e.directiveDef?f(r,e,i):e.fieldDef&&s(r,e,i);const d=((n=e.argDef)===null||n===void 0?void 0:n.name)||"";t(r,"("),t(r,d,"arg-name",i,_(e)),v(r,e,i,e.inputType),t(r,")")}l(p,"renderArg");function v(r,e,i,n){t(r,": "),m(r,e,i,n)}l(v,"renderTypeAnnotation");function D(r,e,i){var n;const d=((n=e.enumValue)===null||n===void 0?void 0:n.name)||"";m(r,e,i,e.inputType),t(r,"."),t(r,d,"enum-value",i,V(e))}l(D,"renderEnumValue");function m(r,e,i,n){n instanceof A?(m(r,e,i,n.ofType),t(r,"!")):n instanceof F?(t(r,"["),m(r,e,i,n.ofType),t(r,"]")):t(r,(n==null?void 0:n.name)||"","type-name",i,x(e,n))}l(m,"renderType");function u(r,e,i){const n=i.description;if(n){const d=document.createElement("div");d.className="info-description",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n)),r.appendChild(d)}T(r,e,i)}l(u,"renderDescription");function T(r,e,i){const n=i.deprecationReason;if(n){const d=document.createElement("div");d.className="info-deprecation",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n));const c=document.createElement("span");c.className="info-deprecation-label",c.appendChild(document.createTextNode("Deprecated: ")),d.insertBefore(c,d.firstChild),r.appendChild(d)}}l(T,"renderDeprecation");function t(r,e,i="",n={onClick:null},d=null){if(i){const c=n.onClick;let a;c?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",g=>{c(d,g)})):a=document.createElement("span"),a.className=i,a.appendChild(document.createTextNode(e)),r.appendChild(a)}else r.appendChild(document.createTextNode(e))}l(t,"text");
1
+ import{C as h}from"./codemirror.es-DLcwUx7p.js";import{g as E,a as C,b as N,c as _,d as V,e as x}from"./SchemaReference.es-CwVyx9KR.js";import"./info-addon.es-CTOMNSVc.js";import{Y as A,r as F}from"./index-Z-ABz1jd.js";import"./index-DhKEzK4G.js";import"./introspection.es-CPJcz6nz.js";import"./forEachState.es-D8bf0zSr.js";var L=Object.defineProperty,l=(r,e)=>L(r,"name",{value:e,configurable:!0});h.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const i=r.state,n=i.kind,d=i.step,c=E(e.schema,r.state);if(n==="Field"&&d===0&&c.fieldDef||n==="AliasedField"&&d===2&&c.fieldDef){const a=document.createElement("div");return o(a,c,e),u(a,e,c.fieldDef),a}else if(n==="Directive"&&d===1&&c.directiveDef){const a=document.createElement("div");return f(a,c,e),u(a,e,c.directiveDef),a}else if(n==="Argument"&&d===0&&c.argDef){const a=document.createElement("div");return p(a,c,e),u(a,e,c.argDef),a}else if(n==="EnumValue"&&c.enumValue&&c.enumValue.description){const a=document.createElement("div");return D(a,c,e),u(a,e,c.enumValue),a}else if(n==="NamedType"&&c.type&&c.type.description){const a=document.createElement("div");return m(a,c,e,c.type),u(a,e,c.type),a}});function o(r,e,i){s(r,e,i),v(r,e,i,e.type)}l(o,"renderField");function s(r,e,i){var n;const d=((n=e.fieldDef)===null||n===void 0?void 0:n.name)||"";d.slice(0,2)!=="__"&&(m(r,e,i,e.parentType),t(r,".")),t(r,d,"field-name",i,C(e))}l(s,"renderQualifiedField");function f(r,e,i){var n;const d="@"+(((n=e.directiveDef)===null||n===void 0?void 0:n.name)||"");t(r,d,"directive-name",i,N(e))}l(f,"renderDirective");function p(r,e,i){var n;e.directiveDef?f(r,e,i):e.fieldDef&&s(r,e,i);const d=((n=e.argDef)===null||n===void 0?void 0:n.name)||"";t(r,"("),t(r,d,"arg-name",i,_(e)),v(r,e,i,e.inputType),t(r,")")}l(p,"renderArg");function v(r,e,i,n){t(r,": "),m(r,e,i,n)}l(v,"renderTypeAnnotation");function D(r,e,i){var n;const d=((n=e.enumValue)===null||n===void 0?void 0:n.name)||"";m(r,e,i,e.inputType),t(r,"."),t(r,d,"enum-value",i,V(e))}l(D,"renderEnumValue");function m(r,e,i,n){n instanceof A?(m(r,e,i,n.ofType),t(r,"!")):n instanceof F?(t(r,"["),m(r,e,i,n.ofType),t(r,"]")):t(r,(n==null?void 0:n.name)||"","type-name",i,x(e,n))}l(m,"renderType");function u(r,e,i){const n=i.description;if(n){const d=document.createElement("div");d.className="info-description",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n)),r.appendChild(d)}T(r,e,i)}l(u,"renderDescription");function T(r,e,i){const n=i.deprecationReason;if(n){const d=document.createElement("div");d.className="info-deprecation",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n));const c=document.createElement("span");c.className="info-deprecation-label",c.appendChild(document.createTextNode("Deprecated: ")),d.insertBefore(c,d.firstChild),r.appendChild(d)}}l(T,"renderDeprecation");function t(r,e,i="",n={onClick:null},d=null){if(i){const c=n.onClick;let a;c?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",g=>{c(d,g)})):a=document.createElement("span"),a.className=i,a.appendChild(document.createTextNode(e)),r.appendChild(a)}else r.appendChild(document.createTextNode(e))}l(t,"text");
@@ -1 +1 @@
1
- import{P as O,j as m,dE as Bt,cP as P,dF as Ht,F as Ft,dG as Gt,b as Wt,O as qt,dH as Kt,bm as Vt,t as zt,r as D,q as Yt,M as Xt,W as Jt,m as Qt,D as Zt,B as ft,C as pt,w as kt,J as te,x as ee,bn as ie,K as re}from"./index-ZGnAW8k-.js";import{W as ne}from"./tag-CxVWvL3v.js";import{s as Et,n as se}from"./schema-vba8ScMR.js";import{I as mt}from"./index-DeHtrQ7P.js";import{T as oe}from"./TextField-D7-Vl4N2.js";import{S as ae,a as le,b as he}from"./Stepper-qCoo64ls.js";function ce({mode:t,...e}){return t==="development"?m.jsx(ne,{type:"primary",...e,children:"DEV"}):null}ce.propTypes={mode:O.string.isRequired};var _t={},ht={exports:{}},jt={exports:{}},X=jt.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+St(t)}}},gt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:St};Object.keys(X).forEach(function(t){Object.keys(gt).forEach(function(e){X[t][e]||(X[t][e]=gt[e])}),X[t].protocols_re=RegExp("^("+X[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function St(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var Ct=jt.exports,dt=Ct,q=Object.assign||function(e,i){if(i===null||typeof i!="object")return e;const r=Object.keys(i);let s=r.length;for(;s--;)e[r[s]]=i[r[s]];return e},ue=j;function j(t,e,i,r,s,a,p){var c=this;c.type=t,Object.keys(dt[t]).forEach(function(g){c[g]=dt[t][g]}),c.user=e,c.auth=i,c.project=r,c.committish=s,c.default=a,c.opts=p||{}}j.prototype.hash=function(){return this.committish?"#"+this.committish:""};j.prototype._fill=function(t,e){if(t){var i=q({},e);i.path=i.path?i.path.replace(/^[/]+/g,""):"",e=q(q({},this.opts),e);var r=this;Object.keys(this).forEach(function(f){r[f]!=null&&i[f]==null&&(i[f]=r[f])});var s=i.auth,a=i.committish,p=i.fragment,c=i.path,g=i.project;Object.keys(i).forEach(function(f){var S=i[f];(f==="path"||f==="project")&&typeof S=="string"?i[f]=S.split("/").map(function(h){return encodeURIComponent(h)}).join("/"):f!=="domain"&&(i[f]=encodeURIComponent(S))}),i["auth@"]=s?s+"@":"",i["#fragment"]=p?"#"+this.hashformat(p):"",i.fragment=i.fragment?i.fragment:"",i["#path"]=c?"#"+this.hashformat(c):"",i["/path"]=i.path?"/"+i.path:"",i.projectPath=g.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(i["#committish"]="",i["/tree/committish"]="",i["/committish"]="",i.committish=""):(i["#committish"]=a?"#"+a:"",i["/tree/committish"]=i.committish?"/"+i.treepath+"/"+i.committish:"",i["/committish"]=i.committish?"/"+i.committish:"",i.committish=i.committish||"master");var x=t;return Object.keys(i).forEach(function(f){x=x.replace(new RegExp("[{]"+f+"[}]","g"),i[f])}),e.noGitPlus?x.replace(/^git[+]/,""):x}};j.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};j.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};j.prototype.browse=function(t,e,i){return typeof t=="string"?(typeof e!="string"&&(i=e,e=null),this._fill(this.browsefiletemplate,q({fragment:e,path:t},i))):this._fill(this.browsetemplate,t)};j.prototype.docs=function(t){return this._fill(this.docstemplate,t)};j.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};j.prototype.https=function(t){return this._fill(this.httpstemplate,t)};j.prototype.git=function(t){return this._fill(this.gittemplate,t)};j.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};j.prototype.path=function(t){return this._fill(this.pathtemplate,t)};j.prototype.tarball=function(t){var e=q({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};j.prototype.file=function(t,e){return this._fill(this.filetemplate,q({path:t},e))};j.prototype.getDefaultRepresentation=function(){return this.default};j.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var nt,vt;function fe(){return vt||(vt=1,nt=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),nt}var pe=l;l.Node=N;l.create=l;function l(t){var e=this;if(e instanceof l||(e=new l),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var i=0,r=arguments.length;i<r;i++)e.push(arguments[i]);return e}l.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,i=t.prev;return e&&(e.prev=i),i&&(i.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,e};l.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};l.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};l.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)ge(this,arguments[t]);return this.length};l.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)de(this,arguments[t]);return this.length};l.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};l.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};l.prototype.forEach=function(t,e){e=e||this;for(var i=this.head,r=0;i!==null;r++)t.call(e,i.value,r,this),i=i.next};l.prototype.forEachReverse=function(t,e){e=e||this;for(var i=this.tail,r=this.length-1;i!==null;r--)t.call(e,i.value,r,this),i=i.prev};l.prototype.get=function(t){for(var e=0,i=this.head;i!==null&&e<t;e++)i=i.next;if(e===t&&i!==null)return i.value};l.prototype.getReverse=function(t){for(var e=0,i=this.tail;i!==null&&e<t;e++)i=i.prev;if(e===t&&i!==null)return i.value};l.prototype.map=function(t,e){e=e||this;for(var i=new l,r=this.head;r!==null;)i.push(t.call(e,r.value,this)),r=r.next;return i};l.prototype.mapReverse=function(t,e){e=e||this;for(var i=new l,r=this.tail;r!==null;)i.push(t.call(e,r.value,this)),r=r.prev;return i};l.prototype.reduce=function(t,e){var i,r=this.head;if(arguments.length>1)i=e;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;r!==null;s++)i=t(i,r.value,s),r=r.next;return i};l.prototype.reduceReverse=function(t,e){var i,r=this.tail;if(arguments.length>1)i=e;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;r!==null;s--)i=t(i,r.value,s),r=r.prev;return i};l.prototype.toArray=function(){for(var t=new Array(this.length),e=0,i=this.head;i!==null;e++)t[e]=i.value,i=i.next;return t};l.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,i=this.tail;i!==null;e++)t[e]=i.value,i=i.prev;return t};l.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(;s!==null&&r<e;r++,s=s.next)i.push(s.value);return i};l.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=this.length,s=this.tail;s!==null&&r>e;r--)s=s.prev;for(;s!==null&&r>t;r--,s=s.prev)i.push(s.value);return i};l.prototype.splice=function(t,e,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(var a=[],r=0;s&&r<e;r++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var r=0;r<i.length;r++)s=me(this,s,i[r]);return a};l.prototype.reverse=function(){for(var t=this.head,e=this.tail,i=t;i!==null;i=i.prev){var r=i.prev;i.prev=i.next,i.next=r}return this.head=e,this.tail=t,this};function me(t,e,i){var r=e===t.head?new N(i,null,e,t):new N(i,e,e.next,t);return r.next===null&&(t.tail=r),r.prev===null&&(t.head=r),t.length++,r}function ge(t,e){t.tail=new N(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function de(t,e){t.head=new N(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function N(t,e,i,r){if(!(this instanceof N))return new N(t,e,i,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{fe()(l)}catch{}const ve=pe,M=Symbol("max"),U=Symbol("length"),G=Symbol("lengthCalculator"),Q=Symbol("allowStale"),$=Symbol("maxAge"),I=Symbol("dispose"),yt=Symbol("noDisposeOnSet"),b=Symbol("lruList"),w=Symbol("cache"),At=Symbol("updateAgeOnGet"),st=()=>1;class ye{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[M]=e.max||1/0;const i=e.length||st;if(this[G]=typeof i!="function"?st:i,this[Q]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[$]=e.maxAge||0,this[I]=e.dispose,this[yt]=e.noDisposeOnSet||!1,this[At]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[M]=e||1/0,J(this)}get max(){return this[M]}set allowStale(e){this[Q]=!!e}get allowStale(){return this[Q]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[$]=e,J(this)}get maxAge(){return this[$]}set lengthCalculator(e){typeof e!="function"&&(e=st),e!==this[G]&&(this[G]=e,this[U]=0,this[b].forEach(i=>{i.length=this[G](i.value,i.key),this[U]+=i.length})),J(this)}get lengthCalculator(){return this[G]}get length(){return this[U]}get itemCount(){return this[b].length}rforEach(e,i){i=i||this;for(let r=this[b].tail;r!==null;){const s=r.prev;bt(this,e,r,i),r=s}}forEach(e,i){i=i||this;for(let r=this[b].head;r!==null;){const s=r.next;bt(this,e,r,i),r=s}}keys(){return this[b].toArray().map(e=>e.key)}values(){return this[b].toArray().map(e=>e.value)}reset(){this[I]&&this[b]&&this[b].length&&this[b].forEach(e=>this[I](e.key,e.value)),this[w]=new Map,this[b]=new ve,this[U]=0}dump(){return this[b].map(e=>k(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[b]}set(e,i,r){if(r=r||this[$],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0,a=this[G](i,e);if(this[w].has(e)){if(a>this[M])return K(this,this[w].get(e)),!1;const g=this[w].get(e).value;return this[I]&&(this[yt]||this[I](e,g.value)),g.now=s,g.maxAge=r,g.value=i,this[U]+=a-g.length,g.length=a,this.get(e),J(this),!0}const p=new be(e,i,a,s,r);return p.length>this[M]?(this[I]&&this[I](e,i),!1):(this[U]+=p.length,this[b].unshift(p),this[w].set(e,this[b].head),J(this),!0)}has(e){if(!this[w].has(e))return!1;const i=this[w].get(e).value;return!k(this,i)}get(e){return ot(this,e,!0)}peek(e){return ot(this,e,!1)}pop(){const e=this[b].tail;return e?(K(this,e),e.value):null}del(e){K(this,this[w].get(e))}load(e){this.reset();const i=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const p=a-i;p>0&&this.set(s.k,s.v,p)}}}prune(){this[w].forEach((e,i)=>ot(this,i,!1))}}const ot=(t,e,i)=>{const r=t[w].get(e);if(r){const s=r.value;if(k(t,s)){if(K(t,r),!t[Q])return}else i&&(t[At]&&(r.value.now=Date.now()),t[b].unshiftNode(r));return s.value}},k=(t,e)=>{if(!e||!e.maxAge&&!t[$])return!1;const i=Date.now()-e.now;return e.maxAge?i>e.maxAge:t[$]&&i>t[$]},J=t=>{if(t[U]>t[M])for(let e=t[b].tail;t[U]>t[M]&&e!==null;){const i=e.prev;K(t,e),e=i}},K=(t,e)=>{if(e){const i=e.value;t[I]&&t[I](i.key,i.value),t[U]-=i.length,t[w].delete(i.key),t[b].removeNode(e)}};class be{constructor(e,i,r,s,a){this.key=e,this.value=i,this.length=r,this.now=s,this.maxAge=a||0}}const bt=(t,e,i,r)=>{let s=i.value;k(t,s)&&(K(t,i),t[Q]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};var xe=ye,lt=Bt,xt=Ct,Ee=ht.exports=ue,_e=xe,at=new _e({max:1e3}),je={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function Se(t){return je[t]||t.slice(0,-1)}var Ce={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};ht.exports.fromUrl=function(t,e){if(typeof t=="string"){var i=t+JSON.stringify(e||{});return at.has(i)||at.set(i,Ae(t,e)),at.get(i)}};function Ae(t,e){if(!(t==null||t==="")){var i=Re(we(t)?"github:"+t:t),r=Pe(i),s=i.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(xt).map(function(p){try{var c=xt[p],g=null;r.auth&&Ce[r.protocol]&&(g=r.auth);var x=r.hash?decodeURIComponent(r.hash.substr(1)):null,f=null,S=null,h=null;if(s&&s[1]===p)f=s[2]&&decodeURIComponent(s[2]),S=decodeURIComponent(s[3].replace(/\.git$/,"")),h="shortcut";else{if(r.host&&r.host!==c.domain&&r.host.replace(/^www[.]/,"")!==c.domain||!c.protocols_re.test(r.protocol)||!r.path)return;var H=c.pathmatch,C=r.path.match(H);if(!C)return;C[1]!==null&&C[1]!==void 0&&(f=decodeURIComponent(C[1].replace(/^:/,""))),S=decodeURIComponent(C[2]),h=Se(r.protocol)}return new Ee(p,f,g,S,x,h,e)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(p){return p});if(a.length===1)return a[0]}}function we(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Re(t){var e=lt.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Pe(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var i=lt.parse(t);if(i.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var r=new lt.URL(s[0]);i.auth=r.username||"",r.password&&(i.auth+=":"+r.password)}}return i}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var Ie=ht.exports,B={},R={},wt=P&&P.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R,"__esModule",{value:!0});R.setService=R.findService=R.getDefaultServiceConfig=R.getServiceConfig=void 0;const Oe=wt(Ht),Ue=wt(Ft),Te=Et,{NODE_SERVICES:W}=Ue.default,Z={},ct=t=>{Z[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};R.setService=ct;ct({name:"auth",schema:Te.authConfigSchema,default:{}});Z[W.AUTH_SERVICE]={...Z[W.AUTH],meta:{...Z[W.AUTH].meta,name:W.AUTH_SERVICE}};const Rt=t=>{if(!t)throw new Error("service name should not be empty");const e=Z[t];if(!e)throw new Error(`service ${t} does not exist`);return e},Pt=(t,e,{validate:i}={})=>{const r=Rt(t),s=(0,Oe.default)(e||{}),{value:a,error:p}=r.validate(s);if(i&&p)throw new Error(`Invalid blocklet service config: ${p.details.map(c=>c.message).join(", ")}`);return a};R.getServiceConfig=Pt;const It=t=>{const{defaultConfig:e}=Rt(t);return e};R.getDefaultServiceConfig=It;const Ot=(t,e)=>{const i=[e];return e===W.AUTH&&i.push(W.AUTH_SERVICE),(t||[]).find(r=>i.includes(r.name))};R.findService=Ot;R.default={getServiceConfig:Pt,getDefaultServiceConfig:It,findService:Ot,setService:ct};Object.defineProperty(B,"__esModule",{value:!0});B.fixAndValidateService=B.validateMeta=void 0;const De=Et,Le=R,Me=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(i=>{i.config=(0,Le.getServiceConfig)(i.name,i.config,{validate:!0})})}),t);B.fixAndValidateService=Me;const Ut=(t,{ensureFiles:e=!1,ensureDist:i=!1,ensureComponentStore:r=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:p={}}={})=>{const c=(0,De.createBlockletSchema)(null,{ensureFiles:e,ensureDist:i,ensureComponentStore:r,ensureName:s,skipValidateDidName:a,...p}),{value:g,error:x}=c.validate(t);if(x)throw new Error(`Invalid blocklet meta: ${x.details.map(f=>f.message).join(", ")}`);return g};B.validateMeta=Ut;B.default=Ut;(function(t){var e=P&&P.__createBinding||(Object.create?function(n,o,d,_){_===void 0&&(_=d);var v=Object.getOwnPropertyDescriptor(o,d);(!v||("get"in v?!o.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return o[d]}}),Object.defineProperty(n,_,v)}:function(n,o,d,_){_===void 0&&(_=d),n[_]=o[d]}),i=P&&P.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),r=P&&P.__importStar||function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var d in n)d!=="default"&&Object.prototype.hasOwnProperty.call(n,d)&&e(o,n,d);return i(o,n),o},s=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(Gt),p=r(Ie),c=Wt,g=B;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return g.fixAndValidateService}});const x=se,f=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=c.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=f;const S=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=p.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=S;const h=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=h;const H=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=H;const C=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=C;const A=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(d=>{Array.isArray(n[d])&&(n[d]=n[d].map(o))}),n),V=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",d=n.url||n.web,_=d?` (${d})`:"",v=n.email||n.mail,y=v?` <${v}>`:"";return o+y+_};t.formatPerson=V;const T=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),d=n.match(/\(([^)]+)\)/),_=n.match(/<([^>]+)>/),v={};return o&&o[0].trim()&&(v.name=o[0].trim()),_&&([,v.email]=_),d&&([,v.url]=d),v};t.parsePerson=T;const F=n=>(A(n,V),A(n,T),n);t.fixPerson=F;const E=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(y=>{y.type===c.BLOCKLET_INTERFACE_TYPE_WEB&&(y.protocol="http")}),n;const _=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?c.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",v=({type:y="web",name:Y,path:tt="/",protocol:et="http",port:it=c.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:y,name:Y,path:tt,prefix:_,port:it,protocol:et})};return[c.BLOCKLET_INTERFACE_PUBLIC].forEach(y=>{n[y]&&v({name:y,path:n[y]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(y=>{v({type:"service",name:y.protocol,protocol:y.protocol,port:{internal:`BLOCKLET_${y.protocol}_PORT`.toUpperCase(),external:y.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=E;const z=n=>{const{did:o}=n;try{(0,x.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:f,fixRepository:S,fixFiles:h,fixKeywords:H,fixPerson:F,fixTags:C,fixName:z,formatPerson:V,parsePerson:T,fixInterfaces:E,fixService:g.fixAndValidateService}})(_t);function Tt({owner:t,locale:e}){return m.jsxs(qt,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?m.jsx(Kt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Tt.propTypes={owner:O.object.isRequired,locale:O.string.isRequired};function Dt({defaultUrl:t,onCancel:e,onSuccess:i,onError:r,mode:s,handleText:a}){const{api:p}=Vt(),{api:c}=zt(),[g,x]=D.useState(!1),[f,S]=D.useState(""),{t:h,locale:H}=Yt(),C={dist:{}},[A,V]=D.useState(t),[T,F]=D.useState(t?1:0),[E,z]=D.useState(C),[n,o]=D.useState(!1),[d,_]=D.useState({}),v=s==="component",y=v?!0:!t,Y=async()=>{z(C),S(null),x(!0);try{const u=decodeURIComponent(A.trim());try{new URL(u)}catch{throw new Error("Invalid URL")}const{meta:rt,inStore:$t,registryUrl:Nt}=await p.getBlockletMetaFromUrl({input:{url:u}});z(rt),_({inStore:$t,registryUrl:Nt,inputUrl:A.trim()})}catch(u){console.error(u);const rt=`Blocklet Install failed: ${re(u)}`;S(rt),r(u)}finally{x(!1)}},tt=()=>{if(v){i({meta:E,...d}),e();return}x(!0),o(!0)},et=()=>{x(!1),o(!1),i({meta:E,...d}),e()},it=()=>{x(!1),o(!1)};D.useEffect(()=>{t&&Y()},[t]);const Lt=[{name:h("common.name"),value:Xt.getDisplayName({meta:E},!0)},{name:h("common.version"),value:E.version},{name:h("common.did"),value:m.jsx(Jt,{did:E.did})},{name:h("common.author"),value:E.owner?m.jsx(Tt,{owner:E.owner,locale:H}):_t.formatPerson(E.author)},{name:h("blocklet.dist.downloadLink"),value:E.dist.tarball}],Mt=()=>g?m.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:m.jsx(pt,{})}):E.did?m.jsx("div",{style:{paddingLeft:"10%"},children:Lt.map(u=>u.name===h("common.did")?m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,nameFormatter:()=>h("common.did"),children:u.value},u.name):m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.name))}):null,ut=[{label:h("blocklet.fromUrl.step0"),body:m.jsx(Qt,{component:"div",children:m.jsx(oe,{label:h("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:h("blocklet.fromUrl.description"),value:A,onChange:u=>{S(null),V(u.target.value)},disabled:g,onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),Y(),F(1))}})}),cancel:h("common.cancel"),confirm:h("common.next"),onCancel:e,onConfirm:()=>{Y(),F(1)}},{label:h("blocklet.fromUrl.step1"),body:Mt(),cancel:h(y?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||h("blocklet.fromUrl.confirm"),onCancel:()=>{y?F(u=>u-1):e()},onConfirm:()=>{tt()}}],L=ut[T];return m.jsxs(m.Fragment,{children:[m.jsxs(Zt,{title:(a==null?void 0:a.title)||h("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>L.onCancel(),showCloseButton:T===0,disableEscapeKeyDown:!0,open:!0,actions:m.jsxs(m.Fragment,{children:[L.cancel&&m.jsx(ft,{onClick:u=>{u.stopPropagation(),S(null),L.onCancel()},color:"inherit",children:L.cancel||h("common.cancel")}),m.jsxs(ft,{onClick:u=>{u.stopPropagation(),L.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:g||!A||f,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[g&&T===0&&m.jsx(pt,{size:16}),L.confirm]})]}),children:[y&&m.jsx(ae,{alternativeLabel:!0,activeStep:T,children:ut.map(({label:u})=>m.jsx(le,{children:m.jsx(he,{children:u})},u))}),m.jsx(kt,{component:"div",style:{marginTop:24},children:L.body}),!!f&&m.jsx(te,{severity:"error",style:{width:"100%",marginTop:8},children:f})]}),E&&n&&m.jsx(ee,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:c.get,checkTimeout:5*60*1e3,onSuccess:et,extraParams:{title:E.title,wt:ie(E),blockletMetaUrl:decodeURIComponent(A.trim())},messages:{title:h("setup.keyPair.title"),scan:h("setup.keyPair.scan"),confirm:h("setup.keyPair.confirm"),success:h("setup.keyPair.success")},onClose:it})]})}Dt.propTypes={defaultUrl:O.string,onCancel:O.func.isRequired,onSuccess:O.func.isRequired,onError:O.func,mode:O.oneOf(["install","component"]),handleText:O.object};Dt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{ce as B,Dt as I,Tt as a,_t as f};
1
+ import{P as O,j as m,dC as Bt,cN as P,dD as Ft,F as Ht,dE as Gt,b as Wt,O as qt,dF as Kt,bl as Vt,t as zt,r as D,q as Yt,M as Xt,W as Jt,m as Qt,D as Zt,B as ft,C as pt,w as kt,J as te,x as ee,bm as ie,K as re}from"./index-DhKEzK4G.js";import{W as ne}from"./tag-s8n8kLNC.js";import{s as Et,n as se}from"./schema-CHbqUY8n.js";import{I as mt}from"./index-B4uBhVoZ.js";import{T as oe}from"./TextField-UIj7bh4L.js";import{S as ae,a as le,b as he}from"./Stepper-CyP9t2tf.js";function ce({mode:t,...e}){return t==="development"?m.jsx(ne,{type:"primary",...e,children:"DEV"}):null}ce.propTypes={mode:O.string.isRequired};var _t={},ht={exports:{}},jt={exports:{}},X=jt.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+St(t)}}},gt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:St};Object.keys(X).forEach(function(t){Object.keys(gt).forEach(function(e){X[t][e]||(X[t][e]=gt[e])}),X[t].protocols_re=RegExp("^("+X[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function St(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var Ct=jt.exports,dt=Ct,q=Object.assign||function(e,i){if(i===null||typeof i!="object")return e;const r=Object.keys(i);let s=r.length;for(;s--;)e[r[s]]=i[r[s]];return e},ue=j;function j(t,e,i,r,s,a,p){var c=this;c.type=t,Object.keys(dt[t]).forEach(function(g){c[g]=dt[t][g]}),c.user=e,c.auth=i,c.project=r,c.committish=s,c.default=a,c.opts=p||{}}j.prototype.hash=function(){return this.committish?"#"+this.committish:""};j.prototype._fill=function(t,e){if(t){var i=q({},e);i.path=i.path?i.path.replace(/^[/]+/g,""):"",e=q(q({},this.opts),e);var r=this;Object.keys(this).forEach(function(f){r[f]!=null&&i[f]==null&&(i[f]=r[f])});var s=i.auth,a=i.committish,p=i.fragment,c=i.path,g=i.project;Object.keys(i).forEach(function(f){var S=i[f];(f==="path"||f==="project")&&typeof S=="string"?i[f]=S.split("/").map(function(h){return encodeURIComponent(h)}).join("/"):f!=="domain"&&(i[f]=encodeURIComponent(S))}),i["auth@"]=s?s+"@":"",i["#fragment"]=p?"#"+this.hashformat(p):"",i.fragment=i.fragment?i.fragment:"",i["#path"]=c?"#"+this.hashformat(c):"",i["/path"]=i.path?"/"+i.path:"",i.projectPath=g.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(i["#committish"]="",i["/tree/committish"]="",i["/committish"]="",i.committish=""):(i["#committish"]=a?"#"+a:"",i["/tree/committish"]=i.committish?"/"+i.treepath+"/"+i.committish:"",i["/committish"]=i.committish?"/"+i.committish:"",i.committish=i.committish||"master");var x=t;return Object.keys(i).forEach(function(f){x=x.replace(new RegExp("[{]"+f+"[}]","g"),i[f])}),e.noGitPlus?x.replace(/^git[+]/,""):x}};j.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};j.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};j.prototype.browse=function(t,e,i){return typeof t=="string"?(typeof e!="string"&&(i=e,e=null),this._fill(this.browsefiletemplate,q({fragment:e,path:t},i))):this._fill(this.browsetemplate,t)};j.prototype.docs=function(t){return this._fill(this.docstemplate,t)};j.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};j.prototype.https=function(t){return this._fill(this.httpstemplate,t)};j.prototype.git=function(t){return this._fill(this.gittemplate,t)};j.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};j.prototype.path=function(t){return this._fill(this.pathtemplate,t)};j.prototype.tarball=function(t){var e=q({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};j.prototype.file=function(t,e){return this._fill(this.filetemplate,q({path:t},e))};j.prototype.getDefaultRepresentation=function(){return this.default};j.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var nt,vt;function fe(){return vt||(vt=1,nt=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),nt}var pe=l;l.Node=$;l.create=l;function l(t){var e=this;if(e instanceof l||(e=new l),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var i=0,r=arguments.length;i<r;i++)e.push(arguments[i]);return e}l.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,i=t.prev;return e&&(e.prev=i),i&&(i.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,e};l.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};l.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};l.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)ge(this,arguments[t]);return this.length};l.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)de(this,arguments[t]);return this.length};l.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};l.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};l.prototype.forEach=function(t,e){e=e||this;for(var i=this.head,r=0;i!==null;r++)t.call(e,i.value,r,this),i=i.next};l.prototype.forEachReverse=function(t,e){e=e||this;for(var i=this.tail,r=this.length-1;i!==null;r--)t.call(e,i.value,r,this),i=i.prev};l.prototype.get=function(t){for(var e=0,i=this.head;i!==null&&e<t;e++)i=i.next;if(e===t&&i!==null)return i.value};l.prototype.getReverse=function(t){for(var e=0,i=this.tail;i!==null&&e<t;e++)i=i.prev;if(e===t&&i!==null)return i.value};l.prototype.map=function(t,e){e=e||this;for(var i=new l,r=this.head;r!==null;)i.push(t.call(e,r.value,this)),r=r.next;return i};l.prototype.mapReverse=function(t,e){e=e||this;for(var i=new l,r=this.tail;r!==null;)i.push(t.call(e,r.value,this)),r=r.prev;return i};l.prototype.reduce=function(t,e){var i,r=this.head;if(arguments.length>1)i=e;else if(this.head)r=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;r!==null;s++)i=t(i,r.value,s),r=r.next;return i};l.prototype.reduceReverse=function(t,e){var i,r=this.tail;if(arguments.length>1)i=e;else if(this.tail)r=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;r!==null;s--)i=t(i,r.value,s),r=r.prev;return i};l.prototype.toArray=function(){for(var t=new Array(this.length),e=0,i=this.head;i!==null;e++)t[e]=i.value,i=i.next;return t};l.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,i=this.tail;i!==null;e++)t[e]=i.value,i=i.prev;return t};l.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(;s!==null&&r<e;r++,s=s.next)i.push(s.value);return i};l.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var i=new l;if(e<t||e<0)return i;t<0&&(t=0),e>this.length&&(e=this.length);for(var r=this.length,s=this.tail;s!==null&&r>e;r--)s=s.prev;for(;s!==null&&r>t;r--,s=s.prev)i.push(s.value);return i};l.prototype.splice=function(t,e,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var r=0,s=this.head;s!==null&&r<t;r++)s=s.next;for(var a=[],r=0;s&&r<e;r++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var r=0;r<i.length;r++)s=me(this,s,i[r]);return a};l.prototype.reverse=function(){for(var t=this.head,e=this.tail,i=t;i!==null;i=i.prev){var r=i.prev;i.prev=i.next,i.next=r}return this.head=e,this.tail=t,this};function me(t,e,i){var r=e===t.head?new $(i,null,e,t):new $(i,e,e.next,t);return r.next===null&&(t.tail=r),r.prev===null&&(t.head=r),t.length++,r}function ge(t,e){t.tail=new $(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function de(t,e){t.head=new $(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function $(t,e,i,r){if(!(this instanceof $))return new $(t,e,i,r);this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{fe()(l)}catch{}const ve=pe,M=Symbol("max"),U=Symbol("length"),G=Symbol("lengthCalculator"),Q=Symbol("allowStale"),N=Symbol("maxAge"),I=Symbol("dispose"),yt=Symbol("noDisposeOnSet"),b=Symbol("lruList"),w=Symbol("cache"),At=Symbol("updateAgeOnGet"),st=()=>1;class ye{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[M]=e.max||1/0;const i=e.length||st;if(this[G]=typeof i!="function"?st:i,this[Q]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[N]=e.maxAge||0,this[I]=e.dispose,this[yt]=e.noDisposeOnSet||!1,this[At]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[M]=e||1/0,J(this)}get max(){return this[M]}set allowStale(e){this[Q]=!!e}get allowStale(){return this[Q]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[N]=e,J(this)}get maxAge(){return this[N]}set lengthCalculator(e){typeof e!="function"&&(e=st),e!==this[G]&&(this[G]=e,this[U]=0,this[b].forEach(i=>{i.length=this[G](i.value,i.key),this[U]+=i.length})),J(this)}get lengthCalculator(){return this[G]}get length(){return this[U]}get itemCount(){return this[b].length}rforEach(e,i){i=i||this;for(let r=this[b].tail;r!==null;){const s=r.prev;bt(this,e,r,i),r=s}}forEach(e,i){i=i||this;for(let r=this[b].head;r!==null;){const s=r.next;bt(this,e,r,i),r=s}}keys(){return this[b].toArray().map(e=>e.key)}values(){return this[b].toArray().map(e=>e.value)}reset(){this[I]&&this[b]&&this[b].length&&this[b].forEach(e=>this[I](e.key,e.value)),this[w]=new Map,this[b]=new ve,this[U]=0}dump(){return this[b].map(e=>k(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[b]}set(e,i,r){if(r=r||this[N],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0,a=this[G](i,e);if(this[w].has(e)){if(a>this[M])return K(this,this[w].get(e)),!1;const g=this[w].get(e).value;return this[I]&&(this[yt]||this[I](e,g.value)),g.now=s,g.maxAge=r,g.value=i,this[U]+=a-g.length,g.length=a,this.get(e),J(this),!0}const p=new be(e,i,a,s,r);return p.length>this[M]?(this[I]&&this[I](e,i),!1):(this[U]+=p.length,this[b].unshift(p),this[w].set(e,this[b].head),J(this),!0)}has(e){if(!this[w].has(e))return!1;const i=this[w].get(e).value;return!k(this,i)}get(e){return ot(this,e,!0)}peek(e){return ot(this,e,!1)}pop(){const e=this[b].tail;return e?(K(this,e),e.value):null}del(e){K(this,this[w].get(e))}load(e){this.reset();const i=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const p=a-i;p>0&&this.set(s.k,s.v,p)}}}prune(){this[w].forEach((e,i)=>ot(this,i,!1))}}const ot=(t,e,i)=>{const r=t[w].get(e);if(r){const s=r.value;if(k(t,s)){if(K(t,r),!t[Q])return}else i&&(t[At]&&(r.value.now=Date.now()),t[b].unshiftNode(r));return s.value}},k=(t,e)=>{if(!e||!e.maxAge&&!t[N])return!1;const i=Date.now()-e.now;return e.maxAge?i>e.maxAge:t[N]&&i>t[N]},J=t=>{if(t[U]>t[M])for(let e=t[b].tail;t[U]>t[M]&&e!==null;){const i=e.prev;K(t,e),e=i}},K=(t,e)=>{if(e){const i=e.value;t[I]&&t[I](i.key,i.value),t[U]-=i.length,t[w].delete(i.key),t[b].removeNode(e)}};class be{constructor(e,i,r,s,a){this.key=e,this.value=i,this.length=r,this.now=s,this.maxAge=a||0}}const bt=(t,e,i,r)=>{let s=i.value;k(t,s)&&(K(t,i),t[Q]||(s=void 0)),s&&e.call(r,s.value,s.key,t)};var xe=ye,lt=Bt,xt=Ct,Ee=ht.exports=ue,_e=xe,at=new _e({max:1e3}),je={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function Se(t){return je[t]||t.slice(0,-1)}var Ce={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};ht.exports.fromUrl=function(t,e){if(typeof t=="string"){var i=t+JSON.stringify(e||{});return at.has(i)||at.set(i,Ae(t,e)),at.get(i)}};function Ae(t,e){if(!(t==null||t==="")){var i=Re(we(t)?"github:"+t:t),r=Pe(i),s=i.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(xt).map(function(p){try{var c=xt[p],g=null;r.auth&&Ce[r.protocol]&&(g=r.auth);var x=r.hash?decodeURIComponent(r.hash.substr(1)):null,f=null,S=null,h=null;if(s&&s[1]===p)f=s[2]&&decodeURIComponent(s[2]),S=decodeURIComponent(s[3].replace(/\.git$/,"")),h="shortcut";else{if(r.host&&r.host!==c.domain&&r.host.replace(/^www[.]/,"")!==c.domain||!c.protocols_re.test(r.protocol)||!r.path)return;var F=c.pathmatch,C=r.path.match(F);if(!C)return;C[1]!==null&&C[1]!==void 0&&(f=decodeURIComponent(C[1].replace(/^:/,""))),S=decodeURIComponent(C[2]),h=Se(r.protocol)}return new Ee(p,f,g,S,x,h,e)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(p){return p});if(a.length===1)return a[0]}}function we(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Re(t){var e=lt.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Pe(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var i=lt.parse(t);if(i.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var r=new lt.URL(s[0]);i.auth=r.username||"",r.password&&(i.auth+=":"+r.password)}}return i}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var Ie=ht.exports,B={},R={},wt=P&&P.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R,"__esModule",{value:!0});R.setService=R.findService=R.getDefaultServiceConfig=R.getServiceConfig=void 0;const Oe=wt(Ft),Ue=wt(Ht),Te=Et,{NODE_SERVICES:W}=Ue.default,Z={},ct=t=>{Z[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};R.setService=ct;ct({name:"auth",schema:Te.authConfigSchema,default:{}});Z[W.AUTH_SERVICE]={...Z[W.AUTH],meta:{...Z[W.AUTH].meta,name:W.AUTH_SERVICE}};const Rt=t=>{if(!t)throw new Error("service name should not be empty");const e=Z[t];if(!e)throw new Error(`service ${t} does not exist`);return e},Pt=(t,e,{validate:i}={})=>{const r=Rt(t),s=(0,Oe.default)(e||{}),{value:a,error:p}=r.validate(s);if(i&&p)throw new Error(`Invalid blocklet service config: ${p.details.map(c=>c.message).join(", ")}`);return a};R.getServiceConfig=Pt;const It=t=>{const{defaultConfig:e}=Rt(t);return e};R.getDefaultServiceConfig=It;const Ot=(t,e)=>{const i=[e];return e===W.AUTH&&i.push(W.AUTH_SERVICE),(t||[]).find(r=>i.includes(r.name))};R.findService=Ot;R.default={getServiceConfig:Pt,getDefaultServiceConfig:It,findService:Ot,setService:ct};Object.defineProperty(B,"__esModule",{value:!0});B.fixAndValidateService=B.validateMeta=void 0;const De=Et,Le=R,Me=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(i=>{i.config=(0,Le.getServiceConfig)(i.name,i.config,{validate:!0})})}),t);B.fixAndValidateService=Me;const Ut=(t,{ensureFiles:e=!1,ensureDist:i=!1,ensureComponentStore:r=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:p={}}={})=>{const c=(0,De.createBlockletSchema)(null,{ensureFiles:e,ensureDist:i,ensureComponentStore:r,ensureName:s,skipValidateDidName:a,...p}),{value:g,error:x}=c.validate(t);if(x)throw new Error(`Invalid blocklet meta: ${x.details.map(f=>f.message).join(", ")}`);return g};B.validateMeta=Ut;B.default=Ut;(function(t){var e=P&&P.__createBinding||(Object.create?function(n,o,d,_){_===void 0&&(_=d);var v=Object.getOwnPropertyDescriptor(o,d);(!v||("get"in v?!o.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return o[d]}}),Object.defineProperty(n,_,v)}:function(n,o,d,_){_===void 0&&(_=d),n[_]=o[d]}),i=P&&P.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),r=P&&P.__importStar||function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var d in n)d!=="default"&&Object.prototype.hasOwnProperty.call(n,d)&&e(o,n,d);return i(o,n),o},s=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(Gt),p=r(Ie),c=Wt,g=B;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return g.fixAndValidateService}});const x=se,f=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=c.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=f;const S=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=p.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=S;const h=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=h;const F=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=F;const C=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=C;const A=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(d=>{Array.isArray(n[d])&&(n[d]=n[d].map(o))}),n),V=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",d=n.url||n.web,_=d?` (${d})`:"",v=n.email||n.mail,y=v?` <${v}>`:"";return o+y+_};t.formatPerson=V;const T=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),d=n.match(/\(([^)]+)\)/),_=n.match(/<([^>]+)>/),v={};return o&&o[0].trim()&&(v.name=o[0].trim()),_&&([,v.email]=_),d&&([,v.url]=d),v};t.parsePerson=T;const H=n=>(A(n,V),A(n,T),n);t.fixPerson=H;const E=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(y=>{y.type===c.BLOCKLET_INTERFACE_TYPE_WEB&&(y.protocol="http")}),n;const _=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?c.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",v=({type:y="web",name:Y,path:tt="/",protocol:et="http",port:it=c.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:y,name:Y,path:tt,prefix:_,port:it,protocol:et})};return[c.BLOCKLET_INTERFACE_PUBLIC].forEach(y=>{n[y]&&v({name:y,path:n[y]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(y=>{v({type:"service",name:y.protocol,protocol:y.protocol,port:{internal:`BLOCKLET_${y.protocol}_PORT`.toUpperCase(),external:y.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=E;const z=n=>{const{did:o}=n;try{(0,x.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:f,fixRepository:S,fixFiles:h,fixKeywords:F,fixPerson:H,fixTags:C,fixName:z,formatPerson:V,parsePerson:T,fixInterfaces:E,fixService:g.fixAndValidateService}})(_t);function Tt({owner:t,locale:e}){return m.jsxs(qt,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?m.jsx(Kt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Tt.propTypes={owner:O.object.isRequired,locale:O.string.isRequired};function Dt({defaultUrl:t,onCancel:e,onSuccess:i,onError:r,mode:s,handleText:a}){const{api:p}=Vt(),{api:c}=zt(),[g,x]=D.useState(!1),[f,S]=D.useState(""),{t:h,locale:F}=Yt(),C={dist:{}},[A,V]=D.useState(t),[T,H]=D.useState(t?1:0),[E,z]=D.useState(C),[n,o]=D.useState(!1),[d,_]=D.useState({}),v=s==="component",y=v?!0:!t,Y=async()=>{z(C),S(null),x(!0);try{const u=decodeURIComponent(A.trim());try{new URL(u)}catch{throw new Error("Invalid URL")}const{meta:rt,inStore:Nt,registryUrl:$t}=await p.getBlockletMetaFromUrl({input:{url:u}});z(rt),_({inStore:Nt,registryUrl:$t,inputUrl:A.trim()})}catch(u){console.error(u);const rt=`Blocklet Install failed: ${re(u)}`;S(rt),r(u)}finally{x(!1)}},tt=()=>{if(v){i({meta:E,...d}),e();return}x(!0),o(!0)},et=()=>{x(!1),o(!1),i({meta:E,...d}),e()},it=()=>{x(!1),o(!1)};D.useEffect(()=>{t&&Y()},[t]);const Lt=[{name:h("common.name"),value:Xt.getDisplayName({meta:E},!0)},{name:h("common.version"),value:E.version},{name:h("common.did"),value:m.jsx(Jt,{did:E.did})},{name:h("common.author"),value:E.owner?m.jsx(Tt,{owner:E.owner,locale:F}):_t.formatPerson(E.author)},{name:h("blocklet.dist.downloadLink"),value:E.dist.tarball}],Mt=()=>g?m.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:m.jsx(pt,{})}):E.did?m.jsx("div",{style:{paddingLeft:"10%"},children:Lt.map(u=>u.name===h("common.did")?m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,nameFormatter:()=>h("common.did"),children:u.value},u.name):m.jsx(mt,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.name))}):null,ut=[{label:h("blocklet.fromUrl.step0"),body:m.jsx(Qt,{component:"div",children:m.jsx(oe,{label:h("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:h("blocklet.fromUrl.description"),value:A,onChange:u=>{S(null),V(u.target.value)},disabled:g,onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),Y(),H(1))}})}),cancel:h("common.cancel"),confirm:h("common.next"),onCancel:e,onConfirm:()=>{Y(),H(1)}},{label:h("blocklet.fromUrl.step1"),body:Mt(),cancel:h(y?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||h("blocklet.fromUrl.confirm"),onCancel:()=>{y?H(u=>u-1):e()},onConfirm:()=>{tt()}}],L=ut[T];return m.jsxs(m.Fragment,{children:[m.jsxs(Zt,{title:(a==null?void 0:a.title)||h("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>L.onCancel(),showCloseButton:T===0,disableEscapeKeyDown:!0,open:!0,actions:m.jsxs(m.Fragment,{children:[L.cancel&&m.jsx(ft,{onClick:u=>{u.stopPropagation(),S(null),L.onCancel()},color:"inherit",children:L.cancel||h("common.cancel")}),m.jsxs(ft,{onClick:u=>{u.stopPropagation(),L.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:g||!A||f,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[g&&T===0&&m.jsx(pt,{size:16}),L.confirm]})]}),children:[y&&m.jsx(ae,{alternativeLabel:!0,activeStep:T,children:ut.map(({label:u})=>m.jsx(le,{children:m.jsx(he,{children:u})},u))}),m.jsx(kt,{component:"div",style:{marginTop:24},children:L.body}),!!f&&m.jsx(te,{severity:"error",style:{width:"100%",marginTop:8},children:f})]}),E&&n&&m.jsx(ee,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:c.get,checkTimeout:5*60*1e3,onSuccess:et,extraParams:{title:E.title,wt:ie(E),blockletMetaUrl:decodeURIComponent(A.trim())},messages:{title:h("setup.keyPair.title"),scan:h("setup.keyPair.scan"),confirm:h("setup.keyPair.confirm"),success:h("setup.keyPair.success")},onClose:it})]})}Dt.propTypes={defaultUrl:O.string,onCancel:O.func.isRequired,onSuccess:O.func.isRequired,onError:O.func,mode:O.oneOf(["install","component"]),handleText:O.object};Dt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{ce as B,Dt as I,Tt as a,_t as f};
@@ -1,4 +1,4 @@
1
- import{bK as T,j as i,P as r,n as f,r as m,f as $,D as F,cA as H,q as j,t as U,aO as E,cB as M,ci as P,a1 as O,cC as B,cD as V,cE as K,cq as W,cF as I,cG as N,as as z,O as L,ch as X,C as G}from"./index-ZGnAW8k-.js";import{R as J}from"./index-DbPVOvSO.js";import{C as A}from"./index-C1yo1XnB.js";import{d as Y}from"./CheckCircle-SQxexLA6.js";import{w as Q}from"./wrap-locale-BSVVLHW0.js";const Z=T(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext($),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),s=m.useCallback(()=>{o(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(ee,{children:i.jsx("div",{className:"invite-passport__card",onClick:x,children:i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})})}),i.jsx(F,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:s,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>i.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(Z,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
1
+ import{bJ as $,j as i,P as r,n as f,r as m,f as q,D as H,q as j,t as U,aO as E,cz as F,ch as P,a1 as M,cA as O,cB as B,cC as V,cp as J,cD as S,cE as N,as as z,O as L,cg as W,C as X}from"./index-DhKEzK4G.js";import{R as Y}from"./index-B_W7z3II.js";import{C as A}from"./index-lU5qXZaf.js";import{b as G}from"./sdk-BNPz4UBQ.js";import{d as K}from"./CheckCircle-D2TmcEFh.js";import{w as Q}from"./wrap-locale-B0GJBc6u.js";const Z=$(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function b({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(q),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),s=m.useCallback(()=>{o(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(ee,{children:i.jsx("div",{className:"invite-passport__card",onClick:x,children:i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})})}),i.jsx(H,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:s,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>i.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(Z,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:t("invite.emptyPermission")})]})})]})}b.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};b.defaultProps={passportColor:"auto"};const ee=f.div`
2
2
  display: flex;
3
3
  max-width: 350px;
4
4
  margin: 30px auto;
@@ -39,7 +39,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as F,cA as H,q as j,t as U,a
39
39
  line-height: 18px;
40
40
  color: ${({theme:e})=>e.palette.primary.main};
41
41
  }
42
- `,ie=new H;function R({invitation:e,onLogin:a,onReceive:c,inService:p,action:o}){var g;const{t,locale:l}=j(),{connectApi:u}=U(),{getPassportId:x}=W();let s;typeof window<"u"&&(s=(g=window==null?void 0:window.blocklet)==null?void 0:g.componentId);const n=E({loading:!1,extraParams:{baseUrl:window.location.origin,componentId:s,sourceAppPid:(e==null?void 0:e.sourceAppPid)||null}});M(async()=>{var v;const d=x();if(d&&(n.extraParams.passportId=d),o==="invite"?n.extraParams.inviteId=e.inviteId:o==="issue-passport"&&(n.extraParams.id=e.inviteId),p&&((v=e==null?void 0:e.receiver)!=null&&v.did)){n.loading=!0;try{const y=await ie.user.getUserPublicInfo({did:e.receiver.did});y!=null&&y.sourceAppPid&&(n.extraParams.sourceAppPid=y.sourceAppPid)}finally{n.loading=!1}}});const _=P(()=>{u.close()}),h=P((...d)=>{u.close(),a(...d)}),w=P(()=>{var d,v;if(typeof c=="function"){c();return}p?u.openPopup({action:o,className:"connect",forceConnected:((d=e==null?void 0:e.receiver)==null?void 0:d.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:{provider:"wallet",...n.extraParams},baseUrl:window.location.origin,prefix:O(window.location.origin,V,B),messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_},{locale:l}):u.open({action:o,className:"connect",forceConnected:((v=e==null?void 0:e.receiver)==null?void 0:v.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:n.extraParams,messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_})});return i.jsxs(se,{children:[i.jsx(A,{loading:n.loading,size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:w,children:t("invite.receive")}),i.jsxs("div",{className:"invite-receive__until",children:[t("invite.validUntil"),K(e.expireDate,l)]})]})}R.propTypes={invitation:r.object.isRequired,onLogin:r.func,onReceive:r.func,inService:r.bool,action:r.oneOf(["invite","issue-passport"])};R.defaultProps={onLogin:()=>{},onReceive:null,inService:!1,action:"invite"};const se=f.div`
42
+ `;function R({invitation:e,onLogin:a,onReceive:c,inService:p,action:o}){var g;const{t,locale:l}=j(),{connectApi:u}=U(),{getPassportId:x}=J();let s;typeof window<"u"&&(s=(g=window==null?void 0:window.blocklet)==null?void 0:g.componentId);const n=E({loading:!1,extraParams:{baseUrl:window.location.origin,componentId:s,sourceAppPid:(e==null?void 0:e.sourceAppPid)||null}});F(async()=>{var v;const d=x();if(d&&(n.extraParams.passportId=d),o==="invite"?n.extraParams.inviteId=e.inviteId:o==="issue-passport"&&(n.extraParams.id=e.inviteId),p&&((v=e==null?void 0:e.receiver)!=null&&v.did)){n.loading=!0;try{const y=await G.user.getUserPublicInfo({did:e.receiver.did});y!=null&&y.sourceAppPid&&(n.extraParams.sourceAppPid=y.sourceAppPid)}finally{n.loading=!1}}});const _=P(()=>{u.close()}),h=P((...d)=>{u.close(),a(...d)}),w=P(()=>{var d,v;if(typeof c=="function"){c();return}p?u.openPopup({action:o,className:"connect",forceConnected:((d=e==null?void 0:e.receiver)==null?void 0:d.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:{provider:"wallet",...n.extraParams},baseUrl:window.location.origin,prefix:M(window.location.origin,B,O),messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_},{locale:l}):u.open({action:o,className:"connect",forceConnected:((v=e==null?void 0:e.receiver)==null?void 0:v.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:n.extraParams,messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_})});return i.jsxs(ie,{children:[i.jsx(A,{loading:n.loading,size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:w,children:t("invite.receive")}),i.jsxs("div",{className:"invite-receive__until",children:[t("invite.validUntil"),V(e.expireDate,l)]})]})}R.propTypes={invitation:r.object.isRequired,onLogin:r.func,onReceive:r.func,inService:r.bool,action:r.oneOf(["invite","issue-passport"])};R.defaultProps={onLogin:()=>{},onReceive:null,inService:!1,action:"invite"};const ie=f.div`
43
43
  text-align: center;
44
44
  .invite-receive__logo-wrapper {
45
45
  display: inline-flex;
@@ -74,7 +74,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as F,cA as H,q as j,t as U,a
74
74
  .invite-receive__link {
75
75
  color: ${({theme:e})=>e.palette.primary.main};
76
76
  }
77
- `;function k({onLogin:e}){const{t:a}=j();return i.jsx(re,{children:i.jsx(A,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:()=>e(),children:a("common.connect")})})}k.propTypes={onLogin:r.func};k.defaultProps={onLogin:()=>{}};const re=f.div`
77
+ `;function k({onLogin:e}){const{t:a}=j();return i.jsx(se,{children:i.jsx(A,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:()=>e(),children:a("common.connect")})})}k.propTypes={onLogin:r.func};k.defaultProps={onLogin:()=>{}};const se=f.div`
78
78
  text-align: center;
79
79
  .invite-receive__logo-wrapper {
80
80
  display: inline-flex;
@@ -109,7 +109,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as F,cA as H,q as j,t as U,a
109
109
  .invite-receive__link {
110
110
  color: ${({theme:e})=>e.palette.primary.main};
111
111
  }
112
- `;function D({invitation:e}){const{t:a}=j(),c=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),p=m.useMemo(()=>a("invite.message",{name:"{{name}}",role:c,dapp:"{{dapp}}"}),[a,c]),o=I(e.info.chainHost,e.inviter.did,"account"),t=N(p,{name(){return o?i.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:e.inviter.fullName},"name"):e.inviter.fullName},dapp(){return i.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return i.jsxs(te,{children:[i.jsx(z,{did:e.inviter.did,src:encodeURI(e.inviter.avatar),size:80,shape:"circle",variant:"circle"}),i.jsx("div",{className:"invite-user__message",children:t})]})}D.propTypes={invitation:r.object.isRequired};const te=f.div`
112
+ `;function D({invitation:e}){const{t:a}=j(),c=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),p=m.useMemo(()=>a("invite.message",{name:"{{name}}",role:c,dapp:"{{dapp}}"}),[a,c]),o=S(e.info.chainHost,e.inviter.did,"account"),t=N(p,{name(){return o?i.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:e.inviter.fullName},"name"):e.inviter.fullName},dapp(){return i.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return i.jsxs(re,{children:[i.jsx(z,{did:e.inviter.did,src:encodeURI(e.inviter.avatar),size:80,shape:"circle",variant:"circle"}),i.jsx("div",{className:"invite-user__message",children:t})]})}D.propTypes={invitation:r.object.isRequired};const re=f.div`
113
113
  display: flex;
114
114
  flex-direction: column;
115
115
  justify-content: center;
@@ -132,7 +132,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as F,cA as H,q as j,t as U,a
132
132
  .invite-user__link {
133
133
  color: ${({theme:e})=>e.palette.primary.main};
134
134
  }
135
- `;function C({invitation:e,type:a}){const{t:c}=j(),p=m.useMemo(()=>c("invite.success",{dapp:"{{dapp}}"}),[c]),o=I(e.info.chainHost,e.inviter.did,"account"),t=a==="receiver"?e.receiver:e.inviter,l=N(p,{name(){return o?i.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:t.fullName},"name"):t.fullName},dapp(){return i.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return i.jsxs(ne,{children:[i.jsx(L,{pt:1,color:"success.main",children:i.jsx(Y,{style:{fontSize:80}})}),i.jsx("div",{className:"invite-user__message",children:l})]})}C.propTypes={invitation:r.object.isRequired,type:r.oneOf(["inviter","receiver"])};C.defaultProps={type:"inviter"};const ne=f.div`
135
+ `;function C({invitation:e,type:a}){const{t:c}=j(),p=m.useMemo(()=>c("invite.success",{dapp:"{{dapp}}"}),[c]),o=S(e.info.chainHost,e.inviter.did,"account"),t=a==="receiver"?e.receiver:e.inviter,l=N(p,{name(){return o?i.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:t.fullName},"name"):t.fullName},dapp(){return i.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return i.jsxs(te,{children:[i.jsx(L,{pt:1,color:"success.main",children:i.jsx(K,{style:{fontSize:80}})}),i.jsx("div",{className:"invite-user__message",children:l})]})}C.propTypes={invitation:r.object.isRequired,type:r.oneOf(["inviter","receiver"])};C.defaultProps={type:"inviter"};const te=f.div`
136
136
  display: flex;
137
137
  flex-direction: column;
138
138
  justify-content: center;
@@ -155,7 +155,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as F,cA as H,q as j,t as U,a
155
155
  .invite-user__link {
156
156
  color: ${({theme:e})=>e.palette.primary.main};
157
157
  }
158
- `;function q({invitation:e,...a}){return i.jsxs(oe,{...a,children:[i.jsx(z,{did:e.info.did,src:e.info.logo,style:{flexShrink:0}}),i.jsxs("div",{className:"invite-app__content",children:[i.jsx("div",{className:"invite-app__title",children:e.info.name}),i.jsx("div",{className:"invite-app__description",children:e.info.description})]})]})}q.propTypes={invitation:r.object.isRequired};const oe=f.div`
158
+ `;function T({invitation:e,...a}){return i.jsxs(ne,{...a,children:[i.jsx(z,{did:e.info.did,src:e.info.logo,style:{flexShrink:0}}),i.jsxs("div",{className:"invite-app__content",children:[i.jsx("div",{className:"invite-app__title",children:e.info.name}),i.jsx("div",{className:"invite-app__description",children:e.info.description})]})]})}T.propTypes={invitation:r.object.isRequired};const ne=f.div`
159
159
  display: flex;
160
160
  justify-content: space-between;
161
161
  align-items: center;
@@ -179,7 +179,7 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as F,cA as H,q as j,t as U,a
179
179
  color: #999;
180
180
  overflow: hidden;
181
181
  }
182
- `;function S({getDataFn:e,passportColor:a,createPassportSvg:c,onLoginSuccess:p,checkFn:o,onReceive:t,inService:l,action:u,status:x}){var w,g,d;const s=X(e);if(s!=null&&s.loading)return i.jsx(G,{});if(s!=null&&s.error)return i.jsx(J,{status:"404",title:(g=(w=s==null?void 0:s.error)==null?void 0:w.response)==null?void 0:g.data,description:""});const n=x==="success"||((d=s==null?void 0:s.data)==null?void 0:d.status)==="success",_=n?C:D,h=n?k:R;return i.jsx(ae,{className:"page-invite__wrapper",children:s!=null&&s.data?i.jsxs(i.Fragment,{children:[i.jsx(q,{invitation:s.data}),i.jsxs(L,{className:"page-invite__card",children:[i.jsx(_,{invitation:s.data}),i.jsx(b,{invitation:s.data,action:u,createPassportSvg:c,passportColor:a}),i.jsx(h,{invitation:s.data,action:u,onLogin:p,checkFn:o,onReceive:t,inService:l})]})]}):null})}S.propTypes={getDataFn:r.func.isRequired,checkFn:r.func.isRequired,createPassportSvg:r.func.isRequired,onLoginSuccess:r.func,onReceive:r.func,passportColor:r.string,inService:r.bool,action:r.oneOf(["invite","issue-passpor"]),status:r.oneOf(["success",""])};S.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1,action:"invite",status:""};const ae=f.div`
182
+ `;function I({getDataFn:e,passportColor:a,createPassportSvg:c,onLoginSuccess:p,checkFn:o,onReceive:t,inService:l,action:u,status:x}){var w,g,d;const s=W(e);if(s!=null&&s.loading)return i.jsx(X,{});if(s!=null&&s.error)return i.jsx(Y,{status:"404",title:(g=(w=s==null?void 0:s.error)==null?void 0:w.response)==null?void 0:g.data,description:""});const n=x==="success"||((d=s==null?void 0:s.data)==null?void 0:d.status)==="success",_=n?C:D,h=n?k:R;return i.jsx(oe,{className:"page-invite__wrapper",children:s!=null&&s.data?i.jsxs(i.Fragment,{children:[i.jsx(T,{invitation:s.data}),i.jsxs(L,{className:"page-invite__card",children:[i.jsx(_,{invitation:s.data}),i.jsx(b,{invitation:s.data,action:u,createPassportSvg:c,passportColor:a}),i.jsx(h,{invitation:s.data,action:u,onLogin:p,checkFn:o,onReceive:t,inService:l})]})]}):null})}I.propTypes={getDataFn:r.func.isRequired,checkFn:r.func.isRequired,createPassportSvg:r.func.isRequired,onLoginSuccess:r.func,onReceive:r.func,passportColor:r.string,inService:r.bool,action:r.oneOf(["invite","issue-passpor"]),status:r.oneOf(["success",""])};I.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1,action:"invite",status:""};const oe=f.div`
183
183
  max-width: 460px;
184
184
  max-height: 650px;
185
185
  min-height: 450px;
@@ -197,4 +197,4 @@ import{bK as T,j as i,P as r,n as f,r as m,f as $,D as F,cA as H,q as j,t as U,a
197
197
  .page-invite__app {
198
198
  margin-top: 20px;
199
199
  }
200
- `,me=Q(S);export{me as I};
200
+ `,me=Q(I);export{me as I};
@@ -0,0 +1 @@
1
+ import{aK as i,aL as o,j as s,g as u,fl as f}from"./index-DhKEzK4G.js";var e={},l=o;Object.defineProperty(e,"__esModule",{value:!0});var n=e.default=void 0,v=l(i()),d=s;n=e.default=(0,v.default)((0,d.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");const a=f;var x=(t,r)=>a(t)===a(r);const h=u(x);export{n as d,h as i};
@@ -1 +1 @@
1
- import{g as r,eV as t}from"./index-ZGnAW8k-.js";var u=t;function e(a,s){return u(a,s)}var o=e;const l=r(o);export{o as a,l as i};
1
+ import{g as r,eT as t}from"./index-DhKEzK4G.js";var u=t;function e(a,s){return u(a,s)}var o=e;const l=r(o);export{o as a,l as i};