Merge pull request #929 from tdurieux/fix/ui-mobile-bugs

fix(ui): mobile viewer, code-block redactions and anonymize preview
This commit is contained in:
Thomas Durieux authored and GitHub committed 2026-11-08 21:30:27 +01:00
commit ba3382b1d7
8 files changed
+142 -107

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
{
"core.min.js": "core.d23af1c652.min.js",
"vendor.min.js": "vendor.5444441cd0.min.js",
"vendor.min.js": "vendor.df44bc78ab.min.js",
"mermaid.min.js": "mermaid.a7356d5ed1.min.js",
"all.min.css": "all.1387c04ed5.min.css",
"all.min.css": "all.400df29a4b.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
+20
View File
@@ -12358,3 +12358,23 @@ span.redact, .hero-mock .redact { vertical-align: -.12em !important; }
.paper-landing { overflow-x: clip; }
}
@media (min-width: 1100px) { .hero-mock { min-height: 0 !important; } }
/* ── Fix round: redaction slots in code blocks, phone reading layout ── */
/* A slot in a code block keeps the width of the XXXX-n it replaces and sits on the text line. */
.markdown-body pre code mark.redact-chip, .dark-mode .markdown-body pre code mark.redact-chip, pre code mark.redact-chip {
display: inline-block !important; box-sizing: border-box !important; overflow: hidden !important;
width: var(--slot-ch, 6ch) !important; min-width: 0 !important; height: 1.2em !important;
margin: 0 !important; padding: 0 .4ch !important; vertical-align: -.24em !important;
font-size: inherit !important; line-height: 1.2em !important; text-align: right !important;
}
.markdown-body pre code mark.redact-chip i, pre code mark.redact-chip i { font-size: .8em !important; line-height: inherit !important; vertical-align: top !important; }
/* Below the outline breakpoint the outline is hidden: one column that never exceeds the screen. */
@media (max-width: 1199px) { .reading-layout { grid-template-columns: minmax(0, 760px) !important; } }
@media (max-width: 767px) { .reading-layout { grid-template-columns: minmax(0, 1fr) !important; padding: 0 16px !important; } }
.reading-layout > .file-content.markdown-body { min-width: 0 !important; max-width: 100% !important; }
/* Home closing band: no second divider under the FAQ, and the footer rule sits closer to it. */
.paper-cta { border-top: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 96px !important; margin-bottom: 88px !important; }
.paper-cta + .paper-footer { margin-top: 0 !important; }
@media (max-width: 991px) { .paper-cta { margin-top: 72px !important; margin-bottom: 64px !important; } }
/* Phone usage popover: open from the left edge of the Usage button, inside the screen. */
@media (max-width: 767px) { .dashboard-heading-actions .dashboard-quota .quota-panel { left: 0 !important; right: auto !important; width: calc(100vw - 36px) !important; } }
+1 -1
View File
@@ -442,7 +442,7 @@
<button class="btn btn-outline-ink" type="button" @click="retryPreview()">Retry preview</button>
</div>
<div class="anonymize-preview-status" v-if="!sourceLoading &amp;&amp; !readme &amp;&amp; previewStatus === 'idle'">No README is available to preview. Review the published files before sharing.</div>
<div class="anonymize-preview-body markdown-body body" v-if="previewStatus === 'ready'" v-html="sanitize(html_readme)"></div>
<div class="anonymize-preview-body markdown-body body" v-if="previewStatus === 'ready'" v-html="renderRedacted(sanitize(html_readme))"></div>
</div>
<div id="workspace-preview" :role="mobileWorkspace ? 'tabpanel' : null" :aria-labelledby="mobileWorkspace ? 'workspace-preview-tab' : null" class="anonymize-preview-col" v-if="detectedType === &#x27;gist&#x27; &amp;&amp; details">
+1 -1
View File
@@ -71,7 +71,7 @@
<div class="leftCol-backdrop" v-show="files?.length &amp;&amp; !sidebarCollapsed" @click="sidebarCollapsed = true"></div>
<div class="explorer-main">
<div class="status-bar" v-show="type != 'error' || files?.length" :class="{ 'is-redundant': ['code', 'text', 'html'].includes(type) &amp;&amp; content != null &amp;&amp; !(options?.isAdmin || options?.isOwner || options?.hasWebsite) }">
<div class="status-bar" v-show="type != 'error' || files?.length" :class="{ 'is-redundant': ['code', 'text', 'html'].includes(type) &amp;&amp; content != null }">
<button type="button" class="btn btn-sm status-files-btn" v-show="files?.length" aria-label="Show files" title="Show files" @click="sidebarHidden ? (sidebarHidden = false) : (sidebarCollapsed = false)">
<svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-folder"></use></svg><span>Files</span>
</button>
+3 -1
View File
@@ -73,6 +73,8 @@
<a role="menuitem" target="_self" v-if="type == 'html'" :href="safeUrl((url))"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-code"></use></svg>View raw</a>
<a role="menuitem" target="_self" v-if="type != 'html'" :href="safeUrl((url))"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-code"></use></svg>View raw</a>
<a role="menuitem" target="_self" :href="safeUrl((url) + &quot;&amp;download=true&quot;)"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-download"></use></svg>Download file</a>
<a role="menuitem" target="_self" v-if="options?.hasWebsite" :href="safeUrl(&quot;/w/&quot; + (repoId) + &quot;/&quot;)"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-globe"></use></svg>Open website</a>
<a role="menuitem" v-if="options?.isAdmin || options?.isOwner" :href="safeUrl(&quot;/anonymize/&quot; + (repoId))"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-edit"></use></svg>Edit anonymization</a>
<a role="menuitem" target="_self" v-if="options?.download" :href="safeUrl(&quot;/api/repo/&quot; + (repoId) + &quot;/zip&quot;)"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-archive"></use></svg>Download ZIP</a>
<button type="button" role="menuitem" @click="copyPath()"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg>Copy file path</button>
<div class="tb-menu-sep"></div>
@@ -135,7 +137,7 @@
<section class="viewer-loading" v-if="type == 'loading' &amp;&amp; !error" aria-busy="true">
<div class="viewer-loading-status" role="status" aria-live="polite">
<strong>{{ fmt.translate(fileReceivedBytes ? 'VIEWER_LOADING.receiving' : 'VIEWER_LOADING.loading') }}</strong>
<span class="viewer-loading-name">{{ filePath }}</span>
<span class="viewer-loading-name sr-only">{{ filePath }}</span>
<p v-if="fileLoadingSlow">{{ fmt.translate('VIEWER_LOADING.slow') }}</p>
</div>
<div class="viewer-loading-lines" aria-hidden="true"><span v-for="line in 10" :key="line"></span></div>
+83 -70
View File
@@ -73,6 +73,82 @@ export const markRedactionsIn = (root, mask = redactionMask) => {
}
};
// Redactions are the product's signature: show every XXXX-n mask as a numbered slot.
const REDACTION_RE = /\bXXXX-\d+\b/g;
export const slotRedactions = function (html) {
if (!html || html.indexOf("XXXX-") === -1 || typeof window.DOMParser !== "function") return html;
const doc = new window.DOMParser().parseFromString("<div>" + html + "</div>", "text/html");
const walker = doc.createTreeWalker(doc.body, 4);
const nodes = [];
while (walker.nextNode()) {
REDACTION_RE.lastIndex = 0;
// Prism re-highlights code blocks from their text, so those are slotted in its hook.
if (walker.currentNode.parentElement?.closest("pre code")) continue;
if (REDACTION_RE.test(walker.currentNode.nodeValue)) nodes.push(walker.currentNode);
}
for (const node of nodes) {
REDACTION_RE.lastIndex = 0;
const frag = doc.createDocumentFragment();
let last = 0, m;
const text = node.nodeValue;
while ((m = REDACTION_RE.exec(text))) {
frag.appendChild(doc.createTextNode(text.slice(last, m.index)));
const mark = doc.createElement("mark");
mark.className = "redact-chip";
mark.setAttribute("title", "Redacted term " + m[0].slice(5) + " — the same term everywhere in this snapshot");
// Display: an empty slot holding only the term's number (the file keeps XXXX-N).
const num = m[0].slice(5);
mark.textContent = "";
const idx = doc.createElement("i");
idx.textContent = num;
mark.appendChild(idx);
mark.dataset.term = m[0];
mark.setAttribute("aria-label", "Redacted term " + num);
// Keep trailing punctuation on the chip's line (no orphaned "." or ",").
const trail = /^[.,;:!?)\]]+/.exec(text.slice(m.index + m[0].length));
if (trail) {
const glue = doc.createElement("span");
glue.className = "redact-glue";
glue.appendChild(mark);
glue.appendChild(doc.createTextNode(trail[0]));
frag.appendChild(glue);
last = m.index + m[0].length + trail[0].length;
} else {
frag.appendChild(mark);
last = m.index + m[0].length;
}
}
frag.appendChild(doc.createTextNode(text.slice(last)));
node.parentNode.replaceChild(frag, node);
}
return doc.body.firstChild.innerHTML;
};
// Prism rewrites fenced code blocks from their text, so slot redactions once it is done.
export const installPrismRedactionSlots = () => {
if (window.Prism?.hooks && !window.Prism.redactionHook) {
window.Prism.hooks.add("complete", (env) => {
markRedactionsIn(env.element);
// Show the same numbered slot as the rest of the viewer.
env.element.querySelectorAll?.("mark.redaction").forEach((mark) => {
const m = /^XXXX-(\d+)$/.exec(mark.textContent);
if (!m) return;
mark.className = "redact-chip";
mark.setAttribute("title", "Redacted term " + m[1] + " — the same term everywhere in this snapshot");
mark.setAttribute("aria-label", "Redacted term " + m[1]);
mark.dataset.term = m[0];
// Same width as the XXXX-n it replaces, so code columns stay aligned.
mark.style.setProperty("--slot-ch", m[0].length + "ch");
mark.textContent = "";
const idx = mark.ownerDocument.createElement("i");
idx.textContent = m[1];
mark.appendChild(idx);
});
});
window.Prism.redactionHook = true;
}
};
export const highlightRedactions = (html, mask = redactionMask) => {
if (!html || !mask || !html.includes(mask)) return html;
const doc = new DOMParser().parseFromString("<body>" + html + "</body>", "text/html");
@@ -1311,6 +1387,9 @@ export const statusController = function (state, http, params) {
};
export const anonymizeController = function (state, http, html, params, location, translate, timeout) {
// The preview shows redactions as the same numbered slots reviewers see.
installPrismRedactionSlots();
state.renderRedacted = slotRedactions;
// Unified state
state.sourceUrl = "";
state.workspaceOpen = false;
@@ -2531,26 +2610,7 @@ export const anonymizeController = function (state, http, html, params, location
export const exploreController = function (state, http, location, params, html, promises) {
const timers = createTimers();
// Prism rewrites fenced code blocks, so mark redactions once it is done.
if (window.Prism?.hooks && !window.Prism.redactionHook) {
window.Prism.hooks.add("complete", (env) => {
markRedactionsIn(env.element);
// Show the same numbered slot as the rest of the viewer.
env.element.querySelectorAll?.("mark.redaction").forEach((mark) => {
const m = /^XXXX-(\d+)$/.exec(mark.textContent);
if (!m) return;
mark.className = "redact-chip";
mark.setAttribute("title", "Redacted term " + m[1] + " — the same term everywhere in this snapshot");
mark.setAttribute("aria-label", "Redacted term " + m[1]);
mark.dataset.term = m[0];
mark.textContent = "";
const idx = mark.ownerDocument.createElement("i");
idx.textContent = m[1];
mark.appendChild(idx);
});
});
window.Prism.redactionHook = true;
}
installPrismRedactionSlots();
const listen = createListeners();
state.on("dark-mode", (event, on) => {
if (!state.aceOption) return;
@@ -2732,6 +2792,8 @@ export const exploreController = function (state, http, location, params, html,
if ((params.path || "") == state.filePath) {
return;
}
// On phones the file tree is a drawer: close it once a file is opened.
if (window.matchMedia?.("(max-width: 767px)").matches) state.sidebarCollapsed = true;
state.filePath = params.path || "";
state.paths = state.filePath
.split("/")
@@ -3060,61 +3122,12 @@ export const exploreController = function (state, http, location, params, html,
link.focus();
});
};
// Redactions are the product's signature: show every XXXX-n mask as a chip.
const REDACTION_RE = /\bXXXX-\d+\b/g;
state.redactionCount = function () {
if (typeof state.content !== "string") return 0;
const text = state.type === "html" ? state.content.replace(/<[^>]*>/g, " ") : state.content;
return (text.match(REDACTION_RE) || []).length;
};
state.renderRedacted = function (html) {
if (!html || html.indexOf("XXXX-") === -1 || typeof window.DOMParser !== "function") return html;
const doc = new window.DOMParser().parseFromString("<div>" + html + "</div>", "text/html");
const walker = doc.createTreeWalker(doc.body, 4);
const nodes = [];
while (walker.nextNode()) {
REDACTION_RE.lastIndex = 0;
// Prism re-highlights code blocks from their text, so those are slotted in its hook.
if (walker.currentNode.parentElement?.closest("pre code")) continue;
if (REDACTION_RE.test(walker.currentNode.nodeValue)) nodes.push(walker.currentNode);
}
for (const node of nodes) {
REDACTION_RE.lastIndex = 0;
const frag = doc.createDocumentFragment();
let last = 0, m;
const text = node.nodeValue;
while ((m = REDACTION_RE.exec(text))) {
frag.appendChild(doc.createTextNode(text.slice(last, m.index)));
const mark = doc.createElement("mark");
mark.className = "redact-chip";
mark.setAttribute("title", "Redacted term " + m[0].slice(5) + " — the same term everywhere in this snapshot");
// Display: an empty slot holding only the term's number (the file keeps XXXX-N).
const num = m[0].slice(5);
mark.textContent = "";
const idx = doc.createElement("i");
idx.textContent = num;
mark.appendChild(idx);
mark.dataset.term = m[0];
mark.setAttribute("aria-label", "Redacted term " + num);
// Keep trailing punctuation on the chip's line (no orphaned "." or ",").
const trail = /^[.,;:!?)\]]+/.exec(text.slice(m.index + m[0].length));
if (trail) {
const glue = doc.createElement("span");
glue.className = "redact-glue";
glue.appendChild(mark);
glue.appendChild(doc.createTextNode(trail[0]));
frag.appendChild(glue);
last = m.index + m[0].length + trail[0].length;
} else {
frag.appendChild(mark);
last = m.index + m[0].length;
}
}
frag.appendChild(doc.createTextNode(text.slice(last)));
node.parentNode.replaceChild(frag, node);
}
return doc.body.firstChild.innerHTML;
};
state.renderRedacted = slotRedactions;
// Reading mode: slugged heading ids + an "On this page" outline (like Mintlify/Stripe docs).
const slug = (t) => t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").slice(0, 60) || "section";
state.renderReadme = function (html) {
+31 -31
View File
@@ -1,34 +1,34 @@
"use strict";(()=>{var Ed=Object.defineProperty;var Sd=(e,t)=>{for(var o in t)Ed(e,o,{get:t[o],enumerable:!0})};var pe=["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 fe={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js",editor:"/script/editor.4f142d3adc.min.js"};function Ei(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let o=new URLSearchParams(t);if([...o.keys()].length!==3||[...o.keys()].some(a=>!["clientId","intentId","token"].includes(a)))return null;let i=o.get("clientId"),s=o.get("intentId"),r=o.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(s||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:s,token:r}}function Si(e,t){let{http:o,promises:i,window:s}=t,r=t.takeReviewHandoff(),a=r?{clientId:r.clientId,intentId:r.intentId}:null,p,f,y,b,w,m=!0,E,I=i.defer(),C=()=>[...s.crypto.getRandomValues(new Uint8Array(16))].map(F=>F.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 v=()=>m&&e.user?.username===w;function S(){m=!1,r=p=f=void 0,I.resolve(),s.clearTimeout(E)}e.on("dispose",S),e.on("routeLeave",S),e.watch(()=>e.user?.username,F=>{!w&&F?w=F:w&&F!==w&&(S(),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 D=()=>({timeout:I.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":f}}),V=F=>F?.status===404?"Artifact linking is not available on this server.":F?.status===401?"Sign in, then open a new artifact link from your submission.":F?.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(!m||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;w=e.user.username;let F=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(F)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,p=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,s.clearTimeout(E),b||(b=C());try{let L=(await o.get("/api/review-consent/csrf",{timeout:I.promise})).data;if(!v())return;if(f=L.csrf,e.handoffEnabled=L.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(f||""))throw new Error("invalid_csrf");let G=(await o.post("/api/review-consent/preview",{repositoryId:F,intent:{...r,requestId:b}},D())).data;if(!v())return;if(!G||typeof G.ticket!="string"||!G.ticket||G.ticket.length>8192||typeof G.repositoryName!="string"||!["restricted-review","anonymous-link"].includes(G.policy?.access)||!Number.isSafeInteger(G.policy.version)||!Number.isFinite(Date.parse(G.policy.retainUntil))||!Number.isFinite(Date.parse(G.expiresAt))||Date.parse(G.expiresAt)<=Date.now()||Date.parse(G.expiresAt)>Date.now()+6e5)throw new Error("invalid_preview");p=G.ticket,y=C(),e.preview={repositoryName:G.repositoryName,policy:{...G.policy},expiresAt:G.expiresAt},E=s.setTimeout(()=>{m&&(e.expired=!0)},Math.max(0,Date.parse(G.expiresAt)-Date.now()))}catch(L){v()&&(e.error=V(L))}finally{v()&&(e.busy=!1)}},e.confirmConsent=async()=>{if(!(!v()||e.busy||e.saved||!p||!e.acceptAccesLine truncated
`))),e[zt]=An(s);let r=i||s.props&&s.props.type==="number";nn(e,t?"change":"input",a=>{a.target.composing||e[zt](Zs(e.value,o,r))}),(o||r)&&nn(e,"change",()=>{e.value=Zs(e.value,o,r)}),t||(nn(e,"compositionstart",Dc),nn(e,"compositionend",ua),nn(e,"change",ua))},mounted(e,{value:t,modifiers:{trim:o,number:i}}){let s=t??"",r=e[Zo];delete e[Zo],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[zt](Zs(e.value,o,i)):e.value=s},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:i,trim:s,number:r}},a){if(e[zt]=An(a),e.composing)return;let p=(r||e.type==="number")&&!/^0\d/.test(e.value)?En(e.value):e.value,f=t??"";if(p===f)return;let y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(i&&t===o||s&&e.value.trim()===f)||(e.value=f)}},ei={deep:!0,created(e,t,o){e[zt]=An(o),nn(e,"change",()=>{let i=e._modelValue,s=vo(e),r=e.checked,a=e[zt];if(ge(i)){let p=Ro(i,s),f=p!==-1;if(r&&!f)a(i.concat(s));else if(!r&&f){let y=[...i];y.splice(p,1),a(y)}}else if(St(i)){let p=new Set(i);r?p.add(s):p.delete(s),a(p)}else a(va(e,r))})},mounted:ca,beforeUpdate(e,t,o){e[zt]=An(o),ca(e,t,o)}};function ca(e,{value:t,oldValue:o},i){e._modelValue=t;let s;if(ge(t))s=Ro(t,i.props.value)>-1;else if(St(t))s=t.has(i.props.value);else{if(t===o)return;s=Nt(t,va(e,!0))}e.checked!==s&&(e.checked=s)}var fn={deep:!0,created(e,{value:t,modifiers:{number:o}},i){e._modelValue=t,nn(e,"change",()=>{let s=Array.prototype.filter.call(e.options,f=>f.selected).map(f=>o?En(vo(f)):vo(f)),r=e.multiple,a=r?St(e._modelValue)?new Set(s):s:s[0],p=e._pendingValue=[r,r?ge(a)?s.slice():s:a];try{e[zt](a)}finally{je(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[zt]=An(i)},mounted(e,{value:t}){pa(e,t)},beforeUpdate(e,{value:t},o){e._modelValue=t,e[zt]=An(o)},updated(e,{value:t}){let o=e._pendingValue;e._pendingValue=void 0,(!o||o[0]!==e.multiple||!Tc(t,o[1],o[0]))&&pa(e,t)}};function Tc(e,t,o){if(!o)return Nt(e,t);if(ge(e))return Nt(e,t);if(St(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function pa(e,t){let o=e.multiple,i=ge(t);if(!(o&&!i&&!St(t))){for(let s=0,r=e.options.length;s<r;s++){let a=e.options[s],p=vo(a);if(o)if(i){let f=typeof p;f==="string"||f==="number"?a.selected=t.some(y=>String(y)===String(p)):a.selected=Ro(t,p)>-1}else a.selected=t.has(p);else if(Nt(vo(a),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function vo(e){return"_value"in e?e._value:e.value}function va(e,t){let o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}var _c=["ctrl","shift","alt","meta"],Ac={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)=>_c.some(o=>e[`${o}Key`]&&!t.includes(o))},ae=(e,t)=>{if(!e)return e;let o=e._withMods||(e._withMods={}),i=t.join(".");return o[i]||(o[i]=((s,...r)=>{for(let a=0;a<t.length;a++){let p=Ac[t[a]];if(p&&p(s,t))return}return e(s,...r)}))},Oc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},yt=(e,t)=>{let o=e._withKeys||(e._withKeys={}),i=t.join(".");return o[i]||(o[i]=(s=>{if(!("key"in s))return;let r=Pt(s.key);if(t.some(a=>a===r||Oc[a]===r))return e(s)}))},Pc=He({patchProp:Sc},lc),fa;function Ic(){return fa||(fa=Wr(Pc))}var ga=((...e)=>{let t=Ic().createApp(...e),{mount:o}=t;return t.mount=i=>{let s=Vc(i);if(!s)return;let r=t._component;!Ce(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let a=o(s,!1,Mc(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function Mc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Vc(e){return $e(e)?document.querySelector(e):e}var vn=typeof document<"u";function ba(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function qc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&ba(e.default)}var Oe=Object.assign;function es(e,t){let o={};for(let i in t){let s=t[i];o[i]=Ct(s)?s.map(e):e(s)}return o}var Pn=()=>{},Ct=Array.isArray;function oi(e,t){let o={};for(let i in e)o[i]=i in t?t[i]:e[i];return o}var wa=/#/g,Lc=/&/g,$c=/\//g,Uc=/=/g,Fc=/\?/g,ka=/\+/g,Bc=/%5B/g,zc=/%5D/g,Ca=/%5E/g,Hc=/%60/g,Ea=/%7B/g,jc=/%7C/g,Sa=/%7D/g,Gc=/%20/g;function si(e){return e==null?"":encodeURI(""+e).replace(jc,"|").replace(Bc,"[").replace(zc,"]")}function Na(e){return si(e).replace(Ea,"{").replace(Sa,"}").replace(Ca,"^")}function ti(e){return si(e).replace(ka,"%2B").replace(Gc,"+").replace(wa,"%23").replace(Lc,"%26").replace(Hc,"`").replace(Ea,"{").replace(Sa,"}").replace(Ca,"^")}function Wc(e){return ti(e).replace(Uc,"%3D")}function Kc(e){return sLine truncated
"use strict";(()=>{var Rd=Object.defineProperty;var Dd=(e,t)=>{for(var o in t)Rd(e,o,{get:t[o],enumerable:!0})};var pe=["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 fe={markdown:"/script/markdown.6c8dfb7b1d.min.js",notebook:"/script/notebook.c3144c18ae.min.js",org:"/script/org.f61f262915.min.js",editor:"/script/editor.4f142d3adc.min.js",pdf:"/script/pdf.4d9cc6ff49.min.js"};function Si(e){let t=e.location.hash.slice(1);if(e.history.replaceState(null,"","/review-link"),t.length>2048)return null;let o=new URLSearchParams(t);if([...o.keys()].length!==3||[...o.keys()].some(a=>!["clientId","intentId","token"].includes(a)))return null;let i=o.get("clientId"),s=o.get("intentId"),r=o.get("token");return!/^[a-f0-9]{32}$/.test(i||"")||!/^[a-f0-9]{32}$/.test(s||"")||!/^[a-f0-9]{64}$/.test(r||"")?null:{contract:"4open.artifacts/1",clientId:i,intentId:s,token:r}}function Ni(e,t){let{http:o,promises:i,window:s}=t,r=t.takeReviewHandoff(),a=r?{clientId:r.clientId,intentId:r.intentId}:null,p,f,g,y,b,m=!0,E,P=i.defer(),k=()=>[...s.crypto.getRandomValues(new Uint8Array(16))].map(L=>L.toString(16).padStart(2,"0")).join("");Object.assign(e,{repositoryId:"",handoffEnabled:!1,busy:!1,preview:null,acceptAccess:!1,acceptRetention:!1,uncertain:!1,saved:!1,expired:!1,error:r?"":"Open a new artifact link from your submission. This link is missing or invalid."});let v=()=>m&&e.user?.username===b;function S(){m=!1,r=p=f=void 0,P.resolve(),s.clearTimeout(E)}e.on("dispose",S),e.on("routeLeave",S),e.watch(()=>e.user?.username,L=>{!b&&L?b=L:b&&L!==b&&(S(),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:P.promise,headers:{"Content-Type":"application/json","X-Review-CSRF":f}}),M=L=>L?.status===404?"Artifact linking is not available on this server.":L?.status===401?"Sign in, then open a new artifact link from your submission.":L?.status===403?"This account cannot approve this repository or this link.":"The request could not be completed. You can retry from this page.";e.loadPreview=async()=>{if(!m||!r||e.busy||e.uncertain||e.saved||!e.user?.username)return;b=e.user.username;let L=e.repositoryId.trim();if(!/^[A-Za-z0-9_-]{3,128}$/.test(L)){e.error="Enter the anonymous repository ID from its URL.";return}e.busy=!0,e.error="",e.preview=null,p=void 0,e.acceptAccess=e.acceptRetention=!1,e.expired=!1,s.clearTimeout(E),y||(y=k());try{let q=(await o.get("/api/review-consent/csrf",{timeout:P.promise})).data;if(!v())return;if(f=q.csrf,e.handoffEnabled=q.handoffEnabled===!0,!/^[a-f0-9]{64}$/.test(f||""))throw new Error("invalid_csrf");let G=(await o.post("/api/review-consent/preview",{repositoryId:L,intent:{...r,requestId:y}},T())).data;if(!v())return;if(!G||typeof G.ticket!="string"||!G.ticket||G.ticket.length>8192||typeof G.repositoryName!="string"||!["restricted-review","anonymous-link"].includes(G.policy?.access)||!Number.isSafeInteger(G.policy.version)||!Number.isFinite(Date.parse(G.policy.retainUntil))||!Number.isFinite(Date.parse(G.expiresAt))||Date.parse(G.expiresAt)<=Date.now()||Date.parse(G.expiresAt)>Date.now()+6e5)throw new Error("invalid_preview");p=G.ticket,g=k(),e.preview={repositoryName:G.repositoryName,policy:{...G.policy},expiresAt:G.expiresAt},E=s.setTimeout(()=>{m&&(e.expired=!0)},Math.max(0,Date.parse(G.expiresAt)-Date.now()))}catch(q){v()&&(e.error=M(q))}finally{v()&&(e.busy=!1)}},e.confirmConsent=async()=>{if(!(!v()||e.busy||e.saved||!p||!e.acceptAccesLine truncated
`))),e[zt]=An(s);let r=i||s.props&&s.props.type==="number";nn(e,t?"change":"input",a=>{a.target.composing||e[zt](xs(e.value,o,r))}),(o||r)&&nn(e,"change",()=>{e.value=xs(e.value,o,r)}),t||(nn(e,"compositionstart",Ac),nn(e,"compositionend",ca),nn(e,"change",ca))},mounted(e,{value:t,modifiers:{trim:o,number:i}}){let s=t??"",r=e[xo];delete e[xo],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[zt](xs(e.value,o,i)):e.value=s},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:i,trim:s,number:r}},a){if(e[zt]=An(a),e.composing)return;let p=(r||e.type==="number")&&!/^0\d/.test(e.value)?En(e.value):e.value,f=t??"";if(p===f)return;let g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(i&&t===o||s&&e.value.trim()===f)||(e.value=f)}},ti={deep:!0,created(e,t,o){e[zt]=An(o),nn(e,"change",()=>{let i=e._modelValue,s=vo(e),r=e.checked,a=e[zt];if(ge(i)){let p=Do(i,s),f=p!==-1;if(r&&!f)a(i.concat(s));else if(!r&&f){let g=[...i];g.splice(p,1),a(g)}}else if(St(i)){let p=new Set(i);r?p.add(s):p.delete(s),a(p)}else a(ga(e,r))})},mounted:pa,beforeUpdate(e,t,o){e[zt]=An(o),pa(e,t,o)}};function pa(e,{value:t,oldValue:o},i){e._modelValue=t;let s;if(ge(t))s=Do(t,i.props.value)>-1;else if(St(t))s=t.has(i.props.value);else{if(t===o)return;s=Nt(t,ga(e,!0))}e.checked!==s&&(e.checked=s)}var fn={deep:!0,created(e,{value:t,modifiers:{number:o}},i){e._modelValue=t,nn(e,"change",()=>{let s=Array.prototype.filter.call(e.options,f=>f.selected).map(f=>o?En(vo(f)):vo(f)),r=e.multiple,a=r?St(e._modelValue)?new Set(s):s:s[0],p=e._pendingValue=[r,r?ge(a)?s.slice():s:a];try{e[zt](a)}finally{Ge(()=>{e._pendingValue===p&&(e._pendingValue=void 0)})}}),e[zt]=An(i)},mounted(e,{value:t}){fa(e,t)},beforeUpdate(e,{value:t},o){e._modelValue=t,e[zt]=An(o)},updated(e,{value:t}){let o=e._pendingValue;e._pendingValue=void 0,(!o||o[0]!==e.multiple||!Oc(t,o[1],o[0]))&&fa(e,t)}};function Oc(e,t,o){if(!o)return Nt(e,t);if(ge(e))return Nt(e,t);if(St(e)){if(e.size!==t.length)return!1;for(let i of t)if(!e.has(i))return!1;return!0}return!1}function fa(e,t){let o=e.multiple,i=ge(t);if(!(o&&!i&&!St(t))){for(let s=0,r=e.options.length;s<r;s++){let a=e.options[s],p=vo(a);if(o)if(i){let f=typeof p;f==="string"||f==="number"?a.selected=t.some(g=>String(g)===String(p)):a.selected=Do(t,p)>-1}else a.selected=t.has(p);else if(Nt(vo(a),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function vo(e){return"_value"in e?e._value:e.value}function ga(e,t){let o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}var Pc=["ctrl","shift","alt","meta"],Ic={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)=>Pc.some(o=>e[`${o}Key`]&&!t.includes(o))},le=(e,t)=>{if(!e)return e;let o=e._withMods||(e._withMods={}),i=t.join(".");return o[i]||(o[i]=((s,...r)=>{for(let a=0;a<t.length;a++){let p=Ic[t[a]];if(p&&p(s,t))return}return e(s,...r)}))},Mc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},yt=(e,t)=>{let o=e._withKeys||(e._withKeys={}),i=t.join(".");return o[i]||(o[i]=(s=>{if(!("key"in s))return;let r=Pt(s.key);if(t.some(a=>a===r||Mc[a]===r))return e(s)}))},Vc=je({patchProp:Dc},cc),ma;function qc(){return ma||(ma=Kr(Vc))}var ya=((...e)=>{let t=qc().createApp(...e),{mount:o}=t;return t.mount=i=>{let s=$c(i);if(!s)return;let r=t._component;!ke(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");let a=o(s,!1,Lc(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},t});function Lc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function $c(e){return $e(e)?document.querySelector(e):e}var vn=typeof document<"u";function wa(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Uc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&wa(e.default)}var Oe=Object.assign;function ts(e,t){let o={};for(let i in t){let s=t[i];o[i]=Ct(s)?s.map(e):e(s)}return o}var Pn=()=>{},Ct=Array.isArray;function si(e,t){let o={};for(let i in e)o[i]=i in t?t[i]:e[i];return o}var ka=/#/g,Fc=/&/g,Bc=/\//g,zc=/=/g,Hc=/\?/g,Ca=/\+/g,jc=/%5B/g,Gc=/%5D/g,Ea=/%5E/g,Wc=/%60/g,Sa=/%7B/g,Kc=/%7C/g,Na=/%7D/g,Yc=/%20/g;function ii(e){return e==null?"":encodeURI(""+e).replace(Kc,"|").replace(jc,"[").replace(Gc,"]")}function Ra(e){return ii(e).replace(Sa,"{").replace(Na,"}").replace(Ea,"^")}function ni(e){return ii(e).replace(Ca,"%2B").replace(Yc,"+").replace(ka,"%23").replace(Fc,"%26").replace(Wc,"`").replace(Sa,"{").replace(Na,"}").replace(Ea,"^")}function Jc(e){return ni(e).replace(zc,"%3D")}function Qc(e){return iLine truncated
${JSON.stringify(e)}${t?`
while being at
`+JSON.stringify(t):""}`},[Be.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${np(t)}" via a navigation guard.`},[Be.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[Be.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[Be.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function hn(e,t){return Oe(new Error,{type:e,[Ma]:!0},t)}function Ht(e,t){return e instanceof Error&&Ma in e&&(t==null||!!(e.type&t))}var tp=["params","query","hash"];function np(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of tp)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function Va(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<o.length;++i){let s=o[i].replace(ka," "),r=s.indexOf("="),a=On(r<0?s:s.slice(0,r)),p=r<0?null:On(s.slice(r+1));if(a in t){let f=t[a];Ct(f)||(f=t[a]=[f]),f.push(p)}else t[a]=p}return t}function di(e){let t="";for(let o in e){let i=e[o];if(o=Wc(o),i==null){i!==void 0&&(t+=(t.length?"&":"")+o);continue}(Ct(i)?i.map(s=>s&&ti(s)):[i&&ti(i)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+o,s!=null&&(t+="="+s))})}return t}function qa(e){let t={};for(let o in e){let i=e[o];i!==void 0&&(t[o]=Ct(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return t}var La=Symbol(""),ui=Symbol(""),ss=Symbol(""),is=Symbol(""),rs=Symbol("");function In(){let e=[];function t(i){return e.push(i),()=>{let s=e.indexOf(i);s>-1&&e.splice(s,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Xt(e,t,o,i,s,r=a=>a()){let a=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((p,f)=>{let y=m=>{m===!1?f(hn(Be.NAVIGATION_ABORTED,{from:o,to:t})):m instanceof Error?f(m):ep(m)?f(hn(Be.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&i.enterCallbacks[s]===a&&typeof m=="function"&&a.push(m),p())},b=r(()=>e.call(i&&i.instances[s],t,o,y)),w=Promise.resolve(b);e.length<3&&(w=w.then(y)),w.catch(m=>f(m))})}function as(e,t,o,i,s=r=>r()){let r=[];for(let a of e)for(let p in a.components){let f=a.components[p];if(!(t!=="beforeRouteEnter"&&!a.instances[p]))if(ba(f)){let y=(f.__vccOpts||f)[t];y&&r.push(Xt(y,o,i,a,p,s))}else{let y=f();r.push(()=>y.then(b=>{if(!b)throw new Error(`Couldn't resolve component "${p}" at "${a.path}"`);let w=qc(b)?b.default:b;a.mods[p]=b,a.components[p]=w;let m=(w.__vccOpts||w)[t];return m&&Xt(m,o,i,a,p,s)()}))}}return r}function $a(e,t){let o=[],i=[],s=[],r=Math.max(t.matched.length,e.matched.length);for(let a=0;a<r;a++){let p=t.matched[a];p&&(e.matched.find(y=>mn(y,p))?i.push(p):o.push(p));let f=e.matched[a];f&&(t.matched.find(y=>mn(y,f))||s.push(f))}return[o,i,s]}var op=()=>location.protocol+"//"+location.host;function Ja(e,t){let{pathname:o,search:i,hash:s}=t,r=e.indexOf("#");if(r>-1){let a=s.includes(e.slice(r))?e.slice(r).length:1,p=s.slice(a);return p[0]!=="/"&&(p="/"+p),ii(p,"")}return ii(o,e)+i+s}function sp(e,t,o,i){let s=[],r=[],a=null,p=({state:m})=>{let E=Ja(e,location),I=o.value,C=t.value,v=0;if(m){if(o.value=E,t.value=m,a&&a===I){a=null;return}v=C?m.position-C.position:0}else i(E);s.forEach(S=>{S(o.value,I,{delta:v,type:ns.pop,direction:v?v>0?os.forward:os.back:os.unknown})})};function f(){a=o.value}function y(m){s.push(m);let E=()=>{let I=s.indexOf(m);I>-1&&s.splice(I,1)};return r.push(E),E}function b(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Oe({},m.state,{scroll:go()}),"")}}function w(){for(let m of r)m();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",b),document.removeEventListener("visibilitychange",b)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",b),document.addEventListener("visibilitychange",b),{pauseListeners:f,listen:y,destroy:w}}function Ua(e,t,o,i=!1,s=!1){return{back:e,current:t,forward:o,replaced:i,position:window.history.length,scroll:s?go():null}}function ip(e){let{history:t,location:o}=window,i={value:Ja(e,o)},s={value:t.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(f,y,b){let w=e.indexOf("#"),m=w>-1?(o.host&&document.querySelector("base")?e:e.slice(w))+f:op()+e+f;try{t[b?"replaceState":"pushState"](y,"",m),s.value=y}catch(E){console.error(E),o[b?"replace":"assign"](m)}}function a(f,y){r(f,Oe({},t.state,Ua(s.value.back,f,s.value.forward,!0),y,{position:s.value.position}),!0),i.value=f}function p(f,y){let b=Oe({},s.value,t.state,{forward:f,scroll:go()});r(b.current,b,!0),r(f,Oe({},Ua(i.value,f,null),{position:b.position+1},y),!1),i.value=f}return{location:i,state:s,push:p,replace:a}}function Qa(e){e=_a(e);let t=ip(e),o=sp(e,t.state,t.location,t.replace);function i(r,a=!0){a||o.pauseListeners(),history.go(r)}let s=Oe({locatLine truncated
`)),e.options=Object.assign({},e.options,b.options),a.restore()})}p();let f=null;e.saveDefault=y=>{if(y&&y.preventDefault&&y.preventDefault(),e.saving)return;let b=a.checkpoint(),w={terms:e.terms.split(`
`).map(m=>m.trim()).filter(m=>m.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",w).then(()=>{a.accept(b),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",f&&i.cancel(f),f=i(()=>{e.message=null},2500)},m=>{e.saving=!1;let E=m&&m.data&&m.data.error,I="Unable to save your defaults. Please try again.";Promise.all([o("ERRORS."+E),o("ERRORS.unknown_error")]).then(([C,v])=>{e.error=E&&C!==v?C:I},()=>{e.error=I})})},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."}))}},ll=function(e,t,o){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{o.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},dl=function(e,t,o,i,s){e.user&&!e.user.status&&o.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&o.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,f){let y={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(y===void 0)return;p.preventDefault();let b=e.features.length,w=y==="first"?0:y==="last"?b-1:(f+y+b)%b;e.feature=e.features[w].key,s(()=>{let m=i.document.getElementById("feature-tab-"+e.feature);m&&m.focus()})},e.demoText=`# DeepLearnUtils
`+JSON.stringify(t):""}`},[Be.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${ip(t)}" via a navigation guard.`},[Be.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[Be.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[Be.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function hn(e,t){return Oe(new Error,{type:e,[Va]:!0},t)}function Ht(e,t){return e instanceof Error&&Va in e&&(t==null||!!(e.type&t))}var sp=["params","query","hash"];function ip(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of sp)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function qa(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<o.length;++i){let s=o[i].replace(Ca," "),r=s.indexOf("="),a=On(r<0?s:s.slice(0,r)),p=r<0?null:On(s.slice(r+1));if(a in t){let f=t[a];Ct(f)||(f=t[a]=[f]),f.push(p)}else t[a]=p}return t}function ui(e){let t="";for(let o in e){let i=e[o];if(o=Jc(o),i==null){i!==void 0&&(t+=(t.length?"&":"")+o);continue}(Ct(i)?i.map(s=>s&&ni(s)):[i&&ni(i)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+o,s!=null&&(t+="="+s))})}return t}function La(e){let t={};for(let o in e){let i=e[o];i!==void 0&&(t[o]=Ct(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return t}var $a=Symbol(""),ci=Symbol(""),is=Symbol(""),rs=Symbol(""),as=Symbol("");function In(){let e=[];function t(i){return e.push(i),()=>{let s=e.indexOf(i);s>-1&&e.splice(s,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Xt(e,t,o,i,s,r=a=>a()){let a=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((p,f)=>{let g=m=>{m===!1?f(hn(Be.NAVIGATION_ABORTED,{from:o,to:t})):m instanceof Error?f(m):op(m)?f(hn(Be.NAVIGATION_GUARD_REDIRECT,{from:t,to:m})):(a&&i.enterCallbacks[s]===a&&typeof m=="function"&&a.push(m),p())},y=r(()=>e.call(i&&i.instances[s],t,o,g)),b=Promise.resolve(y);e.length<3&&(b=b.then(g)),b.catch(m=>f(m))})}function ls(e,t,o,i,s=r=>r()){let r=[];for(let a of e)for(let p in a.components){let f=a.components[p];if(!(t!=="beforeRouteEnter"&&!a.instances[p]))if(wa(f)){let g=(f.__vccOpts||f)[t];g&&r.push(Xt(g,o,i,a,p,s))}else{let g=f();r.push(()=>g.then(y=>{if(!y)throw new Error(`Couldn't resolve component "${p}" at "${a.path}"`);let b=Uc(y)?y.default:y;a.mods[p]=y,a.components[p]=b;let m=(b.__vccOpts||b)[t];return m&&Xt(m,o,i,a,p,s)()}))}}return r}function Ua(e,t){let o=[],i=[],s=[],r=Math.max(t.matched.length,e.matched.length);for(let a=0;a<r;a++){let p=t.matched[a];p&&(e.matched.find(g=>mn(g,p))?i.push(p):o.push(p));let f=e.matched[a];f&&(t.matched.find(g=>mn(g,f))||s.push(f))}return[o,i,s]}var rp=()=>location.protocol+"//"+location.host;function Qa(e,t){let{pathname:o,search:i,hash:s}=t,r=e.indexOf("#");if(r>-1){let a=s.includes(e.slice(r))?e.slice(r).length:1,p=s.slice(a);return p[0]!=="/"&&(p="/"+p),ri(p,"")}return ri(o,e)+i+s}function ap(e,t,o,i){let s=[],r=[],a=null,p=({state:m})=>{let E=Qa(e,location),P=o.value,k=t.value,v=0;if(m){if(o.value=E,t.value=m,a&&a===P){a=null;return}v=k?m.position-k.position:0}else i(E);s.forEach(S=>{S(o.value,P,{delta:v,type:os.pop,direction:v?v>0?ss.forward:ss.back:ss.unknown})})};function f(){a=o.value}function g(m){s.push(m);let E=()=>{let P=s.indexOf(m);P>-1&&s.splice(P,1)};return r.push(E),E}function y(){if(document.visibilityState==="hidden"){let{history:m}=window;if(!m.state)return;m.replaceState(Oe({},m.state,{scroll:go()}),"")}}function b(){for(let m of r)m();r=[],window.removeEventListener("popstate",p),window.removeEventListener("pagehide",y),document.removeEventListener("visibilitychange",y)}return window.addEventListener("popstate",p),window.addEventListener("pagehide",y),document.addEventListener("visibilitychange",y),{pauseListeners:f,listen:g,destroy:b}}function Fa(e,t,o,i=!1,s=!1){return{back:e,current:t,forward:o,replaced:i,position:window.history.length,scroll:s?go():null}}function lp(e){let{history:t,location:o}=window,i={value:Qa(e,o)},s={value:t.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(f,g,y){let b=e.indexOf("#"),m=b>-1?(o.host&&document.querySelector("base")?e:e.slice(b))+f:rp()+e+f;try{t[y?"replaceState":"pushState"](g,"",m),s.value=g}catch(E){console.error(E),o[y?"replace":"assign"](m)}}function a(f,g){r(f,Oe({},t.state,Fa(s.value.back,f,s.value.forward,!0),g,{position:s.value.position}),!0),i.value=f}function p(f,g){let y=Oe({},s.value,t.state,{forward:f,scroll:go()});r(y.current,y,!0),r(f,Oe({},Fa(i.value,f,null),{position:y.position+1},g),!1),i.value=f}return{location:i,state:s,push:p,replace:a}}function Xa(e){e=Aa(e);let t=lp(e),o=ap(e,t.state,t.location,t.replace);function i(r,a=!0){a||o.pauseListeners(),history.go(r)}let s=Oe({locatLine truncated
`)),e.options=Object.assign({},e.options,y.options),a.restore()})}p();let f=null;e.saveDefault=g=>{if(g&&g.preventDefault&&g.preventDefault(),e.saving)return;let y=a.checkpoint(),b={terms:e.terms.split(`
`).map(m=>m.trim()).filter(m=>m.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",b).then(()=>{a.accept(y),e.saving=!1,e.message=e.unsavedChanges?null:"Saved",f&&i.cancel(f),f=i(()=>{e.message=null},2500)},m=>{e.saving=!1;let E=m&&m.data&&m.data.error,P="Unable to save your defaults. Please try again.";Promise.all([o("ERRORS."+E),o("ERRORS.unknown_error")]).then(([k,v])=>{e.error=E&&k!==v?k:P},()=>{e.error=P})})},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."}))}},cl=function(e,t,o){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(i=>{o.url("/dashboard")},i=>{e.error=i.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},pl=function(e,t,o,i,s){e.user&&!e.user.status&&o.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&o.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(p){e.feature=p},e.featureHref=function(p){return p.needsUser&&!e.user?"/signin":p.href},e.featureTarget=function(p){return p.needsUser&&!e.user?"_self":p.target||void 0},e.featureKeydown=function(p,f){let g={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[p.key];if(g===void 0)return;p.preventDefault();let y=e.features.length,b=g==="first"?0:g==="last"?y-1:(f+g+y)%y;e.feature=e.features[b].key,s(()=>{let m=i.document.getElementById("feature-tab-"+e.feature);m&&m.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 p=(e.demoTerms||"").split(/[,\n]/).map(m=>m.trim()).filter(Boolean).sort((m,E)=>E.length-m.length),f=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let y=new RegExp("("+p.map(f).join("|")+")","gi"),b={},w=0;return(e.demoText||"").split(y).filter(m=>m!=="").map(m=>{let E=p.find(I=>I.toLowerCase()===m.toLowerCase());return E?(b[E.toLowerCase()]||(b[E.toLowerCase()]=++w),{text:String(b[E.toLowerCase()]),redacted:!0,original:m}):{text:m}})},e.demoCount=()=>e.demoParts().filter(p=>p.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"}];function r(){t.get("/api/stat/").then(p=>{e.stat=p.data,e.cards[0].total=p.data.nbRepositories,e.cards[1].total=p.data.nbUsers,e.cards[2].total=p.data.nbPageViews,e.cards[3].total=p.data.nbPullRequests}).catch(()=>{})}r();function a(p){let f={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return f;let y=new Array(p.length-1);for(let C=1;C<p.length;C++)y[C-1]=p[C]-p[C-1];let b=y.length,w=Math.max.apply(null,y),m=Math.min.apply(null,y),E=Math.min(0,m),I=w-E||1;f.viewW=b*2,f.bars=new Array(b);for(let C=0;C<b;C++){let v=(y[C]-E)/I,S=Math.max(1.5,v*34);f.bars[C]={x:(C*2+.25).toFixed(2),y:(36-S).toFixed(2),w:"1.5",h:S.toFixed(2)}}if(f.deltaToday=y[b-1],b>=2){let C=y[b-2];C&&(f.pctChange=(f.deltaToday-C)/C*100)}return f.pctAbs=Math.round(Math.abs(f.pctChange)),f.isUp=f.pctChange>=0,f}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(p=>{let f=p.data||[];e.history={repositories:a(f.map(y=>y.nbRepositories||0)),users:a(f.map(y=>y.nbUsers||0)),pageViews:a(f.map(y=>y.nbPageViews||0)),pullRequests:a(f.map(y=>y.nbPullRequests||0))}}).catch(()=>{})},ul=function(e,t,o,i,s,r){let a=ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,je(()=>document.querySelector(".dashboard-quota > summary")?.focus())},xt()(document,"click",R=>{e.quotaExpanded&&!R.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=R=>R.status==="error"||R._broken||f(R.status)==="progress"&&R._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=R=>{e.projectView=R,R==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.projectDetailsId=R=>"project-details-"+encodeURIComponent(R._type+":"+(R._id||R._source||"unknown")),e.showProjectDetails=async R=>{e.selectedProject=R,e.projectName=R.projectName||"",e.nameError="",e.nameMessage="",await je();let Q=document.getElementById(e.projectDetailsId(R));Q?.focus(),Q?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=R=>{e.selectedProject=null,je(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(R._type+":"+R._id)}"]`)?.focus())},e.saveProjectName=async R=>{if(e.nameSaving||!R._id)return;let Q=e.projectName.trim();if(Q.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let ne=await t.post("/api/user/project-name",{type:R._type,id:R._id,name:Q});R.projectName=ne.data.name,R._label=R.projectName||R._fallbackLabel,e.selectedProject===R&&(e.nameMessage=Q?"Project name saved.":"Default project name restored."),D||(e.dashboardCursor=null,await F(),e.selectedProject===R&&(e.selectedProject=e.items.find(ve=>ve._type===R._type&&ve._id===R._id)||null))}catch{e.selectedProject===R&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async R=>{if(!R._viewUrl||e.copyingId)return;let Q=new URL(R._viewUrl,s.location.origin).href;e.copyingId=R._type+":"+R._id;try{await sl(Q),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:Q})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"In progress",error:"Error",expired:"Expired",removed:"Removed"};let p=["queue","download","downloaded","preparing","anonymizing"];function f(R){return R==="ready"||R==="error"?R:R==="expired"||R==="expiring"?"expired":R==="removed"||R==="removing"?"removed":(p.indexOf(R)>-1,"progress")}let y=7200*1e3,b="dashboard.filterPrefs",w={typeFilter:"all",filters:{status:{ready:!0,progress:!0,error:!0,e Line truncated
`)),e.options=Object.assign({},e.options,A.options),e.options.expirationDate=A.options&&A.options.expirationDate?new Date(A.options.expirationDate):G(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),g&&g()})}function ee(g,_,A){e.anonymize&&e.anonymize[g]&&e.anonymize[g].setValidity(_,A)}function de(g){try{let _=parseGithubUrl(g);if(_&&_.owner&&_.repo)return _.owner+"/"+_.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"||de(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let g=m();try{let _=await t.get("/github/connections");if(e.githubConnections=_.data,!_.data.appEnabled)return;let A=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":_.data.csrf}});if(!w(g))return;e.error=null,A.data.fullName&&(e._originalFullName=A.data.fullName,e.source.fullName=A.data.fullName,e.sourceUrl="https://github.com/"+A.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{w(g)&&(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,E(g)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await ye()}catch{}}};function he(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:de(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function ke(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function be(){let g=new URLSearchParams(window.location.search).get("billingDraft");if(g){v.restore();try{let A=(await t.get("/api/billing/draft/"+encodeURIComponent(g))).data;if(A.path!==s.path())throw new Error("Wrong task");S=A.values.conference||null;for(let P of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(A.values,P)&&(e[P]=A.values[P]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),D=A.id,V=JSON.stringify(v.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await ke(),s.replace?.(s.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let _;try{_=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!_||_.path!==s.path()||Date.now()-_.savedAt>=30*6e4)return v.restore()?(e.sourceUrl&&await ke(),!0):!1;v.restore();for(let A of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(_.draft,A)&&(e[A]=_.draft[A]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await ke(),sessionStorage.removeItem("github-access-draft"),!0}ve(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&a(be,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async g=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(g.data.status),e.githubConnection=g.data.connection||"oauth",e.sourceUrl="https://github.com/"+g.data.source.fullName,e._originalFullName=g.data.source.fullName,e.terms=g.data.options.terms.filter(_=>_).join(`
`),e.source=g.data.source,e.role=g.data.role||"owner",e._existingNever=g.data.options.expirationMode==="never",e.coauthors=g.data.coauthors||[],e._originalBranch=g.data.source.branch,e.options=Object.assign({},e.options,g.data.options),e.conference=g.data.conference,e._originalConference=g.data.conference,e.repositoryID=g.data.source.repositoryID,e._originalRepositoryID=g.data.source.repositoryID,g.data.options.expirationDate&&(e.options.expirationDate=new Date(g.data.options.expirationDate)),I=C(parseGithubUrl(e.sourceUrl)),!await be()&&(await Promise.all([ye(),qe()]),Ie())},()=>{s.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async g=>{if(e.githubConnection=g.data.connection||"oauth",e.sourceUrl="https://github.com/"+g.data.source.repositoryFullName+"/pull/"+g.data.source.pullRequestId,e.terms=g.data.options.terms.filter(_=>_).join(`
`),e.source=g.data.source,e.options=Object.assign({},e.options,g.data.options),e.conference=g.data.conference,e._originalConference=g.data.conference,g.data.options.expirationDate&&(e.options.expirationDate=new Date(g.data.options.expirationDate)),I=C(parseGithubUrl(e.sourceUrl)),!await be())try{await z()}catch{}},()=>{s.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async g=>{e.sourceUrl="https://gist.github.com/"+g.data.source.gistId,e.terms=g.data.options.terms.filter(_=>_).join(`
`),e.source=g.data.source,e.options=Object.assign({},e.options,g.data.options),e.conference=g.data.conference,e._originalConference=g.data.conference,g.data.options.expirationDate&&(e.options.expirationDate=new Date(g.data.options.expirationDate)),I=C(parseGithubUrl(e.sourceUrl)),!await be()&&await X()},()=>{s.url("/404")}))}),t.get("/github/connections").then(g=>{e.githubConnections=g.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&g.data.appEnabled&&g.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&ke())}).catch(()=>{}),e.urlSelected=async(g=!1)=>{let _=++f;e.previousConfigurations=[],e.previousConfigurationId="";let A;try{A=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Ve.cancel(),M.cancel(),re.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",ee("sourceUrl","github",!1);return}let P=C(A),U=g||I===P;I=P,e.sourceUrlError="",ee("sourceUrl","github",!0);let B=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let se=window.document.getElementById("sourceUrl");if(se){try{se.setSelectionRange(0,0)}catch{}se.scrollLeft=0}},50),B&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!U&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],U||(e.source={type:"GitHubStream",branch:"",commit:""}),Ve.cancel(),M.cancel(),re.cancel(),J.clear(),K.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=U;try{A.gistId&&!A.repo?(e.detectedType="gist",e.source={gistId:A.gistId},await X()):A.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:A.owner+"/"+A.repo,pullRequestId:A.pullRequestId},await z()):(e.detectedType="repo",ne(),await Promise.all([ye(),qe()]),Ie())}catch{}finally{_===f&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let g=e.branches.filter(A=>A.name==e.source.branch)[0];if(!g)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=g.commit),e.readme=g.readme,await qe(),Ie()}),e.getBranches=async g=>{let _=parseGithubUrl(e.sourceUrl),A=m();try{let P=await t.get(`/api/repo/${_.owner}/${_.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&de(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:g===!0||e.reconnectingSource?"1":"0",repositoryID:he()}});if(!w(A))return;e.branches=P.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let U=e.branches.filter(B=>B.name==e.source.branch);U.length>0&&(!(!e.reconnectingSource&&!g&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=U[0].commit),e.readme=U[0].readme,await qe(g))}catch(P){if(!w(A))return;e.branches=[],e.sourceUnreachable=P&&(P.status===404||P.data&&P.data.error==="repo_not_found");let U=P&&P.data&&P.data.error||(P&&P.status===404?"repo_not_found":"unknown_error");r("ERRORS."+U).then(B=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:B}),e.error=B},console.error),typeof ee=="function"&&ee("sourceUrl","missing",!1)}finally{E(A)}};async function ye(){let g=parseGithubUrl(e.sourceUrl),_=m();try{N();let A=await t.get(`/api/repo/${g.owner}/${g.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&de(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:he(),force:"1"}});if(!w(_))return;e.details=A.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(A){if(!w(_))return;throw A.data&&(r("ERRORS."+A.data.error).then(P=>{e.addToast({title:"Error",date:new Date,body:P}),e.error=P},console.error),H(A.data.error)),ee("sourceUrl","missing",!1),A}finally{E(_)}}async function qe(g){if(e.readme&&!g)return e.readme;let _=parseGithubUrl(e.sourceUrl),A=m();try{let P=await t.get(`/api/repo/${_.owner}/${_.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&de(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:g===!0?"1":"0",branch:e.source.branch,repositoryID:he()}});w(A,!0)&&(e.readme=P.data)}catch{w(A,!0)&&(e.readme="")}finally{E(A)}}function ze(){let g={terms:e.terms?e.terms.split(`
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(g.branchName=e.source.branch);try{let _=parseGithubUrl(e.sourceUrl);g.repoName=`${_.owner}/${_.repo}`}catch{}return g}function We(g,_,A){let P=null,U=0,B=()=>{if(e.detectedType!==g)return;P&&a.cancel(P);let se=++U;e.previewStatus="loading",P=a(()=>{P=null;let x=_();if(!x){e.previewStatus="idle";return}t.post("/api/anonymize-preview",x).then(le=>{se===U&&(A(le.data,x),e.previewStatus="ready")}).catch(()=>{se===U&&(e.previewStatus="error")})},200)};return B.cancel=()=>{U++,P&&a.cancel(P),P=null},e.on("dispose",B.cancel),B}e.retryPreview=()=>{e.detectedType==="repo"&&Ve(),e.detectedType==="pr"&&M(),e.detectedType==="gist"&&re()};let Ve=We("repo",()=>e.readme?{content:e.readme,options:ze()}:null,g=>{if(typeof g?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=g.content;let _="";try{let P=parseGithubUrl(e.sourceUrl),U=e.source.branch||e.details&&e.details.defaultBranch||"main";_=`https://github.com/${P.owner}/${P.repo}/raw/${U}/`}catch{}let A=renderMD(e.anonymize_readme,_);e.html_readme=A,a(Prism.highlightAll,150)});function Ie(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),Ve())}async function z(){let g=parseGithubUrl(e.sourceUrl),_=m();try{N();let A=await t.get(`/api/pr/${g.owner}/${g.repo}/${g.pullRequestId}`,{params:{connection:e.githubConnection}});if(!w(_))return;e.details=A.data,e.pullRequestId||(e.pullRequestId=g.repo+"-PR"+g.pullRequestId+"-"+generateRandomId(4))}catch(A){if(!w(_))return;throw A.data&&(r("ERRORS."+A.data.error).then(P=>{e.addToast({title:"Error",date:new Date,body:P}),e.error=P},console.error),H(A.data.error)),ee("sourceUrl","missing",!1),A}finally{E(_)}}let J=Ue(new Map);function Y(){let g=new Set,_=e.details&&e.details.pullRequest;if(!_)return g;typeof _.title=="string"&&g.add(_.title),typeof _.body=="string"&&g.add(_.body),typeof _.diff=="string"&&g.add(_.diff);let A=_.comments||[];for(let P of A)typeof P.author=="string"&&g.add(P.author),typeof P.body=="string"&&g.add(P.body);return g}let M=We("pr",()=>{let g=Y(),_=Array.from(g);return _.length===0?null:{contents:_,options:ze()}},(g,_)=>{if(!Array.isArray(g?.contents)||g.contents.length!==_.contents.length||g.contents.some(U=>typeof U!="string"))throw Error("Invalid preview response");let A=_.contents,P=new Map;for(let U=0;U<A.length&&U<g.contents.length;U++)P.set(A[U],g.contents[U]);J.clear(),P.forEach((U,B)=>J.set(B,U))});e.anonymizePrContent=function(g){return g&&(J.has(g)?J.get(g):"")};async function X(){let g=parseGithubUrl(e.sourceUrl),_=m();try{N(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let A=await t.get(`/api/gist/source/${g.gistId}`);if(!w(_))return;e.details=A.data,e.gistId||(e.gistId="gist-"+g.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(A){if(!w(_))return;if(A.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,ee("sourceUrl","missing",!1);return}if(A.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,ee("sourceUrl","missing",!1);return}throw A.data&&(r("ERRORS."+A.data.error).then(P=>{e.addToast({title:"Error",date:new Date,body:P}),e.error=P},console.error),H(A.data.error)),ee("sourceUrl","missing",!1),A}finally{E(_)}}let K=Ue(new Map);function j(){let g=new Set,_=e.details&&e.details.gist;if(!_)return g;typeof _.description=="string"&&g.add(_.description),typeof _.ownerLogin=="string"&&g.add(_.ownerLogin);let A=_.files||[];for(let U of A)typeof U.filename=="string"&&g.add(U.filename),typeof U.content=="string"&&g.add(U.content);let P=_.comments||[];for(let U of P)typeof U.author=="string"&&g.add(U.author),typeof U.body=="string"&&g.add(U.body);return g}let re=We("gist",()=>{let g=j(),_=Array.from(g);return _.length===0?null:{contents:_,options:ze()}},(g,_)=>{if(!Array.isArray(g?.contents)||g.contents.length!==_.contents.length||g.contents.some(U=>typeof U!="string"))throw Error("Invalid preview response");let A=_.contents,P=new Map;for(let U=0;U<A.length&&U<g.contents.length;U++)P.set(A[U],g.contents[U]);K.clear(),P.forEach((U,B)=>K.set(B,U)),ce()});e.anonymizeGistContent=function(g){return g&&(K.has(g)?K.get(g):"")},e.previewGistFiles=[];function ce(){let g=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=g.map(_=>({filename:e.anonymizeGistContent(_.filename),content:e.anonymizeGistContent(_.content),language:_.language}))}e.watch("details.gist.files",ce,!0),e.watch("terms",ce);function k(){let g=e.conference;if(e.conference_data=null,!g)return;let _=g===S||e.isUpdate&&g===e._originalConference;g!==S&&(S=null),t.get("/api/conferences/"+g).then(A=>{e.conference===g&&(e.conference_data=A.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!_&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.opti Line truncated
`).filter(B=>B),connection:e.githubConnection,fullName:`${A.owner}/${A.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(P.options.pageSource=e.details.pageSource),N();let U=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(U,P,{headers:{"Content-Type":"application/json"}}).then(()=>{v.clear(),window.location.href="/status/"+e.repoId},B=>{B.data&&(r("ERRORS."+B.data.error).then(se=>{e.error=se},console.error),H(B.data.error),["quota_exceeded","subscription_required_for_never_expiration"].includes(B.data.error)&&(B.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,je(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}))))}).finally(()=>{_.disabled=!1})},e.anonymizeGist=g=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(q())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let _=g.currentTarget||g.target.closest?.("button")||g.target;_.disabled=!0;let A=parseGithubUrl(e.sourceUrl),P={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(B=>B),source:{gistId:A.gistId},options:e.options,conference:e.conference};N();let U=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(U,P,{headers:{"Content-Type":"application/json"}}).then(()=>{v.clear(),window.location.href="/gist/"+e.gistId},B=>{B.data&&(r("ERRORS."+B.data.error).then(se=>{e.error=se},console.error),H(B.data.error))}).finally(()=>{_.disabled=!1})},e.anonymizePullRequest=g=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(q())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let _=g.currentTarget||g.target.closest?.("button")||g.target;_.disabled=!0;let A=parseGithubUrl(e.sourceUrl),P={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(B=>B),source:{repositoryFullName:`${A.owner}/${A.repo}`,pullRequestId:A.pullRequestId},options:e.options,conference:e.conference};N();let U=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(U,P,{headers:{"Content-Type":"application/json"}}).then(()=>{v.clear(),window.location.href="/pr/"+e.pullRequestId},B=>{B.data&&(r("ERRORS."+B.data.error).then(se=>{e.error=se},console.error),H(B.data.error))}).finally(()=>{_.disabled=!1})},e.watch("conference",()=>{k()}),e.watch("terms",()=>{e.detectedType==="repo"&&Ie(),e.detectedType==="pr"&&M(),e.detectedType==="gist"&&re()}),e.watch("options.image",()=>{e.detectedType==="repo"&&Ie(),e.detectedType==="pr"&&M(),e.detectedType==="gist"&&re()}),e.watch("options.link",()=>{e.detectedType==="repo"&&Ie(),e.detectedType==="pr"&&M(),e.detectedType==="gist"&&re()}),e.watch("details",()=>{e.detectedType==="pr"&&M(),e.detectedType==="gist"&&re()},!0)},vi=function(e,t,o,i,s,r){let a=ct();window.Prism?.hooks&&!window.Prism.redactionHook&&(window.Prism.hooks.add("complete",z=>{nl(z.element),z.element.querySelectorAll?.("mark.redaction").forEach(J=>{let Y=/^XXXX-(\d+)$/.exec(J.textContent);if(!Y)return;J.className="redact-chip",J.setAttribute("title","Redacted term "+Y[1]+" \u2014 the same term everywhere in this snapshot"),J.setAttribute("aria-label","Redacted term "+Y[1]),J.dataset.term=Y[0],J.textContent="";let M=J.ownerDocument.createElement("i");M.textContent=Y[1],J.appendChild(M)})}),window.Prism.redactionHook=!0);let p=xt();e.on("dark-mode",(z,J)=>{e.aceOption&&(J?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let f=0,y=null,b=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function w(){y&&(y.resolve(),y=null),b&&(a.timeout.cancel(b),b=null)}let m=!1;e.on("dispose",()=>{m=!0,f++,w(),E&&E.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,p(document,"click",z=>{e.symbolsOpen&&!z.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!z.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!z.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.accountOpen&&!z.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!z.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",z=>{z.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(z.ctrlKey||z.metaKey)&&!z.altKey&&z.key&&z.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(z.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(z){if((z.metaKey||z.ctrlKey)&&z.key==="k"){z.preventDefault();var J=document.querySelector(".tree-search-input");J&&(J.focus(),J.select())}});var E=null;e.onFileSearchChange=function(){E&&(E.resolve(),E=null);let z=e.fileSearchQuery;if(!z||z.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let J=r.defer();E=J,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(z)}`,{timeout:J.promise}).then(function(Y){if(!(m||E!==J)){E=null,e.fileSearchLoading=!1;var M={};e.files.forEach(function(U){M[(U.path||"")+"/"+U.name]=!0});for(var X=[],K={},j=0;j<Y.data.length;j++){var re=Y.data[j];if(re.path)for(var ce=re.path.split("/"),k="",N=0;N<ce.length;N++){var q=k;k=k?k+"/"+ce[N]:ce[N];var H=q+"/"+ce[N];!M[H]&&!K[H]&&(K[H]=!0,X.push({name:ce[N],path:q}))}}X.sort(function(U,B){return(U.path||"").split("/").length-(B.path||"").split("/").length}),X.length>0&&e.files.push.apply(e.files,X);for(var g=[],_=0;_<Y.data.length;_++){var A=Y.data[_],P=(A.path||"")+"/"+A.name;!M[P]&&A.size!=null&&(g.push(A),M[P]=!0)}g.length>0&&e.files.push.apply(e.files,g),e.fileSearchResults=Y.data}},function(){!m&&E===J&&(E=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let I={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},C=["license","txt"],v=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],S=["wav","mp3","ogg","wma","flac","aac","m4a"],D=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(z,J){if(e.repoId!=i.repoId)return Ie();if((i.path||"")!=e.filePath){e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(Y=>Y&&Y.trim().length>0),Ve();for(let Y=0;Y<e.paths.length-1;Y++){let M=Y>0?e.paths.slice(0,Y).join("/"):"";e.files.some(K=>K.path===M)||e.getFiles(M)}}});function V(){if(e.paths[0]!="")return;let z=["readme.md","readme.txt","readme.org","readme.1st","readme"],J={};for(let M of e.files)M.name.toLowerCase().indexOf("readme")>-1&&(J[M.name.toLowerCase()]=M.name);let Y=null;for(let M of z)if(J[M]){Y=M;break}if(!Y&&Object.keys(J).length>0&&(Y=Object.keys(J)[0]),Y){let M=o.url();M[M.length-1]!="/"&&(M+="/"),o.url(M+encodePathForUrl(J[Y]))}}e.fileCounts=null;let F=0,L=new Set,G=!1;e.getFiles=function(z,J=!1){let Y=e.repoId,M=F;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURICompoLine truncated
`).forEach((J,Y)=>{for(let[M,X]of de){let K=M.exec(J);if(K&&!/^(if|for|while|switch|return|catch)$/.test(K[1])){z.push({name:K[1],kind:X,line:Y+1});break}}}),he={content:e.content,list:z.slice(0,300)},he.list},e.goToSymbol=function(z){e.symbolsOpen=!1;let J=e.codeEditor;J&&(J.scrollToLine(z-1,!0,!0,()=>{}),J.gotoLine(z,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+z),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){let z=e.codeEditor;z&&(z.focus(),z.execCommand("gotoline"))},e.rootEntries=function(){return[...e.files||[]].sort((z,J)=>{let Y=z.size==null,M=J.size==null;return Y!==M?Y?-1:1:z.name.localeCompare(J.name)})},e.formatSize=function(z){if(z==null)return"";if(z<1024)return z+" B";let J=z/1024;return J<1024?J.toFixed(1)+" KB":(J/1024).toFixed(1)+" MB"},e.fileSize=function(z){if(!z)return null;let J=z.replace(/^\/+/,""),Y=(e.files||[]).find(M=>(M.path?M.path+"/":"")+M.name===J);return Y&&Y.size!=null?Y.size:null},e.revealFolder=function(z){e.sidebarHidden=!1,e.sidebarCollapsed=!1,je(()=>{let J=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(z):z)+'"]');J&&(J.closest("li")?.classList.contains("open")||J.click(),J.scrollIntoView({block:"nearest"}),J.focus())})};let ke=/\bXXXX-\d+\b/g;e.redactionCount=function(){return typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(ke)||[]).length},e.renderRedacted=function(z){if(!z||z.indexOf("XXXX-")===-1||typeof window.DOMParser!="function")return z;let J=new window.DOMParser().parseFromString("<div>"+z+"</div>","text/html"),Y=J.createTreeWalker(J.body,4),M=[];for(;Y.nextNode();)ke.lastIndex=0,!Y.currentNode.parentElement?.closest("pre code")&&ke.test(Y.currentNode.nodeValue)&&M.push(Y.currentNode);for(let X of M){ke.lastIndex=0;let K=J.createDocumentFragment(),j=0,re,ce=X.nodeValue;for(;re=ke.exec(ce);){K.appendChild(J.createTextNode(ce.slice(j,re.index)));let k=J.createElement("mark");k.className="redact-chip",k.setAttribute("title","Redacted term "+re[0].slice(5)+" \u2014 the same term everywhere in this snapshot");let N=re[0].slice(5);k.textContent="";let q=J.createElement("i");q.textContent=N,k.appendChild(q),k.dataset.term=re[0],k.setAttribute("aria-label","Redacted term "+N);let H=/^[.,;:!?)\]]+/.exec(ce.slice(re.index+re[0].length));if(H){let g=J.createElement("span");g.className="redact-glue",g.appendChild(k),g.appendChild(J.createTextNode(H[0])),K.appendChild(g),j=re.index+re[0].length+H[0].length}else K.appendChild(k),j=re.index+re[0].length}K.appendChild(J.createTextNode(ce.slice(j))),X.parentNode.replaceChild(K,X)}return J.body.firstChild.innerHTML};let be=z=>z.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(z){let J=e.renderRedacted(z);if(!J||typeof window.DOMParser!="function")return J;let Y=new window.DOMParser().parseFromString("<div>"+J+"</div>","text/html"),M={};return Y.querySelectorAll("h1, h2, h3").forEach(X=>{let K=X.id||be(X.textContent);M[K]?K+="-"+ ++M[K]:M[K]=1,X.id=K}),Y.body.firstChild.innerHTML};let ye={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(ye.content===e.content)return ye.list;let J=[...new window.DOMParser().parseFromString("<div>"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"</div>","text/html").querySelectorAll("h2, h3")].map(Y=>({id:Y.id,text:Y.textContent.trim(),level:Y.tagName==="H3"?3:2})).slice(0,40);return ye={content:e.content,list:J},J},e.activeHeading=null,p(window,"scroll",()=>{let z=e.readmeToc?e.readmeToc():[];if(!z.length)return;let J=150,Y="",M="";for(let X of z){let K=window.document.getElementById(X.id);if(!K)continue;let j=K.getBoundingClientRect().top;j<J?Y=X.id:!M&&j<window.innerHeight-80&&(M=X.id)}M&&(Y=M),e.activeHeading!==Y&&(e.activeHeading=Y)},{capture:!0,passive:!0}),e.scrollToHeading=function(z){if(!z){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let J=window.document.getElementById(z);J&&J.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=z},e.redactParts=function(z){let J=[],Y=0,M,X=/\bXXXX-(\d+)\b/g;for(z=String(z||"");M=X.exec(z);)M.index>Y&&J.push({t:z.slice(Y,M.index)}),J.push({n:M[1]}),Y=M.index+M[0].length;return Y<z.length&&J.push({t:z.slice(Y)}),J},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 z=e.content;if(e.type==="html"&&e.url)try{z=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(z),e.contentCopied=!0,s Line truncated
`+C.join(`
`)],{type:"text/csv"}),S=document.createElement("a");S.href=URL.createObjectURL(v),S.download=i.username+"-repositories.csv",S.click()},e.showStatusMessage=m=>{let E=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,E)},e.fetchGithubInfo=m=>{let E=window.open("","_blank");E&&E.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(I=>{E&&(E.document.open(),E.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(I.data,null,2).replace(/[<>]/g,C=>C==="<"?"&lt;":"&gt;")+"</pre>"),E.document.close())},I=>{let C=I&&I.data?JSON.stringify(I.data,null,2):String(I);E&&(E.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+C+"</pre>")})};function f(m){t.get("/api/admin/users/"+m+"/repos",{}).then(E=>{e.repositories=E.data},E=>{console.error(E)})}function y(m){t.get("/api/admin/users/"+m,{}).then(E=>{e.userInfo=E.data},E=>{console.error(E)})}y(i.username),f(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>y(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>y(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>y(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>y(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function b(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}b(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",b()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>b(),E=>console.error(E))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>f(i.username),E=>console.error(E))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>f(i.username),E=>console.error(E))},e.updateRepository=m=>{let E=Ue({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(E),t.post(`/api/repo/${m.repoId}/refresh`).then(I=>{I.data.status=="ready"?E.title=`${m.repoId} is refreshed.`:E.title=`Refreshing of ${m.repoId}.`},I=>{E.title=`Error during the refresh of ${m.repoId}.`,E.body=I.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(E=>{e.userInfo.repositories=E.data})};let w=null;e.watch("query",()=>{s.timeout.cancel(w),w=s.timeout(()=>{f(i.username)},500)},!0)},kl=function(e,t,o){let i=ct(),s=xt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=I=>{if(I.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){I.preventDefault();let C=document.querySelector('.admin-filter-toolbar input[type="search"]');C&&C.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=I=>{I==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[I]="",e.query.page=1},e.chips=[];let a=()=>{let I=[];(e.query.dateFrom||e.query.dateTo)&&I.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=I};e.statusCountFor=I=>{let C=(e.statusCounts||[]).find(v=>v._id===I);return C?C.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=I=>{e.query.sort===I?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=I,e.query.direction="desc"),e.query.page=1},e.sortIcon=I=>e.query.sort===I?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",f={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!1,error:!0,preparing:!0},y=loadFilterPrefs(p)||{};e.query=Object.assign({},f,y,{page:1,search:""});let b=o.search();b.search&&(e.query.search=b.search);let w="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(w)||"[]"),e.savePreset=()=>{let I=window.prompt("Preset name:");if(!I)return;let C=Object.assign({},e.query);delete C.page,e.presets=(e.presets||[]).filter(v=>v.name!==I),e.presets.push({name:I,query:C}),localStorage.setItem(w,JSON.stringify(e.presets))},e.applyPreset=I=>{Object.assign(e.query,I.query,{page:1})},e.deletePreset=I=>{e.presets=(e.presets||[]).filter(C=>C.name!==I.name),localStorage.setItem(w,JS Line truncated
`).map((ke,be)=>be===0?ke:he+ke).join(`
`)}else typeof R=="number"||typeof R=="boolean"?de=String(R):de=JSON.stringify(R);ie.push(`${ve}${de}${ee}`)}),ie.push("}"),ie.join(`
`)}function y(S){let D=[],V="",F=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,L=0,G;for(;G=F.exec(S);)V+=S.slice(L,G.index),L=F.lastIndex,D.push({key:G[1],op:G[2]||"=",val:G[3]});return V+=S.slice(L),{filters:D,free:V.trim().toLowerCase()}}function b(S,D){for(let V of D.filters){let F=(G,ie,te)=>{let R=parseFloat(G),Q=parseFloat(ie);return te==="="?String(G)===String(ie):te==="!="?String(G)!==String(ie):te===">="?R>=Q:te==="<="?R<=Q:te===">"?R>Q:te==="<"?R<Q:!0},L;if(V.key==="code")L=S.displayMessage;else if(V.key==="module")L=S.module;else if(V.key==="status")L=S._status;else if(V.key==="url")L=S._url;else if(V.key==="repo")L=S._repoId;else if(V.key==="level")L=S.level;else continue;if(L==null||!F(L,V.val,V.op))return!1}return!(D.free&&((S.displayMessage||"")+" "+(S.module||"")+" "+(S._url||"")+" "+JSON.stringify(S.raw||[])).toLowerCase().indexOf(D.free)===-1)}function w(){let S=y(e.query.search||"");e.parsedFilterCount=S.filters.length;let D=e.query.bucket,V=e.entries.filter(te=>D&&te._bucket!==D?!1:b(te,S)),F=e.query.group;if(F){let te=ne=>F==="module"?ne.module:ne.displayMessage||ne.message||"_",R=new Map;for(let ne of V){let ve=te(ne);if(R.has(ve)){let ee=R.get(ve);ee.count++,ee._related.push(ne),new Date(ne.ts)>new Date(ee.ts)&&(ee.ts=ne.ts,ee._url=ne._url,ee._status=ne._status),new Date(ne.ts)<new Date(ee._firstSeen)&&(ee._firstSeen=ne.ts)}else{let ee=Object.assign({},ne);ee._key=`${F}:${ve}`,ee._related=[ne],ee._firstSeen=ne.ts,ee._lastHourCount=0,ee.count=1,R.set(ve,ee)}}let Q=Date.now()-3600*1e3;for(let ne of R.values())ne._lastHourCount=ne._related.filter(ve=>new Date(ve.ts).getTime()>=Q).length;V=Array.from(R.values())}else V=V.map((te,R)=>(te._key="row:"+R+":"+te.ts,te._related=[te],te._firstSeen=te.ts,te._lastHourCount=0,te.count=1,te));let L=te=>({error:0,warn:1,info:2})[te._bucket]??1;e.query.sort==="count"?V.sort((te,R)=>L(te)-L(R)||R.count-te.count||new Date(R.ts)-new Date(te.ts)):V.sort((te,R)=>L(te)-L(R)||new Date(R.ts)-new Date(te.ts)),e.visible=V;let G=!!(e.query.bucket||(e.query.search||"").trim()),ie=!G&&(e.stats?.severity?.error||0)>0&&!V.some(te=>te._bucket==="error")&&e.entries.length<1500;(G&&!V.length||ie)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,m(!0))}function m(S){let D=S?e.entries.length:0,V=S?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:D,limit:V}}).then(F=>{let L=(F.data.entries||[]).map(p);e.entries=S?e.entries.concat(L):L,e.available=!!F.data.available,e.cap=F.data.max||e.cap,e.total=F.data.total||e.entries.length,e._autoLoading=!1,w()},F=>{e._autoLoading=!1,console.error(F)})}e.loadMore=()=>m(!0),e.canLoadMore=()=>e.entries.length<e.total;function E(){t.get("/api/admin/errors/stats").then(S=>{let D=S.data||{},V=D.prev24h?Math.round((D.last24h-D.prev24h)/D.prev24h*100):0;e.stats={last24h:D.last24h||0,prev24h:D.prev24h||0,delta:V,severity:D.severity||{error:0,warn:0,info:0},unique:D.unique||{error:0,warn:0,info:0},buckets:D.buckets||[],dropped:D.dropped||0},w()},S=>console.error(S))}function I(){m(),E()}e.barPx=(S,D)=>{let V=e.stats.buckets||[],F=0,L=0;for(let R of V)F=Math.max(F,(R.error||0)+(R.warn||0)),L=Math.max(L,R.info||0);let G=S[D]||0;if(!G)return 0;if(D==="info")return L?Math.max(2,Math.round(G/L*(F?16:60))):0;let ie=(S.error||0)+(S.warn||0),te=Math.round(ie/F*44);return Math.max(4,Math.round(G/ie*te))},e.bucketTitle=S=>`${new Date(S.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${S.error||0} err \xB7 ${S.warn||0} warn \xB7 ${S.info||0} info`,e.toggle=S=>{e.expanded[S._key]=!e.expanded[S._key]},e.setBucket=S=>{e.query.bucket=S},e.refreshNow=I,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(I,S=>console.error(S))},e.exportCsv=()=>{let S=["ts","level","module","displayMessage","_status","_url","_repoId"],D=[S.join(",")];for(let G of e.visible)D.push(S.map(ie=>{let te=G[ie]==null?"":String(G[ie]);return/[",\n]/.test(te)?`"${te.replace(/"/g,'""')}"`:te}).join(","));let V=new Blob([D.join(`
`)],{type:"text/csv;charset=utf-8"}),F=URL.createObjectURL(V),L=document.createElement("a");L.href=F,L.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(L),L.click(),document.body.removeChild(L),URL.revokeObjectURL(F)};function C(S){e.copyHint=`${S} copied`,s.timeout(()=>{e.copyHint=""},1500)}e.copyJson=S=>{navigator.clipboard.writeText(S._detailJson).then(()=>C("JSON"))},e.copyCurl=S=>{if(!S._url)return;let V=`curl -X ${S._method||"GET"} '${window.location.origin}${S._url}'`;navigator.clipboard.writeText(V).then(()=>C("curl"))},I();let v=i(()=>{e.query.autoRefresh&&I()},15e3);e.on("dispose",()=>i.cancel(v)),e.watch("query.search",w),e.watch("query.bucket",w),e.watch("query.sort",w),e.watch("query.group",w)},Sl=function(e,t,o,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all";var s=!1;e.loadCache=function(){if(!s){s=!0;var v=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:v}}).then(function(S){v===e.cacheMinutes&&(e.cacheReport=S.data,e.cacheError=S.data.available?null:S.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){s=!1,v!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(v){return e.cacheTraffic==="all"||v.traffic===e.cacheTraffic})},e.cacheRate=function(v,S){var D=e.cacheRows(),V=function(G){return D.filter(function(ie){return ie.name===G}).reduce(function(ie,te){return ie+te[S]},0)},F=V(v+"_hit"),L=V(v+"_miss");return F+L?(100*F/(F+L)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(v){return v.replaceAll("_"," ")},e.cacheP95=function(v){var S=0,D=e.cacheReport?.latencyBucketsMs||[];if(!v.count)return"No samples";if(!v.ms)return"Not timed";for(var V=0;V<=D.length;V++)if(S+=v["b"+V]||0,S>=Math.ceil(v.count*.95))return V<D.length?"\u2264 "+D[V]+" ms":"> 10 s";return"No samples"},e.performanceError=null,e.formatMs=function(v){return v==null?"":v<1e3?v+" ms":+(v/1e3).toFixed(1)+" s"},e.latencyBound=function(v,S){return v.count?v[S]==null?"> 60 s":"\u2264 "+e.formatMs(v[S]):"No samples"},e.firstByteBound=function(v){return e.latencyBound({count:v.firstByteCount,p95UpperMs:v.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(v){return Math.max(0,Math.round((Date.now()-v.sampledAt)/1e3))},e.peakRss=function(v){return(e.performance.runtimeSeries||[]).filter(function(S){return S.instance===v.instance}).reduce(function(S,D){return Math.max(S,D.rss)},v.memory.rss)},e.performanceWarning=function(v){return e.sampleAge(v)>45||v.droppedBatches||v.droppedMetrics||v.sockets?.closeWait>0||v.eventLoop?.p95Ms>100||v.memoryLimitBytes&&v.memory.rss>v.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var v=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==v&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:v}}).then(function(S){v===e.performanceMinutes&&(e.performance=S.data,e.performanceError=S.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){v===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,v!==e.performanceMinutes&&e.loadPerformance()}))};function a(v){if(v==null)return"\u2014";for(var S=["B","KB","MB","GB","TB"],D=0,V=v;V>=1024&&D<S.length-1;)V/=1024,D++;return V.toFixed(D>0?1:0)+" "+S[D]}e.humanBytes=a;function p(v){if(!v)return"\u2014";var S=Math.floor(v/86400),D=Math.floor(v%86400/3600),V=Math.floor(v%3600/60);return S>0?S+"d "+(D<10?"0":"")+D+"h":D>0?D+"h "+(V<10?"0":"")+V+"m":V+"m"}e.humanDuration=p;function f(v){return v==null?"\u2014":v>=1e6?(v/1e6).toFixed(1)+"M":v>=1e3?(v/1e3).toFixed(1)+"K":String(v)}e.humanNum=f,e.queueTotal=function(v){return v?(v.waiting||0)+(v.active||0)+(v.delayed||0)+(v.failed||0):0},e.statusCount=function(v){if(!e.data||!e.data.repos)return 0;for(var S=e.data.repos.statusBreakdown||[],D=0;D<S.length;D++)if(S[D]._id===v)return S[D].count;return 0},e.barPct=function(v){var S=e.data&&e.data.repos?e.data.repos.total:0;if(!S)return 0;var D=[v];v==="expired"&&D.push("expiring"),v==="removed"&&D.push("removing"),v==="preparing"&&D.push("download");var V=0;return D.forEach(function(F){V+=e.statusCount(F)}),Math.max(.4,V/S*100)},e.errPct=function(v){if(!e.data||!e.data.errors)return 0;var S=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[v]/S*100};function y(v){var S=v||[];return S.map(function(D,V){var F=S[V-1]||{},L=Object.assign({},D);return L.dailyRepositories=V?Math.max(0,(D.nbRepositories||0)-(F.nbRepositories||0)):0,L.dailyUse Line truncated
Contact: jane.smith@mit.edu`,e.demoTerms="Jane Smith, Smith, MIT CSAIL, jane.smith@mit.edu",e.demoParts=function(){let p=(e.demoTerms||"").split(/[,\n]/).map(m=>m.trim()).filter(Boolean).sort((m,E)=>E.length-m.length),f=m=>m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!p.length)return[{text:e.demoText}];let g=new RegExp("("+p.map(f).join("|")+")","gi"),y={},b=0;return(e.demoText||"").split(g).filter(m=>m!=="").map(m=>{let E=p.find(P=>P.toLowerCase()===m.toLowerCase());return E?(y[E.toLowerCase()]||(y[E.toLowerCase()]=++b),{text:String(y[E.toLowerCase()]),redacted:!0,original:m}):{text:m}})},e.demoCount=()=>e.demoParts().filter(p=>p.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"}];function r(){t.get("/api/stat/").then(p=>{e.stat=p.data,e.cards[0].total=p.data.nbRepositories,e.cards[1].total=p.data.nbUsers,e.cards[2].total=p.data.nbPageViews,e.cards[3].total=p.data.nbPullRequests}).catch(()=>{})}r();function a(p){let f={series:p,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!p||p.length<2)return f;let g=new Array(p.length-1);for(let k=1;k<p.length;k++)g[k-1]=p[k]-p[k-1];let y=g.length,b=Math.max.apply(null,g),m=Math.min.apply(null,g),E=Math.min(0,m),P=b-E||1;f.viewW=y*2,f.bars=new Array(y);for(let k=0;k<y;k++){let v=(g[k]-E)/P,S=Math.max(1.5,v*34);f.bars[k]={x:(k*2+.25).toFixed(2),y:(36-S).toFixed(2),w:"1.5",h:S.toFixed(2)}}if(f.deltaToday=g[y-1],y>=2){let k=g[y-2];k&&(f.pctChange=(f.deltaToday-k)/k*100)}return f.pctAbs=Math.round(Math.abs(f.pctChange)),f.isUp=f.pctChange>=0,f}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(p=>{let f=p.data||[];e.history={repositories:a(f.map(g=>g.nbRepositories||0)),users:a(f.map(g=>g.nbUsers||0)),pageViews:a(f.map(g=>g.nbPageViews||0)),pullRequests:a(f.map(g=>g.nbPullRequests||0))}}).catch(()=>{})},fl=function(e,t,o,i,s,r){let a=ct();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.quotaExpanded=!1,e.closeQuota=()=>{e.quotaExpanded=!1,Ge(()=>document.querySelector(".dashboard-quota > summary")?.focus())},xt()(document,"click",R=>{e.quotaExpanded&&!R.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=R=>R.status==="error"||R._broken||f(R.status)==="progress"&&R._stale,e.attentionCount=()=>e.dashboardTotals?.attention??e.items.filter(e.needsAttention).length,e.hasProjects=()=>(e.dashboardTotals?.total??e.items.length)>0,e.setProjectView=R=>{e.projectView=R,R==="attention"&&(e.filters.status.error=!0,e.filters.status.progress=!0)},e.projectDetailsId=R=>"project-details-"+encodeURIComponent(R._type+":"+(R._id||R._source||"unknown")),e.showProjectDetails=async R=>{e.selectedProject=R,e.projectName=R.projectName||"",e.nameError="",e.nameMessage="",await Ge();let K=document.getElementById(e.projectDetailsId(R));K?.focus(),K?.scrollIntoView?.({block:"nearest"})},e.closeProjectDetails=R=>{e.selectedProject=null,Ge(()=>document.querySelector(`[data-project-actions="${encodeURIComponent(R._type+":"+R._id)}"]`)?.focus())},e.saveProjectName=async R=>{if(e.nameSaving||!R._id)return;let K=e.projectName.trim();if(K.length>100){e.nameError="Use 100 characters or fewer.";return}e.nameSaving=!0,e.nameError="",e.nameMessage="";try{let te=await t.post("/api/user/project-name",{type:R._type,id:R._id,name:K});R.projectName=te.data.name,R._label=R.projectName||R._fallbackLabel,e.selectedProject===R&&(e.nameMessage=K?"Project name saved.":"Default project name restored."),T||(e.dashboardCursor=null,await L(),e.selectedProject===R&&(e.selectedProject=e.items.find(ve=>ve._type===R._type&&ve._id===R._id)||null))}catch{e.selectedProject===R&&(e.nameError="The project name could not be saved. Try again.")}finally{e.nameSaving=!1}},e.copyingId=null,e.copyLink=async R=>{if(!R._viewUrl||e.copyingId)return;let K=new URL(R._viewUrl,s.location.origin).href;e.copyingId=R._type+":"+R._id;try{await al(K),e.addToast({title:"Link copied",body:"The anonymous link is ready to share."})}catch{e.addToast({title:"Copy this anonymous link",body:K})}finally{e.copyingId=null}},e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"In progress",error:"Error",expired:"Expired",removed:"Removed"};let p=["queue","download","downloaded","preparing","anonymizing"];function f(R){return R==="ready"||R==="error"?R:R==="expired"||R==="expiring"?"expired":R==="removed"||R==="removing"?"removed":(p.indexOf(R)>-1,"progress")}let g=7200*1e3,y="dashboard.filterPrefs",b={typeFilter:"all",filters:{status:{ready:!0,progress:!0,error:!0,e Line truncated
`)),e.options=Object.assign({},e.options,D.options),e.options.expirationDate=D.options&&D.options.expirationDate?new Date(D.options.expirationDate):G(),!i.repoId&&!i.pullRequestId&&!i.gistId&&!e.anonymize?.terms?.dirty&&(e.terms=e.defaultTerms),w&&w()})}function x(w,A,D){e.anonymize&&e.anonymize[w]&&e.anonymize[w].setValidity(A,D)}function ue(w){try{let A=parseGithubUrl(w);if(A&&A.owner&&A.repo)return A.owner+"/"+A.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"||ue(e.sourceUrl)!==e._originalFullName)return;e.repairingGitHubAccess=!0,e.accessRepairMessage="";let w=m();try{let A=await t.get("/github/connections");if(e.githubConnections=A.data,!A.data.appEnabled)return;let D=await t.post("/github/connections/migrate",{type:"repository",id:i.repoId,connection:"github-app"},{headers:{"X-CSRF-Token":A.data.csrf}});if(!b(w))return;e.error=null,D.data.fullName&&(e._originalFullName=D.data.fullName,e.source.fullName=D.data.fullName,e.sourceUrl="https://github.com/"+D.data.fullName),e.accessRepairMessage="GitHub access repaired. Your anonymous URL and published commit are unchanged.",await e.urlSelected(!0)}catch{b(w)&&(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,E(w)}},e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,e.reconnectSource=async()=>{if(confirm("Reconnect to the repository currently at this GitHub URL? Review its branch and commit before saving. Saving will replace the published snapshot.")){e.reconnectingSource=!0,e.reconnectRepositoryId=void 0,e.source.commit="",e.source.branch="",e.readme="",e.branches=[];try{await be()}catch{}}};function he(){return e.reconnectingSource||!e.isUpdate||!e._originalRepositoryID?void 0:ue(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}async function Ee(){e._preservingDraft=!0;try{await e.urlSelected(!0)}finally{e._preservingDraft=!1}}async function ye(){let w=new URLSearchParams(window.location.search).get("billingDraft");if(w){v.restore();try{let D=(await t.get("/api/billing/draft/"+encodeURIComponent(w))).data;if(D.path!==s.path())throw new Error("Wrong task");S=D.values.conference||null;for(let I of["sourceUrl","terms","repoId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(D.values,I)&&(e[I]=D.values[I]);return e.options?.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),T=D.id,M=JSON.stringify(v.checkpoint()),e.draftRestored=!0,e.hostingReview=!0,e.sourceUrl&&await Ee(),s.replace?.(s.path()),!0}catch{e.billingError="The checkout draft could not be restored. Retry by reloading this page; any local draft is still available."}}let A;try{A=JSON.parse(sessionStorage.getItem("github-access-draft")||"null")}catch{return!1}if(!A||A.path!==s.path()||Date.now()-A.savedAt>=30*6e4)return v.restore()?(e.sourceUrl&&await Ee(),!0):!1;v.restore();for(let D of["sourceUrl","terms","repoId","pullRequestId","gistId","source","options","conference","githubConnection"])Object.prototype.hasOwnProperty.call(A.draft,D)&&(e[D]=A.draft[D]);return e.options.expirationDate&&(e.options.expirationDate=new Date(e.options.expirationDate)),await Ee(),sessionStorage.removeItem("github-access-draft"),!0}ve(()=>{!i.repoId&&!i.pullRequestId&&!i.gistId&&a(ye,0),i.repoId&&i.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=i.repoId,t.get("/api/repo/"+e.repoId).then(async w=>{e.accessRepairAllowed=!["removed","archived","preparing","queue","download","removing","expiring"].includes(w.data.status),e.githubConnection=w.data.connection||"oauth",e.sourceUrl="https://github.com/"+w.data.source.fullName,e._originalFullName=w.data.source.fullName,e.terms=w.data.options.terms.filter(A=>A).join(`
`),e.source=w.data.source,e.role=w.data.role||"owner",e._existingNever=w.data.options.expirationMode==="never",e.coauthors=w.data.coauthors||[],e._originalBranch=w.data.source.branch,e.options=Object.assign({},e.options,w.data.options),e.conference=w.data.conference,e._originalConference=w.data.conference,e.repositoryID=w.data.source.repositoryID,e._originalRepositoryID=w.data.source.repositoryID,w.data.options.expirationDate&&(e.options.expirationDate=new Date(w.data.options.expirationDate)),P=k(parseGithubUrl(e.sourceUrl)),!await ye()&&(await Promise.all([be(),Le()]),z())},()=>{s.url("/404")})),i.pullRequestId&&i.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=i.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async w=>{if(e.githubConnection=w.data.connection||"oauth",e.sourceUrl="https://github.com/"+w.data.source.repositoryFullName+"/pull/"+w.data.source.pullRequestId,e.terms=w.data.options.terms.filter(A=>A).join(`
`),e.source=w.data.source,e.options=Object.assign({},e.options,w.data.options),e.conference=w.data.conference,e._originalConference=w.data.conference,w.data.options.expirationDate&&(e.options.expirationDate=new Date(w.data.options.expirationDate)),P=k(parseGithubUrl(e.sourceUrl)),!await ye())try{await Z()}catch{}},()=>{s.url("/404")})),i.gistId&&i.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=i.gistId,t.get("/api/gist/"+e.gistId).then(async w=>{e.sourceUrl="https://gist.github.com/"+w.data.source.gistId,e.terms=w.data.options.terms.filter(A=>A).join(`
`),e.source=w.data.source,e.options=Object.assign({},e.options,w.data.options),e.conference=w.data.conference,e._originalConference=w.data.conference,w.data.options.expirationDate&&(e.options.expirationDate=new Date(w.data.options.expirationDate)),P=k(parseGithubUrl(e.sourceUrl)),!await ye()&&await Q()},()=>{s.url("/404")}))}),t.get("/github/connections").then(w=>{e.githubConnections=w.data,!i.repoId&&!i.pullRequestId&&!i.gistId&&e.githubConnection===void 0&&w.data.appEnabled&&w.data.appConnected&&(e.githubConnection="github-app",e.sourceUrl&&e.workspaceOpen&&Ee())}).catch(()=>{}),e.urlSelected=async(w=!1)=>{let A=++f;e.previousConfigurations=[],e.previousConfigurationId="";let D;try{D=parseGithubUrl(e.sourceUrl.trim())}catch{e.sourceLoading=!1,Me.cancel(),U.cancel(),de.cancel(),e.previewStatus="idle",e.sourceUrlError=e.sourceUrl?"Please provide a valid GitHub URL.":"",x("sourceUrl","github",!1);return}let I=k(D),B=w||P===I;P=I,e.sourceUrlError="",x("sourceUrl","github",!0);let F=document.activeElement?.id==="sourceUrl-landing";e.workspaceOpen=!0,setTimeout(()=>{let ie=window.document.getElementById("sourceUrl");if(ie){try{ie.setSelectionRange(0,0)}catch{}ie.scrollLeft=0}},50),F&&a(()=>document.getElementById("sourceUrl")?.focus(),0),e.reconnectingSource=!1,e.reconnectRepositoryId=void 0,!B&&!e.isUpdate&&(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],B||(e.source={type:"GitHubStream",branch:"",commit:""}),Me.cancel(),U.cancel(),de.cancel(),J.clear(),H.clear(),e.previewStatus="idle",e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null,e.gistOAuthRequired=!1,e.gistAppRequired=!1,e._preservingDraft=B;try{D.gistId&&!D.repo?(e.detectedType="gist",e.source={gistId:D.gistId},await Q()):D.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:D.owner+"/"+D.repo,pullRequestId:D.pullRequestId},await Z()):(e.detectedType="repo",te(),await Promise.all([be(),Le()]),z())}catch{}finally{A===f&&(e._preservingDraft=!1)}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let w=e.branches.filter(D=>D.name==e.source.branch)[0];if(!w)return;!(!e.reconnectingSource&&e.isUpdate&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=w.commit),e.readme=w.readme,await Le(),z()}),e.getBranches=async w=>{let A=parseGithubUrl(e.sourceUrl),D=m();try{let I=await t.get(`/api/repo/${A.owner}/${A.repo}/branches`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ue(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:w===!0||e.reconnectingSource?"1":"0",repositoryID:he()}});if(!b(D))return;e.branches=I.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let B=e.branches.filter(F=>F.name==e.source.branch);B.length>0&&(!(!e.reconnectingSource&&!w&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit)&&!(e._preservingDraft&&e.source.commit)&&(e.source.commit=B[0].commit),e.readme=B[0].readme,await Le(w))}catch(I){if(!b(D))return;e.branches=[],e.sourceUnreachable=I&&(I.status===404||I.data&&I.data.error==="repo_not_found");let B=I&&I.data&&I.data.error||(I&&I.status===404?"repo_not_found":"unknown_error");r("ERRORS."+B).then(F=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:F}),e.error=F},console.error),typeof x=="function"&&x("sourceUrl","missing",!1)}finally{E(D)}};async function be(){let w=parseGithubUrl(e.sourceUrl),A=m();try{N();let D=await t.get(`/api/repo/${w.owner}/${w.repo}/`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ue(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,repositoryID:he(),force:"1"}});if(!b(A))return;e.details=D.data,e.reconnectingSource&&(e.reconnectRepositoryId=e.details.externalId),e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches(e.reconnectingSource)}catch(D){if(!b(A))return;throw D.data&&(r("ERRORS."+D.data.error).then(I=>{e.addToast({title:"Error",date:new Date,body:I}),e.error=I},console.error),j(D.data.error)),x("sourceUrl","missing",!1),D}finally{E(A)}}async function Le(w){if(e.readme&&!w)return e.readme;let A=parseGithubUrl(e.sourceUrl),D=m();try{let I=await t.get(`/api/repo/${A.owner}/${A.repo}/readme`,{params:{reconnect:e.reconnectingSource?"1":void 0,anonymizedRepoId:e.isUpdate&&i.repoId&&ue(e.sourceUrl)===e._originalFullName?i.repoId:void 0,connection:e.githubConnection,force:w===!0?"1":"0",branch:e.source.branch,repositoryID:he()}});b(D,!0)&&(e.readme=I.data)}catch{b(D,!0)&&(e.readme="")}finally{E(D)}}function ze(){let w={terms:e.terms?e.terms.split(`
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(w.branchName=e.source.branch);try{let A=parseGithubUrl(e.sourceUrl);w.repoName=`${A.owner}/${A.repo}`}catch{}return w}function He(w,A,D){let I=null,B=0,F=()=>{if(e.detectedType!==w)return;I&&a.cancel(I);let ie=++B;e.previewStatus="loading",I=a(()=>{I=null;let X=A();if(!X){e.previewStatus="idle";return}t.post("/api/anonymize-preview",X).then(ae=>{ie===B&&(D(ae.data,X),e.previewStatus="ready")}).catch(()=>{ie===B&&(e.previewStatus="error")})},200)};return F.cancel=()=>{B++,I&&a.cancel(I),I=null},e.on("dispose",F.cancel),F}e.retryPreview=()=>{e.detectedType==="repo"&&Me(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&de()};let Me=He("repo",()=>e.readme?{content:e.readme,options:ze()}:null,w=>{if(typeof w?.content!="string")throw Error("Invalid preview response");e.anonymize_readme=w.content;let A="";try{let I=parseGithubUrl(e.sourceUrl),B=e.source.branch||e.details&&e.details.defaultBranch||"main";A=`https://github.com/${I.owner}/${I.repo}/raw/${B}/`}catch{}let D=renderMD(e.anonymize_readme,A);e.html_readme=D,a(Prism.highlightAll,150)});function z(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),Me())}async function Z(){let w=parseGithubUrl(e.sourceUrl),A=m();try{N();let D=await t.get(`/api/pr/${w.owner}/${w.repo}/${w.pullRequestId}`,{params:{connection:e.githubConnection}});if(!b(A))return;e.details=D.data,e.pullRequestId||(e.pullRequestId=w.repo+"-PR"+w.pullRequestId+"-"+generateRandomId(4))}catch(D){if(!b(A))return;throw D.data&&(r("ERRORS."+D.data.error).then(I=>{e.addToast({title:"Error",date:new Date,body:I}),e.error=I},console.error),j(D.data.error)),x("sourceUrl","missing",!1),D}finally{E(A)}}let J=Ue(new Map);function ne(){let w=new Set,A=e.details&&e.details.pullRequest;if(!A)return w;typeof A.title=="string"&&w.add(A.title),typeof A.body=="string"&&w.add(A.body),typeof A.diff=="string"&&w.add(A.diff);let D=A.comments||[];for(let I of D)typeof I.author=="string"&&w.add(I.author),typeof I.body=="string"&&w.add(I.body);return w}let U=He("pr",()=>{let w=ne(),A=Array.from(w);return A.length===0?null:{contents:A,options:ze()}},(w,A)=>{if(!Array.isArray(w?.contents)||w.contents.length!==A.contents.length||w.contents.some(B=>typeof B!="string"))throw Error("Invalid preview response");let D=A.contents,I=new Map;for(let B=0;B<D.length&&B<w.contents.length;B++)I.set(D[B],w.contents[B]);J.clear(),I.forEach((B,F)=>J.set(F,B))});e.anonymizePrContent=function(w){return w&&(J.has(w)?J.get(w):"")};async function Q(){let w=parseGithubUrl(e.sourceUrl),A=m();try{N(),e.gistOAuthRequired=!1,e.gistAppRequired=!1;let D=await t.get(`/api/gist/source/${w.gistId}`);if(!b(A))return;e.details=D.data,e.gistId||(e.gistId="gist-"+w.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(D){if(!b(A))return;if(D.data?.error==="github_app_reconnect_required"){e.gistAppRequired=!0,x("sourceUrl","missing",!1);return}if(D.data?.error==="github_oauth_required"){e.gistOAuthRequired=!0,x("sourceUrl","missing",!1);return}throw D.data&&(r("ERRORS."+D.data.error).then(I=>{e.addToast({title:"Error",date:new Date,body:I}),e.error=I},console.error),j(D.data.error)),x("sourceUrl","missing",!1),D}finally{E(A)}}let H=Ue(new Map);function re(){let w=new Set,A=e.details&&e.details.gist;if(!A)return w;typeof A.description=="string"&&w.add(A.description),typeof A.ownerLogin=="string"&&w.add(A.ownerLogin);let D=A.files||[];for(let B of D)typeof B.filename=="string"&&w.add(B.filename),typeof B.content=="string"&&w.add(B.content);let I=A.comments||[];for(let B of I)typeof B.author=="string"&&w.add(B.author),typeof B.body=="string"&&w.add(B.body);return w}let de=He("gist",()=>{let w=re(),A=Array.from(w);return A.length===0?null:{contents:A,options:ze()}},(w,A)=>{if(!Array.isArray(w?.contents)||w.contents.length!==A.contents.length||w.contents.some(B=>typeof B!="string"))throw Error("Invalid preview response");let D=A.contents,I=new Map;for(let B=0;B<D.length&&B<w.contents.length;B++)I.set(D[B],w.contents[B]);H.clear(),I.forEach((B,F)=>H.set(F,B)),Ne()});e.anonymizeGistContent=function(w){return w&&(H.has(w)?H.get(w):"")},e.previewGistFiles=[];function Ne(){let w=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=w.map(A=>({filename:e.anonymizeGistContent(A.filename),content:e.anonymizeGistContent(A.content),language:A.language}))}e.watch("details.gist.files",Ne,!0),e.watch("terms",Ne);function C(){let w=e.conference;if(e.conference_data=null,!w)return;let A=w===S||e.isUpdate&&w===e._originalConference;w!==S&&(S=null),t.get("/api/conferences/"+w).then(D=>{e.conference===w&&(e.conference_data=D.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),!A&&(e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.optio Line truncated
`).filter(F=>F),connection:e.githubConnection,fullName:`${D.owner}/${D.repo}`,repository:e.sourceUrl,reconnectRepositoryId:e.reconnectRepositoryId,options:e.options,source:e.source,conference:e.conference};e.details&&(I.options.pageSource=e.details.pageSource),N();let B=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(B,I,{headers:{"Content-Type":"application/json"}}).then(()=>{v.clear(),window.location.href="/status/"+e.repoId},F=>{F.data&&(r("ERRORS."+F.data.error).then(ie=>{e.error=ie},console.error),j(F.data.error),["quota_exceeded","subscription_required_for_never_expiration"].includes(F.data.error)&&(F.data.error==="subscription_required_for_never_expiration"&&(e._existingNever=!1),e.hostingQuotaBlocked=!0,e.hostingReview=!0,Ge(()=>document.getElementById("repository-hosting")?.scrollIntoView({block:"center"}))))}).finally(()=>{A.disabled=!1})},e.anonymizeGist=w=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(V())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let A=w.currentTarget||w.target.closest?.("button")||w.target;A.disabled=!0;let D=parseGithubUrl(e.sourceUrl),I={gistId:e.gistId,terms:e.terms.trim().split(`
`).filter(F=>F),source:{gistId:D.gistId},options:e.options,conference:e.conference};N();let B=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(B,I,{headers:{"Content-Type":"application/json"}}).then(()=>{v.clear(),window.location.href="/gist/"+e.gistId},F=>{F.data&&(r("ERRORS."+F.data.error).then(ie=>{e.error=ie},console.error),j(F.data.error))}).finally(()=>{A.disabled=!1})},e.anonymizePullRequest=w=>{if(e.sourceLoading){e.error="Wait for the source to finish loading before saving.";return}if(V())return;if(e.anonymize?.invalid||e.sourceUrlError){e.error="Please correct the highlighted fields before saving.";return}let A=w.currentTarget||w.target.closest?.("button")||w.target;A.disabled=!0;let D=parseGithubUrl(e.sourceUrl),I={pullRequestId:e.pullRequestId,connection:e.githubConnection,terms:e.terms.trim().split(`
`).filter(F=>F),source:{repositoryFullName:`${D.owner}/${D.repo}`,pullRequestId:D.pullRequestId},options:e.options,conference:e.conference};N();let B=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(B,I,{headers:{"Content-Type":"application/json"}}).then(()=>{v.clear(),window.location.href="/pr/"+e.pullRequestId},F=>{F.data&&(r("ERRORS."+F.data.error).then(ie=>{e.error=ie},console.error),j(F.data.error))}).finally(()=>{A.disabled=!1})},e.watch("conference",()=>{C()}),e.watch("terms",()=>{e.detectedType==="repo"&&z(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&de()}),e.watch("options.image",()=>{e.detectedType==="repo"&&z(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&de()}),e.watch("options.link",()=>{e.detectedType==="repo"&&z(),e.detectedType==="pr"&&U(),e.detectedType==="gist"&&de()}),e.watch("details",()=>{e.detectedType==="pr"&&U(),e.detectedType==="gist"&&de()},!0)},gi=function(e,t,o,i,s,r){let a=ct();il();let p=xt();e.on("dark-mode",(z,Z)=>{e.aceOption&&(Z?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome")});let f=0,g=null,y=null;e.fileLoadingSlow=!1,e.fileReceivedBytes=0;function b(){g&&(g.resolve(),g=null),y&&(a.timeout.cancel(y),y=null)}let m=!1;e.on("dispose",()=>{m=!0,f++,b(),E&&E.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,p(document,"click",z=>{e.symbolsOpen&&!z.target.closest?.(".symbols")&&(e.symbolsOpen=!1),e.moreOpen&&!z.target.closest?.(".tb-more")&&(e.moreOpen=!1),e.tocOpen&&!z.target.closest?.(".tb-toc-m")&&(e.tocOpen=!1),e.accountOpen&&!z.target.closest?.(".acct")&&(e.accountOpen=!1),e.helpOpen&&!z.target.closest?.(".vb-help")&&(e.helpOpen=!1)}),p(document,"keydown",z=>{z.key==="Escape"&&(e.symbolsOpen=!1,e.moreOpen=!1,e.tocOpen=!1,e.accountOpen=!1,e.helpOpen=!1),(z.ctrlKey||z.metaKey)&&!z.altKey&&z.key&&z.key.toLowerCase()==="f"&&e.type==="html"&&window.document.querySelector(".reading-layout")&&(z.preventDefault(),e.toggleMdFind(!0))}),p(document,"keydown",function(z){if((z.metaKey||z.ctrlKey)&&z.key==="k"){z.preventDefault();var Z=document.querySelector(".tree-search-input");Z&&(Z.focus(),Z.select())}});var E=null;e.onFileSearchChange=function(){E&&(E.resolve(),E=null);let z=e.fileSearchQuery;if(!z||z.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let Z=r.defer();E=Z,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(z)}`,{timeout:Z.promise}).then(function(J){if(!(m||E!==Z)){E=null,e.fileSearchLoading=!1;var ne={};e.files.forEach(function(I){ne[(I.path||"")+"/"+I.name]=!0});for(var U=[],Q={},H=0;H<J.data.length;H++){var re=J.data[H];if(re.path)for(var de=re.path.split("/"),Ne="",C=0;C<de.length;C++){var N=Ne;Ne=Ne?Ne+"/"+de[C]:de[C];var V=N+"/"+de[C];!ne[V]&&!Q[V]&&(Q[V]=!0,U.push({name:de[C],path:N}))}}U.sort(function(I,B){return(I.path||"").split("/").length-(B.path||"").split("/").length}),U.length>0&&e.files.push.apply(e.files,U);for(var j=[],w=0;w<J.data.length;w++){var A=J.data[w],D=(A.path||"")+"/"+A.name;!ne[D]&&A.size!=null&&(j.push(A),ne[D]=!0)}j.length>0&&e.files.push.apply(e.files,j),e.fileSearchResults=J.data}},function(){!m&&E===Z&&(E=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let P={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},k=["license","txt"],v=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],S=["wav","mp3","ogg","wma","flac","aac","m4a"],T=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(z,Z){if(e.repoId!=i.repoId)return Me();if((i.path||"")!=e.filePath){window.matchMedia?.("(max-width: 767px)").matches&&(e.sidebarCollapsed=!0),e.filePath=i.path||"",e.paths=e.filePath.split("/").filter(J=>J&&J.trim().length>0),He();for(let J=0;J<e.paths.length-1;J++){let ne=J>0?e.paths.slice(0,J).join("/"):"";e.files.some(Q=>Q.path===ne)||e.getFiles(ne)}}});function M(){if(e.paths[0]!="")return;let z=["readme.md","readme.txt","readme.org","readme.1st","readme"],Z={};for(let ne of e.files)ne.name.toLowerCase().indexOf("readme")>-1&&(Z[ne.name.toLowerCase()]=ne.name);let J=null;for(let ne of z)if(Z[ne]){J=ne;break}if(!J&&Object.keys(Z).length>0&&(J=Object.keys(Z)[0]),J){let ne=o.url();ne[ne.length-1]!="/"&&(ne+="/"),o.url(ne+encodePathForUrl(Z[J]))}}e.fileCounts=null;let L=0,q=new Set,G=!1;e.getFiles=function(z,Z=!1){let J=e.repoId,ne=L;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(z)}&v=${e.options.lastUpdateDate}`).then(function(U){if(m||J!==e.repoId||ne!==L)return[];let Q=z||"";return e.files=e.files.filter(H=>H.path!==Q),e.files.push(...U.data),se(Q,ne),U.data},function(U){if(m||J!==e.repoId||ne!==L)return[];Z||(e.type="error",e.content=vi(U),e.files=[])})};function se(z,Z){if(G||q.has(z))return;q.add(z);let J=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts?path=${encodeURIComponent(z)}`).then(funct Line truncated
`).forEach((Z,J)=>{for(let[ne,U]of ue){let Q=ne.exec(Z);if(Q&&!/^(if|for|while|switch|return|catch)$/.test(Q[1])){z.push({name:Q[1],kind:U,line:J+1});break}}}),he={content:e.content,list:z.slice(0,300)},he.list},e.goToSymbol=function(z){e.symbolsOpen=!1;let Z=e.codeEditor;Z&&(Z.scrollToLine(z-1,!0,!0,()=>{}),Z.gotoLine(z,0,!0),window.history.replaceState(null,"",window.location.pathname+window.location.search+"#L"+z),window.dispatchEvent(new HashChangeEvent("hashchange")))},e.gotoLine=function(){let z=e.codeEditor;z&&(z.focus(),z.execCommand("gotoline"))},e.rootEntries=function(){return[...e.files||[]].sort((z,Z)=>{let J=z.size==null,ne=Z.size==null;return J!==ne?J?-1:1:z.name.localeCompare(Z.name)})},e.formatSize=function(z){if(z==null)return"";if(z<1024)return z+" B";let Z=z/1024;return Z<1024?Z.toFixed(1)+" KB":(Z/1024).toFixed(1)+" MB"},e.fileSize=function(z){if(!z)return null;let Z=z.replace(/^\/+/,""),J=(e.files||[]).find(ne=>(ne.path?ne.path+"/":"")+ne.name===Z);return J&&J.size!=null?J.size:null},e.revealFolder=function(z){e.sidebarHidden=!1,e.sidebarCollapsed=!1,Ge(()=>{let Z=window.document.querySelector('.files a[data-path="/'+(window.CSS?.escape?window.CSS.escape(z):z)+'"]');Z&&(Z.closest("li")?.classList.contains("open")||Z.click(),Z.scrollIntoView({block:"nearest"}),Z.focus())})},e.redactionCount=function(){return typeof e.content!="string"?0:((e.type==="html"?e.content.replace(/<[^>]*>/g," "):e.content).match(bo)||[]).length},e.renderRedacted=sl;let Ee=z=>z.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").slice(0,60)||"section";e.renderReadme=function(z){let Z=e.renderRedacted(z);if(!Z||typeof window.DOMParser!="function")return Z;let J=new window.DOMParser().parseFromString("<div>"+Z+"</div>","text/html"),ne={};return J.querySelectorAll("h1, h2, h3").forEach(U=>{let Q=U.id||Ee(U.textContent);ne[Q]?Q+="-"+ ++ne[Q]:ne[Q]=1,U.id=Q}),J.body.firstChild.innerHTML};let ye={content:null,list:[]};e.readmeToc=function(){if(e.type!=="html"||typeof e.content!="string")return[];if(ye.content===e.content)return ye.list;let Z=[...new window.DOMParser().parseFromString("<div>"+e.renderReadme(e.sanitize?e.sanitize(e.content):e.content)+"</div>","text/html").querySelectorAll("h2, h3")].map(J=>({id:J.id,text:J.textContent.trim(),level:J.tagName==="H3"?3:2})).slice(0,40);return ye={content:e.content,list:Z},Z},e.activeHeading=null,p(window,"scroll",()=>{let z=e.readmeToc?e.readmeToc():[];if(!z.length)return;let Z=150,J="",ne="";for(let U of z){let Q=window.document.getElementById(U.id);if(!Q)continue;let H=Q.getBoundingClientRect().top;H<Z?J=U.id:!ne&&H<window.innerHeight-80&&(ne=U.id)}ne&&(J=ne),e.activeHeading!==J&&(e.activeHeading=J)},{capture:!0,passive:!0}),e.scrollToHeading=function(z){if(!z){(window.document.querySelector(".explorer-content, .file-card-body, .main-pane")||window).scrollTo({top:0,behavior:"smooth"}),e.activeHeading="";return}let Z=window.document.getElementById(z);Z&&Z.scrollIntoView({behavior:"smooth",block:"start"}),e.activeHeading=z},e.redactParts=function(z){let Z=[],J=0,ne,U=/\bXXXX-(\d+)\b/g;for(z=String(z||"");ne=U.exec(z);)ne.index>J&&Z.push({t:z.slice(J,ne.index)}),Z.push({n:ne[1]}),J=ne.index+ne[0].length;return J<z.length&&Z.push({t:z.slice(J)}),Z},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 z=e.content;if(e.type==="html"&&e.url)try{z=await(await window.fetch(e.url,{credentials:"same-origin"})).text()}catch{return}await window.navigator.clipboard.writeText(z),e.contentCopied=!0,setTimeout(()=>{e.contentCopied=!1},1600)};function be(z){return P[z]?P[z]:z}function Le(z){return z=="pdf"?"pdf":z=="html"||z=="htm"?"html-doc":z=="md"?"md":z=="org"?"org":z=="ipynb"?"IPython":k.indexOf(z)>-1?"text":v.indexOf(z)>-1?"image":T.indexOf(z)>-1?"media":S.indexOf(z)>-1?"audio":"code"}function ze(z,Z){let J=f;if(!z){e.type="error",e.content="no_file_selected";return}let ne=e.type;(ne==="code"||ne==="text")&&ko().catch(()=>{}),e.type="loading",e.content="loading",e.fileLoadingSlow=!1,e.fileReceivedBytes=0;let U=r.defer();g=U,y=a.timeout(()=>{!m&&J===f&&e.type==="loading"&&(e.fileLoadingSlow=!0)},1500);let Q=Z&&Z.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(z)}?v=`+Q,{timeout:U.promise,onDownloadProgress:H=>{!m&&J===f&&(e.fileReceivedBytes=H)},transformResponse:H=>H}).then(H=>{if(!(m||J!==f)){if(b(),e.type=ne,e.content=H.data,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(H.data,o.url()+"/../"),e.type="html"),e.type=="org"){let de=contentAbs2Relative(H.data);var re=new Org.Parser().parse(de).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(re.toString()),e.type="h Line truncated
`+k.join(`
`)],{type:"text/csv"}),S=document.createElement("a");S.href=URL.createObjectURL(v),S.download=i.username+"-repositories.csv",S.click()},e.showStatusMessage=m=>{let E=m.statusMessage||"(no message)";window.prompt(`Status message for ${m.repoId} (${m.status}):`,E)},e.fetchGithubInfo=m=>{let E=window.open("","_blank");E&&E.document.write("<pre>Loading GitHub info for "+m.repoId+"...</pre>"),t.get("/api/admin/repos/"+m.repoId+"/github").then(P=>{E&&(E.document.open(),E.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(P.data,null,2).replace(/[<>]/g,k=>k==="<"?"&lt;":"&gt;")+"</pre>"),E.document.close())},P=>{let k=P&&P.data?JSON.stringify(P.data,null,2):String(P);E&&(E.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+k+"</pre>")})};function f(m){t.get("/api/admin/users/"+m+"/repos",{}).then(E=>{e.repositories=E.data},E=>{console.error(E)})}function g(m){t.get("/api/admin/users/"+m,{}).then(E=>{e.userInfo=E.data},E=>{console.error(E)})}g(i.username),f(i.username),e.banUser=()=>{confirm(`Ban user ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/ban`).then(()=>g(i.username),m=>console.error(m))},e.activateUser=()=>{t.post(`/api/admin/users/${i.username}/activate`).then(()=>g(i.username),m=>console.error(m))},e.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&t.post(`/api/admin/users/${i.username}/promote`).then(()=>g(i.username),m=>console.error(m))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&t.post(`/api/admin/users/${i.username}/demote`).then(()=>g(i.username),m=>console.error(m))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function y(){t.get("/api/admin/tokens").then(m=>{e.tokens=m.data||[]},m=>{m.status!==401&&m.status!==403&&console.error(m)})}y(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(m=>{e.tokenForm.plaintext=m.data.token,e.tokenForm.name="",y()},m=>console.error(m))},e.revokeToken=m=>{confirm(`Revoke token "${m.name}"?`)&&t.delete("/api/admin/tokens/"+m.id).then(()=>y(),E=>console.error(E))},e.removeCache=m=>{confirm("Remove cached files for "+m.repoId+"?")&&t.delete("/api/admin/repos/"+m.repoId).then(()=>f(i.username),E=>console.error(E))},e.removeRepository=m=>{confirm("Remove repository "+m.repoId+"?")&&t.delete("/api/repo/"+m.repoId+"/").then(()=>f(i.username),E=>console.error(E))},e.updateRepository=m=>{let E=Ue({title:`Refreshing ${m.repoId}...`,date:new Date,body:`The repository ${m.repoId} is going to be refreshed.`});e.toasts.push(E),t.post(`/api/repo/${m.repoId}/refresh`).then(P=>{P.data.status=="ready"?E.title=`${m.repoId} is refreshed.`:E.title=`Refreshing of ${m.repoId}.`},P=>{E.title=`Error during the refresh of ${m.repoId}.`,E.body=P.body})},e.getGitHubRepositories=m=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(E=>{e.userInfo.repositories=E.data})};let b=null;e.watch("query",()=>{s.timeout.cancel(b),b=s.timeout(()=>{f(i.username)},500)},!0)},Sl=function(e,t,o){let i=ct(),s=xt();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let r=P=>{if(P.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){P.preventDefault();let k=document.querySelector('.admin-filter-toolbar input[type="search"]');k&&k.focus()}};s(document,"keydown",r),e.on("dispose",()=>document.removeEventListener("keydown",r)),e.clearFilter=P=>{P==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[P]="",e.query.page=1},e.chips=[];let a=()=>{let P=[];(e.query.dateFrom||e.query.dateTo)&&P.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=P};e.statusCountFor=P=>{let k=(e.statusCounts||[]).find(v=>v._id===P);return k?k.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=P=>{e.query.sort===P?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=P,e.query.direction="desc"),e.query.page=1},e.sortIcon=P=>e.query.sort===P?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let p="admin.conferences.filterPrefs",f={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!0,expired:!0,removed:!1,error:!0,preparing:!0},g=loadFilterPrefs(p)||{};e.query=Object.assign({},f,g,{page:1,search:""});let y=o.search();y.search&&(e.query.search=y.search);let b="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(b)||"[]"),e.savePreset=()=>{let P=window.prompt("Preset name:");if(!P)return;let k=Object.assign({},e.query);delete k.page,e.presets=(e.presets||[]).filter(v=>v.name!==P),e.presets.push({name:P,query:k}),localStorage.setItem(b,JSON.stringify(e.presets))},e.applyPreset=P=>{Object.assign(e.query,P.query,{page:1})},e.deletePreset=P=>{e.presets=(e.presets||[]).filter(k=>k.name!==P.name),localStorage.setItem(b,JS Line truncated
`).map((Ee,ye)=>ye===0?Ee:he+Ee).join(`
`)}else typeof R=="number"||typeof R=="boolean"?ue=String(R):ue=JSON.stringify(R);se.push(`${ve}${ue}${x}`)}),se.push("}"),se.join(`
`)}function g(S){let T=[],M="",L=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,q=0,G;for(;G=L.exec(S);)M+=S.slice(q,G.index),q=L.lastIndex,T.push({key:G[1],op:G[2]||"=",val:G[3]});return M+=S.slice(q),{filters:T,free:M.trim().toLowerCase()}}function y(S,T){for(let M of T.filters){let L=(G,se,ee)=>{let R=parseFloat(G),K=parseFloat(se);return ee==="="?String(G)===String(se):ee==="!="?String(G)!==String(se):ee===">="?R>=K:ee==="<="?R<=K:ee===">"?R>K:ee==="<"?R<K:!0},q;if(M.key==="code")q=S.displayMessage;else if(M.key==="module")q=S.module;else if(M.key==="status")q=S._status;else if(M.key==="url")q=S._url;else if(M.key==="repo")q=S._repoId;else if(M.key==="level")q=S.level;else continue;if(q==null||!L(q,M.val,M.op))return!1}return!(T.free&&((S.displayMessage||"")+" "+(S.module||"")+" "+(S._url||"")+" "+JSON.stringify(S.raw||[])).toLowerCase().indexOf(T.free)===-1)}function b(){let S=g(e.query.search||"");e.parsedFilterCount=S.filters.length;let T=e.query.bucket,M=e.entries.filter(ee=>T&&ee._bucket!==T?!1:y(ee,S)),L=e.query.group;if(L){let ee=te=>L==="module"?te.module:te.displayMessage||te.message||"_",R=new Map;for(let te of M){let ve=ee(te);if(R.has(ve)){let x=R.get(ve);x.count++,x._related.push(te),new Date(te.ts)>new Date(x.ts)&&(x.ts=te.ts,x._url=te._url,x._status=te._status),new Date(te.ts)<new Date(x._firstSeen)&&(x._firstSeen=te.ts)}else{let x=Object.assign({},te);x._key=`${L}:${ve}`,x._related=[te],x._firstSeen=te.ts,x._lastHourCount=0,x.count=1,R.set(ve,x)}}let K=Date.now()-3600*1e3;for(let te of R.values())te._lastHourCount=te._related.filter(ve=>new Date(ve.ts).getTime()>=K).length;M=Array.from(R.values())}else M=M.map((ee,R)=>(ee._key="row:"+R+":"+ee.ts,ee._related=[ee],ee._firstSeen=ee.ts,ee._lastHourCount=0,ee.count=1,ee));let q=ee=>({error:0,warn:1,info:2})[ee._bucket]??1;e.query.sort==="count"?M.sort((ee,R)=>q(ee)-q(R)||R.count-ee.count||new Date(R.ts)-new Date(ee.ts)):M.sort((ee,R)=>q(ee)-q(R)||new Date(R.ts)-new Date(ee.ts)),e.visible=M;let G=!!(e.query.bucket||(e.query.search||"").trim()),se=!G&&(e.stats?.severity?.error||0)>0&&!M.some(ee=>ee._bucket==="error")&&e.entries.length<1500;(G&&!M.length||se)&&e.canLoadMore?.()&&!e._autoLoading&&e.entries.length<2500&&(e._autoLoading=!0,m(!0))}function m(S){let T=S?e.entries.length:0,M=S?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:T,limit:M}}).then(L=>{let q=(L.data.entries||[]).map(p);e.entries=S?e.entries.concat(q):q,e.available=!!L.data.available,e.cap=L.data.max||e.cap,e.total=L.data.total||e.entries.length,e._autoLoading=!1,b()},L=>{e._autoLoading=!1,console.error(L)})}e.loadMore=()=>m(!0),e.canLoadMore=()=>e.entries.length<e.total;function E(){t.get("/api/admin/errors/stats").then(S=>{let T=S.data||{},M=T.prev24h?Math.round((T.last24h-T.prev24h)/T.prev24h*100):0;e.stats={last24h:T.last24h||0,prev24h:T.prev24h||0,delta:M,severity:T.severity||{error:0,warn:0,info:0},unique:T.unique||{error:0,warn:0,info:0},buckets:T.buckets||[],dropped:T.dropped||0},b()},S=>console.error(S))}function P(){m(),E()}e.barPx=(S,T)=>{let M=e.stats.buckets||[],L=0,q=0;for(let R of M)L=Math.max(L,(R.error||0)+(R.warn||0)),q=Math.max(q,R.info||0);let G=S[T]||0;if(!G)return 0;if(T==="info")return q?Math.max(2,Math.round(G/q*(L?16:60))):0;let se=(S.error||0)+(S.warn||0),ee=Math.round(se/L*44);return Math.max(4,Math.round(G/se*ee))},e.bucketTitle=S=>`${new Date(S.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${S.error||0} err \xB7 ${S.warn||0} warn \xB7 ${S.info||0} info`,e.toggle=S=>{e.expanded[S._key]=!e.expanded[S._key]},e.setBucket=S=>{e.query.bucket=S},e.refreshNow=P,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(P,S=>console.error(S))},e.exportCsv=()=>{let S=["ts","level","module","displayMessage","_status","_url","_repoId"],T=[S.join(",")];for(let G of e.visible)T.push(S.map(se=>{let ee=G[se]==null?"":String(G[se]);return/[",\n]/.test(ee)?`"${ee.replace(/"/g,'""')}"`:ee}).join(","));let M=new Blob([T.join(`
`)],{type:"text/csv;charset=utf-8"}),L=URL.createObjectURL(M),q=document.createElement("a");q.href=L,q.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(q),q.click(),document.body.removeChild(q),URL.revokeObjectURL(L)};function k(S){e.copyHint=`${S} copied`,s.timeout(()=>{e.copyHint=""},1500)}e.copyJson=S=>{navigator.clipboard.writeText(S._detailJson).then(()=>k("JSON"))},e.copyCurl=S=>{if(!S._url)return;let M=`curl -X ${S._method||"GET"} '${window.location.origin}${S._url}'`;navigator.clipboard.writeText(M).then(()=>k("curl"))},P();let v=i(()=>{e.query.autoRefresh&&P()},15e3);e.on("dispose",()=>i.cancel(v)),e.watch("query.search",b),e.watch("query.bucket",b),e.watch("query.sort",b),e.watch("query.group",b)},Dl=function(e,t,o,i){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null,e.performance=null,e.performanceMinutes=15,e.performanceTab="routes",e.cacheReport=null,e.cacheError=null,e.cacheMinutes=60,e.cacheTraffic="all";var s=!1;e.loadCache=function(){if(!s){s=!0;var v=e.cacheMinutes;t.get("/api/admin/cache",{params:{minutes:v}}).then(function(S){v===e.cacheMinutes&&(e.cacheReport=S.data,e.cacheError=S.data.available?null:S.data.reason||"Cache monitoring is unavailable.")},function(){e.cacheError="Could not refresh cache monitoring. Displayed values may be stale."}).finally(function(){s=!1,v!==e.cacheMinutes&&e.loadCache()})}},e.cacheRows=function(){return(e.cacheReport?.rows||[]).filter(function(v){return e.cacheTraffic==="all"||v.traffic===e.cacheTraffic})},e.cacheRate=function(v,S){var T=e.cacheRows(),M=function(G){return T.filter(function(se){return se.name===G}).reduce(function(se,ee){return se+ee[S]},0)},L=M(v+"_hit"),q=M(v+"_miss");return L+q?(100*L/(L+q)).toFixed(1)+"%":"No samples"},e.cacheEventName=function(v){return v.replaceAll("_"," ")},e.cacheP95=function(v){var S=0,T=e.cacheReport?.latencyBucketsMs||[];if(!v.count)return"No samples";if(!v.ms)return"Not timed";for(var M=0;M<=T.length;M++)if(S+=v["b"+M]||0,S>=Math.ceil(v.count*.95))return M<T.length?"\u2264 "+T[M]+" ms":"> 10 s";return"No samples"},e.performanceError=null,e.formatMs=function(v){return v==null?"":v<1e3?v+" ms":+(v/1e3).toFixed(1)+" s"},e.latencyBound=function(v,S){return v.count?v[S]==null?"> 60 s":"\u2264 "+e.formatMs(v[S]):"No samples"},e.firstByteBound=function(v){return e.latencyBound({count:v.firstByteCount,p95UpperMs:v.firstByteP95UpperMs},"p95UpperMs")},e.sampleAge=function(v){return Math.max(0,Math.round((Date.now()-v.sampledAt)/1e3))},e.peakRss=function(v){return(e.performance.runtimeSeries||[]).filter(function(S){return S.instance===v.instance}).reduce(function(S,T){return Math.max(S,T.rss)},v.memory.rss)},e.performanceWarning=function(v){return e.sampleAge(v)>45||v.droppedBatches||v.droppedMetrics||v.sockets?.closeWait>0||v.eventLoop?.p95Ms>100||v.memoryLimitBytes&&v.memory.rss>v.memoryLimitBytes*.8};var r=!1;e.loadPerformance=function(){var v=e.performanceMinutes;e.performance?.windowMinutes&&e.performance.windowMinutes!==v&&(e.performance=null),!r&&(r=!0,t.get("/api/admin/performance",{params:{minutes:v}}).then(function(S){v===e.performanceMinutes&&(e.performance=S.data,e.performanceError=S.data.available?null:"Performance monitoring is unavailable. Request history may be incomplete.")},function(){v===e.performanceMinutes&&(e.performanceError="Could not refresh performance monitoring. Displayed samples may be stale.")}).finally(function(){r=!1,v!==e.performanceMinutes&&e.loadPerformance()}))};function a(v){if(v==null)return"\u2014";for(var S=["B","KB","MB","GB","TB"],T=0,M=v;M>=1024&&T<S.length-1;)M/=1024,T++;return M.toFixed(T>0?1:0)+" "+S[T]}e.humanBytes=a;function p(v){if(!v)return"\u2014";var S=Math.floor(v/86400),T=Math.floor(v%86400/3600),M=Math.floor(v%3600/60);return S>0?S+"d "+(T<10?"0":"")+T+"h":T>0?T+"h "+(M<10?"0":"")+M+"m":M+"m"}e.humanDuration=p;function f(v){return v==null?"\u2014":v>=1e6?(v/1e6).toFixed(1)+"M":v>=1e3?(v/1e3).toFixed(1)+"K":String(v)}e.humanNum=f,e.queueTotal=function(v){return v?(v.waiting||0)+(v.active||0)+(v.delayed||0)+(v.failed||0):0},e.statusCount=function(v){if(!e.data||!e.data.repos)return 0;for(var S=e.data.repos.statusBreakdown||[],T=0;T<S.length;T++)if(S[T]._id===v)return S[T].count;return 0},e.barPct=function(v){var S=e.data&&e.data.repos?e.data.repos.total:0;if(!S)return 0;var T=[v];v==="expired"&&T.push("expiring"),v==="removed"&&T.push("removing"),v==="preparing"&&T.push("download");var M=0;return T.forEach(function(L){M+=e.statusCount(L)}),Math.max(.4,M/S*100)},e.errPct=function(v){if(!e.data||!e.data.errors)return 0;var S=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[v]/S*100};function g(v){var S=v||[];return S.map(function(T,M){var L=S[M-1]||{},q=Object.assign({},T);return q.dailyRepositories=M?Math.max(0,(T.nbRepositories||0)-(L.nbRepositories||0)):0,q.dailyUse Line truncated
MIT CSAIL
jane.smith@example.org`},null,2),[[s,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[86]||(t[86]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",eN,[t[83]||(t[83]=n("summary",null,"Regex & replacement syntax",-1)),t[84]||(t[84]=h()),n("small",tN,[t[77]||(t[77]=h("Regex is supported. Replaced by ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[78]||(t[78]=h(", or use ",-1)),t[79]||(t[79]=n("code",null,"term=>replacement",-1)),t[80]||(t[80]=h(" to pick your own (e.g. ",-1)),t[81]||(t[81]=n("code",null,"Anonymous=>ABC",-1)),t[82]||(t[82]=h(").",-1))])]),T(n("div",nN,"Regex characters detected. Escape them if unintentional.",512),[[Z,e.termsRegexWarning]]),T(n("div",oN,"Terms are in an invalid format.",512),[[Z,e.anonymize?.terms?.errors?.format]])])],512),[[Z,e.detectedType]]),T(n("section",sN,[t[107]||(t[107]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),T(n("div",null,[n("div",iN,[T(n("input",rN,null,512),[[s,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"anonymize",options:{}}]]),t[88]||(t[88]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",aN,[T(n("input",lN,null,512),[[s,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"anonymize",options:{}}]]),t[89]||(t[89]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",dN,[T(n("input",uN,null,512),[[s,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[90]||(t[90]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",cN,[T(n("input",pN,null,512),[[s,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[91]||(t[91]=n("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))]),n("div",fN,[T(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,mN),[[s,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"anonymize",options:{}}]]),t[92]||(t[92]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?c("v-if",!0):(l(),d("small",hN,u(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?(l(),d("small",vN,u(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):c("v-if",!0)])],512),[[Z,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(l(),d("p",gN,[...t[93]||(t[93]=[h("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):c("v-if",!0),T(n("div",null,[n("div",yN,[T(n("input",bN,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[94]||(t[94]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",wN,[T(n("input",kN,null,512),[[s,{state:e.viewState,set:a=>{e.options.content=a},value:e.options?.content,form:"anonymize",options:{}}]]),t[95]||(t[95]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",CN,[T(n("input",EN,null,512),[[s,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[96]||(t[96]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",SN,[T(n("input",NN,null,512),[[s,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[97]||(t[97]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",RN,[T(n("input",DN,null,512),[[s,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[98]||(t[98]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",TN,[T(n("input",_N,null,512),[[s,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[99]||(t[99]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Z,e.detectedType==="gist"]]),T(n("div",null,[n("div",AN,[T(n("input",ON,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[100]||(t[100]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",PN,[T(n("input",IN,null,512),[[s,{state:e.viewState,set:a=>{e.options.body=a},value:e.options?.body,form:"anonymize",options:{}}]]),t[101]||(t[101]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n("div",MN,[T(n("input",VN,null,512),[[s,{state:e.viewState,set:a=>{e.options.diff=a},value:e.op Line truncated
anonymous_github`)])])])])]),c(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),h("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). ")])])])])]),c(" Privacy & Security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),h("Privacy & Security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. 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,[h("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"),h(" 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. ")])])])]),c(" Self-Hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),h("Self-Hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{class:"panel-body p-3"},[n("p",null,[h(" Yes. Line truncated
jane.smith@example.org`},null,2),[[s,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"anonymize",options:{debounce:250}}]]),t[86]||(t[86]=n("small",{class:"form-text text-muted"},"One term per line.",-1)),n("details",oN,[t[83]||(t[83]=n("summary",null,"Regex & replacement syntax",-1)),t[84]||(t[84]=h()),n("small",sN,[t[77]||(t[77]=h("Regex is supported. Replaced by ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[78]||(t[78]=h(", or use ",-1)),t[79]||(t[79]=n("code",null,"term=>replacement",-1)),t[80]||(t[80]=h(" to pick your own (e.g. ",-1)),t[81]||(t[81]=n("code",null,"Anonymous=>ABC",-1)),t[82]||(t[82]=h(").",-1))])]),_(n("div",iN,"Regex characters detected. Escape them if unintentional.",512),[[Y,e.termsRegexWarning]]),_(n("div",rN,"Terms are in an invalid format.",512),[[Y,e.anonymize?.terms?.errors?.format]])])],512),[[Y,e.detectedType]]),_(n("section",aN,[t[107]||(t[107]=n("h2",{class:"paper-section-eyebrow"},"Display",-1)),_(n("div",null,[n("div",lN,[_(n("input",dN,null,512),[[s,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"anonymize",options:{}}]]),t[88]||(t[88]=n("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),n("div",uN,[_(n("input",cN,null,512),[[s,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"anonymize",options:{}}]]),t[89]||(t[89]=n("label",{class:"form-check-label",for:"image"},"Display images",-1))]),n("div",pN,[_(n("input",fN,null,512),[[s,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[90]||(t[90]=n("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),n("div",mN,[_(n("input",hN,null,512),[[s,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[91]||(t[91]=n("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))]),n("div",vN,[_(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,gN),[[s,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"anonymize",options:{}}]]),t[92]||(t[92]=n("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),e.details?.hasPage?c("v-if",!0):(l(),d("small",yN,u(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?(l(),d("small",bN,u(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),1)):c("v-if",!0)])],512),[[Y,e.detectedType==="repo"]]),e.detectedType==="repo"&&(e.options.image||e.options.pdf)?(l(),d("p",wN,[...t[93]||(t[93]=[h("Images and PDFs are served unchanged. Review their contents and metadata before sharing. ",-1),n("a",{href:"/faq#formats"},"Supported formats",-1)])])):c("v-if",!0),_(n("div",null,[n("div",kN,[_(n("input",CN,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[94]||(t[94]=n("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),n("div",EN,[_(n("input",SN,null,512),[[s,{state:e.viewState,set:a=>{e.options.content=a},value:e.options?.content,form:"anonymize",options:{}}]]),t[95]||(t[95]=n("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),n("div",NN,[_(n("input",RN,null,512),[[s,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[96]||(t[96]=n("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),n("div",DN,[_(n("input",TN,null,512),[[s,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[97]||(t[97]=n("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),n("div",_N,[_(n("input",AN,null,512),[[s,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[98]||(t[98]=n("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),n("div",ON,[_(n("input",PN,null,512),[[s,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[99]||(t[99]=n("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[Y,e.detectedType==="gist"]]),_(n("div",null,[n("div",IN,[_(n("input",MN,null,512),[[s,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[100]||(t[100]=n("label",{class:"form-check-label",for:"title"},"PR title",-1))]),n("div",VN,[_(n("input",qN,null,512),[[s,{state:e.viewState,set:a=>{e.options.body=a},value:e.options?.body,form:"anonymize",options:{}}]]),t[101]||(t[101]=n("label",{class:"form-check-label",for:"body"},"PR body",-1))]),n("div",LN,[_(n("input",$N,null,512),[[s,{state:e.viewState,set:a=>{e.options.diff=a},value:e.op Line truncated
anonymous_github`)])])])])]),c(" Limitations "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-warning"})]),h("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). ")])])])])]),c(" Privacy & Security "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#ui-icon-shield"})]),h("Privacy & Security ")]),n("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),n("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[n("div",{class:"panel-body p-3"},[n("p",null," Repository data is used to provide the anonymization service. If you purchase a plan, Stripe processes payment and billing information. When a repository is removed or expires, only its configuration is retained. 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,[h("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"),h(" 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. ")])])])]),c(" Self-Hosting "),n("h4",{class:"faq-cat"},[n("svg",{class:"ui-icon mr-2","aria-hidden":"true"},[n("use",{href:"#project-icon-storage"})]),h("Self-Hosting ")]),n("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[n("div",{class:"panel panel-default mb-3"},[n("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[n("h3",{class:"panel-title"},[n("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),n("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[n("div",{class:"panel-body p-3"},[n("p",null,[h(" Yes. Line truncated
anonymized repository often think it is about the paper, so the
label names the service and the tooltip says who to contact. `),t[25]||(t[25]=me('<li class="nav-item d-none d-lg-block"><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"><svg class="ui-icon d-lg-none mr-1" aria-hidden="true"><use href="#ui-icon-bug"></use></svg>Report a bug </a></li><li class="nav-item nav-support-item d-none d-lg-block"><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"><svg class="ui-icon nav-heart" aria-hidden="true"><use href="#ui-icon-heart"></use></svg>Support </a></li>',2)),e.isDarkMode?c("v-if",!0):(l(),d("li",q5,[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]=o=>{e.darkMode(!0)})},[...t[18]||(t[18]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",L5,[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]=o=>{e.darkMode(!1)})},[...t[19]||(t[19]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):c("v-if",!0),!e.user&&!e.isReviewerRoute?(l(),d("li",$5,[...t[20]||(t[20]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),h(" Sign in ")],-1)])])):c("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(l(),d("li",U5,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=ae(o=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):c("v-if",!0),e.user?(l(),d("li",F5,[n("a",B5,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,z5)):c("v-if",!0),n("span",H5,u(e.user?.username),1)]),n("div",j5,[n("h6",G5,"Signed in as @"+u(e.user?.username),1),t[22]||(t[22]=me('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a>',6)),e.headerShowSupport?(l(),d("a",W5,[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):c("v-if",!0),t[23]||(t[23]=n("div",{class:"dropdown-divider"},null,-1)),t[24]||(t[24]=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))])])):c("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,K5)):c("v-if",!0),e.emailPromptOpen?(l(),d("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=ae(o=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=ae(o=>e.respondToEmailPrompt("save"),["prevent"]))},[t[28]||(t[28]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[29]||(t[29]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[30]||(t[30]=n("label",{for:"email-prompt-address"},"Email address",-1)),T(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=o=>e.emailPromptAddress=o),disabled:e.emailPromptBusy},null,8,Y5),[[it,e.emailPromptAddress]]),e.emailPromptError?(l(),d("p",J5,u(e.emailPromptError),1)):c("v-if",!0),n("div",Q5,[n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[5]||(t[5]=o=>e.respondToEmailPrompt( Line truncated
python experiments/run.py`),n("p",null,[h("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),c(" Live stats "),n("section",r8,[t[9]||(t[9]=n("div",{class:"paper-stats-meta"},[n("div",{class:"paper-stats-meta-left"},[n("span",{class:"paper-stats-dot","aria-hidden":"true"}),h(" Live \xB7 last 60 days \xB7 updated daily")]),n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA")],-1)),n("div",a8,[(l(!0),d(W,null,oe(e.cards,(o,i)=>(l(),d("div",{class:"paper-stat-card",key:o?.key},[n("div",{class:O(["paper-stat-value",{"is-pending":!e.stat}])},u(e.stat?e.fmt?.bigNum(o?.total):"\u2014"),3),n("div",l8,u(o?.label),1),e.history[o?.key].bars?.length>1?(l(),d("div",d8," +"+u(e.fmt?.number(e.history[o?.key].deltaToday))+" today ",1)):c("v-if",!0)]))),128))])]),c(" Before / after "),t[25]||(t[25]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[h("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",u8,[n("div",c8,[t[10]||(t[10]=n("label",{for:"demo-terms"},[h("Terms to redact "),n("span",null,"comma-separated, try adding your own")],-1)),T(n("input",{id:"demo-terms",type:"text","onUpdate:modelValue":t[0]||(t[0]=o=>e.demoTerms=o),spellcheck:"false",autocomplete:"off"},null,512),[[it,e.demoTerms]])]),n("div",p8,[n("div",f8,[t[12]||(t[12]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[h("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",m8,[n("div",h8,[(l(!0),d(W,null,oe(e.demoParts(),(o,i)=>(l(),d(W,{key:i},[o.redacted?(l(),d("mark",v8,u(o.original),1)):(l(),d(W,{key:1},[h(u(o.text),1)],64))],64))),128)),t[11]||(t[11]=h("\u200B",-1))]),T(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[1]||(t[1]=o=>e.demoText=o),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[it,e.demoText]])])]),n("div",g8,[n("div",y8,[t[13]||(t[13]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",b8,[n("span",w8,u(e.demoCount())+" redacted",1)])]),n("div",k8,[(l(!0),d(W,null,oe(e.demoParts(),(o,i)=>(l(),d(W,{key:i},[o.redacted?(l(),d("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+o.original+"\u201D"},u(o.text),9,C8)):(l(),d(W,{key:1},[h(u(o.text),1)],64))],64))),128))])])])]),c(" What you get: one screenshot, three tabs "),t[26]||(t[26]=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",E8,[n("div",S8,[(l(!0),d(W,null,oe(e.features,(o,i)=>(l(),d("div",{class:O(["paper-feature",{"is-on":e.feature===o?.key}]),key:o?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:s=>e.selectFeature(o.key),onKeydown:s=>e.featureKeydown(s,i),id:"feature-tab-"+o?.key,"aria-controls":"feature-panel-"+o?.key,"aria-selected":e.feature===o?.key,tabindex:e.feature===o?.key?0:-1},[n("span",R8,u(o?.num)+" \xB7 "+u(o?.eyebrow),1),n("span",D8,u(o?.title)+" "+u(o?.accent),1)],40,N8),n("div",T8,[n("span",_8,u(o?.title)+" "+u(o?.accent),1),n("p",null,u(o?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(o)),target:e.featureTarget(o)},u(o?.cta)+" \u2192",9,A8)])],2))),128))]),n("div",O8,[(l(!0),d(W,null,oe(e.features,(o,i)=>T((l(),d("div",{class:"paper-feature-panel",role:"tabpanel",key:o?.key,id:"feature-panel-"+o?.key,"aria-labelledby":"feature-tab-"+o?.key},[n("div",I8,[n("div",M8,[t[14]||(t[14]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",V8,u(o?.url),1)]),n("div",{class:O(["feat-mock","is-"+o?.key]),role:"img","aria-label":o?.alt},[o?.key==="anonymize"?(l(),d("div",L8,[...t[15]||(t[15]=[me('<div class="fm-label">GitHub repository</div><div class="fm-input">github.com/jane-smith/DeepLearnUtils</div><div class="fm-label">Terms to redact</div><div class="fm-chips"><span>Jane Smith</span><span>MIT CSAIL</span><span>jane.smith@mit.edu</span><span class="fm-chip-add">+ Add term</span></div><div class="fm-row"><div><div class="fm-label">Reviewers can see</div><div class="fm-toggles"><span class="is-on">Images</span><span class="is-on">PDFs</span><span>Links</span><span class="is-on">Notebooks</span></div></div><div><div class="fm-label">Expires</div><div class="fm-input fm-input-sm">Mar 31, 2027</div></div></div><div class="fm-actions"><span class="fm-share">anonymous.4open.science/r/paper-7f2a</span><span class="fm-btn"> Line truncated
label names the service and the tooltip says who to contact. `),t[25]||(t[25]=me('<li class="nav-item d-none d-lg-block"><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"><svg class="ui-icon d-lg-none mr-1" aria-hidden="true"><use href="#ui-icon-bug"></use></svg>Report a bug </a></li><li class="nav-item nav-support-item d-none d-lg-block"><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"><svg class="ui-icon nav-heart" aria-hidden="true"><use href="#ui-icon-heart"></use></svg>Support </a></li>',2)),e.isDarkMode?c("v-if",!0):(l(),d("li",U5,[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]=o=>{e.darkMode(!0)})},[...t[18]||(t[18]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-moon"})],-1)])])])),e.isDarkMode?(l(),d("li",F5,[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]=o=>{e.darkMode(!1)})},[...t[19]||(t[19]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-sun"})],-1)])])])):c("v-if",!0),!e.user&&!e.isReviewerRoute?(l(),d("li",B5,[...t[20]||(t[20]=[n("a",{class:"nav-link btn-signin",target:"_self",href:"/signin","data-offset":"30"},[n("i",{class:"fab fa-github mr-1"}),h(" Sign in ")],-1)])])):c("v-if",!0),e.user?.username&&e.headerCanUpgrade&&!e.headerBillingPending?(l(),d("li",z5,[n("a",{class:"nav-link nav-upgrade",href:"/profile?upgrade=1",onClick:t[3]||(t[3]=le(o=>e.openHeaderUpgrade(),["prevent"]))},"Upgrade")])):c("v-if",!0),e.user?(l(),d("li",H5,[n("a",j5,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,G5)):c("v-if",!0),n("span",W5,u(e.user?.username),1)]),n("div",K5,[n("h6",Y5,"Signed in as @"+u(e.user?.username),1),t[22]||(t[22]=me('<a class="dropdown-item" href="/profile"><svg class="ui-icon" aria-hidden="true"><use href="#project-icon-filter"></use></svg><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/connections"><i class="fab fa-github" aria-hidden="true"></i><span>GitHub connections<small>Repository access and OAuth</small></span></a><a class="dropdown-item" href="/claim"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-link"></use></svg><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><svg class="ui-icon" aria-hidden="true"><use href="#ui-icon-bug"></use></svg><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a>',6)),e.headerShowSupport?(l(),d("a",J5,[...t[21]||(t[21]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-heart"})],-1),n("span",null,"Support the project",-1)])])):c("v-if",!0),t[23]||(t[23]=n("div",{class:"dropdown-divider"},null,-1)),t[24]||(t[24]=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))])])):c("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,Q5)):c("v-if",!0),e.emailPromptOpen?(l(),d("dialog",{key:1,id:"email-prompt",class:"email-prompt","aria-labelledby":"email-prompt-title","aria-describedby":"email-prompt-reason",onCancel:t[8]||(t[8]=le(o=>e.respondToEmailPrompt("later"),["prevent"]))},[n("form",{onSubmit:t[7]||(t[7]=le(o=>e.respondToEmailPrompt("save"),["prevent"]))},[t[28]||(t[28]=n("h2",{id:"email-prompt-title"},"Stay informed about access problems",-1)),t[29]||(t[29]=n("p",{id:"email-prompt-reason"},"Get email alerts when your GitHub token or repository access fails.",-1)),t[30]||(t[30]=n("label",{for:"email-prompt-address"},"Email address",-1)),_(n("input",{id:"email-prompt-address",class:"form-control",type:"email",autocomplete:"email",maxlength:"254",required:"","onUpdate:modelValue":t[4]||(t[4]=o=>e.emailPromptAddress=o),disabled:e.emailPromptBusy},null,8,X5),[[it,e.emailPromptAddress]]),e.emailPromptError?(l(),d("p",Z5,u(e.emailPromptError),1)):c("v-if",!0),n("div",x5,[n("button",{type:"button",class:"btn btn-outline-ink",disabled:e.emailPromptBusy,onClick:t[5]||(t[5]=o=>e.respondToEmailPrompt( Line truncated
python experiments/run.py`),n("p",null,[h("Contact: "),n("span",{class:"redact",role:"img","aria-label":"Redacted term 3"},[n("i",null,"3")])])])])])])],-1))]),c(" Live stats "),n("section",d8,[t[9]||(t[9]=n("div",{class:"paper-stats-meta"},[n("div",{class:"paper-stats-meta-left"},[n("span",{class:"paper-stats-dot","aria-hidden":"true"}),h(" Live \xB7 last 60 days \xB7 updated daily")]),n("div",{class:"paper-stats-meta-right"},"Used by authors at ICSE \xB7 FSE \xB7 OOPSLA")],-1)),n("div",u8,[(l(!0),d(W,null,oe(e.cards,(o,i)=>(l(),d("div",{class:"paper-stat-card",key:o?.key},[n("div",{class:O(["paper-stat-value",{"is-pending":!e.stat}])},u(e.stat?e.fmt?.bigNum(o?.total):"\u2014"),3),n("div",c8,u(o?.label),1),e.history[o?.key].bars?.length>1?(l(),d("div",p8," +"+u(e.fmt?.number(e.history[o?.key].deltaToday))+" today ",1)):c("v-if",!0)]))),128))])]),c(" Before / after "),t[25]||(t[25]=n("section",{class:"paper-section-head paper-wrap"},[n("div",null,[n("div",{class:"paper-eyebrow"},"Try it"),n("h2",null,[h("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",f8,[n("div",m8,[t[10]||(t[10]=n("label",{for:"demo-terms"},[h("Terms to redact "),n("span",null,"comma-separated, try adding your own")],-1)),_(n("input",{id:"demo-terms",type:"text","onUpdate:modelValue":t[0]||(t[0]=o=>e.demoTerms=o),spellcheck:"false",autocomplete:"off"},null,512),[[it,e.demoTerms]])]),n("div",h8,[n("div",v8,[t[12]||(t[12]=n("div",{class:"pane-header"},[n("span",{class:"pane-label"},[h("Your repository "),n("span",{class:"pane-edit-hint"},"\xB7 editable")]),n("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")],-1)),n("div",g8,[n("div",y8,[(l(!0),d(W,null,oe(e.demoParts(),(o,i)=>(l(),d(W,{key:i},[o.redacted?(l(),d("mark",b8,u(o.original),1)):(l(),d(W,{key:1},[h(u(o.text),1)],64))],64))),128)),t[11]||(t[11]=h("\u200B",-1))]),_(n("textarea",{class:"pane-body demo-input","onUpdate:modelValue":t[1]||(t[1]=o=>e.demoText=o),spellcheck:"false","aria-label":"Sample README to anonymize"},null,512),[[it,e.demoText]])])]),n("div",w8,[n("div",k8,[t[13]||(t[13]=n("span",{class:"pane-label"},"What reviewers see",-1)),n("span",C8,[n("span",E8,u(e.demoCount())+" redacted",1)])]),n("div",S8,[(l(!0),d(W,null,oe(e.demoParts(),(o,i)=>(l(),d(W,{key:i},[o.redacted?(l(),d("span",{key:0,class:"redact-chip",title:"Replaces \u201C"+o.original+"\u201D"},u(o.text),9,N8)):(l(),d(W,{key:1},[h(u(o.text),1)],64))],64))),128))])])])]),c(" What you get: one screenshot, three tabs "),t[26]||(t[26]=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",R8,[n("div",D8,[(l(!0),d(W,null,oe(e.features,(o,i)=>(l(),d("div",{class:O(["paper-feature",{"is-on":e.feature===o?.key}]),key:o?.key},[n("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:s=>e.selectFeature(o.key),onKeydown:s=>e.featureKeydown(s,i),id:"feature-tab-"+o?.key,"aria-controls":"feature-panel-"+o?.key,"aria-selected":e.feature===o?.key,tabindex:e.feature===o?.key?0:-1},[n("span",_8,u(o?.num)+" \xB7 "+u(o?.eyebrow),1),n("span",A8,u(o?.title)+" "+u(o?.accent),1)],40,T8),n("div",O8,[n("span",P8,u(o?.title)+" "+u(o?.accent),1),n("p",null,u(o?.text),1),n("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(o)),target:e.featureTarget(o)},u(o?.cta)+" \u2192",9,I8)])],2))),128))]),n("div",M8,[(l(!0),d(W,null,oe(e.features,(o,i)=>_((l(),d("div",{class:"paper-feature-panel",role:"tabpanel",key:o?.key,id:"feature-panel-"+o?.key,"aria-labelledby":"feature-tab-"+o?.key},[n("div",q8,[n("div",L8,[t[14]||(t[14]=n("span",{class:"dots"},[n("i"),n("i"),n("i")],-1)),n("span",$8,u(o?.url),1)]),n("div",{class:O(["feat-mock","is-"+o?.key]),role:"img","aria-label":o?.alt},[o?.key==="anonymize"?(l(),d("div",F8,[...t[15]||(t[15]=[me('<div class="fm-label">GitHub repository</div><div class="fm-input">github.com/jane-smith/DeepLearnUtils</div><div class="fm-label">Terms to redact</div><div class="fm-chips"><span>Jane Smith</span><span>MIT CSAIL</span><span>jane.smith@mit.edu</span><span class="fm-chip-add">+ Add term</span></div><div class="fm-row"><div><div class="fm-label">Reviewers can see</div><div class="fm-toggles"><span class="is-on">Images</span><span class="is-on">PDFs</span><span>Links</span><span class="is-on">Notebooks</span></div></div><div><div class="fm-label">Expires</div><div class="fm-input fm-input-sm">Mar 31, 2027</div></div></div><div class="fm-actions"><span class="fm-share">anonymous.4open.science/r/paper-7f2a</span><span class="fm-btn"> 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
@@ -37,13 +37,13 @@ python experiments/run.py`),n("p",null,[h("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)])])):(l(),d("div",U8,[...t[17]||(t[17]=[me('<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,q8)])],8,P8)),[[Z,e.feature===o?.key]])),128))])]),c(" FAQ teaser "),t[27]||(t[27]=me('<section class="paper-qa paper-wrap" aria-labelledby="qa-heading"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div><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" href="/faq">Read the FAQ \u2192</a></div></section>',2)),n("footer",F8,[n("div",B8,[t[21]||(t[21]=n("div",{class:"paper-footer-brand"},[n("div",{class:"paper-footer-mark"},[h("Anonymous "),n("em",null,"GitHub")]),n("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-anonymous peer review. ")],-1)),n("div",z8,[t[18]||(t[18]=n("div",{class:"paper-footer-head"},"Product",-1)),t[19]||(t[19]=n("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(l(),d("a",H8,"My work")):c("v-if",!0),e.user?(l(),d("a",j8,"Conferences")):c("v-if",!0),t[20]||(t[20]=n("a",{href:"/faq"},"FAQ",-1))]),t[22]||(t[22]=me('<div class="paper-footer-col"><div class="paper-footer-head">Project</div><a href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener">Source code</a><a href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener">Report a bug</a><a href="https://github.com/sponsors/tdurieux/" target="_blank" rel="noopener">Support</a></div><div class="paper-footer-col"><div class="paper-footer-head">Contact</div><a href="mailto:tdurieux@anonymous.4open.science">Email maintainer</a><a href="https://github.com/tdurieux" target="_blank" rel="noopener">@tdurieux</a></div>',2))]),t[24]||(t[24]=n("div",{class:"paper-footer-rule"},null,-1)),n("div",G8,[n("span",null,"\xA9 "+u(e.year||2026)+" Anonymous GitHub \xB7 GPL-3.0 licensed",1),t[23]||(t[23]=n("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])])}var W8={class:"paper-empty"},K8={class:"paper-empty-inner"},Y8={key:0,class:"paper-eyebrow"},J8={key:1,class:"paper-eyebrow"},Q8={key:2,class:"paper-empty-title"},X8=["textContent"];function Yl(e,t){return l(),d("div",W8,[n("div",K8,[e.error?c("v-if",!0):(l(),d("div",Y8,"Working")),e.error?(l(),d("div",J8,"Error")):c("v-if",!0),e.error?c("v-if",!0):(l(),d("h1",Q8,[...t[0]||(t[0]=[h(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(l(),d("h1",{key:3,class:"paper-empty-title",textContent:u(e.fmt.translate(e.error))},null,8,X8)):c("v-if",!0)])])}var Z8={class:"container paper-page paper-settings"},x8={class:"paper-crumbs"},eM={class:"here"},tM={class:"paper-page-title"},nM={class:"paper-settings-body"},oM={class:"paper-settings-toc"},sM={href:"#conf-billing"},iM={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},rM={id:"conf-basics",class:"paper-settings-section"},aM={class:"form-group"},lM={class:"invalLine truncated
`).length))+" lines",1)):c("v-if",!0),e.type=="html"&&e.fileSize(e.filePath)!=null?(l(),d("span",bV,u(e.formatSize(e.fileSize(e.filePath))),1)):c("v-if",!0),e.redactionCount()?(l(),d("b",wV,u(e.redactionCount())+" redacted",1)):c("v-if",!0)]),T(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]=a=>e.copyPath())},[(l(),d("svg",CV,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,EV)]))],8,kV),[[Z,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(l(),d("span",SV,[e.languageName?(l(),d(W,{key:0},[h(u(e.languageName),1),t[34]||(t[34]=n("span",{class:"sep"},"\xB7",-1))],64)):c("v-if",!0),h(u(e.fmt?.number(e.content.split(`
`).length))+" lines",1),n("span",NV,[t[35]||(t[35]=n("span",{class:"sep"},"\xB7",-1)),h(u(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),e.redactionCount()?(l(),d(W,{key:1},[t[36]||(t[36]=n("span",{class:"sep"},"\xB7",-1)),n("span",RV,u(e.redactionCount())+" redacted",1)],64)):c("v-if",!0)])):c("v-if",!0),e.type=="html"?(l(),d("span",DV,[t[39]||(t[39]=h("Markdown",-1)),e.fileSize(e.filePath)!=null?(l(),d(W,{key:0},[t[37]||(t[37]=n("span",{class:"sep"},"\xB7",-1)),h(u(e.formatSize(e.fileSize(e.filePath))),1)],64)):c("v-if",!0),e.redactionCount()?(l(),d(W,{key:1},[t[38]||(t[38]=n("span",{class:"sep"},"\xB7",-1)),n("span",TV,u(e.redactionCount())+" redacted",1)],64)):c("v-if",!0)])):c("v-if",!0),n("div",_V,[e.type!="html"&&e.symbols().length>1?(l(),d("div",AV,[n("button",{type:"button",class:O(["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[3]||(t[3]=a=>e.symbolsOpen=!e.symbolsOpen)},[...t[40]||(t[40]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,OV),e.symbolsOpen?(l(),d("div",PV,[n("div",IV,u(e.symbols().length)+" "+u(e.symbols().length===1?"symbol":"symbols"),1),(l(!0),d(W,null,oe(e.symbols(),a=>(l(),d("button",{type:"button",class:"symbols-item",role:"menuitem",key:a.line+a.name,onClick:p=>e.goToSymbol(a.line)},[n("span",{class:O(["symbols-kind","is-"+a.kind])},u(a.kind==="class"?"C":a.kind==="function"?"\u0192":"v"),3),n("span",VV,u(a.name),1),n("span",qV,u(a.line),1)],8,MV))),128))])):c("v-if",!0)])):c("v-if",!0),e.type=="html"?(l(),d("button",{key:1,type:"button",class:O(["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[4]||(t[4]=a=>e.toggleMdFind())},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,LV)):c("v-if",!0),e.type!="html"?(l(),d("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[5]||(t[5]=a=>e.findInFile())},[...t[42]||(t[42]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,$V)):c("v-if",!0),e.type!="html"?(l(),d("button",{key:3,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[6]||(t[6]=a=>e.gotoLine())},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,UV)):c("v-if",!0),e.type!="html"?(l(),d("button",{key:4,type:"button",class:O(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap long lines",title:"Wrap long lines (Alt+Z)",onClick:t[7]||(t[7]=a=>e.toggleWrap())},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,FV)):c("v-if",!0),n("div",BV,[n("a",{target:"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,zV),typeof e.content=="string"?(l(),d("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[8]||(t[8]=a=>e.copyContent())},[(l(),d("svg",jV,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,GV)]))],8,HV)):c("v-if",!0),n("a",{target:"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.url+"&download=true")},[...t[45]||(t[45]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,WV)]),typeof e.content=="string"?(l(),d("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[9]||(t[9]=a=>e.copyContent())},[(l(),d("svg",YV,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,JV)]))],8,KV)):c("v-if",!0),e.type=="html"&&e.readmeToc().length>=3?(l(),d("div",QV,[n("button",{type:"button",class:O(["btn btn-sm btn-icon-only btn-ghost tb-toc-btn",{"is-on":e.tocOpen}]),"aria-label":"On this page",title:"On this page","aria-haspopup":"true","aria-expanded":e.tocOpen?"true":"false",onClick:t[10]||(t[10]=ae(a=>{e.tocOpen=!e.tocOpen,e.moreOpen=!1},["stop"]))},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-outline"})],-1)])],10,XV),e.tocOpen?(l(),d("div",{key:0,class:"tb-menu tb-toc-menu",role:"menu",onClick:t[12]||(t[12]=a=>e.tocOpen=!1)},[t[47]||(t[47]=n("div",{class:"tb-menu-label"},"On this page",-1)),n("button Line truncated
`).length))+" lines",1)],64)):c("v-if",!0),h(" \xB7 "+u(e.type=="html"&&e.fileSize(e.filePath)!=null?e.formatSize(e.fileSize(e.filePath)):e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)])):c("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(l(),d("div",s6)):c("v-if",!0),e.type=="html"?(l(),d("button",{key:3,type:"button",role:"menuitem",onClick:t[14]||(t[14]=a=>e.toggleMdFind())},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),h("Find in file",-1)])])):c("v-if",!0),e.type=="html"?(l(),d("div",i6)):c("v-if",!0),e.type!="html"?(l(),d("button",{key:5,type:"button",role:"menuitem",onClick:t[15]||(t[15]=a=>e.findInFile())},[...t[51]||(t[51]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),h("Find in file",-1)])])):c("v-if",!0),e.type!="html"?(l(),d("button",{key:6,type:"button",role:"menuitem",onClick:t[16]||(t[16]=a=>e.gotoLine())},[...t[52]||(t[52]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),h("Go to line",-1)])])):c("v-if",!0),e.type!="html"?(l(),d("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[17]||(t[17]=a=>e.toggleWrap())},[t[53]||(t[53]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[54]||(t[54]=h("Wrap lines",-1)),e.wrapLines?(l(),d("span",a6,"\u2713")):c("v-if",!0)],8,r6)):c("v-if",!0),e.type!="html"?(l(),d("div",l6)):c("v-if",!0),e.type=="html"?(l(),d("a",{key:9,role:"menuitem",target:"_self",href:e.safeUrl(e.url)},[...t[55]||(t[55]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h("View raw",-1)])],8,d6)):c("v-if",!0),e.type!="html"?(l(),d("a",{key:10,role:"menuitem",target:"_self",href:e.safeUrl(e.url)},[...t[56]||(t[56]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h("View raw",-1)])],8,u6)):c("v-if",!0),n("a",{role:"menuitem",target:"_self",href:e.safeUrl(e.url+"&download=true")},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),h("Download file",-1)])],8,c6),e.options?.download?(l(),d("a",{key:11,role:"menuitem",target:"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),h("Download ZIP",-1)])],8,p6)):c("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[18]||(t[18]=a=>e.copyPath())},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),h("Copy file path",-1)])]),t[60]||(t[60]=n("div",{class:"tb-menu-sep"},null,-1)),t[61]||(t[61]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),h("FAQ")],-1)),t[62]||(t[62]=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"})]),h("Report a bug")],-1))])):c("v-if",!0)])])]),e.type!="html"?T((l(),d("div",f6,null,512)),[[r,{content:e.content,options:e.aceOption}]]):c("v-if",!0),e.type=="html"&&e.mdFindOpen?(l(),d("div",m6,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[20]||(t[20]=a=>{e.mdFindQuery=a.target.value,e.runMdFind()}),onKeydown:[t[21]||(t[21]=yt(ae(a=>a.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[22]||(t[22]=yt(ae(a=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,h6),n("span",v6,[n("button",{type:"button","aria-label":"Previous match",onClick:t[23]||(t[23]=a=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[63]||(t[63]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,g6),n("button",{type:"button","aria-label":"Next match",onClick:t[24]||(t[24]=a=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[64]||(t[64]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,y6)]),n("span",b6,u(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:O(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e.mdFindCase?"true":"false",title:"Match case","aria-label":"Match case",onClick:t[25]||(t[25]=a=>{e.mdFindCase=!e.mdFindCase,e.runMdFind()})},"Aa",10,w6),n("button",{type:"button",class:"md-find-close","aria-label":"Close find",onClick:t[26]||(t[26]=a=>e.toggleMdFind(!1))},"\xD7")])):c("v-if",!0),e.type=="html"?(l(),d("div",k6,[n("div",{class:"file-content markdown-body",innerHTML:e.renderReadme(e.sanitize(e.content))},null,8,C6),e.readmeToc().length>=3?(l(),d("aside",E6,[t[65]||(t[65]=n("div",{class:"readme-toc-head"}," Line truncated
<span class="ln">10</span> log(<span class="s">&quot;epoch %d: %.3f&quot;</span>, epoch, loss)</pre></div>`,2)])])):(l(),d("div",z8,[...t[17]||(t[17]=[me('<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,U8)])],8,V8)),[[Y,e.feature===o?.key]])),128))])]),c(" FAQ teaser "),t[27]||(t[27]=me('<section class="paper-qa paper-wrap" aria-labelledby="qa-heading"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that come up most.</h2><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div><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" href="/faq">Read the FAQ \u2192</a></div></section>',2)),n("footer",H8,[n("div",j8,[t[21]||(t[21]=n("div",{class:"paper-footer-brand"},[n("div",{class:"paper-footer-mark"},[h("Anonymous "),n("em",null,"GitHub")]),n("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-anonymous peer review. ")],-1)),n("div",G8,[t[18]||(t[18]=n("div",{class:"paper-footer-head"},"Product",-1)),t[19]||(t[19]=n("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(l(),d("a",W8,"My work")):c("v-if",!0),e.user?(l(),d("a",K8,"Conferences")):c("v-if",!0),t[20]||(t[20]=n("a",{href:"/faq"},"FAQ",-1))]),t[22]||(t[22]=me('<div class="paper-footer-col"><div class="paper-footer-head">Project</div><a href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener">Source code</a><a href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener">Report a bug</a><a href="https://github.com/sponsors/tdurieux/" target="_blank" rel="noopener">Support</a></div><div class="paper-footer-col"><div class="paper-footer-head">Contact</div><a href="mailto:tdurieux@anonymous.4open.science">Email maintainer</a><a href="https://github.com/tdurieux" target="_blank" rel="noopener">@tdurieux</a></div>',2))]),t[24]||(t[24]=n("div",{class:"paper-footer-rule"},null,-1)),n("div",Y8,[n("span",null,"\xA9 "+u(e.year||2026)+" Anonymous GitHub \xB7 GPL-3.0 licensed",1),t[23]||(t[23]=n("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])])}var J8={class:"paper-empty"},Q8={class:"paper-empty-inner"},X8={key:0,class:"paper-eyebrow"},Z8={key:1,class:"paper-eyebrow"},x8={key:2,class:"paper-empty-title"},eM=["textContent"];function Xl(e,t){return l(),d("div",J8,[n("div",Q8,[e.error?c("v-if",!0):(l(),d("div",X8,"Working")),e.error?(l(),d("div",Z8,"Error")):c("v-if",!0),e.error?c("v-if",!0):(l(),d("h1",x8,[...t[0]||(t[0]=[h(" Loading",-1),n("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(l(),d("h1",{key:3,class:"paper-empty-title",textContent:u(e.fmt.translate(e.error))},null,8,eM)):c("v-if",!0)])])}var tM={class:"container paper-page paper-settings"},nM={class:"paper-crumbs"},oM={class:"here"},sM={class:"paper-page-title"},iM={class:"paper-settings-body"},rM={class:"paper-settings-toc"},aM={href:"#conf-billing"},lM={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},dM={id:"conf-basics",class:"paper-settings-section"},uM={class:"form-group"},cM={class:"invalLine truncated
`).length))+" lines",1)):c("v-if",!0),e.type=="html"&&e.fileSize(e.filePath)!=null?(l(),d("span",CV,u(e.formatSize(e.fileSize(e.filePath))),1)):c("v-if",!0),e.redactionCount()?(l(),d("b",EV,u(e.redactionCount())+" redacted",1)):c("v-if",!0)]),_(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]=a=>e.copyPath())},[(l(),d("svg",NV,[n("use",{href:e.pathCopied?"#ui-icon-check":"#ui-icon-link"},null,8,RV)]))],8,SV),[[Y,e.filePath]])]),e.type!="html"&&typeof e.content=="string"?(l(),d("span",DV,[e.languageName?(l(),d(W,{key:0},[h(u(e.languageName),1),t[34]||(t[34]=n("span",{class:"sep"},"\xB7",-1))],64)):c("v-if",!0),h(u(e.fmt?.number(e.content.split(`
`).length))+" lines",1),n("span",TV,[t[35]||(t[35]=n("span",{class:"sep"},"\xB7",-1)),h(u(e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)]),e.redactionCount()?(l(),d(W,{key:1},[t[36]||(t[36]=n("span",{class:"sep"},"\xB7",-1)),n("span",_V,u(e.redactionCount())+" redacted",1)],64)):c("v-if",!0)])):c("v-if",!0),e.type=="html"?(l(),d("span",AV,[t[39]||(t[39]=h("Markdown",-1)),e.fileSize(e.filePath)!=null?(l(),d(W,{key:0},[t[37]||(t[37]=n("span",{class:"sep"},"\xB7",-1)),h(u(e.formatSize(e.fileSize(e.filePath))),1)],64)):c("v-if",!0),e.redactionCount()?(l(),d(W,{key:1},[t[38]||(t[38]=n("span",{class:"sep"},"\xB7",-1)),n("span",OV,u(e.redactionCount())+" redacted",1)],64)):c("v-if",!0)])):c("v-if",!0),n("div",PV,[e.type!="html"&&e.symbols().length>1?(l(),d("div",IV,[n("button",{type:"button",class:O(["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[3]||(t[3]=a=>e.symbolsOpen=!e.symbolsOpen)},[...t[40]||(t[40]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-list"})],-1),n("span",{class:"btn-find-label"},"Symbols",-1)])],10,MV),e.symbolsOpen?(l(),d("div",VV,[n("div",qV,u(e.symbols().length)+" "+u(e.symbols().length===1?"symbol":"symbols"),1),(l(!0),d(W,null,oe(e.symbols(),a=>(l(),d("button",{type:"button",class:"symbols-item",role:"menuitem",key:a.line+a.name,onClick:p=>e.goToSymbol(a.line)},[n("span",{class:O(["symbols-kind","is-"+a.kind])},u(a.kind==="class"?"C":a.kind==="function"?"\u0192":"v"),3),n("span",$V,u(a.name),1),n("span",UV,u(a.line),1)],8,LV))),128))])):c("v-if",!0)])):c("v-if",!0),e.type=="html"?(l(),d("button",{key:1,type:"button",class:O(["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[4]||(t[4]=a=>e.toggleMdFind())},[...t[41]||(t[41]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],10,FV)):c("v-if",!0),e.type!="html"?(l(),d("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[5]||(t[5]=a=>e.findInFile())},[...t[42]||(t[42]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1)])],8,BV)):c("v-if",!0),e.type!="html"?(l(),d("button",{key:3,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[6]||(t[6]=a=>e.gotoLine())},[...t[43]||(t[43]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1)])],8,zV)):c("v-if",!0),e.type!="html"?(l(),d("button",{key:4,type:"button",class:O(["btn btn-sm btn-icon-only btn-ghost btn-toggle",{"is-on":e.wrapLines}]),"aria-pressed":e.wrapLines?"true":"false","aria-label":"Wrap long lines",title:"Wrap long lines (Alt+Z)",onClick:t[7]||(t[7]=a=>e.toggleWrap())},[...t[44]||(t[44]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)])],10,HV)):c("v-if",!0),n("div",jV,[n("a",{target:"_self",class:"tb-seg-btn",title:e.type=="html"?"Open the Markdown source":"Open the raw file",href:e.safeUrl(e.url)},"Raw",8,GV),typeof e.content=="string"?(l(),d("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[8]||(t[8]=a=>e.copyContent())},[(l(),d("svg",KV,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,YV)]))],8,WV)):c("v-if",!0),n("a",{target:"_self",class:"tb-seg-btn tb-seg-icon","aria-label":"Download file",title:"Download file",href:e.safeUrl(e.url+"&download=true")},[...t[45]||(t[45]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1)])],8,JV)]),typeof e.content=="string"?(l(),d("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[9]||(t[9]=a=>e.copyContent())},[(l(),d("svg",XV,[n("use",{href:e.contentCopied?"#ui-icon-check":"#project-icon-copy"},null,8,ZV)]))],8,QV)):c("v-if",!0),e.type=="html"&&e.readmeToc().length>=3?(l(),d("div",xV,[n("button",{type:"button",class:O(["btn btn-sm btn-icon-only btn-ghost tb-toc-btn",{"is-on":e.tocOpen}]),"aria-label":"On this page",title:"On this page","aria-haspopup":"true","aria-expanded":e.tocOpen?"true":"false",onClick:t[10]||(t[10]=le(a=>{e.tocOpen=!e.tocOpen,e.moreOpen=!1},["stop"]))},[...t[46]||(t[46]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-outline"})],-1)])],10,e6),e.tocOpen?(l(),d("div",{key:0,class:"tb-menu tb-toc-menu",role:"menu",onClick:t[12]||(t[12]=a=>e.tocOpen=!1)},[t[47]||(t[47]=n("div",{class:"tb-menu-label"},"On this page",-1)),n("button Line truncated
`).length))+" lines",1)],64)):c("v-if",!0),h(" \xB7 "+u(e.type=="html"&&e.fileSize(e.filePath)!=null?e.formatSize(e.fileSize(e.filePath)):e.content.length<1024?e.content.length+" B":(e.content.length/1024).toFixed(1)+" KB"),1)])):c("v-if",!0),e.options?.publishedAt||e.options?.sourceCommitDate||e.options?.anonymizedAt||e.options?.lastUpdateDate?(l(),d("div",a6)):c("v-if",!0),e.type=="html"?(l(),d("button",{key:3,type:"button",role:"menuitem",onClick:t[14]||(t[14]=a=>e.toggleMdFind())},[...t[50]||(t[50]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),h("Find in file",-1)])])):c("v-if",!0),e.type=="html"?(l(),d("div",l6)):c("v-if",!0),e.type!="html"?(l(),d("button",{key:5,type:"button",role:"menuitem",onClick:t[15]||(t[15]=a=>e.findInFile())},[...t[51]||(t[51]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-search"})],-1),h("Find in file",-1)])])):c("v-if",!0),e.type!="html"?(l(),d("button",{key:6,type:"button",role:"menuitem",onClick:t[16]||(t[16]=a=>e.gotoLine())},[...t[52]||(t[52]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-goto"})],-1),h("Go to line",-1)])])):c("v-if",!0),e.type!="html"?(l(),d("button",{key:7,type:"button",role:"menuitemcheckbox","aria-checked":e.wrapLines?"true":"false",onClick:t[17]||(t[17]=a=>e.toggleWrap())},[t[53]||(t[53]=n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-wrap"})],-1)),t[54]||(t[54]=h("Wrap lines",-1)),e.wrapLines?(l(),d("span",u6,"\u2713")):c("v-if",!0)],8,d6)):c("v-if",!0),e.type!="html"?(l(),d("div",c6)):c("v-if",!0),e.type=="html"?(l(),d("a",{key:9,role:"menuitem",target:"_self",href:e.safeUrl(e.url)},[...t[55]||(t[55]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h("View raw",-1)])],8,p6)):c("v-if",!0),e.type!="html"?(l(),d("a",{key:10,role:"menuitem",target:"_self",href:e.safeUrl(e.url)},[...t[56]||(t[56]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-code"})],-1),h("View raw",-1)])],8,f6)):c("v-if",!0),n("a",{role:"menuitem",target:"_self",href:e.safeUrl(e.url+"&download=true")},[...t[57]||(t[57]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-download"})],-1),h("Download file",-1)])],8,m6),e.options?.hasWebsite?(l(),d("a",{key:11,role:"menuitem",target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[58]||(t[58]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-globe"})],-1),h("Open website",-1)])],8,h6)):c("v-if",!0),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:12,role:"menuitem",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[59]||(t[59]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-edit"})],-1),h("Edit anonymization",-1)])],8,v6)):c("v-if",!0),e.options?.download?(l(),d("a",{key:13,role:"menuitem",target:"_self",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[60]||(t[60]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-archive"})],-1),h("Download ZIP",-1)])],8,g6)):c("v-if",!0),n("button",{type:"button",role:"menuitem",onClick:t[18]||(t[18]=a=>e.copyPath())},[...t[61]||(t[61]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-link"})],-1),h("Copy file path",-1)])]),t[62]||(t[62]=n("div",{class:"tb-menu-sep"},null,-1)),t[63]||(t[63]=n("a",{role:"menuitem",href:"/faq"},[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-help"})]),h("FAQ")],-1)),t[64]||(t[64]=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"})]),h("Report a bug")],-1))])):c("v-if",!0)])])]),e.type!="html"?_((l(),d("div",y6,null,512)),[[r,{content:e.content,options:e.aceOption}]]):c("v-if",!0),e.type=="html"&&e.mdFindOpen?(l(),d("div",b6,[n("input",{type:"search",class:"md-find-input",placeholder:"Find on this page","aria-label":"Find on this page",value:e.mdFindQuery,onInput:t[20]||(t[20]=a=>{e.mdFindQuery=a.target.value,e.runMdFind()}),onKeydown:[t[21]||(t[21]=yt(le(a=>a.shiftKey?e.stepMdFind(-1):e.stepMdFind(1),["prevent"]),["enter"])),t[22]||(t[22]=yt(le(a=>e.toggleMdFind(!1),["prevent"]),["esc"]))]},null,40,w6),n("span",k6,[n("button",{type:"button","aria-label":"Previous match",onClick:t[23]||(t[23]=a=>e.stepMdFind(-1)),disabled:!e.mdFindTotal},[...t[65]||(t[65]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-left"})],-1)])],8,C6),n("button",{type:"button","aria-label":"Next match",onClick:t[24]||(t[24]=a=>e.stepMdFind(1)),disabled:!e.mdFindTotal},[...t[66]||(t[66]=[n("svg",{class:"ui-icon","aria-hidden":"true"},[n("use",{href:"#ui-icon-chevron-right"})],-1)])],8,E6)]),n("span",S6,u(e.mdFindQuery?e.mdFindTotal?e.mdFindIndex+1+" of "+e.mdFindTotal:"No results":""),1),n("button",{type:"button",class:O(["md-find-opt",{"is-on":e.mdFindCase}]),"aria-pressed":e. Line truncated
MIT CSAIL
jane.smith@example.org`},aL={class:"settings-syntax"},lL={class:"invalid-feedback"},dL={class:"settings-row"},uL={class:"settings-checks"},cL={class:"settings-check"},pL={class:"form-check-input",type:"checkbox",id:"link",name:"link"},fL={class:"settings-check"},mL={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},hL={class:"settings-check"},vL={class:"form-check-input",type:"checkbox",id:"image",name:"image"},gL={class:"settings-check"},yL={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},bL={class:"settings-check"},wL={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},kL={class:"settings-check"},CL={class:"form-check-input",type:"checkbox",id:"page",name:"page"},EL={class:"settings-row"},SL={class:"settings-check"},NL={class:"form-check-input",type:"checkbox",id:"update",name:"update"},RL={class:"settings-row"},DL={class:"form-control",id:"expiration",name:"expiration"},TL={class:"settings-help"},_L={class:"settings-save"},AL={class:"settings-save-status draft-status",role:"status"},OL={key:0},PL={key:1},IL={key:2},ML=["disabled"],VL={key:1,class:"settings-save-error",role:"alert"},qL=["aria-busy"],LL={key:0,role:"status"},$L={key:1,class:"settings-notice",role:"alert"},UL=["disabled"],FL={key:2,class:"settings-notice",role:"status"},BL={key:3,class:"settings-notice",role:"status"},zL=["disabled"],HL={class:"settings-row"},jL={class:"settings-inline"},GL={key:0,class:"settings-help"},WL={key:0,class:"settings-help"},KL={id:"settings-quota"},YL={key:1,role:"status"},JL={key:1,class:"settings-notice"},QL={key:2,class:"settings-notice"},XL={key:3,class:"settings-notice"},ZL={key:4,class:"settings-help"},xL={key:5,class:"settings-plan billing-plan"},e$={class:"settings-comparison"},t$={class:"settings-cycles"},n$=["checked","onChange"],o$={class:"settings-help"},s$={class:"settings-actions"},i$=["disabled"],r$={key:6,class:"settings-help"},a$={class:"settings-row"},l$={key:0,class:"settings-inline"},d$=["disabled"],u$={key:1,class:"settings-help"},c$=["disabled"],p$={key:4,class:"settings-row"},f$={class:"settings-inline"},m$=["disabled"],h$={key:0,class:"settings-pass"},v$={class:"settings-help"},g$=["disabled"],y$={key:5,class:"settings-row"},b$={class:"settings-help"},w$={id:"settings-account",class:"settings-account-panel"},k$={class:"paper-account-card"},C$=["src"],E$={class:"paper-account-identity"},S$={class:"paper-account-name"},N$=["disabled"],R$={key:0,role:"status"},D$={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},T$=["disabled"],_$={key:3,role:"status"},A$={class:"paper-danger-zone"},O$={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},P$=["textContent"],I$=["disabled"],M$={key:1,class:"settings-delete-confirm"},V$={for:"delete-username"},q$={class:"settings-actions"},L$=["disabled"],$$=["disabled"];function Zl(e,t){let o=Ge("quota-usage"),i=we("field"),s=we("form");return l(),d("div",eL,[n("header",tL,[t[20]||(t[20]=n("h1",null,"Settings",-1)),n("div",nL,[n("span",null,"@"+u(e.user?.username),1)])]),n("nav",oL,[(l(),d(W,null,oe([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:a=>e.settingsTab=r.id},u(r.label),9,sL)),64))]),T(n("div",null,[t[41]||(t[41]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),T((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[1]||(t[1]=ae(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",iL,[t[26]||(t[26]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[T(n("textarea",rL,null,512),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",aL,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=h("Matches become ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=h(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=h(" for a custom replacement. Regex is supported.",-1))])]),T(n("div",lL,"Terms are in an invalid format.",512),[[Z,e.defaultsForm?.terms?.errors?.format]])])]),n("section",dL,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",uL,[n("label",cL,[T(n("input",pL,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=h("Keep links",-1))]),n("label",fL,[T(n("input",mL,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=h("Render notebooks",-1))]),n("label",hL,[T(n("input",vL,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image Line truncated
`);for(let w=0;w<b.length;w++){let m=b[w];if(m.startsWith("diff --git")){y(),f();continue}if(m.startsWith("--- ")){r&&r.lines.length&&y(),f().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){f().newPath=m.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(m.startsWith("index ")||m.startsWith("similarity index")||m.startsWith("rename ")||m.startsWith("new file mode")||m.startsWith("deleted file mode")||m.startsWith("Binary files"))){if(m.startsWith("@@")){let E=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);E&&(a=parseInt(E[1],10),p=parseInt(E[2],10)),f().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}r&&(m.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:p,text:m.slice(1)}),p++):m.startsWith("-")?(r.lines.push({kind:"remove",oldNo:a,newNo:"",text:m.slice(1)}),a++):(r.lines.push({kind:"ctx",oldNo:a,newNo:p,text:m.startsWith(" ")?m.slice(1):m}),a++,p++))}}return o(s,r),s.join("")}})({trustAsHtml:e=>e});function iF(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function rF(e){return String(e??"").toUpperCase()}function aF(e,t,o=0){return(e||[]).slice(o,o+t)}function lF(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function dF(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((i,s)=>{for(let r of o){let a=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let p=r.split(".").reduce((y,b)=>y?.[b],i),f=r.split(".").reduce((y,b)=>y?.[b],s);if(typeof p=="string"&&(p=p.toLowerCase()),typeof f=="string"&&(f=f.toLowerCase()),p!==f)return(p==null?-1:f==null?1:p<f?-1:1)*a}return 0})}function uF(e,t){if(!e)return"";let o=new Date(e);if(isNaN(o))return String(e);if(!t||t==="mediumDate")return o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:o.getFullYear(),MMM:o.toLocaleDateString(void 0,{month:"short"}),MM:String(o.getMonth()+1).padStart(2,"0"),dd:String(o.getDate()).padStart(2,"0"),d:o.getDate(),HH:String(o.getHours()).padStart(2,"0"),mm:String(o.getMinutes()).padStart(2,"0"),ss:String(o.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,s=>i[s])}function cF(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var rd={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=et(null);return Ft(()=>{let i=[t.value][0];i.classList.add("html-doc");function s(){i.innerHTML="";let r=e.content;if(typeof r!="string")return;let a=document.createElement("iframe");a.className="html-doc-frame",a.setAttribute("title","Rendered HTML document");let p=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&p.push("allow-scripts","allow-forms","allow-modals"),a.setAttribute("sandbox",p.join(" ")),a.setAttribute("referrerpolicy","no-referrer"),i.appendChild(a);let f="";e.baseUrl&&(f='<base href="'+e.baseUrl.replace(/&/g,"&amp;").replace(/"/g,"&quot;")+'">'),a.srcdoc=f+r}Fe(()=>e.content,s,{immediate:!0}),Fe(()=>e.baseUrl,s,{immediate:!0}),Fe(()=>e.allowScripts,s,{immediate:!0})}),()=>Se("html-doc",{ref:t})}};var ad={name:"pdfviewer",props:["src"],setup(e){let t=et(null);return Ft(()=>{let o=[t.value],i=400,s=[.5,.75,1,1.25,1.5,2,3],r=1e3,a=o[0];a.classList.add("pdf-viewer");let p=null,f=[],y=!1,b=null,w=1,m=1,E=0,I=0,C=612/792,v=0,S=null,D=new Map,V=0;function F(k){let N=D.get(k);N&&(N.cancelled=!0,N.task?.cancel?.(),D.delete(k));let q=k.querySelector("canvas");q&&(q.width=0,q.height=0),k.innerHTML="",delete k.dataset.state}let L=document.createElement("div");L.className="pdf-toolbar";let G=document.createElement("div");G.className="pdf-pages",G.tabIndex=0,G.setAttribute("aria-label","PDF pages"),a.appendChild(L),a.appendChild(G);function ie(k,N,q){let H=document.createElement("button");return H.type="button",H.className="pdf-toolbar-btn",H.title=N,H.setAttribute("aria-label",N),H.innerHTML='<i class="fas '+k+'"></i>',H.addEventListener("click",q),H}let te=ie("fa-chevron-up","Previous page",function(){ze(m-1)}),R=ie("fa-chevron-down","Next page",function(){ze(m+1)}),Q=document.createElement("input");Q.type="text",Q.className="pdf-toolbar-page",Q.setAttribute("aria-label","Page number"),Q.title="Page number \u2014 type a page and press Enter",Q.addEventListener("keydown",function(k){k.key==="Enter"&&(ze(parseInt(Q.value,10)),Q.blur())}),Q.addEventListener("blur",function(){Q.value=String(m)});let ne=document.createElement("span");ne.className="pdf-toolbar-count";let ve=ie("fa-search-minus","Zoom out",function(){j(s[Math.max(0,be()-1)])}),ee=ie("fa-search-plus","Zoom in",function(){j(s[Math.min(s.length-1,be()+1)])}),de=document.createElement("button");de.type="button",de.className="pdf-toolbar-btn pdf-toolbar-zoom",de.title="Reset zoom to fit the width",de.setAttribute("aria-label","Reset zoom to fit the width"),de.addEventListener("click",function(){j(1)}),L.appendChild(te),L.appendChild(R);let he=document.createElement("span");he.className="pdf-toolbar-group",he.appendChi Line truncated
jane.smith@example.org`},pL={class:"settings-syntax"},fL={class:"invalid-feedback"},mL={class:"settings-row"},hL={class:"settings-checks"},vL={class:"settings-check"},gL={class:"form-check-input",type:"checkbox",id:"link",name:"link"},yL={class:"settings-check"},bL={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},wL={class:"settings-check"},kL={class:"form-check-input",type:"checkbox",id:"image",name:"image"},CL={class:"settings-check"},EL={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},SL={class:"settings-check"},NL={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},RL={class:"settings-check"},DL={class:"form-check-input",type:"checkbox",id:"page",name:"page"},TL={class:"settings-row"},_L={class:"settings-check"},AL={class:"form-check-input",type:"checkbox",id:"update",name:"update"},OL={class:"settings-row"},PL={class:"form-control",id:"expiration",name:"expiration"},IL={class:"settings-help"},ML={class:"settings-save"},VL={class:"settings-save-status draft-status",role:"status"},qL={key:0},LL={key:1},$L={key:2},UL=["disabled"],FL={key:1,class:"settings-save-error",role:"alert"},BL=["aria-busy"],zL={key:0,role:"status"},HL={key:1,class:"settings-notice",role:"alert"},jL=["disabled"],GL={key:2,class:"settings-notice",role:"status"},WL={key:3,class:"settings-notice",role:"status"},KL=["disabled"],YL={class:"settings-row"},JL={class:"settings-inline"},QL={key:0,class:"settings-help"},XL={key:0,class:"settings-help"},ZL={id:"settings-quota"},xL={key:1,role:"status"},e$={key:1,class:"settings-notice"},t$={key:2,class:"settings-notice"},n$={key:3,class:"settings-notice"},o$={key:4,class:"settings-help"},s$={key:5,class:"settings-plan billing-plan"},i$={class:"settings-comparison"},r$={class:"settings-cycles"},a$=["checked","onChange"],l$={class:"settings-help"},d$={class:"settings-actions"},u$=["disabled"],c$={key:6,class:"settings-help"},p$={class:"settings-row"},f$={key:0,class:"settings-inline"},m$=["disabled"],h$={key:1,class:"settings-help"},v$=["disabled"],g$={key:4,class:"settings-row"},y$={class:"settings-inline"},b$=["disabled"],w$={key:0,class:"settings-pass"},k$={class:"settings-help"},C$=["disabled"],E$={key:5,class:"settings-row"},S$={class:"settings-help"},N$={id:"settings-account",class:"settings-account-panel"},R$={class:"paper-account-card"},D$=["src"],T$={class:"paper-account-identity"},_$={class:"paper-account-name"},A$=["disabled"],O$={key:0,role:"status"},P$={key:1,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},I$=["disabled"],M$={key:3,role:"status"},V$={class:"paper-danger-zone"},q$={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},L$=["textContent"],$$=["disabled"],U$={key:1,class:"settings-delete-confirm"},F$={for:"delete-username"},B$={class:"settings-actions"},z$=["disabled"],H$=["disabled"];function td(e,t){let o=We("quota-usage"),i=we("field"),s=we("form");return l(),d("div",iL,[n("header",rL,[t[20]||(t[20]=n("h1",null,"Settings",-1)),n("div",aL,[n("span",null,"@"+u(e.user?.username),1)])]),n("nav",lL,[(l(),d(W,null,oe([{id:"defaults",label:"Anonymization defaults"},{id:"billing",label:"Hosting & billing"},{id:"account",label:"Account"}],r=>n("button",{type:"button","aria-current":e.settingsTab===r.id?"page":null,onClick:a=>e.settingsTab=r.id},u(r.label),9,dL)),64))]),_(n("div",null,[t[41]||(t[41]=n("p",{class:"settings-scope"},"For new anonymizations only. Existing repositories keep their settings.",-1)),_((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[1]||(t[1]=le(r=>e.submitForm(r,()=>{e.saveDefault(r)}),["prevent"]))},[n("section",uL,[t[26]||(t[26]=n("div",null,[n("label",{class:"settings-label",for:"terms"},"Terms to redact"),n("p",{class:"settings-help"},"One term per line.")],-1)),n("div",null,[_(n("textarea",cL,null,512),[[i,{state:e.viewState,set:r=>{e.terms=r},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),n("details",pL,[t[25]||(t[25]=n("summary",null,"Regex & replacement syntax",-1)),n("p",null,[t[21]||(t[21]=h("Matches become ",-1)),n("code",null,u(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[22]||(t[22]=h(". Use ",-1)),t[23]||(t[23]=n("code",null,"term=>replacement",-1)),t[24]||(t[24]=h(" for a custom replacement. Regex is supported.",-1))])]),_(n("div",fL,"Terms are in an invalid format.",512),[[Y,e.defaultsForm?.terms?.errors?.format]])])]),n("section",mL,[t[35]||(t[35]=n("h2",null,"Reviewer display",-1)),n("div",null,[n("div",hL,[n("label",vL,[_(n("input",gL,null,512),[[i,{state:e.viewState,set:r=>{e.options.link=r},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=h("Keep links",-1))]),n("label",yL,[_(n("input",bL,null,512),[[i,{state:e.viewState,set:r=>{e.options.notebook=r},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[28]||(t[28]=h("Render notebooks",-1))]),n("label",wL,[_(n("input",kL,null,512),[[i,{state:e.viewState,set:r=>{e.options.image=r},value:e.options?.image Line truncated
`);for(let b=0;b<y.length;b++){let m=y[b];if(m.startsWith("diff --git")){g(),f();continue}if(m.startsWith("--- ")){r&&r.lines.length&&g(),f().oldPath=m.replace(/^--- (a\/)?/,"").trim();continue}if(m.startsWith("+++ ")){f().newPath=m.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(m.startsWith("index ")||m.startsWith("similarity index")||m.startsWith("rename ")||m.startsWith("new file mode")||m.startsWith("deleted file mode")||m.startsWith("Binary files"))){if(m.startsWith("@@")){let E=m.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);E&&(a=parseInt(E[1],10),p=parseInt(E[2],10)),f().lines.push({kind:"hunk",oldNo:"",newNo:"",text:m});continue}r&&(m.startsWith("+")?(r.lines.push({kind:"add",oldNo:"",newNo:p,text:m.slice(1)}),p++):m.startsWith("-")?(r.lines.push({kind:"remove",oldNo:a,newNo:"",text:m.slice(1)}),a++):(r.lines.push({kind:"ctx",oldNo:a,newNo:p,text:m.startsWith(" ")?m.slice(1):m}),a++,p++))}}return o(s,r),s.join("")}})({trustAsHtml:e=>e});function uF(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function cF(e){return String(e??"").toUpperCase()}function pF(e,t,o=0){return(e||[]).slice(o,o+t)}function fF(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function mF(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((i,s)=>{for(let r of o){let a=r[0]==="-"?-1:1;r=r.replace(/^[+-]/,"");let p=r.split(".").reduce((g,y)=>g?.[y],i),f=r.split(".").reduce((g,y)=>g?.[y],s);if(typeof p=="string"&&(p=p.toLowerCase()),typeof f=="string"&&(f=f.toLowerCase()),p!==f)return(p==null?-1:f==null?1:p<f?-1:1)*a}return 0})}function hF(e,t){if(!e)return"";let o=new Date(e);if(isNaN(o))return String(e);if(!t||t==="mediumDate")return o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let i={yyyy:o.getFullYear(),MMM:o.toLocaleDateString(void 0,{month:"short"}),MM:String(o.getMonth()+1).padStart(2,"0"),dd:String(o.getDate()).padStart(2,"0"),d:o.getDate(),HH:String(o.getHours()).padStart(2,"0"),mm:String(o.getMinutes()).padStart(2,"0"),ss:String(o.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,s=>i[s])}function vF(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var dd={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=et(null);return Ft(()=>{let i=[t.value][0];i.classList.add("html-doc");function s(){i.innerHTML="";let r=e.content;if(typeof r!="string")return;let a=document.createElement("iframe");a.className="html-doc-frame",a.setAttribute("title","Rendered HTML document");let p=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&p.push("allow-scripts","allow-forms","allow-modals"),a.setAttribute("sandbox",p.join(" ")),a.setAttribute("referrerpolicy","no-referrer"),i.appendChild(a);let f="";e.baseUrl&&(f='<base href="'+e.baseUrl.replace(/&/g,"&amp;").replace(/"/g,"&quot;")+'">'),a.srcdoc=f+r}Fe(()=>e.content,s,{immediate:!0}),Fe(()=>e.baseUrl,s,{immediate:!0}),Fe(()=>e.allowScripts,s,{immediate:!0})}),()=>Se("html-doc",{ref:t})}};var ud={name:"pdfviewer",props:["src"],setup(e){let t=et(null);return Ft(()=>{let o=[t.value],i=400,s=[.5,.75,1,1.25,1.5,2,3],r=1e3,a=o[0];a.classList.add("pdf-viewer");let p=null,f=[],g=!1,y=null,b=1,m=1,E=0,P=0,k=612/792,v=0,S=null,T=new Map,M=0;function L(C){let N=T.get(C);N&&(N.cancelled=!0,N.task?.cancel?.(),T.delete(C));let V=C.querySelector("canvas");V&&(V.width=0,V.height=0),C.innerHTML="",delete C.dataset.state}let q=document.createElement("div");q.className="pdf-toolbar";let G=document.createElement("div");G.className="pdf-pages",G.tabIndex=0,G.setAttribute("aria-label","PDF pages"),a.appendChild(q),a.appendChild(G);function se(C,N,V){let j=document.createElement("button");return j.type="button",j.className="pdf-toolbar-btn",j.title=N,j.setAttribute("aria-label",N),j.innerHTML='<i class="fas '+C+'"></i>',j.addEventListener("click",V),j}let ee=se("fa-chevron-up","Previous page",function(){ze(m-1)}),R=se("fa-chevron-down","Next page",function(){ze(m+1)}),K=document.createElement("input");K.type="text",K.className="pdf-toolbar-page",K.setAttribute("aria-label","Page number"),K.title="Page number \u2014 type a page and press Enter",K.addEventListener("keydown",function(C){C.key==="Enter"&&(ze(parseInt(K.value,10)),K.blur())}),K.addEventListener("blur",function(){K.value=String(m)});let te=document.createElement("span");te.className="pdf-toolbar-count";let ve=se("fa-search-minus","Zoom out",function(){re(s[Math.max(0,ye()-1)])}),x=se("fa-search-plus","Zoom in",function(){re(s[Math.min(s.length-1,ye()+1)])}),ue=document.createElement("button");ue.type="button",ue.className="pdf-toolbar-btn pdf-toolbar-zoom",ue.title="Reset zoom to fit the width",ue.setAttribute("aria-label","Reset zoom to fit the width"),ue.addEventListener("click",function(){re(1)}),q.appendChild(ee),q.appendChild(R);let he=document.createElement("span");he.className="pdf-toolbar-group",he.appendC Line truncated
/*! Bundled license information:
@vue/shared/dist/shared.esm-bundler.js: