merge: reconcile paid hosting with latest main

This commit is contained in:
Thomas Durieux committed 2026-11-02 21:12:29 +00:00
commit ded6f905fd
180 files changed
+21709 -3614

No files matched your search

+20 -1
View File
@@ -1738,9 +1738,14 @@ export const overviewAdminController = function (state, http, location, interval
state.performanceMinutes = 15;
state.performanceTab = "routes";
state.performanceError = null;
// 18400 ms reads better as 18.4 s once a value passes one second.
state.formatMs = function (ms) {
if (ms == null) return "";
return ms < 1000 ? ms + " ms" : +(ms / 1000).toFixed(1) + " s";
};
state.latencyBound = function (row, field) {
if (!row.count) return "No samples";
return row[field] == null ? "> 60 s" : "\u2264 " + row[field] + " ms";
return row[field] == null ? "> 60 s" : "\u2264 " + state.formatMs(row[field]);
};
state.firstByteBound = function (row) {
return state.latencyBound({ count: row.firstByteCount, p95UpperMs: row.firstByteP95UpperMs }, "p95UpperMs");
@@ -1862,10 +1867,22 @@ export const overviewAdminController = function (state, http, location, interval
}
var historyMaxes = {};
var historyMins = {};
state.historyBarH = function (d, field) {
if (!d || !historyMaxes[field]) return 0;
return Math.max(1, Math.round((d[field] / historyMaxes[field]) * 140));
};
// Cumulative totals barely move against a zero baseline, so they are
// drawn between the period's minimum and maximum (shown in the legend).
state.historyRangeH = function (d, field) {
if (!d || historyMaxes[field] == null) return 0;
var span = historyMaxes[field] - historyMins[field];
if (!span) return 70;
return Math.round(8 + ((d[field] - historyMins[field]) / span) * 132);
};
state.historyRange = function (field) {
return { min: historyMins[field], max: historyMaxes[field] };
};
state.historyLabel = function (d) {
if (!d || !d.date) return "";
var dt = new Date(d.date);
@@ -1883,9 +1900,11 @@ export const overviewAdminController = function (state, http, location, interval
state.loading = false;
state.error = null;
historyMaxes = {};
historyMins = {};
(r.data.history || []).forEach(function (d) {
["dailyPageViews", "dailyRepositories", "dailyUsers", "nbUsers"].forEach(function (k) {
if (!historyMaxes[k] || d[k] > historyMaxes[k]) historyMaxes[k] = d[k];
if (historyMins[k] == null || d[k] < historyMins[k]) historyMins[k] = d[k];
});
});
}, function (err) {
+302 -42
View File
@@ -2,6 +2,87 @@ import { setupBilling, readBilling } from "./billing.js";
import { reactive, nextTick } from "vue";
import { createTimers, createListeners } from "./state.js";
import { formDraft } from "./drafts.js";
import translations from "../i18n/locale-en.json";
function viewerErrorCode(error) {
let data = error?.data;
if (typeof data === "string") {
try { data = JSON.parse(data); } catch (_) { data = null; }
}
if (typeof data?.error === "string" && Object.prototype.hasOwnProperty.call(translations.ERRORS, data.error)) return data.error;
if (error?.status === -1 || error?.status === 0) return "request_error";
if ([502, 503, 504].includes(error?.status)) return "unreachable";
return "unknown_error";
}
// The mask comes from /api/options; mainController sets it once loaded.
let redactionMask = "XXXX";
export const setRedactionMask = (mask) => { redactionMask = mask || "XXXX"; };
// Matches the replacements the anonymizer writes: MASK and MASK-<n>.
export const redactionPattern = (mask = redactionMask) => {
if (!mask) return null;
const escaped = mask.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
return new RegExp(escaped + "(?:-\\d+)?", "g");
};
// Wraps redacted terms under root in <mark class="redaction">, touching text
// nodes only so attributes and URLs stay intact. Mermaid sources are left
// alone (Mermaid parses their text), and so are code blocks Prism will
// rewrite unless root is that highlighted block itself.
export const markRedactionsIn = (root, mask = redactionMask) => {
const pattern = redactionPattern(mask);
if (!pattern || !root || !root.textContent.includes(mask)) return;
const doc = root.ownerDocument;
const walker = doc.createTreeWalker(root, NodeFilter.SHOW_TEXT);
const nodes = [];
while (walker.nextNode()) nodes.push(walker.currentNode);
for (const node of nodes) {
const text = node.nodeValue;
const parent = node.parentElement;
if (!text.includes(mask) || !parent || parent.closest("script, style, mark.redaction, .mermaid")) continue;
const highlighted = parent.closest('code[class*="language-"]');
if (highlighted && !highlighted.contains(root)) continue;
const fragment = doc.createDocumentFragment();
let last = 0;
for (const match of text.matchAll(pattern)) {
fragment.append(text.slice(last, match.index));
const mark = doc.createElement("mark");
mark.className = "redaction";
mark.title = "Redacted by Anonymous GitHub";
mark.textContent = match[0];
fragment.append(mark);
last = match.index + match[0].length;
}
fragment.append(text.slice(last));
node.replaceWith(fragment);
}
};
export const highlightRedactions = (html, mask = redactionMask) => {
if (!html || !mask || !html.includes(mask)) return html;
const doc = new DOMParser().parseFromString("<body>" + html + "</body>", "text/html");
markRedactionsIn(doc.body, mask);
return doc.body.innerHTML;
};
async function copyText(text) {
if (window.navigator.clipboard?.writeText) {
await window.navigator.clipboard.writeText(text);
return;
}
const field = document.createElement("textarea");
field.value = text;
field.setAttribute("readonly", "");
field.style.position = "fixed";
field.style.opacity = "0";
const focused = document.activeElement;
document.body.appendChild(field);
try {
field.select();
if (!document.execCommand?.("copy")) throw Error("Copy unavailable");
} finally { field.remove(); focused?.focus(); }
}
function previewTabKeydown(event) {
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
@@ -55,8 +136,11 @@ export const mainController = function (state, http, location, timeout) {
return toast;
};
// Anonymized content that signed-out reviewers browse.
const reviewerRoutes = /^\/(r|repository|pr|gist)\//;
state.path = location.url();
state.paths = location.path().substring(1).split("/");
state.isReviewerRoute = reviewerRoutes.test(location.path());
state.darkMode = function (on) {
localStorage.setItem("darkMode", on);
@@ -80,19 +164,49 @@ export const mainController = function (state, http, location, timeout) {
}
const kofiBtn = document.querySelector("[class*='floatingchat-container-wrap'] [class*='floating-chat-kofi-text-container-wrap']");
if (kofiBtn) {
kofiBtn.style.backgroundColor = on ? "#FAF9F6" : "#1A1815";
kofiBtn.style.color = on ? "#1A1815" : "#FAF9F6";
kofiBtn.style.backgroundColor = on ? "#34312C" : "#1A1815";
kofiBtn.style.color = "#FAF9F6";
}
state.emit("dark-mode", on);
};
state.darkMode(localStorage.getItem("darkMode") == "true");
state.emailPromptOpen = false;
state.emailPromptAddress = "";
state.emailPromptBusy = false;
state.emailPromptError = "";
let emailPromptFocus;
state.respondToEmailPrompt = async (action) => {
if (state.emailPromptBusy) return;
state.emailPromptBusy = true;
state.emailPromptError = "";
try {
const res = await http.post("/github/connections/email", { action, email: state.emailPromptAddress },
{ headers: { "X-CSRF-Token": state.user.emailPromptCSRF } });
if (action === "save") state.user.notificationEmail = res.data.notificationEmail;
state.emailPromptOpen = false;
state.user.showEmailPrompt = false;
emailPromptFocus?.focus();
} catch (error) { state.emailPromptError = error.data?.error || "Unable to save your preference. Please try again."; }
finally { state.emailPromptBusy = false; }
};
function getUser() {
http.get("/api/user").then(
(res) => {
if (res) state.user = res.data;
if (state.user?.username) readBilling(http).then(res => updateHeaderBilling(res.data)).catch(() => {});
if (state.user?.emailNotificationsEnabled && state.user.showEmailPrompt && !state.user.notificationEmail) {
emailPromptFocus = document.activeElement;
state.emailPromptOpen = true;
timeout(() => {
const dialog = document.getElementById("email-prompt");
if (dialog?.showModal) dialog.showModal();
else dialog?.setAttribute("open", "");
document.getElementById("email-prompt-address")?.focus();
}, 0);
}
},
() => {
state.user = null;
@@ -105,6 +219,8 @@ export const mainController = function (state, http, location, timeout) {
http.get("/api/options").then(
(res) => {
if (res) state.site_options = res.data;
setRedactionMask(res?.data?.ANONYMIZATION_MASK);
state.emit("site-options");
},
() => {
state.site_options = null;
@@ -131,6 +247,7 @@ export const mainController = function (state, http, location, timeout) {
}
state.path = location.url();
state.paths = location.path().substring(1).split("/");
state.isReviewerRoute = reviewerRoutes.test(location.path());
}
state.on("routeChange", changedUrl);
@@ -191,6 +308,42 @@ export const profileController = function (state, http, translate, timeout, quot
state.message = null;
state.error = null;
state.accountEmail = "";
state.emailLoading = true;
state.emailCSRFReady = false;
state.emailSaving = false;
state.emailSaved = false;
state.emailError = "";
let emailCSRF = "";
state.loadAccountEmail = async () => {
state.emailLoading = true;
state.emailError = "";
try {
const res = await http.get("/github/connections/email");
state.accountEmail = res.data.notificationEmail || "";
emailCSRF = res.data.csrf;
state.emailCSRFReady = !!emailCSRF;
} catch {
state.emailError = "Unable to load your email address. Please try again.";
} finally { state.emailLoading = false; }
};
state.saveAccountEmail = async () => {
if (state.emailSaving || state.emailLoading || !emailCSRF) return;
state.emailSaving = true;
state.emailSaved = false;
state.emailError = "";
try {
const res = await http.post("/github/connections/email", { email: state.accountEmail },
{ headers: { "X-CSRF-Token": emailCSRF } });
state.accountEmail = res.data.notificationEmail;
if (state.user) state.user.notificationEmail = res.data.notificationEmail;
state.emailSaved = true;
} catch {
state.emailError = "Unable to save your email address. Check the address and try again.";
} finally { state.emailSaving = false; }
};
state.loadAccountEmail();
quotaService.load().then((quota) => {
state.quota = quota;
}, console.error);
@@ -236,11 +389,13 @@ export const profileController = function (state, http, translate, timeout, quot
(error) => {
state.saving = false;
const code = error && error.data && error.data.error;
const key = "ERRORS." + code;
translate(key).then((translation) => {
state.error = translation && translation !== key ? translation : "Unable to save your defaults. Please try again.";
const fallback = "Unable to save your defaults. Please try again.";
// Unknown codes translate to the generic unknown_error message;
// this page has a more specific one.
Promise.all([translate("ERRORS." + code), translate("ERRORS.unknown_error")]).then(([translation, unknown]) => {
state.error = code && translation !== unknown ? translation : fallback;
}, () => {
state.error = "Unable to save your defaults. Please try again.";
state.error = fallback;
});
}
);
@@ -544,21 +699,7 @@ export const unifiedDashboardController = function (state, http, location, promi
const link = new URL(item._viewUrl, window.location.origin).href;
state.copyingId = item._type + ":" + item._id;
try {
if (window.navigator.clipboard?.writeText) {
await window.navigator.clipboard.writeText(link);
} else {
const field = document.createElement("textarea");
field.value = link;
field.setAttribute("readonly", "");
field.style.position = "fixed";
field.style.opacity = "0";
const focused = document.activeElement;
document.body.appendChild(field);
try {
field.select();
if (!document.execCommand?.("copy")) throw Error("Copy unavailable");
} finally { field.remove(); focused?.focus(); }
}
await copyText(link);
state.addToast({ title: "Link copied", body: "The anonymous link is ready to share." });
} catch {
state.addToast({ title: "Copy this anonymous link", body: link });
@@ -1034,6 +1175,19 @@ export const statusController = function (state, http, params) {
state.progress = 0;
state.rateLimitResetAt = 0;
state.rateLimitCountdown = "";
state.shareUrl = (window.location?.origin || "") + "/r/" + encodeURIComponent(state.repoId) + "/";
state.copied = false;
let copiedTimer = null;
state.copyShareUrl = async () => {
try {
await copyText(state.shareUrl);
state.copied = true;
if (copiedTimer) timers.timeout.cancel(copiedTimer);
copiedTimer = timers.timeout(() => { state.copied = false; }, 2000);
} catch {
state.addToast?.({ title: "Copy this anonymous link", body: state.shareUrl });
}
};
var countdownTimer = null;
let pollTimer = null;
@@ -1324,6 +1478,33 @@ export const anonymizeController = function (state, http, html, params, location
state.html_readme = "";
state.isUpdate = false;
state.previousConfigurations = [];
state.previousConfigurationId = "";
let previousRepositories;
const normalizedRepositoryName = name => String(name || "").replace(/\/$/, "").replace(/\.git$/i, "").toLowerCase();
async function findPreviousConfigurations() {
if (state.isUpdate || params.repoId || params.pullRequestId || params.gistId) return;
const request = { generation: sourceGeneration, url: state.sourceUrl.trim(), connection: state.githubConnection };
try {
// This endpoint only returns repositories the signed-in user can manage.
previousRepositories ||= http.get("/api/user/anonymized_repositories").then(res => res.data);
const repositories = await previousRepositories;
if (!isCurrentSource(request)) return;
const name = normalizedRepositoryName(parseRepoFullName(request.url));
state.previousConfigurations = repositories.filter(repo => repo.repoId && repo.options
&& normalizedRepositoryName(repo.source?.fullName) === name)
.sort((a, b) => (Date.parse(b.anonymizeDate) || 0) - (Date.parse(a.anonymizeDate) || 0));
state.previousConfigurationId = state.previousConfigurations[0]?.repoId || "";
} catch (_) {
// A suggestion failure must not prevent creating a repository. Retry on the next URL selection.
previousRepositories = undefined;
}
}
state.existingConfigurationUrl = () => {
const previous = state.previousConfigurations.find(repo => repo.repoId === state.previousConfigurationId);
return previous ? "/anonymize/" + encodeURIComponent(previous.repoId) : null;
};
function getDefault(cb) {
http.get("/api/user/default").then((res) => {
const data = res.data;
@@ -1360,6 +1541,38 @@ export const anonymizeController = function (state, http, html, params, location
return null;
}
state.accessRepairAllowed = false;
state.repairingGitHubAccess = false;
state.accessRepairMessage = "";
state.repairGitHubAccess = async () => {
if (!state.accessRepairAllowed || state.repairingGitHubAccess || !state.githubConnections?.appEnabled || !params.repoId || state.role !== "owner" ||
state.githubConnection !== "github-app" || parseRepoFullName(state.sourceUrl) !== state._originalFullName) return;
state.repairingGitHubAccess = true;
state.accessRepairMessage = "";
const request = beginSourceRequest();
try {
const connections = await http.get("/github/connections");
state.githubConnections = connections.data;
if (!connections.data.appEnabled) return;
const repaired = await http.post("/github/connections/migrate", { type: "repository", id: params.repoId, connection: "github-app" },
{ headers: { "X-CSRF-Token": connections.data.csrf } });
if (!isCurrentSource(request)) return;
state.error = null;
if (repaired.data.fullName) {
state._originalFullName = repaired.data.fullName;
state.source.fullName = repaired.data.fullName;
state.sourceUrl = "https://github.com/" + repaired.data.fullName;
}
state.accessRepairMessage = "GitHub access repaired. Your anonymous URL and published commit are unchanged.";
await state.urlSelected(true);
} catch (_) {
if (isCurrentSource(request)) state.accessRepairMessage = "Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.";
} finally {
state.repairingGitHubAccess = false;
finishSourceRequest(request);
}
};
state.reconnectingSource = false;
state.reconnectRepositoryId = undefined;
state.reconnectSource = async () => {
@@ -1438,6 +1651,7 @@ export const anonymizeController = function (state, http, html, params, location
state.repoId = params.repoId;
http.get("/api/repo/" + state.repoId).then(
async (res) => {
state.accessRepairAllowed = !["removed", "archived", "preparing", "queue", "download", "removing", "expiring"].includes(res.data.status);
state.githubConnection = res.data.connection || "oauth";
state.sourceUrl = "https://github.com/" + res.data.source.fullName;
state._originalFullName = res.data.source.fullName;
@@ -1534,6 +1748,8 @@ export const anonymizeController = function (state, http, html, params, location
// Keep the same input focused until a complete GitHub URL can be loaded.
state.urlSelected = async (preserveDraft = false) => {
const generation = ++sourceGeneration;
state.previousConfigurations = [];
state.previousConfigurationId = "";
let o;
try { o = parseGithubUrl(state.sourceUrl.trim()); }
catch (_) {
@@ -1589,6 +1805,7 @@ export const anonymizeController = function (state, http, html, params, location
await getPrDetails();
} else {
state.detectedType = "repo";
void findPreviousConfigurations();
await Promise.all([getRepoDetails(), getReadme()]);
anonymizeReadme();
}
@@ -2279,6 +2496,11 @@ export const anonymizeController = function (state, http, html, params, location
export const exploreController = function (state, http, location, params, html, promises) {
const timers = createTimers();
// Prism rewrites fenced code blocks, so mark redactions once it is done.
if (window.Prism?.hooks && !window.Prism.redactionHook) {
window.Prism.hooks.add("complete", (env) => markRedactionsIn(env.element));
window.Prism.redactionHook = true;
}
const listen = createListeners();
state.on("dark-mode", (event, on) => {
if (!state.aceOption) return;
@@ -2510,7 +2732,7 @@ export const exploreController = function (state, http, location, params, html,
}, function (err) {
if (destroyed || repoId !== state.repoId) return [];
state.type = "error";
state.content = (err && err.data && err.data.error) || "unknown_error";
state.content = viewerErrorCode(err);
state.files = [];
});
};
@@ -2580,7 +2802,7 @@ export const exploreController = function (state, http, location, params, html,
timers.timeout(function () { getOptions(callback); }, 3000);
} else {
state.type = "error";
state.content = data.error;
state.content = viewerErrorCode(err);
}
}
);
@@ -2705,23 +2927,7 @@ export const exploreController = function (state, http, location, params, html,
(err) => {
if (destroyed || generation !== contentGeneration) return;
state.type = "error";
state.content = "unknown_error";
try {
err.data = JSON.parse(err.data);
if (err.data.error) {
state.content = err.data.error;
} else {
state.content = err.data;
}
} catch (ignore) {
console.log(err);
if (err.status == -1) {
state.content = "request_error";
} else if (err.status == 502) {
// cloudflare error
state.content = "unreachable";
}
}
state.content = viewerErrorCode(err);
}
);
}
@@ -2765,7 +2971,7 @@ export const exploreController = function (state, http, location, params, html,
theme: "chrome",
useSoftTab: true,
tabSize: 2,
fontSize: 15,
fontSize: 13,
keyBinding: "vscode",
fullLineSelection: true,
highlightActiveLine: false,
@@ -2870,9 +3076,43 @@ export const exploreController = function (state, http, location, params, html,
);
_editor.session.setUseSoftTabs(state.aceOption.useSoftTab);
_editor.session.setTabSize(state.aceOption.tabSize);
// Phones can't scroll long lines comfortably, so wrap them there,
// following the viewport when a tablet rotates or a window resizes.
const narrow = window.matchMedia("(max-width: 991px)");
const applyWrap = () => _editor.session.setUseWrapMode(state.aceOption.useWrapMode && narrow.matches);
applyWrap();
narrow.addEventListener?.("change", applyWrap);
_editor.setBehavioursEnabled(state.aceOption.enableBehaviours);
_editor.setFadeFoldWidgets(state.aceOption.fadeFoldWidgets);
return removeHashListener;
// Outline redacted terms (XXXX-1, ...) so reviewers can tell a
// replacement from the author's own text.
let redactionMarkers = [];
const markRedactions = () => {
redactionMarkers.forEach((id) => _editor.session.removeMarker(id));
redactionMarkers = [];
const pattern = redactionPattern();
if (!pattern) return;
const lines = _editor.session.getDocument().getAllLines();
lines.forEach((line, row) => {
for (const match of line.matchAll(pattern)) {
redactionMarkers.push(_editor.session.addMarker(
new Range(row, match.index, row, match.index + match[0].length),
"ace_redaction",
"text"
));
}
});
};
markRedactions();
_editor.session.on("change", () => timers.timeout(markRedactions, 0));
// The mask may arrive after the editor mounts.
const offOptions = state.on("site-options", markRedactions);
return () => {
removeHashListener();
offOptions();
narrow.removeEventListener?.("change", applyWrap);
};
},
};
if (state.isDarkMode) {
@@ -2892,6 +3132,10 @@ export const exploreController = function (state, http, location, params, html,
getContent(state.filePath, state.file);
}
state.isSourceAccessError = () => ["repo_not_found", "token_expired", "github_app_access_required",
"github_app_reconnect_required", "repo_saml_enforcement", "repo_access_limited"].includes(state.content);
state.retryContent = () => init();
function init() {
contentGeneration++;
state.files = [];
@@ -3319,11 +3563,27 @@ export const conferenceController = function (state, http, location, params) {
export const connectionsController = function (state, http) {
state.notificationEmail = "";
state.emailSaved = false;
state.saveNotificationEmail = async () => {
state.busy = true;
state.emailSaved = false;
state.connectionError = "";
try {
const res = await http.post("/github/connections/email", { email: state.notificationEmail },
{ headers: { "X-CSRF-Token": state.connections.csrf } });
state.notificationEmail = res.data.notificationEmail;
if (state.user) state.user.notificationEmail = res.data.notificationEmail;
state.emailSaved = true;
} catch (error) { state.connectionError = error.data?.error || "Unable to save email address."; }
finally { state.busy = false; }
};
state.connections = null;
state.connectionError = "";
state.busy = false;
state.loadConnections = () => http.get("/github/connections").then(res => {
state.connections = res.data;
state.notificationEmail = res.data.notificationEmail || "";
}).catch(error => { state.connectionError = error.data?.error || "Unable to load connections."; });
state.changeConnection = async (resource, connection, preview) => {
state.busy = true;
+4 -3
View File
@@ -1,4 +1,4 @@
let defaultOptions={unicode:!(window.githubEmojis={"+1":"https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8","-1":"https://github.githubassets.com/images/icons/emoji/unicode/1f44e.png?v8",100:"https://github.githubassets.com/images/icons/emoji/unicode/1f4af.png?v8",1234:"https://github.githubassets.com/images/icons/emoji/unicode/1f522.png?v8","1st_place_medal":"https://github.githubassets.com/images/icons/emoji/unicode/1f947.png?v8","2nd_place_medal":"https://github.githubassets.com/images/icons/emoji/unicode/1f948.png?v8","3rd_place_medal":"https://github.githubassets.com/images/icons/emoji/unicode/1f949.png?v8","8ball":"https://github.githubassets.com/images/icons/emoji/unicode/1f3b1.png?v8",a:"https://github.githubassets.com/images/icons/emoji/unicode/1f170.png?v8",ab:"https://github.githubassets.com/images/icons/emoji/unicode/1f18e.png?v8",abacus:"https://github.githubassets.com/images/icons/emoji/unicode/1f9ee.png?v8",abc:"https://github.githubassets.com/images/icons/emoji/unicode/1f524.png?v8",abcd:"https://github.githubassets.com/images/icons/emoji/unicode/1f521.png?v8",accept:"https://github.githubassets.com/images/icons/emoji/unicode/1f251.png?v8",accessibility:"https://github.githubassets.com/images/icons/emoji/accessibility.png?v8",accordion:"https://github.githubassets.com/images/icons/emoji/unicode/1fa97.png?v8",adhesive_bandage:"https://github.githubassets.com/images/icons/emoji/unicode/1fa79.png?v8",adult:"https://github.githubassets.com/images/icons/emoji/unicode/1f9d1.png?v8",aerial_tramway:"https://github.githubassets.com/images/icons/emoji/unicode/1f6a1.png?v8",afghanistan:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1eb.png?v8",airplane:"https://github.githubassets.com/images/icons/emoji/unicode/2708.png?v8",aland_islands:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1fd.png?v8",alarm_clock:"https://github.githubassets.com/images/icons/emoji/unicode/23f0.png?v8",albania:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f1.png?v8",alembic:"https://github.githubassets.com/images/icons/emoji/unicode/2697.png?v8",algeria:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1ff.png?v8",alien:"https://github.githubassets.com/images/icons/emoji/unicode/1f47d.png?v8",ambulance:"https://github.githubassets.com/images/icons/emoji/unicode/1f691.png?v8",american_samoa:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f8.png?v8",amphora:"https://github.githubassets.com/images/icons/emoji/unicode/1f3fa.png?v8",anatomical_heart:"https://github.githubassets.com/images/icons/emoji/unicode/1fac0.png?v8",anchor:"https://github.githubassets.com/images/icons/emoji/unicode/2693.png?v8",andorra:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1e9.png?v8",angel:"https://github.githubassets.com/images/icons/emoji/unicode/1f47c.png?v8",anger:"https://github.githubassets.com/images/icons/emoji/unicode/1f4a2.png?v8",angola:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f4.png?v8",angry:"https://github.githubassets.com/images/icons/emoji/unicode/1f620.png?v8",anguilla:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1ee.png?v8",anguished:"https://github.githubassets.com/images/icons/emoji/unicode/1f627.png?v8",ant:"https://github.githubassets.com/images/icons/emoji/unicode/1f41c.png?v8",antarctica:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f6.png?v8",antigua_barbuda:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1ec.png?v8",apple:"https://github.githubassets.com/images/icons/emoji/unicode/1f34e.png?v8",aquarius:"https://github.githubassets.com/images/icons/emoji/unicode/2652.png?v8",argentina:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f7.png?v8",aries:"https://github.githubassets.com/images/icons/emoji/unicode/2648.png?v8",armenia:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f2.png?v8",arrow_backward:"https://github.githubassets.com/images/icons/emoji/unicode/25c0.png?v8",arrow_double_down:"https://github.githubassets.com/images/icons/emoji/unicode/23ec.png?v8",arrow_double_up:"https://github.githubassets.com/images/icons/emoji/unicode/23eb.png?v8",arrow_down:"https://github.githubassets.com/images/icons/emoji/unicode/2b07.png?v8",arrow_down_small:"https://github.githubassets.com/images/icons/emoji/unicode/1f53d.png?v8",arrow_forward:"https://github.githubassets.com/images/icons/emoji/unicode/25b6.png?v8",arrow_heading_down:"https://github.githubassets.com/images/icons/emoji/unicode/2935.png?v8",arrow_heading_up:"https://github.githubassets.com/images/icons/emoji/unicode/2934.png?v8",arrow_left:"https://github.githubassets.com/images/icons/emoji/unicode/2b05.png?v8",arrow_lower_left:"https://github.githubassets.com/images/icons/emoji/unicode/2199.png?v8",arrow_lower_right:"https://github.githubassets.com/images/icons/emoji/unicode/2198.png?v8",Line truncated
let githubEmojiData={100:"https://github.githubassets.com/images/icons/emoji/unicode/1f4af.png?v8",1234:"https://github.githubassets.com/images/icons/emoji/unicode/1f522.png?v8","+1":"https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8","-1":"https://github.githubassets.com/images/icons/emoji/unicode/1f44e.png?v8","1st_place_medal":"https://github.githubassets.com/images/icons/emoji/unicode/1f947.png?v8","2nd_place_medal":"https://github.githubassets.com/images/icons/emoji/unicode/1f948.png?v8","3rd_place_medal":"https://github.githubassets.com/images/icons/emoji/unicode/1f949.png?v8","8ball":"https://github.githubassets.com/images/icons/emoji/unicode/1f3b1.png?v8",a:"https://github.githubassets.com/images/icons/emoji/unicode/1f170.png?v8",ab:"https://github.githubassets.com/images/icons/emoji/unicode/1f18e.png?v8",abacus:"https://github.githubassets.com/images/icons/emoji/unicode/1f9ee.png?v8",abc:"https://github.githubassets.com/images/icons/emoji/unicode/1f524.png?v8",abcd:"https://github.githubassets.com/images/icons/emoji/unicode/1f521.png?v8",accept:"https://github.githubassets.com/images/icons/emoji/unicode/1f251.png?v8",accessibility:"https://github.githubassets.com/images/icons/emoji/accessibility.png?v8",accordion:"https://github.githubassets.com/images/icons/emoji/unicode/1fa97.png?v8",adhesive_bandage:"https://github.githubassets.com/images/icons/emoji/unicode/1fa79.png?v8",adult:"https://github.githubassets.com/images/icons/emoji/unicode/1f9d1.png?v8",aerial_tramway:"https://github.githubassets.com/images/icons/emoji/unicode/1f6a1.png?v8",afghanistan:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1eb.png?v8",airplane:"https://github.githubassets.com/images/icons/emoji/unicode/2708.png?v8",aland_islands:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1fd.png?v8",alarm_clock:"https://github.githubassets.com/images/icons/emoji/unicode/23f0.png?v8",albania:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f1.png?v8",alembic:"https://github.githubassets.com/images/icons/emoji/unicode/2697.png?v8",algeria:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1ff.png?v8",alien:"https://github.githubassets.com/images/icons/emoji/unicode/1f47d.png?v8",ambulance:"https://github.githubassets.com/images/icons/emoji/unicode/1f691.png?v8",american_samoa:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f8.png?v8",amphora:"https://github.githubassets.com/images/icons/emoji/unicode/1f3fa.png?v8",anatomical_heart:"https://github.githubassets.com/images/icons/emoji/unicode/1fac0.png?v8",anchor:"https://github.githubassets.com/images/icons/emoji/unicode/2693.png?v8",andorra:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1e9.png?v8",angel:"https://github.githubassets.com/images/icons/emoji/unicode/1f47c.png?v8",anger:"https://github.githubassets.com/images/icons/emoji/unicode/1f4a2.png?v8",angola:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f4.png?v8",angry:"https://github.githubassets.com/images/icons/emoji/unicode/1f620.png?v8",anguilla:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1ee.png?v8",anguished:"https://github.githubassets.com/images/icons/emoji/unicode/1f627.png?v8",ant:"https://github.githubassets.com/images/icons/emoji/unicode/1f41c.png?v8",antarctica:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f6.png?v8",antigua_barbuda:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1ec.png?v8",apple:"https://github.githubassets.com/images/icons/emoji/unicode/1f34e.png?v8",aquarius:"https://github.githubassets.com/images/icons/emoji/unicode/2652.png?v8",argentina:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f7.png?v8",aries:"https://github.githubassets.com/images/icons/emoji/unicode/2648.png?v8",armenia:"https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f2.png?v8",arrow_backward:"https://github.githubassets.com/images/icons/emoji/unicode/25c0.png?v8",arrow_double_down:"https://github.githubassets.com/images/icons/emoji/unicode/23ec.png?v8",arrow_double_up:"https://github.githubassets.com/images/icons/emoji/unicode/23eb.png?v8",arrow_down:"https://github.githubassets.com/images/icons/emoji/unicode/2b07.png?v8",arrow_down_small:"https://github.githubassets.com/images/icons/emoji/unicode/1f53d.png?v8",arrow_forward:"https://github.githubassets.com/images/icons/emoji/unicode/25b6.png?v8",arrow_heading_down:"https://github.githubassets.com/images/icons/emoji/unicode/2935.png?v8",arrow_heading_up:"https://github.githubassets.com/images/icons/emoji/unicode/2934.png?v8",arrow_left:"https://github.githubassets.com/images/icons/emoji/unicode/2b05.png?v8",arrow_lower_left:"https://github.githubassets.com/images/icons/emoji/unicode/2199.png?v8",arrow_lower_right:"https://github.githubassets.com/images/icons/emoji/unicode/2198.png?v8",arrow_right:"https://github.gi Line truncated
${e}</blockquote>
`}html(e,t){return e}heading(e,t,i){return`<h${t}>${e}</h${t}>
`}hr(){return"<hr>\n"}list(e,t,i){var s=t?"ol":"ul";return"<"+s+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+s+">\n"}listitem(e,t,i){return`<li>${e}</li>
@@ -6,5 +6,6 @@ ${e}</blockquote>
`}table(e,t){return"<table>\n<thead>\n"+e+"</thead>\n"+(t=t&&`<tbody>${t}</tbody>`)+"</table>\n"}tablerow(e){return`<tr>
${e}</tr>
`}tablecell(e,t){var i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+e+`</${i}>
`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,i){var s=u(e);if(null===s)return i;let n='<a href="'+(e=s)+'"';return t&&(n+=' title="'+t+'"'),n+=">"+i+"</a>"}image(e,t,i){var s=u(e);if(null===s)return i;let n=`<img src="${e=s}" alt="${i}"`;return t&&(n+=` title="${t}"`),n+=">"}text(e){return e}}class N{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class I{options;renderer;textRenderer;constructor(e){this.options=e||t.defaults,this.options.renderer=this.options.renderer||new D,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new N}static parse(e,t){return new I(t).parse(e)}static parseInline(e,t){return new I(t).parseInline(e)}parse(s,n=!0){let u="";for(let i=0;i<s.length;i++){var g=s[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[g.type]){let e=g,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){u+=t||"";continue}}switch(g.type){case"space":continue;case"hr":u+=this.renderer.hr();continue;case"heading":{let e=g;u+=this.renderer.heading(this.parseInline(e.tokens),e.depth,this.parseInline(e.tokens,this.textRenderer).replace(H,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue}case"code":{let e=g;u+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{let i=g,e="",s="";for(let e=0;e<i.header.length;e++)s+=this.renderer.tablecell(this.parseInline(i.header[e].tokens),{header:!0,align:i.align[e]});e+=this.renderer.tablerow(s);let n="";for(let e=0;e<i.rows.length;e++){let t=i.rows[e];s="";for(let e=0;e<t.length;e++)s+=this.renderer.tablecell(this.parseInline(t[e].tokens),{header:!1,align:i.align[e]});n+=this.renderer.tablerow(s)}u+=this.renderer.table(e,n);continue}case"blockquote":{let e=g,t=this.parse(e.tokens);u+=this.renderer.blockquote(t);continue}case"list":{let o=g,e=o.ordered,t=o.start,a=o.loose,c="";for(let n=0;n<o.items.length;n++){let t=o.items[n],i=t.checked,e=t.task,s="";if(t.task){let e=this.renderer.checkbox(!!i);a?0<t.tokens.length&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=e+" "+t.tokens[0].text,t.tokens[0].tokens&&0<t.tokens[0].tokens.length&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=e+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",text:e+" "}):s+=e+" "}s+=this.parse(t.tokens,a),c+=this.renderer.listitem(s,e,!!i)}u+=this.renderer.list(c,e,t);continue}case"html":{let e=g;u+=this.renderer.html(e.text,e.block);continue}case"paragraph":{let e=g;u+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let e=g,t=e.tokens?this.parseInline(e.tokens):e.text;for(;i+1<s.length&&"text"===s[i+1].type;)e=s[++i],t+="\n"+(e.tokens?this.parseInline(e.tokens):e.text);u+=n?this.renderer.paragraph(t):t;continue}default:{let e='Token with "'+g.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return u}parseInline(t,i){i=i||this.renderer;let s="";for(let e=0;e<t.length;e++){var n=t[e];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){let e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){s+=e||"";continue}}switch(n.type){case"escape":{let e=n;s+=i.text(e.text);break}case"html":{let e=n;s+=i.html(e.text);break}case"link":{let e=n;s+=i.link(e.href,e.title,this.parseInline(e.tokens,i));break}case"image":{let e=n;s+=i.image(e.href,e.title,e.text);break}case"strong":{let e=n;s+=i.strong(this.parseInline(e.tokens,i));break}case"em":{let e=n;s+=i.em(this.parseInline(e.tokens,i));break}case"codespan":{let e=n;s+=i.codespan(e.text);break}case"br":s+=i.br();break;case"del":{let e=n;s+=i.del(this.parseInline(e.tokens,i));break}case"text":{let e=n;s+=i.text(e.text);break}default:{let e='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return s}}class O{options;constructor(e){this.options=e||t.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class ue{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(S.lex,I.parse);parseInline=this.#e(S.lexInline,I.parseInline);Parser=I;Renderer=D;TextRenderer=N;Lexer=S;Tokenizer=p;Hooks=O;constructor(...e){this.use(..Line truncated
`},marked.setOptions({renderer:i,pedantic:!1,gfm:!0,breaks:!1,sanitize:!1,smartLists:!0,smartypants:!1,xhtml:!1,headerIds:!1,katex:katex}),t&&marked.use(baseUrl(t)),marked.use(markedKatex({throwOnError:!1})),marked.use(markedMermaid()),DOMPurify.sanitize(marked.parse(e,{renderer:i}))}
`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,i){var s=u(e);if(null===s)return i;let n='<a href="'+(e=s)+'"';return t&&(n+=' title="'+t+'"'),n+=">"+i+"</a>"}image(e,t,i){var s=u(e);if(null===s)return i;let n=`<img src="${e=s}" alt="${i}"`;return t&&(n+=` title="${t}"`),n+=">"}text(e){return e}}class N{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class I{options;renderer;textRenderer;constructor(e){this.options=e||t.defaults,this.options.renderer=this.options.renderer||new D,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new N}static parse(e,t){return new I(t).parse(e)}static parseInline(e,t){return new I(t).parseInline(e)}parse(s,n=!0){let u="";for(let i=0;i<s.length;i++){var g=s[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[g.type]){let e=g,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){u+=t||"";continue}}switch(g.type){case"space":continue;case"hr":u+=this.renderer.hr();continue;case"heading":{let e=g;u+=this.renderer.heading(this.parseInline(e.tokens),e.depth,this.parseInline(e.tokens,this.textRenderer).replace(z,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue}case"code":{let e=g;u+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{let i=g,e="",s="";for(let e=0;e<i.header.length;e++)s+=this.renderer.tablecell(this.parseInline(i.header[e].tokens),{header:!0,align:i.align[e]});e+=this.renderer.tablerow(s);let n="";for(let e=0;e<i.rows.length;e++){let t=i.rows[e];s="";for(let e=0;e<t.length;e++)s+=this.renderer.tablecell(this.parseInline(t[e].tokens),{header:!1,align:i.align[e]});n+=this.renderer.tablerow(s)}u+=this.renderer.table(e,n);continue}case"blockquote":{let e=g,t=this.parse(e.tokens);u+=this.renderer.blockquote(t);continue}case"list":{let o=g,e=o.ordered,t=o.start,a=o.loose,c="";for(let n=0;n<o.items.length;n++){let t=o.items[n],i=t.checked,e=t.task,s="";if(t.task){let e=this.renderer.checkbox(!!i);a?0<t.tokens.length&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=e+" "+t.tokens[0].text,t.tokens[0].tokens&&0<t.tokens[0].tokens.length&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=e+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",text:e+" "}):s+=e+" "}s+=this.parse(t.tokens,a),c+=this.renderer.listitem(s,e,!!i)}u+=this.renderer.list(c,e,t);continue}case"html":{let e=g;u+=this.renderer.html(e.text,e.block);continue}case"paragraph":{let e=g;u+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let e=g,t=e.tokens?this.parseInline(e.tokens):e.text;for(;i+1<s.length&&"text"===s[i+1].type;)e=s[++i],t+="\n"+(e.tokens?this.parseInline(e.tokens):e.text);u+=n?this.renderer.paragraph(t):t;continue}default:{let e='Token with "'+g.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return u}parseInline(t,i){i=i||this.renderer;let s="";for(let e=0;e<t.length;e++){var n=t[e];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type]){let e=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){s+=e||"";continue}}switch(n.type){case"escape":{let e=n;s+=i.text(e.text);break}case"html":{let e=n;s+=i.html(e.text);break}case"link":{let e=n;s+=i.link(e.href,e.title,this.parseInline(e.tokens,i));break}case"image":{let e=n;s+=i.image(e.href,e.title,e.text);break}case"strong":{let e=n;s+=i.strong(this.parseInline(e.tokens,i));break}case"em":{let e=n;s+=i.em(this.parseInline(e.tokens,i));break}case"codespan":{let e=n;s+=i.codespan(e.text);break}case"br":s+=i.br();break;case"del":{let e=n;s+=i.del(this.parseInline(e.tokens,i));break}case"text":{let e=n;s+=i.text(e.text);break}default:{let e='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return s}}class O{options;constructor(e){this.options=e||t.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class ue{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(C.lex,I.parse);parseInline=this.#e(C.lexInline,I.parseInline);Parser=I;Renderer=D;TextRenderer=N;Lexer=C;Tokenizer=p;Hooks=O;constructor(...e){this.use(..Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}let $t=Object.entries,t=Object.setPrototypeOf,a=Object.isFrozen,Bt=Object.getPrototypeOf,Wt=Object.getOwnPropertyDescriptor,Ut=Object.freeze,Qt=Object.seal,Yt=Object.create,e=typeof Reflect<"u"&&Reflect,n=e.apply,i=e.construct,Kt=(Ut=Ut||function(e){return e},Qt=Qt||function(e){return e},n=n||function(e,t){var i=[...arguments].slice(2);return e.apply(t,i)},i=i||function(e){return new e(...[...arguments].slice(1))},ci(Array.prototype.forEach)),ji=(Array.prototype.indexOf,ci(Array.prototype.lastIndexOf)),yi=ci(Array.prototype.pop),Vt=ci(Array.prototype.push),wi=ci(Array.prototype.slice),ki=ci(Array.prototype.splice),Xt=Array.isArray,Zt=c(Set),Gt=ci(Set.prototype.add),Jt=ci(Set.prototype.has),ei=ci(String.prototype.toLowerCase),ti=ci(String.prototype.toString),xi=ci(String.prototype.match),ii=ci(String.prototype.replace),Ei=ci(String.prototype.indexOf),Ti=ci(String.prototype.trim),Si=ci(Number.prototype.toString),Ai=ci(Boolean.prototype.toString),Ci="u"<typeof BigInt?null:ci(BigInt.prototype.toString),Di="u"<typeof Symbol?null:ci(Symbol.prototype.toString),si=ci(Object.prototype.hasOwnProperty),ni=ci(Object.prototype.toString),oi=ci(RegExp.prototype.test),ai=c(TypeError);function ci(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);var t=[...arguments].slice(1);return n(i,e,t)}}function c(e){return function(){return i(e,[...arguments])}}function ui(i,s,e){var n,o=2<arguments.length&&void 0!==e?e:ei;if(t&&t(i,null),Xt(s)){let t=s.length;for(;t--;){let e=s[t];"string"==typeof e&&(n=o(e))!==e&&(a(s)||(s[t]=n),e=n),i[e]=!0}}return i}function gi(e){var t,i=Yt(null);for(t of $t(e)){var s=o(t,2),n=s[0],s=s[1];si(e,n)&&(i[n]=Xt(s)?(t=>{for(let e=0;e<t.length;e++)si(t,e)||(t[e]=null);return t})(s):s&&"object"==typeof s&&s.constructor===Object?gi(s):s)}return i}function ri(e,t){for(;null!==e;){var i=Wt(e,t);if(i){if(i.get)return ci(i.get);if("function"==typeof i.value)return ci(i.value)}e=Bt(e)}return function(){return null}}function Ni(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}}function hi(e,t,i,s){return si(e,t)&&Xt(e[t])?ui(s.base?gi(s.base):{},e[t],s.transform):i}function mi(e,t,i){return(e=si(e,t)?e[t]:void 0)&&"object"==typeof e?gi(e):i()}let Ii=Ut("a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")),pi=Ut("svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")),li=Ut(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Oi=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fi=Ut("math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")),Li=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Pi=Ut(["#text"]),Ri=Ut("accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high. Line truncated
`+m),w&&(m=xt(m)),d&&Me?v(m):m},p.setConfig=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};ee(e),Re=!0,Fe=j,qe=y},p.clearConfig=function(){N=null,Re=!1,Fe=null,qe=null,d=ue,b=""},p.isValidAttribute=function(e,t,i){N||ee({});var e=D(e),s=D(t);return("string"!=typeof i||!(Lt(t,i)||!Pe&&oi(Xi,i)))&&Nt(e,s,i)},p.addHook=function(e,t){"function"==typeof t&&si(_,e)&&Vt(_[e],t)},p.removeHook=function(e,t){if(si(_,e))return void 0!==t?-1===(t=ji(_[e],t))?void 0:ki(_[e],t,1)[0]:yi(_[e])},p.removeHooks=function(e){si(_,e)&&(_[e]=[])},p.removeAllHooks=function(){_=Ni()},p}()}),(()=>{function i(){this.fg=this.bg=null,this.bright=0}var e,t="undefined"!=typeof module,a=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]];i.prototype.escape_for_html=function(e){return e.replace(/[&<>]/gm,function(e){return"&"==e?"&amp;":"<"==e?"&lt;":">"==e?"&gt;":void 0})},i.prototype.linkify=function(e){return e.replace(/(https?:\/\/[^\s]+)/gm,function(e){return'<a href="'+e+'">'+e+"</a>"})},i.prototype.ansi_to_html=function(e,t){var e=e.split(/\033\[/),i=e.shift(),s=this,e=e.map(function(e){return s.process_chunk(e,t)});return e.unshift(i),e.reduce(function(e,t){return Array.isArray(t)?e.concat(t):(e.push(t),e)},[]).join("")},i.prototype.process_chunk=function(e,t){var i,s,t=void 0!==(t=void 0===t?{}:t).use_classes&&t.use_classes,n=t?"class":"color",o=e.match(/([\d;]*)m([^]*)/m);return o?(i=o[2],o=o[1].split(";"),s=this,o.map(function(e){e=parseInt(e);isNaN(e)||0===e?(s.fg=s.bg=null,s.bright=0):1===e?s.bright=1:30<=e&&e<38?s.fg=a[s.bright][e%10][n]:40<=e&&e<48&&(s.bg=a[0][e%10][n])}),null===s.fg&&null===s.bg?i:(o=classes=[],s.fg&&(t?classes.push(s.fg+"-fg"):o.push("color:rgb("+s.fg+")")),s.bg&&(t?classes.push(s.bg+"-bg"):o.push("background-color:rgb("+s.bg+")")),t?['<span class="'+classes.join(" ")+'">',i,"</span>"]:['<span style="'+o.join(";")+'">',i,"</span>"])):e},e={escape_for_html:function(e){return(new i).escape_for_html(e)},linkify:function(e){return(new i).linkify(e)},ansi_to_html:function(e,t){return(new i).ansi_to_html(e,t)},ansi_to_html_obj:function(){return new i}},t&&(module.exports=e),"undefined"!=typeof window&&"undefined"==typeof ender&&(window.ansi_up=e),"function"==typeof define&&define.amd&&define("ansi_up",[],function(){return e})})(Date);var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=(u=>{var e,t,g=/\blang(?:uage)?-([\w-]+)\b/i,i=0,P={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof R?new R(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++i}),e.__id},clone:function i(e,s){var n,t;switch(s=s||{},P.util.type(e)){case"Object":if(t=P.util.objId(e),s[t])return s[t];for(var o in n={},s[t]=n,e)e.hasOwnProperty(o)&&(n[o]=i(e[o],s));return n;case"Array":return t=P.util.objId(e),s[t]||(n=[],s[t]=n,e.forEach(function(e,t){n[t]=i(e,s)}),n);default:return e}},getLanguage:function(e){for(;e&&!g.test(e.className);)e=e.parentElement;return e?(e.className.match(g)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(e){var t=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(e.stack)||[])[1];if(t){var i,s=document.getElementsByTagName("script");for(i in s)if(s[i].src==t)return s[i]}return null}},isActive:function(e,t,i){for(var s="no-"+t;e;){var n=e.classList;if(n.contains(t))return!0;if(n.contains(s))return!1;e=e.parentElement}return!!i}},languages:{extend:function(e,t){var i,s=P.util.clone(P.languages[e]);for(i in t)s[i]=t[i];return s},insertBefore:function(i,e,t,s){var n,o=(s=s||P.languages)[i],a={};for(n in o)if(o.hasOwnProperty(n)){if(n==e)for(var c in t)t.hasOwnProperty(c)&&(a[c]=t[c]);t.hasOwnProperty(n)||(a[n]=o[n])}var u=s[i];return s[i]=a,P.languages.DFS(P.languages,function(e,t){t===u&&e!=i&&(this[e]=a)}),a},DFS:function e(t,i,s,n){n=n||{};var o,a,c,u=P.util.objId;for(o in t)t.hasOwnProperty(o)&&(i.call(t,o,t[o],s||o),a=t[o],"Obje Line truncated
+66 -4
View File
@@ -1,8 +1,9 @@
window.githubEmojis = {
"+1": "https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8",
"-1": "https://github.githubassets.com/images/icons/emoji/unicode/1f44e.png?v8",
// GitHub emoji catalog: https://api.github.com/emojis (2026-11-02).
const githubEmojiData = {
"100": "https://github.githubassets.com/images/icons/emoji/unicode/1f4af.png?v8",
"1234": "https://github.githubassets.com/images/icons/emoji/unicode/1f522.png?v8",
"+1": "https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8",
"-1": "https://github.githubassets.com/images/icons/emoji/unicode/1f44e.png?v8",
"1st_place_medal": "https://github.githubassets.com/images/icons/emoji/unicode/1f947.png?v8",
"2nd_place_medal": "https://github.githubassets.com/images/icons/emoji/unicode/1f948.png?v8",
"3rd_place_medal": "https://github.githubassets.com/images/icons/emoji/unicode/1f949.png?v8",
@@ -127,6 +128,7 @@ window.githubEmojis = {
"bathtub": "https://github.githubassets.com/images/icons/emoji/unicode/1f6c1.png?v8",
"battery": "https://github.githubassets.com/images/icons/emoji/unicode/1f50b.png?v8",
"beach_umbrella": "https://github.githubassets.com/images/icons/emoji/unicode/1f3d6.png?v8",
"beans": "https://github.githubassets.com/images/icons/emoji/unicode/1fad8.png?v8",
"bear": "https://github.githubassets.com/images/icons/emoji/unicode/1f43b.png?v8",
"bearded_person": "https://github.githubassets.com/images/icons/emoji/unicode/1f9d4.png?v8",
"beaver": "https://github.githubassets.com/images/icons/emoji/unicode/1f9ab.png?v8",
@@ -157,6 +159,8 @@ window.githubEmojis = {
"bird": "https://github.githubassets.com/images/icons/emoji/unicode/1f426.png?v8",
"birthday": "https://github.githubassets.com/images/icons/emoji/unicode/1f382.png?v8",
"bison": "https://github.githubassets.com/images/icons/emoji/unicode/1f9ac.png?v8",
"biting_lip": "https://github.githubassets.com/images/icons/emoji/unicode/1fae6.png?v8",
"black_bird": "https://github.githubassets.com/images/icons/emoji/unicode/1f426-2b1b.png?v8",
"black_cat": "https://github.githubassets.com/images/icons/emoji/unicode/1f408-2b1b.png?v8",
"black_circle": "https://github.githubassets.com/images/icons/emoji/unicode/26ab.png?v8",
"black_flag": "https://github.githubassets.com/images/icons/emoji/unicode/1f3f4.png?v8",
@@ -226,6 +230,7 @@ window.githubEmojis = {
"brown_square": "https://github.githubassets.com/images/icons/emoji/unicode/1f7eb.png?v8",
"brunei": "https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1f3.png?v8",
"bubble_tea": "https://github.githubassets.com/images/icons/emoji/unicode/1f9cb.png?v8",
"bubbles": "https://github.githubassets.com/images/icons/emoji/unicode/1fae7.png?v8",
"bucket": "https://github.githubassets.com/images/icons/emoji/unicode/1faa3.png?v8",
"bug": "https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png?v8",
"building_construction": "https://github.githubassets.com/images/icons/emoji/unicode/1f3d7.png?v8",
@@ -387,7 +392,9 @@ window.githubEmojis = {
"cookie": "https://github.githubassets.com/images/icons/emoji/unicode/1f36a.png?v8",
"cool": "https://github.githubassets.com/images/icons/emoji/unicode/1f192.png?v8",
"cop": "https://github.githubassets.com/images/icons/emoji/unicode/1f46e.png?v8",
"copilot": "https://github.githubassets.com/images/icons/emoji/copilot.png?v8",
"copyright": "https://github.githubassets.com/images/icons/emoji/unicode/00a9.png?v8",
"coral": "https://github.githubassets.com/images/icons/emoji/unicode/1fab8.png?v8",
"corn": "https://github.githubassets.com/images/icons/emoji/unicode/1f33d.png?v8",
"costa_rica": "https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1f7.png?v8",
"cote_divoire": "https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1ee.png?v8",
@@ -417,6 +424,7 @@ window.githubEmojis = {
"crossed_flags": "https://github.githubassets.com/images/icons/emoji/unicode/1f38c.png?v8",
"crossed_swords": "https://github.githubassets.com/images/icons/emoji/unicode/2694.png?v8",
"crown": "https://github.githubassets.com/images/icons/emoji/unicode/1f451.png?v8",
"crutch": "https://github.githubassets.com/images/icons/emoji/unicode/1fa7c.png?v8",
"cry": "https://github.githubassets.com/images/icons/emoji/unicode/1f622.png?v8",
"crying_cat_face": "https://github.githubassets.com/images/icons/emoji/unicode/1f63f.png?v8",
"crystal_ball": "https://github.githubassets.com/images/icons/emoji/unicode/1f52e.png?v8",
@@ -484,7 +492,9 @@ window.githubEmojis = {
"dolphin": "https://github.githubassets.com/images/icons/emoji/unicode/1f42c.png?v8",
"dominica": "https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1f2.png?v8",
"dominican_republic": "https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1f4.png?v8",
"donkey": "https://github.githubassets.com/images/icons/emoji/unicode/1facf.png?v8",
"door": "https://github.githubassets.com/images/icons/emoji/unicode/1f6aa.png?v8",
"dotted_line_face": "https://github.githubassets.com/images/icons/emoji/unicode/1fae5.png?v8",
"doughnut": "https://github.githubassets.com/images/icons/emoji/unicode/1f369.png?v8",
"dove": "https://github.githubassets.com/images/icons/emoji/unicode/1f54a.png?v8",
"dragon": "https://github.githubassets.com/images/icons/emoji/unicode/1f409.png?v8",
@@ -523,6 +533,7 @@ window.githubEmojis = {
"elf_man": "https://github.githubassets.com/images/icons/emoji/unicode/1f9dd-2642.png?v8",
"elf_woman": "https://github.githubassets.com/images/icons/emoji/unicode/1f9dd-2640.png?v8",
"email": "https://github.githubassets.com/images/icons/emoji/unicode/1f4e7.png?v8",
"empty_nest": "https://github.githubassets.com/images/icons/emoji/unicode/1fab9.png?v8",
"end": "https://github.githubassets.com/images/icons/emoji/unicode/1f51a.png?v8",
"england": "https://github.githubassets.com/images/icons/emoji/unicode/1f3f4-e0067-e0062-e0065-e006e-e0067-e007f.png?v8",
"envelope": "https://github.githubassets.com/images/icons/emoji/unicode/2709.png?v8",
@@ -546,8 +557,12 @@ window.githubEmojis = {
"eyeglasses": "https://github.githubassets.com/images/icons/emoji/unicode/1f453.png?v8",
"eyes": "https://github.githubassets.com/images/icons/emoji/unicode/1f440.png?v8",
"face_exhaling": "https://github.githubassets.com/images/icons/emoji/unicode/1f62e-1f4a8.png?v8",
"face_holding_back_tears": "https://github.githubassets.com/images/icons/emoji/unicode/1f979.png?v8",
"face_in_clouds": "https://github.githubassets.com/images/icons/emoji/unicode/1f636-1f32b.png?v8",
"face_with_diagonal_mouth": "https://github.githubassets.com/images/icons/emoji/unicode/1fae4.png?v8",
"face_with_head_bandage": "https://github.githubassets.com/images/icons/emoji/unicode/1f915.png?v8",
"face_with_open_eyes_and_hand_over_mouth": "https://github.githubassets.com/images/icons/emoji/unicode/1fae2.png?v8",
"face_with_peeking_eye": "https://github.githubassets.com/images/icons/emoji/unicode/1fae3.png?v8",
"face_with_spiral_eyes": "https://github.githubassets.com/images/icons/emoji/unicode/1f635-1f4ab.png?v8",
"face_with_thermometer": "https://github.githubassets.com/images/icons/emoji/unicode/1f912.png?v8",
"facepalm": "https://github.githubassets.com/images/icons/emoji/unicode/1f926.png?v8",
@@ -636,11 +651,13 @@ window.githubEmojis = {
"floppy_disk": "https://github.githubassets.com/images/icons/emoji/unicode/1f4be.png?v8",
"flower_playing_cards": "https://github.githubassets.com/images/icons/emoji/unicode/1f3b4.png?v8",
"flushed": "https://github.githubassets.com/images/icons/emoji/unicode/1f633.png?v8",
"flute": "https://github.githubassets.com/images/icons/emoji/unicode/1fa88.png?v8",
"fly": "https://github.githubassets.com/images/icons/emoji/unicode/1fab0.png?v8",
"flying_disc": "https://github.githubassets.com/images/icons/emoji/unicode/1f94f.png?v8",
"flying_saucer": "https://github.githubassets.com/images/icons/emoji/unicode/1f6f8.png?v8",
"fog": "https://github.githubassets.com/images/icons/emoji/unicode/1f32b.png?v8",
"foggy": "https://github.githubassets.com/images/icons/emoji/unicode/1f301.png?v8",
"folding_hand_fan": "https://github.githubassets.com/images/icons/emoji/unicode/1faad.png?v8",
"fondue": "https://github.githubassets.com/images/icons/emoji/unicode/1fad5.png?v8",
"foot": "https://github.githubassets.com/images/icons/emoji/unicode/1f9b6.png?v8",
"football": "https://github.githubassets.com/images/icons/emoji/unicode/1f3c8.png?v8",
@@ -689,6 +706,7 @@ window.githubEmojis = {
"gibraltar": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1ee.png?v8",
"gift": "https://github.githubassets.com/images/icons/emoji/unicode/1f381.png?v8",
"gift_heart": "https://github.githubassets.com/images/icons/emoji/unicode/1f49d.png?v8",
"ginger_root": "https://github.githubassets.com/images/icons/emoji/unicode/1fada.png?v8",
"giraffe": "https://github.githubassets.com/images/icons/emoji/unicode/1f992.png?v8",
"girl": "https://github.githubassets.com/images/icons/emoji/unicode/1f467.png?v8",
"globe_with_meridians": "https://github.githubassets.com/images/icons/emoji/unicode/1f310.png?v8",
@@ -702,6 +720,7 @@ window.githubEmojis = {
"golfing": "https://github.githubassets.com/images/icons/emoji/unicode/1f3cc.png?v8",
"golfing_man": "https://github.githubassets.com/images/icons/emoji/unicode/1f3cc-2642.png?v8",
"golfing_woman": "https://github.githubassets.com/images/icons/emoji/unicode/1f3cc-2640.png?v8",
"goose": "https://github.githubassets.com/images/icons/emoji/unicode/1fabf.png?v8",
"gorilla": "https://github.githubassets.com/images/icons/emoji/unicode/1f98d.png?v8",
"grapes": "https://github.githubassets.com/images/icons/emoji/unicode/1f347.png?v8",
"greece": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f7.png?v8",
@@ -714,6 +733,7 @@ window.githubEmojis = {
"greenland": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f1.png?v8",
"grenada": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1e9.png?v8",
"grey_exclamation": "https://github.githubassets.com/images/icons/emoji/unicode/2755.png?v8",
"grey_heart": "https://github.githubassets.com/images/icons/emoji/unicode/1fa76.png?v8",
"grey_question": "https://github.githubassets.com/images/icons/emoji/unicode/2754.png?v8",
"grimacing": "https://github.githubassets.com/images/icons/emoji/unicode/1f62c.png?v8",
"grin": "https://github.githubassets.com/images/icons/emoji/unicode/1f601.png?v8",
@@ -731,6 +751,7 @@ window.githubEmojis = {
"guitar": "https://github.githubassets.com/images/icons/emoji/unicode/1f3b8.png?v8",
"gun": "https://github.githubassets.com/images/icons/emoji/unicode/1f52b.png?v8",
"guyana": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1fe.png?v8",
"hair_pick": "https://github.githubassets.com/images/icons/emoji/unicode/1faae.png?v8",
"haircut": "https://github.githubassets.com/images/icons/emoji/unicode/1f487.png?v8",
"haircut_man": "https://github.githubassets.com/images/icons/emoji/unicode/1f487-2642.png?v8",
"haircut_woman": "https://github.githubassets.com/images/icons/emoji/unicode/1f487-2640.png?v8",
@@ -739,9 +760,11 @@ window.githubEmojis = {
"hammer": "https://github.githubassets.com/images/icons/emoji/unicode/1f528.png?v8",
"hammer_and_pick": "https://github.githubassets.com/images/icons/emoji/unicode/2692.png?v8",
"hammer_and_wrench": "https://github.githubassets.com/images/icons/emoji/unicode/1f6e0.png?v8",
"hamsa": "https://github.githubassets.com/images/icons/emoji/unicode/1faac.png?v8",
"hamster": "https://github.githubassets.com/images/icons/emoji/unicode/1f439.png?v8",
"hand": "https://github.githubassets.com/images/icons/emoji/unicode/270b.png?v8",
"hand_over_mouth": "https://github.githubassets.com/images/icons/emoji/unicode/1f92d.png?v8",
"hand_with_index_finger_and_thumb_crossed": "https://github.githubassets.com/images/icons/emoji/unicode/1faf0.png?v8",
"handbag": "https://github.githubassets.com/images/icons/emoji/unicode/1f45c.png?v8",
"handball_person": "https://github.githubassets.com/images/icons/emoji/unicode/1f93e.png?v8",
"handshake": "https://github.githubassets.com/images/icons/emoji/unicode/1f91d.png?v8",
@@ -758,6 +781,7 @@ window.githubEmojis = {
"heart_decoration": "https://github.githubassets.com/images/icons/emoji/unicode/1f49f.png?v8",
"heart_eyes": "https://github.githubassets.com/images/icons/emoji/unicode/1f60d.png?v8",
"heart_eyes_cat": "https://github.githubassets.com/images/icons/emoji/unicode/1f63b.png?v8",
"heart_hands": "https://github.githubassets.com/images/icons/emoji/unicode/1faf6.png?v8",
"heart_on_fire": "https://github.githubassets.com/images/icons/emoji/unicode/2764-1f525.png?v8",
"heartbeat": "https://github.githubassets.com/images/icons/emoji/unicode/1f493.png?v8",
"heartpulse": "https://github.githubassets.com/images/icons/emoji/unicode/1f497.png?v8",
@@ -765,6 +789,7 @@ window.githubEmojis = {
"heavy_check_mark": "https://github.githubassets.com/images/icons/emoji/unicode/2714.png?v8",
"heavy_division_sign": "https://github.githubassets.com/images/icons/emoji/unicode/2797.png?v8",
"heavy_dollar_sign": "https://github.githubassets.com/images/icons/emoji/unicode/1f4b2.png?v8",
"heavy_equals_sign": "https://github.githubassets.com/images/icons/emoji/unicode/1f7f0.png?v8",
"heavy_exclamation_mark": "https://github.githubassets.com/images/icons/emoji/unicode/2757.png?v8",
"heavy_heart_exclamation": "https://github.githubassets.com/images/icons/emoji/unicode/2763.png?v8",
"heavy_minus_sign": "https://github.githubassets.com/images/icons/emoji/unicode/2796.png?v8",
@@ -804,6 +829,7 @@ window.githubEmojis = {
"hurtrealbad": "https://github.githubassets.com/images/icons/emoji/hurtrealbad.png?v8",
"hushed": "https://github.githubassets.com/images/icons/emoji/unicode/1f62f.png?v8",
"hut": "https://github.githubassets.com/images/icons/emoji/unicode/1f6d6.png?v8",
"hyacinth": "https://github.githubassets.com/images/icons/emoji/unicode/1fabb.png?v8",
"ice_cream": "https://github.githubassets.com/images/icons/emoji/unicode/1f368.png?v8",
"ice_cube": "https://github.githubassets.com/images/icons/emoji/unicode/1f9ca.png?v8",
"ice_hockey": "https://github.githubassets.com/images/icons/emoji/unicode/1f3d2.png?v8",
@@ -811,10 +837,12 @@ window.githubEmojis = {
"icecream": "https://github.githubassets.com/images/icons/emoji/unicode/1f366.png?v8",
"iceland": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f8.png?v8",
"id": "https://github.githubassets.com/images/icons/emoji/unicode/1f194.png?v8",
"identification_card": "https://github.githubassets.com/images/icons/emoji/unicode/1faaa.png?v8",
"ideograph_advantage": "https://github.githubassets.com/images/icons/emoji/unicode/1f250.png?v8",
"imp": "https://github.githubassets.com/images/icons/emoji/unicode/1f47f.png?v8",
"inbox_tray": "https://github.githubassets.com/images/icons/emoji/unicode/1f4e5.png?v8",
"incoming_envelope": "https://github.githubassets.com/images/icons/emoji/unicode/1f4e8.png?v8",
"index_pointing_at_the_viewer": "https://github.githubassets.com/images/icons/emoji/unicode/1faf5.png?v8",
"india": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f3.png?v8",
"indonesia": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1e9.png?v8",
"infinity": "https://github.githubassets.com/images/icons/emoji/unicode/267e.png?v8",
@@ -836,7 +864,9 @@ window.githubEmojis = {
"japanese_castle": "https://github.githubassets.com/images/icons/emoji/unicode/1f3ef.png?v8",
"japanese_goblin": "https://github.githubassets.com/images/icons/emoji/unicode/1f47a.png?v8",
"japanese_ogre": "https://github.githubassets.com/images/icons/emoji/unicode/1f479.png?v8",
"jar": "https://github.githubassets.com/images/icons/emoji/unicode/1fad9.png?v8",
"jeans": "https://github.githubassets.com/images/icons/emoji/unicode/1f456.png?v8",
"jellyfish": "https://github.githubassets.com/images/icons/emoji/unicode/1fabc.png?v8",
"jersey": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ef-1f1ea.png?v8",
"jigsaw": "https://github.githubassets.com/images/icons/emoji/unicode/1f9e9.png?v8",
"jordan": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ef-1f1f4.png?v8",
@@ -853,6 +883,7 @@ window.githubEmojis = {
"key": "https://github.githubassets.com/images/icons/emoji/unicode/1f511.png?v8",
"keyboard": "https://github.githubassets.com/images/icons/emoji/unicode/2328.png?v8",
"keycap_ten": "https://github.githubassets.com/images/icons/emoji/unicode/1f51f.png?v8",
"khanda": "https://github.githubassets.com/images/icons/emoji/unicode/1faaf.png?v8",
"kick_scooter": "https://github.githubassets.com/images/icons/emoji/unicode/1f6f4.png?v8",
"kimono": "https://github.githubassets.com/images/icons/emoji/unicode/1f458.png?v8",
"kiribati": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1ee.png?v8",
@@ -898,6 +929,8 @@ window.githubEmojis = {
"left_right_arrow": "https://github.githubassets.com/images/icons/emoji/unicode/2194.png?v8",
"left_speech_bubble": "https://github.githubassets.com/images/icons/emoji/unicode/1f5e8.png?v8",
"leftwards_arrow_with_hook": "https://github.githubassets.com/images/icons/emoji/unicode/21a9.png?v8",
"leftwards_hand": "https://github.githubassets.com/images/icons/emoji/unicode/1faf2.png?v8",
"leftwards_pushing_hand": "https://github.githubassets.com/images/icons/emoji/unicode/1faf7.png?v8",
"leg": "https://github.githubassets.com/images/icons/emoji/unicode/1f9b5.png?v8",
"lemon": "https://github.githubassets.com/images/icons/emoji/unicode/1f34b.png?v8",
"leo": "https://github.githubassets.com/images/icons/emoji/unicode/264c.png?v8",
@@ -908,6 +941,7 @@ window.githubEmojis = {
"libra": "https://github.githubassets.com/images/icons/emoji/unicode/264e.png?v8",
"libya": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1fe.png?v8",
"liechtenstein": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1ee.png?v8",
"light_blue_heart": "https://github.githubassets.com/images/icons/emoji/unicode/1fa75.png?v8",
"light_rail": "https://github.githubassets.com/images/icons/emoji/unicode/1f688.png?v8",
"link": "https://github.githubassets.com/images/icons/emoji/unicode/1f517.png?v8",
"lion": "https://github.githubassets.com/images/icons/emoji/unicode/1f981.png?v8",
@@ -923,6 +957,7 @@ window.githubEmojis = {
"long_drum": "https://github.githubassets.com/images/icons/emoji/unicode/1fa98.png?v8",
"loop": "https://github.githubassets.com/images/icons/emoji/unicode/27bf.png?v8",
"lotion_bottle": "https://github.githubassets.com/images/icons/emoji/unicode/1f9f4.png?v8",
"lotus": "https://github.githubassets.com/images/icons/emoji/unicode/1fab7.png?v8",
"lotus_position": "https://github.githubassets.com/images/icons/emoji/unicode/1f9d8.png?v8",
"lotus_position_man": "https://github.githubassets.com/images/icons/emoji/unicode/1f9d8-2642.png?v8",
"lotus_position_woman": "https://github.githubassets.com/images/icons/emoji/unicode/1f9d8-2640.png?v8",
@@ -931,6 +966,7 @@ window.githubEmojis = {
"love_hotel": "https://github.githubassets.com/images/icons/emoji/unicode/1f3e9.png?v8",
"love_letter": "https://github.githubassets.com/images/icons/emoji/unicode/1f48c.png?v8",
"love_you_gesture": "https://github.githubassets.com/images/icons/emoji/unicode/1f91f.png?v8",
"low_battery": "https://github.githubassets.com/images/icons/emoji/unicode/1faab.png?v8",
"low_brightness": "https://github.githubassets.com/images/icons/emoji/unicode/1f505.png?v8",
"luggage": "https://github.githubassets.com/images/icons/emoji/unicode/1f9f3.png?v8",
"lungs": "https://github.githubassets.com/images/icons/emoji/unicode/1fac1.png?v8",
@@ -999,6 +1035,7 @@ window.githubEmojis = {
"mantelpiece_clock": "https://github.githubassets.com/images/icons/emoji/unicode/1f570.png?v8",
"manual_wheelchair": "https://github.githubassets.com/images/icons/emoji/unicode/1f9bd.png?v8",
"maple_leaf": "https://github.githubassets.com/images/icons/emoji/unicode/1f341.png?v8",
"maracas": "https://github.githubassets.com/images/icons/emoji/unicode/1fa87.png?v8",
"marshall_islands": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1ed.png?v8",
"martial_arts_uniform": "https://github.githubassets.com/images/icons/emoji/unicode/1f94b.png?v8",
"martinique": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f6.png?v8",
@@ -1019,6 +1056,7 @@ window.githubEmojis = {
"medical_symbol": "https://github.githubassets.com/images/icons/emoji/unicode/2695.png?v8",
"mega": "https://github.githubassets.com/images/icons/emoji/unicode/1f4e3.png?v8",
"melon": "https://github.githubassets.com/images/icons/emoji/unicode/1f348.png?v8",
"melting_face": "https://github.githubassets.com/images/icons/emoji/unicode/1fae0.png?v8",
"memo": "https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png?v8",
"men_wrestling": "https://github.githubassets.com/images/icons/emoji/unicode/1f93c-2642.png?v8",
"mending_heart": "https://github.githubassets.com/images/icons/emoji/unicode/2764-1fa79.png?v8",
@@ -1041,6 +1079,7 @@ window.githubEmojis = {
"minibus": "https://github.githubassets.com/images/icons/emoji/unicode/1f690.png?v8",
"minidisc": "https://github.githubassets.com/images/icons/emoji/unicode/1f4bd.png?v8",
"mirror": "https://github.githubassets.com/images/icons/emoji/unicode/1fa9e.png?v8",
"mirror_ball": "https://github.githubassets.com/images/icons/emoji/unicode/1faa9.png?v8",
"mobile_phone_off": "https://github.githubassets.com/images/icons/emoji/unicode/1f4f4.png?v8",
"moldova": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1e9.png?v8",
"monaco": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1e8.png?v8",
@@ -1056,6 +1095,7 @@ window.githubEmojis = {
"montserrat": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f8.png?v8",
"moon": "https://github.githubassets.com/images/icons/emoji/unicode/1f314.png?v8",
"moon_cake": "https://github.githubassets.com/images/icons/emoji/unicode/1f96e.png?v8",
"moose": "https://github.githubassets.com/images/icons/emoji/unicode/1face.png?v8",
"morocco": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1e6.png?v8",
"mortar_board": "https://github.githubassets.com/images/icons/emoji/unicode/1f393.png?v8",
"mosque": "https://github.githubassets.com/images/icons/emoji/unicode/1f54c.png?v8",
@@ -1100,6 +1140,7 @@ window.githubEmojis = {
"negative_squared_cross_mark": "https://github.githubassets.com/images/icons/emoji/unicode/274e.png?v8",
"nepal": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1f5.png?v8",
"nerd_face": "https://github.githubassets.com/images/icons/emoji/unicode/1f913.png?v8",
"nest_with_eggs": "https://github.githubassets.com/images/icons/emoji/unicode/1faba.png?v8",
"nesting_dolls": "https://github.githubassets.com/images/icons/emoji/unicode/1fa86.png?v8",
"netherlands": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1f1.png?v8",
"neutral_face": "https://github.githubassets.com/images/icons/emoji/unicode/1f610.png?v8",
@@ -1197,7 +1238,9 @@ window.githubEmojis = {
"pakistan": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f0.png?v8",
"palau": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1fc.png?v8",
"palestinian_territories": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f8.png?v8",
"palm_down_hand": "https://github.githubassets.com/images/icons/emoji/unicode/1faf3.png?v8",
"palm_tree": "https://github.githubassets.com/images/icons/emoji/unicode/1f334.png?v8",
"palm_up_hand": "https://github.githubassets.com/images/icons/emoji/unicode/1faf4.png?v8",
"palms_up_together": "https://github.githubassets.com/images/icons/emoji/unicode/1f932.png?v8",
"panama": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1e6.png?v8",
"pancakes": "https://github.githubassets.com/images/icons/emoji/unicode/1f95e.png?v8",
@@ -1217,6 +1260,7 @@ window.githubEmojis = {
"passport_control": "https://github.githubassets.com/images/icons/emoji/unicode/1f6c2.png?v8",
"pause_button": "https://github.githubassets.com/images/icons/emoji/unicode/23f8.png?v8",
"paw_prints": "https://github.githubassets.com/images/icons/emoji/unicode/1f43e.png?v8",
"pea_pod": "https://github.githubassets.com/images/icons/emoji/unicode/1fadb.png?v8",
"peace_symbol": "https://github.githubassets.com/images/icons/emoji/unicode/262e.png?v8",
"peach": "https://github.githubassets.com/images/icons/emoji/unicode/1f351.png?v8",
"peacock": "https://github.githubassets.com/images/icons/emoji/unicode/1f99a.png?v8",
@@ -1240,6 +1284,7 @@ window.githubEmojis = {
"person_in_tuxedo": "https://github.githubassets.com/images/icons/emoji/unicode/1f935.png?v8",
"person_red_hair": "https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9b0.png?v8",
"person_white_hair": "https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9b3.png?v8",
"person_with_crown": "https://github.githubassets.com/images/icons/emoji/unicode/1fac5.png?v8",
"person_with_probing_cane": "https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9af.png?v8",
"person_with_turban": "https://github.githubassets.com/images/icons/emoji/unicode/1f473.png?v8",
"person_with_veil": "https://github.githubassets.com/images/icons/emoji/unicode/1f470.png?v8",
@@ -1260,6 +1305,7 @@ window.githubEmojis = {
"pinching_hand": "https://github.githubassets.com/images/icons/emoji/unicode/1f90f.png?v8",
"pineapple": "https://github.githubassets.com/images/icons/emoji/unicode/1f34d.png?v8",
"ping_pong": "https://github.githubassets.com/images/icons/emoji/unicode/1f3d3.png?v8",
"pink_heart": "https://github.githubassets.com/images/icons/emoji/unicode/1fa77.png?v8",
"pirate_flag": "https://github.githubassets.com/images/icons/emoji/unicode/1f3f4-2620.png?v8",
"pisces": "https://github.githubassets.com/images/icons/emoji/unicode/2653.png?v8",
"pitcairn_islands": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f3.png?v8",
@@ -1268,6 +1314,7 @@ window.githubEmojis = {
"place_of_worship": "https://github.githubassets.com/images/icons/emoji/unicode/1f6d0.png?v8",
"plate_with_cutlery": "https://github.githubassets.com/images/icons/emoji/unicode/1f37d.png?v8",
"play_or_pause_button": "https://github.githubassets.com/images/icons/emoji/unicode/23ef.png?v8",
"playground_slide": "https://github.githubassets.com/images/icons/emoji/unicode/1f6dd.png?v8",
"pleading_face": "https://github.githubassets.com/images/icons/emoji/unicode/1f97a.png?v8",
"plunger": "https://github.githubassets.com/images/icons/emoji/unicode/1faa0.png?v8",
"point_down": "https://github.githubassets.com/images/icons/emoji/unicode/1f447.png?v8",
@@ -1294,6 +1341,7 @@ window.githubEmojis = {
"pouch": "https://github.githubassets.com/images/icons/emoji/unicode/1f45d.png?v8",
"poultry_leg": "https://github.githubassets.com/images/icons/emoji/unicode/1f357.png?v8",
"pound": "https://github.githubassets.com/images/icons/emoji/unicode/1f4b7.png?v8",
"pouring_liquid": "https://github.githubassets.com/images/icons/emoji/unicode/1fad7.png?v8",
"pout": "https://github.githubassets.com/images/icons/emoji/unicode/1f621.png?v8",
"pouting_cat": "https://github.githubassets.com/images/icons/emoji/unicode/1f63e.png?v8",
"pouting_face": "https://github.githubassets.com/images/icons/emoji/unicode/1f64e.png?v8",
@@ -1301,6 +1349,8 @@ window.githubEmojis = {
"pouting_woman": "https://github.githubassets.com/images/icons/emoji/unicode/1f64e-2640.png?v8",
"pray": "https://github.githubassets.com/images/icons/emoji/unicode/1f64f.png?v8",
"prayer_beads": "https://github.githubassets.com/images/icons/emoji/unicode/1f4ff.png?v8",
"pregnant_man": "https://github.githubassets.com/images/icons/emoji/unicode/1fac3.png?v8",
"pregnant_person": "https://github.githubassets.com/images/icons/emoji/unicode/1fac4.png?v8",
"pregnant_woman": "https://github.githubassets.com/images/icons/emoji/unicode/1f930.png?v8",
"pretzel": "https://github.githubassets.com/images/icons/emoji/unicode/1f968.png?v8",
"previous_track_button": "https://github.githubassets.com/images/icons/emoji/unicode/23ee.png?v8",
@@ -1374,7 +1424,10 @@ window.githubEmojis = {
"rice_cracker": "https://github.githubassets.com/images/icons/emoji/unicode/1f358.png?v8",
"rice_scene": "https://github.githubassets.com/images/icons/emoji/unicode/1f391.png?v8",
"right_anger_bubble": "https://github.githubassets.com/images/icons/emoji/unicode/1f5ef.png?v8",
"rightwards_hand": "https://github.githubassets.com/images/icons/emoji/unicode/1faf1.png?v8",
"rightwards_pushing_hand": "https://github.githubassets.com/images/icons/emoji/unicode/1faf8.png?v8",
"ring": "https://github.githubassets.com/images/icons/emoji/unicode/1f48d.png?v8",
"ring_buoy": "https://github.githubassets.com/images/icons/emoji/unicode/1f6df.png?v8",
"ringed_planet": "https://github.githubassets.com/images/icons/emoji/unicode/1fa90.png?v8",
"robot": "https://github.githubassets.com/images/icons/emoji/unicode/1f916.png?v8",
"rock": "https://github.githubassets.com/images/icons/emoji/unicode/1faa8.png?v8",
@@ -1408,6 +1461,7 @@ window.githubEmojis = {
"sailboat": "https://github.githubassets.com/images/icons/emoji/unicode/26f5.png?v8",
"sake": "https://github.githubassets.com/images/icons/emoji/unicode/1f376.png?v8",
"salt": "https://github.githubassets.com/images/icons/emoji/unicode/1f9c2.png?v8",
"saluting_face": "https://github.githubassets.com/images/icons/emoji/unicode/1fae1.png?v8",
"samoa": "https://github.githubassets.com/images/icons/emoji/unicode/1f1fc-1f1f8.png?v8",
"san_marino": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1f2.png?v8",
"sandal": "https://github.githubassets.com/images/icons/emoji/unicode/1f461.png?v8",
@@ -1449,6 +1503,7 @@ window.githubEmojis = {
"seven": "https://github.githubassets.com/images/icons/emoji/unicode/0037-20e3.png?v8",
"sewing_needle": "https://github.githubassets.com/images/icons/emoji/unicode/1faa1.png?v8",
"seychelles": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1e8.png?v8",
"shaking_face": "https://github.githubassets.com/images/icons/emoji/unicode/1fae8.png?v8",
"shallow_pan_of_food": "https://github.githubassets.com/images/icons/emoji/unicode/1f958.png?v8",
"shamrock": "https://github.githubassets.com/images/icons/emoji/unicode/2618.png?v8",
"shark": "https://github.githubassets.com/images/icons/emoji/unicode/1f988.png?v8",
@@ -1691,6 +1746,7 @@ window.githubEmojis = {
"trinidad_tobago": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1f9.png?v8",
"tristan_da_cunha": "https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1e6.png?v8",
"triumph": "https://github.githubassets.com/images/icons/emoji/unicode/1f624.png?v8",
"troll": "https://github.githubassets.com/images/icons/emoji/unicode/1f9cc.png?v8",
"trolleybus": "https://github.githubassets.com/images/icons/emoji/unicode/1f68e.png?v8",
"trollface": "https://github.githubassets.com/images/icons/emoji/trollface.png?v8",
"trophy": "https://github.githubassets.com/images/icons/emoji/unicode/1f3c6.png?v8",
@@ -1788,6 +1844,7 @@ window.githubEmojis = {
"western_sahara": "https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1ed.png?v8",
"whale": "https://github.githubassets.com/images/icons/emoji/unicode/1f433.png?v8",
"whale2": "https://github.githubassets.com/images/icons/emoji/unicode/1f40b.png?v8",
"wheel": "https://github.githubassets.com/images/icons/emoji/unicode/1f6de.png?v8",
"wheel_of_dharma": "https://github.githubassets.com/images/icons/emoji/unicode/2638.png?v8",
"wheelchair": "https://github.githubassets.com/images/icons/emoji/unicode/267f.png?v8",
"white_check_mark": "https://github.githubassets.com/images/icons/emoji/unicode/2705.png?v8",
@@ -1807,7 +1864,9 @@ window.githubEmojis = {
"wind_face": "https://github.githubassets.com/images/icons/emoji/unicode/1f32c.png?v8",
"window": "https://github.githubassets.com/images/icons/emoji/unicode/1fa9f.png?v8",
"wine_glass": "https://github.githubassets.com/images/icons/emoji/unicode/1f377.png?v8",
"wing": "https://github.githubassets.com/images/icons/emoji/unicode/1fabd.png?v8",
"wink": "https://github.githubassets.com/images/icons/emoji/unicode/1f609.png?v8",
"wireless": "https://github.githubassets.com/images/icons/emoji/unicode/1f6dc.png?v8",
"wolf": "https://github.githubassets.com/images/icons/emoji/unicode/1f43a.png?v8",
"woman": "https://github.githubassets.com/images/icons/emoji/unicode/1f469.png?v8",
"woman_artist": "https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f3a8.png?v8",
@@ -1855,6 +1914,7 @@ window.githubEmojis = {
"wrestling": "https://github.githubassets.com/images/icons/emoji/unicode/1f93c.png?v8",
"writing_hand": "https://github.githubassets.com/images/icons/emoji/unicode/270d.png?v8",
"x": "https://github.githubassets.com/images/icons/emoji/unicode/274c.png?v8",
"x_ray": "https://github.githubassets.com/images/icons/emoji/unicode/1fa7b.png?v8",
"yarn": "https://github.githubassets.com/images/icons/emoji/unicode/1f9f6.png?v8",
"yawning_face": "https://github.githubassets.com/images/icons/emoji/unicode/1f971.png?v8",
"yellow_circle": "https://github.githubassets.com/images/icons/emoji/unicode/1f7e1.png?v8",
@@ -1876,4 +1936,6 @@ window.githubEmojis = {
"zombie_man": "https://github.githubassets.com/images/icons/emoji/unicode/1f9df-2642.png?v8",
"zombie_woman": "https://github.githubassets.com/images/icons/emoji/unicode/1f9df-2640.png?v8",
"zzz": "https://github.githubassets.com/images/icons/emoji/unicode/1f4a4.png?v8"
}
};
if (typeof window !== "undefined") window.githubEmojis = githubEmojiData;
if (typeof module !== "undefined") module.exports = githubEmojiData;
+1 -1
View File
@@ -1 +1 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Yn}});class r{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let n,o,s="KaTeX parse error: "+e;const i=t&&t.loc;if(i&&i.start<=i.end){const e=i.lexer.input;n=i.start,o=i.end,n===e.length?s+=" at end of input: ":s+=" at position "+(n+1)+": ";const t=e.slice(n,o).replace(/[^]/g,"$&\u0332");let r,a;r=n>15?"\u2026"+e.slice(n-15,n):e.slice(0,n),a=o+15<e.length?e.slice(o,o+15)+"\u2026":e.slice(o),s+=r+t+a}const a=new Error(s);return a.name="ParseError",a.__proto__=r.prototype,a.position=n,null!=n&&null!=o&&(a.length=o-n),a.rawMessage=e,a}}r.prototype.__proto__=Error.prototype;var n=r;const o=/([A-Z])/g,s={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i=/[&><"']/g;const a=function(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?a(e.body[0]):e:"font"===e.type?a(e.body):e};var l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(i,(e=>s[e]))},hyphenate:function(e){return e.replace(o,"-$1").toLowerCase()},getBaseElem:a,isCharacterBox:function(e){const t=a(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){const t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}};const h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function c(e){if(e.default)return e.default;const t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class m{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0Line truncated
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return po}});class r extends Error{constructor(e,t){let n,o,s="KaTeX parse error: "+e;const i=t&&t.loc;if(i&&i.start<=i.end){const e=i.lexer.input;n=i.start,o=i.end,n===e.length?s+=" at end of input: ":s+=" at position "+(n+1)+": ";const t=e.slice(n,o).replace(/[^]/g,"$&\u0332");let r,a;r=n>15?"\u2026"+e.slice(n-15,n):e.slice(0,n),a=o+15<e.length?e.slice(o,o+15)+"\u2026":e.slice(o),s+=r+t+a}super(s),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,r.prototype),this.position=n,null!=n&&null!=o&&(this.length=o-n),this.rawMessage=e}}var n=r;const o=/([A-Z])/g,s=e=>e.replace(o,"-$1").toLowerCase(),i={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},a=/[&><"']/g,l=e=>String(e).replace(a,e=>i[e]),c=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?c(e.body[0]):e:"font"===e.type?c(e.body):e,h=new Set(["mathord","textord","atom"]),m=e=>h.has(c(e).type),u={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function p(e){if(Object.prototype.hasOwnProperty.call(e,"default")&&void 0!==e.default)return e.default;return function(e){if("string"!=typeof e)return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}(Array.isArray(e.type)?e.type[0]:e.type)}function d(e,t,r,n){const o=Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0,s=Object.prototype.hasOwnProperty.call(n,"processor")?n.processor:void 0;e[t]=void 0!==o?s?s(o):o:p(n)}class g{constructor(e){void 0===e&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextCLine truncated
+2535 -864
View File
File diff suppressed because it is too large. Load diff
+7 -3
View File
@@ -1,3 +1,7 @@
/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).DOMPurify=t()}(this,(function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,i=Object.freeze,a=Object.seal,l=Object.create,c="undefined"!=typeof Reflect&&Reflect,s=c.apply,u=c.construct;s||(s=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var f,m=x(Array.prototype.forEach),d=x(Array.prototype.pop),p=x(Array.prototype.push),g=x(String.prototype.toLowerCase),h=x(String.prototype.match),y=x(String.prototype.replace),v=x(String.prototype.indexOf),b=x(String.prototype.trim),T=x(RegExp.prototype.test),A=(f=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(f,t)});function x(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return s(e,t,r)}}function w(e,r){t&&t(e,null);for(var o=r.length;o--;){var i=r[o];if("string"==typeof i){var a=g(i);a!==i&&(n(r)||(r[o]=a),i=a)}e[i]=!0}return e}function S(t){var n=l(null),r=void 0;for(r in t)s(e,t,[r])&&(n[r]=t[r]);return n}function k(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return x(n.get);if("function"==typeof n.value)return x(n.value)}e=r(e)}return null}var R=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),_=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),E=i(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),O=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),L=i(["#text"]),M=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemLine truncated
//# sourceMappingURL=purify.min.js.map
/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.DOMPurify=t())})(this,function(){"use strict";function e(e,t){this.v=e,this.k=t}function t(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(e){if(Array.isArray(e))return e}function r(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function i(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
function a(e,t){return n(e)||r(e,t)||o(e,t)||i()}function o(e,n){if(e){if(typeof e==`string`)return t(e,n);var r={}.toString.call(e).slice(8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Array.from(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function s(t){var n,r;function i(n,r){try{var o=t[n](r),s=o.value,c=s instanceof e;Promise.resolve(c?s.v:s).then(function(e){if(c){var r=n===`return`&&s.k?n:`next`;if(!s.k||e.done)return i(r,e);e=t[r](e).value}a(!!o.done,e)},function(e){i(`throw`,e)})}catch(e){a(2,e)}}function a(e,t){e===2?n.reject(t):n.resolve({value:t,done:e}),(n=n.next)?i(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(a,o){var s={key:e,arg:t,resolve:a,reject:o,next:null};r?r=r.next=s:(n=r=s,i(e,t))})},typeof t.return!=`function`&&(this.return=void 0)}s.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},s.prototype.next=function(e){return this._invoke(`next`,e)},s.prototype.throw=function(e){return this._invoke(`throw`,e)},s.prototype.return=function(e){return this._invoke(`return`,e)};let c=Object.entries,l=Object.setPrototypeOf,u=Object.isFrozen,d=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,p=Object.freeze,m=Object.seal,h=Object.create,ee=typeof Reflect<`u`&&Reflect,g=ee.apply,te=ee.construct;p||(p=function(e){return e}),m||(m=function(e){return e}),g||(g=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)}),te||(te=function(e){return new e(...[...arguments].slice(1))});let _=E(Array.prototype.forEach);Array.prototype.indexOf;let ne=E(Array.prototype.lastIndexOf),re=E(Array.prototype.pop),ie=E(Array.prototype.push),ae=E(Array.prototype.slice),oe=E(Array.prototype.splice),v=Array.isArray,se=D(Set),ce=E(Set.prototype.add),le=E(Set.prototype.has),y=E(String.prototype.toLowerCase),ue=E(String.prototype.toString),de=E(String.prototype.match),fe=E(String.prototype.replace),pe=E(String.prototype.indexOf),me=E(String.prototype.trim),he=E(Number.prototype.toString),b=E(Boolean.prototype.toString),x=typeof BigInt>`u`?null:E(BigInt.prototype.toString),ge=typeof Symbol>`u`?null:E(Symbol.prototype.toString),S=E(Object.prototype.hasOwnProperty),C=E(Object.prototype.toString),w=E(RegExp.prototype.test),T=D(TypeError);function E(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return g(e,t,n)}}function D(e){return function(){return te(e,[...arguments])}}function O(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y;if(l&&l(e,null),!v(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(u(t)||(t[r]=e),i=e)}e[i]=!0}return e}function _e(e){for(let t=0;t<e.length;t++)S(e,t)||(e[t]=null);return e}function k(e){let t=h(null);for(let r of c(e)){var n=a(r,2);let i=n[0],o=n[1];S(e,i)&&(t[i]=v(o)?_e(o):o&&typeof o==`object`&&o.constructor===Object?k(o):o)}return t}function ve(e){switch(typeof e){case`string`:return e;case`number`:return he(e);case`boolean`:return b(e);case`bigint`:return x?x(e):`0`;case`symbol`:return ge?ge(e):`Symbol()`;case`undefined`:return C(e);case`function`:case`object`:{if(e===null)return C(e);let t=e,n=A(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:C(e)}return C(e)}default:return C(e)}}function A(e,t){for(;e!==null;){let n=f(e,t);if(n){if(n.get)return E(n.get);if(typeof n.value==`function`)return E(n.value)}e=d(e)}function n(){return null}return n}function ye(e,t){for(;e!==null;){let n=f(e,t);if(n)return n.get?E(n.get):null;e=d(e)}return null}function be(e){try{return w(e,``),!0}catch(e){return!1}}let xe=p(/* @__PURE__ */ `a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Se=p(/* @__PURE__ */ `svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Ce=p([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feM Line truncated
`+f),V&&(f=Nn(f)),P&&It?at(f):f},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};un(e),jt=!0,Mt=L,Nt=R},t.clearConfig=function(){sn=null,jt=!1,Mt=null,Nt=null,P=tt,F=``},t.isValidAttribute=function(e,t,n){sn||un({});let r=Y(e),i=Y(t);return typeof n==`string`&&(Jn(t,n)||!At&&w(Ge,n))?!1:Un(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&S(I,e)&&ie(I[e],t)},t.removeHook=function(e,t){if(S(I,e)){if(t!==void 0){let n=ne(I[e],t);return n===-1?void 0:oe(I[e],n,1)[0]}return re(I[e])}},t.removeHooks=function(e){S(I,e)&&(I[e]=[])},t.removeAllHooks=function(){I=Ye()},t}return Ze()});
//# sourceMappingURL=purify.min.js.map
+17 -5
View File
@@ -1,3 +1,4 @@
import { takeReviewFragment } from "./review-consent.js";
import { loadLibrary } from "./lazy-assets.js";
import { createApp, h, watch, provide, inject, onBeforeUnmount } from "vue";
import { createRouter, createWebHistory, RouterView } from "vue-router";
@@ -7,7 +8,7 @@ import { render as iconsTemplate } from "../partials/icons.htm";
import { initializeTemplate } from "./template-state.js";
import { createPageState, createTimers } from "./state.js";
import { createHttp, promises } from "./http.js";
import { mainController } from "./app.js";
import { mainController, highlightRedactions } from "./app.js";
import { createQuotaService } from "./quota.js";
import * as formatters from "./formatters.js";
import translations from "../i18n/locale-en.json";
@@ -18,7 +19,9 @@ import { fieldDirective, formDirective, submitForm } from "./forms.js";
const sessionKey = Symbol("session");
export const serverPaths = /^\/(w|api|github)(\/|$)/;
function translate(key, params = {}) {
const message = key?.split(".").reduce((value, part) => value?.[part], translations);
let message = key?.split(".").reduce((value, part) => value?.[part], translations);
// Unknown error codes would otherwise surface as the raw "ERRORS.code" key.
if (message == null && key?.startsWith("ERRORS.")) message = translations.ERRORS.unknown_error;
return String(message ?? key ?? "").replace(/{{\s*([^}]+?)\s*}}/g, (_, name) => params[name] ?? "");
}
const fmt = { ...formatters, translate };
@@ -31,6 +34,9 @@ export function safeUrl(value) {
}
export function mountApplication(target = "#app", options = {}) {
const isolatedConsent = !!document.querySelector('meta[name="review-consent-page"][content="1"]');
let reviewHandoff = isolatedConsent && window.location.pathname === "/review-link" ? takeReviewFragment(window) : null;
const takeReviewHandoff = () => { const value = reviewHandoff; reviewHandoff = null; return value; };
// AngularJS links stored the repository route in the fragment. Normalize it
// before web history reads the URL, replacing the entry so Back still works.
if (!options.history && window.location.pathname === "/" && /^#!\/r\/[^/?#]+/.test(window.location.hash)) {
@@ -52,7 +58,7 @@ export function mountApplication(target = "#app", options = {}) {
const value = router.currentRoute.value.params[key];
return Array.isArray(value) ? value.join("/") : value;
} });
return { http, ...timers, location, params, window, promises, html: { trustAsHtml: value => value }, translate: (key, params) => Promise.resolve(translate(key, params)), quotaService: createQuotaService(http) };
return { takeReviewHandoff, http, ...timers, location, params, window, promises, html: { trustAsHtml: value => value }, translate: (key, params) => Promise.resolve(translate(key, params)), quotaService: createQuotaService(http) };
}
function pageComponent(definition) {
return {
@@ -81,6 +87,8 @@ export function mountApplication(target = "#app", options = {}) {
root.window = window;
root.Math = Math;
root.sanitize = value => DOMPurify.sanitize(value ?? "");
// Reading site_options re-renders Markdown once the configured mask loads.
root.highlightRedactions = html => (root.site_options, highlightRedactions(html));
root.submitForm = submitForm;
root.safeUrl = safeUrl;
const context = services();
@@ -94,7 +102,7 @@ export function mountApplication(target = "#app", options = {}) {
const href = anchor.getAttribute("href");
if (href.startsWith("#")) return;
const url = new URL(anchor.href, window.location.href);
if (url.origin !== window.location.origin || serverPaths.test(url.pathname)) return;
if (isolatedConsent || /^\/review-link\/?$/i.test(url.pathname) || url.origin !== window.location.origin || serverPaths.test(url.pathname)) return;
event.preventDefault();
router.push(url.pathname + url.search + url.hash);
$("#navbarSupportedContent.show").collapse("hide");
@@ -103,7 +111,7 @@ export function mountApplication(target = "#app", options = {}) {
onBeforeUnmount(() => document.removeEventListener("click", navigate));
return () => [
iconsTemplate(root, []),
h("header", { class: "app-header" }, templates["partials/header.htm"](root, headerCache)),
isolatedConsent ? null : h("header", { class: "app-header" }, templates["partials/header.htm"](root, headerCache)),
h("main", { class: "app-view align-items-stretch w-100" }, h(RouterView, null, {
default: ({ Component, route }) => Component ? h(Component, { key: route.meta.preserveExplorer ? route.matched[0]?.path : route.path }) : null,
})),
@@ -126,6 +134,10 @@ export function mountApplication(target = "#app", options = {}) {
app.directive("paper-scrollspy", paperScrollspy);
app.use(router);
router.beforeEach(async to => {
if ((to.path === "/review-link" && !isolatedConsent) || (isolatedConsent && to.path !== "/review-link")) {
window.location.assign(to.fullPath);
return false;
}
root?.emit("routeLeave");
if (/^\/(r|repository|anonymize|pull-request-anonymize|gist-anonymize|pr|gist)(\/|$)/.test(to.path)) {
await loadLibrary("markdown");
+70
View File
@@ -0,0 +1,70 @@
import { renderMarkdown } from "../../src/markdown";
import { stlPaths } from "../../src/markdown-diagrams";
// htmlparser2 uses this ES2022 builtin; retain the viewer's older-browser support.
if (!Object.hasOwn) Object.defineProperty(Object, "hasOwn", {
value: (object, key) => Object.prototype.hasOwnProperty.call(object, key),
configurable: true, writable: true,
});
window.MarkdownRenderer = { render: renderMarkdown };
// Delegation also covers documents inserted by Vue after this lazy bundle loads.
document.addEventListener("click", event => {
const button = event.target.closest?.("button[data-diagram-action]");
const figure = button?.closest("figure.markdown-diagram");
if (!figure) return;
const group = figure.querySelector("svg g");
const action = button.dataset.diagramAction;
let zoom = Number(figure.dataset.zoom || 1);
if (action === "rotate") {
try {
const vertices = JSON.parse(figure.dataset.vertices);
if (!Array.isArray(vertices) || vertices.length > 60000 || vertices.length % 3 || vertices.some(v => !Array.isArray(v) || v.length !== 3 || v.some(n => typeof n !== "number" || !Number.isFinite(n)))) return;
const angle = Number(figure.dataset.angle || 0.6) + 0.3;
figure.dataset.angle = angle;
group.innerHTML = stlPaths(vertices, angle);
} catch { return; }
} else {
if (action === "reset" && figure.dataset.vertices) {
// Reuse the validated rotation path, then restore the initial view angle.
figure.dataset.angle = 0.3;
figure.querySelector('[data-diagram-action="rotate"]')?.click();
}
zoom = action === "reset" ? 1 : Math.max(0.25, Math.min(8, zoom * (action === "in" ? 1.25 : 0.8)));
figure.dataset.zoom = zoom;
group.setAttribute("transform", `translate(320 160) scale(${zoom}) translate(-320 -160)`);
}
});
let pending = false;
async function enhance() {
if (pending) return;
const diagrams = [...document.querySelectorAll("pre.mermaid:not([data-processed])")];
if (!diagrams.length) return;
pending = true;
try {
if (typeof window.mermaid?.initialize !== "function" || typeof window.mermaid?.run !== "function") {
await new Promise((resolve, reject) => {
const script = document.createElement("script");
script.src = "/script/mermaid.min.js";
script.onload = resolve;
script.onerror = reject;
document.head.appendChild(script);
});
}
// A raw HTML id can create a named window property. Do not trust a global
// initialization flag supplied by document content.
window.mermaid.initialize({ startOnLoad: false, securityLevel: "strict", theme: "default" });
window.mermaidInitialized = true;
for (const element of diagrams) {
const source = element.textContent;
try { await window.mermaid.run({ nodes: [element] }); }
catch { element.textContent = source; element.dataset.processed = "true"; }
}
} finally {
pending = false;
if ([...document.querySelectorAll("pre.mermaid:not([data-processed])")].some(node => !diagrams.includes(node))) enhance().catch(() => {});
}
}
const observer = new MutationObserver(() => { enhance().catch(() => {}); });
observer.observe(document.documentElement, { childList: true, subtree: true });
enhance().catch(() => {});
+11 -1
View File
@@ -1 +1,11 @@
function markedMermaid(e){return{extensions:[{name:"mermaid",level:"block",start(e){return e.match(/^```mermaid/m)?.index},tokenizer(e,t){e=/^```mermaid\n([\s\S]*?)\n```/.exec(e);if(e)return{type:"mermaid",raw:e[0],text:e[1].trim()}},renderer(e){let t="mermaid-"+Math.random().toString(36).substr(2,9);e=`<div class="mermaid" id="${t}">${e.text}</div>`;return"undefined"==typeof mermaid&&"function"==typeof window.loadMermaid&&window.loadMermaid(),setTimeout(()=>{if("undefined"!=typeof mermaid){window.mermaidInitialized||(mermaid.initialize({startOnLoad:!1,theme:"default",securityLevel:"strict"}),window.mermaidInitialized=!0);try{var e=document.getElementById(t);e&&!e.getAttribute("data-processed")&&(mermaid.init(void 0,e),e.setAttribute("data-processed","true"))}catch(e){console.error("Mermaid rendering error:",e)}}},100),e}}]}}((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()})("undefined"!=typeof self?self:this,function(){{var Qt={d:function(e,t){for(var r in t)Qt.o(t,r)&&!Qt.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},e0={};Qt.d(e0,{default:function(){return cr}});class pr{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let r,n,a="KaTeX parse error: "+e;var i=t&&t.loc;if(i&&i.start<=i.end){let e=i.lexer.input,t=(r=i.start,n=i.end,r===e.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ",e.slice(r,n).replace(/[^]/g,"$&̲"));var i=15<r?"…"+e.slice(r-15,r):e.slice(0,r),o=n+15<e.length?e.slice(n,n+15)+"…":e.slice(n);a+=i+t+o}t=new Error(a);return t.name="ParseError",t.__proto__=pr.prototype,null!=(t.position=r)&&null!=n&&(t.length=n-r),t.rawMessage=e,t}}pr.prototype.__proto__=Error.prototype;var bt=pr;function t0(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t0(e.body[0]):e:"font"===e.type?t0(e.body):e}let E=/([A-Z])/g,L={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},D=/[&><"']/g;var yt={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(D,e=>L[e])},hyphenate:function(e){return e.replace(E,"-$1").toLowerCase()},getBaseElem:t0,isCharacterBox:function(e){e=t0(e);return"mathord"===e.type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(e){e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return e?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}};let n={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:Line truncated
"use strict";(()=>{var dm=Object.freeze,kr=Object.defineProperty;var $3=Object.getOwnPropertyDescriptor;var G3=Object.getOwnPropertyNames;var W3=Object.prototype.hasOwnProperty;var Y3=(t,e,i)=>e in t?kr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var It=(t,e,i)=>()=>{if(i)throw i[0];try{return t&&(e=t(t=0)),e}catch(s){throw i=[s],s}};var De=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(i){throw e=0,i}},Fc=(t,e)=>{for(var i in e)kr(t,i,{get:e[i],enumerable:!0})},K3=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of G3(e))!W3.call(t,n)&&n!==i&&kr(t,n,{get:()=>e[n],enumerable:!(s=$3(e,n))||s.enumerable});return t};var V3=t=>K3(kr({},"__esModule",{value:!0}),t);var me=(t,e,i)=>Y3(t,typeof e!="symbol"?e+"":e,i);var Er=(t,e)=>dm(kr(t,"raw",{value:dm(e||t.slice())}));var hp=De((NA,lp)=>{"use strict";function S9(t,e){let i={type:"footnotes",raw:e,rawItems:[],items:[]};return{name:"footnote",level:"block",childTokens:["content"],tokenizer(s){t.hasFootnotes||(this.lexer.tokens.push(i),t.tokens=this.lexer.tokens,t.hasFootnotes=!0,i.rawItems=[],i.items=[]);let n=/^\[\^([^\]\n]+)\]:(?:[ \t]+|[\n]*?|$)([^\n]*?(?:\n|$)(?:\n*?[ ]{4,}[^\n]*)*)/.exec(s);if(n){let[o,c,l=""]=n,m=l.split("\n").reduce((x,_)=>x+"\n"+_.replace(/^(?:[ ]{4}|[\t])/,""),""),g=m.trimEnd().split("\n").pop();m+=g&&/^[ \t]*?[>\-*][ ]|[`]{3,}$|^[ \t]*?[|].+[|]$/.test(g)?"\n\n":"";let b={type:"footnote",raw:o,label:c,refs:[],content:this.lexer.blockTokens(m)};return i.rawItems.push(b),b}},renderer(){return""}}}function A9(t){return t.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")}function T9(t,e=!1,i=!1){let s=0;return{name:"footnoteRef",level:"inline",tokenizer(n){let o=/^\[\^([^\]\n]+)\]/.exec(n);if(o){let[c,l]=o,m=this.lexer.tokens[0],g=m.rawItems.filter(E=>E.label===l);if(!g.length)return;let b=g[0],x=m.items.filter(E=>E.label===l)[0],_={type:"footnoteRef",raw:c,index:b.refs.length,id:"",label:l};return x?(_.id=x.refs[0].id,x.refs.push(_)):(s++,_.id=String(s),b.refs.push(_),m.items.push(b)),_}},renderer({index:n,id:o,label:c}){s=0;let l=encodeURIComponent(c),m=i?A9(c):o,g=n>0?"-".concat(n+1):"";return'<sup><a id="'.concat(t,"ref-").concat(l).concat(g,'" href="#').concat(t+l,'" data-').concat(t,'ref aria-describedby="').concat(t,'label">').concat(e?"[".concat(m,"]"):m,"</a></sup>")}}}function D9(t,e,i,s,n,o){return{name:"footnotes",renderer({raw:c,items:l=[]}){if(l.length===0)return"";let m=l.reduce((_,{label:E,content:T,refs:M})=>{let j=encodeURIComponent(E),U=this.parser.parse(T).trimEnd(),q=U.endsWith("</p>"),G='<li id="'.concat(t+j,'">\n');return G+=q?U.replace(/<\/p>$/,""):U,M.forEach((K,X)=>{let Z=o.replace("{0}",E),ne,J;if(X>0){let V=X+1;ne="\u21A9<sup>".concat(V,"</sup>"),J="-".concat(V)}else ne="\u21A9",J="";G+=' <a href="#'.concat(t,"ref-").concat(j).concat(J,'" data-').concat(t,'backref aria-label="').concat(Z,'">').concat(ne,"</a>")}),G+=q?"</p>\n":"\n",G+="</li>\n",_+G},""),g="";i&&(g+="<hr data-".concat(e,"footnotes>\n"));let b="";s&&(b=' class="'.concat(s,'"'));let x="";return n&&(x=' class="'.concat(n,'"')),g+="<section".concat(b," data-").concat(e,"footnotes>\n"),g+='<h2 id="'.concat(t,'label"').concat(x,">").concat(c.trimEnd(),"</h2>\n"),g+="<ol>\n".concat(m,"</ol>\n"),g+="</section>\n",g}}}function C9(t={}){let{prefixId:e="footnote-",prefixData:i="",description:s="Footnotes",refMarkers:n=!1,footnoteDivider:o=!1,keepLabels:c=!1,sectionClass:l="footnotes",headingClass:m="sr-only",backRefLabel:g="Back to reference {0}"}=t,b={hasFootnotes:!1,tokens:[]};return{extensions:[S9(b,s),T9(e,n,c),D9(e,i,o,l,m,g)],walkTokens(x){x.type==="footnotes"&&b.tokens.indexOf(x)===0&&x.items.length&&(b.tokens[0]={type:"space",raw:""},b.tokens.push(x)),b.hasFootnotes&&(b.hasFootnotes=!1)}}}lp.exports=C9});var pp=De((jA,dp)=>{"use strict";var mp=[{type:"note",icon:'<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},{type:"tip",icon:'<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 1Line truncated
/*! Bundled license information:
is-plain-object/dist/is-plain-object.js:
(*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*)
*/
+2535 -864
View File
File diff suppressed because it is too large. Load diff
+102
View File
@@ -0,0 +1,102 @@
// Read once, before the router or application requests can observe the fragment.
export function takeReviewFragment(browser) {
const fragment = browser.location.hash.slice(1);
browser.history.replaceState(null, "", "/review-link");
if (fragment.length > 2048) return null;
const values = new URLSearchParams(fragment);
if ([...values.keys()].length !== 3 || [...values.keys()].some(key => !["clientId", "intentId", "token"].includes(key))) return null;
const clientId = values.get("clientId"), intentId = values.get("intentId"), token = values.get("token");
if (!/^[a-f0-9]{32}$/.test(clientId || "") || !/^[a-f0-9]{32}$/.test(intentId || "") || !/^[a-f0-9]{64}$/.test(token || "")) return null;
return { contract: "4open.artifacts/1", clientId, intentId, token };
}
export function reviewConsentController(state, services) {
const { http, promises, window: browser } = services;
let handoff = services.takeReviewHandoff();
const scope = handoff ? { clientId: handoff.clientId, intentId: handoff.intentId } : null;
let ticket, csrf, confirmId, consumeId, identity;
let active = true, expiryTimer;
const stop = promises.defer();
const requestId = () => [...browser.crypto.getRandomValues(new Uint8Array(16))].map(byte => byte.toString(16).padStart(2, "0")).join("");
Object.assign(state, { repositoryId: "", handoffEnabled: false, busy: false, preview: null, acceptAccess: false, acceptRetention: false, uncertain: false, saved: false, expired: false, error: handoff ? "" : "Open a new artifact link from your submission. This link is missing or invalid." });
const current = () => active && state.user?.username === identity;
function dispose() {
active = false; handoff = ticket = csrf = undefined;
stop.resolve(); browser.clearTimeout(expiryTimer);
}
state.on("dispose", dispose);
state.on("routeLeave", dispose);
state.watch(() => state.user?.username, username => {
if (!identity && username) identity = username;
else if (identity && username !== identity) {
dispose(); state.preview = null; state.repositoryId = ""; state.busy = false; state.saved = false; state.handoffEnabled = false;
state.error = "Your account changed. Open a new artifact link from your submission.";
}
});
const options = () => ({ timeout: stop.promise, headers: { "Content-Type": "application/json", "X-Review-CSRF": csrf } });
const message = error => error?.status === 404 ? "Artifact linking is not available on this server." : error?.status === 401 ? "Sign in, then open a new artifact link from your submission." : error?.status === 403 ? "This account cannot approve this repository or this link." : "The request could not be completed. You can retry from this page.";
state.loadPreview = async () => {
if (!active || !handoff || state.busy || state.uncertain || state.saved || !state.user?.username) return;
identity = state.user.username;
const repositoryId = state.repositoryId.trim();
if (!/^[A-Za-z0-9_-]{3,128}$/.test(repositoryId)) { state.error = "Enter the anonymous repository ID from its URL."; return; }
state.busy = true; state.error = ""; state.preview = null; ticket = undefined;
state.acceptAccess = state.acceptRetention = false; state.expired = false;
browser.clearTimeout(expiryTimer);
consumeId ||= requestId();
try {
const protection = (await http.get("/api/review-consent/csrf", { timeout: stop.promise })).data;
if (!current()) return;
csrf = protection.csrf;
state.handoffEnabled = protection.handoffEnabled === true;
if (!/^[a-f0-9]{64}$/.test(csrf || "")) throw new Error("invalid_csrf");
const result = (await http.post("/api/review-consent/preview", { repositoryId, intent: { ...handoff, requestId: consumeId } }, options())).data;
if (!current()) return;
if (!result || typeof result.ticket !== "string" || !result.ticket || result.ticket.length > 8192 || typeof result.repositoryName !== "string" || !["restricted-review", "anonymous-link"].includes(result.policy?.access) || !Number.isSafeInteger(result.policy.version) || !Number.isFinite(Date.parse(result.policy.retainUntil)) || !Number.isFinite(Date.parse(result.expiresAt)) || Date.parse(result.expiresAt) <= Date.now() || Date.parse(result.expiresAt) > Date.now() + 600000) throw new Error("invalid_preview");
ticket = result.ticket; confirmId = requestId();
state.preview = { repositoryName: result.repositoryName, policy: { ...result.policy }, expiresAt: result.expiresAt };
expiryTimer = browser.setTimeout(() => { if (active) state.expired = true; }, Math.max(0, Date.parse(result.expiresAt) - Date.now()));
} catch (error) { if (current()) state.error = message(error); }
finally { if (current()) state.busy = false; }
};
state.confirmConsent = async () => {
if (!current() || state.busy || state.saved || !ticket || !state.acceptAccess || !state.acceptRetention) return;
if (Date.parse(state.preview.expiresAt) <= Date.now()) { state.expired = true; return; }
state.busy = true; state.error = "";
try {
const result = (await http.post("/api/review-consent/confirm", { ticket, requestId: confirmId, acceptAccess: true, acceptRetention: true }, options())).data;
if (!current()) return;
if (result?.requestId !== confirmId || !Number.isFinite(Date.parse(result.confirmedAt))) throw new Error("invalid_receipt");
state.saved = true; state.uncertain = false; handoff = undefined; if (!state.handoffEnabled) ticket = undefined;
} catch (error) {
if (current()) { state.uncertain = true; state.error = "The confirmation was not verified. Retry with the same approval, or return to your submission to check its status."; }
} finally { if (current()) state.busy = false; }
};
state.continueReview = async () => {
if (!current() || state.busy || !state.saved || !state.handoffEnabled || !ticket || !scope) return;
state.busy = true; state.error = "";
let form;
const cleanup = () => { form?.remove(); browser.removeEventListener("securitypolicyviolation", blocked); };
const blocked = event => {
if (event.violatedDirective?.startsWith("form-action")) {
cleanup(); if (current()) { state.busy = false; state.error = "The return address was blocked. Return to your submission to check the artifact status."; }
}
};
try {
const result = (await http.post("/api/review-consent/handoff", { ticket }, options())).data;
if (!current()) return;
const completion = result?.completion;
const target = new URL(result?.callbackUrl);
if (!completion || Object.keys(completion).sort().join(",") !== "clientId,code,contract,expiresAt,intentId" || completion.contract !== "4open.artifacts/1" || completion.clientId !== scope.clientId || completion.intentId !== scope.intentId || !/^[a-f0-9]{64}$/.test(completion.code || "") || !Number.isFinite(Date.parse(completion.expiresAt)) || Date.parse(completion.expiresAt) <= Date.now() || Date.parse(completion.expiresAt) > Date.now() + 300000 || target.protocol !== "https:" || target.href !== result.callbackUrl || target.username || target.password || result.callbackUrl.includes("?") || result.callbackUrl.includes("#")) throw new Error("invalid_handoff");
form = browser.document.createElement("form"); form.method = "POST"; form.action = target.href;
const input = browser.document.createElement("input"); input.type = "hidden"; input.name = "completion"; input.value = JSON.stringify(completion);
form.appendChild(input); browser.document.body.appendChild(form);
browser.addEventListener("securitypolicyviolation", blocked);
state.on("dispose", cleanup);
form.submit();
} catch {
cleanup(); if (current()) { state.busy = false; state.error = "The return to review could not be prepared. Retry from this page, or return to your submission to check its status."; }
}
};
}
+2
View File
@@ -1,7 +1,9 @@
import { reviewConsentController } from "./review-consent.js";
import * as pages from "./app.js";
import * as admin from "./admin.js";
export const pageRoutes = [
{path: "/review-link", template: "partials/reviewConsent.htm", title: "Artifact consent – Anonymous GitHub", setup: (state, services) => reviewConsentController(state, services)},
{path: "/connections", template: "partials/connections.htm", title: "GitHub connections – Anonymous GitHub", preserveExplorer: false, setup: (state, services) => pages.connectionsController(state, services.http)},
{path: "/signin", template: "partials/signin.htm", title: "Sign in – Anonymous GitHub", preserveExplorer: false, setup: (state, services) => pages.signinController(state, services.http)},
{path: "/", template: "partials/home.htm", title: "Anonymous GitHub – Share the code, not the author", preserveExplorer: false, setup: (state, services) => pages.homeController(state, services.http, services.location, services.window, services.timeout)},
+2
View File
@@ -1,3 +1,4 @@
import { render as reviewConsentTemplate } from "../partials/reviewConsent.htm";
import { render as connectionsTemplate } from "../partials/connections.htm";
import { render as signinTemplate } from "../partials/signin.htm";
import { render as template0 } from "../partials/404.htm";
@@ -27,6 +28,7 @@ import { render as template23 } from "../partials/profile.htm";
import { render as template24 } from "../partials/pullRequest.htm";
import { render as template25 } from "../partials/status.htm";
export const templates = {
"partials/reviewConsent.htm": reviewConsentTemplate,
"partials/connections.htm": connectionsTemplate,
"partials/signin.htm": signinTemplate,
"partials/404.htm": template0,
+1 -62
View File
@@ -190,67 +190,6 @@ function parseGithubUrl(url) {
}
}
// GitHub-style heading slug: lowercase, drop punctuation other than `-_`,
// collapse runs of whitespace into a single dash. Used so anchor links like
// `[Releases](#releases-and-contributing)` actually jump to the heading
// (marked v12 dropped `headerIds`, so headings now have no id by default).
function slugifyHeading(text) {
return String(text)
.toLowerCase()
.replace(/<[^>]+>/g, "")
.replace(/[^\p{L}\p{N}\s_-]/gu, "")
.trim()
.replace(/\s+/g, "-");
}
function renderMD(md, baseUrlValue) {
marked.use(
markedEmoji({
emojis: githubEmojis,
unicode: false,
})
);
md = contentAbs2Relative(md, baseUrlValue);
const renderer = new marked.Renderer();
const rendererLink = renderer.link;
renderer.link = function (href, title, text) {
// wrap videos links (mp4 and mov) with media https://github.blog/2021-05-13-video-uploads-available-github/
if (href.match(/\.mp4$|\.mov$/)) {
return `<div class="media"><video controls title="${title}" src="${href}">${text}</video></div>`;
}
return rendererLink.call(this, href, title, text);
};
const slugCounts = {};
renderer.heading = function (text, level, raw) {
const base = slugifyHeading(raw || text);
const n = slugCounts[base] || 0;
slugCounts[base] = n + 1;
const id = n === 0 ? base : `${base}-${n}`;
return `<h${level} id="${id}">${text}</h${level}>\n`;
};
marked.setOptions({
renderer: renderer,
pedantic: false,
gfm: true,
breaks: false,
sanitize: false,
smartLists: true,
smartypants: false,
xhtml: false,
headerIds: false,
katex: katex,
});
if (baseUrlValue) {
marked.use(baseUrl(baseUrlValue));
}
marked.use(
markedKatex({
throwOnError: false,
})
);
marked.use(markedMermaid());
return DOMPurify.sanitize(marked.parse(md, { renderer }));
return window.MarkdownRenderer.render(md || "", baseUrlValue);
}
+28 -28
View File
@@ -1,63 +1,63 @@
"use strict";(()=>{var ad=Object.defineProperty;var ld=(e,t)=>{for(var s in t)ad(e,s,{get:t[s],enumerable:!0})};var fe=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var he={notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",markdown:"/script/markdown.44f2e93820.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};var fo=new Map,cd=he;function xt(e){if(!fo.has(e)){let t=document.createElement("script");t.src=cd[e];let s=new Promise((i,o)=>{t.onload=i,t.onerror=()=>{fo.delete(e),t.remove(),o(new Error(`Unable to load ${e}. Please retry.`))}});fo.set(e,s),document.head.appendChild(t)}return fo.get(e)}async function mi(){await xt("editor"),ace.config.set("basePath","/script/external/ace/")}function mn(e){let t=Object.create(null);for(let s of e.split(","))t[s]=1;return s=>s in t}var qe={},Xt=[],at=()=>{},us=()=>!1,vn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gn=e=>e.startsWith("onUpdate:"),Ge=Object.assign,In=(e,t)=>{let s=e.indexOf(t);s>-1&&e.splice(s,1)},pd=Object.prototype.hasOwnProperty,De=(e,t)=>pd.call(e,t),ge=Array.isArray,Ut=e=>Vn(e)==="[object Map]",Ft=e=>Vn(e)==="[object Set]",vi=e=>Vn(e)==="[object Date]";var be=e=>typeof e=="function",Be=e=>typeof e=="string",ht=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",cs=e=>(Te(e)||be(e))&&be(e.then)&&be(e.catch),wi=Object.prototype.toString,Vn=e=>wi.call(e),ps=e=>Vn(e).slice(8,-1),ho=e=>Vn(e)==="[object Object]",mo=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yn=mn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var vo=e=>{let t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},fd=/-\w/g,Je=vo(e=>e.replace(fd,t=>t.slice(1).toUpperCase())),hd=/\B([A-Z])/g,St=vo(e=>e.replace(hd,"-$1").toLowerCase()),en=vo(e=>e.charAt(0).toUpperCase()+e.slice(1)),qn=vo(e=>e?`on${en(e)}`:""),yt=(e,t)=>!Object.is(e,t),bn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},go=(e,t,s,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:s})},wn=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var gi,Mn=()=>gi||(gi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $e(e){if(ge(e)){let t={};for(let s=0;s<e.length;s++){let i=e[s],o=Be(i)?yd(i):$e(i);if(o)for(let r in o)t[r]=o[r]}return t}else if(Be(e)||Te(e))return e}var md=/;(?![^(]*\))/g,vd=/:([^]+)/,gd=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function yd(e){let t={};return e.replace(gd,s=>s.startsWith("/*")?"":s).split(md).forEach(s=>{if(s){let i=s.split(vd);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function A(e){let t="";if(Be(e))t=e;else if(ge(e))for(let s=0;s<e.length;s++){let i=A(e[s]);i&&(t+=i+" ")}else if(Te(e))for(let s in e)e[s]&&(t+=s+" ");return t.trim()}var ki="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ei=mn(ki),bd=mn(ki+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function yo(e){return!!e||e===""}function wd(e,t,s){if(e.length!==t.length)return!1;let i=!0;for(let o=0;i&&o<e.length;o++)i=Nt(e[o],t[o],s);return i}function yi(e,t,s){if(e.size!==t.size)return!1;let i=Array.from(t),o=new Uint8Array(i.length);for(let r of e){let a=-1;for(let c=0;c<i.length;c++)if(!o[c]&&Nt(r,i[c],s)){a=c;break}if(a<0)return!1;o[a]=1Line truncated
`))),e[un]=Yo(o);let r=i||o.props&&o.props.type==="number";dn(e,t?"change":"input",a=>{a.target.composing||e[un](Ws(e.value,s,r))}),(s||r)&&dn(e,"change",()=>{e.value=Ws(e.value,s,r)}),t||(dn(e,"compositionstart",cc),dn(e,"compositionend",xr),dn(e,"change",xr))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[Wo];delete e[Wo],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[un](Ws(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},a){if(e[un]=Yo(a),e.composing)return;let c=(r||e.type==="number")&&!/^0\d/.test(e.value)?wn(e.value):e.value,h=t??"";if(c===h)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===h)||(e.value=h)}};var Jo={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,dn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>s?wn(Qo(h)):Qo(h)),r=e.multiple,a=r?Ft(e._modelValue)?new Set(o):o:o[0],c=e._pendingValue=[r,r?ge(a)?o.slice():o:a];try{e[un](a)}finally{Ye(()=>{e._pendingValue===c&&(e._pendingValue=void 0)})}}),e[un]=Yo(i)},mounted(e,{value:t}){ea(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[un]=Yo(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!pc(t,s[1],s[0]))&&ea(e,t)}};function pc(e,t,s){if(!s)return Nt(e,t);if(ge(e))return Nt(e,t);if(Ft(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function ea(e,t){let s=e.multiple,i=ge(t);if(!(s&&!i&&!Ft(t))){for(let o=0,r=e.options.length;o<r;o++){let a=e.options[o],c=Qo(a);if(s)if(i){let h=typeof c;h==="string"||h==="number"?a.selected=t.some(v=>String(v)===String(c)):a.selected=Ci(t,c)>-1}else a.selected=t.has(c);else if(Nt(Qo(a),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Qo(e){return"_value"in e?e._value:e.value}var fc=["ctrl","shift","alt","meta"],hc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>fc.some(s=>e[`${s}Key`]&&!t.includes(s))},ce=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let a=0;a<t.length;a++){let c=hc[t[a]];if(c&&c(o,t))return}return e(o,...r)}))},mc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rn=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=St(o.key);if(t.some(a=>a===r||mc[a]===r))return e(o)}))},vc=Ge({patchProp:lc},Wu),ta;function gc(){return ta||(ta=qr(vc))}var sa=((...e)=>{let t=gc().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=bc(i);if(!o)return;let r=t._component;!be(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let a=s(o,!1,yc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t});function yc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function bc(e){return Be(e)?document.querySelector(e):e}var fn=typeof document<"u";function ra(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function wc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&ra(e.default)}var Pe=Object.assign;function Xo(e,t){let s={};for(let i in t){let o=t[i];s[i]=kt(o)?o.map(e):e(o)}return s}var An=()=>{},kt=Array.isArray;function Js(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var aa=/#/g,kc=/&/g,Ec=/\//g,Cc=/=/g,_c=/\?/g,la=/\+/g,Sc=/%5B/g,Nc=/%5D/g,da=/%5E/g,Dc=/%60/g,ua=/%7B/g,Rc=/%7C/g,ca=/%7D/g,Tc=/%20/g;function Xs(e){return e==null?"":encodeURI(""+e).replace(Rc,"|").replace(Sc,"[").replace(Nc,"]")}function pa(e){return Xs(e).replace(ua,"{").replace(ca,"}").replace(da,"^")}function Ys(e){return Xs(e).replace(la,"%2B").replace(Tc,"+").replace(aa,"%23").replace(kc,"%26").replace(Dc,"`").replace(ua,"{").replace(ca,"}").replace(da,"^")}function Ac(e){return Ys(e).replace(Cc,"%3D")}function Oc(e){return Xs(e).replace(aa,"%23").replace(_c,"%3F")}function fa(e){return Oc(e).replace(Ec,"%2F")}function Tn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Pc=/\/$/,Ic=e=>e.replace(Pc,"");function Zo(e,t,s="/"){let i,o={},r="",a="",c=t.indexOf("#"),h=t.indexOf("?");return h=c>=0&&h>c?-1:h,h>=0&&(i=t.slice(0,h),r=t.slice(h,c>0?c:t.length),o=e(r.slice(1))),c>=0&&(i=i||t.slice(0,c),a=t.slice(c,t.length)),i=qc(i??t,s),{fullPath:i+r+a,path:i,query:o,hash:Tn(a)}}function ha(e,t){let s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function Zs(e,t){return!t||!e.toLowerCase().sLine truncated
"use strict";(()=>{var _d=Object.defineProperty;var Sd=(e,t)=>{for(var o in t)_d(e,o,{get:t[o],enumerable:!0})};var ce=["abap","abc","actionscript","ada","alda","apache_conf","apex","applescript","aql","asciidoc","asl","assembly_x86","autohotkey","batchfile","c9search","c_cpp","cirru","clojure","cobol","coffee","coldfusion","crystal","csharp","csound_document","csound_orchestra","csound_score","csp","css","curly","d","dart","diff","django","dockerfile","dot","drools","edifact","eiffel","ejs","elixir","elm","erlang","forth","fortran","fsharp","fsl","ftl","gcode","gherkin","gitignore","glsl","gobstones","golang","graphqlschema","groovy","haml","handlebars","haskell","haskell_cabal","haxe","hjson","html","html_elixir","html_ruby","ini","io","jack","jade","java","javascript","json","json5","jsoniq","jsp","jssm","jsx","julia","kotlin","latex","less","liquid","lisp","livescript","logiql","logtalk","lsl","lua","luapage","lucene","makefile","markdown","mask","matlab","maze","mediawiki","mel","mixal","mushcode","mysql","nginx","nim","nix","nsis","nunjucks","objectivec","ocaml","pascal","perl","perl6","pgsql","php","php_laravel_blade","pig","plain_text","powershell","praat","prisma","prolog","properties","protobuf","puppet","python","qml","r","razor","rdoc","red","redshift","rhtml","rst","ruby","rust","sass","scad","scala","scheme","scss","sh","sjs","slim","smarty","snippets","soy_template","space","sparql","sql","sqlserver","stylus","svg","swift","tcl","terraform","tex","text","textile","toml","tsx","turtle","twig","typescript","vala","vbscript","velocity","verilog","vhdl","visualforce","wollok","xml","xquery","yaml","zeek"];var pe={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};function Ei(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let o=new URLSearchParams(t);if([...o.keys()].length!==3||[...o.keys()].some(a=>!["clientId","intentId","token"].includes(a)))return null;let i=o.get("clientId"),s=o.get("intentId"),r=o.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(s||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:s,token:r}}function Ci(e,t){let{http:o,promises:i,window:s}=t,r=t.takeReviewHandoff(),a=r?{clientId:r.clientId,intentId:r.intentId}:null,c,f,g,v,b,h=!0,C,w=i.defer(),y=()=>[...s.crypto.getRandomValues(new Uint8Array(16))].map(L=>L.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let S=()=>h&&e.user?.username===b;function T(){h=!1,r=c=f=void 0,w.resolve(),s.clearTimeout(C)}e.on("dispose",T),e.on("routeLeave",T),e.watch(()=>e.user?.username,L=>{!b&&L?b=L:b&&L!==b&&(T(),e.preview=null,e.repositoryId="",e.busy=!1,e.saved=!1,e.handoffEnabled=!1,e.error="Your account changed. Open a new artifact link from your submission.")});let O=()=>({timeout:w.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":f}}),M=L=>L?.status===404?"Artifact linking is not available on this server.":L?.status===401?"Sign in, then open a new artifact link from your submission.":L?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!h||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;b=e.user.username;let L=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(L)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,c=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,s.clearTimeout(C),v||(v=y());try{let U=(await o.get("/api/review-consent/csrf",{timeout:w.promise})).data;if(!S())return;if(f=U.csrf,e.handoffEnabled=U.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(f||""))throw new Error("invalid_csrf");let z=(await o.post("/api/review-consent/preview",{repositoryId:L,intent:{...r,requestId:v}},O())).data;if(!S())return;if(!z||typeof z.ticket!="string"||!z.ticket||z.ticket.length>8192||typeof z.repositoryName!="string"||!["restricted-review","anonymous-link"].includes(z.policy?.access)||!Number.isSafeInteger(z.policy.version)||!Number.isFinite(Date.parse(z.policy.retainUntil))||!Number.isFinite(Date.parse(z.expiresAt))||Date.parse(z.expiresAt)<=Date.now()||Date.parse(z.expiresAt)>Date.now()+6e5)throw new Error("invalid_preview");c=z.ticket,g=y(),e.preview={repositoryName:z.repositoryName,policy:{...z.policy},expiresAt:z.expiresAt},C=s.setTimeout(()=>{h&&(e.expired=!0)},Math.max(0,Date.parse(z.expiresAt)-Date.now()))}catch(U){S()&&(e.error=M(U))}finally{S()&&(e.busy=!1)}},e.confirmConsent=async()=>{if(!(!S()||e.busy||e.saved||!c||!e.acceptAccesLine truncated
`))),e[Bt]=Dn(s);let r=i||s.props&&s.props.type==="number";tn(e,t?"change":"input",a=>{a.target.composing||e[Bt](Xs(e.value,o,r))}),(o||r)&&tn(e,"change",()=>{e.value=Xs(e.value,o,r)}),t||(tn(e,"compositionstart",Dc),tn(e,"compositionend",ua),tn(e,"change",ua))},mounted(e,{value:t,modifiers:{trim:o,number:i}}){let s=t??"",r=e[Jo];delete e[Jo],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[Bt](Xs(e.value,o,i)):e.value=s},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:i,trim:s,number:r}},a){if(e[Bt]=Dn(a),e.composing)return;let c=(r||e.type==="number")&&!/^0\d/.test(e.value)?kn(e.value):e.value,f=t??"";if(c===f)return;let g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(i&&t===o||s&&e.value.trim()===f)||(e.value=f)}},xs={deep:!0,created(e,t,o){e[Bt]=Dn(o),tn(e,"change",()=>{let i=e._modelValue,s=ho(e),r=e.checked,a=e[Bt];if(he(i)){let c=_o(i,s),f=c!==-1;if(r&&!f)a(i.concat(s));else if(!r&&f){let g=[...i];g.splice(c,1),a(g)}}else if(Ct(i)){let c=new Set(i);r?c.add(s):c.delete(s),a(c)}else a(va(e,r))})},mounted:ca,beforeUpdate(e,t,o){e[Bt]=Dn(o),ca(e,t,o)}};function ca(e,{value:t,oldValue:o},i){e._modelValue=t;let s;if(he(t))s=_o(t,i.props.value)>-1;else if(Ct(t))s=t.has(i.props.value);else{if(t===o)return;s=_t(t,va(e,!0))}e.checked!==s&&(e.checked=s)}var mo={deep:!0,created(e,{value:t,modifiers:{number:o}},i){e._modelValue=t,tn(e,"change",()=>{let s=Array.prototype.filter.call(e.options,f=>f.selected).map(f=>o?kn(ho(f)):ho(f)),r=e.multiple,a=r?Ct(e._modelValue)?new Set(s):s:s[0],c=e._pendingValue=[r,r?he(a)?s.slice():s:a];try{e[Bt](a)}finally{Ke(()=>{e._pendingValue===c&&(e._pendingValue=void 0)})}}),e[Bt]=Dn(i)},mounted(e,{value:t}){pa(e,t)},beforeUpdate(e,{value:t},o){e._modelValue=t,e[Bt]=Dn(o)},updated(e,{value:t}){let o=e._pendingValue;e._pendingValue=void 0,(!o||o[0]!==e.multiple||!Tc(t,o[1],o[0]))&&pa(e,t)}};function Tc(e,t,o){if(!o)return _t(e,t);if(he(e))return _t(e,t);if(Ct(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function pa(e,t){let o=e.multiple,i=he(t);if(!(o&&!i&&!Ct(t))){for(let s=0,r=e.options.length;s<r;s++){let a=e.options[s],c=ho(a);if(o)if(i){let f=typeof c;f==="string"||f==="number"?a.selected=t.some(g=>String(g)===String(c)):a.selected=_o(t,c)>-1}else a.selected=t.has(c);else if(_t(ho(a),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ho(e){return"_value"in e?e._value:e.value}function va(e,t){let o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}var Ac=["ctrl","shift","alt","meta"],Oc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ac.some(o=>e[`${o}Key`]&&!t.includes(o))},ae=(e,t)=>{if(!e)return e;let o=e._withMods||(e._withMods={}),i=t.join(".");return o[i]||(o[i]=((s,...r)=>{for(let a=0;a<t.length;a++){let c=Oc[t[a]];if(c&&c(s,t))return}return e(s,...r)}))},Pc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Tn=(e,t)=>{let o=e._withKeys||(e._withKeys={}),i=t.join(".");return o[i]||(o[i]=(s=>{if(!("key"in s))return;let r=Ot(s.key);if(t.some(a=>a===r||Pc[a]===r))return e(s)}))},Ic=je({patchProp:Sc},dc),fa;function Vc(){return fa||(fa=Wr(Ic))}var ga=((...e)=>{let t=Vc().createApp(...e),{mount:o}=t;return t.mount=i=>{let s=Mc(i);if(!s)return;let r=t._component;!ye(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let a=o(s,!1,qc(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function qc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Mc(e){return Le(e)?document.querySelector(e):e}var hn=typeof document<"u";function ba(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Uc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&ba(e.default)}var Ae=Object.assign;function Zo(e,t){let o={};for(let i in t){let s=t[i];o[i]=kt(s)?s.map(e):e(s)}return o}var On=()=>{},kt=Array.isArray;function ni(e,t){let o={};for(let i in e)o[i]=i in t?t[i]:e[i];return o}var wa=/#/g,$c=/&/g,Lc=/\//g,Fc=/=/g,Bc=/\?/g,ka=/\+/g,Hc=/%5B/g,zc=/%5D/g,Ea=/%5E/g,jc=/%60/g,Ca=/%7B/g,Gc=/%7C/g,_a=/%7D/g,Wc=/%20/g;function oi(e){return e==null?"":encodeURI(""+e).replace(Gc,"|").replace(Hc,"[").replace(zc,"]")}function Sa(e){return oi(e).replace(Ca,"{").replace(_a,"}").replace(Ea,"^")}function ei(e){return oi(e).replace(ka,"%2B").replace(Wc,"+").replace(wa,"%23").replace($c,"%26").replace(jc,"`").replace(Ca,"{").replace(_a,"}").replace(Ea,"^")}function Kc(e){return ei(e).replace(Fc,"%3D")}function Yc(e){return oLine truncated
${JSON.stringify(e)}${t?`
while being at
`+JSON.stringify(t):""}`},[je.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${Fc(t)}" via a navigation guard.`},[je.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[je.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[je.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function pn(e,t){return Pe(new Error,{type:e,[ka]:!0},t)}function Lt(e,t){return e instanceof Error&&ka in e&&(t==null||!!(e.type&t))}var Uc=["params","query","hash"];function Fc(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Uc)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function Ea(e){let t={};if(e===""||e==="?")return t;let s=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<s.length;++i){let o=s[i].replace(la," "),r=o.indexOf("="),a=Tn(r<0?o:o.slice(0,r)),c=r<0?null:Tn(o.slice(r+1));if(a in t){let h=t[a];kt(h)||(h=t[a]=[h]),h.push(c)}else t[a]=c}return t}function ni(e){let t="";for(let s in e){let i=e[s];if(s=Ac(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(kt(i)?i.map(o=>o&&Ys(o)):[i&&Ys(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function Ca(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=kt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var _a=Symbol(""),oi=Symbol(""),ts=Symbol(""),ns=Symbol(""),os=Symbol("");function On(){let e=[];function t(i){return e.push(i),()=>{let o=e.indexOf(i);o>-1&&e.splice(o,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Yt(e,t,s,i,o,r=a=>a()){let a=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((c,h)=>{let v=m=>{m===!1?h(pn(je.NAVIGATION_ABORTED,{from:s,to:t})):m instanceof Error?h(m):Lc(m)?h(pn(je.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&i.enterCallbacks[o]===a&&typeof m=="function"&&a.push(m),c())},g=r(()=>e.call(i&&i.instances[o],t,s,v)),k=Promise.resolve(g);e.length<3&&(k=k.then(v)),k.catch(m=>h(m))})}function ss(e,t,s,i,o=r=>r()){let r=[];for(let a of e)for(let c in a.components){let h=a.components[c];if(!(t!=="beforeRouteEnter"&&!a.instances[c]))if(ra(h)){let v=(h.__vccOpts||h)[t];v&&r.push(Yt(v,s,i,a,c,o))}else{let v=h();r.push(()=>v.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${c}" at "${a.path}"`);let k=wc(g)?g.default:g;a.mods[c]=g,a.components[c]=k;let m=(k.__vccOpts||k)[t];return m&&Yt(m,s,i,a,c,o)()}))}}return r}function Sa(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let a=0;a<r;a++){let c=t.matched[a];c&&(e.matched.find(v=>cn(v,c))?i.push(c):s.push(c));let h=e.matched[a];h&&(t.matched.find(v=>cn(v,h))||o.push(h))}return[s,i,o]}var Bc=()=>location.protocol+"//"+location.host;function Ma(e,t){let{pathname:s,search:i,hash:o}=t,r=e.indexOf("#");if(r>-1){let a=o.includes(e.slice(r))?e.slice(r).length:1,c=o.slice(a);return c[0]!=="/"&&(c="/"+c),Zs(c,"")}return Zs(s,e)+i+o}function zc(e,t,s,i){let o=[],r=[],a=null,c=({state:m})=>{let b=Ma(e,location),C=s.value,E=t.value,R=0;if(m){if(s.value=b,t.value=m,a&&a===C){a=null;return}R=E?m.position-E.position:0}else i(b);o.forEach(D=>{D(s.value,C,{delta:R,type:xo.pop,direction:R?R>0?es.forward:es.back:es.unknown})})};function h(){a=s.value}function v(m){o.push(m);let b=()=>{let C=o.indexOf(m);C>-1&&o.splice(C,1)};return r.push(b),b}function g(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Pe({},m.state,{scroll:po()}),"")}}function k(){for(let m of r)m();r=[],window.removeEventListener("popstate",c),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",c),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:h,listen:v,destroy:k}}function Na(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?po():null}}function Hc(e){let{history:t,location:s}=window,i={value:Ma(e,s)},o={value:t.state};o.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(h,v,g){let k=e.indexOf("#"),m=k>-1?(s.host&&document.querySelector("base")?e:e.slice(k))+h:Bc()+e+h;try{t[g?"replaceState":"pushState"](v,"",m),o.value=v}catch(b){console.error(b),s[g?"replace":"assign"](m)}}function a(h,v){r(h,Pe({},t.state,Na(o.value.back,h,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=h}function c(h,v){let g=Pe({},o.value,t.state,{forward:h,scroll:po()});r(g.current,g,!0),r(h,Pe({},Na(i.value,h,null),{position:g.position+1},v),!1),i.value=h}return{location:i,state:o,push:c,replace:a}}function $a(e){e=va(e);let t=Hc(e),s=zc(e,t.state,t.location,t.replace);function i(r,a=!0){a||s.pauseListeners(),history.go(r)}let o=Pe({locatLine truncated
`)),e.options=Object.assign({},e.options,v.options),r.restore()})}a();let c=null;e.saveDefault=h=>{if(h&&h.preventDefault&&h.preventDefault(),e.saving)return;let v=r.checkpoint(),g={terms:e.terms.split(`
`).map(k=>k.trim()).filter(k=>k.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",g).then(()=>{r.accept(v),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",c&&i.cancel(c),c=i(()=>{e.message=null},2500)},k=>{e.saving=!1;let b="ERRORS."+(k&&k.data&&k.data.error);s(b).then(C=>{e.error=C&&C!==b?C:"Unable to save your defaults. Please try again."},()=>{e.error="Unable to save your defaults. Please try again."})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},Wa=function(e,t,s){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{s.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},Ka=function(e,t,s,i,o){e.user&&!e.user.status&&s.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&s.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(c){e.feature=c},e.featureHref=function(c){return c.needsUser&&!e.user?"/signin":c.href},e.featureTarget=function(c){return c.needsUser&&!e.user?"_self":c.target||void 0},e.featureKeydown=function(c,h){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[c.key];if(v===void 0)return;c.preventDefault();let g=e.features.length,k=v==="first"?0:v==="last"?g-1:(h+v+g)%g;e.feature=e.features[k].key,o(()=>{let m=i.document.getElementById("feature-tab-"+e.feature);m&&m.focus()})},e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}];function r(){t.get("/api/stat/").then(c=>{e.stat=c.data,e.cards[0].total=c.data.nbRepositories,e.cards[1].total=c.data.nbUsers,e.cards[2].total=c.data.nbPageViews,e.cards[3].total=c.data.nbPullRequests})}r();function a(c){let h={series:c,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!c||c.length<2)return h;let v=new Array(c.length-1);for(let E=1;E<c.length;E++)v[E-1]=c[E]-c[E-1];let g=v.length,k=Math.max.apply(null,v),m=Math.min.apply(null,v),b=Math.min(0,m),C=k-b||1;h.viewW=g*2,h.bars=new Array(g);for(let E=0;E<g;E++){let R=(v[E]-b)/C,D=Math.max(1.5,R*34);h.bars[E]={x:(E*2+.25).toFixed(2),y:(36-D).toFixed(2),w:"1.5",h:D.toFixed(2)}}if(h.deltaToday=v[g-1],g>=2){let E=v[g-2];E&&(h.pctChange=(h.deltaToday-E)/E*100)}return h.pctAbs=Math.round(Math.abs(h.pctChange)),h.isUp=h.pctChange>=0,h}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(c=>{let h=c.data||[];e.history={repositories:a(h.map(v=>v.nbRepositories||0)),users:a(h.map(v=>v.nbUsers||0)),pageViews:a(h.map(v=>v.nbPageViews||0)),pullRequests:a(h.map(v=>v.nbPullRequests||0))}})},Ya=function(e,t,s,i,o,r){let a=ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,Ye(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Jt()(document,"click",_=>{e.quotaExpanded&&!_.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.p Line truncated
`)),e.options=Object.assign({},e.options,S.options),e.options.expirationDate=S.options&&S.options.expirationDate?new Date(S.options.expirationDate):z(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),p&&p()})}function O(p,w,S){e.anonymize&&e.anonymize[p]&&e.anonymize[p].setValidity(w,S)}function B(p){try{let w=parseGithubUrl(p);if(w&&w.owner&&w.repo)return w.owner+"/"+w.repo}catch{}return null}e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await te()}catch{}}};function Y(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:B(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function X(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function K(){let p=new URLSearchParams(window.location.search).get("billingDraft");if(p){R.restore();try{let S=(await t.get("/api/billing/draft/"+encodeURIComponent(p))).data;if(S.path!==o.path())throw new Error("Wrong task");D=S.values.conference||null;for(let P of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(S.values,P)&&(e[P]=S.values[P]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),T=S.id,q=JSON.stringify(R.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await X(),o.replace?.(o.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let w;try{w=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!w||w.path!==o.path()||Date.now()-w.savedAt>=30*6e4)return R.restore()?(e.sourceUrl&&await X(),!0):!1;R.restore();for(let S of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(w.draft,S)&&(e[S]=w.draft[S]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await X(),sessionStorage.removeItem("github-access-draft"),!0}_(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&a(K,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async p=>{e.githubConnection=p.data.connection||"oauth",e.sourceUrl="https://github.com/"+p.data.source.fullName,e._originalFullName=p.data.source.fullName,e.terms=p.data.options.terms.filter(w=>w).join(`
`),e.source=p.data.source,e.role=p.data.role||"owner",e._existingNever=p.data.options.expirationMode==="never",e.coauthors=p.data.coauthors||[],e._originalBranch=p.data.source.branch,e.options=Object.assign({},e.options,p.data.options),e.conference=p.data.conference,e._originalConference=p.data.conference,e.repositoryID=p.data.source.repositoryID,e._originalRepositoryID=p.data.source.repositoryID,p.data.options.expirationDate&&(e.options.expirationDate=new Date(p.data.options.expirationDate)),C=E(parseGithubUrl(e.sourceUrl)),!await K()&&(await Promise.all([te(),ue()]),Ae())},()=>{o.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async p=>{if(e.githubConnection=p.data.connection||"oauth",e.sourceUrl="https://github.com/"+p.data.source.repositoryFullName+"/pull/"+p.data.source.pullRequestId,e.terms=p.data.options.terms.filter(w=>w).join(`
`),e.source=p.data.source,e.options=Object.assign({},e.options,p.data.options),e.conference=p.data.conference,e._originalConference=p.data.conference,p.data.options.expirationDate&&(e.options.expirationDate=new Date(p.data.options.expirationDate)),C=E(parseGithubUrl(e.sourceUrl)),!await K())try{await Oe()}catch{}},()=>{o.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async p=>{e.sourceUrl="https://gist.github.com/"+p.data.source.gistId,e.terms=p.data.options.terms.filter(w=>w).join(`
`),e.source=p.data.source,e.options=Object.assign({},e.options,p.data.options),e.conference=p.data.conference,e._originalConference=p.data.conference,p.data.options.expirationDate&&(e.options.expirationDate=new Date(p.data.options.expirationDate)),C=E(parseGithubUrl(e.sourceUrl)),!await K()&&await Fe()},()=>{o.url("/404")}))}),t.get("/github/connections").then(p=>{e.githubConnections=p.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&p.data.appEnabled&&p.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&X())}).catch(()=>{}),e.urlSelected=async(p=!1)=>{let w=++h,S;try{S=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Ce.cancel(),Se.cancel(),x.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",O("sourceUrl","github",!1);return}let P=E(S),V=p||C===P;C=P,e.sourceUrlError="",O("sourceUrl","github",!0);let I=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,I&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!V&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],V||(e.source={type:"GitHubStream",branch:"",commit:""}),Ce.cancel(),Se.cancel(),x.cancel(),ke.clear(),Ve.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=V;try{S.gistId&&!S.repo?(e.detectedType="gist",e.source={gistId:S.gistId},await Fe()):S.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:S.owner+"/"+S.repo,pullRequestId:S.pullRequestId},await Oe()):(e.detectedType="repo",await Promise.all([te(),ue()]),Ae())}catch{}finally{w===h&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let p=e.branches.filter(S=>S.name==e.source.branch)[0];if(!p)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=p.commit),e.readme=p.readme,await ue(),Ae()}),e.getBranches=async p=>{let w=parseGithubUrl(e.sourceUrl),S=m();try{let P=await t.get(`/api/repo/${w.owner}/${w.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&B(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:p===!0||e.reconnectingSource?"1":"0",repositoryID:Y()}});if(!k(S))return;e.branches=P.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let V=e.branches.filter(I=>I.name==e.source.branch);V.length>0&&(!(!e.reconnectingSource&&!p&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=V[0].commit),e.readme=V[0].readme,await ue(p))}catch(P){if(!k(S))return;e.branches=[],e.sourceUnreachable=P&&(P.status===404||P.data&&P.data.error==="repo_not_found");let V=P&&P.data&&P.data.error||(P&&P.status===404?"repo_not_found":"unknown_error");r("ERRORS."+V).then(I=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:I}),e.error=I},console.error),typeof O=="function"&&O("sourceUrl","missing",!1)}finally{b(S)}};async function te(){let p=parseGithubUrl(e.sourceUrl),w=m();try{me();let S=await t.get(`/api/repo/${p.owner}/${p.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&B(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:Y(),force:"1"}});if(!k(w))return;e.details=S.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(S){if(!k(w))return;throw S.data&&(r("ERRORS."+S.data.error).then(P=>{e.addToast({title:"Error",date:new Date,body:P}),e.error=P},console.error),W(S.data.error)),O("sourceUrl","missing",!1),S}finally{b(w)}}async function ue(p){if(e.readme&&!p)return e.readme;let w=parseGithubUrl(e.sourceUrl),S=m();try{let P=await t.get(`/api/repo/${w.owner}/${w.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&B(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:p===!0?"1":"0",branch:e.source.branch,repositoryID:Y()}});k(S,!0)&&(e.readme=P.data)}catch{k(S,!0)&&(e.readme="")}finally{b(S)}}function le(){let p={terms:e.terms?e.terms.split(`
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(p.branchName=e.source.branch);try{let w=parseGithubUrl(e.sourceUrl);p.repoName=`${w.owner}/${w.repo}`}catch{}return p}function re(p,w,S){let P=null,V=0,I=()=>{if(e.detectedType!==p)return;P&&a.cancel(P);let F=++V;e.previewStatus="loading",P=a(()=>{P=null;let Q=w();if(!Q){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Q).then(J=>{F===V&&(S(J.data,Q),e.previewStatus="ready")}).catch(()=>{F===V&&(e.previewStatus="error")})},200)};return I.cancel=()=>{V++,P&&a.cancel(P),P=null},e.on("dispose",I.cancel),I}e.retryPreview=()=>{e.detectedType==="repo"&&Ce(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()};let Ce=re("repo",()=>e.readme?{content:e.readme,options:le()}:null,p=>{if(typeof p?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=p.content;let w="";try{let P=parseGithubUrl(e.sourceUrl),V=e.source.branch||e.details&&e.details.defaultBranch||"main";w=`https://github.com/${P.owner}/${P.repo}/raw/${V}/`}catch{}let S=renderMD(e.anonymize_readme,w);e.html_readme=S,a(Prism.highlightAll,150)});function Ae(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),Ce())}async function Oe(){let p=parseGithubUrl(e.sourceUrl),w=m();try{me();let S=await t.get(`/api/pr/${p.owner}/${p.repo}/${p.pullRequestId}`,{params:{connection:e.githubConnection}});if(!k(w))return;e.details=S.data,e.pullRequestId||(e.pullRequestId=p.repo+"-PR"+p.pullRequestId+"-"+generateRandomId(4))}catch(S){if(!k(w))return;throw S.data&&(r("ERRORS."+S.data.error).then(P=>{e.addToast({title:"Error",date:new Date,body:P}),e.error=P},console.error),W(S.data.error)),O("sourceUrl","missing",!1),S}finally{b(w)}}let ke=ze(new Map);function Ie(){let p=new Set,w=e.details&&e.details.pullRequest;if(!w)return p;typeof w.title=="string"&&p.add(w.title),typeof w.body=="string"&&p.add(w.body),typeof w.diff=="string"&&p.add(w.diff);let S=w.comments||[];for(let P of S)typeof P.author=="string"&&p.add(P.author),typeof P.body=="string"&&p.add(P.body);return p}let Se=re("pr",()=>{let p=Ie(),w=Array.from(p);return w.length===0?null:{contents:w,options:le()}},(p,w)=>{if(!Array.isArray(p?.contents)||p.contents.length!==w.contents.length||p.contents.some(V=>typeof V!="string"))throw Error("Invalid preview response");let S=w.contents,P=new Map;for(let V=0;V<S.length&&V<p.contents.length;V++)P.set(S[V],p.contents[V]);ke.clear(),P.forEach((V,I)=>ke.set(I,V))});e.anonymizePrContent=function(p){return p&&(ke.has(p)?ke.get(p):"")};async function Fe(){let p=parseGithubUrl(e.sourceUrl),w=m();try{me(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let S=await t.get(`/api/gist/source/${p.gistId}`);if(!k(w))return;e.details=S.data,e.gistId||(e.gistId="gist-"+p.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(S){if(!k(w))return;if(S.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,O("sourceUrl","missing",!1);return}if(S.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,O("sourceUrl","missing",!1);return}throw S.data&&(r("ERRORS."+S.data.error).then(P=>{e.addToast({title:"Error",date:new Date,body:P}),e.error=P},console.error),W(S.data.error)),O("sourceUrl","missing",!1),S}finally{b(w)}}let Ve=ze(new Map);function U(){let p=new Set,w=e.details&&e.details.gist;if(!w)return p;typeof w.description=="string"&&p.add(w.description),typeof w.ownerLogin=="string"&&p.add(w.ownerLogin);let S=w.files||[];for(let V of S)typeof V.filename=="string"&&p.add(V.filename),typeof V.content=="string"&&p.add(V.content);let P=w.comments||[];for(let V of P)typeof V.author=="string"&&p.add(V.author),typeof V.body=="string"&&p.add(V.body);return p}let x=re("gist",()=>{let p=U(),w=Array.from(p);return w.length===0?null:{contents:w,options:le()}},(p,w)=>{if(!Array.isArray(p?.contents)||p.contents.length!==w.contents.length||p.contents.some(V=>typeof V!="string"))throw Error("Invalid preview response");let S=w.contents,P=new Map;for(let V=0;V<S.length&&V<p.contents.length;V++)P.set(S[V],p.contents[V]);Ve.clear(),P.forEach((V,I)=>Ve.set(I,V)),Z()});e.anonymizeGistContent=function(p){return p&&(Ve.has(p)?Ve.get(p):"")},e.previewGistFiles=[];function Z(){let p=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=p.map(w=>({filename:e.anonymizeGistContent(w.filename),content:e.anonymizeGistContent(w.content),language:w.language}))}e.watch("details.gist.files",Z,!0),e.watch("terms",Z);function ie(){let p=e.conference;if(e.conference_data=null,!p)return;let w=p===D||e.isUpdate&&p===e._originalConference;p!==D&&(D=null),t.get("/api/conferences/"+p).then(S=>{e.conference===p&&(e.conference_data=S.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!w&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e. Line truncated
`).filter(I=>I),connection:e.githubConnection,fullName:`${S.owner}/${S.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(P.options.pageSource=e.details.pageSource),me();let V=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(V,P,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/status/"+e.repoId},I=>{I.data&&(r("ERRORS."+I.data.error).then(F=>{e.error=F},console.error),W(I.data.error),["quota_exceeded","subscription_required_for_never_expiration"].includes(I.data.error)&&(I.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Ye(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}))))}).finally(()=>{w.disabled=!1})},e.anonymizeGist=p=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(_e())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let w=p.currentTarget||p.target.closest?.("button")||p.target;w.disabled=!0;let S=parseGithubUrl(e.sourceUrl),P={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(I=>I),source:{gistId:S.gistId},options:e.options,conference:e.conference};me();let V=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(V,P,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/gist/"+e.gistId},I=>{I.data&&(r("ERRORS."+I.data.error).then(F=>{e.error=F},console.error),W(I.data.error))}).finally(()=>{w.disabled=!1})},e.anonymizePullRequest=p=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(_e())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let w=p.currentTarget||p.target.closest?.("button")||p.target;w.disabled=!0;let S=parseGithubUrl(e.sourceUrl),P={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(I=>I),source:{repositoryFullName:`${S.owner}/${S.repo}`,pullRequestId:S.pullRequestId},options:e.options,conference:e.conference};me();let V=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(V,P,{headers:{"Content-Type":"application/json"}}).then(()=>{R.clear(),window.location.href="/pr/"+e.pullRequestId},I=>{I.data&&(r("ERRORS."+I.data.error).then(F=>{e.error=F},console.error),W(I.data.error))}).finally(()=>{w.disabled=!1})},e.watch("conference",()=>{ie()}),e.watch("terms",()=>{e.detectedType==="repo"&&Ae(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Ae(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Ae(),e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()}),e.watch("details",()=>{e.detectedType==="pr"&&Se(),e.detectedType==="gist"&&x()},!0)},li=function(e,t,s,i,o,r){let a=ct(),c=Jt();e.on("dark-mode",(O,B)=>{e.aceOption&&(B?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let h=0,v=!1;e.on("dispose",()=>{v=!0,h++,g&&g.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,c(document,"keydown",function(O){if((O.metaKey||O.ctrlKey)&&O.key==="k"){O.preventDefault();var B=document.querySelector(".tree-search-input");B&&(B.focus(),B.select())}});var g=null;e.onFileSearchChange=function(){g&&(g.resolve(),g=null);let O=e.fileSearchQuery;if(!O||O.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let B=r.defer();g=B,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(O)}`,{timeout:B.promise}).then(function(Y){if(!(v||g!==B)){g=null,e.fileSearchLoading=!1;var X={};e.files.forEach(function(U){X[(U.path||"")+"/"+U.name]=!0});for(var K=[],te={},ue=0;ue<Y.data.length;ue++){var le=Y.data[ue];if(le.path)for(var re=le.path.split("/"),Ce="",Ae=0;Ae<re.length;Ae++){var Oe=Ce;Ce=Ce?Ce+"/"+re[Ae]:re[Ae];var ke=Oe+"/"+re[Ae];!X[ke]&&!te[ke]&&(te[ke]=!0,K.push({name:re[Ae],path:Oe}))}}K.sort(function(U,x){return(U.path||"").split("/").length-(x.path||"").split("/").length}),K.length>0&&e.files.push.apply(e.files,K);for(var Ie=[],Se=0;Se<Y.data.length;Se++){var Fe=Y.data[Se],Ve=(Fe.path||"")+"/"+Fe.name;!X[Ve]&&Fe.size!=null&&(Ie.push(Fe),X[Ve]=!0)}Ie.length>0&&e.files.push.apply(e.files,Ie),e.fileSearchResults=Y.data}},function(){!v&&g===B&&(g=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let k={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},m=["license","txt"],b=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],C=["wav","mp3","ogg","wma","flac","aac","m4a"],E=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(O,B){if(e.repoId!=i.repoId)return _();if((i.path||"")!=e.filePath){e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(Y=>Y&&Y.trim().length>0),oe();for(let Y=0;Y<e.paths.length-1;Y++){let X=Y>0?e.paths.slice(0,Y).join("/"):"";e.files.some(te=>te.path===X)||e.getFiles(X)}}});function R(){if(e.paths[0]!="")return;let O=["readme.md","readme.txt","readme.org","readme.1st","readme"],B={};for(let X of e.files)X.name.toLowerCase().indexOf("readme")>-1&&(B[X.name.toLowerCase()]=X.name);let Y=null;for(let X of O)if(B[X]){Y=X;break}if(!Y&&Object.keys(B).length>0&&(Y=Object.keys(B)[0]),Y){let X=s.url();X[X.length-1]!="/"&&(X+="/"),s.url(X+encodePathForUrl(B[Y]))}}e.fileCounts=null,e.getFiles=function(O){let B=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(O)}&v=${e.options.lastUpdateDate}`).then(function(Y){if(v||B!==e.repoId)return[];let X=O||"";return e.files=e.files.filter(K=>K.path!==X),e.files.push(...Y.data),Y.data},function(Y){if(v||B!==e.repoId)return[];e.type="error",e.content=Y&&Y.data&&Y.data.error||"unknown_error",e.files=[]})};function D(){let O=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(B){v||O!==e.repoId||(e.fileCounts=B.data)},function(){e.fileCounts={}})}function T(){return e.files.filter(O=>O.name==e.paths[e.paths.length-1]&&O.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var q=null;e.on("dispose",function(){q&&a.interval.cancel(q)});function L(O){if(v)return;let B=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(Y=>{if(!(v||B!==e.repoId)){if(e.options=Y.data,e.options.url){window.location=e.options.url;return}O&&O(Y.data)}},Y=>{if(!(v||B!==e.repoId)){var X=Y.data||{};if(X.error==="rate_limited"&&X.resetAt){let te=function(){var ue=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ue<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,q&&(a.interval.cancel(q),q=null),L(O);else{var le=Math.floor(ue/60),re=ue%60;e.rateLimitCountdown=le>0?le+"m "+re+"s":re+"s"}};var K=te;e.type="rate_limited",e.rateLimitResetAt=X.resetAt,q&&a.interval.cancel(q),te(),q=a.interval(te,1e3)} Line truncated
`+E.join(`
`)],{type:"text/csv"}),D=document.createElement("a");D.href=URL.createObjectURL(R),D.download=i.username+"-repositories.csv",D.click()},e.showStatusMessage=m=>{let b=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,b)},e.fetchGithubInfo=m=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(C=>{b&&(b.document.open(),b.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(C.data,null,2).replace(/[<>]/g,E=>E==="<"?"&lt;":"&gt;")+"</pre>"),b.document.close())},C=>{let E=C&&C.data?JSON.stringify(C.data,null,2):String(C);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+E+"</pre>")})};function h(m){t.get("/api/admin/users/"+m+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function v(m){t.get("/api/admin/users/"+m,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}v(i.username),h(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>v(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>v(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>v(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>v(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function g(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}g(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",g()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>g(),b=>console.error(b))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>h(i.username),b=>console.error(b))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>h(i.username),b=>console.error(b))},e.updateRepository=m=>{let b=ze({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${m.repoId}/refresh`).then(C=>{C.data.status=="ready"?b.title=`${m.repoId} is refreshed.`:b.title=`Refreshing of ${m.repoId}.`},C=>{b.title=`Error during the refresh of ${m.repoId}.`,b.body=C.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let k=null;e.watch("query",()=>{o.timeout.cancel(k),k=o.timeout(()=>{h(i.username)},500)},!0)},il=function(e,t,s){let i=ct(),o=Jt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=C=>{if(C.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){C.preventDefault();let E=document.querySelector('.admin-filter-toolbar input[type="search"]');E&&E.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=C=>{C==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[C]="",e.query.page=1},e.chips=[];let a=()=>{let C=[];(e.query.dateFrom||e.query.dateTo)&&C.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=C};e.statusCountFor=C=>{let E=(e.statusCounts||[]).find(R=>R._id===C);return E?E.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=C=>{e.query.sort===C?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=C,e.query.direction="desc"),e.query.page=1},e.sortIcon=C=>e.query.sort===C?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let c="admin.conferences.filterPrefs",h={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},v=loadFilterPrefs(c)||{};e.query=Object.assign({},h,v,{page:1,search:""});let g=s.search();g.search&&(e.query.search=g.search);let k="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(k)||"[]"),e.savePreset=()=>{let C=window.prompt("Preset name:");if(!C)return;let E=Object.assign({},e.query);delete E.page,e.presets=(e.presets||[]).filter(R=>R.name!==C),e.presets.push({name:C,query:E}),localStorage.setItem(k,JSON.stringify(e.presets))},e.applyPreset=C=>{Object.assign(e.query,C.query,{page:1})},e.deletePreset=C=>{e.presets=(e.presets||[]).filter(E=>E.name!==C.name),localStorage.setItem(k,JS Line truncated
`).map((ue,le)=>le===0?ue:te+ue).join(`
`)}else typeof _=="number"||typeof _=="boolean"?K=String(_):K=JSON.stringify(_);se.push(`${Y}${K}${X}`)}),se.push("}"),se.join(`
`)}function v(D){let T=[],q="",L=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,M=0,z;for(;z=L.exec(D);)q+=D.slice(M,z.index),M=L.lastIndex,T.push({key:z[1],op:z[2]||"=",val:z[3]});return q+=D.slice(M),{filters:T,free:q.trim().toLowerCase()}}function g(D,T){for(let q of T.filters){let L=(z,se,oe)=>{let _=parseFloat(z),O=parseFloat(se);return oe==="="?String(z)===String(se):oe==="!="?String(z)!==String(se):oe===">="?_>=O:oe==="<="?_<=O:oe===">"?_>O:oe==="<"?_<O:!0},M;if(q.key==="code")M=D.displayMessage;else if(q.key==="module")M=D.module;else if(q.key==="status")M=D._status;else if(q.key==="url")M=D._url;else if(q.key==="repo")M=D._repoId;else if(q.key==="level")M=D.level;else continue;if(M==null||!L(M,q.val,q.op))return!1}return!(T.free&&((D.displayMessage||"")+" "+(D.module||"")+" "+(D._url||"")+" "+JSON.stringify(D.raw||[])).toLowerCase().indexOf(T.free)===-1)}function k(){let D=v(e.query.search||"");e.parsedFilterCount=D.filters.length;let T=e.query.bucket,q=e.entries.filter(M=>T&&M._bucket!==T?!1:g(M,D)),L=e.query.group;if(L){let M=oe=>L==="module"?oe.module:oe.displayMessage||oe.message||"_",z=new Map;for(let oe of q){let _=M(oe);if(z.has(_)){let O=z.get(_);O.count++,O._related.push(oe),new Date(oe.ts)>new Date(O.ts)&&(O.ts=oe.ts,O._url=oe._url,O._status=oe._status),new Date(oe.ts)<new Date(O._firstSeen)&&(O._firstSeen=oe.ts)}else{let O=Object.assign({},oe);O._key=`${L}:${_}`,O._related=[oe],O._firstSeen=oe.ts,O._lastHourCount=0,O.count=1,z.set(_,O)}}let se=Date.now()-3600*1e3;for(let oe of z.values())oe._lastHourCount=oe._related.filter(_=>new Date(_.ts).getTime()>=se).length;q=Array.from(z.values())}else q=q.map((M,z)=>(M._key="row:"+z+":"+M.ts,M._related=[M],M._firstSeen=M.ts,M._lastHourCount=0,M.count=1,M));e.query.sort==="count"?q.sort((M,z)=>z.count-M.count||new Date(z.ts)-new Date(M.ts)):q.sort((M,z)=>new Date(z.ts)-new Date(M.ts)),e.visible=q}function m(D){let T=D?e.entries.length:0,q=D?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:T,limit:q}}).then(L=>{let M=(L.data.entries||[]).map(c);e.entries=D?e.entries.concat(M):M,e.available=!!L.data.available,e.cap=L.data.max||e.cap,e.total=L.data.total||e.entries.length,k()},L=>console.error(L))}e.loadMore=()=>m(!0),e.canLoadMore=()=>e.entries.length<e.total;function b(){t.get("/api/admin/errors/stats").then(D=>{let T=D.data||{},q=T.prev24h?Math.round((T.last24h-T.prev24h)/T.prev24h*100):0;e.stats={last24h:T.last24h||0,prev24h:T.prev24h||0,delta:q,severity:T.severity||{error:0,warn:0,info:0},unique:T.unique||{error:0,warn:0,info:0},buckets:T.buckets||[],dropped:T.dropped||0}},D=>console.error(D))}function C(){m(),b()}e.barPx=(D,T)=>{let q=e.stats.buckets||[],L=0;for(let oe of q)L=Math.max(L,(oe.error||0)+(oe.warn||0)+(oe.info||0));if(!L)return 0;let M=(D.error||0)+(D.warn||0)+(D.info||0);if(!M)return 0;let z=Math.round(M/L*60),se=D[T]||0;return Math.round(se/M*z)},e.bucketTitle=D=>`${new Date(D.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${D.error||0} err \xB7 ${D.warn||0} warn \xB7 ${D.info||0} info`,e.toggle=D=>{e.expanded[D._key]=!e.expanded[D._key]},e.setBucket=D=>{e.query.bucket=D},e.refreshNow=C,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(C,D=>console.error(D))},e.exportCsv=()=>{let D=["ts","level","module","displayMessage","_status","_url","_repoId"],T=[D.join(",")];for(let z of e.visible)T.push(D.map(se=>{let oe=z[se]==null?"":String(z[se]);return/[",\n]/.test(oe)?`"${oe.replace(/"/g,'""')}"`:oe}).join(","));let q=new Blob([T.join(`
`)],{type:"text/csv;charset=utf-8"}),L=URL.createObjectURL(q),M=document.createElement("a");M.href=L,M.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(M),M.click(),document.body.removeChild(M),URL.revokeObjectURL(L)};function E(D){e.copyHint=`${D} copied`,o.timeout(()=>{e.copyHint=""},1500)}e.copyJson=D=>{navigator.clipboard.writeText(D._detailJson).then(()=>E("JSON"))},e.copyCurl=D=>{if(!D._url)return;let q=`curl -X ${D._method||"GET"} '${window.location.origin}${D._url}'`;navigator.clipboard.writeText(q).then(()=>E("curl"))},C();let R=i(()=>{e.query.autoRefresh&&C()},15e3);e.on("dispose",()=>i.cancel(R)),e.watch("query.search",k),e.watch("query.bucket",k),e.watch("query.sort",k),e.watch("query.group",k)},ll=function(e,t,s,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null){s.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.performanceError=null,e.latencyBound=function(b,C){return b.count?b[C]==null?"> 60 s":"\u2264 "+b[C]+" ms":"No samples"},e.firstByteBound=function(b){return e.latencyBound({count:b.firstByteCount,p95UpperMs:b.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(b){return Math.max(0,Math.round((Date.now()-b.sampledAt)/1e3))},e.peakRss=function(b){return(e.performance.runtimeSeries||[]).filter(function(C){return C.instance===b.instance}).reduce(function(C,E){return Math.max(C,E.rss)},b.memory.rss)},e.performanceWarning=function(b){return e.sampleAge(b)>45||b.droppedBatches||b.droppedMetrics||b.sockets?.closeWait>0||b.eventLoop.p95Ms>100||b.memoryLimitBytes&&b.memory.rss>b.memoryLimitBytes*.8};var o=!1;e.loadPerformance=function(){var b=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==b&&(e.performance=null),!o&&(o=!0,t.get("/api/admin/performance",{params:{minutes:b}}).then(function(C){b===e.performanceMinutes&&(e.performance=C.data,e.performanceError=C.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){b===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){o=!1,b!==e.performanceMinutes&&e.loadPerformance()}))};function r(b){if(b==null)return"\u2014";for(var C=["B","KB","MB","GB","TB"],E=0,R=b;R>=1024&&E<C.length-1;)R/=1024,E++;return R.toFixed(E>0?1:0)+" "+C[E]}e.humanBytes=r;function a(b){if(!b)return"\u2014";var C=Math.floor(b/86400),E=Math.floor(b%86400/3600),R=Math.floor(b%3600/60);return C>0?C+"d "+(E<10?"0":"")+E+"h":E>0?E+"h "+(R<10?"0":"")+R+"m":R+"m"}e.humanDuration=a;function c(b){return b==null?"\u2014":b>=1e6?(b/1e6).toFixed(1)+"M":b>=1e3?(b/1e3).toFixed(1)+"K":String(b)}e.humanNum=c,e.queueTotal=function(b){return b?(b.waiting||0)+(b.active||0)+(b.delayed||0)+(b.failed||0):0},e.statusCount=function(b){if(!e.data||!e.data.repos)return 0;for(var C=e.data.repos.statusBreakdown||[],E=0;E<C.length;E++)if(C[E]._id===b)return C[E].count;return 0},e.barPct=function(b){var C=e.data&&e.data.repos?e.data.repos.total:0;if(!C)return 0;var E=[b];b==="expired"&&E.push("expiring"),b==="removed"&&E.push("removing"),b==="preparing"&&E.push("download");var R=0;return E.forEach(function(D){R+=e.statusCount(D)}),Math.max(.4,R/C*100)},e.errPct=function(b){if(!e.data||!e.data.errors)return 0;var C=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[b]/C*100};function h(b){var C=b||[];return C.map(function(E,R){var D=C[R-1]||{},T=Object.assign({},E);return T.dailyRepositories=R?Math.max(0,(E.nbRepositories||0)-(D.nbRepositories||0)):0,T.dailyUsers=R?Math.max(0,(E.nbUsers||0)-(D.nbUsers||0)):0,T.dailyPageViews=R?Math.max(0,(E.nbPageViews||0)-(D.nbPageViews||0)):0,T})}function v(b){var C=b&&b.length?b[b.length-1]:{};return{repositories:C.dailyRepositories||0,users:C.dailyUsers||0,pageViews:C.dailyPageViews||0}}var g={};e.historyBarH=function(b,C){return!b||!g[C]?0:Math.max(1,Math.round(b[C]/g[C]*140))},e.historyLabel=function(b){if(!b||!b.date)return"";var C=new Date(b.date);return C.getUTCMonth()+1+"/"+C.getUTCDate()};function k(){e.loadPerformance(),t.get("/api/admin/overview").then(function(b){b.data.history=h(b.data.history),b.data.daily={today:v(b.data.history)},e.data=b.data,e.loading=!1,e.error=null,g={},(b.data.history||[]).forEach(function(C){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(E){(!g[E]||C[E]>g[E])&&(g[E]=C[E])})})},function(b){e.loading=!1,e.error=b.data&&b.data.error||"Failed to load overview"})}k();var m=i(k,3e4);e.on("dispose",function(){i.cancel(m)})};var dl=[{path:"/connections",template:"partials/connections.htm",title:"GitHub connections \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>el(e,t.http)},{path:"/signin",template:"partials/signin.htm",title:"Sign in \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>tl(e,t.http)} Line truncated
anonymous_github`)])])])])]),f(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),y("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),f(" Privacy & Security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),y("Privacy & Security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained \u2014 this makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[y("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),n("a",{href:"/connections"},"GitHub connections"),y(" page.")]),n("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),f(" Self-Hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),y("Self-Hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{class:"panel-body p-3"},[n("p",null,[y( Line truncated
`+JSON.stringify(t):""}`},[ze.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${op(t)}" via a navigation guard.`},[ze.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ze.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ze.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function fn(e,t){return Ae(new Error,{type:e,[Va]:!0},t)}function Ht(e,t){return e instanceof Error&&Va in e&&(t==null||!!(e.type&t))}var np=["params","query","hash"];function op(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of np)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function qa(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<o.length;++i){let s=o[i].replace(ka," "),r=s.indexOf("="),a=An(r<0?s:s.slice(0,r)),c=r<0?null:An(s.slice(r+1));if(a in t){let f=t[a];kt(f)||(f=t[a]=[f]),f.push(c)}else t[a]=c}return t}function li(e){let t="";for(let o in e){let i=e[o];if(o=Kc(o),i==null){i!==void 0&&(t+=(t.length?"&":"")+o);continue}(kt(i)?i.map(s=>s&&ei(s)):[i&&ei(i)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+o,s!=null&&(t+="="+s))})}return t}function Ma(e){let t={};for(let o in e){let i=e[o];i!==void 0&&(t[o]=kt(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return t}var Ua=Symbol(""),di=Symbol(""),ns=Symbol(""),os=Symbol(""),ss=Symbol("");function Pn(){let e=[];function t(i){return e.push(i),()=>{let s=e.indexOf(i);s>-1&&e.splice(s,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Jt(e,t,o,i,s,r=a=>a()){let a=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((c,f)=>{let g=h=>{h===!1?f(fn(ze.NAVIGATION_ABORTED,{from:o,to:t})):h instanceof Error?f(h):tp(h)?f(fn(ze.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(a&&i.enterCallbacks[s]===a&&typeof h=="function"&&a.push(h),c())},v=r(()=>e.call(i&&i.instances[s],t,o,g)),b=Promise.resolve(v);e.length<3&&(b=b.then(g)),b.catch(h=>f(h))})}function is(e,t,o,i,s=r=>r()){let r=[];for(let a of e)for(let c in a.components){let f=a.components[c];if(!(t!=="beforeRouteEnter"&&!a.instances[c]))if(ba(f)){let g=(f.__vccOpts||f)[t];g&&r.push(Jt(g,o,i,a,c,s))}else{let g=f();r.push(()=>g.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${c}" at "${a.path}"`);let b=Uc(v)?v.default:v;a.mods[c]=v,a.components[c]=b;let h=(b.__vccOpts||b)[t];return h&&Jt(h,o,i,a,c,s)()}))}}return r}function $a(e,t){let o=[],i=[],s=[],r=Math.max(t.matched.length,e.matched.length);for(let a=0;a<r;a++){let c=t.matched[a];c&&(e.matched.find(g=>pn(g,c))?i.push(c):o.push(c));let f=e.matched[a];f&&(t.matched.find(g=>pn(g,f))||s.push(f))}return[o,i,s]}var sp=()=>location.protocol+"//"+location.host;function Qa(e,t){let{pathname:o,search:i,hash:s}=t,r=e.indexOf("#");if(r>-1){let a=s.includes(e.slice(r))?e.slice(r).length:1,c=s.slice(a);return c[0]!=="/"&&(c="/"+c),si(c,"")}return si(o,e)+i+s}function ip(e,t,o,i){let s=[],r=[],a=null,c=({state:h})=>{let C=Qa(e,location),w=o.value,y=t.value,S=0;if(h){if(o.value=C,t.value=h,a&&a===w){a=null;return}S=y?h.position-y.position:0}else i(C);s.forEach(T=>{T(o.value,w,{delta:S,type:es.pop,direction:S?S>0?ts.forward:ts.back:ts.unknown})})};function f(){a=o.value}function g(h){s.push(h);let C=()=>{let w=s.indexOf(h);w>-1&&s.splice(w,1)};return r.push(C),C}function v(){if(document.visibilityState==="hidden"){let{history:h}=window;if(!h.state)return;h.replaceState(Ae({},h.state,{scroll:vo()}),"")}}function b(){for(let h of r)h();r=[],window.removeEventListener("popstate",c),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",v)}return window.addEventListener("popstate",c),window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",v),{pauseListeners:f,listen:g,destroy:b}}function La(e,t,o,i=!1,s=!1){return{back:e,current:t,forward:o,replaced:i,position:window.history.length,scroll:s?vo():null}}function rp(e){let{history:t,location:o}=window,i={value:Qa(e,o)},s={value:t.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(f,g,v){let b=e.indexOf("#"),h=b>-1?(o.host&&document.querySelector("base")?e:e.slice(b))+f:sp()+e+f;try{t[v?"replaceState":"pushState"](g,"",h),s.value=g}catch(C){console.error(C),o[v?"replace":"assign"](h)}}function a(f,g){r(f,Ae({},t.state,La(s.value.back,f,s.value.forward,!0),g,{position:s.value.position}),!0),i.value=f}function c(f,g){let v=Ae({},s.value,t.state,{forward:f,scroll:vo()});r(v.current,v,!0),r(f,Ae({},La(i.value,f,null),{position:v.position+1},g),!1),i.value=f}return{location:i,state:s,push:c,replace:a}}function Ja(e){e=Ta(e);let t=rp(e),o=ip(e,t.state,t.location,t.replace);function i(r,a=!0){a||o.pauseListeners(),history.go(r)}let s=Ae({locatLine truncated
`)),e.options=Object.assign({},e.options,v.options),a.restore()})}c();let f=null;e.saveDefault=g=>{if(g&&g.preventDefault&&g.preventDefault(),e.saving)return;let v=a.checkpoint(),b={terms:e.terms.split(`
`).map(h=>h.trim()).filter(h=>h.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",b).then(()=>{a.accept(v),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",f&&i.cancel(f),f=i(()=>{e.message=null},2500)},h=>{e.saving=!1;let C=h&&h.data&&h.data.error,w="Unable to save your defaults. Please try again.";Promise.all([o("ERRORS."+C),o("ERRORS.unknown_error")]).then(([y,S])=>{e.error=C&&y!==S?y:w},()=>{e.error=w})})},e.deleteAccount=()=>{e.deletingAccount||!e.confirmDeleteAccount||e.deleteUsername!==e.user?.username||(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},dl=function(e,t,o){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{o.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},ul=function(e,t,o,i,s){e.user&&!e.user.status&&o.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&o.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(c){e.feature=c},e.featureHref=function(c){return c.needsUser&&!e.user?"/signin":c.href},e.featureTarget=function(c){return c.needsUser&&!e.user?"_self":c.target||void 0},e.featureKeydown=function(c,f){let g={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[c.key];if(g===void 0)return;c.preventDefault();let v=e.features.length,b=g==="first"?0:g==="last"?v-1:(f+g+v)%v;e.feature=e.features[b].key,s(()=>{let h=i.document.getElementById("feature-tab-"+e.feature);h&&h.focus()})},e.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}];function r(){t.get("/api/stat/").then(c=>{e.stat=c.data,e.cards[0].total=c.data.nbRepositories,e.cards[1].total=c.data.nbUsers,e.cards[2].total=c.data.nbPageViews,e.cards[3].total=c.data.nbPullRequests})}r();function a(c){let f={series:c,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!c||c.length<2)return f;let g=new Array(c.length-1);for(let y=1;y<c.length;y++)g[y-1]=c[y]-c[y-1];let v=g.length,b=Math.max.apply(null,g),h=Math.min.apply(null,g),C=Math.min(0,h),w=b-C||1;f.viewW=v*2,f.bars=new Array(v);for(let y=0;y<v;y++){let S=(g[y]-C)/w,T=Math.max(1.5,S*34);f.bars[y]={x:(y*2+.25).toFixed(2),y:(36-T).toFixed(2),w:"1.5",h:T.toFixed(2)}}if(f.deltaToday=g[v-1],v>=2){let y=g[v-2];y&&(f.pctChange=(f.deltaToday-y)/y*100)}return f.pctAbs=Math.round(Math.abs(f.pctChange)),f.isUp=f.pctChange>=0,f}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(c=>{let f=c.data||[];e.history={repositories:a(f.map(g=>g.nbRepositories||0)),users:a(f.map(g=>g.nbUsers||0)),pageViews:a(f.map(g=>g.nbPageViews||0)),pullRequests:a(f.map(g=>g.nbPullRequests||0))}})},cl=function(e,t,o,i,s,r){let a=ut();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,Ke(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Zt()(document,"click",N=>{e.quotaExpanded&&!N.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e. Line truncated
`)),e.options=Object.assign({},e.options,A.options),e.options.expirationDate=A.options&&A.options.expirationDate?new Date(A.options.expirationDate):z(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),k&&k()})}function G(k,D,A){e.anonymize&&e.anonymize[k]&&e.anonymize[k].setValidity(D,A)}function Q(k){try{let D=parseGithubUrl(k);if(D&&D.owner&&D.repo)return D.owner+"/"+D.repo}catch{}return null}e.accessRepairAllowed=!1,e.repairingGitHubAccess=!1,e.accessRepairMessage="",e.repairGitHubAccess=async()=>{if(!e.accessRepairAllowed||e.repairingGitHubAccess||!e.githubConnections?.appEnabled||!i.repoId||e.role!=="owner"||e.githubConnection!=="github-app"||Q(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let k=h();try{let D=await t.get("/github/connections");if(e.githubConnections=D.data,!D.data.appEnabled)return;let A=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":D.data.csrf}});if(!b(k))return;e.error=null,A.data.fullName&&(e._originalFullName=A.data.fullName,e.source.fullName=A.data.fullName,e.sourceUrl="https://github.com/"+A.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{b(k)&&(e.accessRepairMessage="Unable to repair GitHub access. Check the App's repository permissions in Manage access, then retry. Your published snapshot has not been replaced.")}finally{e.repairingGitHubAccess=!1,C(k)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await le()}catch{}}};function ie(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:Q(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function ue(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function de(){let k=new URLSearchParams(window.location.search).get("billingDraft");if(k){S.restore();try{let A=(await t.get("/api/billing/draft/"+encodeURIComponent(k))).data;if(A.path!==s.path())throw new Error("Wrong task");T=A.values.conference||null;for(let I of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(A.values,I)&&(e[I]=A.values[I]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),O=A.id,M=JSON.stringify(S.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await ue(),s.replace?.(s.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let D;try{D=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!D||D.path!==s.path()||Date.now()-D.savedAt>=30*6e4)return S.restore()?(e.sourceUrl&&await ue(),!0):!1;S.restore();for(let A of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(D.draft,A)&&(e[A]=D.draft[A]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await ue(),sessionStorage.removeItem("github-access-draft"),!0}X(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&a(de,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async k=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(k.data.status),e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.fullName,e._originalFullName=k.data.source.fullName,e.terms=k.data.options.terms.filter(D=>D).join(`
`),e.source=k.data.source,e.role=k.data.role||"owner",e._existingNever=k.data.options.expirationMode==="never",e.coauthors=k.data.coauthors||[],e._originalBranch=k.data.source.branch,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,e.repositoryID=k.data.source.repositoryID,e._originalRepositoryID=k.data.source.repositoryID,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),w=y(parseGithubUrl(e.sourceUrl)),!await de()&&(await Promise.all([le(),Se()]),Ne())},()=>{s.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async k=>{if(e.githubConnection=k.data.connection||"oauth",e.sourceUrl="https://github.com/"+k.data.source.repositoryFullName+"/pull/"+k.data.source.pullRequestId,e.terms=k.data.options.terms.filter(D=>D).join(`
`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),w=y(parseGithubUrl(e.sourceUrl)),!await de())try{await Be()}catch{}},()=>{s.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async k=>{e.sourceUrl="https://gist.github.com/"+k.data.source.gistId,e.terms=k.data.options.terms.filter(D=>D).join(`
`),e.source=k.data.source,e.options=Object.assign({},e.options,k.data.options),e.conference=k.data.conference,e._originalConference=k.data.conference,k.data.options.expirationDate&&(e.options.expirationDate=new Date(k.data.options.expirationDate)),w=y(parseGithubUrl(e.sourceUrl)),!await de()&&await ee()},()=>{s.url("/404")}))}),t.get("/github/connections").then(k=>{e.githubConnections=k.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&k.data.appEnabled&&k.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&ue())}).catch(()=>{}),e.urlSelected=async(k=!1)=>{let D=++f;e.previousConfigurations=[],e.previousConfigurationId="";let A;try{A=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,De.cancel(),H.cancel(),ve.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",G("sourceUrl","github",!1);return}let I=y(A),B=k||w===I;w=I,e.sourceUrlError="",G("sourceUrl","github",!0);let F=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,F&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!B&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],B||(e.source={type:"GitHubStream",branch:"",commit:""}),De.cancel(),H.cancel(),ve.cancel(),Me.clear(),J.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=B;try{A.gistId&&!A.repo?(e.detectedType="gist",e.source={gistId:A.gistId},await ee()):A.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:A.owner+"/"+A.repo,pullRequestId:A.pullRequestId},await Be()):(e.detectedType="repo",Y(),await Promise.all([le(),Se()]),Ne())}catch{}finally{D===f&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let k=e.branches.filter(A=>A.name==e.source.branch)[0];if(!k)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=k.commit),e.readme=k.readme,await Se(),Ne()}),e.getBranches=async k=>{let D=parseGithubUrl(e.sourceUrl),A=h();try{let I=await t.get(`/api/repo/${D.owner}/${D.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&Q(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0||e.reconnectingSource?"1":"0",repositoryID:ie()}});if(!b(A))return;e.branches=I.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let B=e.branches.filter(F=>F.name==e.source.branch);B.length>0&&(!(!e.reconnectingSource&&!k&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=B[0].commit),e.readme=B[0].readme,await Se(k))}catch(I){if(!b(A))return;e.branches=[],e.sourceUnreachable=I&&(I.status===404||I.data&&I.data.error==="repo_not_found");let B=I&&I.data&&I.data.error||(I&&I.status===404?"repo_not_found":"unknown_error");r("ERRORS."+B).then(F=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:F}),e.error=F},console.error),typeof G=="function"&&G("sourceUrl","missing",!1)}finally{C(A)}};async function le(){let k=parseGithubUrl(e.sourceUrl),D=h();try{_();let A=await t.get(`/api/repo/${k.owner}/${k.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&Q(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:ie(),force:"1"}});if(!b(D))return;e.details=A.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(A){if(!b(D))return;throw A.data&&(r("ERRORS."+A.data.error).then(I=>{e.addToast({title:"Error",date:new Date,body:I}),e.error=I},console.error),j(A.data.error)),G("sourceUrl","missing",!1),A}finally{C(D)}}async function Se(k){if(e.readme&&!k)return e.readme;let D=parseGithubUrl(e.sourceUrl),A=h();try{let I=await t.get(`/api/repo/${D.owner}/${D.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&Q(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0?"1":"0",branch:e.source.branch,repositoryID:ie()}});b(A,!0)&&(e.readme=I.data)}catch{b(A,!0)&&(e.readme="")}finally{C(A)}}function Ve(){let k={terms:e.terms?e.terms.split(`
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(k.branchName=e.source.branch);try{let D=parseGithubUrl(e.sourceUrl);k.repoName=`${D.owner}/${D.repo}`}catch{}return k}function $e(k,D,A){let I=null,B=0,F=()=>{if(e.detectedType!==k)return;I&&a.cancel(I);let se=++B;e.previewStatus="loading",I=a(()=>{I=null;let Z=D();if(!Z){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Z).then(re=>{se===B&&(A(re.data,Z),e.previewStatus="ready")}).catch(()=>{se===B&&(e.previewStatus="error")})},200)};return F.cancel=()=>{B++,I&&a.cancel(I),I=null},e.on("dispose",F.cancel),F}e.retryPreview=()=>{e.detectedType==="repo"&&De(),e.detectedType==="pr"&&H(),e.detectedType==="gist"&&ve()};let De=$e("repo",()=>e.readme?{content:e.readme,options:Ve()}:null,k=>{if(typeof k?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=k.content;let D="";try{let I=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main";D=`https://github.com/${I.owner}/${I.repo}/raw/${B}/`}catch{}let A=renderMD(e.anonymize_readme,D);e.html_readme=A,a(Prism.highlightAll,150)});function Ne(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),De())}async function Be(){let k=parseGithubUrl(e.sourceUrl),D=h();try{_();let A=await t.get(`/api/pr/${k.owner}/${k.repo}/${k.pullRequestId}`,{params:{connection:e.githubConnection}});if(!b(D))return;e.details=A.data,e.pullRequestId||(e.pullRequestId=k.repo+"-PR"+k.pullRequestId+"-"+generateRandomId(4))}catch(A){if(!b(D))return;throw A.data&&(r("ERRORS."+A.data.error).then(I=>{e.addToast({title:"Error",date:new Date,body:I}),e.error=I},console.error),j(A.data.error)),G("sourceUrl","missing",!1),A}finally{C(D)}}let Me=Fe(new Map);function ke(){let k=new Set,D=e.details&&e.details.pullRequest;if(!D)return k;typeof D.title=="string"&&k.add(D.title),typeof D.body=="string"&&k.add(D.body),typeof D.diff=="string"&&k.add(D.diff);let A=D.comments||[];for(let I of A)typeof I.author=="string"&&k.add(I.author),typeof I.body=="string"&&k.add(I.body);return k}let H=$e("pr",()=>{let k=ke(),D=Array.from(k);return D.length===0?null:{contents:D,options:Ve()}},(k,D)=>{if(!Array.isArray(k?.contents)||k.contents.length!==D.contents.length||k.contents.some(B=>typeof B!="string"))throw Error("Invalid preview response");let A=D.contents,I=new Map;for(let B=0;B<A.length&&B<k.contents.length;B++)I.set(A[B],k.contents[B]);Me.clear(),I.forEach((B,F)=>Me.set(F,B))});e.anonymizePrContent=function(k){return k&&(Me.has(k)?Me.get(k):"")};async function ee(){let k=parseGithubUrl(e.sourceUrl),D=h();try{_(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let A=await t.get(`/api/gist/source/${k.gistId}`);if(!b(D))return;e.details=A.data,e.gistId||(e.gistId="gist-"+k.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(A){if(!b(D))return;if(A.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,G("sourceUrl","missing",!1);return}if(A.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,G("sourceUrl","missing",!1);return}throw A.data&&(r("ERRORS."+A.data.error).then(I=>{e.addToast({title:"Error",date:new Date,body:I}),e.error=I},console.error),j(A.data.error)),G("sourceUrl","missing",!1),A}finally{C(D)}}let J=Fe(new Map);function ne(){let k=new Set,D=e.details&&e.details.gist;if(!D)return k;typeof D.description=="string"&&k.add(D.description),typeof D.ownerLogin=="string"&&k.add(D.ownerLogin);let A=D.files||[];for(let B of A)typeof B.filename=="string"&&k.add(B.filename),typeof B.content=="string"&&k.add(B.content);let I=D.comments||[];for(let B of I)typeof B.author=="string"&&k.add(B.author),typeof B.body=="string"&&k.add(B.body);return k}let ve=$e("gist",()=>{let k=ne(),D=Array.from(k);return D.length===0?null:{contents:D,options:Ve()}},(k,D)=>{if(!Array.isArray(k?.contents)||k.contents.length!==D.contents.length||k.contents.some(B=>typeof B!="string"))throw Error("Invalid preview response");let A=D.contents,I=new Map;for(let B=0;B<A.length&&B<k.contents.length;B++)I.set(A[B],k.contents[B]);J.clear(),I.forEach((B,F)=>J.set(F,B)),Ce()});e.anonymizeGistContent=function(k){return k&&(J.has(k)?J.get(k):"")},e.previewGistFiles=[];function Ce(){let k=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=k.map(D=>({filename:e.anonymizeGistContent(D.filename),content:e.anonymizeGistContent(D.content),language:D.language}))}e.watch("details.gist.files",Ce,!0),e.watch("terms",Ce);function E(){let k=e.conference;if(e.conference_data=null,!k)return;let D=k===T||e.isUpdate&&k===e._originalConference;k!==T&&(T=null),t.get("/api/conferences/"+k).then(A=>{e.conference===k&&(e.conference_data=A.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!D&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update Line truncated
`).filter(F=>F),connection:e.githubConnection,fullName:`${A.owner}/${A.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(I.options.pageSource=e.details.pageSource),_();let B=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(B,I,{headers:{"Content-Type":"application/json"}}).then(()=>{S.clear(),window.location.href="/status/"+e.repoId},F=>{F.data&&(r("ERRORS."+F.data.error).then(se=>{e.error=se},console.error),j(F.data.error),["quota_exceeded","subscription_required_for_never_expiration"].includes(F.data.error)&&(F.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Ke(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}))))}).finally(()=>{D.disabled=!1})},e.anonymizeGist=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(q())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let D=k.currentTarget||k.target.closest?.("button")||k.target;D.disabled=!0;let A=parseGithubUrl(e.sourceUrl),I={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(F=>F),source:{gistId:A.gistId},options:e.options,conference:e.conference};_();let B=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(B,I,{headers:{"Content-Type":"application/json"}}).then(()=>{S.clear(),window.location.href="/gist/"+e.gistId},F=>{F.data&&(r("ERRORS."+F.data.error).then(se=>{e.error=se},console.error),j(F.data.error))}).finally(()=>{D.disabled=!1})},e.anonymizePullRequest=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(q())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let D=k.currentTarget||k.target.closest?.("button")||k.target;D.disabled=!0;let A=parseGithubUrl(e.sourceUrl),I={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(F=>F),source:{repositoryFullName:`${A.owner}/${A.repo}`,pullRequestId:A.pullRequestId},options:e.options,conference:e.conference};_();let B=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(B,I,{headers:{"Content-Type":"application/json"}}).then(()=>{S.clear(),window.location.href="/pr/"+e.pullRequestId},F=>{F.data&&(r("ERRORS."+F.data.error).then(se=>{e.error=se},console.error),j(F.data.error))}).finally(()=>{D.disabled=!1})},e.watch("conference",()=>{E()}),e.watch("terms",()=>{e.detectedType==="repo"&&Ne(),e.detectedType==="pr"&&H(),e.detectedType==="gist"&&ve()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Ne(),e.detectedType==="pr"&&H(),e.detectedType==="gist"&&ve()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Ne(),e.detectedType==="pr"&&H(),e.detectedType==="gist"&&ve()}),e.watch("details",()=>{e.detectedType==="pr"&&H(),e.detectedType==="gist"&&ve()},!0)},mi=function(e,t,o,i,s,r){let a=ut();window.Prism?.hooks&&!window.Prism.redactionHook&&(window.Prism.hooks.add("complete",V=>ol(V.element)),window.Prism.redactionHook=!0);let c=Zt();e.on("dark-mode",(V,Y)=>{e.aceOption&&(Y?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let f=0,g=!1;e.on("dispose",()=>{g=!0,f++,v&&v.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,c(document,"keydown",function(V){if((V.metaKey||V.ctrlKey)&&V.key==="k"){V.preventDefault();var Y=document.querySelector(".tree-search-input");Y&&(Y.focus(),Y.select())}});var v=null;e.onFileSearchChange=function(){v&&(v.resolve(),v=null);let V=e.fileSearchQuery;if(!V||V.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let Y=r.defer();v=Y,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(V)}`,{timeout:Y.promise}).then(function(X){if(!(g||v!==Y)){v=null,e.fileSearchLoading=!1;var G={};e.files.forEach(function(H){G[(H.path||"")+"/"+H.name]=!0});for(var Q=[],ie={},ue=0;ue<X.data.length;ue++){var de=X.data[ue];if(de.path)for(var le=de.path.split("/"),Se="",Ve=0;Ve<le.length;Ve++){var $e=Se;Se=Se?Se+"/"+le[Ve]:le[Ve];var De=$e+"/"+le[Ve];!G[De]&&!ie[De]&&(ie[De]=!0,Q.push({name:le[Ve],path:$e}))}}Q.sort(function(H,ee){return(H.path||"").split("/").length-(ee.path||"").split("/").length}),Q.length>0&&e.files.push.apply(e.files,Q);for(var Ne=[],Be=0;Be<X.data.length;Be++){var Me=X.data[Be],ke=(Me.path||"")+"/"+Me.name;!G[ke]&&Me.size!=null&&(Ne.push(Me),G[ke]=!0)}Ne.length>0&&e.files.push.apply(e.files,Ne),e.fileSearchResults=X.data}},function(){!g&&v===Y&&(v=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let b={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},h=["license","txt"],C=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],w=["wav","mp3","ogg","wma","flac","aac","m4a"],y=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(V,Y){if(e.repoId!=i.repoId)return N();if((i.path||"")!=e.filePath){e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(X=>X&&X.trim().length>0),x();for(let X=0;X<e.paths.length-1;X++){let G=X>0?e.paths.slice(0,X).join("/"):"";e.files.some(ie=>ie.path===G)||e.getFiles(G)}}});function S(){if(e.paths[0]!="")return;let V=["readme.md","readme.txt","readme.org","readme.1st","readme"],Y={};for(let G of e.files)G.name.toLowerCase().indexOf("readme")>-1&&(Y[G.name.toLowerCase()]=G.name);let X=null;for(let G of V)if(Y[G]){X=G;break}if(!X&&Object.keys(Y).length>0&&(X=Object.keys(Y)[0]),X){let G=o.url();G[G.length-1]!="/"&&(G+="/"),o.url(G+encodePathForUrl(Y[X]))}}e.fileCounts=null,e.getFiles=function(V){let Y=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(V)}&v=${e.options.lastUpdateDate}`).then(function(X){if(g||Y!==e.repoId)return[];let G=V||"";return e.files=e.files.filter(Q=>Q.path!==G),e.files.push(...X.data),X.data},function(X){if(g||Y!==e.repoId)return[];e.type="error",e.content=hi(X),e.files=[]})};function T(){let V=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(Y){g||V!==e.repoId||(e.fileCounts=Y.data)},function(){e.fileCounts={}})}function O(){return e.files.filter(V=>V.name==e.paths[e.paths.length-1]&&V.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var M=null;e.on("dispose",function(){M&&a.interval.cancel(M)});function L(V){if(g)return;let Y=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(X=>{if(!(g||Y!==e.repoId)){if(e.options=X.data,e.options.url){window.location=e.options.url;return}V&&V(X.data)}},X=>{if(!(g||Y!==e.repoId)){var G=X.data||{};if(G.error==="rate_limited"&&G.resetAt){let ie=function(){var ue=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(ue<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,M&&(a.interval.cancel(M),M=null),L(V);else{var de=Math.floor(ue/60),le=ue%60;e.rateLimitCountdown=de>0?de+"m "+le+"s":le+"s"}};var Q= Line truncated
`+y.join(`
`)],{type:"text/csv"}),T=document.createElement("a");T.href=URL.createObjectURL(S),T.download=i.username+"-repositories.csv",T.click()},e.showStatusMessage=h=>{let C=h.statusMessage||"(no message)";window.prompt(`Status message for ${h.repoId} (${h.status}):`,C)},e.fetchGithubInfo=h=>{let C=window.open("","_blank");C&&C.document.write("<pre>Loading GitHub info for "+h.repoId+"...</pre>"),t.get("/api/admin/repos/"+h.repoId+"/github").then(w=>{C&&(C.document.open(),C.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(w.data,null,2).replace(/[<>]/g,y=>y==="<"?"&lt;":"&gt;")+"</pre>"),C.document.close())},w=>{let y=w&&w.data?JSON.stringify(w.data,null,2):String(w);C&&(C.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+y+"</pre>")})};function f(h){t.get("/api/admin/users/"+h+"/repos",{}).then(C=>{e.repositories=C.data},C=>{console.error(C)})}function g(h){t.get("/api/admin/users/"+h,{}).then(C=>{e.userInfo=C.data},C=>{console.error(C)})}g(i.username),f(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>g(i.username),h=>console.error(h))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>g(i.username),h=>console.error(h))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>g(i.username),h=>console.error(h))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>g(i.username),h=>console.error(h))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function v(){t.get("/api/admin/tokens").then(h=>{e.tokens=h.data||[]},h=>{h.status!==401&&h.status!==403&&console.error(h)})}v(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(h=>{e.tokenForm.plaintext=h.data.token,e.tokenForm.name="",v()},h=>console.error(h))},e.revokeToken=h=>{confirm(`Revoke token "${h.name}"?`)&&t.delete("/api/admin/tokens/"+h.id).then(()=>v(),C=>console.error(C))},e.removeCache=h=>{confirm("Remove cached files for "+h.repoId+"?")&&t.delete("/api/admin/repos/"+h.repoId).then(()=>f(i.username),C=>console.error(C))},e.removeRepository=h=>{confirm("Remove repository "+h.repoId+"?")&&t.delete("/api/repo/"+h.repoId+"/").then(()=>f(i.username),C=>console.error(C))},e.updateRepository=h=>{let C=Fe({title:`Refreshing ${h.repoId}...`,date:new Date,body:`The repository ${h.repoId} is going to be refreshed.`});e.toasts.push(C),t.post(`/api/repo/${h.repoId}/refresh`).then(w=>{w.data.status=="ready"?C.title=`${h.repoId} is refreshed.`:C.title=`Refreshing of ${h.repoId}.`},w=>{C.title=`Error during the refresh of ${h.repoId}.`,C.body=w.body})},e.getGitHubRepositories=h=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(C=>{e.userInfo.repositories=C.data})};let b=null;e.watch("query",()=>{s.timeout.cancel(b),b=s.timeout(()=>{f(i.username)},500)},!0)},El=function(e,t,o){let i=ut(),s=Zt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=w=>{if(w.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){w.preventDefault();let y=document.querySelector('.admin-filter-toolbar input[type="search"]');y&&y.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=w=>{w==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[w]="",e.query.page=1},e.chips=[];let a=()=>{let w=[];(e.query.dateFrom||e.query.dateTo)&&w.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=w};e.statusCountFor=w=>{let y=(e.statusCounts||[]).find(S=>S._id===w);return y?y.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=w=>{e.query.sort===w?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=w,e.query.direction="desc"),e.query.page=1},e.sortIcon=w=>e.query.sort===w?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let c="admin.conferences.filterPrefs",f={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},g=loadFilterPrefs(c)||{};e.query=Object.assign({},f,g,{page:1,search:""});let v=o.search();v.search&&(e.query.search=v.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let w=window.prompt("Preset name:");if(!w)return;let y=Object.assign({},e.query);delete y.page,e.presets=(e.presets||[]).filter(S=>S.name!==w),e.presets.push({name:w,query:y}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=w=>{Object.assign(e.query,w.query,{page:1})},e.deletePreset=w=>{e.presets=(e.presets||[]).filter(y=>y.name!==w.name),localStorage.setItem(b,JS Line truncated
`).map((ue,de)=>de===0?ue:ie+ue).join(`
`)}else typeof N=="number"||typeof N=="boolean"?Q=String(N):Q=JSON.stringify(N);oe.push(`${X}${Q}${G}`)}),oe.push("}"),oe.join(`
`)}function g(T){let O=[],M="",L=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,U=0,z;for(;z=L.exec(T);)M+=T.slice(U,z.index),U=L.lastIndex,O.push({key:z[1],op:z[2]||"=",val:z[3]});return M+=T.slice(U),{filters:O,free:M.trim().toLowerCase()}}function v(T,O){for(let M of O.filters){let L=(z,oe,x)=>{let N=parseFloat(z),V=parseFloat(oe);return x==="="?String(z)===String(oe):x==="!="?String(z)!==String(oe):x===">="?N>=V:x==="<="?N<=V:x===">"?N>V:x==="<"?N<V:!0},U;if(M.key==="code")U=T.displayMessage;else if(M.key==="module")U=T.module;else if(M.key==="status")U=T._status;else if(M.key==="url")U=T._url;else if(M.key==="repo")U=T._repoId;else if(M.key==="level")U=T.level;else continue;if(U==null||!L(U,M.val,M.op))return!1}return!(O.free&&((T.displayMessage||"")+" "+(T.module||"")+" "+(T._url||"")+" "+JSON.stringify(T.raw||[])).toLowerCase().indexOf(O.free)===-1)}function b(){let T=g(e.query.search||"");e.parsedFilterCount=T.filters.length;let O=e.query.bucket,M=e.entries.filter(U=>O&&U._bucket!==O?!1:v(U,T)),L=e.query.group;if(L){let U=x=>L==="module"?x.module:x.displayMessage||x.message||"_",z=new Map;for(let x of M){let N=U(x);if(z.has(N)){let V=z.get(N);V.count++,V._related.push(x),new Date(x.ts)>new Date(V.ts)&&(V.ts=x.ts,V._url=x._url,V._status=x._status),new Date(x.ts)<new Date(V._firstSeen)&&(V._firstSeen=x.ts)}else{let V=Object.assign({},x);V._key=`${L}:${N}`,V._related=[x],V._firstSeen=x.ts,V._lastHourCount=0,V.count=1,z.set(N,V)}}let oe=Date.now()-3600*1e3;for(let x of z.values())x._lastHourCount=x._related.filter(N=>new Date(N.ts).getTime()>=oe).length;M=Array.from(z.values())}else M=M.map((U,z)=>(U._key="row:"+z+":"+U.ts,U._related=[U],U._firstSeen=U.ts,U._lastHourCount=0,U.count=1,U));e.query.sort==="count"?M.sort((U,z)=>z.count-U.count||new Date(z.ts)-new Date(U.ts)):M.sort((U,z)=>new Date(z.ts)-new Date(U.ts)),e.visible=M}function h(T){let O=T?e.entries.length:0,M=T?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:O,limit:M}}).then(L=>{let U=(L.data.entries||[]).map(c);e.entries=T?e.entries.concat(U):U,e.available=!!L.data.available,e.cap=L.data.max||e.cap,e.total=L.data.total||e.entries.length,b()},L=>console.error(L))}e.loadMore=()=>h(!0),e.canLoadMore=()=>e.entries.length<e.total;function C(){t.get("/api/admin/errors/stats").then(T=>{let O=T.data||{},M=O.prev24h?Math.round((O.last24h-O.prev24h)/O.prev24h*100):0;e.stats={last24h:O.last24h||0,prev24h:O.prev24h||0,delta:M,severity:O.severity||{error:0,warn:0,info:0},unique:O.unique||{error:0,warn:0,info:0},buckets:O.buckets||[],dropped:O.dropped||0}},T=>console.error(T))}function w(){h(),C()}e.barPx=(T,O)=>{let M=e.stats.buckets||[],L=0;for(let x of M)L=Math.max(L,(x.error||0)+(x.warn||0)+(x.info||0));if(!L)return 0;let U=(T.error||0)+(T.warn||0)+(T.info||0);if(!U)return 0;let z=Math.round(U/L*60),oe=T[O]||0;return Math.round(oe/U*z)},e.bucketTitle=T=>`${new Date(T.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${T.error||0} err \xB7 ${T.warn||0} warn \xB7 ${T.info||0} info`,e.toggle=T=>{e.expanded[T._key]=!e.expanded[T._key]},e.setBucket=T=>{e.query.bucket=T},e.refreshNow=w,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(w,T=>console.error(T))},e.exportCsv=()=>{let T=["ts","level","module","displayMessage","_status","_url","_repoId"],O=[T.join(",")];for(let z of e.visible)O.push(T.map(oe=>{let x=z[oe]==null?"":String(z[oe]);return/[",\n]/.test(x)?`"${x.replace(/"/g,'""')}"`:x}).join(","));let M=new Blob([O.join(`
`)],{type:"text/csv;charset=utf-8"}),L=URL.createObjectURL(M),U=document.createElement("a");U.href=L,U.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(U),U.click(),document.body.removeChild(U),URL.revokeObjectURL(L)};function y(T){e.copyHint=`${T} copied`,s.timeout(()=>{e.copyHint=""},1500)}e.copyJson=T=>{navigator.clipboard.writeText(T._detailJson).then(()=>y("JSON"))},e.copyCurl=T=>{if(!T._url)return;let M=`curl -X ${T._method||"GET"} '${window.location.origin}${T._url}'`;navigator.clipboard.writeText(M).then(()=>y("curl"))},w();let S=i(()=>{e.query.autoRefresh&&w()},15e3);e.on("dispose",()=>i.cancel(S)),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},Sl=function(e,t,o,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.performanceError=null,e.formatMs=function(w){return w==null?"":w<1e3?w+" ms":+(w/1e3).toFixed(1)+" s"},e.latencyBound=function(w,y){return w.count?w[y]==null?"> 60 s":"\u2264 "+e.formatMs(w[y]):"No samples"},e.firstByteBound=function(w){return e.latencyBound({count:w.firstByteCount,p95UpperMs:w.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(w){return Math.max(0,Math.round((Date.now()-w.sampledAt)/1e3))},e.peakRss=function(w){return(e.performance.runtimeSeries||[]).filter(function(y){return y.instance===w.instance}).reduce(function(y,S){return Math.max(y,S.rss)},w.memory.rss)},e.performanceWarning=function(w){return e.sampleAge(w)>45||w.droppedBatches||w.droppedMetrics||w.sockets?.closeWait>0||w.eventLoop.p95Ms>100||w.memoryLimitBytes&&w.memory.rss>w.memoryLimitBytes*.8};var s=!1;e.loadPerformance=function(){var w=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==w&&(e.performance=null),!s&&(s=!0,t.get("/api/admin/performance",{params:{minutes:w}}).then(function(y){w===e.performanceMinutes&&(e.performance=y.data,e.performanceError=y.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){w===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){s=!1,w!==e.performanceMinutes&&e.loadPerformance()}))};function r(w){if(w==null)return"\u2014";for(var y=["B","KB","MB","GB","TB"],S=0,T=w;T>=1024&&S<y.length-1;)T/=1024,S++;return T.toFixed(S>0?1:0)+" "+y[S]}e.humanBytes=r;function a(w){if(!w)return"\u2014";var y=Math.floor(w/86400),S=Math.floor(w%86400/3600),T=Math.floor(w%3600/60);return y>0?y+"d "+(S<10?"0":"")+S+"h":S>0?S+"h "+(T<10?"0":"")+T+"m":T+"m"}e.humanDuration=a;function c(w){return w==null?"\u2014":w>=1e6?(w/1e6).toFixed(1)+"M":w>=1e3?(w/1e3).toFixed(1)+"K":String(w)}e.humanNum=c,e.queueTotal=function(w){return w?(w.waiting||0)+(w.active||0)+(w.delayed||0)+(w.failed||0):0},e.statusCount=function(w){if(!e.data||!e.data.repos)return 0;for(var y=e.data.repos.statusBreakdown||[],S=0;S<y.length;S++)if(y[S]._id===w)return y[S].count;return 0},e.barPct=function(w){var y=e.data&&e.data.repos?e.data.repos.total:0;if(!y)return 0;var S=[w];w==="expired"&&S.push("expiring"),w==="removed"&&S.push("removing"),w==="preparing"&&S.push("download");var T=0;return S.forEach(function(O){T+=e.statusCount(O)}),Math.max(.4,T/y*100)},e.errPct=function(w){if(!e.data||!e.data.errors)return 0;var y=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[w]/y*100};function f(w){var y=w||[];return y.map(function(S,T){var O=y[T-1]||{},M=Object.assign({},S);return M.dailyRepositories=T?Math.max(0,(S.nbRepositories||0)-(O.nbRepositories||0)):0,M.dailyUsers=T?Math.max(0,(S.nbUsers||0)-(O.nbUsers||0)):0,M.dailyPageViews=T?Math.max(0,(S.nbPageViews||0)-(O.nbPageViews||0)):0,M})}function g(w){var y=w&&w.length?w[w.length-1]:{};return{repositories:y.dailyRepositories||0,users:y.dailyUsers||0,pageViews:y.dailyPageViews||0}}var v={},b={};e.historyBarH=function(w,y){return!w||!v[y]?0:Math.max(1,Math.round(w[y]/v[y]*140))},e.historyRangeH=function(w,y){if(!w||v[y]==null)return 0;var S=v[y]-b[y];return S?Math.round(8+(w[y]-b[y])/S*132):70},e.historyRange=function(w){return{min:b[w],max:v[w]}},e.historyLabel=function(w){if(!w||!w.date)return"";var y=new Date(w.date);return y.getUTCMonth()+1+"/"+y.getUTCDate()};function h(){e.loadPerformance(),t.get("/api/admin/overview").then(function(w){w.data.history=f(w.data.history),w.data.daily={today:g(w.data.history)},e.data=w.data,e.loading=!1,e.error=null,v={},b={},(w.data.history||[]).forEach(function(y){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(S){(!v[S]||y[S]>v[S])&&(v[S]=y[S]),(b[S]==null||y[S]<b[S])&&(b[S]=y[S])})})},function(w){e.loading=!1,e.error=w.data&&w.data.error||"Failed to load overview"})}h();var C=i(h,3e4);e.on("dispose",function(){i.can Line truncated
anonymous_github`)])])])])]),p(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),m("Limitations ")]),n("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),n("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[n("div",{class:"panel-body p-3"},[n("ul",null,[n("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),n("li",null," Files larger than 8 MB are not supported. "),n("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),n("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),p(" Privacy & Security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),m("Privacy & Security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained \u2014 this makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),n("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[n("div",{class:"panel-body p-3"},[n("p",null,[m("The GitHub App has read-only access to the repositories you choose. You can change repository access on your "),n("a",{href:"/connections"},"GitHub connections"),m(" page.")]),n("p",null,"Legacy GitHub OAuth includes write access to private repositories because GitHub's OAuth scopes do not offer a read-only option for them. Existing OAuth anonymizations and gists can still use this connection."),n("p",null,"Anonymous GitHub reads repository content. It never pushes, modifies, or deletes files on GitHub.")])])]),n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),n("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[n("div",{class:"panel-body p-3"},[n("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),p(" Self-Hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),m("Self-Hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{class:"panel-body p-3"},[n("p",null,[m( Line truncated
anonymized repository often think it is about the paper, so the
label names the service and the tooltip says who to contact. `),t[13]||(t[13]=n("li",{class:"nav-item d-none d-lg-block"},[n("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),y("Report a bug ")])],-1)),e.isDarkMode?f("v-if",!0):(l(),d("li",SI,[n("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=ce(s=>{e.darkMode(!0)},["prevent"]))},[...t[8]||(t[8]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",NI,[n("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=ce(s=>{e.darkMode(!1)},["prevent"]))},[...t[9]||(t[9]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):f("v-if",!0),e.user?f("v-if",!0):(l(),d("li",DI,[...t[10]||(t[10]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(l(),d("li",RI,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[2]||(t[2]=ce(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):f("v-if",!0),e.user?(l(),d("li",TI,[n("a",AI,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,OI)):f("v-if",!0),n("span",PI,u(e.user?.username),1)]),n("div",II,[n("h6",VI,"Signed in as @"+u(e.user?.username),1),t[11]||(t[11]=pe('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a><a class="dropdown-item" href="https://ko-fi.com/tdurieux" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-heart"></use></svg><span>Support the project</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-logout"></use></svg><span>Sign out</span></a>',9))])])):f("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,qI)):f("v-if",!0)],64)}var MI={class:"paper-landing"},$I={class:"paper-hero"},LI={class:"paper-hero-copy"},UI={class:"paper-cta-row"},FI={key:0,href:"/signin",target:"_self",class:"btn-hero"},BI={key:1,href:"/anonymize",class:"btn-hero"},zI={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},HI={class:"paper-stats-grid"},jI={class:"paper-stat-value"},GI={class:"paper-stat-label"},WI=["viewBox"],KI=["x","y","width","height"],YI={key:1,class:"paper-stat-delta"},QI={class:"paper-features paper-wrap","aria-label":"Product features"},JI={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},XI=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],ZI={class:"paper-eyebrow"},xI={class:"paper-feature-title"},e4={class:"paper-feature-more"},t4={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},n4=["href","target"],o4={class:"paper-features-stage"},s4=["id","aria-labelledby"],i4={class:"paper-frame"},r4={class:"paper-frame-bar","aria-hidden":"true"},a4={class:"url"},l4=["src","alt"],d4={class:"paper-footer"},u4={class:"paper-footer-inner"},c4={class:"paper-footer-col"},p4={key:0,href:"/dashboard"},f4={key:1,href:"/conferences"},h4={class:"paper-footer-foot"};function Al(e,t){return l(),d("div",MI,[f(" Hero: copy on the left, the product on the right "),n("section",$I,[n("div",LI,[t[2]||(t[ Line truncated
label names the service and the tooltip says who to contact. `),t[18]||(t[18]=n("li",{class:"nav-item d-none d-lg-block"},[n("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[n("svg",{class:"ui-icon d-lg-none mr-1","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),m("Report a bug ")])],-1)),e.isDarkMode?p("v-if",!0):(l(),d("li",D3,[n("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=ae(o=>{e.darkMode(!0)},["prevent"]))},[...t[14]||(t[14]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",T3,[n("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=ae(o=>{e.darkMode(!1)},["prevent"]))},[...t[15]||(t[15]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),!e.user&&!e.isReviewerRoute?(l(),d("li",A3,[...t[16]||(t[16]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),m(" Sign in ")],-1)])])):p("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(l(),d("li",O3,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[2]||(t[2]=ae(o=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):p("v-if",!0),e.user?(l(),d("li",P3,[n("a",I3,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,V3)):p("v-if",!0),n("span",q3,u(e.user?.username),1)]),n("div",M3,[n("h6",U3,"Signed in as @"+u(e.user?.username),1),t[17]||(t[17]=fe('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a><a class="dropdown-item" href="https://ko-fi.com/tdurieux" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-heart"></use></svg><span>Support the project</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-logout"></use></svg><span>Sign out</span></a>',9))])])):p("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,$3)):p("v-if",!0),e.emailPromptOpen?(l(),d("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[7]||(t[7]=ae(o=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[6]||(t[6]=ae(o=>e.respondToEmailPrompt("save"),["prevent"]))},[t[20]||(t[20]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[21]||(t[21]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[22]||(t[22]=n("label",{for:"email-prompt-address"},"Email address",-1)),R(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[3]||(t[3]=o=>e.emailPromptAddress=o),disabled:e.emailPromptBusy},null,8,L3),[[wt,e.emailPromptAddress]]),e.emailPromptError?(l(),d("p",F3,u(e.emailPromptError),1)):p("v-if",!0),n("div",B3,[n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[4]||(t[4]=o=>e.respondToEmailPrompt("later"))},"Remind me later",8,H3),n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[5]||(t[5]=o=>e.respondToEmailPrompt("never"))},"Never",8,z3),n("button",{type:"submit",class:"btn btn-ink",disabled:e.emailPromptBusy},u(e.emailPromptBusy?"Saving\u2026":"Save"),9,j3)]) Line truncated
MIT CSAIL
jane.smith@example.org`},nq={class:"settings-syntax"},oq={class:"invalid-feedback"},sq={class:"settings-row"},iq={class:"settings-checks"},rq={class:"settings-check"},aq={class:"form-check-input",type:"checkbox",id:"link",name:"link"},lq={class:"settings-check"},dq={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},uq={class:"settings-check"},cq={class:"form-check-input",type:"checkbox",id:"image",name:"image"},pq={class:"settings-check"},fq={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},hq={class:"settings-check"},mq={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},vq={class:"settings-check"},gq={class:"form-check-input",type:"checkbox",id:"page",name:"page"},yq={class:"settings-row"},bq={class:"settings-check"},wq={class:"form-check-input",type:"checkbox",id:"update",name:"update"},kq={class:"settings-row"},Eq={class:"form-control",id:"expiration",name:"expiration"},Cq={class:"settings-help"},_q={class:"settings-save"},Sq={class:"settings-save-status draft-status",role:"status"},Nq={key:0},Dq={key:1},Rq={key:2},Tq=["disabled"],Aq={key:1,class:"settings-save-error",role:"alert"},Oq=["aria-busy"],Pq={key:0,role:"status"},Iq={key:1,class:"settings-notice",role:"alert"},Vq=["disabled"],qq={key:2,class:"settings-notice",role:"status"},Mq={key:3,class:"settings-notice",role:"status"},$q=["disabled"],Lq={class:"settings-row"},Uq={class:"settings-inline"},Fq={key:0,class:"settings-help"},Bq={key:0,class:"settings-help"},zq={id:"settings-quota"},Hq={key:1,role:"status"},jq={key:1,class:"settings-notice"},Gq={key:2,class:"settings-notice"},Wq={key:3,class:"settings-notice"},Kq={key:4,class:"settings-help"},Yq={key:5,class:"settings-plan billing-plan"},Qq={class:"settings-comparison"},Jq={class:"settings-cycles"},Xq=["checked","onChange"],Zq={class:"settings-help"},xq={class:"settings-actions"},e8=["disabled"],t8={key:6,class:"settings-help"},n8={class:"settings-row"},o8={key:0,class:"settings-inline"},s8=["disabled"],i8={key:1,class:"settings-help"},r8=["disabled"],a8={key:4,class:"settings-row"},l8={class:"settings-inline"},d8=["disabled"],u8={key:0,class:"settings-pass"},c8={class:"settings-help"},p8=["disabled"],f8={key:5,class:"settings-row"},h8={class:"settings-help"},m8={id:"settings-account",class:"settings-account-panel"},v8={class:"paper-account-card"},g8=["src"],y8={class:"paper-account-identity"},b8={class:"paper-account-name"},w8={class:"paper-danger-zone"},k8={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},E8=["textContent"],C8=["disabled"],_8={key:1,class:"settings-delete-confirm"},S8={for:"delete-username"},N8={class:"settings-actions"},D8=["disabled"],R8=["disabled"];function ql(e,t){let s=We("quota-usage"),i=ye("field"),o=ye("form");return l(),d("div",Q5,[n("header",J5,[t[16]||(t[16]=n("h1",null,"Settings",-1)),n("div",X5,[n("span",null,"@"+u(e.user?.username),1)])]),n("nav",Z5,[(l(),d(G,null,ee([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:a=>e.settingsTab=r.id},u(r.label),9,x5)),64))]),N(n("div",null,[t[37]||(t[37]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),N((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[1]||(t[1]=ce(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",eq,[t[22]||(t[22]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[N(n("textarea",tq,null,512),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",nq,[t[21]||(t[21]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[17]||(t[17]=y("Matches become ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[18]||(t[18]=y(". Use ",-1)),t[19]||(t[19]=n("code",null,"term=>replacement",-1)),t[20]||(t[20]=y(" for a custom replacement. Regex is supported.",-1))])]),N(n("div",oq,"Terms are in an invalid format.",512),[[j,e.defaultsForm?.terms?.errors?.format]])])]),n("section",sq,[t[31]||(t[31]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",iq,[n("label",rq,[N(n("input",aq,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[23]||(t[23]=y("Keep links",-1))]),n("label",lq,[N(n("input",dq,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[24]||(t[24]=y("Render notebooks",-1))]),n("label",uq,[N(n("input",cq,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[25]||(t[25]=y("Show images",-1))]),n("label",pq,[N(n("input",fq,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r Line truncated
`);for(let k=0;k<g.length;k++){let m=g[k];if(m.startsWith("diff --git")){v(),h();continue}if(m.startsWith("--- ")){r&&r.lines.length&&v(),h().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){h().newPath=m.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(m.startsWith("index ")||m.startsWith("similarity index")||m.startsWith("rename ")||m.startsWith("new file mode")||m.startsWith("deleted file mode")||m.startsWith("Binary files"))){if(m.startsWith("@@")){let b=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);b&&(a=parseInt(b[1],10),c=parseInt(b[2],10)),h().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}r&&(m.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:c,text:m.slice(1)}),c++):m.startsWith("-")?(r.lines.push({kind:"remove",oldNo:a,newNo:"",text:m.slice(1)}),a++):(r.lines.push({kind:"ctx",oldNo:a,newNo:c,text:m.startsWith(" ")?m.slice(1):m}),a++,c++))}}return s(o,r),o.join("")}})({trustAsHtml:e=>e});function QM(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function JM(e){return String(e??"").toUpperCase()}function XM(e,t,s=0){return(e||[]).slice(s,s+t)}function ZM(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function xM(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,o)=>{for(let r of s){let a=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let c=r.split(".").reduce((v,g)=>v?.[g],i),h=r.split(".").reduce((v,g)=>v?.[g],o);if(typeof c=="string"&&(c=c.toLowerCase()),typeof h=="string"&&(h=h.toLowerCase()),c!==h)return(c==null?-1:h==null?1:c<h?-1:1)*a}return 0})}function e6(e,t){if(!e)return"";let s=new Date(e);if(isNaN(s))return String(e);if(!t||t==="mediumDate")return s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:s.getFullYear(),MMM:s.toLocaleDateString(void 0,{month:"short"}),MM:String(s.getMonth()+1).padStart(2,"0"),dd:String(s.getDate()).padStart(2,"0"),d:s.getDate(),HH:String(s.getHours()).padStart(2,"0"),mm:String(s.getMinutes()).padStart(2,"0"),ss:String(s.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,o=>i[o])}function t6(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var Hl={ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",invalid_sort:"The selected sort order is invalid.",invalid_cursor:"This project page is no longer valid. Reload the list.",repository_changed:"The repository changed while processing. Please retry.",repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name Line truncated
jane.smith@example.org`},v8={class:"settings-syntax"},g8={class:"invalid-feedback"},y8={class:"settings-row"},b8={class:"settings-checks"},w8={class:"settings-check"},k8={class:"form-check-input",type:"checkbox",id:"link",name:"link"},E8={class:"settings-check"},C8={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},_8={class:"settings-check"},S8={class:"form-check-input",type:"checkbox",id:"image",name:"image"},N8={class:"settings-check"},R8={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},D8={class:"settings-check"},T8={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},A8={class:"settings-check"},O8={class:"form-check-input",type:"checkbox",id:"page",name:"page"},P8={class:"settings-row"},I8={class:"settings-check"},V8={class:"form-check-input",type:"checkbox",id:"update",name:"update"},q8={class:"settings-row"},M8={class:"form-control",id:"expiration",name:"expiration"},U8={class:"settings-help"},$8={class:"settings-save"},L8={class:"settings-save-status draft-status",role:"status"},F8={key:0},B8={key:1},H8={key:2},z8=["disabled"],j8={key:1,class:"settings-save-error",role:"alert"},G8=["aria-busy"],W8={key:0,role:"status"},K8={key:1,class:"settings-notice",role:"alert"},Y8=["disabled"],Q8={key:2,class:"settings-notice",role:"status"},J8={key:3,class:"settings-notice",role:"status"},X8=["disabled"],Z8={class:"settings-row"},x8={class:"settings-inline"},eM={key:0,class:"settings-help"},tM={key:0,class:"settings-help"},nM={id:"settings-quota"},oM={key:1,role:"status"},sM={key:1,class:"settings-notice"},iM={key:2,class:"settings-notice"},rM={key:3,class:"settings-notice"},aM={key:4,class:"settings-help"},lM={key:5,class:"settings-plan billing-plan"},dM={class:"settings-comparison"},uM={class:"settings-cycles"},cM=["checked","onChange"],pM={class:"settings-help"},fM={class:"settings-actions"},hM=["disabled"],mM={key:6,class:"settings-help"},vM={class:"settings-row"},gM={key:0,class:"settings-inline"},yM=["disabled"],bM={key:1,class:"settings-help"},wM=["disabled"],kM={key:4,class:"settings-row"},EM={class:"settings-inline"},CM=["disabled"],_M={key:0,class:"settings-pass"},SM={class:"settings-help"},NM=["disabled"],RM={key:5,class:"settings-row"},DM={class:"settings-help"},TM={id:"settings-account",class:"settings-account-panel"},AM={class:"paper-account-card"},OM=["src"],PM={class:"paper-account-identity"},IM={class:"paper-account-name"},VM=["disabled"],qM={key:0,role:"status"},MM={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},UM=["disabled"],$M={key:3,role:"status"},LM={class:"paper-danger-zone"},FM={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},BM=["textContent"],HM=["disabled"],zM={key:1,class:"settings-delete-confirm"},jM={for:"delete-username"},GM={class:"settings-actions"},WM=["disabled"],KM=["disabled"];function xl(e,t){let o=Ge("quota-usage"),i=ge("field"),s=ge("form");return l(),d("div",d8,[n("header",u8,[t[20]||(t[20]=n("h1",null,"Settings",-1)),n("div",c8,[n("span",null,"@"+u(e.user?.username),1)])]),n("nav",p8,[(l(),d(K,null,te([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:a=>e.settingsTab=r.id},u(r.label),9,f8)),64))]),R(n("div",null,[t[41]||(t[41]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),R((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[1]||(t[1]=ae(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",h8,[t[26]||(t[26]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[R(n("textarea",m8,null,512),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",v8,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=m("Matches become ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=m(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=m(" for a custom replacement. Regex is supported.",-1))])]),R(n("div",g8,"Terms are in an invalid format.",512),[[W,e.defaultsForm?.terms?.errors?.format]])])]),n("section",y8,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",b8,[n("label",w8,[R(n("input",k8,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=m("Keep links",-1))]),n("label",E8,[R(n("input",C8,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=m("Render notebooks",-1))]),n("label",_8,[R(n("input",S8,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image Line truncated
`);for(let b=0;b<v.length;b++){let h=v[b];if(h.startsWith("diff --git")){g(),f();continue}if(h.startsWith("--- ")){r&&r.lines.length&&g(),f().oldPath=h.replace(/^--- (a\/)?/,"").trim();continue}if(h.startsWith("+++ ")){f().newPath=h.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(h.startsWith("index ")||h.startsWith("similarity index")||h.startsWith("rename ")||h.startsWith("new file mode")||h.startsWith("deleted file mode")||h.startsWith("Binary files"))){if(h.startsWith("@@")){let C=h.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);C&&(a=parseInt(C[1],10),c=parseInt(C[2],10)),f().lines.push({kind:"hunk",oldNo:"",newNo:"",text:h});continue}r&&(h.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:c,text:h.slice(1)}),c++):h.startsWith("-")?(r.lines.push({kind:"remove",oldNo:a,newNo:"",text:h.slice(1)}),a++):(r.lines.push({kind:"ctx",oldNo:a,newNo:c,text:h.startsWith(" ")?h.slice(1):h}),a++,c++))}}return o(s,r),s.join("")}})({trustAsHtml:e=>e});function hU(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function mU(e){return String(e??"").toUpperCase()}function vU(e,t,o=0){return(e||[]).slice(o,o+t)}function gU(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function yU(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((i,s)=>{for(let r of o){let a=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let c=r.split(".").reduce((g,v)=>g?.[v],i),f=r.split(".").reduce((g,v)=>g?.[v],s);if(typeof c=="string"&&(c=c.toLowerCase()),typeof f=="string"&&(f=f.toLowerCase()),c!==f)return(c==null?-1:f==null?1:c<f?-1:1)*a}return 0})}function bU(e,t){if(!e)return"";let o=new Date(e);if(isNaN(o))return String(e);if(!t||t==="mediumDate")return o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:o.getFullYear(),MMM:o.toLocaleDateString(void 0,{month:"short"}),MM:String(o.getMonth()+1).padStart(2,"0"),dd:String(o.getDate()).padStart(2,"0"),d:o.getDate(),HH:String(o.getHours()).padStart(2,"0"),mm:String(o.getMinutes()).padStart(2,"0"),ss:String(o.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,s=>i[s])}function wU(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var ad={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=et(null);return Lt(()=>{let i=[t.value][0];i.classList.add("html-doc");function s(){i.innerHTML="";let r=e.content;if(typeof r!="string")return;let a=document.createElement("iframe");a.className="html-doc-frame",a.setAttribute("title","Rendered HTML document");let c=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&c.push("allow-scripts","allow-forms","allow-modals"),a.setAttribute("sandbox",c.join(" ")),a.setAttribute("referrerpolicy","no-referrer"),i.appendChild(a);let f="";e.baseUrl&&(f='<base href="'+e.baseUrl.replace(/&/g,"&amp;").replace(/"/g,"&quot;")+'">'),a.srcdoc=f+r}He(()=>e.content,s,{immediate:!0}),He(()=>e.baseUrl,s,{immediate:!0}),He(()=>e.allowScripts,s,{immediate:!0})}),()=>be("html-doc",{ref:t})}};var ld={name:"pdfviewer",props:["src"],setup(e){let t=et(null);return Lt(()=>{let o=[t.value],i=400,s=[.5,.75,1,1.25,1.5,2,3],r=1e3,a=o[0];a.classList.add("pdf-viewer");let c=null,f=[],g=!1,v=null,b=1,h=1,C=0,w=0,y=612/792,S=0,T=null,O=new Map,M=0;function L(E){let _=O.get(E);_&&(_.cancelled=!0,_.task?.cancel?.(),O.delete(E));let q=E.querySelector("canvas");q&&(q.width=0,q.height=0),E.innerHTML="",delete E.dataset.state}let U=document.createElement("div");U.className="pdf-toolbar";let z=document.createElement("div");z.className="pdf-pages",z.tabIndex=0,z.setAttribute("aria-label","PDF pages"),a.appendChild(U),a.appendChild(z);function oe(E,_,q){let j=document.createElement("button");return j.type="button",j.className="pdf-toolbar-btn",j.title=_,j.setAttribute("aria-label",_),j.innerHTML='<i class="fas '+E+'"></i>',j.addEventListener("click",q),j}let x=oe("fa-chevron-up","Previous page",function(){Ve(h-1)}),N=oe("fa-chevron-down","Next page",function(){Ve(h+1)}),V=document.createElement("input");V.type="text",V.className="pdf-toolbar-page",V.setAttribute("aria-label","Page number"),V.title="Page number \u2014 type a page and press Enter",V.addEventListener("keydown",function(E){E.key==="Enter"&&(Ve(parseInt(V.value,10)),V.blur())}),V.addEventListener("blur",function(){V.value=String(h)});let Y=document.createElement("span");Y.className="pdf-toolbar-count";let X=oe("fa-search-minus","Zoom out",function(){ne(s[Math.max(0,de()-1)])}),G=oe("fa-search-plus","Zoom in",function(){ne(s[Math.min(s.length-1,de()+1)])}),Q=document.createElement("button");Q.type="button",Q.className="pdf-toolbar-btn pdf-toolbar-zoom",Q.title="Reset zoom to fit the width",Q.setAttribute("aria-label","Reset zoom to fit the width"),Q.addEventListener("click",function(){ne(1)}),U.appendChild(x),U.appendChild(N);let ie=document.createElement("span");ie.className="pdf-toolbar-group",ie.appendChild(V),ie. Line truncated
/*! Bundled license information:
@vue/shared/dist/shared.esm-bundler.js:
(**
* @vue/shared v3.5.43
* @vue/shared v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**)
@vue/reactivity/dist/reactivity.esm-bundler.js:
(**
* @vue/reactivity v3.5.43
* @vue/reactivity v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**)
@vue/runtime-core/dist/runtime-core.esm-bundler.js:
(**
* @vue/runtime-core v3.5.43
* @vue/runtime-core v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**)
@vue/runtime-dom/dist/runtime-dom.esm-bundler.js:
(**
* @vue/runtime-dom v3.5.43
* @vue/runtime-dom v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**)
vue/dist/vue.runtime.esm-bundler.js:
(**
* vue v3.5.43
* vue v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**)