luckyphoenix 1.0.7 → 1.0.8

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 (168) hide show
  1. package/alist-web/assets/{2fa-legacy.3350d44d.js → 2fa-legacy.5fa60b44.js} +1 -1
  2. package/alist-web/assets/{2fa.0dab7189.js → 2fa.87b607b7.js} +1 -1
  3. package/alist-web/assets/{About-legacy.e1597551.js → About-legacy.0ff31d02.js} +1 -1
  4. package/alist-web/assets/{About.11e2f3bb.js → About.14d416ca.js} +1 -1
  5. package/alist-web/assets/{AddOrEdit-legacy.6ac6f516.js → AddOrEdit-legacy.102d61ae.js} +1 -1
  6. package/alist-web/assets/{AddOrEdit-legacy.432f6c0e.js → AddOrEdit-legacy.78842fbc.js} +1 -1
  7. package/alist-web/assets/{AddOrEdit-legacy.2a02db88.js → AddOrEdit-legacy.ac9f5415.js} +1 -1
  8. package/alist-web/assets/{AddOrEdit.f0ec5bf9.js → AddOrEdit.971a8ba8.js} +1 -1
  9. package/alist-web/assets/{AddOrEdit.e641a9bd.js → AddOrEdit.9ee0bb50.js} +1 -1
  10. package/alist-web/assets/{AddOrEdit.79c069f9.js → AddOrEdit.c9b47599.js} +1 -1
  11. package/alist-web/assets/Common-legacy.41405c0c.js +1 -0
  12. package/alist-web/assets/Common.0404cf82.js +1 -0
  13. package/alist-web/assets/{Copy-legacy.3d846482.js → Copy-legacy.bb1c54a1.js} +1 -1
  14. package/alist-web/assets/Copy.b44f12a7.js +1 -0
  15. package/alist-web/assets/DeletePopover-legacy.0ac898a9.js +1 -0
  16. package/alist-web/assets/{DeletePopover.f7887d88.js → DeletePopover.610bc212.js} +1 -1
  17. package/alist-web/assets/File-legacy.7813c6bd.js +1 -0
  18. package/alist-web/assets/File.779fcca6.js +1 -0
  19. package/alist-web/assets/{Folder-legacy.a4550db5.js → Folder-legacy.6de85b2c.js} +3 -3
  20. package/alist-web/assets/{Folder.7e9202ae.js → Folder.744549da.js} +2 -2
  21. package/alist-web/assets/{FolderTree-legacy.2cffdb64.js → FolderTree-legacy.df0711f0.js} +1 -1
  22. package/alist-web/assets/{FolderTree.3d6d889d.js → FolderTree.b115623c.js} +1 -1
  23. package/alist-web/assets/Grid-legacy.0e5d85e0.js +1 -0
  24. package/alist-web/assets/Grid.100c9fa0.js +1 -0
  25. package/alist-web/assets/{GridItem-legacy.2300a556.js → GridItem-legacy.41480c5c.js} +1 -1
  26. package/alist-web/assets/{GridItem.5502f946.js → GridItem.c2d8d04b.js} +1 -1
  27. package/alist-web/assets/{ImageWithError-legacy.184872e5.js → ImageWithError-legacy.33680aa7.js} +1 -1
  28. package/alist-web/assets/{ImageWithError.fbebe083.js → ImageWithError.e84b4adb.js} +1 -1
  29. package/alist-web/assets/{Images-legacy.47953965.js → Images-legacy.ac934929.js} +1 -1
  30. package/alist-web/assets/{Images.cc1e423a.js → Images.5f4d59ff.js} +1 -1
  31. package/alist-web/assets/{Layout-legacy.bbe308ea.js → Layout-legacy.c23a00d4.js} +1 -1
  32. package/alist-web/assets/{Layout.683e33e3.js → Layout.edacf8b3.js} +4 -4
  33. package/alist-web/assets/{List-legacy.dc5a2a38.js → List-legacy.b954608e.js} +1 -1
  34. package/alist-web/assets/List.a7695a79.js +1 -0
  35. package/alist-web/assets/{Messenger-legacy.15747cf4.js → Messenger-legacy.ce777b2d.js} +1 -1
  36. package/alist-web/assets/{Messenger.0de50ee8.js → Messenger.0a4ddaae.js} +1 -1
  37. package/alist-web/assets/{Metas-legacy.9a37ad69.js → Metas-legacy.a8d69714.js} +1 -1
  38. package/alist-web/assets/{Metas.94282135.js → Metas.ecf1dfa9.js} +1 -1
  39. package/alist-web/assets/{Other-legacy.1defd90b.js → Other-legacy.9df9fca0.js} +1 -1
  40. package/alist-web/assets/{Other.c698471d.js → Other.20617503.js} +1 -1
  41. package/alist-web/assets/{PackageDownload-legacy.13e43bb9.js → PackageDownload-legacy.ab740d94.js} +1 -1
  42. package/alist-web/assets/{PackageDownload.89e4ecc4.js → PackageDownload.9136ed46.js} +1 -1
  43. package/alist-web/assets/{Paginator-legacy.6f9f1dcb.js → Paginator-legacy.df584da0.js} +1 -1
  44. package/alist-web/assets/{Paginator.758bcfa3.js → Paginator.56ed88cb.js} +1 -1
  45. package/alist-web/assets/{Password-legacy.5e5cbd20.js → Password-legacy.1e6250d0.js} +1 -1
  46. package/alist-web/assets/{Password.500d1886.js → Password.789eac32.js} +1 -1
  47. package/alist-web/assets/{Profile-legacy.ccf1ddd4.js → Profile-legacy.b2ff967c.js} +1 -1
  48. package/alist-web/assets/{Profile.33671ffe.js → Profile.5ddab9f2.js} +1 -1
  49. package/alist-web/assets/ResponsiveGrid-legacy.26c50421.js +1 -0
  50. package/alist-web/assets/{ResponsiveGrid.04e247e9.js → ResponsiveGrid.a8ef36b9.js} +1 -1
  51. package/alist-web/assets/{S3-legacy.fb41a1b8.js → S3-legacy.62387b8e.js} +1 -1
  52. package/alist-web/assets/{S3.135ba8ad.js → S3.d58d82f5.js} +1 -1
  53. package/alist-web/assets/{SettingItem-legacy.51bf5808.js → SettingItem-legacy.434fc01f.js} +1 -1
  54. package/alist-web/assets/{SettingItem.d9757149.js → SettingItem.e3e93238.js} +1 -1
  55. package/alist-web/assets/{Storages-legacy.6fe86e3a.js → Storages-legacy.c8c85437.js} +1 -1
  56. package/alist-web/assets/{Storages.22e89c36.js → Storages.c8aa56c5.js} +1 -1
  57. package/alist-web/assets/{Tasks-legacy.bcf4e457.js → Tasks-legacy.71eeb831.js} +1 -1
  58. package/alist-web/assets/{Tasks.f607862a.js → Tasks.a6e3b1c8.js} +1 -1
  59. package/alist-web/assets/{Upload-legacy.cb936202.js → Upload-legacy.02e5198e.js} +1 -1
  60. package/alist-web/assets/{Upload-legacy.7dd2be21.js → Upload-legacy.bfe63038.js} +1 -1
  61. package/alist-web/assets/{Upload.d35bb47b.js → Upload.42f49d82.js} +1 -1
  62. package/alist-web/assets/Upload.73d9bb5f.js +1 -0
  63. package/alist-web/assets/Users-legacy.e7985152.js +1 -0
  64. package/alist-web/assets/{Users.7eb39296.js → Users.f66892fc.js} +1 -1
  65. package/alist-web/assets/{Wether-legacy.66b7b0d3.js → Wether-legacy.d0956749.js} +1 -1
  66. package/alist-web/assets/{Wether.f17d6a97.js → Wether.8a05f999.js} +1 -1
  67. package/alist-web/assets/{aliyun_office-legacy.7e1c4ff6.js → aliyun_office-legacy.24261e1a.js} +1 -1
  68. package/alist-web/assets/{aliyun_office.627eb2ac.js → aliyun_office.1fdba9c9.js} +1 -1
  69. package/alist-web/assets/{aliyun_video-legacy.dfd303c5.js → aliyun_video-legacy.f70aedd2.js} +1 -1
  70. package/alist-web/assets/{aliyun_video.681fb5ee.js → aliyun_video.ac65f8dc.js} +1 -1
  71. package/alist-web/assets/{asciinema-legacy.554330ec.js → asciinema-legacy.12c69213.js} +1 -1
  72. package/alist-web/assets/{asciinema.a6e925e9.js → asciinema.40312582.js} +1 -1
  73. package/alist-web/assets/{audio-legacy.d6ef56f6.js → audio-legacy.b7fd7635.js} +1 -1
  74. package/alist-web/assets/{audio.0cad5cce.js → audio.c44e6fbf.js} +1 -1
  75. package/alist-web/assets/{backup-restore-legacy.f4c8daf0.js → backup-restore-legacy.5fa545c8.js} +1 -1
  76. package/alist-web/assets/{backup-restore.db700ca0.js → backup-restore.c236599d.js} +1 -1
  77. package/alist-web/assets/entry-legacy.7af3675d.js +1 -0
  78. package/alist-web/assets/entry-legacy.c6e3ee6f.js +1 -0
  79. package/alist-web/assets/entry.8b118df9.js +9 -0
  80. package/alist-web/assets/entry.f7c5bc9e.js +5 -0
  81. package/alist-web/assets/{helper-legacy.646eb2d9.js → helper-legacy.628706d4.js} +1 -1
  82. package/alist-web/assets/{helper.d54883e3.js → helper.b9cc6b8e.js} +1 -1
  83. package/alist-web/assets/{hls-legacy.9e0f7edb.js → hls-legacy.5de4cc7e.js} +7 -7
  84. package/alist-web/assets/{hls.1623c369.js → hls.35474569.js} +1 -1
  85. package/alist-web/assets/{html-legacy.fa26963f.js → html-legacy.b684ae31.js} +1 -1
  86. package/alist-web/assets/{html.8b79f6ca.js → html.94f79f48.js} +1 -1
  87. package/alist-web/assets/{icon-legacy.2d7c0a16.js → icon-legacy.d23aa70f.js} +1 -1
  88. package/alist-web/assets/{icon.94f94d81.js → icon.3be36f76.js} +3 -3
  89. package/alist-web/assets/{image-legacy.236a9cca.js → image-legacy.c33664c4.js} +1 -1
  90. package/alist-web/assets/{image.82ca8574.js → image.4ca2e490.js} +1 -1
  91. package/alist-web/assets/{index-legacy.840e3d82.js → index-legacy.1159bd68.js} +1 -1
  92. package/alist-web/assets/{index-legacy.efef9df2.js → index-legacy.20004795.js} +1 -1
  93. package/alist-web/assets/{index-legacy.0bd3a7f2.js → index-legacy.56429d46.js} +1 -1
  94. package/alist-web/assets/{index-legacy.a7c40fe3.js → index-legacy.700115ce.js} +4 -4
  95. package/alist-web/assets/index-legacy.7aba107c.js +1 -0
  96. package/alist-web/assets/{index-legacy.61172c95.js → index-legacy.8ef32e28.js} +1 -1
  97. package/alist-web/assets/{index-legacy.fb7fb711.js → index-legacy.a5798ce8.js} +1 -1
  98. package/alist-web/assets/{index-legacy.91fe7355.js → index-legacy.b820f693.js} +1 -1
  99. package/alist-web/assets/{index-legacy.40b50240.js → index-legacy.f807ff76.js} +1 -1
  100. package/alist-web/assets/{index.7409b67a.js → index.17befc27.js} +1 -1
  101. package/alist-web/assets/{index.afa471fc.js → index.4e746469.js} +1 -1
  102. package/alist-web/assets/{index.0adfc44b.js → index.6a851756.js} +1 -1
  103. package/alist-web/assets/{index.72e3f724.js → index.7b37ac3e.js} +1 -1
  104. package/alist-web/assets/{index.26f5b473.js → index.7f73cfca.js} +1 -1
  105. package/alist-web/assets/{index.c15f7469.js → index.b9404cdc.js} +1 -1
  106. package/alist-web/assets/{index.952b63b2.js → index.e0a3345f.js} +1 -1
  107. package/alist-web/assets/{index.dcae211e.js → index.e86a9d96.js} +1 -1
  108. package/alist-web/assets/{index.fae3cea4.js → index.f27bc3a3.js} +48 -48
  109. package/alist-web/assets/{indexes-legacy.2c89d2d8.js → indexes-legacy.c0a7de92.js} +1 -1
  110. package/alist-web/assets/{indexes.9cb6f537.js → indexes.a5ed9461.js} +2 -2
  111. package/alist-web/assets/{ipa-legacy.7a49e0e2.js → ipa-legacy.79da7f5e.js} +1 -1
  112. package/alist-web/assets/{ipa.97543f5f.js → ipa.d3534733.js} +1 -1
  113. package/alist-web/assets/{markdown-legacy.164943d8.js → markdown-legacy.06eecfab.js} +1 -1
  114. package/alist-web/assets/{markdown.3a932f53.js → markdown.98083d2f.js} +1 -1
  115. package/alist-web/assets/{markdown_with_word_wrap-legacy.5e032546.js → markdown_with_word_wrap-legacy.db40475c.js} +1 -1
  116. package/alist-web/assets/{markdown_with_word_wrap.0efe2540.js → markdown_with_word_wrap.01a053ec.js} +1 -1
  117. package/alist-web/assets/offline_download-legacy.8eefa027.js +1 -0
  118. package/alist-web/assets/{offline_download.940ca54b.js → offline_download.cb36ca7f.js} +1 -1
  119. package/alist-web/assets/{plist-legacy.c76fc720.js → plist-legacy.38fc4f6e.js} +1 -1
  120. package/alist-web/assets/plist.9ceca224.js +1 -0
  121. package/alist-web/assets/{polyfills-legacy.5f28c7ae.js → polyfills-legacy.7ea5ffba.js} +1 -1
  122. package/alist-web/assets/{text-editor-legacy.6e126724.js → text-editor-legacy.c08cc307.js} +1 -1
  123. package/alist-web/assets/{text-editor.45600bb2.js → text-editor.b6dbae2b.js} +3 -3
  124. package/alist-web/assets/{url-legacy.e95c5b8b.js → url-legacy.11f4f29a.js} +1 -1
  125. package/alist-web/assets/url.4723617b.js +1 -0
  126. package/alist-web/assets/{useTitle-legacy.e942225f.js → useTitle-legacy.1ab50c72.js} +1 -1
  127. package/alist-web/assets/{useTitle.630c0b7f.js → useTitle.c1b8fc88.js} +1 -1
  128. package/alist-web/assets/{video-legacy.5198eeb8.js → video-legacy.34f028da.js} +7 -7
  129. package/alist-web/assets/{video.afae2b68.js → video.2736f6ce.js} +1 -1
  130. package/alist-web/assets/{video360-legacy.227ed7df.js → video360-legacy.0da2ad24.js} +1 -1
  131. package/alist-web/assets/{video360.c8385eb2.js → video360.5f4a14b9.js} +1 -1
  132. package/alist-web/assets/{video_box-legacy.d60b6928.js → video_box-legacy.24a54504.js} +1 -1
  133. package/alist-web/assets/{video_box.bfb0d4a5.js → video_box.ea9d6184.js} +3 -3
  134. package/alist-web/index.html +11 -9
  135. package/alist-web/static/manifest.json +1 -1
  136. package/alist-web/static/pdf.js/web/viewer.mjs +1 -0
  137. package/css/alist_wallpaper.css +7 -7
  138. package/package.json +1 -1
  139. package/alist-web/assets/Common-legacy.5144e9c0.js +0 -1
  140. package/alist-web/assets/Common.6eff9060.js +0 -1
  141. package/alist-web/assets/Copy.d1980101.js +0 -1
  142. package/alist-web/assets/DeletePopover-legacy.1906395c.js +0 -1
  143. package/alist-web/assets/File-legacy.889dd355.js +0 -1
  144. package/alist-web/assets/File.23490613.js +0 -1
  145. package/alist-web/assets/Grid-legacy.a63ef469.js +0 -1
  146. package/alist-web/assets/Grid.7759c684.js +0 -1
  147. package/alist-web/assets/List.249d43e3.js +0 -1
  148. package/alist-web/assets/ResponsiveGrid-legacy.d58d4dfe.js +0 -1
  149. package/alist-web/assets/Upload.4c54bcbf.js +0 -1
  150. package/alist-web/assets/Users-legacy.b992a339.js +0 -1
  151. package/alist-web/assets/entry-legacy.01f22349.js +0 -1
  152. package/alist-web/assets/entry-legacy.31390e6c.js +0 -1
  153. package/alist-web/assets/entry-legacy.5119e4e8.js +0 -1
  154. package/alist-web/assets/entry-legacy.d3b909f7.js +0 -1
  155. package/alist-web/assets/entry-legacy.e017de3e.js +0 -1
  156. package/alist-web/assets/entry-legacy.eec15c4b.js +0 -1
  157. package/alist-web/assets/entry-legacy.fa23a37d.js +0 -1
  158. package/alist-web/assets/entry.2eaf5bb3.js +0 -5
  159. package/alist-web/assets/entry.371138c7.js +0 -7
  160. package/alist-web/assets/entry.5c41c532.js +0 -5
  161. package/alist-web/assets/entry.6cce3889.js +0 -5
  162. package/alist-web/assets/entry.8acdb7f9.js +0 -9
  163. package/alist-web/assets/entry.abb9e6ed.js +0 -5
  164. package/alist-web/assets/entry.e83ea613.js +0 -6
  165. package/alist-web/assets/index-legacy.d72e643a.js +0 -1
  166. package/alist-web/assets/offline_download-legacy.11c4744c.js +0 -1
  167. package/alist-web/assets/plist.3c9cbb1a.js +0 -1
  168. package/alist-web/assets/url.f7914d75.js +0 -1
