Merge origin/main into fix/workspace-polish; keep the Files button below 992px

The caption's Files button was the only way to open the file tree on
narrow screens when the preview shows no file (no README, loading, error).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Thomas DurieuxandClaude Opus 5.5 committed 2026-11-29 11:50:00 +00:00
commit 27802177b6
25 files changed
+415 -70

No files matched your search

+2 -2
View File
@@ -42,7 +42,7 @@ if service == "mongodb" {
if includes(["quota_denied", "deployment", "account_removed", "application_log", "billing_maintenance_failed", "billing_reconciliation_deferred", "billing_requires_attention", "billing_worker_failed", "blob_api_failed_falling_back_to_raw_url", "branch_not_found", "cache_removal_failed", "cache_removed", "checking_repository_status_and_unused_repositories", "cleared_lock_for_active_job", "conference_expire_failed", "content_expiration_failed", "daily_stats_snapshot_failed", "daily_stats_snapshot_stored", "download_completed", "download_start", "downloaded", "downloadfile_failed", "downloading_file", "downloading_gist", "downloading_pull_request", "downloading_via_raw_url_lfs", "duplicate_stripe_customer_requires_review", "ensuretodaysnapshot_failed", "error_log_redis_connect_failed", "expired_repository_cleanup_failed", "failed_removal_recovery_failed", "failed_to_persist_error_status", "failed_to_record_repository_removal_error", "gettoken", "github_primary_rate_limit_hit", "github_secondary_rate_limit_hit", "grant_revocation_failed", "initial_repository_status_check_failed", "job_completed", "job_failed", "job_stalled", "job_started", "lastusedat_update_failed", "login_token_failed", "login_token_req_login_failed", "logout_after_account_removal_failed", "logout_failed", "lookup_failed", "markerrorifinflight_failed", "markerrorifremoving_failed", "metadata_cleanup_complete", "metadata_cleanup_deferred", "owner_access_alert_reset_unavailable", "owner_access_email_accepted", "owner_access_email_audit_unavailable", "owner_access_email_claim_cleanup_unavailable", "owner_access_email_deferred_recovery_unavailable", "owner_access_email_delivery_failed", "owner_access_email_preparation_cleanup_unavailable", "owner_access_email_recovery_recorded", "owner_access_email_recovery_unavailable", "owner_access_email_result_reconciliation_required", "owner_access_email_unavailable", "pr_comments_404_continuing_without_them", "process_fatal_error", "process_heartbeat", "process_started", "progress", "queue_heartbeat", "queued_for_download", "rate_limit_gate_active_delaying_job_before_work", "rate_limit_gate_set", "rate_limited_delaying_job", "recover_failed", "recovered_expired_repository_cleanup", "recovered_file_from_truncated_tree", "recovered_file_invalidation_failed", "recovered_stuck_repo", "recoverstuckpreparing_failed", "recoverstuckremoving_failed", "redis_client_error", "redis_rate_limit_gate_written", "rejected_upstream_download_destination", "removal_failed", "removal_recovery_failed", "removecache_save_failed", "removed_cache_for_unused_repository", "removing_cache", "removing_repository", "repo_claimed", "repository_cache_removal_failed", "repository_expiration_failed", "repository_expired", "repository_removal_failed", "repository_removed", "request_cancelled", "request_completed", "request_slow", "requeued_failed_removal", "requeued_interrupted_removal", "reset", "retired_tree_cleanup_deferred", "retired_tree_cleanup_failed", "running_daily_stats_snapshot", "s3_body_stream_error", "send_failed", "server_started", "source_stream_failed_cache_write_discarded", "staged_tree_cleanup_failed", "staged_tree_completion_deferred", "streamer_fetch_failed", "streamer_started", "streamer_startup_failed", "streamer_zip_fetch_failed", "temporary_storage_cleanup_deferred", "token_refresh_failed_backing_off", "up_to_date", "update_queued", "verify_failed", "waiting_for_rate_limit_gate", "webhook_log", "webhook_processing_failed", "write_failed", "zip_stream_failed"], record.event) { out.event = record.event }
if is_string(record.release) && match(string!(record.release), r'^[a-f0-9]{7,40}$') { out.release = record.release }
if is_string(record.instance) && match(string!(record.instance), r'^[a-f0-9-]{36}$') { out.instance = record.instance }
if includes(["repo_renamed", "preparation_interrupted", "commit_not_found", "zip_not_available", "ABORT_ERR", "ECONNREFUSED", "ECONNRESET", "ENOTFOUND", "EPIPE", "ETIMEDOUT", "billing_address_missing", "billing_city_missing", "billing_country_missing", "billing_email_missing", "billing_missing", "billing_name_missing", "billing_zip_missing", "branch_not_found", "branch_not_specified", "cache_busy", "cache_miss", "cannot_coauthor_self", "commit_not_specified", "conf_end_date_invalid", "conf_end_date_missing", "conf_id_missing", "conf_id_used", "conf_name_missing", "conf_not_activated", "conf_not_found", "conf_start_date_invalid", "conf_start_date_missing", "conference_not_found", "connection_changed", "download_not_enabled", "expiration_limit_reached", "file_listing_too_large", "file_not_accessible", "file_not_found", "file_not_supported", "file_too_big", "folder_not_supported", "gistId_already_used", "gistId_not_specified", "gist_expired", "gist_not_found", "gist_not_ready", "github_app_access_required", "github_app_reconnect_required", "github_identity_mismatch", "github_rate_limit_exceeded", "github_token_invalid", "github_user_not_found", "invalid_commit_format", "invalid_cursor", "invalid_file_path", "invalid_gistId", "invalid_path", "invalid_plan", "invalid_preserve_files_format", "invalid_project_name", "invalid_pullRequestId", "invalid_repo", "invalid_repoId", "invalid_request", "invalid_settings", "invalid_signature", "invalid_sort", "invalid_status", "invalid_terms_format", "invalid_token_id", "invalid_token_options", "is_removed", "not_authorized", "not_connected", "options_not_provided", "page_not_activated", "page_not_supported_on_different_branch", "path_not_defined", "path_not_specified", "pullRequestId_already_used", "pullRequestId_is_not_a_number", "pullRequestId_not_specified", "pull_request_expired", "pull_request_not_found", "pull_request_not_ready", "token_refresh_failed", "anonymized_output_too_large", "anonymization_memory_budget_exceeded", "anonymization_queue_full", "anonymization_queue_timeout", "anonymization_cancelled", "anonymization_worker_exited", "anonymization_deadline_exceeded", "anonymization_spool_budget_exceeded", "anonymization_worker_failed", "anonymization_storage_full", "anonymization_io_failed", "zip_unsafe_entry_path", "quota_exceeded", "quota_repository_limit", "quota_storage_limit", "rate_limited", "readme_not_available", "repoId_already_used", "repoId_not_defined", "repoUrl_not_defined", "repo_access_limited", "repo_empty", "repo_not_accessible", "repo_not_found", "repo_saml_enforcement", "repository_archived", "repository_changed", "repository_expired", "repository_job_cancelled", "repository_not_found", "repository_not_ready", "repository_not_specified", "repository_tree_incomplete", "repository_tree_too_large", "s3_config_not_provided", "source_not_provided", "storage_delete_failed", "storage_write_size_mismatch", "submodule_not_available", "terms_not_specified", "token_expired", "token_limit_reached", "unable_to_connect_user", "unable_to_download", "upstream_error", "upstream_timeout", "user_not_found", "username_not_defined", "webhook_processing_failed"], record.errorCode) { out.errorCode = record.errorCode }
if includes(["repo_renamed", "preparation_interrupted", "commit_not_found", "zip_not_available", "ABORT_ERR", "ECONNREFUSED", "ECONNRESET", "ENOTFOUND", "EPIPE", "ETIMEDOUT", "billing_address_missing", "billing_city_missing", "billing_country_missing", "billing_email_missing", "billing_missing", "billing_name_missing", "billing_zip_missing", "branch_not_found", "branch_not_specified", "cache_busy", "cache_miss", "cannot_coauthor_self", "commit_not_specified", "conf_end_date_invalid", "conf_end_date_missing", "conf_id_missing", "conf_id_used", "conf_name_missing", "conf_not_activated", "conf_not_found", "conf_start_date_invalid", "conf_start_date_missing", "conference_not_found", "connection_changed", "download_not_enabled", "expiration_limit_reached", "file_listing_too_large", "file_not_accessible", "file_not_found", "file_not_supported", "file_too_big", "folder_not_supported", "gistId_already_used", "gistId_not_specified", "gist_expired", "gist_not_found", "gist_not_ready", "github_app_access_required", "github_app_reconnect_required", "github_identity_mismatch", "github_rate_limit_exceeded", "github_token_invalid", "github_user_not_found", "invalid_commit_format", "invalid_cursor", "invalid_file_path", "invalid_gistId", "invalid_path", "invalid_plan", "invalid_preserve_files_format", "invalid_project_name", "invalid_pullRequestId", "invalid_repo", "invalid_repoId", "invalid_request", "invalid_settings", "invalid_signature", "invalid_sort", "invalid_status", "invalid_terms_format", "invalid_token_id", "invalid_token_options", "is_removed", "not_authorized", "not_connected", "options_not_provided", "page_not_activated", "page_not_supported_on_different_branch", "path_not_defined", "path_not_specified", "pullRequestId_already_used", "pullRequestId_is_not_a_number", "pullRequestId_not_specified", "pull_request_expired", "pull_request_not_found", "pull_request_not_ready", "token_refresh_failed", "anonymized_output_too_large", "anonymization_memory_budget_exceeded", "anonymization_queue_full", "anonymization_queue_timeout", "anonymization_cancelled", "anonymization_worker_exited", "anonymization_deadline_exceeded", "anonymization_spool_budget_exceeded", "anonymization_worker_failed", "anonymization_storage_full", "anonymization_io_failed", "zip_unsafe_entry_path", "quota_exceeded", "quota_repository_limit", "quota_storage_limit", "rate_limited", "readme_not_available", "repoId_already_used", "repoId_not_defined", "repoUrl_not_defined", "repo_access_limited", "repo_empty", "repo_not_accessible", "repo_not_found", "repo_saml_enforcement", "repository_archived", "repository_changed", "repository_expired", "repository_job_cancelled", "repository_not_found", "repository_not_ready", "repository_not_specified", "repository_tree_incomplete", "repository_tree_too_large", "s3_config_not_provided", "source_not_provided", "storage_delete_failed", "storage_write_size_mismatch", "submodule_not_available", "terms_not_specified", "token_expired", "token_limit_reached", "unable_to_connect_user", "unable_to_download", "upstream_error", "upstream_timeout", "user_not_found", "username_not_defined", "webhook_processing_failed", "another_login_required", "billing_already_paid", "billing_busy", "billing_checkout_disabled", "billing_checkout_in_progress", "billing_customer_mismatch", "billing_draft_not_found", "billing_invalid_conference", "billing_invalid_draft", "billing_invalid_purchase", "billing_invalid_repository_size", "billing_invalid_review_window", "billing_plan_change_not_supported", "billing_plan_unavailable", "billing_price_misconfigured", "billing_recovery_required", "billing_review_window_locked", "billing_subscription_exists", "billing_unavailable", "conference_payment_required", "gist_not_available", "github_app_authorization_cancelled", "github_app_disabled", "github_app_permissions_invalid", "github_app_refresh_busy", "github_grant_revocation_failed", "github_oauth_required", "github_unavailable", "invalid_auth_state", "invalid_billing_expiration", "invalid_connection", "invalid_github_path", "not_owner", "oauth_resources_remaining", "pull_request_not_available", "repository_busy", "repository_not_accessible", "streamer_unreachable", "streamer_upstream_error", "subscription_required_for_never_expiration", "user_banned"], record.errorCode) { out.errorCode = record.errorCode }
if includes(["admin", "anonymized-file", "auth", "billing", "dailyStats", "file-tree", "fs", "gh-stream", "gist", "github", "github-app-webhook", "owner-notifications", "process", "pull-request", "queue", "queue:cache", "queue:download", "queue:remove", "repository", "repository-public", "requests", "route", "route:repo", "s3", "schedule", "server", "streamer", "temporary-storage", "token-auth", "user", "zip-stream"], record.module) { out.module = record.module }
if includes(["protocol", "credentials", "port", "host"], record.reason) { out.reason = record.reason }
if includes(["parse", "find_grant_owners", "reconcile_grant", "persist_installation_block", "reconcile_installation"], record.phase) { out.phase = record.phase }
@@ -81,7 +81,7 @@ if includes(["/", "other", "/dashboard", "/anonymize", "/healthcheck", "/api/hea
}
}
# BEGIN GENERATED DIAGNOSTICS
source_functions = {"src/cli/index.ts":["<anonymous>","generateRandomFileName","main"],"build/cli/index.js":["<anonymous>","generateRandomFileName","main"],"src/config.ts":["<anonymous>"],"build/config.js":["<anonymous>"],"src/core/AnonymizedFile.ts":["<anonymous>","anonymizedContent","assertContentFile","cancel","content","defaultMaskCandidateRegex","escapeRegex","extension","forwardHeaders","getFileInfo","handleStreamError","isFileSupported","isImage","originalPath","probe","recoverTruncatedFile","send","sha","size","streamerErrorToAnonymous","visibleFile"],"build/core/AnonymizedFile.js":["<anonymous>","anonymizedContent","assertContentFile","cancel","content","defaultMaskCandidateRegex","escapeRegex","extension","forwardHeaders","getFileInfo","handleStreamError","isFileSupported","isImage","originalPath","probe","recoverTruncatedFile","send","sha","size","streamerErrorToAnonymous","visibleFile"],"src/core/AnonymousError.ts":["<anonymous>","detail","toString","url"],"build/core/AnonymousError.js":["<anonymous>","detail","toString","url"],"src/core/Conference.ts":["<anonymous>","expire","isExpired","remove","repositories","toJSON","updateStatus"],"build/core/Conference.js":["<anonymous>","expire","isExpired","remove","repositories","toJSON","updateStatus"],"src/core/Gist.ts":["<anonymous>","anonymize","check","conference","content","countView","download","downloadContent","downloadWithAccess","expire","getAccess","getToken","markExpired","remove","resetSate","toJSON","updateIfNeeded","updateStatus"],"build/core/Gist.js":["<anonymous>","anonymize","check","conference","content","countView","download","downloadContent","downloadWithAccess","expire","getAccess","getToken","markExpired","remove","resetSate","toJSON","updateIfNeeded","updateStatus"],"src/core/GitHubUtils.ts":["<anonymous>","abortableGateLookup","cancelled","checkToken","ensureRedisGateClient","getRedisGateResetAt","getToken","getTokenGateResetAt","octokit","rateLimitDetail","resolveRepositoryToken","run","setRedisGate","setRedisGateFromWorker","setTokenGate","waitForTokenGate"],"build/core/GitHubUtils.js":["<anonymous>","abortableGateLookup","cancelled","checkToken","ensureRedisGateClient","getRedisGateResetAt","getToken","getTokenGateResetAt","octokit","rateLimitDetail","resolveRepositoryToken","run","setRedisGate","setRedisGateFromWorker","setTokenGate","waitForTokenGate"],"src/core/PullRequest.ts":["<anonymous>","anonymize","check","conference","content","countView","download","downloadContent","expire","getToken","markExpired","remove","resetSate","toJSON","updateIfNeeded","updateStatus"],"build/core/PullRequest.js":["<anonymous>","anonymize","check","conference","content","countView","download","downloadContent","expire","getToken","markExpired","remove","resetSate","toJSON","updateIfNeeded","updateStatus"],"src/core/Repository.ts":["<anonymous>","anonymize","anonymizeTreeRecursive","anonymizedFiles","assertNotArchived","buildPathIndex","check","checkRefreshWrite","cleanupRetiredFileTrees","cleanupStagedFileTree","clearRows","completeRecoveredFileMetadata","computeSize","conference","countView","current","ensureFileTree","expire","fileSnapshotFilter","files","findAnonymizedPath","generateAnonymizeTransformer","getToken","hasEmptyTree","indexPaths","insertBatch","invalidateFileMetadata","isReady","markCachePresent","markExpired","pathKey","readFiles","refresh","refreshFilter","refreshIfNeeded","remove","removeCache","resetSate","searchFiles","snapshotValue","submoduleMounts","toJSON","updateIfNeeded","updateProgressMessage","updateRetiringPathIndex","updateStatus","zip"],"build/core/Repository.js":["<anonymous>","anonymize","anonymizeTreeRecursive","anonymizedFiles","assertNotArchived","buildPathIndex","check","checkRefreshWrite","cleanupRetiredFileTrees","cleanupStagedFileTree","clearRows","completeRecoveredFileMetadata","computeSize","conference","countView","current","ensureFileTree","expire","fileSnapshotFilter","files","findAnonymizedPath","generateAnonymizeTransformer","getToken","hasEmptyTree","indexPaths","insertBatch","invalidateFileMetadata","isReady","markCachePresent","markExpired","pathKey","readFiles","refresh","refreshFilter","refreshIfNeeded","remove","removeCache","resetSate","searchFiles","snapshotValue","submoduleMounts","toJSON","updateIfNeeded","updateProgressMessage","updateRetiringPathIndex","updateStatus","zip"],"src/core/User.ts":["<anonymous>","getAccessToken","getGists","getGitHubRepositories","getPullRequests","getRepositories","markListExpired","quotaRepositories","repositoryMembership","toJSON"],"build/core/User.js":["<anonymous>","getAccessToken","getGists","getGitHubRepositories","getPullRequests","getRepositories","markListExpired","quotaRepositories","repositoryMembership","toJSON"],"src/core/anonymization-errors.ts":["<anonymous>","anonymizationErrorCode","data"],"build/core/anonymization-errors.js":["<anonymous>","anonymizationErrorCode","data"],"src/core/anonymization-pool.ts":["<anonymous>","anonymizeOLine truncated
source_functions = {"src/cli/index.ts":["<anonymous>","generateRandomFileName","main"],"build/cli/index.js":["<anonymous>","generateRandomFileName","main"],"src/config.ts":["<anonymous>"],"build/config.js":["<anonymous>"],"src/core/AnonymizedFile.ts":["<anonymous>","anonymizedContent","assertContentFile","cancel","content","defaultMaskCandidateRegex","escapeRegex","extension","forwardHeaders","getFileInfo","handleStreamError","isFileSupported","isImage","originalPath","probe","recoverTruncatedFile","send","sha","size","streamerErrorToAnonymous","visibleFile"],"build/core/AnonymizedFile.js":["<anonymous>","anonymizedContent","assertContentFile","cancel","content","defaultMaskCandidateRegex","escapeRegex","extension","forwardHeaders","getFileInfo","handleStreamError","isFileSupported","isImage","originalPath","probe","recoverTruncatedFile","send","sha","size","streamerErrorToAnonymous","visibleFile"],"src/core/AnonymousError.ts":["<anonymous>","detail","toString","url"],"build/core/AnonymousError.js":["<anonymous>","detail","toString","url"],"src/core/Conference.ts":["<anonymous>","expire","isExpired","remove","repositories","toJSON","updateStatus"],"build/core/Conference.js":["<anonymous>","expire","isExpired","remove","repositories","toJSON","updateStatus"],"src/core/Gist.ts":["<anonymous>","anonymize","check","conference","content","countView","download","downloadContent","downloadWithAccess","expire","getAccess","getToken","markExpired","remove","resetSate","toJSON","updateIfNeeded","updateStatus"],"build/core/Gist.js":["<anonymous>","anonymize","check","conference","content","countView","download","downloadContent","downloadWithAccess","expire","getAccess","getToken","markExpired","remove","resetSate","toJSON","updateIfNeeded","updateStatus"],"src/core/GitHubUtils.ts":["<anonymous>","abortableGateLookup","cancelled","checkToken","ensureRedisGateClient","getRedisGateResetAt","getToken","getTokenGateResetAt","octokit","ownerGitHubAccessRequired","rateLimitDetail","resolveRepositoryToken","run","setRedisGate","setRedisGateFromWorker","setTokenGate","waitForTokenGate"],"build/core/GitHubUtils.js":["<anonymous>","abortableGateLookup","cancelled","checkToken","ensureRedisGateClient","getRedisGateResetAt","getToken","getTokenGateResetAt","octokit","ownerGitHubAccessRequired","rateLimitDetail","resolveRepositoryToken","run","setRedisGate","setRedisGateFromWorker","setTokenGate","waitForTokenGate"],"src/core/PullRequest.ts":["<anonymous>","anonymize","check","conference","content","countView","download","downloadContent","expire","getToken","markExpired","remove","resetSate","toJSON","updateIfNeeded","updateStatus"],"build/core/PullRequest.js":["<anonymous>","anonymize","check","conference","content","countView","download","downloadContent","expire","getToken","markExpired","remove","resetSate","toJSON","updateIfNeeded","updateStatus"],"src/core/Repository.ts":["<anonymous>","anonymize","anonymizeTreeRecursive","anonymizedFiles","assertNotArchived","buildPathIndex","check","checkRefreshWrite","cleanupRetiredFileTrees","cleanupStagedFileTree","clearRows","completeRecoveredFileMetadata","computeSize","conference","countView","current","ensureFileTree","expire","fileSnapshotFilter","files","findAnonymizedPath","generateAnonymizeTransformer","getToken","hasEmptyTree","indexPaths","insertBatch","invalidateFileMetadata","isReady","markCachePresent","markExpired","pathKey","readFiles","refresh","refreshFilter","refreshIfNeeded","remove","removeCache","resetSate","searchFiles","snapshotValue","submoduleMounts","toJSON","updateIfNeeded","updateProgressMessage","updateRetiringPathIndex","updateStatus","zip"],"build/core/Repository.js":["<anonymous>","anonymize","anonymizeTreeRecursive","anonymizedFiles","assertNotArchived","buildPathIndex","check","checkRefreshWrite","cleanupRetiredFileTrees","cleanupStagedFileTree","clearRows","completeRecoveredFileMetadata","computeSize","conference","countView","current","ensureFileTree","expire","fileSnapshotFilter","files","findAnonymizedPath","generateAnonymizeTransformer","getToken","hasEmptyTree","indexPaths","insertBatch","invalidateFileMetadata","isReady","markCachePresent","markExpired","pathKey","readFiles","refresh","refreshFilter","refreshIfNeeded","remove","removeCache","resetSate","searchFiles","snapshotValue","submoduleMounts","toJSON","updateIfNeeded","updateProgressMessage","updateRetiringPathIndex","updateStatus","zip"],"src/core/User.ts":["<anonymous>","getAccessToken","getGists","getGitHubRepositories","getPullRequests","getRepositories","markListExpired","quotaRepositories","repositoryMembership","toJSON"],"build/core/User.js":["<anonymous>","getAccessToken","getGists","getGitHubRepositories","getPullRequests","getRepositories","markListExpired","quotaRepositories","repositoryMembership","toJSON"],"src/core/anonymization-errors.ts":["<anonymous>","anonymizationErrorCode","data"],"build/core/anonymization-errors.js":["<anonymous>","anonymizationErrorCode","data"],"srLine truncated
for_each(["errorType", "causeType"]) -> |_index, key| {
value = get(record, [key]) ?? null
if includes(["Error","TypeError","RangeError","ReferenceError","SyntaxError","URIError","EvalError","AggregateError","AnonymousError","HTTPError","RequestError","MongoServerError","MongoNetworkError","MongoServerSelectionError","ValidationError","TimeoutError","AbortError","UnknownError"], value) { out = set!(out, [key], value) }
+2 -2
View File
@@ -1,8 +1,8 @@
{
"core.min.js": "core.d23af1c652.min.js",
"vendor.min.js": "vendor.5320c9cbba.min.js",
"vendor.min.js": "vendor.094a489e61.min.js",
"mermaid.min.js": "mermaid.a7356d5ed1.min.js",
"all.min.css": "all.a6d5155a7d.min.css",
"all.min.css": "all.07e4a087c1.min.css",
"markdown.min.js": "markdown.6c8dfb7b1d.min.js",
"pdf.min.js": "pdf.4d9cc6ff49.min.js",
"notebook.min.js": "notebook.c3144c18ae.min.js",
+1 -1
View File
@@ -6,4 +6,4 @@
*/:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unsLine truncated
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{contentLine truncated
*/.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{contentLine truncated
+4
View File
@@ -13668,6 +13668,7 @@ input[type="date"].form-control { font-family: var(--font-sans) !important; font
.anonymize-page .anonymize-preview-col.reviewer-preview { border-left: 0; padding: 0 16px 20px !important; }
.reviewer-preview .rp-caption { padding: 14px 0 10px; flex-wrap: wrap; row-gap: 4px; }
.reviewer-preview .rp-open { display: none; }
.reviewer-preview .rp-open.rp-files { display: inline; }
.reviewer-preview .rp-window { margin: 0; border: 1px solid var(--rp-line); border-radius: 10px; min-height: 64vh; }
.reviewer-preview .rp-chrome { height: 30px; }
.reviewer-preview .rp-url { font-size: 11px; margin-left: 6px; }
@@ -14893,3 +14894,6 @@ body.dark-mode .reviewer-preview .rp-preserved-tag { background: rgba(251, 191,
.anonymize-page .dated-options .hosting-property label,
.anonymize-page .dated-options .hosting-date .paper-field-label { color: var(--ink-soft, var(--ink-muted)); }
@media (max-width: 767px) { .anonymize-page .expiration-choice-row > .expiry-change { min-height: 44px; margin-top: 0; } }
/* Below 992px the file tree sits off-screen; the caption's Files button is the
only way to open it when the preview shows no file (no README, loading, error). */
@media (min-width: 992px) { .reviewer-preview .rp-open.rp-files { display: none; } }
+3
View File
@@ -9,6 +9,7 @@
},
"ERRORS": {
"cache_busy": "Downloads are busy. Please try again shortly.",
"cache_miss": "This file is not cached yet. Please try again.",
"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.",
@@ -143,6 +144,8 @@
"storage_write_size_mismatch": "The downloaded file was smaller than expected. The upstream source may have returned an incomplete response — please try again.",
"storage_read_error": "An error occurred while reading the file from storage — please try again.",
"upstream_error": "A temporary error occurred while fetching from GitHub — please try again.",
"streamer_upstream_error": "The file server received an unexpected response — please try again.",
"streamer_unreachable": "The file server is temporarily unreachable — please try again.",
"token_expired": "The repository owner needs to renew their GitHub connection before this content can be loaded.",
"job_is_active": "This job is currently running — wait for it to finish or remove it first.",
"github_app_access_required": "Allow this repository on GitHub using the read-only access button, then retry. Organization access may require administrator approval.",
+1
View File
@@ -532,6 +532,7 @@
<div id="workspace-preview" :role="mobileWorkspace ? 'tabpanel' : null" :aria-labelledby="mobileWorkspace ? 'workspace-preview-tab' : null" class="anonymize-preview-col reviewer-preview" v-if="detectedType">
<div class="rp-caption">
<span class="rp-title">What reviewers will see</span>
<button type="button" class="rp-open rp-files" v-if="detectedType === 'repo' &amp;&amp; details" @click="previewViewer.sidebarCollapsed = !previewViewer.sidebarCollapsed" :aria-expanded="!previewViewer.sidebarCollapsed" aria-controls="preview-file-tree">Files</button>
<span class="rp-count" v-if="previewStatus === 'ready' &amp;&amp; previewRedactions() &gt; 0" :title="previewRedactions() + ' redacted terms in this preview'"><span class="redact-slot" aria-hidden="true"><i>{{ previewRedactions() }}</i></span> redacted</span>
<button type="button" class="rp-count rp-status-empty" v-else-if="previewStatus === 'ready' &amp;&amp; !String(terms || '').trim()" @click="focusTerms()">Nothing redacted yet: <span class="rp-status-action">add terms</span></button>
<button type="button" class="rp-count rp-count-none" v-else-if="previewStatus === 'ready' &amp;&amp; previewPreserved()" @click="openPreserveFiles()" title="Change it in Leave files unredacted">{{ previewName(previewFile ? previewFile.slice(previewFile.lastIndexOf('/') + 1) : readmeName()) }} left unredacted</button>
+7
View File
@@ -2295,6 +2295,13 @@ export const anonymizeController = function (state, http, html, params, location
state.source.branch = "";
state.readme = "";
state.branches = [];
// The old source's preview must not cover a failed reconnection.
scheduleRepoPreview.cancel();
refreshPrPreview.cancel();
refreshGistPreview.cancel();
state.previewStatus = "idle";
state.anonymize_readme = "";
resetPreviewFile();
try { await getRepoDetails(); }
catch (_) { /* getRepoDetails displays the access error. */ }
};
+37 -37
View File
@@ -1,55 +1,55 @@
"use strict";(()=>{var fl=Object.defineProperty;var ml=e=>{throw TypeError(e)};var wf=(e,t,s)=>t in e?fl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var kf=(e,t)=>{for(var s in t)fl(e,s,{get:t[s],enumerable:!0})};var tt=(e,t,s)=>wf(e,typeof t!="symbol"?t+"":t,s),Tr=(e,t,s)=>t.has(e)||ml("Cannot "+s);var ae=(e,t,s)=>(Tr(e,t,"read from private field"),s?s.call(e):t.get(e)),qe=(e,t,s)=>t.has(e)?ml("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Be=(e,t,s,i)=>(Tr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),$e=(e,t,s)=>(Tr(e,t,"access private method"),s);var hl=(e,t,s,i)=>({set _(o){Be(e,t,o,s)},get _(){return ae(e,t,i)}});var ge=["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 ve={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 gl(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let s=new URLSearchParams(t);if([...s.keys()].length!==3||[...s.keys()].some(u=>!["clientId","intentId","token"].includes(u)))return null;let i=s.get("clientId"),o=s.get("intentId"),r=s.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(o||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:o,token:r}}function vl(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),u=r?{clientId:r.clientId,intentId:r.intentId}:null,f,c,v,h,y,g=!0,C,w=i.defer(),S=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(_=>_.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 N=()=>g&&e.user?.username===y;function b(){g=!1,r=f=c=void 0,w.resolve(),o.clearTimeout(C)}e.on("dispose",b),e.on("routeLeave",b),e.watch(()=>e.user?.username,_=>{!y&&_?y=_:y&&_!==y&&(b(),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 T=()=>({timeout:w.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":c}}),M=_=>_?.status===404?"Artifact linking is not available on this server.":_?.status===401?"Sign in, then open a new artifact link from your submission.":_?.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(!g||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;y=e.user.username;let _=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(_)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,f=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,o.clearTimeout(C),h||(h=S());try{let H=(await s.get("/api/review-consent/csrf",{timeout:w.promise})).data;if(!N())return;if(c=H.csrf,e.handoffEnabled=H.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(c||""))throw new Error("invalid_csrf");let se=(await s.post("/api/review-consent/preview",{repositoryId:_,intent:{...r,requestId:h}},T())).data;if(!N())return;if(!se||typeof se.ticket!="string"||!se.ticket||se.ticket.length>8192||typeof se.repositoryName!="string"||!["restricted-review","anonymous-liLine truncated
`))),e[bn]=Bo(o);let r=i||o.props&&o.props.type==="number";Fn(e,t?"change":"input",u=>{u.target.composing||e[bn](fa(e.value,s,r))}),(s||r)&&Fn(e,"change",()=>{e.value=fa(e.value,s,r)}),t||(Fn(e,"compositionstart",Eh),Fn(e,"compositionend",ou),Fn(e,"change",ou))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[zi];delete e[zi],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[bn](fa(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},u){if(e[bn]=Bo(u),e.composing)return;let f=(r||e.type==="number")&&!/^0\d/.test(e.value)?Vo(e.value):e.value,c=t??"";if(f===c)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===c)||(e.value=c)}},ha={deep:!0,created(e,t,s){e[bn]=Bo(s),Fn(e,"change",()=>{let i=e._modelValue,o=Fs(e),r=e.checked,u=e[bn];if(Ne(i)){let f=gi(i,o),c=f!==-1;if(r&&!c)u(i.concat(o));else if(!r&&c){let v=[...i];v.splice(f,1),u(v)}}else if(Zt(i)){let f=new Set(i);r?f.add(o):f.delete(o),u(f)}else u(du(e,r))})},mounted:su,beforeUpdate(e,t,s){e[bn]=Bo(s),su(e,t,s)}};function su(e,{value:t,oldValue:s},i){e._modelValue=t;let o;if(Ne(t))o=gi(t,i.props.value)>-1;else if(Zt(t))o=t.has(i.props.value);else{if(t===s)return;o=xt(t,du(e,!0))}e.checked!==o&&(e.checked=o)}var Nt={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,Fn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>s?Vo(Fs(c)):Fs(c)),r=e.multiple,u=r?Zt(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[r,r?Ne(u)?o.slice():o:u];try{e[bn](u)}finally{ze(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[bn]=Bo(i)},mounted(e,{value:t}){iu(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[bn]=Bo(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!Nh(t,s[1],s[0]))&&iu(e,t)}};function Nh(e,t,s){if(!s)return xt(e,t);if(Ne(e))return xt(e,t);if(Zt(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function iu(e,t){let s=e.multiple,i=Ne(t);if(!(s&&!i&&!Zt(t))){for(let o=0,r=e.options.length;o<r;o++){let u=e.options[o],f=Fs(u);if(s)if(i){let c=typeof f;c==="string"||c==="number"?u.selected=t.some(v=>String(v)===String(f)):u.selected=gi(t,f)>-1}else u.selected=t.has(f);else if(xt(Fs(u),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Fs(e){return"_value"in e?e._value:e.value}function du(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var Rh=["ctrl","shift","alt","meta"],Th={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)=>Rh.some(s=>e[`${s}Key`]&&!t.includes(s))},de=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let u=0;u<t.length;u++){let f=Th[t[u]];if(f&&f(o,t))return}return e(o,...r)}))},Ph={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$t=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=dn(o.key);if(t.some(u=>u===r||Ph[u]===r))return e(o)}))},Dh=ct({patchProp:kh},ih),ru;function Ah(){return ru||(ru=_d(Dh))}var uu=((...e)=>{let t=Ah().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=Oh(i);if(!o)return;let r=t._component;!Ie(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let u=s(o,!1,Ih(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),u},t});function Ih(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Oh(e){return at(e)?document.querySelector(e):e}var co=typeof document<"u";function pu(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Mh(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&pu(e.default)}var Ze=Object.assign;function ji(e,t){let s={};for(let i in t){let o=t[i];s[i]=Xt(o)?o.map(e):e(o)}return s}var Ho=()=>{},Xt=Array.isArray;function ya(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var fu=/#/g,Vh=/&/g,Lh=/\//g,qh=/=/g,$h=/\?/g,mu=/\+/g,Fh=/%5B/g,_h=/%5D/g,hu=/%5E/g,Uh=/%60/g,gu=/%7B/g,Bh=/%7C/g,vu=/%7D/g,zh=/%20/g;function ba(e){return e==null?"":encodeURI(""+e).replace(Bh,"|").replace(Fh,"[").replace(_h,"]")}function yu(e){return ba(e).replace(gu,"{").replace(vu,"}").replace(hu,"^")}function ga(e){return ba(e).replace(mu,"%2B").replace(zh,"+").replace(fu,"%23").replace(Vh,"%26").replace(Uh,"`").replace(gu,"{").replace(vu,"}").replace(hu,"^")}function Hh(e){return ga(e).replace(qh,"%3D")}function jh(e){return bLine truncated
"use strict";(()=>{var ml=Object.defineProperty;var hl=e=>{throw TypeError(e)};var wf=(e,t,s)=>t in e?ml(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var kf=(e,t)=>{for(var s in t)ml(e,s,{get:t[s],enumerable:!0})};var tt=(e,t,s)=>wf(e,typeof t!="symbol"?t+"":t,s),Tr=(e,t,s)=>t.has(e)||hl("Cannot "+s);var ae=(e,t,s)=>(Tr(e,t,"read from private field"),s?s.call(e):t.get(e)),qe=(e,t,s)=>t.has(e)?hl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Be=(e,t,s,i)=>(Tr(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),$e=(e,t,s)=>(Tr(e,t,"access private method"),s);var gl=(e,t,s,i)=>({set _(o){Be(e,t,o,s)},get _(){return ae(e,t,i)}});var ge=["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 ve={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 vl(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let s=new URLSearchParams(t);if([...s.keys()].length!==3||[...s.keys()].some(u=>!["clientId","intentId","token"].includes(u)))return null;let i=s.get("clientId"),o=s.get("intentId"),r=s.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(o||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:o,token:r}}function yl(e,t){let{http:s,promises:i,window:o}=t,r=t.takeReviewHandoff(),u=r?{clientId:r.clientId,intentId:r.intentId}:null,f,c,v,h,y,g=!0,C,w=i.defer(),S=()=>[...o.crypto.getRandomValues(new Uint8Array(16))].map(_=>_.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 N=()=>g&&e.user?.username===y;function b(){g=!1,r=f=c=void 0,w.resolve(),o.clearTimeout(C)}e.on("dispose",b),e.on("routeLeave",b),e.watch(()=>e.user?.username,_=>{!y&&_?y=_:y&&_!==y&&(b(),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 T=()=>({timeout:w.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":c}}),M=_=>_?.status===404?"Artifact linking is not available on this server.":_?.status===401?"Sign in, then open a new artifact link from your submission.":_?.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(!g||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;y=e.user.username;let _=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(_)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,f=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,o.clearTimeout(C),h||(h=S());try{let H=(await s.get("/api/review-consent/csrf",{timeout:w.promise})).data;if(!N())return;if(c=H.csrf,e.handoffEnabled=H.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(c||""))throw new Error("invalid_csrf");let se=(await s.post("/api/review-consent/preview",{repositoryId:_,intent:{...r,requestId:h}},T())).data;if(!N())return;if(!se||typeof se.ticket!="string"||!se.ticket||se.ticket.length>8192||typeof se.repositoryName!="string"||!["restricted-review","anonymous-liLine truncated
`))),e[bn]=Bo(o);let r=i||o.props&&o.props.type==="number";Fn(e,t?"change":"input",u=>{u.target.composing||e[bn](fa(e.value,s,r))}),(s||r)&&Fn(e,"change",()=>{e.value=fa(e.value,s,r)}),t||(Fn(e,"compositionstart",Eh),Fn(e,"compositionend",su),Fn(e,"change",su))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){let o=t??"",r=e[zi];delete e[zi],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[bn](fa(e.value,s,i)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:o,number:r}},u){if(e[bn]=Bo(u),e.composing)return;let f=(r||e.type==="number")&&!/^0\d/.test(e.value)?Vo(e.value):e.value,c=t??"";if(f===c)return;let v=e.getRootNode();(v instanceof Document||v instanceof ShadowRoot)&&v.activeElement===e&&e.type!=="range"&&(i&&t===s||o&&e.value.trim()===c)||(e.value=c)}},ha={deep:!0,created(e,t,s){e[bn]=Bo(s),Fn(e,"change",()=>{let i=e._modelValue,o=Fs(e),r=e.checked,u=e[bn];if(Ne(i)){let f=gi(i,o),c=f!==-1;if(r&&!c)u(i.concat(o));else if(!r&&c){let v=[...i];v.splice(f,1),u(v)}}else if(Zt(i)){let f=new Set(i);r?f.add(o):f.delete(o),u(f)}else u(uu(e,r))})},mounted:iu,beforeUpdate(e,t,s){e[bn]=Bo(s),iu(e,t,s)}};function iu(e,{value:t,oldValue:s},i){e._modelValue=t;let o;if(Ne(t))o=gi(t,i.props.value)>-1;else if(Zt(t))o=t.has(i.props.value);else{if(t===s)return;o=xt(t,uu(e,!0))}e.checked!==o&&(e.checked=o)}var Nt={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,Fn(e,"change",()=>{let o=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>s?Vo(Fs(c)):Fs(c)),r=e.multiple,u=r?Zt(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[r,r?Ne(u)?o.slice():o:u];try{e[bn](u)}finally{ze(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[bn]=Bo(i)},mounted(e,{value:t}){ru(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[bn]=Bo(s)},updated(e,{value:t}){let s=e._pendingValue;e._pendingValue=void 0,(!s||s[0]!==e.multiple||!Nh(t,s[1],s[0]))&&ru(e,t)}};function Nh(e,t,s){if(!s)return xt(e,t);if(Ne(e))return xt(e,t);if(Zt(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function ru(e,t){let s=e.multiple,i=Ne(t);if(!(s&&!i&&!Zt(t))){for(let o=0,r=e.options.length;o<r;o++){let u=e.options[o],f=Fs(u);if(s)if(i){let c=typeof f;c==="string"||c==="number"?u.selected=t.some(v=>String(v)===String(f)):u.selected=gi(t,f)>-1}else u.selected=t.has(f);else if(xt(Fs(u),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Fs(e){return"_value"in e?e._value:e.value}function uu(e,t){let s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}var Rh=["ctrl","shift","alt","meta"],Th={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)=>Rh.some(s=>e[`${s}Key`]&&!t.includes(s))},de=(e,t)=>{if(!e)return e;let s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((o,...r)=>{for(let u=0;u<t.length;u++){let f=Th[t[u]];if(f&&f(o,t))return}return e(o,...r)}))},Ph={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$t=(e,t)=>{let s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(o=>{if(!("key"in o))return;let r=dn(o.key);if(t.some(u=>u===r||Ph[u]===r))return e(o)}))},Dh=ct({patchProp:kh},ih),au;function Ah(){return au||(au=Ud(Dh))}var cu=((...e)=>{let t=Ah().createApp(...e),{mount:s}=t;return t.mount=i=>{let o=Oh(i);if(!o)return;let r=t._component;!Ie(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");let u=s(o,!1,Ih(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),u},t});function Ih(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Oh(e){return at(e)?document.querySelector(e):e}var co=typeof document<"u";function fu(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Mh(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&fu(e.default)}var Ze=Object.assign;function ji(e,t){let s={};for(let i in t){let o=t[i];s[i]=Qt(o)?o.map(e):e(o)}return s}var Ho=()=>{},Qt=Array.isArray;function ya(e,t){let s={};for(let i in e)s[i]=i in t?t[i]:e[i];return s}var mu=/#/g,Vh=/&/g,Lh=/\//g,qh=/=/g,$h=/\?/g,hu=/\+/g,Fh=/%5B/g,_h=/%5D/g,gu=/%5E/g,Uh=/%60/g,vu=/%7B/g,Bh=/%7C/g,yu=/%7D/g,zh=/%20/g;function ba(e){return e==null?"":encodeURI(""+e).replace(Bh,"|").replace(Fh,"[").replace(_h,"]")}function bu(e){return ba(e).replace(vu,"{").replace(yu,"}").replace(gu,"^")}function ga(e){return ba(e).replace(hu,"%2B").replace(zh,"+").replace(mu,"%23").replace(Vh,"%26").replace(Uh,"`").replace(vu,"{").replace(yu,"}").replace(gu,"^")}function Hh(e){return ga(e).replace(qh,"%3D")}function jh(e){return bLine truncated
${JSON.stringify(e)}${t?`
while being at
`+JSON.stringify(t):""}`},[ut.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${xh(t)}" via a navigation guard.`},[ut.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ut.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ut.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function uo(e,t){return Ze(new Error,{type:e,[Tu]:!0},t)}function wn(e,t){return e instanceof Error&&Tu in e&&(t==null||!!(e.type&t))}var Zh=["params","query","hash"];function xh(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Zh)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function Pu(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(mu," "),r=o.indexOf("="),u=zo(r<0?o:o.slice(0,r)),f=r<0?null:zo(o.slice(r+1));if(u in t){let c=t[u];Xt(c)||(c=t[u]=[c]),c.push(f)}else t[u]=f}return t}function Ea(e){let t="";for(let s in e){let i=e[s];if(s=Hh(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(Xt(i)?i.map(o=>o&&ga(o)):[i&&ga(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function Du(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=Xt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var Au=Symbol(""),Na=Symbol(""),Yi=Symbol(""),Ji=Symbol(""),Xi=Symbol("");function jo(){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 Dn(e,t,s,i,o,r=u=>u()){let u=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((f,c)=>{let v=g=>{g===!1?c(uo(ut.NAVIGATION_ABORTED,{from:s,to:t})):g instanceof Error?c(g):Qh(g)?c(uo(ut.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(u&&i.enterCallbacks[o]===u&&typeof g=="function"&&u.push(g),f())},h=r(()=>e.call(i&&i.instances[o],t,s,v)),y=Promise.resolve(h);e.length<3&&(y=y.then(v)),y.catch(g=>c(g))})}function Qi(e,t,s,i,o=r=>r()){let r=[];for(let u of e)for(let f in u.components){let c=u.components[f];if(!(t!=="beforeRouteEnter"&&!u.instances[f]))if(pu(c)){let v=(c.__vccOpts||c)[t];v&&r.push(Dn(v,s,i,u,f,o))}else{let v=c();r.push(()=>v.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${f}" at "${u.path}"`);let y=Mh(h)?h.default:h;u.mods[f]=h,u.components[f]=y;let g=(y.__vccOpts||y)[t];return g&&Dn(g,s,i,u,f,o)()}))}}return r}function Iu(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let u=0;u<r;u++){let f=t.matched[u];f&&(e.matched.find(v=>lo(v,f))?i.push(f):s.push(f));let c=e.matched[u];c&&(t.matched.find(v=>lo(v,c))||o.push(c))}return[s,i,o]}var eg=()=>location.protocol+"//"+location.host;function zu(e,t){let{pathname:s,search:i,hash:o}=t,r=e.indexOf("#");if(r>-1){let u=o.includes(e.slice(r))?e.slice(r).length:1,f=o.slice(u);return f[0]!=="/"&&(f="/"+f),wa(f,"")}return wa(s,e)+i+o}function tg(e,t,s,i){let o=[],r=[],u=null,f=({state:g})=>{let C=zu(e,location),w=s.value,S=t.value,N=0;if(g){if(s.value=C,t.value=g,u&&u===w){u=null;return}N=S?g.position-S.position:0}else i(C);o.forEach(b=>{b(s.value,w,{delta:N,type:Wi.pop,direction:N?N>0?Ki.forward:Ki.back:Ki.unknown})})};function c(){u=s.value}function v(g){o.push(g);let C=()=>{let w=o.indexOf(g);w>-1&&o.splice(w,1)};return r.push(C),C}function h(){if(document.visibilityState==="hidden"){let{history:g}=window;if(!g.state)return;g.replaceState(Ze({},g.state,{scroll:_s()}),"")}}function y(){for(let g of r)g();r=[],window.removeEventListener("popstate",f),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",f),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:c,listen:v,destroy:y}}function Ou(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?_s():null}}function ng(e){let{history:t,location:s}=window,i={value:zu(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(c,v,h){let y=e.indexOf("#"),g=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+c:eg()+e+c;try{t[h?"replaceState":"pushState"](v,"",g),o.value=v}catch(C){console.error(C),s[h?"replace":"assign"](g)}}function u(c,v){r(c,Ze({},t.state,Ou(o.value.back,c,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=c}function f(c,v){let h=Ze({},o.value,t.state,{forward:c,scroll:_s()});r(h.current,h,!0),r(c,Ze({},Ou(i.value,c,null),{position:h.position+1},v),!1),i.value=c}return{location:i,state:o,push:f,replace:u}}function Hu(e){e=Cu(e);let t=ng(e),s=tg(e,t.state,t.location,t.replace);function i(r,u=!0){u||s.pauseListeners(),history.go(r)}let o=Ze({locatLine truncated
`+JSON.stringify(t):""}`},[ut.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${xh(t)}" via a navigation guard.`},[ut.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[ut.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[ut.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function uo(e,t){return Ze(new Error,{type:e,[Pu]:!0},t)}function wn(e,t){return e instanceof Error&&Pu in e&&(t==null||!!(e.type&t))}var Zh=["params","query","hash"];function xh(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let s of Zh)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function Du(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(hu," "),r=o.indexOf("="),u=zo(r<0?o:o.slice(0,r)),f=r<0?null:zo(o.slice(r+1));if(u in t){let c=t[u];Qt(c)||(c=t[u]=[c]),c.push(f)}else t[u]=f}return t}function Ea(e){let t="";for(let s in e){let i=e[s];if(s=Hh(s),i==null){i!==void 0&&(t+=(t.length?"&":"")+s);continue}(Qt(i)?i.map(o=>o&&ga(o)):[i&&ga(i)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function Au(e){let t={};for(let s in e){let i=e[s];i!==void 0&&(t[s]=Qt(i)?i.map(o=>o==null?null:""+o):i==null?i:""+i)}return t}var Iu=Symbol(""),Na=Symbol(""),Yi=Symbol(""),Ji=Symbol(""),Xi=Symbol("");function jo(){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 In(e,t,s,i,o,r=u=>u()){let u=i&&(i.enterCallbacks[o]=i.enterCallbacks[o]||[]);return()=>new Promise((f,c)=>{let v=g=>{g===!1?c(uo(ut.NAVIGATION_ABORTED,{from:s,to:t})):g instanceof Error?c(g):Qh(g)?c(uo(ut.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(u&&i.enterCallbacks[o]===u&&typeof g=="function"&&u.push(g),f())},h=r(()=>e.call(i&&i.instances[o],t,s,v)),y=Promise.resolve(h);e.length<3&&(y=y.then(v)),y.catch(g=>c(g))})}function Qi(e,t,s,i,o=r=>r()){let r=[];for(let u of e)for(let f in u.components){let c=u.components[f];if(!(t!=="beforeRouteEnter"&&!u.instances[f]))if(fu(c)){let v=(c.__vccOpts||c)[t];v&&r.push(In(v,s,i,u,f,o))}else{let v=c();r.push(()=>v.then(h=>{if(!h)throw new Error(`Couldn't resolve component "${f}" at "${u.path}"`);let y=Mh(h)?h.default:h;u.mods[f]=h,u.components[f]=y;let g=(y.__vccOpts||y)[t];return g&&In(g,s,i,u,f,o)()}))}}return r}function Ou(e,t){let s=[],i=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let u=0;u<r;u++){let f=t.matched[u];f&&(e.matched.find(v=>lo(v,f))?i.push(f):s.push(f));let c=e.matched[u];c&&(t.matched.find(v=>lo(v,c))||o.push(c))}return[s,i,o]}var eg=()=>location.protocol+"//"+location.host;function Hu(e,t){let{pathname:s,search:i,hash:o}=t,r=e.indexOf("#");if(r>-1){let u=o.includes(e.slice(r))?e.slice(r).length:1,f=o.slice(u);return f[0]!=="/"&&(f="/"+f),wa(f,"")}return wa(s,e)+i+o}function tg(e,t,s,i){let o=[],r=[],u=null,f=({state:g})=>{let C=Hu(e,location),w=s.value,S=t.value,N=0;if(g){if(s.value=C,t.value=g,u&&u===w){u=null;return}N=S?g.position-S.position:0}else i(C);o.forEach(b=>{b(s.value,w,{delta:N,type:Wi.pop,direction:N?N>0?Ki.forward:Ki.back:Ki.unknown})})};function c(){u=s.value}function v(g){o.push(g);let C=()=>{let w=o.indexOf(g);w>-1&&o.splice(w,1)};return r.push(C),C}function h(){if(document.visibilityState==="hidden"){let{history:g}=window;if(!g.state)return;g.replaceState(Ze({},g.state,{scroll:_s()}),"")}}function y(){for(let g of r)g();r=[],window.removeEventListener("popstate",f),window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",h)}return window.addEventListener("popstate",f),window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",h),{pauseListeners:c,listen:v,destroy:y}}function Mu(e,t,s,i=!1,o=!1){return{back:e,current:t,forward:s,replaced:i,position:window.history.length,scroll:o?_s():null}}function ng(e){let{history:t,location:s}=window,i={value:Hu(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(c,v,h){let y=e.indexOf("#"),g=y>-1?(s.host&&document.querySelector("base")?e:e.slice(y))+c:eg()+e+c;try{t[h?"replaceState":"pushState"](v,"",g),o.value=v}catch(C){console.error(C),s[h?"replace":"assign"](g)}}function u(c,v){r(c,Ze({},t.state,Mu(o.value.back,c,o.value.forward,!0),v,{position:o.value.position}),!0),i.value=c}function f(c,v){let h=Ze({},o.value,t.state,{forward:c,scroll:_s()});r(h.current,h,!0),r(c,Ze({},Mu(i.value,c,null),{position:h.position+1},v),!1),i.value=c}return{location:i,state:o,push:f,replace:u}}function ju(e){e=Su(e);let t=ng(e),s=tg(e,t.state,t.location,t.replace);function i(r,u=!0){u||s.pauseListeners(),history.go(r)}let o=Ze({locatLine truncated
`).forEach((F,E)=>{for(let[L,W]of C){let j=L.exec(F);if(j&&!/^(if|for|while|switch|return|catch)$/.test(j[1])){I.push({name:j[1],kind:W,line:E+1});break}}}),w={content:e.content,list:I.slice(0,300)},w.list},e.goToSymbol=function(I){e.symbolsOpen=!1;let F=e.codeEditor;F&&(F.scrollToLine(I-1,!0,!0,()=>{}),F.gotoLine(I,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+I),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){e.codeEditor&&(e.moreOpen=!1,e.gotoError="",e.gotoValue=String(e.codeEditor.getCursorPosition().row+1),e.gotoOpen=!0,setTimeout(()=>{let I=window.document.getElementById("goto-input");I&&(I.focus(),I.select())},0))},e.closeGoto=function(){e.gotoOpen=!1,e.gotoError="",e.codeEditor?.focus()},e.submitGoto=function(){let I=e.codeEditor;if(!I)return;let F=/^\s*:?\s*(\d+)\s*(?:[:,]\s*(\d+))?\s*$/.exec(e.gotoValue||""),E=I.session.getLength();if(!F||+F[1]<1||+F[1]>E){e.gotoError="Enter a line from 1 to "+E;return}I.gotoLine(+F[1],F[2]?Math.max(0,+F[2]-1):0,!0),e.gotoOpen=!1,e.gotoError="",I.focus()},e.rootEntries=function(){return[...e.files||[]].sort((I,F)=>{let E=I.size==null,L=F.size==null;return E!==L?E?-1:1:I.name.localeCompare(F.name)})},e.formatSize=function(I){if(I==null)return"";if(I<1024)return I+" B";let F=I/1024,E=L=>L.toFixed(1).replace(/\.0$/,"");return F<1024?E(F)+" KB":F<1024*1024?E(F/1024)+" MB":E(F/1024/1024)+" GB"},e.fileSize=function(I){if(!I)return null;let F=I.replace(/^\/+/,""),E=(e.files||[]).find(L=>(L.path?L.path+"/":"")+L.name===F);return E&&E.size!=null?E.size:null},e.revealFolder=function(I){e.sidebarHidden=!1,e.sidebarCollapsed=!1,ze(()=>{let F=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(I):I)+'"]');F&&(F.closest("li")?.classList.contains("open")||F.click(),F.scrollIntoView({block:"nearest"}),F.focus())})};let S={content:null,n:0},N=I=>{if(S.content===I)return S.n;let F=I;if(typeof F=="string")try{F=JSON.parse(F)}catch{F=null}let E=[],L=j=>{Array.isArray(j)?E.push(j.join("")):typeof j=="string"&&E.push(j)};(F&&(F.cells||(F.worksheets||[]).flatMap(j=>j.cells||[]))||[]).forEach(j=>{L(j?.source??j?.input),(j?.outputs||[]).forEach(Y=>{L(Y?.text),Y?.data&&(L(Y.data["text/plain"]),L(Y.data["text/markdown"]),L(Y.data["text/html"])),L(Y?.traceback)})});let W=E.reduce((j,Y)=>j+(Y.match(s)||[]).length,0);return S={content:I,n:W},W};e.redactionCount=function(){return e.type==="IPython"?N(e.content):typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(s)||[]).length},e.renderRedacted=Bs;let b=I=>I.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(I){let F=e.renderRedacted(I);if(!F||typeof window.DOMParser!="function")return F;let E=new window.DOMParser().parseFromString("<div>"+F+"</div>","text/html"),L={};return E.querySelectorAll("h1, h2, h3").forEach(W=>{let j=W.id||b(W.textContent);L[j]?j+="-"+ ++L[j]:L[j]=1,W.id=j}),E.body.firstChild.innerHTML};let T={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(T.content===e.content)return T.list;let F=[...new window.DOMParser().parseFromString("<div>"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"</div>","text/html").querySelectorAll("h2, h3")].map(E=>({id:E.id,text:E.textContent.trim(),level:E.tagName==="H3"?3:2})).slice(0,40);return T={content:e.content,list:F},F},e.activeHeading=null,o(window,"scroll",()=>{let I=e.readmeToc?e.readmeToc():[];if(!I.length)return;let F=150,E="",L="";for(let W of I){let j=window.document.getElementById(W.id);if(!j)continue;let Y=j.getBoundingClientRect().top;Y<F?E=W.id:!L&&Y<window.innerHeight-80&&(L=W.id)}L&&(E=L),e.activeHeading!==E&&(e.activeHeading=E)},{capture:!0,passive:!0}),e.scrollToHeading=function(I){if(!I){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let F=window.document.getElementById(I);F&&F.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=I},e.csvView="table";let M={content:null,rows:[]},_=(I,F)=>{let E=[],L=[],W="",j=!1;for(let Y=0;Y<I.length;Y++){let ne=I[Y];j?ne==='"'?I[Y+1]==='"'?(W+='"',Y++):j=!1:W+=ne:ne==='"'&&W===""?j=!0:ne===F?(L.push(W),W=""):ne===`
`||ne==="\r"?(ne==="\r"&&I[Y+1]===`
`&&Y++,L.push(W),E.push(L),L=[],W=""):W+=ne}return(W!==""||L.length)&&(L.push(W),E.push(L)),E.filter(Y=>Y.length>1||Y[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(M.content!==e.content){let I=/\.tsv$/i.test(e.filePath||"")?" ":",";M={content:e.content,rows:_(e.content,I)}}return M.rows},e.csvNumCol=I=>{let F=e.csvRows().slice(1).map(E=>E[I]).filter(E=>E!=null&&String(E).trim()!=="");return F.length>0&&F.every(E=>e.csvNumeric(E))},e.csvNumeric=I=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(I)&&/\d/.test(I),e.redactParts=function(I){let F=[],E=0,L,W=/\bXXXX-(\d+)\b/g;for(I=String(I||"");L=W.exec(I);)L.index>E&&F.push({t:I.slice(E,L.index)}),F.push({n:L[1]}),E=L.index+L[0].length;return E<I.length&&F.push({t:I.slice(E)}),F},e.pathCopied=!1,e.copyPath=async function(){window.navigator.clipboard?.writeText&&(await window.navigator.clipboard.writeText(e.filePath||""),e.pathCopied=!0,setTimeout(()=>{e.pathCopied=!1},1600))},e.contentCopied=!1,e.copyContent=async function(){if(typeof e.content!="string"||!window.navigator.clipboard?.writeText)return;let I=e.content;if(e.type==="html"&&e.url)if(e.preview)I=e.sourceContent;else try{I=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(I),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function H(I){return r[I]?r[I]:I}function se(I){return I=="pdf"?"pdf":I=="html"||I=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(I)?"md":I=="org"?"org":I=="ipynb"?"IPython":u.indexOf(I)>-1?"text":f.indexOf(I)>-1?"image":v.indexOf(I)>-1?"media":c.indexOf(I)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(I){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=I,e.paths=I.split("/").filter(Boolean);let F=e.filePath.toLowerCase(),E=F.lastIndexOf(".");E>-1&&(F=F.substring(E+1));let L={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},W=H(F);e.languageName=L[W]??(W?W.charAt(0).toUpperCase()+W.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:H(F),onLoad:function(j){e.codeEditor=mn(j);{let Re=j.session,Se=Re.getTokens.bind(Re),J=/\bXXXX-\d+\b/g;if(Re.getTokens=function(ce){let ue=Se(ce);if(!ue.some(be=>be.value.indexOf("XXXX-")!==-1))return ue;let he=[];for(let be of ue){if(be.value.indexOf("XXXX-")===-1){he.push(be);continue}let Oe=0;J.lastIndex=0;let D;for(;D=J.exec(be.value);)D.index>Oe&&he.push({type:be.type,value:be.value.slice(Oe,D.index)}),he.push({type:"redacted.n"+D[0].slice(5),value:D[0]}),Oe=D.index+D[0].length;Oe<be.value.length&&he.push({type:be.type,value:be.value.slice(Oe)})}return he},!window.document.getElementById("redact-index-rules")){let ce=window.document.createElement("style");ce.id="redact-index-rules",ce.textContent=Array.from({length:99},(ue,he)=>`.ace_redacted.ace_n${he+1}::after{content:"${he+1}"}`).join(""),window.document.head.appendChild(ce)}j.renderer.updateFull(!0)}j.session.setUseWrapMode(e.wrapLines!==!1);let Y=j.container.closest?.(".file-card"),ne=()=>{if(!Y)return;let Re=j.renderer,Se=(Re.layerConfig?.width||0)-(Re.$size?.scrollerWidth||0);Y.classList.toggle("at-right-edge",Se<=2||Re.getScrollLeft()>=Se-2)};j.session.on("changeScrollLeft",ne),j.renderer.on("afterRender",ne),window.matchMedia?.("(max-width: 767px)").matches&&j.setOption("hScrollBarAlwaysVisible",!0);let x=ace.require("ace/range").Range,fe=null;function me(Re,Se){fe!==null&&(j.session.removeMarker(fe),fe=null),Re!=null&&(fe=j.session.addMarker(new x(Re,0,Se,1),"highlighted-line","fullLine"))}function Le(Re){let Se=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Se){me(null);return}let J=parseInt(Se[1])-1,ce=Se[2]?parseInt(Se[2])-1:J;me(J,ce),Re&&i.timeout(()=>{j.scrollToLine(J,!0,!0,function(){})},100)}Le(!0);let Ue=null;j.on("guttermousedown",function(Re){let Se=Re.getDocumentPosition().row,J=Re.domEvent&&Re.domEvent.shiftKey,ce=Se,ue=Se;J&&Ue!==null?(ce=Math.min(Ue,Se),ue=Math.max(Ue,Se)):Ue=Se;let he=ce===ue?`#L${ce+1}`:`#L${ce+1}-L${ue+1}`,be=window.location.pathname+window.location.search+he;e.preview||window.history.replaceState(null,"",be),me(ce,ue),Re.stop()});let Xe=o(window,"hashcha Line truncated
`);for(let y=0;y<h.length;y++){let g=h[y];if(g.startsWith("diff --git")){v(),c();continue}if(g.startsWith("--- ")){r&&r.lines.length&&v(),c().oldPath=g.replace(/^--- (a\/)?/,"").trim();continue}if(g.startsWith("+++ ")){c().newPath=g.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(g.startsWith("index ")||g.startsWith("similarity index")||g.startsWith("rename ")||g.startsWith("new file mode")||g.startsWith("deleted file mode")||g.startsWith("Binary files"))){if(g.startsWith("@@")){let C=g.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);C&&(u=parseInt(C[1],10),f=parseInt(C[2],10)),c().lines.push({kind:"hunk",oldNo:"",newNo:"",text:g});continue}r&&(g.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:f,text:g.slice(1)}),f++):g.startsWith("-")?(r.lines.push({kind:"remove",oldNo:u,newNo:"",text:g.slice(1)}),u++):(r.lines.push({kind:"ctx",oldNo:u,newNo:f,text:g.startsWith(" ")?g.slice(1):g}),u++,f++))}}return s(o,r),o.join("")}})({trustAsHtml:e=>e});function Aa(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function Pg(e,t="EUR"){let s=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:s%1?2:0,maximumFractionDigits:2}).format(s)}function Dg(e){return String(e??"").toUpperCase()}function Ag(e,t,s=0){return(e||[]).slice(s,s+t)}function Ig(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function Og(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,o)=>{for(let r of s){let u=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let f=r.split(".").reduce((v,h)=>v?.[h],i),c=r.split(".").reduce((v,h)=>v?.[h],o);if(typeof f=="string"&&(f=f.toLowerCase()),typeof c=="string"&&(c=c.toLowerCase()),f!==c)return(f==null?-1:c==null?1:f<c?-1:1)*u}return 0})}function or(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 Mg(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function sr(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),s=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(s))return"";let i=s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),o=new Date;o.setHours(0,0,0,0);let r=Math.round((s-o)/864e5),u;if(r===0)u="today";else if(r===1)u="tomorrow";else if(r===-1)u="yesterday";else{let f=Math.abs(r),c=Math.round(f/30.44),v=f<14?[f,"day"]:f<60?[Math.round(f/7),"week"]:c<18?[c,"month"]:[Math.round(f/365.25),"year"],h=v[0]+" "+v[1]+(v[0]===1?"":"s");u=r>0?"in "+h:h+" ago"}return i+" \xB7 "+u}function _n(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let s=e/1e3;if(s<60)return+(s<10?s.toFixed(2):s.toFixed(1))+t+"s";let i=r=>String(r).padStart(2,"0"),o=Math.round(s);return o<3600?Math.floor(o/60)+"m "+i(o%60)+"s":Math.floor(o/3600)+"h "+i(Math.floor(o%3600/60))+"m"}function Ia(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let s={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(s.year="numeric"),t.toLocaleDateString(void 0,s)}function Go(e){e.listLoading=!0,e.listLoaded===void 0&&(e.listLoaded=!1)}function Ma(e){e.listLoading=!1,e.listLoaded=!0}var rr=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function ar(e,{flags:t,keys:s,count:i,onChange:o=()=>{}}){if(e.segView=()=>{let r=t()||{};if(s.every(f=>!!r[f]))return"all";let u=s.filter(f=>!!r[f]);return u.length===1?u[0]:"custom"},e.setSegView=r=>{let u=t();if(u){for(let f of s)u[f]=r==="all"?!0:f===r;o()}},e.segCount=r=>r==="all"?s.reduce((u,f)=>u+i(f),0):i(r),t()&&e.segView()==="custom")for(let r of s)t()[r]=!0}var Xu=function(e,t,s){let i=wt(),o=Ht();oc(i,o),e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.repositories=[],e.total=-1,e.listLoaded=!1,e.listLoading=!0,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let r=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let N=document.querySelector('.admin-filter-toolbar input[type="search"]');N&&N.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=S=>{S==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[S]="",e.query.page=1},e.chips=[];let u=()=>{let S=[];e.query.owner&&S.push({key:" Line truncated
`&&Y++,L.push(W),E.push(L),L=[],W=""):W+=ne}return(W!==""||L.length)&&(L.push(W),E.push(L)),E.filter(Y=>Y.length>1||Y[0]!=="")};e.isCsv=()=>typeof e.content=="string"&&e.type!=="html"&&/\.(csv|tsv)$/i.test(e.filePath||"")&&e.content.length<=1024*1024,e.csvRows=()=>{if(M.content!==e.content){let I=/\.tsv$/i.test(e.filePath||"")?" ":",";M={content:e.content,rows:_(e.content,I)}}return M.rows},e.csvNumCol=I=>{let F=e.csvRows().slice(1).map(E=>E[I]).filter(E=>E!=null&&String(E).trim()!=="");return F.length>0&&F.every(E=>e.csvNumeric(E))},e.csvNumeric=I=>/^\s*[-+]?(\d[\d,]*)?(\.\d+)?(e[-+]?\d+)?%?\s*$/i.test(I)&&/\d/.test(I),e.redactParts=function(I){let F=[],E=0,L,W=/\bXXXX-(\d+)\b/g;for(I=String(I||"");L=W.exec(I);)L.index>E&&F.push({t:I.slice(E,L.index)}),F.push({n:L[1]}),E=L.index+L[0].length;return E<I.length&&F.push({t:I.slice(E)}),F},e.pathCopied=!1,e.copyPath=async function(){window.navigator.clipboard?.writeText&&(await window.navigator.clipboard.writeText(e.filePath||""),e.pathCopied=!0,setTimeout(()=>{e.pathCopied=!1},1600))},e.contentCopied=!1,e.copyContent=async function(){if(typeof e.content!="string"||!window.navigator.clipboard?.writeText)return;let I=e.content;if(e.type==="html"&&e.url)if(e.preview)I=e.sourceContent;else try{I=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(I),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function H(I){return r[I]?r[I]:I}function se(I){return I=="pdf"?"pdf":I=="html"||I=="htm"?"html-doc":["md","markdown","mdown","mkdn","mdx"].includes(I)?"md":I=="org"?"org":I=="ipynb"?"IPython":u.indexOf(I)>-1?"text":f.indexOf(I)>-1?"image":v.indexOf(I)>-1?"media":c.indexOf(I)>-1?"audio":"code"}e.downloadUrl=()=>e.preview?e.url:e.url+"&download=true",e.prepareFile=function(I){e.showSource=!1,e.allowScripts=!1,e.imageSize="",e.filePath=I,e.paths=I.split("/").filter(Boolean);let F=e.filePath.toLowerCase(),E=F.lastIndexOf(".");E>-1&&(F=F.substring(E+1));let L={javascript:"JavaScript",typescript:"TypeScript",tsx:"TSX",jsx:"JSX",python:"Python",java:"Java",c_cpp:"C/C++",csharp:"C#",golang:"Go",rust:"Rust",ruby:"Ruby",php:"PHP",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",yaml:"YAML",markdown:"Markdown",sh:"Shell",dockerfile:"Dockerfile",xml:"XML",sql:"SQL",kotlin:"Kotlin",swift:"Swift",scala:"Scala",r:"R",julia:"Julia",latex:"LaTeX",toml:"TOML",csv:"CSV",tsv:"TSV",text:""},W=H(F);e.languageName=L[W]??(W?W.charAt(0).toUpperCase()+W.slice(1):""),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:window.matchMedia?.("(max-width: 767px)").matches?12:13,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!1,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:H(F),onLoad:function(j){e.codeEditor=mn(j);{let Re=j.session,Se=Re.getTokens.bind(Re),J=/\bXXXX-\d+\b/g;if(Re.getTokens=function(ce){let ue=Se(ce);if(!ue.some(be=>be.value.indexOf("XXXX-")!==-1))return ue;let he=[];for(let be of ue){if(be.value.indexOf("XXXX-")===-1){he.push(be);continue}let Oe=0;J.lastIndex=0;let D;for(;D=J.exec(be.value);)D.index>Oe&&he.push({type:be.type,value:be.value.slice(Oe,D.index)}),he.push({type:"redacted.n"+D[0].slice(5),value:D[0]}),Oe=D.index+D[0].length;Oe<be.value.length&&he.push({type:be.type,value:be.value.slice(Oe)})}return he},!window.document.getElementById("redact-index-rules")){let ce=window.document.createElement("style");ce.id="redact-index-rules",ce.textContent=Array.from({length:99},(ue,he)=>`.ace_redacted.ace_n${he+1}::after{content:"${he+1}"}`).join(""),window.document.head.appendChild(ce)}j.renderer.updateFull(!0)}j.session.setUseWrapMode(e.wrapLines!==!1);let Y=j.container.closest?.(".file-card"),ne=()=>{if(!Y)return;let Re=j.renderer,Se=(Re.layerConfig?.width||0)-(Re.$size?.scrollerWidth||0);Y.classList.toggle("at-right-edge",Se<=2||Re.getScrollLeft()>=Se-2)};j.session.on("changeScrollLeft",ne),j.renderer.on("afterRender",ne),window.matchMedia?.("(max-width: 767px)").matches&&j.setOption("hScrollBarAlwaysVisible",!0);let x=ace.require("ace/range").Range,fe=null;function me(Re,Se){fe!==null&&(j.session.removeMarker(fe),fe=null),Re!=null&&(fe=j.session.addMarker(new x(Re,0,Se,1),"highlighted-line","fullLine"))}function Le(Re){let Se=!e.preview&&window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!Se){me(null);return}let J=parseInt(Se[1])-1,ce=Se[2]?parseInt(Se[2])-1:J;me(J,ce),Re&&i.timeout(()=>{j.scrollToLine(J,!0,!0,function(){})},100)}Le(!0);let Ue=null;j.on("guttermousedown",function(Re){let Se=Re.getDocumentPosition().row,J=Re.domEvent&&Re.domEvent.shiftKey,ce=Se,ue=Se;J&&Ue!==null?(ce=Math.min(Ue,Se),ue=Math.max(Ue,Se)):Ue=Se;let he=ce===ue?`#L${ce+1}`:`#L${ce+1}-L${ue+1}`,be=window.location.pathname+window.location.search+he;e.preview||window.history.replaceState(null,"",be),me(ce,ue),Re.stop()});let Xe=o(window,"hashcha Line truncated
`);for(let y=0;y<h.length;y++){let g=h[y];if(g.startsWith("diff --git")){v(),c();continue}if(g.startsWith("--- ")){r&&r.lines.length&&v(),c().oldPath=g.replace(/^--- (a\/)?/,"").trim();continue}if(g.startsWith("+++ ")){c().newPath=g.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(g.startsWith("index ")||g.startsWith("similarity index")||g.startsWith("rename ")||g.startsWith("new file mode")||g.startsWith("deleted file mode")||g.startsWith("Binary files"))){if(g.startsWith("@@")){let C=g.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);C&&(u=parseInt(C[1],10),f=parseInt(C[2],10)),c().lines.push({kind:"hunk",oldNo:"",newNo:"",text:g});continue}r&&(g.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:f,text:g.slice(1)}),f++):g.startsWith("-")?(r.lines.push({kind:"remove",oldNo:u,newNo:"",text:g.slice(1)}),u++):(r.lines.push({kind:"ctx",oldNo:u,newNo:f,text:g.startsWith(" ")?g.slice(1):g}),u++,f++))}}return s(o,r),o.join("")}})({trustAsHtml:e=>e});function Aa(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function Pg(e,t="EUR"){let s=Number(e)||0;return new Intl.NumberFormat(void 0,{style:"currency",currency:t,minimumFractionDigits:s%1?2:0,maximumFractionDigits:2}).format(s)}function Dg(e){return String(e??"").toUpperCase()}function Ag(e,t,s=0){return(e||[]).slice(s,s+t)}function Ig(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function Og(e,t){if(!t)return e||[];let s=Array.isArray(t)?t:[t];return[...e||[]].sort((i,o)=>{for(let r of s){let u=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let f=r.split(".").reduce((v,h)=>v?.[h],i),c=r.split(".").reduce((v,h)=>v?.[h],o);if(typeof f=="string"&&(f=f.toLowerCase()),typeof c=="string"&&(c=c.toLowerCase()),f!==c)return(f==null?-1:c==null?1:f<c?-1:1)*u}return 0})}function or(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 Mg(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}function sr(e){if(!e)return"";let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e)),s=t?new Date(+t[1],+t[2]-1,+t[3]):new Date(e);if(isNaN(s))return"";let i=s.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),o=new Date;o.setHours(0,0,0,0);let r=Math.round((s-o)/864e5),u;if(r===0)u="today";else if(r===1)u="tomorrow";else if(r===-1)u="yesterday";else{let f=Math.abs(r),c=Math.round(f/30.44),v=f<14?[f,"day"]:f<60?[Math.round(f/7),"week"]:c<18?[c,"month"]:[Math.round(f/365.25),"year"],h=v[0]+" "+v[1]+(v[0]===1?"":"s");u=r>0?"in "+h:h+" ago"}return i+" \xB7 "+u}function _n(e){if(e==null||e===""||isNaN(e))return"";e=Number(e);let t="\u202F";if(e<1e3)return+(e<10?e.toFixed(2):e<100?e.toFixed(1):Math.round(e))+t+"ms";let s=e/1e3;if(s<60)return+(s<10?s.toFixed(2):s.toFixed(1))+t+"s";let i=r=>String(r).padStart(2,"0"),o=Math.round(s);return o<3600?Math.floor(o/60)+"m "+i(o%60)+"s":Math.floor(o/3600)+"h "+i(Math.floor(o%3600/60))+"m"}function Ia(e){if(!e)return"";let t=new Date(e);if(isNaN(t))return"";let s={day:"numeric",month:"short"};return t.getFullYear()!==new Date().getFullYear()&&(s.year="numeric"),t.toLocaleDateString(void 0,s)}function Go(e){e.listLoading=!0,e.listLoaded===void 0&&(e.listLoaded=!1)}function Ma(e){e.listLoading=!1,e.listLoaded=!0}var rr=e=>["preparing","download","downloading","downloaded","queue","anonymizing"].includes(e)?"preparing":e==="expiring"?"expired":e==="removing"?"removed":e;function ar(e,{flags:t,keys:s,count:i,onChange:o=()=>{}}){if(e.segView=()=>{let r=t()||{};if(s.every(f=>!!r[f]))return"all";let u=s.filter(f=>!!r[f]);return u.length===1?u[0]:"custom"},e.setSegView=r=>{let u=t();if(u){for(let f of s)u[f]=r==="all"?!0:f===r;o()}},e.segCount=r=>r==="all"?s.reduce((u,f)=>u+i(f),0):i(r),t()&&e.segView()==="custom")for(let r of s)t()[r]=!0}var Qu=function(e,t,s){let i=wt(),o=Ht();sc(i,o),e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.repositories=[],e.total=-1,e.listLoaded=!1,e.listLoading=!0,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let r=S=>{if(S.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){S.preventDefault();let N=document.querySelector('.admin-filter-toolbar input[type="search"]');N&&N.focus()}};o(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=S=>{S==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[S]="",e.query.page=1},e.chips=[];let u=()=>{let S=[];e.query.owner&&S.push({key:" Line truncated
`+S.join(`
`)],{type:"text/csv"}),b=document.createElement("a");b.href=URL.createObjectURL(N),b.download=i.username+"-repositories.csv",b.click()},e.showStatusMessage=g=>{let C=g.statusMessage||"(no message)";window.prompt(`Status message for ${g.repoId} (${g.status}):`,C)},e.fetchGithubInfo=g=>{let C=window.open("","_blank");C&&C.document.write("<pre>Loading GitHub info for "+g.repoId+"...</pre>"),t.get("/api/admin/repos/"+g.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,S=>S==="<"?"&lt;":"&gt;")+"</pre>"),C.document.close())},w=>{let S=w&&w.data?JSON.stringify(w.data,null,2):String(w);C&&(C.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+S+"</pre>")})};function c(g){t.get("/api/admin/users/"+g+"/repos",{}).then(C=>{e.repositories=C.data},C=>{console.error(C)})}function v(g){t.get("/api/admin/users/"+g,{}).then(C=>{e.userInfo=C.data},C=>{console.error(C)})}v(i.username),c(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>v(i.username),g=>console.error(g))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>v(i.username),g=>console.error(g))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>v(i.username),g=>console.error(g))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>v(i.username),g=>console.error(g))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function h(){t.get("/api/admin/tokens").then(g=>{e.tokens=g.data||[]},g=>{g.status!==401&&g.status!==403&&console.error(g)})}h(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(g=>{e.tokenForm.plaintext=g.data.token,e.tokenForm.name="",h()},g=>console.error(g))},e.revokeToken=g=>{confirm(`Revoke token "${g.name}"?`)&&t.delete("/api/admin/tokens/"+g.id).then(()=>h(),C=>console.error(C))},e.removeCache=g=>{confirm("Remove cached files for "+g.repoId+"?")&&t.delete("/api/admin/repos/"+g.repoId).then(()=>c(i.username),C=>console.error(C))},e.removeRepository=g=>{confirm("Remove repository "+g.repoId+"?")&&t.delete("/api/repo/"+g.repoId+"/").then(()=>c(i.username),C=>console.error(C))},e.updateRepository=g=>{let C=rt({title:`Refreshing ${g.repoId}...`,date:new Date,body:`The repository ${g.repoId} is going to be refreshed.`});e.toasts.push(C),t.post(`/api/repo/${g.repoId}/refresh`).then(w=>{w.data.status=="ready"?C.title=`${g.repoId} is refreshed.`:C.title=`Refreshing of ${g.repoId}.`},w=>{C.title=`Error during the refresh of ${g.repoId}.`,C.body=w.body})},e.getGitHubRepositories=g=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(C=>{e.userInfo.repositories=C.data})};let y=null;e.watch("query",()=>{o.timeout.cancel(y),y=o.timeout(()=>{c(i.username)},500)},!0)},xu=function(e,t,s){let i=wt(),o=Ht();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.listLoaded=!1,e.listLoading=!0,e.totalPage=0,e.statusCounts=[];let r=w=>{if(w.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){w.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};o(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 u=()=>{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 S=(e.statusCounts||[]).find(N=>N._id===w);return S?S.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 f="admin.conferences.filterPrefs",c={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},v=loadFilterPrefs(f)||{};e.query=Object.assign({},c,v,{page:1,search:""});let h=s.search();h.search&&(e.query.search=h.search);let y="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let w=window.prompt("Preset name:");if(!w)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==w),e.presets.push({name:w,query:S}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=w=>{Object.assign(e.query,w.query,{page:1})},e.deletePreset=w=>{e.presets=(e.presets||[]).filter(S=>S.name!== Line truncated
`)],{type:"text/csv"}),b=document.createElement("a");b.href=URL.createObjectURL(N),b.download=i.username+"-repositories.csv",b.click()},e.showStatusMessage=g=>{let C=g.statusMessage||"(no message)";window.prompt(`Status message for ${g.repoId} (${g.status}):`,C)},e.fetchGithubInfo=g=>{let C=window.open("","_blank");C&&C.document.write("<pre>Loading GitHub info for "+g.repoId+"...</pre>"),t.get("/api/admin/repos/"+g.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,S=>S==="<"?"&lt;":"&gt;")+"</pre>"),C.document.close())},w=>{let S=w&&w.data?JSON.stringify(w.data,null,2):String(w);C&&(C.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+S+"</pre>")})};function c(g){t.get("/api/admin/users/"+g+"/repos",{}).then(C=>{e.repositories=C.data},C=>{console.error(C)})}function v(g){t.get("/api/admin/users/"+g,{}).then(C=>{e.userInfo=C.data},C=>{console.error(C)})}v(i.username),c(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>v(i.username),g=>console.error(g))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>v(i.username),g=>console.error(g))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>v(i.username),g=>console.error(g))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>v(i.username),g=>console.error(g))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function h(){t.get("/api/admin/tokens").then(g=>{e.tokens=g.data||[]},g=>{g.status!==401&&g.status!==403&&console.error(g)})}h(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(g=>{e.tokenForm.plaintext=g.data.token,e.tokenForm.name="",h()},g=>console.error(g))},e.revokeToken=g=>{confirm(`Revoke token "${g.name}"?`)&&t.delete("/api/admin/tokens/"+g.id).then(()=>h(),C=>console.error(C))},e.removeCache=g=>{confirm("Remove cached files for "+g.repoId+"?")&&t.delete("/api/admin/repos/"+g.repoId).then(()=>c(i.username),C=>console.error(C))},e.removeRepository=g=>{confirm("Remove repository "+g.repoId+"?")&&t.delete("/api/repo/"+g.repoId+"/").then(()=>c(i.username),C=>console.error(C))},e.updateRepository=g=>{let C=rt({title:`Refreshing ${g.repoId}...`,date:new Date,body:`The repository ${g.repoId} is going to be refreshed.`});e.toasts.push(C),t.post(`/api/repo/${g.repoId}/refresh`).then(w=>{w.data.status=="ready"?C.title=`${g.repoId} is refreshed.`:C.title=`Refreshing of ${g.repoId}.`},w=>{C.title=`Error during the refresh of ${g.repoId}.`,C.body=w.body})},e.getGitHubRepositories=g=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(C=>{e.userInfo.repositories=C.data})};let y=null;e.watch("query",()=>{o.timeout.cancel(y),y=o.timeout(()=>{c(i.username)},500)},!0)},ec=function(e,t,s){let i=wt(),o=Ht();e.Math=Math,e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),e.conferences=[],e.total=-1,e.listLoaded=!1,e.listLoading=!0,e.totalPage=0,e.statusCounts=[];let r=w=>{if(w.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){w.preventDefault();let S=document.querySelector('.admin-filter-toolbar input[type="search"]');S&&S.focus()}};o(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 u=()=>{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 S=(e.statusCounts||[]).find(N=>N._id===w);return S?S.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 f="admin.conferences.filterPrefs",c={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!0,error:!0,preparing:!0},v=loadFilterPrefs(f)||{};e.query=Object.assign({},c,v,{page:1,search:""});let h=s.search();h.search&&(e.query.search=h.search);let y="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(y)||"[]"),e.savePreset=()=>{let w=window.prompt("Preset name:");if(!w)return;let S=Object.assign({},e.query);delete S.page,e.presets=(e.presets||[]).filter(N=>N.name!==w),e.presets.push({name:w,query:S}),localStorage.setItem(y,JSON.stringify(e.presets))},e.applyPreset=w=>{Object.assign(e.query,w.query,{page:1})},e.deletePreset=w=>{e.presets=(e.presets||[]).filter(S=>S.name!== Line truncated
`):typeof z.stack=="string"?z.stack:null;for(var I=[z.cause,z.err].filter(Boolean),F=0;!L&&F<I.length;F++)for(var E=I[F];!L&&E&&typeof E=="object";)typeof E.stack=="string"&&(L=E.stack),E=E.cause;q._stack=L}else q.displayMessage=q.message,q._status=null,q._url=null,q._stack=null;return q._bucket=g(z,q.level),q._detailJson=w(q,z),q}function w(q,z){let I=[],F=(j,Y)=>{Y==null||Y===""||I.push([j,Y])};for(let j of["service","event","severity","requestId","jobId"])F(j,z&&z[j]);F("name",z&&z.name),F("code",q.displayMessage||z&&z.message),q._bucket&&F("kind",q._bucket),F("httpStatus",z&&z.httpStatus),z&&z.status&&!z.httpStatus&&F("status",z.status),F("module",q.module);let E=z&&z.detail;if(typeof E=="string"){let j=E.trim();if(j[0]==="{"||j[0]==="[")try{E=JSON.parse(E)}catch{}}if(F("detail",E),F("repoId",z&&z.repoId),F("filePath",z&&z.filePath),F("upstreamStatus",z&&z.upstreamStatus),F("upstreamBody",z&&z.upstreamBody),F("url",q._url),F("err",z&&z.err),F("cause",z&&!z.err&&z.cause),F("ts",q.ts),!I.length)return JSON.stringify(q,null,2);let L=I.reduce((j,Y)=>Math.max(j,Y[0].length),0),W=["{"];return I.forEach(([j,Y],ne)=>{let fe=` ${`"${j}":`.padEnd(L+3," ")} `,me=ne<I.length-1?",":"",Le;if(Y&&typeof Y=="object"){let Ue=" ".repeat(fe.length);Le=JSON.stringify(Y,null,2).split(`
`).map((Xe,He)=>He===0?Xe:Ue+Xe).join(`
`)}else typeof Y=="number"||typeof Y=="boolean"?Le=String(Y):Le=JSON.stringify(Y);W.push(`${fe}${Le}${me}`)}),W.push("}"),W.join(`
`)}function S(q){let z=[],I="",F=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,E=0,L;for(;L=F.exec(q);)I+=q.slice(E,L.index),E=F.lastIndex,z.push({key:L[1],op:L[2]||"=",val:L[3]});return I+=q.slice(E),{filters:z,free:I.trim().toLowerCase()}}function N(q,z){for(let I of z.filters){let F=(L,W,j)=>{let Y=parseFloat(L),ne=parseFloat(W);return j==="="?String(L)===String(W):j==="!="?String(L)!==String(W):j===">="?Y>=ne:j==="<="?Y<=ne:j===">"?Y>ne:j==="<"?Y<ne:!0},E;if(I.key==="code")E=q.displayMessage;else if(I.key==="module")E=q.module;else if(I.key==="status")E=q._status;else if(I.key==="url")E=q._url;else if(I.key==="repo")E=q._repoId;else if(I.key==="level")E=q.level;else continue;if(E==null||!F(E,I.val,I.op))return!1}return!(z.free&&((q.displayMessage||"")+" "+(q.module||"")+" "+(q._url||"")+" "+JSON.stringify(q.raw||[])).toLowerCase().indexOf(z.free)===-1)}function b(){let q=S(e.query.search||"");e.parsedFilterCount=q.filters.length;let z=e.query.bucket,I=e.entries.filter(j=>z&&j._bucket!==z?!1:N(j,q)),F=e.query.group;if(F){let j=x=>JSON.stringify(F==="module"?[x.module,x._bucket]:[x.raw?.[0]?.service||"unknown",x.module,x.displayMessage||x.message||"_",x._bucket,x._status]),Y=new Map;for(let x of I){let fe=j(x);if(Y.has(fe)){let me=Y.get(fe);me.count++,me._related.push(x),new Date(x.ts)>new Date(me.ts)&&(me.ts=x.ts,me._url=x._url,me._status=x._status),new Date(x.ts)<new Date(me._firstSeen)&&(me._firstSeen=x.ts)}else{let me=Object.assign({},x);me._key=`${F}:${fe}`,me._related=[x],me._firstSeen=x.ts,me._lastHourCount=0,me.count=1,Y.set(fe,me)}}let ne=Date.now()-3600*1e3;for(let x of Y.values())x._lastHourCount=x._related.filter(fe=>new Date(fe.ts).getTime()>=ne).length;I=Array.from(Y.values())}else I=I.map((j,Y)=>(j._key="row:"+Y+":"+j.ts,j._related=[j],j._firstSeen=j.ts,j._lastHourCount=0,j.count=1,j));let E=j=>({error:0,warn:1,info:2})[j._bucket]??1;e.query.sort==="count"?I.sort((j,Y)=>E(j)-E(Y)||Y.count-j.count||new Date(Y.ts)-new Date(j.ts)):I.sort((j,Y)=>E(j)-E(Y)||new Date(Y.ts)-new Date(j.ts)),e.visible=I;let L=!!(e.query.bucket||(e.query.search||"").trim()),W=!L&&(e.stats?.severity?.error||0)>0&&!I.some(j=>j._bucket==="error")&&e.entries.length<1500;(L&&!I.length||W)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,T(!0))}function T(q){if(q&&e.redisLoading)return;let z=++o;e.redisLoading=!0;let I=q?e.redisNextOffset||e.entries.length:0,F=q?e.pageSize:Math.max(e.pageSize,e.redisNextOffset||e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:I,limit:F}}).then(E=>{if(f||z!==o)return;e.redisLoading=!1;let L=(E.data.entries||[]).map(C);e.entries=q?e.entries.concat(L):L,e.redisRedacted=(q&&e.redisRedacted||0)+(E.data.redactedEntries||0),e.redisNextOffset=E.data.nextOffset??I+(E.data.entries||[]).length,e.available=!!E.data.available,e.redisCollecting=E.data.redisCollecting!==!1,e.cap=E.data.max||e.cap,e.total=E.data.total||e.entries.length,e._autoLoading=!1,b()},()=>{f||z!==o||(e.redisLoading=!1,e._autoLoading=!1,e.available=!1)})}e.loadMore=()=>T(!0),e.canLoadMore=()=>(e.redisNextOffset||e.entries.length)<e.total;function M(q=!1){if(q&&u)return;let z=++r;u=!0,t.get("/api/admin/errors/stats").then(I=>{if(f||z!==r)return;u=!1;let F=I.data||{};e.redisStatsState=F.available===!1?"unavailable":"ready";let E=F.prev24h?Math.round((F.last24h-F.prev24h)/F.prev24h*100):0;e.stats={last24h:F.last24h||0,prev24h:F.prev24h||0,delta:E,severity:F.severity||{error:0,warn:0,info:0},unique:F.unique||{error:0,warn:0,info:0},buckets:F.buckets||[],dropped:F.dropped||0},b()},()=>{!f&&z===r&&(u=!1,e.redisStatsState="unavailable")})}function _(q=!1){(!q||!e.redisLoading)&&T(),M(q)}e.barPx=(q,z)=>{let I=e.stats.buckets||[],F=0,E=0;for(let Y of I)F=Math.max(F,(Y.error||0)+(Y.warn||0)),E=Math.max(E,Y.info||0);let L=q[z]||0;if(!L)return 0;if(z==="info")return E?Math.max(2,Math.round(L/E*(F?16:60))):0;let W=(q.error||0)+(q.warn||0),j=Math.round(W/F*44);return Math.max(4,Math.round(L/W*j))},e.bucketTitle=q=>`${new Date(q.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${q.error||0} err \xB7 ${q.warn||0} warn \xB7 ${q.info||0} info`,e.toggle=async(q,z)=>{v=z||document.activeElement,h=e.captureErrorScroll(v),e.historySelected=q,e.historyView="overview",e.expanded={[q._key]:!0},await ze(),document.getElementById("history-inspector-title")?.focus({preventScroll:!0}),document.getElementById("history-inspector-title")?.scrollIntoView?.({block:"nearest"})},e.showHistoryTimeline=q=>{if(e.historyView="timeline",e.traceSelection)return;let z=["requestId","jobId"].find(I=>e.logTraceId(e.historySelected,I));z&&e.lookupTrace(z,e.logTraceId(e.historySelected,z),q,e.historySelected)},e.closeHistory=async()=>{let q=e.historySelected?._key;e.historySelected=null,e.expanded={},e.traceSelection&&await e.closeTrace(),await ze(),(v?.isConnected?v:[...document.querySelectorAll("[data-history-key]")].find(I=>I.dataset.historyKey===q))?.focus({preventScroll:!0}),e.restoreErrorScroll(h)},e.setBucket=q Line truncated
`)],{type:"text/csv;charset=utf-8"}),F=URL.createObjectURL(I),E=document.createElement("a");E.href=F,E.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(E),E.click(),document.body.removeChild(E),URL.revokeObjectURL(F)};function H(q){e.copyHint=`${q} copied`,c.timeout(()=>{e.copyHint=""},1500)}e.copyJson=q=>{navigator.clipboard.writeText(q._rawJson).then(()=>H("JSON"))},e.copyCurl=q=>{if(!q._url)return;let I=`curl -X ${q._method||"GET"} '${window.location.origin}${q._url}'`;navigator.clipboard.writeText(I).then(()=>H("curl"))},_();let se=i(()=>{e.query.autoRefresh&&_(!0)},15e3);e.on("dispose",()=>{f=!0,o++,r++,i.cancel(se)}),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},nc=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.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(b){e.ovView=b;try{window.history.replaceState(null,"",b==="summary"?window.location.pathname:"#"+b)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var b=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:b}}).then(function(T){b===e.cacheMinutes&&(e.cacheReport=T.data,e.cacheError=T.data.available?null:T.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,b!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(b){return e.cacheTraffic==="all"||b.traffic===e.cacheTraffic})},e.cacheRate=function(b,T){var M=e.cacheRows(),_=function(q){return M.filter(function(z){return z.name===q}).reduce(function(z,I){return z+I[T]},0)},H=_(b+"_hit"),se=_(b+"_miss");return H+se?(100*H/(H+se)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(b){return b.replaceAll("_"," ")},e.cacheP95=function(b){var T=0,M=e.cacheReport?.latencyBucketsMs||[];if(!b.count)return"No samples";if(!b.ms)return"Not timed";for(var _=0;_<=M.length;_++)if(T+=b["b"+_]||0,T>=Math.ceil(b.count*.95))return _<M.length?"\u2264 "+_n(M[_]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let b=e.data&&e.data.system||{},T=[["Memory",b.memPercent],["Disk",b.diskPercent]].filter(([,_])=>_>90);return T.length?T.map(([_,H])=>_+" is at "+H+"%").join(" and ")+". New anonymizations may fail until "+(T.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(b){return b==null?"":_n(b)},e.latencyBound=function(b,T){return b.count?b[T]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(b[T]):"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(T){return T.instance===b.instance}).reduce(function(T,M){return Math.max(T,M.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 r=!1;e.loadPerformance=function(){var b=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==b&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:b}}).then(function(T){b===e.performanceMinutes&&(e.performance=T.data,e.performanceError=T.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(){r=!1,b!==e.performanceMinutes&&e.loadPerformance()}))};function u(b){if(b==null)return"\u2014";for(var T=["B","KB","MB","GB","TB"],M=0,_=b;_>=1024&&M<T.length-1;)_/=1024,M++;return _.toFixed(M>0?1:0).replace(/\.0$/,"")+" "+T[M]}e.humanBytes=u;function f(b){if(!b)return"\u2014";var T=Math.floor(b/86400),M=Math.floor(b%86400/3600),_=Math.floor(b%3600/60);return T>0?T+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(_<10?"0":"")+_+"m":_+"m"}e.humanDuration=f;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 T=e.data.repos.statusBreakdown||[],M=0;M<T.length;M++)if(T[M]._id===b)return T[M].count;return 0},e.barPct=function(b){var T=e.data&&e.data.repos?e.data.repos.total:0;if(!T)return 0;var M=[b];b==="expired"&&M.push("expiring"),b==="remov Line truncated
`)},e.tipSide=w=>{let S=(e.summary?.series||[]).length;return S<3?"":w<S/4?"tip-start":w>=S*3/4?"tip-end":""},e.bucketName=()=>({day:"day",week:"week",month:"month"})[e.summary?.bucket]||"day",e.seriesSales=()=>(e.summary?.series||[]).reduce((w,S)=>w+e.bucketTotal(S),0),e.plansWithActivity=()=>(e.summary?.plans||[]).filter(w=>w.active||w.allTimeSales||w.sales),e.familyLabel=w=>(ir.find(S=>S.id===w)||{}).label||"",e.familyPlans=w=>(e.summary?.plans||[]).filter(S=>S.family===w),e.familySum=(w,S)=>e.familyPlans(w).reduce((N,b)=>N+(b[S]||0),0),e.familyMoney=(w,S,N)=>{if(!e.revenueOn())return"\u2014";let b=e.familyPlans(w);return b.some(T=>T[N]===!1)?"Incomplete":e.moneyText(b.reduce((T,M)=>r(T,M[S]),{}))},e.planTotals=()=>{let w=S=>(e.summary?.plans||[]).reduce((N,b)=>N+(b[S]||0),0);return{active:w("active"),sales:w("sales"),allTimeSales:w("allTimeSales")}},e.webhookState=()=>{let w=e.summary?.webhooks;return w?w.failed||w.reconciliationFailed?"bad":w.oldestPendingSeconds>900||w.unreviewedRevocations?"warn":"ok":"ok"},e.age=w=>w?_n(w*1e3):"\u2014";let u=0;e.loadSummary=()=>{let w=++u;e.summaryLoading=!0,e.summaryError=null,t.get("/api/admin/billing/summary",{params:{period:e.period}}).then(S=>{if(w!==u)return;e.summaryLoading=!1;let N=S.data;if(!N||!N.subscriptions||!N.sales||!Array.isArray(N.plans)){e.summaryError="The billing summary had an unexpected format.";return}e.summary=N},S=>{w===u&&(e.summaryLoading=!1,e.summaryError=S&&S.data&&S.data.error||"Could not load billing figures.")})},e.setPeriod=w=>{if(e.period!==w){e.period=w;try{localStorage.setItem("admin.billing.period",w)}catch{}e.loadSummary()}},e.grants=[],e.total=-1,e.totalPage=0,e.stateCounts={},e.statuses=[],e.grantsError=null,e.filtersOpen=!1,e.query={page:1,limit:25,search:"",plan:"",status:"",state:"",period:"",sort:"purchasedAt",direction:"desc"};let f=s.search();f.search&&(e.query.search=f.search),e.stateView=()=>e.query.state||"all",e.setStateView=w=>{e.query.state=w==="all"?"":w,e.query.page=1},e.stateCount=w=>w==="all"?["active","expired","revoked"].reduce((S,N)=>S+(e.stateCounts[N]||0),0):e.stateCounts[w]||0,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":"",e.chips=[];let c=()=>{let w=[];e.query.plan&&w.push({key:"plan",label:"Plan",value:e.planName(e.query.plan)}),e.query.status&&w.push({key:"status",label:"Stripe status",value:e.query.status.replace(/_/g," ")}),e.query.period&&w.push({key:"period",label:"Started",value:"last "+((e.periods.find(S=>S.id===e.query.period)||{}).label||e.query.period)}),e.chips=w};e.clearFilter=w=>{e.query[w]="",e.query.page=1},e.filterPlan=w=>{Object.assign(e.query,{plan:w,page:1});let S=document.getElementById("bl-grants");S&&S.scrollIntoView&&S.scrollIntoView({behavior:"smooth",block:"start"})},e.clearFilters=()=>Object.assign(e.query,{search:"",plan:"",status:"",state:"",period:"",page:1}),e.hasFilters=()=>!!(e.query.search||e.query.plan||e.query.status||e.query.state||e.query.period),e.filterCount=()=>["plan","status","period"].filter(w=>e.query[w]).length,e.amountText=w=>{if(!w.amount)return"\u2014";let S=fo({[w.amount.currency]:w.amount.value})[0]||"\u2014";if(!w.amount.interval)return S;let N=w.amount.intervalCount>1?w.amount.intervalCount+" "+w.amount.interval+"s":w.amount.interval;return S+" / "+N},e.amountTitle=w=>w.amount?"Stripe list price"+(w.pack?" of the whole pack":""):{stripe_not_configured:"Revenue unavailable: Stripe is not configured on this server.",unresolved:"Revenue unavailable: this Stripe price could not be looked up.",unrecorded:"Revenue unavailable: no sale price was recorded for this subscription."}[w.amountMissing]||"Revenue unavailable.",e.endText=w=>{if(w.never)return"Never ends";if(!w.until)return"\u2014";let S=or(w.until);return w.state!=="active"?(new Date(w.until)<new Date?"Ended ":"Ends ")+S:w.subscription?(w.cancelAtPeriodEnd?"Ends ":"Renews ")+S:"Until "+S},e.packNote=w=>{let S=(w.parts||[]).find(N=>N.planId==="author_pass");return!w.pack||!S||!S.until?"":(new Date(S.until)<new Date?"Updates ended ":"Updates until ")+or(S.until)};let v={repo_slot:"repository",author_pass:"updates",repo_extend:"+1 year"};e.packParts=w=>(w.parts||[]).map(S=>v[S.planId]||e.planName(S.planId)).join(", ").replace(/^./,S=>S.toUpperCase()),e.packPartsTitle=w=>"Paper pack: "+(w.parts||[]).map(S=>e.planName(S.planId)).join(", "),e.statusText=w=>(w.status||"unknown").replace(/_/g," "),e.revocationText=w=>w==="dispute"?"Disputed":w==="full_refund"?"Refunded":"Revoked",e.scopeHref=w=>w?.kind==="repo"?"/admin/repositories?search="+encodeURIComponent(w.id):w?.kind==="conference"?"/conference/"+encodeURIComponent(w.id):null;let h=0;function y(){let w=++h;e.grantsError=null;let S=Object.fromEntries(Object.entries(e.query).filter(([,N])=>N!==""&&N!=null));t.get("/api/admin/billing/grants",{params:S}).then(N=>{w===h&&( Line truncated
`)},Ba=class{constructor(t){tt(this,"gen");tt(this,"threads",[]);tt(this,"match",!1);tt(this,"runs",[]);tt(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},wc=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((s,i)=>s!==t.ids[i])?!1:e.runs.every(s=>t.runs.some(i=>i.neg===s.neg&&wc(i.state,s.state))),fc=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),ho,Gn,za,Ha,Gs=class{constructor(t,s,i){qe(this,Gn);tt(this,"dots");tt(this,"dotStart");qe(this,ho);this.dots=t,this.dotStart=s,Be(this,ho,i)}state(){return new Ba(++ae(this,ho).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(Ua.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!$e(this,Gn,za).call(this,t,s))return;for(let u of s.out)this.add(t,u,i,o);return;case"neg":if(!$e(this,Gn,za).call(this,t,s))return;let r=this.state();return this.add(r,s.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:s,state:r},i,o);case"star":if(this.restricted(i,o))return;$e(this,Gn,Ha).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:$e(this,Gn,Ha).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&wc(r.state,s.state))return;t.runs.push(s),s.state.match||this.add(t,s.neg.next,i,o)}step(t,s,i,o){let r=this.state();for(let u of t.threads)switch(u.t){case"lit":Wa(u,s)&&this.add(r,u.next,i+1,o);break;case"any":this.restricted(i,o)||this.add(r,u.next,i+1,o);break;case"class":!this.restricted(i,o)&&u.re.test(s)&&this.add(r,u.next,i+1,o);break;case"star":this.restricted(i,o)||this.add(r,u,i+1,o)}if(!this.restricted(i,o))for(let u of t.runs){if(u.state.dead){this.addRun(r,u,i+1,o);continue}let f=this.step(u.state,s,i,!1);this.addRun(r,{t:"run",neg:u.neg,state:f},i+1,o)}return this.done(r)}};ho=new WeakMap,Gn=new WeakSet,za=function(t,s){let{seen:i}=ae(this,ho);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Ha=function(t,s){let{has:i}=ae(this,ho);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var kc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${kc(i.state)})`);return`${t}|${s.sort().join("|")}`},mv=1<<18,Wo,Ko,Un,go,Bn,zn,Hn,an,Ga,ur,Cc,ja=class{constructor(t,s){qe(this,an);qe(this,Wo);qe(this,Ko,new Map);qe(this,Un,0);qe(this,go);qe(this,Bn);qe(this,zn);qe(this,Hn);Be(this,Wo,t),Be(this,zn,new Gs(!1,!1,s)),Be(this,Hn,new Gs(!1,!0,s))}start(t){if(t){if(ae(this,Bn))return ae(this,Bn);let i=ae(this,Hn).state();return ae(this,Hn).add(i,ae(this,Wo),0,!0),Be(this,Bn,$e(this,an,Ga).call(this,ae(this,Hn).done(i)))}if(ae(this,go))return ae(this,go);let s=ae(this,zn).state();return ae(this,zn).add(s,ae(this,Wo),0,!0),Be(this,go,$e(this,an,ur).call(this,ae(this,zn).done(s)))}next(t,s){let i=s.charCodeAt(0),o=i<128?void 0:t.next.get(s);if(o)return o;let r=t===ae(this,Bn)?$e(this,an,ur).call(this,ae(this,Hn).step(t.state,s,0,!0)):$e(this,an,ur).call(this,ae(this,zn).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Be(this,Un,ae(this,Un)+128)),t.ascii[i]=r):t.next.set(s,r),hl(this,Un)._++,r}};Wo=new WeakMap,Ko=new WeakMap,Un=new WeakMap,go=new WeakMap,Bn=new WeakMap,zn=new WeakMap,Hn=new WeakMap,an=new WeakSet,Ga=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},ur=function(t){let s=kc(t),i=ae(this,Ko).get(s);if(i)return i;ae(this,Un)>mv&&$e(this,an,Cc).call(this);let o=$e(this,an,Ga).call(this,t);return ae(this,Ko).set(s,o),Be(this,Un,ae(this,Un)+(s.length+1)),o},Cc=function(){ae(this,Ko).clear(),Be(this,Un,0),Be(this,go,void 0),Be(this,Bn,void 0)};var hv=e=>{let t=[];for(let s=e;s.t!=="match";s=s.next){if(s.t==="split"||s.t==="neg")return;t.push(s)}return t},gv=(e,t,s,i)=>{let o=0,r=s,u=-1,f=0;for(;r<i;){let c=e[o];if(c?.t==="star"){u=o++,f=r;continue}let v=t[r];if(c&&(c.t==="any"||c.t==="lit"&&Wa(c,v)||c.t==="class"&&c.re.test(v))){o++,r++;continue}if(u===-1)return!1;o=u+1,r=++f}for(;e[o]?.t==="star";)o++;return o===e.length},Sc=e=>{let t=0,s=0;for(let i of e){let[o,r]=vv(i);t+=o,s+=r}return[t,s]},vv=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(Sc),s=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),o=i===0?0:1/0;return e.type==="@"?[s,i]:e.type==="?"?[0,i]:e.type==="*"?[0,o]:[s,o]},mc=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!Wa(e[i],t[s+i]))return!1;return!0},yv=/[/\ud800-\udfff]/,bv=/[\ud800-\udfff]/,dr=e=>bv.test(e)?[...e]:e,hc=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},jn,Yo,vo,cr,yo,Ks,pr,bo,Ys,Js,Xs,In,kn,Jo,Xo,Qs,fr,rn,wo,js,Ws=class{constructor(t,s={}){qe(this,wo);tt(this,"pattern");tt(this,"options");qe(this,jn);qe(this,Yo);qe(this,vo);qe(this,cr);qe(this,yo);qe(this,Ks,!1);qe(this,pr);qe(this,bo);qe(this,Ys,!1);qe(this,Js,0);qe(this,Xs,1/0);qe(this,In,[]);qe(this,kn,[]);qe(this,Jo);qe(this,Xo);qe(this,Qs,!1);qe(this,fr);qe(this,rn);if(t.includes Line truncated
`).forEach((s,i)=>{let{term:o}=sl(s.trim());if(!o)return;let r=[];for(let u=0;u<o.length;u++){if(o[u]==="\\"){u++;continue}Uc.has(o[u])&&!r.includes(o[u])&&r.push(o[u])}r.length&&t.push({line:i,term:o,symbols:r})}),t}function zc(e,t){let s=String(e||"").split(`
`),i=s[t];if(i===void 0)return e;let{term:o}=sl(i.trim());if(!o)return e;let r="";for(let f=0;f<o.length;f++){if(o[f]==="\\"){r+=o.slice(f,f+2),f++;continue}r+=Uc.has(o[f])||o[f]==="."?"\\"+o[f]:o[f]}let u=i.indexOf(o);return s[t]=i.slice(0,u)+r+i.slice(u+o.length),s.join(`
`)}var Qn={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},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:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",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:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",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 is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please t Line truncated
`)],{type:"text/csv;charset=utf-8"}),F=URL.createObjectURL(I),E=document.createElement("a");E.href=F,E.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(E),E.click(),document.body.removeChild(E),URL.revokeObjectURL(F)};function H(q){e.copyHint=`${q} copied`,c.timeout(()=>{e.copyHint=""},1500)}e.copyJson=q=>{navigator.clipboard.writeText(q._rawJson).then(()=>H("JSON"))},e.copyCurl=q=>{if(!q._url)return;let I=`curl -X ${q._method||"GET"} '${window.location.origin}${q._url}'`;navigator.clipboard.writeText(I).then(()=>H("curl"))},_();let se=i(()=>{e.query.autoRefresh&&_(!0)},15e3);e.on("dispose",()=>{f=!0,o++,r++,i.cancel(se)}),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},oc=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.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all",e.ovView=["performance","cache"].includes((window.location.hash||"").slice(1))?window.location.hash.slice(1):"summary",e.setOvView=function(b){e.ovView=b;try{window.history.replaceState(null,"",b==="summary"?window.location.pathname:"#"+b)}catch{}};var o=!1;e.loadCache=function(){if(!o){o=!0;var b=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:b}}).then(function(T){b===e.cacheMinutes&&(e.cacheReport=T.data,e.cacheError=T.data.available?null:T.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){o=!1,b!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(b){return e.cacheTraffic==="all"||b.traffic===e.cacheTraffic})},e.cacheRate=function(b,T){var M=e.cacheRows(),_=function(q){return M.filter(function(z){return z.name===q}).reduce(function(z,I){return z+I[T]},0)},H=_(b+"_hit"),se=_(b+"_miss");return H+se?(100*H/(H+se)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(b){return b.replaceAll("_"," ")},e.cacheP95=function(b){var T=0,M=e.cacheReport?.latencyBucketsMs||[];if(!b.count)return"No samples";if(!b.ms)return"Not timed";for(var _=0;_<=M.length;_++)if(T+=b["b"+_]||0,T>=Math.ceil(b.count*.95))return _<M.length?"\u2264 "+_n(M[_]):"> 10\u202Fs";return"No samples"},e.healthAlert=function(){let b=e.data&&e.data.system||{},T=[["Memory",b.memPercent],["Disk",b.diskPercent]].filter(([,_])=>_>90);return T.length?T.map(([_,H])=>_+" is at "+H+"%").join(" and ")+". New anonymizations may fail until "+(T.length>1?"they drop.":"it drops."):""},e.performanceError=null,e.formatMs=function(b){return b==null?"":_n(b)},e.latencyBound=function(b,T){return b.count?b[T]==null?"> 60\u202Fs":"\u2264 "+e.formatMs(b[T]):"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(T){return T.instance===b.instance}).reduce(function(T,M){return Math.max(T,M.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 r=!1;e.loadPerformance=function(){var b=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==b&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:b}}).then(function(T){b===e.performanceMinutes&&(e.performance=T.data,e.performanceError=T.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(){r=!1,b!==e.performanceMinutes&&e.loadPerformance()}))};function u(b){if(b==null)return"\u2014";for(var T=["B","KB","MB","GB","TB"],M=0,_=b;_>=1024&&M<T.length-1;)_/=1024,M++;return _.toFixed(M>0?1:0).replace(/\.0$/,"")+" "+T[M]}e.humanBytes=u;function f(b){if(!b)return"\u2014";var T=Math.floor(b/86400),M=Math.floor(b%86400/3600),_=Math.floor(b%3600/60);return T>0?T+"d "+(M<10?"0":"")+M+"h":M>0?M+"h "+(_<10?"0":"")+_+"m":_+"m"}e.humanDuration=f;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 T=e.data.repos.statusBreakdown||[],M=0;M<T.length;M++)if(T[M]._id===b)return T[M].count;return 0},e.barPct=function(b){var T=e.data&&e.data.repos?e.data.repos.total:0;if(!T)return 0;var M=[b];b==="expired"&&M.push("expiring"),b==="remov Line truncated
`)},e.tipSide=w=>{let S=(e.summary?.series||[]).length;return S<3?"":w<S/4?"tip-start":w>=S*3/4?"tip-end":""},e.bucketName=()=>({day:"day",week:"week",month:"month"})[e.summary?.bucket]||"day",e.seriesSales=()=>(e.summary?.series||[]).reduce((w,S)=>w+e.bucketTotal(S),0),e.plansWithActivity=()=>(e.summary?.plans||[]).filter(w=>w.active||w.allTimeSales||w.sales),e.familyLabel=w=>(ir.find(S=>S.id===w)||{}).label||"",e.familyPlans=w=>(e.summary?.plans||[]).filter(S=>S.family===w),e.familySum=(w,S)=>e.familyPlans(w).reduce((N,b)=>N+(b[S]||0),0),e.familyMoney=(w,S,N)=>{if(!e.revenueOn())return"\u2014";let b=e.familyPlans(w);return b.some(T=>T[N]===!1)?"Incomplete":e.moneyText(b.reduce((T,M)=>r(T,M[S]),{}))},e.planTotals=()=>{let w=S=>(e.summary?.plans||[]).reduce((N,b)=>N+(b[S]||0),0);return{active:w("active"),sales:w("sales"),allTimeSales:w("allTimeSales")}},e.webhookState=()=>{let w=e.summary?.webhooks;return w?w.failed||w.reconciliationFailed?"bad":w.oldestPendingSeconds>900||w.unreviewedRevocations?"warn":"ok":"ok"},e.age=w=>w?_n(w*1e3):"\u2014";let u=0;e.loadSummary=()=>{let w=++u;e.summaryLoading=!0,e.summaryError=null,t.get("/api/admin/billing/summary",{params:{period:e.period}}).then(S=>{if(w!==u)return;e.summaryLoading=!1;let N=S.data;if(!N||!N.subscriptions||!N.sales||!Array.isArray(N.plans)){e.summaryError="The billing summary had an unexpected format.";return}e.summary=N},S=>{w===u&&(e.summaryLoading=!1,e.summaryError=S&&S.data&&S.data.error||"Could not load billing figures.")})},e.setPeriod=w=>{if(e.period!==w){e.period=w;try{localStorage.setItem("admin.billing.period",w)}catch{}e.loadSummary()}},e.grants=[],e.total=-1,e.totalPage=0,e.stateCounts={},e.statuses=[],e.grantsError=null,e.filtersOpen=!1,e.query={page:1,limit:25,search:"",plan:"",status:"",state:"",period:"",sort:"purchasedAt",direction:"desc"};let f=s.search();f.search&&(e.query.search=f.search),e.stateView=()=>e.query.state||"all",e.setStateView=w=>{e.query.state=w==="all"?"":w,e.query.page=1},e.stateCount=w=>w==="all"?["active","expired","revoked"].reduce((S,N)=>S+(e.stateCounts[N]||0),0):e.stateCounts[w]||0,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":"",e.chips=[];let c=()=>{let w=[];e.query.plan&&w.push({key:"plan",label:"Plan",value:e.planName(e.query.plan)}),e.query.status&&w.push({key:"status",label:"Stripe status",value:e.query.status.replace(/_/g," ")}),e.query.period&&w.push({key:"period",label:"Started",value:"last "+((e.periods.find(S=>S.id===e.query.period)||{}).label||e.query.period)}),e.chips=w};e.clearFilter=w=>{e.query[w]="",e.query.page=1},e.filterPlan=w=>{Object.assign(e.query,{plan:w,page:1});let S=document.getElementById("bl-grants");S&&S.scrollIntoView&&S.scrollIntoView({behavior:"smooth",block:"start"})},e.clearFilters=()=>Object.assign(e.query,{search:"",plan:"",status:"",state:"",period:"",page:1}),e.hasFilters=()=>!!(e.query.search||e.query.plan||e.query.status||e.query.state||e.query.period),e.filterCount=()=>["plan","status","period"].filter(w=>e.query[w]).length,e.amountText=w=>{if(!w.amount)return"\u2014";let S=fo({[w.amount.currency]:w.amount.value})[0]||"\u2014";if(!w.amount.interval)return S;let N=w.amount.intervalCount>1?w.amount.intervalCount+" "+w.amount.interval+"s":w.amount.interval;return S+" / "+N},e.amountTitle=w=>w.amount?"Stripe list price"+(w.pack?" of the whole pack":""):{stripe_not_configured:"Revenue unavailable: Stripe is not configured on this server.",unresolved:"Revenue unavailable: this Stripe price could not be looked up.",unrecorded:"Revenue unavailable: no sale price was recorded for this subscription."}[w.amountMissing]||"Revenue unavailable.",e.endText=w=>{if(w.never)return"Never ends";if(!w.until)return"\u2014";let S=or(w.until);return w.state!=="active"?(new Date(w.until)<new Date?"Ended ":"Ends ")+S:w.subscription?(w.cancelAtPeriodEnd?"Ends ":"Renews ")+S:"Until "+S},e.packNote=w=>{let S=(w.parts||[]).find(N=>N.planId==="author_pass");return!w.pack||!S||!S.until?"":(new Date(S.until)<new Date?"Updates ended ":"Updates until ")+or(S.until)};let v={repo_slot:"repository",author_pass:"updates",repo_extend:"+1 year"};e.packParts=w=>(w.parts||[]).map(S=>v[S.planId]||e.planName(S.planId)).join(", ").replace(/^./,S=>S.toUpperCase()),e.packPartsTitle=w=>"Paper pack: "+(w.parts||[]).map(S=>e.planName(S.planId)).join(", "),e.statusText=w=>(w.status||"unknown").replace(/_/g," "),e.revocationText=w=>w==="dispute"?"Disputed":w==="full_refund"?"Refunded":"Revoked",e.scopeHref=w=>w?.kind==="repo"?"/admin/repositories?search="+encodeURIComponent(w.id):w?.kind==="conference"?"/conference/"+encodeURIComponent(w.id):null;let h=0;function y(){let w=++h;e.grantsError=null;let S=Object.fromEntries(Object.entries(e.query).filter(([,N])=>N!==""&&N!=null));t.get("/api/admin/billing/grants",{params:S}).then(N=>{w===h&&( Line truncated
`)},Ba=class{constructor(t){tt(this,"gen");tt(this,"threads",[]);tt(this,"match",!1);tt(this,"runs",[]);tt(this,"ids",[]);this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},kc=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((s,i)=>s!==t.ids[i])?!1:e.runs.every(s=>t.runs.some(i=>i.neg===s.neg&&kc(i.state,s.state))),mc=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0}),ho,Gn,za,Ha,Gs=class{constructor(t,s,i){qe(this,Gn);tt(this,"dots");tt(this,"dotStart");qe(this,ho);this.dots=t,this.dotStart=s,Be(this,ho,i)}state(){return new Ba(++ae(this,ho).gen)}done(t){return t.ids=t.threads.map(s=>s.id).sort((s,i)=>s-i),t.match&&t.ids.unshift(Ua.id),t}restricted(t,s){return s&&(this.dots||this.dotStart&&t===0)}add(t,s,i,o){switch(s.t){case"split":if(!$e(this,Gn,za).call(this,t,s))return;for(let u of s.out)this.add(t,u,i,o);return;case"neg":if(!$e(this,Gn,za).call(this,t,s))return;let r=this.state();return this.add(r,s.sub,i,!1),this.done(r),this.addRun(t,{t:"run",neg:s,state:r},i,o);case"star":if(this.restricted(i,o))return;$e(this,Gn,Ha).call(this,t,s)&&this.add(t,s.next,i,o);return;case"match":t.match=!0;return;default:$e(this,Gn,Ha).call(this,t,s)}}addRun(t,s,i,o){for(let r of t.runs)if(r.neg===s.neg&&kc(r.state,s.state))return;t.runs.push(s),s.state.match||this.add(t,s.neg.next,i,o)}step(t,s,i,o){let r=this.state();for(let u of t.threads)switch(u.t){case"lit":Wa(u,s)&&this.add(r,u.next,i+1,o);break;case"any":this.restricted(i,o)||this.add(r,u.next,i+1,o);break;case"class":!this.restricted(i,o)&&u.re.test(s)&&this.add(r,u.next,i+1,o);break;case"star":this.restricted(i,o)||this.add(r,u,i+1,o)}if(!this.restricted(i,o))for(let u of t.runs){if(u.state.dead){this.addRun(r,u,i+1,o);continue}let f=this.step(u.state,s,i,!1);this.addRun(r,{t:"run",neg:u.neg,state:f},i+1,o)}return this.done(r)}};ho=new WeakMap,Gn=new WeakSet,za=function(t,s){let{seen:i}=ae(this,ho);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,!0)},Ha=function(t,s){let{has:i}=ae(this,ho);return i[s.id]===t.gen?!1:(i[s.id]=t.gen,t.threads.push(s),!0)};var Cc=e=>{let t=e.ids.join();if(!e.runs.length)return t;let s=e.runs.map(i=>`${i.neg.id}(${Cc(i.state)})`);return`${t}|${s.sort().join("|")}`},mv=1<<18,Wo,Ko,Un,go,Bn,zn,Hn,an,Ga,ur,Sc,ja=class{constructor(t,s){qe(this,an);qe(this,Wo);qe(this,Ko,new Map);qe(this,Un,0);qe(this,go);qe(this,Bn);qe(this,zn);qe(this,Hn);Be(this,Wo,t),Be(this,zn,new Gs(!1,!1,s)),Be(this,Hn,new Gs(!1,!0,s))}start(t){if(t){if(ae(this,Bn))return ae(this,Bn);let i=ae(this,Hn).state();return ae(this,Hn).add(i,ae(this,Wo),0,!0),Be(this,Bn,$e(this,an,Ga).call(this,ae(this,Hn).done(i)))}if(ae(this,go))return ae(this,go);let s=ae(this,zn).state();return ae(this,zn).add(s,ae(this,Wo),0,!0),Be(this,go,$e(this,an,ur).call(this,ae(this,zn).done(s)))}next(t,s){let i=s.charCodeAt(0),o=i<128?void 0:t.next.get(s);if(o)return o;let r=t===ae(this,Bn)?$e(this,an,ur).call(this,ae(this,Hn).step(t.state,s,0,!0)):$e(this,an,ur).call(this,ae(this,zn).step(t.state,s,1,!0));return i<128?(t.ascii||(t.ascii=new Array(128),Be(this,Un,ae(this,Un)+128)),t.ascii[i]=r):t.next.set(s,r),gl(this,Un)._++,r}};Wo=new WeakMap,Ko=new WeakMap,Un=new WeakMap,go=new WeakMap,Bn=new WeakMap,zn=new WeakMap,Hn=new WeakMap,an=new WeakSet,Ga=function(t){return{state:t,match:t.match,dead:t.dead,next:new Map}},ur=function(t){let s=Cc(t),i=ae(this,Ko).get(s);if(i)return i;ae(this,Un)>mv&&$e(this,an,Sc).call(this);let o=$e(this,an,Ga).call(this,t);return ae(this,Ko).set(s,o),Be(this,Un,ae(this,Un)+(s.length+1)),o},Sc=function(){ae(this,Ko).clear(),Be(this,Un,0),Be(this,go,void 0),Be(this,Bn,void 0)};var hv=e=>{let t=[];for(let s=e;s.t!=="match";s=s.next){if(s.t==="split"||s.t==="neg")return;t.push(s)}return t},gv=(e,t,s,i)=>{let o=0,r=s,u=-1,f=0;for(;r<i;){let c=e[o];if(c?.t==="star"){u=o++,f=r;continue}let v=t[r];if(c&&(c.t==="any"||c.t==="lit"&&Wa(c,v)||c.t==="class"&&c.re.test(v))){o++,r++;continue}if(u===-1)return!1;o=u+1,r=++f}for(;e[o]?.t==="star";)o++;return o===e.length},Ec=e=>{let t=0,s=0;for(let i of e){let[o,r]=vv(i);t+=o,s+=r}return[t,s]},vv=e=>{if(e.t==="star")return[0,1/0];if(e.t!=="ext")return[1,1];if(e.type==="!")return[0,1/0];let t=e.alts.map(Ec),s=Math.min(...t.map(r=>r[0])),i=Math.max(...t.map(r=>r[1])),o=i===0?0:1/0;return e.type==="@"?[s,i]:e.type==="?"?[0,i]:e.type==="*"?[0,o]:[s,o]},hc=(e,t,s)=>{for(let i=0;i<e.length;i++)if(!Wa(e[i],t[s+i]))return!1;return!0},yv=/[/\ud800-\udfff]/,bv=/[\ud800-\udfff]/,dr=e=>bv.test(e)?[...e]:e,gc=e=>{if(e.includes("/"))throw new Error("can only match a single path portion, got: "+e)},jn,Yo,vo,cr,yo,Ks,pr,bo,Ys,Js,Xs,Mn,kn,Jo,Xo,Qs,fr,rn,wo,js,Ws=class{constructor(t,s={}){qe(this,wo);tt(this,"pattern");tt(this,"options");qe(this,jn);qe(this,Yo);qe(this,vo);qe(this,cr);qe(this,yo);qe(this,Ks,!1);qe(this,pr);qe(this,bo);qe(this,Ys,!1);qe(this,Js,0);qe(this,Xs,1/0);qe(this,Mn,[]);qe(this,kn,[]);qe(this,Jo);qe(this,Xo);qe(this,Qs,!1);qe(this,fr);qe(this,rn);if(t.includes Line truncated
`).forEach((s,i)=>{let{term:o}=sl(s.trim());if(!o)return;let r=[];for(let u=0;u<o.length;u++){if(o[u]==="\\"){u++;continue}Bc.has(o[u])&&!r.includes(o[u])&&r.push(o[u])}r.length&&t.push({line:i,term:o,symbols:r})}),t}function Hc(e,t){let s=String(e||"").split(`
`),i=s[t];if(i===void 0)return e;let{term:o}=sl(i.trim());if(!o)return e;let r="";for(let f=0;f<o.length;f++){if(o[f]==="\\"){r+=o.slice(f,f+2),f++;continue}r+=Bc.has(o[f])||o[f]==="."?"\\"+o[f]:o[f]}let u=i.indexOf(o);return s[t]=i.slice(0,u)+r+i.slice(u+o.length),s.join(`
`)}var Qn={VIEWER_ERRORS:{title:"Content could not be loaded",access_title:"GitHub access needs attention",reader_help:"Reading this repository? You do not need to sign in. Try again after the owner restores access, or let them know this anonymous link is unavailable.",owner_help:"Own this repository? If your GitHub account was suspended or recently recovered, sign in to Anonymous GitHub again and check the GitHub connection and repository permissions in your dashboard. Then retry this page. Keep the existing anonymous URL; do not delete the repository to restore access.",retry:"Try again",dashboard:"Open owner dashboard"},ERRORS:{cache_busy:"Downloads are busy. Please try again shortly.",cache_miss:"This file is not cached yet. Please try again.",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:"We could not load this content. Try again. If it still fails, contact support with the anonymous URL and the time of the error.",unreachable:"The service could not complete this request. Wait a moment and try again.",request_error:"The connection was interrupted. Check your internet connection and try again.",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:"Anonymous GitHub cannot access the source repository on GitHub. It may be private, unavailable, or require the owner to reconnect GitHub.",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 is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_no Line truncated
`)),e.options=Object.assign({},e.options,y.options),f.restore()})}c();let v=null;e.saveDefault=h=>{if(h&&h.preventDefault&&h.preventDefault(),e.saving)return;let y=f.checkpoint(),g={terms:e.terms.split(`
`).map(C=>C.trim()).filter(C=>C.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",g).then(()=>{f.accept(y),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",v&&i.cancel(v),v=i(()=>{e.message=null},2500)},C=>{e.saving=!1;let w=C&&C.data&&C.data.error,S="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+w),s("ERRORS.unknown_error")]).then(([N,b])=>{e.error=w&&N!==b?N:S},()=>{e.error=S})})},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."}))}},Jc=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)})}},Xc=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(f){e.feature=f},e.featureHref=function(f){return f.needsUser&&!e.user?"/signin":f.href},e.featureTarget=function(f){return f.needsUser&&!e.user?"_self":f.target||void 0},e.featureKeydown=function(f,c){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[f.key];if(v===void 0)return;f.preventDefault();let h=e.features.length,y=v==="first"?0:v==="last"?h-1:(c+v+h)%h;e.feature=e.features[y].key,o(()=>{let g=i.document.getElementById("feature-tab-"+e.feature);g&&g.focus()})},e.demoText=`# DeepLearnUtils
`).map(C=>C.trim()).filter(C=>C.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",g).then(()=>{f.accept(y),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",v&&i.cancel(v),v=i(()=>{e.message=null},2500)},C=>{e.saving=!1;let w=C&&C.data&&C.data.error,S="Unable to save your defaults. Please try again.";Promise.all([s("ERRORS."+w),s("ERRORS.unknown_error")]).then(([N,b])=>{e.error=w&&N!==b?N:S},()=>{e.error=S})})},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."}))}},Xc=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)})}},Qc=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(f){e.feature=f},e.featureHref=function(f){return f.needsUser&&!e.user?"/signin":f.href},e.featureTarget=function(f){return f.needsUser&&!e.user?"_self":f.target||void 0},e.featureKeydown=function(f,c){let v={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[f.key];if(v===void 0)return;f.preventDefault();let h=e.features.length,y=v==="first"?0:v==="last"?h-1:(c+v+h)%h;e.feature=e.features[y].key,o(()=>{let g=i.document.getElementById("feature-tab-"+e.feature);g&&g.focus()})},e.demoText=`# DeepLearnUtils
Developed by Jane Smith at MIT CSAIL.
See Smith et al., "Attention That Works," 2026.
Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let f=(e.demoTerms||"").split(/[,\n]/).map(g=>g.trim()).filter(Boolean).sort((g,C)=>C.length-g.length),c=g=>g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!f.length)return[{text:e.demoText}];let v=new RegExp("("+f.map(c).join("|")+")","gi"),h={},y=0;return(e.demoText||"").split(v).filter(g=>g!=="").map(g=>{let C=f.find(w=>w.toLowerCase()===g.toLowerCase());return C?(h[C.toLowerCase()]||(h[C.toLowerCase()]=++y),{text:String(h[C.toLowerCase()]),redacted:!0,original:g}):{text:g}})},e.demoCount=()=>e.demoParts().filter(f=>f.redacted).length,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"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(f=>!f.total);function r(){t.get("/api/stat/").then(f=>{e.stat=f.data,e.cards[0].total=f.data.nbRepositories,e.cards[1].total=f.data.nbUsers,e.cards[2].total=f.data.nbPageViews,e.cards[3].total=f.data.nbPullRequests}).catch(()=>{})}r();function u(f){let c={series:f,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!f||f.length<2)return c;let v=new Array(f.length-1);for(let S=1;S<f.length;S++)v[S-1]=f[S]-f[S-1];let h=v.length,y=Math.max.apply(null,v),g=Math.min.apply(null,v),C=Math.min(0,g),w=y-C||1;c.viewW=h*2,c.bars=new Array(h);for(let S=0;S<h;S++){let N=(v[S]-C)/w,b=Math.max(1.5,N*34);c.bars[S]={x:(S*2+.25).toFixed(2),y:(36-b).toFixed(2),w:"1.5",h:b.toFixed(2)}}if(c.deltaToday=v[h-1],h>=2){let S=v[h-2];S&&(c.pctChange=(c.deltaToday-S)/S*100)}return c.pctAbs=Math.round(Math.abs(c.pctChange)),c.isUp=c.pctChange>=0,c}e.history={repositories:u([]),users:u([]),pageViews:u([]),pullRequests:u([])},t.get("/api/stat/history?days=60").then(f=>{let c=f.data||[];e.history={repositories:u(c.map(v=>v.nbRepositories||0)),users:u(c.map(v=>v.nbUsers||0)),pageViews:u(c.map(v=>v.nbPageViews||0)),pullRequests:u(c.map(v=>v.nbPullRequests||0))}}).catch(()=>{})},Qc=function(e,t,s,i,o,r){let u=wt();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),u.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,ze(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Ht()(document,"click",E=>{e.quotaExpanded&&!E.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=E=>E.status==="error"||E._broken||c(E.status)==="progress"&&E._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=E=>{e.projectView=E,E==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=E=>{let L=Da(E?.anonymizeDate||E?.lastView)||"";return/ ago$/.test(L)?"No activity for "+L.replace(/ ago$/,""):"No activity since "+L.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=E=>"project-details-"+encodeURIComponent(E._type+":"+(E._id||E._source||"unknown")),e.showProjectDetails=async E=>{e.selectedProject=E,e.projectName=E.projectName||"",e.nameError="",e.nameMessage="",await ze();let L=document.getElementById(e.projectDetailsId(E));L?.focus(),L?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=E=>{e.selectedProject=null,ze(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(E._type+":"+E._id)}"]`)?.focus())},e.saveProjectName=async E=>{if(e.nameSaving||!E._id)return;let L=e.projectName.trim();if(L.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let W=await t.post("/api/user/project-name",{type:E._type,id:E._id,name:L});E.projectName=W.data.name,E._label=E.projectName||E._fallbackLabel,e.selectedProject===E&&(e.nameMessage=L?"Project name saved.":"Default project name restored."),T||(e.dashboardCursor=null,await _(),e.selectedProject===E&&(e.selectedProject=e.items.find(j=>j._type===E._type&&j._id===E._id)||null))}catch{e.selectedProject===E&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async E=>{if(!E._viewUrl||e.copyingId)return;let L=new URL(E._viewUrl,o.location.origin).href;e.copyingId=E._type+":"+E._id;try{await il(L),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:L})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let f=["queue","download","downloaded","preparing","anonymizing"];function Line truncated
`)),e.options=Object.assign({},e.options,U.options),e.options.expirationDate=U.options&&U.options.expirationDate?new Date(U.options.expirationDate):q(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),k&&k()})}function Se(k,O,U){e.anonymize&&e.anonymize[k]&&e.anonymize[k].setValidity(O,U)}function J(k){try{let O=parseGithubUrl(k);if(O&&O.owner&&O.repo)return O.owner+"/"+O.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"||J(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let k=g();try{let O=await t.get("/github/connections");if(e.githubConnections=O.data,!O.data.appEnabled)return;let U=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":O.data.csrf}});if(!y(k))return;e.error=null,U.data.fullName&&(e._originalFullName=U.data.fullName,e.source.fullName=U.data.fullName,e.sourceUrl="https://github.com/"+U.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{y(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.details=null,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await be()}catch{}}};function ce(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:J(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 he(){let k=new URLSearchParams(window.location.search).get("billingDraft");if(k){N.restore();try{let U=(await t.get("/api/billing/draft/"+encodeURIComponent(k))).data;if(U.path!==o.path())throw new Error("Wrong task");b=U.values.conference||null;for(let G of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(U.values,G)&&(e[G]=U.values[G]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),T=U.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await ue(),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 O;try{O=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!O||O.path!==o.path()||Date.now()-O.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await ue(),!0):!1;N.restore();for(let U of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(O.draft,U)&&(e[U]=O.draft[U]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await ue(),sessionStorage.removeItem("github-access-draft"),!0}Re(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&u(he,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(O=>O).join(`
Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let f=(e.demoTerms||"").split(/[,\n]/).map(g=>g.trim()).filter(Boolean).sort((g,C)=>C.length-g.length),c=g=>g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!f.length)return[{text:e.demoText}];let v=new RegExp("("+f.map(c).join("|")+")","gi"),h={},y=0;return(e.demoText||"").split(v).filter(g=>g!=="").map(g=>{let C=f.find(w=>w.toLowerCase()===g.toLowerCase());return C?(h[C.toLowerCase()]||(h[C.toLowerCase()]=++y),{text:String(h[C.toLowerCase()]),redacted:!0,original:g}):{text:g}})},e.demoCount=()=>e.demoParts().filter(f=>f.redacted).length,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"}],e.statsEmpty=()=>!!e.stat&&e.cards.every(f=>!f.total);function r(){t.get("/api/stat/").then(f=>{e.stat=f.data,e.cards[0].total=f.data.nbRepositories,e.cards[1].total=f.data.nbUsers,e.cards[2].total=f.data.nbPageViews,e.cards[3].total=f.data.nbPullRequests}).catch(()=>{})}r();function u(f){let c={series:f,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!f||f.length<2)return c;let v=new Array(f.length-1);for(let S=1;S<f.length;S++)v[S-1]=f[S]-f[S-1];let h=v.length,y=Math.max.apply(null,v),g=Math.min.apply(null,v),C=Math.min(0,g),w=y-C||1;c.viewW=h*2,c.bars=new Array(h);for(let S=0;S<h;S++){let N=(v[S]-C)/w,b=Math.max(1.5,N*34);c.bars[S]={x:(S*2+.25).toFixed(2),y:(36-b).toFixed(2),w:"1.5",h:b.toFixed(2)}}if(c.deltaToday=v[h-1],h>=2){let S=v[h-2];S&&(c.pctChange=(c.deltaToday-S)/S*100)}return c.pctAbs=Math.round(Math.abs(c.pctChange)),c.isUp=c.pctChange>=0,c}e.history={repositories:u([]),users:u([]),pageViews:u([]),pullRequests:u([])},t.get("/api/stat/history?days=60").then(f=>{let c=f.data||[];e.history={repositories:u(c.map(v=>v.nbRepositories||0)),users:u(c.map(v=>v.nbUsers||0)),pageViews:u(c.map(v=>v.nbPageViews||0)),pullRequests:u(c.map(v=>v.nbPullRequests||0))}}).catch(()=>{})},Zc=function(e,t,s,i,o,r){let u=wt();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&s.url("/")}),e.user==null&&s.url("/"),u.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,ze(()=>document.querySelector(".dashboard-quota > summary")?.focus())},Ht()(document,"click",E=>{e.quotaExpanded&&!E.target.closest?.(".dashboard-quota")&&(e.quotaExpanded=!1)}),e.filtersExpanded=!1,e.projectView="all",e.selectedProject=null,e.projectName="",e.nameSaving=!1,e.nameError="",e.nameMessage="",e.needsAttention=E=>E.status==="error"||E._broken||c(E.status)==="progress"&&E._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=E=>{e.projectView=E,E==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.idleText=E=>{let L=Da(E?.anonymizeDate||E?.lastView)||"";return/ ago$/.test(L)?"No activity for "+L.replace(/ ago$/,""):"No activity since "+L.replace(", "+new Date().getFullYear(),"")},e.projectDetailsId=E=>"project-details-"+encodeURIComponent(E._type+":"+(E._id||E._source||"unknown")),e.showProjectDetails=async E=>{e.selectedProject=E,e.projectName=E.projectName||"",e.nameError="",e.nameMessage="",await ze();let L=document.getElementById(e.projectDetailsId(E));L?.focus(),L?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=E=>{e.selectedProject=null,ze(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(E._type+":"+E._id)}"]`)?.focus())},e.saveProjectName=async E=>{if(e.nameSaving||!E._id)return;let L=e.projectName.trim();if(L.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let W=await t.post("/api/user/project-name",{type:E._type,id:E._id,name:L});E.projectName=W.data.name,E._label=E.projectName||E._fallbackLabel,e.selectedProject===E&&(e.nameMessage=L?"Project name saved.":"Default project name restored."),T||(e.dashboardCursor=null,await _(),e.selectedProject===E&&(e.selectedProject=e.items.find(j=>j._type===E._type&&j._id===E._id)||null))}catch{e.selectedProject===E&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async E=>{if(!E._viewUrl||e.copyingId)return;let L=new URL(E._viewUrl,o.location.origin).href;e.copyingId=E._type+":"+E._id;try{await il(L),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:L})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"Preparing",error:"Error",expired:"Expiring / expired",removed:"Removing / removed"};let f=["queue","download","downloaded","preparing","anonymizing"];function Line truncated
`)),e.options=Object.assign({},e.options,U.options),e.options.expirationDate=U.options&&U.options.expirationDate?new Date(U.options.expirationDate):q(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),k&&k()})}function Se(k,O,U){e.anonymize&&e.anonymize[k]&&e.anonymize[k].setValidity(O,U)}function J(k){try{let O=parseGithubUrl(k);if(O&&O.owner&&O.repo)return O.owner+"/"+O.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"||J(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let k=g();try{let O=await t.get("/github/connections");if(e.githubConnections=O.data,!O.data.appEnabled)return;let U=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":O.data.csrf}});if(!y(k))return;e.error=null,U.data.fullName&&(e._originalFullName=U.data.fullName,e.source.fullName=U.data.fullName,e.sourceUrl="https://github.com/"+U.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{y(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.details=null,e.source.commit="",e.source.branch="",e.readme="",e.branches=[],Gt.cancel(),Cn.cancel(),Sn.cancel(),e.previewStatus="idle",e.anonymize_readme="",dl();try{await be()}catch{}}};function ce(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:J(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 he(){let k=new URLSearchParams(window.location.search).get("billingDraft");if(k){N.restore();try{let U=(await t.get("/api/billing/draft/"+encodeURIComponent(k))).data;if(U.path!==o.path())throw new Error("Wrong task");b=U.values.conference||null;for(let G of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(U.values,G)&&(e[G]=U.values[G]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),T=U.id,M=JSON.stringify(N.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await ue(),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 O;try{O=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!O||O.path!==o.path()||Date.now()-O.savedAt>=30*6e4)return N.restore()?(e.sourceUrl&&await ue(),!0):!1;N.restore();for(let U of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(O.draft,U)&&(e[U]=O.draft[U]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await ue(),sessionStorage.removeItem("github-access-draft"),!0}Re(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&u(he,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(O=>O).join(`
`),e.source=k.data.source,e.role=k.data.role||"owner",e._existingNever=k.data.options.expirationMode==="never",e._savedExpirationDate=k.data.options.expirationDate?new Date(k.data.options.expirationDate):null,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=S(parseGithubUrl(e.sourceUrl)),!await he()&&(await Promise.all([be(),Oe()]),No())},()=>{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 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(O=>O).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=S(parseGithubUrl(e.sourceUrl)),!await he())try{await cl()}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 k=>{e.sourceUrl="https://gist.github.com/"+k.data.source.gistId,e.terms=k.data.options.terms.filter(O=>O).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=S(parseGithubUrl(e.sourceUrl)),!await he()&&await pl()},()=>{o.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(()=>{}).finally(()=>{!v&&!i.repoId&&!i.pullRequestId&&!i.gistId&&e.userReposStatus==="idle"&&e.loadUserRepos()}),e.urlSelected=async(k=!1)=>{let O=++c;e.previousConfigurations=[],e.previousConfigurationId="";let U;try{U=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,e.details=null,Ue(),Qt.cancel(),Vn.cancel(),Ln.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Se("sourceUrl","github",!1);return}let G=S(U),le=k||w===G;w=G,e.sourceUrlError="",Se("sourceUrl","github",!0),Ue();let ye=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let je=window.document.getElementById("sourceUrl");if(je){try{je.setSelectionRange(0,0)}catch{}je.scrollLeft=0}},50),ye&&u(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!le&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],le||(e.source={type:"GitHubStream",branch:"",commit:""}),Qt.cancel(),Vn.cancel(),Ln.cancel(),Ro.clear(),To.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",ff(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=le;try{U.gistId&&!U.repo?(e.detectedType="gist",e.source={gistId:U.gistId},await pl()):U.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:U.owner+"/"+U.repo,pullRequestId:U.pullRequestId},await cl()):(e.detectedType="repo",fe(),await Promise.all([be(),Oe()]),No())}catch{}finally{O===c&&(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(U=>U.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 Oe(),No()}),e.getBranches=async k=>{let O=parseGithubUrl(e.sourceUrl),U=g();try{if(!e.details){await be(k);return}let G=await t.get(`/api/repo/${O.owner}/${O.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0||e.reconnectingSource?"1":"0",repositoryID:ce()}});if(!y(U))return;e.branches=G.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let le=e.branches.filter(ye=>ye.name==e.source.branch);le.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=le[0].commit),e.readme=le[0].readme,await Oe(k))}catch(G){if(!y(U))return;e.branches=[],e.sourceUnreachable=G&&(G.status===404||G.data&&G.data.error==="repo_not_found"),e.details=null,Le(G)}finally{C(U)}};async function be(k=!1){let O=parseGithubUrl(e.sourceUrl),U=g();try{Po(),Ue();let G=await t.get(`/api/repo/${O.owner}/${O.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:ce(),force:"1"}});if(!y(U))return;e.details=G.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(k||e.reconnectingSource)}catch(G){if(!y(U))return;throw Le(G),G}finally{C(U)}}async function Oe(k){if(e.readme&&!k)return e.readme;let O=parseGithubUrl(e.sourceUrl),U=g();try{let G=await t.get(`/api/repo/${O.owner}/${O.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0?"1":"0",branch:e.source.branch,repositoryID:ce()}});y(U,!0)&&(e.readme=G.data)}catch{y(U,!0)&&(e.readme="")}finally{C(U)}}let D={magicalBraces:!0},A=k=>k.startsWith("/")&&!k.endsWith("/")&&Wn(ko(k.slice(1),D),D)===k.slice(1),B=()=>Object.keys(e.preserve.picked).filter(k=>e.preserve.picked[k]).sort().map(k=>"/"+Wn(k,D)),Z=k=>"/"+Wn(k,D)+"/**",K=k=>"!/"+Wn(k,D)+"/",ee=()=>String(e.preserve.patterns||"").split(`
`).map(k=>k.trim()).filter(Boolean),re=null,oe=null,ie=new Set,te=0,we=null,pe=()=>!1;function Ee(){let k=te+"\0"+e.preserve.patterns;if(k!==we){we=k;try{pe=ol(nl([...B(),...ee()]))}catch{pe=()=>!1}}return pe}function Te(k){let O=new Map([["",{dirs:[],files:[]}]]);for(let U of k){let G=U.split("/"),le="";for(let ye=0;ye<G.length-1;ye++){let je=G.slice(0,ye+1).join("/");O.has(je)||(O.set(je,{dirs:[],files:[]}),O.get(le).dirs.push(je)),le=je}O.get(le).files.push(U)}for(let U of O.values())U.dirs.sort();return{files:k,dirs:O,descendants:new Map}}function Ve(k){return re.descendants.has(k)||re.descendants.set(k,re.files.filter(O=>O.startsWith(k+"/"))),re.descendants.get(k)}let We=k=>Ee()(k);function Ge(k){let O=Ve(k),U=0;for(let G of O)We(G)&&U++;return U===0?"none":U===O.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let k=(e.options?.preserveFiles||[]).map(O=>String(O).trim()).filter(Boolean).map(O=>A(O)?ko(O.slice(1),D):O);return k.length?k.slice(0,2).join(", ")+(k.length>2?` and ${k.length-2} more`:""):"None. Every file is redacted."};async function ke(){let k=e.source?.commit;if(!(re&&e.preserve.commit===k)){e.preserve.loading=!0,e.preserve.error="",re=null,oe=null;try{let O=parseGithubUrl(e.sourceUrl),U=await t.get(`/api/repo/${O.owner}/${O.repo}/tree`,{params:{commit:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:ce()}});if(e.source?.commit!==k)return;let G=Array.isArray(U.data.binaryFiles)?U.data.binaryFiles:[];re=mn(Te(U.data.files||[])),oe=G.length?mn(Te([...U.data.files||[],...G])):re,ie=mn(new Set(G)),e.preserve.commit=k,e.preserve.truncated=!!U.data.truncated,e.previewFile||Qt()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",k=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&k&&e.sourceUrl&&ke().catch(()=>{})}),e.openPreserveFiles=()=>{let k={},O=[];for(let G of e.options?.preserveFiles||[]){let le=String(G).trim();le&&(!O.length&&A(le)?k[ko(le.slice(1),D)]=!0:O.push(le))}let U={};for(let G of Object.keys(k)){let le=G.split("/");for(let ye=1;ye<le.length;ye++)U[le.slice(0,ye).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:k,expanded:U,patterns:O.join(`
`),patternsOpen:O.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),te++,u(()=>{let G=document.getElementById("preserve-files-dialog");G?.showModal&&!G.open&&G.showModal(),document.getElementById("preserve-files-search")?.focus()},0),ke()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=nl([...B(),...ee()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!re)return[];let k=Ee(),O=(ye,je,Ot)=>{let mt=!!e.preserve.picked[ye],Rt=k(ye);return{kind:"file",path:ye,label:Ot,depth:je,state:Rt?"all":"none",locked:!mt&&Rt,note:!mt&&Rt?"matched by a pattern":mt&&!Rt?"excluded by a pattern":""}},U=String(e.preserve.search||"").trim().toLowerCase();if(U)return re.files.filter(ye=>ye.toLowerCase().includes(U)).slice(0,300).map(ye=>O(ye,0,ye));let G=[],le=(ye,je)=>{let Ot=re.dirs.get(ye);for(let mt of Ot.dirs){let Rt=!!e.preserve.expanded[mt],Gt=ee().includes(Z(mt));G.push({kind:"dir",path:mt,label:mt.slice(ye?ye.length+1:0)+"/",depth:je,open:Rt,state:Ge(mt),locked:!1,note:Gt?"whole folder":""}),Rt&&le(mt,je+1)}for(let mt of Ot.files)G.push(O(mt,je,mt.slice(ye?ye.length+1:0)))};return le("",0),G},e.preserveCount=()=>re?re.files.filter(We).length:0,e.togglePreserveDir=k=>{e.preserve.expanded[k]=!e.preserve.expanded[k]},e.togglePreserveFile=k=>{e.preserve.picked[k]=!e.preserve.picked[k],te++},e.togglePreserveFolder=k=>{let O=Z(k),U=K(k),G=ee().filter(ye=>ye!==O&&ye!==U),le=Ge(k)==="all"||ee().includes(O);for(let ye of Ve(k))e.preserve.picked[ye]=!1;te++,e.preserve.patterns=(le?G:[...G,O]).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=S(parseGithubUrl(e.sourceUrl)),!await he())try{await pl()}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 k=>{e.sourceUrl="https://gist.github.com/"+k.data.source.gistId,e.terms=k.data.options.terms.filter(O=>O).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=S(parseGithubUrl(e.sourceUrl)),!await he()&&await fl()},()=>{o.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(()=>{}).finally(()=>{!v&&!i.repoId&&!i.pullRequestId&&!i.gistId&&e.userReposStatus==="idle"&&e.loadUserRepos()}),e.urlSelected=async(k=!1)=>{let O=++c;e.previousConfigurations=[],e.previousConfigurationId="";let U;try{U=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,e.details=null,Ue(),Gt.cancel(),Cn.cancel(),Sn.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",Se("sourceUrl","github",!1);return}let G=S(U),le=k||w===G;w=G,e.sourceUrlError="",Se("sourceUrl","github",!0),Ue();let ye=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let je=window.document.getElementById("sourceUrl");if(je){try{je.setSelectionRange(0,0)}catch{}je.scrollLeft=0}},50),ye&&u(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!le&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],le||(e.source={type:"GitHubStream",branch:"",commit:""}),Gt.cancel(),Cn.cancel(),Sn.cancel(),Ro.clear(),To.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",dl(),e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=le;try{U.gistId&&!U.repo?(e.detectedType="gist",e.source={gistId:U.gistId},await fl()):U.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:U.owner+"/"+U.repo,pullRequestId:U.pullRequestId},await pl()):(e.detectedType="repo",fe(),await Promise.all([be(),Oe()]),No())}catch{}finally{O===c&&(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(U=>U.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 Oe(),No()}),e.getBranches=async k=>{let O=parseGithubUrl(e.sourceUrl),U=g();try{if(!e.details){await be(k);return}let G=await t.get(`/api/repo/${O.owner}/${O.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0||e.reconnectingSource?"1":"0",repositoryID:ce()}});if(!y(U))return;e.branches=G.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let le=e.branches.filter(ye=>ye.name==e.source.branch);le.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=le[0].commit),e.readme=le[0].readme,await Oe(k))}catch(G){if(!y(U))return;e.branches=[],e.sourceUnreachable=G&&(G.status===404||G.data&&G.data.error==="repo_not_found"),e.details=null,Le(G)}finally{C(U)}};async function be(k=!1){let O=parseGithubUrl(e.sourceUrl),U=g();try{Po(),Ue();let G=await t.get(`/api/repo/${O.owner}/${O.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:ce(),force:"1"}});if(!y(U))return;e.details=G.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(k||e.reconnectingSource)}catch(G){if(!y(U))return;throw Le(G),G}finally{C(U)}}async function Oe(k){if(e.readme&&!k)return e.readme;let O=parseGithubUrl(e.sourceUrl),U=g();try{let G=await t.get(`/api/repo/${O.owner}/${O.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:k===!0?"1":"0",branch:e.source.branch,repositoryID:ce()}});y(U,!0)&&(e.readme=G.data)}catch{y(U,!0)&&(e.readme="")}finally{C(U)}}let D={magicalBraces:!0},A=k=>k.startsWith("/")&&!k.endsWith("/")&&Wn(ko(k.slice(1),D),D)===k.slice(1),B=()=>Object.keys(e.preserve.picked).filter(k=>e.preserve.picked[k]).sort().map(k=>"/"+Wn(k,D)),Z=k=>"/"+Wn(k,D)+"/**",K=k=>"!/"+Wn(k,D)+"/",ee=()=>String(e.preserve.patterns||"").split(`
`).map(k=>k.trim()).filter(Boolean),re=null,oe=null,ie=new Set,te=0,we=null,pe=()=>!1;function Ee(){let k=te+"\0"+e.preserve.patterns;if(k!==we){we=k;try{pe=ol(nl([...B(),...ee()]))}catch{pe=()=>!1}}return pe}function Te(k){let O=new Map([["",{dirs:[],files:[]}]]);for(let U of k){let G=U.split("/"),le="";for(let ye=0;ye<G.length-1;ye++){let je=G.slice(0,ye+1).join("/");O.has(je)||(O.set(je,{dirs:[],files:[]}),O.get(le).dirs.push(je)),le=je}O.get(le).files.push(U)}for(let U of O.values())U.dirs.sort();return{files:k,dirs:O,descendants:new Map}}function Ve(k){return re.descendants.has(k)||re.descendants.set(k,re.files.filter(O=>O.startsWith(k+"/"))),re.descendants.get(k)}let We=k=>Ee()(k);function Ge(k){let O=Ve(k),U=0;for(let G of O)We(G)&&U++;return U===0?"none":U===O.length?"all":"some"}e.preserve={open:!1,loading:!1,error:"",truncated:!1,commit:"",search:"",expanded:{},picked:{},patterns:"",patternsOpen:!1},e.preserveSummary=()=>{let k=(e.options?.preserveFiles||[]).map(O=>String(O).trim()).filter(Boolean).map(O=>A(O)?ko(O.slice(1),D):O);return k.length?k.slice(0,2).join(", ")+(k.length>2?` and ${k.length-2} more`:""):"None. Every file is redacted."};async function ke(){let k=e.source?.commit;if(!(re&&e.preserve.commit===k)){e.preserve.loading=!0,e.preserve.error="",re=null,oe=null;try{let O=parseGithubUrl(e.sourceUrl),U=await t.get(`/api/repo/${O.owner}/${O.repo}/tree`,{params:{commit:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:ce()}});if(e.source?.commit!==k)return;let G=Array.isArray(U.data.binaryFiles)?U.data.binaryFiles:[];re=mn(Te(U.data.files||[])),oe=G.length?mn(Te([...U.data.files||[],...G])):re,ie=mn(new Set(G)),e.preserve.commit=k,e.preserve.truncated=!!U.data.truncated,e.previewFile||Gt()}catch{e.preserve.error="The file list could not be loaded from GitHub. You can still use patterns.",e.preserve.patternsOpen=!0}finally{e.preserve.loading=!1}}}e.watch("source.commit",k=>{e.previewFile&&e.openPreviewFile(""),e.detectedType==="repo"&&k&&e.sourceUrl&&ke().catch(()=>{})}),e.openPreserveFiles=()=>{let k={},O=[];for(let G of e.options?.preserveFiles||[]){let le=String(G).trim();le&&(!O.length&&A(le)?k[ko(le.slice(1),D)]=!0:O.push(le))}let U={};for(let G of Object.keys(k)){let le=G.split("/");for(let ye=1;ye<le.length;ye++)U[le.slice(0,ye).join("/")]=!0}Object.assign(e.preserve,{open:!0,search:"",picked:k,expanded:U,patterns:O.join(`
`),patternsOpen:O.length>0}),e.mobileWorkspace&&(e.mobilePane="settings"),te++,u(()=>{let G=document.getElementById("preserve-files-dialog");G?.showModal&&!G.open&&G.showModal(),document.getElementById("preserve-files-search")?.focus()},0),ke()},e.closePreserveFiles=()=>{document.getElementById("preserve-files-dialog")?.close?.(),e.preserve.open=!1},e.savePreserveFiles=()=>{e.options.preserveFiles=nl([...B(),...ee()]),e.closePreserveFiles()},e.preserveRows=()=>{if(!re)return[];let k=Ee(),O=(ye,je,Ot)=>{let mt=!!e.preserve.picked[ye],Rt=k(ye);return{kind:"file",path:ye,label:Ot,depth:je,state:Rt?"all":"none",locked:!mt&&Rt,note:!mt&&Rt?"matched by a pattern":mt&&!Rt?"excluded by a pattern":""}},U=String(e.preserve.search||"").trim().toLowerCase();if(U)return re.files.filter(ye=>ye.toLowerCase().includes(U)).slice(0,300).map(ye=>O(ye,0,ye));let G=[],le=(ye,je)=>{let Ot=re.dirs.get(ye);for(let mt of Ot.dirs){let Rt=!!e.preserve.expanded[mt],Wt=ee().includes(Z(mt));G.push({kind:"dir",path:mt,label:mt.slice(ye?ye.length+1:0)+"/",depth:je,open:Rt,state:Ge(mt),locked:!1,note:Wt?"whole folder":""}),Rt&&le(mt,je+1)}for(let mt of Ot.files)G.push(O(mt,je,mt.slice(ye?ye.length+1:0)))};return le("",0),G},e.preserveCount=()=>re?re.files.filter(We).length:0,e.togglePreserveDir=k=>{e.preserve.expanded[k]=!e.preserve.expanded[k]},e.togglePreserveFile=k=>{e.preserve.picked[k]=!e.preserve.picked[k],te++},e.togglePreserveFolder=k=>{let O=Z(k),U=K(k),G=ee().filter(ye=>ye!==O&&ye!==U),le=Ge(k)==="all"||ee().includes(O);for(let ye of Ve(k))e.preserve.picked[ye]=!1;te++,e.preserve.patterns=(le?G:[...G,O]).join(`
`),le&&Ve(k).some(We)&&(e.preserve.patterns=[...G,U].join(`
`))};let _e=/^readme(\.[^/]*)?$/i,st=[".md",".markdown",".mdown",".mkdn",".rst",".txt",""],pt=["README.md","README","README.markdown","README.rst","README.txt","readme.md"],Tt=k=>{let O=He(k),U=O.indexOf("."),G=st.indexOf(U===-1?"":O.slice(U).toLowerCase());return G===-1?st.length:G},Pt=()=>!!re&&!!e.preserve.commit&&e.preserve.commit===e.source?.commit;e.readmePath=()=>{if(!Pt())return"";for(let k of[".github","","docs"]){let O=(re.dirs.get(k)?.files||[]).filter(U=>_e.test(He(U)));if(O.length)return O.sort((U,G)=>Tt(U)-Tt(G)||Xe(U,G))[0]}return""},e.readmeName=()=>He(e.readmePath())||"README.md";let it={key:null,fn:()=>!1},ft=()=>{let k=(e.options?.preserveFiles||[]).map(U=>String(U).trim()).filter(Boolean),O=k.join(`
`);if(O!==it.key){let U=()=>!1;try{k.length&&(U=ol(k))}catch{}it={key:O,fn:U}}return it.fn};e.pathPreserved=k=>!!k&&ft()(k),e.readmePreserved=()=>{if(e.detectedType!=="repo")return!1;let k=ft();if(Pt()){let O=e.readmePath();return!!O&&k(O)}return pt.some(O=>k(O))},e.previewPreserved=()=>e.detectedType==="repo"&&(e.previewFile?e.pathPreserved(e.previewFile):e.readmePreserved());function Ft(){let k={terms:e.terms?e.terms.split(`
`):[],filePath:e.previewOpenPath()||"README.md",preserveFiles:e.options.preserveFiles||[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(k.branchName=e.source.branch);try{let O=parseGithubUrl(e.sourceUrl);k.repoName=`${O.owner}/${O.repo}`}catch{}return k}function So(k,O,U){let G=null,le=0,ye=()=>{if(e.detectedType!==k)return;G&&u.cancel(G);let je=++le;e.previewStatus="loading",G=u(()=>{G=null;let Ot=O();if(!Ot){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Ot).then(mt=>{je===le&&(U(mt.data,Ot),e.previewStatus="ready")}).catch(()=>{je===le&&(e.previewStatus="error")})},200)};return ye.cancel=()=>{le++,G&&u.cancel(G),G=null},e.on("dispose",ye.cancel),ye}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof ln!="string"?dl(e.previewFile):Qt()),e.detectedType==="pr"&&Vn(),e.detectedType==="gist"&&Ln()};let et=mn(Us(e));Object.defineProperty(e,"previewViewer",{get:()=>et}),Ta(et,e),Object.assign(et,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),et.preview=!0,et.fileSize=k=>k===et.filePath&&typeof ln=="string"?new Blob([ln]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,et.openPreserveFiles=()=>e.openPreserveFiles(),et.previewPreserved=()=>e.previewPreserved(),et.retryContent=()=>e.retryPreview();let pf=k=>ie.has(k)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(k),Cr=(k="")=>({path:k,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=Cr();let os=0,ln=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=k=>{if(k=k||"",k&&k===e.readmePath()&&(k=""),os++,ln=null,ii(),Qt.cancel(),e.previewFile=k,e.previewDoc=Cr(k),et.sidebarCollapsed=!0,et.content=null,!k){e.readme?Qt():e.previewStatus="idle";return}if(pf(k)){Sr("binary"),e.previewStatus="ready";return}dl(k)};function ff(){os++,ln=null,e.previewFile="",e.previewDoc=Cr(),et.sidebarCollapsed=!0,et.content=null}function dl(k){let O=++os;ln=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let U;try{U=parseGithubUrl(e.sourceUrl)}catch{U=null}if(!U||!e.source?.commit){Object.assign(e.previewDoc,{loading:!1,loadError:"The repository is still loading. Try again in a moment."}),e.previewStatus="error";return}t.get(`/api/repo/${U.owner}/${U.repo}/file`,{params:{commit:e.source.commit,path:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:ce()},transformResponse:G=>G}).then(G=>{if(O!==os)return;e.previewDoc.loading=!1;let le=typeof G.headers=="function"&&G.headers("content-type")||"";if(/json/i.test(le)){let ye=null;try{ye=JSON.parse(G.data)}catch{}if(ye&&ye.binary===!0){Sr("binary"),e.previewStatus="ready";return}}ln=typeof G.data=="string"?G.data:"",Qt()},G=>{if(O!==os)return;e.previewDoc.loading=!1;let le=yr(G);if(le==="file_too_big"){Sr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Qn.ERRORS[le]||"GitHub did not return this file.",e.previewStatus="error"})}let si;function ii(){si&&window.URL.revokeObjectURL(si),si=void 0,et.url=void 0}e.on("dispose",ii);function Sr(k){ii(),e.previewDoc.note=k,et.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),et.type=k==="too_big"?"error":"binary",et.content=k==="too_big"?"file_too_big":"binary"}function mf(k){try{let O=parseGithubUrl(e.sourceUrl),U=e.source.branch||e.details&&e.details.defaultBranch||"main",G=k&&k.includes("/")?k.slice(0,k.lastIndexOf("/")+1):"";return`https://github.com/${O.owner}/${O.repo}/raw/${U}/${G}`}catch{return""}}let ul=So("repo",()=>e.previewFile?typeof ln!="string"?null:{content:ln,options:Ft()}:e.readme?{content:e.readme,options:Ft()}:null,k=>{if(typeof k?.content!="string")throw Error("Invalid preview response");ii(),window.URL?.createObjectURL&&(et.url=si=window.URL.createObjectURL(new Blob([k.content],{type:"text/plain"})));let O=e.previewOpenPath()||e.readmeName();et.prepareFile(e.previewPathName(O)),et.fileBaseUrl=mf(O),et.renderFileContent(k.content,et.type,et.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=k.content)}),Qt=()=>{e.previewFile&&typeof ln!="string"||ul()};Qt.cancel=ul.cancel;let Eo=rt(new Map),Er=new Set,Nr=new Set,ss="",is=null,ri=()=>String(e.terms||"").split(`
`):[],filePath:e.previewOpenPath()||"README.md",preserveFiles:e.options.preserveFiles||[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(k.branchName=e.source.branch);try{let O=parseGithubUrl(e.sourceUrl);k.repoName=`${O.owner}/${O.repo}`}catch{}return k}function So(k,O,U){let G=null,le=0,ye=()=>{if(e.detectedType!==k)return;G&&u.cancel(G);let je=++le;e.previewStatus="loading",G=u(()=>{G=null;let Ot=O();if(!Ot){e.previewStatus="idle";return}t.post("/api/anonymize-preview",Ot).then(mt=>{je===le&&(U(mt.data,Ot),e.previewStatus="ready")}).catch(()=>{je===le&&(e.previewStatus="error")})},200)};return ye.cancel=()=>{le++,G&&u.cancel(G),G=null},e.on("dispose",ye.cancel),ye}e.retryPreview=()=>{e.detectedType==="repo"&&(e.previewFile&&typeof ln!="string"?ul(e.previewFile):Gt()),e.detectedType==="pr"&&Cn(),e.detectedType==="gist"&&Sn()};let et=mn(Us(e));Object.defineProperty(e,"previewViewer",{get:()=>et}),Ta(et,e),Object.assign(et,{options:{},files:[],paths:[],content:null,type:"loading",sidebarHidden:!1,sidebarCollapsed:!0,moreOpen:!1,tocOpen:!1,gotoOpen:!1,mdFindOpen:!1,mdFindQuery:"",mdFindTotal:0,mdFindIndex:0}),et.preview=!0,et.fileSize=k=>k===et.filePath&&typeof ln=="string"?new Blob([ln]).size:!e.previewFile&&e.readme?new Blob([e.readme]).size:null,et.openPreserveFiles=()=>e.openPreserveFiles(),et.previewPreserved=()=>e.previewPreserved(),et.retryContent=()=>e.retryPreview();let ff=k=>ie.has(k)||/\.(pdf|png|jpe?g|gif|svg|ico|bmp|tiff?|webp|avif|heic|heif|mp4|webm|mp3|wav|zip|bin)$/i.test(k),Cr=(k="")=>({path:k,loading:!1,note:"",loadError:""});e.previewFile="",e.previewDoc=Cr();let os=0,ln=null;e.previewOpenPath=()=>e.previewFile||e.readmePath(),e.openPreviewFile=k=>{if(k=k||"",k&&k===e.readmePath()&&(k=""),os++,ln=null,ii(),Gt.cancel(),e.previewFile=k,e.previewDoc=Cr(k),et.sidebarCollapsed=!0,et.content=null,!k){e.readme?Gt():e.previewStatus="idle";return}if(ff(k)){Sr("binary"),e.previewStatus="ready";return}ul(k)};function dl(){os++,ln=null,e.previewFile="",e.previewDoc=Cr(),et.sidebarCollapsed=!0,et.content=null}function ul(k){let O=++os;ln=null,Object.assign(e.previewDoc,{loading:!0,loadError:""}),e.previewStatus="loading";let U;try{U=parseGithubUrl(e.sourceUrl)}catch{U=null}if(!U||!e.source?.commit){Object.assign(e.previewDoc,{loading:!1,loadError:"The repository is still loading. Try again in a moment."}),e.previewStatus="error";return}t.get(`/api/repo/${U.owner}/${U.repo}/file`,{params:{commit:e.source.commit,path:k,connection:e.githubConnection,anonymizedRepoId:e.isUpdate&&i.repoId&&J(e.sourceUrl)===e._originalFullName?i.repoId:void 0,repositoryID:ce()},transformResponse:G=>G}).then(G=>{if(O!==os)return;e.previewDoc.loading=!1;let le=typeof G.headers=="function"&&G.headers("content-type")||"";if(/json/i.test(le)){let ye=null;try{ye=JSON.parse(G.data)}catch{}if(ye&&ye.binary===!0){Sr("binary"),e.previewStatus="ready";return}}ln=typeof G.data=="string"?G.data:"",Gt()},G=>{if(O!==os)return;e.previewDoc.loading=!1;let le=yr(G);if(le==="file_too_big"){Sr("too_big"),e.previewStatus="ready";return}e.previewDoc.loadError=Qn.ERRORS[le]||"GitHub did not return this file.",e.previewStatus="error"})}let si;function ii(){si&&window.URL.revokeObjectURL(si),si=void 0,et.url=void 0}e.on("dispose",ii);function Sr(k){ii(),e.previewDoc.note=k,et.prepareFile(e.previewPathName(e.previewOpenPath()||e.readmeName())),et.type=k==="too_big"?"error":"binary",et.content=k==="too_big"?"file_too_big":"binary"}function mf(k){try{let O=parseGithubUrl(e.sourceUrl),U=e.source.branch||e.details&&e.details.defaultBranch||"main",G=k&&k.includes("/")?k.slice(0,k.lastIndexOf("/")+1):"";return`https://github.com/${O.owner}/${O.repo}/raw/${U}/${G}`}catch{return""}}let cl=So("repo",()=>e.previewFile?typeof ln!="string"?null:{content:ln,options:Ft()}:e.readme?{content:e.readme,options:Ft()}:null,k=>{if(typeof k?.content!="string")throw Error("Invalid preview response");ii(),window.URL?.createObjectURL&&(et.url=si=window.URL.createObjectURL(new Blob([k.content],{type:"text/plain"})));let O=e.previewOpenPath()||e.readmeName();et.prepareFile(e.previewPathName(O)),et.fileBaseUrl=mf(O),et.renderFileContent(k.content,et.type,et.fileBaseUrl,"text/plain"),e.previewFile||(e.anonymize_readme=k.content)}),Gt=()=>{e.previewFile&&typeof ln!="string"||cl()};Gt.cancel=cl.cancel;let Eo=rt(new Map),Er=new Set,Nr=new Set,ss="",is=null,ri=()=>String(e.terms||"").split(`
`).filter(k=>k.trim());function hf(){is=null;let k=ri(),O=k.join(`
`);O!==ss&&(Eo.clear(),Nr.clear(),ss=O);let U=[...Er].filter(G=>!Eo.has(G));if(Er.clear(),!(!U.length||!k.length))for(let G=0;G<U.length;G+=400){let le=U.slice(G,G+400);t.post("/api/anonymize-preview",{contents:le,options:{terms:k,image:!0,link:!0}}).then(ye=>{if(ss!==O||ri().join(`
`)!==O)return;let je=ye.data?.contents;if(!Array.isArray(je)||je.length!==le.length)throw Error("Invalid preview response");le.forEach((Ot,mt)=>Eo.set(Ot,typeof je[mt]=="string"?je[mt]:Ot))}).catch(()=>{ss===O&&le.forEach(ye=>Nr.add(ye))})}}e.previewName=k=>{if(!k||!ri().length)return k;if(ss===ri().join(`
`)){if(Eo.has(k))return Eo.get(k);if(Nr.has(k))return k}return Er.add(k),is||(is=u(hf,120)),k},e.previewPathName=k=>{k=String(k||"");let O=k.lastIndexOf("/");return O<0?e.previewName(k):e.previewName(k.slice(0,O))+"/"+e.previewName(k.slice(O+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{et.repoId=e.repoId||"repository",et.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),et.paths=et.filePath.split("/"),et.files=e.previewTreeFiles(),et.loadedFolders=Object.fromEntries([...oe?.dirs.keys()||[]].map(k=>[e.previewName(k),!0]))},!0),e.on("dispose",()=>{is&&u.cancel(is)});function No(){!e.anonymize||!e.anonymize.terms||Qt()}async function cl(){let k=parseGithubUrl(e.sourceUrl),O=g();try{Po(),Ue();let U=await t.get(`/api/pr/${k.owner}/${k.repo}/${k.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(O))return;e.details=U.data,e.pullRequestId||(e.pullRequestId=k.repo+"-PR"+k.pullRequestId+"-"+generateRandomId(4))}catch(U){if(!y(O))return;throw Le(U),U}finally{C(O)}}let Ro=rt(new Map);function gf(){let k=new Set,O=e.details&&e.details.pullRequest;if(!O)return k;typeof O.title=="string"&&k.add(O.title),typeof O.body=="string"&&k.add(O.body),typeof O.diff=="string"&&k.add(O.diff);let U=O.comments||[];for(let G of U)typeof G.author=="string"&&k.add(G.author),typeof G.body=="string"&&k.add(G.body);return k}let Vn=So("pr",()=>{let k=gf(),O=Array.from(k);return O.length===0?null:{contents:O,options:Ft()}},(k,O)=>{if(!Array.isArray(k?.contents)||k.contents.length!==O.contents.length||k.contents.some(le=>typeof le!="string"))throw Error("Invalid preview response");let U=O.contents,G=new Map;for(let le=0;le<U.length&&le<k.contents.length;le++)G.set(U[le],k.contents[le]);Ro.clear(),G.forEach((le,ye)=>Ro.set(ye,le))});e.anonymizePrContent=function(k){return k&&(Ro.has(k)?Ro.get(k):"")};async function pl(){let k=parseGithubUrl(e.sourceUrl),O=g();try{Po(),Ue(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let U=await t.get(`/api/gist/source/${k.gistId}`);if(!y(O))return;e.details=U.data,e.gistId||(e.gistId="gist-"+k.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(U){if(!y(O))return;if(U.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Se("sourceUrl","missing",!1);return}if(U.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Se("sourceUrl","missing",!1);return}throw Le(U),U}finally{C(O)}}let To=rt(new Map);function vf(){let k=new Set,O=e.details&&e.details.gist;if(!O)return k;typeof O.description=="string"&&k.add(O.description),typeof O.ownerLogin=="string"&&k.add(O.ownerLogin);let U=O.files||[];for(let le of U)typeof le.filename=="string"&&k.add(le.filename),typeof le.content=="string"&&k.add(le.content);let G=O.comments||[];for(let le of G)typeof le.author=="string"&&k.add(le.author),typeof le.body=="string"&&k.add(le.body);return k}let Ln=So("gist",()=>{let k=vf(),O=Array.from(k);return O.length===0?null:{contents:O,options:Ft()}},(k,O)=>{if(!Array.isArray(k?.contents)||k.contents.length!==O.contents.length||k.contents.some(le=>typeof le!="string"))throw Error("Invalid preview response");let U=O.contents,G=new Map;for(let le=0;le<U.length&&le<k.contents.length;le++)G.set(U[le],k.contents[le]);To.clear(),G.forEach((le,ye)=>To.set(ye,le)),Rr()});e.anonymizeGistContent=function(k){return k&&(To.has(k)?To.get(k):"")},e.previewGistFiles=[];function Rr(){let k=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=k.map(O=>({filename:e.anonymizeGistContent(O.filename),content:e.anonymizeGistContent(O.content),language:O.language}))}e.watch("details.gist.files",Rr,!0),e.watch("terms",Rr);function yf(){let k=e.conference;if(e.conference_data=null,!k)return;let O=k===b||e.isUpdate&&k===e._originalConference;k!==b&&(b=null),t.get("/api/conferences/"+k).then(U=>{e.conference===k&&(e.conference_data=U.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!O&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===k&&(e.conference_data=null)})}function Po(){Se("repoId","used",!0),Se("repoId","format",!0),Se("pullRequestId","used",!0),Se("pullRequestId","format",!0),Se("gistId","used",!0),Se("gistId","format",!0),Se("sourceUrl","used",!0),Se("sourceUrl","missing",!0),Se("sourceUrl","access",!0),Se("sourceUrl","github",!0),Se("commit","exists",!0),Se("conference","activated",!0),Se("terms","format",!0),e.termHints=[]}function ai(){if(e.detectedType==="repo"&&e.options.expirationMode==="never")return!1;let k=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||k&&k.invalid?(k&&k.setDirty&&k.setDirty(),e.error= Line truncated
`)){if(Eo.has(k))return Eo.get(k);if(Nr.has(k))return k}return Er.add(k),is||(is=u(hf,120)),k},e.previewPathName=k=>{k=String(k||"");let O=k.lastIndexOf("/");return O<0?e.previewName(k):e.previewName(k.slice(0,O))+"/"+e.previewName(k.slice(O+1))},e.watch(()=>[e.repoId,e.previewPathName(e.previewOpenPath()||e.readmeName()),e.previewTreeFiles()],()=>{et.repoId=e.repoId||"repository",et.filePath=e.previewPathName(e.previewOpenPath()||e.readmeName()),et.paths=et.filePath.split("/"),et.files=e.previewTreeFiles(),et.loadedFolders=Object.fromEntries([...oe?.dirs.keys()||[]].map(k=>[e.previewName(k),!0]))},!0),e.on("dispose",()=>{is&&u.cancel(is)});function No(){!e.anonymize||!e.anonymize.terms||Gt()}async function pl(){let k=parseGithubUrl(e.sourceUrl),O=g();try{Po(),Ue();let U=await t.get(`/api/pr/${k.owner}/${k.repo}/${k.pullRequestId}`,{params:{connection:e.githubConnection}});if(!y(O))return;e.details=U.data,e.pullRequestId||(e.pullRequestId=k.repo+"-PR"+k.pullRequestId+"-"+generateRandomId(4))}catch(U){if(!y(O))return;throw Le(U),U}finally{C(O)}}let Ro=rt(new Map);function gf(){let k=new Set,O=e.details&&e.details.pullRequest;if(!O)return k;typeof O.title=="string"&&k.add(O.title),typeof O.body=="string"&&k.add(O.body),typeof O.diff=="string"&&k.add(O.diff);let U=O.comments||[];for(let G of U)typeof G.author=="string"&&k.add(G.author),typeof G.body=="string"&&k.add(G.body);return k}let Cn=So("pr",()=>{let k=gf(),O=Array.from(k);return O.length===0?null:{contents:O,options:Ft()}},(k,O)=>{if(!Array.isArray(k?.contents)||k.contents.length!==O.contents.length||k.contents.some(le=>typeof le!="string"))throw Error("Invalid preview response");let U=O.contents,G=new Map;for(let le=0;le<U.length&&le<k.contents.length;le++)G.set(U[le],k.contents[le]);Ro.clear(),G.forEach((le,ye)=>Ro.set(ye,le))});e.anonymizePrContent=function(k){return k&&(Ro.has(k)?Ro.get(k):"")};async function fl(){let k=parseGithubUrl(e.sourceUrl),O=g();try{Po(),Ue(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let U=await t.get(`/api/gist/source/${k.gistId}`);if(!y(O))return;e.details=U.data,e.gistId||(e.gistId="gist-"+k.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(U){if(!y(O))return;if(U.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,Se("sourceUrl","missing",!1);return}if(U.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,Se("sourceUrl","missing",!1);return}throw Le(U),U}finally{C(O)}}let To=rt(new Map);function vf(){let k=new Set,O=e.details&&e.details.gist;if(!O)return k;typeof O.description=="string"&&k.add(O.description),typeof O.ownerLogin=="string"&&k.add(O.ownerLogin);let U=O.files||[];for(let le of U)typeof le.filename=="string"&&k.add(le.filename),typeof le.content=="string"&&k.add(le.content);let G=O.comments||[];for(let le of G)typeof le.author=="string"&&k.add(le.author),typeof le.body=="string"&&k.add(le.body);return k}let Sn=So("gist",()=>{let k=vf(),O=Array.from(k);return O.length===0?null:{contents:O,options:Ft()}},(k,O)=>{if(!Array.isArray(k?.contents)||k.contents.length!==O.contents.length||k.contents.some(le=>typeof le!="string"))throw Error("Invalid preview response");let U=O.contents,G=new Map;for(let le=0;le<U.length&&le<k.contents.length;le++)G.set(U[le],k.contents[le]);To.clear(),G.forEach((le,ye)=>To.set(ye,le)),Rr()});e.anonymizeGistContent=function(k){return k&&(To.has(k)?To.get(k):"")},e.previewGistFiles=[];function Rr(){let k=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=k.map(O=>({filename:e.anonymizeGistContent(O.filename),content:e.anonymizeGistContent(O.content),language:O.language}))}e.watch("details.gist.files",Rr,!0),e.watch("terms",Rr);function yf(){let k=e.conference;if(e.conference_data=null,!k)return;let O=k===b||e.isUpdate&&k===e._originalConference;k!==b&&(b=null),t.get("/api/conferences/"+k).then(U=>{e.conference===k&&(e.conference_data=U.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!O&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link))},()=>{e.conference===k&&(e.conference_data=null)})}function Po(){Se("repoId","used",!0),Se("repoId","format",!0),Se("pullRequestId","used",!0),Se("pullRequestId","format",!0),Se("gistId","used",!0),Se("gistId","format",!0),Se("sourceUrl","used",!0),Se("sourceUrl","missing",!0),Se("sourceUrl","access",!0),Se("sourceUrl","github",!0),Se("commit","exists",!0),Se("conference","activated",!0),Se("terms","format",!0),e.termHints=[]}function ai(){if(e.detectedType==="repo"&&e.options.expirationMode==="never")return!1;let k=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||k&&k.invalid?(k&&k.setDirty&&k.setDirty(),e.error= Line truncated
`).filter(ye=>ye),connection:e.githubConnection,fullName:`${U.owner}/${U.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(G.options.pageSource=e.details.pageSource),Po();let le=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(le,G,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/status/"+e.repoId},ye=>{if(ye.data){let je=["quota_exceeded","quota_repository_limit","quota_storage_limit","subscription_required_for_never_expiration"].includes(ye.data.error);je||r("ERRORS."+ye.data.error).then(Ot=>{e.error=Ot},console.error),li(ye.data.error),je&&(ye.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,ze(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"})))}}).finally(()=>{O.disabled=!1})},e.anonymizeGist=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ai())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let O=k.currentTarget||k.target.closest?.("button")||k.target;O.disabled=!0;let U=parseGithubUrl(e.sourceUrl),G={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(ye=>ye),source:{gistId:U.gistId},options:e.options,conference:e.conference};Po();let le=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(le,G,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/gist/"+e.gistId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(je=>{e.error=je},console.error),li(ye.data.error))}).finally(()=>{O.disabled=!1})},e.anonymizePullRequest=k=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(ai())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let O=k.currentTarget||k.target.closest?.("button")||k.target;O.disabled=!0;let U=parseGithubUrl(e.sourceUrl),G={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(ye=>ye),source:{repositoryFullName:`${U.owner}/${U.repo}`,pullRequestId:U.pullRequestId},options:e.options,conference:e.conference};Po();let le=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(le,G,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(je=>{e.error=je},console.error),li(ye.data.error))}).finally(()=>{O.disabled=!1})},e.watch("conference",()=>{yf()}),e.termHints=[],e.matchTermAsWritten=k=>{e.terms=zc(e.terms,k)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Qt()}),e.watch("terms",()=>{e.termHints=Bc(e.terms),e.detectedType==="repo"&&No(),e.detectedType==="pr"&&Vn(),e.detectedType==="gist"&&Ln()}),e.watch("options.image",()=>{e.detectedType==="repo"&&No(),e.detectedType==="pr"&&Vn(),e.detectedType==="gist"&&Ln()}),e.watch("options.link",()=>{e.detectedType==="repo"&&No(),e.detectedType==="pr"&&Vn(),e.detectedType==="gist"&&Ln()}),e.watch("details",()=>{e.detectedType==="pr"&&Vn(),e.detectedType==="gist"&&Ln()},!0)},rl=function(e,t,s,i,o,r){Ta(e);let u=wt();jc();let f=Ht(),c=0,v=null,h=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){v&&(v.resolve(),v=null),h&&(u.timeout.cancel(h),h=null)}let g=!1;e.on("dispose",()=>{g=!0,c++,y(),C&&C.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,f(document,"click",I=>{e.symbolsOpen&&!I.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!I.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!I.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&I.target.isConnected&&!I.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!I.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!I.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),f(document,"keydown",I=>{I.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(I.ctrlKey||I.metaKey)&&!I.altKey&&I.key&&I.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(I.preventDefault(),e.toggleMdFind(!0))}),f(document,"keydown",function(I){if((I.metaKey||I.ctrlKey)&&I.key==="k"){I.preventDefault();var F=document.querySelector(".tree-search-input");F&&(F.focus(),F.select())}});var C=null;e.onFileSearchChange=function(){C&&(C.resolve(),C=null);let I=e.fileSearchQuery;if(!I||I.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let F=r.defer();C=F,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(I)}`,{timeout:F.promise}).then(function(E){if(!(g||C!==F)){C=null,e.fileSearchLoading=!1;var L={};e.files.forEach(function(Se){L[(Se.path||"")+"/"+Se.name]=!0});for(var W=[],j={},Y=0;Y<E.data.length;Y++){var ne=E.data[Y];if(ne.path)for(var x=ne.path.split("/"),fe="",me=0;me<x.length;me++){var Le=fe;fe=fe?fe+"/"+x[me]:x[me];var Ue=Le+"/"+x[me];!L[Ue]&&!j[Ue]&&(j[Ue]=!0,W.push({name:x[me],path:Le}))}}W.sort(function(Se,J){return(Se.path||"").split("/").length-(J.path||"").split("/").length}),W.length>0&&e.files.push.apply(e.files,W);for(var Xe=[],He=0;He<E.data.length;He++){var lt=E.data[He],Re=(lt.path||"")+"/"+lt.name;!L[Re]&&lt.size!=null&&(Xe.push(lt),L[Re]=!0)}Xe.length>0&&e.files.push.apply(e.files,Xe),e.fileSearchResults=E.data}},function(){!g&&C===F&&(C=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(I,F){if(e.repoId!=i.repoId)return z();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(E=>E&&E.trim().length>0),q();for(let E=0;E<e.paths.length-1;E++){let L=E>0?e.paths.slice(0,E).join("/"):"";e.files.some(j=>j.path===L)||e.getFiles(L)}}});function w(){if(e.paths[0]!="")return;let I=["readme.md","readme.txt","readme.org","readme.1st","readme"],F={};for(let L of e.files)L.name.toLowerCase().indexOf("readme")>-1&&(F[L.name.toLowerCase()]=L.name);let E=null;for(let L of I)if(F[L]){E=L;break}if(!E&&Object.keys(F).length>0&&(E=Object.keys(F)[0]),E){let L=s.url();L[L.length-1]!="/"&&(L+="/"),s.url(L+encodePathForUrl(F[E]))}}e.fileCounts=null;let S=0,N=new Set,b=!1;e.getFiles=function(I,F=!1){let E=e.repoId,L=S;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(I)}&v=${e.options.lastUpdateDate}`).then(function(W){if(g||E!==e.repoId||L!==S)return[];let j=I||"";return e.files=e.files.filter(Y=>Y.path!==j),e.files.push(...W.data),e.loadedFolders={...e.loadedFolders,[j]:!0},T(j,L),W.data},function(W){if(g||E!==e.repoId||L!==S)return[];F||(e.type="error",e.content=yr(W),e.files=[])})};function T(I,F){if(b||N.has(I))return;N.add(I);let E=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(I)}`).then(function(L){g||E!==e.repoId||F!==S||(e.fileCounts={...e.fileCounts,...L.data})},function(){g||E!= Line truncated
`).filter(ye=>ye),source:{repositoryFullName:`${U.owner}/${U.repo}`,pullRequestId:U.pullRequestId},options:e.options,conference:e.conference};Po();let le=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(le,G,{headers:{"Content-Type":"application/json"}}).then(()=>{N.clear(),window.location.href="/pr/"+e.pullRequestId},ye=>{ye.data&&(r("ERRORS."+ye.data.error).then(je=>{e.error=je},console.error),li(ye.data.error))}).finally(()=>{O.disabled=!1})},e.watch("conference",()=>{yf()}),e.termHints=[],e.matchTermAsWritten=k=>{e.terms=Hc(e.terms,k)},e.watch("options.preserveFiles",()=>{e.detectedType==="repo"&&Gt()}),e.watch("terms",()=>{e.termHints=zc(e.terms),e.detectedType==="repo"&&No(),e.detectedType==="pr"&&Cn(),e.detectedType==="gist"&&Sn()}),e.watch("options.image",()=>{e.detectedType==="repo"&&No(),e.detectedType==="pr"&&Cn(),e.detectedType==="gist"&&Sn()}),e.watch("options.link",()=>{e.detectedType==="repo"&&No(),e.detectedType==="pr"&&Cn(),e.detectedType==="gist"&&Sn()}),e.watch("details",()=>{e.detectedType==="pr"&&Cn(),e.detectedType==="gist"&&Sn()},!0)},rl=function(e,t,s,i,o,r){Ta(e);let u=wt();Gc();let f=Ht(),c=0,v=null,h=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function y(){v&&(v.resolve(),v=null),h&&(u.timeout.cancel(h),h=null)}let g=!1;e.on("dispose",()=>{g=!0,c++,y(),C&&C.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,f(document,"click",I=>{e.symbolsOpen&&!I.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!I.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!I.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.gotoOpen&&I.target.isConnected&&!I.target.closest?.(".goto-pop, .btn-goto, .tb-more")&&(e.gotoOpen=!1),e.accountOpen&&!I.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!I.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),f(document,"keydown",I=>{I.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.gotoOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(I.ctrlKey||I.metaKey)&&!I.altKey&&I.key&&I.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(I.preventDefault(),e.toggleMdFind(!0))}),f(document,"keydown",function(I){if((I.metaKey||I.ctrlKey)&&I.key==="k"){I.preventDefault();var F=document.querySelector(".tree-search-input");F&&(F.focus(),F.select())}});var C=null;e.onFileSearchChange=function(){C&&(C.resolve(),C=null);let I=e.fileSearchQuery;if(!I||I.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let F=r.defer();C=F,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(I)}`,{timeout:F.promise}).then(function(E){if(!(g||C!==F)){C=null,e.fileSearchLoading=!1;var L={};e.files.forEach(function(Se){L[(Se.path||"")+"/"+Se.name]=!0});for(var W=[],j={},Y=0;Y<E.data.length;Y++){var ne=E.data[Y];if(ne.path)for(var x=ne.path.split("/"),fe="",me=0;me<x.length;me++){var Le=fe;fe=fe?fe+"/"+x[me]:x[me];var Ue=Le+"/"+x[me];!L[Ue]&&!j[Ue]&&(j[Ue]=!0,W.push({name:x[me],path:Le}))}}W.sort(function(Se,J){return(Se.path||"").split("/").length-(J.path||"").split("/").length}),W.length>0&&e.files.push.apply(e.files,W);for(var Xe=[],He=0;He<E.data.length;He++){var lt=E.data[He],Re=(lt.path||"")+"/"+lt.name;!L[Re]&&lt.size!=null&&(Xe.push(lt),L[Re]=!0)}Xe.length>0&&e.files.push.apply(e.files,Xe),e.fileSearchResults=E.data}},function(){!g&&C===F&&(C=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})},e.on("routeUpdate",function(I,F){if(e.repoId!=i.repoId)return z();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(E=>E&&E.trim().length>0),q();for(let E=0;E<e.paths.length-1;E++){let L=E>0?e.paths.slice(0,E).join("/"):"";e.files.some(j=>j.path===L)||e.getFiles(L)}}});function w(){if(e.paths[0]!="")return;let I=["readme.md","readme.txt","readme.org","readme.1st","readme"],F={};for(let L of e.files)L.name.toLowerCase().indexOf("readme")>-1&&(F[L.name.toLowerCase()]=L.name);let E=null;for(let L of I)if(F[L]){E=L;break}if(!E&&Object.keys(F).length>0&&(E=Object.keys(F)[0]),E){let L=s.url();L[L.length-1]!="/"&&(L+="/"),s.url(L+encodePathForUrl(F[E]))}}e.fileCounts=null;let S=0,N=new Set,b=!1;e.getFiles=function(I,F=!1){let E=e.repoId,L=S;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(I)}&v=${e.options.lastUpdateDate}`).then(function(W){if(g||E!==e.repoId||L!==S)return[];let j=I||"";return e.files=e.files.filter(Y=>Y.path!==j),e.files.push(...W.data),e.loadedFolders={...e.loadedFolders,[j]:!0},T(j,L),W.data},function(W){if(g||E!==e.repoId||L!==S)return[];F||(e.type="error",e.content=yr(W),e.files=[])})};function T(I,F){if(b||N.has(I))return;N.add(I);let E=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(I)}`).then(function(L){g||E!==e.repoId||F!==S||(e.fileCounts={...e.fileCounts,...L.data})},function(){g||E!= Line truncated
`).length+1)),placeholder:`Jane Smith
MIT CSAIL
jane.smith@example.org`},null,10,Z5),[[u,{state:e.viewState,set:c=>{e.terms=c},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[129]||(t[129]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",x5,[t[124]||(t[124]=n("summary",null,"Regex & replacement syntax",-1)),t[125]||(t[125]=m()),n("small",e8,[t[118]||(t[118]=m("Regex is supported. Replaced by ",-1)),n("code",null,d(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[119]||(t[119]=m(", or use ",-1)),t[120]||(t[120]=n("code",null,"term=>replacement",-1)),t[121]||(t[121]=m(" to pick your own (e.g. ",-1)),t[122]||(t[122]=n("code",null,"Anonymous=>ABC",-1)),t[123]||(t[123]=m(").",-1))])]),(a(!0),l(V,null,X((e.termHints||[]).slice(0,3),c=>(a(),l("div",{class:"term-hint",key:c.line},[n("span",null,[t[126]||(t[126]=m("In ",-1)),n("code",null,d(c.term),1),t[127]||(t[127]=m(", ",-1)),n("code",null,d(c.symbols.join(" ")),1),m(" "+d(c.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:v=>e.matchTermAsWritten(c.line)},"Match as written",8,t8)]))),128)),(e.termHints||[]).length>3?(a(),l("div",n8,d(e.termHints.length-3)+" more "+d(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):p("v-if",!0),P(n("div",o8,"Terms are in an invalid format.",512),[[Q,e.anonymize?.terms?.errors?.format]])]),P(n("div",s8,[n("div",i8,[t[130]||(t[130]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",r8,d(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[25]||(t[25]=c=>e.openPreserveFiles())},d((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,a8)],512),[[Q,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[30]||(t[30]=de(c=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[29]||(t[29]=de(c=>e.savePreserveFiles(),["prevent"]))},[t[134]||(t[134]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[135]||(t[135]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),P(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[26]||(t[26]=c=>e.preserve.search=c)},null,512),[[nt,e.preserve.search]]),n("div",l8,[e.preserve.loading?(a(),l("p",d8,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",u8,d(e.preserve.error),1)):(a(),l(V,{key:2},[(a(!0),l(V,null,X(e.preserveRows(),(c,v)=>(a(),l("div",{class:"preserve-item",key:c.kind+":"+c.path,style:Ae({paddingLeft:c.depth*18+6+"px"})},[c.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":c.open?"true":"false","aria-label":(c.open?"Collapse ":"Expand ")+c.label,onClick:h=>e.togglePreserveDir(c.path)},d(c.open?"\u25BE":"\u25B8"),9,c8)):(a(),l("span",p8)),n("input",{type:"checkbox",id:"pf-"+v,"aria-label":c.kind==="dir"?"Leave folder "+c.path+" unredacted":null,checked:c.state==="all",".indeterminate":c.state==="some",disabled:c.locked,onChange:h=>c.kind==="dir"?e.togglePreserveFolder(c.path):e.togglePreserveFile(c.path)},null,40,f8),n("label",{for:c.kind==="file"?"pf-"+v:null,class:"preserve-name",onClick:h=>c.kind==="dir"&&e.togglePreserveDir(c.path)},d(c.label),9,m8),c.note?(a(),l("span",h8,d(c.note),1)):p("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",g8,d(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):p("v-if",!0)],64))]),e.preserve.truncated?(a(),l("p",v8,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):p("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[131]||(t[131]=n("summary",null,"Patterns",-1)),P(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
paper/appendix/**`,"onUpdate:modelValue":t[27]||(t[27]=c=>e.preserve.patterns=c)},null,512),[[nt,e.preserve.patterns]]),t[132]||(t[132]=n("small",{class:"form-text text-muted"},[m("One per line, as in .gitignore: "),n("code",null,"*.bib"),m(" matches in any folder; "),n("code",null,"/refs.bib"),m(" and "),n("code",null,"paper/refs.bib"),m(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),m(" covers everything inside it; "),n("code",null,"!private.bib"),m(" excludes again.")],-1))],8,y8),n("div",b8,[n("span",w8,d(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",k8,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[28]||(t[28]=c=>e.closePreserveFiles())},"Cancel"),t[133]||(t[133]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):p("v-if",!0)],512),[[Q,e.detectedType&&e.sourceReady()]]),P(n("section",C8,[t[156]||(t[156]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),P(n("div",null,[n("div",S8,[P(n("input",E8,null,512),[[u,{state:e.viewState,set:c=>{e.options.link=c},value:e.options?.link,form:"anonymize",options:{}}]]),t[137]||(t[137]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",N8,[P(n("input",R8,null,512),[[u,{state:e.viewState,set:c=>{e.options.image=c},value:e.options?.image,form:"anonymize",options:{}}]]),t[138]||(t[138]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",T8,[P(n("input",P8,null,512),[[u,{state:e.viewState,set:c=>{e.options.pdf=c},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[139]||(t[139]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",D8,[P(n("input",A8,null,512),[[u,{state:e.viewState,set:c=>{e.options.notebook=c},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",I8,[P(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,O8),[[u,{state:e.viewState,set:c=>{e.options.page=c},value:e.options?.page,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?p("v-if",!0):(a(),l("small",M8,d(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(a(),l("small",V8,d(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):p("v-if",!0)])],512),[[Q,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",L8,[...t[142]||(t[142]=[m("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):p("v-if",!0),P(n("div",null,[n("div",q8,[P(n("input",$8,null,512),[[u,{state:e.viewState,set:c=>{e.options.title=c},value:e.options?.title,form:"anonymize",options:{}}]]),t[143]||(t[143]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",F8,[P(n("input",_8,null,512),[[u,{state:e.viewState,set:c=>{e.options.content=c},value:e.options?.content,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",U8,[P(n("input",B8,null,512),[[u,{state:e.viewState,set:c=>{e.options.comments=c},value:e.options?.comments,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",z8,[P(n("input",H8,null,512),[[u,{state:e.viewState,set:c=>{e.options.username=c},value:e.options?.username,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",j8,[P(n("input",G8,null,512),[[u,{state:e.viewState,set:c=>{e.options.date=c},value:e.options?.date,form:"anonymize",options:{}}]]),t[147]||(t[147]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",W8,[P(n("input",K8,null,512),[[u,{state:e.viewState,set:c=>{e.options.origin=c},value:e.options?.origin,form:"anonymize",options:{}}]]),t[148]||(t[148]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Q,e.detectedType==="gist"]]),P(n("div",null,[n("div",Y8,[P(n("input",J8,null,512),[[u,{state:e.viewState,set:c=>{e.options.title=c},value:e.options?.title,form:"anonymize",options:{}}]]),t[149]||(t[149]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",X8,[P(n("input",Q8,null,512),[[u,{state:e.viewState,set:c=>{e.options.body=c},value:e.options?.body,form:"anonymize",options:{}}]]),t[150]||(t[150]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n( Line truncated
for the rows when a reload (tab, search, filter) has none of the new rows yet `),(a(),l(V,null,X([1,2,3,4],(r,u)=>(a(),l(V,null,[e.loading||e.refreshing&&e.filteredItems?.length==0?(a(),l("div",w7,[...t[63]||(t[63]=[n("div",{class:"cell-anon",role:"cell"},[n("span",{class:"skeleton skeleton-badge"}),n("div",{class:"anon-text"},[n("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),n("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),n("div",{class:"cell-status",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),n("div",{class:"cell-views num",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),n("div",{class:"cell-expires",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),n("div",{class:"cell-actions",role:"cell"},null,-1)])])):p("v-if",!0)],64))),64)),(a(!0),l(V,null,X(e.filteredItems,(r,u)=>(a(),l(V,{key:r?._type+":"+(r?._id||u)},[e.loading?p("v-if",!0):(a(),l("div",{key:0,class:R(["paper-table-row",{"repo-inactive":r?._statusKey=="expired"||r?._statusKey=="removed","repo-error":r?.status=="error","row-clickable":!!r?._viewUrl}]),role:"row",onClick:f=>e.openItem(r,f)},[n("div",C7,[n("span",{class:"project-type-icon",role:"img","aria-label":r?._type==="repo"?"Repository":r?._type==="pr"?"Pull request":"Gist",title:r?._type==="repo"?"Repository":r?._type==="pr"?"Pull request":"Gist"},[(a(),l("svg",E7,[n("use",{href:"#project-type-"+r._type},null,8,N7)]))],8,S7),n("div",R7,[n("div",T7,[r?._viewUrl?(a(),l("a",{key:0,class:"repo-name",title:r._label,href:e.safeUrl(r?._viewUrl)},[(r?._label||"").indexOf("/")>0?(a(),l(V,{key:0},[n("span",D7,d(r._label.slice(0,r._label.indexOf("/")+1)),1),t[64]||(t[64]=n("wbr",null,null,-1)),n("span",A7,d(r._label.slice(r._label.indexOf("/")+1)),1)],64)):(a(),l(V,{key:1},[m(d(r?._label),1)],64))],8,P7)):p("v-if",!0),r?._viewUrl?p("v-if",!0):(a(),l("span",I7,[(r?._label||"").indexOf("/")>0?(a(),l(V,{key:0},[n("span",O7,d(r._label.slice(0,r._label.indexOf("/")+1)),1),t[65]||(t[65]=n("wbr",null,null,-1)),n("span",M7,d(r._label.slice(r._label.indexOf("/")+1)),1)],64)):(a(),l(V,{key:1},[m(d(r?._label),1)],64))])),r?.role==="coauthor"?(a(),l("span",V7,"Co-author")):p("v-if",!0)]),r?._id||r?._type==="repo"&&r?.source?.commit||r?.conference?(a(),l("div",L7,[r?._id?(a(),l("code",{key:0,class:"anonymous-id",title:r._id},[r._id.length>14?(a(),l(V,{key:0},[n("span",$7,d(r._id.slice(0,-6)),1),n("span",F7,d(r._id.slice(-6)),1)],64)):(a(),l(V,{key:1},[m(d(r._id),1)],64))],8,q7)):p("v-if",!0),r?._type==="repo"&&r?.source?.commit?(a(),l("span",{key:1,class:"commit-hash",title:r.source.commit},d(r.source.commit.substring(0,7)),9,_7)):p("v-if",!0),r?.conference?(a(),l("span",{key:2,class:"cell-conf conf-tag",title:"Conference: "+r.conference},[t[66]||(t[66]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),n("span",{class:"conf-name",textContent:d(r?.conference)},null,8,B7)],8,U7)):p("v-if",!0)])):p("v-if",!0)])]),n("div",z7,[n("div",H7,[n("div",j7,[n("span",{class:R(["status-dot","status-"+r?._statusKey]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:d(e.fmt?.statusLabel(r?.status))},null,8,G7),r?.status=="removed"?(a(),l(V,{key:0},[t[67]||(t[67]=n("span",{class:"seg-sep status-removed-sep","aria-hidden":"true"},"\xB7",-1)),n("button",{type:"button",class:"project-attention-action status-enable",onClick:de(f=>e.refreshItem(r),["stop"]),title:"Reviewers can no longer open this link"},"Enable again",8,W7)],64)):p("v-if",!0)]),r?.status=="error"&&r?.statusMessage?(a(),l("div",{key:0,class:"status-sub status-sub-error",textContent:d(e.fmt?.statusMsg(r?.statusMessage)),title:r?.statusMessage},null,8,K7)):p("v-if",!0),r?._stale?(a(),l("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(r?.anonymizeDate||r?.lastView)},d(e.idleText(r)),9,Y7)):p("v-if",!0),r.status==="error"&&r._editUrl?(a(),l("a",{key:2,class:"project-attention-action",href:e.safeUrl(r._editUrl)},"Fix source",8,J7)):p("v-if",!0),r._stale||r._broken?(a(),l("div",X7,[r._stale&&!r._broken?(a(),l("span",Q7,[...t[68]||(t[68]=[m("May be stuck",-1),n("span",{"aria-hidden":"true"}," \xB7 ",-1)])])):p("v-if",!0),r._stale||r._broken?(a(),l("button",{key:1,type:"button",class:"project-attention-action",onClick:de(f=>e.showProjectDetails(r),["stop"]),"data-project-actions":r._broken?encodeURIComponent(r._type+":"+r._id):null,"aria-controls":r._broken?e.projectDetailsId(r):null,"aria-expanded":r._broken?e.selectedProject===r:null},d(r._broken?"Review details":"Check progress"),9,Z7)):p("v-if",!0)])):p("v-if",!0),r?.status=="expired"?(a(),l("button",{key:4,type:"button",class:"project-attention-action",onClick:de(f=>e.extendItem(r),["stop"]),title:"Reviewers can no longer open this link"},"Extend 6 months",8,x7)):p("v-if",!0),r?.status=="removed"&&r?.anonymizeDate?(a(),l("div",eU,"anonymized 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 and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),m("Privacy and 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. 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"),n("span",{class:"serif-hy"},"-"),m("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",{cla Line truncated
jane.smith@example.org`},null,10,Z5),[[u,{state:e.viewState,set:c=>{e.terms=c},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[130]||(t[130]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",x5,[t[125]||(t[125]=n("summary",null,"Regex & replacement syntax",-1)),t[126]||(t[126]=m()),n("small",e8,[t[119]||(t[119]=m("Regex is supported. Replaced by ",-1)),n("code",null,d(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[120]||(t[120]=m(", or use ",-1)),t[121]||(t[121]=n("code",null,"term=>replacement",-1)),t[122]||(t[122]=m(" to pick your own (e.g. ",-1)),t[123]||(t[123]=n("code",null,"Anonymous=>ABC",-1)),t[124]||(t[124]=m(").",-1))])]),(a(!0),l(V,null,X((e.termHints||[]).slice(0,3),c=>(a(),l("div",{class:"term-hint",key:c.line},[n("span",null,[t[127]||(t[127]=m("In ",-1)),n("code",null,d(c.term),1),t[128]||(t[128]=m(", ",-1)),n("code",null,d(c.symbols.join(" ")),1),m(" "+d(c.symbols.length>1?"are regex symbols":"is a regex symbol")+", so it may not match the text as written.",1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm",onClick:v=>e.matchTermAsWritten(c.line)},"Match as written",8,t8)]))),128)),(e.termHints||[]).length>3?(a(),l("div",n8,d(e.termHints.length-3)+" more "+d(e.termHints.length-3===1?"term uses":"terms use")+" regex symbols.",1)):p("v-if",!0),P(n("div",o8,"Terms are in an invalid format.",512),[[Q,e.anonymize?.terms?.errors?.format]])]),P(n("div",s8,[n("div",i8,[t[131]||(t[131]=n("span",{class:"paper-field-label",id:"preserve-files-label"},"Unredacted files",-1)),n("span",r8,d(e.preserveSummary()),1)]),n("button",{type:"button",class:"btn btn-outline-ink btn-sm","aria-describedby":"preserve-files-label",disabled:!e.source?.commit,onClick:t[25]||(t[25]=c=>e.openPreserveFiles())},d((e.options?.preserveFiles||[]).length?"Edit":"Choose files"),9,a8)],512),[[Q,e.detectedType==="repo"]]),e.preserve?.open?(a(),l("dialog",{key:0,id:"preserve-files-dialog",class:"preserve-dialog","aria-labelledby":"preserve-files-title",onCancel:t[30]||(t[30]=de(c=>e.closePreserveFiles(),["prevent"]))},[n("form",{onSubmit:t[29]||(t[29]=de(c=>e.savePreserveFiles(),["prevent"]))},[t[135]||(t[135]=n("h2",{id:"preserve-files-title"},"Leave files unredacted",-1)),t[136]||(t[136]=n("p",{class:"preserve-intro"},"Checked files are shown exactly as written, for example a bibliography where redacted self-citations would reveal you. File names are still redacted.",-1)),P(n("input",{type:"search",id:"preserve-files-search",class:"form-control",placeholder:"Search files","aria-label":"Search files",autocomplete:"off","onUpdate:modelValue":t[26]||(t[26]=c=>e.preserve.search=c)},null,512),[[nt,e.preserve.search]]),n("div",l8,[e.preserve.loading?(a(),l("p",d8,"Loading files from GitHub\u2026")):e.preserve.error?(a(),l("p",u8,d(e.preserve.error),1)):(a(),l(V,{key:2},[(a(!0),l(V,null,X(e.preserveRows(),(c,v)=>(a(),l("div",{class:"preserve-item",key:c.kind+":"+c.path,style:Ae({paddingLeft:c.depth*18+6+"px"})},[c.kind==="dir"?(a(),l("button",{key:0,type:"button",class:"preserve-caret","aria-expanded":c.open?"true":"false","aria-label":(c.open?"Collapse ":"Expand ")+c.label,onClick:h=>e.togglePreserveDir(c.path)},d(c.open?"\u25BE":"\u25B8"),9,c8)):(a(),l("span",p8)),n("input",{type:"checkbox",id:"pf-"+v,"aria-label":c.kind==="dir"?"Leave folder "+c.path+" unredacted":null,checked:c.state==="all",".indeterminate":c.state==="some",disabled:c.locked,onChange:h=>c.kind==="dir"?e.togglePreserveFolder(c.path):e.togglePreserveFile(c.path)},null,40,f8),n("label",{for:c.kind==="file"?"pf-"+v:null,class:"preserve-name",onClick:h=>c.kind==="dir"&&e.togglePreserveDir(c.path)},d(c.label),9,m8),c.note?(a(),l("span",h8,d(c.note),1)):p("v-if",!0)],4))),128)),!e.preserve.loading&&!e.preserveRows().length?(a(),l("p",g8,d(e.preserve.search?"No file matches your search.":"No text files in this commit."),1)):p("v-if",!0)],64))]),e.preserve.truncated?(a(),l("p",v8,"This repository has too many files to list them all. Use a pattern for files you cannot find.")):p("v-if",!0),n("details",{class:"preserve-patterns",open:e.preserve.patternsOpen},[t[132]||(t[132]=n("summary",null,"Patterns",-1)),P(n("textarea",{class:"form-control",rows:"3","aria-label":"Patterns",placeholder:`*.bib
paper/appendix/**`,"onUpdate:modelValue":t[27]||(t[27]=c=>e.preserve.patterns=c)},null,512),[[nt,e.preserve.patterns]]),t[133]||(t[133]=n("small",{class:"form-text text-muted"},[m("One per line, as in .gitignore: "),n("code",null,"*.bib"),m(" matches in any folder; "),n("code",null,"/refs.bib"),m(" and "),n("code",null,"paper/refs.bib"),m(" match from the repository root; a folder name such as "),n("code",null,"drafts/"),m(" covers everything inside it; "),n("code",null,"!private.bib"),m(" excludes again.")],-1))],8,y8),n("div",b8,[n("span",w8,d(e.preserve.loading||e.preserve.error?"":e.preserveCount()+(e.preserveCount()===1?" file":" files")+" will be shown as written"),1),n("span",k8,[n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[28]||(t[28]=c=>e.closePreserveFiles())},"Cancel"),t[134]||(t[134]=n("button",{type:"submit",class:"btn btn-ink"},"Save",-1))])])],32)],32)):p("v-if",!0)],512),[[Q,e.detectedType&&e.sourceReady()]]),P(n("section",C8,[t[157]||(t[157]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),P(n("div",null,[n("div",S8,[P(n("input",E8,null,512),[[u,{state:e.viewState,set:c=>{e.options.link=c},value:e.options?.link,form:"anonymize",options:{}}]]),t[138]||(t[138]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",N8,[P(n("input",R8,null,512),[[u,{state:e.viewState,set:c=>{e.options.image=c},value:e.options?.image,form:"anonymize",options:{}}]]),t[139]||(t[139]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",T8,[P(n("input",P8,null,512),[[u,{state:e.viewState,set:c=>{e.options.pdf=c},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[140]||(t[140]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",D8,[P(n("input",A8,null,512),[[u,{state:e.viewState,set:c=>{e.options.notebook=c},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[141]||(t[141]=n("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1))]),n("div",I8,[P(n("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,O8),[[u,{state:e.viewState,set:c=>{e.options.page=c},value:e.options?.page,form:"anonymize",options:{}}]]),t[142]||(t[142]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?p("v-if",!0):(a(),l("small",M8,d(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),1)),e.details?.hasPage&&e.details?.pageSource?.branch&&e.source?.branch&&e.details.pageSource.branch!==e.source.branch?(a(),l("small",V8,d(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):p("v-if",!0)])],512),[[Q,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(a(),l("p",L8,[...t[143]||(t[143]=[m("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):p("v-if",!0),P(n("div",null,[n("div",q8,[P(n("input",$8,null,512),[[u,{state:e.viewState,set:c=>{e.options.title=c},value:e.options?.title,form:"anonymize",options:{}}]]),t[144]||(t[144]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",F8,[P(n("input",_8,null,512),[[u,{state:e.viewState,set:c=>{e.options.content=c},value:e.options?.content,form:"anonymize",options:{}}]]),t[145]||(t[145]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",U8,[P(n("input",B8,null,512),[[u,{state:e.viewState,set:c=>{e.options.comments=c},value:e.options?.comments,form:"anonymize",options:{}}]]),t[146]||(t[146]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",z8,[P(n("input",H8,null,512),[[u,{state:e.viewState,set:c=>{e.options.username=c},value:e.options?.username,form:"anonymize",options:{}}]]),t[147]||(t[147]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",j8,[P(n("input",G8,null,512),[[u,{state:e.viewState,set:c=>{e.options.date=c},value:e.options?.date,form:"anonymize",options:{}}]]),t[148]||(t[148]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",W8,[P(n("input",K8,null,512),[[u,{state:e.viewState,set:c=>{e.options.origin=c},value:e.options?.origin,form:"anonymize",options:{}}]]),t[149]||(t[149]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Q,e.detectedType==="gist"]]),P(n("div",null,[n("div",Y8,[P(n("input",J8,null,512),[[u,{state:e.viewState,set:c=>{e.options.title=c},value:e.options?.title,form:"anonymize",options:{}}]]),t[150]||(t[150]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",X8,[P(n("input",Q8,null,512),[[u,{state:e.viewState,set:c=>{e.options.body=c},value:e.options?.body,form:"anonymize",options:{}}]]),t[151]||(t[151]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n( Line truncated
for the rows when a reload (tab, search, filter) has none of the new rows yet `),(a(),l(V,null,X([1,2,3,4],(r,u)=>(a(),l(V,null,[e.loading||e.refreshing&&e.filteredItems?.length==0?(a(),l("div",k7,[...t[63]||(t[63]=[n("div",{class:"cell-anon",role:"cell"},[n("span",{class:"skeleton skeleton-badge"}),n("div",{class:"anon-text"},[n("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),n("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),n("div",{class:"cell-status",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),n("div",{class:"cell-views num",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),n("div",{class:"cell-expires",role:"cell"},[n("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),n("div",{class:"cell-actions",role:"cell"},null,-1)])])):p("v-if",!0)],64))),64)),(a(!0),l(V,null,X(e.filteredItems,(r,u)=>(a(),l(V,{key:r?._type+":"+(r?._id||u)},[e.loading?p("v-if",!0):(a(),l("div",{key:0,class:R(["paper-table-row",{"repo-inactive":r?._statusKey=="expired"||r?._statusKey=="removed","repo-error":r?.status=="error","row-clickable":!!r?._viewUrl}]),role:"row",onClick:f=>e.openItem(r,f)},[n("div",S7,[n("span",{class:"project-type-icon",role:"img","aria-label":r?._type==="repo"?"Repository":r?._type==="pr"?"Pull request":"Gist",title:r?._type==="repo"?"Repository":r?._type==="pr"?"Pull request":"Gist"},[(a(),l("svg",N7,[n("use",{href:"#project-type-"+r._type},null,8,R7)]))],8,E7),n("div",T7,[n("div",P7,[r?._viewUrl?(a(),l("a",{key:0,class:"repo-name",title:r._label,href:e.safeUrl(r?._viewUrl)},[(r?._label||"").indexOf("/")>0?(a(),l(V,{key:0},[n("span",A7,d(r._label.slice(0,r._label.indexOf("/")+1)),1),t[64]||(t[64]=n("wbr",null,null,-1)),n("span",I7,d(r._label.slice(r._label.indexOf("/")+1)),1)],64)):(a(),l(V,{key:1},[m(d(r?._label),1)],64))],8,D7)):p("v-if",!0),r?._viewUrl?p("v-if",!0):(a(),l("span",O7,[(r?._label||"").indexOf("/")>0?(a(),l(V,{key:0},[n("span",M7,d(r._label.slice(0,r._label.indexOf("/")+1)),1),t[65]||(t[65]=n("wbr",null,null,-1)),n("span",V7,d(r._label.slice(r._label.indexOf("/")+1)),1)],64)):(a(),l(V,{key:1},[m(d(r?._label),1)],64))])),r?.role==="coauthor"?(a(),l("span",L7,"Co-author")):p("v-if",!0)]),r?._id||r?._type==="repo"&&r?.source?.commit||r?.conference?(a(),l("div",q7,[r?._id?(a(),l("code",{key:0,class:"anonymous-id",title:r._id},[r._id.length>14?(a(),l(V,{key:0},[n("span",F7,d(r._id.slice(0,-6)),1),n("span",_7,d(r._id.slice(-6)),1)],64)):(a(),l(V,{key:1},[m(d(r._id),1)],64))],8,$7)):p("v-if",!0),r?._type==="repo"&&r?.source?.commit?(a(),l("span",{key:1,class:"commit-hash",title:r.source.commit},d(r.source.commit.substring(0,7)),9,U7)):p("v-if",!0),r?.conference?(a(),l("span",{key:2,class:"cell-conf conf-tag",title:"Conference: "+r.conference},[t[66]||(t[66]=n("svg",{class:"project-type-svg","aria-hidden":"true"},[n("use",{href:"#project-icon-conference"})],-1)),n("span",{class:"conf-name",textContent:d(r?.conference)},null,8,z7)],8,B7)):p("v-if",!0)])):p("v-if",!0)])]),n("div",H7,[n("div",j7,[n("div",G7,[n("span",{class:R(["status-dot","status-"+r?._statusKey]),"aria-hidden":"true"},null,2),n("span",{class:"status-word",textContent:d(e.fmt?.statusLabel(r?.status))},null,8,W7),r?.status=="removed"?(a(),l(V,{key:0},[t[67]||(t[67]=n("span",{class:"seg-sep status-removed-sep","aria-hidden":"true"},"\xB7",-1)),n("button",{type:"button",class:"project-attention-action status-enable",onClick:de(f=>e.refreshItem(r),["stop"]),title:"Reviewers can no longer open this link"},"Enable again",8,K7)],64)):p("v-if",!0)]),r?.status=="error"&&r?.statusMessage?(a(),l("div",{key:0,class:"status-sub status-sub-error",textContent:d(e.fmt?.statusMsg(r?.statusMessage)),title:r?.statusMessage},null,8,Y7)):p("v-if",!0),r?._stale?(a(),l("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(r?.anonymizeDate||r?.lastView)},d(e.idleText(r)),9,J7)):p("v-if",!0),r.status==="error"&&r._editUrl?(a(),l("a",{key:2,class:"project-attention-action",href:e.safeUrl(r._editUrl)},"Fix source",8,X7)):p("v-if",!0),r._stale||r._broken?(a(),l("div",Q7,[r._stale&&!r._broken?(a(),l("span",Z7,[...t[68]||(t[68]=[m("May be stuck",-1),n("span",{"aria-hidden":"true"}," \xB7 ",-1)])])):p("v-if",!0),r._stale||r._broken?(a(),l("button",{key:1,type:"button",class:"project-attention-action",onClick:de(f=>e.showProjectDetails(r),["stop"]),"data-project-actions":r._broken?encodeURIComponent(r._type+":"+r._id):null,"aria-controls":r._broken?e.projectDetailsId(r):null,"aria-expanded":r._broken?e.selectedProject===r:null},d(r._broken?"Review details":"Check progress"),9,x7)):p("v-if",!0)])):p("v-if",!0),r?.status=="expired"?(a(),l("button",{key:4,type:"button",class:"project-attention-action",onClick:de(f=>e.extendItem(r),["stop"]),title:"Reviewers can no longer open this link"},"Extend 6 months",8,eU)):p("v-if",!0),r?.status=="removed"&&r?.anonymizeDate?(a(),l("div",tU,"anonymized 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 and security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),m("Privacy and 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. 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"),n("span",{class:"serif-hy"},"-"),m("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",{cla Line truncated
anonymized repository often think it is about the paper, so the
label names the service and the tooltip says who to contact. `),n("li",{class:R(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[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)])],2),n("li",{class:R(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),m("Support ")],-1)])],2),e.isDarkMode?p("v-if",!0):(a(),l("li",mz,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to dark mode","aria-label":"Switch to dark mode",onClick:t[1]||(t[1]=s=>{e.darkMode(!0)})},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(a(),l("li",hz,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to light mode","aria-label":"Switch to light mode",onClick:t[2]||(t[2]=s=>{e.darkMode(!1)})},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),!e.user&&!e.isReviewerRoute?(a(),l("li",gz,[...t[23]||(t[23]=[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?(a(),l("li",vz,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=de(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):p("v-if",!0),e.user?(a(),l("li",yz,[n("a",bz,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,wz)):p("v-if",!0),n("span",kz,d(e.user?.username),1)]),n("div",Cz,[n("h6",Sz,"Signed in as @"+d(e.user?.username),1),t[25]||(t[25]=Ce('<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 um-extra" 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>',6)),e.headerShowSupport?(a(),l("a",Ez,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):p("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):p("v-if",!0)])])],2),e.generalMessage?(a(),l("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,Nz)):p("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=de(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=de(s=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),P(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=s=>e.emailPromptAddress=s),disabled:e.emailPromptBusy},null,8,Rz),[[nt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p Line truncated
python experiments/run.py`),n("p",null,[m("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),p(" Live stats "),n("section",{class:R(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",Fz,[e.statsEmpty()?p("v-if",!0):(a(),l("div",_z,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),m(),n("span",null,[m("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?p("v-if",!0):(a(),l("div",Uz,[(a(!0),l(V,null,X(e.cards,(i,o)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:R(["paper-stat-value",{"is-pending":!e.stat}])},d(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",Bz,d(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",zz," +"+d(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):p("v-if",!0)]))),128))]))],2),p(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[m("The same repository, "),n("em",null,"minus you.")])]),n("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),n("div",Hz,[n("div",jz,[t[13]||(t[13]=n("label",{for:"demo-terms"},[m("Terms to redact "),n("span",null,[m("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),P(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=$t(de(()=>{},["prevent"]),["enter"]))},null,544),[[nt,e.demoTerms]])]),n("div",Gz,[n("div",Wz,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[m("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",Kz,[n("div",Yz,[(a(!0),l(V,null,X(e.demoParts(),(i,o)=>(a(),l(V,{key:o},[i.redacted?(a(),l("mark",Jz,d(i.original),1)):(a(),l(V,{key:1},[m(d(i.text),1)],64))],64))),128)),t[14]||(t[14]=m("\u200B",-1))]),P(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[nt,e.demoText]])])]),n("div",Xz,[n("div",Qz,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",Zz,[n("span",xz,d(e.demoCount())+" redacted",1)])]),n("div",eH,[(a(!0),l(V,null,X(e.demoParts(),(i,o)=>(a(),l(V,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},d(i.text),9,tH)):(a(),l(V,{key:1},[m(d(i.text),1)],64))],64))),128))])])])]),p(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",nH,[n("div",oH,[(a(!0),l(V,null,X(e.features,(i,o)=>(a(),l("div",{class:R(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,o),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",iH,[n("span",rH,d(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",aH,d(i?.eyebrow),1)]),n("span",lH,[m(d(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",dH,"-")):p("v-if",!0),m(d(i?.title.split("-").slice(1).join("-"))+" "+d(i?.accent),1)])],40,sH),n("div",uH,[n("span",cH,[m(d(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",pH,"-")):p("v-if",!0),m(d(i?.title.split("-").slice(1).join("-"))+" "+d(i?.accent),1)]),n("p",null,d(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},d(i?.cta)+" \u2192",9,fH)])],2))),128))]),n("div",mH,[(a(!0),l(V,null,X(e.features,(i,o)=>P((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",gH,[n("div",vH,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",yH,d(i?.url),1)]),n("div",{class:R(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",wH,[...t[19]||(t[19]=[Ce('<div class="fm-label">GitHub reposit Line truncated
label names the service and the tooltip says who to contact. `),n("li",{class:R(["nav-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[19]||(t[19]=[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)])],2),n("li",{class:R(["nav-item nav-support-item nav-extra-item d-none d-lg-block",{"in-user-menu":!!e.user?.username}])},[...t[20]||(t[20]=[n("a",{class:"nav-link nav-support-inline",href:"https://ko-fi.com/tdurieux",target:"_blank",rel:"noopener",title:"Donate on Ko-fi to help cover hosting costs"},[n("svg",{class:"ui-icon nav-heart","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})]),m("Support ")],-1)])],2),e.isDarkMode?p("v-if",!0):(a(),l("li",hz,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to dark mode","aria-label":"Switch to dark mode",onClick:t[1]||(t[1]=s=>{e.darkMode(!0)})},[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(a(),l("li",gz,[n("button",{type:"button",class:"nav-link nav-icon",title:"Switch to light mode","aria-label":"Switch to light mode",onClick:t[2]||(t[2]=s=>{e.darkMode(!1)})},[...t[22]||(t[22]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):p("v-if",!0),!e.user&&!e.isReviewerRoute?(a(),l("li",vz,[...t[23]||(t[23]=[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?(a(),l("li",yz,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=de(s=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):p("v-if",!0),e.user?(a(),l("li",bz,[n("a",wz,[e.user?.photo?(a(),l("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,kz)):p("v-if",!0),n("span",Cz,d(e.user?.username),1)]),n("div",Sz,[n("h6",Ez,"Signed in as @"+d(e.user?.username),1),t[25]||(t[25]=Ce('<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 um-extra" 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>',6)),e.headerShowSupport?(a(),l("a",Nz,[...t[24]||(t[24]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):p("v-if",!0),t[26]||(t[26]=n("div",{class:"dropdown-divider"},null,-1)),t[27]||(t[27]=n("a",{class:"dropdown-item",href:"/api/user/logout",target:"_self"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-logout"})]),n("span",null,"Sign out")],-1))])])):p("v-if",!0)])])],2),e.generalMessage?(a(),l("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,Rz)):p("v-if",!0),e.emailPromptOpen?(a(),l("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=de(s=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=de(s=>e.respondToEmailPrompt("save"),["prevent"]))},[t[30]||(t[30]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[31]||(t[31]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[32]||(t[32]=n("label",{for:"email-prompt-address"},"Email address",-1)),P(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=s=>e.emailPromptAddress=s),disabled:e.emailPromptBusy},null,8,Tz),[[nt,e.emailPromptAddress]]),e.emailPromptError?(a(),l("p Line truncated
python experiments/run.py`),n("p",null,[m("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),p(" Live stats "),n("section",{class:R(["paper-stats paper-wrap",{"is-empty":e.statsEmpty()}]),id:"metrics","aria-label":"Usage over the last 60 days"},[n("div",_z,[e.statsEmpty()?p("v-if",!0):(a(),l("div",Uz,[...t[11]||(t[11]=[n("span",{class:"paper-stats-dot","aria-hidden":"true"},null,-1),m(),n("span",null,[m("Live \xB7 last 60 days"),n("span",{class:"paper-stats-daily"}," \xB7 updated daily")],-1)])])),t[12]||(t[12]=n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA",-1))]),e.statsEmpty()?p("v-if",!0):(a(),l("div",Bz,[(a(!0),l(V,null,X(e.cards,(i,o)=>(a(),l("div",{class:"paper-stat-card",key:i?.key},[n("div",{class:R(["paper-stat-value",{"is-pending":!e.stat}])},d(e.stat?e.fmt?.bigNum(i?.total):"\u2014"),3),n("div",zz,d(i?.label),1),e.history[i?.key].bars?.length>1&&e.history[i?.key].deltaToday>0?(a(),l("div",Hz," +"+d(e.fmt?.number(e.history[i?.key].deltaToday))+" today ",1)):p("v-if",!0)]))),128))]))],2),p(" Before / after "),t[22]||(t[22]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[m("The same repository, "),n("em",null,"minus you.")])]),n("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),n("div",jz,[n("div",Gz,[t[13]||(t[13]=n("label",{for:"demo-terms"},[m("Terms to redact "),n("span",null,[m("comma-separated"),n("span",{class:"dt-try"},", try adding your own")])],-1)),P(n("textarea",{id:"demo-terms",class:"demo-terms-input",rows:"1","onUpdate:modelValue":t[0]||(t[0]=i=>e.demoTerms=i),spellcheck:"false",autocomplete:"off",onKeydown:t[1]||(t[1]=$t(de(()=>{},["prevent"]),["enter"]))},null,544),[[nt,e.demoTerms]])]),n("div",Wz,[n("div",Kz,[t[15]||(t[15]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[m("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",Yz,[n("div",Jz,[(a(!0),l(V,null,X(e.demoParts(),(i,o)=>(a(),l(V,{key:o},[i.redacted?(a(),l("mark",Xz,d(i.original),1)):(a(),l(V,{key:1},[m(d(i.text),1)],64))],64))),128)),t[14]||(t[14]=m("\u200B",-1))]),P(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[2]||(t[2]=i=>e.demoText=i),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[nt,e.demoText]])])]),n("div",Qz,[n("div",Zz,[t[16]||(t[16]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",xz,[n("span",eH,d(e.demoCount())+" redacted",1)])]),n("div",tH,[(a(!0),l(V,null,X(e.demoParts(),(i,o)=>(a(),l(V,{key:o},[i.redacted?(a(),l("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+i.original+"\u201D"},d(i.text),9,nH)):(a(),l(V,{key:1},[m(d(i.text),1)],64))],64))),128))])])])]),p(" What you get: one screenshot, three tabs "),t[23]||(t[23]=n("section",{class:"paper-section-head paper-wrap",id:"about"},[n("div",null,[n("div",{class:"paper-eyebrow"},"What you get"),n("h2",null,"Anonymize, review, manage.")]),n("p",null," Terms are redacted in text files. Enabled images and PDFs are served unchanged, so review them for identifying content before sharing. Monitor your mirror, update it, or remove it when the review is over. ")],-1)),n("section",oH,[n("div",sH,[(a(!0),l(V,null,X(e.features,(i,o)=>(a(),l("div",{class:R(["paper-feature",{"is-on":e.feature===i?.key}]),key:i?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:r=>e.selectFeature(i.key),onKeydown:r=>e.featureKeydown(r,o),id:"feature-tab-"+i?.key,"aria-controls":"feature-panel-"+i?.key,"aria-selected":e.feature===i?.key,tabindex:e.feature===i?.key?0:-1},[n("span",rH,[n("span",aH,d(i?.num),1),t[17]||(t[17]=n("span",{class:"pf-sep"}," \xB7 ",-1)),n("span",lH,d(i?.eyebrow),1)]),n("span",dH,[m(d(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",uH,"-")):p("v-if",!0),m(d(i?.title.split("-").slice(1).join("-"))+" "+d(i?.accent),1)])],40,iH),n("div",cH,[n("span",pH,[m(d(i?.title.split("-")[0]),1),i?.title.includes("-")?(a(),l("span",fH,"-")):p("v-if",!0),m(d(i?.title.split("-").slice(1).join("-"))+" "+d(i?.accent),1)]),n("p",null,d(i?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(i)),target:e.featureTarget(i)},d(i?.cta)+" \u2192",9,mH)])],2))),128))]),n("div",hH,[(a(!0),l(V,null,X(e.features,(i,o)=>P((a(),l("div",{class:"paper-feature-panel",role:"tabpanel",key:i?.key,id:"feature-panel-"+i?.key,"aria-labelledby":"feature-tab-"+i?.key},[n("div",vH,[n("div",yH,[t[18]||(t[18]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",bH,d(i?.url),1)]),n("div",{class:R(["feat-mock","is-"+i?.key]),role:"img","aria-label":i?.alt},[i?.key==="anonymize"?(a(),l("div",kH,[...t[19]||(t[19]=[Ce('<div class="fm-label">GitHub reposit Line truncated
<span class="ln">2</span><span class="c"># Author: <span class="redact">XXXX-1</span>, <span class="redact">XXXX-2</span></span>
<span class="ln">3</span><span class="k">import</span> torch
<span class="ln">4</span><span class="k">from</span> utils <span class="k">import</span> load_config
@@ -58,18 +58,18 @@ python experiments/run.py`),n("p",null,[m("Contact: "),n("span",{class:"redact",
<span class="ln">7</span> model = build_model(config)
<span class="ln">8</span> <span class="k">for</span> epoch <span class="k">in</span> range(config.epochs):
<span class="ln">9</span> loss = step(model)
<span class="ln">10</span> log(<span class="s">&quot;epoch %d: %.3f&quot;</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",CH,[...t[21]||(t[21]=[Ce('<div class="fm-dash-head"><span>Project</span><span>Status</span><span>Views</span><span>Expires</span></div><div class="fm-dash-row"><span><b>DeepLearnUtils</b><i>paper-7f2a \xB7 ICSE 2027</i></span><span class="st is-ready">Ready</span><span>41</span><span>Mar 31, 2027</span></div><div class="fm-dash-row"><span><b>vision-bench#212</b><i>pull request \xB7 FSE 2027</i></span><span class="st is-ready">Ready</span><span>12</span><span>Never</span></div><div class="fm-dash-row"><span><b>graph-repair</b><i>gr-91ab</i></span><span class="st is-progress">Updating</span><span>5</span><span>Jan 5, 2027</span></div><div class="fm-dash-row is-muted"><span><b>JarSift</b><i>OOPSLA 2025</i></span><span class="st is-expired">Expired</span><span>72</span><span>Sep 28, 2026</span></div>',5)])]))],10,bH)])],8,hH)),[[Q,e.feature===i?.key]])),128))])]),p(" FAQ teaser "),t[24]||(t[24]=Ce('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),Me(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var SH={class:"paper-empty"},EH={class:"paper-empty-inner"},NH={key:0,class:"paper-eyebrow"},RH={key:1,class:"paper-eyebrow"},TH={key:2,class:"paper-empty-title"},PH=["textContent"];function Ap(e,t){return a(),l("div",SH,[n("div",EH,[e.error?p("v-if",!0):(a(),l("div",NH,"Working")),e.error?(a(),l("div",RH,"Error")):p("v-if",!0),e.error?p("v-if",!0):(a(),l("h1",TH,[...t[0]||(t[0]=[m(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:d(e.fmt.translate(e.error))},null,8,PH)):p("v-if",!0)])])}var DH={class:"container paper-page paper-settings"},AH={class:"paper-crumbs"},IH={class:"here"},OH={class:"paper-page-title"},MH={class:"paper-settings-body"},VH={class:"paper-settings-toc"},LH={href:"#conf-billing"},qH={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},$H={id:"conf-basics",class:"paper-settings-section"},FH={class:"form-group"},_H={class:"invalid-feedback"},UH={class:"invalid-feedback"},BH={class:"form-group"},zH={class:"invalid-feedback"},HH={class:"form-group"},jH={class:"invalid-feedback"},GH={class:"invalid-feedback"},WH={id:"conf-window",class:"paper-settings-section"},KH={class:"form-grid-2"},YH={class:"form-group"},JH={class:"invalid-feedback"},XH={class:"invalid-feedback"},QH={class:"form-group"},ZH={class:"invalid-feedback"},xH={class:"invalid-feedback"},ej={id:"conf-rendering",class:"paper-settings-section"},tj={class:"form-check"},nj={class:"form-check-input",type:"checkbox",id:"link",name:"link"},oj={class:"form-check"},sj={class:"form-check-input",type:"checkbox",id:"image",name:"image"},ij={class:"form-check"},rj={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},aj={class:"form-check"},lj={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},dj={id:"conf-features",class:"paper-settings-section"},uj={class:"form-check"},cj={class:"form-check-input",type:"checkbox",id:"update",name:"update"},pj={class:"form-check"},fj={class:"form-check-input",type:"checkbox",id:"page",name:"page"},mj={id:"conf-plan",class:"paper-settings-section"},hj={key:0,class:"paper-section-copy"},gj={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},Line truncated
`).length))+" lines",1)):p("v-if",!0)]),P(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=u=>e.copyPath())},[(a(),l("svg",dG,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,uG)]))],8,lG),[[Q,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",cG,[e.redactionCount()?(a(),l(V,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[m(d(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,pG),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):p("v-if",!0),m(d(e.languageName||"Text"),1),n("span",fG,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),m(d(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),m(d(e.fmt?.number(e.content.split(`
`).length))+" lines",1)])):p("v-if",!0),e.type=="html"?(a(),l("span",mG,[e.redactionCount()?(a(),l(V,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[m(d(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,hG),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):p("v-if",!0),t[56]||(t[56]=m("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(V,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),m(d(e.formatSize(e.fileSize(e.filePath))),1)],64)):p("v-if",!0)])):p("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=u=>e.openPreserveFiles())},"Left unredacted")):p("v-if",!0),n("div",gG,[e.isCsv()?(a(),l("div",vG,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=u=>e.csvView="table")},"Table",10,yG),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[5]||(t[5]=u=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,bG)])):p("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",wG,[n("button",{type:"button",class:R(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[6]||(t[6]=u=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,kG),e.symbolsOpen?(a(),l("div",CG,[n("div",SG,d(e.symbols().length)+" "+d(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(V,null,X(e.symbols(),u=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:u.line+u.name,onClick:f=>e.goToSymbol(u.line)},[n("span",{class:R(["symbols-kind","is-"+u.kind])},d(u.kind==="class"?"C":u.kind==="function"?"\u0192":"v"),3),n("span",NG,d(u.name),1),n("span",RG,d(u.line),1)],8,EG))),128))])):p("v-if",!0)])):p("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:R(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[7]||(t[7]=u=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,TG)):p("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",PG,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[8]||(t[8]=u=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,DG)):p("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:R(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[9]||(t[9]=u=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,AG)):p("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[10]||(t[10]=u=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,IG)):p("v-if",!0)])):p("v-if",!0),!e.preview||e.url?(a(),l("div",OG,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,MG),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=u=>e.copyContent())},[(a(),l("svg",LG,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,qG)]))],8,VG)):p("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,$G)])):p("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=u=>e.copyContent())},[(a(),l("svg",_G,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,UG)]))],8,FG)):p("v-if",!0),e.type=="html"&&e.r Line truncated
`).length))+" lines",1)],64)):p("v-if",!0)])):p("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",JG)):p("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[17]||(t[17]=u=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),m("Find in file",-1)])])):p("v-if",!0),e.type=="html"?(a(),l("div",XG)):p("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[18]||(t[18]=u=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),m("Find in file",-1)])])):p("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[19]||(t[19]=u=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),m("Go to line",-1)])])):p("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[20]||(t[20]=u=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=m("Wrap lines",-1)),e.wrapLines?(a(),l("span",ZG,"\u2713")):p("v-if",!0)],8,QG)):p("v-if",!0),e.isCsv()?(a(),l("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[21]||(t[21]=u=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(a(),l("svg",xG,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,eW)])),m(d(e.csvView==="table"?"Show as text":"Show as table"),1)])):p("v-if",!0),e.type!="html"?(a(),l("div",tW)):p("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),m("View raw",-1)])],8,nW)):p("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),m("View raw",-1)])],8,oW)):p("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),m("Download file",-1)])],8,sW)):p("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),m("Open website",-1)])],8,iW)):p("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),m("Edit anonymization",-1)])],8,rW)):p("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),m("Download ZIP",-1)])],8,aW)):p("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=u=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),m("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),m("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),m("Report a bug")],-1))])):p("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=de(u=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),P(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(`
`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=u=>e.gotoValue=u),onKeydown:t[25]||(t[25]=$t(de(u=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,lW),[[nt,e.gotoValue]]),n("span",{class:R(["goto-hint",{"is-error":e.gotoError}])},d(e.gotoError||"Line, or line:column"),3)],32)):p("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(a(),l("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",uW,[n("thead",null,[n("tr",null,[t[83]||(t[83]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(a(!0),l(V,null,X(e.csvRows()[0]||[],(u,f)=>(a(),l("th",{scope:"col",key:f,class:R({"is-num":e.csvNumCol(f)})},[(a(!0),l(V,null,X(e.redactParts(u),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,d(c.n),1)],8,cW)):(a(),l(V,{key:1},[m(d(c.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(V,null,X(e.csvRows().slice(1),(u,f)=>(a(),l("tr",{key:f},[n("td",pW,d(f+1),1),(a(!0),l(V,null,X(u,(c,v)=>(a(),l("td",{key:v,class:R({"is-num":e.csvNumCol(v)})},[(a(!0),l(V,null,X(e.redactParts(c),(h,y)=>(a(),l(V,{key:y},[h.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+h.n},[n("i",null,d(h.n),1)],8,fW)):(a(),l(V,{key:1},[m(d(h.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,dW)):p("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?P((a(),l("div",mW,null,512)),[[r,{content:e.content,options:e.aceOption}]]):p("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",hW,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=u=>{e.mdFindQuery=u.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=$t(de(u=>u.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=$t(de(u=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,gW),n("span",vW,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=u=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,yW),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=u=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,bW)]),n("span",wW,d(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:R(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=u=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,kW),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=u=>e.toggleMdFind(!1))},"\xD7")])):p("v-if",!0),e.type=="html"?(a(),l("div",CW,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,SW),e.readmeToc().length>=3?(a(),l("aside",EW,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",NW,[n("a",{href:"#",class:R(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=de(u=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(V,null,X(e.readmeToc(),(u,f)=>(a(),l("a",{key:u.id,href:"#"+u.id,class:R(["lvl-"+u.level,{"is-active":e.activeHeading===u.id}]),onClick:de(c=>e.scrollToHeading(u.id),["prevent"])},d(u.text),11,RW))),128))])])):p("v-if",!0)])):p("v-if",!0)],2)):p("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Jt(s,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):p("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:R(["file-card file-card-media","view-"+e.type])},[n("header",TW,[n("div",PW,[n("button",{type:"button",class:R(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=u=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",DW,[n("li",AW,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:d(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,IW)]),(a(!0),l(V,null,X(e.paths,(u,f)=>(a(),l("li",{class:"breadcrumb-item","aria-current":f===e.paths.length-1?"page":null},[(a(!0),l(V,null,X(e.redactParts(u),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,d(c.n),1)],8,MW)):(a(),l(V,{key:1},[m(d(c.t),1)],64))],64))),128))],8,OW))),256))]),n("span",VW,[e.type=="IPython Line truncated
<span class="ln">10</span> log(<span class="s">&quot;epoch %d: %.3f&quot;</span>, epoch, loss)</pre></div>`,2)])])):(a(),l("div",SH,[...t[21]||(t[21]=[Ce('<div class="fm-dash-head"><span>Project</span><span>Status</span><span>Views</span><span>Expires</span></div><div class="fm-dash-row"><span><b>DeepLearnUtils</b><i>paper-7f2a \xB7 ICSE 2027</i></span><span class="st is-ready">Ready</span><span>41</span><span>Mar 31, 2027</span></div><div class="fm-dash-row"><span><b>vision-bench#212</b><i>pull request \xB7 FSE 2027</i></span><span class="st is-ready">Ready</span><span>12</span><span>Never</span></div><div class="fm-dash-row"><span><b>graph-repair</b><i>gr-91ab</i></span><span class="st is-progress">Updating</span><span>5</span><span>Jan 5, 2027</span></div><div class="fm-dash-row is-muted"><span><b>JarSift</b><i>OOPSLA 2025</i></span><span class="st is-expired">Expired</span><span>72</span><span>Sep 28, 2026</span></div>',5)])]))],10,wH)])],8,gH)),[[Q,e.feature===i?.key]])),128))])]),p(" FAQ teaser "),t[24]||(t[24]=Ce('<section class="paper-qa paper-qa-r3 paper-wrap" aria-labelledby="qa-heading"><div class="qa-head"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2></div><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div class="qa-grid"><div class="q"><a href="/faq#permissions">What access does GitHub sign-in require?</a><p> The GitHub App has read-only access to gists and the repositories you choose. Legacy OAuth uses broader permissions. Anonymous GitHub never writes to your repositories. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Text files are anonymized; enabled images and PDFs are served unchanged. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section><section class="paper-cta paper-wrap" aria-labelledby="cta-heading"><div><h2 id="cta-heading">Ready for review?</h2><p>Create an anonymous mirror in a couple of minutes. Reviewers just open the link.</p></div><div class="paper-cta-actions"><a class="btn-hero" href="/signin" target="_self"><i class="fab fa-github" aria-hidden="true"></i> Sign in with GitHub</a><a class="paper-link-arrow" target="_self" href="https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/">See an anonymized repository \u2192</a></div></section>',2)),Me(s,{name:"partials/footer.htm",state:e.viewState},null,8,["state"])])}var EH={class:"paper-empty"},NH={class:"paper-empty-inner"},RH={key:0,class:"paper-eyebrow"},TH={key:1,class:"paper-eyebrow"},PH={key:2,class:"paper-empty-title"},DH=["textContent"];function Ip(e,t){return a(),l("div",EH,[n("div",NH,[e.error?p("v-if",!0):(a(),l("div",RH,"Working")),e.error?(a(),l("div",TH,"Error")):p("v-if",!0),e.error?p("v-if",!0):(a(),l("h1",PH,[...t[0]||(t[0]=[m(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(a(),l("h1",{key:3,class:"paper-empty-title",textContent:d(e.fmt.translate(e.error))},null,8,DH)):p("v-if",!0)])])}var AH={class:"container paper-page paper-settings"},IH={class:"paper-crumbs"},OH={class:"here"},MH={class:"paper-page-title"},VH={class:"paper-settings-body"},LH={class:"paper-settings-toc"},qH={href:"#conf-billing"},$H={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},FH={id:"conf-basics",class:"paper-settings-section"},_H={class:"form-group"},UH={class:"invalid-feedback"},BH={class:"invalid-feedback"},zH={class:"form-group"},HH={class:"invalid-feedback"},jH={class:"form-group"},GH={class:"invalid-feedback"},WH={class:"invalid-feedback"},KH={id:"conf-window",class:"paper-settings-section"},YH={class:"form-grid-2"},JH={class:"form-group"},XH={class:"invalid-feedback"},QH={class:"invalid-feedback"},ZH={class:"form-group"},xH={class:"invalid-feedback"},ej={class:"invalid-feedback"},tj={id:"conf-rendering",class:"paper-settings-section"},nj={class:"form-check"},oj={class:"form-check-input",type:"checkbox",id:"link",name:"link"},sj={class:"form-check"},ij={class:"form-check-input",type:"checkbox",id:"image",name:"image"},rj={class:"form-check"},aj={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},lj={class:"form-check"},dj={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},uj={id:"conf-features",class:"paper-settings-section"},cj={class:"form-check"},pj={class:"form-check-input",type:"checkbox",id:"update",name:"update"},fj={class:"form-check"},mj={class:"form-check-input",type:"checkbox",id:"page",name:"page"},hj={id:"conf-plan",class:"paper-settings-section"},gj={key:0,class:"paper-section-copy"},vj={class:"conference-tiers",role:"radiogroup","aria-label":"Review package size"},Line truncated
`).length))+" lines",1)):p("v-if",!0)]),P(n("button",{type:"button",class:"btn btn-sm btn-icon-only btn-ghost copy-path-btn","aria-label":e.pathCopied?"Path copied":"Copy file path",title:e.pathCopied?"Path copied":"Copy file path",onClick:t[2]||(t[2]=u=>e.copyPath())},[(a(),l("svg",uG,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,cG)]))],8,dG),[[Q,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(a(),l("span",pG,[e.redactionCount()?(a(),l(V,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[m(d(e.redactionCount()),1),t[49]||(t[49]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,fG),t[50]||(t[50]=n("span",{class:"sep"},"\xB7",-1))],64)):p("v-if",!0),m(d(e.languageName||"Text"),1),n("span",mG,[t[51]||(t[51]=n("span",{class:"sep"},"\xB7",-1)),m(d(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),t[52]||(t[52]=n("span",{class:"sep"},"\xB7",-1)),m(d(e.fmt?.number(e.content.split(`
`).length))+" lines",1)])):p("v-if",!0),e.type=="html"?(a(),l("span",hG,[e.redactionCount()?(a(),l(V,{key:0},[n("span",{class:"meta-redact",title:e.redactionCount()+" redacted terms"},[m(d(e.redactionCount()),1),t[53]||(t[53]=n("span",{class:"meta-redact-word"}," redacted",-1))],8,gG),t[54]||(t[54]=n("span",{class:"sep"},"\xB7",-1))],64)):p("v-if",!0),t[56]||(t[56]=m("Markdown",-1)),e.fileSize(e.filePath)!=null?(a(),l(V,{key:1},[t[55]||(t[55]=n("span",{class:"sep"},"\xB7",-1)),m(d(e.formatSize(e.fileSize(e.filePath))),1)],64)):p("v-if",!0)])):p("v-if",!0),e.preview&&e.previewPreserved()?(a(),l("button",{key:2,type:"button",class:"rp-preserved-tag",onClick:t[3]||(t[3]=u=>e.openPreserveFiles())},"Left unredacted")):p("v-if",!0),n("div",vG,[e.isCsv()?(a(),l("div",yG,[n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.csvView==="table"}]),"aria-checked":e.csvView==="table",onClick:t[4]||(t[4]=u=>e.csvView="table")},"Table",10,bG),n("button",{type:"button",role:"radio",class:R(["seg-chip",{active:e.csvView==="raw"}]),"aria-checked":e.csvView==="raw",onClick:t[5]||(t[5]=u=>e.csvView="raw"),title:"Show the file as text with line numbers"},"Text",10,wG)])):p("v-if",!0),e.type!="html"&&e.symbols().length>1?(a(),l("div",kG,[n("button",{type:"button",class:R(["btn btn-sm btn-ghost btn-symbols",{"is-on":e.symbolsOpen}]),"aria-expanded":e.symbolsOpen?"true":"false","aria-haspopup":"true",title:"Symbols in this file",onClick:t[6]||(t[6]=u=>e.symbolsOpen=!e.symbolsOpen)},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,CG),e.symbolsOpen?(a(),l("div",SG,[n("div",EG,d(e.symbols().length)+" "+d(e.symbols().length===1?"symbol":"symbols"),1),(a(!0),l(V,null,X(e.symbols(),u=>(a(),l("button",{type:"button",class:"symbols-item",role:"menuitem",key:u.line+u.name,onClick:f=>e.goToSymbol(u.line)},[n("span",{class:R(["symbols-kind","is-"+u.kind])},d(u.kind==="class"?"C":u.kind==="function"?"\u0192":"v"),3),n("span",RG,d(u.name),1),n("span",TG,d(u.line),1)],8,NG))),128))])):p("v-if",!0)])):p("v-if",!0),e.type=="html"?(a(),l("button",{key:2,type:"button",class:R(["btn btn-sm btn-ghost btn-icon-only btn-find btn-md-find",{"is-on":e.mdFindOpen}]),"aria-label":"Find on this page",title:"Find on this page ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[7]||(t[7]=u=>e.toggleMdFind())},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,PG)):p("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?(a(),l("div",DG,[e.type!="html"?(a(),l("button",{key:0,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-goto","aria-label":"Go to line",title:"Go to line ("+(e.isMac?"\u2318":"Ctrl+")+"G)",onClick:t[8]||(t[8]=u=>e.gotoLine())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,AG)):p("v-if",!0),e.type!="html"?(a(),l("button",{key:1,type:"button",class:R(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap lines",title:"Wrap lines (Alt+Z)",onClick:t[9]||(t[9]=u=>e.toggleWrap())},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,IG)):p("v-if",!0),e.type!="html"?(a(),l("button",{key:2,type:"button",class:"btn btn-sm btn-ghost btn-icon-only btn-find","aria-label":"Find in file",title:"Find in file ("+(e.isMac?"\u2318":"Ctrl+")+"F)",onClick:t[10]||(t[10]=u=>e.findInFile())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,OG)):p("v-if",!0)])):p("v-if",!0),!e.preview||e.url?(a(),l("div",MG,[n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,VG),typeof e.content=="string"?(a(),l("button",{key:0,type:"button",class:"tb-seg-btn tb-seg-icon","aria-label":e.contentCopied?"Copied":"Copy file contents",title:e.contentCopied?"Copied":"Copy file contents",onClick:t[11]||(t[11]=u=>e.copyContent())},[(a(),l("svg",qG,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,$G)]))],8,LG)):p("v-if",!0),n("a",{target:e.preview?"_blank":"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[62]||(t[62]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,FG)])):p("v-if",!0),typeof e.content=="string"?(a(),l("button",{key:5,type:"button",class:"btn btn-sm btn-icon-only btn-ghost tb-copy-m","aria-label":e.contentCopied?"Copied":"Copy file contents",onClick:t[12]||(t[12]=u=>e.copyContent())},[(a(),l("svg",UG,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,BG)]))],8,_G)):p("v-if",!0),e.type=="html"&&e.r Line truncated
`).length))+" lines",1)],64)):p("v-if",!0)])):p("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(a(),l("div",XG)):p("v-if",!0),e.type=="html"?(a(),l("button",{key:3,type:"button",role:"menuitem",onClick:t[17]||(t[17]=u=>e.toggleMdFind())},[...t[67]||(t[67]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),m("Find in file",-1)])])):p("v-if",!0),e.type=="html"?(a(),l("div",QG)):p("v-if",!0),e.type!="html"?(a(),l("button",{key:5,type:"button",role:"menuitem",onClick:t[18]||(t[18]=u=>e.findInFile())},[...t[68]||(t[68]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),m("Find in file",-1)])])):p("v-if",!0),e.type!="html"?(a(),l("button",{key:6,type:"button",role:"menuitem",onClick:t[19]||(t[19]=u=>e.gotoLine())},[...t[69]||(t[69]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),m("Go to line",-1)])])):p("v-if",!0),e.type!="html"?(a(),l("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[20]||(t[20]=u=>e.toggleWrap())},[t[70]||(t[70]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[71]||(t[71]=m("Wrap lines",-1)),e.wrapLines?(a(),l("span",xG,"\u2713")):p("v-if",!0)],8,ZG)):p("v-if",!0),e.isCsv()?(a(),l("button",{key:8,type:"button",role:"menuitem",class:"tb-csv-view",onClick:t[21]||(t[21]=u=>{e.csvView=e.csvView==="table"?"raw":"table",e.moreOpen=!1})},[(a(),l("svg",eW,[n("use",{href:e.csvView==="table"?"#ui-icon-code":"#ui-icon-list"},null,8,tW)])),m(d(e.csvView==="table"?"Show as text":"Show as table"),1)])):p("v-if",!0),e.type!="html"?(a(),l("div",nW)):p("v-if",!0),e.type=="html"&&(!e.preview||e.url)?(a(),l("a",{key:10,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[72]||(t[72]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),m("View raw",-1)])],8,oW)):p("v-if",!0),e.type!="html"&&(!e.preview||e.url)?(a(),l("a",{key:11,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.url)},[...t[73]||(t[73]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),m("View raw",-1)])],8,sW)):p("v-if",!0),!e.preview||e.url?(a(),l("a",{key:12,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl(e.downloadUrl()),download:e.preview?e.paths[e.paths.length-1]:null},[...t[74]||(t[74]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),m("Download file",-1)])],8,iW)):p("v-if",!0),e.options?.hasWebsite?(a(),l("a",{key:13,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[75]||(t[75]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),m("Open website",-1)])],8,rW)):p("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(a(),l("a",{key:14,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[76]||(t[76]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),m("Edit anonymization",-1)])],8,aW)):p("v-if",!0),e.options?.download?(a(),l("a",{key:15,role:"menuitem",target:e.preview?"_blank":"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[77]||(t[77]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),m("Download ZIP",-1)])],8,lW)):p("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[22]||(t[22]=u=>e.copyPath())},[...t[78]||(t[78]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),m("Copy file path",-1)])]),t[79]||(t[79]=n("div",{class:"tb-menu-sep"},null,-1)),t[80]||(t[80]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),m("FAQ")],-1)),t[81]||(t[81]=n("a",{role:"menuitem",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-bug"})]),m("Report a bug")],-1))])):p("v-if",!0)])]),e.gotoOpen&&e.type!="html"?(a(),l("form",{key:3,class:"goto-pop",role:"dialog","aria-label":"Go to line",onSubmit:t[26]||(t[26]=de(u=>e.submitGoto(),["prevent"]))},[t[82]||(t[82]=n("label",{class:"goto-label",for:"goto-input"},"Go to line",-1)),P(n("input",{id:"goto-input",class:"goto-input",type:"text",inputmode:"numeric",autocomplete:"off",spellcheck:"false",placeholder:"1\u2013"+e.fmt?.number(typeof e.content=="string"?e.content.split(`
`).length:1),"aria-invalid":e.gotoError?"true":"false","onUpdate:modelValue":t[24]||(t[24]=u=>e.gotoValue=u),onKeydown:t[25]||(t[25]=$t(de(u=>e.closeGoto(),["prevent","stop"]),["esc"]))},null,40,dW),[[nt,e.gotoValue]]),n("span",{class:R(["goto-hint",{"is-error":e.gotoError}])},d(e.gotoError||"Line, or line:column"),3)],32)):p("v-if",!0)]),e.isCsv()&&e.csvView==="table"?(a(),l("div",{key:0,class:"csv-table-wrap",tabindex:"0",role:"region","aria-label":"Table view of "+(e.paths?.[e.paths.length-1]||"file")},[n("table",cW,[n("thead",null,[n("tr",null,[t[83]||(t[83]=n("th",{class:"csv-rownum",scope:"col"},[n("span",{class:"sr-only"},"Row")],-1)),(a(!0),l(V,null,X(e.csvRows()[0]||[],(u,f)=>(a(),l("th",{scope:"col",key:f,class:R({"is-num":e.csvNumCol(f)})},[(a(!0),l(V,null,X(e.redactParts(u),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,d(c.n),1)],8,pW)):(a(),l(V,{key:1},[m(d(c.t),1)],64))],64))),128))],2))),128))])]),n("tbody",null,[(a(!0),l(V,null,X(e.csvRows().slice(1),(u,f)=>(a(),l("tr",{key:f},[n("td",fW,d(f+1),1),(a(!0),l(V,null,X(u,(c,v)=>(a(),l("td",{key:v,class:R({"is-num":e.csvNumCol(v)})},[(a(!0),l(V,null,X(e.redactParts(c),(h,y)=>(a(),l(V,{key:y},[h.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+h.n},[n("i",null,d(h.n),1)],8,mW)):(a(),l(V,{key:1},[m(d(h.t),1)],64))],64))),128))],2))),128))]))),128))])])],8,uW)):p("v-if",!0),e.type!="html"&&!(e.isCsv()&&e.csvView==="table")?P((a(),l("div",hW,null,512)),[[r,{content:e.content,options:e.aceOption}]]):p("v-if",!0),e.type=="html"&&e.mdFindOpen?(a(),l("div",gW,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[27]||(t[27]=u=>{e.mdFindQuery=u.target.value,e.runMdFind()}),onKeydown:[t[28]||(t[28]=$t(de(u=>u.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[29]||(t[29]=$t(de(u=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,vW),n("span",yW,[n("button",{type:"button","aria-label":"Previous match",onClick:t[30]||(t[30]=u=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[84]||(t[84]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,bW),n("button",{type:"button","aria-label":"Next match",onClick:t[31]||(t[31]=u=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[85]||(t[85]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,wW)]),n("span",kW,d(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:R(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[32]||(t[32]=u=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,CW),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[33]||(t[33]=u=>e.toggleMdFind(!1))},"\xD7")])):p("v-if",!0),e.type=="html"?(a(),l("div",SW,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,EW),e.readmeToc().length>=3?(a(),l("aside",NW,[t[86]||(t[86]=n("div",{class:"readme-toc-head"},"On this page",-1)),n("nav",RW,[n("a",{href:"#",class:R(["lvl-2 toc-top",{"is-active":!e.activeHeading}]),onClick:t[34]||(t[34]=de(u=>e.scrollToHeading(null),["prevent"]))},"Introduction",2),(a(!0),l(V,null,X(e.readmeToc(),(u,f)=>(a(),l("a",{key:u.id,href:"#"+u.id,class:R(["lvl-"+u.level,{"is-active":e.activeHeading===u.id}]),onClick:de(c=>e.scrollToHeading(u.id),["prevent"])},d(u.text),11,TW))),128))])])):p("v-if",!0)])):p("v-if",!0)],2)):p("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(a(),Xt(s,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):p("v-if",!0),e.fileFrame()?(a(),l("section",{key:3,class:R(["file-card file-card-media","view-"+e.type])},[n("header",PW,[n("div",DW,[n("button",{type:"button",class:R(["btn btn-sm btn-icon-only btn-ghost card-files-btn",{"is-needed":e.sidebarHidden}]),title:"Show file tree",onClick:t[35]||(t[35]=u=>e.sidebarHidden?e.sidebarHidden=!1:e.sidebarCollapsed=!1)},[...t[87]||(t[87]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sidebar"})],-1),n("span",{class:"card-files-label"},"Files",-1)])],2),n("ol",AW,[n("li",IW,[n("a",{href:e.safeUrl("/r/"+e.repoId+"/"),title:e.repoId,textContent:d(/^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e.repoId||"")?"repository":e.repoId)},null,8,OW)]),(a(!0),l(V,null,X(e.paths,(u,f)=>(a(),l("li",{class:"breadcrumb-item","aria-current":f===e.paths.length-1?"page":null},[(a(!0),l(V,null,X(e.redactParts(u),(c,v)=>(a(),l(V,{key:v},[c.n?(a(),l("span",{key:0,class:"redact-slot",role:"img","aria-label":"Redacted term "+c.n},[n("i",null,d(c.n),1)],8,VW)):(a(),l(V,{key:1},[m(d(c.t),1)],64))],64))),128))],8,MW))),256))]),n("span",LW,[e.type=="IPython Line truncated
`).length+1)),placeholder:`Jane Smith
MIT CSAIL
jane.smith@example.org`},null,8,jY),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",GY,[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,d(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))])]),P(n("div",WY,"Terms are in an invalid format.",512),[[Q,e.defaultsForm?.terms?.errors?.format]])])]),n("section",KY,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",YY,[n("label",JY,[P(n("input",XY,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",QY,[P(n("input",ZY,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=m("Display images",-1))]),n("label",xY,[P(n("input",eJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=m("Display PDFs",-1))]),n("label",tJ,[P(n("input",nJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=m("Display notebooks",-1))]),n("label",oJ,[P(n("input",sJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=m("Show line counts",-1))]),n("label",iJ,[P(n("input",rJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=m("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",aJ,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",lJ,[P(n("input",dJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=m("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",uJ,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[P((a(),l("select",cJ,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",pJ,d(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",fJ,[n("div",mJ,[e.draftRestored?(a(),l("span",hJ,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",gJ,"Unsaved changes"+d(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",vJ,d(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(a(),l("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=r=>e.discardDraft())},"Discard changes")):p("v-if",!0),n("button",{id:"save",type:"submit",class:R(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},d(e.saving?"Saving\u2026":"Save defaults"),11,yJ),e.error?(a(),l("div",bJ,d(e.error),1)):p("v-if",!0)])],32)),[[o,e.viewState]])],512),[[Q,e.settingsTab==="defaults"]]),P(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(a(),l("p",kJ,"Loading billing\u2026")):p("v-if",!0),e.billingError?(a(),l("div",CJ,[m(d(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,SJ)])):p("v-if",!0),e.billingNotice?(a(),l("p",EJ,d(e.billingNotice),1)):p("v-if",!0),e.billingPending?(a(),l("div",NJ,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,RJ)])):p("v-if",!0),n("section",TJ,[n("div",PJ,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",DJ,d(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",AJ,[m(d(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access u Line truncated
jane.smith@example.org`},null,8,GY),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",WY,[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,d(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))])]),P(n("div",KY,"Terms are in an invalid format.",512),[[Q,e.defaultsForm?.terms?.errors?.format]])])]),n("section",YY,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",JY,[n("label",XY,[P(n("input",QY,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",ZY,[P(n("input",xY,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=m("Display images",-1))]),n("label",eJ,[P(n("input",tJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.pdf=r},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[29]||(t[29]=m("Display PDFs",-1))]),n("label",nJ,[P(n("input",oJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[30]||(t[30]=m("Display notebooks",-1))]),n("label",sJ,[P(n("input",iJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.loc=r},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[31]||(t[31]=m("Show line counts",-1))]),n("label",rJ,[P(n("input",aJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.page=r},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[32]||(t[32]=m("GitHub Pages",-1))])]),t[33]||(t[33]=n("p",{class:"settings-help"},"Images and PDFs are not anonymized.",-1)),t[34]||(t[34]=n("p",{class:"settings-help"},"GitHub Pages must use the anonymized branch.",-1))])]),n("section",lJ,[t[38]||(t[38]=n("h2",null,"Source updates",-1)),n("div",null,[n("label",dJ,[P(n("input",uJ,null,512),[[i,{state:e.viewState,set:r=>{e.options.update=r},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[36]||(t[36]=m("Auto-update from GitHub",-1))]),t[37]||(t[37]=n("p",{class:"settings-help"},"Latest commit, at most once an hour.",-1))])]),n("section",cJ,[t[40]||(t[40]=n("label",{class:"settings-label",for:"expiration"},"On expiration",-1)),n("div",null,[P((a(),l("select",pJ,[...t[39]||(t[39]=[n("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),n("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[i,{state:e.viewState,set:r=>{e.options.expirationMode=r},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),n("p",fJ,d(e.options.expirationMode==="redirect"?"Redirecting reveals the original repository. Choose the date per anonymization.":"Set the expiration date for each repository."),1)])]),n("footer",mJ,[n("div",hJ,[e.draftRestored?(a(),l("span",gJ,"Your unsaved draft was restored.")):e.unsavedChanges?(a(),l("span",vJ,"Unsaved changes"+d(e.draftSaved?" \xB7 Draft saved in this tab":""),1)):(a(),l("span",yJ,d(e.message?"Defaults saved":"No unsaved changes"),1))]),e.draftRestored||e.unsavedChanges?(a(),l("button",{key:0,type:"button",class:"draft-discard",onClick:t[0]||(t[0]=r=>e.discardDraft())},"Discard changes")):p("v-if",!0),n("button",{id:"save",type:"submit",class:R(["btn btn-ink",{"is-saving":e.saving}]),disabled:e.saving||!(e.unsavedChanges||e.draftRestored)},d(e.saving?"Saving\u2026":"Save defaults"),11,bJ),e.error?(a(),l("div",wJ,d(e.error),1)):p("v-if",!0)])],32)),[[o,e.viewState]])],512),[[Q,e.settingsTab==="defaults"]]),P(n("section",{id:"settings-billing","aria-busy":e.billingLoading||e.billingBusy},[t[95]||(t[95]=n("p",{class:"settings-scope"},"Your plan and usage. Reviewer access is always free.",-1)),e.billingLoading?(a(),l("p",CJ,"Loading billing\u2026")):p("v-if",!0),e.billingError?(a(),l("div",SJ,[m(d(e.billingError)+" ",1),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[3]||(t[3]=r=>e.loadBilling()),disabled:e.billingBusy},"Try again",8,EJ)])):p("v-if",!0),e.billingNotice?(a(),l("p",NJ,d(e.billingNotice),1)):p("v-if",!0),e.billingPending?(a(),l("div",RJ,[t[42]||(t[42]=n("strong",null,"Confirming your payment",-1)),t[43]||(t[43]=n("p",null,"Your allowance will update after confirmation. Please do not pay again.",-1)),n("button",{type:"button",class:"btn btn-outline-ink",onClick:t[4]||(t[4]=r=>e.refreshBilling()),disabled:e.billingBusy},"Check payment status",8,TJ)])):p("v-if",!0),n("section",PJ,[n("div",DJ,[n("div",null,[t[44]||(t[44]=n("p",{class:"billing-eyebrow"},"Current plan",-1)),n("h2",AJ,d(e.profileAuthorGrant()?e.profileGrantName(e.profileAuthorGrant()):e.billing?.enabled?"Free":"Account allowance"),1),e.profileAuthorGrant()?(a(),l("p",IJ,[m(d(e.profileAuthorGrant().cancelAtPeriodEnd?"Renewal cancelled \xB7 access u Line truncated
`);t.innerHTML=s.map(i=>{let o=i.replace(/^(<[^>]+>)+/,"").charAt(0),r=i.startsWith("@@")?"hunk":o==="+"?"add":o==="-"?"remove":"";return`<span class="md-diff-line${r?" is-"+r:""}">${i||" "}</span>`}).join(`
`)}),Kp=(e,t=0)=>{let s=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+s+4,24)},Xp=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let s=t.querySelectorAll(".md-diff-line");if(s.length){s.forEach(o=>{o.classList.contains("is-hunk")||o.style.setProperty("--hang",Kp(o.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(`
`).map(o=>{let r=i.join("");o.replace(/<\/?span\b[^>]*>/g,f=>(f.startsWith("</")?i.pop():i.push(f),f));let u=o.replace(/<[^>]+>/g,"");return`<span class="code-line" style="--hang:${Kp(u)}ch">${r}${o||" "}${"</span>".repeat(i.length)}</span>`}).join(`
`)})},Qp={props:["content","terms","options"],setup(e){let t=Ct(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Jp(t.value),Xp(t.value)};return yn(()=>{s(),dt(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>De("markdown",{ref:t})}},vte={props:["file","terms","options"],setup(e){let t=Ct(null),s=()=>ze(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Jp(t.value),Xp(t.value)});return yn(s),dt(()=>[e.file?.content,e.terms,e.options],s,{deep:!0}),()=>{let i=e.file||{},o=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(o)||i.language==="Markdown")return De("gist-file",{ref:t},De(Qp,{content:i.content,terms:e.terms,options:e.options}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},u=(i.language||o||"none").toLowerCase();return De("gist-file",{ref:t},De("pre",{class:"line-numbers"},De("code",{class:"language-"+(r[u]||u),key:i.content},i.content||"")))}}},yte=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let s=document.createElement("div");s.className="nb-code-scroll",t.replaceWith(s),s.appendChild(t);let i=()=>{let o=t.scrollWidth-t.clientWidth>1;if(s.classList.toggle("is-overflowing",o),s.classList.toggle("is-at-end",o&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!o)return;let r=t.clientWidth-16,u=Math.max(24,r*t.clientWidth/t.scrollWidth);s.style.setProperty("--thumb-w",u+"px"),s.style.setProperty("--thumb-x",(r-u)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),bte={props:["file","content"],setup(e){let t=Ct(null),s=0,i,o=async()=>{let r=++s;i?.abort(),i=new AbortController;try{let u=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(f=>{if(!f.ok)throw Error("Notebook request failed");return f.json()});if(await Zn("notebook"),r!==s)return;t.value.innerHTML=Bs(DOMPurify.sanitize(nb.parse(u).render())),t.value.querySelectorAll("pre code").forEach(f=>window.Prism?.highlightElement(f)),yte(t.value)}catch(u){r===s&&u.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return yn(()=>{o(),dt(()=>[e.file,e.content],o)}),ao(()=>{s++,i?.abort()}),()=>De("notebook",{ref:t})}},wte={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),s=t.reduce((i,[,o])=>i+o.code,0);return De("loc",t.map(([i,o])=>De("div",{class:"lang",title:`${i}: ${o.code.toLocaleString()} lines`,style:{width:o.code*100/s+"%",background:langColors[i]}})))}}},Zp={Markdown:Qp,GistFile:vte,Notebook:bte,Loc:wte,HtmlDoc:jp,QuotaUsage:hte,Pdfviewer:yd(async()=>(await Zn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Gp))},xp={async mounted(e,{value:t}){e._editorValue=t;try{if(await ui(),e._editorDisposed)return;let s=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(s.content??""),-1),Yp(e,s.options),e._editorCleanup=s.options?.onLoad?.(i)}catch(s){e._editorDisposed||(e.textContent=s.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Yp(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Yp(e,t={}){let s=gte.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+s),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var ef={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],s=new Set,i=new IntersectionObserver(o=>{o.forEach(u=>u.isIntersecting?s.add(u.target.id):s.delete(u.target.id));let r=t.find(u=>s.has(u.hash.slice(1)));r&&t.forEach(u=>u.classList.toggle("active",u===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});ze(()=>{t.forEach(o=>{let r=document.getElementById(o.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(o=>o.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};function tf(e){let t=[],s=0,i=/\bXXXX-(\d+)\b/g,o;for(;o=i.exec(e);)o.index>s&&t.push(e.slice(s,o.index)),t.push(De("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+o[1]},[De("i",null,o[1])])),s=o.index+o[0].length;return t.length?(s<e.length&&t.push(e.slice(s)),t):e}function kte(e){let t=tf(e),s=[];for(let i of Array.isArray(t)?t:[t]){if(typeof i!="string"){s.push(i);continue}let o=i.split(/(?<=[._-])/);o.forEach((r,u)=>{s.push(r),u<o.length-1&&s.push(De("wbr"))})}return s}function Cte(e){if(e<1024)return`${e} B`;let t=["KB","MB","GB"],s=e/1024,i=0;for(;s>=1024&&i<t.length-1;)s/=1024,i++;return`${s.toFixed(1)} ${t[i]}`}function Ste(e){let t={children:[]},s=new Map([["",t]]);function i(o){if(s.has(o))return s.get(o);let r=o Line truncated
`)}),Yp=(e,t=0)=>{let s=(String(e).slice(t).match(/^[ \t]*/)[0]||"").replace(/\t/g," ").length;return Math.min(t+s+4,24)},Qp=e=>{e?.closest?.(".reviewer-preview")&&e.querySelectorAll("pre code").forEach(t=>{let s=t.querySelectorAll(".md-diff-line");if(s.length){s.forEach(o=>{o.classList.contains("is-hunk")||o.style.setProperty("--hang",Yp(o.textContent,1)+"ch")});return}if(t.querySelector(".code-line"))return;let i=[];t.innerHTML=t.innerHTML.replace(/\n$/,"").split(`
`).map(o=>{let r=i.join("");o.replace(/<\/?span\b[^>]*>/g,f=>(f.startsWith("</")?i.pop():i.push(f),f));let u=o.replace(/<[^>]+>/g,"");return`<span class="code-line" style="--hang:${Yp(u)}ch">${r}${o||" "}${"</span>".repeat(i.length)}</span>`}).join(`
`)})},Zp={props:["content","terms","options"],setup(e){let t=Ct(null),s=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../"),Xp(t.value),Qp(t.value)};return yn(()=>{s(),dt(()=>[e.content,e.terms,e.options],s,{deep:!0})}),()=>De("markdown",{ref:t})}},yte={props:["file","terms","options"],setup(e){let t=Ct(null),s=()=>ze(()=>{t.value?.querySelectorAll("pre code").forEach(i=>window.Prism?.highlightElement(i)),Xp(t.value),Qp(t.value)});return yn(s),dt(()=>[e.file?.content,e.terms,e.options],s,{deep:!0}),()=>{let i=e.file||{},o=(i.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(o)||i.language==="Markdown")return De("gist-file",{ref:t},De(Zp,{content:i.content,terms:e.terms,options:e.options}));let r={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},u=(i.language||o||"none").toLowerCase();return De("gist-file",{ref:t},De("pre",{class:"line-numbers"},De("code",{class:"language-"+(r[u]||u),key:i.content},i.content||"")))}}},bte=e=>e?.querySelectorAll(".nb-input pre").forEach(t=>{if(t.parentElement?.classList.contains("nb-code-scroll"))return;let s=document.createElement("div");s.className="nb-code-scroll",t.replaceWith(s),s.appendChild(t);let i=()=>{let o=t.scrollWidth-t.clientWidth>1;if(s.classList.toggle("is-overflowing",o),s.classList.toggle("is-at-end",o&&t.scrollLeft+t.clientWidth>=t.scrollWidth-2),!o)return;let r=t.clientWidth-16,u=Math.max(24,r*t.clientWidth/t.scrollWidth);s.style.setProperty("--thumb-w",u+"px"),s.style.setProperty("--thumb-x",(r-u)*t.scrollLeft/(t.scrollWidth-t.clientWidth)+"px")};t.addEventListener("scroll",i,{passive:!0}),window.ResizeObserver?new ResizeObserver(i).observe(t):i(),i()}),wte={props:["file","content"],setup(e){let t=Ct(null),s=0,i,o=async()=>{let r=++s;i?.abort(),i=new AbortController;try{let u=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:i.signal}).then(f=>{if(!f.ok)throw Error("Notebook request failed");return f.json()});if(await Zn("notebook"),r!==s)return;t.value.innerHTML=Bs(DOMPurify.sanitize(nb.parse(u).render())),t.value.querySelectorAll("pre code").forEach(f=>window.Prism?.highlightElement(f)),bte(t.value)}catch(u){r===s&&u.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return yn(()=>{o(),dt(()=>[e.file,e.content],o)}),ao(()=>{s++,i?.abort()}),()=>De("notebook",{ref:t})}},kte={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,i])=>i.code),s=t.reduce((i,[,o])=>i+o.code,0);return De("loc",t.map(([i,o])=>De("div",{class:"lang",title:`${i}: ${o.code.toLocaleString()} lines`,style:{width:o.code*100/s+"%",background:langColors[i]}})))}}},xp={Markdown:Zp,GistFile:yte,Notebook:wte,Loc:kte,HtmlDoc:Gp,QuotaUsage:gte,Pdfviewer:bd(async()=>(await Zn("pdf"),pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js",Wp))},ef={async mounted(e,{value:t}){e._editorValue=t;try{if(await ui(),e._editorDisposed)return;let s=e._editorValue,i=ace.edit(e);e._editor=i,i.setValue(String(s.content??""),-1),Jp(e,s.options),e._editorCleanup=s.options?.onLoad?.(i)}catch(s){e._editorDisposed||(e.textContent=s.message)}},updated(e,{value:t}){e._editorValue=t,e._editor&&(e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),Jp(e,t.options))},beforeUnmount(e){e._editorDisposed=!0,e._editorCleanup?.(),e._editor?.destroy()}};function Jp(e,t={}){let s=vte.has(t.mode)?t.mode:"text";e._editor.session.setMode("ace/mode/"+s),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var tf={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],s=new Set,i=new IntersectionObserver(o=>{o.forEach(u=>u.isIntersecting?s.add(u.target.id):s.delete(u.target.id));let r=t.find(u=>s.has(u.hash.slice(1)));r&&t.forEach(u=>u.classList.toggle("active",u===r))},{rootMargin:"-20% 0px -60% 0px",threshold:0});ze(()=>{t.forEach(o=>{let r=document.getElementById(o.hash.slice(1));r&&i.observe(r)}),t[0]&&!t.some(o=>o.classList.contains("active"))&&t[0].classList.add("active")}),e._observer=i},beforeUnmount(e){e._observer?.disconnect()}};function nf(e){let t=[],s=0,i=/\bXXXX-(\d+)\b/g,o;for(;o=i.exec(e);)o.index>s&&t.push(e.slice(s,o.index)),t.push(De("span",{class:"redact-slot",role:"img","aria-label":"Redacted term "+o[1]},[De("i",null,o[1])])),s=o.index+o[0].length;return t.length?(s<e.length&&t.push(e.slice(s)),t):e}function Cte(e){let t=nf(e),s=[];for(let i of Array.isArray(t)?t:[t]){if(typeof i!="string"){s.push(i);continue}let o=i.split(/(?<=[._-])/);o.forEach((r,u)=>{s.push(r),u<o.length-1&&s.push(De("wbr"))})}return s}function Ste(e){if(e<1024)return`${e} B`;let t=["KB","MB","GB"],s=e/1024,i=0;for(;s>=1024&&i<t.length-1;)s/=1024,i++;return`${s.toFixed(1)} ${t[i]}`}function Ete(e){let t={children:[]},s=new Map([["",t]]);function i(o){if(s.has(o))return s.get(o);let r=o Line truncated
/*! Bundled license information:
@vue/shared/dist/shared.esm-bundler.js:
+24 -2
View File
@@ -1,6 +1,18 @@
// Generate finite diagnostic allowlists from repository code, never runtime input.
const fs = require('fs'), path = require('path'), ts = require('typescript');
const files = {};
// Error codes the code base throws or relays, so the logger and the collector
// keep them as errorCode instead of dropping them as arbitrary strings.
const codePattern = /^[A-Za-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)+$/;
const errorFactories = new Set(['AnonymousError','billingError','appError']);
const thrownCodes = new Set();
function codeLiterals(node) {
if (!node) return;
if (ts.isStringLiteralLike(node)) { if (codePattern.test(node.text)) thrownCodes.add(node.text); }
else if (ts.isConditionalExpression(node)) { codeLiterals(node.whenTrue); codeLiterals(node.whenFalse); }
else if (ts.isBinaryExpression(node) && [ts.SyntaxKind.BarBarToken, ts.SyntaxKind.QuestionQuestionToken].includes(node.operatorToken.kind)) { codeLiterals(node.left); codeLiterals(node.right); }
else if (ts.isParenthesizedExpression(node)) codeLiterals(node.expression);
}
function scan(dir) {
for (const entry of fs.readdirSync(dir, {withFileTypes:true})) {
const file = path.join(dir,entry.name);
@@ -11,6 +23,11 @@ function scan(dir) {
function visit(node) {
if ((ts.isFunctionDeclaration(node)||ts.isMethodDeclaration(node)||ts.isFunctionExpression(node)) && node.name && ts.isIdentifier(node.name)) names.add(node.name.text);
if(ts.isVariableDeclaration(node)&&ts.isIdentifier(node.name)&&node.initializer&&(ts.isArrowFunction(node.initializer)||ts.isFunctionExpression(node.initializer))) names.add(node.name.text);
// new AnonymousError("code"), billingError("code"), appError("code")
if((ts.isNewExpression(node)||ts.isCallExpression(node))&&ts.isIdentifier(node.expression)&&errorFactories.has(node.expression.text)&&node.arguments?.length) codeLiterals(node.arguments[0]);
// Codes picked into a variable first: errCode = "streamer_unreachable"
if(ts.isVariableDeclaration(node)&&ts.isIdentifier(node.name)&&/^(errCode|code)$/.test(node.name.text)) codeLiterals(node.initializer);
if(ts.isBinaryExpression(node)&&node.operatorToken.kind===ts.SyntaxKind.EqualsToken&&ts.isIdentifier(node.left)&&/^(errCode|code)$/.test(node.left.text)) codeLiterals(node.right);
ts.forEachChild(node,visit);
}
visit(source);
@@ -23,7 +40,12 @@ scan('src');
const types=['Error','TypeError','RangeError','ReferenceError','SyntaxError','URIError','EvalError','AggregateError','AnonymousError','HTTPError','RequestError','MongoServerError','MongoNetworkError','MongoServerSelectionError','ValidationError','TimeoutError','AbortError','UnknownError'];
const vrl=fs.readFileSync('deploy/logging/sanitize.vrl','utf8');
const routes=JSON.parse(vrl.match(/if includes\((\[.*?\]), record.route\)/)[1]);
fs.writeFileSync('src/core/log-diagnostic-schema.ts','// Generated by scripts/generate-log-diagnostics.js; do not edit.\nexport const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = '+JSON.stringify(files,null,2)+';\nexport const LOG_ERROR_TYPES = '+JSON.stringify(types)+';\nexport const LOG_ROUTES = '+JSON.stringify(routes)+';\n');
const codes=[...thrownCodes].sort();
fs.writeFileSync('src/core/log-diagnostic-schema.ts','// Generated by scripts/generate-log-diagnostics.js; do not edit.\nexport const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = '+JSON.stringify(files,null,2)+';\nexport const LOG_ERROR_TYPES = '+JSON.stringify(types)+';\nexport const LOG_ROUTES = '+JSON.stringify(routes)+';\nexport const LOG_THROWN_ERROR_CODES = '+JSON.stringify(codes)+';\n');
// The collector keeps reviewed codes too (system errnos, worker codes); only add.
const codeList=/(if includes\()(\[.*?\])(, record\.errorCode\))/;
const collectorCodes=JSON.parse(vrl.match(codeList)[2]);
const mergedCodes=[...collectorCodes,...codes.filter(code=>!collectorCodes.includes(code))];
const block=`# BEGIN GENERATED DIAGNOSTICS
source_functions = ${JSON.stringify(files)}
for_each(["errorType", "causeType"]) -> |_index, key| {
@@ -43,5 +65,5 @@ for_each(["errorStack", "causeStack"]) -> |_index, key| {
}
}
# END GENERATED DIAGNOSTICS`;
const clean=vrl.replace(/# BEGIN GENERATED DIAGNOSTICS[\s\S]*?# END GENERATED DIAGNOSTICS\n?/,'');
const clean=vrl.replace(/# BEGIN GENERATED DIAGNOSTICS[\s\S]*?# END GENERATED DIAGNOSTICS\n?/,'').replace(codeList,(_,start,_list,end)=>start+JSON.stringify(mergedCodes).replace(/","/g,'", "')+end);
fs.writeFileSync('deploy/logging/sanitize.vrl',clean.replace('out._msg = out.event',()=>block+'\nout._msg = out.event'));
+5 -1
View File
@@ -548,8 +548,12 @@ export default class AnonymizedFile {
);
void notifyOwnerAccessProblem(this.repository.owner.id, error, { kind: "repository", id: String(this.repository.model._id) });
error.value = this;
// Only a response that was already streaming body bytes must be
// cut. handleError's own reply can be mid-write: express-session
// holds back its last byte until the session store touch ends.
const streaming = res.headersSent;
handleError(error, res);
if (res.headersSent && !res.writableEnded) res.destroy();
if (streaming && !res.writableEnded) res.destroy();
});
resolve();
return;
+14 -6
View File
@@ -1,4 +1,5 @@
import { recordResponseFailure } from "./request-evidence";
import { watchClientClose } from "./response-cancellation";
import { createGzip } from "zlib";
import { createHash } from "crypto";
import { Readable, PassThrough } from "stream";
@@ -53,12 +54,19 @@ async function sendCached(content: Readable, res: Response,
// Install evidence before pipeline's listeners destroy the response.
const localFailure = () => { if (!res.destroyed) recordResponseFailure(res, "unknown", "local_abort"); };
stream.once("error", localFailure);
if (record.encoding === "identity" && !res.req.acceptsEncodings("identity")) {
res.setHeader("Content-Encoding", "gzip"); res.removeHeader("Content-Length");
const gzip = createGzip();
gzip.once("error", localFailure);
await pipeline(stream, gzip, res);
} else await pipeline(stream, res);
const clientClosed = watchClientClose(res, stream);
try {
if (record.encoding === "identity" && !res.req.acceptsEncodings("identity")) {
res.setHeader("Content-Encoding", "gzip"); res.removeHeader("Content-Length");
const gzip = createGzip();
gzip.once("error", localFailure);
await pipeline(stream, gzip, res);
} else await pipeline(stream, res);
} catch (error) {
// A visitor who stops a download is not a server fault.
if (clientClosed()) throw Object.assign(new Error("response_cancelled"), { cause: error });
throw error;
}
return true;
};
const decision = results.decision(key);
+13
View File
@@ -142,6 +142,7 @@ export const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = {
"getToken",
"getTokenGateResetAt",
"octokit",
"ownerGitHubAccessRequired",
"rateLimitDetail",
"resolveRepositoryToken",
"run",
@@ -160,6 +161,7 @@ export const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = {
"getToken",
"getTokenGateResetAt",
"octokit",
"ownerGitHubAccessRequired",
"rateLimitDetail",
"resolveRepositoryToken",
"run",
@@ -1643,6 +1645,7 @@ export const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = {
"admitResolvedBytes",
"assertActive",
"assertDownloadUrl",
"assertHost",
"cached",
"confirmOwnerAccess",
"deferredRawDownload",
@@ -1651,6 +1654,7 @@ export const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = {
"downloadFile",
"downloadFileViaRaw",
"downloadRaw",
"downloadViaJsDelivr",
"downloadWithFallback",
"fallbackToRaw",
"fetchContent",
@@ -1663,9 +1667,12 @@ export const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = {
"githubRawFileUrl",
"iterateFiles",
"iterateTreeBatches",
"jsDelivrFileUrl",
"lfsPointerGuard",
"normalize",
"pMap",
"produce",
"rejectLfsPointer",
"resolve",
"resolveLfsPointer",
"stopSourceOnDestroy",
@@ -1679,6 +1686,7 @@ export const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = {
"admitResolvedBytes",
"assertActive",
"assertDownloadUrl",
"assertHost",
"cached",
"confirmOwnerAccess",
"deferredRawDownload",
@@ -1687,6 +1695,7 @@ export const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = {
"downloadFile",
"downloadFileViaRaw",
"downloadRaw",
"downloadViaJsDelivr",
"downloadWithFallback",
"fallbackToRaw",
"fetchContent",
@@ -1699,9 +1708,12 @@ export const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = {
"githubRawFileUrl",
"iterateFiles",
"iterateTreeBatches",
"jsDelivrFileUrl",
"lfsPointerGuard",
"normalize",
"pMap",
"produce",
"rejectLfsPointer",
"resolve",
"resolveLfsPointer",
"stopSourceOnDestroy",
@@ -2927,3 +2939,4 @@ export const LOG_SOURCE_FUNCTIONS: Record<string, readonly string[]> = {
};
export const LOG_ERROR_TYPES = ["Error","TypeError","RangeError","ReferenceError","SyntaxError","URIError","EvalError","AggregateError","AnonymousError","HTTPError","RequestError","MongoServerError","MongoNetworkError","MongoServerSelectionError","ValidationError","TimeoutError","AbortError","UnknownError"];
export const LOG_ROUTES = ["/","other","/dashboard","/anonymize","/healthcheck","/api/healthcheck","/api","/api/download","/api/stat","/api/stat/history","/api/options","/api/message","/api/user","/api/user/quota","/api/user/dashboard","/api/repo","/api/anonymize-preview","/api/admin/overview","/api/admin/performance","/api/admin/errors","/api/admin/errors/stats","/api/admin/queues","/api/admin/queues/metrics","/github/app/webhook","/api/repo/:repoId","/api/repo/:repoId/file/:path","/api/repo/:repoId/files","/api/repo/:repoId/files/counts","/api/repo/:repoId/files/search","/api/repo/:repoId/zip","/api/repo/:repoId/options","/api/repo/:repoId/refresh","/api/repo/:repoId/coauthors","/api/repo/:repoId/extend","/api/repo/:owner/:repo","/api/repo/:owner/:repo/tree","/api/repo/:owner/:repo/file","/api/repo/:owner/:repo/readme","/api/repo/:owner/:repo/branches","/w/:repoId/:path","/r/:repoId/:path","/api/pr/:id/:path","/api/gist/:id/:path","/assets/:path","/github/:action","/api/admin/:action","/api/user/:action","/api/repo/:id/file/:path","/api/repo/:id/files/counts","/api/repo/:id/files/search","/api/repo/:id/files","/api/repo/:id/zip","/api/repo/:id","/viewer/:id/:path","/api/billing","/api/billing/draft","/api/billing/draft/:id","/api/billing/checkout","/api/billing/portal","/api/billing/refresh","/api/billing/webhook","/api/conferences/plans","/profile","/conference/:id"];
export const LOG_THROWN_ERROR_CODES = ["another_login_required","billing_address_missing","billing_already_paid","billing_busy","billing_checkout_disabled","billing_checkout_in_progress","billing_city_missing","billing_country_missing","billing_customer_mismatch","billing_draft_not_found","billing_email_missing","billing_invalid_conference","billing_invalid_draft","billing_invalid_purchase","billing_invalid_repository_size","billing_invalid_review_window","billing_missing","billing_name_missing","billing_plan_change_not_supported","billing_plan_unavailable","billing_price_misconfigured","billing_recovery_required","billing_review_window_locked","billing_subscription_exists","billing_unavailable","billing_zip_missing","branch_not_found","branch_not_specified","cache_busy","cache_miss","cannot_coauthor_self","commit_not_found","commit_not_specified","conf_end_date_invalid","conf_end_date_missing","conf_id_missing","conf_id_used","conf_name_missing","conf_not_activated","conf_not_found","conf_start_date_invalid","conf_start_date_missing","conference_not_found","conference_payment_required","connection_changed","download_not_enabled","expiration_limit_reached","file_listing_too_large","file_not_accessible","file_not_found","file_not_supported","file_too_big","folder_not_supported","gistId_already_used","gistId_not_specified","gist_expired","gist_not_available","gist_not_found","gist_not_ready","github_app_access_required","github_app_authorization_cancelled","github_app_disabled","github_app_permissions_invalid","github_app_reconnect_required","github_app_refresh_busy","github_grant_revocation_failed","github_identity_mismatch","github_oauth_required","github_rate_limit_exceeded","github_unavailable","github_user_not_found","invalid_auth_state","invalid_billing_expiration","invalid_commit_format","invalid_connection","invalid_cursor","invalid_gistId","invalid_github_path","invalid_path","invalid_plan","invalid_preserve_files_format","invalid_project_name","invalid_pullRequestId","invalid_repo","invalid_repoId","invalid_request","invalid_settings","invalid_sort","invalid_status","invalid_terms_format","invalid_token_id","invalid_token_options","is_removed","not_authorized","not_connected","not_owner","oauth_resources_remaining","options_not_provided","page_not_activated","page_not_supported_on_different_branch","path_not_defined","path_not_specified","pullRequestId_already_used","pullRequestId_is_not_a_number","pullRequestId_not_specified","pull_request_expired","pull_request_not_available","pull_request_not_found","pull_request_not_ready","quota_exceeded","quota_repository_limit","quota_storage_limit","rate_limited","readme_not_available","repoId_already_used","repoId_not_defined","repoUrl_not_defined","repo_access_limited","repo_empty","repo_not_accessible","repo_not_found","repo_saml_enforcement","repository_archived","repository_busy","repository_changed","repository_expired","repository_job_cancelled","repository_not_accessible","repository_not_ready","repository_not_specified","repository_tree_incomplete","repository_tree_too_large","s3_config_not_provided","source_not_provided","storage_delete_failed","storage_write_size_mismatch","streamer_unreachable","streamer_upstream_error","submodule_not_available","subscription_required_for_never_expiration","terms_not_specified","token_expired","token_limit_reached","unable_to_connect_user","unable_to_download","upstream_error","user_banned","user_not_found","username_not_defined","zip_not_available","zip_unsafe_entry_path"];
+5 -4
View File
@@ -1,7 +1,7 @@
import { ANONYMIZATION_ERRORS } from "./anonymization-errors";
import { requestReproduction, safeReproductionPath } from "./log-reproduction";
import { safeDiagnosticFields, errorDiagnostics } from "./log-diagnostics";
import { LOG_ROUTES } from "./log-diagnostic-schema";
import { LOG_ROUTES, LOG_THROWN_ERROR_CODES } from "./log-diagnostic-schema";
import { LOG_MODULES, ERROR_CODES, LOG_EVENTS } from "./log-schema";
import { randomUUID } from "crypto";
import { logContext, validTraceId } from "./log-context";
@@ -17,8 +17,9 @@ const events: Record<string, string> = {
"process heartbeat": "process_heartbeat", "job started": "job_started", "job completed": "job_completed",
"job failed": "job_failed", "job stalled": "job_stalled", "queue heartbeat": "queue_heartbeat",
};
const errorCodes = new Set([
...ERROR_CODES, ...ANONYMIZATION_ERRORS, "zip_unsafe_entry_path",
// LOG_THROWN_ERROR_CODES is generated from the codes the source throws.
export const LOG_ERROR_CODES: ReadonlySet<string> = new Set([
...ERROR_CODES, ...ANONYMIZATION_ERRORS, ...LOG_THROWN_ERROR_CODES, "zip_unsafe_entry_path",
"repo_renamed", "preparation_interrupted", "commit_not_found", "zip_not_available", "token_refresh_failed", "quota_exceeded", "quota_repository_limit", "quota_storage_limit", "github_rate_limit_exceeded", "github_app_reconnect_required", "github_token_invalid",
"repository_expired", "repository_not_ready", "repository_not_found", "repository_job_cancelled",
"ECONNRESET", "ECONNREFUSED", "ETIMEDOUT", "ENOTFOUND", "EPIPE", "ABORT_ERR",
@@ -57,7 +58,7 @@ export function logRecord(level: string, module: string, args: unknown[]) {
}
if (Number.isSafeInteger(context.attempt)) record.attempt = context.attempt;
for (const key of LOG_NUMBERS) if (typeof details[key] === "number" && Number.isFinite(details[key])) record[key] = details[key];
const code = [details.code, details.message].find(value => typeof value === "string" && errorCodes.has(value));
const code = [details.code, details.message].find(value => typeof value === "string" && LOG_ERROR_CODES.has(value));
if (code) record.errorCode = code;
if (allowed(["protocol", "credentials", "port", "host"], details.reason)) record.reason = details.reason;
if (allowed(["parse", "find_grant_owners", "reconcile_grant", "persist_installation_block", "reconcile_installation"], details.phase)) record.phase = details.phase;
+16
View File
@@ -14,3 +14,19 @@ export function isResponseCancellation(error: unknown, response?: { destroyed?:
}
return false;
}
/**
* pipeline() rejects with ERR_STREAM_PREMATURE_CLOSE both when the client goes
* away and when the source ends early. Call before piping; the returned check
* is true only when the response closed unfinished before the source failed.
*/
export function watchClientClose(response: { writableFinished?: boolean; once(event: "close", listener: () => void): unknown },
source: { readableEnded?: boolean; once(event: "close" | "error", listener: () => void): unknown }): () => boolean {
let sourceFailed = false;
let clientClosed = false;
source.once("error", () => { sourceFailed = true; });
// A source that closes without ending was cut short.
source.once("close", () => { if (!source.readableEnded) sourceFailed = true; });
response.once("close", () => { if (!sourceFailed && !response.writableFinished) clientClosed = true; });
return () => clientClosed;
}
+4 -2
View File
@@ -41,8 +41,9 @@ router.post(
res
);
} catch (error) {
const streaming = res.headersSent;
handleError(error, res);
if (res.headersSent && !res.writableEnded) res.destroy();
if (streaming && !res.writableEnded) res.destroy();
}
}
);
@@ -121,8 +122,9 @@ router.post("/", async (req: express.Request, res: express.Response) => {
if (!content.closed && !content.destroyed) {
content.destroy();
}
const streaming = res.headersSent;
handleError(error, res);
if (res.headersSent && !res.writableEnded) res.destroy();
if (streaming && !res.writableEnded) res.destroy();
anonymizer.destroy();
}
content
+108
View File
@@ -0,0 +1,108 @@
const { strict: assert } = require("node:assert");
const { promises: fs } = require("node:fs");
const http = require("node:http");
const { tmpdir } = require("node:os");
const { join } = require("node:path");
const { PassThrough, Readable, Writable } = require("node:stream");
const { pipeline } = require("node:stream/promises");
const { setTimeout } = require("node:timers");
const { createHash } = require("node:crypto");
const express = require("express");
require("ts-node/register/transpile-only");
const config = require("../src/config").default;
const { sharedBlobCache, closeBlobCaches } = require("../src/core/blob-cache");
const { watchClientClose, isResponseCancellation } = require("../src/core/response-cancellation");
const streamer = require("../src/streamer/route").default;
const body = Buffer.alloc(8 * 1024 * 1024, 7);
const sha = createHash("sha1").update(`blob ${body.length}\0`).update(body).digest("hex");
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
/** Collect the structured records a test run writes to stdout. */
function captureLogs() {
const records = [];
const write = process.stdout.write;
process.stdout.write = function (chunk, ...rest) {
for (const line of String(chunk).split("\n")) {
try { const record = JSON.parse(line); if (record && record.severity) { records.push(record); continue; } } catch { /* not a record */ }
if (line) write.call(process.stdout, line + "\n");
}
const callback = rest.find((arg) => typeof arg === "function");
if (callback) callback();
return true;
};
return { records, restore: () => { process.stdout.write = write; } };
}
describe("cached response cancellation", function () {
this.timeout(15000);
let root, old;
beforeEach(async () => {
old = { ...config }; closeBlobCaches();
root = await fs.mkdtemp(join(tmpdir(), "cached-cancel-"));
Object.assign(config, { STORAGE: "filesystem", FOLDER: root, SHARED_CACHE_ENABLED: true,
SHARED_CACHE_PATH: join(root, "cache"), SHARED_CACHE_BYTES: 64 * 1024 ** 2,
SHARED_CACHE_RESULT_BYTES: 32 * 1024 ** 2, SHARED_CACHE_MAX_FILE_BYTES: 16 * 1024 ** 2,
SHARED_CACHE_FREE_BYTES: 0, BILLING_ENABLED: false });
});
afterEach(async () => {
closeBlobCaches(); Object.assign(config, old);
await fs.rm(root, { recursive: true, force: true });
});
it("does not log a client that stops a cached download as a server error", async () => {
const seeded = await sharedBlobCache().getOrFill(`git-${sha}`, async () => Readable.from([body]), async () => `git-${sha}`, body.length);
for await (const chunk of seeded) void chunk;
const app = express(); app.use(express.json()); app.use("/api", streamer);
const server = await new Promise((resolve) => { const s = app.listen(0, "127.0.0.1", () => resolve(s)); });
const logs = captureLogs();
try {
await new Promise((resolve) => {
const req = http.request({ host: "127.0.0.1", port: server.address().port, path: "/api", method: "POST",
headers: { "content-type": "application/json" } }, (res) => {
res.once("data", () => req.destroy());
res.on("error", () => undefined);
res.on("close", resolve);
});
req.on("error", resolve);
req.end(JSON.stringify({ token: "", repoFullName: "owner/repo", repoId: "anon", sha, size: body.length,
filePath: "video.bin", anonymizerOptions: { terms: [], filePath: "video.bin" } }));
});
await wait(300);
} finally {
logs.restore();
server.closeAllConnections();
await new Promise((resolve) => server.close(resolve));
}
const faults = logs.records.filter((record) => record.severity === "error" || record.severity === "warn");
assert.deepEqual(faults, []);
});
it("names a client disconnect but keeps a source that ended early as a failure", async () => {
const attribute = async (closeFirst) => {
const source = new PassThrough();
// The "late" response never acknowledges its write, like a slow socket.
const response = new Writable({ write(_chunk, _encoding, done) { if (closeFirst !== "late") done(); } });
const clientClosed = watchClientClose(response, source);
const piping = pipeline(source, response);
source.write("partial");
if (closeFirst === "late") source.end();
await wait(5);
if (closeFirst !== "source") response.destroy();
else source.destroy();
const error = await piping.then(() => undefined, (failure) => failure);
return { error, clientClosed: clientClosed(), cancellation: isResponseCancellation(error, response) };
};
const client = await attribute("client");
assert.equal(client.error.code, "ERR_STREAM_PREMATURE_CLOSE");
assert.equal(client.clientClosed, true);
// The source was fully read but the response had not flushed yet.
const late = await attribute("late");
assert.equal(late.error.code, "ERR_STREAM_PREMATURE_CLOSE");
assert.equal(late.clientClosed, true);
const source = await attribute("source");
assert.equal(source.error.code, "ERR_STREAM_PREMATURE_CLOSE");
assert.equal(source.clientClosed, false);
assert.equal(source.cancellation, false);
});
});
+2 -1
View File
@@ -5,6 +5,7 @@ const {installDatabaseTiming}=require('../src/core/database-timing');
const {monitorRequests,RequestMetrics}=require('../src/core/request-monitoring');
const express=require('express');
const http=require('node:http');
const {setTimeout:delay}=require('node:timers/promises');
describe('database execution timing',()=>{
it('preserves query receiver, result and failure while measuring execution once',async()=>{
const Model=mongoose.model("TimingFixture",new mongoose.Schema({}));
@@ -13,7 +14,7 @@ describe('database execution timing',()=>{
installDatabaseTiming();const wrapped=mongoose.Query.prototype.exec;installDatabaseTiming();expect(mongoose.Query.prototype.exec).equal(wrapped);
app.use(monitorRequests('api',new RequestMetrics(),{info:(_,row)=>logs.push(row),warn:(_,row)=>logs.push(row)}));
app.get('/',async(_req,res)=>{
const query=Model.find();query._find=async function(){expect(this).equal(query);await new Promise(r=>setTimeout(r,20));return ['ok'];};
const query=Model.find();query._find=async function(){expect(this).equal(query);await delay(20);return ['ok'];};
expect(await query.exec()).deep.equal(['ok']);
const failed=Model.find();const error=new Error('PRIVATE query');failed._find=async()=>{throw error;};
try{await failed.exec();throw Error('expected failure');}catch(e){expect(e).equal(error);}
+3 -1
View File
@@ -361,7 +361,9 @@ const uri = process.env.PERFORMANCE_MONGO_URI;
expect(saved.githubAccess.revision).not.to.equal("old-access"); expect(saved.anonymizeDate.getTime()).to.be.greaterThan(1);
expect(saved.options.terms).to.deep.equal(["after"]);
expect(await File.countDocuments({ repoId: row.repoId })).to.equal(0); expect(await Path.countDocuments({ repoId: row.repoId })).to.equal(0);
expect(jobs).to.have.length(1); expect(jobs[0][1]).to.deep.equal({ repoId: row.repoId });
expect(jobs).to.have.length(1);
const { logJobId, ...jobData } = jobs[0][1];
expect(jobData).to.deep.equal({ repoId: row.repoId }); expect(logJobId).to.match(/^[a-f0-9-]{36}$/);
});
for (const [label, change] of [...changedSnapshots, ["settings revision", { settingsSavedAt: new Date(1) }]] ) {
+5 -4
View File
@@ -996,13 +996,14 @@ const uri = process.env.PERFORMANCE_MONGO_URI;
const row = await Repo.create({ repoId: "active-staged", status: "ready", statusDate: new Date(), lastView: new Date(),
treeGeneration: "old", source: { type: "GitHubStream" }, options: { expirationMode: "never" } });
await File.create({ repoId: row.repoId, treeGeneration: "old", path: "", name: "old.txt" });
const repo = new Repository(row), updateMany = File.updateMany;
// Completion clears markers through the driver collection (clearStagedRowsInBatches).
const repo = new Repository(row), updateMany = File.collection.updateMany;
Object.defineProperty(repo, "source", { get: () => ({ getFiles: async () => [{ path: "", name: "active.txt", size: 1 }] }) });
File.updateMany = function (filter, ...args) {
if (filter.treeStaged) return { exec: async () => { throw Error("marker cleanup interrupted"); } };
File.collection.updateMany = function (filter, ...args) {
if (filter.treeStaged) return Promise.reject(Error("marker cleanup interrupted"));
return updateMany.call(this, filter, ...args);
};
try { await repo.files({ force: true }); } finally { File.updateMany = updateMany; }
try { await repo.files({ force: true }); } finally { File.collection.updateMany = updateMany; }
expect(await File.countDocuments({ treeStaged: true })).to.equal(1);
await require("../src/server/schedule").runRepositoryStatusCheck();
expect((await File.find({ repoId: row.repoId })).map(file => file.name)).to.deep.equal(["active.txt"]);
+13 -3
View File
@@ -6,7 +6,7 @@ const path = require("node:path");
const net = require("node:net");
const { randomBytes } = require("node:crypto");
const { once } = require("node:events");
const { setTimeout } = require("node:timers");
const { setTimeout, clearTimeout } = require("node:timers");
const { fetch } = globalThis;
const mongoose = require("mongoose");
require("ts-node/register/transpile-only");
@@ -51,10 +51,20 @@ const uri = process.env.PERFORMANCE_MONGO_URI;
});
const messages = []; child.on("message", message => messages.push(message));
const ready = new Promise((resolve, reject) => {
// Fail before the mocha timeout so callers' finally blocks always stop the child.
const deadline = setTimeout(() => reject(Error("Streamer did not report streamer_started")), 20000);
const settle = (fn, value) => { clearTimeout(deadline); fn(value); };
let logs = "";
child.stdout.on("data", chunk => { logs += chunk; if (logs.includes("streamer started")) resolve(); });
child.stdout.on("data", chunk => {
logs += chunk; const lines = logs.split("\n"); logs = lines.pop();
for (const line of lines) {
let record; try { record = JSON.parse(line); } catch { continue; }
if (record.event === "streamer_started") settle(resolve);
}
});
child.stderr.on("data", () => {});
child.once("error", reject); child.once("exit", code => reject(Error(`Streamer exited ${code} before serving`)));
child.once("error", error => settle(reject, error));
child.once("exit", code => settle(reject, Error(`Streamer exited ${code} before serving`)));
});
ready.catch(() => {});
return { child, ready, messages, directory, stale, url: `http://127.0.0.1:${port}` };
+3 -1
View File
@@ -88,7 +88,9 @@ describe("large anonymization resources", function () {
maxOutput: 1000000, context: { mask: "XXXX", hostname: "localhost" } }, text.length, controller.signal);
} catch (error) { failure = error; }
expect(failure).to.be.instanceOf(Error);
expect(failure.message).to.match(/timed out after 1000ms/);
// Workers report fixed codes only; the elapsed bound proves the 1s regex deadline,
// not the 15s pool deadline that reports the same code, stopped the job.
expect(failure.message).to.equal("anonymization_deadline_exceeded");
expect(Date.now() - started).to.be.lessThan(8000);
let exists = true;
try { await fs.access(output); } catch (error) { if (error.code === "ENOENT") exists = false; else throw error; }
+5 -3
View File
@@ -207,11 +207,13 @@ describe("repository activity dates", () => {
});
}
}
// FileModel.exists() returns a Mongoose query; production code chains .hint().
const missingFile = () => Object.assign(Promise.resolve(null), { hint() { return this; } });
it("returns publication and settings dates independently of the older source commit", async () => {
const repo = repository(); auth(repo);
repo.model.settingsSavedAt = new Date("2026-03-01");
repo.model.publishedAt = new Date("2026-02-01");
stub(Files, "exists", async () => null);
stub(Files, "exists", missingFile);
let body;
await handler("repository-public", "/:repoId/options", "get")({}, { header: () => {}, json: value => { body = value; } });
expect(body.lastUpdateDate).to.deep.equal(repo.model.settingsSavedAt);
@@ -220,7 +222,7 @@ describe("repository activity dates", () => {
});
it("does not invent publication or settings dates for legacy repositories", async () => {
const repo = repository(); auth(repo);
stub(Files, "exists", async () => null);
stub(Files, "exists", missingFile);
let body;
await handler("repository-public", "/:repoId/options", "get")({}, { header: () => {}, json: value => { body = value; } });
expect(body.publishedAt).to.equal(undefined);
@@ -232,7 +234,7 @@ describe("repository activity dates", () => {
const repo = repository(); auth(repo);
repo.model.options.expirationMode = "remove";
repo.model.options.expirationDate = new Date("2099-01-01");
stub(Files, "exists", async () => null);
stub(Files, "exists", missingFile);
let body;
await handler("repository-public", "/:repoId/options", "get")({}, { header: () => {}, json: value => { body = value; } });
expect(body.expirationDate).to.deep.equal(new Date("2099-01-01"));
+71
View File
@@ -0,0 +1,71 @@
const { strict: assert } = require("node:assert");
const http = require("node:http");
const { setTimeout } = require("node:timers");
const express = require("express");
const session = require("express-session");
require("ts-node/register/transpile-only");
const config = require("../src/config").default;
const File = require("../src/core/AnonymizedFile").default;
const { AnonymizeTransformer } = require("../src/core/anonymize-utils");
const got = require("got");
// connect-redis implements touch(), so every request that carries a session
// cookie goes through express-session's split write: all but the last body
// byte is written at once and the last byte follows the asynchronous touch.
class TouchingStore extends session.MemoryStore {
touch(sid, sess, callback) {
setTimeout(() => super.touch(sid, sess, callback), 20);
}
}
const listen = (handler) => new Promise((resolve) => {
const server = http.createServer(handler);
server.listen(0, "127.0.0.1", () => resolve(server));
});
const close = (server) => new Promise((resolve) => server.close(resolve));
describe("streamer error responses with a session cookie", function () {
this.timeout(10000);
let old, streamer, api, base;
beforeEach(async () => {
old = { ...config };
streamer = await listen((req, res) => {
req.resume();
res.writeHead(404, { "content-type": "application/json" });
res.end(JSON.stringify({ error: "repo_not_found" }));
});
Object.assign(config, {
STREAMER_ENTRYPOINT: `http://127.0.0.1:${streamer.address().port}/`,
SHARED_CACHE_ENABLED: false,
});
const app = express();
app.use(session({ secret: "test", store: new TouchingStore(), resave: false,
saveUninitialized: false, rolling: true }));
app.get("/login", (req, res) => { req.session.visited = true; res.end("ok"); });
app.get("/file", async (_req, res) => {
const file = new File({ repository: {
repoId: "anon", owner: { id: "507f1f77bcf86cd799439011" }, options: { terms: [] },
model: { _id: "507f1f77bcf86cd799439012", source: { repositoryName: "owner/gone" } },
getToken: async () => "token",
generateAnonymizeTransformer: (filePath) => new AnonymizeTransformer({ terms: [], filePath }),
}, anonymizedPath: "README.md" });
file._file = { name: "README.md", path: "", sha: "sha", size: 10 };
await file.send(res);
});
api = await new Promise((resolve) => { const s = app.listen(0, "127.0.0.1", () => resolve(s)); });
base = `http://127.0.0.1:${api.address().port}`;
});
afterEach(async () => {
await close(api);
await close(streamer);
Object.assign(config, old);
});
it("delivers the whole 404 body instead of cutting the connection", async () => {
const login = await got(`${base}/login`, { retry: 0 });
const cookie = login.headers["set-cookie"].map((value) => value.split(";")[0]).join("; ");
const response = await got(`${base}/file`, { headers: { cookie }, throwHttpErrors: false, retry: 0 });
assert.equal(response.statusCode, 404);
assert.equal(response.body, JSON.stringify({ error: "repo_not_found" }));
});
});
+1
View File
@@ -1,6 +1,7 @@
const {expect}=require('chai');
const express=require('express');
const http=require('node:http');
const {setTimeout}=require('node:timers');
const {Readable}=require('node:stream');
require('ts-node/register/transpile-only');
const {monitorRequests,RequestMetrics}=require('../src/core/request-monitoring');
+66
View File
@@ -0,0 +1,66 @@
const { strict: assert } = require("node:assert");
const fs = require("node:fs");
const path = require("node:path");
const ts = require("typescript");
require("ts-node/register/transpile-only");
const { logRecord, LOG_ERROR_CODES } = require("../src/core/log-record");
const { serializeError } = require("../src/core/logger");
const { billingError } = require("../src/core/billing/config");
const { consumeFlow } = require("../src/server/routes/github-app");
const root = path.join(__dirname, "..");
const vrl = fs.readFileSync(path.join(root, "deploy/logging/sanitize.vrl"), "utf8");
const collectorCodes = new Set(JSON.parse(vrl.match(/if includes\((\[.*?\]), record\.errorCode\)/)[1]));
// Independent of the generator: string codes passed straight to the error
// factories anywhere under src/.
function thrownCodes() {
const codes = new Map();
const literals = (node, file) => {
if (!node) return;
if (ts.isStringLiteralLike(node)) { if (/^[A-Za-z][A-Za-z0-9]*(?:_[A-Za-z0-9]+)+$/.test(node.text)) codes.set(node.text, file); }
else if (ts.isConditionalExpression(node)) { literals(node.whenTrue, file); literals(node.whenFalse, file); }
else if (ts.isParenthesizedExpression(node)) literals(node.expression, file);
};
const walk = (dir) => {
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
const file = path.join(dir, entry.name);
if (entry.isDirectory()) { walk(file); continue; }
if (!file.endsWith(".ts") || file.endsWith(".d.ts")) continue;
const source = ts.createSourceFile(file, fs.readFileSync(file, "utf8"), ts.ScriptTarget.Latest, true);
(function visit(node) {
if ((ts.isNewExpression(node) || ts.isCallExpression(node)) && ts.isIdentifier(node.expression) &&
["AnonymousError", "billingError", "appError"].includes(node.expression.text) && node.arguments?.length) {
literals(node.arguments[0], path.relative(root, file));
}
ts.forEachChild(node, visit);
})(source);
}
};
walk(path.join(root, "src"));
return codes;
}
describe("thrown error codes reach the logs", () => {
it("keeps the billing expiration and GitHub App state codes", () => {
const billing = logRecord("warn", "route", [serializeError(billingError("invalid_billing_expiration"))]);
assert.equal(billing.errorCode, "invalid_billing_expiration");
let state;
try { consumeFlow(undefined, "state"); } catch (error) { state = error; }
assert.equal(state.message, "invalid_auth_state");
assert.equal(logRecord("warn", "route", [serializeError(state)]).errorCode, "invalid_auth_state");
for (const code of ["invalid_billing_expiration", "invalid_auth_state", "streamer_unreachable"]) {
assert.ok(collectorCodes.has(code), `${code} is missing from sanitize.vrl`);
}
});
it("allowlists every code passed to an error factory", () => {
const missing = [...thrownCodes()].filter(([code]) => !LOG_ERROR_CODES.has(code) || !collectorCodes.has(code))
.map(([code, file]) => `${code} (${file})`);
assert.deepEqual(missing, [], "run node scripts/generate-log-diagnostics.js");
});
it("lets the collector keep every code the logger emits", () => {
assert.deepEqual([...LOG_ERROR_CODES].filter((code) => !collectorCodes.has(code)), []);
});
});