most-box 0.2.3 → 0.2.5
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.
- package/README.md +3 -26
- package/electron/main.js +366 -30
- package/electron/preload.js +16 -1
- package/electron/updateChecker.js +18 -11
- package/electron/updateChecker.test.js +23 -7
- package/out/admin/index.html +0 -0
- package/out/app/index.html +0 -0
- package/out/assets/AppShell-oF8wPXde.js +1 -0
- package/out/assets/FilePreviewOverlay-DTBZt89J.js +1 -0
- package/out/assets/LanguageToggle-HAJ3D6Ne.js +1 -0
- package/out/assets/MarketingHeader-B3vYocUz.js +1 -0
- package/out/assets/MarketingLayout-CapVVXTP.js +1 -0
- package/out/assets/{MarketingThemeToggle-DHVvLtms.js → MarketingThemeToggle-B47H68ro.js} +1 -1
- package/out/assets/{MilkdownEditor-WdGJyEa8.js → MilkdownEditor-CRA9oxMp.js} +1 -1
- package/out/assets/{OpenSidebarButton-CtsDYSq0.js → OpenSidebarButton-D3JRO-Hh.js} +1 -1
- package/out/assets/{SidebarAccount-4NFTcAF7.js → SidebarAccount-8_hQAYXx.js} +1 -1
- package/out/assets/arrow-right-mNO53HQi.js +1 -0
- package/out/assets/{circle-alert-BQoSDxUe.js → circle-alert-CofRTRHr.js} +1 -1
- package/out/assets/cloud-DAGFCFIp.js +1 -0
- package/out/assets/{copy-BtJHJnqH.js → copy-5aEv78Eq.js} +1 -1
- package/out/assets/{download-Bg-OdoxM.js → download-Bhqn6hL1.js} +1 -1
- package/out/assets/{downloadValidation-DS9_BV-n.js → downloadValidation-eInMiVSX.js} +1 -1
- package/out/assets/{external-link-m8ZIQe4p.js → external-link-CNR21yFA.js} +1 -1
- package/out/assets/{file-text-DG1orIkZ.js → file-text-CFfvvCnM.js} +1 -1
- package/out/assets/folder-BGJCjyba.js +1 -0
- package/out/assets/{hard-drive-BB-sllXA.js → hard-drive-4vHpA5kz.js} +1 -1
- package/out/assets/index--p9MKNEl.js +31 -0
- package/out/assets/index-DEu4udaa.css +1 -0
- package/out/assets/index.lazy-2K3f5PZe.js +1 -0
- package/out/assets/index.lazy-B-2etVwK.js +1 -0
- package/out/assets/index.lazy-B4WTQF5E.js +1 -0
- package/out/assets/index.lazy-BFfsQrRe.js +1 -0
- package/out/assets/index.lazy-C5udBnrO.js +1 -0
- package/out/assets/{index.lazy-DwKnzBXo.js → index.lazy-C84HrZpm.js} +1 -1
- package/out/assets/index.lazy-CBC2N5p_.js +3 -0
- package/out/assets/index.lazy-CzANViGX.js +1 -0
- package/out/assets/index.lazy-D3cw7yyA.js +2 -0
- package/out/assets/{index.lazy-C3z-lGsL.js → index.lazy-DVVZzbCN.js} +1 -1
- package/out/assets/index.lazy-DxZgywoV.js +1 -0
- package/out/assets/{index.lazy-DSjaivix.js → index.lazy-RBLN4SE9.js} +1 -1
- package/out/assets/index.lazy-s4E2z9AY.js +2 -0
- package/out/assets/{key-round-DIQ3Xt5F.js → key-round-BpSdpOHi.js} +1 -1
- package/out/assets/loader-ByMmV2_4.js +1 -0
- package/out/assets/{lock-tf1t2yuy.js → lock-C0pdaery.js} +1 -1
- package/out/assets/{message-square-DaQH7q-P.js → message-square-Eu86zZup.js} +1 -1
- package/out/assets/{mp-DYPYks13.js → mp-CJWipckT.js} +1 -1
- package/out/assets/{music-DaFvU2DL.js → music-Btrhub6z.js} +1 -1
- package/out/assets/{notebook-pen-CqEFOHKx.js → notebook-pen-CfdFgaDE.js} +1 -1
- package/out/assets/play-D5r9Yvbq.js +1 -0
- package/out/assets/plus-Mlh7r_bm.js +1 -0
- package/out/assets/{refresh-cw-roxAhABl.js → refresh-cw--JB8k6mH.js} +1 -1
- package/out/assets/{save-DR0O9ReR.js → save-DN4eprSt.js} +1 -1
- package/out/assets/search-CbzMyENy.js +1 -0
- package/out/assets/{send-m1XCcuPn.js → send-D8p6f8OD.js} +1 -1
- package/out/assets/{shield-check-BwcvTU4U.js → shield-check-c0labdRH.js} +1 -1
- package/out/assets/{trash-2-CNpsqYc1.js → trash-2-zdhWec_U.js} +1 -1
- package/out/assets/triangle-alert-CO_5uXy2.js +1 -0
- package/out/assets/upload-BD23c5Pz.js +1 -0
- package/out/assets/{useChannelMessages-qJTlBnzX.js → useChannelMessages-D_306Ymv.js} +2 -2
- package/out/assets/useGameRoom-CURx56m6.js +1 -0
- package/out/assets/userProfile-oeBvU6ch.js +1 -0
- package/out/assets/{userStore-C4vdYsQp.js → userStore-q0BBZsIV.js} +1 -1
- package/out/assets/{wallet-CozFU6yK.js → wallet-DmZMdK9A.js} +1 -1
- package/out/assets/{wifi-DIR3g_8A.js → wifi-CVqaPDcv.js} +1 -1
- package/out/chat/index.html +0 -0
- package/out/chat/join/index.html +0 -0
- package/out/download/index.html +2 -2
- package/out/game/gandengyan/index.html +0 -0
- package/out/game/index.html +0 -0
- package/out/game/zhajinhua/index.html +0 -0
- package/out/index.html +2 -2
- package/out/note/index.html +0 -0
- package/out/ping/index.html +2 -2
- package/out/profile/index.html +0 -0
- package/out/web3/index.html +0 -0
- package/package.json +8 -1
- package/server/index.js +2 -2
- package/server/src/core/syncTimestamp.js +10 -0
- package/server/src/http/nodeStatus.js +16 -16
- package/server/src/http/routePolicy.js +2 -2
- package/server/src/http/routes/nodeRoutes.js +21 -19
- package/server/src/index.js +578 -960
- package/server/src/utils/accountBackup.js +134 -0
- package/server/src/utils/api.js +149 -9
- package/out/assets/AppShell-B1U4lDqV.js +0 -1
- package/out/assets/FilePreviewOverlay-Cme4vUhr.js +0 -1
- package/out/assets/LanguageToggle-CBpXWdO9.js +0 -1
- package/out/assets/MarketingHeader-CkcBATx2.js +0 -1
- package/out/assets/MarketingLayout-mQV6ciYc.js +0 -1
- package/out/assets/arrow-right-RldN7Rwi.js +0 -1
- package/out/assets/cloud-DHoTMeZY.js +0 -1
- package/out/assets/index-BJ7E8LJN.js +0 -31
- package/out/assets/index-C0xqKeu-.css +0 -1
- package/out/assets/index.lazy-B5hOQuoO.js +0 -2
- package/out/assets/index.lazy-B9ligvAg.js +0 -1
- package/out/assets/index.lazy-BZ7nMBcY.js +0 -3
- package/out/assets/index.lazy-C-2BI6Ew.js +0 -1
- package/out/assets/index.lazy-Cda9sU_h.js +0 -1
- package/out/assets/index.lazy-D5ybxeOu.js +0 -1
- package/out/assets/index.lazy-DMZi3gid.js +0 -1
- package/out/assets/index.lazy-Dvgt53xN.js +0 -1
- package/out/assets/index.lazy-Dvo4Ncqe.js +0 -2
- package/out/assets/index.lazy-GQILyi6o.js +0 -1
- package/out/assets/play-B7q6F75-.js +0 -1
- package/out/assets/plus-H2i2mspM.js +0 -1
- package/out/assets/search-ncblG-zw.js +0 -1
- package/out/assets/triangle-alert-DP9EP7IM.js +0 -1
- package/out/assets/upload-V--8p13l.js +0 -1
- package/out/assets/useGameRoom-C9hu7Cez.js +0 -1
- package/server/src/core/userSyncKeys.js +0 -36
- package/server/src/utils/noteBackup.js +0 -116
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { mostDecode, mostEncode, mostSignMessage } from './mostWallet.js'
|
|
2
|
+
import { calculateNoteCid } from './noteUtils.js'
|
|
3
|
+
|
|
4
|
+
export const ACCOUNT_BACKUP_API_URL = 'https://api.most.box/auth/backup'
|
|
5
|
+
export const ACCOUNT_BACKUP_TYPE = 'mostbox.account-backup'
|
|
6
|
+
export const ACCOUNT_BACKUP_SCHEMA_VERSION = 1
|
|
7
|
+
|
|
8
|
+
async function readBackupApiError(response, fallback) {
|
|
9
|
+
const data = await response
|
|
10
|
+
.clone()
|
|
11
|
+
.json()
|
|
12
|
+
.catch(() => null)
|
|
13
|
+
return data?.error || fallback
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function validateAccountBackupPayload(input) {
|
|
17
|
+
if (!input || typeof input !== 'object') {
|
|
18
|
+
throw new Error('无效的账号备份数据')
|
|
19
|
+
}
|
|
20
|
+
if (
|
|
21
|
+
input.type !== ACCOUNT_BACKUP_TYPE ||
|
|
22
|
+
Number(input.schemaVersion) !== ACCOUNT_BACKUP_SCHEMA_VERSION
|
|
23
|
+
) {
|
|
24
|
+
throw new Error('无效的账号备份格式')
|
|
25
|
+
}
|
|
26
|
+
if (!String(input.ownerAddress || '').trim()) {
|
|
27
|
+
throw new Error('账号备份缺少 ownerAddress')
|
|
28
|
+
}
|
|
29
|
+
if (!Array.isArray(input.notes)) {
|
|
30
|
+
throw new Error('账号备份缺少 notes')
|
|
31
|
+
}
|
|
32
|
+
return input
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function encryptAccountBackup(payload, danger) {
|
|
36
|
+
return mostEncode(JSON.stringify(validateAccountBackupPayload(payload)), danger)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function decryptAccountBackup(content, danger) {
|
|
40
|
+
if (!String(content || '').startsWith('mp://1')) {
|
|
41
|
+
throw new Error('无效的备份数据格式')
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const decrypted = mostDecode(content, danger)
|
|
45
|
+
if (!decrypted) {
|
|
46
|
+
throw new Error('解密失败,请确认当前 Web3 登录账号正确')
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return validateAccountBackupPayload(JSON.parse(decrypted))
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export async function calculateAccountBackupCid(payload) {
|
|
53
|
+
return calculateNoteCid(JSON.stringify(validateAccountBackupPayload(payload)))
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export async function getAccountBackupAuthHeaders(
|
|
57
|
+
wallet,
|
|
58
|
+
method,
|
|
59
|
+
url = ACCOUNT_BACKUP_API_URL
|
|
60
|
+
) {
|
|
61
|
+
const timestamp = Date.now().toString()
|
|
62
|
+
const path = new URL(url).pathname
|
|
63
|
+
const message = `${timestamp}:${String(method).toUpperCase()}:${path}`
|
|
64
|
+
const { address, signature } = await mostSignMessage(wallet.danger, message)
|
|
65
|
+
return {
|
|
66
|
+
Authorization: `${address},${timestamp},${signature}`,
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export async function buildAccountBackupUpload(wallet, payload) {
|
|
71
|
+
const cid = await calculateAccountBackupCid(payload)
|
|
72
|
+
const encrypted = encryptAccountBackup(payload, wallet.danger)
|
|
73
|
+
return {
|
|
74
|
+
cid,
|
|
75
|
+
body: encrypted,
|
|
76
|
+
headers: {
|
|
77
|
+
'Content-Type': 'text/plain',
|
|
78
|
+
'x-backup-cid': cid,
|
|
79
|
+
...(await getAccountBackupAuthHeaders(wallet, 'PUT', ACCOUNT_BACKUP_API_URL)),
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function uploadAccountBackup(
|
|
85
|
+
wallet,
|
|
86
|
+
payload,
|
|
87
|
+
url = ACCOUNT_BACKUP_API_URL
|
|
88
|
+
) {
|
|
89
|
+
const upload = await buildAccountBackupUpload(wallet, payload)
|
|
90
|
+
const response = await fetch(url, {
|
|
91
|
+
method: 'PUT',
|
|
92
|
+
headers: upload.headers,
|
|
93
|
+
body: upload.body,
|
|
94
|
+
})
|
|
95
|
+
if (!response.ok) {
|
|
96
|
+
throw new Error(await readBackupApiError(response, '云备份失败'))
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
cid: upload.cid,
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export async function downloadAccountBackup(
|
|
104
|
+
wallet,
|
|
105
|
+
url = ACCOUNT_BACKUP_API_URL
|
|
106
|
+
) {
|
|
107
|
+
const response = await fetch(url, {
|
|
108
|
+
method: 'GET',
|
|
109
|
+
headers: await getAccountBackupAuthHeaders(wallet, 'GET', url),
|
|
110
|
+
})
|
|
111
|
+
if (response.status === 404) {
|
|
112
|
+
return {
|
|
113
|
+
found: false,
|
|
114
|
+
cid: '',
|
|
115
|
+
time: 0,
|
|
116
|
+
payload: null,
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (!response.ok) {
|
|
120
|
+
throw new Error(await readBackupApiError(response, '云端恢复失败'))
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const encrypted = await response.text()
|
|
124
|
+
if (!encrypted) {
|
|
125
|
+
throw new Error('云端无备份数据')
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
found: true,
|
|
130
|
+
cid: response.headers.get('x-backup-cid') || '',
|
|
131
|
+
time: Number(response.headers.get('x-backup-time') || 0),
|
|
132
|
+
payload: decryptAccountBackup(encrypted, wallet.danger),
|
|
133
|
+
}
|
|
134
|
+
}
|
package/server/src/utils/api.js
CHANGED
|
@@ -3,7 +3,9 @@ import { buildAuthHeaders, normalizeAuthPath } from './auth.js'
|
|
|
3
3
|
|
|
4
4
|
const STORAGE_KEY = 'mostbox_backend_url'
|
|
5
5
|
const INVITE_STORAGE_KEY = 'mostbox_backend_invite'
|
|
6
|
+
const REMOTE_NODES_KEY = 'mostbox_remote_nodes'
|
|
6
7
|
const LOCALHOST_BACKEND_URL = 'http://localhost:1976'
|
|
8
|
+
const MAX_REMOTE_NODES = 8
|
|
7
9
|
|
|
8
10
|
function isLocalFrontendOrigin() {
|
|
9
11
|
if (typeof window === 'undefined') return false
|
|
@@ -30,16 +32,22 @@ function getConfiguredBackendUrl() {
|
|
|
30
32
|
return localStorage.getItem(STORAGE_KEY) || ''
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
function
|
|
34
|
-
const configured =
|
|
35
|
-
if (!configured) return
|
|
35
|
+
function isRemoteBackendUrl(url) {
|
|
36
|
+
const configured = normalizeBackendUrl(url)
|
|
37
|
+
if (!configured) return false
|
|
38
|
+
|
|
36
39
|
try {
|
|
37
40
|
const { hostname } = new URL(configured)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
const normalized = hostname.toLowerCase()
|
|
42
|
+
return !(
|
|
43
|
+
normalized === 'localhost' ||
|
|
44
|
+
normalized === '::1' ||
|
|
45
|
+
normalized === '[::1]' ||
|
|
46
|
+
normalized === '127.0.0.1' ||
|
|
47
|
+
normalized.startsWith('127.')
|
|
48
|
+
)
|
|
41
49
|
} catch {
|
|
42
|
-
return
|
|
50
|
+
return true
|
|
43
51
|
}
|
|
44
52
|
}
|
|
45
53
|
|
|
@@ -48,6 +56,114 @@ function getBackendInvite() {
|
|
|
48
56
|
return localStorage.getItem(INVITE_STORAGE_KEY) || ''
|
|
49
57
|
}
|
|
50
58
|
|
|
59
|
+
function normalizeRemoteNode(input, fallback = {}) {
|
|
60
|
+
if (!input || typeof input !== 'object') return null
|
|
61
|
+
|
|
62
|
+
const url = normalizeBackendUrl(input.url)
|
|
63
|
+
if (!isRemoteBackendUrl(url)) return null
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
url,
|
|
67
|
+
invite: typeof input.invite === 'string' ? input.invite.trim() : '',
|
|
68
|
+
active: input.active === true || fallback.active === true,
|
|
69
|
+
updatedAt: Number(input.updatedAt || fallback.updatedAt || Date.now()),
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function uniqueRemoteNodes(nodes) {
|
|
74
|
+
const byUrl = new Map()
|
|
75
|
+
let activeUrl = ''
|
|
76
|
+
|
|
77
|
+
for (const node of nodes) {
|
|
78
|
+
const normalized = normalizeRemoteNode(node)
|
|
79
|
+
if (!normalized) continue
|
|
80
|
+
|
|
81
|
+
if (normalized.active && !activeUrl) {
|
|
82
|
+
activeUrl = normalized.url
|
|
83
|
+
} else if (normalized.active && activeUrl !== normalized.url) {
|
|
84
|
+
normalized.active = false
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const existing = byUrl.get(normalized.url)
|
|
88
|
+
if (!existing || normalized.updatedAt >= existing.updatedAt) {
|
|
89
|
+
byUrl.set(normalized.url, {
|
|
90
|
+
...existing,
|
|
91
|
+
...normalized,
|
|
92
|
+
active: normalized.active || existing?.active === true,
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return [...byUrl.values()]
|
|
98
|
+
.map(node => ({
|
|
99
|
+
...node,
|
|
100
|
+
active: node.url === activeUrl || (!activeUrl && node.active === true),
|
|
101
|
+
}))
|
|
102
|
+
.sort((a, b) => {
|
|
103
|
+
if (a.active !== b.active) return a.active ? -1 : 1
|
|
104
|
+
return b.updatedAt - a.updatedAt
|
|
105
|
+
})
|
|
106
|
+
.slice(0, MAX_REMOTE_NODES)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function getRemoteNodes() {
|
|
110
|
+
if (typeof window === 'undefined') return []
|
|
111
|
+
|
|
112
|
+
const parsed = parseJsonText(localStorage.getItem(REMOTE_NODES_KEY))
|
|
113
|
+
const nodes = Array.isArray(parsed) ? parsed : []
|
|
114
|
+
|
|
115
|
+
const configured = getConfiguredBackendUrl()
|
|
116
|
+
if (isRemoteBackendUrl(configured)) {
|
|
117
|
+
nodes.push({
|
|
118
|
+
url: configured,
|
|
119
|
+
invite: getBackendInvite(),
|
|
120
|
+
active: true,
|
|
121
|
+
updatedAt: Date.now(),
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return uniqueRemoteNodes(nodes)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function setRemoteNodes(nodes) {
|
|
129
|
+
if (typeof window === 'undefined') return
|
|
130
|
+
|
|
131
|
+
localStorage.setItem(
|
|
132
|
+
REMOTE_NODES_KEY,
|
|
133
|
+
JSON.stringify(uniqueRemoteNodes(nodes))
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function getActiveRemoteNode() {
|
|
138
|
+
return getRemoteNodes().find(node => node.active) || null
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function saveRemoteNode(url, invite = getBackendInvite(), active = true) {
|
|
142
|
+
const cleaned = normalizeBackendUrl(url)
|
|
143
|
+
if (!isRemoteBackendUrl(cleaned)) return
|
|
144
|
+
|
|
145
|
+
const nodes = getRemoteNodes().map(node => ({
|
|
146
|
+
...node,
|
|
147
|
+
active: active ? false : node.active,
|
|
148
|
+
}))
|
|
149
|
+
nodes.unshift({
|
|
150
|
+
url: cleaned,
|
|
151
|
+
invite: (invite || '').trim(),
|
|
152
|
+
active,
|
|
153
|
+
updatedAt: Date.now(),
|
|
154
|
+
})
|
|
155
|
+
setRemoteNodes(nodes)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function clearActiveRemoteNode() {
|
|
159
|
+
setRemoteNodes(
|
|
160
|
+
getRemoteNodes().map(node => ({
|
|
161
|
+
...node,
|
|
162
|
+
active: false,
|
|
163
|
+
}))
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
|
|
51
167
|
function normalizeBackendUrl(url) {
|
|
52
168
|
return (url || '').trim().replace(/\/+$/, '')
|
|
53
169
|
}
|
|
@@ -88,6 +204,15 @@ function normalizePath(path) {
|
|
|
88
204
|
return path.startsWith('/') ? path : `/${path}`
|
|
89
205
|
}
|
|
90
206
|
|
|
207
|
+
function parseJsonText(text) {
|
|
208
|
+
if (!text) return null
|
|
209
|
+
try {
|
|
210
|
+
return JSON.parse(text)
|
|
211
|
+
} catch {
|
|
212
|
+
return null
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
91
216
|
function getBackendAuthPath(url) {
|
|
92
217
|
const requestPath = normalizeAuthPath(url)
|
|
93
218
|
const backendUrl = getBackendUrl()
|
|
@@ -208,6 +333,9 @@ export function setBackendUrl(url) {
|
|
|
208
333
|
const cleaned = normalizeBackendUrl(url)
|
|
209
334
|
if (cleaned) {
|
|
210
335
|
localStorage.setItem(STORAGE_KEY, cleaned)
|
|
336
|
+
if (isRemoteBackendUrl(cleaned)) {
|
|
337
|
+
saveRemoteNode(cleaned)
|
|
338
|
+
}
|
|
211
339
|
} else {
|
|
212
340
|
localStorage.removeItem(STORAGE_KEY)
|
|
213
341
|
}
|
|
@@ -227,11 +355,15 @@ export function setBackendInvite(invite) {
|
|
|
227
355
|
export function configureBackend({ url, invite }) {
|
|
228
356
|
setBackendUrl(url)
|
|
229
357
|
setBackendInvite(invite)
|
|
358
|
+
saveRemoteNode(url, invite)
|
|
230
359
|
}
|
|
231
360
|
|
|
232
361
|
export function clearBackendConnection() {
|
|
233
362
|
setBackendUrl('')
|
|
234
363
|
setBackendInvite('')
|
|
364
|
+
if (typeof window !== 'undefined') {
|
|
365
|
+
clearActiveRemoteNode()
|
|
366
|
+
}
|
|
235
367
|
}
|
|
236
368
|
|
|
237
369
|
export function getBackendUrlExport() {
|
|
@@ -246,8 +378,16 @@ export function getSameOriginBackendUrlExport() {
|
|
|
246
378
|
return getSameOriginBackendUrl()
|
|
247
379
|
}
|
|
248
380
|
|
|
249
|
-
export function
|
|
250
|
-
return
|
|
381
|
+
export function getRemoteUrlExport() {
|
|
382
|
+
return getActiveRemoteNode()?.url || ''
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export function getRemoteInviteExport() {
|
|
386
|
+
return getActiveRemoteNode()?.invite || ''
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export function getRemoteNodesExport() {
|
|
390
|
+
return getRemoteNodes()
|
|
251
391
|
}
|
|
252
392
|
|
|
253
393
|
export function getBackendInviteExport() {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{y as r}from"./userStore-C4vdYsQp.js";import{t as i}from"./LanguageToggle-CBpXWdO9.js";import{B as a}from"./index-BJ7E8LJN.js";var o=r(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),s=t(e(),1);function c(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window?window.matchMedia(e).matches:!1}function l(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,s.useState)(n?t:c(e));return(0,s.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}function u(e=!1,t={}){let[n,r]=(0,s.useState)(e),i=(0,s.useCallback)(()=>{r(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),a=(0,s.useCallback)(()=>{r(e=>e&&(t.onClose?.(),!1))},[t.onClose]);return[n,{open:i,close:a,toggle:(0,s.useCallback)(()=>{n?a():i()},[a,i,n]),set:r}]}var d=n(),f=(0,s.createContext)(null);function p(){let e=(0,s.useContext)(f);if(!e)throw Error(`useAppShell must be used within AppShell`);return e}function m({sidebar:e,className:t=``,headerTitle:n,headerRight:r,sidebarToggleReplacement:c,defaultHide:p=!1,children:m}){let[h,g]=u(!1),[_,v]=(0,s.useState)(p),y=(0,s.useRef)(p),b=l(`(max-width: 768px)`),{t:x}=a(),S=(0,s.useCallback)((e={})=>{g.close(),e.collapse&&v(!0)},[g]);(0,s.useEffect)(()=>{p!==y.current&&(p?S({collapse:!0}):v(!1),y.current=p)},[p,S]);let C=()=>{b?g.toggle():v(!_)},w=()=>{b?g.open():v(!1)},T=b?h:!_;return(0,d.jsx)(f.Provider,{value:{closeSidebar:S,openSidebar:w,isSidebarVisible:T},children:(0,d.jsxs)(`div`,{className:[`app-layout`,t].filter(Boolean).join(` `),children:[(0,d.jsx)(`div`,{className:`sidebar-overlay ${h?`visible`:``}`,onClick:()=>S()}),(0,d.jsx)(`div`,{className:`sidebar ${h?`open`:``} ${_?`collapsed`:``}`,children:e({closeSidebar:S,openSidebar:w})}),(0,d.jsxs)(`div`,{className:`main-content`,children:[(0,d.jsxs)(`header`,{className:`app-header`,children:[(0,d.jsxs)(`div`,{className:`header-left`,children:[c??(0,d.jsx)(`button`,{onClick:C,className:`btn btn-icon sidebar-toggle-btn`,"aria-label":x(b?`appShell.openMenu`:_?`appShell.expandSidebar`:`appShell.collapseSidebar`),children:(0,d.jsx)(o,{size:16})}),n]}),(0,d.jsxs)(`div`,{className:`header-right`,children:[(0,d.jsx)(i,{className:`btn btn-icon app-language-toggle`}),r]})]}),m]})]})})}export{p as n,u as r,m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{y as r}from"./userStore-C4vdYsQp.js";import{t as i}from"./file-text-DG1orIkZ.js";import{t as a}from"./music-DaFvU2DL.js";import{B as o,C as s,N as c}from"./index-BJ7E8LJN.js";var l=r(`film`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]),u=r(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),d=r(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),f=r(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]);function p(e){let t=String(e||``).split(`.`).pop()?.toLowerCase()||``,n=[`jpg`,`jpeg`,`png`,`gif`,`webp`,`svg`,`bmp`,`ico`,`tiff`,`heic`,`heif`],r=[`mp4`,`webm`,`mov`,`avi`,`mkv`,`flv`,`wmv`,`m4v`,`mpeg`,`3gp`],i=[`mp3`,`wav`,`ogg`,`flac`,`aac`,`m4a`,`wma`,`opus`],a=`txt.md.js.ts.jsx.tsx.css.scss.less.json.xml.html.htm.yaml.yml.toml.ini.cfg.conf.log.sh.bash.py.rb.go.rs.java.c.cpp.h.hpp.cs.php.sql.graphql.env.gitignore.dockerfile.readme`.split(`.`);return n.includes(t)?`image`:r.includes(t)?`video`:i.includes(t)?`audio`:a.includes(t)?`text`:`file`}var m=t(e(),1),h=n();function g(e){return e===`image`||e===`video`||e===`audio`}function _({item:e,isBackendReady:t,getFileDownloadUrl:n,onClose:r}){let{t:l}=o(),[u,f]=(0,m.useState)(``),[p,_]=(0,m.useState)(!1),[v,y]=(0,m.useState)(``),[b,x]=(0,m.useState)(``);return(0,m.useEffect)(()=>{if(e.subtype!==`text`)return;let r=!1;if(f(``),x(``),!t){f(l(`preview.loadFailed`));return}return _(!0),(async()=>{try{let t=await fetch(n(e.cid),{headers:{...await s(`GET`,`/api/files/${e.cid}/download`),Range:`bytes=0-9999`}});if(!t.ok)throw Error(l(`preview.loadFailed`));let i=await t.text();r||f(i||l(`preview.emptyFile`))}catch{r||f(l(`preview.loadFailed`))}finally{r||_(!1)}})(),()=>{r=!0}},[n,t,e.cid,e.subtype]),(0,m.useEffect)(()=>{if(!g(e.subtype)){y(``);return}if(y(``),x(``),!t){x(l(`preview.loadFailed`));return}let r=``,i=!1;return(async()=>{try{let t=await fetch(n(e.cid),{headers:await s(`GET`,`/api/files/${e.cid}/download`)});if(!t.ok)throw Error(l(`preview.loadFailed`));let a=URL.createObjectURL(await t.blob());r=a,i||y(a)}catch{i||x(l(`preview.loadFailed`))}})(),()=>{i=!0,r&&URL.revokeObjectURL(r)}},[n,t,e.cid,e.subtype]),(0,h.jsxs)(`div`,{className:`preview-overlay`,onClick:r,children:[(0,h.jsx)(`button`,{type:`button`,className:`preview-close`,onClick:r,"aria-label":l(`preview.close`),children:(0,h.jsx)(c,{size:20})}),(0,h.jsxs)(`div`,{onClick:e=>e.stopPropagation(),children:[e.subtype===`image`&&(0,h.jsx)(`div`,{className:`preview-media-wrapper`,children:v?(0,h.jsx)(`img`,{src:v,alt:e.fileName,translate:`no`}):b?(0,h.jsxs)(`div`,{className:`preview-unsupported`,children:[(0,h.jsx)(i,{size:48,className:`preview-file-icon`}),(0,h.jsx)(`p`,{translate:`no`,children:e.fileName}),(0,h.jsx)(`p`,{className:`preview-unsupported-hint`,children:b})]}):(0,h.jsx)(`div`,{className:`preview-loading`,children:(0,h.jsx)(`div`,{className:`preview-loading-spinner`})})}),e.subtype===`video`&&(0,h.jsx)(`div`,{className:`preview-media-wrapper`,children:v?(0,h.jsx)(`video`,{src:v,controls:!0}):b?(0,h.jsxs)(`div`,{className:`preview-unsupported`,children:[(0,h.jsx)(i,{size:48,className:`preview-file-icon`}),(0,h.jsx)(`p`,{translate:`no`,children:e.fileName}),(0,h.jsx)(`p`,{className:`preview-unsupported-hint`,children:b})]}):(0,h.jsx)(`div`,{className:`preview-loading`,children:(0,h.jsx)(`div`,{className:`preview-loading-spinner`})})}),e.subtype===`audio`&&(0,h.jsxs)(`div`,{className:`preview-audio`,children:[(0,h.jsx)(`div`,{className:`preview-audio-icon`,children:(0,h.jsx)(a,{size:36,color:`var(--accent)`})}),(0,h.jsx)(`p`,{className:`preview-audio-filename`,translate:`no`,children:e.fileName}),v?(0,h.jsx)(`audio`,{className:`preview-audio-player`,src:v,controls:!0}):(0,h.jsx)(`div`,{className:`preview-text-loading`,children:b?(0,h.jsx)(`p`,{children:b}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(d,{size:24,className:`preview-text-spinner`}),(0,h.jsx)(`p`,{children:l(`preview.audioLoading`)})]})})]}),e.subtype===`file`&&(0,h.jsxs)(`div`,{className:`preview-unsupported`,children:[(0,h.jsx)(i,{size:48,className:`preview-file-icon`}),(0,h.jsx)(`p`,{translate:`no`,children:e.fileName}),(0,h.jsx)(`p`,{className:`preview-unsupported-hint`,children:l(`preview.unsupported`)})]}),e.subtype===`text`&&(0,h.jsxs)(`div`,{className:`preview-text-container`,children:[(0,h.jsx)(`div`,{className:`preview-text-header`,children:(0,h.jsx)(`span`,{translate:`no`,children:e.fileName})}),p?(0,h.jsxs)(`div`,{className:`preview-text-loading`,children:[(0,h.jsx)(d,{size:24,className:`preview-text-spinner`}),(0,h.jsx)(`p`,{children:l(`preview.textLoading`)}),(0,h.jsx)(`p`,{className:`preview-text-loading-hint`,children:l(`preview.firstSyncHint`)})]}):(0,h.jsx)(`pre`,{className:`preview-text`,translate:`no`,children:u||l(`preview.emptyFile`)})]})]})]})}export{u as a,d as i,p as n,l as o,f as r,_ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-Bt-cYkS5.js";import{y as t}from"./userStore-C4vdYsQp.js";import{B as n,H as r,V as i,f as a}from"./index-BJ7E8LJN.js";var o=t(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),s=t(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),c=t(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),l=t(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),u=e();function d({className:e=``}){let{locale:t,localeName:c,setLocale:l,t:d}=n(),f=d(`common.locale.choose`),p=`${f} (${d(`common.locale.current`)}: ${c})`;return(0,u.jsx)(a,{ariaLabel:f,placement:`bottom-end`,items:i.map(e=>({key:e,label:r[e],icon:e===t?(0,u.jsx)(o,{size:16}):(0,u.jsx)(`span`,{"aria-hidden":`true`}),onSelect:()=>{e!==t&&l(e)}})),renderTrigger:t=>(0,u.jsx)(`button`,{...t,className:[`language-toggle`,e].filter(Boolean).join(` `),"aria-label":f,title:p,children:(0,u.jsx)(s,{size:16})})})}export{o as i,l as n,c as r,d as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-Bt-cYkS5.js";import{t}from"./LanguageToggle-CBpXWdO9.js";import{L as n,M as r}from"./index-BJ7E8LJN.js";import{t as i}from"./MarketingThemeToggle-DHVvLtms.js";var a=e();function o(){return(0,a.jsx)(`nav`,{className:`mkt-nav`,children:(0,a.jsxs)(`div`,{className:`mkt-nav-inner`,children:[(0,a.jsxs)(`button`,{type:`button`,className:`mkt-nav-logo`,onClick:r(),children:[(0,a.jsx)(n,{size:18}),(0,a.jsx)(`span`,{children:`MOST PEOPLE`})]}),(0,a.jsxs)(`div`,{className:`mkt-nav-cta`,children:[(0,a.jsx)(i,{}),(0,a.jsx)(t,{className:`mkt-theme-toggle`})]})]})})}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-Bt-cYkS5.js";import{C as t,t as n}from"./userStore-C4vdYsQp.js";import{t as r}from"./LanguageToggle-CBpXWdO9.js";import{t as i}from"./download-Bg-OdoxM.js";import{B as a,c as o,g as s}from"./index-BJ7E8LJN.js";import{t as c}from"./MarketingThemeToggle-DHVvLtms.js";import{t as l}from"./LogoIcon-B2fFe0l1.js";var u=e();function d(){let e=n(e=>e.identity),d=n(e=>e.openLoginModal),{t:f}=a(),p=s(),m=e?.displayName||e?.username||f(`nav.openWeb`);return(0,u.jsx)(`nav`,{className:`mkt-nav`,children:(0,u.jsxs)(`div`,{className:`mkt-nav-inner`,children:[(0,u.jsxs)(t,{to:`/`,className:`mkt-nav-logo`,children:[(0,u.jsx)(l,{}),`MOST PEOPLE`]}),(0,u.jsxs)(`div`,{className:`mkt-nav-cta`,children:[(0,u.jsx)(c,{}),(0,u.jsx)(r,{className:`mkt-theme-toggle`}),!p&&(0,u.jsxs)(t,{to:`/download/`,className:`btn btn-primary mkt-nav-preview`,children:[(0,u.jsx)(i,{size:16}),f(`nav.downloadClient`)]}),e?(0,u.jsx)(t,{to:`/profile/`,className:`mkt-nav-avatar-trigger`,"aria-label":f(`nav.profile`),title:m,children:(0,u.jsx)(`img`,{className:`mkt-nav-avatar`,src:o(e.address,e.avatar),alt:``,"aria-hidden":`true`})}):(0,u.jsx)(`button`,{type:`button`,className:`btn btn-secondary`,onClick:d,children:f(`nav.getStarted`)})]})]})})}var f={name:`most-box`,version:`0.2.3`,description:`MostBox - P2P file sharing application`,type:`module`,main:`electron/main.js`,bin:{"most-box":`server/cli.js`},files:[`out`,`public`,`electron`,`server/src`,`server/index.js`,`server/cli.js`],scripts:{start:`vite`,server:`node --watch server/index.js`,dev:`vite`,build:`vite build && node scripts/prepare-start-static.mjs`,preview:`vite preview`,serve:`npm run build && node server/index.js`,test:`node --test server/tests/**/*.test.js`,"test:unit":`node --test server/tests/unit/*.test.js`,"test:frontend":`node --test src/tests/*.test.js`,"test:protocol":`node --test --test-name-pattern "extracts CID and filename|matches golden CID samples|publishes a file from Buffer|lists published files|pulls through local seed nodes" server/tests/unit/cid.test.js server/tests/integration/cid.test.js server/tests/integration/engine.test.js`,typecheck:`tsc -p tsconfig.typecheck.json`,"typecheck:strict-router":`tsc -p tsconfig.strict-router.json`,"check:static-output":`node scripts/check-static-output.mjs`,format:`npx prettier --write .`,lint:`npx eslint .`,"r2:cors":`node scripts/configure-r2-cors.mjs`,"electron:dev":`concurrently "npm run build" "wait-on out/index.html && electron ."`,"electron:rebuild":`electron-rebuild -f -w sodium-native`,"electron:build":`npm run build && npm run electron:rebuild && electron-builder`,"electron:build:win":`npm run build && npm run electron:rebuild && electron-builder --win`,"electron:build:win:x64":`npm run electron:build:win -- --x64`,"electron:build:win:arm64":`npm run electron:build:win -- --arm64`,"electron:build:mac":`npm run build && npm run electron:rebuild && electron-builder --mac`,"electron:build:linux":`npm run build && npm run electron:rebuild && electron-builder --linux`},keywords:[`p2p`,`file-sharing`,`hyperswarm`,`hyperdrive`],license:`MIT`,dependencies:{"@dicebear/collection":`^9.4.2`,"@dicebear/core":`^9.4.2`,"@hono/node-server":`^2.0.4`,"@tanstack/react-router":`^1.170.15`,"@tanstack/react-start":`^1.168.25`,b4a:`^1.8.1`,busboy:`^1.6.0`,corestore:`^7.10.0`,dayjs:`^1.11.21`,ethers:`^6.16.0`,eventemitter3:`^5.0.4`,hono:`^4.12.23`,hypercore:`^11.33.1`,hyperdrive:`^13.3.2`,hyperswarm:`^4.17.0`,"ipfs-unixfs-importer":`^17.0.1`,multiformats:`^14.0.0`,tweetnacl:`^1.0.3`,ws:`^8.21.0`},devDependencies:{"@electron/rebuild":`^4.0.4`,"@eslint/js":`^10.0.1`,"@iconify/react":`^6.0.2`,"@mantine/hooks":`^9.3.0`,"@milkdown/crepe":`^7.21.2`,"@milkdown/utils":`^7.21.2`,"@types/react":`^19.2.16`,"@vitejs/plugin-react":`^6.0.2`,concurrently:`^10.0.3`,electron:`^42.3.3`,"electron-builder":`^26.8.1`,esbuild:`^0.28.0`,eslint:`^10.4.1`,globals:`^17.6.0`,ky:`^2.0.2`,"lucide-react":`^1.17.0`,prettier:`^3.8.3`,"qrcode.react":`^4.2.0`,react:`^19.2.7`,"react-dom":`^19.2.7`,typescript:`6.0.3`,"typescript-eslint":`^8.60.1`,vite:`^8.0.16`,"wait-on":`^9.0.10`,zustand:`^5.0.14`},overrides:{"brace-expansion":`5.0.6`,postcss:`8.5.15`,ws:`$ws`},build:{appId:`com.mostbox.app`,productName:`MostBox`,publish:[{provider:`github`,releaseType:`release`}],directories:{output:`dist`},afterPack:`electron/afterPack.cjs`,files:[`out/**/*`,`electron/**/*`,`server/src/**/*`,`server/index.js`,`server/cli.js`,`package.json`,`!**/*.map`,`!electron/**/*.test.js`,`!server/tests/**/*`],asarUnpack:[`**/*.node`,`**/sodium-native/**`],protocols:[{name:`MostBox Link`,schemes:[`most`]}],win:{target:[`nsis`],artifactName:"${productName}-${version}-win-${arch}-setup.${ext}",icon:`public/logo.ico`},nsis:{oneClick:!1,allowToChangeInstallationDirectory:!0,createDesktopShortcut:!0,createStartMenuShortcut:!0,shortcutName:`MostBox`},mac:{artifactName:"${productName}-${version}-mac-${arch}.${ext}",target:[{target:`dmg`,arch:[`x64`,`arm64`]}],icon:`public/logo-512.png`,category:`public.app-category.utilities`},dmg:{contents:[{x:130,y:220},{x:410,y:220,type:`link`,path:`/Applications`}]},linux:{artifactName:"${productName}-${version}-linux-${arch}.${ext}",target:[{target:`AppImage`,arch:[`x64`,`arm64`]}],icon:`public/logo-512.png`,category:`Utility`}}},p=[{to:`/`,labelKey:`footer.about`},{to:`/ping/`,labelKey:`footer.network`},{href:`https://github.com/most-people/most`,labelKey:null,label:`GitHub`,external:!0}],m=f.version;function h(){let{t:e}=a();return(0,u.jsx)(`footer`,{className:`mkt-footer`,children:(0,u.jsx)(`div`,{className:`mkt-container`,children:(0,u.jsxs)(`div`,{className:`mkt-footer-inner`,children:[(0,u.jsx)(`div`,{className:`mkt-footer-links`,children:p.map(n=>`external`in n?(0,u.jsx)(`a`,{href:n.href,target:`_blank`,rel:`noopener noreferrer`,children:n.label},n.href):(0,u.jsx)(t,{to:n.to,children:e(n.labelKey)},n.to))}),(0,u.jsxs)(`span`,{className:`mkt-footer-copy`,children:[`© `,new Date().getFullYear(),` MOST PEOPLE · MIT License`]}),(0,u.jsxs)(`span`,{className:`mkt-footer-build`,translate:`no`,children:[`v`,m]})]})})})}function g({children:e,header:t}){return(0,u.jsxs)(`div`,{className:`mkt-layout`,children:[t??(0,u.jsx)(d,{}),(0,u.jsx)(`main`,{className:`mkt-layout-main`,children:e}),(0,u.jsx)(h,{})]})}export{g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{y as e}from"./userStore-C4vdYsQp.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{y as e}from"./userStore-C4vdYsQp.js";var t=e(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]);export{t};
|