@@ -1 +1 @@
1
- import{a as W,aW as p,b9 as i,m,h as e,d1 as B,a4 as D,bP as v,C as o,ba as y,n as c,S as u,b as ee,ah as n,d2 as b,e as re,ag as g,aJ as $,d3 as te,d4 as ne,d5 as se,d6 as ae,ae as h,b5 as R,d7 as U,bA as S,bn as I,I as P,F as A,az as E,a8 as ie,G as M,aG as oe,ck as ce,bG as ue}from"./index.fae3cea4.js";import{b as le}from"./useTitle.630c0b7f.js";import{L as de}from"./index.0adfc44b.js";import{s as G,c as ge,b as he}from"./webauthn-json.browser-ponyfill.1c672167.js";const pe=r=>{const w=W(),[l,d]=p(()=>i.post("/authn/delete_authn",{id:r.id})),[k,a]=m(!1);return e(u,{get when(){return!k()},get children(){return e(B,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[e(D,{w:"$full",alignItems:"start",spacing:"$1",get children(){return e(v,{color:"$info9",css:{wordBreak:"break-all"},get children(){return"Fingerprint: "+r.fingerprint+" ID: "+r.id}})}}),e(B,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return e(o,{colorScheme:"danger",get loading(){return l()},onClick:async()=>{const C=await d();y(C,()=>{c.success(w("global.delete_success")),a(!0)})},get children(){return w("global.delete")}})}})]}})}})},me=r=>e(ce,{get colorScheme(){return r.can?"success":"danger"},get children(){return r.children}}),$e=()=>{const r=W();le("manage.sidemenu.profile");const{searchParams:w,to:l}=ee(),[d,k]=m(n().username),[a,C]=m(""),[F,H]=m(""),J=$("sso_compatibility_mode"),[T,N]=p(t=>i.post("/me/update",{username:t?n().username:d(),password:t?"":a(),sso_id:n().sso_id})),[O,j]=p(()=>i.get("/authn/getcredentials")),[,q]=p(()=>i.get("/authn/webauthn_begin_registration")),[z,V]=p((t,s)=>i.post("/authn/webauthn_finish_registration",JSON.stringify(s),{headers:{session:t}})),_=async t=>{if(a()&&a()!==F()){c.warning(r("users.confirm_password_not_same"));return}const s=await N(t);y(s,()=>{b({...n(),username:d()}),t?l(""):(c.success(r("users.update_profile_success")),l(`/@login?redirect=${encodeURIComponent(location.pathname)}`))})},x=w.sso_id;x&&(b({...n(),sso_id:x}),_(!0));function L(t){const s=t.data;s.sso_id&&(b({...n(),sso_id:s.sso_id}),_(!0))}window.addEventListener("message",L),re(()=>{window.removeEventListener("message",L)});const[X,K]=m([]),Q=async()=>{const t=await j();ue(t,K)};return G()&&!g.is_guest(n())&&$("webauthn_login_enabled")&&Q(),e(D,{w:"$full",spacing:"$4",alignItems:"start",get children(){return[e(u,{get when(){return!g.is_guest(n())},get fallback(){return[e(te,{status:"warning",flexDirection:{"@initial":"column","@lg":"row"},get children(){return[e(ne,{mr:"$2_5"}),e(se,{mr:"$2_5",get children(){return r("users.guest-tips")}}),e(ae,{get children(){return r("users.modify_nothing")}})]}}),e(h,{spacing:"$2",get children(){return[e(R,{get children(){return r("global.have_account")}}),e(R,{color:"$info9",as:de,get href(){return`/@login?redirect=${encodeURIComponent(location.pathname)}`},get children(){return r("global.go_login")}})]}})]},get children(){return[e(v,{get children(){return r("users.update_profile")}}),e(U,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return e(S,{get children(){return[e(I,{for:"username",get children(){return r("users.change_username")}}),e(P,{id:"username",get value(){return d()},onInput:t=>{k(t.currentTarget.value)}})]}})}}),e(U,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[e(S,{get children(){return[e(I,{for:"password",get children(){return r("users.change_password")}}),e(P,{id:"password",type:"password",placeholder:"********",get value(){return a()},onInput:t=>{C(t.currentTarget.value)}}),e(A,{get children(){return r("users.change_password-tips")}})]}}),e(S,{get children(){return[e(I,{for:"confirm-password",get children(){return r("users.confirm_password")}}),e(P,{id:"confirm-password",type:"password",placeholder:"********",get value(){return F()},onInput:t=>{H(t.currentTarget.value)}}),e(A,{get children(){return r("users.confirm_password-tips")}})]}})]}}),e(h,{spacing:"$2",get children(){return[e(o,{get loading(){return T()},onClick:[_,!1],get children(){return r("global.save")}}),e(u,{get when(){return!n().otp},get children(){return e(o,{colorScheme:"accent",onClick:()=>{l("/@manage/2fa")},get children(){return r("users.enable_2fa")}})}})]}})]}}),e(u,{get when(){return E(()=>!!$("sso_login_enabled"),!0)()&&!g.is_guest(n())},get children(){return[e(v,{get children(){return r("users.sso_login")}}),e(h,{spacing:"$2",get children(){return e(u,{get when(){return n().sso_id},get fallback(){return e(o,{onClick:()=>{const t=i.getUri()+"/auth/sso?method=get_sso_id";if(J){window.location.href=t;return}window.open(t,"authPopup","width=500,height=600")},get children(){return r("users.connect_sso")}})},get children(){return e(o,{colorScheme:"danger",get loading(){return T()},onClick:()=>{b({...n(),sso_id:""}),_(!0)},get children(){return r("users.disconnect_sso")}})}})}})]}}),e(u,{get when(){return E(()=>!g.is_guest(n()),!0)()&&$("webauthn_login_enabled")},get children(){return[e(v,{get children(){return r("users.webauthn")}}),e(h,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return e(ie,{get loading(){return O()},get children(){return e(M,{get each(){return X()},children:t=>e(pe,{get id(){return t.id},get fingerprint(){return t.fingerprint}})})}})}}),e(o,{get loading(){return z()},onClick:async()=>{if(!G()){c.error(r("users.webauthn_not_supported"));return}const t=await q();y(t,async s=>{const Y=ge(s.options),Z=s.session;try{const f=await he(Y);y(await V(Z,f),()=>{c.success(r("users.add_webauthn_success"))})}catch(f){f instanceof Error&&c.error(f.message)}})},get children(){return r("users.add_webauthn")}})]}}),e(h,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return e(M,{each:oe,children:(t,s)=>e(me,{get can(){return g.can(n(),s())},get children(){return r(`users.permissions.${t}`)}})})}})]}})};export{$e as default};
1
+ import{a as W,aW as p,b9 as i,m,h as e,cY as B,a4 as D,bP as v,C as o,ba as y,n as c,S as u,b as ee,ah as n,cZ as b,e as re,ag as g,aJ as $,c_ as te,c$ as ne,d0 as se,d1 as ae,ae as h,b5 as R,d2 as U,bA as S,bn as I,I as P,F as A,az as E,a8 as ie,G as M,aG as oe,ck as ce,bG as ue}from"./index.f27bc3a3.js";import{b as le}from"./useTitle.c1b8fc88.js";import{L as de}from"./index.6a851756.js";import{s as G,c as ge,b as he}from"./webauthn-json.browser-ponyfill.1c672167.js";const pe=r=>{const w=W(),[l,d]=p(()=>i.post("/authn/delete_authn",{id:r.id})),[k,a]=m(!1);return e(u,{get when(){return!k()},get children(){return e(B,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[e(D,{w:"$full",alignItems:"start",spacing:"$1",get children(){return e(v,{color:"$info9",css:{wordBreak:"break-all"},get children(){return"Fingerprint: "+r.fingerprint+" ID: "+r.id}})}}),e(B,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return e(o,{colorScheme:"danger",get loading(){return l()},onClick:async()=>{const C=await d();y(C,()=>{c.success(w("global.delete_success")),a(!0)})},get children(){return w("global.delete")}})}})]}})}})},me=r=>e(ce,{get colorScheme(){return r.can?"success":"danger"},get children(){return r.children}}),$e=()=>{const r=W();le("manage.sidemenu.profile");const{searchParams:w,to:l}=ee(),[d,k]=m(n().username),[a,C]=m(""),[F,H]=m(""),J=$("sso_compatibility_mode"),[T,N]=p(t=>i.post("/me/update",{username:t?n().username:d(),password:t?"":a(),sso_id:n().sso_id})),[O,j]=p(()=>i.get("/authn/getcredentials")),[,q]=p(()=>i.get("/authn/webauthn_begin_registration")),[z,V]=p((t,s)=>i.post("/authn/webauthn_finish_registration",JSON.stringify(s),{headers:{session:t}})),_=async t=>{if(a()&&a()!==F()){c.warning(r("users.confirm_password_not_same"));return}const s=await N(t);y(s,()=>{b({...n(),username:d()}),t?l(""):(c.success(r("users.update_profile_success")),l(`/@login?redirect=${encodeURIComponent(location.pathname)}`))})},x=w.sso_id;x&&(b({...n(),sso_id:x}),_(!0));function L(t){const s=t.data;s.sso_id&&(b({...n(),sso_id:s.sso_id}),_(!0))}window.addEventListener("message",L),re(()=>{window.removeEventListener("message",L)});const[X,Y]=m([]),Z=async()=>{const t=await j();ue(t,Y)};return G()&&!g.is_guest(n())&&$("webauthn_login_enabled")&&Z(),e(D,{w:"$full",spacing:"$4",alignItems:"start",get children(){return[e(u,{get when(){return!g.is_guest(n())},get fallback(){return[e(te,{status:"warning",flexDirection:{"@initial":"column","@lg":"row"},get children(){return[e(ne,{mr:"$2_5"}),e(se,{mr:"$2_5",get children(){return r("users.guest-tips")}}),e(ae,{get children(){return r("users.modify_nothing")}})]}}),e(h,{spacing:"$2",get children(){return[e(R,{get children(){return r("global.have_account")}}),e(R,{color:"$info9",as:de,get href(){return`/@login?redirect=${encodeURIComponent(location.pathname)}`},get children(){return r("global.go_login")}})]}})]},get children(){return[e(v,{get children(){return r("users.update_profile")}}),e(U,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return e(S,{get children(){return[e(I,{for:"username",get children(){return r("users.change_username")}}),e(P,{id:"username",get value(){return d()},onInput:t=>{k(t.currentTarget.value)}})]}})}}),e(U,{gap:"$2",columns:{"@initial":1,"@md":2},get children(){return[e(S,{get children(){return[e(I,{for:"password",get children(){return r("users.change_password")}}),e(P,{id:"password",type:"password",placeholder:"********",get value(){return a()},onInput:t=>{C(t.currentTarget.value)}}),e(A,{get children(){return r("users.change_password-tips")}})]}}),e(S,{get children(){return[e(I,{for:"confirm-password",get children(){return r("users.confirm_password")}}),e(P,{id:"confirm-password",type:"password",placeholder:"********",get value(){return F()},onInput:t=>{H(t.currentTarget.value)}}),e(A,{get children(){return r("users.confirm_password-tips")}})]}})]}}),e(h,{spacing:"$2",get children(){return[e(o,{get loading(){return T()},onClick:[_,!1],get children(){return r("global.save")}}),e(u,{get when(){return!n().otp},get children(){return e(o,{colorScheme:"accent",onClick:()=>{l("/@manage/2fa")},get children(){return r("users.enable_2fa")}})}})]}})]}}),e(u,{get when(){return E(()=>!!$("sso_login_enabled"),!0)()&&!g.is_guest(n())},get children(){return[e(v,{get children(){return r("users.sso_login")}}),e(h,{spacing:"$2",get children(){return e(u,{get when(){return n().sso_id},get fallback(){return e(o,{onClick:()=>{const t=i.getUri()+"/auth/sso?method=get_sso_id";if(J){window.location.href=t;return}window.open(t,"authPopup","width=500,height=600")},get children(){return r("users.connect_sso")}})},get children(){return e(o,{colorScheme:"danger",get loading(){return T()},onClick:()=>{b({...n(),sso_id:""}),_(!0)},get children(){return r("users.disconnect_sso")}})}})}})]}}),e(u,{get when(){return E(()=>!g.is_guest(n()),!0)()&&$("webauthn_login_enabled")},get children(){return[e(v,{get children(){return r("users.webauthn")}}),e(h,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return e(ie,{get loading(){return O()},get children(){return e(M,{get each(){return X()},children:t=>e(pe,{get id(){return t.id},get fingerprint(){return t.fingerprint}})})}})}}),e(o,{get loading(){return z()},onClick:async()=>{if(!G()){c.error(r("users.webauthn_not_supported"));return}const t=await q();y(t,async s=>{const K=ge(s.options),Q=s.session;try{const f=await he(K);y(await V(Q,f),()=>{c.success(r("users.add_webauthn_success"))})}catch(f){f instanceof Error&&c.error(f.message)}})},get children(){return r("users.add_webauthn")}})]}}),e(h,{wrap:"wrap",gap:"$2",mt:"$2",get children(){return e(M,{each:oe,children:(t,s)=>e(me,{get can(){return g.can(n(),s())},get children(){return r(`users.permissions.${t}`)}})})}})]}})};export{$e as default};
@@ -0,0 +1 @@
1
+ System.register(["./index-legacy.700115ce.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.U,n=e.h,r=e.cX}],execute:function(){e("R",(function(e){var i;return"responsive"===t("settings_layout")&&(i="repeat(auto-fill, minmax(424px, 1fr))"),n(r,{w:"$full",gap:"$2",templateColumns:{"@initial":"1fr","@lg":i},get children(){return e.children}})}))}}}));
@@ -1 +1 @@
1
- import{U as i,h as n,d0 as a}from"./index.fae3cea4.js";const o=e=>{const r=i("settings_layout");let t;return r==="responsive"&&(t="repeat(auto-fill, minmax(424px, 1fr))"),n(a,{w:"$full",gap:"$2",templateColumns:{"@initial":"1fr","@lg":t},get children(){return e.children}})};export{o as R};
1
+ import{U as i,h as n,cX as a}from"./index.f27bc3a3.js";const o=e=>{const r=i("settings_layout");let t;return r==="responsive"&&(t="repeat(auto-fill, minmax(424px, 1fr))"),n(a,{w:"$full",gap:"$2",templateColumns:{"@initial":"1fr","@lg":t},get children(){return e.children}})};export{o as R};
@@ -1 +1 @@
1
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=o(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(L){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var h={};function y(){}function p(){}function d(){}var g={};l(g,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(O([])));m&&m!==r&&n.call(m,i)&&(g=m);var b=d.prototype=y.prototype=Object.create(g);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function o(i,a,c,u){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==t(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):r.resolve(h).then((function(t){s.value=t,c(s)}),(function(t){return o("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function(t,e){function n(){return new r((function(r,n){o(t,e,r,n)}))}return i=i?i.then(n,n):n()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=d,l(b,"constructor",d),l(d,"constructor",p),p.displayName=l(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function c(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){c(i,n,o,a,u,"next",t)}function u(t){c(i,n,o,a,u,"throw",t)}a(void 0)}))}}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register(["./index-legacy.a7c40fe3.js","./useTitle-legacy.e942225f.js","./index-legacy.efef9df2.js","./SettingItem-legacy.51bf5808.js","./ResponsiveGrid-legacy.d58d4dfe.js","./FolderTree-legacy.2cffdb64.js","./index-legacy.840e3d82.js","./index-legacy.91fe7355.js","./index-legacy.fb7fb711.js","./item_type-legacy.d1f1c701.js","./_commonjs-dynamic-modules-legacy.cf19cda3.js"],(function(t){"use strict";var o,i,c,l,f,h,y,p,d,g,v,m,b,w,x,k,j,_,S,O,E,L,I,P,A,C,$;return{setters:[function(t){o=t.a,i=t.h,c=t.bA,l=t.bn,f=t.I,h=t.d1,y=t.C,p=t.G,d=t.E,g=t.a4,v=t.aW,m=t.b9,b=t.cj,w=t.c_,x=t.m,k=t.c$,j=t.S,_=t.ba,S=t.n,O=t.bP,E=t.ae},function(t){L=t.b},function(t){I=t.G},function(t){P=t.I},function(t){A=t.R},function(t){C=t.a},function(t){$=t.c},function(){},function(){},function(){},function(){}],execute:function(){var N=function(t){var e=o();return i(h,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[i(c,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[i(l,{for:"path",display:"flex",alignItems:"center",get children(){return e("global.name")}}),i(f,{id:"name",get value(){return t.name},onChange:function(e){return t.onChange(s(s({},t),{},{name:e.currentTarget.value}))}})]}}),i(c,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[i(l,{for:"path",display:"flex",alignItems:"center",get children(){return e("metas.path")}}),i(C,{id:"path",get value(){return t.path},onChange:function(e){return t.onChange(s(s({},t),{},{path:e}))}})]}}),i(h,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return i(y,{colorScheme:"danger",onClick:(r=u(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.onDelete();case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)}),get children(){return e("global.delete")}});var r}})]}})},G=function(t){var e=o();return console.log(t.buckets),i(g,{alignItems:"start",w:"$full",get children(){return[i(l,{display:"flex",alignItems:"center",get children(){return e("settings.s3_buckets")}}),i(y,{onClick:function(){t.setSettings((function(t){return"s3_buckets"===t.key}),"value",JSON.stringify([].concat(n(t.buckets),[{name:"",path:""}]))),console.log(t.buckets)},get children(){return e("global.add")}}),i(p,{get each(){return t.buckets},children:function(e){return i(N,d(e,{onChange:function(r){console.log(r),t.setSettings((function(t){return"s3_buckets"===t.key}),"value",JSON.stringify(t.buckets.map((function(t){return t.name===e.name?r:t}))))},onDelete:function(){t.setSettings((function(t){return"s3_buckets"===t.key}),"value",JSON.stringify(t.buckets.filter((function(t){return t.name!==e.name}))))}}))}})]}})},T=function(t){var e=s({},t.find((function(t){return"s3_buckets"===t.key})));return e.value?JSON.parse(e.value):[]};t("default",(function(){var t=o();L("manage.sidemenu.s3");var n=r(v((function(){return m.get("/admin/setting/list?group=".concat(I.S3))})),2),c=n[0],l=n[1],s=r(b([]),2),f=s[0],h=s[1],p=function(){var t=u(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l();case 2:e=t.sent,_(e,h);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();p();var C=r(v((function(){return m.post("/admin/setting/save",w(f))})),2),N=C[0],D=C[1],F=r(x(!1),2),J=F[0],W=F[1];return i(g,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[i(A,{get children(){return[i(k,{each:f,children:function(e,r){return i(j,{get when(){return"s3_buckets"!=e().key},get children(){return i(P,d(e,{onChange:function(t){h((function(t){return e().key===t.key}),"value",t)},onDelete:(r=u(a().mark((function r(){var n;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return W(!0),r.next=3,m.post("/admin/setting/delete?key=".concat(e().key));case 3:n=r.sent,W(!1),_(n,(function(){S.success(t("global.delete_success")),p()}));case 6:case"end":return r.stop()}}),r)}))),function(){return r.apply(this,arguments)})}));var r}})}}),i(y,{onClick:function(){var t=$.lib.WordArray.random(15),e=$.lib.WordArray.random(30),r=$.enc.Base64.stringify(t).replace(/[\r\n]/g,""),n=$.enc.Base64.stringify(e).replace(/[\r\n]/g,"");h((function(t){return"s3_access_key_id"===t.key}),"value",r),h((function(t){return"s3_secret_access_key"===t.key}),"value",n)},get children(){return t("settings.s3_generate")}}),i(O,{get children(){return t("settings.s3_restart_to_apply")}}),i(G,{get buckets(){return T(f)},setSettings:h})]}}),i(E,{spacing:"$2",get children(){return[i(y,{colorScheme:"accent",onClick:p,get loading(){return c()||J()},get children(){return t("global.refresh")}}),i(y,{get loading(){return N()},onClick:(r=u(a().mark((function r(){var n,o,i,c,u,l;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=T(f),o=new Set,i=e(n),r.prev=3,i.s();case 5:if((c=i.n()).done){r.next=16;break}if(""!==(u=c.value).name&&""!==u.path){r.next=10;break}return S.error(t("settings.s3_buckets_empty")),r.abrupt("return");case 10:if(!o.has(u.name)){r.next=13;break}return S.error(t("settings.s3_buckets_duplicate_name")),r.abrupt("return");case 13:o.add(u.name);case 14:r.next=5;break;case 16:r.next=21;break;case 18:r.prev=18,r.t0=r.catch(3),i.e(r.t0);case 21:return r.prev=21,i.f(),r.finish(21);case 24:return r.next=26,D();case 26:l=r.sent,_(l,(function(){return S.success(t("global.save_success"))}));case 28:case"end":return r.stop()}}),r,null,[[3,18,21,24]])}))),function(){return r.apply(this,arguments)}),get children(){return t("global.save")}})];var r}})]}})}))}}}))}();
1
+ !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=o(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,a=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw a}}}}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */a=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(L){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(L){return{type:"throw",arg:L}}}e.wrap=s;var h={};function y(){}function p(){}function d(){}var g={};l(g,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(O([])));m&&m!==r&&n.call(m,i)&&(g=m);var b=d.prototype=y.prototype=Object.create(g);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function o(i,a,c,u){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==t(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):r.resolve(h).then((function(t){s.value=t,c(s)}),(function(t){return o("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function(t,e){function n(){return new r((function(r,n){o(t,e,r,n)}))}return i=i?i.then(n,n):n()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=d,l(b,"constructor",d),l(d,"constructor",p),p.displayName=l(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=O,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function c(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){c(i,n,o,a,u,"next",t)}function u(t){c(i,n,o,a,u,"throw",t)}a(void 0)}))}}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register(["./index-legacy.700115ce.js","./useTitle-legacy.1ab50c72.js","./index-legacy.20004795.js","./SettingItem-legacy.434fc01f.js","./ResponsiveGrid-legacy.26c50421.js","./FolderTree-legacy.df0711f0.js","./index-legacy.1159bd68.js","./index-legacy.b820f693.js","./index-legacy.a5798ce8.js","./item_type-legacy.d1f1c701.js","./_commonjs-dynamic-modules-legacy.cf19cda3.js"],(function(t){"use strict";var o,i,c,l,f,h,y,p,d,g,v,m,b,w,x,k,j,S,_,O,E,L,I,P,A,C,$;return{setters:[function(t){o=t.a,i=t.h,c=t.bA,l=t.bn,f=t.I,h=t.cY,y=t.C,p=t.G,d=t.E,g=t.a4,v=t.aW,m=t.b9,b=t.cj,w=t.cV,x=t.m,k=t.cW,j=t.S,S=t.ba,_=t.n,O=t.bP,E=t.ae},function(t){L=t.b},function(t){I=t.G},function(t){P=t.I},function(t){A=t.R},function(t){C=t.a},function(t){$=t.c},function(){},function(){},function(){},function(){}],execute:function(){var N=function(t){var e=o();return i(h,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[i(c,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[i(l,{for:"path",display:"flex",alignItems:"center",get children(){return e("global.name")}}),i(f,{id:"name",get value(){return t.name},onChange:function(e){return t.onChange(s(s({},t),{},{name:e.currentTarget.value}))}})]}}),i(c,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[i(l,{for:"path",display:"flex",alignItems:"center",get children(){return e("metas.path")}}),i(C,{id:"path",get value(){return t.path},onChange:function(e){return t.onChange(s(s({},t),{},{path:e}))}})]}}),i(h,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return i(y,{colorScheme:"danger",onClick:(r=u(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.onDelete();case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)}),get children(){return e("global.delete")}});var r}})]}})},G=function(t){var e=o();return console.log(t.buckets),i(g,{alignItems:"start",w:"$full",get children(){return[i(l,{display:"flex",alignItems:"center",get children(){return e("settings.s3_buckets")}}),i(y,{onClick:function(){t.setSettings((function(t){return"s3_buckets"===t.key}),"value",JSON.stringify([].concat(n(t.buckets),[{name:"",path:""}]))),console.log(t.buckets)},get children(){return e("global.add")}}),i(p,{get each(){return t.buckets},children:function(e){return i(N,d(e,{onChange:function(r){console.log(r),t.setSettings((function(t){return"s3_buckets"===t.key}),"value",JSON.stringify(t.buckets.map((function(t){return t.name===e.name?r:t}))))},onDelete:function(){t.setSettings((function(t){return"s3_buckets"===t.key}),"value",JSON.stringify(t.buckets.filter((function(t){return t.name!==e.name}))))}}))}})]}})},T=function(t){var e=s({},t.find((function(t){return"s3_buckets"===t.key})));return e.value?JSON.parse(e.value):[]};t("default",(function(){var t=o();L("manage.sidemenu.s3");var n=r(v((function(){return m.get("/admin/setting/list?group=".concat(I.S3))})),2),c=n[0],l=n[1],s=r(b([]),2),f=s[0],h=s[1],p=function(){var t=u(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l();case 2:e=t.sent,S(e,h);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();p();var C=r(v((function(){return m.post("/admin/setting/save",w(f))})),2),N=C[0],D=C[1],F=r(x(!1),2),J=F[0],W=F[1];return i(g,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[i(A,{get children(){return[i(k,{each:f,children:function(e,r){return i(j,{get when(){return"s3_buckets"!=e().key},get children(){return i(P,d(e,{onChange:function(t){h((function(t){return e().key===t.key}),"value",t)},onDelete:(r=u(a().mark((function r(){var n;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return W(!0),r.next=3,m.post("/admin/setting/delete?key=".concat(e().key));case 3:n=r.sent,W(!1),S(n,(function(){_.success(t("global.delete_success")),p()}));case 6:case"end":return r.stop()}}),r)}))),function(){return r.apply(this,arguments)})}));var r}})}}),i(y,{onClick:function(){var t=$.lib.WordArray.random(15),e=$.lib.WordArray.random(30),r=$.enc.Base64.stringify(t).replace(/[\r\n]/g,""),n=$.enc.Base64.stringify(e).replace(/[\r\n]/g,"");h((function(t){return"s3_access_key_id"===t.key}),"value",r),h((function(t){return"s3_secret_access_key"===t.key}),"value",n)},get children(){return t("settings.s3_generate")}}),i(O,{get children(){return t("settings.s3_restart_to_apply")}}),i(G,{get buckets(){return T(f)},setSettings:h})]}}),i(E,{spacing:"$2",get children(){return[i(y,{colorScheme:"accent",onClick:p,get loading(){return c()||J()},get children(){return t("global.refresh")}}),i(y,{get loading(){return N()},onClick:(r=u(a().mark((function r(){var n,o,i,c,u,l;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=T(f),o=new Set,i=e(n),r.prev=3,i.s();case 5:if((c=i.n()).done){r.next=16;break}if(""!==(u=c.value).name&&""!==u.path){r.next=10;break}return _.error(t("settings.s3_buckets_empty")),r.abrupt("return");case 10:if(!o.has(u.name)){r.next=13;break}return _.error(t("settings.s3_buckets_duplicate_name")),r.abrupt("return");case 13:o.add(u.name);case 14:r.next=5;break;case 16:r.next=21;break;case 18:r.prev=18,r.t0=r.catch(3),i.e(r.t0);case 21:return r.prev=21,i.f(),r.finish(21);case 24:return r.next=26,D();case 26:l=r.sent,S(l,(function(){return _.success(t("global.save_success"))}));case 28:case"end":return r.stop()}}),r,null,[[3,18,21,24]])}))),function(){return r.apply(this,arguments)}),get children(){return t("global.save")}})];var r}})]}})}))}}}))}();
@@ -1 +1 @@
1
- import{a as b,h as t,bA as _,bn as y,I as B,d1 as p,C as g,G as D,E as C,a4 as $,aW as v,b9 as f,cj as F,c_ as G,m as J,c$ as K,S as L,ba as k,n as u,bP as N,ae as O}from"./index.fae3cea4.js";import{b as T}from"./useTitle.630c0b7f.js";import{G as R}from"./index.72e3f724.js";import{I as W}from"./SettingItem.d9757149.js";import{R as j}from"./ResponsiveGrid.04e247e9.js";import{a as q}from"./FolderTree.3d6d889d.js";import{c as d}from"./index.26f5b473.js";import"./index.0adfc44b.js";import"./index.afa471fc.js";import"./item_type.be442da4.js";import"./_commonjs-dynamic-modules.30ae7933.js";const H=e=>{const s=b();return t(p,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[t(_,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[t(y,{for:"path",display:"flex",alignItems:"center",get children(){return s("global.name")}}),t(B,{id:"name",get value(){return e.name},onChange:n=>e.onChange({...e,name:n.currentTarget.value})})]}}),t(_,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[t(y,{for:"path",display:"flex",alignItems:"center",get children(){return s("metas.path")}}),t(q,{id:"path",get value(){return e.path},onChange:n=>e.onChange({...e,path:n})})]}}),t(p,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return t(g,{colorScheme:"danger",onClick:async()=>{e.onDelete()},get children(){return s("global.delete")}})}})]}})},P=e=>{const s=b();return console.log(e.buckets),t($,{alignItems:"start",w:"$full",get children(){return[t(y,{display:"flex",alignItems:"center",get children(){return s("settings.s3_buckets")}}),t(g,{onClick:()=>{e.setSettings(n=>n.key==="s3_buckets","value",JSON.stringify([...e.buckets,{name:"",path:""}])),console.log(e.buckets)},get children(){return s("global.add")}}),t(D,{get each(){return e.buckets},children:n=>t(H,C(n,{onChange:r=>{console.log(r),e.setSettings(a=>a.key==="s3_buckets","value",JSON.stringify(e.buckets.map(a=>a.name===n.name?r:a)))},onDelete:()=>{e.setSettings(r=>r.key==="s3_buckets","value",JSON.stringify(e.buckets.filter(r=>r.name!==n.name)))}}))})]}})},w=e=>{const s={...e.find(n=>n.key==="s3_buckets")};return s.value?JSON.parse(s.value):[]},ne=()=>{const e=b();T("manage.sidemenu.s3");const[s,n]=v(()=>f.get(`/admin/setting/list?group=${R.S3}`)),[r,a]=F([]),m=async()=>{const c=await n();k(c,a)};m();const[I,x]=v(()=>f.post("/admin/setting/save",G(r))),[A,S]=J(!1);return t($,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[t(j,{get children(){return[t(K,{each:r,children:(c,o)=>t(L,{get when(){return c().key!="s3_buckets"},get children(){return t(W,C(c,{onChange:l=>{a(i=>c().key===i.key,"value",l)},onDelete:async()=>{S(!0);const l=await f.post(`/admin/setting/delete?key=${c().key}`);S(!1),k(l,()=>{u.success(e("global.delete_success")),m()})}}))}})}),t(g,{onClick:()=>{const c=d.lib.WordArray.random(15),o=d.lib.WordArray.random(240/8),l=d.enc.Base64.stringify(c).replace(/[\r\n]/g,""),i=d.enc.Base64.stringify(o).replace(/[\r\n]/g,"");a(h=>h.key==="s3_access_key_id","value",l),a(h=>h.key==="s3_secret_access_key","value",i)},get children(){return e("settings.s3_generate")}}),t(N,{get children(){return e("settings.s3_restart_to_apply")}}),t(P,{get buckets(){return w(r)},setSettings:a})]}}),t(O,{spacing:"$2",get children(){return[t(g,{colorScheme:"accent",onClick:m,get loading(){return s()||A()},get children(){return e("global.refresh")}}),t(g,{get loading(){return I()},onClick:async()=>{const c=w(r),o=new Set;for(const i of c){if(i.name===""||i.path===""){u.error(e("settings.s3_buckets_empty"));return}if(o.has(i.name)){u.error(e("settings.s3_buckets_duplicate_name"));return}o.add(i.name)}const l=await x();k(l,()=>u.success(e("global.save_success")))},get children(){return e("global.save")}})]}})]}})};export{ne as default};
1
+ import{a as b,h as t,bA as p,bn as y,I as B,cY as _,C as g,G as D,E as C,a4 as I,aW as v,b9 as f,cj as F,cV as G,m as J,cW as K,S as L,ba as k,n as u,bP as N,ae as O}from"./index.f27bc3a3.js";import{b as T}from"./useTitle.c1b8fc88.js";import{G as W}from"./index.7b37ac3e.js";import{I as R}from"./SettingItem.e3e93238.js";import{R as j}from"./ResponsiveGrid.a8ef36b9.js";import{a as q}from"./FolderTree.b115623c.js";import{c as d}from"./index.7f73cfca.js";import"./index.6a851756.js";import"./index.4e746469.js";import"./item_type.be442da4.js";import"./_commonjs-dynamic-modules.30ae7933.js";const H=e=>{const s=b();return t(_,{w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[t(p,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[t(y,{for:"path",display:"flex",alignItems:"center",get children(){return s("global.name")}}),t(B,{id:"name",get value(){return e.name},onChange:n=>e.onChange({...e,name:n.currentTarget.value})})]}}),t(p,{w:"$full",display:"flex",flexDirection:"column",required:!0,get children(){return[t(y,{for:"path",display:"flex",alignItems:"center",get children(){return s("metas.path")}}),t(q,{id:"path",get value(){return e.path},onChange:n=>e.onChange({...e,path:n})})]}}),t(_,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return t(g,{colorScheme:"danger",onClick:async()=>{e.onDelete()},get children(){return s("global.delete")}})}})]}})},P=e=>{const s=b();return console.log(e.buckets),t(I,{alignItems:"start",w:"$full",get children(){return[t(y,{display:"flex",alignItems:"center",get children(){return s("settings.s3_buckets")}}),t(g,{onClick:()=>{e.setSettings(n=>n.key==="s3_buckets","value",JSON.stringify([...e.buckets,{name:"",path:""}])),console.log(e.buckets)},get children(){return s("global.add")}}),t(D,{get each(){return e.buckets},children:n=>t(H,C(n,{onChange:r=>{console.log(r),e.setSettings(a=>a.key==="s3_buckets","value",JSON.stringify(e.buckets.map(a=>a.name===n.name?r:a)))},onDelete:()=>{e.setSettings(r=>r.key==="s3_buckets","value",JSON.stringify(e.buckets.filter(r=>r.name!==n.name)))}}))})]}})},w=e=>{const s={...e.find(n=>n.key==="s3_buckets")};return s.value?JSON.parse(s.value):[]},ne=()=>{const e=b();T("manage.sidemenu.s3");const[s,n]=v(()=>f.get(`/admin/setting/list?group=${W.S3}`)),[r,a]=F([]),m=async()=>{const c=await n();k(c,a)};m();const[$,x]=v(()=>f.post("/admin/setting/save",G(r))),[A,S]=J(!1);return t(I,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[t(j,{get children(){return[t(K,{each:r,children:(c,o)=>t(L,{get when(){return c().key!="s3_buckets"},get children(){return t(R,C(c,{onChange:l=>{a(i=>c().key===i.key,"value",l)},onDelete:async()=>{S(!0);const l=await f.post(`/admin/setting/delete?key=${c().key}`);S(!1),k(l,()=>{u.success(e("global.delete_success")),m()})}}))}})}),t(g,{onClick:()=>{const c=d.lib.WordArray.random(15),o=d.lib.WordArray.random(240/8),l=d.enc.Base64.stringify(c).replace(/[\r\n]/g,""),i=d.enc.Base64.stringify(o).replace(/[\r\n]/g,"");a(h=>h.key==="s3_access_key_id","value",l),a(h=>h.key==="s3_secret_access_key","value",i)},get children(){return e("settings.s3_generate")}}),t(N,{get children(){return e("settings.s3_restart_to_apply")}}),t(P,{get buckets(){return w(r)},setSettings:a})]}}),t(O,{spacing:"$2",get children(){return[t(g,{colorScheme:"accent",onClick:m,get loading(){return s()||A()},get children(){return e("global.refresh")}}),t(g,{get loading(){return $()},onClick:async()=>{const c=w(r),o=new Set;for(const i of c){if(i.name===""||i.path===""){u.error(e("settings.s3_buckets_empty"));return}if(o.has(i.name)){u.error(e("settings.s3_buckets_duplicate_name"));return}o.add(i.name)}const l=await x();k(l,()=>u.success(e("global.save_success")))},get children(){return e("global.save")}})]}})]}})};export{ne as default};
@@ -1 +1 @@
1
- !function(){function e(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}System.register(["./index-legacy.a7c40fe3.js","./index-legacy.efef9df2.js","./item_type-legacy.d1f1c701.js","./index-legacy.91fe7355.js"],(function(r){"use strict";var n,t,u,l,i,c,a,o,g,d,f,h,v,b,y,s,p,w,O,m,k,x,C,j,D,A,E,S;return{setters:[function(e){n=e.a,t=e.h,u=e.S,l=e.bn,i=e.az,c=e.ax,a=e.$,o=e.aC,g=e.a0,d=e.I,f=e.bz,h=e.T,v=e.bp,b=e.bq,y=e.br,s=e.bs,p=e.bt,w=e.bu,O=e.bv,m=e.G,k=e.bw,x=e.bx,C=e.by,j=e.F,D=e.bA},function(e){A=e.F},function(e){E=e.T},function(e){S=e.p}],execute:function(){r("I",(function(r){var T=n();return t(D,{get w(){var e;return null!==(e=r.w)&&void 0!==e?e:"100%"},display:"flex",flexDirection:"column",get children(){return[t(u,{get when(){return!r.hideLabel},get children(){var n,a;return t(l,(n={},"for",(a={}).for=a.for||{},a.for.get=function(){return r.key},e(n,"display","flex"),e(n,"alignItems","center"),"children",a.children=a.children||{},a.children.get=function(){return[i((function(){return T("settings.".concat(r.key))})),t(u,{get when(){return r.flag===A.DEPRECATED},get children(){return t(c,{ml:"$2",as:S,boxSize:"$5",color:"$danger9",verticalAlign:"middle",cursor:"pointer",onClick:function(){var e;null===(e=r.onDelete)||void 0===e||e.call(r)}})}})]},function(e,r){for(var n in r)(l=r[n]).configurable=l.enumerable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,n,l);if(Object.getOwnPropertySymbols)for(var t=Object.getOwnPropertySymbols(r),u=0;u<t.length;u++){var l,i=t[u];(l=r[i]).configurable=l.enumerable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,i,l)}}(n,a),n))}}),t(a,{get fallback(){return t(o,{get children(){return T("settings_other.unknown_type")}})},get children(){return[t(g,{get when(){return[E.String,E.Number].includes(r.type)},get children(){return t(d,{get type(){return r.type===E.Number?"number":""},get id(){return r.key},get value(){return r.value},onInput:function(e){var n;return null===(n=r.onChange)||void 0===n?void 0:n.call(r,e.currentTarget.value)},get readOnly(){return r.flag===A.READONLY}})}}),t(g,{get when(){return r.type===E.Bool},get children(){return t(f,{get id(){return r.key},get defaultChecked(){return"true"===r.value},onChange:function(e){var n;return null===(n=r.onChange)||void 0===n?void 0:n.call(r,e.currentTarget.checked?"true":"false")},get readOnly(){return r.flag===A.READONLY}})}}),t(g,{get when(){return r.type===E.Text},get children(){return t(h,{get id(){return r.key},get value(){return r.value},onChange:function(e){var n;return null===(n=r.onChange)||void 0===n?void 0:n.call(r,e.currentTarget.value)},get readOnly(){return r.flag===A.READONLY}})}}),t(g,{get when(){return r.type===E.Select},get children(){return t(v,{get id(){return r.key},get defaultValue(){return r.value},onChange:function(e){var n;return null===(n=r.onChange)||void 0===n?void 0:n.call(r,e)},get readOnly(){return r.flag===A.READONLY},get children(){return[t(b,{get children(){return[t(y,{get children(){return T("global.choose")}}),t(s,{}),t(p,{})]}}),t(w,{get children(){return t(O,{get children(){return t(m,{get each(){var e;return null===(e=r.options)||void 0===e?void 0:e.split(",")},children:function(e){return t(k,{value:e,get children(){return[t(x,{get children(){return T("settings.".concat(r.key,"s.").concat(e))}}),t(C,{})]}})}})}})}})]}})}})]}}),t(j,{get children(){return i((function(){return!!r.help}),!0)()?T("settings.".concat(r.key,"-tips")):""}})]}})}))}}}))}();
1
+ !function(){function e(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}System.register(["./index-legacy.700115ce.js","./index-legacy.20004795.js","./item_type-legacy.d1f1c701.js","./index-legacy.b820f693.js"],(function(r){"use strict";var n,t,u,l,i,c,a,o,g,d,f,h,v,b,y,s,p,w,O,m,k,x,C,j,D,A,E,S;return{setters:[function(e){n=e.a,t=e.h,u=e.S,l=e.bn,i=e.az,c=e.ax,a=e.$,o=e.aC,g=e.a0,d=e.I,f=e.bz,h=e.T,v=e.bp,b=e.bq,y=e.br,s=e.bs,p=e.bt,w=e.bu,O=e.bv,m=e.G,k=e.bw,x=e.bx,C=e.by,j=e.F,D=e.bA},function(e){A=e.F},function(e){E=e.T},function(e){S=e.p}],execute:function(){r("I",(function(r){var T=n();return t(D,{get w(){var e;return null!==(e=r.w)&&void 0!==e?e:"100%"},display:"flex",flexDirection:"column",get children(){return[t(u,{get when(){return!r.hideLabel},get children(){var n,a;return t(l,(n={},"for",(a={}).for=a.for||{},a.for.get=function(){return r.key},e(n,"display","flex"),e(n,"alignItems","center"),"children",a.children=a.children||{},a.children.get=function(){return[i((function(){return T("settings.".concat(r.key))})),t(u,{get when(){return r.flag===A.DEPRECATED},get children(){return t(c,{ml:"$2",as:S,boxSize:"$5",color:"$danger9",verticalAlign:"middle",cursor:"pointer",onClick:function(){var e;null===(e=r.onDelete)||void 0===e||e.call(r)}})}})]},function(e,r){for(var n in r)(l=r[n]).configurable=l.enumerable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,n,l);if(Object.getOwnPropertySymbols)for(var t=Object.getOwnPropertySymbols(r),u=0;u<t.length;u++){var l,i=t[u];(l=r[i]).configurable=l.enumerable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,i,l)}}(n,a),n))}}),t(a,{get fallback(){return t(o,{get children(){return T("settings_other.unknown_type")}})},get children(){return[t(g,{get when(){return[E.String,E.Number].includes(r.type)},get children(){return t(d,{get type(){return r.type===E.Number?"number":""},get id(){return r.key},get value(){return r.value},onInput:function(e){var n;return null===(n=r.onChange)||void 0===n?void 0:n.call(r,e.currentTarget.value)},get readOnly(){return r.flag===A.READONLY}})}}),t(g,{get when(){return r.type===E.Bool},get children(){return t(f,{get id(){return r.key},get defaultChecked(){return"true"===r.value},onChange:function(e){var n;return null===(n=r.onChange)||void 0===n?void 0:n.call(r,e.currentTarget.checked?"true":"false")},get readOnly(){return r.flag===A.READONLY}})}}),t(g,{get when(){return r.type===E.Text},get children(){return t(h,{get id(){return r.key},get value(){return r.value},onChange:function(e){var n;return null===(n=r.onChange)||void 0===n?void 0:n.call(r,e.currentTarget.value)},get readOnly(){return r.flag===A.READONLY}})}}),t(g,{get when(){return r.type===E.Select},get children(){return t(v,{get id(){return r.key},get defaultValue(){return r.value},onChange:function(e){var n;return null===(n=r.onChange)||void 0===n?void 0:n.call(r,e)},get readOnly(){return r.flag===A.READONLY},get children(){return[t(b,{get children(){return[t(y,{get children(){return T("global.choose")}}),t(s,{}),t(p,{})]}}),t(w,{get children(){return t(O,{get children(){return t(m,{get each(){var e;return null===(e=r.options)||void 0===e?void 0:e.split(",")},children:function(e){return t(k,{value:e,get children(){return[t(x,{get children(){return T("settings.".concat(r.key,"s.").concat(e))}}),t(C,{})]}})}})}})}})]}})}})]}}),t(j,{get children(){return i((function(){return!!r.help}),!0)()?T("settings.".concat(r.key,"-tips")):""}})]}})}))}}}))}();
@@ -1 +1 @@
1
- import{a as h,h as t,S as c,bn as d,az as i,ax as y,$ as b,aC as m,a0 as g,I as f,bz as S,T as C,bp as T,bq as k,br as w,bs as x,bt as v,bu as O,bv as D,G as I,bw as $,bx as o,by as A,F as E,bA as F}from"./index.fae3cea4.js";import{F as u}from"./index.72e3f724.js";import{T as a}from"./item_type.be442da4.js";import{p as L}from"./index.0adfc44b.js";const z=e=>{const l=h();return t(F,{get w(){var n;return(n=e.w)!=null?n:"100%"},display:"flex",flexDirection:"column",get children(){return[t(c,{get when(){return!e.hideLabel},get children(){return t(d,{get for(){return e.key},display:"flex",alignItems:"center",get children(){return[i(()=>l(`settings.${e.key}`)),t(c,{get when(){return e.flag===u.DEPRECATED},get children(){return t(y,{ml:"$2",as:L,boxSize:"$5",color:"$danger9",verticalAlign:"middle",cursor:"pointer",onClick:()=>{var n;(n=e.onDelete)==null||n.call(e)}})}})]}})}}),t(b,{get fallback(){return t(m,{get children(){return l("settings_other.unknown_type")}})},get children(){return[t(g,{get when(){return[a.String,a.Number].includes(e.type)},get children(){return t(f,{get type(){return e.type===a.Number?"number":""},get id(){return e.key},get value(){return e.value},onInput:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.currentTarget.value)},get readOnly(){return e.flag===u.READONLY}})}}),t(g,{get when(){return e.type===a.Bool},get children(){return t(S,{get id(){return e.key},get defaultChecked(){return e.value==="true"},onChange:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.currentTarget.checked?"true":"false")},get readOnly(){return e.flag===u.READONLY}})}}),t(g,{get when(){return e.type===a.Text},get children(){return t(C,{get id(){return e.key},get value(){return e.value},onChange:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.currentTarget.value)},get readOnly(){return e.flag===u.READONLY}})}}),t(g,{get when(){return e.type===a.Select},get children(){return t(T,{get id(){return e.key},get defaultValue(){return e.value},onChange:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n)},get readOnly(){return e.flag===u.READONLY},get children(){return[t(k,{get children(){return[t(w,{get children(){return l("global.choose")}}),t(x,{}),t(v,{})]}}),t(O,{get children(){return t(D,{get children(){return t(I,{get each(){var n;return(n=e.options)==null?void 0:n.split(",")},children:n=>t($,{value:n,get children(){return[t(o,{get children(){return l(`settings.${e.key}s.${n}`)}}),t(A,{})]}})})}})}})]}})}})]}}),t(E,{get children(){return i(()=>!!e.help,!0)()?l(`settings.${e.key}-tips`):""}})]}})};export{z as I};
1
+ import{a as h,h as t,S as c,bn as d,az as i,ax as y,$ as b,aC as m,a0 as g,I as f,bz as S,T as C,bp as T,bq as k,br as w,bs as x,bt as v,bu as O,bv as D,G as I,bw as $,bx as o,by as A,F as E,bA as F}from"./index.f27bc3a3.js";import{F as u}from"./index.7b37ac3e.js";import{T as a}from"./item_type.be442da4.js";import{p as L}from"./index.6a851756.js";const z=e=>{const l=h();return t(F,{get w(){var n;return(n=e.w)!=null?n:"100%"},display:"flex",flexDirection:"column",get children(){return[t(c,{get when(){return!e.hideLabel},get children(){return t(d,{get for(){return e.key},display:"flex",alignItems:"center",get children(){return[i(()=>l(`settings.${e.key}`)),t(c,{get when(){return e.flag===u.DEPRECATED},get children(){return t(y,{ml:"$2",as:L,boxSize:"$5",color:"$danger9",verticalAlign:"middle",cursor:"pointer",onClick:()=>{var n;(n=e.onDelete)==null||n.call(e)}})}})]}})}}),t(b,{get fallback(){return t(m,{get children(){return l("settings_other.unknown_type")}})},get children(){return[t(g,{get when(){return[a.String,a.Number].includes(e.type)},get children(){return t(f,{get type(){return e.type===a.Number?"number":""},get id(){return e.key},get value(){return e.value},onInput:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.currentTarget.value)},get readOnly(){return e.flag===u.READONLY}})}}),t(g,{get when(){return e.type===a.Bool},get children(){return t(S,{get id(){return e.key},get defaultChecked(){return e.value==="true"},onChange:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.currentTarget.checked?"true":"false")},get readOnly(){return e.flag===u.READONLY}})}}),t(g,{get when(){return e.type===a.Text},get children(){return t(C,{get id(){return e.key},get value(){return e.value},onChange:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n.currentTarget.value)},get readOnly(){return e.flag===u.READONLY}})}}),t(g,{get when(){return e.type===a.Select},get children(){return t(T,{get id(){return e.key},get defaultValue(){return e.value},onChange:n=>{var r;return(r=e.onChange)==null?void 0:r.call(e,n)},get readOnly(){return e.flag===u.READONLY},get children(){return[t(k,{get children(){return[t(w,{get children(){return l("global.choose")}}),t(x,{}),t(v,{})]}}),t(O,{get children(){return t(D,{get children(){return t(I,{get each(){var n;return(n=e.options)==null?void 0:n.split(",")},children:n=>t($,{value:n,get children(){return[t(o,{get children(){return l(`settings.${e.key}s.${n}`)}}),t(A,{})]}})})}})}})]}})}})]}}),t(E,{get children(){return i(()=>!!e.help,!0)()?l(`settings.${e.key}-tips`):""}})]}})};export{z as I};
@@ -1 +1 @@
1
- !function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var e={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(j){l=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=r&&r.prototype instanceof d?r:d,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return $()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=k(a,e);if(c){if(c===f)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=h(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(j){return{type:"throw",arg:j}}}e.wrap=s;var f={};function d(){}function g(){}function p(){}var v={};l(v,a,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(S([])));m&&m!==n&&o.call(m,a)&&(v=m);var b=p.prototype=d.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function n(i,a,c,u){var l=h(r[i],r,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}}function k(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,k(t,r),"throw"===r.method))return f;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,f;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function S(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:$}}function $(){return{value:void 0,done:!0}}return g.prototype=p,l(b,"constructor",p),l(p,"constructor",g),g.displayName=l(p,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),f},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),_(e),f}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;_(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:S(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),f}},e}function e(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void e(l)}c.done?r(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function c(t){e(a,o,i,c,u,"next",t)}function u(t){e(a,o,i,c,u,"throw",t)}c(void 0)}))}}function o(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,c=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return i(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}System.register(["./index-legacy.a7c40fe3.js","./useTitle-legacy.e942225f.js","./DeletePopover-legacy.1906395c.js"],(function(t){"use strict";var e,i,a,c,u,l,s,h,f,d,g,p,v,y,m,b,w,x,k,L,_,E,S,$,j,O,C,G,P,T,A,N,I,F,B,X,Y,z,D,H,M,W,q,U;return{setters:[function(t){e=t.a,i=t.h,a=t.X,c=t.al,u=t.ae,l=t.b5,s=t.ck,h=t.az,f=t.a7,d=t.a4,g=t.df,p=t.dc,v=t.b,y=t.aW,m=t.b9,b=t.C,w=t.aY,x=t.ba,k=t.n,L=t.m,_=t.k,E=t.cg,S=t.S,$=t.bp,j=t.bq,O=t.br,C=t.bs,G=t.bt,P=t.bu,T=t.bv,A=t.G,N=t.bw,I=t.bx,F=t.by,B=t.bz,X=t.$,Y=t.a0,z=t.d0,D=t.da,H=t.db,M=t.dd,W=t.de},function(t){q=t.b},function(t){U=t.D}],execute:function(){function J(t){var a,c,u=e(),l=v().to,s=o(y((function(){return m.post("/admin/storage/delete?id=".concat(t.storage.id))})),2),h=s[0],f=s[1],d=o(y((function(){return m.post("/admin/storage/".concat(t.storage.disabled?"enable":"disable","?id=").concat(t.storage.id))})),2),g=d[0],p=d[1];return[i(b,{onClick:function(){l("/@manage/storages/edit/".concat(t.storage.id))},get children(){return u("global.edit")}}),i(b,{get loading(){return g()},get colorScheme(){return t.storage.disabled?"success":"warning"},onClick:(c=n(r().mark((function e(){var n;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,p();case 2:n=r.sent,w(n,(function(){t.refresh()}));case 4:case"end":return r.stop()}}),e)}))),function(){return c.apply(this,arguments)}),get children(){return u("global.".concat(t.storage.disabled?"enable":"disable"))}}),i(U,{get name(){return t.storage.mount_path},get loading(){return h()},onClick:(a=n(r().mark((function e(){var n;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,f();case 2:n=r.sent,x(n,(function(){k.success(u("global.delete_success")),t.refresh()}));case 4:case"end":return r.stop()}}),e)}))),function(){return a.apply(this,arguments)})})]}function K(t){var r=e();return i(d,{w:"$full",spacing:"$2",rounded:"$lg",border:"1px solid $neutral7",get background(){return a("$neutral2","$neutral3")()},p:"$3",get _hover(){return{border:"1px solid ".concat(c())}},get children(){return[i(u,{spacing:"$2",get children(){return[i(l,{fontWeight:"$medium",css:{wordBreak:"break-all"},get children(){return t.storage.mount_path}}),i(s,{colorScheme:"info",get children(){return r("drivers.drivers.".concat(t.storage.driver))}})]}}),i(u,{get children(){return[i(l,{get children(){return[h((function(){return r("storages.common.status")})),": "]}}),i(f,{css:{wordBreak:"break-all"},overflowX:"auto",get innerHTML(){return t.storage.status}})]}}),i(l,{css:{wordBreak:"break-all"},get children(){return t.storage.remark}}),i(u,{spacing:"$2",get children(){return i(J,t)}})]}})}function Q(t){var r=e();return i(p,{get children(){return[i(g,{get children(){return t.storage.mount_path}}),i(g,{get children(){return r("drivers.drivers.".concat(t.storage.driver))}}),i(g,{get children(){return t.storage.order}}),i(g,{get children(){return t.storage.status}}),i(g,{get children(){return t.storage.remark}}),i(g,{get children(){return i(u,{spacing:"$2",get children(){return i(J,t)}})}})]}})}t("default",(function(){var t=e();q("manage.sidemenu.storages");var a=v().to,c=o(y((function(){return m.get("/admin/storage/list")})),2),l=c[0],s=c[1],h=o(L([]),2),g=h[0],w=h[1],U=function(){var t=n(r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s();case 2:e=t.sent,x(e,(function(t){return w(t.content)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),J=o(L([]),2),R=J[0],V=J[1],Z=o(L([]),2),tt=Z[0],rt=Z[1],et=function(){var t=n(r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.get("/admin/driver/names");case 2:e=t.sent,x(e,(function(t){return V(t)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();et(),U();var nt=function(){var e=n(r().mark((function e(){var n;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,m.post("/admin/storage/load_all");case 2:n=r.sent,x(n,(function(){k.success(t("storages.other.start_load_success"))}));case 4:case"end":return r.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ot=_((function(){return g().filter((function(t){return 0===tt().length||tt().includes(t.driver)}))})),it=o(E("storages-layout","grid"),2),at=it[0],ct=it[1];return i(d,{spacing:"$3",alignItems:"start",w:"$full",get children(){return[i(u,{spacing:"$2",gap:"$2",w:"$full",wrap:{"@initial":"wrap","@md":"unset"},get children(){return[i(b,{colorScheme:"accent",get loading(){return l()},onClick:U,get children(){return t("global.refresh")}}),i(b,{onClick:function(){a("/@manage/storages/add")},get children(){return t("global.add")}}),i(b,{colorScheme:"warning",get loading(){return l()},onClick:nt,get children(){return t("storages.other.load_all")}}),i(S,{get when(){return R().length>0},get children(){return i($,{multiple:!0,get value(){return tt()},onChange:rt,get children(){return[i(j,{get children(){return[i(O,{get children(){return t("storages.other.filter_by_driver")}}),i(C,{}),i(G,{})]}}),i(P,{get children(){return i(T,{get children(){return i(A,{get each(){return R()},children:function(r){return i(N,{value:r,get children(){return[i(I,{get children(){return t("drivers.drivers.".concat(r))}}),i(F,{})]}})}})}})}})]}})}}),i(B,{get checked(){return"table"===at()},onChange:function(t){ct(t.currentTarget.checked?"table":"grid")},get children(){return t("storages.other.table_layout")}})]}}),i(X,{get children(){return[i(Y,{get when(){return"grid"===at()},get children(){return i(z,{w:"$full",gap:"$2_5",templateColumns:{"@initial":"1fr","@lg":"repeat(auto-fill, minmax(324px, 1fr))"},get children(){return i(A,{get each(){return ot()},children:function(t){return i(K,{storage:t,refresh:U})}})}})}}),i(Y,{get when(){return"table"===at()},get children(){return i(f,{w:"$full",overflowX:"auto",get children(){return i(D,{highlightOnHover:!0,dense:!0,get children(){return[i(H,{get children(){return i(p,{get children(){return[i(A,{each:["mount_path","driver","order","status","remark"],children:function(r){return i(M,{get children(){return t("storages.common.".concat(r))}})}}),i(M,{get children(){return t("global.operations")}})]}})}}),i(W,{get children(){return i(A,{get each(){return ot()},children:function(t){return i(Q,{storage:t,refresh:U})}})}})]}})}})}})]}})]}})}))}}}))}();
1
+ !function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var e={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(j){l=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=r&&r.prototype instanceof d?r:d,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return $()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=k(a,e);if(c){if(c===f)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=h(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(j){return{type:"throw",arg:j}}}e.wrap=s;var f={};function d(){}function g(){}function p(){}var v={};l(v,a,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(S([])));m&&m!==n&&o.call(m,a)&&(v=m);var b=p.prototype=d.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function n(i,a,c,u){var l=h(r[i],r,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}}function k(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,k(t,r),"throw"===r.method))return f;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=h(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,f;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function S(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:$}}function $(){return{value:void 0,done:!0}}return g.prototype=p,l(b,"constructor",p),l(p,"constructor",g),g.displayName=l(p,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,u,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),f},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),_(e),f}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;_(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:S(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),f}},e}function e(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void e(l)}c.done?r(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function c(t){e(a,o,i,c,u,"next",t)}function u(t){e(a,o,i,c,u,"throw",t)}c(void 0)}))}}function o(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var n,o,i=[],a=!0,c=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return i}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return i(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}System.register(["./index-legacy.700115ce.js","./useTitle-legacy.1ab50c72.js","./DeletePopover-legacy.0ac898a9.js"],(function(t){"use strict";var e,i,a,c,u,l,s,h,f,d,g,p,v,y,m,b,w,x,k,L,_,E,S,$,j,O,C,G,P,T,A,N,I,F,X,B,Y,z,D,H,M,W,q,U;return{setters:[function(t){e=t.a,i=t.h,a=t.X,c=t.al,u=t.ae,l=t.b5,s=t.ck,h=t.az,f=t.a7,d=t.a4,g=t.da,p=t.d7,v=t.b,y=t.aW,m=t.b9,b=t.C,w=t.aY,x=t.ba,k=t.n,L=t.m,_=t.k,E=t.cg,S=t.S,$=t.bp,j=t.bq,O=t.br,C=t.bs,G=t.bt,P=t.bu,T=t.bv,A=t.G,N=t.bw,I=t.bx,F=t.by,X=t.bz,B=t.$,Y=t.a0,z=t.cX,D=t.d5,H=t.d6,M=t.d8,W=t.d9},function(t){q=t.b},function(t){U=t.D}],execute:function(){function J(t){var a,c,u=e(),l=v().to,s=o(y((function(){return m.post("/admin/storage/delete?id=".concat(t.storage.id))})),2),h=s[0],f=s[1],d=o(y((function(){return m.post("/admin/storage/".concat(t.storage.disabled?"enable":"disable","?id=").concat(t.storage.id))})),2),g=d[0],p=d[1];return[i(b,{onClick:function(){l("/@manage/storages/edit/".concat(t.storage.id))},get children(){return u("global.edit")}}),i(b,{get loading(){return g()},get colorScheme(){return t.storage.disabled?"success":"warning"},onClick:(c=n(r().mark((function e(){var n;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,p();case 2:n=r.sent,w(n,(function(){t.refresh()}));case 4:case"end":return r.stop()}}),e)}))),function(){return c.apply(this,arguments)}),get children(){return u("global.".concat(t.storage.disabled?"enable":"disable"))}}),i(U,{get name(){return t.storage.mount_path},get loading(){return h()},onClick:(a=n(r().mark((function e(){var n;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,f();case 2:n=r.sent,x(n,(function(){k.success(u("global.delete_success")),t.refresh()}));case 4:case"end":return r.stop()}}),e)}))),function(){return a.apply(this,arguments)})})]}function K(t){var r=e();return i(d,{w:"$full",spacing:"$2",rounded:"$lg",border:"1px solid $neutral7",get background(){return a("$neutral2","$neutral3")()},p:"$3",get _hover(){return{border:"1px solid ".concat(c())}},get children(){return[i(u,{spacing:"$2",get children(){return[i(l,{fontWeight:"$medium",css:{wordBreak:"break-all"},get children(){return t.storage.mount_path}}),i(s,{colorScheme:"info",get children(){return r("drivers.drivers.".concat(t.storage.driver))}})]}}),i(u,{get children(){return[i(l,{get children(){return[h((function(){return r("storages.common.status")})),": "]}}),i(f,{css:{wordBreak:"break-all"},overflowX:"auto",get innerHTML(){return t.storage.status}})]}}),i(l,{css:{wordBreak:"break-all"},get children(){return t.storage.remark}}),i(u,{spacing:"$2",get children(){return i(J,t)}})]}})}function Q(t){var r=e();return i(p,{get children(){return[i(g,{get children(){return t.storage.mount_path}}),i(g,{get children(){return r("drivers.drivers.".concat(t.storage.driver))}}),i(g,{get children(){return t.storage.order}}),i(g,{get children(){return t.storage.status}}),i(g,{get children(){return t.storage.remark}}),i(g,{get children(){return i(u,{spacing:"$2",get children(){return i(J,t)}})}})]}})}t("default",(function(){var t=e();q("manage.sidemenu.storages");var a=v().to,c=o(y((function(){return m.get("/admin/storage/list")})),2),l=c[0],s=c[1],h=o(L([]),2),g=h[0],w=h[1],U=function(){var t=n(r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s();case 2:e=t.sent,x(e,(function(t){return w(t.content)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),J=o(L([]),2),R=J[0],V=J[1],Z=o(L([]),2),tt=Z[0],rt=Z[1],et=function(){var t=n(r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.get("/admin/driver/names");case 2:e=t.sent,x(e,(function(t){return V(t)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();et(),U();var nt=function(){var e=n(r().mark((function e(){var n;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,m.post("/admin/storage/load_all");case 2:n=r.sent,x(n,(function(){k.success(t("storages.other.start_load_success"))}));case 4:case"end":return r.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ot=_((function(){return g().filter((function(t){return 0===tt().length||tt().includes(t.driver)}))})),it=o(E("storages-layout","grid"),2),at=it[0],ct=it[1];return i(d,{spacing:"$3",alignItems:"start",w:"$full",get children(){return[i(u,{spacing:"$2",gap:"$2",w:"$full",wrap:{"@initial":"wrap","@md":"unset"},get children(){return[i(b,{colorScheme:"accent",get loading(){return l()},onClick:U,get children(){return t("global.refresh")}}),i(b,{onClick:function(){a("/@manage/storages/add")},get children(){return t("global.add")}}),i(b,{colorScheme:"warning",get loading(){return l()},onClick:nt,get children(){return t("storages.other.load_all")}}),i(S,{get when(){return R().length>0},get children(){return i($,{multiple:!0,get value(){return tt()},onChange:rt,get children(){return[i(j,{get children(){return[i(O,{get children(){return t("storages.other.filter_by_driver")}}),i(C,{}),i(G,{})]}}),i(P,{get children(){return i(T,{get children(){return i(A,{get each(){return R()},children:function(r){return i(N,{value:r,get children(){return[i(I,{get children(){return t("drivers.drivers.".concat(r))}}),i(F,{})]}})}})}})}})]}})}}),i(X,{get checked(){return"table"===at()},onChange:function(t){ct(t.currentTarget.checked?"table":"grid")},get children(){return t("storages.other.table_layout")}})]}}),i(B,{get children(){return[i(Y,{get when(){return"grid"===at()},get children(){return i(z,{w:"$full",gap:"$2_5",templateColumns:{"@initial":"1fr","@lg":"repeat(auto-fill, minmax(324px, 1fr))"},get children(){return i(A,{get each(){return ot()},children:function(t){return i(K,{storage:t,refresh:U})}})}})}}),i(Y,{get when(){return"table"===at()},get children(){return i(f,{w:"$full",overflowX:"auto",get children(){return i(D,{highlightOnHover:!0,dense:!0,get children(){return[i(H,{get children(){return i(p,{get children(){return[i(A,{each:["mount_path","driver","order","status","remark"],children:function(r){return i(M,{get children(){return t("storages.common.".concat(r))}})}}),i(M,{get children(){return t("global.operations")}})]}})}}),i(W,{get children(){return i(A,{get each(){return ot()},children:function(t){return i(Q,{storage:t,refresh:U})}})}})]}})}})}})]}})]}})}))}}}))}();
@@ -1 +1 @@
1
- import{a as h,h as e,X as R,al as V,ae as o,b5 as v,ck as W,az as X,a7 as x,a4 as p,df as l,dc as D,b as L,aW as y,b9 as i,C as c,aY as z,ba as u,n as O,m as k,k as A,cg as F,S as P,bp as q,bq as N,br as Y,bs as j,bt as E,bu as J,bv as K,G as d,bw as Q,bx as U,by as Z,bz as ee,$ as re,a0 as _,d0 as te,da as ae,db as ne,dd as T,de as se}from"./index.fae3cea4.js";import{b as le}from"./useTitle.630c0b7f.js";import{D as oe}from"./DeletePopover.f7887d88.js";function B(r){const a=h(),{to:g}=L(),[b,m]=y(()=>i.post(`/admin/storage/delete?id=${r.storage.id}`)),[S,n]=y(()=>i.post(`/admin/storage/${r.storage.disabled?"enable":"disable"}?id=${r.storage.id}`));return[e(c,{onClick:()=>{g(`/@manage/storages/edit/${r.storage.id}`)},get children(){return a("global.edit")}}),e(c,{get loading(){return S()},get colorScheme(){return r.storage.disabled?"success":"warning"},onClick:async()=>{const s=await n();z(s,()=>{r.refresh()})},get children(){return a(`global.${r.storage.disabled?"enable":"disable"}`)}}),e(oe,{get name(){return r.storage.mount_path},get loading(){return b()},onClick:async()=>{const s=await m();u(s,()=>{O.success(a("global.delete_success")),r.refresh()})}})]}function ie(r){const a=h();return e(p,{w:"$full",spacing:"$2",rounded:"$lg",border:"1px solid $neutral7",get background(){return R("$neutral2","$neutral3")()},p:"$3",get _hover(){return{border:`1px solid ${V()}`}},get children(){return[e(o,{spacing:"$2",get children(){return[e(v,{fontWeight:"$medium",css:{wordBreak:"break-all"},get children(){return r.storage.mount_path}}),e(W,{colorScheme:"info",get children(){return a(`drivers.drivers.${r.storage.driver}`)}})]}}),e(o,{get children(){return[e(v,{get children(){return[X(()=>a("storages.common.status")),":\xA0"]}}),e(x,{css:{wordBreak:"break-all"},overflowX:"auto",get innerHTML(){return r.storage.status}})]}}),e(v,{css:{wordBreak:"break-all"},get children(){return r.storage.remark}}),e(o,{spacing:"$2",get children(){return e(B,r)}})]}})}function ce(r){const a=h();return e(D,{get children(){return[e(l,{get children(){return r.storage.mount_path}}),e(l,{get children(){return a(`drivers.drivers.${r.storage.driver}`)}}),e(l,{get children(){return r.storage.order}}),e(l,{get children(){return r.storage.status}}),e(l,{get children(){return r.storage.remark}}),e(l,{get children(){return e(o,{spacing:"$2",get children(){return e(B,r)}})}})]}})}const be=()=>{const r=h();le("manage.sidemenu.storages");const{to:a}=L(),[g,b]=y(()=>i.get("/admin/storage/list")),[m,S]=k([]),n=async()=>{const t=await b();u(t,w=>S(w.content))},[s,M]=k([]),[f,I]=k([]);(async()=>{const t=await i.get("/admin/driver/names");u(t,w=>M(w))})(),n();const G=async()=>{const t=await i.post("/admin/storage/load_all");u(t,()=>{O.success(r("storages.other.start_load_success"))})},C=A(()=>m().filter(t=>f().length===0?!0:f().includes(t.driver))),[$,H]=F("storages-layout","grid");return e(p,{spacing:"$3",alignItems:"start",w:"$full",get children(){return[e(o,{spacing:"$2",gap:"$2",w:"$full",wrap:{"@initial":"wrap","@md":"unset"},get children(){return[e(c,{colorScheme:"accent",get loading(){return g()},onClick:n,get children(){return r("global.refresh")}}),e(c,{onClick:()=>{a("/@manage/storages/add")},get children(){return r("global.add")}}),e(c,{colorScheme:"warning",get loading(){return g()},onClick:G,get children(){return r("storages.other.load_all")}}),e(P,{get when(){return s().length>0},get children(){return e(q,{multiple:!0,get value(){return f()},onChange:I,get children(){return[e(N,{get children(){return[e(Y,{get children(){return r("storages.other.filter_by_driver")}}),e(j,{}),e(E,{})]}}),e(J,{get children(){return e(K,{get children(){return e(d,{get each(){return s()},children:t=>e(Q,{value:t,get children(){return[e(U,{get children(){return r(`drivers.drivers.${t}`)}}),e(Z,{})]}})})}})}})]}})}}),e(ee,{get checked(){return $()==="table"},onChange:t=>{H(t.currentTarget.checked?"table":"grid")},get children(){return r("storages.other.table_layout")}})]}}),e(re,{get children(){return[e(_,{get when(){return $()==="grid"},get children(){return e(te,{w:"$full",gap:"$2_5",templateColumns:{"@initial":"1fr","@lg":"repeat(auto-fill, minmax(324px, 1fr))"},get children(){return e(d,{get each(){return C()},children:t=>e(ie,{storage:t,refresh:n})})}})}}),e(_,{get when(){return $()==="table"},get children(){return e(x,{w:"$full",overflowX:"auto",get children(){return e(ae,{highlightOnHover:!0,dense:!0,get children(){return[e(ne,{get children(){return e(D,{get children(){return[e(d,{each:["mount_path","driver","order","status","remark"],children:t=>e(T,{get children(){return r(`storages.common.${t}`)}})}),e(T,{get children(){return r("global.operations")}})]}})}}),e(se,{get children(){return e(d,{get each(){return C()},children:t=>e(ce,{storage:t,refresh:n})})}})]}})}})}})]}})]}})};export{be as default};
1
+ import{a as h,h as e,X as H,al as R,ae as o,b5 as v,ck as V,az as W,a7 as x,a4 as p,da as l,d7 as D,b as L,aW as y,b9 as i,C as c,aY as z,ba as u,n as O,m as k,k as A,cg as F,S as P,bp as q,bq as N,br as Y,bs as j,bt as E,bu as J,bv as K,G as d,bw as Q,bx as U,by as Z,bz as ee,$ as re,a0 as _,cX as te,d5 as ae,d6 as ne,d8 as T,d9 as se}from"./index.f27bc3a3.js";import{b as le}from"./useTitle.c1b8fc88.js";import{D as oe}from"./DeletePopover.610bc212.js";function B(r){const a=h(),{to:g}=L(),[b,m]=y(()=>i.post(`/admin/storage/delete?id=${r.storage.id}`)),[S,n]=y(()=>i.post(`/admin/storage/${r.storage.disabled?"enable":"disable"}?id=${r.storage.id}`));return[e(c,{onClick:()=>{g(`/@manage/storages/edit/${r.storage.id}`)},get children(){return a("global.edit")}}),e(c,{get loading(){return S()},get colorScheme(){return r.storage.disabled?"success":"warning"},onClick:async()=>{const s=await n();z(s,()=>{r.refresh()})},get children(){return a(`global.${r.storage.disabled?"enable":"disable"}`)}}),e(oe,{get name(){return r.storage.mount_path},get loading(){return b()},onClick:async()=>{const s=await m();u(s,()=>{O.success(a("global.delete_success")),r.refresh()})}})]}function ie(r){const a=h();return e(p,{w:"$full",spacing:"$2",rounded:"$lg",border:"1px solid $neutral7",get background(){return H("$neutral2","$neutral3")()},p:"$3",get _hover(){return{border:`1px solid ${R()}`}},get children(){return[e(o,{spacing:"$2",get children(){return[e(v,{fontWeight:"$medium",css:{wordBreak:"break-all"},get children(){return r.storage.mount_path}}),e(V,{colorScheme:"info",get children(){return a(`drivers.drivers.${r.storage.driver}`)}})]}}),e(o,{get children(){return[e(v,{get children(){return[W(()=>a("storages.common.status")),":\xA0"]}}),e(x,{css:{wordBreak:"break-all"},overflowX:"auto",get innerHTML(){return r.storage.status}})]}}),e(v,{css:{wordBreak:"break-all"},get children(){return r.storage.remark}}),e(o,{spacing:"$2",get children(){return e(B,r)}})]}})}function ce(r){const a=h();return e(D,{get children(){return[e(l,{get children(){return r.storage.mount_path}}),e(l,{get children(){return a(`drivers.drivers.${r.storage.driver}`)}}),e(l,{get children(){return r.storage.order}}),e(l,{get children(){return r.storage.status}}),e(l,{get children(){return r.storage.remark}}),e(l,{get children(){return e(o,{spacing:"$2",get children(){return e(B,r)}})}})]}})}const be=()=>{const r=h();le("manage.sidemenu.storages");const{to:a}=L(),[g,b]=y(()=>i.get("/admin/storage/list")),[m,S]=k([]),n=async()=>{const t=await b();u(t,w=>S(w.content))},[s,M]=k([]),[$,I]=k([]);(async()=>{const t=await i.get("/admin/driver/names");u(t,w=>M(w))})(),n();const X=async()=>{const t=await i.post("/admin/storage/load_all");u(t,()=>{O.success(r("storages.other.start_load_success"))})},C=A(()=>m().filter(t=>$().length===0?!0:$().includes(t.driver))),[f,G]=F("storages-layout","grid");return e(p,{spacing:"$3",alignItems:"start",w:"$full",get children(){return[e(o,{spacing:"$2",gap:"$2",w:"$full",wrap:{"@initial":"wrap","@md":"unset"},get children(){return[e(c,{colorScheme:"accent",get loading(){return g()},onClick:n,get children(){return r("global.refresh")}}),e(c,{onClick:()=>{a("/@manage/storages/add")},get children(){return r("global.add")}}),e(c,{colorScheme:"warning",get loading(){return g()},onClick:X,get children(){return r("storages.other.load_all")}}),e(P,{get when(){return s().length>0},get children(){return e(q,{multiple:!0,get value(){return $()},onChange:I,get children(){return[e(N,{get children(){return[e(Y,{get children(){return r("storages.other.filter_by_driver")}}),e(j,{}),e(E,{})]}}),e(J,{get children(){return e(K,{get children(){return e(d,{get each(){return s()},children:t=>e(Q,{value:t,get children(){return[e(U,{get children(){return r(`drivers.drivers.${t}`)}}),e(Z,{})]}})})}})}})]}})}}),e(ee,{get checked(){return f()==="table"},onChange:t=>{G(t.currentTarget.checked?"table":"grid")},get children(){return r("storages.other.table_layout")}})]}}),e(re,{get children(){return[e(_,{get when(){return f()==="grid"},get children(){return e(te,{w:"$full",gap:"$2_5",templateColumns:{"@initial":"1fr","@lg":"repeat(auto-fill, minmax(324px, 1fr))"},get children(){return e(d,{get each(){return C()},children:t=>e(ie,{storage:t,refresh:n})})}})}}),e(_,{get when(){return f()==="table"},get children(){return e(x,{w:"$full",overflowX:"auto",get children(){return e(ae,{highlightOnHover:!0,dense:!0,get children(){return[e(ne,{get children(){return e(D,{get children(){return[e(d,{each:["mount_path","driver","order","status","remark"],children:t=>e(T,{get children(){return r(`storages.common.${t}`)}})}),e(T,{get children(){return r("global.operations")}})]}})}}),e(se,{get children(){return e(d,{get each(){return C()},children:t=>e(ce,{storage:t,refresh:n})})}})]}})}})}})]}})]}})};export{be as default};
@@ -1 +1 @@
1
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(j){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(j){return{type:"throw",arg:j}}}r.wrap=s;var h={};function d(){}function p(){}function g(){}var y={};l(y,a,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v($([])));m&&m!==n&&o.call(m,a)&&(y=m);var w=g.prototype=d.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function n(i,a,c,u){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==t(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(h).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function $(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:_}}function _(){return{value:void 0,done:!0}}return p.prototype=g,l(w,"constructor",g),l(g,"constructor",p),p.displayName=l(g,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,c,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),l(w,u,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},r.values=$,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:$(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))}}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register(["./index-legacy.a7c40fe3.js","./Paginator-legacy.6f9f1dcb.js"],(function(t){"use strict";var r,i,c,u,l,s,f,h,d,p,g,y,v,m,w,b,x,k,S,L,E,$,_;return{setters:[function(t){r=t.a,i=t.aW,c=t.b9,u=t.m,l=t.h,s=t.d1,f=t.X,h=t.a4,d=t.bP,p=t.b5,g=t.S,y=t.cm,v=t.cn,m=t.C,w=t.ba,b=t.n,x=t.ck,k=t.G,S=t.e,L=t.k,E=t.ae,$=t.E},function(t){_=t.P}],execute:function(){var j,C;!function(t){t[t.Pending=0]="Pending",t[t.Running=1]="Running",t[t.Succeeded=2]="Succeeded",t[t.Canceling=3]="Canceling",t[t.Canceled=4]="Canceled",t[t.Errored=5]="Errored",t[t.Failing=6]="Failing",t[t.Failed=7]="Failed",t[t.WaitingRetry=8]="WaitingRetry",t[t.BeforeRetry=9]="BeforeRetry"}(C||(C={}));var O=(a(j={},C.Failed,"danger"),a(j,C.Succeeded,"success"),a(j,C.Canceled,"neutral"),j),P=function(t){if(t.role<0)return null;var e=["info","neutral","accent"];return l(x,{get colorScheme(){return e[t.role]},get children(){return t.name}})},F=function(t){var e=r();return l(x,{get colorScheme(){var e;return null!==(e=O[t.state])&&void 0!==e?e:"info"},get children(){return e("tasks.state.".concat(t.state))}})},I=function(t){var a=r(),x="undone"===t.done?"cancel":"delete",k="done"===t.done&&t.state===C.Failed,S=o(i((function(){return c.post("/task/".concat(t.type,"/").concat(x,"?tid=").concat(t.id))})),2),L=S[0],E=S[1],$=o(i((function(){return c.post("/task/".concat(t.type,"/retry?tid=").concat(t.id))})),2),_=$[0],j=$[1],O=o(u(!1),2),I=O[0],G=O[1];return l(g,{get when(){return!I()},get children(){return l(s,{get bgColor(){return f("$background","$neutral3")()},w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[l(h,{w:"$full",alignItems:"start",spacing:"$1",get children(){return[l(d,{size:"sm",css:{wordBreak:"break-all"},get children(){return t.name}}),l(P,{get name(){return t.creator},get role(){return t.creator_role}}),l(F,{get state(){return t.state}}),l(p,{css:{wordBreak:"break-all"},get children(){return t.status}}),l(g,{get when(){return t.error},get children(){return l(p,{color:"$danger9",css:{wordBreak:"break-all"},get children(){return t.error}})}}),l(y,{w:"$full",trackColor:"$info3",rounded:"$full",size:"sm",get value(){return t.progress},get children(){return l(v,{color:"$info8",rounded:"$md"})}})]}}),l(s,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return[l(g,{get when(){return t.canRetry},get children(){return l(m,{disabled:!k,display:k?"block":"none",get loading(){return _()},onClick:(t=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,j();case 2:r=t.sent,w(r,(function(){b.info(a("tasks.retry")),G(!0)}));case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),get children(){return a("tasks.retry")}});var t}}),l(m,{colorScheme:"danger",get loading(){return L()},onClick:(r=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,E();case 2:r=t.sent,w(r,(function(){b.success(a("global.delete_success")),G(!0)}));case 4:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),get children(){return a("global.".concat(x))}})];var r}})]}})}})},G=function(t){var a=r(),s=o(i((function(){return c.get("/task/".concat(t.type,"/").concat(t.done))})),2),f=s[0],p=s[1],y=o(u([]),2),v=y[0],b=y[1],x=function(){var t=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p();case 2:r=t.sent,w(r,(function(t){var e;return b(null!==(e=null==t?void 0:t.sort((function(t,e){return t.id>e.id?1:-1})))&&void 0!==e?e:[])}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(x(),"undone"===t.done){var j=setInterval(x,2e3);S((function(){return clearInterval(j)}))}var C=o(i((function(){return c.post("/task/".concat(t.type,"/clear_done"))})),2),O=C[0],P=C[1],F=o(i((function(){return c.post("/task/".concat(t.type,"/clear_succeeded"))})),2),G=F[0],R=F[1],A=o(i((function(){return c.post("/task/".concat(t.type,"/retry_failed"))})),2),N=A[0],T=A[1],z=o(u(1),2),B=z[0],W=z[1],X=L((function(){var t=20*(B()-1),e=t+20;return v().slice(t,e)}));return l(h,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[l(d,{size:"lg",get children(){return a("tasks.".concat(t.done))}}),l(g,{get when(){return"done"===t.done},get children(){return l(E,{gap:"$2",flexWrap:"wrap",get children(){return[l(m,{colorScheme:"accent",get loading(){return f()},onClick:x,get children(){return a("global.refresh")}}),l(m,{get loading(){return N()},onClick:(o=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T();case 2:r=t.sent,w(r,(function(){return x()}));case 4:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)}),get children(){return a("tasks.retry_failed")}}),l(m,{colorScheme:"danger",get loading(){return O()},onClick:(r=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P();case 2:r=t.sent,w(r,(function(){return x()}));case 4:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),get children(){return a("global.clear")}}),l(m,{colorScheme:"success",get loading(){return G()},onClick:(t=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,R();case 2:r=t.sent,w(r,(function(){return x()}));case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),get children(){return a("tasks.clear_succeeded")}})];var t,r,o}})}}),l(h,{w:"$full",spacing:"$2",get children(){return l(k,{get each(){return X()},children:function(e){return l(I,$(e,t))}})}}),l(_,{get total(){return v().length},defaultPageSize:20,onChange:function(t){W(t)}})]}})};t("T",(function(t){var e=r();return l(h,{w:"$full",alignItems:"start",spacing:"$4",get children(){return[l(d,{size:"xl",get children(){return e("tasks.".concat(t.type))}}),l(h,{w:"$full",spacing:"$2",get children(){return l(k,{each:["undone","done"],children:function(e){return l(G,{get type(){return t.type},done:e,get canRetry(){return t.canRetry}})}})}})]}})}))}}}))}();
1
+ !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(j){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(j){return{type:"throw",arg:j}}}r.wrap=s;var h={};function d(){}function p(){}function g(){}var y={};l(y,a,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v($([])));m&&m!==n&&o.call(m,a)&&(y=m);var w=g.prototype=d.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function n(i,a,c,u){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==t(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(h).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function $(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:_}}function _(){return{value:void 0,done:!0}}return p.prototype=g,l(w,"constructor",g),l(g,"constructor",p),p.displayName=l(g,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},b(x.prototype),l(x.prototype,c,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),l(w,u,"Generator"),l(w,a,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},r.values=$,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:$(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(l){return void r(l)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))}}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register(["./index-legacy.700115ce.js","./Paginator-legacy.df584da0.js"],(function(t){"use strict";var r,i,c,u,l,s,f,h,d,p,g,y,v,m,w,b,x,k,S,L,E,$,_;return{setters:[function(t){r=t.a,i=t.aW,c=t.b9,u=t.m,l=t.h,s=t.cY,f=t.X,h=t.a4,d=t.bP,p=t.b5,g=t.S,y=t.cm,v=t.cn,m=t.C,w=t.ba,b=t.n,x=t.ck,k=t.G,S=t.e,L=t.k,E=t.ae,$=t.E},function(t){_=t.P}],execute:function(){var j,C;!function(t){t[t.Pending=0]="Pending",t[t.Running=1]="Running",t[t.Succeeded=2]="Succeeded",t[t.Canceling=3]="Canceling",t[t.Canceled=4]="Canceled",t[t.Errored=5]="Errored",t[t.Failing=6]="Failing",t[t.Failed=7]="Failed",t[t.WaitingRetry=8]="WaitingRetry",t[t.BeforeRetry=9]="BeforeRetry"}(C||(C={}));var O=(a(j={},C.Failed,"danger"),a(j,C.Succeeded,"success"),a(j,C.Canceled,"neutral"),j),P=function(t){if(t.role<0)return null;var e=["info","neutral","accent"];return l(x,{get colorScheme(){return e[t.role]},get children(){return t.name}})},F=function(t){var e=r();return l(x,{get colorScheme(){var e;return null!==(e=O[t.state])&&void 0!==e?e:"info"},get children(){return e("tasks.state.".concat(t.state))}})},I=function(t){var a=r(),x="undone"===t.done?"cancel":"delete",k="done"===t.done&&t.state===C.Failed,S=o(i((function(){return c.post("/task/".concat(t.type,"/").concat(x,"?tid=").concat(t.id))})),2),L=S[0],E=S[1],$=o(i((function(){return c.post("/task/".concat(t.type,"/retry?tid=").concat(t.id))})),2),_=$[0],j=$[1],O=o(u(!1),2),I=O[0],G=O[1];return l(g,{get when(){return!I()},get children(){return l(s,{get bgColor(){return f("$background","$neutral3")()},w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[l(h,{w:"$full",alignItems:"start",spacing:"$1",get children(){return[l(d,{size:"sm",css:{wordBreak:"break-all"},get children(){return t.name}}),l(P,{get name(){return t.creator},get role(){return t.creator_role}}),l(F,{get state(){return t.state}}),l(p,{css:{wordBreak:"break-all"},get children(){return t.status}}),l(g,{get when(){return t.error},get children(){return l(p,{color:"$danger9",css:{wordBreak:"break-all"},get children(){return t.error}})}}),l(y,{w:"$full",trackColor:"$info3",rounded:"$full",size:"sm",get value(){return t.progress},get children(){return l(v,{color:"$info8",rounded:"$md"})}})]}}),l(s,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return[l(g,{get when(){return t.canRetry},get children(){return l(m,{disabled:!k,display:k?"block":"none",get loading(){return _()},onClick:(t=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,j();case 2:r=t.sent,w(r,(function(){b.info(a("tasks.retry")),G(!0)}));case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),get children(){return a("tasks.retry")}});var t}}),l(m,{colorScheme:"danger",get loading(){return L()},onClick:(r=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,E();case 2:r=t.sent,w(r,(function(){b.success(a("global.delete_success")),G(!0)}));case 4:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),get children(){return a("global.".concat(x))}})];var r}})]}})}})},G=function(t){var a=r(),s=o(i((function(){return c.get("/task/".concat(t.type,"/").concat(t.done))})),2),f=s[0],p=s[1],y=o(u([]),2),v=y[0],b=y[1],x=function(){var t=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p();case 2:r=t.sent,w(r,(function(t){var e;return b(null!==(e=null==t?void 0:t.sort((function(t,e){return t.id>e.id?1:-1})))&&void 0!==e?e:[])}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if(x(),"undone"===t.done){var j=setInterval(x,2e3);S((function(){return clearInterval(j)}))}var C=o(i((function(){return c.post("/task/".concat(t.type,"/clear_done"))})),2),O=C[0],P=C[1],F=o(i((function(){return c.post("/task/".concat(t.type,"/clear_succeeded"))})),2),G=F[0],R=F[1],A=o(i((function(){return c.post("/task/".concat(t.type,"/retry_failed"))})),2),N=A[0],T=A[1],z=o(u(1),2),B=z[0],W=z[1],Y=L((function(){var t=20*(B()-1),e=t+20;return v().slice(t,e)}));return l(h,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[l(d,{size:"lg",get children(){return a("tasks.".concat(t.done))}}),l(g,{get when(){return"done"===t.done},get children(){return l(E,{gap:"$2",flexWrap:"wrap",get children(){return[l(m,{colorScheme:"accent",get loading(){return f()},onClick:x,get children(){return a("global.refresh")}}),l(m,{get loading(){return N()},onClick:(o=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T();case 2:r=t.sent,w(r,(function(){return x()}));case 4:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)}),get children(){return a("tasks.retry_failed")}}),l(m,{colorScheme:"danger",get loading(){return O()},onClick:(r=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P();case 2:r=t.sent,w(r,(function(){return x()}));case 4:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)}),get children(){return a("global.clear")}}),l(m,{colorScheme:"success",get loading(){return G()},onClick:(t=n(e().mark((function t(){var r;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,R();case 2:r=t.sent,w(r,(function(){return x()}));case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),get children(){return a("tasks.clear_succeeded")}})];var t,r,o}})}}),l(h,{w:"$full",spacing:"$2",get children(){return l(k,{get each(){return Y()},children:function(e){return l(I,$(e,t))}})}}),l(_,{get total(){return v().length},defaultPageSize:20,onChange:function(t){W(t)}})]}})};t("T",(function(t){var e=r();return l(h,{w:"$full",alignItems:"start",spacing:"$4",get children(){return[l(d,{size:"xl",get children(){return e("tasks.".concat(t.type))}}),l(h,{w:"$full",spacing:"$2",get children(){return l(k,{each:["undone","done"],children:function(e){return l(G,{get type(){return t.type},done:e,get canRetry(){return t.canRetry}})}})}})]}})}))}}}))}();
@@ -1 +1 @@
1
- import{a as k,aW as l,b9 as o,m as F,h as r,d1 as B,X,a4 as h,bP as P,b5 as _,S as w,cm as j,cn as G,C as s,ba as i,n as v,ck as z,G as I,e as N,k as q,ae as A,E as J}from"./index.fae3cea4.js";import{P as K}from"./Paginator.758bcfa3.js";var d;(function(e){e[e.Pending=0]="Pending",e[e.Running=1]="Running",e[e.Succeeded=2]="Succeeded",e[e.Canceling=3]="Canceling",e[e.Canceled=4]="Canceled",e[e.Errored=5]="Errored",e[e.Failing=6]="Failing",e[e.Failed=7]="Failed",e[e.WaitingRetry=8]="WaitingRetry",e[e.BeforeRetry=9]="BeforeRetry"})(d||(d={}));const O={[d.Failed]:"danger",[d.Succeeded]:"success",[d.Canceled]:"neutral"},Q=e=>{if(e.role<0)return null;const t=["info","neutral","accent"];return r(z,{get colorScheme(){return t[e.role]},get children(){return e.name}})},U=e=>{const t=k();return r(z,{get colorScheme(){var c;return(c=O[e.state])!=null?c:"info"},get children(){return t(`tasks.state.${e.state}`)}})},Y=e=>{const t=k(),c=e.done==="undone"?"cancel":"delete",$=e.done==="done"&&e.state===d.Failed,[y,C]=l(()=>o.post(`/task/${e.type}/${c}?tid=${e.id}`)),[a,b]=l(()=>o.post(`/task/${e.type}/retry?tid=${e.id}`)),[R,f]=F(!1);return r(w,{get when(){return!R()},get children(){return r(B,{get bgColor(){return X("$background","$neutral3")()},w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[r(h,{w:"$full",alignItems:"start",spacing:"$1",get children(){return[r(P,{size:"sm",css:{wordBreak:"break-all"},get children(){return e.name}}),r(Q,{get name(){return e.creator},get role(){return e.creator_role}}),r(U,{get state(){return e.state}}),r(_,{css:{wordBreak:"break-all"},get children(){return e.status}}),r(w,{get when(){return e.error},get children(){return r(_,{color:"$danger9",css:{wordBreak:"break-all"},get children(){return e.error}})}}),r(j,{w:"$full",trackColor:"$info3",rounded:"$full",size:"sm",get value(){return e.progress},get children(){return r(G,{color:"$info8",rounded:"$md"})}})]}}),r(B,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return[r(w,{get when(){return e.canRetry},get children(){return r(s,{disabled:!$,display:$?"block":"none",get loading(){return a()},onClick:async()=>{const g=await b();i(g,()=>{v.info(t("tasks.retry")),f(!0)})},get children(){return t("tasks.retry")}})}}),r(s,{colorScheme:"danger",get loading(){return y()},onClick:async()=>{const g=await C();i(g,()=>{v.success(t("global.delete_success")),f(!0)})},get children(){return t(`global.${c}`)}})]}})]}})}})},Z=e=>{const t=k(),[c,$]=l(()=>o.get(`/task/${e.type}/${e.done}`)),[y,C]=F([]),a=async()=>{const n=await $();i(n,u=>{var x;return C((x=u==null?void 0:u.sort((H,V)=>H.id>V.id?1:-1))!=null?x:[])})};if(a(),e.done==="undone"){const n=setInterval(a,2e3);N(()=>clearInterval(n))}const[b,R]=l(()=>o.post(`/task/${e.type}/clear_done`)),[f,g]=l(()=>o.post(`/task/${e.type}/clear_succeeded`)),[L,W]=l(()=>o.post(`/task/${e.type}/retry_failed`)),[D,M]=F(1),m=20,S=q(()=>{const n=(D()-1)*m,u=n+m;return y().slice(n,u)});return r(h,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[r(P,{size:"lg",get children(){return t(`tasks.${e.done}`)}}),r(w,{get when(){return e.done==="done"},get children(){return r(A,{gap:"$2",flexWrap:"wrap",get children(){return[r(s,{colorScheme:"accent",get loading(){return c()},onClick:a,get children(){return t("global.refresh")}}),r(s,{get loading(){return L()},onClick:async()=>{const n=await W();i(n,()=>a())},get children(){return t("tasks.retry_failed")}}),r(s,{colorScheme:"danger",get loading(){return b()},onClick:async()=>{const n=await R();i(n,()=>a())},get children(){return t("global.clear")}}),r(s,{colorScheme:"success",get loading(){return f()},onClick:async()=>{const n=await g();i(n,()=>a())},get children(){return t("tasks.clear_succeeded")}})]}})}}),r(h,{w:"$full",spacing:"$2",get children(){return r(I,{get each(){return S()},children:n=>r(Y,J(n,e))})}}),r(K,{get total(){return y().length},defaultPageSize:m,onChange:n=>{M(n)}})]}})},E=e=>{const t=k();return r(h,{w:"$full",alignItems:"start",spacing:"$4",get children(){return[r(P,{size:"xl",get children(){return t(`tasks.${e.type}`)}}),r(h,{w:"$full",spacing:"$2",get children(){return r(I,{each:["undone","done"],children:c=>r(Z,{get type(){return e.type},done:c,get canRetry(){return e.canRetry}})})}})]}})};export{E as T};
1
+ import{a as k,aW as l,b9 as o,m as F,h as r,cY as B,X,a4 as h,bP as P,b5 as _,S as w,cm as j,cn as G,C as s,ba as i,n as v,ck as z,G as I,e as N,k as Y,ae as q,E as A}from"./index.f27bc3a3.js";import{P as J}from"./Paginator.56ed88cb.js";var d;(function(e){e[e.Pending=0]="Pending",e[e.Running=1]="Running",e[e.Succeeded=2]="Succeeded",e[e.Canceling=3]="Canceling",e[e.Canceled=4]="Canceled",e[e.Errored=5]="Errored",e[e.Failing=6]="Failing",e[e.Failed=7]="Failed",e[e.WaitingRetry=8]="WaitingRetry",e[e.BeforeRetry=9]="BeforeRetry"})(d||(d={}));const K={[d.Failed]:"danger",[d.Succeeded]:"success",[d.Canceled]:"neutral"},O=e=>{if(e.role<0)return null;const t=["info","neutral","accent"];return r(z,{get colorScheme(){return t[e.role]},get children(){return e.name}})},Q=e=>{const t=k();return r(z,{get colorScheme(){var c;return(c=K[e.state])!=null?c:"info"},get children(){return t(`tasks.state.${e.state}`)}})},U=e=>{const t=k(),c=e.done==="undone"?"cancel":"delete",$=e.done==="done"&&e.state===d.Failed,[y,C]=l(()=>o.post(`/task/${e.type}/${c}?tid=${e.id}`)),[a,b]=l(()=>o.post(`/task/${e.type}/retry?tid=${e.id}`)),[R,f]=F(!1);return r(w,{get when(){return!R()},get children(){return r(B,{get bgColor(){return X("$background","$neutral3")()},w:"$full",overflowX:"auto",shadow:"$md",rounded:"$lg",p:"$2",direction:{"@initial":"column","@xl":"row"},spacing:"$2",get children(){return[r(h,{w:"$full",alignItems:"start",spacing:"$1",get children(){return[r(P,{size:"sm",css:{wordBreak:"break-all"},get children(){return e.name}}),r(O,{get name(){return e.creator},get role(){return e.creator_role}}),r(Q,{get state(){return e.state}}),r(_,{css:{wordBreak:"break-all"},get children(){return e.status}}),r(w,{get when(){return e.error},get children(){return r(_,{color:"$danger9",css:{wordBreak:"break-all"},get children(){return e.error}})}}),r(j,{w:"$full",trackColor:"$info3",rounded:"$full",size:"sm",get value(){return e.progress},get children(){return r(G,{color:"$info8",rounded:"$md"})}})]}}),r(B,{direction:{"@initial":"row","@xl":"column"},justifyContent:{"@xl":"center"},spacing:"$1",get children(){return[r(w,{get when(){return e.canRetry},get children(){return r(s,{disabled:!$,display:$?"block":"none",get loading(){return a()},onClick:async()=>{const g=await b();i(g,()=>{v.info(t("tasks.retry")),f(!0)})},get children(){return t("tasks.retry")}})}}),r(s,{colorScheme:"danger",get loading(){return y()},onClick:async()=>{const g=await C();i(g,()=>{v.success(t("global.delete_success")),f(!0)})},get children(){return t(`global.${c}`)}})]}})]}})}})},Z=e=>{const t=k(),[c,$]=l(()=>o.get(`/task/${e.type}/${e.done}`)),[y,C]=F([]),a=async()=>{const n=await $();i(n,u=>{var x;return C((x=u==null?void 0:u.sort((H,V)=>H.id>V.id?1:-1))!=null?x:[])})};if(a(),e.done==="undone"){const n=setInterval(a,2e3);N(()=>clearInterval(n))}const[b,R]=l(()=>o.post(`/task/${e.type}/clear_done`)),[f,g]=l(()=>o.post(`/task/${e.type}/clear_succeeded`)),[L,W]=l(()=>o.post(`/task/${e.type}/retry_failed`)),[D,M]=F(1),m=20,S=Y(()=>{const n=(D()-1)*m,u=n+m;return y().slice(n,u)});return r(h,{w:"$full",alignItems:"start",spacing:"$2",get children(){return[r(P,{size:"lg",get children(){return t(`tasks.${e.done}`)}}),r(w,{get when(){return e.done==="done"},get children(){return r(q,{gap:"$2",flexWrap:"wrap",get children(){return[r(s,{colorScheme:"accent",get loading(){return c()},onClick:a,get children(){return t("global.refresh")}}),r(s,{get loading(){return L()},onClick:async()=>{const n=await W();i(n,()=>a())},get children(){return t("tasks.retry_failed")}}),r(s,{colorScheme:"danger",get loading(){return b()},onClick:async()=>{const n=await R();i(n,()=>a())},get children(){return t("global.clear")}}),r(s,{colorScheme:"success",get loading(){return f()},onClick:async()=>{const n=await g();i(n,()=>a())},get children(){return t("tasks.clear_succeeded")}})]}})}}),r(h,{w:"$full",spacing:"$2",get children(){return r(I,{get each(){return S()},children:n=>r(U,A(n,e))})}}),r(J,{get total(){return y().length},defaultPageSize:m,onChange:n=>{M(n)}})]}})},E=e=>{const t=k();return r(h,{w:"$full",alignItems:"start",spacing:"$4",get children(){return[r(P,{size:"xl",get children(){return t(`tasks.${e.type}`)}}),r(h,{w:"$full",spacing:"$2",get children(){return r(I,{each:["undone","done"],children:c=>r(Z,{get type(){return e.type},done:c,get canRetry(){return e.canRetry}})})}})]}})};export{E as T};
@@ -1 +1 @@
1
- !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r in t){(a=t[r]).configurable=a.enumerable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,r,a)}if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(t),o=0;o<n.length;o++){var a,i=n[o];(a=t[i]).configurable=a.enumerable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,i,a)}return e}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(O){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),i=new j(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=k(i,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=l;var p={};function h(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(E([])));m&&m!==r&&n.call(m,i)&&(y=m);var b=v.prototype=h.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(t,r){function o(a,i,u,c){var s=f(t[a],t,i);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==e(p)&&n.call(p,"__await")?r.resolve(p.__await).then((function(e){o("next",e,u,c)}),(function(e){o("throw",e,u,c)})):r.resolve(p).then((function(e){l.value=e,u(l)}),(function(e){return o("throw",e,u,c)}))}c(s.arg)}var a;this._invoke=function(e,t){function n(){return new r((function(r,n){o(e,t,r,n)}))}return a=a?a.then(n,n):n()}}function k(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=v,s(b,"constructor",v),s(v,"constructor",d),d.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(x.prototype),s(x.prototype,u,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(b),s(b,c,"Generator"),s(b,i,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=E,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,a=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(c){u=!0,o=c}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(s){return void r(s)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){s(a,n,o,i,u,"next",e)}function u(e){s(a,n,o,i,u,"throw",e)}i(void 0)}))}}function f(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new p(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function p(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return p=function(e){this.s=e,this.n=e.next},p.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new p(e)}function h(e){return new y(e)}function d(e){return function(){return new v(e.apply(this,arguments))}}function v(e){var t,r;function n(t,r){try{var a=e[t](r),i=a.value,u=i instanceof y;Promise.resolve(u?i.wrapped:i).then((function(e){u?n("return"===t?"return":"next",e):o(a.done?"return":"normal",e)}),(function(e){n("throw",e)}))}catch(c){o("throw",c)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise((function(a,i){var u={key:e,arg:o,resolve:a,reject:i,next:null};r?r=r.next=u:(t=r=u,n(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}function y(e){this.wrapped=e}v.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},v.prototype.next=function(e){return this._invoke("next",e)},v.prototype.throw=function(e){return this._invoke("throw",e)},v.prototype.return=function(e){return this._invoke("return",e)},System.register(["./index-legacy.a7c40fe3.js","./index-legacy.61172c95.js"],(function(e){"use strict";var u,c,s,p,v,y,g,m,b,w,x,k,S,P,j,E,L,O,_,$,A,I,C,T,D,F,G,z,N,R,M;return{setters:[function(e){u=e.b9,c=e._,s=e.a1,p=e.a,v=e.b,y=e.m,g=e.cj,m=e.h,b=e.S,w=e.ae,x=e.C,k=e.G,S=e.I,P=e.a4,j=e.al,E=e.n,L=e.bP,O=e.a7,_=e.bc,$=e.ak,A=e.ch,I=e.b5,C=e.ck,T=e.az,D=e.cl,F=e.cm,G=e.cn,z=e.d},function(e){N=e.u,R=e.c,M=e.d}],execute:function(){function U(e,t,r){return Y.apply(this,arguments)}function Y(){return Y=d(o().mark((function e(t,r,n){var u,c,s,f,p,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=function(){return(s=l(o().mark((function e(){var t,r,n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.race(u);case 2:return t=e.sent,r=a(t,2),n=r[0],i=r[1],u.delete(n),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)},c=function(){return s.apply(this,arguments)},u=new Set,f=i(r),e.prev=4,d=o().mark((function e(){var a,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=p.value,i=l(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(a,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))().then((function(e){return[i,e]})),u.add(i),!(u.size>=t)){e.next=8;break}return e.next=6,h(c());case 6:return e.next=8,e.sent;case 8:case"end":return e.stop()}}),e)})),f.s();case 7:if((p=f.n()).done){e.next=11;break}return e.delegateYield(d(),"t0",9);case 9:e.next=7;break;case 11:e.next=16;break;case 13:e.prev=13,e.t1=e.catch(4),f.e(e.t1);case 16:return e.prev=16,f.f(),e.finish(16);case 19:if(!u.size){e.next=26;break}return e.next=22,h(c());case 22:return e.next=24,e.sent;case 24:e.next=19;break;case 26:case"end":return e.stop()}}),e,null,[[4,13,16,19]])}))),Y.apply(this,arguments)}var B={pending:"neutral",uploading:"info",backending:"info",success:"success",error:"danger"},q=function(){var e=l(o().mark((function e(t){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[],n=function(){var e=l(o().mark((function e(t,a){var i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new Promise((function(e,i){var u=function(e){console.error(e),i(e)};if(t.isFile)t.file((function(t){var n=new File([t],a+t.name,{type:t.type});r.push(n),console.log(n),e({})}),u);else if(t.isDirectory){var c=t.createReader();!function r(){c.readEntries(function(){var i=l(o().mark((function i(u){var c;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:c=0;case 1:if(!(c<u.length)){o.next=7;break}return o.next=4,n(u[c],a+t.name+"/");case 4:c++,o.next=1;break;case 7:e({}),u.length>0&&r();case 9:case"end":return o.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}(),u)}()}})),e.next=3,i;case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),e.next=4,n(t,"");case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),H=function(e){return{name:e.name,path:e.webkitRelativePath?e.webkitRelativePath:e.name,size:e.size,progress:0,speed:0,status:"pending"}},J=function(){var e=l(o().mark((function e(t,r,n){var a,i,s,l,f,p=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=p.length>3&&void 0!==p[3]&&p[3],i=(new Date).valueOf(),s=0,(l=new FormData).append("file",r),e.next=7,u.put("/fs/form",l,{headers:{"File-Path":encodeURIComponent(t),"As-Task":a,"Content-Type":"multipart/form-data","Last-Modified":r.lastModified,Password:c()},onUploadProgress:function(e){if(e.total){var t=e.loaded/e.total*100|0;n("progress",t);var r=(new Date).valueOf(),o=(r-i)/1e3;if(o>1){var a=(e.loaded-s)/o,u=(e.total-e.loaded)/a;n("speed",a),console.log(u),i=r,s=e.loaded}100===t&&n("status","backending")}}});case 7:if(200!==(f=e.sent).code){e.next=12;break}return e.abrupt("return");case 12:return e.abrupt("return",new Error(f.message));case 13:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),K=function(){var e=l(o().mark((function e(t,r,n){var a,i,s,l,f=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=f.length>3&&void 0!==f[3]&&f[3],i=(new Date).valueOf(),s=0,e.next=5,u.put("/fs/put",r,{headers:{"File-Path":encodeURIComponent(t),"As-Task":a,"Content-Type":r.type||"application/octet-stream","Last-Modified":r.lastModified,Password:c()},onUploadProgress:function(e){if(e.total){var t=e.loaded/e.total*100|0;n("progress",t);var r=(new Date).valueOf(),o=(r-i)/1e3;if(o>1){var a=(e.loaded-s)/o,u=(e.total-e.loaded)/a;n("speed",a),console.log(u),i=r,s=e.loaded}100===t&&n("status","backending")}}});case 5:if(200!==(l=e.sent).code){e.next=10;break}return e.abrupt("return");case 10:return e.abrupt("return",new Error(l.message));case 11:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Q=[{name:"Stream",upload:K,provider:/.*/},{name:"Form",upload:J,provider:/.*/}],V=function(e){var t=p();return m(P,{w:"$full",spacing:"$1",rounded:"$lg",border:"1px solid $neutral7",alignItems:"start",p:"$2",get _hover(){return{border:"1px solid ".concat(j())}},get children(){return[m(I,{css:{wordBreak:"break-all"},get children(){return e.path}}),m(w,{spacing:"$2",get children(){return[m(C,{get colorScheme(){return B[e.status]},get children(){return t("home.upload.".concat(e.status))}}),m(I,{get children(){return[T((function(){return D(e.speed)})),"/s"]}})]}}),m(F,{w:"$full",trackColor:"$info3",rounded:"$full",get value(){return e.progress},size:"sm",get children(){return m(G,{get color(){return j()},rounded:"$md"})}}),m(I,{color:"$danger10",get children(){return e.msg}})]}})};e("default",(function(){var e,u,c=p(),h=v().pathname,d=N().refresh,I=a(y(!1),2),C=I[0],T=I[1],D=a(y(!1),2),F=D[0],G=D[1],Y=a(y(!1),2),B=Y[0],J=Y[1],K=a(g({uploads:[]}),2),W=K[0],X=K[1],Z=function(){var e=l(o().mark((function e(t){var r,a,u,c,s,l,p,h,v;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.length){e.next=2;break}return e.abrupt("return");case 2:G(!0),r=i(t);try{for(u=function(){var e=a.value,t=H(e);X("uploads",(function(e){return[].concat(n(e),[t])}))},r.s();!(a=r.n()).done;)u()}catch(o){r.e(o)}finally{r.f()}c=!1,s=!1,e.prev=7,p=f(U(3,t,ae));case 9:return e.next=11,p.next();case 11:if(!(c=!(h=e.sent).done)){e.next=17;break}v=h.value,console.log(v);case 14:c=!1,e.next=9;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(7),s=!0,l=e.t0;case 23:if(e.prev=23,e.prev=24,!c||null==p.return){e.next=28;break}return e.next=28,p.return();case 28:if(e.prev=28,!s){e.next=31;break}throw l;case 31:return e.finish(28);case 32:return e.finish(23);case 33:d(void 0,!0);case 34:case"end":return e.stop()}}),e,null,[[7,19,23,33],[24,,28,32]])})));return function(t){return e.apply(this,arguments)}}(),ee=function(e,t,r){X("uploads",(function(t){return t.path===e}),t,r)},te=Q.filter((function(e){return e.provider.test(s.provider)})),re=a(y(te[0]),2),ne=re[0],oe=re[1],ae=function(){var e=l(o().mark((function e(t){var r,n,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.webkitRelativePath?t.webkitRelativePath:t.name,ee(r,"status","uploading"),n=z(h(),r),e.prev=3,e.next=6,ne().upload(n,t,(function(e,t){ee(r,e,t)}),B());case 6:(a=e.sent)?(ee(r,"status","error"),ee(r,"msg",a.message)):(ee(r,"status","success"),ee(r,"progress",100)),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(3),console.error(e.t0),ee(r,"status","error"),ee(r,"msg",e.t0.message);case 15:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(t){return e.apply(this,arguments)}}();return m(P,{w:"$full",pb:"$2",spacing:"$2",get children(){return m(b,{get when(){return!F()},get fallback(){return[m(w,{spacing:"$2",get children(){return[m(x,{colorScheme:"accent",onClick:function(){X("uploads",(function(e){return e.filter((function(e){var t=e.status;return!["success","error"].includes(t)}))})),console.log(W.uploads)},get children(){return c("home.upload.clear_done")}}),m(b,{get when(){return W.uploads.every((function(e){var t=e.status;return["success","error"].includes(t)}))},get children(){return m(x,{onClick:function(){G(!1)},get children(){return c("home.upload.back")}})}})]}}),m(k,{get each(){return W.uploads},children:function(e){return m(V,e)}})]},get children(){return[m(S,{type:"file",multiple:!0,ref:function(t){"function"==typeof e?e(t):e=t},display:"none",onChange:function(e){var t;Z(Array.from(null!==(t=e.target.files)&&void 0!==t?t:[]))}}),m(S,{type:"file",multiple:!0,webkitdirectory:!0,ref:function(e){"function"==typeof u?u(e):u=e},display:"none",onChange:function(e){var t;Z(Array.from(null!==(t=e.target.files)&&void 0!==t?t:[]))}}),m(P,{w:"$full",justifyContent:"center",get border(){return"2px dashed ".concat(C()?j():"$neutral8")},rounded:"$lg",onDragOver:function(e){e.preventDefault(),T(!0)},onDragLeave:function(){T(!1)},onDrop:(a=l(o().mark((function e(t){var r,a,i,u,s,l,f,p,h,d,v,y,g,m,b,w;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t.preventDefault(),t.stopPropagation(),T(!1),s=[],l=Array.from(null!==(r=null===(a=t.dataTransfer)||void 0===a?void 0:a.items)&&void 0!==r?r:[]),f=Array.from(null!==(i=null===(u=t.dataTransfer)||void 0===u?void 0:u.files)&&void 0!==i?i:[]),p=l.length,h=[],d=0;d<p;d++)v=l[d],null!=(y=v.webkitGetAsEntry())&&y.isFile?s.push(f[d]):null!=y&&y.isDirectory&&h.push(y);g=0,m=h;case 10:if(!(g<m.length)){e.next=19;break}return b=m[g],e.next=14,q(b);case 14:w=e.sent,s.push.apply(s,n(w));case 16:g++,e.next=10;break;case 19:0===s.length&&E.warning(c("home.upload.no_files_drag")),Z(s);case 21:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)}),spacing:"$4",h:"$56",get children(){return m(b,{get when(){return!C()},get fallback(){return m(L,{get children(){return c("home.upload.release")}})},get children(){return[m(L,{get children(){return c("home.upload.upload-tips")}}),m(O,{w:"30%",get children(){return m(_,{get value(){return ne().name},onChange:function(e){oe(te.find((function(t){return t.name===e})))},get options(){return te.map((function(e){return{label:e.name,value:e.name}}))}})}}),m(w,{spacing:"$4",get children(){var n,o,a,i,s,l;return[m($,(o={compact:!0,size:"xl"},n="aria-label",a={},a[n]=a[n]||{},a[n].get=function(){return c("home.upload.upload_folder")},r(o,"colorScheme","accent"),"icon",a.icon=a.icon||{},a.icon.get=function(){return m(R,{})},r(o,"onClick",(function(){u.click()})),t(o,a),o)),m($,(s={compact:!0,size:"xl"},i="aria-label",l={},l[i]=l[i]||{},l[i].get=function(){return c("home.upload.upload_files")},"icon",l.icon=l.icon||{},l.icon.get=function(){return m(M,{})},r(s,"onClick",(function(){e.click()})),t(s,l),s))]}}),m(A,{get checked(){return B()},onChange:function(){J(!B())},get children(){return c("home.upload.add_as_task")}})]}})}})];var a}})}})}))}}}))}();
1
+ !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var r in t){(a=t[r]).configurable=a.enumerable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,r,a)}if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(t),o=0;o<n.length;o++){var a,i=n[o];(a=t[i]).configurable=a.enumerable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,i,a)}return e}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(O){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),i=new j(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=k(i,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=l;var p={};function h(){}function d(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(E([])));m&&m!==r&&n.call(m,i)&&(y=m);var b=v.prototype=h.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(t,r){function o(a,i,u,c){var s=f(t[a],t,i);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==e(p)&&n.call(p,"__await")?r.resolve(p.__await).then((function(e){o("next",e,u,c)}),(function(e){o("throw",e,u,c)})):r.resolve(p).then((function(e){l.value=e,u(l)}),(function(e){return o("throw",e,u,c)}))}c(s.arg)}var a;this._invoke=function(e,t){function n(){return new r((function(r,n){o(e,t,r,n)}))}return a=a?a.then(n,n):n()}}function k(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=f(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,p;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=v,s(b,"constructor",v),s(v,"constructor",d),d.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(x.prototype),s(x.prototype,u,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(b),s(b,c,"Generator"),s(b,i,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=E,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,a=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(c){u=!0,o=c}finally{try{i||null==r.return||r.return()}finally{if(u)throw o}}return a}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(s){return void r(s)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){s(a,n,o,i,u,"next",e)}function u(e){s(a,n,o,i,u,"throw",e)}i(void 0)}))}}function f(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new p(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function p(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return p=function(e){this.s=e,this.n=e.next},p.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new p(e)}function h(e){return new y(e)}function d(e){return function(){return new v(e.apply(this,arguments))}}function v(e){var t,r;function n(t,r){try{var a=e[t](r),i=a.value,u=i instanceof y;Promise.resolve(u?i.wrapped:i).then((function(e){u?n("return"===t?"return":"next",e):o(a.done?"return":"normal",e)}),(function(e){n("throw",e)}))}catch(c){o("throw",c)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise((function(a,i){var u={key:e,arg:o,resolve:a,reject:i,next:null};r?r=r.next=u:(t=r=u,n(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}function y(e){this.wrapped=e}v.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},v.prototype.next=function(e){return this._invoke("next",e)},v.prototype.throw=function(e){return this._invoke("throw",e)},v.prototype.return=function(e){return this._invoke("return",e)},System.register(["./index-legacy.700115ce.js","./index-legacy.8ef32e28.js"],(function(e){"use strict";var u,c,s,p,v,y,g,m,b,w,x,k,S,P,j,E,L,O,_,$,A,I,C,T,D,F,G,z,N,R,M;return{setters:[function(e){u=e.b9,c=e._,s=e.a1,p=e.a,v=e.b,y=e.m,g=e.cj,m=e.h,b=e.S,w=e.ae,x=e.C,k=e.G,S=e.I,P=e.a4,j=e.al,E=e.n,L=e.bP,O=e.a7,_=e.bc,$=e.ak,A=e.ch,I=e.b5,C=e.ck,T=e.az,D=e.cl,F=e.cm,G=e.cn,z=e.d},function(e){N=e.u,R=e.c,M=e.d}],execute:function(){function U(e,t,r){return Y.apply(this,arguments)}function Y(){return Y=d(o().mark((function e(t,r,n){var u,c,s,f,p,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=function(){return(s=l(o().mark((function e(){var t,r,n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.race(u);case 2:return t=e.sent,r=a(t,2),n=r[0],i=r[1],u.delete(n),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)},c=function(){return s.apply(this,arguments)},u=new Set,f=i(r),e.prev=4,d=o().mark((function e(){var a,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=p.value,i=l(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(a,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))().then((function(e){return[i,e]})),u.add(i),!(u.size>=t)){e.next=8;break}return e.next=6,h(c());case 6:return e.next=8,e.sent;case 8:case"end":return e.stop()}}),e)})),f.s();case 7:if((p=f.n()).done){e.next=11;break}return e.delegateYield(d(),"t0",9);case 9:e.next=7;break;case 11:e.next=16;break;case 13:e.prev=13,e.t1=e.catch(4),f.e(e.t1);case 16:return e.prev=16,f.f(),e.finish(16);case 19:if(!u.size){e.next=26;break}return e.next=22,h(c());case 22:return e.next=24,e.sent;case 24:e.next=19;break;case 26:case"end":return e.stop()}}),e,null,[[4,13,16,19]])}))),Y.apply(this,arguments)}var B={pending:"neutral",uploading:"info",backending:"info",success:"success",error:"danger"},q=function(){var e=l(o().mark((function e(t){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[],n=function(){var e=l(o().mark((function e(t,a){var i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new Promise((function(e,i){var u=function(e){console.error(e),i(e)};if(t.isFile)t.file((function(t){var n=new File([t],a+t.name,{type:t.type});r.push(n),console.log(n),e({})}),u);else if(t.isDirectory){var c=t.createReader();!function r(){c.readEntries(function(){var i=l(o().mark((function i(u){var c;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:c=0;case 1:if(!(c<u.length)){o.next=7;break}return o.next=4,n(u[c],a+t.name+"/");case 4:c++,o.next=1;break;case 7:e({}),u.length>0&&r();case 9:case"end":return o.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}(),u)}()}})),e.next=3,i;case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),e.next=4,n(t,"");case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),H=function(e){return{name:e.name,path:e.webkitRelativePath?e.webkitRelativePath:e.name,size:e.size,progress:0,speed:0,status:"pending"}},J=function(){var e=l(o().mark((function e(t,r,n){var a,i,s,l,f,p=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=p.length>3&&void 0!==p[3]&&p[3],i=(new Date).valueOf(),s=0,(l=new FormData).append("file",r),e.next=7,u.put("/fs/form",l,{headers:{"File-Path":encodeURIComponent(t),"As-Task":a,"Content-Type":"multipart/form-data","Last-Modified":r.lastModified,Password:c()},onUploadProgress:function(e){if(e.total){var t=e.loaded/e.total*100|0;n("progress",t);var r=(new Date).valueOf(),o=(r-i)/1e3;if(o>1){var a=(e.loaded-s)/o,u=(e.total-e.loaded)/a;n("speed",a),console.log(u),i=r,s=e.loaded}100===t&&n("status","backending")}}});case 7:if(200!==(f=e.sent).code){e.next=12;break}return e.abrupt("return");case 12:return e.abrupt("return",new Error(f.message));case 13:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),K=function(){var e=l(o().mark((function e(t,r,n){var a,i,s,l,f=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=f.length>3&&void 0!==f[3]&&f[3],i=(new Date).valueOf(),s=0,e.next=5,u.put("/fs/put",r,{headers:{"File-Path":encodeURIComponent(t),"As-Task":a,"Content-Type":r.type||"application/octet-stream","Last-Modified":r.lastModified,Password:c()},onUploadProgress:function(e){if(e.total){var t=e.loaded/e.total*100|0;n("progress",t);var r=(new Date).valueOf(),o=(r-i)/1e3;if(o>1){var a=(e.loaded-s)/o,u=(e.total-e.loaded)/a;n("speed",a),console.log(u),i=r,s=e.loaded}100===t&&n("status","backending")}}});case 5:if(200!==(l=e.sent).code){e.next=10;break}return e.abrupt("return");case 10:return e.abrupt("return",new Error(l.message));case 11:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),Q=[{name:"Stream",upload:K,provider:/.*/},{name:"Form",upload:J,provider:/.*/}],V=function(e){var t=p();return m(P,{w:"$full",spacing:"$1",rounded:"$lg",border:"1px solid $neutral7",alignItems:"start",p:"$2",get _hover(){return{border:"1px solid ".concat(j())}},get children(){return[m(I,{css:{wordBreak:"break-all"},get children(){return e.path}}),m(w,{spacing:"$2",get children(){return[m(C,{get colorScheme(){return B[e.status]},get children(){return t("home.upload.".concat(e.status))}}),m(I,{get children(){return[T((function(){return D(e.speed)})),"/s"]}})]}}),m(F,{w:"$full",trackColor:"$info3",rounded:"$full",get value(){return e.progress},size:"sm",get children(){return m(G,{get color(){return j()},rounded:"$md"})}}),m(I,{color:"$danger10",get children(){return e.msg}})]}})};e("default",(function(){var e,u,c=p(),h=v().pathname,d=N().refresh,I=a(y(!1),2),C=I[0],T=I[1],D=a(y(!1),2),F=D[0],G=D[1],Y=a(y(!1),2),B=Y[0],J=Y[1],K=a(g({uploads:[]}),2),W=K[0],X=K[1],Z=function(){var e=l(o().mark((function e(t){var r,a,u,c,s,l,p,h,v;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.length){e.next=2;break}return e.abrupt("return");case 2:G(!0),r=i(t);try{for(u=function(){var e=a.value,t=H(e);X("uploads",(function(e){return[].concat(n(e),[t])}))},r.s();!(a=r.n()).done;)u()}catch(o){r.e(o)}finally{r.f()}c=!1,s=!1,e.prev=7,p=f(U(3,t,ae));case 9:return e.next=11,p.next();case 11:if(!(c=!(h=e.sent).done)){e.next=17;break}v=h.value,console.log(v);case 14:c=!1,e.next=9;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(7),s=!0,l=e.t0;case 23:if(e.prev=23,e.prev=24,!c||null==p.return){e.next=28;break}return e.next=28,p.return();case 28:if(e.prev=28,!s){e.next=31;break}throw l;case 31:return e.finish(28);case 32:return e.finish(23);case 33:d(void 0,!0);case 34:case"end":return e.stop()}}),e,null,[[7,19,23,33],[24,,28,32]])})));return function(t){return e.apply(this,arguments)}}(),ee=function(e,t,r){X("uploads",(function(t){return t.path===e}),t,r)},te=Q.filter((function(e){return e.provider.test(s.provider)})),re=a(y(te[0]),2),ne=re[0],oe=re[1],ae=function(){var e=l(o().mark((function e(t){var r,n,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.webkitRelativePath?t.webkitRelativePath:t.name,ee(r,"status","uploading"),n=z(h(),r),e.prev=3,e.next=6,ne().upload(n,t,(function(e,t){ee(r,e,t)}),B());case 6:(a=e.sent)?(ee(r,"status","error"),ee(r,"msg",a.message)):(ee(r,"status","success"),ee(r,"progress",100)),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(3),console.error(e.t0),ee(r,"status","error"),ee(r,"msg",e.t0.message);case 15:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(t){return e.apply(this,arguments)}}();return m(P,{w:"$full",pb:"$2",spacing:"$2",get children(){return m(b,{get when(){return!F()},get fallback(){return[m(w,{spacing:"$2",get children(){return[m(x,{colorScheme:"accent",onClick:function(){X("uploads",(function(e){return e.filter((function(e){var t=e.status;return!["success","error"].includes(t)}))})),console.log(W.uploads)},get children(){return c("home.upload.clear_done")}}),m(b,{get when(){return W.uploads.every((function(e){var t=e.status;return["success","error"].includes(t)}))},get children(){return m(x,{onClick:function(){G(!1)},get children(){return c("home.upload.back")}})}})]}}),m(k,{get each(){return W.uploads},children:function(e){return m(V,e)}})]},get children(){return[m(S,{type:"file",multiple:!0,ref:function(t){"function"==typeof e?e(t):e=t},display:"none",onChange:function(e){var t;Z(Array.from(null!==(t=e.target.files)&&void 0!==t?t:[]))}}),m(S,{type:"file",multiple:!0,webkitdirectory:!0,ref:function(e){"function"==typeof u?u(e):u=e},display:"none",onChange:function(e){var t;Z(Array.from(null!==(t=e.target.files)&&void 0!==t?t:[]))}}),m(P,{w:"$full",justifyContent:"center",get border(){return"2px dashed ".concat(C()?j():"$neutral8")},rounded:"$lg",onDragOver:function(e){e.preventDefault(),T(!0)},onDragLeave:function(){T(!1)},onDrop:(a=l(o().mark((function e(t){var r,a,i,u,s,l,f,p,h,d,v,y,g,m,b,w;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t.preventDefault(),t.stopPropagation(),T(!1),s=[],l=Array.from(null!==(r=null===(a=t.dataTransfer)||void 0===a?void 0:a.items)&&void 0!==r?r:[]),f=Array.from(null!==(i=null===(u=t.dataTransfer)||void 0===u?void 0:u.files)&&void 0!==i?i:[]),p=l.length,h=[],d=0;d<p;d++)v=l[d],null!=(y=v.webkitGetAsEntry())&&y.isFile?s.push(f[d]):null!=y&&y.isDirectory&&h.push(y);g=0,m=h;case 10:if(!(g<m.length)){e.next=19;break}return b=m[g],e.next=14,q(b);case 14:w=e.sent,s.push.apply(s,n(w));case 16:g++,e.next=10;break;case 19:0===s.length&&E.warning(c("home.upload.no_files_drag")),Z(s);case 21:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)}),spacing:"$4",h:"$56",get children(){return m(b,{get when(){return!C()},get fallback(){return m(L,{get children(){return c("home.upload.release")}})},get children(){return[m(L,{get children(){return c("home.upload.upload-tips")}}),m(O,{w:"30%",get children(){return m(_,{get value(){return ne().name},onChange:function(e){oe(te.find((function(t){return t.name===e})))},get options(){return te.map((function(e){return{label:e.name,value:e.name}}))}})}}),m(w,{spacing:"$4",get children(){var n,o,a,i,s,l;return[m($,(o={compact:!0,size:"xl"},n="aria-label",a={},a[n]=a[n]||{},a[n].get=function(){return c("home.upload.upload_folder")},r(o,"colorScheme","accent"),"icon",a.icon=a.icon||{},a.icon.get=function(){return m(R,{})},r(o,"onClick",(function(){u.click()})),t(o,a),o)),m($,(s={compact:!0,size:"xl"},i="aria-label",l={},l[i]=l[i]||{},l[i].get=function(){return c("home.upload.upload_files")},"icon",l.icon=l.icon||{},l.icon.get=function(){return m(M,{})},r(s,"onClick",(function(){e.click()})),t(s,l),s))]}}),m(A,{get checked(){return B()},onChange:function(){J(!B())},get children(){return c("home.upload.add_as_task")}})]}})}})];var a}})}})}))}}}))}();
@@ -1 +1 @@
1
- System.register(["./index-legacy.a7c40fe3.js","./useTitle-legacy.e942225f.js","./Tasks-legacy.bcf4e457.js","./Paginator-legacy.6f9f1dcb.js","./index-legacy.91fe7355.js"],(function(e){"use strict";var n,t,c;return{setters:[function(e){n=e.h},function(e){t=e.b},function(e){c=e.T},function(){},function(){}],execute:function(){e("default",(function(){return t("manage.sidemenu.upload"),n(c,{type:"upload"})}))}}}));
1
+ System.register(["./index-legacy.700115ce.js","./useTitle-legacy.1ab50c72.js","./Tasks-legacy.71eeb831.js","./Paginator-legacy.df584da0.js","./index-legacy.b820f693.js"],(function(e){"use strict";var n,t,c;return{setters:[function(e){n=e.h},function(e){t=e.b},function(e){c=e.T},function(){},function(){}],execute:function(){e("default",(function(){return t("manage.sidemenu.upload"),n(c,{type:"upload"})}))}}}));