most-box 0.1.6 → 0.1.7

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 (173) hide show
  1. package/README.md +18 -13
  2. package/out/404/index.html +2 -2
  3. package/out/404.html +2 -2
  4. package/out/__next.__PAGE__.txt +6 -6
  5. package/out/__next._full.txt +15 -15
  6. package/out/__next._head.txt +3 -3
  7. package/out/__next._index.txt +7 -7
  8. package/out/__next._tree.txt +4 -4
  9. package/out/_next/static/chunks/0-c8h4u1i2f78.js +1 -0
  10. package/out/_next/static/chunks/02j6ojja7vzp8.js +1 -0
  11. package/out/_next/static/chunks/06im3as4nwfil.js +1 -0
  12. package/out/_next/static/chunks/0sq_0pwxnhby2.js +1 -0
  13. package/out/_next/static/chunks/1h-f81ddyfcmx.css +1 -0
  14. package/out/_next/static/chunks/22h69_zwmttt4.js +1 -0
  15. package/out/_next/static/chunks/23zlmarf-go2x.js +1 -0
  16. package/out/_next/static/chunks/24k_4-y4ym0df.js +1 -0
  17. package/out/_next/static/chunks/{0vmjat-s4a3yj.css → 258tyt1xt34p4.css} +1 -1
  18. package/out/_next/static/chunks/2693fczty5yr8.js +1 -0
  19. package/out/_next/static/chunks/26hcvxjw9do9d.js +1 -0
  20. package/out/_next/static/chunks/2_i1b78h0yiu_.js +1 -0
  21. package/out/_next/static/chunks/3e9ia0hs-pqvs.css +1 -0
  22. package/out/_next/static/chunks/3ejz1mdljwwqf.css +1 -0
  23. package/out/_next/static/chunks/3mccxoa60ley8.js +1 -0
  24. package/out/_next/static/chunks/{23kls47vn_rpg.css → 418_591yp64lx.css} +1 -1
  25. package/out/_next/static/chunks/43l72x-2z3zxb.js +1 -0
  26. package/out/_not-found/__next._full.txt +12 -12
  27. package/out/_not-found/__next._head.txt +3 -3
  28. package/out/_not-found/__next._index.txt +7 -7
  29. package/out/_not-found/__next._not-found.__PAGE__.txt +4 -4
  30. package/out/_not-found/__next._not-found.txt +3 -3
  31. package/out/_not-found/__next._tree.txt +2 -2
  32. package/out/_not-found/index.html +2 -2
  33. package/out/_not-found/index.txt +12 -12
  34. package/out/admin/__next._full.txt +13 -13
  35. package/out/admin/__next._head.txt +3 -3
  36. package/out/admin/__next._index.txt +7 -7
  37. package/out/admin/__next._tree.txt +2 -2
  38. package/out/admin/__next.admin.__PAGE__.txt +4 -4
  39. package/out/admin/__next.admin.txt +3 -3
  40. package/out/admin/index.html +2 -2
  41. package/out/admin/index.txt +13 -13
  42. package/out/app/__next._full.txt +13 -13
  43. package/out/app/__next._head.txt +3 -3
  44. package/out/app/__next._index.txt +7 -7
  45. package/out/app/__next._tree.txt +2 -2
  46. package/out/app/__next.app.__PAGE__.txt +4 -4
  47. package/out/app/__next.app.txt +3 -3
  48. package/out/app/index.html +2 -2
  49. package/out/app/index.txt +13 -13
  50. package/out/chat/__next._full.txt +13 -13
  51. package/out/chat/__next._head.txt +3 -3
  52. package/out/chat/__next._index.txt +7 -7
  53. package/out/chat/__next._tree.txt +2 -2
  54. package/out/chat/__next.chat.__PAGE__.txt +4 -4
  55. package/out/chat/__next.chat.txt +3 -3
  56. package/out/chat/index.html +2 -2
  57. package/out/chat/index.txt +13 -13
  58. package/out/chat/join/__next._full.txt +13 -13
  59. package/out/chat/join/__next._head.txt +3 -3
  60. package/out/chat/join/__next._index.txt +7 -7
  61. package/out/chat/join/__next._tree.txt +2 -2
  62. package/out/chat/join/__next.chat.join.__PAGE__.txt +4 -4
  63. package/out/chat/join/__next.chat.join.txt +3 -3
  64. package/out/chat/join/__next.chat.txt +3 -3
  65. package/out/chat/join/index.html +2 -2
  66. package/out/chat/join/index.txt +13 -13
  67. package/out/demo/__next._full.txt +15 -15
  68. package/out/demo/__next._head.txt +3 -3
  69. package/out/demo/__next._index.txt +7 -7
  70. package/out/demo/__next._tree.txt +4 -4
  71. package/out/demo/__next.demo.__PAGE__.txt +6 -6
  72. package/out/demo/__next.demo.txt +3 -3
  73. package/out/demo/index.html +3 -3
  74. package/out/demo/index.txt +15 -15
  75. package/out/download/__next._full.txt +35 -33
  76. package/out/download/__next._head.txt +3 -3
  77. package/out/download/__next._index.txt +7 -7
  78. package/out/download/__next._tree.txt +3 -3
  79. package/out/download/__next.download.__PAGE__.txt +6 -6
  80. package/out/download/__next.download.txt +3 -3
  81. package/out/download/index.html +2 -2
  82. package/out/download/index.txt +35 -33
  83. package/out/game/__next._full.txt +11 -11
  84. package/out/game/__next._head.txt +3 -3
  85. package/out/game/__next._index.txt +7 -7
  86. package/out/game/__next._tree.txt +2 -2
  87. package/out/game/__next.game.__PAGE__.txt +2 -2
  88. package/out/game/__next.game.txt +3 -3
  89. package/out/game/gandengyan/__next._full.txt +14 -14
  90. package/out/game/gandengyan/__next._head.txt +3 -3
  91. package/out/game/gandengyan/__next._index.txt +7 -7
  92. package/out/game/gandengyan/__next._tree.txt +3 -3
  93. package/out/game/gandengyan/__next.game.gandengyan.__PAGE__.txt +5 -5
  94. package/out/game/gandengyan/__next.game.gandengyan.txt +3 -3
  95. package/out/game/gandengyan/__next.game.txt +3 -3
  96. package/out/game/gandengyan/index.html +2 -2
  97. package/out/game/gandengyan/index.txt +14 -14
  98. package/out/game/index.html +1 -1
  99. package/out/game/index.txt +11 -11
  100. package/out/game/zhajinhua/__next._full.txt +14 -13
  101. package/out/game/zhajinhua/__next._head.txt +3 -3
  102. package/out/game/zhajinhua/__next._index.txt +7 -7
  103. package/out/game/zhajinhua/__next._tree.txt +3 -2
  104. package/out/game/zhajinhua/__next.game.txt +3 -3
  105. package/out/game/zhajinhua/__next.game.zhajinhua.__PAGE__.txt +5 -4
  106. package/out/game/zhajinhua/__next.game.zhajinhua.txt +3 -3
  107. package/out/game/zhajinhua/index.html +2 -2
  108. package/out/game/zhajinhua/index.txt +14 -13
  109. package/out/index.html +2 -2
  110. package/out/index.txt +15 -15
  111. package/out/note/__next._full.txt +13 -13
  112. package/out/note/__next._head.txt +3 -3
  113. package/out/note/__next._index.txt +7 -7
  114. package/out/note/__next._tree.txt +2 -2
  115. package/out/note/__next.note.__PAGE__.txt +4 -4
  116. package/out/note/__next.note.txt +3 -3
  117. package/out/note/index.html +2 -2
  118. package/out/note/index.txt +13 -13
  119. package/out/ping/__next._full.txt +14 -14
  120. package/out/ping/__next._head.txt +3 -3
  121. package/out/ping/__next._index.txt +7 -7
  122. package/out/ping/__next._tree.txt +3 -3
  123. package/out/ping/__next.ping.__PAGE__.txt +5 -5
  124. package/out/ping/__next.ping.txt +3 -3
  125. package/out/ping/index.html +2 -2
  126. package/out/ping/index.txt +14 -14
  127. package/out/web3/__next._full.txt +13 -13
  128. package/out/web3/__next._head.txt +3 -3
  129. package/out/web3/__next._index.txt +7 -7
  130. package/out/web3/__next._tree.txt +2 -2
  131. package/out/web3/__next.web3.__PAGE__.txt +4 -4
  132. package/out/web3/__next.web3.txt +3 -3
  133. package/out/web3/ed25519/__next._full.txt +11 -11
  134. package/out/web3/ed25519/__next._head.txt +3 -3
  135. package/out/web3/ed25519/__next._index.txt +7 -7
  136. package/out/web3/ed25519/__next._tree.txt +2 -2
  137. package/out/web3/ed25519/__next.web3.ed25519.__PAGE__.txt +2 -2
  138. package/out/web3/ed25519/__next.web3.ed25519.txt +3 -3
  139. package/out/web3/ed25519/__next.web3.txt +3 -3
  140. package/out/web3/ed25519/index.html +1 -1
  141. package/out/web3/ed25519/index.txt +11 -11
  142. package/out/web3/index.html +2 -2
  143. package/out/web3/index.txt +13 -13
  144. package/out/web3/tools/__next._full.txt +11 -11
  145. package/out/web3/tools/__next._head.txt +3 -3
  146. package/out/web3/tools/__next._index.txt +7 -7
  147. package/out/web3/tools/__next._tree.txt +2 -2
  148. package/out/web3/tools/__next.web3.tools.__PAGE__.txt +2 -2
  149. package/out/web3/tools/__next.web3.tools.txt +3 -3
  150. package/out/web3/tools/__next.web3.txt +3 -3
  151. package/out/web3/tools/index.html +1 -1
  152. package/out/web3/tools/index.txt +11 -11
  153. package/package.json +1 -1
  154. package/server/src/core/gameRoom.js +12 -0
  155. package/server/src/core/zhajinhua.js +82 -14
  156. package/server/src/games/gandengyan.js +39 -0
  157. package/server/src/index.js +8 -1
  158. package/out/_next/static/chunks/0-ryc9icn6dql.css +0 -1
  159. package/out/_next/static/chunks/088-v8tzobg5g.js +0 -1
  160. package/out/_next/static/chunks/0g9303i8psy6z.js +0 -1
  161. package/out/_next/static/chunks/10p6-qnuk3p9x.js +0 -1
  162. package/out/_next/static/chunks/2524ggtr3e4fp.js +0 -1
  163. package/out/_next/static/chunks/2mcmt4yla_xle.js +0 -1
  164. package/out/_next/static/chunks/2v7_4ps1l4a8o.css +0 -1
  165. package/out/_next/static/chunks/2vk2ln79gpvm4.js +0 -1
  166. package/out/_next/static/chunks/37msy2-4ucgts.js +0 -1
  167. package/out/_next/static/chunks/384w3w4qvhw61.js +0 -1
  168. package/out/_next/static/chunks/3aa-weedhv4e0.js +0 -1
  169. package/out/_next/static/chunks/3erbaukgkw8f2.js +0 -1
  170. package/out/_next/static/chunks/3qj5xz_d4cbk6.js +0 -1
  171. /package/out/_next/static/{NPIlpdzQWkiVZpgfhlypH → eXddCOt9eyz0j78b1m4Ex}/_buildManifest.js +0 -0
  172. /package/out/_next/static/{NPIlpdzQWkiVZpgfhlypH → eXddCOt9eyz0j78b1m4Ex}/_clientMiddlewareManifest.js +0 -0
  173. /package/out/_next/static/{NPIlpdzQWkiVZpgfhlypH → eXddCOt9eyz0j78b1m4Ex}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68590,58501,e=>{"use strict";let a=(0,e.i(56420).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",0,a],68590);var t=e.i(18050);e.s(["LogoIcon",0,function({size:e=24}){return(0,t.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.4"}),(0,t.jsx)("rect",{x:"14",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"2",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,t.jsx)("rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)"})]})}],58501)},30274,e=>{"use strict";let a=(0,e.i(56420).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",0,a],30274)},87884,e=>{"use strict";var a=e.i(26913);e.s(["channelApi",0,{getChannels(e={}){let t=new URLSearchParams;e.type&&t.set("type",e.type),e.excludeType&&t.set("excludeType",e.excludeType);let s=t.toString();return a.api.get(s?`/api/channels?${s}`:"/api/channels").json()},createChannel:(e,t="personal",s={})=>a.api.post("/api/channels",{json:{name:e,type:t,...s}}).json(),leaveChannel:e=>a.api.delete(`/api/channels/${encodeURIComponent(e)}`).json(),getChannelMessages:(e,t=100,s=0)=>a.api.get(`/api/channels/${encodeURIComponent(e)}/messages?limit=${t}&offset=${s}`).json(),sendChannelMessage:({channelName:e,content:t,author:s,authorName:i,avatar:n,attachment:r})=>a.api.post(`/api/channels/${encodeURIComponent(e)}/messages`,{json:r?{content:t,author:s,authorName:i,avatar:n,attachment:r}:{content:t,author:s,authorName:i,avatar:n}}).json(),getChannelMembers:e=>a.api.get(`/api/channels/${encodeURIComponent(e)}/members`).json(),getChannelPeers:e=>a.api.get(`/api/channels/${encodeURIComponent(e)}/peers`).json(),setChannelRemark:(e,t)=>a.api.put(`/api/channels/${encodeURIComponent(e)}/remark`,{json:{remark:t}}).json(),getFileDownloadUrl:e=>(0,a.getApiUrl)(`/api/files/${e}/download`)}])},23952,e=>{"use strict";var a=e.i(71645),t=e.i(87884),s=e.i(26913);function i(e){return String(e.id||`${e.author||""}-${e.timestamp||""}-${e.content||""}`)}e.s(["useChannelMessages",0,function({isReady:e,enabled:n=!0,channelName:r="",peerId:l="",waitForPeerId:c=!1,limit:d=100,reconnectBaseDelay:o=2500,acceptMessage:u,getMessageKey:h=i,onSyncError:m,onSocketEvent:p}){let[f,x]=(0,a.useState)([]),[y,g]=(0,a.useState)(!1),v=(0,a.useRef)(null),j=(0,a.useRef)(r),b=(0,a.useRef)(null),k=(0,a.useRef)(0),w=(0,a.useRef)(u),N=(0,a.useRef)(h),C=(0,a.useRef)(p),S=(0,a.useRef)(m),M=(0,a.useRef)(l);(0,a.useEffect)(()=>{w.current=u},[u]),(0,a.useEffect)(()=>{N.current=h},[h]),(0,a.useEffect)(()=>{C.current=p},[p]),(0,a.useEffect)(()=>{S.current=m},[m]);let I=(0,a.useCallback)(e=>{let a=w.current;return a?e.filter(a):e},[]),z=(0,a.useCallback)((e,a,t=!0)=>{let s=[...e];for(let e of I(a)){let a=N.current(e);if(t){let t=s.findIndex(a=>a.pending&&a.author?.toLowerCase()===e.author?.toLowerCase()&&a.content===e.content);if(-1!==t){s[t]={...e,id:e.id||a};continue}}s.some(e=>N.current(e)===a)||s.push({...e,id:e.id||a})}return s},[I]),A=(0,a.useCallback)((e,a)=>{v.current?.readyState===WebSocket.OPEN&&v.current.send(JSON.stringify({event:e,data:a}))},[]),E=(0,a.useCallback)(e=>{e&&A("channel:subscribe",{channel:e})},[A]),R=(0,a.useCallback)(e=>{e&&A("channel:unsubscribe",{channel:e})},[A]),$=(0,a.useCallback)(async(a=j.current,s={})=>{if(!a||!e)return[];try{let e=I(await t.channelApi.getChannelMessages(a,d));return x(a=>s.replace?e:z(a,e,!1)),e}catch(e){return s.replace&&x([]),await S.current?.(e),[]}},[I,e,d,z]);(0,a.useEffect)(()=>{M.current=l,l&&(A("register",{peerId:l}),c&&j.current&&(E(j.current),$(j.current,{replace:!0})))},[l,E,$,c,A]);let L=(0,a.useCallback)(()=>{x([])},[]),D=(0,a.useCallback)(async({channelName:e=j.current,content:a,author:s,authorName:i,avatar:n,attachment:r,optimisticId:l})=>{let c=a.trim();if(!e||!c)return null;let d={id:l||`${s}-${Date.now()}-${Math.random().toString(36).slice(2)}`,author:s,authorName:i,content:c,timestamp:Date.now(),pending:!0,attachment:r};x(e=>[...e,d]);try{let a=await t.channelApi.sendChannelMessage({channelName:e,content:c,author:s,authorName:i,avatar:n,attachment:r});return x(e=>e.map(e=>e.id===d.id?{...a.message,id:a.message.id||N.current(a.message)}:e)),a.message}catch(e){throw x(e=>e.filter(e=>e.id!==d.id)),e}},[]);return(0,a.useEffect)(()=>{let a=j.current;if(j.current=r,a&&a!==r&&R(a),r&&e&&n)return $(r,{replace:!0}),(!c||M.current)&&E(r),()=>R(r)},[r,n,e,E,$,R,c]),(0,a.useEffect)(()=>{if(!e||!n)return void g(!1);let a=!1;async function t(){let e=new WebSocket(await (0,s.getAuthenticatedWebSocketUrl)("/ws"));a?e.close():(e.onopen=()=>{g(!0),k.current=0,M.current&&e.send(JSON.stringify({event:"register",data:{peerId:M.current}})),j.current&&(!c||M.current)&&(E(j.current),$(j.current,{replace:!0}))},e.onmessage=e=>{try{let a=JSON.parse(e.data);C.current?.(a.event,a.data),"channel:message"===a.event&&a.data?.channel===j.current&&a.data?.message&&x(e=>z(e,[a.data.message]))}catch{}},e.onclose=()=>{if(g(!1),a)return;let e=k.current;if(e>=20)return;let s=Math.min(o*Math.pow(2,e),3e4);k.current=e+1,b.current=setTimeout(t,s)},e.onerror=()=>e.close(),v.current=e)}return k.current=0,t(),()=>{a=!0,b.current&&clearTimeout(b.current),v.current?.close(),v.current=null}},[n,e,z,o,E,$,c]),{clearMessages:L,connected:y,messages:f,sendMessage:D,setMessages:x,syncMessages:$}}])},62368,e=>{"use strict";let a=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,a],62368)},66595,e=>{"use strict";let a=(0,e.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,a],66595)},51921,e=>{"use strict";let a=(0,e.i(56420).default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);e.s(["Music",0,a],51921)},15170,e=>{"use strict";let a=(0,e.i(56420).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);e.s(["Image",0,a],15170)},80796,e=>{"use strict";let a=(0,e.i(56420).default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);e.s(["Film",0,a],80796)},12796,e=>{"use strict";let a=(0,e.i(56420).default)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);e.s(["Loader",0,a],12796)},6933,e=>{"use strict";e.s(["getFileSubtype",0,function(e){let a=String(e||"").split(".").pop()?.toLowerCase()||"";return["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","heic","heif"].includes(a)?"image":["mp4","webm","mov","avi","mkv","flv","wmv","m4v","mpeg","3gp"].includes(a)?"video":["mp3","wav","ogg","flac","aac","m4a","wma","opus"].includes(a)?"audio":["txt","md","js","ts","jsx","tsx","css","scss","less","json","xml","html","htm","yaml","yml","toml","ini","cfg","conf","log","sh","bash","py","rb","go","rs","java","c","cpp","h","hpp","cs","php","sql","graphql","env","gitignore","dockerfile","readme"].includes(a)?"text":"file"}])},26091,e=>{"use strict";let a=(0,e.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,a],26091)},77071,e=>{"use strict";let a=(0,e.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,a],77071)},99847,e=>{"use strict";let a=(0,e.i(56420).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,a],99847)},77685,e=>{"use strict";var a=e.i(18050),t=e.i(99847),s=e.i(62368),i=e.i(72382),n=e.i(26091),r=e.i(80796),l=e.i(15170),c=e.i(12796),d=e.i(51921);function o(e){let a=String(e||"").split("/");return a[a.length-1]||e}e.s(["ChatAttachmentCard",0,function({attachment:e,status:u="idle",pending:h=!1,onOpen:m}){var p,f;let x="checking"===u,y=["ui-file-action","chat-attachment-action","error"===u?"error":"","available"===u?"available":""].filter(Boolean).join(" "),g=((p=e.size)&&!(p<=0)?p<1024?`${p} B`:p<1048576?`${(p/1024).toFixed(1)} KB`:p<0x40000000?`${(p/1048576).toFixed(1)} MB`:`${(p/0x40000000).toFixed(2)} GB`:"")||"MostBox 文件";return(0,a.jsxs)("button",{type:"button",className:"ui-file-card chat-attachment-card",onClick:()=>m?.(e),disabled:h||x,title:e.link,children:[(0,a.jsx)("span",{className:`ui-file-icon chat-attachment-icon ${e.kind}`,children:x?(0,a.jsx)(c.Loader,{size:20,className:"ui-spinner chat-attachment-spinner"}):"image"===(f=e.kind)?(0,a.jsx)(l.Image,{size:20}):"video"===f?(0,a.jsx)(r.Film,{size:20}):"audio"===f?(0,a.jsx)(d.Music,{size:20}):(0,a.jsx)(n.FileText,{size:20})}),(0,a.jsxs)("span",{className:"ui-file-info chat-attachment-info",children:[(0,a.jsx)("span",{className:"ui-file-name chat-attachment-name",children:o(e.fileName)}),(0,a.jsx)("span",{className:"ui-file-meta chat-attachment-meta",children:h?"发送中...":g})]}),(0,a.jsx)("span",{className:y,children:x?"检测中":"available"===u?(0,a.jsx)(i.Eye,{size:16}):"error"===u?(0,a.jsx)(t.AlertCircle,{size:17}):(0,a.jsx)(s.Download,{size:16})})]})},"getAttachmentBaseFileName",0,o])},11241,e=>{"use strict";let a=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,a],11241)},35965,e=>{"use strict";let a=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,a],35965)},96699,e=>{"use strict";let a=(0,e.i(56420).default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,a],96699)},59665,5142,e=>{"use strict";var a=e.i(18050),t=e.i(71645);let s=(0,e.i(56420).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);function i(e=!1,a={}){let[s,n]=(0,t.useState)(e),r=(0,t.useCallback)(()=>{n(e=>e||(a.onOpen?.(),!0))},[a.onOpen]),l=(0,t.useCallback)(()=>{n(e=>e?(a.onClose?.(),!1):e)},[a.onClose]);return[s,{open:r,close:l,toggle:(0,t.useCallback)(()=>{s?l():r()},[l,r,s]),set:n}]}e.s(["useDisclosure",0,i],5142);let n=(0,t.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:r,headerRight:l,sidebarToggleReplacement:c,defaultHide:d=!1,children:o}){let[u,h]=i(!1),[m,p]=(0,t.useState)(d),f=(0,t.useRef)(d),x=function(e,{getInitialValueInEffect:a}={getInitialValueInEffect:!0}){let[s,i]=(0,t.useState)(a?void 0:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,t.useEffect)(()=>{try{if("matchMedia"in window){let a=window.matchMedia(e);i(a.matches);let t=e=>i(e.matches);return a.addEventListener("change",t),()=>{a.removeEventListener("change",t)}}}catch(e){return}},[e]),s||!1}("(max-width: 768px)"),y=(0,t.useCallback)((e={})=>{h.close(),e.collapse&&p(!0)},[h]);(0,t.useEffect)(()=>{d!==f.current&&(d?y({collapse:!0}):p(!1),f.current=d)},[d,y]);let g=()=>{x?h.open():p(!1)};return(0,a.jsx)(n.Provider,{value:{closeSidebar:y,openSidebar:g,isSidebarVisible:x?u:!m},children:(0,a.jsxs)("div",{className:"app-layout",children:[(0,a.jsx)("div",{className:`sidebar-overlay ${u?"visible":""}`,onClick:()=>y()}),(0,a.jsx)("div",{className:`sidebar ${u?"open":""} ${m?"collapsed":""}`,children:e({closeSidebar:y,openSidebar:g})}),(0,a.jsxs)("div",{className:"main-content",children:[(0,a.jsxs)("header",{className:"app-header",children:[(0,a.jsxs)("div",{className:"header-left",children:[c??(0,a.jsx)("button",{onClick:()=>{x?h.toggle():p(!m)},className:"btn btn-icon sidebar-toggle-btn","aria-label":x?"打开菜单":m?"展开侧边栏":"收起侧边栏",children:(0,a.jsx)(s,{size:16})}),r]}),(0,a.jsx)("div",{className:"header-right",children:l})]}),o]})]})})},"useAppShell",0,function(){let e=(0,t.useContext)(n);if(!e)throw Error("useAppShell must be used within AppShell");return e}],59665)},27648,e=>{"use strict";var a=e.i(18050),t=e.i(93957),s=e.i(71192);e.s(["default",0,function({className:e=""}){let i=(0,s.useUserStore)(e=>e.identity),n=(0,s.useUserStore)(e=>e.openLoginModal),r=(0,s.useUserStore)(e=>e.logoutUser);return(0,a.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,a.jsxs)("div",{className:"user-info",children:[(0,a.jsx)("img",{className:"user-avatar-img",src:(0,t.generateAvatar)(i?.address,i?.avatar),alt:"avatar"}),(0,a.jsx)("span",{className:"user-name",title:i?.address,children:i?.displayName||"未登录"})]}),i?(0,a.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:r,children:"退出"}):(0,a.jsx)("button",{className:"btn btn-primary login-btn",onClick:n,children:"登录"})]})}])},39626,e=>{"use strict";var a=e.i(18050);let t=(0,e.i(56420).default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var s=e.i(59665);e.s(["default",0,function({label:e="打开侧边栏",className:i="",variant:n="primary"}){let{isSidebarVisible:r,openSidebar:l}=(0,s.useAppShell)();return r?null:(0,a.jsxs)("button",{type:"button",className:`btn ${"primary"===n?"btn-primary":""} sidebar-open-hint ${i}`.trim(),onClick:l,children:[(0,a.jsx)(t,{size:16}),e]})}],39626)},79490,11028,27668,e=>{"use strict";let a=(0,e.i(56420).default)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);e.s(["Edit2",0,a],79490);var t=e.i(18050),s=e.i(71645),i=e.i(26091),n=e.i(12796),r=e.i(51921),l=e.i(63676),c=e.i(26913);e.s(["default",0,function({item:e,isBackendReady:a,getFileDownloadUrl:d,onClose:o}){let[u,h]=(0,s.useState)(""),[m,p]=(0,s.useState)(!1),[f,x]=(0,s.useState)(""),[y,g]=(0,s.useState)("");return(0,s.useEffect)(()=>{if("text"!==e.subtype)return;let t=!1;return(h(""),g(""),a)?(p(!0),(async()=>{try{let a=await fetch(d(e.cid),{headers:{...await (0,c.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`),Range:"bytes=0-9999"}});if(!a.ok)throw Error("加载失败");let s=await a.text();t||h(s||"(文件为空)")}catch{t||h("加载失败")}finally{t||p(!1)}})(),()=>{t=!0}):void h("加载失败")},[d,a,e.cid,e.subtype]),(0,s.useEffect)(()=>{var t;if("image"!==(t=e.subtype)&&"video"!==t&&"audio"!==t)return void x("");if(x(""),g(""),!a)return void g("加载失败");let s="",i=!1;return(async()=>{try{let a=await fetch(d(e.cid),{headers:await (0,c.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`)});if(!a.ok)throw Error("加载失败");let t=URL.createObjectURL(await a.blob());s=t,i||x(t)}catch{i||g("加载失败")}})(),()=>{i=!0,s&&URL.revokeObjectURL(s)}},[d,a,e.cid,e.subtype]),(0,t.jsxs)("div",{className:"preview-overlay",onClick:o,children:[(0,t.jsx)("button",{type:"button",className:"preview-close",onClick:o,"aria-label":"关闭预览",children:(0,t.jsx)(l.X,{size:20})}),(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),children:["image"===e.subtype&&(0,t.jsx)("div",{className:"preview-media-wrapper",children:f?(0,t.jsx)("img",{src:f,alt:e.fileName}):y?(0,t.jsxs)("div",{className:"preview-unsupported",children:[(0,t.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,t.jsx)("p",{children:e.fileName}),(0,t.jsx)("p",{className:"preview-unsupported-hint",children:y})]}):(0,t.jsx)("div",{className:"preview-loading",children:(0,t.jsx)("div",{className:"preview-loading-spinner"})})}),"video"===e.subtype&&(0,t.jsx)("div",{className:"preview-media-wrapper",children:f?(0,t.jsx)("video",{src:f,controls:!0}):y?(0,t.jsxs)("div",{className:"preview-unsupported",children:[(0,t.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,t.jsx)("p",{children:e.fileName}),(0,t.jsx)("p",{className:"preview-unsupported-hint",children:y})]}):(0,t.jsx)("div",{className:"preview-loading",children:(0,t.jsx)("div",{className:"preview-loading-spinner"})})}),"audio"===e.subtype&&(0,t.jsxs)("div",{className:"preview-audio",children:[(0,t.jsx)("div",{className:"preview-audio-icon",children:(0,t.jsx)(r.Music,{size:36,color:"var(--accent)"})}),(0,t.jsx)("p",{className:"preview-audio-filename",children:e.fileName}),f?(0,t.jsx)("audio",{className:"preview-audio-player",src:f,controls:!0}):(0,t.jsx)("div",{className:"preview-text-loading",children:y?(0,t.jsx)("p",{children:y}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Loader,{size:24,className:"preview-text-spinner"}),(0,t.jsx)("p",{children:"正在加载音频预览..."})]})})]}),"file"===e.subtype&&(0,t.jsxs)("div",{className:"preview-unsupported",children:[(0,t.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,t.jsx)("p",{children:e.fileName}),(0,t.jsx)("p",{className:"preview-unsupported-hint",children:"无法预览"})]}),"text"===e.subtype&&(0,t.jsxs)("div",{className:"preview-text-container",children:[(0,t.jsx)("div",{className:"preview-text-header",children:(0,t.jsx)("span",{children:e.fileName})}),m?(0,t.jsxs)("div",{className:"preview-text-loading",children:[(0,t.jsx)(n.Loader,{size:24,className:"preview-text-spinner"}),(0,t.jsx)("p",{children:"正在加载文本预览..."}),(0,t.jsx)("p",{className:"preview-text-loading-hint",children:"如果是初次预览,可能需要等待 P2P 网络同步"})]}):(0,t.jsx)("pre",{className:"preview-text",children:u||"(文件为空)"})]})]})]})}],11028);var d=e.i(64621);let o="链接格式不正确,请粘贴完整的 most://<cid>?filename=... 分享链接。",u="暂时没有发现在线种子。请确认分享者或其他下载者仍在线做种,稍后再检测。",h={"Link must be a valid most:// URL":"链接无法解析,请粘贴完整的 most://<cid>?filename=... 分享链接。","Link must use most:// protocol":"链接协议不正确,应以 most:// 开头。","Link path is not supported":"链接里不应包含路径,请使用 most://<cid>?filename=... 格式。","Invalid CID format":"CID 无效,请确认 most:// 后面的内容没有缺失或被截断。","Invalid CID format: CID v1 required":"CID 格式不符合 MostBox 要求,请确认分享链接完整。","CID digest must be 32 bytes":"CID 格式不符合 MostBox 要求,请确认分享链接完整。","filename is required":"链接缺少 filename 参数,请复制完整分享链接后再检测。"};e.s(["getDownloadCheckErrorMessageFromPayload",0,function(e={},a=""){if("TimeoutError"===a)return"检测等待超时,暂时没有等到在线种子响应。请确认分享者或其他下载者仍在线做种,稍后再检测。";if(!e.status)return"无法连接本地节点,请确认 MostBox 后端正在运行后再检测。";if(404===e.status)return"当前后端还没有检测接口,请重启 MostBox 后端后再试。";switch(e.code){case"VALIDATION_ERROR":return o;case"CONFLICT":return e.error?`${e.error},请先处理同名文件后再下载。`:"下载目录已有同名文件,请先重命名或移走后再检测。";case"PEER_NOT_FOUND":return u;case"PERMISSION_ERROR":return e.error?`下载目录不可写:${e.error}`:"下载目录不可写,请检查目录权限后再检测。";case"ENGINE_NOT_INITIALIZED":return"本地节点还没有启动完成,请稍等几秒后重新检测。"}return 503===e.status?u:e.status>=500?"本地节点检测时出错,请稍后重试或查看节点日志。":e.error?`检测未通过:${e.error}`:"检测未通过,请确认链接完整、发布者在线且本机网络正常。"},"getDownloadLinkValidationMessage",0,function(e=""){let a=String(e||"").trim();if(!a)return"请先粘贴 most:// 分享链接。";let t=function(e){let a;if(!e||"string"!=typeof e)return{cid:"",error:"Link must be a non-empty string"};try{a=new URL(e)}catch{return{cid:"",error:"Link must be a valid most:// URL"}}if("most:"!==a.protocol)return{cid:"",error:"Link must use most:// protocol"};if(a.pathname&&"/"!==a.pathname)return{cid:"",error:"Link path is not supported"};let t=a.hostname,s=a.searchParams.get("filename"),i=[...a.searchParams.keys()].find(e=>"filename"!==e),n=function(e){let a;if(!e||"string"!=typeof e)return{valid:!1,error:"CID must be a non-empty string"};try{a=d.CID.parse(e)}catch{return{valid:!1,error:"Invalid CID format"}}return 1!==a.version?{valid:!1,error:"Invalid CID format: CID v1 required"}:32!==a.multihash.digest.length?{valid:!1,error:"CID digest must be 32 bytes"}:{valid:!0}}(t);return n.valid?s&&s.trim()?i?{cid:"",error:`Unsupported query parameter: ${i}`}:{cid:t,fileName:s}:{cid:"",error:"filename is required"}:{cid:"",error:n.error}}(a);if(!t.error)return t.fileName?.trim()?null:h["filename is required"];if(t.error.startsWith("Unsupported query parameter: ")){let e=t.error.slice(29);return`链接包含暂不支持的参数 ${e},请只保留 filename。`}return h[t.error]||o}],27668)},41222,e=>{"use strict";var a=e.i(18050),t=e.i(71645),s=e.i(68590),i=e.i(30274),n=e.i(77071),r=e.i(35965),l=e.i(96699),c=e.i(63676),d=e.i(11241),o=e.i(79490),u=e.i(56420);let h=(0,u.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),m=(0,u.default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),p=(0,u.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var f=e.i(15170),x=e.i(80796),y=e.i(12796);let g=(0,u.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);var v=e.i(66595),j=e.i(59665),b=e.i(77685),k=e.i(11028);e.i(4121);var w=e.i(47910),N=e.i(88361),C=e.i(57667),S=e.i(39626),M=e.i(58501),I=e.i(26913),z=e.i(27668),A=e.i(93957),E=e.i(3593),R=e.i(71192),$=e.i(5142),L=e.i(23952),D=e.i(27648),F=e.i(87884),U=e.i(6933);let T=/^[a-zA-Z0-9_-]+$/,P={async publishFile(e,a){let t=new FormData;t.append("file",e,a);let s=await I.api.post("/api/publish",{body:t});if(!s.ok)throw Error((await s.json().catch(()=>({error:s.statusText}))).error||"Request failed");return s.json()},downloadFile:e=>I.api.post("/api/download",{json:{link:e}}).json(),checkDownload:e=>I.api.post("/api/download/check",{json:{link:e,timeout:1e4},timeout:12e3}).json(),getFileDownloadUrl:e=>(0,I.getApiUrl)(`/api/files/${e}/download`)};async function q(e){let a=await (0,I.getApiErrorPayload)(e),t=e&&"object"==typeof e&&"name"in e?String(e.name):"";return(0,z.getDownloadCheckErrorMessageFromPayload)(a,t)}e.s(["default",0,function(){let e=(0,E.useAppStore)(e=>e.isDarkMode),u=(0,E.useAppStore)(e=>e.setIsDarkMode),O=(0,E.useAppStore)(e=>e.hasBackend),B=(0,E.useAppStore)(e=>e.addToast),K=(0,E.useAppStore)(e=>e.openConnectModal),V=(0,R.useUserStore)(e=>e.identity),H=(0,R.useUserStore)(e=>e.openLoginModal),[W,_]=(0,t.useState)([]),[G,X]=(0,t.useState)(null),[J,Z]=(0,t.useState)(""),[Q,Y]=(0,t.useState)(""),[ee,ea]=(0,t.useState)(""),[et,es]=(0,$.useDisclosure)(!1),[ei,en]=(0,t.useState)(""),[er,el]=(0,t.useState)(!1),[ec,ed]=(0,t.useState)(!1),[eo,eu]=(0,$.useDisclosure)(!1),[eh,em]=(0,t.useState)(null),[ep,ef]=(0,t.useState)(!1),[ex,ey]=(0,t.useState)(""),[eg,ev]=(0,t.useState)(null),[ej,eb]=(0,t.useState)(!1),[ek,ew]=(0,t.useState)({}),[eN,eC]=(0,t.useState)(null),[eS,eM]=(0,t.useState)([]),[eI,ez]=(0,t.useState)(!1),[eA,eE]=(0,t.useState)(!1),eR=V?.identity==="user",e$=(0,t.useRef)(null),eL=(0,t.useRef)(null),eD=(0,t.useRef)(null),eF=(0,t.useRef)(null),eU=(0,t.useRef)(new Map),eT=(0,t.useRef)(new Set),eP=!0===O,eq=(0,t.useCallback)(async(e,a)=>{B(await (0,I.getApiErrorMessage)(e,a),"error")},[B]),eO=(0,t.useCallback)(()=>({displayName:V?.displayName||V?.username||"",avatar:V?.avatar}),[V?.avatar,V?.displayName,V?.username]),eB=(0,t.useCallback)(async(e=G?.name)=>{if(!e||!eP||!V)return void eM([]);ez(!0);try{eM(await F.channelApi.getChannelMembers(e))}catch(e){eM([]),await eq(e,"无法读取频道成员")}finally{ez(!1)}},[G?.name,eP,eq,V]),{clearMessages:eK,messages:eV,sendMessage:eH,syncMessages:eW}=(0,L.useChannelMessages)({isReady:eP,enabled:!!V,channelName:G?.name||"",peerId:ei,waitForPeerId:!0,onSyncError:e=>eq(e,"无法读取频道消息"),onSocketEvent:function(e,a){switch(e){case"channel:peer:online":case"channel:peer:offline":G&&F.channelApi.getChannelPeers(G.name).catch(e=>{console.warn("[Chat] Failed to fetch peers on event:",e.message)});break;case"channel:joined":case"channel:left":eJ(),eB();break;case"download:success":{let e=eU.current.get(a.taskId);e&&(eU.current.delete(a.taskId),eT.current.delete(e.cid),ew(a=>({...a,[e.cid]:{status:"available"}})),B(`${a.fileName||(0,b.getAttachmentBaseFileName)(e.fileName)} 下载完成`,"success"),eZ(e,a.fileName||e.fileName));break}case"download:error":case"download:cancelled":{let t=eU.current.get(a.taskId);t&&(eU.current.delete(a.taskId),eT.current.delete(t.cid),ew(s=>({...s,[t.cid]:{status:"error",message:"download:cancelled"===e?"附件下载已取消":a.error||"附件下载失败"}})),B("download:cancelled"===e?"附件下载已取消":a.error||"附件下载失败","error"))}}}});function e_(){return!!eP||(K(),!1)}function eG(){return!!V||(H(),!1)}function eX(e){return e.length<3?"频道名至少 3 个字符":e.length>30?"频道名最多 30 个字符":T.test(e)?"":"频道名只能包含字母、数字、下划线和连字符"}async function eJ(){if(eP)try{let e=await F.channelApi.getChannels({excludeType:"game"});_(e)}catch(e){_([]),await eq(e,"无法读取频道列表")}}function eZ(e,a=e.fileName){let t=(0,U.getFileSubtype)(a);ev({cid:e.cid,fileName:a,subtype:"file"===t?e.kind:t})}async function eQ(e){let a=(0,z.getDownloadLinkValidationMessage)(e.link);if(a)return ew(t=>({...t,[e.cid]:{status:"error",message:a}})),!1;try{ew(a=>({...a,[e.cid]:{status:"checking"}}));let a=await P.checkDownload(e.link);return ew(t=>({...t,[e.cid]:{status:"available",message:a.alreadyExists?"本机已有":"可预览"}})),!0}catch(t){let a=await q(t);return ew(t=>({...t,[e.cid]:{status:"error",message:a}})),!1}}async function eY(e){eC(null),await eQ(e)&&await e0(e)}async function e0(e){if(!eT.current.has(e.cid)){eT.current.add(e.cid),ew(a=>({...a,[e.cid]:{status:"available"}}));try{let a=await P.downloadFile(e.link);if(a.alreadyExists||a.fileName){eT.current.delete(e.cid),ew(a=>({...a,[e.cid]:{status:"available"}})),eZ({...e,fileName:a.fileName||e.fileName},a.fileName||e.fileName);return}a.taskId&&(eU.current.set(a.taskId,e),B("开始下载附件","success"))}catch(t){let a=await q(t);eT.current.delete(e.cid),ew(t=>({...t,[e.cid]:{status:"error",message:a}}))}}}async function e1(e){!eG()||e_()&&(X(e),Z(e.name),window.history.pushState({},"",`?channel=${encodeURIComponent(e.name)}`))}async function e2(e,a){if((a&&a.stopPropagation(),eG()&&e_())&&!ec){ed(!0);try{if(await F.channelApi.leaveChannel(e),G?.name===e){X(null),Z(""),eK();let e=new URL(window.location.href);e.searchParams.delete("channel"),window.history.pushState({},"",e.pathname)}eJ(),eu.close(),em(null)}catch(e){await eq(e,"退出频道失败")}finally{ed(!1)}}}async function e4(e){let a=e.trim();if(!a||er)return;let t=eX(a);if(t)return void B(t,"error");if(eG()&&e_()){el(!0);try{let e=await F.channelApi.createChannel(a,"public",eO()),t=W.find(e=>e.name===a),s={...t,name:e.name||a,type:e.type||t?.type||"public",createdAt:e.createdAt||t?.createdAt,coreKey:e.coreKey||e.key||t?.coreKey,remark:t?.remark};_(e=>e.some(e=>e.name===a)?e.map(e=>e.name===a?{...e,...s}:e):[...e,s]),es.close(),await e1(s),eB(a),eJ()}catch(e){await eq(e,"加入频道失败")}finally{el(!1)}}}async function e6(e,a){if(!e.trim()||!G||!eG()||!e_())return!1;let t=e.trim();try{return await eH({channelName:G.name,content:t,author:V.address,authorName:V.displayName||V.username,avatar:V.avatar,attachment:a}),eB(G.name),!0}catch(e){return await eq(e,"发送失败"),!1}}async function e3(){if(!ee.trim())return;let e=ee.trim();ea(""),await e6(e)}async function e8(e){if(e&&0!==e.length&&G&&eG()&&e_()&&!ej){eb(!0);try{for(let s of Array.from(e)){var a,t;let e=(a=G.name,t=s.name,`chat-file/${a}/${t}`),i=await P.publishFile(s,e),n=i.fileName||e,r=i.link||`most://${i.cid}?filename=${encodeURIComponent(n)}`,l={kind:s.type.startsWith("image/")?"image":s.type.startsWith("video/")?"video":s.type.startsWith("audio/")?"audio":s.type.startsWith("text/")?"text":(0,U.getFileSubtype)(n),cid:i.cid,fileName:n,link:r,mimeType:s.type||void 0,size:s.size};await e6(r,l)&&B(`${(0,b.getAttachmentBaseFileName)(n)} 已发布`,"success")}}catch(e){await eq(e,"附件发送失败")}finally{eb(!1)}}}async function e5(e){if(!eG()||!e_())return;let a=ek[e.cid];if(a?.status!=="checking"){if(a?.status==="error")return void eC(e);if(a?.status!=="available"){await eQ(e)&&await e0(e);return}await e0(e)}}async function e9(){if(G&&eG()&&e_())try{let e=await F.channelApi.setChannelRemark(G.name,ex);_(a=>a.map(a=>a.name===G.name?{...a,remark:e.remark}:a)),X(a=>a?{...a,remark:e.remark}:null)}catch(e){await eq(e,"设置备注失败")}}function e7(e,a){let t=String(e||"").trim();return t?eA?/#[a-fA-F0-9]{4}$/.test(String(t||"").trim())?t:a?`${t}#${a.slice(-4).toUpperCase()}`:t:t.replace(/#[a-fA-F0-9]{4}$/,""):a?`${a.slice(0,6)}...${a.slice(-4)}`:"Unknown"}(0,t.useEffect)(()=>{let e=()=>{Z(new URLSearchParams(window.location.search).get("channel")||"")};return e(),window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,t.useEffect)(()=>{V&&Z(new URLSearchParams(window.location.search).get("channel")||"")},[V?.address]),(0,t.useEffect)(()=>{e$.current?.scrollIntoView({behavior:"smooth"})},[eV]),(0,t.useEffect)(()=>{eP?I.api.get("/api/node-id").json().then(e=>en(e.id)).catch(e=>{console.warn("[Chat] Failed to fetch node ID:",e.message),eq(e,"无法读取节点 ID")}):en("")},[eP,eq]),(0,t.useEffect)(()=>{eP&&V&&eJ()},[O,eP,V?.address]),(0,t.useEffect)(()=>{G&&eP&&(eW(G.name,{replace:!0}),F.channelApi.getChannelPeers(G.name).catch(()=>{}),eB(G.name))},[G,O,eP,eB,eW]),(0,t.useEffect)(()=>{ep&&G&&eB(G.name)},[G,eB,ep]),(0,t.useEffect)(()=>{if(J&&W.length>0){let e=W.find(e=>e.name===J);e&&(!G||G.name!==e.name)?e1(e):e&&G&&G.name===e.name&&(G.createdAt!==e.createdAt||G.coreKey!==e.coreKey||G.remark!==e.remark||G.type!==e.type)&&X(e)}},[W,G,J]),(0,t.useEffect)(()=>{V||(_([]),X(null),Z(""),eK(),ea(""),en(""),ef(!1),ev(null),eM([]),ew({}),eT.current.clear(),eU.current.clear())},[eK,V?.address]);let ae=eR&&!!J&&!G,aa=G?(0,a.jsx)("h2",{className:"header-title",children:G.remark||G.name}):(0,a.jsx)("h2",{className:"header-title",children:"聊天"}),at=Q.trim().toLowerCase(),as=at?W.filter(e=>[e.remark||e.name,e.name].some(e=>e.toLowerCase().includes(at))):W;return(0,a.jsxs)(j.default,{defaultHide:eR,sidebar:({closeSidebar:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"sidebar-header sidebar-header-link",onClick:()=>window.location.href="/",children:[(0,a.jsx)(d.ArrowLeft,{size:18}),(0,a.jsx)("h1",{children:"MOST PEOPLE"})]}),(0,a.jsx)("div",{className:"chat-channel-search",children:(0,a.jsxs)("div",{className:"ui-input-control",children:[(0,a.jsx)(v.Search,{className:"ui-input-icon",size:15}),(0,a.jsx)("input",{type:"search",className:"input input-compact",placeholder:"搜索频道",value:Q,onChange:e=>Y(e.target.value),"aria-label":"搜索频道"})]})}),(0,a.jsx)("nav",{className:"sidebar-nav",children:0===W.length?(0,a.jsx)("div",{className:"sidebar-empty-state",children:(0,a.jsx)("p",{children:"暂无频道"})}):0===as.length?(0,a.jsx)("div",{className:"sidebar-empty-state",children:(0,a.jsx)("p",{children:"未找到频道"})}):as.map(t=>(0,a.jsxs)("div",{className:`sidebar-nav-btn ${G?.name===t.name?"active":""}`,onClick:()=>{e1(t),e()},role:"button",tabIndex:0,onKeyDown:a=>{"Enter"===a.key&&(e1(t),e())},children:[(0,a.jsx)(s.MessageSquare,{size:16}),(0,a.jsx)("span",{children:t.remark||t.name}),(0,a.jsx)("button",{className:"leave-channel-btn",onClick:e=>{e.stopPropagation(),em(t),eu.open()},title:"退出频道",children:(0,a.jsx)(c.X,{size:14})})]},t.name))}),(0,a.jsxs)("button",{className:"ui-action-dashed create-channel-btn",onClick:()=>{eG()&&e_()&&es.open()},children:[(0,a.jsx)(n.Plus,{size:16}),"加入频道"]}),(0,a.jsx)(D.default,{})]}),headerTitle:aa,sidebarToggleReplacement:eR?(0,a.jsx)("span",{className:"sidebar-toggle-static-logo","aria-hidden":"true",children:(0,a.jsx)(M.LogoIcon,{size:18})}):void 0,headerRight:(0,a.jsxs)("div",{className:"header-right-actions",children:[(0,a.jsx)("button",{className:"btn btn-icon",onClick:()=>u(!e),title:"切换主题",children:e?(0,a.jsx)(r.Sun,{size:16}):(0,a.jsx)(l.Moon,{size:16})}),G&&(0,a.jsx)("button",{className:"btn btn-icon",onClick:()=>ef(!0),title:"频道设置",children:(0,a.jsx)(p,{size:16})})]}),children:[G?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"chat-messages",children:[0===eV.length?(0,a.jsxs)("div",{className:"ui-empty-state chat-messages-empty",children:[(0,a.jsx)("div",{className:"ui-empty-icon empty-icon",children:(0,a.jsx)(s.MessageSquare,{size:28})}),(0,a.jsx)("p",{children:"暂无消息,开始聊天吧!"})]}):eV.map(e=>(0,a.jsxs)("div",{className:`chat-message ${e.author===V?.address?"self":"other"} ${e.pending?"pending":""}`,children:[(0,a.jsx)("img",{className:"msg-avatar",src:(0,A.generateAvatar)(e.author,e.author===V?.address?V.avatar:void 0),alt:"avatar"}),(0,a.jsxs)("div",{className:"msg-content",children:[(0,a.jsx)("span",{className:"message-author",children:e7(e.authorName,e.author)}),function(e){if(!e.attachment)return(0,a.jsx)("div",{className:"message-bubble",children:e.content});let t=e.attachment,s=ek[t.cid],i=s?.status;return(0,a.jsx)("div",{className:"message-bubble has-attachment",children:(0,a.jsx)(b.ChatAttachmentCard,{attachment:t,status:i,pending:e.pending,onOpen:e5})})}(e),(0,a.jsx)("span",{className:"message-time",children:new Date(e.timestamp).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"})})]})]},e.id||`${e.author}-${e.timestamp}`)),(0,a.jsx)("div",{ref:e$})]}),(0,a.jsxs)("div",{className:"chat-input-area",children:[(0,a.jsx)("input",{ref:eL,type:"file",accept:"image/*",className:"chat-file-input",onChange:e=>{e8(e.target.files),e.currentTarget.value=""}}),(0,a.jsx)("input",{ref:eD,type:"file",accept:"video/*",className:"chat-file-input",onChange:e=>{e8(e.target.files),e.currentTarget.value=""}}),(0,a.jsx)("input",{ref:eF,type:"file",className:"chat-file-input",onChange:e=>{e8(e.target.files),e.currentTarget.value=""}}),(0,a.jsx)("button",{type:"button",className:"btn btn-circle chat-tool-btn",onClick:()=>eL.current?.click(),disabled:!V||ej,title:"发送图片",children:(0,a.jsx)(f.Image,{size:18})}),(0,a.jsx)("button",{type:"button",className:"btn btn-circle chat-tool-btn",onClick:()=>eD.current?.click(),disabled:!V||ej,title:"发送视频",children:(0,a.jsx)(x.Film,{size:18})}),(0,a.jsx)("button",{type:"button",className:"btn btn-circle chat-tool-btn",onClick:()=>eF.current?.click(),disabled:!V||ej,title:"发送文件",children:ej?(0,a.jsx)(y.Loader,{size:18,className:"ui-spinner chat-attachment-spinner"}):(0,a.jsx)(g,{size:18})}),(0,a.jsx)("input",{type:"text",className:"input input-pill",placeholder:V?"输入消息...":"请先登录后发言",value:ee,disabled:!V,onChange:e=>ea(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ee.trim()&&e3()}}),(0,a.jsx)("button",{className:"btn btn-circle btn-primary send-btn",onClick:e3,disabled:!V||!ee.trim(),children:(0,a.jsx)(i.Send,{size:18})})]})]}):ae?(0,a.jsxs)("div",{className:"ui-empty-state chat-welcome",children:[(0,a.jsx)("div",{className:"ui-empty-icon ui-empty-icon-lg welcome-icon",children:(0,a.jsx)(y.Loader,{size:36,className:"ui-spinner"})}),(0,a.jsx)("h2",{className:"ui-empty-title",children:"正在打开频道"}),(0,a.jsx)("p",{className:"ui-empty-desc",children:"正在恢复聊天内容..."})]}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"ui-empty-state chat-welcome",children:[(0,a.jsx)("div",{className:"ui-empty-icon ui-empty-icon-lg welcome-icon",children:(0,a.jsx)(s.MessageSquare,{size:36})}),(0,a.jsx)("h2",{className:"ui-empty-title",children:"选择频道"}),(0,a.jsx)("p",{className:"ui-empty-desc",children:"从左侧边栏选择一个频道开始聊天,或创建一个新频道"}),(0,a.jsx)(S.default,{label:"打开频道列表"})]})}),et&&(0,a.jsx)(w.InputModal,{title:"加入频道",placeholder:"频道ID:3-20 位字母、数字、_ 或 -",confirmText:"加入",validate:eX,onConfirm:e4,onClose:()=>es.close(),isLoading:er,loadingText:"加入中..."}),eo&&eh&&(0,a.jsx)(N.ConfirmModal,{title:"退出频道",message:`确定要退出频道 "${eh.name}" 吗?`,confirmText:ec?"退出中...":"退出",onConfirm:()=>e2(eh.name,void 0),onClose:()=>{eu.close(),em(null)},danger:!0}),eN&&(0,a.jsx)(C.ModalOverlay,{onClose:()=>eC(null),children:(0,a.jsxs)("div",{className:"confirm-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"暂时没有在线种子"}),(0,a.jsx)("button",{type:"button",className:"btn btn-icon",onClick:()=>eC(null),"aria-label":"关闭",children:(0,a.jsx)(c.X,{size:18})})]}),(0,a.jsx)("p",{children:ek[eN.cid]?.message||"暂时没有发现在线种子。请确认分享者或其他下载者仍在线做种。"}),(0,a.jsxs)("div",{className:"modal-actions",children:[(0,a.jsx)("button",{type:"button",className:"btn btn-secondary",onClick:()=>eC(null),children:"取消"}),(0,a.jsx)("button",{type:"button",className:"btn btn-primary",onClick:()=>eY(eN),disabled:ek[eN.cid]?.status==="checking",children:ek[eN.cid]?.status==="checking"?"检测中...":"再次检测"})]})]})}),eg&&(0,a.jsx)(k.default,{item:eg,isBackendReady:eP,getFileDownloadUrl:P.getFileDownloadUrl,onClose:()=>ev(null)}),ep&&G&&(0,a.jsx)("div",{className:"channel-detail-overlay",onClick:()=>ef(!1),children:(0,a.jsxs)("div",{className:"channel-detail-drawer",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"channel-detail-header",children:[(0,a.jsx)("h3",{children:"频道详情"}),(0,a.jsx)("button",{className:"btn btn-icon",onClick:()=>ef(!1),children:(0,a.jsx)(c.X,{size:18})})]}),(0,a.jsxs)("div",{className:"channel-detail-body",children:[(0,a.jsxs)("div",{className:"channel-detail-section channel-members-section",children:[(0,a.jsx)("div",{className:"channel-detail-label",children:(0,a.jsxs)("span",{children:["群成员 (",eS.length,")"]})}),eI&&0===eS.length?(0,a.jsx)("div",{className:"ui-empty-inline channel-members-empty",children:"正在读取成员..."}):0===eS.length?(0,a.jsx)("div",{className:"ui-empty-inline channel-members-empty",children:"暂无成员"}):(0,a.jsx)("div",{className:"channel-members-grid",children:eS.map(e=>(0,a.jsxs)("div",{className:"channel-member",children:[(0,a.jsx)("img",{className:"channel-member-avatar",src:(0,A.generateAvatar)(e.address,e.avatar),alt:"avatar"}),(0,a.jsx)("span",{className:"channel-member-name",children:e7(e.displayName,e.address)})]},e.address))})]}),!eR&&(0,a.jsx)("div",{className:"channel-detail-section",children:(0,a.jsxs)("label",{className:"setting-switch",children:[(0,a.jsx)("span",{children:"显示 #地址后四位"}),(0,a.jsx)("input",{type:"checkbox",checked:eA,onChange:e=>eE(e.target.checked)})]})}),!eR&&(0,a.jsxs)("div",{className:"channel-detail-section",children:[(0,a.jsxs)("div",{className:"channel-detail-label",children:[(0,a.jsx)(m,{size:14}),(0,a.jsx)("span",{children:"频道 ID"})]}),(0,a.jsx)("div",{className:"ui-meta-box channel-detail-value channel-detail-mono",children:G.name})]}),(0,a.jsxs)("div",{className:"channel-detail-section",children:[(0,a.jsxs)("div",{className:"channel-detail-label",children:[(0,a.jsx)(o.Edit2,{size:14}),(0,a.jsx)("span",{children:"备注名称"})]}),(0,a.jsx)("input",{type:"text",className:"input input-compact",placeholder:"输入备注名称",value:ex,onChange:e=>ey(e.target.value),onFocus:()=>ey(G.remark||""),onBlur:()=>e9(),onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()},maxLength:50})]}),(0,a.jsxs)("div",{className:"channel-detail-section",children:[(0,a.jsxs)("div",{className:"channel-detail-label",children:[(0,a.jsx)(h,{size:14}),(0,a.jsx)("span",{children:"创建时间"})]}),(0,a.jsx)("div",{className:"ui-meta-box channel-detail-value",children:G.createdAt?new Date(G.createdAt).toLocaleDateString("zh-CN"):"-"})]})]}),!eR&&(0,a.jsx)("div",{className:"channel-detail-footer",children:(0,a.jsx)("button",{className:"btn btn-danger btn-block",onClick:()=>{ef(!1),em(G),eu.open()},children:"退出频道"})})]})})]})}],41222)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a={formatUrl:function(){return r},formatWithValidation:function(){return o},urlObjectKeys:function(){return c}};for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]});let n=e.r(90809)._(e.r(98183)),l=/https?|ftp|gopher|file/;function r(e){let{auth:t,hostname:s}=e,a=e.protocol||"",i=e.pathname||"",r=e.hash||"",c=e.query||"",o=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?o=t+e.host:s&&(o=t+(~s.indexOf(":")?`[${s}]`:s),e.port&&(o+=":"+e.port)),c&&"object"==typeof c&&(c=String(n.urlQueryToSearchParams(c)));let d=e.search||c&&`?${c}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||l.test(a))&&!1!==o?(o="//"+(o||""),i&&"/"!==i[0]&&(i="/"+i)):o||(o=""),r&&"#"!==r[0]&&(r="#"+r),d&&"?"!==d[0]&&(d="?"+d),i=i.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${a}${o}${i}${d}${r}`}let c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function o(e){return r(e)}},18581,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"useMergedRef",{enumerable:!0,get:function(){return i}});let a=e.r(71645);function i(e,t){let s=(0,a.useRef)(null),i=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=s.current;e&&(s.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(s.current=n(e,a)),t&&(i.current=n(t,a))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let s=e(t);return"function"==typeof s?s:()=>e(null)}}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},73668,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"isLocalURL",{enumerable:!0,get:function(){return n}});let a=e.r(18967),i=e.r(52817);function n(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),s=new URL(e,t);return s.origin===t&&(0,i.hasBasePath)(s.pathname)}catch(e){return!1}}},84508,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},22016,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a={default:function(){return f},useLinkStatus:function(){return b}};for(var i in a)Object.defineProperty(s,i,{enumerable:!0,get:a[i]});let n=e.r(90809),l=e.r(18050),r=n._(e.r(71645)),c=e.r(95057),o=e.r(8372),d=e.r(18581),h=e.r(18967),u=e.r(5550);e.r(33525);let m=e.r(88540),p=e.r(91949),x=e.r(73668),j=e.r(9396);function f(t){var s,a;let i,n,f,[b,v]=(0,r.useOptimistic)(p.IDLE_LINK_STATUS),N=(0,r.useRef)(null),{href:k,as:g,children:C,prefetch:M=null,passHref:w,replace:z,shallow:S,scroll:P,onClick:L,onMouseEnter:O,onTouchStart:F,legacyBehavior:T=!1,onNavigate:E,transitionTypes:A,ref:I,unstable_dynamicOnHover:B,...D}=t;i=C,T&&("string"==typeof i||"number"==typeof i)&&(i=(0,l.jsx)("a",{children:i}));let _=r.default.useContext(o.AppRouterContext),$=!1!==M,U=!1!==M?null===(a=M)||"auto"===a?j.FetchStrategy.PPR:j.FetchStrategy.Full:j.FetchStrategy.PPR,R="string"==typeof(s=g||k)?s:(0,c.formatUrl)(s);if(T){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=r.default.Children.only(i)}let q=T?n&&"object"==typeof n&&n.ref:I,K=r.default.useCallback(e=>(null!==_&&(N.current=(0,p.mountLinkInstance)(e,R,_,U,$,v)),()=>{N.current&&((0,p.unmountLinkForCurrentNavigation)(N.current),N.current=null),(0,p.unmountPrefetchableInstance)(e)}),[$,R,_,U,v]),H={ref:(0,d.useMergedRef)(K,q),onClick(t){T||"function"!=typeof L||L(t),T&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!_||t.defaultPrevented||function(t,s,a,i,n,l,c){if("u">typeof window){let o,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((o=t.currentTarget.getAttribute("target"))&&"_self"!==o||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,x.isLocalURL)(s)){i&&(t.preventDefault(),location.replace(s));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:h}=e.r(99781);r.default.startTransition(()=>{h(s,i?"replace":"push",!1===n?m.ScrollBehavior.NoScroll:m.ScrollBehavior.Default,a.current,c)})}}(t,R,N,z,P,E,A)},onMouseEnter(e){T||"function"!=typeof O||O(e),T&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),_&&$&&(0,p.onNavigationIntent)(e.currentTarget,!0===B)},onTouchStart:function(e){T||"function"!=typeof F||F(e),T&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),_&&$&&(0,p.onNavigationIntent)(e.currentTarget,!0===B)}};return(0,h.isAbsoluteUrl)(R)?H.href=R:T&&!w&&("a"!==n.type||"href"in n.props)||(H.href=(0,u.addBasePath)(R)),f=T?r.default.cloneElement(n,H):(0,l.jsx)("a",{...D,...H,children:i}),(0,l.jsx)(y.Provider,{value:b,children:f})}e.r(84508);let y=(0,r.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,r.useContext)(y);("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},89664,e=>{"use strict";let t=(0,e.i(56420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],89664)},31214,e=>{"use strict";let t=(0,e.i(56420).default)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);e.s(["Cloud",0,t],31214)},11241,e=>{"use strict";let t=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],11241)},96699,e=>{"use strict";let t=(0,e.i(56420).default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,t],96699)},35965,e=>{"use strict";let t=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,t],35965)},27648,e=>{"use strict";var t=e.i(18050),s=e.i(93957),a=e.i(71192);e.s(["default",0,function({className:e=""}){let i=(0,a.useUserStore)(e=>e.identity),n=(0,a.useUserStore)(e=>e.openLoginModal),l=(0,a.useUserStore)(e=>e.logoutUser);return(0,t.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,t.jsxs)("div",{className:"user-info",children:[(0,t.jsx)("img",{className:"user-avatar-img",src:(0,s.generateAvatar)(i?.address,i?.avatar),alt:"avatar"}),(0,t.jsx)("span",{className:"user-name",title:i?.address,children:i?.displayName||"未登录"})]}),i?(0,t.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:l,children:"退出"}):(0,t.jsx)("button",{className:"btn btn-primary login-btn",onClick:n,children:"登录"})]})}])},8734,e=>{"use strict";let t=(0,e.i(56420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],8734)},66627,e=>{"use strict";let t=(0,e.i(56420).default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);e.s(["Wifi",0,t],66627)},68590,58501,e=>{"use strict";let t=(0,e.i(56420).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",0,t],68590);var s=e.i(18050);e.s(["LogoIcon",0,function({size:e=24}){return(0,s.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.4"}),(0,s.jsx)("rect",{x:"14",y:"2",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,s.jsx)("rect",{x:"2",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)",opacity:"0.7"}),(0,s.jsx)("rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",fill:"var(--accent)"})]})}],58501)},56691,e=>{"use strict";var t=e.i(18050),s=e.i(22016);let a=[{href:"/",label:"关于"},{href:"/ping/",label:"网络"},{href:"https://github.com/most-people/most",label:"GitHub",external:!0}];e.s(["Footer",0,function(){return(0,t.jsx)("footer",{className:"mkt-footer",children:(0,t.jsx)("div",{className:"mkt-container",children:(0,t.jsxs)("div",{className:"mkt-footer-inner",children:[(0,t.jsx)("div",{className:"mkt-footer-links",children:a.map(e=>(0,t.jsx)(s.default,{href:e.href,...e.external?{target:"_blank",rel:"noopener noreferrer"}:{},children:e.label},e.href))}),(0,t.jsxs)("span",{className:"mkt-footer-copy",children:["© ",new Date().getFullYear()," MOST PEOPLE · MIT License"]})]})})})}])},42724,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(22016),i=e.i(62368),n=e.i(96699),l=e.i(35965),r=e.i(58501);e.s(["Nav",0,function(){let[e,c]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=localStorage.getItem("theme"),t=window.matchMedia("(prefers-color-scheme: dark)").matches;("dark"===e||!e&&t)&&c(!0)},[]),(0,s.useEffect)(()=>{document.documentElement.setAttribute("data-theme",e?"dark":"light"),localStorage.setItem("theme",e?"dark":"light")},[e]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("nav",{className:"mkt-nav",children:(0,t.jsxs)("div",{className:"mkt-nav-inner",children:[(0,t.jsxs)(a.default,{href:"/",className:"mkt-nav-logo",children:[(0,t.jsx)(r.LogoIcon,{}),"MOST PEOPLE"]}),(0,t.jsxs)("div",{className:"mkt-nav-cta",children:[(0,t.jsx)("button",{className:"mkt-theme-toggle",onClick:()=>c(!e),"aria-label":"切换主题",children:e?(0,t.jsx)(l.Sun,{size:16}):(0,t.jsx)(n.Moon,{size:16})}),(0,t.jsxs)(a.default,{href:"/download/",className:"btn btn-primary mkt-nav-preview",children:[(0,t.jsx)(i.Download,{size:16}),"下载客户端"]}),(0,t.jsx)(a.default,{href:"/app/",className:"btn btn-secondary",children:"打开 Web"})]})]})})})}])},58072,e=>{"use strict";let t=(0,e.i(56420).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,t],58072)},16327,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],16327)},16306,23165,24851,64830,16546,e=>{"use strict";let t=(0,e.i(56420).default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,t],16306);var s=e.i(18050),a=e.i(71645),i=e.i(89664),n=e.i(8734);function l({text:e,label:t,copiedLabel:r="已复制",className:c="btn btn-icon",iconSize:o=14}){let[d,h]=(0,a.useState)(!1);async function u(){try{await navigator.clipboard.writeText(e),h(!0),setTimeout(()=>h(!1),1500)}catch{}}return(0,s.jsxs)("button",{type:"button",className:c,onClick:u,title:d?r:t||"复制",children:[d?(0,s.jsx)(i.Check,{size:o}):(0,s.jsx)(n.Copy,{size:o}),t?d?r:t:null]})}e.s(["CopyButton",0,l],23165),e.s(["EmptyState",0,function({icon:e,message:t,className:a="empty-state glass"}){return(0,s.jsxs)("div",{className:a,children:[(0,s.jsx)("div",{className:"empty-state-icon",children:e}),(0,s.jsx)("p",{children:t})]})}],24851),e.s(["KeyCard",0,function({title:e,icon:t,children:a,accent:i=!1}){return(0,s.jsxs)("div",{className:`web3-key-card ${i?"accent":""}`,children:[(0,s.jsxs)("div",{className:"web3-key-card-header",children:[(0,s.jsx)("span",{className:"web3-key-card-icon",children:t}),(0,s.jsx)("span",{className:"web3-key-card-title",children:e})]}),(0,s.jsx)("div",{className:"web3-key-card-body",children:a})]})}],64830);var r=e.i(62368);e.s(["PemBlock",0,function({label:e,pem:t,filename:a}){return(0,s.jsxs)("div",{className:"web3-pem-block",children:[(0,s.jsxs)("div",{className:"web3-pem-header",children:[(0,s.jsx)("span",{className:"web3-pem-label",children:e}),(0,s.jsxs)("div",{className:"web3-pem-actions",children:[(0,s.jsx)(l,{text:t,label:"复制",className:"btn btn-sm",iconSize:14}),(0,s.jsxs)("button",{type:"button",className:"btn btn-sm btn-primary",onClick:function(){let e=new Blob([t],{type:"text/plain"}),s=URL.createObjectURL(e),i=document.createElement("a");i.href=s,i.download=a,i.click(),URL.revokeObjectURL(s)},title:"下载",children:[(0,s.jsx)(r.Download,{size:14}),"下载"]})]})]}),(0,s.jsx)("textarea",{className:"textarea mono",value:t,readOnly:!0,rows:6})]})}],16546)},62368,e=>{"use strict";let t=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],62368)},66595,e=>{"use strict";let t=(0,e.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],66595)},51921,e=>{"use strict";let t=(0,e.i(56420).default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);e.s(["Music",0,t],51921)},80796,e=>{"use strict";let t=(0,e.i(56420).default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);e.s(["Film",0,t],80796)},15170,e=>{"use strict";let t=(0,e.i(56420).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);e.s(["Image",0,t],15170)},12796,e=>{"use strict";let t=(0,e.i(56420).default)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);e.s(["Loader",0,t],12796)},6933,e=>{"use strict";e.s(["getFileSubtype",0,function(e){let t=String(e||"").split(".").pop()?.toLowerCase()||"";return["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","heic","heif"].includes(t)?"image":["mp4","webm","mov","avi","mkv","flv","wmv","m4v","mpeg","3gp"].includes(t)?"video":["mp3","wav","ogg","flac","aac","m4a","wma","opus"].includes(t)?"audio":["txt","md","js","ts","jsx","tsx","css","scss","less","json","xml","html","htm","yaml","yml","toml","ini","cfg","conf","log","sh","bash","py","rb","go","rs","java","c","cpp","h","hpp","cs","php","sql","graphql","env","gitignore","dockerfile","readme"].includes(t)?"text":"file"}])},26091,e=>{"use strict";let t=(0,e.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],26091)},77071,e=>{"use strict";let t=(0,e.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},99847,e=>{"use strict";let t=(0,e.i(56420).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],99847)},77685,e=>{"use strict";var t=e.i(18050),s=e.i(99847),a=e.i(62368),i=e.i(72382),n=e.i(26091),l=e.i(80796),r=e.i(15170),c=e.i(12796),o=e.i(51921);function d(e){let t=String(e||"").split("/");return t[t.length-1]||e}e.s(["ChatAttachmentCard",0,function({attachment:e,status:h="idle",pending:u=!1,onOpen:m}){var p,x;let j="checking"===h,f=["ui-file-action","chat-attachment-action","error"===h?"error":"","available"===h?"available":""].filter(Boolean).join(" "),y=((p=e.size)&&!(p<=0)?p<1024?`${p} B`:p<1048576?`${(p/1024).toFixed(1)} KB`:p<0x40000000?`${(p/1048576).toFixed(1)} MB`:`${(p/0x40000000).toFixed(2)} GB`:"")||"MostBox 文件";return(0,t.jsxs)("button",{type:"button",className:"ui-file-card chat-attachment-card",onClick:()=>m?.(e),disabled:u||j,title:e.link,children:[(0,t.jsx)("span",{className:`ui-file-icon chat-attachment-icon ${e.kind}`,children:j?(0,t.jsx)(c.Loader,{size:20,className:"ui-spinner chat-attachment-spinner"}):"image"===(x=e.kind)?(0,t.jsx)(r.Image,{size:20}):"video"===x?(0,t.jsx)(l.Film,{size:20}):"audio"===x?(0,t.jsx)(o.Music,{size:20}):(0,t.jsx)(n.FileText,{size:20})}),(0,t.jsxs)("span",{className:"ui-file-info chat-attachment-info",children:[(0,t.jsx)("span",{className:"ui-file-name chat-attachment-name",children:d(e.fileName)}),(0,t.jsx)("span",{className:"ui-file-meta chat-attachment-meta",children:u?"发送中...":y})]}),(0,t.jsx)("span",{className:f,children:j?"检测中":"available"===h?(0,t.jsx)(i.Eye,{size:16}):"error"===h?(0,t.jsx)(s.AlertCircle,{size:17}):(0,t.jsx)(a.Download,{size:16})})]})},"getAttachmentBaseFileName",0,d])},26067,e=>{"use strict";let t=(0,e.i(56420).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,t],26067)},25981,67927,e=>{"use strict";var t=e.i(56420);let s=(0,t.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,s],25981);let a=(0,t.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,a],67927)},10818,61507,40616,e=>{"use strict";let t=(0,e.i(56420).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,t],10818);var s=e.i(18050),a=e.i(26091),i=e.i(80796),n=e.i(26067),l=e.i(15170),r=e.i(51921),c=e.i(6933);function o(e){let t=e.lastIndexOf("/");return -1===t?{folder:"",name:e}:{folder:e.substring(0,t),name:e.substring(t+1)}}e.s(["FileCard",0,function({file:e,isSelected:t,onSelect:n,onPreview:d}){let h=(0,c.getFileSubtype)(e.fileName),u=(0,s.jsx)(a.FileText,{size:24,color:"#fff"});return"image"===h?u=(0,s.jsx)(l.Image,{size:24,color:"#fff"}):"video"===h?u=(0,s.jsx)(i.Film,{size:24,color:"#fff"}):"audio"===h&&(u=(0,s.jsx)(r.Music,{size:24,color:"#fff"})),(0,s.jsxs)("div",{"data-id":e.cid,onClick:()=>n(e.cid),onDoubleClick:()=>d(e),className:`card ${t?"selected":""}`,children:[(0,s.jsx)("div",{className:`card-icon ${e.starred?"starred":"file"}`,children:u}),(0,s.jsx)("p",{className:"card-name",children:o(e.fileName).name})]})},"FolderCard",0,function({folder:e,onClick:t}){return(0,s.jsxs)("div",{onClick:t,className:"card",children:[(0,s.jsx)("div",{className:"card-icon folder",children:(0,s.jsx)(n.Folder,{size:28,color:"#fff"})}),(0,s.jsx)("p",{className:"card-name",children:e.name})]})},"parseAppFileName",0,o],61507);var d=e.i(71645),h=e.i(63676);e.i(4121);var u=e.i(57667);e.s(["MoveModal",0,function({items:e,allFolders:t,currentPath:a,onMove:i,onClose:l}){let[r,c]=(0,d.useState)(""),[o,m]=(0,d.useState)(a),p=r?[{path:"",name:"全部内容"},...r.split("/").filter(Boolean).map((e,t,s)=>({path:s.slice(0,t+1).join("/"),name:e}))]:[],x=t.filter(e=>{if(""===r)return!e.path.includes("/");let t=r+"/";return!!e.path.startsWith(t)&&!e.path.substring(t.length).includes("/")});return(0,s.jsx)(u.ModalOverlay,{onClose:l,children:(0,s.jsxs)("div",{className:"move-modal",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"modal-header",children:[(0,s.jsx)("h3",{children:"移动到"}),(0,s.jsx)("button",{type:"button",onClick:l,className:"btn btn-icon",children:(0,s.jsx)(h.X,{size:18})})]}),(0,s.jsxs)("p",{className:"move-modal-desc",children:["已选 ",e.length," 个项目"]}),(0,s.jsx)("div",{className:"move-new-folder",children:(0,s.jsx)("input",{type:"text",className:"input",value:o,onChange:e=>m(e.target.value),placeholder:"输入路径创建嵌套文件夹"})}),(0,s.jsx)("p",{className:"move-modal-hint",children:"如 图片/壁纸"}),(0,s.jsx)("div",{className:"move-breadcrumb",children:p.map((e,t)=>(0,s.jsxs)(d.default.Fragment,{children:[t>0&&(0,s.jsx)("span",{className:"breadcrumb-separator",children:"/"}),(0,s.jsx)("button",{type:"button",onClick:()=>{c(e.path),m(e.path)},className:`move-breadcrumb-btn ${r===e.path&&!o?"active":""}`,children:e.name})]},e.path))}),(0,s.jsxs)("div",{className:"move-folder-list",children:[0===x.length&&(0,s.jsx)("p",{className:"move-modal-empty",children:"该目录下没有子文件夹"}),x.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>c(e.path),className:`move-folder-item ${r===e.path&&!o?"selected":""}`,children:[(0,s.jsx)(n.Folder,{size:16}),(0,s.jsx)("span",{children:e.name})]},e.path))]}),(0,s.jsxs)("div",{className:"modal-actions",children:[(0,s.jsx)("button",{type:"button",onClick:l,className:"btn btn-secondary",children:"取消"}),(0,s.jsx)("button",{type:"button",onClick:function(){i(r||o.trim())},className:"btn btn-primary",children:"移动"})]})]})})}],40616)},53138,51757,e=>{"use strict";var t=e.i(56420);let s=(0,t.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",0,s],53138);let a=(0,t.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,a],51757)},32391,60923,86512,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(53138),i=e.i(51757),n=e.i(31214),l=e.i(62368);let r=(0,e.i(56420).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);var c=e.i(25981),o=e.i(71192);e.s(["NoteMoreMenu",0,function({sync:e}){let d=(0,s.useRef)(null),[h,u]=(0,s.useState)(!1),m=(0,o.useUserStore)(e=>e.wallet),p=null!==e.action;async function x(e){u(!1),await e()}return(0,s.useEffect)(()=>{if(h)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){d.current?.contains(e.target)||u(!1)}},[h]),(0,t.jsxs)("div",{className:"note-more",ref:d,children:[(0,t.jsx)("button",{className:"btn btn-icon note-more-trigger",onClick:()=>u(e=>!e),title:"更多","aria-label":"更多",children:(0,t.jsx)(r,{size:16})}),h&&(0,t.jsxs)("div",{className:"note-more-menu",children:[(0,t.jsxs)("div",{className:`ui-notice note-sync-status ${e.hasConflict?"warning conflict":""}`,children:[(0,t.jsx)("span",{className:`ui-icon-tile note-sync-status-icon ${e.hasConflict?"warning":""}`,children:e.hasConflict?(0,t.jsx)(a.AlertTriangle,{size:16}):"synced"===e.status?(0,t.jsx)(i.CheckCircle2,{size:16}):(0,t.jsx)(n.Cloud,{size:16})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"云同步"}),(0,t.jsx)("small",{children:e.statusLabel})]})]}),(0,t.jsxs)("button",{className:"note-more-item",onClick:()=>x(e.exportLocalBackup),disabled:!m||p,children:[(0,t.jsx)(c.Upload,{size:16}),"本地导出"]}),(0,t.jsxs)("button",{className:"note-more-item",onClick:()=>x(e.importLocalBackup),disabled:!m||p,children:[(0,t.jsx)(l.Download,{size:16}),"本地导入"]})]})]})}],32391);var d=e.i(16327),h=e.i(67927),u=e.i(26067),m=e.i(63676);e.i(4121);var p=e.i(57667),x=e.i(3789);e.s(["NoteMoveModal",0,function({target:e,directories:a,onMove:i,onClose:n}){let l=(0,x.normalizeNotePath)(e.path||""),r="directory"===e.type?(0,x.normalizeNotePath)(e.path?`${e.path}/${e.name}`:e.name):(0,x.getNoteFullPath)(e),c=a.filter(t=>"directory"!==e.type||t.path!==r&&!t.path.startsWith(`${r}/`)),[o,j]=(0,s.useState)(l),[f,y]=(0,s.useState)(""),[b,v]=(0,s.useState)(new Set),N=(0,x.normalizeNotePath)(f),k=f.trim()?N:o,g=(0,x.normalizeNotePath)(k)===l,C=new Map;for(let e of c){let t=C.get(e.parentPath)||[];t.push(e),C.set(e.parentPath,t)}let M=c.filter(e=>{if(!e.parentPath)return!0;let t=e.parentPath.split("/").filter(Boolean);return t.every((e,s)=>b.has(t.slice(0,s+1).join("/")))}),w=[{label:"全部笔记",path:""},...o.split("/").filter(Boolean).map((e,t,s)=>({label:e,path:s.slice(0,t+1).join("/")}))];function z(e){j((0,x.normalizeNotePath)(e)),y("")}return(0,t.jsx)(p.ModalOverlay,{onClose:n,children:(0,t.jsxs)("div",{className:"note-move-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h3",{children:"移动笔记"}),(0,t.jsx)("button",{className:"btn btn-icon",onClick:n,children:(0,t.jsx)(m.X,{size:18})})]}),(0,t.jsxs)("div",{className:"note-move-target",children:[(0,t.jsx)("span",{children:"正在移动"}),(0,t.jsx)("strong",{children:e.name})]}),(0,t.jsx)("div",{className:"note-move-path",children:w.map((e,a)=>(0,t.jsxs)(s.default.Fragment,{children:[a>0&&(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("button",{type:"button",onClick:()=>z(e.path),children:e.label})]},e.path||"root"))}),(0,t.jsxs)("div",{className:"note-move-folder-list",children:[(0,t.jsxs)("button",{type:"button",className:`note-move-folder-item ${""===o?"selected":""}`,onClick:()=>z(""),children:[(0,t.jsx)("span",{className:"note-move-folder-spacer"}),(0,t.jsx)(u.Folder,{className:"note-move-folder-icon",size:16}),(0,t.jsx)("span",{children:"全部笔记"})]}),0===c.length?(0,t.jsx)("p",{className:"note-move-empty",children:"还没有可选文件夹"}):M.map(e=>{let s=C.has(e.path),a=b.has(e.path);return(0,t.jsxs)("button",{type:"button",className:`note-move-folder-item note-move-depth-${Math.min(e.depth,4)} ${o===e.path?"selected":""}`,onClick:()=>{var t;z(t=e.path),C.has(t)&&v(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},children:[s?a?(0,t.jsx)(d.ChevronDown,{className:"note-move-expander",size:14}):(0,t.jsx)(h.ChevronRight,{className:"note-move-expander",size:14}):(0,t.jsx)("span",{className:"note-move-folder-spacer"}),(0,t.jsx)(u.Folder,{className:"note-move-folder-icon",size:16}),(0,t.jsx)("span",{children:e.name}),e.parentPath&&(0,t.jsx)("small",{children:e.parentPath})]},e.path)})]}),(0,t.jsx)("input",{className:"input input-compact",value:f,onChange:e=>y(e.target.value),placeholder:"或输入新目录路径,如 文章/摘录"}),(0,t.jsxs)("div",{className:"note-move-destination",children:["目标位置:",k||"全部笔记"]}),(0,t.jsxs)("div",{className:"modal-actions",children:[(0,t.jsx)("button",{className:"btn btn-secondary",onClick:n,children:"取消"}),(0,t.jsx)("button",{className:"btn btn-primary",onClick:function(){g||i(k)},disabled:g,children:"移动"})]})]})})}],60923);var j=e.i(11241),f=e.i(27648);e.s(["NoteSidebar",0,function({children:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"sidebar-header sidebar-header-link",onClick:()=>{window.location.href="/"},children:[(0,t.jsx)(j.ArrowLeft,{size:18}),(0,t.jsx)("h1",{children:"MOST PEOPLE"})]}),e,(0,t.jsx)(f.default,{})]})}],86512)},38999,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(53138),i=e.i(11241),n=e.i(56420);let l=(0,n.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);var r=e.i(51757),c=e.i(31214),o=e.i(58072),d=e.i(72382),h=e.i(26091),u=e.i(26067),m=e.i(10818);let p=(0,n.default)("log-in",[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]);var x=e.i(68590),j=e.i(96699);let f=(0,n.default)("mouse-pointer-click",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]),y=(0,n.default)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);var b=e.i(77071),v=e.i(66595),N=e.i(41220),k=e.i(16306);let g=(0,n.default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);var C=e.i(35965);let M=(0,n.default)("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]);var w=e.i(66627),z=e.i(3593),S=e.i(71192),P=e.i(23165),L=e.i(77685),O=e.i(19767),F=e.i(24851),T=e.i(56691),E=e.i(61507),A=e.i(58501),I=e.i(64830),B=e.i(40616),D=e.i(42724),_=e.i(32391),$=e.i(60923),U=e.i(86512),R=e.i(16546);e.i(4121);var q=e.i(88361),K=e.i(47910),H=e.i(57667),V=e.i(80809),W=e.i(79952);let G={name:"产品计划.md",cid:"bafy-demo-note",path:"产品/计划",content:"# MostBox Demo",size:2048,type:"file",created_at:17645472e5,updated_at:17645472e5},X=[{path:"产品",name:"产品",parentPath:"",depth:0},{path:"产品/计划",name:"计划",parentPath:"产品",depth:1},{path:"产品/摘录",name:"摘录",parentPath:"产品",depth:1},{path:"灵感",name:"灵感",parentPath:"",depth:0}];function Y({id:e,icon:s,eyebrow:a,title:i,description:n,children:l}){return(0,t.jsxs)("section",{className:"demo-section",id:e,children:[(0,t.jsxs)("div",{className:"demo-section-heading",children:[(0,t.jsx)("div",{className:"demo-section-icon",children:s}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"demo-eyebrow",children:a}),(0,t.jsx)("h2",{children:i}),(0,t.jsx)("p",{children:n})]})]}),l]})}function Z({title:e,children:s,className:a=""}){let i=a?`demo-surface ${a}`:"demo-surface";return(0,t.jsxs)("article",{className:i,children:[(0,t.jsx)("h3",{children:e}),s]})}e.s(["default",0,function(){let[e,n]=(0,s.useState)("r2"),[J,Q]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(!1),[es,ea]=(0,s.useState)(!1),[ei,en]=(0,s.useState)(!1),[el,er]=(0,s.useState)(!1),[ec,eo]=(0,s.useState)([]),ed=(0,z.useAppStore)(e=>e.isDarkMode),eh=(0,z.useAppStore)(e=>e.setIsDarkMode),eu=(0,z.useAppStore)(e=>e.openConnectModal),em=(0,S.useUserStore)(e=>e.openLoginModal);function ep(e,t){eo(s=>[...s.slice(-4),{id:Date.now(),type:e,message:t}])}return(0,t.jsxs)("main",{className:"demo-page",children:[(0,t.jsxs)("header",{className:"demo-topbar",children:[(0,t.jsxs)("a",{className:"mkt-nav-logo",href:"/",children:[(0,t.jsx)(i.ArrowLeft,{size:18}),(0,t.jsx)("span",{children:"MOST PEOPLE"})]}),(0,t.jsx)("button",{type:"button",className:"mkt-theme-toggle",onClick:()=>eh(!ed),"aria-label":"切换主题",title:"切换主题",children:ed?(0,t.jsx)(C.Sun,{size:16}):(0,t.jsx)(j.Moon,{size:16})})]}),(0,t.jsx)("section",{className:"demo-hero",children:(0,t.jsxs)("div",{className:"demo-hero-copy",children:[(0,t.jsx)("p",{className:"demo-eyebrow",children:"Shared Component Library"}),(0,t.jsx)("h1",{children:"共享组件检查页"}),(0,t.jsx)("p",{children:"把基础样式、全局 UI 片段和已迁入 components 的共享组件按用途集中展示, 方便以后改 UI 时直接从这里检查联动效果。"})]})}),(0,t.jsx)(Y,{id:"foundation",icon:(0,t.jsx)(y,{size:18}),eyebrow:"Foundation",title:"基础样式",description:"全局按钮、输入框、开关、分段控件和状态反馈。",children:(0,t.jsxs)("div",{className:"demo-grid demo-grid-two",children:[(0,t.jsx)(Z,{title:"默认按钮",children:(0,t.jsxs)("div",{className:"demo-control-row",children:[(0,t.jsxs)("button",{className:"btn btn-primary",children:[(0,t.jsx)(r.CheckCircle2,{size:16}),"Primary"]}),(0,t.jsxs)("button",{className:"btn btn-secondary",children:[(0,t.jsx)(m.Info,{size:16}),"Secondary"]}),(0,t.jsxs)("button",{className:"btn btn-ghost",children:[(0,t.jsx)(g,{size:16}),"Ghost"]}),(0,t.jsxs)("button",{className:"btn btn-danger",children:[(0,t.jsx)(k.ShieldAlert,{size:16}),"Danger"]}),(0,t.jsx)("button",{className:"btn btn-primary",disabled:!0,children:"Disabled"}),(0,t.jsxs)("button",{type:"button",className:"ui-action-dashed",children:[(0,t.jsx)(b.Plus,{size:16}),"Dashed"]})]})}),(0,t.jsx)(Z,{title:"小号按钮",children:(0,t.jsxs)("div",{className:"demo-control-row",children:[(0,t.jsxs)("button",{className:"btn btn-sm btn-primary",children:[(0,t.jsx)(r.CheckCircle2,{size:14}),"Primary"]}),(0,t.jsxs)("button",{className:"btn btn-sm btn-secondary",children:[(0,t.jsx)(m.Info,{size:14}),"Secondary"]}),(0,t.jsxs)("button",{className:"btn btn-sm btn-ghost",children:[(0,t.jsx)(g,{size:14}),"Ghost"]}),(0,t.jsxs)("button",{className:"btn btn-sm btn-danger",children:[(0,t.jsx)(k.ShieldAlert,{size:14}),"Danger"]}),(0,t.jsx)("button",{className:"btn btn-sm btn-icon","aria-label":"小号图标按钮",children:(0,t.jsx)(l,{size:14})}),(0,t.jsx)("button",{className:"btn btn-sm btn-primary",disabled:!0,children:"Disabled"}),(0,t.jsxs)("button",{type:"button",className:"ui-action-dashed ui-action-dashed-sm",children:[(0,t.jsx)(b.Plus,{size:14}),"Dashed"]})]})}),(0,t.jsx)(Z,{title:"输入控件",children:(0,t.jsxs)("div",{className:"demo-input-grid",children:[(0,t.jsx)("input",{className:"input",value:"标准输入框",readOnly:!0}),(0,t.jsx)("input",{className:"input input-compact",value:"紧凑输入框",readOnly:!0}),(0,t.jsx)("input",{className:"input input-pill",value:"胶囊输入框",readOnly:!0}),(0,t.jsx)("textarea",{className:"textarea",value:"多行输入框",rows:3,readOnly:!0}),(0,t.jsxs)("div",{className:"ui-input-control",children:[(0,t.jsx)(v.Search,{className:"ui-input-icon",size:15}),(0,t.jsx)("input",{className:"input input-compact",placeholder:"带图标搜索",readOnly:!0})]})]})}),(0,t.jsx)(Z,{title:"开关、分段与徽标",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsxs)("label",{className:"setting-switch",children:[(0,t.jsx)("span",{children:"显示 #地址后四位"}),(0,t.jsx)("input",{type:"checkbox",defaultChecked:!0})]}),(0,t.jsxs)("label",{className:"setting-switch",children:[(0,t.jsx)("span",{children:"自动同步"}),(0,t.jsx)("input",{type:"checkbox"})]}),(0,t.jsxs)("div",{className:"ui-segmented-control download-source-tabs demo-download-source-tabs",role:"tablist","aria-label":"下载来源",children:[(0,t.jsxs)("button",{type:"button",className:"r2"===e?"ui-segmented-option download-source-tab is-active":"ui-segmented-option download-source-tab",role:"tab","aria-selected":"r2"===e,onClick:()=>n("r2"),children:[(0,t.jsx)(c.Cloud,{size:15}),"R2"]}),(0,t.jsxs)("button",{type:"button",className:"github"===e?"ui-segmented-option download-source-tab is-active":"ui-segmented-option download-source-tab",role:"tab","aria-selected":"github"===e,onClick:()=>n("github"),children:[(0,t.jsx)(o.Code,{size:15}),"GitHub"]})]}),(0,t.jsxs)("div",{className:"demo-control-row",children:[(0,t.jsxs)("span",{className:"ui-badge success",children:[(0,t.jsx)("span",{className:"status-dot success"}),"已连接"]}),(0,t.jsxs)("span",{className:"ui-badge warning",children:[(0,t.jsx)("span",{className:"status-dot warning"}),"检测中"]}),(0,t.jsxs)("span",{className:"ui-badge danger",children:[(0,t.jsx)("span",{className:"status-dot danger"}),"不可用"]}),(0,t.jsxs)("span",{className:"ui-badge info",children:[(0,t.jsx)("span",{className:"status-dot info"}),"已就绪"]})]})]})})]})}),(0,t.jsx)(Y,{id:"brand",icon:(0,t.jsx)(M,{size:18}),eyebrow:"Brand",title:"品牌与导航",description:"Logo、营销导航和页脚放在独立预览面板里,避免和 demo 容器互相挤压。",children:(0,t.jsxs)("div",{className:"demo-grid demo-brand-grid",children:[(0,t.jsx)(Z,{title:"LogoIcon",children:(0,t.jsxs)("div",{className:"demo-logo-row",children:[(0,t.jsx)(A.LogoIcon,{size:24}),(0,t.jsx)(A.LogoIcon,{size:36}),(0,t.jsx)(A.LogoIcon,{size:52})]})}),(0,t.jsx)(Z,{title:"Nav",className:"demo-nav-preview",children:(0,t.jsx)(D.Nav,{})}),(0,t.jsx)(Z,{title:"Footer",className:"demo-footer-preview",children:(0,t.jsx)(T.Footer,{})})]})}),(0,t.jsx)(Y,{id:"feedback",icon:(0,t.jsx)(f,{size:18}),eyebrow:"Feedback",title:"弹窗与反馈",description:"弹窗、Toast、连接和登录入口都使用按钮触发,页面加载时不主动打开。",children:(0,t.jsx)(Z,{title:"触发式组件",children:(0,t.jsxs)("div",{className:"demo-control-row",children:[(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:()=>Q(!0),children:[(0,t.jsx)(d.Eye,{size:16}),"ModalOverlay"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:()=>et(!0),children:[(0,t.jsx)(k.ShieldAlert,{size:16}),"ConfirmModal"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:()=>ea(!0),children:[(0,t.jsx)(M,{size:16}),"InputModal"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:()=>ep("info","这是一条本地 demo toast"),children:[(0,t.jsx)(l,{size:16}),"Toast"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:eu,children:[(0,t.jsx)(N.Server,{size:16}),"ConnectModal"]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary",onClick:em,children:[(0,t.jsx)(p,{size:16}),"UserLoginModal"]})]})})}),(0,t.jsx)(Y,{id:"patterns",icon:(0,t.jsx)(g,{size:18}),eyebrow:"Patterns",title:"全局样式片段",description:"页面里反复复用的全局 class 和组合形态。",children:(0,t.jsxs)("div",{className:"demo-grid demo-grid-two",children:[(0,t.jsx)(Z,{title:"文件行",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsx)(L.ChatAttachmentCard,{attachment:{kind:"text",cid:"bafy-demo-text",fileName:"demo-preview.txt",link:"most://bafy-demo-text?filename=demo-preview.txt",size:12697},status:"available"}),(0,t.jsx)(L.ChatAttachmentCard,{attachment:{kind:"video",cid:"bafy-demo-video",fileName:"movie-sample.mp4",link:"most://bafy-demo-video?filename=movie-sample.mp4",size:0},status:"checking"})]})}),(0,t.jsx)(Z,{title:"空状态",children:(0,t.jsxs)("div",{className:"ui-empty-state demo-empty-preview",children:[(0,t.jsx)("div",{className:"ui-empty-icon",children:(0,t.jsx)(x.MessageSquare,{size:28})}),(0,t.jsx)("h4",{className:"ui-empty-title",children:"暂无消息"}),(0,t.jsx)("p",{className:"ui-empty-desc",children:"开始聊天或选择一个频道。"})]})}),(0,t.jsx)(Z,{title:"列表与元信息",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsx)("article",{className:"ui-list-item active",children:(0,t.jsxs)("button",{type:"button",className:"ui-list-item-main",children:[(0,t.jsx)("span",{className:"ui-list-icon",children:(0,t.jsx)(h.FileText,{size:18})}),(0,t.jsxs)("span",{className:"ui-list-copy",children:[(0,t.jsx)("span",{className:"ui-list-title",children:"产品计划.md"}),(0,t.jsx)("span",{className:"ui-list-desc",children:"CID、下载和做种说明"})]}),(0,t.jsx)("span",{className:"ui-list-meta",children:"今天"})]})}),(0,t.jsx)("article",{className:"ui-list-item",children:(0,t.jsxs)("button",{type:"button",className:"ui-list-item-main",children:[(0,t.jsx)("span",{className:"ui-list-icon warning",children:(0,t.jsx)(u.Folder,{size:18})}),(0,t.jsxs)("span",{className:"ui-list-copy",children:[(0,t.jsx)("span",{className:"ui-list-title",children:"归档"}),(0,t.jsx)("span",{className:"ui-list-desc",children:"文件夹"})]}),(0,t.jsx)("span",{className:"ui-list-meta",children:"12 篇"})]})}),(0,t.jsx)("div",{className:"ui-meta-box",children:"频道 ID:general"}),(0,t.jsx)("div",{className:"ui-empty-inline",children:"暂无成员"})]})}),(0,t.jsx)(Z,{title:"通知、标签与代码",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsxs)("p",{className:"ui-notice success",children:[(0,t.jsx)(r.CheckCircle2,{size:14}),"同步完成,所有内容已更新。"]}),(0,t.jsxs)("p",{className:"ui-notice warning",children:[(0,t.jsx)(a.AlertTriangle,{size:14}),"节点正在检测中,请稍候。"]}),(0,t.jsxs)("ul",{className:"ui-chip-list demo-chip-preview",children:[(0,t.jsx)("li",{className:"ui-chip",children:"MostBox"}),(0,t.jsx)("li",{className:"ui-chip",children:"P2P"}),(0,t.jsx)("li",{className:"ui-chip",children:"CID"}),(0,t.jsx)("li",{className:"ui-chip",children:"Hyperdrive"})]}),(0,t.jsx)("code",{className:"ui-code-box",children:"most://bafy-demo-cid?filename=demo.txt"}),(0,t.jsxs)("div",{className:"ui-peer-info demo-peer-info",children:[(0,t.jsx)("span",{className:"peer-dot"}),(0,t.jsx)("span",{className:"peer-id",children:"12D3KooW...demo"}),(0,t.jsx)(w.Wifi,{size:14})]})]})})]})}),(0,t.jsx)(Y,{id:"shared",icon:(0,t.jsx)(h.FileText,{size:18}),eyebrow:"Shared Components",title:"共享组件",description:"已迁入 components 的页面组件,只展示外观和轻交互。",children:(0,t.jsxs)("div",{className:"demo-grid demo-grid-two",children:[(0,t.jsx)(Z,{title:"Web3 小组件",children:(0,t.jsxs)("div",{className:"demo-stack",children:[(0,t.jsx)(I.KeyCard,{title:"Ed25519 公钥",icon:(0,t.jsx)(k.ShieldAlert,{size:18}),children:(0,t.jsxs)("div",{className:"mono-row",children:[(0,t.jsx)("code",{className:"mono",children:"ed25519-demo-public-key"}),(0,t.jsx)(P.CopyButton,{text:"ed25519-demo-public-key"})]})}),(0,t.jsx)(F.EmptyState,{icon:(0,t.jsx)(p,{size:32}),message:"请输入用户名和密码以查看身份信息"})]})}),(0,t.jsx)(Z,{title:"PEM 与复制",className:"demo-pem-preview",children:(0,t.jsx)(R.PemBlock,{label:"demo.pub",filename:"demo.pub",pem:"-----BEGIN PUBLIC KEY-----\nMOSTBOXDEMO\n-----END PUBLIC KEY-----"})}),(0,t.jsxs)(Z,{title:"文件管理卡片",children:[(0,t.jsxs)("div",{className:"demo-app-card-grid",children:[(0,t.jsx)(E.FolderCard,{folder:{name:"图片",path:"图片"},onClick:()=>ep("info","FolderCard demo")}),(0,t.jsx)(E.FileCard,{file:{cid:"bafy-demo-file",fileName:"图片/demo.png",starred:!0},isSelected:!0,onSelect:()=>ep("info","FileCard select"),onPreview:()=>ep("info","FileCard preview")})]}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary demo-move-trigger",onClick:()=>en(!0),children:[(0,t.jsx)(u.Folder,{size:16}),"MoveModal"]})]}),(0,t.jsx)(Z,{title:"笔记组件",children:(0,t.jsxs)("div",{className:"demo-note-shell",children:[(0,t.jsxs)("div",{className:"demo-note-header",children:[(0,t.jsx)("span",{children:"笔记"}),(0,t.jsx)(_.NoteMoreMenu,{sync:{action:null,status:"synced",statusLabel:"已同步",hasConflict:!1,uploadNow:async()=>!0,restoreFromCloud:async()=>!0,exportLocalBackup:()=>ep("info","本地导出"),importLocalBackup:()=>ep("info","本地导入")}})]}),(0,t.jsx)("div",{className:"sidebar demo-note-sidebar",children:(0,t.jsx)(U.NoteSidebar,{children:(0,t.jsx)("div",{className:"sidebar-empty-state",children:(0,t.jsx)("p",{children:"NoteSidebar 已迁入 components"})})})}),(0,t.jsxs)("button",{type:"button",className:"btn btn-secondary demo-move-trigger",onClick:()=>er(!0),children:[(0,t.jsx)(u.Folder,{size:16}),"NoteMoveModal"]})]})})]})}),ec.map((e,s)=>(0,t.jsx)(V.Toast,{message:e.message,type:e.type,index:s,onDone:()=>{var t;return t=e.id,void eo(e=>e.filter(e=>e.id!==t))}},e.id)),J&&(0,t.jsx)(H.ModalOverlay,{onClose:()=>Q(!1),children:(0,t.jsxs)("div",{className:"demo-basic-modal",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("h3",{children:"ModalOverlay"}),(0,t.jsx)("p",{children:"这是基础容器示例,用来检查玻璃背景、居中和关闭行为。"}),(0,t.jsx)("button",{type:"button",className:"btn btn-primary",onClick:()=>Q(!1),children:"关闭"})]})}),ee&&(0,t.jsx)(q.ConfirmModal,{title:"确认弹窗示例",message:"用于检查标题、正文、按钮和危险态之外的默认确认状态。",confirmText:"确认",onConfirm:()=>{et(!1),ep("success","ConfirmModal 已确认")},onClose:()=>et(!1)}),es&&(0,t.jsx)(K.InputModal,{title:"输入弹窗示例",placeholder:"输入任意文本",confirmText:"保存",defaultValue:"MostBox",onConfirm:e=>{ea(!1),ep("success",`InputModal: ${e}`)},onClose:()=>ea(!1),validate:e=>e.length<2?"至少输入 2 个字符":""}),ei&&(0,t.jsx)(B.MoveModal,{items:[{cid:"bafy-demo-file"}],allFolders:[{name:"图片",path:"图片"},{name:"壁纸",path:"图片/壁纸"},{name:"文档",path:"文档"}],currentPath:"图片",onMove:e=>{en(!1),ep("success",`MoveModal: ${e||"根目录"}`)},onClose:()=>en(!1)}),el&&(0,t.jsx)($.NoteMoveModal,{target:G,directories:X,onMove:e=>{er(!1),ep("success",`NoteMoveModal: ${e||"全部笔记"}`)},onClose:()=>er(!1)}),(0,t.jsx)(O.default,{}),(0,t.jsx)(W.default,{})]})}],38999)}]);
@@ -0,0 +1 @@
1
+ .mkt-layout{flex-direction:column;min-height:100dvh;display:flex}.mkt-layout-main{flex:1}.mkt-container{width:100%;max-width:960px;padding-inline:var(--space-6);margin-inline:auto}@media (max-width:768px){.mkt-container{padding-inline:var(--space-4)}}.mkt-nav{z-index:100;border-bottom:1px solid var(--glass-border);background:var(--glass-bg-heavy);height:64px;-webkit-backdrop-filter:var(--blur-xl);align-items:center;display:flex;position:sticky;top:0}.mkt-nav-inner{width:100%;max-width:960px;padding-inline:var(--space-6);justify-content:space-between;align-items:center;margin-inline:auto;display:flex}.mkt-nav-logo{align-items:center;gap:var(--space-2);font-size:var(--font-size-lg,1.125rem);color:var(--text-primary);font-weight:700;text-decoration:none;display:flex}.mkt-nav-logo:hover{color:var(--text-primary)}.mkt-nav-cta{align-items:center;gap:var(--space-3);flex-wrap:wrap;justify-content:flex-end;display:flex}.mkt-theme-toggle{border-radius:var(--radius-sm,8px);width:32px;height:32px;color:var(--text-secondary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;transition:all .15s;display:flex}.mkt-theme-toggle:hover{color:var(--text-primary);background:var(--glass-bg-subtle)}.mkt-footer{border-top:1px solid var(--glass-border);padding-block:var(--space-8);background:var(--glass-bg-subtle)}.mkt-footer-inner{justify-content:center;align-items:center;gap:var(--space-4);flex-wrap:wrap;display:flex}.mkt-footer-links{gap:var(--space-6);display:flex}.mkt-footer-links a{font-size:var(--font-size-xs,.75rem);color:var(--text-muted)}.mkt-footer-links a:hover{color:var(--text-primary)}.mkt-footer-copy{font-size:var(--font-size-xs,.75rem);color:var(--text-muted)}@media (max-width:768px){.mkt-nav-inner{padding-inline:var(--space-4)}.mkt-nav-logo{font-size:14px}.mkt-nav-cta{gap:var(--space-2)}.mkt-nav-preview{display:none}.mkt-footer-inner{flex-direction:column;align-items:flex-start}}.mkt-landing{font-family:var(--font-sans)}.mkt-hero{text-align:center;padding:80px 24px 48px}.mkt-hero-badge{border-radius:var(--radius-full);background:var(--glass-bg-subtle);color:var(--text-secondary);border:1px solid var(--glass-border);margin-bottom:24px;padding:4px 12px;font-size:12px;font-weight:500;display:inline-block}.mkt-hero-title{letter-spacing:0;background:linear-gradient(135deg, var(--text-primary), var(--accent));-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text;margin-bottom:16px;font-size:60px;font-weight:700;line-height:1.05}.mkt-hero-desc{color:var(--text-secondary);max-width:36ch;margin:0 auto 32px;font-size:18px;line-height:1.6}.mkt-hero-cta{justify-content:center;gap:12px;margin-top:24px;display:flex}.mkt-screenshot-placeholder{background:var(--glass-bg-subtle);border:1px dashed var(--glass-border);border-radius:var(--radius-lg);aspect-ratio:16/9;color:var(--text-muted);justify-content:center;align-items:center;margin-bottom:48px;font-size:13px;display:flex}.mkt-section-desc{color:var(--text-secondary);max-width:65ch;margin-bottom:32px;font-size:18px;line-height:1.7}.mkt-features{flex-direction:column;gap:20px;display:flex}.mkt-feature{align-items:flex-start;gap:12px;display:flex}.mkt-feature .mkt-feature-icon{color:var(--accent);flex-shrink:0;margin-top:2px}.mkt-feature strong{color:var(--text-primary);font-weight:600;display:block}.mkt-feature span{color:var(--text-secondary);font-size:13px}.mkt-link{color:var(--accent);margin-top:32px;font-size:13px;text-decoration:none;display:inline-block}.mkt-link:hover{text-decoration:underline}.mkt-section-alt{background:var(--glass-bg-subtle);border-top:1px solid var(--glass-border);border-bottom:1px solid var(--glass-border)}.mkt-steps{flex-direction:column;gap:24px;margin-bottom:32px;display:flex}.mkt-step{align-items:flex-start;gap:16px;display:flex}.mkt-step-num{border-radius:var(--radius-full);background:var(--accent);color:#fff;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;font-size:13px;font-weight:700;display:flex}.mkt-step-content{flex:1}.mkt-step-content h4{color:var(--text-primary);margin-bottom:8px;font-size:15px;font-weight:600}.mkt-step-content p{color:var(--text-secondary);font-size:13px}.mkt-code{background:var(--glass-bg-subtle);border:1px solid var(--glass-border);border-radius:var(--radius-sm);font-size:13px;font-family:var(--font-mono);color:var(--text-primary);margin-top:8px;padding:12px 16px;display:block}.mkt-step-link{margin-top:8px}.mkt-step-link a{color:var(--accent);font-size:13px}.mkt-remote-grid{grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:24px;display:grid}.mkt-remote-card{background:var(--glass-bg-subtle);-webkit-backdrop-filter:var(--blur-sm);border:1px solid var(--glass-border);border-radius:var(--radius-lg);transition:all var(--transition);padding:20px}.mkt-remote-card:hover{background:var(--glass-bg);box-shadow:var(--glass-shadow);transform:translateY(-2px)}.mkt-remote-card h4{color:var(--text-primary);margin-bottom:4px;font-size:15px;font-weight:600}.mkt-remote-card p{color:var(--text-secondary);font-size:13px;line-height:1.5}.mkt-tag{color:var(--accent);background:var(--accent-soft);border-radius:var(--radius-sm);margin-top:8px;padding:4px 8px;font-size:11px;font-weight:500;display:inline-block}.mkt-cta{text-align:center}.mkt-cta-desc{color:var(--text-secondary);max-width:40ch;margin:0 auto 32px;font-size:18px;line-height:1.6}.mkt-cta-install{max-width:520px;margin:0 auto}@media (max-width:768px){.mkt-hero-title{font-size:40px}.mkt-hero-desc{font-size:16px}.mkt-remote-grid{grid-template-columns:1fr}.mkt-hero-cta{flex-direction:column;align-items:center}}.page-loading{flex-direction:column;justify-content:center;align-items:center;min-height:calc(100dvh - 144px);display:flex}.page-loading-logo{opacity:.5;background:linear-gradient(135deg, var(--accent) 25%, transparent 25%) 0 0 / 50% 50% no-repeat, linear-gradient(135deg, var(--accent) 25%, transparent 25%) 50% 0 / 50% 50% no-repeat, linear-gradient(135deg, var(--accent) 25%, transparent 25%) 0 50% / 50% 50% no-repeat, linear-gradient(135deg, var(--accent) 25%, transparent 25%) 50% 50% / 50% 50% no-repeat;background-color:var(--accent);border-radius:4px;width:48px;height:48px;animation:1.5s ease-in-out infinite pulse;-webkit-mask:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='2' y='2' width='8' height='8' rx='2' fill='black' opacity='0.4'/%3E%3Crect x='14' y='2' width='8' height='8' rx='2' fill='black' opacity='0.7'/%3E%3Crect x='2' y='14' width='8' height='8' rx='2' fill='black' opacity='0.7'/%3E%3Crect x='14' y='14' width='8' height='8' rx='2' fill='black'/%3E%3C/svg%3E") 50%/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='2' y='2' width='8' height='8' rx='2' fill='black' opacity='0.4'/%3E%3Crect x='14' y='2' width='8' height='8' rx='2' fill='black' opacity='0.7'/%3E%3Crect x='2' y='14' width='8' height='8' rx='2' fill='black' opacity='0.7'/%3E%3Crect x='14' y='14' width='8' height='8' rx='2' fill='black'/%3E%3C/svg%3E") 50%/contain no-repeat}@keyframes pulse{0%,to{opacity:.3;transform:scale(.95)}50%{opacity:.7;transform:scale(1)}}.mkt-nav-settings-btn{border-radius:var(--radius-sm,8px);width:32px;height:32px;color:var(--text-secondary);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;transition:all .15s;display:flex}.mkt-nav-settings-btn:hover{color:var(--text-primary);background:var(--glass-bg-subtle)}.mkt-settings-overlay{z-index:200;-webkit-backdrop-filter:var(--blur-xl);background:#0006;justify-content:center;align-items:center;animation:.2s ease-out fadeIn;display:flex;position:fixed;inset:0}.mkt-settings-modal{background:var(--glass-bg-heavy);-webkit-backdrop-filter:var(--blur-2xl);border:1px solid var(--glass-border);border-radius:var(--radius-xl);padding:var(--space-8);width:90%;max-width:420px;box-shadow:var(--glass-shadow-lg);animation:.25s ease-out scaleIn}.mkt-settings-modal h3{margin-bottom:var(--space-2);font-size:18px;font-weight:600}.mkt-settings-desc{color:var(--text-secondary);margin-bottom:var(--space-5);font-size:13px;line-height:1.5}.mkt-settings-actions{gap:var(--space-3);display:flex}.mkt-settings-status{margin-top:var(--space-3);text-align:center;font-size:13px}.mkt-settings-status.success{color:var(--success)}.mkt-settings-status.error{color:var(--danger)}
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89664,e=>{"use strict";let a=(0,e.i(56420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,a],89664)},8734,e=>{"use strict";let a=(0,e.i(56420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,a],8734)},26091,e=>{"use strict";let a=(0,e.i(56420).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,a],26091)},73474,e=>{"use strict";let a=(0,e.i(56420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,a],73474)},62368,e=>{"use strict";let a=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,a],62368)},66595,e=>{"use strict";let a=(0,e.i(56420).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,a],66595)},51921,e=>{"use strict";let a=(0,e.i(56420).default)("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);e.s(["Music",0,a],51921)},12796,e=>{"use strict";let a=(0,e.i(56420).default)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);e.s(["Loader",0,a],12796)},80796,e=>{"use strict";let a=(0,e.i(56420).default)("film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);e.s(["Film",0,a],80796)},15170,e=>{"use strict";let a=(0,e.i(56420).default)("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);e.s(["Image",0,a],15170)},6933,e=>{"use strict";e.s(["getFileSubtype",0,function(e){let a=String(e||"").split(".").pop()?.toLowerCase()||"";return["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","heic","heif"].includes(a)?"image":["mp4","webm","mov","avi","mkv","flv","wmv","m4v","mpeg","3gp"].includes(a)?"video":["mp3","wav","ogg","flac","aac","m4a","wma","opus"].includes(a)?"audio":["txt","md","js","ts","jsx","tsx","css","scss","less","json","xml","html","htm","yaml","yml","toml","ini","cfg","conf","log","sh","bash","py","rb","go","rs","java","c","cpp","h","hpp","cs","php","sql","graphql","env","gitignore","dockerfile","readme"].includes(a)?"text":"file"}])},25981,67927,e=>{"use strict";var a=e.i(56420);let s=(0,a.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,s],25981);let t=(0,a.default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],67927)},26067,e=>{"use strict";let a=(0,e.i(56420).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,a],26067)},10818,61507,40616,e=>{"use strict";let a=(0,e.i(56420).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,a],10818);var s=e.i(18050),t=e.i(26091),i=e.i(80796),r=e.i(26067),l=e.i(15170),n=e.i(51921),o=e.i(6933);function c(e){let a=e.lastIndexOf("/");return -1===a?{folder:"",name:e}:{folder:e.substring(0,a),name:e.substring(a+1)}}e.s(["FileCard",0,function({file:e,isSelected:a,onSelect:r,onPreview:d}){let u=(0,o.getFileSubtype)(e.fileName),m=(0,s.jsx)(t.FileText,{size:24,color:"#fff"});return"image"===u?m=(0,s.jsx)(l.Image,{size:24,color:"#fff"}):"video"===u?m=(0,s.jsx)(i.Film,{size:24,color:"#fff"}):"audio"===u&&(m=(0,s.jsx)(n.Music,{size:24,color:"#fff"})),(0,s.jsxs)("div",{"data-id":e.cid,onClick:()=>r(e.cid),onDoubleClick:()=>d(e),className:`card ${a?"selected":""}`,children:[(0,s.jsx)("div",{className:`card-icon ${e.starred?"starred":"file"}`,children:m}),(0,s.jsx)("p",{className:"card-name",children:c(e.fileName).name})]})},"FolderCard",0,function({folder:e,onClick:a}){return(0,s.jsxs)("div",{onClick:a,className:"card",children:[(0,s.jsx)("div",{className:"card-icon folder",children:(0,s.jsx)(r.Folder,{size:28,color:"#fff"})}),(0,s.jsx)("p",{className:"card-name",children:e.name})]})},"parseAppFileName",0,c],61507);var d=e.i(71645),u=e.i(63676);e.i(4121);var m=e.i(57667);e.s(["MoveModal",0,function({items:e,allFolders:a,currentPath:t,onMove:i,onClose:l}){let[n,o]=(0,d.useState)(""),[c,p]=(0,d.useState)(t),h=n?[{path:"",name:"全部内容"},...n.split("/").filter(Boolean).map((e,a,s)=>({path:s.slice(0,a+1).join("/"),name:e}))]:[],f=a.filter(e=>{if(""===n)return!e.path.includes("/");let a=n+"/";return!!e.path.startsWith(a)&&!e.path.substring(a.length).includes("/")});return(0,s.jsx)(m.ModalOverlay,{onClose:l,children:(0,s.jsxs)("div",{className:"move-modal",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"modal-header",children:[(0,s.jsx)("h3",{children:"移动到"}),(0,s.jsx)("button",{type:"button",onClick:l,className:"btn btn-icon",children:(0,s.jsx)(u.X,{size:18})})]}),(0,s.jsxs)("p",{className:"move-modal-desc",children:["已选 ",e.length," 个项目"]}),(0,s.jsx)("div",{className:"move-new-folder",children:(0,s.jsx)("input",{type:"text",className:"input",value:c,onChange:e=>p(e.target.value),placeholder:"输入路径创建嵌套文件夹"})}),(0,s.jsx)("p",{className:"move-modal-hint",children:"如 图片/壁纸"}),(0,s.jsx)("div",{className:"move-breadcrumb",children:h.map((e,a)=>(0,s.jsxs)(d.default.Fragment,{children:[a>0&&(0,s.jsx)("span",{className:"breadcrumb-separator",children:"/"}),(0,s.jsx)("button",{type:"button",onClick:()=>{o(e.path),p(e.path)},className:`move-breadcrumb-btn ${n===e.path&&!c?"active":""}`,children:e.name})]},e.path))}),(0,s.jsxs)("div",{className:"move-folder-list",children:[0===f.length&&(0,s.jsx)("p",{className:"move-modal-empty",children:"该目录下没有子文件夹"}),f.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>o(e.path),className:`move-folder-item ${n===e.path&&!c?"selected":""}`,children:[(0,s.jsx)(r.Folder,{size:16}),(0,s.jsx)("span",{children:e.name})]},e.path))]}),(0,s.jsxs)("div",{className:"modal-actions",children:[(0,s.jsx)("button",{type:"button",onClick:l,className:"btn btn-secondary",children:"取消"}),(0,s.jsx)("button",{type:"button",onClick:function(){i(n||c.trim())},className:"btn btn-primary",children:"移动"})]})]})})}],40616)},11241,e=>{"use strict";let a=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,a],11241)},35965,e=>{"use strict";let a=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,a],35965)},96699,e=>{"use strict";let a=(0,e.i(56420).default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,a],96699)},59665,5142,e=>{"use strict";var a=e.i(18050),s=e.i(71645);let t=(0,e.i(56420).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);function i(e=!1,a={}){let[t,r]=(0,s.useState)(e),l=(0,s.useCallback)(()=>{r(e=>e||(a.onOpen?.(),!0))},[a.onOpen]),n=(0,s.useCallback)(()=>{r(e=>e?(a.onClose?.(),!1):e)},[a.onClose]);return[t,{open:l,close:n,toggle:(0,s.useCallback)(()=>{t?n():l()},[n,l,t]),set:r}]}e.s(["useDisclosure",0,i],5142);let r=(0,s.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:l,headerRight:n,sidebarToggleReplacement:o,defaultHide:c=!1,children:d}){let[u,m]=i(!1),[p,h]=(0,s.useState)(c),f=(0,s.useRef)(c),x=function(e,{getInitialValueInEffect:a}={getInitialValueInEffect:!0}){let[t,i]=(0,s.useState)(a?void 0:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,s.useEffect)(()=>{try{if("matchMedia"in window){let a=window.matchMedia(e);i(a.matches);let s=e=>i(e.matches);return a.addEventListener("change",s),()=>{a.removeEventListener("change",s)}}}catch(e){return}},[e]),t||!1}("(max-width: 768px)"),j=(0,s.useCallback)((e={})=>{m.close(),e.collapse&&h(!0)},[m]);(0,s.useEffect)(()=>{c!==f.current&&(c?j({collapse:!0}):h(!1),f.current=c)},[c,j]);let g=()=>{x?m.open():h(!1)};return(0,a.jsx)(r.Provider,{value:{closeSidebar:j,openSidebar:g,isSidebarVisible:x?u:!p},children:(0,a.jsxs)("div",{className:"app-layout",children:[(0,a.jsx)("div",{className:`sidebar-overlay ${u?"visible":""}`,onClick:()=>j()}),(0,a.jsx)("div",{className:`sidebar ${u?"open":""} ${p?"collapsed":""}`,children:e({closeSidebar:j,openSidebar:g})}),(0,a.jsxs)("div",{className:"main-content",children:[(0,a.jsxs)("header",{className:"app-header",children:[(0,a.jsxs)("div",{className:"header-left",children:[o??(0,a.jsx)("button",{onClick:()=>{x?m.toggle():h(!p)},className:"btn btn-icon sidebar-toggle-btn","aria-label":x?"打开菜单":p?"展开侧边栏":"收起侧边栏",children:(0,a.jsx)(t,{size:16})}),l]}),(0,a.jsx)("div",{className:"header-right",children:n})]}),d]})]})})},"useAppShell",0,function(){let e=(0,s.useContext)(r);if(!e)throw Error("useAppShell must be used within AppShell");return e}],59665)},27648,e=>{"use strict";var a=e.i(18050),s=e.i(93957),t=e.i(71192);e.s(["default",0,function({className:e=""}){let i=(0,t.useUserStore)(e=>e.identity),r=(0,t.useUserStore)(e=>e.openLoginModal),l=(0,t.useUserStore)(e=>e.logoutUser);return(0,a.jsxs)("div",{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,a.jsxs)("div",{className:"user-info",children:[(0,a.jsx)("img",{className:"user-avatar-img",src:(0,s.generateAvatar)(i?.address,i?.avatar),alt:"avatar"}),(0,a.jsx)("span",{className:"user-name",title:i?.address,children:i?.displayName||"未登录"})]}),i?(0,a.jsx)("button",{className:"btn btn-ghost logout-btn",onClick:l,children:"退出"}):(0,a.jsx)("button",{className:"btn btn-primary login-btn",onClick:r,children:"登录"})]})}])},39626,e=>{"use strict";var a=e.i(18050);let s=(0,e.i(56420).default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var t=e.i(59665);e.s(["default",0,function({label:e="打开侧边栏",className:i="",variant:r="primary"}){let{isSidebarVisible:l,openSidebar:n}=(0,t.useAppShell)();return l?null:(0,a.jsxs)("button",{type:"button",className:`btn ${"primary"===r?"btn-primary":""} sidebar-open-hint ${i}`.trim(),onClick:n,children:[(0,a.jsx)(s,{size:16}),e]})}],39626)},79490,11028,27668,e=>{"use strict";let a=(0,e.i(56420).default)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);e.s(["Edit2",0,a],79490);var s=e.i(18050),t=e.i(71645),i=e.i(26091),r=e.i(12796),l=e.i(51921),n=e.i(63676),o=e.i(26913);e.s(["default",0,function({item:e,isBackendReady:a,getFileDownloadUrl:c,onClose:d}){let[u,m]=(0,t.useState)(""),[p,h]=(0,t.useState)(!1),[f,x]=(0,t.useState)(""),[j,g]=(0,t.useState)("");return(0,t.useEffect)(()=>{if("text"!==e.subtype)return;let s=!1;return(m(""),g(""),a)?(h(!0),(async()=>{try{let a=await fetch(c(e.cid),{headers:{...await (0,o.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`),Range:"bytes=0-9999"}});if(!a.ok)throw Error("加载失败");let t=await a.text();s||m(t||"(文件为空)")}catch{s||m("加载失败")}finally{s||h(!1)}})(),()=>{s=!0}):void m("加载失败")},[c,a,e.cid,e.subtype]),(0,t.useEffect)(()=>{var s;if("image"!==(s=e.subtype)&&"video"!==s&&"audio"!==s)return void x("");if(x(""),g(""),!a)return void g("加载失败");let t="",i=!1;return(async()=>{try{let a=await fetch(c(e.cid),{headers:await (0,o.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`)});if(!a.ok)throw Error("加载失败");let s=URL.createObjectURL(await a.blob());t=s,i||x(s)}catch{i||g("加载失败")}})(),()=>{i=!0,t&&URL.revokeObjectURL(t)}},[c,a,e.cid,e.subtype]),(0,s.jsxs)("div",{className:"preview-overlay",onClick:d,children:[(0,s.jsx)("button",{type:"button",className:"preview-close",onClick:d,"aria-label":"关闭预览",children:(0,s.jsx)(n.X,{size:20})}),(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),children:["image"===e.subtype&&(0,s.jsx)("div",{className:"preview-media-wrapper",children:f?(0,s.jsx)("img",{src:f,alt:e.fileName}):j?(0,s.jsxs)("div",{className:"preview-unsupported",children:[(0,s.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,s.jsx)("p",{children:e.fileName}),(0,s.jsx)("p",{className:"preview-unsupported-hint",children:j})]}):(0,s.jsx)("div",{className:"preview-loading",children:(0,s.jsx)("div",{className:"preview-loading-spinner"})})}),"video"===e.subtype&&(0,s.jsx)("div",{className:"preview-media-wrapper",children:f?(0,s.jsx)("video",{src:f,controls:!0}):j?(0,s.jsxs)("div",{className:"preview-unsupported",children:[(0,s.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,s.jsx)("p",{children:e.fileName}),(0,s.jsx)("p",{className:"preview-unsupported-hint",children:j})]}):(0,s.jsx)("div",{className:"preview-loading",children:(0,s.jsx)("div",{className:"preview-loading-spinner"})})}),"audio"===e.subtype&&(0,s.jsxs)("div",{className:"preview-audio",children:[(0,s.jsx)("div",{className:"preview-audio-icon",children:(0,s.jsx)(l.Music,{size:36,color:"var(--accent)"})}),(0,s.jsx)("p",{className:"preview-audio-filename",children:e.fileName}),f?(0,s.jsx)("audio",{className:"preview-audio-player",src:f,controls:!0}):(0,s.jsx)("div",{className:"preview-text-loading",children:j?(0,s.jsx)("p",{children:j}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.Loader,{size:24,className:"preview-text-spinner"}),(0,s.jsx)("p",{children:"正在加载音频预览..."})]})})]}),"file"===e.subtype&&(0,s.jsxs)("div",{className:"preview-unsupported",children:[(0,s.jsx)(i.FileText,{size:48,className:"preview-file-icon"}),(0,s.jsx)("p",{children:e.fileName}),(0,s.jsx)("p",{className:"preview-unsupported-hint",children:"无法预览"})]}),"text"===e.subtype&&(0,s.jsxs)("div",{className:"preview-text-container",children:[(0,s.jsx)("div",{className:"preview-text-header",children:(0,s.jsx)("span",{children:e.fileName})}),p?(0,s.jsxs)("div",{className:"preview-text-loading",children:[(0,s.jsx)(r.Loader,{size:24,className:"preview-text-spinner"}),(0,s.jsx)("p",{children:"正在加载文本预览..."}),(0,s.jsx)("p",{className:"preview-text-loading-hint",children:"如果是初次预览,可能需要等待 P2P 网络同步"})]}):(0,s.jsx)("pre",{className:"preview-text",children:u||"(文件为空)"})]})]})]})}],11028);var c=e.i(64621);let d="链接格式不正确,请粘贴完整的 most://<cid>?filename=... 分享链接。",u="暂时没有发现在线种子。请确认分享者或其他下载者仍在线做种,稍后再检测。",m={"Link must be a valid most:// URL":"链接无法解析,请粘贴完整的 most://<cid>?filename=... 分享链接。","Link must use most:// protocol":"链接协议不正确,应以 most:// 开头。","Link path is not supported":"链接里不应包含路径,请使用 most://<cid>?filename=... 格式。","Invalid CID format":"CID 无效,请确认 most:// 后面的内容没有缺失或被截断。","Invalid CID format: CID v1 required":"CID 格式不符合 MostBox 要求,请确认分享链接完整。","CID digest must be 32 bytes":"CID 格式不符合 MostBox 要求,请确认分享链接完整。","filename is required":"链接缺少 filename 参数,请复制完整分享链接后再检测。"};e.s(["getDownloadCheckErrorMessageFromPayload",0,function(e={},a=""){if("TimeoutError"===a)return"检测等待超时,暂时没有等到在线种子响应。请确认分享者或其他下载者仍在线做种,稍后再检测。";if(!e.status)return"无法连接本地节点,请确认 MostBox 后端正在运行后再检测。";if(404===e.status)return"当前后端还没有检测接口,请重启 MostBox 后端后再试。";switch(e.code){case"VALIDATION_ERROR":return d;case"CONFLICT":return e.error?`${e.error},请先处理同名文件后再下载。`:"下载目录已有同名文件,请先重命名或移走后再检测。";case"PEER_NOT_FOUND":return u;case"PERMISSION_ERROR":return e.error?`下载目录不可写:${e.error}`:"下载目录不可写,请检查目录权限后再检测。";case"ENGINE_NOT_INITIALIZED":return"本地节点还没有启动完成,请稍等几秒后重新检测。"}return 503===e.status?u:e.status>=500?"本地节点检测时出错,请稍后重试或查看节点日志。":e.error?`检测未通过:${e.error}`:"检测未通过,请确认链接完整、发布者在线且本机网络正常。"},"getDownloadLinkValidationMessage",0,function(e=""){let a=String(e||"").trim();if(!a)return"请先粘贴 most:// 分享链接。";let s=function(e){let a;if(!e||"string"!=typeof e)return{cid:"",error:"Link must be a non-empty string"};try{a=new URL(e)}catch{return{cid:"",error:"Link must be a valid most:// URL"}}if("most:"!==a.protocol)return{cid:"",error:"Link must use most:// protocol"};if(a.pathname&&"/"!==a.pathname)return{cid:"",error:"Link path is not supported"};let s=a.hostname,t=a.searchParams.get("filename"),i=[...a.searchParams.keys()].find(e=>"filename"!==e),r=function(e){let a;if(!e||"string"!=typeof e)return{valid:!1,error:"CID must be a non-empty string"};try{a=c.CID.parse(e)}catch{return{valid:!1,error:"Invalid CID format"}}return 1!==a.version?{valid:!1,error:"Invalid CID format: CID v1 required"}:32!==a.multihash.digest.length?{valid:!1,error:"CID digest must be 32 bytes"}:{valid:!0}}(s);return r.valid?t&&t.trim()?i?{cid:"",error:`Unsupported query parameter: ${i}`}:{cid:s,fileName:t}:{cid:"",error:"filename is required"}:{cid:"",error:r.error}}(a);if(!s.error)return s.fileName?.trim()?null:m["filename is required"];if(s.error.startsWith("Unsupported query parameter: ")){let e=s.error.slice(29);return`链接包含暂不支持的参数 ${e},请只保留 filename。`}return m[s.error]||d}],27668)},27627,e=>{"use strict";var a=e.i(18050),s=e.i(71645),t=e.i(25981),i=e.i(35965),r=e.i(96699),l=e.i(73474),n=e.i(67927),o=e.i(26091),c=e.i(63676),d=e.i(89664),u=e.i(8734),m=e.i(62368),p=e.i(56420);let h=(0,p.default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),f=(0,p.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),x=(0,p.default)("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]);var j=e.i(66595),g=e.i(79490),v=e.i(12796),b=e.i(11241),y=e.i(10818),w=e.i(59665),N=e.i(61507),k=e.i(39626),C=e.i(27648),M=e.i(11028),S=e.i(40616);e.i(4121);var F=e.i(57667),$=e.i(88361),z=e.i(47910),E=e.i(26913),L=e.i(27668),D=e.i(3593),T=e.i(71192),I=e.i(5142),A=e.i(6933);async function R(e){let a=await (0,E.getApiErrorPayload)(e),s=e&&"object"==typeof e&&"name"in e?String(e.name):"";return(0,L.getDownloadCheckErrorMessageFromPayload)(a,s)}let U={listPublishedFiles:()=>E.api.get("/api/files").json(),listTrashFiles:()=>E.api.get("/api/trash").json(),deletePublishedFile:e=>E.api.delete(`/api/files/${e}`).json(),restoreTrashFile:e=>E.api.post(`/api/trash/${e}/restore`).json(),permanentDeleteTrashFile:e=>E.api.delete(`/api/trash/${e}`).json(),emptyTrash:()=>E.api.delete("/api/trash").json(),toggleStar:e=>E.api.post(`/api/files/${e}/star`).json(),getConfig:()=>E.api.get("/api/config").json(),getDataPath:()=>E.api.get("/api/config/data-path").json(),getNetworkAddresses:()=>E.api.get("/api/network").json(),saveConfig:e=>E.api.post("/api/config",{json:e}).json(),async publishFile(e,a){let s=new FormData;s.append("file",e,a||e.name);let t=await E.api.post("/api/publish",{body:s});if(!t.ok)throw Error((await t.json().catch(()=>({error:t.statusText}))).error||"Request failed");return t.json()},checkDownload:e=>E.api.post("/api/download/check",{json:{link:e},timeout:15e3}).json(),downloadFile:e=>E.api.post("/api/download",{json:{link:e}}).json(),cancelDownload:e=>E.api.post("/api/download/cancel",{json:{taskId:e}}).json(),getFileDownloadUrl:e=>(0,E.getApiUrl)(`/api/files/${e}/download`),moveFile:(e,a)=>E.api.post("/api/move",{json:{cid:e,newFileName:a}}).json(),renameFolder:(e,a)=>E.api.post("/api/folder/rename",{json:{oldPath:e,newPath:a}}).json()};function P(e){return!e||e<=0?"0 B":e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:e<0x40000000?`${(e/1048576).toFixed(1)} MB`:`${(e/0x40000000).toFixed(2)} GB`}function O(e){return(0,N.parseAppFileName)(e)}e.s(["default",0,function(){let e,p,q,V=(0,D.useAppStore)(e=>e.isDarkMode),B=(0,D.useAppStore)(e=>e.setIsDarkMode),H=(0,D.useAppStore)(e=>e.addToast),_=(0,D.useAppStore)(e=>e.hasBackend),W=(0,D.useAppStore)(e=>e.openConnectModal),X=(0,T.useUserStore)(e=>e.identity),G=(0,T.useUserStore)(e=>e.openLoginModal),[K,Z]=(0,s.useState)([]),[J,Q]=(0,s.useState)([]),[Y,ee]=(0,s.useState)(null),[ea,es]=(0,s.useState)("all"),[et,ei]=(0,s.useState)(!1),[er,el]=(0,s.useState)([]),[en,eo]=(0,s.useState)(null),[ec,ed]=(0,s.useState)(null),[eu,em]=(0,I.useDisclosure)(!1),[ep,eh]=(0,s.useState)(""),[ef,ex]=(0,s.useState)(null),[ej,eg]=(0,s.useState)(!1),[ev,eb]=(0,s.useState)([]),[ey,ew]=(0,I.useDisclosure)(!1),[eN,ek]=(0,s.useState)(""),{copy:eC,copied:eM}=function(e={}){let a=e.timeout??2e3,[t,i]=(0,s.useState)(null),[r,l]=(0,s.useState)(!1),n=(0,s.useRef)(null);return(0,s.useEffect)(()=>()=>{window.clearTimeout(n.current)},[]),{copy:e=>{"clipboard"in navigator?navigator.clipboard.writeText(e).then(()=>{i(null),window.clearTimeout(n.current),n.current=window.setTimeout(()=>l(!1),a),l(!0)}).catch(e=>i(e)):i(Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{l(!1),i(null),window.clearTimeout(n.current)},error:t,copied:r}}({timeout:2e3}),[eS,eF]=(0,I.useDisclosure)(!1),[e$,ez]=(0,s.useState)(null),[eE,eL]=(0,s.useState)(null),[eD,eT]=(0,s.useState)(!1),eI=!0===_,eA=Y||"",eR=(e=new Set,K.forEach(a=>{let{folder:s}=O(a.fileName),t=s.split("/").filter(Boolean),i="";for(let a of t)i+=(i?"/":"")+a,e.add(i)}),[...e].sort()),{folders:eU,files:eP}={folders:(p=eA?eA+"/":"",eR.filter(e=>{let a=e.toLowerCase().startsWith(p.toLowerCase()),s=e.substring(p.length);return a&&!s.includes("/")}).map(e=>({name:e.substring(p.length),path:e}))),files:K.filter(e=>O(e.fileName).folder===eA)};function eO(){return!!eI||(W(),!1)}function eq(){return!!X||(G(),!1)}let eV=eN?K.filter(e=>O(e.fileName).name.toLowerCase().includes(eN.toLowerCase())):eP,eB=async()=>{if(!eI||!X)return void Z([]);try{let e=await U.listPublishedFiles();Z(e||[])}catch{Z([])}},eH=async()=>{if(!eI||!X)return void Q([]);try{let e=await U.listTrashFiles();Q(e||[])}catch{Q([])}},e_=e=>{el(a=>a.includes(e)?a.filter(a=>a!==e):[...a,e])},eW=async e=>{if(eq()&&eO())try{await U.restoreTrashFile(e),H("已恢复","success"),eB(),eH()}catch(e){H(await (0,E.getApiErrorMessage)(e,"恢复失败"),"error")}},eX=async()=>{!eq()||eO()&&ez({title:"清空回收站",message:"确定要清空回收站吗?此操作不可恢复!",confirmText:"清空",danger:!0,onConfirm:async()=>{ez(null);try{await U.emptyTrash(),H("回收站已清空","success"),eH()}catch(e){H(await (0,E.getApiErrorMessage)(e,"清空失败"),"error")}}})},eG=async e=>{if(eq()&&eO())try{let a=await U.toggleStar(e);Z(s=>s.map(s=>s.cid===e?{...s,starred:a.starred}:s)),H(a.starred?"已收藏":"已取消收藏","success")}catch(e){H(await (0,E.getApiErrorMessage)(e,"操作失败"),"error")}},eK=async()=>{if(!eq()||!eO())return;let e="trash"===ea;ez({title:e?"永久删除":"批量删除",message:e?`确定要永久删除选中的 ${er.length} 个项目吗?此操作不可恢复!`:`确定要删除选中的 ${er.length} 个项目吗?`,confirmText:e?"永久删除":"删除",danger:!0,onConfirm:async()=>{ez(null);try{for(let a of er)e?await U.permanentDeleteTrashFile(a):a.startsWith("__")||await U.deletePublishedFile(a);el([]),H(e?"已永久删除":"已删除","success"),eB(),eH()}catch(e){H(await (0,E.getApiErrorMessage)(e,"删除失败"),"error")}}})},eZ=async e=>{if(eq()&&eO())try{for(let a of er){let s=K.find(e=>e.cid===a);if(!s)continue;let{name:t}=O(s.fileName),i=e?`${e}/${t}`:t;s.fileName!==i&&await U.moveFile(a,i)}el([]),eF.close(),H("已移动","success"),eB()}catch(e){H(await (0,E.getApiErrorMessage)(e,"移动失败"),"error")}},eJ=e=>{let a=!!e.path,s=a?e.name:O(e.fileName).name;eL({title:a?"重命名文件夹":"重命名文件",placeholder:"请输入新名称",defaultValue:s,confirmText:"重命名",onConfirm:async t=>{if(t!==s&&eq()&&eO()){eT(!0);try{if(a){let a=e.path.lastIndexOf("/"),s=-1!==a?e.path.substring(0,a):"",i=s?`${s}/${t}`:t;await U.renameFolder(e.path,i),H("已重命名","success"),eB(),e7(i)}else{let{folder:a}=O(e.fileName),s=a?`${a}/${t}`:t;await U.moveFile(e.cid,s),H("已重命名","success"),eB()}eL(null)}catch(e){H(await (0,E.getApiErrorMessage)(e,"重命名失败"),"error")}finally{eT(!1)}}}})},eQ=async e=>{if(!X){G(),H("请先登录后发布文件","warning");return}if(!eO())return;let a=eA?eA+"/":"",s=[];for(let t of Array.from(e)){let e=a+t.name;if(K.some(a=>a.fileName===e)){H(`${t.name} 已存在`,"warning");continue}let i=`upload_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,r={id:i,fileName:t.name,progress:0,type:"upload",status:"uploading"};s.push(r),eb(e=>[...e,r]),s.length>0&&ew.open();try{(await U.publishFile(t,e)).alreadyExists?(eb(e=>e.map(e=>e.id===i?{...e,status:"completed"}:e)),H(`${t.name} 已存在`,"warning")):(eb(e=>e.map(e=>e.id===i?{...e,progress:100,status:"completed"}:e)),H(`${t.name} 已添加到本地`,"success"))}catch(e){eb(e=>e.map(e=>e.id===i?{...e,status:"error"}:e)),H(await (0,E.getApiErrorMessage)(e,`发布失败: ${t.name}`),"error")}}setTimeout(()=>{eb(e=>e.filter(e=>"completed"!==e.status&&"error"!==e.status&&"cancelled"!==e.status))},3e3),eB()},[eY,e0]=(0,s.useState)(!1),e1=ep.trim(),e2=ef?.status==="success"&&ef.link===e1,e6=()=>{em.close(),ex(null)},e4=async()=>{let e=(0,L.getDownloadLinkValidationMessage)(e1);if(e){ex({status:"error",link:e1,message:e}),H(e,"warning");return}if(!ej&&!eY&&eq()&&eO()){eg(!0),ex(null);try{let e=await U.checkDownload(e1),a=e.alreadyExists?`${e.fileName} 已在本机`:`${e.fileName} 可下载`;ex({status:"success",link:e1,message:a}),H(e.alreadyExists?`${e.fileName} 已存在`:"检测通过",e.alreadyExists?"warning":"success")}catch(a){let e=await R(a);ex({status:"error",link:e1,message:e}),H(e,"error")}finally{eg(!1)}}},e5=async()=>{if(!X){G(),H("请先登录后下载文件","warning");return}if(!eO())return;let e=(0,L.getDownloadLinkValidationMessage)(e1);if(e)return void H(e,"warning");if(!e2)return void H("请先检测链接可用性","warning");if(!eY){e0(!0);try{let e=await U.downloadFile(e1);if(eh(""),ex(null),e6(),e.alreadyExists)H(`${e.fileName} 已存在`,"warning");else{let a={id:e.taskId,fileName:"下载文件",progress:0,type:"download",status:"downloading"};eb(e=>[...e,a]),ew.open(),H("下载已开始","info")}}catch(e){H(await (0,E.getApiErrorMessage)(e,"下载失败"),"error")}finally{e0(!1)}}},e9=async e=>{if(eq()&&eO()&&"download"===e.type&&"downloading"===e.status){eb(a=>a.map(a=>a.id===e.id?{...a,status:"cancelling"}:a));try{await U.cancelDownload(e.id)}catch(a){eb(a=>a.map(a=>a.id===e.id?{...a,status:"downloading"}:a)),H(await (0,E.getApiErrorMessage)(a,"取消失败"),"error")}}},e3=async e=>{if(eq()&&eO())try{let a=await fetch(U.getFileDownloadUrl(e.cid),{headers:await (0,E.getApiRequestHeaders)("GET",`/api/files/${e.cid}/download`)});if(!a.ok)throw Error("获取文件失败");let s=await a.blob(),t=window.showSaveFilePicker;if(t){let a=await t({suggestedName:e.fileName}),i=await a.createWritable();await i.write(s),await i.close(),H("文件已保存","success")}else{let a=URL.createObjectURL(s),t=document.createElement("a");t.href=a,t.download=e.fileName,document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(a),H("文件已下载","success")}}catch(e){"AbortError"!==e.name&&H("保存失败: "+e.message,"error")}},e7=e=>{ee(e||null),el([])};(0,s.useEffect)(()=>{if(!0!==_)return;let e=null,a=!1;return(async()=>{if(e=new WebSocket(await (0,E.getAuthenticatedWebSocketUrl)("/ws")),a)return e.close();e.onmessage=e=>{try{let{event:a,data:s}=JSON.parse(e.data);if("publish:success"===a||"download:success"===a){eB();let e=s.taskId||s.fileName;eb(a=>a.map(a=>a.id===e||a.fileName===s.fileName?{...a,progress:100,status:"completed"}:a)),"download:success"===a&&(s.alreadyExists?H(`${s.fileName} 已存在`,"warning"):H(`${s.fileName} 下载完成`,"success"),setTimeout(()=>{eb(a=>a.filter(a=>a.id!==e||"completed"!==a.status))},3e3))}"publish:progress"===a&&eb(e=>e.map(e=>{if(s.file&&e.fileName===s.file&&"upload"===e.type){let a=50;return"calculating-cid"===s.stage?a=25:"uploading"===s.stage?a=75:"complete"===s.stage&&(a=100),{...e,progress:a}}return e})),"download:progress"===a&&eb(e=>e.map(e=>e.id===s.taskId?{...e,progress:s.percent||0,loaded:s.loaded,total:s.total}:e)),"download:error"===a&&(eb(e=>e.map(e=>e.id===s.taskId?{...e,status:"error"}:e)),H(`下载失败: ${s.error}`,"error")),"download:status"===a&&eb(e=>e.map(e=>e.id===s.taskId?{...e,fileName:s.file||e.fileName}:e)),"download:cancelled"===a&&(eb(e=>e.map(e=>e.id===s.taskId?{...e,status:"cancelled"}:e)),H("下载已取消","warning"))}catch(e){console.warn("[App WS] Failed to parse message:",e.message)}}})(),()=>{a=!0,e?.close()}},[_,X?.address]),(0,s.useEffect)(()=>{if(!0===_&&X){eB(),eH();return}!1===_&&(Z([]),Q([]))},[_,X?.address]),(0,s.useEffect)(()=>{X||(el([]),eo(null),ed(null),eh(""),ex(null),eb([]),ek(""),ee(null),es("all"))},[X?.address]);let e8="all"===ea?eV:"starred"===ea?K.filter(e=>e.starred&&O(e.fileName).name.toLowerCase().includes(eN.toLowerCase())):J.filter(e=>O(e.fileName).name.toLowerCase().includes(eN.toLowerCase())),ae="starred"===ea?[]:eU.filter(e=>e.name.toLowerCase().includes(eN.toLowerCase())),aa=eA?[{path:"",name:"全部内容"},...eA.split("/").filter(Boolean).map((e,a,s)=>({path:s.slice(0,a+1).join("/"),name:e}))]:[];return(0,a.jsxs)(w.default,{sidebar:({closeSidebar:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"sidebar-header sidebar-header-link",onClick:()=>window.location.href="/",children:[(0,a.jsx)(b.ArrowLeft,{size:18}),(0,a.jsx)("h1",{children:"MOST PEOPLE"})]}),(0,a.jsx)("nav",{className:"sidebar-nav",children:[{id:"all",icon:(0,a.jsx)(x,{size:18}),label:"本地"},{id:"starred",icon:(0,a.jsx)(f,{size:18}),label:"收藏"},{id:"trash",icon:(0,a.jsx)(l.Trash2,{size:18}),label:"回收站"}].map(s=>(0,a.jsxs)("button",{onClick:()=>{es(s.id),ee(null),el([]),ek(""),e()},className:`sidebar-nav-btn ${ea===s.id?"active":""}`,children:[s.icon,(0,a.jsx)("span",{children:s.label})]},s.id))}),(0,a.jsx)(C.default,{})]}),headerTitle:(0,a.jsx)("h2",{className:"header-title",children:"all"===ea?"本地":"starred"===ea?"收藏":"回收站"}),headerRight:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"search-box",children:[(0,a.jsx)(j.Search,{size:14}),(0,a.jsx)("input",{type:"text",value:eN,onChange:e=>ek(e.target.value),placeholder:"搜索..."}),eN&&(0,a.jsx)("button",{onClick:()=>ek(""),children:(0,a.jsx)(c.X,{size:12})})]}),"trash"===ea&&J.length>0&&(0,a.jsx)("button",{onClick:eX,className:"btn btn-sm btn-empty-trash",children:"清空回收站"}),(0,a.jsx)("button",{onClick:()=>ew.open(),className:"btn btn-icon",children:(0,a.jsx)(h,{size:16})}),(0,a.jsx)("button",{onClick:()=>B(!V),className:"btn btn-icon",children:V?(0,a.jsx)(i.Sun,{size:16}):(0,a.jsx)(r.Moon,{size:16})})]}),children:["all"===ea&&(0,a.jsxs)("div",{className:"action-grid",children:[(0,a.jsxs)("div",{className:`action-card upload ${et?"drag-over":""}`,onDragOver:e=>{e.preventDefault(),ei(!0)},onDragLeave:()=>ei(!1),onDrop:e=>{e.preventDefault(),ei(!1),eq()&&eO()&&eQ(e.dataTransfer.files)},children:[(0,a.jsx)("input",{type:"file",multiple:!0,onClick:e=>{eq()&&eO()||e.preventDefault()},onChange:e=>eQ(e.target.files),className:"action-card-input"}),(0,a.jsx)(t.Upload,{size:20,className:"action-grid-icon"}),(0,a.jsx)("p",{children:"发布文件"})]}),(0,a.jsxs)("div",{className:"action-card action-card-download",onClick:()=>{eq()&&eO()&&em.open()},children:[(0,a.jsx)(m.Download,{size:20,className:"action-grid-icon"}),(0,a.jsx)("p",{children:"下载文件"})]})]}),"all"===ea&&(0,a.jsx)("div",{className:"breadcrumb",children:eA?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>e7(""),children:"全部内容"}),aa.slice(1).map((e,t)=>(0,a.jsxs)(s.default.Fragment,{children:[(0,a.jsx)(n.ChevronRight,{size:12}),(0,a.jsx)("button",{onClick:()=>e7(e.path),className:t===aa.length-2?"current":"",children:e.name}),t===aa.length-2&&(0,a.jsx)("button",{onClick:()=>eJ(e),className:"breadcrumb-edit-btn",children:(0,a.jsx)(g.Edit2,{size:12})})]},e.path))]}):null}),(0,a.jsxs)("div",{className:"content-grid",children:["trash"===ea&&(0===e8.length?(0,a.jsxs)("div",{className:"empty-state app-empty-state",children:[(0,a.jsx)("p",{children:eN?"未找到相关文件":"回收站是空的"}),(0,a.jsx)(k.default,{label:"打开文件导航"})]}):(0,a.jsx)("div",{className:"file-grid",children:e8.map(e=>{var s;return(0,a.jsxs)("div",{onClick:()=>el(a=>a.includes(e.cid)?a.filter(a=>a!==e.cid):[...a,e.cid]),onDoubleClick:()=>eW(e.cid),className:`card ${er.includes(e.cid)?"selected":""}`,children:[(0,a.jsx)("div",{className:"card-icon trash",children:(0,a.jsx)(o.FileText,{size:24,color:"#fff"})}),(0,a.jsx)("p",{className:"card-name",children:O(e.fileName).name}),(0,a.jsxs)("p",{className:"card-date",children:["删除于 ",(s=e.deletedAt)?new Date(s).toLocaleDateString("zh-CN"):""]})]},e.cid)})})),"trash"!==ea&&(0===e8.length&&0===ae.length?(0,a.jsxs)("div",{className:"empty-state app-empty-state",children:[(0,a.jsx)("p",{children:eN?"未找到相关文件":"starred"===ea?"暂无的收藏":"暂无本地文件"}),(0,a.jsx)(k.default,{label:"打开文件导航"})]}):(0,a.jsxs)("div",{className:"file-grid",children:[ae.map(e=>(0,a.jsx)(N.FolderCard,{folder:e,onClick:()=>e7(e.path)},e.path)),e8.map(e=>(0,a.jsx)(N.FileCard,{file:e,isSelected:er.includes(e.cid),onSelect:e_,onPreview:e=>eo({...e,subtype:(0,A.getFileSubtype)(e.fileName)})},e.cid))]}))]}),e$&&(0,a.jsx)($.ConfirmModal,{title:e$.title,message:e$.message,confirmText:e$.confirmText,danger:e$.danger,onConfirm:e$.onConfirm,onClose:()=>ez(null)}),eE&&(0,a.jsx)(z.InputModal,{title:eE.title,placeholder:eE.placeholder,defaultValue:eE.defaultValue,confirmText:eE.confirmText,isLoading:eD,onConfirm:eE.onConfirm,onClose:()=>eL(null)}),eS&&(0,a.jsx)(S.MoveModal,{items:er.map(e=>K.find(a=>a.cid===e)).filter(Boolean),allFolders:eR.map(e=>({path:e,name:e.split("/").pop()})),currentPath:eA,onMove:eZ,onClose:()=>eF.close()}),ec&&(0,a.jsx)(F.ModalOverlay,{onClose:()=>ed(null),children:(0,a.jsxs)("div",{className:"share-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"分享链接"}),(0,a.jsx)("button",{onClick:()=>ed(null),className:"btn btn-icon",children:(0,a.jsx)(c.X,{size:18})})]}),(0,a.jsxs)("div",{className:"share-link-box",children:[(0,a.jsx)("div",{className:"share-link-text",children:`most://${ec.cid}?filename=${encodeURIComponent(ec.fileName)}`}),(0,a.jsx)("button",{onClick:()=>{eC(`most://${ec.cid}?filename=${encodeURIComponent(ec.fileName)}`)},className:`btn btn-circle btn-primary ${eM?"copied":""}`,children:eM?(0,a.jsx)(d.Check,{size:18}):(0,a.jsx)(u.Copy,{size:18})})]}),(0,a.jsx)("div",{className:"share-storage-note",children:(0,a.jsx)("span",{children:"本机在线时可下载;下载者完成后会默认继续做种。"})})]})}),eu&&(0,a.jsx)(F.ModalOverlay,{onClose:e6,children:(0,a.jsxs)("div",{className:"download-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"下载文件"}),(0,a.jsx)("button",{onClick:e6,className:"btn btn-icon",children:(0,a.jsx)(c.X,{size:18})})]}),(0,a.jsxs)("div",{className:"download-link-row",children:[(0,a.jsx)("input",{type:"text",className:"input",value:ep,onChange:e=>{eh(e.target.value),ex(null)},placeholder:"输入 most:// 链接"}),(0,a.jsxs)("button",{type:"button",onClick:e4,disabled:!e1||ej||eY,className:"btn btn-secondary download-check-btn",children:[ej?(0,a.jsx)(v.Loader,{size:14,className:"spin"}):e2?(0,a.jsx)(d.Check,{size:14}):(0,a.jsx)(j.Search,{size:14}),ej?"检测中...":e2?"已通过":"检测"]})]}),ef&&(0,a.jsxs)("div",{className:`download-check-status ${ef.status}`,children:["success"===ef.status?(0,a.jsx)(d.Check,{size:14}):(0,a.jsx)(y.Info,{size:14}),(0,a.jsx)("span",{children:ef.message})]}),(0,a.jsxs)("button",{onClick:e5,disabled:!e2||eY||ej,className:"btn btn-info btn-full",children:[eY?(0,a.jsx)(v.Loader,{size:14,className:"spin"}):(0,a.jsx)(m.Download,{size:14}),eY?"下载中...":"开始下载"]})]})}),en&&(0,a.jsx)(M.default,{item:en,isBackendReady:eI,getFileDownloadUrl:U.getFileDownloadUrl,onClose:()=>eo(null)}),er.length>0&&(0,a.jsxs)("div",{className:"batch-bar",children:[(0,a.jsxs)("span",{className:"batch-info",children:["已选 ",er.length," 项"]}),(0,a.jsx)("button",{onClick:()=>el([]),className:"batch-dismiss",children:(0,a.jsx)(c.X,{size:16})}),(0,a.jsx)("div",{className:"batch-divider"}),"trash"===ea?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:async()=>{!eq()||eO()&&(await Promise.all(er.map(e=>U.restoreTrashFile(e))),el([]),H("已恢复","success"),eB(),eH())},className:"btn btn-sm",children:"恢复"}),(0,a.jsx)("button",{onClick:eK,className:"btn btn-sm btn-danger",children:"永久删除"})]}):(0,a.jsxs)(a.Fragment,{children:[1===er.length&&(q=K.find(e=>e.cid===er[0]))&&"file"!==(0,A.getFileSubtype)(q.fileName)&&(0,a.jsx)("button",{onClick:()=>{let e=K.find(e=>e.cid===er[0]);if(e){let a=(0,A.getFileSubtype)(e.fileName);eo({...e,subtype:a})}},className:"btn btn-sm",children:"预览"}),(0,a.jsx)("button",{onClick:()=>{let e=er.some(e=>{let a=K.find(a=>a.cid===e);return a&&!a.starred});er.forEach(a=>{let s=K.find(e=>e.cid===a);s&&(e?!s.starred:s.starred)&&eG(a)})},className:"btn btn-sm btn-star",children:"收藏"}),1===er.length&&(0,a.jsx)("button",{onClick:()=>{let e=K.find(e=>e.cid===er[0]);e&&eJ(e)},className:"btn btn-sm",children:"重命名"}),(0,a.jsx)("button",{onClick:()=>eF.open(),className:"btn btn-sm btn-move",children:"移动"}),(0,a.jsx)("button",{onClick:eK,className:"btn btn-sm btn-danger",children:"删除"}),1===er.length&&(0,a.jsx)("button",{onClick:()=>ed(K.find(e=>e.cid===er[0])),className:"btn btn-sm",children:"分享"}),1===er.length&&(0,a.jsx)("button",{onClick:()=>{let e=K.find(e=>e.cid===er[0]);e&&e3(e)},className:"btn btn-sm",children:"另存为"})]})]}),ey&&(0,a.jsx)(F.ModalOverlay,{onClose:()=>ew.close(),children:(0,a.jsxs)("div",{className:"transfer-modal",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"modal-header",children:[(0,a.jsx)("h3",{children:"传输"}),(0,a.jsx)("button",{onClick:()=>ew.close(),className:"btn btn-icon",children:(0,a.jsx)(c.X,{size:18})})]}),0===ev.length?(0,a.jsx)("div",{className:"empty-transfer",children:"暂无传输"}):ev.map(e=>(0,a.jsxs)("div",{className:"transfer-item",children:[(0,a.jsxs)("div",{className:"transfer-item-header",children:["upload"===e.type?(0,a.jsx)(t.Upload,{size:14}):(0,a.jsx)(m.Download,{size:14}),(0,a.jsx)("span",{className:"transfer-item-name",children:e.fileName}),"downloading"===e.status&&"download"===e.type&&(0,a.jsx)("button",{onClick:()=>e9(e),className:"transfer-item-cancel",children:(0,a.jsx)(c.X,{size:14})})]}),(0,a.jsxs)("div",{className:"transfer-progress-row",children:[(0,a.jsx)("progress",{className:`transfer-progress-meter ${"download"===e.type?"download":""} ${"error"===e.status?"error":""} ${"cancelled"===e.status?"cancelled":""}`,value:Math.max(0,Math.min(100,e.progress)),max:100,"aria-label":`${e.fileName} 传输进度`}),(0,a.jsx)("span",{className:"transfer-progress-text",children:"completed"===e.status?"完成":"error"===e.status?"失败":"cancelled"===e.status?"已取消":"cancelling"===e.status?"取消中":e.loaded&&e.total?`${P(e.loaded)}/${P(e.total)}`:`${e.progress}%`})]})]},e.id))]})})]})}],27627)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return i}});let i=e=>{}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return b},NormalizeError:function(){return x},PageNotFoundError:function(){return v},SP:function(){return p},ST:function(){return g},WEB_VITALS:function(){return a},execOnce:function(){return n},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return d},isAbsoluteUrl:function(){return s},isResSent:function(){return h},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return k}};for(var l in i)Object.defineProperty(r,l,{enumerable:!0,get:i[l]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return(...i)=>(r||(r=!0,t=e(...i)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>o.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function d(){let{href:e}=window.location,t=c();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let i=await e.getInitialProps(t);if(r&&h(r))return i;if(!i)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${i}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return i}let p="u">typeof performance,g=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class x extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class b extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function k(e){return JSON.stringify({message:e.message,stack:e.stack})}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={assign:function(){return s},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return o}};for(var l in i)Object.defineProperty(r,l,{enumerable:!0,get:i[l]});function a(e){let t={};for(let[r,i]of e.entries()){let e=t[r];void 0===e?t[r]=i:Array.isArray(e)?e.push(i):t[r]=[e,i]}return t}function n(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let e of i)t.append(r,n(e));else t.set(r,n(i));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,i]of r.entries())e.append(t,i)}return e}},18566,(e,t,r)=>{t.exports=e.r(76562)},41220,e=>{"use strict";let t=(0,e.i(56420).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,t],41220)},96661,5014,e=>{"use strict";let t=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();e.s(["mergeClasses",0,t],96661);var r=e.i(71645),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,r.createContext)({}),a=(0,r.forwardRef)(({color:e,size:a,strokeWidth:n,absoluteStrokeWidth:o,className:s="",children:c,iconNode:d,...u},h)=>{let{size:f=24,strokeWidth:m=2,absoluteStrokeWidth:p=!1,color:g="currentColor",className:y=""}=(0,r.useContext)(l)??{},x=o??p?24*Number(n??m)/Number(a??f):n??m;return(0,r.createElement)("svg",{ref:h,...i,width:a??f??i.width,height:a??f??i.height,stroke:e??g,strokeWidth:x,className:t("lucide",y,s),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(u)&&{"aria-hidden":"true"},...u},[...d.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(c)?c:[c]])});e.s(["default",0,a],5014)},56420,e=>{"use strict";var t=e.i(71645),r=e.i(96661);let i=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var l=e.i(5014);e.s(["default",0,(e,a)=>{let n=(0,t.forwardRef)(({className:n,...o},s)=>(0,t.createElement)(l.default,{ref:s,iconNode:a,className:(0,r.mergeClasses)(`lucide-${i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...o}));return n.displayName=i(e),n}],56420)},71192,11470,e=>{"use strict";var t=e.i(68834),r=e.i(66112);function i(e,t){let{address:i,danger:l}=(0,r.mostWallet)(e,t);return{username:e,address:i,danger:l,displayName:`${e}#${i.slice(-4).toUpperCase()}`}}function l(){if("u"<typeof localStorage)return null;try{let e=localStorage.getItem("mostbox_identity");if(!e)return null;return JSON.parse(e)}catch{return null}}function a(e){"u">typeof localStorage&&localStorage.setItem("mostbox_identity",JSON.stringify(e))}function n(){"u">typeof localStorage&&(localStorage.removeItem("mostbox_identity"),localStorage.removeItem("mostbox_guest_identity"))}function o(e){return e&&"object"==typeof e&&e.username&&e.address&&e.danger&&"匿名"!==e.username?{username:e.username,address:e.address,danger:e.danger,displayName:e.displayName?e.displayName:`${e.username}#${e.address.slice(-4).toUpperCase()}`,avatar:"string"==typeof e.avatar?e.avatar:void 0,identity:"user"===e.identity||"service"===e.identity||"service_ai"===e.identity?e.identity:void 0}:null}function s(){return{loginUsername:"",loginPassword:"",showPassword:!1,loginPreviewAddress:"",hasPreviewedAvatar:!1,loginLoading:!1,loginError:""}}e.s(["clearIdentity",0,n,"createLoginIdentity",0,i,"loadIdentity",0,l,"saveIdentity",0,a],11470);let c=(0,t.create)((e,t)=>({identity:null,wallet:void 0,showLoginModal:!1,loginUsername:"",loginPassword:"",showPassword:!1,loginPreviewAddress:"",hasPreviewedAvatar:!1,loginLoading:!1,loginError:"",initializeUser:()=>{let t=o(l());t||n(),e({identity:t,wallet:t||void 0})},openLoginModal:()=>{e({showLoginModal:!0,loginError:""})},closeLoginModal:()=>{e({showLoginModal:!1,...s()})},setLoginUsername:t=>{e({loginUsername:t,loginPreviewAddress:"",hasPreviewedAvatar:!1,loginError:""})},setLoginPassword:t=>{e({loginPassword:t,loginPreviewAddress:"",hasPreviewedAvatar:!1,loginError:""})},togglePassword:()=>{e(e=>({showPassword:!e.showPassword}))},previewLoginIdentity:()=>{let{loginUsername:r,loginPassword:l}=t();if(!r.trim()||!l.trim())return e({loginError:"请输入用户名和密码"}),null;let a=i(r.trim(),l);return e({loginPreviewAddress:a.address,hasPreviewedAvatar:!0,loginError:""}),a},loginUser:()=>{let{loginUsername:r,loginPassword:l,hasPreviewedAvatar:n}=t();if(!r.trim()||!l.trim())return e({loginError:"请输入用户名和密码"}),null;if(!n)return e({loginError:"请先预览并确认头像"}),null;e({loginLoading:!0,loginError:""});try{let t=i(r.trim(),l);return a(t),e({identity:t,wallet:t,showLoginModal:!1,...s()}),t}catch(t){return e({loginLoading:!1,loginError:t instanceof Error?t.message:"登录失败"}),null}},setUserIdentity:t=>{let r=o(t);r&&(a(r),e({identity:r,wallet:r}))},logoutUser:()=>{n(),e({identity:null,wallet:void 0})}}));e.s(["useUserStore",0,c],71192)},93957,e=>{"use strict";function t(e){return e.replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(e){return e^=e<<13,e^=e>>17,e^=e<<5}function i(e=""){let t=function(e){let t=0;for(let i=0;i<e.length;i++)t=r(t=(t<<5)-t+e.charCodeAt(i)|0);return t}(e=e.toString().slice(0,1024))||1,l=()=>t=r(t),a=(e,t)=>Math.floor((l()- -0x80000000)/0xffffffff*(t+1-e)+e);return{seed:e,next:l,bool:(e=50)=>a(1,100)<=e,integer:(e,t)=>a(e,t),pick(e,t){var r;return 0===e.length?(l(),t):null!=(r=e[a(0,e.length-1)])?r:t},shuffle(e){let t=i(l().toString()),r=[...e];for(let e=r.length-1;e>0;e--){let i=t.integer(0,e);[r[e],r[i]]=[r[i],r[e]]}return r},string(e,t="abcdefghijklmnopqrstuvwxyz1234567890"){let r=i(l().toString()),a="";for(let i=0;i<e;i++)a+=t[r.integer(0,t.length-1)];return a}}}function l(e){let t=e.attributes.viewBox.split(" "),r=parseInt(t[0]),i=parseInt(t[1]);return{x:r,y:i,width:parseInt(t[2]),height:parseInt(t[3])}}let a={type:"object",$schema:"http://json-schema.org/draft-07/schema#",properties:{seed:{type:"string"},flip:{type:"boolean",default:!1},rotate:{type:"integer",minimum:0,maximum:360,default:0},scale:{type:"integer",minimum:0,maximum:200,default:100},radius:{type:"integer",minimum:0,maximum:50,default:0},size:{type:"integer",minimum:1},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"}},backgroundType:{type:"array",items:{type:"string",enum:["solid","gradientLinear"]},default:["solid"]},backgroundRotation:{type:"array",items:{type:"integer",minimum:-360,maximum:360},default:[0,360]},translateX:{type:"integer",minimum:-100,maximum:100,default:0},translateY:{type:"integer",minimum:-100,maximum:100,default:0},clip:{type:"boolean",default:!0},randomizeIds:{type:"boolean",default:!1}}};function n(e){var t;let r={},i=null!=(t=e.properties)?t:{};return Object.keys(i).forEach(e=>{let t=i[e];"object"==typeof t&&void 0!==t.default&&(Array.isArray(t.default)?r[e]=[...t.default]:"object"==typeof t.default?r[e]={...t.default}:r[e]=t.default)}),r}function o(e){return"transparent"===e?e:`#${e}`}e.s([],56357),e.i(56357),e.s(["eyes",0,{bulging:(e,t)=>'<circle cx="28" cy="24" r="18" fill="#000" fill-opacity=".2"/><circle cx="74" cy="24" r="18" fill="#000" fill-opacity=".2"/><circle cx="28" cy="24" r="15" fill="#F1EEDA"/><circle cx="74" cy="24" r="15" fill="#F1EEDA"/><rect x="26" y="15" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/><rect x="74" y="15" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/>',dizzy:(e,t)=>'<path d="m25 27.2 5.5 5.5c.5.4 1.2.4 1.6 0l1.6-1.6c.4-.5.4-1.2 0-1.6L28.2 24l5.5-5.5c.4-.5.4-1.2 0-1.6l-1.6-1.6c-.5-.4-1.2-.4-1.6 0L25 20.8l-5.5-5.5c-.5-.4-1.2-.4-1.6 0l-1.6 1.6c-.4.4-.4 1.1 0 1.6l5.5 5.5-5.5 5.5c-.4.5-.4 1.2 0 1.6l1.6 1.6c.5.4 1.2.4 1.6 0l5.5-5.5ZM79 27.2l5.5 5.5c.5.4 1.2.4 1.6 0l1.6-1.6c.4-.5.4-1.2 0-1.6L82.2 24l5.5-5.5c.4-.5.4-1.2 0-1.6l-1.6-1.6c-.5-.4-1.2-.4-1.6 0L79 20.8l-5.5-5.5c-.5-.4-1.2-.4-1.6 0l-1.6 1.6c-.4.4-.4 1.1 0 1.6l5.5 5.5-5.5 5.5c-.4.5-.4 1.2 0 1.6l1.6 1.6c.5.4 1.2.4 1.6 0l5.5-5.5Z" fill="#000" fill-opacity=".8"/>',eva:(e,t)=>'<g fill-rule="evenodd" clip-rule="evenodd"><path d="M53 0c34.75 0 49 17.47 49 31 0 13.53-19.59 17-49 17-29.05 0-51-3.47-51-17S17.11 0 53 0Z" fill="#000" fill-opacity=".8"/><path d="M28.82 34.65c-6.53-1.35-11.24-6.34-10.52-11.14.72-4.79 6.6-7.58 13.12-6.23 6.53 1.36 11.24 6.35 10.52 11.15-.72 4.8-6.6 7.59-13.12 6.23ZM75.42 34.65c-6.52 1.36-12.4-1.43-13.12-6.23-.72-4.8 4-9.8 10.52-11.15 6.52-1.35 12.4 1.44 13.12 6.24.72 4.81-4 9.8-10.52 11.15Z" fill="#25A6F5"/></g>',frame1:(e,t)=>'<rect y="4" width="104" height="42" rx="4" fill="#000" fill-opacity=".8"/><rect x="28" y="25" width="10" height="11" rx="2" fill="#8BDDFF"/><rect x="66" y="25" width="10" height="11" rx="2" fill="#8BDDFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M21 4h8L12 46H4L21 4Z" fill="#fff" fill-opacity=".4"/>',frame2:(e,t)=>'<rect x="8" y="10" width="88" height="36" rx="4" fill="#000" fill-opacity=".8"/><rect x="28" y="21" width="10" height="17" rx="2" fill="#5EF2B8"/><rect x="66" y="21" width="10" height="17" rx="2" fill="#5EF2B8"/><path fill-rule="evenodd" clip-rule="evenodd" d="M83 10h5L76 46h-5l12-36Z" fill="#fff" fill-opacity=".4"/>',glow:(e,t)=>'<g fill="#fff"><circle cx="21" cy="30" r="15" fill-opacity=".1"/><circle cx="83" cy="30" r="15" fill-opacity=".1"/><circle cx="21" cy="30" r="12" fill-opacity=".1"/><circle cx="83" cy="30" r="12" fill-opacity=".1"/><circle cx="21" cy="30" r="6" fill-opacity=".8"/><circle cx="83" cy="30" r="6" fill-opacity=".8"/><circle cx="21" cy="30" r="3" fill-opacity=".8"/><circle cx="83" cy="30" r="3" fill-opacity=".8"/></g>',happy:(e,t)=>'<path d="m18 19 12-2M20 31c0-3.31 2.9-6 7-6 3.1 0 6 2.69 6 6M86 20l-12-3M84 31c0-3.31-2.9-6-6-6-4.1 0-7 2.69-7 6" stroke="#000" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>',hearts:(e,t)=>'<path d="M29.27 9.68c-2.55.13-4.96 2.24-6.25 4.15-1.48-1.76-4.1-3.6-6.65-3.47-5.48.28-8.85 3.8-8.63 8.1.3 5.72 4.88 8.89 9.7 12.24 1.71 1.15 5 4.15 5.42 4.82.42.67 2.14.6 2.58-.13a37.8 37.8 0 0 1 4.9-5.36c4.43-3.84 8.66-7.47 8.36-13.2-.23-4.3-3.95-7.44-9.43-7.15ZM87.63 10.36c-2.55-.14-5.17 1.7-6.65 3.47-1.3-1.9-3.7-4.02-6.25-4.15-5.48-.29-9.2 2.86-9.43 7.16-.3 5.72 3.93 9.35 8.36 13.19 1.6 1.32 4.55 4.64 4.9 5.36.35.7 2.06.82 2.58.13.51-.7 3.7-3.67 5.42-4.82 4.81-3.35 9.4-6.52 9.7-12.24.22-4.3-3.15-7.82-8.63-8.1Z" fill="#FF5353" fill-opacity=".8"/>',robocop:(e,t)=>'<rect x="7" y="16" width="91" height="16" rx="4" fill="#000" fill-opacity=".8"/><mask id="eyesRobocop-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="7" y="16" width="91" height="16"><rect x="7" y="16" width="91" height="16" rx="4" fill="#fff"/></mask><g mask="url(#eyesRobocop-a)" fill-rule="evenodd" clip-rule="evenodd" fill="#fff" fill-opacity=".8"><path d="M76 7h18L82 37H64L76 7ZM52 7h9L49 37h-9L52 7Z"/></g>',round:(e,t)=>'<g fill="#fff"><circle cx="24" cy="30" r="6"/><circle cx="80" cy="30" r="6"/></g>',roundFrame01:(e,t)=>'<rect y="12" width="104" height="32" rx="16" fill="#000" fill-opacity=".8"/><rect x="24" y="22" width="10" height="12" rx="2" fill="#F4F4F4"/><rect x="70" y="22" width="10" height="12" rx="2" fill="#F4F4F4"/>',roundFrame02:(e,t)=>'<rect y="11" width="104" height="34" rx="17" fill="#000" fill-opacity=".8"/><circle cx="29" cy="28" r="13" fill="#F1EEDA"/><circle cx="75" cy="28" r="13" fill="#F1EEDA"/><rect x="24" y="23" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/><rect x="70" y="23" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/>',sensor:(e,t)=>'<path d="M28 44a20 20 0 0 0 19.9-18h41.52a5 5 0 1 0 0-4H47.9A20 20 0 1 0 28 44Z" fill="#000" fill-opacity=".2"/><circle cx="94" cy="24" r="2" fill="#fff"/><circle cx="28" cy="24" r="16" fill="#000" fill-opacity=".6"/><circle cx="34" cy="16" r="3" fill="#fff"/>',shade01:(e,t)=>'<path d="M96 2H8c-4.5 0-8 3.5-8 8.03V28c0 4.5 3.5 8 8 8h13c8 0 11 8 18 8h27c7 0 9-8 17-8h13c4.5 0 8-3.5 8-8V10c0-4.5-3.5-8-8-8Z" fill="#000" fill-opacity=".8"/><path d="M87 14H17c-3.5 0-5 3-5 5v2c0 2 1.5 5 5 5h12c6 0 11.62 8 17 8h14c5.38 0 9-8 15-8h12c3.5 0 5-3 5-5v-2c0-2-1.5-5-5-5Z" fill="#FF3D3D"/><path d="M22.44 36.09 37.26 2h11L31.4 40.78l-.76-.58c-2.38-1.82-4.83-3.69-8.2-4.11ZM11.48 36 26.26 2h4L15.48 36h-4Z" fill="#fff" fill-opacity=".2"/>'},"mouth",0,{bite:(e,t)=>'<rect x="4" y="5" width="68" height="22" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="9" width="60" height="14" rx="2" fill="#000" fill-opacity=".6"/><path fill-rule="evenodd" clip-rule="evenodd" d="m20 17 6-8H14l6 8ZM32 17l6-8H26l6 8ZM44 17l6-8H38l6 8ZM56 17l6-8H50l6 8Z" fill="#E1E6E8"/>',diagram:(e,t)=>'<rect x="4" y="4" width="68" height="24" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="8" width="60" height="16" rx="2" fill="#000" fill-opacity=".8"/><path d="M9 17h11l2-4 3 7 4-8 2 9 3-11 3 10 3-3h15l3-4 2 7 3-3h4" stroke="#4EFAC9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',grill01:(e,t)=>'<g fill="#000" fill-opacity=".6"><rect x="12" y="12" width="4" height="8" rx="2"/><rect x="36" y="12" width="4" height="8" rx="2"/><rect x="24" y="12" width="4" height="8" rx="2"/><rect x="48" y="12" width="4" height="8" rx="2"/><rect x="60" y="12" width="4" height="8" rx="2"/></g>',grill02:(e,t)=>'<g fill="#000" fill-opacity=".6"><rect x="28" y="10" width="6" height="14" rx="2"/><rect x="14" y="10" width="6" height="14" rx="2"/><rect x="42" y="10" width="6" height="14" rx="2"/><rect x="56" y="10" width="6" height="14" rx="2"/></g>',grill03:(e,t)=>'<rect x="4" y="5" width="68" height="22" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="9" width="60" height="14" rx="2" fill="#fff"/><path fill="#000" fill-opacity=".1" d="M18 9h4v14h-4zM42 9h4v14h-4zM30 9h4v14h-4zM54 9h4v14h-4z"/>',smile01:(e,t)=>'<path d="M27.05 8.44a2 2 0 1 1 3.9-.88C31.72 10.96 34.4 13 38 13c3.6 0 6.28-2.04 7.05-5.44a2 2 0 1 1 3.9.88C47.75 13.7 43.43 17 38 17s-9.76-3.3-10.95-8.56Z" fill="#000" fill-opacity=".6"/>',smile02:(e,t)=>'<path fill-rule="evenodd" clip-rule="evenodd" d="M18 10.22C18 21.78 24.47 28 38 28c13.52 0 20-6.34 20-17.78C58 9.5 57.17 8 55 8H21c-2.05 0-3 1.38-3 2.22Z" fill="#000" fill-opacity=".8"/><mask id="mouthSmile02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="18" y="8" width="40" height="20"><path fill-rule="evenodd" clip-rule="evenodd" d="M18 10.22C18 21.78 24.47 28 38 28c13.52 0 20-6.34 20-17.78C58 9.5 57.17 8 55 8H21c-2.05 0-3 1.38-3 2.22Z" fill="#fff"/></mask><g mask="url(#mouthSmile02-a)"><rect x="30" y="2" width="16" height="14" rx="2" fill="#fff"/></g>',square01:(e,t)=>'<rect x="24" y="6" width="27" height="8" rx="4" fill="#000" fill-opacity=".8"/>',square02:(e,t)=>'<rect x="16" y="8" width="44" height="4" rx="2" fill="#000" fill-opacity=".8"/>'}],42495);var s=e.i(42495);function c({prng:e,group:t,values:r=[]}){let i=e.pick(r);return i&&s[t][i]?{name:i,value:s[t][i]}:void 0}let d={title:"Bottts",creator:"Pablo Stanley",source:"https://bottts.com/",homepage:"https://twitter.com/pablostanley",license:{name:"Free for personal and commercial use",url:"https://bottts.com/"}},u=({prng:e,options:t})=>{var r,i,l,a;let n=function({prng:e,options:t}){return{mouth:c({prng:e,group:"mouth",values:t.mouth}),eyes:c({prng:e,group:"eyes",values:t.eyes})}}({prng:e,options:t}),o=function({prng:e,options:t}){return{}}({prng:e,options:t});return{attributes:{viewBox:"0 0 120 120",fill:"none","shape-rendering":"auto"},body:`<g transform="translate(22 68)">${null!=(i=null==(r=n.mouth)?void 0:r.value(n,o))?i:""}</g><g transform="translate(8 20)">${null!=(a=null==(l=n.eyes)?void 0:l.value(n,o))?a:""}</g>`,extra:()=>({...Object.entries(n).reduce((e,[t,r])=>(e[t]=null==r?void 0:r.name,e),{}),...Object.entries(o).reduce((e,[t,r])=>(e[`${t}Color`]=r,e),{})})}};e.s(["create",0,u,"meta",0,d],98027),e.i(98027),e.s(["create",0,u,"meta",0,d,"schema",0,{$schema:"http://json-schema.org/draft-07/schema#",properties:{backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["ffb300","1e88e5","546e7a","6d4c41","00acc1","f4511e","5e35b1","43a047","757575","3949ab","039be5","7cb342","c0ca33","fb8c00","d81b60","8e24aa","e53935","00897b","fdd835"]},eyes:{type:"array",items:{type:"string",enum:["bulging","dizzy","eva","frame1","frame2","glow","happy","hearts","robocop","round","roundFrame01","roundFrame02","sensor","shade01"]},default:["bulging","dizzy","eva","frame1","frame2","glow","happy","hearts","robocop","round","roundFrame01","roundFrame02","sensor","shade01"]},mouth:{type:"array",items:{type:"string",enum:["bite","diagram","grill01","grill02","grill03","smile01","smile02","square01","square02"]},default:["bite","diagram","grill01","grill02","grill03","smile01","smile02","square01","square02"]}}}],44297);var h=e.i(44297),h=h;e.s(["generateAvatar",0,function(e,r){return r||(e?(function(e,r={}){var s,c,d,u,h,f,m,p,g,y,x,v,b,w,k,j,E,$,N,S,M,C,P,L,A,U,F,z,O,T,D,I,R,Z;let B,_,H,X,q,W,J,K,V,G,Y,Q,ee,et,er,ei,el;f=r;let ea=i((r=JSON.parse(JSON.stringify({...n(a),...n(null!=(m=e.schema)?m:{}),...f}))).seed),en=e.create({prng:ea,options:r}),eo=ea.pick(null!=(s=r.backgroundType)?s:[],"solid"),{primary:es,secondary:ec}=(p=null!=(c=r.backgroundColor)?c:[],(B=ea.shuffle(p)).length<=1||2==p.length&&"gradientLinear"==eo?(B=p,ea.next()):B=ea.shuffle(p),0===B.length&&(B=["transparent"]),_=B[0],H=null!=(g=B[1])?g:B[0],{primary:o(_),secondary:o(H)}),ed=ea.integer((null==(d=r.backgroundRotation)?void 0:d.length)?Math.min(...r.backgroundRotation):0,(null==(u=r.backgroundRotation)?void 0:u.length)?Math.max(...r.backgroundRotation):0);r.size&&(en.attributes.width=r.size.toString(),en.attributes.height=r.size.toString()),void 0!==r.scale&&100!==r.scale&&(en.body=function(e,t){let{width:r,height:i,x:a,y:n}=l(e),o=t?(t-100)/100:0;return`<g transform="translate(${-((r/2+a)*o*1)} ${-((i/2+n)*o*1)}) scale(${t/100})">${e.body}</g>`}(en,r.scale)),r.flip&&(en.body=function(e){let{width:t,x:r}=l(e);return`<g transform="scale(-1 1) translate(${-1*t-2*r} 0)">${e.body}</g>`}(en)),r.rotate&&(en.body=function(e,t){let{width:r,height:i,x:a,y:n}=l(e);return`<g transform="rotate(${t}, ${r/2+a}, ${i/2+n})">${e.body}</g>`}(en,r.rotate)),(r.translateX||r.translateY)&&(y=r.translateX,x=r.translateY,q=((X=l(en)).width+2*X.x)*((null!=y?y:0)/100),W=(X.height+2*X.y)*((null!=x?x:0)/100),en.body=`<g transform="translate(${q} ${W})">${en.body}</g>`),"transparent"!==es&&"transparent"!==ec&&(en.body=function(e,r,i,a,n){let{width:o,height:s,x:c,y:d}=l(e),u=`<rect fill="${t(r)}" width="${o}" height="${s}" x="${c}" y="${d}" />`;switch(a){case"solid":return u+e.body;case"gradientLinear":return`<rect fill="url(#backgroundLinear)" width="${o}" height="${s}" x="${c}" y="${d}" /><defs><linearGradient id="backgroundLinear" gradientTransform="rotate(${n} 0.5 0.5)"><stop stop-color="${t(r)}"/><stop offset="1" stop-color="${t(i)}"/></linearGradient></defs>`+e.body}}(en,es,ec,eo,ed)),(r.radius||r.clip)&&(en.body=function(e,t){let{width:r,height:i,x:a,y:n}=l(e);return`<mask id="viewboxMask"><rect width="${r}" height="${i}" rx="${t?r*t/100:0}" ry="${t?i*t/100:0}" x="${a}" y="${n}" fill="#fff" /></mask><g mask="url(#viewboxMask)">${e.body}</g>`}(en,null!=(h=r.radius)?h:0)),r.randomizeIds&&(J=i(Math.random().toString()),K={},en.body=en.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi,(e,t,r,i)=>(K[r]=K[r]||J.string(8),`${t}${K[r]}${i}`)));let eu=Object.keys(V={xmlns:"http://www.w3.org/2000/svg",...en.attributes}).map(e=>`${t(e)}="${t(V[e])}"`).join(" "),eh=(G=null==(v=e.meta)?void 0:v.title,Y=null==(b=e.meta)?void 0:b.creator,Q=null==(w=e.meta)?void 0:w.source,ee=null==(j=null==(k=e.meta)?void 0:k.license)?void 0:j.url,er=(null==(S=(N=e).meta)?void 0:S.title)?`„${null==(M=N.meta)?void 0:M.title}”`:"Design",ei=`„${null!=(P=null==(C=N.meta)?void 0:C.creator)?P:"Unknown"}”`,(null==(L=N.meta)?void 0:L.source)&&(er+=` (${N.meta.source})`),el="",(null==(U=null==(A=N.meta)?void 0:A.license)?void 0:U.name)!=="MIT"&&(null==(F=N.meta)?void 0:F.creator)!=="DiceBear"&&(null==(z=N.meta)?void 0:z.title)&&(el+="Remix of "),el+=`${er} by ${ei}`,(null==(T=null==(O=N.meta)?void 0:O.license)?void 0:T.name)&&(el+=`, licensed under „${null==(I=null==(D=N.meta)?void 0:D.license)?void 0:I.name}”`,(null==(Z=null==(R=N.meta)?void 0:R.license)?void 0:Z.url)&&(el+=` (${N.meta.license.url})`)),et=el,G||Y||Q||ee||et?'<metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description>'+(G?`<dc:title>${t(G)}</dc:title>`:"")+(Y?`<dc:creator>${t(Y)}</dc:creator>`:"")+(Q?`<dc:source xsi:type="dcterms:URI">${t(null!=($=null==(E=e.meta)?void 0:E.source)?$:"")}</dc:source>`:"")+(ee?`<dcterms:license xsi:type="dcterms:URI">${t(ee)}</dcterms:license>`:"")+(et?`<dc:rights>${t(et)}</dc:rights>`:"")+"</rdf:Description></rdf:RDF></metadata>":""),ef=`<svg ${eu}>${eh}${en.body}</svg>`;return{toString:()=>ef,toJson:()=>{var e;return{svg:ef,extra:{primaryBackgroundColor:es,secondaryBackgroundColor:ec,backgroundType:eo,backgroundRotation:ed,...null==(e=en.extra)?void 0:e.call(en)}}},toDataUri:()=>`data:image/svg+xml;utf8,${encodeURIComponent(ef)}`}})(h,{seed:"most.box@"+e,flip:!0,backgroundType:["gradientLinear"]}).toDataUri():"/avatar.png")}],93957)},72382,e=>{"use strict";let t=(0,e.i(56420).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],72382)},57667,80809,e=>{"use strict";var t=e.i(18050),r=e.i(71645);let i={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"escape",Esc:"escape",esc:"escape",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function l(e){let t=e.replace("Key","").toLowerCase();return i[e]||t}e.s(["ModalOverlay",0,function({children:e,onClose:i}){return!function(e,t=["INPUT","TEXTAREA","SELECT"],i=!1){let a=(0,r.useEffectEvent)(r=>{e.forEach(([e,a,n={preventDefault:!0,usePhysicalKeys:!1}])=>{var o;(o=n.usePhysicalKeys,t=>{let r,i,a,n;return function(e,t,r){let{alt:i,ctrl:a,meta:n,mod:o,shift:s,key:c}=e,{altKey:d,ctrlKey:u,metaKey:h,shiftKey:f,key:m,code:p}=t;if(i!==d)return!1;if(o){if(!u&&!h)return!1}else if(a!==u||n!==h)return!1;return s===f&&!!c&&(r?l(p)===l(c):l(m??p)===l(c))}((i={alt:(r=e.toLowerCase().split("+").map(e=>e.trim())).includes("alt"),ctrl:r.includes("ctrl"),meta:r.includes("meta"),mod:r.includes("mod"),shift:r.includes("shift")},a=["alt","ctrl","meta","shift","mod"],n=r.find(e=>!a.includes(e)),{...i,key:"[plus]"===n?"+":n}),t,o)})(r)&&function(e,t,r=!1){return!(e.target instanceof HTMLElement)||(r?!t.includes(e.target.tagName):!e.target.isContentEditable&&!t.includes(e.target.tagName))}(r,t,i)&&(n.preventDefault&&r.preventDefault(),a(r))})});(0,r.useEffect)(()=>(document.documentElement.addEventListener("keydown",a),()=>document.documentElement.removeEventListener("keydown",a)),[])}(i?[["Escape",i]]:[]),(0,r.useEffect)(()=>{let e=window.visualViewport;if(!e)return;let t=()=>{document.documentElement.style.setProperty("--modal-visual-height",`${e.height}px`),document.documentElement.style.setProperty("--modal-visual-top",`${e.offsetTop}px`)};return t(),e.addEventListener("resize",t),e.addEventListener("scroll",t),()=>{e.removeEventListener("resize",t),e.removeEventListener("scroll",t),document.documentElement.style.removeProperty("--modal-visual-height"),document.documentElement.style.removeProperty("--modal-visual-top")}},[]),(0,t.jsxs)("div",{className:"modal-overlay",children:[(0,t.jsx)("div",{className:"modal-overlay-backdrop"}),(0,t.jsx)("div",{className:"modal-glass",children:e})]})}],57667),e.s(["Toast",0,function({message:e,type:i,onDone:l,index:a}){(0,r.useEffect)(()=>{let e=setTimeout(l,3e3);return()=>clearTimeout(e)},[]);let n=Math.min(Math.max(a,0),5);return(0,t.jsx)("div",{className:`toast ${i} toast-stack-${n}`,children:e})}],80809)},63676,e=>{"use strict";let t=(0,e.i(56420).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],63676)},4121,88361,47910,e=>{"use strict";var t=e.i(57667);e.i(80809);var r=e.i(18050),i=e.i(63676);e.s(["ConfirmModal",0,function({title:e,message:l,confirmText:a,onConfirm:n,onClose:o,danger:s}){return(0,r.jsx)(t.ModalOverlay,{onClose:o,children:(0,r.jsxs)("div",{className:"confirm-modal",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"modal-header",children:[(0,r.jsx)("h3",{children:e}),(0,r.jsx)("button",{onClick:o,className:"btn btn-icon",children:(0,r.jsx)(i.X,{size:18})})]}),(0,r.jsx)("p",{children:l}),(0,r.jsxs)("div",{className:"modal-actions",children:[(0,r.jsx)("button",{onClick:o,className:"btn btn-secondary",children:"取消"}),(0,r.jsx)("button",{onClick:n,className:`btn ${s?"btn-danger":"btn-primary"}`,children:a})]})]})})}],88361);var l=e.i(71645);e.s(["InputModal",0,function({title:e,placeholder:a,defaultValue:n,confirmText:o,onConfirm:s,onClose:c,isLoading:d,loadingText:u,validate:h}){let[f,m]=(0,l.useState)(n||""),p=f.trim(),g=p&&h?h(p):"",y=!!p&&!g&&!d;function x(){y&&s(p)}return(0,r.jsx)(t.ModalOverlay,{onClose:c,children:(0,r.jsxs)("div",{className:"input-modal",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"modal-header",children:[(0,r.jsx)("h3",{children:e}),(0,r.jsx)("button",{onClick:c,className:"btn btn-icon",children:(0,r.jsx)(i.X,{size:18})})]}),(0,r.jsx)("input",{type:"text",value:f,onChange:e=>m(e.target.value),placeholder:a,autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&x()},className:"input input-compact","aria-invalid":!!g,"aria-describedby":g?"input-modal-error":void 0}),g&&(0,r.jsx)("p",{className:"input-modal-error",id:"input-modal-error",children:g}),(0,r.jsxs)("div",{className:"modal-actions",children:[(0,r.jsx)("button",{onClick:c,disabled:d,className:"btn btn-secondary",children:"取消"}),(0,r.jsx)("button",{onClick:x,disabled:!y,className:`btn btn-primary ${d?"btn-loading":""}`,children:d?u||"处理中...":o})]})]})})}],47910),e.s([],4121)},80860,e=>{"use strict";let t=(0,e.i(56420).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",0,t],80860)},79952,e=>{"use strict";var t=e.i(18050),r=e.i(74080),i=e.i(72382),l=e.i(80860),a=e.i(63676),n=e.i(71192),o=e.i(3593);e.i(4121);var s=e.i(57667),c=e.i(93957);e.s(["default",0,function(){let e=(0,o.useAppStore)(e=>e.addToast),d=(0,n.useUserStore)(e=>e.showLoginModal),u=(0,n.useUserStore)(e=>e.closeLoginModal),h=(0,n.useUserStore)(e=>e.loginUsername),f=(0,n.useUserStore)(e=>e.loginPassword),m=(0,n.useUserStore)(e=>e.showPassword),p=(0,n.useUserStore)(e=>e.loginPreviewAddress),g=(0,n.useUserStore)(e=>e.hasPreviewedAvatar),y=(0,n.useUserStore)(e=>e.loginLoading),x=(0,n.useUserStore)(e=>e.loginError),v=(0,n.useUserStore)(e=>e.setLoginUsername),b=(0,n.useUserStore)(e=>e.setLoginPassword),w=(0,n.useUserStore)(e=>e.togglePassword),k=(0,n.useUserStore)(e=>e.previewLoginIdentity),j=(0,n.useUserStore)(e=>e.loginUser);if(!d)return null;let E=p?`${p.slice(0,6)}...${p.slice(-4)}`:"Most People",$=(0,t.jsx)(s.ModalOverlay,{onClose:u,children:(0,t.jsxs)("form",{className:"login-modal",onSubmit:t=>{let r;t.preventDefault(),(r=j())&&e(`已登录 ${r.username}`,"success")},children:[(0,t.jsxs)("div",{className:"login-modal-header",children:[(0,t.jsx)("h3",{children:"登录"}),(0,t.jsx)("button",{className:"login-modal-close",onClick:u,type:"button",children:(0,t.jsx)(a.X,{size:18})})]}),(0,t.jsxs)("div",{className:"login-modal-body",children:[(0,t.jsx)("img",{className:"login-avatar-preview",src:p?(0,c.generateAvatar)(p):"/avatar.png",alt:"avatar"}),(0,t.jsx)("p",{className:"login-tip",children:E}),x&&(0,t.jsx)("p",{className:"login-error",children:x}),(0,t.jsx)("input",{type:"text",className:"input input-compact",placeholder:"用户名",value:h,onChange:e=>v(e.target.value),autoFocus:!0}),(0,t.jsxs)("div",{className:"login-password-wrapper",children:[(0,t.jsx)("input",{type:m?"text":"password",className:"input input-compact",placeholder:"密码",value:f,onChange:e=>b(e.target.value)}),(0,t.jsx)("button",{className:"login-password-toggle",type:"button",onClick:w,children:m?(0,t.jsx)(l.EyeOff,{size:16}):(0,t.jsx)(i.Eye,{size:16})})]}),(0,t.jsxs)("div",{className:"login-buttons-row",children:[(0,t.jsx)("button",{className:"btn btn-secondary",onClick:k,disabled:g||y,type:"button",children:g?"检查地址":"登录"}),(0,t.jsx)("button",{className:"btn btn-primary",disabled:!g||y,type:"submit",children:y?"登录中":"确认"})]})]})]})});return(0,r.createPortal)($,document.body)}])},19767,e=>{"use strict";var t=e.i(18050),r=e.i(74080),i=e.i(63676),l=e.i(3593);e.i(4121);var a=e.i(57667),n=e.i(71645),o=e.i(41220);let s=(0,e.i(56420).default)("unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);var c=e.i(26913);function d({variant:e="page"}){let r=(0,l.useAppStore)(e=>e.checkBackend),i=(0,l.useAppStore)(e=>e.addToast),a=(0,c.getRemoteBackendUrlExport)(),[u,h]=(0,n.useState)(a),[f,m]=(0,n.useState)((0,c.getBackendInviteExport)()),[p,g]=(0,n.useState)(!1),y=a?"修改远程节点":"连接远程节点",x="Web 端只连接已有 MostBox 节点。输入别人部署好的节点地址和邀请码后,可通过该节点使用文件分享和聊天;本机完整 P2P 能力请使用桌面客户端。",v="page"===e;async function b(){let e=u.trim().replace(/\/+$/,"");if(!function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(e))return void i("请输入有效的 http(s) 节点地址","warning");g(!0);try{let{ok:t,reason:r}=await (0,c.checkBackendConnectionTarget)({url:e,invite:f});if(!t)return void("http"===r?i("远程节点 HTTP 不可达,请检查地址","error"):"ws"===r?i("远程节点 WebSocket 不可达,请检查地址或代理配置","error"):i("远程节点连接失败,请检查地址和邀请码","error"));(0,c.configureBackend)({url:e,invite:f}),h(e),(0,c.setBackendUrl)(e),l.useAppStore.setState({hasBackend:!0}),i("远程节点已连接","success")}catch{i("远程节点连接失败","error")}finally{g(!1)}}async function w(){(0,c.clearBackendConnection)(),h(""),m(""),await r(),i("已清除远程节点,优先使用本地节点","success")}return(0,t.jsxs)("div",{className:`remote-node-connect remote-node-connect-${e}`,children:[v?(0,t.jsxs)("div",{className:"remote-node-connect-heading",children:[(0,t.jsx)(o.Server,{size:20}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{children:y}),(0,t.jsx)("p",{children:x})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"drawer-label",children:[(0,t.jsx)(o.Server,{size:14,className:"icon-inline"}),y]}),(0,t.jsx)("p",{className:"drawer-hint drawer-hint-spaced",children:x})]}),(0,t.jsxs)("div",{className:"remote-node-form",children:[(0,t.jsx)("input",{className:"input input-compact",placeholder:"https://node.example.com",value:u,onChange:e=>h(e.target.value)}),(0,t.jsx)("input",{className:"input input-compact",placeholder:"邀请码",value:f,onChange:e=>m(e.target.value)}),(0,t.jsxs)("button",{className:"btn btn-primary btn-full",onClick:b,disabled:p||!u.trim(),children:[(0,t.jsx)(o.Server,{size:16}),p?"连接中...":a?"更新连接":"连接节点"]}),a&&(0,t.jsxs)("button",{className:"btn btn-secondary btn-full",onClick:w,disabled:p,children:[(0,t.jsx)(s,{size:16}),"断开连接"]})]}),a&&(0,t.jsxs)("p",{className:v?"remote-node-status":"drawer-status",children:["当前远程节点:",a]})]})}e.s(["default",0,function(){let e=(0,l.useAppStore)(e=>e.showConnectModal),n=(0,l.useAppStore)(e=>e.closeConnectModal);if(!e)return null;let o=(0,t.jsx)(a.ModalOverlay,{onClose:n,children:(0,t.jsxs)("div",{className:"connect-modal",children:[(0,t.jsxs)("div",{className:"connect-modal-header",children:[(0,t.jsx)("h3",{children:"连接节点"}),(0,t.jsx)("button",{className:"connect-modal-close",onClick:n,type:"button",children:(0,t.jsx)(i.X,{size:18})})]}),(0,t.jsx)("div",{className:"connect-modal-body",children:(0,t.jsx)(d,{variant:"drawer"})})]})});return(0,r.createPortal)(o,document.body)}],19767)},14232,e=>{"use strict";var t=e.i(18050),r=e.i(71645);class i extends r.default.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t)}handleReload=()=>{window.location.reload()};render(){return this.state.hasError?(0,t.jsxs)("div",{className:"error-boundary-page",children:[(0,t.jsx)("h1",{className:"error-boundary-title",children:"出错了"}),(0,t.jsx)("p",{className:"error-boundary-desc",children:"发生了意外错误,请尝试重新加载页面"}),(0,t.jsx)("button",{onClick:this.handleReload,className:"error-boundary-btn",children:"重新加载"})]}):this.props.children}}e.s(["ErrorBoundary",0,i])},52925,e=>{"use strict";var t=e.i(18050),r=e.i(71645),i=e.i(18566),l=e.i(3593),a=e.i(71192);e.i(4121);var n=e.i(80809),o=e.i(79952),s=e.i(19767);e.s(["default",0,function(){let e=(0,i.usePathname)(),c="/demo"===e||e.startsWith("/demo/"),d=(0,l.useAppStore)(e=>e.checkBackend),u=(0,l.useAppStore)(e=>e.initializeLocalData),h=(0,a.useUserStore)(e=>e.initializeUser),f=(0,a.useUserStore)(e=>e.identity),m=(0,l.useAppStore)(e=>e.loadUserNotes),p=(0,l.useAppStore)(e=>e.resetAppState),g=(0,l.useAppStore)(e=>e.toasts),y=(0,l.useAppStore)(e=>e.removeToast);return((0,r.useEffect)(()=>{c||(u(),h(),d())},[d,u,h,c]),(0,r.useEffect)(()=>{c||(f?m(f.address):p())},[f?.address,c,m,p]),c)?null:(0,t.jsxs)(t.Fragment,{children:[g.map((e,r)=>(0,t.jsx)(n.Toast,{message:e.message,type:e.type,onDone:()=>y(e.id),index:r},e.id)),(0,t.jsx)(o.default,{}),(0,t.jsx)(s.default,{})]})}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62368,e=>{"use strict";let t=(0,e.i(56420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],62368)},89664,e=>{"use strict";let t=(0,e.i(56420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],89664)},11241,e=>{"use strict";let t=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],11241)},35965,e=>{"use strict";let t=(0,e.i(56420).default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,t],35965)},96699,e=>{"use strict";let t=(0,e.i(56420).default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,t],96699)},59665,5142,e=>{"use strict";var t=e.i(18050),n=e.i(71645);let r=(0,e.i(56420).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);function a(e=!1,t={}){let[r,s]=(0,n.useState)(e),i=(0,n.useCallback)(()=>{s(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),c=(0,n.useCallback)(()=>{s(e=>e?(t.onClose?.(),!1):e)},[t.onClose]);return[r,{open:i,close:c,toggle:(0,n.useCallback)(()=>{r?c():i()},[c,i,r]),set:s}]}e.s(["useDisclosure",0,a],5142);let s=(0,n.createContext)(null);e.s(["default",0,function({sidebar:e,headerTitle:i,headerRight:c,sidebarToggleReplacement:u,defaultHide:l=!1,children:o}){let[d,h]=a(!1),[f,y]=(0,n.useState)(l),m=(0,n.useRef)(l),p=function(e,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){let[r,a]=(0,n.useState)(t?void 0:!!("u">typeof window&&"matchMedia"in window)&&window.matchMedia(e).matches);return(0,n.useEffect)(()=>{try{if("matchMedia"in window){let t=window.matchMedia(e);a(t.matches);let n=e=>a(e.matches);return t.addEventListener("change",n),()=>{t.removeEventListener("change",n)}}}catch(e){return}},[e]),r||!1}("(max-width: 768px)"),v=(0,n.useCallback)((e={})=>{h.close(),e.collapse&&y(!0)},[h]);(0,n.useEffect)(()=>{l!==m.current&&(l?v({collapse:!0}):y(!1),m.current=l)},[l,v]);let $=()=>{p?h.open():y(!1)};return(0,t.jsx)(s.Provider,{value:{closeSidebar:v,openSidebar:$,isSidebarVisible:p?d:!f},children:(0,t.jsxs)("div",{className:"app-layout",children:[(0,t.jsx)("div",{className:`sidebar-overlay ${d?"visible":""}`,onClick:()=>v()}),(0,t.jsx)("div",{className:`sidebar ${d?"open":""} ${f?"collapsed":""}`,children:e({closeSidebar:v,openSidebar:$})}),(0,t.jsxs)("div",{className:"main-content",children:[(0,t.jsxs)("header",{className:"app-header",children:[(0,t.jsxs)("div",{className:"header-left",children:[u??(0,t.jsx)("button",{onClick:()=>{p?h.toggle():y(!f)},className:"btn btn-icon sidebar-toggle-btn","aria-label":p?"打开菜单":f?"展开侧边栏":"收起侧边栏",children:(0,t.jsx)(r,{size:16})}),i]}),(0,t.jsx)("div",{className:"header-right",children:c})]}),o]})]})})},"useAppShell",0,function(){let e=(0,n.useContext)(s);if(!e)throw Error("useAppShell must be used within AppShell");return e}],59665)},8734,e=>{"use strict";let t=(0,e.i(56420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],8734)},58925,e=>{"use strict";let t=(0,e.i(56420).default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);e.s(["KeyRound",0,t],58925)},82022,e=>{"use strict";let t=(0,e.i(56420).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],82022)},70904,e=>{"use strict";let t=(0,e.i(56420).default)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);e.s(["Wallet",0,t],70904)},16306,23165,24851,64830,16546,e=>{"use strict";let t=(0,e.i(56420).default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);e.s(["ShieldAlert",0,t],16306);var n=e.i(18050),r=e.i(71645),a=e.i(89664),s=e.i(8734);function i({text:e,label:t,copiedLabel:c="已复制",className:u="btn btn-icon",iconSize:l=14}){let[o,d]=(0,r.useState)(!1);async function h(){try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),1500)}catch{}}return(0,n.jsxs)("button",{type:"button",className:u,onClick:h,title:o?c:t||"复制",children:[o?(0,n.jsx)(a.Check,{size:l}):(0,n.jsx)(s.Copy,{size:l}),t?o?c:t:null]})}e.s(["CopyButton",0,i],23165),e.s(["EmptyState",0,function({icon:e,message:t,className:r="empty-state glass"}){return(0,n.jsxs)("div",{className:r,children:[(0,n.jsx)("div",{className:"empty-state-icon",children:e}),(0,n.jsx)("p",{children:t})]})}],24851),e.s(["KeyCard",0,function({title:e,icon:t,children:r,accent:a=!1}){return(0,n.jsxs)("div",{className:`web3-key-card ${a?"accent":""}`,children:[(0,n.jsxs)("div",{className:"web3-key-card-header",children:[(0,n.jsx)("span",{className:"web3-key-card-icon",children:t}),(0,n.jsx)("span",{className:"web3-key-card-title",children:e})]}),(0,n.jsx)("div",{className:"web3-key-card-body",children:r})]})}],64830);var c=e.i(62368);e.s(["PemBlock",0,function({label:e,pem:t,filename:r}){return(0,n.jsxs)("div",{className:"web3-pem-block",children:[(0,n.jsxs)("div",{className:"web3-pem-header",children:[(0,n.jsx)("span",{className:"web3-pem-label",children:e}),(0,n.jsxs)("div",{className:"web3-pem-actions",children:[(0,n.jsx)(i,{text:t,label:"复制",className:"btn btn-sm",iconSize:14}),(0,n.jsxs)("button",{type:"button",className:"btn btn-sm btn-primary",onClick:function(){let e=new Blob([t],{type:"text/plain"}),n=URL.createObjectURL(e),a=document.createElement("a");a.href=n,a.download=r,a.click(),URL.revokeObjectURL(n)},title:"下载",children:[(0,n.jsx)(c.Download,{size:14}),"下载"]})]})]}),(0,n.jsx)("textarea",{className:"textarea mono",value:t,readOnly:!0,rows:6})]})}],16546)},22315,(e,t,n)=>{e.e,t.exports=function(){"use strict";var e="millisecond",t="second",n="minute",r="hour",a="week",s="month",i="quarter",c="year",u="date",l="Invalid Date",o=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,d=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},f="en",y={};y[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}};var m="$isDayjsObject",p=function(e){return e instanceof k||!(!e||!e[m])},v=function e(t,n,r){var a;if(!t)return f;if("string"==typeof t){var s=t.toLowerCase();y[s]&&(a=s),n&&(y[s]=n,a=s);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var c=t.name;y[c]=t,a=c}return!r&&a&&(f=a),a||!r&&f},$=function(e,t){if(p(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new k(n)},b={s:h,z:function(e){var t=-e.utcOffset(),n=Math.abs(t);return(t<=0?"+":"-")+h(Math.floor(n/60),2,"0")+":"+h(n%60,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(r,s),i=n-a<0,c=t.clone().add(r+(i?-1:1),s);return+(-(r+(n-a)/(i?a-c:c-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(l){return({M:s,y:c,w:a,d:"day",D:u,h:r,m:n,s:t,ms:e,Q:i})[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}};b.l=v,b.i=p,b.w=function(e,t){return $(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var k=function(){function h(e){this.$L=v(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[m]=!0}var f=h.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(b.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(o);if(r){var a=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.init()},f.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},f.$utils=function(){return b},f.isValid=function(){return this.$d.toString()!==l},f.isSame=function(e,t){var n=$(e);return this.startOf(t)<=n&&n<=this.endOf(t)},f.isAfter=function(e,t){return $(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<$(e)},f.$g=function(e,t,n){return b.u(e)?this[t]:this.set(n,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,i){var l=this,o=!!b.u(i)||i,d=b.p(e),h=function(e,t){var n=b.w(l.$u?Date.UTC(l.$y,t,e):new Date(l.$y,t,e),l);return o?n:n.endOf("day")},f=function(e,t){return b.w(l.toDate()[e].apply(l.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),l)},y=this.$W,m=this.$M,p=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case c:return o?h(1,0):h(31,11);case s:return o?h(1,m):h(0,m+1);case a:var $=this.$locale().weekStart||0,k=(y<$?y+7:y)-$;return h(o?p-k:p+(6-k),m);case"day":case u:return f(v+"Hours",0);case r:return f(v+"Minutes",1);case n:return f(v+"Seconds",2);case t:return f(v+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(a,i){var l,o=b.p(a),d="set"+(this.$u?"UTC":""),h=((l={}).day=d+"Date",l[u]=d+"Date",l[s]=d+"Month",l[c]=d+"FullYear",l[r]=d+"Hours",l[n]=d+"Minutes",l[t]=d+"Seconds",l[e]=d+"Milliseconds",l)[o],f="day"===o?this.$D+(i-this.$W):i;if(o===s||o===c){var y=this.clone().set(u,1);y.$d[h](f),y.init(),this.$d=y.set(u,Math.min(this.$D,y.daysInMonth())).$d}else h&&this.$d[h](f);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[b.p(e)]()},f.add=function(e,i){var u,l=this;e=Number(e);var o=b.p(i),d=function(t){var n=$(l);return b.w(n.date(n.date()+Math.round(t*e)),l)};if(o===s)return this.set(s,this.$M+e);if(o===c)return this.set(c,this.$y+e);if("day"===o)return d(1);if(o===a)return d(7);var h=((u={})[n]=6e4,u[r]=36e5,u[t]=1e3,u)[o]||1,f=this.$d.getTime()+e*h;return b.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=b.z(this),s=this.$H,i=this.$m,c=this.$M,u=n.weekdays,o=n.months,h=n.meridiem,f=function(e,n,a,s){return e&&(e[n]||e(t,r))||a[n].slice(0,s)},y=function(e){return b.s(s%12||12,e,"0")},m=h||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(d,function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return b.s(t.$y,4,"0");case"M":return c+1;case"MM":return b.s(c+1,2,"0");case"MMM":return f(n.monthsShort,c,o,3);case"MMMM":return f(o,c);case"D":return t.$D;case"DD":return b.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,u,2);case"ddd":return f(n.weekdaysShort,t.$W,u,3);case"dddd":return u[t.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return y(1);case"hh":return y(2);case"a":return m(s,i,!0);case"A":return m(s,i,!1);case"m":return String(i);case"mm":return b.s(i,2,"0");case"s":return String(t.$s);case"ss":return b.s(t.$s,2,"0");case"SSS":return b.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")})},f.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},f.diff=function(e,u,l){var o,d=this,h=b.p(u),f=$(e),y=(f.utcOffset()-this.utcOffset())*6e4,m=this-f,p=function(){return b.m(d,f)};switch(h){case c:o=p()/12;break;case s:o=p();break;case i:o=p()/3;break;case a:o=(m-y)/6048e5;break;case"day":o=(m-y)/864e5;break;case r:o=m/36e5;break;case n:o=m/6e4;break;case t:o=m/1e3;break;default:o=m}return l?o:b.a(o)},f.daysInMonth=function(){return this.endOf(s).$D},f.$locale=function(){return y[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=v(e,t,!0);return r&&(n.$L=r),n},f.clone=function(){return b.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},h}(),w=k.prototype;return $.prototype=w,[["$ms",e],["$s",t],["$m",n],["$H",r],["$W","day"],["$M",s],["$y",c],["$D",u]].forEach(function(e){w[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),$.extend=function(e,t){return e.$i||(e(t,k,$),e.$i=!0),$},$.locale=v,$.isDayjs=p,$.unix=function(e){return $(1e3*e)},$.en=y[f],$.Ls=y,$.p={},$}()},16327,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],16327)},6537,77816,e=>{"use strict";let t=(0,e.i(56420).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",0,t],6537);var n=e.i(22315);function r(e){let t;if(!e)return"";let r=(0,n.default)(Number(e)),a=r.hour();return t=a>=0&&a<3?"凌晨":a>=3&&a<6?"拂晓":a>=6&&a<9?"早晨":a>=9&&a<12?"上午":a>=12&&a<15?"下午":a>=15&&a<18?"傍晚":a>=18&&a<21?"晚上":"深夜",r.format(`YYYY年M月D日 ${t}h:m`)}e.s(["formatDate",0,r,"formatTime",0,r],77816)}]);