@abtnode/webapp 1.16.54-beta-20251017-133309-7d40faa6 → 1.16.54-beta-20251021-070951-25e3083c

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 (193) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-Dmdo2xWr.js → AdapterDayjs-D4QCnIuj.js} +1 -1
  4. package/dist/assets/{Add-BtxJ9S0c.js → Add-oTaGbrkV.js} +1 -1
  5. package/dist/assets/ArrowDropDown-CcrV0tiH.js +1 -0
  6. package/dist/assets/{Autocomplete-BSxdbGZ9.js → Autocomplete-BUuiK3c9.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BQIMaSsB.js → Breadcrumbs-U8R6lbeq.js} +1 -1
  8. package/dist/assets/{ButtonGroup-zxfGLX1y.js → ButtonGroup-tq0Nh3v_.js} +1 -1
  9. package/dist/assets/{CSSTransition-BHFpNneQ.js → CSSTransition-BQVtCcwc.js} +1 -1
  10. package/dist/assets/{CallMerge-B1sQW0-H.js → CallMerge-nc7JkPt-.js} +1 -1
  11. package/dist/assets/{CardContent-BQOX_LLY.js → CardContent-BkZ_t1Fl.js} +1 -1
  12. package/dist/assets/{ChevronLeft-CjfV9O7Y.js → ChevronLeft-D3gv0InM.js} +1 -1
  13. package/dist/assets/{ChevronRight-Cq74y-86.js → ChevronRight-C0CpxIjv.js} +1 -1
  14. package/dist/assets/{Clear-CmclKblN.js → Clear-DkN0yn0u.js} +1 -1
  15. package/dist/assets/{DeleteOutline-DeY1XytP.js → DeleteOutline-BeCthgDf.js} +1 -1
  16. package/dist/assets/{Done-otpI656Q.js → Done-BATa38FZ.js} +1 -1
  17. package/dist/assets/{Edit-BLOnay32.js → Edit-CzPcXUlF.js} +1 -1
  18. package/dist/assets/{ErrorOutline-C62Ptpls.js → ErrorOutline-DtWu5p92.js} +1 -1
  19. package/dist/assets/{FilterList-5aPzs6zd.js → FilterList-B4eWQJqn.js} +1 -1
  20. package/dist/assets/{Google-B6ijzIon.js → Google-CSkH7ggo.js} +1 -1
  21. package/dist/assets/{HelpOutline-OM9v4KDS.js → HelpOutline-Chl_xTWf.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-CKtrlyfg.js → KeyboardArrowDown-B6FXB8s1.js} +1 -1
  23. package/dist/assets/{Launch-BfuKeW3b.js → Launch-C5rHIILC.js} +1 -1
  24. package/dist/assets/{Link-BD8pu5K0.js → Link-BK8YXXF_.js} +1 -1
  25. package/dist/assets/{ListItemButton-cn3fH9TW.js → ListItemButton-BBMhGYtT.js} +1 -1
  26. package/dist/assets/{ListSubheader-Ch1RovVQ.js → ListSubheader-DHUtCPFm.js} +1 -1
  27. package/dist/assets/{LoadingButton-iO4mS6KL.js → LoadingButton-9eB2P6Ae.js} +1 -1
  28. package/dist/assets/{MoreVert-CdXWMKz-.js → MoreVert-YtAOv_qU.js} +1 -1
  29. package/dist/assets/{OpenInNew-BZCBTL61.js → OpenInNew-9fXNDjB1.js} +1 -1
  30. package/dist/assets/{Refresh-BLPv71Iw.js → Refresh-BhIn23eh.js} +1 -1
  31. package/dist/assets/{Search-CbRhrT-l.js → Search-B9XObekn.js} +1 -1
  32. package/dist/assets/{Stepper-JXr6cJC3.js → Stepper-DJBQoATT.js} +1 -1
  33. package/dist/assets/{Switch-D12CiGzx.js → Switch-Z9woRMgA.js} +1 -1
  34. package/dist/assets/{TableSearch-DsuiCyEx.js → TableSearch-CaXXTSiF.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-CoPX4ob9.js → ToggleButtonGroup-C69G_-ml.js} +1 -1
  36. package/dist/assets/{UnfoldMore-DoB8mcpO.js → UnfoldMore-B6RtVFPY.js} +1 -1
  37. package/dist/assets/{Verified-CHH9KCap.js → Verified-CBlk3phN.js} +1 -1
  38. package/dist/assets/{VerifiedUser-Brzhri9f.js → VerifiedUser-BNVR_4vC.js} +1 -1
  39. package/dist/assets/{ViewList-CfykWbFF.js → ViewList-DluRK-ZS.js} +1 -1
  40. package/dist/assets/{_createAggregator-DrGf--g5.js → _createAggregator-fs1BCiws.js} +1 -1
  41. package/dist/assets/{actions-BU7VBlNr.js → actions-58eoeFLs.js} +1 -1
  42. package/dist/assets/{actions-Dq4cTCeJ.js → actions-h8RyMg_C.js} +1 -1
  43. package/dist/assets/{agreement-BbZCQgd_.js → agreement-Ci4HozUa.js} +1 -1
  44. package/dist/assets/api-CRk4bs4H.js +1 -0
  45. package/dist/assets/{appearance-xpsoTzJy.js → appearance-BD1QGImy.js} +1 -1
  46. package/dist/assets/{audit-logs-DXKfeYbe.js → audit-logs-8_e0A3IE.js} +2 -2
  47. package/dist/assets/{base-chart-C2185-Xr.js → base-chart-Clhj_sK4.js} +1 -1
  48. package/dist/assets/{blocklet--AI07_i0.js → blocklet-Dvyh8Jp4.js} +1 -1
  49. package/dist/assets/chain-B6To8QFu.js +6 -0
  50. package/dist/assets/{click-to-copy-BCe_knva.js → click-to-copy-iYXC5-cD.js} +1 -1
  51. package/dist/assets/cloneDeep-DkPlIKHp.js +1 -0
  52. package/dist/assets/{collapse-zs9NkhVG.js → collapse-DulbZhAc.js} +1 -1
  53. package/dist/assets/{config-navigation-D_6fIzEw.js → config-navigation-CsntHBE3.js} +3 -3
  54. package/dist/assets/connect-to-wJPAZmlO.js +29 -0
  55. package/dist/assets/{cssMode-B399Q_Au.js → cssMode-BVlDGH_I.js} +1 -1
  56. package/dist/assets/{delete-confirm-Bow13LE9.js → delete-confirm-CnyGQRfQ.js} +1 -1
  57. package/dist/assets/{depsEqual-DM_xCHol.js → depsEqual-BiEXsNqn.js} +1 -1
  58. package/dist/assets/{detail-IWNgMo9A.js → detail-BigelZ3g.js} +3 -3
  59. package/dist/assets/{domains-DKCOiTCg.js → domains-CTufYYmh.js} +1 -1
  60. package/dist/assets/{download-CZMq1lWW.js → download-DkusPKGH.js} +1 -1
  61. package/dist/assets/{edit.svg-MBsEEqxw.js → edit.svg-hD876CgN.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-B6zIYIHc.js +1 -0
  63. package/dist/assets/engine-3MKESjP-.js +1 -0
  64. package/dist/assets/{freemarker2-Bo8Dkz0i.js → freemarker2-CxTMoB8Q.js} +1 -1
  65. package/dist/assets/{get-safe-url-CWx4sAFH.js → get-safe-url-IgmCyB0M.js} +1 -1
  66. package/dist/assets/getValidReactChildren-CLYm2ELr.js +1 -0
  67. package/dist/assets/{graphqlMode-C-1GELPv.js → graphqlMode-8q4l0bIb.js} +2 -2
  68. package/dist/assets/{handlebars-CmlxliCw.js → handlebars-0wBSr_ad.js} +1 -1
  69. package/dist/assets/{html-YsXSD8TZ.js → html-4TvmEV0M.js} +1 -1
  70. package/dist/assets/{html-title-DV29cJ5k.js → html-title-tKNU_Rtx.js} +1 -1
  71. package/dist/assets/{htmlMode-zogUHMrG.js → htmlMode-B6CaFTU5.js} +1 -1
  72. package/dist/assets/{iframe-CJvRag0f.js → iframe-BBTvhvam.js} +1 -1
  73. package/dist/assets/index-8h4vHVX5.js +1 -0
  74. package/dist/assets/{index-CsAuzX0k.js → index-AN9pUzEg.js} +1 -1
  75. package/dist/assets/{index-CEVcCpp0.js → index-B-QQBi2O.js} +1 -1
  76. package/dist/assets/{index-B9ak8YbX.js → index-B7f4x3N4.js} +1 -1
  77. package/dist/assets/{index-B5lqoaM2.js → index-BGERz_iK.js} +3 -3
  78. package/dist/assets/{index-rDK2F6ft.js → index-BInXlR12.js} +12 -12
  79. package/dist/assets/{index-BwAtwN98.js → index-BZcXgg1f.js} +1 -1
  80. package/dist/assets/{index-BGcTTdNv.js → index-BjDvFi9X.js} +1 -1
  81. package/dist/assets/{index-Bk3_p0ot.js → index-BoS4dIYT.js} +3 -3
  82. package/dist/assets/{index-CeeztwBq.js → index-BqByO9CC.js} +1 -1
  83. package/dist/assets/{index-CO6atVP1.js → index-C0Hpfcis.js} +1 -1
  84. package/dist/assets/{index-Cklq_snV.js → index-C7T0ILpD.js} +1 -1
  85. package/dist/assets/{index-DQDQvvOo.js → index-C7j9pOMM.js} +2 -2
  86. package/dist/assets/{index-QQLsDnxc.js → index-CA1qwmXl.js} +27 -27
  87. package/dist/assets/{index-Biom0VRc.js → index-CE6VLS0y.js} +1 -1
  88. package/dist/assets/{index-2sz7KBve.js → index-CIIax0-r.js} +1 -1
  89. package/dist/assets/{index-B7g5Nk1d.js → index-CJyE0PHi.js} +1 -1
  90. package/dist/assets/{index-Ctq71AUP.js → index-COIC4mfj.js} +1 -1
  91. package/dist/assets/{index-BCTcUJyy.js → index-CQ0SkU_t.js} +1 -1
  92. package/dist/assets/{index-DnFU3fjE.js → index-CTXI0_ys.js} +1 -1
  93. package/dist/assets/{index-CwgLMaiR.js → index-CTkuAIiW.js} +1 -1
  94. package/dist/assets/{index-BFaz_KJO.js → index-CWPTsxSF.js} +1 -1
  95. package/dist/assets/{index-BTzUdfyO.js → index-Cd9nAu70.js} +3 -3
  96. package/dist/assets/{index-Cc5co79B.js → index-CufHUwTa.js} +1 -1
  97. package/dist/assets/{index-DaWRYFXy.js → index-D6IcRMv4.js} +1 -1
  98. package/dist/assets/{index-B8b0rEFF.js → index-D7deg2jT.js} +1 -1
  99. package/dist/assets/{index-DPsTv0RC.js → index-DA3_QcTQ.js} +1 -1
  100. package/dist/assets/{index-BhRJ8iUw.js → index-DAdo2_rS.js} +1 -1
  101. package/dist/assets/{index-_TZ0HsEX.js → index-DCqG9foU.js} +1 -1
  102. package/dist/assets/{index-CQwHcXdR.js → index-DDNKwY4t.js} +1 -1
  103. package/dist/assets/{index-Bsb50zao.js → index-DH8zBpZk.js} +1 -1
  104. package/dist/assets/{index-BN9KmbYU.js → index-DHbSUSDr.js} +1 -1
  105. package/dist/assets/{index-C88zwj1F.js → index-DPyAwNR3.js} +1 -1
  106. package/dist/assets/{index-f461L7cH.js → index-DUBGp7xd.js} +9 -9
  107. package/dist/assets/{index-BZKNVbcu.js → index-DfQRgiki.js} +1 -1
  108. package/dist/assets/{index-BszCp5iq.js → index-DiBieq3O.js} +1 -1
  109. package/dist/assets/{index-DyqQGUXg.js → index-DiVTtrCb.js} +1 -1
  110. package/dist/assets/{index-BlU4tJOu.js → index-DmcjF6Nx.js} +1 -1
  111. package/dist/assets/{index-BNAHYHIB.js → index-DpoRb2a8.js} +1 -1
  112. package/dist/assets/{index-BS8Zd79a.js → index-DvieCNmb.js} +1 -1
  113. package/dist/assets/{index-DnGfacYV.js → index-RG4mqpGz.js} +1 -1
  114. package/dist/assets/{index-Cx0-cDmo.js → index-U9rn9WsE.js} +1 -1
  115. package/dist/assets/{index-oppNoNvH.js → index-a-ikX8qX.js} +131 -134
  116. package/dist/assets/index-lV0fy8B1.js +375 -0
  117. package/dist/assets/{index-1qcmbchL.js → index-nCWPxDgy.js} +1 -1
  118. package/dist/assets/{index-BAu_h5OW.js → index-s02a35t3.js} +1 -1
  119. package/dist/assets/{index-BsODnAIr.js → index-sfXJAiE3.js} +1 -1
  120. package/dist/assets/{index.esm-Cc-rWUer.js → index.esm-C68-NEl-.js} +1 -1
  121. package/dist/assets/{install-from-url-Byfhqhtx.js → install-from-url-BdJ2Ss57.js} +1 -1
  122. package/dist/assets/{invitation-C7URd--D.js → invitation-Bx5fJbWJ.js} +1 -1
  123. package/dist/assets/{is-path-prefix-equal-DRcxtSPQ.js → is-path-prefix-equal-BOPF5jBD.js} +1 -1
  124. package/dist/assets/{item-Dad5StUY.js → item-C7h8_efZ.js} +1 -1
  125. package/dist/assets/{javascript-CoBTz2gd.js → javascript-Bys_gMbC.js} +1 -1
  126. package/dist/assets/{jsonMode-CVMee1RD.js → jsonMode-TWK13NFx.js} +1 -1
  127. package/dist/assets/{liquid-D6EIo1wL.js → liquid-BfUcrzzt.js} +1 -1
  128. package/dist/assets/{list-header-xkh_uL_h.js → list-header-SRVW6COA.js} +1 -1
  129. package/dist/assets/{lock.svg-CkFKYDxX.js → lock.svg-JAXJuW8m.js} +1 -1
  130. package/dist/assets/{log-BYawti0X.js → log-Dc5jAOFj.js} +1 -1
  131. package/dist/assets/{lottie-react.esm-CySu6b9e.js → lottie-react.esm-Da7iACIs.js} +1 -1
  132. package/dist/assets/{mdx-BEdivZjl.js → mdx-CBdpRCQl.js} +1 -1
  133. package/dist/assets/{memory-Badimsp_.js → memory-BC8bQEU5.js} +1 -1
  134. package/dist/assets/{metric-CtFXUNX3.js → metric-BjM4KnKv.js} +1 -1
  135. package/dist/assets/omit-Cn3-c14y.js +1 -0
  136. package/dist/assets/{overview-K7CavXZw.js → overview-BqvbUoW5.js} +1 -1
  137. package/dist/assets/{permission-DZytcuWC.js → permission-RfVjqk52.js} +1 -1
  138. package/dist/assets/{preference-CrZ37X3N.js → preference-DjJsrPrW.js} +3 -3
  139. package/dist/assets/{python-czQLPXp8.js → python-BF0eVRwz.js} +1 -1
  140. package/dist/assets/{raf-schd.esm-PMp87DFK.js → raf-schd.esm-Ptj886XJ.js} +1 -1
  141. package/dist/assets/{razor-Bgg3hEgt.js → razor-Zdl-UA57.js} +1 -1
  142. package/dist/assets/{rotate-session-key-Dtz9D1ow.js → rotate-session-key-CLwZduLH.js} +1 -1
  143. package/dist/assets/{runtime-BSvs2J54.js → runtime-B6LxwjeF.js} +1 -1
  144. package/dist/assets/schema-DpNd-Zov.js +1 -0
  145. package/dist/assets/sdk-B8yMOC2O.js +1 -0
  146. package/dist/assets/{service-BlUOvgta.js → service-_k6Howae.js} +1 -1
  147. package/dist/assets/{shorten-label-BZLeEmnh.js → shorten-label-lx5QxF6Y.js} +1 -1
  148. package/dist/assets/{simple-select-CDiD7EVt.js → simple-select-CfPqRV2d.js} +1 -1
  149. package/dist/assets/{spaces-B91L1fYZ.js → spaces-DoPkdMaN.js} +1 -1
  150. package/dist/assets/{status-DIBvqycZ.js → status-B8DVt36w.js} +1 -1
  151. package/dist/assets/status-BLTYBN-T.js +1 -0
  152. package/dist/assets/{switch-control-C9oMQ7W-.js → switch-control-BH-qYrQR.js} +1 -1
  153. package/dist/assets/{table-icons-EhFLZCZI.js → table-icons-IGHlCudU.js} +1 -1
  154. package/dist/assets/{team-fAqBHfRA.js → team-B-Cs8lcZ.js} +1 -1
  155. package/dist/assets/{toLower-CTl5GR-_.js → toLower-C4ucU5aY.js} +1 -1
  156. package/dist/assets/toUpper-B1IhHQhu.js +1 -0
  157. package/dist/assets/{traffic-BQ2LFr05.js → traffic-CaIE-uiD.js} +1 -1
  158. package/dist/assets/{tsMode-BC6Utk6Q.js → tsMode-C1CvS7zM.js} +1 -1
  159. package/dist/assets/{typescript-DA3LEYkV.js → typescript-D0zSwpFT.js} +1 -1
  160. package/dist/assets/{url-evaluation-QeH6FlO4.js → url-evaluation-BAHeyVsk.js} +1 -1
  161. package/dist/assets/{url-join-BL6fN34c.js → url-join-C2Slolwi.js} +1 -1
  162. package/dist/assets/{use-mobile-CC5e6Q7A.js → use-mobile-BjFvqb5i.js} +1 -1
  163. package/dist/assets/{use-mobile-B3ZO2ENR.js → use-mobile-Bo1g1SxW.js} +1 -1
  164. package/dist/assets/{useAsync-C4TyOh-5.js → useAsync-C37KCo_x.js} +1 -1
  165. package/dist/assets/{useAsyncRetry-nX6HpPsm.js → useAsyncRetry-BcsGJECm.js} +1 -1
  166. package/dist/assets/{useLocalStorage-CZNQlTk5.js → useLocalStorage-BZqfD-Zc.js} +1 -1
  167. package/dist/assets/{useThemeProps-BleY03wL.js → useThemeProps-zGNtf5gr.js} +1 -1
  168. package/dist/assets/{util-DBPmcEMD.js → util-Cj4tmS79.js} +1 -1
  169. package/dist/assets/{wait-container-DFnbvnlK.js → wait-container-BevRGd6W.js} +1 -1
  170. package/dist/assets/without-wallet-qR-m0Hnu.js +29 -0
  171. package/dist/assets/wrap-locale-0qkKZCSZ.js +1 -0
  172. package/dist/assets/{xml-D8pQLiZC.js → xml-DqMj09tj.js} +1 -1
  173. package/dist/assets/{yaml-BSxlt5hf.js → yaml-BcpQktZM.js} +1 -1
  174. package/dist/index.html +1 -1
  175. package/dist/service-worker.js +1 -1
  176. package/package.json +1 -1
  177. package/dist/assets/ArrowDropDown-CXhfj4YR.js +0 -1
  178. package/dist/assets/api-DAWWUzPu.js +0 -1
  179. package/dist/assets/chain-Dk4xAHS8.js +0 -6
  180. package/dist/assets/cloneDeep-CAK0LBhz.js +0 -1
  181. package/dist/assets/connect-to-DP2mM_22.js +0 -30
  182. package/dist/assets/emotion-cache.browser.esm-89zxT23k.js +0 -1
  183. package/dist/assets/engine-DjXhikKJ.js +0 -1
  184. package/dist/assets/getValidReactChildren-Cg2u2AWU.js +0 -1
  185. package/dist/assets/index-5gnDPlCv.js +0 -375
  186. package/dist/assets/index-t2qXqnLl.js +0 -1
  187. package/dist/assets/omit-D0KFhbLk.js +0 -1
  188. package/dist/assets/schema-DmifXwDr.js +0 -1
  189. package/dist/assets/sdk-VJ878dD0.js +0 -1
  190. package/dist/assets/status-DEKm_VSq.js +0 -1
  191. package/dist/assets/toUpper-CjPgxX5u.js +0 -1
  192. package/dist/assets/without-wallet-BEHqWwMH.js +0 -29
  193. package/dist/assets/wrap-locale-D0QYhzyI.js +0 -1
@@ -1 +1 @@
1
- import{A as g,bm as v,u as y,j as r,O as f,S as x,Q as h}from"./index-oppNoNvH.js";import{L as S,D as j}from"./download-CZMq1lWW.js";import{u as L}from"./useLocalStorage-CZNQlTk5.js";import"./ButtonGroup-zxfGLX1y.js";import"./getValidReactChildren-Cg2u2AWU.js";function I(){const c=g(),[s,i]=L("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(S,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(j,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{I as default};
1
+ import{A as g,bm as v,u as y,j as r,O as f,S as x,Q as h}from"./index-a-ikX8qX.js";import{L as S,D as j}from"./download-DkusPKGH.js";import{u as L}from"./useLocalStorage-BZqfD-Zc.js";import"./ButtonGroup-tq0Nh3v_.js";import"./getValidReactChildren-CLYm2ELr.js";function I(){const c=g(),[s,i]=L("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(S,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(j,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{I as default};
@@ -1 +1 @@
1
- import{eF as D}from"./index-oppNoNvH.js";function f(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function $(e){return f(e)==="object"}function re(e){return Array.isArray(e)&&e.length>0&&e.every(m=>"message"in m)}function Y(e,m){return e.length<124?e:m}const ne="graphql-transport-ws";var g;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(g||(g={}));var c;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(c||(c={}));function v(e){if(!$(e))throw new Error(`Message is expected to be an object, but got ${f(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${f(e.type)}`);switch(e.type){case c.ConnectionInit:case c.ConnectionAck:case c.Ping:case c.Pong:{if(e.payload!=null&&!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case c.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${f(e.payload.query)}`);if(e.payload.variables!=null&&!$(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${f(e.payload.variables)}`);if(e.payload.operationName!=null&&f(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${f(e.payload.operationName)}`);if(e.payload.extensions!=null&&!$(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${f(e.payload.extensions)}`);break}case c.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);break}case c.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!re(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case c.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function oe(e,m){return v(typeof e=="string"?JSON.parse(e,m):e)}function W(e,m){return v(e),JSON.stringify(e,m)}var A=function(e){return this instanceof A?(this.v=e,this):new A(e)},ie=function(e,m,R){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var M=R.apply(e,m||[]),b,w=[];return b={},E("next"),E("throw"),E("return"),b[Symbol.asyncIterator]=function(){return this},b;function E(u){M[u]&&(b[u]=function(r){return new Promise(function(S,L){w.push([u,r,S,L])>1||I(u,r)})})}function I(u,r){try{q(M[u](r))}catch(S){F(w[0][3],S)}}function q(u){u.value instanceof A?Promise.resolve(u.value.v).then(z,G):F(w[0][2],u)}function z(u){I("next",u)}function G(u){I("throw",u)}function F(u,r){u(r),w.shift(),w.length&&I(w[0][0],w[0][1])}};function pe(e){const{url:m,connectionParams:R,lazy:M=!0,onNonLazyError:b=console.error,lazyCloseTimeout:w=0,keepAlive:E=0,disablePong:I,connectionAckWaitTimeout:q=0,retryAttempts:z=5,retryWait:G=async function(a){let t=1e3;for(let o=0;o<a;o++)t*=2;await new Promise(o=>setTimeout(o,t+Math.floor(Math.random()*2700+300)))},shouldRetry:F=J,isFatalConnectionProblem:u,on:r,webSocketImpl:S,generateID:L=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{const t=Math.random()*16|0;return(a=="x"?t:t&3|8).toString(16)})},jsonMessageReplacer:U,jsonMessageReviver:ee}=e;let T;if(S){if(!ae(S))throw new Error("Invalid WebSocket implementation provided");T=S}else typeof WebSocket<"u"?T=WebSocket:typeof D<"u"?T=D.WebSocket||D.MozWebSocket:typeof window<"u"&&(T=window.WebSocket||window.MozWebSocket);if(!T)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=T,d=(()=>{const n=(()=>{const t={};return{on(o,s){return t[o]=s,()=>{delete t[o]}},emit(o){var s;"id"in o&&((s=t[o.id])===null||s===void 0||s.call(t,o))}}})(),a={connecting:r?.connecting?[r.connecting]:[],opened:r?.opened?[r.opened]:[],connected:r?.connected?[r.connected]:[],ping:r?.ping?[r.ping]:[],pong:r?.pong?[r.pong]:[],message:r?.message?[n.emit,r.message]:[n.emit],closed:r?.closed?[r.closed]:[],error:r?.error?[r.error]:[]};return{onMessage:n.on,on(t,o){const s=a[t];return s.push(o),()=>{s.splice(s.indexOf(o),1)}},emit(t,...o){for(const s of[...a[t]])s(...o)}}})();function Q(n){const a=[d.on("error",t=>{a.forEach(o=>o()),n(t)}),d.on("closed",t=>{a.forEach(o=>o()),n(t)})]}let h,k=0,H,O=!1,j=0,C=!1;async function K(){clearTimeout(H);const[n,a]=await(h??(h=new Promise((s,y)=>(async()=>{if(O){if(await G(j),!k)return h=void 0,y({code:1e3,reason:"All Subscriptions Gone"});j++}d.emit("connecting",O);const i=new N(typeof m=="function"?await m():m,ne);let x,_;function B(){isFinite(E)&&E>0&&(clearTimeout(_),_=setTimeout(()=>{i.readyState===N.OPEN&&(i.send(W({type:c.Ping})),d.emit("ping",!1,void 0))},E))}Q(l=>{h=void 0,clearTimeout(x),clearTimeout(_),y(l),l instanceof Z&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=l=>d.emit("error",l),i.onclose=l=>d.emit("closed",l),i.onopen=async()=>{try{d.emit("opened",i);const l=typeof R=="function"?await R():R;if(i.readyState!==N.OPEN)return;i.send(W(l?{type:c.ConnectionInit,payload:l}:{type:c.ConnectionInit},U)),isFinite(q)&&q>0&&(x=setTimeout(()=>{i.close(g.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},q)),B()}catch(l){d.emit("error",l),i.close(g.InternalClientError,Y(l instanceof Error?l.message:new Error(l).message,"Internal client error"))}};let P=!1;i.onmessage=({data:l})=>{try{const p=oe(l,ee);if(d.emit("message",p),p.type==="ping"||p.type==="pong"){d.emit(p.type,!0,p.payload),p.type==="pong"?B():I||(i.send(W(p.payload?{type:c.Pong,payload:p.payload}:{type:c.Pong})),d.emit("pong",!1,p.payload));return}if(P)return;if(p.type!==c.ConnectionAck)throw new Error(`First message cannot be of type ${p.type}`);clearTimeout(x),P=!0,d.emit("connected",i,p.payload,O),O=!1,j=0,s([i,new Promise((ce,te)=>Q(te))])}catch(p){i.onmessage=null,d.emit("error",p),i.close(g.BadResponse,Y(p instanceof Error?p.message:new Error(p).message,"Bad response"))}}})())));n.readyState===N.CLOSING&&await a;let t=()=>{};const o=new Promise(s=>t=s);return[n,t,Promise.race([o.then(()=>{if(!k){const s=()=>n.close(1e3,"Normal Closure");isFinite(w)&&w>0?H=setTimeout(()=>{n.readyState===N.OPEN&&s()},w):s()}}),a])]}function V(n){if(J(n)&&(se(n.code)||[g.InternalServerError,g.InternalClientError,g.BadRequest,g.BadResponse,g.Unauthorized,g.SubprotocolNotAcceptable,g.SubscriberAlreadyExists,g.TooManyInitialisationRequests].includes(n.code)))throw n;if(C)return!1;if(J(n)&&n.code===1e3)return k>0;if(!z||j>=z||!F(n)||u?.(n))throw n;return O=!0}M||(async()=>{for(k++;;)try{const[,,n]=await K();await n}catch(n){try{if(!V(n))return}catch(a){return b?.(a)}}})();function X(n,a){const t=L(n);let o=!1,s=!1,y=()=>{k--,o=!0};return(async()=>{for(k++;;)try{const[i,x,_]=await K();if(o)return x();const B=d.onMessage(t,P=>{switch(P.type){case c.Next:{a.next(P.payload);return}case c.Error:{s=!0,o=!0,a.error(P.payload),y();return}case c.Complete:{o=!0,y();return}}});i.send(W({id:t,type:c.Subscribe,payload:n},U)),y=()=>{!o&&i.readyState===N.OPEN&&i.send(W({id:t,type:c.Complete},U)),k--,o=!0,x()},await _.finally(B);return}catch(i){if(!V(i))return}})().then(()=>{s||a.complete()}).catch(i=>{a.error(i)}),()=>{o||y()}}return{on:d.on,subscribe:X,iterate(n){const a=[],t={done:!1,error:null,resolve:()=>{}},o=X(n,{next(y){a.push(y),t.resolve()},error(y){t.done=!0,t.error=y,t.resolve()},complete(){t.done=!0,t.resolve()}}),s=function(){return ie(this,arguments,function*(){for(;;){for(a.length||(yield A(new Promise(x=>t.resolve=x)));a.length;)yield yield A(a.shift());if(t.error)throw t.error;if(t.done)return yield A(void 0)}})}();return s.throw=async y=>(t.done||(t.done=!0,t.error=y,t.resolve()),{done:!0,value:void 0}),s.return=async()=>(o(),{done:!0,value:void 0}),s},async dispose(){if(C=!0,h){const[n]=await h;n.close(1e3,"Normal Closure")}},terminate(){h&&d.emit("closed",new Z)}}}class Z extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function J(e){return $(e)&&"code"in e&&"reason"in e}function se(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function ae(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}export{g as CloseCode,ne as GRAPHQL_TRANSPORT_WS_PROTOCOL,c as MessageType,Z as TerminatedCloseEvent,pe as createClient,oe as parseMessage,W as stringifyMessage,v as validateMessage};
1
+ import{eF as D}from"./index-a-ikX8qX.js";function f(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function $(e){return f(e)==="object"}function re(e){return Array.isArray(e)&&e.length>0&&e.every(m=>"message"in m)}function Y(e,m){return e.length<124?e:m}const ne="graphql-transport-ws";var g;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(g||(g={}));var c;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(c||(c={}));function v(e){if(!$(e))throw new Error(`Message is expected to be an object, but got ${f(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${f(e.type)}`);switch(e.type){case c.ConnectionInit:case c.ConnectionAck:case c.Ping:case c.Pong:{if(e.payload!=null&&!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case c.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${f(e.payload.query)}`);if(e.payload.variables!=null&&!$(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${f(e.payload.variables)}`);if(e.payload.operationName!=null&&f(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${f(e.payload.operationName)}`);if(e.payload.extensions!=null&&!$(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${f(e.payload.extensions)}`);break}case c.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!$(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${f(e.payload)}`);break}case c.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!re(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case c.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${f(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function oe(e,m){return v(typeof e=="string"?JSON.parse(e,m):e)}function W(e,m){return v(e),JSON.stringify(e,m)}var A=function(e){return this instanceof A?(this.v=e,this):new A(e)},ie=function(e,m,R){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var M=R.apply(e,m||[]),b,w=[];return b={},E("next"),E("throw"),E("return"),b[Symbol.asyncIterator]=function(){return this},b;function E(u){M[u]&&(b[u]=function(r){return new Promise(function(S,L){w.push([u,r,S,L])>1||I(u,r)})})}function I(u,r){try{q(M[u](r))}catch(S){F(w[0][3],S)}}function q(u){u.value instanceof A?Promise.resolve(u.value.v).then(z,G):F(w[0][2],u)}function z(u){I("next",u)}function G(u){I("throw",u)}function F(u,r){u(r),w.shift(),w.length&&I(w[0][0],w[0][1])}};function pe(e){const{url:m,connectionParams:R,lazy:M=!0,onNonLazyError:b=console.error,lazyCloseTimeout:w=0,keepAlive:E=0,disablePong:I,connectionAckWaitTimeout:q=0,retryAttempts:z=5,retryWait:G=async function(a){let t=1e3;for(let o=0;o<a;o++)t*=2;await new Promise(o=>setTimeout(o,t+Math.floor(Math.random()*2700+300)))},shouldRetry:F=J,isFatalConnectionProblem:u,on:r,webSocketImpl:S,generateID:L=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{const t=Math.random()*16|0;return(a=="x"?t:t&3|8).toString(16)})},jsonMessageReplacer:U,jsonMessageReviver:ee}=e;let T;if(S){if(!ae(S))throw new Error("Invalid WebSocket implementation provided");T=S}else typeof WebSocket<"u"?T=WebSocket:typeof D<"u"?T=D.WebSocket||D.MozWebSocket:typeof window<"u"&&(T=window.WebSocket||window.MozWebSocket);if(!T)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=T,d=(()=>{const n=(()=>{const t={};return{on(o,s){return t[o]=s,()=>{delete t[o]}},emit(o){var s;"id"in o&&((s=t[o.id])===null||s===void 0||s.call(t,o))}}})(),a={connecting:r?.connecting?[r.connecting]:[],opened:r?.opened?[r.opened]:[],connected:r?.connected?[r.connected]:[],ping:r?.ping?[r.ping]:[],pong:r?.pong?[r.pong]:[],message:r?.message?[n.emit,r.message]:[n.emit],closed:r?.closed?[r.closed]:[],error:r?.error?[r.error]:[]};return{onMessage:n.on,on(t,o){const s=a[t];return s.push(o),()=>{s.splice(s.indexOf(o),1)}},emit(t,...o){for(const s of[...a[t]])s(...o)}}})();function Q(n){const a=[d.on("error",t=>{a.forEach(o=>o()),n(t)}),d.on("closed",t=>{a.forEach(o=>o()),n(t)})]}let h,k=0,H,O=!1,j=0,C=!1;async function K(){clearTimeout(H);const[n,a]=await(h??(h=new Promise((s,y)=>(async()=>{if(O){if(await G(j),!k)return h=void 0,y({code:1e3,reason:"All Subscriptions Gone"});j++}d.emit("connecting",O);const i=new N(typeof m=="function"?await m():m,ne);let x,_;function B(){isFinite(E)&&E>0&&(clearTimeout(_),_=setTimeout(()=>{i.readyState===N.OPEN&&(i.send(W({type:c.Ping})),d.emit("ping",!1,void 0))},E))}Q(l=>{h=void 0,clearTimeout(x),clearTimeout(_),y(l),l instanceof Z&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=l=>d.emit("error",l),i.onclose=l=>d.emit("closed",l),i.onopen=async()=>{try{d.emit("opened",i);const l=typeof R=="function"?await R():R;if(i.readyState!==N.OPEN)return;i.send(W(l?{type:c.ConnectionInit,payload:l}:{type:c.ConnectionInit},U)),isFinite(q)&&q>0&&(x=setTimeout(()=>{i.close(g.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},q)),B()}catch(l){d.emit("error",l),i.close(g.InternalClientError,Y(l instanceof Error?l.message:new Error(l).message,"Internal client error"))}};let P=!1;i.onmessage=({data:l})=>{try{const p=oe(l,ee);if(d.emit("message",p),p.type==="ping"||p.type==="pong"){d.emit(p.type,!0,p.payload),p.type==="pong"?B():I||(i.send(W(p.payload?{type:c.Pong,payload:p.payload}:{type:c.Pong})),d.emit("pong",!1,p.payload));return}if(P)return;if(p.type!==c.ConnectionAck)throw new Error(`First message cannot be of type ${p.type}`);clearTimeout(x),P=!0,d.emit("connected",i,p.payload,O),O=!1,j=0,s([i,new Promise((ce,te)=>Q(te))])}catch(p){i.onmessage=null,d.emit("error",p),i.close(g.BadResponse,Y(p instanceof Error?p.message:new Error(p).message,"Bad response"))}}})())));n.readyState===N.CLOSING&&await a;let t=()=>{};const o=new Promise(s=>t=s);return[n,t,Promise.race([o.then(()=>{if(!k){const s=()=>n.close(1e3,"Normal Closure");isFinite(w)&&w>0?H=setTimeout(()=>{n.readyState===N.OPEN&&s()},w):s()}}),a])]}function V(n){if(J(n)&&(se(n.code)||[g.InternalServerError,g.InternalClientError,g.BadRequest,g.BadResponse,g.Unauthorized,g.SubprotocolNotAcceptable,g.SubscriberAlreadyExists,g.TooManyInitialisationRequests].includes(n.code)))throw n;if(C)return!1;if(J(n)&&n.code===1e3)return k>0;if(!z||j>=z||!F(n)||u?.(n))throw n;return O=!0}M||(async()=>{for(k++;;)try{const[,,n]=await K();await n}catch(n){try{if(!V(n))return}catch(a){return b?.(a)}}})();function X(n,a){const t=L(n);let o=!1,s=!1,y=()=>{k--,o=!0};return(async()=>{for(k++;;)try{const[i,x,_]=await K();if(o)return x();const B=d.onMessage(t,P=>{switch(P.type){case c.Next:{a.next(P.payload);return}case c.Error:{s=!0,o=!0,a.error(P.payload),y();return}case c.Complete:{o=!0,y();return}}});i.send(W({id:t,type:c.Subscribe,payload:n},U)),y=()=>{!o&&i.readyState===N.OPEN&&i.send(W({id:t,type:c.Complete},U)),k--,o=!0,x()},await _.finally(B);return}catch(i){if(!V(i))return}})().then(()=>{s||a.complete()}).catch(i=>{a.error(i)}),()=>{o||y()}}return{on:d.on,subscribe:X,iterate(n){const a=[],t={done:!1,error:null,resolve:()=>{}},o=X(n,{next(y){a.push(y),t.resolve()},error(y){t.done=!0,t.error=y,t.resolve()},complete(){t.done=!0,t.resolve()}}),s=function(){return ie(this,arguments,function*(){for(;;){for(a.length||(yield A(new Promise(x=>t.resolve=x)));a.length;)yield yield A(a.shift());if(t.error)throw t.error;if(t.done)return yield A(void 0)}})}();return s.throw=async y=>(t.done||(t.done=!0,t.error=y,t.resolve()),{done:!0,value:void 0}),s.return=async()=>(o(),{done:!0,value:void 0}),s},async dispose(){if(C=!0,h){const[n]=await h;n.close(1e3,"Normal Closure")}},terminate(){h&&d.emit("closed",new Z)}}}class Z extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function J(e){return $(e)&&"code"in e&&"reason"in e}function se(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function ae(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}export{g as CloseCode,ne as GRAPHQL_TRANSPORT_WS_PROTOCOL,c as MessageType,Z as TerminatedCloseEvent,pe as createClient,oe as parseMessage,W as stringifyMessage,v as validateMessage};
@@ -1 +1 @@
1
- import{j as e,cC as j,K as v,A as P,r as a,p as S,ax as w,u as k,x as K,f as b,aP as E,dg as W,cs as i,b7 as _,w as U,Y as N,C as R,dh as z,di as A}from"./index-oppNoNvH.js";import{p as c}from"./index-Ctq71AUP.js";function o({children:r,...s}){return e.jsx(j,{...s,did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:r})})}function L(){const r=P(),{t:s,locale:d}=a.useContext(S),{api:l}=w(),{info:u}=k(),p=K(u),f=b(),n=E({ready:!1,success:!1,error:null,invalidSession:!1}),h=W(),x=()=>{try{const t=new URL(window.location.href);if(t.hash.includes("invalid")){n.invalidSession=!0;return}const g=t.searchParams.get("__connect_url__"),y=z(g);if(!A(y))throw new Error;n.ready=!0}catch{n.invalidSession=!0,r("#invalid",{replace:!0})}};a.useLayoutEffect(()=>x(),[]);const m=i(t=>{n.error=t.message,r("#invalid",{replace:!0})}),C=i(()=>{n.success=!0});if(n.invalidSession)return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.invalidSession"),description:s("didConnect.common.invalidSessionDesc")})});if(n.error){const t=n.error;return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.connectionError"),description:t})})}return n.success?e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(_,{style:{color:f.palette.success.main,fontSize:72}}),title:s("didConnect.genKeyPair.success"),description:s("didConnect.genKeyPair.successDesc")})}):n.ready?e.jsx(o,{children:e.jsx(U,{className:"connect",action:"gen-key-pair",checkFn:l.get,checkTimeout:10*60*1e3,extraParams:{sourceAppPid:h?.appPid,forceSwitch:!0},saveConnect:!1,forceConnected:!1,webWalletUrl:p,onSuccess:C,onError:m,locale:d,messages:{title:s("didConnect.genKeyPair.title"),scan:s("didConnect.genKeyPair.scan"),confirm:s("auth.confirm"),success:s("didConnect.genKeyPair.success")},popup:!0,open:!0,hideCloseButton:!0})},"ready"):e.jsx(N,{children:e.jsx(R,{})})}export{L as default};
1
+ import{j as e,cC as j,K as v,A as P,r as a,p as S,ax as w,u as k,x as K,f as b,aP as E,dg as W,cs as i,b7 as _,w as U,Y as N,C as R,dh as z,di as A}from"./index-a-ikX8qX.js";import{p as c}from"./index-COIC4mfj.js";function o({children:r,...s}){return e.jsx(j,{...s,did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:r})})}function L(){const r=P(),{t:s,locale:d}=a.useContext(S),{api:l}=w(),{info:u}=k(),p=K(u),f=b(),n=E({ready:!1,success:!1,error:null,invalidSession:!1}),h=W(),x=()=>{try{const t=new URL(window.location.href);if(t.hash.includes("invalid")){n.invalidSession=!0;return}const g=t.searchParams.get("__connect_url__"),y=z(g);if(!A(y))throw new Error;n.ready=!0}catch{n.invalidSession=!0,r("#invalid",{replace:!0})}};a.useLayoutEffect(()=>x(),[]);const m=i(t=>{n.error=t.message,r("#invalid",{replace:!0})}),C=i(()=>{n.success=!0});if(n.invalidSession)return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.invalidSession"),description:s("didConnect.common.invalidSessionDesc")})});if(n.error){const t=n.error;return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.connectionError"),description:t})})}return n.success?e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(_,{style:{color:f.palette.success.main,fontSize:72}}),title:s("didConnect.genKeyPair.success"),description:s("didConnect.genKeyPair.successDesc")})}):n.ready?e.jsx(o,{children:e.jsx(U,{className:"connect",action:"gen-key-pair",checkFn:l.get,checkTimeout:10*60*1e3,extraParams:{sourceAppPid:h?.appPid,forceSwitch:!0},saveConnect:!1,forceConnected:!1,webWalletUrl:p,onSuccess:C,onError:m,locale:d,messages:{title:s("didConnect.genKeyPair.title"),scan:s("didConnect.genKeyPair.scan"),confirm:s("auth.confirm"),success:s("didConnect.genKeyPair.success")},popup:!0,open:!0,hideCloseButton:!0})},"ready"):e.jsx(N,{children:e.jsx(R,{})})}export{L as default};
@@ -1 +1 @@
1
- import{u as f,j as s,C as d,A as w,ax as v,cr as C,cs as u,ae as j,aH as I,K as P,bx as S}from"./index-oppNoNvH.js";import{I as E}from"./invitation-C7URd--D.js";import{g as R}from"./get-safe-url-CWx4sAFH.js";import"./index-Ctq71AUP.js";import"./index-2sz7KBve.js";import"./emotion-cache.browser.esm-89zxT23k.js";import"./sdk-VJ878dD0.js";import"./wrap-locale-D0QYhzyI.js";import"./index-BCTcUJyy.js";function T(n){const{searchParams:a}=new URL(window.location.href),g=w(),{api:i,session:r}=v(),{info:l}=f(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=u(()=>{if(o.error)throw o.error;return o?.data}),x=u(async(t,h=e=>e)=>{t&&(t.sessionToken&&j(h(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=R(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(E,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>S(t,l),checkFn:i.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function b(){return f().loading?s.jsx(d,{}):s.jsx(T,{})}export{b as default};
1
+ import{u as f,j as s,C as d,A as w,ax as v,cr as C,cs as u,ae as j,aH as I,K as P,bx as S}from"./index-a-ikX8qX.js";import{I as E}from"./invitation-Bx5fJbWJ.js";import{g as R}from"./get-safe-url-IgmCyB0M.js";import"./index-COIC4mfj.js";import"./index-CIIax0-r.js";import"./emotion-cache.browser.esm-B6zIYIHc.js";import"./sdk-B8yMOC2O.js";import"./wrap-locale-0qkKZCSZ.js";import"./index-CQ0SkU_t.js";function T(n){const{searchParams:a}=new URL(window.location.href),g=w(),{api:i,session:r}=v(),{info:l}=f(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=u(()=>{if(o.error)throw o.error;return o?.data}),x=u(async(t,h=e=>e)=>{t&&(t.sessionToken&&j(h(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=R(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(E,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>S(t,l),checkFn:i.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function b(){return f().loading?s.jsx(d,{}):s.jsx(T,{})}export{b as default};
@@ -1 +1 @@
1
- import{r as o,p as n,j as t,s as r}from"./index-oppNoNvH.js";import{p as a}from"./index-Ctq71AUP.js";function c(){const{t:s}=o.useContext(n);return t.jsx(e,{style:{paddingTop:"25vh"},children:t.jsx(a,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const e=r.main``;export{c as default};
1
+ import{r as o,p as n,j as t,s as r}from"./index-a-ikX8qX.js";import{p as a}from"./index-COIC4mfj.js";function c(){const{t:s}=o.useContext(n);return t.jsx(e,{style:{paddingTop:"25vh"},children:t.jsx(a,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const e=r.main``;export{c as default};
@@ -1 +1 @@
1
- import{c1 as a,r as f,cr as V,ba as W,bb as X,cS as v,fp as u,cs as m,fq as Z,fr as $,fs as I}from"./index-oppNoNvH.js";var ee=function(t){return t===document||t===document.documentElement||t===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):t.scrollTop},O=function(t){return t.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},re=function(t){return t.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},oe=function(t,o){o===void 0&&(o={});var g=o.target,x=o.isNoMore,F=o.threshold,w=F===void 0?100:F,B=o.direction,P=B===void 0?"bottom":B,R=o.reloadDeps,Y=R===void 0?[]:R,k=o.manual,h=o.onBefore,_=o.onSuccess,M=o.onError,y=o.onFinally,q=a(f.useState(),2),c=q[0],E=q[1],D=a(f.useState(!1),2),b=D[0],i=D[1],S=P==="top",T=f.useRef(void 0),L=f.useRef(0),H=f.useMemo(function(){return x?x(c):!1},[c]),s=V(function(r){return W(void 0,void 0,void 0,function(){var e,n,l,d;return X(this,function(C){switch(C.label){case 0:return[4,t(r)];case 1:return e=C.sent(),E(r?v(v({},e),{list:S?u(u([],a(e.list),!1),a((l=r.list)!==null&&l!==void 0?l:[]),!1):u(u([],a((d=r.list)!==null&&d!==void 0?d:[]),!1),a(e.list),!1)}):v(v({},e),{list:u([],a((n=e.list)!==null&&n!==void 0?n:[]),!1)})),[2,e]}})})},{manual:k,onFinally:function(r,e,n){i(!1),y?.(e,n)},onBefore:function(){return h?.()},onSuccess:function(r){setTimeout(function(){if(S){var e=I(g);if(e=e===document?document.documentElement:e,e){var n=O(e);e.scrollTo(0,n-L.current)}}else z()}),_?.(r)},onError:function(r){return M?.(r)}}),N=s.loading,G=s.error,A=s.run,j=s.runAsync,J=s.cancel,p=m(function(){H||(i(!0),A(c))}),K=m(function(){return H?Promise.reject():(i(!0),j(c))}),Q=function(){return i(!1),A()},U=function(){return i(!1),j()},z=function(){var r=I(g);if(r){var e=r===document?document.documentElement:r,n=ee(e),l=O(e),d=re(e);S?(T.current!==void 0&&T.current>n&&n<=w&&p(),T.current=n,L.current=l-n):l-n<=d+w&&p()}};return Z("scroll",function(){N||b||z()},{target:g}),$(function(){A()},u([],a(Y),!1)),{data:c,loading:!b&&N,error:G,loadingMore:b,noMore:H,loadMore:p,loadMoreAsync:K,reload:m(Q),reloadAsync:m(U),mutate:E,cancel:J}};export{oe as u};
1
+ import{c1 as a,r as f,cr as V,ba as W,bb as X,cS as v,fp as u,cs as m,fq as Z,fr as $,fs as I}from"./index-a-ikX8qX.js";var ee=function(t){return t===document||t===document.documentElement||t===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):t.scrollTop},O=function(t){return t.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},re=function(t){return t.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},oe=function(t,o){o===void 0&&(o={});var g=o.target,x=o.isNoMore,F=o.threshold,w=F===void 0?100:F,B=o.direction,P=B===void 0?"bottom":B,R=o.reloadDeps,Y=R===void 0?[]:R,k=o.manual,h=o.onBefore,_=o.onSuccess,M=o.onError,y=o.onFinally,q=a(f.useState(),2),c=q[0],E=q[1],D=a(f.useState(!1),2),b=D[0],i=D[1],S=P==="top",T=f.useRef(void 0),L=f.useRef(0),H=f.useMemo(function(){return x?x(c):!1},[c]),s=V(function(r){return W(void 0,void 0,void 0,function(){var e,n,l,d;return X(this,function(C){switch(C.label){case 0:return[4,t(r)];case 1:return e=C.sent(),E(r?v(v({},e),{list:S?u(u([],a(e.list),!1),a((l=r.list)!==null&&l!==void 0?l:[]),!1):u(u([],a((d=r.list)!==null&&d!==void 0?d:[]),!1),a(e.list),!1)}):v(v({},e),{list:u([],a((n=e.list)!==null&&n!==void 0?n:[]),!1)})),[2,e]}})})},{manual:k,onFinally:function(r,e,n){i(!1),y?.(e,n)},onBefore:function(){return h?.()},onSuccess:function(r){setTimeout(function(){if(S){var e=I(g);if(e=e===document?document.documentElement:e,e){var n=O(e);e.scrollTo(0,n-L.current)}}else z()}),_?.(r)},onError:function(r){return M?.(r)}}),N=s.loading,G=s.error,A=s.run,j=s.runAsync,J=s.cancel,p=m(function(){H||(i(!0),A(c))}),K=m(function(){return H?Promise.reject():(i(!0),j(c))}),Q=function(){return i(!1),A()},U=function(){return i(!1),j()},z=function(){var r=I(g);if(r){var e=r===document?document.documentElement:r,n=ee(e),l=O(e),d=re(e);S?(T.current!==void 0&&T.current>n&&n<=w&&p(),T.current=n,L.current=l-n):l-n<=d+w&&p()}};return Z("scroll",function(){N||b||z()},{target:g}),$(function(){A()},u([],a(Y),!1)),{data:c,loading:!b&&N,error:G,loadingMore:b,noMore:H,loadMore:p,loadMoreAsync:K,reload:m(Q),reloadAsync:m(U),mutate:E,cancel:J}};export{oe as u};
@@ -1,4 +1,4 @@
1
- import{dF as C,r as o,Q as d,j as e,dG as c,b5 as b,dH as I,bv as E,dI as v,dc as u,dJ as z}from"./index-oppNoNvH.js";import{B as A}from"./ButtonGroup-zxfGLX1y.js";function L({...r}){const{size:p="medium",color:i="primary",menu:a=[],children:s=null,variant:m="contained",onClick:x=C,menuButtonProps:f={},...h}=r,[j,l]=o.useState(!1),n=o.useRef(null),g=Array.isArray(a)?a.map((t,B)=>o.isValidElement(t)?t:o.createElement(d,{...t,key:B})):a,y=()=>{l(t=>!t)},k=t=>{n.current&&n.current.contains(t.target)||l(!1)},M=t=>{t.target.closest(".MuiMenuItem-root")&&l(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(P,{variant:m,size:p,color:i,ref:n,...h,children:[typeof s=="function"?s():e.jsx(c,{onClick:x,color:i,children:s}),e.jsx(c,{onClick:y,color:i,...f,"aria-label":"more functions",children:e.jsx(b,{})})]}),e.jsx(w,{open:j,anchorEl:n.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(I,{children:e.jsx(E,{onClickAway:k,children:e.jsx(v,{onClick:M,children:g})})})})]})}L.Item=d;const P=u(A)`
1
+ import{dF as C,r as o,Q as d,j as e,dG as c,b5 as b,dH as I,bv as E,dI as v,dc as u,dJ as z}from"./index-a-ikX8qX.js";import{B as A}from"./ButtonGroup-tq0Nh3v_.js";function L({...r}){const{size:p="medium",color:i="primary",menu:a=[],children:s=null,variant:m="contained",onClick:x=C,menuButtonProps:f={},...h}=r,[j,l]=o.useState(!1),n=o.useRef(null),g=Array.isArray(a)?a.map((t,B)=>o.isValidElement(t)?t:o.createElement(d,{...t,key:B})):a,y=()=>{l(t=>!t)},k=t=>{n.current&&n.current.contains(t.target)||l(!1)},M=t=>{t.target.closest(".MuiMenuItem-root")&&l(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(P,{variant:m,size:p,color:i,ref:n,...h,children:[typeof s=="function"?s():e.jsx(c,{onClick:x,color:i,children:s}),e.jsx(c,{onClick:y,color:i,...f,"aria-label":"more functions",children:e.jsx(b,{})})]}),e.jsx(w,{open:j,anchorEl:n.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(I,{children:e.jsx(E,{onClickAway:k,children:e.jsx(v,{onClick:M,children:g})})})})]})}L.Item=d;const P=u(A)`
2
2
  > .MuiButtonBase-root:last-of-type {
3
3
  min-width: 2em;
4
4
  padding-left: 0;
@@ -1,4 +1,4 @@
1
- import{u as k,j as o,C as N,ax as U,cU as W,A as b,V as E,cJ as _,r,aW as D,h as d,y as x,ak as P,ae as R,w as O,aH as A,x as $,aw as H,bx as K,s as V}from"./index-oppNoNvH.js";import{I as z}from"./invitation-C7URd--D.js";import"./index-Ctq71AUP.js";import"./index-2sz7KBve.js";import"./emotion-cache.browser.esm-89zxT23k.js";import"./sdk-VJ878dD0.js";import"./wrap-locale-D0QYhzyI.js";import"./index-BCTcUJyy.js";function J(h){const{api:i,session:p}=U(),{info:s}=k(),c=W(),v=b(),{t:l,locale:m}=E(),{encryptKey:y,decrypt:C}=_(),[I,g]=r.useState(!1),f=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),a=D(async()=>{if(!f)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:f}}),t=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(t){const u=new URL(window.location.href);u.pathname=x(P(),"/api/did/invite/token"),u.searchParams.set("_ek_",y),u.searchParams.set("inviteId",f);const{data:F}=await i.get(u.href);e=F}return{invitation:n,nextWorkflow:e,needReceiveNFT:t}}),L=r.useCallback(()=>{g(!0)},[]),S=r.useCallback(()=>{if(a.error)throw a.error;return a.value.invitation},[a]),w=r.useCallback(async e=>{e&&(Object.prototype.hasOwnProperty.call(e,"encrypted")&&!e.encrypted?R(e.sessionToken):R(C(e.sessionToken)));const n=new URLSearchParams(c.search);n.delete("inviteId");const t=n.toString();await p.refresh(),v(`/${t&&`?${t}`}`,{replace:!0})},[c,v,p]);if(a.loading)return o.jsx(N,{});const T=()=>{const e=new URL(window.location.href);e.pathname=x(P(),"/api/did/invite/status"),e.searchParams.set("_t_",a.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:t}=await i.get(e.href);t.status==="succeed"&&(clearInterval(n),p.updateConnectedInfo(t),w(t))},2e3)},j=()=>{g(!1)};return o.jsxs(M,{className:"page-invite",children:[d(a,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:I,locale:m,baseUrl:s.launcher.url,checkFn:H.create({baseURL:s.launcher.url}).get,onSuccess:T,onClose:j,checkTimeout:5*60*1e3,webWalletUrl:$(s),extraParams:{nw:d(a,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:`${A.WELLKNOWN_SERVICE_PATH_PREFIX}/api/did`}),o.jsx(z,{...h,getDataFn:S,createPassportSvg:e=>K(e,s),checkFn:i.get,onLoginSuccess:w,passportColor:"default",onReceive:d(a,"value.needReceiveNFT")?L:null})]})}const M=V.div`
1
+ import{u as k,j as o,C as N,ax as U,cU as W,A as b,V as E,cJ as _,r,aW as D,h as d,y as x,ak as P,ae as R,w as O,aH as A,x as $,aw as H,bx as K,s as V}from"./index-a-ikX8qX.js";import{I as z}from"./invitation-Bx5fJbWJ.js";import"./index-COIC4mfj.js";import"./index-CIIax0-r.js";import"./emotion-cache.browser.esm-B6zIYIHc.js";import"./sdk-B8yMOC2O.js";import"./wrap-locale-0qkKZCSZ.js";import"./index-CQ0SkU_t.js";function J(h){const{api:i,session:p}=U(),{info:s}=k(),c=W(),v=b(),{t:l,locale:m}=E(),{encryptKey:y,decrypt:C}=_(),[I,g]=r.useState(!1),f=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),a=D(async()=>{if(!f)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:f}}),t=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(t){const u=new URL(window.location.href);u.pathname=x(P(),"/api/did/invite/token"),u.searchParams.set("_ek_",y),u.searchParams.set("inviteId",f);const{data:F}=await i.get(u.href);e=F}return{invitation:n,nextWorkflow:e,needReceiveNFT:t}}),L=r.useCallback(()=>{g(!0)},[]),S=r.useCallback(()=>{if(a.error)throw a.error;return a.value.invitation},[a]),w=r.useCallback(async e=>{e&&(Object.prototype.hasOwnProperty.call(e,"encrypted")&&!e.encrypted?R(e.sessionToken):R(C(e.sessionToken)));const n=new URLSearchParams(c.search);n.delete("inviteId");const t=n.toString();await p.refresh(),v(`/${t&&`?${t}`}`,{replace:!0})},[c,v,p]);if(a.loading)return o.jsx(N,{});const T=()=>{const e=new URL(window.location.href);e.pathname=x(P(),"/api/did/invite/status"),e.searchParams.set("_t_",a.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:t}=await i.get(e.href);t.status==="succeed"&&(clearInterval(n),p.updateConnectedInfo(t),w(t))},2e3)},j=()=>{g(!1)};return o.jsxs(M,{className:"page-invite",children:[d(a,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:I,locale:m,baseUrl:s.launcher.url,checkFn:H.create({baseURL:s.launcher.url}).get,onSuccess:T,onClose:j,checkTimeout:5*60*1e3,webWalletUrl:$(s),extraParams:{nw:d(a,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:`${A.WELLKNOWN_SERVICE_PATH_PREFIX}/api/did`}),o.jsx(z,{...h,getDataFn:S,createPassportSvg:e=>K(e,s),checkFn:i.get,onLoginSuccess:w,passportColor:"default",onReceive:d(a,"value.needReceiveNFT")?L:null})]})}const M=V.div`
2
2
  width: 100vw;
3
3
  height: 100%;
4
4
  min-height: 100vh;