most-box 0.1.9 → 0.2.0

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 (157) hide show
  1. package/README.md +16 -3
  2. package/out/admin/index.html +0 -0
  3. package/out/app/index.html +0 -0
  4. package/out/assets/AppShell-CQhg6DJU.js +1 -0
  5. package/out/assets/ChatUi-BepWs-ZU.js +1 -0
  6. package/out/assets/LanguageToggle-CtzCCAYv.js +1 -0
  7. package/out/assets/{LogoIcon-CYQ7cHd5.js → LogoIcon-Dxto3Sb4.js} +1 -1
  8. package/out/assets/{MarketingLayout-BTIbv4fW.js → MarketingLayout-BQw0IS2i.js} +1 -1
  9. package/out/assets/MarketingThemeToggle-DBaC9bjz.js +1 -0
  10. package/out/assets/MilkdownEditor-BqJzntYE.js +1054 -0
  11. package/out/assets/MoveModal-4D9n11Kw.js +1 -0
  12. package/out/assets/Nav-9MDdvgNs.js +1 -0
  13. package/out/assets/NoteSidebar-C-rIt32H.js +1 -0
  14. package/out/assets/OpenSidebarButton-Dd0JmKuE.js +1 -0
  15. package/out/assets/PemBlock-C8dEIzu-.js +1 -0
  16. package/out/assets/SidebarAccount-ClS-N0lq.js +1 -0
  17. package/out/assets/arrow-right-urE9Rd7j.js +1 -0
  18. package/out/assets/channelApi-BwQU0-h1.js +1 -0
  19. package/out/assets/check-DUNsD2t6.js +1 -0
  20. package/out/assets/chevron-down-D6mpsfv4.js +1 -0
  21. package/out/assets/{circle-alert-CqEQz6P4.js → circle-alert-W0iyN4sC.js} +1 -1
  22. package/out/assets/cloud-BMyOoC2x.js +1 -0
  23. package/out/assets/code-B1Cb_Icm.js +1 -0
  24. package/out/assets/{copy-CM-qWlbv.js → copy-C1MttOli.js} +1 -1
  25. package/out/assets/{dist-CvatM4u8.js → dist-8QDHqrPN.js} +1 -1
  26. package/out/assets/{dist-BmtYO1GG.js → dist-B0JrbG7f.js} +5 -5
  27. package/out/assets/{dist-DBpw-A8y.js → dist-BFSyuOuw.js} +1 -1
  28. package/out/assets/{dist-D5Cf0hK8.js → dist-BPs0Xns9.js} +2 -2
  29. package/out/assets/{dist-BQV5zYG_.js → dist-Br_5lLVO.js} +9 -9
  30. package/out/assets/{dist-CrzjJUOw.js → dist-BzqqCPi2.js} +1 -1
  31. package/out/assets/dist-C3lbe8SW.js +9 -0
  32. package/out/assets/{dist-CWJ3323z.js → dist-CfU9fwWz.js} +1 -1
  33. package/out/assets/{dist-BdmTLuCI.js → dist-DCX0ws1K.js} +1 -1
  34. package/out/assets/{dist-DrumcFOX.js → dist-DJdv-Ma3.js} +1 -1
  35. package/out/assets/{dist-C5HibLEW.js → dist-chOCTzB2.js} +1 -1
  36. package/out/assets/{download-0rM8xVCe.js → download-y7SZXu6E.js} +1 -1
  37. package/out/assets/downloadValidation-B0p9Ai_9.js +1 -0
  38. package/out/assets/filePreview-UI9NH34f.js +1 -0
  39. package/out/assets/format-CR8oUWq6.js +1 -0
  40. package/out/assets/game-CdU3xnZo.js +1 -0
  41. package/out/assets/{hard-drive-CCdIvSap.js → hard-drive-D13Qbobu.js} +1 -1
  42. package/out/assets/image-DJCA16l_.js +1 -0
  43. package/out/assets/index-BdaFEQG-.css +1 -0
  44. package/out/assets/index-QxXZzOUL.js +33 -0
  45. package/out/assets/index.lazy-BBTTFanX.js +1 -0
  46. package/out/assets/index.lazy-BG4ZylHD.js +2 -0
  47. package/out/assets/index.lazy-Bi-6ZXZX.js +1 -0
  48. package/out/assets/index.lazy-BixWVr0B.js +1 -0
  49. package/out/assets/index.lazy-BjFwNYy5.js +3 -0
  50. package/out/assets/index.lazy-C8EIQsXY.js +2 -0
  51. package/out/assets/index.lazy-CarNe2uu.js +1 -0
  52. package/out/assets/index.lazy-DEuGu3H3.js +1 -0
  53. package/out/assets/index.lazy-GPyILCA7.js +3 -0
  54. package/out/assets/index.lazy-I8ofndXl.js +1 -0
  55. package/out/assets/index.lazy-TxhWsA7y.js +1 -0
  56. package/out/assets/index.lazy-azfky8k7.js +1 -0
  57. package/out/assets/{key-round-tIqGrtt_.js → key-round-CZniN9lv.js} +1 -1
  58. package/out/assets/lock-D5OSNhep.js +1 -0
  59. package/out/assets/log-out-B6phyZ5z.js +1 -0
  60. package/out/assets/{music-BkZKq879.js → music-CbUskKgg.js} +1 -1
  61. package/out/assets/{notebook-pen-B4VSbweh.js → notebook-pen-DqKDQ6MJ.js} +1 -1
  62. package/out/assets/play-BIl8q9eU.js +1 -0
  63. package/out/assets/plus-BxxbpH6Q.js +1 -0
  64. package/out/assets/{save-BzjzC3eV.js → save-DkH1n_Ov.js} +1 -1
  65. package/out/assets/search-BQi5Z0E-.js +1 -0
  66. package/out/assets/{send-DtQInX0y.js → send-Cl6NtD2T.js} +1 -1
  67. package/out/assets/{trash-2-BhMrUgGM.js → trash-2-BBjpgK_f.js} +1 -1
  68. package/out/assets/triangle-alert-l98G8u9O.js +1 -0
  69. package/out/assets/upload-ByP6Ydde.js +1 -0
  70. package/out/assets/{useChannelMessages-Bs1hEJyd.js → useChannelMessages-BgbYfF2c.js} +2 -2
  71. package/out/assets/useGameRoom-DPmweWwe.js +1 -0
  72. package/out/assets/{wallet-YxbxCi7C.js → wallet-c7zIhNSM.js} +1 -1
  73. package/out/assets/{wifi-v3JpPCNm.js → wifi-Bm4biAjc.js} +1 -1
  74. package/out/chat/index.html +0 -0
  75. package/out/chat/join/index.html +0 -0
  76. package/out/demo/index.html +0 -0
  77. package/out/download/index.html +6 -2
  78. package/out/game/gandengyan/index.html +0 -0
  79. package/out/game/index.html +0 -0
  80. package/out/game/zhajinhua/index.html +0 -0
  81. package/out/index.html +6 -2
  82. package/out/note/index.html +0 -0
  83. package/out/ping/index.html +6 -2
  84. package/out/web3/index.html +0 -0
  85. package/package.json +2 -2
  86. package/server/index.js +9 -0
  87. package/server/src/core/channelAttachment.js +7 -3
  88. package/server/src/core/channelIdentity.js +50 -0
  89. package/server/src/core/cid.js +6 -1
  90. package/server/src/core/cidTopic.js +18 -4
  91. package/server/src/core/displayPath.js +10 -0
  92. package/server/src/core/gameRoom.js +2 -2
  93. package/server/src/core/mostLink.js +45 -25
  94. package/server/src/core/ownerMetadata.js +34 -0
  95. package/server/src/core/userSyncKeys.js +36 -0
  96. package/server/src/http/app.js +71 -149
  97. package/server/src/http/dataPath.js +26 -0
  98. package/server/src/http/errors.js +8 -4
  99. package/server/src/http/nodeStatus.js +13 -13
  100. package/server/src/http/rateLimit.js +39 -0
  101. package/server/src/http/routePolicy.js +43 -0
  102. package/server/src/index.js +1909 -759
  103. package/server/src/node/offlineSwarm.js +20 -0
  104. package/server/src/utils/api.js +1 -15
  105. package/server/src/utils/downloadMessages.js +17 -18
  106. package/server/src/utils/errors.js +3 -1
  107. package/server/src/utils/noteUtils.js +27 -3
  108. package/out/assets/AppShell-DmZQwVA9.js +0 -1
  109. package/out/assets/ChatUi-CVGqjFdx.js +0 -1
  110. package/out/assets/MilkdownEditor-BL8xE7u9.js +0 -1054
  111. package/out/assets/MoveModal-BKkVBvrS.js +0 -1
  112. package/out/assets/Nav-BDGeJnbC.js +0 -1
  113. package/out/assets/NoteSidebar-BIJ8_m5K.js +0 -1
  114. package/out/assets/OpenSidebarButton-Di62DGiu.js +0 -1
  115. package/out/assets/PemBlock-Dxx6k9MH.js +0 -1
  116. package/out/assets/SidebarAccount-CCHZLGdP.js +0 -1
  117. package/out/assets/admin-BepWGXWG.js +0 -2
  118. package/out/assets/app-3D79fY3w.js +0 -1
  119. package/out/assets/arrow-right-D0sGC8QA.js +0 -1
  120. package/out/assets/channelApi-CL7YsIQ-.js +0 -1
  121. package/out/assets/chat-B56sk6od.js +0 -1
  122. package/out/assets/check-DdfnsLKm.js +0 -1
  123. package/out/assets/chevron-down-Xlb3wTxd.js +0 -1
  124. package/out/assets/circle-check-CwAH4dgJ.js +0 -1
  125. package/out/assets/cloud-CcPRoob1.js +0 -1
  126. package/out/assets/code-Dr6STnCn.js +0 -1
  127. package/out/assets/database-DQ7ZtUT9.js +0 -1
  128. package/out/assets/dateTime-D1koKRQU.js +0 -1
  129. package/out/assets/demo-B_6rlIjn.js +0 -3
  130. package/out/assets/dist-BGtXa07s.js +0 -9
  131. package/out/assets/download-BLPU-Kzq.js +0 -1
  132. package/out/assets/downloadMessages-7Xbd-HhS.js +0 -1
  133. package/out/assets/ed25519-BEctXF0E.js +0 -1
  134. package/out/assets/filePreview-BvbHWUTG.js +0 -1
  135. package/out/assets/folder-CcbCxm-k.js +0 -1
  136. package/out/assets/game-B0zuqnOh.js +0 -1
  137. package/out/assets/gandengyan-DbQC7hCK.js +0 -1
  138. package/out/assets/index-BLhmAher.css +0 -1
  139. package/out/assets/index-Cf23WD2V.js +0 -29
  140. package/out/assets/join-DQHXjlfH.js +0 -1
  141. package/out/assets/note-DmWqGSS2.js +0 -2
  142. package/out/assets/ping-JILckfMu.js +0 -1
  143. package/out/assets/play-BIl5vwqS.js +0 -1
  144. package/out/assets/plus-DHvLpuuw.js +0 -1
  145. package/out/assets/routes-Dyckj88f.js +0 -1
  146. package/out/assets/search-C-EpsDNl.js +0 -1
  147. package/out/assets/sun-C3IUQTpa.js +0 -1
  148. package/out/assets/tools-BEctXF0E.js +0 -1
  149. package/out/assets/triangle-alert-DUODU79n.js +0 -1
  150. package/out/assets/upload-CpDM23UH.js +0 -1
  151. package/out/assets/useGameRoom-C6UgmIGG.js +0 -1
  152. package/out/assets/web3-CRX1YFmw.js +0 -3
  153. package/out/assets/zhajinhua-QDmSZbOp.js +0 -1
  154. package/out/web3/ed25519/index.html +0 -0
  155. package/out/web3/tools/index.html +0 -0
  156. /package/out/assets/{gandengyan-8eWJAjpY.css → index-8eWJAjpY.css} +0 -0
  157. /package/out/assets/{zhajinhua-BZc4blbW.css → index-BZc4blbW.css} +0 -0
