@abtnode/blocklet-services 1.17.1-beta-20251107-074502-034bafdc → 1.17.2-beta-20251110-023854-e91dad6f

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 (180) hide show
  1. package/api/routes/oauth/client.js +19 -3
  2. package/dist/assets/{AdapterDayjs-DS6RugP1.js → AdapterDayjs-Cf3ilEXQ.js} +1 -1
  3. package/dist/assets/{Google-DL2G-Im-.js → Google-CAi86Mf6.js} +1 -1
  4. package/dist/assets/{access-control-BcP45PDK.js → access-control-CtmOVtqN.js} +1 -1
  5. package/dist/assets/{add-component-core-CDw-LKTz.js → add-component-core-BmqcC6wx.js} +1 -1
  6. package/dist/assets/add-resource-Wd8eygtg.js +1 -0
  7. package/dist/assets/{addon-BNvN2vhl.js → addon-b88MM48E.js} +1 -1
  8. package/dist/assets/{advanced-C0Q1MXTZ.js → advanced-B3-RuDYH.js} +1 -1
  9. package/dist/assets/aigne-dOgJ2u-w.js +10 -0
  10. package/dist/assets/api-Btn0Tp3W.js +1 -0
  11. package/dist/assets/{appearance-Du24FS2u.js → appearance-BqBKdeI5.js} +1 -1
  12. package/dist/assets/{arrow-down.svg-BNc6qym0.js → arrow-down.svg-DeLZPBrE.js} +1 -1
  13. package/dist/assets/{audit-logs-CC69qHzz.js → audit-logs-DtLr59sc.js} +1 -1
  14. package/dist/assets/{authorize-R4UDUnLr.js → authorize-DwHmsRbR.js} +1 -1
  15. package/dist/assets/{base-chart-CPiuDOeg.js → base-chart-C-Raz4Q-.js} +1 -1
  16. package/dist/assets/{base32-DvFJDTUa.js → base32-MTP_2iYY.js} +1 -1
  17. package/dist/assets/{bind-account-BHDDyJhv.js → bind-account-kNuk8_sP.js} +1 -1
  18. package/dist/assets/branding-B5SFGC6H.js +1 -0
  19. package/dist/assets/{branding-JJOTrGtN.js → branding-BDl2jvZZ.js} +1 -1
  20. package/dist/assets/{branding-DtWd56Gj.js → branding-ZWV6HBf3.js} +1 -1
  21. package/dist/assets/{bundle-avatar-DKBZZwLh.js → bundle-avatar-CTtvmGO1.js} +1 -1
  22. package/dist/assets/{button-Cg6OrnF6.js → button-vwR-NYG5.js} +1 -1
  23. package/dist/assets/{click-to-copy-8VrSVycN.js → click-to-copy-BOJgIYli.js} +1 -1
  24. package/dist/assets/{cloneDeep-D_w1MBt4.js → cloneDeep-C6qewg0C.js} +1 -1
  25. package/dist/assets/{complete-DPUMGf1q.js → complete-Bkaq2hgz.js} +2 -2
  26. package/dist/assets/{component-BHy3j7aa.js → component-C45V1KlM.js} +2 -2
  27. package/dist/assets/{config-BaVMK6fr.js → config-BLLq9bPE.js} +1 -1
  28. package/dist/assets/config-Ceq_JEL5.js +53 -0
  29. package/dist/assets/{config-9XjBKwBj.js → config-gkybDvOM.js} +1 -1
  30. package/dist/assets/{config-navigation-CFyO-icX.js → config-navigation-D1-Loy5H.js} +2 -2
  31. package/dist/assets/{config-space-u-t0AaTk.js → config-space-zpk7zMxf.js} +1 -1
  32. package/dist/assets/{confirm-BCjJ3Xga.js → confirm-CR8be0u2.js} +1 -1
  33. package/dist/assets/{connect-DlGrdygd.js → connect-BXpb2qd7.js} +1 -1
  34. package/dist/assets/{connect-B6Xh5geZ.js → connect-DOJrWNED.js} +1 -1
  35. package/dist/assets/{connect-to-DcXC96wu.js → connect-to-CmnRyCBb.js} +1 -1
  36. package/dist/assets/{create-passport-svg-BYZ8eY0w.js → create-passport-svg-C7Utfs-J.js} +1 -1
  37. package/dist/assets/{createClass-BQSl7_FJ.js → createClass-C0dSRoDm.js} +1 -1
  38. package/dist/assets/{dashboard-CQ72RYH1.js → dashboard-Dw224r_Y.js} +2 -2
  39. package/dist/assets/{delete-confirm-D2vWlDhQ.js → delete-confirm-DhJd_sYk.js} +1 -1
  40. package/dist/assets/{did-address-BxZuOgUQ.js → did-address-QgOhyegQ.js} +1 -1
  41. package/dist/assets/{domain-DrZ8Lgz4.js → domain-Cp9UTLSk.js} +1 -1
  42. package/dist/assets/{domain-action-card-CjprVCsh.js → domain-action-card-ClQw061p.js} +2 -2
  43. package/dist/assets/domains-Bqr-LIHe.js +1 -0
  44. package/dist/assets/{email-BLnwK6WC.js → email-CyuoT9tq.js} +1 -1
  45. package/dist/assets/engine-DPn0LHHl.js +1 -0
  46. package/dist/assets/{exchange-passport-CNwWQumn.js → exchange-passport-BpZ027R8.js} +1 -1
  47. package/dist/assets/{form-BmYfNrVX.js → form-5lUoL51-.js} +1 -1
  48. package/dist/assets/{form-text-input-BZq_zjB8.js → form-text-input-Ce6g965V.js} +1 -1
  49. package/dist/assets/{fuel-UmS8I6V5.js → fuel-SLYYbiDW.js} +1 -1
  50. package/dist/assets/{gen-access-key-BG0P5o2E.js → gen-access-key-CXXIb3w7.js} +1 -1
  51. package/dist/assets/gen-simple-access-key-BHzLGV5y.js +1 -0
  52. package/dist/assets/get-safe-url-DpalOXcM.js +1 -0
  53. package/dist/assets/{home-DDCrDH3h.js → home-DIAEkSVB.js} +1 -1
  54. package/dist/assets/{iframe-UTQ_4DZf.js → iframe-BUJLmqjE.js} +1 -1
  55. package/dist/assets/index-40i6YjCX.js +6 -0
  56. package/dist/assets/{index-bAaF7GbQ.js → index-5h5rz7VN.js} +1 -1
  57. package/dist/assets/index-7L77Yf9w.js +120 -0
  58. package/dist/assets/{index-CFpcdpS5.js → index-BQF4zMs8.js} +3 -3
  59. package/dist/assets/{index-BCuYGA8L.js → index-BiE-bsm3.js} +1 -1
  60. package/dist/assets/{index-BCF14HSR.js → index-BiRWeiPY.js} +1 -1
  61. package/dist/assets/{index-Db6d_BmF.js → index-Bjj89nDJ.js} +1 -1
  62. package/dist/assets/{index-CYIpEo41.js → index-Bpiwm7Vd.js} +1 -1
  63. package/dist/assets/{index-DoyPDWTY.js → index-C-ToEbCG.js} +1 -1
  64. package/dist/assets/{index-CRlbskWD.js → index-C45ih46D.js} +11 -11
  65. package/dist/assets/{index-BydChKjR.js → index-COTazo1u.js} +2 -2
  66. package/dist/assets/{index-H8Dc7uuB.js → index-CkOr9jjZ.js} +1 -1
  67. package/dist/assets/{index-Ct7hdtD6.js → index-CsfqJ8ys.js} +1 -1
  68. package/dist/assets/{index-COj40KfT.js → index-CxfTwIi4.js} +1 -1
  69. package/dist/assets/{index-C2c32kYu.js → index-DBJMdrD8.js} +1 -1
  70. package/dist/assets/index-DZRxerxf.js +7 -0
  71. package/dist/assets/{index-Kwxwmog8.js → index-DZsn1cNa.js} +3 -3
  72. package/dist/assets/{index-CrRuO2BQ.js → index-DicW-7Bz.js} +1 -1
  73. package/dist/assets/{index-D-Y0UA7w.js → index-DoMhm8T2.js} +1 -1
  74. package/dist/assets/{index-CfVxzco9.js → index-DzmaBRJ8.js} +1 -1
  75. package/dist/assets/{index-DrTSvHzP.js → index-F1NFyTyg.js} +7 -7
  76. package/dist/assets/index-FV6qYjQd.js +62 -0
  77. package/dist/assets/{index-D2k5qLgT.js → index-FpxO_1p7.js} +1 -1
  78. package/dist/assets/{index-I8DDinX-.js → index-GExzZtCU.js} +1 -1
  79. package/dist/assets/{index-C_bSN26w.js → index-I2xk2ilS.js} +2 -2
  80. package/dist/assets/{index-BM4g9p9K.js → index-NomqB6Iy.js} +1 -1
  81. package/dist/assets/{index-ChcIPY6P.js → index-UR2bgVDi.js} +2 -2
  82. package/dist/assets/{index-CKPpLyCQ.js → index-gt5P4O5b.js} +1 -1
  83. package/dist/assets/{index-Ch4CmFJG.js → index-l32Mt1U_.js} +1 -1
  84. package/dist/assets/{index-CkTEzTCn.js → index-sNHCLgAE.js} +140 -142
  85. package/dist/assets/{index-BjsH7wg6.js → index-x4Yvq15-.js} +1 -1
  86. package/dist/assets/{invitation-PFI3mpiQ.js → invitation-Bu3ivg7N.js} +1 -1
  87. package/dist/assets/{invitations-DBukPMcf.js → invitations-o-DfaNhe.js} +1 -1
  88. package/dist/assets/{invite-Z_7oCnoB.js → invite-C_VhlmyZ.js} +1 -1
  89. package/dist/assets/{isURL-CyShrkvP.js → isURL-D_2bLHU_.js} +2 -2
  90. package/dist/assets/{issue-passport-BexF9o0Q.js → issue-passport-BQmXTz6k.js} +1 -1
  91. package/dist/assets/{item-CBDRQx8K.js → item-BnTXSpRf.js} +1 -1
  92. package/dist/assets/{landing-page-BBuNoMf2.js → landing-page-sUHYSREd.js} +1 -1
  93. package/dist/assets/{layout-DsLcTLhU.js → layout-Ccrs-yyw.js} +1 -1
  94. package/dist/assets/list-Bzvh-74X.js +2 -0
  95. package/dist/assets/list-DORIbGy_.js +103 -0
  96. package/dist/assets/localization-DDhbgRgn.js +1 -0
  97. package/dist/assets/{log-CQbIkXws.js → log-C34JsgaL.js} +1 -1
  98. package/dist/assets/logger-CLmQ42wa.js +1 -0
  99. package/dist/assets/{login-CvnRp8HX.js → login-DHfG4EkA.js} +1 -1
  100. package/dist/assets/{login-oauth-callback-LnLYjVIe.js → login-oauth-callback-B7KlB_uu.js} +1 -1
  101. package/dist/assets/{logo-uploader-DRaSgU8c.js → logo-uploader-D-JPEx8I.js} +1 -1
  102. package/dist/assets/{lost-passport-B5NjzFZd.js → lost-passport-BLFCoJdG.js} +1 -1
  103. package/dist/assets/{omit-CigYLGmT.js → omit-hhiOJGRf.js} +1 -1
  104. package/dist/assets/{open-window-B_B0pir6.js → open-window-Bcj__Y7L.js} +1 -1
  105. package/dist/assets/{over-due-invoice-payment-mGIRggXd.js → over-due-invoice-payment-DUg5ApsD.js} +1 -1
  106. package/dist/assets/{overview-DmcFvtLD.js → overview-B-nkIeNy.js} +2 -2
  107. package/dist/assets/passport-Y64u4kIS.js +1 -0
  108. package/dist/assets/passport-item-DvglsId-.js +1 -0
  109. package/dist/assets/{permission-COoKrWxk.js → permission-DhYNRf8T.js} +1 -1
  110. package/dist/assets/{preferences-CDP-HNka.js → preferences-C4h4Dsj9.js} +1 -1
  111. package/dist/assets/profile-embed-lrJQLQky.js +1 -0
  112. package/dist/assets/{publish-resource-BMF29YI2.js → publish-resource-YXu5vhjp.js} +1 -1
  113. package/dist/assets/{react-beautiful-dnd.esm-4ukAiqxb.js → react-beautiful-dnd.esm-Ci2FESra.js} +1 -1
  114. package/dist/assets/runtime-DK0VmoOa.js +1 -0
  115. package/dist/assets/{sanitize-Bib7lw-G.js → sanitize-BEqBHa8a.js} +1 -1
  116. package/dist/assets/sdk-DFkL0HsT.js +1 -0
  117. package/dist/assets/{security-BcRPxWAt.js → security-DrqBVw07.js} +3 -3
  118. package/dist/assets/{session-GdZETrt0.js → session-BAD0lxQk.js} +1 -1
  119. package/dist/assets/{setup-MQVteZIu.js → setup-Br2wkFI2.js} +1 -1
  120. package/dist/assets/{simple-select-K2bKpwDf.js → simple-select-CzvjrR9I.js} +1 -1
  121. package/dist/assets/{spaces-iPLS3X1a.js → spaces-B0p4-23K.js} +1 -1
  122. package/dist/assets/{start-DE38ex9f.js → start-CXoSJa5Y.js} +1 -1
  123. package/dist/assets/{starting-progress-BQjEEvIV.js → starting-progress-NSYAzE2f.js} +1 -1
  124. package/dist/assets/{status-B0TeD-D-.js → status-guZHdt1q.js} +1 -1
  125. package/dist/assets/{step-actions-DPFoKvBN.js → step-actions-thgNsMmu.js} +1 -1
  126. package/dist/assets/{studio-CEsaMQhd.js → studio-Ceq7d-nC.js} +1 -1
  127. package/dist/assets/{switch-control-BHqY-fHZ.js → switch-control-CHsjrwFX.js} +1 -1
  128. package/dist/assets/{table-tips-6mCQ469z.js → table-tips-cwfDerzR.js} +1 -1
  129. package/dist/assets/{team-aiCyLcOV.js → team-DQuySqMB.js} +1 -1
  130. package/dist/assets/{traffic-CPElxbIH.js → traffic-QKQkjau1.js} +1 -1
  131. package/dist/assets/{transfer-DvfbExaq.js → transfer-B2DeADo4.js} +1 -1
  132. package/dist/assets/{unsubscribe-BfZzYk0c.js → unsubscribe-CBCoBRAZ.js} +1 -1
  133. package/dist/assets/{use-app-logo-Duu7Oh3J.js → use-app-logo-BQTE7YvS.js} +1 -1
  134. package/dist/assets/{use-window-close-CmeMvKPG.js → use-window-close-BgT_dImc.js} +1 -1
  135. package/dist/assets/{useAsync-DouUkRB3.js → useAsync-BcVLpt2E.js} +1 -1
  136. package/dist/assets/{useAsync-BvASW8Y8.js → useAsync-cZ_FPf9k.js} +1 -1
  137. package/dist/assets/{useAsyncRetry-C8ETjgdm.js → useAsyncRetry-DwwEjrjs.js} +1 -1
  138. package/dist/assets/{useLocalStorage-DZQPax49.js → useLocalStorage-C9RLNbTa.js} +1 -1
  139. package/dist/assets/{user-center-BVnh5pB3.js → user-center-Cj7ClpAN.js} +2 -2
  140. package/dist/assets/user-follower-D2fRTkiD.js +32 -0
  141. package/dist/assets/{util-Cx4i9QNN.js → util-BEWQY3Rq.js} +1 -1
  142. package/dist/assets/{util-D4K1svNc.js → util-BsAmOTBh.js} +1 -1
  143. package/dist/assets/{vendor-arcblock-A4RQuZfN.js → vendor-arcblock-CuFtPveO.js} +1 -1
  144. package/dist/assets/{vendor-hooks-OpgB8gyY.js → vendor-hooks-CjESGRlR.js} +1 -1
  145. package/dist/assets/vendor-utils-cJEl_UEd.js +213 -0
  146. package/dist/assets/{vendor-ux-RIH1nUSh.js → vendor-ux-IiQnod3w.js} +7 -7
  147. package/dist/assets/{wait-connect-KtqPocoC.js → wait-connect-DiO80nu-.js} +1 -1
  148. package/dist/assets/{wizard-C9022r7q.js → wizard-Br7PYJDY.js} +1 -1
  149. package/dist/assets/{wizard-components-DboyJGog.js → wizard-components-BJpLH2_r.js} +1 -1
  150. package/dist/assets/wrap-locale-fIPwg8LW.js +1 -0
  151. package/dist/assets/{zh-BQQVY0SI.js → zh-EIKQ0AV8.js} +1 -1
  152. package/dist/index.html +1 -1
  153. package/dist/service-worker.js +1 -1
  154. package/package.json +48 -48
  155. package/dist/assets/add-resource-CcTb_2qn.js +0 -1
  156. package/dist/assets/aigne-CIAkCLWQ.js +0 -10
  157. package/dist/assets/api-BNrHV6cZ.js +0 -1
  158. package/dist/assets/branding-z2zNNpPB.js +0 -1
  159. package/dist/assets/config-zjFvoy0D.js +0 -57
  160. package/dist/assets/domains-Pt7MqfcA.js +0 -1
  161. package/dist/assets/engine-BkRDnUT9.js +0 -1
  162. package/dist/assets/gen-simple-access-key-BD4DDZLa.js +0 -1
  163. package/dist/assets/get-safe-url-Cgcqi5oF.js +0 -1
  164. package/dist/assets/index-C0w3lI6i.js +0 -120
  165. package/dist/assets/index-CpPbuWHL.js +0 -7
  166. package/dist/assets/index-CuFT_Y96.js +0 -6
  167. package/dist/assets/index-DBjdZ7k_.js +0 -63
  168. package/dist/assets/index-OYI_VqY3.js +0 -1
  169. package/dist/assets/list-BDeeBLEM.js +0 -103
  170. package/dist/assets/list-BZRp_F7-.js +0 -2
  171. package/dist/assets/localization-Dp6_R66r.js +0 -1
  172. package/dist/assets/logger-BI25CDXT.js +0 -1
  173. package/dist/assets/passport-CScachCU.js +0 -1
  174. package/dist/assets/passport-item-BefzYs0z.js +0 -1
  175. package/dist/assets/profile-embed-CfTauOJU.js +0 -1
  176. package/dist/assets/runtime-CC2luaxU.js +0 -1
  177. package/dist/assets/sdk-CkMqUWSI.js +0 -1
  178. package/dist/assets/user-follower-z3gqroPM.js +0 -32
  179. package/dist/assets/vendor-utils-ByKYcWuf.js +0 -213
  180. package/dist/assets/wrap-locale-Dkx98Pk6.js +0 -1
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("assets/vendor-ux-DYcPPYq2.css"),window.__toCdnUrl("assets/index-DrVXX4fX.css"),window.__toCdnUrl("assets/index-B5LvOF-F.css")])))=>i.map(i=>d[i]);
2
- import{V as fe,_ as be}from"./vendor-ux-RIH1nUSh.js";import{j as e,b1 as U,T as E,ak as x,b4 as je,am as Y,I as A,bX as J,Y as se,at as ve,bC as ye,$ as we,bw as Ce,A as Z,aJ as Se,bY as Ie,R as ke,Q as W,W as k}from"./vendor-mui-core-CnXrAOs3.js";import{c as D}from"./index-CkTEzTCn.js";import{E as N}from"./empty-spinner-DYOzicuy.js";import{k as Pe,u as Re}from"./vendor-hooks-OpgB8gyY.js";import{r as m}from"./vendor-react-Dvs43sk9.js";import{D as Q,C as G,P as ee}from"./react-beautiful-dnd.esm-4ukAiqxb.js";import{S as F}from"./studio-CEsaMQhd.js";import"./vendor-utils-ByKYcWuf.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-A4RQuZfN.js";import"./raf-schd.esm-CHNehTG3.js";import"./index-CRlbskWD.js";var I={},te;function Ee(){if(te)return I;te=1,Object.defineProperty(I,"__esModule",{value:!0}),I.getVideoId=b,I.getEmbedUrl=c,I.getVideoCoverUrl=P,I.getVideoCheckUrl=y,I.getYoutubeId=r,I.getVimeoId=a,I.isVideoUrl=w;function r(s){const t=s.trim();return t.includes("youtu.be/")?t.split("youtu.be/")[1]?.split("?")[0]:t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?t.split("/shorts/")[1]?.split("?")[0]:""}function a(s){const t=s.trim();return t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("vimeo.com/video/")?t.split("/video/")[1]?.split("?")[0]:t.includes("vimeo.com/channels/")?t.split("/channels/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/groups/")?t.split("/groups/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/")?t.split("vimeo.com/")[1]?.split("?")[0]:""}const p={};function b(s){const t=s.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(p[t]||(p[t]=(()=>{const u=new URL(t);return u.host.includes("youtube.com")||u.host.includes("youtu.be")?[r(t),"youtube"]:u.host.includes("vimeo.com")?[a(t),"vimeo"]:[]})()),p[t])}const n={};function c(s,{modestbranding:t=1,controls:u=0,autoplay:g=0}={}){const j=s.trim();if(!j)return"";if(n[j]!==void 0)return n[j];const[O,l]=b(j);return l==="youtube"?n[j]=`https://www.youtube.com/embed/${O}?modestbranding=${t}&controls=${u}&autoplay=${g}`:l==="vimeo"?n[j]=`https://player.vimeo.com/video/${O}?autoplay=${g}`:n[j]="",n[j]}const d={};function P(s){const t=s.trim();if(!t)return"";if(d[t]!==void 0)return d[t];const[u,g]=b(t);return g==="youtube"?d[t]=`https://img.youtube.com/vi/${u}/mqdefault.jpg`:g==="vimeo"?d[t]=`https://i.vimeocdn.com/${u}/1000x563`:d[t]="",d[t]}function y(s){const t=s.trim();if(!t)return"";const[u,g]=b(t);return g==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${u}&format=json`:g==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${u}`:""}function w(s){const t=s.trim();return b(t).length>0}return I}var q=Ee();const re=m.lazy(()=>be(()=>import("./index-ChcIPY6P.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(r=>({default:r.Uploader}))),Oe=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Ve=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Le=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,_=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,De=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,oe=5,ie=3;function Xe(){const{t:r,locale:a}=fe(),[p,b]=m.useState(!1),[n,c]=m.useState(!1),[d,P]=m.useState([]),[y,w]=m.useState([]),[s,t]=m.useState(""),[u,g]=m.useState(""),[j,O]=m.useState(Date.now()),l=Pe(async()=>{const i=await(await fetch(_)).json();return P(i.screenshots||[]),w(i.videos?.filter(h=>!!h)||[]),i}),f=m.useRef(null),C=m.useRef(null);if(l.loading&&!l.data)return e.jsx(F,{children:e.jsx(N,{size:40})});if(l.error)return e.jsx(F,{children:e.jsx(U,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(E,{sx:{color:"error.main",fontWeight:"bold"},children:l.error.message})})});const T=async o=>{const i=o.filter(h=>!!h);w(i),await fetch(De,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:i})})},le=async o=>{const i=Array.from(y),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),await T(i)},ce=async o=>{const i=Array.from(d),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),P(i),await fetch(`${_}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:i})})},H=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ce(o):o.source.droppableId==="videos"&&await le(o),l.runAsync())},B=o=>{g(o.trim()),c(!0)},K=async(o,i="")=>{let h=[];i?h=o?y.map(v=>v===i?o.trim():v):y.filter(v=>v!==i):o&&(h=[...y,o.trim()]),g(""),c(!1),(o||i)&&await T(h),l.runAsync()},de=o=>{b(!0),t(o)},M=()=>{b(!1),t("")};function ue(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],i=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx($,{title:r("common.logo"),rules:o,tips:i,children:e.jsx(x,{sx:{flex:1,cursor:"pointer"},children:e.jsx(je,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Le}?t=${j}`,onClick:()=>f.current?.open()})})})}function pe(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${oe}`},{label:r("studio.size"),value:"<5MB"}],i=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx($,{title:r("common.screenshot"),tips:i,rules:o,children:e.jsx(Q,{onDragEnd:H,children:e.jsx(G,{droppableId:"screenshots",direction:"horizontal",children:(v,V)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[d.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,L)=>{const X=`${_}/${S}`;return e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:X,onClick:()=>de(S),style:{cursor:"pointer"}}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(X,{method:"DELETE"}),l.runAsync()},children:e.jsx(J,{})})})]})}},S)),v.placeholder,d.length<oe&&h()]})})})});function h(){return e.jsx(x,{onClick:()=>C.current?.open(),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function he(){const o=[{label:r("studio.count"),value:`1~${ie}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],i=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs($,{title:r("studio.video"),tips:i,rules:o,children:[e.jsx(Q,{onDragEnd:H,children:e.jsx(G,{droppableId:"videos",direction:"horizontal",children:(v,V)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[y.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,L)=>e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:q.getVideoCoverUrl(S),onClick:()=>B(S),style:{cursor:"pointer"}}),e.jsx(x,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>B(S),children:e.jsx(ae,{})}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>K(null,S),children:e.jsx(J,{})})})]})},S)),v.placeholder,y.length<ie&&h()]})})}),n&&e.jsx(ne,{t:r,handleOperateVideo:K,defaultUrl:u,videos:y})]});function h(){return e.jsx(x,{onClick:()=>c(!0),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function me(){return e.jsx(se,{open:p,onClose:M,maxWidth:"xl",slotProps:{paper:{style:{backgroundColor:"transparent",boxShadow:"none"}}},children:e.jsx("img",{src:`${_}/${s}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:M})})}function xe(){return e.jsxs(m.Suspense,{fallback:e.jsx(N,{size:40}),children:[e.jsx(re,{ref:f,locale:a,popup:!0,onUploadFinish:()=>{f.current?.close(),O(Date.now()),l.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Oe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(re,{ref:C,locale:a,popup:!0,onUploadFinish:()=>{C.current?.close(),l.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Ve,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-d.length}},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const ge=`https://www.arcblock.io/docs/blocklet-store/${a}/supplying-images`;return e.jsx(F,{children:e.jsxs(Te,{children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(E,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:l.data?.title})}),e.jsxs(E,{variant:"body2",sx:{color:"text.secondary"},children:[r("studio.description")," ",e.jsx("a",{href:ge,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),ue(),pe(),he(),me(),xe()]})})}function $({title:r,rules:a,tips:p,children:b}){return e.jsxs(x,{sx:{display:"flex",flexDirection:"column",mb:4},children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(E,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(U,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:a.map(c=>n(c.label,c.value))}),p.map(c=>e.jsx(x,{sx:{fontSize:"13px",opacity:.8},children:n(c.label,c.value)}))]}),b]});function n(c,d){return e.jsxs(x,{component:"span",children:[e.jsxs(x,{component:"span",sx:{color:"#555",mr:.5},children:[c,":"]}),e.jsx(x,{component:"span",sx:{color:"#007ec6"},children:d})]})}}$.propTypes={title:k.string.isRequired,rules:k.array.isRequired,tips:k.array.isRequired,children:k.node.isRequired};function ne({handleOperateVideo:r,t:a,defaultUrl:p="",videos:b}){const[n,c]=m.useState(p),[d,P]=m.useState(!1),[y,w]=m.useState(!1),s=m.useRef(n),t=n!==p&&b.includes(n),u=!n&&p,g=!t&&(n&&n!==s.current||d),j=!!navigator.clipboard?.readText,{run:O}=Re(l,{wait:500,leading:!0});return e.jsxs(se,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(ye,{children:a(p?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(we,{children:[e.jsx(Ce,{fullWidth:!0,value:n,onChange:f=>{const C=f.target.value.trim();c(C),C?O(C):w(!1)},placeholder:a("studio.videoInputLabel"),endAdornment:n?e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:()=>{c(""),l("")},children:e.jsx(Se,{})})}):j&&e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();c(f),l(f)}catch(f){console.error(f)}},children:e.jsx(Ie,{})})})}),e.jsxs(x,{sx:{mb:2,mt:.5},children:[t&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.duplicateVideo")}),!t&&y&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.videoDialogNoSrc")})]}),s.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${s.current}`,src:q.getEmbedUrl(s.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(x,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:d?e.jsx(N,{size:40}):e.jsx(E,{variant:"h5",sx:{color:"text.secondary"},children:e.jsx(ae,{})})})]}),e.jsxs(ke,{children:[e.jsx(W,{onClick:()=>r(),children:a("studio.cancel")}),u&&e.jsx(W,{variant:"contained",color:"error",onClick:()=>r(null,p),children:a("studio.delete")}),g&&e.jsx(W,{variant:"contained",onClick:()=>l(n),disabled:!n||d,children:a("studio.preview")}),!u&&!g&&e.jsx(W,{variant:"contained",onClick:()=>r(s.current),disabled:!s.current||p===s.current||t,children:a("studio.confirm")})]})]});function l(f){s.current="";const C=q.getVideoCheckUrl(f);w(f?!C:!1),C&&(P(!0),fetch(C).then(T=>{T.ok?(s.current=f,w(!1)):w(!0)}).catch(()=>{w(!0)}).finally(()=>P(!1)))}}ne.propTypes={handleOperateVideo:k.func.isRequired,t:k.func.isRequired,defaultUrl:k.string,videos:k.array.isRequired};function ae(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Te=ve.div`
2
+ import{V as fe,_ as be}from"./vendor-ux-IiQnod3w.js";import{j as e,b1 as U,T as E,ak as x,b4 as je,am as Y,I as A,bX as J,Y as se,at as ve,bC as ye,$ as we,bw as Ce,A as Z,aJ as Se,bY as Ie,R as ke,Q as W,W as k}from"./vendor-mui-core-CnXrAOs3.js";import{c as D}from"./index-sNHCLgAE.js";import{E as N}from"./empty-spinner-DYOzicuy.js";import{k as Pe,u as Re}from"./vendor-hooks-CjESGRlR.js";import{r as m}from"./vendor-react-Dvs43sk9.js";import{D as Q,C as G,P as ee}from"./react-beautiful-dnd.esm-Ci2FESra.js";import{S as F}from"./studio-Ceq7d-nC.js";import"./vendor-utils-cJEl_UEd.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-CuFtPveO.js";import"./raf-schd.esm-CHNehTG3.js";import"./index-C45ih46D.js";var I={},te;function Ee(){if(te)return I;te=1,Object.defineProperty(I,"__esModule",{value:!0}),I.getVideoId=b,I.getEmbedUrl=c,I.getVideoCoverUrl=P,I.getVideoCheckUrl=y,I.getYoutubeId=r,I.getVimeoId=a,I.isVideoUrl=w;function r(s){const t=s.trim();return t.includes("youtu.be/")?t.split("youtu.be/")[1]?.split("?")[0]:t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?t.split("/shorts/")[1]?.split("?")[0]:""}function a(s){const t=s.trim();return t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("vimeo.com/video/")?t.split("/video/")[1]?.split("?")[0]:t.includes("vimeo.com/channels/")?t.split("/channels/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/groups/")?t.split("/groups/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/")?t.split("vimeo.com/")[1]?.split("?")[0]:""}const p={};function b(s){const t=s.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(p[t]||(p[t]=(()=>{const u=new URL(t);return u.host.includes("youtube.com")||u.host.includes("youtu.be")?[r(t),"youtube"]:u.host.includes("vimeo.com")?[a(t),"vimeo"]:[]})()),p[t])}const n={};function c(s,{modestbranding:t=1,controls:u=0,autoplay:g=0}={}){const j=s.trim();if(!j)return"";if(n[j]!==void 0)return n[j];const[O,l]=b(j);return l==="youtube"?n[j]=`https://www.youtube.com/embed/${O}?modestbranding=${t}&controls=${u}&autoplay=${g}`:l==="vimeo"?n[j]=`https://player.vimeo.com/video/${O}?autoplay=${g}`:n[j]="",n[j]}const d={};function P(s){const t=s.trim();if(!t)return"";if(d[t]!==void 0)return d[t];const[u,g]=b(t);return g==="youtube"?d[t]=`https://img.youtube.com/vi/${u}/mqdefault.jpg`:g==="vimeo"?d[t]=`https://i.vimeocdn.com/${u}/1000x563`:d[t]="",d[t]}function y(s){const t=s.trim();if(!t)return"";const[u,g]=b(t);return g==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${u}&format=json`:g==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${u}`:""}function w(s){const t=s.trim();return b(t).length>0}return I}var q=Ee();const re=m.lazy(()=>be(()=>import("./index-UR2bgVDi.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(r=>({default:r.Uploader}))),Oe=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Ve=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Le=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,_=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,De=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,oe=5,ie=3;function Xe(){const{t:r,locale:a}=fe(),[p,b]=m.useState(!1),[n,c]=m.useState(!1),[d,P]=m.useState([]),[y,w]=m.useState([]),[s,t]=m.useState(""),[u,g]=m.useState(""),[j,O]=m.useState(Date.now()),l=Pe(async()=>{const i=await(await fetch(_)).json();return P(i.screenshots||[]),w(i.videos?.filter(h=>!!h)||[]),i}),f=m.useRef(null),C=m.useRef(null);if(l.loading&&!l.data)return e.jsx(F,{children:e.jsx(N,{size:40})});if(l.error)return e.jsx(F,{children:e.jsx(U,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(E,{sx:{color:"error.main",fontWeight:"bold"},children:l.error.message})})});const T=async o=>{const i=o.filter(h=>!!h);w(i),await fetch(De,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:i})})},le=async o=>{const i=Array.from(y),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),await T(i)},ce=async o=>{const i=Array.from(d),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),P(i),await fetch(`${_}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:i})})},H=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ce(o):o.source.droppableId==="videos"&&await le(o),l.runAsync())},B=o=>{g(o.trim()),c(!0)},K=async(o,i="")=>{let h=[];i?h=o?y.map(v=>v===i?o.trim():v):y.filter(v=>v!==i):o&&(h=[...y,o.trim()]),g(""),c(!1),(o||i)&&await T(h),l.runAsync()},de=o=>{b(!0),t(o)},M=()=>{b(!1),t("")};function ue(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],i=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx($,{title:r("common.logo"),rules:o,tips:i,children:e.jsx(x,{sx:{flex:1,cursor:"pointer"},children:e.jsx(je,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Le}?t=${j}`,onClick:()=>f.current?.open()})})})}function pe(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${oe}`},{label:r("studio.size"),value:"<5MB"}],i=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx($,{title:r("common.screenshot"),tips:i,rules:o,children:e.jsx(Q,{onDragEnd:H,children:e.jsx(G,{droppableId:"screenshots",direction:"horizontal",children:(v,V)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[d.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,L)=>{const X=`${_}/${S}`;return e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:X,onClick:()=>de(S),style:{cursor:"pointer"}}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(X,{method:"DELETE"}),l.runAsync()},children:e.jsx(J,{})})})]})}},S)),v.placeholder,d.length<oe&&h()]})})})});function h(){return e.jsx(x,{onClick:()=>C.current?.open(),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function he(){const o=[{label:r("studio.count"),value:`1~${ie}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],i=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs($,{title:r("studio.video"),tips:i,rules:o,children:[e.jsx(Q,{onDragEnd:H,children:e.jsx(G,{droppableId:"videos",direction:"horizontal",children:(v,V)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[y.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,L)=>e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:q.getVideoCoverUrl(S),onClick:()=>B(S),style:{cursor:"pointer"}}),e.jsx(x,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>B(S),children:e.jsx(ae,{})}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>K(null,S),children:e.jsx(J,{})})})]})},S)),v.placeholder,y.length<ie&&h()]})})}),n&&e.jsx(ne,{t:r,handleOperateVideo:K,defaultUrl:u,videos:y})]});function h(){return e.jsx(x,{onClick:()=>c(!0),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function me(){return e.jsx(se,{open:p,onClose:M,maxWidth:"xl",slotProps:{paper:{style:{backgroundColor:"transparent",boxShadow:"none"}}},children:e.jsx("img",{src:`${_}/${s}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:M})})}function xe(){return e.jsxs(m.Suspense,{fallback:e.jsx(N,{size:40}),children:[e.jsx(re,{ref:f,locale:a,popup:!0,onUploadFinish:()=>{f.current?.close(),O(Date.now()),l.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Oe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(re,{ref:C,locale:a,popup:!0,onUploadFinish:()=>{C.current?.close(),l.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Ve,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-d.length}},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const ge=`https://www.arcblock.io/docs/blocklet-store/${a}/supplying-images`;return e.jsx(F,{children:e.jsxs(Te,{children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(E,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:l.data?.title})}),e.jsxs(E,{variant:"body2",sx:{color:"text.secondary"},children:[r("studio.description")," ",e.jsx("a",{href:ge,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),ue(),pe(),he(),me(),xe()]})})}function $({title:r,rules:a,tips:p,children:b}){return e.jsxs(x,{sx:{display:"flex",flexDirection:"column",mb:4},children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(E,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(U,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:a.map(c=>n(c.label,c.value))}),p.map(c=>e.jsx(x,{sx:{fontSize:"13px",opacity:.8},children:n(c.label,c.value)}))]}),b]});function n(c,d){return e.jsxs(x,{component:"span",children:[e.jsxs(x,{component:"span",sx:{color:"#555",mr:.5},children:[c,":"]}),e.jsx(x,{component:"span",sx:{color:"#007ec6"},children:d})]})}}$.propTypes={title:k.string.isRequired,rules:k.array.isRequired,tips:k.array.isRequired,children:k.node.isRequired};function ne({handleOperateVideo:r,t:a,defaultUrl:p="",videos:b}){const[n,c]=m.useState(p),[d,P]=m.useState(!1),[y,w]=m.useState(!1),s=m.useRef(n),t=n!==p&&b.includes(n),u=!n&&p,g=!t&&(n&&n!==s.current||d),j=!!navigator.clipboard?.readText,{run:O}=Re(l,{wait:500,leading:!0});return e.jsxs(se,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(ye,{children:a(p?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(we,{children:[e.jsx(Ce,{fullWidth:!0,value:n,onChange:f=>{const C=f.target.value.trim();c(C),C?O(C):w(!1)},placeholder:a("studio.videoInputLabel"),endAdornment:n?e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:()=>{c(""),l("")},children:e.jsx(Se,{})})}):j&&e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();c(f),l(f)}catch(f){console.error(f)}},children:e.jsx(Ie,{})})})}),e.jsxs(x,{sx:{mb:2,mt:.5},children:[t&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.duplicateVideo")}),!t&&y&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.videoDialogNoSrc")})]}),s.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${s.current}`,src:q.getEmbedUrl(s.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(x,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:d?e.jsx(N,{size:40}):e.jsx(E,{variant:"h5",sx:{color:"text.secondary"},children:e.jsx(ae,{})})})]}),e.jsxs(ke,{children:[e.jsx(W,{onClick:()=>r(),children:a("studio.cancel")}),u&&e.jsx(W,{variant:"contained",color:"error",onClick:()=>r(null,p),children:a("studio.delete")}),g&&e.jsx(W,{variant:"contained",onClick:()=>l(n),disabled:!n||d,children:a("studio.preview")}),!u&&!g&&e.jsx(W,{variant:"contained",onClick:()=>r(s.current),disabled:!s.current||p===s.current||t,children:a("studio.confirm")})]})]});function l(f){s.current="";const C=q.getVideoCheckUrl(f);w(f?!C:!1),C&&(P(!0),fetch(C).then(T=>{T.ok?(s.current=f,w(!1)):w(!0)}).catch(()=>{w(!0)}).finally(()=>P(!1)))}}ne.propTypes={handleOperateVideo:k.func.isRequired,t:k.func.isRequired,defaultUrl:k.string,videos:k.array.isRequired};function ae(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Te=ve.div`
3
3
  margin-top: 24px;
4
4
  .image-wrapper {
5
5
  margin-bottom: 16px;
@@ -1,4 +1,4 @@
1
- import{r as g}from"./vendor-react-Dvs43sk9.js";import{j as e,bV as o1,at as K,ak as c,aj as W,z as h1,U as n1,I as Y,a6 as d1,bF as p1,F as f1,O as x1,bW as $,W as r,b7 as v1,b4 as m1,ar as g1,T as v,a3 as u,Q as V,b1 as u1}from"./vendor-mui-core-CnXrAOs3.js";import{K as j1,M as y1,e as Z1,p as L1,H as w1}from"./vendor-ux-RIH1nUSh.js";import{l as _1}from"./vendor-hooks-OpgB8gyY.js";import{_ as q,B as b1,a0 as E1,Y as d}from"./index-CkTEzTCn.js";import{s as O1}from"./sanitize-Bib7lw-G.js";import{F as k1}from"./form-text-input-BZq_zjB8.js";import{R as M1}from"./required-BGaDOGrj.js";import{F as B1}from"./form-wrapper-C8oo_Fdy.js";import{w as Q}from"./permission-COoKrWxk.js";import{u as R1}from"./use-app-logo-Duu7Oh3J.js";import{L as j}from"./logo-uploader-DRaSgU8c.js";import{S as _}from"./section-C75bzkkL.js";import"./vendor-utils-ByKYcWuf.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-A4RQuZfN.js";import"./omit-CigYLGmT.js";import"./index-BPy8_fa2.js";import"./edit.svg-DycWG9v3.js";import"./session-GdZETrt0.js";function J({label:i="",disabled:h=!1,required:p=!1,initialValue:s="",onChange:M=()=>{},style:z={},onSubmit:f=()=>{},triggers:m=[],options:a=[],formatterBeforeSubmit:b=Z=>Z.join(","),helperText:B="",placeholder:T="",renderImage:I=()=>null,renderLabel:N=()=>"",filterKeys:y=["name"],noEmpty:E=!1,...R}){const[Z,C]=g.useState(!1),[P,A]=g.useState(!1),[O,U]=g.useState(""),k=g.useRef(null),[L,S]=g.useState(s),[l,n]=g.useState(L),w=g.useMemo(()=>{if(!a)return{};const o={};return a.forEach(t=>{o[t.code]=t}),o},[a]),H=()=>{if(!a)return[];if(!O)return a.map(t=>t.code);const o=new RegExp(O.toLowerCase());return a.filter(t=>{for(let x=0;x<y.length;x++){const F=y[x];if(o.test(t[F]?.toLowerCase()))return!0}return!1}).map(t=>t.code)},c1=async()=>{A(!0);try{await f(typeof b=="function"?b(l):l)===!1?n(L):E&&!l.length?(n(s),S(s)):(n(l),S(l))}catch{n(L)}finally{A(!1),C(!1)}},t1=(o,t)=>{if(!Array.isArray(t)){n([]),M([]);return}const x=t.filter(F=>w[F]);if(!x.length){n([]),M([]);return}n(x),M(x)},s1=o=>{o.stopPropagation(),C(!0),setTimeout(()=>{if(k.current){const t=k.current.querySelector("input");t&&t.focus()}},500)},r1=Z?e.jsx(o1,{ref:k,options:a,value:l,onChange:t1,inputValue:O,onInputChange:(o,t)=>{U(t)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:H,getOptionLabel:o=>w[o]?.name,renderInput:o=>e.jsx(h1,{...o,label:"",placeholder:T}),renderOption:(o,t)=>{const x=l.indexOf(t)!==-1;return g.createElement(C1,{component:"li",...o,key:t},I(w[t]||{}),e.jsx(c,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:x?"700":"normal"},children:N(t,w[t])||w[t]?.name}),e.jsx(c,{component:W,sx:{opacity:.5,width:18,height:18},style:{visibility:x?"visible":"hidden"}}))},...R,slots:{popper:P1}}):e.jsx(c,{className:"form-item-input slot",onClick:s1,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:l.filter(o=>a.some(t=>t.code===o)).map(o=>e.jsx(n1,{label:a.find(t=>t.code===o).name,style:{marginRight:8},size:"small"},o))});return e.jsx(B1,{className:"form",style:z,children:e.jsxs(c,{className:"form-item",children:[e.jsxs(c,{className:"form-item-label",children:[i,p&&e.jsx(M1,{})]}),e.jsxs(c,{className:"form-item-body",children:[e.jsx(c,{className:"form-item-input",children:r1}),Z?e.jsx(c,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(Y,{"data-cy":"schema-form-item-confirm",onClick:c1,disabled:h||P,size:"large",children:P?e.jsx(d1,{size:24}):e.jsx(p1,{})}),e.jsx(Y,{"data-cy":"schema-form-item-cancel",onClick:()=>{n(L),C(!1)},disabled:h||P,size:"large",children:e.jsx(W,{})})]})}):null]}),Z&&B&&e.jsx(f1,{children:B})]})})}J.propTypes={style:r.object,onSubmit:r.func,onChange:r.func,label:r.string,initialValue:r.string,required:r.bool,disabled:r.bool,triggers:r.array,options:r.array,helperText:r.string,formatterBeforeSubmit:r.func,placeholder:r.string,renderImage:r.func,filterKeys:r.arrayOf(r.string),noEmpty:r.bool,renderLabel:r.func};const C1=K.div`
1
+ import{r as g}from"./vendor-react-Dvs43sk9.js";import{j as e,bV as o1,at as K,ak as c,aj as W,z as h1,U as n1,I as Y,a6 as d1,bF as p1,F as f1,O as x1,bW as $,W as r,b7 as v1,b4 as m1,ar as g1,T as v,a3 as u,Q as V,b1 as u1}from"./vendor-mui-core-CnXrAOs3.js";import{K as j1,M as y1,e as Z1,p as L1,H as w1}from"./vendor-ux-IiQnod3w.js";import{l as _1}from"./vendor-hooks-CjESGRlR.js";import{_ as q,B as b1,a0 as E1,Y as d}from"./index-sNHCLgAE.js";import{s as O1}from"./sanitize-BEqBHa8a.js";import{F as k1}from"./form-text-input-Ce6g965V.js";import{R as M1}from"./required-BGaDOGrj.js";import{F as B1}from"./form-wrapper-C8oo_Fdy.js";import{w as Q}from"./permission-DhYNRf8T.js";import{u as R1}from"./use-app-logo-BQTE7YvS.js";import{L as j}from"./logo-uploader-D-JPEx8I.js";import{S as _}from"./section-C75bzkkL.js";import"./vendor-utils-cJEl_UEd.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-CuFtPveO.js";import"./omit-hhiOJGRf.js";import"./index-BPy8_fa2.js";import"./edit.svg-DycWG9v3.js";import"./session-BAD0lxQk.js";function J({label:i="",disabled:h=!1,required:p=!1,initialValue:s="",onChange:M=()=>{},style:z={},onSubmit:f=()=>{},triggers:m=[],options:a=[],formatterBeforeSubmit:b=Z=>Z.join(","),helperText:B="",placeholder:T="",renderImage:I=()=>null,renderLabel:N=()=>"",filterKeys:y=["name"],noEmpty:E=!1,...R}){const[Z,C]=g.useState(!1),[P,A]=g.useState(!1),[O,U]=g.useState(""),k=g.useRef(null),[L,S]=g.useState(s),[l,n]=g.useState(L),w=g.useMemo(()=>{if(!a)return{};const o={};return a.forEach(t=>{o[t.code]=t}),o},[a]),H=()=>{if(!a)return[];if(!O)return a.map(t=>t.code);const o=new RegExp(O.toLowerCase());return a.filter(t=>{for(let x=0;x<y.length;x++){const F=y[x];if(o.test(t[F]?.toLowerCase()))return!0}return!1}).map(t=>t.code)},c1=async()=>{A(!0);try{await f(typeof b=="function"?b(l):l)===!1?n(L):E&&!l.length?(n(s),S(s)):(n(l),S(l))}catch{n(L)}finally{A(!1),C(!1)}},t1=(o,t)=>{if(!Array.isArray(t)){n([]),M([]);return}const x=t.filter(F=>w[F]);if(!x.length){n([]),M([]);return}n(x),M(x)},s1=o=>{o.stopPropagation(),C(!0),setTimeout(()=>{if(k.current){const t=k.current.querySelector("input");t&&t.focus()}},500)},r1=Z?e.jsx(o1,{ref:k,options:a,value:l,onChange:t1,inputValue:O,onInputChange:(o,t)=>{U(t)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:H,getOptionLabel:o=>w[o]?.name,renderInput:o=>e.jsx(h1,{...o,label:"",placeholder:T}),renderOption:(o,t)=>{const x=l.indexOf(t)!==-1;return g.createElement(C1,{component:"li",...o,key:t},I(w[t]||{}),e.jsx(c,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:x?"700":"normal"},children:N(t,w[t])||w[t]?.name}),e.jsx(c,{component:W,sx:{opacity:.5,width:18,height:18},style:{visibility:x?"visible":"hidden"}}))},...R,slots:{popper:P1}}):e.jsx(c,{className:"form-item-input slot",onClick:s1,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:l.filter(o=>a.some(t=>t.code===o)).map(o=>e.jsx(n1,{label:a.find(t=>t.code===o).name,style:{marginRight:8},size:"small"},o))});return e.jsx(B1,{className:"form",style:z,children:e.jsxs(c,{className:"form-item",children:[e.jsxs(c,{className:"form-item-label",children:[i,p&&e.jsx(M1,{})]}),e.jsxs(c,{className:"form-item-body",children:[e.jsx(c,{className:"form-item-input",children:r1}),Z?e.jsx(c,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(Y,{"data-cy":"schema-form-item-confirm",onClick:c1,disabled:h||P,size:"large",children:P?e.jsx(d1,{size:24}):e.jsx(p1,{})}),e.jsx(Y,{"data-cy":"schema-form-item-cancel",onClick:()=>{n(L),C(!1)},disabled:h||P,size:"large",children:e.jsx(W,{})})]})}):null]}),Z&&B&&e.jsx(f1,{children:B})]})})}J.propTypes={style:r.object,onSubmit:r.func,onChange:r.func,label:r.string,initialValue:r.string,required:r.bool,disabled:r.bool,triggers:r.array,options:r.array,helperText:r.string,formatterBeforeSubmit:r.func,placeholder:r.string,renderImage:r.func,filterKeys:r.arrayOf(r.string),noEmpty:r.bool,renderLabel:r.func};const C1=K.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -1 +1 @@
1
- import{j as u,b4 as x,W as e}from"./vendor-mui-core-CnXrAOs3.js";import{$}from"./vendor-ux-RIH1nUSh.js";import{C as c}from"./vendor-utils-ByKYcWuf.js";import{_ as l,an as v,ao as j,c as y,ap as E,aq as P}from"./index-CkTEzTCn.js";function R({blocklet:o,ancestors:d=[]}){const t=l(),{inService:s}=t,n=v(o?.status)||j(o?.status),r=`?v=${o?.meta?.version}${n?"~":""}`;let a=s?`${c(E,y.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${r}`:c(t.imgPrefix,"blocklet.png");if(o.source==="registry"&&o.deployedFrom&&o.meta.logo)a=`${c(o.deployedFrom,P(o.meta.bundleDid,o.meta.logo))}${r}`;else{const g=window.env?.apiPrefix||"/",i=d.concat(o),p=s?i.slice(1):i;a=`${c(g,`/blocklet/logo-bundle${p.map(m=>`/${m.meta.did}`).join("")}`)}${r}`}return{logoUrl:a,inService:s}}function h({blocklet:o,style:d={},size:t=40,ancestors:s=[],...n}){const r=l(),{logoUrl:a,inService:g}=R({blocklet:o,ancestors:s}),{variant:i}=n,p=g?()=>{}:f=>{f.target.src=`${r.imgPrefix}/blocklet.png`};let m=u.jsx("img",{src:a,onError:p,alt:o.meta.name,style:{width:t}});return o.meta.logo||(m=u.jsx($,{did:o.meta.did||"",responsive:!0})),u.jsx(x,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:t,height:t,borderRadius:10},d),...n,children:m})}h.propTypes={blocklet:e.object.isRequired,style:e.object,size:e.oneOfType([e.number,e.string]),ancestors:e.array};export{h as B};
1
+ import{j as u,b4 as x,W as e}from"./vendor-mui-core-CnXrAOs3.js";import{$}from"./vendor-ux-IiQnod3w.js";import{C as c}from"./vendor-utils-cJEl_UEd.js";import{_ as l,an as v,ao as j,c as y,ap as E,aq as P}from"./index-sNHCLgAE.js";function R({blocklet:o,ancestors:d=[]}){const t=l(),{inService:s}=t,n=v(o?.status)||j(o?.status),r=`?v=${o?.meta?.version}${n?"~":""}`;let a=s?`${c(E,y.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${r}`:c(t.imgPrefix,"blocklet.png");if(o.source==="registry"&&o.deployedFrom&&o.meta.logo)a=`${c(o.deployedFrom,P(o.meta.bundleDid,o.meta.logo))}${r}`;else{const g=window.env?.apiPrefix||"/",i=d.concat(o),p=s?i.slice(1):i;a=`${c(g,`/blocklet/logo-bundle${p.map(m=>`/${m.meta.did}`).join("")}`)}${r}`}return{logoUrl:a,inService:s}}function h({blocklet:o,style:d={},size:t=40,ancestors:s=[],...n}){const r=l(),{logoUrl:a,inService:g}=R({blocklet:o,ancestors:s}),{variant:i}=n,p=g?()=>{}:f=>{f.target.src=`${r.imgPrefix}/blocklet.png`};let m=u.jsx("img",{src:a,onError:p,alt:o.meta.name,style:{width:t}});return o.meta.logo||(m=u.jsx($,{did:o.meta.did||"",responsive:!0})),u.jsx(x,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:t,height:t,borderRadius:10},d),...n,children:m})}h.propTypes={blocklet:e.object.isRequired,style:e.object,size:e.oneOfType([e.number,e.string]),ancestors:e.array};export{h as B};
@@ -1 +1 @@
1
- import{j as o}from"./vendor-mui-core-CnXrAOs3.js";import{n as r}from"./vendor-ux-RIH1nUSh.js";function m({...t}){return o.jsx(r,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{m as S};
1
+ import{j as o}from"./vendor-mui-core-CnXrAOs3.js";import{n as r}from"./vendor-ux-IiQnod3w.js";function m({...t}){return o.jsx(r,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{m as S};
@@ -1 +1 @@
1
- import{r as i}from"./vendor-react-Dvs43sk9.js";import{j as t,W as e}from"./vendor-mui-core-CnXrAOs3.js";import{p as s,R as c}from"./vendor-ux-RIH1nUSh.js";function m({children:p,...r}){const{t:o}=i.useContext(s);return t.jsx(c,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...r,children:p})}m.propTypes={children:e.any.isRequired};export{m as C};
1
+ import{r as i}from"./vendor-react-Dvs43sk9.js";import{j as t,W as e}from"./vendor-mui-core-CnXrAOs3.js";import{p as s,R as c}from"./vendor-ux-IiQnod3w.js";function m({children:p,...r}){const{t:o}=i.useContext(s);return t.jsx(c,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...r,children:p})}m.propTypes={children:e.any.isRequired};export{m as C};
@@ -1 +1 @@
1
- import{e}from"./vendor-react-Dvs43sk9.js";import{M as r}from"./vendor-utils-ByKYcWuf.js";const t=e(r);export{t as r};
1
+ import{e}from"./vendor-react-Dvs43sk9.js";import{M as r}from"./vendor-utils-cJEl_UEd.js";const t=e(r);export{t as r};
@@ -1,11 +1,11 @@
1
- import{at as E,j as e,ak as m,W}from"./vendor-mui-core-CnXrAOs3.js";import{ad as q,l as ne,ah as H,ay as oe,e as ae,Z as ie,az as O,c as ce,d as le,f as ue,aA as de,ak as me}from"./index-CkTEzTCn.js";import{r as d}from"./vendor-react-Dvs43sk9.js";import{V as he,O as pe,B as fe,J as ge,C as J}from"./vendor-utils-ByKYcWuf.js";import{b as we,a as j}from"./vendor-hooks-OpgB8gyY.js";import{u as xe}from"./launch-result-message-DWeUg9rM.js";import{V as be,o as ke,H as Q}from"./vendor-ux-RIH1nUSh.js";import{g as Ue}from"./get-safe-url-Cgcqi5oF.js";import{S as X}from"./button-Cg6OrnF6.js";import{S as ye}from"./layout-DsLcTLhU.js";import{p as Re,P as Se,S as Le}from"./starting-progress-BQjEEvIV.js";import"./vendor-arcblock-A4RQuZfN.js";import"./lottie-web-4koyQiv_.js";import"./content-layout-oyz1EqNZ.js";const ve=E(xe)`
1
+ import{at as E,j as e,ak as m,W}from"./vendor-mui-core-CnXrAOs3.js";import{ad as q,l as ne,ah as H,aB as oe,e as ae,Z as ie,aC as O,c as ce,d as le,f as ue,aD as de,ak as me}from"./index-sNHCLgAE.js";import{r as d}from"./vendor-react-Dvs43sk9.js";import{V as he,O as pe,B as fe,J as ge,C as J}from"./vendor-utils-cJEl_UEd.js";import{b as we,a as j}from"./vendor-hooks-CjESGRlR.js";import{u as xe}from"./launch-result-message-DWeUg9rM.js";import{V as be,o as ke,H as Q}from"./vendor-ux-IiQnod3w.js";import{g as Ue}from"./get-safe-url-DpalOXcM.js";import{S as X}from"./button-vwR-NYG5.js";import{S as ye}from"./layout-Ccrs-yyw.js";import{p as Re,P as Se,S as Le}from"./starting-progress-NSYAzE2f.js";import"./vendor-arcblock-CuFtPveO.js";import"./lottie-web-4koyQiv_.js";import"./content-layout-oyz1EqNZ.js";const ve=E(xe)`
2
2
  && .result-footer {
3
3
  height: 120px;
4
4
  > div {
5
5
  flex-wrap: wrap;
6
6
  }
7
7
  }
8
- `,je="https://launcher.arcblock.io",Ee=t=>{if(!t)return je;const{protocol:c,host:s}=he(pe(t));return`${c}//${s}`},$e=t=>t?{"__did-connect__":fe.from(JSON.stringify({switchBehavior:"auto",forceConnected:t,showClose:!1}),"utf8").toString("base64")}:{},Be=(t=0)=>new Promise(c=>setTimeout(c,t));async function Ce(t,c=5){if(!t)throw new Error("domain is required");if(typeof c!="number")throw new Error("timeout must be a number");if(c<=1)throw new Error("time must be greater than 1s");async function s(n){try{const l=`${n}://${t}`,a=await q.evaluateURL(l,{preferAccessible:!0});return a.accessible?a.url:!1}catch{return!1}}async function R(){let n=await s("https");if(n)return n;let l=c;for(;l-- >0;)if(await Be(1e3),n=await s("https"),n)return n;return n||null}const h=await R();return h?{accessible:!0,url:h}:{accessible:!1}}function Pe({onPrevious:t=()=>{},launcherSession:c={}}){const{t:s}=be(),[R,h]=d.useState(!1),[n,l]=d.useState("starting"),[a,$]=d.useState(),[g,B]=d.useState(null),{blocklet:o}=ne(),[C,P]=d.useState(!1),[p,K]=d.useState(""),S=H("fromLauncher"),Z=H("launcherUrl"),G=Ee(Z),Y=$e(c?.userDid),w=!["starting","running"].includes(n),_=n==="starting",I={stopped:s("blocklet.start"),starting:s("blocklet.starting"),running:s("blocklet.open")},T=we(async()=>{const r=o?.controller?.launcherSessionId||o?.meta?.did,i=r?`/apps/${r}/overview`:"apps",u=await oe(G);return ge(J(u,"/u/",i),Y)});d.useEffect(()=>{T().then(r=>{B(r)}).catch(()=>{B(null)})},[T]);const ee=async()=>{try{const i=new URL(window.location.href).searchParams.get("redirect");if(!i)return null;const u=await Ce(i,6);return u.accessible?u.url:null}catch(r){return console.error("checkRedirectUrl error",r),null}},A=async()=>{if(S&&g){window.location.href=g;return}P(!0);const r=await ee(),u=new URL(window.location.href).searchParams.get("redirect"),F=u&&r;if(!p||!ie(p)){Q.error(s("blocklet.gotoVisitError"));return}let U=p,v=[];if(F)try{const y=new URL(r);U=y.href,v=[y.hostname]}catch(y){console.error("Invalid redirect URL:",u,y)}const M=O.get("login_token"),V=O.get("vid"),f=new URL(U);f.host!==window.location.host&&M&&(f.pathname=J(ce.WELLKNOWN_SERVICE_PATH_PREFIX,"redirect-with-login"),f.searchParams.set("setupToken",M),V&&f.searchParams.set("visitorId",V),U=f.href),window.location.href=Ue(U,v.length?{allowDomains:v}:{}),P(!1)},L=async()=>{h(!0),l("starting");try{await le.post("/blocklet/start?fromSetup=1");const{blocklet:{status:r}={}}=await ue.getBlocklet({input:{did:o.meta.did}});h(!1),l(r),$(r==="running"?null:s("setup.complete.notRunning"))}catch(r){const i=r?.response?.data||r.message;Q.error(i),h(!1),l("stopped"),$(i)}};d.useEffect(()=>{l(o.status),["starting","running"].includes(o.status)||L()},[]),d.useEffect(()=>{p||(async()=>{const i=await q.evaluateURLs(o.site.domainAliases.map(u=>de(u.value,me)),{preferAccessible:!0});i.length>0&&K(i[0].url)})()},[o,p]);const x=j(()=>o?.children?.length,[o]),b=j(()=>o?.children?.filter(r=>ae.isBlockletRunning(r))?.length||0,[o]),k=j(()=>x?b?Math.round(Math.max(b/x,.15)*100):5:0,[b,x]),D=localStorage.getItem("blocklet-server-url"),N=_||!p;S&&!N&&(w?L():A());const te=ke(Re,w?{ml:3}:{},_?{width:`${k}%`,"&::after":{width:`${k}%`},"&::before":{width:`${k}%`,animation:"shimmer 1s infinite cubic-bezier(0.4, 0.0, 0.2, 1)","@keyframes shimmer":{"0%":{width:0},"100%":{width:`${k}%`}}}}:{}),re={starting:s("setup.complete.readyToStart"),running:s("setup.complete.title")},se=()=>C?s("setup.complete.opening"):n==="starting"&&!a?`(${b}/${x}) ${s("blocklet.starting")}`:I[n]||I.stopped,z=e.jsx(Se,{blocklets:o.children??[],status:n,debounce:!1,children:e.jsx(X,{sx:te,onClick:()=>w?L():A(),loading:N||C,children:e.jsx("span",{style:{position:"relative",zIndex:2},children:se()})})});return e.jsx(_e,{children:e.jsx(ve,{variant:a?"error":"success",title:e.jsxs(m,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[e.jsx(m,{sx:{fontSize:24,fontWeight:600},children:a?s("setup.complete.failedTitle"):re[n]||""}),n==="starting"&&!a?e.jsx(Le,{blocklets:o.children??[]}):null]}),footer:e.jsxs(Ie,{children:[w&&e.jsx(X,{variant:"outlined",disabled:R,onClick:()=>t(),children:s("setup.previous")}),S?e.jsxs(e.Fragment,{children:[e.jsx(m,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:z}),a&&g?e.jsx(m,{sx:{width:"100%",mt:2},children:e.jsx("a",{href:g,target:"_blank",rel:"noopener noreferrer",className:"back-to-server-link",children:s("launchBlocklet.nav.viewMyApps")})}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:z}),(n==="running"||a)&&!!D&&e.jsx(m,{sx:{width:"100%",mt:2},children:e.jsx("a",{href:D,target:"_blank",rel:"noopener noreferrer",className:"back-to-server-link",children:s("setup.complete.backToServer")})}),a&&e.jsx(m,{className:"error-message",sx:{fontSize:14,color:"#888",mt:1},children:a})]})]})})})}const _e=E(ye)`
8
+ `,je="https://launcher.arcblock.io",Ee=t=>{if(!t)return je;const{protocol:c,host:s}=he(pe(t));return`${c}//${s}`},Be=t=>t?{"__did-connect__":fe.from(JSON.stringify({switchBehavior:"auto",forceConnected:t,showClose:!1}),"utf8").toString("base64")}:{},Ce=(t=0)=>new Promise(c=>setTimeout(c,t));async function $e(t,c=5){if(!t)throw new Error("domain is required");if(typeof c!="number")throw new Error("timeout must be a number");if(c<=1)throw new Error("time must be greater than 1s");async function s(n){try{const l=`${n}://${t}`,a=await q.evaluateURL(l,{preferAccessible:!0});return a.accessible?a.url:!1}catch{return!1}}async function R(){let n=await s("https");if(n)return n;let l=c;for(;l-- >0;)if(await Ce(1e3),n=await s("https"),n)return n;return n||null}const h=await R();return h?{accessible:!0,url:h}:{accessible:!1}}function Pe({onPrevious:t=()=>{},launcherSession:c={}}){const{t:s}=be(),[R,h]=d.useState(!1),[n,l]=d.useState("starting"),[a,B]=d.useState(),[g,C]=d.useState(null),{blocklet:o}=ne(),[$,P]=d.useState(!1),[p,K]=d.useState(""),S=H("fromLauncher"),Z=H("launcherUrl"),G=Ee(Z),Y=Be(c?.userDid),w=!["starting","running"].includes(n),_=n==="starting",I={stopped:s("blocklet.start"),starting:s("blocklet.starting"),running:s("blocklet.open")},T=we(async()=>{const r=o?.controller?.launcherSessionId||o?.meta?.did,i=r?`/apps/${r}/overview`:"apps",u=await oe(G);return ge(J(u,"/u/",i),Y)});d.useEffect(()=>{T().then(r=>{C(r)}).catch(()=>{C(null)})},[T]);const ee=async()=>{try{const i=new URL(window.location.href).searchParams.get("redirect");if(!i)return null;const u=await $e(i,6);return u.accessible?u.url:null}catch(r){return console.error("checkRedirectUrl error",r),null}},A=async()=>{if(S&&g){window.location.href=g;return}P(!0);const r=await ee(),u=new URL(window.location.href).searchParams.get("redirect"),M=u&&r;if(!p||!ie(p)){Q.error(s("blocklet.gotoVisitError"));return}let U=p,v=[];if(M)try{const y=new URL(r);U=y.href,v=[y.hostname]}catch(y){console.error("Invalid redirect URL:",u,y)}const V=O.get("login_token"),z=O.get("vid"),f=new URL(U);f.host!==window.location.host&&V&&(f.pathname=J(ce.WELLKNOWN_SERVICE_PATH_PREFIX,"redirect-with-login"),f.searchParams.set("setupToken",V),z&&f.searchParams.set("visitorId",z),U=f.href),window.location.href=Ue(U,v.length?{allowDomains:v}:{}),P(!1)},L=async()=>{h(!0),l("starting");try{await le.post("/blocklet/start?fromSetup=1");const{blocklet:{status:r}={}}=await ue.getBlocklet({input:{did:o.meta.did}});h(!1),l(r),B(r==="running"?null:s("setup.complete.notRunning"))}catch(r){const i=r?.response?.data||r.message;Q.error(i),h(!1),l("stopped"),B(i)}};d.useEffect(()=>{l(o.status),["starting","running"].includes(o.status)||L()},[]),d.useEffect(()=>{p||(async()=>{const i=await q.evaluateURLs(o.site.domainAliases.map(u=>de(u.value,me)),{preferAccessible:!0});i.length>0&&K(i[0].url)})()},[o,p]);const x=j(()=>o?.children?.length,[o]),b=j(()=>o?.children?.filter(r=>ae.isBlockletRunning(r))?.length||0,[o]),k=j(()=>x?b?Math.round(Math.max(b/x,.15)*100):5:0,[b,x]),D=localStorage.getItem("blocklet-server-url"),N=_||!p;S&&!N&&(w?L():A());const te=ke(Re,w?{ml:3}:{},_?{width:`${k}%`,"&::after":{width:`${k}%`},"&::before":{width:`${k}%`,animation:"shimmer 1s infinite cubic-bezier(0.4, 0.0, 0.2, 1)","@keyframes shimmer":{"0%":{width:0},"100%":{width:`${k}%`}}}}:{}),re={starting:s("setup.complete.readyToStart"),running:s("setup.complete.title")},se=()=>$?s("setup.complete.opening"):n==="starting"&&!a?`(${b}/${x}) ${s("blocklet.starting")}`:I[n]||I.stopped,F=e.jsx(Se,{blocklets:o.children??[],status:n,debounce:!1,children:e.jsx(X,{sx:te,onClick:()=>w?L():A(),loading:N||$,children:e.jsx("span",{style:{position:"relative",zIndex:2},children:se()})})});return e.jsx(_e,{children:e.jsx(ve,{variant:a?"error":"success",title:e.jsxs(m,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[e.jsx(m,{sx:{fontSize:24,fontWeight:600},children:a?s("setup.complete.failedTitle"):re[n]||""}),n==="starting"&&!a?e.jsx(Le,{blocklets:o.children??[]}):null]}),footer:e.jsxs(Ie,{children:[w&&e.jsx(X,{variant:"outlined",disabled:R,onClick:()=>t(),children:s("setup.previous")}),S?e.jsxs(e.Fragment,{children:[e.jsx(m,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:F}),a&&g?e.jsx(m,{sx:{width:"100%",mt:2},children:e.jsx("a",{href:g,target:"_blank",rel:"noopener noreferrer",className:"back-to-server-link",children:s("launchBlocklet.nav.viewMyApps")})}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:F}),(n==="running"||a)&&!!D&&e.jsx(m,{sx:{width:"100%",mt:2},children:e.jsx("a",{href:D,target:"_blank",rel:"noopener noreferrer",className:"back-to-server-link",children:s("setup.complete.backToServer")})}),a&&e.jsx(m,{className:"error-message",sx:{fontSize:14,color:"#888",mt:1},children:a})]})]})})})}const _e=E(ye)`
9
9
  justify-content: center;
10
10
  .icon-success {
11
11
  width: 64px;
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("assets/vendor-ux-DYcPPYq2.css"),window.__toCdnUrl("assets/index-DrVXX4fX.css"),window.__toCdnUrl("assets/index-B5LvOF-F.css")])))=>i.map(i=>d[i]);
2
- import{ca as ae,j as D,ak as le,am as _t,W as K,ax as ze,aD as dt,b as Ve,g as Ue,a as Te,m as Gh,s as oe,_ as U,h as We,T as rt,n as va,u as $e,d_ as Hh,i as hl,k as Oa,E as wf,G as Df,l as Pn,B as Yh,H as Kh,D as _n,c as Yt,I as tt,t as Qh,q as Pf,ar as Xh,c2 as dr,Q as wn,R as Tf,K as Zh,L as Jh,N as lo,O as eg,P as tg,A as ng,Y as Gi,Z as Is,$ as Hi,J as _a,a0 as As,a1 as rg,a2 as ag,aH as js,at as st,aL as og,dN as ig,d$ as lg,bE as sg,aJ as Ls,aI as ug,c6 as cg,c7 as Bs,e0 as dg,e1 as fg,e2 as pg,cc as gl,bb as Mr,an as mg,cb as Sf,aX as Ns,z as mt,b1 as kf,dJ as Rf,e3 as hg,M as Vt,a6 as an,bd as Ef,e4 as gg,b4 as bg,a$ as Ia,e5 as vg,bq as yg,b6 as Yi,br as Fs,cN as Cg,aZ as xg,e6 as wg,dt as Mf,by as Of,bf as Dg,d9 as Pg,e7 as Tg,bC as $s,a5 as qs,e8 as Sg,bg as kg}from"./vendor-mui-core-CnXrAOs3.js";import{ax as zs,n as Vs,C as yr,ay as Rg,aw as Eg}from"./vendor-utils-ByKYcWuf.js";import{d as Pe,a as Me,e as ln,g as _f,r as O,c as bl,b as Mg,i as If}from"./vendor-react-Dvs43sk9.js";import{b7 as ne,X as Og,V as ut,H as je,bf as re,bg as Af,bh as sn,bi as Kt,bj as Tt,bk as Or,bl as Aa,bm as Ye,bn as ja,bo as La,bp as vl,bq as Ba,br as jf,bs as Na,bt as Fa,bu as _g,bv as Ig,bw as Ag,bx as jg,by as Lg,bz as Bg,bA as Ng,bB as Fg,bC as $g,bD as qg,bE as zg,bF as jt,bG as It,bH as $a,bI as un,bJ as Lf,bK as yl,bL as Bf,bM as Vg,bN as Ug,bO as Wg,bP as In,bQ as cn,bR as Gg,bS as Hg,bT as Yg,bU as Kg,bV as Qg,bW as Xg,bX as _r,bY as Zg,bZ as Jg,b_ as eb,b$ as tb,ac as Us,ad as nb,ae as rb,af as ab,c0 as Nf,c1 as ob,c2 as ib,c3 as lb,c4 as sb,c5 as ub,c6 as cb,c7 as db,c8 as fb,c9 as pb,ca as mb,cb as hb,p as Qt,b as qa,_ as gb,Q as bb,z as so,U as Pt,n as uo,i as vb}from"./vendor-ux-RIH1nUSh.js";import{_ as ft,ac as dn,a0 as Tn,Y as At,e as Ne,B as Cr,ct as yb,c as be,ci as Sn,ch as Ff,aA as $f,cu as qf,Z as Cb,a2 as fr,aw as xb,cv as wb}from"./index-CkTEzTCn.js";import{f as Dt}from"./index-DBs9Ljax.js";import{b as Db,W as kn,u as Cl,B as Ki}from"./dashboard-CQ72RYH1.js";import{S as Pb}from"./switch-control-BHqY-fHZ.js";import{P as Qi,w as za}from"./permission-COoKrWxk.js";import{u as zf,r as Tb}from"./vendor-mui-x-bJ5idfMH.js";import{r as Se,A as xl,B as pt,C as ya,D as Xi,t as De,E as Vf,F as Uf,c as Zi,o as Sb,G as $t,H as kb,I as Rb,J as Ji,K as Wf,L as Eb,M as Mb,N as Gf,O as wl,P as Ws,Q as Ob,R as Gs,S as _b,T as Ib,p as Ab,a as Hs,b as jb,j as co,h as Ys,m as Lb,k as qr,u as mn,i as Bb,n as Nb,g as zr,f as fo,d as Vr,s as po,e as mo,x as Fb,z as $b,q as qb,l as zb,v as Vb,w as Ub,U as Wb,y as Gb,V as Hb,W as Yb}from"./index-C2c32kYu.js";import{f as Kb,d as Ks,c as Qb,b as Oe,_ as Re,a as Ee}from"./createClass-BQSl7_FJ.js";import{u as ke,a as ue,r as xr,w as Ca,g as Hf,b as fn,e as Yf,c as Xb,d as Zb,o as el}from"./raf-schd.esm-CHNehTG3.js";import{s as Jb}from"./sanitize-Bib7lw-G.js";import{C as Qs}from"./click-to-copy-8VrSVycN.js";import{v as ho}from"./index-CrRuO2BQ.js";import{A as ev,a as tv,b as nv,I as rv,f as av,B as ov,d as iv}from"./add-component-core-CDw-LKTz.js";import{C as An}from"./confirm-BCjJ3Xga.js";import{a as xa,v as lv}from"./util-D4K1svNc.js";import{C as sv}from"./lock.svg-COUP8tyO.js";import{D as uv}from"./delete-confirm-D2vWlDhQ.js";import{e as cv}from"./engine-BkRDnUT9.js";import{I as dv}from"./iframe-UTQ_4DZf.js";import{B as fv}from"./bundle-avatar-DKBZZwLh.js";import{A as Kf}from"./actions-DqoNrBDK.js";import{v as go}from"./index-Ch4CmFJG.js";import{W as pv}from"./did-address-BxZuOgUQ.js";import{b as mv}from"./vendor-hooks-OpgB8gyY.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-A4RQuZfN.js";import"./useLocalStorage-DZQPax49.js";import"./get-safe-url-Cgcqi5oF.js";import"./session-GdZETrt0.js";import"./team-aiCyLcOV.js";import"./isURL-CyShrkvP.js";import"./use-app-logo-Duu7Oh3J.js";import"./passport-CScachCU.js";import"./create-passport-svg-BYZ8eY0w.js";import"./useAsyncRetry-C8ETjgdm.js";import"./useAsync-BvASW8Y8.js";import"./useSetState-DFuQZPPV.js";import"./index-CRlbskWD.js";import"./over-due-invoice-payment-mGIRggXd.js";import"./use-mobile-DCNBsOlH.js";import"./index-D2k5qLgT.js";import"./omit-CigYLGmT.js";import"./index-BPy8_fa2.js";import"./item-CBDRQx8K.js";import"./wait-connect-KtqPocoC.js";import"./launch-result-message-DWeUg9rM.js";import"./page-header-DCvzRay5.js";import"./config-space-u-t0AaTk.js";import"./spaces-iPLS3X1a.js";import"./api-BNrHV6cZ.js";import"./required-BGaDOGrj.js";import"./index-bAaF7GbQ.js";import"./Google-DL2G-Im-.js";import"./cloneDeep-D_w1MBt4.js";import"./form-wrapper-C8oo_Fdy.js";import"./logo-uploader-DRaSgU8c.js";import"./collapse-BMy0GGFk.js";import"./index-De-Vgsb6.js";import"./config-zjFvoy0D.js";import"./section-C75bzkkL.js";import"./form-text-input-BZq_zjB8.js";import"./edit.svg-DycWG9v3.js";import"./index-OYI_VqY3.js";import"./use-mobile-maRlSUwU.js";import"./content-layout-oyz1EqNZ.js";import"./connect-to-DcXC96wu.js";import"./index-BydChKjR.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./search-4YYphs0l.js";var hv=36e5;function gv(e,t){Se(2,arguments);var n=pt(t);return xl(e,n*hv)}var bv=864e5;function vv(e,t){Se(2,arguments);var n=ya(e),a=ya(t),r=n.getTime()-Xi(n),o=a.getTime()-Xi(a);return Math.round((r-o)/bv)}var yv=6e4;function Cv(e,t){Se(2,arguments);var n=pt(t);return xl(e,n*yv)}function xv(e,t){Se(2,arguments);var n=pt(t);return xl(e,n*1e3)}function hr(e,t){Se(2,arguments);var n=De(e),a=De(t),r=n.getTime()-a.getTime();return r<0?-1:r>0?1:r}function wv(e,t){Se(2,arguments);var n=De(e),a=De(t);return n.getFullYear()-a.getFullYear()}function Xs(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Qf(e,t){Se(2,arguments);var n=De(e),a=De(t),r=Xs(n,a),o=Math.abs(vv(n,a));n.setDate(n.getDate()-r*o);var i=+(Xs(n,a)===-r),l=r*(o-i);return l===0?0:l}function Va(e,t){return Se(2,arguments),De(e).getTime()-De(t).getTime()}var Zs={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Dv="trunc";function Ir(e){return e?Zs[e]:Zs[Dv]}function Pv(e,t,n){Se(2,arguments);var a=Va(e,t)/Vf;return Ir(void 0)(a)}function Tv(e,t,n){Se(2,arguments);var a=Va(e,t)/Uf;return Ir(void 0)(a)}function tl(e){Se(1,arguments);var t=De(e);return t.setHours(23,59,59,999),t}function Sv(e){Se(1,arguments);var t=De(e);return tl(t).getTime()===Zi(t).getTime()}function Xf(e,t){Se(2,arguments);var n=De(e),a=De(t),r=hr(n,a),o=Math.abs(Sb(n,a)),i;if(o<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-r*o);var l=hr(n,a)===-r;Sv(De(e))&&o===1&&hr(e,a)===1&&(l=!1),i=r*(o-Number(l))}return i===0?0:i}function kv(e,t,n){Se(2,arguments);var a=Xf(e,t)/3;return Ir(void 0)(a)}function Rv(e,t,n){Se(2,arguments);var a=Va(e,t)/1e3;return Ir(void 0)(a)}function Ev(e,t,n){Se(2,arguments);var a=Qf(e,t)/7;return Ir(void 0)(a)}function Mv(e,t){Se(2,arguments);var n=De(e),a=De(t),r=hr(n,a),o=Math.abs(wv(n,a));n.setFullYear(1584),a.setFullYear(1584);var i=hr(n,a)===-r,l=r*(o-Number(i));return l===0?0:l}function Ov(e,t){var n;Se(1,arguments);var a=e||{},r=De(a.start),o=De(a.end),i=o.getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var l=[],u=r;u.setHours(0,0,0,0);var s=Number((n=void 0)!==null&&n!==void 0?n:1);if(s<1||isNaN(s))throw new RangeError("`options.step` must be a number greater than 1");for(;u.getTime()<=i;)l.push(De(u)),u.setDate(u.getDate()+s),u.setHours(0,0,0,0);return l}function _v(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Iv(e,t){var n,a;Se(1,arguments);var r=De(e);if(isNaN(r.getTime()))throw new RangeError("Invalid time value");var o=String((n=t?.format)!==null&&n!==void 0?n:"extended"),i=String((a=t?.representation)!==null&&a!==void 0?a:"complete");if(o!=="extended"&&o!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var l="",u="",s=o==="extended"?"-":"",f=o==="extended"?":":"";if(i!=="time"){var d=$t(r.getDate(),2),c=$t(r.getMonth()+1,2),v=$t(r.getFullYear(),4);l="".concat(v).concat(s).concat(c).concat(s).concat(d)}if(i!=="date"){var y=r.getTimezoneOffset();if(y!==0){var g=Math.abs(y),C=$t(Math.floor(g/60),2),h=$t(g%60,2),p=y<0?"+":"-";u="".concat(p).concat(C,":").concat(h)}else u="Z";var m=$t(r.getHours(),2),b=$t(r.getMinutes(),2),k=$t(r.getSeconds(),2),x=l===""?"":"T",w=[m,b,k].join(f);l="".concat(l).concat(x).concat(w).concat(u)}return l}function Av(e){Se(1,arguments);var t=De(e),n=t.getDay();return n}function jv(e){Se(1,arguments);var t=De(e),n=t.getHours();return n}function Lv(e){Se(1,arguments);var t=De(e),n=t.getMinutes();return n}function Bv(e){Se(1,arguments);var t=De(e),n=t.getSeconds();return n}function Nv(e,t){Se(2,arguments);var n=De(e),a=De(t);return n.getTime()===a.getTime()}function Js(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Kb(e))||t){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(s){throw s},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ import{ca as ae,j as D,ak as le,am as _t,W as K,ax as ze,aD as dt,b as Ve,g as Ue,a as Te,m as Gh,s as oe,_ as U,h as We,T as rt,n as va,u as $e,d_ as Hh,i as hl,k as Oa,E as wf,G as Df,l as Pn,B as Yh,H as Kh,D as _n,c as Yt,I as tt,t as Qh,q as Pf,ar as Xh,c2 as dr,Q as wn,R as Tf,K as Zh,L as Jh,N as lo,O as eg,P as tg,A as ng,Y as Gi,Z as Is,$ as Hi,J as _a,a0 as As,a1 as rg,a2 as ag,aH as js,at as st,aL as og,dN as ig,d$ as lg,bE as sg,aJ as Ls,aI as ug,c6 as cg,c7 as Bs,e0 as dg,e1 as fg,e2 as pg,cc as gl,bb as Mr,an as mg,cb as Sf,aX as Ns,z as mt,b1 as kf,dJ as Rf,e3 as hg,M as Vt,a6 as an,bd as Ef,e4 as gg,b4 as bg,a$ as Ia,e5 as vg,bq as yg,b6 as Yi,br as Fs,cN as Cg,aZ as xg,e6 as wg,dt as Mf,by as Of,bf as Dg,d9 as Pg,e7 as Tg,bC as $s,a5 as qs,e8 as Sg,bg as kg}from"./vendor-mui-core-CnXrAOs3.js";import{ax as zs,n as Vs,C as yr,ay as Rg,aw as Eg}from"./vendor-utils-cJEl_UEd.js";import{d as Pe,a as Me,e as ln,g as _f,r as O,c as bl,b as Mg,i as If}from"./vendor-react-Dvs43sk9.js";import{b0 as ne,X as Og,V as ut,H as je,b8 as re,b9 as Af,ba as sn,bb as Kt,bc as Tt,bd as Or,be as Aa,bf as Ye,bg as ja,bh as La,bi as vl,bj as Ba,bk as jf,bl as Na,bm as Fa,bn as _g,bo as Ig,bp as Ag,bq as jg,br as Lg,bs as Bg,bt as Ng,bu as Fg,bv as $g,bw as qg,bx as zg,by as jt,bz as It,bA as $a,bB as un,bC as Lf,bD as yl,bE as Bf,bF as Vg,bG as Ug,bH as Wg,bI as In,bJ as cn,bK as Gg,bL as Hg,bM as Yg,bN as Kg,bO as Qg,bP as Xg,bQ as _r,bR as Zg,bS as Jg,bT as eb,bU as tb,ac as Us,ad as nb,ae as rb,af as ab,bV as Nf,bW as ob,bX as ib,bY as lb,bZ as sb,b_ as ub,b$ as cb,c0 as db,c1 as fb,c2 as pb,c3 as mb,c4 as hb,p as Qt,b as qa,_ as gb,Q as bb,z as so,U as Pt,n as uo,i as vb}from"./vendor-ux-IiQnod3w.js";import{_ as ft,ac as dn,a0 as Tn,Y as At,e as Ne,B as Cr,cr as yb,c as be,cg as Sn,cf as Ff,aD as $f,cs as qf,Z as Cb,a2 as fr,az as xb,ct as wb}from"./index-sNHCLgAE.js";import{f as Dt}from"./index-DBs9Ljax.js";import{b as Db,W as kn,u as Cl,B as Ki}from"./dashboard-Dw224r_Y.js";import{S as Pb}from"./switch-control-CHsjrwFX.js";import{P as Qi,w as za}from"./permission-DhYNRf8T.js";import{u as zf,r as Tb}from"./vendor-mui-x-bJ5idfMH.js";import{r as Se,A as xl,B as pt,C as ya,D as Xi,t as De,E as Vf,F as Uf,c as Zi,o as Sb,G as $t,H as kb,I as Rb,J as Ji,K as Wf,L as Eb,M as Mb,N as Gf,O as wl,P as Ws,Q as Ob,R as Gs,S as _b,T as Ib,p as Ab,a as Hs,b as jb,j as co,h as Ys,m as Lb,k as qr,u as mn,i as Bb,n as Nb,g as zr,f as fo,d as Vr,s as po,e as mo,x as Fb,z as $b,q as qb,l as zb,v as Vb,w as Ub,U as Wb,y as Gb,V as Hb,W as Yb}from"./index-DBJMdrD8.js";import{f as Kb,d as Ks,c as Qb,b as Oe,_ as Re,a as Ee}from"./createClass-C0dSRoDm.js";import{u as ke,a as ue,r as xr,w as Ca,g as Hf,b as fn,e as Yf,c as Xb,d as Zb,o as el}from"./raf-schd.esm-CHNehTG3.js";import{s as Jb}from"./sanitize-BEqBHa8a.js";import{C as Qs}from"./click-to-copy-BOJgIYli.js";import{v as ho}from"./index-DicW-7Bz.js";import{A as ev,a as tv,b as nv,I as rv,f as av,B as ov,d as iv}from"./add-component-core-BmqcC6wx.js";import{C as An}from"./confirm-CR8be0u2.js";import{a as xa,v as lv}from"./util-BsAmOTBh.js";import{C as sv}from"./lock.svg-COUP8tyO.js";import{D as uv}from"./delete-confirm-DhJd_sYk.js";import{e as cv}from"./engine-DPn0LHHl.js";import{I as dv}from"./iframe-BUJLmqjE.js";import{B as fv}from"./bundle-avatar-CTtvmGO1.js";import{A as Kf}from"./actions-DqoNrBDK.js";import{v as go}from"./index-l32Mt1U_.js";import{W as pv}from"./did-address-QgOhyegQ.js";import{b as mv}from"./vendor-hooks-CjESGRlR.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-CuFtPveO.js";import"./useLocalStorage-C9RLNbTa.js";import"./get-safe-url-DpalOXcM.js";import"./session-BAD0lxQk.js";import"./team-DQuySqMB.js";import"./isURL-D_2bLHU_.js";import"./use-app-logo-BQTE7YvS.js";import"./passport-Y64u4kIS.js";import"./create-passport-svg-C7Utfs-J.js";import"./useAsyncRetry-DwwEjrjs.js";import"./useAsync-cZ_FPf9k.js";import"./useSetState-DFuQZPPV.js";import"./index-C45ih46D.js";import"./over-due-invoice-payment-DUg5ApsD.js";import"./use-mobile-DCNBsOlH.js";import"./index-FpxO_1p7.js";import"./omit-hhiOJGRf.js";import"./index-BPy8_fa2.js";import"./item-BnTXSpRf.js";import"./wait-connect-DiO80nu-.js";import"./launch-result-message-DWeUg9rM.js";import"./page-header-DCvzRay5.js";import"./config-space-zpk7zMxf.js";import"./spaces-B0p4-23K.js";import"./api-Btn0Tp3W.js";import"./required-BGaDOGrj.js";import"./index-5h5rz7VN.js";import"./Google-CAi86Mf6.js";import"./cloneDeep-C6qewg0C.js";import"./form-wrapper-C8oo_Fdy.js";import"./logo-uploader-D-JPEx8I.js";import"./collapse-BMy0GGFk.js";import"./index-De-Vgsb6.js";import"./config-Ceq_JEL5.js";import"./section-C75bzkkL.js";import"./form-text-input-Ce6g965V.js";import"./edit.svg-DycWG9v3.js";import"./use-mobile-maRlSUwU.js";import"./content-layout-oyz1EqNZ.js";import"./connect-to-CmnRyCBb.js";import"./index-COTazo1u.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./search-4YYphs0l.js";var hv=36e5;function gv(e,t){Se(2,arguments);var n=pt(t);return xl(e,n*hv)}var bv=864e5;function vv(e,t){Se(2,arguments);var n=ya(e),a=ya(t),r=n.getTime()-Xi(n),o=a.getTime()-Xi(a);return Math.round((r-o)/bv)}var yv=6e4;function Cv(e,t){Se(2,arguments);var n=pt(t);return xl(e,n*yv)}function xv(e,t){Se(2,arguments);var n=pt(t);return xl(e,n*1e3)}function hr(e,t){Se(2,arguments);var n=De(e),a=De(t),r=n.getTime()-a.getTime();return r<0?-1:r>0?1:r}function wv(e,t){Se(2,arguments);var n=De(e),a=De(t);return n.getFullYear()-a.getFullYear()}function Xs(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Qf(e,t){Se(2,arguments);var n=De(e),a=De(t),r=Xs(n,a),o=Math.abs(vv(n,a));n.setDate(n.getDate()-r*o);var i=+(Xs(n,a)===-r),l=r*(o-i);return l===0?0:l}function Va(e,t){return Se(2,arguments),De(e).getTime()-De(t).getTime()}var Zs={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Dv="trunc";function Ir(e){return e?Zs[e]:Zs[Dv]}function Pv(e,t,n){Se(2,arguments);var a=Va(e,t)/Vf;return Ir(void 0)(a)}function Tv(e,t,n){Se(2,arguments);var a=Va(e,t)/Uf;return Ir(void 0)(a)}function tl(e){Se(1,arguments);var t=De(e);return t.setHours(23,59,59,999),t}function Sv(e){Se(1,arguments);var t=De(e);return tl(t).getTime()===Zi(t).getTime()}function Xf(e,t){Se(2,arguments);var n=De(e),a=De(t),r=hr(n,a),o=Math.abs(Sb(n,a)),i;if(o<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-r*o);var l=hr(n,a)===-r;Sv(De(e))&&o===1&&hr(e,a)===1&&(l=!1),i=r*(o-Number(l))}return i===0?0:i}function kv(e,t,n){Se(2,arguments);var a=Xf(e,t)/3;return Ir(void 0)(a)}function Rv(e,t,n){Se(2,arguments);var a=Va(e,t)/1e3;return Ir(void 0)(a)}function Ev(e,t,n){Se(2,arguments);var a=Qf(e,t)/7;return Ir(void 0)(a)}function Mv(e,t){Se(2,arguments);var n=De(e),a=De(t),r=hr(n,a),o=Math.abs(wv(n,a));n.setFullYear(1584),a.setFullYear(1584);var i=hr(n,a)===-r,l=r*(o-Number(i));return l===0?0:l}function Ov(e,t){var n;Se(1,arguments);var a=e||{},r=De(a.start),o=De(a.end),i=o.getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var l=[],u=r;u.setHours(0,0,0,0);var s=Number((n=void 0)!==null&&n!==void 0?n:1);if(s<1||isNaN(s))throw new RangeError("`options.step` must be a number greater than 1");for(;u.getTime()<=i;)l.push(De(u)),u.setDate(u.getDate()+s),u.setHours(0,0,0,0);return l}function _v(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Iv(e,t){var n,a;Se(1,arguments);var r=De(e);if(isNaN(r.getTime()))throw new RangeError("Invalid time value");var o=String((n=t?.format)!==null&&n!==void 0?n:"extended"),i=String((a=t?.representation)!==null&&a!==void 0?a:"complete");if(o!=="extended"&&o!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var l="",u="",s=o==="extended"?"-":"",f=o==="extended"?":":"";if(i!=="time"){var d=$t(r.getDate(),2),c=$t(r.getMonth()+1,2),v=$t(r.getFullYear(),4);l="".concat(v).concat(s).concat(c).concat(s).concat(d)}if(i!=="date"){var y=r.getTimezoneOffset();if(y!==0){var g=Math.abs(y),C=$t(Math.floor(g/60),2),h=$t(g%60,2),p=y<0?"+":"-";u="".concat(p).concat(C,":").concat(h)}else u="Z";var m=$t(r.getHours(),2),b=$t(r.getMinutes(),2),k=$t(r.getSeconds(),2),x=l===""?"":"T",w=[m,b,k].join(f);l="".concat(l).concat(x).concat(w).concat(u)}return l}function Av(e){Se(1,arguments);var t=De(e),n=t.getDay();return n}function jv(e){Se(1,arguments);var t=De(e),n=t.getHours();return n}function Lv(e){Se(1,arguments);var t=De(e),n=t.getMinutes();return n}function Bv(e){Se(1,arguments);var t=De(e),n=t.getSeconds();return n}function Nv(e,t){Se(2,arguments);var n=De(e),a=De(t);return n.getTime()===a.getTime()}function Js(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Kb(e))||t){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(s){throw s},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var s=n.next();return i=s.done,s},e:function(s){l=!0,o=s},f:function(){try{i||n.return==null||n.return()}finally{if(l)throw o}}}}function Zf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zf=function(){return!!e})()}function _e(e){var t=Zf();return function(){var n,a=Ks(e);if(t){var r=Ks(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return Qb(this,n)}}var Fv=10,Jf=function(){function e(){Ee(this,e),ne(this,"priority",void 0),ne(this,"subPriority",0)}return Re(e,[{key:"validate",value:function(n,a){return!0}}]),e}(),$v=function(e){Oe(n,e);var t=_e(n);function n(a,r,o,i,l){var u;return Ee(this,n),u=t.call(this),u.value=a,u.validateValue=r,u.setValue=o,u.priority=i,l&&(u.subPriority=l),u}return Re(n,[{key:"validate",value:function(r,o){return this.validateValue(r,this.value,o)}},{key:"set",value:function(r,o,i){return this.setValue(r,o,this.value,i)}}]),n}(Jf),qv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",Fv),ne(ae(a),"subPriority",-1),a}return Re(n,[{key:"set",value:function(r,o){if(o.timestampIsSet)return r;var i=new Date(0);return i.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),i.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),i}}]),n}(Jf),Le=function(){function e(){Ee(this,e),ne(this,"incompatibleTokens",void 0),ne(this,"priority",void 0),ne(this,"subPriority",void 0)}return Re(e,[{key:"run",value:function(n,a,r,o){var i=this.parse(n,a,r,o);return i?{setter:new $v(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(n,a,r){return!0}}]),e}(),zv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",140),ne(ae(a),"incompatibleTokens",["R","u","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"})||i.era(r,{width:"narrow"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})||i.era(r,{width:"abbreviated"})||i.era(r,{width:"narrow"})}}},{key:"set",value:function(r,o,i){return o.era=i,r.setUTCFullYear(i,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Ze={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Et={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Je(e,t){return e&&{value:t(e.value),rest:e.rest}}function He(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Mt(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var a=n[1]==="+"?1:-1,r=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:a*(r*Vf+o*Uf+i*kb),rest:t.slice(n[0].length)}}function ep(e){return He(Ze.anyDigitsSigned,e)}function Xe(e,t){switch(e){case 1:return He(Ze.singleDigit,t);case 2:return He(Ze.twoDigits,t);case 3:return He(Ze.threeDigits,t);case 4:return He(Ze.fourDigits,t);default:return He(new RegExp("^\\d{1,"+e+"}"),t)}}function wa(e,t){switch(e){case 1:return He(Ze.singleDigitSigned,t);case 2:return He(Ze.twoDigitsSigned,t);case 3:return He(Ze.threeDigitsSigned,t);case 4:return He(Ze.fourDigitsSigned,t);default:return He(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Dl(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function tp(e,t){var n=t>0,a=n?t:1-t,r;if(a<=50)r=e||100;else{var o=a+50,i=Math.floor(o/100)*100,l=e>=o%100;r=e+i-(l?100:0)}return n?r:1-r}function np(e){return e%400===0||e%4===0&&e%100!==0}var Vv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",130),ne(ae(a),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return{year:s,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Je(Xe(4,r),l);case"yo":return Je(i.ordinalNumber(r,{unit:"year"}),l);default:return Je(Xe(o.length,r),l)}}},{key:"validate",value:function(r,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(r,o,i){var l=r.getUTCFullYear();if(i.isTwoDigitYear){var u=tp(i.year,l);return r.setUTCFullYear(u,0,1),r.setUTCHours(0,0,0,0),r}var s=!("era"in o)||o.era===1?i.year:1-i.year;return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Uv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",130),ne(ae(a),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return{year:s,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Je(Xe(4,r),l);case"Yo":return Je(i.ordinalNumber(r,{unit:"year"}),l);default:return Je(Xe(o.length,r),l)}}},{key:"validate",value:function(r,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(r,o,i,l){var u=Rb(r,l);if(i.isTwoDigitYear){var s=tp(i.year,u);return r.setUTCFullYear(s,0,l.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Ji(r,l)}var f=!("era"in o)||o.era===1?i.year:1-i.year;return r.setUTCFullYear(f,0,l.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Ji(r,l)}}]),n}(Le),Wv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",130),ne(ae(a),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o){return wa(o==="R"?4:o.length,r)}},{key:"set",value:function(r,o,i){var l=new Date(0);return l.setUTCFullYear(i,0,4),l.setUTCHours(0,0,0,0),Wf(l)}}]),n}(Le),Gv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",130),ne(ae(a),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o){return wa(o==="u"?4:o.length,r)}},{key:"set",value:function(r,o,i){return r.setUTCFullYear(i,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Hv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",120),ne(ae(a),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"Q":case"QQ":return Xe(o.length,r);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"})||i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(r,{width:"wide",context:"formatting"})||i.quarter(r,{width:"abbreviated",context:"formatting"})||i.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,o){return o>=1&&o<=4}},{key:"set",value:function(r,o,i){return r.setUTCMonth((i-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Yv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",120),ne(ae(a),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"q":case"qq":return Xe(o.length,r);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"})||i.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(r,{width:"wide",context:"standalone"})||i.quarter(r,{width:"abbreviated",context:"standalone"})||i.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,o){return o>=1&&o<=4}},{key:"set",value:function(r,o,i){return r.setUTCMonth((i-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Kv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ne(ae(a),"priority",110),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return s-1};switch(o){case"M":return Je(He(Ze.month,r),l);case"MM":return Je(Xe(2,r),l);case"Mo":return Je(i.ordinalNumber(r,{unit:"month"}),l);case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"})||i.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(r,{width:"wide",context:"formatting"})||i.month(r,{width:"abbreviated",context:"formatting"})||i.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,i){return r.setUTCMonth(i,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Qv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",110),ne(ae(a),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return s-1};switch(o){case"L":return Je(He(Ze.month,r),l);case"LL":return Je(Xe(2,r),l);case"Lo":return Je(i.ordinalNumber(r,{unit:"month"}),l);case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"})||i.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(r,{width:"wide",context:"standalone"})||i.month(r,{width:"abbreviated",context:"standalone"})||i.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,i){return r.setUTCMonth(i,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le);function Xv(e,t,n){Se(2,arguments);var a=De(e),r=pt(t),o=Eb(a,n)-r;return a.setUTCDate(a.getUTCDate()-o*7),a}var Zv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",100),ne(ae(a),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"w":return He(Ze.week,r);case"wo":return i.ordinalNumber(r,{unit:"week"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=53}},{key:"set",value:function(r,o,i,l){return Ji(Xv(r,i,l),l)}}]),n}(Le);function Jv(e,t){Se(2,arguments);var n=De(e),a=pt(t),r=Mb(n)-a;return n.setUTCDate(n.getUTCDate()-r*7),n}var ey=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",100),ne(ae(a),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"I":return He(Ze.week,r);case"Io":return i.ordinalNumber(r,{unit:"week"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=53}},{key:"set",value:function(r,o,i){return Wf(Jv(r,i))}}]),n}(Le),ty=[31,28,31,30,31,30,31,31,30,31,30,31],ny=[31,29,31,30,31,30,31,31,30,31,30,31],ry=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"subPriority",1),ne(ae(a),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"d":return He(Ze.date,r);case"do":return i.ordinalNumber(r,{unit:"date"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){var i=r.getUTCFullYear(),l=np(i),u=r.getUTCMonth();return l?o>=1&&o<=ny[u]:o>=1&&o<=ty[u]}},{key:"set",value:function(r,o,i){return r.setUTCDate(i),r.setUTCHours(0,0,0,0),r}}]),n}(Le),ay=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"subpriority",1),ne(ae(a),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"D":case"DD":return He(Ze.dayOfYear,r);case"Do":return i.ordinalNumber(r,{unit:"date"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){var i=r.getUTCFullYear(),l=np(i);return l?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(r,o,i){return r.setUTCMonth(0,i),r.setUTCHours(0,0,0,0),r}}]),n}(Le);function Pl(e,t,n){var a,r,o,i,l,u,s,f;Se(2,arguments);var d=Gf(),c=pt((a=(r=(o=(i=n?.weekStartsOn)!==null&&i!==void 0?i:n==null||(l=n.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&o!==void 0?o:d.weekStartsOn)!==null&&r!==void 0?r:(s=d.locale)===null||s===void 0||(f=s.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&a!==void 0?a:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=De(e),y=pt(t),g=v.getUTCDay(),C=y%7,h=(C+7)%7,p=(h<c?7:0)+y-g;return v.setUTCDate(v.getUTCDate()+p),v}var oy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"incompatibleTokens",["D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(r,{width:"wide",context:"formatting"})||i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,i,l){return r=Pl(r,i,l),r.setUTCHours(0,0,0,0),r}}]),n}(Le),iy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i,l){var u=function(f){var d=Math.floor((f-1)/7)*7;return(f+l.weekStartsOn+6)%7+d};switch(o){case"e":case"ee":return Je(Xe(o.length,r),u);case"eo":return Je(i.ordinalNumber(r,{unit:"day"}),u);case"eee":return i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(r,{width:"wide",context:"formatting"})||i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,i,l){return r=Pl(r,i,l),r.setUTCHours(0,0,0,0),r}}]),n}(Le),ly=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i,l){var u=function(f){var d=Math.floor((f-1)/7)*7;return(f+l.weekStartsOn+6)%7+d};switch(o){case"c":case"cc":return Je(Xe(o.length,r),u);case"co":return Je(i.ordinalNumber(r,{unit:"day"}),u);case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"})||i.day(r,{width:"short",context:"standalone"})||i.day(r,{width:"narrow",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"})||i.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(r,{width:"wide",context:"standalone"})||i.day(r,{width:"abbreviated",context:"standalone"})||i.day(r,{width:"short",context:"standalone"})||i.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,i,l){return r=Pl(r,i,l),r.setUTCHours(0,0,0,0),r}}]),n}(Le);function sy(e,t){Se(2,arguments);var n=pt(t);n%7===0&&(n=n-7);var a=1,r=De(e),o=r.getUTCDay(),i=n%7,l=(i+7)%7,u=(l<a?7:0)+n-o;return r.setUTCDate(r.getUTCDate()+u),r}var uy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return s===0?7:s};switch(o){case"i":case"ii":return Xe(o.length,r);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return Je(i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"}),l);case"iiiii":return Je(i.day(r,{width:"narrow",context:"formatting"}),l);case"iiiiii":return Je(i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"}),l);case"iiii":default:return Je(i.day(r,{width:"wide",context:"formatting"})||i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"}),l)}}},{key:"validate",value:function(r,o){return o>=1&&o<=7}},{key:"set",value:function(r,o,i){return r=sy(r,i),r.setUTCHours(0,0,0,0),r}}]),n}(Le),cy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",80),ne(ae(a),"incompatibleTokens",["b","B","H","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"a":case"aa":case"aaa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})||i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,o,i){return r.setUTCHours(Dl(i),0,0,0),r}}]),n}(Le),dy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",80),ne(ae(a),"incompatibleTokens",["a","B","H","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"b":case"bb":case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})||i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,o,i){return r.setUTCHours(Dl(i),0,0,0),r}}]),n}(Le),fy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",80),ne(ae(a),"incompatibleTokens",["a","b","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})||i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,o,i){return r.setUTCHours(Dl(i),0,0,0),r}}]),n}(Le),py=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",70),ne(ae(a),"incompatibleTokens",["H","K","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"h":return He(Ze.hour12h,r);case"ho":return i.ordinalNumber(r,{unit:"hour"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=12}},{key:"set",value:function(r,o,i){var l=r.getUTCHours()>=12;return l&&i<12?r.setUTCHours(i+12,0,0,0):!l&&i===12?r.setUTCHours(0,0,0,0):r.setUTCHours(i,0,0,0),r}}]),n}(Le),my=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",70),ne(ae(a),"incompatibleTokens",["a","b","h","K","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"H":return He(Ze.hour23h,r);case"Ho":return i.ordinalNumber(r,{unit:"hour"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=23}},{key:"set",value:function(r,o,i){return r.setUTCHours(i,0,0,0),r}}]),n}(Le),hy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",70),ne(ae(a),"incompatibleTokens",["h","H","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"K":return He(Ze.hour11h,r);case"Ko":return i.ordinalNumber(r,{unit:"hour"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,i){var l=r.getUTCHours()>=12;return l&&i<12?r.setUTCHours(i+12,0,0,0):r.setUTCHours(i,0,0,0),r}}]),n}(Le),gy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",70),ne(ae(a),"incompatibleTokens",["a","b","h","H","K","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"k":return He(Ze.hour24h,r);case"ko":return i.ordinalNumber(r,{unit:"hour"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=24}},{key:"set",value:function(r,o,i){var l=i<=24?i%24:i;return r.setUTCHours(l,0,0,0),r}}]),n}(Le),by=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",60),ne(ae(a),"incompatibleTokens",["t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"m":return He(Ze.minute,r);case"mo":return i.ordinalNumber(r,{unit:"minute"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=59}},{key:"set",value:function(r,o,i){return r.setUTCMinutes(i,0,0),r}}]),n}(Le),vy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",50),ne(ae(a),"incompatibleTokens",["t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"s":return He(Ze.second,r);case"so":return i.ordinalNumber(r,{unit:"second"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=59}},{key:"set",value:function(r,o,i){return r.setUTCSeconds(i,0),r}}]),n}(Le),yy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",30),ne(ae(a),"incompatibleTokens",["t","T"]),a}return Re(n,[{key:"parse",value:function(r,o){var i=function(u){return Math.floor(u*Math.pow(10,-o.length+3))};return Je(Xe(o.length,r),i)}},{key:"set",value:function(r,o,i){return r.setUTCMilliseconds(i),r}}]),n}(Le),Cy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",10),ne(ae(a),"incompatibleTokens",["t","T","x"]),a}return Re(n,[{key:"parse",value:function(r,o){switch(o){case"X":return Mt(Et.basicOptionalMinutes,r);case"XX":return Mt(Et.basic,r);case"XXXX":return Mt(Et.basicOptionalSeconds,r);case"XXXXX":return Mt(Et.extendedOptionalSeconds,r);case"XXX":default:return Mt(Et.extended,r)}}},{key:"set",value:function(r,o,i){return o.timestampIsSet?r:new Date(r.getTime()-i)}}]),n}(Le),xy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",10),ne(ae(a),"incompatibleTokens",["t","T","X"]),a}return Re(n,[{key:"parse",value:function(r,o){switch(o){case"x":return Mt(Et.basicOptionalMinutes,r);case"xx":return Mt(Et.basic,r);case"xxxx":return Mt(Et.basicOptionalSeconds,r);case"xxxxx":return Mt(Et.extendedOptionalSeconds,r);case"xxx":default:return Mt(Et.extended,r)}}},{key:"set",value:function(r,o,i){return o.timestampIsSet?r:new Date(r.getTime()-i)}}]),n}(Le),wy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",40),ne(ae(a),"incompatibleTokens","*"),a}return Re(n,[{key:"parse",value:function(r){return ep(r)}},{key:"set",value:function(r,o,i){return[new Date(i*1e3),{timestampIsSet:!0}]}}]),n}(Le),Dy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",20),ne(ae(a),"incompatibleTokens","*"),a}return Re(n,[{key:"parse",value:function(r){return ep(r)}},{key:"set",value:function(r,o,i){return[new Date(i),{timestampIsSet:!0}]}}]),n}(Le),Py={G:new zv,y:new Vv,Y:new Uv,R:new Wv,u:new Gv,Q:new Hv,q:new Yv,M:new Kv,L:new Qv,w:new Zv,I:new ey,d:new ry,D:new ay,E:new oy,e:new iy,c:new ly,i:new uy,a:new cy,b:new dy,B:new fy,h:new py,H:new my,K:new hy,k:new gy,m:new by,s:new vy,S:new yy,X:new Cy,x:new xy,t:new wy,T:new Dy},Ty=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sy=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ky=/^'([^]*?)'?$/,Ry=/''/g,Ey=/\S/,My=/[a-zA-Z]/;function Oy(e,t,n,a){var r,o,i,l,u,s,f,d,c,v,y,g,C,h,p,m,b,k;Se(3,arguments);var x=String(e),w=String(t),P=Gf(),S=(r=(o=a?.locale)!==null&&o!==void 0?o:P.locale)!==null&&r!==void 0?r:wl;if(!S.match)throw new RangeError("locale must contain match property");var R=pt((i=(l=(u=(s=a?.firstWeekContainsDate)!==null&&s!==void 0?s:a==null||(f=a.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&u!==void 0?u:P.firstWeekContainsDate)!==null&&l!==void 0?l:(c=P.locale)===null||c===void 0||(v=c.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=pt((y=(g=(C=(h=a?.weekStartsOn)!==null&&h!==void 0?h:a==null||(p=a.locale)===null||p===void 0||(m=p.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&C!==void 0?C:P.weekStartsOn)!==null&&g!==void 0?g:(b=P.locale)===null||b===void 0||(k=b.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&y!==void 0?y:0);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(w==="")return x===""?De(n):new Date(NaN);var _={firstWeekContainsDate:R,weekStartsOn:E,locale:S},M=[new qv],A=w.match(Sy).map(function(z){var H=z[0];if(H in Ws){var J=Ws[H];return J(z,S.formatLong)}return z}).join("").match(Ty),B=[],q=Js(A),W;try{var V=function(){var H=W.value;!(a!=null&&a.useAdditionalWeekYearTokens)&&Ob(H)&&Gs(H,w,e),!(a!=null&&a.useAdditionalDayOfYearTokens)&&_b(H)&&Gs(H,w,e);var J=H[0],fe=Py[J];if(fe){var Q=fe.incompatibleTokens;if(Array.isArray(Q)){var Z=B.find(function(Ce){return Q.includes(Ce.token)||Ce.token===J});if(Z)throw new RangeError("The format string mustn't contain `".concat(Z.fullToken,"` and `").concat(H,"` at the same time"))}else if(fe.incompatibleTokens==="*"&&B.length>0)throw new RangeError("The format string mustn't contain `".concat(H,"` and any other token at the same time"));B.push({token:J,fullToken:H});var ge=fe.run(x,H,S.match,_);if(!ge)return{v:new Date(NaN)};M.push(ge.setter),x=ge.rest}else{if(J.match(My))throw new RangeError("Format string contains an unescaped latin alphabet character `"+J+"`");if(H==="''"?H="'":J==="'"&&(H=_y(H)),x.indexOf(H)===0)x=x.slice(H.length);else return{v:new Date(NaN)}}};for(q.s();!(W=q.n()).done;){var Y=V();if(Og(Y)==="object")return Y.v}}catch(z){q.e(z)}finally{q.f()}if(x.length>0&&Ey.test(x))return new Date(NaN);var G=M.map(function(z){return z.priority}).sort(function(z,H){return H-z}).filter(function(z,H,J){return J.indexOf(z)===H}).map(function(z){return M.filter(function(H){return H.priority===z}).sort(function(H,J){return J.subPriority-H.subPriority})}).map(function(z){return z[0]}),T=De(n);if(isNaN(T.getTime()))return new Date(NaN);var F=Ib(T,Xi(T)),N={},j=Js(G),I;try{for(j.s();!(I=j.n()).done;){var L=I.value;if(!L.validate(F,_))return new Date(NaN);var $=L.set(F,N,_);Array.isArray($)?(F=$[0],_v(N,$[1])):F=$}}catch(z){j.e(z)}finally{j.f()}return F}function _y(e){return e.match(ky)[1].replace(Ry,"'")}function eu(e){Se(1,arguments);var t=De(e);return t.setMinutes(0,0,0),t}function Iy(e,t){Se(2,arguments);var n=eu(e),a=eu(t);return n.getTime()===a.getTime()}function Ay(e,t){Se(2,arguments);var n=De(e),a=De(t);return n.getFullYear()===a.getFullYear()}function jy(e,t){Se(2,arguments);var n=De(e),a=pt(t);return n.setDate(a),n}function Ly(e,t){Se(2,arguments);var n=De(e),a=pt(t);return n.setHours(a),n}function By(e,t){Se(2,arguments);var n=De(e),a=pt(t);return n.setMinutes(a),n}function Ny(e,t){Se(2,arguments);var n=De(e),a=pt(t);return n.setSeconds(a),n}function rp({children:e=null,...t}){const{t:n}=ut(),{api:a}=ft(),{blocklet:r}=dn(),o=r?.settings?.autoCheckUpdate,i=async s=>{await a.updateAutoCheckUpdate({input:{did:r.meta.did,autoCheckUpdate:s}})},l=async()=>{try{const s=!o?.enabled;await i({enabled:s}),je.success(n(s?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(s){je.error(s.message)}},u=!!o?.enabled;return D.jsxs(le,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[e,D.jsx(_t,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:D.jsx("div",{children:D.jsx(Pb,{checked:u,onChange:l,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}rp.propTypes={children:K.any};var bo={},vo={exports:{}},tu;function Ge(){return tu||(tu=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var o in r)({}).hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(vo)),vo.exports}var zn={},yo={},Co={},xo={},nu;function Fy(){return nu||(nu=1,function(e){var t=re();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(Ge()),a=t(Af()),r=t(Pe()),o=t(ze()),i=sn();function l(s){var f=(0,i.useTheme)();return r.default.createElement("div",{ref:s.forwardedRef,style:{display:"table",width:"100%",height:"100%",backgroundColor:f.palette.background.paper,opacity:.7}},r.default.createElement("div",{style:{display:"table-cell",width:"100%",height:"100%",verticalAlign:"middle",textAlign:"center"}},r.default.createElement(a.default,null)))}l.propTypes={theme:o.default.any};var u=r.default.forwardRef(function(f,d){return r.default.createElement(l,(0,n.default)({},f,{forwardedRef:d}))});e.default=u}(xo)),xo}var wo={},Do={},wt={},Po={exports:{}},To={exports:{}},So={exports:{}},ru;function $y(){return ru||(ru=1,function(e){var t=Kt().default;function n(a,r){if(t(a)!="object"||!a)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var i=o.call(a,r||"default");if(t(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(So)),So.exports}var au;function ap(){return au||(au=1,function(e){var t=Kt().default,n=$y();function a(r){var o=n(r,"string");return t(o)=="symbol"?o:o+""}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports}(To)),To.exports}var ou;function nt(){return ou||(ou=1,function(e){var t=ap();function n(a,r,o){return(r=t(r))in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(Po)),Po.exports}const qy={},iu=e=>{let t;const n=new Set,a=(f,d)=>{const c=typeof f=="function"?f(t):f;if(!Object.is(c,t)){const v=t;t=d??(typeof c!="object"||c===null)?c:Object.assign({},t,c),n.forEach(y=>y(t,v))}},r=()=>t,u={setState:a,getState:r,getInitialState:()=>s,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(qy?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(a,r,u);return u},op=e=>e?iu(e):iu,{useDebugValue:zy}=Me,{useSyncExternalStoreWithSelector:Vy}=zf,Uy=e=>e;function ip(e,t=Uy,n){const a=Vy(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return zy(a),a}const lu=e=>{const t=typeof e=="function"?op(e):e,n=(a,r)=>ip(t,a,r);return Object.assign(n,t),n},lp=e=>e?lu(e):lu;var Wy=e=>lp(e);const Gy=Object.freeze(Object.defineProperty({__proto__:null,create:lp,createStore:op,default:Wy,useStore:ip},Symbol.toStringTag,{value:"Module"})),Hy=ln(Gy),{useDebugValue:Yy}=Me,{useSyncExternalStoreWithSelector:Ky}=zf,Qy=e=>e;function Xy(e,t=Qy,n){const a=Ky(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Yy(a),a}const{createElement:Zy,createContext:Jy,useContext:su,useMemo:eC,useRef:tC}=Me;function nC(){const e=Jy(void 0);return{Provider:({createStore:r,children:o})=>{const i=tC();return i.current||(i.current=r()),Zy(e.Provider,{value:i.current},o)},useStore:(r,o)=>{const i=su(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return Xy(i,r,o)},useStoreApi:()=>{const r=su(e);if(!r)throw new Error("Seems like you have not used zustand provider as an ancestor.");return eC(()=>({...r}),[r])}}}const rC=Object.freeze(Object.defineProperty({__proto__:null,default:nC},Symbol.toStringTag,{value:"Module"})),aC=ln(rC);var Ur={exports:{}},ha={exports:{}},oC=ha.exports,uu;function iC(){return uu||(uu=1,function(e,t){(function(n,a){e.exports=a()})(oC,function(){var n=typeof Promise=="function",a=function(w){if(typeof globalThis=="object")return globalThis;Object.defineProperty(w,"typeDetectGlobalObject",{get:function(){return this},configurable:!0});var P=typeDetectGlobalObject;return delete w.typeDetectGlobalObject,P}(Object.prototype),r=typeof Symbol<"u",o=typeof Map<"u",i=typeof Set<"u",l=typeof WeakMap<"u",u=typeof WeakSet<"u",s=typeof DataView<"u",f=r&&typeof Symbol.iterator<"u",d=r&&typeof Symbol.toStringTag<"u",c=i&&typeof Set.prototype.entries=="function",v=o&&typeof Map.prototype.entries=="function",y=c&&Object.getPrototypeOf(new Set().entries()),g=v&&Object.getPrototypeOf(new Map().entries()),C=f&&typeof Array.prototype[Symbol.iterator]=="function",h=C&&Object.getPrototypeOf([][Symbol.iterator]()),p=f&&typeof String.prototype[Symbol.iterator]=="function",m=p&&Object.getPrototypeOf(""[Symbol.iterator]()),b=8,k=-1;function x(w){var P=typeof w;if(P!=="object")return P;if(w===null)return"null";if(w===a)return"global";if(Array.isArray(w)&&(d===!1||!(Symbol.toStringTag in w)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&w===window.location)return"Location";if(typeof window.document=="object"&&w===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&w===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&w===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&w instanceof window.HTMLElement){if(w.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(w.tagName==="TD")return"HTMLTableDataCellElement";if(w.tagName==="TH")return"HTMLTableHeaderCellElement"}}var S=d&&w[Symbol.toStringTag];if(typeof S=="string")return S;var R=Object.getPrototypeOf(w);return R===RegExp.prototype?"RegExp":R===Date.prototype?"Date":n&&R===Promise.prototype?"Promise":i&&R===Set.prototype?"Set":o&&R===Map.prototype?"Map":u&&R===WeakSet.prototype?"WeakSet":l&&R===WeakMap.prototype?"WeakMap":s&&R===DataView.prototype?"DataView":o&&R===g?"Map Iterator":i&&R===y?"Set Iterator":C&&R===h?"Array Iterator":p&&R===m?"String Iterator":R===null?"Object":Object.prototype.toString.call(w).slice(b,k)}return x})}(ha)),ha.exports}var cu;function sp(){if(cu)return Ur.exports;cu=1;/*!
4
4
  * deep-eql
5
5
  * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
@@ -346,7 +346,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
346
346
  .ux-dialog_closeButton {
347
347
  margin: 0;
348
348
  }
349
- `,rM=O.lazy(()=>gb(()=>import("./index-ChcIPY6P.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>({default:e.Uploader}))),aM="/blocklet/component/upload",Cf=[".html",".htm",".tgz",".zip"],oM=Number(window.env?.MAX_UPLOAD_FILE_SIZE)||be.MAX_UPLOAD_FILE_SIZE,iM=oM*1024*1024;function Mh({did:e,prefix:t,headers:n=()=>({}),onUploaded:a=Vs,open:r=!1,onClose:o=Vs}){const{t:i,locale:l}=ut(),u=O.useRef(null),s=O.useCallback(f=>{const{status:d,data:c}=f;if(d===200){a(c);return}je.error(i("blocklet.component.addComponentTip.uploadFailed"))},[a,i]);return O.useEffect(()=>{r?u.current?.open():u.current?.close()},[r]),D.jsx(lM,{id:`component-uploader-${e}`,children:D.jsx(rM,{ref:u,locale:l,popup:!0,onUploadFinish:s,plugins:[],onClose:o,installerProps:{disabled:!0},apiPathProps:{uploader:yr(t,aM,e),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:Cf,maxFileSize:iM,maxNumberOfFiles:1}},tusProps:{headers:n},dashboardProps:{note:i("blocklet.component.addComponentTip.allowedFileTypes",{types:Cf.map(f=>f.replace(".","")).join(", ")})}})},`component-uploader-${e}`)}Mh.propTypes={did:K.string.isRequired,prefix:K.string.isRequired,open:K.bool,headers:K.func,onUploaded:K.func,onClose:K.func};const lM=oe(le)`
349
+ `,rM=O.lazy(()=>gb(()=>import("./index-UR2bgVDi.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>({default:e.Uploader}))),aM="/blocklet/component/upload",Cf=[".html",".htm",".tgz",".zip"],oM=Number(window.env?.MAX_UPLOAD_FILE_SIZE)||be.MAX_UPLOAD_FILE_SIZE,iM=oM*1024*1024;function Mh({did:e,prefix:t,headers:n=()=>({}),onUploaded:a=Vs,open:r=!1,onClose:o=Vs}){const{t:i,locale:l}=ut(),u=O.useRef(null),s=O.useCallback(f=>{const{status:d,data:c}=f;if(d===200){a(c);return}je.error(i("blocklet.component.addComponentTip.uploadFailed"))},[a,i]);return O.useEffect(()=>{r?u.current?.open():u.current?.close()},[r]),D.jsx(lM,{id:`component-uploader-${e}`,children:D.jsx(rM,{ref:u,locale:l,popup:!0,onUploadFinish:s,plugins:[],onClose:o,installerProps:{disabled:!0},apiPathProps:{uploader:yr(t,aM,e),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:Cf,maxFileSize:iM,maxNumberOfFiles:1}},tusProps:{headers:n},dashboardProps:{note:i("blocklet.component.addComponentTip.allowedFileTypes",{types:Cf.map(f=>f.replace(".","")).join(", ")})}})},`component-uploader-${e}`)}Mh.propTypes={did:K.string.isRequired,prefix:K.string.isRequired,open:K.bool,headers:K.func,onUploaded:K.func,onClose:K.func};const lM=oe(le)`
350
350
  .uploader-wrapper {
351
351
  display: inline-flex;
352
352
  position: relative;
@@ -1 +1 @@
1
- import{bs as e,bt as c,bu as t,bv as o}from"./vendor-mui-core-CnXrAOs3.js";import{c as n}from"./index-CkTEzTCn.js";const a=[{value:n.WHO_CAN_ACCESS.ALL,icon:e,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:n.WHO_CAN_ACCESS.INVITED,icon:c,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:n.WHO_CAN_ACCESS.ADMIN,icon:t,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:n.WHO_CAN_ACCESS.OWNER,icon:o,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];export{a as A};
1
+ import{bs as e,bt as c,bu as t,bv as o}from"./vendor-mui-core-CnXrAOs3.js";import{c as n}from"./index-sNHCLgAE.js";const a=[{value:n.WHO_CAN_ACCESS.ALL,icon:e,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:n.WHO_CAN_ACCESS.INVITED,icon:c,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:n.WHO_CAN_ACCESS.ADMIN,icon:t,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:n.WHO_CAN_ACCESS.OWNER,icon:o,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];export{a as A};