@seqyuan/annodex 0.1.52 → 0.1.54
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +3 -2
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +27 -3
- package/.next/required-server-files.js +3 -1
- package/.next/required-server-files.json +3 -1
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_global-error/page.js +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/agent/[id]/events/route.js +1 -1
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/agent/runtime/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/status/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/extensions/discover/route.js +1 -1
- package/.next/server/app/api/extensions/mcp/route.js +1 -1
- package/.next/server/app/api/extensions/plugin/route.js +1 -1
- package/.next/server/app/api/extensions/plugin-marketplace/route.js +1 -1
- package/.next/server/app/api/extensions/route.js +1 -1
- package/.next/server/app/api/extensions/session/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +1 -1
- package/.next/server/app/api/harness/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/internal/runtime/route.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -1
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/projects/browse/route.js +1 -1
- package/.next/server/app/api/projects/route.js +1 -1
- package/.next/server/app/api/search/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/new/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +1 -1
- package/.next/server/app/api/settings/route.js +1 -1
- package/.next/server/app/api/skills/install/route.js +2 -2
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/soul/route.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/docs/changelog/page.js +11 -0
- package/.next/server/app/docs/changelog/page.js.nft.json +1 -0
- package/.next/server/app/docs/changelog/page_client-reference-manifest.js +1 -0
- package/.next/server/app/docs/changelog.html +10 -0
- package/.next/server/app/docs/changelog.meta +16 -0
- package/.next/server/app/docs/changelog.rsc +24 -0
- package/.next/server/app/docs/changelog.segments/_full.segment.rsc +24 -0
- package/.next/server/app/docs/changelog.segments/_head.segment.rsc +6 -0
- package/.next/server/app/docs/changelog.segments/_index.segment.rsc +7 -0
- package/.next/server/app/docs/changelog.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/docs/changelog.segments/docs/changelog/__PAGE__.segment.rsc +8 -0
- package/.next/server/app/docs/changelog.segments/docs/changelog.segment.rsc +5 -0
- package/.next/server/app/docs/changelog.segments/docs.segment.rsc +5 -0
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page.js +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +3 -3
- package/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +3 -3
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspace/page.js +5 -5
- package/.next/server/app/workspace/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspace.html +1 -1
- package/.next/server/app/workspace.rsc +4 -4
- package/.next/server/app/workspace.segments/_full.segment.rsc +4 -4
- package/.next/server/app/workspace.segments/_head.segment.rsc +1 -1
- package/.next/server/app/workspace.segments/_index.segment.rsc +3 -3
- package/.next/server/app/workspace.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/workspace.segments/workspace/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/workspace.segments/workspace.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +3 -2
- package/.next/server/chunks/6983.js +12 -5
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/CSz6uFOkLtpKpHvCD1S5n/_buildManifest.js +1 -0
- package/.next/static/chunks/4550-eff0bf233a5b0aec.js +3 -0
- package/.next/static/chunks/8500-f62a38ff68ab7f42.js +1 -0
- package/.next/static/chunks/app/docs/changelog/page-7f8ff3ce79d21000.js +1 -0
- package/.next/static/chunks/app/{layout-6f383e02b7aa4d93.js → layout-10d99d038798f290.js} +1 -1
- package/.next/static/chunks/app/workspace/{page-7b5b1c791f7660f3.js → page-cccacfa255ff7d01.js} +3 -3
- package/.next/static/css/b348172dccf4fc09.css +1 -0
- package/bin/annodex.js +299 -0
- package/lib/macos-codex-security.js +316 -0
- package/next.config.ts +1 -1
- package/package.json +2 -1
- package/.next/static/chunks/4550-a87684eaeae37462.js +0 -3
- package/.next/static/css/7cdc2b85523b8b05.css +0 -1
- package/.next/static/e7fyuGkh2l-vJL6OUelZ3/_buildManifest.js +0 -1
- /package/.next/static/{e7fyuGkh2l-vJL6OUelZ3 → CSz6uFOkLtpKpHvCD1S5n}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* macOS Gatekeeper helpers for the vendored @openai/codex native binary.
|
|
6
|
+
*
|
|
7
|
+
* npm-installed codex may carry com.apple.quarantine and/or a Developer ID
|
|
8
|
+
* signature whose certificate chain was revoked. The latter can cause macOS
|
|
9
|
+
* to SIGKILL the process immediately (CSSMERR_TP_CERT_REVOKED). Stripping the
|
|
10
|
+
* broken signature and applying ad-hoc signing (--sign -) downgrades the
|
|
11
|
+
* failure to a first-run Gatekeeper dialog (right-click → Open), matching the
|
|
12
|
+
* hermes-agent Electron recovery pattern.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const { spawnSync, execSync } = require("child_process");
|
|
16
|
+
const fs = require("fs");
|
|
17
|
+
const path = require("path");
|
|
18
|
+
|
|
19
|
+
const CODESIGN = "/usr/bin/codesign";
|
|
20
|
+
const SPCTL = "/usr/sbin/spctl";
|
|
21
|
+
|
|
22
|
+
/** Avoid repeating signature checks on every codex spawn in one process. */
|
|
23
|
+
function getPreparedRegistry() {
|
|
24
|
+
if (!globalThis.__annodexCodexPreparedBinaries) {
|
|
25
|
+
globalThis.__annodexCodexPreparedBinaries = new Map();
|
|
26
|
+
}
|
|
27
|
+
return globalThis.__annodexCodexPreparedBinaries;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const preparingBinaries = new Set();
|
|
31
|
+
|
|
32
|
+
function isBinaryPrepared(binaryPath) {
|
|
33
|
+
const mtime = binaryMtimeMs(binaryPath);
|
|
34
|
+
return mtime !== null && getPreparedRegistry().get(binaryPath) === mtime;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function markBinaryPrepared(binaryPath) {
|
|
38
|
+
const mtime = binaryMtimeMs(binaryPath);
|
|
39
|
+
if (mtime !== null) getPreparedRegistry().set(binaryPath, mtime);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let quarantineClearedForCwd = null;
|
|
43
|
+
|
|
44
|
+
function isDarwin() {
|
|
45
|
+
return process.platform === "darwin";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function codesignOutput(result) {
|
|
49
|
+
return `${result.stdout || ""}${result.stderr || ""}`.trim();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function needsRevokedCertRepair(text) {
|
|
53
|
+
return /CSSMERR_TP_CERT_REVOKED/i.test(text || "");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function binaryMtimeMs(binaryPath) {
|
|
57
|
+
try {
|
|
58
|
+
return fs.statSync(binaryPath).mtimeMs;
|
|
59
|
+
} catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function spctlAssess(binaryPath, timeoutMs = 10_000) {
|
|
65
|
+
if (!isDarwin() || !binaryPath || !fs.existsSync(binaryPath)) {
|
|
66
|
+
return { accepted: false, output: "", error: "missing binary" };
|
|
67
|
+
}
|
|
68
|
+
const result = spawnSync(SPCTL, ["--assess", "--verbose", binaryPath], {
|
|
69
|
+
encoding: "utf8",
|
|
70
|
+
timeout: timeoutMs,
|
|
71
|
+
});
|
|
72
|
+
const output = codesignOutput(result);
|
|
73
|
+
const timedOut = result.error && /timed out/i.test(result.error.message || "");
|
|
74
|
+
return {
|
|
75
|
+
accepted: result.status === 0 || /accepted/i.test(output),
|
|
76
|
+
revoked: needsRevokedCertRepair(output),
|
|
77
|
+
timedOut,
|
|
78
|
+
output,
|
|
79
|
+
status: result.status,
|
|
80
|
+
error: result.error ? result.error.message : null,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function codesignVerify(binaryPath, { timeoutMs = 5_000 } = {}) {
|
|
85
|
+
if (!isDarwin() || !binaryPath || !fs.existsSync(binaryPath)) {
|
|
86
|
+
return { ok: false, revoked: false, output: "", error: "missing binary" };
|
|
87
|
+
}
|
|
88
|
+
const result = spawnSync(CODESIGN, ["--verify", "--strict", "--verbose=4", binaryPath], {
|
|
89
|
+
encoding: "utf8",
|
|
90
|
+
timeout: timeoutMs,
|
|
91
|
+
});
|
|
92
|
+
const output = codesignOutput(result);
|
|
93
|
+
return {
|
|
94
|
+
ok: result.status === 0,
|
|
95
|
+
revoked: needsRevokedCertRepair(output),
|
|
96
|
+
output,
|
|
97
|
+
status: result.status,
|
|
98
|
+
error: result.error ? result.error.message : null,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Fast spawn-path check — only detect revoked certs (not full strict verify). */
|
|
103
|
+
function needsRepairBeforeSpawn(binaryPath) {
|
|
104
|
+
const result = spawnSync(CODESIGN, ["--verify", binaryPath], {
|
|
105
|
+
encoding: "utf8",
|
|
106
|
+
timeout: 3_000,
|
|
107
|
+
});
|
|
108
|
+
return needsRevokedCertRepair(codesignOutput(result));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function shouldRepairCodexBinary(binaryPath) {
|
|
112
|
+
const verify = codesignVerify(binaryPath);
|
|
113
|
+
if (verify.revoked || !verify.ok) return true;
|
|
114
|
+
const spctl = spctlAssess(binaryPath, 10_000);
|
|
115
|
+
return spctl.revoked;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function repairCodexBinaryAdHoc(binaryPath) {
|
|
119
|
+
if (!isDarwin() || !binaryPath || !fs.existsSync(binaryPath)) {
|
|
120
|
+
return { ok: false, output: "", error: "missing binary" };
|
|
121
|
+
}
|
|
122
|
+
spawnSync(CODESIGN, ["--remove-signature", binaryPath], {
|
|
123
|
+
encoding: "utf8",
|
|
124
|
+
timeout: 10_000,
|
|
125
|
+
});
|
|
126
|
+
const sign = spawnSync(CODESIGN, ["--force", "--sign", "-", binaryPath], {
|
|
127
|
+
encoding: "utf8",
|
|
128
|
+
timeout: 10_000,
|
|
129
|
+
});
|
|
130
|
+
const output = codesignOutput(sign);
|
|
131
|
+
return {
|
|
132
|
+
ok: sign.status === 0,
|
|
133
|
+
output,
|
|
134
|
+
error: sign.error ? sign.error.message : null,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function collectCodexXattrTargets(cwd) {
|
|
139
|
+
const targets = [];
|
|
140
|
+
const workDir = cwd || process.cwd();
|
|
141
|
+
|
|
142
|
+
const localPkg = path.join(workDir, "node_modules", "@openai", "codex");
|
|
143
|
+
if (fs.existsSync(localPkg)) targets.push(localPkg);
|
|
144
|
+
|
|
145
|
+
let annodexRoot = null;
|
|
146
|
+
try {
|
|
147
|
+
annodexRoot = path.join(__dirname, "..");
|
|
148
|
+
} catch {
|
|
149
|
+
// bundled build
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
try {
|
|
153
|
+
const npmPrefix = execSync("npm prefix -g", { encoding: "utf8", timeout: 3000 }).trim();
|
|
154
|
+
if (npmPrefix) {
|
|
155
|
+
const globalPkg = path.join(npmPrefix, "lib", "node_modules", "@openai", "codex");
|
|
156
|
+
if (fs.existsSync(globalPkg)) targets.push(globalPkg);
|
|
157
|
+
const binShim = path.join(npmPrefix, "bin", "codex");
|
|
158
|
+
if (fs.existsSync(binShim)) targets.push(binShim);
|
|
159
|
+
}
|
|
160
|
+
} catch {
|
|
161
|
+
// npm not available
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (annodexRoot) {
|
|
165
|
+
const annodexPkg = path.join(annodexRoot, "..", "..", "node_modules", "@openai", "codex");
|
|
166
|
+
if (fs.existsSync(annodexPkg) && !targets.includes(annodexPkg)) targets.push(annodexPkg);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return targets;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function clearMacOSQuarantineDeep(cwd) {
|
|
173
|
+
if (!isDarwin()) return { cleared: 0, paths: [], skipped: true };
|
|
174
|
+
const targets = collectCodexXattrTargets(cwd);
|
|
175
|
+
const clearedPaths = [];
|
|
176
|
+
for (const target of targets) {
|
|
177
|
+
try {
|
|
178
|
+
execSync(`xattr -cr "${target}" 2>/dev/null || true`, {
|
|
179
|
+
shell: "/bin/bash",
|
|
180
|
+
timeout: 5000,
|
|
181
|
+
});
|
|
182
|
+
clearedPaths.push(target);
|
|
183
|
+
} catch {
|
|
184
|
+
// read-only volumes, etc.
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return { cleared: clearedPaths.length, paths: clearedPaths, skipped: false };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function clearMacOSQuarantine(cwd) {
|
|
191
|
+
return clearMacOSQuarantineDeep(cwd);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** Fast quarantine clear for codex spawn — target only the native binary. */
|
|
195
|
+
function clearMacOSQuarantineForSpawn(executablePath, cwd) {
|
|
196
|
+
if (!isDarwin()) return { cleared: 0, paths: [], skipped: true };
|
|
197
|
+
const key = cwd || process.cwd();
|
|
198
|
+
if (quarantineClearedForCwd === key) {
|
|
199
|
+
return { cleared: 0, paths: [], skipped: true };
|
|
200
|
+
}
|
|
201
|
+
const clearedPaths = [];
|
|
202
|
+
if (executablePath && fs.existsSync(executablePath)) {
|
|
203
|
+
try {
|
|
204
|
+
execSync(`xattr -c "${executablePath}" 2>/dev/null || true`, {
|
|
205
|
+
shell: "/bin/bash",
|
|
206
|
+
timeout: 2000,
|
|
207
|
+
});
|
|
208
|
+
clearedPaths.push(executablePath);
|
|
209
|
+
} catch {
|
|
210
|
+
// ignore
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
quarantineClearedForCwd = key;
|
|
214
|
+
return { cleared: clearedPaths.length, paths: clearedPaths, skipped: false };
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function looksLikeNativeCodexBinary(filePath) {
|
|
218
|
+
if (!filePath) return false;
|
|
219
|
+
const base = path.basename(filePath);
|
|
220
|
+
return base === "codex" || base === "codex.exe";
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function repairMacOSCodexPaths(binaryPaths, { force = false, mode = "doctor" } = {}) {
|
|
224
|
+
if (!isDarwin()) return [];
|
|
225
|
+
const seen = new Set();
|
|
226
|
+
const results = [];
|
|
227
|
+
for (const binaryPath of binaryPaths) {
|
|
228
|
+
if (!binaryPath || seen.has(binaryPath) || !fs.existsSync(binaryPath)) continue;
|
|
229
|
+
if (!looksLikeNativeCodexBinary(binaryPath)) continue;
|
|
230
|
+
seen.add(binaryPath);
|
|
231
|
+
|
|
232
|
+
const beforeVerify = mode === "doctor" ? codesignVerify(binaryPath) : null;
|
|
233
|
+
const beforeSpctl = mode === "doctor" ? spctlAssess(binaryPath, 10_000) : null;
|
|
234
|
+
const needsRepair = force
|
|
235
|
+
|| (beforeVerify?.revoked ?? false)
|
|
236
|
+
|| (beforeSpctl?.revoked ?? false)
|
|
237
|
+
|| (mode === "spawn" && needsRepairBeforeSpawn(binaryPath));
|
|
238
|
+
if (!needsRepair) {
|
|
239
|
+
markBinaryPrepared(binaryPath);
|
|
240
|
+
results.push({
|
|
241
|
+
path: binaryPath,
|
|
242
|
+
skipped: true,
|
|
243
|
+
before: beforeVerify,
|
|
244
|
+
beforeSpctl,
|
|
245
|
+
});
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const repair = repairCodexBinaryAdHoc(binaryPath);
|
|
250
|
+
const after = codesignVerify(binaryPath);
|
|
251
|
+
const afterSpctl = mode === "doctor" ? spctlAssess(binaryPath, 10_000) : null;
|
|
252
|
+
if (repair.ok) markBinaryPrepared(binaryPath);
|
|
253
|
+
results.push({
|
|
254
|
+
path: binaryPath,
|
|
255
|
+
skipped: false,
|
|
256
|
+
before: beforeVerify,
|
|
257
|
+
beforeSpctl,
|
|
258
|
+
repair,
|
|
259
|
+
after,
|
|
260
|
+
afterSpctl,
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
return results;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Best-effort macOS prep before spawning codex: replace revoked signatures with
|
|
268
|
+
* ad-hoc signing. Skips xattr on the hot path — clearing quarantine on trees
|
|
269
|
+
* under macOS protected folders (Documents, etc.) can take 20s+ per spawn.
|
|
270
|
+
* Use `annodex doctor --repair` for deep quarantine cleanup.
|
|
271
|
+
*/
|
|
272
|
+
function prepareMacOSCodexForSpawn(executablePath, cwd) {
|
|
273
|
+
if (!isDarwin()) return { quarantine: { cleared: 0, paths: [] }, repairs: [] };
|
|
274
|
+
|
|
275
|
+
const quarantine = { cleared: 0, paths: [], skipped: true };
|
|
276
|
+
|
|
277
|
+
if (!executablePath || !looksLikeNativeCodexBinary(executablePath)) {
|
|
278
|
+
return { quarantine, repairs: [] };
|
|
279
|
+
}
|
|
280
|
+
if (isBinaryPrepared(executablePath) || preparingBinaries.has(executablePath)) {
|
|
281
|
+
return { quarantine, repairs: [], skipped: true };
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
preparingBinaries.add(executablePath);
|
|
285
|
+
let repairs = [];
|
|
286
|
+
try {
|
|
287
|
+
repairs = repairMacOSCodexPaths([executablePath], { mode: "spawn" });
|
|
288
|
+
} finally {
|
|
289
|
+
preparingBinaries.delete(executablePath);
|
|
290
|
+
}
|
|
291
|
+
for (const item of repairs) {
|
|
292
|
+
if (item.skipped) continue;
|
|
293
|
+
if (item.repair?.ok) {
|
|
294
|
+
console.log(
|
|
295
|
+
`[codex-server] Repaired codex signature with ad-hoc signing: ${item.path}`,
|
|
296
|
+
);
|
|
297
|
+
} else if (item.before?.revoked || item.beforeSpctl?.revoked) {
|
|
298
|
+
console.warn(
|
|
299
|
+
`[codex-server] Failed to repair revoked codex signature at ${item.path}: ${item.repair?.output || item.repair?.error || "unknown error"}`,
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
return { quarantine, repairs };
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
module.exports = {
|
|
308
|
+
codesignVerify,
|
|
309
|
+
spctlAssess,
|
|
310
|
+
shouldRepairCodexBinary,
|
|
311
|
+
repairCodexBinaryAdHoc,
|
|
312
|
+
needsRevokedCertRepair,
|
|
313
|
+
clearMacOSQuarantine,
|
|
314
|
+
repairMacOSCodexPaths,
|
|
315
|
+
prepareMacOSCodexForSpawn,
|
|
316
|
+
};
|
package/next.config.ts
CHANGED
|
@@ -6,7 +6,7 @@ const { version } = JSON.parse(readFileSync(join(__dirname, "package.json"), "ut
|
|
|
6
6
|
|
|
7
7
|
const nextConfig: NextConfig = {
|
|
8
8
|
serverExternalPackages: ["ws", "@openai/codex"],
|
|
9
|
-
allowedDevOrigins: [
|
|
9
|
+
allowedDevOrigins: ["127.0.0.1", "localhost", "192.168.*.*"],
|
|
10
10
|
env: {
|
|
11
11
|
NEXT_PUBLIC_APP_VERSION: version,
|
|
12
12
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seqyuan/annodex",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.54",
|
|
4
4
|
"description": "AI-native bioinformatics workspace by Annoroad",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"!.next/trace",
|
|
17
17
|
"!.next/trace-build",
|
|
18
18
|
"lib/app-settings.js",
|
|
19
|
+
"lib/macos-codex-security.js",
|
|
19
20
|
"lib/default-SOUL.md",
|
|
20
21
|
"lib/default-HARNESS.md",
|
|
21
22
|
"public",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4550],{4754:(e,t,r)=>{"use strict";r.d(t,{bN:()=>l,CY:()=>d,s9:()=>u,c3:()=>c});let n={displayName:"English",search:"Search",searchNoResult:"No results found",toc:"On this page",tocNoHeadings:"No Headings",lastUpdate:"Last updated on",chooseLanguage:"Choose a language",nextPage:"Next Page",previousPage:"Previous Page",chooseTheme:"Theme",editOnGithub:"Edit on GitHub",themeLight:"Light",themeDark:"Dark",themeSystem:"System",codeBlockCopy:"Copy Text",codeBlockCopied:"Copied Text",accordionCopyAnchor:"Copy Link",headingCopyAnchor:"Copy Anchor Link",pageActionsCopyMarkdown:"Copy Markdown",pageActionsOpen:"Open",pageActionsOpenGitHub:"Open in GitHub",pageActionsViewMarkdown:"View as Markdown",pageActionsOpenScira:"Open in Scira AI",pageActionsOpenChatGPT:"Open in ChatGPT",pageActionsOpenClaude:"Open in Claude",pageActionsOpenCursor:"Open in Cursor",pageActionsOpenInLLMPrompt:"Read {url}, I want to ask questions about it.",bannerClose:"Close Banner",searchOpen:"Open Search",searchClose:"Close Search",menuToggle:"Toggle Menu",themeToggle:"Toggle Theme",sidebarOpen:"Open Sidebar",sidebarCollapse:"Collapse Sidebar",tocInline:"Table of Contents",typeTableProp:"Prop",typeTableType:"Type",typeTableDefault:"Default",typeTableParameters:"Parameters",typeTableReturns:"Returns",notFoundTitle:"Page Not Found",notFoundDescription:"The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.",notFoundLink:"Back to Home"};var o=r(38774),a=r(95155),i=r(12115);let s=(0,i.createContext)({text:n});function l({label:e,params:t}){var r=c()[e];if(t)for(let e in t)r=r.replaceAll(`{${e}}`,t[e]);return r}function u(){return(0,i.use)(s)}function c(e){return e?(0,i.use)(s).text[e]:(0,i.use)(s).text}function d({locales:e=[],locale:t,onLocaleChange:r,children:l,translations:u}){let c=(0,o.rd)(),f=(0,o.a8)(),p=e=>{if(r)return r(e);let n=f.split("/").filter(e=>e.length>0);0===n.length||n[0]!==t?n.unshift(e):n[0]=e,c.push(`/${n.join("/")}`)},m=(0,i.useRef)(p);return m.current=p,(0,a.jsx)(s,{value:(0,i.useMemo)(()=>({locale:t,locales:e,text:{...n,...u},onChange:e=>m.current(e)}),[t,e,u]),children:l})}},10857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return P},MissingStaticPage:function(){return v},NormalizeError:function(){return y},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return h},WEB_VITALS:function(){return o},execOnce:function(){return a},getDisplayName:function(){return c},getLocationOrigin:function(){return l},getURL:function(){return u},isAbsoluteUrl:function(){return s},isResSent:function(){return d},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return _}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>i.test(e);function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=l();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Object.defineProperty(Error(`"${c(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,h=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class y extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class v extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class P extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function _(e){return JSON.stringify({message:e.message,stack:e.stack})}},11056:(e,t,r)=>{"use strict";r.d(t,{RootProvider:()=>R});var n=r(4754),o=r(95155),a=r(12115);let i=(0,a.createContext)({enabled:!1,open:!1,hotKey:[],setOpenSearch:()=>void 0});function s(){let[e,t]=(0,a.useState)("⌘");return(0,a.useEffect)(()=>{/Windows|Linux/i.test(window.navigator.userAgent)&&t("Ctrl")},[]),e}function l({SearchDialog:e,children:t,preload:r=!0,options:n,hotKey:u=[{key:e=>e.metaKey||e.ctrlKey,display:(0,o.jsx)(s,{})},{key:"k",display:"K"}],links:c}){let[d,f]=(0,a.useState)(!r&&void 0),p=(0,a.useEffectEvent)(e=>{u.every(t=>"string"==typeof t.key?e.key===t.key:t.key(e))&&(f(e=>!e),e.preventDefault())});return(0,a.useEffect)(()=>(window.addEventListener("keydown",p),()=>{window.removeEventListener("keydown",p)}),[u]),(0,o.jsxs)(i,{value:(0,a.useMemo)(()=>({enabled:!0,open:d??!1,hotKey:u,setOpenSearch:f}),[d,u]),children:[void 0!==d&&(0,o.jsx)(a.Suspense,{fallback:null,children:(0,o.jsx)(e,{open:d,onOpenChange:f,links:c,...n})}),t]})}var u=(e,t,r,n,o,a,i,s)=>{let l=document.documentElement,u=["light","dark"];function c(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&a?o.map(e=>a[e]||e):o;r?(l.classList.remove(...n),l.classList.add(a&&a[t]?a[t]:t)):l.setAttribute(e,t)}),r=t,s&&u.includes(r)&&(l.style.colorScheme=r)}if(n)c(n);else try{let e=localStorage.getItem(t)||r,n=i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(n)}catch(e){}},c=["light","dark"],d="(prefers-color-scheme: dark)",f=a.createContext(void 0),p=e=>a.useContext(f)?a.createElement(a.Fragment,null,e.children):a.createElement(h,{...e}),m=["light","dark"],h=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:r=!0,enableColorScheme:n=!0,storageKey:o="theme",themes:i=m,defaultTheme:s=r?"system":"light",attribute:l="data-theme",value:u,children:p,nonce:h,scriptProps:P})=>{let[_,S]=a.useState(()=>y(o,s)),[C,w]=a.useState(()=>"system"===_?v():_),O=u?Object.values(u):i,E=a.useCallback(e=>{let o=e;if(!o)return;"system"===e&&r&&(o=v());let a=u?u[o]:o,i=t?b(h):null,d=document.documentElement,f=e=>{"class"===e?(d.classList.remove(...O),a&&d.classList.add(a)):e.startsWith("data-")&&(a?d.setAttribute(e,a):d.removeAttribute(e))};if(Array.isArray(l)?l.forEach(f):f(l),n){let e=c.includes(s)?s:null,t=c.includes(o)?o:e;d.style.colorScheme=t}null==i||i()},[h]),j=a.useCallback(e=>{let t="function"==typeof e?e(_):e;S(t);try{localStorage.setItem(o,t)}catch(e){}},[_]),x=a.useCallback(t=>{w(v(t)),"system"===_&&r&&!e&&E("system")},[_,e]);a.useEffect(()=>{let e=window.matchMedia(d);return e.addListener(x),x(e),()=>e.removeListener(x)},[x]),a.useEffect(()=>{let e=e=>{e.key===o&&(e.newValue?S(e.newValue):j(s))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[j]),a.useEffect(()=>{E(null!=e?e:_)},[e,_]);let k=a.useMemo(()=>({theme:_,setTheme:j,forcedTheme:e,resolvedTheme:"system"===_?C:_,themes:r?[...i,"system"]:i,systemTheme:r?C:void 0}),[_,j,e,C,r,i]);return a.createElement(f.Provider,{value:k},a.createElement(g,{forcedTheme:e,storageKey:o,attribute:l,enableSystem:r,enableColorScheme:n,defaultTheme:s,value:u,themes:i,nonce:h,scriptProps:P}),p)},g=a.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:i,value:s,themes:l,nonce:c,scriptProps:d})=>{let f=JSON.stringify([r,t,i,e,l,s,n,o]).slice(1,-1);return a.createElement("script",{...d,suppressHydrationWarning:!0,nonce:"",dangerouslySetInnerHTML:{__html:`(${u.toString()})(${f})`}})}),y=(e,t)=>{let r;try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t},b=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},v=e=>(e||(e=window.matchMedia(d)),e.matches?"dark":"light"),P=a.createContext(void 0),_=e=>{let{dir:t,children:r}=e;return(0,o.jsx)(P.Provider,{value:t,children:r})};let S=(0,a.lazy)(()=>Promise.all([r.e(7627),r.e(9695)]).then(r.bind(r,29695)));function C({children:e,dir:t="ltr",theme:r={},search:a,i18n:i}){let s=e;return a?.enabled!==!1&&(s=(0,o.jsx)(l,{SearchDialog:S,...a,children:s})),r?.enabled!==!1&&(s=(0,o.jsx)(p,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,...r,children:s})),i&&(s=(0,o.jsx)(n.CY,{...i,children:s})),(0,o.jsx)(_,{dir:t,children:s})}var w=r(38774),O=r(73321),E=r(98500),j=r(97651),x=r.n(j);function k({children:e,Link:t,Image:r}){return(0,o.jsx)(w.Uy,{usePathname:O.usePathname,useRouter:O.useRouter,useParams:O.useParams,Link:t??E,Image:r??x(),children:e})}function R({components:e,...t}){return(0,o.jsx)(k,{Link:e?.Link,Image:e?.Image,children:(0,o.jsx)(C,{...t,children:t.children})})}},12590:(e,t)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:n,blurHeight:o,blurDataURL:a,objectFit:i}){let s=n?40*n:e,l=o?40*o:t,u=s&&l?`viewBox='0 0 ${s} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${u}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${u?"none":"contain"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${a}'/%3E%3C/svg%3E`}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},17150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let n=r(73623)._(r(12115)),o=r(55762),a=n.default.createContext(o.imageConfigDefault)},18857:(e,t)=>{"use strict";function r(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,t.qualities[0]):r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"findClosestQuality",{enumerable:!0,get:function(){return r}})},20091:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let a=r(66388)._(r(31393)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${o}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},21172:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=r(12115);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29842:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},31393:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={assign:function(){return s},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return i}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},36095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(18857),o=r(53887);function a({config:e,src:t,width:r,quality:i}){let s=(0,o.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")){let e=t.indexOf("?");if(-1!==e){let r=new URLSearchParams(t.slice(e+1)),n=r.get("dpl");if(n){s=n,r.delete("dpl");let o=r.toString();t=t.slice(0,e)+(o?"?"+o:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,n.findClosestQuality)(i,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${l}${t.startsWith("/")&&s?`&dpl=${s}`:""}`}a.__next_img_default=!0;let i=a},38437:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return P}});let n=r(73623),o=r(66388),a=r(95155),i=o._(r(12115)),s=n._(r(47650)),l=n._(r(46686)),u=r(95413),c=r(55762),d=r(17150);r(47284);let f=r(60751),p=n._(r(36095)),m=r(21172),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,r,n,o,a,i){let s=e?.src;e&&e["data-loaded-src"]!==s&&(e["data-loaded-src"]=s,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&o(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,o=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>o,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{o=!0,t.stopPropagation()}})}n?.current&&n.current(e)}}))}function y(e){return i.use?{fetchPriority:e}:{fetchpriority:e}}let b=(0,i.forwardRef)(({src:e,srcSet:t,sizes:r,height:n,width:o,decoding:s,className:l,style:u,fetchPriority:c,placeholder:d,loading:f,unoptimized:p,fill:h,onLoadRef:b,onLoadingCompleteRef:v,setBlurComplete:P,setShowAltText:_,sizesInput:S,onLoad:C,onError:w,...O},E)=>{let j=(0,i.useCallback)(e=>{e&&(w&&(e.src=e.src),e.complete&&g(e,d,b,v,P,p,S))},[e,d,b,v,P,w,p,S]),x=(0,m.useMergedRef)(E,j);return(0,a.jsx)("img",{...O,...y(c),loading:f,width:o,height:n,decoding:s,"data-nimg":h?"fill":"1",className:l,style:u,sizes:r,srcSet:t,src:e,ref:x,onLoad:e=>{g(e.currentTarget,d,b,v,P,p,S)},onError:e=>{_(!0),"empty"!==d&&P(!0),w&&w(e)}})});function v({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...y(t.fetchPriority)};return e&&s.default.preload?(s.default.preload(t.src,r),null):(0,a.jsx)(l.default,{children:(0,a.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let P=(0,i.forwardRef)((e,t)=>{let r=(0,i.useContext)(f.RouterContext),n=(0,i.useContext)(d.ImageConfigContext),o=(0,i.useMemo)(()=>{let e=h||n||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),o=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:o,localPatterns:e.localPatterns}},[n]),{onLoad:s,onLoadingComplete:l}=e,m=(0,i.useRef)(s);(0,i.useEffect)(()=>{m.current=s},[s]);let g=(0,i.useRef)(l);(0,i.useEffect)(()=>{g.current=l},[l]);let[y,P]=(0,i.useState)(!1),[_,S]=(0,i.useState)(!1),{props:C,meta:w}=(0,u.getImgProps)(e,{defaultLoader:p.default,imgConf:o,blurComplete:y,showAltText:_});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b,{...C,unoptimized:w.unoptimized,placeholder:w.placeholder,fill:w.fill,onLoadRef:m,onLoadingCompleteRef:g,setBlurComplete:P,setShowAltText:S,sizesInput:e.sizes,ref:t}),w.preload?(0,a.jsx)(v,{isAppRouter:!r,imgAttributes:C}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38774:(e,t,r)=>{"use strict";r.d(t,{Uy:()=>s,a8:()=>l,rd:()=>u});var n=r(12115),o=r(95155);let a=()=>{throw Error("You need to wrap your application inside `FrameworkProvider`.")},i=(0,n.createContext)({useParams:a,useRouter:a,usePathname:a});function s({Link:e,useRouter:t,useParams:r,usePathname:a,Image:l,children:u}){return(0,o.jsx)(i,{value:(0,n.useMemo)(()=>({usePathname:a,useRouter:t,Link:e,Image:l,useParams:r}),[e,a,t,r,l]),children:u})}function l(){return(0,n.use)(i).usePathname()}function u(){return(0,n.use)(i).useRouter()}},46686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:function(){return h},defaultHead:function(){return d}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let a=r(73623),i=r(66388),s=r(95155),l=i._(r(12115)),u=a._(r(76899)),c=r(75368);function d(){return[(0,s.jsx)("meta",{charSet:"utf-8"},"charset"),(0,s.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(47284);let p=["name","httpEquiv","charSet","itemProp"];function m(e){let t,r,n,o;return e.reduce(f,[]).reverse().concat(d().reverse()).filter((t=new Set,r=new Set,n=new Set,o={},e=>{let a=!0,i=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){i=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?a=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?a=!1:r.add(e.type);break;case"meta":for(let t=0,r=p.length;t<r;t++){let r=p[t];if(e.props.hasOwnProperty(r))if("charSet"===r)n.has(r)?a=!1:n.add(r);else{let t=e.props[r],n=o[r]||new Set;("name"!==r||!i)&&n.has(t)?a=!1:(n.add(t),o[r]=n)}}}return a})).reverse().map((e,t)=>{let r=e.key||t;return l.default.cloneElement(e,{key:r})})}let h=function({children:e}){let t=(0,l.useContext)(c.HeadManagerContext);return(0,s.jsx)(u.default,{reduceComponentsToState:m,headManager:t,children:e})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},55762:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return o},imageConfigDefault:function(){return a}};for(var n in r)Object.defineProperty(t,n,{enumerable:!0,get:r[n]});let o=["default","imgix","cloudinary","akamai","custom"],a={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},60751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return n}});let n=r(73623)._(r(12115)).default.createContext(null)},69470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=r(10857),o=r(48512);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},73321:(e,t,r)=>{"use strict";var n=r(74645);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},76899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(12115),o=n.useLayoutEffect,a=n.useEffect;function i(e){let{headManager:t,reduceComponentsToState:r}=e;function i(){if(t&&t.mountedInstances){let e=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return o(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),o(()=>(t&&(t._pendingUpdate=i),()=>{t&&(t._pendingUpdate=i)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},83683:e=>{e.exports={style:{fontFamily:"'Noto Sans Mono', 'Noto Sans Mono Fallback'",fontStyle:"normal"},className:"__className_66b8ca",variable:"__variable_66b8ca"}},95413:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return u}}),r(47284);let n=r(53887),o=r(12590),a=r(55762),i=["-moz-initial","fill","none","scale-down",void 0];function s(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function u({src:e,sizes:t,unoptimized:r=!1,priority:c=!1,preload:d=!1,loading:f,className:p,quality:m,width:h,height:g,fill:y=!1,style:b,overrideSrc:v,onLoad:P,onLoadingComplete:_,placeholder:S="empty",blurDataURL:C,fetchPriority:w,decoding:O="async",layout:E,objectFit:j,objectPosition:x,lazyBoundary:k,lazyRoot:R,...T},M){var L;let A,I,N,{imgConf:$,showAltText:z,blurComplete:D,defaultLoader:U}=M,F=$||a.imageConfigDefault;if("allSizes"in F)A=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=F.qualities?.sort((e,t)=>e-t);A={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===U)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let B=T.loader||U;delete T.loader,delete T.srcSet;let W="__next_img_default"in B;if(W){if("custom"===A.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
|
|
3
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=B;B=t=>{let{config:r,...n}=t;return e(n)}}if(E){"fill"===E&&(y=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[E];e&&(b={...b,...e});let r={responsive:"100vw",fill:"100vw"}[E];r&&!t&&(t=r)}let q="",G=l(h),K=l(g);if((L=e)&&"object"==typeof L&&(s(L)||void 0!==L.src)){let t=s(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(I=t.blurWidth,N=t.blurHeight,C=C||t.blurDataURL,q=t.src,!y)if(G||K){if(G&&!K){let e=G/t.width;K=Math.round(t.height*e)}else if(!G&&K){let e=K/t.height;G=Math.round(t.width*e)}}else G=t.width,K=t.height}let H=!c&&!d&&("lazy"===f||void 0===f);(!(e="string"==typeof e?e:q)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,H=!1),A.unoptimized&&(r=!0),W&&!A.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let V=l(m),X=Object.assign(y?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:j,objectPosition:x}:{},z?{}:{color:"transparent"},b),J=D||"empty"===S?null:"blur"===S?`url("data:image/svg+xml;charset=utf-8,${(0,o.getImageBlurSvg)({widthInt:G,heightInt:K,blurWidth:I,blurHeight:N,blurDataURL:C||"",objectFit:X.objectFit})}")`:`url("${S}")`,Q=i.includes(X.objectFit)?"fill"===X.objectFit?"100% 100%":"cover":X.objectFit,Y=J?{backgroundSize:Q,backgroundPosition:X.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:J}:{},Z=function({config:e,src:t,unoptimized:r,width:o,quality:a,sizes:i,loader:s}){if(r){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,n.getDeploymentId)();if(e){let r=t.indexOf("?");if(-1!==r){let n=new URLSearchParams(t.slice(r+1));n.get("dpl")||(n.append("dpl",e),t=t.slice(0,r)+"?"+n.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:l,kind:u}=function({deviceSizes:e,allSizes:t},r,n){if(n){let r=/(^|\s)(1?\d?\d)vw/g,o=[];for(let e;e=r.exec(n);)o.push(parseInt(e[2]));if(o.length){let r=.01*Math.min(...o);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,o,i),c=l.length-1;return{sizes:i||"w"!==u?i:"100vw",srcSet:l.map((r,n)=>`${s({config:e,src:t,quality:a,width:r})} ${"w"===u?r:n+1}${u}`).join(", "),src:s({config:e,src:t,quality:a,width:l[c]})}}({config:A,src:e,unoptimized:r,width:G,quality:V,sizes:t,loader:B}),ee=H?"lazy":f;return{props:{...T,loading:ee,fetchPriority:w,width:G,height:K,decoding:O,className:p,style:{...X,...Y},sizes:Z.sizes,srcSet:Z.srcSet,src:v||Z.src},meta:{unoptimized:r,preload:d||c,placeholder:S,fill:y}}}},97651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:function(){return c},getImageProps:function(){return u}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let a=r(73623),i=r(95413),s=r(38437),l=a._(r(36095));function u(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let c=s.Image},98500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return v}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let a=r(66388),i=r(95155),s=a._(r(12115)),l=r(20091),u=r(22909),c=r(21172),d=r(10857),f=r(70127);r(47284);let p=r(74616),m=r(24972),h=r(69470),g=r(77565);function y(e){var t,n;let o,a,y,[v,P]=(0,s.useOptimistic)(m.IDLE_LINK_STATUS),_=(0,s.useRef)(null),{href:S,as:C,children:w,prefetch:O=null,passHref:E,replace:j,shallow:x,scroll:k,onClick:R,onMouseEnter:T,onTouchStart:M,legacyBehavior:L=!1,onNavigate:A,transitionTypes:I,ref:N,unstable_dynamicOnHover:$,...z}=e;o=w,L&&("string"==typeof o||"number"==typeof o)&&(o=(0,i.jsx)("a",{children:o}));let D=s.default.useContext(u.AppRouterContext),U=!1!==O,F=!1!==O?null===(n=O)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(t=C||S)?t:(0,l.formatUrl)(t);if(L){if(o?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(o)}let W=L?a&&"object"==typeof a&&a.ref:N,q=s.default.useCallback(e=>(null!==D&&(_.current=(0,m.mountLinkInstance)(e,B,D,F,U,P)),()=>{_.current&&((0,m.unmountLinkForCurrentNavigation)(_.current),_.current=null),(0,m.unmountPrefetchableInstance)(e)}),[U,B,D,F,P]),G={ref:(0,c.useMergedRef)(q,W),onClick(e){L||"function"!=typeof R||R(e),L&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(e),!D||e.defaultPrevented||function(e,t,n,o,a,i,l){{let u,{nodeName:c}=e.currentTarget;if("A"===c.toUpperCase()&&((u=e.currentTarget.getAttribute("target"))&&"_self"!==u||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which)||e.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(t)){o&&(e.preventDefault(),location.replace(t));return}if(e.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=r(70156);s.default.startTransition(()=>{d(t,o?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,l)})}}(e,B,_,j,k,A,I)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),D&&U&&(0,m.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){L||"function"!=typeof M||M(e),L&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),D&&U&&(0,m.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,d.isAbsoluteUrl)(B)?G.href=B:L&&!E&&("a"!==a.type||"href"in a.props)||(G.href=(0,f.addBasePath)(B)),y=L?s.default.cloneElement(a,G):(0,i.jsx)("a",{...z,...G,children:o}),(0,i.jsx)(b.Provider,{value:v,children:y})}r(29842);let b=(0,s.createContext)(m.IDLE_LINK_STATUS),v=()=>(0,s.useContext)(b);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);
|