@@ -0,0 +1 @@
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{t as r}from"./SidebarAccount-ClS-N0lq.js";import{n as i,r as a,t as o}from"./filePreview-UI9NH34f.js";import{n as ee,r as te}from"./LanguageToggle-CtzCCAYv.js";import{r as ne,t as re}from"./AppShell-CQhg6DJU.js";import{n as ie,t as ae}from"./LogoIcon-Dxto3Sb4.js";import{t as oe}from"./OpenSidebarButton-Dd0JmKuE.js";import{a as se,c as ce,i as le,n as ue,o as de,r as fe,s as pe,t as me}from"./ChatUi-BepWs-ZU.js";import{t as he}from"./plus-BxxbpH6Q.js";import{t as ge}from"./search-BQi5Z0E-.js";import{G as _e,J as s,U as ve,W as ye,f as c,g as be,i as xe,l as Se,o as Ce,p as we,s as Te,u as Ee,z as De}from"./index-QxXZzOUL.js";import{i as Oe,n as l,r as ke,t as Ae}from"./downloadValidation-B0p9Ai_9.js";import{t as u}from"./channelApi-BwQU0-h1.js";import{t as je}from"./useChannelMessages-BgbYfF2c.js";var Me=ye(`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`}]]),Ne=ye(`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`}]]),Pe=ye(`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`}]]),d=t(e(),1),f=`mostbox.chat.lastReadAt`;function p(e){return Date.parse(e?.lastMessageAt||``)||Date.parse(e?.createdAt||``)||0}function Fe(e){let t=String(e||``).trim().toLowerCase();return t?`${f}:${t}`:``}function Ie(e,t=Date.now()){let n=Number(e);return Math.max(0,Math.floor(Number.isFinite(n)&&n>0?n:t))}function Le(e,t=m()){if(!e||!t)return{};try{let n=t.getItem(e);if(!n)return{};let r=JSON.parse(n);return!r||typeof r!=`object`?{}:Object.entries(r).reduce((e,[t,n])=>{let r=Number(n);return t&&Number.isFinite(r)&&r>=0&&(e[t]=r),e},{})}catch{return{}}}function Re(e,t,n=m()){if(!(!e||!n))try{n.setItem(e,JSON.stringify(t))}catch{}}function ze(e,t,n=Date.now(),r=Date.now()){if(!t)return{changed:!1,value:e};let i=Ie(n,r);return(e[t]||0)>=i?{changed:!1,value:e}:{changed:!0,value:{...e,[t]:i}}}function Be(e,t,n=Date.now()){let r=!1,i={...e};for(let e of t){let t=e?.channelKey||e?.name;!t||i[t]!==void 0||(i[t]=Ie(p(e),n),r=!0)}return{changed:r,value:r?i:e}}function Ve(e,{channelName:t,messageTime:n,activeChannelName:r=``,messageAuthor:i=``,userAddress:a=``,now:o=Date.now()}){if(!t)return{changed:!1,notify:!1,value:e};let ee=Ie(n,o),te=t===r,ne=String(i||``).toLowerCase()===String(a||``).toLowerCase();if(te||ne)return{...ze(e,t,ee,o),notify:!1};let re=e[t]||0;if(re<ee)return{changed:!1,notify:!0,value:e};let ie=Math.max(0,ee-1);return re===ie?{changed:!1,notify:!0,value:e}:{changed:!0,notify:!0,value:{...e,[t]:ie}}}function He(e,t){let n=e?.channelKey||e?.name;return p(e)>(t[n]||0)}function m(){if(!(typeof window>`u`))return window.localStorage}var h=n(),Ue=3,We=30,Ge=/^[a-zA-Z0-9_-]+$/,Ke=1e4,qe=12e3,Je=1200;function g(e){return e?.channelKey||e?.name||``}function _(e){return e?.channelId||e?.name||``}function v(e){return e?.remark||_(e)}var Ye=`chat-file`;function Xe(e,t){return e.type.startsWith(`image/`)?`image`:e.type.startsWith(`video/`)?`video`:e.type.startsWith(`audio/`)?`audio`:e.type.startsWith(`text/`)?`text`:o(t)}function Ze(e){return e?`${e.slice(0,6)}...${e.slice(-4)}`:`Unknown`}function Qe(e){return/#[a-fA-F0-9]{4}$/.test(String(e||``).trim())}function $e(){if(typeof window>`u`)return;let e=window;return e.AudioContext||e.webkitAudioContext}function y(){let e=c(e=>e.isDarkMode),t=c(e=>e.setIsDarkMode),n=c(e=>e.hasBackend),s=c(e=>e.addToast),ye=c(e=>e.openConnectModal),f=Ee(e=>e.identity),Ie=Ee(e=>e.openLoginModal),[m,y]=(0,d.useState)([]),[b,x]=(0,d.useState)(null),[S,C]=(0,d.useState)(``),[et,w]=(0,d.useState)(``),[tt,T]=(0,d.useState)([]),[nt,rt]=(0,d.useState)(``),[it,at]=(0,d.useState)(``),[ot,E]=ne(!1),[st,ct]=(0,d.useState)(``),[D,O]=(0,d.useState)(!1),[lt,ut]=(0,d.useState)(!1),[dt,k]=ne(!1),[ft,A]=(0,d.useState)(null),[j,M]=(0,d.useState)(null),[pt,N]=(0,d.useState)(!1),[mt,ht]=(0,d.useState)(``),[gt,_t]=(0,d.useState)(!1),[vt,yt]=(0,d.useState)(null),[bt,xt]=(0,d.useState)(!1),[P,F]=(0,d.useState)({}),[I,L]=(0,d.useState)(null),[St,R]=(0,d.useState)([]),[Ct,wt]=(0,d.useState)(!1),[Tt,Et]=(0,d.useState)(!1),[Dt,Ot]=(0,d.useState)(!1),[kt,z]=(0,d.useState)({}),B=f?.identity===`user`,At=B&&!Dt?f.logo:``,jt=(0,d.useRef)(null),Mt=(0,d.useRef)(null),Nt=(0,d.useRef)(``),V=(0,d.useRef)(null),H=(0,d.useRef)(!1),Pt=(0,d.useRef)(0),U=(0,d.useRef)(new Map),W=(0,d.useRef)(new Set),G=n===!0,{t:K,compareStrings:Ft,formatDate:It,formatTime:Lt,formatDateTime:Rt}=_e(),q=(0,d.useCallback)(async(e,t)=>{s(await be(e,t),`error`)},[s]),J=(0,d.useMemo)(()=>Fe(f?.address),[f?.address]),zt=(0,d.useCallback)((e,t=Date.now())=>{e&&z(n=>{let r=ze(n,e,t);return r.changed?(Re(J,r.value),r.value):n})},[J]),Y=(0,d.useCallback)(()=>{if(H.current||typeof window>`u`)return;let e=$e();if(e)try{let t=V.current||new e;V.current=t,t.state===`suspended`&&t.resume().catch(()=>{}),H.current=!0}catch{}},[]),Bt=(0,d.useCallback)(()=>{if(!H.current)return;let e=Date.now();if(e-Pt.current<Je)return;Pt.current=e;let t=$e();if(t)try{let e=V.current||new t;if(V.current=e,e.state===`suspended`){e.resume().catch(()=>{});return}let n=e.createGain();n.gain.setValueAtTime(1e-4,e.currentTime),n.gain.exponentialRampToValueAtTime(.08,e.currentTime+.015),n.gain.exponentialRampToValueAtTime(1e-4,e.currentTime+.18),n.connect(e.destination),[740,980].forEach((t,r)=>{let i=e.createOscillator();i.type=`sine`,i.frequency.setValueAtTime(t,e.currentTime),i.connect(n),i.start(e.currentTime+r*.035),i.stop(e.currentTime+.16+r*.035)})}catch{}},[]),Vt=(0,d.useCallback)(()=>({displayName:f?.displayName||f?.username||``,avatar:f?.avatar}),[f?.avatar,f?.displayName,f?.username]),X=(0,d.useCallback)(async(e=g(b))=>{if(!e||!G||!f){R([]);return}wt(!0);try{R(await u.getChannelMembers(e))}catch(e){R([]),await q(e,K(`chat.error.members`))}finally{wt(!1)}},[b,G,q,K,f]);function Ht(e,t){switch(e){case`channel:message`:{let e=t?.channelKey||t?.channel,n=t?.message,r=Number(n?.timestamp)||Date.now();if(e){y(t=>t.map(t=>g(t)===e?{...t,lastMessageAt:new Date(r).toISOString()}:t));let t=e===Nt.current;z(i=>{let a=Ve(i,{channelName:e,messageTime:r,activeChannelName:t?e:``,messageAuthor:n?.author,userAddress:f?.address});return a.changed&&Re(J,a.value),a.notify&&Bt(),a.changed?a.value:i})}break}case`channel:peer:online`:case`channel:peer:offline`:b&&u.getChannelPeers(g(b)).catch(e=>{console.warn(`[Chat] Failed to fetch peers on event:`,e.message)});break;case`channel:joined`:case`channel:left`:$(),X();break;case`user:metadata:updated`:t?.scope===`channels`&&$();break;case`download:success`:{let e=U.current.get(t.taskId);e&&(U.current.delete(t.taskId),W.current.delete(e.cid),F(t=>({...t,[e.cid]:{status:`available`}})),s(K(`chat.attachment.downloadCompleted`,{fileName:t.fileName||ce(e.fileName)}),`success`),Yt(e,t.fileName||e.fileName));break}case`download:error`:case`download:cancelled`:{let n=U.current.get(t.taskId);n&&(U.current.delete(t.taskId),W.current.delete(n.cid),F(r=>({...r,[n.cid]:{status:`error`,message:e===`download:cancelled`?K(`chat.attachment.downloadCancelled`):t.error||K(`chat.attachment.downloadFailed`)}})),s(e===`download:cancelled`?K(`chat.attachment.downloadCancelled`):t.error||K(`chat.attachment.downloadFailed`),`error`));break}}}let Ut=(0,d.useMemo)(()=>m.map(e=>g(e)),[m]),{clearMessages:Wt,messages:Gt,sendMessage:Kt,syncMessages:qt}=je({isReady:G,enabled:!!f,channelName:g(b),extraSubscribedChannelNames:Ut,peerId:st,waitForPeerId:!0,onSyncError:e=>q(e,K(`chat.error.messages`)),onSocketEvent:Ht,onReconnect:$});function Z(){return G?!0:(ye(),!1)}function Q(){return f?!0:(Ie(),!1)}(0,d.useEffect)(()=>{let e=()=>{C(new URLSearchParams(window.location.search).get(`channel`)||``)};return e(),window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,d.useEffect)(()=>{f&&C(new URLSearchParams(window.location.search).get(`channel`)||``)},[f?.address]),(0,d.useEffect)(()=>{Ot(!1)},[f?.logo]),(0,d.useEffect)(()=>{Nt.current=g(b)},[b]),(0,d.useEffect)(()=>{z(Le(J))},[J]),(0,d.useEffect)(()=>{!J||m.length===0||z(e=>{let t=Be(e,m);return t.changed&&Re(J,t.value),t.changed?t.value:e})},[J,m]),(0,d.useEffect)(()=>(window.addEventListener(`pointerdown`,Y,{passive:!0}),window.addEventListener(`keydown`,Y),()=>{window.removeEventListener(`pointerdown`,Y),window.removeEventListener(`keydown`,Y)}),[Y]),(0,d.useEffect)(()=>()=>{V.current?.close().catch(()=>{}),V.current=null,H.current=!1},[]),(0,d.useEffect)(()=>{jt.current?.scrollIntoView({behavior:`smooth`})},[Gt]),(0,d.useEffect)(()=>{if(!G){ct(``);return}we.get(`/api/node-id`).json().then(e=>ct(e.id)).catch(e=>{console.warn(`[Chat] Failed to fetch node ID:`,e.message),q(e,K(`chat.error.nodeId`))})},[G,q,K]),(0,d.useEffect)(()=>{G&&f&&$()},[n,G,f?.address]),(0,d.useEffect)(()=>{if(b&&G){let e=g(b);qt(e,{replace:!0}),u.getChannelPeers(e).catch(()=>{}),X(e)}},[b,n,G,X,qt]),(0,d.useEffect)(()=>{!pt||!b||X(g(b))},[b,X,pt]),(0,d.useEffect)(()=>{if(S&&m.length>0){let e=m.find(e=>g(e)===S)||m.find(e=>_(e)===S);e&&(!b||g(b)!==g(e))?$t(e):e&&b&&g(b)===g(e)&&(b.createdAt!==e.createdAt||b.coreKey!==e.coreKey||b.lastMessageAt!==e.lastMessageAt||b.pinned!==e.pinned||b.remark!==e.remark||b.type!==e.type)&&x(e)}},[m,b,S]),(0,d.useEffect)(()=>{f||(y([]),x(null),C(``),M(null),Wt(),at(``),ct(``),N(!1),yt(null),R([]),F({}),z({}),W.current.clear(),U.current.clear())},[Wt,f?.address]);function Jt(e){return e.length<Ue?K(`chat.validation.nameMin`,{count:Ue}):e.length>We?K(`chat.validation.nameMax`,{count:We}):e.includes(`.`)?K(`chat.validation.dotReserved`):Ge.test(e)?``:K(`chat.validation.allowedChars`)}async function $(){if(G)try{y(await u.getChannels({excludeType:`game`}))}catch(e){y([]),await q(e,K(`chat.error.channelList`))}}function Yt(e,t=e.fileName){let n=o(t);yt({cid:e.cid,fileName:t,subtype:n===`file`?e.kind:n})}async function Xt(e){let t=Ae(e.link,K);if(t)return F(n=>({...n,[e.cid]:{status:`error`,message:t}})),!1;try{F(t=>({...t,[e.cid]:{status:`checking`}}));let t=await l.checkDownload(e.link,{timeout:Ke,requestTimeout:qe});return F(n=>({...n,[e.cid]:{status:`available`,message:t.alreadyExists?K(`chat.attachment.localAvailable`):K(`chat.attachment.previewAvailable`)}})),!0}catch(t){let n=await ke(t);return F(t=>({...t,[e.cid]:{status:`error`,message:n}})),!1}}async function Zt(e){L(null),await Xt(e)&&await Qt(e)}async function Qt(e){if(!W.current.has(e.cid)){W.current.add(e.cid),F(t=>({...t,[e.cid]:{status:`available`}}));try{let t=await l.downloadFile(e.link);if(t.alreadyExists||t.fileName){W.current.delete(e.cid),F(t=>({...t,[e.cid]:{status:`available`}})),Yt({...e,fileName:t.fileName||e.fileName},t.fileName||e.fileName);return}t.taskId&&(U.current.set(t.taskId,e),s(K(`chat.attachment.downloadStarted`),`success`))}catch(t){let n=await ke(t);W.current.delete(e.cid),F(t=>({...t,[e.cid]:{status:`error`,message:n}}))}}}async function $t(e){if(!Q()||!Z())return;let t=g(e);zt(t,Math.max(p(e),Date.now())),x(e),C(t),window.history.pushState({},``,`?channel=${encodeURIComponent(t)}`)}async function en(e,t){if(t&&t.stopPropagation(),Q()&&Z()&&!lt){ut(!0);try{if(await u.leaveChannel(e),g(b)===e){x(null),C(``),Wt();let e=new URL(window.location.href);e.searchParams.delete(`channel`),window.history.pushState({},``,e.pathname)}$(),k.close(),A(null)}catch(e){await q(e,K(`chat.error.leave`))}finally{ut(!1)}}}async function tn(e){if(!Q()||!Z())return;let t=!e.pinned,n=g(e);try{let e=await u.setChannelPinned(n,t);y(t=>t.map(t=>g(t)===n?{...t,pinned:e.pinned}:t)),x(t=>t&&g(t)===n?{...t,pinned:e.pinned}:t)}catch(e){await q(e,K(t?`chat.error.pin`:`chat.error.unpin`))}}async function nn(e){let t=e.trim();if(!t||D)return;let n=Jt(t);if(n){s(n,`error`);return}if(Q()&&Z()){O(!0);try{let e=await u.createChannel(t,`public`,Vt());if(e.conflict&&e.candidates?.length){w(e.channelId||t),T(e.candidates),E.close();return}let n=e.channelKey||e.key||e.name||t,r=m.find(e=>g(e)===n),i={...r,name:e.name||t,channelId:e.channelId||e.name||t,channelKey:e.channelKey||e.key||r?.channelKey,fingerprint:e.fingerprint||r?.fingerprint,type:e.type||r?.type||`public`,createdAt:e.createdAt||r?.createdAt,coreKey:e.coreKey||e.key||r?.coreKey,localWriterCoreKey:e.localWriterCoreKey||r?.localWriterCoreKey,writerCoreKeys:e.writerCoreKeys||r?.writerCoreKeys,remark:e.remark||r?.remark},a=g(i);y(e=>e.some(e=>g(e)===a)?e.map(e=>g(e)===a?{...e,...i}:e):[...e,i]),E.close(),await $t(i),X(a),$()}catch(e){await q(e,K(`chat.error.join`))}finally{O(!1)}}}async function rn(e){let t=e.channelId||et;if(!(!t||!e.channelKey||D)&&Q()&&Z()){O(!0);try{let n=await u.createChannel(t,e.type||`public`,{...Vt(),channelKey:e.channelKey,fingerprint:e.fingerprint});if(n.conflict){T(n.candidates||[]);return}let r={...e,...n,name:n.name||t,channelId:n.channelId||t,channelKey:n.channelKey||e.channelKey,remark:n.remark||e.remark},i=g(r);y(e=>e.some(e=>g(e)===i)?e.map(e=>g(e)===i?{...e,...r}:e):[...e,r]),w(``),T([]),await $t(r),X(i),$()}catch(e){await q(e,K(`chat.error.join`))}finally{O(!1)}}}async function an(e,t){if(!e.trim()||!b||!Q()||!Z())return!1;let n=e.trim(),r=g(b);try{let e=await Kt({channelName:r,content:n,author:f.address,authorName:f.displayName||f.username,avatar:f.avatar,attachment:t});return y(t=>t.map(t=>g(t)===r?{...t,lastMessageAt:new Date(Number(e?.timestamp)||Date.now()).toISOString()}:t)),e&&zt(r,Number(e.timestamp)||Date.now()),X(r),!0}catch(e){return await q(e,K(`chat.error.send`)),!1}}async function on(){if(!it.trim())return;let e=it.trim();at(``),await an(e)}function sn(e,t){return`${Ye}/${e}/${t}`}async function cn(e){if(!(!e||e.length===0||!b)&&Q()&&Z()&&!bt){xt(!0);try{for(let t of Array.from(e)){let e=sn(_(b),t.name),n=await l.publishFile(t,e),r=n.fileName||e,i=n.link||`most://${n.cid}?filename=${encodeURIComponent(r)}`;await an(i,{kind:Xe(t,r),cid:n.cid,fileName:r,link:i,mimeType:t.type||void 0,size:t.size})&&s(K(`chat.attachment.published`,{fileName:ce(r)}),`success`)}}catch(e){await q(e,K(`chat.error.attachmentSend`))}finally{xt(!1)}}}async function ln(e){if(!Q()||!Z())return;let t=P[e.cid];if(t?.status!==`checking`){if(t?.status===`error`){L(e);return}if(t?.status!==`available`){await Xt(e)&&await Qt(e);return}await Qt(e)}}async function un(e,t){if(!Q()||!Z())return;let n=g(e),r=await u.setChannelRemark(n,t);return y(e=>e.map(e=>g(e)===n?{...e,remark:r.remark}:e)),x(e=>e&&g(e)===n?{...e,remark:r.remark}:e),r.remark}async function dn(){if(b)try{await un(b,mt)}catch(e){await q(e,K(`chat.error.remark`))}}async function fn(e){if(!(!j||gt)){_t(!0);try{await un(j,e),M(null)}catch(e){await q(e,K(`chat.error.rename`))}finally{_t(!1)}}}function pn(e){if(!e.attachment)return(0,h.jsx)(de,{children:e.content});let t=e.attachment,n=P[t.cid]?.status;return(0,h.jsx)(ue,{children:(0,h.jsx)(pe,{attachment:t,status:n,pending:e.pending,onOpen:ln})})}function mn(e,t){let n=String(e||``).trim();return n?Tt?Qe(n)?n:t?`${n}#${t.slice(-4).toUpperCase()}`:n:n.replace(/#[a-fA-F0-9]{4}$/,``):Ze(t)}function hn(){return(0,h.jsx)(me,{isLoading:Ct,members:St.map(e=>({id:e.address,name:mn(e.displayName,e.address),avatarSrc:xe(e.address,e.avatar)}))})}let gn=B&&!!S&&!b,_n=b?(0,h.jsx)(`h2`,{className:`header-title`,translate:`no`,children:v(b)}):(0,h.jsx)(`h2`,{className:`header-title`,children:K(`chat.title`)}),vn=nt.trim().toLowerCase(),yn=(0,d.useMemo)(()=>[...m].sort((e,t)=>{let n=Number(!!t.pinned)-Number(!!e.pinned);if(n!==0)return n;let r=p(t)-p(e);return r===0?Ft(v(e),v(t)):r}),[m,Ft]),bn=vn?yn.filter(e=>[v(e),_(e),g(e)].some(e=>e.toLowerCase().includes(vn))):yn;return(0,h.jsxs)(re,{className:`chat-app-layout`,defaultHide:B,sidebar:({closeSidebar:e})=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`div`,{className:`sidebar-header sidebar-header-link`,onClick:()=>window.location.href=`/`,children:[(0,h.jsx)(ve,{size:18}),(0,h.jsx)(`h1`,{children:`MOST PEOPLE`})]}),(0,h.jsx)(`div`,{className:`chat-channel-search`,children:(0,h.jsxs)(`div`,{className:`ui-input-control`,children:[(0,h.jsx)(ge,{className:`ui-input-icon`,size:15}),(0,h.jsx)(`input`,{type:`search`,className:`input input-compact`,placeholder:K(`chat.search.placeholder`),value:nt,onChange:e=>rt(e.target.value),"aria-label":K(`chat.search.placeholder`)})]})}),(0,h.jsx)(`nav`,{className:`sidebar-nav`,children:m.length===0?(0,h.jsx)(`div`,{className:`sidebar-empty-state`,children:(0,h.jsx)(`p`,{children:K(`chat.empty.noChannels`)})}):bn.length===0?(0,h.jsx)(`div`,{className:`sidebar-empty-state`,children:(0,h.jsx)(`p`,{children:K(`chat.empty.noMatches`)})}):bn.map(t=>(0,h.jsx)(fe,{active:g(b)===g(t),pinned:!!t.pinned,unread:He(t,kt),title:v(t),onSelect:()=>{$t(t),e()},onTogglePin:()=>void tn(t),onRename:()=>M(t),onLeave:()=>{A(t),k.open()}},g(t)))}),(0,h.jsxs)(`button`,{className:`ui-action-dashed create-channel-btn`,onClick:()=>{!Q()||!Z()||E.open()},children:[(0,h.jsx)(he,{size:16}),K(`chat.joinChannel`)]}),(0,h.jsx)(r,{})]}),headerTitle:_n,sidebarToggleReplacement:B?(0,h.jsx)(`span`,{className:`sidebar-toggle-static-logo`,"aria-hidden":`true`,children:At?(0,h.jsx)(`img`,{className:`sidebar-toggle-static-logo-img`,src:At,alt:``,onError:()=>Ot(!0)}):(0,h.jsx)(ae,{size:18})}):void 0,headerRight:(0,h.jsxs)(`div`,{className:`header-right-actions`,children:[(0,h.jsx)(`button`,{className:`btn btn-icon`,onClick:()=>t(!e),title:K(`common.theme.toggle`),children:e?(0,h.jsx)(ee,{size:16}):(0,h.jsx)(te,{size:16})}),b&&(0,h.jsx)(`button`,{className:`btn btn-icon`,onClick:()=>N(!0),title:K(`chat.channelSettings`),children:(0,h.jsx)(Pe,{size:16})})]}),children:[b?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`div`,{className:`chat-messages`,children:[Gt.length===0?(0,h.jsxs)(`div`,{className:`ui-empty-state chat-messages-empty`,children:[(0,h.jsx)(`div`,{className:`ui-empty-icon empty-icon`,children:(0,h.jsx)(ie,{size:28})}),(0,h.jsx)(`p`,{children:K(`chat.empty.noMessages`)})]}):Gt.map(e=>{let t=e.author===f?.address;return(0,h.jsx)(se,{variant:t?`self`:`other`,pending:e.pending,avatarSrc:xe(e.author,e.avatar||(t?f.avatar:void 0)),author:mn(e.authorName,e.author),time:Lt(e.timestamp),children:pn(e)},e.id||`${e.author}-${e.timestamp}`)}),(0,h.jsx)(`div`,{ref:jt})]}),(0,h.jsx)(le,{message:it,placeholder:K(f?`chat.composer.placeholder`:`chat.composer.signInPlaceholder`),disabled:!f,isPublishingAttachment:bt,attachmentInputRef:Mt,onMessageChange:at,onSend:on,onSelectAttachmentFiles:e=>{cn(e)}})]}):gn?(0,h.jsxs)(`div`,{className:`ui-empty-state chat-welcome`,children:[(0,h.jsx)(`div`,{className:`ui-empty-icon ui-empty-icon-lg welcome-icon`,children:(0,h.jsx)(a,{size:36,className:`ui-spinner`})}),(0,h.jsx)(`h2`,{className:`ui-empty-title`,children:K(`chat.restoring.title`)}),(0,h.jsx)(`p`,{className:`ui-empty-desc`,children:K(`chat.restoring.desc`)})]}):(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(`div`,{className:`ui-empty-state chat-welcome`,children:[(0,h.jsx)(`div`,{className:`ui-empty-icon ui-empty-icon-lg welcome-icon`,children:(0,h.jsx)(ie,{size:36})}),(0,h.jsx)(`h2`,{className:`ui-empty-title`,children:K(`chat.select.title`)}),(0,h.jsx)(`p`,{className:`ui-empty-desc`,children:K(`chat.select.desc`)}),(0,h.jsx)(oe,{label:K(`chat.openChannelList`)})]})}),ot&&(0,h.jsx)(Ce,{title:K(`chat.joinChannel`),placeholder:K(`chat.join.placeholder`),confirmText:K(`chat.join.confirm`),validate:Jt,onConfirm:nn,onClose:()=>E.close(),isLoading:D,loadingText:K(`chat.join.joining`)}),tt.length>0&&(0,h.jsx)(Se,{onClose:()=>{D||(w(``),T([]))},children:(0,h.jsxs)(`div`,{className:`confirm-modal channel-conflict-modal`,onClick:e=>e.stopPropagation(),children:[(0,h.jsxs)(`div`,{className:`modal-header`,children:[(0,h.jsx)(`h3`,{children:K(`chat.conflict.title`)}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-icon`,onClick:()=>{D||(w(``),T([]))},"aria-label":K(`common.close`),children:(0,h.jsx)(De,{size:18})})]}),(0,h.jsx)(`div`,{className:`channel-conflict-list`,children:tt.map(e=>(0,h.jsxs)(`button`,{type:`button`,className:`channel-conflict-option`,onClick:()=>void rn(e),disabled:D,children:[(0,h.jsx)(`span`,{className:`channel-conflict-title`,translate:`no`,children:v(e)}),(0,h.jsx)(`span`,{className:`channel-conflict-meta`,translate:`no`,children:_(e)}),(0,h.jsxs)(`span`,{className:`channel-conflict-meta`,children:[e.onlineCount?` · ${K(`chat.channel.onlineCount`,{count:e.onlineCount})}`:``,e.local?` · ${K(`chat.channel.localAlready`)}`:``]}),e.lastMessageAt&&(0,h.jsx)(`span`,{className:`channel-conflict-meta`,children:K(`chat.channel.recentActive`,{time:Rt(e.lastMessageAt)})})]},e.channelKey||e.fingerprint))})]})}),j&&(0,h.jsx)(Ce,{title:K(`chat.renameChannel`),placeholder:K(`chat.remark.placeholder`),defaultValue:j.remark||``,confirmText:K(`chat.remark.save`),onConfirm:fn,onClose:()=>{gt||M(null)},isLoading:gt,loadingText:K(`chat.remark.saving`),allowEmpty:!0,validate:e=>e.length>50?K(`chat.remark.tooLong`):``}),dt&&ft&&(0,h.jsx)(Te,{title:K(`chat.leaveChannel`),message:K(`chat.leaveConfirm`,{channel:v(ft)}),confirmText:K(lt?`chat.leaving`:`chat.leaveChannel`),onConfirm:()=>en(g(ft),void 0),danger:!0,onClose:()=>{k.close(),A(null)}}),I&&(0,h.jsx)(Se,{onClose:()=>L(null),children:(0,h.jsxs)(`div`,{className:`confirm-modal`,onClick:e=>e.stopPropagation(),children:[(0,h.jsxs)(`div`,{className:`modal-header`,children:[(0,h.jsx)(`h3`,{children:K(`chat.attachment.noSeedsTitle`)}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-icon`,onClick:()=>L(null),"aria-label":K(`common.close`),children:(0,h.jsx)(De,{size:18})})]}),(0,h.jsx)(`p`,{children:P[I.cid]?.message||K(`chat.attachment.noSeedsFallback`)}),(0,h.jsxs)(`div`,{className:`modal-actions`,children:[(0,h.jsx)(`button`,{type:`button`,className:`btn btn-secondary`,onClick:()=>L(null),children:K(`common.cancel`)}),(0,h.jsx)(`button`,{type:`button`,className:`btn btn-primary`,onClick:()=>Zt(I),disabled:P[I.cid]?.status===`checking`,children:P[I.cid]?.status===`checking`?K(`app.checking`):K(`chat.attachment.retryCheck`)})]})]})}),vt&&(0,h.jsx)(Oe,{item:vt,isBackendReady:G,getFileDownloadUrl:l.getFileDownloadUrl,onClose:()=>yt(null)}),pt&&b&&(0,h.jsx)(`div`,{className:`channel-detail-overlay`,onClick:()=>N(!1),children:(0,h.jsxs)(`div`,{className:`channel-detail-drawer`,onClick:e=>e.stopPropagation(),children:[(0,h.jsxs)(`div`,{className:`channel-detail-header`,children:[(0,h.jsx)(`h3`,{children:K(`chat.details.title`)}),(0,h.jsx)(`button`,{className:`btn btn-icon`,onClick:()=>N(!1),children:(0,h.jsx)(De,{size:18})})]}),(0,h.jsxs)(`div`,{className:`channel-detail-body`,children:[(0,h.jsxs)(`div`,{className:`channel-detail-section channel-members-section`,children:[(0,h.jsx)(`div`,{className:`channel-detail-label`,children:(0,h.jsx)(`span`,{children:K(`chat.details.members`,{count:St.length})})}),hn()]}),!B&&(0,h.jsx)(`div`,{className:`channel-detail-section`,children:(0,h.jsxs)(`label`,{className:`setting-switch`,children:[(0,h.jsx)(`span`,{children:K(`chat.details.showAddressSuffix`)}),(0,h.jsx)(`input`,{type:`checkbox`,checked:Tt,onChange:e=>Et(e.target.checked)})]})}),!B&&(0,h.jsxs)(`div`,{className:`channel-detail-section`,children:[(0,h.jsxs)(`div`,{className:`channel-detail-label`,children:[(0,h.jsx)(Ne,{size:14}),(0,h.jsx)(`span`,{children:K(`chat.details.channelId`)})]}),(0,h.jsx)(`div`,{className:`ui-meta-box channel-detail-value channel-detail-mono`,translate:`no`,children:_(b)})]}),(0,h.jsxs)(`div`,{className:`channel-detail-section`,children:[(0,h.jsxs)(`div`,{className:`channel-detail-label`,children:[(0,h.jsx)(i,{size:14}),(0,h.jsx)(`span`,{children:K(`chat.remark.placeholder`)})]}),(0,h.jsx)(`input`,{type:`text`,className:`input input-compact`,placeholder:K(`chat.remark.placeholder`),value:mt,onChange:e=>ht(e.target.value),onFocus:()=>ht(b.remark||``),onBlur:()=>dn(),onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},maxLength:50})]}),(0,h.jsxs)(`div`,{className:`channel-detail-section`,children:[(0,h.jsxs)(`div`,{className:`channel-detail-label`,children:[(0,h.jsx)(Me,{size:14}),(0,h.jsx)(`span`,{children:K(`chat.channel.createdAt`)})]}),(0,h.jsx)(`div`,{className:`ui-meta-box channel-detail-value`,children:b.createdAt?It(b.createdAt):`-`})]})]}),!B&&(0,h.jsx)(`div`,{className:`channel-detail-footer`,children:(0,h.jsx)(`button`,{className:`btn btn-secondary btn-block`,onClick:()=>{N(!1),A(b),k.open()},children:K(`chat.leaveChannel`)})})]})})]})}var b=s(`/chat/`)({component:y});export{b as Route};
@@ -1 +1 @@
1
- import{W as e}from"./index-Cf23WD2V.js";var t=e(`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`}]]);export{t};
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`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`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`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`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]);export{t};
@@ -1 +1 @@
1
- import{W as e}from"./index-Cf23WD2V.js";var t=e(`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`}]]);export{t};
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`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`}]]);export{t};
@@ -1 +1 @@
1
- import{W as e}from"./index-Cf23WD2V.js";var t=e(`notebook-pen`,[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]);export{t};
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`notebook-pen`,[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
@@ -1 +1 @@
1
- import{W as e}from"./index-Cf23WD2V.js";var t=e(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]);export{t};
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
@@ -1 +1 @@
1
- import{W as e}from"./index-Cf23WD2V.js";var t=e(`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`}]]);export{t};
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`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`}]]);export{t};
@@ -1 +1 @@
1
- import{W as e}from"./index-Cf23WD2V.js";var t=e(`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`}]]),n=e(`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`}]]);export{t as n,n as t};
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`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`}]]),n=e(`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`}]]);export{t as n,n as t};
@@ -0,0 +1 @@
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),n=e(`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`}]]);export{t as n,n as t};
@@ -0,0 +1 @@
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),n=e(`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`}]]),r=e(`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`}]]);export{n,t as r,r as t};
@@ -1,3 +1,3 @@
1
- import{n as e,o as t}from"./jsx-runtime-Bt-cYkS5.js";import{b as n}from"./index-Cf23WD2V.js";import{t as r}from"./channelApi-CL7YsIQ-.js";var i=t(e(),1);function a(e=``,t=[]){let n=[e,...t];return[...new Set(n.filter(Boolean))]}function o(e=[]){return a(``,e).join(`
1
+ import{n as e,o as t}from"./jsx-runtime-Bt-cYkS5.js";import{b as n}from"./index-QxXZzOUL.js";import{t as r}from"./channelApi-BwQU0-h1.js";var i=t(e(),1);function a(e=``,t=[]){let n=[e,...t];return[...new Set(n.filter(Boolean))]}function o(e=[]){return a(``,e).join(`
2
2
  `)}function s(e,t){let n=new Set(e),r=new Set(t);return{subscribe:[...r].filter(e=>!n.has(e)),unsubscribe:[...n].filter(e=>!r.has(e))}}function c(e){return String(e.id||`${e.author||``}-${e.timestamp||``}-${e.content||``}`)}function l({isReady:e,enabled:t=!0,channelName:l=``,extraSubscribedChannelNames:u=[],peerId:d=``,waitForPeerId:f=!1,limit:p=100,reconnectBaseDelay:m=2500,acceptMessage:h,getMessageKey:g=c,onSyncError:_,onSocketEvent:v,onReconnect:y}){let[b,x]=(0,i.useState)([]),[S,C]=(0,i.useState)(!1),w=(0,i.useMemo)(()=>o(u),[u]),T=(0,i.useRef)(null),E=(0,i.useRef)(l),D=(0,i.useRef)(u),O=(0,i.useRef)(null),k=(0,i.useRef)(0),A=(0,i.useRef)(h),j=(0,i.useRef)(g),M=(0,i.useRef)(v),N=(0,i.useRef)(_),P=(0,i.useRef)(y),F=(0,i.useRef)(d),I=(0,i.useRef)(new Set);(0,i.useEffect)(()=>{D.current=w?w.split(`
3
- `):[]},[w]),(0,i.useEffect)(()=>{A.current=h},[h]),(0,i.useEffect)(()=>{j.current=g},[g]),(0,i.useEffect)(()=>{M.current=v},[v]),(0,i.useEffect)(()=>{N.current=_},[_]),(0,i.useEffect)(()=>{P.current=y},[y]);let L=(0,i.useCallback)(e=>{let t=A.current;return t?e.filter(t):e},[]),R=(0,i.useCallback)((e,t,n=!0)=>{let r=[...e];for(let e of L(t)){let t=j.current(e);if(n){let n=r.findIndex(t=>t.pending&&t.author?.toLowerCase()===e.author?.toLowerCase()&&t.content===e.content);if(n!==-1){r[n]={...e,id:e.id||t};continue}}r.some(e=>j.current(e)===t)||r.push({...e,id:e.id||t})}return r},[L]),z=(0,i.useCallback)((e,t)=>{T.current?.readyState===WebSocket.OPEN&&T.current.send(JSON.stringify({event:e,data:t}))},[]),B=(0,i.useCallback)(e=>{let t=new Set(e.filter(Boolean)),n=s(I.current,t);for(let e of n.unsubscribe)z(`channel:unsubscribe`,{channel:e});for(let e of n.subscribe)z(`channel:subscribe`,{channel:e});I.current=t},[z]),V=(0,i.useCallback)(()=>a(E.current,D.current),[]),H=(0,i.useCallback)(async(t=E.current,n={})=>{if(!t||!e)return[];try{let e=L(await r.getChannelMessages(t,p));return x(t=>n.replace?e:R(t,e,!1)),e}catch(e){return n.replace&&x([]),await N.current?.(e),[]}},[L,e,p,R]);(0,i.useEffect)(()=>{F.current=d,d&&(z(`register`,{peerId:d}),f&&(B(V()),E.current&&H(E.current,{replace:!0})))},[V,d,B,H,f,z]);let U=(0,i.useCallback)(()=>{x([])},[]),W=(0,i.useCallback)(async({channelName:e=E.current,content:t,author:n,authorName:i,avatar:a,attachment:o,optimisticId:s})=>{let c=t.trim();if(!e||!c)return null;let l={id:s||`${n}-${Date.now()}-${Math.random().toString(36).slice(2)}`,author:n,authorName:i,content:c,timestamp:Date.now(),pending:!0,attachment:o};x(e=>[...e,l]);try{let t=await r.sendChannelMessage({channelName:e,content:c,author:n,authorName:i,avatar:a,attachment:o});return x(e=>e.map(e=>e.id===l.id?{...t.message,id:t.message.id||j.current(t.message)}:e)),t.message}catch(e){throw x(e=>e.filter(e=>e.id!==l.id)),e}},[]);return(0,i.useEffect)(()=>{E.current=l,!(!e||!t)&&(l&&H(l,{replace:!0}),(!f||F.current)&&B(V()))},[l,t,w,V,e,B,H,f]),(0,i.useEffect)(()=>{!e||!t||f&&!F.current||B(V())},[t,V,e,B,f]),(0,i.useEffect)(()=>{if(!e||!t){C(!1);return}let r=!1;k.current=0;async function i(){let e=new WebSocket(await n(`/ws`));if(r){e.close();return}e.onopen=()=>{C(!0),k.current=0,F.current&&e.send(JSON.stringify({event:`register`,data:{peerId:F.current}})),(!f||F.current)&&(I.current.clear(),B(V()),E.current&&H(E.current,{replace:!0}),P.current?.())},e.onmessage=e=>{try{let t=JSON.parse(e.data);M.current?.(t.event,t.data),t.event===`channel:message`&&t.data?.channel===E.current&&t.data?.message&&x(e=>R(e,[t.data.message]))}catch{}},e.onclose=()=>{if(C(!1),r)return;let e=k.current;if(e>=20)return;let t=Math.min(m*2**e,3e4);k.current=e+1,O.current=setTimeout(i,t)},e.onerror=()=>e.close(),T.current=e}return i(),()=>{r=!0,O.current&&clearTimeout(O.current),T.current?.close(),T.current=null,I.current.clear()}},[t,V,e,R,m,B,H,f]),{clearMessages:U,connected:S,messages:b,sendMessage:W,setMessages:x,syncMessages:H}}export{l as t};
3
+ `):[]},[w]),(0,i.useEffect)(()=>{A.current=h},[h]),(0,i.useEffect)(()=>{j.current=g},[g]),(0,i.useEffect)(()=>{M.current=v},[v]),(0,i.useEffect)(()=>{N.current=_},[_]),(0,i.useEffect)(()=>{P.current=y},[y]);let L=(0,i.useCallback)(e=>{let t=A.current;return t?e.filter(t):e},[]),R=(0,i.useCallback)((e,t,n=!0)=>{let r=[...e];for(let e of L(t)){let t=j.current(e);if(n){let n=r.findIndex(t=>t.pending&&t.author?.toLowerCase()===e.author?.toLowerCase()&&t.content===e.content);if(n!==-1){r[n]={...e,id:e.id||t};continue}}r.some(e=>j.current(e)===t)||r.push({...e,id:e.id||t})}return r},[L]),z=(0,i.useCallback)((e,t)=>{T.current?.readyState===WebSocket.OPEN&&T.current.send(JSON.stringify({event:e,data:t}))},[]),B=(0,i.useCallback)(e=>{let t=new Set(e.filter(Boolean)),n=s(I.current,t);for(let e of n.unsubscribe)z(`channel:unsubscribe`,{channel:e});for(let e of n.subscribe)z(`channel:subscribe`,{channel:e});I.current=t},[z]),V=(0,i.useCallback)(()=>a(E.current,D.current),[]),H=(0,i.useCallback)(async(t=E.current,n={})=>{if(!t||!e)return[];try{let e=L(await r.getChannelMessages(t,p));return x(t=>n.replace?e:R(t,e,!1)),e}catch(e){return n.replace&&x([]),await N.current?.(e),[]}},[L,e,p,R]);(0,i.useEffect)(()=>{F.current=d,d&&(z(`register`,{peerId:d}),f&&(B(V()),E.current&&H(E.current,{replace:!0})))},[V,d,B,H,f,z]);let U=(0,i.useCallback)(()=>{x([])},[]),W=(0,i.useCallback)(async({channelName:e=E.current,content:t,author:n,authorName:i,avatar:a,attachment:o,optimisticId:s})=>{let c=t.trim();if(!e||!c)return null;let l={id:s||`${n}-${Date.now()}-${Math.random().toString(36).slice(2)}`,author:n,authorName:i,avatar:a,content:c,timestamp:Date.now(),pending:!0,attachment:o};x(e=>[...e,l]);try{let t=await r.sendChannelMessage({channelName:e,content:c,author:n,authorName:i,avatar:a,attachment:o});return x(e=>e.map(e=>e.id===l.id?{...t.message,id:t.message.id||j.current(t.message)}:e)),t.message}catch(e){throw x(e=>e.filter(e=>e.id!==l.id)),e}},[]);return(0,i.useEffect)(()=>{E.current=l,!(!e||!t)&&(l&&H(l,{replace:!0}),(!f||F.current)&&B(V()))},[l,t,w,V,e,B,H,f]),(0,i.useEffect)(()=>{!e||!t||f&&!F.current||B(V())},[t,V,e,B,f]),(0,i.useEffect)(()=>{if(!e||!t){C(!1);return}let r=!1;k.current=0;async function i(){let e=new WebSocket(await n(`/ws`));if(r){e.close();return}e.onopen=()=>{C(!0),k.current=0,F.current&&e.send(JSON.stringify({event:`register`,data:{peerId:F.current}})),(!f||F.current)&&(I.current.clear(),B(V()),E.current&&H(E.current,{replace:!0}),P.current?.())},e.onmessage=e=>{try{let t=JSON.parse(e.data);M.current?.(t.event,t.data),t.event===`channel:message`&&t.data?.channel===E.current&&t.data?.message&&x(e=>R(e,[t.data.message]))}catch{}},e.onclose=()=>{if(C(!1),r)return;let e=k.current;if(e>=20)return;let t=Math.min(m*2**e,3e4);k.current=e+1,O.current=setTimeout(i,t)},e.onerror=()=>e.close(),T.current=e}return i(),()=>{r=!0,O.current&&clearTimeout(O.current),T.current?.close(),T.current=null,I.current.clear()}},[t,V,e,R,m,B,H,f]),{clearMessages:U,connected:S,messages:b,sendMessage:W,setMessages:x,syncMessages:H}}export{l as t};
@@ -0,0 +1 @@
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{t as r}from"./SidebarAccount-ClS-N0lq.js";import{G as i,U as a,W as o,Y as s,f as c,g as l,u}from"./index-QxXZzOUL.js";import{t as d}from"./channelApi-BwQU0-h1.js";import{t as f}from"./useChannelMessages-BgbYfF2c.js";var p=o(`spade`,[[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5`,key:`1aw2pz`}]]),m=o(`swords`,[[`polyline`,{points:`14.5 17.5 3 6 3 3 6 3 17.5 14.5`,key:`1hfsw2`}],[`line`,{x1:`13`,x2:`19`,y1:`19`,y2:`13`,key:`1vrmhu`}],[`line`,{x1:`16`,x2:`20`,y1:`16`,y2:`20`,key:`1bron3`}],[`line`,{x1:`19`,x2:`21`,y1:`21`,y2:`19`,key:`13pww6`}],[`polyline`,{points:`14.5 6.5 18 3 21 3 21 6 17.5 9.5`,key:`hbey2j`}],[`line`,{x1:`5`,x2:`9`,y1:`14`,y2:`18`,key:`1hf58s`}],[`line`,{x1:`7`,x2:`4`,y1:`17`,y2:`20`,key:`pidxm4`}],[`line`,{x1:`3`,x2:`5`,y1:`19`,y2:`21`,key:`1pehsh`}]]),h=n(),g=[{id:`gandengyan`,labelKey:`game.gandengyan.title`,href:`/game/gandengyan/`,icon:(0,h.jsx)(m,{size:16})},{id:`zhajinhua`,labelKey:`game.zhajinhua.title`,href:`/game/zhajinhua/`,icon:(0,h.jsx)(p,{size:16})}];function _({activeGame:e,closeSidebar:t}){let{t:n}=i();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(s,{to:`/`,className:`sidebar-header sidebar-header-link`,children:[(0,h.jsx)(a,{size:18}),(0,h.jsx)(`h1`,{children:`MOST PEOPLE`})]}),(0,h.jsx)(`nav`,{className:`sidebar-nav`,children:g.map(r=>(0,h.jsxs)(s,{to:r.href,className:`sidebar-nav-btn ${e===r.id?`active`:``}`,onClick:t,children:[r.icon,(0,h.jsx)(`span`,{children:n(r.labelKey)})]},r.id))}),(0,h.jsx)(r,{})]})}var v=t(e(),1),y=`game`,b=`mostbox.game.event`,x=[`gandengyan`,`zhajinhua`],S=`ABCDEFGHJKLMNPQRSTUVWXYZ23456789`;function C(e){let t=String(e||``).trim().toLowerCase();return x.includes(t)?t:``}function w(e){return String(e||``).trim().toUpperCase().replace(/[^A-Z0-9]/g,``).slice(0,8)}function T(e){return/^[A-Z0-9]{4,8}$/.test(String(e||``))}function E(){let e=``;for(let t=0;t<6;t++)e+=S[L(32)];return e}function D(e,t){let n=C(e),r=w(t);return!n||!T(r)?``:`game.${n}.${r.toLowerCase()}`}function O({gameId:e,roomCode:t,event:n,payload:r}){let i=C(e);return{kind:b,version:1,gameId:i,roomCode:w(t),event:String(n||``),eventId:I(i||`game`),payload:r||{}}}function k(e,t={}){try{let n=JSON.parse(String(e||``));if(!n||n.kind!==`mostbox.game.event`||n.version!==1||typeof n.event!=`string`||typeof n.eventId!=`string`)return null;let r=C(n.gameId),i=w(n.roomCode);return!r||!T(i)||t.gameId&&r!==C(t.gameId)||t.roomCode&&i!==w(t.roomCode)?null:{...n,gameId:r,roomCode:i,payload:n.payload&&typeof n.payload==`object`?n.payload:{}}}catch{return null}}function A(e=[],t={}){let n=[],r=new Map,i=``;for(let a of F(e)){let e=k(a.content,t);if(e){if(e.event===`room:create`){let t=M(e.payload?.player,a.author);if(!t)continue;i||=t.address,P(n,r,t);continue}if(e.event===`player:join`){let t=M(e.payload?.player,a.author);t&&P(n,r,t);continue}if(e.event===`player:leave`){let t=N(e.payload?.player?.address||a.author);if(t){let e=n.findIndex(e=>e.address===t);e!==-1&&(n.splice(e,1),r.delete(t))}}}}return{gameId:C(t.gameId),roomCode:w(t.roomCode),hostAddress:i,players:n}}function j(e=[],t={}){let n=null;for(let r of F(e)){let e=k(r.content,t);if(!e||e.event!==`room:state`)continue;let i=Number(e.payload?.seq||0);(!n||i>=Number(n.payload?.seq||0))&&(n=e)}return n}function M(e,t){if(!e||typeof e!=`object`)return null;let n=N(e.address||t);return!n||N(t)!==n?null:{address:n,name:String(e.name||``).trim().slice(0,50)||z(n),publicKey:String(e.publicKey||``).trim(),joinedAt:Number(e.joinedAt||Date.now())}}function N(e){let t=String(e||``).trim();return/^0x[a-fA-F0-9]{40}$/.test(t)?t.toLowerCase():``}function P(e,t,n){let r=t.get(n.address);if(r){Object.assign(r,n);return}e.push(n),t.set(n.address,n)}function F(e){return[...e].sort((e,t)=>Number(e.timestamp||0)-Number(t.timestamp||0))}function I(e){return`${e}_${Date.now()}_${R(4)}`}function L(e){if(globalThis.crypto?.getRandomValues){let t=new Uint32Array(1);return globalThis.crypto.getRandomValues(t),t[0]%e}return Math.floor(Math.random()*e)}function R(e){let t=new Uint8Array(e);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(t);else for(let e=0;e<t.length;e++)t[e]=Math.floor(Math.random()*256);return[...t].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function z(e){return e?`${e.slice(0,6)}...${e.slice(-4)}`:``}function B({gameId:e,onError:t,getPlayerPayload:n}){let r=c(e=>e.hasBackend),i=c(e=>e.checkBackend),a=c(e=>e.openConnectModal),o=u(e=>e.identity),s=u(e=>e.openLoginModal),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)(``),[_,b]=(0,v.useState)(!1),x=r===!0,S=(0,v.useCallback)(async(e,n)=>{let r=await l(e,n);t&&t(r)},[t]),C=(0,v.useCallback)(t=>!!k(t.content,{gameId:e,roomCode:p}),[e,p]),T=(0,v.useCallback)(t=>{let n=k(t.content,{gameId:e,roomCode:p});return n?`${t.author}-${n.eventId}`:`${t.author}-${t.timestamp}-${t.content}`},[e,p]),{clearMessages:A,connected:j,messages:M,sendMessage:N,syncMessages:P}=f({isReady:x,enabled:!!o,channelName:h,limit:500,acceptMessage:C,getMessageKey:T,onSyncError:e=>S(e,`无法读取房间记录`)}),F=(0,v.useMemo)(()=>M.map(t=>({message:t,event:k(t.content,{gameId:e,roomCode:p})})).filter(e=>e.event),[e,M,p]),I=(0,v.useCallback)(()=>o?x?!0:(a(),!1):(s(),!1),[x,a,s,o]);(0,v.useEffect)(()=>{r===null&&i()},[i,r]);let L=(0,v.useCallback)(async(r,i=!1)=>{if(!I()||!o)return!1;let a=i?E():w(r),s=D(e,a);if(!s)return t&&t(`请输入 4-8 位房间码`),!1;b(!0);try{let t=await d.createChannel(s,y);if(t.conflict)throw Error(`房间码存在多个候选,请换一个房间码`);let r=t.channelKey||t.key||s;return await V(r,o,e,a,i?`room:create`:`player:join`,{player:n?n(o):H(o)}),m(a),g(r),A(),!0}catch(e){return await S(e,i?`创建房间失败`:`进入房间失败`),!1}finally{b(!1)}},[I,e,n,t,S,A,o]);return{channelName:h,connected:j,createRoom:(0,v.useCallback)(()=>L(``,!0),[L]),ensureReady:I,isBackendReady:x,joinRoom:(0,v.useCallback)(e=>L(e),[L]),joining:_,messages:M,roomCode:p,roomEvents:F,sendRoomEvent:(0,v.useCallback)(async(t,n={})=>{if(!I()||!o||!h||!p)return!1;let r=O({gameId:e,roomCode:p,event:t,payload:n}),i=JSON.stringify(r);try{return await N({channelName:h,content:i,author:o.address,authorName:U(o),optimisticId:`${o.address}-${r.eventId}`}),!0}catch(e){return await S(e,`发送房间事件失败`),!1}},[h,I,e,S,p,N,o]),setRoomCode:m,syncMessages:P,userIdentity:o}}async function V(e,t,n,r,i,a){let o=O({gameId:n,roomCode:r,event:i,payload:a});await d.sendChannelMessage({channelName:e,content:JSON.stringify(o),author:t.address,authorName:U(t)})}function H(e){return{address:e.address,name:U(e),publicKey:``,joinedAt:Date.now()}}function U(e){return e.displayName||e.username}export{p as a,_ as i,A as n,j as r,B as t};
@@ -1 +1 @@
1
- import{W as e}from"./index-Cf23WD2V.js";var t=e(`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`}]]),n=e(`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`}]]);export{t as n,n as t};
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`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`}]]),n=e(`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`}]]);export{t as n,n as t};
@@ -1 +1 @@
1
- import{W as e}from"./index-Cf23WD2V.js";var t=e(`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`}]]);export{t};
1
+ import{W as e}from"./index-QxXZzOUL.js";var t=e(`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`}]]);export{t};
Binary file
Binary file
Binary file
@@ -1,9 +1,13 @@
1
- <!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-BLhmAher.css" data-precedence="default"/><title>下载 MostBox 桌面客户端</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="下载 MostBox 桌面客户端,获得完整的 P2P 文件分享、下载校验和持续做种能力"/><link rel="modulepreload" href="/assets/index-Cf23WD2V.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="modulepreload" href="/assets/download-BLPU-Kzq.js"/><link rel="modulepreload" href="/assets/cloud-CcPRoob1.js"/><link rel="modulepreload" href="/assets/code-Dr6STnCn.js"/><link rel="modulepreload" href="/assets/download-0rM8xVCe.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
1
+ <!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-BdaFEQG-.css" data-precedence="default"/><title>下载 MostBox 桌面客户端</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="下载 MostBox 桌面客户端,获得完整的 P2P 文件分享、下载校验和持续做种能力"/><link rel="modulepreload" href="/assets/index-QxXZzOUL.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
2
2
  (function() {
3
3
  var theme = localStorage.getItem('theme');
4
4
  if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
5
5
  document.documentElement.setAttribute('data-theme', 'dark');
6
6
  }
7
+ var locale = localStorage.getItem('mostbox.locale');
8
+ var normalizedLocale = locale === 'en' ? 'en' : 'zh-CN';
9
+ document.documentElement.setAttribute('lang', normalizedLocale);
10
+ document.documentElement.setAttribute('data-locale', normalizedLocale);
7
11
  })();
8
12
  </script></head><body><script>
9
13
  window.onerror = function(message, source, lineno, colno, error) {
@@ -12,4 +16,4 @@
12
16
  window.onunhandledrejection = function(event) {
13
17
  console.error('[Unhandled Promise Rejection]', event.reason);
14
18
  };
15
- </script><!--$--><div class="download-page"><nav class="mkt-nav"><div class="mkt-nav-inner"><a href="/" class="mkt-nav-logo"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-left" aria-hidden="true"><path d="m12 19-7-7 7-7"></path><path d="M19 12H5"></path></svg><span>MOST PEOPLE</span></a></div></nav><section class="download-hero"><div class="mkt-container"><div class="download-hero-icon"><svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg></div><h1 class="download-hero-title">下载客户端</h1><p class="download-hero-desc">桌面客户端是当前 MVP 的首选入口,内置本地 P2P 节点,提供发布、下载校验和持续做种的完整能力。Web 端只连接已有 MostBox 节点。</p></div></section><section class="download-platforms"><div class="mkt-container"><h2 class="download-section-title">选择你的平台</h2><div class="download-options"><div class="ui-segmented-control download-source-tabs" role="tablist" aria-label="下载来源"><button type="button" role="tab" aria-selected="false" disabled="" class="ui-segmented-option download-source-tab"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud" aria-hidden="true"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"></path></svg>Cloudflare R2</button><button type="button" role="tab" aria-selected="true" class="ui-segmented-option download-source-tab is-active"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code" aria-hidden="true"><path d="m16 18 6-6-6-6"></path><path d="m8 6-6 6 6 6"></path></svg>GitHub Releases</button></div><p class="download-source-note">正在获取 Cloudflare R2 高速镜像。</p><div class="download-platform-grid"><article class="download-platform-card is-recommended"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>x64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 <!-- -->.exe</a></div></div><span class="download-recommended-badge">当前</span></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>arm64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 <!-- -->.exe</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>x64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 <!-- -->.dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>arm64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 <!-- -->.dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>x64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 <!-- -->.AppImage</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>arm64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 <!-- -->.AppImage</a></div></div></article></div></div></div></section><section class="download-comparison"><div class="mkt-container"><h2 class="download-section-title">Web 端 vs 桌面端</h2><div class="download-table-wrap"><table class="download-table"><thead><tr><th>功能</th><th>Web 端</th><th>桌面端</th></tr></thead><tbody><tr><td>节点能力</td><td class="col-web">连接已有节点</td><td class="col-desktop">内置本地节点</td></tr><tr><td>P2P 文件分享</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>下载校验</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>持续做种</td><td class="col-web">依赖所连节点</td><td class="col-desktop">默认开启</td></tr><tr><td>大文件传输</td><td class="col-web">依赖所连节点</td><td class="col-desktop">10GB 上限内</td></tr></tbody></table></div></div></section><section class="download-cta"><div class="mkt-container"><p class="download-hero-desc">使用 npm 入口请先安装 Node.js &gt;= 22.12,然后运行 npx most-box@latest 启动本机完整节点。</p></div></section><section class="download-cta"><div class="mkt-container"><a href="/" class="btn btn-primary">返回首页</a></div></section><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><p class="mkt-footer-copy">MostBox</p></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-Cf23WD2V.js","/assets/jsx-runtime-Bt-cYkS5.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-Cf23WD2V.js"}}],css:$R[8]=["/assets/index-BLhmAher.css"]},"/download/":$R[9]={preloads:$R[10]=["/assets/download-BLPU-Kzq.js","/assets/cloud-CcPRoob1.js","/assets/code-Dr6STnCn.js","/assets/download-0rM8xVCe.js"]}}},matches:$R[11]=[$R[12]={i:"__root__",u:1781235812129,s:"success",ssr:!0},$R[13]={i:"downloaddownload",u:1781235812131,s:"success",ssr:!0}],lastMatchId:"downloaddownload"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-Cf23WD2V.js"></script></body></html>
19
+ </script><!--$--><div class="download-page"><nav class="mkt-nav"><div class="mkt-nav-inner"><a href="/" class="mkt-nav-logo"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-left" aria-hidden="true"><path d="m12 19-7-7 7-7"></path><path d="M19 12H5"></path></svg><span>MOST PEOPLE</span></a><div class="mkt-nav-cta"><button type="button" class="mkt-theme-toggle" aria-label="切换主题" title="切换主题"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><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"></path></svg></button><button type="button" class="language-toggle mkt-theme-toggle" aria-label="切换到英文" title="切换到英文"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button></div></div></nav><section class="download-hero"><div class="mkt-container"><div class="download-hero-icon"><svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg></div><h1 class="download-hero-title">下载客户端</h1><p class="download-hero-desc">桌面客户端是当前 MVP 的首选入口,内置本地 P2P 节点,提供发布、下载校验和持续做种的完整能力。Web 端只连接已有 MostBox 节点。</p></div></section><section class="download-platforms"><div class="mkt-container"><h2 class="download-section-title">选择你的平台</h2><div class="download-options"><div class="ui-segmented-control download-source-tabs" role="tablist" aria-label="下载来源"><button type="button" role="tab" aria-selected="false" disabled="" class="ui-segmented-option download-source-tab"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud" aria-hidden="true"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"></path></svg>Cloudflare R2</button><button type="button" role="tab" aria-selected="true" class="ui-segmented-option download-source-tab is-active"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code" aria-hidden="true"><path d="m16 18 6-6-6-6"></path><path d="m8 6-6 6 6 6"></path></svg>GitHub Releases</button></div><p class="download-source-note">正在获取 Cloudflare R2 高速镜像。</p><div class="download-platform-grid"><article class="download-platform-card is-recommended"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>x64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a></div></div><span class="download-recommended-badge">当前</span></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>arm64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>x64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>arm64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>x64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>arm64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article></div></div></div></section><section class="download-comparison"><div class="mkt-container"><h2 class="download-section-title">Web 端 vs 桌面端</h2><div class="download-table-wrap"><table class="download-table"><thead><tr><th>功能</th><th>Web 端</th><th>桌面端</th></tr></thead><tbody><tr><td>节点能力</td><td class="col-web">连接已有节点</td><td class="col-desktop">内置本地节点</td></tr><tr><td>P2P 文件分享</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>下载校验</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>持续做种</td><td class="col-web">依赖所连节点</td><td class="col-desktop">默认开启</td></tr><tr><td>大文件传输</td><td class="col-web">依赖所连节点</td><td class="col-desktop">10GB 上限内</td></tr></tbody></table></div></div></section><section class="download-cta"><div class="mkt-container"><p class="download-hero-desc">使用 npm 入口请先安装 Node.js &gt;= 22.12,然后运行 npx most-box@latest 启动本机完整节点。</p></div></section><section class="download-cta"><div class="mkt-container"><a href="/" class="btn btn-primary">回首页</a></div></section><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><p class="mkt-footer-copy">MostBox</p></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-QxXZzOUL.js","/assets/jsx-runtime-Bt-cYkS5.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-QxXZzOUL.js"}}],css:$R[8]=["/assets/index-BdaFEQG-.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1781463960205,s:"success",ssr:!0},$R[11]={i:"downloaddownload",u:1781463960206,s:"success",ssr:!0}],lastMatchId:"downloaddownload"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-QxXZzOUL.js"></script></body></html>
Binary file
Binary file
Binary file
package/out/index.html CHANGED
@@ -1,9 +1,13 @@
1
- <!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-BLhmAher.css" data-precedence="default"/><title>MostBox</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="P2P 文件分享,无需注册"/><link rel="modulepreload" href="/assets/index-Cf23WD2V.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="modulepreload" href="/assets/routes-Dyckj88f.js"/><link rel="modulepreload" href="/assets/MarketingLayout-BTIbv4fW.js"/><link rel="modulepreload" href="/assets/LogoIcon-CYQ7cHd5.js"/><link rel="modulepreload" href="/assets/arrow-right-D0sGC8QA.js"/><link rel="modulepreload" href="/assets/check-DdfnsLKm.js"/><link rel="modulepreload" href="/assets/download-0rM8xVCe.js"/><link rel="modulepreload" href="/assets/wallet-YxbxCi7C.js"/><link rel="modulepreload" href="/assets/hard-drive-CCdIvSap.js"/><link rel="modulepreload" href="/assets/notebook-pen-B4VSbweh.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
1
+ <!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-BdaFEQG-.css" data-precedence="default"/><title>MostBox</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="P2P 文件分享,无需注册"/><link rel="modulepreload" href="/assets/index-QxXZzOUL.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
2
2
  (function() {
3
3
  var theme = localStorage.getItem('theme');
4
4
  if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
5
5
  document.documentElement.setAttribute('data-theme', 'dark');
6
6
  }
7
+ var locale = localStorage.getItem('mostbox.locale');
8
+ var normalizedLocale = locale === 'en' ? 'en' : 'zh-CN';
9
+ document.documentElement.setAttribute('lang', normalizedLocale);
10
+ document.documentElement.setAttribute('data-locale', normalizedLocale);
7
11
  })();
8
12
  </script></head><body><script>
9
13
  window.onerror = function(message, source, lineno, colno, error) {
@@ -12,4 +16,4 @@
12
16
  window.onunhandledrejection = function(event) {
13
17
  console.error('[Unhandled Promise Rejection]', event.reason);
14
18
  };
15
- </script><!--$--><div class="mkt-layout"><nav class="mkt-nav"><div class="mkt-nav-inner"><a class="mkt-nav-logo active" href="/" data-status="active" aria-current="page"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.4"></rect><rect x="14" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="2" y="14" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="14" y="14" width="8" height="8" rx="2" fill="var(--accent)"></rect></svg>MOST PEOPLE</a><div class="mkt-nav-cta"><button class="mkt-theme-toggle" aria-label="切换主题"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><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"></path></svg></button><a href="/download/" class="btn btn-primary mkt-nav-preview"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载客户端</a><a href="/app/" class="btn btn-secondary">打开 Web</a></div></div></nav><main class="mkt-layout-main"><div class="portal-page"><section class="portal-hero"><div class="mkt-container"><h1 class="portal-hero-title">MOST PEOPLE</h1><p class="portal-hero-subtitle">去中心化 P2P 工具箱</p></div></section><section class="portal-cards-section"><div class="mkt-container"><div class="portal-cards"><button class="portal-card active"><a title="打开MostBox" href="/app/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></div><div class="portal-card-title">MostBox</div><div class="portal-card-subtitle">P2P 文件分享</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开P2P 聊天" href="/chat/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square" aria-hidden="true"><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"></path></svg></div><div class="portal-card-title">P2P 聊天</div><div class="portal-card-subtitle">频道加密通讯</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开笔记" href="/note/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-notebook-pen" aria-hidden="true"><path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"></path><path d="M2 6h4"></path><path d="M2 10h4"></path><path d="M2 14h4"></path><path d="M2 18h4"></path><path d="M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"></path></svg></div><div class="portal-card-title">笔记</div><div class="portal-card-subtitle">加密云备份</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button><button class="portal-card "><a title="打开游戏" href="/game/gandengyan/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-gamepad2 lucide-gamepad-2" aria-hidden="true"><line x1="6" x2="10" y1="11" y2="11"></line><line x1="8" x2="8" y1="9" y2="13"></line><line x1="15" x2="15.01" y1="12" y2="12"></line><line x1="18" x2="18.01" y1="10" y2="10"></line><path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"></path></svg></div><div class="portal-card-title">游戏</div><div class="portal-card-subtitle">P2P 牌桌</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开Web3" href="/web3/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wallet" aria-hidden="true"><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"></path><path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"></path></svg></div><div class="portal-card-title">Web3</div><div class="portal-card-subtitle">账户工具箱</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button></div><div class="portal-node-actions" aria-label="节点入口"><button class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg>Web 连接节点</button><a href="/admin/" class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hard-drive" aria-hidden="true"><path d="M10 16h.01"></path><path d="M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><path d="M21.946 12.013H2.054"></path><path d="M6 16h.01"></path></svg>节点管理</a></div></div></section><section class="portal-marketing"><div class="mkt-container"><div class="portal-marketing-inner"><div class="portal-marketing-header"><h2>P2P 文件分享,无需注册</h2><p>基于 Hyperswarm 的去中心化文件传输,让文件分享回归点对点。MostBox 不是云盘;链接来自 CID,可用性来自当前在线种子。当前 MVP 优先使用桌面客户端。</p></div><div class="portal-marketing-features"><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>无需云端账号,使用本地身份隔离数据</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Hyperswarm P2P 直连传输</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>GB 级大文件流式处理</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相同文件 = 相同 CID,链接可反复校验</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>下载完成后默认继续做种</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相比微信、QQ 或网盘,不依赖中心化账号和云端托管</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Web 端只连接已有节点,桌面端提供完整 P2P 能力</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>MIT 开源,自托管,数据完全自主掌控</span></div></div><div class="portal-marketing-steps"><div class="portal-step"><span class="portal-step-num">1</span><div class="portal-step-content"><strong>下载客户端</strong><p>支持 Windows、macOS 和 Linux,桌面端提供完整的 P2P 能力。</p><p class="portal-step-link"><a href="/download/">前往下载页<!-- --> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></p></div></div><div class="portal-step"><span class="portal-step-num">2</span><div class="portal-step-content"><strong>安装并运行</strong><p>安装后打开应用,无需单独安装 Node.js。</p></div></div><div class="portal-step"><span class="portal-step-num">3</span><div class="portal-step-content"><strong>开始分享</strong><p>发布文件生成 most:// 链接,朋友下载校验通过后也会成为新的种子。</p></div></div></div><div class="portal-actions"><a href="/app/" class="btn btn-primary">进入 <!-- -->MostBox<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right" aria-hidden="true"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg></a></div></div></div></section></div></main><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><div class="mkt-footer-links"><a class="active" href="/" data-status="active" aria-current="page">关于</a><a href="/ping/">网络</a><a href="https://github.com/most-people/most" target="_blank" rel="noopener noreferrer">GitHub</a></div><span class="mkt-footer-copy">© <!-- -->2026<!-- --> MOST PEOPLE · MIT License</span></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-Cf23WD2V.js","/assets/jsx-runtime-Bt-cYkS5.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-Cf23WD2V.js"}}],css:$R[8]=["/assets/index-BLhmAher.css"]},"/":$R[9]={preloads:$R[10]=["/assets/routes-Dyckj88f.js","/assets/MarketingLayout-BTIbv4fW.js","/assets/LogoIcon-CYQ7cHd5.js","/assets/arrow-right-D0sGC8QA.js","/assets/check-DdfnsLKm.js","/assets/download-0rM8xVCe.js","/assets/wallet-YxbxCi7C.js","/assets/hard-drive-CCdIvSap.js","/assets/notebook-pen-B4VSbweh.js"]}}},matches:$R[11]=[$R[12]={i:"__root__",u:1781235811957,s:"success",ssr:!0},$R[13]={i:"",u:1781235812062,s:"success",ssr:!0}],lastMatchId:""})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-Cf23WD2V.js"></script></body></html>
19
+ </script><!--$--><div class="mkt-layout"><nav class="mkt-nav"><div class="mkt-nav-inner"><a class="mkt-nav-logo active" href="/" data-status="active" aria-current="page"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.4"></rect><rect x="14" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="2" y="14" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="14" y="14" width="8" height="8" rx="2" fill="var(--accent)"></rect></svg>MOST PEOPLE</a><div class="mkt-nav-cta"><button type="button" class="mkt-theme-toggle" aria-label="切换主题" title="切换主题"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><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"></path></svg></button><button type="button" class="language-toggle mkt-theme-toggle" aria-label="切换到英文" title="切换到英文"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button><a href="/download/" class="btn btn-primary mkt-nav-preview"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载客户端</a><button type="button" class="btn btn-secondary">开始使用</button></div></div></nav><main class="mkt-layout-main"><div class="portal-page"><section class="portal-hero"><div class="mkt-container"><h1 class="portal-hero-title">MOST PEOPLE</h1><p class="portal-hero-subtitle">去中心化 P2P 工具箱</p></div></section><section class="portal-cards-section"><div class="mkt-container"><div class="portal-cards"><button class="portal-card active"><a title="打开MostBox" href="/app/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></div><div class="portal-card-title">MostBox</div><div class="portal-card-subtitle">P2P 文件分享</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开P2P 聊天" href="/chat/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square" aria-hidden="true"><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"></path></svg></div><div class="portal-card-title">P2P 聊天</div><div class="portal-card-subtitle">频道加密通讯</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开笔记" href="/note/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-notebook-pen" aria-hidden="true"><path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"></path><path d="M2 6h4"></path><path d="M2 10h4"></path><path d="M2 14h4"></path><path d="M2 18h4"></path><path d="M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"></path></svg></div><div class="portal-card-title">笔记</div><div class="portal-card-subtitle">加密云备份</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button><button class="portal-card "><a title="打开游戏" href="/game/gandengyan/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-gamepad2 lucide-gamepad-2" aria-hidden="true"><line x1="6" x2="10" y1="11" y2="11"></line><line x1="8" x2="8" y1="9" y2="13"></line><line x1="15" x2="15.01" y1="12" y2="12"></line><line x1="18" x2="18.01" y1="10" y2="10"></line><path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"></path></svg></div><div class="portal-card-title">游戏</div><div class="portal-card-subtitle">P2P 牌桌</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开Web3" href="/web3/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wallet" aria-hidden="true"><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"></path><path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"></path></svg></div><div class="portal-card-title">Web3</div><div class="portal-card-subtitle">账户工具箱</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button></div><div class="portal-node-actions" aria-label="节点入口"><button class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg>Web 连接节点</button><a href="/admin/" class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hard-drive" aria-hidden="true"><path d="M10 16h.01"></path><path d="M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><path d="M21.946 12.013H2.054"></path><path d="M6 16h.01"></path></svg>节点管理</a></div></div></section><section class="portal-marketing"><div class="mkt-container"><div class="portal-marketing-inner"><div class="portal-marketing-header"><h2>P2P 文件分享,无需注册</h2><p>基于 Hyperswarm 的去中心化文件传输,让文件分享回归点对点。MostBox 不是云盘;链接来自 CID,可用性来自当前在线种子。当前 MVP 优先使用桌面客户端。</p></div><div class="portal-marketing-features"><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>无需云端账号,使用本地身份隔离数据</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Hyperswarm P2P 直连传输</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>GB 级大文件流式处理</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相同文件 = 相同 CID,链接可反复校验</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>下载完成后默认继续做种</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相比微信、QQ 或网盘,不依赖中心化账号和云端托管</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Web 端只连接已有节点,桌面端提供完整 P2P 能力</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>MIT 开源,自托管,数据完全自主掌控</span></div></div><div class="portal-marketing-steps"><div class="portal-step"><span class="portal-step-num">1</span><div class="portal-step-content"><strong>下载客户端</strong><p>支持 Windows、macOS 和 Linux,桌面端提供完整的 P2P 能力。</p><p class="portal-step-link"><a href="/download/">前往下载页<!-- --> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></p></div></div><div class="portal-step"><span class="portal-step-num">2</span><div class="portal-step-content"><strong>安装并运行</strong><p>安装后打开应用,无需单独安装 Node.js。</p></div></div><div class="portal-step"><span class="portal-step-num">3</span><div class="portal-step-content"><strong>开始分享</strong><p>发布文件生成 most:// 链接,朋友下载校验通过后也会成为新的种子。</p></div></div></div><div class="portal-actions"><a href="/app/" class="btn btn-primary">进入 MostBox<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right" aria-hidden="true"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg></a></div></div></div></section></div></main><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><div class="mkt-footer-links"><a class="active" href="/" data-status="active" aria-current="page">关于</a><a href="/ping/">网络</a><a href="https://github.com/most-people/most" target="_blank" rel="noopener noreferrer">GitHub</a></div><span class="mkt-footer-copy">© <!-- -->2026<!-- --> MOST PEOPLE · MIT License</span></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-QxXZzOUL.js","/assets/jsx-runtime-Bt-cYkS5.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-QxXZzOUL.js"}}],css:$R[8]=["/assets/index-BdaFEQG-.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1781463959927,s:"success",ssr:!0},$R[11]={i:"",u:1781463960146,s:"success",ssr:!0}],lastMatchId:""})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-QxXZzOUL.js"></script></body></html>
Binary file